commit 7d2a07b769330c34b4deabeed939325c77a7ec2f Author: Linus Torvalds Date: Sun Aug 29 15:04:50 2021 -0700 Linux 5.14 commit 90ac80dcd3136da7c5694835d6cad2010aa08798 Merge: 537b57bd5a202 1669a941f7c48 Author: Linus Torvalds Date: Sun Aug 29 12:52:17 2021 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One hotfix for a NULL pointer deref in the Renesas usb clk driver" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: renesas: rcar-usb2-clock-sel: Fix kernel NULL pointer dereference commit 537b57bd5a202af145c266d4773971c2c9f90cd9 Merge: f20a2637b1b18 e681dcbaa4b28 Author: Linus Torvalds Date: Sun Aug 29 10:54:14 2021 -0700 Merge tag 'sched_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Borislav Petkov: - Have get_push_task() check whether current has migration disabled and thus avoid useless invocations of the migration thread - Rework initialization flow so that all rq->core's are initialized, even of CPUs which have not been onlined yet, so that iterating over them all works as expected * tag 'sched_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Fix get_push_task() vs migrate_disable() sched: Fix Core-wide rq->lock for uninitialized CPUs commit f20a2637b1b1851cb30fceab68c27aef5fd43a2c Merge: 98d006eb49cba 1a519dc7a73c9 Author: Linus Torvalds Date: Sun Aug 29 10:47:02 2021 -0700 Merge tag 'irq_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: - Have msix_mask_all() check a global control which says whether MSI-X masking should be done and thus make it usable on Xen-PV too * tag 'irq_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: PCI/MSI: Skip masking MSI-X on Xen PV commit 98d006eb49cba379c50536b5de24f05df927c126 Merge: 072a276745da1 ccf26483416a3 Author: Linus Torvalds Date: Sun Aug 29 10:36:32 2021 -0700 Merge tag 'perf_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Prevent the amd/power module from being removed while in use - Mark AMD IBS as not supporting content exclusion - Add a workaround for AMD erratum #1197 where IBS registers might not be restored properly after exiting CC6 state - Fix a potential truncation of a 32-bit variable due to shifting - Read the correct bits describing the number of configurable address ranges on Intel PT * tag 'perf_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/amd/power: Assign pmu.module perf/x86/amd/ibs: Extend PERF_PMU_CAP_NO_EXCLUDE to IBS Op perf/x86/amd/ibs: Work around erratum #1197 perf/x86/intel/uncore: Fix integer overflow on 23 bit left shift of a u32 perf/x86/intel/pt: Fix mask of num_address_ranges commit 072a276745da10620c9b84a08519620670ba7496 Merge: f6a3308d6feb3 527f721478bce Author: Linus Torvalds Date: Sun Aug 29 10:26:00 2021 -0700 Merge tag 'x86_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Fix build error on RHEL where -Werror=maybe-uninitialized is set. - Restore the firmware's IDT when calling EFI boot services and before ExitBootServices() has been called. This fixes a boot failure on what appears to be a tablet with 32-bit UEFI running a 64-bit kernel. * tag 'x86_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Fix a maybe-uninitialized build warning treated as error x86/efi: Restore Firmware IDT before calling ExitBootServices() commit f6a3308d6feb351d9854eb8b3f6289a1ac163125 Author: Helge Deller Date: Fri Aug 27 20:42:57 2021 +0200 Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" This reverts commit 83af58f8068ea3f7b3c537c37a30887bfa585069. It turns out that at least the assembly implementation for strncpy() was buggy. Revert the whole commit and return back to the default coding. Signed-off-by: Helge Deller Cc: # v5.4+ Cc: Rasmus Villemoes Signed-off-by: Linus Torvalds commit 1669a941f7c4844ae808cf441db51dde9e94db07 Author: Adam Ford Date: Thu Aug 26 09:17:21 2021 -0500 clk: renesas: rcar-usb2-clock-sel: Fix kernel NULL pointer dereference The probe was manually passing NULL instead of dev to devm_clk_hw_register. This caused a Unable to handle kernel NULL pointer dereference error. Fix this by passing 'dev'. Signed-off-by: Adam Ford Fixes: a20a40a8bbc2 ("clk: renesas: rcar-usb2-clock-sel: Fix error handling in .probe()") Reviewed-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd commit 3f5ad13cb012939e1797ec9cdf43941c169216d2 Merge: 447e238f14b25 02c6dcd543f8f Author: Linus Torvalds Date: Sat Aug 28 11:39:16 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "A single fix for a race introduced by a fix that went into 5.14-rc5" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: core: Fix hang of freezing queue between blocking and running device commit 447e238f14b251acf2a954750e028ad0352b0016 Merge: 9f73eacde73b1 068fdad20454f Author: Linus Torvalds Date: Sat Aug 28 11:32:16 2021 -0700 Merge tag 'usb-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a few tiny USB fixes for reported issues with some USB drivers. These fixes include: - gadget driver fixes for regressions - tcpm driver fix - dwc3 driver fixes - xhci renesas firmware loading fix, again. - usb serial option driver device id addition - usb serial ch341 revert for regression All all of these have been in linux-next with no reported problems" * tag 'usb-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: u_audio: fix race condition on endpoint stop usb: gadget: f_uac2: fixup feedback endpoint stop usb: typec: tcpm: Raise vdm_sm_running flag only when VDM SM is running usb: renesas-xhci: Prefer firmware loading on unknown ROM state usb: dwc3: gadget: Stop EP0 transfers during pullup disable usb: dwc3: gadget: Fix dwc3_calc_trbs_left() Revert "USB: serial: ch341: fix character loss at high transfer rates" USB: serial: option: add new VID/PID to support Fibocom FG150 commit 9f73eacde73b105d722968e79d0f84fd5034a6f4 Merge: 64b4fc45bea6f 787c70f2f9990 Author: Linus Torvalds Date: Sat Aug 28 10:40:41 2021 -0700 Merge tag 'powerpc-5.14-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix scv implicit soft-mask table for relocated (eg. kdump) kernels - Re-enable ARCH_ENABLE_SPLIT_PMD_PTLOCK, which was disabled due to a typo Thanks to Lukas Bulwahn, Nicholas Piggin, and Daniel Axtens. * tag 'powerpc-5.14-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Fix scv implicit soft-mask table for relocated kernels powerpc: Re-enable ARCH_ENABLE_SPLIT_PMD_PTLOCK commit 64b4fc45bea6f4faa843d2f97ff51665280efee1 Merge: 6f18b82b41147 222013f9ac30b Author: Linus Torvalds Date: Fri Aug 27 16:08:29 2021 -0700 Merge tag 'block-5.14-2021-08-27' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Revert the mq-deadline priority handling, it's causing serious performance regressions. While experimental patches exists to fix this up, it's too late to do so now. Revert it and re-do it properly for 5.15 instead. - Fix a NULL vs IS_ERR() regression in this release (Dan) - Fix a mq-deadline accounting regression in this release (Bart) - Mark cryptoloop as deprecated. It's broken and dm-crypt fully supports it, and it's actively intefering with loop. Plan on removal for 5.16 (Christoph) * tag 'block-5.14-2021-08-27' of git://git.kernel.dk/linux-block: cryptoloop: add a deprecation warning pd: fix a NULL vs IS_ERR() check Revert "block/mq-deadline: Prioritize high-priority requests" mq-deadline: Fix request accounting commit 6f18b82b41147ee15b0b5bf7c9ae0464dda287f9 Merge: 8f9d0349841a2 6c35ca0697410 Author: Linus Torvalds Date: Fri Aug 27 15:59:00 2021 -0700 Merge tag 'soc-fixes-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Just two trivial fixes from the reset driver tree, nothing else came up since the last soc fixes" * tag 'soc-fixes-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: reset: reset-zynqmp: Fixed the argument data type reset: RESET_MCHP_SPARX5 should depend on ARCH_SPARX5 commit 8f9d0349841a2871624bb1e85309e03e9867c16e Merge: c0006dc6957ef 294c34e704e78 Author: Linus Torvalds Date: Fri Aug 27 12:18:09 2021 -0700 Merge tag 'acpi-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a regression introduced during this cycle that has been partially addressed by an earlier commit (Andy Shevchenko)" * tag 'acpi-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: media: ipu3-cio2: Drop reference on error path in cio2_bridge_connect_sensor() commit c0006dc6957ef0b5d3e785556f30f928af05ab0c Merge: 425bec0032f59 7ee5fd12e8cac Author: Linus Torvalds Date: Fri Aug 27 12:06:51 2021 -0700 Merge tag 'pm-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two issues introduced during this cycle, one of which is a regression and the other one affects new code. Specifics: - Prevent the operating performance points (OPP) code from crashing when some entries in the table of required OPPs are set to error pointer values (Marijn Suijten) - Prevent the generic power domains (genpd) framework from incorrectly overriding the performance state of a device set by its driver while it is runtime-suspended or when runtime PM of it is disabled (Dmitry Osipenko)" * tag 'pm-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: domains: Improve runtime PM performance state handling opp: core: Check for pending links before reading required_opp pointers commit 425bec0032f59eeee12520085cd054fac09cc66e Author: David Hildenbrand Date: Wed Aug 25 12:24:15 2021 +0200 virtio-mem: fix sleeping in RCU read side section in virtio_mem_online_page_cb() virtio_mem_set_fake_offline() might sleep now, and we call it under rcu_read_lock(). To fix it, simply move the rcu_read_unlock() further up, as we're done with the device. Reported-by: Dan Carpenter Fixes: 6cc26d77613a: "virtio-mem: use page_offline_(start|end) when setting PageOffline() Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Andrew Morton Cc: virtualization@lists.linux-foundation.org Signed-off-by: David Hildenbrand Signed-off-by: Linus Torvalds commit 7ee5fd12e8cac91bdec6de8417b030ed05d5d7ee Merge: 3c5a272202c28 1f8b66d9654b2 Author: Rafael J. Wysocki Date: Fri Aug 27 20:27:01 2021 +0200 Merge branch 'pm-opp' * pm-opp: opp: core: Check for pending links before reading required_opp pointers commit 5a61b7a29647ed7c939ca76d3bf83c75d10ba16e Merge: 1a6436f375129 417166ddec020 Author: Linus Torvalds Date: Fri Aug 27 11:04:57 2021 -0700 Merge tag 'riscv-for-linus-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - device tree updates for the Microsemi Polarfire development kit that fix some mismatches between the u-boot and Linux enternet entries - ensure that the F register state is correctly reflected in core dumps * tag 'riscv-for-linus-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: dts: microchip: Add ethernet0 to the aliases node riscv: dts: microchip: Use 'local-mac-address' for emac1 riscv: Ensure the value of FP registers in the core dump file is up to date commit 1a6436f375129a96adcc492013a466b934fcad79 Merge: 94606b893f450 885814a97f5a1 Author: Linus Torvalds Date: Fri Aug 27 09:52:48 2021 -0700 Merge tag 'mmc-v5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fix from Ulf Hansson: - sdhci-iproc: Fix clock error for ACPI rpi's * tag 'mmc-v5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: Revert "mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711" commit 222013f9ac30b9cec44301daa8dbd0aae38abffb Author: Christoph Hellwig Date: Fri Aug 27 18:32:50 2021 +0200 cryptoloop: add a deprecation warning Support for cryptoloop has been officially marked broken and deprecated in favor of dm-crypt (which supports the same broken algorithms if needed) in Linux 2.6.4 (released in March 2004), and support for it has been entirely removed from losetup in util-linux 2.23 (released in April 2013). Add a warning and a deprecation schedule. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210827163250.255325-1-hch@lst.de Signed-off-by: Jens Axboe commit 94606b893f4503a834f066bc9caa9659bd9ef810 Merge: 77dd11439b86e 463dbba4d1897 Author: Linus Torvalds Date: Fri Aug 27 09:00:43 2021 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Resolve a Keystone 2 kernel mapping regression" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9104/2: Fix Keystone 2 kernel mapping regression commit 885814a97f5a1a2daf66bde5f2076f0bf632c174 Author: Ulf Hansson Date: Fri Aug 27 16:30:36 2021 +0200 Revert "mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711" This reverts commit 419dd626e357e89fc9c4e3863592c8b38cfe1571. It turned out that the change from the reverted commit breaks the ACPI based rpi's because it causes the 100Mhz max clock to be overridden to the return from sdhci_iproc_get_max_clock(), which is 0 because there isn't a OF/DT based clock device. Reported-by: Jeremy Linton Fixes: 419dd626e357 ("mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711") Acked-by: Stefan Wahren Signed-off-by: Ulf Hansson commit 068fdad20454f815e61e6f6eb9f051a8b3120e88 Author: Jerome Brunet Date: Fri Aug 27 11:29:27 2021 +0200 usb: gadget: u_audio: fix race condition on endpoint stop If the endpoint completion callback is call right after the ep_enabled flag is cleared and before usb_ep_dequeue() is call, we could do a double free on the request and the associated buffer. Fix this by clearing ep_enabled after all the endpoint requests have been dequeued. Fixes: 7de8681be2cd ("usb: gadget: u_audio: Free requests only after callback") Cc: stable Reported-by: Thinh Nguyen Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210827092927.366482-1-jbrunet@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 75432ba583a8a374b8d1ad2d3ba559a78f7454fc Author: Jerome Brunet Date: Fri Aug 27 09:58:53 2021 +0200 usb: gadget: f_uac2: fixup feedback endpoint stop When the uac2 function is stopped, there seems to be an issue reported on some platforms (Intel Merrifield at least) BUG: kernel NULL pointer dereference, address: 0000000000000008 ... RIP: 0010:dwc3_gadget_del_and_unmap_request+0x19/0xe0 ... Call Trace: dwc3_remove_requests.constprop.0+0x12f/0x170 __dwc3_gadget_ep_disable+0x7a/0x160 dwc3_gadget_ep_disable+0x3d/0xd0 usb_ep_disable+0x1c/0x70 u_audio_stop_capture+0x79/0x120 [u_audio] afunc_set_alt+0x73/0x80 [usb_f_uac2] composite_setup+0x224/0x1b90 [libcomposite] The issue happens only when the gadget is using the sync type "async", not "adaptive". This indicates that problem is coming from the feedback endpoint, which is only used with async synchronization mode. The problem is that request is freed regardless of usb_ep_dequeue(), which ends up badly if the request is not actually dequeued yet. Update the feedback endpoint free function to release the endpoint the same way it is done for the data endpoint, which takes care of the problem. Fixes: 24f779dac8f3 ("usb: gadget: f_uac2/u_audio: add feedback endpoint support") Reported-by: Ferry Toth Tested-by: Ferry Toth Acked-by: Felipe Balbi Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210827075853.266912-1-jbrunet@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 3375dca0b542c747d29655cf52f7b2741ecebe0e Author: Dan Carpenter Date: Fri Aug 27 13:00:23 2021 +0300 pd: fix a NULL vs IS_ERR() check blk_mq_alloc_disk() returns error pointers, it doesn't return NULL so correct the check. Fixes: 262d431f9000 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20210827100023.GB9449@kili Signed-off-by: Jens Axboe commit 77dd11439b86e3f7990e4c0c9e0b67dca82750ba Merge: 73367f05b25db 9fe4f5a24fdac Author: Linus Torvalds Date: Thu Aug 26 18:44:25 2021 -0700 Merge tag 'drm-fixes-2021-08-27' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Last set of fixes for 5.14, nothing major a couple of i915, couple of imx and a few amdgpu. All pretty small. i915: - Fix syncmap memory leak - Drop redundant display port debug print amdgpu: - Fix for pinning display buffers multiple times - Fix delayed work handling for GFXOFF - Fix build when CONFIG_SUSPEND is not set imx: - fix planar offset calculations - fix accidental partial revert" * tag 'drm-fixes-2021-08-27' of git://anongit.freedesktop.org/drm/drm: drm/i915/dp: Drop redundant debug print drm/i915: Fix syncmap memory leak drm/amdgpu: Fix build with missing pm_suspend_target_state module export drm/amdgpu: Cancel delayed work when GFXOFF is disabled drm/amdgpu: use the preferred pin domain after the check drm/imx: ipuv3-plane: fix accidental partial revert of 8 pixel alignment fix gpu: ipu-v3: Fix i.MX IPU-v3 offset calculations for (semi)planar U/V formats commit 9fe4f5a24fdac99c484daf29eded9c6685fa2020 Merge: 589744dbdd760 72fc2752f91b4 Author: Dave Airlie Date: Fri Aug 27 10:49:32 2021 +1000 Merge tag 'imx-drm-fixes-2021-08-18' of git://git.pengutronix.de/pza/linux into drm-fixes drm/imx: imx-drm alignment and plane offset fixes Fix an accidental partial revert of commit 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix") and plane offset calculations for capture of non-aligned resolutions. Signed-off-by: Dave Airlie From: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/85a41af99beb2c9e7d6020435a135bf9f205a5ff.camel@pengutronix.de commit 589744dbdd760f34e1de6c5d907598df1d17c8d4 Merge: 4f33239615da9 c41a4e877a185 Author: Dave Airlie Date: Fri Aug 27 10:24:07 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-08-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-08-25: amdgpu: - Fix for pinning display buffers multiple times - Fix delayed work handling for GFXOFF - Fix build when CONFIG_SUSPEND is not set Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210826032658.4068-1-alexander.deucher@amd.com commit 4f33239615da9446311806bd79b4d5ba78524163 Merge: e22ce8eb631bd 71de496cc489b Author: Dave Airlie Date: Fri Aug 27 10:13:37 2021 +1000 Merge tag 'drm-intel-fixes-2021-08-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix syncmap memory leak - Drop redundant display port debug print Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YSfSeHbyS5wBZtNJ@intel.com commit 1a519dc7a73c977547d8b5108d98c6e769c89f4b Author: Marek Marczykowski-Górecki Date: Thu Aug 26 19:03:42 2021 +0200 PCI/MSI: Skip masking MSI-X on Xen PV When running as Xen PV guest, masking MSI-X is a responsibility of the hypervisor. The guest has no write access to the relevant BAR at all - when it tries to, it results in a crash like this: BUG: unable to handle page fault for address: ffffc9004069100c #PF: supervisor write access in kernel mode #PF: error_code(0x0003) - permissions violation RIP: e030:__pci_enable_msix_range.part.0+0x26b/0x5f0 e1000e_set_interrupt_capability+0xbf/0xd0 [e1000e] e1000_probe+0x41f/0xdb0 [e1000e] local_pci_probe+0x42/0x80 (...) The recently introduced function msix_mask_all() does not check the global variable pci_msi_ignore_mask which is set by XEN PV to bypass the masking of MSI[-X] interrupts. Add the check to make this function XEN PV compatible. Fixes: 7d5ec3d36123 ("PCI/MSI: Mask all unused MSI-X entries") Signed-off-by: Marek Marczykowski-Górecki Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210826170342.135172-1-marmarek@invisiblethingslab.com commit 73367f05b25dbd064061aee780638564d15b01d1 Merge: 8a2cb8bd064ec 062b829c52ef4 Author: Linus Torvalds Date: Thu Aug 26 13:26:40 2021 -0700 Merge tag 'nfsd-5.14-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fix from Bruce Fields: "This is a one-liner fix for a serious bug that can cause the server to become unresponsive to a client, so I think it's worth the last-minute inclusion for 5.14" * tag 'nfsd-5.14-1' of git://linux-nfs.org/~bfields/linux: SUNRPC: Fix XPT_BUSY flag leakage in svc_handle_xprt()... commit 8a2cb8bd064ecb089995469076f3055fbfd0a4c9 Merge: 1a6d80ff2419e 9ebc2758d0bbe Author: Linus Torvalds Date: Thu Aug 26 13:20:22 2021 -0700 Merge tag 'net-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from can and bpf. Closing three hw-dependent regressions. Any fixes of note are in the 'old code' category. Nothing blocking release from our perspective. Current release - regressions: - stmmac: revert "stmmac: align RX buffers" - usb: asix: ax88772: move embedded PHY detection as early as possible - usb: asix: do not call phy_disconnect() for ax88178 - Revert "net: really fix the build...", from Kalle to fix QCA6390 Current release - new code bugs: - phy: mediatek: add the missing suspend/resume callbacks Previous releases - regressions: - qrtr: fix another OOB Read in qrtr_endpoint_post - stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings Previous releases - always broken: - inet: use siphash in exception handling - ip_gre: add validation for csum_start - bpf: fix ringbuf helper function compatibility - rtnetlink: return correct error on changing device netns - e1000e: do not try to recover the NVM checksum on Tiger Lake" * tag 'net-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (43 commits) Revert "net: really fix the build..." net: hns3: fix get wrong pfc_en when query PFC configuration net: hns3: fix GRO configuration error after reset net: hns3: change the method of getting cmd index in debugfs net: hns3: fix duplicate node in VLAN list net: hns3: fix speed unknown issue in bond 4 net: hns3: add waiting time before cmdq memory is released net: hns3: clear hardware resource when loading driver net: fix NULL pointer reference in cipso_v4_doi_free rtnetlink: Return correct error on changing device netns net: dsa: hellcreek: Adjust schedule look ahead window net: dsa: hellcreek: Fix incorrect setting of GCL cxgb4: dont touch blocked freelist bitmap after free ipv4: use siphash instead of Jenkins in fnhe_hashfun() ipv6: use siphash in rt6_exception_hash() can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters net: usb: asix: ax88772: fix boolconv.cocci warnings net/sched: ets: fix crash when flipping from 'strict' to 'quantum' qede: Fix memset corruption net: stmmac: fix kernel panic due to NULL pointer dereference of buf->xdp ... commit 7b05bf771084ff788243b78f51bc2c820730951c Author: Jens Axboe Date: Thu Aug 26 12:59:44 2021 -0600 Revert "block/mq-deadline: Prioritize high-priority requests" This reverts commit fb926032b3209300f9dc454a36b8299582ae545c. Zhen reports that this commit slows down mq-deadline on a 128 thread box, going from 258K IOPS to 170-180K. My testing shows that Optane gen2 IOPS goes from 2.3M IOPS to 1.2M IOPS on a 64 thread box. Looking in detail at the code, the main culprit here is needing to sum percpu counters in the dispatch hot path, leading to very high CPU utilization there. To make matters worse, the code currently needs to sum 2 percpu counters, and it does so in the most naive way of iterating possible CPUs _twice_. Since we're close to release, revert this commit and we can re-do it with regular per-priority counters instead for the 5.15 kernel. Link: https://lore.kernel.org/linux-block/20210826144039.2143-1-thunder.leizhen@huawei.com/ Reported-by: Zhen Lei Signed-off-by: Jens Axboe commit 1a6d80ff2419e8ad627b4bf4775a8b4c70af535d Merge: 97d8cc20085f6 3eb9cdffb3970 Author: Linus Torvalds Date: Thu Aug 26 11:26:00 2021 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: "We received a report this week that the generic version of pfn_valid(), which we switched to this merge window in 16c9afc77660 ("arm64/mm: drop HAVE_ARCH_PFN_VALID"), interacts badly with dma_map_resource() due to the following check: /* Don't allow RAM to be mapped */ if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr)))) return DMA_MAPPING_ERROR; Since the ongoing saga to determine the semantics of pfn_valid() is unlikely to be resolved this week (does it indicate valid memory, or just the presence of a struct page, or whether that struct page has been initialised?), just revert back to our old version of pfn_valid() for 5.14. Summary: - Fix dma_map_resource() by reverting back to old pfn_valid() code" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Partially revert "arm64/mm: drop HAVE_ARCH_PFN_VALID" commit 97d8cc20085f63cfbf0b123295e12cf9ad66a03c Merge: 9b49ceb8545b8 a9e6ffbc5b732 Author: Linus Torvalds Date: Thu Aug 26 11:18:30 2021 -0700 Merge tag 'ceph-for-5.14-rc8' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two memory management fixes for the filesystem" * tag 'ceph-for-5.14-rc8' of git://github.com/ceph/ceph-client: ceph: fix possible null-pointer dereference in ceph_mdsmap_decode() ceph: correctly handle releasing an embedded cap flush commit 9ebc2758d0bbed951511d1709be0717178ec2660 Author: Kalle Valo Date: Thu Aug 26 20:28:16 2021 +0300 Revert "net: really fix the build..." This reverts commit ce78ffa3ef1681065ba451cfd545da6126f5ca88. Wren and Nicolas reported that ath11k was failing to initialise QCA6390 Wi-Fi 6 device with error: qcom_mhi_qrtr: probe of mhi0_IPCR failed with error -22 Commit ce78ffa3ef16 ("net: really fix the build..."), introduced in v5.14-rc5, caused this regression in qrtr. Most likely all ath11k devices are broken, but I only tested QCA6390. Let's revert the broken commit so that ath11k works again. Reported-by: Wren Turkal Reported-by: Nicolas Schichan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210826172816.24478-1-kvalo@codeaurora.org Signed-off-by: Jakub Kicinski commit 9b49ceb8545b8eca68c03388a07ecca7caa5d9c1 Merge: 73f3af7b4611d 4e9655763b82a Author: Linus Torvalds Date: Thu Aug 26 11:05:11 2021 -0700 Merge tag 'for-5.14-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One more fix that I think qualifies for a late merge. It's a revert of a one-liner fix that meanwhile got backported to stable kernels and we got reports from users. The broken fix prevents creating compressed inline extents, which could be noticeable on space consumption. Technically it's a regression as the patch was merged in 5.14-rc1 but got propagated to several stable kernels and has higher exposure than a 'typical' development cycle bug" * tag 'for-5.14-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Revert "btrfs: compression: don't try to compress if we don't have enough pages" commit e681dcbaa4b284454fecd09617f8b24231448446 Author: Sebastian Andrzej Siewior Date: Thu Aug 26 15:37:38 2021 +0200 sched: Fix get_push_task() vs migrate_disable() push_rt_task() attempts to move the currently running task away if the next runnable task has migration disabled and therefore is pinned on the current CPU. The current task is retrieved via get_push_task() which only checks for nr_cpus_allowed == 1, but does not check whether the task has migration disabled and therefore cannot be moved either. The consequence is a pointless invocation of the migration thread which correctly observes that the task cannot be moved. Return NULL if the task has migration disabled and cannot be moved to another CPU. Fixes: a7c81556ec4d3 ("sched: Fix migrate_disable() vs rt/dl balancing") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210826133738.yiotqbtdaxzjsnfj@linutronix.de commit 294c34e704e78d641b039064ce72d4531afe0088 Author: Andy Shevchenko Date: Thu Aug 26 13:53:24 2021 +0300 media: ipu3-cio2: Drop reference on error path in cio2_bridge_connect_sensor() The commit 71f642833284 ("ACPI: utils: Fix reference counting in for_each_acpi_dev_match()") moved adev assignment outside of error path and hence made acpi_dev_put(sensor->adev) a no-op. We still need to drop reference count on error path, and to achieve that, replace sensor->adev by locally assigned adev. Fixes: 71f642833284 ("ACPI: utils: Fix reference counting in for_each_acpi_dev_match()") Depends-on: fc68f42aa737 ("ACPI: fix NULL pointer dereference") Reported-by: Jens Axboe Signed-off-by: Andy Shevchenko Acked-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit 75da63b7a13981e2b1972f4e3444108b05c6ceaf Merge: 57f8178292714 5b029a32cfe46 Author: Jakub Kicinski Date: Thu Aug 26 08:43:20 2021 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== bpf 2021-08-26 We've added 1 non-merge commit during the last 1 day(s): 1) Fix ringbuf helper function compatibility, from Daniel. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Fix ringbuf helper function compatibility ==================== Link: https://lore.kernel.org/r/20210826153720.19083-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit 57f8178292714ce042f7ead960a945f237da49b2 Merge: 733c99ee8be9a 8c1671e0d13d4 Author: Jakub Kicinski Date: Thu Aug 26 07:24:20 2021 -0700 Merge branch 'net-hns3-add-some-fixes-for-net' Guangbin Huang says: ==================== net: hns3: add some fixes for -net This series adds some fixes for the HNS3 ethernet driver. ==================== Link: https://lore.kernel.org/r/1629976921-43438-1-git-send-email-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski commit 8c1671e0d13d4a0ba4fb3a0da932bf3736d7ff73 Author: Guangbin Huang Date: Thu Aug 26 19:22:01 2021 +0800 net: hns3: fix get wrong pfc_en when query PFC configuration Currently, when query PFC configuration by dcbtool, driver will return PFC enable status based on TC. As all priorities are mapped to TC0 by default, if TC0 is enabled, then all priorities mapped to TC0 will be shown as enabled status when query PFC setting, even though some priorities have never been set. for example: $ dcb pfc show dev eth0 pfc-cap 4 macsec-bypass off delay 0 prio-pfc 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off $ dcb pfc set dev eth0 prio-pfc 0:on 1:on 2:on 3:on $ dcb pfc show dev eth0 pfc-cap 4 macsec-bypass off delay 0 prio-pfc 0:on 1:on 2:on 3:on 4:on 5:on 6:on 7:on To fix this problem, just returns user's PFC config parameter saved in driver. Fixes: cacde272dd00 ("net: hns3: Add hclge_dcb module for the support of DCB feature") Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 3462207d2d684658d97499ca77c00c9ac7c87ea8 Author: Yufeng Mo Date: Thu Aug 26 19:22:00 2021 +0800 net: hns3: fix GRO configuration error after reset The GRO configuration is enabled by default after reset. This is incorrect and should be restored to the user-configured value. So this restoration is added during reset initialization. Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 55649d56541bebecfd45ecd14f02944190538a66 Author: Yufeng Mo Date: Thu Aug 26 19:21:59 2021 +0800 net: hns3: change the method of getting cmd index in debugfs Currently, the cmd index is obtained in debugfs by comparing file names. However, this method may cause errors when processing more complex file names. So, change this method by saving cmd in private data and comparing it when getting cmd index in debugfs for optimization. Fixes: 5e69ea7ee2a6 ("net: hns3: refactor the debugfs process") Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 94391fae82f71c98ecc7716a32611fcca73c74eb Author: Guojia Liao Date: Thu Aug 26 19:21:58 2021 +0800 net: hns3: fix duplicate node in VLAN list VLAN list should not be added duplicate VLAN node, otherwise it would cause "add failed" when restore VLAN from VLAN list, so this patch adds VLAN ID check before adding node into VLAN list. Fixes: c6075b193462 ("net: hns3: Record VF vlan tables") Signed-off-by: Guojia Liao Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit b15c072a9f4a404c09ad589477f4389034742a8b Author: Yonglong Liu Date: Thu Aug 26 19:21:57 2021 +0800 net: hns3: fix speed unknown issue in bond 4 In bond 4, when the link goes down and up repeatedly, the bond may get an unknown speed, and then this port can not work. The driver notify netif_carrier_on() before update the link state, when the bond receive carrier on, will query the speed of the port, if the query operation happens before updating the link state, will get an unknown speed. So need to notify netif_carrier_on() after update the link state. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Yonglong Liu Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit a96d9330b02a3d051ae689bc2c5e7d3a2ba25594 Author: Yufeng Mo Date: Thu Aug 26 19:21:56 2021 +0800 net: hns3: add waiting time before cmdq memory is released After the cmdq registers are cleared, the firmware may take time to clear out possible left over commands in the cmdq. Driver must release cmdq memory only after firmware has completed processing of left over commands. Fixes: 232d0d55fca6 ("net: hns3: uninitialize command queue while unloading PF driver") Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 1a6d281946c330cee2855f6d0cd796616e54601f Author: Yufeng Mo Date: Thu Aug 26 19:21:55 2021 +0800 net: hns3: clear hardware resource when loading driver If a PF is bonded to a virtual machine and the virtual machine exits unexpectedly, some hardware resource cannot be cleared. In this case, loading driver may cause exceptions. Therefore, the hardware resource needs to be cleared when the driver is loaded. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yufeng Mo Signed-off-by: Salil Mehta Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit ef52b4a9fcc24e17e81cc60357e6107ae4e9c48e Author: Kyle Tso Date: Thu Aug 26 20:42:01 2021 +0800 usb: typec: tcpm: Raise vdm_sm_running flag only when VDM SM is running If the port is going to send Discover_Identity Message, vdm_sm_running flag was intentionally set before entering Ready States in order to avoid the conflict because the port and the port partner might start AMS at almost the same time after entering Ready States. However, the original design has a problem. When the port is doing DR_SWAP from Device to Host, it raises the flag. Later in the tcpm_send_discover_work, the flag blocks the procedure of sending the Discover_Identity and it might never be cleared until disconnection. Since there exists another flag send_discover representing that the port is going to send Discover_Identity or not, it is enough to use that flag to prevent the conflict. Also change the timing of the set/clear of vdm_sm_running to indicate whether the VDM SM is actually running or not. Fixes: c34e85fa69b9 ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work") Cc: stable Cc: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210826124201.1562502-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit c82cacd2f1e622a461a77d275a75d7e19e7635a3 Author: Takashi Iwai Date: Thu Aug 26 14:41:27 2021 +0200 usb: renesas-xhci: Prefer firmware loading on unknown ROM state The recent attempt to handle an unknown ROM state in the commit d143825baf15 ("usb: renesas-xhci: Fix handling of unknown ROM state") resulted in a regression and reverted later by the commit 44cf53602f5a ("Revert "usb: renesas-xhci: Fix handling of unknown ROM state""). The problem of the former fix was that it treated the failure of firmware loading as a fatal error. Since the firmware files aren't included in the standard linux-firmware tree, most users don't have them, hence they got the non-working system after that. The revert fixed the regression, but also it didn't make the firmware loading triggered even on the devices that do need it. So we need still a fix for them. This is another attempt to handle the unknown ROM state. Like the previous fix, this also tries to load the firmware when ROM shows unknown state. In this patch, however, the failure of a firmware loading (such as a missing firmware file) isn't handled as a fatal error any longer when ROM has been already detected, but it falls back to the ROM mode like before. The error is returned only when no ROM is detected and the firmware loading failed. Along with it, for simplifying the code flow, the detection and the check of ROM is factored out from renesas_fw_check_running() and done in the caller side, renesas_xhci_check_request_fw(). It avoids the redundant ROM checks. The patch was tested on Lenovo Thinkpad T14 gen (BIOS 1.34). Also it was confirmed that no regression is seen on another Thinkpad T14 machine that has worked without the patch, too. Fixes: 44cf53602f5a ("Revert "usb: renesas-xhci: Fix handling of unknown ROM state"") Cc: stable Signed-off-by: Takashi Iwai BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1189207 Link: https://lore.kernel.org/r/20210826124127.14789-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit 4a1e25c0a029b97ea4a3d423a6392bfacc3b2e39 Author: Wesley Cheng Date: Tue Aug 24 21:28:55 2021 -0700 usb: dwc3: gadget: Stop EP0 transfers during pullup disable During a USB cable disconnect, or soft disconnect scenario, a pending SETUP transaction may not be completed, leading to the following error: dwc3 a600000.dwc3: timed out waiting for SETUP phase If this occurs, then the entire pullup disable routine is skipped and proper cleanup and halting of the controller does not complete. Instead of returning an error (which is ignored from the UDC perspective), allow the pullup disable routine to continue, which will also handle disabling of EP0/1. This will end any active transfers as well. Ensure to clear any delayed_status also, as the timeout could happen within the STATUS stage. Fixes: bb0147364850 ("usb: dwc3: gadget: don't clear RUN/STOP when it's invalid to do so") Cc: Reviewed-by: Thinh Nguyen Acked-by: Felipe Balbi Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20210825042855.7977-1-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 6c35ca06974105d929f25f487c6ae7a47fffa128 Merge: e22ce8eb631bd ed104ca4bd9c4 Author: Arnd Bergmann Date: Mon Aug 23 23:41:27 2021 +0200 Merge tag 'reset-fixes-for-v5.14' of git://git.pengutronix.de/pza/linux into arm/fixes Reset controller fixes for v5.14 Hide the Sparx5 reset driver unless the ARCH_SPARX5 or COMPILE_TEST options are enabled, to avoid unnecessarily asking users about this driver. Fix a return value argument type in the ZynqMP reset driver. * tag 'reset-fixes-for-v5.14' of git://git.pengutronix.de/pza/linux: reset: reset-zynqmp: Fixed the argument data type reset: RESET_MCHP_SPARX5 should depend on ARCH_SPARX5 Link: https://lore.kernel.org/r/e543959c5b5ee7b25686f81049bf187d602daeda.camel@pengutronix.de Signed-off-by: Arnd Bergmann commit 51f1954ad853d01ba4dc2b35dee14d8490ee05a1 Author: Thinh Nguyen Date: Thu Aug 19 03:17:03 2021 +0200 usb: dwc3: gadget: Fix dwc3_calc_trbs_left() We can't depend on the TRB's HWO bit to determine if the TRB ring is "full". A TRB is only available when the driver had processed it, not when the controller consumed and relinquished the TRB's ownership to the driver. Otherwise, the driver may overwrite unprocessed TRBs. This can happen when many transfer events accumulate and the system is slow to process them and/or when there are too many small requests. If a request is in the started_list, that means there is one or more unprocessed TRBs remained. Check this instead of the TRB's HWO bit whether the TRB ring is full. Fixes: c4233573f6ee ("usb: dwc3: gadget: prepare TRBs on update transfers too") Cc: Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/e91e975affb0d0d02770686afc3a5b9eb84409f6.1629335416.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 71de496cc489b6bae2f51f89da7f28849bf2836e Author: Swati Sharma Date: Thu Aug 12 18:41:07 2021 +0530 drm/i915/dp: Drop redundant debug print drm_dp_dpcd_read/write already has debug error message. Drop redundant error messages which gives false status even if correct value is read in drm_dp_dpcd_read(). v2: -Added fixes tag (Ankit) v3: -Fixed build error (CI) Fixes: 9488a030ac91 ("drm/i915: Add support for enabling link status and recovery") Cc: Ankit Nautiyal Cc: Imre Deak Cc: Jani Nikula Cc: José Roberto de Souza Cc: Manasi Navare Cc: Sean Paul Cc: Uma Shankar Cc: Ville Syrjälä Cc: # v5.12+ Reviewed-by: Jani Nikula Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210812131107.5531-1-swati2.sharma@intel.com (cherry picked from commit b6dfa416172939edaa46a5a647457b94c6d94119) Signed-off-by: Rodrigo Vivi commit a63bcf08f0efb5348105bb8e0e1e8c6671077753 Author: Matthew Brost Date: Fri Jul 30 12:53:42 2021 -0700 drm/i915: Fix syncmap memory leak A small race exists between intel_gt_retire_requests_timeout and intel_timeline_exit which could result in the syncmap not getting free'd. Rather than work to hard to seal this race, simply cleanup the syncmap on fini. unreferenced object 0xffff88813bc53b18 (size 96): comm "gem_close_race", pid 5410, jiffies 4294917818 (age 1105.600s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 00 ................ 00 00 00 00 00 00 00 00 6b 6b 6b 6b 06 00 00 00 ........kkkk.... backtrace: [<00000000120b863a>] __sync_alloc_leaf+0x1e/0x40 [i915] [<00000000042f6959>] __sync_set+0x1bb/0x240 [i915] [<0000000090f0e90f>] i915_request_await_dma_fence+0x1c7/0x400 [i915] [<0000000056a48219>] i915_request_await_object+0x222/0x360 [i915] [<00000000aaac4ee3>] i915_gem_do_execbuffer+0x1bd0/0x2250 [i915] [<000000003c9d830f>] i915_gem_execbuffer2_ioctl+0x405/0xce0 [i915] [<00000000fd7a8e68>] drm_ioctl_kernel+0xb0/0xf0 [drm] [<00000000e721ee87>] drm_ioctl+0x305/0x3c0 [drm] [<000000008b0d8986>] __x64_sys_ioctl+0x71/0xb0 [<0000000076c362a4>] do_syscall_64+0x33/0x80 [<00000000eb7a4831>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Matthew Brost Fixes: 531958f6f357 ("drm/i915/gt: Track timeline activeness in enter/exit") Cc: Reviewed-by: John Harrison Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20210730195342.110234-1-matthew.brost@intel.com (cherry picked from commit faf890985e30d5e88cc3a7c50c1bcad32f89ab7c) Signed-off-by: Rodrigo Vivi commit 733c99ee8be9a1410287cdbb943887365e83b2d6 Author: 王贇 Date: Thu Aug 26 11:42:42 2021 +0800 net: fix NULL pointer reference in cipso_v4_doi_free In netlbl_cipsov4_add_std() when 'doi_def->map.std' alloc failed, we sometime observe panic: BUG: kernel NULL pointer dereference, address: ... RIP: 0010:cipso_v4_doi_free+0x3a/0x80 ... Call Trace: netlbl_cipsov4_add_std+0xf4/0x8c0 netlbl_cipsov4_add+0x13f/0x1b0 genl_family_rcv_msg_doit.isra.15+0x132/0x170 genl_rcv_msg+0x125/0x240 This is because in cipso_v4_doi_free() there is no check on 'doi_def->map.std' when 'doi_def->type' equal 1, which is possibe, since netlbl_cipsov4_add_std() haven't initialize it before alloc 'doi_def->map.std'. This patch just add the check to prevent panic happen for similar cases. Reported-by: Abaci Signed-off-by: Michael Wang Signed-off-by: David S. Miller commit 96a6b93b69880b2c978e1b2be9cae6970b605008 Author: Andrey Ignatov Date: Wed Aug 25 17:25:40 2021 -0700 rtnetlink: Return correct error on changing device netns Currently when device is moved between network namespaces using RTM_NEWLINK message type and one of netns attributes (FLA_NET_NS_PID, IFLA_NET_NS_FD, IFLA_TARGET_NETNSID) but w/o specifying IFLA_IFNAME, and target namespace already has device with same name, userspace will get EINVAL what is confusing and makes debugging harder. Fix it so that userspace gets more appropriate EEXIST instead what makes debugging much easier. Before: # ./ifname.sh + ip netns add ns0 + ip netns exec ns0 ip link add l0 type dummy + ip netns exec ns0 ip link show l0 8: l0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 66:90:b5:d5:78:69 brd ff:ff:ff:ff:ff:ff + ip link add l0 type dummy + ip link show l0 10: l0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 6e:c6:1f:15:20:8d brd ff:ff:ff:ff:ff:ff + ip link set l0 netns ns0 RTNETLINK answers: Invalid argument After: # ./ifname.sh + ip netns add ns0 + ip netns exec ns0 ip link add l0 type dummy + ip netns exec ns0 ip link show l0 8: l0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 1e:4a:72:e3:e3:8f brd ff:ff:ff:ff:ff:ff + ip link add l0 type dummy + ip link show l0 10: l0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether f2:fc:fe:2b:7d:a6 brd ff:ff:ff:ff:ff:ff + ip link set l0 netns ns0 RTNETLINK answers: File exists The problem is that do_setlink() passes its `char *ifname` argument, that it gets from a caller, to __dev_change_net_namespace() as is (as `const char *pat`), but semantics of ifname and pat can be different. For example, __rtnl_newlink() does this: net/core/rtnetlink.c 3270 char ifname[IFNAMSIZ]; ... 3286 if (tb[IFLA_IFNAME]) 3287 nla_strscpy(ifname, tb[IFLA_IFNAME], IFNAMSIZ); 3288 else 3289 ifname[0] = '\0'; ... 3364 if (dev) { ... 3394 return do_setlink(skb, dev, ifm, extack, tb, ifname, status); 3395 } , i.e. do_setlink() gets ifname pointer that is always valid no matter if user specified IFLA_IFNAME or not and then do_setlink() passes this ifname pointer as is to __dev_change_net_namespace() as pat argument. But the pat (pattern) in __dev_change_net_namespace() is used as: net/core/dev.c 11198 err = -EEXIST; 11199 if (__dev_get_by_name(net, dev->name)) { 11200 /* We get here if we can't use the current device name */ 11201 if (!pat) 11202 goto out; 11203 err = dev_get_valid_name(net, dev, pat); 11204 if (err < 0) 11205 goto out; 11206 } As the result the `goto out` path on line 11202 is neven taken and instead of returning EEXIST defined on line 11198, __dev_change_net_namespace() returns an error from dev_get_valid_name() and this, in turn, will be EINVAL for ifname[0] = '\0' set earlier. Fixes: d8a5ec672768 ("[NET]: netlink support for moving devices between network namespaces.") Signed-off-by: Andrey Ignatov Signed-off-by: David S. Miller commit a423cbe0f21353ac1e63aad037fd5ccf446440bc Merge: 43fed4d48d325 b7658ed35a5f5 Author: David S. Miller Date: Thu Aug 26 10:26:06 2021 +0100 Merge branch 'dsa-hellcreek-fixes' Kurt Kanzenbach says: ==================== net: dsa: hellcreek: 802.1Qbv Fixes while using TAPRIO offloading on the Hirschmann hellcreek switch, I've noticed two issues in the current implementation: 1. The gate control list is incorrectly programmed 2. The admin base time is not set properly Fix it. ==================== Signed-off-by: David S. Miller commit b7658ed35a5f5900f0f658e375f366513f3eb781 Author: Kurt Kanzenbach Date: Wed Aug 25 15:58:13 2021 +0200 net: dsa: hellcreek: Adjust schedule look ahead window Traffic schedules can only be started up to eight seconds within the future. Therefore, the driver periodically checks every two seconds whether the admin base time provided by the user is inside that window. If so the schedule is started. Otherwise the check is deferred. However, according to the programming manual the look ahead window size should be four - not eight - seconds. By using the proposed value of four seconds starting a schedule at a specified admin base time actually works as expected. Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support") Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a7db5ed8632c88c029254d5d74765d52614af3fd Author: Kurt Kanzenbach Date: Wed Aug 25 15:58:12 2021 +0200 net: dsa: hellcreek: Fix incorrect setting of GCL Currently the gate control list which is programmed into the hardware is incorrect resulting in wrong traffic schedules. The problem is the loop variables are incremented before they are referenced. Therefore, move the increment to the end of the loop. Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support") Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 43fed4d48d325e0a61dc2638a84da972fbb1087b Author: Rahul Lakkireddy Date: Thu Aug 26 02:59:42 2021 +0530 cxgb4: dont touch blocked freelist bitmap after free When adapter init fails, the blocked freelist bitmap is already freed up and should not be touched. So, move the bitmap zeroing closer to where it was successfully allocated. Also handle adapter init failure unwind path immediately and avoid setting up RDMA memory windows. Fixes: 5b377d114f2b ("cxgb4: Add debugfs facility to inject FL starvation") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 38d57551ddabec878add10ff8eb18f4b63fff2da Merge: 92ea47fe09b53 6457378fe7968 Author: David S. Miller Date: Thu Aug 26 10:20:34 2021 +0100 Merge branch 'inet-siphash' Eric Dumazet says: ==================== inet: use siphash in exception handling A group of security researchers brought to our attention the weakness of hash functions used in rt6_exception_hash() and fnhe_hashfun() I made two distinct patches to help backports, since IPv6 part was added in 4.15 ==================== Signed-off-by: David S. Miller commit 6457378fe796815c973f631a1904e147d6ee33b1 Author: Eric Dumazet Date: Wed Aug 25 16:17:29 2021 -0700 ipv4: use siphash instead of Jenkins in fnhe_hashfun() A group of security researchers brought to our attention the weakness of hash function used in fnhe_hashfun(). Lets use siphash instead of Jenkins Hash, to considerably reduce security risks. Also remove the inline keyword, this really is distracting. Fixes: d546c621542d ("ipv4: harden fnhe_hashfun()") Signed-off-by: Eric Dumazet Reported-by: Keyu Man Cc: Willy Tarreau Signed-off-by: David S. Miller commit 4785305c05b25a242e5314cc821f54ade4c18810 Author: Eric Dumazet Date: Wed Aug 25 16:17:28 2021 -0700 ipv6: use siphash in rt6_exception_hash() A group of security researchers brought to our attention the weakness of hash function used in rt6_exception_hash() Lets use siphash instead of Jenkins Hash, to considerably reduce security risks. Following patch deals with IPv4. Fixes: 35732d01fe31 ("ipv6: introduce a hash table to store dst cache") Signed-off-by: Eric Dumazet Reported-by: Keyu Man Cc: Wei Wang Cc: Martin KaFai Lau Acked-by: Wei Wang Signed-off-by: David S. Miller commit 92ea47fe09b531642e5b791d74645a6f08b23725 Merge: ec92e524ee91c 044012b520292 Author: David S. Miller Date: Thu Aug 26 09:37:40 2021 +0100 Merge tag 'linux-can-fixes-for-5.14-20210826' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine says: ==================== pull-request: can 2021-08-26 this is a pull request of a single patch for net/master. Stefan Mätje's patch fixes the interchange of RX and TX error counters inthe esd_usb2 CAN driver. ==================== Signed-off-by: David S. Miller commit 662b932915f7f407784abec971a21273a82191b2 Merge: e22ce8eb631bd df7b16d1c00ec Author: Greg Kroah-Hartman Date: Thu Aug 26 10:27:18 2021 +0200 Merge tag 'usb-serial-5.14-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.14-rc8 Here's a fix for a regression in 5.14 (also backported to stable) which caused reads to stall for ch341 devices. Included is also a new modem device id. All but the revert have been in linux-next, and with no reported issues. * tag 'usb-serial-5.14-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: Revert "USB: serial: ch341: fix character loss at high transfer rates" USB: serial: option: add new VID/PID to support Fibocom FG150 commit ccf26483416a339c114409f6e7cd02abdeaf8052 Author: Kim Phillips Date: Tue Aug 17 17:10:43 2021 -0500 perf/x86/amd/power: Assign pmu.module Assign pmu.module so the driver can't be unloaded whilst in use. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210817221048.88063-4-kim.phillips@amd.com commit f11dd0d80555cdc8eaf5cfc9e19c9e198217f9f1 Author: Kim Phillips Date: Tue Aug 17 17:10:41 2021 -0500 perf/x86/amd/ibs: Extend PERF_PMU_CAP_NO_EXCLUDE to IBS Op Commit: 2ff40250691e ("perf/core, arch/x86: Use PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs") neglected to do so. Fixes: 2ff40250691e ("perf/core, arch/x86: Use PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs") Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210817221048.88063-2-kim.phillips@amd.com commit 26db2e0c51fe83e1dd852c1321407835b481806e Author: Kim Phillips Date: Tue Aug 17 17:10:42 2021 -0500 perf/x86/amd/ibs: Work around erratum #1197 Erratum #1197 "IBS (Instruction Based Sampling) Register State May be Incorrect After Restore From CC6" is published in a document: "Revision Guide for AMD Family 19h Models 00h-0Fh Processors" 56683 Rev. 1.04 July 2021 https://bugzilla.kernel.org/show_bug.cgi?id=206537 Implement the erratum's suggested workaround and ignore IBS samples if MSRC001_1031 == 0. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210817221048.88063-3-kim.phillips@amd.com commit 0b3a8738b76fe2087f7bc2bd59f4c78504c79180 Author: Colin Ian King Date: Tue Jul 6 12:45:53 2021 +0100 perf/x86/intel/uncore: Fix integer overflow on 23 bit left shift of a u32 The u32 variable pci_dword is being masked with 0x1fffffff and then left shifted 23 places. The shift is a u32 operation,so a value of 0x200 or more in pci_dword will overflow the u32 and only the bottow 32 bits are assigned to addr. I don't believe this was the original intent. Fix this by casting pci_dword to a resource_size_t to ensure no overflow occurs. Note that the mask and 12 bit left shift operation does not need this because the mask SNR_IMC_MMIO_MEM0_MASK and shift is always a 32 bit value. Fixes: ee49532b38dd ("perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge") Addresses-Coverity: ("Unintentional integer overflow") Signed-off-by: Colin Ian King Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20210706114553.28249-1-colin.king@canonical.com commit 044012b52029204900af9e4230263418427f4ba4 Author: Stefan Mätje Date: Wed Aug 25 23:52:27 2021 +0200 can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters This patch fixes the interchanged fetch of the CAN RX and TX error counters from the ESD_EV_CAN_ERROR_EXT message. The RX error counter is really in struct rx_msg::data[2] and the TX error counter is in struct rx_msg::data[3]. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Link: https://lore.kernel.org/r/20210825215227.4947-2-stefan.maetje@esd.eu Cc: stable@vger.kernel.org Signed-off-by: Stefan Mätje Signed-off-by: Marc Kleine-Budde commit ec92e524ee91c98e6ee06807c7d69d9e2fd141bc Author: kernel test robot Date: Wed Aug 25 20:35:38 2021 +0200 net: usb: asix: ax88772: fix boolconv.cocci warnings drivers/net/usb/asix_devices.c:757:60-65: WARNING: conversion to bool not needed here Remove unneeded conversion to bool Semantic patch information: Relational and logical operators evaluate to bool, explicit conversion is overly verbose and unneeded. Generated by: scripts/coccinelle/misc/boolconv.cocci Fixes: 7a141e64cf14 ("net: usb: asix: ax88772: move embedded PHY detection as early as possible") Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: Oleksij Rempel Link: https://lore.kernel.org/r/20210825183538.13070-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 062b829c52ef4ed5df14f4850fc07651bb7c3b33 Author: Trond Myklebust Date: Wed Aug 25 15:33:14 2021 -0400 SUNRPC: Fix XPT_BUSY flag leakage in svc_handle_xprt()... If the attempt to reserve a slot fails, we currently leak the XPT_BUSY flag on the socket. Among other things, this make it impossible to close the socket. Fixes: 82011c80b3ec ("SUNRPC: Move svc_xprt_received() call sites") Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 73f3af7b4611d77bdaea303fb639333eb28e37d7 Merge: fe67f4dd8daa2 a34cc13add2c9 Author: Linus Torvalds Date: Wed Aug 25 12:45:31 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "2 patches. Subsystems affected by this patch series: mm/memory-hotplug and MAINTAINERS" * emailed patches from Andrew Morton : MAINTAINERS: exfat: update my email address mm/memory_hotplug: fix potential permanent lru cache disable commit a34cc13add2c92573db79192967f6a512868ec56 Author: Namjae Jeon Date: Wed Aug 25 12:17:58 2021 -0700 MAINTAINERS: exfat: update my email address My email address in exfat entry will be not available in a few days. Update it to my own kernel.org address. Link: https://lkml.kernel.org/r/20210825044833.16806-1-namjae.jeon@samsung.com Signed-off-by: Namjae Jeon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 946746d1ad921e5f493b536533dda02ea22ca609 Author: Miaohe Lin Date: Wed Aug 25 12:17:55 2021 -0700 mm/memory_hotplug: fix potential permanent lru cache disable If offline_pages failed after lru_cache_disable(), it forgot to do lru_cache_enable() in error path. So we would have lru cache disabled permanently in this case. Link: https://lkml.kernel.org/r/20210821094246.10149-3-linmiaohe@huawei.com Fixes: d479960e44f2 ("mm: disable LRU pagevec during the migration temporarily") Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Reviewed-by: Naoya Horiguchi Cc: Chris Goldsworthy Cc: Michal Hocko Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c5a272202c28c1f9309566f206ba40787246149 Author: Dmitry Osipenko Date: Mon Aug 23 23:24:12 2021 +0300 PM: domains: Improve runtime PM performance state handling GENPD core doesn't support handling performance state changes while consumer device is runtime-suspended or when runtime PM is disabled. GENPD core may override performance state that was configured by device driver while RPM of the device was disabled or device was RPM-suspended. Let's close that gap by allowing drivers to control performance state while RPM of a consumer device is disabled and to set up performance state of RPM-suspended device that will be applied by GENPD core on RPM-resume of the device. Fixes: 5937c3ce2122 ("PM: domains: Drop/restore performance state votes for devices at runtime PM") Signed-off-by: Dmitry Osipenko Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit fe67f4dd8daa252eb9aa7acb61555f3cc3c1ce4c Author: Linus Torvalds Date: Tue Aug 24 10:39:25 2021 -0700 pipe: do FASYNC notifications for every pipe IO, not just state changes It turns out that the SIGIO/FASYNC situation is almost exactly the same as the EPOLLET case was: user space really wants to be notified after every operation. Now, in a perfect world it should be sufficient to only notify user space on "state transitions" when the IO state changes (ie when a pipe goes from unreadable to readable, or from unwritable to writable). User space should then do as much as possible - fully emptying the buffer or what not - and we'll notify it again the next time the state changes. But as with EPOLLET, we have at least one case (stress-ng) where the kernel sent SIGIO due to the pipe being marked for asynchronous notification, but the user space signal handler then didn't actually necessarily read it all before returning (it read more than what was written, but since there could be multiple writes, it could leave data pending). The user space code then expected to get another SIGIO for subsequent writes - even though the pipe had been readable the whole time - and would only then read more. This is arguably a user space bug - and Colin King already fixed the stress-ng code in question - but the kernel regression rules are clear: it doesn't matter if kernel people think that user space did something silly and wrong. What matters is that it used to work. So if user space depends on specific historical kernel behavior, it's a regression when that behavior changes. It's on us: we were silly to have that non-optimal historical behavior, and our old kernel behavior was what user space was tested against. Because of how the FASYNC notification was tied to wakeup behavior, this was first broken by commits f467a6a66419 and 1b6b26ae7053 ("pipe: fix and clarify pipe read/write wakeup logic"), but at the time it seems nobody noticed. Probably because the stress-ng problem case ends up being timing-dependent too. It was then unwittingly fixed by commit 3a34b13a88ca ("pipe: make pipe writes always wake up readers") only to be broken again when by commit 3b844826b6c6 ("pipe: avoid unnecessary EPOLLET wakeups under normal loads"). And at that point the kernel test robot noticed the performance refression in the stress-ng.sigio.ops_per_sec case. So the "Fixes" tag below is somewhat ad hoc, but it matches when the issue was noticed. Fix it for good (knock wood) by simply making the kill_fasync() case separate from the wakeup case. FASYNC is quite rare, and we clearly shouldn't even try to use the "avoid unnecessary wakeups" logic for it. Link: https://lore.kernel.org/lkml/20210824151337.GC27667@xsang-OptiPlex-9020/ Fixes: 3b844826b6c6 ("pipe: avoid unnecessary EPOLLET wakeups under normal loads") Reported-by: kernel test robot Tested-by: Oliver Sang Cc: Eric Biederman Cc: Colin Ian King Signed-off-by: Linus Torvalds commit 62add98208f37ce02c0425f3858757472e3fcc2e Merge: 6e764bcd1cf72 bbb6d0f3e1feb Author: Linus Torvalds Date: Wed Aug 25 09:56:10 2021 -0700 Merge branch 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull ucount fixes from Eric Biederman: "This branch fixes a regression that made it impossible to increase rlimits that had been converted to the ucount infrastructure, and also fixes a reference counting bug where the reference was not incremented soon enough. The fixes are trivial and the bugs have been encountered in the wild, and the fixes have been tested" * 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ucounts: Increase ucounts reference counter before the security hook ucounts: Fix regression preventing increasing of rlimits in init_user_ns commit a9e6ffbc5b7324b6639ee89028908b1e91ceed51 Author: Tuo Li Date: Thu Aug 5 08:14:34 2021 -0700 ceph: fix possible null-pointer dereference in ceph_mdsmap_decode() kcalloc() is called to allocate memory for m->m_info, and if it fails, ceph_mdsmap_destroy() behind the label out_err will be called: ceph_mdsmap_destroy(m); In ceph_mdsmap_destroy(), m->m_info is dereferenced through: kfree(m->m_info[i].export_targets); To fix this possible null-pointer dereference, check m->m_info before the for loop to free m->m_info[i].export_targets. [ jlayton: fix up whitespace damage only kfree(m->m_info) if it's non-NULL ] Reported-by: TOTE Robot Signed-off-by: Tuo Li Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit b2f9fa1f3bd8846f50b355fc2168236975c4d264 Author: Xiubo Li Date: Wed Aug 18 21:38:42 2021 +0800 ceph: correctly handle releasing an embedded cap flush The ceph_cap_flush structures are usually dynamically allocated, but the ceph_cap_snap has an embedded one. When force umounting, the client will try to remove all the session caps. During this, it will free them, but that should not be done with the ones embedded in a capsnap. Fix this by adding a new boolean that indicates that the cap flush is embedded in a capsnap, and skip freeing it if that's set. At the same time, switch to using list_del_init() when detaching the i_list and g_list heads. It's possible for a forced umount to remove these objects but then handle_cap_flushsnap_ack() races in and does the list_del_init() again, corrupting memory. Cc: stable@vger.kernel.org URL: https://tracker.ceph.com/issues/52283 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit c53c6b7409f4cd9e542991b53d597fbe2751d7db Author: Xiaoyao Li Date: Tue Aug 24 12:06:22 2021 +0800 perf/x86/intel/pt: Fix mask of num_address_ranges Per SDM, bit 2:0 of CPUID(0x14,1).EAX[2:0] reports the number of configurable address ranges for filtering, not bit 1:0. Signed-off-by: Xiaoyao Li Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexander Shishkin Link: https://lkml.kernel.org/r/20210824040622.4081502-1-xiaoyao.li@intel.com commit 4e9655763b82a91e4c341835bb504a2b1590f984 Author: Qu Wenruo Date: Wed Aug 25 13:41:42 2021 +0800 Revert "btrfs: compression: don't try to compress if we don't have enough pages" This reverts commit f2165627319ffd33a6217275e5690b1ab5c45763. [BUG] It's no longer possible to create compressed inline extent after commit f2165627319f ("btrfs: compression: don't try to compress if we don't have enough pages"). [CAUSE] For compression code, there are several possible reasons we have a range that needs to be compressed while it's no more than one page. - Compressed inline write The data is always smaller than one sector and the test lacks the condition to properly recognize a non-inline extent. - Compressed subpage write For the incoming subpage compressed write support, we require page alignment of the delalloc range. And for 64K page size, we can compress just one page into smaller sectors. For those reasons, the requirement for the data to be more than one page is not correct, and is already causing regression for compressed inline data writeback. The idea of skipping one page to avoid wasting CPU time could be revisited in the future. [FIX] Fix it by reverting the offending commit. Reported-by: Zygo Blaxell Link: https://lore.kernel.org/linux-btrfs/afa2742.c084f5d6.17b6b08dffc@tnonline.net Fixes: f2165627319f ("btrfs: compression: don't try to compress if we don't have enough pages") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3eb9cdffb39701743973382860f214026f4d7825 Author: Will Deacon Date: Wed Aug 25 11:10:07 2021 +0100 Partially revert "arm64/mm: drop HAVE_ARCH_PFN_VALID" This partially reverts commit 16c9afc776608324ca71c0bc354987bab532f51d. Alex Bee reports a regression in 5.14 on their RK3328 SoC when configuring the PL330 DMA controller: | ------------[ cut here ]------------ | WARNING: CPU: 2 PID: 373 at kernel/dma/mapping.c:235 dma_map_resource+0x68/0xc0 | Modules linked in: spi_rockchip(+) fuse | CPU: 2 PID: 373 Comm: systemd-udevd Not tainted 5.14.0-rc7 #1 | Hardware name: Pine64 Rock64 (DT) | pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--) | pc : dma_map_resource+0x68/0xc0 | lr : pl330_prep_slave_fifo+0x78/0xd0 This appears to be because dma_map_resource() is being called for a physical address which does not correspond to a memory address yet does have a valid 'struct page' due to the way in which the vmemmap is constructed. Prior to 16c9afc77660 ("arm64/mm: drop HAVE_ARCH_PFN_VALID"), the arm64 implementation of pfn_valid() called memblock_is_memory() to return 'false' for such regions and the DMA mapping request would proceed. However, now that we are using the generic implementation where only the presence of the memory map entry is considered, we return 'true' and erroneously fail with DMA_MAPPING_ERROR because we identify the region as DRAM. Although fixing this in the DMA mapping code is arguably the right fix, it is a risky, cross-architecture change at this stage in the cycle. So just revert arm64 back to its old pfn_valid() implementation for v5.14. The change to the generic pfn_valid() code is preserved from the original patch, so as to avoid impacting other architectures. Cc: Catalin Marinas Cc: Robin Murphy Cc: Mike Rapoport Cc: Anshuman Khandual Cc: Christoph Hellwig Reported-by: Alex Bee Link: https://lore.kernel.org/r/d3a3c828-b777-faf8-e901-904995688437@gmail.com Signed-off-by: Will Deacon commit cd9b50adc6bb9ad3f7d244590a389522215865c4 Author: Davide Caratti Date: Wed Aug 25 00:33:48 2021 +0200 net/sched: ets: fix crash when flipping from 'strict' to 'quantum' While running kselftests, Hangbin observed that sch_ets.sh often crashes, and splats like the following one are seen in the output of 'dmesg': BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 159f12067 P4D 159f12067 PUD 159f13067 PMD 0 Oops: 0000 [#1] SMP NOPTI CPU: 2 PID: 921 Comm: tc Not tainted 5.14.0-rc6+ #458 Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 RIP: 0010:__list_del_entry_valid+0x2d/0x50 Code: 48 8b 57 08 48 b9 00 01 00 00 00 00 ad de 48 39 c8 0f 84 ac 6e 5b 00 48 b9 22 01 00 00 00 00 ad de 48 39 ca 0f 84 cf 6e 5b 00 <48> 8b 32 48 39 fe 0f 85 af 6e 5b 00 48 8b 50 08 48 39 f2 0f 85 94 RSP: 0018:ffffb2da005c3890 EFLAGS: 00010217 RAX: 0000000000000000 RBX: ffff9073ba23f800 RCX: dead000000000122 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff9073ba23fbc8 RBP: ffff9073ba23f890 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000001 R12: dead000000000100 R13: ffff9073ba23fb00 R14: 0000000000000002 R15: 0000000000000002 FS: 00007f93e5564e40(0000) GS:ffff9073bba00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000014ad34000 CR4: 0000000000350ee0 Call Trace: ets_qdisc_reset+0x6e/0x100 [sch_ets] qdisc_reset+0x49/0x1d0 tbf_reset+0x15/0x60 [sch_tbf] qdisc_reset+0x49/0x1d0 dev_reset_queue.constprop.42+0x2f/0x90 dev_deactivate_many+0x1d3/0x3d0 dev_deactivate+0x56/0x90 qdisc_graft+0x47e/0x5a0 tc_get_qdisc+0x1db/0x3e0 rtnetlink_rcv_msg+0x164/0x4c0 netlink_rcv_skb+0x50/0x100 netlink_unicast+0x1a5/0x280 netlink_sendmsg+0x242/0x480 sock_sendmsg+0x5b/0x60 ____sys_sendmsg+0x1f2/0x260 ___sys_sendmsg+0x7c/0xc0 __sys_sendmsg+0x57/0xa0 do_syscall_64+0x3a/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f93e44b8338 Code: 89 02 48 c7 c0 ff ff ff ff eb b5 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 25 43 2c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 41 54 41 89 d4 55 RSP: 002b:00007ffc0db737a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000061255c06 RCX: 00007f93e44b8338 RDX: 0000000000000000 RSI: 00007ffc0db73810 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 000000000000000b R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000687880 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: sch_ets sch_tbf dummy rfkill iTCO_wdt iTCO_vendor_support intel_rapl_msr intel_rapl_common joydev i2c_i801 pcspkr i2c_smbus lpc_ich virtio_balloon ip_tables xfs libcrc32c crct10dif_pclmul crc32_pclmul crc32c_intel ahci libahci ghash_clmulni_intel libata serio_raw virtio_blk virtio_console virtio_net net_failover failover sunrpc dm_mirror dm_region_hash dm_log dm_mod CR2: 0000000000000000 When the change() function decreases the value of 'nstrict', we must take into account that packets might be already enqueued on a class that flips from 'strict' to 'quantum': otherwise that class will not be added to the bandwidth-sharing list. Then, a call to ets_qdisc_reset() will attempt to do list_del(&alist) with 'alist' filled with zero, hence the NULL pointer dereference. For classes flipping from 'strict' to 'quantum', initialize an empty list and eventually add it to the bandwidth-sharing list, if there are packets already enqueued. In this way, the kernel will: a) prevent crashing as described above. b) avoid retaining the backlog packets (for an arbitrarily long time) in case no packet is enqueued after a change from 'strict' to 'quantum'. Reported-by: Hangbin Liu Fixes: dcc68b4d8084 ("net: sch_ets: Add a new Qdisc") Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit e543468869e2532f5d7926e8f417782b48eca3dc Author: Shai Malin Date: Tue Aug 24 19:52:49 2021 +0300 qede: Fix memset corruption Thanks to Kees Cook who detected the problem of memset that starting from not the first member, but sized for the whole struct. The better change will be to remove the redundant memset and to clear only the msix_cnt member. Signed-off-by: Prabhakar Kushwaha Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reported-by: Kees Cook Reviewed-by: Kees Cook Signed-off-by: David S. Miller commit 2b9fff64f03219d78044d1ab40dde8e3d42e968a Author: Song Yoong Siang Date: Wed Aug 25 08:57:42 2021 +0800 net: stmmac: fix kernel panic due to NULL pointer dereference of buf->xdp Ensure a valid XSK buffer before proceed to free the xdp buffer. The following kernel panic is observed without this patch: RIP: 0010:xp_free+0x5/0x40 Call Trace: stmmac_napi_poll_rxtx+0x332/0xb30 [stmmac] ? stmmac_tx_timer+0x3c/0xb0 [stmmac] net_rx_action+0x13d/0x3d0 __do_softirq+0xfc/0x2fb ? smpboot_register_percpu_thread+0xe0/0xe0 run_ksoftirqd+0x32/0x70 smpboot_thread_fn+0x1d8/0x2c0 kthread+0x169/0x1a0 ? kthread_park+0x90/0x90 ret_from_fork+0x1f/0x30 ---[ end trace 0000000000000002 ]--- Fixes: bba2556efad6 ("net: stmmac: Enable RX via AF_XDP zero-copy") Cc: # 5.13.x Suggested-by: Ong Boon Leong Signed-off-by: Song Yoong Siang Signed-off-by: David S. Miller commit a6451192da2691dcf39507bd758dde35d4606ee1 Author: Song Yoong Siang Date: Wed Aug 25 08:55:29 2021 +0800 net: stmmac: fix kernel panic due to NULL pointer dereference of xsk_pool After free xsk_pool, there is possibility that napi polling is still running in the middle, thus causes a kernel crash due to kernel NULL pointer dereference of rx_q->xsk_pool and tx_q->xsk_pool. Fix this by changing the XDP pool setup sequence to: 1. disable napi before free xsk_pool 2. enable napi after init xsk_pool The following kernel panic is observed without this patch: RIP: 0010:xsk_uses_need_wakeup+0x5/0x10 Call Trace: stmmac_napi_poll_rxtx+0x3a9/0xae0 [stmmac] __napi_poll+0x27/0x130 net_rx_action+0x233/0x280 __do_softirq+0xe2/0x2b6 run_ksoftirqd+0x1a/0x20 smpboot_thread_fn+0xac/0x140 ? sort_range+0x20/0x20 kthread+0x124/0x150 ? set_kthread_struct+0x40/0x40 ret_from_fork+0x1f/0x30 ---[ end trace a77c8956b79ac107 ]--- Fixes: bba2556efad6 ("net: stmmac: Enable RX via AF_XDP zero-copy") Cc: # 5.13.x Signed-off-by: Song Yoong Siang Signed-off-by: David S. Miller commit 85520079afce885b80647fbd0d13d8f03d057167 Author: Harini Katakam Date: Tue Aug 24 15:32:09 2021 +0530 net: macb: Add a NULL check on desc_ptp macb_ptp_desc will not return NULL under most circumstances with correct Kconfig and IP design config register. But for the sake of the extreme corner case, check for NULL when using the helper. In case of rx_tstamp, no action is necessary except to return (similar to timestamp disabled) and warn. In case of TX, return -EINVAL to let the skb be free. Perform this check before marking skb in progress. Fixes coverity warning: (4) Event dereference: Dereferencing a null pointer "desc_ptp" Signed-off-by: Harini Katakam Reviewed-by: Radhey Shyam Pandey Signed-off-by: Michal Simek Signed-off-by: David S. Miller commit 2d26f6e39afb88d32b8f39e76a51b542c3c51674 Author: Michael Riesch Date: Mon Aug 23 16:37:54 2021 +0200 net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings This reverts commit 2c896fb02e7f65299646f295a007bda043e0f382 "net: stmmac: dwmac-rk: add pd_gmac support for rk3399" and fixes unbalanced pm_runtime_enable warnings. In the commit to be reverted, support for power management was introduced to the Rockchip glue code. Later, power management support was introduced to the stmmac core code, resulting in multiple invocations of pm_runtime_{enable,disable,get_sync,put_sync}. The multiple invocations happen in rk_gmac_powerup and stmmac_{dvr_probe, resume} as well as in rk_gmac_powerdown and stmmac_{dvr_remove, suspend}, respectively, which are always called in conjunction. Fixes: 5ec55823438e850c91c6b92aec93fb04ebde29e2 ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Michael Riesch Signed-off-by: David S. Miller commit df7b16d1c00ecb3da3a30c999cdb39f273c99a2f Author: Johan Hovold Date: Tue Aug 24 14:19:26 2021 +0200 Revert "USB: serial: ch341: fix character loss at high transfer rates" This reverts commit 3c18e9baee0ef97510dcda78c82285f52626764b. These devices do not appear to send a zero-length packet when the transfer size is a multiple of the bulk-endpoint max-packet size. This means that incoming data may not be processed by the driver until a short packet is received or the receive buffer is full. Revert back to using endpoint-sized receive buffers to avoid stalled reads. Reported-by: Paul Größel Link: https://bugzilla.kernel.org/show_bug.cgi?id=214131 Fixes: 3c18e9baee0e ("USB: serial: ch341: fix character loss at high transfer rates") Cc: stable@vger.kernel.org Cc: Willy Tarreau Link: https://lore.kernel.org/r/20210824121926.19311-1-johan@kernel.org Signed-off-by: Johan Hovold commit 417166ddec020c4e969aea064e23822591ad54df Author: Bin Meng Date: Wed Aug 4 20:30:15 2021 +0800 riscv: dts: microchip: Add ethernet0 to the aliases node U-Boot expects this alias to be in place in order to fix up the mac address of the ethernet node. Note on the Icicle Kit board, currently only emac1 is enabled so it becomes the 'ethernet0'. Signed-off-by: Bin Meng Reviewed-by: Geert Uytterhoeven Signed-off-by: Palmer Dabbelt commit 719588dee26bac0d5979c122bc530c43dc5d07c7 Author: Bin Meng Date: Wed Aug 4 20:30:14 2021 +0800 riscv: dts: microchip: Use 'local-mac-address' for emac1 Per the DT spec, 'local-mac-address' is used to specify MAC address that was assigned to the network device, while 'mac-address' is used to specify the MAC address that was last used by the boot program, and shall be used only if the value differs from 'local-mac-address' property value. Signed-off-by: Bin Meng Reviewed-by: conor dooley Reviewed-by: Geert Uytterhoeven Signed-off-by: Palmer Dabbelt commit 379eb01c21795edb4ca8d342503bd2183a19ec3a Author: Vincent Chen Date: Tue Aug 3 17:27:51 2021 +0800 riscv: Ensure the value of FP registers in the core dump file is up to date The value of FP registers in the core dump file comes from the thread.fstate. However, kernel saves the FP registers to the thread.fstate only before scheduling out the process. If no process switch happens during the exception handling process, kernel will not have a chance to save the latest value of FP registers to thread.fstate. It will cause the value of FP registers in the core dump file may be incorrect. To solve this problem, this patch force lets kernel save the FP register into the thread.fstate if the target task_struct equals the current. Signed-off-by: Vincent Chen Reviewed-by: Jisheng Zhang Fixes: b8c8a9590e4f ("RISC-V: Add FP register ptrace support for gdb.") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 02c6dcd543f8f051973ee18bfbc4dc3bd595c558 Author: Li Jinlin Date: Tue Aug 24 10:59:21 2021 +0800 scsi: core: Fix hang of freezing queue between blocking and running device We found a hang, the steps to reproduce are as follows: 1. blocking device via scsi_device_set_state() 2. dd if=/dev/sda of=/mnt/t.log bs=1M count=10 3. echo none > /sys/block/sda/queue/scheduler 4. echo "running" >/sys/block/sda/device/state Step 3 and 4 should complete after step 4, but they hang. CPU#0 CPU#1 CPU#2 --------------- ---------------- ---------------- Step 1: blocking device Step 2: dd xxxx ^^^^^^ get request q_usage_counter++ Step 3: switching scheculer elv_iosched_store elevator_switch blk_mq_freeze_queue blk_freeze_queue > blk_freeze_queue_start ^^^^^^ mq_freeze_depth++ > blk_mq_run_hw_queues ^^^^^^ can't run queue when dev blocked > blk_mq_freeze_queue_wait ^^^^^^ Hang here!!! wait q_usage_counter==0 Step 4: running device store_state_field scsi_rescan_device scsi_attach_vpd scsi_vpd_inquiry __scsi_execute blk_get_request blk_mq_alloc_request blk_queue_enter ^^^^^^ Hang here!!! wait mq_freeze_depth==0 blk_mq_run_hw_queues ^^^^^^ dispatch IO, q_usage_counter will reduce to zero blk_mq_unfreeze_queue ^^^^^ mq_freeze_depth-- To fix this, we need to run queue before rescanning device when the device state changes to SDEV_RUNNING. Link: https://lore.kernel.org/r/20210824025921.3277629-1-lijinlin3@huawei.com Fixes: f0f82e2476f6 ("scsi: core: Fix capacity set to zero after offlinining device") Reviewed-by: Bart Van Assche Signed-off-by: Li Jinlin Signed-off-by: Qiu Laibin Signed-off-by: Martin K. Petersen commit 93100d6817b05a60f3e1d354932a4fe792f14d08 Author: DENG Qingfang Date: Mon Aug 23 12:44:21 2021 +0800 net: phy: mediatek: add the missing suspend/resume callbacks Without suspend/resume callbacks, the PHY cannot be powered down/up administratively. Fixes: e40d2cca0189 ("net: phy: add MediaTek Gigabit Ethernet PHY driver") Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210823044422.164184-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski commit b6d2b054e8baaee53fd2d4854c63cbf0f2c6262a Author: Bart Van Assche Date: Tue Aug 24 10:05:20 2021 -0700 mq-deadline: Fix request accounting The block layer may call the I/O scheduler .finish_request() callback without having called the .insert_requests() callback. Make sure that the mq-deadline I/O statistics are correct if the block layer inserts an I/O request that bypasses the I/O scheduler. This patch prevents that lower priority I/O is delayed longer than necessary for mixed I/O priority workloads. Cc: Niklas Cassel Cc: Damien Le Moal Cc: Hannes Reinecke Reported-by: Niklas Cassel Fixes: 08a9ad8bf607 ("block/mq-deadline: Add cgroup support") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210824170520.1659173-1-bvanassche@acm.org Reviewed-by: Niklas Cassel Tested-by: Niklas Cassel Signed-off-by: Jens Axboe commit 6e764bcd1cf72a2846c0e53d3975a09b242c04c9 Merge: d5ae8d7f85b7f cc4f596cf85e9 Author: Linus Torvalds Date: Tue Aug 24 09:55:50 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Several small fixes, the first three are significant: - mlx5 crash unloading drivers with a rare HW config - missing userspace reporting for the new dmabuf objects - random rxe failure due to missing memory zeroing - static checker/etc reports: missing spin lock init, null pointer deref on error, extra unlock on error path, memory allocation under spinlock, missing IRQ vector cleanup - kconfig typo in the new irdma driver" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/rxe: Zero out index member of struct rxe_queue RDMA/efa: Free IRQ vectors on error flow RDMA/rxe: Fix memory allocation while in a spin lock RDMA/bnxt_re: Remove unpaired rtnl unlock in bnxt_re_dev_init() IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs() RDMA/irdma: Use correct kconfig symbol for AUXILIARY_BUS RDMA/bnxt_re: Add missing spin lock initialization RDMA/uverbs: Track dmabuf memory regions RDMA/mlx5: Fix crash when unbind multiport slave commit c41a4e877a185241d8e83501453326fb98f67354 Author: Borislav Petkov Date: Tue Aug 24 11:42:47 2021 +0200 drm/amdgpu: Fix build with missing pm_suspend_target_state module export Building a randconfig here triggered: ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! because the module export of that symbol happens in kernel/power/suspend.c which is enabled with CONFIG_SUSPEND. The ifdef guards in amdgpu_acpi_is_s0ix_supported(), however, test for CONFIG_PM_SLEEP which is defined like this: config PM_SLEEP def_bool y depends on SUSPEND || HIBERNATE_CALLBACKS and that randconfig has: # CONFIG_SUSPEND is not set CONFIG_HIBERNATE_CALLBACKS=y leading to the module export missing. Change the ifdeffery to depend directly on CONFIG_SUSPEND. Fixes: 5706cb3c910c ("drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled") Reviewed-by: Lijo Lazar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/YSP6Lv53QV0cOAsd@zn.tnic Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2829a4e3cf3a6ac2fa3cdb681b37574630fb9c1a Author: Zhengjun Zhang Date: Mon Aug 9 21:35:53 2021 +0800 USB: serial: option: add new VID/PID to support Fibocom FG150 Fibocom FG150 is a 5G module based on Qualcomm SDX55 platform, support Sub-6G band. Here are the outputs of lsusb -v and usb-devices: > T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 > D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 > P: Vendor=2cb7 ProdID=010b Rev=04.14 > S: Manufacturer=Fibocom > S: Product=Fibocom Modem_SN:XXXXXXXX > S: SerialNumber=XXXXXXXX > C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA > I: If#=0x0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host > I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host > I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) > I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none) > I: If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) > Bus 002 Device 002: ID 2cb7:010b Fibocom Fibocom Modem_SN:XXXXXXXX > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 3.20 > bDeviceClass 0 > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 9 > idVendor 0x2cb7 Fibocom > idProduct 0x010b > bcdDevice 4.14 > iManufacturer 1 Fibocom > iProduct 2 Fibocom Modem_SN:XXXXXXXX > iSerial 3 XXXXXXXX > bNumConfigurations 1 > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 0x00e6 > bNumInterfaces 5 > bConfigurationValue 1 > iConfiguration 4 RNDIS_DUN_DIAG_ADB > bmAttributes 0xa0 > (Bus Powered) > Remote Wakeup > MaxPower 896mA > Interface Association: > bLength 8 > bDescriptorType 11 > bFirstInterface 0 > bInterfaceCount 2 > bFunctionClass 239 Miscellaneous Device > bFunctionSubClass 4 > bFunctionProtocol 1 > iFunction 7 RNDIS > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 1 > bInterfaceClass 239 Miscellaneous Device > bInterfaceSubClass 4 > bInterfaceProtocol 1 > iInterface 0 > ** UNRECOGNIZED: 05 24 00 10 01 > ** UNRECOGNIZED: 05 24 01 00 01 > ** UNRECOGNIZED: 04 24 02 00 > ** UNRECOGNIZED: 05 24 06 00 01 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x0008 1x 8 bytes > bInterval 9 > bMaxBurst 0 > 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 0x8e EP 14 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 6 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x0f EP 15 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 6 > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 2 > bAlternateSetting 0 > bNumEndpoints 3 > bInterfaceClass 255 Vendor Specific Class > bInterfaceSubClass 0 > bInterfaceProtocol 0 > iInterface 0 > ** UNRECOGNIZED: 05 24 00 10 01 > ** UNRECOGNIZED: 05 24 01 00 00 > ** UNRECOGNIZED: 04 24 02 02 > ** UNRECOGNIZED: 05 24 06 00 00 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x83 EP 3 IN > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x000a 1x 10 bytes > bInterval 9 > bMaxBurst 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x82 EP 2 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x01 EP 1 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 0 > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 3 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 255 Vendor Specific Class > bInterfaceSubClass 255 Vendor Specific Subclass > bInterfaceProtocol 48 > iInterface 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x84 EP 4 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x02 EP 2 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 0 > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 4 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 255 Vendor Specific Class > bInterfaceSubClass 66 > bInterfaceProtocol 1 > iInterface 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x03 EP 3 OUT > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x85 EP 5 IN > bmAttributes 2 > Transfer Type Bulk > Synch Type None > Usage Type Data > wMaxPacketSize 0x0400 1x 1024 bytes > bInterval 0 > bMaxBurst 0 > Binary Object Store Descriptor: > bLength 5 > bDescriptorType 15 > wTotalLength 0x0016 > bNumDeviceCaps 2 > USB 2.0 Extension Device Capability: > bLength 7 > bDescriptorType 16 > bDevCapabilityType 2 > bmAttributes 0x00000006 > BESL Link Power Management (LPM) Supported > SuperSpeed USB Device Capability: > bLength 10 > bDescriptorType 16 > bDevCapabilityType 3 > bmAttributes 0x00 > wSpeedsSupported 0x000f > Device can operate at Low Speed (1Mbps) > Device can operate at Full Speed (12Mbps) > Device can operate at High Speed (480Mbps) > Device can operate at SuperSpeed (5Gbps) > bFunctionalitySupport 1 > Lowest fully-functional device speed is Full Speed (12Mbps) > bU1DevExitLat 1 micro seconds > bU2DevExitLat 500 micro seconds > Device Status: 0x0000 > (Bus Powered) Signed-off-by: Zhengjun Zhang Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 3b0720ba00a7413997ad331838d22c81f252556a Author: Nathan Rossi Date: Tue Aug 24 06:44:13 2021 +0000 net: dsa: mv88e6xxx: Update mv88e6393x serdes errata In early erratas this issue only covered port 0 when changing from [x]MII (rev A 3.6). In subsequent errata versions this errata changed to cover the additional "Hardware reset in CPU managed mode" condition, and removed the note specifying that it only applied to port 0. In designs where the device is configured with CPU managed mode (CPU_MGD), on reset all SERDES ports (p0, p9, p10) have a stuck power down bit and require this initial power up procedure. As such apply this errata to all three SERDES ports of the mv88e6393x. Signed-off-by: Nathan Rossi Signed-off-by: David S. Miller commit 446e7f218b7662c912c610aae99069543aa88a40 Author: zhang kai Date: Mon Aug 23 11:49:00 2021 +0800 ipv6: correct comments about fib6_node sernum correct comments in set and get fn_sernum Signed-off-by: zhang kai Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b0cd08537db8d2fbb227cdb2e5835209db295a24 Author: Shai Malin Date: Sun Aug 22 22:21:14 2021 +0300 qed: Fix the VF msix vectors flow For VFs we should return with an error in case we didn't get the exact number of msix vectors as we requested. Not doing that will lead to a crash when starting queues for this VF. Signed-off-by: Prabhakar Kushwaha Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Signed-off-by: David S. Miller commit bbb6d0f3e1feb43d663af089c7dedb23be6a04fb Author: Alexey Gladkov Date: Mon Aug 23 18:16:33 2021 +0200 ucounts: Increase ucounts reference counter before the security hook We need to increment the ucounts reference counter befor security_prepare_creds() because this function may fail and abort_creds() will try to decrement this reference. [ 96.465056][ T8641] FAULT_INJECTION: forcing a failure. [ 96.465056][ T8641] name fail_page_alloc, interval 1, probability 0, space 0, times 0 [ 96.478453][ T8641] CPU: 1 PID: 8641 Comm: syz-executor668 Not tainted 5.14.0-rc6-syzkaller #0 [ 96.487215][ T8641] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 96.497254][ T8641] Call Trace: [ 96.500517][ T8641] dump_stack_lvl+0x1d3/0x29f [ 96.505758][ T8641] ? show_regs_print_info+0x12/0x12 [ 96.510944][ T8641] ? log_buf_vmcoreinfo_setup+0x498/0x498 [ 96.516652][ T8641] should_fail+0x384/0x4b0 [ 96.521141][ T8641] prepare_alloc_pages+0x1d1/0x5a0 [ 96.526236][ T8641] __alloc_pages+0x14d/0x5f0 [ 96.530808][ T8641] ? __rmqueue_pcplist+0x2030/0x2030 [ 96.536073][ T8641] ? lockdep_hardirqs_on_prepare+0x3e2/0x750 [ 96.542056][ T8641] ? alloc_pages+0x3f3/0x500 [ 96.546635][ T8641] allocate_slab+0xf1/0x540 [ 96.551120][ T8641] ___slab_alloc+0x1cf/0x350 [ 96.555689][ T8641] ? kzalloc+0x1d/0x30 [ 96.559740][ T8641] __kmalloc+0x2e7/0x390 [ 96.563980][ T8641] ? kzalloc+0x1d/0x30 [ 96.568029][ T8641] kzalloc+0x1d/0x30 [ 96.571903][ T8641] security_prepare_creds+0x46/0x220 [ 96.577174][ T8641] prepare_creds+0x411/0x640 [ 96.581747][ T8641] __sys_setfsuid+0xe2/0x3a0 [ 96.586333][ T8641] do_syscall_64+0x3d/0xb0 [ 96.590739][ T8641] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 96.596611][ T8641] RIP: 0033:0x445a69 [ 96.600483][ T8641] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 96.620152][ T8641] RSP: 002b:00007f1054173318 EFLAGS: 00000246 ORIG_RAX: 000000000000007a [ 96.628543][ T8641] RAX: ffffffffffffffda RBX: 00000000004ca4c8 RCX: 0000000000445a69 [ 96.636600][ T8641] RDX: 0000000000000010 RSI: 00007f10541732f0 RDI: 0000000000000000 [ 96.644550][ T8641] RBP: 00000000004ca4c0 R08: 0000000000000001 R09: 0000000000000000 [ 96.652500][ T8641] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004ca4cc [ 96.660631][ T8641] R13: 00007fffffe0b62f R14: 00007f1054173400 R15: 0000000000022000 Fixes: 905ae01c4ae2 ("Add a reference to ucounts for each cred") Reported-by: syzbot+01985d7909f9468f013c@syzkaller.appspotmail.com Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/97433b1742c3331f02ad92de5a4f07d673c90613.1629735352.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit 5ddf994fa22f78ae3742d72520a8c3e8521d96cd Author: Eric W. Biederman Date: Mon Aug 23 11:12:17 2021 -0500 ucounts: Fix regression preventing increasing of rlimits in init_user_ns "Ma, XinjianX" reported: > When lkp team run kernel selftests, we found after these series of patches, testcase mqueue: mq_perf_tests > in kselftest failed with following message. > > # selftests: mqueue: mq_perf_tests > # > # Initial system state: > # Using queue path: /mq_perf_tests > # RLIMIT_MSGQUEUE(soft): 819200 > # RLIMIT_MSGQUEUE(hard): 819200 > # Maximum Message Size: 8192 > # Maximum Queue Size: 10 > # Nice value: 0 > # > # Adjusted system state for testing: > # RLIMIT_MSGQUEUE(soft): (unlimited) > # RLIMIT_MSGQUEUE(hard): (unlimited) > # Maximum Message Size: 16777216 > # Maximum Queue Size: 65530 > # Nice value: -20 > # Continuous mode: (disabled) > # CPUs to pin: 3 > # ./mq_perf_tests: mq_open() at 296: Too many open files > not ok 2 selftests: mqueue: mq_perf_tests # exit=1 > ``` > > Test env: > rootfs: debian-10 > gcc version: 9 After investigation the problem turned out to be that ucount_max for the rlimits in init_user_ns was being set to the initial rlimit value. The practical problem is that ucount_max provides a limit that applications inside the user namespace can not exceed. Which means in practice that rlimits that have been converted to use the ucount infrastructure were not able to exceend their initial rlimits. Solve this by setting the relevant values of ucount_max to RLIM_INIFINITY. A limit in init_user_ns is pointless so the code should allow the values to grow as large as possible without riscking an underflow or an overflow. As the ltp test case was a bit of a pain I have reproduced the rlimit failure and tested the fix with the following little C program: > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > int main(int argc, char **argv) > { > struct mq_attr mq_attr; > struct rlimit rlim; > mqd_t mqd; > int ret; > > ret = getrlimit(RLIMIT_MSGQUEUE, &rlim); > if (ret != 0) { > fprintf(stderr, "getrlimit(RLIMIT_MSGQUEUE) failed: %s\n", strerror(errno)); > exit(EXIT_FAILURE); > } > printf("RLIMIT_MSGQUEUE %lu %lu\n", > rlim.rlim_cur, rlim.rlim_max); > rlim.rlim_cur = RLIM_INFINITY; > rlim.rlim_max = RLIM_INFINITY; > ret = setrlimit(RLIMIT_MSGQUEUE, &rlim); > if (ret != 0) { > fprintf(stderr, "setrlimit(RLIMIT_MSGQUEUE, RLIM_INFINITY) failed: %s\n", strerror(errno)); > exit(EXIT_FAILURE); > } > > memset(&mq_attr, 0, sizeof(struct mq_attr)); > mq_attr.mq_maxmsg = 65536 - 1; > mq_attr.mq_msgsize = 16*1024*1024 - 1; > > mqd = mq_open("/mq_rlimit_test", O_RDONLY|O_CREAT, 0600, &mq_attr); > if (mqd == (mqd_t)-1) { > fprintf(stderr, "mq_open failed: %s\n", strerror(errno)); > exit(EXIT_FAILURE); > } > ret = mq_close(mqd); > if (ret) { > fprintf(stderr, "mq_close failed; %s\n", strerror(errno)); > exit(EXIT_FAILURE); > } > > return EXIT_SUCCESS; > } Fixes: 6e52a9f0532f ("Reimplement RLIMIT_MSGQUEUE on top of ucounts") Fixes: d7c9e99aee48 ("Reimplement RLIMIT_MEMLOCK on top of ucounts") Fixes: d64696905554 ("Reimplement RLIMIT_SIGPENDING on top of ucounts") Fixes: 21d1c5e386bc ("Reimplement RLIMIT_NPROC on top of ucounts") Reported-by: kernel test robot lkp@intel.com Acked-by: Alexey Gladkov Link: https://lkml.kernel.org/r/87eeajswfc.fsf_-_@disp2133 Signed-off-by: "Eric W. Biederman" commit 5b029a32cfe4600f5e10e36b41778506b90fd4de Author: Daniel Borkmann Date: Mon Aug 23 21:02:09 2021 +0200 bpf: Fix ringbuf helper function compatibility Commit 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") extended check_map_func_compatibility() by enforcing map -> helper function match, but not helper -> map type match. Due to this all of the bpf_ringbuf_*() helper functions could be used with a wrong map type such as array or hash map, leading to invalid access due to type confusion. Also, both BPF_FUNC_ringbuf_{submit,discard} have ARG_PTR_TO_ALLOC_MEM as argument and not a BPF map. Therefore, their check_map_func_compatibility() presence is incorrect since it's only for map type checking. Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") Reported-by: Ryota Shiga (Flatt Security) Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit d5ae8d7f85b7f6f6e60f1af8ff4be52b0926fde1 Author: Linus Torvalds Date: Mon Aug 23 09:49:09 2021 -0700 Revert "media: dvb header files: move some headers to staging" This reverts commit 819fbd3d8ef36c09576c2a0ffea503f5c46e9177. It turns out that some user-space applications use these uapi header files, so even though the only user of the interface is an old driver that was moved to staging, moving the header files causes unnecessary pain. Generally, we really don't want user space to use kernel headers directly (exactly because it causes pain when we re-organize), and instead copy them as needed. But these things happen, and the headers were in the uapi directory, so I guess it's not entirely unreasonable. Link: https://lore.kernel.org/lkml/4e3e0d40-df4a-94f8-7c2d-85010b0873c4@web.de/ Reported-by: Soeren Moch Cc: stable@kernel.org # 5.13 Cc: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds commit 1f8b66d9654b21ec227a7884bcf739c70d9d27a7 Merge: e22ce8eb631bd 19526d092ceb3 Author: Rafael J. Wysocki Date: Mon Aug 23 13:51:30 2021 +0200 Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp Pull regression fix for the operating performance points (OPP) framework for v5.15 from Viresh Kumar: "This fixes regression in the OPP core for a corner case." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: core: Check for pending links before reading required_opp pointers commit 14315498f5d373097d5082c27c7f764923ec1796 Merge: 359f4cdd7d78f 1406e8cb4b05f Author: David S. Miller Date: Mon Aug 23 12:39:42 2021 +0100 Merge branch 'asix-fixes' Oleksij Rempel says: ==================== asix fixes changes v2: - rebase against current net - add one more fix for the ax88178 variant ==================== Signed-off-by: David S. Miller commit 1406e8cb4b05fdc67692b1af2da39d7ca5278713 Author: Oleksij Rempel Date: Mon Aug 23 09:37:48 2021 +0200 net: usb: asix: do not call phy_disconnect() for ax88178 Fix crash on reboot on a system with ASIX AX88178 USB adapter attached to it: | asix 1-1.4:1.0 eth0: unregister 'asix' usb-ci_hdrc.0-1.4, ASIX AX88178 USB 2.0 Ethernet | 8<--- cut here --- | Unable to handle kernel NULL pointer dereference at virtual address 0000028c | pgd = 5ec93aee | [0000028c] *pgd=00000000 | Internal error: Oops: 5 [#1] PREEMPT SMP ARM | Modules linked in: | CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 5.14.0-rc1-20210811-1 #4 | Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) | PC is at phy_disconnect+0x8/0x48 | LR is at ax88772_unbind+0x14/0x20 | [<80650d04>] (phy_disconnect) from [<80741aa4>] (ax88772_unbind+0x14/0x20) | [<80741aa4>] (ax88772_unbind) from [<8074e250>] (usbnet_disconnect+0x48/0xd8) | [<8074e250>] (usbnet_disconnect) from [<807655e0>] (usb_unbind_interface+0x78/0x25c) | [<807655e0>] (usb_unbind_interface) from [<805b03a0>] (__device_release_driver+0x154/0x20c) | [<805b03a0>] (__device_release_driver) from [<805b0478>] (device_release_driver+0x20/0x2c) | [<805b0478>] (device_release_driver) from [<805af944>] (bus_remove_device+0xcc/0xf8) | [<805af944>] (bus_remove_device) from [<805ab26c>] (device_del+0x178/0x4b0) | [<805ab26c>] (device_del) from [<807634a4>] (usb_disable_device+0xcc/0x178) | [<807634a4>] (usb_disable_device) from [<8075a060>] (usb_disconnect+0xd8/0x238) | [<8075a060>] (usb_disconnect) from [<8075a02c>] (usb_disconnect+0xa4/0x238) | [<8075a02c>] (usb_disconnect) from [<8075a02c>] (usb_disconnect+0xa4/0x238) | [<8075a02c>] (usb_disconnect) from [<80af3520>] (usb_remove_hcd+0xa0/0x198) | [<80af3520>] (usb_remove_hcd) from [<807902e0>] (host_stop+0x38/0xa8) | [<807902e0>] (host_stop) from [<8078d9e4>] (ci_hdrc_remove+0x3c/0x118) | [<8078d9e4>] (ci_hdrc_remove) from [<805b27ec>] (platform_remove+0x20/0x50) | [<805b27ec>] (platform_remove) from [<805b03a0>] (__device_release_driver+0x154/0x20c) | [<805b03a0>] (__device_release_driver) from [<805b0478>] (device_release_driver+0x20/0x2c) | [<805b0478>] (device_release_driver) from [<805af944>] (bus_remove_device+0xcc/0xf8) | [<805af944>] (bus_remove_device) from [<805ab26c>] (device_del+0x178/0x4b0) For this adapter we call ax88178_bind() and ax88772_unbind(), which is related to different chip version and different counter part *bind() function. Since this chip is currently not ported to the PHYLIB, we do not need to call phy_disconnect() here. So, to fix this crash, we need to add ax88178_unbind(). Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support") Reported-by: Robin van der Gracht Tested-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 7a141e64cf14099d84e530db0e86fcb2c489e341 Author: Oleksij Rempel Date: Mon Aug 23 09:37:47 2021 +0200 net: usb: asix: ax88772: move embedded PHY detection as early as possible Some HW revisions need additional MAC configuration before the embedded PHY can be enabled. If this is not done, we won't be able to get response from the internal PHY. This issue was detected on chipcode == AX_AX88772_CHIPCODE variant, where ax88772_hw_reset() was executed with missing embd_phy flag. Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support") Reported-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit ed104ca4bd9c405b41e968ad4ece51f6462e90b6 Author: Sai Krishna Potthuri Date: Wed Jun 23 13:46:20 2021 +0200 reset: reset-zynqmp: Fixed the argument data type This patch changes the data type of the variable 'val' from int to u32. Addresses-Coverity: argument of type "int *" is incompatible with parameter of type "u32 *" Signed-off-by: Sai Krishna Potthuri Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/925cebbe4eb73c7d0a536da204748d33c7100d8c.1624448778.git.michal.simek@xilinx.com Signed-off-by: Philipp Zabel commit 359f4cdd7d78fdf8c098713b05fee950a730f131 Author: Maxim Kiselev Date: Fri Aug 20 18:39:51 2021 +0300 net: marvell: fix MVNETA_TX_IN_PRGRS bit number According to Armada XP datasheet bit at 0 position is corresponding for TxInProg indication. Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Signed-off-by: Maxim Kiselev Signed-off-by: David S. Miller commit 82a44ae113b7b35850f4542f0443fcab221e376a Author: Wong Vee Khee Date: Fri Aug 20 21:26:22 2021 +0800 net: stmmac: fix kernel panic due to NULL pointer dereference of plat->est In the case of taprio offload is not enabled, the error handling path causes a kernel crash due to kernel NULL pointer deference. Fix this by adding check for NULL before attempt to access 'plat->est' on the mutex_lock() call. The following kernel panic is observed without this patch: RIP: 0010:mutex_lock+0x10/0x20 Call Trace: tc_setup_taprio+0x482/0x560 [stmmac] kmem_cache_alloc_trace+0x13f/0x490 taprio_disable_offload.isra.0+0x9d/0x180 [sch_taprio] taprio_destroy+0x6c/0x100 [sch_taprio] qdisc_create+0x2e5/0x4f0 tc_modify_qdisc+0x126/0x740 rtnetlink_rcv_msg+0x12b/0x380 _raw_spin_lock_irqsave+0x19/0x40 _raw_spin_unlock_irqrestore+0x18/0x30 create_object+0x212/0x340 rtnl_calcit.isra.0+0x110/0x110 netlink_rcv_skb+0x50/0x100 netlink_unicast+0x191/0x230 netlink_sendmsg+0x243/0x470 sock_sendmsg+0x5e/0x60 ____sys_sendmsg+0x20b/0x280 copy_msghdr_from_user+0x5c/0x90 __mod_memcg_state+0x87/0xf0 ___sys_sendmsg+0x7c/0xc0 lru_cache_add+0x7f/0xa0 _raw_spin_unlock+0x16/0x30 wp_page_copy+0x449/0x890 handle_mm_fault+0x921/0xfc0 __sys_sendmsg+0x59/0xa0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace b1f19b24368a96aa ]--- Fixes: b60189e0392f ("net: stmmac: Integrate EST with TAPRIO scheduler API") Cc: # 5.10.x Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 46002bf3007ce0387be73d0c9640ee7cd2de4788 Merge: 5ed74b03eb4d0 4051f68318ca9 Author: David S. Miller Date: Mon Aug 23 11:45:37 2021 +0100 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-08-20 This series contains updates to igc and e1000e drivers. Aaron Ma resolves a page fault which occurs when thunderbolt is unplugged for igc. Toshiki Nishioka fixes Tx queue looping to use actual number of queues instead of max value for igc. Sasha fixes an incorrect latency comparison by decoding the values before comparing and prevents attempted writes to read-only NVMs for e1000e. ==================== Signed-off-by: David S. Miller commit 5ed74b03eb4d08f5dd281dcb5f1c9bb92b363a8d Author: Christophe JAILLET Date: Sat Aug 21 09:35:23 2021 +0200 xgene-v2: Fix a resource leak in the error handling path of 'xge_probe()' A successful 'xge_mdio_config()' call should be balanced by a corresponding 'xge_mdio_remove()' call in the error handling path of the probe, as already done in the remove function. Update the error handling path accordingly. Fixes: ea8ab16ab225 ("drivers: net: xgene-v2: Add MDIO support") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 19526d092ceb32d619fce73fe0bdca4370890124 Author: Marijn Suijten Date: Sun Aug 22 19:44:10 2021 +0200 opp: core: Check for pending links before reading required_opp pointers Commit 4fa82a87ba55 ("opp: Allow required-opps to be used for non genpd use cases") dereferences the pointers in required_opp_tables but these might be set to an ERR_PTR if the list still has lazy links pending, resulting in segfaults. Prior to this patch IS_ERR was also checked on required_opp_tables[i] before reading ->is_genpd inside _opp_table_alloc_required_tables, which is at the same time the predicate to add this table to the lazy list. This segfault is solved by reordering the checks to bail on lazy pending tables before reading ->is_genpd. Fixes: 4fa82a87ba55 ("opp: Allow required-opps to be used for non genpd use cases") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Signed-off-by: Viresh Kumar commit e22ce8eb631bdc47a4a4ea7ecf4e4ba499db4f93 Author: Linus Torvalds Date: Sun Aug 22 14:24:56 2021 -0700 Linux 5.14-rc7 commit 9cf448c200ba9935baa94e7a0964598ce947db9d Author: Shreyansh Chouhan Date: Sat Aug 21 12:44:25 2021 +0530 ip6_gre: add validation for csum_start Validate csum_start in gre_handle_offloads before we call _gre_xmit so that we do not crash later when the csum_start value is used in the lco_csum function call. This patch deals with ipv6 code. Fixes: Fixes: b05229f44228 ("gre6: Cleanup GREv6 transmit path, call common GRE functions") Reported-by: syzbot+ff8e1b9f2f36481e2efc@syzkaller.appspotmail.com Signed-off-by: Shreyansh Chouhan Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 1d011c4803c72f3907eccfc1ec63caefb852fcbf Author: Shreyansh Chouhan Date: Sat Aug 21 12:44:24 2021 +0530 ip_gre: add validation for csum_start Validate csum_start in gre_handle_offloads before we call _gre_xmit so that we do not crash later when the csum_start value is used in the lco_csum function call. This patch deals with ipv4 code. Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") Reported-by: syzbot+ff8e1b9f2f36481e2efc@syzkaller.appspotmail.com Signed-off-by: Shreyansh Chouhan Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 1bdc3d5be7e199ff56f39dafb0e5f63a9b8c975d Merge: 9ff50bf2f2ff5 9f7853d7609d5 Author: Linus Torvalds Date: Sun Aug 22 09:49:31 2021 -0700 Merge tag 'powerpc-5.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix random crashes on some 32-bit CPUs by adding isync() after locking/unlocking KUEP - Fix intermittent crashes when loading modules with strict module RWX - Fix a section mismatch introduce by a previous fix. Thanks to Christophe Leroy, Fabiano Rosas, Laurent Vivier, Murilo Opsfelder Araújo, Nathan Chancellor, and Stan Johnson. h# -----BEGIN PGP SIGNATURE----- * tag 'powerpc-5.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix set_memory_*() against concurrent accesses powerpc/32s: Fix random crashes by adding isync() after locking/unlocking KUEP powerpc/xive: Do not mark xive_request_ipi() as __init commit 527f721478bce3f49b513a733bacd19d6f34b08c Author: Babu Moger Date: Fri Aug 20 16:52:42 2021 -0500 x86/resctrl: Fix a maybe-uninitialized build warning treated as error The recent commit 064855a69003 ("x86/resctrl: Fix default monitoring groups reporting") caused a RHEL build failure with an uninitialized variable warning treated as an error because it removed the default case snippet. The RHEL Makefile uses '-Werror=maybe-uninitialized' to force possibly uninitialized variable warnings to be treated as errors. This is also reported by smatch via the 0day robot. The error from the RHEL build is: arch/x86/kernel/cpu/resctrl/monitor.c: In function ‘__mon_event_count’: arch/x86/kernel/cpu/resctrl/monitor.c:261:12: error: ‘m’ may be used uninitialized in this function [-Werror=maybe-uninitialized] m->chunks += chunks; ^~ The upstream Makefile does not build using '-Werror=maybe-uninitialized'. So, the problem is not seen there. Fix the problem by putting back the default case snippet. [ bp: note that there's nothing wrong with the code and other compilers do not trigger this warning - this is being done just so the RHEL compiler is happy. ] Fixes: 064855a69003 ("x86/resctrl: Fix default monitoring groups reporting") Reported-by: Terry Bowman Reported-by: kernel test robot Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/162949631908.23903.17090272726012848523.stgit@bmoger-ubuntu commit 9ff50bf2f2ff5fab01cac26d8eed21a89308e6ef Merge: 9085423f0e211 9711759a87a04 Author: Linus Torvalds Date: Sat Aug 21 11:27:16 2021 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk driver fixes from Stephen Boyd: - Make the regulator state match the GDSC power domain state at boot on Qualcomm SoCs so that the regulator isn't turned off inadvertently. - Fix earlycon on i.MX6Q SoCs * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: gdsc: Ensure regulator init state matches GDSC state clk: imx6q: fix uart earlycon unwork commit 9085423f0e2114fb1a1ca494b872f7d2352b5699 Merge: f4ff9e6b01267 d30836a952890 Author: Linus Torvalds Date: Sat Aug 21 11:22:10 2021 -0700 Merge tag 'char-misc-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small driver fixes for 5.14-rc7. They consist of: - revert for an interconnect patch that was found to have problems - ipack tpci200 driver fixes for reported problems - slimbus messaging and ngd fixes for reported problems All are small and have been in linux-next for a while with no reported issues" * tag 'char-misc-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: ipack: tpci200: fix memory leak in the tpci200_register ipack: tpci200: fix many double free issues in tpci200_pci_probe slimbus: ngd: reset dma setup during runtime pm slimbus: ngd: set correct device for pm slimbus: messaging: check for valid transaction id slimbus: messaging: start transaction ids from 1 instead of zero Revert "interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate" commit f4ff9e6b0126706078a5241561546743b7d92628 Merge: a09434f181f3a 5571ea3117ca2 Author: Linus Torvalds Date: Sat Aug 21 11:10:06 2021 -0700 Merge tag 'usb-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fix from Greg KH: "Here is a single USB typec tcpm fix for a reported problem for 5.14-rc7. It showed up in 5.13 and resolves an issue that Hans found. It has been in linux-next this week with no reported problems" * tag 'usb-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: tcpm: Fix VDMs sometimes not being forwarded to alt-mode drivers commit a09434f181f3ae3a0a6a42bfcf0dc375f0eb26a2 Merge: 5479a7fe89664 aa3e1ba32e553 Author: Linus Torvalds Date: Sat Aug 21 11:04:26 2021 -0700 Merge tag 'riscv-for-linus-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - fix the sifive-l2-cache device tree bindings for json-schema compatibility. This does not change the intended behavior of the binding. - avoid improperly freeing necessary resources during early boot. * tag 'riscv-for-linus-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix a number of free'd resources in init_resources() dt-bindings: sifive-l2-cache: Fix 'select' matching commit 5479a7fe89664b526d21cd62dac5dfe017e0ebd3 Merge: 15517c724c6e8 2a671f77ee49f Author: Linus Torvalds Date: Sat Aug 21 10:56:06 2021 -0700 Merge tag 's390-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Vasily Gorbik: - fix use after free of zpci_dev in pci code * tag 's390-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: fix use after free of zpci_dev commit 15517c724c6e89ed854191028958a43274e3c366 Merge: 002c0aef10906 fdd92b64d15bc Author: Linus Torvalds Date: Sat Aug 21 10:50:22 2021 -0700 Merge tag 'locks-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull mandatory file locking deprecation warning from Jeff Layton: "As discussed on the list, this patch just adds a new warning for folks who still have mandatory locking enabled and actually mount with '-o mand'. I'd like to get this in for v5.14 so we can push this out into stable kernels and hopefully reach folks who have mounts with -o mand. For now, I'm operating under the assumption that we'll fully remove this support in v5.15, but we can move that out if any legitimate users of this facility speak up between now and then" * tag 'locks-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fs: warn about impending deprecation of mandatory locks commit 22aa45cb465be474e97666b3f7587ccb06ee411b Author: Joerg Roedel Date: Fri Aug 20 14:57:03 2021 +0200 x86/efi: Restore Firmware IDT before calling ExitBootServices() Commit 79419e13e808 ("x86/boot/compressed/64: Setup IDT in startup_32 boot path") introduced an IDT into the 32-bit boot path of the decompressor stub. But the IDT is set up before ExitBootServices() is called, and some UEFI firmwares rely on their own IDT. Save the firmware IDT on boot and restore it before calling into EFI functions to fix boot failures introduced by above commit. Fixes: 79419e13e808 ("x86/boot/compressed/64: Setup IDT in startup_32 boot path") Reported-by: Fabio Aiuto Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Cc: stable@vger.kernel.org # 5.13+ Link: https://lkml.kernel.org/r/20210820125703.32410-1-joro@8bytes.org commit 002c0aef109067168ae68ee69b5ce67edc2e63c1 Merge: 1e6907d58cf03 a9ed27a764156 Author: Linus Torvalds Date: Sat Aug 21 08:11:22 2021 -0700 Merge tag 'block-5.14-2021-08-20' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Three fixes from Ming Lei that should go into 5.14: - Fix for a kernel panic when iterating over tags for some cases where a flush request is present, a regression in this cycle. - Request timeout fix - Fix flush request checking" * tag 'block-5.14-2021-08-20' of git://git.kernel.dk/linux-block: blk-mq: fix is_flush_rq blk-mq: fix kernel panic during iterating over flush request blk-mq: don't grab rq's refcount in blk_mq_check_expired() commit 1e6907d58cf03fc808009681b8ef178affbf96aa Merge: fa54d366a6e4f a30f895ad3239 Author: Linus Torvalds Date: Sat Aug 21 08:06:26 2021 -0700 Merge tag 'io_uring-5.14-2021-08-20' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few small fixes that should go into this release: - Fix never re-assigning an initial error value for io_uring_enter() for SQPOLL, if asked to do nothing - Fix xa_alloc_cycle() return value checking, for cases where we have wrapped around - Fix for a ctx pin issue introduced in this cycle (Pavel)" * tag 'io_uring-5.14-2021-08-20' of git://git.kernel.dk/linux-block: io_uring: fix xa_alloc_cycle() error return value check io_uring: pin ctx on fallback execution io_uring: only assign io_uring_enter() SQPOLL error in actual error case commit fdd92b64d15bc4aec973caa25899afd782402e68 Author: Jeff Layton Date: Fri Aug 20 09:29:50 2021 -0400 fs: warn about impending deprecation of mandatory locks We've had CONFIG_MANDATORY_FILE_LOCKING since 2015 and a lot of distros have disabled it. Warn the stragglers that still use "-o mand" that we'll be dropping support for that mount option. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton commit 12d125b4574bd7f602802d94d7b4a55d85aa8e25 Author: Marc Zyngier Date: Fri Aug 20 19:30:02 2021 +0100 stmmac: Revert "stmmac: align RX buffers" This reverts commit a955318fe67e ("stmmac: align RX buffers"), which breaks at least one platform (Nvidia Jetson-X1), causing packet corruption. This is 100% reproducible, and reverting the patch results in a working system again. Given that it is "only" a performance optimisation, let's return to a known working configuration until we can have a good understanding of what is happening here. Fixes: a955318fe67e ("stmmac: align RX buffers") Cc: Matteo Croce Cc: Eric Dumazet Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Link: https://lore.kernel.org/netdev/871r71azjw.wl-maz@kernel.org Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210820183002.457226-1-maz@kernel.org Signed-off-by: Jakub Kicinski commit a30f895ad3239f45012e860d4f94c1a388b36d14 Author: Jens Axboe Date: Fri Aug 20 14:53:59 2021 -0600 io_uring: fix xa_alloc_cycle() error return value check We currently check for ret != 0 to indicate error, but '1' is a valid return and just indicates that the allocation succeeded with a wrap. Correct the check to be for < 0, like it was before the xarray conversion. Cc: stable@vger.kernel.org Fixes: 61cf93700fe6 ("io_uring: Convert personality_idr to XArray") Signed-off-by: Jens Axboe commit fa54d366a6e4fe3e16322abdb8b5115f8be0da8b Merge: cae68764583ba 0f09f4c48118c Author: Linus Torvalds Date: Fri Aug 20 13:44:25 2021 -0700 Merge tag 'acpi-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix two mistakes in new code. Specifics: - Prevent confusing messages from being printed if the PRMT table is not present or there are no PRM modules (Aubrey Li). - Fix the handling of suspend-to-idle entry and exit in the case when the Microsoft UUID is used with the Low-Power S0 Idle _DSM interface (Mario Limonciello)" * tag 'acpi-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: s2idle: Invert Microsoft UUID entry and exit ACPI: PRM: Deal with table not present or no module found commit cae68764583bab180c1ded681dea8c16dda87670 Merge: ed3bad2e4fd70 f2963c7ec7cc3 Author: Linus Torvalds Date: Fri Aug 20 13:38:42 2021 -0700 Merge tag 'pm-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix some issues in the ARM cpufreq drivers and in the operating performance points (OPP) framework. Specifics: - Fix useless WARN() in the OPP core and prevent a noisy warning from being printed by OPP _put functions (Dmitry Osipenko). - Fix error path when allocation failed in the arm_scmi cpufreq driver (Lukasz Luba). - Blacklist Qualcomm sc8180x and Qualcomm sm8150 in cpufreq-dt-platdev (Bjorn Andersson, Thara Gopinath). - Forbid cpufreq for 1.2 GHz variant in the armada-37xx cpufreq driver (Marek Behún)" * tag 'pm-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: opp: Drop empty-table checks from _put functions cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant cpufreq: blocklist Qualcomm sm8150 in cpufreq-dt-platdev cpufreq: arm_scmi: Fix error path when allocation failed opp: remove WARN when no valid OPPs remain cpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev commit ed3bad2e4fd70047b729b64c78b97f88c4d33224 Merge: 8ba9fbe1e4b8a c7b1850dfb41d Author: Linus Torvalds Date: Fri Aug 20 13:08:56 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "10 patches. Subsystems affected by this patch series: MAINTAINERS and mm (shmem, pagealloc, tracing, memcg, memory-failure, vmscan, kfence, and hugetlb)" * emailed patches from Andrew Morton : hugetlb: don't pass page cache pages to restore_reserve_on_error kfence: fix is_kfence_address() for addresses below KFENCE_POOL_SIZE mm: vmscan: fix missing psi annotation for node_reclaim() mm/hwpoison: retry with shake_page() for unhandlable pages mm: memcontrol: fix occasional OOMs due to proportional memory.low reclaim MAINTAINERS: update ClangBuiltLinux IRC chat mmflags.h: add missing __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON names mm/page_alloc: don't corrupt pcppage_migratetype Revert "mm: swap: check if swap backing device is congested or not" Revert "mm/shmem: fix shmem_swapin() race with swapoff" commit 8ba9fbe1e4b8a28050c283792344ee8b6bc3465c Merge: 3db903a8ead3e daa7772d477ec Author: Linus Torvalds Date: Fri Aug 20 12:59:54 2021 -0700 Merge tag 'drm-fixes-2021-08-20-3' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regularly scheduled fixes. The ttm one solves a problem of GPU drivers failing to load if debugfs is off in Kconfig, otherwise the i915 and mediatek, and amdgpu fixes all fairly normal. Nouveau has a couple of display fixes, but it has a fix for a longstanding race condition in it's memory manager code, and the fix mostly removes some code that wasn't working properly and has no userspace users. This fix makes the diffstat kinda larger but in a good (negative line-count) way. core: - fix drm_wait_vblank uapi copying bug ttm: - fix debugfs init when debugfs is off amdgpu: - vega10 SMU workload fix - DCN VM fix - DCN 3.01 watermark fix amdkfd: - SVM fix nouveau: - ampere display fixes - remove MM misfeature to fix a longstanding race condition i915: - tweaked display workaround for all PCHs - eDP MSO pipe sanity for ADL-P fix - remove unused symbol export mediatek: - AAL output size setting - Delete component in remove function" * tag 'drm-fixes-2021-08-20-3' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Use DCN30 watermark calc for DCN301 drm/i915/dp: remove superfluous EXPORT_SYMBOL() drm/i915/edp: fix eDP MSO pipe sanity checks for ADL-P drm/i915: Tweaked Wa_14010685332 for all PCHs drm/nouveau: rip out nvkm_client.super drm/nouveau: block a bunch of classes from userspace drm/nouveau/fifo/nv50-: rip out dma channels drm/nouveau/kms/nv50: workaround EFI GOP window channel format differences drm/nouveau/disp: power down unused DP links during init drm/nouveau: recognise GA107 drm: Copy drm_wait_vblank to user before returning drm/amd/display: Ensure DCN save after VM setup drm/amdkfd: fix random KFDSVMRangeTest.SetGetAttributesTest test failure drm/amd/pm: change the workload type for some cards Revert "drm/amd/pm: fix workload mismatch on vega10" drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails drm/mediatek: Add component_del in OVL and COLOR remove function drm/mediatek: Add AAL output size configuration commit 3db903a8ead3e4466f6292e0809adac0cf3fe527 Merge: a27c75e554feb 045a9277b5615 Author: Linus Torvalds Date: Fri Aug 20 12:51:37 2021 -0700 Merge tag 'pci-v5.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Add Rahul Tanwar as Intel LGM Gateway PCIe maintainer (Rahul Tanwar) - Add Jim Quinlan et al as Broadcom STB PCIe maintainers (Jim Quinlan) - Increase D3hot-to-D0 delay for AMD Renoir/Cezanne XHCI (Marcin Bachry) - Correct iomem_get_mapping() usage for legacy_mem sysfs (Krzysztof Wilczyński) * tag 'pci-v5.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/sysfs: Use correct variable for the legacy_mem sysfs object PCI: Increase D3 delay for AMD Renoir/Cezanne XHCI MAINTAINERS: Add Jim Quinlan et al as Broadcom STB PCIe maintainers MAINTAINERS: Add Rahul Tanwar as Intel LGM Gateway PCIe maintainer commit a27c75e554feb63a0e72b9479bab0b49600d1410 Merge: 43a6473e47130 419dd626e357e Author: Linus Torvalds Date: Fri Aug 20 12:46:00 2021 -0700 Merge tag 'mmc-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - dw_mmc: Fix hang on data CRC error - mmci: Fix voltage switch procedure for the stm32 variant - sdhci-iproc: Fix some clock issues for BCM2711 - sdhci-msm: Fixup software timeout value * tag 'mmc-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711 mmc: sdhci-iproc: Cap min clock frequency on BCM2711 mmc: sdhci-msm: Update the software timeout value for sdhc mmc: mmci: stm32: Check when the voltage switch procedure should be done mmc: dw_mmc: Fix hang on data CRC error commit 43a6473e4713004fbe755a062c2d37c9bde05c2e Merge: 54e9ea3cdb138 65ca89c2b12cc Author: Linus Torvalds Date: Fri Aug 20 12:31:10 2021 -0700 Merge tag 'sound-5.14-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull more sound fixes from Takashi Iwai: "This is a quick follow up for 5.14: a fix for a very recently introduced regression on ASoC Intel Atom driver, and another trivial HD-audio quirk for HP laptops" * tag 'sound-5.14-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: intel: atom: Fix breakage for PCM buffer address setup ALSA: hda/realtek: Limit mic boost on HP ProBook 445 G8 commit 54e9ea3cdb13884b8d3a0c13b9b92bab4a1c96f5 Merge: b7d184d37ecc9 bde8fff82e4a4 Author: Linus Torvalds Date: Fri Aug 20 12:18:49 2021 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - Fix cleaning of vDSO directories - Ensure CNTHCTL_EL2 is fully initialised when booting at EL2 * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: initialize all of CNTHCTL_EL2 arm64: clean vdso & vdso32 files commit 0f09f4c48118ce3c562e1028df7fe0f8150493d6 Merge: 2bbfa0addd63f 4753b46e16073 Author: Rafael J. Wysocki Date: Fri Aug 20 21:11:43 2021 +0200 Merge branch 'acpi-pm' * acpi-pm: ACPI: PM: s2idle: Invert Microsoft UUID entry and exit commit b7d184d37ecc99f87fc8e531c788f69084f8a95f Merge: d992fe5318d8d 8798d36411196 Author: Linus Torvalds Date: Fri Aug 20 12:11:33 2021 -0700 Merge tag 'iommu-fixes-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Fix for a potential NULL-ptr dereference in IOMMU core code - Two resource leak fixes - Cache flush fix in the Intel VT-d driver * tag 'iommu-fixes-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix incomplete cache flush in intel_pasid_tear_down_entry() iommu/vt-d: Fix PASID reference leak iommu: Check if group is NULL before remove device iommu/dma: Fix leak in non-contiguous API commit f2963c7ec7cc337ca286271f3111b1ed3ad5f023 Merge: a87a10961a744 0da04f884ae3e Author: Rafael J. Wysocki Date: Fri Aug 20 21:11:16 2021 +0200 Merge branch 'pm-opp' * pm-opp: opp: Drop empty-table checks from _put functions opp: remove WARN when no valid OPPs remain commit cc4f596cf85e97ca6606e1bd10b3b9851ef52ddf Author: Xiao Yang Date: Fri Aug 20 19:15:09 2021 +0800 RDMA/rxe: Zero out index member of struct rxe_queue 1) New index member of struct rxe_queue was introduced but not zeroed so the initial value of index may be random. 2) The current index is not masked off to index_mask. In this case producer_addr() and consumer_addr() will get an invalid address by the random index and then accessing the invalid address triggers the following panic: "BUG: unable to handle page fault for address: ffff9ae2c07a1414" Fix the issue by using kzalloc() to zero out index member. Fixes: 5bcf5a59c41e ("RDMA/rxe: Protext kernel index from user space") Link: https://lore.kernel.org/r/20210820111509.172500-1-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe commit c7b1850dfb41d0b4154aca8dbc04777fbd75616f Author: Mike Kravetz Date: Thu Aug 19 19:04:33 2021 -0700 hugetlb: don't pass page cache pages to restore_reserve_on_error syzbot hit kernel BUG at fs/hugetlbfs/inode.c:532 as described in [1]. This BUG triggers if the HPageRestoreReserve flag is set on a page in the page cache. It should never be set, as the routine huge_add_to_page_cache explicitly clears the flag after adding a page to the cache. The only code other than huge page allocation which sets the flag is restore_reserve_on_error. It will potentially set the flag in rare out of memory conditions. syzbot was injecting errors to cause memory allocation errors which exercised this specific path. The code in restore_reserve_on_error is doing the right thing. However, there are instances where pages in the page cache were being passed to restore_reserve_on_error. This is incorrect, as once a page goes into the cache reservation information will not be modified for the page until it is removed from the cache. Error paths do not remove pages from the cache, so even in the case of error, the page will remain in the cache and no reservation adjustment is needed. Modify routines that potentially call restore_reserve_on_error with a page cache page to no longer do so. Note on fixes tag: Prior to commit 846be08578ed ("mm/hugetlb: expand restore_reserve_on_error functionality") the routine would not process page cache pages because the HPageRestoreReserve flag is not set on such pages. Therefore, this issue could not be trigggered. The code added by commit 846be08578ed ("mm/hugetlb: expand restore_reserve_on_error functionality") is needed and correct. It exposed incorrect calls to restore_reserve_on_error which is the root cause addressed by this commit. [1] https://lore.kernel.org/linux-mm/00000000000050776d05c9b7c7f0@google.com/ Link: https://lkml.kernel.org/r/20210818213304.37038-1-mike.kravetz@oracle.com Fixes: 846be08578ed ("mm/hugetlb: expand restore_reserve_on_error functionality") Signed-off-by: Mike Kravetz Reported-by: Cc: Mina Almasry Cc: Axel Rasmussen Cc: Peter Xu Cc: Muchun Song Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7cb5d23eaea148f8582229846f8dfff192f05c3 Author: Marco Elver Date: Thu Aug 19 19:04:30 2021 -0700 kfence: fix is_kfence_address() for addresses below KFENCE_POOL_SIZE Originally the addr != NULL check was meant to take care of the case where __kfence_pool == NULL (KFENCE is disabled). However, this does not work for addresses where addr > 0 && addr < KFENCE_POOL_SIZE. This can be the case on NULL-deref where addr > 0 && addr < PAGE_SIZE or any other faulting access with addr < KFENCE_POOL_SIZE. While the kernel would likely crash, the stack traces and report might be confusing due to double faults upon KFENCE's attempt to unprotect such an address. Fix it by just checking that __kfence_pool != NULL instead. Link: https://lkml.kernel.org/r/20210818130300.2482437-1-elver@google.com Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure") Signed-off-by: Marco Elver Reported-by: Kuan-Ying Lee Acked-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: [5.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57f29762cdd4687a02f245d1b1e78de046388eac Author: Johannes Weiner Date: Thu Aug 19 19:04:27 2021 -0700 mm: vmscan: fix missing psi annotation for node_reclaim() In a debugging session the other day, Rik noticed that node_reclaim() was missing memstall annotations. This means we'll miss pressure and lost productivity resulting from reclaim on an overloaded local NUMA node when vm.zone_reclaim_mode is enabled. There haven't been any reports, but that's likely because vm.zone_reclaim_mode hasn't been a commonly used feature recently, and the intersection between such setups and psi users is probably nil. But secondary memory such as CXL-connected DIMMS, persistent memory etc, and the page demotion patches that handle them (https://lore.kernel.org/lkml/20210401183216.443C4443@viggo.jf.intel.com/) could soon make this a more common codepath again. Link: https://lkml.kernel.org/r/20210818152457.35846-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reported-by: Rik van Riel Reviewed-by: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fcc00621d88b274b5dffd8daeea71d0e4c28b84e Author: Naoya Horiguchi Date: Thu Aug 19 19:04:24 2021 -0700 mm/hwpoison: retry with shake_page() for unhandlable pages HWPoisonHandlable() sometimes returns false for typical user pages due to races with average memory events like transfers over LRU lists. This causes failures in hwpoison handling. There's retry code for such a case but does not work because the retry loop reaches the retry limit too quickly before the page settles down to handlable state. Let get_any_page() call shake_page() to fix it. [naoya.horiguchi@nec.com: get_any_page(): return -EIO when retry limit reached] Link: https://lkml.kernel.org/r/20210819001958.2365157-1-naoya.horiguchi@linux.dev Link: https://lkml.kernel.org/r/20210817053703.2267588-1-naoya.horiguchi@linux.dev Fixes: 25182f05ffed ("mm,hwpoison: fix race with hugetlb page allocation") Signed-off-by: Naoya Horiguchi Reported-by: Tony Luck Reviewed-by: Yang Shi Cc: Oscar Salvador Cc: Muchun Song Cc: Mike Kravetz Cc: Michal Hocko Cc: [5.13+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f56ce412a59d7d938b81de8878faef128812482c Author: Johannes Weiner Date: Thu Aug 19 19:04:21 2021 -0700 mm: memcontrol: fix occasional OOMs due to proportional memory.low reclaim We've noticed occasional OOM killing when memory.low settings are in effect for cgroups. This is unexpected and undesirable as memory.low is supposed to express non-OOMing memory priorities between cgroups. The reason for this is proportional memory.low reclaim. When cgroups are below their memory.low threshold, reclaim passes them over in the first round, and then retries if it couldn't find pages anywhere else. But when cgroups are slightly above their memory.low setting, page scan force is scaled down and diminished in proportion to the overage, to the point where it can cause reclaim to fail as well - only in that case we currently don't retry, and instead trigger OOM. To fix this, hook proportional reclaim into the same retry logic we have in place for when cgroups are skipped entirely. This way if reclaim fails and some cgroups were scanned with diminished pressure, we'll try another full-force cycle before giving up and OOMing. [akpm@linux-foundation.org: coding-style fixes] Link: https://lkml.kernel.org/r/20210817180506.220056-1-hannes@cmpxchg.org Fixes: 9783aa9917f8 ("mm, memcg: proportional memory.{low,min} reclaim") Signed-off-by: Johannes Weiner Reported-by: Leon Yang Reviewed-by: Rik van Riel Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Chris Down Acked-by: Michal Hocko Cc: [5.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91ed3ed0f79884f66581e2162cc5ae91ce82b4fb Author: Nathan Chancellor Date: Thu Aug 19 19:04:18 2021 -0700 MAINTAINERS: update ClangBuiltLinux IRC chat Everyone has moved from Freenode to Libera so updated the channel entry for MAINTAINERS. Link: https://github.com/ClangBuiltLinux/linux/issues/1402 Link: https://lkml.kernel.org/r/20210818022339.3863058-1-nathan@kernel.org Signed-off-by: Nathan Chancellor Cc: Nick Desaulniers Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b16ee0f9ed79fca2f2c31b13cac2ab9cf543525a Author: Mike Rapoport Date: Thu Aug 19 19:04:15 2021 -0700 mmflags.h: add missing __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON names printk("%pGg") outputs these two flags as hexadecimal number, rather than as a string, e.g: GFP_KERNEL|0x1800000 Fix this by adding missing names of __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON flags to __def_gfpflag_names. Link: https://lkml.kernel.org/r/20210816133502.590-1-rppt@kernel.org Fixes: 013bb59dbb7c ("arm64: mte: handle tags zeroing at page allocation time") Fixes: c275c5c6d50a ("kasan: disable freed user page poisoning with HW tags") Signed-off-by: Mike Rapoport Cc: Peter Collingbourne Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47aef6010b837657e1433021bfdeeee7a26a174c Author: Doug Berger Date: Thu Aug 19 19:04:12 2021 -0700 mm/page_alloc: don't corrupt pcppage_migratetype When placing pages on a pcp list, migratetype values over MIGRATE_PCPTYPES get added to the MIGRATE_MOVABLE pcp list. However, the actual migratetype is preserved in the page and should not be changed to MIGRATE_MOVABLE or the page may end up on the wrong free_list. The impact is that HIGHATOMIC or CMA pages getting bulk freed from the PCP lists could potentially end up on the wrong buddy list. There are various consequences but minimally NR_FREE_CMA_PAGES accounting could get screwed up. [mgorman@techsingularity.net: changelog update] Link: https://lkml.kernel.org/r/20210811182917.2607994-1-opendmb@gmail.com Fixes: df1acc856923 ("mm/page_alloc: avoid conflating IRQs disabled with zone->lock") Signed-off-by: Doug Berger Acked-by: Vlastimil Babka Acked-by: Mel Gorman Cc: "Peter Zijlstra (Intel)" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c04b3d06904368b71ab9e09336ecfc91f4009bc9 Author: Yang Shi Date: Thu Aug 19 19:04:09 2021 -0700 Revert "mm: swap: check if swap backing device is congested or not" Due to the change about how block layer detects congestion the justification of commit 8fd2e0b505d1 ("mm: swap: check if swap backing device is congested or not") doesn't stand anymore, so the commit could be just reverted in order to solve the race reported by commit 2efa33fc7f6e ("mm/shmem: fix shmem_swapin() race with swapoff"). The fix was reverted by the previous patch. Link: https://lkml.kernel.org/r/20210810202936.2672-3-shy828301@gmail.com Signed-off-by: Yang Shi Suggested-by: Hugh Dickins Acked-by: Hugh Dickins Cc: "Huang, Ying" Cc: Miaohe Lin Cc: Matthew Wilcox (Oracle) Cc: Johannes Weiner Cc: Michal Hocko Cc: Joonsoo Kim Cc: Minchan Kim Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1e1ef345433fb03742003677ddfb980d148092b Author: Yang Shi Date: Thu Aug 19 19:04:05 2021 -0700 Revert "mm/shmem: fix shmem_swapin() race with swapoff" Due to the change about how block layer detects congestion the justification of commit 8fd2e0b505d1 ("mm: swap: check if swap backing device is congested or not") doesn't stand anymore, so the commit could be just reverted in order to solve the race reported by commit 2efa33fc7f6e ("mm/shmem: fix shmem_swapin() race with swapoff"), so the fix commit could be just reverted as well. And that fix is also kind of buggy as discussed by [1] and [2]. [1] https://lore.kernel.org/linux-mm/24187e5e-069-9f3f-cefe-39ac70783753@google.com/ [2] https://lore.kernel.org/linux-mm/e82380b9-3ad4-4a52-be50-6d45c7f2b5da@google.com/ Link: https://lkml.kernel.org/r/20210810202936.2672-2-shy828301@gmail.com Signed-off-by: Yang Shi Suggested-by: Hugh Dickins Acked-by: Hugh Dickins Cc: "Huang, Ying" Cc: Miaohe Lin Cc: David Hildenbrand Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbe986bdfd6dfe6ef24b833767fff4151e024357 Author: Gal Pressman Date: Wed Aug 11 18:11:28 2021 +0300 RDMA/efa: Free IRQ vectors on error flow Make sure to free the IRQ vectors in case the allocation doesn't return the expected number of IRQs. Fixes: b7f5e880f377 ("RDMA/efa: Add the efa module") Link: https://lore.kernel.org/r/20210811151131.39138-2-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 32bc8f8373d2d6a681c96e4b25dca60d4d1c6016 Author: Michel Dänzer Date: Tue Aug 17 10:23:25 2021 +0200 drm/amdgpu: Cancel delayed work when GFXOFF is disabled schedule_delayed_work does not push back the work if it was already scheduled before, so amdgpu_device_delay_enable_gfx_off ran ~100 ms after the first time GFXOFF was disabled and re-enabled, even if GFXOFF was disabled and re-enabled again during those 100 ms. This resulted in frame drops / stutter with the upcoming mutter 41 release on Navi 14, due to constantly enabling GFXOFF in the HW and disabling it again (for getting the GPU clock counter). To fix this, call cancel_delayed_work_sync when the disable count transitions from 0 to 1, and only schedule the delayed work on the reverse transition, not if the disable count was already 0. This makes sure the delayed work doesn't run at unexpected times, and allows it to be lock-free. v2: * Use cancel_delayed_work_sync & mutex_trylock instead of mod_delayed_work. v3: * Make amdgpu_device_delay_enable_gfx_off lock-free (Christian König) v4: * Fix race condition between amdgpu_gfx_off_ctrl incrementing adev->gfx.gfx_off_req_count and amdgpu_device_delay_enable_gfx_off checking for it to be 0 (Evan Quan) Cc: stable@vger.kernel.org Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar # v3 Acked-by: Christian König # v3 Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 2a7b9a8437130fd328001f4edfac8eec98dfe298 Author: Christian König Date: Wed Aug 18 14:05:28 2021 +0200 drm/amdgpu: use the preferred pin domain after the check For some reason we run into an use case where a BO is already pinned into GTT, but should be pinned into VRAM|GTT again. Handle that case gracefully as well. Reviewed-by: Shashank Sharma Reviewed-by: Alex Deucher Signed-off-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit aa3e1ba32e553e611a58145c2eb349802feaa6eb Author: Petr Pavlu Date: Sat Aug 7 19:54:50 2021 +0200 riscv: Fix a number of free'd resources in init_resources() Function init_resources() allocates a boot memory block to hold an array of resources which it adds to iomem_resource. The array is filled in from its end and the function then attempts to free any unused memory at the beginning. The problem is that size of the unused memory is incorrectly calculated and this can result in releasing memory which is in use by active resources. Their data then gets corrupted later when the memory is reused by a different part of the system. Fix the size of the released memory to correctly match the number of unused resource entries. Fixes: ffe0e5261268 ("RISC-V: Improve init_resources()") Signed-off-by: Petr Pavlu Reviewed-by: Sunil V L Acked-by: Nick Kossifidis Tested-by: Sunil V L Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 4051f68318ca9f3d3becef3b54e70ad2c146df97 Author: Sasha Neftin Date: Sun Jul 18 07:10:31 2021 +0300 e1000e: Do not take care about recovery NVM checksum On new platforms, the NVM is read-only. Attempting to update the NVM is causing a lockup to occur. Do not attempt to write to the NVM on platforms where it's not supported. Emit an error message when the NVM checksum is invalid. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667 Fixes: fb776f5d57ee ("e1000e: Add support for Tiger Lake") Suggested-by: Dima Ruinskiy Suggested-by: Vitaly Lifshits Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 44a13a5d99c71bf9e1676d9e51679daf4d7b3d73 Author: Sasha Neftin Date: Sun Jul 4 10:11:41 2021 +0300 e1000e: Fix the max snoop/no-snoop latency for 10M We should decode the latency and the max_latency before directly compare. The latency should be presented as lat_enc = scale x value: lat_enc_d = (lat_enc & 0x0x3ff) x (1U << (5*((max_ltr_enc & 0x1c00) >> 10))) Fixes: cf8fb73c23aa ("e1000e: add support for LTR on I217/I218") Suggested-by: Yee Li Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 691bd4d7761992914a0e83c27a4ce57d01474cda Author: Toshiki Nishioka Date: Wed Jul 21 17:34:03 2021 -0700 igc: Use num_tx_queues when iterating over tx_ring queue Use num_tx_queues rather than the IGC_MAX_TX_QUEUES fixed number 4 when iterating over tx_ring queue since instantiated queue count could be less than 4 where on-line cpu count is less than 4. Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading") Signed-off-by: Toshiki Nishioka Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Muhammad Husaini Zulkifli Acked-by: Sasha Neftin Signed-off-by: Tony Nguyen commit 4b79959510e6612d80f8d86022e0cb44eee6f4a2 Author: Aaron Ma Date: Tue Jul 13 21:00:36 2021 +0800 igc: fix page fault when thunderbolt is unplugged After unplug thunderbolt dock with i225, pciehp interrupt is triggered, remove call will read/write mmio address which is already disconnected, then cause page fault and make system hang. Check PCI state to remove device safely. Trace: BUG: unable to handle page fault for address: 000000000000b604 Oops: 0000 [#1] SMP NOPTI RIP: 0010:igc_rd32+0x1c/0x90 [igc] Call Trace: igc_ptp_suspend+0x6c/0xa0 [igc] igc_ptp_stop+0x12/0x50 [igc] igc_remove+0x7f/0x1c0 [igc] pci_device_remove+0x3e/0xb0 __device_release_driver+0x181/0x240 Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings") Fixes: b03c49cde61f ("igc: Save PTP time before a reset") Signed-off-by: Aaron Ma Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit ffc9c3ebb4af870a121da99826e9ccb63dc8b3d7 Author: Petko Manolov Date: Fri Aug 20 09:57:53 2021 +0300 net: usb: pegasus: fixes of set_register(s) return value evaluation; - restore the behavior in enable_net_traffic() to avoid regressions - Jakub Kicinski; - hurried up and removed redundant assignment in pegasus_open() before yet another checker complains; Fixes: 8a160e2e9aeb ("net: usb: pegasus: Check the return value of get_geristers() and friends;") Reported-by: Jakub Kicinski Signed-off-by: Petko Manolov Signed-off-by: David S. Miller commit 7e78c597c3ebfd0cb329aa09a838734147e4f117 Author: Xiaolong Huang Date: Fri Aug 20 03:50:34 2021 +0800 net: qrtr: fix another OOB Read in qrtr_endpoint_post This check was incomplete, did not consider size is 0: if (len != ALIGN(size, 4) + hdrlen) goto err; if size from qrtr_hdr is 0, the result of ALIGN(size, 4) will be 0, In case of len == hdrlen and size == 0 in header this check won't fail and if (cb->type == QRTR_TYPE_NEW_SERVER) { /* Remote node endpoint can bridge other distant nodes */ const struct qrtr_ctrl_pkt *pkt = data + hdrlen; qrtr_node_assign(node, le32_to_cpu(pkt->server.node)); } will also read out of bound from data, which is hdrlen allocated block. Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets") Fixes: ad9d24c9429e ("net: qrtr: fix OOB Read in qrtr_endpoint_post") Signed-off-by: Xiaolong Huang Signed-off-by: David S. Miller commit 787c70f2f9990b5a197320152d2fc32cd8a6ad1a Author: Nicholas Piggin Date: Fri Aug 20 20:34:31 2021 +1000 powerpc/64s: Fix scv implicit soft-mask table for relocated kernels The implict soft-mask table addresses get relocated if they use a relative symbol like a label. This is right for code that runs relocated but not for unrelocated. The scv interrupt vectors run unrelocated, so absolute addresses are required for their soft-mask table entry. This fixes crashing with relocated kernels, usually an asynchronous interrupt hitting in the scv handler, then hitting the trap that checks whether r1 is in userspace. Fixes: 325678fd0522 ("powerpc/64s: add a table of implicit soft-masked addresses") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210820103431.1701240-1-npiggin@gmail.com commit 3c474b3239f12fe0b00d7e82481f36a1f31e79ab Author: Peter Zijlstra Date: Thu Aug 19 13:09:17 2021 +0200 sched: Fix Core-wide rq->lock for uninitialized CPUs Eugene tripped over the case where rq_lock(), as called in a for_each_possible_cpu() loop came apart because rq->core hadn't been setup yet. This is a somewhat unusual, but valid case. Rework things such that rq->core is initialized to point at itself. IOW initialize each CPU as a single threaded Core. CPU online will then join the new CPU (thread) to an existing Core where needed. For completeness sake, have CPU offline fully undo the state so as to not presume the topology will match the next time it comes online. Fixes: 9edeaea1bc45 ("sched: Core-wide rq->lock") Reported-by: Eugene Syromiatnikov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Don Tested-by: Eugene Syromiatnikov Link: https://lkml.kernel.org/r/YR473ZGeKqMs6kw+@hirez.programming.kicks-ass.net commit daa7772d477ec658dc1fd9127549a7996d8e0c2b Merge: f5b27f7f8dd9c 37717b8c9f0e8 Author: Dave Airlie Date: Fri Aug 20 15:13:56 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-08-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-08-18: amdgpu: - vega10 SMU workload fix - DCN VM fix - DCN 3.01 watermark fix amdkfd: - SVM fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210818225137.4070-1-alexander.deucher@amd.com commit 1c8094e394bceb4f1880f9d539bdd255c130826e Author: Rob Herring Date: Tue Aug 17 12:47:55 2021 -0500 dt-bindings: sifive-l2-cache: Fix 'select' matching When the schema fixups are applied to 'select' the result is a single entry is required for a match, but that will never match as there should be 2 entries. Also, a 'select' schema should have the widest possible match, so use 'contains' which matches the compatible string(s) in any position and not just the first position. Fixes: 993dcfac64eb ("dt-bindings: riscv: sifive-l2-cache: convert bindings to json-schema") Signed-off-by: Rob Herring Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 310d2e83cb9b7f1e7232319880e3fcb57592fa10 Author: Lukas Bulwahn Date: Thu Aug 19 13:39:54 2021 +0200 powerpc: Re-enable ARCH_ENABLE_SPLIT_PMD_PTLOCK Commit 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK") broke PMD split page table lock for powerpc. It selects the non-existent config ARCH_ENABLE_PMD_SPLIT_PTLOCK in arch/powerpc/platforms/Kconfig.cputype, but clearly intended to select ARCH_ENABLE_SPLIT_PMD_PTLOCK (notice the word swapping!), as that commit did for all other architectures. Fix it by selecting the correct symbol ARCH_ENABLE_SPLIT_PMD_PTLOCK. Fixes: 66f24fa766e3 ("mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK") Cc: stable@vger.kernel.org # v5.13+ Signed-off-by: Lukas Bulwahn Reviewed-by: Daniel Axtens [mpe: Reword change log to make it clear this is a bug fix] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210819113954.17515-3-lukas.bulwahn@gmail.com commit a8f89fa27773a8c96fd09fb4e2f4892d794f21f6 Author: Jacob Keller Date: Thu Aug 19 15:34:51 2021 -0700 ice: do not abort devlink info if board identifier can't be found The devlink dev info command reports version information about the device and firmware running on the board. This includes the "board.id" field which is supposed to represent an identifier of the board design. The ice driver uses the Product Board Assembly identifier for this. In some cases, the PBA is not present in the NVM. If this happens, devlink dev info will fail with an error. Instead, modify the ice_info_pba function to just exit without filling in the context buffer. This will cause the board.id field to be skipped. Log a dev_dbg message in case someone wants to confirm why board.id is not showing up for them. Fixes: e961b679fb0b ("ice: add board identifier info to devlink .info_get") Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20210819223451.245613-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit f5b27f7f8dd9c088584e33c530eaae250623b9fa Merge: 5ce5cef0196a2 da4d4517ba702 Author: Dave Airlie Date: Fri Aug 20 10:09:42 2021 +1000 Merge tag 'mediatek-drm-fixes-5.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes for Linux 5.14-2 1. Fix AAL output size setting. 2. Delete component in remove function. Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20210819001635.14803-1-chunkuang.hu@kernel.org commit 5ce5cef0196a29524e132c914b5e922881693862 Merge: b88aefc51ce92 e3e86f41385b2 Author: Dave Airlie Date: Fri Aug 20 09:38:30 2021 +1000 Merge tag 'drm-intel-fixes-2021-08-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Expand a tweaked display workaround for all PCHs. (Anshuman) - Fix eDP MSO pipe sanity checks for ADL-P. (Jani) - Remove superfluous EXPORT_SYMBOL(). (Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YR137zkSAIbun1Ed@intel.com commit b88aefc51ce92e74dae10b67f5886d29ba4590d4 Merge: e213bd1e72f06 59f216cf04d97 Author: Dave Airlie Date: Fri Aug 20 06:57:44 2021 +1000 Merge branch 'linux-5.14' of git://github.com/skeggsb/linux into drm-fixes - Ampere display fixes - Fix longstanding MM race issue by removing unused code. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5jtUFkHsGe-pf-=RceDOgKygjPnCi=6d5vCLM_f5aeMQ@mail.gmail.com commit 65a81b61d8c5e96748671824cc46339afbd831d0 Author: Bob Pearson Date: Fri Aug 13 16:06:26 2021 -0500 RDMA/rxe: Fix memory allocation while in a spin lock rxe_mcast_add_grp_elem() in rxe_mcast.c calls rxe_alloc() while holding spinlocks which in turn calls kzalloc(size, GFP_KERNEL) which is incorrect. This patch replaces rxe_alloc() by rxe_alloc_locked() which uses GFP_ATOMIC. This bug was caused by the below mentioned commit and failing to handle the need for the atomic allocate. Fixes: 4276fd0dddc9 ("RDMA/rxe: Remove RXE_POOL_ATOMIC") Link: https://lore.kernel.org/r/20210813210625.4484-1-rpearsonhpe@gmail.com Reported-by: Dan Carpenter Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit d992fe5318d8d7af9510b879439a3c7f283da442 Merge: f87d64319e6f9 1e16a40211208 Author: Linus Torvalds Date: Thu Aug 19 15:32:58 2021 -0700 Merge tag 'soc-fixes-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Not much to see here. Half the fixes this time are for Qualcomm dts files, fixing small mistakes on certain machines. The other fixes are: - A 5.13 regression fix for freescale QE interrupt controller\ - A fix for TI OMAP gpt12 timer error handling - A randconfig build regression fix for ixp4xx - Another defconfig fix following the CONFIG_FB dependency rework" * tag 'soc-fixes-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: soc: fsl: qe: fix static checker warning ARM: ixp4xx: fix building both pci drivers ARM: configs: Update the nhk8815_defconfig bus: ti-sysc: Fix error handling for sysc_check_active_timer() soc: fsl: qe: convert QE interrupt controller to platform_device arm64: dts: qcom: sdm845-oneplus: fix reserved-mem arm64: dts: qcom: msm8994-angler: Disable cont_splash_mem arm64: dts: qcom: sc7280: Fixup cpufreq domain info for cpu7 arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem mapping arm64: dts: qcom: msm8992-bullhead: Remove PSCI arm64: dts: qcom: c630: fix correct powerdown pin for WSA881x commit e213bd1e72f06529178d41af93fde0523b2b6f46 Merge: 7c60610d47676 fa0b1ef5f7a69 Author: Dave Airlie Date: Thu Aug 19 17:39:33 2021 +1000 Merge tag 'drm-misc-fixes-2021-08-18' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * UAPI: Return results for failed drm_wait_vblank_ioctl() * ttm: Fix debugfs initialization Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YR1c7cG1IaL+g8EN@linux-uq9g.fritz.box commit f87d64319e6f980c82acfc9b95ed523d053fb7ac Merge: e649e4c806b4e cd0a719fbd702 Author: Linus Torvalds Date: Thu Aug 19 12:33:43 2021 -0700 Merge tag 'net-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from bpf, wireless and mac80211 trees. Current release - regressions: - tipc: call tipc_wait_for_connect only when dlen is not 0 - mac80211: fix locking in ieee80211_restart_work() Current release - new code bugs: - bpf: add rcu_read_lock in bpf_get_current_[ancestor_]cgroup_id() - ethernet: ice: fix perout start time rounding - wwan: iosm: prevent underflow in ipc_chnl_cfg_get() Previous releases - regressions: - bpf: clear zext_dst of dead insns - sch_cake: fix srchost/dsthost hashing mode - vrf: reset skb conntrack connection on VRF rcv - net/rds: dma_map_sg is entitled to merge entries Previous releases - always broken: - ethernet: bnxt: fix Tx path locking and races, add Rx path barriers" * tag 'net-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (42 commits) net: dpaa2-switch: disable the control interface on error path Revert "flow_offload: action should not be NULL when it is referenced" iavf: Fix ping is lost after untrusted VF had tried to change MAC i40e: Fix ATR queue selection r8152: fix the maximum number of PLA bp for RTL8153C r8152: fix writing USB_BP2_EN mptcp: full fully established support after ADD_ADDR mptcp: fix memory leak on address flush net/rds: dma_map_sg is entitled to merge entries net: mscc: ocelot: allow forwarding from bridge ports to the tag_8021q CPU port net: asix: fix uninit value bugs ovs: clear skb->tstamp in forwarding path net: mdio-mux: Handle -EPROBE_DEFER correctly net: mdio-mux: Don't ignore memory allocation errors net: mdio-mux: Delete unnecessary devm_kfree net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse sch_cake: fix srchost/dsthost hashing mode ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32 mac80211: fix locking in ieee80211_restart_work() ... commit e649e4c806b4ee41120bc51ee6698e87b3edc1fc Merge: d6d09a6942050 1e35b8a7780a0 Author: Linus Torvalds Date: Thu Aug 19 12:19:58 2021 -0700 Merge tag 'platform-drivers-x86-v5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Enable SW_TABLET_MODE support for the TP200s - Enable WMI on two more Gigabyte motherboards * tag 'platform-drivers-x86-v5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: gigabyte-wmi: add support for B450M S2H V2 platform/x86: gigabyte-wmi: add support for X570 GAMING X platform/x86: asus-nb-wmi: Add tablet_mode_sw=lid-flip quirk for the TP200s platform/x86: asus-nb-wmi: Allow configuring SW_TABLET_MODE method with a module option commit a036ad088306a88de87e973981f2b9224e466c3f Author: Dinghao Liu Date: Mon Aug 16 16:55:31 2021 +0800 RDMA/bnxt_re: Remove unpaired rtnl unlock in bnxt_re_dev_init() The fixed commit removes all rtnl_lock() and rtnl_unlock() calls in function bnxt_re_dev_init(), but forgets to remove a rtnl_unlock() in the error handling path of bnxt_re_register_netdev(), which may cause a deadlock. This bug is suggested by a static analysis tool. Fixes: c2b777a95923 ("RDMA/bnxt_re: Refactor device add/remove functionalities") Link: https://lore.kernel.org/r/20210816085531.12167-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Acked-by: Selvin Xavier Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit cd0a719fbd702eb4b455a6ad986483750125588a Author: Vladimir Oltean Date: Thu Aug 19 17:17:55 2021 +0300 net: dpaa2-switch: disable the control interface on error path Currently dpaa2_switch_takedown has a funny name and does not do the opposite of dpaa2_switch_init, which makes probing fail when we need to handle an -EPROBE_DEFER. A sketch of what dpaa2_switch_init does: dpsw_open dpaa2_switch_detect_features dpsw_reset for (i = 0; i < ethsw->sw_attr.num_ifs; i++) { dpsw_if_disable dpsw_if_set_stp dpsw_vlan_remove_if_untagged dpsw_if_set_tci dpsw_vlan_remove_if } dpsw_vlan_remove alloc_ordered_workqueue dpsw_fdb_remove dpaa2_switch_ctrl_if_setup When dpaa2_switch_takedown is called from the error path of dpaa2_switch_probe(), the control interface, enabled by dpaa2_switch_ctrl_if_setup from dpaa2_switch_init, remains enabled, because dpaa2_switch_takedown does not call dpaa2_switch_ctrl_if_teardown. Since dpaa2_switch_probe might fail due to EPROBE_DEFER of a PHY, this means that a second probe of the driver will happen with the control interface directly enabled. This will trigger a second error: [ 93.273528] fsl_dpaa2_switch dpsw.0: dpsw_ctrl_if_set_pools() failed [ 93.281966] fsl_dpaa2_switch dpsw.0: fsl_mc_driver_probe failed: -13 [ 93.288323] fsl_dpaa2_switch: probe of dpsw.0 failed with error -13 Which if we investigate the /dev/dpaa2_mc_console log, we find out is caused by: [E, ctrl_if_set_pools:2211, DPMNG] ctrl_if must be disabled So make dpaa2_switch_takedown do the opposite of dpaa2_switch_init (in reasonable limits, no reason to change STP state, re-add VLANs etc), and rename it to something more conventional, like dpaa2_switch_teardown. Fixes: 613c0a5810b7 ("staging: dpaa2-switch: enable the control interface") Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Link: https://lore.kernel.org/r/20210819141755.1931423-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit fa05bdb89b01b098aad19ec0ebc4d1cc7b11177e Author: Ido Schimmel Date: Thu Aug 19 13:58:42 2021 +0300 Revert "flow_offload: action should not be NULL when it is referenced" This reverts commit 9ea3e52c5bc8bb4a084938dc1e3160643438927a. Cited commit added a check to make sure 'action' is not NULL, but 'action' is already dereferenced before the check, when calling flow_offload_has_one_action(). Therefore, the check does not make any sense and results in a smatch warning: include/net/flow_offload.h:322 flow_action_mixed_hw_stats_check() warn: variable dereferenced before check 'action' (see line 319) Fix by reverting this commit. Cc: gushengxian Fixes: 9ea3e52c5bc8 ("flow_offload: action should not be NULL when it is referenced") Signed-off-by: Ido Schimmel Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20210819105842.1315705-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit d584566c4b9f211fd9049b43c7fd70d424fbd0d9 Merge: 316749009fdf9 8da80c9d50220 Author: Jakub Kicinski Date: Thu Aug 19 09:56:42 2021 -0700 Merge branch 'intel-wired-lan-driver-updates-2021-08-18' Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-08-18 This series contains updates to i40e and iavf drivers. Arkadiusz fixes Flow Director not using the correct queue due to calling the wrong pick Tx function for i40e. Sylwester resolves traffic loss for iavf when it attempts to change its MAC address when it does not have permissions to do so. ==================== Link: https://lore.kernel.org/r/20210818174217.4138922-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 8da80c9d50220a8e4190a4eaa0dd6aeefcbbb5bf Author: Sylwester Dziedziuch Date: Wed Aug 18 10:42:17 2021 -0700 iavf: Fix ping is lost after untrusted VF had tried to change MAC Make changes to MAC address dependent on the response of PF. Disallow changes to HW MAC address and MAC filter from untrusted VF, thanks to that ping is not lost if VF tries to change MAC. Add a new field in iavf_mac_filter, to indicate whether there was response from PF for given filter. Based on this field pass or discard the filter. If untrusted VF tried to change it's address, it's not changed. Still filter was changed, because of that ping couldn't go through. Fixes: c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Sylwester Dziedziuch Signed-off-by: Mateusz Palczewski Tested-by: Gurucharan G Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit a222be597e316389f9f8c26033352c124ce93056 Author: Arkadiusz Kubalewski Date: Wed Aug 18 10:42:16 2021 -0700 i40e: Fix ATR queue selection Without this patch, ATR does not work. Receive/transmit uses queue selection based on SW DCB hashing method. If traffic classes are not configured for PF, then use netdev_pick_tx function for selecting queue for packet transmission. Instead of calling i40e_swdcb_skb_tx_hash, call netdev_pick_tx, which ensures that packet is transmitted/received from CPU that is running the application. Reproduction steps: 1. Load i40e driver 2. Map each MSI interrupt of i40e port for each CPU 3. Disable ntuple, enable ATR i.e.: ethtool -K $interface ntuple off ethtool --set-priv-flags $interface flow-director-atr 4. Run application that is generating traffic and is bound to a single CPU, i.e.: taskset -c 9 netperf -H 1.1.1.1 -t TCP_RR -l 10 5. Observe behavior: Application's traffic should be restricted to the CPU provided in taskset. Fixes: 89ec1f0886c1 ("i40e: Fix queue-to-TC mapping on Tx") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Arkadiusz Kubalewski Tested-by: Dave Switzer Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 316749009fdf9a3d4a9641a257bbd7ec496c7c90 Merge: c15128c97b781 3776f3517ed94 Author: Jakub Kicinski Date: Thu Aug 19 08:58:16 2021 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-08-19 We've added 3 non-merge commits during the last 3 day(s) which contain a total of 3 files changed, 29 insertions(+), 6 deletions(-). The main changes are: 1) Fix to clear zext_dst for dead instructions which was causing invalid program rejections on JITs with bpf_jit_needs_zext such as s390x, from Ilya Leoshkevich. 2) Fix RCU splat in bpf_get_current_{ancestor_,}cgroup_id() helpers when they are invoked from sleepable programs, from Yonghong Song. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: selftests, bpf: Test that dead ldx_w insns are accepted bpf: Clear zext_dst of dead insns bpf: Add rcu_read_lock in bpf_get_current_[ancestor_]cgroup_id() helpers ==================== Link: https://lore.kernel.org/r/20210819144904.20069-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 65ca89c2b12cca0d473f3dd54267568ad3af55cc Author: Takashi Iwai Date: Thu Aug 19 17:29:45 2021 +0200 ASoC: intel: atom: Fix breakage for PCM buffer address setup The commit 2e6b836312a4 ("ASoC: intel: atom: Fix reference to PCM buffer address") changed the reference of PCM buffer address to substream->runtime->dma_addr as the buffer address may change dynamically. However, I forgot that the dma_addr field is still not set up for the CONTINUOUS buffer type (that this driver uses) yet in 5.14 and earlier kernels, and it resulted in garbage I/O. The problem will be fixed in 5.15, but we need to address it quickly for now. The fix is to deduce the address again from the DMA pointer with virt_to_phys(), but from the right one, substream->runtime->dma_area. Fixes: 2e6b836312a4 ("ASoC: intel: atom: Fix reference to PCM buffer address") Reported-and-tested-by: Hans de Goede Cc: Acked-by: Mark Brown Link: https://lore.kernel.org/r/2048c6aa-2187-46bd-6772-36a4fb3c5aeb@redhat.com Link: https://lore.kernel.org/r/20210819152945.8510-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8903376dc69949199301b290cc22dc64ae5d8a6d Author: Kai-Heng Feng Date: Wed Aug 18 22:41:18 2021 +0800 ALSA: hda/realtek: Limit mic boost on HP ProBook 445 G8 The mic has lots of noises if mic boost is enabled. So disable mic boost to get crystal clear audio capture. Signed-off-by: Kai-Heng Feng Cc: Link: https://lore.kernel.org/r/20210818144119.121738-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 1e16a40211208d2d6e217e5013607219f4272dff Merge: d0dc706ab1924 06a089ef64493 Author: Arnd Bergmann Date: Thu Aug 19 17:22:46 2021 +0200 Merge tag 'omap-for-v5.14/gpt12-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fix for omap gpt12 timer error handling Two of the recent fixes for ti-sysc driver had bad interaction for a function return value that caused one of the fixes to not work so we need to change the return value handling. Otherwise early beagleboard variants still have a boot issue. * tag 'omap-for-v5.14/gpt12-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Fix error handling for sysc_check_active_timer() Link: https://lore.kernel.org/r/pull-1629354796-830948@atomide.com Signed-off-by: Arnd Bergmann commit 045a9277b5615846c7b662ffaba84e781f08a172 Author: Krzysztof Wilczyński Date: Thu Aug 12 13:21:44 2021 +0000 PCI/sysfs: Use correct variable for the legacy_mem sysfs object Two legacy PCI sysfs objects "legacy_io" and "legacy_mem" were updated to use an unified address space in the commit 636b21b50152 ("PCI: Revoke mappings like devmem"). This allows for revocations to be managed from a single place when drivers want to take over and mmap() a /dev/mem range. Following the update, both of the sysfs objects should leverage the iomem_get_mapping() function to get an appropriate address range, but only the "legacy_io" has been correctly updated - the second attribute seems to be using a wrong variable to pass the iomem_get_mapping() function to. Thus, correct the variable name used so that the "legacy_mem" sysfs object would also correctly call the iomem_get_mapping() function. Fixes: 636b21b50152 ("PCI: Revoke mappings like devmem") Link: https://lore.kernel.org/r/20210812132144.791268-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Daniel Vetter commit e0bff43220925b7e527f9d3bc9f5c624177c959e Author: Marcin Bachry Date: Wed Jul 21 22:58:58 2021 -0400 PCI: Increase D3 delay for AMD Renoir/Cezanne XHCI The Renoir XHCI controller apparently doesn't resume reliably with the standard D3hot-to-D0 delay. Increase it to 20ms. [Alex: I talked to the AMD USB hardware team and the AMD Windows team and they are not aware of any HW errata or specific issues. The HW works fine in Windows. I was told Windows uses a rather generous default delay of 100ms for PCI state transitions.] Link: https://lore.kernel.org/r/20210722025858.220064-1-alexander.deucher@amd.com Signed-off-by: Marcin Bachry Signed-off-by: Alex Deucher Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org Cc: Mario Limonciello Cc: Prike Liang Cc: Shyam Sundar S K commit e647eff57466c8cf7547532d6b26166b9b17f341 Author: Jim Quinlan Date: Wed Aug 18 18:50:30 2021 -0400 MAINTAINERS: Add Jim Quinlan et al as Broadcom STB PCIe maintainers Add Jim Quinlan, Nicolas Saenz Julienne, and Florian Fainelli as maintainers of the Broadcom STB PCIe controller driver. This driver is also included in these entries: BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE BROADCOM BCM7XXX ARM ARCHITECTURE which cover the Raspberry Pi specifics of the PCIe driver. Link: https://lore.kernel.org/r/20210818225031.8502-1-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Acked-by: Florian Fainelli commit cbe71c61992c38f72c2b625b2ef25916b9f0d060 Author: Tuo Li Date: Fri Aug 6 06:30:29 2021 -0700 IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs() kmalloc_array() is called to allocate memory for tx->descp. If it fails, the function __sdma_txclean() is called: __sdma_txclean(dd, tx); However, in the function __sdma_txclean(), tx-descp is dereferenced if tx->num_desc is not zero: sdma_unmap_desc(dd, &tx->descp[0]); To fix this possible null-pointer dereference, assign the return value of kmalloc_array() to a local variable descp, and then assign it to tx->descp if it is not NULL. Otherwise, go to enomem. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/20210806133029.194964-1-islituo@gmail.com Reported-by: TOTE Robot Signed-off-by: Tuo Li Tested-by: Mike Marciniszyn Acked-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit 0032640204a7d73bef163638c34a4642f8c9ed07 Author: Lukas Bulwahn Date: Tue Aug 17 10:41:58 2021 +0200 RDMA/irdma: Use correct kconfig symbol for AUXILIARY_BUS In Kconfig, references to config symbols do not use the prefix "CONFIG_". Commit fa0cf568fd76 ("RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw") selects config CONFIG_AUXILIARY_BUS in config INFINIBAND_IRDMA, but intended to select config AUXILIARY_BUS. Fixes: fa0cf568fd76 ("RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw") Link: https://lore.kernel.org/r/20210817084158.10095-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Jason Gunthorpe commit 17f2569dce1848080825b8336e6b7c6900193b44 Author: Naresh Kumar PBS Date: Wed Aug 18 20:25:52 2021 -0700 RDMA/bnxt_re: Add missing spin lock initialization Add the missing initialization of srq lock. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/1629343553-5843-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit f6018cc4602659e0e608849529704f3f41276c28 Author: Gal Pressman Date: Thu Aug 12 16:56:06 2021 +0300 RDMA/uverbs: Track dmabuf memory regions The dmabuf memory registrations are missing the restrack handling and hence do not appear in rdma tool. Fixes: bfe0cc6eb249 ("RDMA/uverbs: Add uverbs command for dma-buf based MR registration") Link: https://lore.kernel.org/r/20210812135607.6228-1-galpress@amazon.com Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit da78fe5fb35737058de52364484ffed74e7d329b Author: Maor Gottlieb Date: Tue Aug 10 12:25:11 2021 +0300 RDMA/mlx5: Fix crash when unbind multiport slave Fix the below crash when deleting a slave from the unaffiliated list twice. First time when the slave is bound to the master and the second when the slave is unloaded. Fix it by checking if slave is unaffiliated (doesn't have ib device) before removing from the list. RIP: 0010:mlx5r_mp_remove+0x4e/0xa0 [mlx5_ib] Call Trace: auxiliary_bus_remove+0x18/0x30 __device_release_driver+0x177/x220 device_release_driver+0x24/0x30 bus_remove_device+0xd8/0x140 device_del+0x18a/0x3e0 mlx5_rescan_drivers_locked+0xa9/0x210 [mlx5_core] mlx5_unregister_device+0x34/0x60 [mlx5_core] mlx5_uninit_one+0x32/0x100 [mlx5_core] remove_one+0x6e/0xe0 [mlx5_core] pci_device_remove+0x36/0xa0 __device_release_driver+0x177/0x220 device_driver_detach+0x3c/0xa0 unbind_store+0x113/0x130 kernfs_fop_write_iter+0x110/0x1a0 new_sync_write+0x116/0x1a0 vfs_write+0x1ba/0x260 ksys_write+0x5f/0xe0 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 93f8244431ad ("RDMA/mlx5: Convert mlx5_ib to use auxiliary bus") Link: https://lore.kernel.org/r/17ec98989b0ba88f7adfbad68eb20bce8d567b44.1628587493.git.leonro@nvidia.com Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c15128c97b78199e86807800df290242523165ec Merge: d98c8210670ea 6633fb83f1fad Author: David S. Miller Date: Thu Aug 19 12:19:30 2021 +0100 Merge branch 'r8152-bp-settings' Hayes Wang says: ==================== r8152: fix bp settings Fix the wrong bp settings of the firmware. ==================== Signed-off-by: David S. Miller commit 6633fb83f1faddbfcac09e35edcae96bd0468335 Author: Hayes Wang Date: Thu Aug 19 11:05:37 2021 +0800 r8152: fix the maximum number of PLA bp for RTL8153C The maximum PLA bp number of RTL8153C is 16, not 8. That is, the bp 0 ~ 15 are at 0xfc28 ~ 0xfc46, and the bp_en is at 0xfc48. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit a876a33d2a1102f99fc782fefb784f4dd4841d8c Author: Hayes Wang Date: Thu Aug 19 11:05:36 2021 +0800 r8152: fix writing USB_BP2_EN The register of USB_BP2_EN is 16 bits, so we should use ocp_write_word(), not ocp_write_byte(). Fixes: 9370f2d05a2a ("support request_firmware for RTL8153") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit d98c8210670ea2cde4df9eb68fad38357fbe0d8a Merge: fb4b1373dcab0 67b12f792d5ea Author: David S. Miller Date: Thu Aug 19 12:17:05 2021 +0100 Merge branch 'mptcp-fixes' Mat Martineau says: ==================== mptcp: Bug fixes Here are two bug fixes for the net tree: Patch 1 fixes a memory leak that could be encountered when clearing the list of advertised MPTCP addresses. Patch 2 fixes a protocol issue early in an MPTCP connection, to ensure both peers correctly understand that the full MPTCP connection handshake has completed even when the server side quickly sends an ADD_ADDR option. ==================== Signed-off-by: David S. Miller commit 67b12f792d5eaeb8b4fca3b2053e6b819eb3bf0f Author: Matthieu Baerts Date: Wed Aug 18 16:42:37 2021 -0700 mptcp: full fully established support after ADD_ADDR If directly after an MP_CAPABLE 3WHS, the client receives an ADD_ADDR with HMAC from the server, it is enough to switch to a "fully established" mode because it has received more MPTCP options. It was then OK to enable the "fully_established" flag on the MPTCP socket. Still, best to check if the ADD_ADDR looks valid by looking if it contains an HMAC (no 'echo' bit). If an ADD_ADDR echo is received while we are not in "fully established" mode, it is strange and then we should not switch to this mode now. But that is not enough. On one hand, the path-manager has be notified the state has changed. On the other hand, the "fully_established" flag on the subflow socket should be turned on as well not to re-send the MP_CAPABLE 3rd ACK content with the next ACK. Fixes: 84dfe3677a6f ("mptcp: send out dedicated ADD_ADDR packet") Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit a0eea5f10eeb5180d115452b0d77afa6603dfe18 Author: Paolo Abeni Date: Wed Aug 18 16:42:36 2021 -0700 mptcp: fix memory leak on address flush The endpoint cleanup path is prone to a memory leak, as reported by syzkaller: BUG: memory leak unreferenced object 0xffff88810680ea00 (size 64): comm "syz-executor.6", pid 6191, jiffies 4295756280 (age 24.138s) hex dump (first 32 bytes): 58 75 7d 3c 80 88 ff ff 22 01 00 00 00 00 ad de Xu}<...."....... 01 00 02 00 00 00 00 00 ac 1e 00 07 00 00 00 00 ................ backtrace: [<0000000072a9f72a>] kmalloc include/linux/slab.h:591 [inline] [<0000000072a9f72a>] mptcp_nl_cmd_add_addr+0x287/0x9f0 net/mptcp/pm_netlink.c:1170 [<00000000f6e931bf>] genl_family_rcv_msg_doit.isra.0+0x225/0x340 net/netlink/genetlink.c:731 [<00000000f1504a2c>] genl_family_rcv_msg net/netlink/genetlink.c:775 [inline] [<00000000f1504a2c>] genl_rcv_msg+0x341/0x5b0 net/netlink/genetlink.c:792 [<0000000097e76f6a>] netlink_rcv_skb+0x148/0x430 net/netlink/af_netlink.c:2504 [<00000000ceefa2b8>] genl_rcv+0x24/0x40 net/netlink/genetlink.c:803 [<000000008ff91aec>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] [<000000008ff91aec>] netlink_unicast+0x537/0x750 net/netlink/af_netlink.c:1340 [<0000000041682c35>] netlink_sendmsg+0x846/0xd80 net/netlink/af_netlink.c:1929 [<00000000df3aa8e7>] sock_sendmsg_nosec net/socket.c:704 [inline] [<00000000df3aa8e7>] sock_sendmsg+0x14e/0x190 net/socket.c:724 [<000000002154c54c>] ____sys_sendmsg+0x709/0x870 net/socket.c:2403 [<000000001aab01d7>] ___sys_sendmsg+0xff/0x170 net/socket.c:2457 [<00000000fa3b1446>] __sys_sendmsg+0xe5/0x1b0 net/socket.c:2486 [<00000000db2ee9c7>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<00000000db2ee9c7>] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80 [<000000005873517d>] entry_SYSCALL_64_after_hwframe+0x44/0xae We should not require an allocation to cleanup stuff. Rework the code a bit so that the additional RCU work is no more needed. Fixes: 1729cf186d8a ("mptcp: create the listening socket for new port") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit bde8fff82e4a4b0f000dbf4d5eadab2079be0b56 Author: Mark Rutland Date: Wed Aug 18 17:15:35 2021 +0100 arm64: initialize all of CNTHCTL_EL2 In __init_el2_timers we initialize CNTHCTL_EL2.{EL1PCEN,EL1PCTEN} with a RMW sequence, leaving all other bits UNKNOWN. In general, we should initialize all bits in a register rather than using an RMW sequence, since most bits are UNKNOWN out of reset, and as new bits are added to the reigster their reset value might not result in expected behaviour. In the case of CNTHCTL_EL2, FEAT_ECV added a number of new control bits in previously RES0 bits, which reset to UNKNOWN values, and may cause issues for EL1 and EL0: * CNTHCTL_EL2.ECV enables the CNTPOFF_EL2 offset (which itself resets to an UNKNOWN value) at EL0 and EL1. Since the offset could reset to distinct values across CPUs, when the control bit resets to 1 this could break timekeeping generally. * CNTHCTL_EL2.{EL1TVT,EL1TVCT} trap EL0 and EL1 accesses to the EL1 virtual timer/counter registers to EL2. When reset to 1, this could cause unexpected traps to EL2. Initializing these bits to zero avoids these problems, and all other bits in CNTHCTL_EL2 other than EL1PCEN and EL1PCTEN can safely be reset to zero. This patch ensures we initialize CNTHCTL_EL2 accordingly, only setting EL1PCEN and EL1PCTEN, and setting all other bits to zero. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Oliver Upton Cc: Will Deacon Reviewed-by: Oliver Upton Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210818161535.52786-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit 9f7853d7609d59172eecfc5e7ccf503bc1b690bd Author: Michael Ellerman Date: Sun Aug 15 14:10:24 2021 +1000 powerpc/mm: Fix set_memory_*() against concurrent accesses Laurent reported that STRICT_MODULE_RWX was causing intermittent crashes on one of his systems: kernel tried to execute exec-protected page (c008000004073278) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0xc008000004073278 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries Modules linked in: drm virtio_console fuse drm_panel_orientation_quirks ... CPU: 3 PID: 44 Comm: kworker/3:1 Not tainted 5.14.0-rc4+ #12 Workqueue: events control_work_handler [virtio_console] NIP: c008000004073278 LR: c008000004073278 CTR: c0000000001e9de0 REGS: c00000002e4ef7e0 TRAP: 0400 Not tainted (5.14.0-rc4+) MSR: 800000004280b033 CR: 24002822 XER: 200400cf ... NIP fill_queue+0xf0/0x210 [virtio_console] LR fill_queue+0xf0/0x210 [virtio_console] Call Trace: fill_queue+0xb4/0x210 [virtio_console] (unreliable) add_port+0x1a8/0x470 [virtio_console] control_work_handler+0xbc/0x1e8 [virtio_console] process_one_work+0x290/0x590 worker_thread+0x88/0x620 kthread+0x194/0x1a0 ret_from_kernel_thread+0x5c/0x64 Jordan, Fabiano & Murilo were able to reproduce and identify that the problem is caused by the call to module_enable_ro() in do_init_module(), which happens after the module's init function has already been called. Our current implementation of change_page_attr() is not safe against concurrent accesses, because it invalidates the PTE before flushing the TLB and then installing the new PTE. That leaves a window in time where there is no valid PTE for the page, if another CPU tries to access the page at that time we see something like the fault above. We can't simply switch to set_pte_at()/flush TLB, because our hash MMU code doesn't handle a set_pte_at() of a valid PTE. See [1]. But we do have pte_update(), which replaces the old PTE with the new, meaning there's no window where the PTE is invalid. And the hash MMU version hash__pte_update() deals with synchronising the hash page table correctly. [1]: https://lore.kernel.org/linuxppc-dev/87y318wp9r.fsf@linux.ibm.com/ Fixes: 1f9ad21c3b38 ("powerpc/mm: Implement set_memory() routines") Reported-by: Laurent Vivier Reviewed-by: Christophe Leroy Reviewed-by: Murilo Opsfelder Araújo Tested-by: Laurent Vivier Signed-off-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210818120518.3603172-1-mpe@ellerman.id.au commit ef486bf448a057a6e2d50e40ae879f7add6585da Author: Christophe Leroy Date: Wed Aug 18 06:49:29 2021 +0000 powerpc/32s: Fix random crashes by adding isync() after locking/unlocking KUEP Commit b5efec00b671 ("powerpc/32s: Move KUEP locking/unlocking in C") removed the 'isync' instruction after adding/removing NX bit in user segments. The reasoning behind this change was that when setting the NX bit we don't mind it taking effect with delay as the kernel never executes text from userspace, and when clearing the NX bit this is to return to userspace and then the 'rfi' should synchronise the context. However, it looks like on book3s/32 having a hash page table, at least on the G3 processor, we get an unexpected fault from userspace, then this is followed by something wrong in the verification of MSR_PR at end of another interrupt. This is fixed by adding back the removed isync() following update of NX bit in user segment registers. Only do it for cores with an hash table, as 603 cores don't exhibit that problem and the two isync increase ./null_syscall selftest by 6 cycles on an MPC 832x. First problem: unexpected WARN_ON() for mysterious PROTFAULT WARNING: CPU: 0 PID: 1660 at arch/powerpc/mm/fault.c:354 do_page_fault+0x6c/0x5b0 Modules linked in: CPU: 0 PID: 1660 Comm: Xorg Not tainted 5.13.0-pmac-00028-gb3c15b60339a #40 NIP: c001b5c8 LR: c001b6f8 CTR: 00000000 REGS: e2d09e40 TRAP: 0700 Not tainted (5.13.0-pmac-00028-gb3c15b60339a) MSR: 00021032 CR: 42d04f30 XER: 20000000 GPR00: c000424c e2d09f00 c301b680 e2d09f40 0000001e 42000000 00cba028 00000000 GPR08: 08000000 48000010 c301b680 e2d09f30 22d09f30 00c1fff0 00cba000 a7b7ba4c GPR16: 00000031 00000000 00000000 00000000 00000000 00000000 a7b7b0d0 00c5c010 GPR24: a7b7b64c a7b7d2f0 00000004 00000000 c1efa6c0 00cba02c 00000300 e2d09f40 NIP [c001b5c8] do_page_fault+0x6c/0x5b0 LR [c001b6f8] do_page_fault+0x19c/0x5b0 Call Trace: [e2d09f00] [e2d09f04] 0xe2d09f04 (unreliable) [e2d09f30] [c000424c] DataAccess_virt+0xd4/0xe4 --- interrupt: 300 at 0xa7a261dc NIP: a7a261dc LR: a7a253bc CTR: 00000000 REGS: e2d09f40 TRAP: 0300 Not tainted (5.13.0-pmac-00028-gb3c15b60339a) MSR: 0000d032 CR: 228428e2 XER: 20000000 DAR: 00cba02c DSISR: 42000000 GPR00: a7a27448 afa6b0e0 a74c35c0 a7b7b614 0000001e a7b7b614 00cba028 00000000 GPR08: 00020fd9 00000031 00cb9ff8 a7a273b0 220028e2 00c1fff0 00cba000 a7b7ba4c GPR16: 00000031 00000000 00000000 00000000 00000000 00000000 a7b7b0d0 00c5c010 GPR24: a7b7b64c a7b7d2f0 00000004 00000002 0000001e a7b7b614 a7b7aff4 00000030 NIP [a7a261dc] 0xa7a261dc LR [a7a253bc] 0xa7a253bc --- interrupt: 300 Instruction dump: 7c4a1378 810300a0 75278410 83820298 83a300a4 553b018c 551e0036 4082038c 2e1b0000 40920228 75280800 41820220 <0fe00000> 3b600000 41920214 81420594 Second problem: MSR PR is seen unset allthough the interrupt frame shows it set kernel BUG at arch/powerpc/kernel/interrupt.c:458! Oops: Exception in kernel mode, sig: 5 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac Modules linked in: CPU: 0 PID: 1660 Comm: Xorg Tainted: G W 5.13.0-pmac-00028-gb3c15b60339a #40 NIP: c0011434 LR: c001629c CTR: 00000000 REGS: e2d09e70 TRAP: 0700 Tainted: G W (5.13.0-pmac-00028-gb3c15b60339a) MSR: 00029032 CR: 42d09f30 XER: 00000000 GPR00: 00000000 e2d09f30 c301b680 e2d09f40 83440000 c44d0e68 e2d09e8c 00000000 GPR08: 00000002 00dc228a 00004000 e2d09f30 22d09f30 00c1fff0 afa6ceb4 00c26144 GPR16: 00c25fb8 00c26140 afa6ceb8 90000000 00c944d8 0000001c 00000000 00200000 GPR24: 00000000 000001fb afa6d1b4 00000001 00000000 a539a2a0 a530fd80 00000089 NIP [c0011434] interrupt_exit_kernel_prepare+0x10/0x70 LR [c001629c] interrupt_return+0x9c/0x144 Call Trace: [e2d09f30] [c000424c] DataAccess_virt+0xd4/0xe4 (unreliable) --- interrupt: 300 at 0xa09be008 NIP: a09be008 LR: a09bdfe8 CTR: a09bdfc0 REGS: e2d09f40 TRAP: 0300 Tainted: G W (5.13.0-pmac-00028-gb3c15b60339a) MSR: 0000d032 CR: 420028e2 XER: 20000000 DAR: a539a308 DSISR: 0a000000 GPR00: a7b90d50 afa6b2d0 a74c35c0 a0a8b690 a0a8b698 a5365d70 a4fa82a8 00000004 GPR08: 00000000 a09bdfc0 00000000 a5360000 a09bde7c 00c1fff0 afa6ceb4 00c26144 GPR16: 00c25fb8 00c26140 afa6ceb8 90000000 00c944d8 0000001c 00000000 00200000 GPR24: 00000000 000001fb afa6d1b4 00000001 00000000 a539a2a0 a530fd80 00000089 NIP [a09be008] 0xa09be008 LR [a09bdfe8] 0xa09bdfe8 --- interrupt: 300 Instruction dump: 80010024 83e1001c 7c0803a6 4bffff80 3bc00800 4bffffd0 486b42fd 4bffffcc 81430084 71480002 41820038 554a0462 <0f0a0000> 80620060 74630001 40820034 Fixes: b5efec00b671 ("powerpc/32s: Move KUEP locking/unlocking in C") Cc: stable@vger.kernel.org # v5.13+ Reported-by: Stan Johnson Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4856f5574906e2aec0522be17bf3848a22b2cd0b.1629269345.git.christophe.leroy@csgroup.eu commit fb4b1373dcab086d0619c29310f0466a0b2ceb8a Author: Gerd Rausch Date: Tue Aug 17 10:04:37 2021 -0700 net/rds: dma_map_sg is entitled to merge entries Function "dma_map_sg" is entitled to merge adjacent entries and return a value smaller than what was passed as "nents". Subsequently "ib_map_mr_sg" needs to work with this value ("sg_dma_len") rather than the original "nents" parameter ("sg_len"). This old RDS bug was exposed and reliably causes kernel panics (using RDMA operations "rds-stress -D") on x86_64 starting with: commit c588072bba6b ("iommu/vt-d: Convert intel iommu driver to the iommu ops") Simply put: Linux 5.11 and later. Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Link: https://lore.kernel.org/r/60efc69f-1f35-529d-a7ef-da0549cad143@oracle.com Signed-off-by: Jakub Kicinski commit c1930148a3941f891ddbd76fceaa4e10a957ccf2 Author: Vladimir Oltean Date: Tue Aug 17 19:04:25 2021 +0300 net: mscc: ocelot: allow forwarding from bridge ports to the tag_8021q CPU port Currently we are unable to ping a bridge on top of a felix switch which uses the ocelot-8021q tagger. The packets are dropped on the ingress of the user port and the 'drop_local' counter increments (the counter which denotes drops due to no valid destinations). Dumping the PGID tables, it becomes clear that the PGID_SRC of the user port is zero, so it has no valid destinations. But looking at the code, the cpu_fwd_mask (the bit mask of DSA tag_8021q ports) is clearly missing from the forwarding mask of ports that are under a bridge. So this has always been broken. Looking at the version history of the patch, in v7 https://patchwork.kernel.org/project/netdevbpf/patch/20210125220333.1004365-12-olteanv@gmail.com/ the code looked like this: /* Standalone ports forward only to DSA tag_8021q CPU ports */ unsigned long mask = cpu_fwd_mask; (...) } else if (ocelot->bridge_fwd_mask & BIT(port)) { mask |= ocelot->bridge_fwd_mask & ~BIT(port); while in v8 (the merged version) https://patchwork.kernel.org/project/netdevbpf/patch/20210129010009.3959398-12-olteanv@gmail.com/ it looked like this: unsigned long mask; (...) } else if (ocelot->bridge_fwd_mask & BIT(port)) { mask = ocelot->bridge_fwd_mask & ~BIT(port); So the breakage was introduced between v7 and v8 of the patch. Fixes: e21268efbe26 ("net: dsa: felix: perform switch setup for tag_8021q") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210817160425.3702809-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 37717b8c9f0e8c4dd73fc522769cc14649b4f657 Author: Zhan Liu Date: Fri Aug 13 08:31:04 2021 -0700 drm/amd/display: Use DCN30 watermark calc for DCN301 [why] dcn301_calculate_wm_and_dl() causes flickering when external monitor is connected. This issue has been fixed before by commit 0e4c0ae59d7e ("drm/amdgpu/display: drop dcn301_calculate_wm_and_dl for now"), however part of the fix was gone after commit 2cbcb78c9ee5 ("Merge tag 'amd-drm-next-5.13-2021-03-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-next"). [how] Use dcn30_calculate_wm_and_dlg() instead as in the original fix. Fixes: 2cbcb78c9ee5 ("Merge tag 'amd-drm-next-5.13-2021-03-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-next") Signed-off-by: Nikola Cornij Reviewed-by: Zhan Liu Tested-by: Zhan Liu Tested-by: Oliver Logush Signed-off-by: Zhan Liu Signed-off-by: Alex Deucher commit d6d09a6942050f21b065a134169002b4d6b701ef Merge: 01f15f3773bf3 3f79f6f6247c8 Author: Linus Torvalds Date: Wed Aug 18 12:06:42 2021 -0700 Merge tag 'for-5.14-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One more fix for cross-rename, adding a missing check for directory and subvolume, this could lead to a crash" * tag 'for-5.14-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: prevent rename2 from exchanging a subvol with a directory from different parents commit 01f15f3773bf3653a708e2c18c370beb16ca23c7 Merge: a83955bdad3ee 4bf61ad5f0204 Author: Linus Torvalds Date: Wed Aug 18 12:00:27 2021 -0700 Merge tag 'sound-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Only a few regression fixes and trivial device quirks" * tag 'sound-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/via: Apply runtime PM workaround for ASUS B23E ALSA: hda: Fix hang during shutdown due to link reset ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9510 laptop ALSA: oxfw: fix functioal regression for silence in Apogee Duet FireWire ALSA: hda - fix the 'Capture Switch' value change notifications commit a83955bdad3ee1c8d29f345252dcb1806fe22365 Merge: 3b844826b6c6a 14c4c8e41511a Author: Linus Torvalds Date: Wed Aug 18 11:55:50 2021 -0700 Merge tag 'cfi-v5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull clang cfi fix from Kees Cook: - Use rcu_read_{un}lock_sched_notrace to avoid recursion (Elliot Berman) * tag 'cfi-v5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: cfi: Use rcu_read_{un}lock_sched_notrace commit 3b844826b6c6affa80755254da322b017358a2f4 Author: Linus Torvalds Date: Thu Aug 5 10:04:43 2021 -0700 pipe: avoid unnecessary EPOLLET wakeups under normal loads I had forgotten just how sensitive hackbench is to extra pipe wakeups, and commit 3a34b13a88ca ("pipe: make pipe writes always wake up readers") ended up causing a quite noticeable regression on larger machines. Now, hackbench isn't necessarily a hugely meaningful benchmark, and it's not clear that this matters in real life all that much, but as Mel points out, it's used often enough when comparing kernels and so the performance regression shows up like a sore thumb. It's easy enough to fix at least for the common cases where pipes are used purely for data transfer, and you never have any exciting poll usage at all. So set a special 'poll_usage' flag when there is polling activity, and make the ugly "EPOLLET has crazy legacy expectations" semantics explicit to only that case. I would love to limit it to just the broken EPOLLET case, but the pipe code can't see the difference between epoll and regular select/poll, so any non-read/write waiting will trigger the extra wakeup behavior. That is sufficient for at least the hackbench case. Apart from making the odd extra wakeup cases more explicitly about EPOLLET, this also makes the extra wakeup be at the _end_ of the pipe write, not at the first write chunk. That is actually much saner semantics (as much as you can call any of the legacy edge-triggered expectations for EPOLLET "sane") since it means that you know the wakeup will happen once the write is done, rather than possibly in the middle of one. [ For stable people: I'm putting a "Fixes" tag on this, but I leave it up to you to decide whether you actually want to backport it or not. It likely has no impact outside of synthetic benchmarks - Linus ] Link: https://lore.kernel.org/lkml/20210802024945.GA8372@xsang-OptiPlex-9020/ Fixes: 3a34b13a88ca ("pipe: make pipe writes always wake up readers") Reported-by: kernel test robot Tested-by: Sandeep Patil Tested-by: Mel Gorman Signed-off-by: Linus Torvalds commit 1e35b8a7780a0c043cc5389420f069b69343f5d9 Author: Thomas Weißschuh Date: Wed Aug 18 18:44:35 2021 +0200 platform/x86: gigabyte-wmi: add support for B450M S2H V2 Reported as working here: https://github.com/t-8ch/linux-gigabyte-wmi-driver/issues/1#issuecomment-901207693 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210818164435.99821-1-linux@weissschuh.net Signed-off-by: Hans de Goede commit 5571ea3117ca22849072adb58074fb5a2fd12c00 Author: Hans de Goede Date: Mon Aug 16 17:46:32 2021 +0200 usb: typec: tcpm: Fix VDMs sometimes not being forwarded to alt-mode drivers Commit a20dcf53ea98 ("usb: typec: tcpm: Respond Not_Supported if no snk_vdo"), stops tcpm_pd_data_request() calling tcpm_handle_vdm_request() when port->nr_snk_vdo is not set. But the VDM might be intended for an altmode-driver, in which case nr_snk_vdo does not matter. This change breaks the forwarding of connector hotplug (HPD) events for displayport altmode on devices which don't set nr_snk_vdo. tcpm_pd_data_request() is the only caller of tcpm_handle_vdm_request(), so we can move the nr_snk_vdo check to inside it, at which point we have already looked up the altmode device so we can check for this too. Doing this check here also ensures that vdm_state gets set to VDM_STATE_DONE if it was VDM_STATE_BUSY, even if we end up with responding with PD_MSG_CTRL_NOT_SUPP later. Note that tcpm_handle_vdm_request() was already sending PD_MSG_CTRL_NOT_SUPP in some circumstances, after moving the nr_snk_vdo check the same error-path is now taken when that check fails. So that we have only one error-path for this and not two. Replace the tcpm_queue_message(PD_MSG_CTRL_NOT_SUPP) used by the existing error-path with the more robust tcpm_pd_handle_msg() from the (now removed) second error-path. Fixes: a20dcf53ea98 ("usb: typec: tcpm: Respond Not_Supported if no snk_vdo") Cc: stable Cc: Kyle Tso Acked-by: Heikki Krogerus Acked-by: Kyle Tso Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210816154632.381968-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3f78c90f9eb2e228f44ecc8f4377753f0e11dbab Author: Nathan Chancellor Date: Mon Aug 16 11:57:11 2021 -0700 powerpc/xive: Do not mark xive_request_ipi() as __init Compiling ppc64le_defconfig with clang-14 shows a modpost warning: WARNING: modpost: vmlinux.o(.text+0xa74e0): Section mismatch in reference from the function xive_setup_cpu_ipi() to the function .init.text:xive_request_ipi() The function xive_setup_cpu_ipi() references the function __init xive_request_ipi(). This is often because xive_setup_cpu_ipi lacks a __init annotation or the annotation of xive_request_ipi is wrong. xive_request_ipi() is called from xive_setup_cpu_ipi(), which is not __init, so xive_request_ipi() should not be marked __init. Remove the attribute so there is no more warning. Fixes: cbc06f051c52 ("powerpc/xive: Do not skip CPU-less nodes when creating the IPIs") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210816185711.21563-1-nathan@kernel.org commit e3e86f41385b2b5d5f771de6009748b584334366 Author: Jani Nikula Date: Mon Aug 16 10:17:37 2021 +0300 drm/i915/dp: remove superfluous EXPORT_SYMBOL() The symbol isn't needed outside of i915.ko. Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode link training") Fixes: 264613b406eb ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4") Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210816071737.2917-1-jani.nikula@intel.com (cherry picked from commit d8959fb33890ba1956c142e83398e89812450ffc) Signed-off-by: Rodrigo Vivi commit baa2152dae0496e230545051395a83ac434744bd Author: Jani Nikula Date: Thu Aug 12 16:23:54 2021 +0300 drm/i915/edp: fix eDP MSO pipe sanity checks for ADL-P ADL-P supports stream splitter on pipe B in addition to pipe A. Update the sanity check in intel_ddi_mso_get_config() to reflect this, and remove the check in intel_ddi_mso_configure() as redundant with encoder->pipe_mask. Abstract the splitter pipe mask to a single point of truth while at it to avoid similar mistakes in the future. Fixes: 7bc188cc2c8c ("drm/i915/adl_p: enable MSO on pipe B") Cc: Uma Shankar Cc: Ville Syrjälä Cc: Swati Sharma Reviewed-by: Swati Sharma Tested-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210812132354.10885-1-jani.nikula@intel.com (cherry picked from commit f6864b27d6d324771d979694de7ca455afbad32a) Signed-off-by: Rodrigo Vivi commit b8441b288d6031eac21390891ba36487b2cb398b Author: Anshuman Gupta Date: Tue Aug 10 17:01:12 2021 +0530 drm/i915: Tweaked Wa_14010685332 for all PCHs dispcnlunit1_cp_xosc_clkreq clock observed to be active on TGL-H platform despite Wa_14010685332 original sequence, thus blocks entry to deeper s0ix state. The Tweaked Wa_14010685332 sequence fixes this issue, therefore use tweaked Wa_14010685332 sequence for every PCH since PCH_CNP. v2: - removed RKL from comment and simplified condition. [Rodrigo] Fixes: b896898c7369 ("drm/i915: Tweaked Wa_14010685332 for PCHs used on gen11 platforms") Cc: Matt Roper Cc: Rodrigo Vivi Cc: Imre Deak Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210810113112.31739-2-anshuman.gupta@intel.com (cherry picked from commit 8b46cc6577f4bbef7e5909bb926da31d705f350f) Signed-off-by: Rodrigo Vivi commit 8798d36411196da86e70b994725349c16c1119f6 Author: Liu Yi L Date: Tue Aug 17 20:43:21 2021 +0800 iommu/vt-d: Fix incomplete cache flush in intel_pasid_tear_down_entry() This fixes improper iotlb invalidation in intel_pasid_tear_down_entry(). When a PASID was used as nested mode, released and reused, the following error message will appear: [ 180.187556] Unexpected page request in Privilege Mode [ 180.187565] Unexpected page request in Privilege Mode [ 180.279933] Unexpected page request in Privilege Mode [ 180.279937] Unexpected page request in Privilege Mode Per chapter 6.5.3.3 of VT-d spec 3.3, when tear down a pasid entry, the software should use Domain selective IOTLB flush if the PGTT of the pasid entry is SL only or Nested, while for the pasid entries whose PGTT is FL only or PT using PASID-based IOTLB flush is enough. Fixes: 2cd1311a26673 ("iommu/vt-d: Add set domain DOMAIN_ATTR_NESTING attr") Signed-off-by: Kumar Sanjay K Signed-off-by: Liu Yi L Tested-by: Yi Sun Link: https://lore.kernel.org/r/20210817042425.1784279-1-yi.l.liu@intel.com Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210817124321.1517985-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 62ef907a045e1a81830941c48004d7af71c9d75a Author: Fenghua Yu Date: Tue Aug 17 20:43:20 2021 +0800 iommu/vt-d: Fix PASID reference leak A PASID reference is increased whenever a device is bound to an mm (and its PASID) successfully (i.e. the device's sdev user count is increased). But the reference is not dropped every time the device is unbound successfully from the mm (i.e. the device's sdev user count is decreased). The reference is dropped only once by calling intel_svm_free_pasid() when there isn't any device bound to the mm. intel_svm_free_pasid() drops the reference and only frees the PASID on zero reference. Fix the issue by dropping the PASID reference and freeing the PASID when no reference on successful unbinding the device by calling intel_svm_free_pasid() . Fixes: 4048377414162 ("iommu/vt-d: Use iommu_sva_alloc(free)_pasid() helpers") Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20210813181345.1870742-1-fenghua.yu@intel.com Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210817124321.1517985-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit a786e3195d6af183033e86f0518ffd2c51c0e8ac Author: Pavel Skripkin Date: Tue Aug 17 19:37:23 2021 +0300 net: asix: fix uninit value bugs Syzbot reported uninit-value in asix_mdio_read(). The problem was in missing error handling. asix_read_cmd() should initialize passed stack variable smsr, but it can fail in some cases. Then while condidition checks possibly uninit smsr variable. Since smsr is uninitialized stack variable, driver can misbehave, because smsr will be random in case of asix_read_cmd() failure. Fix it by adding error handling and just continue the loop instead of checking uninit value. Added helper function for checking Host_En bit, since wrong loop was used in 4 functions and there is no need in copy-pasting code parts. Cc: Robert Foss Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter") Reported-by: syzbot+a631ec9e717fb0423053@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 01634047bf0d5c2d9b7d8095bb4de1663dbeedeb Author: kaixi.fan Date: Wed Aug 18 10:22:15 2021 +0800 ovs: clear skb->tstamp in forwarding path fq qdisc requires tstamp to be cleared in the forwarding path. Now ovs doesn't clear skb->tstamp. We encountered a problem with linux version 5.4.56 and ovs version 2.14.1, and packets failed to dequeue from qdisc when fq qdisc was attached to ovs port. Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Signed-off-by: kaixi.fan Signed-off-by: xiexiaohui Reviewed-by: Cong Wang Signed-off-by: David S. Miller commit 97712f8f912fb7f2e305468047421bcac0f6653c Merge: ed5d2937a6a8f 7bd0cef5dac68 Author: David S. Miller Date: Wed Aug 18 10:48:52 2021 +0100 Merge branch 'mdio-fixes' Saravana Kannan says: ==================== Clean up and fix error handling in mdio_mux_init() This patch series was started due to -EPROBE_DEFER not being handled correctly in mdio_mux_init() and causing issues [1]. While at it, I also did some more error handling fixes and clean ups. The -EPROBE_DEFER fix is the last patch. Ideally, in the last patch we'd treat any error similar to -EPROBE_DEFER but I'm not sure if it'll break any board/platforms where some child mdiobus never successfully registers. If we treated all errors similar to -EPROBE_DEFER, then none of the child mdiobus will work and that might be a regression. If people are sure this is not a real case, then I can fix up the last patch to always fail the entire mdio-mux init if any of the child mdiobus registration fails. ==================== Signed-off-by: David S. Miller commit 7bd0cef5dac685f09ef8b0b2a7748ff42d284dc7 Author: Saravana Kannan Date: Tue Aug 17 20:38:03 2021 -0700 net: mdio-mux: Handle -EPROBE_DEFER correctly When registering mdiobus children, if we get an -EPROBE_DEFER, we shouldn't ignore it and continue registering the rest of the mdiobus children. This would permanently prevent the deferring child mdiobus from working instead of reattempting it in the future. So, if a child mdiobus needs to be reattempted in the future, defer the entire mdio-mux initialization. This fixes the issue where PHYs sitting under the mdio-mux aren't initialized correctly if the PHY's interrupt controller is not yet ready when the mdio-mux is being probed. Additional context in the link below. Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.") Link: https://lore.kernel.org/lkml/CAGETcx95kHrv8wA-O+-JtfH7H9biJEGJtijuPVN0V5dUKUAB3A@mail.gmail.com/#t Signed-off-by: Saravana Kannan Reviewed-by: Andrew Lunn Acked-by: Marc Zyngier Tested-by: Marc Zyngier Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: David S. Miller commit 99d81e942474cc7677d12f673f42a7ea699e2589 Author: Saravana Kannan Date: Tue Aug 17 20:38:02 2021 -0700 net: mdio-mux: Don't ignore memory allocation errors If we are seeing memory allocation errors, don't try to continue registering child mdiobus devices. It's unlikely they'll succeed. Fixes: 342fa1964439 ("mdio: mux: make child bus walking more permissive and errors more verbose") Signed-off-by: Saravana Kannan Reviewed-by: Andrew Lunn Acked-by: Marc Zyngier Tested-by: Marc Zyngier Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: David S. Miller commit 663d946af5fb2fde0c0498f11fb295e9e8db979f Author: Saravana Kannan Date: Tue Aug 17 20:38:01 2021 -0700 net: mdio-mux: Delete unnecessary devm_kfree The whole point of devm_* APIs is that you don't have to undo them if you are returning an error that's going to get propagated out of a probe() function. So delete unnecessary devm_kfree() call in the error return path. Fixes: b60161668199 ("mdio: mux: Correct mdio_mux_init error path issues") Signed-off-by: Saravana Kannan Reviewed-by: Andrew Lunn Acked-by: Marc Zyngier Tested-by: Marc Zyngier Acked-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: David S. Miller commit ed5d2937a6a8f12e7f815748f991990e79ac4cd1 Author: Vladimir Oltean Date: Tue Aug 17 17:52:45 2021 +0300 net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse It seems that of_find_compatible_node has a weird calling convention in which it calls of_node_put() on the "from" node argument, instead of leaving that up to the caller. This comes from the fact that of_find_compatible_node with a non-NULL "from" argument it only supposed to be used as the iterator function of for_each_compatible_node(). OF iterator functions call of_node_get on the next OF node and of_node_put() on the previous one. When of_find_compatible_node calls of_node_put, it actually never expects the refcount to drop to zero, because the call is done under the atomic devtree_lock context, and when the refcount drops to zero it triggers a kobject and a sysfs file deletion, which assume blocking context. So any driver call to of_find_compatible_node is probably buggy because an unexpected of_node_put() takes place. What should be done is to use the of_get_compatible_child() function. Fixes: 5a8f09748ee7 ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX") Link: https://lore.kernel.org/netdev/20210814010139.kzryimmp4rizlznt@skbuf/ Suggested-by: Frank Rowand Suggested-by: Rob Herring Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 86b9bbd332d0510679c7fedcee3e3bd278be5756 Author: Toke Høiland-Jørgensen Date: Mon Aug 16 13:59:17 2021 +0200 sch_cake: fix srchost/dsthost hashing mode When adding support for using the skb->hash value as the flow hash in CAKE, I accidentally introduced a logic error that broke the host-only isolation modes of CAKE (srchost and dsthost keywords). Specifically, the flow_hash variable should stay initialised to 0 in cake_hash() in pure host-based hashing mode. Add a check for this before using the skb->hash value as flow_hash. Fixes: b0c19ed6088a ("sch_cake: Take advantage of skb->hash where appropriate") Reported-by: Pete Heist Tested-by: Pete Heist Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 59f216cf04d973b4316761cbf3e7cb9556715b7a Author: Ben Skeggs Date: Thu Mar 4 19:53:01 2021 +1000 drm/nouveau: rip out nvkm_client.super No longer required now that userspace can't touch anything that might need it, and should fix DRM MM operations racing with each other, and the random hangs/crashes that come with that. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 148a8653789c01f159764ffcc3f370008966b42f Author: Ben Skeggs Date: Thu Mar 4 19:16:18 2021 +1000 drm/nouveau: block a bunch of classes from userspace Long ago, there had been plans for making use of a bunch of these APIs from userspace and there's various checks in place to stop misbehaving. Countless other projects have occurred in the meantime, and the pieces didn't finish falling into place for that to happen. They will (hopefully) in the not-too-distant future, but it won't look quite as insane. The super checks are causing problems right now, and are going to be removed. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 50c4a644910fbe6b965683b3c99f823b59bde1b9 Author: Ben Skeggs Date: Thu Mar 4 18:52:52 2021 +1000 drm/nouveau/fifo/nv50-: rip out dma channels I honestly don't even know why... These have never been used. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit e78b1b545c6cfe9f87fc577128e00026fff230ba Author: Ben Skeggs Date: Tue Aug 10 19:29:57 2021 +1000 drm/nouveau/kms/nv50: workaround EFI GOP window channel format differences Should fix some initial modeset failures on (at least) Ampere boards. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 6eaa1f3c59a707332e921e32782ffcad49915c5e Author: Ben Skeggs Date: Mon Aug 9 16:40:48 2021 +1000 drm/nouveau/disp: power down unused DP links during init When booted with multiple displays attached, the EFI GOP driver on (at least) Ampere, can leave DP links powered up that aren't being used to display anything. This confuses our tracking of SOR routing, with the likely result being a failed modeset and display engine hang. Fix this by (ab?)using the DisableLT IED script to power-down the link, restoring HW to a state the driver expects. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fa25f28ef2cef19bc9ffeb827b8ecbf48af7f892 Author: Ben Skeggs Date: Tue Aug 10 20:29:24 2021 +1000 drm/nouveau: recognise GA107 Still no GA106 as I don't have HW to verif. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2a671f77ee49f3e78997b77fdee139467ff6a598 Author: Niklas Schnelle Date: Fri Aug 6 12:11:16 2021 +0200 s390/pci: fix use after free of zpci_dev The struct pci_dev uses reference counting but zPCI assumed erroneously that the last reference would always be the local reference after calling pci_stop_and_remove_bus_device(). This is usually the case but not how reference counting works and thus inherently fragile. In fact one case where this causes a NULL pointer dereference when on an SRIOV device the function 0 was hot unplugged before another function of the same multi-function device. In this case the second function's pdev->sriov->dev reference keeps the struct pci_dev of function 0 alive even after the unplug. This bug was previously hidden by the fact that we were leaking the struct pci_dev which in turn means that it always outlived the struct zpci_dev. This was fixed in commit 0b13525c20fe ("s390/pci: fix leak of PCI device structure") exposing the broken behavior. Fix this by accounting for the long living reference a struct pci_dev has to its underlying struct zpci_dev via the zbus->function[] array and only release that in pcibios_release_device() ensuring that the struct pci_dev is not left with a dangling reference. This is a minimal fix in the future it would probably better to use fine grained reference counting for struct zpci_dev. Fixes: 05bc1be6db4b2 ("s390/pci: create zPCI bus") Cc: stable@vger.kernel.org Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit b9570f5c9240cadf87fb5f9313e8f425aa9e788f Author: Thomas Weißschuh Date: Tue Aug 17 17:46:28 2021 +0200 platform/x86: gigabyte-wmi: add support for X570 GAMING X Reported as working here: https://github.com/t-8ch/linux-gigabyte-wmi-driver/issues/1#issuecomment-900263115 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210817154628.84992-1-linux@weissschuh.net Signed-off-by: Hans de Goede commit a9ed27a764156929efe714033edb3e9023c5f321 Author: Ming Lei Date: Wed Aug 18 09:09:25 2021 +0800 blk-mq: fix is_flush_rq is_flush_rq() is called from bt_iter()/bt_tags_iter(), and runs the following check: hctx->fq->flush_rq == req but the passed hctx from bt_iter()/bt_tags_iter() may be NULL because: 1) memory re-order in blk_mq_rq_ctx_init(): rq->mq_hctx = data->hctx; ... refcount_set(&rq->ref, 1); OR 2) tag re-use and ->rqs[] isn't updated with new request. Fix the issue by re-writing is_flush_rq() as: return rq->end_io == flush_end_io; which turns out simpler to follow and immune to data race since we have ordered WRITE rq->end_io and refcount_set(&rq->ref, 1). Fixes: 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter") Cc: "Blank-Burian, Markus, Dr." Cc: Yufen Yu Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210818010925.607383-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 1b80fec7b043552e01609bae7d0aad07aa742adc Author: Wang Hai Date: Tue Aug 17 13:37:36 2021 -0700 ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path In ixgbe_xsk_pool_enable(), if ixgbe_xsk_wakeup() fails, We should restore the previous state and clean up the resources. Add the missing clear af_xdp_zc_qps and unmap dma to fix this bug. Fixes: d49e286d354e ("ixgbe: add tracking of AF_XDP zero-copy state for each queue pair") Fixes: 4a9b32f30f80 ("ixgbe: fix potential RX buffer starvation for AF_XDP") Signed-off-by: Wang Hai Acked-by: Magnus Karlsson Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20210817203736.3529939-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e5e487a2ec8afa207b4e6d53a19c9ab3bf596683 Merge: 0a298d133893c abf3d98dee7c4 Author: Jakub Kicinski Date: Tue Aug 17 15:08:13 2021 -0700 Merge tag 'wireless-drivers-2021-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.14 First set of fixes for v5.14 and nothing major this time. New devices for iwlwifi and one fix for a compiler warning. iwlwifi * support for new devices mt76 * fix compiler warning about MT_CIPHER_NONE * tag 'wireless-drivers-2021-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers: mt76: fix enum type mismatch iwlwifi: add new so-jf devices iwlwifi: add new SoF with JF devices iwlwifi: pnvm: accept multiple HW-type TLVs ==================== Link: https://lore.kernel.org/r/20210817171027.EC1E6C43460@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 9cb0073b302a6b8a8c1015ff31b2b3ab4900f866 Author: Pavel Begunkov Date: Tue Aug 17 22:36:44 2021 +0100 io_uring: pin ctx on fallback execution Pin ring in io_fallback_req_func() by briefly elevating ctx->refs in case any task_work handler touches ctx after releasing a request. Fixes: 9011bf9a13e3b ("io_uring: fix stuck fallback reqs") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/833a494713d235ec144284a9bbfe418df4f6b61c.1629235576.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 614cb2751d3150850d459bee596c397f344a7936 Merge: 794c7931a2428 6c34df6f350df Author: Linus Torvalds Date: Tue Aug 17 09:47:18 2021 -1000 Merge tag 'trace-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Limit the shooting in the foot of tp_printk The "tp_printk" option redirects the trace event output to printk at boot up. This is useful when a machine crashes before boot where the trace events can not be retrieved by the in kernel ring buffer. But it can be "dangerous" because trace events can be located in high frequency locations such as interrupts and the scheduler, where a printk can slow it down that it live locks the machine (because by the time the printk finishes, the next event is triggered). Thus tp_printk must be used with care. It was discovered that the filter logic to trace events does not apply to the tp_printk events. This can cause a surprise and live lock when the user expects it to be filtered to limit the amount of events printed to the console when in fact it still prints everything" * tag 'trace-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Apply trace filters on all output channels commit a87a10961a744fd196570021ab244d8c6298ec31 Merge: 7c60610d47676 484f2b7c61b9a Author: Rafael J. Wysocki Date: Tue Aug 17 20:52:07 2021 +0200 Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq fixes for v5.14 from Viresh Kumar: "This contains: - Addition of SoCs to blocklist for cpufreq-dt driver (Bjorn Andersson and Thara Gopinath). - Fix error path for scmi driver (Lukasz Luba). - Temporarily disable highest frequency for armada, its unsafe and breaks stuff." * 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant cpufreq: blocklist Qualcomm sm8150 in cpufreq-dt-platdev cpufreq: arm_scmi: Fix error path when allocation failed cpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev commit fa0b1ef5f7a694f48e00804a391245f3471aa155 Author: Mark Yacoub Date: Thu Aug 12 15:49:17 2021 -0400 drm: Copy drm_wait_vblank to user before returning [Why] Userspace should get back a copy of drm_wait_vblank that's been modified even when drm_wait_vblank_ioctl returns a failure. Rationale: drm_wait_vblank_ioctl modifies the request and expects the user to read it back. When the type is RELATIVE, it modifies it to ABSOLUTE and updates the sequence to become current_vblank_count + sequence (which was RELATIVE), but now it became ABSOLUTE. drmWaitVBlank (in libdrm) expects this to be the case as it modifies the request to be Absolute so it expects the sequence to would have been updated. The change is in compat_drm_wait_vblank, which is called by drm_compat_ioctl. This change of copying the data back regardless of the return number makes it en par with drm_ioctl, which always copies the data before returning. [How] Return from the function after everything has been copied to user. Fixes IGT:kms_flip::modeset-vs-vblank-race-interruptible Tested on ChromeOS Trogdor(msm) Reviewed-by: Michel Dänzer Signed-off-by: Mark Yacoub Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210812194917.1703356-1-markyacoub@chromium.org commit 0a298d133893c72c96e2156ed7cb0f0c4a306a3e Author: Dinghao Liu Date: Mon Aug 16 21:14:04 2021 +0800 net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32 qlcnic_83xx_unlock_flash() is called on all paths after we call qlcnic_83xx_lock_flash(), except for one error path on failure of QLCRD32(), which may cause a deadlock. This bug is suggested by a static analysis tool, please advise. Fixes: 81d0aeb0a4fff ("qlcnic: flash template based firmware reset recovery") Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20210816131405.24024-1-dinghao.liu@zju.edu.cn Signed-off-by: Jakub Kicinski commit c2da19ed50554ce52ecbad3655c98371fe58599f Author: Ming Lei Date: Wed Aug 11 22:26:24 2021 +0800 blk-mq: fix kernel panic during iterating over flush request For fixing use-after-free during iterating over requests, we grabbed request's refcount before calling ->fn in commit 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter"). Turns out this way may cause kernel panic when iterating over one flush request: 1) old flush request's tag is just released, and this tag is reused by one new request, but ->rqs[] isn't updated yet 2) the flush request can be re-used for submitting one new flush command, so blk_rq_init() is called at the same time 3) meantime blk_mq_queue_tag_busy_iter() is called, and old flush request is retrieved from ->rqs[tag]; when blk_mq_put_rq_ref() is called, flush_rq->end_io may not be updated yet, so NULL pointer dereference is triggered in blk_mq_put_rq_ref(). Fix the issue by calling refcount_set(&flush_rq->ref, 1) after flush_rq->end_io is set. So far the only other caller of blk_rq_init() is scsi_ioctl_reset() in which the request doesn't enter block IO stack and the request reference count isn't used, so the change is safe. Fixes: 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter") Reported-by: "Blank-Burian, Markus, Dr." Tested-by: "Blank-Burian, Markus, Dr." Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20210811142624.618598-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit c797b40ccc340b8a66f7a7842aecc90bf749f087 Author: Ming Lei Date: Wed Aug 11 23:52:02 2021 +0800 blk-mq: don't grab rq's refcount in blk_mq_check_expired() Inside blk_mq_queue_tag_busy_iter() we already grabbed request's refcount before calling ->fn(), so needn't to grab it one more time in blk_mq_check_expired(). Meantime remove extra request expire check in blk_mq_check_expired(). Cc: Keith Busch Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Link: https://lore.kernel.org/r/20210811155202.629575-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 276e189f8e4e3cce1634d6bac4ed0d9ca242441b Author: Johannes Berg Date: Tue Aug 17 12:12:22 2021 +0200 mac80211: fix locking in ieee80211_restart_work() Ilan's change to move locking around accidentally lost the wiphy_lock() during some porting, add it back. Fixes: 45daaa131841 ("mac80211: Properly WARN on HW scan before restart") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20210817121210.47bdb177064f.Ib1ef79440cd27f318c028ddfc0c642406917f512@changeid Signed-off-by: Jakub Kicinski commit dbcf24d153884439dad30484a0e3f02350692e4c Author: Jason Wang Date: Tue Aug 17 16:06:59 2021 +0800 virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO Commit a02e8964eaf92 ("virtio-net: ethtool configurable LRO") maps LRO to virtio guest offloading features and allows the administrator to enable and disable those features via ethtool. This leads to several issues: - For a device that doesn't support control guest offloads, the "LRO" can't be disabled triggering WARN in dev_disable_lro() when turning off LRO or when enabling forwarding bridging etc. - For a device that supports control guest offloads, the guest offloads are disabled in cases of bridging, forwarding etc slowing down the traffic. Fix this by using NETIF_F_GRO_HW instead. Though the spec does not guarantee packets to be re-segmented as the original ones, we can add that to the spec, possibly with a flag for devices to differentiate between GRO and LRO. Further, we never advertised LRO historically before a02e8964eaf92 ("virtio-net: ethtool configurable LRO") and so bridged/forwarded configs effectively always relied on virtio receive offloads behaving like GRO - thus even if this breaks any configs it is at least not a regression. Fixes: a02e8964eaf92 ("virtio-net: ethtool configurable LRO") Acked-by: Michael S. Tsirkin Reported-by: Ivan Tested-by: Ivan Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 4bf61ad5f0204b67ba570da6e5c052c2095e29df Author: Takashi Iwai Date: Tue Aug 17 07:24:32 2021 +0200 ALSA: hda/via: Apply runtime PM workaround for ASUS B23E ASUS B23E requires the same workaround like other machines with VT1802, otherwise it looses the codec power on a few nodes and the sound kept silence. Fixes: a0645daf1610 ("ALSA: HDA: Early Forbid of runtime PM") Link: https://lore.kernel.org/r/ac2232f142efcd67fe6ac38897f704f7176bd200.camel@gmail.com Cc: Link: https://lore.kernel.org/r/20210817052432.14751-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0165c4e19f6ec76b535de090e4bd145c73810c51 Author: Imre Deak Date: Mon Aug 16 20:42:59 2021 +0300 ALSA: hda: Fix hang during shutdown due to link reset During system shutdown codecs may be still active, and resetting the controller->codec HW link in this state - based on the bug reporter's tests - leads to the shutdown sequence to get stuck. This happens at least on the reporter's KBL system with an ALC662 codec. For now fix the issue by skipping the link reset step. Fixes: 472e18f63c42 ("ALSA: hda: Release controller display power during shutdown/reboot") References: https://bugzilla.kernel.org/show_bug.cgi?id=214045 References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618#note_1024665 Reported-and-tested-by: youling257@gmail.com Cc: youling257@gmail.com Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20210816174259.2759103-1-imre.deak@intel.com Signed-off-by: Takashi Iwai commit 794c7931a2428a656551f2179e6a093233a6e0aa Merge: a2824f19e6065 5261cdf457ce3 Author: Linus Torvalds Date: Mon Aug 16 15:42:09 2021 -1000 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This contains a fix for a potential boot failure due to a missing Kconfig dependency for people upgrading with the DRBG enabled" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: drbg - select SHA512 commit 09e856d54bda5f288ef8437a90ab2b9b3eab83d1 Author: Lahav Schlesinger Date: Sun Aug 15 12:00:02 2021 +0000 vrf: Reset skb conntrack connection on VRF rcv To fix the "reverse-NAT" for replies. When a packet is sent over a VRF, the POST_ROUTING hooks are called twice: Once from the VRF interface, and once from the "actual" interface the packet will be sent from: 1) First SNAT: l3mdev_l3_out() -> vrf_l3_out() -> .. -> vrf_output_direct() This causes the POST_ROUTING hooks to run. 2) Second SNAT: 'ip_output()' calls POST_ROUTING hooks again. Similarly for replies, first ip_rcv() calls PRE_ROUTING hooks, and second vrf_l3_rcv() calls them again. As an example, consider the following SNAT rule: > iptables -t nat -A POSTROUTING -p udp -m udp --dport 53 -j SNAT --to-source 2.2.2.2 -o vrf_1 In this case sending over a VRF will create 2 conntrack entries. The first is from the VRF interface, which performs the IP SNAT. The second will run the SNAT, but since the "expected reply" will remain the same, conntrack randomizes the source port of the packet: e..g With a socket bound to 1.1.1.1:10000, sending to 3.3.3.3:53, the conntrack rules are: udp 17 29 src=2.2.2.2 dst=3.3.3.3 sport=10000 dport=53 packets=1 bytes=68 [UNREPLIED] src=3.3.3.3 dst=2.2.2.2 sport=53 dport=61033 packets=0 bytes=0 mark=0 use=1 udp 17 29 src=1.1.1.1 dst=3.3.3.3 sport=10000 dport=53 packets=1 bytes=68 [UNREPLIED] src=3.3.3.3 dst=2.2.2.2 sport=53 dport=10000 packets=0 bytes=0 mark=0 use=1 i.e. First SNAT IP from 1.1.1.1 --> 2.2.2.2, and second the src port is SNAT-ed from 10000 --> 61033. But when a reply is sent (3.3.3.3:53 -> 2.2.2.2:61033) only the later conntrack entry is matched: udp 17 29 src=2.2.2.2 dst=3.3.3.3 sport=10000 dport=53 packets=1 bytes=68 src=3.3.3.3 dst=2.2.2.2 sport=53 dport=61033 packets=1 bytes=49 mark=0 use=1 udp 17 28 src=1.1.1.1 dst=3.3.3.3 sport=10000 dport=53 packets=1 bytes=68 [UNREPLIED] src=3.3.3.3 dst=2.2.2.2 sport=53 dport=10000 packets=0 bytes=0 mark=0 use=1 And a "port 61033 unreachable" ICMP packet is sent back. The issue is that when PRE_ROUTING hooks are called from vrf_l3_rcv(), the skb already has a conntrack flow attached to it, which means nf_conntrack_in() will not resolve the flow again. This means only the dest port is "reverse-NATed" (61033 -> 10000) but the dest IP remains 2.2.2.2, and since the socket is bound to 1.1.1.1 it's not received. This can be verified by logging the 4-tuple of the packet in '__udp4_lib_rcv()'. The fix is then to reset the flow when skb is received on a VRF, to let conntrack resolve the flow again (which now will hit the earlier flow). To reproduce: (Without the fix "Got pkt_to_nat_port" will not be printed by running 'bash ./repro'): $ cat run_in_A1.py import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * import argparse def get_packet_to_send(udp_dst_port, msg_name): return Ether(src='11:22:33:44:55:66', dst=iface_mac)/ \ IP(src='3.3.3.3', dst='2.2.2.2')/ \ UDP(sport=53, dport=udp_dst_port)/ \ Raw(f'{msg_name}\x0012345678901234567890') parser = argparse.ArgumentParser() parser.add_argument('-iface_mac', dest="iface_mac", type=str, required=True, help="From run_in_A3.py") parser.add_argument('-socket_port', dest="socket_port", type=str, required=True, help="From run_in_A3.py") parser.add_argument('-v1_mac', dest="v1_mac", type=str, required=True, help="From script") args, _ = parser.parse_known_args() iface_mac = args.iface_mac socket_port = int(args.socket_port) v1_mac = args.v1_mac print(f'Source port before NAT: {socket_port}') while True: pkts = sniff(iface='_v0', store=True, count=1, timeout=10) if 0 == len(pkts): print('Something failed, rerun the script :(', flush=True) break pkt = pkts[0] if not pkt.haslayer('UDP'): continue pkt_sport = pkt.getlayer('UDP').sport print(f'Source port after NAT: {pkt_sport}', flush=True) pkt_to_send = get_packet_to_send(pkt_sport, 'pkt_to_nat_port') sendp(pkt_to_send, '_v0', verbose=False) # Will not be received pkt_to_send = get_packet_to_send(socket_port, 'pkt_to_socket_port') sendp(pkt_to_send, '_v0', verbose=False) break $ cat run_in_A2.py import socket import netifaces print(f"{netifaces.ifaddresses('e00000')[netifaces.AF_LINK][0]['addr']}", flush=True) s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, str('vrf_1' + '\0').encode('utf-8')) s.connect(('3.3.3.3', 53)) print(f'{s. getsockname()[1]}', flush=True) s.settimeout(5) while True: try: # Periodically send in order to keep the conntrack entry alive. s.send(b'a'*40) resp = s.recvfrom(1024) msg_name = resp[0].decode('utf-8').split('\0')[0] print(f"Got {msg_name}", flush=True) except Exception as e: pass $ cat repro.sh ip netns del A1 2> /dev/null ip netns del A2 2> /dev/null ip netns add A1 ip netns add A2 ip -n A1 link add _v0 type veth peer name _v1 netns A2 ip -n A1 link set _v0 up ip -n A2 link add e00000 type bond ip -n A2 link add lo0 type dummy ip -n A2 link add vrf_1 type vrf table 10001 ip -n A2 link set vrf_1 up ip -n A2 link set e00000 master vrf_1 ip -n A2 addr add 1.1.1.1/24 dev e00000 ip -n A2 link set e00000 up ip -n A2 link set _v1 master e00000 ip -n A2 link set _v1 up ip -n A2 link set lo0 up ip -n A2 addr add 2.2.2.2/32 dev lo0 ip -n A2 neigh add 1.1.1.10 lladdr 77:77:77:77:77:77 dev e00000 ip -n A2 route add 3.3.3.3/32 via 1.1.1.10 dev e00000 table 10001 ip netns exec A2 iptables -t nat -A POSTROUTING -p udp -m udp --dport 53 -j \ SNAT --to-source 2.2.2.2 -o vrf_1 sleep 5 ip netns exec A2 python3 run_in_A2.py > x & XPID=$! sleep 5 IFACE_MAC=`sed -n 1p x` SOCKET_PORT=`sed -n 2p x` V1_MAC=`ip -n A2 link show _v1 | sed -n 2p | awk '{print $2'}` ip netns exec A1 python3 run_in_A1.py -iface_mac ${IFACE_MAC} -socket_port \ ${SOCKET_PORT} -v1_mac ${SOCKET_PORT} sleep 5 kill -9 $XPID wait $XPID 2> /dev/null ip netns del A1 ip netns del A2 tail x -n 2 rm x set +x Fixes: 73e20b761acf ("net: vrf: Add support for PREROUTING rules on vrf device") Signed-off-by: Lahav Schlesinger Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20210815120002.2787653-1-lschlesinger@drivenets.com Signed-off-by: Jakub Kicinski commit d0dc706ab1924e2f41677741cfa26f1c9ed6ce93 Merge: df97e5f3b21c3 d77c95bf9a64d Author: Arnd Bergmann Date: Mon Aug 16 23:22:02 2021 +0200 Merge tag 'qcom-arm64-fixes-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM64 fixes for v5.14 This fixes three regressions across Angler and Bullhead, introduced by advancements in the platform definition. It then corrects the powerdown GPIOs for the speaker amps on C630 and lastly fixes a typo that assigned CPU7 in SC7280 to the wrong CPUfreq domain. * tag 'qcom-arm64-fixes-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sdm845-oneplus: fix reserved-mem arm64: dts: qcom: msm8994-angler: Disable cont_splash_mem arm64: dts: qcom: sc7280: Fixup cpufreq domain info for cpu7 arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem mapping arm64: dts: qcom: msm8992-bullhead: Remove PSCI arm64: dts: qcom: c630: fix correct powerdown pin for WSA881x Link: https://lore.kernel.org/r/20210816205030.576348-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit df97e5f3b21c3ed41385fa61cfb6e191044957ce Merge: cbfece75186d6 c1e64c0aec8cb Author: Arnd Bergmann Date: Mon Aug 16 22:41:59 2021 +0200 Merge tag 'soc-fsl-fix-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/fixes NXP/FSL SoC driver fixes for v5.14 QE interrupt controller driver - Convert it to platform_device driver to make it work with fw_devlink - Fix static analysis issue * tag 'soc-fsl-fix-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: qe: fix static checker warning soc: fsl: qe: convert QE interrupt controller to platform_device Link: https://lore.kernel.org/r/20210813222305.13663-1-leoyang.li@nxp.com Signed-off-by: Arnd Bergmann commit 71ae580f31f27cdacbabf0b798b27fa0bffeb9a1 Author: Jake Wang Date: Thu Aug 5 14:43:41 2021 -0400 drm/amd/display: Ensure DCN save after VM setup [Why] DM initializes VM context after DMCUB initialization. This results in loss of DCN_VM_CONTEXT registers after z10. [How] Notify DMCUB when VM setup is complete, and have DMCUB save init registers. v2: squash in CONFIG_DRM_AMD_DC_DCN3_1 fix Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Signed-off-by: Jake Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f924f3a1f0c70e27a5a39ebc9e294dd8489f6927 Author: Yifan Zhang Date: Tue Aug 10 11:01:05 2021 +0800 drm/amdkfd: fix random KFDSVMRangeTest.SetGetAttributesTest test failure KFDSVMRangeTest.SetGetAttributesTest randomly fails in stress test. Note: Google Test filter = KFDSVMRangeTest.* [==========] Running 18 tests from 1 test case. [----------] Global test environment set-up. [----------] 18 tests from KFDSVMRangeTest [ RUN ] KFDSVMRangeTest.BasicSystemMemTest [ OK ] KFDSVMRangeTest.BasicSystemMemTest (30 ms) [ RUN ] KFDSVMRangeTest.SetGetAttributesTest [ ] Get default atrributes /home/yifan/brahma/libhsakmt/tests/kfdtest/src/KFDSVMRangeTest.cpp:154: Failure Value of: expectedDefaultResults[i] Actual: 4294967295 Expected: outputAttributes[i].value Which is: 0 /home/yifan/brahma/libhsakmt/tests/kfdtest/src/KFDSVMRangeTest.cpp:154: Failure Value of: expectedDefaultResults[i] Actual: 4294967295 Expected: outputAttributes[i].value Which is: 0 /home/yifan/brahma/libhsakmt/tests/kfdtest/src/KFDSVMRangeTest.cpp:152: Failure Value of: expectedDefaultResults[i] Actual: 4 Expected: outputAttributes[i].type Which is: 2 [ ] Setting/Getting atrributes [ FAILED ] the root cause is that svm work queue has not finished when svm_range_get_attr is called, thus some garbage svm interval tree data make svm_range_get_attr get wrong result. Flush work queue before iterate svm interval tree. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 93c5701b00d50d192ce2247cb10d6c0b3fe25cd8 Author: Kenneth Feng Date: Fri Aug 13 14:40:18 2021 +0800 drm/amd/pm: change the workload type for some cards change the workload type for some cards as it is needed. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2fd31689f9e44af949f60ff4f8aca013e628ab81 Author: Kenneth Feng Date: Fri Aug 13 14:20:33 2021 +0800 Revert "drm/amd/pm: fix workload mismatch on vega10" This reverts commit 0979d43259e13846d86ba17e451e17fec185d240. Revert this because it does not apply to all the cards. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a2824f19e6065a0d3735acd9fe7155b104e7edf5 Merge: b88bcc7d542c3 b48027083a78b Author: Linus Torvalds Date: Mon Aug 16 06:36:01 2021 -1000 Merge tag 'mtd/fixes-for-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: "MTD core fixes: - Fix lock hierarchy in deregister_mtd_blktrans - Handle flashes without OTP gracefully - Break circular locks in register_mtd_blktrans MTD device fixes: - mchp48l640: - Fix memory leak on cmd - Silence some uninitialized variable warnings - blkdevs: - Initialize rq.limits.discard_granularity CFI fixes: - Fix crash when erasing/writing AMD cards Raw NAND fixes: - Fix of_get_nand_secure_regions(): - Add a missing check - Avoid an unwanted probe failure when a DT property is missing" * tag 'mtd/fixes-for-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: Fix probe failure due to of_get_nand_secure_regions() mtd: fix lock hierarchy in deregister_mtd_blktrans mtd: devices: mchp48l640: Fix memory leak on cmd mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards mtd: core: handle flashes without OTP gracefully mtd: mchp48l640: silence some uninitialized variable warnings mtd: break circular locks in register_mtd_blktrans mtd: rawnand: Add a check in of_get_nand_secure_regions() mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity commit b88bcc7d542c33ad3f5c042409d8ce0505cde1f8 Merge: 02a3715449a0e 5acce0bff2a04 Author: Linus Torvalds Date: Mon Aug 16 06:31:06 2021 -1000 Merge tag 'trace-v5.14-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Fixes and clean ups to tracing: - Fix header alignment when PREEMPT_RT is enabled for osnoise tracer - Inject "stop" event to see where osnoise stopped the trace - Define DYNAMIC_FTRACE_WITH_ARGS as some code had an #ifdef for it - Fix erroneous message for bootconfig cmdline parameter - Fix crash caused by not found variable in histograms" * tag 'trace-v5.14-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing / histogram: Fix NULL pointer dereference on strcmp() on NULL event name init: Suppress wrong warning for bootconfig cmdline parameter tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS trace/osnoise: Print a stop tracing message trace/timerlat: Add a header with PREEMPT_RT additional fields trace/osnoise: Add a header with PREEMPT_RT additional fields commit 4753b46e16073c3100551a61024989d50f5e4874 Author: Mario Limonciello Date: Mon Aug 9 20:40:04 2021 -0500 ACPI: PM: s2idle: Invert Microsoft UUID entry and exit It was reported by a user with a Dell m15 R5 (5800H) that the keyboard backlight was turning on when entering suspend and turning off when exiting (the opposite of how it should be). The user bisected it back to commit 5dbf50997578 ("ACPI: PM: s2idle: Add support for new Microsoft UUID"). Previous to that commit the LEDs didn't turn off at all. Confirming in the spec, these were reversed when introduced. Fix them to match the spec. BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1230#note_1021836 Fixes: 5dbf50997578 ("ACPI: PM: s2idle: Add support for new Microsoft UUID") Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit 02a3715449a0edf06a37efe3862bc7732099a220 Merge: 94e95d58997f5 c7dfa4009965a Author: Linus Torvalds Date: Mon Aug 16 06:23:26 2021 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Two nested virtualization fixes for AMD processors" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656) KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) commit 94e95d58997f5234aec02f0eba92ee215b787065 Merge: 7c60610d47676 879753c816dbb Author: Linus Torvalds Date: Mon Aug 16 06:16:25 2021 -1000 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Fixes in virtio, vhost, and vdpa drivers" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa/mlx5: Fix queue type selection logic vdpa/mlx5: Avoid destroying MR on empty iotlb tools/virtio: fix build virtio_ring: pull in spinlock header vringh: pull in spinlock header virtio-blk: Add validation for block size in config space vringh: Use wiov->used to check for read/write desc order virtio_vdpa: reject invalid vq indices vdpa: Add documentation for vdpa_alloc_device() macro vDPA/ifcvf: Fix return value check for vdpa_alloc_device() vp_vdpa: Fix return value check for vdpa_alloc_device() vdpa_sim: Fix return value check for vdpa_alloc_device() vhost: Fix the calculation in vhost_overflow() vhost-vdpa: Fix integer overflow in vhost_vdpa_process_iotlb_update() virtio_pci: Support surprise removal of virtio pci device virtio: Protect vqs list access virtio: Keep vring_del_virtqueue() mirror of VQ create virtio: Improve vq->broken access to avoid any compiler optimization commit 2bbfa0addd63fd06756b7af8bf146ae166e2abf5 Author: Aubrey Li Date: Fri Aug 6 08:46:24 2021 +0800 ACPI: PRM: Deal with table not present or no module found On the system PRMT table is not present, dmesg output: $ dmesg | grep PRM [ 1.532237] ACPI: PRMT not present [ 1.532237] PRM: found 4294967277 modules The result of acpi_table_parse_entries need to be checked and return immediately if PRMT table is not present or no PRM module found. Signed-off-by: Aubrey Li Signed-off-by: Rafael J. Wysocki commit 6c34df6f350df9579ce99d887a2b5fa14cc13b32 Author: Pingfan Liu Date: Sat Aug 14 11:45:38 2021 +0800 tracing: Apply trace filters on all output channels The event filters are not applied on all of the output, which results in the flood of printk when using tp_printk. Unfolding event_trigger_unlock_commit_regs() into trace_event_buffer_commit(), so the filters can be applied on every output. Link: https://lkml.kernel.org/r/20210814034538.8428-1-kernelfans@gmail.com Cc: stable@vger.kernel.org Fixes: 0daa2302968c1 ("tracing: Add tp_printk cmdline to have tracepoints go to printk()") Signed-off-by: Pingfan Liu Signed-off-by: Steven Rostedt (VMware) commit 0da04f884ae3e948d7e813d1fa8d320bff1bd8dc Merge: 7c60610d47676 c3ddfe66d2bb5 Author: Rafael J. Wysocki Date: Mon Aug 16 16:43:46 2021 +0200 Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework fixes for v5.14 from iresh Kumar: "This removes few WARN() statements from the OPP core." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Drop empty-table checks from _put functions opp: remove WARN when no valid OPPs remain commit c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc Author: Maxim Levitsky Date: Mon Jul 19 16:05:00 2021 +0300 KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656) If L1 disables VMLOAD/VMSAVE intercepts, and doesn't enable Virtual VMLOAD/VMSAVE (currently not supported for the nested hypervisor), then VMLOAD/VMSAVE must operate on the L1 physical memory, which is only possible by making L0 intercept these instructions. Failure to do so allowed the nested guest to run VMLOAD/VMSAVE unintercepted, and thus read/write portions of the host physical memory. Fixes: 89c8a4984fc9 ("KVM: SVM: Enable Virtual VMLOAD VMSAVE feature") Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Signed-off-by: Paolo Bonzini commit 0f923e07124df069ba68d8bb12324398f4b6b709 Author: Maxim Levitsky Date: Thu Jul 15 01:56:24 2021 +0300 KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enabled, which allowed the L2 to exploit the uninitialized and enabled AVIC to read/write the host physical memory at some offsets. Fixes: 3d6368ef580a ("KVM: SVM: Add VMRUN handler") Signed-off-by: Maxim Levitsky Signed-off-by: Paolo Bonzini commit 72fc2752f91b40312e493afe0a72e7c76ae27990 Author: Philipp Zabel Date: Mon Aug 16 15:17:28 2021 +0200 drm/imx: ipuv3-plane: fix accidental partial revert of 8 pixel alignment fix This fixes an accidental partial revert of commit 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix") during a rebase of commit fc1e985b67f9 ("drm/imx: ipuv3-plane: add color encoding and range properties"). Fixes: fc1e985b67f9 ("drm/imx: ipuv3-plane: add color encoding and range properties") Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20210816131728.30987-1-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel commit 7cca7c8096e2c8a4149405438329b5035d0744f0 Author: Krzysztof Hałasa Date: Mon Jun 7 12:49:07 2021 +0200 gpu: ipu-v3: Fix i.MX IPU-v3 offset calculations for (semi)planar U/V formats Video captured in 1400x1050 resolution (bytesperline aka stride = 1408 bytes) is invalid. Fix it. Signed-off-by: Krzysztof Halasa Link: https://lore.kernel.org/r/m3y2bmq7a4.fsf@t19.piap.pl [p.zabel@pengutronix.de: added "gpu: ipu-v3:" prefix to commit description] Signed-off-by: Philipp Zabel commit 4f3f2e3fa0431b93745b110da1c365806c5acce3 Author: Dan Carpenter Date: Mon Aug 16 14:13:33 2021 +0300 net: iosm: Prevent underflow in ipc_chnl_cfg_get() The bounds check on "index" doesn't catch negative values. Using ARRAY_SIZE() directly is more readable and more robust because it prevents negative values for "index". Fortunately we only pass valid values to ipc_chnl_cfg_get() so this patch does not affect runtime. Reported-by: Solomon Ucko Signed-off-by: Dan Carpenter Reviewed-by: M Chetan Kumar Signed-off-by: David S. Miller commit 958f44255058338f4b370d8e4100e1e7d72db0cc Author: Dan Moulding Date: Tue Aug 10 13:59:06 2021 -0600 drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails In 69de4421bb4c ("drm/ttm: Initialize debugfs from ttm_global_init()"), ttm_global_init was changed so that if creation of the debugfs global root directory fails, ttm_global_init will bail out early and return an error, leading to initialization failure of DRM drivers. However, not every system will be using debugfs. On such a system, debugfs directory creation can be expected to fail, but DRM drivers must still be usable. This changes it so that if creation of TTM's debugfs root directory fails, then no biggie: keep calm and carry on. Fixes: 69de4421bb4c ("drm/ttm: Initialize debugfs from ttm_global_init()") Signed-off-by: Dan Moulding Tested-by: Huacai Chen Reviewed-by: Huang Rui Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210810195906.22220-2-dmoulding@me.com Signed-off-by: Christian König commit 3f79f6f6247c83f448c8026c3ee16d4636ef8d4f Author: NeilBrown Date: Fri Aug 6 14:26:24 2021 +1000 btrfs: prevent rename2 from exchanging a subvol with a directory from different parents Cross-rename lacks a check when that would prevent exchanging a directory and subvolume from different parent subvolume. This causes data inconsistencies and is caught before commit by tree-checker, turning the filesystem to read-only. Calling the renameat2 with RENAME_EXCHANGE flags like renameat2(AT_FDCWD, namesrc, AT_FDCWD, namedest, (1 << 1)) on two paths: namesrc = dir1/subvol1/dir2 namedest = subvol2/subvol3 will cause key order problem with following write time tree-checker report: [1194842.307890] BTRFS critical (device loop1): corrupt leaf: root=5 block=27574272 slot=10 ino=258, invalid previous key objectid, have 257 expect 258 [1194842.322221] BTRFS info (device loop1): leaf 27574272 gen 8 total ptrs 11 free space 15444 owner 5 [1194842.331562] BTRFS info (device loop1): refs 2 lock_owner 0 current 26561 [1194842.338772] item 0 key (256 1 0) itemoff 16123 itemsize 160 [1194842.338793] inode generation 3 size 16 mode 40755 [1194842.338801] item 1 key (256 12 256) itemoff 16111 itemsize 12 [1194842.338809] item 2 key (256 84 2248503653) itemoff 16077 itemsize 34 [1194842.338817] dir oid 258 type 2 [1194842.338823] item 3 key (256 84 2363071922) itemoff 16043 itemsize 34 [1194842.338830] dir oid 257 type 2 [1194842.338836] item 4 key (256 96 2) itemoff 16009 itemsize 34 [1194842.338843] item 5 key (256 96 3) itemoff 15975 itemsize 34 [1194842.338852] item 6 key (257 1 0) itemoff 15815 itemsize 160 [1194842.338863] inode generation 6 size 8 mode 40755 [1194842.338869] item 7 key (257 12 256) itemoff 15801 itemsize 14 [1194842.338876] item 8 key (257 84 2505409169) itemoff 15767 itemsize 34 [1194842.338883] dir oid 256 type 2 [1194842.338888] item 9 key (257 96 2) itemoff 15733 itemsize 34 [1194842.338895] item 10 key (258 12 256) itemoff 15719 itemsize 14 [1194842.339163] BTRFS error (device loop1): block=27574272 write time tree block corruption detected [1194842.339245] ------------[ cut here ]------------ [1194842.443422] WARNING: CPU: 6 PID: 26561 at fs/btrfs/disk-io.c:449 csum_one_extent_buffer+0xed/0x100 [btrfs] [1194842.511863] CPU: 6 PID: 26561 Comm: kworker/u17:2 Not tainted 5.14.0-rc3-git+ #793 [1194842.511870] Hardware name: empty empty/S3993, BIOS PAQEX0-3 02/24/2008 [1194842.511876] Workqueue: btrfs-worker-high btrfs_work_helper [btrfs] [1194842.511976] RIP: 0010:csum_one_extent_buffer+0xed/0x100 [btrfs] [1194842.512068] RSP: 0018:ffffa2c284d77da0 EFLAGS: 00010282 [1194842.512074] RAX: 0000000000000000 RBX: 0000000000001000 RCX: ffff928867bd9978 [1194842.512078] RDX: 0000000000000000 RSI: 0000000000000027 RDI: ffff928867bd9970 [1194842.512081] RBP: ffff92876b958000 R08: 0000000000000001 R09: 00000000000c0003 [1194842.512085] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 [1194842.512088] R13: ffff92875f989f98 R14: 0000000000000000 R15: 0000000000000000 [1194842.512092] FS: 0000000000000000(0000) GS:ffff928867a00000(0000) knlGS:0000000000000000 [1194842.512095] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1194842.512099] CR2: 000055f5384da1f0 CR3: 0000000102fe4000 CR4: 00000000000006e0 [1194842.512103] Call Trace: [1194842.512128] ? run_one_async_free+0x10/0x10 [btrfs] [1194842.631729] btree_csum_one_bio+0x1ac/0x1d0 [btrfs] [1194842.631837] run_one_async_start+0x18/0x30 [btrfs] [1194842.631938] btrfs_work_helper+0xd5/0x1d0 [btrfs] [1194842.647482] process_one_work+0x262/0x5e0 [1194842.647520] worker_thread+0x4c/0x320 [1194842.655935] ? process_one_work+0x5e0/0x5e0 [1194842.655946] kthread+0x135/0x160 [1194842.655953] ? set_kthread_struct+0x40/0x40 [1194842.655965] ret_from_fork+0x1f/0x30 [1194842.672465] irq event stamp: 1729 [1194842.672469] hardirqs last enabled at (1735): [] console_trylock_spinning+0x185/0x1a0 [1194842.672477] hardirqs last disabled at (1740): [] console_trylock_spinning+0x15c/0x1a0 [1194842.672482] softirqs last enabled at (1666): [] __do_softirq+0x2e1/0x50a [1194842.672491] softirqs last disabled at (1651): [] __irq_exit_rcu+0xa7/0xd0 The corrupted data will not be written, and filesystem can be unmounted and mounted again (all changes since the last commit will be lost). Add the missing check for new_ino so that all non-subvolumes must reside under the same parent subvolume. There's an exception allowing to exchange two subvolumes from any parents as the directory representing a subvolume is only a logical link and does not have any other structures related to the parent subvolume, unlike files, directories etc, that are always in the inode namespace of the parent subvolume. Fixes: cdd1fedf8261 ("btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT") CC: stable@vger.kernel.org # 4.7+ Reviewed-by: Nikolay Borisov Signed-off-by: NeilBrown Reviewed-by: David Sterba Signed-off-by: David Sterba commit 517c54d282392a2c7dedc80783886d2cd1836c0d Merge: d33d19d313d34 828affc27ed43 Author: David S. Miller Date: Mon Aug 16 11:31:41 2021 +0100 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: 2 bug fixes The first one disables aRFS/NTUPLE on an older broken firmware version. The second one adds missing memory barriers related to completion ring handling. ==================== Signed-off-by: David S. Miller commit 828affc27ed43441bd1efdaf4e07e96dd43a0362 Author: Michael Chan Date: Sun Aug 15 16:15:37 2021 -0400 bnxt_en: Add missing DMA memory barriers Each completion ring entry has a valid bit to indicate that the entry contains a valid completion event. The driver's main poll loop __bnxt_poll_work() has the proper dma_rmb() to make sure the valid bit of the next entry has been checked before proceeding further. But when we call bnxt_rx_pkt() to process the RX event, the RX completion event consists of two completion entries and only the first entry has been checked to be valid. We need the same barrier after checking the next completion entry. Add missing dma_rmb() barriers in bnxt_rx_pkt() and other similar locations. Fixes: 67a95e2022c7 ("bnxt_en: Need memory barrier when processing the completion ring.") Reported-by: Lance Richardson Reviewed-by: Andy Gospodarek Reviewed-by: Lance Richardson Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 976e52b718c3de9077fff8f3f674afb159c57fb1 Author: Michael Chan Date: Sun Aug 15 16:15:36 2021 -0400 bnxt_en: Disable aRFS if running on 212 firmware 212 firmware broke aRFS, so disable it. Traffic may stop after ntuple filters are inserted and deleted by the 212 firmware. Fixes: ae10ae740ad2 ("bnxt_en: Add new hardware RFS mode.") Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d33d19d313d3466abdf8b0428be7837aff767802 Author: Shai Malin Date: Sun Aug 15 14:06:39 2021 +0300 qed: Fix null-pointer dereference in qed_rdma_create_qp() Fix a possible null-pointer dereference in qed_rdma_create_qp(). Changes from V2: - Revert checkpatch fixes. Reported-by: TOTE Robot Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Signed-off-by: David S. Miller commit 37110237f31105d679fc0aa7b11cdec867750ea7 Author: Shai Malin Date: Sun Aug 15 14:05:08 2021 +0300 qed: qed ll2 race condition fixes Avoiding qed ll2 race condition and NULL pointer dereference as part of the remove and recovery flows. Changes form V1: - Change (!p_rx->set_prod_addr). - qed_ll2.c checkpatch fixes. Change from V2: - Revert "qed_ll2.c checkpatch fixes". Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Signed-off-by: David S. Miller commit 7387a72c5f84f0dfb57618f9e4770672c0d2e4c9 Author: Xin Long Date: Sun Aug 15 03:13:36 2021 -0400 tipc: call tipc_wait_for_connect only when dlen is not 0 __tipc_sendmsg() is called to send SYN packet by either tipc_sendmsg() or tipc_connect(). The difference is in tipc_connect(), it will call tipc_wait_for_connect() after __tipc_sendmsg() to wait until connecting is done. So there's no need to wait in __tipc_sendmsg() for this case. This patch is to fix it by calling tipc_wait_for_connect() only when dlen is not 0 in __tipc_sendmsg(), which means it's called by tipc_connect(). Note this also fixes the failure in tipcutils/test/ptts/: # ./tipcTS & # ./tipcTC 9 (hang) Fixes: 36239dab6da7 ("tipc: fix implicit-connect for SYN+") Reported-by: Shuang Li Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 419dd626e357e89fc9c4e3863592c8b38cfe1571 Author: Nicolas Saenz Julienne Date: Sat Aug 7 13:06:36 2021 +0200 mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711 The controller doesn't seem to pick-up on clock changes, so set the SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency directly from the clock. Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1628334401-6577-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Ulf Hansson commit 55c8fca1dae1fb0d11deaa21b65a647dedb1bc50 Author: Andy Shevchenko Date: Fri Aug 13 20:33:27 2021 +0300 ptp_pch: Restore dependency on PCI During the swap dependency on PCH_GBE to selection PTP_1588_CLOCK_PCH incidentally dropped the implicit dependency on the PCI. Restore it. Fixes: 18d359ceb044 ("pch_gbe, ptp_pch: Fix the dependency direction between these drivers") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit c9107dd0b851777d7e134420baf13a5c5343bc16 Author: Nicolas Saenz Julienne Date: Sat Aug 7 13:06:35 2021 +0200 mmc: sdhci-iproc: Cap min clock frequency on BCM2711 There is a known bug on BCM2711's SDHCI core integration where the controller will hang when the difference between the core clock and the bus clock is too great. Specifically this can be reproduced under the following conditions: - No SD card plugged in, polling thread is running, probing cards at 100 kHz. - BCM2711's core clock configured at 500MHz or more. So set 200 kHz as the minimum clock frequency available for that board. For more information on the issue see this: https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1628334401-6577-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Ulf Hansson commit 19d1532a187669ce86d5a2696eb7275310070793 Author: Pavel Skripkin Date: Fri Aug 13 18:14:33 2021 +0300 net: 6pack: fix slab-out-of-bounds in decode_data Syzbot reported slab-out-of bounds write in decode_data(). The problem was in missing validation checks. Syzbot's reproducer generated malicious input, which caused decode_data() to be called a lot in sixpack_decode(). Since rx_count_cooked is only 400 bytes and noone reported before, that 400 bytes is not enough, let's just check if input is malicious and complain about buffer overrun. Fail log: ================================================================== BUG: KASAN: slab-out-of-bounds in drivers/net/hamradio/6pack.c:843 Write of size 1 at addr ffff888087c5544e by task kworker/u4:0/7 CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 5.6.0-rc3-syzkaller #0 ... Workqueue: events_unbound flush_to_ldisc Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_store1_noabort+0x17/0x20 mm/kasan/generic_report.c:137 decode_data.part.0+0x23b/0x270 drivers/net/hamradio/6pack.c:843 decode_data drivers/net/hamradio/6pack.c:965 [inline] sixpack_decode drivers/net/hamradio/6pack.c:968 [inline] Reported-and-tested-by: syzbot+fc8cd9a673d4577fb2e4@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Pavel Skripkin Reviewed-by: Dan Carpenter Signed-off-by: David S. Miller commit c3ddfe66d2bb511f7fbcdc8e64952c7859e7e69d Author: Dmitry Osipenko Date: Sun Aug 15 19:43:44 2021 +0300 opp: Drop empty-table checks from _put functions The current_opp is released only when whole OPP table is released, otherwise it's only marked as removed by dev_pm_opp_remove_table(). Functions like dev_pm_opp_put_clkname() and dev_pm_opp_put_supported_hw() are checking whether OPP table is empty and it's not if current_opp is set since it holds the refcount of OPP, this produces a noisy warning from these functions about busy OPP table. Remove the checks to fix it. Cc: stable@vger.kernel.org Fixes: 81c4d8a3c414 ("opp: Keep track of currently programmed OPP") Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 7c60610d476766e128cc4284bb6349732cbd6606 Author: Linus Torvalds Date: Sun Aug 15 13:40:53 2021 -1000 Linux 5.14-rc6 commit ecf93431963a95c0f475921101bedc0dd62ec96d Merge: c4f14eac22468 cbc06f051c524 Author: Linus Torvalds Date: Sun Aug 15 06:57:43 2021 -1000 Merge tag 'powerpc-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix crashes coming out of nap on 32-bit Book3s (eg. powerbooks). - Fix critical and debug interrupts on BookE, seen as crashes when using ptrace. - Fix an oops when running an SMP kernel on a UP system. - Update pseries LPAR security flavor after partition migration. - Fix an oops when using kprobes on BookE. - Fix oops on 32-bit pmac by not calling do_IRQ() from timer_interrupt(). - Fix softlockups on CPU hotplug into a CPU-less node with xive (P9). Thanks to Cédric Le Goater, Christophe Leroy, Finn Thain, Geetika Moolchandani, Laurent Dufour, Laurent Vivier, Nicholas Piggin, Pu Lehui, Radu Rendec, Srikar Dronamraju, and Stan Johnson. * tag 'powerpc-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/xive: Do not skip CPU-less nodes when creating the IPIs powerpc/interrupt: Do not call single_step_exception() from other exceptions powerpc/interrupt: Fix OOPS by not calling do_IRQ() from timer_interrupt() powerpc/kprobes: Fix kprobe Oops happens in booke powerpc/pseries: Fix update of LPAR security flavor after LPM powerpc/smp: Fix OOPS in topology_init() powerpc/32: Fix critical and debug interrupts on BOOKE powerpc/32s: Fix napping restore in data storage interrupt (DSI) commit c4f14eac22468b76476b8ee2a5d1d3555a1d8307 Merge: 839da25385294 7a3dc4f35bf8e Author: Linus Torvalds Date: Sun Aug 15 06:49:40 2021 -1000 Merge tag 'irq-urgent-2021-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A set of fixes for PCI/MSI and x86 interrupt startup: - Mask all MSI-X entries when enabling MSI-X otherwise stale unmasked entries stay around e.g. when a crashkernel is booted. - Enforce masking of a MSI-X table entry when updating it, which mandatory according to speification - Ensure that writes to MSI[-X} tables are flushed. - Prevent invalid bits being set in the MSI mask register - Properly serialize modifications to the mask cache and the mask register for multi-MSI. - Cure the violation of the affinity setting rules on X86 during interrupt startup which can cause lost and stale interrupts. Move the initial affinity setting ahead of actualy enabling the interrupt. - Ensure that MSI interrupts are completely torn down before freeing them in the error handling case. - Prevent an array out of bounds access in the irq timings code" * tag 'irq-urgent-2021-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: driver core: Add missing kernel doc for device::msi_lock genirq/msi: Ensure deactivation on teardown genirq/timings: Prevent potential array overflow in __irq_timings_store() x86/msi: Force affinity setup before startup x86/ioapic: Force affinity setup before startup genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP PCI/MSI: Protect msi_desc::masked for multi-MSI PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown() PCI/MSI: Correct misleading comments PCI/MSI: Do not set invalid bits in MSI mask PCI/MSI: Enforce MSI[X] entry updates to be visible PCI/MSI: Enforce that MSI-X table entry is masked for update PCI/MSI: Mask all unused MSI-X entries PCI/MSI: Enable and mask MSI-X early commit 839da2538529492c431e54144d53b5a9b2b572eb Merge: 12aef8acf0991 07d25971b220e Author: Linus Torvalds Date: Sun Aug 15 06:46:04 2021 -1000 Merge tag 'locking_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Borislav Petkov: - Fix a CONFIG symbol's spelling * tag 'locking_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rtmutex: Use the correct rtmutex debugging config option commit 12aef8acf0991e8a4a5fe892067e2c8fc6760ace Merge: b045b8cc86531 55203550f9afb Author: Linus Torvalds Date: Sun Aug 15 06:38:26 2021 -1000 Merge tag 'efi_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Borislav Petkov: "A batch of fixes for the arm64 stub image loader: - fix a logic bug that can make the random page allocator fail spuriously - force reallocation of the Image when it overlaps with firmware reserved memory regions - fix an oversight that defeated on optimization introduced earlier where images loaded at a suitable offset are never moved if booting without randomization - complain about images that were not loaded at the right offset by the firmware image loader" * tag 'efi_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/libstub: arm64: Double check image alignment at entry efi/libstub: arm64: Warn when efi_random_alloc() fails efi/libstub: arm64: Relax 2M alignment again for relocatable kernels efi/libstub: arm64: Force Image reallocation if BSS was not reserved arm64: efi: kaslr: Fix occasional random alloc (and boot) failure commit b045b8cc865316062e520693ad6c8bac85aabece Merge: 3e763ec7914f2 064855a69003c Author: Linus Torvalds Date: Sun Aug 15 06:30:24 2021 -1000 Merge tag 'x86_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "Two fixes: - An objdump checker fix to ignore parenthesized strings in the objdump version - Fix resctrl default monitoring groups reporting when new subgroups get created" * tag 'x86_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Fix default monitoring groups reporting x86/tools: Fix objdump version check again commit 3e763ec7914f20f55ebd9a5c087fa26e8452257e Merge: 0aa78d17099b0 6e949ddb0a633 Author: Linus Torvalds Date: Sun Aug 15 06:21:30 2021 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "ARM: - Plug race between enabling MTE and creating vcpus - Fix off-by-one bug when checking whether an address range is RAM x86: - Fixes for the new MMU, especially a memory leak on hosts with <39 physical address bits - Remove bogus EFER.NX checks on 32-bit non-PAE hosts - WAITPKG fix" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/mmu: Protect marking SPs unsync when using TDP MMU with spinlock KVM: x86/mmu: Don't step down in the TDP iterator when zapping all SPTEs KVM: x86/mmu: Don't leak non-leaf SPTEs when zapping all SPTEs KVM: nVMX: Use vmx_need_pf_intercept() when deciding if L0 wants a #PF kvm: vmx: Sync all matching EPTPs when injecting nested EPT fault KVM: x86: remove dead initialization KVM: x86: Allow guest to set EFER.NX=1 on non-PAE 32-bit kernels KVM: VMX: Use current VMCS to query WAITPKG support for MSR emulation KVM: arm64: Fix race when enabling KVM_ARM_CAP_MTE KVM: arm64: Fix off-by-one in range_is_memory commit d30836a9528906ee9d42b7cd59108f3bb4e16b01 Merge: 50f05bd114a46 f753067494c27 Author: Greg Kroah-Hartman Date: Sun Aug 15 11:21:02 2021 +0200 Merge tag 'icc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fix for v5.14 This contains a revert for a patch that has been causing issues: - Revert: qcom: rpmh: Add BCMs to commit list in pre_aggregate Signed-off-by: Georgi Djakov * tag 'icc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: Revert "interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate" commit da94692001ea45ffa1f5e9f17ecdef7aecd90c27 Author: Kristin Paget Date: Sat Aug 14 15:46:05 2021 -0700 ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9510 laptop The 2021-model XPS 15 appears to use the same 4-speakers-on-ALC289 audio setup as the Precision models, so requires the same quirk to enable woofer output. Tested on my own 9510. Signed-off-by: Kristin Paget Cc: Link: https://lore.kernel.org/r/e1fc95c5-c10a-1f98-a5c2-dd6e336157e1@tombom.co.uk Signed-off-by: Takashi Iwai commit 0aa78d17099b04fd9d36fe338af48ad6fe2d7fca Merge: 7ba34c0cba0b4 40d32727931ce Author: Linus Torvalds Date: Sat Aug 14 19:51:58 2021 -1000 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three minor fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Fix incorrectly assigned error return and check scsi: storvsc: Log TEST_UNIT_READY errors as warnings scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash commit 7ba34c0cba0b4e64ff321c9a74272eaab7b27bca Merge: 12f41321ce769 96dcb97d0a40a Author: Linus Torvalds Date: Sat Aug 14 19:46:39 2021 -1000 Merge tag 'libnvdimm-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A couple of fixes for long standing bugs, a warning fixup, and some miscellaneous dax cleanups. The bugs were recently found due to new platforms looking to use the ACPI NFIT "virtual" device definition, and new error injection capabilities to trigger error responses to label area requests. Ira's cleanups have been long pending, I neglected to send them earlier, and see no harm in including them now. This has all appeared in -next with no reported issues. Summary: - Fix support for NFIT "virtual" ranges (BIOS-defined memory disks) - Fix recovery from failed label storage areas on NVDIMM devices - Miscellaneous cleanups from Ira's investigation of dax_direct_access paths preparing for stray-write protection" * tag 'libnvdimm-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: tools/testing/nvdimm: Fix missing 'fallthrough' warning libnvdimm/region: Fix label activation vs errors ACPI: NFIT: Fix support for virtual SPA ranges dax: Ensure errno is returned from dax_direct_access fs/dax: Clarify nr_pages to dax_direct_access() fs/fuse: Remove unneeded kaddr parameter commit 12f41321ce769b10a3770f6b39e14cb5d6ee97a4 Merge: 56aee57345825 664cc971fb259 Author: Linus Torvalds Date: Sat Aug 14 19:22:33 2021 -1000 Merge tag 'usb-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fix from Greg KH: "A single revert of a commit that caused problems in 5.14-rc5 for 5.14-rc6. It has been in linux-next almost all week, and has resolved the issues that were reported on lots of different systems that were not the platform that the change was originally tested on (gotta love SoC cores used in multiple devices from multiple vendors...)" * tag 'usb-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Revert "usb: dwc3: gadget: Use list_replace_init() before traversing lists" commit 56aee57345825a720dfcda6ea99e550c3141762f Merge: 76c9e465dd529 a5056c0bc24f6 Author: Linus Torvalds Date: Sat Aug 14 19:16:30 2021 -1000 Merge tag 'staging-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO driver fixes from Greg KH: "Here are some small IIO driver fixes for reported problems for 5.14-rc6 (no staging driver fixes at the moment). All of them resolve reported issues and have been in linux-next all week with no reported problems. Full details are in the shortlog" * tag 'staging-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: adc: Fix incorrect exit of for-loop iio: humidity: hdc100x: Add margin to the conversion time dt-bindings: iio: st: Remove wrong items length check iio: accel: fxls8962af: fix i2c dependency iio: adis: set GPIO reset pin direction iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels iio: accel: fxls8962af: fix potential use of uninitialized symbol commit 76c9e465dd529cfe1e49ed975563fa0c44aa2bdc Merge: ba31f97d43be4 3f12cc4bb0a4d Author: Linus Torvalds Date: Sat Aug 14 18:59:53 2021 -1000 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "One driver bugfix, a documentation bugfix, and an "uninitialized data" leak fix for the core" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: Documentation: i2c: add i2c-sysfs into index i2c: dev: zero out array used for i2c reads from userspace i2c: iproc: fix race between client unreg and tasklet commit 21f965221e7c42609521342403e8fb91b8b3e76e Author: Jens Axboe Date: Sat Aug 14 09:04:40 2021 -0600 io_uring: only assign io_uring_enter() SQPOLL error in actual error case If an SQPOLL based ring is newly created and an application issues an io_uring_enter(2) system call on it, then we can return a spurious -EOWNERDEAD error. This happens because there's nothing to submit, and if the caller doesn't specify any other action, the initial error assignment of -EOWNERDEAD never gets overwritten. This causes us to return it directly, even if it isn't valid. Move the error assignment into the actual failure case instead. Cc: stable@vger.kernel.org Fixes: d9d05217cb69 ("io_uring: stop SQPOLL submit on creator's death") Reported-by: Sherlock Holo sherlockya@gmail.com Link: https://github.com/axboe/liburing/issues/413 Signed-off-by: Jens Axboe commit ba31f97d43be41ca99ab72a6131d7c226306865f Merge: a7a4f1c0c8455 88ca2521bd5b4 Author: Linus Torvalds Date: Sat Aug 14 06:31:22 2021 -1000 Merge tag 'for-linus-5.14-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "A small cleanup patch and a fix of a rare race in the Xen evtchn driver" * tag 'for-linus-5.14-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: Fix race in set_evtchn_to_irq xen/events: remove redundant initialization of variable irq commit a7a4f1c0c8455657b3e19eaaffbad64a5f750c43 Merge: 118516e212772 fdf3a7a1e0a67 Author: Linus Torvalds Date: Sat Aug 14 06:28:19 2021 -1000 Merge tag 'riscv-for-linus-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - avoid passing -mno-relax to compilers that don't support it - a comment fix * tag 'riscv-for-linus-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it commit 118516e2127722e46c5c029010df4e8743bc9722 Merge: dfa377c35d70c 769f52676756b Author: Linus Torvalds Date: Sat Aug 14 06:22:42 2021 -1000 Merge tag 'configfs-5.14' of git://git.infradead.org/users/hch/configfs Pull configfs fix from Christoph Hellwig: - fix to revert to the historic write behavior (Bart Van Assche) * tag 'configfs-5.14' of git://git.infradead.org/users/hch/configfs: configfs: restore the kernel v5.13 text attribute write behavior commit dfa377c35d70c31139b1274ec49f87d380996c42 Merge: 27b2eaa1180ed 854f32648b8a5 Author: Linus Torvalds Date: Fri Aug 13 15:05:23 2021 -1000 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "7 patches. Subsystems affected by this patch series: mm (kasan, mm/slub, mm/madvise, and memcg), and lib" * emailed patches from Andrew Morton : lib: use PFN_PHYS() in devmem_is_allowed() mm/memcg: fix incorrect flushing of lruvec data in obj_stock mm/madvise: report SIGBUS as -EFAULT for MADV_POPULATE_(READ|WRITE) mm: slub: fix slub_debug disabling for list of slabs slub: fix kmalloc_pagealloc_invalid_free unit test kasan, slub: reset tag when printing address kasan, kmemleak: reset tags when scanning block commit 27b2eaa1180ed0e0e3fd0c829e230b6bffd76ba5 Merge: a83ed22577740 9e992755be8f2 Author: Linus Torvalds Date: Fri Aug 13 14:44:32 2021 -1000 Merge tag '5.14-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Four CIFS/SMB3 Fixes, all for stable, two relating to deferred close, and one for the 'modefromsid' mount option (when 'idsfromsid' not specified)" * tag '5.14-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Call close synchronously during unlink/rename/lease break. cifs: Handle race conditions during rename cifs: use the correct max-length for dentry_path_raw() cifs: create sd context must be a multiple of 8 commit a83ed2257774071e2d821ec361954782a7c01f8f Merge: 020efdadd8495 567c39047dbee Author: Linus Torvalds Date: Fri Aug 13 14:32:38 2021 -1000 Merge tag 'linux-kselftest-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fix from Shuah Khan: "A single patch to sgx test to fix Q1 and Q2 calculation" * tag 'linux-kselftest-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/sgx: Fix Q1 and Q2 calculation in sigstruct.c commit 5f773519639041faed4132f5943d7895f9078a4c Author: Maciej Machnikowski Date: Fri Aug 13 09:50:18 2021 -0700 ice: Fix perout start time rounding Internal tests found out that the latest code doesn't bring up 1PPS out as expected. As a result of incorrect define used to round the time up the time was round down to the past second boundary. Fix define used for rounding to properly round up to the next Top of second in ice_ptp_cfg_clkout to fix it. Fixes: 172db5f91d5f ("ice: add support for auxiliary input/output pins") Signed-off-by: Maciej Machnikowski Tested-by: Sunitha Mekala Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20210813165018.2196013-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 854f32648b8a5e424d682953b1a9f3b7c3322701 Author: Liang Wang Date: Fri Aug 13 16:54:45 2021 -0700 lib: use PFN_PHYS() in devmem_is_allowed() The physical address may exceed 32 bits on 32-bit systems with more than 32 bits of physcial address. Use PFN_PHYS() in devmem_is_allowed(), or the physical address may overflow and be truncated. We found this bug when mapping a high addresses through devmem tool, when CONFIG_STRICT_DEVMEM is enabled on the ARM with ARM_LPAE and devmem is used to map a high address that is not in the iomem address range, an unexpected error indicating no permission is returned. This bug was initially introduced from v2.6.37, and the function was moved to lib in v5.11. Link: https://lkml.kernel.org/r/20210731025057.78825-1-wangliang101@huawei.com Fixes: 087aaffcdf9c ("ARM: implement CONFIG_STRICT_DEVMEM by disabling access to RAM via /dev/mem") Fixes: 527701eda5f1 ("lib: Add a generic version of devmem_is_allowed()") Signed-off-by: Liang Wang Reviewed-by: Luis Chamberlain Cc: Palmer Dabbelt Cc: Greg Kroah-Hartman Cc: Russell King Cc: Liang Wang Cc: Xiaoming Ni Cc: Kefeng Wang Cc: [2.6.37+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fa0dacbaf1259fd3d1dda6d602fdd084dea9c0e Author: Waiman Long Date: Fri Aug 13 16:54:41 2021 -0700 mm/memcg: fix incorrect flushing of lruvec data in obj_stock When mod_objcg_state() is called with a pgdat that is different from that in the obj_stock, the old lruvec data cached in obj_stock are flushed out. Unfortunately, they were flushed to the new pgdat and so the data go to the wrong node. This will screw up the slab data reported in /sys/devices/system/node/node*/meminfo. Fix that by flushing the data to the cached pgdat instead. Link: https://lkml.kernel.org/r/20210802143834.30578-1-longman@redhat.com Fixes: 68ac5b3c8db2 ("mm/memcg: cache vmstat data in percpu memcg_stock_pcp") Signed-off-by: Waiman Long Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Tejun Heo Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Muchun Song Cc: Alex Shi Cc: Chris Down Cc: Yafang Shao Cc: Wei Yang Cc: Masayoshi Mizuma Cc: Xing Zhengjun Cc: Matthew Wilcox Cc: Waiman Long Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb2faa513c246ed47ae34a205928ab663bc5a18f Author: David Hildenbrand Date: Fri Aug 13 16:54:37 2021 -0700 mm/madvise: report SIGBUS as -EFAULT for MADV_POPULATE_(READ|WRITE) Doing some extended tests and polishing the man page update for MADV_POPULATE_(READ|WRITE), I realized that we end up converting also SIGBUS (via -EFAULT) to -EINVAL, making it look like yet another madvise() user error. We want to report only problematic mappings and permission problems that the user could have know as -EINVAL. Let's not convert -EFAULT arising due to SIGBUS (or SIGSEGV) to -EINVAL, but instead indicate -EFAULT to user space. While we could also convert it to -ENOMEM, using -EFAULT looks more helpful when user space might want to troubleshoot what's going wrong: MADV_POPULATE_(READ|WRITE) is not part of an final Linux release and we can still adjust the behavior. Link: https://lkml.kernel.org/r/20210726154932.102880-1-david@redhat.com Fixes: 4ca9b3859dac ("mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables") Signed-off-by: David Hildenbrand Cc: Arnd Bergmann Cc: Michal Hocko Cc: Oscar Salvador Cc: Matthew Wilcox (Oracle) Cc: Andrea Arcangeli Cc: Minchan Kim Cc: Jann Horn Cc: Jason Gunthorpe Cc: Dave Hansen Cc: Hugh Dickins Cc: Rik van Riel Cc: Michael S. Tsirkin Cc: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Chris Zankel Cc: Max Filippov Cc: Mike Kravetz Cc: Peter Xu Cc: Rolf Eike Beer Cc: Ram Pai Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7f1d48585b34730765dcda09ead6edc4ac16a5c Author: Vlastimil Babka Date: Fri Aug 13 16:54:34 2021 -0700 mm: slub: fix slub_debug disabling for list of slabs Vijayanand Jitta reports: Consider the scenario where CONFIG_SLUB_DEBUG_ON is set and we would want to disable slub_debug for few slabs. Using boot parameter with slub_debug=-,slab_name syntax doesn't work as expected i.e; only disabling debugging for the specified list of slabs. Instead it disables debugging for all slabs, which is wrong. This patch fixes it by delaying the moment when the global slub_debug flags variable is updated. In case a "slub_debug=-,slab_name" has been passed, the global flags remain as initialized (depending on CONFIG_SLUB_DEBUG_ON enabled or disabled) and are not simply reset to 0. Link: https://lkml.kernel.org/r/8a3d992a-473a-467b-28a0-4ad2ff60ab82@suse.cz Signed-off-by: Vlastimil Babka Reported-by: Vijayanand Jitta Reviewed-by: Vijayanand Jitta Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Vinayak Menon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ed7ce574c136569f55fb5c32e69e382c77ba500 Author: Shakeel Butt Date: Fri Aug 13 16:54:31 2021 -0700 slub: fix kmalloc_pagealloc_invalid_free unit test The unit test kmalloc_pagealloc_invalid_free makes sure that for the higher order slub allocation which goes to page allocator, the free is called with the correct address i.e. the virtual address of the head page. Commit f227f0faf63b ("slub: fix unreclaimable slab stat for bulk free") unified the free code paths for page allocator based slub allocations but instead of using the address passed by the caller, it extracted the address from the page. Thus making the unit test kmalloc_pagealloc_invalid_free moot. So, fix this by using the address passed by the caller. Should we fix this? I think yes because dev expect kasan to catch these type of programming bugs. Link: https://lkml.kernel.org/r/20210802180819.1110165-1-shakeelb@google.com Fixes: f227f0faf63b ("slub: fix unreclaimable slab stat for bulk free") Signed-off-by: Shakeel Butt Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Acked-by: Roman Gushchin Cc: Michal Hocko Cc: Muchun Song Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 340caf178ddc2efb0294afaf54c715f7928c258e Author: Kuan-Ying Lee Date: Fri Aug 13 16:54:27 2021 -0700 kasan, slub: reset tag when printing address The address still includes the tags when it is printed. With hardware tag-based kasan enabled, we will get a false positive KASAN issue when we access metadata. Reset the tag before we access the metadata. Link: https://lkml.kernel.org/r/20210804090957.12393-3-Kuan-Ying.Lee@mediatek.com Fixes: aa1ef4d7b3f6 ("kasan, mm: reset tags when accessing metadata") Signed-off-by: Kuan-Ying Lee Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Chinwen Chang Cc: Nicholas Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c7a00b843370feaf7710cef2350367c7e61cd1a Author: Kuan-Ying Lee Date: Fri Aug 13 16:54:24 2021 -0700 kasan, kmemleak: reset tags when scanning block Patch series "kasan, slub: reset tag when printing address", v3. With hardware tag-based kasan enabled, we reset the tag when we access metadata to avoid from false alarm. This patch (of 2): Kmemleak needs to scan kernel memory to check memory leak. With hardware tag-based kasan enabled, when it scans on the invalid slab and dereference, the issue will occur as below. Hardware tag-based KASAN doesn't use compiler instrumentation, we can not use kasan_disable_current() to ignore tag check. Based on the below report, there are 11 0xf7 granules, which amounts to 176 bytes, and the object is allocated from the kmalloc-256 cache. So when kmemleak accesses the last 256-176 bytes, it causes faults, as those are marked with KASAN_KMALLOC_REDZONE == KASAN_TAG_INVALID == 0xfe. Thus, we reset tags before accessing metadata to avoid from false positives. BUG: KASAN: out-of-bounds in scan_block+0x58/0x170 Read at addr f7ff0000c0074eb0 by task kmemleak/138 Pointer tag: [f7], memory tag: [fe] CPU: 7 PID: 138 Comm: kmemleak Not tainted 5.14.0-rc2-00001-g8cae8cd89f05-dirty #134 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x1b0 show_stack+0x1c/0x30 dump_stack_lvl+0x68/0x84 print_address_description+0x7c/0x2b4 kasan_report+0x138/0x38c __do_kernel_fault+0x190/0x1c4 do_tag_check_fault+0x78/0x90 do_mem_abort+0x44/0xb4 el1_abort+0x40/0x60 el1h_64_sync_handler+0xb4/0xd0 el1h_64_sync+0x78/0x7c scan_block+0x58/0x170 scan_gray_list+0xdc/0x1a0 kmemleak_scan+0x2ac/0x560 kmemleak_scan_thread+0xb0/0xe0 kthread+0x154/0x160 ret_from_fork+0x10/0x18 Allocated by task 0: kasan_save_stack+0x2c/0x60 __kasan_kmalloc+0xec/0x104 __kmalloc+0x224/0x3c4 __register_sysctl_paths+0x200/0x290 register_sysctl_table+0x2c/0x40 sysctl_init+0x20/0x34 proc_sys_init+0x3c/0x48 proc_root_init+0x80/0x9c start_kernel+0x648/0x6a4 __primary_switched+0xc0/0xc8 Freed by task 0: kasan_save_stack+0x2c/0x60 kasan_set_track+0x2c/0x40 kasan_set_free_info+0x44/0x54 ____kasan_slab_free.constprop.0+0x150/0x1b0 __kasan_slab_free+0x14/0x20 slab_free_freelist_hook+0xa4/0x1fc kfree+0x1e8/0x30c put_fs_context+0x124/0x220 vfs_kern_mount.part.0+0x60/0xd4 kern_mount+0x24/0x4c bdev_cache_init+0x70/0x9c vfs_caches_init+0xdc/0xf4 start_kernel+0x638/0x6a4 __primary_switched+0xc0/0xc8 The buggy address belongs to the object at ffff0000c0074e00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 176 bytes inside of 256-byte region [ffff0000c0074e00, ffff0000c0074f00) The buggy address belongs to the page: page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100074 head:(____ptrval____) order:2 compound_mapcount:0 compound_pincount:0 flags: 0xbfffc0000010200(slab|head|node=0|zone=2|lastcpupid=0xffff|kasantag=0x0) raw: 0bfffc0000010200 0000000000000000 dead000000000122 f5ff0000c0002300 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c0074c00: f0 f0 f0 f0 f0 f0 f0 f0 f0 fe fe fe fe fe fe fe ffff0000c0074d00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >ffff0000c0074e00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 fe fe fe fe fe ^ ffff0000c0074f00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff0000c0075000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Disabling lock debugging due to kernel taint kmemleak: 181 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Link: https://lkml.kernel.org/r/20210804090957.12393-1-Kuan-Ying.Lee@mediatek.com Link: https://lkml.kernel.org/r/20210804090957.12393-2-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Acked-by: Catalin Marinas Reviewed-by: Andrey Konovalov Cc: Marco Elver Cc: Nicholas Tang Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Chinwen Chang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 020efdadd84958debc36e74fb5cc52b30697a611 Merge: 42995cee61f84 cddce01160582 Author: Linus Torvalds Date: Fri Aug 13 13:36:42 2021 -1000 Merge tag 'block-5.14-2021-08-13' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes for block that should go into 5.14: - Revert the mq-deadline cgroup addition. More work is needed on this front, let's revert it for now and get it right before having it in a released kernel (Tejun) - blk-iocost lockdep fix (Ming) - nbd double completion fix (Xie) - Fix for non-idling when clearing the shared tag flag (Yu)" * tag 'block-5.14-2021-08-13' of git://git.kernel.dk/linux-block: nbd: Aovid double completion of a request blk-mq: clear active_queues before clearing BLK_MQ_F_TAG_QUEUE_SHARED Revert "block/mq-deadline: Add cgroup support" blk-iocost: fix lockdep warning on blkcg->lock commit 42995cee61f842c4e275e4902459f8a951fe4607 Merge: 462938cd48f25 8f40d03707953 Author: Linus Torvalds Date: Fri Aug 13 13:25:08 2021 -1000 Merge tag 'io_uring-5.14-2021-08-13' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A bit bigger than the previous weeks, but mostly just a few stable bound fixes. In detail: - Followup fixes to patches from last week for io-wq, turns out they weren't complete (Hao) - Two lockdep reported fixes out of the RT camp (me) - Sync the io_uring-cp example with liburing, as a few bug fixes never made it to the kernel carried version (me) - SQPOLL related TIF_NOTIFY_SIGNAL fix (Nadav) - Use WRITE_ONCE() when writing sq flags (Nadav) - io_rsrc_put_work() deadlock fix (Pavel)" * tag 'io_uring-5.14-2021-08-13' of git://git.kernel.dk/linux-block: tools/io_uring/io_uring-cp: sync with liburing example io_uring: fix ctx-exit io_rsrc_put_work() deadlock io_uring: drop ctx->uring_lock before flushing work item io-wq: fix IO_WORKER_F_FIXED issue in create_io_worker() io-wq: fix bug of creating io-wokers unconditionally io_uring: rsrc ref lock needs to be IRQ safe io_uring: Use WRITE_ONCE() when writing to sq_flags io_uring: clear TIF_NOTIFY_SIGNAL when running task work commit 462938cd48f2516cfc56187617280f2daa3debf7 Merge: f8e6dfc64f613 c4b68e513953c Author: Linus Torvalds Date: Fri Aug 13 12:41:45 2021 -1000 Merge tag 'pinctrl-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "An assortment of pin control fixes of varying importance, the most important ones affecting Intel and AMD laptops turned up the recent few days so it's time to push this to your tree. - Fix the Kconfig dependency for Qualcomm SM8350 pin controller - Fix pin biasing fallback behaviour on the Mediatek pin controller - Fix the GPIO numbering scheme for Intel Tiger Lake-H to correspond to the products that are now actually out on the market - Fix a pin control function itemization in the Sunxi driver out-of-bounds access bug - Fix disable clocking for the RISC-V K210 pin controller on the errorpath - Fix a system shutdown bug affecting AMD Ryzen-based laptops, the system would not suspend but just bounce back up" * tag 'pinctrl-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: amd: Fix an issue with shutdown when system set to s0ix pinctrl: k210: Fix k210_fpioa_probe() pinctrl: sunxi: Don't underestimate number of functions pinctrl: tigerlake: Fix GPIO mapping for newer version of software pinctrl: mediatek: Fix fallback behavior for bias_set_combo pinctrl: qcom: fix GPIOLIB dependencies commit c1e64c0aec8cb0499e61af7ea086b59abba97945 Author: Maxim Kochetkov Date: Wed Aug 11 10:10:36 2021 +0300 soc: fsl: qe: fix static checker warning The patch be7ecbd240b2: "soc: fsl: qe: convert QE interrupt controller to platform_device" from Aug 3, 2021, leads to the following static checker warning: drivers/soc/fsl/qe/qe_ic.c:438 qe_ic_init() warn: unsigned 'qe_ic->virq_low' is never less than zero. In old variant irq_of_parse_and_map() returns zero if failed so unsigned int for virq_high/virq_low was ok. In new variant platform_get_irq() returns negative error codes if failed so we need to use int for virq_high/virq_low. Also simplify high_handler checking and remove the curly braces to make checkpatch happy. Fixes: be7ecbd240b2 ("soc: fsl: qe: convert QE interrupt controller to platform_device") Signed-off-by: Maxim Kochetkov Reported-by: Dan Carpenter Signed-off-by: Li Yang commit 9d5e6a7076337374261d13930ea844edfb4cdd1d Merge: f8e6dfc64f613 fb9f7190092d2 Author: Jakub Kicinski Date: Fri Aug 13 10:26:20 2021 -0700 Merge branch 'bnxt-tx-napi-disabling-resiliency-improvements' Jakub Kicinski says: ==================== bnxt: Tx NAPI disabling resiliency improvements A lockdep warning was triggered by netpoll because napi poll was taking the xmit lock. Fix that and a couple more issues noticed while reading the code. ==================== Link: https://lore.kernel.org/r/20210812214242.578039-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit fb9f7190092d2bbd1f8f0b1cc252732cbe99a87e Author: Jakub Kicinski Date: Thu Aug 12 14:42:42 2021 -0700 bnxt: count Tx drops Drivers should count packets they are dropping. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reviewed-by: Michael Chan Reviewed-by: Edwin Peer Signed-off-by: Jakub Kicinski commit e8d8c5d80f5e9d4586c68061b62c642752289095 Author: Jakub Kicinski Date: Thu Aug 12 14:42:41 2021 -0700 bnxt: make sure xmit_more + errors does not miss doorbells skbs are freed on error and not put on the ring. We may, however, be in a situation where we're freeing the last skb of a batch, and there is a doorbell ring pending because of xmit_more() being true earlier. Make sure we ring the door bell in such situations. Since errors are rare don't pay attention to xmit_more() and just always flush the pending frames. The busy case should be safe to be left alone because it can only happen if start_xmit races with completions and they both enable the queue. In that case the kick can't be pending. Noticed while reading the code. Fixes: 4d172f21cefe ("bnxt_en: Implement xmit_more.") Reviewed-by: Michael Chan Reviewed-by: Edwin Peer Signed-off-by: Jakub Kicinski commit 01cca6b9330ac7460de44eeeb3a0607f8aae69ff Author: Jakub Kicinski Date: Thu Aug 12 14:42:40 2021 -0700 bnxt: disable napi before canceling DIM napi schedules DIM, napi has to be disabled first, then DIM canceled. Noticed while reading the code. Fixes: 0bc0b97fca73 ("bnxt_en: cleanup DIM work on device shutdown") Fixes: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation") Reviewed-by: Michael Chan Reviewed-by: Edwin Peer Signed-off-by: Jakub Kicinski commit 3c603136c9f82833813af77185618de5af67676c Author: Jakub Kicinski Date: Thu Aug 12 14:42:39 2021 -0700 bnxt: don't lock the tx queue from napi poll We can't take the tx lock from the napi poll routine, because netpoll can poll napi at any moment, including with the tx lock already held. The tx lock is protecting against two paths - the disable path, and (as Michael points out) the NETDEV_TX_BUSY case which may occur if NAPI completions race with start_xmit and both decide to re-enable the queue. For the disable/ifdown path use synchronize_net() to make sure closing the device does not race we restarting the queues. Annotate accesses to dev_state against data races. For the NAPI cleanup vs start_xmit path - appropriate barriers are already in place in the main spot where Tx queue is stopped but we need to do the same careful dance in the TX_BUSY case. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reviewed-by: Michael Chan Reviewed-by: Edwin Peer Signed-off-by: Jakub Kicinski commit cddce01160582a5f52ada3da9626c052d852ec42 Author: Xie Yongji Date: Fri Aug 13 23:13:30 2021 +0800 nbd: Aovid double completion of a request There is a race between iterating over requests in nbd_clear_que() and completing requests in recv_work(), which can lead to double completion of a request. To fix it, flush the recv worker before iterating over the requests and don't abort the completed request while iterating. Fixes: 96d97e17828f ("nbd: clear_sock on netlink disconnect") Reported-by: Jiang Yadong Signed-off-by: Xie Yongji Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20210813151330.96-1-xieyongji@bytedance.com Signed-off-by: Jens Axboe commit 3776f3517ed94d40ff0e3851d7ce2ce17b63099f Author: Ilya Leoshkevich Date: Thu Aug 12 17:18:11 2021 +0200 selftests, bpf: Test that dead ldx_w insns are accepted Prevent regressions related to zero-extension metadata handling during dead code sanitization. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210812151811.184086-3-iii@linux.ibm.com commit 45c709f8c71b525b51988e782febe84ce933e7e0 Author: Ilya Leoshkevich Date: Thu Aug 12 17:18:10 2021 +0200 bpf: Clear zext_dst of dead insns "access skb fields ok" verifier test fails on s390 with the "verifier bug. zext_dst is set, but no reg is defined" message. The first insns of the test prog are ... 0: 61 01 00 00 00 00 00 00 ldxw %r0,[%r1+0] 8: 35 00 00 01 00 00 00 00 jge %r0,0,1 10: 61 01 00 08 00 00 00 00 ldxw %r0,[%r1+8] ... and the 3rd one is dead (this does not look intentional to me, but this is a separate topic). sanitize_dead_code() converts dead insns into "ja -1", but keeps zext_dst. When opt_subreg_zext_lo32_rnd_hi32() tries to parse such an insn, it sees this discrepancy and bails. This problem can be seen only with JITs whose bpf_jit_needs_zext() returns true. Fix by clearning dead insns' zext_dst. The commits that contributed to this problem are: 1. 5aa5bd14c5f8 ("bpf: add initial suite for selftests"), which introduced the test with the dead code. 2. 5327ed3d44b7 ("bpf: verifier: mark verified-insn with sub-register zext flag"), which introduced the zext_dst flag. 3. 83a2881903f3 ("bpf: Account for BPF_FETCH in insn_has_def32()"), which introduced the sanity check. 4. 9183671af6db ("bpf: Fix leakage under speculation on mispredicted branches"), which bisect points to. It's best to fix this on stable branches that contain the second one, since that's the point where the inconsistency was introduced. Fixes: 5327ed3d44b7 ("bpf: verifier: mark verified-insn with sub-register zext flag") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210812151811.184086-2-iii@linux.ibm.com commit 8f40d0370795313b6f1b1782035919cfc76b159f Author: Jens Axboe Date: Fri Aug 13 08:57:07 2021 -0600 tools/io_uring/io_uring-cp: sync with liburing example This example is missing a few fixes that are in the liburing version, synchronize with the upstream version. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit 454bb6775202d94f0f489c4632efecdb62d3c904 Author: Yu Kuai Date: Sat Jul 31 14:21:30 2021 +0800 blk-mq: clear active_queues before clearing BLK_MQ_F_TAG_QUEUE_SHARED We run a test that delete and recover devcies frequently(two devices on the same host), and we found that 'active_queues' is super big after a period of time. If device a and device b share a tag set, and a is deleted, then blk_mq_exit_queue() will clear BLK_MQ_F_TAG_QUEUE_SHARED because there is only one queue that are using the tag set. However, if b is still active, the active_queues of b might never be cleared even if b is deleted. Thus clear active_queues before BLK_MQ_F_TAG_QUEUE_SHARED is cleared. Signed-off-by: Yu Kuai Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210731062130.1533893-1-yukuai3@huawei.com Signed-off-by: Jens Axboe commit 7a3dc4f35bf8e1a07e5c3f8ecc8ac923f48493fe Author: Thomas Gleixner Date: Fri Aug 13 12:36:14 2021 +0200 driver core: Add missing kernel doc for device::msi_lock Fixes: 77e89afc25f3 ("PCI/MSI: Protect msi_desc::masked for multi-MSI") Reported-by: Stephen Rothwell Signed-off-by: Thomas Gleixner commit 50f05bd114a46a74726e432bf81079d3f13a55b7 Author: Dongliang Mu Date: Tue Aug 10 18:03:19 2021 +0800 ipack: tpci200: fix memory leak in the tpci200_register The error handling code in tpci200_register does not free interface_regs allocated by ioremap and the current version of error handling code is problematic. Fix this by refactoring the error handling code and free interface_regs when necessary. Fixes: 43986798fd50 ("ipack: add error handling for ioremap_nocache") Cc: stable@vger.kernel.org Reported-by: Dongliang Mu Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20210810100323.3938492-2-mudongliangabcd@gmail.com Signed-off-by: Greg Kroah-Hartman commit 57a1681095f912239c7fb4d66683ab0425973838 Author: Dongliang Mu Date: Tue Aug 10 18:03:18 2021 +0800 ipack: tpci200: fix many double free issues in tpci200_pci_probe The function tpci200_register called by tpci200_install and tpci200_unregister called by tpci200_uninstall are in pair. However, tpci200_unregister has some cleanup operations not in the tpci200_register. So the error handling code of tpci200_pci_probe has many different double free issues. Fix this problem by moving those cleanup operations out of tpci200_unregister, into tpci200_pci_remove and reverting the previous commit 9272e5d0028d ("ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe"). Fixes: 9272e5d0028d ("ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe") Cc: stable@vger.kernel.org Reported-by: Dongliang Mu Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20210810100323.3938492-1-mudongliangabcd@gmail.com Signed-off-by: Greg Kroah-Hartman commit d77772538f00b7265deace6e77e555ee18365ad0 Author: Srinivas Kandagatla Date: Mon Aug 9 09:24:28 2021 +0100 slimbus: ngd: reset dma setup during runtime pm During suspend/resume NGD remote instance is power cycled along with remotely controlled bam dma engine. So Reset the dma configuration during this suspend resume path so that we are not dealing with any stale dma setup. Without this transactions timeout after first suspend resume path. Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Cc: Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210809082428.11236-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c0e38eaa8d5102c138e4f16658ea762417d42a8f Author: Srinivas Kandagatla Date: Mon Aug 9 09:24:27 2021 +0100 slimbus: ngd: set correct device for pm For some reason we ended up using wrong device in some places for pm_runtime calls. Fix this so that NGG driver can do runtime pm correctly. Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Cc: Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210809082428.11236-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a263c1ff6abe0e66712f40d595bbddc7a35907f8 Author: Srinivas Kandagatla Date: Mon Aug 9 09:24:26 2021 +0100 slimbus: messaging: check for valid transaction id In some usecases transaction ids are dynamically allocated inside the controller driver after sending the messages which have generic acknowledge responses. So check for this before refcounting pm_runtime. Without this we would end up imbalancing runtime pm count by doing pm_runtime_put() in both slim_do_transfer() and slim_msg_response() for a single pm_runtime_get() in slim_do_transfer() Fixes: d3062a210930 ("slimbus: messaging: add slim_alloc/free_txn_tid()") Cc: Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210809082428.11236-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9659281ce78de0f15a4aa124da8f7450b1399c09 Author: Srinivas Kandagatla Date: Mon Aug 9 09:24:25 2021 +0100 slimbus: messaging: start transaction ids from 1 instead of zero As tid is unsigned its hard to figure out if the tid is valid or invalid. So Start the transaction ids from 1 instead of zero so that we could differentiate between a valid tid and invalid tids This is useful in cases where controller would add a tid for controller specific transfers. Fixes: d3062a210930 ("slimbus: messaging: add slim_alloc/free_txn_tid()") Cc: Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210809082428.11236-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6e949ddb0a6337817330c897e29ca4177c646f02 Merge: c5e2bf0b4ae8e ce25681d59ffc Author: Paolo Bonzini Date: Fri Aug 13 03:33:13 2021 -0400 Merge branch 'kvm-tdpmmu-fixes' into kvm-master Merge topic branch with fixes for both 5.14-rc6 and 5.15. commit ce25681d59ffc4303321e555a2d71b1946af07da Author: Sean Christopherson Date: Thu Aug 12 11:18:15 2021 -0700 KVM: x86/mmu: Protect marking SPs unsync when using TDP MMU with spinlock Add yet another spinlock for the TDP MMU and take it when marking indirect shadow pages unsync. When using the TDP MMU and L1 is running L2(s) with nested TDP, KVM may encounter shadow pages for the TDP entries managed by L1 (controlling L2) when handling a TDP MMU page fault. The unsync logic is not thread safe, e.g. the kvm_mmu_page fields are not atomic, and misbehaves when a shadow page is marked unsync via a TDP MMU page fault, which runs with mmu_lock held for read, not write. Lack of a critical section manifests most visibly as an underflow of unsync_children in clear_unsync_child_bit() due to unsync_children being corrupted when multiple CPUs write it without a critical section and without atomic operations. But underflow is the best case scenario. The worst case scenario is that unsync_children prematurely hits '0' and leads to guest memory corruption due to KVM neglecting to properly sync shadow pages. Use an entirely new spinlock even though piggybacking tdp_mmu_pages_lock would functionally be ok. Usurping the lock could degrade performance when building upper level page tables on different vCPUs, especially since the unsync flow could hold the lock for a comparatively long time depending on the number of indirect shadow pages and the depth of the paging tree. For simplicity, take the lock for all MMUs, even though KVM could fairly easily know that mmu_lock is held for write. If mmu_lock is held for write, there cannot be contention for the inner spinlock, and marking shadow pages unsync across multiple vCPUs will be slow enough that bouncing the kvm_arch cacheline should be in the noise. Note, even though L2 could theoretically be given access to its own EPT entries, a nested MMU must hold mmu_lock for write and thus cannot race against a TDP MMU page fault. I.e. the additional spinlock only _needs_ to be taken by the TDP MMU, as opposed to being taken by any MMU for a VM that is running with the TDP MMU enabled. Holding mmu_lock for read also prevents the indirect shadow page from being freed. But as above, keep it simple and always take the lock. Alternative #1, the TDP MMU could simply pass "false" for can_unsync and effectively disable unsync behavior for nested TDP. Write protecting leaf shadow pages is unlikely to noticeably impact traditional L1 VMMs, as such VMMs typically don't modify TDP entries, but the same may not hold true for non-standard use cases and/or VMMs that are migrating physical pages (from L1's perspective). Alternative #2, the unsync logic could be made thread safe. In theory, simply converting all relevant kvm_mmu_page fields to atomics and using atomic bitops for the bitmap would suffice. However, (a) an in-depth audit would be required, (b) the code churn would be substantial, and (c) legacy shadow paging would incur additional atomic operations in performance sensitive paths for no benefit (to legacy shadow paging). Fixes: a2855afc7ee8 ("KVM: x86/mmu: Allow parallel page faults for the TDP MMU") Cc: stable@vger.kernel.org Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210812181815.3378104-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0103098fb4f13b447b26ed514bcd3140f6791047 Author: Sean Christopherson Date: Thu Aug 12 11:14:14 2021 -0700 KVM: x86/mmu: Don't step down in the TDP iterator when zapping all SPTEs Set the min_level for the TDP iterator at the root level when zapping all SPTEs to optimize the iterator's try_step_down(). Zapping a non-leaf SPTE will recursively zap all its children, thus there is no need for the iterator to attempt to step down. This avoids rereading the top-level SPTEs after they are zapped by causing try_step_down() to short-circuit. In most cases, optimizing try_step_down() will be in the noise as the cost of zapping SPTEs completely dominates the overall time. The optimization is however helpful if the zap occurs with relatively few SPTEs, e.g. if KVM is zapping in response to multiple memslot updates when userspace is adding and removing read-only memslots for option ROMs. In that case, the task doing the zapping likely isn't a vCPU thread, but it still holds mmu_lock for read and thus can be a noisy neighbor of sorts. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210812181414.3376143-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 524a1e4e381fc5e7781008d5bd420fd1357c0113 Author: Sean Christopherson Date: Thu Aug 12 11:14:13 2021 -0700 KVM: x86/mmu: Don't leak non-leaf SPTEs when zapping all SPTEs Pass "all ones" as the end GFN to signal "zap all" for the TDP MMU and really zap all SPTEs in this case. As is, zap_gfn_range() skips non-leaf SPTEs whose range exceeds the range to be zapped. If shadow_phys_bits is not aligned to the range size of top-level SPTEs, e.g. 512gb with 4-level paging, the "zap all" flows will skip top-level SPTEs whose range extends beyond shadow_phys_bits and leak their SPs when the VM is destroyed. Use the current upper bound (based on host.MAXPHYADDR) to detect that the caller wants to zap all SPTEs, e.g. instead of using the max theoretical gfn, 1 << (52 - 12). The more precise upper bound allows the TDP iterator to terminate its walk earlier when running on hosts with MAXPHYADDR < 52. Add a WARN on kmv->arch.tdp_mmu_pages when the TDP MMU is destroyed to help future debuggers should KVM decide to leak SPTEs again. The bug is most easily reproduced by running (and unloading!) KVM in a VM whose host.MAXPHYADDR < 39, as the SPTE for gfn=0 will be skipped. ============================================================================= BUG kvm_mmu_page_header (Not tainted): Objects remaining in kvm_mmu_page_header on __kmem_cache_shutdown() ----------------------------------------------------------------------------- Slab 0x000000004d8f7af1 objects=22 used=2 fp=0x00000000624d29ac flags=0x4000000000000200(slab|zone=1) CPU: 0 PID: 1582 Comm: rmmod Not tainted 5.14.0-rc2+ #420 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Call Trace: dump_stack_lvl+0x45/0x59 slab_err+0x95/0xc9 __kmem_cache_shutdown.cold+0x3c/0x158 kmem_cache_destroy+0x3d/0xf0 kvm_mmu_module_exit+0xa/0x30 [kvm] kvm_arch_exit+0x5d/0x90 [kvm] kvm_exit+0x78/0x90 [kvm] vmx_exit+0x1a/0x50 [kvm_intel] __x64_sys_delete_module+0x13f/0x220 do_syscall_64+0x3b/0xc0 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: faaf05b00aec ("kvm: x86/mmu: Support zapping SPTEs in the TDP MMU") Cc: stable@vger.kernel.org Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210812181414.3376143-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c5e2bf0b4ae8ea1df6c352028459b1a415fe08dd Merge: 18712c13709d2 c4d7c51845af9 Author: Paolo Bonzini Date: Fri Aug 13 03:21:13 2021 -0400 Merge tag 'kvmarm-fixes-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.14, take #2 - Plug race between enabling MTE and creating vcpus - Fix off-by-one bug when checking whether an address range is RAM commit 18712c13709d2de9516c5d3414f707c4f0a9c190 Author: Sean Christopherson Date: Wed Aug 11 21:56:15 2021 -0700 KVM: nVMX: Use vmx_need_pf_intercept() when deciding if L0 wants a #PF Use vmx_need_pf_intercept() when determining if L0 wants to handle a #PF in L2 or if the VM-Exit should be forwarded to L1. The current logic fails to account for the case where #PF is intercepted to handle guest.MAXPHYADDR < host.MAXPHYADDR and ends up reflecting all #PFs into L1. At best, L1 will complain and inject the #PF back into L2. At worst, L1 will eat the unexpected fault and cause L2 to hang on infinite page faults. Note, while the bug was technically introduced by the commit that added support for the MAXPHYADDR madness, the shame is all on commit a0c134347baf ("KVM: VMX: introduce vmx_need_pf_intercept"). Fixes: 1dbf5d68af6f ("KVM: VMX: Add guest physical address check in EPT violation and misconfig") Cc: stable@vger.kernel.org Cc: Peter Shier Cc: Oliver Upton Cc: Jim Mattson Signed-off-by: Sean Christopherson Message-Id: <20210812045615.3167686-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 85aa8889b82e0eec680a21ea28dbf57c6acfe182 Author: Junaid Shahid Date: Fri Aug 6 15:22:29 2021 -0700 kvm: vmx: Sync all matching EPTPs when injecting nested EPT fault When a nested EPT violation/misconfig is injected into the guest, the shadow EPT PTEs associated with that address need to be synced. This is done by kvm_inject_emulated_page_fault() before it calls nested_ept_inject_page_fault(). However, that will only sync the shadow EPT PTE associated with the current L1 EPTP. Since the ASID is based on EP4TA rather than the full EPTP, so syncing the current EPTP is not enough. The SPTEs associated with any other L1 EPTPs in the prev_roots cache with the same EP4TA also need to be synced. Signed-off-by: Junaid Shahid Message-Id: <20210806222229.1645356-1-junaids@google.com> Signed-off-by: Paolo Bonzini commit 375d1adebc11b99e94e85f0ba2160e866e277447 Merge: ffbe17cadaf56 7b9cae027ba3a Author: Paolo Bonzini Date: Fri Aug 13 03:20:18 2021 -0400 Merge branch 'kvm-vmx-secctl' into kvm-master Merge common topic branch for 5.14-rc6 and 5.15 merge window. commit ffbe17cadaf564b5da0e4eabdcff1b719e184a76 Author: Paolo Bonzini Date: Mon Aug 9 07:00:58 2021 -0400 KVM: x86: remove dead initialization hv_vcpu is initialized again a dozen lines below, and at this point vcpu->arch.hyperv is not valid. Remove the initializer. Reported-by: kernel test robot Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 1383279c6494c6b62d1d6939f34906a4d2ef721c Author: Sean Christopherson Date: Thu Aug 5 11:38:04 2021 -0700 KVM: x86: Allow guest to set EFER.NX=1 on non-PAE 32-bit kernels Remove an ancient restriction that disallowed exposing EFER.NX to the guest if EFER.NX=0 on the host, even if NX is fully supported by the CPU. The motivation of the check, added by commit 2cc51560aed0 ("KVM: VMX: Avoid saving and restoring msr_efer on lightweight vmexit"), was to rule out the case of host.EFER.NX=0 and guest.EFER.NX=1 so that KVM could run the guest with the host's EFER.NX and thus avoid context switching EFER if the only divergence was the NX bit. Fast forward to today, and KVM has long since stopped running the guest with the host's EFER.NX. Not only does KVM context switch EFER if host.EFER.NX=1 && guest.EFER.NX=0, KVM also forces host.EFER.NX=0 && guest.EFER.NX=1 when using shadow paging (to emulate SMEP). Furthermore, the entire motivation for the restriction was made obsolete over a decade ago when Intel added dedicated host and guest EFER fields in the VMCS (Nehalem timeframe), which reduced the overhead of context switching EFER from 400+ cycles (2 * WRMSR + 1 * RDMSR) to a mere ~2 cycles. In practice, the removed restriction only affects non-PAE 32-bit kernels, as EFER.NX is set during boot if NX is supported and the kernel will use PAE paging (32-bit or 64-bit), regardless of whether or not the kernel will actually use NX itself (mark PTEs non-executable). Alternatively and/or complementarily, startup_32_smp() in head_32.S could be modified to set EFER.NX=1 regardless of paging mode, thus eliminating the scenario where NX is supported but not enabled. However, that runs the risk of breaking non-KVM non-PAE kernels (though the risk is very, very low as there are no known EFER.NX errata), and also eliminates an easy-to-use mechanism for stressing KVM's handling of guest vs. host EFER across nested virtualization transitions. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20210805183804.1221554-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008 Merge: 3a03c67de276a a9a507013a6f9 Author: Linus Torvalds Date: Thu Aug 12 16:24:03 2021 -1000 Merge tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from netfilter, bpf, can and ieee802154. The size of this is pretty normal, but we got more fixes for 5.14 changes this week than last week. Nothing major but the trend is the opposite of what we like. We'll see how the next week goes.. Current release - regressions: - r8169: fix ASPM-related link-up regressions - bridge: fix flags interpretation for extern learn fdb entries - phy: micrel: fix link detection on ksz87xx switch - Revert "tipc: Return the correct errno code" - ptp: fix possible memory leak caused by invalid cast Current release - new code bugs: - bpf: add missing bpf_read_[un]lock_trace() for syscall program - bpf: fix potentially incorrect results with bpf_get_local_storage() - page_pool: mask the page->signature before the checking, avoid dma mapping leaks - netfilter: nfnetlink_hook: 5 fixes to information in netlink dumps - bnxt_en: fix firmware interface issues with PTP - mlx5: Bridge, fix ageing time Previous releases - regressions: - linkwatch: fix failure to restore device state across suspend/resume - bareudp: fix invalid read beyond skb's linear data Previous releases - always broken: - bpf: fix integer overflow involving bucket_size - ppp: fix issues when desired interface name is specified via netlink - wwan: mhi_wwan_ctrl: fix possible deadlock - dsa: microchip: ksz8795: fix number of VLAN related bugs - dsa: drivers: fix broken backpressure in .port_fdb_dump - dsa: qca: ar9331: make proper initial port defaults Misc: - bpf: add lockdown check for probe_write_user helper - netfilter: conntrack: remove offload_pickup sysctl before 5.14 is out - netfilter: conntrack: collect all entries in one cycle, heuristically slow down garbage collection scans on idle systems to prevent frequent wake ups" * tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits) vsock/virtio: avoid potential deadlock when vsock device remove wwan: core: Avoid returning NULL from wwan_create_dev() net: dsa: sja1105: unregister the MDIO buses during teardown Revert "tipc: Return the correct errno code" net: mscc: Fix non-GPL export of regmap APIs net: igmp: increase size of mr_ifc_count MAINTAINERS: switch to my OMP email for Renesas Ethernet drivers tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets net: pcs: xpcs: fix error handling on failed to allocate memory net: linkwatch: fix failure to restore device state across suspend/resume net: bridge: fix memleak in br_add_if() net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge net: bridge: fix flags interpretation for extern learn fdb entries net: dsa: sja1105: fix broken backpressure in .port_fdb_dump net: dsa: lantiq: fix broken backpressure in .port_fdb_dump net: dsa: lan9303: fix broken backpressure in .port_fdb_dump net: dsa: hellcreek: fix broken backpressure in .port_fdb_dump bpf, core: Fix kernel-doc notation net: igmp: fix data-race in igmp_ifc_timer_expire() net: Fix memory leak in ieee802154_raw_deliver ... commit 3a03c67de276a6abb412771311f93a73e192b615 Merge: 82cce5f4291e0 8434ffe71c874 Author: Linus Torvalds Date: Thu Aug 12 16:16:01 2021 -1000 Merge tag 'ceph-for-5.14-rc6' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A patch to avoid a soft lockup in ceph_check_delayed_caps() from Luis and a reference handling fix from Jeff that should address some memory corruption reports in the snaprealm area. Both marked for stable" * tag 'ceph-for-5.14-rc6' of git://github.com/ceph/ceph-client: ceph: take snap_empty_lock atomically with snaprealm refcount change ceph: reduce contention in ceph_check_delayed_caps() commit 82cce5f4291e089d44b7b9bc77918cbcd52d429e Merge: f8fbb47c6e86c a1fa72683166b Author: Linus Torvalds Date: Thu Aug 12 16:09:25 2021 -1000 Merge tag 'drm-fixes-2021-08-13' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Another week, another set of pretty regular fixes, nothing really stands out too much. amdgpu: - Yellow carp update - RAS EEPROM fixes - BACO/BOCO fixes - Fix a memory leak in an error path - Freesync fix - VCN harvesting fix - Display fixes i915: - GVT fix for Windows VM hang. - Display fix of 12 BPC bits for display 12 and newer. - Don't try to access some media register for fused off domains. - Fix kerneldoc build warnings. mediatek: - Fix dpi bridge bug. - Fix cursor plane no update. meson: - Fix colors when booting with HDR" * tag 'drm-fixes-2021-08-13' of git://anongit.freedesktop.org/drm/drm: drm/doc/rfc: drop lmem uapi section drm/i915: Only access SFC_DONE when media domain is not fused off drm/i915/display: Fix the 12 BPC bits for PIPE_MISC reg drm/amd/display: use GFP_ATOMIC in amdgpu_dm_irq_schedule_work drm/amd/display: Remove invalid assert for ODM + MPC case drm/amd/pm: bug fix for the runtime pm BACO drm/amdgpu: handle VCN instances when harvesting (v2) drm/meson: fix colour distortion from HDR set during vendor u-boot drm/i915/gvt: Fix cached atomics setting for Windows VM drm/amdgpu: Add preferred mode in modeset when freesync video mode's enabled. drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()' drm/amdgpu: don't enable baco on boco platforms in runpm drm/amdgpu: set RAS EEPROM address from VBIOS drm/amd/pm: update smu v13.0.1 firmware header drm/mediatek: Fix cursor plane no update drm/mediatek: mtk-dpi: Set out_fmt from config if not the last bridge drm/mediatek: dpi: Fix NULL dereference in mtk_dpi_bridge_atomic_check commit cbfece75186d6dae6e0fe2b3492ac76eb380afdb Author: Arnd Bergmann Date: Wed Jul 21 17:15:22 2021 +0200 ARM: ixp4xx: fix building both pci drivers When both the old and the new PCI drivers are enabled in the same kernel, there are a couple of namespace conflicts that cause a build failure: drivers/pci/controller/pci-ixp4xx.c:38: error: "IXP4XX_PCI_CSR" redefined [-Werror] 38 | #define IXP4XX_PCI_CSR 0x1c | In file included from arch/arm/mach-ixp4xx/include/mach/hardware.h:23, from arch/arm/mach-ixp4xx/include/mach/io.h:15, from arch/arm/include/asm/io.h:198, from include/linux/io.h:13, from drivers/pci/controller/pci-ixp4xx.c:20: arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h:221: note: this is the location of the previous definition 221 | #define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x))) | drivers/pci/controller/pci-ixp4xx.c:148:12: error: 'ixp4xx_pci_read' redeclared as different kind of symbol 148 | static int ixp4xx_pci_read(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data) | ^~~~~~~~~~~~~~~ Rename both the ixp4xx_pci_read/ixp4xx_pci_write functions and the IXP4XX_PCI_CSR macro. In each case, I went with the version that has fewer callers to keep the change small. Fixes: f7821b493458 ("PCI: ixp4xx: Add a new driver for IXP4xx") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Acked-by: Lorenzo Pieralisi Cc: soc@kernel.org Link: https://lore.kernel.org/r/20210721151546.2325937-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann commit 813bacf4109802926d86f2d7c6583c6c0a0fddb5 Author: Linus Walleij Date: Sun Aug 8 00:55:18 2021 +0200 ARM: configs: Update the nhk8815_defconfig The platform lost the framebuffer due to a commit solving a circular dependency in v5.14-rc1, so add it back in by explicitly selecting the framebuffer. Also fix up some Kconfig options that got dropped or moved around while we're at it. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Linus Walleij Cc: Kees Cook Link: https://lore.kernel.org/r/20210807225518.3607126-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit a1fa72683166b3c69511d5f2ffb37b9f49f48fea Merge: 3e234e9f7f812 bf33677a3c394 Author: Dave Airlie Date: Fri Aug 13 06:37:31 2021 +1000 Merge tag 'drm-misc-fixes-2021-08-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * meson: Fix colors when booting with HDR Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YRTb+qUuBYWjJDVg@linux-uq9g.fritz.box commit 3e234e9f7f812f20b4ec7011840f93eab816a29a Merge: bf71bde473c3b ffd5caa26f6af Author: Dave Airlie Date: Fri Aug 13 06:29:12 2021 +1000 Merge tag 'drm-intel-fixes-2021-08-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - GVT fix for Windows VM hang. - Display fix of 12 BPC bits for display 12 and newer. - Don't try to access some media register for fused off domains. - Fix kerneldoc build warnings. Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YRU/hnQ1sNr+j37x@intel.com commit a9a507013a6f98218d1797c8808bd9ba1e79782d Merge: 49b0b6ffe20c5 1090340f7ee53 Author: Jakub Kicinski Date: Thu Aug 12 11:50:16 2021 -0700 Merge tag 'ieee802154-for-davem-2021-08-12' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== ieee802154 for net 2021-08-12 Mostly fixes coming from bot reports. Dongliang Mu tackled some syzkaller reports in hwsim again and Takeshi Misawa a memory leak in ieee802154 raw. * tag 'ieee802154-for-davem-2021-08-12' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan: net: Fix memory leak in ieee802154_raw_deliver ieee802154: hwsim: fix GPF in hwsim_new_edge_nl ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi ==================== Link: https://lore.kernel.org/r/20210812183912.1663996-1-stefan@datenfreihafen.org Signed-off-by: Jakub Kicinski commit 064855a69003c24bd6b473b367d364e418c57625 Author: Babu Moger Date: Mon Aug 2 14:38:58 2021 -0500 x86/resctrl: Fix default monitoring groups reporting Creating a new sub monitoring group in the root /sys/fs/resctrl leads to getting the "Unavailable" value for mbm_total_bytes and mbm_local_bytes on the entire filesystem. Steps to reproduce: 1. mount -t resctrl resctrl /sys/fs/resctrl/ 2. cd /sys/fs/resctrl/ 3. cat mon_data/mon_L3_00/mbm_total_bytes 23189832 4. Create sub monitor group: mkdir mon_groups/test1 5. cat mon_data/mon_L3_00/mbm_total_bytes Unavailable When a new monitoring group is created, a new RMID is assigned to the new group. But the RMID is not active yet. When the events are read on the new RMID, it is expected to report the status as "Unavailable". When the user reads the events on the default monitoring group with multiple subgroups, the events on all subgroups are consolidated together. Currently, if any of the RMID reads report as "Unavailable", then everything will be reported as "Unavailable". Fix the issue by discarding the "Unavailable" reads and reporting all the successful RMID reads. This is not a problem on Intel systems as Intel reports 0 on Inactive RMIDs. Fixes: d89b7379015f ("x86/intel_rdt/cqm: Add mon_data") Reported-by: Paweł Szulik Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Acked-by: Reinette Chatre Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=213311 Link: https://lkml.kernel.org/r/162793309296.9224.15871659871696482080.stgit@bmoger-ubuntu commit 49b0b6ffe20c5344f4173f3436298782a08da4f2 Author: Longpeng(Mike) Date: Thu Aug 12 13:30:56 2021 +0800 vsock/virtio: avoid potential deadlock when vsock device remove There's a potential deadlock case when remove the vsock device or process the RESET event: vsock_for_each_connected_socket: spin_lock_bh(&vsock_table_lock) ----------- (1) ... virtio_vsock_reset_sock: lock_sock(sk) --------------------- (2) ... spin_unlock_bh(&vsock_table_lock) lock_sock() may do initiative schedule when the 'sk' is owned by other thread at the same time, we would receivce a warning message that "scheduling while atomic". Even worse, if the next task (selected by the scheduler) try to release a 'sk', it need to request vsock_table_lock and the deadlock occur, cause the system into softlockup state. Call trace: queued_spin_lock_slowpath vsock_remove_bound vsock_remove_sock virtio_transport_release __vsock_release vsock_release __sock_release sock_close __fput ____fput So we should not require sk_lock in this case, just like the behavior in vhost_vsock or vmci. Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Cc: Stefan Hajnoczi Signed-off-by: Longpeng(Mike) Reviewed-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210812053056.1699-1-longpeng2@huawei.com Signed-off-by: Jakub Kicinski commit 5acce0bff2a0420ce87d4591daeb867f47d552c2 Author: Steven Rostedt (VMware) Date: Sun Aug 8 00:30:11 2021 -0400 tracing / histogram: Fix NULL pointer dereference on strcmp() on NULL event name The following commands: # echo 'read_max u64 size;' > synthetic_events # echo 'hist:keys=common_pid:count=count:onmax($count).trace(read_max,count)' > events/syscalls/sys_enter_read/trigger Causes: 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 CPU: 4 PID: 1763 Comm: bash Not tainted 5.14.0-rc2-test+ #155 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:strcmp+0xc/0x20 Code: 75 f7 31 c0 0f b6 0c 06 88 0c 02 48 83 c0 01 84 c9 75 f1 4c 89 c0 c3 0f 1f 80 00 00 00 00 31 c0 eb 08 48 83 c0 01 84 d2 74 0f <0f> b6 14 07 3a 14 06 74 ef 19 c0 83 c8 01 c3 31 c0 c3 66 90 48 89 RSP: 0018:ffffb5fdc0963ca8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffffffb3a4e040 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff9714c0d0b640 RDI: 0000000000000000 RBP: 0000000000000000 R08: 00000022986b7cde R09: ffffffffb3a4dff8 R10: 0000000000000000 R11: 0000000000000000 R12: ffff9714c50603c8 R13: 0000000000000000 R14: ffff97143fdf9e48 R15: ffff9714c01a2210 FS: 00007f1fa6785740(0000) GS:ffff9714da400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000002d863004 CR4: 00000000001706e0 Call Trace: __find_event_file+0x4e/0x80 action_create+0x6b7/0xeb0 ? kstrdup+0x44/0x60 event_hist_trigger_func+0x1a07/0x2130 trigger_process_regex+0xbd/0x110 event_trigger_write+0x71/0xd0 vfs_write+0xe9/0x310 ksys_write+0x68/0xe0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f1fa6879e87 The problem was the "trace(read_max,count)" where the "count" should be "$count" as "onmax()" only handles variables (although it really should be able to figure out that "count" is a field of sys_enter_read). But there's a path that does not find the variable and ends up passing a NULL for the event, which ends up getting passed to "strcmp()". Add a check for NULL to return and error on the command with: # cat error_log hist:syscalls:sys_enter_read: error: Couldn't create or find variable Command: hist:keys=common_pid:count=count:onmax($count).trace(read_max,count) ^ Link: https://lkml.kernel.org/r/20210808003011.4037f8d0@oasis.local.home Cc: Masami Hiramatsu Cc: stable@vger.kernel.org Fixes: 50450603ec9cb tracing: Add 'onmax' hist trigger action support Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit d0ac5fbaf783d59715b8bf426fdffc8c9e84187a Author: Masami Hiramatsu Date: Thu Aug 5 11:10:51 2021 +0900 init: Suppress wrong warning for bootconfig cmdline parameter Since the 'bootconfig' command line parameter is handled before parsing the command line, it doesn't use early_param(). But in this case, kernel shows a wrong warning message about it. [ 0.013714] Kernel command line: ro console=ttyS0 bootconfig console=tty0 [ 0.013741] Unknown command line parameters: bootconfig To suppress this message, add a dummy handler for 'bootconfig'. Link: https://lkml.kernel.org/r/162812945097.77369.1849780946468010448.stgit@devnote2 Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters") Reviewed-by: Andrew Halaney Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 12f9951d3f311acb1d4ffe8e839bc2c07983546f Author: Lukas Bulwahn Date: Fri Aug 6 21:50:27 2021 +0200 tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS Commit 2860cd8a2353 ("livepatch: Use the default ftrace_ops instead of REGS when ARGS is available") intends to enable config LIVEPATCH when ftrace with ARGS is available. However, the chain of configs to enable LIVEPATCH is incomplete, as HAVE_DYNAMIC_FTRACE_WITH_ARGS is available, but the definition of DYNAMIC_FTRACE_WITH_ARGS, combining DYNAMIC_FTRACE and HAVE_DYNAMIC_FTRACE_WITH_ARGS, needed to enable LIVEPATCH, is missing in the commit. Fortunately, ./scripts/checkkconfigsymbols.py detects this and warns: DYNAMIC_FTRACE_WITH_ARGS Referencing files: kernel/livepatch/Kconfig So, define the config DYNAMIC_FTRACE_WITH_ARGS analogously to the already existing similar configs, DYNAMIC_FTRACE_WITH_REGS and DYNAMIC_FTRACE_WITH_DIRECT_CALLS, in ./kernel/trace/Kconfig to connect the chain of configs. Link: https://lore.kernel.org/kernel-janitors/CAKXUXMwT2zS9fgyQHKUUiqo8ynZBdx2UEUu1WnV_q0OCmknqhw@mail.gmail.com/ Link: https://lkml.kernel.org/r/20210806195027.16808-1-lukas.bulwahn@gmail.com Cc: Josh Poimboeuf Cc: Jiri Kosina Cc: Peter Zijlstra Cc: Miroslav Benes Cc: stable@vger.kernel.org Fixes: 2860cd8a2353 ("livepatch: Use the default ftrace_ops instead of REGS when ARGS is available") Signed-off-by: Lukas Bulwahn Signed-off-by: Steven Rostedt (VMware) commit 0e05ba498dd0a19fc12868a9506be0f86cf36912 Author: Daniel Bristot de Oliveira Date: Sun Jul 18 11:07:55 2021 +0200 trace/osnoise: Print a stop tracing message When using osnoise/timerlat with stop tracing, sometimes it is not clear in which CPU the stop condition was hit, mainly when using some extra events. Print a message informing in which CPU the trace stopped, like in the example below: -0 [006] d.h. 2932.676616: #1672599 context irq timer_latency 34689 ns -0 [006] dNh. 2932.676618: irq_noise: local_timer:236 start 2932.676615639 duration 2391 ns -0 [006] dNh. 2932.676620: irq_noise: virtio0-output.0:47 start 2932.676620180 duration 86 ns -0 [003] d.h. 2932.676621: #1673374 context irq timer_latency 1200 ns -0 [006] d... 2932.676623: thread_noise: swapper/6:0 start 2932.676615964 duration 4339 ns -0 [003] dNh. 2932.676623: irq_noise: local_timer:236 start 2932.676620597 duration 1881 ns -0 [006] d... 2932.676623: sched_switch: prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=timerlat/6 next_pid=852 next_prio=4 timerlat/6-852 [006] .... 2932.676623: #1672599 context thread timer_latency 41931 ns -0 [003] d... 2932.676623: thread_noise: swapper/3:0 start 2932.676620854 duration 880 ns -0 [003] d... 2932.676624: sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=timerlat/3 next_pid=849 next_prio=4 timerlat/6-852 [006] .... 2932.676624: timerlat_main: stop tracing hit on cpu 6 timerlat/3-849 [003] .... 2932.676624: #1673374 context thread timer_latency 4310 ns Link: https://lkml.kernel.org/r/b30a0d7542adba019185f44ee648e60e14923b11.1626598844.git.bristot@kernel.org Cc: Tom Zanussi Cc: Namhyung Kim Cc: Masami Hiramatsu Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit e1c4ad4a7f58417a6c483432b69c640670b6fe3d Author: Daniel Bristot de Oliveira Date: Sun Jul 18 11:07:54 2021 +0200 trace/timerlat: Add a header with PREEMPT_RT additional fields Some extra flags are printed to the trace header when using the PREEMPT_RT config. The extra flags are: need-resched-lazy, preempt-lazy-depth, and migrate-disable. Without printing these fields, the timerlat specific fields are shifted by three positions, for example: # tracer: timerlat # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # || / # |||| ACTIVATION # TASK-PID CPU# |||| TIMESTAMP ID CONTEXT LATENCY # | | | |||| | | | | -0 [000] d..h... 3279.798871: #1 context irq timer_latency 830 ns <...>-807 [000] ....... 3279.798881: #1 context thread timer_latency 11301 ns Add a new header for timerlat with the missing fields, to be used when the PREEMPT_RT is enabled. Link: https://lkml.kernel.org/r/babb83529a3211bd0805be0b8c21608230202c55.1626598844.git.bristot@kernel.org Cc: Tom Zanussi Cc: Namhyung Kim Cc: Masami Hiramatsu Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit d03721a6e7e8c04261873b3840daa3ce2c5b0543 Author: Daniel Bristot de Oliveira Date: Sun Jul 18 11:07:53 2021 +0200 trace/osnoise: Add a header with PREEMPT_RT additional fields Some extra flags are printed to the trace header when using the PREEMPT_RT config. The extra flags are: need-resched-lazy, preempt-lazy-depth, and migrate-disable. Without printing these fields, the osnoise specific fields are shifted by three positions, for example: # tracer: osnoise # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth MAX # || / SINGLE Interference counters: # |||| RUNTIME NOISE %% OF CPU NOISE +-----------------------------+ # TASK-PID CPU# |||| TIMESTAMP IN US IN US AVAILABLE IN US HW NMI IRQ SIRQ THREAD # | | | |||| | | | | | | | | | | <...>-741 [000] ....... 1105.690909: 1000000 234 99.97660 36 21 0 1001 22 3 <...>-742 [001] ....... 1105.691923: 1000000 281 99.97190 197 7 0 1012 35 14 <...>-743 [002] ....... 1105.691958: 1000000 1324 99.86760 118 11 0 1016 155 143 <...>-744 [003] ....... 1105.691998: 1000000 109 99.98910 21 4 0 1004 33 7 <...>-745 [004] ....... 1105.692015: 1000000 2023 99.79770 97 37 0 1023 52 18 Add a new header for osnoise with the missing fields, to be used when the PREEMPT_RT is enabled. Link: https://lkml.kernel.org/r/1f03289d2a51fde5a58c2e7def063dc630820ad1.1626598844.git.bristot@kernel.org Cc: Tom Zanussi Cc: Namhyung Kim Cc: Masami Hiramatsu Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit f8fbb47c6e86c0b75f8df864db702c3e3f757361 Merge: 59cd4f435ee97 f153c2246783b Author: Linus Torvalds Date: Thu Aug 12 07:20:16 2021 -1000 Merge branch 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull ucounts fix from Eric Biederman: "This fixes the ucount sysctls on big endian architectures. The counts were expanded to be longs instead of ints, and the sysctl code was overlooked, so only the low 32bit were being processed. On litte endian just processing the low 32bits is fine, but on 64bit big endian processing just the low 32bits results in the high order bits instead of the low order bits being processed and nothing works proper. This change took a little bit to mature as we have the SYSCTL_ZERO, and SYSCTL_INT_MAX macros that are only usable for sysctls operating on ints, but unfortunately are not obviously broken. Which resulted in the versions of this change working on big endian and not on little endian, because the int SYSCTL_ZERO when extended 64bit wound up being 0x100000000. So we only allowed values greater than 0x100000000 and less than 0faff. Which unfortunately broken everything that tried to set the sysctls. (First reported with the windows subsystem for linux). I have tested this on x86_64 64bit after first reproducing the problems with the earlier version of this change, and then verifying the problems do not exist when we use appropriate long min and max values for extra1 and extra2" * 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ucounts: add missing data type changes commit 59cd4f435ee972b8fb87d50ea36d76929aabf3a3 Merge: 1746f4db51356 d07149aba2ef4 Author: Linus Torvalds Date: Thu Aug 12 07:06:40 2021 -1000 Merge tag 'sound-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This seems to be a usual bump in the middle, containing lots of pending ASoC fixes: - Yet another PCM mmap regression fix - Fix for ASoC DAPM prefix handling - Various cs42l42 codec fixes - PCM buffer reference fixes in a few ASoC drivers - Fixes for ASoC SOF, AMD, tlv320, WM - HD-audio quirks" * tag 'sound-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits) ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PC ALSA: pcm: Fix mmap breakage without explicit buffer setup ALSA: hda: Add quirk for ASUS Flow x13 ASoC: cs42l42: Fix mono playback ASoC: cs42l42: Constrain sample rate to prevent illegal SCLK ASoC: cs42l42: Fix LRCLK frame start edge ASoC: cs42l42: PLL must be running when changing MCLK_SRC_SEL ASoC: cs42l42: Remove duplicate control for WNF filter frequency ASoC: cs42l42: Fix inversion of ADC Notch Switch control ASoC: SOF: Intel: hda-ipc: fix reply size checking ASoC: SOF: Intel: Kconfig: fix SoundWire dependencies ASoC: amd: Fix reference to PCM buffer address ASoC: nau8824: Fix open coded prefix handling ASoC: kirkwood: Fix reference to PCM buffer address ASoC: uniphier: Fix reference to PCM buffer address ASoC: xilinx: Fix reference to PCM buffer address ASoC: intel: atom: Fix reference to PCM buffer address ASoC: cs42l42: Fix bclk calculation for mono ASoC: cs42l42: Don't allow SND_SOC_DAIFMT_LEFT_J ASoC: cs42l42: Correct definition of ADC Volume control ... commit d9d5b8961284b0051726e0fcda91d1e297e087f5 Author: Andy Shevchenko Date: Wed Aug 11 15:48:45 2021 +0300 wwan: core: Avoid returning NULL from wwan_create_dev() Make wwan_create_dev() to return either valid or error pointer, In some cases it may return NULL. Prevent this by converting it to the respective error pointer. Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem") Signed-off-by: Andy Shevchenko Acked-by: Sergey Ryazanov Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/20210811124845.10955-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit 9e992755be8f2d458a0bcbefd19e493483c1dba2 Author: Rohith Surabattula Date: Mon Aug 9 09:32:46 2021 +0000 cifs: Call close synchronously during unlink/rename/lease break. During unlink/rename/lease break, deferred work for close is scheduled immediately but in an asynchronous manner which might lead to race with actual(unlink/rename) commands. This change will schedule close synchronously which will avoid the race conditions with other commands. Signed-off-by: Rohith Surabattula Reviewed-by: Shyam Prasad N Cc: stable@vger.kernel.org # 5.13 Signed-off-by: Steve French commit 41535701da3324b80029cabb501e86c4fafe339d Author: Rohith Surabattula Date: Thu Jul 29 07:45:29 2021 +0000 cifs: Handle race conditions during rename When rename is executed on directory which has files for which close is deferred, then rename will fail with EACCES. This patch will try to close all deferred files when EACCES is received and retry rename on a directory. Signed-off-by: Rohith Surabattula Cc: stable@vger.kernel.org # 5.13 Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 88ca2521bd5b4e8b83743c01a2d4cb09325b51e9 Author: Maximilian Heyne Date: Thu Aug 12 13:09:27 2021 +0000 xen/events: Fix race in set_evtchn_to_irq There is a TOCTOU issue in set_evtchn_to_irq. Rows in the evtchn_to_irq mapping are lazily allocated in this function. The check whether the row is already present and the row initialization is not synchronized. Two threads can at the same time allocate a new row for evtchn_to_irq and add the irq mapping to the their newly allocated row. One thread will overwrite what the other has set for evtchn_to_irq[row] and therefore the irq mapping is lost. This will trigger a BUG_ON later in bind_evtchn_to_cpu: INFO: pci 0000:1a:15.4: [1d0f:8061] type 00 class 0x010802 INFO: nvme 0000:1a:12.1: enabling device (0000 -> 0002) INFO: nvme nvme77: 1/0/0 default/read/poll queues CRIT: kernel BUG at drivers/xen/events/events_base.c:427! WARN: invalid opcode: 0000 [#1] SMP NOPTI WARN: Workqueue: nvme-reset-wq nvme_reset_work [nvme] WARN: RIP: e030:bind_evtchn_to_cpu+0xc2/0xd0 WARN: Call Trace: WARN: set_affinity_irq+0x121/0x150 WARN: irq_do_set_affinity+0x37/0xe0 WARN: irq_setup_affinity+0xf6/0x170 WARN: irq_startup+0x64/0xe0 WARN: __setup_irq+0x69e/0x740 WARN: ? request_threaded_irq+0xad/0x160 WARN: request_threaded_irq+0xf5/0x160 WARN: ? nvme_timeout+0x2f0/0x2f0 [nvme] WARN: pci_request_irq+0xa9/0xf0 WARN: ? pci_alloc_irq_vectors_affinity+0xbb/0x130 WARN: queue_request_irq+0x4c/0x70 [nvme] WARN: nvme_reset_work+0x82d/0x1550 [nvme] WARN: ? check_preempt_wakeup+0x14f/0x230 WARN: ? check_preempt_curr+0x29/0x80 WARN: ? nvme_irq_check+0x30/0x30 [nvme] WARN: process_one_work+0x18e/0x3c0 WARN: worker_thread+0x30/0x3a0 WARN: ? process_one_work+0x3c0/0x3c0 WARN: kthread+0x113/0x130 WARN: ? kthread_park+0x90/0x90 WARN: ret_from_fork+0x3a/0x50 This patch sets evtchn_to_irq rows via a cmpxchg operation so that they will be set only once. The row is now cleared before writing it to evtchn_to_irq in order to not create a race once the row is visible for other threads. While at it, do not require the page to be zeroed, because it will be overwritten with -1's in clear_evtchn_to_irq_row anyway. Signed-off-by: Maximilian Heyne Fixes: d0b075ffeede ("xen/events: Refactor evtchn_to_irq array to be dynamically allocated") Link: https://lore.kernel.org/r/20210812130930.127134-1-mheyne@amazon.de Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit 73fcbad691110ece47a487c9e584822070e3626f Author: Hans de Goede Date: Thu Aug 12 16:55:13 2021 +0200 platform/x86: asus-nb-wmi: Add tablet_mode_sw=lid-flip quirk for the TP200s The Asus TP200s / E205SA 360 degree hinges 2-in-1 supports reporting SW_TABLET_MODE info through the ASUS_WMI_DEVID_LID_FLIP WMI device-id. Add a quirk to enable this. BugLink: https://gitlab.freedesktop.org/libinput/libinput/-/issues/639 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210812145513.39117-2-hdegoede@redhat.com commit 7f45621c14a209b986cd636447bb53b7f6f881c3 Author: Hans de Goede Date: Thu Aug 12 16:55:12 2021 +0200 platform/x86: asus-nb-wmi: Allow configuring SW_TABLET_MODE method with a module option Unfortunately we have been unable to find a reliable way to detect if and how SW_TABLET_MODE reporting is supported, so we are relying on DMI quirks for this. Add a module-option to specify the SW_TABLET_MODE method so that this can be easily tested without needing to rebuild the kernel. BugLink: https://gitlab.freedesktop.org/libinput/libinput/-/issues/639 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210812145513.39117-1-hdegoede@redhat.com commit 839ad22f755132838f406751439363c07272ad87 Author: Randy Dunlap Date: Fri Jul 30 17:01:46 2021 -0700 x86/tools: Fix objdump version check again Skip (omit) any version string info that is parenthesized. Warning: objdump version 15) is older than 2.19 Warning: Skipping posttest. where 'objdump -v' says: GNU objdump (GNU Binutils; SUSE Linux Enterprise 15) 2.35.1.20201123-7.18 Fixes: 8bee738bb1979 ("x86: Fix objdump version check in chkobjdump.awk for different formats.") Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210731000146.2720-1-rdunlap@infradead.org commit fdf3a7a1e0a67a52f631b055975c6ac7e0e49a65 Author: Alexandre Ghiti Date: Mon Jul 26 07:42:54 2021 +0200 riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE The current comment states that we check if the 64-bit kernel mapping overlaps with the last 4K of the address space that is reserved to error values in create_kernel_page_table, which is not the case since it is done in setup_vm. But anyway, remove the reference to any function and simply note that in 64-bit kernel, the check should be done as soon as the kernel mapping base address is known. Fixes: db6b84a368b4 ("riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE") Signed-off-by: Alexandre Ghiti Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 030d6dbf0c2e5fdf23ad29557f0c87a882993e26 Author: Changbin Du Date: Thu Jul 22 10:17:15 2021 +0800 riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it The RISC-V special option '-mno-relax' which to disable linker relaxations is supported by GCC8+. For GCC7 and lower versions do not support this option. Fixes: fba8a8674f68 ("RISC-V: Add kexec support") Signed-off-by: Changbin Du Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit cbc06f051c524dcfe52ef0d1f30647828e226d30 Author: Cédric Le Goater Date: Sat Aug 7 09:20:57 2021 +0200 powerpc/xive: Do not skip CPU-less nodes when creating the IPIs On PowerVM, CPU-less nodes can be populated with hot-plugged CPUs at runtime. Today, the IPI is not created for such nodes, and hot-plugged CPUs use a bogus IPI, which leads to soft lockups. We can not directly allocate and request the IPI on demand because bringup_up() is called under the IRQ sparse lock. The alternative is to allocate the IPIs for all possible nodes at startup and to request the mapping on demand when the first CPU of a node is brought up. Fixes: 7dcc37b3eff9 ("powerpc/xive: Map one IPI interrupt per node") Cc: stable@vger.kernel.org # v5.13 Reported-by: Geetika Moolchandani Signed-off-by: Cédric Le Goater Tested-by: Srikar Dronamraju Tested-by: Laurent Vivier Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210807072057.184698-1-clg@kaod.org commit 01fcac8e4dfc112f420dcaeb70056a74e326cacf Author: Christophe Leroy Date: Tue Aug 10 16:13:17 2021 +0000 powerpc/interrupt: Do not call single_step_exception() from other exceptions single_step_exception() is called by emulate_single_step() which is called from (at least) alignment exception() handler and program_check_exception() handler. Redefine it as a regular __single_step_exception() which is called by both single_step_exception() handler and emulate_single_step() function. Fixes: 3a96570ffceb ("powerpc: convert interrupt handlers to use wrappers") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/aed174f5cbc06f2cf95233c071d8aac948e46043.1628611921.git.christophe.leroy@csgroup.eu commit 98694166c27d473c36b434bd3572934c2f2a16ab Author: Christophe Leroy Date: Tue Aug 10 16:13:16 2021 +0000 powerpc/interrupt: Fix OOPS by not calling do_IRQ() from timer_interrupt() An interrupt handler shall not be called from another interrupt handler otherwise this leads to problems like the following: Kernel attempted to write user page (afd4fa84) - exploit attempt? (uid: 1000) ------------[ cut here ]------------ Bug: Write fault blocked by KUAP! WARNING: CPU: 0 PID: 1617 at arch/powerpc/mm/fault.c:230 do_page_fault+0x484/0x720 Modules linked in: CPU: 0 PID: 1617 Comm: sshd Tainted: G W 5.13.0-pmac-00010-g8393422eb77 #7 NIP: c001b77c LR: c001b77c CTR: 00000000 REGS: cb9e5bc0 TRAP: 0700 Tainted: G W (5.13.0-pmac-00010-g8393422eb77) MSR: 00021032 CR: 24942424 XER: 00000000 GPR00: c001b77c cb9e5c80 c1582c00 00000021 3ffffbff 085b0000 00000027 c8eb644c GPR08: 00000023 00000000 00000000 00000000 24942424 0063f8c8 00000000 000186a0 GPR16: afd52dd4 afd52dd0 afd52dcc afd52dc8 0065a990 c07640c4 cb9e5e98 cb9e5e90 GPR24: 00000040 afd4fa96 00000040 02000000 c1fda6c0 afd4fa84 00000300 cb9e5cc0 NIP [c001b77c] do_page_fault+0x484/0x720 LR [c001b77c] do_page_fault+0x484/0x720 Call Trace: [cb9e5c80] [c001b77c] do_page_fault+0x484/0x720 (unreliable) [cb9e5cb0] [c000424c] DataAccess_virt+0xd4/0xe4 --- interrupt: 300 at __copy_tofrom_user+0x110/0x20c NIP: c001f9b4 LR: c03250a0 CTR: 00000004 REGS: cb9e5cc0 TRAP: 0300 Tainted: G W (5.13.0-pmac-00010-g8393422eb77) MSR: 00009032 CR: 48028468 XER: 20000000 DAR: afd4fa84 DSISR: 0a000000 GPR00: 20726f6f cb9e5d80 c1582c00 00000004 cb9e5e3a 00000016 afd4fa80 00000000 GPR08: 3835202d 72777872 2d78722d 00000004 28028464 0063f8c8 00000000 000186a0 GPR16: afd52dd4 afd52dd0 afd52dcc afd52dc8 0065a990 c07640c4 cb9e5e98 cb9e5e90 GPR24: 00000040 afd4fa96 00000040 cb9e5e0c 00000daa a0000000 cb9e5e98 afd4fa56 NIP [c001f9b4] __copy_tofrom_user+0x110/0x20c LR [c03250a0] _copy_to_iter+0x144/0x990 --- interrupt: 300 [cb9e5d80] [c03e89c0] n_tty_read+0xa4/0x598 (unreliable) [cb9e5df0] [c03e2a0c] tty_read+0xdc/0x2b4 [cb9e5e80] [c0156bf8] vfs_read+0x274/0x340 [cb9e5f00] [c01571ac] ksys_read+0x70/0x118 [cb9e5f30] [c0016048] ret_from_syscall+0x0/0x28 --- interrupt: c00 at 0xa7855c88 NIP: a7855c88 LR: a7855c5c CTR: 00000000 REGS: cb9e5f40 TRAP: 0c00 Tainted: G W (5.13.0-pmac-00010-g8393422eb77) MSR: 0000d032 CR: 2402446c XER: 00000000 GPR00: 00000003 afd4ec70 a72137d0 0000000b afd4ecac 00004000 0065a990 00000800 GPR08: 00000000 a7947930 00000000 00000004 c15831b0 0063f8c8 00000000 000186a0 GPR16: afd52dd4 afd52dd0 afd52dcc afd52dc8 0065a990 0065a9e0 00000001 0065fac0 GPR24: 00000000 00000089 00664050 00000000 00668e30 a720c8dc a7943ff4 0065f9b0 NIP [a7855c88] 0xa7855c88 LR [a7855c5c] 0xa7855c5c --- interrupt: c00 Instruction dump: 3884aa88 38630178 48076861 807f0080 48042e45 2f830000 419e0148 3c80c079 3c60c076 38841be4 386301c0 4801f705 <0fe00000> 3860000b 4bfffe30 3c80c06b ---[ end trace fd69b91a8046c2e5 ]--- Here the problem is that by re-enterring an exception handler, kuap_save_and_lock() is called a second time with this time KUAP access locked, leading to regs->kuap being overwritten hence KUAP not being unlocked at exception exit as expected. Do not call do_IRQ() from timer_interrupt() directly. Instead, redefine do_IRQ() as a standard function named __do_IRQ(), and call it from both do_IRQ() and time_interrupt() handlers. Fixes: 3a96570ffceb ("powerpc: convert interrupt handlers to use wrappers") Cc: stable@vger.kernel.org # v5.12+ Reported-by: Stan Johnson Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c17d234f4927d39a1d7100864a8e1145323d33a0.1628611927.git.christophe.leroy@csgroup.eu commit 67bb66d32905627e29400e2cb7f87a7c4c8cf667 Author: Takashi Sakamoto Date: Thu Aug 12 11:28:39 2021 +0900 ALSA: oxfw: fix functioal regression for silence in Apogee Duet FireWire OXFW 971 has no function to use the value in syt field of received isochronous packet for playback timing generation. In kernel prepatch for v5.14, ALSA OXFW driver got change to send NO_INFO value in the field instead of actual timing value. The change brings Apogee Duet FireWire to generate no playback sound, while output meter moves. As long as I investigate, _any_ value in the syt field takes the device to generate sound. It's reasonable to think that the device just ignores data blocks in packet with NO_INFO value in its syt field for audio data processing. This commit adds a new flag for the quirk to fix regression. Fixes: 029ffc429440 ("ALSA: oxfw: perform sequence replay for media clock recovery") Cc: Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210812022839.42043-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a2befe9380dd04ee76c871568deca00eedf89134 Author: Jaroslav Kysela Date: Wed Aug 11 18:14:41 2021 +0200 ALSA: hda - fix the 'Capture Switch' value change notifications The original code in the cap_put_caller() function does not handle correctly the positive values returned from the passed function for multiple iterations. It means that the change notifications may be lost. Fixes: 352f7f914ebb ("ALSA: hda - Merge Realtek parser code to generic parser") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213851 Cc: Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210811161441.1325250-1-perex@perex.cz Signed-off-by: Takashi Iwai commit ffd5caa26f6afde0c1e3ed126806607748a83c6e Author: Daniel Vetter Date: Tue Aug 10 16:27:48 2021 +0200 drm/doc/rfc: drop lmem uapi section We still have quite a bit more work to do with overall reworking of the ttm-based dg1 code, but the uapi stuff is now finalized with the latest pull. So remove that. This also fixes kerneldoc build warnings because we've included the same headers in two places, resulting in sphinx complaining about duplicated symbols. This regression has been created when we moved the uapi definitions to the real include/uapi/ folder in 727ecd99a4c9 ("drm/doc/rfc: drop the i915_gem_lmem.h header") v2: Fix a few references that I missed, the htmldocs build took forever. Acked-by: Jason Ekstrand Acked-by: Maarten Lankhorst Tested-by Stephen Rothwell (v1) References: https://lore.kernel.org/dri-devel/20210603193242.1ce99344@canb.auug.org.au/ Reported-by: Stephen Rothwell Cc: Stephen Rothwell Fixes: 727ecd99a4c9 ("drm/doc/rfc: drop the i915_gem_lmem.h header") Cc: Matthew Auld Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210810142748.1983271-1-daniel.vetter@ffwll.ch (cherry picked from commit dae2d28832968751f7731336b560a4a84a197b76) Signed-off-by: Rodrigo Vivi commit 24d032e2359e3abc926b3d423f49a7c33e0b7836 Author: Matt Roper Date: Fri Aug 6 10:41:30 2021 -0700 drm/i915: Only access SFC_DONE when media domain is not fused off The SFC_DONE register lives within the corresponding VD0/VD2/VD4/VD6 forcewake domain and is not accessible if the vdbox in that domain is fused off and the forcewake is not initialized. This mistake went unnoticed because until recently we were using the wrong register offset for the SFC_DONE register; once the register offset was corrected, we started hitting errors like <4> [544.989065] i915 0000:cc:00.0: Uninitialized forcewake domain(s) 0x80 accessed at 0x1ce000 on parts with fused-off vdbox engines. Fixes: e50dbdbfd9fb ("drm/i915/tgl: Add SFC instdone to error state") Fixes: 9c9c6d0ab08a ("drm/i915: Correct SFC_DONE register offset") Cc: Daniele Ceraolo Spurio Cc: Mika Kuoppala Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210806174130.1058960-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit c5589bb5dccb0c5cb74910da93663f489589f3ce) Signed-off-by: Rodrigo Vivi [Changed Fixes tag to match the cherry-picked 82929a2140eb] commit abd9d66a055722393d33685214c08386694871d7 Author: Ankit Nautiyal Date: Wed Aug 11 10:48:57 2021 +0530 drm/i915/display: Fix the 12 BPC bits for PIPE_MISC reg Till DISPLAY12 the PIPE_MISC bits 5-7 are used to set the Dithering BPC, with valid values of 6, 8, 10 BPC. For ADLP+ these bits are used to set the PORT OUTPUT BPC, with valid values of: 6, 8, 10, 12 BPC, and need to be programmed whether dithering is enabled or not. This patch: -corrects the bits 5-7 for PIPE MISC register for 12 BPC. -renames the bits and mask to have generic names for these bits for dithering bpc and port output bpc. v3: Added a note for MIPI DSI which uses the PIPE_MISC for readout for pipe_bpp. (Uma Shankar) v2: Added 'display' to the subject and fixes tag. (Uma Shankar) Fixes: 756f85cffef2 ("drm/i915/bdw: Broadwell has PIPEMISC") Cc: Paulo Zanoni (v1) Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: # v3.13+ Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20210811051857.109723-1-ankit.k.nautiyal@intel.com (cherry picked from commit 70418a68713c13da3f36c388087d0220b456a430) Signed-off-by: Rodrigo Vivi commit 700fa08da43edb0af3e6a513f0255443e96088e8 Author: Vladimir Oltean Date: Wed Aug 11 14:59:45 2021 +0300 net: dsa: sja1105: unregister the MDIO buses during teardown The call to sja1105_mdiobus_unregister is present in the error path but absent from the main driver unbind path. Fixes: 5a8f09748ee7 ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c4b68e513953c3370ce02c3208c1c628c0b86fd3 Author: Mario Limonciello Date: Mon Aug 9 15:15:13 2021 -0500 pinctrl: amd: Fix an issue with shutdown when system set to s0ix IRQs are getting armed on shutdown causing the system to immediately wake back up. Link: https://lkml.org/lkml/2021/8/2/1114 Reported-by: nix.or.die@googlemail.com Acked-by: Shyam Sundar S K Tested-by: Gabriel Craciunescu CC: Raul E Rangel Fixes: d62bd5ce12d7 ("pinctrl: amd: Implement irq_set_wake") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210809201513.12367-1-mario.limonciello@amd.com Signed-off-by: Linus Walleij commit 86704993e6a5989e256b4212ca03115cc2694eda Author: Hoang Le Date: Wed Aug 11 08:22:09 2021 +0700 Revert "tipc: Return the correct errno code" This reverts commit 0efea3c649f0 because of: - The returning -ENOBUF error is fine on socket buffer allocation. - There is side effect in the calling path tipc_node_xmit()->tipc_link_xmit() when checking error code returning. Fixes: 0efea3c649f0 ("tipc: Return the correct errno code") Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 48c812e0327744b4965296f65c23fe2405692afc Author: Mark Brown Date: Tue Aug 10 13:37:48 2021 +0100 net: mscc: Fix non-GPL export of regmap APIs The ocelot driver makes use of regmap, wrapping it with driver specific operations that are thin wrappers around the core regmap APIs. These are exported with EXPORT_SYMBOL, dropping the _GPL from the core regmap exports which is frowned upon. Add _GPL suffixes to at least the APIs that are doing register I/O. Signed-off-by: Mark Brown Acked-by: Alexandre Belloni Signed-off-by: David S. Miller commit f753067494c2726d7a09ffca351d9b2599fee876 Author: Georgi Djakov Date: Thu Aug 12 09:24:39 2021 +0300 Revert "interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate" This reverts commit f84f5b6f72e68bbaeb850b58ac167e4a3a47532a, which is causing regressions on some platforms, preventing them to boot or do a clean reboot. This is because the above commit is sending also all the zero bandwidth requests to turn off any resources that might be enabled unnecessarily, but currently this may turn off interconnects that are enabled by default, but with no consumer to keep them on. Let's revert this for now as some platforms are not ready for such change yet. In the future we can introduce some _ignore_unused option that could keep also the unused resources on platforms that have only partial interconnect support and also add .shutdown callbacks to deal with disabling the resources in the right order. Reported-by: Stephen Boyd Reported-by: Bjorn Andersson Link: https://lore.kernel.org/r/CAE-0n52iVgX0JjjnYi=NDg49xP961p=+W5R2bmO+2xwRceFhfA@mail.gmail.com Signed-off-by: Georgi Djakov commit 1746f4db513563bb22e0ba0c419d0c90912dfae1 Merge: fd66ad69ef5a5 848378812e401 Author: Linus Torvalds Date: Wed Aug 11 20:00:55 2021 -1000 Merge tag 'orphans-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull orphan section linker fix from Kees Cook: - Handle changes to Clang's Sanitizer section layout (Nathan Chancellor) * tag 'orphans-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: vmlinux.lds.h: Handle clang's module.{c,d}tor sections commit fd66ad69ef5a59f303b595ac8ecf454f213cb7e6 Merge: 761c6d7ec820f b4d8a58f8dcfc Author: Linus Torvalds Date: Wed Aug 11 19:56:10 2021 -1000 Merge tag 'seccomp-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fixes from Kees Cook: - Fix typo in user notification documentation (Rodrigo Campos) - Fix userspace counter report when using TSYNC (Hsuan-Chi Kuo, Wiktor Garbacz) * tag 'seccomp-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: Fix setting loaded filter count during TSYNC Documentation: seccomp: Fix typo in user notification commit bf71bde473c3bcf89aa8cdcbfef42edcd97328c2 Merge: 1648740b2e355 0cde63a8fc4d9 Author: Dave Airlie Date: Thu Aug 12 13:38:12 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-08-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-08-11: amdgpu: - Yellow carp update - RAS EEPROM fixes - BACO/BOCO fixes - Fix a memory leak in an error path - Freesync fix - VCN harvesting fix - Display fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210812022153.4005-1-alexander.deucher@amd.com commit da4d4517ba70216799e3eb3b9bd71aa9dca065da Author: jason-jh.lin Date: Tue Aug 10 12:01:48 2021 +0800 drm/mediatek: Add component_del in OVL and COLOR remove function Add component_del in OVL and COLOR remove function. Fixes: ff1395609e20 ("drm/mediatek: Move mtk_ddp_comp_init() from sub driver to DRM driver") Signed-off-by: jason-jh.lin Signed-off-by: Chun-Kuang Hu commit b69dd5b3780a7298bd893816a09da751bc0636f7 Author: Eric Dumazet Date: Wed Aug 11 12:57:15 2021 -0700 net: igmp: increase size of mr_ifc_count Some arches support cmpxchg() on 4-byte and 8-byte only. Increase mr_ifc_count width to 32bit to fix this problem. Fixes: 4a2b285e7e10 ("net: igmp: fix data-race in igmp_ifc_timer_expire()") Signed-off-by: Eric Dumazet Reported-by: Guenter Roeck Link: https://lore.kernel.org/r/20210811195715.3684218-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 71ac6f390f6a3017f58d05d677b961bb1f851338 Author: jason-jh.lin Date: Tue Aug 10 10:55:03 2021 +0800 drm/mediatek: Add AAL output size configuration To avoid the output width and height is incorrect, AAL_OUTPUT_SIZE configuration should be set. Fixes: 0664d1392c26 ("drm/mediatek: Add AAL engine basic function") Signed-off-by: jason-jh.lin Signed-off-by: Chun-Kuang Hu commit 0271824d9ebe945a2ecefdb87e1ce0a520be704d Author: Sergey Shtylyov Date: Tue Aug 10 23:17:12 2021 +0300 MAINTAINERS: switch to my OMP email for Renesas Ethernet drivers I'm still going to continue looking after the Renesas Ethernet drivers and device tree bindings. Now my new employer, Open Mobile Platform (OMP), will pay for all my upstream work. Let's switch to my OMP email for the reviews. Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/9c212711-a0d7-39cd-7840-ff7abf938da1@omp.ru Signed-off-by: Jakub Kicinski commit 6de035fec045f8ae5ee5f3a02373a18b939e91fb Author: Neal Cardwell Date: Tue Aug 10 22:40:56 2021 -0400 tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets Currently if BBR congestion control is initialized after more than 2B packets have been delivered, depending on the phase of the tp->delivered counter the tracking of BBR round trips can get stuck. The bug arises because if tp->delivered is between 2^31 and 2^32 at the time the BBR congestion control module is initialized, then the initialization of bbr->next_rtt_delivered to 0 will cause the logic to believe that the end of the round trip is still billions of packets in the future. More specifically, the following check will fail repeatedly: !before(rs->prior_delivered, bbr->next_rtt_delivered) and thus the connection will take up to 2B packets delivered before that check will pass and the connection will set: bbr->round_start = 1; This could cause many mechanisms in BBR to fail to trigger, for example bbr_check_full_bw_reached() would likely never exit STARTUP. This bug is 5 years old and has not been observed, and as a practical matter this would likely rarely trigger, since it would require transferring at least 2B packets, or likely more than 3 terabytes of data, before switching congestion control algorithms to BBR. This patch is a stable candidate for kernels as far back as v4.9, when tcp_bbr.c was added. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Neal Cardwell Reviewed-by: Yuchung Cheng Reviewed-by: Kevin Yang Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20210811024056.235161-1-ncardwell@google.com Signed-off-by: Jakub Kicinski commit 2cad5d2ed1b47eded5a2f2372c2a94bb065a8f97 Author: Wong Vee Khee Date: Tue Aug 10 16:58:12 2021 +0800 net: pcs: xpcs: fix error handling on failed to allocate memory Drivers such as sja1105 and stmmac that call xpcs_create() expects an error returned by the pcs-xpcs module, but this was not the case on failed to allocate memory. Fixed this by returning an -ENOMEM instead of a NULL pointer. Fixes: 3ad1d171548e ("net: dsa: sja1105: migrate to xpcs for SGMII") Signed-off-by: Wong Vee Khee Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210810085812.1808466-1-vee.khee.wong@linux.intel.com Signed-off-by: Jakub Kicinski commit 6922110d152e56d7569616b45a1f02876cf3eb9f Author: Willy Tarreau Date: Mon Aug 9 18:06:28 2021 +0200 net: linkwatch: fix failure to restore device state across suspend/resume After migrating my laptop from 4.19-LTS to 5.4-LTS a while ago I noticed that my Ethernet port to which a bond and a VLAN interface are attached appeared to remain up after resuming from suspend with the cable unplugged (and that problem still persists with 5.10-LTS). It happens that the following happens: - the network driver (e1000e here) prepares to suspend, calls e1000e_down() which calls netif_carrier_off() to signal that the link is going down. - netif_carrier_off() adds a link_watch event to the list of events for this device - the device is completely stopped. - the machine suspends - the cable is unplugged and the machine brought to another location - the machine is resumed - the queued linkwatch events are processed for the device - the device doesn't yet have the __LINK_STATE_PRESENT bit and its events are silently dropped - the device is resumed with its link down - the upper VLAN and bond interfaces are never notified that the link had been turned down and remain up - the only way to provoke a change is to physically connect the machine to a port and possibly unplug it. The state after resume looks like this: $ ip -br li | egrep 'bond|eth' bond0 UP e8:6a:64:64:64:64 eth0 DOWN e8:6a:64:64:64:64 eth0.2@eth0 UP e8:6a:64:64:64:64 Placing an explicit call to netdev_state_change() either in the suspend or the resume code in the NIC driver worked around this but the solution is not satisfying. The issue in fact really is in link_watch that loses events while it ought not to. It happens that the test for the device being present was added by commit 124eee3f6955 ("net: linkwatch: add check for netdevice being present to linkwatch_do_dev") in 4.20 to avoid an access to devices that are not present. Instead of dropping events, this patch proceeds slightly differently by postponing their handling so that they happen after the device is fully resumed. Fixes: 124eee3f6955 ("net: linkwatch: add check for netdevice being present to linkwatch_do_dev") Link: https://lists.openwall.net/netdev/2018/03/15/62 Cc: Heiner Kallweit Cc: Geert Uytterhoeven Cc: Florian Fainelli Signed-off-by: Willy Tarreau Link: https://lore.kernel.org/r/20210809160628.22623-1-w@1wt.eu Signed-off-by: Jakub Kicinski commit 14c4c8e41511aa8fba7fb239b20b6539b5bce201 Author: Elliot Berman Date: Wed Aug 11 08:59:14 2021 -0700 cfi: Use rcu_read_{un}lock_sched_notrace If rcu_read_lock_sched tracing is enabled, the tracing subsystem can perform a jump which needs to be checked by CFI. For example, stm_ftrace source is enabled as a module and hooks into enabled ftrace events. This can cause an recursive loop where find_shadow_check_fn -> rcu_read_lock_sched -> (call to stm_ftrace generates cfi slowpath) -> find_shadow_check_fn -> rcu_read_lock_sched -> ... To avoid the recursion, either the ftrace codes needs to be marked with __no_cfi or CFI should not trace. Use the "_notrace" in CFI to avoid tracing so that CFI can guard ftrace. Signed-off-by: Elliot Berman Reviewed-by: Sami Tolvanen Cc: stable@vger.kernel.org Fixes: cf68fffb66d6 ("add support for Clang CFI") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210811155914.19550-1-quic_eberman@quicinc.com commit 0f78399551146bfbed357759e2ad5abb8d39e50a Author: Tejun Heo Date: Wed Aug 11 07:41:45 2021 -1000 Revert "block/mq-deadline: Add cgroup support" This reverts commit 08a9ad8bf607 ("block/mq-deadline: Add cgroup support") and a follow-up commit c06bc5a3fb42 ("block/mq-deadline: Remove a WARN_ON_ONCE() call"). The added cgroup support has the following issues: * It breaks cgroup interface file format rule by adding custom elements to a nested key-value file. * It registers mq-deadline as a cgroup-aware policy even though all it's doing is collecting per-cgroup stats. Even if we need these stats, this isn't the right way to add them. * It hasn't been reviewed from cgroup side. Cc: Bart Van Assche Cc: Jens Axboe Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 848378812e40152abe9b9baf58ce2004f76fb988 Author: Nathan Chancellor Date: Fri Jul 30 19:31:08 2021 -0700 vmlinux.lds.h: Handle clang's module.{c,d}tor sections A recent change in LLVM causes module_{c,d}tor sections to appear when CONFIG_K{A,C}SAN are enabled, which results in orphan section warnings because these are not handled anywhere: ld.lld: warning: arch/x86/pci/built-in.a(legacy.o):(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor' ld.lld: warning: arch/x86/pci/built-in.a(legacy.o):(.text.asan.module_dtor) is being placed in '.text.asan.module_dtor' ld.lld: warning: arch/x86/pci/built-in.a(legacy.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' Fangrui explains: "the function asan.module_ctor has the SHF_GNU_RETAIN flag, so it is in a separate section even with -fno-function-sections (default)". Place them in the TEXT_TEXT section so that these technologies continue to work with the newer compiler versions. All of the KASAN and KCSAN KUnit tests continue to pass after this change. Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1432 Link: https://github.com/llvm/llvm-project/commit/7b789562244ee941b7bf2cefeb3fc08a59a01865 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Fangrui Song Acked-by: Marco Elver Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210731023107.1932981-1-nathan@kernel.org commit 96dcb97d0a40a60b9aee9f2c7a44ce8a1b6704bc Merge: f21453b0ff6e3 b05d4c576b697 Author: Dan Williams Date: Wed Aug 11 12:04:43 2021 -0700 Merge branch 'for-5.14/dax' into libnvdimm-fixes Pick up some small dax cleanups that make some of Ira's follow on work easier. commit f21453b0ff6e307bfd59e7a126d9848cea25315c Author: Dan Williams Date: Fri Jul 30 13:00:20 2021 -0700 tools/testing/nvdimm: Fix missing 'fallthrough' warning Use "fallthrough;" to address: tools/testing/nvdimm/test/nfit.c: In function ‘nd_intel_test_finish_query’: tools/testing/nvdimm/test/nfit.c:436:37: warning: this statement may fall through [-Wimplicit-fallthrough=] 436 | fw->missed_activate = false; | ~~~~~~~~~~~~~~~~~~~~^~~~~~~ tools/testing/nvdimm/test/nfit.c:438:9: note: here 438 | case FW_STATE_UPDATED: | ^~~~ Reviewed-by: Jeff Moyer Link: https://lore.kernel.org/r/162767522046.3313209.14767278726893995797.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit d9cee9f85b22fab88d2b76d2e92b18e3d0e6aa8c Author: Dan Williams Date: Fri Jul 30 09:46:04 2021 -0700 libnvdimm/region: Fix label activation vs errors There are a few scenarios where init_active_labels() can return without registering deactivate_labels() to run when the region is disabled. In particular label error injection creates scenarios where a DIMM is disabled, but labels on other DIMMs in the region become activated. Arrange for init_active_labels() to always register deactivate_labels(). Reported-by: Krzysztof Kensicki Cc: Fixes: bf9bccc14c05 ("libnvdimm: pmem label sets and namespace instantiation.") Reviewed-by: Jeff Moyer Link: https://lore.kernel.org/r/162766356450.3223041.1183118139023841447.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit b93dfa6bda4d4e88e5386490f2b277a26958f9d3 Author: Dan Williams Date: Wed Aug 11 11:53:37 2021 -0700 ACPI: NFIT: Fix support for virtual SPA ranges Fix the NFIT parsing code to treat a 0 index in a SPA Range Structure as a special case and not match Region Mapping Structures that use 0 to indicate that they are not mapped. Without this fix some platform BIOS descriptions of "virtual disk" ranges do not result in the pmem driver attaching to the range. Details: In addition to typical persistent memory ranges, the ACPI NFIT may also convey "virtual" ranges. These ranges are indicated by a UUID in the SPA Range Structure of UUID_VOLATILE_VIRTUAL_DISK, UUID_VOLATILE_VIRTUAL_CD, UUID_PERSISTENT_VIRTUAL_DISK, or UUID_PERSISTENT_VIRTUAL_CD. The critical difference between virtual ranges and UUID_PERSISTENT_MEMORY, is that virtual do not support associations with Region Mapping Structures. For this reason the "index" value of virtual SPA Range Structures is allowed to be 0. If a platform BIOS decides to represent NVDIMMs with disconnected "Region Mapping Structures" (range-index == 0), the kernel may falsely associate them with standalone ranges where the "SPA Range Structure Index" is also zero. When this happens the driver may falsely require labels where "virtual disks" are expected to be label-less. I.e. "label-less" is where the namespace-range == region-range and the pmem driver attaches with no user action to create a namespace. Cc: Jacek Zloch Cc: Lukasz Sobieraj Cc: "Lee, Chun-Yi" Cc: Fixes: c2f32acdf848 ("acpi, nfit: treat virtual ramdisk SPA as pmem region") Reported-by: Krzysztof Rusocki Reported-by: Damian Bassa Reviewed-by: Jeff Moyer Link: https://lore.kernel.org/r/162870796589.2521182.1240403310175570220.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit b4d8a58f8dcfcc890f296696cadb76e77be44b5f Author: Hsuan-Chi Kuo Date: Thu Mar 4 17:37:08 2021 -0600 seccomp: Fix setting loaded filter count during TSYNC The desired behavior is to set the caller's filter count to thread's. This value is reported via /proc, so this fixes the inaccurate count exposed to userspace; it is not used for reference counting, etc. Signed-off-by: Hsuan-Chi Kuo Link: https://lore.kernel.org/r/20210304233708.420597-1-hsuanchikuo@gmail.com Co-developed-by: Wiktor Garbacz Signed-off-by: Wiktor Garbacz Link: https://lore.kernel.org/lkml/20210810125158.329849-1-wiktorg@google.com Signed-off-by: Kees Cook Cc: stable@vger.kernel.org Fixes: c818c03b661c ("seccomp: Report number of loaded filters in /proc/$pid/status") commit 2d3a1e3615c5449a4583010f41a6f824a4ffa03e Author: Yonghong Song Date: Tue Aug 10 16:05:37 2021 -0700 bpf: Add rcu_read_lock in bpf_get_current_[ancestor_]cgroup_id() helpers Currently, if bpf_get_current_cgroup_id() or bpf_get_current_ancestor_cgroup_id() helper is called with sleepable programs e.g., sleepable fentry/fmod_ret/fexit/lsm programs, a rcu warning may appear. For example, if I added the following hack to test_progs/test_lsm sleepable fentry program test_sys_setdomainname: --- a/tools/testing/selftests/bpf/progs/lsm.c +++ b/tools/testing/selftests/bpf/progs/lsm.c @@ -168,6 +168,10 @@ int BPF_PROG(test_sys_setdomainname, struct pt_regs *regs) int buf = 0; long ret; + __u64 cg_id = bpf_get_current_cgroup_id(); + if (cg_id == 1000) + copy_test++; + ret = bpf_copy_from_user(&buf, sizeof(buf), ptr); if (len == -2 && ret == 0 && buf == 1234) copy_test++; I will hit the following rcu warning: include/linux/cgroup.h:481 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by test_progs/260: #0: ffffffffa5173360 (rcu_read_lock_trace){....}-{0:0}, at: __bpf_prog_enter_sleepable+0x0/0xa0 stack backtrace: CPU: 1 PID: 260 Comm: test_progs Tainted: G O 5.14.0-rc2+ #176 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x56/0x7b bpf_get_current_cgroup_id+0x9c/0xb1 bpf_prog_a29888d1c6706e09_test_sys_setdomainname+0x3e/0x89c bpf_trampoline_6442469132_0+0x2d/0x1000 __x64_sys_setdomainname+0x5/0x110 do_syscall_64+0x3a/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae I can get similar warning using bpf_get_current_ancestor_cgroup_id() helper. syzbot reported a similar issue in [1] for syscall program. Helper bpf_get_current_cgroup_id() or bpf_get_current_ancestor_cgroup_id() has the following callchain: task_dfl_cgroup task_css_set task_css_set_check and we have #define task_css_set_check(task, __c) \ rcu_dereference_check((task)->cgroups, \ lockdep_is_held(&cgroup_mutex) || \ lockdep_is_held(&css_set_lock) || \ ((task)->flags & PF_EXITING) || (__c)) Since cgroup_mutex/css_set_lock is not held and the task is not existing and rcu read_lock is not held, a warning will be issued. Note that bpf sleepable program is protected by rcu_read_lock_trace(). The above sleepable bpf programs are already protected by migrate_disable(). Adding rcu_read_lock() in these two helpers will silence the above warning. I marked the patch fixing 95b861a7935b ("bpf: Allow bpf_get_current_ancestor_cgroup_id for tracing") which added bpf_get_current_ancestor_cgroup_id() to tracing programs in 5.14. I think backporting 5.14 is probably good enough as sleepable progrems are not widely used. This patch should fix [1] as well since syscall program is a sleepable program protected with migrate_disable(). [1] https://lore.kernel.org/bpf/0000000000006d5cab05c7d9bb87@google.com/ Fixes: 95b861a7935b ("bpf: Allow bpf_get_current_ancestor_cgroup_id for tracing") Reported-by: syzbot+7ee5c2c09c284495371f@syzkaller.appspotmail.com Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210810230537.2864668-1-yhs@fb.com commit 86e5fbcaf75621cc5e817da753fe3ea65f81f413 Merge: 31697ef7f3f45 2f658f7a3953f Author: Linus Walleij Date: Wed Aug 11 15:10:32 2021 +0200 Merge tag 'intel-pinctrl-v5.14-2' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into fixes intel-pinctrl for v5.14-2 * Fix the software mapping of GPIOs on Intel Tiger Lake-H The following is an automated git shortlog grouped by driver: tigerlake: - Fix GPIO mapping for newer version of software commit 31697ef7f3f45293bba3da87bcc710953e97fc3e Author: Damien Le Moal Date: Fri Aug 6 09:43:11 2021 +0900 pinctrl: k210: Fix k210_fpioa_probe() In k210_fpioa_probe(), add missing calls to clk_disable_unprepare() in case of error after cenabling the clk and pclk clocks. Also add missing error handling when enabling pclk. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver") Cc: Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20210806004311.52859-1-damien.lemoal@wdc.com Signed-off-by: Linus Walleij commit 879753c816dbbdb2a9a395aa4448d29feee92d1a Author: Eli Cohen Date: Wed Aug 11 08:37:59 2021 +0300 vdpa/mlx5: Fix queue type selection logic get_queue_type() comments that splict virtqueue is preferred, however, the actual logic preferred packed virtqueues. Since firmware has not supported packed virtqueues we ended up using split virtqueues as was desired. Since we do not advertise support for packed virtqueues, we add a check to verify split virtqueues are indeed supported. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210811053759.66752-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin commit 08dbd5660232bede7916d8568003012c1182cc9a Author: Eli Cohen Date: Wed Aug 11 08:37:13 2021 +0300 vdpa/mlx5: Avoid destroying MR on empty iotlb The current code treats an empty iotlb provdied in set_map() as a special case and destroy the memory region object. This must not be done since the virtqueue objects reference this MR. Doing so will cause the driver unload to emit errors and log timeouts caused by the firmware complaining on busy resources. This patch treats an empty iotlb as any other change of mapping. In this case, mlx5_vdpa_create_mr() will fail and the entire set_map() call to fail. This issue has not been encountered before but was seen to occur in a non-official version of qemu. Since qemu is a userspace program, the driver must protect against such case. Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210811053713.66658-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin commit a24ce06c70fe7df795a846ad713ccaa9b56a7666 Author: Michael S. Tsirkin Date: Tue Aug 10 12:26:05 2021 -0400 tools/virtio: fix build We use a spinlock now so add a stub. Ignore bogus uninitialized variable warnings. Signed-off-by: Michael S. Tsirkin commit f8ce72632fa7ed286cc9a62c35e279330a14d3e0 Author: Michael S. Tsirkin Date: Tue Aug 10 12:26:05 2021 -0400 virtio_ring: pull in spinlock header we use a spinlock now pull in the correct header to make virtio_ring.c self sufficient. Signed-off-by: Michael S. Tsirkin commit ea2f6af16532511eb1cd8eb62845c37861f24ce8 Author: Michael S. Tsirkin Date: Tue Aug 10 12:25:05 2021 -0400 vringh: pull in spinlock header we use a spinlock now pull in the correct header to make vring.h self sufficient. Signed-off-by: Michael S. Tsirkin commit 82e89ea077b93b3c131fa175b0df3acb5b1d5cdf Author: Xie Yongji Date: Mon Aug 9 18:16:09 2021 +0800 virtio-blk: Add validation for block size in config space An untrusted device might presents an invalid block size in configuration space. This tries to add validation for it in the validate callback and clear the VIRTIO_BLK_F_BLK_SIZE feature bit if the value is out of the supported range. And we also double check the value in virtblk_probe() in case that it's changed after the validation. Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210809101609.148-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit e74cfa91f42c50f7f649b0eca46aa049754ccdbd Author: Neeraj Upadhyay Date: Fri Jun 25 08:55:02 2021 +0530 vringh: Use wiov->used to check for read/write desc order As __vringh_iov() traverses a descriptor chain, it populates each descriptor entry into either read or write vring iov and increments that iov's ->used member. So, as we iterate over a descriptor chain, at any point, (riov/wriov)->used value gives the number of descriptor enteries available, which are to be read or written by the device. As all read iovs must precede the write iovs, wiov->used should be zero when we are traversing a read descriptor. Current code checks for wiov->i, to figure out whether any previous entry in the current descriptor chain was a write descriptor. However, iov->i is only incremented, when these vring iovs are consumed, at a later point, and remain 0 in __vringh_iov(). So, correct the check for read and write descriptor order, to use wiov->used. Acked-by: Jason Wang Reviewed-by: Stefano Garzarella Signed-off-by: Neeraj Upadhyay Link: https://lore.kernel.org/r/1624591502-4827-1-git-send-email-neeraju@codeaurora.org Signed-off-by: Michael S. Tsirkin commit cb5d2c1f6cc0e5769099a7d44b9d08cf58cae206 Author: Vincent Whitchurch Date: Thu Jul 1 13:46:52 2021 +0200 virtio_vdpa: reject invalid vq indices Do not call vDPA drivers' callbacks with vq indicies larger than what the drivers indicate that they support. vDPA drivers do not bounds check the indices. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20210701114652.21956-1-vincent.whitchurch@axis.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella commit c8d182bd387a09a8b95303c8086238e8bf61fcfc Author: Xie Yongji Date: Thu Jul 15 16:00:26 2021 +0800 vdpa: Add documentation for vdpa_alloc_device() macro The return value of vdpa_alloc_device() macro is not very clear, so that most of callers did the wrong check. Let's add some comments to better document it. Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210715080026.242-4-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella commit 1057afa0121db8bd3ca4718c8e0ca12388ab7759 Author: Xie Yongji Date: Thu Jul 15 16:00:25 2021 +0800 vDPA/ifcvf: Fix return value check for vdpa_alloc_device() The vdpa_alloc_device() returns an error pointer upon failure, not NULL. To handle the failure correctly, this replaces NULL check with IS_ERR() check and propagate the error upwards. Fixes: 5a2414bc454e ("virtio: Intel IFC VF driver for VDPA") Reported-by: Dan Carpenter Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210715080026.242-3-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella commit 9632e78e82648aa98340df78eab9106f63da151e Author: Xie Yongji Date: Thu Jul 15 16:00:24 2021 +0800 vp_vdpa: Fix return value check for vdpa_alloc_device() The vdpa_alloc_device() returns an error pointer upon failure, not NULL. To handle the failure correctly, this replaces NULL check with IS_ERR() check and propagate the error upwards. Fixes: 64b9f64f80a6 ("vdpa: introduce virtio pci driver") Reported-by: Dan Carpenter Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210715080026.242-2-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella commit 2b847f21145d84e2e1dde99d3e2c00a5468f02e4 Author: Xie Yongji Date: Thu Jul 15 16:00:23 2021 +0800 vdpa_sim: Fix return value check for vdpa_alloc_device() The vdpa_alloc_device() returns an error pointer upon failure, not NULL. To handle the failure correctly, this replaces NULL check with IS_ERR() check and propagate the error upwards. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Reported-by: Dan Carpenter Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210715080026.242-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit f7ad318ea0ad58ebe0e595e59aed270bb643b29b Author: Xie Yongji Date: Wed Jul 28 21:07:56 2021 +0800 vhost: Fix the calculation in vhost_overflow() This fixes the incorrect calculation for integer overflow when the last address of iova range is 0xffffffff. Fixes: ec33d031a14b ("vhost: detect 32 bit integer wrap around") Reported-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210728130756.97-2-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin commit 017f5fb9ce793e3558db94ee72068622bc0b79db Author: Andrew Delgadillo Date: Tue Aug 10 23:17:55 2021 +0000 arm64: clean vdso & vdso32 files commit a5b8ca97fbf8 ("arm64: do not descend to vdso directories twice") changes the cleaning behavior of arm64's vdso files, in that vdso.lds, vdso.so, and vdso.so.dbg are not removed upon a 'make clean/mrproper': $ make defconfig ARCH=arm64 $ make ARCH=arm64 $ make mrproper ARCH=arm64 $ git clean -nxdf Would remove arch/arm64/kernel/vdso/vdso.lds Would remove arch/arm64/kernel/vdso/vdso.so Would remove arch/arm64/kernel/vdso/vdso.so.dbg To remedy this, manually descend into arch/arm64/kernel/vdso upon cleaning. After this commit: $ make defconfig ARCH=arm64 $ make ARCH=arm64 $ make mrproper ARCH=arm64 $ git clean -nxdf Similar results are obtained for the vdso32 equivalent. Signed-off-by: Andrew Delgadillo Cc: stable@vger.kernel.org Fixes: a5b8ca97fbf8 ("arm64: do not descend to vdso directories twice") Link: https://lore.kernel.org/r/20210810231755.1743524-1-adelg@google.com Signed-off-by: Will Deacon commit 06a089ef644934372a3062528244fca3417d3430 Author: Tony Lindgren Date: Wed Aug 11 08:34:46 2021 +0300 bus: ti-sysc: Fix error handling for sysc_check_active_timer() We have changed the return type for sysc_check_active_timer() from -EBUSY to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are also not returning on other errors like we did earlier as noted by Pavel Machek . Commit 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") should have been updated for commit 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source"). Let's fix the issue by checking for -ENXIO and returning on any other errors as suggested by Pavel Machek . Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") Depends-on: 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source") Reported-by: Pavel Machek Reviewed-by: Pavel Machek (CIP) Cc: Grygorii Strashko Cc: Jarkko Nikula Signed-off-by: Tony Lindgren commit 1648740b2e355c727c9effe95fb14ee4e2706a28 Merge: 36a21d51725af 1a64a7aff8da3 Author: Dave Airlie Date: Wed Aug 11 14:11:44 2021 +1000 Merge tag 'mediatek-drm-fixes-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes for Linux 5.14 1. Fix dpi bridge bug. 2. Fix cursor plane no update. Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20210809150604.32426-1-chunkuang.hu@kernel.org commit 761c6d7ec820f123b931e7b8ef7ec7c8564e450f Merge: 9e723c5380c6e 669d94219d91a Author: Linus Torvalds Date: Tue Aug 10 16:34:34 2021 -1000 Merge tag 'arc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Fix FPU_STATUS update - Update my email address - Other spellos and fixes * tag 'arc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: MAINTAINERS: update Vineet's email address ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch ARC: Fix CONFIG_STACKDEPOT arc: Fix spelling mistake and grammar in Kconfig arc: Prefer unsigned int to bare use of unsigned commit 3f12cc4bb0a4d7b542af43b6f1b7175f13015629 Author: Hu Haowen Date: Wed Jul 28 23:53:46 2021 +0800 Documentation: i2c: add i2c-sysfs into index Append i2c-sysfs to toctree in order to get rid of building warnings. Fixes: 31df7195b100 ("Documentation: i2c: Add doc for I2C sysfs") Signed-off-by: Hu Haowen Signed-off-by: Wolfram Sang commit 86ff25ed6cd8240d18df58930bd8848b19fce308 Author: Greg Kroah-Hartman Date: Thu Jul 29 16:35:32 2021 +0200 i2c: dev: zero out array used for i2c reads from userspace If an i2c driver happens to not provide the full amount of data that a user asks for, it is possible that some uninitialized data could be sent to userspace. While all in-kernel drivers look to be safe, just be sure by initializing the buffer to zero before it is passed to the i2c driver so that any future drivers will not have this issue. Also properly copy the amount of data recvieved to the userspace buffer, as pointed out by Dan Carpenter. Reported-by: Eric Dumazet Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Wolfram Sang commit bba676cc0b6122a74fa2e246f38a6b05c6f95b36 Author: Dhananjay Phadke Date: Thu Aug 5 14:49:05 2021 -0700 i2c: iproc: fix race between client unreg and tasklet Similar NULL deref was originally fixed by graceful teardown sequence - https://lore.kernel.org/linux-i2c/1597106560-79693-1-git-send-email-dphadke@linux.microsoft.com After this, a tasklet was added to take care of FIFO full condition for large i2c transaction. https://lore.kernel.org/linux-arm-kernel/20201102035433.6774-1-rayagonda.kokatanur@broadcom.com/ This introduced regression, a new race condition between tasklet enabling interrupts and client unreg teardown sequence. Kill tasklet before unreg_slave() masks bits in IE_OFFSET. Updated teardown sequence - (1) disable_irq() (2) Kill tasklet (3) Mask event enable bits in control reg (4) Erase slave address (avoid further writes to rx fifo) (5) Flush tx and rx FIFOs (6) Clear pending event (interrupt) bits in status reg (7) Set client pointer to NULL (8) enable_irq() -- Unable to handle kernel read from unreadable memory at virtual address 0000000000000320 Mem abort info: ESR = 0x96000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=000000009212a000 [0000000000000320] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 96000004 [#1] SMP CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O Hardware name: Overlake (DT) pstate: 40400085 (nZcv daIf +PAN -UAO -TCO BTYPE=--) pc : bcm_iproc_i2c_slave_isr+0x2b8/0x8e4 lr : bcm_iproc_i2c_slave_isr+0x1c8/0x8e4 sp : ffff800010003e70 x29: ffff800010003e80 x28: ffffda017acdc000 x27: ffffda017b0ae000 x26: ffff800010004000 x25: ffff800010000000 x24: ffffda017af4a168 x23: 0000000000000073 x22: 0000000000000000 x21: 0000000001400000 x20: 0000000001000000 x19: ffff06f09583f880 x18: 00000000fa83b2da x17: 000000000000b67e x16: 0000000002edb2f3 x15: 00000000000002c7 x14: 00000000000002c7 x13: 0000000000000006 x12: 0000000000000033 x11: 0000000000000000 x10: 0000000001000000 x9 : 0000000003289312 x8 : 0000000003289311 x7 : 02d0cd03a303adbc x6 : 02d18e7f0a4dfc6c x5 : 02edb2f33f76ea68 x4 : 00000000fa83b2da x3 : ffffda017af43cd0 x2 : ffff800010003e74 x1 : 0000000001400000 x0 : 0000000000000000 Call trace: bcm_iproc_i2c_slave_isr+0x2b8/0x8e4 bcm_iproc_i2c_isr+0x178/0x290 __handle_irq_event_percpu+0xd0/0x200 handle_irq_event+0x60/0x1a0 handle_fasteoi_irq+0x130/0x220 __handle_domain_irq+0x8c/0xcc gic_handle_irq+0xc0/0x120 el1_irq+0xcc/0x180 finish_task_switch+0x100/0x1d8 __schedule+0x61c/0x7a0 schedule_idle+0x28/0x44 do_idle+0x254/0x28c cpu_startup_entry+0x28/0x2c rest_init+0xc4/0xd0 arch_call_rest_init+0x14/0x1c start_kernel+0x33c/0x3b8 Code: f9423260 910013e2 11000509 b9047a69 (f9419009) ---[ end trace 4781455b2a7bec15 ]--- Fixes: 4d658451c9d6 ("i2c: iproc: handle rx fifo full interrupt") Signed-off-by: Dhananjay Phadke Acked-by: Ray Jui Acked-by: Rayagonda Kokatanur Signed-off-by: Wolfram Sang commit 519133debcc19f5c834e7e28480b60bdc234fe02 Author: Yang Yingliang Date: Mon Aug 9 21:20:23 2021 +0800 net: bridge: fix memleak in br_add_if() I got a memleak report: BUG: memory leak unreferenced object 0x607ee521a658 (size 240): comm "syz-executor.0", pid 955, jiffies 4294780569 (age 16.449s) hex dump (first 32 bytes, cpu 1): 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: [<00000000d830ea5a>] br_multicast_add_port+0x1c2/0x300 net/bridge/br_multicast.c:1693 [<00000000274d9a71>] new_nbp net/bridge/br_if.c:435 [inline] [<00000000274d9a71>] br_add_if+0x670/0x1740 net/bridge/br_if.c:611 [<0000000012ce888e>] do_set_master net/core/rtnetlink.c:2513 [inline] [<0000000012ce888e>] do_set_master+0x1aa/0x210 net/core/rtnetlink.c:2487 [<0000000099d1cafc>] __rtnl_newlink+0x1095/0x13e0 net/core/rtnetlink.c:3457 [<00000000a01facc0>] rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3488 [<00000000acc9186c>] rtnetlink_rcv_msg+0x369/0xa10 net/core/rtnetlink.c:5550 [<00000000d4aabb9c>] netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2504 [<00000000bc2e12a3>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] [<00000000bc2e12a3>] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1340 [<00000000e4dc2d0e>] netlink_sendmsg+0x789/0xc70 net/netlink/af_netlink.c:1929 [<000000000d22c8b3>] sock_sendmsg_nosec net/socket.c:654 [inline] [<000000000d22c8b3>] sock_sendmsg+0x139/0x170 net/socket.c:674 [<00000000e281417a>] ____sys_sendmsg+0x658/0x7d0 net/socket.c:2350 [<00000000237aa2ab>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2404 [<000000004f2dc381>] __sys_sendmsg+0xd3/0x190 net/socket.c:2433 [<0000000005feca6c>] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:47 [<000000007304477d>] entry_SYSCALL_64_after_hwframe+0x44/0xae On error path of br_add_if(), p->mcast_stats allocated in new_nbp() need be freed, or it will be leaked. Fixes: 1080ab95e3c7 ("net: bridge: add support for IGMP/MLD stats and export them via netlink") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20210809132023.978546-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski commit c35b57ceff906856dd85af2d6709dab18fbca81f Author: Vladimir Oltean Date: Tue Aug 10 14:50:24 2021 +0300 net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge The blamed commit added a new field to struct switchdev_notifier_fdb_info, but did not make sure that all call paths set it to something valid. For example, a switchdev driver may emit a SWITCHDEV_FDB_ADD_TO_BRIDGE notifier, and since the 'is_local' flag is not set, it contains junk from the stack, so the bridge might interpret those notifications as being for local FDB entries when that was not intended. To avoid that now and in the future, zero-initialize all switchdev_notifier_fdb_info structures created by drivers such that all newly added fields to not need to touch drivers again. Fixes: 2c4eca3ef716 ("net: bridge: switchdev: include local flag in FDB notifications") Reported-by: Ido Schimmel Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Reviewed-by: Leon Romanovsky Reviewed-by: Karsten Graul Link: https://lore.kernel.org/r/20210810115024.1629983-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 45a687879b31caae4032abd1c2402e289d2b8083 Author: Nikolay Aleksandrov Date: Tue Aug 10 14:00:10 2021 +0300 net: bridge: fix flags interpretation for extern learn fdb entries Ignore fdb flags when adding port extern learn entries and always set BR_FDB_LOCAL flag when adding bridge extern learn entries. This is closest to the behaviour we had before and avoids breaking any use cases which were allowed. This patch fixes iproute2 calls which assume NUD_PERMANENT and were allowed before, example: $ bridge fdb add 00:11:22:33:44:55 dev swp1 extern_learn Extern learn entries are allowed to roam, but do not expire, so static or dynamic flags make no sense for them. Also add a comment for future reference. Fixes: eb100e0e24a2 ("net: bridge: allow to add externally learned entries from user-space") Fixes: 0541a6293298 ("net: bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry") Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: Nikolay Aleksandrov Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210810110010.43859-1-razor@blackwall.org Signed-off-by: Jakub Kicinski commit 7b9cae027ba3aaac295ae23a62f47876ed97da73 Author: Sean Christopherson Date: Tue Aug 10 10:19:49 2021 -0700 KVM: VMX: Use current VMCS to query WAITPKG support for MSR emulation Use the secondary_exec_controls_get() accessor in vmx_has_waitpkg() to effectively get the controls for the current VMCS, as opposed to using vmx->secondary_exec_controls, which is the cached value of KVM's desired controls for vmcs01 and truly not reflective of any particular VMCS. While the waitpkg control is not dynamic, i.e. vmcs01 will always hold the same waitpkg configuration as vmx->secondary_exec_controls, the same does not hold true for vmcs02 if the L1 VMM hides the feature from L2. If L1 hides the feature _and_ does not intercept MSR_IA32_UMWAIT_CONTROL, L2 could incorrectly read/write L1's virtual MSR instead of taking a #GP. Fixes: 6e3ba4abcea5 ("KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210810171952.2758100-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9e723c5380c6e14fb91a8b6950563d040674afdb Merge: b3f0ccc59cfeb 9d7b132e62e41 Author: Linus Torvalds Date: Tue Aug 10 09:46:33 2021 -0700 Merge tag 'platform-drivers-x86-v5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Small set of pdx86 fixes for 5.14" * tag 'platform-drivers-x86-v5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust platform/x86: Add and use a dual_accel_detect() helper commit b3f0ccc59cfeb508a3774e8653069d76ffadc37e Merge: 9a73fa375d58f 427215d85e8d1 Author: Linus Torvalds Date: Tue Aug 10 09:40:09 2021 -0700 Merge tag 'ovl-fixes-5.14-rc6-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix several bugs in overlayfs" * tag 'ovl-fixes-5.14-rc6-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: prevent private clone if bind mount is not allowed ovl: fix uninitialized pointer read in ovl_lookup_real_one() ovl: fix deadlock in splice write ovl: skip stale entries in merge dir cache iteration commit 0e398290cff997610b66e73573faaee70c9a700e Author: Xie Yongji Date: Wed Jul 28 21:07:55 2021 +0800 vhost-vdpa: Fix integer overflow in vhost_vdpa_process_iotlb_update() The "msg->iova + msg->size" addition can have an integer overflow if the iotlb message is from a malicious user space application. So let's fix it. Fixes: 1b48dc03e575 ("vhost: vdpa: report iova range") Reported-by: Dan Carpenter Signed-off-by: Xie Yongji Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210728130756.97-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin commit 43bb40c5b92659966bdf4bfe584fde0a3575a049 Author: Parav Pandit Date: Wed Jul 21 17:26:48 2021 +0300 virtio_pci: Support surprise removal of virtio pci device When a virtio pci device undergo surprise removal (aka async removal in PCIe spec), mark the device as broken so that any upper layer drivers can abort any outstanding operation. When a virtio net pci device undergo surprise removal which is used by a NetworkManager, a below call trace was observed. kernel:watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [kworker/1:1:27059] watchdog: BUG: soft lockup - CPU#1 stuck for 52s! [kworker/1:1:27059] CPU: 1 PID: 27059 Comm: kworker/1:1 Tainted: G S W I L 5.13.0-hotplug+ #8 Hardware name: Dell Inc. PowerEdge R640/0H28RR, BIOS 2.9.4 11/06/2020 Workqueue: events linkwatch_event RIP: 0010:virtnet_send_command+0xfc/0x150 [virtio_net] Call Trace: virtnet_set_rx_mode+0xcf/0x2a7 [virtio_net] ? __hw_addr_create_ex+0x85/0xc0 __dev_mc_add+0x72/0x80 igmp6_group_added+0xa7/0xd0 ipv6_mc_up+0x3c/0x60 ipv6_find_idev+0x36/0x80 addrconf_add_dev+0x1e/0xa0 addrconf_dev_config+0x71/0x130 addrconf_notify+0x1f5/0xb40 ? rtnl_is_locked+0x11/0x20 ? __switch_to_asm+0x42/0x70 ? finish_task_switch+0xaf/0x2c0 ? raw_notifier_call_chain+0x3e/0x50 raw_notifier_call_chain+0x3e/0x50 netdev_state_change+0x67/0x90 linkwatch_do_dev+0x3c/0x50 __linkwatch_run_queue+0xd2/0x220 linkwatch_event+0x21/0x30 process_one_work+0x1c8/0x370 worker_thread+0x30/0x380 ? process_one_work+0x370/0x370 kthread+0x118/0x140 ? set_kthread_struct+0x40/0x40 ret_from_fork+0x1f/0x30 Hence, add the ability to abort the command on surprise removal which prevents infinite loop and system lockup. Signed-off-by: Parav Pandit Link: https://lore.kernel.org/r/20210721142648.1525924-5-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit 0e566c8f0f2e8325e35f6f97e13cde5356b41814 Author: Parav Pandit Date: Wed Jul 21 17:26:47 2021 +0300 virtio: Protect vqs list access VQs may be accessed to mark the device broken while they are created/destroyed. Hence protect the access to the vqs list. Fixes: e2dcdfe95c0b ("virtio: virtio_break_device() to mark all virtqueues broken.") Signed-off-by: Parav Pandit Link: https://lore.kernel.org/r/20210721142648.1525924-4-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit 249f255476328e597a598ccdbd4414e51a5b6d6e Author: Parav Pandit Date: Wed Jul 21 17:26:46 2021 +0300 virtio: Keep vring_del_virtqueue() mirror of VQ create Keep the vring_del_virtqueue() mirror of the create routines. i.e. to delete list entry first as it is added last during the create routine. Signed-off-by: Parav Pandit Link: https://lore.kernel.org/r/20210721142648.1525924-3-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit 60f0779862e4ab943810187752c462e85f5fa371 Author: Parav Pandit Date: Wed Jul 21 17:26:45 2021 +0300 virtio: Improve vq->broken access to avoid any compiler optimization Currently vq->broken field is read by virtqueue_is_broken() in busy loop in one context by virtnet_send_command(). vq->broken is set to true in other process context by virtio_break_device(). Reader and writer are accessing it without any synchronization. This may lead to a compiler optimization which may result to optimize reading vq->broken only once. Hence, force reading vq->broken on each invocation of virtqueue_is_broken() and also force writing it so that such update is visible to the readers. It is a theoretical fix that isn't yet encountered in the field. Signed-off-by: Parav Pandit Link: https://lore.kernel.org/r/20210721142648.1525924-2-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit 981567bd965329df7e64b13e92a54da816c1e0a4 Author: Ronnie Sahlberg Date: Tue Aug 10 16:33:55 2021 +1000 cifs: use the correct max-length for dentry_path_raw() RHBZ: 1972502 PATH_MAX is 4096 but PAGE_SIZE can be >4096 on some architectures such as ppc and would thus write beyond the end of the actual object. Cc: Reported-by: Xiaoli Feng Suggested-by: Brian foster Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 2e273b0996abd1dd054a043c8e4dc0d93309ba1d Merge: 09c7fd5218796 019d0454c6170 Author: Jakub Kicinski Date: Tue Aug 10 07:52:09 2021 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== bpf 2021-08-10 We've added 5 non-merge commits during the last 2 day(s) which contain a total of 7 files changed, 27 insertions(+), 15 deletions(-). 1) Fix missing bpf_read_lock_trace() context for BPF loader progs, from Yonghong Song. 2) Fix corner case where BPF prog retrieves wrong local storage, also from Yonghong Song. 3) Restrict availability of BPF write_user helper behind lockdown, from Daniel Borkmann. 4) Fix multiple kernel-doc warnings in BPF core, from Randy Dunlap. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf, core: Fix kernel-doc notation bpf: Fix potentially incorrect results with bpf_get_local_storage() bpf: Add missing bpf_read_[un]lock_trace() for syscall program bpf: Add lockdown check for probe_write_user helper bpf: Add _kernel suffix to internal lockdown_bpf_read ==================== Link: https://lore.kernel.org/r/20210810144025.22814-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 0cde63a8fc4d9f9f580c297211fd05f91c0fd66d Author: Anson Jacob Date: Fri Jul 30 19:46:20 2021 -0400 drm/amd/display: use GFP_ATOMIC in amdgpu_dm_irq_schedule_work Replace GFP_KERNEL with GFP_ATOMIC as amdgpu_dm_irq_schedule_work can't sleep. BUG: sleeping function called from invalid context at include/linux/sched/mm.h:196 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 253, name: kworker/6:1H CPU: 6 PID: 253 Comm: kworker/6:1H Tainted: G W OE 5.11.0-promotion_2021_06_07-18_36_28_prelim_revert_retrain #8 Hardware name: System manufacturer System Product Name/PRIME X570-PRO, BIOS 3405 02/01/2021 Workqueue: events_highpri dm_irq_work_func [amdgpu] Call Trace: dump_stack+0x5e/0x74 ___might_sleep.cold+0x87/0x98 __might_sleep+0x4b/0x80 kmem_cache_alloc_trace+0x390/0x4f0 amdgpu_dm_irq_handler+0x171/0x230 [amdgpu] amdgpu_irq_dispatch+0xc0/0x1e0 [amdgpu] amdgpu_ih_process+0x81/0x100 [amdgpu] amdgpu_irq_handler+0x26/0xa0 [amdgpu] __handle_irq_event_percpu+0x49/0x190 ? __hrtimer_get_next_event+0x4d/0x80 handle_irq_event_percpu+0x33/0x80 handle_irq_event+0x33/0x60 handle_edge_irq+0x82/0x190 asm_call_irq_on_stack+0x12/0x20 common_interrupt+0xbb/0x140 asm_common_interrupt+0x1e/0x40 RIP: 0010:amdgpu_device_rreg.part.0+0x44/0xf0 [amdgpu] Code: 53 48 89 fb 4c 3b af c8 08 00 00 73 6d 83 e2 02 75 0d f6 87 40 62 01 00 10 0f 85 83 00 00 00 4c 03 ab d0 08 00 00 45 8b 6d 00 <8b> 05 3e b6 52 00 85 c0 7e 62 48 8b 43 08 0f b7 70 3e 65 8b 05 e3 RSP: 0018:ffffae7740fff9e8 EFLAGS: 00000286 RAX: ffffffffc05ee610 RBX: ffff8aaf8f620000 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000005430 RDI: ffff8aaf8f620000 RBP: ffffae7740fffa08 R08: 0000000000000001 R09: 000000000000000a R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000005430 R13: 0000000071000000 R14: 0000000000000001 R15: 0000000000005430 ? amdgpu_cgs_write_register+0x20/0x20 [amdgpu] amdgpu_device_rreg+0x17/0x20 [amdgpu] amdgpu_cgs_read_register+0x14/0x20 [amdgpu] dm_read_reg_func+0x38/0xb0 [amdgpu] generic_reg_wait+0x80/0x160 [amdgpu] dce_aux_transfer_raw+0x324/0x7c0 [amdgpu] dc_link_aux_transfer_raw+0x43/0x50 [amdgpu] dm_dp_aux_transfer+0x87/0x110 [amdgpu] drm_dp_dpcd_access+0x72/0x110 [drm_kms_helper] drm_dp_dpcd_read+0xb7/0xf0 [drm_kms_helper] drm_dp_get_one_sb_msg+0x349/0x480 [drm_kms_helper] drm_dp_mst_hpd_irq+0xc5/0xe40 [drm_kms_helper] ? drm_dp_mst_hpd_irq+0xc5/0xe40 [drm_kms_helper] dm_handle_hpd_rx_irq+0x184/0x1a0 [amdgpu] ? dm_handle_hpd_rx_irq+0x184/0x1a0 [amdgpu] handle_hpd_rx_irq+0x195/0x240 [amdgpu] ? __switch_to_asm+0x42/0x70 ? __switch_to+0x131/0x450 dm_irq_work_func+0x19/0x20 [amdgpu] process_one_work+0x209/0x400 worker_thread+0x4d/0x3e0 ? cancel_delayed_work+0xa0/0xa0 kthread+0x124/0x160 ? kthread_park+0x90/0x90 ret_from_fork+0x22/0x30 Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Anson Jacob Signed-off-by: Anson Jacob Cc: stable@vger.kernel.org Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c90f6263f58a28c3d97b83679d6fd693b33dfd4e Author: Eric Bernstein Date: Mon Jul 26 15:53:18 2021 -0400 drm/amd/display: Remove invalid assert for ODM + MPC case Reviewed-by: Dmytro Laktyushkin Acked-by: Anson Jacob Signed-off-by: Eric Bernstein Cc: stable@vger.kernel.org Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3042f80c6cb9340354dc56ecb06473be57adc432 Author: Kenneth Feng Date: Fri Aug 6 10:28:04 2021 +0800 drm/amd/pm: bug fix for the runtime pm BACO In some systems only MACO is supported. This is to fix the problem that runtime pm is enabled but BACO is not supported. MACO will be handled seperately. Signed-off-by: Kenneth Feng Reviewed-by: Jack Gui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 7cbe08a930a132d84b4cf79953b00b074ec7a2a7 Author: Alex Deucher Date: Mon Aug 9 11:22:20 2021 -0400 drm/amdgpu: handle VCN instances when harvesting (v2) There may be multiple instances and only one is harvested. v2: fix typo in commit message Fixes: 83a0b8639185 ("drm/amdgpu: add judgement when add ip blocks (v2)") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1673 Reviewed-by: Guchun Chen Reviewed-by: James Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit dbbc93576e03fbe24b365fab0e901eb442237a8a Author: Bixuan Cui Date: Tue May 18 11:31:17 2021 +0800 genirq/msi: Ensure deactivation on teardown msi_domain_alloc_irqs() invokes irq_domain_activate_irq(), but msi_domain_free_irqs() does not enforce deactivation before tearing down the interrupts. This happens when PCI/MSI interrupts are set up and never used before being torn down again, e.g. in error handling pathes. The only place which cleans that up is the error handling path in msi_domain_alloc_irqs(). Move the cleanup from msi_domain_alloc_irqs() into msi_domain_free_irqs() to cure that. Fixes: f3b0946d629c ("genirq/msi: Make sure PCI MSIs are activated early") Signed-off-by: Bixuan Cui Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210518033117.78104-1-cuibixuan@huawei.com commit d927ae73e1bd5aed59e0afc58016bb11cc4a1549 Merge: 36a21d51725af 699aa57b35672 Author: Rodrigo Vivi Date: Tue Aug 10 09:49:14 2021 -0400 Merge tag 'gvt-fixes-2021-08-10' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2021-08-10 - Fix windows VM hang issue for atomics workaround (Zhenyu) Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210810050133.GO13928@zhen-hp.sh.intel.com commit b9cc7d8a4656a6e815852c27ab50365009cb69c1 Author: Ben Dai Date: Sun Apr 25 23:09:03 2021 +0800 genirq/timings: Prevent potential array overflow in __irq_timings_store() When the interrupt interval is greater than 2 ^ PREDICTION_BUFFER_SIZE * PREDICTION_FACTOR us and less than 1s, the calculated index will be greater than the length of irqs->ema_time[]. Check the calculated index before using it to prevent array overflow. Fixes: 23aa3b9a6b7d ("genirq/timings: Encapsulate storing function") Signed-off-by: Ben Dai Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210425150903.25456-1-ben.dai9703@gmail.com commit d1dee814168538eba166ae4150b37f0d88257884 Author: Andre Przywara Date: Thu Jul 22 14:25:48 2021 +0100 pinctrl: sunxi: Don't underestimate number of functions When we are building all the various pinctrl structures for the Allwinner pinctrl devices, we do some estimation about the maximum number of distinct function (names) that we will need. So far we take the number of pins as an upper bound, even though we can actually have up to four special functions per pin. This wasn't a problem until now, since we indeed have typically far more pins than functions, and most pins share common functions. However the H616 "-r" pin controller has only two pins, but four functions, so we run over the end of the array when we are looking for a matching function name in sunxi_pinctrl_add_function - there is no NULL sentinel left that would terminate the loop: [ 8.200648] Unable to handle kernel paging request at virtual address fffdff7efbefaff5 [ 8.209179] Mem abort info: .... [ 8.368456] Call trace: [ 8.370925] __pi_strcmp+0x90/0xf0 [ 8.374559] sun50i_h616_r_pinctrl_probe+0x1c/0x28 [ 8.379557] platform_probe+0x68/0xd8 Do an actual worst case allocation (4 functions per pin, three common functions and the sentinel) for the initial array allocation. This is now heavily overestimating the number of functions in the common case, but we will reallocate this array later with the actual number of functions, so it's only temporarily. Fixes: 561c1cf17c46 ("pinctrl: sunxi: Add support for the Allwinner H616-R pin controller") Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20210722132548.22121-1-andre.przywara@arm.com Signed-off-by: Linus Walleij commit d07149aba2ef423eae94a9cc2a6365d0cdf6fd51 Author: Jeremy Szu Date: Tue Aug 10 18:08:45 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PC The HP ProBook 650 G8 Notebook PC is using ALC236 codec which is using 0x02 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210810100846.65844-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 09c7fd521879650e24ab774f717234b6da328678 Merge: 4a2b285e7e103 21b52fed928e9 Author: David S. Miller Date: Tue Aug 10 13:17:22 2021 +0100 Merge branch 'fdb-backpressure-fixes' Vladimir Oltean says: ==================== Fix broken backpressure during FDB dump in DSA drivers rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into multiple netlink skbs if the buffer provided by user space is too small (one buffer will typically handle a few hundred FDB entries). When the current buffer becomes full, nlmsg_put() in dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that point, and then the dump resumes on the same port with a new skb, and FDB entries up to the saved index are simply skipped. Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to drivers, then drivers must check for the -EMSGSIZE error code returned by it. Otherwise, when a netlink skb becomes full, DSA will no longer save newly dumped FDB entries to it, but the driver will continue dumping. So FDB entries will be missing from the dump. DSA is one of the few switchdev drivers that have an .ndo_fdb_dump implementation, because of the assumption that the hardware and software FDBs cannot be efficiently kept in sync via SWITCHDEV_FDB_ADD_TO_BRIDGE. Other drivers with a home-cooked .ndo_fdb_dump implementation are ocelot and dpaa2-switch. These appear to do the correct thing, as do the other DSA drivers, so nothing else appears to need fixing. ==================== Signed-off-by: David S. Miller commit 21b52fed928e96d2f75d2f6aa9eac7a4b0b55d22 Author: Vladimir Oltean Date: Tue Aug 10 14:19:56 2021 +0300 net: dsa: sja1105: fix broken backpressure in .port_fdb_dump rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into multiple netlink skbs if the buffer provided by user space is too small (one buffer will typically handle a few hundred FDB entries). When the current buffer becomes full, nlmsg_put() in dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that point, and then the dump resumes on the same port with a new skb, and FDB entries up to the saved index are simply skipped. Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to drivers, then drivers must check for the -EMSGSIZE error code returned by it. Otherwise, when a netlink skb becomes full, DSA will no longer save newly dumped FDB entries to it, but the driver will continue dumping. So FDB entries will be missing from the dump. Fix the broken backpressure by propagating the "cb" return code and allow rtnl_fdb_dump() to restart the FDB dump with a new skb. Fixes: 291d1e72b756 ("net: dsa: sja1105: Add support for FDB and MDB management") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 871a73a1c8f55da0a3db234e9dd816ea4fd546f2 Author: Vladimir Oltean Date: Tue Aug 10 14:19:55 2021 +0300 net: dsa: lantiq: fix broken backpressure in .port_fdb_dump rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into multiple netlink skbs if the buffer provided by user space is too small (one buffer will typically handle a few hundred FDB entries). When the current buffer becomes full, nlmsg_put() in dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that point, and then the dump resumes on the same port with a new skb, and FDB entries up to the saved index are simply skipped. Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to drivers, then drivers must check for the -EMSGSIZE error code returned by it. Otherwise, when a netlink skb becomes full, DSA will no longer save newly dumped FDB entries to it, but the driver will continue dumping. So FDB entries will be missing from the dump. Fix the broken backpressure by propagating the "cb" return code and allow rtnl_fdb_dump() to restart the FDB dump with a new skb. Fixes: 58c59ef9e930 ("net: dsa: lantiq: Add Forwarding Database access") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ada2fee185d8145afb89056558bb59545b9dbdd0 Author: Vladimir Oltean Date: Tue Aug 10 14:19:54 2021 +0300 net: dsa: lan9303: fix broken backpressure in .port_fdb_dump rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into multiple netlink skbs if the buffer provided by user space is too small (one buffer will typically handle a few hundred FDB entries). When the current buffer becomes full, nlmsg_put() in dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that point, and then the dump resumes on the same port with a new skb, and FDB entries up to the saved index are simply skipped. Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to drivers, then drivers must check for the -EMSGSIZE error code returned by it. Otherwise, when a netlink skb becomes full, DSA will no longer save newly dumped FDB entries to it, but the driver will continue dumping. So FDB entries will be missing from the dump. Fix the broken backpressure by propagating the "cb" return code and allow rtnl_fdb_dump() to restart the FDB dump with a new skb. Fixes: ab335349b852 ("net: dsa: lan9303: Add port_fast_age and port_fdb_dump methods") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cd391280bf4693ceddca8f19042cff42f98c1a89 Author: Vladimir Oltean Date: Tue Aug 10 14:19:53 2021 +0300 net: dsa: hellcreek: fix broken backpressure in .port_fdb_dump rtnl_fdb_dump() has logic to split a dump of PF_BRIDGE neighbors into multiple netlink skbs if the buffer provided by user space is too small (one buffer will typically handle a few hundred FDB entries). When the current buffer becomes full, nlmsg_put() in dsa_slave_port_fdb_do_dump() returns -EMSGSIZE and DSA saves the index of the last dumped FDB entry, returns to rtnl_fdb_dump() up to that point, and then the dump resumes on the same port with a new skb, and FDB entries up to the saved index are simply skipped. Since dsa_slave_port_fdb_do_dump() is pointed to by the "cb" passed to drivers, then drivers must check for the -EMSGSIZE error code returned by it. Otherwise, when a netlink skb becomes full, DSA will no longer save newly dumped FDB entries to it, but the driver will continue dumping. So FDB entries will be missing from the dump. Fix the broken backpressure by propagating the "cb" return code and allow rtnl_fdb_dump() to restart the FDB dump with a new skb. Fixes: e4b27ebc780f ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches") Signed-off-by: Vladimir Oltean Acked-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 463dbba4d189750c2f576449d0bbb11c5413712e Author: Linus Walleij Date: Mon Aug 9 12:57:19 2021 +0100 ARM: 9104/2: Fix Keystone 2 kernel mapping regression This fixes a Keystone 2 regression discovered as a side effect of defining an passing the physical start/end sections of the kernel to the MMU remapping code. As the Keystone applies an offset to all physical addresses, including those identified and patches by phys2virt, we fail to account for this offset in the kernel_sec_start and kernel_sec_end variables. Further these offsets can extend into the 64bit range on LPAE systems such as the Keystone 2. Fix it like this: - Extend kernel_sec_start and kernel_sec_end to be 64bit - Add the offset also to kernel_sec_start and kernel_sec_end As passing kernel_sec_start and kernel_sec_end as 64bit invariably incurs BE8 endianness issues I have attempted to dry-code around these. Tested on the Vexpress QEMU model both with and without LPAE enabled. Fixes: 6e121df14ccd ("ARM: 9090/1: Map the lowmem and kernel separately") Reported-by: Nishanth Menon Suggested-by: Russell King Tested-by: Grygorii Strashko Tested-by: Nishanth Menon Signed-off-by: Linus Walleij Signed-off-by: Russell King (Oracle) commit 019d0454c61707879cf9853c894e0a191f6b9774 Author: Randy Dunlap Date: Mon Aug 9 14:52:29 2021 -0700 bpf, core: Fix kernel-doc notation Fix kernel-doc warnings in kernel/bpf/core.c (found by scripts/kernel-doc and W=1 builds). That is, correct a function name in a comment and add return descriptions for 2 functions. Fixes these kernel-doc warnings: kernel/bpf/core.c:1372: warning: expecting prototype for __bpf_prog_run(). Prototype was for ___bpf_prog_run() instead kernel/bpf/core.c:1372: warning: No description found for return value of '___bpf_prog_run' kernel/bpf/core.c:1883: warning: No description found for return value of 'bpf_prog_select_runtime' Signed-off-by: Randy Dunlap Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210809215229.7556-1-rdunlap@infradead.org commit 4a2b285e7e103d4d6c6ed3e5052a0ff74a5d7f15 Author: Eric Dumazet Date: Tue Aug 10 02:45:47 2021 -0700 net: igmp: fix data-race in igmp_ifc_timer_expire() Fix the data-race reported by syzbot [1] Issue here is that igmp_ifc_timer_expire() can update in_dev->mr_ifc_count while another change just occured from another context. in_dev->mr_ifc_count is only 8bit wide, so the race had little consequences. [1] BUG: KCSAN: data-race in igmp_ifc_event / igmp_ifc_timer_expire write to 0xffff8881051e3062 of 1 bytes by task 12547 on cpu 0: igmp_ifc_event+0x1d5/0x290 net/ipv4/igmp.c:821 igmp_group_added+0x462/0x490 net/ipv4/igmp.c:1356 ____ip_mc_inc_group+0x3ff/0x500 net/ipv4/igmp.c:1461 __ip_mc_join_group+0x24d/0x2c0 net/ipv4/igmp.c:2199 ip_mc_join_group_ssm+0x20/0x30 net/ipv4/igmp.c:2218 do_ip_setsockopt net/ipv4/ip_sockglue.c:1285 [inline] ip_setsockopt+0x1827/0x2a80 net/ipv4/ip_sockglue.c:1423 tcp_setsockopt+0x8c/0xa0 net/ipv4/tcp.c:3657 sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3362 __sys_setsockopt+0x18f/0x200 net/socket.c:2159 __do_sys_setsockopt net/socket.c:2170 [inline] __se_sys_setsockopt net/socket.c:2167 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2167 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff8881051e3062 of 1 bytes by interrupt on cpu 1: igmp_ifc_timer_expire+0x706/0xa30 net/ipv4/igmp.c:808 call_timer_fn+0x2e/0x1d0 kernel/time/timer.c:1419 expire_timers+0x135/0x250 kernel/time/timer.c:1464 __run_timers+0x358/0x420 kernel/time/timer.c:1732 run_timer_softirq+0x19/0x30 kernel/time/timer.c:1745 __do_softirq+0x12c/0x26e kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x9a/0xb0 kernel/softirq.c:636 sysvec_apic_timer_interrupt+0x69/0x80 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 console_unlock+0x8e8/0xb30 kernel/printk/printk.c:2646 vprintk_emit+0x125/0x3d0 kernel/printk/printk.c:2174 vprintk_default+0x22/0x30 kernel/printk/printk.c:2185 vprintk+0x15a/0x170 kernel/printk/printk_safe.c:392 printk+0x62/0x87 kernel/printk/printk.c:2216 selinux_netlink_send+0x399/0x400 security/selinux/hooks.c:6041 security_netlink_send+0x42/0x90 security/security.c:2070 netlink_sendmsg+0x59e/0x7c0 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg net/socket.c:723 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2392 ___sys_sendmsg net/socket.c:2446 [inline] __sys_sendmsg+0x1ed/0x270 net/socket.c:2475 __do_sys_sendmsg net/socket.c:2484 [inline] __se_sys_sendmsg net/socket.c:2482 [inline] __x64_sys_sendmsg+0x42/0x50 net/socket.c:2482 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x01 -> 0x02 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 12539 Comm: syz-executor.1 Not tainted 5.14.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 1090340f7ee53e824fd4eef66a4855d548110c5b Author: Takeshi Misawa Date: Thu Aug 5 16:54:14 2021 +0900 net: Fix memory leak in ieee802154_raw_deliver If IEEE-802.15.4-RAW is closed before receive skb, skb is leaked. Fix this, by freeing sk_receive_queue in sk->sk_destruct(). syzbot report: BUG: memory leak unreferenced object 0xffff88810f644600 (size 232): comm "softirq", pid 0, jiffies 4294967032 (age 81.270s) hex dump (first 32 bytes): 10 7d 4b 12 81 88 ff ff 10 7d 4b 12 81 88 ff ff .}K......}K..... 00 00 00 00 00 00 00 00 40 7c 4b 12 81 88 ff ff ........@|K..... backtrace: [] skb_clone+0xaa/0x2b0 net/core/skbuff.c:1496 [] ieee802154_raw_deliver net/ieee802154/socket.c:369 [inline] [] ieee802154_rcv+0x100/0x340 net/ieee802154/socket.c:1070 [] __netif_receive_skb_one_core+0x6a/0xa0 net/core/dev.c:5384 [] __netif_receive_skb+0x27/0xa0 net/core/dev.c:5498 [] netif_receive_skb_internal net/core/dev.c:5603 [inline] [] netif_receive_skb+0x59/0x260 net/core/dev.c:5662 [] ieee802154_deliver_skb net/mac802154/rx.c:29 [inline] [] ieee802154_subif_frame net/mac802154/rx.c:102 [inline] [] __ieee802154_rx_handle_packet net/mac802154/rx.c:212 [inline] [] ieee802154_rx+0x612/0x620 net/mac802154/rx.c:284 [] ieee802154_tasklet_handler+0x86/0xa0 net/mac802154/main.c:35 [] tasklet_action_common.constprop.0+0x5b/0x100 kernel/softirq.c:557 [] __do_softirq+0xbf/0x2ab kernel/softirq.c:345 [] do_softirq kernel/softirq.c:248 [inline] [] do_softirq+0x5c/0x80 kernel/softirq.c:235 [] __local_bh_enable_ip+0x51/0x60 kernel/softirq.c:198 [] local_bh_enable include/linux/bottom_half.h:32 [inline] [] rcu_read_unlock_bh include/linux/rcupdate.h:745 [inline] [] __dev_queue_xmit+0x7f4/0xf60 net/core/dev.c:4221 [] raw_sendmsg+0x1f4/0x2b0 net/ieee802154/socket.c:295 [] sock_sendmsg_nosec net/socket.c:654 [inline] [] sock_sendmsg+0x56/0x80 net/socket.c:674 [] __sys_sendto+0x15c/0x200 net/socket.c:1977 [] __do_sys_sendto net/socket.c:1989 [inline] [] __se_sys_sendto net/socket.c:1985 [inline] [] __x64_sys_sendto+0x26/0x30 net/socket.c:1985 Fixes: 9ec767160357 ("net: add IEEE 802.15.4 socket family implementation") Reported-and-tested-by: syzbot+1f68113fa907bf0695a8@syzkaller.appspotmail.com Signed-off-by: Takeshi Misawa Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210805075414.GA15796@DESKTOP Signed-off-by: Stefan Schmidt commit ff363f480e5997051dd1de949121ffda3b753741 Author: Thomas Gleixner Date: Thu Jul 29 23:51:50 2021 +0200 x86/msi: Force affinity setup before startup The X86 MSI mechanism cannot handle interrupt affinity changes safely after startup other than from an interrupt handler, unless interrupt remapping is enabled. The startup sequence in the generic interrupt code violates that assumption. Mark the irq chips with the new IRQCHIP_AFFINITY_PRE_STARTUP flag so that the default interrupt setting happens before the interrupt is started up for the first time. While the interrupt remapping MSI chip does not require this, there is no point in treating it differently as this might spare an interrupt to a CPU which is not in the default affinity mask. For the non-remapping case go to the direct write path when the interrupt is not yet started similar to the not yet activated case. Fixes: 18404756765c ("genirq: Expose default irq affinity mask (take 3)") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.886722080@linutronix.de commit 0c0e37dc11671384e53ba6ede53a4d91162a2cc5 Author: Thomas Gleixner Date: Thu Jul 29 23:51:49 2021 +0200 x86/ioapic: Force affinity setup before startup The IO/APIC cannot handle interrupt affinity changes safely after startup other than from an interrupt handler. The startup sequence in the generic interrupt code violates that assumption. Mark the irq chip with the new IRQCHIP_AFFINITY_PRE_STARTUP flag so that the default interrupt setting happens before the interrupt is started up for the first time. Fixes: 18404756765c ("genirq: Expose default irq affinity mask (take 3)") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.832143400@linutronix.de commit 826da771291fc25a428e871f9e7fb465e390f852 Author: Thomas Gleixner Date: Thu Jul 29 23:51:48 2021 +0200 genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP X86 IO/APIC and MSI interrupts (when used without interrupts remapping) require that the affinity setup on startup is done before the interrupt is enabled for the first time as the non-remapped operation mode cannot safely migrate enabled interrupts from arbitrary contexts. Provide a new irq chip flag which allows affected hardware to request this. This has to be opt-in because there have been reports in the past that some interrupt chips cannot handle affinity setting before startup. Fixes: 18404756765c ("genirq: Expose default irq affinity mask (take 3)") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.779791738@linutronix.de commit 77e89afc25f30abd56e76a809ee2884d7c1b63ce Author: Thomas Gleixner Date: Thu Jul 29 23:51:47 2021 +0200 PCI/MSI: Protect msi_desc::masked for multi-MSI Multi-MSI uses a single MSI descriptor and there is a single mask register when the device supports per vector masking. To avoid reading back the mask register the value is cached in the MSI descriptor and updates are done by clearing and setting bits in the cache and writing it to the device. But nothing protects msi_desc::masked and the mask register from being modified concurrently on two different CPUs for two different Linux interrupts which belong to the same multi-MSI descriptor. Add a lock to struct device and protect any operation on the mask and the mask register with it. This makes the update of msi_desc::masked unconditional, but there is no place which requires a modification of the hardware register without updating the masked cache. msi_mask_irq() is now an empty wrapper which will be cleaned up in follow up changes. The problem goes way back to the initial support of multi-MSI, but picking the commit which introduced the mask cache is a valid cut off point (2.6.30). Fixes: f2440d9acbe8 ("PCI MSI: Refactor interrupt masking code") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.726833414@linutronix.de commit d28d4ad2a1aef27458b3383725bb179beb8d015c Author: Thomas Gleixner Date: Thu Jul 29 23:51:46 2021 +0200 PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown() No point in using the raw write function from shutdown. Preparatory change to introduce proper serialization for the msi_desc::masked cache. Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.674391354@linutronix.de commit 689e6b5351573c38ccf92a0dd8b3e2c2241e4aff Author: Thomas Gleixner Date: Thu Jul 29 23:51:45 2021 +0200 PCI/MSI: Correct misleading comments The comments about preserving the cached state in pci_msi[x]_shutdown() are misleading as the MSI descriptors are freed right after those functions return. So there is nothing to restore. Preparatory change. Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.621609423@linutronix.de commit 361fd37397f77578735907341579397d5bed0a2d Author: Thomas Gleixner Date: Thu Jul 29 23:51:44 2021 +0200 PCI/MSI: Do not set invalid bits in MSI mask msi_mask_irq() takes a mask and a flags argument. The mask argument is used to mask out bits from the cached mask and the flags argument to set bits. Some places invoke it with a flags argument which sets bits which are not used by the device, i.e. when the device supports up to 8 vectors a full unmask in some places sets the mask to 0xFFFFFF00. While devices probably do not care, it's still bad practice. Fixes: 7ba1930db02f ("PCI MSI: Unmask MSI if setup failed") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.568173099@linutronix.de commit b9255a7cb51754e8d2645b65dd31805e282b4f3e Author: Thomas Gleixner Date: Thu Jul 29 23:51:43 2021 +0200 PCI/MSI: Enforce MSI[X] entry updates to be visible Nothing enforces the posted writes to be visible when the function returns. Flush them even if the flush might be redundant when the entry is masked already as the unmask will flush as well. This is either setup or a rare affinity change event so the extra flush is not the end of the world. While this is more a theoretical issue especially the logic in the X86 specific msi_set_affinity() function relies on the assumption that the update has reached the hardware when the function returns. Again, as this never has been enforced the Fixes tag refers to a commit in: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Fixes: f036d4ea5fa7 ("[PATCH] ia32 Message Signalled Interrupt support") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Acked-by: Bjorn Helgaas Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.515188147@linutronix.de commit da181dc974ad667579baece33c2c8d2d1e4558d5 Author: Thomas Gleixner Date: Thu Jul 29 23:51:42 2021 +0200 PCI/MSI: Enforce that MSI-X table entry is masked for update The specification (PCIe r5.0, sec 6.1.4.5) states: For MSI-X, a function is permitted to cache Address and Data values from unmasked MSI-X Table entries. However, anytime software unmasks a currently masked MSI-X Table entry either by clearing its Mask bit or by clearing the Function Mask bit, the function must update any Address or Data values that it cached from that entry. If software changes the Address or Data value of an entry while the entry is unmasked, the result is undefined. The Linux kernel's MSI-X support never enforced that the entry is masked before the entry is modified hence the Fixes tag refers to a commit in: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Enforce the entry to be masked across the update. There is no point in enforcing this to be handled at all possible call sites as this is just pointless code duplication and the common update function is the obvious place to enforce this. Fixes: f036d4ea5fa7 ("[PATCH] ia32 Message Signalled Interrupt support") Reported-by: Kevin Tian Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Acked-by: Bjorn Helgaas Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.462096385@linutronix.de commit 7d5ec3d3612396dc6d4b76366d20ab9fc06f399f Author: Thomas Gleixner Date: Thu Jul 29 23:51:41 2021 +0200 PCI/MSI: Mask all unused MSI-X entries When MSI-X is enabled the ordering of calls is: msix_map_region(); msix_setup_entries(); pci_msi_setup_msi_irqs(); msix_program_entries(); This has a few interesting issues: 1) msix_setup_entries() allocates the MSI descriptors and initializes them except for the msi_desc:masked member which is left zero initialized. 2) pci_msi_setup_msi_irqs() allocates the interrupt descriptors and sets up the MSI interrupts which ends up in pci_write_msi_msg() unless the interrupt chip provides its own irq_write_msi_msg() function. 3) msix_program_entries() does not do what the name suggests. It solely updates the entries array (if not NULL) and initializes the masked member for each MSI descriptor by reading the hardware state and then masks the entry. Obviously this has some issues: 1) The uninitialized masked member of msi_desc prevents the enforcement of masking the entry in pci_write_msi_msg() depending on the cached masked bit. Aside of that half initialized data is a NONO in general 2) msix_program_entries() only ensures that the actually allocated entries are masked. This is wrong as experimentation with crash testing and crash kernel kexec has shown. This limited testing unearthed that when the production kernel had more entries in use and unmasked when it crashed and the crash kernel allocated a smaller amount of entries, then a full scan of all entries found unmasked entries which were in use in the production kernel. This is obviously a device or emulation issue as the device reset should mask all MSI-X table entries, but obviously that's just part of the paper specification. Cure this by: 1) Masking all table entries in hardware 2) Initializing msi_desc::masked in msix_setup_entries() 3) Removing the mask dance in msix_program_entries() 4) Renaming msix_program_entries() to msix_update_entries() to reflect the purpose of that function. As the masking of unused entries has never been done the Fixes tag refers to a commit in: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Fixes: f036d4ea5fa7 ("[PATCH] ia32 Message Signalled Interrupt support") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Acked-by: Bjorn Helgaas Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.403833459@linutronix.de commit 438553958ba19296663c6d6583d208dfb6792830 Author: Thomas Gleixner Date: Thu Jul 29 23:51:40 2021 +0200 PCI/MSI: Enable and mask MSI-X early The ordering of MSI-X enable in hardware is dysfunctional: 1) MSI-X is disabled in the control register 2) Various setup functions 3) pci_msi_setup_msi_irqs() is invoked which ends up accessing the MSI-X table entries 4) MSI-X is enabled and masked in the control register with the comment that enabling is required for some hardware to access the MSI-X table Step #4 obviously contradicts #3. The history of this is an issue with the NIU hardware. When #4 was introduced the table access actually happened in msix_program_entries() which was invoked after enabling and masking MSI-X. This was changed in commit d71d6432e105 ("PCI/MSI: Kill redundant call of irq_set_msi_desc() for MSI-X interrupts") which removed the table write from msix_program_entries(). Interestingly enough nobody noticed and either NIU still works or it did not get any testing with a kernel 3.19 or later. Nevertheless this is inconsistent and there is no reason why MSI-X can't be enabled and masked in the control register early on, i.e. move step #4 above to step #1. This preserves the NIU workaround and has no side effects on other hardware. Fixes: d71d6432e105 ("PCI/MSI: Kill redundant call of irq_set_msi_desc() for MSI-X interrupts") Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Ashok Raj Reviewed-by: Marc Zyngier Acked-by: Bjorn Helgaas Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.344136412@linutronix.de commit 37c86c4a0bfc2faaf0ed959db9de814c85797f09 Merge: 31782a01d14f0 411d466d94a6b Author: David S. Miller Date: Tue Aug 10 09:58:15 2021 +0100 Merge branch 'ks8795-vlan-fixes' Ben Hutchings says: ==================== ksz8795 VLAN fixes This series fixes a number of bugs in the ksz8795 driver that affect VLAN filtering, tag insertion, and tag removal. I've tested these on the KSZ8795CLXD evaluation board, and checked the register usage against the datasheets for the other supported chips. ==================== Signed-off-by: David S. Miller commit 411d466d94a6b16a20c8b552e403b7e8ce2397a2 Author: Ben Hutchings Date: Tue Aug 10 01:00:15 2021 +0200 net: dsa: microchip: ksz8795: Don't use phy_port_cnt in VLAN table lookup The magic number 4 in VLAN table lookup was the number of entries we can read and write at once. Using phy_port_cnt here doesn't make sense and presumably broke VLAN filtering for 3-port switches. Change it back to 4. Fixes: 4ce2a984abd8 ("net: dsa: microchip: ksz8795: use phy_port_cnt ...") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 164844135a3f215d3018ee9d6875336beb942413 Author: Ben Hutchings Date: Tue Aug 10 01:00:06 2021 +0200 net: dsa: microchip: ksz8795: Fix VLAN filtering Currently ksz8_port_vlan_filtering() sets or clears the VLAN Enable hardware flag. That controls discarding of packets with a VID that has not been enabled for any port on the switch. Since it is a global flag, set the dsa_switch::vlan_filtering_is_global flag so that the DSA core understands this can't be controlled per port. When VLAN filtering is enabled, the switch should also discard packets with a VID that's not enabled on the ingress port. Set or clear each external port's VLAN Ingress Filter flag in ksz8_port_vlan_filtering() to make that happen. Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 9130c2d30c17846287b803a9803106318cbe5266 Author: Ben Hutchings Date: Tue Aug 10 00:59:57 2021 +0200 net: dsa: microchip: ksz8795: Use software untagging on CPU port On the CPU port, we can support both tagged and untagged VLANs at the same time by doing any necessary untagging in software rather than hardware. To enable that, keep the CPU port's Remove Tag flag cleared and set the dsa_switch::untag_bridge_pvid flag. Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit af01754f9e3c553a2ee63b4693c79a3956e230ab Author: Ben Hutchings Date: Tue Aug 10 00:59:47 2021 +0200 net: dsa: microchip: ksz8795: Fix VLAN untagged flag change on deletion When a VLAN is deleted from a port, the flags in struct switchdev_obj_port_vlan are always 0. ksz8_port_vlan_del() copies the BRIDGE_VLAN_INFO_UNTAGGED flag to the port's Tag Removal flag, and therefore always clears it. In case there are multiple VLANs configured as untagged on this port - which seems useless, but is allowed - deleting one of them changes the remaining VLANs to be tagged. It's only ever necessary to change this flag when a VLAN is added to the port, so leave it unchanged in ksz8_port_vlan_del(). Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 8f4f58f88fe0d9bd591f21f53de7dbd42baeb3fa Author: Ben Hutchings Date: Tue Aug 10 00:59:37 2021 +0200 net: dsa: microchip: ksz8795: Reject unsupported VLAN configuration The switches supported by ksz8795 only have a per-port flag for Tag Removal. This means it is not possible to support both tagged and untagged VLANs on the same port. Reject attempts to add a VLAN that requires the flag to be changed, unless there are no VLANs currently configured. VID 0 is excluded from this check since it is untagged regardless of the state of the flag. On the CPU port we could support tagged and untagged VLANs at the same time. This will be enabled by a later patch. Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit ef3b02a1d79b691f9a354c4903cf1e6917e315f9 Author: Ben Hutchings Date: Tue Aug 10 00:59:28 2021 +0200 net: dsa: microchip: ksz8795: Fix PVID tag insertion ksz8795 has never actually enabled PVID tag insertion, and it also programmed the PVID incorrectly. To fix this: * Allow tag insertion to be controlled per ingress port. On most chips, set bit 2 in Global Control 19. On KSZ88x3 this control flag doesn't exist. * When adding a PVID: - Set the appropriate register bits to enable tag insertion on egress at every other port if this was the packet's ingress port. - Mask *out* the VID from the default tag, before or-ing in the new PVID. * When removing a PVID: - Clear the same control bits to disable tag insertion. - Don't update the default tag. This wasn't doing anything useful. Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit c34f674c8875235725c3ef86147a627f165d23b4 Author: Ben Hutchings Date: Tue Aug 10 00:59:12 2021 +0200 net: dsa: microchip: Fix ksz_read64() ksz_read64() currently does some dubious byte-swapping on the two halves of a 64-bit register, and then only returns the high bits. Replace this with a straightforward expression. Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 31782a01d14f04bcdd5414861e806937a1db21c4 Merge: 6a279f61e255d aae32b784ebdb Author: David S. Miller Date: Tue Aug 10 09:53:15 2021 +0100 Merge tag 'linux-can-fixes-for-5.14-20210810' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can linux-can-fixes-for-5.14-20210810 Marc Kleine-Budde says: ==================== pull-request: can 2021-08-10 this is a pull request of 2 patches for net/master. Baruch Siach's patch fixes a typo for the Microchip CAN BUS Analyzer Tool entry in the MAINTAINERS file. Hussein Alasadi fixes the setting of the M_CAN_DBTP register in the m_can driver. The regression git mainline in v5.14-rc1, so no backport to stable is needed. ==================== Signed-off-by: David S. Miller commit 6a279f61e255d64753d2f0e95c2cbceb132349cd Merge: ea377dca46a47 bd37c2888ccaa Author: David S. Miller Date: Tue Aug 10 09:42:39 2021 +0100 Merge tag 'mlx5-fixes-2021-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-08-09 This series introduces fixes to mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit ea377dca46a474762304be97c526c501bccdf80a Merge: 143a8526ab5fd a7550f8b1c971 Author: David S. Miller Date: Tue Aug 10 09:30:04 2021 +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 2021-08-09 This series contains updates to ice and iavf drivers. Ani prevents the ice driver from accidentally being probed to a virtual function and stops processing of VF messages when VFs are being torn down. Brett prevents the ice driver from deleting is own MAC address. Fahad ensures the RSS LUT and key are always set following reset for iavf. ==================== Signed-off-by: David S. Miller commit a2baf4e8bb0f306fbed7b5e6197c02896a638ab5 Author: Yonghong Song Date: Mon Aug 9 18:04:13 2021 -0700 bpf: Fix potentially incorrect results with bpf_get_local_storage() Commit b910eaaaa4b8 ("bpf: Fix NULL pointer dereference in bpf_get_local_storage() helper") fixed a bug for bpf_get_local_storage() helper so different tasks won't mess up with each other's percpu local storage. The percpu data contains 8 slots so it can hold up to 8 contexts (same or different tasks), for 8 different program runs, at the same time. This in general is sufficient. But our internal testing showed the following warning multiple times: [...] warning: WARNING: CPU: 13 PID: 41661 at include/linux/bpf-cgroup.h:193 __cgroup_bpf_run_filter_sock_ops+0x13e/0x180 RIP: 0010:__cgroup_bpf_run_filter_sock_ops+0x13e/0x180 tcp_call_bpf.constprop.99+0x93/0xc0 tcp_conn_request+0x41e/0xa50 ? tcp_rcv_state_process+0x203/0xe00 tcp_rcv_state_process+0x203/0xe00 ? sk_filter_trim_cap+0xbc/0x210 ? tcp_v6_inbound_md5_hash.constprop.41+0x44/0x160 tcp_v6_do_rcv+0x181/0x3e0 tcp_v6_rcv+0xc65/0xcb0 ip6_protocol_deliver_rcu+0xbd/0x450 ip6_input_finish+0x11/0x20 ip6_input+0xb5/0xc0 ip6_sublist_rcv_finish+0x37/0x50 ip6_sublist_rcv+0x1dc/0x270 ipv6_list_rcv+0x113/0x140 __netif_receive_skb_list_core+0x1a0/0x210 netif_receive_skb_list_internal+0x186/0x2a0 gro_normal_list.part.170+0x19/0x40 napi_complete_done+0x65/0x150 mlx5e_napi_poll+0x1ae/0x680 __napi_poll+0x25/0x120 net_rx_action+0x11e/0x280 __do_softirq+0xbb/0x271 irq_exit_rcu+0x97/0xa0 common_interrupt+0x7f/0xa0 asm_common_interrupt+0x1e/0x40 RIP: 0010:bpf_prog_1835a9241238291a_tw_egress+0x5/0xbac ? __cgroup_bpf_run_filter_skb+0x378/0x4e0 ? do_softirq+0x34/0x70 ? ip6_finish_output2+0x266/0x590 ? ip6_finish_output+0x66/0xa0 ? ip6_output+0x6c/0x130 ? ip6_xmit+0x279/0x550 ? ip6_dst_check+0x61/0xd0 [...] Using drgn [0] to dump the percpu buffer contents showed that on this CPU slot 0 is still available, but slots 1-7 are occupied and those tasks in slots 1-7 mostly don't exist any more. So we might have issues in bpf_cgroup_storage_unset(). Further debugging confirmed that there is a bug in bpf_cgroup_storage_unset(). Currently, it tries to unset "current" slot with searching from the start. So the following sequence is possible: 1. A task is running and claims slot 0 2. Running BPF program is done, and it checked slot 0 has the "task" and ready to reset it to NULL (not yet). 3. An interrupt happens, another BPF program runs and it claims slot 1 with the *same* task. 4. The unset() in interrupt context releases slot 0 since it matches "task". 5. Interrupt is done, the task in process context reset slot 0. At the end, slot 1 is not reset and the same process can continue to occupy slots 2-7 and finally, when the above step 1-5 is repeated again, step 3 BPF program won't be able to claim an empty slot and a warning will be issued. To fix the issue, for unset() function, we should traverse from the last slot to the first. This way, the above issue can be avoided. The same reverse traversal should also be done in bpf_get_local_storage() helper itself. Otherwise, incorrect local storage may be returned to BPF program. [0] https://github.com/osandov/drgn Fixes: b910eaaaa4b8 ("bpf: Fix NULL pointer dereference in bpf_get_local_storage() helper") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210810010413.1976277-1-yhs@fb.com commit 55203550f9afb027389bd24ce85bd90044c3aa81 Merge: ddab1e71d2df3 c32ac11da3f83 Author: Thomas Gleixner Date: Tue Aug 10 10:24:49 2021 +0200 Merge tag 'efi-urgent-for-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent Pull EFI fixes from Ard Biesheuvel: A batch of fixes for the arm64 stub image loader: - fix a logic bug that can make the random page allocator fail spuriously - force reallocation of the Image when it overlaps with firmware reserved memory regions - fix an oversight that defeated on optimization introduced earlier where images loaded at a suitable offset are never moved if booting without randomization - complain about images that were not loaded at the right offset by the firmware image loader. Link: https://lore.kernel.org/r/20210803091215.2566-1-ardb@kernel.org commit 427215d85e8d1476da1a86b8d67aceb485eb3631 Author: Miklos Szeredi Date: Mon Aug 9 10:19:47 2021 +0200 ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager Fixes: c771d683a62e ("vfs: introduce clone_private_mount()") Cc: # v3.18 Signed-off-by: Miklos Szeredi commit 580c610429b3994e8db24418927747cf28443cde Author: Miklos Szeredi Date: Fri Aug 6 10:03:12 2021 +0200 ovl: fix uninitialized pointer read in ovl_lookup_real_one() One error path can result in release_dentry_name_snapshot() being called before "name" was initialized by take_dentry_name_snapshot(). Fix by moving the release_dentry_name_snapshot() to immediately after the only use. Reported-by: Colin Ian King Signed-off-by: Miklos Szeredi commit 9b91b6b019fda817eb52f728eb9c79b3579760bc Author: Miklos Szeredi Date: Wed Jul 28 10:38:43 2021 +0200 ovl: fix deadlock in splice write There's possibility of an ABBA deadlock in case of a splice write to an overlayfs file and a concurrent splice write to a corresponding real file. The call chain for splice to an overlay file: -> do_splice [takes sb_writers on overlay file] -> do_splice_from -> iter_file_splice_write [takes pipe->mutex] -> vfs_iter_write ... -> ovl_write_iter [takes sb_writers on real file] And the call chain for splice to a real file: -> do_splice [takes sb_writers on real file] -> do_splice_from -> iter_file_splice_write [takes pipe->mutex] Syzbot successfully bisected this to commit 82a763e61e2b ("ovl: simplify file splice"). Fix by reverting the write part of the above commit and by adding missing bits from ovl_write_iter() into ovl_splice_write(). Fixes: 82a763e61e2b ("ovl: simplify file splice") Reported-and-tested-by: syzbot+579885d1a9a833336209@syzkaller.appspotmail.com Signed-off-by: Miklos Szeredi commit 9011c2791e63fc05721b545c41ad025d8073566e Author: Amir Goldstein Date: Mon Apr 26 18:20:21 2021 +0300 ovl: skip stale entries in merge dir cache iteration On the first getdents call, ovl_iterate() populates the readdir cache with a list of entries, but for upper entries with origin lower inode, p->ino remains zero. Following getdents calls traverse the readdir cache list and call ovl_cache_update_ino() for entries with zero p->ino to lookup the entry in the overlay and return d_ino that is consistent with st_ino. If the upper file was unlinked between the first getdents call and the getdents call that lists the file entry, ovl_cache_update_ino() will not find the entry and fall back to setting d_ino to the upper real st_ino, which is inconsistent with how this object was presented to users. Instead of listing a stale entry with inconsistent d_ino, simply skip the stale entry, which is better for users. xfstest overlay/077 is failing without this patch. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/fstests/CAOQ4uxgR_cLnC_vdU5=seP3fwqVkuZM_-WfD6maFTMbMYq=a9w@mail.gmail.com/ Signed-off-by: Miklos Szeredi commit 87b7b5335e6995a6d64fca98fc67b92b29caac9c Author: Yonghong Song Date: Mon Aug 9 16:51:51 2021 -0700 bpf: Add missing bpf_read_[un]lock_trace() for syscall program Commit 79a7f8bdb159d ("bpf: Introduce bpf_sys_bpf() helper and program type.") added support for syscall program, which is a sleepable program. But the program run missed bpf_read_lock_trace()/bpf_read_unlock_trace(), which is needed to ensure proper rcu callback invocations. This patch adds bpf_read_[un]lock_trace() properly. Fixes: 79a7f8bdb159d ("bpf: Introduce bpf_sys_bpf() helper and program type.") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210809235151.1663680-1-yhs@fb.com commit 51e1bb9eeaf7868db56e58f47848e364ab4c4129 Author: Daniel Borkmann Date: Mon Aug 9 12:43:17 2021 +0200 bpf: Add lockdown check for probe_write_user helper Back then, commit 96ae52279594 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers") added the bpf_probe_write_user() helper in order to allow to override user space memory. Its original goal was to have a facility to "debug, divert, and manipulate execution of semi-cooperative processes" under CAP_SYS_ADMIN. Write to kernel was explicitly disallowed since it would otherwise tamper with its integrity. One use case was shown in cf9b1199de27 ("samples/bpf: Add test/example of using bpf_probe_write_user bpf helper") where the program DNATs traffic at the time of connect(2) syscall, meaning, it rewrites the arguments to a syscall while they're still in userspace, and before the syscall has a chance to copy the argument into kernel space. These days we have better mechanisms in BPF for achieving the same (e.g. for load-balancers), but without having to write to userspace memory. Of course the bpf_probe_write_user() helper can also be used to abuse many other things for both good or bad purpose. Outside of BPF, there is a similar mechanism for ptrace(2) such as PTRACE_PEEK{TEXT,DATA} and PTRACE_POKE{TEXT,DATA}, but would likely require some more effort. Commit 96ae52279594 explicitly dedicated the helper for experimentation purpose only. Thus, move the helper's availability behind a newly added LOCKDOWN_BPF_WRITE_USER lockdown knob so that the helper is disabled under the "integrity" mode. More fine-grained control can be implemented also from LSM side with this change. Fixes: 96ae52279594 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers") Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko commit bf33677a3c394bb8fddd48d3bbc97adf0262e045 Author: Christian Hewitt Date: Fri Aug 6 09:40:05 2021 +0000 drm/meson: fix colour distortion from HDR set during vendor u-boot Add support for the OSD1 HDR registers so meson DRM can handle the HDR properties set by Amlogic u-boot on G12A and newer devices which result in blue/green/pink colour distortion to display output. This takes the original patch submissions from Mathias [0] and [1] with corrections for formatting and the missing description and attribution needed for merge. [0] https://lore.kernel.org/linux-amlogic/59dfd7e6-fc91-3d61-04c4-94e078a3188c@baylibre.com/T/ [1] https://lore.kernel.org/linux-amlogic/CAOKfEHBx_fboUqkENEMd-OC-NSrf46nto+vDLgvgttzPe99kXg@mail.gmail.com/T/#u Fixes: 728883948b0d ("drm/meson: Add G12A Support for VIU setup") Suggested-by: Mathias Steiger Signed-off-by: Christian Hewitt Tested-by: Neil Armstrong Tested-by: Philip Milev [narmsrong: adding missing space on second tested-by tag] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20210806094005.7136-1-christianshewitt@gmail.com commit 664cc971fb259007e49cc8a3ac43b0787d89443f Author: Greg Kroah-Hartman Date: Tue Aug 10 09:10:15 2021 +0200 Revert "usb: dwc3: gadget: Use list_replace_init() before traversing lists" This reverts commit d25d85061bd856d6be221626605319154f9b5043 as it is reported to cause problems on many different types of boards. Reported-by: Thinh Nguyen Reported-by: John Stultz Cc: Ray Chi Link: https://lore.kernel.org/r/CANcMJZCEVxVLyFgLwK98hqBEdc0_n4P0x_K6Gih8zNH3ouzbJQ@mail.gmail.com Fixes: d25d85061bd8 ("usb: dwc3: gadget: Use list_replace_init() before traversing lists") Cc: stable Cc: Felipe Balbi Cc: Wesley Cheng Signed-off-by: Greg Kroah-Hartman commit a5056c0bc24f6c9982cfe6f4e3301f3c7d682191 Merge: 36a21d51725af 5afc1540f1380 Author: Greg Kroah-Hartman Date: Tue Aug 10 08:54:36 2021 +0200 Merge tag 'iio-fixes-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of fixes for IIO in the 5.14 cycle adi,adis: - Ensure GPIO pin direction set explicitly in driver. fxls8952af: - Fix use of ret when not initialized. - Fix issue with use of module symbol from built in. hdc100x: - Add a margin to conversion time as some parts run to slowly. palmas-adc: - Fix a wrong exit condition that leads to adc period always being set to maximum value. st,sensors: - Drop a wrong restriction on number of interrupts in dt binding. ti-ads7950: - Ensure CS deasserted after channel read. * tag 'iio-fixes-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: Fix incorrect exit of for-loop iio: humidity: hdc100x: Add margin to the conversion time dt-bindings: iio: st: Remove wrong items length check iio: accel: fxls8962af: fix i2c dependency iio: adis: set GPIO reset pin direction iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels iio: accel: fxls8962af: fix potential use of uninitialized symbol commit 07d25971b220e477eb019fcb520a9f2e3ac966af Author: Zhen Lei Date: Sat Jul 31 20:30:11 2021 +0800 locking/rtmutex: Use the correct rtmutex debugging config option It's CONFIG_DEBUG_RT_MUTEXES not CONFIG_DEBUG_RT_MUTEX. Fixes: f7efc4799f81 ("locking/rtmutex: Inline chainwalk depth check") Signed-off-by: Zhen Lei Signed-off-by: Thomas Gleixner Acked-by: Will Deacon Acked-by: Boqun Feng Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210731123011.4555-1-thunder.leizhen@huawei.com commit aae32b784ebdbda6f6055a8021c9fb8a0ab5bcba Author: Hussein Alasadi Date: Mon Aug 9 17:36:52 2021 +0000 can: m_can: m_can_set_bittiming(): fix setting M_CAN_DBTP register This patch fixes the setting of the M_CAN_DBTP register contents: - use DBTP_ (the data bitrate macros) instead of NBTP_ which area used for the nominal bitrate - do not overwrite possibly-existing DBTP_TDC flag by ORing reg_btp instead of overwriting Link: https://lore.kernel.org/r/FRYP281MB06140984ABD9994C0AAF7433D1F69@FRYP281MB0614.DEUP281.PROD.OUTLOOK.COM Fixes: 20779943a080 ("can: m_can: use bits.h macros for all regmasks") Cc: Torin Cooper-Bennun Cc: Chandrasekar Ramakrishnan Signed-off-by: Hussein Alasadi [mkl: update patch description, update indention] Signed-off-by: Marc Kleine-Budde commit 7b637cd52f02c6d7ff0580143a438940978fc719 Author: Baruch Siach Date: Mon Aug 2 06:59:41 2021 +0300 MAINTAINERS: fix Microchip CAN BUS Analyzer Tool entry typo This patch fixes the abbreviated name of the Microchip CAN BUS Analyzer Tool. Fixes: 8a7b46fa7902 ("MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver") Link: https://lore.kernel.org/r/cc4831cb1c8759c15fb32c21fd326e831183733d.1627876781.git.baruch@tkos.co.il Signed-off-by: Baruch Siach Signed-off-by: Marc Kleine-Budde commit bd37c2888ccaa5ceb9895718f6909b247cc372e0 Author: Aya Levin Date: Tue Jun 8 16:38:30 2021 +0300 net/mlx5: Fix return value from tracer initialization Check return value of mlx5_fw_tracer_start(), set error path and fix return value of mlx5_fw_tracer_init() accordingly. Fixes: c71ad41ccb0c ("net/mlx5: FW tracer, events handling") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 563476ae0c5e48a028cbfa38fa9d2fc0418eb88f Author: Shay Drory Date: Sun Apr 11 15:32:55 2021 +0300 net/mlx5: Synchronize correct IRQ when destroying CQ The CQ destroy is performed based on the IRQ number that is stored in cq->irqn. That number wasn't set explicitly during CQ creation and as expected some of the API users of mlx5_core_create_cq() forgot to update it. This caused to wrong synchronization call of the wrong IRQ with a number 0 instead of the real one. As a fix, set the IRQ number directly in the mlx5_core_create_cq() and update all users accordingly. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Fixes: ef1659ade359 ("IB/mlx5: Add DEVX support for CQ events") Signed-off-by: Shay Drory Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 88bbd7b2369aca4598eb8f38c5f16be98c3bb5d4 Author: Chris Mi Date: Thu May 6 11:40:34 2021 +0800 net/mlx5e: TC, Fix error handling memory leak Free the offload sample action on error. Fixes: f94d6389f6a8 ("net/mlx5e: TC, Add support to offload sample action") Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit ba317e832d457bc8fcecf6a6ed289732544b87e9 Author: Shay Drory Date: Thu Jun 17 01:51:00 2021 +0300 net/mlx5: Destroy pool->mutex Destroy pool->mutex when we destroy the pool. Fixes: c36326d38d93 ("net/mlx5: Round-Robin EQs over IRQs") Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 5957cc557dc5d52c3448be15c2474f33224b89b6 Author: Shay Drory Date: Wed Jun 16 18:59:05 2021 +0300 net/mlx5: Set all field of mlx5_irq before inserting it to the xarray Currently irq->pool is set after the irq is insert to the xarray. Set irq->pool before the irq is inserted to the xarray. Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs") Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 3c8946e0e2841aa7cbdabf6acaac6559fa8d1a49 Author: Shay Drory Date: Wed Jun 16 18:54:05 2021 +0300 net/mlx5: Fix order of functions in mlx5_irq_detach_nb() Change order of functions in mlx5_irq_detach_nb() so it will be a mirror of mlx5_irq_attach_nb. Fixes: 71e084e26414 ("net/mlx5: Allocating a pool of MSI-X vectors for SFs") Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit c85a6b8feb16c0cdbbc8d9f581c7861c4a9ac351 Author: Aya Levin Date: Wed Jul 28 18:18:59 2021 +0300 net/mlx5: Block switchdev mode while devlink traps are active Since switchdev mode can't support devlink traps, verify there are no active devlink traps before moving eswitch to switchdev mode. If there are active traps, prevent the switchdev mode configuration. Fixes: eb3862a0525d ("net/mlx5e: Enable traps according to link state") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 8ba3e4c85825c8801a2c298dcadac650a40d7137 Author: Maxim Mikityanskiy Date: Mon May 24 16:15:22 2021 +0300 net/mlx5e: Destroy page pool after XDP SQ to fix use-after-free mlx5e_close_xdpsq does the cleanup: it calls mlx5e_free_xdpsq_descs to free the outstanding descriptors, which relies on mlx5e_page_release_dynamic and page_pool_release_page. However, page_pool_destroy is already called by this point, because mlx5e_close_rq runs before mlx5e_close_xdpsq. This commit fixes the use-after-free by swapping mlx5e_close_xdpsq and mlx5e_close_rq. The commit cited below started calling page_pool_destroy directly from the driver. Previously, the page pool was destroyed under a call_rcu from xdp_rxq_info_unreg_mem_model, which would defer the deallocation until after the XDPSQ is cleaned up. Fixes: 1da4bbeffe41 ("net: core: page_pool: add user refcnt and reintroduce page_pool_destroy") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 6d8680da2e98410a25fe49e0a53f28c004be6d6d Author: Vlad Buslov Date: Wed Aug 4 18:33:26 2021 +0300 net/mlx5: Bridge, fix ageing time Ageing time is not converted from clock_t to jiffies which results incorrect ageing timeout calculation in workqueue update task. Fix it by applying clock_t_to_jiffies() to provided value. Fixes: c636a0f0f3f0 ("net/mlx5: Bridge, dynamic entry ageing") Signed-off-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit c623c95afa56bf4bf64e4f58742dc94616ef83db Author: Roi Dayan Date: Sun Aug 1 15:47:46 2021 +0300 net/mlx5e: Avoid creating tunnel headers for local route It could be local and remote are on the same machine and the route result will be a local route which will result in creating encap id with src/dst mac address of 0. Fixes: a54e20b4fcae ("net/mlx5e: Add basic TC tunnel set action for SRIOV offloads") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit d3875924dae632d5edd908d285fffc5f07c835a3 Author: Alex Vesker Date: Tue Jun 22 16:51:58 2021 +0300 net/mlx5: DR, Add fail on error check on decap While processing encapsulated packet on RX, one of the fields that is checked is the inner packet length. If the length as specified in the header doesn't match the actual inner packet length, the packet is invalid and should be dropped. However, such packet caused the NIC to hang. This patch turns on a 'fail_on_error' HW bit which allows HW to drop such an invalid packet while processing RX packet and trying to decap it. Fixes: ad17dc8cf910 ("net/mlx5: DR, Move STEv0 action apply logic") Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit c633e799641cf13960bd83189b4d5b1b2adb0d4e Author: Leon Romanovsky Date: Mon Aug 2 16:39:54 2021 +0300 net/mlx5: Don't skip subfunction cleanup in case of error in module init Clean SF resources if mlx5 eth failed to initialize. Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") Signed-off-by: Leon Romanovsky Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 40d32727931cee82cdc5aaca25ce725d1f3ac864 Author: Colin Ian King Date: Wed Aug 4 14:49:40 2021 +0100 scsi: mpt3sas: Fix incorrectly assigned error return and check Currently the call to _base_static_config_pages() is assigning the error return to variable 'rc' but checking the error return in error 'r'. Fix this by assigning the error return to variable 'r' instead of 'rc'. Link: https://lore.kernel.org/r/20210804134940.114011-1-colin.king@canonical.com Fixes: 19a622c39a9d ("scsi: mpt3sas: Handle firmware faults during first half of IOC init") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unused value") commit dbe7633c394be4a500b887fe8f9ad486dcba9d77 Author: Michael Kelley Date: Fri Aug 6 10:12:50 2021 -0700 scsi: storvsc: Log TEST_UNIT_READY errors as warnings Commit 08f76547f08d ("scsi: storvsc: Update error logging") added more robust logging of errors, particularly those reported as Hyper-V errors. But this change produces extra logging noise in that TEST_UNIT_READY may report errors during the normal course of detecting device adds and removes. Fix this by logging TEST_UNIT_READY errors as warnings, so that log lines are produced only if the storvsc log level is changed to WARN level on the kernel boot line. Link: https://lore.kernel.org/r/1628269970-87876-1-git-send-email-mikelley@microsoft.com Fixes: 08f76547f08d ("scsi: storvsc: Update error logging") Signed-off-by: Michael Kelley Signed-off-by: Martin K. Petersen commit 9977d880f7a3c233db9165a75a3a14defc2a4aee Author: Ewan D. Milne Date: Mon Aug 9 11:09:47 2021 -0400 scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash The phba->poll_list is traversed in case of an error in lpfc_sli4_hba_setup(), so it must be initialized earlier in case the error path is taken. [ 490.030738] lpfc 0000:65:00.0: 0:1413 Failed to init iocb list. [ 490.036661] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 490.044485] PGD 0 P4D 0 [ 490.047027] Oops: 0000 [#1] SMP PTI [ 490.050518] CPU: 0 PID: 7 Comm: kworker/0:1 Kdump: loaded Tainted: G I --------- - - 4.18. [ 490.060511] Hardware name: Dell Inc. PowerEdge R440/0WKGTH, BIOS 1.4.8 05/22/2018 [ 490.067994] Workqueue: events work_for_cpu_fn [ 490.072371] RIP: 0010:lpfc_sli4_cleanup_poll_list+0x20/0xb0 [lpfc] [ 490.078546] Code: cf e9 04 f7 fe ff 0f 1f 40 00 0f 1f 44 00 00 41 57 49 89 ff 41 56 41 55 41 54 4d 8d a79 [ 490.097291] RSP: 0018:ffffbd1a463dbcc8 EFLAGS: 00010246 [ 490.102518] RAX: 0000000000008200 RBX: ffff945cdb8c0000 RCX: 0000000000000000 [ 490.109649] RDX: 0000000000018200 RSI: ffff9468d0e16818 RDI: 0000000000000000 [ 490.116783] RBP: ffff945cdb8c1740 R08: 00000000000015c5 R09: 0000000000000042 [ 490.123915] R10: 0000000000000000 R11: ffffbd1a463dbab0 R12: ffff945cdb8c25c0 [ 490.131049] R13: 00000000fffffff4 R14: 0000000000001800 R15: ffff945cdb8c0000 [ 490.138182] FS: 0000000000000000(0000) GS:ffff9468d0e00000(0000) knlGS:0000000000000000 [ 490.146267] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 490.152013] CR2: 0000000000000000 CR3: 000000042ca10002 CR4: 00000000007706f0 [ 490.159146] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 490.166277] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 490.173409] PKRU: 55555554 [ 490.176123] Call Trace: [ 490.178598] lpfc_sli4_queue_destroy+0x7f/0x3c0 [lpfc] [ 490.183745] lpfc_sli4_hba_setup+0x1bc7/0x23e0 [lpfc] [ 490.188797] ? kernfs_activate+0x63/0x80 [ 490.192721] ? kernfs_add_one+0xe7/0x130 [ 490.196647] ? __kernfs_create_file+0x80/0xb0 [ 490.201020] ? lpfc_pci_probe_one_s4.isra.48+0x46f/0x9e0 [lpfc] [ 490.206944] lpfc_pci_probe_one_s4.isra.48+0x46f/0x9e0 [lpfc] [ 490.212697] lpfc_pci_probe_one+0x179/0xb70 [lpfc] [ 490.217492] local_pci_probe+0x41/0x90 [ 490.221246] work_for_cpu_fn+0x16/0x20 [ 490.224994] process_one_work+0x1a7/0x360 [ 490.229009] ? create_worker+0x1a0/0x1a0 [ 490.232933] worker_thread+0x1cf/0x390 [ 490.236687] ? create_worker+0x1a0/0x1a0 [ 490.240612] kthread+0x116/0x130 [ 490.243846] ? kthread_flush_work_fn+0x10/0x10 [ 490.248293] ret_from_fork+0x35/0x40 [ 490.251869] Modules linked in: lpfc(+) xt_CHECKSUM ipt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4i [ 490.332609] CR2: 0000000000000000 Link: https://lore.kernel.org/r/20210809150947.18104-1-emilne@redhat.com Fixes: 93a4d6f40198 ("scsi: lpfc: Add registration for CPU Offline/Online events") Cc: stable@vger.kernel.org Reviewed-by: James Smart Signed-off-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 11431e26c9c43fa26f6b33ee1a90989f57b86024 Author: Ming Lei Date: Tue Aug 3 15:06:08 2021 +0800 blk-iocost: fix lockdep warning on blkcg->lock blkcg->lock depends on q->queue_lock which may depend on another driver lock required in irq context, one example is dm-thin: Chain exists of: &pool->lock#3 --> &q->queue_lock --> &blkcg->lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&blkcg->lock); local_irq_disable(); lock(&pool->lock#3); lock(&q->queue_lock); lock(&pool->lock#3); Fix the issue by using spin_lock_irq(&blkcg->lock) in ioc_weight_write(). Cc: Tejun Heo Reported-by: Bruno Goncalves Link: https://lore.kernel.org/linux-block/CA+QYu4rzz6079ighEanS3Qq_Dmnczcf45ZoJoHKVLVATTo1e4Q@mail.gmail.com/T/#u Signed-off-by: Ming Lei Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20210803070608.1766400-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 43597aac1f87230cb565ab354d331682f13d3c7a Author: Pavel Begunkov Date: Tue Aug 10 02:44:23 2021 +0100 io_uring: fix ctx-exit io_rsrc_put_work() deadlock __io_rsrc_put_work() might need ->uring_lock, so nobody should wait for rsrc nodes holding the mutex. However, that's exactly what io_ring_ctx_free() does with io_wait_rsrc_data(). Split it into rsrc wait + dealloc, and move the first one out of the lock. Cc: stable@vger.kernel.org Fixes: b60c8dce33895 ("io_uring: preparation for rsrc tagging") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0130c5c2693468173ec1afab714e0885d2c9c363.1628559783.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c018db4a57f3e31a9cb24d528e9f094eda89a499 Author: Jens Axboe Date: Mon Aug 9 08:15:50 2021 -0600 io_uring: drop ctx->uring_lock before flushing work item Ammar reports that he's seeing a lockdep splat on running test/rsrc_tags from the regression suite: ====================================================== WARNING: possible circular locking dependency detected 5.14.0-rc3-bluetea-test-00249-gc7d102232649 #5 Tainted: G OE ------------------------------------------------------ kworker/2:4/2684 is trying to acquire lock: ffff88814bb1c0a8 (&ctx->uring_lock){+.+.}-{3:3}, at: io_rsrc_put_work+0x13d/0x1a0 but task is already holding lock: ffffc90001c6be70 ((work_completion)(&(&ctx->rsrc_put_work)->work)){+.+.}-{0:0}, at: process_one_work+0x1bc/0x530 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ((work_completion)(&(&ctx->rsrc_put_work)->work)){+.+.}-{0:0}: __flush_work+0x31b/0x490 io_rsrc_ref_quiesce.part.0.constprop.0+0x35/0xb0 __do_sys_io_uring_register+0x45b/0x1060 do_syscall_64+0x35/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (&ctx->uring_lock){+.+.}-{3:3}: __lock_acquire+0x119a/0x1e10 lock_acquire+0xc8/0x2f0 __mutex_lock+0x86/0x740 io_rsrc_put_work+0x13d/0x1a0 process_one_work+0x236/0x530 worker_thread+0x52/0x3b0 kthread+0x135/0x160 ret_from_fork+0x1f/0x30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&(&ctx->rsrc_put_work)->work)); lock(&ctx->uring_lock); lock((work_completion)(&(&ctx->rsrc_put_work)->work)); lock(&ctx->uring_lock); *** DEADLOCK *** 2 locks held by kworker/2:4/2684: #0: ffff88810004d938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1bc/0x530 #1: ffffc90001c6be70 ((work_completion)(&(&ctx->rsrc_put_work)->work)){+.+.}-{0:0}, at: process_one_work+0x1bc/0x530 stack backtrace: CPU: 2 PID: 2684 Comm: kworker/2:4 Tainted: G OE 5.14.0-rc3-bluetea-test-00249-gc7d102232649 #5 Hardware name: Acer Aspire ES1-421/OLVIA_BE, BIOS V1.05 07/02/2015 Workqueue: events io_rsrc_put_work Call Trace: dump_stack_lvl+0x6a/0x9a check_noncircular+0xfe/0x110 __lock_acquire+0x119a/0x1e10 lock_acquire+0xc8/0x2f0 ? io_rsrc_put_work+0x13d/0x1a0 __mutex_lock+0x86/0x740 ? io_rsrc_put_work+0x13d/0x1a0 ? io_rsrc_put_work+0x13d/0x1a0 ? io_rsrc_put_work+0x13d/0x1a0 ? process_one_work+0x1ce/0x530 io_rsrc_put_work+0x13d/0x1a0 process_one_work+0x236/0x530 worker_thread+0x52/0x3b0 ? process_one_work+0x530/0x530 kthread+0x135/0x160 ? set_kthread_struct+0x40/0x40 ret_from_fork+0x1f/0x30 which is due to holding the ctx->uring_lock when flushing existing pending work, while the pending work flushing may need to grab the uring lock if we're using IOPOLL. Fix this by dropping the uring_lock a bit earlier as part of the flush. Cc: stable@vger.kernel.org Link: https://github.com/axboe/liburing/issues/404 Tested-by: Ammar Faizi Signed-off-by: Jens Axboe commit 47cae0c71f7a126903f930191e6e9f103674aca1 Author: Hao Xu Date: Sun Aug 8 21:54:34 2021 +0800 io-wq: fix IO_WORKER_F_FIXED issue in create_io_worker() There may be cases like: A B spin_lock(wqe->lock) nr_workers is 0 nr_workers++ spin_unlock(wqe->lock) spin_lock(wqe->lock) nr_wokers is 1 nr_workers++ spin_unlock(wqe->lock) create_io_worker() acct->worker is 1 create_io_worker() acct->worker is 1 There should be one worker marked IO_WORKER_F_FIXED, but no one is. Fix this by introduce a new agrument for create_io_worker() to indicate if it is the first worker. Fixes: 3d4e4face9c1 ("io-wq: fix no lock protection of acct->nr_worker") Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/20210808135434.68667-3-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe commit 49e7f0c789add1330b111af0b7caeb0e87df063e Author: Hao Xu Date: Sun Aug 8 21:54:33 2021 +0800 io-wq: fix bug of creating io-wokers unconditionally The former patch to add check between nr_workers and max_workers has a bug, which will cause unconditionally creating io-workers. That's because the result of the check doesn't affect the call of create_io_worker(), fix it by bringing in a boolean value for it. Fixes: 21698274da5b ("io-wq: fix lack of acct->nr_workers < acct->max_workers judgement") Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/20210808135434.68667-2-haoxu@linux.alibaba.com [axboe: drop hunk that isn't strictly needed] Signed-off-by: Jens Axboe commit 4956b9eaad456a88b0d56947bef036e086250beb Author: Jens Axboe Date: Mon Aug 9 07:49:41 2021 -0600 io_uring: rsrc ref lock needs to be IRQ safe Nadav reports running into the below splat on re-enabling softirqs: WARNING: CPU: 2 PID: 1777 at kernel/softirq.c:364 __local_bh_enable_ip+0xaa/0xe0 Modules linked in: CPU: 2 PID: 1777 Comm: umem Not tainted 5.13.1+ #161 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/22/2020 RIP: 0010:__local_bh_enable_ip+0xaa/0xe0 Code: a9 00 ff ff 00 74 38 65 ff 0d a2 21 8c 7a e8 ed 1a 20 00 fb 66 0f 1f 44 00 00 5b 41 5c 5d c3 65 8b 05 e6 2d 8c 7a 85 c0 75 9a <0f> 0b eb 96 e8 2d 1f 20 00 eb a5 4c 89 e7 e8 73 4f 0c 00 eb ae 65 RSP: 0018:ffff88812e58fcc8 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000201 RCX: dffffc0000000000 RDX: 0000000000000007 RSI: 0000000000000201 RDI: ffffffff8898c5ac RBP: ffff88812e58fcd8 R08: ffffffff8575dbbf R09: ffffed1028ef14f9 R10: ffff88814778a7c3 R11: ffffed1028ef14f8 R12: ffffffff85c9e9ae R13: ffff88814778a000 R14: ffff88814778a7b0 R15: ffff8881086db890 FS: 00007fbcfee17700(0000) GS:ffff8881e0300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c0402a5008 CR3: 000000011c1ac003 CR4: 00000000003706e0 Call Trace: _raw_spin_unlock_bh+0x31/0x40 io_rsrc_node_ref_zero+0x13e/0x190 io_dismantle_req+0x215/0x220 io_req_complete_post+0x1b8/0x720 __io_complete_rw.isra.0+0x16b/0x1f0 io_complete_rw+0x10/0x20 where it's clear we end up calling the percpu count release directly from the completion path, as it's in atomic mode and we drop the last ref. For file/block IO, this can be from IRQ context already, and the softirq locking for rsrc isn't enough. Just make the lock fully IRQ safe, and ensure we correctly safe state from the release path as we don't know the full context there. Reported-by: Nadav Amit Tested-by: Nadav Amit Link: https://lore.kernel.org/io-uring/C187C836-E78B-4A31-B24C-D16919ACA093@gmail.com/ Signed-off-by: Jens Axboe commit 9a73fa375d58fee5262dd16473c8e7522bdf44de Merge: 36a21d51725af c3df5fb57fe87 Author: Linus Torvalds Date: Mon Aug 9 16:47:36 2021 -0700 Merge branch 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "One commit to fix a possible A-A deadlock around u64_stats_sync on 32bit machines caused by updating it without disabling IRQ when it may be read from IRQ context" * 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: rstat: fix A-A deadlock on 32bit around u64_stats_sync commit 143a8526ab5fd4f8a0c4fe2a9cb28c181dc5a95f Author: Guillaume Nault Date: Fri Aug 6 17:52:06 2021 +0200 bareudp: Fix invalid read beyond skb's linear data Data beyond the UDP header might not be part of the skb's linear data. Use skb_copy_bits() instead of direct access to skb->data+X, so that we read the correct bytes even on a fragmented skb. Fixes: 4b5f67232d95 ("net: Special handling for IP & MPLS.") Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/7741c46545c6ef02e70c80a9b32814b22d9616b3.1628264975.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit d6e712aa7e6a3d5a9633f4bcbe2237f3edc292bd Author: Randy Dunlap Date: Sun Aug 8 12:08:34 2021 -0700 net: openvswitch: fix kernel-doc warnings in flow.c Repair kernel-doc notation in a few places to make it conform to the expected format. Fixes the following kernel-doc warnings: flow.c:296: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Parse vlan tag from vlan header. flow.c:296: warning: missing initial short description on line: * Parse vlan tag from vlan header. flow.c:537: warning: No description found for return value of 'key_extract_l3l4' flow.c:769: warning: No description found for return value of 'key_extract' Signed-off-by: Randy Dunlap Cc: Pravin B Shelar Cc: dev@openvswitch.org Link: https://lore.kernel.org/r/20210808190834.23362-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit beb7f2de5728b0bd2140a652fa51f6ad85d159f7 Author: Roi Dayan Date: Sun Aug 8 09:52:42 2021 +0300 psample: Add a fwd declaration for skbuff Without this there is a warning if source files include psample.h before skbuff.h or doesn't include it at all. Fixes: 6ae0a6286171 ("net: Introduce psample, a new genetlink channel for packet sampling") Signed-off-by: Roi Dayan Link: https://lore.kernel.org/r/20210808065242.1522535-1-roid@nvidia.com Signed-off-by: Jakub Kicinski commit 669d94219d91a2ba950bb12ece69cf0ada53ad4f Author: Vineet Gupta Date: Mon Aug 9 13:04:10 2021 -0700 MAINTAINERS: update Vineet's email address I'll be leaving Synopsys shortly, but will continue to handle maintenance for the transition period. Signed-off-by: Vineet Gupta commit f153c2246783ba210493054d99c66353f56423c9 Author: Sven Schnelle Date: Fri Jul 30 08:28:54 2021 +0200 ucounts: add missing data type changes commit f9c82a4ea89c3 ("Increase size of ucounts to atomic_long_t") changed the data type of ucounts/ucounts_max to long, but missed to adjust a few other places. This is noticeable on big endian platforms from user space because the /proc/sys/user/max_*_names files all contain 0. v4 - Made the min and max constants long so the sysctl values are actually settable on little endian machines. -- EWB Fixes: f9c82a4ea89c ("Increase size of ucounts to atomic_long_t") Signed-off-by: Sven Schnelle Tested-by: Nathan Chancellor Tested-by: Linux Kernel Functional Testing Acked-by: Alexey Gladkov v1: https://lkml.kernel.org/r/20210721115800.910778-1-svens@linux.ibm.com v2: https://lkml.kernel.org/r/20210721125233.1041429-1-svens@linux.ibm.com v3: https://lkml.kernel.org/r/20210730062854.3601635-1-svens@linux.ibm.com Link: https://lkml.kernel.org/r/8735rijqlv.fsf_-_@disp2133 Signed-off-by: Eric W. Biederman commit 71330842ff93ae67a066c1fa68d75672527312fa Author: Daniel Borkmann Date: Mon Aug 9 21:45:32 2021 +0200 bpf: Add _kernel suffix to internal lockdown_bpf_read Rename LOCKDOWN_BPF_READ into LOCKDOWN_BPF_READ_KERNEL so we have naming more consistent with a LOCKDOWN_BPF_WRITE_USER option that we are adding. Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko commit a7550f8b1c9712894f9e98d6caf5f49451ebd058 Author: Md Fahad Iqbal Polash Date: Fri Jun 4 09:53:33 2021 -0700 iavf: Set RSS LUT and key in reset handle path iavf driver should set RSS LUT and key unconditionally in reset path. Currently, the driver does not do that. This patch fixes this issue. Fixes: 2c86ac3c7079 ("i40evf: create a generic config RSS function") Signed-off-by: Md Fahad Iqbal Polash Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 3ba7f53f8bf1fb862e36c7f74434ac3aceb60158 Author: Brett Creeley Date: Fri Aug 6 09:51:27 2021 -0700 ice: don't remove netdev->dev_addr from uc sync list In some circumstances, such as with bridging, it's possible that the stack will add the device's own MAC address to its unicast address list. If, later, the stack deletes this address, the driver will receive a request to remove this address. The driver stores its current MAC address as part of the VSI MAC filter list instead of separately. So, this causes a problem when the device's MAC address is deleted unexpectedly, which results in traffic failure in some cases. The following configuration steps will reproduce the previously mentioned problem: > ip link set eth0 up > ip link add dev br0 type bridge > ip link set br0 up > ip addr flush dev eth0 > ip link set eth0 master br0 > echo 1 > /sys/class/net/br0/bridge/vlan_filtering > modprobe -r veth > modprobe -r bridge > ip addr add 192.168.1.100/24 dev eth0 The following ping command fails due to the netdev->dev_addr being deleted when removing the bridge module. > ping Fix this by making sure to not delete the netdev->dev_addr during MAC address sync. After fixing this issue it was noticed that the netdev_warn() in .set_mac was overly verbose, so make it at netdev_dbg(). Also, there is a possibility of a race condition between .set_mac and .set_rx_mode. Fix this by calling netif_addr_lock_bh() and netif_addr_unlock_bh() on the device's netdev when the netdev->dev_addr is going to be updated in .set_mac. Fixes: e94d44786693 ("ice: Implement filter sync, NDO operations and bump version") Signed-off-by: Brett Creeley Tested-by: Liang Li Tested-by: Gurucharan G Signed-off-by: Tony Nguyen commit c503e63200c679e362afca7aca9d3dc63a0f45ed Author: Anirudh Venkataramanan Date: Wed Aug 4 12:12:42 2021 -0700 ice: Stop processing VF messages during teardown When VFs are setup and torn down in quick succession, it is possible that a VF is torn down by the PF while the VF's virtchnl requests are still in the PF's mailbox ring. Processing the VF's virtchnl request when the VF itself doesn't exist results in undefined behavior. Fix this by adding a check to stop processing virtchnl requests when VF teardown is in progress. Fixes: ddf30f7ff840 ("ice: Add handler to configure SR-IOV") Signed-off-by: Anirudh Venkataramanan Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 50ac7479846053ca8054be833c1594e64de496bb Author: Anirudh Venkataramanan Date: Wed Jul 28 12:39:10 2021 -0700 ice: Prevent probing virtual functions The userspace utility "driverctl" can be used to change/override the system's default driver choices. This is useful in some situations (buggy driver, old driver missing a device ID, trying a workaround, etc.) where the user needs to load a different driver. However, this is also prone to user error, where a driver is mapped to a device it's not designed to drive. For example, if the ice driver is mapped to driver iavf devices, the ice driver crashes. Add a check to return an error if the ice driver is being used to probe a virtual function. Fixes: 837f08fdecbe ("ice: Add basic driver framework for Intel(R) E800 Series") Signed-off-by: Anirudh Venkataramanan Tested-by: Gurucharan G Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 769f52676756b8c5feb302d2d95af59577fc69ec Author: Bart Van Assche Date: Wed Aug 4 21:35:01 2021 -0700 configfs: restore the kernel v5.13 text attribute write behavior Instead of appending new text attribute data at the offset specified by the write() system call, only pass the newly written data to the .store() callback. Reported-by: Bodo Stroesser Tested-by: Bodo Stroesser Signed-off-by: Bart Van Assche Signed-off-by: Christoph Hellwig commit d09c548dbf3b31cb07bba562e0f452edfa01efe3 Author: Hangbin Liu Date: Mon Aug 9 15:04:55 2021 +0800 net: sched: act_mirred: Reset ct info when mirror/redirect skb When mirror/redirect a skb to a different port, the ct info should be reset for reclassification. Or the pkts will match unexpected rules. For example, with following topology and commands: ----------- | veth0 -+------- | veth1 -+------- | ------------ tc qdisc add dev veth0 clsact # The same with "action mirred egress mirror dev veth1" or "action mirred ingress redirect dev veth1" tc filter add dev veth0 egress chain 1 protocol ip flower ct_state +trk action mirred ingress mirror dev veth1 tc filter add dev veth0 egress chain 0 protocol ip flower ct_state -inv action ct commit action goto chain 1 tc qdisc add dev veth1 clsact tc filter add dev veth1 ingress chain 0 protocol ip flower ct_state +trk action drop ping & tc -s filter show dev veth1 ingress With command 'tc -s filter show', we can find the pkts were dropped on veth1. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: Roi Dayan Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 605bb4434d28930fd12c79af24bf6247cbf944be Merge: acc68b8d2a119 64513d269e897 Author: David S. Miller Date: Mon Aug 9 10:47:00 2021 +0100 Merge branch 'smc-fixes' Guvenc Gulce says: ==================== net/smc: fixes 2021-08-09 please apply the following patch series for smc to netdev's net tree. One patch fixes invalid connection counting for links and the other one fixes an access to an already cleared link. ==================== Signed-off-by: David S. Miller commit 64513d269e8971aabb7e787955a1b320e3031306 Author: Guvenc Gulce Date: Mon Aug 9 11:05:57 2021 +0200 net/smc: Correct smc link connection counter in case of smc client SMC clients may be assigned to a different link after the initial connection between two peers was established. In such a case, the connection counter was not correctly set. Update the connection counter correctly when a smc client connection is assigned to a different smc link. Fixes: 07d51580ff65 ("net/smc: Add connection counters for links") Signed-off-by: Guvenc Gulce Tested-by: Karsten Graul Signed-off-by: David S. Miller commit 8f3d65c166797746455553f4eaf74a5f89f996d4 Author: Karsten Graul Date: Mon Aug 9 11:05:56 2021 +0200 net/smc: fix wait on already cleared link There can be a race between the waiters for a tx work request buffer and the link down processing that finally clears the link. Although all waiters are woken up before the link is cleared there might be waiters which did not yet get back control and are still waiting. This results in an access to a cleared wait queue head. Fix this by introducing atomic reference counting around the wait calls, and wait with the link clear processing until all waiters have finished. Move the work request layer related calls into smc_wr.c and set the link state to INACTIVE before calling smcr_link_clear() in smc_llc_srv_add_link(). Fixes: 15e1b99aadfb ("net/smc: no WR buffer wait for terminating link group") Signed-off-by: Karsten Graul Signed-off-by: Guvenc Gulce Signed-off-by: David S. Miller commit acc68b8d2a1196c4db806947606f162dbeed2274 Author: Grygorii Strashko Date: Thu Aug 5 17:55:11 2021 +0300 net: ethernet: ti: cpsw: fix min eth packet size for non-switch use-cases The CPSW switchdev driver inherited fix from commit 9421c9015047 ("net: ethernet: ti: cpsw: fix min eth packet size") which changes min TX packet size to 64bytes (VLAN_ETH_ZLEN, excluding ETH_FCS). It was done to fix HW packed drop issue when packets are sent from Host to the port with PVID and un-tagging enabled. Unfortunately this breaks some other non-switch specific use-cases, like: - [1] CPSW port as DSA CPU port with DSA-tag applied at the end of the packet - [2] Some industrial protocols, which expects min TX packet size 60Bytes (excluding FCS). Fix it by configuring min TX packet size depending on driver mode - 60Bytes (ETH_ZLEN) for multi mac (dual-mac) mode - 64Bytes (VLAN_ETH_ZLEN) for switch mode and update it during driver mode change and annotate with READ_ONCE()/WRITE_ONCE() as it can be read by napi while writing. [1] https://lore.kernel.org/netdev/20210531124051.GA15218@cephalopod/ [2] https://e2e.ti.com/support/arm/sitara_arm/f/791/t/701669 Cc: stable@vger.kernel.org Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Reported-by: Ben Hutchings Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 0fa32ca438b42fadfb293d72690e117ab3d67489 Author: Yunsheng Lin Date: Fri Aug 6 09:39:07 2021 +0800 page_pool: mask the page->signature before the checking As mentioned in commit c07aea3ef4d4 ("mm: add a signature in struct page"): "The page->signature field is aliased to page->lru.next and page->compound_head." And as the comment in page_is_pfmemalloc(): "lru.next has bit 1 set if the page is allocated from the pfmemalloc reserves. Callers may simply overwrite it if they do not need to preserve that information." The page->signature is OR’ed with PP_SIGNATURE when a page is allocated in page pool, see __page_pool_alloc_pages_slow(), and page->signature is checked directly with PP_SIGNATURE in page_pool_return_skb_page(), which might cause resoure leaking problem for a page from page pool if bit 1 of lru.next is set for a pfmemalloc page. What happens here is that the original pp->signature is OR'ed with PP_SIGNATURE after the allocation in order to preserve any existing bits(such as the bit 1, used to indicate a pfmemalloc page), so when those bits are present, those page is not considered to be from page pool and the DMA mapping of those pages will be left stale. As bit 0 is for page->compound_head, So mask both bit 0/1 before the checking in page_pool_return_skb_page(). And we will return those pfmemalloc pages back to the page allocator after cleaning up the DMA mapping. Fixes: 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling") Reviewed-by: Ilias Apalodimas Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 86aab09a4870bb8346c9579864588c3d7f555299 Author: Randy Dunlap Date: Sun Aug 8 16:04:40 2021 -0700 dccp: add do-while-0 stubs for dccp_pr_debug macros GCC complains about empty macros in an 'if' statement, so convert them to 'do {} while (0)' macros. Fixes these build warnings: net/dccp/output.c: In function 'dccp_xmit_packet': ../net/dccp/output.c:283:71: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 283 | dccp_pr_debug("transmit_skb() returned err=%d\n", err); net/dccp/ackvec.c: In function 'dccp_ackvec_update_old': ../net/dccp/ackvec.c:163:80: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] 163 | (unsigned long long)seqno, state); Fixes: dc841e30eaea ("dccp: Extend CCID packet dequeueing interface") Fixes: 380240864451 ("dccp ccid-2: Update code for the Ack Vector input/registration routine") Signed-off-by: Randy Dunlap Cc: dccp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Gerrit Renker Signed-off-by: David S. Miller commit 699aa57b35672c3b2f230e2b7e5d0ab8c2bde80a Author: Zhenyu Wang Date: Fri Aug 6 12:40:56 2021 +0800 drm/i915/gvt: Fix cached atomics setting for Windows VM We've seen recent regression with host and windows VM running simultaneously that cause gpu hang or even crash. Finally bisect to commit 58586680ffad ("drm/i915: Disable atomics in L3 for gen9"), which seems cached atomics behavior difference caused regression issue. This tries to add new scratch register handler and add those in mmio save/restore list for context switch. No gpu hang produced with this one. Cc: stable@vger.kernel.org # 5.12+ Cc: "Xu, Terrence" Cc: "Bloomfield, Jon" Cc: "Ekstrand, Jason" Reviewed-by: Colin Xu Fixes: 58586680ffad ("drm/i915: Disable atomics in L3 for gen9") Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210806044056.648016-1-zhenyuw@linux.intel.com commit 43e8f76006592cb1573a959aa287c45421066f9c Author: Pu Lehui Date: Mon Aug 9 10:36:58 2021 +0800 powerpc/kprobes: Fix kprobe Oops happens in booke When using kprobe on powerpc booke series processor, Oops happens as show bellow: / # echo "p:myprobe do_nanosleep" > /sys/kernel/debug/tracing/kprobe_events / # echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable / # sleep 1 [ 50.076730] Oops: Exception in kernel mode, sig: 5 [#1] [ 50.077017] BE PAGE_SIZE=4K SMP NR_CPUS=24 QEMU e500 [ 50.077221] Modules linked in: [ 50.077462] CPU: 0 PID: 77 Comm: sleep Not tainted 5.14.0-rc4-00022-g251a1524293d #21 [ 50.077887] NIP: c0b9c4e0 LR: c00ebecc CTR: 00000000 [ 50.078067] REGS: c3883de0 TRAP: 0700 Not tainted (5.14.0-rc4-00022-g251a1524293d) [ 50.078349] MSR: 00029000 CR: 24000228 XER: 20000000 [ 50.078675] [ 50.078675] GPR00: c00ebdf0 c3883e90 c313e300 c3883ea0 00000001 00000000 c3883ecc 00000001 [ 50.078675] GPR08: c100598c c00ea250 00000004 00000000 24000222 102490c2 bff4180c 101e60d4 [ 50.078675] GPR16: 00000000 102454ac 00000040 10240000 10241100 102410f8 10240000 00500000 [ 50.078675] GPR24: 00000002 00000000 c3883ea0 00000001 00000000 0000c350 3b9b8d50 00000000 [ 50.080151] NIP [c0b9c4e0] do_nanosleep+0x0/0x190 [ 50.080352] LR [c00ebecc] hrtimer_nanosleep+0x14c/0x1e0 [ 50.080638] Call Trace: [ 50.080801] [c3883e90] [c00ebdf0] hrtimer_nanosleep+0x70/0x1e0 (unreliable) [ 50.081110] [c3883f00] [c00ec004] sys_nanosleep_time32+0xa4/0x110 [ 50.081336] [c3883f40] [c001509c] ret_from_syscall+0x0/0x28 [ 50.081541] --- interrupt: c00 at 0x100a4d08 [ 50.081749] NIP: 100a4d08 LR: 101b5234 CTR: 00000003 [ 50.081931] REGS: c3883f50 TRAP: 0c00 Not tainted (5.14.0-rc4-00022-g251a1524293d) [ 50.082183] MSR: 0002f902 CR: 24000222 XER: 00000000 [ 50.082457] [ 50.082457] GPR00: 000000a2 bf980040 1024b4d0 bf980084 bf980084 64000000 00555345 fefefeff [ 50.082457] GPR08: 7f7f7f7f 101e0000 00000069 00000003 28000422 102490c2 bff4180c 101e60d4 [ 50.082457] GPR16: 00000000 102454ac 00000040 10240000 10241100 102410f8 10240000 00500000 [ 50.082457] GPR24: 00000002 bf9803f4 10240000 00000000 00000000 100039e0 00000000 102444e8 [ 50.083789] NIP [100a4d08] 0x100a4d08 [ 50.083917] LR [101b5234] 0x101b5234 [ 50.084042] --- interrupt: c00 [ 50.084238] Instruction dump: [ 50.084483] 4bfffc40 60000000 60000000 60000000 9421fff0 39400402 914200c0 38210010 [ 50.084841] 4bfffc20 00000000 00000000 00000000 <7fe00008> 7c0802a6 7c892378 93c10048 [ 50.085487] ---[ end trace f6fffe98e2fa8f3e ]--- [ 50.085678] Trace/breakpoint trap There is no real mode for booke arch and the MMU translation is always on. The corresponding MSR_IS/MSR_DS bit in booke is used to switch the address space, but not for real mode judgment. Fixes: 21f8b2fa3ca5 ("powerpc/kprobes: Ignore traps that happened in real mode") Signed-off-by: Pu Lehui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210809023658.218915-1-pulehui@huawei.com commit dc0dc8a73e8e4dc33fba93dfe23356cc5a500c57 Author: Takashi Iwai Date: Sun Aug 8 09:01:16 2021 +0200 ALSA: pcm: Fix mmap breakage without explicit buffer setup The recent fix c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") restricts the mmap capability only to the drivers that properly set up the buffers, but it caused a regression for a few drivers that manage the buffer on its own way. For those with UNKNOWN buffer type (i.e. the uninitialized / unused substream->dma_buffer), just assume that the driver handles the mmap properly and blindly trust the hardware info bit. Fixes: c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") Reported-and-tested-by: Jeff Woods Cc: Link: https://lore.kernel.org/r/s5him0gpghv.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit 484f2b7c61b9ae58cc00c5127bcbcd9177af8dfe Author: Marek Behún Date: Thu Jul 1 00:56:01 2021 +0200 cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant The 1.2 GHz variant of the Armada 3720 SOC is unstable with DVFS: when the SOC boots, the WTMI firmware sets clocks and AVS values that work correctly with 1.2 GHz CPU frequency, but random crashes occur once cpufreq driver starts scaling. We do not know currently what is the reason: - it may be that the voltage value for L0 for 1.2 GHz variant provided by the vendor in the OTP is simply incorrect when scaling is used, - it may be that some delay is needed somewhere, - it may be something else. The most sane solution now seems to be to simply forbid the cpufreq driver on 1.2 GHz variant. Signed-off-by: Marek Behún Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx") Signed-off-by: Viresh Kumar commit 20c0b380f971e7d48f5d978bc27d827f7eabb21a Author: Nadav Amit Date: Sat Aug 7 17:13:42 2021 -0700 io_uring: Use WRITE_ONCE() when writing to sq_flags The compiler should be forbidden from any strange optimization for async writes to user visible data-structures. Without proper protection, the compiler can cause write-tearing or invent writes that would confuse the userspace. However, there are writes to sq_flags which are not protected by WRITE_ONCE(). Use WRITE_ONCE() for these writes. This is purely a theoretical issue. Presumably, any compiler is very unlikely to do such optimizations. Fixes: 75b28affdd6a ("io_uring: allocate the two rings together") Cc: Jens Axboe Cc: Pavel Begunkov Signed-off-by: Nadav Amit Link: https://lore.kernel.org/r/20210808001342.964634-3-namit@vmware.com Signed-off-by: Jens Axboe commit ef98eb0409c31c39ab55ff46b2721c3b4f84c122 Author: Nadav Amit Date: Sat Aug 7 17:13:41 2021 -0700 io_uring: clear TIF_NOTIFY_SIGNAL when running task work When using SQPOLL, the submission queue polling thread calls task_work_run() to run queued work. However, when work is added with TWA_SIGNAL - as done by io_uring itself - the TIF_NOTIFY_SIGNAL remains set afterwards and is never cleared. Consequently, when the submission queue polling thread checks whether signal_pending(), it may always find a pending signal, if task_work_add() was ever called before. The impact of this bug might be different on different kernel versions. It appears that on 5.14 it would only cause unnecessary calculation and prevent the polling thread from sleeping. On 5.13, where the bug was found, it stops the polling thread from finding newly submitted work. Instead of task_work_run(), use tracehook_notify_signal() that clears TIF_NOTIFY_SIGNAL. Test for TIF_NOTIFY_SIGNAL in addition to current->task_works to avoid a race in which task_works is cleared but the TIF_NOTIFY_SIGNAL is set. Fixes: 685fe7feedb96 ("io-wq: eliminate the need for a manager thread") Cc: Jens Axboe Cc: Pavel Begunkov Signed-off-by: Nadav Amit Link: https://lore.kernel.org/r/20210808001342.964634-2-namit@vmware.com Signed-off-by: Jens Axboe commit 36a21d51725af2ce0700c6ebcb6b9594aac658a6 Author: Linus Torvalds Date: Sun Aug 8 13:49:31 2021 -0700 Linux 5.14-rc5 commit cceb634774efca60f8cc57041234f00faf97f22d Merge: 713f0f37e8128 bb7262b295472 Author: Linus Torvalds Date: Sun Aug 8 11:53:30 2021 -0700 Merge tag 'timers-urgent-2021-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single timer fix: - Prevent a memory ordering issue in the timer expiry code which makes it possible to observe falsely that the callback has been executed already while that's not the case, which violates the guarantee of del_timer_sync()" * tag 'timers-urgent-2021-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Move clearing of base::timer_running under base:: Lock commit 713f0f37e8128e8a0190a98f5a4be71fb32a671a Merge: 74eedeba459d8 f558c2b834ec2 Author: Linus Torvalds Date: Sun Aug 8 11:50:07 2021 -0700 Merge tag 'sched-urgent-2021-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A single scheduler fix: - Prevent a double enqueue caused by rt_effective_prio() being invoked twice in __sched_setscheduler()" * tag 'sched-urgent-2021-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt: Fix double enqueue caused by rt_effective_prio commit 74eedeba459d878484634cbfd5d1c2fbaf7178b9 Merge: 66745863ecdec acade6379930d Author: Linus Torvalds Date: Sun Aug 8 11:46:13 2021 -0700 Merge tag 'perf-urgent-2021-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A set of perf fixes: - Correct the permission checks for perf event which send SIGTRAP to a different process and clean up that code to be more readable. - Prevent an out of bound MSR access in the x86 perf code which happened due to an incomplete limiting to the actually available hardware counters. - Prevent access to the AMD64_EVENTSEL_HOSTONLY bit when running inside a guest. - Handle small core counter re-enabling correctly by issuing an ACK right before reenabling it to prevent a stale PEBS record being kept around" * tag 'perf-urgent-2021-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Apply mid ACK for small core perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest perf/x86: Fix out of bound MSR access perf: Refactor permissions check into perf_check_permission() perf: Fix required permissions if sigtrap is requested commit 66745863ecdec7abbfc3325c2d917eecb739c069 Merge: 289ef7befb65f 6bfc5272904af Author: Linus Torvalds Date: Sun Aug 8 10:41:49 2021 -0700 Merge tag 'char-misc-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc driver fixes for 5.14-rc5. They resolve a few regressions that people reported: - acrn driver fix - fpga driver fix - interconnect tiny driver fixes All have been in linux-next for a while with no reported issues" * tag 'char-misc-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: interconnect: Fix undersized devress_alloc allocation interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes fpga: dfl: fme: Fix cpu hotplug issue in performance reporting virt: acrn: Do hcall_destroy_vm() before resource release interconnect: Always call pre_aggregate before aggregate interconnect: Zero initial BW after sync-state commit 289ef7befb65f82a148981ad5c133f57f6dda1df Merge: 911c3c5e01516 75d95e2e39b27 Author: Linus Torvalds Date: Sun Aug 8 10:34:49 2021 -0700 Merge tag 'driver-core-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are three tiny driver core and firmware loader fixes for 5.14-rc5. They are: - driver core fix for when probing fails - firmware loader fixes for reported problems. All have been in linux-next for a while with no reported issues" * tag 'driver-core-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware_loader: fix use-after-free in firmware_fallback_sysfs firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback drivers core: Fix oops when driver probe fails commit 911c3c5e01516a1339eb54d9ca478a789002936b Merge: 6463e54cc64ec c7b65650c7f41 Author: Linus Torvalds Date: Sun Aug 8 10:29:39 2021 -0700 Merge tag 'staging-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are a few small staging driver fixes for 5.14-rc5 to resolve some reported problems. They include: - mt7621 driver fix - rtl8723bs driver fixes - rtl8712 driver fixes. Nothing major, just small problems resolved. All have been in linux-next for a while with no reported issues" * tag 'staging-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: mt7621-pci: avoid to re-disable clock for those pcies not in use staging: rtl8712: error handling refactoring staging: rtl8712: get rid of flush_scheduled_work staging: rtl8723bs: select CONFIG_CRYPTO_LIB_ARC4 staging: rtl8723bs: Fix a resource leak in sd_int_dpc commit 6463e54cc64ec87d550ae86c697b466fecf7ba7b Merge: 6a65554767546 341abd693d10e Author: Linus Torvalds Date: Sun Aug 8 10:23:13 2021 -0700 Merge tag 'tty-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small tty/serial driver fixes for 5.14-rc5 to resolve a number of reported problems. They include: - mips serial driver fixes - 8250 driver fixes for reported problems - fsl_lpuart driver fixes - other tiny driver fixes All have been in linux-next for a while with no reported problems" * tag 'tty-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_pci: Avoid irq sharing for MSI(-X) interrupts. serial: 8250_mtk: fix uart corruption issue when rx power off tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl serial: 8250_pci: Enumerate Elkhart Lake UARTs via dedicated driver serial: 8250: fix handle_irq locking serial: tegra: Only print FIFO error message when an error occurs MIPS: Malta: Do not byte-swap accesses to the CBUS UART serial: 8250: Mask out floating 16/32-bit bus bits serial: max310x: Unprepare and disable clock in error path commit 6a65554767546881e3e50f3734364021d11b703d Merge: 85a90500f9a17 43ad944cd73f2 Author: Linus Torvalds Date: Sun Aug 8 10:20:05 2021 -0700 Merge tag 'usb-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are some small USB driver fixes for 5.14-rc5. They resolve a number of small reported issues, including: - cdnsp driver fixes - usb serial driver fixes and device id updates - usb gadget hid fixes - usb host driver fixes - usb dwc3 driver fixes - other usb gadget driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'usb-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits) usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events usb: dwc3: gadget: Avoid runtime resume if disabling pullup usb: dwc3: gadget: Use list_replace_init() before traversing lists USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 USB: serial: pl2303: fix GT type detection USB: serial: option: add Telit FD980 composition 0x1056 USB: serial: pl2303: fix HX type detection USB: serial: ch341: fix character loss at high transfer rates usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro usb: cdnsp: Fixed issue with ZLP usb: cdnsp: Fix incorrect supported maximum speed usb: cdns3: Fixed incorrect gadget state usb: gadget: f_hid: idle uses the highest byte for duration Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels" usb: otg-fsm: Fix hrtimer list corruption usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers usb: gadget: f_hid: fixed NULL pointer dereference usb: gadget: remove leaked entry from udc driver list ... commit 3125f26c514826077f2a4490b75e9b1c7a644c42 Author: Pali Rohár Date: Sat Aug 7 18:00:50 2021 +0200 ppp: Fix generating ppp unit id when ifname is not specified When registering new ppp interface via PPPIOCNEWUNIT ioctl then kernel has to choose interface name as this ioctl API does not support specifying it. Kernel in this case register new interface with name "ppp" where is the ppp unit id, which can be obtained via PPPIOCGUNIT ioctl. This applies also in the case when registering new ppp interface via rtnl without supplying IFLA_IFNAME. PPPIOCNEWUNIT ioctl allows to specify own ppp unit id which will kernel assign to ppp interface, in case this ppp id is not already used by other ppp interface. In case user does not specify ppp unit id then kernel choose the first free ppp unit id. This applies also for case when creating ppp interface via rtnl method as it does not provide a way for specifying own ppp unit id. If some network interface (does not have to be ppp) has name "ppp" with this first free ppp id then PPPIOCNEWUNIT ioctl or rtnl call fails. And registering new ppp interface is not possible anymore, until interface which holds conflicting name is renamed. Or when using rtnl method with custom interface name in IFLA_IFNAME. As list of allocated / used ppp unit ids is not possible to retrieve from kernel to userspace, userspace has no idea what happens nor which interface is doing this conflict. So change the algorithm how ppp unit id is generated. And choose the first number which is not neither used as ppp unit id nor in some network interface with pattern "ppp". This issue can be simply reproduced by following pppd call when there is no ppp interface registered and also no interface with name pattern "ppp": pppd ifname ppp1 +ipv6 noip noauth nolock local nodetach pty "pppd +ipv6 noip noauth nolock local nodetach notty" Or by creating the one ppp interface (which gets assigned ppp unit id 0), renaming it to "ppp1" and then trying to create a new ppp interface (which will always fails as next free ppp unit id is 1, but network interface with name "ppp1" exists). This patch fixes above described issue by generating new and new ppp unit id until some non-conflicting id with network interfaces is generated. Signed-off-by: Pali Rohár Cc: stable@vger.kernel.org Signed-off-by: David S. Miller commit 2459dcb96bcba94c08d6861f8a050185ff301672 Author: Pali Rohár Date: Sat Aug 7 15:27:03 2021 +0200 ppp: Fix generating ifname when empty IFLA_IFNAME is specified IFLA_IFNAME is nul-term string which means that IFLA_IFNAME buffer can be larger than length of string which contains. Function __rtnl_newlink() generates new own ifname if either IFLA_IFNAME was not specified at all or userspace passed empty nul-term string. It is expected that if userspace does not specify ifname for new ppp netdev then kernel generates one in format "ppp" where id matches to the ppp unit id which can be later obtained by PPPIOCGUNIT ioctl. And it works in this way if IFLA_IFNAME is not specified at all. But it does not work when IFLA_IFNAME is specified with empty string. So fix this logic also for empty IFLA_IFNAME in ppp_nl_newlink() function and correctly generates ifname based on ppp unit identifier if userspace did not provided preferred ifname. Without this patch when IFLA_IFNAME was specified with empty string then kernel created a new ppp interface in format "ppp" but id did not match ppp unit id returned by PPPIOCGUNIT ioctl. In this case id was some number generated by __rtnl_newlink() function. Signed-off-by: Pali Rohár Fixes: bb8082f69138 ("ppp: build ifname using unit identifier for rtnl based devices") Signed-off-by: David S. Miller commit 2f5501a8f1cd795f36c0a8a3ed868ac53b6be802 Merge: 1027b96ec9d34 92529df76db5a Author: David S. Miller Date: Sun Aug 8 13:05:51 2021 +0100 Merge branch 'bnxt_en-ptp-fixes' Michael Chan says: ==================== bnxt_en: PTP fixes This series includes 2 fixes for the PTP feature. Update to the new firmware interface so that the driver can pass the PTP sequence number header offset of TX packets to the firmware. This is needed for all PTP packet types (v1, v2, with or without VLAN) to work. The 2nd fix is to use a different register window to read the PHC to avoid conflict with an older Broadcom tool. ==================== Signed-off-by: David S. Miller commit 92529df76db5ab184b82674cf7a4eef4b665b40e Author: Michael Chan Date: Sat Aug 7 15:03:15 2021 -0400 bnxt_en: Use register window 6 instead of 5 to read the PHC Some older Broadcom debug tools use window 5 and may conflict, so switch to use window 6 instead. Fixes: 118612d519d8 ("bnxt_en: Add PTP clock APIs, ioctls, and ethtool methods") Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9e26680733d5c6538ba2e7a111fb49c9ac2dc16a Author: Michael Chan Date: Sat Aug 7 15:03:14 2021 -0400 bnxt_en: Update firmware call to retrieve TX PTP timestamp New firmware interface requires the PTP sequence ID header offset to be passed to the firmware to properly find the matching timestamp for all protocols. Fixes: 83bb623c968e ("bnxt_en: Transmit and retrieve packet timestamps") Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit fbfee25796e2688004d58ad4d0673279366b97dd Author: Michael Chan Date: Sat Aug 7 15:03:13 2021 -0400 bnxt_en: Update firmware interface to 1.10.2.52 The key change is the firmware call to retrieve the PTP TX timestamp. The header offset for the PTP sequence number field is now added. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1027b96ec9d34f9abab69bc1a4dc5b1ad8ab1349 Author: Kefeng Wang Date: Fri Aug 6 16:21:24 2021 +0800 once: Fix panic when module unload DO_ONCE DEFINE_STATIC_KEY_TRUE(___once_key); __do_once_done once_disable_jump(once_key); INIT_WORK(&w->work, once_deferred); struct once_work *w; w->key = key; schedule_work(&w->work); module unload //*the key is destroy* process_one_work once_deferred BUG_ON(!static_key_enabled(work->key)); static_key_count((struct static_key *)x) //*access key, crash* When module uses DO_ONCE mechanism, it could crash due to the above concurrency problem, we could reproduce it with link[1]. Fix it by add/put module refcount in the once work process. [1] https://lore.kernel.org/netdev/eaa6c371-465e-57eb-6be9-f4b16b9d7cbf@huawei.com/ Cc: Hannes Frederic Sowa Cc: Daniel Borkmann Cc: David S. Miller Cc: Eric Dumazet Reported-by: Minmin chen Signed-off-by: Kefeng Wang Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller commit d329e41a08f37c478159d5c3379a17b9c07befa3 Author: Vinicius Costa Gomes Date: Fri Aug 6 18:15:46 2021 -0700 ptp: Fix possible memory leak caused by invalid cast Fixes possible leak of PTP virtual clocks. The number of PTP virtual clocks to be unregistered is passed as 'u32', but the function that unregister the devices handles that as 'u8'. Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 2383cb9497d113360137a2be308b390faa80632d Author: Ben Hutchings Date: Sat Aug 7 02:06:18 2021 +0200 net: phy: micrel: Fix link detection on ksz87xx switch" Commit a5e63c7d38d5 "net: phy: micrel: Fix detection of ksz87xx switch" broke link detection on the external ports of the KSZ8795. The previously unused phy_driver structure for these devices specifies config_aneg and read_status functions that appear to be designed for a fixed link and do not work with the embedded PHYs in the KSZ8795. Delete the use of these functions in favour of the generic PHY implementations which were used previously. Fixes: a5e63c7d38d5 ("net: phy: micrel: Fix detection of ksz87xx switch") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 85a90500f9a1717c4e142ce92e6c1cb1a339ec78 Merge: 6bbf59145c4b2 21698274da5b6 Author: Linus Torvalds Date: Sat Aug 7 10:34:26 2021 -0700 Merge tag 'io_uring-5.14-2021-08-07' of git://git.kernel.dk/linux-block Pull io_uring from Jens Axboe: "A few io-wq related fixes: - Fix potential nr_worker race and missing max_workers check from one path (Hao) - Fix race between worker exiting and new work queue (me)" * tag 'io_uring-5.14-2021-08-07' of git://git.kernel.dk/linux-block: io-wq: fix lack of acct->nr_workers < acct->max_workers judgement io-wq: fix no lock protection of acct->nr_worker io-wq: fix race between worker exiting and activating free worker commit 6bbf59145c4b29a384b0a66d63ddfbf55eeb91c4 Merge: 0b6684ba5f5ab fb7b9b0231ba8 Author: Linus Torvalds Date: Sat Aug 7 10:26:21 2021 -0700 Merge tag 'block-5.14-2021-08-07' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few minor fixes: - Fix ldm kernel-doc warning (Bart) - Fix adding offset twice for DMA address in n64cart (Christoph) - Fix use-after-free in dasd path handling (Stefan) - Order kyber insert trace correctly (Vincent) - raid1 errored write handling fix (Wei) - Fix blk-iolatency queue get failure handling (Yu)" * tag 'block-5.14-2021-08-07' of git://git.kernel.dk/linux-block: kyber: make trace_block_rq call consistent with documentation block/partitions/ldm.c: Fix a kernel-doc warning blk-iolatency: error out if blk_get_queue() failed in iolatency_set_limit() n64cart: fix the dma address in n64cart_do_bvec s390/dasd: fix use after free in dasd path handling md/raid10: properly indicate failure when ending a failed write request commit 0b6684ba5f5abf0dbbda35af570443181910a780 Merge: 4972bb90c3956 867432bec1c6e Author: Linus Torvalds Date: Sat Aug 7 10:15:04 2021 -0700 Merge tag 'riscv-for-linus-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - avoid dereferencing a null task pointer while walking the stack - fix the memory size in the HiFive Unleashed device tree - disable stack protectors when randstruct is enabled, which results in non-deterministic offsets during module builds - a pair of fixes to avoid relying on a constant physical memory base for the non-XIP builds * tag 'riscv-for-linus-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: Revert "riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED" riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled riscv: dts: fix memory size for the SiFive HiFive Unmatched riscv: stacktrace: Fix NULL pointer dereference commit 4972bb90c3956817c8e0eea15a348ab635d1acdd Merge: c9194f32bfd93 14ccc638b02f9 Author: Linus Torvalds Date: Sat Aug 7 10:03:02 2021 -0700 Merge tag 'kbuild-fixes-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Correct the Extended Regular Expressions in tools - Adjust scripts/checkversion.pl for the current Kbuild - Unset sub_make_done for 'make install' to make DKMS work again * tag 'kbuild-fixes-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: cancel sub_make_done for the install target to fix DKMS scripts: checkversion: modernize linux/version.h search strings mips: Fix non-POSIX regexp x86/tools/relocs: Fix non-POSIX regexp commit 34737e1320db6d51f0d140d5c684b9eb32f0da76 Author: Loic Poulain Date: Fri Aug 6 12:35:09 2021 +0200 net: wwan: mhi_wwan_ctrl: Fix possible deadlock Lockdep detected possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mhiwwan->rx_lock); local_irq_disable(); lock(&mhi_cntrl->pm_lock); lock(&mhiwwan->rx_lock); lock(&mhi_cntrl->pm_lock); *** DEADLOCK *** To prevent this we need to disable the soft-interrupts when taking the rx_lock. Cc: stable@vger.kernel.org Fixes: fa588eba632d ("net: Add Qcom WWAN control driver") Reported-by: Thomas Perrot Signed-off-by: Loic Poulain Reviewed-by: Sergey Ryazanov Signed-off-by: David S. Miller commit 47fac45600aafc5939d9620055c3c46f7135d316 Author: Oleksij Rempel Date: Fri Aug 6 11:47:23 2021 +0200 net: dsa: qca: ar9331: make proper initial port defaults Make sure that all external port are actually isolated from each other, so no packets are leaked. Fixes: ec6698c272de ("net: dsa: add support for Atheros AR9331 built-in switch") Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit d992e99b87ec6ac59d95a1e3de0cde8a996c7697 Merge: 84103209bab24 9c40186488145 Author: David S. Miller Date: Sat Aug 7 09:33:22 2021 +0100 Merge branch 'r8169-RTL8106e' Hayes Wang says: ==================== r8169: adjust the setting for RTL8106e These patches are uesed to avoid the delay of link-up interrupt, when enabling ASPM for RTL8106e. The patch #1 is used to enable ASPM if it is possible. And the patch #2 is used to modify the entrance latencies of L0 and L1. ==================== Signed-off-by: David S. Miller commit 9c40186488145b57f800de120f0872168772adfe Author: Hayes Wang Date: Fri Aug 6 17:15:56 2021 +0800 r8169: change the L0/L1 entrance latencies for RTL8106e The original L0 and L1 entrance latencies of RTL8106e are 4us. And they cause the delay of link-up interrupt when enabling ASPM. Change the L0 entrance latency to 7us and L1 entrance latency to 32us. Then, they could avoid the issue. Tested-by: Koba Ko Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 2115d3d482656ea702f7cf308c0ded3500282903 Author: Hayes Wang Date: Fri Aug 6 17:15:55 2021 +0800 Revert "r8169: avoid link-up interrupt issue on RTL8106e if user enables ASPM" This reverts commit 1ee8856de82faec9bc8bd0f2308a7f27e30ba207. This is used to re-enable ASPM on RTL8106e, if it is possible. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 84103209bab24440a156c476c2af890cec1f87d5 Merge: cc4e5eecd43b7 c4eb1f403243f Author: David S. Miller Date: Sat Aug 7 09:26:54 2021 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-08-07 The following pull-request contains BPF updates for your *net* tree. We've added 4 non-merge commits during the last 9 day(s) which contain a total of 4 files changed, 8 insertions(+), 7 deletions(-). The main changes are: 1) Fix integer overflow in htab's lookup + delete batch op, from Tatsuhiko Yasumatsu. 2) Fix invalid fd 0 close in libbpf if BTF parsing failed, from Daniel Xu. 3) Fix libbpf feature probe for BPF_PROG_TYPE_CGROUP_SOCKOPT, from Robin Gögge. 4) Fix minor libbpf doc warning regarding code-block language, from Randy Dunlap. ==================== Signed-off-by: David S. Miller commit 739d0959fbed23838a96c48fbce01dd2f6fb2c5f Author: Luke D Jones Date: Sat Aug 7 14:58:05 2021 +1200 ALSA: hda: Add quirk for ASUS Flow x13 The ASUS GV301QH sound appears to work well with the quirk for ALC294_FIXUP_ASUS_DUAL_SPK. Signed-off-by: Luke D Jones Cc: Link: https://lore.kernel.org/r/20210807025805.27321-1-luke@ljones.dev Signed-off-by: Takashi Iwai commit 867432bec1c6e7df21a361d7f12022a8c5f54022 Author: Alexandre Ghiti Date: Wed Jul 21 09:59:36 2021 +0200 Revert "riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED" This reverts commit 9b79878ced8f7ab85c57623f8b1f6882e484a316. The removal of this config exposes CONFIG_PHYS_RAM_BASE for all kernel types: this value being implementation-specific, this breaks the genericity of the RISC-V kernel so revert it. Signed-off-by: Alexandre Ghiti Tested-by: Emil Renner Berthing Reviewed-by: Jisheng Zhang Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 6d7f91d914bc90a15ebc426440c26081337ceaa1 Author: Alexandre Ghiti Date: Wed Jul 21 09:59:35 2021 +0200 riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion The usage of CONFIG_PHYS_RAM_BASE for all kernel types was a mistake: this value is implementation-specific and this breaks the genericity of the RISC-V kernel. Fix this by introducing a new variable phys_ram_base that holds this value at runtime and use it in the kernel physical address conversion macro. Since this value is used only for XIP kernels, evaluate it only if CONFIG_XIP_KERNEL is set which in addition optimizes this macro for standard kernels at compile-time. Signed-off-by: Alexandre Ghiti Tested-by: Emil Renner Berthing Reviewed-by: Jisheng Zhang Fixes: 44c922572952 ("RISC-V: enable XIP") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit be7ecbd240b2f9ec544d3ce6fccf4cec3cd15dca Author: Maxim Kochetkov Date: Tue Aug 3 14:35:38 2021 +0300 soc: fsl: qe: convert QE interrupt controller to platform_device Since 5.13 QE's ucc nodes can't get interrupts from devicetree: ucc@2000 { cell-index = <1>; reg = <0x2000 0x200>; interrupts = <32>; interrupt-parent = <&qeic>; }; Now fw_devlink expects driver to create and probe a struct device for interrupt controller. So lets convert this driver to simple platform_device with probe(). Also use platform_get_ and devm_ family function to get/allocate resources and drop unused .compatible = "qeic". [1] - https://lore.kernel.org/lkml/CAGETcx9PiX==mLxB9PO8Myyk6u2vhPVwTMsA5NkD-ywH5xhusw@mail.gmail.com Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default") Fixes: ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""") Signed-off-by: Maxim Kochetkov Reported-by: kernel test robot Reported-by: Dan Carpenter Acked-by: Saravana Kannan Signed-off-by: Li Yang commit c4eb1f403243fc7bbb7de644db8587c03de36da6 Author: Tatsuhiko Yasumatsu Date: Sat Aug 7 00:04:18 2021 +0900 bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as reported by KASAN: [...] [ 104.986052] BUG: KASAN: vmalloc-out-of-bounds in __htab_map_lookup_and_delete_batch+0x5ce/0xb60 [ 104.986489] Write of size 4194224 at addr ffffc9010503be70 by task crash/112 [ 104.986889] [ 104.987193] CPU: 0 PID: 112 Comm: crash Not tainted 5.14.0-rc4 #13 [ 104.987552] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 [ 104.988104] Call Trace: [ 104.988410] dump_stack_lvl+0x34/0x44 [ 104.988706] print_address_description.constprop.0+0x21/0x140 [ 104.988991] ? __htab_map_lookup_and_delete_batch+0x5ce/0xb60 [ 104.989327] ? __htab_map_lookup_and_delete_batch+0x5ce/0xb60 [ 104.989622] kasan_report.cold+0x7f/0x11b [ 104.989881] ? __htab_map_lookup_and_delete_batch+0x5ce/0xb60 [ 104.990239] kasan_check_range+0x17c/0x1e0 [ 104.990467] memcpy+0x39/0x60 [ 104.990670] __htab_map_lookup_and_delete_batch+0x5ce/0xb60 [ 104.990982] ? __wake_up_common+0x4d/0x230 [ 104.991256] ? htab_of_map_free+0x130/0x130 [ 104.991541] bpf_map_do_batch+0x1fb/0x220 [...] In hashtable, if the elements' keys have the same jhash() value, the elements will be put into the same bucket. By putting a lot of elements into a single bucket, the value of bucket_size can be increased to trigger the integer overflow. Triggering the overflow is possible for both callers with CAP_SYS_ADMIN and callers without CAP_SYS_ADMIN. It will be trivial for a caller with CAP_SYS_ADMIN to intentionally reach this overflow by enabling BPF_F_ZERO_SEED. As this flag will set the random seed passed to jhash() to 0, it will be easy for the caller to prepare keys which will be hashed into the same value, and thus put all the elements into the same bucket. If the caller does not have CAP_SYS_ADMIN, BPF_F_ZERO_SEED cannot be used. However, it will be still technically possible to trigger the overflow, by guessing the random seed value passed to jhash() (32bit) and repeating the attempt to trigger the overflow. In this case, the probability to trigger the overflow will be low and will take a very long time. Fix the integer overflow by calling kvmalloc_array() instead of kvmalloc() to allocate memory. Fixes: 057996380a42 ("bpf: Add batch ops to all htab bpf map") Signed-off-by: Tatsuhiko Yasumatsu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210806150419.109658-1-th.yasumatsu@gmail.com commit 7c4a22339e7ce7b6ed473a8e682da622c3a774ee Author: Randy Dunlap Date: Sun Aug 1 18:50:37 2021 -0700 libbpf, doc: Eliminate warnings in libbpf_naming_convention Use "code-block: none" instead of "c" for non-C-language code blocks. Removes these warnings: lnx-514-rc4/Documentation/bpf/libbpf/libbpf_naming_convention.rst:111: WARNING: Could not lex literal_block as "c". Highlighting skipped. lnx-514-rc4/Documentation/bpf/libbpf/libbpf_naming_convention.rst:124: WARNING: Could not lex literal_block as "c". Highlighting skipped. Fixes: f42cfb469f9b ("bpf: Add documentation for libbpf including API autogen") Signed-off-by: Randy Dunlap Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210802015037.787-1-rdunlap@infradead.org commit c34c338a40e4f3b6f80889cd17fd9281784d1c32 Author: Daniel Xu Date: Wed Jul 28 16:09:21 2021 -0700 libbpf: Do not close un-owned FD 0 on errors Before this patch, btf_new() was liable to close an arbitrary FD 0 if BTF parsing failed. This was because: * btf->fd was initialized to 0 through the calloc() * btf__free() (in the `done` label) closed any FDs >= 0 * btf->fd is left at 0 if parsing fails This issue was discovered on a system using libbpf v0.3 (without BTF_KIND_FLOAT support) but with a kernel that had BTF_KIND_FLOAT types in BTF. Thus, parsing fails. While this patch technically doesn't fix any issues b/c upstream libbpf has BTF_KIND_FLOAT support, it'll help prevent issues in the future if more BTF types are added. It also allow the fix to be backported to older libbpf's. Fixes: 3289959b97ca ("libbpf: Support BTF loading and raw data output in both endianness") Signed-off-by: Daniel Xu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/5969bb991adedb03c6ae93e051fd2a00d293cf25.1627513670.git.dxu@dxuuu.xyz commit 78d14bda861dd2729f15bb438fe355b48514bfe0 Author: Robin Gögge Date: Thu Jul 29 00:58:25 2021 +0200 libbpf: Fix probe for BPF_PROG_TYPE_CGROUP_SOCKOPT This patch fixes the probe for BPF_PROG_TYPE_CGROUP_SOCKOPT, so the probe reports accurate results when used by e.g. bpftool. Fixes: 4cdbfb59c44a ("libbpf: support sockopt hooks") Signed-off-by: Robin Gögge Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20210728225825.2357586-1-r.goegge@gmail.com commit c18956e6e0b95f78dad2773ecc8c61a9e41f6405 Author: Laurent Dufour Date: Thu Aug 5 17:23:08 2021 +0200 powerpc/pseries: Fix update of LPAR security flavor after LPM After LPM, when migrating from a system with security mitigation enabled to a system with mitigation disabled, the security flavor exposed in /proc is not correctly set back to 0. Do not assume the value of the security flavor is set to 0 when entering init_cpu_char_feature_flags(), so when called after a LPM, the value is set correctly even if the mitigation are not turned off. Fixes: 6ce56e1ac380 ("powerpc/pseries: export LPAR security flavor in lparcfg") Cc: stable@vger.kernel.org # v5.13+ Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210805152308.33988-1-ldufour@linux.ibm.com commit 8241461536f21bbe51308a6916d1c9fb2e6b75a7 Author: Christophe Leroy Date: Wed Aug 4 18:24:10 2021 +0000 powerpc/smp: Fix OOPS in topology_init() Running an SMP kernel on an UP platform not prepared for it, I encountered the following OOPS: BUG: Kernel NULL pointer dereference on read at 0x00000034 Faulting instruction address: 0xc0a04110 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K SMP NR_CPUS=2 CMPCPRO Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-pmac-00001-g230fedfaad21 #5234 NIP: c0a04110 LR: c0a040d8 CTR: c0a04084 REGS: e100dda0 TRAP: 0300 Not tainted (5.13.0-pmac-00001-g230fedfaad21) MSR: 00009032 CR: 84000284 XER: 00000000 DAR: 00000034 DSISR: 20000000 GPR00: c0006bd4 e100de60 c1033320 00000000 00000000 c0942274 00000000 00000000 GPR08: 00000000 00000000 00000001 00000063 00000007 00000000 c0006f30 00000000 GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000005 GPR24: c0c67d74 c0c67f1c c0c60000 c0c67d70 c0c0c558 1efdf000 c0c00020 00000000 NIP [c0a04110] topology_init+0x8c/0x138 LR [c0a040d8] topology_init+0x54/0x138 Call Trace: [e100de60] [80808080] 0x80808080 (unreliable) [e100de90] [c0006bd4] do_one_initcall+0x48/0x1bc [e100def0] [c0a0150c] kernel_init_freeable+0x1c8/0x278 [e100df20] [c0006f44] kernel_init+0x14/0x10c [e100df30] [c00190fc] ret_from_kernel_thread+0x14/0x1c Instruction dump: 7c692e70 7d290194 7c035040 7c7f1b78 5529103a 546706fe 5468103a 39400001 7c641b78 40800054 80c690b4 7fb9402e <81060034> 7fbeea14 2c080000 7fa3eb78 ---[ end trace b246ffbc6bbbb6fb ]--- Fix it by checking smp_ops before using it, as already done in several other places in the arch/powerpc/kernel/smp.c Fixes: 39f87561454d ("powerpc/smp: Move ppc_md.cpu_die() to smp_ops.cpu_offline_self()") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/75287841cbb8740edd44880fe60be66d489160d9.1628097995.git.christophe.leroy@csgroup.eu commit b5cfc9cd7b0426e94ffd9e9ed79d1b00ace7780a Author: Christophe Leroy Date: Wed Jul 7 05:55:07 2021 +0000 powerpc/32: Fix critical and debug interrupts on BOOKE 32 bits BOOKE have special interrupts for debug and other critical events. When handling those interrupts, dedicated registers are saved in the stack frame in addition to the standard registers, leading to a shift of the pt_regs struct. Since commit db297c3b07af ("powerpc/32: Don't save thread.regs on interrupt entry"), the pt_regs struct is expected to be at the same place all the time. Instead of handling a special struct in addition to pt_regs, just add those special registers to struct pt_regs. Fixes: db297c3b07af ("powerpc/32: Don't save thread.regs on interrupt entry") Cc: stable@vger.kernel.org Reported-by: Radu Rendec Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/028d5483b4851b01ea4334d0751e7f260419092b.1625637264.git.christophe.leroy@csgroup.eu commit 62376365048878f770d8b7d11b89b8b3e18018f1 Author: Christophe Leroy Date: Tue Aug 3 15:14:27 2021 +0000 powerpc/32s: Fix napping restore in data storage interrupt (DSI) When a DSI (Data Storage Interrupt) is taken while in NAP mode, r11 doesn't survive the call to power_save_ppc32_restore(). So use r1 instead of r11 as they both contain the virtual stack pointer at that point. Fixes: 4c0104a83fc3 ("powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE") Cc: stable@vger.kernel.org # v5.13+ Reported-by: Finn Thain Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/731694e0885271f6ee9ffc179eb4bcee78313682.1628003562.git.christophe.leroy@csgroup.eu commit fb7b9b0231ba8f77587c23f5257a4fdb6df1219e Author: Vincent Fu Date: Wed Aug 4 19:49:23 2021 +0000 kyber: make trace_block_rq call consistent with documentation The kyber ioscheduler calls trace_block_rq_insert() *after* the request is added to the queue but the documentation for trace_block_rq_insert() says that the call should be made *before* the request is added to the queue. Move the tracepoint for the kyber ioscheduler so that it is consistent with the documentation. Signed-off-by: Vincent Fu Link: https://lore.kernel.org/r/20210804194913.10497-1-vincent.fu@samsung.com Reviewed by: Adam Manzanares Signed-off-by: Jens Axboe commit 46dd2965bdd1c5a4f6499c73ff32e636fa8f9769 Author: Solomon Chiu Date: Wed Jul 28 00:20:30 2021 +0800 drm/amdgpu: Add preferred mode in modeset when freesync video mode's enabled. [Why] With kernel module parameter "freesync_video" is enabled, if the mode is changed to preferred mode(the mode with highest rate), then Freesync fails because the preferred mode is treated as one of freesync video mode, and then be configurated as freesync video mode(fixed refresh rate). [How] Skip freesync fixed rate configurating when modeset to preferred mode. Signed-off-by: Solomon Chiu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c9194f32bfd932e976a158d1af97a63be68a2aab Merge: 2c4b1ec683f28 877ba3f729fd3 Author: Linus Torvalds Date: Fri Aug 6 12:55:07 2021 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "A regression fix, bug fix, and a comment cleanup for ext4" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix potential htree corruption when growing large_dir directories ext4: remove conflicting comment from __ext4_forget ext4: fix potential uninitialized access to retval in kmmpd commit b48027083a78b13356695555a05b0e085e378687 Author: Manivannan Sadhasivam Date: Tue Jul 27 11:58:13 2021 +0530 mtd: rawnand: Fix probe failure due to of_get_nand_secure_regions() Due to 14f97f0b8e2b, the rawnand platforms without "secure-regions" property defined in DT fails to probe. The issue is, of_get_nand_secure_regions() errors out if of_property_count_elems_of_size() returns a negative error code. If the "secure-regions" property is not present in DT, then also we'll get -EINVAL from of_property_count_elems_of_size() but it should not be treated as an error for platforms not declaring "secure-regions" in DT. So fix this behaviour by checking for the existence of that property in DT and return 0 if it is not present. Fixes: 14f97f0b8e2b ("mtd: rawnand: Add a check in of_get_nand_secure_regions()") Reported-by: Martin Kaiser Signed-off-by: Manivannan Sadhasivam Reviewed-by: Martin Kaiser Tested-by: Martin Kaiser Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210727062813.32619-1-manivannan.sadhasivam@linaro.org commit b7abb051682263e51866bc78762fd0083d64c5ed Author: Desmond Cheong Zhi Xi Date: Sat Jul 17 18:07:19 2021 +0800 mtd: fix lock hierarchy in deregister_mtd_blktrans There is a lock hierarchy of major_names_lock --> mtd_table_mutex. One existing chain is as follows: 1. major_names_lock --> loop_ctl_mutex (when blk_request_module calls loop_probe) 2. loop_ctl_mutex --> bdev->bd_mutex (when loop_control_ioctl calls loop_remove, which then calls del_gendisk) 3. bdev->bd_mutex --> mtd_table_mutex (when blkdev_get_by_dev calls __blkdev_get, which then calls blktrans_open) Since unregister_blkdev grabs the major_names_lock, we need to call it outside the critical section for mtd_table_mutex, otherwise we invert the lock hierarchy. Reported-by: Hillf Danton Signed-off-by: Desmond Cheong Zhi Xi Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210717100719.728829-1-desmondcheongzx@gmail.com commit 99dc4ad992bf156692b088fab4d98deab7cbd3e6 Author: Colin Ian King Date: Mon Jul 12 15:52:14 2021 +0100 mtd: devices: mchp48l640: Fix memory leak on cmd The allocation for cmd is not being kfree'd on the return leading to a memory leak. Fix this by kfree'ing it. Addresses-Coverity: ("Resource leak") Fixes: 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM") Signed-off-by: Colin Ian King Reviewed-by: Heiko Schocher Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210712145214.101377-1-colin.king@canonical.com commit 2c4b1ec683f28e0054bb25a55d50fe552d0611ea Merge: 9917de73b499d 7b40066c97ec6 Author: Linus Torvalds Date: Fri Aug 6 12:36:46 2021 -0700 Merge tag 'trace-v5.14-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Fix tracepoint race between static_call and callback data As callbacks to a tracepoint are paired with the data that is passed in when the callback is registered to the tracepoint, it must have that data passed to the callback when the tracepoint is triggered, else bad things will happen. To keep the two together, they are both assigned to a tracepoint structure and added to an array. The tracepoint call site will dereference the structure (via RCU) and call the callback in that structure along with the data in that structure. This keeps the callback and data tightly coupled. Because of the overhead that retpolines have on tracepoint callbacks, if there's only one callback attached to a tracepoint (a common case), then it is called via a static call (code modified to do a direct call instead of an indirect call). But to implement this, the data had to be decoupled from the callback, as now the callback is implemented via a direct call from the static call and not an indirect call from the dereferenced structure. Note, the static call only calls a callback used when there's a single callback attached to the tracepoint. If more than one callback is attached to the same tracepoint, then the static call will call an iterator function that goes back to dereferencing the structure keeping the callback and its data tightly coupled again. Issues can arise when going from 0 callbacks to one, as the static call is assigned to the callback, and it must take care that the data passed to it is loaded before the static call calls the callback. Going from 1 to 2 callbacks is not an issue, as long as the static call is updated to the iterator before the tracepoint structure array is updated via RCU. Going from 2 to more or back down to 2 is not an issue as the iterator can handle all theses cases. But going from 2 to 1, care must be taken as the static call is now calling a callback and the data that is loaded must be the data for that callback. Care was taken to ensure the callback and data would be in-sync, but after a bug was reported, it became clear that not enough was done to make sure that was the case. These changes address this. The first change is to compare the old and new data instead of the old and new callback, as it's the data that can corrupt the callback, even if the callback is the same (something getting freed). The next change is to convert these transitions into states, to make it easier to know when a synchronization is needed, and to perform those synchronizations. The problem with this patch is that it slows down disabling all events from under a second, to making it take over 10 seconds to do the same work. But that is addressed in the final patch. The final patch uses the RCU state functions to keep track of the RCU state between the transitions, and only needs to perform the synchronization if an RCU synchronization hasn't been done already. This brings the performance of disabling all events back to its original value. That's because no synchronization is required between disabling tracepoints but is required when enabling a tracepoint after its been disabled. If an RCU synchronization happens after the tracepoint is disabled, and before it is re-enabled, there's no need to do the synchronization again. Both the second and third patch have subtle complexities that they are separated into two patches. But because the second patch causes such a regression in performance, the third patch adds a "Fixes" tag to the second patch, such that the two must be backported together and not just the second patch" * tag 'trace-v5.14-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracepoint: Use rcu get state and cond sync for static call updates tracepoint: Fix static call function vs data state mismatch tracepoint: static call: Compare data on transition from 2->1 callees commit 9917de73b499d160e76b6cc0aad2b3869dd057a3 Merge: 5d609689d9ff4 4adae7dd10db1 Author: Linus Torvalds Date: Fri Aug 6 12:30:29 2021 -0700 Merge tag 'pm-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix a recent regression in the timer events oriented (TEO) cpuidle governor causing it to misbehave when idle state 0 is disabled and rename two local variables for improved clarity on top of that" * tag 'pm-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: teo: Rename two local variables in teo_select() cpuidle: teo: Fix alternative idle state lookup commit 5d609689d9ff4db12cd38074518e3a19ef0b24a1 Merge: 3dc064d29dfba 6511a8b5b7a65 Author: Linus Torvalds Date: Fri Aug 6 12:22:47 2021 -0700 Merge tag 'acpi-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a recent ACPICA commit causing boot issues to appear on some systems" * tag 'acpi-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPICA: Fix memory leak caused by _CID repair function" commit 3dc064d29dfbaee66a08ff1cfbb2dff4439302fe Merge: 73f25536f2718 19c1eb3605a1b Author: Linus Torvalds Date: Fri Aug 6 11:41:12 2021 -0700 Merge tag 'soc-fixes-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Lots of small fixes for Arm SoCs this time, nothing too worrying: - omap/beaglebone boot regression fix in gpt12 timer - revert for i.mx8 soc driver breaking as a platform_driver - kexec/kdump fixes for op-tee - various fixes for incorrect DT settings on imx, mvebu, omap, stm32, and tegra causing problems. - device tree fixes for static checks in nomadik, versatile, stm32 - code fixes for issues found in build testing and with static checking on tegra, ixp4xx, imx, omap" * tag 'soc-fixes-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (36 commits) soc: ixp4xx/qmgr: fix invalid __iomem access soc: ixp4xx: fix printing resources ARM: ixp4xx: goramo_mlr depends on old PCI driver ARM: ixp4xx: fix compile-testing soc drivers soc/tegra: Make regulator couplers depend on CONFIG_REGULATOR ARM: dts: nomadik: Fix up interrupt controller node names ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM ARM: dts: stm32: Disable LAN8710 EDPD on DHCOM ARM: dts: stm32: Prefer HW RTC on DHCOM SoM omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator ARM: dts: am437x-l4: fix typo in can@0 node ARM: dts: am43x-epos-evm: Reduce i2c0 bus speed for tps65218 bus: ti-sysc: AM3: RNG is GP only ARM: omap2+: hwmod: fix potential NULL pointer access arm64: dts: armada-3720-turris-mox: remove mrvl,i2c-fast-mode arm64: dts: armada-3720-turris-mox: fixed indices for the SDHC controllers ARM: dts: imx: Swap M53Menlo pinctrl_power_button/pinctrl_power_out pins ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init ARM: dts: colibri-imx6ull: limit SDIO clock to 25MHz arm64: dts: ls1028: sl28: fix networking for variant 2 ... commit 73f25536f27182ae3dcf4c0b91b1280cbbac7be3 Merge: cb407fc81d68f 0c32706dac1b0 Author: Linus Torvalds Date: Fri Aug 6 11:33:49 2021 -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 all pretty minor but the main fix is sorting out how we deal with return values from 32-bit system calls as audit expects error codes to be sign-extended to 64 bits Summary: - Fix extension/truncation of return values from 32-bit system calls - Fix interaction between unwinding and tracing - Fix spurious toolchain warning emitted during make - Fix Kconfig help text for RANDOMIZE_MODULE_REGION_FULL" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: stacktrace: avoid tracing arch_stack_walk() arm64: stacktrace: fix comment arm64: fix the doc of RANDOMIZE_MODULE_REGION_FULL arm64: move warning about toolchains to archprepare arm64: fix compat syscall return truncation commit cb407fc81d68f3a61e82eda4e7f9421e67f8aece Merge: 894d6f401b218 6aa32467299e9 Author: Linus Torvalds Date: Fri Aug 6 11:31:11 2021 -0700 Merge tag 'mips-fixes_5.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fix from Thomas Bogendoerfer: "Fix PMD accounting change" * tag 'mips-fixes_5.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: check return value of pgtable_pmd_page_ctor commit 894d6f401b21865962aba776ecaa918b2f0abaa6 Merge: 4f1be39638a53 0395be967b067 Author: Linus Torvalds Date: Fri Aug 6 11:15:02 2021 -0700 Merge tag 'spi-fix-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of fixes for SPI, small mostly driver specific things plus a fix for module autoloading which hadn't been working properly for DT systems" * tag 'spi-fix-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: cadence-quadspi: Fix check condition for DTR ops spi: mediatek: Fix fifo transfer spi: imx: mx51-ecspi: Fix CONFIGREG delay comment spi: imx: mx51-ecspi: Fix low-speed CONFIGREG delay calculation spi: update modalias_show after of_device_uevent_modalias support spi: meson-spicc: fix memory leak in meson_spicc_remove spi: spi-mux: Add module info needed for autoloading commit 4f1be39638a538f6495c0a29e648255fb8c54f8b Merge: b4b927fcb0b2c 7199ddede9f0f Author: Linus Torvalds Date: Fri Aug 6 11:08:24 2021 -0700 Merge tag 'dmaengine-fix-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A bunch of driver fixes, notably: - idxd driver fixes for submission race, driver remove sequence, setup sequence for MSIXPERM, array index and updating descriptor vector - usb-dmac, pm reference leak fix - xilinx_dma, read-after-free fix - uniphier-xdmac fix for using atomic readl_poll_timeout_atomic() - of-dma, router_xlate to return - imx-dma, generic dma fix" * tag 'dmaengine-fix-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: imx-dma: configure the generic DMA type to make it work dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available dmaengine: stm32-dmamux: Fix PM usage counter unbalance in stm32 dmamux ops dmaengine: stm32-dma: Fix PM usage counter imbalance in stm32 dma ops dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state dmaengine: idxd: fix submission race window dmaengine: idxd: fix sequence for pci driver remove() and shutdown() dmaengine: idxd: fix desc->vector that isn't being updated dmaengine: idxd: fix setup sequence for MSIXPERM table dmaengine: idxd: fix array index when int_handles are being used dmaengine: usb-dmac: Fix PM reference leak in usb_dmac_probe() dmaengine: xilinx_dma: Fix read-after-free bug when terminating transfers commit b4b927fcb0b2cdd344501b409f2bc68265aab45f Merge: 484faec8f1dde 2638a32348bbb Author: Linus Torvalds Date: Fri Aug 6 11:03:35 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Several small recent regressions - rather more than usual, but nothing too scary. Good to know people are testing. - Typo causing incorrect operation of the mlx5 mkey cache expiration - Revert a CM patch that is breaking some ULPs - Typo breaking SRQ in rxe - Revert a rxe patch breaking icrc calculation - Static checker warning about unbalanced locking in hns - Subtle cxgb4 regression from a recent atomic to refcount conversion" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/iw_cxgb4: Fix refcount underflow while destroying cqs. RDMA/hns: Fix the double unlock problem of poll_sem RDMA/rxe: Restore setting tot_len in the IPv4 header RDMA/rxe: Use the correct size of wqe when processing SRQ RDMA/cma: Revert INIT-INIT patch RDMA/mlx5: Delay emptying a cache entry when a new MR is added to it recently commit 484faec8f1dde7352ac6f3f336f3756406eadda7 Merge: 1254f05ce097c 97367c97226aa Author: Linus Torvalds Date: Fri Aug 6 10:50:26 2021 -0700 Merge tag 'sound-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: - A few regression fixes (PCM core fixes, USB-audio fixes) - Follow up fixes for the USB-audio mixer changes in this cycle - A long-standing ALSA sequencer race bug fix - Usual device-specific quirks for HD- and USB-audio" * tag 'sound-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Fix racy deletion of subscriber ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS ALSA: pcm - fix mmap capability check for the snd-dummy driver ALSA: usb-audio: Avoid unnecessary or invalid connector selection at resume ALSA: hda/realtek: add mic quirk for Acer SF314-42 ALSA: usb-audio: Add registration quirk for JBL Quantum 600 ALSA: hda/realtek: Fix headset mic for Acer SWIFT SF314-56 (ALC256) ALSA: usb-audio: Fix superfluous autosuspend recovery ALSA: usb-audio: fix incorrect clock source setting ALSA: scarlett2: Fix line out/speaker switching notifications ALSA: scarlett2: Correct channel mute status after mute button pressed ALSA: scarlett2: Fix Direct Monitor control name for 2i2 ALSA: scarlett2: Fix Mute/Dim/MSD Mode control names commit 1254f05ce097c9bf2872a8407725346faba59844 Merge: 902e7f373fff2 d186f9c280088 Author: Linus Torvalds Date: Fri Aug 6 10:42:48 2021 -0700 Merge tag 'drm-fixes-2021-08-06' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular weekly fixes pull, live from a Brisbane lockdown with kids at home. A big bunch of scattered amdgpu fixes, but they are all pretty small, minor i915 fixes, kmb, and one vmwgfx regression fixes, all pretty quiet for this time. amdgpu: - Fix potential out-of-bounds read when updating GPUVM mapping - Renoir powergating fix - Yellow Carp updates - 8K fix for navi1x - Beige Goby updates and new DIDs - Fix DMUB firmware version output - EDP fix - pmops config fix i915: - Call i915_globals_exit if pci_register_device fails - (follow on fix for section mismatch) - Correct SFC_DONE register offset kmb: - DMA fix - driver date/version macros vmwgfx: - Fix I/O memory access on 64-bit systems" * tag 'drm-fixes-2021-08-06' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: add DID for beige goby drm/amdgpu/display: fix DMUB firmware version info drm/amd/display: workaround for hard hang on HPD on native DP drm/amd/display: Fix resetting DCN3.1 HW when resuming from S4 drm/amd/display: Increase stutter watermark for dcn303 drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X drm/amd/display: Assume LTTPR interop for DCN31+ drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled drm/amd/pm: update yellow carp pmfw interface version drm/i915: fix i915_globals_exit() section mismatch error drm/i915: Call i915_globals_exit() if pci_register_device() fails drm/i915: Correct SFC_DONE register offset drm/vmwgfx: Fix a 64bit regression on svga3 drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir. drm/amdgpu: Fix out-of-bounds read when update mapping drm/kmb: Define driver date and major/minor version drm/kmb: Enable LCD DMA for low TVDDCV commit 877ba3f729fd3d8ef0e29bc2a55e57cfa54b2e43 Author: Theodore Ts'o Date: Wed Aug 4 14:23:55 2021 -0400 ext4: fix potential htree corruption when growing large_dir directories Commit b5776e7524af ("ext4: fix potential htree index checksum corruption) removed a required restart when multiple levels of index nodes need to be split. Fix this to avoid directory htree corruptions when using the large_dir feature. Cc: stable@kernel.org # v5.11 Cc: Благодаренко Артём Fixes: b5776e7524af ("ext4: fix potential htree index checksum corruption) Reported-by: Denis Signed-off-by: Theodore Ts'o commit cc4e5eecd43b780093bf431304e3aebdd8418091 Merge: 704e624f7b3e8 269fc69533de7 Author: Jakub Kicinski Date: Fri Aug 6 08:44:49 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Restrict range element expansion in ipset to avoid soft lockup, from Jozsef Kadlecsik. 2) Memleak in error path for nf_conntrack_bridge for IPv4 packets, from Yajun Deng. 3) Simplify conntrack garbage collection strategy to avoid frequent wake-ups, from Florian Westphal. 4) Fix NFNLA_HOOK_FUNCTION_NAME string, do not include module name. 5) Missing chain family netlink attribute in chain description in nfnetlink_hook. 6) Incorrect sequence number on nfnetlink_hook dumps. 7) Use netlink request family in reply message for consistency. 8) Remove offload_pickup sysctl, use conntrack for established state instead, from Florian Westphal. 9) Translate NFPROTO_INET/ingress to NFPROTO_NETDEV/ingress, since NFPROTO_INET is not exposed through nfnetlink_hook. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: nfnetlink_hook: translate inet ingress to netdev netfilter: conntrack: remove offload_pickup sysctl again netfilter: nfnetlink_hook: Use same family as request message netfilter: nfnetlink_hook: use the sequence number of the request message netfilter: nfnetlink_hook: missing chain family netfilter: nfnetlink_hook: strip off module name from hookfn netfilter: conntrack: collect all entries in one cycle netfilter: nf_conntrack_bridge: Fix memory leak when error netfilter: ipset: Limit the maximal range of consecutive elements to add/delete ==================== Link: https://lore.kernel.org/r/20210806151149.6356-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 5126da7d99cf6396c929f3b577ba3aed1e74acd7 Author: Christophe JAILLET Date: Thu Aug 5 20:37:14 2021 +0200 drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()' 'watermarks_table' must be freed instead 'clocks_table', because 'clocks_table' is known to be NULL at this point and 'watermarks_table' is never freed if the last kzalloc fails. Fixes: c98ee89736b8 ("drm/amd/pm: add the fine grain tuning function for vangogh") Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher commit 202ead5a3c589b0594a75cb99f080174f6851fed Author: Alex Deucher Date: Mon Aug 2 10:03:30 2021 -0400 drm/amdgpu: don't enable baco on boco platforms in runpm If the platform uses BOCO, don't use BACO in runtime suspend. We could end up executing the BACO path if the platform supports both. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1669 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 39932ef75897bfcb8ba1120e7b09d615d74762fd Author: John Clements Date: Wed Aug 4 17:11:40 2021 +0800 drm/amdgpu: set RAS EEPROM address from VBIOS update to latest atombios fw table [Backport to 5.14 - Alex] Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1670 Signed-off-by: John Clements Reviewed-by: Hawking Zhang . Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ad89c9aa24603a6a26464316fab94d285792c942 Author: Xiaomeng Hou Date: Mon Aug 2 16:25:25 2021 +0800 drm/amd/pm: update smu v13.0.1 firmware header Update smu v13.0.1 firmware header for yellow carp. Signed-off-by: Xiaomeng Hou Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 269fc69533de73a9065c0b7971bcd109880290b3 Author: Pablo Neira Ayuso Date: Fri Aug 6 12:33:57 2021 +0200 netfilter: nfnetlink_hook: translate inet ingress to netdev The NFPROTO_INET pseudofamily is not exposed through this new netlink interface. The netlink dump either shows NFPROTO_IPV4 or NFPROTO_IPV6 for NFPROTO_INET prerouting/input/forward/output/postrouting hooks. The NFNLA_CHAIN_FAMILY attribute provides the family chain, which specifies if this hook applies to inet traffic only (either IPv4 or IPv6). Translate the inet/ingress hook to netdev/ingress to fully hide the NFPROTO_INET implementation details. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Pablo Neira Ayuso commit 4592ee7f525c4683ec9e290381601fdee50ae110 Author: Florian Westphal Date: Wed Aug 4 15:02:15 2021 +0200 netfilter: conntrack: remove offload_pickup sysctl again These two sysctls were added because the hardcoded defaults (2 minutes, tcp, 30 seconds, udp) turned out to be too low for some setups. They appeared in 5.14-rc1 so it should be fine to remove it again. Marcelo convinced me that there should be no difference between a flow that was offloaded vs. a flow that was not wrt. timeout handling. Thus the default is changed to those for TCP established and UDP stream, 5 days and 120 seconds, respectively. Marcelo also suggested to account for the timeout value used for the offloading, this avoids increase beyond the value in the conntrack-sysctl and will also instantly expire the conntrack entry with altered sysctls. Example: nf_conntrack_udp_timeout_stream=60 nf_flowtable_udp_timeout=60 This will remove offloaded udp flows after one minute, rather than two. An earlier version of this patch also cleared the ASSURED bit to allow nf_conntrack to evict the entry via early_drop (i.e., table full). However, it looks like we can safely assume that connection timed out via HW is still in established state, so this isn't needed. Quoting Oz: [..] the hardware sends all packets with a set FIN flags to sw. [..] Connections that are aged in hardware are expected to be in the established state. In case it turns out that back-to-sw-path transition can occur for 'dodgy' connections too (e.g., one side disappeared while software-path would have been in RETRANS timeout), we can adjust this later. Cc: Oz Shlomo Cc: Paul Blakey Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Florian Westphal Reviewed-by: Marcelo Ricardo Leitner Reviewed-by: Oz Shlomo Signed-off-by: Pablo Neira Ayuso commit 69311e7c997451dd40942b6b27b522cc3b659cef Author: Pablo Neira Ayuso Date: Wed Aug 4 01:27:20 2021 +0200 netfilter: nfnetlink_hook: Use same family as request message Use the same family as the request message, for consistency. The netlink payload provides sufficient information to describe the hook object, including the family. This makes it easier to userspace to correlate the hooks are that visited by the packets for a certain family. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Pablo Neira Ayuso commit 3d9bbaf6c5416bfc50f014ce5879c8c440aaa511 Author: Pablo Neira Ayuso Date: Wed Aug 4 01:27:19 2021 +0200 netfilter: nfnetlink_hook: use the sequence number of the request message The sequence number allows to correlate the netlink reply message (as part of the dump) with the original request message. The cb->seq field is internally used to detect an interference (update) of the hook list during the netlink dump, do not use it as sequence number in the netlink dump header. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Pablo Neira Ayuso commit a6e57c4af12bbacf927d7321c3aa894948653688 Author: Pablo Neira Ayuso Date: Tue Aug 3 00:15:54 2021 +0200 netfilter: nfnetlink_hook: missing chain family The family is relevant for pseudo-families like NFPROTO_INET otherwise the user needs to rely on the hook function name to differentiate it from NFPROTO_IPV4 and NFPROTO_IPV6 names. Add nfnl_hook_chain_desc_attributes instead of using the existing NFTA_CHAIN_* attributes, since these do not provide a family number. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Pablo Neira Ayuso commit 61e0c2bc555a194ada2632fadac73f2bdb5df9cb Author: Pablo Neira Ayuso Date: Tue Aug 3 00:15:53 2021 +0200 netfilter: nfnetlink_hook: strip off module name from hookfn NFNLA_HOOK_FUNCTION_NAME should include the hook function name only, the module name is already provided by NFNLA_HOOK_MODULE_NAME. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Pablo Neira Ayuso commit 4608fdfc07e116f9fc0895beb40abad7cdb5ee3d Author: Florian Westphal Date: Tue Jul 27 00:29:19 2021 +0200 netfilter: conntrack: collect all entries in one cycle Michal Kubecek reports that conntrack gc is responsible for frequent wakeups (every 125ms) on idle systems. On busy systems, timed out entries are evicted during lookup. The gc worker is only needed to remove entries after system becomes idle after a busy period. To resolve this, always scan the entire table. If the scan is taking too long, reschedule so other work_structs can run and resume from next bucket. After a completed scan, wait for 2 minutes before the next cycle. Heuristics for faster re-schedule are removed. GC_SCAN_INTERVAL could be exposed as a sysctl in the future to allow tuning this as-needed or even turn the gc worker off. Reported-by: Michal Kubecek Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 56e7a93160fe12a7ccce0c2191c64a6db9cb3ad9 Merge: 97367c97226aa e5ada3f6787a4 Author: Takashi Iwai Date: Fri Aug 6 17:00:51 2021 +0200 Merge tag 'asoc-fix-v5.14-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.14 Quite a lot of fixes here, the biggest set being for the cs42l42 driver which is reasonably old but has seen a sudden uptick in activity. There's also some fixes for correctly referencing PCM buffer addresses and the removal of some driver-local bodges that had been done for the lack of prefix handling in DAPM which were broken by the core handling that as expected. commit 7b40066c97ec66a44e388f82fcf694987451768f Author: Mathieu Desnoyers Date: Thu Aug 5 15:29:54 2021 -0400 tracepoint: Use rcu get state and cond sync for static call updates State transitions from 1->0->1 and N->2->1 callbacks require RCU synchronization. Rather than performing the RCU synchronization every time the state change occurs, which is quite slow when many tracepoints are registered in batch, instead keep a snapshot of the RCU state on the most recent transitions which belong to a chain, and conditionally wait for a grace period on the last transition of the chain if one g.p. has not elapsed since the last snapshot. This applies to both RCU and SRCU. This brings the performance regression caused by commit 231264d6927f ("Fix: tracepoint: static call function vs data state mismatch") back to what it was originally. Before this commit: # trace-cmd start -e all # time trace-cmd start -p nop real 0m10.593s user 0m0.017s sys 0m0.259s After this commit: # trace-cmd start -e all # time trace-cmd start -p nop real 0m0.878s user 0m0.000s sys 0m0.103s Link: https://lkml.kernel.org/r/20210805192954.30688-1-mathieu.desnoyers@efficios.com Link: https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/ Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andrew Morton Cc: "Paul E. McKenney" Cc: Stefan Metzmacher Fixes: 231264d6927f ("Fix: tracepoint: static call function vs data state mismatch") Signed-off-by: Mathieu Desnoyers Reviewed-by: Paul E. McKenney Signed-off-by: Steven Rostedt (VMware) commit 21698274da5b6fc724b005bc7ec3e6b9fbcfaa06 Author: Hao Xu Date: Thu Aug 5 18:05:38 2021 +0800 io-wq: fix lack of acct->nr_workers < acct->max_workers judgement There should be this judgement before we create an io-worker Fixes: 685fe7feedb9 ("io-wq: eliminate the need for a manager thread") Signed-off-by: Hao Xu Signed-off-by: Jens Axboe commit 3d4e4face9c1548752a2891e98b38b100feee336 Author: Hao Xu Date: Thu Aug 5 18:05:37 2021 +0800 io-wq: fix no lock protection of acct->nr_worker There is an acct->nr_worker visit without lock protection. Think about the case: two callers call io_wqe_wake_worker(), one is the original context and the other one is an io-worker(by calling io_wqe_enqueue(wqe, linked)), on two cpus paralelly, this may cause nr_worker to be larger than max_worker. Let's fix it by adding lock for it, and let's do nr_workers++ before create_io_worker. There may be a edge cause that the first caller fails to create an io-worker, but the second caller doesn't know it and then quit creating io-worker as well: say nr_worker = max_worker - 1 cpu 0 cpu 1 io_wqe_wake_worker() io_wqe_wake_worker() nr_worker < max_worker nr_worker++ create_io_worker() nr_worker == max_worker failed return return But the chance of this case is very slim. Fixes: 685fe7feedb9 ("io-wq: eliminate the need for a manager thread") Signed-off-by: Hao Xu [axboe: fix unconditional create_io_worker() call] Signed-off-by: Jens Axboe commit acade6379930dfa7987f4bd9b26d1a701cc1b542 Author: Kan Liang Date: Tue Aug 3 06:25:28 2021 -0700 perf/x86/intel: Apply mid ACK for small core A warning as below may be occasionally triggered in an ADL machine when these conditions occur: - Two perf record commands run one by one. Both record a PEBS event. - Both runs on small cores. - They have different adaptive PEBS configuration (PEBS_DATA_CFG). [ ] WARNING: CPU: 4 PID: 9874 at arch/x86/events/intel/ds.c:1743 setup_pebs_adaptive_sample_data+0x55e/0x5b0 [ ] RIP: 0010:setup_pebs_adaptive_sample_data+0x55e/0x5b0 [ ] Call Trace: [ ] [ ] intel_pmu_drain_pebs_icl+0x48b/0x810 [ ] perf_event_nmi_handler+0x41/0x80 [ ] [ ] __perf_event_task_sched_in+0x2c2/0x3a0 Different from the big core, the small core requires the ACK right before re-enabling counters in the NMI handler, otherwise a stale PEBS record may be dumped into the later NMI handler, which trigger the warning. Add a new mid_ack flag to track the case. Add all PMI handler bits in the struct x86_hybrid_pmu to track the bits for different types of PMUs. Apply mid ACK for the small cores on an Alder Lake machine. The existing hybrid() macro has a compile error when taking address of a bit-field variable. Add a new macro hybrid_bit() to get the bit-field value of a given PMU. 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) Reviewed-by: Andi Kleen Tested-by: Ammy Yi Link: https://lkml.kernel.org/r/1627997128-57891-1-git-send-email-kan.liang@linux.intel.com commit 9d7b132e62e41b7d49bf157aeaf9147c27492e0f Author: Hans de Goede Date: Fri Aug 6 13:55:15 2021 +0200 platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables The gpiod_lookup_table.table passed to gpiod_add_lookup_table() must be terminated with an empty entry, add this. Note we have likely been getting away with this not being present because the GPIO lookup code first matches on the dev_id, causing most lookups to skip checking the table and the lookups which do check the table will find a matching entry before reaching the end. With that said, terminating these tables properly still is obviously the correct thing to do. Fixes: f8eb0235f659 ("x86: pcengines apuv2 gpio/leds/keys platform driver") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210806115515.12184-1-hdegoede@redhat.com commit 085fc31f81765e061c78cdcab0e5516fd672bff7 Author: Hans de Goede Date: Mon Aug 2 16:10:00 2021 +0200 platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust 360 degree hinges devices with dual KIOX010A + KIOX020A accelerometers always have both a KIOX010A and a KIOX020A ACPI device (one for each accel). Theoretical some vendor may re-use some DSDT for a non-convertible stripping out just the KIOX020A ACPI device from the DSDT. Check that both ACPI devices are present to make the check more robust. Fixes: 153cca9caa81 ("platform/x86: Add and use a dual_accel_detect() helper") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210802141000.978035-1-hdegoede@redhat.com commit 704e624f7b3e8a4fc1ce43fb564746d1d07b20c0 Author: John Hubbard Date: Thu Aug 5 23:53:30 2021 -0700 net: mvvp2: fix short frame size on s390 On s390, the following build warning occurs: drivers/net/ethernet/marvell/mvpp2/mvpp2.h:844:2: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551584' to '-32' [-Woverflow] 844 | ((total_size) - MVPP2_SKB_HEADROOM - MVPP2_SKB_SHINFO_SIZE) This happens because MVPP2_SKB_SHINFO_SIZE, which is 320 bytes (which is already 64-byte aligned) on some architectures, actually gets ALIGN'd up to 512 bytes in the s390 case. So then, when this is invoked: MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_SHORT_FRAME_SIZE) ...that turns into: 704 - 224 - 512 == -32 ...which is not a good frame size to end up with! The warning above is a bit lucky: it notices a signed/unsigned bad behavior here, which leads to the real problem of a frame that is too short for its contents. Increase MVPP2_BM_SHORT_FRAME_SIZE by 32 (from 704 to 736), which is just exactly big enough. (The other values can't readily be changed without causing a lot of other problems.) Fixes: 07dd0a7aae7f ("mvpp2: add basic XDP support") Cc: Sven Auhagen Cc: Matteo Croce Cc: David S. Miller Signed-off-by: John Hubbard Signed-off-by: David S. Miller commit aff51c5da3208bd164381e1488998667269c6cf4 Author: DENG Qingfang Date: Fri Aug 6 12:05:27 2021 +0800 net: dsa: mt7530: add the missing RxUnicast MIB counter Add the missing RxUnicast counter. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: DENG Qingfang Signed-off-by: David S. Miller commit abf3d98dee7c4038152ce88833ddc2189f68cbd4 Author: Arnd Bergmann Date: Wed Jul 21 17:06:56 2021 +0200 mt76: fix enum type mismatch There is no 'NONE' version of 'enum mcu_cipher_type', and returning 'MT_CIPHER_NONE' causes a warning: drivers/net/wireless/mediatek/mt76/mt7921/mcu.c: In function 'mt7921_mcu_get_cipher': drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:114:24: error: implicit conversion from 'enum mt76_cipher_type' to 'enum mcu_cipher_type' [-Werror=enum-conversion] 114 | return MT_CIPHER_NONE; | ^~~~~~~~~~~~~~ Add the missing MCU_CIPHER_NONE defintion that fits in here with the same value. Fixes: c368362c36d3 ("mt76: fix iv and CCMP header insertion") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210721150745.1914829-1-arnd@kernel.org commit 2638a32348bbb1c384dbbd515fd2b12c155f0188 Author: Dakshaja Uppalapati Date: Thu Aug 5 18:13:32 2021 +0530 RDMA/iw_cxgb4: Fix refcount underflow while destroying cqs. Previous atomic increment/decrement logic expects the atomic count to be '0' after the final decrement. Replacing atomic count with refcount does not allow that, as refcount_dec() considers count of 1 as underflow and triggers a kernel splat. Fix the current refcount logic by using the usual pattern of decrementing the refcount and test if it is '0' on the final deref in c4iw_destroy_cq(). Use wait_for_completion() instead of wait_event(). Fixes: 7183451f846d ("RDMA/cxgb4: Use refcount_t instead of atomic_t for reference counting") Link: https://lore.kernel.org/r/1628167412-12114-1-git-send-email-dakshaja@chelsio.com Signed-off-by: Dakshaja Uppalapati Reviewed-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe commit d186f9c28008810d8f984d6bdd1c07757048ed63 Merge: a07296453bf27 e00f543d3596c Author: Dave Airlie Date: Fri Aug 6 11:22:08 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-08-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-08-05: amdgpu: - Fix potential out-of-bounds read when updating GPUVM mapping - Renoir powergating fix - Yellow Carp updates - 8K fix for navi1x - Beige Goby updates and new DIDs - Fix DMUB firmware version output - EDP fix - pmops config fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210806011635.1055841-1-alexander.deucher@amd.com commit 9711759a87a041705148161b937ec847048d882e Author: Bjorn Andersson Date: Wed Jul 21 15:40:56 2021 -0700 clk: qcom: gdsc: Ensure regulator init state matches GDSC state As GDSCs are registered and found to be already enabled gdsc_init() ensures that 1) the kernel state matches the hardware state, and 2) votable GDSCs are properly enabled from this master as well. But as the (optional) supply regulator is enabled deep into gdsc_toggle_logic(), which is only executed for votable GDSCs, the kernel's state of the regulator might not match the hardware. The regulator might be automatically turned off if no other users are present or the next call to gdsc_disable() would cause an unbalanced regulator_disable(). Given that the votable case deals with an already enabled GDSC, most of gdsc_enable() and gdsc_toggle_logic() can be skipped. Reduce it to just clearing the SW_COLLAPSE_MASK and enabling hardware control to simply call regulator_enable() in both cases. The enablement of hardware control seems to be an independent property from the GDSC being enabled, so this is moved outside that conditional segment. Lastly, as the propagation of ALWAYS_ON to GENPD_FLAG_ALWAYS_ON needs to happen regardless of the initial state this is grouped together with the other sc->pd updates at the end of the function. Cc: stable@vger.kernel.org Fixes: 37416e554961 ("clk: qcom: gdsc: Handle GDSC regulator supplies") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210721224056.3035016-1-bjorn.andersson@linaro.org [sboyd@kernel.org: Rephrase commit text] Signed-off-by: Stephen Boyd commit 283f1b9a0401859c53fdd6483ab66f1c4fadaea5 Author: Dong Aisheng Date: Fri Jul 2 16:54:38 2021 +0800 clk: imx6q: fix uart earlycon unwork The earlycon depends on the bootloader setup UART clocks being retained. There're actually two uart clocks (ipg, per) on MX6QDL, but the 'Fixes' commit change to register only one which means another clock may be disabled during booting phase and result in the earlycon unwork. Cc: stable@vger.kernel.org # v5.10+ Fixes: 379c9a24cc23 ("clk: imx: Fix reparenting of UARTs not associated with stdout") Signed-off-by: Dong Aisheng Link: https://lore.kernel.org/r/20210702085438.1988087-1-aisheng.dong@nxp.com Reviewed-by: Abel Vesa Signed-off-by: Stephen Boyd commit e00f543d3596c71201438d967877138ab33bb3de Author: Chengming Gui Date: Wed Feb 24 11:48:23 2021 +0800 drm/amdgpu: add DID for beige goby Add device ids. Signed-off-by: Chengming Gui Signed-off-by: Alex Deucher commit 0e99e960ce6d5ff586fc0733bc393c087f52c27b Author: Shirish S Date: Tue Aug 3 14:03:44 2021 +0530 drm/amdgpu/display: fix DMUB firmware version info DMUB firmware info is printed before it gets initialized. Correct this order to ensure true value is conveyed. Signed-off-by: Shirish S Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c4152b297d56d3696ad0a9003169bc5b98ad7b72 Author: Qingqing Zhuo Date: Thu Jul 22 14:48:54 2021 -0400 drm/amd/display: workaround for hard hang on HPD on native DP [Why] HPD disable and enable sequences are not mutually exclusive on Linux. For HPDs that spans over 1s (i.e. HPD low = 1s), part of the disable sequence (specifically, a request to SMU to lower refclk) could come right before the call to PHY enable, causing DMUB to access an unresponsive PHY and thus a hard hang on the system. [How] Disable 48mhz refclk off on native DP. Reviewed-by: Hersen Wu Acked-by: Aurabindo Pillai Signed-off-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit d5c5ac3a7bca35261eb599204cbf1efee0af22cc Author: Jude Shih Date: Tue Jul 6 18:04:11 2021 +0800 drm/amd/display: Fix resetting DCN3.1 HW when resuming from S4 [Why] On S4 resume we also need to fix detection of when to reload DMCUB firmware because we're currently using the VBIOS version which isn't compatible with the driver version. [How] Update the hardware init check for DCN31 since it's the ASIC that has this issue. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Jude Shih Signed-off-by: Alex Deucher commit cd7b0531a61811429e7907c875e864ab918f3e62 Author: Bing Guo Date: Tue Jul 20 15:13:38 2021 -0400 drm/amd/display: Increase stutter watermark for dcn303 [Why&How] Hardware team suggested to use SRExitTime= 35.5us as w/a to prevent underflow in certain modes. Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Bing Guo Signed-off-by: Alex Deucher commit 06050a0f01dbac2ca33145ef19a72041206ea983 Author: Bing Guo Date: Mon Jul 19 18:24:06 2021 -0400 drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X Why: In DCN2x, HW doesn't automatically divide MASTER_UPDATE_LOCK_DB_X by the number of pipes ODM Combined. How: Set MASTER_UPDATE_LOCK_DB_X to the value that is adjusted by the number of pipes ODM Combined. Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Bing Guo Signed-off-by: Alex Deucher commit ffb9ee8eb272ba2b5a7325e69bb98118869637db Author: Wesley Chalmers Date: Mon Jul 19 13:13:33 2021 -0400 drm/amd/display: Assume LTTPR interop for DCN31+ [WHY] For DCN31 onward, LTTPR is to be enabled and set to Transparent by VBIOS. Driver is to assume that VBIOS has done this without needing to check the VBIOS interop bit. [HOW] Add LTTPR enable and interop VBIOS bits into dc->caps, and force-set the interop bit to true for DCN31+. Reviewed-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Wesley Chalmers Signed-off-by: Alex Deucher commit 5706cb3c910cc8283f344bc37a889a8d523a2c6d Author: Randy Dunlap Date: Thu Jul 29 20:03:47 2021 -0700 drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP is set/enabled. OTOH, when both SUSPEND and HIBERNATION are not set, PM_SLEEP is not set, so this variable cannot be used. ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’: ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error: ‘pm_suspend_target_state’ undeclared (first use in this function); did you mean ‘__KSYM_pm_suspend_target_state’? return pm_suspend_target_state == PM_SUSPEND_TO_IDLE; ^~~~~~~~~~~~~~~~~~~~~~~ __KSYM_pm_suspend_target_state Also use shorter IS_ENABLED(CONFIG_foo) notation for checking the 2 config symbols. Fixes: 91e273712ab8dd ("drm/amdgpu: Check pmops for desired suspend state") Signed-off-by: Randy Dunlap Cc: Alex Deucher Cc: Christian König Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-next@vger.kernel.org Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 23c0ebac20de19e3f54e5e81f4c3fa0caf2f8395 Author: Xiaomeng Hou Date: Thu Jul 29 15:44:39 2021 +0800 drm/amd/pm: update yellow carp pmfw interface version Correct yellow carp driver-PMFW interface version to v4. Signed-off-by: Xiaomeng Hou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 231264d6927f6740af36855a622d0e240be9d94c Author: Mathieu Desnoyers Date: Thu Aug 5 09:27:16 2021 -0400 tracepoint: Fix static call function vs data state mismatch On a 1->0->1 callbacks transition, there is an issue with the new callback using the old callback's data. Considering __DO_TRACE_CALL: do { \ struct tracepoint_func *it_func_ptr; \ void *__data; \ it_func_ptr = \ rcu_dereference_raw((&__tracepoint_##name)->funcs); \ if (it_func_ptr) { \ __data = (it_func_ptr)->data; \ ----> [ delayed here on one CPU (e.g. vcpu preempted by the host) ] static_call(tp_func_##name)(__data, args); \ } \ } while (0) It has loaded the tp->funcs of the old callback, so it will try to use the old data. This can be fixed by adding a RCU sync anywhere in the 1->0->1 transition chain. On a N->2->1 transition, we need an rcu-sync because you may have a sequence of 3->2->1 (or 1->2->1) where the element 0 data is unchanged between 2->1, but was changed from 3->2 (or from 1->2), which may be observed by the static call. This can be fixed by adding an unconditional RCU sync in transition 2->1. Note, this fixes a correctness issue at the cost of adding a tremendous performance regression to the disabling of tracepoints. Before this commit: # trace-cmd start -e all # time trace-cmd start -p nop real 0m0.778s user 0m0.000s sys 0m0.061s After this commit: # trace-cmd start -e all # time trace-cmd start -p nop real 0m10.593s user 0m0.017s sys 0m0.259s A follow up fix will introduce a more lightweight scheme based on RCU get_state and cond_sync, that will return the performance back to what it was. As both this change and the lightweight versions are complex on their own, for bisecting any issues that this may cause, they are kept as two separate changes. Link: https://lkml.kernel.org/r/20210805132717.23813-3-mathieu.desnoyers@efficios.com Link: https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/ Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andrew Morton Cc: "Paul E. McKenney" Cc: Stefan Metzmacher Fixes: d25e37d89dd2 ("tracepoint: Optimize using static_call()") Signed-off-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit f7ec4121256393e1d03274acdca73eb18958f27e Author: Mathieu Desnoyers Date: Thu Aug 5 09:27:15 2021 -0400 tracepoint: static call: Compare data on transition from 2->1 callees On transition from 2->1 callees, we should be comparing .data rather than .func, because the same callback can be registered twice with different data, and what we care about here is that the data of array element 0 is unchanged to skip rcu sync. Link: https://lkml.kernel.org/r/20210805132717.23813-2-mathieu.desnoyers@efficios.com Link: https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/ Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Andrew Morton Cc: "Paul E. McKenney" Cc: Stefan Metzmacher Fixes: 547305a64632 ("tracepoint: Fix out of sync data passing by static caller") Signed-off-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit 902e7f373fff2476b53824264c12e4e76c7ec02a Merge: e04480920d1ee 6bb5318ce501c Author: Linus Torvalds Date: Thu Aug 5 12:26:00 2021 -0700 Merge tag 'net-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from ipsec. Current release - regressions: - sched: taprio: fix init procedure to avoid inf loop when dumping - sctp: move the active_key update after sh_keys is added Current release - new code bugs: - sparx5: fix build with old GCC & bitmask on 32-bit targets Previous releases - regressions: - xfrm: redo the PREEMPT_RT RCU vs hash_resize_mutex deadlock fix - xfrm: fixes for the compat netlink attribute translator - phy: micrel: Fix detection of ksz87xx switch Previous releases - always broken: - gro: set inner transport header offset in tcp/udp GRO hook to avoid crashes when such packets reach GSO - vsock: handle VIRTIO_VSOCK_OP_CREDIT_REQUEST, as required by spec - dsa: sja1105: fix static FDB entries on SJA1105P/Q/R/S and SJA1110 - bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry - usb: lan78xx: don't modify phy_device state concurrently - usb: pegasus: check for errors of IO routines" * tag 'net-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (48 commits) net: vxge: fix use-after-free in vxge_device_unregister net: fec: fix use-after-free in fec_drv_remove net: pegasus: fix uninit-value in get_interrupt_interval net: ethernet: ti: am65-cpsw: fix crash in am65_cpsw_port_offload_fwd_mark_update() bnx2x: fix an error code in bnx2x_nic_load() net: wwan: iosm: fix recursive lock acquire in unregister net: wwan: iosm: correct data protocol mask bit net: wwan: iosm: endianness type correction net: wwan: iosm: fix lkp buildbot warning net: usb: lan78xx: don't modify phy_device state concurrently docs: networking: netdevsim rules net: usb: pegasus: Remove the changelog and DRIVER_VERSION. net: usb: pegasus: Check the return value of get_geristers() and friends; net/prestera: Fix devlink groups leakage in error flow net: sched: fix lockdep_set_class() typo error for sch->seqlock net: dsa: qca: ar9331: reorder MDIO write sequence VSOCK: handle VIRTIO_VSOCK_OP_CREDIT_REQUEST mptcp: drop unused rcu member in mptcp_pm_addr_entry net: ipv6: fix returned variable type in ip6_skb_dst_mtu nfp: update ethtool reporting of pauseframe control ... commit 0395be967b067d99494113d78470574e86a02ed4 Author: Apurva Nandan Date: Fri Jul 16 23:25:03 2021 +0000 spi: cadence-quadspi: Fix check condition for DTR ops buswidth and dtr fields in spi_mem_op are only valid when the corresponding spi_mem_op phase has a non-zero length. For example, SPI NAND core doesn't set buswidth when using SPI_MEM_OP_NO_ADDR phase. Fix the dtr checks in set_protocol() and suppports_mem_op() to ignore empty spi_mem_op phases, as checking for dtr field in empty phase will result in false negatives. Signed-off-by: Apurva Nandan Link: https://lore.kernel.org/r/20210716232504.182-3-a-nandan@ti.com Signed-off-by: Mark Brown commit e5ada3f6787a4d6234adc6f2f3ae35c6d5b71ba0 Author: Richard Fitzgerald Date: Thu Aug 5 17:11:07 2021 +0100 ASoC: cs42l42: Fix mono playback I2S always has two LRCLK phases and both CH1 and CH2 of the RX must be enabled (corresponding to the low and high phases of LRCLK.) The selection of the valid data channels is done by setting the DAC CHA_SEL and CHB_SEL. CHA_SEL is always the first (left) channel, CHB_SEL depends on the number of active channels. Previously for mono ASP CH2 was not enabled, the result was playing mono data would not produce any audio output. Signed-off-by: Richard Fitzgerald Fixes: 621d65f3b868 ("ASoC: cs42l42: Provide finer control on playback path") Link: https://lore.kernel.org/r/20210805161111.10410-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 3a5d89a9c6fe306d35dce4496abbb464c1454da0 Author: Richard Fitzgerald Date: Thu Aug 5 17:11:06 2021 +0100 ASoC: cs42l42: Constrain sample rate to prevent illegal SCLK The lowest valid SCLK corresponds to 44.1 kHz at 16-bit. Sample rates less than this would produce SCLK below the minimum when using a normal I2S frame. A constraint must be applied to prevent this. The constraint is not applied if the machine driver sets SCLK, to allow setups where the host generates additional bits per LRCLK phase to increase the SCLK frequency. In these cases the machine driver would always have to inform this driver of the actual SCLK, and it must select a legal SCLK. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20210805161111.10410-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 0c2f2ad4f16a58879463d0979a54293f8f296d6f Author: Richard Fitzgerald Date: Thu Aug 5 17:11:05 2021 +0100 ASoC: cs42l42: Fix LRCLK frame start edge An I2S frame starts on the falling edge of LRCLK so ASP_STP must be 0. At the same time, move other format settings in the same register from cs42l42_pll_config() to cs42l42_set_dai_fmt() where you'd expect to find them, and merge into a single write. Signed-off-by: Richard Fitzgerald Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/20210805161111.10410-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit f1040e86f83b0f7d5f45724500a6a441731ff4b7 Author: Richard Fitzgerald Date: Thu Aug 5 17:11:04 2021 +0100 ASoC: cs42l42: PLL must be running when changing MCLK_SRC_SEL Both SCLK and PLL clocks must be running to drive the glitch-free mux behind MCLK_SRC_SEL and complete the switchover. This patch moves the writing of MCLK_SRC_SEL to when the PLL is started and stopped, so that it only transitions while the PLL is running. The unconditional write MCLK_SRC_SEL=0 in cs42l42_mute_stream() is safe because if the PLL is not running MCLK_SRC_SEL is already 0. Signed-off-by: Richard Fitzgerald Fixes: 43fc357199f9 ("ASoC: cs42l42: Set clock source for both ways of stream") Link: https://lore.kernel.org/r/20210805161111.10410-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit e04480920d1eec9c061841399aa6f35b6f987d8b Author: Tetsuo Handa Date: Wed Aug 4 19:26:56 2021 +0900 Bluetooth: defer cleanup of resources in hci_unregister_dev() syzbot is hitting might_sleep() warning at hci_sock_dev_event() due to calling lock_sock() with rw spinlock held [1]. It seems that history of this locking problem is a trial and error. Commit b40df5743ee8 ("[PATCH] bluetooth: fix socket locking in hci_sock_dev_event()") in 2.6.21-rc4 changed bh_lock_sock() to lock_sock() as an attempt to fix lockdep warning. Then, commit 4ce61d1c7a8e ("[BLUETOOTH]: Fix locking in hci_sock_dev_event().") in 2.6.22-rc2 changed lock_sock() to local_bh_disable() + bh_lock_sock_nested() as an attempt to fix the sleep in atomic context warning. Then, commit 4b5dd696f81b ("Bluetooth: Remove local_bh_disable() from hci_sock.c") in 3.3-rc1 removed local_bh_disable(). Then, commit e305509e678b ("Bluetooth: use correct lock to prevent UAF of hdev object") in 5.13-rc5 again changed bh_lock_sock_nested() to lock_sock() as an attempt to fix CVE-2021-3573. This difficulty comes from current implementation that hci_sock_dev_event(HCI_DEV_UNREG) is responsible for dropping all references from sockets because hci_unregister_dev() immediately reclaims resources as soon as returning from hci_sock_dev_event(HCI_DEV_UNREG). But the history suggests that hci_sock_dev_event(HCI_DEV_UNREG) was not doing what it should do. Therefore, instead of trying to detach sockets from device, let's accept not detaching sockets from device at hci_sock_dev_event(HCI_DEV_UNREG), by moving actual cleanup of resources from hci_unregister_dev() to hci_cleanup_dev() which is called by bt_host_release() when all references to this unregistered device (which is a kobject) are gone. Since hci_sock_dev_event(HCI_DEV_UNREG) no longer resets hci_pi(sk)->hdev, we need to check whether this device was unregistered and return an error based on HCI_UNREGISTER flag. There might be subtle behavioral difference in "monitor the hdev" functionality; please report if you found something went wrong due to this patch. Link: https://syzkaller.appspot.com/bug?extid=a5df189917e79d5e59c9 [1] Reported-by: syzbot Suggested-by: Linus Torvalds Signed-off-by: Tetsuo Handa Fixes: e305509e678b ("Bluetooth: use correct lock to prevent UAF of hdev object") Acked-by: Luiz Augusto von Dentz Signed-off-by: Linus Torvalds commit 0b53abfc5f66449d42fb1738c1c191e29e3be2e4 Merge: 6209049ecfc18 4c156084daa8e Author: Linus Torvalds Date: Thu Aug 5 12:06:31 2021 -0700 Merge tag 'selinux-pr-20210805' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "One small SELinux fix for a problem where an error code was not being propagated back up to userspace when a bogus SELinux policy is loaded into the kernel" * tag 'selinux-pr-20210805' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: correct the return value when loads initial sids commit 6209049ecfc1894453d1fc850e60c58d4eccaf2a Merge: 3c3e9027071c9 345daff2e994e Author: Linus Torvalds Date: Thu Aug 5 12:00:00 2021 -0700 Merge branch 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull ucounts fix from Eric Biederman: "Fix a subtle locking versus reference counting bug in the ucount changes, found by syzbot" * 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ucounts: Fix race condition between alloc_ucounts and put_ucounts commit 3c3e9027071c979cfa7e48d9c2a39a4d56829236 Merge: 130951bbc61f5 51397dc6f283b Author: Linus Torvalds Date: Thu Aug 5 11:53:34 2021 -0700 Merge tag 'trace-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various tracing fixes: - Fix NULL pointer dereference caused by an error path - Give histogram calculation fields a size, otherwise it breaks synthetic creation based on them. - Reject strings being used for number calculations. - Fix recordmcount.pl warning on llvm building RISC-V allmodconfig - Fix the draw_functrace.py script to handle the new trace output - Fix warning of smp_processor_id() in preemptible code" * tag 'trace-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Quiet smp_processor_id() use in preemptable warning in hwlat scripts/tracing: fix the bug that can't parse raw_trace_func scripts/recordmcount.pl: Remove check_objcopy() and $can_use_local tracing: Reject string operand in the histogram expression tracing / histogram: Give calculation hist_fields a size tracing: Fix NULL pointer dereference in start_creating commit 130951bbc61f59133ed04e244db25a63edc6935f Merge: 97fcc07be81d4 ecd92e2167c30 Author: Linus Torvalds Date: Thu Aug 5 11:46:24 2021 -0700 Merge tag 's390-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - fix zstd build for -march=z900 (undefined reference to __clzdi2) - add missing .got.plts to vdso linker scripts to fix kpatch build errors - update defconfigs * tag 's390-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: update defconfigs s390/boot: fix zstd build for -march=z900 s390/vdso: add .got.plt in vdso linker script commit 97fcc07be81d4f49e1763483144ca7ff79fe0ad5 Merge: 611ffd8acc4b0 d5aaad6f83420 Author: Linus Torvalds Date: Thu Aug 5 11:23:09 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Mostly bugfixes; plus, support for XMM arguments to Hyper-V hypercalls now obeys KVM_CAP_HYPERV_ENFORCE_CPUID. Both the XMM arguments feature and KVM_CAP_HYPERV_ENFORCE_CPUID are new in 5.14, and each did not know of the other" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86/mmu: Fix per-cpu counter corruption on 32-bit builds KVM: selftests: fix hyperv_clock test KVM: SVM: improve the code readability for ASID management KVM: SVM: Fix off-by-one indexing when nullifying last used SEV VMCB KVM: Do not leak memory for duplicate debugfs directories KVM: selftests: Test access to XMM fast hypercalls KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall input KVM: x86: Introduce trace_kvm_hv_hypercall_done() KVM: x86: hyper-v: Check access to hypercall before reading XMM registers KVM: x86: accept userspace interrupt only if no event is injected commit 611ffd8acc4b06e606325ca727c891ce70adcaa6 Merge: 46c4c9d1beb7f e39cdacf2f664 Author: Linus Torvalds Date: Thu Aug 5 11:16:02 2021 -0700 Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull pcmcia fix from Dominik Brodowski: "Zheyu Ma found and fixed a null pointer dereference bug in the device driver for the i82092 card reader" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: i82092: fix a null pointer dereference bug commit 2e9fb2c11e0ec3113fcf0e8e052c99ecd82fcd4e Author: Bart Van Assche Date: Thu Aug 5 10:34:47 2021 -0700 block/partitions/ldm.c: Fix a kernel-doc warning Fix the following kernel-doc warning that appears when building with W=1: block/partitions/ldm.c:31: warning: expecting prototype for ldm(). Prototype was for ldm_debug() instead Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210805173447.3249906-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 7d3fc01796fc895e5fcce45c994c5a8db8120a8d Author: Shyam Prasad N Date: Wed Aug 4 18:37:22 2021 +0000 cifs: create sd context must be a multiple of 8 We used to follow the rule earlier that the create SD context always be a multiple of 8. However, with the change: cifs: refactor create_sd_buf() and and avoid corrupting the buffer ...we recompute the length, and we failed that rule. Fixing that with this change. Cc: # v5.10+ Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 46c4c9d1beb7f5b4cec4dd90e7728720583ee348 Author: Alex Xu (Hello71) Date: Thu Aug 5 10:40:47 2021 -0400 pipe: increase minimum default pipe size to 2 pages This program always prints 4096 and hangs before the patch, and always prints 8192 and exits successfully after: int main() { int pipefd[2]; for (int i = 0; i < 1025; i++) if (pipe(pipefd) == -1) return 1; size_t bufsz = fcntl(pipefd[1], F_GETPIPE_SZ); printf("%zd\n", bufsz); char *buf = calloc(bufsz, 1); write(pipefd[1], buf, bufsz); read(pipefd[0], buf, bufsz-1); write(pipefd[1], buf, 1); } Note that you may need to increase your RLIMIT_NOFILE before running the program. Fixes: 759c01142a ("pipe: limit the per-user amount of pages allocated in pipes") Cc: Link: https://lore.kernel.org/lkml/1628086770.5rn8p04n6j.none@localhost/ Link: https://lore.kernel.org/lkml/1628127094.lxxn016tj7.none@localhost/ Signed-off-by: Alex Xu (Hello71) Signed-off-by: Linus Torvalds commit 8d75d0eff6887bcac7225e12b9c75595e523d92d Author: Yu Kuai Date: Thu Aug 5 20:46:45 2021 +0800 blk-iolatency: error out if blk_get_queue() failed in iolatency_set_limit() If queue is dying while iolatency_set_limit() is in progress, blk_get_queue() won't increment the refcount of the queue. However, blk_put_queue() will still decrement the refcount later, which will cause the refcout to be unbalanced. Thus error out in such case to fix the problem. Fixes: 8c772a9bfc7c ("blk-iolatency: fix IO hang due to negative inflight counter") Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20210805124645.543797-1-yukuai3@huawei.com Signed-off-by: Jens Axboe commit d77c95bf9a64d8620662151b2b10efd8221f4bcc Author: Caleb Connolly Date: Tue Jul 20 15:33:38 2021 +0000 arm64: dts: qcom: sdm845-oneplus: fix reserved-mem Fix the upper guard and the "removed_region", this fixes the random crashes which used to occur in memory intensive loads. I'm not sure WHY the upper guard being 0x2000 instead of 0x1000 doesn't fix this, but it HAS to be 0x1000. Fixes: e60fd5ac1f68 ("arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem") Signed-off-by: Caleb Connolly Link: https://lore.kernel.org/r/20210720153125.43389-2-caleb@connolly.tech Signed-off-by: Bjorn Andersson commit 0e5ded926f2a0f8b57dfa7f0d69a30767e1ea2ce Author: Petr Vorel Date: Tue Jun 22 21:10:19 2021 +0200 arm64: dts: qcom: msm8994-angler: Disable cont_splash_mem As the default definition breaks booting angler: [ 1.862561] printk: console [ttyMSM0] enabled [ 1.872260] msm_serial: driver initialized D - 15524 - pm_driver_init, Delta cont_splash_mem was introduced in 74d6d0a145835, but the problem manifested after commit '86588296acbf ("fdt: Properly handle "no-map" field in the memory region")'. Disabling it because Angler's firmware does not report where the memory is allocated (dmesg from downstream kernel): [ 0.000000] cma: Found cont_splash_mem@0, memory base 0x0000000000000000, size 16 MiB, limit 0x0000000000000000 [ 0.000000] cma: CMA: reserved 16 MiB at 0x0000000000000000 for cont_splash_mem Similar issue might be on Google Nexus 5X (lg-bullhead). Other MSM8992/4 are known to report correct address. Fixes: 74d6d0a145835 ("arm64: dts: qcom: msm8994/8994-kitakami: Fix up the memory map") Suggested-by: Konrad Dybcio Signed-off-by: Petr Vorel Link: https://lore.kernel.org/r/20210622191019.23771-1-petr.vorel@gmail.com Signed-off-by: Bjorn Andersson commit 6bb5318ce501cb744e58105ba56cd5308e75004d Merge: af35fc37354cd 942e560a3d386 Author: Jakub Kicinski Date: Thu Aug 5 07:29:55 2021 -0700 Merge branch 'net-fix-use-after-free-bugs' Pavel Skripkin says: ==================== net: fix use-after-free bugs I've added new checker to smatch yesterday. It warns about using netdev_priv() pointer after free_{netdev,candev}() call. I hope, it will get into next smatch release. Some of the reported bugs are fixed and upstreamed already, but Dan ran new smatch with allmodconfig and found 2 more. Big thanks to Dan for doing it, because I totally forgot to do it. ==================== Link: https://lore.kernel.org/r/cover.1628091954.git.paskripkin@gmail.com Signed-off-by: Jakub Kicinski commit 942e560a3d3862dd5dee1411dbdd7097d29b8416 Author: Pavel Skripkin Date: Wed Aug 4 18:52:20 2021 +0300 net: vxge: fix use-after-free in vxge_device_unregister Smatch says: drivers/net/ethernet/neterion/vxge/vxge-main.c:3518 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); drivers/net/ethernet/neterion/vxge/vxge-main.c:3518 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); drivers/net/ethernet/neterion/vxge/vxge-main.c:3520 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); drivers/net/ethernet/neterion/vxge/vxge-main.c:3520 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); Since vdev pointer is netdev private data accessing it after free_netdev() call can cause use-after-free bug. Fix it by moving free_netdev() call at the end of the function Fixes: 6cca200362b4 ("vxge: cleanup probe error paths") Reported-by: Dan Carpenter Signed-off-by: Pavel Skripkin Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 44712965bf12ae1758cec4de53816ed4b914ca1a Author: Pavel Skripkin Date: Wed Aug 4 18:51:51 2021 +0300 net: fec: fix use-after-free in fec_drv_remove Smatch says: drivers/net/ethernet/freescale/fec_main.c:3994 fec_drv_remove() error: Using fep after free_{netdev,candev}(ndev); drivers/net/ethernet/freescale/fec_main.c:3995 fec_drv_remove() error: Using fep after free_{netdev,candev}(ndev); Since fep pointer is netdev private data, accessing it after free_netdev() call can cause use-after-free bug. Fix it by moving free_netdev() call at the end of the function Reported-by: Dan Carpenter Fixes: a31eda65ba21 ("net: fec: fix clock count mis-match") Signed-off-by: Pavel Skripkin Reviewed-by: Joakim Zhang Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit af35fc37354cda3c9c8cc4961b1d24bdc9d27903 Author: Pavel Skripkin Date: Wed Aug 4 17:30:05 2021 +0300 net: pegasus: fix uninit-value in get_interrupt_interval Syzbot reported uninit value pegasus_probe(). The problem was in missing error handling. get_interrupt_interval() internally calls read_eprom_word() which can fail in some cases. For example: failed to receive usb control message. These cases should be handled to prevent uninit value bug, since read_eprom_word() will not initialize passed stack variable in case of internal failure. Fail log: BUG: KMSAN: uninit-value in get_interrupt_interval drivers/net/usb/pegasus.c:746 [inline] BUG: KMSAN: uninit-value in pegasus_probe+0x10e7/0x4080 drivers/net/usb/pegasus.c:1152 CPU: 1 PID: 825 Comm: kworker/1:1 Not tainted 5.12.0-rc6-syzkaller #0 ... Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x24c/0x2e0 lib/dump_stack.c:120 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x5c/0xa0 mm/kmsan/kmsan_instr.c:197 get_interrupt_interval drivers/net/usb/pegasus.c:746 [inline] pegasus_probe+0x10e7/0x4080 drivers/net/usb/pegasus.c:1152 .... Local variable ----data.i@pegasus_probe created at: get_interrupt_interval drivers/net/usb/pegasus.c:1151 [inline] pegasus_probe+0xe57/0x4080 drivers/net/usb/pegasus.c:1152 get_interrupt_interval drivers/net/usb/pegasus.c:1151 [inline] pegasus_probe+0xe57/0x4080 drivers/net/usb/pegasus.c:1152 Reported-and-tested-by: syzbot+02c9f70f3afae308464a@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/20210804143005.439-1-paskripkin@gmail.com Signed-off-by: Jakub Kicinski commit 51397dc6f283bb570e1cf8226017d300d8ea1f5b Author: Steven Rostedt (VMware) Date: Wed Aug 4 14:18:48 2021 -0400 tracing: Quiet smp_processor_id() use in preemptable warning in hwlat The hardware latency detector (hwlat) has a mode that it runs one thread across CPUs. The logic to move from the currently running CPU to the next one in the list does a smp_processor_id() to find where it currently is. Unfortunately, it's done with preemption enabled, and this triggers a warning for using smp_processor_id() in a preempt enabled section. As it is only using smp_processor_id() to get information on where it currently is in order to simply move it to the next CPU, it doesn't really care if it got moved in the mean time. It will simply balance out later if such a case arises. Switch smp_processor_id() to raw_smp_processor_id() to quiet that warning. Link: https://lkml.kernel.org/r/20210804141848.79edadc0@oasis.local.home Acked-by: Daniel Bristot de Oliveira Fixes: 8fa826b7344d ("trace/hwlat: Implement the mode config option") Signed-off-by: Steven Rostedt (VMware) commit ae03d189bae306e1e00aa631feee090ebda6cf63 Author: Grygorii Strashko Date: Thu Aug 5 13:14:09 2021 +0300 net: ethernet: ti: am65-cpsw: fix crash in am65_cpsw_port_offload_fwd_mark_update() The am65_cpsw_port_offload_fwd_mark_update() causes NULL exception crash when there is at least one disabled port and any other port added to the bridge first time. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000858 pc : am65_cpsw_port_offload_fwd_mark_update+0x54/0x68 lr : am65_cpsw_netdevice_event+0x8c/0xf0 Call trace: am65_cpsw_port_offload_fwd_mark_update+0x54/0x68 notifier_call_chain+0x54/0x98 raw_notifier_call_chain+0x14/0x20 call_netdevice_notifiers_info+0x34/0x78 __netdev_upper_dev_link+0x1c8/0x290 netdev_master_upper_dev_link+0x1c/0x28 br_add_if+0x3f0/0x6d0 [bridge] Fix it by adding proper check for port->ndev != NULL. Fixes: 2934db9bcb30 ("net: ti: am65-cpsw-nuss: Add netdevice notifiers") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit fb653827c758725b149b5c924a5eb50ab4812750 Author: Dan Carpenter Date: Thu Aug 5 13:38:26 2021 +0300 bnx2x: fix an error code in bnx2x_nic_load() Set the error code if bnx2x_alloc_fw_stats_mem() fails. The current code returns success. Fixes: ad5afc89365e ("bnx2x: Separate VF and PF logic") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 14ccc638b02f9ec500c17d9e39efe979145a4b61 Author: Masahiro Yamada Date: Thu Jul 29 09:12:54 2021 +0900 kbuild: cancel sub_make_done for the install target to fix DKMS Since commit bcf637f54f6d ("kbuild: parse C= and M= before changing the working directory"), external module builds invoked by DKMS fail because M= option is not parsed. I wanted to add 'unset sub_make_done' in install.sh but similar scripts, arch/*/boot/install.sh, are duplicated, so I set sub_make_done empty in the top Makefile. Fixes: bcf637f54f6d ("kbuild: parse C= and M= before changing the working directory") Reported-by: John S Gruber Signed-off-by: Masahiro Yamada Tested-by: John S Gruber commit 54eacba0e3bbda9777788b44b45a5186918569f2 Author: Randy Dunlap Date: Mon Jul 26 19:57:37 2021 -0700 scripts: checkversion: modernize linux/version.h search strings Update scripts/checkversion.pl to recognize the current contents of and both of its current locations. Also update my email address. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit 28bbbb9875a35975904e46f9b06fa689d051b290 Author: H. Nikolaus Schaller Date: Thu Jul 8 10:57:10 2021 +0200 mips: Fix non-POSIX regexp When cross compiling a MIPS kernel on a BSD based HOSTCC leads to errors like SYNC include/config/auto.conf.cmd - due to: .config egrep: empty (sub)expression UPD include/config/kernel.release HOSTCC scripts/dtc/dtc.o - due to target missing It turns out that egrep uses this egrep pattern: (|MINOR_|PATCHLEVEL_) This is not valid syntax or gives undefined results according to POSIX 9.5.3 ERE Grammar https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html It seems to be silently accepted by the Linux egrep implementation while a BSD host complains. Such patterns can be replaced by a transformation like "(|p1|p2)" -> "(p1|p2)?" Fixes: 48c35b2d245f ("[MIPS] There is no __GNUC_MAJOR__") Signed-off-by: H. Nikolaus Schaller Signed-off-by: Masahiro Yamada commit fa953adfad7cf9c7e30d9ea0e4ccfd38cfb5495d Author: H. Nikolaus Schaller Date: Thu Jul 8 10:57:09 2021 +0200 x86/tools/relocs: Fix non-POSIX regexp Trying to run a cross-compiled x86 relocs tool on a BSD based HOSTCC leads to errors like VOFFSET arch/x86/boot/compressed/../voffset.h - due to: vmlinux CC arch/x86/boot/compressed/misc.o - due to: arch/x86/boot/compressed/../voffset.h OBJCOPY arch/x86/boot/compressed/vmlinux.bin - due to: vmlinux RELOCS arch/x86/boot/compressed/vmlinux.relocs - due to: vmlinux empty (sub)expressionarch/x86/boot/compressed/Makefile:118: recipe for target 'arch/x86/boot/compressed/vmlinux.relocs' failed make[3]: *** [arch/x86/boot/compressed/vmlinux.relocs] Error 1 It turns out that relocs.c uses patterns like "something(|_end)" This is not valid syntax or gives undefined results according to POSIX 9.5.3 ERE Grammar https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html It seems to be silently accepted by the Linux regexp() implementation while a BSD host complains. Such patterns can be replaced by a transformation like "(|p1|p2)" -> "(p1|p2)?" Fixes: fd952815307f ("x86-32, relocs: Whitelist more symbols for ld bug workaround") Signed-off-by: H. Nikolaus Schaller Signed-off-by: Masahiro Yamada commit afa00d3f5800a83228311636fc69fd28fb7af205 Merge: 6b67d4d63edec 679505baaaabe Author: David S. Miller Date: Thu Aug 5 11:28:56 2021 +0100 Merge branch 'eean-iosm-fixes' M Chetan Kumar says: ==================== net: wwan: iosm: fixes This patch series contains IOSM Driver fixes. Below is the patch series breakdown. PATCH1: * Correct the td buffer type casting & format specifier to fix lkp buildbot warning. PATCH2: * Endianness type correction for nr_of_bytes. This field is exchanged as part of host-device protocol communication. PATCH3: * Correct ul/dl data protocol mask bit to know which protocol capability does device implement. PATCH4: * Calling unregister_netdevice() inside wwan del link is trying to acquire the held lock in ndo_stop_cb(). Instead, queue net dev to be unregistered later. ==================== Signed-off-by: David S. Miller commit 679505baaaabed98359c1dfb78f81600e299af21 Author: M Chetan Kumar Date: Wed Aug 4 21:39:52 2021 +0530 net: wwan: iosm: fix recursive lock acquire in unregister Calling unregister_netdevice() inside wwan del link is trying to acquire the held lock in ndo_stop_cb(). Instead, queue net dev to be unregistered later. Signed-off-by: M Chetan Kumar Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit c98f5220e9703db2d73b4e89c07879dc61eeab14 Author: M Chetan Kumar Date: Wed Aug 4 21:39:51 2021 +0530 net: wwan: iosm: correct data protocol mask bit Correct ul/dl data protocol mask bit to know which protocol capability does device implement. Signed-off-by: M Chetan Kumar Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit b46c5795d641b759eb0f001ab21852fe5df5ef92 Author: M Chetan Kumar Date: Wed Aug 4 21:39:50 2021 +0530 net: wwan: iosm: endianness type correction Endianness type correction for nr_of_bytes. This field is exchanged as part of host-device protocol communication. Signed-off-by: M Chetan Kumar Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 5a7c1b2a5bb4461967b15f3484a0ff75d3199719 Author: M Chetan Kumar Date: Wed Aug 4 21:39:49 2021 +0530 net: wwan: iosm: fix lkp buildbot warning Correct td buffer type casting & format specifier to fix lkp buildbot warning. Reported-by: kernel test robot Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 43ad944cd73f2360ec8ff31d29ea44830b3119af Author: Kyle Tso Date: Tue Aug 3 17:13:14 2021 +0800 usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events When receiving FRS and Sourcing_Vbus events from low-level drivers, keep other events which come a bit earlier so that they will not be ignored in the event handler. Fixes: 8dc4bd073663 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)") Cc: stable Cc: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Reviewed-by: Badhri Jagan Sridharan Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210803091314.3051302-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 6aa32467299e9e12280a6aec9dbc21bf2db830b0 Author: Huang Pei Date: Wed Jul 21 17:30:45 2021 +0800 MIPS: check return value of pgtable_pmd_page_ctor +. According to Documentation/vm/split_page_table_lock, handle failure of pgtable_pmd_page_ctor +. Use GFP_KERNEL_ACCOUNT instead of GFP_KERNEL|__GFP_ACCOUNT +. Adjust coding style Fixes: ed914d48b6a1 ("MIPS: add PMD table accounting into MIPS') Reported-by: Joshua Kinard Signed-off-by: Huang Pei Reviewed-by: Joshua Kinard Signed-off-by: Thomas Bogendoerfer commit cb10f68ad8150f243964b19391711aaac5e8ff42 Author: Wesley Cheng Date: Tue Aug 3 23:24:05 2021 -0700 usb: dwc3: gadget: Avoid runtime resume if disabling pullup If the device is already in the runtime suspended state, any call to the pullup routine will issue a runtime resume on the DWC3 core device. If the USB gadget is disabling the pullup, then avoid having to issue a runtime resume, as DWC3 gadget has already been halted/stopped. This fixes an issue where the following condition occurs: usb_gadget_remove_driver() -->usb_gadget_disconnect() -->dwc3_gadget_pullup(0) -->pm_runtime_get_sync() -> ret = 0 -->pm_runtime_put() [async] -->usb_gadget_udc_stop() -->dwc3_gadget_stop() -->dwc->gadget_driver = NULL ... dwc3_suspend_common() -->dwc3_gadget_suspend() -->DWC3 halt/stop routine skipped, driver_data == NULL This leads to a situation where the DWC3 gadget is not properly stopped, as the runtime resume would have re-enabled EP0 and event interrupts, and since we avoided the DWC3 gadget suspend, these resources were never disabled. Fixes: 77adb8bdf422 ("usb: dwc3: gadget: Allow runtime suspend if UDC unbinded") Cc: stable Acked-by: Felipe Balbi Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1628058245-30692-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit d25d85061bd856d6be221626605319154f9b5043 Author: Wesley Cheng Date: Thu Jul 29 00:33:14 2021 -0700 usb: dwc3: gadget: Use list_replace_init() before traversing lists The list_for_each_entry_safe() macro saves the current item (n) and the item after (n+1), so that n can be safely removed without corrupting the list. However, when traversing the list and removing items using gadget giveback, the DWC3 lock is briefly released, allowing other routines to execute. There is a situation where, while items are being removed from the cancelled_list using dwc3_gadget_ep_cleanup_cancelled_requests(), the pullup disable routine is running in parallel (due to UDC unbind). As the cleanup routine removes n, and the pullup disable removes n+1, once the cleanup retakes the DWC3 lock, it references a request who was already removed/handled. With list debug enabled, this leads to a panic. Ensure all instances of the macro are replaced where gadget giveback is used. Example call stack: Thread#1: __dwc3_gadget_ep_set_halt() - CLEAR HALT -> dwc3_gadget_ep_cleanup_cancelled_requests() ->list_for_each_entry_safe() ->dwc3_gadget_giveback(n) ->dwc3_gadget_del_and_unmap_request()- n deleted[cancelled_list] ->spin_unlock ->Thread#2 executes ... ->dwc3_gadget_giveback(n+1) ->Already removed! Thread#2: dwc3_gadget_pullup() ->waiting for dwc3 spin_lock ... ->Thread#1 released lock ->dwc3_stop_active_transfers() ->dwc3_remove_requests() ->fetches n+1 item from cancelled_list (n removed by Thread#1) ->dwc3_gadget_giveback() ->dwc3_gadget_del_and_unmap_request()- n+1 deleted[cancelled_list] ->spin_unlock Fix this condition by utilizing list_replace_init(), and traversing through a local copy of the current elements in the endpoint lists. This will also set the parent list as empty, so if another thread is also looping through the list, it will be empty on the next iteration. Fixes: d4f1afe5e896 ("usb: dwc3: gadget: move requests to cancelled_list") Cc: stable Acked-by: Felipe Balbi Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1627543994-20327-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit b47b0b6d0843d665f263762382bfbd658f436d84 Merge: a154c43b95e86 8da0e55c7988e Author: Greg Kroah-Hartman Date: Thu Aug 5 10:53:28 2021 +0200 Merge tag 'usb-serial-5.14-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.14-rc5 Here are two type-detection regression fixes for pl2303 and a patch to increase the receive buffer size for for ch341 to avoid lost characters at high line speeds. Included are also some new device ids. All but the last three commits have been in linux-next and with no reported issues. * tag 'usb-serial-5.14-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 USB: serial: pl2303: fix GT type detection USB: serial: option: add Telit FD980 composition 0x1056 USB: serial: pl2303: fix HX type detection USB: serial: ch341: fix character loss at high transfer rates commit 8da0e55c7988ef9f08a708c38e5c75ecd8862cf8 Author: David Bauer Date: Thu Aug 5 01:25:22 2021 +0200 USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 The Auto-M3 OP-COM v2 is a OBD diagnostic device using a FTD232 for the USB connection. Signed-off-by: David Bauer Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit d5aaad6f83420efb8357ac8e11c868708b22d0a9 Author: Sean Christopherson Date: Wed Aug 4 14:46:09 2021 -0700 KVM: x86/mmu: Fix per-cpu counter corruption on 32-bit builds Take a signed 'long' instead of an 'unsigned long' for the number of pages to add/subtract to the total number of pages used by the MMU. This fixes a zero-extension bug on 32-bit kernels that effectively corrupts the per-cpu counter used by the shrinker. Per-cpu counters take a signed 64-bit value on both 32-bit and 64-bit kernels, whereas kvm_mod_used_mmu_pages() takes an unsigned long and thus an unsigned 32-bit value on 32-bit kernels. As a result, the value used to adjust the per-cpu counter is zero-extended (unsigned -> signed), not sign-extended (signed -> signed), and so KVM's intended -1 gets morphed to 4294967295 and effectively corrupts the counter. This was found by a staggering amount of sheer dumb luck when running kvm-unit-tests on a 32-bit KVM build. The shrinker just happened to kick in while running tests and do_shrink_slab() logged an error about trying to free a negative number of objects. The truly lucky part is that the kernel just happened to be a slightly stale build, as the shrinker no longer yells about negative objects as of commit 18bb473e5031 ("mm: vmscan: shrink deferred objects proportional to priority"). vmscan: shrink_slab: mmu_shrink_scan+0x0/0x210 [kvm] negative objects to delete nr=-858993460 Fixes: bc8a3d8925a8 ("kvm: mmu: Fix overflow on kvm mmu page limit calculation") Cc: stable@vger.kernel.org Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210804214609.1096003-1-seanjc@google.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 5d79e5ce5489b489cbc4c327305be9dfca0fc9ce Author: Thara Gopinath Date: Wed Aug 4 16:34:20 2021 -0400 cpufreq: blocklist Qualcomm sm8150 in cpufreq-dt-platdev The Qualcomm sm8150 platform uses the qcom-cpufreq-hw driver, so add it to the cpufreq-dt-platdev driver's blocklist. Signed-off-by: Thara Gopinath Reviewed-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit cc396d27d8d5884bbb555efd7783b9e9e2b41dc2 Merge: 402e0b8cd0028 5ba03936c0558 Author: Jens Axboe Date: Wed Aug 4 15:49:57 2021 -0600 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.14 * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid10: properly indicate failure when ending a failed write request commit 1c0cec64a7cc545eb49f374a43e9f7190a14defa Author: Hui Su Date: Fri Jun 11 10:21:07 2021 +0800 scripts/tracing: fix the bug that can't parse raw_trace_func Since commit 77271ce4b2c0 ("tracing: Add irq, preempt-count and need resched info to default trace output"), the default trace output format has been changed to: -0 [009] d.h. 22420.068695: _raw_spin_lock_irqsave <-hrtimer_interrupt -0 [000] ..s. 22420.068695: _nohz_idle_balance <-run_rebalance_domains -0 [011] d.h. 22420.068695: account_process_tick <-update_process_times origin trace output format:(before v3.2.0) # tracer: nop # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | migration/0-6 [000] 50.025810: rcu_note_context_switch <-__schedule migration/0-6 [000] 50.025812: trace_rcu_utilization <-rcu_note_context_switch migration/0-6 [000] 50.025813: rcu_sched_qs <-rcu_note_context_switch migration/0-6 [000] 50.025815: rcu_preempt_qs <-rcu_note_context_switch migration/0-6 [000] 50.025817: trace_rcu_utilization <-rcu_note_context_switch migration/0-6 [000] 50.025818: debug_lockdep_rcu_enabled <-__schedule migration/0-6 [000] 50.025820: debug_lockdep_rcu_enabled <-__schedule The draw_functrace.py(introduced in v2.6.28) can't parse the new version format trace_func, So we need modify draw_functrace.py to adapt the new version trace output format. Link: https://lkml.kernel.org/r/20210611022107.608787-1-suhui@zeku.com Cc: stable@vger.kernel.org Fixes: 77271ce4b2c0 tracing: Add irq, preempt-count and need resched info to default trace output Signed-off-by: Hui Su Signed-off-by: Steven Rostedt (VMware) commit b18b851ba85a5855cb53865fcff3cd2c17b44b0b Author: Nathan Chancellor Date: Mon Aug 2 14:03:07 2021 -0700 scripts/recordmcount.pl: Remove check_objcopy() and $can_use_local When building ARCH=riscv allmodconfig with llvm-objcopy, the objcopy version warning from this script appears: WARNING: could not find objcopy version or version is less than 2.17. Local function references are disabled. The check_objcopy() function in scripts/recordmcount.pl is set up to parse GNU objcopy's version string, not llvm-objcopy's, which triggers the warning. Commit 799c43415442 ("kbuild: thin archives make default for all archs") made binutils 2.20 mandatory and commit ba64beb17493 ("kbuild: check the minimum assembler version in Kconfig") enforces this at configuration time so just remove check_objcopy() and $can_use_local instead, assuming --globalize-symbol is always available. llvm-objcopy has supported --globalize-symbol since LLVM 7.0.0 in 2018 and the minimum version for building the kernel with LLVM is 10.0.1 so there is no issue introduced: Link: https://github.com/llvm/llvm-project/commit/ee5be798dae30d5f9414b01f76ff807edbc881aa Link: https://lkml.kernel.org/r/20210802210307.3202472-1-nathan@kernel.org Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Steven Rostedt (VMware) commit a9d10ca4986571bffc19778742d508cc8dd13e02 Author: Masami Hiramatsu Date: Wed Jul 28 07:55:43 2021 +0900 tracing: Reject string operand in the histogram expression Since the string type can not be the target of the addition / subtraction operation, it must be rejected. Without this fix, the string type silently converted to digits. Link: https://lkml.kernel.org/r/162742654278.290973.1523000673366456634.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 100719dcef447 ("tracing: Add simple expression support to hist triggers") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 2c05caa7ba8803209769b9e4fe02c38d77ae88d0 Author: Steven Rostedt (VMware) Date: Fri Jul 30 17:19:51 2021 -0400 tracing / histogram: Give calculation hist_fields a size When working on my user space applications, I found a bug in the synthetic event code where the automated synthetic event field was not matching the event field calculation it was attached to. Looking deeper into it, it was because the calculation hist_field was not given a size. The synthetic event fields are matched to their hist_fields either by having the field have an identical string type, or if that does not match, then the size and signed values are used to match the fields. The problem arose when I tried to match a calculation where the fields were "unsigned int". My tool created a synthetic event of type "u32". But it failed to match. The string was: diff=field1-field2:onmatch(event).trace(synth,$diff) Adding debugging into the kernel, I found that the size of "diff" was 0. And since it was given "unsigned int" as a type, the histogram fallback code used size and signed. The signed matched, but the size of u32 (4) did not match zero, and the event failed to be created. This can be worse if the field you want to match is not one of the acceptable fields for a synthetic event. As event fields can have any type that is supported in Linux, this can cause an issue. For example, if a type is an enum. Then there's no way to use that with any calculations. Have the calculation field simply take on the size of what it is calculating. Link: https://lkml.kernel.org/r/20210730171951.59c7743f@oasis.local.home Cc: Tom Zanussi Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Ingo Molnar Cc: Andrew Morton Cc: stable@vger.kernel.org Fixes: 100719dcef447 ("tracing: Add simple expression support to hist triggers") Signed-off-by: Steven Rostedt (VMware) commit a07296453bf2778952a09b6244a695bf7607babb Author: Randy Dunlap Date: Wed Aug 4 13:41:47 2021 -0700 drm/i915: fix i915_globals_exit() section mismatch error Fix modpost Section mismatch error in i915_globals_exit(). Since both an __init function and an __exit function can call i915_globals_exit(), any function that i915_globals_exit() calls should not be marked as __init or __exit. I.e., it needs to be available for either of them. WARNING: modpost: vmlinux.o(.text+0x8b796a): Section mismatch in reference from the function i915_globals_exit() to the function .exit.text:__i915_globals_flush() The function i915_globals_exit() references a function in an exit section. Often the function __i915_globals_flush() has valid usage outside the exit section and the fix is to remove the __exit annotation of __i915_globals_flush. ERROR: modpost: Section mismatches detected. Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. Fixes: 1354d830cb8f ("drm/i915: Call i915_globals_exit() if pci_register_device() fails") Signed-off-by: Randy Dunlap Cc: Jason Ekstrand Cc: Daniel Vetter Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Joonas Lahtinen Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20210804204147.2070-1-rdunlap@infradead.org commit 5bde522e474a73129681f63cea195fcbfe28c283 Merge: e8a1ca91c83c4 1354d830cb8f9 Author: Dave Airlie Date: Thu Aug 5 06:46:51 2021 +1000 Merge tag 'drm-intel-fixes-2021-08-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Call i915_globals_exit if pci_register_device fails (Jason) - Correct SFC_DONE register offset (Matt) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YQrdDGLsInSI+N7T@intel.com commit e8a1ca91c83c415977850eb7b1d20b3407bf4717 Merge: c500bee1c5b2f e89afb51f97ae Author: Dave Airlie Date: Thu Aug 5 06:37:32 2021 +1000 Merge tag 'drm-misc-fixes-2021-08-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * kmb: DMA fix; Add macros for driver date/version * vmwgfx: Fix I/O memory access on 64-bit systems Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YQrXzTmPpiuWsqSA@linux-uq9g.fritz.box commit 83d6c39310b6d11199179f6384c2b0a415389597 Author: Jens Axboe Date: Tue Aug 3 09:14:35 2021 -0600 io-wq: fix race between worker exiting and activating free worker Nadav correctly reports that we have a race between a worker exiting, and new work being queued. This can lead to work being queued behind an existing worker that could be sleeping on an event before it can run to completion, and hence introducing potential big latency gaps if we hit this race condition: cpu0 cpu1 ---- ---- io_wqe_worker() schedule_timeout() // timed out io_wqe_enqueue() io_wqe_wake_worker() // work_flags & IO_WQ_WORK_CONCURRENT io_wqe_activate_free_worker() io_worker_exit() Fix this by having the exiting worker go through the normal decrement of a running worker, which will spawn a new one if needed. The free worker activation is modified to only return success if we were able to find a sleeping worker - if not, we keep looking through the list. If we fail, we create a new worker as per usual. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/io-uring/BFF746C0-FEDE-4646-A253-3021C57C26C9@gmail.com/ Reported-by: Nadav Amit Tested-by: Nadav Amit Signed-off-by: Jens Axboe commit 251a1524293d0a90c4d5060f65f42a3016280049 Merge: 0c2e31d2bd432 f0f82e2476f6a Author: Linus Torvalds Date: Wed Aug 4 12:41:30 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Seven fixes, five in drivers. The two core changes are a trivial warning removal in scsi_scan.c and a change to rescan for capacity when a device makes a user induced (via a write to the state variable) offline->running transition to fix issues with device mapper" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: core: Fix capacity set to zero after offlinining device scsi: sr: Return correct event when media event code is 3 scsi: ibmvfc: Fix command state accounting and stale response detection scsi: core: Avoid printing an error if target_alloc() returns -ENXIO scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach() scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry() scsi: pm80xx: Fix TMF task completion race condition commit 0c2e31d2bd432147f348f024e40779fa4d0dc2b9 Merge: d5ad8ec3cfb56 9b87f43537acf Author: Linus Torvalds Date: Wed Aug 4 12:31:53 2021 -0700 Merge tag 'gpio-updates-for-v5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - revert a patch intruducing breakage in interrupt handling in gpio-mpc8xxx - correctly handle missing IRQs in gpio-tqmx86 by really making them optional * tag 'gpio-updates-for-v5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: tqmx86: really make IRQ optional Revert "gpio: mpc8xxx: change the gpio interrupt flags." commit 8434ffe71c874b9c4e184b88d25de98c2bf5fe3f Author: Jeff Layton Date: Tue Aug 3 12:47:34 2021 -0400 ceph: take snap_empty_lock atomically with snaprealm refcount change There is a race in ceph_put_snap_realm. The change to the nref and the spinlock acquisition are not done atomically, so you could decrement nref, and before you take the spinlock, the nref is incremented again. At that point, you end up putting it on the empty list when it shouldn't be there. Eventually __cleanup_empty_realms runs and frees it when it's still in-use. Fix this by protecting the 1->0 transition with atomic_dec_and_lock, and just drop the spinlock if we can get the rwsem. Because these objects can also undergo a 0->1 refcount transition, we must protect that change as well with the spinlock. Increment locklessly unless the value is at 0, in which case we take the spinlock, increment and then take it off the empty list if it did the 0->1 transition. With these changes, I'm removing the dout() messages from these functions, as well as in __put_snap_realm. They've always been racy, and it's better to not print values that may be misleading. Cc: stable@vger.kernel.org URL: https://tracker.ceph.com/issues/46419 Reported-by: Mark Nelson Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit bf2ba432213fade50dd39f2e348085b758c0726e Author: Luis Henriques Date: Tue Jul 6 14:52:41 2021 +0100 ceph: reduce contention in ceph_check_delayed_caps() Function ceph_check_delayed_caps() is called from the mdsc->delayed_work workqueue and it can be kept looping for quite some time if caps keep being added back to the mdsc->cap_delay_list. This may result in the watchdog tainting the kernel with the softlockup flag. This patch breaks this loop if the caps have been recently (i.e. during the loop execution). Any new caps added to the list will be handled in the next run. Also, allow schedule_delayed() callers to explicitly set the delay value instead of defaulting to 5s, so we can ensure that it runs soon afterward if it looks like there is more work. Cc: stable@vger.kernel.org URL: https://tracker.ceph.com/issues/46284 Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 402e0b8cd00284a25c6eb8c0a43319bc8430b1c7 Author: Christoph Hellwig Date: Wed Aug 4 11:49:58 2021 +0200 n64cart: fix the dma address in n64cart_do_bvec dma_map_bvec already takes bv_offset into account. Fixes: 9b2a2bbbb4d0 ("block: Add n64 cart driver") Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2f658f7a3953f6d70bab90e117aff8d0ad44e200 Author: Andy Shevchenko Date: Wed Aug 4 14:21:41 2021 +0300 pinctrl: tigerlake: Fix GPIO mapping for newer version of software The software mapping for GPIO, which initially comes from Microsoft, is subject to change by respective Windows and firmware developers. Due to the above the driver had been written and published way ahead of the schedule, and thus the numbering schema used in it is outdated. Fix the numbering schema in accordance with the real products on market. Fixes: 653d96455e1e ("pinctrl: tigerlake: Add support for Tiger Lake-H") Reported-and-tested-by: Kai-Heng Feng Reported-by: Riccardo Mori Reported-and-tested-by: Lovesh BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213463 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213579 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213857 Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 952835edb4fdad49361d5330da918be8b765b787 Author: Stefan Haberland Date: Wed Aug 4 17:18:00 2021 +0200 s390/dasd: fix use after free in dasd path handling When new configuration data is obtained after a path event it is stored in the per path array. The old data needs to be freed. The first valid configuration data is also referenced in the device private structure to identify the device. When the old per path configuration data was freed the device still pointed to the already freed data leading to a use after free. Fix by replacing also the device configuration data with the newly obtained one before the old data gets freed. Fixes: 460181217a24 ("s390/dasd: Store path configuration data during path handling") Cc: stable@vger.kernel.org # 5.11+ Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Link: https://lore.kernel.org/r/20210804151800.4031761-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 13c2c3cfe01952575b1dd5e24d450fcccff93bc0 Author: Maxim Levitsky Date: Wed Aug 4 14:20:57 2021 +0300 KVM: selftests: fix hyperv_clock test The test was mistakenly using addr_gpa2hva on a gva and that happened to work accidentally. Commit 106a2e766eae ("KVM: selftests: Lower the min virtual address for misc page allocations") revealed this bug. Fixes: 2c7f76b4c42b ("selftests: kvm: Add basic Hyper-V clocksources tests", 2021-03-18) Signed-off-by: Maxim Levitsky Message-Id: <20210804112057.409498-1-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit bb2baeb214a71cda47d50dce80414016117ddda0 Author: Mingwei Zhang Date: Mon Aug 2 11:09:03 2021 -0700 KVM: SVM: improve the code readability for ASID management KVM SEV code uses bitmaps to manage ASID states. ASID 0 was always skipped because it is never used by VM. Thus, in existing code, ASID value and its bitmap postion always has an 'offset-by-1' relationship. Both SEV and SEV-ES shares the ASID space, thus KVM uses a dynamic range [min_asid, max_asid] to handle SEV and SEV-ES ASIDs separately. Existing code mixes the usage of ASID value and its bitmap position by using the same variable called 'min_asid'. Fix the min_asid usage: ensure that its usage is consistent with its name; allocate extra size for ASID 0 to ensure that each ASID has the same value with its bitmap position. Add comments on ASID bitmap allocation to clarify the size change. Signed-off-by: Mingwei Zhang Cc: Tom Lendacky Cc: Marc Orr Cc: David Rientjes Cc: Alper Gun Cc: Dionna Glaze Cc: Sean Christopherson Cc: Vipin Sharma Cc: Peter Gonda Cc: Joerg Roedel Message-Id: <20210802180903.159381-1-mizhang@google.com> [Fix up sev_asid_free to also index by ASID, as suggested by Sean Christopherson, and use nr_asids in sev_cpu_init. - Paolo] Signed-off-by: Paolo Bonzini commit df51fe7ea1c1c2c3bfdb81279712fdd2e4ea6c27 Author: Like Xu Date: Mon Aug 2 15:08:50 2021 +0800 perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest If we use "perf record" in an AMD Milan guest, dmesg reports a #GP warning from an unchecked MSR access error on MSR_F15H_PERF_CTLx: [] unchecked MSR access error: WRMSR to 0xc0010200 (tried to write 0x0000020000110076) at rIP: 0xffffffff8106ddb4 (native_write_msr+0x4/0x20) [] Call Trace: [] amd_pmu_disable_event+0x22/0x90 [] x86_pmu_stop+0x4c/0xa0 [] x86_pmu_del+0x3a/0x140 The AMD64_EVENTSEL_HOSTONLY bit is defined and used on the host, while the guest perf driver should avoid such use. Fixes: 1018faa6cf23 ("perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled") Signed-off-by: Like Xu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Liam Merwick Tested-by: Kim Phillips Tested-by: Liam Merwick Link: https://lkml.kernel.org/r/20210802070850.35295-1-likexu@tencent.com commit f4b4b45652578357031fbbef7f7a1b04f6fa2dc3 Author: Peter Zijlstra Date: Thu Jul 29 11:14:57 2021 +0200 perf/x86: Fix out of bound MSR access On Wed, Jul 28, 2021 at 12:49:43PM -0400, Vince Weaver wrote: > [32694.087403] unchecked MSR access error: WRMSR to 0x318 (tried to write 0x0000000000000000) at rIP: 0xffffffff8106f854 (native_write_msr+0x4/0x20) > [32694.101374] Call Trace: > [32694.103974] perf_clear_dirty_counters+0x86/0x100 The problem being that it doesn't filter out all fake counters, in specific the above (erroneously) tries to use FIXED_BTS. Limit the fixed counters indexes to the hardware supplied number. Reported-by: Vince Weaver Signed-off-by: Peter Zijlstra (Intel) Tested-by: Vince Weaver Tested-by: Like Xu Link: https://lkml.kernel.org/r/YQJxka3dxgdIdebG@hirez.programming.kicks-ass.net commit f558c2b834ec27e75d37b1c860c139e7b7c3a8e4 Author: Peter Zijlstra Date: Tue Aug 3 12:45:01 2021 +0200 sched/rt: Fix double enqueue caused by rt_effective_prio Double enqueues in rt runqueues (list) have been reported while running a simple test that spawns a number of threads doing a short sleep/run pattern while being concurrently setscheduled between rt and fair class. WARNING: CPU: 3 PID: 2825 at kernel/sched/rt.c:1294 enqueue_task_rt+0x355/0x360 CPU: 3 PID: 2825 Comm: setsched__13 RIP: 0010:enqueue_task_rt+0x355/0x360 Call Trace: __sched_setscheduler+0x581/0x9d0 _sched_setscheduler+0x63/0xa0 do_sched_setscheduler+0xa0/0x150 __x64_sys_sched_setscheduler+0x1a/0x30 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae list_add double add: new=ffff9867cb629b40, prev=ffff9867cb629b40, next=ffff98679fc67ca0. kernel BUG at lib/list_debug.c:31! invalid opcode: 0000 [#1] PREEMPT_RT SMP PTI CPU: 3 PID: 2825 Comm: setsched__13 RIP: 0010:__list_add_valid+0x41/0x50 Call Trace: enqueue_task_rt+0x291/0x360 __sched_setscheduler+0x581/0x9d0 _sched_setscheduler+0x63/0xa0 do_sched_setscheduler+0xa0/0x150 __x64_sys_sched_setscheduler+0x1a/0x30 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae __sched_setscheduler() uses rt_effective_prio() to handle proper queuing of priority boosted tasks that are setscheduled while being boosted. rt_effective_prio() is however called twice per each __sched_setscheduler() call: first directly by __sched_setscheduler() before dequeuing the task and then by __setscheduler() to actually do the priority change. If the priority of the pi_top_task is concurrently being changed however, it might happen that the two calls return different results. If, for example, the first call returned the same rt priority the task was running at and the second one a fair priority, the task won't be removed by the rt list (on_list still set) and then enqueued in the fair runqueue. When eventually setscheduled back to rt it will be seen as enqueued already and the WARNING/BUG be issued. Fix this by calling rt_effective_prio() only once and then reusing the return value. While at it refactor code as well for clarity. Concurrent priority inheritance handling is still safe and will eventually converge to a new state by following the inheritance chain(s). Fixes: 0782e63bc6fe ("sched: Handle priority boosted tasks proper in setscheduler()") [squashed Peterz changes; added changelog] Reported-by: Mark Simmons Signed-off-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210803104501.38333-1-juri.lelli@redhat.com commit 6b67d4d63edece1033972214704c04f36c5be89a Author: Ivan T. Ivanov Date: Wed Aug 4 11:13:39 2021 +0300 net: usb: lan78xx: don't modify phy_device state concurrently Currently phy_device state could be left in inconsistent state shown by following alert message[1]. This is because phy_read_status could be called concurrently from lan78xx_delayedwork, phy_state_machine and __ethtool_get_link. Fix this by making sure that phy_device state is updated atomically. [1] lan78xx 1-1.1.1:1.0 eth0: No phy led trigger registered for speed(-1) Signed-off-by: Ivan T. Ivanov Signed-off-by: David S. Miller commit 396492b4c5f249f616002bb5de787d060d2b2974 Author: Jakub Kicinski Date: Tue Aug 3 16:14:15 2021 -0700 docs: networking: netdevsim rules There are aspects of netdevsim which are commonly misunderstood and pointed out in review. Cong suggest we document them. Suggested-by: Cong Wang Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 67b13f3e221ed81b46a657e2b499bf8b20162476 Author: Shaik Sajida Bhanu Date: Fri Jul 16 17:16:14 2021 +0530 mmc: sdhci-msm: Update the software timeout value for sdhc Whenever SDHC run at clock rate 50MHZ or below, the hardware data timeout value will be 21.47secs, which is approx. 22secs and we have a current software timeout value as 10secs. We have to set software timeout value more than the hardware data timeout value to avioid seeing the below register dumps. [ 332.953670] mmc2: Timeout waiting for hardware interrupt. [ 332.959608] mmc2: sdhci: ============ SDHCI REGISTER DUMP =========== [ 332.966450] mmc2: sdhci: Sys addr: 0x00000000 | Version: 0x00007202 [ 332.973256] mmc2: sdhci: Blk size: 0x00000200 | Blk cnt: 0x00000001 [ 332.980054] mmc2: sdhci: Argument: 0x00000000 | Trn mode: 0x00000027 [ 332.986864] mmc2: sdhci: Present: 0x01f801f6 | Host ctl: 0x0000001f [ 332.993671] mmc2: sdhci: Power: 0x00000001 | Blk gap: 0x00000000 [ 333.000583] mmc2: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007 [ 333.007386] mmc2: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000 [ 333.014182] mmc2: sdhci: Int enab: 0x03ff100b | Sig enab: 0x03ff100b [ 333.020976] mmc2: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000 [ 333.027771] mmc2: sdhci: Caps: 0x322dc8b2 | Caps_1: 0x0000808f [ 333.034561] mmc2: sdhci: Cmd: 0x0000183a | Max curr: 0x00000000 [ 333.041359] mmc2: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0x00000000 [ 333.048157] mmc2: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000 [ 333.054945] mmc2: sdhci: Host ctl2: 0x00000000 [ 333.059657] mmc2: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000000ffffff218 [ 333.067178] mmc2: sdhci_msm: ----------- VENDOR REGISTER DUMP ----------- [ 333.074343] mmc2: sdhci_msm: DLL sts: 0x00000000 | DLL cfg: 0x6000642c | DLL cfg2: 0x0020a000 [ 333.083417] mmc2: sdhci_msm: DLL cfg3: 0x00000000 | DLL usr ctl: 0x00000000 | DDR cfg: 0x80040873 [ 333.092850] mmc2: sdhci_msm: Vndr func: 0x00008a9c | Vndr func2 : 0xf88218a8 Vndr func3: 0x02626040 [ 333.102371] mmc2: sdhci: ============================================ So, set software timeout value more than hardware timeout value. Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1626435974-14462-1-git-send-email-sbhanu@codeaurora.org Signed-off-by: Ulf Hansson commit d8e193f13b07e6c0ffaa1a999386f1989f2b4c5e Author: Christophe Kerello Date: Thu Jul 1 16:33:53 2021 +0200 mmc: mmci: stm32: Check when the voltage switch procedure should be done If the card has not been power cycled, it may still be using 1.8V signaling. This situation is detected in mmc_sd_init_card function and should be handled in mmci stm32 variant. The host->pwr_reg variable is also correctly protected with spin locks. Fixes: 94b94a93e355 ("mmc: mmci_sdmmc: Implement signal voltage callbacks") Signed-off-by: Christophe Kerello Signed-off-by: Yann Gautier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210701143353.13188-1-yann.gautier@foss.st.com Signed-off-by: Ulf Hansson commit 25f8203b4be1937c4939bb98623e67dcfd7da4d1 Author: Vincent Whitchurch Date: Wed Jun 30 12:22:32 2021 +0200 mmc: dw_mmc: Fix hang on data CRC error When a Data CRC interrupt is received, the driver disables the DMA, then sends the stop/abort command and then waits for Data Transfer Over. However, sometimes, when a data CRC error is received in the middle of a multi-block write transfer, the Data Transfer Over interrupt is never received, and the driver hangs and never completes the request. The driver sets the BMOD.SWR bit (SDMMC_IDMAC_SWRESET) when stopping the DMA, but according to the manual CMD.STOP_ABORT_CMD should be programmed "before assertion of SWR". Do these operations in the recommended order. With this change the Data Transfer Over is always received correctly in my tests. Signed-off-by: Vincent Whitchurch Reviewed-by: Jaehoon Chung Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210630102232.16011-1-vincent.whitchurch@axis.com Signed-off-by: Ulf Hansson commit 179c6c27bf487273652efc99acd3ba512a23c137 Author: Sean Christopherson Date: Tue Aug 3 09:27:46 2021 -0700 KVM: SVM: Fix off-by-one indexing when nullifying last used SEV VMCB Use the raw ASID, not ASID-1, when nullifying the last used VMCB when freeing an SEV ASID. The consumer, pre_sev_run(), indexes the array by the raw ASID, thus KVM could get a false negative when checking for a different VMCB if KVM manages to reallocate the same ASID+VMCB combo for a new VM. Note, this cannot cause a functional issue _in the current code_, as pre_sev_run() also checks which pCPU last did VMRUN for the vCPU, and last_vmentry_cpu is initialized to -1 during vCPU creation, i.e. is guaranteed to mismatch on the first VMRUN. However, prior to commit 8a14fe4f0c54 ("kvm: x86: Move last_cpu into kvm_vcpu_arch as last_vmentry_cpu"), SVM tracked pCPU on its own and zero-initialized the last_cpu variable. Thus it's theoretically possible that older versions of KVM could miss a TLB flush if the first VMRUN is on pCPU0 and the ASID and VMCB exactly match those of a prior VM. Fixes: 70cd94e60c73 ("KVM: SVM: VMRUN should use associated ASID when SEV is enabled") Cc: Tom Lendacky Cc: Brijesh Singh Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 85cd39af14f498f791d8aab3fbd64cd175787f1a Author: Paolo Bonzini Date: Wed Aug 4 05:28:52 2021 -0400 KVM: Do not leak memory for duplicate debugfs directories KVM creates a debugfs directory for each VM in order to store statistics about the virtual machine. The directory name is built from the process pid and a VM fd. While generally unique, it is possible to keep a file descriptor alive in a way that causes duplicate directories, which manifests as these messages: [ 471.846235] debugfs: Directory '20245-4' with parent 'kvm' already present! Even though this should not happen in practice, it is more or less expected in the case of KVM for testcases that call KVM_CREATE_VM and close the resulting file descriptor repeatedly and in parallel. When this happens, debugfs_create_dir() returns an error but kvm_create_vm_debugfs() goes on to allocate stat data structs which are later leaked. The slow memory leak was spotted by syzkaller, where it caused OOM reports. Since the issue only affects debugfs, do a lookup before calling debugfs_create_dir, so that the message is downgraded and rate-limited. While at it, ensure kvm->debugfs_dentry is NULL rather than an error if it is not created. This fixes kvm_destroy_vm_debugfs, which was not checking IS_ERR_OR_NULL correctly. Cc: stable@vger.kernel.org Fixes: 536a6f88c49d ("KVM: Create debugfs dir and stat files for each VM") Reported-by: Alexey Kardashevskiy Suggested-by: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman Signed-off-by: Paolo Bonzini commit d00551b402015c519d19e1535bf2b5398854b0dd Merge: ff0ee9dfe8a32 480e93e12aa04 Author: David S. Miller Date: Wed Aug 4 10:45:41 2021 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2021-08-04 1) Fix a sysbot reported memory leak in xfrm_user_rcv_msg. From Pavel Skripkin. 2) Revert "xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype". This commit tried to fix a lockin bug, but only cured some of the symptoms. A proper fix is applied on top of this revert. 3) Fix a locking bug on xfrm state hash resize. A recent change on sequence counters accidentally repaced a spinlock by a mutex. Fix from Frederic Weisbecker. 4) Fix possible user-memory-access in xfrm_user_rcv_msg_compat(). From Dmitry Safonov. 5) Add initialiation sefltest fot xfrm_spdattr_type_t. From Dmitry Safonov. ==================== Signed-off-by: David S. Miller commit ff0ee9dfe8a3277b1d2be3bb3e689a1cef01f13e Merge: 13a9c4ac319a2 bc65bacf239d0 Author: David S. Miller Date: Wed Aug 4 10:38:42 2021 +0100 Merge branch 'pegasus-errors' Petko Manolov says: ==================== net: usb: pegasus: better error checking and DRIVER_VERSION removal v3: Pavel Skripkin again: make sure -ETIMEDOUT is returned by __mii_op() on timeout condition; v2: Special thanks to Pavel Skripkin for the review and who caught a few bugs. setup_pegasus_II() would not print an erroneous message on the success path. v1: Add error checking for get_registers() and derivatives. If the usb transfer fail then just don't use the buffer where the legal data should have been returned. Remove DRIVER_VERSION per Greg KH request. ==================== Signed-off-by: David S. Miller commit bc65bacf239d0bc1d00d92cd535a4031921dd78a Author: Petko Manolov Date: Tue Aug 3 20:25:24 2021 +0300 net: usb: pegasus: Remove the changelog and DRIVER_VERSION. These are now deemed redundant. Signed-off-by: Petko Manolov Acked-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 8a160e2e9aeb8318159b48701ad8a6e22274372d Author: Petko Manolov Date: Tue Aug 3 20:25:23 2021 +0300 net: usb: pegasus: Check the return value of get_geristers() and friends; Certain call sites of get_geristers() did not do proper error handling. This could be a problem as get_geristers() typically return the data via pointer to a buffer. If an error occurred the code is carelessly manipulating the wrong data. Signed-off-by: Petko Manolov Reviewed-by: Pavel Skripkin Signed-off-by: David S. Miller commit 3212a99349cee5fb611d3ffcf0e65bc3cd6dcf2f Author: Johan Hovold Date: Wed Aug 4 11:31:00 2021 +0200 USB: serial: pl2303: fix GT type detection At least some PL2303GT have a bcdDevice of 0x305 instead of 0x100 as the datasheet claims. Add it to the list of known release numbers for the HXN (G) type. Fixes: 894758d0571d ("USB: serial: pl2303: tighten type HXN (G) detection") Reported-by: Vasily Khoruzhick Tested-by: Vasily Khoruzhick Cc: stable@vger.kernel.org # 5.13 Link: https://lore.kernel.org/r/20210804093100.24811-1-johan@kernel.org Signed-off-by: Johan Hovold commit 13a9c4ac319a23c792e2e03ac73777b6710132c3 Author: Leon Romanovsky Date: Tue Aug 3 15:00:43 2021 +0300 net/prestera: Fix devlink groups leakage in error flow Devlink trap group is registered but not released in error flow, add the missing devlink_trap_groups_unregister() call. Fixes: 0a9003f45e91 ("net: marvell: prestera: devlink: add traps/groups implementation") Signed-off-by: Leon Romanovsky Signed-off-by: David S. Miller commit 06f5553e0f0c2182268179b93856187d9cb86dd5 Author: Yunsheng Lin Date: Tue Aug 3 18:58:21 2021 +0800 net: sched: fix lockdep_set_class() typo error for sch->seqlock According to comment in qdisc_alloc(), sch->seqlock's lockdep class key should be set to qdisc_tx_busylock, due to possible type error, sch->busylock's lockdep class key is set to qdisc_tx_busylock, which is duplicated because sch->busylock's lockdep class key is already set in qdisc_alloc(). So fix it by replacing sch->busylock with sch->seqlock. Fixes: 96009c7d500e ("sched: replace __QDISC_STATE_RUNNING bit with a spin lock") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 38ea9def5b62f9193f6bad96c5d108e2830ecbde Author: Yajun Deng Date: Thu Jul 29 16:20:21 2021 +0800 netfilter: nf_conntrack_bridge: Fix memory leak when error It should be added kfree_skb_list() when err is not equal to zero in nf_br_ip_fragment(). v2: keep this aligned with IPv6. v3: modify iter.frag_list to iter.frag. Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system") Signed-off-by: Yajun Deng Signed-off-by: Pablo Neira Ayuso commit 5f7b51bf09baca8e4f80cbe879536842bafb5f31 Author: Jozsef Kadlecsik Date: Wed Jul 28 17:01:15 2021 +0200 netfilter: ipset: Limit the maximal range of consecutive elements to add/delete The range size of consecutive elements were not limited. Thus one could define a huge range which may result soft lockup errors due to the long execution time. Now the range size is limited to 2^20 entries. Reported-by: Brad Spengler Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 5648c073c33d33a0a19d0cb1194a4eb88efe2b71 Author: Daniele Palmas Date: Tue Aug 3 21:47:11 2021 +0200 USB: serial: option: add Telit FD980 composition 0x1056 Add the following Telit FD980 composition 0x1056: Cfg #1: mass storage Cfg #2: rndis, tty, adb, tty, tty, tty, tty Signed-off-by: Daniele Palmas Link: https://lore.kernel.org/r/20210803194711.3036-1-dnlplm@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit a18b14d8886614b3c7d290c4cfc33389822b0535 Author: Guenter Roeck Date: Tue Jul 6 09:26:21 2021 -0700 riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled riscv uses the value of TSK_STACK_CANARY to set stack-protector-guard-offset. With GCC_PLUGIN_RANDSTRUCT enabled, that value is non-deterministic, and with riscv:allmodconfig often results in build errors such as cc1: error: '8120' is not a valid offset in '-mstack-protector-guard-offset=' Enable STACKPROTECTOR_PER_TASK only if GCC_PLUGIN_RANDSTRUCT is disabled to fix the problem. Fixes: fea2fed201ee5 ("riscv: Enable per-task stack canaries") Signed-off-by: Guenter Roeck Signed-off-by: Palmer Dabbelt commit d09560435cb712c9ec1e62b8a43a79b0af69fe77 Author: Qiu Wenbo Date: Sun Jul 4 16:34:41 2021 +0800 riscv: dts: fix memory size for the SiFive HiFive Unmatched The production version of HiFive Unmatched have 16GB memory. Signed-off-by: Qiu Wenbo Signed-off-by: Palmer Dabbelt commit f7d635883fb73414c7c4e2648b42adc296c5d40d Author: Lukasz Luba Date: Tue Aug 3 10:07:44 2021 +0100 cpufreq: arm_scmi: Fix error path when allocation failed Stop the initialization when cpumask allocation failed and return an error. Fixes: 80a064dbd556 ("scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM") Signed-off-by: Lukasz Luba Reviewed-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 335ffab3ef864539e814b9a2903b0ae420c1c067 Author: Michał Mirosław Date: Mon Jul 26 10:30:56 2021 +0200 opp: remove WARN when no valid OPPs remain This WARN can be triggered per-core and the stack trace is not useful. Replace it with plain dev_err(). Fix a comment while at it. Signed-off-by: Michał Mirosław Signed-off-by: Viresh Kumar commit 3a715e80400f452b247caa55344f4f60250ffbcf Author: Vineet Gupta Date: Thu Jul 8 17:13:48 2021 -0700 ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch FPU_STATUS register contains FP exception flags bits which are updated by core as side-effect of FP instructions but can also be manually wiggled such as by glibc C99 functions fe{raise,clear,test}except() etc. To effect the update, the programming model requires OR'ing FWE bit (31). This bit is write-only and RAZ, meaning it is effectively auto-cleared after write and thus needs to be set everytime: which is how glibc implements this. However there's another usecase of FPU_STATUS update, at the time of Linux task switch when incoming task value needs to be programmed into the register. This was added as part of f45ba2bd6da0dc ("ARCv2: fpu: preserve userspace fpu state") which missed OR'ing FWE bit, meaning the new value is effectively not being written at all. This patch remedies that. Interestingly, this snafu was not caught in interm glibc testing as the race window which relies on a specific exception bit to be set/clear is really small specially when it nvolves context switch. Fortunately this was caught by glibc's math/test-fenv-tls test which repeatedly set/clear exception flags in a big loop, concurrently in main program and also in a thread. Fixes: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/54 Fixes: f45ba2bd6da0dc ("ARCv2: fpu: preserve userspace fpu state") Cc: stable@vger.kernel.org #5.6+ Signed-off-by: Vineet Gupta commit bf79167fd86f3b97390fe2e70231d383526bd9cc Author: Guenter Roeck Date: Sat Jul 10 07:50:33 2021 -0700 ARC: Fix CONFIG_STACKDEPOT Enabling CONFIG_STACKDEPOT results in the following build error. arc-elf-ld: lib/stackdepot.o: in function `filter_irq_stacks': stackdepot.c:(.text+0x456): undefined reference to `__irqentry_text_start' arc-elf-ld: stackdepot.c:(.text+0x456): undefined reference to `__irqentry_text_start' arc-elf-ld: stackdepot.c:(.text+0x476): undefined reference to `__irqentry_text_end' arc-elf-ld: stackdepot.c:(.text+0x476): undefined reference to `__irqentry_text_end' arc-elf-ld: stackdepot.c:(.text+0x484): undefined reference to `__softirqentry_text_start' arc-elf-ld: stackdepot.c:(.text+0x484): undefined reference to `__softirqentry_text_start' arc-elf-ld: stackdepot.c:(.text+0x48c): undefined reference to `__softirqentry_text_end' arc-elf-ld: stackdepot.c:(.text+0x48c): undefined reference to `__softirqentry_text_end' Other architectures address this problem by adding IRQENTRY_TEXT and SOFTIRQENTRY_TEXT to the text segment, so do the same here. Signed-off-by: Guenter Roeck Signed-off-by: Vineet Gupta commit 81e82fa58098b13af206c8ba4edb690bf5b7d5d5 Author: Colin Ian King Date: Sun Jul 4 10:28:24 2021 +0100 arc: Fix spelling mistake and grammar in Kconfig There is a spelling mistake and incorrect grammar in the Kconfig text. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Vineet Gupta commit d4067395519b40d4ee9b7c26347233e4ae59f900 Author: Jinchao Wang Date: Sat Jun 26 13:58:28 2021 +0800 arc: Prefer unsigned int to bare use of unsigned Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Jinchao Wang Signed-off-by: Vineet Gupta commit d1a58c013a5837451e3213e7a426d350fa524ead Author: Oleksij Rempel Date: Tue Aug 3 08:37:46 2021 +0200 net: dsa: qca: ar9331: reorder MDIO write sequence In case of this switch we work with 32bit registers on top of 16bit bus. Some registers (for example access to forwarding database) have trigger bit on the first 16bit half of request and the result + configuration of request in the second half. Without this patch, we would trigger database operation and overwrite result in one run. To make it work properly, we should do the second part of transfer before the first one is done. So far, this rule seems to work for all registers on this switch. Fixes: ec6698c272de ("net: dsa: add support for Atheros AR9331 built-in switch") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210803063746.3600-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit e3ea110d6e796146920e1be0108464ebcf283ef7 Author: Harshavardhan Unnibhavi Date: Mon Aug 2 19:35:06 2021 +0200 VSOCK: handle VIRTIO_VSOCK_OP_CREDIT_REQUEST The original implementation of the virtio-vsock driver does not handle a VIRTIO_VSOCK_OP_CREDIT_REQUEST as required by the virtio-vsock specification. The vsock device emulated by vhost-vsock and the virtio-vsock driver never uses this request, which was probably why nobody noticed it. However, another implementation of the device may use this request type. Hence, this commit introduces a way to handle an explicit credit request by responding with a corresponding credit update as required by the virtio-vsock specification. Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko") Signed-off-by: Harshavardhan Unnibhavi Reviewed-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20210802173506.2383-1-harshanavkis@gmail.com Signed-off-by: Jakub Kicinski commit abc7285d89ffd089739a1a3059ddd843dd019637 Author: Geliang Tang Date: Mon Aug 2 16:19:14 2021 -0700 mptcp: drop unused rcu member in mptcp_pm_addr_entry kfree_rcu() had been removed from pm_netlink.c, so this rcu field in struct mptcp_pm_addr_entry became useless. Let's drop it. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20210802231914.54709-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 8b353bbeae20e2214c9d9d88bcb2fda4ba145d83 Author: Richard Fitzgerald Date: Tue Aug 3 17:08:34 2021 +0100 ASoC: cs42l42: Remove duplicate control for WNF filter frequency The driver was defining two ALSA controls that both change the same register field for the wind noise filter corner frequency. The filter response has two corners, at different frequencies, and the duplicate controls most likely were an attempt to be able to set the value using either of the frequencies. However, having two controls changing the same field can be problematic and it is unnecessary. Both frequencies are related to each other so setting one implies exactly what the other would be. Removing a control affects user-side code, but there is currently no known use of the removed control so it would be best to remove it now before it becomes a problem. Signed-off-by: Richard Fitzgerald Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/20210803160834.9005-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 30615bd21b4cc3c3bb5ae8bd70e2a915cc5f75c7 Author: Richard Fitzgerald Date: Tue Aug 3 17:08:33 2021 +0100 ASoC: cs42l42: Fix inversion of ADC Notch Switch control The underlying register field has inverted sense (0 = enabled) so the control definition must be marked as inverted. Signed-off-by: Richard Fitzgerald Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/20210803160834.9005-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 8b436a99cd708bd158231a0630ffa49b1d6175e4 Author: Yangyang Li Date: Mon Aug 2 14:56:14 2021 +0800 RDMA/hns: Fix the double unlock problem of poll_sem If hns_roce_cmd_use_events() fails then it means that the poll_sem is not obtained, but the poll_sem is released in hns_roce_cmd_use_polling(), this will cause an unlock problem. This is the static checker warning: drivers/infiniband/hw/hns/hns_roce_main.c:926 hns_roce_init() error: double unlocked '&hr_dev->cmd.poll_sem' (orig line 879) Event mode and polling mode are mutually exclusive and resources are separated, so there is no need to process polling mode resources in event mode. The initial mode of cmd is polling mode, so even if cmd fails to switch to event mode, it is not necessary to switch to polling mode. Fixes: a389d016c030 ("RDMA/hns: Enable all CMDQ context") Fixes: 3d50503b3b33 ("RDMA/hns: Optimize cmd init and mode selection for hip08") Link: https://lore.kernel.org/r/1627887374-20019-1-git-send-email-liangwenpeng@huawei.com Reported-by: Dan Carpenter Signed-off-by: Yangyang Li Signed-off-by: Wenpeng Liang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d5ad8ec3cfb56a017de6a784835666475b4be349 Merge: 785ee9834968b f1de1c7803595 Author: Linus Torvalds Date: Tue Aug 3 09:33:05 2021 -0700 Merge tag 'media/v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - regression fix for the rtl28xxu I2C logic - build fix for the atmel driver - videobuf2-core: dequeue if start_streaming fails * tag 'media/v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: atmel: fix build when ISC=m and XISC=y media: videobuf2-core: dequeue if start_streaming fails media: rtl28xxu: fix zero-length control request media: Revert "media: rtl28xxu: fix zero-length control request" commit 785ee9834968bee3cdb4a7d33e5c51e32d508792 Merge: c500bee1c5b2f f828b0bcacef1 Author: Linus Torvalds Date: Tue Aug 3 09:26:09 2021 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A collection of clk driver fixes and one core clk API fix: - Fix stm32 clk data to avoid a crash early on - Fix a randconfig build error in HiSilicon clk driver - Avoid an oops at boot on Qualcomm MSM8936 SoCs due to an improper consolidation of structs - Fix imbalanced disabling of the unused MMC clock on Tegra210 Jetson Nano - Plug a memory leak in devm_clk_bulk_get_all() unwind path" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: fix leak on devm_clk_bulk_get_all() unwind clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops clk: qcom: smd-rpm: Fix MSM8936 RPM_SMD_PCNOC_A_CLK clk: hisilicon: hi3559a: select RESET_HISI clk: stm32f4: fix post divisor setup for I2S/SAI PLLs commit 6511a8b5b7a65037340cd8ee91a377811effbc83 Author: Rafael J. Wysocki Date: Tue Aug 3 18:14:44 2021 +0200 Revert "ACPICA: Fix memory leak caused by _CID repair function" Revert commit c27bac0314131 ("ACPICA: Fix memory leak caused by _CID repair function") which is reported to cause a boot issue on Acer Swift 3 (SF314-51). Reported-by: Adrien Precigout Signed-off-by: Rafael J. Wysocki commit 19c1eb3605a1bcd784726380f520925948b2962e Merge: a8eee86317f11 353b7a55dcaf5 Author: Arnd Bergmann Date: Tue Aug 3 17:05:35 2021 +0200 Merge tag 'omap-for-v5.14/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omaps for v5.14-rc series Some fixes for regressions and boot issues for various devices: - Fix gpt12 system timer regression on earlier beagleboard revisions - Fix potential NULL pointer access for omap_hwmod_get_pwrdm() - Disable RNG on secure am335x variants as it's not accessible - Fix flakey DCDC2 voltage causing hangs on am43x-epos-evm by reducing i2c0 bus speed for tps65218 - Fix typo for am437x-l4 can@0 node - Fix omap5 regression caused by vdds_1v8_main fixed-regulator * tag 'omap-for-v5.14/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator ARM: dts: am437x-l4: fix typo in can@0 node ARM: dts: am43x-epos-evm: Reduce i2c0 bus speed for tps65218 bus: ti-sysc: AM3: RNG is GP only ARM: omap2+: hwmod: fix potential NULL pointer access bus: ti-sysc: Fix gpt12 system timer issue with reserved status Link: https://lore.kernel.org/r/pull-1627995895-406133@atomide.com Signed-off-by: Arnd Bergmann commit 4adae7dd10db10f20f51833dc11b3cf7a342ad38 Author: Rafael J. Wysocki Date: Fri Jul 30 16:38:52 2021 +0200 cpuidle: teo: Rename two local variables in teo_select() Rename two local variables in teo_select() so that their names better reflect their purpose. No functional impact. Signed-off-by: Rafael J. Wysocki commit c2ec772b87408259cb01209a22fb4e1ae7d346de Author: Rafael J. Wysocki Date: Fri Jul 30 16:38:07 2021 +0200 cpuidle: teo: Fix alternative idle state lookup There are three mistakes in the loop in teo_select() that is looking for an alternative candidate idle state. First, it should walk all of the idle states shallower than the current candidate one, including all of the disabled ones, but it terminates after the first enabled idle state. Second, it should not terminate its last step if idle state 0 is disabled (which is related to the first issue). Finally, it may return the current alternative candidate idle state prematurely if the time span criterion is not met by the idle state under consideration at the moment. To address the issues mentioned above, make the loop in question walk all of the idle states shallower than the current candidate idle state all the way down to idle state 0 and rearrange the checks in it. Fixes: 77577558f25d ("cpuidle: teo: Rework most recent idle duration values treatment") Reported-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Rafael J. Wysocki commit ecd92e2167c30faa18df21e3ec3dbec510ddebaa Author: Heiko Carstens Date: Sat Jul 31 13:13:40 2021 +0200 s390: update defconfigs Signed-off-by: Heiko Carstens commit 6bfc5272904af6873aa6bc7cd5732552f9c6e955 Merge: 232eee380e760 85b1ebfea2b0d Author: Greg Kroah-Hartman Date: Tue Aug 3 14:10:59 2021 +0200 Merge tag 'icc-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v5.14 This contains a few core and driver fixes that have been reported. - core: Fix undersized devres_alloc allocation - core: Zero initial BW after sync-state - core: Always call pre_aggregate before aggregate - qcom: rpmh: Ensure floor BW is enforced for all nodes - qcom: rpmh: Add BCMs to commit list in pre_aggregate Signed-off-by: Georgi Djakov * tag 'icc-5.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: Fix undersized devress_alloc allocation interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes interconnect: Always call pre_aggregate before aggregate interconnect: Zero initial BW after sync-state commit 4039146777a91e1576da2bf38e0d8a1061a1ae47 Author: Antoine Tenart Date: Tue Aug 3 12:00:16 2021 +0200 net: ipv6: fix returned variable type in ip6_skb_dst_mtu The patch fixing the returned value of ip6_skb_dst_mtu (int -> unsigned int) was rebased between its initial review and the version applied. In the meantime fade56410c22 was applied, which added a new variable (int) used as the returned value. This lead to a mismatch between the function prototype and the variable used as the return value. Fixes: 40fc3054b458 ("net: ipv6: fix return value of ip6_skb_dst_mtu") Cc: Vadim Fedorenko Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 9fdc5d85a8fe684cdf24dc31c6bc4a727decfe87 Author: Fei Qin Date: Tue Aug 3 12:39:11 2021 +0200 nfp: update ethtool reporting of pauseframe control Pauseframe control is set to symmetric mode by default on the NFP. Pause frames can not be configured through ethtool now, but ethtool can report the supported mode. Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()") Signed-off-by: Fei Qin Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 0161d151f3e36306219f5aa6f5f6b3877038afd3 Author: Bijie Xu Date: Tue Aug 3 11:40:19 2021 +0200 net: sched: provide missing kdoc for tcf_pkt_info and tcf_ematch_ops Provide missing kdoc of fields of struct tcf_pkt_info and tcf_ematch_ops. Found using ./scripts/kernel-doc -none -Werror include/net/pkt_cls.h Signed-off-by: Bijie Xu Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit c87a4c542b5a796f795fec2b7a909c7d3067b11c Author: Bijie Xu Date: Tue Aug 3 11:40:18 2021 +0200 net: flow_offload: correct comments mismatch with code Correct mismatch between the name of flow_offload_has_one_action() and its kdoc entry. Found using ./scripts/kernel-doc -Werror -none include/net/flow_offload.h Signed-off-by: Bijie Xu Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 97367c97226aab8b298ada954ce12659ee3ad2a4 Author: Takashi Iwai Date: Tue Aug 3 13:43:12 2021 +0200 ALSA: seq: Fix racy deletion of subscriber It turned out that the current implementation of the port subscription is racy. The subscription contains two linked lists, and we have to add to or delete from both lists. Since both connection and disconnection procedures perform the same order for those two lists (i.e. src list, then dest list), when a deletion happens during a connection procedure, the src list may be deleted before the dest list addition completes, and this may lead to a use-after-free or an Oops, even though the access to both lists are protected via mutex. The simple workaround for this race is to change the access order for the disconnection, namely, dest list, then src list. This assures that the connection has been established when disconnecting, and also the concurrent deletion can be avoided. Reported-and-tested-by: folkert Cc: Link: https://lore.kernel.org/r/20210801182754.GP890690@belle.intranet.vanheusden.com Link: https://lore.kernel.org/r/20210803114312.2536-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1354d830cb8f9be966cc07fc61368af27ffb7c4a Author: Jason Ekstrand Date: Wed Jul 21 10:23:54 2021 -0500 drm/i915: Call i915_globals_exit() if pci_register_device() fails In the unlikely event that pci_register_device() fails, we were tearing down our PMU setup but not globals. This leaves a bunch of memory slabs lying around. Signed-off-by: Jason Ekstrand Fixes: 32eb6bcfdda9 ("drm/i915: Make request allocation caches global") [danvet: Fix conflicts against removal of the globals_flush infrastructure.] Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210721152358.2893314-3-jason@jlekstrand.net (cherry picked from commit db484889d1ff0645e07e360d3e3ad306c0515821) Signed-off-by: Rodrigo Vivi [Fixed small conflict while cherry picking] commit 9c9c6d0ab08acfe41c9f7efa72c4ad3f133a266b Author: Matt Roper Date: Wed Jul 28 16:34:11 2021 -0700 drm/i915: Correct SFC_DONE register offset The register offset for SFC_DONE was missing a '0' at the end, causing us to read from a non-existent register address. We only use this register in error state dumps so the mistake hasn't caused any real problems, but fixing it will hopefully make the error state dumps a bit more useful for debugging. Fixes: e50dbdbfd9fb ("drm/i915/tgl: Add SFC instdone to error state") Cc: Mika Kuoppala Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210728233411.2365788-1-matthew.d.roper@intel.com Reviewed-by: Mika Kuoppala (cherry picked from commit 82929a2140eb99f1f1d21855f3f580e70d7abdd8) Signed-off-by: Rodrigo Vivi commit f41e57af926ad840d114439d34cafc0533bf25f0 Author: Arnd Bergmann Date: Mon Aug 2 17:21:53 2021 +0200 net: sparx5: fix bitmask on 32-bit targets I saw the build failure that was fixed in commit 6387f65e2acb ("net: sparx5: fix compiletime_assert for GCC 4.9") and noticed another issue that was introduced in the same patch: Using GENMASK() to create a 64-bit mask does not work on 32-bit architectures. This probably won't ever happen on this driver since it's specific to a 64-bit SoC, but it's better to write it portably, so use GENMASK_ULL() instead. Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit ae954bbc451d267f7d60d7b49db811d5a68ebd7b Author: Xin Long Date: Sun Aug 1 02:25:31 2021 -0400 sctp: move the active_key update after sh_keys is added In commit 58acd1009226 ("sctp: update active_key for asoc when old key is being replaced"), sctp_auth_asoc_init_active_key() is called to update the active_key right after the old key is deleted and before the new key is added, and it caused that the active_key could be found with the key_id. In Ying Xu's testing, the BUG_ON in sctp_auth_asoc_init_active_key() was triggered: [ ] kernel BUG at net/sctp/auth.c:416! [ ] RIP: 0010:sctp_auth_asoc_init_active_key.part.8+0xe7/0xf0 [sctp] [ ] Call Trace: [ ] sctp_auth_set_key+0x16d/0x1b0 [sctp] [ ] sctp_setsockopt.part.33+0x1ba9/0x2bd0 [sctp] [ ] __sys_setsockopt+0xd6/0x1d0 [ ] __x64_sys_setsockopt+0x20/0x30 [ ] do_syscall_64+0x5b/0x1a0 So fix it by moving the active_key update after sh_keys is added. Fixes: 58acd1009226 ("sctp: update active_key for asoc when old key is being replaced") Reported-by: Ying Xu Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 2476b5a1b16ced78a80629da8ff87538d5c95073 Author: Vitaly Kuznetsov Date: Fri Jul 30 14:26:25 2021 +0200 KVM: selftests: Test access to XMM fast hypercalls Check that #UD is raised if bit 16 is clear in HYPERV_CPUID_FEATURES.EDX and an 'XMM fast' hypercall is issued. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Siddharth Chandrasekaran Signed-off-by: Paolo Bonzini Message-Id: <20210730122625.112848-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 4e62aa96d6e55c1b2a4e841f1f8601eae81e81ae Author: Vitaly Kuznetsov Date: Fri Jul 30 14:26:24 2021 +0200 KVM: x86: hyper-v: Check if guest is allowed to use XMM registers for hypercall input TLFS states that "Availability of the XMM fast hypercall interface is indicated via the “Hypervisor Feature Identification” CPUID Leaf (0x40000003, see section 2.4.4) ... Any attempt to use this interface when the hypervisor does not indicate availability will result in a #UD fault." Implement the check for 'strict' mode (KVM_CAP_HYPERV_ENFORCE_CPUID). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Siddharth Chandrasekaran Signed-off-by: Paolo Bonzini Message-Id: <20210730122625.112848-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit f5714bbb5b3120b33dfbf3d81ffc0b98ae4cd4c1 Author: Vitaly Kuznetsov Date: Fri Jul 30 14:26:23 2021 +0200 KVM: x86: Introduce trace_kvm_hv_hypercall_done() Hypercall failures are unusual with potentially far going consequences so it would be useful to see their results when tracing. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Siddharth Chandrasekaran Signed-off-by: Paolo Bonzini Message-Id: <20210730122625.112848-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 2e2f1e8d0450c561c0c936b4b67e8b5a95975fb7 Author: Vitaly Kuznetsov Date: Fri Jul 30 14:26:22 2021 +0200 KVM: x86: hyper-v: Check access to hypercall before reading XMM registers In case guest doesn't have access to the particular hypercall we can avoid reading XMM registers. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Siddharth Chandrasekaran Signed-off-by: Paolo Bonzini Message-Id: <20210730122625.112848-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit ce78ffa3ef1681065ba451cfd545da6126f5ca88 Author: David S. Miller Date: Tue Aug 3 11:14:03 2021 +0100 net: really fix the build... Signed-off-by: David S. Miller commit 0c32706dac1b0a72713184246952ab0f54327c21 Author: Mark Rutland Date: Mon Aug 2 17:48:45 2021 +0100 arm64: stacktrace: avoid tracing arch_stack_walk() When the function_graph tracer is in use, arch_stack_walk() may unwind the stack incorrectly, erroneously reporting itself, missing the final entry which is being traced, and reporting all traced entries between these off-by-one from where they should be. When ftrace hooks a function return, the original return address is saved to the fgraph ret_stack, and the return address in the LR (or the function's frame record) is replaced with `return_to_handler`. When arm64's unwinder encounter frames returning to `return_to_handler`, it finds the associated original return address from the fgraph ret stack, assuming the most recent `ret_to_hander` entry on the stack corresponds to the most recent entry in the fgraph ret stack, and so on. When arch_stack_walk() is used to dump the current task's stack, it starts from the caller of arch_stack_walk(). However, arch_stack_walk() can be traced, and so may push an entry on to the fgraph ret stack, leaving the fgraph ret stack offset by one from the expected position. This can be seen when dumping the stack via /proc/self/stack, where enabling the graph tracer results in an unexpected `stack_trace_save_tsk` entry at the start of the trace, and `el0_svc` missing form the end of the trace. This patch fixes this by marking arch_stack_walk() as notrace, as we do for all other functions on the path to ftrace_graph_get_ret_stack(). While a few helper functions are not marked notrace, their calls/returns are balanced, and will have no observable effect when examining the fgraph ret stack. It is possible for an exeption boundary to cause a similar offset if the return address of the interrupted context was in the LR. Fixing those cases will require some more substantial rework, and is left for subsequent patches. Before: | # cat /proc/self/stack | [<0>] proc_pid_stack+0xc4/0x140 | [<0>] proc_single_show+0x6c/0x120 | [<0>] seq_read_iter+0x240/0x4e0 | [<0>] seq_read+0xe8/0x140 | [<0>] vfs_read+0xb8/0x1e4 | [<0>] ksys_read+0x74/0x100 | [<0>] __arm64_sys_read+0x28/0x3c | [<0>] invoke_syscall+0x50/0x120 | [<0>] el0_svc_common.constprop.0+0xc4/0xd4 | [<0>] do_el0_svc+0x30/0x9c | [<0>] el0_svc+0x2c/0x54 | [<0>] el0t_64_sync_handler+0x1a8/0x1b0 | [<0>] el0t_64_sync+0x198/0x19c | # echo function_graph > /sys/kernel/tracing/current_tracer | # cat /proc/self/stack | [<0>] stack_trace_save_tsk+0xa4/0x110 | [<0>] proc_pid_stack+0xc4/0x140 | [<0>] proc_single_show+0x6c/0x120 | [<0>] seq_read_iter+0x240/0x4e0 | [<0>] seq_read+0xe8/0x140 | [<0>] vfs_read+0xb8/0x1e4 | [<0>] ksys_read+0x74/0x100 | [<0>] __arm64_sys_read+0x28/0x3c | [<0>] invoke_syscall+0x50/0x120 | [<0>] el0_svc_common.constprop.0+0xc4/0xd4 | [<0>] do_el0_svc+0x30/0x9c | [<0>] el0t_64_sync_handler+0x1a8/0x1b0 | [<0>] el0t_64_sync+0x198/0x19c After: | # cat /proc/self/stack | [<0>] proc_pid_stack+0xc4/0x140 | [<0>] proc_single_show+0x6c/0x120 | [<0>] seq_read_iter+0x240/0x4e0 | [<0>] seq_read+0xe8/0x140 | [<0>] vfs_read+0xb8/0x1e4 | [<0>] ksys_read+0x74/0x100 | [<0>] __arm64_sys_read+0x28/0x3c | [<0>] invoke_syscall+0x50/0x120 | [<0>] el0_svc_common.constprop.0+0xc4/0xd4 | [<0>] do_el0_svc+0x30/0x9c | [<0>] el0_svc+0x2c/0x54 | [<0>] el0t_64_sync_handler+0x1a8/0x1b0 | [<0>] el0t_64_sync+0x198/0x19c | # echo function_graph > /sys/kernel/tracing/current_tracer | # cat /proc/self/stack | [<0>] proc_pid_stack+0xc4/0x140 | [<0>] proc_single_show+0x6c/0x120 | [<0>] seq_read_iter+0x240/0x4e0 | [<0>] seq_read+0xe8/0x140 | [<0>] vfs_read+0xb8/0x1e4 | [<0>] ksys_read+0x74/0x100 | [<0>] __arm64_sys_read+0x28/0x3c | [<0>] invoke_syscall+0x50/0x120 | [<0>] el0_svc_common.constprop.0+0xc4/0xd4 | [<0>] do_el0_svc+0x30/0x9c | [<0>] el0_svc+0x2c/0x54 | [<0>] el0t_64_sync_handler+0x1a8/0x1b0 | [<0>] el0t_64_sync+0x198/0x19c Cc: Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Will Deacon Reviwed-by: Mark Brown Link: https://lore.kernel.org/r/20210802164845.45506-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 8d5903f457145e3fcd858578b065d667822d99ac Author: Mark Rutland Date: Mon Aug 2 17:48:44 2021 +0100 arm64: stacktrace: fix comment Due to a copy-paste error, we describe struct stackframe::pc as a snapshot of the `fp` field rather than the `lr` field. Fix the comment. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Will Deacon Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210802164845.45506-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit f9c4ff2ab9fe433d44ebbc2e3c2368a49df44798 Author: Barry Song Date: Sat Jul 31 00:51:31 2021 +1200 arm64: fix the doc of RANDOMIZE_MODULE_REGION_FULL Obviously kaslr is setting the module region to 2GB rather than 4GB since commit b2eed9b588112 ("arm64/kernel: kaslr: reduce module randomization range to 2 GB"). So fix the size of region in Kconfig. On the other hand, even though RANDOMIZE_MODULE_REGION_FULL is not set, module_alloc() can fall back to a 2GB window if ARM64_MODULE_PLTS is set. In this case, veneers are still needed. !RANDOMIZE_MODULE_REGION_FULL doesn't necessarily mean veneers are not needed. So fix the doc to be more precise to avoid any confusion to the readers of the code. Cc: Masami Hiramatsu Cc: Ard Biesheuvel Cc: Qi Liu Signed-off-by: Barry Song Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210730125131.13724-1-song.bao.hua@hisilicon.com Signed-off-by: Will Deacon commit 64ee84c75b5f75132eec97f2c7a201a056d53698 Author: Masahiro Yamada Date: Sun Aug 1 14:35:25 2021 +0900 arm64: move warning about toolchains to archprepare Commit 987fdfec2410 ("arm64: move --fix-cortex-a53-843419 linker test to Kconfig") fixed the false-positive warning in the installation step. Yet, there are some cases where this false-positive is shown. For example, you can see it when you cross 987fdfec2410 during git-bisect. $ git checkout 987fdfec2410^ [ snip ] $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig all [ snip ] $ git checkout v5.13 [ snip] $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig all [ snip ] arch/arm64/Makefile:25: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum In the stale include/config/auto.config, CONFIG_ARM64_ERRATUM_843419=y is set without CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419, so the warning is displayed while parsing the Makefiles. Make will restart with the updated include/config/auto.config, hence CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419 will be set eventually, but this warning is a surprise for users. Commit 25896d073d8a ("x86/build: Fix compiler support check for CONFIG_RETPOLINE") addressed a similar issue. Move $(warning ...) out of the parse stage of Makefiles. The same applies to CONFIG_ARM64_USE_LSE_ATOMICS. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210801053525.105235-1-masahiroy@kernel.org Signed-off-by: Will Deacon commit e30e8d46cf605d216a799a28c77b8a41c328613a Author: Mark Rutland Date: Mon Aug 2 11:42:00 2021 +0100 arm64: fix compat syscall return truncation Due to inconsistencies in the way we manipulate compat GPRs, we have a few issues today: * For audit and tracing, where error codes are handled as a (native) long, negative error codes are expected to be sign-extended to the native 64-bits, or they may fail to be matched correctly. Thus a syscall which fails with an error may erroneously be identified as failing. * For ptrace, *all* compat return values should be sign-extended for consistency with 32-bit arm, but we currently only do this for negative return codes. * As we may transiently set the upper 32 bits of some compat GPRs while in the kernel, these can be sampled by perf, which is somewhat confusing. This means that where a syscall returns a pointer above 2G, this will be sign-extended, but will not be mistaken for an error as error codes are constrained to the inclusive range [-4096, -1] where no user pointer can exist. To fix all of these, we must consistently use helpers to get/set the compat GPRs, ensuring that we never write the upper 32 bits of the return code, and always sign-extend when reading the return code. This patch does so, with the following changes: * We re-organise syscall_get_return_value() to always sign-extend for compat tasks, and reimplement syscall_get_error() atop. We update syscall_trace_exit() to use syscall_get_return_value(). * We consistently use syscall_set_return_value() to set the return value, ensureing the upper 32 bits are never set unexpectedly. * As the core audit code currently uses regs_return_value() rather than syscall_get_return_value(), we special-case this for compat_user_mode(regs) such that this will do the right thing. Going forward, we should try to move the core audit code over to syscall_get_return_value(). Cc: Reported-by: He Zhe Reported-by: weiyuchen Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210802104200.21390-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit a8eee86317f11e97990d755d4615c1c0db203d08 Author: Arnd Bergmann Date: Tue Aug 3 10:12:34 2021 +0200 soc: ixp4xx/qmgr: fix invalid __iomem access Sparse reports a compile time warning when dereferencing an __iomem pointer: drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:153:40: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:154:40: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:38: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:44: warning: dereference of noderef expression Use __raw_readl() here for consistency with the rest of the file. This should really get converted to some proper accessor, as the __raw functions are not meant to be used in drivers, but the driver has used these since the start, so for the moment, let's only fix the warning. Reported-by: kernel test robot Fixes: d4c9e9fc9751 ("IXP42x: Add QMgr support for IXP425 rev. A0 processors.") Signed-off-by: Arnd Bergmann commit 8861452b2097bb0b5d0081a1c137fb3870b0a31f Author: Arnd Bergmann Date: Fri Nov 8 09:43:06 2019 +0100 soc: ixp4xx: fix printing resources When compile-testing with 64-bit resource_size_t, gcc reports an invalid printk format string: In file included from include/linux/dma-mapping.h:7, from drivers/soc/ixp4xx/ixp4xx-npe.c:15: drivers/soc/ixp4xx/ixp4xx-npe.c: In function 'ixp4xx_npe_probe': drivers/soc/ixp4xx/ixp4xx-npe.c:694:18: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n", Use the special %pR format string to print the resources. Fixes: 0b458d7b10f8 ("soc: ixp4xx: npe: Pass addresses as resources") Signed-off-by: Arnd Bergmann commit c32ac11da3f83bb42b986702a9b92f0a14ed4182 Author: Ard Biesheuvel Date: Mon Jul 26 16:31:44 2021 +0200 efi/libstub: arm64: Double check image alignment at entry On arm64, the stub only moves the kernel image around in memory if needed, which is typically only for KASLR, given that relocatable kernels (which is the default) can run from any 64k aligned address, which is also the minimum alignment communicated to EFI via the PE/COFF header. Unfortunately, some loaders appear to ignore this header, and load the kernel at some arbitrary offset in memory. We can deal with this, but let's check for this condition anyway, so non-compliant code can be spotted and fixed. Cc: # v5.10+ Signed-off-by: Ard Biesheuvel Tested-by: Benjamin Herrenschmidt commit ff80ef5bf5bd59e5eab82d1d846acc613ebbf6c4 Author: Ard Biesheuvel Date: Mon Jul 26 16:24:01 2021 +0200 efi/libstub: arm64: Warn when efi_random_alloc() fails Randomization of the physical load address of the kernel image relies on efi_random_alloc() returning successfully, and currently, we ignore any failures and just carry on, using the ordinary, non-randomized page allocator routine. This means we never find out if a failure occurs, which could harm security, so let's at least warn about this condition. Signed-off-by: Ard Biesheuvel Tested-by: Benjamin Herrenschmidt commit 3a262423755b83a5f85009ace415d6e7f572dfe8 Author: Ard Biesheuvel Date: Thu Jul 22 12:10:31 2021 +0200 efi/libstub: arm64: Relax 2M alignment again for relocatable kernels Commit 82046702e288 ("efi/libstub/arm64: Replace 'preferred' offset with alignment check") simplified the way the stub moves the kernel image around in memory before booting it, given that a relocatable image does not need to be copied to a 2M aligned offset if it was loaded on a 64k boundary by EFI. Commit d32de9130f6c ("efi/arm64: libstub: Deal gracefully with EFI_RNG_PROTOCOL failure") inadvertently defeated this logic by overriding the value of efi_nokaslr if EFI_RNG_PROTOCOL is not available, which was mistaken by the loader logic as an explicit request on the part of the user to disable KASLR and any associated relocation of an Image not loaded on a 2M boundary. So let's reinstate this functionality, by capturing the value of efi_nokaslr at function entry to choose the minimum alignment. Fixes: d32de9130f6c ("efi/arm64: libstub: Deal gracefully with EFI_RNG_PROTOCOL failure") Signed-off-by: Ard Biesheuvel Tested-by: Benjamin Herrenschmidt commit 5b94046efb4706b3429c9c8e7377bd8d1621d588 Author: Ard Biesheuvel Date: Mon Jul 26 11:38:41 2021 +0200 efi/libstub: arm64: Force Image reallocation if BSS was not reserved Distro versions of GRUB replace the usual LoadImage/StartImage calls used to load the kernel image with some local code that fails to honor the allocation requirements described in the PE/COFF header, as it does not account for the image's BSS section at all: it fails to allocate space for it, and fails to zero initialize it. Since the EFI stub itself is allocated in the .init segment, which is in the middle of the image, its BSS section is not impacted by this, and the main consequence of this omission is that the BSS section may overlap with memory regions that are already used by the firmware. So let's warn about this condition, and force image reallocation to occur in this case, which works around the problem. Fixes: 82046702e288 ("efi/libstub/arm64: Replace 'preferred' offset with alignment check") Signed-off-by: Ard Biesheuvel Tested-by: Benjamin Herrenschmidt commit 973b393fdf073a4ebd8d82ef6edea99fedc74af9 Author: Guennadi Liakhovetski Date: Mon Aug 2 10:17:49 2021 -0500 ASoC: SOF: Intel: hda-ipc: fix reply size checking Checking that two values don't have common bits makes no sense, strict equality is meant. Fixes: f3b433e4699f ("ASoC: SOF: Implement Probe IPC API") Reviewed-by: Ranjani Sridharan Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210802151749.15417-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6b994c554ebc4c065427f510db333081cbd7228d Author: Pierre-Louis Bossart Date: Mon Aug 2 10:16:28 2021 -0500 ASoC: SOF: Intel: Kconfig: fix SoundWire dependencies The previous Kconfig cleanup added simplifications but also introduced a new one by moving a boolean to a tristate. This leads to randconfig problems. This patch moves the select operations in the SOUNDWIRE_LINK_BASELINE option. The INTEL_SOUNDWIRE config remains a tristate for backwards compatibility with older configurations but is essentially an on/off switch. Fixes: cf5807f5f814f ('ASoC: SOF: Intel: SoundWire: simplify Kconfig') Reported-by: Arnd Bergmann Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Tested-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210802151628.15291-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0541a6293298fb52789de389dfb27ef54df81f73 Author: Vladimir Oltean Date: Mon Aug 2 02:17:30 2021 +0300 net: bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry Currently it is possible to add broken extern_learn FDB entries to the bridge in two ways: 1. Entries pointing towards the bridge device that are not local/permanent: ip link add br0 type bridge bridge fdb add 00:01:02:03:04:05 dev br0 self extern_learn static 2. Entries pointing towards the bridge device or towards a port that are marked as local/permanent, however the bridge does not process the 'permanent' bit in any way, therefore they are recorded as though they aren't permanent: ip link add br0 type bridge bridge fdb add 00:01:02:03:04:05 dev br0 self extern_learn permanent Since commit 52e4bec15546 ("net: bridge: switchdev: treat local FDBs the same as entries towards the bridge"), these incorrect FDB entries can even trigger NULL pointer dereferences inside the kernel. This is because that commit made the assumption that all FDB entries that are not local/permanent have a valid destination port. For context, local / permanent FDB entries either have fdb->dst == NULL, and these point towards the bridge device and are therefore local and not to be used for forwarding, or have fdb->dst == a net_bridge_port structure (but are to be treated in the same way, i.e. not for forwarding). That assumption _is_ correct as long as things are working correctly in the bridge driver, i.e. we cannot logically have fdb->dst == NULL under any circumstance for FDB entries that are not local. However, the extern_learn code path where FDB entries are managed by a user space controller show that it is possible for the bridge kernel driver to misinterpret the NUD flags of an entry transmitted by user space, and end up having fdb->dst == NULL while not being a local entry. This is invalid and should be rejected. Before, the two commands listed above both crashed the kernel in this check from br_switchdev_fdb_notify: struct net_device *dev = info.is_local ? br->dev : dst->dev; info.is_local == false, dst == NULL. After this patch, the invalid entry added by the first command is rejected: ip link add br0 type bridge && bridge fdb add 00:01:02:03:04:05 dev br0 self extern_learn static; ip link del br0 Error: bridge: FDB entry towards bridge must be permanent. and the valid entry added by the second command is properly treated as a local address and does not crash br_switchdev_fdb_notify anymore: ip link add br0 type bridge && bridge fdb add 00:01:02:03:04:05 dev br0 self extern_learn permanent; ip link del br0 Fixes: eb100e0e24a2 ("net: bridge: allow to add externally learned entries from user-space") Reported-by: syzbot+9ba1174359adba5a5b7c@syzkaller.appspotmail.com Signed-off-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20210801231730.7493-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e89afb51f97ae03ee246c1fd0b47e3e491266aef Author: Zack Rusin Date: Tue Jun 15 14:23:34 2021 -0400 drm/vmwgfx: Fix a 64bit regression on svga3 Register accesses are always 4bytes, accidently this was changed to a void pointer whwqich badly breaks 64bit archs when running on top of svga3. Fixes: 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20210615182336.995192-3-zackr@vmware.com (cherry picked from commit 87360168759879d68550b0c052bbcc2a0339ff74) Signed-off-by: Thomas Zimmermann commit 232eee380e7604c2c88daec67e7409179b202f06 Merge: 4c4c1257b844f ec6446d5304b3 Author: Greg Kroah-Hartman Date: Mon Aug 2 18:07:23 2021 +0200 Merge tag 'fpga-fixes-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-linus Moritz writes: FPGA Manager fix for 5.14 Kajol's fix adds a missing pmu_migrate_context() call which presents a problem if the CPU collecting FME PMU data is taken offline. All patches have been reviewed on the mailing list, and have been in the last few linux-next releases (as part of my fixes branch) without issues. Signed-off-by: Moritz Fischer * tag 'fpga-fixes-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: dfl: fme: Fix cpu hotplug issue in performance reporting commit ef4b96a5773d7f6568363b3d0c3c3f371fb690bd Author: Bob Pearson Date: Thu Jul 29 17:00:39 2021 -0500 RDMA/rxe: Restore setting tot_len in the IPv4 header An earlier patch removed setting of tot_len in IPv4 headers because it was also set in ip_local_out. However, this change resulted in an incorrect ICRC being computed because the tot_len field is not masked out. This patch restores that line. This fixes the bug reported by Zhu Yanjun. This bug affects anyone using rxe which is currently broken. Fixes: 230bb836ee88 ("RDMA/rxe: Fix redundant call to ip_send_check") Link: https://lore.kernel.org/r/20210729220039.18549-3-rpearsonhpe@gmail.com Reported-by: Zhu Yanjun Signed-off-by: Bob Pearson Reviewed-and-tested-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit e2a05339fa1188b6b37540f4611893ac4c534fa2 Author: Bob Pearson Date: Thu Jul 29 17:00:38 2021 -0500 RDMA/rxe: Use the correct size of wqe when processing SRQ The memcpy() that copies a WQE from a SRQ the QP uses an incorrect size. The size should have been the size of the rxe_send_wqe struct not the size of a pointer to it. The result is that IO operations using a SRQ on the responder side will fail. Fixes: ec0fa2445c18 ("RDMA/rxe: Fix over copying in get_srq_wqe") Link: https://lore.kernel.org/r/20210729220039.18549-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit db4657afd10e45855ac1d8437fcc9a86bd3d741d Author: Mike Marciniszyn Date: Thu Jul 29 14:26:22 2021 -0400 RDMA/cma: Revert INIT-INIT patch The net/sunrpc/xprtrdma module creates its QP using rdma_create_qp() and immediately post receives, implicitly assuming the QP is in the INIT state and thus valid for ib_post_recv(). The patch noted in Fixes: removed the RESET->INIT modifiy from rdma_create_qp(), breaking NFS rdma for verbs providers that fail the ib_post_recv() for a bad state. This situation was proven using kprobes in rvt_post_recv() and rvt_modify_qp(). The traces showed that the rvt_post_recv() failed before ANY modify QP and that the current state was RESET. Fix by reverting the patch below. Fixes: dc70f7c3ed34 ("RDMA/cma: Remove unnecessary INIT->INIT transition") Link: https://lore.kernel.org/r/1627583182-81330-1-git-send-email-mike.marciniszyn@cornelisnetworks.com Cc: Haakon Bugge Cc: Chuck Lever III Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit d6793ca97b76642b77629dd0783ec64782a50bdb Author: Aharon Landau Date: Tue Jul 27 10:16:06 2021 +0300 RDMA/mlx5: Delay emptying a cache entry when a new MR is added to it recently Fixing a typo that causes a cache entry to shrink immediately after adding to it new MRs if the entry size exceeds the high limit. In doing so, the cache misses its purpose to prevent the creation of new mkeys on the runtime by using the cached ones. Fixes: b9358bdbc713 ("RDMA/mlx5: Fix locking in MR cache work queue") Link: https://lore.kernel.org/r/fcb546986be346684a016f5ca23a0567399145fa.1627370131.git.leonro@nvidia.com Signed-off-by: Aharon Landau Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9b87f43537acfa24b95c236beba0f45901356eb2 Author: Matthias Schiffer Date: Fri Jul 16 12:00:47 2021 +0200 gpio: tqmx86: really make IRQ optional The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This causes warnings with newer kernels. Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a missing IRQ properly. Fixes: b868db94a6a7 ("gpio: tqmx86: Add GPIO from for this IO controller") Signed-off-by: Matthias Schiffer Reviewed-by: Andrew Lunn Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 1c69d7cf4a8b6b6cfd920a1e809f1cd33ae4369c Author: Jakub Kicinski Date: Mon Aug 2 07:30:29 2021 -0700 Revert "mhi: Fix networking tree build." This reverts commit 40e159403896f7d55c98f858d0b20fee1d941fa4. Looks like this commit breaks the build for me. Signed-off-by: Jakub Kicinski commit 5aa95d8834e07907e64937d792c12ffef7fb271f Author: Frank Wunderlich Date: Sat Jul 31 09:47:37 2021 +0200 iommu: Check if group is NULL before remove device If probe_device is failing, iommu_group is not initialized because iommu_group_add_device is not reached, so freeing it will result in NULL pointer access. iommu_bus_init ->bus_iommu_probe ->probe_iommu_group in for each:/* return -22 in fail case */ ->iommu_probe_device ->__iommu_probe_device /* return -22 here.*/ -> ops->probe_device /* return -22 here.*/ -> iommu_group_get_for_dev -> ops->device_group -> iommu_group_add_device //good case ->remove_iommu_group //in fail case, it will remove group ->iommu_release_device ->iommu_group_remove_device // here we don't have group In my case ops->probe_device (mtk_iommu_probe_device from mtk_iommu_v1.c) is due to failing fwspec->ops mismatch. Fixes: d72e31c93746 ("iommu: IOMMU Groups") Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20210731074737.4573-1-linux@fw-web.de Signed-off-by: Joerg Roedel commit 7a7b8635b622add64d98cff84bf3ee71eac36237 Author: Jakub Kicinski Date: Sat Jul 31 07:40:52 2021 -0700 docs: operstates: document IF_OPER_TESTING IF_OPER_TESTING is in fact used today. Signed-off-by: Jakub Kicinski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 66e0da21728343bd3e75230a53d909e045fb9dd7 Author: Jakub Kicinski Date: Sat Jul 31 07:40:07 2021 -0700 docs: operstates: fix typo TVL -> TLV Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6387f65e2acb9a63044bd64464401771b8cf1acc Author: Jakub Kicinski Date: Sat Jul 31 07:39:17 2021 -0700 net: sparx5: fix compiletime_assert for GCC 4.9 Stephen reports sparx5 broke GCC 4.9 build. Move the compiletime_assert() out of the static function. Compile-tested only, no object code changes. Reported-by: Stephen Rothwell Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7fe74dfd41c428afb24e2e615470832fa997ff14 Author: Wang Hai Date: Sat Jul 31 14:38:01 2021 +0800 net: natsemi: Fix missing pci_disable_device() in probe and remove Replace pci_enable_device() with pcim_enable_device(), pci_disable_device() and pci_release_regions() will be called in release automatically. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit a5e63c7d38d548b8dab6c6205e0b6af76899dbf5 Author: Steve Bennett Date: Sat Jul 31 08:57:50 2021 +1000 net: phy: micrel: Fix detection of ksz87xx switch The logic for discerning between KSZ8051 and KSZ87XX PHYs is incorrect such that the that KSZ87XX switch is not identified correctly. ksz8051_ksz8795_match_phy_device() uses the parameter ksz_phy_id to discriminate whether it was called from ksz8051_match_phy_device() or from ksz8795_match_phy_device() but since PHY_ID_KSZ87XX is the same value as PHY_ID_KSZ8051, this doesn't work. Instead use a bool to discriminate the caller. Without this patch, the KSZ8795 switch port identifies as: ksz8795-switch spi3.1 ade1 (uninitialized): PHY [dsa-0.1:03] driver [Generic PHY] With the patch, it identifies correctly: ksz8795-switch spi3.1 ade1 (uninitialized): PHY [dsa-0.1:03] driver [Micrel KSZ87XX Switch] Fixes: 8b95599c55ed24b36cf4 ("net: phy: micrel: Discern KSZ8051 and KSZ8795 PHYs") Signed-off-by: Steve Bennett Reviewed-by: Marek Vasut Signed-off-by: David S. Miller commit 4c156084daa8ee70978e4b150b5eb5fc7b1f15be Author: Xiu Jianfeng Date: Thu Jul 29 11:16:44 2021 +0800 selinux: correct the return value when loads initial sids It should not return 0 when SID 0 is assigned to isids. This patch fixes it. Cc: stable@vger.kernel.org Fixes: e3e0b582c321a ("selinux: remove unused initial SIDs and improve handling") Signed-off-by: Xiu Jianfeng [PM: remove changelog from description] Signed-off-by: Paul Moore commit cebb5103f07e0924ff3e2a7feaf962d6f0c0aa88 Merge: 40e159403896f 47c2c0c231211 Author: David S. Miller Date: Mon Aug 2 14:28:28 2021 +0100 Merge branch 'sja1105-fdb-fixes' Vladimir Oltean says: ==================== FDB fixes for NXP SJA1105 I have some upcoming patches that make heavy use of statically installed FDB entries, and when testing them on SJA1105P/Q/R/S and SJA1110, it became clear that these switches do not behave reliably at all. - On SJA1110, a static FDB entry cannot be installed at all - On SJA1105P/Q/R/S, it is very picky about the inner/outer VLAN type - Dynamically learned entries will make us not install static ones, or even if we do, they might not take effect Patch 5/6 has a conflict with net-next (sorry), the commit message of that patch describes how to deal with it. Thanks. ==================== Signed-off-by: David S. Miller commit 47c2c0c2312118a478f738503781de1d1a6020d2 Author: Vladimir Oltean Date: Fri Jul 30 20:18:15 2021 +0300 net: dsa: sja1105: match FDB entries regardless of inner/outer VLAN tag On SJA1105P/Q/R/S and SJA1110, the L2 Lookup Table entries contain a maskable "inner/outer tag" bit which means: - when set to 1: match single-outer and double tagged frames - when set to 0: match untagged and single-inner tagged frames - when masked off: match all frames regardless of the type of tag This driver does not make any meaningful distinction between inner tags (matches on TPID) and outer tags (matches on TPID2). In fact, all VLAN table entries are installed as SJA1110_VLAN_D_TAG, which means that they match on both inner and outer tags. So it does not make sense that we install FDB entries with the IOTAG bit set to 1. In VLAN-unaware mode, we set both TPID and TPID2 to 0xdadb, so the switch will see frames as outer-tagged or double-tagged (never inner). So the FDB entries will match if IOTAG is set to 1. In VLAN-aware mode, we set TPID to 0x8100 and TPID2 to 0x88a8. So the switch will see untagged and 802.1Q-tagged packets as inner-tagged, and 802.1ad-tagged packets as outer-tagged. So untagged and 802.1Q-tagged packets will not match FDB entries if IOTAG is set to 1, but 802.1ad tagged packets will. Strange. To fix this, simply mask off the IOTAG bit from FDB entries, and make them match regardless of whether the VLAN tag is inner or outer. Fixes: 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 589918df93226a1e5f104306c185b6dcf2bd8051 Author: Vladimir Oltean Date: Fri Jul 30 20:18:14 2021 +0300 net: dsa: sja1105: be stateless with FDB entries on SJA1105P/Q/R/S/SJA1110 too Similar but not quite the same with what was done in commit b11f0a4c0c81 ("net: dsa: sja1105: be stateless when installing FDB entries") for SJA1105E/T, it is desirable to drop the priv->vlan_aware check and simply go ahead and install FDB entries in the VLAN that was given by the bridge. As opposed to SJA1105E/T, in SJA1105P/Q/R/S and SJA1110, the FDB is a maskable TCAM, and we are installing VLAN-unaware FDB entries with the VLAN ID masked off. However, such FDB entries might completely obscure VLAN-aware entries where the VLAN ID is included in the search mask, because the switch looks up the FDB from left to right and picks the first entry which results in a masked match. So it depends on whether the bridge installs first the VLAN-unaware or the VLAN-aware FDB entries. Anyway, if we had a VLAN-unaware FDB entry towards one set of DESTPORTS and a VLAN-aware one towards other set of DESTPORTS, the result is that the packets in VLAN-aware mode will be forwarded towards the DESTPORTS specified by the VLAN-unaware entry. To solve this, simply do not use the masked matching ability of the FDB for VLAN ID, and always match precisely on it. In VLAN-unaware mode, we configure the switch for shared VLAN learning, so the VLAN ID will be ignored anyway during lookup, so it is redundant to mask it off in the TCAM. This patch conflicts with net-next commit 0fac6aa098ed ("net: dsa: sja1105: delete the best_effort_vlan_filtering mode") which changed this line: if (priv->vlan_state != SJA1105_VLAN_UNAWARE) { into: if (priv->vlan_aware) { When merging with net-next, the lines added by this patch should take precedence in the conflict resolution (i.e. the "if" condition should be deleted in both cases). Fixes: 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 728db843df88753aeb7224314807a203afa8eb32 Author: Vladimir Oltean Date: Fri Jul 30 20:18:13 2021 +0300 net: dsa: sja1105: ignore the FDB entry for unknown multicast when adding a new address Currently, when sja1105pqrs_fdb_add() is called for a host-joined IPv6 MDB entry such as 33:33:00:00:00:6a, the search for that address will return the FDB entry for SJA1105_UNKNOWN_MULTICAST, which has a destination MAC of 01:00:00:00:00:00 and a mask of 01:00:00:00:00:00. It returns that entry because, well, it matches, in the sense that unknown multicast is supposed by design to match it... But the issue is that we then proceed to overwrite this entry with the one for our precise host-joined multicast address, and the unknown multicast entry is no longer there - unknown multicast is now flooded to the same group of ports as broadcast, which does not look up the FDB. To solve this problem, we should ignore searches that return the unknown multicast address as the match, and treat them as "no match" which will result in the entry being installed to hardware. For this to work properly, we need to put the result of the FDB search in a temporary variable in order to avoid overwriting the l2_lookup entry we want to program. The l2_lookup entry returned by the search might not have the same set of DESTPORTS and not even the same MACADDR as the entry we're trying to add. Fixes: 4d9423549501 ("net: dsa: sja1105: offload bridge port flags to device") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6c5fc159e0927531707895709eee1f8bfa04289f Author: Vladimir Oltean Date: Fri Jul 30 20:18:12 2021 +0300 net: dsa: sja1105: invalidate dynamic FDB entries learned concurrently with statically added ones The procedure to add a static FDB entry in sja1105 is concurrent with dynamic learning performed on all bridge ports and the CPU port. The switch looks up the FDB from left to right, and also learns dynamically from left to right, so it is possible that between the moment when we pick up a free slot to install an FDB entry, another slot to the left of that one becomes free due to an address ageing out, and that other slot is then immediately used by the switch to learn dynamically the same address as we're trying to add statically. The result is that we succeeded to add our static FDB entry, but it is being shadowed by a dynamic FDB entry to its left, and the switch will behave as if our static FDB entry did not exist. We cannot really prevent this from happening unless we make the entire process to add a static FDB entry a huge critical section where address learning is temporarily disabled on _all_ ports, and then re-enabled according to the configuration done by sja1105_port_set_learning. However, that is kind of disruptive for the operation of the network. What we can do alternatively is to simply read back the FDB for dynamic entries located before our newly added static one, and delete them. This will guarantee that our static FDB entry is now operational. It will still not guarantee that there aren't dynamic FDB entries to the _right_ of that static FDB entry, but at least those entries will age out by themselves since they aren't hit, and won't bother anyone. Fixes: 291d1e72b756 ("net: dsa: sja1105: Add support for FDB and MDB management") Fixes: 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e11e865bf84e3c6ea91563ff3e858cfe0e184bd2 Author: Vladimir Oltean Date: Fri Jul 30 20:18:11 2021 +0300 net: dsa: sja1105: overwrite dynamic FDB entries with static ones in .port_fdb_add The SJA1105 switch family leaves it up to software to decide where within the FDB to install a static entry, and to concatenate destination ports for already existing entries (the FDB is also used for multicast entries), it is not as simple as just saying "please add this entry". This means we first need to search for an existing FDB entry before adding a new one. The driver currently manages to fool itself into thinking that if an FDB entry already exists, there is nothing to be done. But that FDB entry might be dynamically learned, case in which it should be replaced with a static entry, but instead it is left alone. This patch checks the LOCKEDS ("locked/static") bit from found FDB entries, and lets the code "goto skip_finding_an_index;" if the FDB entry was not static. So we also need to move the place where we set LOCKEDS = true, to cover the new case where a dynamic FDB entry existed but was dynamic. Fixes: 291d1e72b756 ("net: dsa: sja1105: Add support for FDB and MDB management") Fixes: 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cb81698fddbcc9a3ee75857e99dfc29caa96135b Author: Vladimir Oltean Date: Fri Jul 30 20:18:10 2021 +0300 net: dsa: sja1105: fix static FDB writes for SJA1110 The blamed commit made FDB access on SJA1110 functional only as far as dumping the existing entries goes, but anything having to do with an entry's index (adding, deleting) is still broken. There are in fact 2 problems, all caused by improperly inheriting the code from SJA1105P/Q/R/S: - An entry size is SJA1110_SIZE_L2_LOOKUP_ENTRY (24) bytes and not SJA1105PQRS_SIZE_L2_LOOKUP_ENTRY (20) bytes - The "index" field within an FDB entry is at bits 10:1 for SJA1110 and not 15:6 as in SJA1105P/Q/R/S This patch moves the packing function for the cmd->index outside of sja1105pqrs_common_l2_lookup_cmd_packing() and into the device specific functions sja1105pqrs_l2_lookup_cmd_packing and sja1110_l2_lookup_cmd_packing. Fixes: 74e7feff0e22 ("net: dsa: sja1105: fix dynamic access to L2 Address Lookup table for SJA1110") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6ebeca342f96a7c371ed5fe53189dd56fe0c0330 Merge: b07bf042e678f ee7ab3f263f81 Author: Arnd Bergmann Date: Mon Aug 2 14:38:24 2021 +0200 Merge tag 'mvebu-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/fixes mvebu fixes for 5.14 (part 1) - Fix i2c property for armada-3720-turris-mox in order to use SFP - Add mmc alias on armada-3720-turris-mox to allow rootfs using the right mmc * tag 'mvebu-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: armada-3720-turris-mox: remove mrvl,i2c-fast-mode arm64: dts: armada-3720-turris-mox: fixed indices for the SDHC controllers Link: https://lore.kernel.org/r/87k0l7zx4v.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit b07bf042e678f5eac856052d332869423e365af0 Merge: 64429b9e0e1dc 15f68f027ebd9 Author: Arnd Bergmann Date: Mon Aug 2 14:37:13 2021 +0200 Merge tag 'stm32-dt-for-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/fixes STM32 DT fixes for v5.14, round 1 Highlights: ----------- -Fixes are for DHCOM/DHCOR boards: - Set HW RTC ad default RTC - Disable EDPD LAN8710 feature as it is not a stable feature. - Fix touchscreen IRQ line assignment * tag 'stm32-dt-for-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM ARM: dts: stm32: Disable LAN8710 EDPD on DHCOM ARM: dts: stm32: Prefer HW RTC on DHCOM SoM Link: https://lore.kernel.org/r/c0b6031b-2de7-2ef8-71b2-a0af8f475932@foss.st.com Signed-off-by: Arnd Bergmann commit 64429b9e0e1dc05cbe4f88076909fe0c4d2d29dc Merge: bee757485161e 914ab19e471d8 Author: Arnd Bergmann Date: Mon Aug 2 14:35:17 2021 +0200 Merge tag 'tee-kexec-fixes-for-v5.14' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/fixes tee: Improve support for kexec and kdump This fixes several bugs uncovered while exercising the OP-TEE, ftpm (firmware TPM), and tee_bnxt_fw (Broadcom BNXT firmware manager) drivers with kexec and kdump (emergency kexec) based workflows. * tag 'tee-kexec-fixes-for-v5.14' of git://git.linaro.org:/people/jens.wiklander/linux-tee: firmware: tee_bnxt: Release TEE shm, session, and context during kexec tpm_ftpm_tee: Free and unregister TEE shared memory during kexec tee: Correct inappropriate usage of TEE_SHM_DMA_BUF flag tee: add tee_shm_alloc_kernel_buf() optee: Clear stale cache entries during initialization optee: fix tee out of memory failure seen during kexec reboot optee: Refuse to load the driver under the kdump kernel optee: Fix memory leak when failing to register shm pages Link: https://lore.kernel.org/r/20210726081039.GA2482361@jade Signed-off-by: Arnd Bergmann commit bee757485161e2bb43fd0bcd5f7e17cfe2b11bbf Merge: 796a8c85b1216 3d9e30a52047f Author: Arnd Bergmann Date: Mon Aug 2 14:33:45 2021 +0200 Merge tag 'imx-fixes-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.14: - A couple of fixes on MMDC driver to add missing iounmap() and clk_disable_unprepare(), and a follow-up fix. - Fix missing-prototypes warning in SRC driver. - Revert commit 7d981405d0fd ("soc: imx8m: change to use platform driver"), which breaks i.MX8M system that has CAAM driver enabled. - One fix on imx53-m53menlo pinctrl configuration. - Increase the PHY reset duration for imx6qdl-sr-som to fix intermittent issues where the PHY would be unresponsive every once in a while. - Add missing flag for in-band signalling between PHY and MAC on kontron-sl28-var2 board to fix network support. - Limit the SDIO Clock on Colibri iMX6ULL to 25MHz for fixing wireless noise issue. - Fix sysclk node name for LS1028A so that U-Boot is able to update the "clock-frequency" property. * tag 'imx-fixes-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx: Swap M53Menlo pinctrl_power_button/pinctrl_power_out pins ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init ARM: dts: colibri-imx6ull: limit SDIO clock to 25MHz arm64: dts: ls1028: sl28: fix networking for variant 2 Revert "soc: imx8m: change to use platform driver" ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms ARM: imx: common: Move prototype outside the SMP block ARM: imx: add missing clk_disable_unprepare() ARM: imx: add missing iounmap() arm64: dts: ls1028a: fix node name for the sysclk Link: https://lore.kernel.org/r/20210726023221.GF5901@dragon Signed-off-by: Arnd Bergmann commit 796a8c85b1216618258e08b463d3bef0d7123760 Author: Arnd Bergmann Date: Wed Jul 21 17:16:04 2021 +0200 ARM: ixp4xx: goramo_mlr depends on old PCI driver When this driver is disabled, the board file fails to build, so add a dependency: arch/arm/mach-ixp4xx/goramo_mlr.c: In function 'gmlr_pci_preinit': arch/arm/mach-ixp4xx/goramo_mlr.c:472:9: error: implicit declaration of function 'ixp4xx_pci_preinit'; did you mean 'iop3xx_pci_preinit'? [-Werror=implicit-function-declaration] 472 | ixp4xx_pci_preinit(); | ^~~~~~~~~~~~~~~~~~ | iop3xx_pci_preinit arch/arm/mach-ixp4xx/goramo_mlr.c: In function 'gmlr_pci_postinit': arch/arm/mach-ixp4xx/goramo_mlr.c:481:22: error: implicit declaration of function 'ixp4xx_pci_read' [-Werror=implicit-function-declaration] 481 | if (!ixp4xx_pci_read(addr, NP_CMD_CONFIGREAD, &value)) { | ^~~~~~~~~~~~~~~ arch/arm/mach-ixp4xx/goramo_mlr.c:231:35: error: 'IXP4XX_UART1_BASE_PHYS' undeclared here (not in a function) 231 | .start = IXP4XX_UART1_BASE_PHYS, | ^~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-ixp4xx/goramo_mlr.c: In function 'gmlr_init': arch/arm/mach-ixp4xx/goramo_mlr.c:376:9: error: implicit declaration of function 'ixp4xx_sys_init' [-Werror=implicit-function-declaration] 376 | ixp4xx_sys_init(); | ^~~~~~~~~~~~~~~ Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Cc: Linus Walleij Cc: soc@kernel.org Link: https://lore.kernel.org/r/20210721151620.2373500-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann commit 7f94b69ece515ac82defa60ef7cba2cf26180216 Author: Arnd Bergmann Date: Wed Jul 21 23:13:43 2021 +0200 ARM: ixp4xx: fix compile-testing soc drivers Randconfig builds on the ixp4xx ethernet driver showed that the qmgr and npe drivers are not actually built even when compile testing is enabled: ERROR: modpost: "qmgr_stat_empty" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "qmgr_enable_irq" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "qmgr_set_irq" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "__qmgr_request_queue" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "npe_send_recv_message" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "npe_recv_message" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "npe_load_firmware" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "npe_running" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "qmgr_disable_irq" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! ERROR: modpost: "qmgr_stat_below_low_watermark" [drivers/net/ethernet/xscale/ixp4xx_eth.ko] undefined! Fix it by always entering the drivers/soc/ixp4xx/ directory, and fix the resulting compile test failures by removing the #include statements that prevent building on most other platforms. Fixes: 7a6c9dbb36a4 ("soc: ixp4xx: Protect IXP4xx SoC drivers by ARCH_IXP4XX || COMPILE_TEST") Fixes: fcf2d8978cd5 ("ARM: ixp4xx: Move NPE and QMGR to drivers/soc") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210721211412.3537004-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann commit a4282f66d90e93aacfe1b19509fd5851bf95be68 Author: Dmitry Osipenko Date: Thu Jul 22 02:26:16 2021 +0300 soc/tegra: Make regulator couplers depend on CONFIG_REGULATOR The regulator coupler drivers now use regulator-driver API function that isn't available during compile-testing. Make regulator coupler drivers dependent on CONFIG_REGULATOR in Kconfig. Fixes: 03978d42ed0d ("soc/tegra: regulators: Bump voltages on system reboot") Reported-by: kernel test robot Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Signed-off-by: Arnd Bergmann commit 79e48a21045e6f2ccd9f59737685336d9ad75d54 Merge: 47091f473b364 ba02920c51deb Author: Arnd Bergmann Date: Mon Aug 2 14:27:43 2021 +0200 Merge tag 'tegra-for-5.14-rc3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes arm64: tegra: Device tree fixes for v5.14-rc3 This contains one more fix for SMMU enablement on Tegra194, this time for PCIe. * tag 'tegra-for-5.14-rc3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Enable SMMU support for PCIe on Tegra194 Link: https://lore.kernel.org/r/20210716233858.10096-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 47091f473b364c98207c4def197a0ae386fc9af1 Author: Sudeep Holla Date: Sat Jun 26 02:01:03 2021 +0200 ARM: dts: nomadik: Fix up interrupt controller node names Once the new schema interrupt-controller/arm,vic.yaml is added, we get the below warnings: arch/arm/boot/dts/ste-nomadik-nhk15.dt.yaml: intc@10140000: $nodename:0: 'intc@10140000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' Fix the node names for the interrupt controller to conform to the standard node name interrupt-controller@.. Signed-off-by: Sudeep Holla Signed-off-by: Linus Walleij Cc: Linus Walleij Link: https://lore.kernel.org/r/20210617210825.3064367-2-sudeep.holla@arm.com Link: https://lore.kernel.org/r/20210626000103.830184-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 40e159403896f7d55c98f858d0b20fee1d941fa4 Author: David S. Miller Date: Mon Aug 2 12:21:30 2021 +0100 mhi: Fix networking tree build. Signed-off-by: David S. Miller commit 0d5c3954b35eddff0da0436c31e8d721eceb7dc2 Author: Guenter Roeck Date: Sun Aug 1 20:00:23 2021 -0700 spi: mediatek: Fix fifo transfer Commit 3a70dd2d0503 ("spi: mediatek: fix fifo rx mode") claims that fifo RX mode was never handled, and adds the presumably missing code to the FIFO transfer function. However, the claim that receive data was not handled is incorrect. It was handled as part of interrupt handling after the transfer was complete. The code added with the above mentioned commit reads data from the receive FIFO before the transfer is started, which is wrong. This results in an actual transfer error on a Hayato Chromebook. Remove the code trying to handle receive data before the transfer is started to fix the problem. Fixes: 3a70dd2d0503 ("spi: mediatek: fix fifo rx mode") Cc: Peter Hess Cc: Frank Wunderlich Cc: Tzung-Bi Shih Cc: Hsin-Yi Wang Signed-off-by: Guenter Roeck Tested-by: Hsin-Yi Wang Tested-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20210802030023.1748777-1-linux@roeck-us.net Signed-off-by: Mark Brown commit 8b5d95313b6d30f642e4ed0125891984c446604e Author: Takashi Iwai Date: Sat Jul 31 10:43:31 2021 +0200 ASoC: amd: Fix reference to PCM buffer address PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The driver needs to refer to substream->runtime->dma_addr instead for the buffer address. Cc: Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210731084331.32225-1-tiwai@suse.de Signed-off-by: Mark Brown commit ebca25ead0711729e0aeeec45062e7ac4df3e158 Author: Yannick Vignon Date: Fri Jul 30 18:53:21 2021 +0200 net/sched: taprio: Fix init procedure Commit 13511704f8d759 ("net: taprio offload: enforce qdisc to netdev queue mapping") resulted in duplicate entries in the qdisc hash. While this did not impact the overall operation of the qdisc and taprio code paths, it did result in an infinite loop when dumping the qdisc properties, at least on one target (NXP LS1028 ARDB). Removing the duplicate call to qdisc_hash_add() solves the problem. Fixes: 13511704f8d759 ("net: taprio offload: enforce qdisc to netdev queue mapping") Signed-off-by: Yannick Vignon Signed-off-by: David S. Miller commit 85b1ebfea2b0d8797266bcc6f04b6cc87e38290a Author: Colin Ian King Date: Fri Jul 30 08:54:08 2021 +0100 interconnect: Fix undersized devress_alloc allocation The expression sizeof(**ptr) for the void **ptr is just 1 rather than the size of a pointer. Fix this by using sizeof(*ptr). Addresses-Coverity: ("Wrong sizeof argument") Fixes: e145d9a184f2 ("interconnect: Add devm_of_icc_get() as exported API for users") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210730075408.19945-1-colin.king@canonical.com Signed-off-by: Georgi Djakov commit d51c5907e9809a803b276883d203f45849abd4d6 Author: Jakub Sitnicki Date: Thu Jul 29 15:48:20 2021 +0200 net, gro: Set inner transport header offset in tcp/udp GRO hook GSO expects inner transport header offset to be valid when skb->encapsulation flag is set. GSO uses this value to calculate the length of an individual segment of a GSO packet in skb_gso_transport_seglen(). However, tcp/udp gro_complete callbacks don't update the skb->inner_transport_header when processing an encapsulated TCP/UDP segment. As a result a GRO skb has ->inner_transport_header set to a value carried over from earlier skb processing. This can have mild to tragic consequences. From miscalculating the GSO segment length to triggering a page fault [1], when trying to read TCP/UDP header at an address past the skb->data page. The latter scenario leads to an oops report like so: BUG: unable to handle page fault for address: ffff9fa7ec00d008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 123f201067 P4D 123f201067 PUD 123f209067 PMD 0 Oops: 0000 [#1] SMP NOPTI CPU: 44 PID: 0 Comm: swapper/44 Not tainted 5.4.53-cloudflare-2020.7.21 #1 Hardware name: HYVE EDGE-METAL-GEN10/HS-1811DLite1, BIOS V2.15 02/21/2020 RIP: 0010:skb_gso_transport_seglen+0x44/0xa0 Code: c0 41 83 e0 11 f6 87 81 00 00 00 20 74 30 0f b7 87 aa 00 00 00 0f [...] RSP: 0018:ffffad8640bacbb8 EFLAGS: 00010202 RAX: 000000000000feda RBX: ffff9fcc8d31bc00 RCX: ffff9fa7ec00cffc RDX: ffff9fa7ebffdec0 RSI: 000000000000feda RDI: 0000000000000122 RBP: 00000000000005c4 R08: 0000000000000001 R09: 0000000000000000 R10: ffff9fe588ae3800 R11: ffff9fe011fc92f0 R12: ffff9fcc8d31bc00 R13: ffff9fe0119d4300 R14: 00000000000005c4 R15: ffff9fba57d70900 FS: 0000000000000000(0000) GS:ffff9fe68df00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff9fa7ec00d008 CR3: 0000003e99b1c000 CR4: 0000000000340ee0 Call Trace: skb_gso_validate_network_len+0x11/0x70 __ip_finish_output+0x109/0x1c0 ip_sublist_rcv_finish+0x57/0x70 ip_sublist_rcv+0x2aa/0x2d0 ? ip_rcv_finish_core.constprop.0+0x390/0x390 ip_list_rcv+0x12b/0x14f __netif_receive_skb_list_core+0x2a9/0x2d0 netif_receive_skb_list_internal+0x1b5/0x2e0 napi_complete_done+0x93/0x140 veth_poll+0xc0/0x19f [veth] ? mlx5e_napi_poll+0x221/0x610 [mlx5_core] net_rx_action+0x1f8/0x790 __do_softirq+0xe1/0x2bf irq_exit+0x8e/0xc0 do_IRQ+0x58/0xe0 common_interrupt+0xf/0xf The bug can be observed in a simple setup where we send IP/GRE/IP/TCP packets into a netns over a veth pair. Inside the netns, packets are forwarded to dummy device: trafgen -> [veth A]--[veth B] -forward-> [dummy] For veth B to GRO aggregate packets on receive, it needs to have an XDP program attached (for example, a trivial XDP_PASS). Additionally, for UDP, we need to enable GSO_UDP_L4 feature on the device: ip netns exec A ethtool -K AB rx-udp-gro-forwarding on The last component is an artificial delay to increase the chances of GRO batching happening: ip netns exec A tc qdisc add dev AB root \ netem delay 200us slot 5ms 10ms packets 2 bytes 64k With such a setup in place, the bug can be observed by tracing the skb outer and inner offsets when GSO skb is transmitted from the dummy device: tcp: FUNC DEV SKB_LEN NH TH ENC INH ITH GSO_SIZE GSO_TYPE ip_finish_output dumB 2830 270 290 1 294 254 1383 (tcpv4,gre,) ^^^ udp: FUNC DEV SKB_LEN NH TH ENC INH ITH GSO_SIZE GSO_TYPE ip_finish_output dumB 2818 270 290 1 294 254 1383 (gre,udp_l4,) ^^^ Fix it by updating the inner transport header offset in tcp/udp gro_complete callbacks, similar to how {inet,ipv6}_gro_complete callbacks update the inner network header offset, when skb->encapsulation flag is set. [1] https://lore.kernel.org/netdev/CAKxSbF01cLpZem2GFaUaifh0S-5WYViZemTicAg7FCHOnh6kug@mail.gmail.com/ Fixes: bf296b125b21 ("tcp: Add GRO support") Fixes: f993bc25e519 ("net: core: handle encapsulation offloads when computing segment lengths") Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") Reported-by: Alex Forster Signed-off-by: Jakub Sitnicki Signed-off-by: David S. Miller commit 1159e25c137422bdc48ee96e3fb014bd942092c6 Author: Prabhakar Kushwaha Date: Thu Jul 29 14:43:06 2021 +0300 qede: fix crash in rmmod qede while automatic debug collection A crash has been observed if rmmod is done while automatic debug collection in progress. It is due to a race condition between both of them. To fix stop the sp_task during unload to avoid running qede_sp_task even if they are schedule during removal process. Signed-off-by: Alok Prasad Signed-off-by: Shai Malin Signed-off-by: Ariel Elior Signed-off-by: Prabhakar Kushwaha Signed-off-by: David S. Miller commit eda80d7c9c4db0f55f130e38c682e19b58d5add7 Author: Takashi Iwai Date: Sun Aug 1 13:38:01 2021 +0200 ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS The recent code refactoring made the mmap of continuous pages to be done via the own helper snd_dma_continuous_mmap() with remap_pfn_range(). There I overlooked that dmab->addr isn't set for the allocation with SNDRV_DMA_TYPE_CONTINUOUS. This resulted always in an error at mmap with this buffer type on the system such as Intel SST Baytrail driver. This patch fixes the regression by passing the correct address. Fixes: 30b7ba6972d5 ("ALSA: core: Add continuous and vmalloc mmap ops") Reported-by: Hans de Goede Link: https://lore.kernel.org/r/8d6674da-7d7b-803e-acc9-7de6cb1223fa@redhat.com Link: https://lore.kernel.org/r/20210801113801.31290-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7199ddede9f0f2f68d41e6928e1c6c4bca9c39c0 Author: Juergen Borleis Date: Thu Jul 29 09:18:21 2021 +0200 dmaengine: imx-dma: configure the generic DMA type to make it work Commit dea7a9fbb009 ("dmaengine: imx-dma: remove dma_slave_config direction usage") changes the method from a "configuration when called" to an "configuration when used". Due to this, only the cyclic DMA type gets configured correctly, while the generic DMA type is left non-configured. Without this additional call, the struct imxdma_channel::word_size member is stuck at DMA_SLAVE_BUSWIDTH_UNDEFINED and imxdma_prep_slave_sg() always returns NULL. Signed-off-by: Juergen Borleis Fixes: dea7a9fbb009 ("dmaengine: imx-dma: remove dma_slave_config direction usage") Link: https://lore.kernel.org/r/20210729071821.9857-1-jbe@pengutronix.de Signed-off-by: Vinod Koul commit c500bee1c5b2f1d59b1081ac879d73268ab0ff17 Author: Linus Torvalds Date: Sun Aug 1 17:04:17 2021 -0700 Linux 5.14-rc4 commit d4affd6b6e81443ec8d00de0306ca61911e81441 Merge: c82357a7b32c0 9bac1bd6e6d36 Author: Linus Torvalds Date: Sun Aug 1 12:25:30 2021 -0700 Merge tag 'perf-tools-fixes-for-v5.14-2021-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Revert "perf map: Fix dso->nsinfo refcounting", this makes 'perf top' abort, uncovering a design flaw on how namespace information is kept. The fix for that is more than we can do right now, leave it for the next merge window. - Split --dump-raw-trace by AUX records for ARM's CoreSight, fixing up the decoding of some records. - Fix PMU alias matching. Thanks to James Clark and John Garry for these fixes. * tag 'perf-tools-fixes-for-v5.14-2021-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: Revert "perf map: Fix dso->nsinfo refcounting" perf pmu: Fix alias matching perf cs-etm: Split --dump-raw-trace by AUX records commit c82357a7b32c0690b8581f72f197b1ce6118543c Merge: aa6603266cc07 a88603f4b92ec Author: Linus Torvalds Date: Sun Aug 1 12:18:44 2021 -0700 Merge tag 'powerpc-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Don't use r30 in VDSO code, to avoid breaking existing Go lang programs. - Change an export symbol to allow non-GPL modules to use spinlocks again. Thanks to Paul Menzel, and Srikar Dronamraju. * tag 'powerpc-5.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/vdso: Don't use r30 to avoid breaking Go lang powerpc/pseries: Fix regression while building external modules commit aa6603266cc0760ebb83cf11cb5a2b8fca84cd68 Merge: f3438b4c4e692 81a448d7b0668 Author: Linus Torvalds Date: Sun Aug 1 12:07:23 2021 -0700 Merge tag 'xfs-5.14-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "This contains a bunch of bug fixes in XFS. Dave and I have been busy the last couple of weeks to find and fix as many log recovery bugs as we can find; here are the results so far. Go fstests -g recoveryloop! ;) - Fix a number of coordination bugs relating to cache flushes for metadata writeback, cache flushes for multi-buffer log writes, and FUA writes for single-buffer log writes - Fix a bug with incorrect replay of attr3 blocks - Fix unnecessary stalls when flushing logs to disk - Fix spoofing problems when recovering realtime bitmap blocks" * tag 'xfs-5.14-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: prevent spoofing of rtbitmap blocks when recovering buffers xfs: limit iclog tail updates xfs: need to see iclog flags in tracing xfs: Enforce attr3 buffer recovery order xfs: logging the on disk inode LSN can make it go backwards xfs: avoid unnecessary waits in xfs_log_force_lsn() xfs: log forces imply data device cache flushes xfs: factor out forced iclog flushes xfs: fix ordering violation between cache flushes and tail updates xfs: fold __xlog_state_release_iclog into xlog_state_release_iclog xfs: external logs need to flush data device xfs: flush data dev on external log write commit f3438b4c4e692b49b7dc2bab864d20381024be16 Merge: c7d1022326492 b946dbcfa4df8 Author: Linus Torvalds Date: Sat Jul 31 09:25:12 2021 -0700 Merge tag '5.14-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three cifs/smb3 fixes, including two for stable, and a fix for an fallocate problem noticed by Clang" * tag '5.14-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: add missing parsing of backupuid smb3: rc uninitialized in one fallocate path SMB3: fix readpage for large swap cache commit 5afc1540f13804a31bb704b763308e17688369c5 Author: Colin Ian King Date: Fri Jul 30 08:16:51 2021 +0100 iio: adc: Fix incorrect exit of for-loop Currently the for-loop that scans for the optimial adc_period iterates through all the possible adc_period levels because the exit logic in the loop is inverted. I believe the comparison should be swapped and the continue replaced with a break to exit the loop at the correct point. Addresses-Coverity: ("Continue has no effect") Fixes: e08e19c331fb ("iio:adc: add iio driver for Palmas (twl6035/7) gpadc") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210730071651.17394-1-colin.king@canonical.com Cc: Signed-off-by: Jonathan Cameron commit f828b0bcacef189edbd247e9f48864fc36bfbe33 Author: Brian Norris Date: Fri Jul 30 19:59:50 2021 -0700 clk: fix leak on devm_clk_bulk_get_all() unwind clk_bulk_get_all() allocates an array of struct clk_bulk data for us (unlike clk_bulk_get()), so we need to free it. Let's use the clk_bulk_put_all() helper. kmemleak complains, on an RK3399 Gru/Kevin system: unreferenced object 0xffffff80045def00 (size 128): comm "swapper/0", pid 1, jiffies 4294667682 (age 86.394s) hex dump (first 32 bytes): 44 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00 D2`............. 48 32 60 fe fe ff ff ff 00 00 00 00 00 00 00 00 H2`............. backtrace: [<00000000742860d6>] __kmalloc+0x22c/0x39c [<00000000b0493f2c>] clk_bulk_get_all+0x64/0x188 [<00000000325f5900>] devm_clk_bulk_get_all+0x58/0xa8 [<00000000175b9bc5>] dwc3_probe+0x8ac/0xb5c [<000000009169e2f9>] platform_drv_probe+0x9c/0xbc [<000000005c51e2ee>] really_probe+0x13c/0x378 [<00000000c47b1f24>] driver_probe_device+0x84/0xc0 [<00000000f870fcfb>] __device_attach_driver+0x94/0xb0 [<000000004d1b92ae>] bus_for_each_drv+0x8c/0xd8 [<00000000481d60c3>] __device_attach+0xc4/0x150 [<00000000a163bd36>] device_initial_probe+0x1c/0x28 [<00000000accb6bad>] bus_probe_device+0x3c/0x9c [<000000001a199f89>] device_add+0x218/0x3cc [<000000001bd84952>] of_device_add+0x40/0x50 [<000000009c658c29>] of_platform_device_create_pdata+0xac/0x100 [<0000000021c69ba4>] of_platform_bus_create+0x190/0x224 Fixes: f08c2e2865f6 ("clk: add managed version of clk_bulk_get_all") Cc: Dong Aisheng Cc: stable@vger.kernel.org Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20210731025950.2238582-1-briannorris@chromium.org Signed-off-by: Stephen Boyd commit 567c39047dbee341244fe3bf79fea24ee0897ff9 Author: Tianjia Zhang Date: Mon Jul 5 08:09:21 2021 +0300 selftests/sgx: Fix Q1 and Q2 calculation in sigstruct.c Q1 and Q2 are numbers with *maximum* length of 384 bytes. If the calculated length of Q1 and Q2 is less than 384 bytes, things will go wrong. E.g. if Q2 is 383 bytes, then 1. The bytes of q2 are copied to sigstruct->q2 in calc_q1q2(). 2. The entire sigstruct->q2 is reversed, which results it being 256 * Q2, given that the last byte of sigstruct->q2 is added to before the bytes given by calc_q1q2(). Either change in key or measurement can trigger the bug. E.g. an unmeasured heap could cause a devastating change in Q1 or Q2. Reverse exactly the bytes of Q1 and Q2 in calc_q1q2() before returning to the caller. Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") Link: https://lore.kernel.org/linux-sgx/20210301051836.30738-1-tianjia.zhang@linux.alibaba.com/ Signed-off-by: Tianjia Zhang Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit c7d102232649226a69dddd58a4942cf13cff4f7c Merge: e1dab4c02de0b 8d67041228acf Author: Linus Torvalds Date: Fri Jul 30 16:01:36 2021 -0700 Merge tag 'net-5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) and netfilter trees. Current release - regressions: - mac80211: fix starting aggregation sessions on mesh interfaces Current release - new code bugs: - sctp: send pmtu probe only if packet loss in Search Complete state - bnxt_en: add missing periodic PHC overflow check - devlink: fix phys_port_name of virtual port and merge error - hns3: change the method of obtaining default ptp cycle - can: mcba_usb_start(): add missing urb->transfer_dma initialization Previous releases - regressions: - set true network header for ECN decapsulation - mlx5e: RX, avoid possible data corruption w/ relaxed ordering and LRO - phy: re-add check for PHY_BRCM_DIS_TXCRXC_NOENRGY on the BCM54811 PHY - sctp: fix return value check in __sctp_rcv_asconf_lookup Previous releases - always broken: - bpf: - more spectre corner case fixes, introduce a BPF nospec instruction for mitigating Spectre v4 - fix OOB read when printing XDP link fdinfo - sockmap: fix cleanup related races - mac80211: fix enabling 4-address mode on a sta vif after assoc - can: - raw: raw_setsockopt(): fix raw_rcv panic for sock UAF - j1939: j1939_session_deactivate(): clarify lifetime of session object, avoid UAF - fix number of identical memory leaks in USB drivers - tipc: - do not blindly write skb_shinfo frags when doing decryption - fix sleeping in tipc accept routine" * tag 'net-5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (91 commits) gve: Update MAINTAINERS list can: esd_usb2: fix memory leak can: ems_usb: fix memory leak can: usb_8dev: fix memory leak can: mcba_usb_start(): add missing urb->transfer_dma initialization can: hi311x: fix a signedness bug in hi3110_cmd() MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver bpf: Fix leakage due to insufficient speculative store bypass mitigation bpf: Introduce BPF nospec instruction for mitigating Spectre v4 sis900: Fix missing pci_disable_device() in probe and remove net: let flow have same hash in two directions nfc: nfcsim: fix use after free during module unload tulip: windbond-840: Fix missing pci_disable_device() in probe and remove sctp: fix return value check in __sctp_rcv_asconf_lookup nfc: s3fwrn5: fix undefined parameter values in dev_err() net/mlx5: Fix mlx5_vport_tbl_attr chain from u16 to u32 net/mlx5e: Fix nullptr in mlx5e_hairpin_get_mdev() net/mlx5: Unload device upon firmware fatal error net/mlx5e: Fix page allocation failure for ptp-RQ over SF net/mlx5e: Fix page allocation failure for trap-RQ over SF ... commit e1dab4c02de0b495a9393915d71e452f8e77a464 Merge: 3a34b13a88cae e83f54eacf137 Author: Linus Torvalds Date: Fri Jul 30 15:56:24 2021 -0700 Merge tag 'acpi-5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert a recent IRQ resources handling modification that turned out to be problematic, fix suspend-to-idle handling on AMD platforms to take upcoming systems into account properly and fix the retrieval of the DPTF attributes of the PCH FIVR. Specifics: - Revert recent change of the ACPI IRQ resources handling that attempted to improve the ACPI IRQ override selection logic, but introduced serious regressions on some systems (Hui Wang). - Fix up quirks for AMD platforms in the suspend-to-idle support code so as to take upcoming systems using uPEP HID AMDI007 into account as appropriate (Mario Limonciello). - Fix the code retrieving DPTF attributes of the PCH FIVR so that it agrees on the return data type with the ACPI control method evaluated for this purpose (Srinivas Pandruvada)" * tag 'acpi-5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: DPTF: Fix reading of attributes Revert "ACPI: resources: Add checks for ACPI IRQ override" ACPI: PM: Add support for upcoming AMD uPEP HID AMDI007 commit ff41c28c4b54052942180d8b3f49e75f1445135a Author: Kamal Agrawal Date: Fri Jul 30 18:53:06 2021 +0530 tracing: Fix NULL pointer dereference in start_creating The event_trace_add_tracer() can fail. In this case, it leads to a crash in start_creating with below call stack. Handle the error scenario properly in trace_array_create_dir. Call trace: down_write+0x7c/0x204 start_creating.25017+0x6c/0x194 tracefs_create_file+0xc4/0x2b4 init_tracer_tracefs+0x5c/0x940 trace_array_create_dir+0x58/0xb4 trace_array_create+0x1bc/0x2b8 trace_array_get_by_name+0xdc/0x18c Link: https://lkml.kernel.org/r/1627651386-21315-1-git-send-email-kamaagra@codeaurora.org Cc: stable@vger.kernel.org Fixes: 4114fbfd02f1 ("tracing: Enable creating new instance early boot") Signed-off-by: Kamal Agrawal Signed-off-by: Steven Rostedt (VMware) commit 3a34b13a88caeb2800ab44a4918f230041b37dd9 Author: Linus Torvalds Date: Fri Jul 30 15:42:34 2021 -0700 pipe: make pipe writes always wake up readers Since commit 1b6b26ae7053 ("pipe: fix and clarify pipe write wakeup logic") we have sanitized the pipe write logic, and would only try to wake up readers if they needed it. In particular, if the pipe already had data in it before the write, there was no point in trying to wake up a reader, since any existing readers must have been aware of the pre-existing data already. Doing extraneous wakeups will only cause potential thundering herd problems. However, it turns out that some Android libraries have misused the EPOLL interface, and expected "edge triggered" be to "any new write will trigger it". Even if there was no edge in sight. Quoting Sandeep Patil: "The commit 1b6b26ae7053 ('pipe: fix and clarify pipe write wakeup logic') changed pipe write logic to wakeup readers only if the pipe was empty at the time of write. However, there are libraries that relied upon the older behavior for notification scheme similar to what's described in [1] One such library 'realm-core'[2] is used by numerous Android applications. The library uses a similar notification mechanism as GNU Make but it never drains the pipe until it is full. When Android moved to v5.10 kernel, all applications using this library stopped working. The library has since been fixed[3] but it will be a while before all applications incorporate the updated library" Our regression rule for the kernel is that if applications break from new behavior, it's a regression, even if it was because the application did something patently wrong. Also note the original report [4] by Michal Kerrisk about a test for this epoll behavior - but at that point we didn't know of any actual broken use case. So add the extraneous wakeup, to approximate the old behavior. [ I say "approximate", because the exact old behavior was to do a wakeup not for each write(), but for each pipe buffer chunk that was filled in. The behavior introduced by this change is not that - this is just "every write will cause a wakeup, whether necessary or not", which seems to be sufficient for the broken library use. ] It's worth noting that this adds the extraneous wakeup only for the write side, while the read side still considers the "edge" to be purely about reading enough from the pipe to allow further writes. See commit f467a6a66419 ("pipe: fix and clarify pipe read wakeup logic") for the pipe read case, which remains that "only wake up if the pipe was full, and we read something from it". Link: https://lore.kernel.org/lkml/CAHk-=wjeG0q1vgzu4iJhW5juPkTsjTYmiqiMUYAebWW+0bam6w@mail.gmail.com/ [1] Link: https://github.com/realm/realm-core [2] Link: https://github.com/realm/realm-core/issues/4666 [3] Link: https://lore.kernel.org/lkml/CAKgNAkjMBGeAwF=2MKK758BhxvW58wYTgYKB2V-gY1PwXxrH+Q@mail.gmail.com/ [4] Link: https://lore.kernel.org/lkml/20210729222635.2937453-1-sspatil@android.com/ Reported-by: Sandeep Patil Cc: Michael Kerrisk Signed-off-by: Linus Torvalds commit 9bac1bd6e6d36459087a728a968e79e37ebcea1a Author: Arnaldo Carvalho de Melo Date: Fri Jul 30 18:26:22 2021 -0300 Revert "perf map: Fix dso->nsinfo refcounting" This makes 'perf top' abort in some cases, and the right fix will involve surgery that is too much to do at this stage, so revert for now and fix it in the next merge window. This reverts commit 2d6b74baa7147251c30a46c4996e8cc224aa2dc5. Cc: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Krister Johansen Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo commit e83f54eacf137de228a52c20c74e77f575684600 Merge: f0c6225531e4a e0eef3690dc66 41a8457f3f6f8 Author: Rafael J. Wysocki Date: Fri Jul 30 20:26:38 2021 +0200 Merge branches 'acpi-resources' and 'acpi-dptf' * acpi-resources: Revert "ACPI: resources: Add checks for ACPI IRQ override" * acpi-dptf: ACPI: DPTF: Fix reading of attributes commit 852a8a97776a153be2e6c803218eced45f37a19c Author: Jaroslav Kysela Date: Fri Jul 30 11:02:54 2021 +0200 ALSA: pcm - fix mmap capability check for the snd-dummy driver The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too. Cc: Fixes: c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210730090254.612478-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 4669e13cd67f8532be12815ed3d37e775a9bdc16 Merge: 27eb687bcdb98 340e84573878b Author: Linus Torvalds Date: Fri Jul 30 11:08:12 2021 -0700 Merge tag 'block-5.14-2021-07-30' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - gendisk freeing fix (Christoph) - blk-iocost wake ordering fix (Tejun) - tag allocation error handling fix (John) - loop locking fix. While this isn't the prettiest fix in the world, nobody has any good alternatives for 5.14. Something to likely revisit for 5.15. (Tetsuo) * tag 'block-5.14-2021-07-30' of git://git.kernel.dk/linux-block: block: delay freeing the gendisk blk-iocost: fix operation ordering in iocg_wake_fn() blk-mq-sched: Fix blk_mq_sched_alloc_tags() error handling loop: reintroduce global lock for safe loop_validate_file() traversal commit 27eb687bcdb987d978da842ede944bee335b3524 Merge: f6c5971bb78ee a890d01e4ee01 Author: Linus Torvalds Date: Fri Jul 30 11:01:47 2021 -0700 Merge tag 'io_uring-5.14-2021-07-30' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - A fix for block backed reissue (me) - Reissue context hardening (me) - Async link locking fix (Pavel) * tag 'io_uring-5.14-2021-07-30' of git://git.kernel.dk/linux-block: io_uring: fix poll requests leaking second poll entries io_uring: don't block level reissue off completion path io_uring: always reissue from task_work context io_uring: fix race in unified task_work running io_uring: fix io_prep_async_link locking commit f6c5971bb78ee5c4b9659f2764e58c175b75638c Merge: 051df241e4469 094121ef815f2 Author: Linus Torvalds Date: Fri Jul 30 10:56:47 2021 -0700 Merge tag 'libata-5.14-2021-07-30' of git://git.kernel.dk/linux-block Pull libata fixlets from Jens Axboe: - A fix for PIO highmem (Christoph) - Kill HAVE_IDE as it's now unused (Lukas) * tag 'libata-5.14-2021-07-30' of git://git.kernel.dk/linux-block: arch: Kconfig: clean up obsolete use of HAVE_IDE libata: fix ata_pio_sector for CONFIG_HIGHMEM commit 051df241e44693dba8f4e1e74184237f55dd811d Merge: 8723bc8fb38cf 7280305eb57dd Author: Linus Torvalds Date: Fri Jul 30 10:50:09 2021 -0700 Merge tag 'for-5.14-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix -Warray-bounds warning, to help external patchset to make it default treewide - fix writeable device accounting (syzbot report) - fix fsync and log replay after a rename and inode eviction - fix potentially lost error code when submitting multiple bios for compressed range * tag 'for-5.14-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: calculate number of eb pages properly in csum_tree_block btrfs: fix rw device counting in __btrfs_free_extra_devids btrfs: fix lost inode on log replay after mix of fsync, rename and inode eviction btrfs: mark compressed range uptodate only if all bio succeed commit 8723bc8fb38cf4ff18e23ed31d424ba39e81a7cb Merge: ad6ec09d9622e db8d3a21275c8 Author: Linus Torvalds Date: Fri Jul 30 10:36:36 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - resume timing fix for intel-ish driver (Ye Xiang) - fix for using incorrect MMIO register in amd_sfh driver (Dylan MacKenzie) - Cintiq 24HDT / 27QHDT regression fix and touch processing fix for Wacom driver (Jason Gerecke) - device removal bugfix for ft260 driver (Michael Zaidman) - other small assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: ft260: fix device removal due to USB disconnect HID: wacom: Skip processing of touches with negative slot values HID: wacom: Re-enable touch by default for Cintiq 24HDT / 27QHDT HID: Kconfig: Fix spelling mistake "Uninterruptable" -> "Uninterruptible" HID: apple: Add support for Keychron K1 wireless keyboard HID: fix typo in Kconfig HID: ft260: fix format type warning in ft260_word_show() HID: amd_sfh: Use correct MMIO register for DMA address HID: asus: Remove check for same LED brightness on set HID: intel-ish-hid: use async resume function commit 1d25684e22516f1cff77176d288b1da02fff57bb Author: Mark Brown Date: Thu Jul 29 00:47:29 2021 +0100 ASoC: nau8824: Fix open coded prefix handling As with the component layer code the nau8824 driver had been doing some open coded pin manipulation which will have been broken now the core is fixed to handle this properly, remove the open coding to avoid the issue. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210728234729.10135-1-broonie@kernel.org Signed-off-by: Mark Brown commit ad6ec09d9622efca3f31ab34f925c15185c2bd0e Merge: 764a5bc89b12b 121dffe20b141 Author: Linus Torvalds Date: Fri Jul 30 10:29:58 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "7 patches. Subsystems affected by this patch series: lib, ocfs2, and mm (slub, migration, and memcg)" * emailed patches from Andrew Morton : mm/memcg: fix NULL pointer dereference in memcg_slab_free_hook() slub: fix unreclaimable slab stat for bulk free mm/migrate: fix NR_ISOLATED corruption on 64-bit mm: memcontrol: fix blocking rstat function called from atomic cgroup1 thresholding code ocfs2: issue zeroout to EOF blocks ocfs2: fix zero out valid data lib/test_string.c: move string selftest in the Runtime Testing menu commit 8d67041228acf41addabdee5a60073e1b729e308 Merge: 028a71775f811 928150fad41ba Author: Jakub Kicinski Date: Fri Jul 30 19:29:52 2021 +0200 Merge tag 'linux-can-fixes-for-5.14-20210730' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-07-30 The first patch is by me and adds Yasushi SHOJI as a reviewer for the Microchip CAN BUS Analyzer Tool driver. Dan Carpenter's patch fixes a signedness bug in the hi311x driver. Pavel Skripkin provides 4 patches, the first targets the mcba_usb driver by adding the missing urb->transfer_dma initialization, which was broken in a previous commit. The last 3 patches fix a memory leak in the usb_8dev, ems_usb and esd_usb2 driver. * tag 'linux-can-fixes-for-5.14-20210730' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: esd_usb2: fix memory leak can: ems_usb: fix memory leak can: usb_8dev: fix memory leak can: mcba_usb_start(): add missing urb->transfer_dma initialization can: hi311x: fix a signedness bug in hi3110_cmd() MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver ==================== Link: https://lore.kernel.org/r/20210730070526.1699867-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 121dffe20b141c9b27f39d49b15882469cbebae7 Author: Wang Hai Date: Thu Jul 29 14:53:54 2021 -0700 mm/memcg: fix NULL pointer dereference in memcg_slab_free_hook() When I use kfree_rcu() to free a large memory allocated by kmalloc_node(), the following dump occurs. BUG: kernel NULL pointer dereference, address: 0000000000000020 [...] Oops: 0000 [#1] SMP [...] Workqueue: events kfree_rcu_work RIP: 0010:__obj_to_index include/linux/slub_def.h:182 [inline] RIP: 0010:obj_to_index include/linux/slub_def.h:191 [inline] RIP: 0010:memcg_slab_free_hook+0x120/0x260 mm/slab.h:363 [...] Call Trace: kmem_cache_free_bulk+0x58/0x630 mm/slub.c:3293 kfree_bulk include/linux/slab.h:413 [inline] kfree_rcu_work+0x1ab/0x200 kernel/rcu/tree.c:3300 process_one_work+0x207/0x530 kernel/workqueue.c:2276 worker_thread+0x320/0x610 kernel/workqueue.c:2422 kthread+0x13d/0x160 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 When kmalloc_node() a large memory, page is allocated, not slab, so when freeing memory via kfree_rcu(), this large memory should not be used by memcg_slab_free_hook(), because memcg_slab_free_hook() is is used for slab. Using page_objcgs_check() instead of page_objcgs() in memcg_slab_free_hook() to fix this bug. Link: https://lkml.kernel.org/r/20210728145655.274476-1-wanghai38@huawei.com Fixes: 270c6a71460e ("mm: memcontrol/slab: Use helpers to access slab page's memcg_data") Signed-off-by: Wang Hai Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Roman Gushchin Reviewed-by: Kefeng Wang Reviewed-by: Muchun Song Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Johannes Weiner Cc: Alexei Starovoitov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f227f0faf63b46a113c4d1aca633c80195622dd2 Author: Shakeel Butt Date: Thu Jul 29 14:53:50 2021 -0700 slub: fix unreclaimable slab stat for bulk free SLUB uses page allocator for higher order allocations and update unreclaimable slab stat for such allocations. At the moment, the bulk free for SLUB does not share code with normal free code path for these type of allocations and have missed the stat update. So, fix the stat update by common code. The user visible impact of the bug is the potential of inconsistent unreclaimable slab stat visible through meminfo and vmstat. Link: https://lkml.kernel.org/r/20210728155354.3440560-1-shakeelb@google.com Fixes: 6a486c0ad4dc ("mm, sl[ou]b: improve memory accounting") Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Roman Gushchin Reviewed-by: Muchun Song Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b5916c025432b7c776b6bb13617485fbc0bd3ebd Author: Aneesh Kumar K.V Date: Thu Jul 29 14:53:47 2021 -0700 mm/migrate: fix NR_ISOLATED corruption on 64-bit Similar to commit 2da9f6305f30 ("mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit") avoid using unsigned int for nr_pages. With unsigned int type the large unsigned int converts to a large positive signed long. Symptoms include CMA allocations hanging forever due to alloc_contig_range->...->isolate_migratepages_block waiting forever in "while (unlikely(too_many_isolated(pgdat)))". Link: https://lkml.kernel.org/r/20210728042531.359409-1-aneesh.kumar@linux.ibm.com Fixes: c5fc5c3ae0c8 ("mm: migrate: account THP NUMA migration counters correctly") Signed-off-by: Aneesh Kumar K.V Reported-by: Michael Ellerman Reported-by: Alexey Kardashevskiy Reviewed-by: Yang Shi Cc: Mel Gorman Cc: Nicholas Piggin Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30def93565e5ba08676aa2b9083f253fc586dbed Author: Johannes Weiner Date: Thu Jul 29 14:53:44 2021 -0700 mm: memcontrol: fix blocking rstat function called from atomic cgroup1 thresholding code Dan Carpenter reports: The patch 2d146aa3aa84: "mm: memcontrol: switch to rstat" from Apr 29, 2021, leads to the following static checker warning: kernel/cgroup/rstat.c:200 cgroup_rstat_flush() warn: sleeping in atomic context mm/memcontrol.c 3572 static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap) 3573 { 3574 unsigned long val; 3575 3576 if (mem_cgroup_is_root(memcg)) { 3577 cgroup_rstat_flush(memcg->css.cgroup); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is from static analysis and potentially a false positive. The problem is that mem_cgroup_usage() is called from __mem_cgroup_threshold() which holds an rcu_read_lock(). And the cgroup_rstat_flush() function can sleep. 3578 val = memcg_page_state(memcg, NR_FILE_PAGES) + 3579 memcg_page_state(memcg, NR_ANON_MAPPED); 3580 if (swap) 3581 val += memcg_page_state(memcg, MEMCG_SWAP); 3582 } else { 3583 if (!swap) 3584 val = page_counter_read(&memcg->memory); 3585 else 3586 val = page_counter_read(&memcg->memsw); 3587 } 3588 return val; 3589 } __mem_cgroup_threshold() indeed holds the rcu lock. In addition, the thresholding code is invoked during stat changes, and those contexts have irqs disabled as well. If the lock breaking occurs inside the flush function, it will result in a sleep from an atomic context. Use the irqsafe flushing variant in mem_cgroup_usage() to fix this. Link: https://lkml.kernel.org/r/20210726150019.251820-1-hannes@cmpxchg.org Fixes: 2d146aa3aa84 ("mm: memcontrol: switch to rstat") Signed-off-by: Johannes Weiner Reported-by: Dan Carpenter Acked-by: Chris Down Reviewed-by: Rik van Riel Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9449ad33be8480f538b11a593e2dda2fb33ca06d Author: Junxiao Bi Date: Thu Jul 29 14:53:41 2021 -0700 ocfs2: issue zeroout to EOF blocks For punch holes in EOF blocks, fallocate used buffer write to zero the EOF blocks in last cluster. But since ->writepage will ignore EOF pages, those zeros will not be flushed. This "looks" ok as commit 6bba4471f0cc ("ocfs2: fix data corruption by fallocate") will zero the EOF blocks when extend the file size, but it isn't. The problem happened on those EOF pages, before writeback, those pages had DIRTY flag set and all buffer_head in them also had DIRTY flag set, when writeback run by write_cache_pages(), DIRTY flag on the page was cleared, but DIRTY flag on the buffer_head not. When next write happened to those EOF pages, since buffer_head already had DIRTY flag set, it would not mark page DIRTY again. That made writeback ignore them forever. That will cause data corruption. Even directio write can't work because it will fail when trying to drop pages caches before direct io, as it found the buffer_head for those pages still had DIRTY flag set, then it will fall back to buffer io mode. To make a summary of the issue, as writeback ingores EOF pages, once any EOF page is generated, any write to it will only go to the page cache, it will never be flushed to disk even file size extends and that page is not EOF page any more. The fix is to avoid zero EOF blocks with buffer write. The following code snippet from qemu-img could trigger the corruption. 656 open("6b3711ae-3306-4bdd-823c-cf1c0060a095.conv.2", O_RDWR|O_DIRECT|O_CLOEXEC) = 11 ... 660 fallocate(11, FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE, 2275868672, 327680 660 fallocate(11, 0, 2275868672, 327680) = 0 658 pwrite64(11, " Link: https://lkml.kernel.org/r/20210722054923.24389-2-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f267aeb6dea5e468793e5b8eb6a9c72c0020d418 Author: Junxiao Bi Date: Thu Jul 29 14:53:38 2021 -0700 ocfs2: fix zero out valid data If append-dio feature is enabled, direct-io write and fallocate could run in parallel to extend file size, fallocate used "orig_isize" to record i_size before taking "ip_alloc_sem", when ocfs2_zeroout_partial_cluster() zeroout EOF blocks, i_size maybe already extended by ocfs2_dio_end_io_write(), that will cause valid data zeroed out. Link: https://lkml.kernel.org/r/20210722054923.24389-1-junxiao.bi@oracle.com Fixes: 6bba4471f0cc ("ocfs2: fix data corruption by fallocate") Signed-off-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Joel Becker Cc: Jun Piao Cc: Mark Fasheh Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2ff70a01a7a8083e749e01e5d3ffda706fe3305 Author: Matteo Croce Date: Thu Jul 29 14:53:35 2021 -0700 lib/test_string.c: move string selftest in the Runtime Testing menu STRING_SELFTEST is presented in the "Library routines" menu. Move it in Kernel hacking > Kernel Testing and Coverage > Runtime Testing together with other similar tests found in lib/ --- Runtime Testing <*> Test functions located in the hexdump module at runtime <*> Test string functions (NEW) <*> Test functions located in the string_helpers module at runtime <*> Test strscpy*() family of functions at runtime <*> Test kstrto*() family of functions at runtime <*> Test printf() family of functions at runtime <*> Test scanf() family of functions at runtime Link: https://lkml.kernel.org/r/20210719185158.190371-1-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Cc: Peter Rosin Cc: Geert Uytterhoeven Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 028a71775f811e9d60664ba2c248ff95c6cf57cb Author: Catherine Sullivan Date: Thu Jul 29 08:52:58 2021 -0700 gve: Update MAINTAINERS list The team maintaining the gve driver has undergone some changes, this updates the MAINTAINERS file accordingly. Signed-off-by: Catherine Sullivan Signed-off-by: Jon Olson Signed-off-by: David Awogbemila Signed-off-by: Jeroen de Borst Link: https://lore.kernel.org/r/20210729155258.442650-1-csully@google.com Signed-off-by: Jakub Kicinski commit bb6a40fc5a830cae45ddd5cd6cfa151b008522ed Author: Takashi Iwai Date: Wed Jul 28 13:23:53 2021 +0200 ASoC: kirkwood: Fix reference to PCM buffer address The transition to the managed PCM buffers allowed the dynamically buffer allocation, while the driver code still assumes the fixed preallocation buffer and sets up the DMA stuff at the open call. This needs to be moved to hw_params after the buffer allocation and setup. Also, the reference to the buffer address has to be corrected to runtime->dma_addr. Fixes: b3c0ae75f5d3 ("ASoC: kirkwood: Use managed DMA buffer allocation") Cc: Lars-Peter Clausen Cc: Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210728112353.6675-6-tiwai@suse.de Signed-off-by: Mark Brown commit 827f3164aaa579eee6fd50c6654861d54f282a11 Author: Takashi Iwai Date: Wed Jul 28 13:23:52 2021 +0200 ASoC: uniphier: Fix reference to PCM buffer address Along with the transition to the managed PCM buffers, the driver now accepts the dynamically allocated buffer, while it still kept the reference to the old preallocated buffer address. This patch corrects to the right reference via runtime->dma_addr. (Although this might have been already buggy before the cleanup with the managed buffer, let's put Fixes tag to point that; it's a corner case, after all.) Fixes: d55894bc2763 ("ASoC: uniphier: Use managed buffer allocation") Cc: Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210728112353.6675-5-tiwai@suse.de Signed-off-by: Mark Brown commit 42bc62c9f1d3d4880bdc27acb5ab4784209bb0b0 Author: Takashi Iwai Date: Wed Jul 28 13:23:51 2021 +0200 ASoC: xilinx: Fix reference to PCM buffer address PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The driver needs to refer to substream->runtime->dma_addr instead for the buffer address. Cc: Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210728112353.6675-4-tiwai@suse.de Signed-off-by: Mark Brown commit 2e6b836312a477d647a7920b56810a5a25f6c856 Author: Takashi Iwai Date: Wed Jul 28 13:23:50 2021 +0200 ASoC: intel: atom: Fix reference to PCM buffer address PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The address should be retrieved from runtime->dma_addr, instead of substream->dma_buffer (and shouldn't use virt_to_phys). Also, remove the line overriding runtime->dma_area superfluously, which was already set up at the PCM buffer allocation. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210728112353.6675-3-tiwai@suse.de Signed-off-by: Mark Brown commit 1c0539a6fc8a4a4b77278e35d763073890de96b9 Author: Yifan Zhang Date: Thu Jun 10 09:55:01 2021 +0800 drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir. If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d77f36f2c8c62b230f4a5eb264c169fa04c4a5a Author: xinhui pan Date: Tue Jul 27 17:43:37 2021 +0800 drm/amdgpu: Fix out-of-bounds read when update mapping If one GTT BO has been evicted/swapped out, it should sit in CPU domain. TTM only alloc struct ttm_resource instead of struct ttm_range_mgr_node for sysMem. Now when we update mapping for such invalidated BOs, we might walk out of bounds of struct ttm_resource. Three possible fix: 1) Let sysMem manager alloc struct ttm_range_mgr_node, like ttm_range_manager does. 2) Pass pages_addr to update_mapping function too, but need memset pages_addr[] to zero when unpopulate. 3) Init amdgpu_res_cursor directly. bug is detected by kfence. ================================================================== BUG: KFENCE: out-of-bounds read in amdgpu_vm_bo_update_mapping+0x564/0x6e0 Out-of-bounds read at 0x000000008ea93fe9 (64B right of kfence-#167): amdgpu_vm_bo_update_mapping+0x564/0x6e0 [amdgpu] amdgpu_vm_bo_update+0x282/0xa40 [amdgpu] amdgpu_vm_handle_moved+0x19e/0x1f0 [amdgpu] amdgpu_cs_vm_handling+0x4e4/0x640 [amdgpu] amdgpu_cs_ioctl+0x19e7/0x23c0 [amdgpu] drm_ioctl_kernel+0xf3/0x180 [drm] drm_ioctl+0x2cb/0x550 [drm] amdgpu_drm_ioctl+0x5e/0xb0 [amdgpu] kfence-#167 [0x000000008e11c055-0x000000001f676b3e ttm_sys_man_alloc+0x35/0x80 [ttm] ttm_resource_alloc+0x39/0x50 [ttm] ttm_bo_swapout+0x252/0x5a0 [ttm] ttm_device_swapout+0x107/0x180 [ttm] ttm_global_swapout+0x6f/0x130 [ttm] ttm_tt_populate+0xb1/0x2a0 [ttm] ttm_bo_handle_move_mem+0x17e/0x1d0 [ttm] ttm_mem_evict_first+0x59d/0x9c0 [ttm] ttm_bo_mem_space+0x39f/0x400 [ttm] ttm_bo_validate+0x13c/0x340 [ttm] ttm_bo_init_reserved+0x269/0x540 [ttm] amdgpu_bo_create+0x1d1/0xa30 [amdgpu] amdgpu_bo_create_user+0x40/0x80 [amdgpu] amdgpu_gem_object_create+0x71/0xc0 [amdgpu] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x2f2/0xcd0 [amdgpu] kfd_ioctl_alloc_memory_of_gpu+0xe2/0x330 [amdgpu] kfd_ioctl+0x461/0x690 [amdgpu] Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1e9faef4d26de33bd6b5018695996e7394119e5b Author: Johan Hovold Date: Fri Jul 30 14:21:56 2021 +0200 USB: serial: pl2303: fix HX type detection The device release number for HX-type devices is configurable in EEPROM/OTPROM and cannot be used reliably for type detection. Assume all (non-H) devices with bcdUSB 1.1 and unknown bcdDevice to be of HX type while adding a bcdDevice check for HXD and TB (1.1 and 2.0, respectively). Reported-by: Chris Fixes: 8a7bf7510d1f ("USB: serial: pl2303: amend and tighten type detection") Cc: stable@vger.kernel.org # 5.13 Link: https://lore.kernel.org/r/20210730122156.718-1-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 88731c8f3636b133e27df88febcd7cd2fdece0a7 Author: Vasily Gorbik Date: Thu Jul 29 15:29:19 2021 +0200 s390/boot: fix zstd build for -march=z900 zstd decompression uses __builtin_clz() which fails back to __clzdi2() when the kernel is built for older hardware like z900. This leads to build failures like the following: s390x-11.1.0-ld: /devel/src/kernel/arch/s390/boot/compressed/../../../../lib/zstd/bitstream.h:148: undefined reference to `__clzdi2' Fix that by optionally including lib/clz_ctz.c into the decompressor. Reported-by: kernel test robot Fixes: 7b034d9c1b08 ("s390/boot: add zstd support") Signed-off-by: Vasily Gorbik Link: https://lore.kernel.org/r/patch-1.thread-f0f589.git-f0f58936888f.your-ad-here.call-01627564869-ext-2765@work.hours Signed-off-by: Heiko Carstens commit 7561c14d8a4d1a24a40b1839d927d488e2d6345a Author: Sumanth Korikkar Date: Wed Jul 28 13:24:53 2021 +0200 s390/vdso: add .got.plt in vdso linker script KCFLAGS="-mno-pic-data-is-text-relative" make leads to bfd assertion error in s390_got_pointer(): LD arch/s390/kernel/vdso64/vdso64.so.dbg ld: BFD version 2.35-18.fc33 assertion fail elf-s390-common.c:74 readelf -Wr vdso64_generic.o | grep GOT 0000000000000032 000000110000001a R_390_GOTENT 0000000000000000 _vdso_data + 2 (...) Add .got.plt in linker script to avoid this. Suggested-by: Ilya Leoshkevich Signed-off-by: Sumanth Korikkar Signed-off-by: Heiko Carstens commit 094121ef815f29d9e6a01fafca365831454ce293 Author: Lukas Bulwahn Date: Wed Jul 28 20:21:15 2021 +0200 arch: Kconfig: clean up obsolete use of HAVE_IDE The arch-specific Kconfig files use HAVE_IDE to indicate if IDE is supported. As IDE support and the HAVE_IDE config vanishes with commit b7fb14d3ac63 ("ide: remove the legacy ide driver"), there is no need to mention HAVE_IDE in all those arch-specific Kconfig files. The issue was identified with ./scripts/checkkconfigsymbols.py. Fixes: b7fb14d3ac63 ("ide: remove the legacy ide driver") Suggested-by: Randy Dunlap Signed-off-by: Lukas Bulwahn Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210728182115.4401-1-lukas.bulwahn@gmail.com Reviewed-by: Christoph Hellwig Acked-by: Geert Uytterhoeven Signed-off-by: Jens Axboe commit f84f5b6f72e68bbaeb850b58ac167e4a3a47532a Author: Mike Tipton Date: Wed Jul 21 10:54:32 2021 -0700 interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate We're only adding BCMs to the commit list in aggregate(), but there are cases where pre_aggregate() is called without subsequently calling aggregate(). In particular, in icc_sync_state() when a node with initial BW has zero requests. Since BCMs aren't added to the commit list in these cases, we don't actually send the zero BW request to HW. So the resources remain on unnecessarily. Add BCMs to the commit list in pre_aggregate() instead, which is always called even when there are no requests. Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20210721175432.2119-5-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit ce5a595744126be4f1327e29e3c5ae9aac6b38d5 Author: Mike Tipton Date: Wed Jul 21 10:54:31 2021 -0700 interconnect: qcom: icc-rpmh: Ensure floor BW is enforced for all nodes We currently only enforce BW floors for a subset of nodes in a path. All BCMs that need updating are queued in the pre_aggregate/aggregate phase. The first set() commits all queued BCMs and subsequent set() calls short-circuit without committing anything. Since the floor BW isn't set in sum_avg/max_peak until set(), then some BCMs are committed before their associated nodes reflect the floor. Set the floor as each node is being aggregated. This ensures that all all relevant floors are set before the BCMs are committed. Fixes: 266cd33b5913 ("interconnect: qcom: Ensure that the floor bandwidth value is enforced") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20210721175432.2119-4-mdtipton@codeaurora.org [georgi: Removed unused variable] Signed-off-by: Georgi Djakov commit 15f68f027ebd961b99a1c420f96ff3838c5e4450 Author: Marek Vasut Date: Wed Jul 21 20:10:40 2021 +0200 ARM: dts: stm32: Fix touchscreen IRQ line assignment on DHCOM While 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2") fixed the LED0 assignment on the PDK2 board, the same commit did not update the touchscreen IRQ line assignment, which is the same GPIO line, shared between the LED0 output and touchscreen IRQ input. To make this more convoluted, the same EXTI input (not the same GPIO line) is shared between Button B which is Active-Low IRQ, and touchscreen IRQ which is Edge-Falling IRQ, which cannot be used at the same time. In case the LCD board with touchscreen is in use, which is the case here, LED0 must be disabled, Button B must be polled, so the touchscreen interrupt works as it should. Update the touchscreen IRQ line assignment, disable LED0 and use polled GPIO button driver for Button B, since the DT here describes baseboard with LCD board. Fixes: 7e5f3155dcbb4 ("ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 36862c1ebc92a7e6fcc55002965c44b8ad17d4ca Author: Marek Vasut Date: Wed Jul 21 20:12:53 2021 +0200 ARM: dts: stm32: Disable LAN8710 EDPD on DHCOM The LAN8710 Energy Detect Power Down (EDPD) functionality might cause unreliable cable detection. There are multiple accounts of this in the SMSC PHY driver patches which attempted to make EDPD reliable, however it seems there is always some sort of corner case left. Unfortunatelly, there is no errata documented which would confirm this to be a silicon bug on the LAN87xx series of PHYs (LAN8700, LAN8710, LAN8720 at least). Disable EDPD on the DHCOM SoM, just like multiple other boards already do as well, to make the cable detection reliable. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 3a0670824979a986a2314c921aa092e60730eeae Author: Marek Vasut Date: Sun Jun 20 20:54:21 2021 +0200 ARM: dts: stm32: Prefer HW RTC on DHCOM SoM The DHCOM SoM has two RTC, one is the STM32 RTC built into the SoC and another is Microcrystal RV RTC. By default, only the later has battery backup, the former does not. The order in which the RTCs are probed on boot is random, which means the kernel might pick up system time from the STM32 RTC which has no battery backup. This then leads to incorrect initial system time setup, even though the HW RTC has correct time configured in it. Add DT alias entries, so that the RTCs get assigned fixed IDs and the HW RTC is always picked by the kernel as the default RTC, thus resulting in correct system time in early userspace. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit fa7a549d321a4189677b0cea86e58d9db7977f7b Author: Paolo Bonzini Date: Wed Jul 14 17:37:49 2021 -0400 KVM: x86: accept userspace interrupt only if no event is injected Once an exception has been injected, any side effects related to the exception (such as setting CR2 or DR6) have been taked place. Therefore, once KVM sets the VM-entry interruption information field or the AMD EVENTINJ field, the next VM-entry must deliver that exception. Pending interrupts are processed after injected exceptions, so in theory it would not be a problem to use KVM_INTERRUPT when an injected exception is present. However, DOSEMU is using run->ready_for_interrupt_injection to detect interrupt windows and then using KVM_SET_SREGS/KVM_SET_REGS to inject the interrupt manually. For this to work, the interrupt window must be delayed after the completion of the previous event injection. Cc: stable@vger.kernel.org Reported-by: Stas Sergeev Tested-by: Stas Sergeev Fixes: 71cc849b7093 ("KVM: x86: Fix split-irqchip vs interrupt injection window request") Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 341abd693d10e5f337a51f140ae3e7a1ae0febf6 Author: Mario Kleiner Date: Thu Jul 29 06:33:06 2021 +0200 serial: 8250_pci: Avoid irq sharing for MSI(-X) interrupts. This attempts to fix a bug found with a serial port card which uses an MCS9922 chip, one of the 4 models for which MSI-X interrupts are currently supported. I don't possess such a card, and i'm not experienced with the serial subsystem, so this patch is based on what i think i found as a likely reason for failure, based on walking the user who actually owns the card through some diagnostic. The user who reported the problem finds the following in his dmesg output for the relevant ttyS4 and ttyS5: [ 0.580425] serial 0000:02:00.0: enabling device (0000 -> 0003) [ 0.601448] 0000:02:00.0: ttyS4 at I/O 0x3010 (irq = 125, base_baud = 115200) is a ST16650V2 [ 0.603089] serial 0000:02:00.1: enabling device (0000 -> 0003) [ 0.624119] 0000:02:00.1: ttyS5 at I/O 0x3000 (irq = 126, base_baud = 115200) is a ST16650V2 ... [ 6.323784] genirq: Flags mismatch irq 128. 00000080 (ttyS5) vs. 00000000 (xhci_hcd) [ 6.324128] genirq: Flags mismatch irq 128. 00000080 (ttyS5) vs. 00000000 (xhci_hcd) ... Output of setserial -a: /dev/ttyS4, Line 4, UART: 16650V2, Port: 0x3010, IRQ: 127 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test This suggests to me that the serial driver wants to register and share a MSI/MSI-X irq 128 with the xhci_hcd driver, whereas the xhci driver does not want to share the irq, as flags 0x00000080 (== IRQF_SHARED) from the serial port driver means to share the irq, and this mismatch ends in some failed irq init? With this setup, data reception works very unreliable, with dropped data, already at a transmission rate of only a 16 Bytes chunk every 1/120th of a second, ie. 1920 Bytes/sec, presumably due to rx fifo overflow due to mishandled or not used at all rx irq's? See full discussion thread with attempted diagnosis at: https://psychtoolbox.discourse.group/t/issues-with-iscan-serial-port-recording/3886 Disabling the use of MSI interrupts for the serial port pci card did fix the reliability problems. The user executed the following sequence of commands to achieve this: echo 0000:02:00.0 | sudo tee /sys/bus/pci/drivers/serial/unbind echo 0000:02:00.1 | sudo tee /sys/bus/pci/drivers/serial/unbind echo 0 | sudo tee /sys/bus/pci/devices/0000:02:00.0/msi_bus echo 0 | sudo tee /sys/bus/pci/devices/0000:02:00.1/msi_bus echo 0000:02:00.0 | sudo tee /sys/bus/pci/drivers/serial/bind echo 0000:02:00.1 | sudo tee /sys/bus/pci/drivers/serial/bind This resulted in the following log output: [ 82.179021] pci 0000:02:00.0: MSI/MSI-X disallowed for future drivers [ 87.003031] pci 0000:02:00.1: MSI/MSI-X disallowed for future drivers [ 98.537010] 0000:02:00.0: ttyS4 at I/O 0x3010 (irq = 17, base_baud = 115200) is a ST16650V2 [ 103.648124] 0000:02:00.1: ttyS5 at I/O 0x3000 (irq = 18, base_baud = 115200) is a ST16650V2 This patch attempts to fix the problem by disabling irq sharing when using MSI irq's. Note that all i know for sure is that disabling MSI irq's fixed the problem for the user, so this patch could be wrong and is untested. Please review with caution, keeping this in mind. Fixes: 8428413b1d14 ("serial: 8250_pci: Implement MSI(-X) support") Cc: Ralf Ramsauer Cc: stable Reviewed-by: Andy Shevchenko Signed-off-by: Mario Kleiner Link: https://lore.kernel.org/r/20210729043306.18528-1-mario.kleiner.de@gmail.com Signed-off-by: Greg Kroah-Hartman commit f1de1c7803595e937ce9b922807f499851225021 Author: Eugen Hristev Date: Mon Jul 5 14:57:08 2021 +0200 media: atmel: fix build when ISC=m and XISC=y Building VIDEO_ATMEL_ISC as module and VIDEO_ATMEL_XISC as built-in (or viceversa) causes build errors: or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o: in function `isc_async_complete': atmel-isc-base.c:(.text+0x40d0): undefined reference to `__this_module' or1k-linux-ld: atmel-isc-base.c:(.text+0x40f0): undefined reference to `__this_module' or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o:(.rodata+0x390): undefined reference to `__this_module' or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o:(__param+0x4): undefined reference to `__this_module' or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o:(__param+0x18): undefined reference to `__this_module' This is caused by the file atmel-isc-base.c which is common code between the two drivers. The solution is to create another Kconfig symbol that is automatically selected and generates the module atmel-isc-base.ko. This module can be loaded when both drivers are modules, or built-in when at least one of them is built-in. 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 commit c592b46907adbeb81243f7eb7a468c36692658b8 Author: Hans Verkuil Date: Wed Jun 30 09:58:23 2021 +0200 media: videobuf2-core: dequeue if start_streaming fails If a vb2_queue sets q->min_buffers_needed then when the number of queued buffers reaches q->min_buffers_needed, vb2_core_qbuf() will call the start_streaming() callback. If start_streaming() returns an error, then that error was just returned by vb2_core_qbuf(), but the buffer was still queued. However, userspace expects that if VIDIOC_QBUF fails, the buffer is returned dequeued. So if start_streaming() fails, then remove the buffer from the queue, thus avoiding this unwanted side-effect. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Tested-by: Kieran Bingham Fixes: b3379c6201bb ("[media] vb2: only call start_streaming if sufficient buffers are queued") Signed-off-by: Mauro Carvalho Chehab commit 76f22c93b209c811bd489950f17f8839adb31901 Author: Johan Hovold Date: Wed Jun 23 10:45:21 2021 +0200 media: rtl28xxu: fix zero-length control request The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning. The driver uses a zero-length i2c-read request for type detection so update the control-request code to use usb_sndctrlpipe() in this case. Note that actually trying to read the i2c register in question does not work as the register might not exist (e.g. depending on the demodulator) as reported by Eero Lehtinen . Reported-by: syzbot+faf11bbadc5a372564da@syzkaller.appspotmail.com Reported-by: Eero Lehtinen Tested-by: Eero Lehtinen Fixes: d0f232e823af ("[media] rtl28xxu: add heuristic to detect chip type") Cc: stable@vger.kernel.org # 4.0 Cc: Antti Palosaari Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit fe911792eae32f03d27d8f3de2f0271862d435ac Author: Johan Hovold Date: Wed Jun 23 10:45:20 2021 +0200 media: Revert "media: rtl28xxu: fix zero-length control request" This reverts commit 25d5ce3a606a1eb23a9265d615a92a876ff9cb5f. The patch in question causes a regression and was superseded by a second version. Unfortunately, the first revision ended up being applied instead of the correct one. Link: https://lore.kernel.org/r/YL3MCGY5wTsW2kEF@hovoldconsulting.com Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 928150fad41ba16df7fcc9f7f945747d0f56cbb6 Author: Pavel Skripkin Date: Tue Jul 27 20:00:46 2021 +0300 can: esd_usb2: fix memory leak In esd_usb2_setup_rx_urbs() MAX_RX_URBS coherent buffers are allocated and there is nothing, that frees them: 1) In callback function the urb is resubmitted and that's all 2) In disconnect function urbs are simply killed, but URB_FREE_BUFFER is not set (see esd_usb2_setup_rx_urbs) and this flag cannot be used with coherent buffers. So, all allocated buffers should be freed with usb_free_coherent() explicitly. Side note: This code looks like a copy-paste of other can drivers. The same patch was applied to mcba_usb driver and it works nice with real hardware. There is no change in functionality, only clean-up code for coherent buffers. Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device") Link: https://lore.kernel.org/r/b31b096926dcb35998ad0271aac4b51770ca7cc8.1627404470.git.paskripkin@gmail.com Cc: linux-stable Signed-off-by: Pavel Skripkin Signed-off-by: Marc Kleine-Budde commit 9969e3c5f40c166e3396acc36c34f9de502929f6 Author: Pavel Skripkin Date: Tue Jul 27 20:00:33 2021 +0300 can: ems_usb: fix memory leak In ems_usb_start() MAX_RX_URBS coherent buffers are allocated and there is nothing, that frees them: 1) In callback function the urb is resubmitted and that's all 2) In disconnect function urbs are simply killed, but URB_FREE_BUFFER is not set (see ems_usb_start) and this flag cannot be used with coherent buffers. So, all allocated buffers should be freed with usb_free_coherent() explicitly. Side note: This code looks like a copy-paste of other can drivers. The same patch was applied to mcba_usb driver and it works nice with real hardware. There is no change in functionality, only clean-up code for coherent buffers. Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Link: https://lore.kernel.org/r/59aa9fbc9a8cbf9af2bbd2f61a659c480b415800.1627404470.git.paskripkin@gmail.com Cc: linux-stable Signed-off-by: Pavel Skripkin Signed-off-by: Marc Kleine-Budde commit 0e865f0c31928d6a313269ef624907eec55287c4 Author: Pavel Skripkin Date: Tue Jul 27 19:59:57 2021 +0300 can: usb_8dev: fix memory leak In usb_8dev_start() MAX_RX_URBS coherent buffers are allocated and there is nothing, that frees them: 1) In callback function the urb is resubmitted and that's all 2) In disconnect function urbs are simply killed, but URB_FREE_BUFFER is not set (see usb_8dev_start) and this flag cannot be used with coherent buffers. So, all allocated buffers should be freed with usb_free_coherent() explicitly. Side note: This code looks like a copy-paste of other can drivers. The same patch was applied to mcba_usb driver and it works nice with real hardware. There is no change in functionality, only clean-up code for coherent buffers. Fixes: 0024d8ad1639 ("can: usb_8dev: Add support for USB2CAN interface from 8 devices") Link: https://lore.kernel.org/r/d39b458cd425a1cf7f512f340224e6e9563b07bd.1627404470.git.paskripkin@gmail.com Cc: linux-stable Signed-off-by: Pavel Skripkin Signed-off-by: Marc Kleine-Budde commit 8dde723fcde4479f256441da03793e37181d9f21 Author: Takashi Iwai Date: Thu Jul 29 20:51:26 2021 +0200 ALSA: usb-audio: Avoid unnecessary or invalid connector selection at resume The recent fix for the resume on Lenovo machines seems causing a regression on others. It's because the change always triggers the connector selection no matter which widget node type is. This patch addresses the regression by setting the resume callback selectively only for the connector widget. Fixes: 44609fc01f28 ("ALSA: usb-audio: Check connector value on resume") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213897 Link: https://lore.kernel.org/r/20210729185126.24432-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit fc43fb69a7af92839551f99c1a96a37b77b3ae7a Author: Pavel Skripkin Date: Sun Jul 25 13:36:30 2021 +0300 can: mcba_usb_start(): add missing urb->transfer_dma initialization Yasushi reported, that his Microchip CAN Analyzer stopped working since commit 91c02557174b ("can: mcba_usb: fix memory leak in mcba_usb"). The problem was in missing urb->transfer_dma initialization. In my previous patch to this driver I refactored mcba_usb_start() code to avoid leaking usb coherent buffers. To archive it, I passed local stack variable to usb_alloc_coherent() and then saved it to private array to correctly free all coherent buffers on ->close() call. But I forgot to initialize urb->transfer_dma with variable passed to usb_alloc_coherent(). All of this was causing device to not work, since dma addr 0 is not valid and following log can be found on bug report page, which points exactly to problem described above. | DMAR: [DMA Write] Request device [00:14.0] PASID ffffffff fault addr 0 [fault reason 05] PTE Write access is not set Fixes: 91c02557174b ("can: mcba_usb: fix memory leak in mcba_usb") Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990850 Link: https://lore.kernel.org/r/20210725103630.23864-1-paskripkin@gmail.com Cc: linux-stable Reported-by: Yasushi SHOJI Signed-off-by: Pavel Skripkin Tested-by: Yasushi SHOJI [mkl: fixed typos in commit message - thanks Yasushi SHOJI] Signed-off-by: Marc Kleine-Budde commit f6b3c7848e66e9046c8a79a5b88fd03461cc252b Author: Dan Carpenter Date: Thu Jul 29 17:12:46 2021 +0300 can: hi311x: fix a signedness bug in hi3110_cmd() The hi3110_cmd() is supposed to return zero on success and negative error codes on failure, but it was accidentally declared as a u8 when it needs to be an int type. Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/r/20210729141246.GA1267@kili Signed-off-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde commit 8a7b46fa7902a3d36ce44a64f4d66586d66206ea Author: Marc Kleine-Budde Date: Mon Jul 26 11:26:44 2021 +0200 MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver This patch adds Yasushi SHOJI as a reviewer for the Microchip CAN BUS Analyzer Tool driver. Link: https://lore.kernel.org/r/20210726111619.1023991-1-mkl@pengutronix.de Acked-by: Yasushi SHOJI Signed-off-by: Marc Kleine-Budde commit 764a5bc89b12b82c18ce7ca5d7c1b10dd748a440 Merge: c71a2f65e7a13 d28e2568ac26f Author: Linus Torvalds Date: Thu Jul 29 22:10:05 2021 -0700 Merge tag 'drm-fixes-2021-07-30' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular drm fixes pull, seems about the right size, lots of small fixes across the board, mostly amdgpu, but msm and i915 are in there along with panel and ttm. amdgpu: - Fix resource leak in an error path - Avoid stack contents exposure in error path - pmops check fix for S0ix vs S3 - DCN 2.1 display fixes - DCN 2.0 display fix - Backlight control fix for laptops with HDR panels - Maintainers updates i915: - Fix vbt port mask - Fix around reading the right DSC disable fuse in display_ver 10 - Split display version 9 and 10 in intel_setup_outputs msm: - iommu fault display fix - misc dp compliance fixes - dpu reg sizing fix panel: - Fix bpc for ytc700tlag_05_201c ttm: - debugfs init fixes" * tag 'drm-fixes-2021-07-30' of git://anongit.freedesktop.org/drm/drm: maintainers: add bugs and chat URLs for amdgpu drm/amdgpu/display: only enable aux backlight control for OLED panels drm/amd/display: ensure dentist display clock update finished in DCN20 drm/amd/display: Add missing DCN21 IP parameter drm/amd/display: Guard DST_Y_PREFETCH register overflow in DCN21 drm/amdgpu: Check pmops for desired suspend state drm/msm/dp: Initialize dp->aux->drm_dev before registration drm/msm/dp: signal audio plugged change at dp_pm_resume drm/msm/dp: Initialize the INTF_CONFIG register drm/msm/dp: use dp_ctrl_off_link_stream during PHY compliance test run drm/msm: Fix display fault handling drm/msm/dpu: Fix sm8250_mdp register length drm/amdgpu: Avoid printing of stack contents on firmware load error drm/amdgpu: Fix resource leak on probe error path drm/i915/display: split DISPLAY_VER 9 and 10 in intel_setup_outputs() drm/i915: fix not reading DSC disable fuse in GLK drm/i915/bios: Fix ports mask drm/panel: panel-simple: Fix proper bpc for ytc700tlag_05_201c drm/ttm: Initialize debugfs from ttm_global_init() commit c71a2f65e7a13a05f49b1d9afce6af3afcefab1b Merge: cade08a572444 cb163627e6d32 Author: Linus Torvalds Date: Thu Jul 29 21:03:47 2021 -0700 Merge tag 'fallthrough-fixes-clang-5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo Silva: "Fix some fall-through warnings when building with Clang and '-Wimplicit-fallthrough' on ARM" * tag 'fallthrough-fixes-clang-5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: scsi: fas216: Fix fall-through warning for Clang scsi: acornscsi: Fix fall-through warning for clang ARM: riscpc: Fix fall-through warning for Clang commit cade08a57244497216c46df5e9cbe8f18e143519 Merge: 7e96bf476270a 640b7ea5f888b Author: Linus Torvalds Date: Thu Jul 29 20:57:56 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha updates from Matt Turner: "They're mostly small janitorial fixes but there's also more important ones: - drop the alpha-specific x86 binary loader (David Hildenbrand) - regression fix for at least Marvel platforms (Mike Rapoport) - fix for a scary-looking typo (Zheng Yongjun)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: register early reserved memory in memblock alpha: fix spelling mistakes alpha: Remove space between * and parameter name alpha: fp_emul: avoid init/cleanup_module names alpha: Add syscall_get_return_value() binfmt: remove support for em86 (alpha only) alpha: fix typos in a comment alpha: defconfig: add necessary configs for boot testing alpha: Send stop IPI to send to online CPUs alpha: convert comma to semicolon alpha: remove undef inline in compiler.h alpha: Kconfig: Replace HTTP links with HTTPS ones alpha: __udiv_qrnnd should be exported commit f0f82e2476f6adb9c7a0135cfab8091456990c99 Author: lijinlin Date: Tue Jul 27 11:44:55 2021 +0800 scsi: core: Fix capacity set to zero after offlinining device After adding physical volumes to a volume group through vgextend, the kernel will rescan the partitions. This in turn will cause the device capacity to be queried. If the device status is set to offline through sysfs at this time, READ CAPACITY command will return a result which the host byte is DID_NO_CONNECT, and the capacity of the device will be set to zero in read_capacity_error(). After setting device status back to running, the capacity of the device will remain stuck at zero. Fix this issue by rescanning device when the device state changes to SDEV_RUNNING. Link: https://lore.kernel.org/r/20210727034455.1494960-1-lijinlin3@huawei.com Reviewed-by: Bart Van Assche Signed-off-by: lijinlin Signed-off-by: Wu Bo Signed-off-by: Martin K. Petersen commit 5c04243a56a7977185b00400e59ca7e108004faf Author: Li Manyi Date: Mon Jul 26 19:49:13 2021 +0800 scsi: sr: Return correct event when media event code is 3 Media event code 3 is defined in the MMC-6 spec as follows: "MediaRemoval: The media has been removed from the specified slot, and the Drive is unable to access the media without user intervention. This applies to media changers only." This indicated that treating the condition as an EJECT_REQUEST was appropriate. However, doing so had the unfortunate side-effect of causing the drive tray to be physically ejected on resume. Instead treat the event as a MEDIA_CHANGE request. Fixes: 7dd753ca59d6 ("scsi: sr: Return appropriate error code when disk is ejected") Link: https://bugzilla.kernel.org/show_bug.cgi?id=213759 Link: https://lore.kernel.org/r/20210726114913.6760-1-limanyi@uniontech.com Signed-off-by: Li Manyi Signed-off-by: Martin K. Petersen commit a264cf5e81c78e2b9918b8b9ef2ace9dde1850df Author: Tyrel Datwyler Date: Fri Jul 16 14:52:20 2021 -0600 scsi: ibmvfc: Fix command state accounting and stale response detection Prior to commit 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside the host/queue lock") responses to commands were completed sequentially with the host lock held such that a command had a basic binary state of active or free. It was therefore a simple affair of ensuring the assocaiated ibmvfc_event to a VIOS response was valid by testing that it was not already free. The lock relexation work to complete commands outside the lock inadverdently made it a trinary command state such that a command is either in flight, received and being completed, or completed and now free. This breaks the stale command detection logic as a command may be still marked active and been placed on the delayed completion list when a second stale response for the same command arrives. This can lead to double completions and list corruption. This issue was exposed by a recent VIOS regression were a missing memory barrier could occasionally result in the ibmvfc client receiving a duplicate response for the same command. Fix the issue by introducing the atomic ibmvfc_event.active to track the trinary state of a command. The state is explicitly set to 1 when a command is successfully sent. The CRQ response handlers use atomic_dec_if_positive() to test for stale responses and correctly transition to the completion state when a active command is received. Finally, atomic_dec_and_test() is used to sanity check transistions when commands are freed as a result of a completion, or moved to the purge list as a result of error handling or adapter reset. Link: https://lore.kernel.org/r/20210716205220.1101150-1-tyreld@linux.ibm.com Fixes: 1f4a4a19508d ("scsi: ibmvfc: Complete commands outside the host/queue lock") Cc: stable@vger.kernel.org Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 70edd2e6f652f67d854981fd67f9ad0f1deaea92 Author: Sreekanth Reddy Date: Mon Jul 26 17:24:02 2021 +0530 scsi: core: Avoid printing an error if target_alloc() returns -ENXIO Avoid printing a 'target allocation failed' error if the driver target_alloc() callback function returns -ENXIO. This return value indicates that the corresponding H:C:T:L entry is empty. Removing this error reduces the scan time if the user issues SCAN_WILD_CARD scan operation through sysfs parameter on a host with a lot of empty H:C:T:L entries. Avoiding the printk on -ENXIO matches the behavior of the other callback functions during scanning. Link: https://lore.kernel.org/r/20210726115402.1936-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit bc546c0c9abb3bb2fb46866b3d1e6ade9695a5f6 Author: Ye Bin Date: Wed Jan 13 14:31:03 2021 +0800 scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach() The following BUG_ON() was observed during RDAC scan: [595952.944297] kernel BUG at drivers/scsi/device_handler/scsi_dh_rdac.c:427! [595952.951143] Internal error: Oops - BUG: 0 [#1] SMP ...... [595953.251065] Call trace: [595953.259054] check_ownership+0xb0/0x118 [595953.269794] rdac_bus_attach+0x1f0/0x4b0 [595953.273787] scsi_dh_handler_attach+0x3c/0xe8 [595953.278211] scsi_dh_add_device+0xc4/0xe8 [595953.282291] scsi_sysfs_add_sdev+0x8c/0x2a8 [595953.286544] scsi_probe_and_add_lun+0x9fc/0xd00 [595953.291142] __scsi_scan_target+0x598/0x630 [595953.295395] scsi_scan_target+0x120/0x130 [595953.299481] fc_user_scan+0x1a0/0x1c0 [scsi_transport_fc] [595953.304944] store_scan+0xb0/0x108 [595953.308420] dev_attr_store+0x44/0x60 [595953.312160] sysfs_kf_write+0x58/0x80 [595953.315893] kernfs_fop_write+0xe8/0x1f0 [595953.319888] __vfs_write+0x60/0x190 [595953.323448] vfs_write+0xac/0x1c0 [595953.326836] ksys_write+0x74/0xf0 [595953.330221] __arm64_sys_write+0x24/0x30 Code is in check_ownership: list_for_each_entry_rcu(tmp, &h->ctlr->dh_list, node) { /* h->sdev should always be valid */ BUG_ON(!tmp->sdev); tmp->sdev->access_state = access_state; } rdac_bus_attach initialize_controller list_add_rcu(&h->node, &h->ctlr->dh_list); h->sdev = sdev; rdac_bus_detach list_del_rcu(&h->node); h->sdev = NULL; Fix the race between rdac_bus_attach() and rdac_bus_detach() where h->sdev is NULL when processing the RDAC attach. Link: https://lore.kernel.org/r/20210113063103.2698953-1-yebin10@huawei.com Reviewed-by: Bart Van Assche Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit eb92830cdbc232a0e8166c48061ca276132646a7 Author: Edmund Dea Date: Wed Aug 26 13:17:29 2020 -0700 drm/kmb: Define driver date and major/minor version Added macros for date and version Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Edmund Dea Signed-off-by: Anitha Chrisanthus Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210728003126.1425028-2-anitha.chrisanthus@intel.com commit 0aab5dce395636eddf4e5f33eba88390328a95b4 Author: Edmund Dea Date: Tue Aug 25 14:51:17 2020 -0700 drm/kmb: Enable LCD DMA for low TVDDCV There's an undocumented dependency between LCD layer enable bits [2-5] and the AXI pipelined read enable bit [28] in the LCD_CONTROL register. The proper order of operation is: 1) Clear AXI pipelined read enable bit 2) Set LCD layers 3) Set AXI pipelined read enable bit With this update, LCD can start DMA when TVDDCV is reduced down to 700mV. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Edmund Dea Signed-off-by: Anitha Chrisanthus Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210728003126.1425028-1-anitha.chrisanthus@intel.com commit cb163627e6d32dbaca4d89b2292788cee895b06d Author: Gustavo A. R. Silva Date: Mon Jul 26 15:46:47 2021 -0500 scsi: fas216: Fix fall-through warning for Clang Fix the following fallthrough warning (on ARM): drivers/scsi/arm/fas216.c:1379:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ drivers/scsi/arm/fas216.c:1379:2: note: insert 'break;' to avoid fall-through default: ^ break; Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202107260355.bF00i5bi-lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit eb4f520ca691f109f5fb1d16fc9cc26447a941e1 Author: Gustavo A. R. Silva Date: Mon Jul 26 15:33:53 2021 -0500 scsi: acornscsi: Fix fall-through warning for clang Fix the following fallthrough warning (on ARM): drivers/scsi/arm/acornscsi.c:2651:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case res_success: ^ drivers/scsi/arm/acornscsi.c:2651:2: note: insert '__attribute__((fallthrough));' to silence this warning case res_success: ^ __attribute__((fallthrough)); drivers/scsi/arm/acornscsi.c:2651:2: note: insert 'break;' to avoid fall-through case res_success: ^ break; Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202107260355.bF00i5bi-lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 926ef1a4c245c093acc07807e466ad2ef0ff6ccb Author: Richard Fitzgerald Date: Thu Jul 29 18:09:29 2021 +0100 ASoC: cs42l42: Fix bclk calculation for mono An I2S frame always has a left and right channel slot even if mono data is being sent. So if channels==1 the actual bitclock frequency is 2 * snd_soc_params_to_bclk(params). Signed-off-by: Richard Fitzgerald Fixes: 2cdba9b045c7 ("ASoC: cs42l42: Use bclk from hw_params if set_sysclk was not called") Link: https://lore.kernel.org/r/20210729170929.6589-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 64324bac750b84ca54711fb7d332132fcdb87293 Author: Richard Fitzgerald Date: Thu Jul 29 18:09:28 2021 +0100 ASoC: cs42l42: Don't allow SND_SOC_DAIFMT_LEFT_J The driver has no support for left-justified protocol so it should not have been allowing this to be passed to cs42l42_set_dai_fmt(). Signed-off-by: Richard Fitzgerald Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/20210729170929.6589-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit ee86f680ff4c9b406d49d4e22ddf10805b8a2137 Author: Richard Fitzgerald Date: Thu Jul 29 18:09:27 2021 +0100 ASoC: cs42l42: Correct definition of ADC Volume control The ADC volume is a signed 8-bit number with range -97 to +12, with -97 being mute. Use a SOC_SINGLE_S8_TLV() to define this and fix the DECLARE_TLV_DB_SCALE() to have the correct start and mute flag. Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20210729170929.6589-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 696e572dc85c674b31f4f13f59d8e217ee1b057f Author: Gustavo A. R. Silva Date: Mon Jul 26 15:06:22 2021 -0500 ARM: riscpc: Fix fall-through warning for Clang Fix the following fallthrough warning: arch/arm/mach-rpc/riscpc.c:52:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ arch/arm/mach-rpc/riscpc.c:52:2: note: insert 'break;' to avoid fall-through default: ^ break; Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202107260355.bF00i5bi-lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 7e96bf476270aecea66740a083e51b38c1371cd2 Merge: 2b99c470d50ae 8750f9bbda115 Author: Linus Torvalds Date: Thu Jul 29 09:42:09 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Fix MTE shared page detection - Enable selftest's use of PMU registers when asked to s390: - restore 5.13 debugfs names x86: - fix sizes for vcpu-id indexed arrays - fixes for AMD virtualized LAPIC (AVIC) - other small bugfixes Generic: - access tracking performance test - dirty_log_perf_test command line parsing fix - Fix selftest use of obsolete pthread_yield() in favour of sched_yield() - use cpu_relax when halt polling - fixed missing KVM_CLEAR_DIRTY_LOG compat ioctl" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: add missing compat KVM_CLEAR_DIRTY_LOG KVM: use cpu_relax when halt polling KVM: SVM: use vmcb01 in svm_refresh_apicv_exec_ctrl KVM: SVM: tweak warning about enabled AVIC on nested entry KVM: SVM: svm_set_vintr don't warn if AVIC is active but is about to be deactivated KVM: s390: restore old debugfs names KVM: SVM: delay svm_vcpu_init_msrpm after svm->vmcb is initialized KVM: selftests: Introduce access_tracking_perf_test KVM: selftests: Fix missing break in dirty_log_perf_test arg parsing x86/kvm: fix vcpu-id indexed array sizes KVM: x86: Check the right feature bit for MSR_KVM_ASYNC_PF_ACK access docs: virt: kvm: api.rst: replace some characters KVM: Documentation: Fix KVM_CAP_ENFORCE_PV_FEATURE_CPUID name KVM: nSVM: Swap the parameter order for svm_copy_vmrun_state()/svm_copy_vmloadsave_state() KVM: nSVM: Rename nested_svm_vmloadsave() to svm_copy_vmloadsave_state() KVM: arm64: selftests: get-reg-list: actually enable pmu regs in pmu sublist KVM: selftests: change pthread_yield to sched_yield KVM: arm64: Fix detection of shared VMAs on guest fault commit c4d7c51845af9542d42cd18a25c570583abf2768 Author: Steven Price Date: Thu Jul 29 17:00:36 2021 +0100 KVM: arm64: Fix race when enabling KVM_ARM_CAP_MTE When enabling KVM_CAP_ARM_MTE the ioctl checks that there are no VCPUs created to ensure that the capability is enabled before the VM is running. However no locks are held at that point so it is (theoretically) possible for another thread in the VMM to create VCPUs between the check and actually setting mte_enabled. Close the race by taking kvm->lock. Reported-by: Alexandru Elisei Fixes: 673638f434ee ("KVM: arm64: Expose KVM_ARM_CAP_MTE") Signed-off-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210729160036.20433-1-steven.price@arm.com commit facee1be7689f8cf573b9ffee6a5c28ee193615e Author: David Brazdil Date: Wed Jul 28 15:32:31 2021 +0000 KVM: arm64: Fix off-by-one in range_is_memory Hyp checks whether an address range only covers RAM by checking the start/endpoints against a list of memblock_region structs. However, the endpoint here is exclusive but internally is treated as inclusive. Fix the off-by-one error that caused valid address ranges to be rejected. Cc: Quentin Perret Fixes: 90134ac9cabb6 ("KVM: arm64: Protect the .hyp sections from the host") Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210728153232.1018911-2-dbrazdil@google.com commit 2b99c470d50ae01df37c40596f4be58f1d41db06 Merge: 4010a528219e0 9f66861181e64 Author: Linus Torvalds Date: Thu Jul 29 09:28:24 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu fix from Greg Ungerer: "A single compile time fix" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k/coldfire: change pll var. to clk_pll commit 81a448d7b0668ae39c08e6f34a54cc7eafb844f1 Author: Darrick J. Wong Date: Mon Jul 26 16:43:17 2021 -0700 xfs: prevent spoofing of rtbitmap blocks when recovering buffers While reviewing the buffer item recovery code, the thought occurred to me: in V5 filesystems we use log sequence number (LSN) tracking to avoid replaying older metadata updates against newer log items. However, we use the magic number of the ondisk buffer to find the LSN of the ondisk metadata, which means that if an attacker can control the layout of the realtime device precisely enough that the start of an rt bitmap block matches the magic and UUID of some other kind of block, they can control the purported LSN of that spoofed block and thereby break log replay. Since realtime bitmap and summary blocks don't have headers at all, we have no way to tell if a block really should be replayed. The best we can do is replay unconditionally and hope for the best. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit 9d110014205cb1129fa570d8de83d486fa199354 Author: Dave Chinner Date: Wed Jul 28 17:14:11 2021 -0700 xfs: limit iclog tail updates From the department of "generic/482 keeps on giving", we bring you another tail update race condition: iclog: S1 C1 +-----------------------+-----------------------+ S2 EOIC Two checkpoints in a single iclog. One is complete, the other just contains the start record and overruns into a new iclog. Timeline: Before S1: Cache flush, log tail = X At S1: Metadata stable, write start record and checkpoint At C1: Write commit record, set NEED_FUA Single iclog checkpoint, so no need for NEED_FLUSH Log tail still = X, so no need for NEED_FLUSH After C1, Before S2: Cache flush, log tail = X At S2: Metadata stable, write start record and checkpoint After S2: Log tail moves to X+1 At EOIC: End of iclog, more journal data to write Releases iclog Not a commit iclog, so no need for NEED_FLUSH Writes log tail X+1 into iclog. At this point, the iclog has tail X+1 and NEED_FUA set. There has been no cache flush for the metadata between X and X+1, and the iclog writes the new tail permanently to the log. THis is sufficient to violate on disk metadata/journal ordering. We have two options here. The first is to detect this case in some manner and ensure that the partial checkpoint write sets NEED_FLUSH when the iclog is already marked NEED_FUA and the log tail changes. This seems somewhat fragile and quite complex to get right, and it doesn't actually make it obvious what underlying problem it is actually addressing from reading the code. The second option seems much cleaner to me, because it is derived directly from the requirements of the C1 commit record in the iclog. That is, when we write this commit record to the iclog, we've guaranteed that the metadata/data ordering is correct for tail update purposes. Hence if we only write the log tail into the iclog for the *first* commit record rather than the log tail at the last release, we guarantee that the log tail does not move past where the the first commit record in the log expects it to be. IOWs, taking the first option means that replay of C1 becomes dependent on future operations doing the right thing, not just the C1 checkpoint itself doing the right thing. This makes log recovery almost impossible to reason about because now we have to take into account what might or might not have happened in the future when looking at checkpoints in the log rather than just having to reconstruct the past... Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b2ae3a9ef91152931b99620c431cf3805daa1429 Author: Dave Chinner Date: Tue Jul 27 16:23:50 2021 -0700 xfs: need to see iclog flags in tracing Because I cannot tell if the NEED_FLUSH flag is being set correctly by the log force and CIL push machinery without it. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d8f4c2d0398fa1d92cacf854daf80d21a46bfefc Author: Dave Chinner Date: Tue Jul 27 16:23:50 2021 -0700 xfs: Enforce attr3 buffer recovery order From the department of "WTAF? How did we miss that!?"... When we are recovering a buffer, the first thing we do is check the buffer magic number and extract the LSN from the buffer. If the LSN is older than the current LSN, we replay the modification to it. If the metadata on disk is newer than the transaction in the log, we skip it. This is a fundamental v5 filesystem metadata recovery behaviour. generic/482 failed with an attribute writeback failure during log recovery. The write verifier caught the corruption before it got written to disk, and the attr buffer dump looked like: XFS (dm-3): Metadata corruption detected at xfs_attr3_leaf_verify+0x275/0x2e0, xfs_attr3_leaf block 0x19be8 XFS (dm-3): Unmount and run xfs_repair XFS (dm-3): First 128 bytes of corrupted metadata buffer: 00000000: 00 00 00 00 00 00 00 00 3b ee 00 00 4d 2a 01 e1 ........;...M*.. 00000010: 00 00 00 00 00 01 9b e8 00 00 00 01 00 00 05 38 ...............8 ^^^^^^^^^^^^^^^^^^^^^^^ 00000020: df 39 5e 51 58 ac 44 b6 8d c5 e7 10 44 09 bc 17 .9^QX.D.....D... 00000030: 00 00 00 00 00 02 00 83 00 03 00 cc 0f 24 01 00 .............$.. 00000040: 00 68 0e bc 0f c8 00 10 00 00 00 00 00 00 00 00 .h.............. 00000050: 00 00 3c 31 0f 24 01 00 00 00 3c 32 0f 88 01 00 ..<1.$....<2.... 00000060: 00 00 3c 33 0f d8 01 00 00 00 00 00 00 00 00 00 ..<3............ 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ..... The highlighted bytes are the LSN that was replayed into the buffer: 0x100000538. This is cycle 1, block 0x538. Prior to replay, that block on disk looks like this: $ sudo xfs_db -c "fsb 0x417d" -c "type attr3" -c p /dev/mapper/thin-vol hdr.info.hdr.forw = 0 hdr.info.hdr.back = 0 hdr.info.hdr.magic = 0x3bee hdr.info.crc = 0xb5af0bc6 (correct) hdr.info.bno = 105448 hdr.info.lsn = 0x100000900 ^^^^^^^^^^^ hdr.info.uuid = df395e51-58ac-44b6-8dc5-e7104409bc17 hdr.info.owner = 131203 hdr.count = 2 hdr.usedbytes = 120 hdr.firstused = 3796 hdr.holes = 1 hdr.freemap[0-2] = [base,size] Note the LSN stamped into the buffer on disk: 1/0x900. The version on disk is much newer than the log transaction that was being replayed. That's a bug, and should -never- happen. So I immediately went to look at xlog_recover_get_buf_lsn() to check that we handled the LSN correctly. I was wondering if there was a similar "two commits with the same start LSN skips the second replay" problem with buffers. I didn't get that far, because I found a much more basic, rudimentary bug: xlog_recover_get_buf_lsn() doesn't recognise buffers with XFS_ATTR3_LEAF_MAGIC set in them!!! IOWs, attr3 leaf buffers fall through the magic number checks unrecognised, so trigger the "recover immediately" behaviour instead of undergoing an LSN check. IOWs, we incorrectly replay ATTR3 leaf buffers and that causes silent on disk corruption of inode attribute forks and potentially other things.... Git history shows this is *another* zero day bug, this time introduced in commit 50d5c8d8e938 ("xfs: check LSN ordering for v5 superblocks during recovery") which failed to handle the attr3 leaf buffers in recovery. And we've failed to handle them ever since... Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 32baa63d82ee3f5ab3bd51bae6bf7d1c15aed8c7 Author: Dave Chinner Date: Tue Jul 27 16:23:49 2021 -0700 xfs: logging the on disk inode LSN can make it go backwards When we log an inode, we format the "log inode" core and set an LSN in that inode core. We do that via xfs_inode_item_format_core(), which calls: xfs_inode_to_log_dinode(ip, dic, ip->i_itemp->ili_item.li_lsn); to format the log inode. It writes the LSN from the inode item into the log inode, and if recovery decides the inode item needs to be replayed, it recovers the log inode LSN field and writes it into the on disk inode LSN field. Now this might seem like a reasonable thing to do, but it is wrong on multiple levels. Firstly, if the item is not yet in the AIL, item->li_lsn is zero. i.e. the first time the inode it is logged and formatted, the LSN we write into the log inode will be zero. If we only log it once, recovery will run and can write this zero LSN into the inode. This means that the next time the inode is logged and log recovery runs, it will *always* replay changes to the inode regardless of whether the inode is newer on disk than the version in the log and that violates the entire purpose of recording the LSN in the inode at writeback time (i.e. to stop it going backwards in time on disk during recovery). Secondly, if we commit the CIL to the journal so the inode item moves to the AIL, and then relog the inode, the LSN that gets stamped into the log inode will be the LSN of the inode's current location in the AIL, not it's age on disk. And it's not the LSN that will be associated with the current change. That means when log recovery replays this inode item, the LSN that ends up on disk is the LSN for the previous changes in the log, not the current changes being replayed. IOWs, after recovery the LSN on disk is not in sync with the LSN of the modifications that were replayed into the inode. This, again, violates the recovery ordering semantics that on-disk writeback LSNs provide. Hence the inode LSN in the log dinode is -always- invalid. Thirdly, recovery actually has the LSN of the log transaction it is replaying right at hand - it uses it to determine if it should replay the inode by comparing it to the on-disk inode's LSN. But it doesn't use that LSN to stamp the LSN into the inode which will be written back when the transaction is fully replayed. It uses the one in the log dinode, which we know is always going to be incorrect. Looking back at the change history, the inode logging was broken by commit 93f958f9c41f ("xfs: cull unnecessary icdinode fields") way back in 2016 by a stupid idiot who thought he knew how this code worked. i.e. me. That commit replaced an in memory di_lsn field that was updated only at inode writeback time from the inode item.li_lsn value - and hence always contained the same LSN that appeared in the on-disk inode - with a read of the inode item LSN at inode format time. CLearly these are not the same thing. Before 93f958f9c41f, the log recovery behaviour was irrelevant, because the LSN in the log inode always matched the on-disk LSN at the time the inode was logged, hence recovery of the transaction would never make the on-disk LSN in the inode go backwards or get out of sync. A symptom of the problem is this, caught from a failure of generic/482. Before log recovery, the inode has been allocated but never used: xfs_db> inode 393388 xfs_db> p core.magic = 0x494e core.mode = 0 .... v3.crc = 0x99126961 (correct) v3.change_count = 0 v3.lsn = 0 v3.flags2 = 0 v3.cowextsize = 0 v3.crtime.sec = Thu Jan 1 10:00:00 1970 v3.crtime.nsec = 0 After log recovery: xfs_db> p core.magic = 0x494e core.mode = 020444 .... v3.crc = 0x23e68f23 (correct) v3.change_count = 2 v3.lsn = 0 v3.flags2 = 0 v3.cowextsize = 0 v3.crtime.sec = Thu Jul 22 17:03:03 2021 v3.crtime.nsec = 751000000 ... You can see that the LSN of the on-disk inode is 0, even though it clearly has been written to disk. I point out this inode, because the generic/482 failure occurred because several adjacent inodes in this specific inode cluster were not replayed correctly and still appeared to be zero on disk when all the other metadata (inobt, finobt, directories, etc) indicated they should be allocated and written back. The fix for this is two-fold. The first is that we need to either revert the LSN changes in 93f958f9c41f or stop logging the inode LSN altogether. If we do the former, log recovery does not need to change but we add 8 bytes of memory per inode to store what is largely a write-only inode field. If we do the latter, log recovery needs to stamp the on-disk inode in the same manner that inode writeback does. I prefer the latter, because we shouldn't really be trying to log and replay changes to the on disk LSN as the on-disk value is the canonical source of the on-disk version of the inode. It also matches the way we recover buffer items - we create a buf_log_item that carries the current recovery transaction LSN that gets stamped into the buffer by the write verifier when it gets written back when the transaction is fully recovered. However, this might break log recovery on older kernels even more, so I'm going to simply ignore the logged value in recovery and stamp the on-disk inode with the LSN of the transaction being recovered that will trigger writeback on transaction recovery completion. This will ensure that the on-disk inode LSN always reflects the LSN of the last change that was written to disk, regardless of whether it comes from log recovery or runtime writeback. Fixes: 93f958f9c41f ("xfs: cull unnecessary icdinode fields") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8191d8222c514c69a8e1ac46bd9812b9e0aab7d0 Author: Dave Chinner Date: Tue Jul 27 16:23:49 2021 -0700 xfs: avoid unnecessary waits in xfs_log_force_lsn() Before waiting on a iclog in xfs_log_force_lsn(), we don't check to see if the iclog has already been completed and the contents on stable storage. We check for completed iclogs in xfs_log_force(), so we should do the same thing for xfs_log_force_lsn(). This fixed some random up-to-30s pauses seen in unmounting filesystems in some tests. A log force ends up waiting on completed iclog, and that doesn't then get flushed (and hence the log force get completed) until the background log worker issues a log force that flushes the iclog in question. Then the unmount unblocks and continues. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2bf1ec0ff067ff8f692d261b29c713f3583f7e2a Author: Dave Chinner Date: Tue Jul 27 16:23:49 2021 -0700 xfs: log forces imply data device cache flushes After fixing the tail_lsn vs cache flush race, generic/482 continued to fail in a similar way where cache flushes were missing before iclog FUA writes. Tracing of iclog state changes during the fsstress workload portion of the test (via xlog_iclog* events) indicated that iclog writes were coming from two sources - CIL pushes and log forces (due to fsync/O_SYNC operations). All of the cases where a recovery problem was triggered indicated that the log force was the source of the iclog write that was not preceeded by a cache flush. This was an oversight in the modifications made in commit eef983ffeae7 ("xfs: journal IO cache flush reductions"). Log forces for fsync imply a data device cache flush has been issued if an iclog was flushed to disk and is indicated to the caller via the log_flushed parameter so they can elide the device cache flush if the journal issued one. The change in eef983ffeae7 results in iclogs only issuing a cache flush if XLOG_ICL_NEED_FLUSH is set on the iclog, but this was not added to the iclogs that the log force code flushes to disk. Hence log forces are no longer guaranteeing that a cache flush is issued, hence opening up a potential on-disk ordering failure. Log forces should also set XLOG_ICL_NEED_FUA as well to ensure that the actual iclogs it forces to the journal are also on stable storage before it returns to the caller. This patch introduces the xlog_force_iclog() helper function to encapsulate the process of taking a reference to an iclog, switching its state if WANT_SYNC and flushing it to stable storage correctly. Both xfs_log_force() and xfs_log_force_lsn() are converted to use it, as is xlog_unmount_write() which has an elaborate method of doing exactly the same "write this iclog to stable storage" operation. Further, if the log force code needs to wait on a iclog in the WANT_SYNC state, it needs to ensure that iclog also results in a cache flush being issued. This covers the case where the iclog contains the commit record of the CIL flush that the log force triggered, but it hasn't been written yet because there is still an active reference to the iclog. Note: this whole cache flush whack-a-mole patch is a result of log forces still being iclog state centric rather than being CIL sequence centric. Most of this nasty code will go away in future when log forces are converted to wait on CIL sequence push completion rather than iclog completion. With the CIL push algorithm guaranteeing that the CIL checkpoint is fully on stable storage when it completes, we no longer need to iterate iclogs and push them to ensure a CIL sequence push has completed and so all this nasty iclog iteration and flushing code will go away. Fixes: eef983ffeae7 ("xfs: journal IO cache flush reductions") Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 45eddb414047c366744cc60dd6cef7c7e58c6ab9 Author: Dave Chinner Date: Tue Jul 27 16:23:48 2021 -0700 xfs: factor out forced iclog flushes We force iclogs in several places - we need them all to have the same cache flush semantics, so start by factoring out the iclog force into a common helper. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0dc8f7f139f07aaca1afcec0ade5718c4ebba91e Author: Dave Chinner Date: Tue Jul 27 16:23:48 2021 -0700 xfs: fix ordering violation between cache flushes and tail updates There is a race between the new CIL async data device metadata IO completion cache flush and the log tail in the iclog the flush covers being updated. This can be seen by repeating generic/482 in a loop and eventually log recovery fails with a failures such as this: XFS (dm-3): Starting recovery (logdev: internal) XFS (dm-3): bad inode magic/vsn daddr 228352 #0 (magic=0) XFS (dm-3): Metadata corruption detected at xfs_inode_buf_verify+0x180/0x190, xfs_inode block 0x37c00 xfs_inode_buf_verify XFS (dm-3): Unmount and run xfs_repair XFS (dm-3): First 128 bytes of corrupted metadata buffer: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ XFS (dm-3): metadata I/O error in "xlog_recover_items_pass2+0x55/0xc0" at daddr 0x37c00 len 32 error 117 Analysis of the logwrite replay shows that there were no writes to the data device between the FUA @ write 124 and the FUA at write @ 125, but log recovery @ 125 failed. The difference was the one log write @ 125 moved the tail of the log forwards from (1,8) to (1,32) and so the inode create intent in (1,8) was not replayed and so the inode cluster was zero on disk when replay of the first inode item in (1,32) was attempted. What this meant was that the journal write that occurred at @ 125 did not ensure that metadata completed before the iclog was written was correctly on stable storage. The tail of the log moved forward, so IO must have been completed between the two iclog writes. This means that there is a race condition between the unconditional async cache flush in the CIL push work and the tail LSN that is written to the iclog. This happens like so: CIL push work AIL push work ------------- ------------- Add to committing list start async data dev cache flush ..... xlog_write .... push inode create buffer ..... xlog_write(commit record) .... log tail moves xlog_assign_tail_lsn() start_lsn == commit_lsn xlog_state_release_iclog __xlog_state_release_iclog() xlog_sync() .... submit_bio() Essentially, this can only occur if the commit iclog is issued without a cache flush. If the iclog bio is submitted with REQ_PREFLUSH, then it will guarantee that all the completed IO is one stable storage before the iclog bio with the new tail LSN in it is written to the log. IOWs, the tail lsn that is written to the iclog needs to be sampled *before* we issue the cache flush that guarantees all IO up to that LSN has been completed. To fix this without giving up the performance advantage of the flush/FUA optimisations (e.g. g/482 runtime halves with 5.14-rc1 compared to 5.13), we need to ensure that we always issue a cache flush if the tail LSN changes between the initial async flush and the commit record being written. THis requires sampling the tail_lsn before we start the flush, and then passing the sampled tail LSN to xlog_state_release_iclog() so it can determine if the the tail LSN has changed while writing the checkpoint. If the tail LSN has changed, then it needs to set the NEED_FLUSH flag on the iclog and we'll issue another cache flush before writing the iclog. Fixes: eef983ffeae7 ("xfs: journal IO cache flush reductions") Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9d3920644081edf311878b56e0c1e1477991a195 Author: Dave Chinner Date: Tue Jul 27 16:23:47 2021 -0700 xfs: fold __xlog_state_release_iclog into xlog_state_release_iclog Fold __xlog_state_release_iclog into its only caller to prepare make an upcoming fix easier. Signed-off-by: Dave Chinner [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b5d721eaae47eaa4b4c2754699dadacc4cbca2e0 Author: Dave Chinner Date: Tue Jul 27 16:23:47 2021 -0700 xfs: external logs need to flush data device The recent journal flush/FUA changes replaced the flushing of the data device on every iclog write with an up-front async data device cache flush. Unfortunately, the assumption of which this was based on has been proven incorrect by the flush vs log tail update ordering issue. As the fix for that issue uses the XLOG_ICL_NEED_FLUSH flag to indicate that data device needs a cache flush, we now need to (once again) ensure that an iclog write to external logs that need a cache flush to be issued actually issue a cache flush to the data device as well as the log device. Fixes: eef983ffeae7 ("xfs: journal IO cache flush reductions") Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b1e27239b9169f07edba0ca0e52805645a1768ba Author: Dave Chinner Date: Tue Jul 27 16:23:46 2021 -0700 xfs: flush data dev on external log write We incorrectly flush the log device instead of the data device when trying to ensure metadata is correctly on disk before writing the unmount record. Fixes: eef983ffeae7 ("xfs: journal IO cache flush reductions") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 75d95e2e39b27f733f21e6668af1c9893a97de5e Author: Anirudh Rayabharam Date: Wed Jul 28 14:21:07 2021 +0530 firmware_loader: fix use-after-free in firmware_fallback_sysfs This use-after-free happens when a fw_priv object has been freed but hasn't been removed from the pending list (pending_fw_head). The next time fw_load_sysfs_fallback tries to insert into the list, it ends up accessing the pending_list member of the previously freed fw_priv. The root cause here is that all code paths that abort the fw load don't delete it from the pending list. For example: _request_firmware() -> fw_abort_batch_reqs() -> fw_state_aborted() To fix this, delete the fw_priv from the list in __fw_set_state() if the new state is DONE or ABORTED. This way, all aborts will remove the fw_priv from the list. Accordingly, remove calls to list_del_init that were being made before calling fw_state_(aborted|done). Also, in fw_load_sysfs_fallback, don't add the fw_priv to the pending list if it is already aborted. Instead, just jump out and return early. Fixes: bcfbd3523f3c ("firmware: fix a double abort case with fw_load_sysfs_fallback") Cc: stable Reported-by: syzbot+de271708674e2093097b@syzkaller.appspotmail.com Tested-by: syzbot+de271708674e2093097b@syzkaller.appspotmail.com Reviewed-by: Shuah Khan Acked-by: Luis Chamberlain Signed-off-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/20210728085107.4141-3-mail@anirudhrb.com Signed-off-by: Greg Kroah-Hartman commit 0d6434e10b5377a006f6dd995c8fc5e2d82acddc Author: Anirudh Rayabharam Date: Wed Jul 28 14:21:06 2021 +0530 firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback The only motivation for using -EAGAIN in commit 0542ad88fbdd81bb ("firmware loader: Fix _request_firmware_load() return val for fw load abort") was to distinguish the error from -ENOMEM, and so there is no real reason in keeping it. -EAGAIN is typically used to tell the userspace to try something again and in this case re-using the sysfs loading interface cannot be retried when a timeout happens, so the return value is also bogus. -ETIMEDOUT is received when the wait times out and returning that is much more telling of what the reason for the failure was. So, just propagate that instead of returning -EAGAIN. Suggested-by: Luis Chamberlain Reviewed-by: Shuah Khan Acked-by: Luis Chamberlain Signed-off-by: Anirudh Rayabharam Cc: stable Link: https://lore.kernel.org/r/20210728085107.4141-2-mail@anirudhrb.com Signed-off-by: Greg Kroah-Hartman commit 7c4a509d3815a260c423c0633bd73695250ac26d Author: Zhiyong Tao Date: Thu Jul 29 16:46:40 2021 +0800 serial: 8250_mtk: fix uart corruption issue when rx power off Fix uart corruption issue when rx power off. Add spin lock in mtk8250_dma_rx_complete function in APDMA mode. when uart is used as a communication port with external device(GPS). when external device(GPS) power off, the power of rx pin is also from 1.8v to 0v. Even if there is not any data in rx. But uart rx pin can capture the data "0". If uart don't receive any data in specified cycle, uart will generates BI(Break interrupt) interrupt. If external device(GPS) power off, we found that BI interrupt appeared continuously and very frequently. When uart interrupt type is BI, uart IRQ handler(8250 framwork API:serial8250_handle_irq) will push data to tty buffer. mtk8250_dma_rx_complete is a task of mtk_uart_apdma_rx_handler. mtk8250_dma_rx_complete priority is lower than uart irq handler(serial8250_handle_irq). if we are in process of mtk8250_dma_rx_complete, uart appear BI interrupt:1)serial8250_handle_irq will priority execution.2)it may cause write tty buffer conflict in mtk8250_dma_rx_complete. So the spin lock protect the rx receive data process is not break. Signed-off-by: Zhiyong Tao Cc: stable Link: https://lore.kernel.org/r/20210729084640.17613-2-zhiyong.tao@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 06e91df16f3e1ca1a1886968fb22d4258f3b6b6f Author: Sherry Sun Date: Thu Jul 29 16:31:09 2021 +0800 tty: serial: fsl_lpuart: fix the wrong return value in lpuart32_get_mctrl Patch e60c2991f18b make the lpuart32_get_mctrl always return 0, actually this will break the functions of device which use flow control such as Bluetooth. For lpuart32 plaform, the hardware can handle the CTS automatically. So we should set TIOCM_CTS active. Also need to set CAR and DSR active. Patch has been tested on lpuart32 platforms such as imx8qm and imx8ulp. Fixes: e60c2991f18b ("serial: fsl_lpuart: remove RTSCTS handling from get_mctrl()") Cc: stable Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20210729083109.31541-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit a88603f4b92ecef9e2359e40bcb99ad399d85dd7 Author: Michael Ellerman Date: Thu Jul 29 22:56:36 2021 +1000 powerpc/vdso: Don't use r30 to avoid breaking Go lang The Go runtime uses r30 for some special value called 'g'. It assumes that value will remain unchanged even when calling VDSO functions. Although r30 is non-volatile across function calls, the callee is free to use it, as long as the callee saves the value and restores it before returning. It used to be true by accident that the VDSO didn't use r30, because the VDSO was hand-written asm. When we switched to building the VDSO from C the compiler started using r30, at least in some builds, leading to crashes in Go. eg: ~/go/src$ ./all.bash Building Go cmd/dist using /usr/lib/go-1.16. (go1.16.2 linux/ppc64le) Building Go toolchain1 using /usr/lib/go-1.16. go build os/exec: /usr/lib/go-1.16/pkg/tool/linux_ppc64le/compile: signal: segmentation fault go build reflect: /usr/lib/go-1.16/pkg/tool/linux_ppc64le/compile: signal: segmentation fault go tool dist: FAILED: /usr/lib/go-1.16/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/...: exit status 1 There are patches in flight to fix Go[1], but until they are released and widely deployed we can workaround it in the VDSO by avoiding use of r30. Note this only works with GCC, clang does not support -ffixed-rN. 1: https://go-review.googlesource.com/c/go/+/328110 Fixes: ab037dd87a2f ("powerpc/vdso: Switch VDSO to generic C implementation.") Cc: stable@vger.kernel.org # v5.11+ Reported-by: Paul Menzel Tested-by: Paul Menzel Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210729131244.2595519-1-mpe@ellerman.id.au commit 333cf507465fbebb3727f5b53e77538467df312a Author: Srikar Dronamraju Date: Thu Jul 29 11:34:49 2021 +0530 powerpc/pseries: Fix regression while building external modules With commit c9f3401313a5 ("powerpc: Always enable queued spinlocks for 64s, disable for others") CONFIG_PPC_QUEUED_SPINLOCKS is always enabled on ppc64le, external modules that use spinlock APIs are failing. ERROR: modpost: GPL-incompatible module XXX.ko uses GPL-only symbol 'shared_processor' Before the above commit, modules were able to build without any issues. Also this problem is not seen on other architectures. This problem can be workaround if CONFIG_UNINLINE_SPIN_UNLOCK is enabled in the config. However CONFIG_UNINLINE_SPIN_UNLOCK is not enabled by default and only enabled in certain conditions like CONFIG_DEBUG_SPINLOCKS is set in the kernel config. #include spinlock_t spLock; static int __init spinlock_test_init(void) { spin_lock_init(&spLock); spin_lock(&spLock); spin_unlock(&spLock); return 0; } static void __exit spinlock_test_exit(void) { printk("spinlock_test unloaded\n"); } module_init(spinlock_test_init); module_exit(spinlock_test_exit); MODULE_DESCRIPTION ("spinlock_test"); MODULE_LICENSE ("non-GPL"); MODULE_AUTHOR ("Srikar Dronamraju"); Given that spin locks are one of the basic facilities for module code, this effectively makes it impossible to build/load almost any non GPL modules on ppc64le. This was first reported at https://github.com/openzfs/zfs/issues/11172 Currently shared_processor is exported as GPL only symbol. Fix this for parity with other architectures by exposing shared_processor to non-GPL modules too. Fixes: 14c73bd344da ("powerpc/vcpu: Assume dedicated processors as non-preempt") Cc: stable@vger.kernel.org # v5.5+ Reported-by: marc.c.dionne@gmail.com Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210729060449.292780-1-srikar@linux.vnet.ibm.com commit 3c18e9baee0ef97510dcda78c82285f52626764b Author: Willy Tarreau Date: Sat Jul 24 17:27:39 2021 +0200 USB: serial: ch341: fix character loss at high transfer rates The chip supports high transfer rates, but with the small default buffers (64 bytes read), some entire blocks are regularly lost. This typically happens at 1.5 Mbps (which is the default speed on Rockchip devices) when used as a console to access U-Boot where the output of the "help" command misses many lines and where "printenv" mangles the environment. The FTDI driver doesn't suffer at all from this. One difference is that it uses 512 bytes rx buffers and 256 bytes tx buffers. Adopting these values completely resolved the issue, even the output of "dmesg" is reliable. I preferred to leave the Tx value unchanged as it is not involved in this issue, while a change could increase the risk of triggering the same issue with other devices having too small buffers. I verified that it backports well (and works) at least to 5.4. It's of low importance enough to be dropped where it doesn't trivially apply anymore. Cc: stable@vger.kernel.org Signed-off-by: Willy Tarreau Link: https://lore.kernel.org/r/20210724152739.18726-1-w@1wt.eu Signed-off-by: Johan Hovold commit 153cca9caa81ca8912a70528daca4b9a523c6898 Author: Hans de Goede Date: Thu Jul 29 10:21:34 2021 +0200 platform/x86: Add and use a dual_accel_detect() helper Various 360 degree hinges (yoga) style 2-in-1 devices use 2 accelerometers to allow the OS to determine the angle between the display and the base of the device. On Windows these are read by a special HingeAngleService process which calls undocumented ACPI methods, to let the firmware know if the 2-in-1 is in tablet- or laptop-mode. The firmware may use this to disable the kbd and touchpad to avoid spurious input in tablet-mode as well as to report SW_TABLET_MODE info to the OS. Since Linux does not call these undocumented methods, the SW_TABLET_MODE info reported by various pdx86 drivers is incorrect on these devices. Before this commit the intel-hid and thinkpad_acpi code already had 2 hardcoded checks for ACPI hardware-ids of dual-accel sensors to avoid reporting broken info. And now we also have a bug-report about the same problem in the intel-vbtn code. Since there are at least 3 different ACPI hardware-ids in play, add a new dual_accel_detect() helper which checks for all 3, rather then adding different hardware-ids to the drivers as bug-reports trickle in. Having shared code which checks all known hardware-ids is esp. important for the intel-hid and intel-vbtn drivers as these are generic drivers which are used on a lot of devices. The BOSC0200 hardware-id requires special handling, because often it is used for a single-accelerometer setup. Only in a few cases it refers to a dual-accel setup, in which case there will be 2 I2cSerialBus resources in the device's resource-list, so the helper checks for this. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209011 Reported-and-tested-by: Julius Lehmann Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210729082134.6683-1-hdegoede@redhat.com commit 7280305eb57dd32735f795ed4ee679bf9854f9d0 Author: David Sterba Date: Wed Jul 28 18:00:24 2021 +0200 btrfs: calculate number of eb pages properly in csum_tree_block Building with -Warray-bounds on systems with 64K pages there's a warning: fs/btrfs/disk-io.c: In function ‘csum_tree_block’: fs/btrfs/disk-io.c:226:34: warning: array subscript 1 is above array bounds of ‘struct page *[1]’ [-Warray-bounds] 226 | kaddr = page_address(buf->pages[i]); | ~~~~~~~~~~^~~ ./include/linux/mm.h:1630:48: note: in definition of macro ‘page_address’ 1630 | #define page_address(page) lowmem_page_address(page) | ^~~~ In file included from fs/btrfs/ctree.h:32, from fs/btrfs/disk-io.c:23: fs/btrfs/extent_io.h:98:15: note: while referencing ‘pages’ 98 | struct page *pages[1]; | ^~~~~ The compiler has no way to know that in that case the nodesize is exactly PAGE_SIZE, so the resulting number of pages will be correct (1). Let's use num_extent_pages that makes the case nodesize == PAGE_SIZE explicitly 1. Reported-by: Gustavo A. R. Silva Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit db8d3a21275c807a4047a21bde3b57d49ca55d82 Author: Michael Zaidman Date: Thu Jul 29 13:26:03 2021 +0300 HID: ft260: fix device removal due to USB disconnect This commit fixes a functional regression introduced by the commit 82f09a637dd3 ("HID: ft260: improve error handling of ft260_hid_feature_report_get()") when upon USB disconnect, the FTDI FT260 i2c device is still available within the /dev folder. In my company's product, where the host USB to FT260 USB connection is hard-wired in the PCB, the issue is not reproducible. To reproduce it, I used the VirtualBox Ubuntu 20.04 VM and the UMFT260EV1A development module for the FTDI FT260 chip: Plug the UMFT260EV1A module into a USB port and attach it to VM. The VM shows 2 i2c devices under the /dev: michael@michael-VirtualBox:~$ ls /dev/i2c-* /dev/i2c-0 /dev/i2c-1 The i2c-0 is not related to the FTDI FT260: michael@michael-VirtualBox:~$ cat /sys/bus/i2c/devices/i2c-0/name SMBus PIIX4 adapter at 4100 The i2c-1 is created by hid-ft260.ko: michael@michael-VirtualBox:~$ cat /sys/bus/i2c/devices/i2c-1/name FT260 usb-i2c bridge on hidraw1 Now, detach the FTDI FT260 USB device from VM. We expect the /dev/i2c-1 to disappear, but it's still here: michael@michael-VirtualBox:~$ ls /dev/i2c-* /dev/i2c-0 /dev/i2c-1 And the kernel log shows: [ +0.001202] usb 2-2: USB disconnect, device number 3 [ +0.000109] ft260 0003:0403:6030.0002: failed to retrieve system status [ +0.000316] ft260 0003:0403:6030.0003: failed to retrieve system status It happens because the commit 82f09a637dd3 changed the ft260_get_system_config() return logic. This caused the ft260_is_interface_enabled() to exit with error upon the FT260 device USB disconnect, which in turn, aborted the ft260_remove() before deleting the FT260 i2c device and cleaning its sysfs stuff. This commit restores the FT260 USB removal functionality and improves the ft260_is_interface_enabled() code to handle correctly all chip modes defined by the device interface configuration pins DCNF0 and DCNF1. Signed-off-by: Michael Zaidman Acked-by: Aaron Jones (FTDI-UK) Signed-off-by: Jiri Kosina commit 0d4867a185460397af56b9afe3e2243d3e610e37 Author: Alexander Monakov Date: Wed Jul 21 20:01:41 2021 +0300 ALSA: hda/realtek: add mic quirk for Acer SF314-42 The Acer Swift SF314-42 laptop is using Realtek ALC255 codec. Add a quirk so microphone in a headset connected via the right-hand side jack is usable. Signed-off-by: Alexander Monakov Cc: Link: https://lore.kernel.org/r/20210721170141.24807-1-amonakov@ispras.ru Signed-off-by: Takashi Iwai commit d28e2568ac26fff351c846bf74ba6ca5dded733e Merge: 80c7917d7ee98 ec30ce41f0382 Author: Dave Airlie Date: Thu Jul 29 17:20:29 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-07-28' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-07-28: amdgpu: - Fix resource leak in an error path - Avoid stack contents exposure in error path - pmops check fix for S0ix vs S3 - DCN 2.1 display fixes - DCN 2.0 display fix - Backlight control fix for laptops with HDR panels - Maintainers updates Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210729025817.4145-1-alexander.deucher@amd.com commit a154c43b95e860a305d8c943fb3a16ece9a69715 Merge: fa20bada3f934 5df09c15bab98 Author: Greg Kroah-Hartman Date: Thu Jul 29 08:44:19 2021 +0200 Merge tag 'usb-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Several small bug-fixes for cdns3 and cdnsp driver * tag 'usb-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro usb: cdnsp: Fixed issue with ZLP usb: cdnsp: Fix incorrect supported maximum speed usb: cdns3: Fixed incorrect gadget state commit 5df09c15bab98463203c83ecab88b9321466e626 Author: Christophe JAILLET Date: Tue Jun 22 21:37:48 2021 +0200 usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro IMAN_IE is BIT(1), so these macro are respectively equivalent to BIT(1) and 0, whatever the value of 'p'. The purpose was to set and reset a single bit in 'p'. Fix these macros to do that correctly. Acked-by: Pawel Laszczak Fixes: e93e58d27402 ("usb: cdnsp: Device side header file for CDNSP driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d12bfcc9cbffb89e27b120668821b3c4f09b6755.1624390584.git.christophe.jaillet@wanadoo.fr Signed-off-by: Peter Chen commit e913aada06830338633fb8524733b0ad3d38a7c1 Author: Pawel Laszczak Date: Wed Jun 23 09:27:28 2021 +0200 usb: cdnsp: Fixed issue with ZLP The condition "if (need_zero_pkt && zero_len_trb)" was always false and it caused that TRB for ZLP was not prepared. Fix causes that after preparing last TRB in TD, the driver prepares additional TD with ZLP when a ZLP is required. Cc: Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210623072728.41275-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen commit aa82f94e869edd72f4fadb08c6ffca8927e4934e Author: Pawel Laszczak Date: Fri Jun 25 12:25:02 2021 +0200 usb: cdnsp: Fix incorrect supported maximum speed Driver had hardcoded in initialization maximum supported speed to USB_SPEED_SUPER_PLUS but it should consider the speed returned from usb_get_maximum_speed function. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210625102502.26336-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen commit aa35772f61752d4c636d46be51a4f7ca6c029ee6 Author: Pawel Laszczak Date: Wed Jun 23 09:02:47 2021 +0200 usb: cdns3: Fixed incorrect gadget state For delayed status phase, the usb_gadget->state was set to USB_STATE_ADDRESS and it has never been updated to USB_STATE_CONFIGURED. Patch updates the gadget state to correct USB_STATE_CONFIGURED. As a result of this bug the controller was not able to enter to Test Mode while using MSC function. Cc: Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210623070247.46151-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen commit 640b7ea5f888b521dcf28e2564ce75d08a783fd7 Author: Mike Rapoport Date: Tue Jul 27 23:38:24 2021 +0300 alpha: register early reserved memory in memblock The memory reserved by console/PALcode or non-volatile memory is not added to memblock.memory. Since commit fa3354e4ea39 (mm: free_area_init: use maximal zone PFNs rather than zone sizes) the initialization of the memory map relies on the accuracy of memblock.memory to properly calculate zone sizes. The holes in memblock.memory caused by absent regions reserved by the firmware cause incorrect initialization of struct pages which leads to BUG() during the initial page freeing: BUG: Bad page state in process swapper pfn:2ffc53 page:fffffc000ecf14c0 refcount:0 mapcount:1 mapping:0000000000000000 index:0x0 flags: 0x0() raw: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 raw: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 page dumped because: nonzero mapcount Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.7.0-03841-gfa3354e4ea39-dirty #26 fffffc0001b5bd68 fffffc0001b5be80 fffffc00011cd148 fffffc000ecf14c0 fffffc00019803df fffffc0001b5be80 fffffc00011ce340 fffffc000ecf14c0 0000000000000000 fffffc0001b5be80 fffffc0001b482c0 fffffc00027d6618 fffffc00027da7d0 00000000002ff97a 0000000000000000 fffffc0001b5be80 fffffc00011d1abc fffffc000ecf14c0 fffffc0002d00000 fffffc0001b5be80 fffffc0001b2350c 0000000000300000 fffffc0001b48298 fffffc0001b482c0 Trace: [] bad_page+0x168/0x1b0 [] free_pcp_prepare+0x1e0/0x290 [] free_unref_page+0x2c/0xa0 [] cmp_ex_sort+0x0/0x30 [] cmp_ex_sort+0x0/0x30 [] _stext+0x1c/0x20 Fix this by registering the reserved ranges in memblock.memory. Link: https://lore.kernel.org/lkml/20210726192311.uffqnanxw3ac5wwi@ivybridge Fixes: fa3354e4ea39 ("mm: free_area_init: use maximal zone PFNs rather than zone sizes") Reported-by: Matt Turner Cc: Signed-off-by: Mike Rapoport Signed-off-by: Matt Turner commit 77541f78eadfe9fdb018a7b8b69f0f2af2cf4b82 Author: Harshvardhan Jha Date: Thu Jul 8 13:16:42 2021 +0530 scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry() The list_for_each_entry() iterator, "adapter" in this code, can never be NULL. If we exit the loop without finding the correct adapter then "adapter" points invalid memory that is an offset from the list head. This will eventually lead to memory corruption and presumably a kernel crash. Link: https://lore.kernel.org/r/20210708074642.23599-1-harshvardhan.jha@oracle.com Acked-by: Sumit Saxena Signed-off-by: Harshvardhan Jha Signed-off-by: Martin K. Petersen commit d712d3fb484b7fa8d1d57e9ca6f134bb9d8c18b1 Author: Igor Pylypiv Date: Wed Jul 7 11:59:45 2021 -0700 scsi: pm80xx: Fix TMF task completion race condition The TMF timeout timer may trigger at the same time when the response from a controller is being handled. When this happens the SAS task may get freed before the response processing is finished. Fix this by calling complete() only when SAS_TASK_STATE_DONE is not set. A similar race condition was fixed in commit b90cd6f2b905 ("scsi: libsas: fix a race condition when smp task timeout") Link: https://lore.kernel.org/r/20210707185945.35559-1-ipylypiv@google.com Reviewed-by: Vishakha Channapattan Acked-by: Jack Wang Signed-off-by: Igor Pylypiv Signed-off-by: Martin K. Petersen commit 80c7917d7ee98e83822d53935e6128af16f25abd Merge: 89e7ffd3899f1 b4bde5554f70f Author: Dave Airlie Date: Thu Jul 29 12:13:55 2021 +1000 Merge tag 'drm-intel-fixes-2021-07-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Display related fixes: - Fix vbt port mask - Fix around reading the right DSC disable fuse in display_ver 10 - Split display version 9 and 10 in intel_setup_outputs Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YQF63ruuE72x2T45@intel.com commit 89e7ffd3899f132bcf081cf20d276eb070b084cf Merge: 792ca7e37bcff 8ee18e769dd62 Author: Dave Airlie Date: Thu Jul 29 12:09:28 2021 +1000 Merge tag 'drm-misc-fixes-2021-07-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * panel: Fix bpc for ytc700tlag_05_201c * ttm: debugfs init fixes Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YQFTESngqkeqzlhN@linux-uq9g.fritz.box commit 792ca7e37bcffda60252fab0797e6d3a79a0b173 Merge: ff1176468d368 fc71c9e6f41f9 Author: Dave Airlie Date: Thu Jul 29 11:28:06 2021 +1000 Merge tag 'drm-msm-fixes-2021-07-27' of https://gitlab.freedesktop.org/drm/msm into drm-fixes A few fixes for v5.14, including a fix for a crash if display triggers an iommu fault (which tends to happen at probe time on devices with bootloader fw that leaves display enabled as kernel starts) Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGubeV_uzWhsqp_+EmQmPcPatnqWOQnARoing2YvQOHbyg@mail.gmail.com commit fc16a5322ee6c30ea848818722eee5d352f8d127 Merge: 89fb62fde3b22 2039f26f3aca5 Author: David S. Miller Date: Thu Jul 29 00:53:32 2021 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-07-29 The following pull-request contains BPF updates for your *net* tree. We've added 9 non-merge commits during the last 14 day(s) which contain a total of 20 files changed, 446 insertions(+), 138 deletions(-). The main changes are: 1) Fix UBSAN out-of-bounds splat for showing XDP link fdinfo, from Lorenz Bauer. 2) Fix insufficient Spectre v4 mitigation in BPF runtime, from Daniel Borkmann, Piotr Krysiuk and Benedict Schlueter. 3) Batch of fixes for BPF sockmap found under stress testing, from John Fastabend. ==================== Signed-off-by: David S. Miller commit 2039f26f3aca5b0e419b98f65dd36481337b86ee Author: Daniel Borkmann Date: Tue Jul 13 08:18:31 2021 +0000 bpf: Fix leakage due to insufficient speculative store bypass mitigation Spectre v4 gadgets make use of memory disambiguation, which is a set of techniques that execute memory access instructions, that is, loads and stores, out of program order; Intel's optimization manual, section 2.4.4.5: A load instruction micro-op may depend on a preceding store. Many microarchitectures block loads until all preceding store addresses are known. The memory disambiguator predicts which loads will not depend on any previous stores. When the disambiguator predicts that a load does not have such a dependency, the load takes its data from the L1 data cache. Eventually, the prediction is verified. If an actual conflict is detected, the load and all succeeding instructions are re-executed. af86ca4e3088 ("bpf: Prevent memory disambiguation attack") tried to mitigate this attack by sanitizing the memory locations through preemptive "fast" (low latency) stores of zero prior to the actual "slow" (high latency) store of a pointer value such that upon dependency misprediction the CPU then speculatively executes the load of the pointer value and retrieves the zero value instead of the attacker controlled scalar value previously stored at that location, meaning, subsequent access in the speculative domain is then redirected to the "zero page". The sanitized preemptive store of zero prior to the actual "slow" store is done through a simple ST instruction based on r10 (frame pointer) with relative offset to the stack location that the verifier has been tracking on the original used register for STX, which does not have to be r10. Thus, there are no memory dependencies for this store, since it's only using r10 and immediate constant of zero; hence af86ca4e3088 /assumed/ a low latency operation. However, a recent attack demonstrated that this mitigation is not sufficient since the preemptive store of zero could also be turned into a "slow" store and is thus bypassed as well: [...] // r2 = oob address (e.g. scalar) // r7 = pointer to map value 31: (7b) *(u64 *)(r10 -16) = r2 // r9 will remain "fast" register, r10 will become "slow" register below 32: (bf) r9 = r10 // JIT maps BPF reg to x86 reg: // r9 -> r15 (callee saved) // r10 -> rbp // train store forward prediction to break dependency link between both r9 // and r10 by evicting them from the predictor's LRU table. 33: (61) r0 = *(u32 *)(r7 +24576) 34: (63) *(u32 *)(r7 +29696) = r0 35: (61) r0 = *(u32 *)(r7 +24580) 36: (63) *(u32 *)(r7 +29700) = r0 37: (61) r0 = *(u32 *)(r7 +24584) 38: (63) *(u32 *)(r7 +29704) = r0 39: (61) r0 = *(u32 *)(r7 +24588) 40: (63) *(u32 *)(r7 +29708) = r0 [...] 543: (61) r0 = *(u32 *)(r7 +25596) 544: (63) *(u32 *)(r7 +30716) = r0 // prepare call to bpf_ringbuf_output() helper. the latter will cause rbp // to spill to stack memory while r13/r14/r15 (all callee saved regs) remain // in hardware registers. rbp becomes slow due to push/pop latency. below is // disasm of bpf_ringbuf_output() helper for better visual context: // // ffffffff8117ee20: 41 54 push r12 // ffffffff8117ee22: 55 push rbp // ffffffff8117ee23: 53 push rbx // ffffffff8117ee24: 48 f7 c1 fc ff ff ff test rcx,0xfffffffffffffffc // ffffffff8117ee2b: 0f 85 af 00 00 00 jne ffffffff8117eee0 <-- jump taken // [...] // ffffffff8117eee0: 49 c7 c4 ea ff ff ff mov r12,0xffffffffffffffea // ffffffff8117eee7: 5b pop rbx // ffffffff8117eee8: 5d pop rbp // ffffffff8117eee9: 4c 89 e0 mov rax,r12 // ffffffff8117eeec: 41 5c pop r12 // ffffffff8117eeee: c3 ret 545: (18) r1 = map[id:4] 547: (bf) r2 = r7 548: (b7) r3 = 0 549: (b7) r4 = 4 550: (85) call bpf_ringbuf_output#194288 // instruction 551 inserted by verifier \ 551: (7a) *(u64 *)(r10 -16) = 0 | /both/ are now slow stores here // storing map value pointer r7 at fp-16 | since value of r10 is "slow". 552: (7b) *(u64 *)(r10 -16) = r7 / // following "fast" read to the same memory location, but due to dependency // misprediction it will speculatively execute before insn 551/552 completes. 553: (79) r2 = *(u64 *)(r9 -16) // in speculative domain contains attacker controlled r2. in non-speculative // domain this contains r7, and thus accesses r7 +0 below. 554: (71) r3 = *(u8 *)(r2 +0) // leak r3 As can be seen, the current speculative store bypass mitigation which the verifier inserts at line 551 is insufficient since /both/, the write of the zero sanitation as well as the map value pointer are a high latency instruction due to prior memory access via push/pop of r10 (rbp) in contrast to the low latency read in line 553 as r9 (r15) which stays in hardware registers. Thus, architecturally, fp-16 is r7, however, microarchitecturally, fp-16 can still be r2. Initial thoughts to address this issue was to track spilled pointer loads from stack and enforce their load via LDX through r10 as well so that /both/ the preemptive store of zero /as well as/ the load use the /same/ register such that a dependency is created between the store and load. However, this option is not sufficient either since it can be bypassed as well under speculation. An updated attack with pointer spill/fills now _all_ based on r10 would look as follows: [...] // r2 = oob address (e.g. scalar) // r7 = pointer to map value [...] // longer store forward prediction training sequence than before. 2062: (61) r0 = *(u32 *)(r7 +25588) 2063: (63) *(u32 *)(r7 +30708) = r0 2064: (61) r0 = *(u32 *)(r7 +25592) 2065: (63) *(u32 *)(r7 +30712) = r0 2066: (61) r0 = *(u32 *)(r7 +25596) 2067: (63) *(u32 *)(r7 +30716) = r0 // store the speculative load address (scalar) this time after the store // forward prediction training. 2068: (7b) *(u64 *)(r10 -16) = r2 // preoccupy the CPU store port by running sequence of dummy stores. 2069: (63) *(u32 *)(r7 +29696) = r0 2070: (63) *(u32 *)(r7 +29700) = r0 2071: (63) *(u32 *)(r7 +29704) = r0 2072: (63) *(u32 *)(r7 +29708) = r0 2073: (63) *(u32 *)(r7 +29712) = r0 2074: (63) *(u32 *)(r7 +29716) = r0 2075: (63) *(u32 *)(r7 +29720) = r0 2076: (63) *(u32 *)(r7 +29724) = r0 2077: (63) *(u32 *)(r7 +29728) = r0 2078: (63) *(u32 *)(r7 +29732) = r0 2079: (63) *(u32 *)(r7 +29736) = r0 2080: (63) *(u32 *)(r7 +29740) = r0 2081: (63) *(u32 *)(r7 +29744) = r0 2082: (63) *(u32 *)(r7 +29748) = r0 2083: (63) *(u32 *)(r7 +29752) = r0 2084: (63) *(u32 *)(r7 +29756) = r0 2085: (63) *(u32 *)(r7 +29760) = r0 2086: (63) *(u32 *)(r7 +29764) = r0 2087: (63) *(u32 *)(r7 +29768) = r0 2088: (63) *(u32 *)(r7 +29772) = r0 2089: (63) *(u32 *)(r7 +29776) = r0 2090: (63) *(u32 *)(r7 +29780) = r0 2091: (63) *(u32 *)(r7 +29784) = r0 2092: (63) *(u32 *)(r7 +29788) = r0 2093: (63) *(u32 *)(r7 +29792) = r0 2094: (63) *(u32 *)(r7 +29796) = r0 2095: (63) *(u32 *)(r7 +29800) = r0 2096: (63) *(u32 *)(r7 +29804) = r0 2097: (63) *(u32 *)(r7 +29808) = r0 2098: (63) *(u32 *)(r7 +29812) = r0 // overwrite scalar with dummy pointer; same as before, also including the // sanitation store with 0 from the current mitigation by the verifier. 2099: (7a) *(u64 *)(r10 -16) = 0 | /both/ are now slow stores here 2100: (7b) *(u64 *)(r10 -16) = r7 | since store unit is still busy. // load from stack intended to bypass stores. 2101: (79) r2 = *(u64 *)(r10 -16) 2102: (71) r3 = *(u8 *)(r2 +0) // leak r3 [...] Looking at the CPU microarchitecture, the scheduler might issue loads (such as seen in line 2101) before stores (line 2099,2100) because the load execution units become available while the store execution unit is still busy with the sequence of dummy stores (line 2069-2098). And so the load may use the prior stored scalar from r2 at address r10 -16 for speculation. The updated attack may work less reliable on CPU microarchitectures where loads and stores share execution resources. This concludes that the sanitizing with zero stores from af86ca4e3088 ("bpf: Prevent memory disambiguation attack") is insufficient. Moreover, the detection of stack reuse from af86ca4e3088 where previously data (STACK_MISC) has been written to a given stack slot where a pointer value is now to be stored does not have sufficient coverage as precondition for the mitigation either; for several reasons outlined as follows: 1) Stack content from prior program runs could still be preserved and is therefore not "random", best example is to split a speculative store bypass attack between tail calls, program A would prepare and store the oob address at a given stack slot and then tail call into program B which does the "slow" store of a pointer to the stack with subsequent "fast" read. From program B PoV such stack slot type is STACK_INVALID, and therefore also must be subject to mitigation. 2) The STACK_SPILL must not be coupled to register_is_const(&stack->spilled_ptr) condition, for example, the previous content of that memory location could also be a pointer to map or map value. Without the fix, a speculative store bypass is not mitigated in such precondition and can then lead to a type confusion in the speculative domain leaking kernel memory near these pointer types. While brainstorming on various alternative mitigation possibilities, we also stumbled upon a retrospective from Chrome developers [0]: [...] For variant 4, we implemented a mitigation to zero the unused memory of the heap prior to allocation, which cost about 1% when done concurrently and 4% for scavenging. Variant 4 defeats everything we could think of. We explored more mitigations for variant 4 but the threat proved to be more pervasive and dangerous than we anticipated. For example, stack slots used by the register allocator in the optimizing compiler could be subject to type confusion, leading to pointer crafting. Mitigating type confusion for stack slots alone would have required a complete redesign of the backend of the optimizing compiler, perhaps man years of work, without a guarantee of completeness. [...] From BPF side, the problem space is reduced, however, options are rather limited. One idea that has been explored was to xor-obfuscate pointer spills to the BPF stack: [...] // preoccupy the CPU store port by running sequence of dummy stores. [...] 2106: (63) *(u32 *)(r7 +29796) = r0 2107: (63) *(u32 *)(r7 +29800) = r0 2108: (63) *(u32 *)(r7 +29804) = r0 2109: (63) *(u32 *)(r7 +29808) = r0 2110: (63) *(u32 *)(r7 +29812) = r0 // overwrite scalar with dummy pointer; xored with random 'secret' value // of 943576462 before store ... 2111: (b4) w11 = 943576462 2112: (af) r11 ^= r7 2113: (7b) *(u64 *)(r10 -16) = r11 2114: (79) r11 = *(u64 *)(r10 -16) 2115: (b4) w2 = 943576462 2116: (af) r2 ^= r11 // ... and restored with the same 'secret' value with the help of AX reg. 2117: (71) r3 = *(u8 *)(r2 +0) [...] While the above would not prevent speculation, it would make data leakage infeasible by directing it to random locations. In order to be effective and prevent type confusion under speculation, such random secret would have to be regenerated for each store. The additional complexity involved for a tracking mechanism that prevents jumps such that restoring spilled pointers would not get corrupted is not worth the gain for unprivileged. Hence, the fix in here eventually opted for emitting a non-public BPF_ST | BPF_NOSPEC instruction which the x86 JIT translates into a lfence opcode. Inserting the latter in between the store and load instruction is one of the mitigations options [1]. The x86 instruction manual notes: [...] An LFENCE that follows an instruction that stores to memory might complete before the data being stored have become globally visible. [...] The latter meaning that the preceding store instruction finished execution and the store is at minimum guaranteed to be in the CPU's store queue, but it's not guaranteed to be in that CPU's L1 cache at that point (globally visible). The latter would only be guaranteed via sfence. So the load which is guaranteed to execute after the lfence for that local CPU would have to rely on store-to-load forwarding. [2], in section 2.3 on store buffers says: [...] For every store operation that is added to the ROB, an entry is allocated in the store buffer. This entry requires both the virtual and physical address of the target. Only if there is no free entry in the store buffer, the frontend stalls until there is an empty slot available in the store buffer again. Otherwise, the CPU can immediately continue adding subsequent instructions to the ROB and execute them out of order. On Intel CPUs, the store buffer has up to 56 entries. [...] One small upside on the fix is that it lifts constraints from af86ca4e3088 where the sanitize_stack_off relative to r10 must be the same when coming from different paths. The BPF_ST | BPF_NOSPEC gets emitted after a BPF_STX or BPF_ST instruction. This happens either when we store a pointer or data value to the BPF stack for the first time, or upon later pointer spills. The former needs to be enforced since otherwise stale stack data could be leaked under speculation as outlined earlier. For non-x86 JITs the BPF_ST | BPF_NOSPEC mapping is currently optimized away, but others could emit a speculation barrier as well if necessary. For real-world unprivileged programs e.g. generated by LLVM, pointer spill/fill is only generated upon register pressure and LLVM only tries to do that for pointers which are not used often. The program main impact will be the initial BPF_ST | BPF_NOSPEC sanitation for the STACK_INVALID case when the first write to a stack slot occurs e.g. upon map lookup. In future we might refine ways to mitigate the latter cost. [0] https://arxiv.org/pdf/1902.05178.pdf [1] https://msrc-blog.microsoft.com/2018/05/21/analysis-and-mitigation-of-speculative-store-bypass-cve-2018-3639/ [2] https://arxiv.org/pdf/1905.05725.pdf Fixes: af86ca4e3088 ("bpf: Prevent memory disambiguation attack") Fixes: f7cf25b2026d ("bpf: track spill/fill of constants") Co-developed-by: Piotr Krysiuk Co-developed-by: Benedict Schlueter Signed-off-by: Daniel Borkmann Signed-off-by: Piotr Krysiuk Signed-off-by: Benedict Schlueter Acked-by: Alexei Starovoitov commit f5e81d1117501546b7be050c5fbafa6efd2c722c Author: Daniel Borkmann Date: Tue Jul 13 08:18:31 2021 +0000 bpf: Introduce BPF nospec instruction for mitigating Spectre v4 In case of JITs, each of the JIT backends compiles the BPF nospec instruction /either/ to a machine instruction which emits a speculation barrier /or/ to /no/ machine instruction in case the underlying architecture is not affected by Speculative Store Bypass or has different mitigations in place already. This covers both x86 and (implicitly) arm64: In case of x86, we use 'lfence' instruction for mitigation. In case of arm64, we rely on the firmware mitigation as controlled via the ssbd kernel parameter. Whenever the mitigation is enabled, it works for all of the kernel code with no need to provide any additional instructions here (hence only comment in arm64 JIT). Other archs can follow as needed. The BPF nospec instruction is specifically targeting Spectre v4 since i) we don't use a serialization barrier for the Spectre v1 case, and ii) mitigation instructions for v1 and v4 might be different on some archs. The BPF nospec is required for a future commit, where the BPF verifier does annotate intermediate BPF programs with speculation barriers. Co-developed-by: Piotr Krysiuk Co-developed-by: Benedict Schlueter Signed-off-by: Daniel Borkmann Signed-off-by: Piotr Krysiuk Signed-off-by: Benedict Schlueter Acked-by: Alexei Starovoitov commit b946dbcfa4df80ec81b442964e07ad37000cc059 Author: Ronnie Sahlberg Date: Wed Jul 28 16:38:29 2021 +1000 cifs: add missing parsing of backupuid We lost parsing of backupuid in the switch to new mount API. Add it back. Signed-off-by: Ronnie Sahlberg Reviewed-by: Shyam Prasad N Cc: # v5.11+ Reported-by: Xiaoli Feng Signed-off-by: Steve French commit 4010a528219e01dd02e768b22168f7f0e78365ce Merge: dfe495362c9b2 13d257503c093 Author: Linus Torvalds Date: Wed Jul 28 10:38:38 2021 -0700 Merge tag 'fixes_for_v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2 and reiserfs fixes from Jan Kara: "A fix for the ext2 conversion to kmap_local() and two reiserfs hardening fixes" * tag 'fixes_for_v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: check directory items on read from disk fs/ext2: Avoid page_address on pages returned by ext2_get_page reiserfs: add check for root_inode in reiserfs_fill_super commit 345daff2e994ee844d6a609c37f085695fbb4c4d Author: Alexey Gladkov Date: Tue Jul 27 17:24:18 2021 +0200 ucounts: Fix race condition between alloc_ucounts and put_ucounts The race happens because put_ucounts() doesn't use spinlock and get_ucounts is not under spinlock: CPU0 CPU1 ---- ---- alloc_ucounts() put_ucounts() spin_lock_irq(&ucounts_lock); ucounts = find_ucounts(ns, uid, hashent); atomic_dec_and_test(&ucounts->count)) spin_unlock_irq(&ucounts_lock); spin_lock_irqsave(&ucounts_lock, flags); hlist_del_init(&ucounts->node); spin_unlock_irqrestore(&ucounts_lock, flags); kfree(ucounts); ucounts = get_ucounts(ucounts); ================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_add_negative include/asm-generic/atomic-instrumented.h:556 [inline] BUG: KASAN: use-after-free in get_ucounts kernel/ucount.c:152 [inline] BUG: KASAN: use-after-free in get_ucounts kernel/ucount.c:150 [inline] BUG: KASAN: use-after-free in alloc_ucounts+0x19b/0x5b0 kernel/ucount.c:188 Write of size 4 at addr ffff88802821e41c by task syz-executor.4/16785 CPU: 1 PID: 16785 Comm: syz-executor.4 Not tainted 5.14.0-rc1-next-20210712-syzkaller #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:105 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_add_negative include/asm-generic/atomic-instrumented.h:556 [inline] get_ucounts kernel/ucount.c:152 [inline] get_ucounts kernel/ucount.c:150 [inline] alloc_ucounts+0x19b/0x5b0 kernel/ucount.c:188 set_cred_ucounts+0x171/0x3a0 kernel/cred.c:684 __sys_setuid+0x285/0x400 kernel/sys.c:623 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:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fde54097188 EFLAGS: 00000246 ORIG_RAX: 0000000000000069 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000000000ff RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffc8655740f R14: 00007fde54097300 R15: 0000000000022000 Allocated by task 16784: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] alloc_ucounts+0x23d/0x5b0 kernel/ucount.c:169 set_cred_ucounts+0x171/0x3a0 kernel/cred.c:684 __sys_setuid+0x285/0x400 kernel/sys.c:623 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 Freed by task 16785: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 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+0xfb/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:229 [inline] slab_free_hook mm/slub.c:1650 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1675 slab_free mm/slub.c:3235 [inline] kfree+0xeb/0x650 mm/slub.c:4295 put_ucounts kernel/ucount.c:200 [inline] put_ucounts+0x117/0x150 kernel/ucount.c:192 put_cred_rcu+0x27a/0x520 kernel/cred.c:124 rcu_do_batch kernel/rcu/tree.c:2550 [inline] rcu_core+0x7ab/0x1380 kernel/rcu/tree.c:2785 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1332 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1498 queue_work_on+0xee/0x110 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1f0/0x4c0 kernel/umh.c:435 kobject_uevent_env+0xf8f/0x1650 lib/kobject_uevent.c:618 netdev_queue_add_kobject net/core/net-sysfs.c:1621 [inline] netdev_queue_update_kobjects+0x374/0x450 net/core/net-sysfs.c:1655 register_queue_kobjects net/core/net-sysfs.c:1716 [inline] netdev_register_kobject+0x35a/0x430 net/core/net-sysfs.c:1959 register_netdevice+0xd33/0x1500 net/core/dev.c:10331 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:317 [inline] nsim_create+0x381/0x4d0 drivers/net/netdevsim/netdev.c:364 __nsim_dev_port_add+0x32e/0x830 drivers/net/netdevsim/dev.c:1295 nsim_dev_port_add_all+0x53/0x150 drivers/net/netdevsim/dev.c:1355 nsim_dev_probe+0xcb5/0x1190 drivers/net/netdevsim/dev.c:1496 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x23c/0xcd0 drivers/base/dd.c:595 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:747 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:777 __device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:894 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427 __device_attach+0x228/0x4a0 drivers/base/dd.c:965 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487 device_add+0xc2f/0x2180 drivers/base/core.c:3356 nsim_bus_dev_new drivers/net/netdevsim/bus.c:431 [inline] new_device_store+0x436/0x710 drivers/net/netdevsim/bus.c:298 bus_attr_store+0x72/0xa0 drivers/base/bus.c:122 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:139 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2152 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x75a/0xa40 fs/read_write.c:605 ksys_write+0x12d/0x250 fs/read_write.c:658 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 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1332 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1498 queue_work_on+0xee/0x110 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1f0/0x4c0 kernel/umh.c:435 kobject_uevent_env+0xf8f/0x1650 lib/kobject_uevent.c:618 kobject_synth_uevent+0x701/0x850 lib/kobject_uevent.c:208 uevent_store+0x20/0x50 drivers/base/core.c:2371 dev_attr_store+0x50/0x80 drivers/base/core.c:2072 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:139 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2152 [inline] new_sync_write+0x426/0x650 fs/read_write.c:518 vfs_write+0x75a/0xa40 fs/read_write.c:605 ksys_write+0x12d/0x250 fs/read_write.c:658 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 The buggy address belongs to the object at ffff88802821e400 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 28 bytes inside of 192-byte region [ffff88802821e400, ffff88802821e4c0) The buggy address belongs to the page: page:ffffea0000a08780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2821e flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888010841a00 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 12874702440, free_ts 12637793385 prep_new_page mm/page_alloc.c:2433 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4166 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5374 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2119 alloc_pages+0x238/0x2a0 mm/mempolicy.c:2242 alloc_slab_page mm/slub.c:1713 [inline] allocate_slab+0x32b/0x4c0 mm/slub.c:1853 new_slab mm/slub.c:1916 [inline] new_slab_objects mm/slub.c:2662 [inline] ___slab_alloc+0x4ba/0x820 mm/slub.c:2825 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2865 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2989 [inline] __kmalloc+0x312/0x330 mm/slub.c:4133 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] __register_sysctl_table+0x112/0x1090 fs/proc/proc_sysctl.c:1318 rds_tcp_init_net+0x1db/0x4f0 net/rds/tcp.c:551 ops_init+0xaf/0x470 net/core/net_namespace.c:140 __register_pernet_operations net/core/net_namespace.c:1137 [inline] register_pernet_operations+0x35a/0x850 net/core/net_namespace.c:1214 register_pernet_device+0x26/0x70 net/core/net_namespace.c:1301 rds_tcp_init+0x77/0xe0 net/rds/tcp.c:717 do_one_initcall+0x103/0x650 init/main.c:1285 do_initcall_level init/main.c:1360 [inline] do_initcalls init/main.c:1376 [inline] do_basic_setup init/main.c:1396 [inline] kernel_init_freeable+0x6b8/0x741 init/main.c:1598 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1343 [inline] free_pcp_prepare+0x312/0x7d0 mm/page_alloc.c:1394 free_unref_page_prepare mm/page_alloc.c:3329 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3408 __vunmap+0x783/0xb70 mm/vmalloc.c:2587 free_work+0x58/0x70 mm/vmalloc.c:82 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88802821e300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802821e380: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff88802821e400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802821e480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802821e500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== - The race fix has two parts. * Changing the code to guarantee that ucounts->count is only decremented when ucounts_lock is held. This guarantees that find_ucounts will never find a structure with a zero reference count. * Changing alloc_ucounts to increment ucounts->count while ucounts_lock is held. This guarantees the reference count on the found data structure will not be decremented to zero (and the data structure freed) before the reference count is incremented. -- Eric Biederman Reported-by: syzbot+01985d7909f9468f013c@syzkaller.appspotmail.com Reported-by: syzbot+59dd63761094a80ad06d@syzkaller.appspotmail.com Reported-by: syzbot+6cd79f45bb8fa1c9eeae@syzkaller.appspotmail.com Reported-by: syzbot+b6e65bd125a05f803d6b@syzkaller.appspotmail.com Fixes: b6c336528926 ("Use atomic_t for ucounts reference counting") Cc: Hillf Danton Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/7b2ace1759b281cdd2d66101d6b305deef722efb.1627397820.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit dfe495362c9b27e48a2b2ca81aed0ea754762b23 Merge: 25905f602fdb0 2b2c66f607d00 Author: Linus Torvalds Date: Wed Jul 28 10:31:17 2021 -0700 Merge tag 'platform-drivers-x86-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "A set of bug-fixes and new hardware ids. Highlights: - amd-pmc fixes - think-lmi fixes - various new hardware-ids" * tag 'platform-drivers-x86-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: gigabyte-wmi: add support for B550 Aorus Elite V2 platform/x86: intel-hid: add Alder Lake ACPI device ID platform/x86: think-lmi: Fix possible mem-leaks on tlmi_analyze() error-exit platform/x86: think-lmi: Split kobject_init() and kobject_add() calls platform/x86: think-lmi: Move pending_reboot_attr to the attributes sysfs dir platform/x86: amd-pmc: Fix undefined reference to __udivdi3 platform/x86: amd-pmc: Fix missing unlock on error in amd_pmc_send_cmd() platform/x86: wireless-hotkey: remove hardcoded "hp" from the error message platform/x86: amd-pmc: Use return code on suspend platform/x86: amd-pmc: Add new acpi id for future PMC controllers platform/x86: amd-pmc: Add support for ACPI ID AMDI0006 platform/x86: amd-pmc: Add support for logging s0ix counters platform/x86: amd-pmc: Add support for logging SMU metrics platform/x86: amd-pmc: call dump registers only once platform/x86: amd-pmc: Fix SMU firmware reporting mechanism platform/x86: amd-pmc: Fix command completion code platform/x86: think-lmi: Add pending_reboot support commit 25905f602fdb0cfa147017056636768a7aa1ff6f Author: Tony Luck Date: Wed Jul 21 12:25:20 2021 -0700 dmaengine: idxd: Change license on idxd.h to LGPL This file was given GPL-2.0 license. But LGPL-2.1 makes more sense as it needs to be used by libraries outside of the kernel source tree. Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds commit cbcf01128d0a92e131bd09f1688fe032480b65ca Author: Miklos Szeredi Date: Wed Jul 28 14:47:20 2021 +0200 af_unix: fix garbage collect vs MSG_PEEK unix_gc() assumes that candidate sockets can never gain an external reference (i.e. be installed into an fd) while the unix_gc_lock is held. Except for MSG_PEEK this is guaranteed by modifying inflight count under the unix_gc_lock. MSG_PEEK does not touch any variable protected by unix_gc_lock (file count is not), yet it needs to be serialized with garbage collection. Do this by locking/unlocking unix_gc_lock: 1) increment file count 2) lock/unlock barrier to make sure incremented file count is visible to garbage collection 3) install file into fd This is a lock barrier (unlike smp_mb()) that ensures that garbage collection is run completely before or completely after the barrier. Cc: Signed-off-by: Greg Kroah-Hartman Signed-off-by: Miklos Szeredi Signed-off-by: Linus Torvalds commit b2a616676839e2a6b02c8e40be7f886f882ed194 Author: Desmond Cheong Zhi Xi Date: Tue Jul 27 15:13:03 2021 +0800 btrfs: fix rw device counting in __btrfs_free_extra_devids When removing a writeable device in __btrfs_free_extra_devids, the rw device count should be decremented. This error was caught by Syzbot which reported a warning in close_fs_devices: WARNING: CPU: 1 PID: 9355 at fs/btrfs/volumes.c:1168 close_fs_devices+0x763/0x880 fs/btrfs/volumes.c:1168 Modules linked in: CPU: 0 PID: 9355 Comm: syz-executor552 Not tainted 5.13.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:close_fs_devices+0x763/0x880 fs/btrfs/volumes.c:1168 RSP: 0018:ffffc9000333f2f0 EFLAGS: 00010293 RAX: ffffffff8365f5c3 RBX: 0000000000000001 RCX: ffff888029afd4c0 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff88802846f508 R08: ffffffff8365f525 R09: ffffed100337d128 R10: ffffed100337d128 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff888019be8868 R14: 1ffff1100337d10d R15: 1ffff1100337d10a FS: 00007f6f53828700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000047c410 CR3: 00000000302a6000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_close_devices+0xc9/0x450 fs/btrfs/volumes.c:1180 open_ctree+0x8e1/0x3968 fs/btrfs/disk-io.c:3693 btrfs_fill_super fs/btrfs/super.c:1382 [inline] btrfs_mount_root+0xac5/0xc60 fs/btrfs/super.c:1749 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x86/0x270 fs/super.c:1498 fc_mount fs/namespace.c:993 [inline] vfs_kern_mount+0xc9/0x160 fs/namespace.c:1023 btrfs_mount+0x3d3/0xb50 fs/btrfs/super.c:1809 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x86/0x270 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x196f/0x2be0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3433 do_syscall_64+0x3f/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Because fs_devices->rw_devices was not 0 after closing all devices. Here is the call trace that was observed: btrfs_mount_root(): btrfs_scan_one_device(): device_list_add(); <---------------- device added btrfs_open_devices(): open_fs_devices(): btrfs_open_one_device(); <-------- writable device opened, rw device count ++ btrfs_fill_super(): open_ctree(): btrfs_free_extra_devids(): __btrfs_free_extra_devids(); <--- writable device removed, rw device count not decremented fail_tree_roots: btrfs_close_devices(): close_fs_devices(); <------- rw device count off by 1 As a note, prior to commit cf89af146b7e ("btrfs: dev-replace: fail mount if we don't have replace item with target device"), rw_devices was decremented on removing a writable device in __btrfs_free_extra_devids only if the BTRFS_DEV_STATE_REPLACE_TGT bit was not set for the device. However, this check does not need to be reinstated as it is now redundant and incorrect. In __btrfs_free_extra_devids, we skip removing the device if it is the target for replacement. This is done by checking whether device->devid == BTRFS_DEV_REPLACE_DEVID. Since BTRFS_DEV_STATE_REPLACE_TGT is set only on the device with devid BTRFS_DEV_REPLACE_DEVID, no devices should have the BTRFS_DEV_STATE_REPLACE_TGT bit set after the check, and so it's redundant to test for that bit. Additionally, following commit 82372bc816d7 ("Btrfs: make the logic of source device removing more clear"), rw_devices is incremented whenever a writeable device is added to the alloc list (including the target device in btrfs_dev_replace_finishing), so all removals of writable devices from the alloc list should also be accompanied by a decrement to rw_devices. Reported-by: syzbot+a70e2ad0879f160b9217@syzkaller.appspotmail.com Fixes: cf89af146b7e ("btrfs: dev-replace: fail mount if we don't have replace item with target device") CC: stable@vger.kernel.org # 5.10+ Tested-by: syzbot+a70e2ad0879f160b9217@syzkaller.appspotmail.com Reviewed-by: Anand Jain Signed-off-by: Desmond Cheong Zhi Xi Signed-off-by: David Sterba commit ecc64fab7d49c678e70bd4c35fe64d2ab3e3d212 Author: Filipe Manana Date: Tue Jul 27 11:24:43 2021 +0100 btrfs: fix lost inode on log replay after mix of fsync, rename and inode eviction When checking if we need to log the new name of a renamed inode, we are checking if the inode and its parent inode have been logged before, and if not we don't log the new name. The check however is buggy, as it directly compares the logged_trans field of the inodes versus the ID of the current transaction. The problem is that logged_trans is a transient field, only stored in memory and never persisted in the inode item, so if an inode was logged before, evicted and reloaded, its logged_trans field is set to a value of 0, meaning the check will return false and the new name of the renamed inode is not logged. If the old parent directory was previously fsynced and we deleted the logged directory entries corresponding to the old name, we end up with a log that when replayed will delete the renamed inode. The following example triggers the problem: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ mkdir /mnt/A $ mkdir /mnt/B $ echo -n "hello world" > /mnt/A/foo $ sync # Add some new file to A and fsync directory A. $ touch /mnt/A/bar $ xfs_io -c "fsync" /mnt/A # Now trigger inode eviction. We are only interested in triggering # eviction for the inode of directory A. $ echo 2 > /proc/sys/vm/drop_caches # Move foo from directory A to directory B. # This deletes the directory entries for foo in A from the log, and # does not add the new name for foo in directory B to the log, because # logged_trans of A is 0, which is less than the current transaction ID. $ mv /mnt/A/foo /mnt/B/foo # Now make an fsync to anything except A, B or any file inside them, # like for example create a file at the root directory and fsync this # new file. This syncs the log that contains all the changes done by # previous rename operation. $ touch /mnt/baz $ xfs_io -c "fsync" /mnt/baz # Mount the filesystem and replay the log. $ mount /dev/sdc /mnt # Check the filesystem content. $ ls -1R /mnt /mnt/: A B baz /mnt/A: bar /mnt/B: $ # File foo is gone, it's neither in A/ nor in B/. Fix this by using the inode_logged() helper at btrfs_log_new_name(), which safely checks if an inode was logged before in the current transaction. A test case for fstests will follow soon. CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 240246f6b913b0c23733cfd2def1d283f8cc9bbe Author: Goldwyn Rodrigues Date: Fri Jul 9 11:29:22 2021 -0500 btrfs: mark compressed range uptodate only if all bio succeed In compression write endio sequence, the range which the compressed_bio writes is marked as uptodate if the last bio of the compressed (sub)bios is completed successfully. There could be previous bio which may have failed which is recorded in cb->errors. Set the writeback range as uptodate only if cb->errors is zero, as opposed to checking only the last bio's status. Backporting notes: in all versions up to 4.4 the last argument is always replaced by "!cb->errors". CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 41a8457f3f6f829be1f8f8fa7577a46b9b7223ef Author: Srinivas Pandruvada Date: Tue Jul 27 09:18:24 2021 -0700 ACPI: DPTF: Fix reading of attributes The current assumption that methods to read PCH FIVR attributes will return integer, is not correct. There is no good way to return integer as negative numbers are also valid. These read methods return a package of integers. The first integer returns status, which is 0 on success and any other value for failure. When the returned status is zero, then the second integer returns the actual value. This change fixes this issue by replacing acpi_evaluate_integer() with acpi_evaluate_object() and use acpi_extract_package() to extract results. Fixes: 2ce6324eadb01 ("ACPI: DPTF: Add PCH FIVR participant driver") Signed-off-by: Srinivas Pandruvada Cc: 5.10+ # 5.10+ Signed-off-by: Rafael J. Wysocki commit e0eef3690dc66b3ecc6e0f1267f332403eb22bea Author: Hui Wang Date: Wed Jul 28 23:19:58 2021 +0800 Revert "ACPI: resources: Add checks for ACPI IRQ override" The commit 0ec4e55e9f57 ("ACPI: resources: Add checks for ACPI IRQ override") introduces regression on some platforms, at least it makes the UART can't get correct irq setting on two different platforms, and it makes the kernel can't bootup on these two platforms. This reverts commit 0ec4e55e9f571f08970ed115ec0addc691eda613. Regression-discuss: https://bugzilla.kernel.org/show_bug.cgi?id=213031 Reported-by: PGNd Cc: 5.4+ # 5.4+ Signed-off-by: Hui Wang Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit 36c2530ea963884eeb0097169f853fdc36f16ad7 Author: Marek Vasut Date: Tue Jul 27 18:04:28 2021 +0200 spi: imx: mx51-ecspi: Fix CONFIGREG delay comment For (2 * 1000000) / min_speed_hz < 10 to be true in naturals with zero, the min_speed_hz must be above 200000 (i.e. 200001 rounds down to 9, so the condition triggers). Update the comment. No functional change. Fixes: 6fd8b8503a0dc ("spi: spi-imx: Fix out-of-order CS/SCLK operation at low speeds") Signed-off-by: Marek Vasut Cc: Uwe Kleine-König Cc: Mark Brown Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210727160428.7673-1-marex@denx.de Signed-off-by: Mark Brown commit 830b69f6c059bc46451e7c4be8b796d483acb0bd Author: Richard Fitzgerald Date: Tue Jul 27 17:49:48 2021 +0100 MAINTAINERS: Add sound devicetree bindings for Wolfson Micro devices Include all wm* sound bindings in the section for Wolfson Micro drivers. This section already includes the actual driver source files. Also update the existing entry to match all wlf,* sound bindings. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20210727164948.4308-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit acbf58e530416e167c3b323111f4013d9f2b0a7d Author: Lucas Tanure Date: Wed Jul 28 11:44:16 2021 +0100 ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs soc_cleanup_component_debugfs will debugfs_remove_recursive the component->debugfs_root, so adsp doesn't need to also remove the same entry. By doing that adsp also creates a race with core component, which causes a NULL pointer dereference Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210728104416.636591-1-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 31428c78748cafdd9352e1f622eb89bf453d9700 Author: Mark Brown Date: Mon Jul 26 20:41:23 2021 +0100 ASoC: component: Remove misplaced prefix handling in pin control functions When the component level pin control functions were added they for some no longer obvious reason handled adding prefixing of widget names. This meant that when the lack of prefix handling in the DAPM level pin operations was fixed by ae4fc532244b3bb4d (ASoC: dapm: use component prefix when checking widget names) the one device using the component level API ended up with the prefix being applied twice, causing all lookups to fail. Fix this by removing the redundant prefixing from the component code, which has the nice side effect of also making that code much simpler. Reported-by: Richard Fitzgerald Signed-off-by: Mark Brown Tested-by: Lucas Tanure Link: https://lore.kernel.org/r/20210726194123.54585-1-broonie@kernel.org Signed-off-by: Mark Brown commit 891332f697e14bfb2002f56e21d9bbd4800a7098 Author: Yaara Baruch Date: Mon Jul 19 14:45:39 2021 +0200 iwlwifi: add new so-jf devices Add new so-jf devices to the driver. Signed-off-by: Yaara Baruch Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210719144523.1c9a59fd2760.If5aef1942007828210f0f2c4a17985f63050bb45@changeid commit a5bf1d4434b93394fa37494d78fe9f3513557185 Author: Yaara Baruch Date: Mon Jul 19 14:45:38 2021 +0200 iwlwifi: add new SoF with JF devices Add new SoF JF devices to the driver. Signed-off-by: Yaara Baruch Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210719144523.0545d8964ff2.I3498879d8c184e42b1578a64aa7b7c99a18b75fb@changeid commit 0f673c16c850250db386537a422c11d248fb123c Author: Johannes Berg Date: Mon Jul 19 14:01:56 2021 +0200 iwlwifi: pnvm: accept multiple HW-type TLVs Some products (So) may have two different types of products with different mac-type that are otherwise equivalent, and have the same PNVM data, so the PNVM file will contain two (or perhaps later more) HW-type TLVs. Accept the file and use the data section that contains any matching entry. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210719140154.a6a86e903035.Ic0b1b75c45d386698859f251518e8a5144431938@changeid commit a890d01e4ee016978776e45340e521b3bbbdf41f Author: Hao Xu Date: Wed Jul 28 11:03:22 2021 +0800 io_uring: fix poll requests leaking second poll entries For pure poll requests, it doesn't remove the second poll wait entry when it's done, neither after vfs_poll() or in the poll completion handler. We should remove the second poll wait entry. And we use io_poll_remove_double() rather than io_poll_remove_waitqs() since the latter has some redundant logic. Fixes: 88e41cf928a6 ("io_uring: add multishot mode for IORING_OP_POLL_ADD") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/20210728030322.12307-1-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe commit ef04688871f3386b6d40ade8f5c664290420f819 Author: Jens Axboe Date: Tue Jul 27 10:50:31 2021 -0600 io_uring: don't block level reissue off completion path Some setups, like SCSI, can throw spurious -EAGAIN off the softirq completion path. Normally we expect this to happen inline as part of submission, but apparently SCSI has a weird corner case where it can happen as part of normal completions. This should be solved by having the -EAGAIN bubble back up the stack as part of submission, but previous attempts at this failed and we're not just quite there yet. Instead we currently use REQ_F_REISSUE to handle this case. For now, catch it in io_rw_should_reissue() and prevent a reissue from a bogus path. Cc: stable@vger.kernel.org Reported-by: Fabian Ebner Tested-by: Fabian Ebner Signed-off-by: Jens Axboe commit 89fb62fde3b226f99b7015280cf132e2a7438edf Author: Wang Hai Date: Wed Jul 28 20:11:07 2021 +0800 sis900: Fix missing pci_disable_device() in probe and remove Replace pci_enable_device() with pcim_enable_device(), pci_disable_device() and pci_release_regions() will be called in release automatically. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 1e60cebf82948cfdc9497ea4553bab125587593c Author: zhang kai Date: Wed Jul 28 18:54:18 2021 +0800 net: let flow have same hash in two directions using same source and destination ip/port for flow hash calculation within the two directions. Signed-off-by: zhang kai Signed-off-by: David S. Miller commit 2b2c66f607d00d17f879c0d946d44340bfbdc501 Author: Thomas Weißschuh Date: Mon Jul 26 17:36:30 2021 +0200 platform/x86: gigabyte-wmi: add support for B550 Aorus Elite V2 Reported as working here: https://github.com/t-8ch/linux-gigabyte-wmi-driver/issues/1#issuecomment-879398883 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210726153630.65213-1-linux@weissschuh.net Signed-off-by: Hans de Goede commit a59c7b6c6ff6d5437f293709e766f939d7107266 Author: Ping Bao Date: Wed Jul 21 15:56:15 2021 -0700 platform/x86: intel-hid: add Alder Lake ACPI device ID Alder Lake has a new ACPI ID for Intel HID event filter device. Signed-off-by: Ping Bao Link: https://lore.kernel.org/r/20210721225615.20575-1-ping.a.bao@intel.com Signed-off-by: Hans de Goede commit 7cc8524f65ce1a350042836c7cf837046aaa6e21 Author: Jason Gerecke Date: Mon Jul 19 13:55:31 2021 -0700 HID: wacom: Skip processing of touches with negative slot values The `input_mt_get_slot_by_key` function may return a negative value if an error occurs (e.g. running out of slots). If this occurs we should really avoid reporting any data for the slot. Signed-off-by: Ping Cheng Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina commit 6ca2350e11f09d5d3e53777d1eff8ff6d300ed93 Author: Jason Gerecke Date: Mon Jul 19 13:55:28 2021 -0700 HID: wacom: Re-enable touch by default for Cintiq 24HDT / 27QHDT Commit 670e90924bfe ("HID: wacom: support named keys on older devices") added support for sending named events from the soft buttons on the 24HDT and 27QHDT. In the process, however, it inadvertantly disabled the touchscreen of the 24HDT and 27QHDT by default. The `wacom_set_shared_values` function would normally enable touch by default but because it checks the state of the non-shared `has_mute_touch_switch` flag and `wacom_setup_touch_input_capabilities` sets the state of the /shared/ version, touch ends up being disabled by default. This patch sets the non-shared flag, letting `wacom_set_shared_values` take care of copying the value over to the shared version and setting the default touch state to "on". Fixes: 670e90924bfe ("HID: wacom: support named keys on older devices") CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina commit 0818ec1f508fc3b8e957f6c7f77b988c5bc24da7 Author: Colin Ian King Date: Mon Jul 19 11:27:31 2021 +0100 HID: Kconfig: Fix spelling mistake "Uninterruptable" -> "Uninterruptible" There is a spelling mistake in the Kconfig text. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina commit ebe0b42a4252333aa4af60fd4d11b69405aa6068 Author: Haochen Tong Date: Sun Jul 18 01:04:31 2021 +0800 HID: apple: Add support for Keychron K1 wireless keyboard The Keychron K1 wireless keyboard has a set of Apple-like function keys and an Fn key that works like on an Apple bluetooth keyboard. It identifies as an Apple Alu RevB ANSI keyboard (05ac:024f) over USB and BT. Use hid-apple for it so the Fn key and function keys work correctly. Signed-off-by: Haochen Tong Signed-off-by: Jiri Kosina commit e9c6729acb38bcf027e40a5b50b2e1b0aa4bc170 Author: Christophe JAILLET Date: Fri Jul 23 17:08:40 2021 +0200 HID: fix typo in Kconfig There is a missing space in "relyingon". Add it. Signed-off-by: Christophe JAILLET Signed-off-by: Jiri Kosina commit 5e7b30d24a5b8cb691c173b45b50e3ca0191be19 Author: Krzysztof Kozlowski Date: Wed Jul 28 08:49:09 2021 +0200 nfc: nfcsim: fix use after free during module unload There is a use after free memory corruption during module exit: - nfcsim_exit() - nfcsim_device_free(dev0) - nfc_digital_unregister_device() This iterates over command queue and frees all commands, - dev->up = false - nfcsim_link_shutdown() - nfcsim_link_recv_wake() This wakes the sleeping thread nfcsim_link_recv_skb(). - nfcsim_link_recv_skb() Wake from wait_event_interruptible_timeout(), call directly the deb->cb callback even though (dev->up == false), - digital_send_cmd_complete() Dereference of "struct digital_cmd" cmd which was freed earlier by nfc_digital_unregister_device(). This causes memory corruption shortly after (with unrelated stack trace): nfc nfc0: NFC: nfcsim_recv_wq: Device is down llcp: nfc_llcp_recv: err -19 nfc nfc1: NFC: nfcsim_recv_wq: Device is down BUG: unable to handle page fault for address: ffffffffffffffed Call Trace: fsnotify+0x54b/0x5c0 __fsnotify_parent+0x1fe/0x300 ? vfs_write+0x27c/0x390 vfs_write+0x27c/0x390 ksys_write+0x63/0xe0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae KASAN report: BUG: KASAN: use-after-free in digital_send_cmd_complete+0x16/0x50 Write of size 8 at addr ffff88800a05f720 by task kworker/0:2/71 Workqueue: events nfcsim_recv_wq [nfcsim] Call Trace:  dump_stack_lvl+0x45/0x59  print_address_description.constprop.0+0x21/0x140  ? digital_send_cmd_complete+0x16/0x50  ? digital_send_cmd_complete+0x16/0x50  kasan_report.cold+0x7f/0x11b  ? digital_send_cmd_complete+0x16/0x50  ? digital_dep_link_down+0x60/0x60  digital_send_cmd_complete+0x16/0x50  nfcsim_recv_wq+0x38f/0x3d5 [nfcsim]  ? nfcsim_in_send_cmd+0x4a/0x4a [nfcsim]  ? lock_is_held_type+0x98/0x110  ? finish_wait+0x110/0x110  ? rcu_read_lock_sched_held+0x9c/0xd0  ? rcu_read_lock_bh_held+0xb0/0xb0  ? lockdep_hardirqs_on_prepare+0x12e/0x1f0 This flow of calling digital_send_cmd_complete() callback on driver exit is specific to nfcsim which implements reading and sending work queues. Since the NFC digital device was unregistered, the callback should not be called. Fixes: 204bddcb508f ("NFC: nfcsim: Make use of the Digital layer") Cc: Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 76a16be07b209a3f507c72abe823bd3af1c8661a Author: Wang Hai Date: Wed Jul 28 15:43:13 2021 +0800 tulip: windbond-840: Fix missing pci_disable_device() in probe and remove Replace pci_enable_device() with pcim_enable_device(), pci_disable_device() and pci_release_regions() will be called in release automatically. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 557fb5862c9272ad9b21407afe1da8acfd9b53eb Author: Marcelo Ricardo Leitner Date: Tue Jul 27 23:40:54 2021 -0300 sctp: fix return value check in __sctp_rcv_asconf_lookup As Ben Hutchings noticed, this check should have been inverted: the call returns true in case of success. Reported-by: Ben Hutchings Fixes: 0c5dc070ff3d ("sctp: validate from_addr_param return") Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Signed-off-by: David S. Miller commit 46573e3ab08fb041d5ba7bf7bf3215a1e724c78c Author: Tang Bin Date: Wed Jul 28 09:49:25 2021 +0800 nfc: s3fwrn5: fix undefined parameter values in dev_err() In the function s3fwrn5_fw_download(), the 'ret' is not assigned, so the correct value should be given in dev_err function. Fixes: a0302ff5906a ("nfc: s3fwrn5: remove unnecessary label") Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Reviewed-by: Nathan Chancellor Signed-off-by: David S. Miller commit 9d0279d043e87f119cfeb3200ad2c0e403765975 Merge: 8373cd38a8888 740452e09cf5f Author: David S. Miller Date: Wed Jul 28 09:16:37 2021 +0100 Merge tag 'mlx5-fixes-2021-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-07-27 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit eda97cb095f2958bbad55684a6ca3e7d7af0176a Author: Peter Ujfalusi Date: Sat Jul 17 22:00:21 2021 +0300 dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available If the router_xlate can not find the controller in the available DMA devices then it should return with -EPORBE_DEFER in a same way as the of_dma_request_slave_channel() does. The issue can be reproduced if the event router is registered before the DMA controller itself and a driver would request for a channel before the controller is registered. In of_dma_request_slave_channel(): 1. of_dma_find_controller() would find the dma_router 2. ofdma->of_dma_xlate() would fail and returned NULL 3. -ENODEV is returned as error code with this patch we would return in this case the correct -EPROBE_DEFER and the client can try to request the channel later. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210717190021.21897-1-peter.ujfalusi@gmail.com Signed-off-by: Vinod Koul commit baa16371c9525f24d508508e4d296c031e1de29c Author: Zhang Qilong Date: Mon Jun 7 14:46:39 2021 +0800 dmaengine: stm32-dmamux: Fix PM usage counter unbalance in stm32 dmamux ops pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 4f3ceca254e0f ("dmaengine: stm32-dmamux: Add PM Runtime support") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20210607064640.121394-3-zhangqilong3@huawei.com Signed-off-by: Vinod Koul commit d54db74ad6e0dea8c253fb68c689b836657ab914 Author: Zhang Qilong Date: Mon Jun 7 14:46:38 2021 +0800 dmaengine: stm32-dma: Fix PM usage counter imbalance in stm32 dma ops pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 48bc73ba14bcd ("dmaengine: stm32-dma: Add PM Runtime support") Fixes: 05f8740a0e6fc ("dmaengine: stm32-dma: add suspend/resume power management support") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20210607064640.121394-2-zhangqilong3@huawei.com Signed-off-by: Vinod Koul commit fa20bada3f934e3b3e4af4c77e5b518cd5a282e5 Author: Maxim Devaev Date: Tue Jul 27 21:58:00 2021 +0300 usb: gadget: f_hid: idle uses the highest byte for duration SET_IDLE value must be shifted 8 bits to the right to get duration. This confirmed by USBCV test. Fixes: afcff6dc690e ("usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers") Cc: stable Signed-off-by: Maxim Devaev Link: https://lore.kernel.org/r/20210727185800.43796-1-mdevaev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 340e84573878b2b9d63210482af46883366361b9 Author: Christoph Hellwig Date: Thu Jul 22 09:53:54 2021 +0200 block: delay freeing the gendisk blkdev_get_no_open acquires a reference to the block_device through the block device inode and then tries to acquire a device model reference to the gendisk. But at this point the disk migh already be freed (although the race is free). Fix this by only freeing the gendisk from the whole device bdevs ->free_inode callback as well. Fixes: 22ae8ce8b892 ("block: simplify bdev/disk lookup in blkdev_get") Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210722075402.983367-2-hch@lst.de Signed-off-by: Jens Axboe commit 5ab189cf3abbc9994bae3be524c5b88589ed56e2 Author: Tejun Heo Date: Tue Jul 27 14:38:09 2021 -1000 blk-iocost: fix operation ordering in iocg_wake_fn() iocg_wake_fn() open-codes wait_queue_entry removal and wakeup because it wants the wq_entry to be always removed whether it ended up waking the task or not. finish_wait() tests whether wq_entry needs removal without grabbing the wait_queue lock and expects the waker to use list_del_init_careful() after all waking operations are complete, which iocg_wake_fn() didn't do. The operation order was wrong and the regular list_del_init() was used. The result is that if a waiter wakes up racing the waker, it can free pop the wq_entry off stack before the waker is still looking at it, which can lead to a backtrace like the following. [7312084.588951] general protection fault, probably for non-canonical address 0x586bf4005b2b88: 0000 [#1] SMP ... [7312084.647079] RIP: 0010:queued_spin_lock_slowpath+0x171/0x1b0 ... [7312084.858314] Call Trace: [7312084.863548] _raw_spin_lock_irqsave+0x22/0x30 [7312084.872605] try_to_wake_up+0x4c/0x4f0 [7312084.880444] iocg_wake_fn+0x71/0x80 [7312084.887763] __wake_up_common+0x71/0x140 [7312084.895951] iocg_kick_waitq+0xe8/0x2b0 [7312084.903964] ioc_rqos_throttle+0x275/0x650 [7312084.922423] __rq_qos_throttle+0x20/0x30 [7312084.930608] blk_mq_make_request+0x120/0x650 [7312084.939490] generic_make_request+0xca/0x310 [7312084.957600] submit_bio+0x173/0x200 [7312084.981806] swap_readpage+0x15c/0x240 [7312084.989646] read_swap_cache_async+0x58/0x60 [7312084.998527] swap_cluster_readahead+0x201/0x320 [7312085.023432] swapin_readahead+0x2df/0x450 [7312085.040672] do_swap_page+0x52f/0x820 [7312085.058259] handle_mm_fault+0xa16/0x1420 [7312085.066620] do_page_fault+0x2c6/0x5c0 [7312085.074459] page_fault+0x2f/0x40 Fix it by switching to list_del_init_careful() and putting it at the end. Signed-off-by: Tejun Heo Reported-by: Rik van Riel Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Jens Axboe commit c3df5fb57fe8756d67fd56ed29da65cdfde839f9 Author: Tejun Heo Date: Tue Jul 27 13:12:20 2021 -1000 cgroup: rstat: fix A-A deadlock on 32bit around u64_stats_sync 0fa294fb1985 ("cgroup: Replace cgroup_rstat_mutex with a spinlock") added cgroup_rstat_flush_irqsafe() allowing flushing to happen from the irq context. However, rstat paths use u64_stats_sync to synchronize access to 64bit stat counters on 32bit machines. u64_stats_sync is implemented using seq_lock and trying to read from an irq context can lead to A-A deadlock if the irq happens to interrupt the stat update. Fix it by using the irqsafe variants - u64_stats_update_begin_irqsave() and u64_stats_update_end_irqrestore() - in the update paths. Note that none of this matters on 64bit machines. All these are just for 32bit SMP setups. Note that the interface was introduced way back, its first and currently only use was recently added by 2d146aa3aa84 ("mm: memcontrol: switch to rstat"). Stable tagging targets this commit. Signed-off-by: Tejun Heo Reported-by: Rik van Riel Fixes: 2d146aa3aa84 ("mm: memcontrol: switch to rstat") Cc: stable@vger.kernel.org # v5.13+ commit 740452e09cf5fc489ce60831cf11abef117b5d26 Author: Chris Mi Date: Mon Apr 26 11:06:37 2021 +0800 net/mlx5: Fix mlx5_vport_tbl_attr chain from u16 to u32 The offending refactor commit uses u16 chain wrongly. Actually, it should be u32. Fixes: c620b772152b ("net/mlx5: Refactor tc flow attributes structure") CC: Ariel Levkovich Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit b1c2f6312c5005c928a72e668bf305a589d828d4 Author: Dima Chumak Date: Mon Apr 26 15:16:26 2021 +0300 net/mlx5e: Fix nullptr in mlx5e_hairpin_get_mdev() The result of __dev_get_by_index() is not checked for NULL and then gets dereferenced immediately. Also, __dev_get_by_index() must be called while holding either RTNL lock or @dev_base_lock, which isn't satisfied by mlx5e_hairpin_get_mdev() or its callers. This makes the underlying hlist_for_each_entry() loop not safe, and can have adverse effects in itself. Fix by using dev_get_by_index() and handling nullptr return value when ifindex device is not found. Update mlx5e_hairpin_get_mdev() callers to check for possible PTR_ERR() result. Fixes: 77ab67b7f0f9 ("net/mlx5e: Basic setup of hairpin object") Addresses-Coverity: ("Dereference null return value") Signed-off-by: Dima Chumak Reviewed-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 7f331bf0f060c2727e36d64f9b098b4ee5f3dfad Author: Aya Levin Date: Wed Jun 16 19:11:03 2021 +0300 net/mlx5: Unload device upon firmware fatal error When fw_fatal reporter reports an error, the firmware in not responding. Unload the device to ensure that the driver closes all its resources, even if recovery is not due (user disabled auto-recovery or reporter is in grace period). On successful recovery the device is loaded back up. Fixes: b3bd076f7501 ("net/mlx5: Report devlink health on FW fatal issues") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 678b1ae1af4aef488fcc42baa663e737b9a531ba Author: Aya Levin Date: Tue Jun 22 10:24:17 2021 +0300 net/mlx5e: Fix page allocation failure for ptp-RQ over SF Set the correct pci-device pointer to the ptp-RQ. This allows access to dma_mask and avoids allocation request with wrong pci-device. Fixes: a099da8ffcf6 ("net/mlx5e: Add RQ to PTP channel") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 497008e783452a2ec45c7ec5835cfe6950dcb097 Author: Aya Levin Date: Mon Jun 21 18:04:07 2021 +0300 net/mlx5e: Fix page allocation failure for trap-RQ over SF Set the correct device pointer to the trap-RQ, to allow access to dma_mask and avoid allocation request with the wrong pci-dev. WARNING: CPU: 1 PID: 12005 at kernel/dma/mapping.c:151 dma_map_page_attrs+0x139/0x1c0 ... all Trace: ? __page_pool_alloc_pages_slow+0x5a/0x210 mlx5e_post_rx_wqes+0x258/0x400 [mlx5_core] mlx5e_trap_napi_poll+0x44/0xc0 [mlx5_core] __napi_poll+0x24/0x150 net_rx_action+0x22b/0x280 __do_softirq+0xc7/0x27e do_softirq+0x61/0x80 __local_bh_enable_ip+0x4b/0x50 mlx5e_handle_action_trap+0x2dd/0x4d0 [mlx5_core] blocking_notifier_call_chain+0x5a/0x80 mlx5_devlink_trap_action_set+0x8b/0x100 [mlx5_core] Fixes: 5543e989fe5e ("net/mlx5e: Add trap entity to ETH driver") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a759f845d1f78634b54744db0fa48524ef6d0e14 Author: Aya Levin Date: Wed Jun 30 11:17:12 2021 +0300 net/mlx5e: Consider PTP-RQ when setting RX VLAN stripping Add PTP-RQ to the loop when setting rx-vlan-offload feature via ethtool. On PTP-RQ's creation, set rx-vlan-offload into its parameters. Fixes: a099da8ffcf6 ("net/mlx5e: Add RQ to PTP channel") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 9841d58f3550d11c6181424427e8ad8c9c80f1b6 Author: Maxim Mikityanskiy Date: Wed Jun 30 13:33:31 2021 +0300 net/mlx5e: Add NETIF_F_HW_TC to hw_features when HTB offload is available If a feature flag is only present in features, but not in hw_features, the user can't reset it. Although hw_features may contain NETIF_F_HW_TC by the point where the driver checks whether HTB offload is supported, this flag is controlled by another condition that may not hold. Set it explicitly to make sure the user can disable it. Fixes: 214baf22870c ("net/mlx5e: Support HTB offload") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e2351e517068718724f1d3b4010e2a41ec91fa76 Author: Tariq Toukan Date: Wed Jun 30 13:45:05 2021 +0300 net/mlx5e: RX, Avoid possible data corruption when relaxed ordering and LRO combined When HW aggregates packets for an LRO session, it writes the payload of two consecutive packets of a flow contiguously, so that they usually share a cacheline. The first byte of a packet's payload is written immediately after the last byte of the preceding packet. In this flow, there are two consecutive write requests to the shared cacheline: 1. Regular write for the earlier packet. 2. Read-modify-write for the following packet. In case of relaxed-ordering on, these two writes might be re-ordered. Using the end padding optimization (to avoid partial write for the last cacheline of a packet) becomes problematic if the two writes occur out-of-order, as the padding would overwrite payload that belongs to the following packet, causing data corruption. Avoid this by disabling the end padding optimization when both LRO and relaxed-ordering are enabled. Fixes: 17347d5430c4 ("net/mlx5e: Add support for PCI relaxed ordering") Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit dd3fddb82780bfa24124834edd90bbc63bd689cc Author: Roi Dayan Date: Wed Jun 2 14:17:07 2021 +0300 net/mlx5: E-Switch, handle devcom events only for ports on the same device This is the same check as LAG mode checks if to enable lag. This will fix adding peer miss rules if lag is not supported and even an incorrect rules in socket direct mode. Also fix the incorrect comment on mlx5_get_next_phys_dev() as flow #1 doesn't exists. Fixes: ac004b832128 ("net/mlx5e: E-Switch, Add peer miss rules") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit c671972534c6f7fce789ac8156a2bc3bd146f806 Author: Maor Dickman Date: Tue Jun 22 17:07:02 2021 +0300 net/mlx5: E-Switch, Set destination vport vhca id only when merged eswitch is supported Destination vport vhca id is valid flag is set only merged eswitch isn't supported. Change destination vport vhca id value to be set also only when merged eswitch is supported. Fixes: e4ad91f23f10 ("net/mlx5e: Split offloaded eswitch TC rules for port mirroring") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 90b22b9bcd242a3ba238f2c6f7eab771799001f8 Author: Maor Dickman Date: Thu Jul 8 15:24:58 2021 +0300 net/mlx5e: Disable Rx ntuple offload for uplink representor Rx ntuple offload is not supported in switchdev mode. Tryng to enable it cause kernel panic. BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 80000001065a5067 P4D 80000001065a5067 PUD 106594067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 7 PID: 1089 Comm: ethtool Not tainted 5.13.0-rc7_for_upstream_min_debug_2021_06_23_16_44 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5e_arfs_enable+0x70/0xd0 [mlx5_core] Code: 44 24 10 00 00 00 00 48 c7 44 24 18 00 00 00 00 49 63 c4 48 89 e2 44 89 e6 48 69 c0 20 08 00 00 48 89 ef 48 03 85 68 ac 00 00 <48> 8b 40 08 48 89 44 24 08 e8 d2 aa fd ff 48 83 05 82 96 18 00 01 RSP: 0018:ffff8881047679e0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000004000000000 RCX: 0000004000000000 RDX: ffff8881047679e0 RSI: 0000000000000000 RDI: ffff888115100880 RBP: ffff888115100880 R08: ffffffffa00f6cb0 R09: ffff888104767a18 R10: ffff8881151000a0 R11: ffff888109479540 R12: 0000000000000000 R13: ffff888104767bb8 R14: ffff888115100000 R15: ffff8881151000a0 FS: 00007f41a64ab740(0000) GS:ffff8882f5dc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 0000000104cbc005 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: set_feature_arfs+0x1e/0x40 [mlx5_core] mlx5e_handle_feature+0x43/0xa0 [mlx5_core] mlx5e_set_features+0x139/0x1b0 [mlx5_core] __netdev_update_features+0x2b3/0xaf0 ethnl_set_features+0x176/0x3a0 ? __nla_parse+0x22/0x30 genl_family_rcv_msg_doit+0xe2/0x140 genl_rcv_msg+0xde/0x1d0 ? features_reply_size+0xe0/0xe0 ? genl_get_cmd+0xd0/0xd0 netlink_rcv_skb+0x4e/0xf0 genl_rcv+0x24/0x40 netlink_unicast+0x1f6/0x2b0 netlink_sendmsg+0x225/0x450 sock_sendmsg+0x33/0x40 __sys_sendto+0xd4/0x120 ? __sys_recvmsg+0x4e/0x90 ? exc_page_fault+0x219/0x740 __x64_sys_sendto+0x25/0x30 do_syscall_64+0x3f/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f41a65b0cba Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 c3 0f 1f 44 00 00 55 48 83 ec 30 44 89 4c RSP: 002b:00007ffd8d688358 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000010f42a0 RCX: 00007f41a65b0cba RDX: 0000000000000058 RSI: 00000000010f43b0 RDI: 0000000000000003 RBP: 000000000047ae60 R08: 00007f41a667c000 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 00000000010f4340 R13: 00000000010f4350 R14: 00007ffd8d688400 R15: 00000000010f42a0 Modules linked in: mlx5_vdpa vhost_iotlb vdpa xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad ib_ipoib rdma_cm iw_cm ib_cm mlx5_ib ib_uverbs ib_core overlay mlx5_core ptp pps_core fuse CR2: 0000000000000008 ---[ end trace c66523f2aba94b43 ]--- Fixes: 7a9fb35e8c3a ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 8b54874ef1617185048029a3083d510569e93751 Author: Maor Gottlieb Date: Mon Jul 26 09:20:14 2021 +0300 net/mlx5: Fix flow table chaining Fix a bug when flow table is created in priority that already has other flow tables as shown in the below diagram. If the new flow table (FT-B) has the lowest level in the priority, we need to connect the flow tables from the previous priority (p0) to this new table. In addition when this flow table is destroyed (FT-B), we need to connect the flow tables from the previous priority (p0) to the next level flow table (FT-C) in the same priority of the destroyed table (if exists). --------- |root_ns| --------- | -------------------------------- | | | ---------- ---------- --------- |p(prio)-x| | p-y | | p-n | ---------- ---------- --------- | | ---------------- ------------------ |ns(e.g bypass)| |ns(e.g. kernel) | ---------------- ------------------ | | | ------- ------ ---- | p0 | | p1 | |p2| ------- ------ ---- | | \ -------- ------- ------ | FT-A | |FT-B | |FT-C| -------- ------- ------ Fixes: f90edfd279f3 ("net/mlx5_core: Connect flow tables") Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit b93af3055d6f32d3b0361cfdb110c9399c1241ba Author: John Garry Date: Tue Jul 27 17:32:53 2021 +0800 blk-mq-sched: Fix blk_mq_sched_alloc_tags() error handling If the blk_mq_sched_alloc_tags() -> blk_mq_alloc_rqs() call fails, then we call blk_mq_sched_free_tags() -> blk_mq_free_rqs(). It is incorrect to do so, as any rqs would have already been freed in the blk_mq_alloc_rqs() call. Fix by calling blk_mq_free_rq_map() only directly. Fixes: 6917ff0b5bd41 ("blk-mq-sched: refactor scheduler initialization") Signed-off-by: John Garry Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/1627378373-148090-1-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe commit f1fdee33f5b458017995c487684e04c859815080 Merge: d6371c76e20d7 9635720b7c885 Author: Andrii Nakryiko Date: Tue Jul 27 14:54:45 2021 -0700 Merge branch 'sockmap fixes picked up by stress tests' John Fastabend says: ==================== Running stress tests with recent patch to remove an extra lock in sockmap resulted in a couple new issues popping up. It seems only one of them is actually related to the patch: 799aa7f98d53 ("skmsg: Avoid lock_sock() in sk_psock_backlog()") The other two issues had existed long before, but I guess the timing with the serialization we had before was too tight to get any of our tests or deployments to hit it. With attached series stress testing sockmap+TCP with workloads that create lots of short-lived connections no more splats like below were seen on upstream bpf branch. [224913.935822] WARNING: CPU: 3 PID: 32100 at net/core/stream.c:208 sk_stream_kill_queues+0x212/0x220 [224913.935841] Modules linked in: fuse overlay bpf_preload x86_pkg_temp_thermal intel_uncore wmi_bmof squashfs sch_fq_codel efivarfs ip_tables x_tables uas xhci_pci ixgbe mdio xfrm_algo xhci_hcd wmi [224913.935897] CPU: 3 PID: 32100 Comm: fgs-bench Tainted: G I 5.14.0-rc1alu+ #181 [224913.935908] Hardware name: Dell Inc. Precision 5820 Tower/002KVM, BIOS 1.9.2 01/24/2019 [224913.935914] RIP: 0010:sk_stream_kill_queues+0x212/0x220 [224913.935923] Code: 8b 83 20 02 00 00 85 c0 75 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 89 df e8 2b 11 fe ff eb c3 0f 0b e9 7c ff ff ff 0f 0b eb ce <0f> 0b 5b 5d 41 5c 41 5d 41 5e 41 5f c3 90 0f 1f 44 00 00 41 57 41 [224913.935932] RSP: 0018:ffff88816271fd38 EFLAGS: 00010206 [224913.935941] RAX: 0000000000000ae8 RBX: ffff88815acd5240 RCX: dffffc0000000000 [224913.935948] RDX: 0000000000000003 RSI: 0000000000000ae8 RDI: ffff88815acd5460 [224913.935954] RBP: ffff88815acd5460 R08: ffffffff955c0ae8 R09: fffffbfff2e6f543 [224913.935961] R10: ffffffff9737aa17 R11: fffffbfff2e6f542 R12: ffff88815acd5390 [224913.935967] R13: ffff88815acd5480 R14: ffffffff98d0c080 R15: ffffffff96267500 [224913.935974] FS: 00007f86e6bd1700(0000) GS:ffff888451cc0000(0000) knlGS:0000000000000000 [224913.935981] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [224913.935988] CR2: 000000c0008eb000 CR3: 00000001020e0005 CR4: 00000000003706e0 [224913.935994] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [224913.936000] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [224913.936007] Call Trace: [224913.936016] inet_csk_destroy_sock+0xba/0x1f0 [224913.936033] __tcp_close+0x620/0x790 [224913.936047] tcp_close+0x20/0x80 [224913.936056] inet_release+0x8f/0xf0 [224913.936070] __sock_release+0x72/0x120 v3: make sock_drop inline in skmsg.h v2: init skb to null and fix a space/tab issue. Added Jakub's acks. ==================== Signed-off-by: Andrii Nakryiko commit 9635720b7c88592214562cb72605bdab6708006c Author: John Fastabend Date: Tue Jul 27 09:05:00 2021 -0700 bpf, sockmap: Fix memleak on ingress msg enqueue If backlog handler is running during a tear down operation we may enqueue data on the ingress msg queue while tear down is trying to free it. sk_psock_backlog() sk_psock_handle_skb() skb_psock_skb_ingress() sk_psock_skb_ingress_enqueue() sk_psock_queue_msg(psock,msg) spin_lock(ingress_lock) sk_psock_zap_ingress() _sk_psock_purge_ingerss_msg() _sk_psock_purge_ingress_msg() -- free ingress_msg list -- spin_unlock(ingress_lock) spin_lock(ingress_lock) list_add_tail(msg,ingress_msg) <- entry on list with no one left to free it. spin_unlock(ingress_lock) To fix we only enqueue from backlog if the ENABLED bit is set. The tear down logic clears the bit with ingress_lock set so we wont enqueue the msg in the last step. Fixes: 799aa7f98d53 ("skmsg: Avoid lock_sock() in sk_psock_backlog()") Signed-off-by: John Fastabend Signed-off-by: Andrii Nakryiko Acked-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210727160500.1713554-4-john.fastabend@gmail.com commit 476d98018f32e68e7c5d4e8456940cf2b6d66f10 Author: John Fastabend Date: Tue Jul 27 09:04:59 2021 -0700 bpf, sockmap: On cleanup we additionally need to remove cached skb Its possible if a socket is closed and the receive thread is under memory pressure it may have cached a skb. We need to ensure these skbs are free'd along with the normal ingress_skb queue. Before 799aa7f98d53 ("skmsg: Avoid lock_sock() in sk_psock_backlog()") tear down and backlog processing both had sock_lock for the common case of socket close or unhash. So it was not possible to have both running in parrallel so all we would need is the kfree in those kernels. But, latest kernels include the commit 799aa7f98d5e and this requires a bit more work. Without the ingress_lock guarding reading/writing the state->skb case its possible the tear down could run before the state update causing it to leak memory or worse when the backlog reads the state it could potentially run interleaved with the tear down and we might end up free'ing the state->skb from tear down side but already have the reference from backlog side. To resolve such races we wrap accesses in ingress_lock on both sides serializing tear down and backlog case. In both cases this only happens after an EAGAIN error case so having an extra lock in place is likely fine. The normal path will skip the locks. Note, we check state->skb before grabbing lock. This works because we can only enqueue with the mutex we hold already. Avoiding a race on adding state->skb after the check. And if tear down path is running that is also fine if the tear down path then removes state->skb we will simply set skb=NULL and the subsequent goto is skipped. This slight complication avoids locking in normal case. With this fix we no longer see this warning splat from tcp side on socket close when we hit the above case with redirect to ingress self. [224913.935822] WARNING: CPU: 3 PID: 32100 at net/core/stream.c:208 sk_stream_kill_queues+0x212/0x220 [224913.935841] Modules linked in: fuse overlay bpf_preload x86_pkg_temp_thermal intel_uncore wmi_bmof squashfs sch_fq_codel efivarfs ip_tables x_tables uas xhci_pci ixgbe mdio xfrm_algo xhci_hcd wmi [224913.935897] CPU: 3 PID: 32100 Comm: fgs-bench Tainted: G I 5.14.0-rc1alu+ #181 [224913.935908] Hardware name: Dell Inc. Precision 5820 Tower/002KVM, BIOS 1.9.2 01/24/2019 [224913.935914] RIP: 0010:sk_stream_kill_queues+0x212/0x220 [224913.935923] Code: 8b 83 20 02 00 00 85 c0 75 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 89 df e8 2b 11 fe ff eb c3 0f 0b e9 7c ff ff ff 0f 0b eb ce <0f> 0b 5b 5d 41 5c 41 5d 41 5e 41 5f c3 90 0f 1f 44 00 00 41 57 41 [224913.935932] RSP: 0018:ffff88816271fd38 EFLAGS: 00010206 [224913.935941] RAX: 0000000000000ae8 RBX: ffff88815acd5240 RCX: dffffc0000000000 [224913.935948] RDX: 0000000000000003 RSI: 0000000000000ae8 RDI: ffff88815acd5460 [224913.935954] RBP: ffff88815acd5460 R08: ffffffff955c0ae8 R09: fffffbfff2e6f543 [224913.935961] R10: ffffffff9737aa17 R11: fffffbfff2e6f542 R12: ffff88815acd5390 [224913.935967] R13: ffff88815acd5480 R14: ffffffff98d0c080 R15: ffffffff96267500 [224913.935974] FS: 00007f86e6bd1700(0000) GS:ffff888451cc0000(0000) knlGS:0000000000000000 [224913.935981] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [224913.935988] CR2: 000000c0008eb000 CR3: 00000001020e0005 CR4: 00000000003706e0 [224913.935994] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [224913.936000] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [224913.936007] Call Trace: [224913.936016] inet_csk_destroy_sock+0xba/0x1f0 [224913.936033] __tcp_close+0x620/0x790 [224913.936047] tcp_close+0x20/0x80 [224913.936056] inet_release+0x8f/0xf0 [224913.936070] __sock_release+0x72/0x120 [224913.936083] sock_close+0x14/0x20 Fixes: a136678c0bdbb ("bpf: sk_msg, zap ingress queue on psock down") Signed-off-by: John Fastabend Signed-off-by: Andrii Nakryiko Acked-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210727160500.1713554-3-john.fastabend@gmail.com commit 343597d558e79fe704ba8846b5b2ed24056b89c2 Author: John Fastabend Date: Tue Jul 27 09:04:58 2021 -0700 bpf, sockmap: Zap ingress queues after stopping strparser We don't want strparser to run and pass skbs into skmsg handlers when the psock is null. We just sk_drop them in this case. When removing a live socket from map it means extra drops that we do not need to incur. Move the zap below strparser close to avoid this condition. This way we stop the stream parser first stopping it from processing packets and then delete the psock. Fixes: a136678c0bdbb ("bpf: sk_msg, zap ingress queue on psock down") Signed-off-by: John Fastabend Signed-off-by: Andrii Nakryiko Acked-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210727160500.1713554-2-john.fastabend@gmail.com commit 2bcc025ab9bbd029b1730cde71cb4e4f0ed35d0f Author: Dmitry Osipenko Date: Sat Jul 17 14:27:42 2021 +0300 clk: tegra: Implement disable_unused() of tegra_clk_sdmmc_mux_ops Implement disable_unused() callback of tegra_clk_sdmmc_mux_ops to fix imbalanced disabling of the unused MMC clock on Tegra210 Jetson Nano. Fixes: c592c8a28f58 ("clk: tegra: Fix refcounting of gate clocks") Reported-by: Jon Hunter # T210 Nano Tested-by: Jon Hunter # T210 Nano Acked-by: Jon Hunter Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210717112742.7196-1-digetx@gmail.com Signed-off-by: Stephen Boyd commit 7d549995d4e0d99b68e8a7793a0d23da6fc40fe8 Merge: 51bbe7ebac253 dc6afef7e1425 Author: Linus Torvalds Date: Tue Jul 27 14:13:33 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Nothing very exciting here, mainly just a bunch of irdma fixes. irdma is a new driver this cycle so it to be expected. - Many more irdma fixups from bots/etc - bnxt_re regression in their counters from a FW upgrade - User triggerable memory leak in rxe" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/irdma: Change returned type of irdma_setup_virt_qp to void RDMA/irdma: Change the returned type of irdma_set_hw_rsrc to void RDMA/irdma: change the returned type of irdma_sc_repost_aeq_entries to void RDMA/irdma: Check vsi pointer before using it RDMA/rxe: Fix memory leak in error path code RDMA/irdma: Change the returned type to void RDMA/irdma: Make spdxcheck.py happy RDMA/irdma: Fix unused variable total_size warning RDMA/bnxt_re: Fix stats counters commit 51bbe7ebac25368e4e77a41fdff5f11c42e4ae2d Merge: 82d712f6d147a 1e7107c5ef444 Author: Linus Torvalds Date: Tue Jul 27 14:02:57 2021 -0700 Merge branch 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "Fix leak of filesystem context root which is triggered by LTP. Not too likely to be a problem in non-testing environments" * 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup1: fix leaked context root causing sporadic NULL deref in LTP commit 8750f9bbda115f3f79bfe43be85551ee5e12b6ff Author: Paolo Bonzini Date: Tue Jul 27 08:43:10 2021 -0400 KVM: add missing compat KVM_CLEAR_DIRTY_LOG The arguments to the KVM_CLEAR_DIRTY_LOG ioctl include a pointer, therefore it needs a compat ioctl implementation. Otherwise, 32-bit userspace fails to invoke it on 64-bit kernels; for x86 it might work fine by chance if the padding is zero, but not on big-endian architectures. Reported-by: Thomas Sattler Cc: stable@vger.kernel.org Fixes: 2a31b9db1535 ("kvm: introduce manual dirty log reprotect") Reviewed-by: Peter Xu Signed-off-by: Paolo Bonzini commit 74775654332b2682a5580d6f954e5a9ac81e7477 Author: Li RongQing Date: Tue Jul 27 19:12:47 2021 +0800 KVM: use cpu_relax when halt polling SMT siblings share caches and other hardware, and busy halt polling will degrade its sibling performance if its sibling is working Sean Christopherson suggested as below: "Rather than disallowing halt-polling entirely, on x86 it should be sufficient to simply have the hardware thread yield to its sibling(s) via PAUSE. It probably won't get back all performance, but I would expect it to be close. This compiles on all KVM architectures, and AFAICT the intended usage of cpu_relax() is identical for all architectures." Suggested-by: Sean Christopherson Signed-off-by: Li RongQing Message-Id: <20210727111247.55510-1-lirongqing@baidu.com> Signed-off-by: Paolo Bonzini commit 5868b8225ecef4ba3f5b17e65984d60bc5fd6254 Author: Maxim Levitsky Date: Tue Jul 13 17:20:18 2021 +0300 KVM: SVM: use vmcb01 in svm_refresh_apicv_exec_ctrl Currently when SVM is enabled in guest CPUID, AVIC is inhibited as soon as the guest CPUID is set. AVIC happens to be fully disabled on all vCPUs by the time any guest entry starts (if after migration the entry can be nested). The reason is that currently we disable avic right away on vCPU from which the kvm_request_apicv_update was called and for this case, it happens to be called on all vCPUs (by svm_vcpu_after_set_cpuid). After we stop doing this, AVIC will end up being disabled only when KVM_REQ_APICV_UPDATE is processed which is after we done switching to the nested guest. Fix this by just using vmcb01 in svm_refresh_apicv_exec_ctrl for avic (which is a right thing to do anyway). Signed-off-by: Maxim Levitsky Message-Id: <20210713142023.106183-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit feea01360cb1925dd31a3d38514eb86f61d69468 Author: Maxim Levitsky Date: Tue Jul 13 17:20:17 2021 +0300 KVM: SVM: tweak warning about enabled AVIC on nested entry It is possible that AVIC was requested to be disabled but not yet disabled, e.g if the nested entry is done right after svm_vcpu_after_set_cpuid. Signed-off-by: Maxim Levitsky Message-Id: <20210713142023.106183-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit f1577ab21442476a1015d09e861c08ca76262c06 Author: Maxim Levitsky Date: Tue Jul 13 17:20:16 2021 +0300 KVM: SVM: svm_set_vintr don't warn if AVIC is active but is about to be deactivated It is possible for AVIC inhibit and AVIC active state to be mismatched. Currently we disable AVIC right away on vCPU which started the AVIC inhibit request thus this warning doesn't trigger but at least in theory, if svm_set_vintr is called at the same time on multiple vCPUs, the warning can happen. Signed-off-by: Maxim Levitsky Message-Id: <20210713142023.106183-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit bb000f640e76c4c2402990d0613d4269e9c6dd29 Author: Christian Borntraeger Date: Mon Jul 26 17:01:08 2021 +0200 KVM: s390: restore old debugfs names commit bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors") did replace the old definitions with the binary ones. While doing that it missed that some files are names different than the counters. This is especially important for kvm_stat which does have special handling for counters named instruction_*. Fixes: commit bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors") CC: Jing Zhang Signed-off-by: Christian Borntraeger Message-Id: <20210726150108.5603-1-borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini commit 3fa5e8fd0a0e4ccc03c91df225be2e9b7100800c Author: Paolo Bonzini Date: Mon Jul 26 12:39:01 2021 -0400 KVM: SVM: delay svm_vcpu_init_msrpm after svm->vmcb is initialized Right now, svm_hv_vmcb_dirty_nested_enlightenments has an incorrect dereference of vmcb->control.reserved_sw before the vmcb is checked for being non-NULL. The compiler is usually sinking the dereference after the check; instead of doing this ourselves in the source, ensure that svm_hv_vmcb_dirty_nested_enlightenments is only called with a non-NULL VMCB. Reported-by: Dan Carpenter Cc: Vineeth Pillai Signed-off-by: Paolo Bonzini [Untested for now due to issues with my AMD machine. - Paolo] commit c33e05d9b067433252b1008d2f37bf64e11151f1 Author: David Matlack Date: Tue Jul 13 22:09:57 2021 +0000 KVM: selftests: Introduce access_tracking_perf_test This test measures the performance effects of KVM's access tracking. Access tracking is driven by the MMU notifiers test_young, clear_young, and clear_flush_young. These notifiers do not have a direct userspace API, however the clear_young notifier can be triggered by marking a pages as idle in /sys/kernel/mm/page_idle/bitmap. This test leverages that mechanism to enable access tracking on guest memory. To measure performance this test runs a VM with a configurable number of vCPUs that each touch every page in disjoint regions of memory. Performance is measured in the time it takes all vCPUs to finish touching their predefined region. Example invocation: $ ./access_tracking_perf_test -v 8 Testing guest mode: PA-bits:ANY, VA-bits:48, 4K pages guest physical test memory offset: 0xffdfffff000 Populating memory : 1.337752570s Writing to populated memory : 0.010177640s Reading from populated memory : 0.009548239s Mark memory idle : 23.973131748s Writing to idle memory : 0.063584496s Mark memory idle : 24.924652964s Reading from idle memory : 0.062042814s Breaking down the results: * "Populating memory": The time it takes for all vCPUs to perform the first write to every page in their region. * "Writing to populated memory" / "Reading from populated memory": The time it takes for all vCPUs to write and read to every page in their region after it has been populated. This serves as a control for the later results. * "Mark memory idle": The time it takes for every vCPU to mark every page in their region as idle through page_idle. * "Writing to idle memory" / "Reading from idle memory": The time it takes for all vCPUs to write and read to every page in their region after it has been marked idle. This test should be portable across architectures but it is only enabled for x86_64 since that's all I have tested. Reviewed-by: Ben Gardon Signed-off-by: David Matlack Message-Id: <20210713220957.3493520-7-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 15b7b737deb30e1f8f116a08e723173b55ebd2f3 Author: David Matlack Date: Tue Jul 13 22:09:56 2021 +0000 KVM: selftests: Fix missing break in dirty_log_perf_test arg parsing There is a missing break statement which causes a fallthrough to the next statement where optarg will be null and a segmentation fault will be generated. Fixes: 9e965bb75aae ("KVM: selftests: Add backing src parameter to dirty_log_perf_test") Reviewed-by: Ben Gardon Signed-off-by: David Matlack Message-Id: <20210713220957.3493520-6-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 76b4f357d0e7d8f6f0013c733e6cba1773c266d3 Author: Juergen Gross Date: Thu Jul 1 17:41:00 2021 +0200 x86/kvm: fix vcpu-id indexed array sizes KVM_MAX_VCPU_ID is the maximum vcpu-id of a guest, and not the number of vcpu-ids. Fix array indexed by vcpu-id to have KVM_MAX_VCPU_ID+1 elements. Note that this is currently no real problem, as KVM_MAX_VCPU_ID is an odd number, resulting in always enough padding being available at the end of those arrays. Nevertheless this should be fixed in order to avoid rare problems in case someone is using an even number for KVM_MAX_VCPU_ID. Signed-off-by: Juergen Gross Message-Id: <20210701154105.23215-2-jgross@suse.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 82d712f6d147a2fb9998d0ede483949e80fed759 Merge: ff1176468d368 b42b0bddcbc87 Author: Linus Torvalds Date: Tue Jul 27 13:55:30 2021 -0700 Merge branch 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "Fix a use-after-free in allocation failure handling path" * 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: fix UAF in pwq_unbound_release_workfn() commit 8373cd38a8888549ace7c7617163a2e826970a92 Author: Yufeng Mo Date: Tue Jul 27 22:03:50 2021 +0800 net: hns3: change the method of obtaining default ptp cycle The ptp cycle is related to the hardware, so it may cause compatibility issues if a fixed value is used in driver. Therefore, the method of obtaining this value is changed to read from the register rather than use a fixed value in driver. Fixes: 0bf5eb788512 ("net: hns3: add support for PTP") Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit bb7262b295472eb6858b5c49893954794027cd84 Author: Thomas Gleixner Date: Sun Dec 6 22:40:07 2020 +0100 timers: Move clearing of base::timer_running under base:: Lock syzbot reported KCSAN data races vs. timer_base::timer_running being set to NULL without holding base::lock in expire_timers(). This looks innocent and most reads are clearly not problematic, but Frederic identified an issue which is: int data = 0; void timer_func(struct timer_list *t) { data = 1; } CPU 0 CPU 1 ------------------------------ -------------------------- base = lock_timer_base(timer, &flags); raw_spin_unlock(&base->lock); if (base->running_timer != timer) call_timer_fn(timer, fn, baseclk); ret = detach_if_pending(timer, base, true); base->running_timer = NULL; raw_spin_unlock_irqrestore(&base->lock, flags); raw_spin_lock(&base->lock); x = data; If the timer has previously executed on CPU 1 and then CPU 0 can observe base->running_timer == NULL and returns, assuming the timer has completed, but it's not guaranteed on all architectures. The comment for del_timer_sync() makes that guarantee. Moving the assignment under base->lock prevents this. For non-RT kernel it's performance wise completely irrelevant whether the store happens before or after taking the lock. For an RT kernel moving the store under the lock requires an extra unlock/lock pair in the case that there is a waiter for the timer, but that's not the end of the world. Reported-by: syzbot+aa7c2385d46c5eba0b89@syzkaller.appspotmail.com Reported-by: syzbot+abea4558531bae1ba9fe@syzkaller.appspotmail.com Fixes: 030dcdd197d7 ("timers: Prepare support for PREEMPT_RT") Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/87lfea7gw8.fsf@nanos.tec.linutronix.de Cc: stable@vger.kernel.org commit 4ee107c514139960682cc0f3623a24e86fda1a13 Author: Shawn Guo Date: Tue Jul 27 17:26:13 2021 +0800 clk: qcom: smd-rpm: Fix MSM8936 RPM_SMD_PCNOC_A_CLK Commit a0384ecfe2aa ("clk: qcom: smd-rpm: De-duplicate identical entries") introduces the following regression on MSM8936/MSM8939, as RPM_SMD_PCNOC_A_CLK gets pointed to pcnoc_clk by mistake. Fix it by correcting the clock to pcnoc_a_clk. [ 1.307363] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 1.313593] Mem abort info: [ 1.322512] ESR = 0x96000004 [ 1.325132] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.338872] SET = 0, FnV = 0 [ 1.355483] EA = 0, S1PTW = 0 [ 1.368702] FSC = 0x04: level 0 translation fault [ 1.383294] Data abort info: [ 1.398292] ISV = 0, ISS = 0x00000004 [ 1.398297] CM = 0, WnR = 0 [ 1.398301] [0000000000000000] user address but active_mm is swapper [ 1.404193] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 1.420596] Modules linked in: [ 1.420604] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.14.0-rc3+ #198 [ 1.441010] pc : __clk_register+0x48/0x780 [ 1.446045] lr : __clk_register+0x3c/0x780 [ 1.449953] sp : ffff800010063440 [ 1.454031] x29: ffff800010063440 x28: 0000000000000004 x27: 0000000000000066 [ 1.457423] x26: 0000000000000001 x25: 000000007fffffff x24: ffff800010f9f388 [ 1.464540] x23: ffff00007fc12a90 x22: ffff0000034b2010 x21: 0000000000000000 [ 1.471658] x20: ffff800010f9fff8 x19: ffff00000152a700 x18: 0000000000000001 [ 1.478778] x17: ffff00007fbd40c8 x16: 0000000000000460 x15: 0000000000000465 [ 1.485895] x14: ffffffffffffffff x13: 746e756f635f7265 x12: 696669746f6e5f6b [ 1.493013] x11: 0000000000000006 x10: 0000000000000000 x9 : 0000000000000000 [ 1.500131] x8 : ffff00000152a800 x7 : 0000000000000000 x6 : 000000000000003f [ 1.507249] x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000004 [ 1.514367] x2 : 0000000000000000 x1 : 0000000000000cc0 x0 : ffff00000152a700 [ 1.521486] Call trace: [ 1.528598] __clk_register+0x48/0x780 [ 1.530855] clk_hw_register+0x20/0x60 [ 1.534674] devm_clk_hw_register+0x50/0xa8 [ 1.538408] rpm_smd_clk_probe+0x1a4/0x260 [ 1.542488] platform_probe+0x68/0xd8 [ 1.546653] really_probe+0x140/0x2f8 [ 1.550386] __driver_probe_device+0x78/0xe0 [ 1.554033] driver_probe_device+0x80/0x110 [ 1.558373] __device_attach_driver+0x90/0xe0 [ 1.562280] bus_for_each_drv+0x78/0xc8 [ 1.566793] __device_attach+0xf0/0x150 [ 1.570438] device_initial_probe+0x14/0x20 [ 1.574259] bus_probe_device+0x9c/0xa8 [ 1.578425] device_add+0x378/0x870 [ 1.582243] of_device_add+0x44/0x60 [ 1.585716] of_platform_device_create_pdata+0xc0/0x110 [ 1.589538] of_platform_bus_create+0x17c/0x388 [ 1.594485] of_platform_populate+0x50/0xf0 [ 1.598998] qcom_smd_rpm_probe+0xd4/0x128 [ 1.603164] rpmsg_dev_probe+0xbc/0x1a8 [ 1.607330] really_probe+0x140/0x2f8 [ 1.611063] __driver_probe_device+0x78/0xe0 [ 1.614883] driver_probe_device+0x80/0x110 [ 1.619224] __device_attach_driver+0x90/0xe0 [ 1.623131] bus_for_each_drv+0x78/0xc8 [ 1.627643] __device_attach+0xf0/0x150 [ 1.631289] device_initial_probe+0x14/0x20 [ 1.635109] bus_probe_device+0x9c/0xa8 [ 1.639275] device_add+0x378/0x870 [ 1.643095] device_register+0x20/0x30 [ 1.646567] rpmsg_register_device+0x54/0x90 [ 1.650387] qcom_channel_state_worker+0x168/0x288 [ 1.654814] process_one_work+0x1a0/0x328 [ 1.659415] worker_thread+0x4c/0x420 [ 1.663494] kthread+0x150/0x160 [ 1.667138] ret_from_fork+0x10/0x18 [ 1.670442] Code: 97f56b92 b40034a0 aa0003f3 52819801 (f94002a0) [ 1.674004] ---[ end trace 412fa6f47384cdfe ]--- Fixes: a0384ecfe2aa ("clk: qcom: smd-rpm: De-duplicate identical entries") Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210727092613.23056-1-shawn.guo@linaro.org Signed-off-by: Stephen Boyd commit ec6446d5304b3c3dd692a1e244df7e40bbb5af36 Author: Kajol Jain Date: Tue Jul 13 13:12:16 2021 +0530 fpga: dfl: fme: Fix cpu hotplug issue in performance reporting The performance reporting driver added cpu hotplug feature but it didn't add pmu migration call in cpu offline function. This can create an issue incase the current designated cpu being used to collect fme pmu data got offline, as based on current code we are not migrating fme pmu to new target cpu. Because of that perf will still try to fetch data from that offline cpu and hence we will not get counter data. Patch fixed this issue by adding pmu_migrate_context call in fme_perf_offline_cpu function. Fixes: 724142f8c42a ("fpga: dfl: fme: add performance reporting support") Cc: stable@vger.kernel.org Tested-by: Xu Yilun Acked-by: Wu Hao Signed-off-by: Kajol Jain Signed-off-by: Moritz Fischer commit 773af69121ecc6c53d192661af8d53bb3db028ae Author: Jens Axboe Date: Tue Jul 27 10:25:55 2021 -0600 io_uring: always reissue from task_work context As a safeguard, if we're going to queue async work, do it from task_work from the original task. This ensures that we can always sanely create threads, regards of what the reissue context may be. Signed-off-by: Jens Axboe commit ec30ce41f03820b6289513344b4281ca3a1151f4 Author: Simon Ser Date: Sun Jul 25 16:49:01 2021 +0000 maintainers: add bugs and chat URLs for amdgpu Add links to the issue tracker and the IRC channel for the amdgpu driver. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Christian König Cc: Pan Xinhui Signed-off-by: Alex Deucher commit f2ad3accefc63e72e9932e141c21875cc04beec8 Author: Alex Deucher Date: Wed Jul 21 18:11:51 2021 -0400 drm/amdgpu/display: only enable aux backlight control for OLED panels We've gotten a number of reports about backlight control not working on panels which indicate that they use aux backlight control. A recent patch: commit 2d73eabe2984a435737498ab39bb1500a9ffe9a9 Author: Camille Cho Date: Thu Jul 8 18:28:37 2021 +0800 drm/amd/display: Only set default brightness for OLED [Why] We used to unconditionally set backlight path as AUX for panels capable of backlight adjustment via DPCD in set default brightness. [How] This should be limited to OLED panel only since we control backlight via PWM path for SDR mode in LCD HDR panel. Reviewed-by: Krunoslav Kovac Acked-by: Rodrigo Siqueira Signed-off-by: Camille Cho Signed-off-by: Alex Deucher Changes some other code to only use aux for backlight control on OLED panels. The commit message seems to indicate that PWM should be used for SDR mode on HDR panels. Do something similar for backlight control in general. This may need to be revisited if and when HDR started to get used. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1438 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=213715 Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit b53e041d8e4308f7324999398aec092dbcb130f5 Author: Dale Zhao Date: Fri Jul 16 09:38:17 2021 +0800 drm/amd/display: ensure dentist display clock update finished in DCN20 [Why] We don't check DENTIST_DISPCLK_CHG_DONE to ensure dentist display clockis updated to target value. In some scenarios with large display clock margin, it will deliver unfinished display clock and cause issues like display black screen. [How] Checking DENTIST_DISPCLK_CHG_DONE to ensure display clock has been update to target value before driver do other clock related actions. Reviewed-by: Cyr Aric Acked-by: Solomon Chiu Signed-off-by: Dale Zhao Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8d177577cd9118c29960401a6de9dc4db00f2052 Author: Victor Lu Date: Tue Jul 6 15:45:11 2021 -0400 drm/amd/display: Add missing DCN21 IP parameter [why] IP parameter min_meta_chunk_size_bytes is read for bandwidth calculations but it was never defined. [how] Define min_meta_chunk_size_bytes and initialize value to 256. Reviewed-by: Laktyushkin Dmytro Acked-by: Solomon Chiu Signed-off-by: Victor Lu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c8f8e96805b54968b4d1d54850f87fc39128a532 Author: Victor Lu Date: Thu Jul 8 14:50:48 2021 -0400 drm/amd/display: Guard DST_Y_PREFETCH register overflow in DCN21 [why] DST_Y_PREFETCH can overflow when DestinationLinesForPrefetch values are too large due to the former being limited to 8 bits. [how] Set the maximum value of DestinationLinesForPrefetch to be 255 * refclk period. Reviewed-by: Laktyushkin Dmytro Acked-by: Solomon Chiu Signed-off-by: Victor Lu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 91e273712ab8dd8c31924ac7714b21e011137e98 Author: Pratik Vishwakarma Date: Fri Jul 23 18:08:40 2021 +0530 drm/amdgpu: Check pmops for desired suspend state [Why] User might change the suspend behaviour from OS. [How] Check with pm for target suspend state and set s0ix flag only for s2idle state. v2: User might change default suspend state, use target state v3: squash in build fix Suggested-by: Lijo Lazar Signed-off-by: Pratik Vishwakarma Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c07d5c9226980ca5ae21c6a2714baa95be2ce164 Author: John Garry Date: Tue Jul 20 23:10:19 2021 +0800 perf pmu: Fix alias matching Commit c47a5599eda324ba ("perf tools: Fix pattern matching for same substring in different PMU type"), may have fixed some alias matching, but has broken some others. Firstly it cannot handle the simple scenario of PMU name in form pmu_name{digits} - it can only handle pmu_name_{digits}. Secondly it cannot handle more complex matching in the case where we have multiple tokens. In this scenario, the code failed to realise that we may examine multiple substrings in the PMU name. Fix in two ways: - Change perf_pmu__valid_suffix() to accept a PMU name without '_' in the suffix - Only pay attention to perf_pmu__valid_suffix() for the final token Also add const qualifiers as necessary to avoid casting. Fixes: c47a5599eda324ba ("perf tools: Fix pattern matching for same substring in different PMU type") Signed-off-by: John Garry Tested-by: Jin Yao Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1626793819-79090-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 8e3341257e3b5774ec8cd3ef1ba0c0d3fada322b Author: Mika Westerberg Date: Tue Jul 27 17:25:01 2021 +0300 Revert "thunderbolt: Hide authorized attribute if router does not support PCIe tunnels" This reverts commit 6f3badead6a078cf3c71f381f9d84ac922984a00. It turns out bolt depends on having authorized attribute visible under each device. Hiding it makes bolt crash as several people have reported on various bug trackers. For this reason revert the commit. Link: https://gitlab.freedesktop.org/bolt/bolt/-/issues/174 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1979765 Link: https://bugs.archlinux.org/task/71569 Cc: stable@vger.kernel.org Cc: Christian Kellner Fixes: 6f3badead6a0 ("thunderbolt: Hide authorized attribute if router does not support PCIe tunnels") Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20210727142501.27476-1-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 48e8a7b5a551f956002b60d2095bdfb58db96e59 Author: James Clark Date: Thu Jun 24 17:43:03 2021 +0100 perf cs-etm: Split --dump-raw-trace by AUX records Currently --dump-raw-trace skips queueing and splitting buffers because of an early exit condition in cs_etm__process_auxtrace_info(). Once that is removed we can print the split data by using the queues and searching for split buffers with the same reference as the one that is currently being processed. This keeps the same behaviour of dumping in file order when an AUXTRACE event appears, rather than moving trace dump to where AUX records are in the file. There will be a newline and size printout for each fragment. For example this buffer is comprised of two AUX records, but was printed as one: 0 0 0x8098 [0x30]: PERF_RECORD_AUXTRACE size: 0xa0 offset: 0 ref: 0x491a4dfc52fc0e6e idx: 0 t . ... CoreSight ETM Trace data: size 160 bytes Idx:0; ID:10; I_ASYNC : Alignment Synchronisation. Idx:12; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 } Idx:17; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0x0000000000000000; Idx:80; ID:10; I_ASYNC : Alignment Synchronisation. Idx:92; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 } Idx:97; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFDE2AD3FD76D4; But is now printed as two fragments: 0 0 0x8098 [0x30]: PERF_RECORD_AUXTRACE size: 0xa0 offset: 0 ref: 0x491a4dfc52fc0e6e idx: 0 t . ... CoreSight ETM Trace data: size 80 bytes Idx:0; ID:10; I_ASYNC : Alignment Synchronisation. Idx:12; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 } Idx:17; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0x0000000000000000; . ... CoreSight ETM Trace data: size 80 bytes Idx:80; ID:10; I_ASYNC : Alignment Synchronisation. Idx:92; ID:10; I_TRACE_INFO : Trace Info.; INFO=0x0 { CC.0 } Idx:97; ID:10; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFDE2AD3FD76D4; Decoding errors that appeared in problematic files are now not present, for example: Idx:808; ID:1c; I_BAD_SEQUENCE : Invalid Sequence in packet.[I_ASYNC] ... PKTP_ETMV4I_0016 : 0x0014 (OCSD_ERR_INVALID_PCKT_HDR) [Invalid packet header]; TrcIdx=822 Signed-off-by: James Clark Reviewed-by: Mathieu Poirier Tested-by: Leo Yan Cc: Al Grant Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210624164303.28632-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit fc71c9e6f41f9912d22a75dfa76bc10811af7e22 Author: Sean Paul Date: Wed Jul 14 11:28:56 2021 -0400 drm/msm/dp: Initialize dp->aux->drm_dev before registration Avoids the following WARN: [ 3.009556] ------------[ cut here ]------------ [ 3.014306] WARNING: CPU: 7 PID: 109 at drivers/gpu/drm/drm_dp_helper.c:1796 drm_dp_aux_register+0xa4/0xac [ 3.024209] Modules linked in: [ 3.027351] CPU: 7 PID: 109 Comm: kworker/7:8 Not tainted 5.10.47 #69 [ 3.033958] Hardware name: Google Lazor (rev1 - 2) (DT) [ 3.039323] Workqueue: events deferred_probe_work_func [ 3.044596] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--) [ 3.050761] pc : drm_dp_aux_register+0xa4/0xac [ 3.055329] lr : dp_aux_register+0x40/0x88 [ 3.059538] sp : ffffffc010ad3920 [ 3.062948] x29: ffffffc010ad3920 x28: ffffffa64196ac70 [ 3.067239] mmc1: Command Queue Engine enabled [ 3.068406] x27: ffffffa64196ac68 x26: 0000000000000001 [ 3.068407] x25: 0000000000000002 x24: 0000000000000060 [ 3.068409] x23: ffffffa642ab3400 x22: ffffffe126c10e5b [ 3.068410] x21: ffffffa641dc3188 x20: ffffffa641963c10 [ 3.068412] x19: ffffffa642aba910 x18: 00000000ffff0a00 [ 3.068414] x17: 000000476f8e002a x16: 00000000000000b8 [ 3.073008] mmc1: new HS400 Enhanced strobe MMC card at address 0001 [ 3.078448] x15: ffffffffffffffff x14: ffffffffffffffff [ 3.078450] x13: 0000000000000030 x12: 0000000000000030 [ 3.078452] x11: 0101010101010101 x10: ffffffe12647a914 [ 3.078453] x9 : ffffffe12647a8cc x8 : 0000000000000000 [ 3.084452] mmcblk1: mmc1:0001 DA4032 29.1 GiB [ 3.089372] [ 3.089372] x7 : 6c6064717372fefe x6 : ffffffa642b11494 [ 3.089374] x5 : 0000000000000000 x4 : 6d006c657869ffff [ 3.089375] x3 : 000000006c657869 x2 : 000000000000000c [ 3.089376] x1 : ffffffe126c3ae3c x0 : ffffffa642aba910 [ 3.089381] Call trace: [ 3.094931] mmcblk1boot0: mmc1:0001 DA4032 partition 1 4.00 MiB [ 3.100291] drm_dp_aux_register+0xa4/0xac [ 3.100292] dp_aux_register+0x40/0x88 [ 3.100294] dp_display_bind+0x64/0xcc [ 3.100295] component_bind_all+0xdc/0x210 [ 3.100298] msm_drm_bind+0x1e8/0x5d4 [ 3.100301] try_to_bring_up_master+0x168/0x1b0 [ 3.105861] mmcblk1boot1: mmc1:0001 DA4032 partition 2 4.00 MiB [ 3.112282] __component_add+0xa0/0x158 [ 3.112283] component_add+0x1c/0x28 [ 3.112284] dp_display_probe+0x33c/0x380 [ 3.112286] platform_drv_probe+0x9c/0xbc [ 3.112287] really_probe+0x140/0x35c [ 3.112289] driver_probe_device+0x84/0xc0 [ 3.112292] __device_attach_driver+0x94/0xb0 [ 3.117967] mmcblk1rpmb: mmc1:0001 DA4032 partition 3 16.0 MiB, chardev (239:0) [ 3.123201] bus_for_each_drv+0x8c/0xd8 [ 3.123202] __device_attach+0xc4/0x150 [ 3.123204] device_initial_probe+0x1c/0x28 [ 3.123205] bus_probe_device+0x3c/0x9c [ 3.123206] deferred_probe_work_func+0x90/0xcc [ 3.123211] process_one_work+0x218/0x3ec [ 3.131976] mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 [ 3.134123] worker_thread+0x288/0x3e8 [ 3.134124] kthread+0x148/0x1b0 [ 3.134127] ret_from_fork+0x10/0x30 [ 3.134128] ---[ end trace cfb9fce3f70f824d ]--- Signed-off-by: Sean Paul Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210714152910.55093-1-sean@poorly.run Signed-off-by: Rob Clark commit afc9b8b6bab8d3d3a9ae67e1d64093ad626c92a0 Author: Kuogee Hsieh Date: Fri Jul 23 09:55:39 2021 -0700 drm/msm/dp: signal audio plugged change at dp_pm_resume There is a scenario that dp cable is unplugged from DUT during system suspended will cause audio option state does not match real connection state. Fix this problem by Signaling audio plugged change with realtime connection status at dp_pm_resume() so that audio option will be in correct state after system resumed. Changes in V2: -- correct Fixes tag commit id. Fixes: f591dbb5fb8c ("drm/msm/dp: power off DP phy at suspend") Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1627059339-12142-1-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark commit f9a39932fa54b6421e751ada7a285da809146421 Author: Bjorn Andersson Date: Wed Jul 21 19:44:34 2021 -0700 drm/msm/dp: Initialize the INTF_CONFIG register Some bootloaders set the widebus enable bit in the INTF_CONFIG register, but configuration of widebus isn't yet supported ensure that the register has a known value, with widebus disabled. Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210722024434.3313167-1-bjorn.andersson@linaro.org Signed-off-by: Rob Clark commit 7591c532b818ef4b8e3e635d842547c08b3a32b4 Author: Kuogee Hsieh Date: Tue Jul 13 08:54:01 2021 -0700 drm/msm/dp: use dp_ctrl_off_link_stream during PHY compliance test run DP cable should always connect to DPU during the entire PHY compliance testing run. Since DP PHY compliance test is executed at irq_hpd event context, dp_ctrl_off_link_stream() should be used instead of dp_ctrl_off(). dp_ctrl_off() is used for unplug event which is triggered when DP cable is dis connected. Changes in V2: -- add fixes statement Fixes: f21c8a276c2d ("drm/msm/dp: handle irq_hpd with sink_count = 0 correctly") Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1626191647-13901-2-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark commit bceddc2cb581dffc94370517f7eedbd9aa16c74b Author: Rob Clark Date: Wed Jul 7 11:01:13 2021 -0700 drm/msm: Fix display fault handling It turns out that when the display is enabled by the bootloader, we can get some transient iommu faults from the display. Which doesn't go over too well when we install a fault handler that is gpu specific. To avoid this, defer installing the fault handler until we get around to setting up per-process pgtables (which is adreno_smmu specific). The arm-smmu fallback error reporting is sufficient for reporting display related faults (and in fact was all we had prior to f8f934c180f629bb927a04fd90d) Reported-by: Dmitry Baryshkov Reported-by: Yassine Oudjana Fixes: 2a574cc05d38 ("drm/msm: Improve the a6xx page fault handler") Signed-off-by: Rob Clark Tested-by: John Stultz Tested-by: Yassine Oudjana Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210707180113.840741-1-robdclark@gmail.com Signed-off-by: Rob Clark commit b910a0206b59eb90ea8ff76d146f4c3156da61e9 Author: Robert Foss Date: Mon Jun 28 10:50:33 2021 +0200 drm/msm/dpu: Fix sm8250_mdp register length The downstream dts lists this value as 0x494, and not 0x45c. Fixes: af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog") Signed-off-by: Robert Foss Reviewed-by: Dmitry Baryshkov Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20210628085033.9905-1-robert.foss@linaro.org Signed-off-by: Rob Clark commit 4c4c1257b844ffe5d0933684e612f92c4b78e120 Author: Shuo Liu Date: Thu Jul 22 14:27:36 2021 +0800 virt: acrn: Do hcall_destroy_vm() before resource release The ACRN hypervisor has scenarios which could run a real-time guest VM. The real-time guest VM occupies dedicated CPU cores, be assigned with dedicated PCI devices. It can run without the Service VM after boot up. hcall_destroy_vm() returns failure when a real-time guest VM refuses. The clearing of flag ACRN_VM_FLAG_DESTROYED causes some kernel resource double-freed in a later acrn_vm_destroy(). Do hcall_destroy_vm() before resource release to drop this chance to destroy the VM if hypercall fails. Fixes: 9c5137aedd11 ("virt: acrn: Introduce VM management interfaces") Cc: stable Signed-off-by: Shuo Liu Signed-off-by: Fei Li Link: https://lore.kernel.org/r/20210722062736.15050-1-fei1.li@intel.com Signed-off-by: Greg Kroah-Hartman commit bf88fef0b6f1488abeca594d377991171c00e52a Author: Dmitry Osipenko Date: Sat Jul 17 21:21:27 2021 +0300 usb: otg-fsm: Fix hrtimer list corruption The HNP work can be re-scheduled while it's still in-fly. This results in re-initialization of the busy work, resetting the hrtimer's list node of the work and crashing kernel with null dereference within kernel/timer once work's timer is expired. It's very easy to trigger this problem by re-plugging USB cable quickly. Initialize HNP work only once to fix this trouble. Unable to handle kernel NULL pointer dereference at virtual address 00000126) ... PC is at __run_timers.part.0+0x150/0x228 LR is at __next_timer_interrupt+0x51/0x9c ... (__run_timers.part.0) from [] (run_timer_softirq+0x2f/0x50) (run_timer_softirq) from [] (__do_softirq+0xd5/0x2f0) (__do_softirq) from [] (irq_exit+0xab/0xb8) (irq_exit) from [] (handle_domain_irq+0x45/0x60) (handle_domain_irq) from [] (gic_handle_irq+0x6b/0x7c) (gic_handle_irq) from [] (__irq_svc+0x65/0xac) Cc: stable@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210717182134.30262-6-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 00de6a572f30ee93cad7e0704ec4232e5e72bda8 Author: Claudiu Beznea Date: Wed Jul 21 16:29:05 2021 +0300 usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses On SAMA7G5 suspending ports will cut the access to OHCI registers and any subsequent access to them will lead to CPU being blocked trying to access that memory. Same thing happens on resume: if OHCI memory is accessed before resuming ports the CPU will block on that access. The OCHI memory is accessed on suspend/resume though ohci_suspend()/ohci_resume(). Acked-by: Alan Stern Signed-off-by: Claudiu Beznea Cc: stable Link: https://lore.kernel.org/r/20210721132905.1970713-1-claudiu.beznea@microchip.com Signed-off-by: Greg Kroah-Hartman commit 68d9f95d6fd5399d105eaf2308c243536c5d7664 Author: Tony Lindgren Date: Tue Jul 27 13:41:34 2021 +0300 usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI As the USB PHYs typically are on I2C or SPI bus for the 2430 glue layer, we need configure the PHYs early for suspend. The musb glue layer we need to suspend only after musb_suspend() in suspend_late. Fixes: 62d472d8ad88 ("usb: musb: Add missing PM suspend and resume functions for 2430 glue") Reported-by: Andreas Kemnade Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210727104134.52800-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit afcff6dc690e24d636a41fd4bee6057e7c70eebd Author: Maxim Devaev Date: Wed Jul 21 21:03:51 2021 +0300 usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers The USB HID standard declares mandatory support for GET_IDLE and SET_IDLE requests for Boot Keyboard. Most hosts can handle their absence, but others like some old/strange UEFIs and BIOSes consider this a critical error and refuse to work with f_hid. This primitive implementation of saving and returning idle is sufficient to meet the requirements of the standard and these devices. Acked-by: Felipe Balbi Cc: stable Signed-off-by: Maxim Devaev Link: https://lore.kernel.org/r/20210721180351.129450-1-mdevaev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2867652e4766360adf14dfda3832455e04964f2a Author: Phil Elwell Date: Fri Jul 23 18:59:30 2021 +0300 usb: gadget: f_hid: fixed NULL pointer dereference Disconnecting and reconnecting the USB cable can lead to crashes and a variety of kernel log spam. The problem was found and reproduced on the Raspberry Pi [1] and the original fix was created in Raspberry's own fork [2]. Link: https://github.com/raspberrypi/linux/issues/3870 [1] Link: https://github.com/raspberrypi/linux/commit/a6e47d5f4efbd2ea6a0b6565cd2f9b7bb217ded5 [2] Signed-off-by: Maxim Devaev Signed-off-by: Phil Elwell Cc: stable Link: https://lore.kernel.org/r/20210723155928.210019-1-mdevaev@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa4a8dcfd51b911f101ebc461dfe22230b74dd64 Author: Zhang Qilong Date: Tue Jul 27 15:31:42 2021 +0800 usb: gadget: remove leaked entry from udc driver list The usb_add_gadget_udc will add a new gadget to the udc class driver list. Not calling usb_del_gadget_udc in error branch will result in residual gadget entry in the udc driver list. We fix it by calling usb_del_gadget_udc to clean it when error return. Fixes: 48ba02b2e2b1 ("usb: gadget: add udc driver for max3420") Acked-by: Felipe Balbi Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20210727073142.84666-1-zhangqilong3@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 30fad76ce4e98263edfa8f885c81d5426c1bf169 Author: Qiang.zhang Date: Fri Jul 23 08:43:34 2021 +0800 USB: usbtmc: Fix RCU stall warning rcu: INFO: rcu_preempt self-detected stall on CPU rcu: 1-...!: (2 ticks this GP) idle=d92/1/0x4000000000000000 softirq=25390/25392 fqs=3 (t=12164 jiffies g=31645 q=43226) rcu: rcu_preempt kthread starved for 12162 jiffies! g31645 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0 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:R running task ........... usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: unknown status received: -71 usbtmc 3-1:0.0: usb_submit_urb failed: -19 The function usbtmc_interrupt() resubmits urbs when the error status of an urb is -EPROTO. In systems using the dummy_hcd usb controller this can result in endless interrupt loops when the usbtmc device is disconnected from the host system. Since host controller drivers already try to recover from transmission errors, there is no need to resubmit the urb or try other solutions to repair the error situation. In case of errors the INT pipe just stops to wait for further packets. Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation") Cc: stable@vger.kernel.org Reported-by: syzbot+e2eae5639e7203360018@syzkaller.appspotmail.com Signed-off-by: Qiang.zhang Acked-by: Guido Kiener Link: https://lore.kernel.org/r/20210723004334.458930-1-qiang.zhang@windriver.com Signed-off-by: Greg Kroah-Hartman commit c7b65650c7f41d3946c4e2f0bb56dfdb92cfe127 Author: Sergio Paracuellos Date: Tue Jul 27 07:40:58 2021 +0200 staging: mt7621-pci: avoid to re-disable clock for those pcies not in use Clock driver for this SoC is using some gates to properly enabling and disabling the access to peripherals. Those gates that are not in use are properly being automatically disabled by the kernel. Pcie driver is explicitly doing a 'clk_disable_unprepare' call for gates of those pcies that are not used. Since kernel has already disabled them, the following warnings appear: WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:952 clk_core_disable+0xe4/0x100 pcie2 already disabled Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0 #0 Stack : 81661680 80082d00 807c0000 00000004 00000000 80a20000 80860000 80792380 814503d4 80862e83 00000000 1431b70 81454360 00000000 00000000 80792380 81431a08 ffffefff fffffea 00000000 81431a14 0000007b 80868820 ffffffff 80792380 1431c70 803d7a24 00000009 807f3a74 00000001 815df810 00000018 0000000 80a20000 ... Call Trace: [<80007ed8>] show_stack+0x28/0xf0 [<80381e40>] dump_stack_lvl+0x60/0x80 [<8002cf90>] __warn+0xcc/0x140 [<8002d090>] warn_slowpath_fmt+0x8c/0xac [<803d7a24>] clk_core_disable+0xe4/0x100 [<803da468>] clk_disable+0x38/0x58 [<804cb730>] mt7621_pci_probe+0x980/0xa50 [<8041e624>] platform_probe+0x50/0xbc [<8041bfe4>] really_probe.part.0+0xa8/0x340 [<8041c3dc>] driver_probe_device+0x4c/0x154 [<8041cb88>] __driver_attach+0xb4/0x1b4 [<80419a38>] bus_for_each_dev+0x68/0xa4 [<8041b1e8>] bus_add_driver+0x134/0x214 [<8041d3bc>] driver_register+0x98/0x154 [<80001648>] do_one_initcall+0x50/0x1a8 [<808ea1fc>] kernel_init_freeable+0x270/0x30c [<806dd9dc>] kernel_init+0x20/0x110 [<80002d98>] ret_from_kernel_thread+0x14/0x1c WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:810 clk_core_unprepare+0xf4/0x194 pcie2 already unprepared Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.14.0 #0 Stack : 81661680 80082d00 807c0000 00000004 00000000 00000000 81431bc4 80a20000 80860000 80792380 814503d4 80862e83 00000000 00000001 81431b70 81454360 00000000 00000000 80792380 81431a08 ffffefff 00000000 ffffffea 00000000 81431a14 0000009b 80868820 ffffffff 80792380 00000001 81431c70 803d7764 00000009 807f3a74 00000001 815df810 00000018 8040b36c 00000000 80a20000 ... Call Trace: [<80007ed8>] show_stack+0x28/0xf0 [<80381e40>] dump_stack_lvl+0x60/0x80 [<8002cf90>] __warn+0xcc/0x140 [<8002d090>] warn_slowpath_fmt+0x8c/0xac [<803d7764>] clk_core_unprepare+0xf4/0x194 [<803d97c4>] clk_unprepare+0x30/0x48 [<804cb738>] mt7621_pci_probe+0x988/0xa50 [<8041e624>] platform_probe+0x50/0xbc [<8041bfe4>] really_probe.part.0+0xa8/0x340 [<8041c3dc>] driver_probe_device+0x4c/0x154 [<8041cb88>] __driver_attach+0xb4/0x1b4 [<80419a38>] bus_for_each_dev+0x68/0xa4 [<8041b1e8>] bus_add_driver+0x134/0x214 [<8041d3bc>] driver_register+0x98/0x154 [<80001648>] do_one_initcall+0x50/0x1a8 [<808ea1fc>] kernel_init_freeable+0x270/0x30c [<806dd9dc>] kernel_init+0x20/0x110 [<80002d98>] ret_from_kernel_thread+0x14/0x1c Avoid to explicitly disable already disabled pcie gates fixes the problem. Fixes: cc4e864a5ce4 ("staging: mt7621-pci: make use of kernel clock apis") Reported-by: DENG Qingfang Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210727054058.10612-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit e9e6aa51b2735d83a67d9fa0119cf11abef80d99 Author: Pavel Skripkin Date: Wed Jul 21 22:34:47 2021 +0300 staging: rtl8712: error handling refactoring There was strange error handling logic in case of fw load failure. For some reason fw loader callback was doing clean up stuff when fw is not available. I don't see any reason behind doing this. Since this driver doesn't have EEPROM firmware let's just disconnect it in case of fw load failure. Doing clean up stuff in 2 different place which can run concurently is not good idea and syzbot found 2 bugs related to this strange approach. So, in this pacth I deleted all clean up code from fw callback and made a call to device_release_driver() under device_lock(parent) in case of fw load failure. This approach is more generic and it defend driver from UAF bugs, since all clean up code is moved to one place. Fixes: e02a3b945816 ("staging: rtl8712: fix memory leak in rtl871x_load_fw_cb") Fixes: 8c213fa59199 ("staging: r8712u: Use asynchronous firmware loading") Cc: stable Reported-and-tested-by: syzbot+5872a520e0ce0a7c7230@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+cc699626e48a6ebaf295@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/d49ecc56e97c4df181d7bd4d240b031f315eacc3.1626895918.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9be550ee43919b070bcd77f9228bdbbbc073245b Author: Pavel Skripkin Date: Wed Jul 21 22:34:36 2021 +0300 staging: rtl8712: get rid of flush_scheduled_work This patch is preparation for following patch for error handling refactoring. flush_scheduled_work() takes (wq_completion)events lock and it can lead to deadlock when r871xu_dev_remove() is called from workqueue. To avoid deadlock sutiation we can change flush_scheduled_work() call to flush_work() call for all possibly scheduled works in this driver, since next patch adds device_release_driver() in case of fw load failure. Signed-off-by: Pavel Skripkin Cc: stable Link: https://lore.kernel.org/r/6e028b4c457eeb7156c76c6ea3cdb3cb0207c7e1.1626895918.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 801e541c79bbc63af852ca21b713ba87cc97c6ad Author: Tang Bin Date: Tue Jul 27 20:25:06 2021 +0800 nfc: s3fwrn5: fix undefined parameter values in dev_err() In the function s3fwrn5_fw_download(), the 'ret' is not assigned, so the correct value should be given in dev_err function. Fixes: a0302ff5906a ("nfc: s3fwrn5: remove unnecessary label") Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Signed-off-by: David S. Miller commit 55f24c27b6c1a840b62fe297616f1f9ea3576cb7 Author: Kunihiko Hayashi Date: Tue Jul 27 14:47:32 2021 +0900 dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state The function uniphier_xdmac_chan_stop() is only called in atomic state. Should use readl_poll_timeout_atomic() there instead of readl_poll_timeout(). Reported-by: Dan Carpenter Fixes: 667b9251440b ("dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1627364852-28432-1-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Vinod Koul commit 4d1014c1816c0395eca5d1d480f196a4c63119d0 Author: Filip Schauer Date: Tue Jul 27 13:23:11 2021 +0200 drivers core: Fix oops when driver probe fails dma_range_map is freed to early, which might cause an oops when a driver probe fails. Call trace: is_free_buddy_page+0xe4/0x1d4 __free_pages+0x2c/0x88 dma_free_contiguous+0x64/0x80 dma_direct_free+0x38/0xb4 dma_free_attrs+0x88/0xa0 dmam_release+0x28/0x34 release_nodes+0x78/0x8c devres_release_all+0xa8/0x110 really_probe+0x118/0x2d0 __driver_probe_device+0xc8/0xe0 driver_probe_device+0x54/0xec __driver_attach+0xe0/0xf0 bus_for_each_dev+0x7c/0xc8 driver_attach+0x30/0x3c bus_add_driver+0x17c/0x1c4 driver_register+0xc0/0xf8 __platform_driver_register+0x34/0x40 ... This issue is introduced by commit d0243bbd5dd3 ("drivers core: Free dma_range_map when driver probe failed"). It frees dma_range_map before the call to devres_release_all, which is too early. The solution is to free dma_range_map only after devres_release_all. Fixes: d0243bbd5dd3 ("drivers core: Free dma_range_map when driver probe failed") Cc: stable Signed-off-by: Filip Schauer Link: https://lore.kernel.org/r/20210727112311.GA7645@DESKTOP-E8BN1B0.localdomain Signed-off-by: Greg Kroah-Hartman commit 61bef9e68dca4316e1fc5fdf5f0c270bdbd65657 Author: Pierre-Louis Bossart Date: Mon Jul 26 13:28:55 2021 -0500 ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire On some platforms with an external HDaudio codec, the DSDT reports the presence of SoundWire devices. Pin-mux restrictions and board reworks usually prevent coexistence between the two types of links, let's prevent unnecessary operations from starting. In the case of a single iDISP codec being detected, we still start the links even if no SoundWire machine configuration was detected, so that we can double-check what the hardware is and add the missing configuration if applicable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210726182855.179943-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2635c226036c1bf44b86575d0bc721505c8201e3 Author: Peter Ujfalusi Date: Mon Jul 26 13:21:42 2021 -0500 ASoC: topology: Select SND_DYNAMIC_MINORS The indexes of the devices are described within the topology file, it is a possibility that the topology encodes invalid indexes when DYNAMIC_MINORS is not enabled in kernel: #define SNDRV_MINOR_COMPRESS 2 /* 2 - 3 */ #define SNDRV_MINOR_HWDEP 4 /* 4 - 7 */ #define SNDRV_MINOR_RAWMIDI 8 /* 8 - 15 */ #define SNDRV_MINOR_PCM_PLAYBACK 16 /* 16 - 23 */ #define SNDRV_MINOR_PCM_CAPTURE 24 /* 24 - 31 */ If the topology assigns an index greater than 7 for PLAYBACK/CAPTURE PCM then there will be minor number collision. As an example: card0 creates a capture PCM with index 10 -> minor = 34 card1 creates compress device with index 0 -> minor = 34 Card1 will fail to instantiate because the minor for the compress stream is already taken. To avoid seemingly mysterious issues with card creation, select the DYNAMIC_MINORS when the topology is enabled. The other option would be to try to do out of bound index checks in case of DYNAMIC_MINOR is not enabled and do not even attempt to create the device with failing the topology load. Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210726182142.179604-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8ee18e769dd621104fecad584c84ec3c4c9ef3fa Merge: 44379b986424b ff1176468d368 Author: Thomas Zimmermann Date: Tue Jul 27 14:08:29 2021 +0200 Merge drm/drm-fixes into drm-misc-fixes Backmerging to get tree to v5.14-rc3, as requested by Daniel. Signed-off-by: Thomas Zimmermann commit c7c9d2102c9c098916ab9e0ab248006107d00d6c Author: Pavel Skripkin Date: Sun Jul 25 00:11:59 2021 +0300 net: llc: fix skb_over_panic Syzbot reported skb_over_panic() in llc_pdu_init_as_xid_cmd(). The problem was in wrong LCC header manipulations. Syzbot's reproducer tries to send XID packet. llc_ui_sendmsg() is doing following steps: 1. skb allocation with size = len + header size len is passed from userpace and header size is 3 since addr->sllc_xid is set. 2. skb_reserve() for header_len = 3 3. filling all other space with memcpy_from_msg() Ok, at this moment we have fully loaded skb, only headers needs to be filled. Then code comes to llc_sap_action_send_xid_c(). This function pushes 3 bytes for LLC PDU header and initializes it. Then comes llc_pdu_init_as_xid_cmd(). It initalizes next 3 bytes *AFTER* LLC PDU header and call skb_push(skb, 3). This looks wrong for 2 reasons: 1. Bytes rigth after LLC header are user data, so this function was overwriting payload. 2. skb_push(skb, 3) call can cause skb_over_panic() since all free space was filled in llc_ui_sendmsg(). (This can happen is user passed 686 len: 686 + 14 (eth header) + 3 (LLC header) = 703. SKB_DATA_ALIGN(703) = 704) So, in this patch I added 2 new private constansts: LLC_PDU_TYPE_U_XID and LLC_PDU_LEN_U_XID. LLC_PDU_LEN_U_XID is used to correctly reserve header size to handle LLC + XID case. LLC_PDU_TYPE_U_XID is used by llc_pdu_header_init() function to push 6 bytes instead of 3. And finally I removed skb_push() call from llc_pdu_init_as_xid_cmd(). This changes should not affect other parts of LLC, since after all steps we just transmit buffer. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-and-tested-by: syzbot+5e5a981ad7cc54c4b2b4@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit fcef709c2c4baf758950bd7395e4b10527b81e2c Author: Sunil Goutham Date: Sun Jul 25 18:54:52 2021 +0530 octeontx2-af: Do NIX_RX_SW_SYNC twice NIX_RX_SW_SYNC ensures all existing transactions are finished and pkts are written to LLC/DRAM, queues should be teared down after successful SW_SYNC. Due to a HW errata, in some rare scenarios an existing transaction might end after SW_SYNC operation. To ensure operation is fully done, do the SW_SYNC twice. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 4b0556b96e1fe7723629bd40e3813a30cd632faf Author: Alexander Tsoy Date: Tue Jul 27 12:33:26 2021 +0300 ALSA: usb-audio: Add registration quirk for JBL Quantum 600 Apparently JBL Quantum 600 has multiple hardware revisions. Apply registration quirk to another device id as well. Signed-off-by: Alexander Tsoy Cc: Link: https://lore.kernel.org/r/20210727093326.1153366-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 9f59efcd51e332aad01e7fa2b3a97cd22d347ceb Author: Michael Zaidman Date: Mon May 10 19:34:28 2021 +0300 HID: ft260: fix format type warning in ft260_word_show() Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver") Fix warning reported by static analysis when built with W=1 for arm64 by clang version 13.0.0 >> drivers/hid/hid-ft260.c:794:44: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] return scnprintf(buf, PAGE_SIZE, "%hi\n", le16_to_cpu(*field)); ~~~ ^~~~~~~~~~~~~~~~~~~ %i include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu' #define le16_to_cpu __le16_to_cpu ^ include/uapi/linux/byteorder/big_endian.h:36:26: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/uapi/linux/swab.h:105:2: note: expanded from macro '__swab16' (__builtin_constant_p((__u16)(x)) ? \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Any sprintf style use of %h or %hi for a sub-int sized value isn't useful since integer promotion is done on the value anyway. So, use %d instead. https://lore.kernel.org/lkml/CAHk-=wgoxnmsj8GEVFJSvTwdnWm8wVJthefNk2n6+4TC=20e0Q@mail.gmail.com/ Signed-off-by: Michael Zaidman Suggested-by: Joe Perches Reported-by: kernel test robot Signed-off-by: Jiri Kosina commit 353b7a55dcaf5fb8758e09ebe2ddf5f3adbac7c5 Merge: 3ff340e24c9dd c68ef4ad180e0 Author: Tony Lindgren Date: Tue Jul 27 11:25:08 2021 +0300 Merge branch 'fixes-v5.14' into fixes commit c68ef4ad180e09805fa46965d15e1dfadf09ffa5 Author: H. Nikolaus Schaller Date: Thu Jul 1 16:00:22 2021 +0200 omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator This device tree include file describes a fixed-regulator connecting smps7_reg output (1.8V) to some 1.8V rail and consumers (vdds_1v8_main). This regulator does not physically exist. I assume it was introduced as a wrapper around smps7_reg to provide a speaking signal name "vdds_1v8_main" as label. This fixed-regulator without real function was not an issue in driver code until Commit 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators") introduced a new check for regulator initialization which makes Palmas regulator registration fail: [ 5.407712] ldo1: supplied by vsys_cobra [ 5.412748] ldo2: supplied by vsys_cobra [ 5.417603] palmas-pmic 48070000.i2c:palmas@48:palmas_pmic: failed to register 48070000.i2c:palmas@48:palmas_pmic regulator The reason is that the supply-chain of regulators is too long and goes from ldo3 through the virtual vdds_1v8_main regulator and then back to smps7. This adds a cross-dependency of probing Palmas regulators and the fixed-regulator which leads to probe deferral by the new check and is no longer resolved. Since we do not control what device tree files including this one reference (either &vdds_1v8_main or &smps7_reg or both) we keep both labels for smps7 for compatibility. Fixes: 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators") Signed-off-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren commit 0162a9964365fd26e34575e121b17d021204c481 Author: Dario Binacchi Date: Mon Jul 26 15:15:25 2021 +0200 ARM: dts: am437x-l4: fix typo in can@0 node Replace clock-name with clock-names. Fixes: 2a4117df9b43 ("ARM: dts: Fix dcan driver probe failed on am437x platform") Signed-off-by: Dario Binacchi Signed-off-by: Tony Lindgren commit 20a6b3fd8e2e2c063b25fbf2ee74d86b898e5087 Author: Dave Gerlach Date: Fri Jul 16 09:07:30 2021 -0700 ARM: dts: am43x-epos-evm: Reduce i2c0 bus speed for tps65218 Based on the latest timing specifications for the TPS65218 from the data sheet, http://www.ti.com/lit/ds/symlink/tps65218.pdf, document SLDS206 from November 2014, we must change the i2c bus speed to better fit within the minimum high SCL time required for proper i2c transfer. When running at 400khz, measurements show that SCL spends 0.8125 uS/1.666 uS high/low which violates the requirement for minimum high period of SCL provided in datasheet Table 7.6 which is 1 uS. Switching to 100khz gives us 5 uS/5 uS high/low which both fall above the minimum given values for 100 khz, 4.0 uS/4.7 uS high/low. Without this patch occasionally a voltage set operation from the kernel will appear to have worked but the actual voltage reflected on the PMIC will not have updated, causing problems especially with cpufreq that may update to a higher OPP without actually raising the voltage on DCDC2, leading to a hang. Signed-off-by: Dave Gerlach Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren commit a6d90e9f22328f07343e49e08a4ca483ae8e8abb Author: Kevin Hilman Date: Tue Jul 20 11:27:16 2021 -0700 bus: ti-sysc: AM3: RNG is GP only Make the RNG on AM3 GP only. Based on this patch from TI v5.4 tree which is based on hwmod data which are now removed: | ARM: AM43xx: hwmod: Move RNG to a GP only links table | | On non-GP devices the RNG is controlled by the secure-side software, | like in DRA7xx hwmod we should not control this IP when we are not | a GP device. | | Signed-off-by: Andrew F. Davis Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren commit b070f9ca78680486927b799cf6126b128a7c2c1b Author: Tero Kristo Date: Tue Jul 20 11:47:10 2021 -0700 ARM: omap2+: hwmod: fix potential NULL pointer access omap_hwmod_get_pwrdm() may access a NULL clk_hw pointer in some failure cases. Add a check for the case and bail out gracely if this happens. Reported-by: Dan Murphy Signed-off-by: Tero Kristo Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren commit 35171fbfc0d94aa31b009bb475d156ad1941ab50 Author: Nikos Liolios Date: Tue Jul 27 06:05:10 2021 +0300 ALSA: hda/realtek: Fix headset mic for Acer SWIFT SF314-56 (ALC256) The issue on Acer SWIFT SF314-56 is that headset microphone doesn't work. The following quirk fixed headset microphone issue. The fixup was found by trial and error. Note that the fixup of SF314-54/55 (ALC256_FIXUP_ACER_HEADSET_MIC) was not successful on my SF314-56. Signed-off-by: Nikos Liolios Cc: Link: https://lore.kernel.org/r/20210727030510.36292-1-liolios.nk@gmail.com Signed-off-by: Takashi Iwai commit 5ad4df56cd2158965f73416d41fce37906724822 Author: Steve French Date: Mon Jul 26 16:22:55 2021 -0500 smb3: rc uninitialized in one fallocate path Clang detected a problem with rc possibly being unitialized (when length is zero) in a recently added fallocate code path. Reported-by: kernel test robot Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit f2a26a3cff27dfa456fef386fe5df56dcb4b47b6 Author: Steve French Date: Fri Jul 23 18:35:15 2021 -0500 SMB3: fix readpage for large swap cache readpage was calculating the offset of the page incorrectly for the case of large swapcaches. loff_t offset = (loff_t)page->index << PAGE_SHIFT; As pointed out by Matthew Wilcox, this needs to use page_file_offset() to calculate the offset instead. Pages coming from the swap cache have page->index set to their index within the swapcache, not within the backing file. For a sufficiently large swapcache, we could have overlapping values of page->index within the same backing file. Suggested by: Matthew Wilcox (Oracle) Cc: # v5.7+ Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 953a92f0e55f370ec76e7f85e332906f1e898ef4 Author: Randy Dunlap Date: Fri Jul 16 21:31:59 2021 -0700 clk: hisilicon: hi3559a: select RESET_HISI The clk-hi3559a driver uses functions from reset.c so it should select RESET_HISI to avoid build errors. Fixes these build errors: aarch64-linux-ld: drivers/clk/hisilicon/clk-hi3559a.o: in function `hi3559av100_crg_remove': clk-hi3559a.c:(.text+0x158): undefined reference to `hisi_reset_exit' aarch64-linux-ld: drivers/clk/hisilicon/clk-hi3559a.o: in function `hi3559av100_crg_probe': clk-hi3559a.c:(.text+0x1f4): undefined reference to `hisi_reset_init' aarch64-linux-ld: clk-hi3559a.c:(.text+0x238): undefined reference to `hisi_reset_exit' Fixes: 6c81966107dc ("clk: hisilicon: Add clock driver for hi3559A SoC") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Dongjiu Geng Cc: Stephen Boyd Cc: stable@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Link: https://lore.kernel.org/r/20210717043159.12566-1-rdunlap@infradead.org Reviewed-by: Dongjiu Geng Signed-off-by: Stephen Boyd commit 24b5b1978cd5a80db58e2a19db2f9c36fe8d4f7a Author: Dario Binacchi Date: Sun Jul 25 18:07:25 2021 +0200 clk: stm32f4: fix post divisor setup for I2S/SAI PLLs Enabling the framebuffer leads to a system hang. Running, as a debug hack, the store_pan() function in drivers/video/fbdev/core/fbsysfs.c without taking the console_lock, allows to see the crash backtrace on the serial line. ~ # echo 0 0 > /sys/class/graphics/fb0/pan [ 9.719414] Unhandled exception: IPSR = 00000005 LR = fffffff1 [ 9.726937] CPU: 0 PID: 49 Comm: sh Not tainted 5.13.0-rc5 #9 [ 9.733008] Hardware name: STM32 (Device Tree Support) [ 9.738296] PC is at clk_gate_is_enabled+0x0/0x28 [ 9.743426] LR is at stm32f4_pll_div_set_rate+0xf/0x38 [ 9.748857] pc : [<0011e4be>] lr : [<0011f9e3>] psr: 0100000b [ 9.755373] sp : 00bc7be0 ip : 00000000 fp : 001f3ac4 [ 9.760812] r10: 002610d0 r9 : 01efe920 r8 : 00540560 [ 9.766269] r7 : 02e7ddb0 r6 : 0173eed8 r5 : 00000000 r4 : 004027c0 [ 9.773081] r3 : 0011e4bf r2 : 02e7ddb0 r1 : 0173eed8 r0 : 1d3267b8 [ 9.779911] xPSR: 0100000b [ 9.782719] CPU: 0 PID: 49 Comm: sh Not tainted 5.13.0-rc5 #9 [ 9.788791] Hardware name: STM32 (Device Tree Support) [ 9.794120] [<0000afa1>] (unwind_backtrace) from [<0000a33f>] (show_stack+0xb/0xc) [ 9.802421] [<0000a33f>] (show_stack) from [<0000a8df>] (__invalid_entry+0x4b/0x4c) The `pll_num' field in the post_div_data configuration contained a wrong value which also referenced an uninitialized hardware clock when clk_register_pll_div() was called. Fixes: 517633ef630e ("clk: stm32f4: Add post divisor for I2S & SAI PLLs") Signed-off-by: Dario Binacchi Reviewed-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210725160725.10788-1-dariobin@libero.it Signed-off-by: Stephen Boyd commit 758684e49f4c7ea2a75e249e486659f0950cd63e Author: Somnath Kotur Date: Mon Jul 26 14:52:48 2021 -0400 bnxt_en: Fix static checker warning in bnxt_fw_reset_task() Now that we return when bnxt_open() fails in bnxt_fw_reset_task(), there is no need to check for 'rc' value again before invoking bnxt_reenable_sriov(). Fixes: 3958b1da725a ("bnxt_en: fix error path of FW reset") Reported-by: Dan Carpenter Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 53ca18acbe645656132fb5a329833db711067e54 Author: Marek Vasut Date: Mon Jul 26 12:01:02 2021 +0200 spi: imx: mx51-ecspi: Fix low-speed CONFIGREG delay calculation The spi_imx->spi_bus_clk may be uninitialized and thus also zero in mx51_ecspi_prepare_message(), which would lead to division by zero in kernel. Since bitbang .setup_transfer callback which initializes the spi_imx->spi_bus_clk is called after bitbang prepare_message callback, iterate over all the transfers in spi_message, find the one with lowest bus frequency, and use that bus frequency for the delay calculation. Note that it is not possible to move this CONFIGREG delay back into the .setup_transfer callback, because that is invoked too late, after the GPIO chipselects were already configured. Fixes: 135cbd378eab ("spi: imx: mx51-ecspi: Reinstate low-speed CONFIGREG delay") Signed-off-by: Marek Vasut Cc: Uwe Kleine-König Cc: Mark Brown Link: https://lore.kernel.org/r/20210726100102.5188-1-marex@denx.de Signed-off-by: Mark Brown commit 0f32d9eb38c13c32895b5bf695eac639cee02d6c Author: Brent Lu Date: Mon Jul 26 17:45:25 2021 +0800 ASoC: Intel: sof_da7219_mx98360a: fail to initialize soundcard The default codec for speaker amp's DAI Link is max98373 and will be overwritten in probe function if the board id is sof_da7219_mx98360a. However, the probe function does not do it because the board id is changed in earlier commit. Fixes: 1cc04d195dc2 ("ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters") Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210726094525.5748-1-brent.lu@intel.com Signed-off-by: Mark Brown commit 66291b6adb66dd3bc96b0f594d88c2ff1300d95f Author: Takashi Iwai Date: Mon Jul 26 08:26:56 2021 +0200 ALSA: usb-audio: Fix superfluous autosuspend recovery The change to restore the autosuspend from the disabled state uses a wrong check: namely, it should have been the exact comparison of the quirk_type instead of the bitwise and (&). Otherwise it matches wrongly with the other quirk types. Although re-enabling the autosuspend for the already enabled device shouldn't matter much, it's better to fix the unbalanced call. Fixes: 9799110825db ("ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend()") Cc: Link: https://lore.kernel.org/r/s5hr1flh9ov.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6aade587d329ebe88319dfdb8e8c7b6aede80417 Author: Jiri Kosina Date: Thu Jun 24 13:11:36 2021 +0200 drm/amdgpu: Avoid printing of stack contents on firmware load error In case when psp_init_asd_microcode() fails to load ASD microcode file, psp_v12_0_init_microcode() tries to print the firmware filename that failed to load before bailing out. This is wrong because: - the firmware filename it would want it print is an incorrect one as psp_init_asd_microcode() and psp_v12_0_init_microcode() are loading different filenames - it tries to print fw_name, but that's not yet been initialized by that time, so it prints random stack contents, e.g. amdgpu 0000:04:00.0: Direct firmware load for amdgpu/renoir_asd.bin failed with error -2 amdgpu 0000:04:00.0: amdgpu: fail to initialize asd microcode amdgpu 0000:04:00.0: amdgpu: psp v12.0: Failed to load firmware "\xfeTO\x8e\xff\xff" Fix that by bailing out immediately, instead of priting the bogus error message. Reported-by: Vojtech Pavlik Signed-off-by: Jiri Kosina Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 110aa25c3ce417a44e35990cf8ed22383277933a Author: Jens Axboe Date: Mon Jul 26 10:42:56 2021 -0600 io_uring: fix race in unified task_work running We use a bit to manage if we need to add the shared task_work, but a list + lock for the pending work. Before aborting a current run of the task_work we check if the list is empty, but we do so without grabbing the lock that protects it. This can lead to races where we think we have nothing left to run, where in practice we could be racing with a task adding new work to the list. If we do hit that race condition, we could be left with work items that need processing, but the shared task_work is not active. Ensure that we grab the lock before checking if the list is empty, so we know if it's safe to exit the run or not. Link: https://lore.kernel.org/io-uring/c6bd5987-e9ae-cd02-49d0-1b3ac1ef65b1@tnonline.net/ Cc: stable@vger.kernel.org # 5.11+ Reported-by: Forza Signed-off-by: Jens Axboe commit d47255d3f87338164762ac56df1f28d751e27246 Author: Jiri Kosina Date: Thu Jun 24 13:20:21 2021 +0200 drm/amdgpu: Fix resource leak on probe error path This reverts commit 4192f7b5768912ceda82be2f83c87ea7181f9980. It is not true (as stated in the reverted commit changelog) that we never unmap the BAR on failure; it actually does happen properly on amdgpu_driver_load_kms() -> amdgpu_driver_unload_kms() -> amdgpu_device_fini() error path. What's worse, this commit actually completely breaks resource freeing on probe failure (like e.g. failure to load microcode), as amdgpu_driver_unload_kms() notices adev->rmmio being NULL and bails too early, leaving all the resources that'd normally be freed in amdgpu_acpi_fini() and amdgpu_device_fini() still hanging around, leading to all sorts of oopses when someone tries to, for example, access the sysfs and procfs resources which are still around while the driver is gone. Fixes: 4192f7b57689 ("drm/amdgpu: unmap register bar on device init failure") Reported-by: Vojtech Pavlik Signed-off-by: Jiri Kosina Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 44eff40a32e8f5228ae041006352e32638ad2368 Author: Pavel Begunkov Date: Mon Jul 26 14:14:31 2021 +0100 io_uring: fix io_prep_async_link locking io_prep_async_link() may be called after arming a linked timeout, automatically making it unsafe to traverse the linked list. Guard with completion_lock if there was a linked timeout. Cc: stable@vger.kernel.org # 5.9+ Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/93f7c617e2b4f012a2a175b3dab6bc2f27cebc48.1627304436.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 92766c4628ea349c8ddab0cd7bd0488f36e5c4ce Author: Letu Ren Date: Sun Jul 25 21:45:12 2021 +0800 net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset When calling the 'ql_wait_for_drvr_lock' and 'ql_adapter_reset', the driver has already acquired the spin lock, so the driver should not call 'ssleep' in atomic context. This bug can be fixed by using 'mdelay' instead of 'ssleep'. Reported-by: Letu Ren Signed-off-by: Letu Ren Signed-off-by: David S. Miller commit 0fbea680540108b09db7b26d9f4d24236d58a6ad Author: Ezequiel Garcia Date: Thu Jul 22 22:05:52 2021 -0300 iommu/dma: Fix leak in non-contiguous API Currently, iommu_dma_alloc_noncontiguous() allocates a struct dma_sgt_handle object to hold some state needed for iommu_dma_free_noncontiguous(). However, the handle is neither freed nor returned explicitly by the ->alloc_noncontiguous method, and therefore seems leaked. This was found by code inspection, so please review carefully and test. As a side note, it appears the struct dma_sgt_handle type is exposed to users of the DMA-API by linux/dma-map-ops.h, but is has no users or functions returning the type explicitly. This may indicate it's a good idea to move the struct dma_sgt_handle type to drivers/iommu/dma-iommu.c. The decision is left to maintainers :-) Cc: stable@vger.kernel.org Fixes: e817ee5f2f95c ("dma-iommu: implement ->alloc_noncontiguous") Signed-off-by: Ezequiel Garcia Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210723010552.50969-1-ezequiel@collabora.com Signed-off-by: Joerg Roedel commit 0a31df6823232516f61f174907e444f710941dfe Author: Vitaly Kuznetsov Date: Thu Jul 22 14:30:18 2021 +0200 KVM: x86: Check the right feature bit for MSR_KVM_ASYNC_PF_ACK access MSR_KVM_ASYNC_PF_ACK MSR is part of interrupt based asynchronous page fault interface and not the original (deprecated) KVM_FEATURE_ASYNC_PF. This is stated in Documentation/virt/kvm/msr.rst. Fixes: 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID") Signed-off-by: Vitaly Kuznetsov Reviewed-by: Maxim Levitsky Reviewed-by: Oliver Upton Message-Id: <20210722123018.260035-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 3b1c8c5682672d73c1e977944af8c3ebed4a0ce1 Author: Mauro Carvalho Chehab Date: Thu Jul 22 11:50:03 2021 +0200 docs: virt: kvm: api.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Signed-off-by: Mauro Carvalho Chehab Message-Id: Signed-off-by: Paolo Bonzini commit 0e691ee7b5034c91a31b565d3ff9a50e01dde445 Author: Vitaly Kuznetsov Date: Thu Jul 22 11:26:28 2021 +0200 KVM: Documentation: Fix KVM_CAP_ENFORCE_PV_FEATURE_CPUID name 'KVM_CAP_ENFORCE_PV_CPUID' doesn't match the define in include/uapi/linux/kvm.h. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210722092628.236474-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 2bb16bea5feaa582fbbdbfd84ecaa1ab61bbb34c Author: Vitaly Kuznetsov Date: Mon Jul 19 11:03:22 2021 +0200 KVM: nSVM: Swap the parameter order for svm_copy_vmrun_state()/svm_copy_vmloadsave_state() Make svm_copy_vmrun_state()/svm_copy_vmloadsave_state() interface match 'memcpy(dest, src)' to avoid any confusion. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Message-Id: <20210719090322.625277-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 9a9e74819bb0e4694279fb437e136fe485878d25 Author: Vitaly Kuznetsov Date: Fri Jul 16 16:41:04 2021 +0200 KVM: nSVM: Rename nested_svm_vmloadsave() to svm_copy_vmloadsave_state() To match svm_copy_vmrun_state(), rename nested_svm_vmloadsave() to svm_copy_vmloadsave_state(). Opportunistically add missing braces to 'else' branch in vmload_vmsave_interception(). No functional change intended. Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Message-Id: <20210716144104.465269-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 2c39ca6885a2ec03e5c9e7c12a4da2aa8926605a Author: Mark Brown Date: Fri Jul 23 19:02:00 2021 +0100 ASoC: tlv320aic31xx: Fix jack detection after suspend The tlv320aic31xx driver relies on regcache_sync() to restore the register contents after going to _BIAS_OFF, for example during system suspend. This does not work for the jack detection configuration since that is configured via the same register that status is read back from so the register is volatile and not cached. This can also cause issues during init if the jack detection ends up getting set up before the CODEC is initially brought out of _BIAS_OFF, we will reset the CODEC and resync the cache as part of that process. Fix this by explicitly reapplying the jack detection configuration after resyncing the register cache during power on. This issue was found by an engineer working off-list on a product kernel, I just wrote up the upstream fix. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210723180200.25105-1-broonie@kernel.org Cc: stable@vger.kernel.org commit 2ebda027148315581b89a2ed2fef84ad53b2aedd Author: Chen Shen Date: Mon Jul 26 13:47:34 2021 +0800 sctp: delete addr based on sin6_scope_id sctp_inet6addr_event deletes 'addr' from 'local_addr_list' when setting netdev down, but it is possible to delete the incorrect entry (match the first one with the same ipaddr, but the different 'ifindex'), if there are some netdevs with the same 'local-link' ipaddr added already. It should delete the entry depending on 'sin6_addr' and 'sin6_scope_id' both. otherwise, the endpoint will call 'sctp_sf_ootb' if it can't find the according association when receives 'heartbeat', and finally will reply 'abort'. For example: 1.when linux startup the entries in local_addr_list: ifindex:35 addr:fe80::40:43ff:fe80:0 (eths0.201) ifindex:36 addr:fe80::40:43ff:fe80:0 (eths0.209) ifindex:37 addr:fe80::40:43ff:fe80:0 (eths0.210) the route table: local fe80::40:43ff:fe80:0 dev eths0.201 local fe80::40:43ff:fe80:0 dev eths0.209 local fe80::40:43ff:fe80:0 dev eths0.210 2.after 'ifconfig eths0.209 down' the entries in local_addr_list: ifindex:36 addr:fe80::40:43ff:fe80:0 (eths0.209) ifindex:37 addr:fe80::40:43ff:fe80:0 (eths0.210) the route table: local fe80::40:43ff:fe80:0 dev eths0.201 local fe80::40:43ff:fe80:0 dev eths0.210 3.asoc not found for src:[fe80::40:43ff:fe80:0]:37381 dst:[:1]:53335 ::1->fe80::40:43ff:fe80:0 HEARTBEAT fe80::40:43ff:fe80:0->::1 ABORT Signed-off-by: Chen Shen Signed-off-by: David S. Miller commit 94cbe7db7d757c2d481c3617ab5579a28cfc2175 Author: Mohammad Athari Bin Ismail Date: Mon Jul 26 10:20:20 2021 +0800 net: stmmac: add est_irq_status callback function for GMAC 4.10 and 5.10 Assign dwmac5_est_irq_status to est_irq_status callback function for GMAC 4.10 and 5.10. With this, EST related interrupts could be handled properly. Fixes: e49aa315cb01 ("net: stmmac: EST interrupts handling and error reporting") Cc: # 5.13.x Signed-off-by: Mohammad Athari Bin Ismail Acked-by: Wong Vee Khee Signed-off-by: David S. Miller commit f0c6225531e4a9e43e51c5f7b02089bdd725c734 Author: Mario Limonciello Date: Sat Jul 17 23:11:38 2021 -0500 ACPI: PM: Add support for upcoming AMD uPEP HID AMDI007 AMD systems with uPEP HID AMDI007 should be using revision 2 and the AMD method. Fixes: 8fbd6c15ea0a ("ACPI: PM: Adjust behavior for field problems on AMD systems") Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit e1ab9a730b426fadc018f91b7c98412473e542fb Merge: 2734d6c1b1a08 d9c57d3ed52a9 Author: Michael Ellerman Date: Mon Jul 26 20:37:53 2021 +1000 Merge branch 'fixes' into next Merge our fixes branch, which contains some fixes that didn't make it into rc2 but which we'd like in next. commit 480e93e12aa04d857f7cc2e6fcec181c0d690404 Author: Harshvardhan Jha Date: Sun Jul 25 23:23:55 2021 +0530 net: xfrm: Fix end of loop tests for list_for_each_entry The list_for_each_entry() iterator, "pos" in this code, can never be NULL so the warning will never be printed. Signed-off-by: Harshvardhan Jha Signed-off-by: Steffen Klassert commit b4bde5554f70fb04ff07989fdc1356ab84d6f482 Author: Lucas De Marchi Date: Thu Jul 22 16:29:22 2021 -0700 drm/i915/display: split DISPLAY_VER 9 and 10 in intel_setup_outputs() Commit 5a9d38b20a5a ("drm/i915/display: hide workaround for broken vbt in intel_bios.c") moved the workaround for broken or missing VBT to intel_bios.c. However is_port_valid() only protects the handling of different skus of the same display version. Since in intel_setup_outputs() we share the code path with version 9, this would also create port F for SKL/KBL, which does not exist. Missing VBT can be reproduced when starting a headless QEMU with no opregion available. Avoid the issue by splitting versions 9 and 10 in intel_setup_outputs(), which also makes it more clear what code path it's taking for each version. v2: move generic display version after Geminilake since that one has a different set of outputs Fixes: 5a9d38b20a5a ("drm/i915/display: hide workaround for broken vbt in intel_bios.c") Cc: Jani Nikula Cc: Rodrigo Vivi Reported-by: Christoph Hellwig Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Reviewed-by: Matt Roper Tested-by: Christoph Hellwig Link: https://patchwork.freedesktop.org/patch/msgid/20210722232922.3796835-1-lucas.demarchi@intel.com (cherry picked from commit ec387b8ff8d757561369be9a280cf63f23bbb926) Signed-off-by: Rodrigo Vivi commit 5d3a618f356595f132ee85c63a1b5f007a71f23c Author: Lucas De Marchi Date: Fri Jul 23 16:43:52 2021 -0700 drm/i915: fix not reading DSC disable fuse in GLK We were using GRAPHICS_VER() to handle SKL_DFSM register, which means we were not handling GLK correctly since that has GRAPHICS_VER == 9, but DISPLAY_VER == 10. Switch the entire branch to check DISPLAY_VER which makes it more in line with Bspec. Even though the Bspec has an exception for RKL in TGL_DFSM_PIPE_D_DISABLE, we don't have to do anything as the bit has disable semantic and RKL doesn't have pipe D. Bspec: 50075, 7548 Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Cc: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210723234352.214459-1-lucas.demarchi@intel.com (cherry picked from commit 4fd177288a4ee046bd8590355a64de855dcf77e2) Signed-off-by: Rodrigo Vivi commit d7f237df53457cf0cbdb9943b9b7c93a05e2fdb6 Author: Rodrigo Vivi Date: Fri Jul 23 05:52:25 2021 -0400 drm/i915/bios: Fix ports mask PORT_A to PORT_F are regular integers defined in the enum port, while for_each_port_masked requires a bit mask for the ports. Current given mask: 0b111 Desired mask: 0b111111 I noticed this while Christoph was reporting a bug found on headless GVT configuration which bisect blamed commit 3ae04c0c7e63 ("drm/i915/bios: limit default outputs to ports A through F") v2: Avoid unnecessary line continuations as pointed by CI and Christoph Cc: Christoph Hellwig Fixes: 3ae04c0c7e63 ("drm/i915/bios: limit default outputs to ports A through F") Cc: Lucas De Marchi Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Tested-by: Christoph Hellwig Link: https://patchwork.freedesktop.org/patch/msgid/20210723095225.562913-1-rodrigo.vivi@intel.com (cherry picked from commit 9b52aa720168859526bf90d77fa210fc0336f170) Signed-off-by: Rodrigo Vivi commit fc520525c18ac2207792eb2067c6b626326a87ad Author: gushengxian Date: Fri Jul 2 05:48:12 2021 -0700 alpha: fix spelling mistakes Fix some spelling mistakes in comments: delarations ==> declarations softare ==> software suffiently ==> sufficiently requred ==> required unaliged ==> unaligned Signed-off-by: gushengxian Signed-off-by: Matt Turner commit 3e0c6d15adeafa2afcb4c95c892bb5980c1430e6 Author: gushengxian Date: Tue May 25 20:16:10 2021 -0700 alpha: Remove space between * and parameter name 'struct pcb_struct * pcb_va' should be 'struct pcb_struct *pcb_va'. Signed-off-by: gushengxian Signed-off-by: Matt Turner commit ee3e9fa29e8b2553097009dac270cbed0f03f6d2 Author: Arnd Bergmann Date: Fri May 14 23:37:20 2021 +0200 alpha: fp_emul: avoid init/cleanup_module names This is one of the last modules using the old calling conventions for module init/exit functions. Change it over to the style used everywhere else. Signed-off-by: Arnd Bergmann Signed-off-by: Matt Turner commit 15b9e384030cf34de33deed70d670a8dc0fc784a Author: He Zhe Date: Mon Apr 26 17:16:29 2021 +0800 alpha: Add syscall_get_return_value() audit now requires syscall_get_return_value instead of regs_return_value to retrieve syscall return code . Other architectures that support audit have already define this function. Signed-off-by: He Zhe Signed-off-by: Matt Turner commit 6208721f1399912a0a53c77ed86dcc25d3e20efb Author: David Hildenbrand Date: Tue Apr 20 19:56:31 2021 +0200 binfmt: remove support for em86 (alpha only) We have a fairly specific alpha binary loader in Linux: running x86 (i386, i486) binaries via the em86 [1] emulator. As noted in the Kconfig option, the same behavior can be achieved via binfmt_misc, for example, more nowadays used for running qemu-user. An example on how to get binfmt_misc running with em86 can be found in Documentation/admin-guide/binfmt-misc.rst The defconfig does not have CONFIG_BINFMT_EM86=y set. And doing a make defconfig && make olddefconfig results in # CONFIG_BINFMT_EM86 is not set ... as we don't seem to have any supported Linux distirbution for alpha anymore, there isn't really any "default" user of that feature anymore. Searching for "CONFIG_BINFMT_EM86=y" reveals mostly discussions from around 20 years ago, like [2] describing how to get netscape via em86 running via em86, or [3] discussing that running wine or installing Win 3.11 through em86 would be a nice feature. The latest binaries available for em86 are from 2000, version 2.2.1 [4] -- which translates to "unsupported"; further, em86 doesn't even work with glibc-2.x but only with glibc-2.0 [4, 5]. These are clear signs that there might not be too many em86 users out there, especially users relying on modern Linux kernels. Even though the code footprint is relatively small, let's just get rid of this blast from the past that's effectively unused. [1] http://ftp.dreamtime.org/pub/linux/Linux-Alpha/em86/v0.4/docs/em86.html [2] https://static.lwn.net/1998/1119/a/alpha-netscape.html [3] https://groups.google.com/g/linux.debian.alpha/c/AkGuQHeCe0Y [4] http://zeniv.linux.org.uk/pub/linux/alpha/em86/v2.2-1/relnotes.2.2.1.html [5] https://forum.teamspeak.com/archive/index.php/t-1477.html Cc: Alexander Viro Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: linux-fsdevel@vger.kernel.org Cc: linux-api@vger.kernel.org Cc: linux-alpha@vger.kernel.org Signed-off-by: David Hildenbrand Signed-off-by: Matt Turner commit 8f34ed9d959786e2f2a643a1237f69f0171911cf Author: tangchunyou Date: Wed Jan 20 21:34:10 2021 +0800 alpha: fix typos in a comment "kerne" -> "kernel" Signed-off-by: tangchunyou Signed-off-by: Matt Turner commit bfd736e3ffcc9dfc23c0a619fcc131eefd91d7ca Author: Corentin Labbe Date: Mon Jan 18 11:20:29 2021 +0000 alpha: defconfig: add necessary configs for boot testing Gentoo's KernelCI will soon boot test alpha kernel and we need CONFIG_DEVTMPFS=y to be set for that. Note that CONFIG_DEVTMPFS=y is already necessary for lot of other distribution/tools like recent udev/systemd. Signed-off-by: Corentin Labbe Signed-off-by: Matt Turner commit caace6ca4e06f09413fb8f8a63319594cfb7d47d Author: Prarit Bhargava Date: Tue Jan 5 10:16:27 2021 -0500 alpha: Send stop IPI to send to online CPUs This issue was noticed while debugging a shutdown issue where some secondary CPUs are not being shutdown correctly. A fix for that [1] requires that secondary cpus be offlined using the cpu_online_mask so that the stop operation is a no-op if CPU HOTPLUG is disabled. I, like the author in [1] looked at the architectures and found that alpha is one of two architectures that executes smp_send_stop() on all possible CPUs. On alpha, smp_send_stop() sends an IPI to all possible CPUs but only needs to send them to online CPUs. Send the stop IPI to only the online CPUs. [1] https://lkml.org/lkml/2020/1/10/250 Signed-off-by: Prarit Bhargava Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Matt Turner commit f0443da1d8560f4c664ab0f9a900ed69e9aaeb14 Author: Zheng Yongjun Date: Wed Dec 16 21:12:41 2020 +0800 alpha: convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: cba1ec7e88a0 ("alpha: switch to generic kernel_thread()") Signed-off-by: Zheng Yongjun Signed-off-by: Matt Turner commit 5e3c3a0ae5d194f0a464aaaa71d764d96f2e7245 Author: Chen Li Date: Tue Oct 13 14:31:52 2020 +0800 alpha: remove undef inline in compiler.h since 889b3c1245de48ed0cacf7aebb25c489d3e4a3e9, CONFIG_OPTIMIZE_INLINING is removed entirely and inline is always defined to `inline __gnu_inline __inline_maybe_unused notrace` in compiler_types.h Besides, undef inline here also means it never use __attribute__((__gnu_inline__)), so `extern inline` function can never be defined header files, otherwise multiple definition errors will happen, e.g. if multiple translation units use alpha/include/asm/pal.h will report multiple definitions, because there are many extern inline function definitions in this header. ``` c extern inline TYPE NAME(void) \ { \ register TYPE __r0 __asm__("$0"); \ __asm__ __volatile__( \ ... ``` Ofc, it is also ok to remove `extern` in `extern inline` here, then all of iso c99 and gnuc99/89 are ok, but there are also other alpha headers have such function definitions. Signed-off-by: chenli Signed-off-by: Matt Turner commit a09c33cbf3db545d44eab16eb528acf834310690 Author: Alexander A. Klimov Date: Mon Jul 13 11:43:41 2020 +0200 alpha: Kconfig: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Matt Turner commit d66cd5dea551e974580a64bf80b337b9a09ce63e Author: Bjorn Andersson Date: Sat Jul 24 20:02:14 2021 -0700 cpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev The Qualcomm SC8180x platform uses the qcom-cpufreq-hw driver, so it in the cpufreq-dt-platdev driver's blocklist. Signed-off-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit e4b016f4b44176807e545fd437cd519b6380e86f Author: Corentin Labbe Date: Fri Nov 8 15:36:08 2019 +0000 alpha: __udiv_qrnnd should be exported When building an alpha kernel with mpi set as module, I hit this build error: ERROR: "__udiv_qrnnd" [lib/mpi/mpi.ko] undefined! make[2]: *** [scripts/Makefile.modpost:92: __modpost] Error 1 make[1]: *** [Makefile:1266: modules] Error 2 This is due to __udiv_qrnnd not exported. Signed-off-by: Corentin Labbe Signed-off-by: Matt Turner commit 9f66861181e64dc192bea136da6c91528910002e Author: Randy Dunlap Date: Sun Jul 4 16:01:37 2021 -0700 m68k/coldfire: change pll var. to clk_pll DEFINE_CLK() makes the variable name be clk_xyz, so variable 'pll' should instead be 'clk_pll'. In file included from ../arch/m68k/coldfire/m525x.c:12: ../arch/m68k/coldfire/m525x.c:29:30: error: 'pll' undeclared here (not in a function) 29 | CLKDEV_INIT(NULL, "pll.0", &pll), | ^~~ ../include/linux/clkdev.h:30:10: note: in definition of macro 'CLKDEV_INIT' 30 | .clk = c, \ | ^ In file included from ../arch/m68k/coldfire/m525x.c:21: ../arch/m68k/include/asm/mcfclk.h:43:27: warning: 'clk_pll' defined but not used [-Wunused-variable] 43 | static struct clk clk_##clk_ref = { \ | ^~~~ ../arch/m68k/coldfire/m525x.c:25:1: note: in expansion of macro 'DEFINE_CLK' 25 | DEFINE_CLK(pll, "pll.0", MCF_CLK); | ^~~~~~~~~~ Fixes: 63aadb77669a ("m68k: coldfire: use clkdev_lookup on most coldfire") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Greg Ungerer Cc: linux-m68k@lists.linux-m68k.org Cc: uclinux-dev@uclinux.org Cc: Arnd Bergmann Signed-off-by: Greg Ungerer commit ff1176468d368232b684f75e82563369208bc371 Author: Linus Torvalds Date: Sun Jul 25 15:35:14 2021 -0700 Linux 5.14-rc3 commit 832df96d5f957d42fd9eb9660519a0c51fe8538e Merge: 795e3d2ea68e4 eacf078cf4c7a Author: David S. Miller Date: Sun Jul 25 23:06:21 2021 +0100 Merge branch 'sctp-pmtu-probe' Xin Long says: ==================== sctp: improve the pmtu probe in Search Complete state Timo recently suggested to use the loss of (data) packets as indication to send pmtu probe for Search Complete state, which should also be implied by RFC8899. This patchset is to change the current one that is doing probe with current pmtu all the time. v1->v2: - see Patch 2/2. ==================== Signed-off-by: David S. Miller commit eacf078cf4c7aa23e9591738511f142cc39b5186 Author: Xin Long Date: Sun Jul 25 13:42:51 2021 -0400 sctp: send pmtu probe only if packet loss in Search Complete state This patch is to introduce last_rtx_chunks into sctp_transport to detect if there's any packet retransmission/loss happened by checking against asoc's rtx_data_chunks in sctp_transport_pl_send(). If there is, namely, transport->last_rtx_chunks != asoc->rtx_data_chunks, the pmtu probe will be sent out. Otherwise, increment the pl.raise_count and return when it's in Search Complete state. With this patch, if in Search Complete state, which is a long period, it doesn't need to keep probing the current pmtu unless there's data packet loss. This will save quite some traffic. v1->v2: - add the missing Fixes tag. Fixes: 0dac127c0557 ("sctp: do black hole detection in search complete state") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 058e6e0ed0eace43401c945082dec1d669b5b231 Author: Xin Long Date: Sun Jul 25 13:42:50 2021 -0400 sctp: improve the code for pmtu probe send and recv update This patch does 3 things: - make sctp_transport_pl_send() and sctp_transport_pl_recv() return bool type to decide if more probe is needed to send. - pr_debug() only when probe is really needed to send. - count pl.raise_count in sctp_transport_pl_send() instead of sctp_transport_pl_recv(), and it's only incremented for the 1st probe for the same size. These are preparations for the next patch to make probes happen only when there's packet loss in Search Complete state. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 795e3d2ea68e489ee7039ac29e98bfea0e34a96c Author: Harshvardhan Jha Date: Sun Jul 25 23:28:04 2021 +0530 net: qede: Fix end of loop tests for list_for_each_entry The list_for_each_entry() iterator, "vlan" in this code, can never be NULL so the warning will never be printed. Signed-off-by: Harshvardhan Jha Signed-off-by: David S. Miller commit 44379b986424b02acfa6e8c85ec5d68d89d3ccc4 Author: Jagan Teki Date: Sun Jul 25 23:17:37 2021 +0530 drm/panel: panel-simple: Fix proper bpc for ytc700tlag_05_201c ytc700tlag_05_201c panel support 8 bpc not 6 bpc as per recent testing in i.MX8MM platform. Fix it. Fixes: 7a1f4fa4a629 ("drm/panel: simple: Add YTC700TLAG-05-201C") Signed-off-by: Jagan Teki Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210725174737.891106-1-jagan@amarulasolutions.com commit a1833a54033e4ca760ad58fa2a6469ad59b3fa1a Author: Linus Torvalds Date: Sun Jul 25 11:06:37 2021 -0700 smpboot: fix duplicate and misplaced inlining directive gcc doesn't care, but clang quite reasonably pointed out that the recent commit e9ba16e68cce ("smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining") did some really odd things: kernel/smpboot.c:50:20: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier] static inline void __always_inline idle_init(unsigned int cpu) ^ which not only has that duplicate inlining specifier, but the new __always_inline was put in the wrong place of the function definition. We put the storage class specifiers (ie things like "static" and "extern") first, and the type information after that. And while the compiler may not care, we put the inline specifier before the types. So it should be just static __always_inline void idle_init(unsigned int cpu) instead. Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Linus Torvalds commit 3c0ce1497a449b0d150b455628947152c5f6216a Merge: 12e9bd168c85b d9c57d3ed52a9 Author: Linus Torvalds Date: Sun Jul 25 10:33:48 2021 -0700 Merge tag 'powerpc-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix guest to host memory corruption in H_RTAS due to missing nargs check. - Fix guest triggerable host crashes due to bad handling of nested guest TM state. - Fix possible crashes due to incorrect reference counting in kvm_arch_vcpu_ioctl(). - Two commits fixing some regressions in KVM transactional memory handling introduced by the recent rework of the KVM code. Thanks to Nicholas Piggin, Alexey Kardashevskiy, and Michael Neuling. * tag 'powerpc-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Book3S HV Nested: Sanitise H_ENTER_NESTED TM state KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak KVM: PPC: Book3S: Fix CONFIG_TRANSACTIONAL_MEM=n crash KVM: PPC: Book3S HV P9: Fix guest TM support commit 12e9bd168c85b1e8a8ef2dd2cb34250f29656c71 Merge: d1b178254ca39 ff5a6a3550cef Author: Linus Torvalds Date: Sun Jul 25 10:27:44 2021 -0700 Merge tag 'timers-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A small set of timer related fixes: - Plug a race between rearm and process tick in the posix CPU timers code - Make the optimization to avoid recalculation of the next timer interrupt work correctly when there are no timers pending" * tag 'timers-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Fix get_next_timer_interrupt() with no timers pending posix-cpu-timers: Fix rearm racing against process tick commit d1b178254ca39a89b3c6407e29e87dd25734399e Merge: e049597e7ec11 e48a12e546ecb Author: Linus Torvalds Date: Sun Jul 25 10:21:19 2021 -0700 Merge tag 'locking-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 jump label fix from Thomas Gleixner: "A single fix for jump labels to prevent the compiler from agressive un-inlining which results in a section mismatch" * tag 'locking-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: jump_labels: Mark __jump_label_transform() as __always_inlined to work around aggressive compiler un-inlining commit e049597e7ec11fdc276d787d320b01ef1f647c4a Merge: 9041a4d2ee2f5 ddab1e71d2df3 Author: Linus Torvalds Date: Sun Jul 25 10:04:27 2021 -0700 Merge tag 'efi-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Thomas Gleixner: "A set of EFI fixes: - Prevent memblock and I/O reserved resources to get out of sync when EFI memreserve is in use. - Don't claim a non-existing table is invalid - Don't warn when firmware memory is already reserved correctly" * tag 'efi-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/mokvar: Reserve the table only if it is in boot services data efi/libstub: Fix the efi_load_initrd function description firmware/efi: Tell memblock about EFI iomem reservations efi/tpm: Differentiate missing and invalid final event log table. commit 9041a4d2ee2f551981689cb12066a872879f5d07 Merge: 04ca88d056b44 e9ba16e68cce2 Author: Linus Torvalds Date: Sun Jul 25 09:52:48 2021 -0700 Merge tag 'core-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fix from Thomas Gleixner: "A single update for the boot code to prevent aggressive un-inlining which causes a section mismatch" * tag 'core-urgent-2021-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining commit 04ca88d056b44efee1e7635c74c0be3705efc72c Merge: d8079fac16816 40ac971eab893 Author: Linus Torvalds Date: Sun Jul 25 09:46:17 2021 -0700 Merge tag 'dma-mapping-5.14-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: - handle vmalloc addresses in dma_common_{mmap,get_sgtable} (Roman Skakun) * tag 'dma-mapping-5.14-1' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: handle vmalloc addresses in dma_common_{mmap,get_sgtable} commit 7e4960b3d66d7248b23de3251118147812b42da2 Author: Jiapeng Chong Date: Fri Jul 23 18:36:09 2021 +0800 mlx4: Fix missing error code in mlx4_load_one() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'. Eliminate the follow smatch warning: drivers/net/ethernet/mellanox/mlx4/main.c:3538 mlx4_load_one() warn: missing error code 'err'. Reported-by: Abaci Robot Fixes: 7ae0e400cd93 ("net/mlx4_core: Flexible (asymmetric) allocation of EQs and MSI-X vectors for PF/VFs") Signed-off-by: Jiapeng Chong Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit ad4e1e48a6291f7fb53fbef38ca264966ffd65c9 Author: Kevin Lo Date: Fri Jul 23 21:59:27 2021 +0800 net: phy: broadcom: re-add check for PHY_BRCM_DIS_TXCRXC_NOENRGY on the BCM54811 PHY Restore PHY_ID_BCM54811 accidently removed by commit 5d4358ede8eb. Fixes: 5d4358ede8eb ("net: phy: broadcom: Allow BCM54210E to configure APD") Signed-off-by: Kevin Lo Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 149ea30fdd5c28b89a3bfdecfc75cdab1deddb14 Author: Parav Pandit Date: Fri Jul 23 17:56:00 2021 +0300 devlink: Fix phys_port_name of virtual port and merge error Merge commit cited in fixes tag was incorrect. Due to it phys_port_name of the virtual port resulted in incorrect name. Also the phys_port_name of the physical port was written twice due to the merge error. Fix it by removing the old code and inserting back the misplaced code. Related commits of interest in net and net-next branches that resulted in merge conflict are: in net-next branch: commit f285f37cb1e6 ("devlink: append split port number to the port name") in net branch: commit b28d8f0c25a9 ("devlink: Correct VIRTUAL port to not have phys_port attributes") Fixes: 126285651b7 ("Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net") Signed-off-by: Parav Pandit Reported-by: Niklas Schnelle Tested-by: Niklas Schnelle Signed-off-by: David S. Miller commit 4c85e57575fb9e6405d02d55aef8025c60abb824 Author: Hariprasad Kelam Date: Sun Jul 25 13:29:37 2021 +0530 octeontx2-pf: Dont enable backpressure on LBK links Avoid configure backpressure for LBK links as they don't support it and enable lmacs before configuration pause frames. Fixes: 75f36270990c ("octeontx2-pf: Support to enable/disable pause frames via ethtool") Signed-off-by: Geetha sowjanya Signed-off-by: Hariprasad Kelam Signed-off-by: David S. Miller commit 69f0aeb13bb548e2d5710a350116e03f0273302e Author: Geetha sowjanya Date: Sun Jul 25 13:29:03 2021 +0530 octeontx2-pf: Fix interface down flag on error In the existing code while changing the number of TX/RX queues using ethtool the PF/VF interface resources are freed and reallocated (otx2_stop and otx2_open is called) if the device is in running state. If any resource allocation fails in otx2_open, driver free already allocated resources and return. But again, when the number of queues changes as the device state still running oxt2_stop is called. In which we try to free already freed resources leading to driver crash. This patch fixes the issue by setting the INTF_DOWN flag on error and free the resources in otx2_stop only if the flag is not set. Fixes: 50fe6c02e5ad ("octeontx2-pf: Register and handle link notifications") Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit ac059d16442f30e6a9a95d41655153e01247e710 Author: Geetha sowjanya Date: Sun Jul 25 13:28:24 2021 +0530 octeontx2-af: Fix PKIND overlap between LBK and LMAC interfaces Currently PKINDs are not assigned to LBK channels. The default value of LBK_CHX_PKIND (channel to PKIND mapping) register is zero, which is resulting in a overlap of pkind between LBK and CGX LMACs. When KPU1 parser config is modified when PTP timestamping is enabled on the CGX LMAC interface it is impacting traffic on LBK interfaces as well. This patch fixes the issue by reserving the PKIND#0 for LBK devices. CGX mapped PF pkind starts from 1 and also fixes the max pkind available. Fixes: 421572175ba5 ("octeontx2-af: Support to enable/disable HW timestamping") Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit d8079fac168168b25677dc16c00ffaf9fb7df723 Merge: 6498f6151825f 488968a8945c1 Author: Linus Torvalds Date: Sat Jul 24 17:26:47 2021 -0700 Merge tag '5.14-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Five cifs/smb3 fixes, including a DFS failover fix, two fallocate fixes, and two trivial coverity cleanups" * tag '5.14-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix fallocate when trying to allocate a hole. CIFS: Clarify SMB1 code for POSIX delete file CIFS: Clarify SMB1 code for POSIX Create cifs: support share failover when remounting cifs: only write 64kb at a time when fallocating a small region of a file commit 6498f6151825f1e5aac5543fa9ea4ea218dcbe8c Merge: fc68f42aa737d ea196c548c0ac Author: Linus Torvalds Date: Sat Jul 24 15:34:04 2021 -0700 Merge tag 'riscv-for-linus-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - properly set the memory size, which fixes 32-bit systems - allow initrd to load anywhere in memory, rather that restricting it to the first 256MiB - fix the 'mem=' parameter on 64-bit systems to properly account for the maximum supported memory now that the kernel is outside the linear map - avoid installing mappings into the last 4KiB of memory, which conflicts with error values - avoid the stack from being freed while it is being walked - a handful of fixes to the new copy to/from user routines * tag 'riscv-for-linus-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: __asm_copy_to-from_user: Fix: Typos in comments riscv: __asm_copy_to-from_user: Remove unnecessary size check riscv: __asm_copy_to-from_user: Fix: fail on RV32 riscv: __asm_copy_to-from_user: Fix: overrun copy riscv: stacktrace: pin the task's stack in get_wchan riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE riscv: Make sure the linear mapping does not use the kernel mapping riscv: Fix memory_limit for 64-bit kernel RISC-V: load initrd wherever it fits into memory riscv: Fix 32-bit RISC-V boot failure commit fc68f42aa737dc15e7665a4101d4168aadb8e4c4 Author: Linus Torvalds Date: Sat Jul 24 15:25:54 2021 -0700 ACPI: fix NULL pointer dereference Commit 71f642833284 ("ACPI: utils: Fix reference counting in for_each_acpi_dev_match()") started doing "acpi_dev_put()" on a pointer that was possibly NULL. That fails miserably, because that helper inline function is not set up to handle that case. Just make acpi_dev_put() silently accept a NULL pointer, rather than calling down to put_device() with an invalid offset off that NULL pointer. Link: https://lore.kernel.org/lkml/a607c149-6bf6-0fd0-0e31-100378504da2@kernel.dk/ Reported-and-tested-by: Jens Axboe Tested-by: Daniel Scally Cc: Andy Shevchenko Signed-off-by: Linus Torvalds commit 7ffca2bb9d8bf6813db50364b1dd2c02f58fb65e Merge: 0ee818c393dce a47fa41381a09 Author: Linus Torvalds Date: Sat Jul 24 13:08:31 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four fixes, all in drivers, all of which can lead to user visible problems in certain situations" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: Fix NULL dereference on XCOPY completion scsi: mpt3sas: Transition IOC to Ready state during shutdown scsi: target: Fix protect handling in WRITE SAME(32) scsi: iscsi: Fix iface sysfs attr detection commit 0ee818c393dce98340bff2b08573d4d2d8650eb7 Merge: 4d4a60cede360 991468dcf198b Author: Linus Torvalds Date: Sat Jul 24 13:03:40 2021 -0700 Merge tag 'io_uring-5.14-2021-07-24' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Fix a memory leak due to a race condition in io_init_wq_offload (Yang) - Poll error handling fixes (Pavel) - Fix early fdput() regression (me) - Don't reissue iopoll requests off release path (me) - Add a safety check for io-wq queue off wrong path (me) * tag 'io_uring-5.14-2021-07-24' of git://git.kernel.dk/linux-block: io_uring: explicitly catch any illegal async queue attempt io_uring: never attempt iopoll reissue from release path io_uring: fix early fdput() of file io_uring: fix memleak in io_init_wq_offload() io_uring: remove double poll entry on arm failure io_uring: explicitly count entries for poll reqs commit 78d9d8005e4556448f398d876f29d0ca7ab8e398 Author: Jisheng Zhang Date: Fri Jul 16 21:40:51 2021 +0800 riscv: stacktrace: Fix NULL pointer dereference When CONFIG_FRAME_POINTER=y, calling dump_stack() can always trigger NULL pointer dereference panic similar as below: [ 0.396060] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc5+ #47 [ 0.396692] Hardware name: riscv-virtio,qemu (DT) [ 0.397176] Call Trace: [ 0.398191] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000960 [ 0.399487] Oops [#1] [ 0.399739] Modules linked in: [ 0.400135] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc5+ #47 [ 0.400570] Hardware name: riscv-virtio,qemu (DT) [ 0.400926] epc : walk_stackframe+0xc4/0xdc [ 0.401291] ra : dump_backtrace+0x30/0x38 [ 0.401630] epc : ffffffff80004922 ra : ffffffff8000496a sp : ffffffe000f3bd00 [ 0.402115] gp : ffffffff80cfdcb8 tp : ffffffe000f30000 t0 : ffffffff80d0b0cf [ 0.402602] t1 : ffffffff80d0b0c0 t2 : 0000000000000000 s0 : ffffffe000f3bd60 [ 0.403071] s1 : ffffffff808bc2e8 a0 : 0000000000001000 a1 : 0000000000000000 [ 0.403448] a2 : ffffffff803d7088 a3 : ffffffff808bc2e8 a4 : 6131725dbc24d400 [ 0.403820] a5 : 0000000000001000 a6 : 0000000000000002 a7 : ffffffffffffffff [ 0.404226] s2 : 0000000000000000 s3 : 0000000000000000 s4 : 0000000000000000 [ 0.404634] s5 : ffffffff803d7088 s6 : ffffffff808bc2e8 s7 : ffffffff80630650 [ 0.405085] s8 : ffffffff80912a80 s9 : 0000000000000008 s10: ffffffff804000fc [ 0.405388] s11: 0000000000000000 t3 : 0000000000000043 t4 : ffffffffffffffff [ 0.405616] t5 : 000000000000003d t6 : ffffffe000f3baa8 [ 0.405793] status: 0000000000000100 badaddr: 0000000000000960 cause: 000000000000000d [ 0.406135] [] walk_stackframe+0xc4/0xdc [ 0.407032] [] dump_backtrace+0x30/0x38 [ 0.407797] [] show_stack+0x40/0x4c [ 0.408234] [] dump_stack+0x90/0xb6 [ 0.409019] [] ptdump_init+0x20/0xc4 [ 0.409681] [] do_one_initcall+0x4c/0x226 [ 0.410110] [] kernel_init_freeable+0x1f4/0x258 [ 0.410562] [] kernel_init+0x22/0x148 [ 0.410959] [] ret_from_exception+0x0/0x14 [ 0.412241] ---[ end trace b2ab92c901b96251 ]--- [ 0.413099] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b The reason is the task is NULL when we finally call walk_stackframe() the NULL is passed from __dump_stack(): |static void __dump_stack(void) |{ | dump_stack_print_info(KERN_DEFAULT); | show_stack(NULL, NULL, KERN_DEFAULT); |} Fix this issue by checking "task == NULL" case in walk_stackframe(). Fixes: eac2f3059e02 ("riscv: stacktrace: fix the riscv stacktrace when CONFIG_FRAME_POINTER enabled") Signed-off-by: Jisheng Zhang Reviewed-by: Atish Patra Tested-by: Wende Tan Signed-off-by: Palmer Dabbelt commit 4d4a60cede3604208c671f5a73a6edd094237b13 Merge: 0823baef16468 7054133da39a8 Author: Linus Torvalds Date: Sat Jul 24 12:57:06 2021 -0700 Merge tag 'block-5.14-2021-07-24' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request (Christoph): - tracing fix (Keith Busch) - fix multipath head refcounting (Hannes Reinecke) - Write Zeroes vs PI fix (me) - drop a bogus WARN_ON (Zhihao Cheng) - Increase max blk-cgroup policy size, now that mq-deadline uses it too (Oleksandr) * tag 'block-5.14-2021-07-24' of git://git.kernel.dk/linux-block: nvme: set the PRACT bit when using Write Zeroes with T10 PI nvme: fix nvme_setup_command metadata trace event nvme: fix refcounting imbalance when all paths are down nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING block: increase BLKCG_MAX_POLS commit 0823baef164686c98d084b16877f271681e2377f Merge: bca1d4de39813 4a8ac5e45cdaa Author: Linus Torvalds Date: Sat Jul 24 12:55:06 2021 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two bugfixes for the I2C subsystem" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mpc: Poll for MCF misc: eeprom: at24: Always append device id even if label property is set. commit bca1d4de3981335754f04b557b84b75b9705b6bf Merge: f0fddcec6b625 e0f7e2b2f7e78 Author: Linus Torvalds Date: Sat Jul 24 12:27:16 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc mm fixes from Andrew Morton: "15 patches. VM subsystems affected by this patch series: userfaultfd, kfence, highmem, pagealloc, memblock, pagecache, secretmem, pagemap, and hugetlbfs" * akpm: hugetlbfs: fix mount mode command line processing mm: fix the deadlock in finish_fault() mm: mmap_lock: fix disabling preemption directly mm/secretmem: wire up ->set_page_dirty writeback, cgroup: do not reparent dax inodes writeback, cgroup: remove wb from offline list before releasing refcnt memblock: make for_each_mem_range() traverse MEMBLOCK_HOTPLUG regions mm: page_alloc: fix page_poison=1 / INIT_ON_ALLOC_DEFAULT_ON interaction mm: use kmap_local_page in memzero_page mm: call flush_dcache_page() in memcpy_to_page() and memzero_page() kfence: skip all GFP_ZONEMASK allocations kfence: move the size check to the beginning of __kfence_alloc() kfence: defer kfence_test_init to ensure that kunit debugfs is created selftest: use mmap instead of posix_memalign to allocate memory userfaultfd: do not untag user pointers commit 89bc7f456cd40e0be7b94f4fdae9186f22b76a05 Author: Michael Chan Date: Fri Jul 23 17:53:48 2021 -0400 bnxt_en: Add missing periodic PHC overflow check We use the timecounter APIs for the 48-bit PHC and packet timestamps. We must periodically update the timecounter at roughly half the overflow interval. The overflow interval is about 78 hours, so update it every 19 hours (1/4 interval) for some extra margins. Fixes: 390862f45c85 ("bnxt_en: Get the full 48-bit hardware timestamp periodically") Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 3cf4375a090473d240281a0d2b04a3a5aaeac34b Author: Xin Long Date: Fri Jul 23 18:46:01 2021 -0400 tipc: do not write skb_shinfo frags when doing decrytion One skb's skb_shinfo frags are not writable, and they can be shared with other skbs' like by pskb_copy(). To write the frags may cause other skb's data crash. So before doing en/decryption, skb_cow_data() should always be called for a cloned or nonlinear skb if req dst is using the same sg as req src. While at it, the likely branch can be removed, as it will be covered by skb_cow_data(). Note that esp_input() has the same issue, and I will fix it in another patch. tipc_aead_encrypt() doesn't have this issue, as it only processes linear data in the unlikely branch. Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication") Reported-by: Shuang Li Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit e394f1e3b13946b200935310ebdd5583cf374bba Merge: 5aa1959d18003 ef68a71796065 Author: David S. Miller Date: Sat Jul 24 19:33:23 2021 +0100 Merge tag 'linux-can-fixes-for-5.14-20210724' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can linux-can-fixes-for-5.14-20210724 Marc Kleine-Budde says: ==================== pull-request: can 2021-07-24 this is a pull request of 6 patches for net/master. The first patch is by Joakim Zhang targets the imx8mp device tree. It removes the imx6 fallback from the flexcan binding, as the imx6 is not compatible with the imx8mp. Ziyang Xuan contributes a patch to fix a use-after-free in the CAN raw's raw_setsockopt(). The next two patches target the CAN J1939 protocol. The first one is by Oleksij Rempel and clarifies the lifetime of session object in j1939_session_deactivate(). Zhang Changzhong's patch fixes the timeout value between consecutive TP.DT. Stephane Grosjean contributes a patch for the peak_usb driver to fix reading of the rxerr/txerr values. The last patch is by me for the mcp251xfd driver. It stops the timestamp worker in case of a fatal error in the IRQ handler. ==================== Signed-off-by: David S. Miller commit 84edec86f449adea9ee0b4912a79ab8d9d65abb7 Author: Chris Lesiak Date: Mon Jun 14 09:18:20 2021 -0500 iio: humidity: hdc100x: Add margin to the conversion time The datasheets have the following note for the conversion time specification: "This parameter is specified by design and/or characterization and it is not tested in production." Parts have been seen that require more time to do 14-bit conversions for the relative humidity channel. The result is ENXIO due to the address phase of a transfer not getting an ACK. Delay an additional 1 ms per conversion to allow for additional margin. Fixes: 4839367d99e3 ("iio: humidity: add HDC100x support") Signed-off-by: Chris Lesiak Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20210614141820.2034827-1-chris.lesiak@licor.com Cc: Signed-off-by: Jonathan Cameron commit ef68a717960658e6a1e5f08adb0574326e9a12c2 Author: Marc Kleine-Budde Date: Sat Apr 24 16:20:39 2021 +0200 can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ In case an error occurred in the IRQ handler, the chip status is dumped via devcoredump and all IRQs are disabled, but the chip stays powered for further analysis. The chip is in an undefined state and will not receive any CAN frames, so shut down the timestamping worker, which reads the TBC register regularly, too. This avoids any CRC read error messages if there is a communication problem with the chip. Fixes: efd8d98dfb90 ("can: mcp251xfd: add HW timestamp infrastructure") Link: https://lore.kernel.org/r/20210724155131.471303-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 590eb2b7d8cfafb27e8108d52d4bf4850626d31d Author: Stephane Grosjean Date: Fri Jun 25 15:09:29 2021 +0200 can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values This patch fixes an incorrect way of reading error counters in messages received for this purpose from the PCAN-USB interface. These messages inform about the increase or decrease of the error counters, whose values are placed in bytes 1 and 2 of the message data (not 0 and 1). Fixes: ea8b33bde76c ("can: pcan_usb: add support of rxerr/txerr counters") Link: https://lore.kernel.org/r/20210625130931.27438-4-s.grosjean@peak-system.com Cc: linux-stable Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit c6eea1c8bda56737752465a298dc6ce07d6b8ce3 Author: Zhang Changzhong Date: Tue Jul 6 19:00:08 2021 +0800 can: j1939: j1939_xtp_rx_dat_one(): fix rxtimer value between consecutive TP.DT to 750ms For receive side, the max time interval between two consecutive TP.DT should be 750ms. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/r/1625569210-47506-1-git-send-email-zhangchangzhong@huawei.com Cc: linux-stable Signed-off-by: Zhang Changzhong Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 0c71437dd50dd687c15d8ca80b3b68f10bb21d63 Author: Oleksij Rempel Date: Wed Jul 14 13:16:02 2021 +0200 can: j1939: j1939_session_deactivate(): clarify lifetime of session object The j1939_session_deactivate() is decrementing the session ref-count and potentially can free() the session. This would cause use-after-free situation. However, the code calling j1939_session_deactivate() does always hold another reference to the session, so that it would not be free()ed in this code path. This patch adds a comment to make this clear and a WARN_ON, to ensure that future changes will not violate this requirement. Further this patch avoids dereferencing the session pointer as a precaution to avoid use-after-free if the session is actually free()ed. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/r/20210714111602.24021-1-o.rempel@pengutronix.de Reported-by: Xiaochen Zou Signed-off-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 54f93336d000229f72c26d8a3f69dd256b744528 Author: Ziyang Xuan Date: Thu Jul 22 15:08:19 2021 +0800 can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF We get a bug during ltp can_filter test as following. =========================================== [60919.264984] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 [60919.265223] PGD 8000003dda726067 P4D 8000003dda726067 PUD 3dda727067 PMD 0 [60919.265443] Oops: 0000 [#1] SMP PTI [60919.265550] CPU: 30 PID: 3638365 Comm: can_filter Kdump: loaded Tainted: G W 4.19.90+ #1 [60919.266068] RIP: 0010:selinux_socket_sock_rcv_skb+0x3e/0x200 [60919.293289] RSP: 0018:ffff8d53bfc03cf8 EFLAGS: 00010246 [60919.307140] RAX: 0000000000000000 RBX: 000000000000001d RCX: 0000000000000007 [60919.320756] RDX: 0000000000000001 RSI: ffff8d5104a8ed00 RDI: ffff8d53bfc03d30 [60919.334319] RBP: ffff8d9338056800 R08: ffff8d53bfc29d80 R09: 0000000000000001 [60919.347969] R10: ffff8d53bfc03ec0 R11: ffffb8526ef47c98 R12: ffff8d53bfc03d30 [60919.350320] perf: interrupt took too long (3063 > 2500), lowering kernel.perf_event_max_sample_rate to 65000 [60919.361148] R13: 0000000000000001 R14: ffff8d53bcf90000 R15: 0000000000000000 [60919.361151] FS: 00007fb78b6b3600(0000) GS:ffff8d53bfc00000(0000) knlGS:0000000000000000 [60919.400812] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [60919.413730] CR2: 0000000000000010 CR3: 0000003e3f784006 CR4: 00000000007606e0 [60919.426479] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [60919.439339] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [60919.451608] PKRU: 55555554 [60919.463622] Call Trace: [60919.475617] [60919.487122] ? update_load_avg+0x89/0x5d0 [60919.498478] ? update_load_avg+0x89/0x5d0 [60919.509822] ? account_entity_enqueue+0xc5/0xf0 [60919.520709] security_sock_rcv_skb+0x2a/0x40 [60919.531413] sk_filter_trim_cap+0x47/0x1b0 [60919.542178] ? kmem_cache_alloc+0x38/0x1b0 [60919.552444] sock_queue_rcv_skb+0x17/0x30 [60919.562477] raw_rcv+0x110/0x190 [can_raw] [60919.572539] can_rcv_filter+0xbc/0x1b0 [can] [60919.582173] can_receive+0x6b/0xb0 [can] [60919.591595] can_rcv+0x31/0x70 [can] [60919.600783] __netif_receive_skb_one_core+0x5a/0x80 [60919.609864] process_backlog+0x9b/0x150 [60919.618691] net_rx_action+0x156/0x400 [60919.627310] ? sched_clock_cpu+0xc/0xa0 [60919.635714] __do_softirq+0xe8/0x2e9 [60919.644161] do_softirq_own_stack+0x2a/0x40 [60919.652154] [60919.659899] do_softirq.part.17+0x4f/0x60 [60919.667475] __local_bh_enable_ip+0x60/0x70 [60919.675089] __dev_queue_xmit+0x539/0x920 [60919.682267] ? finish_wait+0x80/0x80 [60919.689218] ? finish_wait+0x80/0x80 [60919.695886] ? sock_alloc_send_pskb+0x211/0x230 [60919.702395] ? can_send+0xe5/0x1f0 [can] [60919.708882] can_send+0xe5/0x1f0 [can] [60919.715037] raw_sendmsg+0x16d/0x268 [can_raw] It's because raw_setsockopt() concurrently with unregister_netdevice_many(). Concurrent scenario as following. cpu0 cpu1 raw_bind raw_setsockopt unregister_netdevice_many unlist_netdevice dev_get_by_index raw_notifier raw_enable_filters ...... can_rx_register can_rcv_list_find(..., net->can.rx_alldev_list) ...... sock_close raw_release(sock_a) ...... can_receive can_rcv_filter(net->can.rx_alldev_list, ...) raw_rcv(skb, sock_a) BUG After unlist_netdevice(), dev_get_by_index() return NULL in raw_setsockopt(). Function raw_enable_filters() will add sock and can_filter to net->can.rx_alldev_list. Then the sock is closed. Followed by, we sock_sendmsg() to a new vcan device use the same can_filter. Protocol stack match the old receiver whose sock has been released on net->can.rx_alldev_list in can_rcv_filter(). Function raw_rcv() uses the freed sock. UAF BUG is triggered. We can find that the key issue is that net_device has not been protected in raw_setsockopt(). Use rtnl_lock to protect net_device in raw_setsockopt(). Fixes: c18ce101f2e4 ("[CAN]: Add raw protocol") Link: https://lore.kernel.org/r/20210722070819.1048263-1-william.xuanziyang@huawei.com Cc: linux-stable Signed-off-by: Ziyang Xuan Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit f5d156c7bfab7d728b2fd35bc63eab12eda18125 Author: Joakim Zhang Date: Mon Jul 19 15:34:37 2021 +0800 arm64: dts: imx8mp: remove fallback compatible string for FlexCAN FlexCAN on i.MX8MP is not derived from i.MX6Q, instead reuses from i.MX8QM with extra ECC added and default is enabled, so that the FlexCAN would be put into freeze mode without FLEXCAN_QUIRK_DISABLE_MECR quirk. This patch removes "fsl,imx6q-flexcan" fallback compatible string since it's not compatible with the i.MX6Q. Link: https://lore.kernel.org/r/20210719073437.32078-1-qiangqing.zhang@nxp.com Signed-off-by: Joakim Zhang Reviewed-by: Fabio Estevam Signed-off-by: Marc Kleine-Budde commit 14a30238ecb8dcf52a9e2be514414e3ec443b536 Author: Maxime Ripard Date: Wed Jul 21 16:03:45 2021 +0200 dt-bindings: iio: st: Remove wrong items length check The original bindings was listing the length of the interrupts as either 1 or 2, depending on the setup. This is also what is enforced by the top level schema. However, that is further constrained with an if clause that require exactly two interrupts, even though it might not make sense on those devices or in some setups. Let's remove the clause entirely. Cc: Denis Ciocca Cc: Lars-Peter Clausen Fixes: 0cd71145803d ("iio: st-sensors: Update ST Sensor bindings") Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210721140424.725744-16-maxime@cerno.tech Signed-off-by: Jonathan Cameron commit 9f9decdb64c5cc05b66f7a6ede226dd90684570b Author: Arnd Bergmann Date: Wed Jul 21 17:13:20 2021 +0200 iio: accel: fxls8962af: fix i2c dependency With CONFIG_SPI=y and CONFIG_I2C=m, building fxls8962af into vmlinux causes a link error against the I2C module: aarch64-linux-ld: drivers/iio/accel/fxls8962af-core.o: in function `fxls8962af_fifo_flush': fxls8962af-core.c:(.text+0x3a0): undefined reference to `i2c_verify_client' Work around it by adding a Kconfig dependency that forces the SPI driver to be a loadable module whenever I2C is a module. Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210721151330.2176653-1-arnd@kernel.org Signed-off-by: Jonathan Cameron commit 4511781f95da0a3b2bad34f3f5e3967e80cd2d18 Author: chihhao.chen Date: Sat Jul 24 12:23:41 2021 +0800 ALSA: usb-audio: fix incorrect clock source setting The following scenario describes an echo test for Samsung USBC Headset (AKG) with VID/PID (0x04e8/0xa051). We first start a capture stream(USB IN transfer) in 96Khz/24bit/1ch mode. In clock find source function, we get value 0x2 for clock selector and 0x1 for clock source. Kernel-4.14 behavior Since clock source is valid so clock selector was not set again. We pass through this function and start a playback stream(USB OUT transfer) in 48Khz/32bit/2ch mode. This time we get value 0x1 for clock selector and 0x1 for clock source. Finally clock id with this setting is 0x9. Kernel-5.10 behavior Clock selector was always set one more time even it is valid. When we start a playback stream, we will get 0x2 for clock selector and 0x1 for clock source. In this case clock id becomes 0xA. This is an incorrect clock source setting and results in severe noises. We see wrong data rate in USB IN transfer. (From 288 bytes/ms becomes 144 bytes/ms) It should keep in 288 bytes/ms. This earphone works fine on older kernel version load because this is a newly-added behavior. Fixes: d2e8f641257d ("ALSA: usb-audio: Explicitly set up the clock selector") Signed-off-by: chihhao.chen Link: https://lore.kernel.org/r/1627100621-19225-1-git-send-email-chihhao.chen@mediatek.com Signed-off-by: Takashi Iwai commit 2b8b12be9b9752c36efda38b7dd5d83d790d01d8 Author: Geoffrey D. Bennett Date: Fri Jul 23 05:43:26 2021 +0930 ALSA: scarlett2: Fix line out/speaker switching notifications The values of the line output controls can change when the SW/HW switches are set to HW, and also when speaker switching is enabled. These notifications were sent with a mask of only SNDRV_CTL_EVENT_MASK_INFO. Change the notifications to set the SNDRV_CTL_EVENT_MASK_VALUE mask bit as well. When the mute control is updated, the notification was sent with a mask of SNDRV_CTL_EVENT_MASK_INFO. Change the mask to the correct value of SNDRV_CTL_EVENT_MASK_VALUE. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/8192e15ba62fa4bc90425c005f265c0de530be20.1626959758.git.g@b4.vu Signed-off-by: Takashi Iwai commit 9ee0fc8366ddce380547878640708f1bd7dd2ead Author: Geoffrey D. Bennett Date: Fri Jul 23 05:42:48 2021 +0930 ALSA: scarlett2: Correct channel mute status after mute button pressed After the hardware mute button is pressed, private->vol_updated is set so that the mute status is invalidated. As the channel mute values may be affected by the global mute value, update scarlett2_mute_ctl_get() to call scarlett2_update_volumes() if private->vol_updated is set. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/aa18ddbf8d8bd7f31832ab1b6b6057c00b931202.1626959758.git.g@b4.vu Signed-off-by: Takashi Iwai commit d3a4f784d20c696b134b916f57956f12a37ecd47 Author: Geoffrey D. Bennett Date: Fri Jul 23 05:42:08 2021 +0930 ALSA: scarlett2: Fix Direct Monitor control name for 2i2 The Direct Monitor control for the 2i2 is an enumerated value, not a boolean. Fix the control name to say "Playback Enum" instead of "Playback Switch" in this case. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/faf5de1d2100038e7d07520d770fda4a1adc276a.1626959758.git.g@b4.vu Signed-off-by: Takashi Iwai commit cdf72837cda89b2d38bd18fbe6cc591c1d5f2416 Author: Geoffrey D. Bennett Date: Fri Jul 23 05:41:53 2021 +0930 ALSA: scarlett2: Fix Mute/Dim/MSD Mode control names Append "Playback Switch" to the names of "Mute" and "Dim" controls, and append "Switch" to the "MSD Mode" control as per Documentation/sound/designs/control-names.rst. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/77f1000652c37e3217fb8dad8e156bc6392abc0b.1626959758.git.g@b4.vu Signed-off-by: Takashi Iwai commit ea196c548c0ac407afd31d142712b6da8bd00244 Author: Akira Tsukamoto Date: Tue Jul 20 17:53:23 2021 +0900 riscv: __asm_copy_to-from_user: Fix: Typos in comments Fixing typos and grammar mistakes and using more intuitive label name. Signed-off-by: Akira Tsukamoto Fixes: ca6eaaa210de ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall") Signed-off-by: Palmer Dabbelt commit d4b3e0105e3c2411af666a50b1bf2d25656a5e83 Author: Akira Tsukamoto Date: Tue Jul 20 17:52:36 2021 +0900 riscv: __asm_copy_to-from_user: Remove unnecessary size check Clean up: The size of 0 will be evaluated in the next step. Not required here. Signed-off-by: Akira Tsukamoto Fixes: ca6eaaa210de ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall") Signed-off-by: Palmer Dabbelt commit 22b5f16ffeff38938ad7420a2bfa3c281c36fd17 Author: Akira Tsukamoto Date: Tue Jul 20 17:51:45 2021 +0900 riscv: __asm_copy_to-from_user: Fix: fail on RV32 Had a bug when converting bytes to bits when the cpu was rv32. The a3 contains the number of bytes and multiple of 8 would be the bits. The LGREG is holding 2 for RV32 and 3 for RV32, so to achieve multiple of 8 it must always be constant 3. The 2 was mistakenly used for rv32. Signed-off-by: Akira Tsukamoto Fixes: ca6eaaa210de ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall") Signed-off-by: Palmer Dabbelt commit 6010d300f9f7e16d1bf327b4730bcd0c0886d9e6 Author: Akira Tsukamoto Date: Tue Jul 20 17:50:52 2021 +0900 riscv: __asm_copy_to-from_user: Fix: overrun copy There were two causes for the overrun memory access. The threshold size was too small. The aligning dst require one SZREG and unrolling word copy requires 8*SZREG, total have to be at least 9*SZREG. Inside the unrolling copy, the subtracting -(8*SZREG-1) would make iteration happening one extra loop. Proper value is -(8*SZREG). Signed-off-by: Akira Tsukamoto Fixes: ca6eaaa210de ("riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall") Signed-off-by: Palmer Dabbelt commit e0f7e2b2f7e7864238a4eea05cc77ae1be2bf784 Author: Mike Kravetz Date: Fri Jul 23 15:50:44 2021 -0700 hugetlbfs: fix mount mode command line processing In commit 32021982a324 ("hugetlbfs: Convert to fs_context") processing of the mount mode string was changed from match_octal() to fsparam_u32. This changed existing behavior as match_octal does not require octal values to have a '0' prefix, but fsparam_u32 does. Use fsparam_u32oct which provides the same behavior as match_octal. Link: https://lkml.kernel.org/r/20210721183326.102716-1-mike.kravetz@oracle.com Fixes: 32021982a324 ("hugetlbfs: Convert to fs_context") Signed-off-by: Mike Kravetz Reported-by: Dennis Camera Reviewed-by: Matthew Wilcox (Oracle) Cc: David Howells Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4dc3489143f84f7ed30be58b886bb6772f229b9 Author: Qi Zheng Date: Fri Jul 23 15:50:41 2021 -0700 mm: fix the deadlock in finish_fault() Commit 63f3655f9501 ("mm, memcg: fix reclaim deadlock with writeback") fix the following ABBA deadlock by pre-allocating the pte page table without holding the page lock. lock_page(A) SetPageWriteback(A) unlock_page(A) lock_page(B) lock_page(B) pte_alloc_one shrink_page_list wait_on_page_writeback(A) SetPageWriteback(B) unlock_page(B) # flush A, B to clear the writeback Commit f9ce0be71d1f ("mm: Cleanup faultaround and finish_fault() codepaths") reworked the relevant code but ignored this race. This will cause the deadlock above to appear again, so fix it. Link: https://lkml.kernel.org/r/20210721074849.57004-1-zhengqi.arch@bytedance.com Fixes: f9ce0be71d1f ("mm: Cleanup faultaround and finish_fault() codepaths") Signed-off-by: Qi Zheng Acked-by: Kirill A. Shutemov Cc: Thomas Gleixner Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Muchun Song Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e904c2ccf9b5cb356eec754ffea05c08984f6535 Author: Muchun Song Date: Fri Jul 23 15:50:38 2021 -0700 mm: mmap_lock: fix disabling preemption directly Commit 832b50725373 ("mm: mmap_lock: use local locks instead of disabling preemption") fixed a bug by using local locks. But commit d01079f3d0c0 ("mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations") changed those lines back to the original version. I guess it was introduced by fixing conflicts. Link: https://lkml.kernel.org/r/20210720074228.76342-1-songmuchun@bytedance.com Fixes: d01079f3d0c0 ("mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations") Signed-off-by: Muchun Song Acked-by: Mel Gorman Reviewed-by: Yang Shi Reviewed-by: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af64237461910f4c7365d367291d1c4f20c18769 Author: Mike Rapoport Date: Fri Jul 23 15:50:35 2021 -0700 mm/secretmem: wire up ->set_page_dirty Make secretmem up to date with the changes done in commit 0af573780b0b ("mm: require ->set_page_dirty to be explicitly wired up") so that unconditional call to this method won't cause crashes. Link: https://lkml.kernel.org/r/20210716063933.31633-1-rppt@kernel.org Fixes: 0af573780b0b ("mm: require ->set_page_dirty to be explicitly wired up") Signed-off-by: Mike Rapoport Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 593311e85b26ecc6e4d45b6fb81b942b6672df09 Author: Roman Gushchin Date: Fri Jul 23 15:50:32 2021 -0700 writeback, cgroup: do not reparent dax inodes The inode switching code is not suited for dax inodes. An attempt to switch a dax inode to a parent writeback structure (as a part of a writeback cleanup procedure) results in a panic like this: run fstests generic/270 at 2021-07-15 05:54:02 XFS (pmem0p2): EXPERIMENTAL big timestamp feature in use. Use at your own risk! XFS (pmem0p2): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (pmem0p2): EXPERIMENTAL inode btree counters feature in use. Use at your own risk! XFS (pmem0p2): Mounting V5 Filesystem XFS (pmem0p2): Ending clean mount XFS (pmem0p2): Quotacheck needed: Please wait. XFS (pmem0p2): Quotacheck: Done. XFS (pmem0p2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) XFS (pmem0p2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) XFS (pmem0p2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) BUG: unable to handle page fault for address: 0000000005b0f669 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 13 PID: 10479 Comm: kworker/13:16 Not tainted 5.14.0-rc1-master-8096acd7442e+ #8 Hardware name: HP ProLiant DL360 Gen9/ProLiant DL360 Gen9, BIOS P89 09/13/2016 Workqueue: inode_switch_wbs inode_switch_wbs_work_fn RIP: 0010:inode_do_switch_wbs+0xaf/0x470 Code: 00 30 0f 85 c1 03 00 00 0f 1f 44 00 00 31 d2 48 c7 c6 ff ff ff ff 48 8d 7c 24 08 e8 eb 49 1a 00 48 85 c0 74 4a bb ff ff ff ff <48> 8b 50 08 48 8d 4a ff 83 e2 01 48 0f 45 c1 48 8b 00 a8 08 0f 85 RSP: 0018:ffff9c66691abdc8 EFLAGS: 00010002 RAX: 0000000005b0f661 RBX: 00000000ffffffff RCX: ffff89e6a21382b0 RDX: 0000000000000001 RSI: ffff89e350230248 RDI: ffffffffffffffff RBP: ffff89e681d19400 R08: 0000000000000000 R09: 0000000000000228 R10: ffffffffffffffff R11: ffffffffffffffc0 R12: ffff89e6a2138130 R13: ffff89e316af7400 R14: ffff89e316af6e78 R15: ffff89e6a21382b0 FS: 0000000000000000(0000) GS:ffff89ee5fb40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000005b0f669 CR3: 0000000cb2410004 CR4: 00000000001706e0 Call Trace: inode_switch_wbs_work_fn+0xb6/0x2a0 process_one_work+0x1e6/0x380 worker_thread+0x53/0x3d0 kthread+0x10f/0x130 ret_from_fork+0x22/0x30 Modules linked in: 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 nft_counter nf_tables nfnetlink bridge stp llc rfkill sunrpc intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel ipmi_ssif kvm mgag200 i2c_algo_bit iTCO_wdt irqbypass drm_kms_helper iTCO_vendor_support acpi_ipmi rapl syscopyarea sysfillrect intel_cstate ipmi_si sysimgblt ioatdma dax_pmem_compat fb_sys_fops ipmi_devintf device_dax i2c_i801 pcspkr intel_uncore hpilo nd_pmem cec dax_pmem_core dca i2c_smbus acpi_tad lpc_ich ipmi_msghandler acpi_power_meter drm fuse xfs libcrc32c sd_mod t10_pi crct10dif_pclmul crc32_pclmul crc32c_intel tg3 ghash_clmulni_intel serio_raw hpsa hpwdt scsi_transport_sas wmi dm_mirror dm_region_hash dm_log dm_mod CR2: 0000000005b0f669 ---[ end trace ed2105faff8384f3 ]--- RIP: 0010:inode_do_switch_wbs+0xaf/0x470 Code: 00 30 0f 85 c1 03 00 00 0f 1f 44 00 00 31 d2 48 c7 c6 ff ff ff ff 48 8d 7c 24 08 e8 eb 49 1a 00 48 85 c0 74 4a bb ff ff ff ff <48> 8b 50 08 48 8d 4a ff 83 e2 01 48 0f 45 c1 48 8b 00 a8 08 0f 85 RSP: 0018:ffff9c66691abdc8 EFLAGS: 00010002 RAX: 0000000005b0f661 RBX: 00000000ffffffff RCX: ffff89e6a21382b0 RDX: 0000000000000001 RSI: ffff89e350230248 RDI: ffffffffffffffff RBP: ffff89e681d19400 R08: 0000000000000000 R09: 0000000000000228 R10: ffffffffffffffff R11: ffffffffffffffc0 R12: ffff89e6a2138130 R13: ffff89e316af7400 R14: ffff89e316af6e78 R15: ffff89e6a21382b0 FS: 0000000000000000(0000) GS:ffff89ee5fb40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000005b0f669 CR3: 0000000cb2410004 CR4: 00000000001706e0 Kernel panic - not syncing: Fatal exception Kernel Offset: 0x15200000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ---[ end Kernel panic - not syncing: Fatal exception ]--- The crash happens on an attempt to iterate over attached pagecache pages and check the dirty flag: a dax inode's xarray contains pfn's instead of generic struct page pointers. This happens for DAX and not for other kinds of non-page entries in the inodes because it's a tagged iteration, and shadow/swap entries are never tagged; only DAX entries get tagged. Fix the problem by bailing out (with the false return value) of inode_prepare_sbs_switch() if a dax inode is passed. [willy@infradead.org: changelog addition] Link: https://lkml.kernel.org/r/20210719171350.3876830-1-guro@fb.com Fixes: c22d70a162d3 ("writeback, cgroup: release dying cgwbs by switching attached inodes") Signed-off-by: Roman Gushchin Reported-by: Murphy Zhou Reported-by: Darrick J. Wong Tested-by: Darrick J. Wong Tested-by: Murphy Zhou Acked-by: Matthew Wilcox (Oracle) Cc: Jan Kara Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b43a9e76b4cc78cdaa8c809dd31cd452797b7661 Author: Roman Gushchin Date: Fri Jul 23 15:50:29 2021 -0700 writeback, cgroup: remove wb from offline list before releasing refcnt Boyang reported that the commit c22d70a162d3 ("writeback, cgroup: release dying cgwbs by switching attached inodes") causes the kernel to crash while running xfstests generic/256 on ext4 on aarch64 and ppc64le. run fstests generic/256 at 2021-07-12 05:41:40 EXT4-fs (vda3): mounted filesystem with ordered data mode. Opts: . Quota mode: none. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Mem abort info: ESR = 0x96000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005 CM = 0, WnR = 0 user pgtable: 64k pages, 48-bit VAs, pgdp=00000000b0502000 [0000000000000000] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 Internal error: Oops: 96000005 [#1] SMP Modules linked in: dm_flakey dm_snapshot dm_bufio dm_zero dm_mod loop tls rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs rfkill sunrpc ext4 vfat fat mbcache jbd2 drm fuse xfs libcrc32c crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_blk virtio_net net_failover virtio_console failover virtio_mmio aes_neon_bs [last unloaded: scsi_debug] CPU: 0 PID: 408468 Comm: kworker/u8:5 Tainted: G X --------- --- 5.14.0-0.rc1.15.bx.el9.aarch64 #1 Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 Workqueue: events_unbound cleanup_offline_cgwbs_workfn pstate: 004000c5 (nzcv daIF +PAN -UAO -TCO BTYPE=--) pc : cleanup_offline_cgwbs_workfn+0x320/0x394 lr : cleanup_offline_cgwbs_workfn+0xe0/0x394 sp : ffff80001554fd10 x29: ffff80001554fd10 x28: 0000000000000000 x27: 0000000000000001 x26: 0000000000000000 x25: 00000000000000e0 x24: ffffd2a2fbe671a8 x23: ffff80001554fd88 x22: ffffd2a2fbe67198 x21: ffffd2a2fc25a730 x20: ffff210412bc3000 x19: ffff210412bc3280 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000030 x12: 0000000000000040 x11: ffff210481572238 x10: ffff21048157223a x9 : ffffd2a2fa276c60 x8 : ffff210484106b60 x7 : 0000000000000000 x6 : 000000000007d18a x5 : ffff210416a86400 x4 : ffff210412bc0280 x3 : 0000000000000000 x2 : ffff80001554fd88 x1 : ffff210412bc0280 x0 : 0000000000000003 Call trace: cleanup_offline_cgwbs_workfn+0x320/0x394 process_one_work+0x1f4/0x4b0 worker_thread+0x184/0x540 kthread+0x114/0x120 ret_from_fork+0x10/0x18 Code: d63f0020 97f99963 17ffffa6 f8588263 (f9400061) ---[ end trace e250fe289272792a ]--- Kernel panic - not syncing: Oops: Fatal exception SMP: stopping secondary CPUs SMP: failed to stop secondary CPUs 0-2 Kernel Offset: 0x52a2e9fa0000 from 0xffff800010000000 PHYS_OFFSET: 0xfff0defca0000000 CPU features: 0x00200251,23200840 Memory Limit: none ---[ end Kernel panic - not syncing: Oops: Fatal exception ]--- The problem happens when cgwb_release_workfn() races with cleanup_offline_cgwbs_workfn(): wb_tryget() in cleanup_offline_cgwbs_workfn() can be called after percpu_ref_exit() is cgwb_release_workfn(), which is basically a use-after-free error. Fix the problem by making removing the writeback structure from the offline list before releasing the percpu reference counter. It will guarantee that cleanup_offline_cgwbs_workfn() will not see and not access writeback structures which are about to be released. Link: https://lkml.kernel.org/r/20210716201039.3762203-1-guro@fb.com Fixes: c22d70a162d3 ("writeback, cgroup: release dying cgwbs by switching attached inodes") Signed-off-by: Roman Gushchin Reported-by: Boyang Xue Suggested-by: Jan Kara Tested-by: Darrick J. Wong Cc: Will Deacon Cc: Dave Chinner Cc: Murphy Zhou Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79e482e9c3ae86e849c701c846592e72baddda5a Author: Mike Rapoport Date: Fri Jul 23 15:50:26 2021 -0700 memblock: make for_each_mem_range() traverse MEMBLOCK_HOTPLUG regions Commit b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()") didn't take into account that when there is movable_node parameter in the kernel command line, for_each_mem_range() would skip ranges marked with MEMBLOCK_HOTPLUG. The page table setup code in POWER uses for_each_mem_range() to create the linear mapping of the physical memory and since the regions marked as MEMORY_HOTPLUG are skipped, they never make it to the linear map. A later access to the memory in those ranges will fail: BUG: Unable to handle kernel data access on write at 0xc000000400000000 Faulting instruction address: 0xc00000000008a3c0 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 0 PID: 53 Comm: kworker/u2:0 Not tainted 5.13.0 #7 NIP: c00000000008a3c0 LR: c0000000003c1ed8 CTR: 0000000000000040 REGS: c000000008a57770 TRAP: 0300 Not tainted (5.13.0) MSR: 8000000002009033 CR: 84222202 XER: 20040000 CFAR: c0000000003c1ed4 DAR: c000000400000000 DSISR: 42000000 IRQMASK: 0 GPR00: c0000000003c1ed8 c000000008a57a10 c0000000019da700 c000000400000000 GPR04: 0000000000000280 0000000000000180 0000000000000400 0000000000000200 GPR08: 0000000000000100 0000000000000080 0000000000000040 0000000000000300 GPR12: 0000000000000380 c000000001bc0000 c0000000001660c8 c000000006337e00 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000040000000 0000000020000000 c000000001a81990 c000000008c30000 GPR24: c000000008c20000 c000000001a81998 000fffffffff0000 c000000001a819a0 GPR28: c000000001a81908 c00c000001000000 c000000008c40000 c000000008a64680 NIP clear_user_page+0x50/0x80 LR __handle_mm_fault+0xc88/0x1910 Call Trace: __handle_mm_fault+0xc44/0x1910 (unreliable) handle_mm_fault+0x130/0x2a0 __get_user_pages+0x248/0x610 __get_user_pages_remote+0x12c/0x3e0 get_arg_page+0x54/0xf0 copy_string_kernel+0x11c/0x210 kernel_execve+0x16c/0x220 call_usermodehelper_exec_async+0x1b0/0x2f0 ret_from_kernel_thread+0x5c/0x70 Instruction dump: 79280fa4 79271764 79261f24 794ae8e2 7ca94214 7d683a14 7c893a14 7d893050 7d4903a6 60000000 60000000 60000000 <7c001fec> 7c091fec 7c081fec 7c051fec ---[ end trace 490b8c67e6075e09 ]--- Making for_each_mem_range() include MEMBLOCK_HOTPLUG regions in the traversal fixes this issue. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1976100 Link: https://lkml.kernel.org/r/20210712071132.20902-1-rppt@kernel.org Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Signed-off-by: Mike Rapoport Tested-by: Greg Kurz Reviewed-by: David Hildenbrand Cc: [5.10+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69e5d322a2fb86173fde8bad26e8eb38cad1b1e9 Author: Sergei Trofimovich Date: Fri Jul 23 15:50:23 2021 -0700 mm: page_alloc: fix page_poison=1 / INIT_ON_ALLOC_DEFAULT_ON interaction To reproduce the failure we need the following system: - kernel command: page_poison=1 init_on_free=0 init_on_alloc=0 - kernel config: * CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y * CONFIG_INIT_ON_FREE_DEFAULT_ON=y * CONFIG_PAGE_POISONING=y Resulting in: 0000000085629bdd: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000000022861832: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000000c597f5b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ CPU: 11 PID: 15195 Comm: bash Kdump: loaded Tainted: G U O 5.13.1-gentoo-x86_64 #1 Hardware name: System manufacturer System Product Name/PRIME Z370-A, BIOS 2801 01/13/2021 Call Trace: dump_stack+0x64/0x7c __kernel_unpoison_pages.cold+0x48/0x84 post_alloc_hook+0x60/0xa0 get_page_from_freelist+0xdb8/0x1000 __alloc_pages+0x163/0x2b0 __get_free_pages+0xc/0x30 pgd_alloc+0x2e/0x1a0 mm_init+0x185/0x270 dup_mm+0x6b/0x4f0 copy_process+0x190d/0x1b10 kernel_clone+0xba/0x3b0 __do_sys_clone+0x8f/0xb0 do_syscall_64+0x68/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Before commit 51cba1ebc60d ("init_on_alloc: Optimize static branches") init_on_alloc never enabled static branch by default. It could only be enabed explicitly by init_mem_debugging_and_hardening(). But after commit 51cba1ebc60d, a static branch could already be enabled by default. There was no code to ever disable it. That caused page_poison=1 / init_on_free=1 conflict. This change extends init_mem_debugging_and_hardening() to also disable static branch disabling. Link: https://lkml.kernel.org/r/20210714031935.4094114-1-keescook@chromium.org Link: https://lore.kernel.org/r/20210712215816.1512739-1-slyfox@gentoo.org Fixes: 51cba1ebc60d ("init_on_alloc: Optimize static branches") Signed-off-by: Sergei Trofimovich Signed-off-by: Kees Cook Co-developed-by: Kees Cook Reported-by: Mikhail Morfikov Reported-by: Tested-by: Reviewed-by: David Hildenbrand Cc: Alexander Potapenko Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9a42b53bdf7b0329dc09a59fc1b092640b6da19 Author: Christoph Hellwig Date: Fri Jul 23 15:50:20 2021 -0700 mm: use kmap_local_page in memzero_page The commit message introducing the global memzero_page explicitly mentions switching to kmap_local_page in the commit log but doesn't actually do that. Link: https://lkml.kernel.org/r/20210713055231.137602-3-hch@lst.de Fixes: 28961998f858 ("iov_iter: lift memzero_page() to highmem.h") Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Ira Weiny Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8dad53a11f8d94dceb540a5f8f153484f42be84b Author: Christoph Hellwig Date: Fri Jul 23 15:50:17 2021 -0700 mm: call flush_dcache_page() in memcpy_to_page() and memzero_page() memcpy_to_page and memzero_page can write to arbitrary pages, which could be in the page cache or in high memory, so call flush_kernel_dcache_pages to flush the dcache. This is a problem when using these helpers on dcache challeneged architectures. Right now there are just a few users, chances are no one used the PC floppy driver, the aha1542 driver for an ISA SCSI HBA, and a few advanced and optional btrfs and ext4 features on those platforms yet since the conversion. Link: https://lkml.kernel.org/r/20210713055231.137602-2-hch@lst.de Fixes: bb90d4bc7b6a ("mm/highmem: Lift memcpy_[to|from]_page to core") Fixes: 28961998f858 ("iov_iter: lift memzero_page() to highmem.h") Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Cc: Chaitanya Kulkarni Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 236e9f1538523d3d380dda1cc99571d587058f37 Author: Alexander Potapenko Date: Fri Jul 23 15:50:14 2021 -0700 kfence: skip all GFP_ZONEMASK allocations Allocation requests outside ZONE_NORMAL (MOVABLE, HIGHMEM or DMA) cannot be fulfilled by KFENCE, because KFENCE memory pool is located in a zone different from the requested one. Because callers of kmem_cache_alloc() may actually rely on the allocation to reside in the requested zone (e.g. memory allocations done with __GFP_DMA must be DMAable), skip all allocations done with GFP_ZONEMASK and/or respective SLAB flags (SLAB_CACHE_DMA and SLAB_CACHE_DMA32). Link: https://lkml.kernel.org/r/20210714092222.1890268-2-glider@google.com Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure") Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Acked-by: Souptick Joarder Cc: Dmitry Vyukov Cc: Greg Kroah-Hartman Cc: Souptick Joarder Cc: [5.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 235a85cb32bb123854ad31de46fdbf04c1d57cda Author: Alexander Potapenko Date: Fri Jul 23 15:50:11 2021 -0700 kfence: move the size check to the beginning of __kfence_alloc() Check the allocation size before toggling kfence_allocation_gate. This way allocations that can't be served by KFENCE will not result in waiting for another CONFIG_KFENCE_SAMPLE_INTERVAL without allocating anything. Link: https://lkml.kernel.org/r/20210714092222.1890268-1-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Marco Elver Reviewed-by: Marco Elver Cc: Dmitry Vyukov Cc: Marco Elver Cc: Greg Kroah-Hartman Cc: [5.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32ae8a0669392248a92d7545a7363004543f3932 Author: Weizhao Ouyang Date: Fri Jul 23 15:50:08 2021 -0700 kfence: defer kfence_test_init to ensure that kunit debugfs is created kfence_test_init and kunit_init both use the same level late_initcall, which means if kfence_test_init linked ahead of kunit_init, kfence_test_init will get a NULL debugfs_rootdir as parent dentry, then kfence_test_init and kfence_debugfs_init both create a debugfs node named "kfence" under debugfs_mount->mnt_root, and it will throw out "debugfs: Directory 'kfence' with parent '/' already present!" with EEXIST. So kfence_test_init should be deferred. Link: https://lkml.kernel.org/r/20210714113140.2949995-1-o451686892@gmail.com Signed-off-by: Weizhao Ouyang Tested-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0db282ba2c12c1515d490d14a1ff696643ab0f1b Author: Peter Collingbourne Date: Fri Jul 23 15:50:04 2021 -0700 selftest: use mmap instead of posix_memalign to allocate memory This test passes pointers obtained from anon_allocate_area to the userfaultfd and mremap APIs. This causes a problem if the system allocator returns tagged pointers because with the tagged address ABI the kernel rejects tagged addresses passed to these APIs, which would end up causing the test to fail. To make this test compatible with such system allocators, stop using the system allocator to allocate memory in anon_allocate_area, and instead just use mmap. Link: https://lkml.kernel.org/r/20210714195437.118982-3-pcc@google.com Link: https://linux-review.googlesource.com/id/Icac91064fcd923f77a83e8e133f8631c5b8fc241 Fixes: c47174fc362a ("userfaultfd: selftest") Co-developed-by: Lokesh Gidra Signed-off-by: Lokesh Gidra Signed-off-by: Peter Collingbourne Reviewed-by: Catalin Marinas Cc: Vincenzo Frascino Cc: Dave Martin Cc: Will Deacon Cc: Andrea Arcangeli Cc: Alistair Delva Cc: William McVicker Cc: Evgenii Stepanov Cc: Mitch Phillips Cc: Andrey Konovalov Cc: [5.4] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e71e2ace5721a8b921dca18b045069e7bb411277 Author: Peter Collingbourne Date: Fri Jul 23 15:50:01 2021 -0700 userfaultfd: do not untag user pointers Patch series "userfaultfd: do not untag user pointers", v5. If a user program uses userfaultfd on ranges of heap memory, it may end up passing a tagged pointer to the kernel in the range.start field of the UFFDIO_REGISTER ioctl. This can happen when using an MTE-capable allocator, or on Android if using the Tagged Pointers feature for MTE readiness [1]. When a fault subsequently occurs, the tag is stripped from the fault address returned to the application in the fault.address field of struct uffd_msg. However, from the application's perspective, the tagged address *is* the memory address, so if the application is unaware of memory tags, it may get confused by receiving an address that is, from its point of view, outside of the bounds of the allocation. We observed this behavior in the kselftest for userfaultfd [2] but other applications could have the same problem. Address this by not untagging pointers passed to the userfaultfd ioctls. Instead, let the system call fail. Also change the kselftest to use mmap so that it doesn't encounter this problem. [1] https://source.android.com/devices/tech/debug/tagged-pointers [2] tools/testing/selftests/vm/userfaultfd.c This patch (of 2): Do not untag pointers passed to the userfaultfd ioctls. Instead, let the system call fail. This will provide an early indication of problems with tag-unaware userspace code instead of letting the code get confused later, and is consistent with how we decided to handle brk/mmap/mremap in commit dcde237319e6 ("mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()"), as well as being consistent with the existing tagged address ABI documentation relating to how ioctl arguments are handled. The code change is a revert of commit 7d0325749a6c ("userfaultfd: untag user pointers") plus some fixups to some additional calls to validate_range that have appeared since then. [1] https://source.android.com/devices/tech/debug/tagged-pointers [2] tools/testing/selftests/vm/userfaultfd.c Link: https://lkml.kernel.org/r/20210714195437.118982-1-pcc@google.com Link: https://lkml.kernel.org/r/20210714195437.118982-2-pcc@google.com Link: https://linux-review.googlesource.com/id/I761aa9f0344454c482b83fcfcce547db0a25501b Fixes: 63f0c6037965 ("arm64: Introduce prctl() options to control the tagged user addresses ABI") Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Reviewed-by: Catalin Marinas Cc: Alistair Delva Cc: Andrea Arcangeli Cc: Dave Martin Cc: Evgenii Stepanov Cc: Lokesh Gidra Cc: Mitch Phillips Cc: Vincenzo Frascino Cc: Will Deacon Cc: William McVicker Cc: [5.4] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76f5dfacfb42b75e5782c017827877cfcee20474 Author: Jisheng Zhang Date: Fri Jul 23 08:22:26 2021 +0800 riscv: stacktrace: pin the task's stack in get_wchan Pin the task's stack before calling walk_stackframe() in get_wchan(). This can fix the panic as reported by Andreas when CONFIG_VMAP_STACK=y: [ 65.609696] Unable to handle kernel paging request at virtual address ffffffd0003bbde8 [ 65.610460] Oops [#1] [ 65.610626] Modules linked in: virtio_blk virtio_mmio rtc_goldfish btrfs blake2b_generic libcrc32c xor raid6_pq sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua efivarfs [ 65.611670] CPU: 2 PID: 1 Comm: systemd Not tainted 5.14.0-rc1-1.g34fe32a-default #1 openSUSE Tumbleweed (unreleased) c62f7109153e5a0897ee58ba52393ad99b070fd2 [ 65.612334] Hardware name: riscv-virtio,qemu (DT) [ 65.613008] epc : get_wchan+0x5c/0x88 [ 65.613334] ra : get_wchan+0x42/0x88 [ 65.613625] epc : ffffffff800048a4 ra : ffffffff8000488a sp : ffffffd00021bb90 [ 65.614008] gp : ffffffff817709f8 tp : ffffffe07fe91b80 t0 : 00000000000001f8 [ 65.614411] t1 : 0000000000020000 t2 : 0000000000000000 s0 : ffffffd00021bbd0 [ 65.614818] s1 : ffffffd0003bbdf0 a0 : 0000000000000001 a1 : 0000000000000002 [ 65.615237] a2 : ffffffff81618008 a3 : 0000000000000000 a4 : 0000000000000000 [ 65.615637] a5 : ffffffd0003bc000 a6 : 0000000000000002 a7 : ffffffe27d370000 [ 65.616022] s2 : ffffffd0003bbd90 s3 : ffffffff8071a81e s4 : 0000000000003fff [ 65.616407] s5 : ffffffffffffc000 s6 : 0000000000000000 s7 : ffffffff81618008 [ 65.616845] s8 : 0000000000000001 s9 : 0000000180000040 s10: 0000000000000000 [ 65.617248] s11: 000000000000016b t3 : 000000ff00000000 t4 : 0c6aec92de5e3fd7 [ 65.617672] t5 : fff78f60608fcfff t6 : 0000000000000078 [ 65.618088] status: 0000000000000120 badaddr: ffffffd0003bbde8 cause: 000000000000000d [ 65.618621] [] get_wchan+0x5c/0x88 [ 65.619008] [] do_task_stat+0x7a2/0xa46 [ 65.619325] [] proc_tgid_stat+0xe/0x16 [ 65.619637] [] proc_single_show+0x46/0x96 [ 65.619979] [] seq_read_iter+0x190/0x31e [ 65.620341] [] seq_read+0xc4/0x104 [ 65.620633] [] vfs_read+0x6a/0x112 [ 65.620922] [] ksys_read+0x54/0xbe [ 65.621206] [] sys_read+0xe/0x16 [ 65.621474] [] ret_from_syscall+0x0/0x2 [ 65.622169] ---[ end trace f24856ed2b8789c5 ]--- [ 65.622832] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 991468dcf198bb87f24da330676724a704912b47 Author: Jens Axboe Date: Fri Jul 23 11:53:54 2021 -0600 io_uring: explicitly catch any illegal async queue attempt Catch an illegal case to queue async from an unrelated task that got the ring fd passed to it. This should not be possible to hit, but better be proactive and catch it explicitly. io-wq is extended to check for early IO_WQ_WORK_CANCEL being set on a work item as well, so it can run the request through the normal cancelation path. Signed-off-by: Jens Axboe commit 3c30ef0f78cfb36fdb13753794b0384cf7e37cc9 Author: Jens Axboe Date: Fri Jul 23 11:49:29 2021 -0600 io_uring: never attempt iopoll reissue from release path There are two reasons why this shouldn't be done: 1) Ring is exiting, and we're canceling requests anyway. Any request should be canceled anyway. In theory, this could iterate for a number of times if someone else is also driving the target block queue into request starvation, however the likelihood of this happening is miniscule. 2) If the original task decided to pass the ring to another task, then we don't want to be reissuing from this context as it may be an unrelated task or context. No assumptions should be made about the context in which ->release() is run. This can only happen for pure read/write, and we'll get -EFAULT on them anyway. Link: https://lore.kernel.org/io-uring/YPr4OaHv0iv0KTOc@zeniv-ca.linux.org.uk/ Reported-by: Al Viro Signed-off-by: Jens Axboe commit e2f55370b42205bda2f8b02c5933b9df2456bd53 Author: Rahul Tanwar Date: Tue Jul 6 16:20:59 2021 +0800 MAINTAINERS: Add Rahul Tanwar as Intel LGM Gateway PCIe maintainer Add Rahul Tanwar as maintainer for PCIe RC controller driver for the Intel Lightning Mountain (LGM) Gateway SoC. Link: https://lore.kernel.org/r/b3249e08155e04ac08d820be3b8da29a913c472a.1625559158.git.rtanwar@maxlinear.com Signed-off-by: Rahul Tanwar Signed-off-by: Bjorn Helgaas commit 5aa1959d18003472cc741dc490c3335c5bd804e2 Merge: 0506c93fba05d f07f9815b7046 Author: David S. Miller Date: Fri Jul 23 21:57:52 2021 +0100 Merge branch 'ionic-fixes' Shannon Nelson says: ==================== ionic: bug fixes Fix a thread race in rx_mode, remove unnecessary log message, fix dynamic coalescing issues, and count all csum_none cases. ==================== Signed-off-by: David S. Miller commit f07f9815b7046e25cc32bf8542c9c0bbc5eb6e0e Author: Shannon Nelson Date: Fri Jul 23 11:02:49 2021 -0700 ionic: count csum_none when offload enabled Be sure to count the csum_none cases when csum offload is enabled. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 76ed8a4a00b484dcccef819ef2618bcf8e46f560 Author: Shannon Nelson Date: Fri Jul 23 11:02:48 2021 -0700 ionic: fix up dim accounting for tx and rx We need to count the correct Tx and/or Rx packets for dynamic interrupt moderation, depending on which we're processing on the queue interrupt. Fixes: 04a834592bf5 ("ionic: dynamic interrupt moderation") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit a6ff85e0a2d9d074a4b4c291ba9ec1e5b0aba22b Author: Shannon Nelson Date: Fri Jul 23 11:02:47 2021 -0700 ionic: remove intr coalesce update from napi Move the interrupt coalesce value update out of the napi thread and into the dim_work thread and set it only when it has actually changed. Fixes: 04a834592bf5 ("ionic: dynamic interrupt moderation") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit f79eef711eb57d56874b08ea11db69221de54a6d Author: Shannon Nelson Date: Fri Jul 23 11:02:46 2021 -0700 ionic: catch no ptp support earlier If PTP configuration is attempted on ports that don't support it, such as VF ports, the driver will return an error status -95, or EOPNOSUPP and print an error message enp98s0: hwstamp set failed: -95 Because some daemons can retry every few seconds, this can end up filling the dmesg log and pushing out other more useful messages. We can catch this issue earlier in our handling and return the error without a log message. Fixes: 829600ce5e4e ("ionic: add ts_config replay") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 6840e17b8ea992453e2d6f460d403cb05d194e76 Author: Shannon Nelson Date: Fri Jul 23 11:02:45 2021 -0700 ionic: make all rx_mode work threadsafe Move the bulk of the code from ionic_set_rx_mode(), which can be called from atomic context, into ionic_lif_rx_mode() which is a safe context. A call from the stack will get pushed off into a work thread, but it is also possible to simultaneously have a call driven by a queue reconfig request from an ethtool command or fw recovery event. We add a mutex around the rx_mode work to be sure they don't collide. Fixes: 81dbc24147f9 ("ionic: change set_rx_mode from_ndo to can_sleep") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 0506c93fba05d91d40faa04c579e35783a4aa6f6 Merge: 1f22cf13496ff ea52faae1d17c Author: David S. Miller Date: Fri Jul 23 21:21:42 2021 +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 2021-07-23 This series contains updates to i40e driver only. Arkadiusz corrects the order of calls for disabling queues to resolve a false error message and adds a better message to the user when transitioning FW LLDP back on while the firmware is still processing the off request. Lukasz adds additional information regarding possible incorrect cable use when a PHY type error occurs. Jedrzej adds ndo_select_queue support to resolve incorrect queue selection when SW DCB is used and adds a warning when there are not enough queues for desired TC configuration. ==================== Signed-off-by: David S. Miller commit f0fddcec6b6254b4b3611388786bbafb703ad257 Merge: 704f4cba43d4e c7c3a6dcb1efd Author: Linus Torvalds Date: Fri Jul 23 12:49:07 2021 -0700 Merge tag 'for-5.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few fixes and one patch to help some block layer API cleanups: - skip missing device when running fstrim - fix unpersisted i_size on fsync after expanding truncate - fix lock inversion problem when doing qgroup extent tracing - replace bdgrab/bdput usage, replace gendisk by block_device" * tag 'for-5.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: store a block_device in struct btrfs_ordered_extent btrfs: fix lock inversion problem when doing qgroup extent tracing btrfs: check for missing device in btrfs_trim_fs btrfs: fix unpersisted i_size on fsync after expanding truncate commit 704f4cba43d4ed31ef4beb422313f1263d87bc55 Merge: 05daae0fb033f 0077a50082729 Author: Linus Torvalds Date: Fri Jul 23 11:30:12 2021 -0700 Merge tag 'ceph-for-5.14-rc3' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A subtle deadlock on lock_rwsem (marked for stable) and rbd fixes for a -rc1 regression. Also included a rare WARN condition tweak" * tag 'ceph-for-5.14-rc3' of git://github.com/ceph/ceph-client: rbd: resurrect setting of disk->private_data in rbd_init_disk() ceph: don't WARN if we're still opening a session to an MDS rbd: don't hold lock_rwsem while running_list is being drained rbd: always kick acquire on "acquired" and "released" notifications commit 05daae0fb033f63f96652d8aaf4cc31b330d4527 Merge: 1af09ed5ae4d2 352384d5c84eb Author: Linus Torvalds Date: Fri Jul 23 11:25:21 2021 -0700 Merge tag 'trace-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Fix deadloop in ring buffer because of using stale "read" variable - Fix synthetic event use of field_pos as boolean and not an index - Fixed histogram special var "cpu" overriding event fields called "cpu" - Cleaned up error prone logic in alloc_synth_event() - Removed call to synchronize_rcu_tasks_rude() when not needed - Removed redundant initialization of a local variable "ret" - Fixed kernel crash when updating tracepoint callbacks of different priorities. * tag 'trace-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracepoints: Update static_call before tp_funcs when adding a tracepoint ftrace: Remove redundant initialization of variable ret ftrace: Avoid synchronize_rcu_tasks_rude() call when not necessary tracing: Clean up alloc_synth_event() tracing/histogram: Rename "cpu" to "common_cpu" tracing: Synthetic event field_pos is an index not a boolean tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop. commit 1af09ed5ae4d2d3bb3cc2e233f39f52be4147200 Merge: ec6badfbe1cde 21ed492659869 Author: Linus Torvalds Date: Fri Jul 23 11:19:57 2021 -0700 Merge tag 'm68k-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fix from Geert Uytterhoeven: - Fix a Mac defconfig regression due to the IDE -> ATA switch * tag 'm68k-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: MAC should select HAVE_PATA_PLATFORM commit ec6badfbe1cde0eb2bec4a0b8f6e738171156b5b Merge: 1d597682d3e66 0b8a53a8444c2 Author: Linus Torvalds Date: Fri Jul 23 11:08:06 2021 -0700 Merge tag 'acpi-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix a recently broken Kconfig dependency and ACPI device reference counting in an iterator macro. Specifics: - Fix recently broken Kconfig dependency for the ACPI table override via built-in initrd (Robert Richter) - Fix ACPI device reference counting in the for_each_acpi_dev_match() helper macro to avoid use-after-free (Andy Shevchenko)" * tag 'acpi-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: utils: Fix reference counting in for_each_acpi_dev_match() ACPI: Kconfig: Fix table override from built-in initrd commit 1d597682d3e669ec7021aa33d088ed3d136a5149 Merge: 8072911b2fc3f e64daad660a0c Author: Linus Torvalds Date: Fri Jul 23 10:20:15 2021 -0700 Merge tag 'driver-core-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two small driver core fixes to resolve some reported problems for 5.14-rc3. They include: - aux bus memory leak fix - unneeded warning message removed when removing a device link. Both have been in linux-next with no reported problems" * tag 'driver-core-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Prevent warning when removing a device link from unregistered consumer driver core: auxiliary bus: Fix memory leak when driver_register() fail commit 8072911b2fc3fc4b94d1d44063cf55cbbea1fb49 Merge: 74738c556db6c c453db6cd9641 Author: Linus Torvalds Date: Fri Jul 23 10:14:56 2021 -0700 Merge tag 'char-misc-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small char/misc driver fixes for 5.14-rc3. Included in here are: - MAINTAINERS file updates for two changes in different driver subsystems - mhi bus bugfixes - nds32 bugfix that resolves a reported problem All have been in linux-next with no reported problems" * tag 'char-misc-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: nds32: fix up stack guard gap MAINTAINERS: Change ACRN HSM driver maintainer MAINTAINERS: Update for VMCI driver bus: mhi: pci_generic: Fix inbound IPCR channel bus: mhi: core: Validate channel ID when processing command completions bus: mhi: pci_generic: Apply no-op for wake using sideband wake boolean commit 5ba03936c05584b6f6f79be5ebe7e5036c1dd252 Author: Wei Shuyu Date: Mon Jun 28 15:15:08 2021 +0800 md/raid10: properly indicate failure when ending a failed write request Similar to [1], this patch fixes the same bug in raid10. Also cleanup the comments. [1] commit 2417b9869b81 ("md/raid1: properly indicate failure when ending a failed write request") Cc: stable@vger.kernel.org Fixes: 7cee6d4e6035 ("md/raid10: end bio when the device faulty") Signed-off-by: Wei Shuyu Acked-by: Guoqing Jiang Signed-off-by: Song Liu commit 74738c556db6c7f780a8b98340937e55b72c896a Merge: e7562a00c1f54 1d1b97d5e7636 Author: Linus Torvalds Date: Fri Jul 23 10:09:27 2021 -0700 Merge tag 'usb-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB fixes for 5.14-rc3 to resolve a bunch of tiny problems reported. Included in here are: - dtsi revert to resolve a problem which broke android systems that relied on the dts name to find the USB controller device. People are still working out the "real" solution for this, but for now the revert is needed. - core USB fix for pipe calculation found by syzbot - typec fixes - gadget driver fixes - new usb-serial device ids - new USB quirks - xhci fixes - usb hub fixes for power management issues reported - other tiny fixes All have been in linux-next with no reported problems" * tag 'usb-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (27 commits) USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem" usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set Revert "arm64: dts: qcom: Harmonize DWC USB3 DT nodes name" usb: dwc2: gadget: Fix sending zero length packet in DDMA mode. usb: dwc2: Skip clock gating on Samsung SoCs usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop() usb: dwc2: gadget: Fix GOUTNAK flow for Slave mode. usb: phy: Fix page fault from usb_phy_uevent usb: xhci: avoid renesas_usb_fw.mem when it's unusable usb: gadget: u_serial: remove WARN_ON on null port usb: dwc3: avoid NULL access of usb_gadget_driver usb: max-3421: Prevent corruption of freed memory usb: gadget: Fix Unbalanced pm_runtime_enable in tegra_xudc_probe MAINTAINERS: repair reference in USB IP DRIVER FOR HISILICON KIRIN 970 usb: typec: stusb160x: Don't block probing of consumer of "connector" nodes usb: typec: stusb160x: register role switch before interrupt registration USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS usb: ehci: Prevent missed ehci interrupts with edge-triggered MSI usb: hub: Disable USB 3 device initiated lpm if exit latency is too high ... commit e7562a00c1f54116f5a058e7e3ddd500188f60b2 Merge: 8baef6386baae b0084afde27fe Author: Linus Torvalds Date: Fri Jul 23 09:58:23 2021 -0700 Merge tag 'sound-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes, mostly covering device-specific regressions and bugs over ASoC, HD-audio and USB-audio, while the ALSA PCM core received a few additional fixes for the possible (new and old) regressions" * tag 'sound-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits) ALSA: usb-audio: Add registration quirk for JBL Quantum headsets ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10 ALSA: pcm: Fix mmap without buffer preallocation ALSA: pcm: Fix mmap capability check ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID ASoC: ti: j721e-evm: Check for not initialized parent_clk_id ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup ALSA: hda/realtek: Fix pop noise and 2 Front Mic issues on a machine ALSA: hdmi: Expose all pins on MSI MS-7C94 board ALSA: sb: Fix potential ABBA deadlock in CSP driver ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend ASoC: amd: reverse stop sequence for stoneyridge platform ASoC: soc-pcm: add a flag to reverse the stop sequence ASoC: codecs: wcd938x: setup irq during component bind ASoC: dt-bindings: renesas: rsnd: Fix incorrect 'port' regex schema ALSA: usb-audio: Add missing proc text entry for BESPOKEN type ASoC: codecs: wcd938x: make sdw dependency explicit in Kconfig ASoC: SOF: Intel: Update ADL descriptor to use ACPI power states ASoC: rt5631: Fix regcache sync errors on resume ALSA: pcm: Call substream ack() method upon compat mmap commit ... commit 1f22cf13496ff6717c60bb26fbeee7d07f7ac578 Merge: 15bbf8bb4d4ab f9a5c358c8d26 Author: David S. Miller Date: Fri Jul 23 17:57:09 2021 +0100 Merge tag 'mac80211-for-net-2021-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Couple of fixes: * fix aggregation on mesh * fix late enabling of 4-addr mode * leave monitor SKBs with some headroom * limit band information for old applications * fix virt-wifi WARN_ON * fix memory leak in cfg80211 BSS list maintenance commit 15bbf8bb4d4ab87108ecf5f4155ec8ffa3c141d6 Author: Paul Jakma Date: Fri Jul 23 16:13:04 2021 +0100 NIU: fix incorrect error return, missed in previous revert Commit 7930742d6, reverting 26fd962, missed out on reverting an incorrect change to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears to be a normal path - treating it as an error and return -EINVAL was breaking VPD_SCAN and causing the driver to fail to load. Fix, so my Neptune card works again. Cc: Kangjie Lu Cc: Shannon Nelson Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: stable Fixes: 7930742d ('Revert "niu: fix missing checks of niu_pci_eeprom_read"') Signed-off-by: Paul Jakma Signed-off-by: David S. Miller commit 52f3456a96c06760b9bfae460e39596fec7af22e Author: Pavel Skripkin Date: Fri Jul 23 18:31:32 2021 +0300 net: qrtr: fix memory leaks Syzbot reported memory leak in qrtr. The problem was in unputted struct sock. qrtr_local_enqueue() function calls qrtr_port_lookup() which takes sock reference if port was found. Then there is the following check: if (!ipc || &ipc->sk == skb->sk) { ... return -ENODEV; } Since we should drop the reference before returning from this function and ipc can be non-NULL inside this if, we should add qrtr_port_put() inside this if. The similar corner case is in qrtr_endpoint_post() as Manivannan reported. In case of sock_queue_rcv_skb() failure we need to put port reference to avoid leaking struct sock pointer. Fixes: e04df98adf7d ("net: qrtr: Remove receive worker") Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") Reported-and-tested-by: syzbot+35a511c72ea7356cdcf3@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Reviewed-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 200bd5668c04d35510d152aa2f74c659f705a5b3 Merge: 9986066d94c97 217e26bd87b29 Author: David S. Miller Date: Fri Jul 23 17:46:05 2021 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayusosays: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Memleak in commit audit error path, from Dongliang Mu. 2) Avoid possible false sharing for flowtable timeout updates and nft_last use. 3) Adjust conntrack timestamp due to garbage collection delay, from Florian Westphal. 4) Fix nft_nat without layer 3 address for the inet family. 5) Fix compilation warning in nfnl_hook when ingress support is disabled, from Arnd Bergmann. ==================== Signed-off-by: David S. Miller commit 9986066d94c971edf19464ed7bf5b26a91520e97 Author: Subbaraya Sundeep Date: Fri Jul 23 13:36:18 2021 +0530 octeontx2-af: Fix uninitialized variables in rvu_switch Get the number of VFs of a PF correctly by calling rvu_get_pf_numvfs in rvu_switch_disable function. Also hwvf is not required hence remove it. Fixes: 23109f8dd06d ("octeontx2-af: Introduce internal packet switching") Reported-by: kernel test robot Reported-by: Colin Ian King Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 3ce6e1f662a910970880188ea7bfd00542bd3934 Author: Tetsuo Handa Date: Tue Jul 6 23:40:34 2021 +0900 loop: reintroduce global lock for safe loop_validate_file() traversal Commit 6cc8e7430801fa23 ("loop: scale loop device by introducing per device lock") re-opened a race window for NULL pointer dereference at loop_validate_file() where commit 310ca162d779efee ("block/loop: Use global lock for ioctl() operation.") has closed. Although we need to guarantee that other loop devices will not change during traversal, we can't take remote "struct loop_device"->lo_mutex inside loop_validate_file() in order to avoid AB-BA deadlock. Therefore, introduce a global lock dedicated for loop_validate_file() which is conditionally taken before local "struct loop_device"->lo_mutex is taken. Signed-off-by: Tetsuo Handa Fixes: 6cc8e7430801fa23 ("loop: scale loop device by introducing per device lock") Signed-off-by: Jens Axboe commit 68d1f1d4af188c290087958c75c7b89a816e1137 Author: Loic Poulain Date: Thu Jul 22 20:21:05 2021 +0200 wwan: core: Fix missing RTM_NEWLINK event for default link A wwan link created via the wwan_create_default_link procedure is never notified to the user (RTM_NEWLINK), causing issues with user tools relying on such event to track network links (NetworkManager). This is because the procedure misses a call to rtnl_configure_link(), which sets the link as initialized and notifies the new link (cf proper usage in __rtnl_newlink()). Cc: stable@vger.kernel.org Fixes: ca374290aaad ("wwan: core: support default netdev creation") Suggested-by: Sergey Ryazanov Signed-off-by: Loic Poulain Acked-by: Sergey Ryazanov Signed-off-by: David S. Miller commit c92c74131a84b508aa8f079a25d7bbe10748449e Author: Vladimir Oltean Date: Thu Jul 22 16:05:51 2021 +0300 net: dsa: mv88e6xxx: silently accept the deletion of VID 0 too The blamed commit modified the driver to accept the addition of VID 0 without doing anything, but deleting that VID still fails: [ 32.080780] mv88e6085 d0032004.mdio-mii:10 lan8: failed to kill vid 0081/0 Modify mv88e6xxx_port_vlan_leave() to do the same thing as the addition. Fixes: b8b79c414eca ("net: dsa: mv88e6xxx: Fix adding vlan 0") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 798a315fc359aa6dbe48e09d802aa59b7e158ffc Author: Hsin-Yi Wang Date: Thu Jul 1 16:09:55 2021 +0800 pinctrl: mediatek: Fix fallback behavior for bias_set_combo Some pin doesn't support PUPD register, if it fails and fallbacks with bias_set_combo case, it will call mtk_pinconf_bias_set_pupd_r1_r0() to modify the PUPD pin again. Since the general bias set are either PU/PD or PULLSEL/PULLEN, try bias_set or bias_set_rev1 for the other fallback case. If the pin doesn't support neither PU/PD nor PULLSEL/PULLEN, it will return -ENOTSUPP. Fixes: 81bd1579b43e ("pinctrl: mediatek: Fix fallback call path") Signed-off-by: Hsin-Yi Wang Reviewed-by: Chen-Yu Tsai Reviewed-by: Zhiyong Tao Link: https://lore.kernel.org/r/20210701080955.2660294-1-hsinyi@chromium.org Signed-off-by: Linus Walleij commit 46c7655f0b56b1ac864115441064cde9ed124f4a Author: Kangmin Park Date: Fri Jul 23 02:44:43 2021 +0900 ipv6: decrease hop limit counter in ip6_forward() Decrease hop limit counter when deliver skb to ndp proxy. Signed-off-by: Kangmin Park Signed-off-by: David S. Miller commit 227adfb2b1dfbc53dfc53b9dd7a93a6298ff7c56 Author: Gilad Naaman Date: Thu Jul 22 20:01:28 2021 +0300 net: Set true network header for ECN decapsulation In cases where the header straight after the tunnel header was another ethernet header (TEB), instead of the network header, the ECN decapsulation code would treat the ethernet header as if it was an IP header, resulting in mishandling and possible wrong drops or corruption of the IP header. In this case, ECT(1) is sent, so IP_ECN_decapsulate tries to copy it to the inner IPv4 header, and correct its checksum. The offset of the ECT bits in an IPv4 header corresponds to the lower 2 bits of the second octet of the destination MAC address in the ethernet header. The IPv4 checksum corresponds to end of the source address. In order to reproduce: $ ip netns add A $ ip netns add B $ ip -n A link add _v0 type veth peer name _v1 netns B $ ip -n A link set _v0 up $ ip -n A addr add dev _v0 10.254.3.1/24 $ ip -n A route add default dev _v0 scope global $ ip -n B link set _v1 up $ ip -n B addr add dev _v1 10.254.1.6/24 $ ip -n B route add default dev _v1 scope global $ ip -n B link add gre1 type gretap local 10.254.1.6 remote 10.254.3.1 key 0x49000000 $ ip -n B link set gre1 up # Now send an IPv4/GRE/Eth/IPv4 frame where the outer header has ECT(1), # and the inner header has no ECT bits set: $ cat send_pkt.py #!/usr/bin/env python3 from scapy.all import * pkt = IP(b'E\x01\x00\xa7\x00\x00\x00\x00@/`%\n\xfe\x03\x01\n\xfe\x01\x06 \x00eXI\x00' b'\x00\x00\x18\xbe\x92\xa0\xee&\x18\xb0\x92\xa0l&\x08\x00E\x00\x00}\x8b\x85' b'@\x00\x01\x01\xe4\xf2\x82\x82\x82\x01\x82\x82\x82\x02\x08\x00d\x11\xa6\xeb' b'3\x1e\x1e\\xf3\\xf7`\x00\x00\x00\x00ZN\x00\x00\x00\x00\x00\x00\x10\x11\x12' b'\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./01234' b'56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ') send(pkt) $ sudo ip netns exec B tcpdump -neqlllvi gre1 icmp & ; sleep 1 $ sudo ip netns exec A python3 send_pkt.py In the original packet, the source/destinatio MAC addresses are dst=18:be:92:a0:ee:26 src=18:b0:92:a0:6c:26 In the received packet, they are dst=18:bd:92:a0:ee:26 src=18:b0:92:a0:6c:27 Thanks to Lahav Schlesinger and Isaac Garzon for helping me pinpoint the origin. Fixes: b723748750ec ("tunnel: Propagate ECT(1) when decapsulating as recommended by RFC6040") Cc: David S. Miller Cc: Hideaki YOSHIFUJI Cc: David Ahern Cc: Jakub Kicinski Cc: Toke Høiland-Jørgensen Signed-off-by: Gilad Naaman Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit d237a7f11719ff9320721be5818352e48071aab6 Author: Hoang Le Date: Fri Jul 23 09:25:34 2021 +0700 tipc: fix sleeping in tipc accept routine The release_sock() is blocking function, it would change the state after sleeping. In order to evaluate the stated condition outside the socket lock context, switch to use wait_woken() instead. Fixes: 6398e23cdb1d8 ("tipc: standardize accept routine") Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit f8dd60de194817c86bf812700980762bb5a8d9a4 Author: Xin Long Date: Thu Jul 22 12:05:41 2021 -0400 tipc: fix implicit-connect for SYN+ For implicit-connect, when it's either SYN- or SYN+, an ACK should be sent back to the client immediately. It's not appropriate for the client to enter established state only after receiving data from the server. On client side, after the SYN is sent out, tipc_wait_for_connect() should be called to wait for the ACK if timeout is set. This patch also restricts __tipc_sendstream() to call __sendmsg() only when it's in TIPC_OPEN state, so that the client can program in a single loop doing both connecting and data sending like: for (...) sendmsg(dest, buf); This makes the implicit-connect more implicit. Fixes: b97bf3fd8f6a ("[TIPC] Initial merge") Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 0b8a53a8444c267114f6b5a85d21153ddea190eb Merge: d2cbbf1fe503c 71f6428332844 Author: Rafael J. Wysocki Date: Fri Jul 23 17:06:15 2021 +0200 Merge branch 'acpi-utils' * acpi-utils: ACPI: utils: Fix reference counting in for_each_acpi_dev_match() commit d72e91efcae12f2f24ced984d00d60517c677857 Author: Sunil Goutham Date: Thu Jul 22 18:15:51 2021 +0530 octeontx2-af: Remove unnecessary devm_kfree Remove devm_kfree of memory where VLAN entry to RVU PF mapping info is saved. This will be freed anyway at driver exit. Having this could result in warning from devm_kfree() if the memory is not allocated due to errors in rvu_nix_block_init() before nix_setup_txvlan(). Fixes: 9a946def264d ("octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries") Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit ea52faae1d17cd3048681d86d2e8641f44de484d Author: Jedrzej Jagielski Date: Fri Jun 18 08:49:49 2021 +0000 i40e: Fix log TC creation failure when max num of queues is exceeded Fix missing failed message if driver does not have enough queues to complete TC command. Without this fix no message is displayed in dmesg. Fixes: a9ce82f744dc ("i40e: Enable 'channel' mode in mqprio for TC configs") Signed-off-by: Grzegorz Szczurek Signed-off-by: Jedrzej Jagielski Tested-by: Imam Hassan Reza Biswas Signed-off-by: Tony Nguyen commit 89ec1f0886c127c7e41ac61a6b6d539f4fb2510b Author: Jedrzej Jagielski Date: Wed Jun 2 00:47:03 2021 +0000 i40e: Fix queue-to-TC mapping on Tx In SW DCB mode the packets sent receive incorrect UP tags. They are constructed correctly and put into tx_ring, but UP is later remapped by HW on the basis of TCTUPR register contents according to Tx queue selected, and BW used is consistent with the new UP values. This is caused by Tx queue selection in kernel not taking into account DCB configuration. This patch fixes the issue by implementing the ndo_select_queue NDO callback. Fixes: fd0a05ce74ef ("i40e: transmit, receive, and NAPI") Signed-off-by: Arkadiusz Kubalewski Signed-off-by: Jedrzej Jagielski Tested-by: Imam Hassan Reza Biswas Signed-off-by: Tony Nguyen commit dc614c46178b0b89bde86ac54fc687a28580d2b7 Author: Lukasz Cieplicki Date: Mon May 31 16:55:49 2021 +0000 i40e: Add additional info to PHY type error In case of PHY type error occurs, the message was too generic. Add additional info to PHY type error indicating that it can be wrong cable connected. Fixes: 124ed15bf126 ("i40e: Add dual speed module support") Signed-off-by: Lukasz Cieplicki Signed-off-by: Michal Maloszewski Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 71d6fdba4b2d82fdd883fec31dee77fbcf59773a Author: Arkadiusz Kubalewski Date: Fri May 21 18:41:26 2021 +0200 i40e: Fix firmware LLDP agent related warning Make warning meaningful for the user. Previously the trace: "Starting FW LLDP agent failed: error: I40E_ERR_ADMIN_QUEUE_ERROR, I40E_AQ_RC_EAGAIN" was produced when user tried to start Firmware LLDP agent, just after it was stopped with sequence: ethtool --set-priv-flags disable-fw-lldp on ethtool --set-priv-flags disable-fw-lldp off (without any delay between the commands) At that point the firmware is still processing stop command, the behavior is expected. Fixes: c1041d070437 ("i40e: Missing response checks in driver when starting/stopping FW LLDP") Signed-off-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Tested-by: Imam Hassan Reza Biswas Signed-off-by: Tony Nguyen commit 65662a8dcdd01342b71ee44234bcfd0162e195af Author: Arkadiusz Kubalewski Date: Thu Apr 29 19:49:47 2021 +0200 i40e: Fix logic of disabling queues Correct the message flow between driver and firmware when disabling queues. Previously in case of PF reset (due to required reinit after reconfig), the error like: "VSI seid 397 Tx ring 60 disable timeout" could show up occasionally. The error was not a real issue of hardware or firmware, it was caused by wrong sequence of messages invoked by the driver. Fixes: 41c445ff0f48 ("i40e: main driver core") Signed-off-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 352384d5c84ebe40fa77098cc234fe173247d8ef Author: Steven Rostedt (VMware) Date: Thu Jul 22 21:52:18 2021 -0400 tracepoints: Update static_call before tp_funcs when adding a tracepoint Because of the significant overhead that retpolines pose on indirect calls, the tracepoint code was updated to use the new "static_calls" that can modify the running code to directly call a function instead of using an indirect caller, and this function can be changed at runtime. In the tracepoint code that calls all the registered callbacks that are attached to a tracepoint, the following is done: it_func_ptr = rcu_dereference_raw((&__tracepoint_##name)->funcs); if (it_func_ptr) { __data = (it_func_ptr)->data; static_call(tp_func_##name)(__data, args); } If there's just a single callback, the static_call is updated to just call that callback directly. Once another handler is added, then the static caller is updated to call the iterator, that simply loops over all the funcs in the array and calls each of the callbacks like the old method using indirect calling. The issue was discovered with a race between updating the funcs array and updating the static_call. The funcs array was updated first and then the static_call was updated. This is not an issue as long as the first element in the old array is the same as the first element in the new array. But that assumption is incorrect, because callbacks also have a priority field, and if there's a callback added that has a higher priority than the callback on the old array, then it will become the first callback in the new array. This means that it is possible to call the old callback with the new callback data element, which can cause a kernel panic. static_call = callback1() funcs[] = {callback1,data1}; callback2 has higher priority than callback1 CPU 1 CPU 2 ----- ----- new_funcs = {callback2,data2}, {callback1,data1} rcu_assign_pointer(tp->funcs, new_funcs); /* * Now tp->funcs has the new array * but the static_call still calls callback1 */ it_func_ptr = tp->funcs [ new_funcs ] data = it_func_ptr->data [ data2 ] static_call(callback1, data); /* Now callback1 is called with * callback2's data */ [ KERNEL PANIC ] update_static_call(iterator); To prevent this from happening, always switch the static_call to the iterator before assigning the tp->funcs to the new array. The iterator will always properly match the callback with its data. To trigger this bug: In one terminal: while :; do hackbench 50; done In another terminal echo 1 > /sys/kernel/tracing/events/sched/sched_waking/enable while :; do echo 1 > /sys/kernel/tracing/set_event_pid; sleep 0.5 echo 0 > /sys/kernel/tracing/set_event_pid; sleep 0.5 done And it doesn't take long to crash. This is because the set_event_pid adds a callback to the sched_waking tracepoint with a high priority, which will be called before the sched_waking trace event callback is called. Note, the removal to a single callback updates the array first, before changing the static_call to single callback, which is the proper order as the first element in the array is the same as what the static_call is being changed to. Link: https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/ Cc: stable@vger.kernel.org Fixes: d25e37d89dd2f ("tracepoint: Optimize using static_call()") Reported-by: Stefan Metzmacher tested-by: Stefan Metzmacher Signed-off-by: Steven Rostedt (VMware) commit 3b1a8f457fcf105924c72e99f1191834837c978d Author: Colin Ian King Date: Wed Jul 21 13:09:15 2021 +0100 ftrace: Remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Link: https://lkml.kernel.org/r/20210721120915.122278-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit 68e83498cb4fad31963b5c76a71e80b824bc316e Author: Nicolas Saenz Julienne Date: Wed Jul 21 13:47:26 2021 +0200 ftrace: Avoid synchronize_rcu_tasks_rude() call when not necessary synchronize_rcu_tasks_rude() triggers IPIs and forces rescheduling on all CPUs. It is a costly operation and, when targeting nohz_full CPUs, very disrupting (hence the name). So avoid calling it when 'old_hash' doesn't need to be freed. Link: https://lkml.kernel.org/r/20210721114726.1545103-1-nsaenzju@redhat.com Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Steven Rostedt (VMware) commit 9528c19507dc9bc3d6cd96f4611d7cb80c5afcde Author: Steven Rostedt (VMware) Date: Wed Jul 21 19:53:41 2021 -0400 tracing: Clean up alloc_synth_event() alloc_synth_event() currently has the following code to initialize the event fields and dynamic_fields: for (i = 0, j = 0; i < n_fields; i++) { event->fields[i] = fields[i]; if (fields[i]->is_dynamic) { event->dynamic_fields[j] = fields[i]; event->dynamic_fields[j]->field_pos = i; event->dynamic_fields[j++] = fields[i]; event->n_dynamic_fields++; } } 1) It would make more sense to have all fields keep track of their field_pos. 2) event->dynmaic_fields[j] is assigned twice for no reason. 3) We can move updating event->n_dynamic_fields outside the loop, and just assign it to j. This combination makes the code much cleaner. Link: https://lkml.kernel.org/r/20210721195341.29bb0f77@oasis.local.home Signed-off-by: Steven Rostedt (VMware) commit 217e26bd87b2930856726b48a4e71c768b8c9bf5 Author: Arnd Bergmann Date: Wed Jul 21 17:22:32 2021 +0200 netfilter: nfnl_hook: fix unused variable warning The only user of this variable is in an #ifdef: net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head': net/netfilter/nfnetlink_hook.c:177:28: error: unused variable 'netdev' [-Werror=unused-variable] Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso commit 1e3bac71c5053c99d438771fc9fa5082ae5d90aa Author: Steven Rostedt (VMware) Date: Wed Jul 21 11:00:53 2021 -0400 tracing/histogram: Rename "cpu" to "common_cpu" Currently the histogram logic allows the user to write "cpu" in as an event field, and it will record the CPU that the event happened on. The problem with this is that there's a lot of events that have "cpu" as a real field, and using "cpu" as the CPU it ran on, makes it impossible to run histograms on the "cpu" field of events. For example, if I want to have a histogram on the count of the workqueue_queue_work event on its cpu field, running: ># echo 'hist:keys=cpu' > events/workqueue/workqueue_queue_work/trigger Gives a misleading and wrong result. Change the command to "common_cpu" as no event should have "common_*" fields as that's a reserved name for fields used by all events. And this makes sense here as common_cpu would be a field used by all events. Now we can even do: ># echo 'hist:keys=common_cpu,cpu if cpu < 100' > events/workqueue/workqueue_queue_work/trigger ># cat events/workqueue/workqueue_queue_work/hist # event histogram # # trigger info: hist:keys=common_cpu,cpu:vals=hitcount:sort=hitcount:size=2048 if cpu < 100 [active] # { common_cpu: 0, cpu: 2 } hitcount: 1 { common_cpu: 0, cpu: 4 } hitcount: 1 { common_cpu: 7, cpu: 7 } hitcount: 1 { common_cpu: 0, cpu: 7 } hitcount: 1 { common_cpu: 0, cpu: 1 } hitcount: 1 { common_cpu: 0, cpu: 6 } hitcount: 2 { common_cpu: 0, cpu: 5 } hitcount: 2 { common_cpu: 1, cpu: 1 } hitcount: 4 { common_cpu: 6, cpu: 6 } hitcount: 4 { common_cpu: 5, cpu: 5 } hitcount: 14 { common_cpu: 4, cpu: 4 } hitcount: 26 { common_cpu: 0, cpu: 0 } hitcount: 39 { common_cpu: 2, cpu: 2 } hitcount: 184 Now for backward compatibility, I added a trick. If "cpu" is used, and the field is not found, it will fall back to "common_cpu" and work as it did before. This way, it will still work for old programs that use "cpu" to get the actual CPU, but if the event has a "cpu" as a field, it will get that event's "cpu" field, which is probably what it wants anyway. I updated the tracefs/README to include documentation about both the common_timestamp and the common_cpu. This way, if that text is present in the README, then an application can know that common_cpu is supported over just plain "cpu". Link: https://lkml.kernel.org/r/20210721110053.26b4f641@oasis.local.home Cc: Namhyung Kim Cc: Ingo Molnar Cc: Andrew Morton Cc: stable@vger.kernel.org Fixes: 8b7622bf94a44 ("tracing: Add cpu field for hist triggers") Reviewed-by: Tom Zanussi Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 3b13911a2fd0dd0146c9777a254840c5466cf120 Author: Steven Rostedt (VMware) Date: Wed Jul 21 19:10:08 2021 -0400 tracing: Synthetic event field_pos is an index not a boolean Performing the following: ># echo 'wakeup_lat s32 pid; u64 delta; char wake_comm[]' > synthetic_events ># echo 'hist:keys=pid:__arg__1=common_timestamp.usecs' > events/sched/sched_waking/trigger ># echo 'hist:keys=next_pid:pid=next_pid,delta=common_timestamp.usecs-$__arg__1:onmatch(sched.sched_waking).trace(wakeup_lat,$pid,$delta,prev_comm)'\ > events/sched/sched_switch/trigger ># echo 1 > events/synthetic/enable Crashed the kernel: BUG: kernel NULL pointer dereference, address: 000000000000001b #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP CPU: 7 PID: 0 Comm: swapper/7 Not tainted 5.13.0-rc5-test+ #104 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:strlen+0x0/0x20 Code: f6 82 80 2b 0b bc 20 74 11 0f b6 50 01 48 83 c0 01 f6 82 80 2b 0b bc 20 75 ef c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 <80> 3f 00 74 10 48 89 f8 48 83 c0 01 80 38 9 f8 c3 31 RSP: 0018:ffffaa75000d79d0 EFLAGS: 00010046 RAX: 0000000000000002 RBX: ffff9cdb55575270 RCX: 0000000000000000 RDX: ffff9cdb58c7a320 RSI: ffffaa75000d7b40 RDI: 000000000000001b RBP: ffffaa75000d7b40 R08: ffff9cdb40a4f010 R09: ffffaa75000d7ab8 R10: ffff9cdb4398c700 R11: 0000000000000008 R12: ffff9cdb58c7a320 R13: ffff9cdb55575270 R14: ffff9cdb58c7a000 R15: 0000000000000018 FS: 0000000000000000(0000) GS:ffff9cdb5aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000001b CR3: 00000000c0612006 CR4: 00000000001706e0 Call Trace: trace_event_raw_event_synth+0x90/0x1d0 action_trace+0x5b/0x70 event_hist_trigger+0x4bd/0x4e0 ? cpumask_next_and+0x20/0x30 ? update_sd_lb_stats.constprop.0+0xf6/0x840 ? __lock_acquire.constprop.0+0x125/0x550 ? find_held_lock+0x32/0x90 ? sched_clock_cpu+0xe/0xd0 ? lock_release+0x155/0x440 ? update_load_avg+0x8c/0x6f0 ? enqueue_entity+0x18a/0x920 ? __rb_reserve_next+0xe5/0x460 ? ring_buffer_lock_reserve+0x12a/0x3f0 event_triggers_call+0x52/0xe0 trace_event_buffer_commit+0x1ae/0x240 trace_event_raw_event_sched_switch+0x114/0x170 __traceiter_sched_switch+0x39/0x50 __schedule+0x431/0xb00 schedule_idle+0x28/0x40 do_idle+0x198/0x2e0 cpu_startup_entry+0x19/0x20 secondary_startup_64_no_verify+0xc2/0xcb The reason is that the dynamic events array keeps track of the field position of the fields array, via the field_pos variable in the synth_field structure. Unfortunately, that field is a boolean for some reason, which means any field_pos greater than 1 will be a bug (in this case it was 2). Link: https://lkml.kernel.org/r/20210721191008.638bce34@oasis.local.home Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Ingo Molnar Cc: Andrew Morton Cc: stable@vger.kernel.org Fixes: bd82631d7ccdc ("tracing: Add support for dynamic strings to synthetic events") Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit ee7ab3f263f8131722cff3871b9618b1e7478f07 Author: Pali Rohár Date: Mon Jun 28 17:12:29 2021 +0200 arm64: dts: armada-3720-turris-mox: remove mrvl,i2c-fast-mode Some SFP modules are not detected when i2c-fast-mode is enabled even when clock-frequency is already set to 100000. The I2C bus violates the timing specifications when run in fast mode. So disable fast mode on Turris Mox. Same change was already applied for uDPU (also Armada 3720 board with SFP) in commit fe3ec631a77d ("arm64: dts: uDPU: remove i2c-fast-mode"). Fixes: 7109d817db2e ("arm64: dts: marvell: add DTS for Turris Mox") Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Acked-by: Russell King (Oracle) Signed-off-by: Gregory CLEMENT commit a33f387ecd5aafae514095c2c4a8c24f7aea7e8b Author: Pablo Neira Ayuso Date: Tue Jul 20 18:22:50 2021 +0200 netfilter: nft_nat: allow to specify layer 4 protocol NAT only nft_nat reports a bogus EAFNOSUPPORT if no layer 3 information is specified. Fixes: d07db9884a5f ("netfilter: nf_tables: introduce nft_validate_register_load()") Signed-off-by: Pablo Neira Ayuso commit 30a56a2b881821625f79837d4d968c679852444e Author: Florian Westphal Date: Sun Jul 18 18:36:00 2021 +0200 netfilter: conntrack: adjust stop timestamp to real expiry value In case the entry is evicted via garbage collection there is delay between the timeout value and the eviction event. This adjusts the stop value based on how much time has passed. Fixes: b87a2f9199ea82 ("netfilter: conntrack: add gc worker to remove timed-out entries") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 32953df7a6eb56bd9b8f18a13034d55f9fc96cfa Author: Pablo Neira Ayuso Date: Sat Jul 17 10:20:08 2021 +0200 netfilter: nft_last: avoid possible false sharing Use the idiom described in: https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance Moreover, prevent a compiler optimization. Fixes: 836382dc2471 ("netfilter: nf_tables: add last expression") Signed-off-by: Pablo Neira Ayuso commit 32c3973d808301e7a980f80fee8818fdf7c82b09 Author: Pablo Neira Ayuso Date: Sat Jul 17 10:10:29 2021 +0200 netfilter: flowtable: avoid possible false sharing The flowtable follows the same timeout approach as conntrack, use the same idiom as in cc16921351d8 ("netfilter: conntrack: avoid same-timeout update") but also include the fix provided by e37542ba111f ("netfilter: conntrack: avoid possible false sharing"). Signed-off-by: Pablo Neira Ayuso commit 73dc707161a83c24a9e6804b2d60e6f4a4d6be74 Author: Guoqing Jiang Date: Wed Jul 14 13:59:40 2021 +0800 ext4: remove conflicting comment from __ext4_forget We do a bforget and return for no journal case, so let's remove this conflict comment. Reviewed-by: Jan Kara Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20210714055940.1553705-1-guoqing.jiang@linux.dev Signed-off-by: Theodore Ts'o commit b66541422824cf6cf20e9a35112e9cb5d82cdf62 Author: Ye Bin Date: Tue Jul 13 10:27:28 2021 +0800 ext4: fix potential uninitialized access to retval in kmmpd if (!ext4_has_feature_mmp(sb)) then retval can be unitialized before we jump to the wait_to_exit label. Fixes: 61bb4a1c417e ("ext4: fix possible UAF when remounting r/o a mmp-protected file system") Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210713022728.2533770-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit 923f98929182dfd04e9149be839160b63a3db145 Author: Vladimir Oltean Date: Thu Jul 22 13:11:34 2021 +0300 arm64: dts: armada-3720-turris-mox: fixed indices for the SDHC controllers Since drivers/mmc/host/sdhci-xenon.c declares the PROBE_PREFER_ASYNCHRONOUS probe type, it is not guaranteed whether /dev/mmcblk0 will belong to sdhci0 or sdhci1. In turn, this will break booting by: root=/dev/mmcblk0p1 Fix the issue by adding aliases so that the old MMC controller indices are preserved. Fixes: 7320915c8861 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14") Signed-off-by: Vladimir Oltean Signed-off-by: Gregory CLEMENT commit 32ec3960175e58a914fc242b66dfe33e9059568f Author: Arnd Bergmann Date: Fri Jul 23 11:13:52 2021 +0200 pinctrl: qcom: fix GPIOLIB dependencies Enabling the PINCTRL_SM8350 symbol without GPIOLIB or SCM causes a build failure: WARNING: unmet direct dependencies detected for PINCTRL_MSM Depends on [m]: PINCTRL [=y] && (ARCH_QCOM [=y] || COMPILE_TEST [=y]) && GPIOLIB [=y] && (QCOM_SCM [=m] || !QCOM_SCM [=m]) Selected by [y]: - PINCTRL_SM8350 [=y] && PINCTRL [=y] && (ARCH_QCOM [=y] || COMPILE_TEST [=y]) && GPIOLIB [=y] && OF [=y] aarch64-linux-ld: drivers/pinctrl/qcom/pinctrl-msm.o: in function `msm_gpio_irq_set_type': pinctrl-msm.c:(.text.msm_gpio_irq_set_type+0x1c8): undefined reference to `qcom_scm_io_readl' The main problem here is the 'select PINCTRL_MSM', which needs to be a 'depends on' as it is for all the other front-ends. As the GPIOLIB dependency is now implied by that, symbol, remove the duplicate dependencies in the process. Fixes: d5d348a3271f ("pinctrl: qcom: Add SM8350 pinctrl driver") Fixes: 376f9e34c10f ("drivers: pinctrl: qcom: fix Kconfig dependency on GPIOLIB") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210723091400.1669716-1-arnd@kernel.org Signed-off-by: Linus Walleij commit f9a5c358c8d26fed0cc45f2afc64633d4ba21dff Author: Nguyen Dinh Phi Date: Mon Jun 28 21:23:34 2021 +0800 cfg80211: Fix possible memory leak in function cfg80211_bss_update When we exceed the limit of BSS entries, this function will free the new entry, however, at this time, it is the last door to access the inputed ies, so these ies will be unreferenced objects and cause memory leak. Therefore we should free its ies before deallocating the new entry, beside of dropping it from hidden_list. Signed-off-by: Nguyen Dinh Phi Link: https://lore.kernel.org/r/20210628132334.851095-1-phind.uet@gmail.com Signed-off-by: Johannes Berg commit 0d059964504a1605d84938c0b5b38f6573121c4a Author: Johannes Berg Date: Mon Jul 12 21:53:30 2021 +0200 nl80211: limit band information in non-split data In non-split data, we shouldn't be adding S1G and 6 GHz data (or future bands) since we're really close to the 4k message size limit. Remove those bands, any modern userspace that can use S1G or 6 GHz should already be using split dumps, and if not then it needs to update. Link: https://lore.kernel.org/r/20210712215329.31444162a2c2.I5555312e4a074c84f8b4e7ad79dc4d1fbfc5126c@changeid Signed-off-by: Johannes Berg commit 17109e9783799be2a063b2bd861a508194b0a487 Author: Matteo Croce Date: Tue Jul 6 17:44:23 2021 +0200 virt_wifi: fix error on connect When connecting without first doing a scan, the BSS list is empty and __cfg80211_connect_result() generates this warning: $ iw dev wlan0 connect -w VirtWifi [ 15.371989] ------------[ cut here ]------------ [ 15.372179] WARNING: CPU: 0 PID: 92 at net/wireless/sme.c:756 __cfg80211_connect_result+0x402/0x440 [ 15.372383] CPU: 0 PID: 92 Comm: kworker/u2:2 Not tainted 5.13.0-kvm #444 [ 15.372512] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-3.fc34 04/01/2014 [ 15.372597] Workqueue: cfg80211 cfg80211_event_work [ 15.372756] RIP: 0010:__cfg80211_connect_result+0x402/0x440 [ 15.372818] Code: 48 2b 04 25 28 00 00 00 75 59 48 8b 3b 48 8b 76 10 48 8d 65 e0 5b 41 5c 41 5d 41 5e 5d 49 8d 65 f0 41 5d e9 d0 d4 fd ff 0f 0b <0f> 0b e9 f6 fd ff ff e8 f2 4a b4 ff e9 ec fd ff ff 0f 0b e9 19 fd [ 15.372966] RSP: 0018:ffffc900005cbdc0 EFLAGS: 00010246 [ 15.373022] RAX: 0000000000000000 RBX: ffff8880028e2400 RCX: ffff8880028e2472 [ 15.373088] RDX: 0000000000000002 RSI: 00000000fffffe01 RDI: ffffffff815335ba [ 15.373149] RBP: ffffc900005cbe00 R08: 0000000000000008 R09: ffff888002bdf8b8 [ 15.373209] R10: ffff88803ec208f0 R11: ffffffffffffe9ae R12: ffff88801d687d98 [ 15.373280] R13: ffff88801b5fe000 R14: ffffc900005cbdc0 R15: dead000000000100 [ 15.373330] FS: 0000000000000000(0000) GS:ffff88803ec00000(0000) knlGS:0000000000000000 [ 15.373382] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 15.373425] CR2: 000056421c468958 CR3: 000000001b458001 CR4: 0000000000170eb0 [ 15.373478] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 15.373529] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 15.373580] Call Trace: [ 15.373611] ? cfg80211_process_wdev_events+0x10e/0x170 [ 15.373743] cfg80211_process_wdev_events+0x10e/0x170 [ 15.373783] cfg80211_process_rdev_events+0x21/0x40 [ 15.373846] cfg80211_event_work+0x20/0x30 [ 15.373892] process_one_work+0x1e9/0x340 [ 15.373956] worker_thread+0x4b/0x3f0 [ 15.374017] ? process_one_work+0x340/0x340 [ 15.374053] kthread+0x11f/0x140 [ 15.374089] ? set_kthread_struct+0x30/0x30 [ 15.374153] ret_from_fork+0x1f/0x30 [ 15.374187] ---[ end trace 321ef0cb7e9c0be1 ]--- wlan0 (phy #0): connected to 00:00:00:00:00:00 Add the fake bss just before the connect so that cfg80211_get_bss() finds the virtual network. As some code was duplicated, move it in a common function. Signed-off-by: Matteo Croce Link: https://lore.kernel.org/r/20210706154423.11065-1-mcroce@linux.microsoft.com Signed-off-by: Johannes Berg commit a5d3cbdb09ff1f52cbe040932e06c8b9915c6dad Author: Felix Fietkau Date: Fri Jul 2 07:01:11 2021 +0200 mac80211: fix enabling 4-address mode on a sta vif after assoc Notify the driver about the 4-address mode change and also send a nulldata packet to the AP to notify it about the change Fixes: 1ff4e8f2dec8 ("mac80211: notify the driver when a sta uses 4-address mode") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20210702050111.47546-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 1a7915501ca94a1f10288defe333cd5ade210b63 Author: Felix Fietkau Date: Tue Jun 29 13:28:53 2021 +0200 mac80211: fix starting aggregation sessions on mesh interfaces The logic for starting aggregation sessions was recently moved from minstrel_ht to mac80211, into the subif tx handler just after the sta lookup. Unfortunately this didn't work for mesh interfaces, since the sta lookup is deferred until a much later point in time on those. Fix this by also calling the aggregation check right after the deferred sta lookup. Fixes: 08a46c642001 ("mac80211: move A-MPDU session check from minstrel_ht to mac80211") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20210629112853.29785-1-nbd@nbd.name Signed-off-by: Johannes Berg commit ec61cd49bf566401306cfc4855bda8c08bbaa46c Author: Johan Almbladh Date: Mon Jun 28 14:37:13 2021 +0200 mac80211: Do not strip skb headroom on monitor frames When a monitor interface is present together with other interfaces, a received skb is copied and received on the monitor netdev. Before, the copied skb was allocated with exactly the amount of space needed for the radiotap header, resulting in an skb without any headroom at all being received on the monitor netdev. With the introduction of eBPF and XDP in the kernel, skbs may be processed by custom eBPF programs. However, since the skb cannot be reallocated in the eBPF program, no more data or headers can be pushed. The old code made sure the final headroom was zero regardless of the value of NET_SKB_PAD, so increasing that constant would have no effect. Now we allocate monitor skb copies with a headroom of NET_SKB_PAD bytes before the radiotap header. Monitor interfaces now behave in the same way as other netdev interfaces that honor the NET_SKB_PAD constant. Signed-off-by: Johan Almbladh Link: https://lore.kernel.org/r/20210628123713.2070753-1-johan.almbladh@anyfinetworks.com Signed-off-by: Johannes Berg commit 3d9e30a52047f2d464efdfd1d561ae1f707a0286 Author: Marek Vasut Date: Sun Jul 18 23:43:02 2021 +0200 ARM: dts: imx: Swap M53Menlo pinctrl_power_button/pinctrl_power_out pins The pinctrl_power_button/pinctrl_power_out each define single GPIO pinmux, except it is exactly the other one than the matching gpio-keys and gpio-poweroff DT nodes use for that functionality. Swap the two GPIOs to correct this error. Fixes: 50d29fdb765d ("ARM: dts: imx53: Add power GPIOs on M53Menlo") Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 20fb73911fec01f06592de1cdbca00b66602ebd7 Author: Colin Ian King Date: Thu Jul 15 14:23:21 2021 +0100 ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init The function imx_mmdc_perf_init recently had a 3rd argument added to it but the equivalent macro was not updated and is still the older 2 argument version. Fix this by adding in the missing 3rd argumement mmdc_ipg_clk. Fixes: f07ec8536580 ("ARM: imx: add missing clk_disable_unprepare()") Signed-off-by: Colin Ian King Signed-off-by: Shawn Guo commit d9c57d3ed52a92536f5fa59dc5ccdd58b4875076 Author: Nicholas Piggin Date: Thu Jul 8 21:26:22 2021 +1000 KVM: PPC: Book3S HV Nested: Sanitise H_ENTER_NESTED TM state The H_ENTER_NESTED hypercall is handled by the L0, and it is a request by the L1 to switch the context of the vCPU over to that of its L2 guest, and return with an interrupt indication. The L1 is responsible for switching some registers to guest context, and the L0 switches others (including all the hypervisor privileged state). If the L2 MSR has TM active, then the L1 is responsible for recheckpointing the L2 TM state. Then the L1 exits to L0 via the H_ENTER_NESTED hcall, and the L0 saves the TM state as part of the exit, and then it recheckpoints the TM state as part of the nested entry and finally HRFIDs into the L2 with TM active MSR. Not efficient, but about the simplest approach for something that's horrendously complicated. Problems arise if the L1 exits to the L0 with a TM state which does not match the L2 TM state being requested. For example if the L1 is transactional but the L2 MSR is non-transactional, or vice versa. The L0's HRFID can take a TM Bad Thing interrupt and crash. Fix this by disallowing H_ENTER_NESTED in TM[T] state entirely, and then ensuring that if the L1 is suspended then the L2 must have TM active, and if the L1 is not suspended then the L2 must not have TM active. Fixes: 360cae313702 ("KVM: PPC: Book3S HV: Nested guest entry via hypercall") Cc: stable@vger.kernel.org # v4.20+ Reported-by: Alexey Kardashevskiy Acked-by: Michael Neuling Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit f62f3c20647ebd5fb6ecb8f0b477b9281c44c10a Author: Nicholas Piggin Date: Tue Jul 20 20:43:09 2021 +1000 KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow The kvmppc_rtas_hcall() sets the host rtas_args.rets pointer based on the rtas_args.nargs that was provided by the guest. That guest nargs value is not range checked, so the guest can cause the host rets pointer to be pointed outside the args array. The individual rtas function handlers check the nargs and nrets values to ensure they are correct, but if they are not, the handlers store a -3 (0xfffffffd) failure indication in rets[0] which corrupts host memory. Fix this by testing up front whether the guest supplied nargs and nret would exceed the array size, and fail the hcall directly without storing a failure indication to rets[0]. Also expand on a comment about why we kill the guest and try not to return errors directly if we have a valid rets[0] pointer. Fixes: 8e591cb72047 ("KVM: PPC: Book3S: Add infrastructure to implement kernel-side RTAS calls") Cc: stable@vger.kernel.org # v3.10+ Reported-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman commit e39cdacf2f664b09029e7c1eb354c91a20c367af Author: Zheyu Ma Date: Tue Jun 22 07:11:31 2021 +0000 pcmcia: i82092: fix a null pointer dereference bug During the driver loading process, the 'dev' field was not assigned, but the 'dev' field was referenced in the subsequent 'i82092aa_set_mem_map' function. Signed-off-by: Zheyu Ma CC: [linux@dominikbrodowski.net: shorten commit message, add Cc to stable] Signed-off-by: Dominik Brodowski commit db6b84a368b495cb7e41be9cb9e73d4d0537d027 Author: Alexandre Ghiti Date: Tue Jun 29 11:13:48 2021 +0200 riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE The check that is done in setup_bootmem currently only works for 32-bit kernel since the kernel mapping has been moved outside of the linear mapping for 64-bit kernel. So make sure that for 64-bit kernel, the kernel mapping does not overlap with the last 4K of the addressable memory. Signed-off-by: Alexandre Ghiti Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Palmer Dabbelt commit c99127c452484ac89c75af39c3c865174ce2de99 Author: Alexandre Ghiti Date: Tue Jun 29 11:13:47 2021 +0200 riscv: Make sure the linear mapping does not use the kernel mapping For 64-bit kernel, the end of the address space is occupied by the kernel mapping and currently, the functions to populate the kernel page tables (i.e. create_p*d_mapping) do not override existing mapping so we must make sure the linear mapping does not map memory in the kernel mapping by clipping the memory above the memory limit. Signed-off-by: Alexandre Ghiti Fixes: c9811e379b21 ("riscv: Add mem kernel parameter support") Signed-off-by: Palmer Dabbelt commit 8baef6386baaefb776bdd09b5c7630cf057c51c6 Merge: e08100fe957e2 2e41a6696bf82 Author: Linus Torvalds Date: Thu Jul 22 20:32:13 2021 -0700 Merge tag 'drm-fixes-2021-07-23' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes - a bunch of amdgpu fixes are the main thing mostly for the new gpus. There is also some i915 reverts for older changes that were having some unwanted side effects. One nouveau fix for a report regressions, and otherwise just some misc fixes. core: - fix for non-drm ioctls on drm fd panel: - avoid double free ttm: - refcounting fix - NULL checks amdgpu: - Yellow Carp updates - Add some Yellow Carp DIDs - Beige Goby updates - CIK 10bit 4K regression fix - GFX10 golden settings updates - eDP panel regression fix - Misc display fixes - Aldebaran fix - fix COW checks nouveau: - init BO GEM fields i915: - revert async command parsing - revert fence error propogation - GVT fix for shadow ppgtt vc4: - fix interrupt handling" * tag 'drm-fixes-2021-07-23' of git://anongit.freedesktop.org/drm/drm: (34 commits) drm/panel: raspberrypi-touchscreen: Prevent double-free drm/amdgpu - Corrected the video codecs array name for yellow carp drm/amd/display: Fix ASSR regression on embedded panels drm/amdgpu: add yellow carp pci id (v2) drm/amdgpu: update yellow carp external rev_id handling drm/amd/pm: Support board calibration on aldebaran drm/amd/display: change zstate allow msg condition drm/amd/display: Populate dtbclk entries for dcn3.02/3.03 drm/amd/display: Line Buffer changes drm/amd/display: Remove MALL function from DCN3.1 drm/amd/display: Only set default brightness for OLED drm/amd/display: Update bounding box for DCN3.1 drm/amd/display: Query VCO frequency from register for DCN3.1 drm/amd/display: Populate socclk entries for dcn3.02/3.03 drm/amd/display: Fix max vstartup calculation for modes with borders drm/amd/display: implement workaround for riommu related hang drm/amd/display: Fix comparison error in dcn21 DML drm/i915: Correct the docs for intel_engine_cmd_parser drm/ttm: add missing NULL checks drm/ttm: Force re-init if ttm_global_init() fails ... commit c09dc9e1cd3c205f66b2505d742e819735c0eb6f Author: Alexandre Ghiti Date: Tue Jun 29 11:13:46 2021 +0200 riscv: Fix memory_limit for 64-bit kernel As described in Documentation/riscv/vm-layout.rst, the end of the virtual address space for 64-bit kernel is occupied by the modules/BPF/ kernel mappings so this actually reduces the amount of memory we are able to map and then use in the linear mapping. So make sure this limit is correctly set. Signed-off-by: Alexandre Ghiti Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Palmer Dabbelt commit 828db68f4ff1ab6982a36a56522b585160dc8c8e Author: Oleksandr Suvorov Date: Tue Jul 13 23:21:07 2021 +0300 ARM: dts: colibri-imx6ull: limit SDIO clock to 25MHz NXP and AzureWave don't recommend using SDIO bus mode 3.3V@50MHz due to noise affecting the wireless throughput. Colibri iMX6ULL uses only 3.3V signaling for Wi-Fi module AW-CM276NF. Limit the SDIO Clock on Colibri iMX6ULL to 25MHz. Fixes: c2e4987e0e02 ("ARM: dts: imx6ull: add Toradex Colibri iMX6ULL support") Signed-off-by: Oleksandr Suvorov Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 29f6a20c21b5bdc7eb623a712bbf7b99612ee746 Author: Michael Walle Date: Fri Jul 2 21:49:14 2021 +0200 arm64: dts: ls1028: sl28: fix networking for variant 2 The PHY configuration for the variant 2 is still missing the flag for in-band signalling between PHY and MAC. Both sides - MAC and PHY - have to match the setting. For now, Linux only supports setting the MAC side and thus it has to match the setting the bootloader is configuring. Enable in-band signalling to make ethernet work. Fixes: ab43f0307449 ("arm64: dts: ls1028a: sl28: add support for variant 2") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 488968a8945c119859d91bb6a8dc13bf50002f15 Author: Ronnie Sahlberg Date: Fri Jul 23 11:21:24 2021 +1000 cifs: fix fallocate when trying to allocate a hole. Remove the conditional checking for out_data_len and skipping the fallocate if it is 0. This is wrong will actually change any legitimate the fallocate where the entire region is unallocated into a no-op. Additionally, before allocating the range, if FALLOC_FL_KEEP_SIZE is set then we need to clamp the length of the fallocate region as to not extend the size of the file. Fixes: 966a3cb7c7db ("cifs: improve fallocate emulation") Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit e08100fe957e2f0b5ae476c5b5ae0df5ecaa3563 Merge: 9bead1b58c4c4 615c77eb5e870 Author: Linus Torvalds Date: Thu Jul 22 19:02:25 2021 -0700 Merge tag 'fallthrough-fixes-clang-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fix from Gustavo Silva: "Fix a fall-through warning when building with -Wimplicit-fallthrough on PowerPC" * tag 'fallthrough-fixes-clang-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: powerpc/pasemi: Fix fall-through warning for Clang commit 2e41a6696bf828a7b06f520d147f6911c947a7af Merge: 36ebaeb48b7da 7bbcb919e32d7 Author: Dave Airlie Date: Fri Jul 23 11:16:58 2021 +1000 Merge tag 'drm-misc-fixes-2021-07-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * Return -ENOTTY for non-DRM ioctls * amdgpu: Fix COW checks * nouveau: init BO GME fields * panel: Avoid double free * ttm: Fix refcounting in ttm_global_init(); NULL checks * vc4: Fix interrupt handling Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YPlbkmH6S4VAHP9j@linux-uq9g.fritz.box commit 36ebaeb48b7da3a5e30973e7decb9081dc4a0671 Merge: 995a1460f26f1 6e0b6528d783b Author: Dave Airlie Date: Fri Jul 23 10:43:37 2021 +1000 Merge tag 'drm-intel-fixes-2021-07-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Couple reverts from Jason getting rid of asynchronous command parsing and fence error propagation and a GVT fix of shadow ppgtt invalidation with proper D3 state tracking from Colin. Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YPl1sIyruD0U5Orl@intel.com commit 0cc936f74bcacb039b7533aeac0a887dfc896bf6 Author: Jens Axboe Date: Thu Jul 22 17:08:07 2021 -0600 io_uring: fix early fdput() of file A previous commit shuffled some code around, and inadvertently used struct file after fdput() had been called on it. As we can't touch the file post fdput() dropping our reference, move the fdput() to after that has been done. Cc: Pavel Begunkov Cc: stable@vger.kernel.org Link: https://lore.kernel.org/io-uring/YPnqM0fY3nM5RdRI@zeniv-ca.linux.org.uk/ Fixes: f2a48dd09b8e ("io_uring: refactor io_sq_offload_create()") Reported-by: Al Viro Signed-off-by: Jens Axboe commit 9bead1b58c4c4a85319d0fc8a5c83e7374977d28 Merge: 9f42f674a8920 8d4abca95ecc8 Author: Linus Torvalds Date: Thu Jul 22 14:38:28 2021 -0700 Merge tag 'array-bounds-fixes-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull array bounds warning fix from Gustavo Silva: "Fix a couple of out-of-bounds warnings in the media subsystem. This is part of the ongoing efforts to globally enable -Warray-bounds" * tag 'array-bounds-fixes-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf() commit 7054133da39a82c1dc44ce796f13a7cb0d6a0b3c Merge: ec645dc96699e aaeb7bb061be5 Author: Jens Axboe Date: Thu Jul 22 14:23:55 2021 -0600 Merge tag 'nvme-5.14-2021-07-22' of git://git.infradead.org/nvme into block-5.14 Pull NVMe fixes from Christoph: "nvme fixes for Linux 5.14: - tracing fix (Keith Busch) - fix multipath head refcounting (Hannes Reinecke) - Write Zeroes vs PI fix (me) - drop a bogus WARN_ON (Zhihao Cheng)" * tag 'nvme-5.14-2021-07-22' of git://git.infradead.org/nvme: nvme: set the PRACT bit when using Write Zeroes with T10 PI nvme: fix nvme_setup_command metadata trace event nvme: fix refcounting imbalance when all paths are down nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING commit 7b09d4e0be94968b7c6c117e34ca90cea9c6d986 Author: Steve French Date: Thu Jul 22 14:35:15 2021 -0500 CIFS: Clarify SMB1 code for POSIX delete file Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for SMB1 CIFSPOSIXDelFile. This changeset doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711519 ("Out of bounds write") Signed-off-by: Steve French commit 1d1b97d5e7636d72890a5bdd0b40e980e54b2d34 Merge: f3a1a937f7b24 d6a206e60124a Author: Greg Kroah-Hartman Date: Thu Jul 22 20:51:14 2021 +0200 Merge tag 'usb-serial-5.14-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.14-rc3 Here are some new device ids and a device-id comment fix. All have been in linux-next with no reported issues. * tag 'usb-serial-5.14-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick USB: serial: cp210x: fix comments for GE CS1000 USB: serial: option: add support for u-blox LARA-R6 family commit 21a64910997e0c1d268bebf9b1217ba5804d592d Author: Steve French Date: Thu Jul 22 13:50:41 2021 -0500 CIFS: Clarify SMB1 code for POSIX Create Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for SMB1 CIFSPOSIXCreate. This changeset doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711518 ("Out of bounds write") Signed-off-by: Steve French commit 9f42f674a89200d4f465a7db6070e079f3c6145f Merge: 7c14e4d6fbdd6 d8a719059b9dc Author: Linus Torvalds Date: Thu Jul 22 10:38:19 2021 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "A pair of arm64 fixes for -rc3. The straightforward one is a fix to our firmware calling stub, which accidentally started corrupting the link register on machines with SVE. Since these machines don't really exist yet, it wasn't spotted in -next. The other fix is a revert-and-a-bit of a patch originally intended to allow PTE-level huge mappings for the VMAP area on 32-bit PPC 8xx. A side-effect of this change was that our pXd_set_huge() implementations could be replaced with generic dummy functions depending on the levels of page-table being used, which in turn broke the boot if we fail to create the linear mapping as a result of using these functions to operate on the pgd. Huge thanks to Michael Ellerman for modifying the revert so as not to regress PPC 8xx in terms of functionality. Anyway, that's the background and it's also available in the commit message along with Link tags pointing at all of the fun. Summary: - Fix hang when issuing SMC on SVE-capable system due to clobbered LR - Fix boot failure due to missing block mappings with folded page-table" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" arm64: smccc: Save lr before calling __arm_smccc_sve_check() commit 7c14e4d6fbdd68bf8026868e8de263017c81b83d Merge: 4784dc99c73c2 f5a11c69b6992 Author: Linus Torvalds Date: Thu Jul 22 10:22:52 2021 -0700 Merge tag 'hyperv-fixes-signed-20210722' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - bug fix from Haiyang for vmbus CPU assignment - revert of a bogus patch that went into 5.14-rc1 * tag 'hyperv-fixes-signed-20210722' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Revert "x86/hyperv: fix logical processor creation" Drivers: hv: vmbus: Fix duplicate CPU assignments within a device commit 4784dc99c73c22cd4a24f3b8793728620b457485 Merge: 5e09e197a85a9 7aaa0f311e2df Author: Linus Torvalds Date: Thu Jul 22 10:11:27 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix type of bind option flag in af_xdp, from Baruch Siach. 2) Fix use after free in bpf_xdp_link_release(), from Xuan Zhao. 3) PM refcnt imbakance in r8152, from Takashi Iwai. 4) Sign extension ug in liquidio, from Colin Ian King. 5) Mising range check in s390 bpf jit, from Colin Ian King. 6) Uninit value in caif_seqpkt_sendmsg(), from Ziyong Xuan. 7) Fix skb page recycling race, from Ilias Apalodimas. 8) Fix memory leak in tcindex_partial_destroy_work, from Pave Skripkin. 9) netrom timer sk refcnt issues, from Nguyen Dinh Phi. 10) Fix data races aroun tcp's tfo_active_disable_stamp, from Eric Dumazet. 11) act_skbmod should only operate on ethernet packets, from Peilin Ye. 12) Fix slab out-of-bpunds in fib6_nh_flush_exceptions(),, from Psolo Abeni. 13) Fix sparx5 dependencies, from Yajun Deng. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (74 commits) dpaa2-switch: seed the buffer pool after allocating the swp net: sched: cls_api: Fix the the wrong parameter net: sparx5: fix unmet dependencies warning net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum net: dsa: ensure linearized SKBs in case of tail taggers ravb: Remove extra TAB ravb: Fix a typo in comment net: dsa: sja1105: make VID 4095 a bridge VLAN too tcp: disable TFO blackhole logic by default sctp: do not update transport pathmtu if SPP_PMTUD_ENABLE is not set net: ixp46x: fix ptp build failure ibmvnic: Remove the proper scrq flush selftests: net: add ESP-in-UDP PMTU test udp: check encap socket in __udp_lib_err sctp: update active_key for asoc when old key is being replaced r8169: Avoid duplicate sysfs entry creation error ixgbe: Fix packet corruption due to missing DMA sync Revert "qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()" ipv6: fix another slab-out-of-bounds in fib6_nh_flush_exceptions fsl/fman: Add fibre support ... commit 5e09e197a85a98d59d9089ffb2fae1d0b1ba6cd2 Merge: 3d5895cd35175 10252bae863d0 Author: Linus Torvalds Date: Thu Jul 22 09:51:38 2021 -0700 Merge tag 'mmc-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - Use kref to fix KASAN splats triggered during card removal - Don't allocate IDA for OF aliases * tag 'mmc-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: Don't allocate IDA for OF aliases mmc: core: Use kref in place of struct mmc_blk_data::usage commit b62366181a5e9473e9c10e98f400049491c55876 Author: Paulo Alcantara Date: Fri Jul 16 03:26:41 2021 -0300 cifs: support share failover when remounting When remouting a DFS share, force a new DFS referral of the path and if the currently cached targets do not match any of the new targets or there was no cached targets, then mark it for reconnect. For example: $ mount //dom/dfs/link /mnt -o username=foo,password=bar $ ls /mnt oldfile.txt change target share of 'link' in server settings $ mount /mnt -o remount,username=foo,password=bar $ ls /mnt newfile.txt Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 2485bd7557a7edb4520b4072af464f0a08c8efe0 Author: Ronnie Sahlberg Date: Thu Jul 22 14:53:32 2021 +1000 cifs: only write 64kb at a time when fallocating a small region of a file We only allow sending single credit writes through the SMB2_write() synchronous api so split this into smaller chunks. Fixes: 966a3cb7c7db ("cifs: improve fallocate emulation") Signed-off-by: Ronnie Sahlberg Reported-by: Namjae Jeon Signed-off-by: Steve French commit 67f0d6d9883c13174669f88adac4f0ee656cc16a Author: Haoran Luo Date: Wed Jul 21 14:12:07 2021 +0000 tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop. The "rb_per_cpu_empty()" misinterpret the condition (as not-empty) when "head_page" and "commit_page" of "struct ring_buffer_per_cpu" points to the same buffer page, whose "buffer_data_page" is empty and "read" field is non-zero. An error scenario could be constructed as followed (kernel perspective): 1. All pages in the buffer has been accessed by reader(s) so that all of them will have non-zero "read" field. 2. Read and clear all buffer pages so that "rb_num_of_entries()" will return 0 rendering there's no more data to read. It is also required that the "read_page", "commit_page" and "tail_page" points to the same page, while "head_page" is the next page of them. 3. Invoke "ring_buffer_lock_reserve()" with large enough "length" so that it shot pass the end of current tail buffer page. Now the "head_page", "commit_page" and "tail_page" points to the same page. 4. Discard current event with "ring_buffer_discard_commit()", so that "head_page", "commit_page" and "tail_page" points to a page whose buffer data page is now empty. When the error scenario has been constructed, "tracing_read_pipe" will be trapped inside a deadloop: "trace_empty()" returns 0 since "rb_per_cpu_empty()" returns 0 when it hits the CPU containing such constructed ring buffer. Then "trace_find_next_entry_inc()" always return NULL since "rb_num_of_entries()" reports there's no more entry to read. Finally "trace_seq_to_user()" returns "-EBUSY" spanking "tracing_read_pipe" back to the start of the "waitagain" loop. I've also written a proof-of-concept script to construct the scenario and trigger the bug automatically, you can use it to trace and validate my reasoning above: https://github.com/aegistudio/RingBufferDetonator.git Tests has been carried out on linux kernel 5.14-rc2 (2734d6c1b1a089fb593ef6a23d4b70903526fe0c), my fixed version of kernel (for testing whether my update fixes the bug) and some older kernels (for range of affected kernels). Test result is also attached to the proof-of-concept repository. Link: https://lore.kernel.org/linux-trace-devel/YPaNxsIlb2yjSi5Y@aegistudio/ Link: https://lore.kernel.org/linux-trace-devel/YPgrN85WL9VyrZ55@aegistudio Cc: stable@vger.kernel.org Fixes: bf41a158cacba ("ring-buffer: make reentrant") Suggested-by: Linus Torvalds Signed-off-by: Haoran Luo Signed-off-by: Steven Rostedt (VMware) commit e09f2ab8eecc6dcbd7013a1303cbe56b00dc9fb0 Author: Andreas Schwab Date: Thu Jul 22 15:48:45 2021 +0200 spi: update modalias_show after of_device_uevent_modalias support Commit 3ce6c9e2617e ("spi: add of_device_uevent_modalias support") is incomplete, as it didn't update the modalias_show function to generate the of: modalias string if available. Fixes: 3ce6c9e2617e ("spi: add of_device_uevent_modalias support") Signed-off-by: Andreas Schwab Link: https://lore.kernel.org/r/mvmwnpi4fya.fsf@suse.de Signed-off-by: Mark Brown commit 8311ee2164c5cd1b63a601ea366f540eae89f10e Author: Dongliang Mu Date: Tue Jul 20 18:01:16 2021 +0800 spi: meson-spicc: fix memory leak in meson_spicc_remove In meson_spicc_probe, the error handling code needs to clean up master by calling spi_master_put, but the remove function does not have this function call. This will lead to memory leak of spicc->master. Reported-by: Dongliang Mu Fixes: 454fa271bc4e("spi: Add Meson SPICC driver") Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20210720100116.1438974-1-mudongliangabcd@gmail.com Signed-off-by: Mark Brown commit 5434d0dc56bce4510109a431a7eb71ec5131ef0f Author: Vijendar Mukunda Date: Thu Jul 22 18:33:15 2021 +0530 ASoC: amd: enable stop_dma_first flag for cz_dai_7219_98357 dai link DMA driver stop sequence should be invoked first before invoking I2S controller driver stop sequence for Stoneyridge platform. Enable stop_dma_first flag for cz_dai_7219_98357 dai link structure. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20210722130328.23796-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 1a64a7aff8da352c9419de3d5c34343682916411 Author: jason-jh.lin Date: Thu Jul 22 09:47:43 2021 +0800 drm/mediatek: Fix cursor plane no update The cursor plane should use the current plane state in atomic_async_update because it would not be the new plane state in the global atomic state since _swap_state happened when those hook are run. Fix cursor plane issue by below modification: 1. Remove plane_helper_funcs->atomic_update(plane, state) in mtk_drm_crtc_async_update. 2. Add mtk_drm_update_new_state in to mtk_plane_atomic_async_update to update the cursor plane by current plane state hook and update others plane by the new_state. Fixes: 37418bf14c13 ("drm: Use state helper instead of the plane state pointer") Signed-off-by: jason-jh.lin Tested-by: Enric Balletbo i Serra Signed-off-by: Chun-Kuang Hu commit 6b57ba3243c5774e5b2a0984e8ca0d34a126ac6b Author: Hsin-Yi Wang Date: Mon Jul 12 17:46:57 2021 +0800 drm/mediatek: mtk-dpi: Set out_fmt from config if not the last bridge atomic_get_output_bus_fmts() is only called when the bridge is the last element in the bridge chain. If mtk-dpi is not the last bridge, the format of output_bus_cfg is MEDIA_BUS_FMT_FIXED, and mtk_dpi_dual_edge() will fail to write correct value to regs. Fixes: ec8747c52434 ("drm/mediatek: dpi: Add bus format negotiation") Signed-off-by: Hsin-Yi Wang Signed-off-by: Chun-Kuang Hu commit c7c3a6dcb1efd52949acc1e640be9aad1206a13a Author: Christoph Hellwig Date: Thu Jul 22 09:53:59 2021 +0200 btrfs: store a block_device in struct btrfs_ordered_extent Store the block device instead of the gendisk in the btrfs_ordered_extent structure instead of acquiring a reference to it later. Note: this is from series removing bdgrab/bdput, btrfs is one of the last users. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8949b9a114019b03fbd0d03d65b8647cba4feef3 Author: Filipe Manana Date: Wed Jul 21 17:31:48 2021 +0100 btrfs: fix lock inversion problem when doing qgroup extent tracing At btrfs_qgroup_trace_extent_post() we call btrfs_find_all_roots() with a NULL value as the transaction handle argument, which makes that function take the commit_root_sem semaphore, which is necessary when we don't hold a transaction handle or any other mechanism to prevent a transaction commit from wiping out commit roots. However btrfs_qgroup_trace_extent_post() can be called in a context where we are holding a write lock on an extent buffer from a subvolume tree, namely from btrfs_truncate_inode_items(), called either during truncate or unlink operations. In this case we end up with a lock inversion problem because the commit_root_sem is a higher level lock, always supposed to be acquired before locking any extent buffer. Lockdep detects this lock inversion problem since we switched the extent buffer locks from custom locks to semaphores, and when running btrfs/158 from fstests, it reported the following trace: [ 9057.626435] ====================================================== [ 9057.627541] WARNING: possible circular locking dependency detected [ 9057.628334] 5.14.0-rc2-btrfs-next-93 #1 Not tainted [ 9057.628961] ------------------------------------------------------ [ 9057.629867] kworker/u16:4/30781 is trying to acquire lock: [ 9057.630824] ffff8e2590f58760 (btrfs-tree-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x24/0x110 [btrfs] [ 9057.632542] but task is already holding lock: [ 9057.633551] ffff8e25582d4b70 (&fs_info->commit_root_sem){++++}-{3:3}, at: iterate_extent_inodes+0x10b/0x280 [btrfs] [ 9057.635255] which lock already depends on the new lock. [ 9057.636292] the existing dependency chain (in reverse order) is: [ 9057.637240] -> #1 (&fs_info->commit_root_sem){++++}-{3:3}: [ 9057.638138] down_read+0x46/0x140 [ 9057.638648] btrfs_find_all_roots+0x41/0x80 [btrfs] [ 9057.639398] btrfs_qgroup_trace_extent_post+0x37/0x70 [btrfs] [ 9057.640283] btrfs_add_delayed_data_ref+0x418/0x490 [btrfs] [ 9057.641114] btrfs_free_extent+0x35/0xb0 [btrfs] [ 9057.641819] btrfs_truncate_inode_items+0x424/0xf70 [btrfs] [ 9057.642643] btrfs_evict_inode+0x454/0x4f0 [btrfs] [ 9057.643418] evict+0xcf/0x1d0 [ 9057.643895] do_unlinkat+0x1e9/0x300 [ 9057.644525] do_syscall_64+0x3b/0xc0 [ 9057.645110] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 9057.645835] -> #0 (btrfs-tree-00){++++}-{3:3}: [ 9057.646600] __lock_acquire+0x130e/0x2210 [ 9057.647248] lock_acquire+0xd7/0x310 [ 9057.647773] down_read_nested+0x4b/0x140 [ 9057.648350] __btrfs_tree_read_lock+0x24/0x110 [btrfs] [ 9057.649175] btrfs_read_lock_root_node+0x31/0x40 [btrfs] [ 9057.650010] btrfs_search_slot+0x537/0xc00 [btrfs] [ 9057.650849] scrub_print_warning_inode+0x89/0x370 [btrfs] [ 9057.651733] iterate_extent_inodes+0x1e3/0x280 [btrfs] [ 9057.652501] scrub_print_warning+0x15d/0x2f0 [btrfs] [ 9057.653264] scrub_handle_errored_block.isra.0+0x135f/0x1640 [btrfs] [ 9057.654295] scrub_bio_end_io_worker+0x101/0x2e0 [btrfs] [ 9057.655111] btrfs_work_helper+0xf8/0x400 [btrfs] [ 9057.655831] process_one_work+0x247/0x5a0 [ 9057.656425] worker_thread+0x55/0x3c0 [ 9057.656993] kthread+0x155/0x180 [ 9057.657494] ret_from_fork+0x22/0x30 [ 9057.658030] other info that might help us debug this: [ 9057.659064] Possible unsafe locking scenario: [ 9057.659824] CPU0 CPU1 [ 9057.660402] ---- ---- [ 9057.660988] lock(&fs_info->commit_root_sem); [ 9057.661581] lock(btrfs-tree-00); [ 9057.662348] lock(&fs_info->commit_root_sem); [ 9057.663254] lock(btrfs-tree-00); [ 9057.663690] *** DEADLOCK *** [ 9057.664437] 4 locks held by kworker/u16:4/30781: [ 9057.665023] #0: ffff8e25922a1148 ((wq_completion)btrfs-scrub){+.+.}-{0:0}, at: process_one_work+0x1c7/0x5a0 [ 9057.666260] #1: ffffabb3451ffe70 ((work_completion)(&work->normal_work)){+.+.}-{0:0}, at: process_one_work+0x1c7/0x5a0 [ 9057.667639] #2: ffff8e25922da198 (&ret->mutex){+.+.}-{3:3}, at: scrub_handle_errored_block.isra.0+0x5d2/0x1640 [btrfs] [ 9057.669017] #3: ffff8e25582d4b70 (&fs_info->commit_root_sem){++++}-{3:3}, at: iterate_extent_inodes+0x10b/0x280 [btrfs] [ 9057.670408] stack backtrace: [ 9057.670976] CPU: 7 PID: 30781 Comm: kworker/u16:4 Not tainted 5.14.0-rc2-btrfs-next-93 #1 [ 9057.672030] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 9057.673492] Workqueue: btrfs-scrub btrfs_work_helper [btrfs] [ 9057.674258] Call Trace: [ 9057.674588] dump_stack_lvl+0x57/0x72 [ 9057.675083] check_noncircular+0xf3/0x110 [ 9057.675611] __lock_acquire+0x130e/0x2210 [ 9057.676132] lock_acquire+0xd7/0x310 [ 9057.676605] ? __btrfs_tree_read_lock+0x24/0x110 [btrfs] [ 9057.677313] ? lock_is_held_type+0xe8/0x140 [ 9057.677849] down_read_nested+0x4b/0x140 [ 9057.678349] ? __btrfs_tree_read_lock+0x24/0x110 [btrfs] [ 9057.679068] __btrfs_tree_read_lock+0x24/0x110 [btrfs] [ 9057.679760] btrfs_read_lock_root_node+0x31/0x40 [btrfs] [ 9057.680458] btrfs_search_slot+0x537/0xc00 [btrfs] [ 9057.681083] ? _raw_spin_unlock+0x29/0x40 [ 9057.681594] ? btrfs_find_all_roots_safe+0x11f/0x140 [btrfs] [ 9057.682336] scrub_print_warning_inode+0x89/0x370 [btrfs] [ 9057.683058] ? btrfs_find_all_roots_safe+0x11f/0x140 [btrfs] [ 9057.683834] ? scrub_write_block_to_dev_replace+0xb0/0xb0 [btrfs] [ 9057.684632] iterate_extent_inodes+0x1e3/0x280 [btrfs] [ 9057.685316] scrub_print_warning+0x15d/0x2f0 [btrfs] [ 9057.685977] ? ___ratelimit+0xa4/0x110 [ 9057.686460] scrub_handle_errored_block.isra.0+0x135f/0x1640 [btrfs] [ 9057.687316] scrub_bio_end_io_worker+0x101/0x2e0 [btrfs] [ 9057.688021] btrfs_work_helper+0xf8/0x400 [btrfs] [ 9057.688649] ? lock_is_held_type+0xe8/0x140 [ 9057.689180] process_one_work+0x247/0x5a0 [ 9057.689696] worker_thread+0x55/0x3c0 [ 9057.690175] ? process_one_work+0x5a0/0x5a0 [ 9057.690731] kthread+0x155/0x180 [ 9057.691158] ? set_kthread_struct+0x40/0x40 [ 9057.691697] ret_from_fork+0x22/0x30 Fix this by making btrfs_find_all_roots() never attempt to lock the commit_root_sem when it is called from btrfs_qgroup_trace_extent_post(). We can't just pass a non-NULL transaction handle to btrfs_find_all_roots() from btrfs_qgroup_trace_extent_post(), because that would make backref lookup not use commit roots and acquire read locks on extent buffers, and therefore could deadlock when btrfs_qgroup_trace_extent_post() is called from the btrfs_truncate_inode_items() code path which has acquired a write lock on an extent buffer of the subvolume btree. CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 16a200f66ede3f9afa2e51d90ade017aaa18d213 Author: Anand Jain Date: Sun Jul 4 19:14:39 2021 +0800 btrfs: check for missing device in btrfs_trim_fs A fstrim on a degraded raid1 can trigger the following null pointer dereference: BTRFS info (device loop0): allowing degraded mounts BTRFS info (device loop0): disk space caching is enabled BTRFS info (device loop0): has skinny extents BTRFS warning (device loop0): devid 2 uuid 97ac16f7-e14d-4db1-95bc-3d489b424adb is missing BTRFS warning (device loop0): devid 2 uuid 97ac16f7-e14d-4db1-95bc-3d489b424adb is missing BTRFS info (device loop0): enabling ssd optimizations BUG: kernel NULL pointer dereference, address: 0000000000000620 PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 0 PID: 4574 Comm: fstrim Not tainted 5.13.0-rc7+ #31 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 RIP: 0010:btrfs_trim_fs+0x199/0x4a0 [btrfs] RSP: 0018:ffff959541797d28 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff946f84eca508 RCX: a7a67937adff8608 RDX: ffff946e8122d000 RSI: 0000000000000000 RDI: ffffffffc02fdbf0 RBP: ffff946ea4615000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: ffff946e8122d960 R12: 0000000000000000 R13: ffff959541797db8 R14: ffff946e8122d000 R15: ffff959541797db8 FS: 00007f55917a5080(0000) GS:ffff946f9bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000620 CR3: 000000002d2c8001 CR4: 00000000000706f0 Call Trace: btrfs_ioctl_fitrim+0x167/0x260 [btrfs] btrfs_ioctl+0x1c00/0x2fe0 [btrfs] ? selinux_file_ioctl+0x140/0x240 ? syscall_trace_enter.constprop.0+0x188/0x240 ? __x64_sys_ioctl+0x83/0xb0 __x64_sys_ioctl+0x83/0xb0 Reproducer: $ mkfs.btrfs -fq -d raid1 -m raid1 /dev/loop0 /dev/loop1 $ mount /dev/loop0 /btrfs $ umount /btrfs $ btrfs dev scan --forget $ mount -o degraded /dev/loop0 /btrfs $ fstrim /btrfs The reason is we call btrfs_trim_free_extents() for the missing device, which uses device->bdev (NULL for missing device) to find if the device supports discard. Fix is to check if the device is missing before calling btrfs_trim_free_extents(). CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9acc8103ab594f72250788cb45a43427f36d685d Author: Filipe Manana Date: Tue Jul 6 15:41:15 2021 +0100 btrfs: fix unpersisted i_size on fsync after expanding truncate If we have an inode that does not have the full sync flag set, was changed in the current transaction, then it is logged while logging some other inode (like its parent directory for example), its i_size is increased by a truncate operation, the log is synced through an fsync of some other inode and then finally we explicitly call fsync on our inode, the new i_size is not persisted. The following example shows how to trigger it, with comments explaining how and why the issue happens: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ touch /mnt/foo $ xfs_io -f -c "pwrite -S 0xab 0 1M" /mnt/bar $ sync # Fsync bar, this will be a noop since the file has not yet been # modified in the current transaction. The goal here is to clear # BTRFS_INODE_NEEDS_FULL_SYNC from the inode's runtime flags. $ xfs_io -c "fsync" /mnt/bar # Now rename both files, without changing their parent directory. $ mv /mnt/bar /mnt/bar2 $ mv /mnt/foo /mnt/foo2 # Increase the size of bar2 with a truncate operation. $ xfs_io -c "truncate 2M" /mnt/bar2 # Now fsync foo2, this results in logging its parent inode (the root # directory), and logging the parent results in logging the inode of # file bar2 (its inode item and the new name). The inode of file bar2 # is logged with an i_size of 0 bytes since it's logged in # LOG_INODE_EXISTS mode, meaning we are only logging its names (and # xattrs if it had any) and the i_size of the inode will not be changed # when the log is replayed. $ xfs_io -c "fsync" /mnt/foo2 # Now explicitly fsync bar2. This resulted in doing nothing, not # logging the inode with the new i_size of 2M and the hole from file # offset 1M to 2M. Because the inode did not have the flag # BTRFS_INODE_NEEDS_FULL_SYNC set, when it was logged through the # fsync of file foo2, its last_log_commit field was updated, # resulting in this explicit of file bar2 not doing anything. $ xfs_io -c "fsync" /mnt/bar2 # File bar2 content and size before a power failure. $ od -A d -t x1 /mnt/bar2 0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab * 1048576 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 2097152 # Mount the filesystem to replay the log. $ mount /dev/sdc /mnt # Read the file again, should have the same content and size as before # the power failure happened, but it doesn't, i_size is still at 1M. $ od -A d -t x1 /mnt/bar2 0000000 ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab * 1048576 This started to happen after commit 209ecbb8585bf6 ("btrfs: remove stale comment and logic from btrfs_inode_in_log()"), since btrfs_inode_in_log() no longer checks if the inode's list of modified extents is not empty. However, checking that list is not the right way to address this case and the check was added long time ago in commit 125c4cf9f37c98 ("Btrfs: set inode's logged_trans/last_log_commit after ranged fsync") for a different purpose, to address consecutive ranged fsyncs. The reason that checking for the list emptiness makes this test pass is because during an expanding truncate we create an extent map to represent a hole from the old i_size to the new i_size, and add that extent map to the list of modified extents in the inode. However if we are low on available memory and we can not allocate a new extent map, then we don't treat it as an error and just set the full sync flag on the inode, so that the next fsync does not rely on the list of modified extents - so checking for the emptiness of the list to decide if the inode needs to be logged is not reliable, and results in not logging the inode if it was not possible to allocate the extent map for the hole. Fix this by ensuring that if we are only logging that an inode exists (inode item, names/references and xattrs), we don't update the inode's last_log_commit even if it does not have the full sync runtime flag set. A test case for fstests follows soon. CC: stable@vger.kernel.org # 5.13+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 7aaa0f311e2df2704fa8ddb8ed681a3b5841d0bf Author: Ioana Ciornei Date: Thu Jul 22 15:15:51 2021 +0300 dpaa2-switch: seed the buffer pool after allocating the swp Any interraction with the buffer pool (seeding a buffer, acquire one) is made through a software portal (SWP, a DPIO object). There are circumstances where the dpaa2-switch driver probes on a DPSW before any DPIO devices have been probed. In this case, seeding of the buffer pool will lead to a panic since no SWPs are initialized. To fix this, seed the buffer pool after making sure that the software portals have been probed and are ready to be used. Fixes: 0b1b71370458 ("staging: dpaa2-switch: handle Rx path on control interface") Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1d5ccab95f06675a269f4cb223a1e3f6d1ebef42 Author: Uwe Kleine-König Date: Wed Jul 21 11:53:21 2021 +0200 spi: spi-mux: Add module info needed for autoloading With the spi device table udev can autoload the spi-mux module in the presence of an spi-mux device. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210721095321.2165453-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 090c57da5fd59fb59adc9d9341a77558c93b0abd Author: Marek Vasut Date: Tue Jul 20 22:03:48 2021 +0200 ASoC: tlv320aic32x4: Fix TAS2505/TAS2521 processing block selection The TAS2505/TAS2521 does support only three processing block options, unlike TLV320AIC32x4 which supports 25. This is documented in TI slau472 2.5.1.2 Processing Blocks and Page 0 / Register 60: DAC Instruction Set - 0x00 / 0x3C. Limit the Processing Blocks maximum value to 3 on TAS2505/TAS2521 and select processing block PRB_P1 always, because for the configuration of teh codec implemented in this driver, this is the best quality option. Fixes: b4525b6196cd7 ("ASoC: tlv320aic32x4: add support for TAS2505") Signed-off-by: Marek Vasut Cc: Claudius Heine Cc: Mark Brown Link: https://lore.kernel.org/r/20210720200348.182139-1-marex@denx.de Signed-off-by: Mark Brown commit d00f541a49406afc2c091aac121e29b3b61480a2 Author: Mario Limonciello Date: Wed Jul 21 13:36:03 2021 -0500 ASoC: amd: renoir: Run hibernation callbacks The registers need to be re-initialized after hibernation or microphone may be non-functional. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213793 Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210721183603.747-2-mario.limonciello@amd.com Signed-off-by: Mark Brown commit 6d20bf7c020f417fdef1810a22da17c126603472 Author: Derek Fang Date: Wed Jul 21 21:31:21 2021 +0800 ASoC: rt5682: Adjust headset volume button threshold Adjust the threshold of headset button volume+ to fix the wrong button detection issue with some brand headsets. Signed-off-by: Derek Fang Link: https://lore.kernel.org/r/20210721133121.12333-1-derek.fang@realtek.com Signed-off-by: Mark Brown commit b9a4b57f423ff8ff9ab9b68a238bdc3e7678f723 Author: Arnd Bergmann Date: Wed Jul 21 17:04:45 2021 +0200 ASoC: codecs: wcd938x: fix wcd module dependency With SND_SOC_ALL_CODECS=y and SND_SOC_WCD938X_SDW=m, there is a link error from a reverse dependency, since the built-in codec driver calls into the modular soundwire back-end: x86_64-linux-ld: sound/soc/codecs/wcd938x.o: in function `wcd938x_codec_free': wcd938x.c:(.text+0x2c0): undefined reference to `wcd938x_sdw_free' x86_64-linux-ld: sound/soc/codecs/wcd938x.o: in function `wcd938x_codec_hw_params': wcd938x.c:(.text+0x2f6): undefined reference to `wcd938x_sdw_hw_params' x86_64-linux-ld: sound/soc/codecs/wcd938x.o: in function `wcd938x_codec_set_sdw_stream': wcd938x.c:(.text+0x332): undefined reference to `wcd938x_sdw_set_sdw_stream' x86_64-linux-ld: sound/soc/codecs/wcd938x.o: in function `wcd938x_tx_swr_ctrl': wcd938x.c:(.text+0x23de): undefined reference to `wcd938x_swr_get_current_bank' x86_64-linux-ld: sound/soc/codecs/wcd938x.o: in function `wcd938x_bind': wcd938x.c:(.text+0x2579): undefined reference to `wcd938x_sdw_device_get' x86_64-linux-ld: wcd938x.c:(.text+0x25a1): undefined reference to `wcd938x_sdw_device_get' x86_64-linux-ld: wcd938x.c:(.text+0x262a): undefined reference to `__devm_regmap_init_sdw' Work around this using two small hacks: An added Kconfig dependency prevents the main driver from being built-in when soundwire support itself is a loadable module to allow calling devm_regmap_init_sdw(), and a Makefile trick links the wcd938x-sdw backend as built-in if needed to solve the dependency between the two modules. Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210721150510.1837221-1-arnd@kernel.org Signed-off-by: Mark Brown commit 69de4421bb4c103ef42a32bafc596e23918c106f Author: Jason Ekstrand Date: Wed Jul 21 10:23:57 2021 -0500 drm/ttm: Initialize debugfs from ttm_global_init() We create a bunch of debugfs entries as a side-effect of ttm_global_init() and then never clean them up. This isn't usually a problem because we free the whole debugfs directory on module unload. However, if the global reference count ever goes to zero and then ttm_global_init() is called again, we'll re-create those debugfs entries and debugfs will complain in dmesg that we're creating entries that already exist. This patch fixes this problem by changing the lifetime of the whole TTM debugfs directory to match that of the TTM global state. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210721152358.2893314-6-jason@jlekstrand.net commit 7cb745800df9d352db83f163778fdfc301457625 Merge: 2580d3f400226 70bfdf62e93a4 Author: Steffen Klassert Date: Thu Jul 22 11:45:20 2021 +0200 Merge branch 'xfrm/compat: Fix xfrm_spdattr_type_t copying' Dmitry Safonov says: ==================== Here is the fix for both 32=>64 and 64=>32 bit translators and a selftest that reproduced the issue. Big thanks to YueHaibing for fuzzing and reporting the issue, I really appreciate it! ==================== Signed-off-by: Steffen Klassert commit 7bbcb919e32d776ca8ddce08abb391ab92eef6a9 Author: Maxime Ripard Date: Tue Jul 20 15:45:23 2021 +0200 drm/panel: raspberrypi-touchscreen: Prevent double-free The mipi_dsi_device allocated by mipi_dsi_device_register_full() is already free'd on release. Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.") Signed-off-by: Maxime Ripard Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210720134525.563936-9-maxime@cerno.tech commit 73606ba9242f8e32023699b500b7922b4cf2993c Author: Mike Tipton Date: Wed Jul 21 10:54:30 2021 -0700 interconnect: Always call pre_aggregate before aggregate The pre_aggregate callback isn't called in all cases before calling aggregate. Add the missing calls so providers can rely on consistent framework behavior. Fixes: d3703b3e255f ("interconnect: Aggregate before setting initial bandwidth") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20210721175432.2119-3-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit 456a9dace42ecfcec7ce6e17c18d1985d628dcd0 Author: Mike Tipton Date: Wed Jul 21 10:54:29 2021 -0700 interconnect: Zero initial BW after sync-state The initial BW values may be used by providers to enforce floors. Zero these values after sync-state so that providers know when to stop enforcing them. Fixes: b1d681d8d324 ("interconnect: Add sync state support") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20210721175432.2119-2-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit 9d85a6f44bd5585761947f40f7821c9cd78a1bbe Author: Yajun Deng Date: Thu Jul 22 11:23:43 2021 +0800 net: sched: cls_api: Fix the the wrong parameter The 4th parameter in tc_chain_notify() should be flags rather than seq. Let's change it back correctly. Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") Signed-off-by: Yajun Deng Signed-off-by: David S. Miller commit 98c5b13f3a878066741a907a9d0f1f388556ed5c Author: Randy Dunlap Date: Wed Jul 21 15:33:36 2021 -0700 net: sparx5: fix unmet dependencies warning WARNING: unmet direct dependencies detected for PHY_SPARX5_SERDES Depends on [n]: (ARCH_SPARX5 || COMPILE_TEST [=n]) && OF [=y] && HAS_IOMEM [=y] Selected by [y]: - SPARX5_SWITCH [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROCHIP [=y] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y] && OF [=y] Signed-off-by: Randy Dunlap Cc: Lars Povlsen Cc: Steen Hegelund Cc: UNGLinuxDriver@microchip.com Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit b0084afde27fe8a504377dee65f55bc6aa776937 Author: Alexander Tsoy Date: Thu Jul 22 02:56:05 2021 +0300 ALSA: usb-audio: Add registration quirk for JBL Quantum headsets These devices has two interfaces, but only the second interface contains the capture endpoint, thus quirk is required to delay the registration until the second interface appears. Tested-by: Jakub Fišer Signed-off-by: Alexander Tsoy Cc: Link: https://lore.kernel.org/r/20210721235605.53741-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 5ca096dbeaef0654f59d61196dd49c7254c6d826 Merge: 9f061b9acbb0b 37120f23ac899 Author: David S. Miller Date: Wed Jul 21 23:15:06 2021 -0700 Merge branch 'ksz-dsa-fixes' Lino Sanfilippo says: ==================== Fixes for KSZ DSA switch These patches fix issues I encountered while using a KSZ9897 as a DSA switch with a broadcom GENET network device as the DSA master device. PATCH 1 fixes an invalid access to an SKB in case it is scattered. PATCH 2 fixes incorrect hardware checksum calculation caused by the DSA tag. Changes in v2: - instead of linearizing the SKBs only for KSZ switches ensure linearized SKBs for all tail taggers by clearing the feature flags NETIF_F_HW_SG and NETIF_F_FRAGLIST (suggested by Vladimir Oltean) The patches have been tested with a KSZ9897 and apply against net-next. ==================== Signed-off-by: David S. Miller commit 37120f23ac8998c250573ea3247ff77426551f69 Author: Lino Sanfilippo Date: Wed Jul 21 23:56:42 2021 +0200 net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum If the checksum calculation is offloaded to the network device (e.g due to NETIF_F_HW_CSUM inherited from the DSA master device), the calculated layer 4 checksum is incorrect. This is since the DSA tag which is placed after the layer 4 data is considered as being part of the daa and thus errorneously included into the checksum calculation. To avoid this, always calculate the layer 4 checksum in software. Signed-off-by: Lino Sanfilippo Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 21cf377a9c40658777ecbd6242be449a19a84e44 Author: Lino Sanfilippo Date: Wed Jul 21 23:56:41 2021 +0200 net: dsa: ensure linearized SKBs in case of tail taggers The function skb_put() that is used by tail taggers to make room for the DSA tag must only be called for linearized SKBS. However in case that the slave device inherited features like NETIF_F_HW_SG or NETIF_F_FRAGLIST the SKB passed to the slaves transmit function may not be linearized. Avoid those SKBs by clearing the NETIF_F_HW_SG and NETIF_F_FRAGLIST flags for tail taggers. Furthermore since the tagging protocol can be changed at runtime move the code for setting up the slaves features into dsa_slave_setup_tagger(). Suggested-by: Vladimir Oltean Signed-off-by: Lino Sanfilippo Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c79e89ecaa246c880292ba68cbe08c9c30db77e3 Author: Heinrich Schuchardt Date: Tue Jun 29 15:40:18 2021 +0200 RISC-V: load initrd wherever it fits into memory Requiring that initrd is loaded below RAM start + 256 MiB led to failure to boot SUSE Linux with GRUB on QEMU, cf. https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html Remove the constraint. Reported-by: Andreas Schwab Signed-off-by: Heinrich Schuchardt Reviewed-by: Atish Patra Acked-by: Ard Biesheuvel Fixes: d7071743db31 ("RISC-V: Add EFI stub support.") Signed-off-by: Palmer Dabbelt commit 9f061b9acbb0bdf5317b301c1608ca55be522c92 Author: Biju Das Date: Wed Jul 21 19:21:26 2021 +0100 ravb: Remove extra TAB Align the member description comments for struct ravb_desc by removing the extra TAB. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 291d0a2c1fa6ff437c8f1156646fdd2525714c80 Author: Biju Das Date: Wed Jul 21 19:17:21 2021 +0100 ravb: Fix a typo in comment Fix the typo RX->TX in comment, as the code following the comment process TX and not RX. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit e40cba9490bab1414d45c2d62defc0ad4f6e4136 Author: Vladimir Oltean Date: Wed Jul 21 15:37:59 2021 +0300 net: dsa: sja1105: make VID 4095 a bridge VLAN too This simple series of commands: ip link add br0 type bridge vlan_filtering 1 ip link set swp0 master br0 fails on sja1105 with the following error: [ 33.439103] sja1105 spi0.1: vlan-lookup-table needs to have at least the default untagged VLAN [ 33.447710] sja1105 spi0.1: Invalid config, cannot upload Warning: sja1105: Failed to change VLAN Ethertype. For context, sja1105 has 3 operating modes: - SJA1105_VLAN_UNAWARE: the dsa_8021q_vlans are committed to hardware - SJA1105_VLAN_FILTERING_FULL: the bridge_vlans are committed to hardware - SJA1105_VLAN_FILTERING_BEST_EFFORT: both the dsa_8021q_vlans and the bridge_vlans are committed to hardware Swapping out a VLAN list and another in happens in sja1105_build_vlan_table(), which performs a delta update procedure. That function is called from a few places, notably from sja1105_vlan_filtering() which is called from the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING handler. The above set of 2 commands fails when run on a kernel pre-commit 8841f6e63f2c ("net: dsa: sja1105: make devlink property best_effort_vlan_filtering true by default"). So the priv->vlan_state transition that takes place is between VLAN-unaware and full VLAN filtering. So the dsa_8021q_vlans are swapped out and the bridge_vlans are swapped in. So why does it fail? Well, the bridge driver, through nbp_vlan_init(), first sets up the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING attribute, and only then proceeds to call nbp_vlan_add for the default_pvid. So when we swap out the dsa_8021q_vlans and swap in the bridge_vlans in the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING handler, there are no bridge VLANs (yet). So we have wiped the VLAN table clean, and the low-level static config checker complains of an invalid configuration. We _will_ add the bridge VLANs using the dynamic config interface, albeit later, when nbp_vlan_add() calls us. So it is natural that it fails. So why did it ever work? Surprisingly, it looks like I only tested this configuration with 2 things set up in a particular way: - a network manager that brings all ports up - a kernel with CONFIG_VLAN_8021Q=y It is widely known that commit ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)") installs VID 0 to every net device that comes up. DSA treats these VLANs as bridge VLANs, and therefore, in my testing, the list of bridge_vlans was never empty. However, if CONFIG_VLAN_8021Q is not enabled, or the port is not up when it joins a VLAN-aware bridge, the bridge_vlans list will be temporarily empty, and the sja1105_static_config_reload() call from sja1105_vlan_filtering() will fail. To fix this, the simplest thing is to keep VID 4095, the one used for CPU-injected control packets since commit ed040abca4c1 ("net: dsa: sja1105: use 4095 as the private VLAN for untagged traffic"), in the list of bridge VLANs too, not just the list of tag_8021q VLANs. This ensures that the list of bridge VLANs will never be empty. Fixes: ec5ae61076d0 ("net: dsa: sja1105: save/restore VLANs using a delta commit method") Reported-by: Radu Pirea (NXP OSS) Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 213ad73d06073b197a02476db3a4998e219ddb06 Author: Wei Wang Date: Wed Jul 21 10:27:38 2021 -0700 tcp: disable TFO blackhole logic by default Multiple complaints have been raised from the TFO users on the internet stating that the TFO blackhole logic is too aggressive and gets falsely triggered too often. (e.g. https://blog.apnic.net/2021/07/05/tcp-fast-open-not-so-fast/) Considering that most middleboxes no longer drop TFO packets, we decide to disable the blackhole logic by setting /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_set to 0 by default. Fixes: cf1ef3f0719b4 ("net/tcp_fastopen: Disable active side TFO in certain scenarios") Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit 444818b599189fd8b6c814da542ff8cfc9fe67d4 Merge: e73f0f0ee7541 d0e4dae74470f Author: Palmer Dabbelt Date: Wed Jul 21 22:18:58 2021 -0700 Merge remote-tracking branch 'riscv/riscv-fix-32bit' into fixes This contains a single fix for 32-bit boot. It happens this was already fixed by c9811e379b21 ("riscv: Add mem kernel parameter support"), but the bug existed before that feature addition so I've applied the patch earlier and then merged it in (which results in a conflict, which is fixed via not changing the resulting tree). * riscv/riscv-fix-32bit: riscv: Fix 32-bit RISC-V boot failure commit d0e4dae74470fb709fc0ab61862c317938f4cc4d Author: Bin Meng Date: Sun Jun 27 21:51:17 2021 +0800 riscv: Fix 32-bit RISC-V boot failure Commit dd2d082b5760 ("riscv: Cleanup setup_bootmem()") adjusted the calling sequence in setup_bootmem(), which invalidates the fix commit de043da0b9e7 ("RISC-V: Fix usage of memblock_enforce_memory_limit") did for 32-bit RISC-V unfortunately. So now 32-bit RISC-V does not boot again when testing booting kernel on QEMU 'virt' with '-m 2G', which was exactly what the original commit de043da0b9e7 ("RISC-V: Fix usage of memblock_enforce_memory_limit") tried to fix. Fixes: dd2d082b5760 ("riscv: Cleanup setup_bootmem()") Signed-off-by: Bin Meng Signed-off-by: Palmer Dabbelt commit 995a1460f26f159bf98908543f7311ece0019399 Merge: 2734d6c1b1a08 d80cded9cc25f Author: Dave Airlie Date: Thu Jul 22 10:52:54 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-07-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-07-21: amdgpu: - Yellow Carp updates - Add some Yellow Carp DIDs - Beige Goby updates - CIK 10bit 4K regression fix - GFX10 golden settings updates - eDP panel regression fix - Misc display fixes - Aldebaran fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210721215800.17590-1-alexander.deucher@amd.com commit e062233c0ed0a76b6dd4ec785550419a323f9380 Author: Frank Wunderlich Date: Mon Jul 12 10:07:36 2021 +0200 drm/mediatek: dpi: Fix NULL dereference in mtk_dpi_bridge_atomic_check bridge->driver_private is not set (NULL) so use bridge_to_dpi(bridge) like it's done in bridge_atomic_get_output_bus_fmts Fixes: ec8747c52434 ("drm/mediatek: dpi: Add bus format negotiation") Signed-off-by: Frank Wunderlich Tested-by: Hsin-Yi Wang Signed-off-by: Chun-Kuang Hu commit d80cded9cc25f841d5250d2e94a7b42be1e81c97 Author: Veerabadhran Gopalakrishnan Date: Mon Jul 19 19:06:23 2021 +0530 drm/amdgpu - Corrected the video codecs array name for yellow carp Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 02dc2ee7c7476dd831df63d2b10cc0a162a531f1 Author: Xin Long Date: Wed Jul 21 14:45:54 2021 -0400 sctp: do not update transport pathmtu if SPP_PMTUD_ENABLE is not set Currently, in sctp_packet_config(), sctp_transport_pmtu_check() is called to update transport pathmtu with dst's mtu when dst's mtu has been changed by non sctp stack like xfrm. However, this should only happen when SPP_PMTUD_ENABLE is set, no matter where dst's mtu changed. This patch is to fix by checking SPP_PMTUD_ENABLE flag before calling sctp_transport_pmtu_check(). Thanks Jacek for reporting and looking into this issue. v1->v2: - add the missing "{" to fix the build error. Fixes: 69fec325a643 ('Revert "sctp: remove sctp_transport_pmtu_check"') Reported-by: Jacek Szafraniec Tested-by: Jacek Szafraniec Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 3d5895cd351757f69c9a66fb5fc8cf19f454d773 Merge: 7b6ae471e5415 0cde560a8bfc3 Author: Linus Torvalds Date: Wed Jul 21 13:51:26 2021 -0700 Merge tag 's390-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - fix / add expoline usage in "DMA" code - fix compat vdso Makefile to avoid permanent rebuild - fix ftrace_update_ftrace_func to avoid NULL pointer dereference - update defconfigs - trivial coding style fix * tag 's390-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: update defconfigs s390/cpumf: fix semicolon.cocci warnings s390/boot: fix use of expolines in the DMA code s390/ftrace: fix ftrace_update_ftrace_func implementation s390/defconfig: allow early device mapper disks s390/vdso32: add vdso32.lds to targets commit 7b6ae471e5415bc2bf4384a83ccb4c21de7824c0 Merge: 7c3d49b0b545d c45c1e82bba13 Author: Linus Torvalds Date: Wed Jul 21 12:41:41 2021 -0700 Merge tag 'spi-fix-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A collection of driver specific fixes, there was a bit of a kerfuffle with some last minute review on hte spi-cadence-quadspi division by zero change but otherwise nothing terribly remarkable here - important fixes if you have the hardware but nothing with too wide an impact" * tag 'spi-fix-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-bcm2835: Fix deadlock spi: cadence: Correct initialisation of runtime PM again spi: cadence-quadspi: Disable Auto-HW polling spi: spi-cadence-quadspi: Fix division by zero warning spi: spi-cadence-quadspi: Revert "Fix division by zero warning" spi: spi-cadence-quadspi: Fix division by zero warning spi: mediatek: move devm_spi_register_master position spi: mediatek: fix fifo rx mode spi: atmel: Fix CS and initialization bug spi: stm32: fixes pm_runtime calls in probe/remove spi: imx: mx51-ecspi: Reinstate low-speed CONFIGREG delay spi: stm32h7: fix full duplex irq handler handling commit 7c3d49b0b545d27372f824dce83139afeea61633 Merge: b4e62aaf95e8a 1c73daee4bf30 Author: Linus Torvalds Date: Wed Jul 21 12:37:49 2021 -0700 Merge tag 'regulator-fix-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few driver specific fixes that came in since the merge window, plus a change to mark the regulator-fixed-domain DT binding as deprecated in order to try to to discourage any new users while a better solution is put in place" * tag 'regulator-fix-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: hi6421: Fix getting wrong drvdata regulator: mtk-dvfsrc: Fix wrong dev pointer for devm_regulator_register regulator: fixed: Mark regulator-fixed-domain as deprecated regulator: bd9576: Fix testing wrong flag in check_temp_flag_mismatch regulator: hi6421v600: Fix getting wrong drvdata that causes boot failure regulator: rt5033: Fix n_voltages settings for BUCK and LDO regulator: rtmv20: Fix wrong mask for strobe-polarity-high commit b4e62aaf95e8a340f3a6e0e2fc9a649f875034b3 Merge: 8cae8cd89f05f b428081282f85 Author: Linus Torvalds Date: Wed Jul 21 11:51:59 2021 -0700 Merge tag 'afs-fixes-20210721' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: - Fix a tracepoint that causes one of the tracing subsystem query files to crash if the module is loaded - Fix afs_writepages() to take account of whether the storage rpc actually succeeded when updating the cyclic writeback counter - Fix some error code propagation/handling - Fix place where afs_writepages() was setting writeback_index to a file position rather than a page index * tag 'afs-fixes-20210721' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Remove redundant assignment to ret afs: Fix setting of writeback_index afs: check function return afs: Fix tracepoint string placement with built-in AFS commit 6be50f5d83adc9541de3d5be26e968182b5ac150 Author: Stylon Wang Date: Wed Jul 21 12:25:24 2021 +0800 drm/amd/display: Fix ASSR regression on embedded panels [Why] Regression found in some embedded panels traces back to the earliest upstreamed ASSR patch. The changed code flow are causing problems with some panels. [How] - Change ASSR enabling code while preserving original code flow as much as possible - Simplify the code on guarding with internal display flag Bug: https://bugzilla.kernel.org/show_bug.cgi?id=213779 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620 Reviewed-by: Alex Deucher Signed-off-by: Stylon Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 27f5355f5d9706dfc1c2542253689f421008c969 Author: Aaron Liu Date: Wed Nov 4 13:04:06 2020 +0800 drm/amdgpu: add yellow carp pci id (v2) Add Yellow Carp PCI id support. v2: add another DID Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ab7a11bd36ca6cd4d4dab2846eaacafaa5963cc1 Author: Aaron Liu Date: Wed Jun 2 10:32:41 2021 +0800 drm/amdgpu: update yellow carp external rev_id handling 0x1681 has a different external revision id. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6588b101ed0a71a60fa7df0a18ed7db07026d109 Author: Lijo Lazar Date: Thu Jul 15 14:54:49 2021 +0800 drm/amd/pm: Support board calibration on aldebaran Add support for board power calibration on Aldebaran. Board calibration is done after DC offset calibration. Signed-off-by: Lijo Lazar Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 93b6bd307a54ea62bfcf89748c80bd25b7bd3205 Author: Eric Yang Date: Wed Jun 30 18:22:51 2021 -0400 drm/amd/display: change zstate allow msg condition [Why] PMFW message which previously thought to only control Z9 controls both Z9 and Z10. Also HW design team requested that Z9 must only be supported on eDP due to content protection interop. [How] Change zstate support condition to match updated policy Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Eric Yang Signed-off-by: Alex Deucher commit ce350c6e786ef4bc3a4ddb58f8bdf2e48219fdaa Author: Bindu Ramamurthy Date: Fri Jul 9 10:35:33 2021 -0400 drm/amd/display: Populate dtbclk entries for dcn3.02/3.03 [Why] Populate dtbclk values from bwparams for dcn302, dcn303. [How] dtbclk values are fetched from bandwidthparams for all DPM levels and for DPM levels where smu returns 0, previous level values are reported. Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira Signed-off-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 0f984c942cd1703b26dc01351dc47b0c93bc32f3 Author: Nevenko Stupar Date: Fri Jul 9 13:05:11 2021 -0400 drm/amd/display: Line Buffer changes DCN 3x increased Line buffer size for DCHUB latency hiding, from 4 lines of 4K resolution lines to 5 lines of 4K resolution lines. All Line Buffer can be used as extended memory for P State change latency hiding. The maximum number of lines is increased to 32 lines. Finally, LB_MEMORY_CONFIG_1 (LB memory piece 1) and LB_MEMORY _CONFIG_2 (LB memory piece 2) are not affected, no change in size, only 3 pieces is affected, i.e., when all 3 pieces are used in both LB_MEMORY_CONFIG_0 and LB_MEMORY_CONFIG_3 (for 4:2:0) modes. Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Nevenko Stupar Signed-off-by: Alex Deucher commit 6580b28e0c734cea2f829e97827005c311293cb7 Author: Mikita Lipski Date: Mon Jun 14 20:21:42 2021 -0400 drm/amd/display: Remove MALL function from DCN3.1 [why] DCN31 doesn't have MALL in DMUB so to avoid sending unknown commands to DMUB just remove the function pointer. [how] Remove apply_idle_power_optimizations from function pointers structure for DCN31 Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 2d73eabe2984a435737498ab39bb1500a9ffe9a9 Author: Camille Cho Date: Thu Jul 8 18:28:37 2021 +0800 drm/amd/display: Only set default brightness for OLED [Why] We used to unconditionally set backlight path as AUX for panels capable of backlight adjustment via DPCD in set default brightness. [How] This should be limited to OLED panel only since we control backlight via PWM path for SDR mode in LCD HDR panel. Reviewed-by: Krunoslav Kovac Acked-by: Rodrigo Siqueira Signed-off-by: Camille Cho Signed-off-by: Alex Deucher commit a8e380fd8d71493623c94511f75e81786cffa223 Author: Nicholas Kazlauskas Date: Thu Jul 8 12:59:59 2021 -0400 drm/amd/display: Update bounding box for DCN3.1 [Why & How] We're missing a default value for dram_channel_width_bytes in the DCN3.1 SOC bounding box and we don't currently have the interface in place to query the actual value from VBIOS. Put in a hardcoded default until we have the interface in place. Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit b0364fa4fc045685f827ea34c0149c953d0240bd Author: Nicholas Kazlauskas Date: Wed Jul 7 16:38:57 2021 -0400 drm/amd/display: Query VCO frequency from register for DCN3.1 [Why] Hardcoding the VCO frequency isn't correct since we don't own or control the value. In the case where the hardcode is also missing we can't lightup display. [How] Query from the CLK register instead. Update the DFS frequency to be able to compute the VCO frequency. Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit f30f55158728b4423cf1caf666dd2e2c1943dc19 Author: Bindu Ramamurthy Date: Thu May 27 10:11:32 2021 -0400 drm/amd/display: Populate socclk entries for dcn3.02/3.03 [Why] Initialize socclk entries in bandwidth params for dcn302, dcn303. [How] Fetch the sockclk values from smu for the DPM levels and for the DPM levels where smu returns 0, previous level values are reported. Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira Signed-off-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit d7940911fc0754d99b208f0e3098762d39f403a0 Author: Nicholas Kazlauskas Date: Wed Jul 7 13:19:14 2021 -0400 drm/amd/display: Fix max vstartup calculation for modes with borders [Why] Vertical and horizontal borders in timings are treated as increasing the active area - vblank and hblank actually shrink. Our input into DML does not include these borders so it incorrectly assumes it has more time than available for vstartup and tmdl calculations for some modes with borders. An example of such a timing would be 640x480@72Hz: h_total: 832 h_border_left: 8 h_addressable: 640 h_border_right: 8 h_front_porch: 16 h_sync_width: 40 v_total: 520 v_border_top: 8 v_addressable: 480 v_border_bottom: 8 v_front_porch: 1 v_sync_width: 3 pix_clk_100hz: 315000 [How] Include borders as part of destination vactive/hactive. This change DCN20+ so it has wide impact, but the destination vactive and hactive are only really used for vstartup calculation anyway. Most modes do not have vertical or horizontal borders. Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 32f1d0cfc3444fb44ff1dba10d28e479690bdd3e Author: Eric Yang Date: Wed Jun 23 15:48:02 2021 -0400 drm/amd/display: implement workaround for riommu related hang [Why] During S4/S5/reboot, sometimes riommu invalidation request arrive too early, DCN may be unable to respond to the invalidation request resulting in pstate hang. [How] VBIOS will force allow pstate for riommu invalidation and driver will clear it after powering down display pipes. Acked-by: Rodrigo Siqueira Signed-off-by: Eric Yang Signed-off-by: Alex Deucher commit ec3102dc6b36c692104c4a0546d4119de59a3bc1 Author: Victor Lu Date: Thu Jun 24 11:05:42 2021 -0400 drm/amd/display: Fix comparison error in dcn21 DML [why] A comparison error made it possible to not iterate through all the specified prefetch modes. [how] Correct "<" to "<=" Reviewed-by: Dmytro Laktyushkin Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Victor Lu Signed-off-by: Alex Deucher commit 234d8f2726f705d6f6956610da7d42c51f050784 Merge: e81d71e343c6c 82d28b67f7809 Author: Takashi Iwai Date: Wed Jul 21 19:48:09 2021 +0200 Merge tag 'asoc-fix-v5.14-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.14 A collection of fixes for ASoC that have come in since the merge window, all driver specific. There is a new core feature added for reversing the order of operations when shutting down, this is needed to fix a bug with the AMD Stonyridge platform, and we also tweak the Kconfig to make the SSM2518 driver user selectable so it can be used with generic cards but that requires no actual code changes. commit d6a206e60124a9759dd7f6dfb86b0e1d3b1df82e Author: John Keeping Date: Wed Jul 21 17:17:45 2021 +0100 USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick Add the USB serial device ID for the CEL ZigBee EM3588 radio stick. Signed-off-by: John Keeping Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit b42b0bddcbc87b4c66f6497f66fc72d52b712aa7 Author: Yang Yingliang Date: Wed Jul 14 17:19:33 2021 +0800 workqueue: fix UAF in pwq_unbound_release_workfn() I got a UAF report when doing fuzz test: [ 152.880091][ T8030] ================================================================== [ 152.881240][ T8030] BUG: KASAN: use-after-free in pwq_unbound_release_workfn+0x50/0x190 [ 152.882442][ T8030] Read of size 4 at addr ffff88810d31bd00 by task kworker/3:2/8030 [ 152.883578][ T8030] [ 152.883932][ T8030] CPU: 3 PID: 8030 Comm: kworker/3:2 Not tainted 5.13.0+ #249 [ 152.885014][ T8030] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 [ 152.886442][ T8030] Workqueue: events pwq_unbound_release_workfn [ 152.887358][ T8030] Call Trace: [ 152.887837][ T8030] dump_stack_lvl+0x75/0x9b [ 152.888525][ T8030] ? pwq_unbound_release_workfn+0x50/0x190 [ 152.889371][ T8030] print_address_description.constprop.10+0x48/0x70 [ 152.890326][ T8030] ? pwq_unbound_release_workfn+0x50/0x190 [ 152.891163][ T8030] ? pwq_unbound_release_workfn+0x50/0x190 [ 152.891999][ T8030] kasan_report.cold.15+0x82/0xdb [ 152.892740][ T8030] ? pwq_unbound_release_workfn+0x50/0x190 [ 152.893594][ T8030] __asan_load4+0x69/0x90 [ 152.894243][ T8030] pwq_unbound_release_workfn+0x50/0x190 [ 152.895057][ T8030] process_one_work+0x47b/0x890 [ 152.895778][ T8030] worker_thread+0x5c/0x790 [ 152.896439][ T8030] ? process_one_work+0x890/0x890 [ 152.897163][ T8030] kthread+0x223/0x250 [ 152.897747][ T8030] ? set_kthread_struct+0xb0/0xb0 [ 152.898471][ T8030] ret_from_fork+0x1f/0x30 [ 152.899114][ T8030] [ 152.899446][ T8030] Allocated by task 8884: [ 152.900084][ T8030] kasan_save_stack+0x21/0x50 [ 152.900769][ T8030] __kasan_kmalloc+0x88/0xb0 [ 152.901416][ T8030] __kmalloc+0x29c/0x460 [ 152.902014][ T8030] alloc_workqueue+0x111/0x8e0 [ 152.902690][ T8030] __btrfs_alloc_workqueue+0x11e/0x2a0 [ 152.903459][ T8030] btrfs_alloc_workqueue+0x6d/0x1d0 [ 152.904198][ T8030] scrub_workers_get+0x1e8/0x490 [ 152.904929][ T8030] btrfs_scrub_dev+0x1b9/0x9c0 [ 152.905599][ T8030] btrfs_ioctl+0x122c/0x4e50 [ 152.906247][ T8030] __x64_sys_ioctl+0x137/0x190 [ 152.906916][ T8030] do_syscall_64+0x34/0xb0 [ 152.907535][ T8030] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 152.908365][ T8030] [ 152.908688][ T8030] Freed by task 8884: [ 152.909243][ T8030] kasan_save_stack+0x21/0x50 [ 152.909893][ T8030] kasan_set_track+0x20/0x30 [ 152.910541][ T8030] kasan_set_free_info+0x24/0x40 [ 152.911265][ T8030] __kasan_slab_free+0xf7/0x140 [ 152.911964][ T8030] kfree+0x9e/0x3d0 [ 152.912501][ T8030] alloc_workqueue+0x7d7/0x8e0 [ 152.913182][ T8030] __btrfs_alloc_workqueue+0x11e/0x2a0 [ 152.913949][ T8030] btrfs_alloc_workqueue+0x6d/0x1d0 [ 152.914703][ T8030] scrub_workers_get+0x1e8/0x490 [ 152.915402][ T8030] btrfs_scrub_dev+0x1b9/0x9c0 [ 152.916077][ T8030] btrfs_ioctl+0x122c/0x4e50 [ 152.916729][ T8030] __x64_sys_ioctl+0x137/0x190 [ 152.917414][ T8030] do_syscall_64+0x34/0xb0 [ 152.918034][ T8030] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 152.918872][ T8030] [ 152.919203][ T8030] The buggy address belongs to the object at ffff88810d31bc00 [ 152.919203][ T8030] which belongs to the cache kmalloc-512 of size 512 [ 152.921155][ T8030] The buggy address is located 256 bytes inside of [ 152.921155][ T8030] 512-byte region [ffff88810d31bc00, ffff88810d31be00) [ 152.922993][ T8030] The buggy address belongs to the page: [ 152.923800][ T8030] page:ffffea000434c600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d318 [ 152.925249][ T8030] head:ffffea000434c600 order:2 compound_mapcount:0 compound_pincount:0 [ 152.926399][ T8030] flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff) [ 152.927515][ T8030] raw: 057ff00000010200 dead000000000100 dead000000000122 ffff888009c42c80 [ 152.928716][ T8030] raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 [ 152.929890][ T8030] page dumped because: kasan: bad access detected [ 152.930759][ T8030] [ 152.931076][ T8030] Memory state around the buggy address: [ 152.931851][ T8030] ffff88810d31bc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 152.932967][ T8030] ffff88810d31bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 152.934068][ T8030] >ffff88810d31bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 152.935189][ T8030] ^ [ 152.935763][ T8030] ffff88810d31bd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 152.936847][ T8030] ffff88810d31be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 152.937940][ T8030] ================================================================== If apply_wqattrs_prepare() fails in alloc_workqueue(), it will call put_pwq() which invoke a work queue to call pwq_unbound_release_workfn() and use the 'wq'. The 'wq' allocated in alloc_workqueue() will be freed in error path when apply_wqattrs_prepare() fails. So it will lead a UAF. CPU0 CPU1 alloc_workqueue() alloc_and_link_pwqs() apply_wqattrs_prepare() fails apply_wqattrs_cleanup() schedule_work(&pwq->unbound_release_work) kfree(wq) worker_thread() pwq_unbound_release_workfn() <- trigger uaf here If apply_wqattrs_prepare() fails, the new pwq are not linked, it doesn't hold any reference to the 'wq', 'wq' is invalid to access in the worker, so add check pwq if linked to fix this. Fixes: 2d5f0764b526 ("workqueue: split apply_workqueue_attrs() into 3 stages") Cc: stable@vger.kernel.org # v4.2+ Reported-by: Hulk Robot Suggested-by: Lai Jiangshan Signed-off-by: Yang Yingliang Reviewed-by: Lai Jiangshan Tested-by: Pavel Skripkin Signed-off-by: Tejun Heo commit 83f877a09516bcb82e34df621cc3a794509a11a3 Author: Colin Ian King Date: Wed Jul 21 12:40:10 2021 +0100 xen/events: remove redundant initialization of variable irq The variable irq is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210721114010.108648-1-colin.king@canonical.com Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit 1e7107c5ef44431bc1ebbd4c353f1d7c22e5f2ec Author: Paul Gortmaker Date: Wed Jun 16 08:51:57 2021 -0400 cgroup1: fix leaked context root causing sporadic NULL deref in LTP Richard reported sporadic (roughly one in 10 or so) null dereferences and other strange behaviour for a set of automated LTP tests. Things like: BUG: kernel NULL pointer dereference, address: 0000000000000008 #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: 0 PID: 1516 Comm: umount Not tainted 5.10.0-yocto-standard #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014 RIP: 0010:kernfs_sop_show_path+0x1b/0x60 ...or these others: RIP: 0010:do_mkdirat+0x6a/0xf0 RIP: 0010:d_alloc_parallel+0x98/0x510 RIP: 0010:do_readlinkat+0x86/0x120 There were other less common instances of some kind of a general scribble but the common theme was mount and cgroup and a dubious dentry triggering the NULL dereference. I was only able to reproduce it under qemu by replicating Richard's setup as closely as possible - I never did get it to happen on bare metal, even while keeping everything else the same. In commit 71d883c37e8d ("cgroup_do_mount(): massage calling conventions") we see this as a part of the overall change: -------------- struct cgroup_subsys *ss; - struct dentry *dentry; [...] - dentry = cgroup_do_mount(&cgroup_fs_type, fc->sb_flags, root, - CGROUP_SUPER_MAGIC, ns); [...] - if (percpu_ref_is_dying(&root->cgrp.self.refcnt)) { - struct super_block *sb = dentry->d_sb; - dput(dentry); + ret = cgroup_do_mount(fc, CGROUP_SUPER_MAGIC, ns); + if (!ret && percpu_ref_is_dying(&root->cgrp.self.refcnt)) { + struct super_block *sb = fc->root->d_sb; + dput(fc->root); deactivate_locked_super(sb); msleep(10); return restart_syscall(); } -------------- In changing from the local "*dentry" variable to using fc->root, we now export/leave that dentry pointer in the file context after doing the dput() in the unlikely "is_dying" case. With LTP doing a crazy amount of back to back mount/unmount [testcases/bin/cgroup_regression_5_1.sh] the unlikely becomes slightly likely and then bad things happen. A fix would be to not leave the stale reference in fc->root as follows: --------------                 dput(fc->root); + fc->root = NULL;                 deactivate_locked_super(sb); -------------- ...but then we are just open-coding a duplicate of fc_drop_locked() so we simply use that instead. Cc: Al Viro Cc: Tejun Heo Cc: Zefan Li Cc: Johannes Weiner Cc: stable@vger.kernel.org # v5.1+ Reported-by: Richard Purdie Fixes: 71d883c37e8d ("cgroup_do_mount(): massage calling conventions") Signed-off-by: Paul Gortmaker Signed-off-by: Tejun Heo commit 161dcc02428858fe338b7493158ed6f5fc2a8f26 Author: Arnd Bergmann Date: Wed Jul 21 17:19:32 2021 +0200 net: ixp46x: fix ptp build failure The rework of the ixp46x cpu detection left the network driver in a half broken state: drivers/net/ethernet/xscale/ptp_ixp46x.c: In function 'ptp_ixp_init': drivers/net/ethernet/xscale/ptp_ixp46x.c:290:51: error: 'IXP4XX_TIMESYNC_BASE_VIRT' undeclared (first use in this function) 290 | (struct ixp46x_ts_regs __iomem *) IXP4XX_TIMESYNC_BASE_VIRT; | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/xscale/ptp_ixp46x.c:290:51: note: each undeclared identifier is reported only once for each function it appears in drivers/net/ethernet/xscale/ptp_ixp46x.c: At top level: drivers/net/ethernet/xscale/ptp_ixp46x.c:323:1: error: data definition has no type or storage class [-Werror] 323 | module_init(ptp_ixp_init); I have patches to complete the transition for a future release, but for the moment, add the missing include statements to get it to build again. Fixes: 09aa9aabdcc4 ("soc: ixp4xx: move cpu detection to linux/soc/ixp4xx/cpu.h") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit bb55362bd6976631b662ca712779b6532d8de0a6 Author: Sukadev Bhattiprolu Date: Tue Jul 20 19:34:39 2021 -0700 ibmvnic: Remove the proper scrq flush Commit 65d6470d139a ("ibmvnic: clean pending indirect buffs during reset") intended to remove the call to ibmvnic_tx_scrq_flush() when the ->resetting flag is true and was tested that way. But during the final rebase to net-next, the hunk got applied to a block few lines below (which happened to have the same diff context) and the wrong call to ibmvnic_tx_scrq_flush() got removed. Fix that by removing the correct ibmvnic_tx_scrq_flush() and restoring the one that was incorrectly removed. Fixes: 65d6470d139a ("ibmvnic: clean pending indirect buffs during reset") Reported-by: Dany Madden Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit f5a11c69b69923a4367d24365ad4dff6d4f3fc42 Author: Wei Liu Date: Wed Jul 21 15:55:43 2021 +0000 Revert "x86/hyperv: fix logical processor creation" This reverts commit 450605c28d571eddca39a65fdbc1338add44c6d9. Signed-off-by: Wei Liu commit 3ddaed6b09b09eb8b5d8c7c216a8b285f897370e Merge: 58acd10092268 ece1278a9b81b Author: David S. Miller Date: Wed Jul 21 08:50:52 2021 -0700 Merge branch 'pmtu-esp' Vadim Fedorenko ays: ==================== Fix PMTU for ESP-in-UDP encapsulation Bug 213669 uncovered regression in PMTU discovery for UDP-encapsulated routes and some incorrect usage in udp tunnel fields. This series fixes problems and also adds such case for selftests v3: - update checking logic to account SCTP use case v2: - remove refactor code that was in first patch - move checking logic to __udp{4,6}_lib_err_encap - add more tests, especially routed configuration ==================== Signed-off-by: David S. Miller commit ece1278a9b81bdfc088f087f8372a072b7010956 Author: Vadim Fedorenko Date: Tue Jul 20 23:35:29 2021 +0300 selftests: net: add ESP-in-UDP PMTU test The case of ESP in UDP encapsulation was not covered before. Add cases of local changes of MTU and difference on routed path. Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller commit 6e0b6528d783b2b87bd9e1bea97cf4dac87540d7 Author: Jason Ekstrand Date: Tue Jul 20 13:21:08 2021 -0500 drm/i915: Correct the docs for intel_engine_cmd_parser In 93b713304188 ("drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser""), the parameters to intel_engine_cmd_parser() were altered without updating the docs, causing Fi.CI.DOCS to start failing. Fixes: c9d9fdbc108a ("drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"") Signed-off-by: Jason Ekstrand Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210720182108.2761496-1-jason@jlekstrand.net Signed-off-by: Rodrigo Vivi [Added 'Fixes:' tag and corrected the hash for the ancestor] (cherry picked from commit 15eb083bdb561bb4862cd04cd0523e55483e877e) Signed-off-by: Rodrigo Vivi [Updated Fixes tag to match fixes branch] commit 9bfce73c8921c92a9565562e6e7d458d37b7ce80 Author: Vadim Fedorenko Date: Tue Jul 20 23:35:28 2021 +0300 udp: check encap socket in __udp_lib_err Commit d26796ae5894 ("udp: check udp sock encap_type in __udp_lib_err") added checks for encapsulated sockets but it broke cases when there is no implementation of encap_err_lookup for encapsulation, i.e. ESP in UDP encapsulation. Fix it by calling encap_err_lookup only if socket implements this method otherwise treat it as legal socket. Fixes: d26796ae5894 ("udp: check udp sock encap_type in __udp_lib_err") Signed-off-by: Vadim Fedorenko Reviewed-by: Xin Long Signed-off-by: David S. Miller commit 58acd10092268831e49de279446c314727101292 Author: Xin Long Date: Tue Jul 20 16:07:01 2021 -0400 sctp: update active_key for asoc when old key is being replaced syzbot reported a call trace: BUG: KASAN: use-after-free in sctp_auth_shkey_hold+0x22/0xa0 net/sctp/auth.c:112 Call Trace: sctp_auth_shkey_hold+0x22/0xa0 net/sctp/auth.c:112 sctp_set_owner_w net/sctp/socket.c:131 [inline] sctp_sendmsg_to_asoc+0x152e/0x2180 net/sctp/socket.c:1865 sctp_sendmsg+0x103b/0x1d30 net/sctp/socket.c:2027 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:821 sock_sendmsg_nosec net/socket.c:703 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:723 This is an use-after-free issue caused by not updating asoc->shkey after it was replaced in the key list asoc->endpoint_shared_keys, and the old key was freed. This patch is to fix by also updating active_key for asoc when old key is being replaced with a new one. Note that this issue doesn't exist in sctp_auth_del_key_id(), as it's not allowed to delete the active_key from the asoc. Fixes: 1b1e0bc99474 ("sctp: add refcnt support for sh_key") Reported-by: syzbot+b774577370208727d12b@syzkaller.appspotmail.com Signed-off-by: Xin Long Signed-off-by: David S. Miller commit cb7abd1db6e5f99a05f1a00b65be29029a6a152a Author: Arnd Bergmann Date: Wed Jul 21 17:35:44 2021 +0200 staging: rtl8723bs: select CONFIG_CRYPTO_LIB_ARC4 The other rtlwifi drivers already have this, but r8723bs was converted to the generic implementation without adding the select: ERROR: modpost: "arc4_crypt" [drivers/staging/rtl8723bs/r8723bs.ko] undefined! ERROR: modpost: "arc4_setkey" [drivers/staging/rtl8723bs/r8723bs.ko] undefined! Fixes: 1b11e893eda0 ("staging: rtl8723bs: replace private arc4 encryption with in-kernel one") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210721153550.3624490-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit e64daad660a0c9ace3acdc57099fffe5ed83f977 Author: Adrian Hunter Date: Fri Jul 16 14:44:07 2021 +0300 driver core: Prevent warning when removing a device link from unregistered consumer sysfs_remove_link() causes a warning if the parent directory does not exist. That can happen if the device link consumer has not been registered. So do not attempt sysfs_remove_link() in that case. Fixes: 287905e68dd29 ("driver core: Expose device link details in sysfs") Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # 5.9+ Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20210716114408.17320-2-adrian.hunter@intel.com Signed-off-by: Greg Kroah-Hartman commit aaeb7bb061be545251606f4d9c82d710ca2a7c8e Author: Christoph Hellwig Date: Wed Jul 21 10:00:11 2021 +0200 nvme: set the PRACT bit when using Write Zeroes with T10 PI When using Write Zeroes on a namespace that has protection information enabled they behavior without the PRACT bit counter-intuitive and will generally lead to validation failures when reading the written blocks. Fix this by always setting the PRACT bit that generates matching PI data on the fly. Fixes: 6e02318eaea5 ("nvme: add support for the Write Zeroes command") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen commit 0077a50082729c3f9ea2836f59e35d9b7dacfb12 Author: Ilya Dryomov Date: Wed Jul 21 12:16:26 2021 +0200 rbd: resurrect setting of disk->private_data in rbd_init_disk() rbd_open() and rbd_release() expect that disk->private_data is set to rbd_dev. Otherwise we hit a NULL pointer dereference when mapping the image. URL: https://tracker.ceph.com/issues/51759 Fixes: 195b1956b85b ("rbd: use blk_mq_alloc_disk and blk_cleanup_disk") Signed-off-by: Ilya Dryomov Reviewed-by: Christoph Hellwig commit e9a72f874d5b95cef0765bafc56005a50f72c5fe Author: Sayanta Pattanayak Date: Tue Jul 20 17:17:40 2021 +0100 r8169: Avoid duplicate sysfs entry creation error When registering the MDIO bus for a r8169 device, we use the PCI bus/device specifier as a (seemingly) unique device identifier. However the very same BDF number can be used on another PCI segment, which makes the driver fail probing: [ 27.544136] r8169 0002:07:00.0: enabling device (0000 -> 0003) [ 27.559734] sysfs: cannot create duplicate filename '/class/mdio_bus/r8169-700' .... [ 27.684858] libphy: mii_bus r8169-700 failed to register [ 27.695602] r8169: probe of 0002:07:00.0 failed with error -22 Add the segment number to the device name to make it more unique. This fixes operation on ARM N1SDP boards, with two boards connected together to form an SMP system, and all on-board devices showing up twice, just on different PCI segments. A similar issue would occur on large systems with many PCI slots and multiple RTL8169 NICs. Fixes: f1e911d5d0dfd ("r8169: add basic phylib support") Signed-off-by: Sayanta Pattanayak [Andre: expand commit message, use pci_domain_nr()] Signed-off-by: Andre Przywara Acked-by: Heiner Kallweit Signed-off-by: David S. Miller commit 4afa0c22eed33cfe0c590742387f0d16f32412f3 Author: Peter Ujfalusi Date: Tue Jul 13 12:34:38 2021 +0300 driver core: auxiliary bus: Fix memory leak when driver_register() fail If driver_register() returns with error we need to free the memory allocated for auxdrv->driver.name before returning from __auxiliary_driver_register() Fixes: 7de3697e9cbd4 ("Add auxiliary bus support") Reviewed-by: Dan Williams Cc: stable Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210713093438.3173-1-peter.ujfalusi@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b428081282f85db8a0d4ae6206a8c39db9c8341b Author: Jiapeng Chong Date: Thu Apr 29 18:18:12 2021 +0800 afs: Remove redundant assignment to ret Variable ret is set to -ENOENT and -ENOMEM but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: fs/afs/dir.c:2014:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. fs/afs/dir.c:659:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. [DH made the following modifications: - In afs_rename(), -ENOMEM should be placed in op->error instead of ret, rather than the assignment being removed entirely. afs_put_operation() will pick it up from there and return it. - If afs_sillyrename() fails, its error code should be placed in op->error rather than in ret also. ] Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/1619691492-83866-1-git-send-email-jiapeng.chong@linux.alibaba.com Link: https://lore.kernel.org/r/162609465444.3133237.7562832521724298900.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/162610729052.3408253.17364333638838151299.stgit@warthog.procyon.org.uk/ # v2 commit 5a972474cf685bf99ca430979657095bda3a15c8 Author: David Howells Date: Mon Jul 12 17:04:47 2021 +0100 afs: Fix setting of writeback_index Fix afs_writepages() to always set mapping->writeback_index to a page index and not a byte position[1]. Fixes: 31143d5d515e ("AFS: implement basic file write support") Reported-by: Marc Dionne Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/CAB9dFdvHsLsw7CMnB+4cgciWDSqVjuij4mH3TaXnHQB8sz5rHw@mail.gmail.com/ [1] Link: https://lore.kernel.org/r/162610728339.3408253.4604750166391496546.stgit@warthog.procyon.org.uk/ # v2 (no v1) commit afe6949862f77bcc14fa16ad7938a04e84586d6a Author: Tom Rix Date: Fri Apr 30 08:50:31 2021 -0700 afs: check function return Static analysis reports this problem write.c:773:29: warning: Assigned value is garbage or undefined mapping->writeback_index = next; ^ ~~~~ The call to afs_writepages_region() can return without setting next. So check the function return before using next. Changes: ver #2: - Need to fix the range_cyclic case also[1]. Fixes: e87b03f5830e ("afs: Prepare for use of THPs") Signed-off-by: Tom Rix Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20210430155031.3287870-1-trix@redhat.com Link: https://lore.kernel.org/r/CAB9dFdvHsLsw7CMnB+4cgciWDSqVjuij4mH3TaXnHQB8sz5rHw@mail.gmail.com/ [1] Link: https://lore.kernel.org/r/162609464716.3133237.10354897554363093252.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/162610727640.3408253.8687445613469681311.stgit@warthog.procyon.org.uk/ # v2 commit 6c881ca0b3040f3e724eae513117ba4ddef86057 Author: David Howells Date: Tue Jun 15 11:57:26 2021 +0100 afs: Fix tracepoint string placement with built-in AFS To quote Alexey[1]: I was adding custom tracepoint to the kernel, grabbed full F34 kernel .config, disabled modules and booted whole shebang as VM kernel. Then did perf record -a -e ... It crashed: general protection fault, probably for non-canonical address 0x435f5346592e4243: 0000 [#1] SMP PTI CPU: 1 PID: 842 Comm: cat Not tainted 5.12.6+ #26 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 RIP: 0010:t_show+0x22/0xd0 Then reproducer was narrowed to # cat /sys/kernel/tracing/printk_formats Original F34 kernel with modules didn't crash. So I started to disable options and after disabling AFS everything started working again. The root cause is that AFS was placing char arrays content into a section full of _pointers_ to strings with predictable consequences. Non canonical address 435f5346592e4243 is "CB.YFS_" which came from CM_NAME macro. Steps to reproduce: CONFIG_AFS=y CONFIG_TRACING=y # cat /sys/kernel/tracing/printk_formats Fix this by the following means: (1) Add enum->string translation tables in the event header with the AFS and YFS cache/callback manager operations listed by RPC operation ID. (2) Modify the afs_cb_call tracepoint to print the string from the translation table rather than using the string at the afs_call name pointer. (3) Switch translation table depending on the service we're being accessed as (AFS or YFS) in the tracepoint print clause. Will this cause problems to userspace utilities? Note that the symbolic representation of the YFS service ID isn't available to this header, so I've put it in as a number. I'm not sure if this is the best way to do this. (4) Remove the name wrangling (CM_NAME) macro and put the names directly into the afs_call_type structs in cmservice.c. Fixes: 8e8d7f13b6d5a9 ("afs: Add some tracepoints") Reported-by: Alexey Dobriyan (SK hynix) Signed-off-by: David Howells Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Marc Dionne cc: Andrew Morton cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/YLAXfvZ+rObEOdc%2F@localhost.localdomain/ [1] Link: https://lore.kernel.org/r/643721.1623754699@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/162430903582.2896199.6098150063997983353.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/162609463957.3133237.15916579353149746363.stgit@warthog.procyon.org.uk/ # v1 (repost) Link: https://lore.kernel.org/r/162610726860.3408253.445207609466288531.stgit@warthog.procyon.org.uk/ # v2 commit c453db6cd96418c79702eaf38259002755ab23ff Author: Greg Kroah-Hartman Date: Tue Jun 29 12:40:24 2021 +0200 nds32: fix up stack guard gap Commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas") fixed up all architectures to deal with the stack guard gap. But when nds32 was added to the tree, it forgot to do the same thing. Resolve this by properly fixing up the nsd32's version of arch_get_unmapped_area() Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Cc: Michal Hocko Cc: Hugh Dickins Cc: Qiang Liu Cc: stable Reported-by: iLifetruth Acked-by: Hugh Dickins Link: https://lore.kernel.org/r/20210629104024.2293615-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ebea6761b620d758ed77d2df70fab1ae7a363151 Author: Shuo Liu Date: Wed Jul 14 16:26:14 2021 +0800 MAINTAINERS: Change ACRN HSM driver maintainer Shuo steps down, Fei will take over. Acked-by: Fei Li Signed-off-by: Shuo Liu Link: https://lore.kernel.org/r/20210714082614.88560-1-shuo.a.liu@intel.com Signed-off-by: Greg Kroah-Hartman commit e703eaff5089da93fd379678f0371f52497042ba Author: Jorgen Hansen Date: Wed Jul 21 03:02:46 2021 -0700 MAINTAINERS: Update for VMCI driver Add maintainer info for the VMware VMCI driver. v2: moved pv-drivers to L: as private list Acked-by: Vishnu Dasa Signed-off-by: Jorgen Hansen Link: https://lore.kernel.org/r/1626861766-11115-1-git-send-email-jhansen@vmware.com Signed-off-by: Greg Kroah-Hartman commit b8a97f2a65388394f433bf0730293a94f7d49046 Author: Loic Poulain Date: Fri Jul 16 13:21:06 2021 +0530 bus: mhi: pci_generic: Fix inbound IPCR channel The qrtr-mhi client driver assumes that inbound buffers are automatically allocated and queued by the MHI core, but this doesn't happen for mhi pci devices since IPCR inbound channel is not flagged with auto_queue, causing unusable IPCR (qrtr) feature. Fix that. Link: https://lore.kernel.org/r/1625736749-24947-1-git-send-email-loic.poulain@linaro.org [mani: fixed a spelling mistake in commit description] Fixes: 855a70c12021 ("bus: mhi: Add MHI PCI support for WWAN modems") Cc: stable@vger.kernel.org #5.10 Reviewed-by: Hemant kumar Reviewed-by: Manivannan Sadhasivam Signed-off-by: Loic Poulain Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210716075106.49938-4-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 546362a9ef2ef40b57c6605f14e88ced507f8dd0 Author: Bhaumik Bhatt Date: Fri Jul 16 13:21:05 2021 +0530 bus: mhi: core: Validate channel ID when processing command completions MHI reads the channel ID from the event ring element sent by the device which can be any value between 0 and 255. In order to prevent any out of bound accesses, add a check against the maximum number of channels supported by the controller and those channels not configured yet so as to skip processing of that event ring element. Link: https://lore.kernel.org/r/1624558141-11045-1-git-send-email-bbhatt@codeaurora.org Fixes: 1d3173a3bae7 ("bus: mhi: core: Add support for processing events from client device") Cc: stable@vger.kernel.org #5.10 Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210716075106.49938-3-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 56f6f4c4eb2a710ec8878dd9373d3d2b2eb75f5c Author: Bhaumik Bhatt Date: Fri Jul 16 13:21:04 2021 +0530 bus: mhi: pci_generic: Apply no-op for wake using sideband wake boolean Devices such as SDX24 do not have the provision for inband wake doorbell in the form of channel 127 and instead have a sideband GPIO for it. Newer devices such as SDX55 or SDX65 support inband wake method by default. Ensure the functionality is used based on this such that device wake stays held when a client driver uses mhi_device_get() API or the equivalent debugfs entry. Link: https://lore.kernel.org/r/1624560809-30610-1-git-send-email-bbhatt@codeaurora.org Fixes: e3e5e6508fc1 ("bus: mhi: pci_generic: No-Op for device_wake operations") Cc: stable@vger.kernel.org #5.12 Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210716075106.49938-2-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2dbd9c27eda5cf83aa990266a3355960d860da71 Author: Pavel Skripkin Date: Thu Jul 8 14:25:18 2021 +0300 drm/ttm: add missing NULL checks My local syzbot instance hit GPF in ttm_bo_release(). Unfortunately, syzbot didn't produce a reproducer for this, but I found out possible scenario: drm_gem_vram_create() <-- drm_gem_vram_object kzalloced (bo embedded in this object) ttm_bo_init() ttm_bo_init_reserved() ttm_resource_alloc() man->func->alloc() <-- allocation failure ttm_bo_put() ttm_bo_release() ttm_mem_io_free() <-- bo->resource == NULL passed as second argument *GPF* Added NULL check inside ttm_mem_io_free() to prevent reported GPF and make this function NULL save in future. Same problem was in ttm_bo_move_to_lru_tail() as Christian reported. ttm_bo_move_to_lru_tail() is called in ttm_bo_release() and mem pointer can be NULL as well as in ttm_mem_io_free(). Fail log: KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027] ... RIP: 0010:ttm_mem_io_free+0x28/0x170 drivers/gpu/drm/ttm/ttm_bo_util.c:66 .. Call Trace: ttm_bo_release+0xd94/0x10a0 drivers/gpu/drm/ttm/ttm_bo.c:422 kref_put include/linux/kref.h:65 [inline] ttm_bo_put drivers/gpu/drm/ttm/ttm_bo.c:470 [inline] ttm_bo_init_reserved+0x7cb/0x960 drivers/gpu/drm/ttm/ttm_bo.c:1050 ttm_bo_init+0x105/0x270 drivers/gpu/drm/ttm/ttm_bo.c:1074 drm_gem_vram_create+0x332/0x4c0 drivers/gpu/drm/drm_gem_vram_helper.c:228 Fixes: d3116756a710 ("drm/ttm: rename bo->mem and make it a pointer") Signed-off-by: Pavel Skripkin Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210708112518.17271-1-paskripkin@gmail.com commit 7f0909db761535aefafa77031062603a71557267 Author: Andy Shevchenko Date: Tue Jul 13 13:17:39 2021 +0300 serial: 8250_pci: Enumerate Elkhart Lake UARTs via dedicated driver Elkhart Lake UARTs are PCI enumerated Synopsys DesignWare v4.0+ UART integrated with Intel iDMA 32-bit DMA controller. There is a specific driver to handle them, i.e. 8250_lpss. Hence, disable 8250_pci enumeration for these UARTs. Fixes: 1b91d97c66ef ("serial: 8250_lpss: Add ->setup() for Elkhart Lake ports") Fixes: 4f912b898dc2 ("serial: 8250_lpss: Enable HS UART on Elkhart Lake") Cc: stable Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210713101739.36962-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 853a9ae29e978d37f5dfa72622a68c9ae3d7fa89 Author: Johan Hovold Date: Wed Jul 14 10:04:27 2021 +0200 serial: 8250: fix handle_irq locking The 8250 handle_irq callback is not just called from the interrupt handler but also from a timer callback when polling (e.g. for ports without an interrupt line). Consequently the callback must explicitly disable interrupts to avoid a potential deadlock with another interrupt in polled mode. Add back an irqrestore-version of the sysrq port-unlock helper and use it in the 8250 callbacks that need it. Fixes: 75f4e830fa9c ("serial: do not restore interrupt state in sysrq helper") Cc: stable@vger.kernel.org # 5.13 Cc: Joel Stanley Cc: Andrew Jeffery Reported-by: kernel test robot Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210714080427.28164-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit cc9ca4d95846cbbece48d9cd385550f8fba6a3c1 Author: Jon Hunter Date: Wed Jun 30 13:56:43 2021 +0100 serial: tegra: Only print FIFO error message when an error occurs The Tegra serial driver always prints an error message when enabling the FIFO for devices that have support for checking the FIFO enable status. Fix this by displaying the error message, only when an error occurs. Finally, update the error message to make it clear that enabling the FIFO failed and display the error code. Fixes: 222dcdff3405 ("serial: tegra: check for FIFO mode enabled status") Cc: Acked-by: Thierry Reding Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20210630125643.264264-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 9a936d6c3d3d6c33ecbadf72dccdb567b5cd3c72 Author: Maciej W. Rozycki Date: Sat Jun 26 06:11:13 2021 +0200 MIPS: Malta: Do not byte-swap accesses to the CBUS UART Correct big-endian accesses to the CBUS UART, a Malta on-board discrete TI16C550C part wired directly to the system controller's device bus, and do not use byte swapping with the 32-bit accesses to the device. The CBUS is used for devices such as the boot flash memory needed early on in system bootstrap even before PCI has been initialised. Therefore it uses the system controller's device bus, which follows the endianness set with the CPU, which means no byte-swapping is ever required for data accesses to CBUS, unlike with PCI. The CBUS UART uses the UPIO_MEM32 access method, that is the `readl' and `writel' MMIO accessors, which on the MIPS platform imply byte-swapping with PCI systems. Consequently the wrong byte lane is accessed with the big-endian configuration and the UART is not correctly accessed. As it happens the UPIO_MEM32BE access method makes use of the `ioread32' and `iowrite32' MMIO accessors, which still use `readl' and `writel' respectively, however they byte-swap data passed, effectively cancelling swapping done with the accessors themselves and making it suitable for the CBUS UART. Make the CBUS UART switch between UPIO_MEM32 and UPIO_MEM32BE then, based on the endianness selected. With this change in place the device is correctly recognised with big-endian Malta at boot, along with the Super I/O devices behind PCI: Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled printk: console [ttyS0] disabled serial8250.0: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A printk: console [ttyS0] enabled printk: bootconsole [uart8250] disabled serial8250.0: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A serial8250.0: ttyS2 at MMIO 0x1f000900 (irq = 20, base_baud = 230400) is a 16550A Fixes: e7c4782f92fc ("[MIPS] Put an end to 's long and annyoing existence") Cc: stable@vger.kernel.org # v2.6.23+ Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2106260524430.37803@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit e5227c51090e165db4b48dcaa300605bfced7014 Author: Maciej W. Rozycki Date: Sat Jun 26 06:11:05 2021 +0200 serial: 8250: Mask out floating 16/32-bit bus bits Make sure only actual 8 bits of the IIR register are used in determining the port type in `autoconfig'. The `serial_in' port accessor returns the `unsigned int' type, meaning that with UPIO_AU, UPIO_MEM16, UPIO_MEM32, and UPIO_MEM32BE access types more than 8 bits of data are returned, of which the high order bits will often come from bus lines that are left floating in the data phase. For example with the MIPS Malta board's CBUS UART, where the registers are aligned on 8-byte boundaries and which uses 32-bit accesses, data as follows is returned: YAMON> dump -32 0xbf000900 0x40 BF000900: 1F000942 1F000942 1F000900 1F000900 ...B...B........ BF000910: 1F000901 1F000901 1F000900 1F000900 ................ BF000920: 1F000900 1F000900 1F000960 1F000960 ...........`...` BF000930: 1F000900 1F000900 1F0009FF 1F0009FF ................ YAMON> Evidently high-order 24 bits return values previously driven in the address phase (the 3 highest order address bits used with the command above are masked out in the simple virtual address mapping used here and come out at zeros on the external bus), a common scenario with bus lines left floating, due to bus capacitance. Consequently when the value of IIR, mapped at 0x1f000910, is retrieved in `autoconfig', it comes out at 0x1f0009c1 and when it is right-shifted by 6 and then assigned to 8-bit `scratch' variable, the value calculated is 0x27, not one of 0, 1, 2, 3 expected in port type determination. Fix the issue then, by assigning the value returned from `serial_in' to `scratch' first, which masks out 24 high-order bits retrieved, and only then right-shift the resulting 8-bit data quantity, producing the value of 3 in this case, as expected. Fix the same issue in `serial_dl_read'. The problem first appeared with Linux 2.6.9-rc3 which predates our repo history, but the origin could be identified with the old MIPS/Linux repo also at: as commit e0d2356c0777 ("Merge with Linux 2.6.9-rc3."), where code in `serial_in' was updated with this case: + case UPIO_MEM32: + return readl(up->port.membase + offset); + which made it produce results outside the unsigned 8-bit range for the first time, though obviously it is system dependent what actual values appear in the high order bits retrieved and it may well have been zeros in the relevant positions with the system the change originally was intended for. It is at that point that code in `autoconf' should have been updated accordingly, but clearly it was overlooked. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org # v2.6.12+ Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2106260516220.37803@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit 61acabaae5ba58b3c32e6e90d24c2c0827fd27a8 Author: Andy Shevchenko Date: Fri Jun 25 18:37:33 2021 +0300 serial: max310x: Unprepare and disable clock in error path In one error case the clock may be left prepared and enabled. Unprepare and disable clock in that case to balance state of the hardware. Fixes: d4d6f03c4fb3 ("serial: max310x: Try to get crystal clock rate from property") Reported-by: Dan Carpenter Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210625153733.12911-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d8a719059b9dc963aa190598778ac804ff3e6a87 Author: Jonathan Marek Date: Wed Jul 21 17:02:13 2021 +1000 Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" This reverts commit c742199a014de23ee92055c2473d91fe5561ffdf. c742199a014d ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge") breaks arm64 in at least two ways for configurations where PUD or PMD folding occur: 1. We no longer install huge-vmap mappings and silently fall back to page-granular entries, despite being able to install block entries at what is effectively the PGD level. 2. If the linear map is backed with block mappings, these will now silently fail to be created in alloc_init_pud(), causing a panic early during boot. The pgtable selftests caught this, although a fix has not been forthcoming and Christophe is AWOL at the moment, so just revert the change for now to get a working -rc3 on which we can queue patches for 5.15. A simple revert breaks the build for 32-bit PowerPC 8xx machines, which rely on the default function definitions when the corresponding page-table levels are folded, since commit a6a8f7c4aa7e ("powerpc/8xx: add support for huge pages on VMAP and VMALLOC"), eg: powerpc64-linux-ld: mm/vmalloc.o: in function `vunmap_pud_range': linux/mm/vmalloc.c:362: undefined reference to `pud_clear_huge' To avoid that, add stubs for pud_clear_huge() and pmd_clear_huge() in arch/powerpc/mm/nohash/8xx.c as suggested by Christophe. Cc: Christophe Leroy Cc: Catalin Marinas Cc: Andrew Morton Cc: Nicholas Piggin Cc: Mike Rapoport Cc: Mark Rutland Cc: Geert Uytterhoeven Fixes: c742199a014d ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge") Signed-off-by: Jonathan Marek Reviewed-by: Ard Biesheuvel Acked-by: Marc Zyngier [mpe: Fold in 8xx.c changes from Christophe and mention in change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/linux-arm-kernel/CAMuHMdXShORDox-xxaeUfDW3wx2PeggFSqhVSHVZNKCGK-y_vQ@mail.gmail.com/ Link: https://lore.kernel.org/r/20210717160118.9855-1-jonathan@marek.ca Link: https://lore.kernel.org/r/87r1fs1762.fsf@mpe.ellerman.id.au Signed-off-by: Will Deacon commit a7c3acca53801e10a77ede6b759a73f5ac4bc261 Author: Jean-Philippe Brucker Date: Wed Jul 21 09:18:35 2021 +0200 arm64: smccc: Save lr before calling __arm_smccc_sve_check() Commit cfa7ff959a78 ("arm64: smccc: Support SMCCC v1.3 SVE register saving hint") added a call to __arm_smccc_sve_check() which clobbers the lr (register x30), causing __arm_smccc_hvc() to return to itself and crash. Save lr on the stack before calling __arm_smccc_sve_check(). Save the frame pointer (x29) to complete the frame record, and adjust the offsets used to access stack parameters. Acked-by: Ard Biesheuvel Acked-by: Mark Brown Fixes: cfa7ff959a78 ("arm64: smccc: Support SMCCC v1.3 SVE register saving hint") Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210721071834.69130-1-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 1435f82689e1d195e56ce8b19c81aa7b1a3bd0b0 Author: Geert Uytterhoeven Date: Fri Jun 25 15:36:57 2021 +0200 reset: RESET_MCHP_SPARX5 should depend on ARCH_SPARX5 The Microchip Sparx5 switch reset block is only present on Microchip Sparx5 SoCs. Hence add a dependency on ARCH_SPARX5, to prevent asking the user about this driver when configuring a kernel without Sparx5 support. Fixes: 453ed4283bebd077 ("reset: mchp: sparx5: add switch reset driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6e08f6f46123d0712397e901716b48f13fa5dc48.1624627657.git.geert@linux-m68k.org Signed-off-by: Philipp Zabel commit 990e4ad3ddcb72216caeddd6e62c5f45a21e8121 Author: Xiangyang Zhang Date: Mon Jun 28 23:22:39 2021 +0800 staging: rtl8723bs: Fix a resource leak in sd_int_dpc The "c2h_evt" variable is not freed when function call "c2h_evt_read_88xx" failed Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Reviewed-by: Hans de Goede Signed-off-by: Xiangyang Zhang Cc: stable Link: https://lore.kernel.org/r/20210628152239.5475-1-xyz.sun.ok@gmail.com Signed-off-by: Greg Kroah-Hartman commit f3a1a937f7b240be623d989c8553a6d01465d04f Author: Vincent Palatin Date: Wed Jul 21 11:25:16 2021 +0200 Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem" This reverts commit 0bd860493f81eb2a46173f6f5e44cc38331c8dbd. While the patch was working as stated,ie preventing the L850-GL LTE modem from crashing on some U3 wake-ups due to a race condition between the host wake-up and the modem-side wake-up, when using the MBIM interface, this would force disabling the USB runtime PM on the device. The increased power consumption is significant for LTE laptops, and given that with decently recent modem firmwares, when the modem hits the bug, it automatically recovers (ie it drops from the bus, but automatically re-enumerates after less than half a second, rather than being stuck until a power cycle as it was doing with ancient firmware), for most people, the trade-off now seems in favor of re-enabling it by default. For people with access to the platform code, the bug can also be worked-around successfully by changing the USB3 LFPM polling off-time for the XHCI controller in the BIOS code. Signed-off-by: Vincent Palatin Link: https://lore.kernel.org/r/20210721092516.2775971-1-vpalatin@chromium.org Fixes: 0bd860493f81 ("USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem") Signed-off-by: Greg Kroah-Hartman commit 5c912e679506ef72adb95616d2f56a8a1b079a3d Author: Wei Yongjun Date: Fri May 21 02:10:10 2021 +0000 usb: cdc-wdm: fix build error when CONFIG_WWAN_CORE is not set Gcc report build error as following when CONFIG_WWAN_CORE is not set: x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_disconnect': cdc-wdm.c:(.text+0xb2a): undefined reference to `wwan_remove_port' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_in_callback': cdc-wdm.c:(.text+0xf23): undefined reference to `wwan_port_rx' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_stop': cdc-wdm.c:(.text+0x127d): undefined reference to `wwan_port_get_drvdata' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx': cdc-wdm.c:(.text+0x12d9): undefined reference to `wwan_port_get_drvdata' x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x13c1): undefined reference to `wwan_port_txoff' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_start': cdc-wdm.c:(.text+0x13e0): undefined reference to `wwan_port_get_drvdata' x86_64-linux-gnu-ld: cdc-wdm.c:(.text+0x1431): undefined reference to `wwan_port_txon' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_wwan_port_tx_complete': cdc-wdm.c:(.text+0x14a4): undefined reference to `wwan_port_txon' x86_64-linux-gnu-ld: drivers/usb/class/cdc-wdm.o: in function `wdm_create.cold': cdc-wdm.c:(.text.unlikely+0x209): undefined reference to `wwan_create_port' Using CONFIG_WWAN_CORE instead of CONFIG_WWAN to avoid build error. Fixes: cac6fb015f71 ("usb: class: cdc-wdm: WWAN framework integration") Reported-by: Hulk Robot Reviewed-by: Loic Poulain Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210521021010.2490930-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 234211b8dd161fa25f192c78d5a8d2dd6bf920a0 Author: Keith Busch Date: Mon Jul 19 09:44:39 2021 -0700 nvme: fix nvme_setup_command metadata trace event The metadata address is set after the trace event, so the trace is not capturing anything useful. Rather than logging the memory address, it's useful to know if the command carries a metadata payload, so change the trace event to log that true/false state instead. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit 5396fdac56d87d04e75e5068c0c92d33625f51e7 Author: Hannes Reinecke Date: Fri Jul 16 13:30:35 2021 +0200 nvme: fix refcounting imbalance when all paths are down When the last path to a ns_head drops the current code removes the ns_head from the subsystem list, but will only delete the disk itself if the last reference to the ns_head drops. This is causing an refcounting imbalance eg when applications have a reference to the disk, as then they'll never get notified that the disk is in fact dead. This patch moves the call 'del_gendisk' into nvme_mpath_check_last_path(), ensuring that the disk can be properly removed and applications get the appropriate notifications. Signed-off-by: Hannes Reinecke Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 7764656b108cd308c39e9a8554353b8f9ca232a3 Author: Zhihao Cheng Date: Mon Jul 5 21:38:29 2021 +0800 nvme-pci: don't WARN_ON in nvme_reset_work if ctrl.state is not RESETTING Followling process: nvme_probe nvme_reset_ctrl nvme_change_ctrl_state(ctrl, NVME_CTRL_RESETTING) queue_work(nvme_reset_wq, &ctrl->reset_work) --------------> nvme_remove nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DELETING) worker_thread process_one_work nvme_reset_work WARN_ON(dev->ctrl.state != NVME_CTRL_RESETTING) , which will trigger WARN_ON in nvme_reset_work(): [ 127.534298] WARNING: CPU: 0 PID: 139 at drivers/nvme/host/pci.c:2594 [ 127.536161] CPU: 0 PID: 139 Comm: kworker/u8:7 Not tainted 5.13.0 [ 127.552518] Call Trace: [ 127.552840] ? kvm_sched_clock_read+0x25/0x40 [ 127.553936] ? native_send_call_func_single_ipi+0x1c/0x30 [ 127.555117] ? send_call_function_single_ipi+0x9b/0x130 [ 127.556263] ? __smp_call_single_queue+0x48/0x60 [ 127.557278] ? ttwu_queue_wakelist+0xfa/0x1c0 [ 127.558231] ? try_to_wake_up+0x265/0x9d0 [ 127.559120] ? ext4_end_io_rsv_work+0x160/0x290 [ 127.560118] process_one_work+0x28c/0x640 [ 127.561002] worker_thread+0x39a/0x700 [ 127.561833] ? rescuer_thread+0x580/0x580 [ 127.562714] kthread+0x18c/0x1e0 [ 127.563444] ? set_kthread_struct+0x70/0x70 [ 127.564347] ret_from_fork+0x1f/0x30 The preceding problem can be easily reproduced by executing following script (based on blktests suite): test() { pdev="$(_get_pci_dev_from_blkdev)" sysfs="/sys/bus/pci/devices/${pdev}" for ((i = 0; i < 10; i++)); do echo 1 > "$sysfs/remove" echo 1 > /sys/bus/pci/rescan done } Since the device ctrl could be updated as an non-RESETTING state by repeating probe/remove in userspace (which is a normal situation), we can replace stack dumping WARN_ON with a warnning message. Fixes: 82b057caefaff ("nvme-pci: fix multiple ctrl removal schedulin") Signed-off-by: Zhihao Cheng commit 1f958f3dff42a7239bbfdd9a33db5f11574d16bf Author: Greg Kroah-Hartman Date: Wed Jul 21 09:55:38 2021 +0200 Revert "arm64: dts: qcom: Harmonize DWC USB3 DT nodes name" This reverts commit eb9b7bfd5954f5f6ac4d57313541dd0294660aad as it breaks working userspace implementations (i.e. Android systems) The device node name here is part of configfs, so it is a user-visable api that can not be changed. Reported-by: John Stultz Cc: Serge Semin Cc: Krzysztof Kozlowski Cc: Bjorn Andersson Link: https://lore.kernel.org/r/CALAqxLX_FNvFndEDWtGbFPjSzuAbfqxQE07diBJFZtftwEJX5A@mail.gmail.com Signed-off-by: Greg Kroah-Hartman commit 70bfdf62e93a4d73cfbaf83a3ac708a483ef7a71 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Sat Jul 17 16:02:22 2021 +0100 selftests/net/ipsec: Add test for xfrm_spdattr_type_t Set hthresh, dump it again and verify thresh.lbits && thresh.rbits. They are passed as attributes of xfrm_spdattr_type_t, different from other message attributes that use xfrm_attr_type_t. Also, test attribute that is bigger than XFRMA_SPD_MAX, currently it should be silently ignored. Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit 4e9505064f58d1252805952f8547a5b7dbc5c111 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Sat Jul 17 16:02:21 2021 +0100 net/xfrm/compat: Copy xfrm_spdattr_type_t atributes The attribute-translator has to take in mind maxtype, that is xfrm_link::nla_max. When it is set, attributes are not of xfrm_attr_type_t. Currently, they can be only XFRMA_SPD_MAX (message XFRM_MSG_NEWSPDINFO), their UABI is the same for 64/32-bit, so just copy them. Thanks to YueHaibing for reporting this: In xfrm_user_rcv_msg_compat() if maxtype is not zero and less than XFRMA_MAX, nlmsg_parse_deprecated() do not initialize attrs array fully. xfrm_xlate32() will access uninit 'attrs[i]' while iterating all attrs array. KASAN: probably user-memory-access in range [0x0000000041b58ab0-0x0000000041b58ab7] CPU: 0 PID: 15799 Comm: syz-executor.2 Tainted: G W 5.14.0-rc1-syzkaller #0 RIP: 0010:nla_type include/net/netlink.h:1130 [inline] RIP: 0010:xfrm_xlate32_attr net/xfrm/xfrm_compat.c:410 [inline] RIP: 0010:xfrm_xlate32 net/xfrm/xfrm_compat.c:532 [inline] RIP: 0010:xfrm_user_rcv_msg_compat+0x5e5/0x1070 net/xfrm/xfrm_compat.c:577 [...] Call Trace: xfrm_user_rcv_msg+0x556/0x8b0 net/xfrm/xfrm_user.c:2774 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504 xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2824 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:702 [inline] Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator") Cc: Reported-by: YueHaibing Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit d53dc38857f6dbefabd9eecfcbf67b6eac9a1ef4 Author: Minas Harutyunyan Date: Tue Jul 20 05:41:24 2021 -0700 usb: dwc2: gadget: Fix sending zero length packet in DDMA mode. Sending zero length packet in DDMA mode perform by DMA descriptor by setting SP (short packet) flag. For DDMA in function dwc2_hsotg_complete_in() does not need to send zlp. Tested by USBCV MSC tests. Fixes: f71b5e2533de ("usb: dwc2: gadget: fix zero length packet transfers") Cc: stable Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/967bad78c55dd2db1c19714eee3d0a17cf99d74a.1626777738.git.Minas.Harutyunyan@synopsys.com Signed-off-by: Greg Kroah-Hartman commit c4a0f7a6ab5417eb6105b0e1d7e6e67f6ef7d4e5 Author: Marek Szyprowski Date: Fri Jul 16 07:01:27 2021 +0200 usb: dwc2: Skip clock gating on Samsung SoCs Commit 0112b7ce68ea ("usb: dwc2: Update dwc2_handle_usb_suspend_intr function.") changed the way the driver handles power down modes in a such way that it uses clock gating when no other power down mode is available. This however doesn't work well on the DWC2 implementation used on the Samsung SoCs. When a clock gating is enabled, system hangs. It looks that the proper clock gating requires some additional glue code in the shared USB2 PHY and/or Samsung glue code for the DWC2. To restore driver operation on the Samsung SoCs simply skip enabling clock gating mode until one finds what is really needed to make it working reliably. Fixes: 0112b7ce68ea ("usb: dwc2: Update dwc2_handle_usb_suspend_intr function.") Cc: stable Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20210716050127.4406-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit 5719df243e118fb343725e8b2afb1637e1af1373 Author: Yoshihiro Shimoda Date: Thu Jun 24 21:20:39 2021 +0900 usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop() This driver has a potential issue which this driver is possible to cause superfluous irqs after usb_pkt_pop() is called. So, after the commit 3af32605289e ("usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler()") had been applied, we could observe the following error happened when we used g_audio. renesas_usbhs e6590000.usb: irq_ready run_error 1 : -22 To fix the issue, disable the tx or rx interrupt in usb_pkt_pop(). Fixes: 2743e7f90dc0 ("usb: renesas_usbhs: fix the usb_pkt_pop()") Cc: # v4.4+ Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210624122039.596528-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman commit fecb3a171db425e5068b27231f8efe154bf72637 Author: Minas Harutyunyan Date: Tue Jul 13 09:32:55 2021 +0400 usb: dwc2: gadget: Fix GOUTNAK flow for Slave mode. Because of dwc2_hsotg_ep_stop_xfr() function uses poll mode, first need to mask GINTSTS_GOUTNAKEFF interrupt. In Slave mode GINTSTS_GOUTNAKEFF interrupt will be aserted only after pop OUT NAK status packet from RxFIFO. In dwc2_hsotg_ep_sethalt() function before setting DCTL_SGOUTNAK need to unmask GOUTNAKEFF interrupt. Tested by USBCV CH9 and MSC tests set in Slave, BDMA and DDMA. All tests are passed. Fixes: a4f827714539a ("usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable") Fixes: 6070636c4918c ("usb: dwc2: Fix Stalling a Non-Isochronous OUT EP") Cc: stable Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/e17fad802bbcaf879e1ed6745030993abb93baf8.1626152924.git.Minas.Harutyunyan@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 3d11de2d57b92e943767d7d070b0df9b18089d56 Author: Artur Petrosyan Date: Sat Jul 10 13:22:46 2021 +0400 usb: phy: Fix page fault from usb_phy_uevent When the dwc2 platform device is removed, it unregisters the generic phy. usb_remove_phy() is called and the dwc2 usb_phy is removed from the "phy_list", but the uevent may still attempt to get the usb_phy from the list, resulting in a page fault bug. Currently we can't access the usb_phy from the "phy_list" after the device is removed. As a fix check to make sure that we can get the usb_phy before moving forward with the uevent. [ 84.949345] BUG: unable to handle page fault for address:00000007935688d8 [ 84.949349] #PF: supervisor read access in kernel mode [ 84.949351] #PF: error_code(0x0000) - not-present page [ 84.949353] PGD 0 P4D 0 [ 84.949356] Oops: 0000 [#1] SMP PTI [ 84.949360] CPU: 2 PID: 2081 Comm: rmmod Not tainted 5.13.0-rc4-snps-16547-ga8534cb092d7-dirty #32 [ 84.949363] Hardware name: Hewlett-Packard HP Z400 Workstation/0B4Ch, BIOS 786G3 v03.54 11/02/2011 [ 84.949365] RIP: 0010:usb_phy_uevent+0x99/0x121 [ 84.949372] Code: 8d 83 f8 00 00 00 48 3d b0 12 22 94 74 05 4c 3b 23 75 5b 8b 83 9c 00 00 00 be 32 00 00 00 48 8d 7c 24 04 48 c7 c2 d4 5d 7b 93 <48> 8b 0c c5 e0 88 56 93 e8 0f 63 8a ff 8b 83 98 00 00 00 be 32 00 [ 84.949375] RSP: 0018:ffffa46bc0f2fc70 EFLAGS: 00010246 [ 84.949378] RAX: 00000000ffffffff RBX: ffffffff942211b8 RCX: 0000000000000027 [ 84.949380] RDX: ffffffff937b5dd4 RSI: 0000000000000032 RDI: ffffa46bc0f2fc74 [ 84.949383] RBP: ffff94a306613000 R08: 0000000000000000 R09: 00000000fffeffff [ 84.949385] R10: ffffa46bc0f2faa8 R11: ffffa46bc0f2faa0 R12: ffff94a30186d410 [ 84.949387] R13: ffff94a32d188a80 R14: ffff94a30029f960 R15: ffffffff93522dd0 [ 84.949389] FS: 00007efdbd417540(0000) GS:ffff94a513a80000(0000) knlGS:0000000000000000 [ 84.949392] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 84.949394] CR2: 00000007935688d8 CR3: 0000000165606000 CR4: 00000000000006e0 [ 84.949396] Call Trace: [ 84.949401] dev_uevent+0x190/0x1ad [ 84.949408] kobject_uevent_env+0x18e/0x46c [ 84.949414] device_release_driver_internal+0x17f/0x18e [ 84.949418] bus_remove_device+0xd3/0xe5 [ 84.949421] device_del+0x1c3/0x31d [ 84.949425] ? kobject_put+0x97/0xa8 [ 84.949428] platform_device_del+0x1c/0x63 [ 84.949432] platform_device_unregister+0xa/0x11 [ 84.949436] dwc2_pci_remove+0x1e/0x2c [dwc2_pci] [ 84.949440] pci_device_remove+0x31/0x81 [ 84.949445] device_release_driver_internal+0xea/0x18e [ 84.949448] driver_detach+0x68/0x72 [ 84.949450] bus_remove_driver+0x63/0x82 [ 84.949453] pci_unregister_driver+0x1a/0x75 [ 84.949457] __do_sys_delete_module+0x149/0x1e9 [ 84.949462] ? task_work_run+0x64/0x6e [ 84.949465] ? exit_to_user_mode_prepare+0xd4/0x10d [ 84.949471] do_syscall_64+0x5d/0x70 [ 84.949475] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 84.949480] RIP: 0033:0x7efdbd563bcb [ 84.949482] Code: 73 01 c3 48 8b 0d c5 82 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 95 82 0c 00 f7 d8 64 89 01 48 [ 84.949485] RSP: 002b:00007ffe944d7d98 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 84.949489] RAX: ffffffffffffffda RBX: 00005651072eb700 RCX: 00007efdbd563bcb [ 84.949491] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005651072eb768 [ 84.949493] RBP: 00007ffe944d7df8 R08: 0000000000000000 R09: 0000000000000000 [ 84.949495] R10: 00007efdbd5dfac0 R11: 0000000000000206 R12: 00007ffe944d7fd0 [ 84.949497] R13: 00007ffe944d8610 R14: 00005651072eb2a0 R15: 00005651072eb700 [ 84.949500] Modules linked in: uas configfs dwc2_pci(-) phy_generic fuse crc32c_intel [last unloaded: udc_core] [ 84.949508] CR2: 00000007935688d8 [ 84.949510] ---[ end trace e40c871ca3e4dc9e ]--- [ 84.949512] RIP: 0010:usb_phy_uevent+0x99/0x121 Fixes: a8534cb092d7 ("usb: phy: introduce usb_phy device type with its own uevent handler") Reviewed-by: Peter Chen Signed-off-by: Artur Petrosyan Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/20210710092247.D7AFEA005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 0665e387318607d8269bfdea60723c627c8bae43 Author: Greg Thelen Date: Fri Jul 2 00:12:24 2021 -0700 usb: xhci: avoid renesas_usb_fw.mem when it's unusable Commit a66d21d7dba8 ("usb: xhci: Add support for Renesas controller with memory") added renesas_usb_fw.mem firmware reference to xhci-pci. Thus modinfo indicates xhci-pci.ko has "firmware: renesas_usb_fw.mem". But the firmware is only actually used with CONFIG_USB_XHCI_PCI_RENESAS. An unusable firmware reference can trigger safety checkers which look for drivers with unmet firmware dependencies. Avoid referring to renesas_usb_fw.mem in circumstances when it cannot be loaded (when CONFIG_USB_XHCI_PCI_RENESAS isn't set). Fixes: a66d21d7dba8 ("usb: xhci: Add support for Renesas controller with memory") Cc: stable Signed-off-by: Greg Thelen Link: https://lore.kernel.org/r/20210702071224.3673568-1-gthelen@google.com Signed-off-by: Greg Kroah-Hartman commit 4bb233b7ba87785c7ac519863f51ba61f4dbc459 Author: Colin Ian King Date: Thu Jul 1 15:43:05 2021 +0100 usb: gadget: u_serial: remove WARN_ON on null port Loading and then unloading module g_dpgp on a VM that does not support the driver currently throws a WARN_ON message because the port has not been initialized. Removing an unused driver is a valid use-case and the WARN_ON kernel warning is a bit excessive, so remove it. Cleans up: [27654.638698] ------------[ cut here ]------------ [27654.638705] WARNING: CPU: 6 PID: 2956336 at drivers/usb/gadget/function/u_serial.c:1201 gserial_free_line+0x7c/0x90 [u_serial] [27654.638728] Modules linked in: g_dbgp(-) u_serial usb_f_tcm target_core_mod libcomposite udc_core vmw_vmci mcb i2c_nforce2 i2c_amd756 nfit cx8800 videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 cx88xx tveeprom videobuf2_common videodev mc ccp hid_generic hid intel_ishtp cros_ec mc13xxx_core vfio_mdev mdev i915 i2c_algo_bit kvm ppdev parport zatm eni suni uPD98402 atm rio_scan binder_linux hwmon_vid video ipmi_devintf ipmi_msghandler zstd nls_utf8 decnet qrtr ns sctp ip6_udp_tunnel udp_tunnel fcrypt pcbc nhc_udp nhc_ipv6 nhc_routing nhc_mobility nhc_hop nhc_dest nhc_fragment 6lowpan ts_kmp dccp_ipv6 dccp_ipv4 dccp snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq_dummy snd_seq snd_seq_device xen_front_pgdir_shbuf binfmt_misc nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua intel_rapl_msr intel_rapl_common snd_hda_codec_generic ledtrig_audio snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd rapl soundcore joydev input_leds mac_hid serio_raw efi_pstore [27654.638880] qemu_fw_cfg sch_fq_codel msr virtio_rng autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear qxl drm_ttm_helper crct10dif_pclmul ttm drm_kms_helper syscopyarea sysfillrect sysimgblt virtio_net fb_sys_fops cec net_failover rc_core ahci psmouse drm libahci lpc_ich virtio_blk failover [last unloaded: u_ether] [27654.638949] CPU: 6 PID: 2956336 Comm: modprobe Tainted: P O 5.13.0-9-generic #9 [27654.638956] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 [27654.638969] RIP: 0010:gserial_free_line+0x7c/0x90 [u_serial] [27654.638981] Code: 20 00 00 00 00 e8 74 1a ba c9 4c 89 e7 e8 8c fe ff ff 48 8b 3d 75 3b 00 00 44 89 f6 e8 3d 7c 69 c9 5b 41 5c 41 5d 41 5e 5d c3 <0f> 0b 4c 89 ef e8 4a 1a ba c9 5b 41 5c 41 5d 41 5e 5d c3 90 0f 1f [27654.638986] RSP: 0018:ffffba0b81403da0 EFLAGS: 00010246 [27654.638992] RAX: 0000000000000000 RBX: ffffffffc0eaf6a0 RCX: 0000000000000000 [27654.638996] RDX: ffff8e21c0cac8c0 RSI: 0000000000000006 RDI: ffffffffc0eaf6a0 [27654.639000] RBP: ffffba0b81403dc0 R08: ffffba0b81403de0 R09: fefefefefefefeff [27654.639003] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [27654.639006] R13: ffffffffc0eaf6a0 R14: 0000000000000000 R15: 0000000000000000 [27654.639010] FS: 00007faa1935e740(0000) GS:ffff8e223bd80000(0000) knlGS:0000000000000000 [27654.639015] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [27654.639019] CR2: 00007ffc840cd4e8 CR3: 000000000e1ac006 CR4: 0000000000370ee0 [27654.639028] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [27654.639031] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [27654.639035] Call Trace: [27654.639044] dbgp_exit+0x1c/0xa1a [g_dbgp] [27654.639054] __do_sys_delete_module.constprop.0+0x144/0x260 [27654.639066] ? call_rcu+0xe/0x10 [27654.639073] __x64_sys_delete_module+0x12/0x20 [27654.639081] do_syscall_64+0x61/0xb0 [27654.639092] ? exit_to_user_mode_loop+0xec/0x160 [27654.639098] ? exit_to_user_mode_prepare+0x37/0xb0 [27654.639104] ? syscall_exit_to_user_mode+0x27/0x50 [27654.639110] ? __x64_sys_close+0x12/0x40 [27654.639119] ? do_syscall_64+0x6e/0xb0 [27654.639126] ? exit_to_user_mode_prepare+0x37/0xb0 [27654.639132] ? syscall_exit_to_user_mode+0x27/0x50 [27654.639137] ? __x64_sys_newfstatat+0x1e/0x20 [27654.639146] ? do_syscall_64+0x6e/0xb0 [27654.639154] ? exc_page_fault+0x8f/0x170 [27654.639159] ? asm_exc_page_fault+0x8/0x30 [27654.639166] entry_SYSCALL_64_after_hwframe+0x44/0xae [27654.639173] RIP: 0033:0x7faa194a4b2b [27654.639179] Code: 73 01 c3 48 8b 0d 3d 73 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0d 73 0c 00 f7 d8 64 89 01 48 [27654.639185] RSP: 002b:00007ffc840d0578 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [27654.639191] RAX: ffffffffffffffda RBX: 000056060f9f4e70 RCX: 00007faa194a4b2b [27654.639194] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000056060f9f4ed8 [27654.639197] RBP: 000056060f9f4e70 R08: 0000000000000000 R09: 0000000000000000 [27654.639200] R10: 00007faa1951eac0 R11: 0000000000000206 R12: 000056060f9f4ed8 [27654.639203] R13: 0000000000000000 R14: 000056060f9f4ed8 R15: 00007ffc840d06c8 [27654.639219] ---[ end trace 8dd0ea0bb32ce94a ]--- Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210701144305.110078-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 40edb52298df4c1dbbdb30b19e3ce92cf612a918 Author: Linyu Yuan Date: Tue Jun 29 09:51:18 2021 +0800 usb: dwc3: avoid NULL access of usb_gadget_driver we found crash in dwc3_disconnect_gadget(), it is because dwc->gadget_driver become NULL before async access. 7dc0c55e9f30 ('USB: UDC core: Add udc_async_callbacks gadget op') suggest a common way to avoid such kind of issue. this change implment the callback in dwc3 and change related functions which have callback to usb gadget driver. Acked-by: Alan Stern Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/20210629015118.7944-1-linyyuan@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit b5fdf5c6e6bee35837e160c00ac89327bdad031b Author: Mark Tomlinson Date: Fri Jun 25 15:14:56 2021 +1200 usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, a simpler scheme is used. The toggles are read from hardware when a URB is completed, and the toggles are always written to hardware when any URB transaction is started. This will cause a few more SPI transactions, but no causes kernel panics. Fixes: 2d53139f3162 ("Add support for using a MAX3421E chip as a host driver.") Cc: stable Signed-off-by: Mark Tomlinson Link: https://lore.kernel.org/r/20210625031456.8632-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit 5b01248156bd75303e66985c351dee648c149979 Author: Zhang Qilong Date: Fri Jun 18 22:14:41 2021 +0800 usb: gadget: Fix Unbalanced pm_runtime_enable in tegra_xudc_probe Add missing pm_runtime_disable() when probe error out. It could avoid pm_runtime implementation complains when removing and probing again the driver. Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller") Cc: stable Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20210618141441.107817-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit a6b125621c081bef519fd78cf336de351390da3f Author: Lukas Bulwahn Date: Thu Jul 1 11:39:03 2021 +0200 MAINTAINERS: repair reference in USB IP DRIVER FOR HISILICON KIRIN 970 Commit 8de6b7edd493 ("phy: phy-hi3670-usb3: move driver from staging into phy") moves phy-hi3670-usb3.c from ./drivers/staging/hikey9xx/ to ./drivers/phy/hisilicon/, but the new file entry in MAINTAINERS refers to ./drivers/phy/hisilicon/phy-kirin970-usb3.c. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/phy/hisilicon/phy-kirin970-usb3.c Repair the file entry by referring to the right location. Fixes: 8de6b7edd493 ("phy: phy-hi3670-usb3: move driver from staging into phy") Acked-by: Mauro Carvalho Chehab Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210701093903.28733-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6b63376722d9e1b915a2948e9b30f4ba2712e3f5 Author: Amelie Delaunay Date: Fri Jul 16 14:07:18 2021 +0200 usb: typec: stusb160x: Don't block probing of consumer of "connector" nodes Similar as with tcpm this patch lets fw_devlink know not to wait on the fwnode to be populated as a struct device. Without this patch, USB functionality can be broken on some previously supported boards. Fixes: 28ec344bb891 ("usb: typec: tcpm: Don't block probing of consumers of "connector" nodes") Cc: stable Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20210716120718.20398-3-amelie.delaunay@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 86762ad4abcc549deb7a155c8e5e961b9755bcf0 Author: Amelie Delaunay Date: Fri Jul 16 14:07:17 2021 +0200 usb: typec: stusb160x: register role switch before interrupt registration During interrupt registration, attach state is checked. If attached, then the Type-C state is updated with typec_set_xxx functions and role switch is set with usb_role_switch_set_role(). If the usb_role_switch parameter is error or null, the function simply returns 0. So, to update usb_role_switch role if a device is attached before the irq is registered, usb_role_switch must be registered before irq registration. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Cc: stable Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20210716120718.20398-2-amelie.delaunay@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 6abf2fe6b4bf6e5256b80c5817908151d2d33e9f Author: Julian Sikorski Date: Tue Jul 20 19:19:10 2021 +0200 USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS LaCie Rugged USB3-FW appears to be incompatible with UAS. It generates errors like: [ 1151.582598] sd 14:0:0:0: tag#16 uas_eh_abort_handler 0 uas-tag 1 inflight: IN [ 1151.582602] sd 14:0:0:0: tag#16 CDB: Report supported operation codes a3 0c 01 12 00 00 00 00 02 00 00 00 [ 1151.588594] scsi host14: uas_eh_device_reset_handler start [ 1151.710482] usb 2-4: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [ 1151.741398] scsi host14: uas_eh_device_reset_handler success [ 1181.785534] scsi host14: uas_eh_device_reset_handler start Signed-off-by: Julian Sikorski Cc: stable Link: https://lore.kernel.org/r/20210720171910.36497-1-belegdol+github@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b60557230adfdeb8164e0b342ac9cd469a75759 Author: David Jeffery Date: Thu Jul 15 17:37:44 2021 -0400 usb: ehci: Prevent missed ehci interrupts with edge-triggered MSI When MSI is used by the ehci-hcd driver, it can cause lost interrupts which results in EHCI only continuing to work due to a polling fallback. But the reliance of polling drastically reduces performance of any I/O through EHCI. Interrupts are lost as the EHCI interrupt handler does not safely handle edge-triggered interrupts. It fails to ensure all interrupt status bits are cleared, which works with level-triggered interrupts but not the edge-triggered interrupts typical from using MSI. To fix this problem, check if the driver may have raced with the hardware setting additional interrupt status bits and clear status until it is in a stable state. Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") Tested-by: Laurence Oberman Reviewed-by: Andy Shevchenko Acked-by: Alan Stern Signed-off-by: David Jeffery Link: https://lore.kernel.org/r/20210715213744.GA44506@redhat Cc: stable Signed-off-by: Greg Kroah-Hartman commit 1b7f56fbc7a1b66967b6114d1b5f5a257c3abae6 Author: Mathias Nyman Date: Thu Jul 15 18:01:22 2021 +0300 usb: hub: Disable USB 3 device initiated lpm if exit latency is too high The device initiated link power management U1/U2 states should not be enabled in case the system exit latency plus one bus interval (125us) is greater than the shortest service interval of any periodic endpoint. This is the case for both U1 and U2 sytstem exit latencies and link states. See USB 3.2 section 9.4.9 "Set Feature" for more details Note, before this patch the host and device initiated U1/U2 lpm states were both enabled with lpm. After this patch it's possible to end up with only host inititated U1/U2 lpm in case the exit latencies won't allow device initiated lpm. If this case we still want to set the udev->usb3_lpm_ux_enabled flag so that sysfs users can see the link may go to U1/U2. Signed-off-by: Mathias Nyman Cc: stable Link: https://lore.kernel.org/r/20210715150122.1995966-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1bf2761c837571a66ec290fb66c90413821ffda2 Author: Mathias Nyman Date: Thu Jul 15 18:01:21 2021 +0300 usb: hub: Fix link power management max exit latency (MEL) calculations Maximum Exit Latency (MEL) value is used by host to know how much in advance it needs to start waking up a U1/U2 suspended link in order to service a periodic transfer in time. Current MEL calculation only includes the time to wake up the path from U1/U2 to U0. This is called tMEL1 in USB 3.1 section C 1.5.2 Total MEL = tMEL1 + tMEL2 +tMEL3 + tMEL4 which should additinally include: - tMEL2 which is the time it takes for PING message to reach device - tMEL3 time for device to process the PING and submit a PING_RESPONSE - tMEL4 time for PING_RESPONSE to traverse back upstream to host. Add the missing tMEL2, tMEL3 and tMEL4 to MEL calculation. Cc: # v3.5 Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210715150122.1995966-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 57560ee95cb7f91cf0bc31d4ae8276e0dcfe17aa Author: Martin Kepplinger Date: Wed Jul 14 08:18:07 2021 +0200 usb: typec: tipd: Don't block probing of consumer of "connector" nodes Similar as with tcpm this patch lets fw_devlink know not to wait on the fwnode to be populated as a struct device. Without this patch, USB functionality can be broken on some previously supported boards. Fixes: 28ec344bb891 ("usb: typec: tcpm: Don't block probing of consumers of "connector" nodes") Cc: stable Acked-by: Heikki Krogerus Signed-off-by: Martin Kepplinger Link: https://lore.kernel.org/r/20210714061807.5737-1-martin.kepplinger@puri.sm Signed-off-by: Greg Kroah-Hartman commit 72f68bf5c756f5ce1139b31daae2684501383ad5 Author: Mathias Nyman Date: Thu Jul 15 18:06:51 2021 +0300 xhci: Fix lost USB 2 remote wake There's a small window where a USB 2 remote wake may be left unhandled due to a race between hub thread and xhci port event interrupt handler. When the resume event is detected in the xhci interrupt handler it kicks the hub timer, which should move the port from resume to U0 once resume has been signalled for long enough. To keep the hub "thread" running we set a bus_state->resuming_ports flag. This flag makes sure hub timer function kicks itself. checking this flag was not properly protected by the spinlock. Flag was copied to a local variable before lock was taken. The local variable was then checked later with spinlock held. If interrupt is handled right after copying the flag to the local variable we end up stopping the hub thread before it can handle the USB 2 resume. CPU0 CPU1 (hub thread) (xhci event handler) xhci_hub_status_data() status = bus_state->resuming_ports; handle_port_status() spin_lock() bus_state->resuming_ports = 1 set_flag(HCD_FLAG_POLL_RH) spin_unlock() spin_lock() if (!status) clear_flag(HCD_FLAG_POLL_RH) spin_unlock() Fix this by taking the lock a bit earlier so that it covers the resuming_ports flag copy in the hub thread Cc: Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210715150651.1996099-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 44cf53602f5a0db80d53c8fff6cdbcae59650a42 Author: Moritz Fischer Date: Mon Jul 19 00:05:19 2021 -0700 Revert "usb: renesas-xhci: Fix handling of unknown ROM state" This reverts commit d143825baf15f204dac60acdf95e428182aa3374. Justin reports some of his systems now fail as result of this commit: xhci_hcd 0000:04:00.0: Direct firmware load for renesas_usb_fw.mem failed with error -2 xhci_hcd 0000:04:00.0: request_firmware failed: -2 xhci_hcd: probe of 0000:04:00.0 failed with error -2 The revert brings back the original issue the commit tried to solve but at least unbreaks existing systems relying on previous behavior. Cc: stable@vger.kernel.org Cc: Mathias Nyman Cc: Vinod Koul Cc: Justin Forbes Reported-by: Justin Forbes Signed-off-by: Moritz Fischer Fixes: d143825baf15 ("usb: renesas-xhci: Fix handling of unknown ROM state") Link: https://lore.kernel.org/r/20210719070519.41114-1-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 235c3610d5f02ee91244239b43cd9ae8b4859dff Author: Jason Ekstrand Date: Tue Jul 20 13:13:55 2021 -0500 drm/ttm: Force re-init if ttm_global_init() fails If we have a failure, decrement the reference count so that the next call to ttm_global_init() will actually do something instead of assume everything is all set up. Signed-off-by: Jason Ekstrand Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance") Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210720181357.2760720-5-jason@jlekstrand.net Signed-off-by: Christian König commit 914ab19e471d8fb535ed50dff108b0a615f3c2d8 Author: Allen Pais Date: Mon Jun 14 17:33:17 2021 -0500 firmware: tee_bnxt: Release TEE shm, session, and context during kexec Implement a .shutdown hook that will be called during a kexec operation so that the TEE shared memory, session, and context that were set up during .probe can be properly freed/closed. Additionally, don't use dma-buf backed shared memory for the fw_shm_pool. dma-buf backed shared memory cannot be reliably freed and unregistered during a kexec operation even when tee_shm_free() is called on the shm from a .shutdown hook. The problem occurs because dma_buf_put() calls fput() which then uses task_work_add(), with the TWA_RESUME parameter, to queue tee_shm_release() to be called before the current task returns to user mode. However, the current task never returns to user mode before the kexec completes so the memory is never freed nor unregistered. Use tee_shm_alloc_kernel_buf() to avoid dma-buf backed shared memory allocation so that tee_shm_free() can directly call tee_shm_release(). This will ensure that the shm can be freed and unregistered during a kexec operation. Fixes: 246880958ac9 ("firmware: broadcom: add OP-TEE based BNXT f/w manager") Cc: stable@vger.kernel.org Signed-off-by: Allen Pais Co-developed-by: Tyler Hicks Signed-off-by: Tyler Hicks Reviewed-by: Sumit Garg Acked-by: Florian Fainelli Signed-off-by: Jens Wiklander commit dfb703ad2a8d366b829818a558337be779746575 Author: Tyler Hicks Date: Mon Jun 14 17:33:16 2021 -0500 tpm_ftpm_tee: Free and unregister TEE shared memory during kexec dma-buf backed shared memory cannot be reliably freed and unregistered during a kexec operation even when tee_shm_free() is called on the shm from a .shutdown hook. The problem occurs because dma_buf_put() calls fput() which then uses task_work_add(), with the TWA_RESUME parameter, to queue tee_shm_release() to be called before the current task returns to user mode. However, the current task never returns to user mode before the kexec completes so the memory is never freed nor unregistered. Use tee_shm_alloc_kernel_buf() to avoid dma-buf backed shared memory allocation so that tee_shm_free() can directly call tee_shm_release(). This will ensure that the shm can be freed and unregistered during a kexec operation. Fixes: 09e574831b27 ("tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE") Fixes: 1760eb689ed6 ("tpm/tpm_ftpm_tee: add shutdown call back") Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks Reviewed-by: Sumit Garg Acked-by: Jarkko Sakkinen Signed-off-by: Jens Wiklander commit 376e4199e327a5cf29b8ec8fb0f64f3d8b429819 Author: Sumit Garg Date: Mon Jun 14 17:33:15 2021 -0500 tee: Correct inappropriate usage of TEE_SHM_DMA_BUF flag Currently TEE_SHM_DMA_BUF flag has been inappropriately used to not register shared memory allocated for private usage by underlying TEE driver: OP-TEE in this case. So rather add a new flag as TEE_SHM_PRIV that can be utilized by underlying TEE drivers for private allocation and usage of shared memory. With this corrected, allow tee_shm_alloc_kernel_buf() to allocate a shared memory region without the backing of dma-buf. Cc: stable@vger.kernel.org Signed-off-by: Sumit Garg Co-developed-by: Tyler Hicks Signed-off-by: Tyler Hicks Reviewed-by: Jens Wiklander Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit dc7019b7d0e188d4093b34bd0747ed0d668c63bf Author: Jens Wiklander Date: Mon Jun 14 17:33:14 2021 -0500 tee: add tee_shm_alloc_kernel_buf() Adds a new function tee_shm_alloc_kernel_buf() to allocate shared memory from a kernel driver. This function can later be made more lightweight by unnecessary dma-buf export. Cc: stable@vger.kernel.org Reviewed-by: Tyler Hicks Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit b5c10dd04b7418793517e3286cde5c04759a86de Author: Tyler Hicks Date: Mon Jun 14 17:33:13 2021 -0500 optee: Clear stale cache entries during initialization The shm cache could contain invalid addresses if optee_disable_shm_cache() was not called from the .shutdown hook of the previous kernel before a kexec. These addresses could be unmapped or they could point to mapped but unintended locations in memory. Clear the shared memory cache, while being careful to not translate the addresses returned from OPTEE_SMC_DISABLE_SHM_CACHE, during driver initialization. Once all pre-cache shm objects are removed, proceed with enabling the cache so that we know that we can handle cached shm objects with confidence later in the .shutdown hook. Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks Reviewed-by: Jens Wiklander Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit f25889f93184db8b07a543cc2bbbb9a8fcaf4333 Author: Allen Pais Date: Mon Jun 14 17:33:12 2021 -0500 optee: fix tee out of memory failure seen during kexec reboot The following out of memory errors are seen on kexec reboot from the optee core. [ 0.368428] tee_bnxt_fw optee-clnt0: tee_shm_alloc failed [ 0.368461] tee_bnxt_fw: probe of optee-clnt0 failed with error -22 tee_shm_release() is not invoked on dma shm buffer. Implement .shutdown() method to handle the release of the buffers correctly. More info: https://github.com/OP-TEE/optee_os/issues/3637 Cc: stable@vger.kernel.org Signed-off-by: Allen Pais Reviewed-by: Tyler Hicks Reviewed-by: Jens Wiklander Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit adf752af454e91e123e85e3784972d166837af73 Author: Tyler Hicks Date: Mon Jun 14 17:33:11 2021 -0500 optee: Refuse to load the driver under the kdump kernel Fix a hung task issue, seen when booting the kdump kernel, that is caused by all of the secure world threads being in a permanent suspended state: INFO: task swapper/0:1 blocked for more than 120 seconds. Not tainted 5.4.83 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. swapper/0 D 0 1 0 0x00000028 Call trace: __switch_to+0xc8/0x118 __schedule+0x2e0/0x700 schedule+0x38/0xb8 schedule_timeout+0x258/0x388 wait_for_completion+0x16c/0x4b8 optee_cq_wait_for_completion+0x28/0xa8 optee_disable_shm_cache+0xb8/0xf8 optee_probe+0x560/0x61c platform_drv_probe+0x58/0xa8 really_probe+0xe0/0x338 driver_probe_device+0x5c/0xf0 device_driver_attach+0x74/0x80 __driver_attach+0x64/0xe0 bus_for_each_dev+0x84/0xd8 driver_attach+0x30/0x40 bus_add_driver+0x188/0x1e8 driver_register+0x64/0x110 __platform_driver_register+0x54/0x60 optee_driver_init+0x20/0x28 do_one_initcall+0x54/0x24c kernel_init_freeable+0x1e8/0x2c0 kernel_init+0x18/0x118 ret_from_fork+0x10/0x18 The invoke_fn hook returned OPTEE_SMC_RETURN_ETHREAD_LIMIT, indicating that the secure world threads were all in a suspended state at the time of the kernel crash. This intermittently prevented the kdump kernel from booting, resulting in a failure to collect the kernel dump. Make kernel dump collection more reliable on systems utilizing OP-TEE by refusing to load the driver under the kdump kernel. Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks Reviewed-by: Jens Wiklander Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit ec185dd3ab257dc2a60953fdf1b6622f524cc5b7 Author: Tyler Hicks Date: Mon Jun 14 17:33:10 2021 -0500 optee: Fix memory leak when failing to register shm pages Free the previously allocated pages when we encounter an error condition while attempting to register the pages with the secure world. Fixes: a249dd200d03 ("tee: optee: Fix dynamic shm pool allocations") Fixes: 5a769f6ff439 ("optee: Fix multi page dynamic shm pool alloc") Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks Reviewed-by: Jens Wiklander Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit a47fa41381a09e5997afd762664db4f5f6657e03 Author: David Disseldorp Date: Wed Jul 21 00:55:22 2021 +0200 scsi: target: Fix NULL dereference on XCOPY completion CPU affinity control added with commit 39ae3edda325 ("scsi: target: core: Make completion affinity configurable") makes target_complete_cmd() queue work on a CPU based on se_tpg->se_tpg_wwn->cmd_compl_affinity state. LIO's EXTENDED COPY worker is a special case in that read/write cmds are dispatched using the global xcopy_pt_tpg, which carries a NULL se_tpg_wwn pointer following initialization in target_xcopy_setup_pt(). The NULL xcopy_pt_tpg->se_tpg_wwn pointer is dereferenced on completion of any EXTENDED COPY initiated read/write cmds. E.g using the libiscsi SCSI.ExtendedCopy.Simple test: BUG: kernel NULL pointer dereference, address: 00000000000001a8 RIP: 0010:target_complete_cmd+0x9d/0x130 [target_core_mod] Call Trace: fd_execute_rw+0x148/0x42a [target_core_file] ? __dynamic_pr_debug+0xa7/0xe0 ? target_check_reservation+0x5b/0x940 [target_core_mod] __target_execute_cmd+0x1e/0x90 [target_core_mod] transport_generic_new_cmd+0x17c/0x330 [target_core_mod] target_xcopy_issue_pt_cmd+0x9/0x60 [target_core_mod] target_xcopy_read_source.isra.7+0x10b/0x1b0 [target_core_mod] ? target_check_fua+0x40/0x40 [target_core_mod] ? transport_complete_task_attr+0x130/0x130 [target_core_mod] target_xcopy_do_work+0x61f/0xc00 [target_core_mod] This fix makes target_complete_cmd() queue work on se_cmd->cpuid if se_tpg_wwn is NULL. Link: https://lore.kernel.org/r/20210720225522.26291-1-ddiss@suse.de Fixes: 39ae3edda325 ("scsi: target: core: Make completion affinity configurable") Cc: Lee Duncan Cc: Mike Christie Reviewed-by: Mike Christie Signed-off-by: David Disseldorp Signed-off-by: Martin K. Petersen commit 09cfae9f13d51700b0fecf591dcd658fc5375428 Author: Markus Boehme Date: Tue Jul 20 16:26:19 2021 -0700 ixgbe: Fix packet corruption due to missing DMA sync When receiving a packet with multiple fragments, hardware may still touch the first fragment until the entire packet has been received. The driver therefore keeps the first fragment mapped for DMA until end of packet has been asserted, and delays its dma_sync call until then. The driver tries to fit multiple receive buffers on one page. When using 3K receive buffers (e.g. using Jumbo frames and legacy-rx is turned off/build_skb is being used) on an architecture with 4K pages, the driver allocates an order 1 compound page and uses one page per receive buffer. To determine the correct offset for a delayed DMA sync of the first fragment of a multi-fragment packet, the driver then cannot just use PAGE_MASK on the DMA address but has to construct a mask based on the actual size of the backing page. Using PAGE_MASK in the 3K RX buffer/4K page architecture configuration will always sync the first page of a compound page. With the SWIOTLB enabled this can lead to corrupted packets (zeroed out first fragment, re-used garbage from another packet) and various consequences, such as slow/stalling data transfers and connection resets. For example, testing on a link with MTU exceeding 3058 bytes on a host with SWIOTLB enabled (e.g. "iommu=soft swiotlb=262144,force") TCP transfers quickly fizzle out without this patch. Cc: stable@vger.kernel.org Fixes: 0c5661ecc5dd7 ("ixgbe: fix crash in build_skb Rx code path") Signed-off-by: Markus Boehme Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 4a8ac5e45cdaa88884b4ce05303e304cbabeb367 Author: Chris Packham Date: Fri Jul 16 08:58:32 2021 +1200 i2c: mpc: Poll for MCF During some transfers the bus can still be busy when an interrupt is received. Commit 763778cd7926 ("i2c: mpc: Restore reread of I2C status register") attempted to address this by re-reading MPC_I2C_SR once but that just made it less likely to happen without actually preventing it. Instead of a single re-read, poll with a timeout so that the bus is given enough time to settle but a genuine stuck SCL is still noticed. Fixes: 1538d82f4647 ("i2c: mpc: Interrupt driven transfer") Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit a750bff5b99e4097de2fa0cf00b78abb98a3c0d2 Merge: 2734d6c1b1a08 c36748ac54542 Author: Wolfram Sang Date: Tue Jul 20 22:28:56 2021 +0200 Merge tag 'at24-fixes-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current at24 fixes for v5.14 - fix a problem with repeating labels not getting a device id commit 6b4b87f2c31ac1af4f244990a7cbfb50d3f3e33f Author: Dave Jiang Date: Wed Jul 14 11:50:06 2021 -0700 dmaengine: idxd: fix submission race window Konstantin observed that when descriptors are submitted, the descriptor is added to the pending list after the submission. This creates a race window with the slight possibility that the descriptor can complete before it gets added to the pending list and this window would cause the completion handler to miss processing the descriptor. To address the issue, the addition of the descriptor to the pending list must be done before it gets submitted to the hardware. However, submitting to swq with ENQCMDS instruction can cause a failure with the condition of either wq is full or wq is not "active". With the descriptor allocation being the gate to the wq capacity, it is not possible to hit a retry with ENQCMDS submission to the swq. The only possible failure can happen is when wq is no longer "active" due to hw error and therefore we are moving towards taking down the portal. Given this is a rare condition and there's no longer concern over I/O performance, the driver can walk the completion lists in order to retrieve and abort the descriptor. The error path will set the descriptor to aborted status. It will take the work list lock to prevent further processing of worklist. It will do a delete_all on the pending llist to retrieve all descriptors on the pending llist. The delete_all action does not require a lock. It will walk through the acquired llist to find the aborted descriptor while add all remaining descriptors to the work list since it holds the lock. If it does not find the aborted descriptor on the llist, it will walk through the work list. And if it still does not find the descriptor, then it means the interrupt handler has removed the desc from the llist but is pending on the work list lock and will process it once the error path releases the lock. Fixes: eb15e7154fbf ("dmaengine: idxd: add interrupt handle request and release support") Reported-by: Konstantin Ananyev Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/162628855747.360485.10101925573082466530.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 7eb25da161befbc9a80e94e1bd90d6c06aa645cf Author: Dave Jiang Date: Wed Jul 14 14:57:19 2021 -0700 dmaengine: idxd: fix sequence for pci driver remove() and shutdown() ->shutdown() call should only be responsible for quiescing the device. Currently it is doing PCI device tear down. This causes issue when things like MMIO mapping is removed while idxd_unregister_devices() will trigger removal of idxd device sub-driver and still initiates MMIO writes to the device. Another issue is with the unregistering of idxd 'struct device', the memory context gets freed. So the teardown calls are accessing freed memory and can cause kernel oops. Move all the teardown bits that doesn't belong in shutdown to ->remove() call. Move unregistering of the idxd conf_dev 'struct device' to after doing all the teardown to free all the memory that's no longer needed. Fixes: 47c16ac27d4c ("dmaengine: idxd: fix idxd conf_dev 'struct device' lifetime") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/162629983901.395844.17964803190905549615.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 8ba89a3c7967808f33478a8573277cf6a7412c4c Author: Dave Jiang Date: Wed Jul 14 11:38:41 2021 -0700 dmaengine: idxd: fix desc->vector that isn't being updated Missing update for desc->vector when the wq vector gets updated. This causes the desc->vector to always be at 0. Fixes: da435aedb00a ("dmaengine: idxd: fix array index when int_handles are being used") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/162628784374.353761.4736602409627820431.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 4cbb02fa76de4bbada0af9409fcce3aa747880ea Author: Sibi Sankar Date: Tue Jul 20 22:39:13 2021 +0530 arm64: dts: qcom: sc7280: Fixup cpufreq domain info for cpu7 The SC7280 SoC supports a 4-Silver/3-Gold/1-Gold+ configuration and hence the cpu7 node should point to cpufreq domain 2 instead. Fixes: 7dbd121a2c58 ("arm64: dts: qcom: sc7280: Add cpufreq hw node") Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1626800953-613-1-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 0cde560a8bfc3cb790715f39d4535129cca9e6ae Author: Heiko Carstens Date: Mon Jul 19 21:58:21 2021 +0200 s390: update defconfigs Signed-off-by: Heiko Carstens commit 7d244643758e4cb51a29f948f6be3edd15d92cc3 Author: kernel test robot Date: Mon Jul 19 12:41:41 2021 +0800 s390/cpumf: fix semicolon.cocci warnings arch/s390/kernel/perf_cpum_cf.c:748:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: a029a4eab39e ("s390/cpumf: Allow concurrent access for CPU Measurement Counter Facility") CC: Thomas Richter Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Heiko Carstens commit 463f36c76fa4ec015c640ff63ccf52e7527abee0 Author: Alexander Egorenkov Date: Fri Jul 16 22:00:22 2021 +0200 s390/boot: fix use of expolines in the DMA code The DMA code section of the decompressor must be compiled with expolines if Spectre V2 mitigation has been enabled for the decompressed kernel. This is required because although the decompressor's image contains the DMA code section, it is handed over to the decompressed kernel for use. Because the DMA code is already slow w/o expolines, use expolines always regardless whether the decompressed kernel is using them or not. This simplifies the DMA code by dropping the conditional compilation of expolines. Fixes: bf72630130c2 ("s390: use proper expoline sections for .dma code") Cc: # 5.2 Signed-off-by: Alexander Egorenkov Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit cdb330f4b41ab55feb35487729e883c9e08b8a54 Author: Luis Henriques Date: Thu Jul 15 14:40:39 2021 +0100 ceph: don't WARN if we're still opening a session to an MDS If MDSs aren't available while mounting a filesystem, the session state will transition from SESSION_OPENING to SESSION_CLOSING. And in that scenario check_session_state() will be called from delayed_work() and trigger this WARN. Avoid this by only WARNing after a session has already been established (i.e., the s_ttl will be different from 0). Fixes: 62575e270f66 ("ceph: check session state after bumping session->s_seq") Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit ed9eb71085ecb7ded9a5118cec2ab70667cc7350 Author: Ilya Dryomov Date: Sat Jul 3 11:31:26 2021 +0200 rbd: don't hold lock_rwsem while running_list is being drained Currently rbd_quiesce_lock() holds lock_rwsem for read while blocking on releasing_wait completion. On the I/O completion side, each image request also needs to take lock_rwsem for read. Because rw_semaphore implementation doesn't allow new readers after a writer has indicated interest in the lock, this can result in a deadlock if something that needs to take lock_rwsem for write gets involved. For example: 1. watch error occurs 2. rbd_watch_errcb() takes lock_rwsem for write, clears owner_cid and releases lock_rwsem 3. after reestablishing the watch, rbd_reregister_watch() takes lock_rwsem for write and calls rbd_reacquire_lock() 4. rbd_quiesce_lock() downgrades lock_rwsem to for read and blocks on releasing_wait until running_list becomes empty 5. another watch error occurs 6. rbd_watch_errcb() blocks trying to take lock_rwsem for write 7. no in-flight image request can complete and delete itself from running_list because lock_rwsem won't be granted anymore A similar scenario can occur with "lock has been acquired" and "lock has been released" notification handers which also take lock_rwsem for write to update owner_cid. We don't actually get anything useful from sitting on lock_rwsem in rbd_quiesce_lock() -- owner_cid updates certainly don't need to be synchronized with. In fact the whole owner_cid tracking logic could probably be removed from the kernel client because we don't support proxied maintenance operations. Cc: stable@vger.kernel.org # 5.3+ URL: https://tracker.ceph.com/issues/42757 Signed-off-by: Ilya Dryomov Tested-by: Robin Geuze commit 8798d070d416d18a75770fc19787e96705073f43 Author: Ilya Dryomov Date: Sat Jul 3 11:56:55 2021 +0200 rbd: always kick acquire on "acquired" and "released" notifications Skipping the "lock has been released" notification if the lock owner is not what we expect based on owner_cid can lead to I/O hangs. One example is our own notifications: because owner_cid is cleared in rbd_unlock(), when we get our own notification it is processed as unexpected/duplicate and maybe_kick_acquire() isn't called. If a peer that requested the lock then doesn't go through with acquiring it, I/O requests that came in while the lock was being quiesced would be stalled until another I/O request is submitted and kicks acquire from rbd_img_exclusive_lock(). This makes the comment in rbd_release_lock() actually true: prior to this change the canceled work was being requeued in response to the "lock has been acquired" notification from rbd_handle_acquired_lock(). Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Ilya Dryomov Tested-by: Robin Geuze commit e81d71e343c6c62cf323042caed4b7ca049deda5 Author: Kai Vehmanen Date: Tue Jul 20 18:32:16 2021 +0300 ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10 On some Intel NUC10 variants, codec reports AC_JACK_PORT_NONE as pin default config for all pins. This results in broken audio. Add a quirk to force connectivity. BugLink: https://github.com/clearlinux/distribution/issues/2396 Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210720153216.2200938-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 4152433c397697acc4b02c4a10d17d5859c2730d Author: Benjamin Herrenschmidt Date: Tue Jul 20 21:14:05 2021 +1000 arm64: efi: kaslr: Fix occasional random alloc (and boot) failure The EFI stub random allocator used for kaslr on arm64 has a subtle bug. In function get_entry_num_slots() which counts the number of possible allocation "slots" for the image in a given chunk of free EFI memory, "last_slot" can become negative if the chunk is smaller than the requested allocation size. The test "if (first_slot > last_slot)" doesn't catch it because both first_slot and last_slot are unsigned. I chose not to make them signed to avoid problems if this is ever used on architectures where there are meaningful addresses with the top bit set. Instead, fix it with an additional test against the allocation size. This can cause a boot failure in addition to a loss of randomisation due to another bug in the arm64 stub fixed separately. Signed-off-by: Benjamin Herrenschmidt Fixes: 2ddbfc81eac8 ("efi: stub: add implementation of efi_random_alloc()") Signed-off-by: Ard Biesheuvel commit 91bed5565bba03b2a9f7334b58ae4be9df7c3840 Author: Jia He Date: Tue Jul 20 21:26:55 2021 +0800 Revert "qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()" This reverts commit 6206b7981a36476f4695d661ae139f7db36a802d. That patch added additional spin_{un}lock_bh(), which was harmless but pointless. The orginal code path has guaranteed the pair of spin_{un}lock_bh(). We'd better revert it before we find the exact root cause of the bug_on mentioned in that patch. Fixes: 6206b7981a36 ("qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()") Cc: David S. Miller Cc: Prabhakar Kushwaha Signed-off-by: Jia He Signed-off-by: David S. Miller commit 8fb4792f091e608a0a1d353dfdf07ef55a719db5 Author: Paolo Abeni Date: Tue Jul 20 15:08:40 2021 +0200 ipv6: fix another slab-out-of-bounds in fib6_nh_flush_exceptions While running the self-tests on a KASAN enabled kernel, I observed a slab-out-of-bounds splat very similar to the one reported in commit 821bbf79fe46 ("ipv6: Fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions"). We additionally need to take care of fib6_metrics initialization failure when the caller provides an nh. The fix is similar, explicitly free the route instead of calling fib6_info_release on a half-initialized object. Fixes: f88d8ea67fbdb ("ipv6: Plumb support for nexthop object in a fib6_info") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 75d5641497a60bb5d36ff77fd3f526906cbc148c Author: Maxim Kochetkov Date: Tue Jul 20 08:08:38 2021 +0300 fsl/fman: Add fibre support Set SUPPORTED_FIBRE to mac_dev->if_support. It allows proper usage of PHYs with optical/fiber support. Signed-off-by: Maxim Kochetkov Acked-by: Madalin Bucur Signed-off-by: David S. Miller commit 727d6a8b7ef3d25080fad228b2c4a1d4da5999c6 Author: Peilin Ye Date: Mon Jul 19 16:41:24 2021 -0700 net/sched: act_skbmod: Skip non-Ethernet packets Currently tcf_skbmod_act() assumes that packets use Ethernet as their L2 protocol, which is not always the case. As an example, for CAN devices: $ ip link add dev vcan0 type vcan $ ip link set up vcan0 $ tc qdisc add dev vcan0 root handle 1: htb $ tc filter add dev vcan0 parent 1: protocol ip prio 10 \ matchall action skbmod swap mac Doing the above silently corrupts all the packets. Do not perform skbmod actions for non-Ethernet packets. Fixes: 86da71b57383 ("net_sched: Introduce skbmod action") Reviewed-by: Cong Wang Signed-off-by: Peilin Ye Signed-off-by: David S. Miller commit 7e777021780e9c373fc0c04d40b8407ce8c3b5d5 Author: Eric Woudstra Date: Mon Jul 19 20:23:57 2021 +0200 mt7530 mt7530_fdb_write only set ivl bit vid larger than 1 Fixes my earlier patch which broke vlan unaware bridges. The IVL bit now only gets set for vid's larger than 1. Fixes: 11d8d98cbeef ("mt7530 fix mt7530_fdb_write vid missing ivl bit") Signed-off-by: Eric Woudstra Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6f91d7abf1fa6ad47b660f4172463143c8820ee6 Merge: 97d0931f67f3e 23109f8dd06d0 Author: David S. Miller Date: Tue Jul 20 07:00:45 2021 -0700 Merge branch 'octeon-DMAC' Subbaraya Sundeep says: ==================== octeontx2-af: Introduce DMAC based switching With this patch set packets can be switched between all CGX mapped PFs and VFs in the system based on the DMAC addresses. To implement this: AF allocates high priority rules from top entry(0) in MCAM. Rules are allocated for all the CGX mapped PFs and VFs though they are not active and with no NIXLFs attached. Rules for a PF/VF will be enabled only after they are brought up. Two rules one for TX and one for RX are allocated for each PF/VF. A packet sent from a PF/VF with a destination mac of another PF/VF will be hit by TX rule and sent to LBK channel 63. The same returned packet will be hit by RX rule whose action is to forward packet to PF/VF with that destination mac. Implementation of this for 98xx is tricky since there are two NIX blocks and till now a PF/VF can install rule for an NIX0/1 interface only if it is mapped to corresponding NIX0/1 block. Hence Tx rules are modified such that TX interface in MCAM entry can be either NIX0-TX or NIX1-TX. Testing: 1. Create two VFs over PF1(on NIX0) and assign two VFs to two VMs 2. Assign ip addresses to two VFs in VMs and PF2(on NIX1) in host. 3. Assign static arp entries in two VMs and PF2. 4. Ping between VMs and host PF2. ==================== Signed-off-by: David S. Miller commit 3abab27c322e0f2acf981595aa8040c9164dc9fb Author: Charles Baylis Date: Fri Jul 16 17:43:12 2021 +0100 drm: Return -ENOTTY for non-drm ioctls drm: Return -ENOTTY for non-drm ioctls Return -ENOTTY from drm_ioctl() when userspace passes in a cmd number which doesn't relate to the drm subsystem. Glibc uses the TCGETS ioctl to implement isatty(), and without this change isatty() returns it incorrectly returns true for drm devices. To test run this command: $ if [ -t 0 ]; then echo is a tty; fi < /dev/dri/card0 which shows "is a tty" without this patch. This may also modify memory which the userspace application is not expecting. Signed-off-by: Charles Baylis Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/YPG3IBlzaMhfPqCr@stando.fishzet.co.uk commit 362a9e65289284f36403058eea2462d0330c1f24 Author: Yang Yingliang Date: Tue Jul 20 16:38:05 2021 +0800 io_uring: fix memleak in io_init_wq_offload() I got memory leak report when doing fuzz test: BUG: memory leak unreferenced object 0xffff888107310a80 (size 96): comm "syz-executor.6", pid 4610, jiffies 4295140240 (age 20.135s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... backtrace: [<000000001974933b>] kmalloc include/linux/slab.h:591 [inline] [<000000001974933b>] kzalloc include/linux/slab.h:721 [inline] [<000000001974933b>] io_init_wq_offload fs/io_uring.c:7920 [inline] [<000000001974933b>] io_uring_alloc_task_context+0x466/0x640 fs/io_uring.c:7955 [<0000000039d0800d>] __io_uring_add_tctx_node+0x256/0x360 fs/io_uring.c:9016 [<000000008482e78c>] io_uring_add_tctx_node fs/io_uring.c:9052 [inline] [<000000008482e78c>] __do_sys_io_uring_enter fs/io_uring.c:9354 [inline] [<000000008482e78c>] __se_sys_io_uring_enter fs/io_uring.c:9301 [inline] [<000000008482e78c>] __x64_sys_io_uring_enter+0xabc/0xc20 fs/io_uring.c:9301 [<00000000b875f18f>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<00000000b875f18f>] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 [<000000006b0a8484>] entry_SYSCALL_64_after_hwframe+0x44/0xae CPU0 CPU1 io_uring_enter io_uring_enter io_uring_add_tctx_node io_uring_add_tctx_node __io_uring_add_tctx_node __io_uring_add_tctx_node io_uring_alloc_task_context io_uring_alloc_task_context io_init_wq_offload io_init_wq_offload hash = kzalloc hash = kzalloc ctx->hash_map = hash ctx->hash_map = hash <- one of the hash is leaked When calling io_uring_enter() in parallel, the 'hash_map' will be leaked, add uring_lock to protect 'hash_map'. Fixes: e941894eae31 ("io-wq: make buffered file write hashed work map per-ctx") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20210720083805.3030730-1-yangyingliang@huawei.com Signed-off-by: Jens Axboe commit 46fee9ab02cb24979bbe07631fc3ae95ae08aa3e Author: Pavel Begunkov Date: Tue Jul 20 10:50:44 2021 +0100 io_uring: remove double poll entry on arm failure __io_queue_proc() can enqueue both poll entries and still fail afterwards, so the callers trying to cancel it should also try to remove the second poll entry (if any). For example, it may leave the request alive referencing a io_uring context but not accessible for cancellation: [ 282.599913][ T1620] task:iou-sqp-23145 state:D stack:28720 pid:23155 ppid: 8844 flags:0x00004004 [ 282.609927][ T1620] Call Trace: [ 282.613711][ T1620] __schedule+0x93a/0x26f0 [ 282.634647][ T1620] schedule+0xd3/0x270 [ 282.638874][ T1620] io_uring_cancel_generic+0x54d/0x890 [ 282.660346][ T1620] io_sq_thread+0xaac/0x1250 [ 282.696394][ T1620] ret_from_fork+0x1f/0x30 Cc: stable@vger.kernel.org Fixes: 18bceab101add ("io_uring: allow POLL_ADD with double poll_wait() users") Reported-and-tested-by: syzbot+ac957324022b7132accf@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0ec1228fc5eda4cb524eeda857da8efdc43c331c.1626774457.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 68b11e8b1562986c134764433af64e97d30c9fc0 Author: Pavel Begunkov Date: Tue Jul 20 10:50:43 2021 +0100 io_uring: explicitly count entries for poll reqs If __io_queue_proc() fails to add a second poll entry, e.g. kmalloc() failed, but it goes on with a third waitqueue, it may succeed and overwrite the error status. Count the number of poll entries we added, so we can set pt->error to zero at the beginning and find out when the mentioned scenario happens. Cc: stable@vger.kernel.org Fixes: 18bceab101add ("io_uring: allow POLL_ADD with double poll_wait() users") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9d6b9e561f88bcc0163623b74a76c39f712151c3.1626774457.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c45c1e82bba130db4f19d9dbc1deefcf4ea994ed Author: Alexandru Tachici Date: Sat Jul 17 00:02:45 2021 +0300 spi: spi-bcm2835: Fix deadlock The bcm2835_spi_transfer_one function can create a deadlock if it is called while another thread already has the CCF lock. Signed-off-by: Alexandru Tachici Fixes: f8043872e796 ("spi: add driver for BCM2835") Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210716210245.13240-2-alexandru.tachici@analog.com Signed-off-by: Mark Brown commit ddab1e71d2df3513ed6029435b97dcd83fbaa372 Merge: 2734d6c1b1a08 47e1e233e9d82 Author: Ingo Molnar Date: Tue Jul 20 13:30:14 2021 +0200 Merge tag 'efi-urgent-for-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent Pull EFI fixes for v5.14-rc2 from Ard Biesheuvel: " - Ensure that memblock reservations and IO reserved resources remain in sync when using the EFI memreserve feature. - Don't complain about invalid TPM final event log table if it is missing altogether. - Comment header fix for the stub. - Avoid a spurious warning when attempting to reserve firmware memory that is already reserved in the first place." Signed-off-by: Ingo Molnar commit 97d0931f67f3ec50578f39ba90601380c6b50947 Merge: cbb56b03ec3f3 bbfd4506f962e Author: Jakub Kicinski Date: Tue Jul 20 13:12:50 2021 +0200 Merge branch 'net-hns3-fixes-for-net' Guangbin Huang says: ==================== net: hns3: fixes for -net This series includes some bugfixes for the HNS3 ethernet driver. ==================== Link: https://lore.kernel.org/r/1626685988-25869-1-git-send-email-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski commit bbfd4506f962e7e6fff8f37f017154a3c3791264 Author: Jian Shen Date: Mon Jul 19 17:13:08 2021 +0800 net: hns3: fix rx VLAN offload state inconsistent issue Currently, VF doesn't enable rx VLAN offload when initializating, and PF does it for VFs. If user disable the rx VLAN offload for VF with ethtool -K, and reload the VF driver, it may cause the rx VLAN offload state being inconsistent between hardware and software. Fixes it by enabling rx VLAN offload when VF initializing. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 184cd221a86321e53df9389c4b35a247b60c1e77 Author: Jian Shen Date: Mon Jul 19 17:13:07 2021 +0800 net: hns3: disable port VLAN filter when support function level VLAN filter control For hardware limitation, port VLAN filter is port level, and effective for all the functions of the port. So if not support port VLAN bypass, it's necessary to disable the port VLAN filter, in order to support function level VLAN filter control. Fixes: 2ba306627f59 ("net: hns3: add support for modify VLAN filter state") Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 4671042f1ef0d37137884811afcc4ae67685ce07 Author: Peng Li Date: Mon Jul 19 17:13:06 2021 +0800 net: hns3: add match_id to check mailbox response from PF to VF When VF need response from PF, VF will wait (1us - 1s) to receive the response, or it will wait timeout and the VF action fails. If VF do not receive response in 1st action because timeout, the 2nd action may receive response for the 1st action, and get incorrect response data.VF must reciveve the right response from PF,or it will cause unexpected error. This patch adds match_id to check mailbox response from PF to VF, to make sure VF get the right response: 1. The message sent from VF was labelled with match_id which was a unique 16-bit non-zero value. 2. The response sent from PF will label with match_id which got from the request. 3. The VF uses the match_id to match request and response message. This scheme depends on PF driver supports match_id, if PF driver doesn't support then VF will uses the original scheme. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 1b713d14dc3c077ec45e65dab4ea01a8bc41b8c1 Author: Chengwen Feng Date: Mon Jul 19 17:13:05 2021 +0800 net: hns3: fix possible mismatches resp of mailbox Currently, the mailbox synchronous communication between VF and PF use the following fields to maintain communication: 1. Origin_mbx_msg which was combined by message code and subcode, used to match request and response. 2. Received_resp which means whether received response. There may possible mismatches of the following situation: 1. VF sends message A with code=1 subcode=1. 2. PF was blocked about 500ms when processing the message A. 3. VF will detect message A timeout because it can't get the response within 500ms. 4. VF sends message B with code=1 subcode=1 which equal message A. 5. PF processes the first message A and send the response message to VF. 6. VF will identify the response matched the message B because the code/subcode is the same. This will lead to mismatch of request and response. To fix the above bug, we use the following scheme: 1. The message sent from VF was labelled with match_id which was a unique 16-bit non-zero value. 2. The response sent from PF will label with match_id which got from the request. 3. The VF uses the match_id to match request and response message. As for PF driver, it only needs to copy the match_id from request to response. Fixes: dde1a86e93ca ("net: hns3: Add mailbox support to PF driver") Signed-off-by: Chengwen Feng Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit cbb56b03ec3f317e3728d0f68d25d4b9e590cdc9 Author: Vladimir Oltean Date: Mon Jul 19 12:39:16 2021 +0300 net: bridge: do not replay fdb entries pointing towards the bridge twice This simple script: ip link add br0 type bridge ip link set swp2 master br0 ip link set br0 address 00:01:02:03:04:05 ip link del br0 produces this result on a DSA switch: [ 421.306399] br0: port 1(swp2) entered blocking state [ 421.311445] br0: port 1(swp2) entered disabled state [ 421.472553] device swp2 entered promiscuous mode [ 421.488986] device swp2 left promiscuous mode [ 421.493508] br0: port 1(swp2) entered disabled state [ 421.886107] sja1105 spi0.1: port 1 failed to delete 00:01:02:03:04:05 vid 1 from fdb: -ENOENT [ 421.894374] sja1105 spi0.1: port 1 failed to delete 00:01:02:03:04:05 vid 0 from fdb: -ENOENT [ 421.943982] br0: port 1(swp2) entered blocking state [ 421.949030] br0: port 1(swp2) entered disabled state [ 422.112504] device swp2 entered promiscuous mode A very simplified view of what happens is: (1) the bridge port is created, and the bridge device inherits its MAC address (2) when joining, the bridge port (DSA) requests a replay of the addition of all FDB entries towards this bridge port and towards the bridge device itself. In fact, DSA calls br_fdb_replay() twice: br_fdb_replay(br, brport_dev); br_fdb_replay(br, br); DSA uses reference counting for the FDB entries. So the MAC address of the bridge is simply kept with refcount 2. When the bridge port leaves under normal circumstances, everything cancels out since the replay of the FDB entry deletion is also done twice per VLAN. (3) when the bridge MAC address changes, switchdev is notified of the deletion of the old address and of the insertion of the new one. But the old address does not really go away, since it had refcount 2, and the new address is added "only" with refcount 1. (4) when the bridge port leaves now, it will replay a deletion of the FDB entries pointing towards the bridge twice. Then DSA will complain that it can't delete something that no longer exists. It is clear that the problem is that the FDB entries towards the bridge are replayed too many times, so let's fix that problem. Fixes: 63c51453c82c ("net: dsa: replay the local bridge FDB entries pointing to the bridge dev too") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210719093916.4099032-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit ff5a6a3550cef4a272fee19520a13699343b6a47 Merge: 2734d6c1b1a08 aebacb7f6ca19 Author: Thomas Gleixner Date: Tue Jul 20 12:51:23 2021 +0200 Merge branch 'timers/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/urgent Pull dyntick fixes from Frederic Weisbecker: - Fix a rearm race in the posix cpu timer code - Handle get_next_timer_interrupt() correctly when no timers are pending Link: https://lore.kernel.org/r/20210715104218.81276-1-frederic@kernel.org commit 6c2d125823ae89d10293437c6fb8a2f3406d721a Author: Landen Chao Date: Tue Jul 20 11:50:07 2021 +0800 net: Update MAINTAINERS for MediaTek switch driver Update maintainers for MediaTek switch driver with Deng Qingfang who has contributed many high-quality patches (interrupt, VLAN, GPIO, and etc.) and will help maintenance. Signed-off-by: Landen Chao Signed-off-by: DENG Qingfang Reviewed-by: Florian Fainelli Acked-by: Vladimir Oltean Link: https://lore.kernel.org/r/49e1aa8aac58dcbf1b5e036d09b3fa3bbb1d94d0.1626751861.git.landen.chao@mediatek.com Signed-off-by: Jakub Kicinski commit 749468760b952e555529ca8a71256b991455101e Author: Eric Dumazet Date: Mon Jul 19 02:20:28 2021 -0700 net/tcp_fastopen: remove obsolete extern After cited commit, sysctl_tcp_fastopen_blackhole_timeout is no longer a global variable. Fixes: 3733be14a32b ("ipv4: Namespaceify tcp_fastopen_blackhole_timeout knob") Signed-off-by: Eric Dumazet Cc: Haishuang Yan Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Wei Wang Link: https://lore.kernel.org/r/20210719092028.3016745-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 2d85a1b31dde84038ea07ad825c3d8d3e71f4344 Author: Vasily Averin Date: Mon Jul 19 10:55:14 2021 +0300 ipv6: ip6_finish_output2: set sk into newly allocated nskb skb_set_owner_w() should set sk not to old skb but to new nskb. Fixes: 5796015fa968 ("ipv6: allocate enough headroom in ip6_finish_output2()") Signed-off-by: Vasily Averin Link: https://lore.kernel.org/r/70c0744f-89ae-1869-7e3e-4fa292158f4b@virtuozzo.com Signed-off-by: Jakub Kicinski commit d371588910715ebf7fa8e3a5d21ea5169c852927 Author: Takashi Iwai Date: Tue Jul 20 11:27:32 2021 +0200 ALSA: pcm: Fix mmap without buffer preallocation The recent rewrite of the memory allocation helpers also changed the page extraction to a common helper, snd_sgbuf_get_page(). But this assumes implicitly that the buffer was allocated via the standard helper (usually via preallocation), and didn't consider the case of the manual buffer handling. This patch fixes it and also covers the manual buffer management. Fixes: 37af81c5998f ("ALSA: core: Abstract memory alloc helpers") Link: https://lore.kernel.org/r/20210720092732.12412-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c4824ae7db418aee6f50f308a20b832e58e997fd Author: Takashi Iwai Date: Tue Jul 20 11:26:40 2021 +0200 ALSA: pcm: Fix mmap capability check The hw_support_mmap() doesn't cover all memory allocation types and might use a wrong device pointer for checking the capability. Check the all memory allocation types more completely. Cc: Link: https://lore.kernel.org/r/20210720092640.12338-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 47e1e233e9d822dfda068383fb9a616451bda703 Author: Borislav Petkov Date: Tue Jul 20 09:28:09 2021 +0200 efi/mokvar: Reserve the table only if it is in boot services data One of the SUSE QA tests triggered: localhost kernel: efi: Failed to lookup EFI memory descriptor for 0x000000003dcf8000 which comes from x86's version of efi_arch_mem_reserve() trying to reserve a memory region. Usually, that function expects EFI_BOOT_SERVICES_DATA memory descriptors but the above case is for the MOKvar table which is allocated in the EFI shim as runtime services. That lead to a fix changing the allocation of that table to boot services. However, that fix broke booting SEV guests with that shim leading to this kernel fix 8d651ee9c71b ("x86/ioremap: Map EFI-reserved memory as encrypted for SEV") which extended the ioremap hint to map reserved EFI boot services as decrypted too. However, all that wasn't needed, IMO, because that error message in efi_arch_mem_reserve() was innocuous in this case - if the MOKvar table is not in boot services, then it doesn't need to be reserved in the first place because it is, well, in runtime services which *should* be reserved anyway. So do that reservation for the MOKvar table only if it is allocated in boot services data. I couldn't find any requirement about where that table should be allocated in, unlike the ESRT which allocation is mandated to be done in boot services data by the UEFI spec. Signed-off-by: Borislav Petkov Signed-off-by: Ard Biesheuvel commit e9db418d4b828dd049caaf5ed65dc86f93bb1a0c Author: Ian Ray Date: Mon Jul 19 18:43:49 2021 +0200 USB: serial: cp210x: fix comments for GE CS1000 Fix comments for GE CS1000 CP210x USB ID assignments. Fixes: 42213a0190b5 ("USB: serial: cp210x: add some more GE USB IDs") Signed-off-by: Ian Ray Signed-off-by: Sebastian Reichel Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 114613f62f42e7cbc1242c4e82076a0153043761 Author: Pierre-Louis Bossart Date: Mon Jul 19 18:17:46 2021 -0500 ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID We missed the fact that ElkhartLake platforms have two different PCI IDs. We only added one so the SOF driver is never selected by the autodetection logic for the missing configuration. BugLink: https://github.com/thesofproject/linux/issues/2990 Fixes: cc8f81c7e625 ('ALSA: hda: fix intel DSP config') Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210719231746.557325-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit fae21608c31ca987d9dfc0422ac9b5bd21c213a6 Author: Sreekanth Reddy Date: Mon Jul 5 20:29:50 2021 +0530 scsi: mpt3sas: Transition IOC to Ready state during shutdown The IOC firmware assumes that the host driver is still alive after shutdown and continues to post events to host memory (due to faulty expander phy links, etc). This leads to 0x2666 (a bus fault occurred during a host-IOC memory access). Perform an IOC soft reset as part of shutdown to disable event posting. Link: https://lore.kernel.org/r/20210705145951.32258-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 8d4abca95ecc82fc8c41912fa0085281f19cc29f Author: Gustavo A. R. Silva Date: Mon Apr 19 18:43:32 2021 -0500 media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf() Fix an 11-year old bug in ngene_command_config_free_buf() while addressing the following warnings caught with -Warray-bounds: arch/alpha/include/asm/string.h:22:16: warning: '__builtin_memcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds] arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [12, 16] from the object at 'com' is out of the bounds of referenced subobject 'config' with type 'unsigned char' at offset 10 [-Warray-bounds] The problem is that the original code is trying to copy 6 bytes of data into a one-byte size member _config_ of the wrong structue FW_CONFIGURE_BUFFERS, in a single call to memcpy(). This causes a legitimate compiler warning because memcpy() overruns the length of &com.cmd.ConfigureBuffers.config. It seems that the right structure is FW_CONFIGURE_FREE_BUFFERS, instead, because it contains 6 more members apart from the header _hdr_. Also, the name of the function ngene_command_config_free_buf() suggests that the actual intention is to ConfigureFreeBuffers, instead of ConfigureBuffers (which takes place in the function ngene_command_config_buf(), above). Fix this by enclosing those 6 members of struct FW_CONFIGURE_FREE_BUFFERS into new struct config, and use &com.cmd.ConfigureFreeBuffers.config as the destination address, instead of &com.cmd.ConfigureBuffers.config, when calling memcpy(). This also helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Fixes: dae52d009fc9 ("V4L/DVB: ngene: Initial check-in") Cc: stable@vger.kernel.org Reported-by: kernel test robot Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/linux-hardening/20210420001631.GA45456@embeddedor/ commit 8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b Author: Eric Sandeen Date: Tue Jul 13 17:49:23 2021 +0200 seq_file: disallow extremely large seq buffer allocations There is no reasonable need for a buffer larger than this, and it avoids int overflow pitfalls. Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation") Suggested-by: Al Viro Reported-by: Qualys Security Advisory Signed-off-by: Eric Sandeen Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit d6371c76e20d7d3f61b05fd67b596af4d14a8886 Author: Lorenz Bauer Date: Mon Jul 19 09:51:34 2021 +0100 bpf: Fix OOB read when printing XDP link fdinfo We got the following UBSAN report on one of our testing machines: ================================================================================ UBSAN: array-index-out-of-bounds in kernel/bpf/syscall.c:2389:24 index 6 is out of range for type 'char *[6]' CPU: 43 PID: 930921 Comm: systemd-coredum Tainted: G O 5.10.48-cloudflare-kasan-2021.7.0 #1 Hardware name: Call Trace: dump_stack+0x7d/0xa3 ubsan_epilogue+0x5/0x40 __ubsan_handle_out_of_bounds.cold+0x43/0x48 ? seq_printf+0x17d/0x250 bpf_link_show_fdinfo+0x329/0x380 ? bpf_map_value_size+0xe0/0xe0 ? put_files_struct+0x20/0x2d0 ? __kasan_kmalloc.constprop.0+0xc2/0xd0 seq_show+0x3f7/0x540 seq_read_iter+0x3f8/0x1040 seq_read+0x329/0x500 ? seq_read_iter+0x1040/0x1040 ? __fsnotify_parent+0x80/0x820 ? __fsnotify_update_child_dentry_flags+0x380/0x380 vfs_read+0x123/0x460 ksys_read+0xed/0x1c0 ? __x64_sys_pwrite64+0x1f0/0x1f0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ================================================================================ ================================================================================ UBSAN: object-size-mismatch in kernel/bpf/syscall.c:2384:2 From the report, we can infer that some array access in bpf_link_show_fdinfo at index 6 is out of bounds. The obvious candidate is bpf_link_type_strs[BPF_LINK_TYPE_XDP] with BPF_LINK_TYPE_XDP == 6. It turns out that BPF_LINK_TYPE_XDP is missing from bpf_types.h and therefore doesn't have an entry in bpf_link_type_strs: pos: 0 flags: 02000000 mnt_id: 13 link_type: (null) link_id: 4 prog_tag: bcf7977d3b93787c prog_id: 4 ifindex: 1 Fixes: aa8d3a716b59 ("bpf, xdp: Add bpf_link-based XDP attachment API") Signed-off-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210719085134.43325-2-lmb@cloudflare.com commit 615c77eb5e870d1ffa95f4001cba3612bd2f2332 Author: Gustavo A. R. Silva Date: Thu Jul 15 00:10:26 2021 -0500 powerpc/pasemi: Fix fall-through warning for Clang Fix the following fallthrough warning: arch/powerpc/platforms/pasemi/idle.c:45:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60efbf18.d9n6eXv275OJcc7T%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 3cb6a271f4b04f11270111638c24fa5c0b846dec Author: Petr Vorel Date: Tue Jul 13 20:57:34 2021 +0200 arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem mapping cont_splash_mem has different memory mapping than generic from msm8994.dtsi: [ 0.000000] cma: Found cont_splash_mem@0, memory base 0x0000000003400000, size 12 MiB, limit 0xffffffffffffffff [ 0.000000] cma: CMA: reserved 12 MiB at 0x0000000003400000 for cont_splash_mem This fixes boot. Fixes: 976d321f32dc ("arm64: dts: qcom: msm8992: Make the DT an overlay on top of 8994") Signed-off-by: Petr Vorel Link: https://lore.kernel.org/r/20210713185734.380-3-petr.vorel@gmail.com Signed-off-by: Bjorn Andersson commit 9d1fc2e4f5a94a492c7dd1ca577c66fdb7571c84 Author: Petr Vorel Date: Tue Jul 13 20:57:33 2021 +0200 arm64: dts: qcom: msm8992-bullhead: Remove PSCI Bullhead firmware obviously doesn't support PSCI as it fails to boot with this definition. Fixes: 329e16d5f8fc ("arm64: dts: qcom: msm8992: Add PSCI support.") Signed-off-by: Petr Vorel Link: https://lore.kernel.org/r/20210713185734.380-2-petr.vorel@gmail.com Signed-off-by: Bjorn Andersson commit 23109f8dd06d0bd04c9360cf7c501c97b0ab1545 Author: Subbaraya Sundeep Date: Mon Jul 19 14:29:34 2021 +0530 octeontx2-af: Introduce internal packet switching As of now any communication between CGXs PFs and their VFs within the system is possible only by external switches sending packets back to the system. This patch adds internal switching support. Broadcast packet replication is not covered here. RVU admin function (AF) maintains MAC addresses of all interfaces in the system. When switching is enabled, MCAM entries are allocated to install rules such that packets with DMAC matching any of the internal interface MAC addresses is punted back into the system via the loopback channel. On the receive side the default unicast rules are modified to not check for ingress channel. So any packet with matching DMAC irrespective of which interface it is coming from will be forwarded to the respective PF/VF interface. The transmit side rules and default unicast rules are updated if user changes MAC address of an interface. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit cb7a6b3bac1d0d773f2b6cc35f6bab61eb5de5ef Author: Subbaraya Sundeep Date: Mon Jul 19 14:29:33 2021 +0530 octeontx2-af: Prepare for allocating MCAM rules for AF AF till now only manages the allocation and freeing of MCAM rules for other PF/VFs in system. To implement L2 switching between all CGX mapped PF and VFs, AF requires MCAM entries for DMAC rules for each PF and VF. This patch modifies AF driver such that AF can also allocate MCAM rules and install rules for other PFs and VFs. All the checks like channel verification for RX rules and PF_FUNC verification for TX rules are relaxed in case AF is allocating or installing rules. Also all the entry and counter to owner mappings are set to NPC_MCAM_INVALID_MAP when they are free indicating those are not allocated to AF nor PF/VFs. This patch also ensures that AF allocated and installed entries are displayed in debugfs. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit fa2bf6baf2b1d8350e5193ce4014bdddc51a25d0 Author: Subbaraya Sundeep Date: Mon Jul 19 14:29:32 2021 +0530 octeontx2-af: Enable transmit side LBK link For enabling VF-VF switching the packets egressing out of CGX mapped VFs needed to be sent to LBK so that same packets are received back to the system. But the LBK link also needs to be enabled in addition to a VF's mapped CGX_LMAC link otherwise hardware raises send error interrupt indicating selected LBK link is not enabled in NIX_AF_TL3_TL2X_LINKX_CFG register. Hence this patch enables all LBK links in TL3_TL2_LINKX_CFG registers. Also to enable packet flow between PFs/VFs of NIX0 to PFs/VFs of NIX1(in 98xx silicon) the NPC TX DMAC rules has to be installed such that rules must be hit for any TX interface i.e., NIX0-TX or NIX1-TX provided DMAC match creteria is met. Hence this patch changes the behavior such that MCAM is programmed to match with any NIX0/1-TX interface for TX rules. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 6f20c8adb1813467ea52c1296d52c4e95978cb2f Author: Eric Dumazet Date: Mon Jul 19 02:12:18 2021 -0700 net/tcp_fastopen: fix data races around tfo_active_disable_stamp tfo_active_disable_stamp is read and written locklessly. We need to annotate these accesses appropriately. Then, we need to perform the atomic_inc(tfo_active_disable_times) after the timestamp has been updated, and thus add barriers to make sure tcp_fastopen_active_should_disable() wont read a stale timestamp. Fixes: cf1ef3f0719b ("net/tcp_fastopen: Disable active side TFO in certain scenarios") Signed-off-by: Eric Dumazet Cc: Wei Wang Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Wei Wang Signed-off-by: David S. Miller commit a0050653db957270a948ea0519763de802084180 Merge: b16f3299ae1aa 77e5253deadf7 Author: David S. Miller Date: Mon Jul 19 10:08:06 2021 -0700 Merge branch 'dt-bindinga-dwmac' Joakim Zhang says: ==================== dt-bindings: net: dwmac-imx: convert This patch set intends to convert imx dwmac binding to schema, and fixes found by dt_binding_check and dtbs_check. ==================== Signed-off-by: David S. Miller commit 77e5253deadf7fae59207330e3a639e592ee7892 Author: Joakim Zhang Date: Mon Jul 19 15:18:21 2021 +0800 arm64: dts: imx8mp: change interrupt order per dt-binding This patch changs interrupt order which found by dtbs_check. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml arch/arm64/boot/dts/freescale/imx8mp-evk.dt.yaml: ethernet@30bf0000: interrupt-names:0: 'macirq' was expected arch/arm64/boot/dts/freescale/imx8mp-evk.dt.yaml: ethernet@30bf0000: interrupt-names:1: 'eth_wake_irq' was expected According to Documentation/devicetree/bindings/net/snps,dwmac.yaml, we should list interrupt in it's order. Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit e314a07ef263916f761b736ded7a30894709dfd7 Author: Joakim Zhang Date: Mon Jul 19 15:18:20 2021 +0800 dt-bindings: net: imx-dwmac: convert imx-dwmac bindings to yaml In order to automate the verification of DT nodes covert imx-dwmac to nxp,dwmac-imx.yaml, and pass below checking. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit bdad810eb97875813a067504424a483aaa309bad Author: Joakim Zhang Date: Mon Jul 19 15:18:19 2021 +0800 dt-bindings: net: snps,dwmac: add missing DWMAC IP version Add missing DWMAC IP version in snps,dwmac.yaml which found by below command, as NXP i.MX8 families support SNPS DWMAC 5.10a IP. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml Documentation/devicetree/bindings/net/nxp,dwmac-imx.example.dt.yaml: ethernet@30bf0000: compatible: None of ['nxp,imx8mp-dwmac-eqos', 'snps,dwmac-5.10a'] are valid under the given schema Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit b16f3299ae1aa3c327e1fb742d0379ae4d6e86f2 Author: Randy Dunlap Date: Sun Jul 18 13:38:34 2021 -0700 net: hisilicon: rename CACHE_LINE_MASK to avoid redefinition Building on ARCH=arc causes a "redefined" warning, so rename this driver's CACHE_LINE_MASK to avoid the warning. ../drivers/net/ethernet/hisilicon/hip04_eth.c:134: warning: "CACHE_LINE_MASK" redefined 134 | #define CACHE_LINE_MASK 0x3F In file included from ../include/linux/cache.h:6, from ../include/linux/printk.h:9, from ../include/linux/kernel.h:19, from ../include/linux/list.h:9, from ../include/linux/module.h:12, from ../drivers/net/ethernet/hisilicon/hip04_eth.c:7: ../arch/arc/include/asm/cache.h:17: note: this is the location of the previous definition 17 | #define CACHE_LINE_MASK (~(L1_CACHE_BYTES - 1)) Fixes: d413779cdd93 ("net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC") Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: Jiangfeng Xiao Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 9a253bb42f190efd1a1c156939ad7298b3529dca Author: Srinivas Kandagatla Date: Tue Jul 6 09:35:23 2021 +0100 arm64: dts: qcom: c630: fix correct powerdown pin for WSA881x WSA881x powerdown pin is connected to GPIO1, GPIO2 not GPIO2 and GPIO3, so correct this. This was working so far due to a shift bug in gpio driver, however once that is fixed this will stop working, so fix this! For some reason we forgot to add this dts change in last merge cycle so currently audio is broken in 5.13 as the gpio driver fix already landed in 5.13. Reported-by: Shawn Guo Fixes: 45021d35fcb2 ("arm64: dts: qcom: c630: Enable audio support") Signed-off-by: Srinivas Kandagatla Tested-by: Shawn Guo Link: https://lore.kernel.org/r/20210706083523.10601-1-srinivas.kandagatla@linaro.org Signed-off-by: Bjorn Andersson commit 1dd271d9e55296579e5ff7490346bcb2d7e03db8 Merge: 517a16b1a88bd de5bf19414fec Author: David S. Miller Date: Mon Jul 19 08:50:35 2021 -0700 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes Most of the fixes in this series have to do with error recovery. They include error path handling when the error recovery has to abort, and the rediscovery of capabilities (PTP and RoCE) after firmware reset that may result in capability changes. Two other fixes are to reject invalid ETS settings and to validate VLAN protocol in the RX path. ==================== Signed-off-by: David S. Miller commit de5bf19414fec860168f05d00d574562bd9d86d1 Author: Michael Chan Date: Sun Jul 18 15:36:33 2021 -0400 bnxt_en: Fix PTP capability discovery The current PTP initialization logic does not account for firmware reset that may cause PTP capability to change. The valid pointer bp->ptp_cfg is used to indicate that the device is capable of PTP and that it has been initialized. So we must clean up bp->ptp_cfg and free it if the firmware after reset does not support PTP. Fixes: 93cb62d98e9c ("bnxt_en: Enable hardware PTP support") Cc: Richard Cochran Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d7859afb6880249039b178fdfb1bef94fd954cf2 Author: Michael Chan Date: Sun Jul 18 15:36:32 2021 -0400 bnxt_en: Move bnxt_ptp_init() to bnxt_open() The device needs to be in ifup state for PTP to function, so move bnxt_ptp_init() to bnxt_open(). This means that the PHC will be registered during bnxt_open(). This also makes firmware reset work correctly. PTP configurations may change after firmware upgrade or downgrade. bnxt_open() will be called after firmware reset, so it will work properly. bnxt_ptp_start() is now incorporated into bnxt_ptp_init(). We now also need to call bnxt_ptp_clear() in bnxt_close(). Fixes: 93cb62d98e9c ("bnxt_en: Enable hardware PTP support") Cc: Richard Cochran Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 11a39259ff79b74bc99f8b7c44075a2d6d5e7ab1 Author: Somnath Kotur Date: Sun Jul 18 15:36:31 2021 -0400 bnxt_en: Check abort error state in bnxt_half_open_nic() bnxt_half_open_nic() is called during during ethtool self test and is protected by rtnl_lock. Firmware reset can be happening at the same time. Only critical portions of the entire firmware reset sequence are protected by the rtnl_lock. It is possible that bnxt_half_open_nic() can be called when the firmware reset sequence is aborting. In that case, bnxt_half_open_nic() needs to check if the ABORT_ERR flag is set and abort if it is. The ethtool self test will fail but the NIC will be brought to a consistent IF_DOWN state. Without this patch, if bnxt_half_open_nic() were to continue in this error state, it may crash like this: bnxt_en 0000:82:00.1 enp130s0f1np1: FW reset in progress during close, FW reset will be aborted Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... Process ethtool (pid: 333327, stack limit = 0x0000000046476577) Call trace: bnxt_alloc_mem+0x444/0xef0 [bnxt_en] bnxt_half_open_nic+0x24/0xb8 [bnxt_en] bnxt_self_test+0x2dc/0x390 [bnxt_en] ethtool_self_test+0xe0/0x1f8 dev_ethtool+0x1744/0x22d0 dev_ioctl+0x190/0x3e0 sock_ioctl+0x238/0x480 do_vfs_ioctl+0xc4/0x758 ksys_ioctl+0x84/0xb8 __arm64_sys_ioctl+0x28/0x38 el0_svc_handler+0xb0/0x180 el0_svc+0x8/0xc Fixes: a1301f08c5ac ("bnxt_en: Check abort error state in bnxt_open_nic().") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 96bdd4b9ea7ef9a12db8fdd0ce90e37dffbd3703 Author: Michael Chan Date: Sun Jul 18 15:36:30 2021 -0400 bnxt_en: Validate vlan protocol ID on RX packets Only pass supported VLAN protocol IDs for stripped VLAN tags to the stack. The stack will hit WARN() if the protocol ID is unsupported. Existing firmware sets up the chip to strip 0x8100, 0x88a8, 0x9100. Only the 1st two protocols are supported by the kernel. Fixes: a196e96bb68f ("bnxt_en: clean up VLAN feature bit handling") Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3958b1da725a477b4a222183d16a14d85445d4b6 Author: Somnath Kotur Date: Sun Jul 18 15:36:29 2021 -0400 bnxt_en: fix error path of FW reset When bnxt_open() fails in the firmware reset path, the driver needs to gracefully abort, but it is executing code that should be invoked only in the success path. Define a function to abort FW reset and consolidate all error paths to call this new function. Fixes: dab62e7c2de7 ("bnxt_en: Implement faster recovery for firmware fatal error.") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6cd657cb3ee6f4de57e635b126ffbe0e51d00f1a Author: Michael Chan Date: Sun Jul 18 15:36:28 2021 -0400 bnxt_en: Add missing check for BNXT_STATE_ABORT_ERR in bnxt_fw_rset_task() In the BNXT_FW_RESET_STATE_POLL_VF state in bnxt_fw_reset_task() after all VFs have unregistered, we need to check for BNXT_STATE_ABORT_ERR after we acquire the rtnl_lock. If the flag is set, we need to abort. Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2c9f046bc377efd1f5e26e74817d5f96e9506c86 Author: Michael Chan Date: Sun Jul 18 15:36:27 2021 -0400 bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe() The capabilities can change after firmware upgrade/downgrade, so we should get the up-to-date RoCE capabilities everytime bnxt_ulp_probe() is called. Fixes: 2151fe0830fd ("bnxt_en: Handle RESET_NOTIFY async event from firmware.") Reviewed-by: Somnath Kotur Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c08c59653415201ac46ab791c936ae804c45a11b Author: Edwin Peer Date: Sun Jul 18 15:36:26 2021 -0400 bnxt_en: reject ETS settings that will starve a TC ETS proportions are presented to HWRM_QUEUE_COS2BW_CFG as minimum bandwidth constraints. Thus, zero is a legal value for a given TC. However, if all the other TCs sum up to 100%, then at least one hardware queue will starve, resulting in guaranteed TX timeouts. Reject such nonsensical configurations. Reviewed-by: Pavan Chebbi Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c81cfb6256d90ea5ba4a6fb280ea3b171be4e05c Author: Kalesh AP Date: Sun Jul 18 15:36:25 2021 -0400 bnxt_en: don't disable an already disabled PCI device If device is already disabled in reset path and PCI io error is detected before the device could be enabled, driver could call pci_disable_device() for already disabled device. Fix this problem by calling pci_disable_device() only if the device is already enabled. Fixes: 6316ea6db93d ("bnxt_en: Enable AER support.") Signed-off-by: Kalesh AP Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 71f6428332844f38c7cb10461d9f29e9c9b983a0 Author: Andy Shevchenko Date: Mon Jul 12 21:21:21 2021 +0300 ACPI: utils: Fix reference counting in for_each_acpi_dev_match() Currently it's possible to iterate over the dangling pointer in case the device suddenly disappears. This may happen becase callers put it at the end of a loop. Instead, let's move that call inside acpi_dev_get_next_match_dev(). Fixes: 803abec64ef9 ("media: ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver") Fixes: bf263f64e804 ("media: ACPI / bus: Add acpi_dev_get_next_match_dev() and helper macro") Fixes: edbd1bc4951e ("efi/dev-path-parser: Switch to use for_each_acpi_dev_match()") Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Signed-off-by: Rafael J. Wysocki commit d2cbbf1fe503c07e466c62f83aa1926d74d15821 Author: Robert Richter Date: Thu Jul 15 11:26:01 2021 +0200 ACPI: Kconfig: Fix table override from built-in initrd During a rework of initramfs code the INITRAMFS_COMPRESSION config option was removed in commit 65e00e04e5ae. A leftover as a dependency broke the config option ACPI_TABLE_OVERRIDE_VIA_ BUILTIN_INITRD that is used to enable the overriding of ACPI tables from built-in initrd. Fixing the dependency. Fixes: 65e00e04e5ae ("initramfs: refactor the initramfs build rules") Signed-off-by: Robert Richter Signed-off-by: Rafael J. Wysocki commit 7025098af33430b302d3c2d78ef12327c60ee8f9 Merge: 2734d6c1b1a08 5cf17746b302a Author: Paolo Bonzini Date: Mon Jul 19 10:05:40 2021 -0400 Merge tag 'kvmarm-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.14, take #1 - Fix MTE shared page detection - Fix selftest use of obsolete pthread_yield() in favour of sched_yield() - Enable selftest's use of PMU registers when asked to commit 3761baae908a7b5012be08d70fa553cc2eb82305 Author: Jason Ekstrand Date: Wed Jul 14 14:34:16 2021 -0500 Revert "drm/i915: Propagate errors on awaiting already signaled fences" This reverts commit 9e31c1fe45d555a948ff66f1f0e3fe1f83ca63f7. Ever since that commit, we've been having issues where a hang in one client can propagate to another. In particular, a hang in an app can propagate to the X server which causes the whole desktop to lock up. Error propagation along fences sound like a good idea, but as your bug shows, surprising consequences, since propagating errors across security boundaries is not a good thing. What we do have is track the hangs on the ctx, and report information to userspace using RESET_STATS. That's how arb_robustness works. Also, if my understanding is still correct, the EIO from execbuf is when your context is banned (because not recoverable or too many hangs). And in all these cases it's up to userspace to figure out what is all impacted and should be reported to the application, that's not on the kernel to guess and automatically propagate. What's more, we're also building more features on top of ctx error reporting with RESET_STATS ioctl: Encrypted buffers use the same, and the userspace fence wait also relies on that mechanism. So it is the path going forward for reporting gpu hangs and resets to userspace. So all together that's why I think we should just bury this idea again as not quite the direction we want to go to, hence why I think the revert is the right option here. For backporters: Please note that you _must_ have a backport of https://lore.kernel.org/dri-devel/20210602164149.391653-2-jason@jlekstrand.net/ for otherwise backporting just this patch opens up a security bug. v2: Augment commit message. Also restore Jason's sob that I accidentally lost. v3: Add a note for backporters Signed-off-by: Jason Ekstrand Reported-by: Marcin Slusarz Cc: # v5.6+ Cc: Jason Ekstrand Cc: Marcin Slusarz Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3080 Fixes: 9e31c1fe45d5 ("drm/i915: Propagate errors on awaiting already signaled fences") Acked-by: Daniel Vetter Reviewed-by: Jon Bloomfield Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210714193419.1459723-3-jason@jlekstrand.net (cherry picked from commit 93a2711cddd5760e2f0f901817d71c93183c3b87) Signed-off-by: Rodrigo Vivi commit c9d9fdbc108af8915d3f497bbdf3898bf8f321b8 Author: Jason Ekstrand Date: Wed Jul 14 14:34:15 2021 -0500 drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser" This reverts 686c7c35abc2 ("drm/i915/gem: Asynchronous cmdparser"). The justification for this commit in the git history was a vague comment about getting it out from under the struct_mutex. While this may improve perf for some workloads on Gen7 platforms where we rely on the command parser for features such as indirect rendering, no numbers were provided to prove such an improvement. It claims to closed two gitlab/bugzilla issues but with no explanation whatsoever as to why or what bug it's fixing. Meanwhile, by moving command parsing off to an async callback, it leaves us with a problem of what to do on error. When things were synchronous, EXECBUFFER2 would fail with an error code if parsing failed. When moving it to async, we needed another way to handle that error and the solution employed was to set an error on the dma_fence and then trust that said error gets propagated to the client eventually. Moving back to synchronous will help us untangle the fence error propagation mess. This also reverts most of 0edbb9ba1bfe ("drm/i915: Move cmd parser pinning to execbuffer") which is a refactor of some of our allocation paths for asynchronous parsing. Now that everything is synchronous, we don't need it. v2 (Daniel Vetter): - Add stabel Cc and Fixes tag Signed-off-by: Jason Ekstrand Cc: # v5.6+ Fixes: 9e31c1fe45d5 ("drm/i915: Propagate errors on awaiting already signaled fences") Cc: Maarten Lankhorst Reviewed-by: Jon Bloomfield Acked-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210714193419.1459723-2-jason@jlekstrand.net (cherry picked from commit 93b713304188844b8514074dc13ffd56d12235d3) Signed-off-by: Rodrigo Vivi commit 450405cdc0e18b899925b87aa4d1e84775082450 Merge: 2734d6c1b1a08 c90b4503ccf42 Author: Rodrigo Vivi Date: Mon Jul 19 09:54:08 2021 -0400 Merge tag 'gvt-fixes-2021-07-15' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2021-07-15 - Fix shadow ppgtt invalidation with proper D3 state tracking (Colin) Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210715022237.GX12150@zhen-hp.sh.intel.com commit 56912da7a68c8356df6a6740476237441b0b792a Author: Marek Vasut Date: Fri Jul 16 20:21:33 2021 +0200 spi: cadence: Correct initialisation of runtime PM again The original implementation of RPM handling in probe() was mostly correct, except it failed to call pm_runtime_get_*() to activate the hardware. The subsequent fix, 734882a8bf98 ("spi: cadence: Correct initialisation of runtime PM"), breaks the implementation further, to the point where the system using this hard IP on ZynqMP hangs on boot, because it accesses hardware which is gated off. Undo 734882a8bf98 ("spi: cadence: Correct initialisation of runtime PM") and instead add missing pm_runtime_get_noresume() and move the RPM disabling all the way to the end of probe(). That makes ZynqMP not hang on boot yet again. Fixes: 734882a8bf98 ("spi: cadence: Correct initialisation of runtime PM") Signed-off-by: Marek Vasut Cc: Charles Keepax Cc: Mark Brown Link: https://lore.kernel.org/r/20210716182133.218640-1-marex@denx.de Signed-off-by: Mark Brown commit 82d28b67f780910f816fe1cfb0f676fc38c4cbb3 Author: Peter Ujfalusi Date: Sat Jul 17 15:28:19 2021 +0300 ASoC: ti: j721e-evm: Check for not initialized parent_clk_id During probe the parent_clk_id is set to -1 which should not be used to array index within hsdiv_rates[]. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210717122820.1467-3-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown commit 78d2a05ef22e7b5863b01e073dd6a06b3979bb00 Author: Peter Ujfalusi Date: Sat Jul 17 15:28:18 2021 +0300 ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup In case of an error within j721e_audio_startup() the domain->active must be decremented to avoid unbalanced counter. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210717122820.1467-2-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown commit 21ed49265986931b8921a2404394426870245bd2 Author: Geert Uytterhoeven Date: Mon Jul 12 09:40:22 2021 +0200 m68k: MAC should select HAVE_PATA_PLATFORM The defconfigs switched Mac from the deprecated CONFIG_BLK_DEV_PLATFORM to CONFIG_PATA_PLATFORM. However, the latter depends on CONFIG_HAVE_PATA_PLATFORM, which thus must be selected first. Fixes: b90257bfddbd01f3 ("m68k: use libata instead of the legacy ide driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210712074022.2116655-1-geert@linux-m68k.org commit 7c9ff3deeee61b253715dcf968a6307af148c9b2 Author: Haiyang Zhang Date: Fri Jul 16 11:21:13 2021 -0700 Drivers: hv: vmbus: Fix duplicate CPU assignments within a device The vmbus module uses a rotational algorithm to assign target CPUs to a device's channels. Depending on the timing of different device's channel offers, different channels of a device may be assigned to the same CPU. For example on a VM with 2 CPUs, if NIC A and B's channels are offered in the following order, NIC A will have both channels on CPU0, and NIC B will have both channels on CPU1 -- see below. This kind of assignment causes RSS load that is spreading across different channels to end up on the same CPU. Timing of channel offers: NIC A channel 0 NIC B channel 0 NIC A channel 1 NIC B channel 1 VMBUS ID 14: Class_ID = {f8615163-df3e-46c5-913f-f2d2f965ed0e} - Synthetic network adapter Device_ID = {cab064cd-1f31-47d5-a8b4-9d57e320cccd} Sysfs path: /sys/bus/vmbus/devices/cab064cd-1f31-47d5-a8b4-9d57e320cccd Rel_ID=14, target_cpu=0 Rel_ID=17, target_cpu=0 VMBUS ID 16: Class_ID = {f8615163-df3e-46c5-913f-f2d2f965ed0e} - Synthetic network adapter Device_ID = {244225ca-743e-4020-a17d-d7baa13d6cea} Sysfs path: /sys/bus/vmbus/devices/244225ca-743e-4020-a17d-d7baa13d6cea Rel_ID=16, target_cpu=1 Rel_ID=18, target_cpu=1 Update the vmbus CPU assignment algorithm to avoid duplicate CPU assignments within a device. The new algorithm iterates num_online_cpus + 1 times. The existing rotational algorithm to find "next NUMA & CPU" is still here. But if the resulting CPU is already used by the same device, it will try the next CPU. In the last iteration, it assigns the channel to the next available CPU like the existing algorithm. This is not normally expected, because during device probe, we limit the number of channels of a device to be <= number of online CPUs. Signed-off-by: Haiyang Zhang Reviewed-by: Michael Kelley Tested-by: Michael Kelley Link: https://lore.kernel.org/r/1626459673-17420-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Wei Liu commit e4efa82660e6d80338c554e45e903714e1b2c27b Author: Hui Wang Date: Mon Jul 19 11:02:31 2021 +0800 ALSA: hda/realtek: Fix pop noise and 2 Front Mic issues on a machine This is a Lenovo ThinkStation machine which uses the codec alc623. There are 2 issues on this machine, the 1st one is the pop noise in the lineout, the 2nd one is there are 2 Front Mics and pulseaudio can't handle them, After applying the fixup of ALC623_FIXUP_LENOVO_THINKSTATION_P340 to this machine, the 2 issues are fixed. Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210719030231.6870-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit a3a9ee4b5254f212c2adaa8cd8ca03bfa112f49d Author: Christian König Date: Wed Jun 9 19:25:56 2021 +0200 drm/nouveau: init the base GEM fields for internal BOs TTMs buffer objects are based on GEM objects for quite a while and rely on initializing those fields before initializing the TTM BO. Nouveau now doesn't init the GEM object for internally allocated BOs, so make sure that we at least initialize some necessary fields. Signed-off-by: Christian König Tested-by: Mikko Perttunen Reviewed-by: Matthew Auld Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/msgid/20210609172902.1937-1-christian.koenig@amd.com commit 6d8e7e7c932162bccd06872362751b0e1d76f5af Author: Dmitry Bogdanov Date: Fri Jul 2 12:16:55 2021 +0300 scsi: target: Fix protect handling in WRITE SAME(32) WRITE SAME(32) command handling reads WRPROTECT at the wrong offset in 1st byte instead of 10th byte. Link: https://lore.kernel.org/r/20210702091655.22818-1-d.bogdanov@yadro.com Fixes: afd73f1b60fc ("target: Perform PROTECT sanity checks for WRITE_SAME") Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen commit e746f3451ec7f91dcc9fd67a631239c715850a34 Author: Mike Christie Date: Wed Jun 30 19:25:59 2021 -0500 scsi: iscsi: Fix iface sysfs attr detection A ISCSI_IFACE_PARAM can have the same value as a ISCSI_NET_PARAM so when iscsi_iface_attr_is_visible tries to figure out the type by just checking the value, we can collide and return the wrong type. When we call into the driver we might not match and return that we don't want attr visible in sysfs. The patch fixes this by setting the type when we figure out what the param is. Link: https://lore.kernel.org/r/20210701002559.89533-1-michael.christie@oracle.com Fixes: 3e0f65b34cc9 ("[SCSI] iscsi_transport: Additional parameters for network settings") Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2734d6c1b1a089fb593ef6a23d4b70903526fe0c Author: Linus Torvalds Date: Sun Jul 18 14:13:49 2021 -0700 Linux 5.14-rc2 commit 8c25c4476496b7136767c4023d1c08990167eaa0 Merge: f0eb870a84224 b0f008551f0bf Author: Linus Torvalds Date: Sun Jul 18 12:20:27 2021 -0700 Merge tag 'perf-tools-fixes-for-v5.14-2021-07-18' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Skip invalid hybrid PMU on hybrid systems when the atom (little) CPUs are offlined. - Fix 'perf test' problems related to the recently added hybrid (BIG/little) code. - Split ARM's coresight (hw tracing) decode by aux records to avoid fatal decoding errors. - Fix add event failure in 'perf probe' when running 32-bit perf in a 64-bit kernel. - Fix 'perf sched record' failure when CONFIG_SCHEDSTATS is not set. - Fix memory and refcount leaks detected by ASAn when running 'perf test', should be clean of warnings now. - Remove broken definition of __LITTLE_ENDIAN from tools' linux/kconfig.h, which was breaking the build in some systems. - Cast PTHREAD_STACK_MIN to int as it may turn into 'long sysconf(__SC_THREAD_STACK_MIN_VALUE), breaking the build in some systems. - Fix libperf build error with LIBPFM4=1. - Sync UAPI files changed by the memfd_secret new syscall. * tag 'perf-tools-fixes-for-v5.14-2021-07-18' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (35 commits) perf sched: Fix record failure when CONFIG_SCHEDSTATS is not set perf probe: Fix add event failure when running 32-bit perf in a 64-bit kernel perf data: Close all files in close_dir() perf probe-file: Delete namelist in del_events() on the error path perf test bpf: Free obj_buf perf trace: Free strings in trace__parse_events_option() perf trace: Free syscall tp fields in evsel->priv perf trace: Free syscall->arg_fmt perf trace: Free malloc'd trace fields on exit perf lzma: Close lzma stream on exit perf script: Fix memory 'threads' and 'cpus' leaks on exit perf script: Release zstd data perf session: Cleanup trace_event perf inject: Close inject.output on exit perf report: Free generated help strings for sort option perf env: Fix memory leak of cpu_pmu_caps perf test maps__merge_in: Fix memory leak of maps perf dso: Fix memory leak in dso__new_map() perf test event_update: Fix memory leak of unit perf test event_update: Fix memory leak of evlist ... commit f0eb870a84224c9bfde0dc547927e8df1be4267c Merge: fbf1bddc4e171 b102a46ce16fd Author: Linus Torvalds Date: Sun Jul 18 11:27:25 2021 -0700 Merge tag 'xfs-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "A few fixes for issues in the new online shrink code, additional corrections for my recent bug-hunt w.r.t. extent size hints on realtime, and improved input checking of the GROWFSRT ioctl. IOW, the usual 'I somehow got bored during the merge window and resumed auditing the farther reaches of xfs': - Fix shrink eligibility checking when sparse inode clusters enabled - Reset '..' directory entries when unlinking directories to prevent verifier errors if fs is shrinked later - Don't report unusable extent size hints to FSGETXATTR - Don't warn when extent size hints are unusable because the sysadmin configured them that way - Fix insufficient parameter validation in GROWFSRT ioctl - Fix integer overflow when adding rt volumes to filesystem" * tag 'xfs-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: detect misaligned rtinherit directory extent size hints xfs: fix an integer overflow error in xfs_growfs_rt xfs: improve FSGROWFSRT precondition checking xfs: don't expose misaligned extszinherit hints to userspace xfs: correct the narrative around misaligned rtinherit/extszinherit dirs xfs: reset child dir '..' entry when unlinking child xfs: check for sparse inode clusters that cross new EOAG when shrinking commit fbf1bddc4e171e26ac55a9637c7db13e75acf4fa Merge: 6750691a82ad2 229adf3c64dbe Author: Linus Torvalds Date: Sun Jul 18 11:17:06 2021 -0700 Merge tag 'iomap-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap fixes from Darrick Wong: "A handful of bugfixes for the iomap code. There's nothing especially exciting here, just fixes for UBSAN (not KASAN as I erroneously wrote in the tag message) warnings about undefined behavior in the SEEK_DATA/SEEK_HOLE code, and some reshuffling of per-page block state info to fix some problems with gfs2. - Fix KASAN warnings due to integer overflow in SEEK_DATA/SEEK_HOLE - Fix assertion errors when using inlinedata files on gfs2" * tag 'iomap-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: Don't create iomap_page objects in iomap_page_mkwrite_actor iomap: Don't create iomap_page objects for inline files iomap: Permit pages without an iop to enter writeback iomap: remove the length variable in iomap_seek_hole iomap: remove the length variable in iomap_seek_data commit 6750691a82ad264dff140a7e9ca8f340729431f0 Merge: 1d67c8d993baf 5e60f363b38fd Author: Linus Torvalds Date: Sun Jul 18 11:10:30 2021 -0700 Merge tag 'kbuild-fixes-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Restore the original behavior of scripts/setlocalversion when LOCALVERSION is set to empty. - Show Kconfig prompts even for 'make -s' - Fix the combination of COFNIG_LTO_CLANG=y and CONFIG_MODVERSIONS=y for older GNU Make versions * tag 'kbuild-fixes-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Documentation: Fix intiramfs script name Kbuild: lto: fix module versionings mismatch in GNU make 3.X kbuild: do not suppress Kconfig prompts for silent build scripts/setlocalversion: fix a bug when LOCALVERSION is empty commit 517a16b1a88bdb6b530f48d5d153478b2552d9a8 Author: Nguyen Dinh Phi Date: Sun Jul 18 22:40:13 2021 +0800 netrom: Decrease sock refcount when sock timers expire Commit 63346650c1a9 ("netrom: switch to sock timer API") switched to use sock timer API. It replaces mod_timer() by sk_reset_timer(), and del_timer() by sk_stop_timer(). Function sk_reset_timer() will increase the refcount of sock if it is called on an inactive timer, hence, in case the timer expires, we need to decrease the refcount ourselves in the handler, otherwise, the sock refcount will be unbalanced and the sock will never be freed. Signed-off-by: Nguyen Dinh Phi Reported-by: syzbot+10f1194569953b72f1ae@syzkaller.appspotmail.com Fixes: 63346650c1a9 ("netrom: switch to sock timer API") Signed-off-by: David S. Miller commit 2f3fdd8d4805015fa964807e1c7f3d88f31bd389 Author: Xin Long Date: Sat Jul 17 17:19:19 2021 -0400 sctp: trim optlen when it's a huge value in sctp_setsockopt After commit ca84bd058dae ("sctp: copy the optval from user space in sctp_setsockopt"), it does memory allocation in sctp_setsockopt with the optlen, and it would fail the allocation and return error if the optlen from user space is a huge value. This breaks some sockopts, like SCTP_HMAC_IDENT, SCTP_RESET_STREAMS and SCTP_AUTH_KEY, as when processing these sockopts before, optlen would be trimmed to a biggest value it needs when optlen is a huge value, instead of failing the allocation and returning error. This patch is to fix the allocation failure when it's a huge optlen from user space by trimming it to the biggest size sctp sockopt may need when necessary, and this biggest size is from sctp_setsockopt_reset_streams() for SCTP_RESET_STREAMS, which is bigger than those for SCTP_HMAC_IDENT and SCTP_AUTH_KEY. Fixes: ca84bd058dae ("sctp: copy the optval from user space in sctp_setsockopt") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit f5051bcece50140abd1a11a2d36dc3ec5484fc32 Author: Pavel Skripkin Date: Sat Jul 17 14:29:33 2021 +0300 net: sched: fix memory leak in tcindex_partial_destroy_work Syzbot reported memory leak in tcindex_set_parms(). The problem was in non-freed perfect hash in tcindex_partial_destroy_work(). In tcindex_set_parms() new tcindex_data is allocated and some fields from old one are copied to new one, but not the perfect hash. Since tcindex_partial_destroy_work() is the destroy function for old tcindex_data, we need to free perfect hash to avoid memory leak. Reported-and-tested-by: syzbot+f0bbb2287b8993d4fa74@syzkaller.appspotmail.com Fixes: 331b72922c5f ("net: sched: RCU cls_tcindex") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit a17ad0961706244dce48ec941f7e476a38c0e727 Author: Pravin B Shelar Date: Thu Jul 15 16:59:00 2021 -0700 net: Fix zero-copy head len calculation. In some cases skb head could be locked and entire header data is pulled from skb. When skb_zerocopy() called in such cases, following BUG is triggered. This patch fixes it by copying entire skb in such cases. This could be optimized incase this is performance bottleneck. ---8<--- kernel BUG at net/core/skbuff.c:2961! invalid opcode: 0000 [#1] SMP PTI CPU: 2 PID: 0 Comm: swapper/2 Tainted: G OE 5.4.0-77-generic #86-Ubuntu Hardware name: OpenStack Foundation OpenStack Nova, BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:skb_zerocopy+0x37a/0x3a0 RSP: 0018:ffffbcc70013ca38 EFLAGS: 00010246 Call Trace: queue_userspace_packet+0x2af/0x5e0 [openvswitch] ovs_dp_upcall+0x3d/0x60 [openvswitch] ovs_dp_process_packet+0x125/0x150 [openvswitch] ovs_vport_receive+0x77/0xd0 [openvswitch] netdev_port_receive+0x87/0x130 [openvswitch] netdev_frame_hook+0x4b/0x60 [openvswitch] __netif_receive_skb_core+0x2b4/0xc90 __netif_receive_skb_one_core+0x3f/0xa0 __netif_receive_skb+0x18/0x60 process_backlog+0xa9/0x160 net_rx_action+0x142/0x390 __do_softirq+0xe1/0x2d6 irq_exit+0xae/0xb0 do_IRQ+0x5a/0xf0 common_interrupt+0xf/0xf Code that triggered BUG: int skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen) { int i, j = 0; int plen = 0; /* length of skb->head fragment */ int ret; struct page *page; unsigned int offset; BUG_ON(!from->head_frag && !hlen); Signed-off-by: Pravin B Shelar Signed-off-by: David S. Miller commit 5e60f363b38fd40e4d8838b5d6f4d4ecee92c777 Author: Robert Richter Date: Thu Jul 15 11:26:02 2021 +0200 Documentation: Fix intiramfs script name Documentation was not changed when renaming the script in commit 80e715a06c2d ("initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh"). Fixing this. Basically does: $ sed -i -e s/gen_initramfs_list.sh/gen_initramfs.sh/g $(git grep -l gen_initramfs_list.sh) Fixes: 80e715a06c2d ("initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh") Signed-off-by: Robert Richter Signed-off-by: Masahiro Yamada commit 1d11053dc63094075bf9e4809fffd3bb5e72f9a6 Author: Lecopzer Chen Date: Thu Jul 15 15:37:16 2021 +0800 Kbuild: lto: fix module versionings mismatch in GNU make 3.X When building modules(CONFIG_...=m), I found some of module versions are incorrect and set to 0. This can be found in build log for first clean build which shows WARNING: EXPORT symbol "XXXX" [drivers/XXX/XXX.ko] version generation failed, symbol will not be versioned. But in second build(incremental build), the WARNING disappeared and the module version becomes valid CRC and make someone who want to change modules without updating kernel image can't insert their modules. The problematic code is + $(foreach n, $(filter-out FORCE,$^), \ + $(if $(wildcard $(n).symversions), \ + ; cat $(n).symversions >> $@.symversions)) For example: rm -f fs/notify/built-in.a.symversions ; rm -f fs/notify/built-in.a; \ llvm-ar cDPrST fs/notify/built-in.a fs/notify/fsnotify.o \ fs/notify/notification.o fs/notify/group.o ... `foreach n` shows nothing to `cat` into $(n).symversions because `if $(wildcard $(n).symversions)` return nothing, but actually they do exist during this line was executed. -rw-r--r-- 1 root root 168580 Jun 13 19:10 fs/notify/fsnotify.o -rw-r--r-- 1 root root 111 Jun 13 19:10 fs/notify/fsnotify.o.symversions The reason is the $(n).symversions are generated at runtime, but Makefile wildcard function expends and checks the file exist or not during parsing the Makefile. Thus fix this by use `test` shell command to check the file existence in runtime. Rebase from both: 1. [https://lore.kernel.org/lkml/20210616080252.32046-1-lecopzer.chen@mediatek.com/] 2. [https://lore.kernel.org/lkml/20210702032943.7865-1-lecopzer.chen@mediatek.com/] Fixes: 38e891849003 ("kbuild: lto: fix module versioning") Co-developed-by: Sami Tolvanen Signed-off-by: Lecopzer Chen Signed-off-by: Masahiro Yamada commit d952cfaf0cffdbbb0433c67206b645131f17ca5f Author: Masahiro Yamada Date: Wed Jul 14 13:23:49 2021 +0900 kbuild: do not suppress Kconfig prompts for silent build When a new CONFIG option is available, Kbuild shows a prompt to get the user input. $ make [ snip ] Core Scheduling for SMT (SCHED_CORE) [N/y/?] (NEW) This is the only interactive place in the build process. Commit 174a1dcc9642 ("kbuild: sink stdout from cmd for silent build") suppressed Kconfig prompts as well because syncconfig is invoked by the 'cmd' macro. You cannot notice the fact that Kconfig is waiting for the user input. Use 'kecho' to show the equivalent short log without suppressing stdout from sub-make. Fixes: 174a1dcc9642 ("kbuild: sink stdout from cmd for silent build") Reported-by: Tetsuo Handa Signed-off-by: Masahiro Yamada Tested-by: Tetsuo Handa commit 5df99bec210a2cf89dd91e52f0d0a714bf4cd96a Author: Mikulas Patocka Date: Mon Jul 12 15:35:46 2021 -0400 scripts/setlocalversion: fix a bug when LOCALVERSION is empty The commit 042da426f8eb ("scripts/setlocalversion: simplify the short version part") reduces indentation. Unfortunately, it also changes behavior in a subtle way - if the user has empty "LOCALVERSION" variable, the plus sign is appended to the kernel version. It wasn't appended before. This patch reverts to the old behavior - we append the plus sign only if the LOCALVERSION variable is not set. Fixes: 042da426f8eb ("scripts/setlocalversion: simplify the short version part") Signed-off-by: Mikulas Patocka Signed-off-by: Masahiro Yamada commit ec7099fdea8025988710ee6fecfd4e4210c29ab5 Author: Rasmus Villemoes Date: Fri Jul 2 15:37:12 2021 +0200 Revert "gpio: mpc8xxx: change the gpio interrupt flags." This reverts commit 3d5bfbd9716318b1ca5c38488aa69f64d38a9aa5. When booting with threadirqs, it causes a splat WARNING: CPU: 0 PID: 29 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1ec/0x27c irq 66 handler irq_default_primary_handler+0x0/0x1c enabled interrupts That splat later went away with commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers"), which got backported to -stable. However, when running an -rt kernel, the splat still exists. Moreover, quoting Thomas Gleixner [1] But 3d5bfbd97163 ("gpio: mpc8xxx: change the gpio interrupt flags.") has nothing to do with that: "Delete the interrupt IRQF_NO_THREAD flags in order to gpio interrupts can be threaded to allow high-priority processes to preempt." This changelog is blatantly wrong. In mainline forced irq threads have always been invoked with softirqs disabled, which obviously makes them non-preemptible. So the patch didn't even do what its commit log said. [1] https://lore.kernel.org/lkml/871r8zey88.ffs@nanos.tec.linutronix.de/ Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Rasmus Villemoes Signed-off-by: Bartosz Golaszewski commit b0f008551f0bf4d5f6db9b5f0e071b02790d6a2e Author: Yang Jihong Date: Tue Jul 13 19:23:58 2021 +0800 perf sched: Fix record failure when CONFIG_SCHEDSTATS is not set The tracepoints trace_sched_stat_{wait, sleep, iowait} are not exposed to user if CONFIG_SCHEDSTATS is not set, "perf sched record" records the three events. As a result, the command fails. Before: #perf sched record sleep 1 event syntax error: 'sched:sched_stat_wait' \___ unknown tracepoint Error: File /sys/kernel/tracing/events/sched/sched_stat_wait not found. Hint: Perhaps this kernel misses some CONFIG_ setting to enable this feature?. Run 'perf list' for a list of valid events Usage: perf record [] [] or: perf record [] -- [] -e, --event event selector. use 'perf list' to list available events Solution: Check whether schedstat tracepoints are exposed. If no, these events are not recorded. After: # perf sched record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.163 MB perf.data (1091 samples) ] # perf sched report run measurement overhead: 4736 nsecs sleep measurement overhead: 9059979 nsecs the run test took 999854 nsecs the sleep test took 8945271 nsecs nr_run_events: 716 nr_sleep_events: 785 nr_wakeup_events: 0 ... ------------------------------------------------------------ Fixes: 2a09b5de235a6 ("sched/fair: do not expose some tracepoints to user if CONFIG_SCHEDSTATS is not set") Signed-off-by: Yang Jihong Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: Yafang Shao Link: http://lore.kernel.org/lkml/20210713112358.194693-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 22a665513b34df458da1d3b7ee0b919c3f3d4653 Author: Yang Jihong Date: Thu Jul 15 14:37:23 2021 +0800 perf probe: Fix add event failure when running 32-bit perf in a 64-bit kernel The "address" member of "struct probe_trace_point" uses long data type. If kernel is 64-bit and perf program is 32-bit, size of "address" variable is 32 bits. As a result, upper 32 bits of address read from kernel are truncated, an error occurs during address comparison in kprobe_warn_out_range(). Before: # perf probe -a schedule schedule is out of .text, skip it. Error: Failed to add events. Solution: Change data type of "address" variable to u64 and change corresponding address printing and value assignment. After: # perf.new.new probe -a schedule Added new event: probe:schedule (on schedule) You can now use it in all perf tools, such as: perf record -e probe:schedule -aR sleep 1 # perf probe -l probe:schedule (on schedule@kernel/sched/core.c) # perf record -e probe:schedule -aR sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.156 MB perf.data (1366 samples) ] # perf report --stdio # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 1K of event 'probe:schedule' # Event count (approx.): 1366 # # Overhead Command Shared Object Symbol # ........ ............... ................. ............ # 6.22% migration/0 [kernel.kallsyms] [k] schedule 6.22% migration/1 [kernel.kallsyms] [k] schedule 6.22% migration/2 [kernel.kallsyms] [k] schedule 6.22% migration/3 [kernel.kallsyms] [k] schedule 6.15% migration/10 [kernel.kallsyms] [k] schedule 6.15% migration/11 [kernel.kallsyms] [k] schedule 6.15% migration/12 [kernel.kallsyms] [k] schedule 6.15% migration/13 [kernel.kallsyms] [k] schedule 6.15% migration/14 [kernel.kallsyms] [k] schedule 6.15% migration/15 [kernel.kallsyms] [k] schedule 6.15% migration/4 [kernel.kallsyms] [k] schedule 6.15% migration/5 [kernel.kallsyms] [k] schedule 6.15% migration/6 [kernel.kallsyms] [k] schedule 6.15% migration/7 [kernel.kallsyms] [k] schedule 6.15% migration/8 [kernel.kallsyms] [k] schedule 6.15% migration/9 [kernel.kallsyms] [k] schedule 0.22% rcu_sched [kernel.kallsyms] [k] schedule ... # # (Cannot load tips.txt file, please install perf!) # Signed-off-by: Yang Jihong Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Frank Ch. Eigler Cc: Ian Rogers Cc: Jianlin Lv Cc: Jin Yao Cc: Jiri Olsa Cc: Li Huafei Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Srikar Dronamraju Link: http://lore.kernel.org/lkml/20210715063723.11926-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit d4b3eedce151e63932ce4a00f1d0baa340a8b907 Author: Riccardo Mancini Date: Fri Jul 16 16:11:20 2021 +0200 perf data: Close all files in close_dir() When using 'perf report' in directory mode, the first file is not closed on exit, causing a memory leak. The problem is caused by the iterating variable never reaching 0. Fixes: 145520631130bd64 ("perf data: Add perf_data__(create_dir|close_dir) functions") Signed-off-by: Riccardo Mancini Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Zhen Lei Link: http://lore.kernel.org/lkml/20210716141122.858082-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit e0fa7ab42232e742dcb3de9f3c1f6127b5adc019 Author: Riccardo Mancini Date: Thu Jul 15 18:07:25 2021 +0200 perf probe-file: Delete namelist in del_events() on the error path ASan reports some memory leaks when running: # perf test "42: BPF filter" This second leak is caused by a strlist not being dellocated on error inside probe_file__del_events. This patch adds a goto label before the deallocation and makes the error path jump to it. Signed-off-by: Riccardo Mancini Fixes: e7895e422e4da63d ("perf probe: Split del_perf_probe_events()") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/174963c587ae77fa108af794669998e4ae558338.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 1d67c8d993baf8ab6be8a2154b1a94ec1311c869 Merge: ae14c63a9f20d 82a1c67554dff Author: Linus Torvalds Date: Sat Jul 17 15:58:24 2021 -0700 Merge tag 'soc-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Here are the patches for this week that came as the fallout of the merge window: - Two fixes for the NVidia memory controller driver - multiple defconfig files get patched to turn CONFIG_FB back on after that is no longer selected by CONFIG_DRM - ffa and scmpi firmware drivers fixes, mostly addressing compiler and documentation warnings - Platform specific fixes for device tree files on ASpeed, Renesas and NVidia SoC, mostly for recent regressions. - A workaround for a regression on the USB PHY with devlink when the usb-nop-xceiv driver is not available until the rootfs is mounted. - Device tree compiler warnings in Arm Versatile-AB" * tag 'soc-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (35 commits) ARM: dts: versatile: Fix up interrupt controller node names ARM: multi_v7_defconfig: Make NOP_USB_XCEIV driver built-in ARM: configs: Update u8500_defconfig ARM: configs: Update Vexpress defconfig ARM: configs: Update Versatile defconfig ARM: configs: Update RealView defconfig ARM: configs: Update Integrator defconfig arm: Typo s/PCI_IXP4XX_LEGACY/IXP4XX_PCI_LEGACY/ firmware: arm_scmi: Fix range check for the maximum number of pending messages firmware: arm_scmi: Avoid padding in sensor message structure firmware: arm_scmi: Fix kernel doc warnings about return values firmware: arm_scpi: Fix kernel doc warnings firmware: arm_scmi: Fix kernel doc warnings ARM: shmobile: defconfig: Restore graphical consoles firmware: arm_ffa: Fix a possible ffa_linux_errmap buffer overflow firmware: arm_ffa: Fix the comment style firmware: arm_ffa: Simplify probe function firmware: arm_ffa: Ensure drivers provide a probe function firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow firmware: arm_scmi: Ensure drivers provide a probe function ... commit ae14c63a9f20d49dacfb6f3fa3fb11b3b4eb11bf Author: Linus Torvalds Date: Sat Jul 17 13:27:00 2021 -0700 Revert "mm/slub: use stackdepot to save stack trace in objects" This reverts commit 788691464c29455346dc613a3b43c2fb9e5757a4. It's not clear why, but it causes unexplained problems in entirely unrelated xfs code. The most likely explanation is some slab corruption, possibly triggered due to CONFIG_SLUB_DEBUG_ON. See [1]. It ends up having a few other problems too, like build errors on arch/arc, and Geert reporting it using much more memory on m68k [3] (it probably does so elsewhere too, but it is probably just more noticeable on m68k). The architecture issues (both build and memory use) are likely just because this change effectively force-enabled STACKDEPOT (along with a very bad default value for the stackdepot hash size). But together with the xfs issue, this all smells like "this commit was not ready" to me. Link: https://lore.kernel.org/linux-xfs/YPE3l82acwgI2OiV@infradead.org/ [1] Link: https://lore.kernel.org/lkml/202107150600.LkGNb4Vb-lkp@intel.com/ [2] Link: https://lore.kernel.org/lkml/CAMuHMdW=eoVzM1Re5FVoEN87nKfiLmM2+Ah7eNu2KXEhCvbZyA@mail.gmail.com/ [3] Reported-by: Christoph Hellwig Reported-by: kernel test robot Reported-by: Geert Uytterhoeven Cc: Andrew Morton Cc: Vlastimil Babka Cc: Randy Dunlap Signed-off-by: Linus Torvalds commit 5d766d55d163a60b709317b15db6c8bb02bf54e4 Merge: 44cb60b425ab5 053c16ac89050 Author: Linus Torvalds Date: Sat Jul 17 13:09:23 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "One core fix for an oops which can occur if the error handling thread fails to start for some reason and the driver is removed. The other fixes are all minor ones in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Add missing host_lock in ufshcd_vops_setup_xfer_req() scsi: mpi3mr: Fix W=1 compilation warnings scsi: pm8001: Clean up kernel-doc and comments scsi: zfcp: Report port fc_security as unknown early during remote cable pull scsi: core: Fix bad pointer dereference when ehandler kthread is invalid scsi: fas216: Fix a build error scsi: core: Fix the documentation of the scsi_execute() time parameter commit 44cb60b425ab5221a2567e420f5088ff4315c57a Merge: ccbb22b9ab86a cdc3363065aba Author: Linus Torvalds Date: Sat Jul 17 12:56:50 2021 -0700 Merge tag '5.14-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Eight cifs/smb3 fixes, including three for stable. Three are DFS related fixes, and two to fix problems pointed out by static checkers" * tag '5.14-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: do not share tcp sessions of dfs connections SMB3.1.1: fix mount failure to some servers when compression enabled cifs: added WARN_ON for all the count decrements cifs: fix missing null session check in mount cifs: handle reconnect of tcon when there is no cached dfs referral cifs: fix the out of range assignment to bit fields in parse_server_interfaces cifs: Do not use the original cruid when following DFS links for multiuser mounts cifs: use the expiry output of dns_query to schedule next resolution commit ccbb22b9ab86a050584804b84007e0365242b034 Merge: 00397e74e37a1 df4b0807ca1a6 Author: Linus Torvalds Date: Sat Jul 17 12:48:06 2021 -0700 Merge tag 'linux-kselftest-kunit-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit fixes from Shuah Khan: "Fixes to kunit tool and documentation: - fix asserts on older python versions - fixes to misleading error messages when TAP header format is incorrect or when file is missing - documentation fix: drop obsolete information about uml_abort coverage - remove unnecessary annotations" * tag 'linux-kselftest-kunit-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: tool: Assert the version requirement kunit: tool: remove unnecessary "annotations" import Documentation: kunit: drop obsolete note about uml_abort for coverage kunit: tool: Fix error messages for cases of no tests and wrong TAP header commit 00397e74e37a1285baee8678085297a330a6e2ce Merge: 3fdacf402bb22 0c0f6299ba71f Author: Linus Torvalds Date: Sat Jul 17 12:44:32 2021 -0700 Merge tag 'linux-kselftest-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fix from Shuah Khan: "A fix to memory-hotplug hot-remove test to stop spamming logs with dump_page() entries and slowing the system down to a crawl" * tag 'linux-kselftest-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: memory-hotplug: avoid spamming logs with dump_page(), ratio limit hot-remove error test commit 3fdacf402bb2221c77940f68ef56a0214c098ee0 Merge: d980cc0620ae7 704adfb5a9978 Author: Linus Torvalds Date: Sat Jul 17 12:36:51 2021 -0700 Merge tag 'trace-v5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix the histogram logic from possibly crashing the kernel Working on the histogram code, I found that if you dereference a char pointer in a trace event that happens to point to user space, it can crash the kernel, as it does no checks of that pointer. I have code coming that will do this better, so just remove this ability to treat character pointers in trace events as stings in the histogram" * tag 'trace-v5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do not reference char * as a string in histograms commit ec645dc96699ea6c37b6de86c84d7288ea9a4ddf Author: Oleksandr Natalenko Date: Sat Jul 17 14:33:28 2021 +0200 block: increase BLKCG_MAX_POLS After mq-deadline learned to deal with cgroups, the BLKCG_MAX_POLS value became too small for all the elevators to be registered properly. The following issue is seen: ``` calling bfq_init+0x0/0x8b @ 1 blkcg_policy_register: BLKCG_MAX_POLS too small initcall bfq_init+0x0/0x8b returned -28 after 507 usecs ``` which renders BFQ non-functional. Increase BLKCG_MAX_POLS to allow enough space for everyone. Fixes: 08a9ad8bf607 ("block/mq-deadline: Add cgroup support") Link: https://lore.kernel.org/lkml/8988303.mDXGIdCtx8@natalenko.name/ Signed-off-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210717123328.945810-1-oleksandr@natalenko.name Signed-off-by: Jens Axboe commit 7e77ef8b8d600cf8448a2bbd32f682c28884551f Author: Antti Keränen Date: Thu Jul 8 12:54:29 2021 +0300 iio: adis: set GPIO reset pin direction Set reset pin direction to output as the reset pin needs to be an active low output pin. Co-developed-by: Hannu Hartikainen Signed-off-by: Hannu Hartikainen Signed-off-by: Antti Keränen Reviewed-by: Nuno Sá Fixes: ecb010d44108 ("iio: imu: adis: Refactor adis_initial_startup") Link: https://lore.kernel.org/r/20210708095425.13295-1-detegr@rbx.email Cc: Signed-off-by: Jonathan Cameron commit 9898cb24e454602beb6e17bacf9f97b26c85c955 Author: Uwe Kleine-König Date: Fri Jul 9 12:11:10 2021 +0200 iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels The ADS7950 requires that CS is deasserted after each SPI word. Before commit e2540da86ef8 ("iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage") the driver used a message with one spi transfer per channel where each but the last one had .cs_change set to enforce a CS toggle. This was wrongly translated into a message with a single transfer and .cs_change set which results in a CS toggle after each word but the last which corrupts the first adc conversion of all readouts after the first readout. Fixes: e2540da86ef8 ("iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage") Signed-off-by: Uwe Kleine-König Reviewed-by: David Lechner Tested-by: David Lechner Cc: Link: https://lore.kernel.org/r/20210709101110.1814294-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron commit f7e506ec4a9966be8b2a87d3324302f0f5dd5a29 Author: Hans de Goede Date: Sat Jul 17 16:36:07 2021 +0200 platform/x86: think-lmi: Fix possible mem-leaks on tlmi_analyze() error-exit Fix 2 possible memleaks on error-exits from tlmi_analyze(): 1. If the kzalloc of pwd_power fails, then not only free the atributes, but also the allocated pwd_admin struct. 2. Freeing the attributes should also free the possible_values strings. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210717143607.3580-3-hdegoede@redhat.com commit 30e78435d3bf803cabdc2a1c2eb36e6983aa4596 Author: Hans de Goede Date: Sat Jul 17 16:36:06 2021 +0200 platform/x86: think-lmi: Split kobject_init() and kobject_add() calls tlmi_sysfs_init() calls tlmi_release_attr() on errors which calls kobject_put() for attributes created by tlmi_analyze(), but if we bail early because of an error, then this means that some of the kobjects will not have been initialized yet; and we should thus not call kobject_put() on them. Switch from using kobject_init_and_add() inside tlmi_sysfs_init() to initializing all the created kobjects directly in tlmi_analyze() and only adding them from tlmi_sysfs_init(). This way all kobjects will always be initialized when tlmi_release_attr() gets called. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210717143607.3580-2-hdegoede@redhat.com commit e62fb1e3faae60f483a96c359c8d72bb04a7b728 Author: Mark Pearson Date: Sat Jul 17 16:36:05 2021 +0200 platform/x86: think-lmi: Move pending_reboot_attr to the attributes sysfs dir Move the pending_reboot node under attributes dir where it should live, as documented in: Documentation/ABI/testing/sysfs-class-firmware-attributes. Also move the create / remove code to be together with the other code populating / cleaning the attributes sysfs dir. In the removal path this is necessary so that the remove is done before the kset_unregister(tlmi_priv.attribute_kset) call. Signed-off-by: Mark Pearson Co-developed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210717143607.3580-1-hdegoede@redhat.com commit 7f5231b114da76bfd5d0fc685d5cf408d1bbfca7 Author: Shyam Sundar S K Date: Fri Jul 16 21:08:02 2021 +0530 platform/x86: amd-pmc: Fix undefined reference to __udivdi3 It was reported that on i386 config ------ on i386: ld: drivers/platform/x86/amd-pmc.o: in function `s0ix_stats_show': amd-pmc.c:(.text+0x100): undefined reference to `__udivdi3' ------- The reason for this is that 64-bit integer division is not supported on 32-bit architecture. Use do_div macro to fix this. Fixes: b9a4fa6978be ("platform/x86: amd-pmc: Add support for logging s0ix counters") Reported-by: Randy Dunlap Signed-off-by: Shyam Sundar S K Reviewed-by: Randy Dunlap # and build-tested Link: https://lore.kernel.org/r/20210716153802.2929670-1-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 33f735f137c6539e3ceceb515cd1e2a644005b49 Author: Takashi Iwai Date: Fri Jul 16 15:56:00 2021 +0200 ALSA: hdmi: Expose all pins on MSI MS-7C94 board The BIOS on MSI Mortar B550m WiFi (MS-7C94) board with AMDGPU seems disabling the other pins than HDMI although it has more outputs including DP. This patch adds the board to the allow list for enabling all pins. Reported-by: Damjan Georgievski Cc: Link: https://lore.kernel.org/r/CAEk1YH4Jd0a8vfZxORVu7qg+Zsc-K+pR187ezNq8QhJBPW4gpw@mail.gmail.com Link: https://lore.kernel.org/r/20210716135600.24176-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1c2b9519159b470ef24b2638f4794e86e2952ab7 Author: Takashi Iwai Date: Fri Jul 16 15:27:23 2021 +0200 ALSA: sb: Fix potential ABBA deadlock in CSP driver SB16 CSP driver may hit potentially a typical ABBA deadlock in two code paths: In snd_sb_csp_stop(): spin_lock_irqsave(&p->chip->mixer_lock, flags); spin_lock(&p->chip->reg_lock); In snd_sb_csp_load(): spin_lock_irqsave(&p->chip->reg_lock, flags); spin_lock(&p->chip->mixer_lock); Also the similar pattern is seen in snd_sb_csp_start(). Although the practical impact is very small (those states aren't triggered in the same running state and this happens only on a real hardware, decades old ISA sound boards -- which must be very difficult to find nowadays), it's a real scenario and has to be fixed. This patch addresses those deadlocks by splitting the locks in snd_sb_csp_start() and snd_sb_csp_stop() for avoiding the nested locks. Reported-by: Jia-Ju Bai Cc: Link: https://lore.kernel.org/r/7b0fcdaf-cd4f-4728-2eae-48c151a92e10@gmail.com Link: https://lore.kernel.org/r/20210716132723.13216-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit bc4188a2f56e821ea057aca6bf444e138d06c252 Author: Nicholas Piggin Date: Fri Jul 16 12:43:10 2021 +1000 KVM: PPC: Fix kvm_arch_vcpu_ioctl vcpu_load leak vcpu_put is not called if the user copy fails. This can result in preempt notifier corruption and crashes, among other issues. Fixes: b3cebfe8c1ca ("KVM: PPC: Move vcpu_load/vcpu_put down to each ioctl case in kvm_arch_vcpu_ioctl") Reported-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210716024310.164448-2-npiggin@gmail.com commit bd31ecf44b8e18ccb1e5f6b50f85de6922a60de3 Author: Nicholas Piggin Date: Fri Jul 16 12:43:09 2021 +1000 KVM: PPC: Book3S: Fix CONFIG_TRANSACTIONAL_MEM=n crash When running CPU_FTR_P9_TM_HV_ASSIST, HFSCR[TM] is set for the guest even if the host has CONFIG_TRANSACTIONAL_MEM=n, which causes it to be unprepared to handle guest exits while transactional. Normal guests don't have a problem because the HTM capability will not be advertised, but a rogue or buggy one could crash the host. Fixes: 4bb3c7a0208f ("KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9") Reported-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210716024310.164448-1-npiggin@gmail.com commit d980cc0620ae77ab2572235a1300bf22519f2e86 Merge: 5f06a790a0d39 50d8d7e19c439 Author: Linus Torvalds Date: Fri Jul 16 19:08:09 2021 -0700 Merge tag 'devicetree-fixes-for-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Drop 'resets' as required on renesas,du - Moving of fixed string patterns for 'properties' instead of 'patternProperties' - Drop more redundant minItems/maxItems that we merged in the merge window - Indentation warning fix for sja1105 * tag 'devicetree-fixes-for-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: display: renesas,du: Make resets optional on R-Car H1 dt-bindings: Move fixed string 'patternProperties' to 'properties' dt-bindings: More dropping redundant minItems/maxItems dt-bindings: net: dsa: sja1105: Fix indentation warnings commit 5f06a790a0d39a9efad18407f32a61a520520f54 Merge: 872f8edeb6bda e6f85cbeb23bd Author: Linus Torvalds Date: Fri Jul 16 19:00:53 2021 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The bulk of the diffstat consists of changes to our uaccess routines so that they fall back to bytewise copying prior to reporting complete failure when the initial (multi-byte) access faults. However, the most disappointing change here is that we've had to bump ARCH_DMA_MINALIGN back to 128 bytes thanks to Qualcomm's "Kryo" CPU, which ended up in the MSM8996 mobile SoC. Still, at least we're now aware of this design and one of the hardware designers confirmed the L2 cacheline size for us. Summary: - Fix instrumentation annotations for entry code - Ensure kernel MTE state is restored correctly on resume from suspend - Fix MTE fault from new strlen() routine - Fallback to byte-wise accesses on initial uaccess fault - Bump Clang requirement for BTI - Revert ARCH_DMA_MINALIGN back to 128 bytes (shakes fist at Qualcomm)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: entry: fix KCOV suppression arm64: entry: add missing noinstr arm64: mte: fix restoration of GCR_EL1 from suspend arm64: Avoid premature usercopy failure arm64: Restrict ARM64_BTI_KERNEL to clang 12.0.0 and newer Revert "arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES)" arm64: Add missing header in two files arm64: fix strlen() with CONFIG_KASAN_HW_TAGS commit cfbe3650dd3ef2ea9a4420ca89d9a4df98af3fb6 Author: Dongliang Mu Date: Wed Jul 14 11:27:03 2021 +0800 netfilter: nf_tables: fix audit memory leak in nf_tables_commit In nf_tables_commit, if nf_tables_commit_audit_alloc fails, it does not free the adp variable. Fix this by adding nf_tables_commit_audit_free which frees the linked list with the head node adl. backtrace: kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] nf_tables_commit_audit_alloc net/netfilter/nf_tables_api.c:8439 [inline] nf_tables_commit+0x16e/0x1760 net/netfilter/nf_tables_api.c:8508 nfnetlink_rcv_batch+0x512/0xa80 net/netfilter/nfnetlink.c:562 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:634 [inline] nfnetlink_rcv+0x1fa/0x220 net/netfilter/nfnetlink.c:652 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x2c7/0x3e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x36b/0x6b0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:702 [inline] sock_sendmsg+0x56/0x80 net/socket.c:722 Reported-by: syzbot Reported-by: kernel test robot Fixes: c520292f29b8 ("audit: log nftables configuration change events once per table") Signed-off-by: Dongliang Mu Signed-off-by: Pablo Neira Ayuso commit 5b69874f74cc5707edd95fcdaa757c507ac8af0f Author: Mahesh Bandewar Date: Fri Jul 16 16:09:41 2021 -0700 bonding: fix build issue The commit 9a5605505d9c (" bonding: Add struct bond_ipesc to manage SA") is causing following build error when XFRM is not selected in kernel config. lld: error: undefined symbol: xfrm_dev_state_flush >>> referenced by bond_main.c:3453 (drivers/net/bonding/bond_main.c:3453) >>> net/bonding/bond_main.o:(bond_netdev_event) in archive drivers/built-in.a Fixes: 9a5605505d9c (" bonding: Add struct bond_ipesc to manage SA") Signed-off-by: Mahesh Bandewar CC: Taehee Yoo CC: Jay Vosburgh Signed-off-by: David S. Miller commit ba02920c51debb9198e72b3a8726a7c5ae4ffb41 Author: Vidya Sagar Date: Tue Jul 13 17:05:46 2021 +0530 arm64: tegra: Enable SMMU support for PCIe on Tegra194 As of commit c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194"), SMMU support is enabled system-wide on Tegra194. However, there was a bit of overlap between the SMMU enablement and the PCIe support addition, so the PCIe device tree nodes are missing the iommus and interconnects properties. This in turn leads to SMMU faults for these devices, since by default the ARM SMMU will fault. Add the iommus and interconnects properties to all the PCIe device tree nodes to restore their functionality. Fixes: c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194") Signed-off-by: Vidya Sagar Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 5f119ba1d5771bbf46d57cff7417dcd84d3084ba Author: Yajun Deng Date: Wed Jul 14 17:13:20 2021 +0800 net: decnet: Fix sleeping inside in af_decnet The release_sock() is blocking function, it would change the state after sleeping. use wait_woken() instead. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yajun Deng Signed-off-by: David S. Miller commit 82a1c67554dff610d6be4e1982c425717b3c6a23 Author: Sudeep Holla Date: Thu Jul 1 14:21:18 2021 +0100 ARM: dts: versatile: Fix up interrupt controller node names Once the new schema interrupt-controller/arm,vic.yaml is added, we get the below warnings: arch/arm/boot/dts/versatile-ab.dt.yaml: intc@10140000: $nodename:0: 'intc@10140000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' arch/arm/boot/dts/versatile-ab.dt.yaml: intc@10140000: 'clear-mask' does not match any of the regexes Fix the node names for the interrupt controller to conform to the standard node name interrupt-controller@.. Also drop invalid clear-mask property. Signed-off-by: Sudeep Holla Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20210701132118.759454-1-sudeep.holla@arm.com' Signed-off-by: Arnd Bergmann commit 8825f2744d944e5666c28bb04a84abdcef27a7e6 Merge: ab37a7a890c11 ab4a49d360105 Author: Arnd Bergmann Date: Fri Jul 16 23:04:13 2021 +0200 Merge tag 'aspeed-5.14-devicetree-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/fixes ASPEED device tree fixes for 5.14 - eMMC phase corrections so Tacoma and Everest can boot - VUART irq polarity fix for e3c246d4i, using new bindings - I2C address fix for Rainier power supply - GPIO line name fixes * tag 'aspeed-5.14-devicetree-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: aspeed: everest: PSU #3 address change ARM: dts: everest: Add phase corrections for eMMC ARM: dts: tacoma: Add phase corrections for eMMC ARM: dts: aspeed: Update e3c246d4i vuart properties ARM: dts: aspeed: Fix AST2600 machines line names Link: https://lore.kernel.org/r/CACPK8XefdPzeOUDnDgk9cHQEs-9wF_ZSPdYQRzuNOpGZTyGUKQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit ab37a7a890c1176144a4c66ff3d51ef2c20ed486 Author: Stefan Wahren Date: Sat Jul 10 13:04:55 2021 +0200 ARM: multi_v7_defconfig: Make NOP_USB_XCEIV driver built-in The usage of usb-nop-xceiv PHY on Raspberry Pi boards with BCM283x has been a "regression source" a lot of times. The last case is breakage of USB mass storage boot has been commit e590474768f1 ("driver core: Set fw_devlink=on by default") for multi_v7_defconfig. As long as NOP_USB_XCEIV is configured as module, the dwc2 USB driver defer probing endlessly and prevent booting from USB mass storage device. So make the driver built-in as in bcm2835_defconfig and arm64/defconfig. Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default") Reported-by: Ojaswin Mujoo Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1625915095-23077-1-git-send-email-stefan.wahren@i2se.com' Signed-off-by: Arnd Bergmann commit 042f2e107a2ea34605b3793a88b11761afc8e8e0 Author: Linus Walleij Date: Mon Jul 12 10:55:22 2021 +0200 ARM: configs: Update u8500_defconfig The platform lost the framebuffer due to a commit solving a circular dependency in v5.14-rc1, so add it back in by explicitly selecting the framebuffer. The U8500 has also gained a few systems using touchscreens from Cypress, Melfas and Zinitix so add these at the same time as we're updating the defconfig anyway. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Linus Walleij Cc: phone-devel@vger.kernel.org Cc: Kees Cook Cc: Arnd Bergmann Cc: Stephan Gerhold Cc: newbyte@disroot.org Link: https://lore.kernel.org/r/20210712085522.672482-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 49e7757a73d181b35851cb01b5d285888014f8b2 Author: Linus Walleij Date: Tue Jul 13 15:37:08 2021 +0200 ARM: configs: Update Vexpress defconfig This updates the Versatile Express defconfig for the changes in the v5.14-rc1 kernel: - The Framebuffer CONFIG_FB needs to be explicitly selected or we don't get any framebuffer anymore. DRM has stopped to select FB because of circular dependency. - CONFIG_CMA options were moved around. - CONFIG_MODULES options were moved around. - CONFIG_CRYPTO_HW was moved around. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Linus Walleij Acked-by: Sudeep Holla Cc: Kees Cook Cc: Sudeep Holla Link: https://lore.kernel.org/r/20210713133708.94397-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 850d8ec92735b3d58b81363c4ae29932a2ebbabb Author: Linus Walleij Date: Wed Jul 14 10:18:19 2021 +0200 ARM: configs: Update Versatile defconfig This updates the Versatile defconfig for the changes in the v5.14-rc1 kernel: - The Framebuffer CONFIG_FB needs to be explicitly selected or we don't get any framebuffer anymore. DRM has stopped to select FB because of circular dependency. - The CONFIG_FB_MODE_HELPERS are not needed when using DRM framebuffer emulation as DRM does. - The Acorn fonts are removed, the default framebuffer font works fine. I don't know why this was selected in the first place or how the Kconfig was altered so it was removed. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Linus Walleij Reviewed-by: Kees Cook Cc: Kees Cook Link: https://lore.kernel.org/r/20210714081819.139210-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 56fa6e8a184489b47525488472e9bdcdcb59cd6f Author: Linus Walleij Date: Wed Jul 14 11:00:40 2021 +0200 ARM: configs: Update RealView defconfig This updates the RealView defconfig for the changes in the v5.14-rc1 kernel: - The Framebuffer CONFIG_FB needs to be explicitly selected or we don't get any framebuffer anymore. DRM has stopped to select FB because of circular dependency. - The CONFIG_FB_MODE_HELPERS are not needed when using DRM framebuffer emulation as DRM does. - Drop two unused penguin logos. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Linus Walleij Reviewed-by: Kees Cook Cc: Kees Cook Link: https://lore.kernel.org/r/20210714090040.182381-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 2096d6feec8359203de406c424242dcb977fe1d1 Author: Linus Walleij Date: Wed Jul 14 14:27:03 2021 +0200 ARM: configs: Update Integrator defconfig This updates the Integrator defconfig for the changes in the v5.14-rc1 kernel: - The Framebuffer CONFIG_FB needs to be explicitly selected or we don't get any framebuffer anymore. DRM has stopped to select FB because of circular dependency. - Drop the unused Matrox FB drivers that are only used with specific PCI cards. Fixes: f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Linus Walleij Reviewed-by: Kees Cook Cc: Kees Cook Link: https://lore.kernel.org/r/20210714122703.212609-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 2526112b681b587c469ccc5039b5d5be0ae3b5ed Merge: d28912d6f0ab6 bdb8742dc6f7c Author: Arnd Bergmann Date: Fri Jul 16 23:01:24 2021 +0200 Merge tag 'scmi-fixes-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARM SCMI fixes for v5.14 A small set of fixes: - adding check for presence of probe while registering the driver to prevent NULL pointer access - dropping the duplicate check as the driver core already takes care of it - fix for possible scmi_linux_errmap buffer overflow - fix to avoid sensor message structure padding - fix the range check for the maximum number of pending SCMI messages - fix for various kernel-doc warnings * tag 'scmi-fixes-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix range check for the maximum number of pending messages firmware: arm_scmi: Avoid padding in sensor message structure firmware: arm_scmi: Fix kernel doc warnings about return values firmware: arm_scpi: Fix kernel doc warnings firmware: arm_scmi: Fix kernel doc warnings firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow firmware: arm_scmi: Ensure drivers provide a probe function firmware: arm_scmi: Simplify device probe function on the bus Link: https://lore.kernel.org/r/20210714165831.2617437-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit d28912d6f0ab6dbd0ca483ae77a4260b145542c5 Merge: 5f291bfd33c89 dd925db6f0755 Author: Arnd Bergmann Date: Fri Jul 16 23:00:44 2021 +0200 Merge tag 'arm-ffa-fixes-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm FF-A fixes for v5.14 A small set of fixes: - adding check for presence of probe while registering the driver to prevent NULL pointer access - dropping the duplicate check as the driver core already takes care of it - fixing possible ffa_linux_errmap buffer overflow and - fixing kernel-doc warning for comment style * tag 'arm-ffa-fixes-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Fix a possible ffa_linux_errmap buffer overflow firmware: arm_ffa: Fix the comment style firmware: arm_ffa: Simplify probe function firmware: arm_ffa: Ensure drivers provide a probe function Link: https://lore.kernel.org/r/20210714165806.2617325-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 5f291bfd33c8995c69f5a50f21445a4a93584ed2 Author: Geert Uytterhoeven Date: Wed Jul 14 11:33:43 2021 +0200 arm: Typo s/PCI_IXP4XX_LEGACY/IXP4XX_PCI_LEGACY/ Kconfig symbol PCI_IXP4XX_LEGACY does not exist, but IXP4XX_PCI_LEGACY does. Fixes: d5d9f7ac58ea1041 ("ARM/ixp4xx: Make NEED_MACH_IO_H optional") Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/82ce37c617293521f095a945a255456b9512769c.1626255077.git.geert+renesas@glider.be' Signed-off-by: Arnd Bergmann commit 93346fb3f669507ba40a8876d1a349557fd0bcf1 Merge: e0129a0e826ed c667dcd4dfcd5 Author: Arnd Bergmann Date: Fri Jul 16 22:57:07 2021 +0200 Merge tag 'tegra-for-5.14-arm64-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes arm64: tegra: Device tree fixes for v5.14-rc1 This contains two late fixes for Tegra194 device tree files to restore USB and audio functionality after enabling system-wide IOMMU support. * tag 'tegra-for-5.14-arm64-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Enable SMMU support for USB on Tegra194 arm64: tegra: Enable audio IOMMU support on Tegra194 Link: https://lore.kernel.org/r/20210709150220.2543875-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit e0129a0e826eda3b61f094afe52fd742bbc1923a Merge: b6e473d1e2126 432b52eea3dcf Author: Arnd Bergmann Date: Fri Jul 16 22:54:55 2021 +0200 Merge tag 'renesas-fixes-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas fixes for v5.14 - Fix a clock/reset handling design issue on the new RZ/G2L SoC, requiring an atomic change to DT binding definitions, clock driver, and DTS, - Restore graphical consoles in the shmobile_defconfig. * tag 'renesas-fixes-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Restore graphical consoles dt-bindings: clock: r9a07g044-cpg: Update clock/reset definitions clk: renesas: r9a07g044: Add P2 Clock support clk: renesas: r9a07g044: Fix P1 Clock clk: renesas: r9a07g044: Rename divider table clk: renesas: rzg2l: Add multi clock PM support Link: https://lore.kernel.org/r/cover.1626253929.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit b6e473d1e21262290b8e1a023eff9f091ab8041b Merge: e73f0f0ee7541 bf3ec9deaa338 Author: Arnd Bergmann Date: Fri Jul 16 22:50:56 2021 +0200 Merge tag 'memory-controller-drv-tegra-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/fixes Memory controller drivers for v5.14 - Tegra SoC, late fixes Two fixes for recent series of changes in Tegra SoC memory controller drivers: 1. Add a stub for tegra_mc_probe_device() to fix compile testing of arm-smmu without TEGRA_MC. 2. Fix arm-smmu dtschema syntax. * tag 'memory-controller-drv-tegra-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: dt-bindings: arm-smmu: Fix json-schema syntax memory: tegra: Add compile-test stub for tegra_mc_probe_device() Link: https://lore.kernel.org/r/20210625073604.13562-1-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit 872f8edeb6bdadc9fd8c832f1a295610ad664a07 Merge: 0d18c12b288a1 530c4374e21ae Author: Linus Torvalds Date: Fri Jul 16 13:35:04 2021 -0700 Merge tag 'docs-5.14-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of fixes in and around documentation. Some funky quotes in LICENSES/dual/CC-BY-4.0 were giving spdxcheck.py grief; that has been fixed on both ends. Also a couple of features updates and one docs build fix" * tag 'docs-5.14-2' of git://git.lwn.net/linux: docs/zh_CN: add a missing space character Documentation/features: Add THREAD_INFO_IN_TASK feature matrix Documentation/features: Update the ARCH_HAS_TICK_BROADCAST entry LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" scripts/spdxcheck.py: Strictly read license files in utf-8 commit 11d8d98cbeef1496469b268d79938b05524731e8 Author: Eric Woudstra Date: Fri Jul 16 17:36:39 2021 +0200 mt7530 fix mt7530_fdb_write vid missing ivl bit According to reference guides mt7530 (mt7620) and mt7531: NOTE: When IVL is reset, MAC[47:0] and FID[2:0] will be used to read/write the address table. When IVL is set, MAC[47:0] and CVID[11:0] will be used to read/write the address table. Since the function only fills in CVID and no FID, we need to set the IVL bit. The existing code does not set it. This is a fix for the issue I dropped here earlier: http://lists.infradead.org/pipermail/linux-mediatek/2021-June/025697.html With this patch, it is now possible to delete the 'self' fdb entry manually. However, wifi roaming still has the same issue, the entry does not get deleted automatically. Wifi roaming also needs a fix somewhere else to function correctly in combination with vlan. Signed-off-by: Eric Woudstra Signed-off-by: David S. Miller commit 0d18c12b288a177906e31fecfab58ca2243ffc02 Merge: 13fdaf041067a 05d69d950d9d8 Author: Linus Torvalds Date: Fri Jul 16 12:31:44 2021 -0700 Merge tag 'block-5.14-2021-07-16' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe fixes via Christoph: - fix various races in nvme-pci when shutting down just after probing (Casey Chen) - fix a net_device leak in nvme-tcp (Prabhakar Kushwaha) - Fix regression in xen-blkfront by cleaning up the removal state machine (Christoph) - Fix tag_set and queue cleanup ordering regression in nbd (Wang) - Fix tag_set and queue cleanup ordering regression in pd (Guoqing) * tag 'block-5.14-2021-07-16' of git://git.kernel.dk/linux-block: xen-blkfront: sanitize the removal state machine nbd: fix order of cleaning up the queue and freeing the tagset pd: fix order of cleaning up the queue and freeing the tagset nvme-pci: do not call nvme_dev_remove_admin from nvme_remove nvme-pci: fix multiple races in nvme_setup_io_queues nvme-tcp: use __dev_get_by_name instead dev_get_by_name for OPT_HOST_IFACE commit 13fdaf041067a7827b8c3cae095b661aabbc6b65 Merge: 45312bd762d37 1b48773f9fd09 Author: Linus Torvalds Date: Fri Jul 16 12:27:33 2021 -0700 Merge tag 'io_uring-5.14-2021-07-16' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Two small fixes: one fixing the process target of a check, and the other a minor issue with the drain error handling" * tag 'io_uring-5.14-2021-07-16' of git://git.kernel.dk/linux-block: io_uring: fix io_drain_req() io_uring: use right task for exiting checks commit 2cc3aeb5ecccec0d266813172fcd82b4b5fa5803 Author: Ilias Apalodimas Date: Fri Jul 16 10:02:18 2021 +0300 skbuff: Fix a potential race while recycling page_pool packets As Alexander points out, when we are trying to recycle a cloned/expanded SKB we might trigger a race. The recycling code relies on the pp_recycle bit to trigger, which we carry over to cloned SKBs. If that cloned SKB gets expanded or if we get references to the frags, call skb_release_data() and overwrite skb->head, we are creating separate instances accessing the same page frags. Since the skb_release_data() will first try to recycle the frags, there's a potential race between the original and cloned SKB, since both will have the pp_recycle bit set. Fix this by explicitly those SKBs not recyclable. The atomic_sub_return effectively limits us to a single release case, and when we are calling skb_release_data we are also releasing the option to perform the recycling, or releasing the pages from the page pool. Fixes: 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling") Reported-by: Alexander Duyck Suggested-by: Alexander Duyck Reviewed-by: Alexander Duyck Acked-by: Jesper Dangaard Brouer Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 45312bd762d37bfc7dda6de8a70bb5604e899015 Merge: 786cb0a2f9bba 2f53d15cf9582 Author: Linus Torvalds Date: Fri Jul 16 11:20:53 2021 -0700 Merge tag 'zonefs-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: "A single patch to remove an unnecessary NULL bio check (from Xianting)" * tag 'zonefs-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: remove redundant null bio check commit 353ca0fa56307bfc821a6fb444099e71899f199d Author: Liviu Dudau Date: Wed Jul 14 09:06:52 2021 +0100 drm/amd/display: Fix 10bit 4K display on CIK GPUs Commit 72a7cf0aec0c ("drm/amd/display: Keep linebuffer pixel depth at 30bpp for DCE-11.0.") doesn't seems to have fixed 10bit 4K rendering over DisplayPort for CIK GPUs. On my machine with a HAWAII GPU I get a broken image that looks like it has an effective resolution of 1920x1080 but scaled up in an irregular way. Reverting the commit or applying this patch fixes the problem on v5.14-rc1. Fixes: 72a7cf0aec0c ("drm/amd/display: Keep linebuffer pixel depth at 30bpp for DCE-11.0.") Acked-by: Mario Kleiner Reviewed-by: Harry Wentland Signed-off-by: Liviu Dudau Signed-off-by: Alex Deucher commit bd89c991c6c26fb215c63bd21b6d56e7a4ba2ef6 Author: Tao Zhou Date: Thu Jul 15 14:52:37 2021 +0800 drm/amd/pm: update DRIVER_IF_VERSION for beige_goby Update the version to 0xD for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit cfe4e8f00f8f19ba305800f64962d1949ab5d4ca Author: Tao Zhou Date: Thu Jul 15 14:49:08 2021 +0800 drm/amdgpu: update gc golden setting for dimgrey_cavefish Update gc_10_3_4 golden setting. Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 3e94b5965e624f7e6d8dd18eb8f3bf2bb99ba30d Author: Likun Gao Date: Thu Jul 15 11:08:48 2021 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update GFX golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4fff6fbca12524358a32e56f125ae738141f62b4 Author: Xiaojian Du Date: Wed Jul 14 15:07:22 2021 +0800 drm/amdgpu: update the golden setting for vangogh This patch is to update the golden setting for vangogh. Signed-off-by: Xiaojian Du Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 6505d6fcc616472c1b4d6298beacf52673c7b072 Author: Veerabadhran Gopalakrishnan Date: Tue Jul 13 23:21:43 2021 +0530 amdgpu/nv.c - Optimize code for video codec support structure Optimized the code for codec info structure initialization Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit ea272ce46f3c86d15d9b58bd4d8d44de6cee04b7 Author: Veerabadhran Gopalakrishnan Date: Fri Jul 9 13:00:11 2021 +0530 amdgpu/nv.c - Added video codec support for Yellow Carp Added the supported codecs in the video capabilities query. Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 786cb0a2f9bba267c8a80caf906b94c76d18f7e8 Merge: 6e442d06621f2 876d98e5511d8 Author: Linus Torvalds Date: Fri Jul 16 11:14:54 2021 -0700 Merge tag 'drm-fixes-2021-07-16' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular rc2 fixes though a bit more than usual at rc2 stage, people must have been testing early or else some fixes from last week got a bit laggy. There is one larger change in the amd fixes to amalgamate some power management code on the newer chips with the code from the older chips, it should only affects chips where support was introduced in rc1 and it should make future fixes easier to maintain probably a good idea to merge it now. Otherwise it's mostly fixes across the board. dma-buf: - Fix fence leak in sync_file_merge() error code drm/panel: - nt35510: Don't fail on DSI reads fbdev: - Avoid use-after-free by not deleting current video mode ttm: - Avoid NULL-ptr deref in ttm_range_man_fini() vmwgfx: - Fix a merge commit qxl: - fix a TTM regression amdgpu: - SR-IOV fixes - RAS fixes - eDP fixes - SMU13 code unification to facilitate fixes in the future - Add new renoir DID - Yellow Carp fixes - Beige Goby fixes - Revert a bunch of TLB fixes that caused regressions - Revert an LTTPR display regression amdkfd - Fix VRAM access regression - SVM fixes i915: - Fix -EDEADLK handling regression - Drop the page table optimisation" * tag 'drm-fixes-2021-07-16' of git://anongit.freedesktop.org/drm/drm: (29 commits) drm/amdgpu: add another Renoir DID drm/ttm: add a check against null pointer dereference drm/i915/gtt: drop the page table optimisation drm/i915/gt: Fix -EDEADLK handling regression drm/amd/pm: Add waiting for response of mode-reset message for yellow carp Revert "drm/amdkfd: Add heavy-weight TLB flush after unmapping" Revert "drm/amdgpu: Add table_freed parameter to amdgpu_vm_bo_update" Revert "drm/amdkfd: Make TLB flush conditional on mapping" Revert "drm/amdgpu: Fix warning of Function parameter or member not described" Revert "drm/amdkfd: Add memory sync before TLB flush on unmap" drm/amd/pm: Fix BACO state setting for Beige_Goby drm/amdgpu: Restore msix after FLR drm/amdkfd: Allow CPU access for all VRAM BOs drm/amdgpu/display - only update eDP's backlight level when necessary drm/amdkfd: handle fault counters on invalid address drm/amdgpu: Correct the irq numbers for virtual crtc drm/amd/display: update header file name drm/amd/pm: drop smu_v13_0_1.c|h files for yellow carp drm/amd/display: remove faulty assert Revert "drm/amd/display: Always write repeater mode regardless of LTTPR" ... commit 6e442d06621f2af87fc0bf352976694db547c780 Merge: d936eb2387443 2a2ed5618a0e8 Author: Linus Torvalds Date: Fri Jul 16 11:08:57 2021 -0700 Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fixes from Paul McKenney: - fix regressions induced by a merge-window change in scheduler semantics, which means that smp_processor_id() can no longer be used in kthreads using simple affinity to bind themselves to a specific CPU. - fix a bug in Tasks Trace RCU that was thought to be strictly theoretical. However, production workloads have started hitting this, so these fixes need to be merged sooner rather than later. - fix a minor printk()-format-mismatch issue introduced during the merge window. * 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu: Fix pr_info() formats and values in show_rcu_gp_kthreads() rcu-tasks: Don't delete holdouts within trc_wait_for_one_reader() rcu-tasks: Don't delete holdouts within trc_inspect_reader() refscale: Avoid false-positive warnings in ref_scale_reader() scftorture: Avoid false-positive warnings in scftorture_invoker() commit 50d8d7e19c4398da74d028f367754e73547b078b Author: Geert Uytterhoeven Date: Wed Jul 14 12:19:36 2021 +0200 dt-bindings: display: renesas,du: Make resets optional on R-Car H1 The "resets" property is not present on R-Car Gen1 SoCs. Supporting it would require migrating from renesas,cpg-clocks to renesas,cpg-mssr. Reflect this in the DT bindings by removing the global "required: resets". All SoCs that do have "resets" properties already have SoC-specific rules making it required. Fixes: 99d66127fad25ebb ("dt-bindings: display: renesas,du: Convert binding to YAML") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/98575791b154d80347d5b78132c1d53f5315ee62.1626257936.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 9cb2ff11171264d10be7ea9e31d9ee5d49ba84a5 Author: Apurva Nandan Date: Tue Jul 13 12:57:41 2021 +0000 spi: cadence-quadspi: Disable Auto-HW polling cadence-quadspi has a builtin Auto-HW polling funtionality using which it keep tracks of completion of write operations. When Auto-HW polling is enabled, it automatically initiates status register read operation, until the flash clears its busy bit. cadence-quadspi controller doesn't allow an address phase when auto-polling the busy bit on the status register. Unlike SPI NOR flashes, SPI NAND flashes do require the address of status register when polling the busy bit using the read register operation. As Auto-HW polling is enabled by default, cadence-quadspi returns a timeout for every write operation after an indefinite amount of polling on SPI NAND flashes. Disable Auto-HW polling completely as the spi-nor core, spinand core, etc. take care of polling the busy bit on their own. Signed-off-by: Apurva Nandan Link: https://lore.kernel.org/r/20210713125743.1540-2-a-nandan@ti.com Signed-off-by: Mark Brown commit 937654ce497fb6e977a8c52baee5f7d9616302d9 Author: Riccardo Mancini Date: Thu Jul 15 18:07:24 2021 +0200 perf test bpf: Free obj_buf ASan reports some memory leaks when running: # perf test "42: BPF filter" The first of these leaks is caused by obj_buf never being deallocated in __test__bpf. This patch adds the missing free. Signed-off-by: Riccardo Mancini Fixes: ba1fae431e74bb42 ("perf test: Add 'perf test BPF'") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/60f3ca935fe6672e7e866276ce6264c9e26e4c87.1626343282.git.rickyman7@gmail.com [ Added missing stdlib.h include ] Signed-off-by: Arnaldo Carvalho de Melo commit b068fc04de10fff8974f6ef32b861ad134d94ba4 Author: Marco Elver Date: Mon Jul 5 10:44:53 2021 +0200 perf: Refactor permissions check into perf_check_permission() Refactor the permission check in perf_event_open() into a helper perf_check_permission(). This makes the permission check logic more readable (because we no longer have a negated disjunction). Add a comment mentioning the ptrace check also checks the uid. No functional change intended. Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dmitry Vyukov Link: https://lore.kernel.org/r/20210705084453.2151729-2-elver@google.com commit 9d7a6c95f62bc335b62aaf9d50590122bd03a796 Author: Marco Elver Date: Mon Jul 5 10:44:52 2021 +0200 perf: Fix required permissions if sigtrap is requested If perf_event_open() is called with another task as target and perf_event_attr::sigtrap is set, and the target task's user does not match the calling user, also require the CAP_KILL capability or PTRACE_MODE_ATTACH permissions. Otherwise, with the CAP_PERFMON capability alone it would be possible for a user to send SIGTRAP signals via perf events to another user's tasks. This could potentially result in those tasks being terminated if they cannot handle SIGTRAP signals. Note: The check complements the existing capability check, but is not supposed to supersede the ptrace_may_access() check. At a high level we now have: capable of CAP_PERFMON and (CAP_KILL if sigtrap) OR ptrace_may_access(...) // also checks for same thread-group and uid Fixes: 97ba62b27867 ("perf: Add support for SIGTRAP on perf events") Reported-by: Dmitry Vyukov Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Acked-by: Dmitry Vyukov Cc: # 5.13+ Link: https://lore.kernel.org/r/20210705084453.2151729-1-elver@google.com commit 947228cb9f1a2c69a5da5279c48f02bb4f49ce32 Author: Atish Patra Date: Fri Jul 2 12:10:44 2021 -0700 efi/libstub: Fix the efi_load_initrd function description The soft_limit and hard_limit in the function efi_load_initrd describes the preferred and max address of initrd loading location respectively. However, the description wrongly describes it as the size of the allocated memory. Fix the function description. Signed-off-by: Atish Patra Signed-off-by: Ard Biesheuvel commit 2bab693a608bdf614b9fcd44083c5100f34b9f77 Author: Marc Zyngier Date: Tue Jul 13 19:43:26 2021 +0100 firmware/efi: Tell memblock about EFI iomem reservations kexec_load_file() relies on the memblock infrastructure to avoid stamping over regions of memory that are essential to the survival of the system. However, nobody seems to agree how to flag these regions as reserved, and (for example) EFI only publishes its reservations in /proc/iomem for the benefit of the traditional, userspace based kexec tool. On arm64 platforms with GICv3, this can result in the payload being placed at the location of the LPI tables. Shock, horror! Let's augment the EFI reservation code with a memblock_reserve() call, protecting our dear tables from the secondary kernel invasion. Reported-by: Moritz Fischer Tested-by: Moritz Fischer Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Cc: Ard Biesheuvel Cc: James Morse Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Ard Biesheuvel commit 674a9f1f6815849bfb5bf385e7da8fc198aaaba9 Author: Michal Suchanek Date: Thu Jul 8 11:46:54 2021 +0200 efi/tpm: Differentiate missing and invalid final event log table. Missing TPM final event log table is not a firmware bug. Clearly if providing event log in the old format makes the final event log invalid it should not be provided at least in that case. Fixes: b4f1874c6216 ("tpm: check event log version before reading final events") Signed-off-by: Michal Suchanek Reviewed-by: Jarkko Sakkinen Signed-off-by: Ard Biesheuvel commit 0e85ee897858b1c7a5de53f496d016899d9639c5 Author: Yoshitaka Ikeda Date: Fri Jul 16 14:35:13 2021 +0000 spi: spi-cadence-quadspi: Fix division by zero warning Fix below division by zero warning: - The reason for dividing by zero is because the dummy bus width is zero, but if the dummy n bytes is zero, it indicates that there is no data transfer, so we can just return zero without doing any calculations. [ 0.795337] Division by zero in kernel. : [ 0.834051] [<807fd40c>] (__div0) from [<804e1acc>] (Ldiv0+0x8/0x10) [ 0.839097] [<805f0710>] (cqspi_exec_mem_op) from [<805edb4c>] (spi_mem_exec_op+0x3b0/0x3f8) Fixes: 7512eaf54190 ("spi: cadence-quadspi: Fix dummy cycle calculation when buswidth > 1") Signed-off-by: Yoshitaka Ikeda Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/92eea403-9b21-2488-9cc1-664bee760c5e@nskint.co.jp Signed-off-by: Mark Brown commit 0ccfd1ba84a4503b509250941af149e9ebd605ca Author: Yoshitaka Ikeda Date: Fri Jul 16 14:33:12 2021 +0000 spi: spi-cadence-quadspi: Revert "Fix division by zero warning" Revert to change to a better code. This reverts commit 55cef88bbf12f3bfbe5c2379a8868a034707e755. Signed-off-by: Yoshitaka Ikeda Link: https://lore.kernel.org/r/bd30bdb4-07c4-f713-5648-01c898d51f1b@nskint.co.jp Signed-off-by: Mark Brown commit a6c39de76d709f30982d4b80a9b9537e1d388858 Author: Daniel Borkmann Date: Fri Jul 16 13:15:33 2021 +0000 bpf, selftests: Add test cases for pointer alu from multiple paths Add several test cases for checking update_alu_sanitation_state() under multiple paths: # ./test_verifier [...] #1061/u map access: known scalar += value_ptr unknown vs const OK #1061/p map access: known scalar += value_ptr unknown vs const OK #1062/u map access: known scalar += value_ptr const vs unknown OK #1062/p map access: known scalar += value_ptr const vs unknown OK #1063/u map access: known scalar += value_ptr const vs const (ne) OK #1063/p map access: known scalar += value_ptr const vs const (ne) OK #1064/u map access: known scalar += value_ptr const vs const (eq) OK #1064/p map access: known scalar += value_ptr const vs const (eq) OK #1065/u map access: known scalar += value_ptr unknown vs unknown (eq) OK #1065/p map access: known scalar += value_ptr unknown vs unknown (eq) OK #1066/u map access: known scalar += value_ptr unknown vs unknown (lt) OK #1066/p map access: known scalar += value_ptr unknown vs unknown (lt) OK #1067/u map access: known scalar += value_ptr unknown vs unknown (gt) OK #1067/p map access: known scalar += value_ptr unknown vs unknown (gt) OK [...] Summary: 1762 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit e042aa532c84d18ff13291d00620502ce7a38dda Author: Daniel Borkmann Date: Fri Jul 16 09:18:21 2021 +0000 bpf: Fix pointer arithmetic mask tightening under state pruning In 7fedb63a8307 ("bpf: Tighten speculative pointer arithmetic mask") we narrowed the offset mask for unprivileged pointer arithmetic in order to mitigate a corner case where in the speculative domain it is possible to advance, for example, the map value pointer by up to value_size-1 out-of- bounds in order to leak kernel memory via side-channel to user space. The verifier's state pruning for scalars leaves one corner case open where in the first verification path R_x holds an unknown scalar with an aux->alu_limit of e.g. 7, and in a second verification path that same register R_x, here denoted as R_x', holds an unknown scalar which has tighter bounds and would thus satisfy range_within(R_x, R_x') as well as tnum_in(R_x, R_x') for state pruning, yielding an aux->alu_limit of 3: Given the second path fits the register constraints for pruning, the final generated mask from aux->alu_limit will remain at 7. While technically not wrong for the non-speculative domain, it would however be possible to craft similar cases where the mask would be too wide as in 7fedb63a8307. One way to fix it is to detect the presence of unknown scalar map pointer arithmetic and force a deeper search on unknown scalars to ensure that we do not run into a masking mismatch. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit 59089a189e3adde4cf85f2ce479738d1ae4c514d Author: Daniel Borkmann Date: Tue Jun 29 09:39:15 2021 +0000 bpf: Remove superfluous aux sanitation on subprog rejection Follow-up to fe9a5ca7e370 ("bpf: Do not mark insn as seen under speculative path verification"). The sanitize_insn_aux_data() helper does not serve a particular purpose in today's code. The original intention for the helper was that if function-by-function verification fails, a given program would be cleared from temporary insn_aux_data[], and then its verification would be re-attempted in the context of the main program a second time. However, a failure in do_check_subprogs() will skip do_check_main() and propagate the error to the user instead, thus such situation can never occur. Given its interaction is not compatible to the Spectre v1 mitigation (due to comparing aux->seen with env->pass_cnt), just remove sanitize_insn_aux_data() to avoid future bugs in this area. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit 6a503e1c455316fd0bfd8188c0a62cce7c5525ca Author: Oder Chiou Date: Fri Jul 16 16:58:53 2021 +0800 ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend While using the DMIC recording, the garbled data will be captured by the DMIC. It is caused by the critical power of PLL closed in the jack detect function. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20210716085853.20170-1-oder_chiou@realtek.com Signed-off-by: Mark Brown commit 7883490cba002121a5870e786a1dc0acce5e1caf Author: Vijendar Mukunda Date: Fri Jul 16 18:00:13 2021 +0530 ASoC: amd: reverse stop sequence for stoneyridge platform For Stoneyridge platform, it is required to invoke DMA driver stop first rather than invoking DWC I2S controller stop. Enable dai_link structure stop_dma_fist flag to reverse the stop sequence. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20210716123015.15697-2-vijendar.mukunda@amd.com Signed-off-by: Mark Brown commit 59dd33f82dc0975c55d3d46801e7ca45532d7673 Author: Vijendar Mukunda Date: Fri Jul 16 18:00:12 2021 +0530 ASoC: soc-pcm: add a flag to reverse the stop sequence On stream stop, currently CPU DAI stop sequence invoked first followed by DMA. For Few platforms, it is required to stop the DMA first before stopping CPU DAI. Introduced new flag in dai_link structure for reordering stop sequence. Based on flag check, ASoC core will re-order the stop sequence. Fixes: 4378f1fbe92405 ("ASoC: soc-pcm: Use different sequence for start/stop trigger") Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20210716123015.15697-1-vijendar.mukunda@amd.com Signed-off-by: Mark Brown commit f99986c0fcad8e1d7d842e9a636f55bcc6748da5 Author: Srinivas Kandagatla Date: Fri Jul 16 11:57:35 2021 +0100 ASoC: codecs: wcd938x: setup irq during component bind SoundWire registers are only accessable after sdw components are succesfully binded. Setup irqs at that point instead of doing at probe. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210716105735.6073-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 13d257503c0930010ef9eed78b689cec417ab741 Author: Shreyansh Chouhan Date: Fri Jul 9 20:59:29 2021 +0530 reiserfs: check directory items on read from disk While verifying the leaf item that we read from the disk, reiserfs doesn't check the directory items, this could cause a crash when we read a directory item from the disk that has an invalid deh_location. This patch adds a check to the directory items read from the disk that does a bounds check on deh_location for the directory entries. Any directory entry header with a directory entry offset greater than the item length is considered invalid. Link: https://lore.kernel.org/r/20210709152929.766363-1-chouhan.shreyansh630@gmail.com Reported-by: syzbot+c31a48e6702ccb3d64c9@syzkaller.appspotmail.com Signed-off-by: Shreyansh Chouhan Signed-off-by: Jan Kara commit 728d392f8a799f037812d0f2b254fb3b5e115fcf Author: Javier Pello Date: Wed Jul 14 18:54:48 2021 +0200 fs/ext2: Avoid page_address on pages returned by ext2_get_page Commit 782b76d7abdf02b12c46ed6f1e9bf715569027f7 ("fs/ext2: Replace kmap() with kmap_local_page()") replaced the kmap/kunmap calls in ext2_get_page/ext2_put_page with kmap_local_page/kunmap_local for efficiency reasons. As a necessary side change, the commit also made ext2_get_page (and ext2_find_entry and ext2_dotdot) return the mapping address along with the page itself, as it is required for kunmap_local, and converted uses of page_address on such pages to use the newly returned address instead. However, uses of page_address on such pages were missed in ext2_check_page and ext2_delete_entry, which triggers oopses if kmap_local_page happens to return an address from high memory. Fix this now by converting the remaining uses of page_address to use the right address, as returned by kmap_local_page. Link: https://lore.kernel.org/r/20210714185448.8707ac239e9f12b3a7f5b9f9@urjc.es Reviewed-by: Ira Weiny Signed-off-by: Javier Pello Fixes: 782b76d7abdf ("fs/ext2: Replace kmap() with kmap_local_page()") Signed-off-by: Jan Kara commit 2acf15b94d5b8ea8392c4b6753a6ffac3135cd78 Author: Yu Kuai Date: Fri Jul 2 12:07:43 2021 +0800 reiserfs: add check for root_inode in reiserfs_fill_super Our syzcaller report a NULL pointer dereference: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 116e95067 P4D 116e95067 PUD 1080b5067 PMD 0 Oops: 0010 [#1] SMP KASAN CPU: 7 PID: 592 Comm: a.out Not tainted 5.13.0-next-20210629-dirty #67 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-p4 RIP: 0010:0x0 Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. RSP: 0018:ffff888114e779b8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 1ffff110229cef39 RCX: ffffffffaa67e1aa RDX: 0000000000000000 RSI: ffff88810a58ee00 RDI: ffff8881233180b0 RBP: ffffffffac38e9c0 R08: ffffffffaa67e17e R09: 0000000000000001 R10: ffffffffb91c5557 R11: fffffbfff7238aaa R12: ffff88810a58ee00 R13: ffff888114e77aa0 R14: 0000000000000000 R15: ffff8881233180b0 FS: 00007f946163c480(0000) GS:ffff88839f1c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001099c1000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __lookup_slow+0x116/0x2d0 ? page_put_link+0x120/0x120 ? __d_lookup+0xfc/0x320 ? d_lookup+0x49/0x90 lookup_one_len+0x13c/0x170 ? __lookup_slow+0x2d0/0x2d0 ? reiserfs_schedule_old_flush+0x31/0x130 reiserfs_lookup_privroot+0x64/0x150 reiserfs_fill_super+0x158c/0x1b90 ? finish_unfinished+0xb10/0xb10 ? bprintf+0xe0/0xe0 ? __mutex_lock_slowpath+0x30/0x30 ? __kasan_check_write+0x20/0x30 ? up_write+0x51/0xb0 ? set_blocksize+0x9f/0x1f0 mount_bdev+0x27c/0x2d0 ? finish_unfinished+0xb10/0xb10 ? reiserfs_kill_sb+0x120/0x120 get_super_block+0x19/0x30 legacy_get_tree+0x76/0xf0 vfs_get_tree+0x49/0x160 ? capable+0x1d/0x30 path_mount+0xacc/0x1380 ? putname+0x97/0xd0 ? finish_automount+0x450/0x450 ? kmem_cache_free+0xf8/0x5a0 ? putname+0x97/0xd0 do_mount+0xe2/0x110 ? path_mount+0x1380/0x1380 ? copy_mount_options+0x69/0x140 __x64_sys_mount+0xf0/0x190 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae This is because 'root_inode' is initialized with wrong mode, and it's i_op is set to 'reiserfs_special_inode_operations'. Thus add check for 'root_inode' to fix the problem. Link: https://lore.kernel.org/r/20210702040743.1918552-1-yukuai3@huawei.com Signed-off-by: Yu Kuai Signed-off-by: Jan Kara commit 40ac971eab89330d6153e7721e88acd2d98833f9 Author: Roman Skakun Date: Fri Jul 16 11:39:34 2021 +0300 dma-mapping: handle vmalloc addresses in dma_common_{mmap,get_sgtable} xen-swiotlb can use vmalloc backed addresses for dma coherent allocations and uses the common helpers. Properly handle them to unbreak Xen on ARM platforms. Fixes: 1b65c4e5a9af ("swiotlb-xen: use xen_alloc/free_coherent_pages") Signed-off-by: Roman Skakun Reviewed-by: Andrii Anisov [hch: split the patch, renamed the helpers] Signed-off-by: Christoph Hellwig commit 5261cdf457ce3635bf18d393a3c1991dcfaf9d02 Author: Stephan Mueller Date: Wed Jun 30 12:32:52 2021 +0200 crypto: drbg - select SHA512 With the swtich to use HMAC(SHA-512) as the default DRBG type, the configuration must now also select SHA-512. Fixes: 9b7b94683a9b "crypto: DRBG - switch to HMAC SHA512 DRBG as default DRBG" Reported-by: Sachin Sant Signed-off-by: Stephan Mueller Tested-by: Sachin Sant Signed-off-by: Herbert Xu commit fa5239f2af983ffdf08395a542a7d6356b6222c5 Author: Felix Kuehling Date: Thu Jul 15 15:05:37 2021 -0400 drm/amdgpu: workaround failed COW checks for Thunk VMAs KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings, which causes mmap to fail in ttm_bo_mmap_obj. As a workaround, clear VM_MAYWRITE for PROT_NONE-COW mappings. This should prevent the mapping from ever becoming writable and makes is_cow_mapping(vm_flags) false. Fixes: f91142c62161 ("drm/ttm: nuke VM_MIXEDMAP on BO mappings v3") Suggested-by: Daniel Vetter Tested-by: Felix Kuehling Signed-off-by: Felix Kuehling Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210715190537.585456-1-Felix.Kuehling@amd.com Signed-off-by: Christian König commit cdc3363065aba2711e51019b3d5787f044f8a133 Author: Paulo Alcantara Date: Thu Jul 15 21:53:53 2021 -0300 cifs: do not share tcp sessions of dfs connections Make sure that we do not share tcp sessions of dfs mounts when mounting regular shares that connect to same server. DFS connections rely on a single instance of tcp in order to do failover properly in cifs_reconnect(). Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 2f53d15cf95824ed320abed3c33759b8b21aca15 Author: Xianting Tian Date: Wed Jun 30 10:33:36 2021 -0400 zonefs: remove redundant null bio check bio_alloc() with __GFP_DIRECT_RECLAIM, which is included in GFP_NOFS, never fails, see comments in bio_alloc_bioset(). Signed-off-by: Xianting Tian Signed-off-by: Damien Le Moal commit d936eb23874433caa3e3d841cfa16f5434b85dcf Author: Linus Torvalds Date: Thu Jul 15 18:05:31 2021 -0700 Revert "Makefile: Enable -Wimplicit-fallthrough for Clang" This reverts commit b7eb335e26a9c7f258c96b3962c283c379d3ede0. It turns out that the problem with the clang -Wimplicit-fallthrough warning is not about the kernel source code, but about clang itself, and that the warning is unusable until clang fixes its broken ways. In particular, when you enable this warning for clang, you not only get warnings about implicit fallthroughs. You also get this: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] which is completely broken becasue it (a) doesn't even tell you where the problem is (seriously: no line numbers, no filename, no nothing). (b) is fundamentally broken anyway, because there are perfectly valid reasons to have a fallthrough statement even if it turns out that it can perhaps not be reached. In the kernel, an example of that second case is code in the scheduler: switch (state) { case cpuset: if (IS_ENABLED(CONFIG_CPUSETS)) { cpuset_cpus_allowed_fallback(p); state = possible; break; } fallthrough; case possible: where if CONFIG_CPUSETS is enabled you actually never hit the fallthrough case at all. But that in no way makes the fallthrough wrong. So the warning is completely broken, and enabling it for clang is a very bad idea. In the meantime, we can keep the gcc option enabled, and make the gcc build use -Wimplicit-fallthrough=5 which means that we will at least continue to require a proper fallthrough statement, and that gcc won't silently accept the magic comment versions. Because gcc does this all correctly, and while the odd "=5" part is kind of obscure, it's documented in [1]: "-Wimplicit-fallthrough=5 doesn’t recognize any comments as fallthrough comments, only attributes disable the warning" so if clang ever fixes its bad behavior we can try enabling it there again. Link: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html [1] Cc: Kees Cook Cc: Gustavo A. R. Silva Cc: Nathan Chancellor Cc: Nick Desaulniers Signed-off-by: Linus Torvalds commit 876d98e5511d8cfd12fc617a6717e7a8ea07be17 Merge: e1fc82a35164d 0abb33bfca0fb Author: Dave Airlie Date: Fri Jul 16 10:52:58 2021 +1000 Merge tag 'drm-intel-fixes-2021-07-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Two regression fixes targeting stable: - Fix -EDEADLK handling regression (Ville) - Drop the page table optimisation (Matt) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YPA8y1DSCp2EbtpC@intel.com commit 1013d4add290c460b816fc4b1db5174f88b71760 Merge: 7612872866e2c 420405ecde061 Author: Linus Torvalds Date: Thu Jul 15 17:36:36 2021 -0700 Merge tag 'configfs-5.13-1' of git://git.infradead.org/users/hch/configfs Pull configfs fix from Christoph Hellwig: - fix the read and write iterators (Bart Van Assche) * tag 'configfs-5.13-1' of git://git.infradead.org/users/hch/configfs: configfs: fix the read and write iterators commit e1fc82a35164dffb6232a576fa666951d6bcb695 Merge: 2ea2086c223e3 9e5c772954406 Author: Dave Airlie Date: Fri Jul 16 09:51:41 2021 +1000 Merge tag 'drm-misc-fixes-2021-07-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull (less than what git shortlog provides): * fbdev: Avoid use-after-free by not deleting current video mode * ttm: Avoid NULL-ptr deref in ttm_range_man_fini() * vmwgfx: Fix a merge commit Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YO/yoFO+iSEqnIH0@linux-uq9g commit 7612872866e2cbfc7ac6c071f35720c70b767ed3 Merge: e9338abf0e186 f4a8e31ed84ec Author: Linus Torvalds Date: Thu Jul 15 17:29:44 2021 -0700 Merge tag 'pwm/for-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fixes from Thierry Reding: "A couple of fixes from Uwe that I missed for v5.14-rc1" * tag 'pwm/for-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: ep93xx: Ensure configuring period and duty_cycle isn't wrongly skipped pwm: berlin: Ensure configuring period and duty_cycle isn't wrongly skipped pwm: tiecap: Ensure configuring period and duty_cycle isn't wrongly skipped pwm: spear: Ensure configuring period and duty_cycle isn't wrongly skipped pwm: sprd: Ensure configuring period and duty_cycle isn't wrongly skipped commit 4511d7c8f440ab13520601141d67d13cb074620a Author: Steve French Date: Wed Jul 14 23:32:09 2021 -0500 SMB3.1.1: fix mount failure to some servers when compression enabled When sending the compression context to some servers, they rejected the SMB3.1.1 negotiate protocol because they expect the compression context to have a data length of a multiple of 8. Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 16dd9b8c31aee7ae074fa3ee36a797e9ba9f7e4f Author: Shyam Prasad N Date: Wed Jul 14 23:00:00 2021 -0500 cifs: added WARN_ON for all the count decrements We have a few ref counters srv_count, ses_count and tc_count which we use for ref counting. Added a WARN_ON during the decrement of each of these counters to make sure that they don't go below their minimum values. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 63f94e946fafcfc5080b4a4aec9770158268e4ee Author: Steve French Date: Tue Jul 13 19:40:33 2021 -0500 cifs: fix missing null session check in mount Although it is unlikely to be have ended up with a null session pointer calling cifs_try_adding_channels in cifs_mount. Coverity correctly notes that we are already checking for it earlier (when we return from do_dfs_failover), so at a minimum to clarify the code we should make sure we also check for it when we exit the loop so we don't end up calling cifs_try_adding_channels or mount_setup_tlink with a null ses pointer. Addresses-Coverity: 1505608 ("Derefernce after null check") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 507345b5ae6a57b7ecd7550ff39282ed20de7b8d Author: Paulo Alcantara Date: Mon Jul 12 12:38:24 2021 -0300 cifs: handle reconnect of tcon when there is no cached dfs referral When there is no cached DFS referral of tcon->dfs_path, then reconnect to same share. Signed-off-by: Paulo Alcantara (SUSE) Cc: Signed-off-by: Steve French commit 2ea2086c223e3ae87cde85c3832b110aa6d7ec98 Merge: 1e7b5812f4890 775da83005cb6 Author: Dave Airlie Date: Fri Jul 16 09:27:45 2021 +1000 Merge tag 'amd-drm-fixes-5.14-2021-07-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.14-2021-07-14: amdgpu: - SR-IOV fixes - RAS fixes - eDP fixes - SMU13 code unification to facilitate fixes in the future - Add new renoir DID - Yellow Carp fixes - Beige Goby fixes - Revert a bunch of TLB fixes that caused regressions - Revert an LTTPR display regression amdkfd - Fix VRAM access regression - SVM fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210714220858.5553-1-alexander.deucher@amd.com commit 2394e628738933aa014093d93093030f6232946d Author: Andreas Persson Date: Mon Jul 12 09:54:52 2021 +0200 mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards Erasing an AMD linear flash card (AM29F016D) crashes after the first sector has been erased. Likewise, writing to it crashes after two bytes have been written. The reason is a missing check for a null pointer - the cmdset_priv field is not set for this type of card. Fixes: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") Signed-off-by: Andreas Persson Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/DB6P189MB05830B3530B8087476C5CFE4C1159@DB6P189MB0583.EURP189.PROD.OUTLOOK.COM commit 45bb1faa29effbd4ca4d581b32373f2eda309b95 Author: Michael Walle Date: Wed Jul 7 15:53:59 2021 +0200 mtd: core: handle flashes without OTP gracefully There are flash drivers which registers the OTP callbacks although the flash doesn't support OTP regions and return -ENODATA for these callbacks if there is no OTP. If this happens, the probe of the whole flash will fail. Fix it by handling the ENODATA return code and skip the OTP region nvmem setup. Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support") Reported-by: Guenter Roeck Signed-off-by: Michael Walle Tested-by: Guenter Roeck Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210707135359.32398-1-michael@walle.cc commit e83862ee1b9b1668826683f432b041875ec0c819 Author: Dan Carpenter Date: Fri Jun 18 16:42:07 2021 +0300 mtd: mchp48l640: silence some uninitialized variable warnings Smatch complains that zero length read/writes will lead to an uninitalized return value. I don't know if that's possible, but it's nicer to return a zero literal anyway so let's do that. Fixes: 88d125026753 ("mtd: devices: add support for microchip 48l640 EERAM") Signed-off-by: Dan Carpenter Reviewed-by: Fabio Estevam Reviewed-by: Heiko Schocher Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/YMyir961W28TX5dT@mwanda commit 962bf783ef65d15b0f8ca9c33342cf3b20bf0d2e Author: Desmond Cheong Zhi Xi Date: Fri Jun 18 00:09:04 2021 +0800 mtd: break circular locks in register_mtd_blktrans Syzbot reported a circular locking dependency: https://syzkaller.appspot.com/bug?id=7bd106c28e846d1023d4ca915718b1a0905444cb This happens because of the following lock dependencies: 1. loop_ctl_mutex -> bdev->bd_mutex (when loop_control_ioctl calls loop_remove, which then calls del_gendisk; this also happens in loop_exit which eventually calls loop_remove) 2. bdev->bd_mutex -> mtd_table_mutex (when blkdev_get_by_dev calls __blkdev_get, which then calls blktrans_open) 3. mtd_table_mutex -> major_names_lock (when register_mtd_blktrans calls __register_blkdev) 4. major_names_lock -> loop_ctl_mutex (when blk_request_module calls loop_probe) Hence there's an overall dependency of: loop_ctl_mutex ----------> bdev->bd_mutex ^ | | | | v major_names_lock <--------- mtd_table_mutex We can break this circular dependency by holding mtd_table_mutex only for the required critical section in register_mtd_blktrans. This avoids the mtd_table_mutex -> major_names_lock dependency. Reported-and-tested-by: syzbot+6a8a0d93c91e8fbf2e80@syzkaller.appspotmail.com Co-developed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Signed-off-by: Desmond Cheong Zhi Xi Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210617160904.570111-1-desmondcheongzx@gmail.com commit 14f97f0b8e2b9950c028d0cb7311ffe26a3cc1c0 Author: Dan Carpenter Date: Thu Jun 17 16:37:25 2021 +0300 mtd: rawnand: Add a check in of_get_nand_secure_regions() Check for whether of_property_count_elems_of_size() returns a negative error code. Fixes: 13b89768275d ("mtd: rawnand: Add support for secure regions in NAND memory") Signed-off-by: Dan Carpenter Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/YMtQFXE0F1w7mUh+@mwanda commit 2b6d2833cd1d8a43a837a45da65860ef086443dc Author: Zhihao Cheng Date: Tue Jun 15 17:39:05 2021 +0800 mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity Since commit b35fd7422c2f8("block: check queue's limits.discard_granularity in __blkdev_issue_discard()") checks rq.limits.discard_granularity in __blkdev_issue_discard(), we may get following warnings on formatted ftl: WARNING: CPU: 2 PID: 7313 at block/blk-lib.c:51 __blkdev_issue_discard+0x2a7/0x390 Reproducer: 1. ftl_format /dev/mtd0 2. modprobe ftl 3. mkfs.vfat /dev/ftla 4. mount -odiscard /dev/ftla temp 5. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct 6. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct Fix it by initializing rq.limits.discard_granularity if device supports discard operation. Signed-off-by: Zhihao Cheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210615093905.3473709-1-chengzhihao1@huawei.com commit 20192d9c9f6ae447c461285c915502ffbddf5696 Merge: a6ecfb39ba9d7 d444b06e40855 Author: David S. Miller Date: Thu Jul 15 14:39:45 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Andrii Nakryiko says: ==================== pull-request: bpf 2021-07-15 The following pull-request contains BPF updates for your *net* tree. We've added 9 non-merge commits during the last 5 day(s) which contain a total of 9 files changed, 37 insertions(+), 15 deletions(-). The main changes are: 1) Fix NULL pointer dereference in BPF_TEST_RUN for BPF_XDP_DEVMAP and BPF_XDP_CPUMAP programs, from Xuan Zhuo. 2) Fix use-after-free of net_device in XDP bpf_link, from Xuan Zhuo. 3) Follow-up fix to subprog poke descriptor use-after-free problem, from Daniel Borkmann and John Fastabend. 4) Fix out-of-range array access in s390 BPF JIT backend, from Colin Ian King. 5) Fix memory leak in BPF sockmap, from John Fastabend. 6) Fix for sockmap to prevent proc stats reporting bug, from John Fastabend and Jakub Sitnicki. 7) Fix NULL pointer dereference in bpftool, from Tobias Klauser. 8) AF_XDP documentation fixes, from Baruch Siach. ==================== Signed-off-by: David S. Miller commit 704adfb5a9978462cd861f170201ae2b5e3d3a80 Author: Steven Rostedt (VMware) Date: Thu Jul 15 00:02:06 2021 -0400 tracing: Do not reference char * as a string in histograms The histogram logic was allowing events with char * pointers to be used as normal strings. But it was easy to crash the kernel with: # echo 'hist:keys=filename' > events/syscalls/sys_enter_openat/trigger And open some files, and boom! BUG: unable to handle page fault for address: 00007f2ced0c3280 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1173fa067 P4D 1173fa067 PUD 1171b6067 PMD 1171dd067 PTE 0 Oops: 0000 [#1] PREEMPT SMP CPU: 6 PID: 1810 Comm: cat Not tainted 5.13.0-rc5-test+ #61 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:strlen+0x0/0x20 Code: f6 82 80 2a 0b a9 20 74 11 0f b6 50 01 48 83 c0 01 f6 82 80 2a 0b a9 20 75 ef c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 <80> 3f 00 74 10 48 89 f8 48 83 c0 01 80 38 00 75 f7 48 29 f8 c3 RSP: 0018:ffffbdbf81567b50 EFLAGS: 00010246 RAX: 0000000000000003 RBX: ffff93815cdb3800 RCX: ffff9382401a22d0 RDX: 0000000000000100 RSI: 0000000000000000 RDI: 00007f2ced0c3280 RBP: 0000000000000100 R08: ffff9382409ff074 R09: ffffbdbf81567c98 R10: ffff9382409ff074 R11: 0000000000000000 R12: ffff9382409ff074 R13: 0000000000000001 R14: ffff93815a744f00 R15: 00007f2ced0c3280 FS: 00007f2ced0f8580(0000) GS:ffff93825a800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2ced0c3280 CR3: 0000000107069005 CR4: 00000000001706e0 Call Trace: event_hist_trigger+0x463/0x5f0 ? find_held_lock+0x32/0x90 ? sched_clock_cpu+0xe/0xd0 ? lock_release+0x155/0x440 ? kernel_init_free_pages+0x6d/0x90 ? preempt_count_sub+0x9b/0xd0 ? kernel_init_free_pages+0x6d/0x90 ? get_page_from_freelist+0x12c4/0x1680 ? __rb_reserve_next+0xe5/0x460 ? ring_buffer_lock_reserve+0x12a/0x3f0 event_triggers_call+0x52/0xe0 ftrace_syscall_enter+0x264/0x2c0 syscall_trace_enter.constprop.0+0x1ee/0x210 do_syscall_64+0x1c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Where it triggered a fault on strlen(key) where key was the filename. The reason is that filename is a char * to user space, and the histogram code just blindly dereferenced it, with obvious bad results. I originally tried to use strncpy_from_user/kernel_nofault() but found that there's other places that its dereferenced and not worth the effort. Just do not allow "char *" to act like strings. Link: https://lkml.kernel.org/r/20210715000206.025df9d2@rorschach.local.home Cc: Ingo Molnar Cc: Andrew Morton Cc: Masami Hiramatsu Cc: Tzvetomir Stoyanov Cc: stable@vger.kernel.org Acked-by: Namhyung Kim Acked-by: Tom Zanussi Fixes: 79e577cbce4c4 ("tracing: Support string type key properly") Fixes: 5967bd5c4239 ("tracing: Let filter_assign_type() detect FILTER_PTR_STRING") Signed-off-by: Steven Rostedt (VMware) commit e9338abf0e186336022293d2e454c106761f262b Merge: dd9c7df94c1b2 b7eb335e26a9c Author: Linus Torvalds Date: Thu Jul 15 13:57:31 2021 -0700 Merge tag 'Wimplicit-fallthrough-clang-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo Silva: "This fixes many fall-through warnings when building with Clang and -Wimplicit-fallthrough, and also enables -Wimplicit-fallthrough for Clang, globally. It's also important to notice that since we have adopted the use of the pseudo-keyword macro fallthrough, we also want to avoid having more /* fall through */ comments being introduced. Contrary to GCC, Clang doesn't recognize any comments as implicit fall-through markings when the -Wimplicit-fallthrough option is enabled. So, in order to avoid having more comments being introduced, we use the option -Wimplicit-fallthrough=5 for GCC, which similar to Clang, will cause a warning in case a code comment is intended to be used as a fall-through marking. The patch for Makefile also enforces this. We had almost 4,000 of these issues for Clang in the beginning, and there might be a couple more out there when building some architectures with certain configurations. However, with the recent fixes I think we are in good shape and it is now possible to enable the warning for Clang" * tag 'Wimplicit-fallthrough-clang-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: (27 commits) Makefile: Enable -Wimplicit-fallthrough for Clang powerpc/smp: Fix fall-through warning for Clang dmaengine: mpc512x: Fix fall-through warning for Clang usb: gadget: fsl_qe_udc: Fix fall-through warning for Clang powerpc/powernv: Fix fall-through warning for Clang MIPS: Fix unreachable code issue MIPS: Fix fall-through warnings for Clang ASoC: Mediatek: MT8183: Fix fall-through warning for Clang power: supply: Fix fall-through warnings for Clang dmaengine: ti: k3-udma: Fix fall-through warning for Clang s390: Fix fall-through warnings for Clang dmaengine: ipu: Fix fall-through warning for Clang iommu/arm-smmu-v3: Fix fall-through warning for Clang mmc: jz4740: Fix fall-through warning for Clang PCI: Fix fall-through warning for Clang scsi: libsas: Fix fall-through warning for Clang video: fbdev: Fix fall-through warning for Clang math-emu: Fix fall-through warning cpufreq: Fix fall-through warning for Clang drm/msm: Fix fall-through warning in msm_gem_new_impl() ... commit 659ede7d13f1cc37882088deecbc085da285b8f8 Author: Riccardo Mancini Date: Thu Jul 15 18:07:23 2021 +0200 perf trace: Free strings in trace__parse_events_option() ASan reports several memory leaks running: # perf test "88: Check open filename arg using perf trace + vfs_getname" The fourth of these leaks is related to some strings never being freed in trace__parse_events_option. This patch adds the missing frees. Signed-off-by: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/34d08535b11124106b859790549991abff5a7de8.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 3cb4d5e00e037c70f239173bdd399a7e6040830f Author: Riccardo Mancini Date: Thu Jul 15 18:07:22 2021 +0200 perf trace: Free syscall tp fields in evsel->priv ASan reports several memory leaks running: # perf test "88: Check open filename arg using perf trace + vfs_getname" The third of these leaks is related to evsel->priv fields of sycalls never being deallocated. This patch adds the function evlist__free_syscall_tp_fields which iterates over all evsels in evlist, matching syscalls, and calling the missing frees. This new function is called at the end of trace__run, right before calling evlist__delete. Signed-off-by: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/46526611904ec5ff2768b59014e3afce8e0197d1.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit f2ebf8ffe7af10bff02d34addbebd9199de65ed2 Author: Riccardo Mancini Date: Thu Jul 15 18:07:21 2021 +0200 perf trace: Free syscall->arg_fmt ASan reports several memory leaks running: # perf test "88: Check open filename arg using perf trace + vfs_getname" The second of these leaks is caused by the arg_fmt field of syscall not being deallocated. This patch adds a new function syscall__exit which is called on all syscalls.table entries in trace__exit, which will free the arg_fmt field. Signed-off-by: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/d68f25c043d30464ac9fa79c3399e18f429bca82.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 6c7f0ab04707c2882f08d5abb9dc41b54493b61c Author: Riccardo Mancini Date: Thu Jul 15 18:07:20 2021 +0200 perf trace: Free malloc'd trace fields on exit ASan reports several memory leaks running: # perf test "88: Check open filename arg using perf trace + vfs_getname" The first of these leaks is related to struct trace fields never being deallocated. This patch adds the function trace__exit, which is called at the end of cmd_trace, replacing the existing deallocation, which is now moved inside the new function. This function deallocates: - ev_qualifier - ev_qualifier_ids.entries - syscalls.table - sctbl - perfconfig_events Signed-off-by: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/de5945ed5c0cb882cbfa3268567d0bff460ff016.1626343282.git.rickyman7@gmail.com [ Removed needless initialization to zero, missing named initializers are zeroed by the compiler ] Signed-off-by: Arnaldo Carvalho de Melo commit f8cbb0f926ae1e1fb5f9e51614e5437560ed4039 Author: Riccardo Mancini Date: Thu Jul 15 18:07:19 2021 +0200 perf lzma: Close lzma stream on exit ASan reports memory leaks when running: # perf test "88: Check open filename arg using perf trace + vfs_getname" One of these is caused by the lzma stream never being closed inside lzma_decompress_to_file(). This patch adds the missing lzma_end(). Signed-off-by: Riccardo Mancini Fixes: 80a32e5b498a7547 ("perf tools: Add lzma decompression support for kernel module") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/aaf50bdce7afe996cfc06e1bbb36e4a2a9b9db93.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit faf3ac305d61341c74e5cdd9e41daecce7f67bfe Author: Riccardo Mancini Date: Thu Jul 15 18:07:18 2021 +0200 perf script: Fix memory 'threads' and 'cpus' leaks on exit ASan reports several memory leaks while running: # perf test "82: Use vfs_getname probe to get syscall args filenames" Two of these are caused by some refcounts not being decreased on perf-script exit, namely script.threads and script.cpus. This patch adds the missing __put calls in a new perf_script__exit function, which is called at the end of cmd_script. This patch concludes the fixes of all remaining memory leaks in perf test "82: Use vfs_getname probe to get syscall args filenames". Signed-off-by: Riccardo Mancini Fixes: cfc8874a48599249 ("perf script: Process cpu/threads maps") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/5ee73b19791c6fa9d24c4d57f4ac1a23609400d7.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 1b1f57cf9e4c8eb16c8f6b2ce12cc5dd3517fc61 Author: Riccardo Mancini Date: Thu Jul 15 18:07:17 2021 +0200 perf script: Release zstd data ASan reports several memory leak while running: # perf test "82: Use vfs_getname probe to get syscall args filenames" One of the leaks is caused by zstd data not being released on exit in perf-script. This patch adds the missing zstd_fini(). Signed-off-by: Riccardo Mancini Fixes: b13b04d9382113f7 ("perf script: Initialize zstd_data") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/39388e8cc2f85ca219ea18697a17b7bd8f74b693.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 423b9174f5f71fd3d245f4da0feaf958976f66e7 Author: Riccardo Mancini Date: Thu Jul 15 18:07:16 2021 +0200 perf session: Cleanup trace_event ASan reports several memory leaks when running: # perf test "82: Use vfs_getname probe to get syscall args filenames" many of which are related to session->tevent. This patch will solve this problem, then next patch will fix the remaining memory leaks in 'perf script'. This bug is due to a missing deallocation of the trace_event data strutures. This patch adds the missing trace_event__cleanup() in perf_session__delete(). Signed-off-by: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/fa2a3f221d90e47ce4e5b7e2d6e64c3509ddc96a.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 02e6246f5364d5260a6ea6f92ab6f409058b162f Author: Riccardo Mancini Date: Thu Jul 15 18:07:15 2021 +0200 perf inject: Close inject.output on exit ASan reports a memory leak when running: # perf test "83: Zstd perf.data compression/decompression" which happens inside 'perf inject'. The bug is caused by inject.output never being closed. This patch adds the missing perf_data__close(). Signed-off-by: Riccardo Mancini Fixes: 6ef81c55a2b6584c ("perf session: Return error code for perf_session__new() function on failure") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mamatha Inamdar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/c06f682afa964687367cf6e92a64ceb49aec76a5.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit a37338aad8c4d8676173ead14e881d2ec308155c Author: Riccardo Mancini Date: Thu Jul 15 18:07:14 2021 +0200 perf report: Free generated help strings for sort option ASan reports the memory leak of the strings allocated by sort_help() when running perf report. This patch changes the returned pointer to char* (instead of const char*), saves it in a temporary variable, and finally deallocates it at function exit. Signed-off-by: Riccardo Mancini Fixes: 702fb9b415e7c99b ("perf report: Show all sort keys in help output") Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/a38b13f02812a8a6759200b9063c6191337f44d4.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit da6b7c6c0626901428245f65712385805e42eba6 Author: Riccardo Mancini Date: Thu Jul 15 18:07:13 2021 +0200 perf env: Fix memory leak of cpu_pmu_caps ASan reports memory leaks while running: # perf test "83: Zstd perf.data compression/decompression" The first of the leaks is caused by env->cpu_pmu_caps not being freed. This patch adds the missing (z)free inside perf_env__exit. Signed-off-by: Riccardo Mancini Fixes: 6f91ea283a1ed23e ("perf header: Support CPU PMU capabilities") Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/6ba036a8220156ec1f3d6be3e5d25920f6145028.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 244d1797c8c8e850b8de7992af713aa5c70d5650 Author: Riccardo Mancini Date: Thu Jul 15 18:07:12 2021 +0200 perf test maps__merge_in: Fix memory leak of maps ASan reports a memory leak when running: # perf test "65: maps__merge_in" This is the second and final patch addressing these memory leaks. This time, the problem is simply that the maps object is never destructed. This patch adds the missing maps__exit call. Signed-off-by: Riccardo Mancini Fixes: 79b6bb73f888933c ("perf maps: Merge 'struct maps' with 'struct map_groups'") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/a1a29b97a58738987d150e94d4ebfad0282fb038.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 581e295a0f6b5c2931d280259fbbfff56959faa9 Author: Riccardo Mancini Date: Thu Jul 15 18:07:11 2021 +0200 perf dso: Fix memory leak in dso__new_map() ASan reports a memory leak when running: # perf test "65: maps__merge_in". The causes of the leaks are two, this patch addresses only the first one, which is related to dso__new_map(). The bug is that dso__new_map() creates a new dso but never decreases the refcount it gets from creating it. This patch adds the missing dso__put(). Signed-off-by: Riccardo Mancini Fixes: d3a7c489c7fd2463 ("perf tools: Reference count struct dso") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/60bfe0cd06e89e2ca33646eb8468d7f5de2ee597.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit dccfca926c351ba0893af4c8b481477bdb2881a4 Author: Riccardo Mancini Date: Thu Jul 15 18:07:10 2021 +0200 perf test event_update: Fix memory leak of unit ASan reports a memory leak while running: # perf test "49: Synthesize attr update" Caused by a string being duplicated but never freed. This patch adds the missing free(). Note that evsel->unit is not deallocated together with evsel since it is supposed to be a constant string. Signed-off-by: Riccardo Mancini Fixes: a6e5281780d1da65 ("perf tools: Add event_update event unit type") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1fbc8158663fb0d4d5392e36bae564f6ad60be3c.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit fc56f54f6fcd5337634f4545af6459613129b432 Author: Riccardo Mancini Date: Thu Jul 15 18:07:09 2021 +0200 perf test event_update: Fix memory leak of evlist ASan reports a memory leak when running: # perf test "49: Synthesize attr update" Caused by evlist not being deleted. This patch adds the missing evlist__delete and removes the perf_cpu_map__put since it's already being deleted by evlist__delete. Signed-off-by: Riccardo Mancini Fixes: a6e5281780d1da65 ("perf tools: Add event_update event unit type") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/f7994ad63d248f7645f901132d208fadf9f2b7e4.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 233f2dc1c284337286f9a64c0152236779a42f6c Author: Riccardo Mancini Date: Thu Jul 15 18:07:08 2021 +0200 perf test session_topology: Delete session->evlist ASan reports a memory leak related to session->evlist while running: # perf test "41: Session topology". When perf_data is in write mode, session->evlist is owned by the caller, which should also take care of deleting it. This patch adds the missing evlist__delete(). Signed-off-by: Riccardo Mancini Fixes: c84974ed9fb67293 ("perf test: Add entry to test cpu topology") Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/822f741f06eb25250fb60686cf30a35f447e9e91.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 42db3d9ded555f7148b5695109a7dc8d66f0dde4 Author: Riccardo Mancini Date: Thu Jul 15 18:07:07 2021 +0200 perf env: Fix sibling_dies memory leak ASan reports a memory leak in perf_env while running: # perf test "41: Session topology" Caused by sibling_dies not being freed. This patch adds the required free. Fixes: acae8b36cded0ee6 ("perf header: Add die information in CPU topology") Signed-off-by: Riccardo Mancini Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/2140d0b57656e4eb9021ca9772250c24c032924b.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit dedeb4be203b382ba7245d13079bc3b0f6d40c65 Author: Riccardo Mancini Date: Thu Jul 15 18:07:06 2021 +0200 perf probe: Fix dso->nsinfo refcounting ASan reports a memory leak of nsinfo during the execution of: # perf test "31: Lookup mmap thread". The leak is caused by a refcounted variable being replaced without dropping the refcount. This patch makes sure that the refcnt of nsinfo is decreased whenever a refcounted variable is replaced with a new value. Signed-off-by: Riccardo Mancini Fixes: 544abd44c7064c8a ("perf probe: Allow placing uprobes in alternate namespaces.") Cc: Ian Rogers Cc: Jiri Olsa Cc: Krister Johansen Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/55223bc8821b34ccb01f92ef1401c02b6a32e61f.1626343282.git.rickyman7@gmail.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 2d6b74baa7147251c30a46c4996e8cc224aa2dc5 Author: Riccardo Mancini Date: Thu Jul 15 18:07:06 2021 +0200 perf map: Fix dso->nsinfo refcounting ASan reports a memory leak of nsinfo during the execution of # perf test "31: Lookup mmap thread" The leak is caused by a refcounted variable being replaced without dropping the refcount. This patch makes sure that the refcnt of nsinfo is decreased whenever a refcounted variable is replaced with a new value. Signed-off-by: Riccardo Mancini Fixes: bf2e710b3cb8445c ("perf maps: Lookup maps in both intitial mountns and inner mountns.") Cc: Ian Rogers Cc: Jiri Olsa Cc: Krister Johansen Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/55223bc8821b34ccb01f92ef1401c02b6a32e61f.1626343282.git.rickyman7@gmail.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 0967ebffe098157180a0bbd180ac90348c6e07d7 Author: Riccardo Mancini Date: Thu Jul 15 18:07:06 2021 +0200 perf inject: Fix dso->nsinfo refcounting ASan reports a memory leak of nsinfo during the execution of: # perf test "31: Lookup mmap thread" The leak is caused by a refcounted variable being replaced without dropping the refcount. This patch makes sure that the refcnt of nsinfo is decreased when a refcounted variable is replaced with a new value. Signed-off-by: Riccardo Mancini Fixes: 27c9c3424fc217da ("perf inject: Add --buildid-all option") Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/55223bc8821b34ccb01f92ef1401c02b6a32e61f.1626343282.git.rickyman7@gmail.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 9a3223b0713369e6258fd8656e0c0a5ed794d186 Author: Rob Herring Date: Thu Jul 15 12:59:52 2021 -0600 ASoC: dt-bindings: renesas: rsnd: Fix incorrect 'port' regex schema A property regex goes under 'patternProperties', not 'properties' schema. Otherwise, the regex is interpretted as a fixed string. Fixes: 17c2d247ddd2 ("ASoC: dt-bindings: renesas: rsnd: tidyup properties") Cc: Mark Brown Cc: Kuninori Morimoto Cc: alsa-devel@alsa-project.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210715185952.1470138-1-robh@kernel.org Signed-off-by: Mark Brown commit 8aa6348634d1bc81801329e6ea98cd88ec07fb10 Author: Dylan MacKenzie Date: Tue Jul 13 16:31:07 2021 -0700 HID: amd_sfh: Use correct MMIO register for DMA address amd_stop_sensor_v2 accidentally used a different MMIO register than amd_start_sensor_v2 for the DMA address. Fixes: f264481ad614dfd9 ("HID: amd_sfh: Extend driver capabilities for multi-generation support") Signed-off-by: Dylan MacKenzie Acked-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit a6ecfb39ba9d7316057cea823b196b734f6b18ca Author: Dongliang Mu Date: Wed Jul 14 17:13:22 2021 +0800 usb: hso: fix error handling code of hso_create_net_device The current error handling code of hso_create_net_device is hso_free_net_device, no matter which errors lead to. For example, WARNING in hso_free_net_device [1]. Fix this by refactoring the error handling code of hso_create_net_device by handling different errors by different code. [1] https://syzkaller.appspot.com/bug?id=66eff8d49af1b28370ad342787413e35bbe76efe Reported-by: syzbot+44d53c7255bb1aea22d2@syzkaller.appspotmail.com Fixes: 5fcfb6d0bfcd ("hso: fix bailout in error case of probe") Signed-off-by: Dongliang Mu Signed-off-by: David S. Miller commit 6206b7981a36476f4695d661ae139f7db36a802d Author: Jia He Date: Thu Jul 15 16:08:21 2021 +0800 qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union() Liajian reported a bug_on hit on a ThunderX2 arm64 server with FastLinQ QL41000 ethernet controller: BUG: scheduling while atomic: kworker/0:4/531/0x00000200 [qed_probe:488()]hw prepare failed kernel BUG at mm/vmalloc.c:2355! Internal error: Oops - BUG: 0 [#1] SMP CPU: 0 PID: 531 Comm: kworker/0:4 Tainted: G W 5.4.0-77-generic #86-Ubuntu pstate: 00400009 (nzcv daif +PAN -UAO) Call trace: vunmap+0x4c/0x50 iounmap+0x48/0x58 qed_free_pci+0x60/0x80 [qed] qed_probe+0x35c/0x688 [qed] __qede_probe+0x88/0x5c8 [qede] qede_probe+0x60/0xe0 [qede] local_pci_probe+0x48/0xa0 work_for_cpu_fn+0x24/0x38 process_one_work+0x1d0/0x468 worker_thread+0x238/0x4e0 kthread+0xf0/0x118 ret_from_fork+0x10/0x18 In this case, qed_hw_prepare() returns error due to hw/fw error, but in theory work queue should be in process context instead of interrupt. The root cause might be the unpaired spin_{un}lock_bh() in _qed_mcp_cmd_and_union(), which causes botton half is disabled incorrectly. Reported-by: Lijian Zhang Signed-off-by: Jia He Signed-off-by: David S. Miller commit dd9c7df94c1b23feacd54112f33ad95d93f64533 Merge: a1c9ca5f65c9a d08af0a59684e Author: Linus Torvalds Date: Thu Jul 15 12:17:05 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "13 patches. Subsystems affected by this patch series: mm (kasan, pagealloc, rmap, hmm, and hugetlb), and hfs" * emailed patches from Andrew Morton : mm/hugetlb: fix refs calculation from unaligned @vaddr hfs: add lock nesting notation to hfs_find_init hfs: fix high memory mapping in hfs_bnode_read hfs: add missing clean-up in hfs_fill_super lib/test_hmm: remove set but unused page variable mm: fix the try_to_unmap prototype for !CONFIG_MMU mm/page_alloc: further fix __alloc_pages_bulk() return value mm/page_alloc: correct return value when failing at preparing mm/page_alloc: avoid page allocator recursion with pagesets.lock held Revert "mm/page_alloc: make should_fail_alloc_page() static" kasan: fix build by including kernel.h kasan: add memzero init for unaligned size at DEBUG mm: move helper to check slub_debug_enabled commit 3fdcf7cdfc229346d028242e73562704ad644dd0 Author: Luke D. Jones Date: Mon Jul 5 10:26:59 2021 +1200 HID: asus: Remove check for same LED brightness on set Remove the early return on LED brightness set so that any controller application, daemon, or desktop may set the same brightness at any stage. This is required because many ASUS ROG keyboards will default to max brightness on laptop resume if the LEDs were set to off before sleep. Signed-off-by: Luke D Jones Signed-off-by: Jiri Kosina commit a1c9ca5f65c9acfd7c02474b9d5cacbd7ea288df Author: Randy Dunlap Date: Thu Jul 15 11:55:31 2021 -0700 EDAC/igen6: fix core dependency AGAIN My previous patch had a typo/thinko which prevents this driver from being enabled: change X64_64 to X86_64. Fixes: 0a9ece9ba154 ("EDAC/igen6: fix core dependency") Signed-off-by: Randy Dunlap Cc: Qiuxu Zhuo Cc: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: linux-edac@vger.kernel.org Cc: bowsingbetee Cc: stable@vger.kernel.org Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds commit 405386b02157ea1ee49ecb6917c2397985bb2a39 Merge: f3523a226dbb0 d951b2210c1ad Author: Linus Torvalds Date: Thu Jul 15 11:56:07 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: - Allow again loading KVM on 32-bit non-PAE builds - Fixes for host SMIs on AMD - Fixes for guest SMIs on AMD - Fixes for selftests on s390 and ARM - Fix memory leak - Enforce no-instrumentation area on vmentry when hardware breakpoints are in use. * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits) KVM: selftests: smm_test: Test SMM enter from L2 KVM: nSVM: Restore nested control upon leaving SMM KVM: nSVM: Fix L1 state corruption upon return from SMM KVM: nSVM: Introduce svm_copy_vmrun_state() KVM: nSVM: Check that VM_HSAVE_PA MSR was set before VMRUN KVM: nSVM: Check the value written to MSR_VM_HSAVE_PA KVM: SVM: Fix sev_pin_memory() error checks in SEV migration utilities KVM: SVM: Return -EFAULT if copy_to_user() for SEV mig packet header fails KVM: SVM: add module param to control the #SMI interception KVM: SVM: remove INIT intercept handler KVM: SVM: #SMI interception must not skip the instruction KVM: VMX: Remove vmx_msr_index from vmx.h KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run() KVM: selftests: Address extra memslot parameters in vm_vaddr_alloc kvm: debugfs: fix memory leak in kvm_create_vm_debugfs KVM: x86/pmu: Clear anythread deprecated bit when 0xa leaf is unsupported on the SVM KVM: mmio: Fix use-after-free Read in kvm_vm_ioctl_unregister_coalesced_mmio KVM: SVM: Revert clearing of C-bit on GPA in #NPF handler KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs KVM: x86: Use kernel's x86_phys_bits to handle reduced MAXPHYADDR ... commit 55cef88bbf12f3bfbe5c2379a8868a034707e755 Author: Yoshitaka Ikeda Date: Thu Jul 15 16:21:32 2021 +0000 spi: spi-cadence-quadspi: Fix division by zero warning Fix below division by zero warning: - Added an if statement because buswidth can be zero, resulting in division by zero. - The modified code was based on another driver (atmel-quadspi). [ 0.795337] Division by zero in kernel. : [ 0.834051] [<807fd40c>] (__div0) from [<804e1acc>] (Ldiv0+0x8/0x10) [ 0.839097] [<805f0710>] (cqspi_exec_mem_op) from [<805edb4c>] (spi_mem_exec_op+0x3b0/0x3f8) Fixes: 7512eaf54190 ("spi: cadence-quadspi: Fix dummy cycle calculation when buswidth > 1") Signed-off-by: Yoshitaka Ikeda Link: https://lore.kernel.org/r/ed989af6-da88-4e0b-9ed8-126db6cad2e4@nskint.co.jp Signed-off-by: Mark Brown commit f3523a226dbb0c925def650a658a0755185d60a8 Merge: 8096acd7442e6 4a5c155a5ab37 Author: Linus Torvalds Date: Thu Jul 15 11:50:15 2021 -0700 Merge tag 'iommu-fixes-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Revert a patch which caused boot failures with QCOM IOMMU - Two fixes for Intel VT-d context table handling - Physical address decoding fix for Rockchip IOMMU - Add a reviewer for AMD IOMMU * tag 'iommu-fixes-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: MAINTAINERS: Add Suravee Suthikulpanit as Reviewer for AMD IOMMU (AMD-Vi) iommu/rockchip: Fix physical address decoding iommu/vt-d: Fix clearing real DMA device's scalable-mode context entries iommu/vt-d: Global devTLB flush when present context entry changed iommu/qcom: Revert "iommu/arm: Cleanup resources in case of probe error path" commit e48bf29cf9d6d60d810e2af71e54b71a324094e0 Author: Ye Xiang Date: Sun Jun 13 11:25:07 2021 +0800 HID: intel-ish-hid: use async resume function ISH IPC driver uses asynchronous workqueue to do resume now, but there is a potential timing issue: when child devices resume before bus driver, it will cause child devices resume failed and cannot be recovered until reboot. The current implementation in this case do wait for IPC to resume but fail to accommodate for a case when there is no ISH reboot and soft resume is taking time. This issue is apparent on Tiger Lake platform with 5.11.13 kernel when doing suspend to idle then resume(s0ix) test. To resolve this issue, we change ISHTP HID client to use asynchronous resume callback too. In the asynchronous resume callback, it waits for the ISHTP resume done event, and then notify ISHTP HID client link ready. Signed-off-by: Ye Xiang Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit dc6afef7e14252c5ca5b8a8444946cb4b75b0aa0 Author: Zhu Yanjun Date: Tue Jul 13 23:11:30 2021 -0400 RDMA/irdma: Change returned type of irdma_setup_virt_qp to void Since the returned value of the function irdma_setup_virt_qp is always 0, remove the returned value check and change the returned type to void. Link: https://lore.kernel.org/r/20210714031130.1511109-4-yanjun.zhu@linux.dev Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 41f5fa9fa75cebd48b5ce9ec244ee25390ac3b89 Author: Zhu Yanjun Date: Tue Jul 13 23:11:29 2021 -0400 RDMA/irdma: Change the returned type of irdma_set_hw_rsrc to void Since the function irdma_set_hw_rsrc always returns zero, change the returned type to void and remove all the related source code. Link: https://lore.kernel.org/r/20210714031130.1511109-3-yanjun.zhu@linux.dev Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit a323da0b73b89b3ecabd661c56978a271e1911b6 Author: Zhu Yanjun Date: Tue Jul 13 23:11:28 2021 -0400 RDMA/irdma: change the returned type of irdma_sc_repost_aeq_entries to void The function irdma_sc_repost_aeq_entries always returns zero. So the returned type is changed to void. Link: https://lore.kernel.org/r/20210714031130.1511109-2-yanjun.zhu@linux.dev Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 991e634360f2622a683b48dfe44fe6d9cb765a09 Author: Ziyang Xuan Date: Thu Jul 15 20:22:04 2021 +0800 net: fix uninit-value in caif_seqpkt_sendmsg When nr_segs equal to zero in iovec_from_user, the object msg->msg_iter.iov is uninit stack memory in caif_seqpkt_sendmsg which is defined in ___sys_sendmsg. So we cann't just judge msg->msg_iter.iov->base directlly. We can use nr_segs to judge msg in caif_seqpkt_sendmsg whether has data buffers. ===================================================== BUG: KMSAN: uninit-value in caif_seqpkt_sendmsg+0x693/0xf60 net/caif/caif_socket.c:542 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 caif_seqpkt_sendmsg+0x693/0xf60 net/caif/caif_socket.c:542 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2343 ___sys_sendmsg net/socket.c:2397 [inline] __sys_sendmmsg+0x808/0xc90 net/socket.c:2480 __compat_sys_sendmmsg net/compat.c:656 [inline] Reported-by: syzbot+09a5d591c1f98cf5efcb@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=1ace85e8fc9b0d5a45c08c2656c3e91762daa9b8 Fixes: bece7b2398d0 ("caif: Rewritten socket implementation") Signed-off-by: Ziyang Xuan Signed-off-by: David S. Miller commit 0dc2d6ff40364a00cd66cae3ed327894dcd11c82 Author: Tatyana Nikolova Date: Thu Jul 8 14:35:21 2021 -0700 RDMA/irdma: Check vsi pointer before using it Fix a coverity warning about NULL pointer dereference: Dereferencing "vsi", which is known to be "NULL". Link: https://lore.kernel.org/r/20210708213521.438-1-tatyana.e.nikolova@intel.com Reported-by: coverity-bot Addresses-Coverity-ID: 1505164 ("Null pointer dereferences") Fixes: 8498a30e1b94 ("RDMA/irdma: Register auxiliary driver and implement private channel OPs") Signed-off-by: Mustafa Ismail Signed-off-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit d444b06e40855219ef38b5e9286db16d435f06dc Author: Tobias Klauser Date: Thu Jul 15 13:06:09 2021 +0200 bpftool: Check malloc return value in mount_bpffs_for_pin Fix and add a missing NULL check for the prior malloc() call. Fixes: 49a086c201a9 ("bpftool: implement prog load command") Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Acked-by: Roman Gushchin Link: https://lore.kernel.org/bpf/20210715110609.29364-1-tklauser@distanz.ch commit 54ea2f49fd9400dd698c25450be3352b5613b3b4 Author: Jakub Sitnicki Date: Wed Jul 14 17:47:50 2021 +0200 bpf, sockmap, udp: sk_prot needs inuse_idx set for proc stats The proc socket stats use sk_prot->inuse_idx value to record inuse sock stats. We currently do not set this correctly from sockmap side. The result is reading sock stats '/proc/net/sockstat' gives incorrect values. The socket counter is incremented correctly, but because we don't set the counter correctly when we replace sk_prot we may omit the decrement. To get the correct inuse_idx value move the core_initcall that initializes the UDP proto handlers to late_initcall. This way it is initialized after UDP has the chance to assign the inuse_idx value from the register protocol handler. Fixes: edc6741cc660 ("bpf: Add sockmap hooks for UDP sockets") Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Reviewed-by: Cong Wang Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210714154750.528206-1-jakub@cloudflare.com commit 228a4a7ba8e99bb9ef980b62f71e3be33f4aae69 Author: John Fastabend Date: Mon Jul 12 12:55:46 2021 -0700 bpf, sockmap, tcp: sk_prot needs inuse_idx set for proc stats The proc socket stats use sk_prot->inuse_idx value to record inuse sock stats. We currently do not set this correctly from sockmap side. The result is reading sock stats '/proc/net/sockstat' gives incorrect values. The socket counter is incremented correctly, but because we don't set the counter correctly when we replace sk_prot we may omit the decrement. To get the correct inuse_idx value move the core_initcall that initializes the TCP proto handlers to late_initcall. This way it is initialized after TCP has the chance to assign the inuse_idx value from the register protocol handler. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Suggested-by: Jakub Sitnicki Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Cong Wang Link: https://lore.kernel.org/bpf/20210712195546.423990-3-john.fastabend@gmail.com commit 7e6b27a69167f97c56b5437871d29e9722c3e470 Author: John Fastabend Date: Mon Jul 12 12:55:45 2021 -0700 bpf, sockmap: Fix potential memory leak on unlikely error case If skb_linearize is needed and fails we could leak a msg on the error handling. To fix ensure we kfree the msg block before returning error. Found during code review. Fixes: 4363023d2668e ("bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Cong Wang Link: https://lore.kernel.org/bpf/20210712195546.423990-2-john.fastabend@gmail.com commit 91091656252f5d6d8c476e0c92776ce9fae7b445 Author: Colin Ian King Date: Thu Jul 15 13:57:12 2021 +0100 s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1] Currently array jit->seen_reg[r1] is being accessed before the range checking of index r1. The range changing on r1 should be performed first since it will avoid any potential out-of-range accesses on the array seen_reg[] and also it is more optimal to perform checks on r1 before fetching data from the array. Fix this by swapping the order of the checks before the array access. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Tested-by: Ilya Leoshkevich Acked-by: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/20210715125712.24690-1-colin.king@canonical.com commit b18c7da63fcb46e2f9a093cc18d7c219e13a887c Author: Bob Pearson Date: Mon Jul 5 11:41:54 2021 -0500 RDMA/rxe: Fix memory leak in error path code In rxe_mr_init_user() at the third error the driver fails to free the memory at mr->map. This patch adds code to do that. This error only occurs if page_address() fails to return a non zero address which should never happen for 64 bit architectures. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20210705164153.17652-1-rpearsonhpe@gmail.com Reported by: Haakon Bugge Signed-off-by: Bob Pearson Reviewed-by: Zhu Yanjun Reviewed-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 70713dddf3d25a02d1952f8c5d2688c986d2f2fb Author: Qitao Xu Date: Wed Jul 14 23:03:24 2021 -0700 net_sched: introduce tracepoint trace_qdisc_enqueue() Tracepoint trace_qdisc_enqueue() is introduced to trace skb at the entrance of TC layer on TX side. This is similar to trace_qdisc_dequeue(): 1. For both we only trace successful cases. The failure cases can be traced via trace_kfree_skb(). 2. They are called at entrance or exit of TC layer, not for each ->enqueue() or ->dequeue(). This is intentional, because we want to make trace_qdisc_enqueue() symmetric to trace_qdisc_dequeue(), which is easier to use. The return value of qdisc_enqueue() is not interesting here, we have Qdisc's drop packets in ->dequeue(), it is impossible to trace them even if we have the return value, the only way to trace them is tracing kfree_skb(). We only add information we need to trace ring buffer. If any other information is needed, it is easy to extend it without breaking ABI, see commit 3dd344ea84e1 ("net: tracepoint: exposing sk_family in all tcp:tracepoints"). Reviewed-by: Cong Wang Signed-off-by: Qitao Xu Signed-off-by: David S. Miller commit 851f36e40962408309ad2665bf0056c19a97881c Author: Qitao Xu Date: Wed Jul 14 23:00:21 2021 -0700 net_sched: use %px to print skb address in trace_qdisc_dequeue() Print format of skbaddr is changed to %px from %p, because we want to use skb address as a quick way to identify a packet. Note, trace ring buffer is only accessible to privileged users, it is safe to use a real kernel address here. Reviewed-by: Cong Wang Signed-off-by: Qitao Xu Signed-off-by: David S. Miller commit 65875073eddd24d7b3968c1501ef29277398dc7b Author: Qitao Xu Date: Wed Jul 14 22:59:23 2021 -0700 net: use %px to print skb address in trace_netif_receive_skb The print format of skb adress in tracepoint class net_dev_template is changed to %px from %p, because we want to use skb address as a quick way to identify a packet. Note, trace ring buffer is only accessible to privileged users, it is safe to use a real kernel address here. Reviewed-by: Cong Wang Signed-off-by: Qitao Xu Signed-off-by: David S. Miller commit e7efc2ce3d0789cd7c21b70ff00cd7838d382639 Author: Colin Ian King Date: Wed Jul 14 16:23:43 2021 +0100 liquidio: Fix unintentional sign extension issue on left shift of u16 Shifting the u16 integer oct->pcie_port by CN23XX_PKT_INPUT_CTL_MAC_NUM_POS (29) bits will be promoted to a 32 bit signed int and then sign-extended to a u64. In the cases where oct->pcie_port where bit 2 is set (e.g. 3..7) the shifted value will be sign extended and the top 32 bits of the result will be set. Fix this by casting the u16 values to a u64 before the 29 bit left shift. Addresses-Coverity: ("Unintended sign extension") Fixes: 3451b97cce2d ("liquidio: CN23XX register setup") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit d08af0a59684e18a51aa4bfd24c658994ea3fc5b Author: Joao Martins Date: Wed Jul 14 21:27:11 2021 -0700 mm/hugetlb: fix refs calculation from unaligned @vaddr Commit 82e5d378b0e47 ("mm/hugetlb: refactor subpage recording") refactored the count of subpages but missed an edge case when @vaddr is not aligned to PAGE_SIZE e.g. when close to vma->vm_end. It would then errousnly set @refs to 0 and record_subpages_vmas() wouldn't set the @pages array element to its value, consequently causing the reported null-deref by syzbot. Fix it by aligning down @vaddr by PAGE_SIZE in @refs calculation. Link: https://lkml.kernel.org/r/20210713152440.28650-1-joao.m.martins@oracle.com Fixes: 82e5d378b0e47 ("mm/hugetlb: refactor subpage recording") Reported-by: syzbot+a3fcd59df1b372066f5a@syzkaller.appspotmail.com Signed-off-by: Joao Martins Reviewed-by: Mike Kravetz Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b3b2177a2d795e35dc11597b2609eb1e7e57e570 Author: Desmond Cheong Zhi Xi Date: Wed Jul 14 21:27:08 2021 -0700 hfs: add lock nesting notation to hfs_find_init Syzbot reports a possible recursive lock in [1]. This happens due to missing lock nesting information. From the logs, we see that a call to hfs_fill_super is made to mount the hfs filesystem. While searching for the root inode, the lock on the catalog btree is grabbed. Then, when the parent of the root isn't found, a call to __hfs_bnode_create is made to create the parent of the root. This eventually leads to a call to hfs_ext_read_extent which grabs a lock on the extents btree. Since the order of locking is catalog btree -> extents btree, this lock hierarchy does not lead to a deadlock. To tell lockdep that this locking is safe, we add nesting notation to distinguish between catalog btrees, extents btrees, and attributes btrees (for HFS+). This has already been done in hfsplus. Link: https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db [1] Link: https://lkml.kernel.org/r/20210701030756.58760-4-desmondcheongzx@gmail.com Signed-off-by: Desmond Cheong Zhi Xi Reported-by: syzbot+b718ec84a87b7e73ade4@syzkaller.appspotmail.com Tested-by: syzbot+b718ec84a87b7e73ade4@syzkaller.appspotmail.com Reviewed-by: Viacheslav Dubeyko Cc: Al Viro Cc: Greg Kroah-Hartman Cc: Gustavo A. R. Silva Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54a5ead6f5e2b47131a7385d0c0af18e7b89cb02 Author: Desmond Cheong Zhi Xi Date: Wed Jul 14 21:27:05 2021 -0700 hfs: fix high memory mapping in hfs_bnode_read Pages that we read in hfs_bnode_read need to be kmapped into kernel address space. However, currently only the 0th page is kmapped. If the given offset + length exceeds this 0th page, then we have an invalid memory access. To fix this, we kmap relevant pages one by one and copy their relevant portions of data. An example of invalid memory access occurring without this fix can be seen in the following crash report: ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: use-after-free in hfs_bnode_read+0xc4/0xe0 fs/hfs/bnode.c:26 Read of size 2 at addr ffff888125fdcffe by task syz-executor5/4634 CPU: 0 PID: 4634 Comm: syz-executor5 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x195/0x1f8 lib/dump_stack.c:120 print_address_description.constprop.0+0x1d/0x110 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7b/0xd4 mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x154/0x1b0 mm/kasan/generic.c:186 memcpy+0x24/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:191 [inline] hfs_bnode_read+0xc4/0xe0 fs/hfs/bnode.c:26 hfs_bnode_read_u16 fs/hfs/bnode.c:34 [inline] hfs_bnode_find+0x880/0xcc0 fs/hfs/bnode.c:365 hfs_brec_find+0x2d8/0x540 fs/hfs/bfind.c:126 hfs_brec_read+0x27/0x120 fs/hfs/bfind.c:165 hfs_cat_find_brec+0x19a/0x3b0 fs/hfs/catalog.c:194 hfs_fill_super+0xc13/0x1460 fs/hfs/super.c:419 mount_bdev+0x331/0x3f0 fs/super.c:1368 hfs_mount+0x35/0x40 fs/hfs/super.c:457 legacy_get_tree+0x10c/0x220 fs/fs_context.c:592 vfs_get_tree+0x93/0x300 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x13f5/0x20e0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x2b8/0x340 fs/namespace.c:3433 do_syscall_64+0x37/0xc0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x45e63a Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 88 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9404d410d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000248 RCX: 000000000045e63a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f9404d41120 RBP: 00007f9404d41120 R08: 00000000200002c0 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000003 R14: 00000000004ad5d8 R15: 0000000000000000 The buggy address belongs to the page: page:00000000dadbcf3e refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x125fdc flags: 0x2fffc0000000000(node=0|zone=2|lastcpupid=0x3fff) raw: 02fffc0000000000 ffffea000497f748 ffffea000497f6c8 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888125fdce80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888125fdcf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888125fdcf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888125fdd000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888125fdd080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Link: https://lkml.kernel.org/r/20210701030756.58760-3-desmondcheongzx@gmail.com Signed-off-by: Desmond Cheong Zhi Xi Reviewed-by: Viacheslav Dubeyko Cc: Al Viro Cc: Greg Kroah-Hartman Cc: Gustavo A. R. Silva Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16ee572eaf0d09daa4c8a755fdb71e40dbf8562d Author: Desmond Cheong Zhi Xi Date: Wed Jul 14 21:27:01 2021 -0700 hfs: add missing clean-up in hfs_fill_super Patch series "hfs: fix various errors", v2. This series ultimately aims to address a lockdep warning in hfs_find_init reported by Syzbot [1]. The work done for this led to the discovery of another bug, and the Syzkaller repro test also reveals an invalid memory access error after clearing the lockdep warning. Hence, this series is broken up into three patches: 1. Add a missing call to hfs_find_exit for an error path in hfs_fill_super 2. Fix memory mapping in hfs_bnode_read by fixing calls to kmap 3. Add lock nesting notation to tell lockdep that the observed locking hierarchy is safe This patch (of 3): Before exiting hfs_fill_super, the struct hfs_find_data used in hfs_find_init should be passed to hfs_find_exit to be cleaned up, and to release the lock held on the btree. The call to hfs_find_exit is missing from an error path. We add it back in by consolidating calls to hfs_find_exit for error paths. Link: https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db [1] Link: https://lkml.kernel.org/r/20210701030756.58760-1-desmondcheongzx@gmail.com Link: https://lkml.kernel.org/r/20210701030756.58760-2-desmondcheongzx@gmail.com Signed-off-by: Desmond Cheong Zhi Xi Reviewed-by: Viacheslav Dubeyko Cc: Gustavo A. R. Silva Cc: Al Viro Cc: Shuah Khan Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c52114d9df6a193fba5317933c75bc9bb5f6cf8a Author: Alistair Popple Date: Wed Jul 14 21:26:58 2021 -0700 lib/test_hmm: remove set but unused page variable The HMM selftests use atomic_check_access() to check atomic access to a page has been revoked. It doesn't matter if the page mapping has been removed from the mirrored page tables as that also implies atomic access has been revoked. Therefore remove the unused page variable to fix this compiler warning: lib/test_hmm.c:631:16: warning: variable `page' set but not used [-Wunused-but-set-variable] Link: https://lkml.kernel.org/r/20210706025603.4059-1-apopple@nvidia.com Fixes: b659baea7546 ("mm: selftests for exclusive device memory") Signed-off-by: Alistair Popple Reported-by: Hulk Robot Reported-by: kernel test robot Reported-by: Yang Yingliang Acked-by: Souptick Joarder Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab7965de1725cd8514f0edbced5c2fb793846078 Author: Christoph Hellwig Date: Wed Jul 14 21:26:55 2021 -0700 mm: fix the try_to_unmap prototype for !CONFIG_MMU Adjust the nommu stub of try_to_unmap to match the changed protype for the full version. Turn it into an inline instead of a macro to generally improve the type checking. Link: https://lkml.kernel.org/r/20210705053944.885828-1-hch@lst.de Fixes: 1fb08ac63bee ("mm: rmap: make try_to_unmap() void function") Signed-off-by: Christoph Hellwig Reviewed-by: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 061478438d04779181c2ce4d7ffeeca343a70a98 Author: Chuck Lever Date: Wed Jul 14 21:26:52 2021 -0700 mm/page_alloc: further fix __alloc_pages_bulk() return value The author of commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") was possibly confused by the mixture of return values throughout the function. The API contract is clear that the function "Returns the number of pages on the list or array." It does not list zero as a unique return value with a special meaning. Therefore zero is a plausible return value only if @nr_pages is zero or less. Clean up the return logic to make it clear that the returned value is always the total number of pages in the array/list, not the number of pages that were allocated during this call. The only change in behavior with this patch is the value returned if prepare_alloc_pages() fails. To match the API contract, the number of pages currently in the array/list is returned in this case. The call site in __page_pool_alloc_pages_slow() also seems to be confused on this matter. It should be attended to by someone who is familiar with that code. [mel@techsingularity.net: Return nr_populated if 0 pages are requested] Link: https://lkml.kernel.org/r/20210713152100.10381-4-mgorman@techsingularity.net Signed-off-by: Chuck Lever Signed-off-by: Mel Gorman Acked-by: Jesper Dangaard Brouer Cc: Desmond Cheong Zhi Xi Cc: Zhang Qiang Cc: Yanfei Xu Cc: Matteo Croce Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5c15cea339115edf99dc92282865f173cf84510 Author: Yanfei Xu Date: Wed Jul 14 21:26:49 2021 -0700 mm/page_alloc: correct return value when failing at preparing If the array passed in is already partially populated, we should return "nr_populated" even failing at preparing arguments stage. Link: https://lkml.kernel.org/r/20210713152100.10381-3-mgorman@techsingularity.net Signed-off-by: Yanfei Xu Signed-off-by: Mel Gorman Link: https://lore.kernel.org/r/20210709102855.55058-1-yanfei.xu@windriver.com Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 187ad460b8413e863c951998cb321a117a717868 Author: Mel Gorman Date: Wed Jul 14 21:26:46 2021 -0700 mm/page_alloc: avoid page allocator recursion with pagesets.lock held Syzbot is reporting potential deadlocks due to pagesets.lock when PAGE_OWNER is enabled. One example from Desmond Cheong Zhi Xi is as follows __alloc_pages_bulk() local_lock_irqsave(&pagesets.lock, flags) <---- outer lock here prep_new_page(): post_alloc_hook(): set_page_owner(): __set_page_owner(): save_stack(): stack_depot_save(): alloc_pages(): alloc_page_interleave(): __alloc_pages(): get_page_from_freelist(): rm_queue(): rm_queue_pcplist(): local_lock_irqsave(&pagesets.lock, flags); *** DEADLOCK *** Zhang, Qiang also reported BUG: sleeping function called from invalid context at mm/page_alloc.c:5179 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper/0 ..... __dump_stack lib/dump_stack.c:79 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:96 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:9153 prepare_alloc_pages+0x3da/0x580 mm/page_alloc.c:5179 __alloc_pages+0x12f/0x500 mm/page_alloc.c:5375 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2147 alloc_pages+0x238/0x2a0 mm/mempolicy.c:2270 stack_depot_save+0x39d/0x4e0 lib/stackdepot.c:303 save_stack+0x15e/0x1e0 mm/page_owner.c:120 __set_page_owner+0x50/0x290 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2445 [inline] __alloc_pages_bulk+0x8b9/0x1870 mm/page_alloc.c:5313 alloc_pages_bulk_array_node include/linux/gfp.h:557 [inline] vm_area_alloc_pages mm/vmalloc.c:2775 [inline] __vmalloc_area_node mm/vmalloc.c:2845 [inline] __vmalloc_node_range+0x39d/0x960 mm/vmalloc.c:2947 __vmalloc_node mm/vmalloc.c:2996 [inline] vzalloc+0x67/0x80 mm/vmalloc.c:3066 There are a number of ways it could be fixed. The page owner code could be audited to strip GFP flags that allow sleeping but it'll impair the functionality of PAGE_OWNER if allocations fail. The bulk allocator could add a special case to release/reacquire the lock for prep_new_page and lookup PCP after the lock is reacquired at the cost of performance. The pages requiring prep could be tracked using the least significant bit and looping through the array although it is more complicated for the list interface. The options are relatively complex and the second one still incurs a performance penalty when PAGE_OWNER is active so this patch takes the simple approach -- disable bulk allocation of PAGE_OWNER is active. The caller will be forced to allocate one page at a time incurring a performance penalty but PAGE_OWNER is already a performance penalty. Link: https://lkml.kernel.org/r/20210708081434.GV3840@techsingularity.net Fixes: dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to local_lock") Signed-off-by: Mel Gorman Reported-by: Desmond Cheong Zhi Xi Reported-by: "Zhang, Qiang" Reported-by: syzbot+127fd7828d6eeb611703@syzkaller.appspotmail.com Tested-by: syzbot+127fd7828d6eeb611703@syzkaller.appspotmail.com Acked-by: Rafael Aquini Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54aa386661fef92b5f092d7068bc6d4952b91a71 Author: Matteo Croce Date: Wed Jul 14 21:26:43 2021 -0700 Revert "mm/page_alloc: make should_fail_alloc_page() static" This reverts commit f7173090033c70886d925995e9dfdfb76dbb2441. Fix an unresolved symbol error when CONFIG_DEBUG_INFO_BTF=y: LD vmlinux BTFIDS vmlinux FAILED unresolved symbol should_fail_alloc_page make: *** [Makefile:1199: vmlinux] Error 255 make: *** Deleting file 'vmlinux' Link: https://lkml.kernel.org/r/20210708191128.153796-1-mcroce@linux.microsoft.com Fixes: f7173090033c ("mm/page_alloc: make should_fail_alloc_page() static") Signed-off-by: Matteo Croce Acked-by: Mel Gorman Tested-by: John Hubbard Cc: Michal Hocko Cc: David Hildenbrand Cc: Vlastimil Babka Cc: Dan Streetman Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2db710cc846d3321a4dc0977fa13769bddba2351 Author: Marco Elver Date: Wed Jul 14 21:26:40 2021 -0700 kasan: fix build by including kernel.h The header relies on _RET_IP_ being defined, and had been receiving that definition via inclusion of bug.h which includes kernel.h. However, since f39650de687e ("kernel.h: split out panic and oops helpers") that is no longer the case and get the following build error when building CONFIG_KASAN_HW_TAGS on arm64: In file included from arch/arm64/mm/kasan_init.c:10: include/linux/kasan.h: In function 'kasan_slab_free': include/linux/kasan.h:230:39: error: '_RET_IP_' undeclared (first use in this function) 230 | return __kasan_slab_free(s, object, _RET_IP_, init); Fix it by including kernel.h from kasan.h. Link: https://lkml.kernel.org/r/20210705072716.2125074-1-elver@google.com Fixes: f39650de687e ("kernel.h: split out panic and oops helpers") Signed-off-by: Marco Elver Reviewed-by: Andy Shevchenko Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Peter Collingbourne Cc: Catalin Marinas Cc: Vincenzo Frascino Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77a63c69ec43f4dc28f4b2d1c933c39e55de6ad8 Author: Yee Lee Date: Wed Jul 14 21:26:37 2021 -0700 kasan: add memzero init for unaligned size at DEBUG Issue: when SLUB debug is on, hwtag kasan_unpoison() would overwrite the redzone of object with unaligned size. An additional memzero_explicit() path is added to replacing init by hwtag instruction for those unaligned size at SLUB debug mode. The penalty is acceptable since they are only enabled in debug mode, not production builds. A block of comment is added for explanation. Link: https://lkml.kernel.org/r/20210705103229.8505-3-yee.lee@mediatek.com Signed-off-by: Yee Lee Suggested-by: Andrey Konovalov Suggested-by: Marco Elver Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Nicholas Tang Cc: Kuan-Ying Lee Cc: Chinwen Chang Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d4a062af2cea33c2000b28420e8e2eb58b4fd0b Author: Marco Elver Date: Wed Jul 14 21:26:34 2021 -0700 mm: move helper to check slub_debug_enabled Move the helper to check slub_debug_enabled, so that we can confine the use of #ifdef outside slub.c as well. Link: https://lkml.kernel.org/r/20210705103229.8505-2-yee.lee@mediatek.com Signed-off-by: Marco Elver Signed-off-by: Yee Lee Suggested-by: Matthew Wilcox Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Chinwen Chang Cc: Dmitry Vyukov Cc: Kuan-Ying Lee Cc: Nicholas Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99bb2ebab953435852340cdb198c5abbf0bb5dd3 Author: Geert Uytterhoeven Date: Wed Jul 14 11:58:12 2021 +0200 net: dsa: mv88e6xxx: NET_DSA_MV88E6XXX_PTP should depend on NET_DSA_MV88E6XXX Making global2 support mandatory removed the Kconfig symbol NET_DSA_MV88E6XXX_GLOBAL2. This symbol also served as an intermediate symbol to make NET_DSA_MV88E6XXX_PTP depend on NET_DSA_MV88E6XXX. With the symbol removed, the user is always asked about PTP support for Marvell 88E6xxx switches, even if the latter support is not enabled. Fix this by reinstating the dependency. Fixes: 63368a7416df144b ("net: dsa: mv88e6xxx: Make global2 support mandatory") Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit b102a46ce16fd5550aed882c3c5b95f50da7992c Author: Darrick J. Wong Date: Wed Jul 14 09:03:41 2021 -0700 xfs: detect misaligned rtinherit directory extent size hints If we encounter a directory that has been configured to pass on an extent size hint to a new realtime file and the hint isn't an integer multiple of the rt extent size, we should flag the hint for administrative review because that is a misconfiguration (that other parts of the kernel will fix automatically). Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 0925fecc557471b6f6a488c3590a275151210572 Author: Darrick J. Wong Date: Mon Jul 12 12:58:49 2021 -0700 xfs: fix an integer overflow error in xfs_growfs_rt During a realtime grow operation, we run a single transaction for each rt bitmap block added to the filesystem. This means that each step has to be careful to increase sb_rblocks appropriately. Fix the integer overflow error in this calculation that can happen when the extent size is very large. Found by running growfs to add a rt volume to a filesystem formatted with a 1g rt extent size. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 0e2af9296f4f9c4c815ced2beb21093af7c38644 Author: Darrick J. Wong Date: Mon Jul 12 12:58:48 2021 -0700 xfs: improve FSGROWFSRT precondition checking Improve the checking at the start of a realtime grow operation so that we avoid accidentally set a new extent size that is too large and avoid adding an rt volume to a filesystem with rmap or reflink because we don't support rt rmap or reflink yet. While we're at it, separate the checks so that we're only testing one aspect at a time. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 5aa5b278237f356f86205c4b03d4cc64a293850a Author: Darrick J. Wong Date: Mon Jul 12 12:58:51 2021 -0700 xfs: don't expose misaligned extszinherit hints to userspace Commit 603f000b15f2 changed xfs_ioctl_setattr_check_extsize to reject an attempt to set an EXTSZINHERIT extent size hint on a directory with RTINHERIT set if the hint isn't a multiple of the realtime extent size. However, I have recently discovered that it is possible to change the realtime extent size when adding a rt device to a filesystem, which means that the existence of directories with misaligned inherited hints is not an accident. As a result, it's possible that someone could have set a valid hint and added an rt volume with a different rt extent size, which invalidates the ondisk hints. After such a sequence, FSGETXATTR will report a misaligned hint, which FSSETXATTR will trip over, causing confusion if the user was doing the usual GET/SET sequence to change some other attribute. Change xfs_fill_fsxattr to omit the hint if it isn't aligned properly. Fixes: 603f000b15f2 ("xfs: validate extsz hints against rt extent size when rtinherit is set") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 83193e5ebb0164d612aa620ceab7d3746e80e2a4 Author: Darrick J. Wong Date: Mon Jul 12 12:58:50 2021 -0700 xfs: correct the narrative around misaligned rtinherit/extszinherit dirs While auditing the realtime growfs code, I realized that the GROWFSRT ioctl (and by extension xfs_growfs) has always allowed sysadmins to change the realtime extent size when adding a realtime section to the filesystem. Since we also have always allowed sysadmins to set RTINHERIT and EXTSZINHERIT on directories even if there is no realtime device, this invalidates the premise laid out in the comments added in commit 603f000b15f2. In other words, this is not a case of inadequate metadata validation. This is a case of nearly forgotten (and apparently untested) but supported functionality. Update the comments to reflect what we've learned, and remove the log message about correcting the misalignment. Fixes: 603f000b15f2 ("xfs: validate extsz hints against rt extent size when rtinherit is set") Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig commit 5838d0356bb3c320867c393f12b169c01a870bda Author: Darrick J. Wong Date: Mon Jul 12 12:58:48 2021 -0700 xfs: reset child dir '..' entry when unlinking child While running xfs/168, I noticed a second source of post-shrink corruption errors causing shutdowns. Let's say that directory B has a low inode number and is a child of directory A, which has a high number. If B is empty but open, and unlinked from A, B's dotdot link continues to point to A. If A is then unlinked and the filesystem shrunk so that A is no longer a valid inode, a subsequent AIL push of B will trip the inode verifiers because the dotdot entry points outside of the filesystem. To avoid this problem, reset B's dotdot entry to the root directory when unlinking directories, since the root directory cannot be removed. Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang commit da062d16a897c0759ae907e786bc0bea950c0c9d Author: Darrick J. Wong Date: Mon Jul 12 12:58:47 2021 -0700 xfs: check for sparse inode clusters that cross new EOAG when shrinking While running xfs/168, I noticed occasional write verifier shutdowns involving inodes at the very end of the filesystem. Existing inode btree validation code checks that all inode clusters are fully contained within the filesystem. However, due to inadequate checking in the fs shrink code, it's possible that there could be a sparse inode cluster at the end of the filesystem where the upper inodes of the cluster are marked as holes and the corresponding blocks are free. In this case, the last blocks in the AG are listed in the bnobt. This enables the shrink to proceed but results in a filesystem that trips the inode verifiers. Fix this by disallowing the shrink. Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang commit 229adf3c64dbeae4e2f45fb561907ada9fcc0d0c Author: Andreas Gruenbacher Date: Thu Jul 15 09:58:06 2021 -0700 iomap: Don't create iomap_page objects in iomap_page_mkwrite_actor Now that we create those objects in iomap_writepage_map when needed, there's no need to pre-create them in iomap_page_mkwrite_actor anymore. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 637d3375953e052a62c0db409557e3b3354be88a Author: Andreas Gruenbacher Date: Thu Jul 15 09:58:05 2021 -0700 iomap: Don't create iomap_page objects for inline files In iomap_readpage_actor, don't create iop objects for inline inodes. Otherwise, iomap_read_inline_data will set PageUptodate without setting iop->uptodate, and iomap_page_release will eventually complain. To prevent this kind of bug from occurring in the future, make sure the page doesn't have private data attached in iomap_read_inline_data. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8e1bcef8e18d0fec4afe527c074bb1fd6c2b140c Author: Andreas Gruenbacher Date: Thu Jul 15 09:58:05 2021 -0700 iomap: Permit pages without an iop to enter writeback Create an iop in the writeback path if one doesn't exist. This allows us to avoid creating the iop in some cases. We'll initially do that for pages with inline data, but it can be extended to pages which are entirely within an extent. It also allows for an iop to be removed from pages in the future (eg page split). Co-developed-by: Matthew Wilcox (Oracle) Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 49694d14ff68fa4b5f86019dbcfb44a8bd213e58 Author: Christoph Hellwig Date: Thu Jul 15 09:58:04 2021 -0700 iomap: remove the length variable in iomap_seek_hole The length variable is rather pointless given that it can be trivially deduced from offset and size. Also the initial calculation can lead to KASAN warnings. Signed-off-by: Christoph Hellwig Reported-by: Leizhen (ThunderTown) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Matthew Wilcox (Oracle) commit 3ac1d426510f97ace05093ae9f2f710d9cbe6215 Author: Christoph Hellwig Date: Thu Jul 15 09:58:04 2021 -0700 iomap: remove the length variable in iomap_seek_data The length variable is rather pointless given that it can be trivially deduced from offset and size. Also the initial calculation can lead to KASAN warnings. Signed-off-by: Christoph Hellwig Reported-by: Leizhen (ThunderTown) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Matthew Wilcox (Oracle) commit e6f85cbeb23bd74b8966cf1f15bf7d01399ff625 Author: Mark Rutland Date: Thu Jul 15 13:30:49 2021 +0100 arm64: entry: fix KCOV suppression We suppress KCOV for entry.o rather than entry-common.o. As entry.o is built from entry.S, this is pointless, and permits instrumentation of entry-common.o, which is built from entry-common.c. Fix the Makefile to suppress KCOV for entry-common.o, as we had intended to begin with. I've verified with objdump that this is working as expected. Fixes: bf6fa2c0dda7 ("arm64: entry: don't instrument entry code with KCOV") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20210715123049.9990-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit 31a7f0f6c8f392f002c937f34f372943cf8be5a9 Author: Mark Rutland Date: Wed Jul 14 18:28:01 2021 +0100 arm64: entry: add missing noinstr We intend that all the early exception handling code is marked as `noinstr`, but we forgot this for __el0_error_handler_common(), which is called before we have completed entry from user mode. If it were instrumented, we could run into problems with RCU, lockdep, etc. Mark it as `noinstr` to prevent this. The few other functions in entry-common.c which do not have `noinstr` are called once we've completed entry, and are safe to instrument. Fixes: bb8e93a287a5 ("arm64: entry: convert SError handlers to C") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210714172801.16475-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit 59f44069e0527523f27948da7b77599a73dab157 Author: Mark Rutland Date: Wed Jul 14 15:38:41 2021 +0100 arm64: mte: fix restoration of GCR_EL1 from suspend Since commit: bad1e1c663e0a72f ("arm64: mte: switch GCR_EL1 in kernel entry and exit") we saved/restored the user GCR_EL1 value at exception boundaries, and update_gcr_el1_excl() is no longer used for this. However it is used to restore the kernel's GCR_EL1 value when returning from a suspend state. Thus, the comment is misleading (and an ISB is necessary). When restoring the kernel's GCR value, we need an ISB to ensure this is used by subsequent instructions. We don't necessarily get an ISB by other means (e.g. if the kernel is built without support for pointer authentication). As __cpu_setup() initialised GCR_EL1.Exclude to 0xffff, until a context synchronization event, allocation tag 0 may be used rather than the desired set of tags. This patch drops the misleading comment, adds the missing ISB, and for clarity folds update_gcr_el1_excl() into its only user. Fixes: bad1e1c663e0 ("arm64: mte: switch GCR_EL1 in kernel entry and exit") Signed-off-by: Mark Rutland Cc: Andrey Konovalov Cc: Catalin Marinas Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lore.kernel.org/r/20210714143843.56537-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 295cf156231ca3f9e3a66bde7fab5e09c41835e0 Author: Robin Murphy Date: Mon Jul 12 15:27:46 2021 +0100 arm64: Avoid premature usercopy failure Al reminds us that the usercopy API must only return complete failure if absolutely nothing could be copied. Currently, if userspace does something silly like giving us an unaligned pointer to Device memory, or a size which overruns MTE tag bounds, we may fail to honour that requirement when faulting on a multi-byte access even though a smaller access could have succeeded. Add a mitigation to the fixup routines to fall back to a single-byte copy if we faulted on a larger access before anything has been written to the destination, to guarantee making *some* forward progress. We needn't be too concerned about the overall performance since this should only occur when callers are doing something a bit dodgy in the first place. Particularly broken userspace might still be able to trick generic_perform_write() into an infinite loop by targeting write() at an mmap() of some read-only device register where the fault-in load succeeds but any store synchronously aborts such that copy_to_user() is genuinely unable to make progress, but, well, don't do that... CC: stable@vger.kernel.org Reported-by: Chen Huang Suggested-by: Al Viro Reviewed-by: Catalin Marinas Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/dc03d5c675731a1f24a62417dba5429ad744234e.1626098433.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 05d69d950d9d84218fc9beafd02dea1f6a70e09e Author: Christoph Hellwig Date: Thu Jul 15 16:17:11 2021 +0200 xen-blkfront: sanitize the removal state machine xen-blkfront has a weird protocol where close message from the remote side can be delayed, and where hot removals are treated somewhat differently from regular removals, all leading to potential NULL pointer removals, and a del_gendisk from the block device release method, which will deadlock. Fix this by just performing normal hot removals even when the device is opened like all other Linux block drivers. Fixes: c76f48eb5c08 ("block: take bd_mutex around delete_partitions in del_gendisk") Reported-by: Vitaly Kuznetsov Signed-off-by: Christoph Hellwig Tested-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20210715141711.1257293-1-hch@lst.de Signed-off-by: Jens Axboe commit a347c153b15c06479986839beefabad15a7ea83d Merge: 16ad3db3b24cd 251ef6f71be2a Author: Jens Axboe Date: Thu Jul 15 09:31:36 2021 -0600 Merge tag 'nvme-5.14-2021-07-15' of git://git.infradead.org/nvme into block-5.14 Pull NVMe fixes from Christoph: "nvme fixes for Linux 5.14 - fix various races in nvme-pci when shutting down just after probing (Casey Chen) - fix a net_device leak in nvme-tcp (Prabhakar Kushwaha)" * tag 'nvme-5.14-2021-07-15' of git://git.infradead.org/nvme: nvme-pci: do not call nvme_dev_remove_admin from nvme_remove nvme-pci: fix multiple races in nvme_setup_io_queues nvme-tcp: use __dev_get_by_name instead dev_get_by_name for OPT_HOST_IFACE commit 16ad3db3b24cd9f70aa24e93cef0d4a83dece7ac Author: Wang Qing Date: Tue Jul 6 12:00:16 2021 +0800 nbd: fix order of cleaning up the queue and freeing the tagset We must release the queue before freeing the tagset. Fixes: 4af5f2e03013 ("nbd: use blk_mq_alloc_disk and blk_cleanup_disk") Reported-and-tested-by: syzbot+9ca43ff47167c0ee3466@syzkaller.appspotmail.com Signed-off-by: Wang Qing Signed-off-by: Guoqing Jiang Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210706040016.1360412-1-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe commit 58b63e0f556c2debb8c942abcc9e6beadc4a07f0 Author: Guoqing Jiang Date: Tue Jul 6 09:07:34 2021 +0800 pd: fix order of cleaning up the queue and freeing the tagset We must release the queue before freeing the tagset. Fixes: 262d431f9000 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk") Signed-off-by: Guoqing Jiang Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210706010734.1356066-1-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe commit f88321a3bf775649c685379a25fb9f3f79836bfd Author: Rob Herring Date: Tue Jul 13 13:35:14 2021 -0600 dt-bindings: Move fixed string 'patternProperties' to 'properties' There's no need for fixed strings to be under 'patternProperties', so move them under 'properties' instead. Cc: Jean Delvare Cc: Guenter Roeck Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Saravanan Sekar Cc: Mark Brown Cc: Jagan Teki Cc: Troy Kisky Cc: linux-hwmon@vger.kernel.org Cc: linux-phy@lists.infradead.org Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Mark Brown Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210713193514.690894-1-robh@kernel.org commit e8917266ae0944385d50da5e691c89f64c5975a3 Author: Rob Herring Date: Tue Jul 13 13:34:53 2021 -0600 dt-bindings: More dropping redundant minItems/maxItems Another round of removing redundant minItems/maxItems from new schema in the recent merge window. If a property has an 'items' list, then a 'minItems' or 'maxItems' with the same size as the list is redundant and can be dropped. Note that is DT schema specific behavior and not standard json-schema behavior. The tooling will fixup the final schema adding any unspecified minItems/maxItems. This condition is partially checked with the meta-schema already, but only if both 'minItems' and 'maxItems' are equal to the 'items' length. An improved meta-schema is pending. Cc: Stephen Boyd Cc: Joerg Roedel Cc: Will Deacon Cc: Krzysztof Kozlowski Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Greg Kroah-Hartman Cc: Sureshkumar Relli Cc: Brian Norris Cc: Kamal Dasu Cc: Linus Walleij Cc: Sebastian Siewior Cc: Laurent Pinchart Cc: linux-clk@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-mtd@lists.infradead.org Cc: linux-rtc@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Greg Kroah-Hartman Acked-by: Alexandre Belloni Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210713193453.690290-1-robh@kernel.org commit d951b2210c1ad2dc08345bb8d97e5a172a15261e Author: Vitaly Kuznetsov Date: Mon Jun 28 12:44:25 2021 +0200 KVM: selftests: smm_test: Test SMM enter from L2 Two additional tests are added: - SMM triggered from L2 does not currupt L1 host state. - Save/restore during SMM triggered from L2 does not corrupt guest/host state. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210628104425.391276-7-vkuznets@redhat.com> Reviewed-by: Maxim Levitsky Signed-off-by: Paolo Bonzini commit bb00bd9c0862558c6528e3ac97470aee222436ef Author: Vitaly Kuznetsov Date: Mon Jun 28 12:44:24 2021 +0200 KVM: nSVM: Restore nested control upon leaving SMM If the VM was migrated while in SMM, no nested state was saved/restored, and therefore svm_leave_smm has to load both save and control area of the vmcb12. Save area is already loaded from HSAVE area, so now load the control area as well from the vmcb12. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210628104425.391276-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 37be407b2ce807179108eeac788805848fe048f1 Author: Vitaly Kuznetsov Date: Mon Jun 28 12:44:23 2021 +0200 KVM: nSVM: Fix L1 state corruption upon return from SMM VMCB split commit 4995a3685f1b ("KVM: SVM: Use a separate vmcb for the nested L2 guest") broke return from SMM when we entered there from guest (L2) mode. Gen2 WS2016/Hyper-V is known to do this on boot. The problem manifests itself like this: kvm_exit: reason EXIT_RSM rip 0x7ffbb280 info 0 0 kvm_emulate_insn: 0:7ffbb280: 0f aa kvm_smm_transition: vcpu 0: leaving SMM, smbase 0x7ffb3000 kvm_nested_vmrun: rip: 0x000000007ffbb280 vmcb: 0x0000000008224000 nrip: 0xffffffffffbbe119 int_ctl: 0x01020000 event_inj: 0x00000000 npt: on kvm_nested_intercepts: cr_read: 0000 cr_write: 0010 excp: 40060002 intercepts: fd44bfeb 0000217f 00000000 kvm_entry: vcpu 0, rip 0xffffffffffbbe119 kvm_exit: reason EXIT_NPF rip 0xffffffffffbbe119 info 200000006 1ab000 kvm_nested_vmexit: vcpu 0 reason npf rip 0xffffffffffbbe119 info1 0x0000000200000006 info2 0x00000000001ab000 intr_info 0x00000000 error_code 0x00000000 kvm_page_fault: address 1ab000 error_code 6 kvm_nested_vmexit_inject: reason EXIT_NPF info1 200000006 info2 1ab000 int_info 0 int_info_err 0 kvm_entry: vcpu 0, rip 0x7ffbb280 kvm_exit: reason EXIT_EXCP_GP rip 0x7ffbb280 info 0 0 kvm_emulate_insn: 0:7ffbb280: 0f aa kvm_inj_exception: #GP (0x0) Note: return to L2 succeeded but upon first exit to L1 its RIP points to 'RSM' instruction but we're not in SMM. The problem appears to be that VMCB01 gets irreversibly destroyed during SMM execution. Previously, we used to have 'hsave' VMCB where regular (pre-SMM) L1's state was saved upon nested_svm_vmexit() but now we just switch to VMCB01 from VMCB02. Pre-split (working) flow looked like: - SMM is triggered during L2's execution - L2's state is pushed to SMRAM - nested_svm_vmexit() restores L1's state from 'hsave' - SMM -> RSM - enter_svm_guest_mode() switches to L2 but keeps 'hsave' intact so we have pre-SMM (and pre L2 VMRUN) L1's state there - L2's state is restored from SMRAM - upon first exit L1's state is restored from L1. This was always broken with regards to svm_get_nested_state()/ svm_set_nested_state(): 'hsave' was never a part of what's being save and restored so migration happening during SMM triggered from L2 would never restore L1's state correctly. Post-split flow (broken) looks like: - SMM is triggered during L2's execution - L2's state is pushed to SMRAM - nested_svm_vmexit() switches to VMCB01 from VMCB02 - SMM -> RSM - enter_svm_guest_mode() switches from VMCB01 to VMCB02 but pre-SMM VMCB01 is already lost. - L2's state is restored from SMRAM - upon first exit L1's state is restored from VMCB01 but it is corrupted (reflects the state during 'RSM' execution). VMX doesn't have this problem because unlike VMCB, VMCS keeps both guest and host state so when we switch back to VMCS02 L1's state is intact there. To resolve the issue we need to save L1's state somewhere. We could've created a third VMCB for SMM but that would require us to modify saved state format. L1's architectural HSAVE area (pointed by MSR_VM_HSAVE_PA) seems appropriate: L0 is free to save any (or none) of L1's state there. Currently, KVM does 'none'. Note, for nested state migration to succeed, both source and destination hypervisors must have the fix. We, however, don't need to create a new flag indicating the fact that HSAVE area is now populated as migration during SMM triggered from L2 was always broken. Fixes: 4995a3685f1b ("KVM: SVM: Use a separate vmcb for the nested L2 guest") Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 0a758290762cf6fb69ad09712ac834cd4f07504f Author: Vitaly Kuznetsov Date: Mon Jun 28 12:44:22 2021 +0200 KVM: nSVM: Introduce svm_copy_vmrun_state() Separate the code setting non-VMLOAD-VMSAVE state from svm_set_nested_state() into its own function. This is going to be re-used from svm_enter_smm()/svm_leave_smm(). Signed-off-by: Vitaly Kuznetsov Message-Id: <20210628104425.391276-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit fb79f566e4c99db8647cf0435e3732f12e856ab0 Author: Vitaly Kuznetsov Date: Mon Jun 28 12:44:21 2021 +0200 KVM: nSVM: Check that VM_HSAVE_PA MSR was set before VMRUN APM states that "The address written to the VM_HSAVE_PA MSR, which holds the address of the page used to save the host state on a VMRUN, must point to a hypervisor-owned page. If this check fails, the WRMSR will fail with a #GP(0) exception. Note that a value of 0 is not considered valid for the VM_HSAVE_PA MSR and a VMRUN that is attempted while the HSAVE_PA is 0 will fail with a #GP(0) exception." svm_set_msr() already checks that the supplied address is valid, so only check for '0' is missing. Add it to nested_svm_vmrun(). Signed-off-by: Vitaly Kuznetsov Message-Id: <20210628104425.391276-3-vkuznets@redhat.com> Reviewed-by: Maxim Levitsky Signed-off-by: Paolo Bonzini commit fce7e152ffc8f89d02a80617b16c7aa1527847c8 Author: Vitaly Kuznetsov Date: Mon Jun 28 12:44:20 2021 +0200 KVM: nSVM: Check the value written to MSR_VM_HSAVE_PA APM states that #GP is raised upon write to MSR_VM_HSAVE_PA when the supplied address is not page-aligned or is outside of "maximum supported physical address for this implementation". page_address_valid() check seems suitable. Also, forcefully page-align the address when it's written from VMM. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210628104425.391276-2-vkuznets@redhat.com> Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky [Add comment about behavior for host-provided values. - Paolo] Signed-off-by: Paolo Bonzini commit c7a1b2b678c54ac19320daf525038d0e2e43ca7c Author: Sean Christopherson Date: Thu May 6 10:58:26 2021 -0700 KVM: SVM: Fix sev_pin_memory() error checks in SEV migration utilities Use IS_ERR() instead of checking for a NULL pointer when querying for sev_pin_memory() failures. sev_pin_memory() always returns an error code cast to a pointer, or a valid pointer; it never returns NULL. Reported-by: Dan Carpenter Cc: Steve Rutherford Cc: Brijesh Singh Cc: Ashish Kalra Fixes: d3d1af85e2c7 ("KVM: SVM: Add KVM_SEND_UPDATE_DATA command") Fixes: 15fb7de1a7f5 ("KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command") Signed-off-by: Sean Christopherson Message-Id: <20210506175826.2166383-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b4a693924aab93f3747465b2261add46c82c3220 Author: Sean Christopherson Date: Thu May 6 10:58:25 2021 -0700 KVM: SVM: Return -EFAULT if copy_to_user() for SEV mig packet header fails Return -EFAULT if copy_to_user() fails; if accessing user memory faults, copy_to_user() returns the number of bytes remaining, not an error code. Reported-by: Dan Carpenter Cc: Steve Rutherford Cc: Brijesh Singh Cc: Ashish Kalra Fixes: d3d1af85e2c7 ("KVM: SVM: Add KVM_SEND_UPDATE_DATA command") Signed-off-by: Sean Christopherson Message-Id: <20210506175826.2166383-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4b639a9f82fcf15497d1613a29aa1df798a24029 Author: Maxim Levitsky Date: Wed Jul 7 15:51:00 2021 +0300 KVM: SVM: add module param to control the #SMI interception In theory there are no side effects of not intercepting #SMI, because then #SMI becomes transparent to the OS and the KVM. Plus an observation on recent Zen2 CPUs reveals that these CPUs ignore #SMI interception and never deliver #SMI VMexits. This is also useful to test nested KVM to see that L1 handles #SMIs correctly in case when L1 doesn't intercept #SMI. Finally the default remains the same, the SMI are intercepted by default thus this patch doesn't have any effect unless non default module param value is used. Signed-off-by: Maxim Levitsky Message-Id: <20210707125100.677203-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 896707c212d440a6863ce0a3930c8a609e24497d Author: Maxim Levitsky Date: Wed Jul 7 15:50:59 2021 +0300 KVM: SVM: remove INIT intercept handler Kernel never sends real INIT even to CPUs, other than on boot. Thus INIT interception is an error which should be caught by a check for an unknown VMexit reason. On top of that, the current INIT VM exit handler skips the current instruction which is wrong. That was added in commit 5ff3a351f687 ("KVM: x86: Move trivial instruction-based exit handlers to common code"). Fixes: 5ff3a351f687 ("KVM: x86: Move trivial instruction-based exit handlers to common code") Signed-off-by: Maxim Levitsky Message-Id: <20210707125100.677203-3-mlevitsk@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 991afbbee8ac93b055a27477278a5fb556af1ff4 Author: Maxim Levitsky Date: Wed Jul 7 15:50:58 2021 +0300 KVM: SVM: #SMI interception must not skip the instruction Commit 5ff3a351f687 ("KVM: x86: Move trivial instruction-based exit handlers to common code"), unfortunately made a mistake of treating nop_on_interception and nop_interception in the same way. Former does truly nothing while the latter skips the instruction. SMI VM exit handler should do nothing. (SMI itself is handled by the host when we do STGI) Fixes: 5ff3a351f687 ("KVM: x86: Move trivial instruction-based exit handlers to common code") Signed-off-by: Maxim Levitsky Message-Id: <20210707125100.677203-2-mlevitsk@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit c0e1303ed4cc9e7ce39f106b471ad92ca559e3d3 Author: Yu Zhang Date: Thu Jul 8 07:57:02 2021 +0800 KVM: VMX: Remove vmx_msr_index from vmx.h vmx_msr_index was used to record the list of MSRs which can be lazily restored when kvm returns to userspace. It is now reimplemented as kvm_uret_msrs_list, a common x86 list which is only used inside x86.c. So just remove the obsolete declaration in vmx.h. Signed-off-by: Yu Zhang Message-Id: <20210707235702.31595-1-yu.c.zhang@linux.intel.com> Signed-off-by: Paolo Bonzini commit f85d40160691881a17a397c448d799dfc90987ba Author: Lai Jiangshan Date: Tue Jun 29 01:26:32 2021 +0800 KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run() When the host is using debug registers but the guest is not using them nor is the guest in guest-debug state, the kvm code does not reset the host debug registers before kvm_x86->run(). Rather, it relies on the hardware vmentry instruction to automatically reset the dr7 registers which ensures that the host breakpoints do not affect the guest. This however violates the non-instrumentable nature around VM entry and exit; for example, when a host breakpoint is set on vcpu->arch.cr2, Another issue is consistency. When the guest debug registers are active, the host breakpoints are reset before kvm_x86->run(). But when the guest debug registers are inactive, the host breakpoints are delayed to be disabled. The host tracing tools may see different results depending on what the guest is doing. To fix the problems, we clear %db7 unconditionally before kvm_x86->run() if the host has set any breakpoints, no matter if the guest is using them or not. Signed-off-by: Lai Jiangshan Message-Id: <20210628172632.81029-1-jiangshanlai@gmail.com> Cc: stable@vger.kernel.org [Only clear %db7 instead of reloading all debug registers. - Paolo] Signed-off-by: Paolo Bonzini commit 6f2f86ec28fb68cf6a342767a35f7b13703aa96f Author: Ricardo Koller Date: Fri Jul 2 13:10:42 2021 -0700 KVM: selftests: Address extra memslot parameters in vm_vaddr_alloc Commit a75a895e6457 ("KVM: selftests: Unconditionally use memslot 0 for vaddr allocations") removed the memslot parameters from vm_vaddr_alloc. It addressed all callers except one under lib/aarch64/, due to a race with commit e3db7579ef35 ("KVM: selftests: Add exception handling support for aarch64") Fix the vm_vaddr_alloc call in lib/aarch64/processor.c. Reported-by: Zenghui Yu Signed-off-by: Ricardo Koller Message-Id: <20210702201042.4036162-1-ricarkol@google.com> Reviewed-by: Eric Auger Signed-off-by: Paolo Bonzini commit 004d62eb4e57db3c391ed0df007cc11c93b6fbeb Author: Pavel Skripkin Date: Thu Jul 1 22:55:00 2021 +0300 kvm: debugfs: fix memory leak in kvm_create_vm_debugfs In commit bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors") loop for filling debugfs_stat_data was copy-pasted 2 times, but in the second loop pointers are saved over pointers allocated in the first loop. All this causes is a memory leak, fix it. Fixes: bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors") Signed-off-by: Pavel Skripkin Reviewed-by: Jing Zhang Message-Id: <20210701195500.27097-1-paskripkin@gmail.com> Reviewed-by: Jing Zhang Signed-off-by: Paolo Bonzini commit d549c66766ee42175e2f4a47219b4103ddab4ffa Author: Thierry Reding Date: Tue Jun 22 13:33:27 2021 +0200 dt-bindings: net: dsa: sja1105: Fix indentation warnings Some of the lines aren't properly indented, causing yamllint to warn about them: .../nxp,sja1105.yaml:70:17: [warning] wrong indentation: expected 18 but found 16 (indentation) Use the proper indentation to fix those warnings. Signed-off-by: Thierry Reding Fixes: 070f5b701d559ae1 ("dt-bindings: net: dsa: sja1105: add SJA1110 bindings") Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210622113327.3613595-1-thierry.reding@gmail.com Signed-off-by: Rob Herring commit 530c4374e21ae750c5fa5aa67b36a97635ddb379 Author: Hu Haowen Date: Sun Jun 20 09:04:44 2021 +0800 docs/zh_CN: add a missing space character "LinusTorvalds" is not pretty. Replace it with "Linus Torvalds". Signed-off-by: Hu Haowen Link: https://lore.kernel.org/r/20210620010444.24813-1-src.res@email.cn Signed-off-by: Jonathan Corbet commit d3fb38266afefc6424d7179c14936c5908d5e2f2 Author: Ingo Molnar Date: Thu Jul 1 13:31:17 2021 +0200 Documentation/features: Add THREAD_INFO_IN_TASK feature matrix Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/YN2nhV5F0hBVNPuX@gmail.com Signed-off-by: Jonathan Corbet commit 842f697776926b06ada93b16658cdd77cc0ef710 Author: Ingo Molnar Date: Thu Jul 1 13:31:52 2021 +0200 Documentation/features: Update the ARCH_HAS_TICK_BROADCAST entry Risc-V gained support recently. Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/YN2nqOVHgGDt4Iid@gmail.com Signed-off-by: Jonathan Corbet commit 21de80b53b3727c33d0771c5a28114be5803d157 Author: Nishanth Menon Date: Fri Jul 2 20:29:31 2021 -0500 LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" A couple of exotic quote characters came in with this license text; they can confuse software that is not expecting non-ASCII text. Switch to normal quotes here, with no changes to the actual license text. Reported-by: Rahul T R Signed-off-by: Nishanth Menon CC: Greg Kroah-Hartman Acked-by: Thomas Gleixner Acked-by: Thorsten Leemhuis Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210703012931.30604-1-nm@ti.com Signed-off-by: Jonathan Corbet commit e44fbdb68049539de9923ce4bad2d277aef54892 Author: Nicholas Piggin Date: Mon Jul 12 11:36:50 2021 +1000 KVM: PPC: Book3S HV P9: Fix guest TM support The conversion to C introduced several bugs in TM handling that can cause host crashes with TM bad thing interrupts. Mostly just simple typos or missed logic in the conversion that got through due to my not testing TM in the guest sufficiently. - Early TM emulation for the softpatch interrupt should be done if fake suspend mode is _not_ active. - Early TM emulation wants to return immediately to the guest so as to not doom transactions unnecessarily. - And if exiting from the guest, the host MSR should include the TM[S] bit if the guest was T/S, before it is treclaimed. After this fix, all the TM selftests pass when running on a P9 processor that implements TM with softpatch interrupt. Fixes: 89d35b2391015 ("KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C") Reported-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210712013650.376325-1-npiggin@gmail.com commit ac34de14ac30ba4484d68f8845a54b6b6c23db42 Author: Lucas Stach Date: Mon Jun 28 23:09:55 2021 +0200 Revert "soc: imx8m: change to use platform driver" With the SoC matching changed to a platform driver the match data is available only after other drivers, which may rely on it are already probed. This breaks at least the CAAM driver on i.MX8M. Revert the change until all those drivers have been audited and changed to be able to eal with match data being available later in the boot process. Fixes: 7d981405d0fd ("soc: imx8m: change to use platform driver") Signed-off-by: Lucas Stach Tested-by: Frieder Schrempf Acked-by: Peng Fan Signed-off-by: Shawn Guo commit f8c2602733c953ed7a16e060640b8e96f9d94b9b Author: Vasily Gorbik Date: Fri Jun 25 23:50:07 2021 +0200 s390/ftrace: fix ftrace_update_ftrace_func implementation s390 enforces DYNAMIC_FTRACE if FUNCTION_TRACER is selected. At the same time implementation of ftrace_caller is not compliant with HAVE_DYNAMIC_FTRACE since it doesn't provide implementation of ftrace_update_ftrace_func() and calls ftrace_trace_function() directly. The subtle difference is that during ftrace code patching ftrace replaces function tracer via ftrace_update_ftrace_func() and activates it back afterwards. Unexpected direct calls to ftrace_trace_function() during ftrace code patching leads to nullptr-dereferences when tracing is activated for one of functions which are used during code patching. Those function currently are: copy_from_kernel_nofault() copy_from_kernel_nofault_allowed() preempt_count_sub() [with debug_defconfig] preempt_count_add() [with debug_defconfig] Corresponding KASAN report: BUG: KASAN: nullptr-dereference in function_trace_call+0x316/0x3b0 Read of size 4 at addr 0000000000001e08 by task migration/0/15 CPU: 0 PID: 15 Comm: migration/0 Tainted: G B 5.13.0-41423-g08316af3644d Hardware name: IBM 3906 M04 704 (LPAR) Stopper: multi_cpu_stop+0x0/0x3e0 <- stop_machine_cpuslocked+0x1e4/0x218 Call Trace: [<0000000001f77caa>] show_stack+0x16a/0x1d0 [<0000000001f8de42>] dump_stack+0x15a/0x1b0 [<0000000001f81d56>] print_address_description.constprop.0+0x66/0x2e0 [<000000000082b0ca>] kasan_report+0x152/0x1c0 [<00000000004cfd8e>] function_trace_call+0x316/0x3b0 [<0000000001fb7082>] ftrace_caller+0x7a/0x7e [<00000000006bb3e6>] copy_from_kernel_nofault_allowed+0x6/0x10 [<00000000006bb42e>] copy_from_kernel_nofault+0x3e/0xd0 [<000000000014605c>] ftrace_make_call+0xb4/0x1f8 [<000000000047a1b4>] ftrace_replace_code+0x134/0x1d8 [<000000000047a6e0>] ftrace_modify_all_code+0x120/0x1d0 [<000000000047a7ec>] __ftrace_modify_code+0x5c/0x78 [<000000000042395c>] multi_cpu_stop+0x224/0x3e0 [<0000000000423212>] cpu_stopper_thread+0x33a/0x5a0 [<0000000000243ff2>] smpboot_thread_fn+0x302/0x708 [<00000000002329ea>] kthread+0x342/0x408 [<00000000001066b2>] __ret_from_fork+0x92/0xf0 [<0000000001fb57fa>] ret_from_fork+0xa/0x30 The buggy address belongs to the page: page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1 flags: 0x1ffff00000001000(reserved|node=0|zone=0|lastcpupid=0x1ffff) raw: 1ffff00000001000 0000040000000048 0000040000000048 0000000000000000 raw: 0000000000000000 0000000000000000 ffffffff00000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: 0000000000001d00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0000000000001d80: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 >0000000000001e00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 ^ 0000000000001e80: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 0000000000001f00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 ================================================================== To fix that introduce ftrace_func callback to be called from ftrace_caller and update it in ftrace_update_ftrace_func(). Fixes: 4cc9bed034d1 ("[S390] cleanup ftrace backend functions") Cc: stable@vger.kernel.org Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 32a19de21ae40f0601f48575b610dde4f518ccc6 Author: Maxime Ripard Date: Wed Jul 7 11:51:10 2021 +0200 drm/vc4: hdmi: Drop devm interrupt handler for CEC interrupts The CEC interrupt handlers are registered through the devm_request_threaded_irq function. However, while free_irq is indeed called properly when the device is unbound or bind fails, it's called after unbind or bind is done. In our particular case, it means that on failure it creates a window where our interrupt handler can be called, but we're freeing every resource (CEC adapter, DRM objects, etc.) it might need. In order to address this, let's switch to the non-devm variant to control better when the handler will be unregistered and allow us to make it safe. Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210707095112.1469670-2-maxime@cerno.tech commit 95edbbf78c3bdbd1daa921dd4a2e61c751e469ba Author: Yang Yingliang Date: Thu Jul 15 15:43:27 2021 +0800 platform/x86: amd-pmc: Fix missing unlock on error in amd_pmc_send_cmd() Add the missing unlock before return from function amd_pmc_send_cmd() in the error handling case. Fixes: 95e1b60f8dc8 ("platform/x86: amd-pmc: Fix command completion code") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210715074327.1966083-1-yangyingliang@huawei.com Signed-off-by: Hans de Goede commit 4a5c155a5ab372516a1a5ddd29473f8f696feb79 Author: Suravee Suthikulpanit Date: Thu Jul 15 04:02:22 2021 +0700 MAINTAINERS: Add Suravee Suthikulpanit as Reviewer for AMD IOMMU (AMD-Vi) To help review changes related to AMD IOMMU. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/1626296542-30454-1-git-send-email-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit aebacb7f6ca1926918734faae14d1f0b6fae5cb7 Author: Nicolas Saenz Julienne Date: Fri Jul 9 16:13:25 2021 +0200 timers: Fix get_next_timer_interrupt() with no timers pending 31cd0e119d50 ("timers: Recalculate next timer interrupt only when necessary") subtly altered get_next_timer_interrupt()'s behaviour. The function no longer consistently returns KTIME_MAX with no timers pending. In order to decide if there are any timers pending we check whether the next expiry will happen NEXT_TIMER_MAX_DELTA jiffies from now. Unfortunately, the next expiry time and the timer base clock are no longer updated in unison. The former changes upon certain timer operations (enqueue, expire, detach), whereas the latter keeps track of jiffies as they move forward. Ultimately breaking the logic above. A simplified example: - Upon entering get_next_timer_interrupt() with: jiffies = 1 base->clk = 0; base->next_expiry = NEXT_TIMER_MAX_DELTA; 'base->next_expiry == base->clk + NEXT_TIMER_MAX_DELTA', the function returns KTIME_MAX. - 'base->clk' is updated to the jiffies value. - The next time we enter get_next_timer_interrupt(), taking into account no timer operations happened: base->clk = 1; base->next_expiry = NEXT_TIMER_MAX_DELTA; 'base->next_expiry != base->clk + NEXT_TIMER_MAX_DELTA', the function returns a valid expire time, which is incorrect. This ultimately might unnecessarily rearm sched's timer on nohz_full setups, and add latency to the system[1]. So, introduce 'base->timers_pending'[2], update it every time 'base->next_expiry' changes, and use it in get_next_timer_interrupt(). [1] See tick_nohz_stop_tick(). [2] A quick pahole check on x86_64 and arm64 shows it doesn't make 'struct timer_base' any bigger. Fixes: 31cd0e119d50 ("timers: Recalculate next timer interrupt only when necessary") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Frederic Weisbecker commit 1a3402d93c73bf6bb4df6d7c2aac35abfc3c50e2 Author: Frederic Weisbecker Date: Thu Jun 3 01:15:59 2021 +0200 posix-cpu-timers: Fix rearm racing against process tick Since the process wide cputime counter is started locklessly from posix_cpu_timer_rearm(), it can be concurrently stopped by operations on other timers from the same thread group, such as in the following unlucky scenario: CPU 0 CPU 1 ----- ----- timer_settime(TIMER B) posix_cpu_timer_rearm(TIMER A) cpu_clock_sample_group() (pct->timers_active already true) handle_posix_cpu_timers() check_process_timers() stop_process_timers() pct->timers_active = false arm_timer(TIMER A) tick -> run_posix_cpu_timers() // sees !pct->timers_active, ignore // our TIMER A Fix this with simply locking process wide cputime counting start and timer arm in the same block. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Frederic Weisbecker Fixes: 60f2ceaa8111 ("posix-cpu-timers: Remove unnecessary locking around cpu_clock_sample_group") Cc: stable@vger.kernel.org Cc: Oleg Nesterov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Eric W. Biederman commit 3ffd3dad4b5d9202c2aff6b7e7d7af7be792f9ed Merge: 8096acd7442e6 776ac63a986d2 Author: David S. Miller Date: Wed Jul 14 14:57:55 2021 -0700 Merge branch 'r8152-pm-fixxes' Takashi Iwai says: ==================== r8152: Fix a couple of PM problems it seems that r8152 driver suffers from the deadlock at both runtime and system PM. Formerly, it was seen more often at hibernation resume, but now it's triggered more frequently, as reported in SUSE Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1186194 While debugging the problem, I stumbled on a few obvious bugs and here is the results with two patches for addressing the resume problem. *** However, the story doesn't end here, unfortunately, and those patches don't seem sufficing. The rest major problem is that the driver calls napi_disable() and napi_enable() in the PM suspend callbacks. This makes the system stalling at (runtime-)suspend. If we drop napi_disable() and napi_enable() calls in the PM suspend callbacks, it starts working (that was the result in Bugzilla comment 13): https://bugzilla.suse.com/show_bug.cgi?id=1186194#c13 So, my patches aren't enough and we still need to investigate further. It'd be appreciated if anyone can give a fix or a hint for more debugging. The usage of napi_disable() at PM callbacks is unique in this driver and looks rather suspicious to me; but I'm no expert in this area so I might be wrong... ==================== Signed-off-by: David S. Miller commit 776ac63a986d211286230c4fd70f85390eabedcd Author: Takashi Iwai Date: Wed Jul 14 19:00:22 2021 +0200 r8152: Fix a deadlock by doubly PM resume r8152 driver sets up the MAC address at reset-resume, while rtl8152_set_mac_address() has the temporary autopm get/put. This may lead to a deadlock as the PM lock has been already taken for the execution of the runtime PM callback. This patch adds the workaround to avoid the superfluous autpm when called from rtl8152_reset_resume(). Link: https://bugzilla.suse.com/show_bug.cgi?id=1186194 Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 9c23aa51477a37f8b56c3c40192248db0663c196 Author: Takashi Iwai Date: Wed Jul 14 19:00:21 2021 +0200 r8152: Fix potential PM refcount imbalance rtl8152_close() takes the refcount via usb_autopm_get_interface() but it doesn't release when RTL8152_UNPLUG test hits. This may lead to the imbalance of PM refcount. This patch addresses it. Link: https://bugzilla.suse.com/show_bug.cgi?id=1186194 Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 23e9592b06b43cea4d6799843795beca13437907 Author: Alex Hung Date: Sat Jul 10 13:08:10 2021 -0600 platform/x86: wireless-hotkey: remove hardcoded "hp" from the error message This driver is no longer specific to HP laptops so "hp" in the error message is no longer applicable. Signed-off-by: Alex Hung Link: https://lore.kernel.org/r/20210710190810.313104-1-alex.hung@canonical.com Signed-off-by: Hans de Goede commit 775da83005cb61d4c213c636df9337da05714ff1 Author: Jinzhou Su Date: Tue Jul 13 09:26:11 2021 +0800 drm/amdgpu: add another Renoir DID Add new PCI device id. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.11.x commit 83d1fc92d4cdd1ea2d229347ddf11ea2aa751059 Author: James Clark Date: Thu Jun 24 17:43:02 2021 +0100 perf cs-etm: Split Coresight decode by aux records Populate the auxtrace queues using AUX records rather than whole auxtrace buffers so that the decoder is reset between each aux record. This is similar to the auxtrace_queues__process_index() -> auxtrace_queues__add_indexed_event() flow where perf_session__peek_event() is used to read AUXTRACE events out of random positions in the file based on the auxtrace index. But now we loop over all PERF_RECORD_AUX events instead of AUXTRACE buffers. For each PERF_RECORD_AUX event, we find the corresponding AUXTRACE buffer using the index, and add a fragment of that buffer to the auxtrace queues. No other changes to decoding were made, apart from populating the auxtrace queues. The result of decoding is identical to before, except in cases where decoding failed completely, due to not resetting the decoder. The reason for this change is because AUX records are emitted any time tracing is disabled, for example when the process is scheduled out. Because ETM was disabled and enabled again, the decoder also needs to be reset to force the search for a sync packet. Otherwise there would be fatal decoding errors. Testing ======= Testing was done with the following script, to diff the decoding results between the patched and un-patched versions of perf: #!/bin/bash set -ex $1 script -i $3 $4 > split.script $2 script -i $3 $4 > default.script diff split.script default.script | head -n 20 And it was run like this, with various itrace options depending on the quantity of synthesised events: compare.sh ./perf-patched ./perf-default perf-per-cpu-2-threads.data --itrace=i100000ns No changes in output were observed in the following scenarios: * Simple per-cpu perf record -e cs_etm/@tmc_etr0/u top * Per-thread, single thread perf record -e cs_etm/@tmc_etr0/u --per-thread ./threads_C * Per-thread multiple threads (but only one thread collected data): perf record -e cs_etm/@tmc_etr0/u --per-thread --pid 4596,4597 * Per-thread multiple threads (both threads collected data): perf record -e cs_etm/@tmc_etr0/u --per-thread --pid 4596,4597 * Per-cpu explicit threads: perf record -e cs_etm/@tmc_etr0/u --pid 853,854 * System-wide (per-cpu): perf record -e cs_etm/@tmc_etr0/u -a * No data collected (no aux buffers) Can happen with any command when run for a short period * Containing truncated records Can happen with any command * Containing aux records with 0 size Can happen with any command * Snapshot mode (various files with and without buffer wrap) perf record -e cs_etm/@tmc_etr0/u -a --snapshot Some differences were observed in the following scenario: * Snapshot mode (with duplicate buffers) perf record -e cs_etm/@tmc_etr0/u -a --snapshot Fewer samples are generated in snapshot mode if duplicate buffers were gathered because buffers with the same offset are now only added once. This gives different, but more correct results and no duplicate data is decoded any more. Signed-off-by: James Clark Reviewed-by: Mathieu Poirier Tested-by: Leo Yan Cc: Al Grant Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210624164303.28632-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit fa2c02e5798c17c89cbb3135940086ebe07e5c9f Author: Arnaldo Carvalho de Melo Date: Wed Jul 14 14:28:02 2021 -0300 tools headers: Remove broken definition of __LITTLE_ENDIAN The linux/kconfig.h file was copied from the kernel but the line where with the generated/autoconf.h include from where the CONFIG_ entries would come from was deleted, as tools/ build system don't create that file, so we ended up always defining just __LITTLE_ENDIAN as CONFIG_CPU_BIG_ENDIAN was nowhere to be found. This in turn ended up breaking the build in some systems where __LITTLE_ENDIAN was already defined, such as the androind NDK. So just ditch that block that depends on the CONFIG_CPU_BIG_ENDIAN define. The kconfig.h file was copied just to get IS_ENABLED() and a 'make -C tools/all' doesn't breaks with this removal. Fixes: 93281c4a96572a34 ("x86/insn: Add an insn_decode() API") Cc: Adrian Hunter Cc: Borislav Petkov Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/YO8hK7lqJcIWuBzx@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 10252bae863d09b9648bed2e035572d207200ca1 Author: Stephen Boyd Date: Wed Jun 23 00:50:02 2021 -0700 mmc: core: Don't allocate IDA for OF aliases There's a chance that the IDA allocated in mmc_alloc_host() is not freed for some time because it's freed as part of a class' release function (see mmc_host_classdev_release() where the IDA is freed). If another thread is holding a reference to the class, then only once all balancing device_put() calls (in turn calling kobject_put()) have been made will the IDA be released and usable again. Normally this isn't a problem because the kobject is released before anything else that may want to use the same number tries to again, but with CONFIG_DEBUG_KOBJECT_RELEASE=y and OF aliases it becomes pretty easy to try to allocate an alias from the IDA twice while the first time it was allocated is still pending a call to ida_simple_remove(). It's also possible to trigger it by using CONFIG_DEBUG_KOBJECT_RELEASE and probe defering a driver at boot that calls mmc_alloc_host() before trying to get resources that may defer likes clks or regulators. Instead of allocating from the IDA in this scenario, let's just skip it if we know this is an OF alias. The number is already "claimed" and devices that aren't using OF aliases won't try to use the claimed numbers anyway (see mmc_first_nonreserved_index()). This should avoid any issues with mmc_alloc_host() returning failures from the ida_simple_get() in the case that we're using an OF alias. Cc: Matthias Schiffer Cc: Sujit Kautkar Reported-by: Zubin Mithra Fixes: fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210623075002.1746924-3-swboyd@chromium.org Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit edb25572fc7058db5a98223e11d2d50497178553 Author: Stephen Boyd Date: Wed Jun 23 00:50:01 2021 -0700 mmc: core: Use kref in place of struct mmc_blk_data::usage Ulf reported the following KASAN splat after adding some manual hacks into mmc-utils[1]. DEBUG: mmc_blk_open: Let's sleep for 10s.. mmc1: card 0007 removed BUG: KASAN: use-after-free in mmc_blk_get+0x58/0xb8 Read of size 4 at addr ffff00000a394a28 by task mmc/180 CPU: 2 PID: 180 Comm: mmc Not tainted 5.10.0-rc4-00069-gcc758c8c7127-dirty #5 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Call trace: dump_backtrace+0x0/0x2b4 show_stack+0x18/0x6c dump_stack+0xfc/0x168 print_address_description.constprop.0+0x6c/0x488 kasan_report+0x118/0x210 __asan_load4+0x94/0xd0 mmc_blk_get+0x58/0xb8 mmc_blk_open+0x7c/0xdc __blkdev_get+0x3b4/0x964 blkdev_get+0x64/0x100 blkdev_open+0xe8/0x104 do_dentry_open+0x234/0x61c vfs_open+0x54/0x64 path_openat+0xe04/0x1584 do_filp_open+0xe8/0x1e4 do_sys_openat2+0x120/0x230 __arm64_sys_openat+0xf0/0x15c el0_svc_common.constprop.0+0xac/0x234 do_el0_svc+0x84/0xa0 el0_sync_handler+0x264/0x270 el0_sync+0x174/0x180 Allocated by task 33: stack_trace_save+0x9c/0xdc kasan_save_stack+0x28/0x60 __kasan_kmalloc.constprop.0+0xc8/0xf0 kasan_kmalloc+0x10/0x20 mmc_blk_alloc_req+0x94/0x4b0 mmc_blk_probe+0x2d4/0xaa4 mmc_bus_probe+0x34/0x4c really_probe+0x148/0x6e0 driver_probe_device+0x78/0xec __device_attach_driver+0x108/0x16c bus_for_each_drv+0xf4/0x15c __device_attach+0x168/0x240 device_initial_probe+0x14/0x20 bus_probe_device+0xec/0x100 device_add+0x55c/0xaf0 mmc_add_card+0x288/0x380 mmc_attach_sd+0x18c/0x22c mmc_rescan+0x444/0x4f0 process_one_work+0x3b8/0x650 worker_thread+0xa0/0x724 kthread+0x218/0x220 ret_from_fork+0x10/0x38 Freed by task 33: stack_trace_save+0x9c/0xdc kasan_save_stack+0x28/0x60 kasan_set_track+0x28/0x40 kasan_set_free_info+0x24/0x4c __kasan_slab_free+0x100/0x180 kasan_slab_free+0x14/0x20 kfree+0xb8/0x46c mmc_blk_put+0xe4/0x11c mmc_blk_remove_req.part.0+0x6c/0xe4 mmc_blk_remove+0x368/0x370 mmc_bus_remove+0x34/0x50 __device_release_driver+0x228/0x31c device_release_driver+0x2c/0x44 bus_remove_device+0x1e4/0x200 device_del+0x2b0/0x770 mmc_remove_card+0xf0/0x150 mmc_sd_detect+0x9c/0x150 mmc_rescan+0x110/0x4f0 process_one_work+0x3b8/0x650 worker_thread+0xa0/0x724 kthread+0x218/0x220 ret_from_fork+0x10/0x38 The buggy address belongs to the object at ffff00000a394800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 552 bytes inside of 1024-byte region [ffff00000a394800, ffff00000a394c00) The buggy address belongs to the page: page:00000000ff84ed53 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8a390 head:00000000ff84ed53 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x3fffc0000010200(slab|head) raw: 03fffc0000010200 dead000000000100 dead000000000122 ffff000009f03800 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff00000a394900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff00000a394980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff00000a394a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff00000a394a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff00000a394b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Looking closer at the problem, it looks like a classic dangling pointer bug. The 'struct mmc_blk_data' that is used after being freed in mmc_blk_put() is stashed away in 'md->disk->private_data' via mmc_blk_alloc_req() but used in mmc_blk_get() because the 'usage' count isn't properly aligned with the lifetime of the pointer. You'd expect the 'usage' member to be in sync with the kfree(), and it mostly is, except that mmc_blk_get() needs to dereference the potentially freed memory storage for the 'struct mmc_blk_data' stashed away in the private_data member to look at 'usage' before it actually figures out if it wants to consider it a valid pointer or not. That's not going to work if the freed memory has been overwritten by something else after the free, and KASAN rightly complains here. To fix the immediate problem, let's set the private_data member to NULL in mmc_blk_put() so that mmc_blk_get() can consider the object "on the way out" if the pointer is NULL and not even try to look at 'usage' if the object isn't going to be around much longer. With that set to NULL on the last mmc_blk_put(), optimize the get path further and use a kref underneath the 'open_lock' mutex to only up the reference count if it's non-zero, i.e. alive, and otherwise make mmc_blk_get() return NULL, without actually testing the reference count if we're in the process of removing the object from the system. Finally, tighten the locking region on the put side to only be around the parts that are removing the 'mmc_blk_data' from the system and publishing that fact to the gendisk and then drop the lock as soon as we can to avoid holding the lock around code that doesn't need it. This fixes the KASAN issue. Cc: Matthias Schiffer Cc: Sujit Kautkar Cc: Zubin Mithra Reported-by: Ulf Hansson Link: https://lore.kernel.org/linux-mmc/CAPDyKFryT63Jc7+DXWSpAC19qpZRqFr1orxwYGMuSqx247O8cQ@mail.gmail.com/ [1] Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210623075002.1746924-2-swboyd@chromium.org Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 8096acd7442e613fad0354fc8dfdb2003cceea0b Merge: d1d488d813703 bcb9928a15544 Author: Linus Torvalds Date: Wed Jul 14 09:24:32 2021 -0700 Merge tag 'net-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski. "Including fixes from bpf and netfilter. Current release - regressions: - sock: fix parameter order in sock_setsockopt() Current release - new code bugs: - netfilter: nft_last: - fix incorrect arithmetic when restoring last used - honor NFTA_LAST_SET on restoration Previous releases - regressions: - udp: properly flush normal packet at GRO time - sfc: ensure correct number of XDP queues; don't allow enabling the feature if there isn't sufficient resources to Tx from any CPU - dsa: sja1105: fix address learning getting disabled on the CPU port - mptcp: addresses a rmem accounting issue that could keep packets in subflow receive buffers longer than necessary, delaying MPTCP-level ACKs - ip_tunnel: fix mtu calculation for ETHER tunnel devices - do not reuse skbs allocated from skbuff_fclone_cache in the napi skb cache, we'd try to return them to the wrong slab cache - tcp: consistently disable header prediction for mptcp Previous releases - always broken: - bpf: fix subprog poke descriptor tracking use-after-free - ipv6: - allocate enough headroom in ip6_finish_output2() in case iptables TEE is used - tcp: drop silly ICMPv6 packet too big messages to avoid expensive and pointless lookups (which may serve as a DDOS vector) - make sure fwmark is copied in SYNACK packets - fix 'disable_policy' for forwarded packets (align with IPv4) - netfilter: conntrack: - do not renew entry stuck in tcp SYN_SENT state - do not mark RST in the reply direction coming after SYN packet for an out-of-sync entry - mptcp: cleanly handle error conditions with MP_JOIN and syncookies - mptcp: fix double free when rejecting a join due to port mismatch - validate lwtstate->data before returning from skb_tunnel_info() - tcp: call sk_wmem_schedule before sk_mem_charge in zerocopy path - mt76: mt7921: continue to probe driver when fw already downloaded - bonding: fix multiple issues with offloading IPsec to (thru?) bond - stmmac: ptp: fix issues around Qbv support and setting time back - bcmgenet: always clear wake-up based on energy detection Misc: - sctp: move 198 addresses from unusable to private scope - ptp: support virtual clocks and timestamping - openvswitch: optimize operation for key comparison" * tag 'net-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (158 commits) net: dsa: properly check for the bridge_leave methods in dsa_switch_bridge_leave() sfc: add logs explaining XDP_TX/REDIRECT is not available sfc: ensure correct number of XDP queues sfc: fix lack of XDP TX queues - error XDP TX failed (-22) net: fddi: fix UAF in fza_probe net: dsa: sja1105: fix address learning getting disabled on the CPU port net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload net: Use nlmsg_unicast() instead of netlink_unicast() octeontx2-pf: Fix uninitialized boolean variable pps ipv6: allocate enough headroom in ip6_finish_output2() net: hdlc: rename 'mod_init' & 'mod_exit' functions to be module-specific net: bridge: multicast: fix MRD advertisement router port marking race net: bridge: multicast: fix PIM hello router port marking race net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340 dsa: fix for_each_child.cocci warnings virtio_net: check virtqueue_add_sgs() return value mptcp: properly account bulk freed memory selftests: mptcp: fix case multiple subflows limited by server mptcp: avoid processing packet if a subflow reset mptcp: fix syncookie process if mptcp can not_accept new subflow ... commit d1d488d813703618f0dd93f0e4c4a05928114aa8 Author: Christian Brauner Date: Wed Jul 14 15:47:50 2021 +0200 fs: add vfs_parse_fs_param_source() helper Add a simple helper that filesystems can use in their parameter parser to parse the "source" parameter. A few places open-coded this function and that already caused a bug in the cgroup v1 parser that we fixed. Let's make it harder to get this wrong by introducing a helper which performs all necessary checks. Link: https://syzkaller.appspot.com/bug?id=6312526aba5beae046fdae8f00399f87aab48b12 Cc: Christoph Hellwig Cc: Alexander Viro Cc: Dmitry Vyukov Signed-off-by: Christian Brauner Signed-off-by: Linus Torvalds commit 3b0462726e7ef281c35a7a4ae33e93ee2bc9975b Author: Christian Brauner Date: Wed Jul 14 15:47:49 2021 +0200 cgroup: verify that source is a string The following sequence can be used to trigger a UAF: int fscontext_fd = fsopen("cgroup"); int fd_null = open("/dev/null, O_RDONLY); int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null); close_range(3, ~0U, 0); The cgroup v1 specific fs parser expects a string for the "source" parameter. However, it is perfectly legitimate to e.g. specify a file descriptor for the "source" parameter. The fs parser doesn't know what a filesystem allows there. So it's a bug to assume that "source" is always of type fs_value_is_string when it can reasonably also be fs_value_is_file. This assumption in the cgroup code causes a UAF because struct fs_parameter uses a union for the actual value. Access to that union is guarded by the param->type member. Since the cgroup paramter parser didn't check param->type but unconditionally moved param->string into fc->source a close on the fscontext_fd would trigger a UAF during put_fs_context() which frees fc->source thereby freeing the file stashed in param->file causing a UAF during a close of the fd_null. Fix this by verifying that param->type is actually a string and report an error if not. In follow up patches I'll add a new generic helper that can be used here and by other filesystems instead of this error-prone copy-pasta fix. But fixing it in here first makes backporting a it to stable a lot easier. Fixes: 8d2451f4994f ("cgroup1: switch to option-by-option parsing") Reported-by: syzbot+283ce5a46486d6acdbaf@syzkaller.appspotmail.com Cc: Christoph Hellwig Cc: Alexander Viro Cc: Dmitry Vyukov Cc: Cc: syzkaller-bugs Signed-off-by: Christian Brauner Signed-off-by: Linus Torvalds commit 7234c362ccb3c2228f06f19f93b132de9cfa7ae4 Author: Like Xu Date: Mon Jun 28 15:43:54 2021 +0800 KVM: x86/pmu: Clear anythread deprecated bit when 0xa leaf is unsupported on the SVM The AMD platform does not support the functions Ah CPUID leaf. The returned results for this entry should all remain zero just like the native does: AMD host: 0x0000000a 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 (uncanny) AMD guest: 0x0000000a 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00008000 Fixes: cadbaa039b99 ("perf/x86/intel: Make anythread filter support conditional") Signed-off-by: Like Xu Message-Id: <20210628074354.33848-1-likexu@tencent.com> Signed-off-by: Paolo Bonzini commit 23fa2e46a5556f787ce2ea1a315d3ab93cced204 Author: Kefeng Wang Date: Sat Jun 26 15:03:04 2021 +0800 KVM: mmio: Fix use-after-free Read in kvm_vm_ioctl_unregister_coalesced_mmio BUG: KASAN: use-after-free in kvm_vm_ioctl_unregister_coalesced_mmio+0x7c/0x1ec arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.c:183 Read of size 8 at addr ffff0000c03a2500 by task syz-executor083/4269 CPU: 5 PID: 4269 Comm: syz-executor083 Not tainted 5.10.0 #7 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x2d0 arch/arm64/kernel/stacktrace.c:132 show_stack+0x28/0x34 arch/arm64/kernel/stacktrace.c:196 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x110/0x164 lib/dump_stack.c:118 print_address_description+0x78/0x5c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report+0x148/0x1e4 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:183 [inline] __asan_load8+0xb4/0xbc mm/kasan/generic.c:252 kvm_vm_ioctl_unregister_coalesced_mmio+0x7c/0x1ec arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.c:183 kvm_vm_ioctl+0xe30/0x14c4 arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3755 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __arm64_sys_ioctl+0xf88/0x131c fs/ioctl.c:739 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall arch/arm64/kernel/syscall.c:48 [inline] el0_svc_common arch/arm64/kernel/syscall.c:158 [inline] do_el0_svc+0x120/0x290 arch/arm64/kernel/syscall.c:220 el0_svc+0x1c/0x28 arch/arm64/kernel/entry-common.c:367 el0_sync_handler+0x98/0x170 arch/arm64/kernel/entry-common.c:383 el0_sync+0x140/0x180 arch/arm64/kernel/entry.S:670 Allocated by task 4269: stack_trace_save+0x80/0xb8 kernel/stacktrace.c:121 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0xdc/0x120 mm/kasan/common.c:461 kasan_kmalloc+0xc/0x14 mm/kasan/common.c:475 kmem_cache_alloc_trace include/linux/slab.h:450 [inline] kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] kvm_vm_ioctl_register_coalesced_mmio+0x78/0x1cc arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.c:146 kvm_vm_ioctl+0x7e8/0x14c4 arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3746 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __arm64_sys_ioctl+0xf88/0x131c fs/ioctl.c:739 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall arch/arm64/kernel/syscall.c:48 [inline] el0_svc_common arch/arm64/kernel/syscall.c:158 [inline] do_el0_svc+0x120/0x290 arch/arm64/kernel/syscall.c:220 el0_svc+0x1c/0x28 arch/arm64/kernel/entry-common.c:367 el0_sync_handler+0x98/0x170 arch/arm64/kernel/entry-common.c:383 el0_sync+0x140/0x180 arch/arm64/kernel/entry.S:670 Freed by task 4269: stack_trace_save+0x80/0xb8 kernel/stacktrace.c:121 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x38/0x6c mm/kasan/common.c:56 kasan_set_free_info+0x20/0x40 mm/kasan/generic.c:355 __kasan_slab_free+0x124/0x150 mm/kasan/common.c:422 kasan_slab_free+0x10/0x1c mm/kasan/common.c:431 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook mm/slub.c:1577 [inline] slab_free mm/slub.c:3142 [inline] kfree+0x104/0x38c mm/slub.c:4124 coalesced_mmio_destructor+0x94/0xa4 arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.c:102 kvm_iodevice_destructor include/kvm/iodev.h:61 [inline] kvm_io_bus_unregister_dev+0x248/0x280 arch/arm64/kvm/../../../virt/kvm/kvm_main.c:4374 kvm_vm_ioctl_unregister_coalesced_mmio+0x158/0x1ec arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.c:186 kvm_vm_ioctl+0xe30/0x14c4 arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3755 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __arm64_sys_ioctl+0xf88/0x131c fs/ioctl.c:739 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall arch/arm64/kernel/syscall.c:48 [inline] el0_svc_common arch/arm64/kernel/syscall.c:158 [inline] do_el0_svc+0x120/0x290 arch/arm64/kernel/syscall.c:220 el0_svc+0x1c/0x28 arch/arm64/kernel/entry-common.c:367 el0_sync_handler+0x98/0x170 arch/arm64/kernel/entry-common.c:383 el0_sync+0x140/0x180 arch/arm64/kernel/entry.S:670 If kvm_io_bus_unregister_dev() return -ENOMEM, we already call kvm_iodevice_destructor() inside this function to delete 'struct kvm_coalesced_mmio_dev *dev' from list and free the dev, but kvm_iodevice_destructor() is called again, it will lead the above issue. Let's check the the return value of kvm_io_bus_unregister_dev(), only call kvm_iodevice_destructor() if the return value is 0. Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Message-Id: <20210626070304.143456-1-wangkefeng.wang@huawei.com> Cc: stable@vger.kernel.org Fixes: 5d3c4c79384a ("KVM: Stop looking for coalesced MMIO zones if the bus is destroyed", 2021-04-20) Signed-off-by: Paolo Bonzini commit 76ff371b67cb12fb635396234468abcf6a466f16 Author: Sean Christopherson Date: Thu Jun 24 19:03:54 2021 -0700 KVM: SVM: Revert clearing of C-bit on GPA in #NPF handler Don't clear the C-bit in the #NPF handler, as it is a legal GPA bit for non-SEV guests, and for SEV guests the C-bit is dropped before the GPA hits the NPT in hardware. Clearing the bit for non-SEV guests causes KVM to mishandle #NPFs with that collide with the host's C-bit. Although the APM doesn't explicitly state that the C-bit is not reserved for non-SEV, Tom Lendacky confirmed that the following snippet about the effective reduction due to the C-bit does indeed apply only to SEV guests. Note that because guest physical addresses are always translated through the nested page tables, the size of the guest physical address space is not impacted by any physical address space reduction indicated in CPUID 8000_001F[EBX]. If the C-bit is a physical address bit however, the guest physical address space is effectively reduced by 1 bit. And for SEV guests, the APM clearly states that the bit is dropped before walking the nested page tables. If the C-bit is an address bit, this bit is masked from the guest physical address when it is translated through the nested page tables. Consequently, the hypervisor does not need to be aware of which pages the guest has chosen to mark private. Note, the bogus C-bit clearing was removed from legacy #PF handler in commit 6d1b867d0456 ("KVM: SVM: Don't strip the C-bit from CR2 on #PF interception"). Fixes: 0ede79e13224 ("KVM: SVM: Clear C-bit from the page fault address") Cc: Peter Gonda Cc: Brijesh Singh Cc: Tom Lendacky Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210625020354.431829-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fc9bf2e087efcd81bda2e52d09616d2a1bf982a8 Author: Sean Christopherson Date: Wed Jun 23 16:05:49 2021 -0700 KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs Ignore "dynamic" host adjustments to the physical address mask when generating the masks for guest PTEs, i.e. the guest PA masks. The host physical address space and guest physical address space are two different beasts, e.g. even though SEV's C-bit is the same bit location for both host and guest, disabling SME in the host (which clears shadow_me_mask) does not affect the guest PTE->GPA "translation". For non-SEV guests, not dropping bits is the correct behavior. Assuming KVM and userspace correctly enumerate/configure guest MAXPHYADDR, bits that are lost as collateral damage from memory encryption are treated as reserved bits, i.e. KVM will never get to the point where it attempts to generate a gfn using the affected bits. And if userspace wants to create a bogus vCPU, then userspace gets to deal with the fallout of hardware doing odd things with bad GPAs. For SEV guests, not dropping the C-bit is technically wrong, but it's a moot point because KVM can't read SEV guest's page tables in any case since they're always encrypted. Not to mention that the current KVM code is also broken since sme_me_mask does not have to be non-zero for SEV to be supported by KVM. The proper fix would be to teach all of KVM to correctly handle guest private memory, but that's a task for the future. Fixes: d0ec49d4de90 ("kvm/x86/svm: Support Secure Memory Encryption within KVM") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210623230552.4027702-5-seanjc@google.com> [Use a new header instead of adding header guards to paging_tmpl.h. - Paolo] Signed-off-by: Paolo Bonzini commit e39f00f60ebd2e7b295c37a05e6349df656d3eb8 Author: Sean Christopherson Date: Wed Jun 23 16:05:47 2021 -0700 KVM: x86: Use kernel's x86_phys_bits to handle reduced MAXPHYADDR Use boot_cpu_data.x86_phys_bits instead of the raw CPUID information to enumerate the MAXPHYADDR for KVM guests when TDP is disabled (the guest version is only relevant to NPT/TDP). When using shadow paging, any reductions to the host's MAXPHYADDR apply to KVM and its guests as well, i.e. using the raw CPUID info will cause KVM to misreport the number of PA bits available to the guest. Unconditionally zero out the "Physical Address bit reduction" entry. For !TDP, the adjustment is already done, and for TDP enumerating the host's reduction is wrong as the reduction does not apply to GPAs. Fixes: 9af9b94068fb ("x86/cpu/AMD: Handle SME reduction in physical address size") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210623230552.4027702-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4bf48e3c0aafd32b960d341c4925b48f416f14a5 Author: Sean Christopherson Date: Wed Jun 23 16:05:46 2021 -0700 KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled Ignore the guest MAXPHYADDR reported by CPUID.0x8000_0008 if TDP, i.e. NPT, is disabled, and instead use the host's MAXPHYADDR. Per AMD'S APM: Maximum guest physical address size in bits. This number applies only to guests using nested paging. When this field is zero, refer to the PhysAddrSize field for the maximum guest physical address size. Fixes: 24c82e576b78 ("KVM: Sanitize cpuid") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210623230552.4027702-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f0414b078dd11641a7a64027c2741396f47718fd Author: Sean Christopherson Date: Thu Jun 24 17:18:53 2021 -0700 Revert "KVM: x86: WARN and reject loading KVM if NX is supported but not enabled" Let KVM load if EFER.NX=0 even if NX is supported, the analysis and testing (or lack thereof) for the non-PAE host case was garbage. If the kernel won't be using PAE paging, .Ldefault_entry in head_32.S skips over the entire EFER sequence. Hopefully that can be changed in the future to allow KVM to require EFER.NX, but the motivation behind KVM's requirement isn't yet merged. Reverting and revisiting the mess at a later date is by far the safest approach. This reverts commit 8bbed95d2cb6e5de8a342d761a89b0a04faed7be. Fixes: 8bbed95d2cb6 ("KVM: x86: WARN and reject loading KVM if NX is supported but not enabled") Signed-off-by: Sean Christopherson Message-Id: <20210625001853.318148-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f8f0edabcc09fafd695ed2adc0eb825104e35d5c Author: Marc Zyngier Date: Thu Jul 1 08:19:28 2021 +0100 KVM: selftests: x86: Address missing vm_install_exception_handler conversions Commit b78f4a59669 ("KVM: selftests: Rename vm_handle_exception") raced with a couple of new x86 tests, missing two vm_handle_exception to vm_install_exception_handler conversions. Help the two broken tests to catch up with the new world. Cc: Andrew Jones CC: Ricardo Koller Cc: Paolo Bonzini Signed-off-by: Marc Zyngier Message-Id: <20210701071928.2971053-1-maz@kernel.org> Reviewed-by: Andrew Jones Reviewed-by: Ricardo Koller Signed-off-by: Paolo Bonzini commit f3cf800778e9e76b2387d00c9bfbc2e16efdb7ed Merge: b8917b4ae44d1 cd4220d23bf3f Author: Paolo Bonzini Date: Thu Jul 8 13:15:57 2021 -0400 Merge tag 'kvm-s390-master-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: selftests: Fixes - provide memory model for IBM z196 and zEC12 - do not require 64GB of memory commit b7eb335e26a9c7f258c96b3962c283c379d3ede0 Author: Gustavo A. R. Silva Date: Mon Jul 12 00:57:54 2021 -0500 Makefile: Enable -Wimplicit-fallthrough for Clang With the recent fixes for fallthrough warnings, it is now possible to enable -Wimplicit-fallthrough for Clang. It's important to mention that since we have adopted the use of the pseudo-keyword macro fallthrough; we also want to avoid having more /* fall through */ comments being introduced. Notice that contrary to GCC, Clang doesn't recognize any comments as implicit fall-through markings when the -Wimplicit-fallthrough option is enabled. So, in order to avoid having more comments being introduced, we have to use the option -Wimplicit-fallthrough=5 for GCC, which similar to Clang, will cause a warning in case a code comment is intended to be used as a fall-through marking. Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit 104aba8dd7dca85d82e94aba07e71994ccdaf4cf Author: Gustavo A. R. Silva Date: Wed Jul 14 11:10:40 2021 -0500 powerpc/smp: Fix fall-through warning for Clang Fix the following fallthrough warning: arch/powerpc/platforms/powermac/smp.c:149:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60ef0750.I8J+C6KAtb0xVOAa%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 64752a95b702817602d72f109ceaf5ec0780e283 Author: Takashi Iwai Date: Wed Jul 14 10:48:36 2021 +0200 ALSA: usb-audio: Add missing proc text entry for BESPOKEN type Recently we've added a new usb_mixer element type, USB_MIXER_BESPOKEN, but it wasn't added in the table in snd_usb_mixer_dump_cval(). This is no big problem since each bespoken type should have its own dump method, but it still isn't disallowed to use the standard one, so we should cover it as well. Along with it, define the table with the explicit array initializer for avoiding other pitfalls. Fixes: 785b6f29a795 ("ALSA: usb-audio: scarlett2: Fix wrong resume call") Reported-by: Pavel Machek Cc: Link: https://lore.kernel.org/r/20210714084836.1977-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d08c84e01afa7a7eee6badab25d5420fa847f783 Author: Arnaldo Carvalho de Melo Date: Wed Jul 14 13:06:38 2021 -0300 perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE) In fedora rawhide the PTHREAD_STACK_MIN define may end up expanded to a sysconf() call, and that will return 'long int', breaking the build: 45 fedora:rawhide : FAIL gcc version 11.1.1 20210623 (Red Hat 11.1.1-6) (GCC) builtin-sched.c: In function 'create_tasks': /git/perf-5.14.0-rc1/tools/include/linux/kernel.h:43:24: error: comparison of distinct pointer types lacks a cast [-Werror] 43 | (void) (&_max1 == &_max2); \ | ^~ builtin-sched.c:673:34: note: in expansion of macro 'max' 673 | (size_t) max(16 * 1024, PTHREAD_STACK_MIN)); | ^~~ cc1: all warnings being treated as errors $ grep __sysconf /usr/include/*/*.h /usr/include/bits/pthread_stack_min-dynamic.h:extern long int __sysconf (int __name) __THROW; /usr/include/bits/pthread_stack_min-dynamic.h:# define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE) /usr/include/bits/time.h:extern long int __sysconf (int); /usr/include/bits/time.h:# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ $ So cast it to int to cope with that. Signed-off-by: Arnaldo Carvalho de Melo commit afbd0d299289a0faaa605af74982f87ad75468fc Author: Gustavo A. R. Silva Date: Wed Jul 14 11:05:55 2021 -0500 dmaengine: mpc512x: Fix fall-through warning for Clang Fix the following fallthrough warning (powerpc-randconfig): drivers/dma/mpc512x_dma.c:816:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60ef0750.I8J+C6KAtb0xVOAa%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 14158aa4510439c611759d57b74ac01ebcca0081 Author: Gustavo A. R. Silva Date: Wed Jul 14 11:02:37 2021 -0500 usb: gadget: fsl_qe_udc: Fix fall-through warning for Clang Fix the following fallthrough warning (powerpc-randconfig): drivers/usb/gadget/udc/fsl_qe_udc.c:589:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60ef0750.I8J+C6KAtb0xVOAa%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 9e5c772954406829e928dbe59891d08938ead04b Author: Zheyu Ma Date: Wed Jul 14 14:54:19 2021 +0000 drm/ttm: add a check against null pointer dereference When calling ttm_range_man_fini(), 'man' may be uninitialized, which may cause a null pointer dereference bug. Fix this by checking if it is a null pointer. This log reveals it: [ 7.902580 ] BUG: kernel NULL pointer dereference, address: 0000000000000058 [ 7.905721 ] RIP: 0010:ttm_range_man_fini+0x40/0x160 [ 7.911826 ] Call Trace: [ 7.911826 ] radeon_ttm_fini+0x167/0x210 [ 7.911826 ] radeon_bo_fini+0x15/0x40 [ 7.913767 ] rs400_fini+0x55/0x80 [ 7.914358 ] radeon_device_fini+0x3c/0x140 [ 7.914358 ] radeon_driver_unload_kms+0x5c/0xe0 [ 7.914358 ] radeon_driver_load_kms+0x13a/0x200 [ 7.914358 ] ? radeon_driver_unload_kms+0xe0/0xe0 [ 7.914358 ] drm_dev_register+0x1db/0x290 [ 7.914358 ] radeon_pci_probe+0x16a/0x230 [ 7.914358 ] local_pci_probe+0x4a/0xb0 Signed-off-by: Zheyu Ma Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/1626274459-8148-1-git-send-email-zheyuma97@gmail.com Signed-off-by: Christian König commit c9c9c6815f9004ee1ec87401ed0796853bd70f1b Author: Hyunchul Lee Date: Mon Jul 12 19:34:02 2021 +0900 cifs: fix the out of range assignment to bit fields in parse_server_interfaces Because the out of range assignment to bit fields are compiler-dependant, the fields could have wrong value. Signed-off-by: Hyunchul Lee Signed-off-by: Steve French commit 50630b3f1ada0bf412d3f28e73bac310448d9d6f Author: Ronnie Sahlberg Date: Tue Jul 13 12:22:59 2021 +1000 cifs: Do not use the original cruid when following DFS links for multiuser mounts Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213565 cruid should only be used for the initial mount and after this we should use the current users credentials. Ignore the original cruid mount argument when creating a new context for a multiuser mount following a DFS link. Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api") Cc: stable@vger.kernel.org # 5.11+ Reported-by: Xiaoli Feng Signed-off-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 506c1da44fee32ba1d3a70413289ad58c772bba6 Author: Shyam Prasad N Date: Tue May 18 15:05:50 2021 +0000 cifs: use the expiry output of dns_query to schedule next resolution We recently fixed DNS resolution of the server hostname during reconnect. However, server IP address may change, even when the old one continues to server (although sub-optimally). We should schedule the next DNS resolution based on the TTL of the DNS record used for the last resolution. This way, we resolve the server hostname again when a DNS record expires. Signed-off-by: Shyam Prasad N Reviewed-by: Paulo Alcantara (SUSE) Cc: # v5.11+ Signed-off-by: Steve French commit a973c983375c37301645d4fea056b1f4bff77bf7 Author: Mario Limonciello Date: Wed Jul 7 09:16:47 2021 -0500 platform/x86: amd-pmc: Use return code on suspend Right now the driver will still return success even if the OS_HINT command failed to send to the SMU. In the rare event of a failure, the suspend should really be aborted here so that relevant logs can may be captured. Signed-off-by: Mario Limonciello Acked-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20210707141647.8871-1-mario.limonciello@amd.com Signed-off-by: Hans de Goede commit 83cbaf14275a30f14cf558b09389a1664b173858 Author: Shyam Sundar S K Date: Tue Jun 29 14:18:03 2021 +0530 platform/x86: amd-pmc: Add new acpi id for future PMC controllers The upcoming PMC controller would have a newer acpi id, add that to the supported acpid device list. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-8-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 9422584a601ae8e4af51e890a14a936b2b689628 Author: Shyam Sundar S K Date: Tue Jun 29 14:18:02 2021 +0530 platform/x86: amd-pmc: Add support for ACPI ID AMDI0006 Some newer BIOSes have added another ACPI ID for the uPEP device. SMU statistics behave identically on this device. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-7-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit b9a4fa6978bef902409858737fa180fa7b9346ac Author: Shyam Sundar S K Date: Tue Jun 29 14:18:01 2021 +0530 platform/x86: amd-pmc: Add support for logging s0ix counters Even the FCH SSC registers provides certain level of information about the s0ix entry and exit times which comes handy when the SMU fails to report the statistics via the mailbox communication. This information is captured via a new debugfs file "s0ix_stats". A non-zero entry in this counters would mean that the system entered the s0ix state. If s0ix entry time and exit time don't change during suspend to idle, the silicon has not entered the deepest state. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-6-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 76620567496237f1f1f54683ec7da1755ee501d7 Author: Shyam Sundar S K Date: Tue Jun 29 14:18:00 2021 +0530 platform/x86: amd-pmc: Add support for logging SMU metrics SMU provides a way to dump the s0ix debug statistics in the form of a metrics table via a of set special mailbox commands. Add support to the driver which can send these commands to SMU and expose the information received via debugfs. The information contains the s0ix entry/exit, active time of each IP block etc. As a side note, SMU subsystem logging is not supported on Picasso based SoC's. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-5-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 162b937a8064029ed22cd1039d4dcf7f1721f940 Author: Shyam Sundar S K Date: Tue Jun 29 14:17:59 2021 +0530 platform/x86: amd-pmc: call dump registers only once Currently amd_pmc_dump_registers() routine is being called at multiple places. The best to call it is after command submission to SMU. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-4-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 4c06d35dfedf4c1fd03702e0f05292a69d020e21 Author: Shyam Sundar S K Date: Tue Jun 29 14:17:58 2021 +0530 platform/x86: amd-pmc: Fix SMU firmware reporting mechanism It was lately understood that the current mechanism available in the driver to get SMU firmware info works only on internal SMU builds and there is a separate way to get all the SMU logging counters (addressed in the next patch). Hence remove all the smu info shown via debugfs as it is no more useful. Fixes: 156ec4731cb2 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle") Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-3-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 95e1b60f8dc8f225b14619e9aca9bdd7d99167db Author: Shyam Sundar S K Date: Tue Jun 29 14:17:57 2021 +0530 platform/x86: amd-pmc: Fix command completion code The protocol to submit a job request to SMU is to wait for AMD_PMC_REGISTER_RESPONSE to return 1,meaning SMU is ready to take requests. PMC driver has to make sure that the response code is always AMD_PMC_RESULT_OK before making any command submissions. When we submit a message to SMU, we have to wait until it processes the request. Adding a read_poll_timeout() check as this was missing in the existing code. Also, add a mutex to protect amd_pmc_send_cmd() calls to SMU. Fixes: 156ec4731cb2 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle") Signed-off-by: Shyam Sundar S K Acked-by: Raul E Rangel Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210629084803.248498-2-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 95d429206c97cf109591009fa386004191c62c47 Author: Mark Pearson Date: Mon Jun 28 18:28:46 2021 -0400 platform/x86: think-lmi: Add pending_reboot support The Think-lmi driver was missing pending_reboot support as it wasn't available from the BIOS. Turns out this is really useful to have from user space so implementing from a purely SW point of view. Thanks to Mario Limonciello for guidance on how fwupd would use this. Suggested-by: Mario Limonciello Signed-off-by: Mark Pearson Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210628222846.8830-1-markpearson@lenovo.com Signed-off-by: Hans de Goede commit 50e98924d72dc730fe1f1646977205adf608dccd Author: Heiko Carstens Date: Tue Jul 13 11:19:07 2021 +0200 libperf: Fix build error with LIBPFM4=1 Fix build error with LIBPFM4=1: CC util/pfm.o util/pfm.c: In function ‘parse_libpfm_events_option’: util/pfm.c:102:30: error: ‘struct evsel’ has no member named ‘leader’ 102 | evsel->leader = grp_leader; | ^~ Committer notes: There is this entry in 'make -C tools/perf build-test' to test the build with libpfm: $ grep libpfm tools/perf/tests/make make_with_libpfm4 := LIBPFM4=1 run += make_with_libpfm4 $ But the test machine lacked libpfm-devel, now its installed and further cases like this shouldn't happen. Committer testing: Before this patch this fails, after applying it: $ make -C tools/perf build-test make: Entering directory '/var/home/acme/git/perf/tools/perf' - tarpkg: ./tests/perf-targz-src-pkg . make_static: make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 -j24 DESTDIR=/tmp/tmp.KzFSfvGRQa make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1 make_with_libpfm4_O: make LIBPFM4=1 make_install_prefix_O: make install prefix=/tmp/krava make_no_auxtrace_O: make NO_AUXTRACE=1 $ rpm -q libpfm-devel libpfm-devel-4.11.0-4.fc34.x86_64 $ FIXME: This shows a need for 'build-test' to bail out when a build option is specified that has no required library devel files installed. Fixes: fba7c86601e2e42d ("libperf: Move 'leader' from tools/perf to perf_evsel::leader") Signed-off-by: Heiko Carstens Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210713091907.1555560-1-hca@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 376a947653f6214f397ef1c5aa2b7b7fc7b68c49 Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:55:30 2021 -0300 tools headers UAPI: Sync files changed by the memfd_secret new syscall To pick the changes in this cset: 7bb7f2ac24a028b2 ("arch, mm: wire up memfd_secret system call where relevant") That silences these perf build warnings and add support for those new syscalls in tools such as 'perf trace'. For instance, this is now possible: # perf trace -v -e memfd_secret event qualifier tracepoint filter: (common_pid != 13375 && common_pid != 3713) && (id == 447) ^C# That is the filter expression attached to the raw_syscalls:sys_{enter,exit} tracepoints. $ grep memfd_secret tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 447 common memfd_secret sys_memfd_secret $ This addresses these perf build warnings: Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/unistd.h' differs from latest version at 'arch/arm64/include/uapi/asm/unistd.h' diff -u tools/arch/arm64/include/uapi/asm/unistd.h arch/arm64/include/uapi/asm/unistd.h Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl Cc: Linus Torvalds Cc: Mike Rapoport Signed-off-by: Arnaldo Carvalho de Melo commit e0a7ef2a62e4f61a751bccfc79b9e7acb51474de Author: Jin Yao Date: Wed Jul 7 13:56:52 2021 +0800 perf stat: Merge uncore events by default for hybrid platform On a hybrid platform, by default 'perf stat' aggregates and reports the event counts per PMU. For example, # perf stat -e cycles -a true Performance counter stats for 'system wide': 1,400,445 cpu_core/cycles/ 680,881 cpu_atom/cycles/ 0.001770773 seconds time elapsed But for uncore events that's not a suitable method. Uncore has nothing to do with hybrid. So for uncore events, we aggregate event counts from all PMUs and report the counts without PMUs. Before: # perf stat -e arb/event=0x81,umask=0x1/,arb/event=0x84,umask=0x1/ -a true Performance counter stats for 'system wide': 2,058 uncore_arb_0/event=0x81,umask=0x1/ 2,028 uncore_arb_1/event=0x81,umask=0x1/ 0 uncore_arb_0/event=0x84,umask=0x1/ 0 uncore_arb_1/event=0x84,umask=0x1/ 0.000614498 seconds time elapsed After: # perf stat -e arb/event=0x81,umask=0x1/,arb/event=0x84,umask=0x1/ -a true Performance counter stats for 'system wide': 3,996 arb/event=0x81,umask=0x1/ 0 arb/event=0x84,umask=0x1/ 0.000630046 seconds time elapsed Of course, we also keep the '--no-merge' working for uncore events. # perf stat -e arb/event=0x81,umask=0x1/,arb/event=0x84,umask=0x1/ --no-merge true Performance counter stats for 'system wide': 1,952 uncore_arb_0/event=0x81,umask=0x1/ 1,921 uncore_arb_1/event=0x81,umask=0x1/ 0 uncore_arb_0/event=0x84,umask=0x1/ 0 uncore_arb_1/event=0x84,umask=0x1/ 0.000575536 seconds time elapsed Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210707055652.962-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit de3d5fd83c9b1099b0d207b41a222dc451184a63 Author: Jin Yao Date: Thu Jul 8 09:37:01 2021 +0800 perf tests: Fix 'Convert perf time to TSC' on core-only system If the atom CPUs are offlined, the 'cpu_atom' is not valid. We don't need the test case for 'cpu_atom'. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210708013701.20347-5-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 212f3d97abc8be09549de12cedb290f47b4dce5a Author: Jin Yao Date: Thu Jul 8 09:37:00 2021 +0800 perf tests: Fix 'Roundtrip evsel->name' on core-only system If the atom CPUs are offlined, the 'cpu_atom' is not valid. Perf will not create two events for one hw event, so the evsel->idx doesn't need to be divided by 2 before comparing. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210708013701.20347-4-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 490e9a8fb4a3d74602668ef2e4cc29608e9b00a6 Author: Jin Yao Date: Thu Jul 8 09:36:59 2021 +0800 perf tests: Fix 'Parse event definition strings' on core-only system If the atom CPUs are offlined, the 'cpu_atom' is not valid. We don't need the test case for 'cpu_atom'. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210708013701.20347-3-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 49afa7f6c714ab3f5cb2a4c835f7f9dddc0bb2c1 Author: Jin Yao Date: Thu Jul 8 09:36:58 2021 +0800 perf pmu: Skip invalid hybrid pmu On hybrid platform, such as Alderlake, if atom CPUs are offlined, the kernel still exports the sysfs path '/sys/devices/cpu_atom/' for 'cpu_atom' pmu but the file '/sys/devices/cpu_atom/cpus' is empty, which indicates this is an invalid pmu. Need to check and skip the invalid hybrid pmu. Before: # perf list ... branch-instructions OR cpu_atom/branch-instructions/ [Kernel PMU event] branch-instructions OR cpu_core/branch-instructions/ [Kernel PMU event] branch-misses OR cpu_atom/branch-misses/ [Kernel PMU event] branch-misses OR cpu_core/branch-misses/ [Kernel PMU event] bus-cycles OR cpu_atom/bus-cycles/ [Kernel PMU event] bus-cycles OR cpu_core/bus-cycles/ [Kernel PMU event] ... The cpu_atom events are still displayed even if atom CPUs are offlined. After: # perf list ... branch-instructions OR cpu_core/branch-instructions/ [Kernel PMU event] branch-misses OR cpu_core/branch-misses/ [Kernel PMU event] bus-cycles OR cpu_core/bus-cycles/ [Kernel PMU event] ... Now only cpu_core events are displayed. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210708013701.20347-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0abb33bfca0fb74df76aac03e90ce685016ef7be Author: Matthew Auld Date: Tue Jul 13 14:04:31 2021 +0100 drm/i915/gtt: drop the page table optimisation We skip filling out the pt with scratch entries if the va range covers the entire pt, since we later have to fill it with the PTEs for the object pages anyway. However this might leave open a small window where the PTEs don't point to anything valid for the HW to consume. When for example using 2M GTT pages this fill_px() showed up as being quite significant in perf measurements, and ends up being completely wasted since we ignore the pt and just use the pde directly. Anyway, currently we have our PTE construction split between alloc and insert, which is probably slightly iffy nowadays, since the alloc doesn't actually allocate anything anymore, instead it just sets up the page directories and points the PTEs at the scratch page. Later when we do the insert step we re-program the PTEs again. Better might be to squash the alloc and insert into a single step, then bringing back this optimisation(along with some others) should be possible. Fixes: 14826673247e ("drm/i915: Only initialize partially filled pagetables") Signed-off-by: Matthew Auld Cc: Jon Bloomfield Cc: Chris Wilson Cc: Daniel Vetter Cc: # v4.15+ Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210713130431.2392740-1-matthew.auld@intel.com (cherry picked from commit 8f88ca76b3942d82e2c1cea8735ec368d89ecc15) Signed-off-by: Rodrigo Vivi commit c934fec1c32840224fd975544c347823962193b2 Author: Mason Zhang Date: Tue Jul 13 19:42:48 2021 +0800 spi: mediatek: move devm_spi_register_master position This patch move devm_spi_register_master to the end of mtk_spi_probe. If slaves call spi_sync in there probe function, master should have probe done. Signed-off-by: Mason Zhang Link: https://lore.kernel.org/r/20210713114247.1536-1-mason.zhang@mediatek.com Signed-off-by: Mark Brown commit 9431f8df233f808baa5fcc62b520cc6503fdf022 Author: Srinivas Kandagatla Date: Tue Jul 13 15:04:17 2021 +0100 ASoC: codecs: wcd938x: make sdw dependency explicit in Kconfig currenlty wcd938x has only soundwire interface and depends on symbols from wcd938x soundwire module, so make this dependency explicit in Kconfig Without this one of the randconfig endup setting CONFIG_SND_SOC_WCD938X=y CONFIG_SND_SOC_WCD938X_SDW=m resulting in some undefined reference to wcd938x_sdw* symbols. Reported-by: kernel test robot Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210713140417.23693-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit aa21548e34c19c12e924c736f3fd9e6a4d0f5419 Author: Sathya Prakash M R Date: Mon Jul 12 15:16:20 2021 -0500 ASoC: SOF: Intel: Update ADL descriptor to use ACPI power states The ADL descriptor was missing an ACPI power setting, causing the DSP to enter D3 even with a D0i1-compatible wake-on-voice/hotwording capture stream. Fixes: 4ad03f894b3c ('ASoC: SOF: Intel: Update ADL P to use its own descriptor') Reviewed-by: Ranjani Sridharan Signed-off-by: Sathya Prakash M R Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210712201620.44311-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c987b65a574fad8b598d6f58f010d8f630327428 Author: Benjamin Gaignard Date: Mon Jul 12 12:12:32 2021 +0200 iommu/rockchip: Fix physical address decoding Restore bits 39 to 32 at correct position. It reverses the operation done in rk_dma_addr_dte_v2(). Fixes: c55356c534aa ("iommu: rockchip: Add support for iommu v2") Reported-by: Dan Carpenter Signed-off-by: Benjamin Gaignard Link: https://lore.kernel.org/r/20210712101232.318589-1-benjamin.gaignard@collabora.com Signed-off-by: Joerg Roedel commit 474dd1c6506411752a9b2f2233eec11f1733a099 Author: Lu Baolu Date: Mon Jul 12 15:17:12 2021 +0800 iommu/vt-d: Fix clearing real DMA device's scalable-mode context entries The commit 2b0140c69637e ("iommu/vt-d: Use pci_real_dma_dev() for mapping") fixes an issue of "sub-device is removed where the context entry is cleared for all aliases". But this commit didn't consider the PASID entry and PASID table in VT-d scalable mode. This fix increases the coverage of scalable mode. Suggested-by: Sanjay Kumar Fixes: 8038bdb855331 ("iommu/vt-d: Only clear real DMA device's context entries") Fixes: 2b0140c69637e ("iommu/vt-d: Use pci_real_dma_dev() for mapping") Cc: stable@vger.kernel.org # v5.6+ Cc: Jon Derrick Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210712071712.3416949-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 37764b952e1b39053defc7ebe5dcd8c4e3e78de9 Author: Sanjay Kumar Date: Mon Jul 12 15:13:15 2021 +0800 iommu/vt-d: Global devTLB flush when present context entry changed This fixes a bug in context cache clear operation. The code was not following the correct invalidation flow. A global device TLB invalidation should be added after the IOTLB invalidation. At the same time, it uses the domain ID from the context entry. But in scalable mode, the domain ID is in PASID table entry, not context entry. Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Sanjay Kumar Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210712071315.3416543-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit ce36c94214f0d534aad4adb4219cc046270948fb Author: Marek Szyprowski Date: Mon Jul 5 08:56:57 2021 +0200 iommu/qcom: Revert "iommu/arm: Cleanup resources in case of probe error path" QCOM IOMMU driver calls bus_set_iommu() for every IOMMU device controller, what fails for the second and latter IOMMU devices. This is intended and must be not fatal to the driver registration process. Also the cleanup path should take care of the runtime PM state, what is missing in the current patch. Revert relevant changes to the QCOM IOMMU driver until a proper fix is prepared. This partially reverts commit 249c9dc6aa0db74a0f7908efd04acf774e19b155. Fixes: 249c9dc6aa0d ("iommu/arm: Cleanup resources in case of probe error path") Suggested-by: Will Deacon Signed-off-by: Marek Szyprowski Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210705065657.30356-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel commit 5cf17746b302aa32a4f200cc6ce38865bfe4cf94 Author: Andrew Jones Date: Tue Jul 13 22:37:42 2021 +0200 KVM: arm64: selftests: get-reg-list: actually enable pmu regs in pmu sublist We reworked get-reg-list to make it easier to enable optional register sublists by parametrizing their vcpu feature flags as well as making other generalizations. That was all to make sure we enable the PMU registers when we want to test them. Somehow we forgot to actually include the PMU feature flag in the PMU sublist description though! Do that now. Fixes: 313673bad871 ("KVM: arm64: selftests: get-reg-list: Split base and pmu registers") Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210713203742.29680-3-drjones@redhat.com commit bac0b135907855e9f8c032877c3df3c60885a08f Author: Andrew Jones Date: Tue Jul 13 22:37:41 2021 +0200 KVM: selftests: change pthread_yield to sched_yield With later GCC we get steal_time.c: In function ‘main’: steal_time.c:323:25: warning: ‘pthread_yield’ is deprecated: pthread_yield is deprecated, use sched_yield instead [-Wdeprecated-declarations] Let's follow the instructions and use sched_yield instead. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210713203742.29680-2-drjones@redhat.com commit 80d9ac9bd7b9366c2a89d2716a397749299728e7 Author: Marc Zyngier Date: Tue Jul 13 12:36:41 2021 +0100 KVM: arm64: Fix detection of shared VMAs on guest fault When merging the KVM MTE support, the blob that was interposed between the chair and the keyboard experienced a neuronal accident (also known as a brain fart), turning a check for VM_SHARED into VM_PFNMAP as it was reshuffling some of the code. The blob having now come back to its senses, let's restore the initial check that the original author got right the first place. Fixes: ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature") Reviewed-by: Steven Price Signed-off-by: Marc Zyngier Cc: Catalin Marinas Link: https://lore.kernel.org/r/20210713114804.594993-1-maz@kernel.org commit fd8e83884fdd7b5fc411f201a58d8d01890198a2 Author: Maxime Chevallier Date: Fri Jun 25 14:13:53 2021 +0200 ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms The AR803x PHY used on this modules seems to require the reset line to be asserted for around 10ms in order to avoid rare cases where the PHY gets stuck in an incoherent state that prevents it to function correctly. The previous value of 2ms was found to be problematic on some setups, causing intermittent issues where the PHY would be unresponsive every once in a while on some sytems, with a low occurrence (it typically took around 30 consecutive reboots to encounter the issue). Bumping the delay to the 10ms makes the issue dissapear, with more than 2500 consecutive reboots performed without the issue showing-up. Fixes: 208d7baf8085 ("ARM: imx: initial SolidRun HummingBoard support") Signed-off-by: Maxime Chevallier Tested-by: Hervé Codina Reviewed-by: Russell King (Oracle) Signed-off-by: Shawn Guo commit fb1425b436bcf936065edbbe8d092465a53185b6 Author: Fabio Estevam Date: Thu Jun 17 11:54:15 2021 -0300 ARM: imx: common: Move prototype outside the SMP block Currently the imx_gpcv2_set_core1_pdn_pup_by_software() prototype is guarded by the CONFIG_SMP symbol. This causes W=1 build warnings when CONFIG_SMP is not selected: arch/arm/mach-imx/src.c:103:6: warning: no previous prototype for 'imx_gpcv2_set_core1_pdn_pup_by_software' [-Wmissing-prototypes] Fix it by moving the imx_gpcv2_set_core1_pdn_pup_by_software() prototype outside of the CONFIG_SMP block. Fixes: e34645f45805 ("ARM: imx: add smp support for imx7d") Reported-by: kernel test robot Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f07ec85365807b3939f32d0094a6dd5ce065d1b9 Author: Yang Yingliang Date: Tue Jun 15 20:52:39 2021 +0800 ARM: imx: add missing clk_disable_unprepare() clock source is prepared and enabled by clk_prepare_enable() in probe function, but no disable or unprepare in remove and error path. Fixes: 9454a0caff6a ("ARM: imx: add mmdc ipg clock operation for mmdc") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit f9613aa07f16d6042e74208d1b40a6104d72964a Author: Yang Yingliang Date: Tue Jun 15 20:52:38 2021 +0800 ARM: imx: add missing iounmap() Commit e76bdfd7403a ("ARM: imx: Added perf functionality to mmdc driver") introduced imx_mmdc_remove(), the mmdc_base need be unmapped in it if config PERF_EVENTS is enabled. If imx_mmdc_perf_init() fails, the mmdc_base also need be unmapped. Fixes: e76bdfd7403a ("ARM: imx: Added perf functionality to mmdc driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit d5c10e0fc8645342fe5c9796b00c84ab078cd713 Author: Dave Jiang Date: Thu Jun 24 13:43:32 2021 -0700 dmaengine: idxd: fix setup sequence for MSIXPERM table The MSIX permission table should be programmed BEFORE request_irq() happens. This prevents any possibility of an interrupt happening before the MSIX perm table is setup, however slight. Fixes: 6df0e6c57dfc ("dmaengine: idxd: clear MSIX permission entry on shutdown") Sign-off-by: Dave Jiang Link: https://lore.kernel.org/r/162456741222.1138073.1298447364671237896.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit da435aedb00a4ef61019ff11ae0c08ffb9b1fb18 Author: Dave Jiang Date: Thu Jun 24 12:09:29 2021 -0700 dmaengine: idxd: fix array index when int_handles are being used The index to the irq vector should be local and has no relation to the assigned interrupt handle. Assign the MSIX interrupt index that is programmed for the descriptor. The interrupt handle only matters when it comes to hardware descriptor programming. Fixes: eb15e7154fbf ("dmaengine: idxd: add interrupt handle request and release support") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/162456176939.1121476.3366256009925001897.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 1da569fa7ec8cb0591c74aa3050d4ea1397778b4 Author: Yu Kuai Date: Tue Jul 6 20:45:21 2021 +0800 dmaengine: usb-dmac: Fix PM reference leak in usb_dmac_probe() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by moving the error_pm label above the pm_runtime_put() in the error path. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20210706124521.1371901-1-yukuai3@huawei.com Signed-off-by: Vinod Koul commit 7dd2dd4ff9f3abda601f22b9d01441a0869d20d7 Author: Adrian Larumbe Date: Wed Jul 7 00:43:38 2021 +0100 dmaengine: xilinx_dma: Fix read-after-free bug when terminating transfers When user calls dmaengine_terminate_sync, the driver will clean up any remaining descriptors for all the pending or active transfers that had previously been submitted. However, this might happen whilst the tasklet is invoking the DMA callback for the last finished transfer, so by the time it returns and takes over the channel's spinlock, the list of completed descriptors it was traversing is no longer valid. This leads to a read-after-free situation. Fix it by signalling whether a user-triggered termination has happened by means of a boolean variable. Signed-off-by: Adrian Larumbe Link: https://lore.kernel.org/r/20210706234338.7696-3-adrian.martinezlarumbe@imgtec.com Signed-off-by: Vinod Koul commit 7e71b85473f863a29eb1c69265ef025389b4091d Author: Vladimir Oltean Date: Tue Jun 8 14:26:58 2021 +0300 arm64: dts: ls1028a: fix node name for the sysclk U-Boot attempts to fix up the "clock-frequency" property of the "/sysclk" node: https://elixir.bootlin.com/u-boot/v2021.04/source/arch/arm/cpu/armv8/fsl-layerscape/fdt.c#L512 but fails to do so: ## Booting kernel from Legacy Image at a1000000 ... Image Name: Created: 2021-06-08 10:31:38 UTC Image Type: AArch64 Linux Kernel Image (gzip compressed) Data Size: 15431370 Bytes = 14.7 MiB Load Address: 80080000 Entry Point: 80080000 Verifying Checksum ... OK ## Flattened Device Tree blob at a0000000 Booting using the fdt blob at 0xa0000000 Uncompressing Kernel Image Loading Device Tree to 00000000fbb19000, end 00000000fbb22717 ... OK Unable to update property /sysclk:clock-frequency, err=FDT_ERR_NOTFOUND Starting kernel ... All Layerscape SoCs except LS1028A use "sysclk" as the node name, and not "clock-sysclk". So change the node name of LS1028A accordingly. Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC") Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo commit 479857a9bcc86e808216daae8ca1c9213b9e117a Author: Gustavo A. R. Silva Date: Tue Jul 13 19:19:03 2021 -0500 powerpc/powernv: Fix fall-through warning for Clang Fix the following fallthrough warnings (powernv_defconfig and powerpc64): drivers/char/powernv-op-panel.c:78:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: Nathan Chancellor Signed-off-by: Gustavo A. R. Silva commit bcb9928a155444dbd212473e60241ca0a7f641e1 Author: Vladimir Oltean Date: Tue Jul 13 12:40:21 2021 +0300 net: dsa: properly check for the bridge_leave methods in dsa_switch_bridge_leave() This was not caught because there is no switch driver which implements the .port_bridge_join but not .port_bridge_leave method, but it should nonetheless be fixed, as in certain conditions (driver development) it might lead to NULL pointer dereference. Fixes: f66a6a69f97a ("net: dsa: permit cross-chip bridging between all trees in the system") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cf6678aec2530701f8e13b7551d131599c33e5ca Author: Gustavo A. R. Silva Date: Tue Jul 13 13:41:16 2021 -0500 MIPS: Fix unreachable code issue Fix the following warning (mips-randconfig): arch/mips/include/asm/fpu.h:79:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] Originally, the /* fallthrough */ comment was introduced by commit: 597ce1723e0f ("MIPS: Support for 64-bit FP with O32 binaries") and it was wrongly replaced with fallthrough; by commit: c9b029903466 ("MIPS: Use fallthrough for arch/mips") As the original comment is actually useful, fix this issue by removing unreachable fallthrough; statement and place the original /* fallthrough */ comment back. Fixes: c9b029903466 ("MIPS: Use fallthrough for arch/mips") Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit bc431d2153cc290573531601b5004babe7011568 Author: Gustavo A. R. Silva Date: Tue Jul 13 13:38:58 2021 -0500 MIPS: Fix fall-through warnings for Clang Fix the following fallthrough warnings: arch/mips/mm/tlbex.c:1386:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] arch/mips/mm/tlbex.c:2173:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 4796372e7c117b84bfd929526f48e23c79030dcd Author: Gustavo A. R. Silva Date: Tue Jul 13 14:58:18 2021 -0500 ASoC: Mediatek: MT8183: Fix fall-through warning for Clang Fix the following fallthrough warning: sound/soc/mediatek/mt8183/mt8183-dai-adda.c:342:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: Nathan Chancellor Signed-off-by: Gustavo A. R. Silva commit 2feeb52859fc1ab94cd35b61ada3a6ac4ff24243 Author: Ville Syrjälä Date: Wed Jun 30 19:44:13 2021 +0300 drm/i915/gt: Fix -EDEADLK handling regression The conversion to ww mutexes failed to address the fence code which already returns -EDEADLK when we run out of fences. Ww mutexes on the other hand treat -EDEADLK as an internal errno value indicating a need to restart the operation due to a deadlock. So now when the fence code returns -EDEADLK the higher level code erroneously restarts everything instead of returning the error to userspace as is expected. To remedy this let's switch the fence code to use a different errno value for this. -ENOBUFS seems like a semi-reasonable unique choice. Apart from igt the only user of this I could find is sna, and even there all we do is dump the current fence registers from debugfs into the X server log. So no user visible functionality is affected. If we really cared about preserving this we could of course convert back to -EDEADLK higher up, but doesn't seem like that's worth the hassle here. Not quite sure which commit specifically broke this, but I'll just attribute it to the general gem ww mutex work. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Cc: Thomas Hellström Testcase: igt/gem_pread/exhaustion Testcase: igt/gem_pwrite/basic-exhaustion Testcase: igt/gem_fenced_exec_thrash/too-many-fences Fixes: 80f0b679d6f0 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210630164413.25481-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst (cherry picked from commit 78d2ad7eb4e1f0e9cd5d79788446b6092c21d3e0) Signed-off-by: Rodrigo Vivi commit b51883d47d37c3f3fa80d6bcd8cc3a57d5b95130 Author: Gustavo A. R. Silva Date: Tue Jul 13 14:50:47 2021 -0500 power: supply: Fix fall-through warnings for Clang Fix the following fallthrough warnings: drivers/power/supply/ab8500_fg.c:1730:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] drivers/power/supply/abx500_chargalg.c:1155:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: Nathan Chancellor Signed-off-by: Gustavo A. R. Silva commit d6a48a476a5de8bdfbdd6040aa5a48955fc49e44 Author: Gustavo A. R. Silva Date: Tue Jul 13 14:48:28 2021 -0500 dmaengine: ti: k3-udma: Fix fall-through warning for Clang Fix the following fallthrough warning: drivers/dma/ti/k3-udma.c:4951:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: Nathan Chancellor Signed-off-by: Gustavo A. R. Silva commit d4e81342ea2399cf92e98ea5c0d025bcf8a3d065 Author: Gustavo A. R. Silva Date: Tue Jul 13 14:43:09 2021 -0500 s390: Fix fall-through warnings for Clang Fix the following fallthrough warnings: drivers/s390/net/ctcm_fsms.c:1457:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] drivers/s390/net/qeth_l3_main.c:437:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] drivers/s390/char/tape_char.c:374:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] arch/s390/kernel/uprobes.c:129:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: Nathan Chancellor Signed-off-by: Gustavo A. R. Silva commit 41614014a7afbbce5b61bfce5ce89ee3455143e7 Author: Gustavo A. R. Silva Date: Tue Jul 13 13:27:08 2021 -0500 dmaengine: ipu: Fix fall-through warning for Clang Fix the following fallthrough warnings (arm64-randconfig): drivers/dma/ipu/ipu_idmac.c:621:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] rivers/dma/ipu/ipu_idmac.c:981:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 40226a3d96ef8ab8980f032681c8bfd46d63874e Merge: f02bf8578bd8d 52dfd86aa568e Author: Linus Torvalds Date: Tue Jul 13 12:07:18 2021 -0700 Merge tag 'vboxsf-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux Pull vboxsf fixes from Hans de Goede: "This adds support for the atomic_open directory-inode op to vboxsf. Note this is not just an enhancement this also fixes an actual issue which users are hitting, see the commit message of the "boxsf: Add support for the atomic_open directory-inode" patch" * tag 'vboxsf-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux: vboxsf: Add support for the atomic_open directory-inode op vboxsf: Add vboxsf_[create|release]_sf_handle() helpers vboxsf: Make vboxsf_dir_create() return the handle for the created file vboxsf: Honor excl flag to the dir-inode create op commit f02bf8578bd8dd400903291ccebc69665adc911c Merge: 7fef2edf7cc75 ea32af47f00a0 Author: Linus Torvalds Date: Tue Jul 13 12:02:07 2021 -0700 Merge tag 'for-5.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs zoned mode fixes from David Sterba: - fix deadlock when allocating system chunk - fix wrong mutex unlock on an error path - fix extent map splitting for append operation - update and fix message reporting unusable chunk space - don't block when background zone reclaim runs with balance in parallel * tag 'for-5.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: fix wrong mutex unlock on failure to allocate log root tree btrfs: don't block if we can't acquire the reclaim lock btrfs: properly split extent_map for REQ_OP_ZONE_APPEND btrfs: rework chunk allocation to avoid exhaustion of the system chunk array btrfs: fix deadlock with concurrent chunk allocations involving system chunks btrfs: zoned: print unusable percentage when reclaiming block groups btrfs: zoned: fix types for u64 division in btrfs_reclaim_bgs_work commit 5a1ab5c0299a7b3b9e7ec52c327f44d98b8e001d Author: Gustavo A. R. Silva Date: Tue Jul 13 13:25:06 2021 -0500 iommu/arm-smmu-v3: Fix fall-through warning for Clang Fix the following fallthrough warning (arm64-randconfig with Clang): drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:382:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit f95deaeca8e106af891061e5f9c745dc7dc172c0 Author: Gustavo A. R. Silva Date: Tue Jul 13 13:23:21 2021 -0500 mmc: jz4740: Fix fall-through warning for Clang Fix the following fallthrough warning (mips-randconfig with Clang): drivers/mmc/host/jz4740_mmc.c:792:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 54325d0849d60ed52ee9316f76d116b52b53669b Author: Gustavo A. R. Silva Date: Tue Jul 13 13:21:22 2021 -0500 PCI: Fix fall-through warning for Clang Fix the following fallthrough warning (arm64-randconfig with Clang): drivers/pci/proc.c:234:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 223fa873facce6eef165009294d01e18c191c609 Author: Gustavo A. R. Silva Date: Tue Jul 13 13:18:14 2021 -0500 scsi: libsas: Fix fall-through warning for Clang Fix the following fallthrough warning (arm64-randconfig with Clang): drivers/scsi/libsas/sas_discover.c:467:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit c8698340e0e5897c30811f8e7e86bcebe53e0519 Author: Gustavo A. R. Silva Date: Tue Jul 13 13:13:40 2021 -0500 video: fbdev: Fix fall-through warning for Clang Fix the following fallthrough warning (arm64-randconfig with Clang): drivers/video/fbdev/xilinxfb.c:244:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit f336a009f8e3dd0b47168565584608a4a62cbbb4 Author: Gustavo A. R. Silva Date: Tue Jul 13 13:09:06 2021 -0500 math-emu: Fix fall-through warning Fix the following fallthrough warning (nds32-randconfig with GCC): include/math-emu/op-common.h:332:8: warning: this statement may fall through [-Wimplicit-fallthrough=] Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/60edca25.k00ut905IFBjPyt5%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva commit 420405ecde061fde76d67bd3a67577a563ea758e Author: Bart Van Assche Date: Tue Jul 13 10:49:26 2021 -0700 configfs: fix the read and write iterators Commit 7fe1e79b59ba ("configfs: implement the .read_iter and .write_iter methods") changed the simple_read_from_buffer() calls into copy_to_iter() calls and the simple_write_to_buffer() calls into copy_from_iter() calls. The simple*buffer() methods update the file offset (*ppos) but the read and write iterators not yet. Make the read and write iterators update the file offset (iocb->ki_pos). This patch has been tested as follows: # modprobe target_core_user # dd if=/sys/kernel/config/target/dbroot bs=1 /var/target 12+0 records in 12+0 records out 12 bytes copied, 9.5539e-05 s, 126 kB/s # cd /sys/kernel/config/acpi/table # mkdir test # cd test # dmesg -c >/dev/null; printf 'SSDT\x8\0\0\0abcdefghijklmnopqrstuvwxyz' | dd of=aml bs=1; dmesg -c 34+0 records in 34+0 records out 34 bytes copied, 0.010627 s, 3.2 kB/s [ 261.056551] ACPI configfs: invalid table length Reported-by: Yanko Kaneti Cc: Yanko Kaneti Fixes: 7fe1e79b59ba ("configfs: implement the .read_iter and .write_iter methods") Signed-off-by: Bart Van Assche Signed-off-by: Christoph Hellwig commit 4377d9ab1f162e58e0e5ae89c9a5fd7b4d8a6bdb Author: Sean Nyekjaer Date: Fri Jul 9 09:17:27 2021 +0200 iio: accel: fxls8962af: fix potential use of uninitialized symbol Fix this warning from kernel test robot: smatch warnings: drivers/iio/accel/fxls8962af-core.c:640 fxls8962af_i2c_raw_read_errata3() error: uninitialized symbol 'ret'. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sean Nyekjaer Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") Link: https://lore.kernel.org/r/20210709071727.2453536-1-sean@geanix.com Signed-off-by: Jonathan Cameron commit 28efd208530c7690a275b18915960c26c5b4d9d5 Merge: deb7178eb940e d2a16bde77322 Author: David S. Miller Date: Tue Jul 13 10:02:41 2021 -0700 Merge branch 'sfc-tx-queues' Íñigo Huguet says: ==================== sfc: Fix lack of XDP TX queues A change introduced in commit e26ca4b53582 ("sfc: reduce the number of requested xdp ev queues") created a bug in XDP_TX and XDP_REDIRECT because it unintentionally reduced the number of XDP TX queues, letting not enough queues to have one per CPU, which leaded to errors if XDP TX/REDIRECT was done from a high numbered CPU. This patchs make the following changes: - Fix the bug mentioned above - Revert commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count with the real number of initialized queues") which intended to fix a related problem, created by mentioned bug, but it's no longer necessary - Add a new error log message if there are not enough resources to make XDP_TX/REDIRECT work V1 -> V2: keep the calculation of how many tx queues can handle a single event queue, but apply the "max. tx queues per channel" upper limit. V2 -> V3: WARN_ON if the number of initialized XDP TXQs differs from the expected. ==================== Signed-off-by: David S. Miller commit d2a16bde77322fca6b6f36ebe19097a1c3c46f74 Author: Íñigo Huguet Date: Tue Jul 13 16:21:29 2021 +0200 sfc: add logs explaining XDP_TX/REDIRECT is not available If it's not possible to allocate enough channels for XDP, XDP_TX and XDP_REDIRECT don't work. However, only a message saying that not enough channels were available was shown, but not saying what are the consequences in that case. The user didn't know if he/she can use XDP or not, if the performance is reduced, or what. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 788bc000d4c2f25232db19ab3a0add0ba4e27671 Author: Íñigo Huguet Date: Tue Jul 13 16:21:28 2021 +0200 sfc: ensure correct number of XDP queues Commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count with the real number of initialized queues") intended to fix a problem caused by a round up when calculating the number of XDP channels and queues. However, this was not the real problem. The real problem was that the number of XDP TX queues had been reduced to half in commit e26ca4b53582 ("sfc: reduce the number of requested xdp ev queues"), but the variable xdp_tx_queue_count had remained the same. Once the correct number of XDP TX queues is created again in the previous patch of this series, this also can be reverted since the error doesn't actually exist. Only in the case that there is a bug in the code we can have different values in xdp_queue_number and efx->xdp_tx_queue_count. Because of this, and per Edward Cree's suggestion, I add instead a WARN_ON to catch if it happens again in the future. Note that the number of allocated queues can be higher than the number of used ones due to the round up, as explained in the existing comment in the code. That's why we also have to stop increasing xdp_queue_number beyond efx->xdp_tx_queue_count. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit f28100cb9c9645c07cbd22431278ac9492f6a01c Author: Íñigo Huguet Date: Tue Jul 13 16:21:27 2021 +0200 sfc: fix lack of XDP TX queues - error XDP TX failed (-22) Fixes: e26ca4b53582 sfc: reduce the number of requested xdp ev queues The buggy commit intended to allocate less channels for XDP in order to be more unlikely to reach the limit of 32 channels of the driver. The idea was to use each IRQ/eventqeue for more XDP TX queues than before, calculating which is the maximum number of TX queues that one event queue can handle. For example, in EF10 each event queue could handle up to 8 queues, better than the 4 they were handling before the change. This way, it would have to allocate half of channels than before for XDP TX. The problem is that the TX queues are also contained inside the channel structs, and there are only 4 queues per channel. Reducing the number of channels means also reducing the number of queues, resulting in not having the desired number of 1 queue per CPU. This leads to getting errors on XDP_TX and XDP_REDIRECT if they're executed from a high numbered CPU, because there only exist queues for the low half of CPUs, actually. If XDP_TX/REDIRECT is executed in a low numbered CPU, the error doesn't happen. This is the error in the logs (repeated many times, even rate limited): sfc 0000:5e:00.0 ens3f0np0: XDP TX failed (-22) This errors happens in function efx_xdp_tx_buffers, where it expects to have a dedicated XDP TX queue per CPU. Reverting the change makes again more likely to reach the limit of 32 channels in machines with many CPUs. If this happen, no XDP_TX/REDIRECT will be possible at all, and we will have this log error messages: At interface probe: sfc 0000:5e:00.0: Insufficient resources for 12 XDP event queues (24 other channels, max 32) At every subsequent XDP_TX/REDIRECT failure, rate limited: sfc 0000:5e:00.0 ens3f0np0: XDP TX failed (-22) However, without reverting the change, it makes the user to think that everything is OK at probe time, but later it fails in an unpredictable way, depending on the CPU that handles the packet. It is better to restore the predictable behaviour. If the user sees the error message at probe time, he/she can try to configure the best way it fits his/her needs. At least, he/she will have 2 options: - Accept that XDP_TX/REDIRECT is not available (he/she may not need it) - Load sfc module with modparam 'rss_cpus' with a lower number, thus creating less normal RX queues/channels, letting more free resources for XDP, with some performance penalty. Anyway, let the calculation of maximum TX queues that can be handled by a single event queue, and use it only if it's less than the number of TX queues per channel. This doesn't happen in practice, but could happen if some constant values are tweaked in the future, such us EFX_MAX_TXQ_PER_CHANNEL, EFX_MAX_EVQ_SIZE or EFX_MAX_DMAQ_SIZE. Related mailing list thread: https://lore.kernel.org/bpf/20201215104327.2be76156@carbon/ Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 2e7ea96924acc502929c3ffa0fcbdaeec00b2208 Author: Gustavo A. R. Silva Date: Tue Jul 13 11:51:58 2021 -0500 cpufreq: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a fallthrough warning by simply dropping the empty default case at the bottom. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit deb7178eb940e2c5caca1b1db084a69b2e59b4c9 Author: Pavel Skripkin Date: Tue Jul 13 13:58:53 2021 +0300 net: fddi: fix UAF in fza_probe fp is netdev private data and it cannot be used after free_netdev() call. Using fp after free_netdev() can cause UAF bug. Fix it by moving free_netdev() after error message. Fixes: 61414f5ec983 ("FDDI: defza: Add support for DEC FDDIcontroller 700 TURBOchannel adapter") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit b0b33b048dcfbd7da82c3cde4fab02751dfab4d6 Author: Vladimir Oltean Date: Tue Jul 13 12:37:19 2021 +0300 net: dsa: sja1105: fix address learning getting disabled on the CPU port In May 2019 when commit 640f763f98c2 ("net: dsa: sja1105: Add support for Spanning Tree Protocol") was introduced, the comment that "STP does not get called for the CPU port" was true. This changed after commit 0394a63acfe2 ("net: dsa: enable and disable all ports") in August 2019 and went largely unnoticed, because the sja1105_bridge_stp_state_set() method did nothing different compared to the static setup done by sja1105_init_mac_settings(). With the ability to turn address learning off introduced by the blamed commit, there is a new priv->learn_ena port mask in the driver. When sja1105_bridge_stp_state_set() gets called and we are in BR_STATE_LEARNING or later, address learning is enabled or not depending on priv->learn_ena & BIT(port). So what happens is that priv->learn_ena is not being set from anywhere for the CPU port, and the static configuration done by sja1105_init_mac_settings() is being overwritten. To solve this, acknowledge that the static configuration of STP state is no longer necessary because the STP state is being set by the DSA core now, but what is necessary is to set priv->learn_ena for the CPU port. Fixes: 4d9423549501 ("net: dsa: sja1105: offload bridge port flags to device") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e56c6bbd98dc1cefb6f9c5d795fd29016e4f2fe7 Author: Vladimir Oltean Date: Tue Jul 13 12:33:50 2021 +0300 net: ocelot: fix switchdev objects synced for wrong netdev with LAG offload The point with a *dev and a *brport_dev is that when we have a LAG net device that is a bridge port, *dev is an ocelot net device and *brport_dev is the bonding/team net device. The ocelot net device beneath the LAG does not exist from the bridge's perspective, so we need to sync the switchdev objects belonging to the brport_dev and not to the dev. Fixes: e4bd44e89dcf ("net: ocelot: replay switchdev events when joining bridge") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 01757f536ac825e3614d583fee9acb48c64ed084 Author: Yajun Deng Date: Tue Jul 13 10:48:24 2021 +0800 net: Use nlmsg_unicast() instead of netlink_unicast() It has 'if (err >0 )' statement in nlmsg_unicast(), so use nlmsg_unicast() instead of netlink_unicast(), this looks more concise. v2: remove the change in netfilter. Signed-off-by: Yajun Deng Reviewed-by: David Ahern Signed-off-by: David S. Miller commit adefab4ef308f43c80537bd28e059eed7f3517e4 Author: Aaron Liu Date: Tue Jul 13 14:54:47 2021 +0800 drm/amd/pm: Add waiting for response of mode-reset message for yellow carp Remove mdelay process and use smu_cmn_send_smc_msg_with_param to send mode-reset message to SMC. Signed-off-by: Aaron Liu Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5adcd7458a78120dddec6b53c9619acd8f4d5931 Author: Eric Huang Date: Fri Jul 9 14:59:20 2021 -0400 Revert "drm/amdkfd: Add heavy-weight TLB flush after unmapping" This reverts commit 1098d658bef05e5fee634aab0b6a1fa590cfca24. Reason for revert: it causes regressions on several Asics. Signed-off-by: Eric Huang Signed-off-by: Alex Deucher commit d605094394ee35afd22f8adbe4a4b7b5f0c143a2 Author: Eric Huang Date: Fri Jul 9 14:58:16 2021 -0400 Revert "drm/amdgpu: Add table_freed parameter to amdgpu_vm_bo_update" This reverts commit 075e8080c1a7571563171a07fa9ce47c4bc80044. Reason for revert: the related commit is reverted. Signed-off-by: Eric Huang Signed-off-by: Alex Deucher commit c37387c354c81eaf17bdc463727dcad1c951c0db Author: Eric Huang Date: Fri Jul 9 14:57:11 2021 -0400 Revert "drm/amdkfd: Make TLB flush conditional on mapping" This reverts commit 31f33243788dcbae8bd2819ed83923a73f7dfd30. Reason for revert: it causes regressions on several Asics. Signed-off-by: Eric Huang Signed-off-by: Alex Deucher commit 22762e376612be51a47c96d977bdc103c7a4436c Author: Eric Huang Date: Fri Jul 9 14:55:03 2021 -0400 Revert "drm/amdgpu: Fix warning of Function parameter or member not described" This reverts commit 7a68d188d1c4a9d947369acaa19040a58baaaeda. Reason for revert: the related commit is reverted. Signed-off-by: Eric Huang Signed-off-by: Alex Deucher commit f5cc09acece432d536c2e62c791b52760a25fa5c Author: Eric Huang Date: Fri Jul 9 14:51:34 2021 -0400 Revert "drm/amdkfd: Add memory sync before TLB flush on unmap" This reverts commit 3be4dca197010d1328df8b11febc8c40491be498. Reason for revert: it causes regressions on several Asics. Signed-off-by: Eric Huang Signed-off-by: Alex Deucher commit 06055d2e1ce83ba02b0073ff6f4fdb883fdb05c0 Author: Chengming Gui Date: Fri Jul 9 16:23:48 2021 +0800 drm/amd/pm: Fix BACO state setting for Beige_Goby Correct BACO state setting for Beige_Goby Signed-off-by: Chengming Gui Reviewed-by: Jiansong Chen Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 9be26ddf88de5621f071a1e4f7725ce1015b5036 Author: Emily.Deng Date: Thu Oct 1 12:41:50 2020 +0800 drm/amdgpu: Restore msix after FLR After FLR, the msix will be cleared, so need to re-enable it. Signed-off-by: Peng Ju Zhou Signed-off-by: Emily.Deng Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 99e7d65cccc8f54581eb961a50da676b79c966d0 Author: Felix Kuehling Date: Wed Jul 7 17:55:55 2021 -0400 drm/amdkfd: Allow CPU access for all VRAM BOs The thunk needs to mmap all BOs for CPU access to allow the debugger to access them. Invisible ones are mapped with PROT_NONE. Fixes: 71df0368e9b6 ("drm/amdgpu: Implement mmap as GEM object function") Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit c010efb7f0bc0c3cb2cd26b000f71d4bd0c427cd Author: Zhan Liu Date: Thu Jul 8 00:51:52 2021 -0400 drm/amdgpu/display - only update eDP's backlight level when necessary [Why] The original logic is to update eDP's backlight level on every amdgpu dm atomic commit, which causes excessive DMUB write. As a result, when playing game or moving window around, DMUB timeout and system lagging are observed. [How] We only need to update eDP's backlight level when current level doesn't match requested level. Signed-off-by: Zhan Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5017bf8214d929f6ff45c46ec21cd3c1bfc03dad Author: Philip Yang Date: Wed Jul 7 12:42:34 2021 -0400 drm/amdkfd: handle fault counters on invalid address prange is NULL if vm fault retry on invalid address, for this case, can not use prange to get pdd, use adev to get gpuidx and then get pdd instead, then increase pdd vm fault counter. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit fa8f311e9e3aa1d41f31f8b28f975c65f0b25c03 Author: Emily Deng Date: Tue May 12 18:27:21 2020 +0800 drm/amdgpu: Correct the irq numbers for virtual crtc The irq number should be decided by num_crtc, and the num_crtc could change by parameter. Signed-off-by: Emily Deng Reviewed by: Monk Liu Signed-off-by: Alex Deucher commit 834b8245d6bbd57900ca6c79d7f9e0279a8d51c2 Author: Xiaomeng Hou Date: Wed Jul 7 16:50:01 2021 +0800 drm/amd/display: update header file name Update the register header file name. Signed-off-by: Xiaomeng Hou Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 21cf0293d500f198ad886cbdcd3ff65f82b35edf Author: Xiaomeng Hou Date: Thu Jul 1 14:09:18 2021 +0800 drm/amd/pm: drop smu_v13_0_1.c|h files for yellow carp Since there's nothing special in smu implementation for yellow carp, it's better to reuse the common smu_v13_0 interfaces and drop the specific smu_v13_0_1.c|h files. v2: remove the duplicate register offset and shift mask header files as well. Signed-off-by: Xiaomeng Hou Reviewed-by: Lijo Lazar Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 9849e71ac0793c956883da3ca780484d3a226316 Author: Dmytro Laktyushkin Date: Tue Jun 15 15:11:31 2021 -0400 drm/amd/display: remove faulty assert Signed-off-by: Dmytro Laktyushkin Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dce9d910eb9e54c97e830637f4e3383a11bb7556 Author: Wesley Chalmers Date: Wed Jun 16 16:11:23 2021 -0400 Revert "drm/amd/display: Always write repeater mode regardless of LTTPR" This reverts commit 2b7605d73b97e2fa28e0817242e66ca968d2a7cb Some displays are not lighting up when put in LTTPR Transparent Mode Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e9cfe00ba8bd437da149a3c52712d4a73e249f45 Author: Nicholas Kazlauskas Date: Wed Jun 16 17:11:12 2021 -0400 drm/amd/display: Fix updating infoframe for DCN3.1 eDP [Why] We're only treating TMDS as a valid target for infoframe updates which results in PSR being unable to transition from state 4 to state 5. [How] Also allow infoframe updates for DCN3.1 - following how we handle this path for earlier ASIC as well. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 43a44c5322d1030d8f36ad679307c61f5b4e3716 Author: Luben Tuikov Date: Fri Jul 2 18:35:14 2021 -0400 drm/amdgpu: Return error if no RAS In amdgpu_ras_query_error_count() return an error if the device doesn't support RAS. This prevents that function from having to always set the values of the integer pointers (if set), and thus prevents function side effects--always to have to set values of integers if integer pointers set, regardless of whether RAS is supported or not--with this change this side effect is mitigated. Also, if no pointers are set, don't count, since we've no way of reporting the counts. Also, give this function a kernel-doc. Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Reported-by: Tom Rix Fixes: a46751fbcde505 ("drm/amdgpu: Fix RAS function interface") Signed-off-by: Luben Tuikov Reviewed-by: Alexander Deucher Signed-off-by: Alex Deucher commit 798c511548b946ae9ec123b0dfe197a5f29e63ec Author: Jingwen Chen Date: Thu Jul 1 10:19:17 2021 +0800 drm/amdgpu: SRIOV flr_work should take write_lock [Why] If flr_work takes read_lock, then other threads who takes read_lock can access hardware when host is doing vf flr. [How] flr_work should take write_lock to avoid this case. Signed-off-by: Jingwen Chen Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 8cdd23c23c3d481a43b4aa03dcb5738812831115 Author: Nathan Chancellor Date: Mon Jul 12 14:46:37 2021 -0700 arm64: Restrict ARM64_BTI_KERNEL to clang 12.0.0 and newer Commit 97fed779f2a6 ("arm64: bti: Provide Kconfig for kernel mode BTI") disabled CONFIG_ARM64_BTI_KERNEL when CONFIG_GCOV_KERNEL was enabled and compiling with clang because of warnings that were seen with allmodconfig because LLVM was not emitting PAC/BTI instructions for compiler generated functions: | warning: some functions compiled with BTI and some compiled without BTI | warning: not setting BTI in feature flags This dependency was fine for avoiding the warnings with allmodconfig until commit 51c2ee6d121c ("Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR"), which prevents CONFIG_GCOV_KERNEL from being enabled with clang 12.0.0 or older because those versions do not support the no_profile_instrument_function attribute. As a result, CONFIG_ARM64_BTI_KERNEL gets enabled with allmodconfig and there are more warnings like the ones above due to CONFIG_KASAN, which suffers from the same problem as CONFIG_GCOV_KERNEL. This was most likely not noticed at the time because allmodconfig + CONFIG_GCOV_KERNEL=n was not tested. defconfig + CONFIG_KASAN=y is enough to reproduce the same warnings as above. The root cause of the warnings was resolved in LLVM during the 12.0.0 release so rather than play whack-a-mole with the dependencies, just update CONFIG_ARM64_BTI_KERNEL to require clang 12.0.0, which will have all of the issues ironed out. Link: https://github.com/ClangBuiltLinux/linux/issues/1428 Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3010034706?check_suite_focus=true Link: https://github.com/ClangBuiltLinux/continuous-integration2/runs/3010035725?check_suite_focus=true Link: https://github.com/llvm/llvm-project/commit/a88c722e687e6780dcd6a58718350dc76fcc4cc9 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20210712214636.3134425-1-nathan@kernel.org Signed-off-by: Will Deacon commit 5acc7d3e8d342858405fbbc671221f676b547ce7 Author: Xuan Zhuo Date: Sat Jul 10 11:16:35 2021 +0800 xdp, net: Fix use-after-free in bpf_xdp_link_release The problem occurs between dev_get_by_index() and dev_xdp_attach_link(). At this point, dev_xdp_uninstall() is called. Then xdp link will not be detached automatically when dev is released. But link->dev already points to dev, when xdp link is released, dev will still be accessed, but dev has been released. dev_get_by_index() | link->dev = dev | | rtnl_lock() | unregister_netdevice_many() | dev_xdp_uninstall() | rtnl_unlock() rtnl_lock(); | dev_xdp_attach_link() | rtnl_unlock(); | | netdev_run_todo() // dev released bpf_xdp_link_release() | /* access dev. | use-after-free */ | [ 45.966867] BUG: KASAN: use-after-free in bpf_xdp_link_release+0x3b8/0x3d0 [ 45.967619] Read of size 8 at addr ffff00000f9980c8 by task a.out/732 [ 45.968297] [ 45.968502] CPU: 1 PID: 732 Comm: a.out Not tainted 5.13.0+ #22 [ 45.969222] Hardware name: linux,dummy-virt (DT) [ 45.969795] Call trace: [ 45.970106] dump_backtrace+0x0/0x4c8 [ 45.970564] show_stack+0x30/0x40 [ 45.970981] dump_stack_lvl+0x120/0x18c [ 45.971470] print_address_description.constprop.0+0x74/0x30c [ 45.972182] kasan_report+0x1e8/0x200 [ 45.972659] __asan_report_load8_noabort+0x2c/0x50 [ 45.973273] bpf_xdp_link_release+0x3b8/0x3d0 [ 45.973834] bpf_link_free+0xd0/0x188 [ 45.974315] bpf_link_put+0x1d0/0x218 [ 45.974790] bpf_link_release+0x3c/0x58 [ 45.975291] __fput+0x20c/0x7e8 [ 45.975706] ____fput+0x24/0x30 [ 45.976117] task_work_run+0x104/0x258 [ 45.976609] do_notify_resume+0x894/0xaf8 [ 45.977121] work_pending+0xc/0x328 [ 45.977575] [ 45.977775] The buggy address belongs to the page: [ 45.978369] page:fffffc00003e6600 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4f998 [ 45.979522] flags: 0x7fffe0000000000(node=0|zone=0|lastcpupid=0x3ffff) [ 45.980349] raw: 07fffe0000000000 fffffc00003e6708 ffff0000dac3c010 0000000000000000 [ 45.981309] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 45.982259] page dumped because: kasan: bad access detected [ 45.982948] [ 45.983153] Memory state around the buggy address: [ 45.983753] ffff00000f997f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 45.984645] ffff00000f998000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 45.985533] >ffff00000f998080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 45.986419] ^ [ 45.987112] ffff00000f998100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 45.988006] ffff00000f998180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 45.988895] ================================================================== [ 45.989773] Disabling lock debugging due to kernel taint [ 45.990552] Kernel panic - not syncing: panic_on_warn set ... [ 45.991166] CPU: 1 PID: 732 Comm: a.out Tainted: G B 5.13.0+ #22 [ 45.991929] Hardware name: linux,dummy-virt (DT) [ 45.992448] Call trace: [ 45.992753] dump_backtrace+0x0/0x4c8 [ 45.993208] show_stack+0x30/0x40 [ 45.993627] dump_stack_lvl+0x120/0x18c [ 45.994113] dump_stack+0x1c/0x34 [ 45.994530] panic+0x3a4/0x7d8 [ 45.994930] end_report+0x194/0x198 [ 45.995380] kasan_report+0x134/0x200 [ 45.995850] __asan_report_load8_noabort+0x2c/0x50 [ 45.996453] bpf_xdp_link_release+0x3b8/0x3d0 [ 45.997007] bpf_link_free+0xd0/0x188 [ 45.997474] bpf_link_put+0x1d0/0x218 [ 45.997942] bpf_link_release+0x3c/0x58 [ 45.998429] __fput+0x20c/0x7e8 [ 45.998833] ____fput+0x24/0x30 [ 45.999247] task_work_run+0x104/0x258 [ 45.999731] do_notify_resume+0x894/0xaf8 [ 46.000236] work_pending+0xc/0x328 [ 46.000697] SMP: stopping secondary CPUs [ 46.001226] Dumping ftrace buffer: [ 46.001663] (ftrace buffer empty) [ 46.002110] Kernel Offset: disabled [ 46.002545] CPU features: 0x00000001,23202c00 [ 46.003080] Memory Limit: none Fixes: aa8d3a716b59db6c ("bpf, xdp: Add bpf_link-based XDP attachment API") Reported-by: Abaci Signed-off-by: Xuan Zhuo Signed-off-by: Alexei Starovoitov Reviewed-by: Dust Li Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210710031635.41649-1-xuanzhuo@linux.alibaba.com commit 5dd0a6b8582ffbfa88351949d50eccd5b6694ade Author: Daniel Borkmann Date: Mon Jul 12 22:57:35 2021 +0200 bpf: Fix tail_call_reachable rejection for interpreter when jit failed During testing of f263a81451c1 ("bpf: Track subprog poke descriptors correctly and fix use-after-free") under various failure conditions, for example, when jit_subprogs() fails and tries to clean up the program to be run under the interpreter, we ran into the following freeze: [...] #127/8 tailcall_bpf2bpf_3:FAIL [...] [ 92.041251] BUG: KASAN: slab-out-of-bounds in ___bpf_prog_run+0x1b9d/0x2e20 [ 92.042408] Read of size 8 at addr ffff88800da67f68 by task test_progs/682 [ 92.043707] [ 92.044030] CPU: 1 PID: 682 Comm: test_progs Tainted: G O 5.13.0-53301-ge6c08cb33a30-dirty #87 [ 92.045542] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 [ 92.046785] Call Trace: [ 92.047171] ? __bpf_prog_run_args64+0xc0/0xc0 [ 92.047773] ? __bpf_prog_run_args32+0x8b/0xb0 [ 92.048389] ? __bpf_prog_run_args64+0xc0/0xc0 [ 92.049019] ? ktime_get+0x117/0x130 [...] // few hundred [similar] lines more [ 92.659025] ? ktime_get+0x117/0x130 [ 92.659845] ? __bpf_prog_run_args64+0xc0/0xc0 [ 92.660738] ? __bpf_prog_run_args32+0x8b/0xb0 [ 92.661528] ? __bpf_prog_run_args64+0xc0/0xc0 [ 92.662378] ? print_usage_bug+0x50/0x50 [ 92.663221] ? print_usage_bug+0x50/0x50 [ 92.664077] ? bpf_ksym_find+0x9c/0xe0 [ 92.664887] ? ktime_get+0x117/0x130 [ 92.665624] ? kernel_text_address+0xf5/0x100 [ 92.666529] ? __kernel_text_address+0xe/0x30 [ 92.667725] ? unwind_get_return_address+0x2f/0x50 [ 92.668854] ? ___bpf_prog_run+0x15d4/0x2e20 [ 92.670185] ? ktime_get+0x117/0x130 [ 92.671130] ? __bpf_prog_run_args64+0xc0/0xc0 [ 92.672020] ? __bpf_prog_run_args32+0x8b/0xb0 [ 92.672860] ? __bpf_prog_run_args64+0xc0/0xc0 [ 92.675159] ? ktime_get+0x117/0x130 [ 92.677074] ? lock_is_held_type+0xd5/0x130 [ 92.678662] ? ___bpf_prog_run+0x15d4/0x2e20 [ 92.680046] ? ktime_get+0x117/0x130 [ 92.681285] ? __bpf_prog_run32+0x6b/0x90 [ 92.682601] ? __bpf_prog_run64+0x90/0x90 [ 92.683636] ? lock_downgrade+0x370/0x370 [ 92.684647] ? mark_held_locks+0x44/0x90 [ 92.685652] ? ktime_get+0x117/0x130 [ 92.686752] ? lockdep_hardirqs_on+0x79/0x100 [ 92.688004] ? ktime_get+0x117/0x130 [ 92.688573] ? __cant_migrate+0x2b/0x80 [ 92.689192] ? bpf_test_run+0x2f4/0x510 [ 92.689869] ? bpf_test_timer_continue+0x1c0/0x1c0 [ 92.690856] ? rcu_read_lock_bh_held+0x90/0x90 [ 92.691506] ? __kasan_slab_alloc+0x61/0x80 [ 92.692128] ? eth_type_trans+0x128/0x240 [ 92.692737] ? __build_skb+0x46/0x50 [ 92.693252] ? bpf_prog_test_run_skb+0x65e/0xc50 [ 92.693954] ? bpf_prog_test_run_raw_tp+0x2d0/0x2d0 [ 92.694639] ? __fget_light+0xa1/0x100 [ 92.695162] ? bpf_prog_inc+0x23/0x30 [ 92.695685] ? __sys_bpf+0xb40/0x2c80 [ 92.696324] ? bpf_link_get_from_fd+0x90/0x90 [ 92.697150] ? mark_held_locks+0x24/0x90 [ 92.698007] ? lockdep_hardirqs_on_prepare+0x124/0x220 [ 92.699045] ? finish_task_switch+0xe6/0x370 [ 92.700072] ? lockdep_hardirqs_on+0x79/0x100 [ 92.701233] ? finish_task_switch+0x11d/0x370 [ 92.702264] ? __switch_to+0x2c0/0x740 [ 92.703148] ? mark_held_locks+0x24/0x90 [ 92.704155] ? __x64_sys_bpf+0x45/0x50 [ 92.705146] ? do_syscall_64+0x35/0x80 [ 92.706953] ? entry_SYSCALL_64_after_hwframe+0x44/0xae [...] Turns out that the program rejection from e411901c0b77 ("bpf: allow for tailcalls in BPF subprograms for x64 JIT") is buggy since env->prog->aux->tail_call_reachable is never true. Commit ebf7d1f508a7 ("bpf, x64: rework pro/epilogue and tailcall handling in JIT") added a tracker into check_max_stack_depth() which propagates the tail_call_reachable condition throughout the subprograms. This info is then assigned to the subprogram's func[i]->aux->tail_call_reachable. However, in the case of the rejection check upon JIT failure, env->prog->aux->tail_call_reachable is used. func[0]->aux->tail_call_reachable which represents the main program's information did not propagate this to the outer env->prog->aux, though. Add this propagation into check_max_stack_depth() where it needs to belong so that the check can be done reliably. Fixes: ebf7d1f508a7 ("bpf, x64: rework pro/epilogue and tailcall handling in JIT") Fixes: e411901c0b77 ("bpf: allow for tailcalls in BPF subprograms for x64 JIT") Co-developed-by: John Fastabend Signed-off-by: Daniel Borkmann Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/618c34e3163ad1a36b1e82377576a6081e182f25.1626123173.git.daniel@iogearbox.net commit 0af778269a522c988ef0b4188556aba97fb420cc Author: Zhen Lei Date: Mon Jul 12 16:55:44 2021 +0800 fbmem: Do not delete the mode that is still in use The execution of fb_delete_videomode() is not based on the result of the previous fbcon_mode_deleted(). As a result, the mode is directly deleted, regardless of whether it is still in use, which may cause UAF. ================================================================== BUG: KASAN: use-after-free in fb_mode_is_equal+0x36e/0x5e0 \ drivers/video/fbdev/core/modedb.c:924 Read of size 4 at addr ffff88807e0ddb1c by task syz-executor.0/18962 CPU: 2 PID: 18962 Comm: syz-executor.0 Not tainted 5.10.45-rc1+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ... Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x137/0x1be lib/dump_stack.c:118 print_address_description+0x6c/0x640 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report+0x13d/0x1e0 mm/kasan/report.c:562 fb_mode_is_equal+0x36e/0x5e0 drivers/video/fbdev/core/modedb.c:924 fbcon_mode_deleted+0x16a/0x220 drivers/video/fbdev/core/fbcon.c:2746 fb_set_var+0x1e1/0xdb0 drivers/video/fbdev/core/fbmem.c:975 do_fb_ioctl+0x4d9/0x6e0 drivers/video/fbdev/core/fbmem.c:1108 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 18960: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:56 kasan_set_free_info+0x17/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x108/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1541 [inline] slab_free_freelist_hook+0xd6/0x1a0 mm/slub.c:1574 slab_free mm/slub.c:3139 [inline] kfree+0xca/0x3d0 mm/slub.c:4121 fb_delete_videomode+0x56a/0x820 drivers/video/fbdev/core/modedb.c:1104 fb_set_var+0x1f3/0xdb0 drivers/video/fbdev/core/fbmem.c:978 do_fb_ioctl+0x4d9/0x6e0 drivers/video/fbdev/core/fbmem.c:1108 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 13ff178ccd6d ("fbcon: Call fbcon_mode_deleted/new_modelist directly") Signed-off-by: Zhen Lei Cc: # v5.3+ Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210712085544.2828-1-thunder.leizhen@huawei.com commit 4db1cb1338d914dca6225dd2bb1de37991167843 Merge: 1e7b5812f4890 34bd46bcf3de7 Author: Thomas Zimmermann Date: Tue Jul 13 15:55:57 2021 +0200 Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes Picking up left-over patches in drm-misc-next-fixes. commit 1e7b5812f4890ad84058bbb6c4a5deddfb2c5b25 Merge: e73f0f0ee7541 ffe000217c506 Author: Daniel Vetter Date: Tue Jul 13 15:15:16 2021 +0200 Merge tag 'drm-misc-fixes-2021-07-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * dma-buf: Fix fence leak in sync_file_merge() error code * drm/panel: nt35510: Don't fail on DSI reads Signed-off-by: Daniel Vetter From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YO07pEfweKVO+7y0@linux-uq9g commit bdb8742dc6f7c599c3d61959234fe4c23638727b Author: Cristian Marussi Date: Mon Jul 12 15:18:18 2021 +0100 firmware: arm_scmi: Fix range check for the maximum number of pending messages SCMI message headers carry a sequence number and such field is sized to allow for MSG_TOKEN_MAX distinct numbers; moreover zero is not really an acceptable maximum number of pending in-flight messages. Fix accordingly the checks performed on the value exported by transports in scmi_desc.max_msg Link: https://lore.kernel.org/r/20210712141833.6628-3-cristian.marussi@arm.com Reported-by: Vincent Guittot Signed-off-by: Cristian Marussi [sudeep.holla: updated the patch title and error message] Signed-off-by: Sudeep Holla commit 187a002b07e8089f0b5657eafec50b5d05625569 Author: Cristian Marussi Date: Mon Jun 28 18:00:42 2021 +0100 firmware: arm_scmi: Avoid padding in sensor message structure scmi_resp_sensor_reading_complete structure is meant to represent an SCMI asynchronous reading complete message. The readings field with a 64bit type forces padding and breaks reads in scmi_sensor_reading_get. Split it in two adjacent 32bit readings_low/high subfields to avoid the padding within the structure. Alternatively we could to mark the structure packed. Link: https://lore.kernel.org/r/20210628170042.34105-1-cristian.marussi@arm.com Fixes: e2083d3673916 ("firmware: arm_scmi: Add SCMI v3.0 sensors timestamped reads") Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit b98cf55ec0bd88bdba725845c743e94ecaf57b7e Author: Cristian Marussi Date: Mon Jul 12 15:35:04 2021 +0100 firmware: arm_scmi: Fix kernel doc warnings about return values Kernel doc validation script still complains about the following: |No description found for return value of 'scmi_get_protocol_device' |No description found for return value of 'scmi_devm_notifier_register' |No description found for return value of 'scmi_devm_notifier_unregister' Fix adding missing Return kernel-doc statements. Link: https://lore.kernel.org/r/20210712143504.33541-1-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 5ff6319d46cee22c9cd6f39a377e32c444f9a7b0 Author: Sudeep Holla Date: Mon Jul 12 11:27:48 2021 +0100 firmware: arm_scpi: Fix kernel doc warnings Kernel doc validation script is unhappy and complains with the below set of warnings. | Function parameter or member 'device_domain_id' not described in 'scpi_ops' | Function parameter or member 'get_transition_latency' not described in 'scpi_ops' | Function parameter or member 'add_opps_to_device' not described in 'scpi_ops' | Function parameter or member 'sensor_get_capability' not described in 'scpi_ops' | Function parameter or member 'sensor_get_info' not described in 'scpi_ops' | Function parameter or member 'sensor_get_value' not described in 'scpi_ops' | Function parameter or member 'device_get_power_state' not described in 'scpi_ops' | Function parameter or member 'device_set_power_state' not described in 'scpi_ops' Fix them adding appropriate documents or missing keywords. Link: https://lore.kernel.org/r/20210712130801.2436492-1-sudeep.holla@arm.com Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 52f83955aaf91b22f46765b007b4404ce85b2133 Author: Sudeep Holla Date: Mon Jul 12 14:08:01 2021 +0100 firmware: arm_scmi: Fix kernel doc warnings Kernel doc validation script is unhappy and complains with the below set of warnings. | Function parameter or member 'fast_switch_possible' not described in 'scmi_perf_proto_ops' | Function parameter or member 'power_scale_mw_get' not described in 'scmi_perf_proto_ops' | cannot understand function prototype: 'struct scmi_sensor_reading ' | cannot understand function prototype: 'struct scmi_range_attrs ' | cannot understand function prototype: 'struct scmi_sensor_axis_info ' | cannot understand function prototype: 'struct scmi_sensor_intervals_info ' Fix them adding appropriate documents or missing keywords. Link: https://lore.kernel.org/r/20210712130801.2436492-2-sudeep.holla@arm.com Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 251ef6f71be2adfd09546a26643426fe62585173 Author: Casey Chen Date: Wed Jul 7 14:14:32 2021 -0700 nvme-pci: do not call nvme_dev_remove_admin from nvme_remove nvme_dev_remove_admin could free dev->admin_q and the admin_tagset while they are being accessed by nvme_dev_disable(), which can be called by nvme_reset_work via nvme_remove_dead_ctrl. Commit cb4bfda62afa ("nvme-pci: fix hot removal during error handling") intended to avoid requests being stuck on a removed controller by killing the admin queue. But the later fix c8e9e9b7646e ("nvme-pci: unquiesce admin queue on shutdown"), together with nvme_dev_disable(dev, true) right before nvme_dev_remove_admin() could help dispatch requests and fail them early, so we don't need nvme_dev_remove_admin() any more. Fixes: cb4bfda62afa ("nvme-pci: fix hot removal during error handling") Signed-off-by: Casey Chen Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit e4b9852a0f4afe40604afb442e3af4452722050a Author: Casey Chen Date: Wed Jul 7 14:14:31 2021 -0700 nvme-pci: fix multiple races in nvme_setup_io_queues Below two paths could overlap each other if we power off a drive quickly after powering it on. There are multiple races in nvme_setup_io_queues() because of shutdown_lock missing and improper use of NVMEQ_ENABLED bit. nvme_reset_work() nvme_remove() nvme_setup_io_queues() nvme_dev_disable() ... ... A1 clear NVMEQ_ENABLED bit for admin queue lock retry: B1 nvme_suspend_io_queues() A2 pci_free_irq() admin queue B2 nvme_suspend_queue() admin queue A3 pci_free_irq_vectors() nvme_pci_disable() A4 nvme_setup_irqs(); B3 pci_free_irq_vectors() ... unlock A5 queue_request_irq() for admin queue set NVMEQ_ENABLED bit ... nvme_create_io_queues() A6 result = queue_request_irq(); set NVMEQ_ENABLED bit ... fail to allocate enough IO queues: A7 nvme_suspend_io_queues() goto retry If B3 runs in between A1 and A2, it will crash if irqaction haven't been freed by A2. B2 is supposed to free admin queue IRQ but it simply can't fulfill the job as A1 has cleared NVMEQ_ENABLED bit. Fix: combine A1 A2 so IRQ get freed as soon as the NVMEQ_ENABLED bit gets cleared. After solved #1, A2 could race with B3 if A2 is freeing IRQ while B3 is checking irqaction. A3 also could race with B2 if B2 is freeing IRQ while A3 is checking irqaction. Fix: A2 and A3 take lock for mutual exclusion. A3 could race with B3 since they could run free_msi_irqs() in parallel. Fix: A3 takes lock for mutual exclusion. A4 could fail to allocate all needed IRQ vectors if A3 and A4 are interrupted by B3. Fix: A4 takes lock for mutual exclusion. If A5/A6 happened after B2/B1, B3 will crash since irqaction is not NULL. They are just allocated by A5/A6. Fix: Lock queue_request_irq() and setting of NVMEQ_ENABLED bit. A7 could get chance to pci_free_irq() for certain IO queue while B3 is checking irqaction. Fix: A7 takes lock. nvme_dev->online_queues need to be protected by shutdown_lock. Since it is not atomic, both paths could modify it using its own copy. Co-developed-by: Yuanyuan Zhong Signed-off-by: Casey Chen Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 8b43ced64d2baca72a13caf2a7182f2853e054bd Author: Prabhakar Kushwaha Date: Tue Jul 13 11:31:56 2021 +0200 nvme-tcp: use __dev_get_by_name instead dev_get_by_name for OPT_HOST_IFACE dev_get_by_name() finds network device by name but it also increases the reference count. If a nvme-tcp queue is present and the network device driver is removed before nvme_tcp, we will face the following continuous log: "kernel:unregister_netdevice: waiting for to become free. Usage count = 2" And rmmod further halts. Similar case arises during reboot/shutdown with nvme-tcp queue present and both never completes. To fix this, use __dev_get_by_name() which finds network device by name without increasing any reference counter. Fixes: 3ede8f72a9a2 ("nvme-tcp: allow selecting the network interface for connections") Signed-off-by: Omkar Kulkarni Signed-off-by: Shai Malin Signed-off-by: Prabhakar Kushwaha Reviewed-by: Sagi Grimberg [hch: remove the ->ndev member entirely] Signed-off-by: Christoph Hellwig commit 432b52eea3dcf48083bafa4b2b6ef5b054ead609 Author: Geert Uytterhoeven Date: Mon Jul 12 12:16:57 2021 +0200 ARM: shmobile: defconfig: Restore graphical consoles As of commit f611b1e7624ccdbd ("drm: Avoid circular dependencies for CONFIG_FB"), CONFIG_FB is no longer auto-enabled. While CONFIG_FB may be considered unneeded for systems where graphics is provided by a DRM driver, R-Mobile A1 still relies on a frame buffer device driver for graphics support. Restore support for graphics on R-Mobile A1 and graphical consoles on DRM-based systems by explicitly enabling CONFIG_FB in the defconfig for Renesas ARM systems. Fixes: f611b1e7624ccdbd ("drm: Avoid circular dependencies for CONFIG_FB") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/2a4474be1d2c00c6ca97c2714844ea416a9ea9a9.1626084948.git.geert+renesas@glider.be commit e9ba16e68cce2f85e9f5d2eba5c0453f1a741fd2 Author: Ingo Molnar Date: Sun Jul 11 08:26:45 2021 +0200 smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining While this function is a static inline, and is only used once in local scope, certain Kconfig variations may cause it to be compiled as a standalone function: 89231bf0 : 89231bf0: 83 05 60 d9 45 89 01 addl $0x1,0x8945d960 89231bf7: 55 push %ebp Resulting in this build failure: WARNING: modpost: vmlinux.o(.text.unlikely+0x7fd5): Section mismatch in reference from the function idle_init() to the function .init.text:fork_idle() The function idle_init() references the function __init fork_idle(). This is often because idle_init lacks a __init annotation or the annotation of fork_idle is wrong. ERROR: modpost: Section mismatches detected. Certain USBSAN options x86-32 builds with CONFIG_CC_OPTIMIZE_FOR_SIZE=y seem to be causing this. So mark idle_init() as __always_inline to work around this compiler bug/feature. Signed-off-by: Ingo Molnar commit e48a12e546ecbfb0718176037eae0ad60598a29a Author: Ingo Molnar Date: Tue Jul 13 06:16:05 2021 +0200 jump_labels: Mark __jump_label_transform() as __always_inlined to work around aggressive compiler un-inlining In randconfig testing, certain UBSAN and CC Kconfig combinations with GCC 10.3.0: CONFIG_X86_32=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_UBSAN=y # CONFIG_UBSAN_TRAP is not set # CONFIG_UBSAN_BOUNDS is not set CONFIG_UBSAN_SHIFT=y # CONFIG_UBSAN_DIV_ZERO is not set CONFIG_UBSAN_UNREACHABLE=y CONFIG_UBSAN_BOOL=y # CONFIG_UBSAN_ENUM is not set # CONFIG_UBSAN_ALIGNMENT is not set # CONFIG_UBSAN_SANITIZE_ALL is not set ... produce this build warning (and build error if CONFIG_SECTION_MISMATCH_WARN_ONLY=y is set): WARNING: modpost: vmlinux.o(.text+0x4c1cc): Section mismatch in reference from the function __jump_label_transform() to the function .init.text:text_poke_early() The function __jump_label_transform() references the function __init text_poke_early(). This is often because __jump_label_transform lacks a __init annotation or the annotation of text_poke_early is wrong. ERROR: modpost: Section mismatches detected. The problem is that __jump_label_transform() gets uninlined by GCC, despite there being only a single local scope user of the 'static inline' function. Mark the function __always_inline instead, to work around this compiler bug/artifact. Signed-off-by: Ingo Molnar commit e181ad43887c6b6b5995e9b191666f04242d77eb Author: Gustavo A. R. Silva Date: Mon Jul 12 21:24:07 2021 -0500 drm/msm: Fix fall-through warning in msm_gem_new_impl() Fix the following fall-through warning: drivers/gpu/drm/msm/msm_gem.c: In function 'msm_gem_new_impl': drivers/gpu/drm/msm/msm_gem.c:1170:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 1170 | if (priv->has_cached_coherent) | ^ drivers/gpu/drm/msm/msm_gem.c:1173:2: note: here 1173 | default: | ^~~~~~~ by replacing the /* fallthrough */ comment with fallthrough; Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva commit 053c16ac89050ef0e8ab9dc1edaf157bf104c8c6 Author: Jaegeuk Kim Date: Wed Jun 30 17:51:17 2021 -0700 scsi: ufs: core: Add missing host_lock in ufshcd_vops_setup_xfer_req() This patch adds a host_lock which existed before on ufshcd_vops_setup_xfer_req(). Link: https://lore.kernel.org/r/20210701005117.3846179-1-jaegeuk@kernel.org Fixes: a45f937110fa ("scsi: ufs: Optimize host lock on transfer requests send/compl paths") Cc: Stanley Chu Cc: Can Guo Cc: Bean Huo Cc: Bart Van Assche Cc: Asutosh Das Reviewed-by: Bart Van Assche Signed-off-by: Jaegeuk Kim Signed-off-by: Martin K. Petersen commit aa0dc6a73309f1fc779f4560a60ee766a3891adc Author: Sreekanth Reddy Date: Wed Jul 7 13:47:56 2021 +0530 scsi: mpi3mr: Fix W=1 compilation warnings Fix for the following W=1 compilation warning: 'strncpy' output may be truncated copying 16 bytes from a string of length 64 Link: https://lore.kernel.org/r/20210707081756.20922-1-sreekanth.reddy@broadcom.com Reported-by: kernel test robot Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit bb6beabf2f79ea063750bf16e78b61e5a50f2d5c Author: Randy Dunlap Date: Thu Jul 8 09:57:23 2021 -0700 scsi: pm8001: Clean up kernel-doc and comments Fix kernel-doc warnings then test again, wash, rinse, find more, then repeat more/again. Also fix spellos, some grammar, and some punctuation. ../drivers/scsi/pm8001/pm8001_ctl.c:557: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** pm8001_ctl_fatal_log_show - fatal error logging ../drivers/scsi/pm8001/pm8001_ctl.c:577: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** non_fatal_log_show - non fatal error logging ../drivers/scsi/pm8001/pm8001_ctl.c:622: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst ** pm8001_ctl_gsm_log_show - gsm dump collection Link: https://lore.kernel.org/r/20210708165723.8594-1-rdunlap@infradead.org Cc: Jack Wang Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Acked-by: Jack Wang Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 8b3bdd99c092bbaeaa7d9eecb1a3e5dc9112002b Author: Steffen Maier Date: Fri Jul 2 18:09:22 2021 +0200 scsi: zfcp: Report port fc_security as unknown early during remote cable pull On remote cable pull, a zfcp_port keeps its status and only gets ZFCP_STATUS_PORT_LINK_TEST added. Only after an ADISC timeout, we would actually start port recovery and remove ZFCP_STATUS_COMMON_UNBLOCKED which zfcp_sysfs_port_fc_security_show() detected and reported as "unknown" instead of the old and possibly stale zfcp_port->connection_info. Add check for ZFCP_STATUS_PORT_LINK_TEST for timely "unknown" report. Link: https://lore.kernel.org/r/20210702160922.2667874-1-maier@linux.ibm.com Fixes: a17c78460093 ("scsi: zfcp: report FC Endpoint Security in sysfs") Cc: #5.7+ Reviewed-by: Benjamin Block Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen commit 93aa71ad7379900e61c8adff6a710a4c18c7c99b Author: Tyrel Datwyler Date: Thu Jul 1 13:56:59 2021 -0600 scsi: core: Fix bad pointer dereference when ehandler kthread is invalid Commit 66a834d09293 ("scsi: core: Fix error handling of scsi_host_alloc()") changed the allocation logic to call put_device() to perform host cleanup with the assumption that IDA removal and stopping the kthread would properly be performed in scsi_host_dev_release(). However, in the unlikely case that the error handler thread fails to spawn, shost->ehandler is set to ERR_PTR(-ENOMEM). The error handler cleanup code in scsi_host_dev_release() will call kthread_stop() if shost->ehandler != NULL which will always be the case whether the kthread was successfully spawned or not. In the case that it failed to spawn this has the nasty side effect of trying to dereference an invalid pointer when kthread_stop() is called. The following splat provides an example of this behavior in the wild: scsi host11: error handler thread failed to spawn, error = -4 Kernel attempted to read user page (10c) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on read at 0x0000010c Faulting instruction address: 0xc00000000818e9a8 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: ibmvscsi(+) scsi_transport_srp dm_multipath dm_mirror dm_region hash dm_log dm_mod fuse overlay squashfs loop CPU: 12 PID: 274 Comm: systemd-udevd Not tainted 5.13.0-rc7 #1 NIP: c00000000818e9a8 LR: c0000000089846e8 CTR: 0000000000007ee8 REGS: c000000037d12ea0 TRAP: 0300 Not tainted (5.13.0-rc7) MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 28228228 XER: 20040001 CFAR: c0000000089846e4 DAR: 000000000000010c DSISR: 40000000 IRQMASK: 0 GPR00: c0000000089846e8 c000000037d13140 c000000009cc1100 fffffffffffffffc GPR04: 0000000000000001 0000000000000000 0000000000000000 c000000037dc0000 GPR08: 0000000000000000 c000000037dc0000 0000000000000001 00000000fffff7ff GPR12: 0000000000008000 c00000000a049000 c000000037d13d00 000000011134d5a0 GPR16: 0000000000001740 c0080000190d0000 c0080000190d1740 c000000009129288 GPR20: c000000037d13bc0 0000000000000001 c000000037d13bc0 c0080000190b7898 GPR24: c0080000190b7708 0000000000000000 c000000033bb2c48 0000000000000000 GPR28: c000000046b28280 0000000000000000 000000000000010c fffffffffffffffc NIP [c00000000818e9a8] kthread_stop+0x38/0x230 LR [c0000000089846e8] scsi_host_dev_release+0x98/0x160 Call Trace: [c000000033bb2c48] 0xc000000033bb2c48 (unreliable) [c0000000089846e8] scsi_host_dev_release+0x98/0x160 [c00000000891e960] device_release+0x60/0x100 [c0000000087e55c4] kobject_release+0x84/0x210 [c00000000891ec78] put_device+0x28/0x40 [c000000008984ea4] scsi_host_alloc+0x314/0x430 [c0080000190b38bc] ibmvscsi_probe+0x54/0xad0 [ibmvscsi] [c000000008110104] vio_bus_probe+0xa4/0x4b0 [c00000000892a860] really_probe+0x140/0x680 [c00000000892aefc] driver_probe_device+0x15c/0x200 [c00000000892b63c] device_driver_attach+0xcc/0xe0 [c00000000892b740] __driver_attach+0xf0/0x200 [c000000008926f28] bus_for_each_dev+0xa8/0x130 [c000000008929ce4] driver_attach+0x34/0x50 [c000000008928fc0] bus_add_driver+0x1b0/0x300 [c00000000892c798] driver_register+0x98/0x1a0 [c00000000810eb60] __vio_register_driver+0x80/0xe0 [c0080000190b4a30] ibmvscsi_module_init+0x9c/0xdc [ibmvscsi] [c0000000080121d0] do_one_initcall+0x60/0x2d0 [c000000008261abc] do_init_module+0x7c/0x320 [c000000008265700] load_module+0x2350/0x25b0 [c000000008265cb4] __do_sys_finit_module+0xd4/0x160 [c000000008031110] system_call_exception+0x150/0x2d0 [c00000000800d35c] system_call_common+0xec/0x278 Fix this be nulling shost->ehandler when the kthread fails to spawn. Link: https://lore.kernel.org/r/20210701195659.3185475-1-tyreld@linux.ibm.com Fixes: 66a834d09293 ("scsi: core: Fix error handling of scsi_host_alloc()") Cc: stable@vger.kernel.org Reviewed-by: Ming Lei Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit fbf1a58701ecbf61211476277a77eaada6c091d4 Author: Bart Van Assche Date: Sat Jul 10 20:36:23 2021 -0700 scsi: fas216: Fix a build error Use SAM_STAT_GOOD instead of GOOD since GOOD has been removed. Link: https://lore.kernel.org/r/20210711033623.11267-1-bvanassche@acm.org Fixes: 3d45cefc8edd ("scsi: core: Drop obsolete Linux-specific SCSI status codes") Fixes: df1303147649 ("scsi: fas216: Use get_status_byte() to avoid using Linux-specific status codes") Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 422969bbb5af2f7226cf75cdb4aae02f46299dc2 Author: Bart Van Assche Date: Fri Jul 9 13:26:20 2021 -0700 scsi: core: Fix the documentation of the scsi_execute() time parameter The unit of the scsi_execute() timeout parameter is 1/HZ seconds instead of one second, just like the timeouts used in the block layer. Fix the documentation header above the definition of the scsi_execute() macro. Link: https://lore.kernel.org/r/20210709202638.9480-3-bvanassche@acm.org Fixes: "[SCSI] use scatter lists for all block pc requests and simplify hw handlers" # v2.6.16.28 Cc: "James E.J. Bottomley" Cc: Hannes Reinecke Cc: Ming Lei Cc: John Garry Reviewed-by: Avri Altman Reviewed-by: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 0c0f6299ba71faf610e311605e09e96331c45f28 Author: Paolo Pisati Date: Wed Jun 30 16:57:40 2021 +0200 selftests: memory-hotplug: avoid spamming logs with dump_page(), ratio limit hot-remove error test While the offline memory test obey ratio limit, the same test with error injection does not and tries to offline all the hotpluggable memory, spamming system logs with hundreds of thousands of dump_page() entries, slowing system down (to the point the test itself timesout and gets terminated) and excessive fs occupation: ... [ 9784.393354] page:c00c0000007d1b40 refcount:3 mapcount:0 mapping:c0000001fc03e950 index:0xe7b [ 9784.393355] def_blk_aops [ 9784.393356] flags: 0x3ffff800002062(referenced|active|workingset|private) [ 9784.393358] raw: 003ffff800002062 c0000001b9343a68 c0000001b9343a68 c0000001fc03e950 [ 9784.393359] raw: 0000000000000e7b c000000006607b18 00000003ffffffff c00000000490d000 [ 9784.393359] page dumped because: migration failure [ 9784.393360] page->mem_cgroup:c00000000490d000 [ 9784.393416] migrating pfn 1f46d failed ret:1 ... $ grep "page dumped because: migration failure" /var/log/kern.log | wc -l 2405558 $ ls -la /var/log/kern.log -rw-r----- 1 syslog adm 2256109539 Jun 30 14:19 /var/log/kern.log Signed-off-by: Paolo Pisati Acked-by: Krzysztof Kozlowski Signed-off-by: Shuah Khan commit df4b0807ca1a62822342d404b863eff933d15762 Author: SeongJae Park Date: Mon Jul 12 19:52:58 2021 +0000 kunit: tool: Assert the version requirement Commit 87c9c1631788 ("kunit: tool: add support for QEMU") on the 'next' tree adds 'from __future__ import annotations' in 'kunit_kernel.py'. Because it is supported on only >=3.7 Python, people using older Python will get below error: Traceback (most recent call last): File "./tools/testing/kunit/kunit.py", line 20, in import kunit_kernel File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 9 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined This commit adds a version assertion in 'kunit.py', so that people get more explicit error message like below: Traceback (most recent call last): File "./tools/testing/kunit/kunit.py", line 15, in assert sys.version_info >= (3, 7), "Python version is too old" AssertionError: Python version is too old Signed-off-by: SeongJae Park Acked-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 58c965d84e14196e762c803c50c7b207a9e352bc Author: Daniel Latypov Date: Wed Jun 23 12:09:19 2021 -0700 kunit: tool: remove unnecessary "annotations" import The import was working around the fact "tuple[T]" was used instead of typing.Tuple[T]. Convert it to use type.Tuple to be consistent with how the rest of the code is anotated. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit a72fa6304342a3ad749955fd9007695f761e12d6 Author: Daniel Latypov Date: Wed Jun 23 13:17:21 2021 -0700 Documentation: kunit: drop obsolete note about uml_abort for coverage Commit b6d5799b0b58 ("kunit: Add 'kunit_shutdown' option") changes KUnit to call kernel_halt() by default when done testing. This fixes the issue with not having .gcda files due to not calling atexit() handlers, and therefore we can stop recommending people manually tweak UML code. The need to use older versions of GCC (<=6) remains however, due to linktime issues, same as before. Note: There also might still be issues with .gcda files as well in newer versions. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit ed01ad3a2fac8fff63f441ead4f8653da053c65b Author: Rae Moar Date: Thu Jul 1 17:52:31 2021 +0000 kunit: tool: Fix error messages for cases of no tests and wrong TAP header This patch addresses misleading error messages reported by kunit_tool in two cases. First, in the case of TAP output having an incorrect header format or missing a header, the parser used to output an error message of 'no tests run!'. Now the parser outputs an error message of 'could not parse test results!'. As an example: Before: $ ./tools/testing/kunit/kunit.py parse /dev/null [ERROR] no tests run! ... After: $ ./tools/testing/kunit/kunit.py parse /dev/null [ERROR] could not parse test results! ... Second, in the case of TAP output with the correct header but no tests, the parser used to output an error message of 'could not parse test results!'. Now the parser outputs an error message of 'no tests run!'. As an example: Before: $ echo -e 'TAP version 14\n1..0' | ./tools/testing/kunit/kunit.py parse [ERROR] could not parse test results! After: $ echo -e 'TAP version 14\n1..0' | ./tools/testing/kunit/kunit.py parse [ERROR] no tests run! Additionally, this patch also corrects the tests in kunit_tool_test.py and adds a test to check the error in the case of TAP output with the correct header but no tests. Signed-off-by: Rae Moar Reviewed-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 7fef2edf7cc753b51f7ccc74993971b0a9c81eca Author: Christoph Hellwig Date: Mon Jul 12 17:50:01 2021 +0200 sd: don't mess with SD_MINORS for CONFIG_DEBUG_BLOCK_EXT_DEVT No need to give up the original sd minor even with this option, and if we did we'd also need to fix the number of minors for this configuration to actually work. Fixes: 7c3f828b522b0 ("block: refactor device number setup in __device_add_disk") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Tested-by: Guenter Roeck Signed-off-by: Linus Torvalds commit b0863f1927323110e3d0d69f6adb6a91018a9a3c Author: Alan Stern Date: Mon Jul 12 14:54:36 2021 -0400 USB: core: Fix incorrect pipe calculation in do_proc_control() When the user submits a control URB via usbfs, the user supplies the bRequestType value and the kernel uses it to compute the pipe value. However, do_proc_control() performs this computation incorrectly in the case where the bRequestType direction bit is set to USB_DIR_IN and the URB's transfer length is 0: The pipe's direction is also set to IN but it should be OUT, which is the direction the actual transfer will use regardless of bRequestType. Commit 5cc59c418fde ("USB: core: WARN if pipe direction != setup packet direction") added a check to compare the direction bit in the pipe value to a control URB's actual direction and to WARN if they are different. This can be triggered by the incorrect computation mentioned above, as found by syzbot. This patch fixes the computation, thus avoiding the WARNing. Reported-and-tested-by: syzbot+72af3105289dcb4c055b@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210712185436.GB326369@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 79789db03fdd77510cfb35cb4b3bd52b6c50c901 Author: Matthew Wilcox (Oracle) Date: Mon Jul 12 16:32:07 2021 +0100 mm: Make copy_huge_page() always available Rewrite copy_huge_page() and move it into mm/util.c so it's always available. Fixes an exposure of uninitialised memory on configurations with HUGETLB and UFFD enabled and MIGRATION disabled. Fixes: 8cc5fcbb5be8 ("mm, hugetlb: fix racy resv_huge_pages underflow on UFFDIO_COPY") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Mike Kravetz Signed-off-by: Linus Torvalds commit efdb6720b44b2f016d2a04b2c84e577e57ed84bd Author: Hugh Dickins Date: Sun Jul 11 20:10:49 2021 -0700 mm/rmap: fix munlocking Anon THP with mlocked ptes Many thanks to Kirill for reminding that PageDoubleMap cannot be relied on to warn of pte mappings in the Anon THP case; and a scan of subpages does not seem appropriate here. Note how follow_trans_huge_pmd() does not even mark an Anon THP as mlocked when compound_mapcount != 1: multiple mlocking of Anon THP is avoided, so simply return from page_mlock() in this case. Link: https://lore.kernel.org/lkml/cfa154c-d595-406-eb7d-eb9df730f944@google.com/ Fixes: d9770fcc1c0c ("mm/rmap: fix old bug: munlocking THP missed other mlocks") Reported-by: Kirill A. Shutemov Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Alistair Popple Cc: Jason Gunthorpe Cc: Ralph Campbell Cc: Christoph Hellwig Cc: Yang Shi Cc: Shakeel Butt Signed-off-by: Linus Torvalds commit 71ce9d92fc7089f287c3e95a981bdec7545a8588 Author: Colin Ian King Date: Mon Jul 12 15:37:50 2021 +0100 octeontx2-pf: Fix uninitialized boolean variable pps In the case where act->id is FLOW_ACTION_POLICE and also act->police.rate_bytes_ps > 0 or act->police.rate_pkt_ps is not > 0 the boolean variable pps contains an uninitialized value when function otx2_tc_act_set_police is called. Fix this by initializing pps to false. Addresses-Coverity: ("Uninitialized scalar variable)" Fixes: 68fbff68dbea ("octeontx2-pf: Add police action for TC flower") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 5796015fa968a3349027a27dcd04c71d95c53ba5 Author: Vasily Averin Date: Mon Jul 12 09:45:06 2021 +0300 ipv6: allocate enough headroom in ip6_finish_output2() When TEE target mirrors traffic to another interface, sk_buff may not have enough headroom to be processed correctly. ip_finish_output2() detect this situation for ipv4 and allocates new skb with enogh headroom. However ipv6 lacks this logic in ip_finish_output2 and it leads to skb_under_panic: skbuff: skb_under_panic: text:ffffffffc0866ad4 len:96 put:24 head:ffff97be85e31800 data:ffff97be85e317f8 tail:0x58 end:0xc0 dev:gre0 ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:110! invalid opcode: 0000 [#1] SMP PTI CPU: 2 PID: 393 Comm: kworker/2:2 Tainted: G OE 5.13.0 #13 Hardware name: Virtuozzo KVM, BIOS 1.11.0-2.vz7.4 04/01/2014 Workqueue: ipv6_addrconf addrconf_dad_work RIP: 0010:skb_panic+0x48/0x4a Call Trace: skb_push.cold.111+0x10/0x10 ipgre_header+0x24/0xf0 [ip_gre] neigh_connected_output+0xae/0xf0 ip6_finish_output2+0x1a8/0x5a0 ip6_output+0x5c/0x110 nf_dup_ipv6+0x158/0x1000 [nf_dup_ipv6] tee_tg6+0x2e/0x40 [xt_TEE] ip6t_do_table+0x294/0x470 [ip6_tables] nf_hook_slow+0x44/0xc0 nf_hook.constprop.34+0x72/0xe0 ndisc_send_skb+0x20d/0x2e0 ndisc_send_ns+0xd1/0x210 addrconf_dad_work+0x3c8/0x540 process_one_work+0x1d1/0x370 worker_thread+0x30/0x390 kthread+0x116/0x130 ret_from_fork+0x22/0x30 Signed-off-by: Vasily Averin Signed-off-by: David S. Miller commit a1739c307a072e46473a2ba239eb60e6d711c96c Author: Randy Dunlap Date: Sun Jul 11 15:31:47 2021 -0700 net: hdlc: rename 'mod_init' & 'mod_exit' functions to be module-specific Rename module_init & module_exit functions that are named "mod_init" and "mod_exit" so that they are unique in both the System.map file and in initcall_debug output instead of showing up as almost anonymous "mod_init". This is helpful for debugging and in determining how long certain module_init calls take to execute. Signed-off-by: Randy Dunlap Cc: Krzysztof Halasa Cc: netdev@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Martin Schiller Cc: linux-x25@vger.kernel.org Signed-off-by: David S. Miller commit c9538831b353b96cb37092c3d3e929d67fd43c5f Author: Zhu Yanjun Date: Thu Jul 8 02:47:52 2021 -0400 RDMA/irdma: Change the returned type to void Since the function irdma_sc_parse_fpm_commit_buf always returns 0, remove the returned value check and change the returned type to void. Fixes: 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs") Link: https://lore.kernel.org/r/20210708064752.797520-1-yanjun.zhu@linux.dev Signed-off-by: Zhu Yanjun Reviewed-by: Majd Dibbiny Acked-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit 514305ee0a1dade95c6ff1eb5735de5a329d1f89 Author: Lukas Bulwahn Date: Thu Jul 1 12:41:27 2021 +0200 RDMA/irdma: Make spdxcheck.py happy Commit 48d6b3336a9f ("RDMA/irdma: Add ABI definitions") adds ./include/uapi/rdma/irdma-abi.h with an additional unneeded closing bracket at the end of the SPDX-License-Identifier line. Hence, ./scripts/spdxcheck.py complains: include/uapi/rdma/irdma-abi.h: 1:77 Syntax error: ) Remove that closing bracket to make spdxcheck.py happy. Fixes: 48d6b3336a9f ("RDMA/irdma: Add ABI definitions") Link: https://lore.kernel.org/r/20210701104127.1877-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit 6407c69dc51fbd7cf7b6760cd8aefb105d96ff5b Author: Tatyana Nikolova Date: Wed Jul 7 14:14:55 2021 -0700 RDMA/irdma: Fix unused variable total_size warning Fix the following unused variable warning: drivers/infiniband/hw/irdma/uk.c:934:6: warning: variable 'total_size' set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210707211455.2076-1-tatyana.e.nikolova@intel.com Link: https://lkml.org/lkml/2021/7/1/726 Reported-by: kernel test robot Fixes: 551c46edc769 ("RDMA/irdma: Add user/kernel shared libraries") Signed-off-by: Mustafa Ismail Signed-off-by: Tatyana Nikolova Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0c23af52ccd1605926480b5dfd1dd857ef604611 Author: Naresh Kumar PBS Date: Sun Jul 11 06:31:36 2021 -0700 RDMA/bnxt_re: Fix stats counters Statistical counters are not incrementing in some adapter versions with newer FW. This is due to the stats context length mismatch between FW and driver. Since the L2 driver updates the length correctly, use the stats length from L2 driver while allocating the DMA'able memory and creating the stats context. Fixes: 9d6b648c3112 ("bnxt_en: Update firmware interface spec to 1.10.1.65.") Link: https://lore.kernel.org/r/1626010296-6076-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 1eb5f4a3ddd949af1abe947c02ad990c013dd620 Author: Gustavo A. R. Silva Date: Mon Jul 12 11:13:49 2021 -0500 mtd: cfi_util: Fix unreachable code issue Fix the following warning: drivers/mtd/chips/cfi_util.c:112:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] fallthrough; ^ include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough' # define fallthrough __attribute__((__fallthrough__)) ^ drivers/mtd/chips/cfi_util.c:168:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] fallthrough; ^ include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough' # define fallthrough __attribute__((__fallthrough__)) by placing the fallthrough; statement inside ifdeffery. Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva commit e8865537a68bb3032f449f5eb108fa8cd76ebb6d Author: Gustavo A. R. Silva Date: Mon Jul 12 11:09:13 2021 -0500 fcntl: Fix unreachable code in do_fcntl() Fix the following warning: fs/fcntl.c:373:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] fallthrough; ^ include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough' # define fallthrough __attribute__((__fallthrough__)) by placing the fallthrough; statement inside ifdeffery. Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva commit 1adee589cd6da2ead7f1b5dd82419eac59a2e2b0 Author: Gustavo A. R. Silva Date: Mon Jul 12 11:03:35 2021 -0500 kernel: debug: Fix unreachable code in gdb_serial_stub() Fix the following warning: kernel/debug/gdbstub.c:1049:4: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough] fallthrough; ^ include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough' # define fallthrough __attribute__((__fallthrough__) by placing the fallthrough; statement inside ifdeffery. Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva commit 40751c6c9bea6a5cfede7c61ee5f3cb1ab857029 Author: Nishanth Menon Date: Wed Jul 7 15:48:40 2021 -0500 scripts/spdxcheck.py: Strictly read license files in utf-8 Commit bc41a7f36469 ("LICENSES: Add the CC-BY-4.0 license") unfortunately introduced LICENSES/dual/CC-BY-4.0 in UTF-8 Unicode text While python will barf at it with: FAIL: 'ascii' codec can't decode byte 0xe2 in position 2109: ordinal not in range(128) Traceback (most recent call last): File "scripts/spdxcheck.py", line 244, in spdx = read_spdxdata(repo) File "scripts/spdxcheck.py", line 47, in read_spdxdata for l in open(el.path).readlines(): File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2109: ordinal not in range(128) While it is indeed debatable if 'Licensor.' used in the license file needs unicode quotes, instead, force spdxcheck to read utf-8. Reported-by: Rahul T R Signed-off-by: Nishanth Menon Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210707204840.30891-1-nm@ti.com Signed-off-by: Jonathan Corbet commit 5e21bb4e812566aef86fbb77c96a4ec0782286e4 Author: Xuan Zhuo Date: Thu Jul 8 16:04:09 2021 +0800 bpf, test: fix NULL pointer dereference on invalid expected_attach_type These two types of XDP progs (BPF_XDP_DEVMAP, BPF_XDP_CPUMAP) will not be executed directly in the driver, therefore we should also not directly run them from here. To run in these two situations, there must be further preparations done, otherwise these may cause a kernel panic. For more details, see also dev_xdp_attach(). [ 46.982479] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 46.984295] #PF: supervisor read access in kernel mode [ 46.985777] #PF: error_code(0x0000) - not-present page [ 46.987227] PGD 800000010dca4067 P4D 800000010dca4067 PUD 10dca6067 PMD 0 [ 46.989201] Oops: 0000 [#1] SMP PTI [ 46.990304] CPU: 7 PID: 562 Comm: a.out Not tainted 5.13.0+ #44 [ 46.992001] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/24 [ 46.995113] RIP: 0010:___bpf_prog_run+0x17b/0x1710 [ 46.996586] Code: 49 03 14 cc e8 76 f6 fe ff e9 ad fe ff ff 0f b6 43 01 48 0f bf 4b 02 48 83 c3 08 89 c2 83 e0 0f c0 ea 04 02 [ 47.001562] RSP: 0018:ffffc900005afc58 EFLAGS: 00010246 [ 47.003115] RAX: 0000000000000000 RBX: ffffc9000023f068 RCX: 0000000000000000 [ 47.005163] RDX: 0000000000000000 RSI: 0000000000000079 RDI: ffffc900005afc98 [ 47.007135] RBP: 0000000000000000 R08: ffffc9000023f048 R09: c0000000ffffdfff [ 47.009171] R10: 0000000000000001 R11: ffffc900005afb40 R12: ffffc900005afc98 [ 47.011172] R13: 0000000000000001 R14: 0000000000000001 R15: ffffffff825258a8 [ 47.013244] FS: 00007f04a5207580(0000) GS:ffff88842fdc0000(0000) knlGS:0000000000000000 [ 47.015705] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 47.017475] CR2: 0000000000000000 CR3: 0000000100182005 CR4: 0000000000770ee0 [ 47.019558] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 47.021595] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 47.023574] PKRU: 55555554 [ 47.024571] Call Trace: [ 47.025424] __bpf_prog_run32+0x32/0x50 [ 47.026296] ? printk+0x53/0x6a [ 47.027066] ? ktime_get+0x39/0x90 [ 47.027895] bpf_test_run.cold.28+0x23/0x123 [ 47.028866] ? printk+0x53/0x6a [ 47.029630] bpf_prog_test_run_xdp+0x149/0x1d0 [ 47.030649] __sys_bpf+0x1305/0x23d0 [ 47.031482] __x64_sys_bpf+0x17/0x20 [ 47.032316] do_syscall_64+0x3a/0x80 [ 47.033165] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 47.034254] RIP: 0033:0x7f04a51364dd [ 47.035133] 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 48 [ 47.038768] RSP: 002b:00007fff8f9fc518 EFLAGS: 00000213 ORIG_RAX: 0000000000000141 [ 47.040344] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f04a51364dd [ 47.041749] RDX: 0000000000000048 RSI: 0000000020002a80 RDI: 000000000000000a [ 47.043171] RBP: 00007fff8f9fc530 R08: 0000000002049300 R09: 0000000020000100 [ 47.044626] R10: 0000000000000004 R11: 0000000000000213 R12: 0000000000401070 [ 47.046088] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 47.047579] Modules linked in: [ 47.048318] CR2: 0000000000000000 [ 47.049120] ---[ end trace 7ad34443d5be719a ]--- [ 47.050273] RIP: 0010:___bpf_prog_run+0x17b/0x1710 [ 47.051343] Code: 49 03 14 cc e8 76 f6 fe ff e9 ad fe ff ff 0f b6 43 01 48 0f bf 4b 02 48 83 c3 08 89 c2 83 e0 0f c0 ea 04 02 [ 47.054943] RSP: 0018:ffffc900005afc58 EFLAGS: 00010246 [ 47.056068] RAX: 0000000000000000 RBX: ffffc9000023f068 RCX: 0000000000000000 [ 47.057522] RDX: 0000000000000000 RSI: 0000000000000079 RDI: ffffc900005afc98 [ 47.058961] RBP: 0000000000000000 R08: ffffc9000023f048 R09: c0000000ffffdfff [ 47.060390] R10: 0000000000000001 R11: ffffc900005afb40 R12: ffffc900005afc98 [ 47.061803] R13: 0000000000000001 R14: 0000000000000001 R15: ffffffff825258a8 [ 47.063249] FS: 00007f04a5207580(0000) GS:ffff88842fdc0000(0000) knlGS:0000000000000000 [ 47.065070] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 47.066307] CR2: 0000000000000000 CR3: 0000000100182005 CR4: 0000000000770ee0 [ 47.067747] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 47.069217] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 47.070652] PKRU: 55555554 [ 47.071318] Kernel panic - not syncing: Fatal exception [ 47.072854] Kernel Offset: disabled [ 47.073683] ---[ end Kernel panic - not syncing: Fatal exception ]--- Fixes: 9216477449f3 ("bpf: cpumap: Add the possibility to attach an eBPF program to cpumap") Fixes: fbee97feed9b ("bpf: Add support to attach bpf program to a devmap entry") Reported-by: Abaci Signed-off-by: Xuan Zhuo Signed-off-by: Daniel Borkmann Reviewed-by: Dust Li Acked-by: Jesper Dangaard Brouer Acked-by: David Ahern Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210708080409.73525-1-xuanzhuo@linux.alibaba.com commit f35e0cc25280cb0063b0e4481f99268fbd872ff3 Author: Baruch Siach Date: Tue Jul 6 08:44:00 2021 +0300 doc, af_xdp: Fix bind flags option typo Fix XDP_ZERO_COPY flag typo since it is actually named XDP_ZEROCOPY instead as per if_xdp.h uapi header. Signed-off-by: Baruch Siach Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/1656fdf94704e9e735df0f8b97667d8f26dd098b.1625550240.git.baruch@tkos.co.il commit dd925db6f07556061c11ab1fbfa4a0145ae6b438 Author: Sudeep Holla Date: Wed Jul 7 14:47:39 2021 +0100 firmware: arm_ffa: Fix a possible ffa_linux_errmap buffer overflow The ffa_linux_errmap buffer access index is supposed to range from 0-8 but it ranges from 1-9 instead. It reads one element out of bounds. It also changes the success into -EINVAL though ffa_to_linux_errno is never used in case of success, it is expected to work for success case too. It is slightly confusing code as the negative of the error code is used as index to the buffer. Fix it by negating it at the start and make it more readable. Link: https://lore.kernel.org/r/20210707134739.1869481-1-sudeep.holla@arm.com Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sudeep Holla commit ba684a31d3626c86cd9097e12d6ed57d224d077d Author: Sudeep Holla Date: Tue Jun 22 17:22:02 2021 +0100 firmware: arm_ffa: Fix the comment style clang produces the following warning: drivers/firmware/arm_ffa/driver.c:123: warning: expecting prototype for FF(). Prototype was for FFA_PAGE_SIZE() instead This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Fix the same by removing the kernel-doc style comment here. Link: https://lore.kernel.org/r/20210622162202.3485866-1-sudeep.holla@arm.com Reported-by: kernel test robot Signed-off-by: Sudeep Holla commit e362547addc39e4bb18ad5bdfd59ce4d512d0c08 Author: Uwe Kleine-König Date: Mon Jun 21 22:16:52 2021 +0200 firmware: arm_ffa: Simplify probe function When the driver core calls the probe callback it already checked that the devices match, so there is no need to call the match callback again. Link: https://lore.kernel.org/r/20210621201652.127611-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Sudeep Holla commit 92743071464fca5acbbe812d9a0d88de3eaaad36 Author: Uwe Kleine-König Date: Mon Jun 21 22:16:51 2021 +0200 firmware: arm_ffa: Ensure drivers provide a probe function The bus probe callback calls the driver callback without further checking. Better be safe than sorry and refuse registration of a driver without a probe function to prevent a NULL pointer exception. Link: https://lore.kernel.org/r/20210621201652.127611-1-u.kleine-koenig@pengutronix.de Fixes: e781858488b9 ("firmware: arm_ffa: Add initial FFA bus support for device enumeration") Signed-off-by: Uwe Kleine-König Signed-off-by: Sudeep Holla commit 7a691f16ccad05d770f813d9c4b4337a30c6d63f Author: Sudeep Holla Date: Wed Jul 7 14:50:28 2021 +0100 firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow The scmi_linux_errmap buffer access index is supposed to depend on the array size to prevent element out of bounds access. It uses SCMI_ERR_MAX to check bounds but that can mismatch with the array size. It also changes the success into -EIO though scmi_linux_errmap is never used in case of success, it is expected to work for success case too. It is slightly confusing code as the negative of the error code is used as index to the buffer. Fix it by negating it at the start and make it more readable. Link: https://lore.kernel.org/r/20210707135028.1869642-1-sudeep.holla@arm.com Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 5e469dac326555d2038d199a6329458cc82a34e5 Author: Sudeep Holla Date: Thu Jun 24 10:50:59 2021 +0100 firmware: arm_scmi: Ensure drivers provide a probe function The bus probe callback calls the driver callback without further checking. Better be safe than sorry and refuse registration of a driver without a probe function to prevent a NULL pointer exception. Link: https://lore.kernel.org/r/20210624095059.4010157-2-sudeep.holla@arm.com Fixes: 933c504424a2 ("firmware: arm_scmi: add scmi protocol bus to enumerate protocol devices") Reported-by: Uwe Kleine-König Tested-by: Cristian Marussi Reviewed-by: Cristian Marussi Acked-by: Uwe Kleine-König Signed-off-by: Sudeep Holla commit 38e0c99249f8f12e1450234a0f7fb357a1b73843 Author: Sudeep Holla Date: Thu Jun 24 10:50:58 2021 +0100 firmware: arm_scmi: Simplify device probe function on the bus When the driver core calls the probe callback it already checked that the devices match, so there is no need to call the match callback again. Link: https://lore.kernel.org/r/20210624095059.4010157-1-sudeep.holla@arm.com Suggested-by: Uwe Kleine-König Tested-by: Cristian Marussi Reviewed-by: Cristian Marussi Acked-by: Uwe Kleine-König Signed-off-by: Sudeep Holla commit c1132702c71f4b95db9435bac5fdc912881563e0 Author: Will Deacon Date: Mon Jul 12 13:10:00 2021 +0100 Revert "arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES)" This reverts commit 65688d2a05deb9f0671a7e2301eadbfe7e27c9e9. Unfortunately, the original Qualcomm Kryo cores integrated into the MSM8996 SoC feature an L2 cache with 128-byte lines which sits above the Point of Coherency. Consequently, we must restore ARCH_DMA_MINALIGN to its former ugly self so that non-coherent DMA can be performed safely on devices built using this SoC. Thanks to Jeffrey Hugo for confirming this with a hardware designer. Link: https://lore.kernel.org/r/CAOCk7NqdpUZFMSXfGjw0_1NaSK5gyTLgpS9kSdZn1jmBy-QkfA@mail.gmail.com/ Reported-by: Yassine Oudjana Link: https://lore.kernel.org/r/uHgsRacR8hJ7nW-I-pIcehzg-lNIn7NJvaL7bP9tfAftFsBjsgaY2qTjG9zyBgxHkjNL1WPNrD7YVv2JVD2_Wy-a5VTbcq-1xEi8ZnwrXBo=@protonmail.com Signed-off-by: Will Deacon commit e62e074814862cffd8e60a1bdf52d6b592a03675 Author: Carlos Bilbao Date: Thu Jul 8 07:15:42 2021 -0400 arm64: Add missing header in two files Add missing header on include/asm/smp_plat.h, as it calls function cpu_logical_map(). Also include it on kernel/cpufeature.c since it has calls to functions cpu_panic_kernel() and cpu_die_early(). Both files call functions defined on this header, make the header dependencies less fragile. Signed-off-by: Carlos Bilbao Acked-by: Mark Rutland Link: https://lore.kernel.org/r/4325940.LvFx2qVVIh@iron-maiden Signed-off-by: Will Deacon commit 5f34b1eb2f8d4bba7d6352e767ef84bee9096d97 Author: Mark Rutland Date: Mon Jul 12 10:00:43 2021 +0100 arm64: fix strlen() with CONFIG_KASAN_HW_TAGS When the kernel is built with CONFIG_KASAN_HW_TAGS and the CPU supports MTE, memory accesses are checked at 16-byte granularity, and out-of-bounds accesses can result in tag check faults. Our current implementation of strlen() makes unaligned 16-byte accesses (within a naturally aligned 4096-byte window), and can trigger tag check faults. This can be seen at boot time, e.g. | BUG: KASAN: invalid-access in __pi_strlen+0x14/0x150 | Read at addr f4ff0000c0028300 by task swapper/0/0 | Pointer tag: [f4], memory tag: [fe] | | CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.13.0-09550-g03c2813535a2-dirty #20 | Hardware name: linux,dummy-virt (DT) | Call trace: | dump_backtrace+0x0/0x1b0 | show_stack+0x1c/0x30 | dump_stack_lvl+0x68/0x84 | print_address_description+0x7c/0x2b4 | kasan_report+0x138/0x38c | __do_kernel_fault+0x190/0x1c4 | do_tag_check_fault+0x78/0x90 | do_mem_abort+0x44/0xb4 | el1_abort+0x40/0x60 | el1h_64_sync_handler+0xb0/0xd0 | el1h_64_sync+0x78/0x7c | __pi_strlen+0x14/0x150 | __register_sysctl_table+0x7c4/0x890 | register_leaf_sysctl_tables+0x1a4/0x210 | register_leaf_sysctl_tables+0xc8/0x210 | __register_sysctl_paths+0x22c/0x290 | register_sysctl_table+0x2c/0x40 | sysctl_init+0x20/0x30 | proc_sys_init+0x3c/0x48 | proc_root_init+0x80/0x9c | start_kernel+0x640/0x69c | __primary_switched+0xc0/0xc8 To fix this, we can reduce the (strlen-internal) MIN_PAGE_SIZE to 16 bytes when CONFIG_KASAN_HW_TAGS is selected. This will cause strlen() to align the base pointer downwards to a 16-byte boundary, and to discard the additional prefix bytes without counting them. All subsequent accesses will be 16-byte aligned 16-byte LDPs. While the comments say the body of the loop will access 32 bytes, this is performed as two 16-byte acceses, with the second made only if the first did not encounter a NUL byte, so the body of the loop will not over-read across a 16-byte boundary. No other string routines are affected. The other str*() routines will not make any access which straddles a 16-byte boundary, and the mem*() routines will only make acceses which straddle a 16-byte boundary when which is entirely within the bounds of the relevant base and size arguments. Fixes: 325a1de81287 ("arm64: Import updated version of Cortex Strings' strlen") Signed-off-by: Mark Rutland Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Marco Elver Cc: Robin Murphy Cc: Will Deacon Reviewed-by: Catalin Marinas Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20210712090043.20847-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit c30e5e9ff0c695a8bac813ff4d5216fd7fb51e4e Author: Christian Borntraeger Date: Thu Jul 8 11:41:21 2021 +0000 s390/defconfig: allow early device mapper disks doing make install on an Ubuntu that is installed on an LVM will fail to boot. Turns out that defconfig misses 2 device mapper related configs for the Ubuntu initramfs. Signed-off-by: Christian Borntraeger Reviewed-by: Steffen Maier Signed-off-by: Heiko Carstens commit 98f7cd23aa9563c06503991a0cd41f0cacc99f5f Author: Sven Schnelle Date: Fri Jul 9 16:49:43 2021 +0200 s390/vdso32: add vdso32.lds to targets This fixes a permanent rebuild of the 32 bit vdso. The RPM build process was first calling 'make bzImage' and 'make modules' as a second step. This caused a recompilation of vdso32.so, which in turn also changed the build-id of vmlinux. Fixes: 779df2248739 ("s390/vdso: add minimal compat vdso") Signed-off-by: Sven Schnelle Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit ffe000217c5068c5da07ccb1c0f8cce7ad767435 Author: Jason Ekstrand Date: Thu Jun 24 12:47:32 2021 -0500 dma-buf/sync_file: Don't leak fences on merge failure Each add_fence() call does a dma_fence_get() on the relevant fence. In the error path, we weren't calling dma_fence_put() so all those fences got leaked. Also, in the krealloc_array failure case, we weren't freeing the fences array. Instead, ensure that i and fences are always zero-initialized and dma_fence_put() all the fences and kfree(fences) on every error path. Signed-off-by: Jason Ekstrand Reviewed-by: Christian König Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file") Cc: Gustavo Padovan Cc: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210624174732.1754546-1-jason@jlekstrand.net Signed-off-by: Christian König commit c71f78a662611fe2c67f3155da19b0eff0f29762 Author: Maxim Schwalm Date: Mon Jul 12 03:50:11 2021 +0300 ASoC: rt5631: Fix regcache sync errors on resume The ALC5631 does not like multi-write accesses, avoid them. This fixes: rt5631 4-001a: Unable to sync registers 0x3a-0x3c. -121 errors on resume from suspend (and all registers after the registers in the error not being synced). Inspired by commit 2d30e9494f1e ("ASoC: rt5651: Fix regcache sync errors on resume") from Hans de Geode, which fixed the same errors on ALC5651. Signed-off-by: Maxim Schwalm Link: https://lore.kernel.org/r/20210712005011.28536-1-digetx@gmail.com Signed-off-by: Mark Brown commit 2e2832562c877e6530b8480982d99a4ff90c6777 Author: Alan Young Date: Fri Jul 9 09:48:54 2021 +0100 ALSA: pcm: Call substream ack() method upon compat mmap commit If a 32-bit application is being used with a 64-bit kernel and is using the mmap mechanism to write data, then the SNDRV_PCM_IOCTL_SYNC_PTR ioctl results in calling snd_pcm_ioctl_sync_ptr_compat(). Make this use pcm_lib_apply_appl_ptr() so that the substream's ack() method, if defined, is called. The snd_pcm_sync_ptr() function, used in the 64-bit ioctl case, already uses snd_pcm_ioctl_sync_ptr_compat(). Fixes: 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is updated") Signed-off-by: Alan Young Cc: Link: https://lore.kernel.org/r/c441f18c-eb2a-3bdd-299a-696ccca2de9c@gmail.com Signed-off-by: Takashi Iwai commit 11169c6e44aec89edbeb8590a048f1c2c0a583b1 Merge: 6c621b811f99f 0dfc21c1a4cac Author: Mark Brown Date: Mon Jul 12 11:30:22 2021 +0100 Merge series "arm64: tegra: Enable audio IOMMU support on Tegra194" from Thierry Reding Thierry Reding : From: Thierry Reding This small series addresses a minor issue with how IOMMU support is wired up on various Tegra generations. Currently the virtual "card" device is used to allocate DMA memory for, but since that device does not actually exist, the path to memory cannot be correctly described. To address this, this series moves to using the ADMAIF as the DMA device for audio. This is a real device that can have a proper DMA mask set and with which a stream ID can be associated with in the SMMU. The memory accesses technically originate from the ADMA controller (that the ADMAIF uses), but DMA channel are dynamically allocated at runtime while DMA memory is allocated at driver load time, drivers won't have access to the ADMA device yet. Further patches will be required to correct this issue on Tegra186 and Tegra210, but I wanted to get feedback on this approach first. Changes in v2: - add backwards-compatibility fallback Thierry Thierry Reding (2): ASoC: tegra: Use ADMAIF component for DMA allocations arm64: tegra: Enable audio IOMMU support on Tegra194 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 4 ++++ sound/soc/tegra/tegra_pcm.c | 30 ++++++++++++++---------- 2 files changed, 22 insertions(+), 12 deletions(-) -- 2.32.0 commit c3e67ad6f5a2c698a055fb297c6f9962f5145edd Author: Biju Das Date: Sat Jun 26 09:13:39 2021 +0100 dt-bindings: clock: r9a07g044-cpg: Update clock/reset definitions Update clock and reset definitions as per RZ/G2L_clock_list_r02_02.xlsx and RZ/G2L HW(Rev.0.50) manual. Update {GIC,IA55,SCIF} clock and reset entries in the CPG driver, and separate reset from module clocks in order to handle them efficiently. Update the SCIF0 clock and reset index in the SoC DTSI. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210626081344.5783-6-biju.das.jz@bp.renesas.com Link: https://lore.kernel.org/r/20210626081344.5783-7-biju.das.jz@bp.renesas.com Link: https://lore.kernel.org/r/20210626081344.5783-8-biju.das.jz@bp.renesas.com [geert: Squashed 3 commits] Signed-off-by: Geert Uytterhoeven commit 668756f7299d2d3c75add17cb415717e247450ef Author: Biju Das Date: Sat Jun 26 09:13:38 2021 +0100 clk: renesas: r9a07g044: Add P2 Clock support Add support for P2 clock which is sourced from pll3_div2_4_2. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210626081344.5783-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fd8c3f6c36eb093039d4aeb20cceee00c7c6ba1a Author: Biju Das Date: Sat Jun 26 09:13:37 2021 +0100 clk: renesas: r9a07g044: Fix P1 Clock As per RZ/G2L HW Manual(Rev.0.50) P1 is sourced from pll3_div2_4. So fix the clock definitions for P1. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210626081344.5783-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e93c1373613fb2f3e59db5f13271f155820e6a67 Author: Biju Das Date: Sat Jun 26 09:13:36 2021 +0100 clk: renesas: r9a07g044: Rename divider table As per RZ/G2L HW Manual (Rev.0.50), CPG_PL3A_DDIV,CPG_PL3B_DDIV and CPG_PL2_DDIV(for P0) shares same divider table entries. Rename clk_div_table dtable_3b to clk_div_table dtable_1_32 so that it can be reused. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210626081344.5783-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 2fa9fd69b3ee015a873e44f7c645ad7bcb79d290 Author: Biju Das Date: Sat Jun 26 09:13:35 2021 +0100 clk: renesas: rzg2l: Add multi clock PM support Add multi clock PM support for cpg driver. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210626081344.5783-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 94b619a07655805a1622484967754f5848640456 Author: Marco De Marco Date: Mon Jul 5 19:44:21 2021 +0000 USB: serial: option: add support for u-blox LARA-R6 family The patch is meant to support LARA-R6 Cat 1 module family. Module USB ID: Vendor ID: 0x05c6 Product ID: 0x90fA Interface layout: If 0: Diagnostic If 1: AT parser If 2: AT parser If 3: QMI wwan (not available in all versions) Signed-off-by: Marco De Marco Link: https://lore.kernel.org/r/49260184.kfMIbaSn9k@mars Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 81eb1d17115fba5ea67a4939a136888a7ec05c32 Author: Gustavo A. R. Silva Date: Mon Jul 12 00:51:03 2021 -0500 drm/i915: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a return; statement: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:65:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 4020f26b368c3e72450afedaefc2fd07ba301d20 Author: Gustavo A. R. Silva Date: Mon Jul 12 00:47:57 2021 -0500 nfp: flower-ct: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix the following warning by explicitly adding a break statement: drivers/net/ethernet/netronome/nfp/flower/conntrack.c:1175:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit d5c9d0a207f4c61734ccd4b51818788e8b86296a Author: Gustavo A. R. Silva Date: Mon Jul 12 00:44:53 2021 -0500 mt76: mt7921: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix the following warning by explicitly adding a break statement: drivers/net/wireless/mediatek/mt76/mt7921/main.c:392:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 5937e00017f1d1dd4551e723ebfa306671f27843 Author: Gustavo A. R. Silva Date: Tue Jun 15 09:09:14 2021 -0500 xfs: Fix multiple fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix the following warnings by replacing /* fallthrough */ comments, and its variants, with the new pseudo-keyword macro fallthrough: fs/xfs/libxfs/xfs_attr.c:487:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:500:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:532:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:594:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:607:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:1410:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:1445:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_attr.c:1473:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Notice that Clang doesn't recognize /* fallthrough */ comments as implicit fall-through markings, so in order to globally enable -Wimplicit-fallthrough for Clang, these comments need to be replaced with fallthrough; in the whole codebase. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 Author: Peter Hess Date: Tue Jul 6 14:16:09 2021 +0200 spi: mediatek: fix fifo rx mode In FIFO mode were two problems: - RX mode was never handled and - in this case the tx_buf pointer was NULL and caused an exception fix this by handling RX mode in mtk_spi_fifo_transfer Fixes: a568231f4632 ("spi: mediatek: Add spi bus for Mediatek MT8173") Signed-off-by: Peter Hess Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20210706121609.680534-1-linux@fw-web.de Signed-off-by: Mark Brown commit 69e1818ad27bae167eeaaf6829d4a08900ef5153 Author: Dan Sneddon Date: Tue Jun 29 12:22:18 2021 -0700 spi: atmel: Fix CS and initialization bug Commit 5fa5e6dec762 ("spi: atmel: Switch to transfer_one transfer method") switched to using transfer_one and set_cs. The core doesn't call set_cs when the chip select lines are gpios. Add the SPI_MASTER_GPIO_SS flag to the driver to ensure the calls to set_cs happen since the driver programs configuration registers there. Fixes: 5fa5e6dec762 ("spi: atmel: Switch to transfer_one transfer method") Signed-off-by: Dan Sneddon Link: https://lore.kernel.org/r/20210629192218.32125-1-dan.sneddon@microchip.com Signed-off-by: Mark Brown commit 1c73daee4bf30ccdff5e86dc400daa6f74735da5 Author: Axel Lin Date: Wed Jun 30 17:59:59 2021 +0800 regulator: hi6421: Fix getting wrong drvdata Since config.dev = pdev->dev.parent in current code, so dev_get_drvdata(rdev->dev.parent) call in hi6421_regulator_enable returns the drvdata of the mfd device rather than the regulator. Fix it. This was broken while converting to use simplified DT parsing because the config.dev changed from pdev->dev to pdev->dev.parent for parsing the parent's of_node. Fixes: 29dc269a85ef ("regulator: hi6421: Convert to use simplified DT parsing") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210630095959.2411543-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 6c621b811f99feb3941f04b386795b45f47cd771 Author: Mark Brown Date: Wed Jul 7 17:02:34 2021 +0100 ASoC: tlv320aic31xx: Make regmap cache only on probe() Currently the tlv320aic31xx driver has regulator support but does not enable the regulators during probe, deferring this until something causes ASoC to make the card active. It does put the device into cache only mode but only when the component level probe is called, however if interrupts are in use the driver will access the regmap before then which if the regulators are not powered on would cause I/O problems. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210707160234.16253-1-broonie@kernel.org Signed-off-by: Mark Brown commit 2169d6a0f0721935410533281fc7e87e4e2322d1 Author: Marek Vasut Date: Thu Jul 8 11:12:55 2021 +0200 ASoC: tlv320aic32x4: Fix TAS2505 volume controls None of the TAS2505 outputs are stereo, do not pretend they are by implementing them using SOC*DOUBLE* macros referencing the same register twice, use SOC*SINGLE* instead. Fix volume ranges and mute control for the codec according to datasheet. Fixes: b4525b6196cd7 ("ASoC: tlv320aic32x4: add support for TAS2505") Signed-off-by: Marek Vasut Cc: Claudius Heine Cc: Mark Brown Link: https://lore.kernel.org/r/20210708091255.56502-1-marex@denx.de Signed-off-by: Mark Brown commit 0dfc21c1a4cac321749a53c92da616d9546d00e3 Author: Thierry Reding Date: Thu Jul 8 12:34:31 2021 +0200 ASoC: tegra: Use ADMAIF component for DMA allocations DMA memory is currently allocated for the soundcard device, which is a virtual device added for the sole purpose of "stitching" together the audio device. It is not a real device and therefore doesn't have a DMA mask or a description of the path to and from memory of accesses. Memory accesses really originate from the ADMA controller that provides the DMA channels used by the PCM component. However, since the DMA memory is allocated up-front and the DMA channels aren't known at that point, there is no way of knowing the DMA channel provider at allocation time. The next best physical device in the memory path is the ADMAIF. Use it as the device to allocate DMA memory to. iommus and interconnects device tree properties can thus be added to the ADMAIF device tree node to describe the memory access path for audio. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210708103432.1690385-2-thierry.reding@gmail.com Signed-off-by: Mark Brown commit 1b48773f9fd09f311d1166ce1dd50652ebe05218 Author: Pavel Begunkov Date: Sun Jul 11 22:41:13 2021 +0100 io_uring: fix io_drain_req() io_drain_req() return whether the request has been consumed or not, not an error code. Fix a stupid mistake slipped from optimisation patches. Reported-by: syzbot+ba6fcd859210f4e9e109@syzkaller.appspotmail.com Fixes: 76cc33d79175a ("io_uring: refactor io_req_defer()") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4d3c53c4274ffff307c8ae062fc7fda63b978df2.1626039606.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9c6882608bce249a8918744ecdb65748534e3f17 Author: Pavel Begunkov Date: Sat Jul 10 02:45:59 2021 +0100 io_uring: use right task for exiting checks When we use delayed_work for fallback execution of requests, current will be not of the submitter task, and so checks in io_req_task_submit() may not behave as expected. Currently, it leaves inline completions not flushed, so making io_ring_exit_work() to hang. Use the submitter task for all those checks. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cb413c715bed0bc9c98b169059ea9c8a2c770715.1625881431.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e73f0f0ee7541171d89f2e2491130c7771ba58d3 Author: Linus Torvalds Date: Sun Jul 11 15:07:40 2021 -0700 Linux 5.14-rc1 commit 6c855fce2e62e5e9b796b23fe15be1d8b2c8bee2 Author: Hugh Dickins Date: Wed Jul 7 13:13:33 2021 -0700 mm/rmap: try_to_migrate() skip zone_device !device_private I know nothing about zone_device pages and !device_private pages; but if try_to_migrate_one() will do nothing for them, then it's better that try_to_migrate() filter them first, than trawl through all their vmas. Signed-off-by: Hugh Dickins Reviewed-by: Shakeel Butt Reviewed-by: Alistair Popple Link: https://lore.kernel.org/lkml/1241d356-8ec9-f47b-a5ec-9b2bf66d242@google.com/ Cc: Andrew Morton Cc: Jason Gunthorpe Cc: Ralph Campbell Cc: Christoph Hellwig Cc: Yang Shi Cc: Kirill A. Shutemov Signed-off-by: Linus Torvalds commit 023e1a8dd502405ba378a7fbb1ce62beb0616708 Author: Hugh Dickins Date: Wed Jul 7 13:11:24 2021 -0700 mm/rmap: fix new bug: premature return from page_mlock_one() In the unlikely race case that page_mlock_one() finds VM_LOCKED has been cleared by the time it got page table lock, page_vma_mapped_walk_done() must be called before returning, either explicitly, or by a final call to page_vma_mapped_walk() - otherwise the page table remains locked. Fixes: cd62734ca60d ("mm/rmap: split try_to_munlock from try_to_unmap") Signed-off-by: Hugh Dickins Reviewed-by: Alistair Popple Reviewed-by: Shakeel Butt Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/20210711151446.GB4070@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/lkml/f71f8523-cba7-3342-40a7-114abc5d1f51@google.com/ Cc: Andrew Morton Cc: Jason Gunthorpe Cc: Ralph Campbell Cc: Christoph Hellwig Cc: Yang Shi Cc: Kirill A. Shutemov Signed-off-by: Linus Torvalds commit d9770fcc1c0c5b3e77dfac83b47defa3981fa7cd Author: Hugh Dickins Date: Wed Jul 7 13:08:53 2021 -0700 mm/rmap: fix old bug: munlocking THP missed other mlocks The kernel recovers in due course from missing Mlocked pages: but there was no point in calling page_mlock() (formerly known as try_to_munlock()) on a THP, because nothing got done even when it was found to be mapped in another VM_LOCKED vma. It's true that we need to be careful: Mlocked accounting of pte-mapped THPs is too difficult (so consistently avoided); but Mlocked accounting of only-pmd-mapped THPs is supposed to work, even when multiple mappings are mlocked and munlocked or munmapped. Refine the tests. There is already a VM_BUG_ON_PAGE(PageDoubleMap) in page_mlock(), so page_mlock_one() does not even have to worry about that complication. (I said the kernel recovers: but would page reclaim be likely to split THP before rediscovering that it's VM_LOCKED? I've not followed that up) Fixes: 9a73f61bdb8a ("thp, mlock: do not mlock PTE-mapped file huge pages") Signed-off-by: Hugh Dickins Reviewed-by: Shakeel Butt Acked-by: Kirill A. Shutemov Link: https://lore.kernel.org/lkml/cfa154c-d595-406-eb7d-eb9df730f944@google.com/ Cc: Andrew Morton Cc: Alistair Popple Cc: Jason Gunthorpe Cc: Ralph Campbell Cc: Christoph Hellwig Cc: Yang Shi Signed-off-by: Linus Torvalds commit 64b586d1922384710de2ce3c8c67e7ea0b6ffb57 Author: Hugh Dickins Date: Wed Jul 7 13:06:17 2021 -0700 mm/rmap: fix comments left over from recent changes Parallel developments in mm/rmap.c have left behind some out-of-date comments: try_to_migrate_one() also accepts TTU_SYNC (already commented in try_to_migrate() itself), and try_to_migrate() returns nothing at all. TTU_SPLIT_FREEZE has just been deleted, so reword the comment about it in mm/huge_memory.c; and TTU_IGNORE_ACCESS was removed in 5.11, so delete the "recently referenced" comment from try_to_unmap_one() (once upon a time the comment was near the removed codeblock, but they drifted apart). Signed-off-by: Hugh Dickins Reviewed-by: Shakeel Butt Reviewed-by: Alistair Popple Link: https://lore.kernel.org/lkml/563ce5b2-7a44-5b4d-1dfd-59a0e65932a9@google.com/ Cc: Andrew Morton Cc: Jason Gunthorpe Cc: Ralph Campbell Cc: Christoph Hellwig Cc: Yang Shi Cc: Kirill A. Shutemov Signed-off-by: Linus Torvalds commit d2eecc596bdf9ca93b3df41e6f38695be37cb2e3 Merge: a5de4be0aaaa6 000b7287b6755 Author: David S. Miller Date: Sun Jul 11 12:11:06 2021 -0700 Merge branch 'bridge-mc-fixes' Nikolay Aleksandrov says: ==================== net: bridge: multicast: fix automatic router port marking races While working on per-vlan multicast snooping I found two race conditions when multicast snooping is enabled. They're identical and happen when the router port list is modified without the multicast lock. One requires a PIM hello message to be received on a port and the other an MRD advertisement. To fix them we just need to take the multicast_lock when adding the ports to the router port list (marking them as router ports). Tested on an affected setup by generating the required packets while modifying the port list in parallel. ==================== Signed-off-by: David S. Miller commit 000b7287b67555fee39d39fff75229dedde0dcbf Author: Nikolay Aleksandrov Date: Sun Jul 11 12:56:29 2021 +0300 net: bridge: multicast: fix MRD advertisement router port marking race When an MRD advertisement is received on a bridge port with multicast snooping enabled, we mark it as a router port automatically, that includes adding that port to the router port list. The multicast lock protects that list, but it is not acquired in the MRD advertisement case leading to a race condition, we need to take it to fix the race. Cc: stable@vger.kernel.org Cc: linus.luessing@c0d3.blue Fixes: 4b3087c7e37f ("bridge: Snoop Multicast Router Advertisements") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 04bef83a3358946bfc98a5ecebd1b0003d83d882 Author: Nikolay Aleksandrov Date: Sun Jul 11 12:56:28 2021 +0300 net: bridge: multicast: fix PIM hello router port marking race When a PIM hello packet is received on a bridge port with multicast snooping enabled, we mark it as a router port automatically, that includes adding that port the router port list. The multicast lock protects that list, but it is not acquired in the PIM message case leading to a race condition, we need to take it to fix the race. Cc: stable@vger.kernel.org Fixes: 91b02d3d133b ("bridge: mcast: add router port on PIM hello message") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 98f7fdced2e0efb1599a37b3e57671a7884f3a25 Merge: 877029d9216dc 48400483565f0 Author: Linus Torvalds Date: Sun Jul 11 11:17:57 2021 -0700 Merge tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Two fixes: - Fix a MIPS IRQ handling RCU bug - Remove a DocBook annotation for a parameter that doesn't exist anymore" * tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry genirq/irqdesc: Drop excess kernel-doc entry @lookup commit 877029d9216dcc842f50d37571f318cd17a30a2d Merge: 936b664fb2089 3e1493f463906 Author: Linus Torvalds Date: Sun Jul 11 11:13:57 2021 -0700 Merge tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Three fixes: - Fix load tracking bug/inconsistency - Fix a sporadic CFS bandwidth constraints enforcement bug - Fix a uclamp utilization tracking bug for newly woken tasks" * tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/uclamp: Ignore max aggregation if rq is idle sched/fair: Fix CFS bandwidth hrtimer expiry type sched/fair: Sync load_sum with load_avg after dequeue commit 936b664fb20895277453c02be4f3a94d6ce2b3c8 Merge: 301c8b1d7c237 d4ba0b06306a7 Author: Linus Torvalds Date: Sun Jul 11 11:10:48 2021 -0700 Merge tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "A fix and a hardware-enablement addition: - Robustify uncore_snbep's skx_iio_set_mapping()'s error cleanup - Add cstate event support for Intel ICELAKE_X and ICELAKE_D" * tag 'perf-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Clean up error handling path of iio mapping perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support commit 301c8b1d7c2373f85ed5d944a8e9264dad36064c Merge: 8b9cc17a46215 7e1088760cfe0 Author: Linus Torvalds Date: Sun Jul 11 11:06:09 2021 -0700 Merge tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: - Fix a Sparc crash - Fix a number of objtool warnings - Fix /proc/lockdep output on certain configs - Restore a kprobes fail-safe * tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/atomic: sparc: Fix arch_cmpxchg64_local() kprobe/static_call: Restore missing static_call_text_reserved() static_call: Fix static_call_text_reserved() vs __init jump_label: Fix jump_label_text_reserved() vs __init locking/lockdep: Fix meaningless /proc/lockdep output of lock classes on !CONFIG_PROVE_LOCKING commit 8b9cc17a46215af733c83bea36366419133dfa09 Merge: b1412bd75abe8 5f638e5ac61ef Author: Linus Torvalds Date: Sun Jul 11 10:59:53 2021 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "This is a set of minor fixes and clean ups in the core and various drivers. The only core change in behaviour is the I/O retry for spinup notify, but that shouldn't impact anything other than the failing case" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (23 commits) scsi: virtio_scsi: Add validation for residual bytes from response scsi: ipr: System crashes when seeing type 20 error scsi: core: Retry I/O for Notify (Enable Spinup) Required error scsi: mpi3mr: Fix warnings reported by smatch scsi: qedf: Add check to synchronize abort and flush scsi: MAINTAINERS: Add mpi3mr driver maintainers scsi: libfc: Fix array index out of bound exception scsi: mvsas: Use DEVICE_ATTR_RO()/RW() macro scsi: megaraid_mbox: Use DEVICE_ATTR_ADMIN_RO() macro scsi: qedf: Use DEVICE_ATTR_RO() macro scsi: qedi: Use DEVICE_ATTR_RO() macro scsi: message: mptfc: Switch from pci_ to dma_ API scsi: be2iscsi: Fix some missing space in some messages scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe() scsi: ufs: Fix build warning without CONFIG_PM scsi: bnx2fc: Remove meaningless bnx2fc_abts_cleanup() return value assignment scsi: qla2xxx: Add heartbeat check scsi: virtio_scsi: Do not overwrite SCSI status scsi: libsas: Add LUN number check in .slave_alloc callback scsi: core: Inline scsi_mq_alloc_queue() ... commit b1412bd75abe8b1c57ecca4a85f92c8ddb4ccd39 Merge: de5540965853e eb7261f14e1a8 Author: Linus Torvalds Date: Sun Jul 11 10:54:24 2021 -0700 Merge tag 'perf-tools-for-v5.14-2021-07-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tool updates from Arnaldo Carvalho de Melo: "New features: - Enable use of BPF counters with 'perf stat --for-each-cgroup', using per-CPU 'cgroup-switch' events with an attached BPF program that does aggregation per-cgroup in the kernel instead of using per-cgroup perf events. - Add Topdown metrics L2 events as default events in 'perf stat' for systems having those events. Hardware tracing: - Add a config for max loops without consuming a packet in the Intel PT packet decoder, set via 'perf config intel-pt.max-loops=N' Hardware enablement: - Disable misleading NMI watchdog message in 'perf stat' on hybrid systems such as Intel Alder Lake. - Add a dummy event on hybrid systems to collect metadata records. - Add 24x7 nest metric events for the Power10 platform. Fixes: - Fix event parsing for PMUs starting with the same prefix. - Fix the 'perf trace' 'trace' alias installation dir. - Fix buffer size to report iregs in perf script python scripts, supporting the extended registers in PowerPC. - Fix overflow in elf_sec__is_text(). - Fix 's' on source line when disasm is empty in the annotation TUI, accessible via 'perf annotate', 'perf report' and 'perf top'. - Plug leaks in scandir() returned dirent entries in 'perf test' when sorting the shell tests. - Fix --task and --stat with pipe input in 'perf report'. - Fix 'perf probe' use of debuginfo files by build id. - If a DSO has both dynsym and symtab ELF sections, read from both when loading the symbol table, fixing a problem processing Fedora 32 glibc DSOs. Libraries: - Add grouping of events to libperf, from code in tools/perf, allowing libperf users to use that mode. Misc: - Filter plt stubs from the 'perf probe --functions' output. - Update UAPI header copies for asound, DRM, mman-common.h and the ones affected by the quotactl_fd syscall" * tag 'perf-tools-for-v5.14-2021-07-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (29 commits) perf test: Add free() calls for scandir() returned dirent entries libperf: Add tests for perf_evlist__set_leader() libperf: Remove BUG_ON() from library code in get_group_fd() libperf: Add group support to perf_evsel__open() perf tools: Fix pattern matching for same substring in different PMU type perf record: Add a dummy event on hybrid systems to collect metadata records perf stat: Add Topdown metrics L2 events as default events libperf: Adopt evlist__set_leader() from tools/perf as perf_evlist__set_leader() libperf: Move 'nr_groups' from tools/perf to evlist::nr_groups libperf: Move 'leader' from tools/perf to perf_evsel::leader libperf: Move 'idx' from tools/perf to perf_evsel::idx libperf: Change tests to single static and shared binaries perf intel-pt: Add a config for max loops without consuming a packet perf stat: Disable the NMI watchdog message on hybrid perf vendor events power10: Adds 24x7 nest metric events for power10 platform perf script python: Fix buffer size to report iregs in perf script perf trace: Fix the perf trace link location perf top: Fix overflow in elf_sec__is_text() perf annotate: Fix 's' on source line when disasm is empty perf probe: Do not show @plt function by default ... commit a5de4be0aaaa66a2fa98e8a33bdbed3bd0682804 Author: Marek Behún Date: Sun Jul 11 18:38:15 2021 +0200 net: phy: marvell10g: fix differentiation of 88X3310 from 88X3340 It seems that we cannot differentiate 88X3310 from 88X3340 by simply looking at bit 3 of revision ID. This only works on revisions A0 and A1. On revision B0, this bit is always 1. Instead use the 3.d00d register for differentiation, since this register contains information about number of ports on the device. Fixes: 9885d016ffa9 ("net: phy: marvell10g: add separate structure for 88X3340") Signed-off-by: Marek Behún Reported-by: Matteo Croce Tested-by: Matteo Croce Signed-off-by: David S. Miller commit 84f7e0bb4809f4497124b6b6904c07c8a0c73c58 Author: kernel test robot Date: Sun Jul 11 18:12:56 2021 +0200 dsa: fix for_each_child.cocci warnings For_each_available_child_of_node should have of_node_put() before return around line 423. Generated by: scripts/coccinelle/iterators/for_each_child.cocci CC: Alexander Lobakin Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit de5540965853e514a85d3b775e9049deb85a2ff3 Merge: 6bce244390a8b 4aa90c036df67 Author: Linus Torvalds Date: Sat Jul 10 16:19:10 2021 -0700 Merge tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Mostly documentation/comment changes and non urgent fixes. - add or fix SPDX identifiers - NXP pcf*: fix datasheet URLs - imxdi: add wakeup support - pcf2127: handle timestamp interrupts, this fixes a possible interrupt storm - bd70528: Drop BD70528 support" * tag 'rtc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (33 commits) rtc: pcf8523: rename register and bit defines rtc: pcf2127: handle timestamp interrupts rtc: at91sam9: Remove unnecessary offset variable checks rtc: s5m: Check return value of s5m_check_peding_alarm_interrupt() rtc: spear: convert to SPDX identifier rtc: tps6586x: convert to SPDX identifier rtc: tps80031: convert to SPDX identifier rtc: rtd119x: Fix format of SPDX identifier rtc: sc27xx: Fix format of SPDX identifier rtc: palmas: convert to SPDX identifier rtc: max6900: convert to SPDX identifier rtc: ds1374: convert to SPDX identifier rtc: au1xxx: convert to SPDX identifier rtc: pcf85063: Update the PCF85063A datasheet revision dt-bindings: rtc: ti,bq32k: take maintainership rtc: pcf8563: Fix the datasheet URL rtc: pcf85063: Fix the datasheet URL rtc: pcf2127: Fix the datasheet URL dt-bindings: rtc: ti,bq32k: Convert to json-schema dt-bindings: rtc: rx8900: Convert to YAML schema ... commit 6bce244390a8bad89536ae0ea5c03c59ae155a12 Author: Mel Gorman Date: Mon Jul 5 10:51:17 2021 +0100 mm/page_alloc: Revert pahole zero-sized workaround Commit dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to local_lock") folded in a workaround patch for pahole that was unable to deal with zero-sized percpu structures. A superior workaround is achieved with commit a0b8200d06ad ("kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21"). This patch reverts the dummy field and the pahole version check. Fixes: dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to local_lock") Signed-off-by: Mel Gorman Signed-off-by: Linus Torvalds commit 4aa90c036df670b8757140e0dae2a94e7b0d42b4 Author: Alexandre Belloni Date: Sat Jul 10 23:14:31 2021 +0200 rtc: pcf8523: rename register and bit defines arch/arm/mach-ixp4xx/include/mach/platform.h now gets included indirectly and defines REG_OFFSET. Rename the register and bit definition to something specific to the driver. Fixes: 7fd70c65faac ("ARM: irqstat: Get rid of duplicated declaration") Reported-by: kernel test robot Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210710211431.1393589-1-alexandre.belloni@bootlin.com commit 1e16624d7b4376797ede36e3c955375cf0f23298 Merge: 67d8d36564621 4d069f6022e93 Author: Linus Torvalds Date: Sat Jul 10 12:04:58 2021 -0700 Merge tag '5.14-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "13 cifs/smb3 fixes. Most are to address minor issues pointed out by Coverity. Also includes a packet signing enhancement and mount improvement" * tag '5.14-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal version number cifs: prevent NULL deref in cifs_compose_mount_options() SMB3.1.1: Add support for negotiating signing algorithm cifs: use helpers when parsing uid/gid mount options and validate them CIFS: Clarify SMB1 code for POSIX Lock CIFS: Clarify SMB1 code for rename open file CIFS: Clarify SMB1 code for delete CIFS: Clarify SMB1 code for SetFileSize smb3: fix typo in header file CIFS: Clarify SMB1 code for UnixSetPathInfo CIFS: Clarify SMB1 code for UnixCreateSymLink cifs: clarify SMB1 code for UnixCreateHardLink cifs: make locking consistent around the server session status commit 67d8d365646217225b458d90234f332e8d41f93d Merge: 88bbd8a031b83 62efe3eebc8bf Author: Linus Torvalds Date: Sat Jul 10 11:57:57 2021 -0700 Merge tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull pci fix from Bjorn Helgaas: "Revert host bridge window patch that fixed HP EliteDesk 805 G6, but broke ppc:sam460ex (Bjorn Helgaas)" * tag 'pci-v5.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI: Coalesce host bridge contiguous apertures" commit 88bbd8a031b83d4a91f1f8f4c1ce8caa16dc0886 Merge: f7ea4be434fe7 3e5feb11a8294 Author: Linus Torvalds Date: Sat Jul 10 11:53:06 2021 -0700 Merge tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: - two small fixes to the svc driver * tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: svc: fix doc warning in svc-i3c-master.c i3c: master: svc: drop free_irq of devm_request_irq allocated irq commit f7ea4be434fe7ea38699d14c1192481899e6ac94 Merge: 81361b837a345 fe6a6de6692e7 Author: Linus Torvalds Date: Sat Jul 10 11:43:25 2021 -0700 Merge tag 'thermal-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal updates from Daniel Lezcano: - Add rk3568 sensor support (Finley Xiao) - Add missing MODULE_DEVICE_TABLE for the Spreadtrum sensor (Chunyan Zhang) - Export additionnal attributes for the int340x thermal processor (Srinivas Pandruvada) - Add SC7280 compatible for the tsens driver (Rajeshwari Ravindra Kamble) - Fix kernel documentation for thermal_zone_device_unregister() and use devm_platform_get_and_ioremap_resource() (Yang Yingliang) - Fix coefficient calculations for the rcar_gen3 sensor driver (Niklas Söderlund) - Fix shadowing variable rcar_gen3_ths_tj_1 (Geert Uytterhoeven) - Add missing of_node_put() for the iMX and Spreadtrum sensors (Krzysztof Kozlowski) - Add tegra3 thermal sensor DT bindings (Dmitry Osipenko) - Stop the thermal zone monitoring when unregistering it to prevent a temperature update without the 'get_temp' callback (Dmitry Osipenko) - Add rk3568 DT bindings, convert bindings to yaml schemas and add the corresponding compatible in the Rockchip sensor (Ezequiel Garcia) - Add the sc8180x compatible for the Qualcomm tsensor (Bjorn Andersson) - Use the find_first_zero_bit() function instead of custom code (Andy Shevchenko) - Fix the kernel doc for the device cooling device (Yang Li) - Reorg the processor thermal int340x to set the scene for the PCI mmio driver (Srinivas Pandruvada) - Add PCI MMIO driver for the int340x processor thermal driver (Srinivas Pandruvada) - Add hwmon sensors for the mediatek sensor (Frank Wunderlich) - Fix warning for return value reported by Smatch for the int340x thermal processor (Srinivas Pandruvada) - Fix wrong register access and decoding for the int340x thermal processor (Srinivas Pandruvada) * tag 'thermal-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (23 commits) thermal/drivers/int340x/processor_thermal: Fix tcc setting thermal/drivers/int340x/processor_thermal: Fix warning for return value thermal/drivers/mediatek: Add sensors-support thermal/drivers/int340x/processor_thermal: Add PCI MMIO based thermal driver thermal/drivers/int340x/processor_thermal: Split enumeration and processing part thermal: devfreq_cooling: Fix kernel-doc thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit() dt-bindings: thermal: tsens: Add sc8180x compatible dt-bindings: rockchip-thermal: Support the RK3568 SoC compatible dt-bindings: thermal: convert rockchip-thermal to json-schema thermal/core/thermal_of: Stop zone device before unregistering it dt-bindings: thermal: Add binding for Tegra30 thermal sensor thermal/drivers/sprd: Add missing of_node_put for loop iteration thermal/drivers/imx_sc: Add missing of_node_put for loop iteration thermal/drivers/rcar_gen3_thermal: Do not shadow rcar_gen3_ths_tj_1 thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations thermal/drivers/st: Use devm_platform_get_and_ioremap_resource() thermal/core: Correct function name thermal_zone_device_unregister() dt-bindings: thermal: tsens: Add compatible string to TSENS binding for SC7280 thermal/drivers/int340x: processor_thermal: Export additional attributes ... commit 222722bc6ebfabf5d54467070f05cf9c0a55ea8c Author: Yunjian Wang Date: Sat Jul 10 11:32:49 2021 +0800 virtio_net: check virtqueue_add_sgs() return value As virtqueue_add_sgs() can fail, we should check the return value. Addresses-Coverity-ID: 1464439 ("Unchecked return value") Signed-off-by: Yunjian Wang Signed-off-by: David S. Miller commit 81361b837a3450f0a44255fddfd7a4c72502b667 Merge: e98e03d075537 27932b6a2088e Author: Linus Torvalds Date: Sat Jul 10 11:01:38 2021 -0700 Merge tag 'kbuild-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Increase the -falign-functions alignment for the debug option. - Remove ugly libelf checks from the top Makefile. - Make the silent build (-s) more silent. - Re-compile the kernel if KBUILD_BUILD_TIMESTAMP is specified. - Various script cleanups * tag 'kbuild-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (27 commits) scripts: add generic syscallnr.sh scripts: check duplicated syscall number in syscall table sparc: syscalls: use pattern rules to generate syscall headers parisc: syscalls: use pattern rules to generate syscall headers nds32: add arch/nds32/boot/.gitignore kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set kbuild: modpost: Explicitly warn about unprototyped symbols kbuild: remove trailing slashes from $(KBUILD_EXTMOD) kconfig.h: explain IS_MODULE(), IS_ENABLED() kconfig: constify long_opts scripts/setlocalversion: simplify the short version part scripts/setlocalversion: factor out 12-chars hash construction scripts/setlocalversion: add more comments to -dirty flag detection scripts/setlocalversion: remove workaround for old make-kpkg scripts/setlocalversion: remove mercurial, svn and git-svn supports kbuild: clean up ${quiet} checks in shell scripts kbuild: sink stdout from cmd for silent build init: use $(call cmd,) for generating include/generated/compile.h kbuild: merge scripts/mkmakefile to top Makefile sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild ... commit e98e03d075537a14928661ebfbfcde34b0eced1a Merge: 379cf80a9861e 6a942f5780545 Author: Linus Torvalds Date: Sat Jul 10 10:46:14 2021 -0700 Merge tag 's390-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Vasily Gorbik: - Fix preempt_count initialization. - Rework call_on_stack() macro to add proper type handling and avoid possible register corruption. - More error prone "register asm" removal and fixes. - Fix syscall restarting when multiple signals are coming in. This adds minimalistic trampolines to vdso so we can return from signal without using the stack which requires pgm check handler hacks when NX is enabled. - Remove HAVE_IRQ_EXIT_ON_IRQ_STACK since this is no longer true after switch to generic entry. - Fix protected virtualization secure storage access exception handling. - Make machine check C handler always enter with DAT enabled and move register validation to C code. - Fix tinyconfig boot problem by avoiding MONITOR CALL without CONFIG_BUG. - Increase asm symbols alignment to 16 to make it consistent with compilers. - Enable concurrent access to the CPU Measurement Counter Facility. - Add support for dynamic AP bus size limit and rework ap_dqap to deal with messages greater than recv buffer. * tag 's390-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (41 commits) s390: preempt: Fix preempt_count initialization s390/linkage: increase asm symbols alignment to 16 s390: rename CALL_ON_STACK_NORETURN() to call_on_stack_noreturn() s390: add type checking to CALL_ON_STACK_NORETURN() macro s390: remove old CALL_ON_STACK() macro s390/softirq: use call_on_stack() macro s390/lib: use call_on_stack() macro s390/smp: use call_on_stack() macro s390/kexec: use call_on_stack() macro s390/irq: use call_on_stack() macro s390/mm: use call_on_stack() macro s390: introduce proper type handling call_on_stack() macro s390/irq: simplify on_async_stack() s390/irq: inline do_softirq_own_stack() s390/irq: simplify do_softirq_own_stack() s390/ap: get rid of register asm in ap_dqap() s390: rename PIF_SYSCALL_RESTART to PIF_EXECVE_PGSTE_RESTART s390: move restart of execve() syscall s390/signal: remove sigreturn on stack s390/signal: switch to using vdso for sigreturn and syscall restart ... commit 379cf80a9861e4356792185bc3fcdd7d4133f2f7 Merge: af4cf6a5689a9 47ce8527fbba1 Author: Linus Torvalds Date: Sat Jul 10 10:36:33 2021 -0700 Merge tag 'mips_5.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix for accesing gic via vdso - two build fixes * tag 'mips_5.14_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: vdso: Invalid GIC access through VDSO mips: disable branch profiling in boot/decompress.o mips: always link byteswap helpers into decompressor commit af4cf6a5689a9ecc21722cb2bb6220dcaee89c6e Merge: 071e5aceebebf e6adbcb7e2d71 Author: Linus Torvalds Date: Sat Jul 10 10:29:35 2021 -0700 Merge tag 'arm-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM defconfig updates from "Olof Johansson "A set of defconfig changes, we keep them in a separate branch to avoid conflicts between topics by separating them out. These changes are almost exclusively turning on new drivers for various platforms, or turning on modules for new drivers for the shared generic configs" * tag 'arm-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (22 commits) arm64: defconfig: Enable renesas usb xhci pci host controller arm64: defconfig: Visconti: Enable GPIO arm64: defconfig: Visconti: Enable PWM arm64: defconfig: add drivers needed for DragonBoard410c ARM: config: aspeed: Add DEBUG_FS and EXT4 ARM: ixp4xx_defconfig: add MTD_PHYSMAP ARM: ixp4xx_defconfig: add CONFIG_SERIAL_OF_PLATFORM ARM: imx_v6_v7_defconfig: Select the Wifi ath10k sdio driver ARM: exynos_defconfig: restore framebuffer support arm64: defconfig: Enable ARCH_R9A07G044 ARM: configs: at91_dt_defconfig: configs for sam9x60 arm64: defconfig: Enable Exynos UFS driver arm64: defconfig: qcom: enable interconnect for SM8350 ARM: tegra_defconfig: Enable CONFIG_DEVFREQ_THERMAL arm64: defconfig: Enable usb2_clksel for R-Car Gen3 and RZ/G2 arm64: defconfig: enable Layerscape EDAC driver ARM: omap2plus_defconfig: Add LP5523 LED driver ARM: omap2plus_defconfig: Add WL1251 and WEXT modules ARM: shmobile: defconfig: Refresh for v5.13-rc1 arm64: defconfig: Allow Mediatek boards to boot from the mmc ... commit 071e5aceebebf1d33b5c29ccfd2688ed39c60007 Merge: e083bbd6040f4 2afd1c20e7547 Author: Linus Torvalds Date: Sat Jul 10 09:46:20 2021 -0700 Merge tag 'arm-drivers-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM driver updates from Olof Johansson: - Reset controllers: Adding support for Microchip Sparx5 Switch. - Memory controllers: ARM Primecell PL35x SMC memory controller driver cleanups and improvements. - i.MX SoC drivers: Power domain support for i.MX8MM and i.MX8MN. - Rockchip: RK3568 power domains support + DT binding updates, cleanups. - Qualcomm SoC drivers: Amend socinfo with more SoC/PMIC details, including support for MSM8226, MDM9607, SM6125 and SC8180X. - ARM FFA driver: "Firmware Framework for ARMv8-A", defining management interfaces and communication (including bus model) between partitions both in Normal and Secure Worlds. - Tegra Memory controller changes, including major rework to deal with identity mappings at boot and integration with ARM SMMU pieces. * tag 'arm-drivers-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (120 commits) firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string firmware: turris-mox-rwtm: show message about HWRNG registration firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng firmware: turris-mox-rwtm: report failures better firmware: turris-mox-rwtm: fix reply status decoding function soc: imx: gpcv2: add support for i.MX8MN power domains dt-bindings: add defines for i.MX8MN power domains firmware: tegra: bpmp: Fix Tegra234-only builds iommu/arm-smmu: Use Tegra implementation on Tegra186 iommu/arm-smmu: tegra: Implement SID override programming iommu/arm-smmu: tegra: Detect number of instances at runtime dt-bindings: arm-smmu: Add Tegra186 compatible string firmware: qcom_scm: Add MDM9607 compatible soc: qcom: rpmpd: Add MDM9607 RPM Power Domains soc: renesas: Add support to read LSI DEVID register of RZ/G2{L,LC} SoC's soc: renesas: Add ARCH_R9A07G044 for the new RZ/G2L SoC's dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml memory: emif: remove unused frequency and voltage notifiers memory: fsl_ifc: fix leak of private memory on probe failure memory: fsl_ifc: fix leak of IO mapping on probe failure ... commit e083bbd6040f4efa5c13633fb4e460b919d69dae Merge: 6e207b882159e b62b189f7e2cf Author: Linus Torvalds Date: Sat Jul 10 09:33:54 2021 -0700 Merge tag 'arm-dt-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM devicetree updates from Olof Johansson: "Like always, the DT branch is sizable. There are numerous additions and fixes to existing platforms, but also a handful of new ones introduced. Less than some other releases, but there's been significant work on cleanups, refactorings and device enabling on existing platforms. A non-exhaustive list of new material: - Refactoring of BCM2711 dtsi structure to add support for the Raspberry Pi 400 - Rockchip: RK3568 SoC and EVB, video codecs for rk3036/3066/3188/322x - Qualcomm: SA8155p Automotive platform (SM8150 derivative), SM8150/8250 enhancements and support for Sony Xperia 1/1II and 5/5II - TI K3: PCI/USB3 support on AM64-sk boards, R5 remoteproc definitions - TI OMAP: Various cleanups - Tegra: Audio support for Jetson Xavier NX, SMMU support on Tegra194 - Qualcomm: lots of additions for peripherals across several SoCs, and new support for Microsoft Surface Duo (SM8150-based), Huawei Ascend G7. - i.MX: Numerous additions of features across SoCs and boards. - Allwinner: More device bindings for V3s, Forlinx OKA40i-C and NanoPi R1S H5 boards - MediaTek: More device bindings for mt8167, new Chromebook system variants for mt8183 - Renesas: RZ/G2L SoC and EVK added - Amlogic: BananaPi BPI-M5 board added" * tag 'arm-dt-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (511 commits) arm64: dts: rockchip: add basic dts for RK3568 EVB arm64: dts: rockchip: add core dtsi for RK3568 SoC arm64: dts: rockchip: add generic pinconfig settings used by most Rockchip socs ARM: dts: rockchip: add vpu and vdec node for RK322x ARM: dts: rockchip: add vpu nodes for RK3066 and RK3188 ARM: dts: rockchip: add vpu node for RK3036 arm64: dts: ipq8074: Add QUP6 I2C node arm64: dts: rockchip: Re-add regulator-always-on for vcc_sdio for rk3399-roc-pc arm64: dts: rockchip: Re-add regulator-boot-on, regulator-always-on for vdd_gpu on rk3399-roc-pc arm64: dts: rockchip: add ir-receiver for rk3399-roc-pc arm64: dts: rockchip: Add USB-C port details for rk3399 Firefly arm64: dts: rockchip: Sort rk3399 firefly pinmux entries arm64: dts: rockchip: add infrared receiver node to RK3399 Firefly arm64: dts: rockchip: add SPDIF node for rk3399-firefly arm64: dts: rockchip: Add Rotation Property for OGA Panel arm64: dts: qcom: sc7180: bus votes for eMMC and SD card arm64: dts: qcom: sm8250-edo: Add Samsung touchscreen arm64: dts: qcom: sm8250-edo: Enable GPI DMA arm64: dts: qcom: sm8250-edo: Enable ADSP/CDSP/SLPI arm64: dts: qcom: sm8250-edo: Enable PCIe ... commit 6e207b882159ed3e35a4cd4ff0fc155cce5e3cbc Merge: b6fd9e259457b 42accadb3265f Author: Linus Torvalds Date: Sat Jul 10 09:22:44 2021 -0700 Merge tag 'arm-soc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Olof Johansson: "A few SoC (code) changes have queued up this cycle, mostly for minor changes and some refactoring and cleanup of legacy platforms. This branch also contains a few of the fixes that weren't sent in by the end of the release (all fairly minor). - Adding an additional maintainer for the TEE subsystem (Sumit Garg) - Quite a significant modernization of the IXP4xx platforms by Linus Walleij, revisiting with a new PCI host driver/binding, removing legacy mach/* include dependencies and moving platform detection/config to drivers/soc. Also some updates/cleanup of platform data. - Core power domain support for Tegra platforms, and some improvements in build test coverage by adding stubs for compile test targets. - A handful of updates to i.MX platforms, adding legacy (non-PSCI) SMP support on i.MX7D, SoC ID setup for i.MX50, removal of platform data and board fixups for iMX6/7. ... and a few smaller changes and fixes for Samsung, OMAP, Allwinner, Rockchip" * tag 'arm-soc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (53 commits) MAINTAINERS: Add myself as TEE subsystem reviewer ixp4xx: fix spelling mistake in Kconfig "Devce" -> "Device" hw_random: ixp4xx: Add OF support hw_random: ixp4xx: Add DT bindings hw_random: ixp4xx: Turn into a module hw_random: ixp4xx: Use SPDX license tag hw_random: ixp4xx: enable compile-testing pata: ixp4xx: split platform data to its own header soc: ixp4xx: move cpu detection to linux/soc/ixp4xx/cpu.h PCI: ixp4xx: Add a new driver for IXP4xx PCI: ixp4xx: Add device tree bindings for IXP4xx ARM/ixp4xx: Make NEED_MACH_IO_H optional ARM/ixp4xx: Move the virtual IObases MAINTAINERS: ARM/MStar/Sigmastar SoCs: Add a link to the MStar tree ARM: debug: add UART early console support for MSTAR SoCs ARM: dts: ux500: Fix LED probing ARM: imx: add smp support for imx7d ARM: imx6q: drop of_platform_default_populate() from init_machine arm64: dts: rockchip: Update RK3399 PCI host bridge window to 32-bit address memory soc/tegra: fuse: Fix Tegra234-only builds ... commit b6fd9e259457b847646844ed202b830e585289dd Merge: 20d5e570aee77 024591f9a6e01 Author: Linus Torvalds Date: Sat Jul 10 09:17:13 2021 -0700 Merge tag 'fixes-2021-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock fix from Mike Rapoport: "This is a fix for the rework of ARM's pfn_valid() implementation merged during this merge window. Don't abuse pfn_valid() to check if pfn is in RAM The semantics of pfn_valid() is to check presence of the memory map for a PFN and not whether a PFN is in RAM. The memory map may be present for a hole in the physical memory and if such hole corresponds to an MMIO range, __arm_ioremap_pfn_caller() will produce a WARN() and fail. Use memblock_is_map_memory() instead of pfn_valid() to check if a PFN is in RAM or not" * tag 'fixes-2021-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM commit 20d5e570aee77afa44849dc652ff256290ea978e Merge: 50be9417e23af 93274f1dd6b0a Author: Linus Torvalds Date: Sat Jul 10 09:06:41 2021 -0700 Merge branch 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu fix from Dennis Zhou: "This is just a single change to fix percpu depopulation. The code relied on depopulation code written specifically for the free path and relied on vmalloc to do the tlb flush lazily. As we're modifying the backing pages during the lifetime of a chunk, we need to also flush the tlb accordingly. Guenter Roeck reported this issue in [1] on mips. I believe we just happen to be lucky given the much larger chunk sizes on x86 and consequently less churning of this memory" Link: https://lore.kernel.org/lkml/20210702191140.GA3166599@roeck-us.net/ [1] * 'for-5.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: flush tlb in pcpu_reclaim_populated() commit 849fd444dd7383c437699997dcbca8d49d27b836 Merge: 5d52c906f059b ce599c516386f Author: David S. Miller Date: Fri Jul 9 18:38:53 2021 -0700 Merge branch 'mptcp-Connection-and-accounting-fixes' Mat Martineau says: ==================== mptcp: Connection and accounting fixes Here are some miscellaneous fixes for MPTCP: Patch 1 modifies an MPTCP hash so it doesn't depend on one of skb->dev and skb->sk being non-NULL. Patch 2 removes an extra destructor call when rejecting a join due to port mismatch. Patches 3 and 5 more cleanly handle error conditions with MP_JOIN and syncookies, and update a related self test. Patch 4 makes sure packets that trigger a subflow TCP reset during MPTCP option header processing are correctly dropped. Patch 6 addresses a rmem accounting issue that could keep packets in subflow receive buffers longer than necessary, delaying MPTCP-level ACKs. ==================== Signed-off-by: David S. Miller commit ce599c516386f09ca30848a1a4eb93d3fffbe187 Author: Paolo Abeni Date: Fri Jul 9 17:20:51 2021 -0700 mptcp: properly account bulk freed memory After commit 879526030c8b ("mptcp: protect the rx path with the msk socket spinlock") the rmem currently used by a given msk is really sk_rmem_alloc - rmem_released. The safety check in mptcp_data_ready() does not take the above in due account, as a result legit incoming data is kept in subflow receive queue with no reason, delaying or blocking MPTCP-level ack generation. This change addresses the issue introducing a new helper to fetch the rmem memory and using it as needed. Additionally add a MIB counter for the exceptional event described above - the peer is misbehaving. Finally, introduce the required annotation when rmem_released is updated. Fixes: 879526030c8b ("mptcp: protect the rx path with the msk socket spinlock") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/211 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit a7da441621c7945fbfd43ed239c93b8073cda502 Author: Jianguo Wu Date: Fri Jul 9 17:20:50 2021 -0700 selftests: mptcp: fix case multiple subflows limited by server After patch "mptcp: fix syncookie process if mptcp can not_accept new subflow", if subflow is limited, MP_JOIN SYN is dropped, and no SYN/ACK will be replied. So in case "multiple subflows limited by server", the expected SYN/ACK number should be 1. Fixes: 00587187ad30 ("selftests: mptcp: add test cases for mptcp join tests with syn cookies") Reported-by: kernel test robot Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6787b7e350d3552651a3422d3d8980fbc8d65368 Author: Jianguo Wu Date: Fri Jul 9 17:20:49 2021 -0700 mptcp: avoid processing packet if a subflow reset If check_fully_established() causes a subflow reset, it should not continue to process the packet in tcp_data_queue(). Add a return value to mptcp_incoming_options(), and return false if a subflow has been reset, else return true. Then drop the packet in tcp_data_queue()/tcp_rcv_state_process() if mptcp_incoming_options() return false. Fixes: d582484726c4 ("mptcp: fix fallback for MP_JOIN subflows") Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8547ea5f52dd8ef19b69c25c41b1415481b3503b Author: Jianguo Wu Date: Fri Jul 9 17:20:48 2021 -0700 mptcp: fix syncookie process if mptcp can not_accept new subflow Lots of "TCP: tcp_fin: Impossible, sk->sk_state=7" in client side when doing stress testing using wrk and webfsd. There are at least two cases may trigger this warning: 1.mptcp is in syncookie, and server recv MP_JOIN SYN request, in subflow_check_req(), the mptcp_can_accept_new_subflow() return false, so subflow_init_req_cookie_join_save() isn't called, i.e. not store the data present in the MP_JOIN syn request and the random nonce in hash table - join_entries[], but still send synack. When recv 3rd-ack, mptcp_token_join_cookie_init_state() will return false, and 3rd-ack is dropped, then if mptcp conn is closed by client, client will send a DATA_FIN and a MPTCP FIN, the DATA_FIN doesn't have MP_CAPABLE or MP_JOIN, so mptcp_subflow_init_cookie_req() will return 0, and pass the cookie check, MP_JOIN request is fallback to normal TCP. Server will send a TCP FIN if closed, in client side, when process TCP FIN, it will do reset, the code path is: tcp_data_queue()->mptcp_incoming_options() ->check_fully_established()->mptcp_subflow_reset(). mptcp_subflow_reset() will set sock state to TCP_CLOSE, so tcp_fin will hit TCP_CLOSE, and print the warning. 2.mptcp is in syncookie, and server recv 3rd-ack, in mptcp_subflow_init_cookie_req(), mptcp_can_accept_new_subflow() return false, and subflow_req->mp_join is not set to 1, so in subflow_syn_recv_sock() will not reset the MP_JOIN subflow, but fallback to normal TCP, and then the same thing happens when server will send a TCP FIN if closed. For case1, subflow_check_req() return -EPERM, then tcp_conn_request() will drop MP_JOIN SYN. For case2, let subflow_syn_recv_sock() call mptcp_can_accept_new_subflow(), and do fatal fallback, send reset. Fixes: 9466a1ccebbe ("mptcp: enable JOIN requests even if cookies are in use") Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 030d37bd1cd2443a1f21db47eb301899bfa45a2a Author: Jianguo Wu Date: Fri Jul 9 17:20:47 2021 -0700 mptcp: remove redundant req destruct in subflow_check_req() In subflow_check_req(), if subflow sport is mismatch, will put msk, destroy token, and destruct req, then return -EPERM, which can be done by subflow_req_destructor() via: tcp_conn_request() |--__reqsk_free() |--subflow_req_destructor() So we should remove these redundant code, otherwise will call tcp_v4_reqsk_destructor() twice, and may double free inet_rsk(req)->ireq_opt. Fixes: 5bc56388c74f ("mptcp: add port number check for MP_JOIN") Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0c71929b5893e410e0efbe1bbeca6f19a5f19956 Author: Jianguo Wu Date: Fri Jul 9 17:20:46 2021 -0700 mptcp: fix warning in __skb_flow_dissect() when do syn cookie for subflow join I did stress test with wrk[1] and webfsd[2] with the assistance of mptcp-tools[3]: Server side: ./use_mptcp.sh webfsd -4 -R /tmp/ -p 8099 Client side: ./use_mptcp.sh wrk -c 200 -d 30 -t 4 http://192.168.174.129:8099/ and got the following warning message: [ 55.552626] TCP: request_sock_subflow: Possible SYN flooding on port 8099. Sending cookies. Check SNMP counters. [ 55.553024] ------------[ cut here ]------------ [ 55.553027] WARNING: CPU: 0 PID: 10 at net/core/flow_dissector.c:984 __skb_flow_dissect+0x280/0x1650 ... [ 55.553117] CPU: 0 PID: 10 Comm: ksoftirqd/0 Not tainted 5.12.0+ #18 [ 55.553121] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020 [ 55.553124] RIP: 0010:__skb_flow_dissect+0x280/0x1650 ... [ 55.553133] RSP: 0018:ffffb79580087770 EFLAGS: 00010246 [ 55.553137] RAX: 0000000000000000 RBX: ffffffff8ddb58e0 RCX: ffffb79580087888 [ 55.553139] RDX: ffffffff8ddb58e0 RSI: ffff8f7e4652b600 RDI: 0000000000000000 [ 55.553141] RBP: ffffb79580087858 R08: 0000000000000000 R09: 0000000000000008 [ 55.553143] R10: 000000008c622965 R11: 00000000d3313a5b R12: ffff8f7e4652b600 [ 55.553146] R13: ffff8f7e465c9062 R14: 0000000000000000 R15: ffffb79580087888 [ 55.553149] FS: 0000000000000000(0000) GS:ffff8f7f75e00000(0000) knlGS:0000000000000000 [ 55.553152] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 55.553154] CR2: 00007f73d1d19000 CR3: 0000000135e10004 CR4: 00000000003706f0 [ 55.553160] Call Trace: [ 55.553166] ? __sha256_final+0x67/0xd0 [ 55.553173] ? sha256+0x7e/0xa0 [ 55.553177] __skb_get_hash+0x57/0x210 [ 55.553182] subflow_init_req_cookie_join_save+0xac/0xc0 [ 55.553189] subflow_check_req+0x474/0x550 [ 55.553195] ? ip_route_output_key_hash+0x67/0x90 [ 55.553200] ? xfrm_lookup_route+0x1d/0xa0 [ 55.553207] subflow_v4_route_req+0x8e/0xd0 [ 55.553212] tcp_conn_request+0x31e/0xab0 [ 55.553218] ? selinux_socket_sock_rcv_skb+0x116/0x210 [ 55.553224] ? tcp_rcv_state_process+0x179/0x6d0 [ 55.553229] tcp_rcv_state_process+0x179/0x6d0 [ 55.553235] tcp_v4_do_rcv+0xaf/0x220 [ 55.553239] tcp_v4_rcv+0xce4/0xd80 [ 55.553243] ? ip_route_input_rcu+0x246/0x260 [ 55.553248] ip_protocol_deliver_rcu+0x35/0x1b0 [ 55.553253] ip_local_deliver_finish+0x44/0x50 [ 55.553258] ip_local_deliver+0x6c/0x110 [ 55.553262] ? ip_rcv_finish_core.isra.19+0x5a/0x400 [ 55.553267] ip_rcv+0xd1/0xe0 ... After debugging, I found in __skb_flow_dissect(), skb->dev and skb->sk are both NULL, then net is NULL, and trigger WARN_ON_ONCE(!net), actually net is always NULL in this code path, as skb->dev is set to NULL in tcp_v4_rcv(), and skb->sk is never set. Code snippet in __skb_flow_dissect() that trigger warning: 975 if (skb) { 976 if (!net) { 977 if (skb->dev) 978 net = dev_net(skb->dev); 979 else if (skb->sk) 980 net = sock_net(skb->sk); 981 } 982 } 983 984 WARN_ON_ONCE(!net); So, using seq and transport header derived hash. [1] https://github.com/wg/wrk [2] https://github.com/ourway/webfsd [3] https://github.com/pabeni/mptcp-tools Fixes: 9466a1ccebbe ("mptcp: enable JOIN requests even if cookies are in use") Suggested-by: Paolo Abeni Suggested-by: Florian Westphal Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 2f8619846755176a6720c71d580ffd09394a74bc Author: Mian Yousaf Kaukab Date: Tue Jun 29 17:06:43 2021 +0200 rtc: pcf2127: handle timestamp interrupts commit 03623b4b041c ("rtc: pcf2127: add tamper detection support") added support for timestamp interrupts. However they are not being handled in the irq handler. If a timestamp interrupt occurs it results in kernel disabling the interrupt and displaying the call trace: [ 121.145580] irq 78: nobody cared (try booting with the "irqpoll" option) ... [ 121.238087] [<00000000c4d69393>] irq_default_primary_handler threaded [<000000000a90d25b>] pcf2127_rtc_irq [rtc_pcf2127] [ 121.248971] Disabling IRQ #78 Handle timestamp interrupts in pcf2127_rtc_irq(). Save time stamp before clearing TSF1 and TSF2 flags so that it can't be overwritten. Set a flag to mark if the timestamp is valid and only report to sysfs if the flag is set. To mimic the hardware behavior, don’t save another timestamp until the first one has been read by the userspace. However, if the alarm irq is not configured, keep the old way of handling timestamp interrupt in the timestamp0 sysfs calls. Signed-off-by: Mian Yousaf Kaukab Reviewed-by: Bruno Thomsen Tested-by: Bruno Thomsen Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210629150643.31551-1-ykaukab@suse.de commit 37aadf9b2a7ea64a358ea7532d7f477fe6837ef1 Author: Nobuhiro Iwamatsu Date: Thu Jul 8 14:13:40 2021 +0900 rtc: at91sam9: Remove unnecessary offset variable checks The offset variable is checked by at91_rtc_readalarm(), but this check is unnecessary because the previous check knew that the value of this variable was not 0. This removes that unnecessary offset variable checks. Cc: Nicolas Ferre Cc: Ludovic Desroches Signed-off-by: Nobuhiro Iwamatsu Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210708051340.341345-1-nobuhiro1.iwamatsu@toshiba.co.jp commit f2581b1dfa9858e342afa8034b0f64f923bbf233 Author: Nobuhiro Iwamatsu Date: Thu Jul 8 14:13:04 2021 +0900 rtc: s5m: Check return value of s5m_check_peding_alarm_interrupt() s5m_check_peding_alarm_interrupt() in s5m_rtc_read_alarm() gets the return value, but doesn't use it. This modifies using the s5m_check_peding_alarm_interrupt()"s return value as the s5m_rtc_read_alarm()'s return value. Cc: Krzysztof Kozlowski Cc: Bartlomiej Zolnierkiewicz Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210708051304.341278-1-nobuhiro1.iwamatsu@toshiba.co.jp commit 9734a1ae34ecedf8aeaa842c9b3541cf8421c546 Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:58:04 2021 +0900 rtc: spear: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-11-nobuhiro1.iwamatsu@toshiba.co.jp commit 9d0c49fa115c9c9e16853d6c05f4fdf1420f790b Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:58:02 2021 +0900 rtc: tps6586x: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-9-nobuhiro1.iwamatsu@toshiba.co.jp commit 3f019164816fb7da6dd8b369e9bf584b97ba9654 Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:58:01 2021 +0900 rtc: tps80031: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-8-nobuhiro1.iwamatsu@toshiba.co.jp commit 41a2ed5c710774f3ac3c7cae4e2aa5f8e09ba4b4 Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:58:00 2021 +0900 rtc: rtd119x: Fix format of SPDX identifier For C files, use the C99 format (//). Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-7-nobuhiro1.iwamatsu@toshiba.co.jp commit 078699417a3983873fcc883312069b20f5923cbe Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:57:59 2021 +0900 rtc: sc27xx: Fix format of SPDX identifier For C files, use the C99 format (//). Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-6-nobuhiro1.iwamatsu@toshiba.co.jp commit 1d9539ed2da86296de04173c413378459cf6eb32 Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:57:58 2021 +0900 rtc: palmas: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-5-nobuhiro1.iwamatsu@toshiba.co.jp commit cd13635e1c7d17b0e105531d2bbdd1a537ce00da Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:57:57 2021 +0900 rtc: max6900: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-4-nobuhiro1.iwamatsu@toshiba.co.jp commit 67561a8e1ed184b2f7c029bb160f2b6239255e29 Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:57:56 2021 +0900 rtc: ds1374: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-3-nobuhiro1.iwamatsu@toshiba.co.jp commit 299e726f77f924b1233873cd2a1974a654119539 Author: Nobuhiro Iwamatsu Date: Wed Jul 7 16:57:55 2021 +0900 rtc: au1xxx: convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210707075804.337458-2-nobuhiro1.iwamatsu@toshiba.co.jp commit 62efe3eebc8bfc351961eee769a5c2fc30221451 Author: Bjorn Helgaas Date: Fri Jul 9 18:50:27 2021 -0500 Revert "PCI: Coalesce host bridge contiguous apertures" This reverts commit 65db04053efea3f3e412a7e0cc599962999c96b4. Guenter reported that after 65db04053efe, the ppc:sam460ex qemu emulation no longer boots from nvme: nvme nvme0: Device not ready; aborting initialisation, CSTS=0x0 nvme nvme0: Removing after probe failure status: -19 Link: https://lore.kernel.org/r/20210709231529.GA3270116@roeck-us.net Reported-by: Guenter Roeck Signed-off-by: Bjorn Helgaas commit 98c25b8012461f569a4d20bc4a48c489099cf7fd Author: Fabio Estevam Date: Thu Jun 24 09:09:53 2021 -0300 rtc: pcf85063: Update the PCF85063A datasheet revision After updating the datasheet URL, the PCF85063A datasheet revision has changed. Adjust it accordingly. Reported-by: Nobuhiro Iwamatsu Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210624120953.2313378-1-festevam@gmail.com commit 08eeafbba566ad0413b2e118e72658bee0550efb Author: Alexandre Belloni Date: Mon Jun 21 00:40:29 2021 +0200 dt-bindings: rtc: ti,bq32k: take maintainership Take maintainership of the binding as PAvel said he doesn't have the hardware anymore. Signed-off-by: Alexandre Belloni Acked-by: Pavel Machek Link: https://lore.kernel.org/r/20210620224030.1115356-1-alexandre.belloni@bootlin.com commit 5d52c906f059b9ee11747557aaaf1fd85a3b6c3d Merge: 67a9c94317402 1fb5ba29ad083 Author: David S. Miller Date: Fri Jul 9 15:22:45 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-07-09 The following pull-request contains BPF updates for your *net* tree. We've added 9 non-merge commits during the last 9 day(s) which contain a total of 13 files changed, 118 insertions(+), 62 deletions(-). The main changes are: 1) Fix runqslower task->state access from BPF, from SanjayKumar Jeyakumar. 2) Fix subprog poke descriptor tracking use-after-free, from John Fastabend. 3) Fix sparse complaint from prior devmap RCU conversion, from Toke Høiland-Jørgensen. 4) Fix missing va_end in bpftool JIT json dump's error path, from Gu Shengxian. 5) Fix tools/bpf install target from missing runqslower install, from Wei Li. 6) Fix xdpsock BPF sample to unload program on shared umem option, from Wang Hai. ==================== Signed-off-by: David S. Miller commit 67a9c94317402b826fc3db32afc8f39336803d97 Author: Taehee Yoo Date: Fri Jul 9 17:35:18 2021 +0000 net: validate lwtstate->data before returning from skb_tunnel_info() skb_tunnel_info() returns pointer of lwtstate->data as ip_tunnel_info type without validation. lwtstate->data can have various types such as mpls_iptunnel_encap, etc and these are not compatible. So skb_tunnel_info() should validate before returning that pointer. Splat looks like: BUG: KASAN: slab-out-of-bounds in vxlan_get_route+0x418/0x4b0 [vxlan] Read of size 2 at addr ffff888106ec2698 by task ping/811 CPU: 1 PID: 811 Comm: ping Not tainted 5.13.0+ #1195 Call Trace: dump_stack_lvl+0x56/0x7b print_address_description.constprop.8.cold.13+0x13/0x2ee ? vxlan_get_route+0x418/0x4b0 [vxlan] ? vxlan_get_route+0x418/0x4b0 [vxlan] kasan_report.cold.14+0x83/0xdf ? vxlan_get_route+0x418/0x4b0 [vxlan] vxlan_get_route+0x418/0x4b0 [vxlan] [ ... ] vxlan_xmit_one+0x148b/0x32b0 [vxlan] [ ... ] vxlan_xmit+0x25c5/0x4780 [vxlan] [ ... ] dev_hard_start_xmit+0x1ae/0x6e0 __dev_queue_xmit+0x1f39/0x31a0 [ ... ] neigh_xmit+0x2f9/0x940 mpls_xmit+0x911/0x1600 [mpls_iptunnel] lwtunnel_xmit+0x18f/0x450 ip_finish_output2+0x867/0x2040 [ ... ] Fixes: 61adedf3e3f1 ("route: move lwtunnel state to dst_entry") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 9992a078b1771da354ac1f9737e1e639b687caa2 Author: Hangbin Liu Date: Fri Jul 9 11:45:02 2021 +0800 net: ip_tunnel: fix mtu calculation for ETHER tunnel devices Commit 28e104d00281 ("net: ip_tunnel: fix mtu calculation") removed dev->hard_header_len subtraction when calculate MTU for tunnel devices as there is an overhead for device that has header_ops. But there are ETHER tunnel devices, like gre_tap or erspan, which don't have header_ops but set dev->hard_header_len during setup. This makes pkts greater than (MTU - ETH_HLEN) could not be xmited. Fix it by subtracting the ETHER tunnel devices' dev->hard_header_len for MTU calculation. Fixes: 28e104d00281 ("net: ip_tunnel: fix mtu calculation") Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 34bd46bcf3de72cbffcdc42d3fa67e543d1c869b Author: Zack Rusin Date: Tue Jun 15 14:23:35 2021 -0400 drm/vmwgfx: Fix a bad merge in otable batch takedown Change 2ef4fb92363c ("drm/vmwgfx: Make sure bo's are unpinned before putting them back") caused a conflict in one of the drm trees and the merge commit 68a32ba14177 ("Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm") accidently re-added code that the original change was removing. Fixed by removing the incorrect buffer unpin - it has already been unpinned two lines above. Fixes: 68a32ba14177 ("Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20210615182336.995192-4-zackr@vmware.com commit c26d6586e97a69ef9b429cc577ca4c9d2d2ec7cd Author: Zack Rusin Date: Wed Jun 9 13:23:07 2021 -0400 drm/vmwgfx: Fix implicit declaration error The declarations of ttm_range_man_init and ttm_range_man_fini have been moved to ttm_range_manager.h so we have to add it to the include list. Signed-off-by: Zack Rusin Reported-by: Randy Dunlap Fixes: 3eb7d96e9415 ("drm/ttm: flip over the range manager to self allocated nodes") Cc: Christian König Cc: Matthew Auld Reviewed-by: Martin Krastev Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210609172307.131929-10-zackr@vmware.com commit 50be9417e23af5a8ac860d998e1e3f06b8fd79d7 Merge: a022f7d575bb6 9ce85ef2cb5c7 Author: Linus Torvalds Date: Fri Jul 9 12:17:38 2021 -0700 Merge tag 'io_uring-5.14-2021-07-09' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few fixes that should go into this merge. One fixes a regression introduced in this release, others are just generic fixes, mostly related to handling fallback task_work" * tag 'io_uring-5.14-2021-07-09' of git://git.kernel.dk/linux-block: io_uring: remove dead non-zero 'poll' check io_uring: mitigate unlikely iopoll lag io_uring: fix drain alloc fail return code io_uring: fix exiting io_req_task_work_add leaks io_uring: simplify task_work func io_uring: fix stuck fallback reqs commit a022f7d575bb68c35be0a9ea68860411dec652fe Merge: 3de62951a5bee a731763fc479a Author: Linus Torvalds Date: Fri Jul 9 12:05:33 2021 -0700 Merge tag 'block-5.14-2021-07-08' of git://git.kernel.dk/linux-block Pull more block updates from Jens Axboe: "A combination of changes that ended up depending on both the driver and core branch (and/or the IDE removal), and a few late arriving fixes. In detail: - Fix io ticks wrap-around issue (Chunguang) - nvme-tcp sock locking fix (Maurizio) - s390-dasd fixes (Kees, Christoph) - blk_execute_rq polling support (Keith) - blk-cgroup RCU iteration fix (Yu) - nbd backend ID addition (Prasanna) - Partition deletion fix (Yufen) - Use blk_mq_alloc_disk for mmc, mtip32xx, ubd (Christoph) - Removal of now dead block request types due to IDE removal (Christoph) - Loop probing and control device cleanups (Christoph) - Device uevent fix (Christoph) - Misc cleanups/fixes (Tetsuo, Christoph)" * tag 'block-5.14-2021-07-08' of git://git.kernel.dk/linux-block: (34 commits) blk-cgroup: prevent rcu_sched detected stalls warnings while iterating blkgs block: fix the problem of io_ticks becoming smaller nvme-tcp: can't set sk_user_data without write_lock loop: remove unused variable in loop_set_status() block: remove the bdgrab in blk_drop_partitions block: grab a device refcount in disk_uevent s390/dasd: Avoid field over-reading memcpy() dasd: unexport dasd_set_target_state block: check disk exist before trying to add partition ubd: remove dead code in ubd_setup_common nvme: use return value from blk_execute_rq() block: return errors from blk_execute_rq() nvme: use blk_execute_rq() for passthrough commands block: support polling through blk_execute_rq block: remove REQ_OP_SCSI_{IN,OUT} block: mark blk_mq_init_queue_data static loop: rewrite loop_exit using idr_for_each_entry loop: split loop_lookup loop: don't allow deleting an unspecified loop device loop: move loop_ctl_mutex locking into loop_add ... commit 3de62951a5bee5dce5f4ffab8b7323ca9d3c7e1c Merge: 5a7f7fc5ddbbf 24d1e49415be5 Author: Linus Torvalds Date: Fri Jul 9 11:40:26 2021 -0700 Merge tag 'sound-fix-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a collection of small fixes here: the most outstanding one is the re-application of USB-audio lowlatency support that was reverted in the previous PR. The rest are device-specific quirks/fixes, spelling fixes and a regression fix for the old intel8x0 driver" * tag 'sound-fix-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: intel8x0: Fix breakage at ac97 clock measurement ALSA: usb-audio: Reduce latency at playback start, take#2 ALSA: isa: Fix error return code in snd_cmi8330_probe() ALSA: emux: fix spelling mistakes ALSA: usb-audio: fix spelling mistakes ALSA: bebob: correct duplicated entries with TerraTec OUI ALSA: usx2y: fix spelling mistakes ALSA: x86: fix spelling mistakes ALSA: hda/realtek: fix mute led of the HP Pavilion 15-eh1xxx series commit eb7261f14e1a86f0fd299a2ec408990d349ce3d1 Author: Riccardo Mancini Date: Fri Jul 9 18:34:53 2021 +0200 perf test: Add free() calls for scandir() returned dirent entries ASan reported a memory leak for items of the entlist returned from scandir(). In fact, scandir() returns a malloc'd array of malloc'd dirents. This patch adds the missing (z)frees. Fixes: da963834fe6975a1 ("perf test: Iterate over shell tests in alphabetical order") Signed-off-by: Riccardo Mancini Cc: Alexander Shishkin Cc: Fabian Hemmer Cc: Ian Rogers Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Remi Bernon Link: http://lore.kernel.org/lkml/20210709163454.672082-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit afd4ad01ff0441fdb3f2907f9f8c6e019e62270f Author: Jiri Olsa Date: Tue Jul 6 17:17:04 2021 +0200 libperf: Add tests for perf_evlist__set_leader() Add a test for the newly added perf_evlist__set_leader() function. Committer testing: $ cd tools/lib/perf/ $ sudo make tests [sudo] password for acme: running static: - running tests/test-cpumap.c...OK - running tests/test-threadmap.c...OK - running tests/test-evlist.c...OK - running tests/test-evsel.c...OK running dynamic: - running tests/test-cpumap.c...OK - running tests/test-threadmap.c...OK - running tests/test-evlist.c...OK - running tests/test-evsel.c...OK $ Signed-off-by: Jiri Olsa Requested-by: Shunsuke Nakamura Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706151704.73662-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e2c18168c373c92de476b5592807169941a153f5 Author: Arnaldo Carvalho de Melo Date: Fri Jul 9 14:52:16 2021 -0300 libperf: Remove BUG_ON() from library code in get_group_fd() We shouldn't just panic, return a value that doesn't clash with what perf_evsel__open() was already returning in case of error, i.e. errno when sys_perf_event_open() fails. Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shunsuke Nakamura Link: http://lore.kernel.org/lkml/YOiOA5zOtVH9IBbE@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 28b34f01a73435a754956ebae826e728c03ffa38 Author: Antoine Tenart Date: Fri Jul 9 18:16:09 2021 +0200 net: do not reuse skbuff allocated from skbuff_fclone_cache in the skb cache Some socket buffers allocated in the fclone cache (in __alloc_skb) can end-up in the following path[1]: napi_skb_finish __kfree_skb_defer napi_skb_cache_put The issue is napi_skb_cache_put is not fclone friendly and will put those skbuff in the skb cache to be reused later, although this cache only expects skbuff allocated from skbuff_head_cache. When this happens the skbuff is eventually freed using the wrong origin cache, and we can see traces similar to: [ 1223.947534] cache_from_obj: Wrong slab cache. skbuff_head_cache but object is from skbuff_fclone_cache [ 1223.948895] WARNING: CPU: 3 PID: 0 at mm/slab.h:442 kmem_cache_free+0x251/0x3e0 [ 1223.950211] Modules linked in: [ 1223.950680] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.13.0+ #474 [ 1223.951587] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-3.fc34 04/01/2014 [ 1223.953060] RIP: 0010:kmem_cache_free+0x251/0x3e0 Leading sometimes to other memory related issues. Fix this by using __kfree_skb for fclone skbuff, similar to what is done the other place __kfree_skb_defer is called. [1] At least in setups using veth pairs and tunnels. Building a kernel with KASAN we can for example see packets allocated in sk_stream_alloc_skb hit the above path and later the issue arises when the skbuff is reused. Fixes: 9243adfc311a ("skbuff: queue NAPI_MERGED_FREE skbs into NAPI cache instead of freeing") Cc: Alexander Lobakin Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 358ed624207012f03318235017ac6fb41f8af592 Author: Talal Ahmad Date: Fri Jul 9 11:43:06 2021 -0400 tcp: call sk_wmem_schedule before sk_mem_charge in zerocopy path sk_wmem_schedule makes sure that sk_forward_alloc has enough bytes for charging that is going to be done by sk_mem_charge. In the transmit zerocopy path, there is sk_mem_charge but there was no call to sk_wmem_schedule. This change adds that call. Without this call to sk_wmem_schedule, sk_forward_alloc can go negetive which is a bug because sk_forward_alloc is a per-socket space that has been forward charged so this can't be negative. Fixes: f214f915e7db ("tcp: enable MSG_ZEROCOPY") Signed-off-by: Talal Ahmad Reviewed-by: Willem de Bruijn Reviewed-by: Wei Wang Reviewed-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 43b90bfad34bcb81b8a5bc7dc650800f4be1787e Author: Alexander Ovechkin Date: Fri Jul 9 18:28:23 2021 +0300 net: send SYNACK packet with accepted fwmark commit e05a90ec9e16 ("net: reflect mark on tcp syn ack packets") fixed IPv4 only. This part is for the IPv6 side. Fixes: e05a90ec9e16 ("net: reflect mark on tcp syn ack packets") Signed-off-by: Alexander Ovechkin Acked-by: Dmitry Yakunin Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 5a7f7fc5ddbbf9bf63eaa8cb9a0d254ab984f3d6 Merge: 1eb8df18677d1 3ecda64475bcc Author: Linus Torvalds Date: Fri Jul 9 11:15:09 2021 -0700 Merge tag 'trace-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix and cleanup from Steven Rostedt: "Tracing fix for histograms and a clean up in ftrace: - Fixed a bug that broke the .sym-offset modifier and added a test to make sure nothing breaks it again. - Replace a list_del/list_add() with a list_move()" * tag 'trace-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Use list_move instead of list_del/list_add tracing/selftests: Add tests to test histogram sym and sym-offset modifiers tracing/histograms: Fix parsing of "sym-offset" modifier commit 1eb8df18677d197d7538583823c373d7f13cbebc Merge: d8dc121eeab9a db7b337709a15 Author: Linus Torvalds Date: Fri Jul 9 11:06:29 2021 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio,vhost,vdpa updates from Michael Tsirkin: - Doorbell remapping for ifcvf, mlx5 - virtio_vdpa support for mlx5 - Validate device input in several drivers (for SEV and friends) - ZONE_MOVABLE aware handling in virtio-mem - Misc fixes, cleanups * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (48 commits) virtio-mem: prioritize unplug from ZONE_MOVABLE in Big Block Mode virtio-mem: simplify high-level unplug handling in Big Block Mode virtio-mem: prioritize unplug from ZONE_MOVABLE in Sub Block Mode virtio-mem: simplify high-level unplug handling in Sub Block Mode virtio-mem: simplify high-level plug handling in Sub Block Mode virtio-mem: use page_zonenum() in virtio_mem_fake_offline() virtio-mem: don't read big block size in Sub Block Mode virtio/vdpa: clear the virtqueue state during probe vp_vdpa: allow set vq state to initial state after reset virtio-pci library: introduce vp_modern_get_driver_features() vdpa: support packed virtqueue for set/get_vq_state() virtio-ring: store DMA metadata in desc_extra for split virtqueue virtio: use err label in __vring_new_virtqueue() virtio_ring: introduce virtqueue_desc_add_split() virtio_ring: secure handling of mapping errors virtio-ring: factor out desc_extra allocation virtio_ring: rename vring_desc_extra_packed virtio-ring: maintain next in extra state for packed virtqueue vdpa/mlx5: Clear vq ready indication upon device reset vdpa/mlx5: Add support for doorbell bypassing ... commit 4d069f6022e938bc51667da637f2483a37a77e19 Author: Steve French Date: Fri Jul 9 13:02:26 2021 -0500 cifs: update internal version number To 2.33 Signed-off-by: Steve French commit 0336f8ffece62f882ab3012820965a786a983f70 Author: Pavel Skripkin Date: Fri Jul 9 17:58:29 2021 +0300 net: ti: fix UAF in tlan_remove_one priv is netdev private data and it cannot be used after free_netdev() call. Using priv after free_netdev() can cause UAF bug. Fix it by moving free_netdev() at the end of the function. Fixes: 1e0a8b13d355 ("tlan: cancel work at remove path") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit ad297cd2db8953e2202970e9504cab247b6c7cb4 Author: Pavel Skripkin Date: Fri Jul 9 17:24:18 2021 +0300 net: qcom/emac: fix UAF in emac_remove adpt is netdev private data and it cannot be used after free_netdev() call. Using adpt after free_netdev() can cause UAF bug. Fix it by moving free_netdev() at the end of the function. Fixes: 54e19bc74f33 ("net: qcom/emac: do not use devm on internal phy pdev") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit c78eaeebe855fd93f2e77142ffd0404a54070d84 Author: Pavel Skripkin Date: Fri Jul 9 17:09:53 2021 +0300 net: moxa: fix UAF in moxart_mac_probe In case of netdev registration failure the code path will jump to init_fail label: init_fail: netdev_err(ndev, "init failed\n"); moxart_mac_free_memory(ndev); irq_map_fail: free_netdev(ndev); return ret; So, there is no need to call free_netdev() before jumping to error handling path, since it can cause UAF or double-free bug. Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit d8dc121eeab9abfbc510097f8db83e87560f753b Merge: 9b76d71fa8be8 66192b2e3fd8a Author: Linus Torvalds Date: Fri Jul 9 11:00:44 2021 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - Regression fix in drbg due to missing self-test for new default algorithm - Add ratelimit on user-triggerable message in qat - Fix build failure due to missing dependency in sl3516 - Remove obsolete PageSlab checks - Fix bogus hardware register writes on Kunpeng920 in hisilicon/sec * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: hisilicon/sec - fix the process of disabling sva prefetching crypto: sl3516 - Add dependency on ARCH_GEMINI crypto: sl3516 - Typo s/Stormlink/Storlink/ crypto: drbg - self test for HMAC(SHA-512) crypto: omap - Drop obsolete PageSlab check crypto: scatterwalk - Remove obsolete PageSlab check crypto: qat - ratelimit invalid ioctl message and print the invalid cmd commit 03313d1c3a2f086bb60920607ab79ac8f8578306 Author: Paulo Alcantara Date: Fri Jul 2 11:50:54 2021 -0300 cifs: prevent NULL deref in cifs_compose_mount_options() The optional @ref parameter might contain an NULL node_name, so prevent dereferencing it in cifs_compose_mount_options(). Addresses-Coverity: 1476408 ("Explicit null dereferenced") Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3fd35de1686bf809431c5f0137de8eee5a2811d6 Author: Jiri Olsa Date: Tue Jul 6 17:17:03 2021 +0200 libperf: Add group support to perf_evsel__open() Add support to set group_fd in perf_evsel__open() and make it follow the group setup. Signed-off-by: Jiri Olsa Requested-by: Shunsuke Nakamura Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706151704.73662-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 53d31a3ffd60176af24f2f77fb3a7e567134eb90 Author: Steve French Date: Mon Jul 5 15:05:39 2021 -0500 SMB3.1.1: Add support for negotiating signing algorithm Support for faster packet signing (using GMAC instead of CMAC) can now be negotiated to some newer servers, including Windows. See MS-SMB2 section 2.2.3.17. This patch adds support for sending the new negotiate context with the first of three supported signing algorithms (AES-CMAC) and decoding the response. A followon patch will add support for sending the other two (including AES-GMAC, which is fastest) and changing the signing algorithm used based on what was negotiated. To allow the client to request GMAC signing set module parameter "enable_negotiate_signing" to 1. Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit 42accadb3265f4569620cde217ff448b568b2822 Merge: 95ef715236638 048c958f12a22 Author: Olof Johansson Date: Fri Jul 9 10:45:23 2021 -0700 Merge branch 'arm/fixes' into arm/soc Merging in the last batch of fixes that didn't go in before previous release, just a few smaller DT fixups and a MAINTAINERS update * arm/fixes: (29 commits) MAINTAINERS: Add myself as TEE subsystem reviewer ARM: dts: ux500: Fix LED probing arm64: dts: rockchip: Update RK3399 PCI host bridge window to 32-bit address memory arm64: dts: allwinner: a64-sopine-baseboard: change RGMII mode to TXID arm64: meson: select COMMON_CLK soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe() ARM: dts: qcom: sdx55-telit: Represent secure-regions as 64-bit elements ARM: dts: qcom: sdx55-t55: Represent secure-regions as 64-bit elements ARM: dts: sun8i: h3: orangepi-plus: Fix ethernet phy-mode ARM: dts: imx: emcon-avari: Fix nxp,pca8574 #gpio-cells ARM: dts: imx7d-pico: Fix the 'tuning-step' property ARM: dts: imx7d-meerkat96: Fix the 'tuning-step' property arm64: dts: freescale: sl28: var1: fix RGMII clock and voltage arm64: dts: freescale: sl28: var4: fix RGMII clock and voltage ARM: imx: pm-imx27: Include "common.h" arm64: dts: zii-ultra: fix 12V_MAIN voltage arm64: dts: zii-ultra: remove second GEN_3V3 regulator instance arm64: dts: ls1028a: fix memory node optee: use export_uuid() to copy client UUID arm64: dts: ti: k3*: Introduce reg definition for interrupt routers ... commit 9b76d71fa8be8c52dbc855ab516754f0c93e2980 Merge: 1459718d7d790 1958e5aef5098 Author: Linus Torvalds Date: Fri Jul 9 10:36:29 2021 -0700 Merge tag 'riscv-for-linus-5.14-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "We have a handful of new features for 5.14: - Support for transparent huge pages. - Support for generic PCI resources mapping. - Support for the mem= kernel parameter. - Support for KFENCE. - A handful of fixes to avoid W+X mappings in the kernel. - Support for VMAP_STACK based overflow detection. - An optimized copy_{to,from}_user" * tag 'riscv-for-linus-5.14-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (37 commits) riscv: xip: Fix duplicate included asm/pgtable.h riscv: Fix PTDUMP output now BPF region moved back to module region riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall riscv: add VMAP_STACK overflow detection riscv: ptrace: add argn syntax riscv: mm: fix build errors caused by mk_pmd() riscv: Introduce structure that group all variables regarding kernel mapping riscv: Map the kernel with correct permissions the first time riscv: Introduce set_kernel_memory helper riscv: Enable KFENCE for riscv64 RISC-V: Use asm-generic for {in,out}{bwlq} riscv: add ASID-based tlbflushing methods riscv: pass the mm_struct to __sbi_tlb_flush_range riscv: Add mem kernel parameter support riscv: Simplify xip and !xip kernel address conversion macros riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED riscv: Only initialize swiotlb when necessary riscv: fix typo in init.c riscv: Cleanup unused functions riscv: mm: Use better bitmap_zalloc() ... commit 1459718d7d79013a4814275c466e0b32da6a26bc Merge: dcf3c935dd9e8 2c669ef6979c3 Author: Linus Torvalds Date: Fri Jul 9 10:26:52 2021 -0700 Merge tag 'powerpc-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fix crashes on 64-bit Book3E due to use of Book3S only mtmsrd instruction. Fix "scheduling while atomic" warnings at boot due to preempt count underflow. Two commits fixing our handling of BPF atomic instructions. Fix error handling in xive when allocating an IPI. Fix lockup on kernel exec fault on 603. Thanks to Bharata B Rao, Cédric Le Goater, Christian Zigotzky, Christophe Leroy, Guenter Roeck, Jiri Olsa, Naveen N. Rao, Nicholas Piggin, and Valentin Schneider" * tag 'powerpc-5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/preempt: Don't touch the idle task's preempt_count during hotplug powerpc/64e: Fix system call illegal mtmsrd instruction powerpc/xive: Fix error handling when allocating an IPI powerpc/bpf: Reject atomic ops in ppc32 JIT powerpc/bpf: Fix detecting BPF atomic instructions powerpc/mm: Fix lockup on kernel exec fault commit dcf3c935dd9e8e76c9922e88672fa4ad6a8a4df8 Merge: 7a400bf28334f 1aee020155f36 Author: Linus Torvalds Date: Fri Jul 9 10:19:13 2021 -0700 Merge tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - Support for optimized routines based on the host CPU - Support for PCI via virtio - Various fixes * tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: remove unneeded semicolon in um_arch.c um: Remove the repeated declaration um: fix error return code in winch_tramp() um: fix error return code in slip_open() um: Fix stack pointer alignment um: implement flush_cache_vmap/flush_cache_vunmap um: add a UML specific futex implementation um: enable the use of optimized xor routines in UML um: Add support for host CPU flags and alignment um: allow not setting extra rpaths in the linux binary um: virtio/pci: enable suspend/resume um: add PCI over virtio emulation driver um: irqs: allow invoking time-travel handler multiple times um: time-travel/signals: fix ndelay() in interrupt um: expose time-travel mode to userspace side um: export signals_enabled directly um: remove unused smp_sigio_handler() declaration lib: add iomem emulation (logic_iomem) um: allow disabling NO_IOMEM commit 7a400bf28334fc7734639db3566394e1fc80670c Merge: e49d68ce7cc5a a801fcfeef967 Author: Linus Torvalds Date: Fri Jul 9 10:10:47 2021 -0700 Merge tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBIFS updates from Richard Weinberger: - Fix for a race xattr list and modification - Various minor fixes (spelling, return codes, ...) * tag 'for-linus-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode ubifs: Fix spelling mistakes ubifs: Remove ui_mutex in ubifs_xattr_get and change_xattr ubifs: Fix races between xattr_{set|get} and listxattr operations ubifs: fix snprintf() checking ubifs: journal: Fix error return code in ubifs_jnl_write_inode() commit c47a5599eda324bacdacd125227a0925d6c50fbe Author: Jin Yao Date: Thu Jul 1 14:42:53 2021 +0800 perf tools: Fix pattern matching for same substring in different PMU type Some different PMU types may have the same substring. For example, on Icelake server we have PMU types "uncore_imc" and "uncore_imc_free_running". Both PMU types have the substring "uncore_imc". But the parser wrongly thinks they are the same PMU type. We enable an imc event, perf stat -e uncore_imc/event=0xe3/ -a -- sleep 1 Perf actually expands the event to: uncore_imc_0/event=0xe3/ uncore_imc_1/event=0xe3/ uncore_imc_2/event=0xe3/ uncore_imc_3/event=0xe3/ uncore_imc_4/event=0xe3/ uncore_imc_5/event=0xe3/ uncore_imc_6/event=0xe3/ uncore_imc_7/event=0xe3/ uncore_imc_free_running_0/event=0xe3/ uncore_imc_free_running_1/event=0xe3/ uncore_imc_free_running_3/event=0xe3/ uncore_imc_free_running_4/event=0xe3/ That's because the "uncore_imc_free_running" matches the pattern "uncore_imc*". Now we check that the last characters of PMU name is '_'. For example, for pattern "uncore_imc*", "uncore_imc_0" is parsed ok, but "uncore_imc_free_running_0" fails. Fixes: b2b9d3a3f0211c5d ("perf pmu: Support wildcards on pmu name in dynamic pmu events") Signed-off-by: Jin Yao Reviewed-by: Kan Liang Acked-by: Jiri Olsa Cc: Agustin Vega-Frias Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210701064253.1175-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b91e5492f9d7ca89919cfe8b0c5b5996263182f7 Author: Kan Liang Date: Thu Jul 8 09:03:32 2021 -0700 perf record: Add a dummy event on hybrid systems to collect metadata records Some symbols may not be resolved if a user only monitors one type of PMU. $ sudo perf record -e cpu_atom/branch-instructions/ ./big_small_workload $ sudo perf report –stdio # Overhead Command Shared Object Symbol # ........ ......... ................. ..................... # 28.02% perf-exec [unknown] [.] 0x0000000000401cf6 11.32% perf-exec [unknown] [.] 0x0000000000401d04 10.90% perf-exec [unknown] [.] 0x0000000000401d11 10.61% perf-exec [unknown] [.] 0x0000000000401cfc To parse symbols the metadata records, e.g., PERF_RECORD_COMM, which are generated by the kernel, are required. To decide whether to generate the metadata records, the kernel relies on the event_filter_match() to filter the unrelated events. On a hybrid system, event_filter_match() further checks the CPU mask of the current enabled PMU. If an event is collected on the CPU which doesn't have an enabled PMU, it's treated as an unrelated event. The "big_small_workload" is created in a big core, but runs on a small core. The metadata records are filtered, because the user only monitors the PMU of the small core. The big core PMU is not enabled. For a hybrid system, a dummy event is required to generate the complete side-band events. Signed-off-by: Kan Liang Acked-by: Namhyung Kim Cc: Jin Yao Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/1625760212-18441-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5f148e7c6ad7f6e693a459a1df741db47a5ab82e Author: Kan Liang Date: Thu Jul 8 09:02:49 2021 -0700 perf stat: Add Topdown metrics L2 events as default events The Topdown Microarchitecture Analysis (TMA) Method is a structured analysis methodology to identify critical performance bottlenecks in out-of-order processors. The Topdown metrics L1 event was added as default in 42641d6f4d15e6db ("perf stat: Add Topdown metrics events as default events") From the Sapphire Rapids server and later platforms, the same dedicated "metrics" register is extended to support both L1 and L2 events. Add both L1 and L2 Topdown metrics events as default to enrich the default measuring information if the new measurement register is available. On legacy systems there is no change to avoid extra multiplexing. The topdown_level indicates the max metrics level for the top-down statistics. Set it to 2 to display all L1 and L2 Topdown metrics events. With the patch: $ perf stat sleep 1 Performance counter stats for 'sleep 1': 0.59 msec task-clock # 0.001 CPUs utilized 1 context-switches # 1.687 K/sec 0 cpu-migrations # 0.000 /sec 76 page-faults # 128.198 K/sec 1,405,318 cycles # 2.371 GHz 1,471,136 instructions # 1.05 insn per cycle 310,132 branches # 523.136 M/sec 10,435 branch-misses # 3.36% of all branches 8,431,908 slots # 14.223 G/sec 1,554,116 topdown-retiring # 18.4% retiring 1,289,585 topdown-bad-spec # 15.2% bad speculation 2,810,636 topdown-fe-bound # 33.2% frontend bound 2,810,636 topdown-be-bound # 33.2% backend bound 231,464 topdown-heavy-ops # 2.7% heavy operations # 15.6% light operations 1,223,453 topdown-br-mispredict # 14.5% branch mispredict # 0.8% machine clears 1,884,779 topdown-fetch-lat # 22.3% fetch latency # 10.9% fetch bandwidth 1,454,917 topdown-mem-bound # 17.2% memory bound # 16.0% Core bound 1.001179699 seconds time elapsed 0.000000000 seconds user 0.001238000 seconds sys Signed-off-by: Kan Liang Reviewed-by: Andi Kleen Acked-by: Namhyung Kim Cc: Jin Yao Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/1625760169-18396-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2e6263ab54322bac27589d1102f7a955d3f7ff80 Author: Jiri Olsa Date: Tue Jul 6 17:17:02 2021 +0200 libperf: Adopt evlist__set_leader() from tools/perf as perf_evlist__set_leader() Move the implementation of evlist__set_leader() to a new libperf perf_evlist__set_leader() function with the same functionality make it a libperf exported API. Signed-off-by: Jiri Olsa Requested-by: Shunsuke Nakamura Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706151704.73662-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3a683120d88586056c0f6728b11da895bbd773a3 Author: Jiri Olsa Date: Tue Jul 6 17:17:01 2021 +0200 libperf: Move 'nr_groups' from tools/perf to evlist::nr_groups Move evsel::nr_groups to perf_evsel::nr_groups, so we can move the group interface to libperf. Signed-off-by: Jiri Olsa Requested-by: Shunsuke Nakamura Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706151704.73662-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fba7c86601e2e42d7057db47bf6d45865a208b8c Author: Jiri Olsa Date: Tue Jul 6 17:17:00 2021 +0200 libperf: Move 'leader' from tools/perf to perf_evsel::leader Move evsel::leader to perf_evsel::leader, so we can move the group interface to libperf. Also add several evsel helpers to ease up the transition: struct evsel *evsel__leader(struct evsel *evsel); - get leader evsel bool evsel__has_leader(struct evsel *evsel, struct evsel *leader); - true if evsel has leader as leader bool evsel__is_leader(struct evsel *evsel); - true if evsel is itw own leader void evsel__set_leader(struct evsel *evsel, struct evsel *leader); - set leader for evsel Committer notes: Fix this when building with 'make BUILD_BPF_SKEL=1' tools/perf/util/bpf_counter.c - if (evsel->leader->core.nr_members > 1) { + if (evsel->core.leader->nr_members > 1) { Signed-off-by: Jiri Olsa Requested-by: Shunsuke Nakamura Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706151704.73662-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 38fe0e0156c037c060f81fe4e36549fae760322d Author: Jiri Olsa Date: Tue Jul 6 17:16:59 2021 +0200 libperf: Move 'idx' from tools/perf to perf_evsel::idx Move evsel::idx to perf_evsel::idx, so we can move the group interface to libperf. Committer notes: Fixup evsel->idx usage in tools/perf/util/bpf_counter_cgroup.c, that appeared in my tree in my local tree. Also fixed up these: $ find tools/perf/ -name "*.[ch]" | xargs grep 'evsel->idx' tools/perf/ui/gtk/annotate.c: evsel->idx + i); tools/perf/ui/gtk/annotate.c: evsel->idx); $ That running 'make -C tools/perf build-test' caught. Signed-off-by: Jiri Olsa Requested-by: Shunsuke Nakamura Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706151704.73662-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e49d68ce7cc5a865ce14c1e57938438ab01c3ce3 Merge: 47a7ce62889a5 0705e8d1e2207 Author: Linus Torvalds Date: Fri Jul 9 09:57:27 2021 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Ext4 regression and bug fixes" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: inline jbd2_journal_[un]register_shrinker() ext4: fix flags validity checking for EXT4_IOC_CHECKPOINT ext4: fix possible UAF when remounting r/o a mmp-protected file system ext4: use ext4_grp_locked_error in mb_find_extent ext4: fix WARN_ON_ONCE(!buffer_uptodate) after an error writing the superblock Revert "ext4: consolidate checks for resize of bigalloc into ext4_resize_begin" commit 47a7ce62889a52841bcc8cec98dd3bf45af3b4f0 Merge: 96890bc2eaa1f 4c18347238ab5 Author: Linus Torvalds Date: Fri Jul 9 09:52:13 2021 -0700 Merge tag 'ceph-for-5.14-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "We have new filesystem client metrics for reporting I/O sizes from Xiubo, two patchsets from Jeff that begin to untangle some heavyweight blocking locks in the filesystem and a bunch of code cleanups" * tag 'ceph-for-5.14-rc1' of git://github.com/ceph/ceph-client: ceph: take reference to req->r_parent at point of assignment ceph: eliminate ceph_async_iput() ceph: don't take s_mutex in ceph_flush_snaps ceph: don't take s_mutex in try_flush_caps ceph: don't take s_mutex or snap_rwsem in ceph_check_caps ceph: eliminate session->s_gen_ttl_lock ceph: allow ceph_put_mds_session to take NULL or ERR_PTR ceph: clean up locking annotation for ceph_get_snap_realm and __lookup_snap_realm ceph: add some lockdep assertions around snaprealm handling ceph: decoding error in ceph_update_snap_realm should return -EIO ceph: add IO size metrics support ceph: update and rename __update_latency helper to __update_stdev ceph: simplify the metrics struct libceph: fix doc warnings in cls_lock_client.c libceph: remove unnecessary ret variable in ceph_auth_init() libceph: fix some spelling mistakes libceph: kill ceph_none_authorizer::reply_buf ceph: make ceph_queue_cap_snap static ceph: make ceph_netfs_read_ops static ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty commit 96890bc2eaa1f6bfc1b194e0f0815a10824352a4 Merge: 227c4d507c71a 878b3dfc42c4d Author: Linus Torvalds Date: Fri Jul 9 09:43:57 2021 -0700 Merge tag 'nfs-for-5.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - Multiple patches to add support for fcntl() leases over NFSv4. - A sysfs interface to display more information about the various transport connections used by the RPC client - A sysfs interface to allow a suitably privileged user to offline a transport that may no longer point to a valid server - A sysfs interface to allow a suitably privileged user to change the server IP address used by the RPC client Stable fixes: - Two sunrpc fixes for deadlocks involving privileged rpc_wait_queues Bugfixes: - SUNRPC: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() - SUNRPC: prevent port reuse on transports which don't request it. - NFSv3: Fix memory leak in posix_acl_create() - NFS: Various fixes to attribute revalidation timeouts - NFSv4: Fix handling of non-atomic change attribute updates - NFSv4: If a server is down, don't cause mounts to other servers to hang as well - pNFS: Fix an Oops in pnfs_mark_request_commit() when doing O_DIRECT - NFS: Fix mount failures due to incorrect setting of the has_sec_mnt_opts filesystem flag - NFS: Ensure nfs_readpage returns promptly when an internal error occurs - NFS: Fix fscache read from NFS after cache error - pNFS: Various bugfixes around the LAYOUTGET operation" * tag 'nfs-for-5.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (46 commits) NFSv4/pNFS: Return an error if _nfs4_pnfs_v3_ds_connect can't load NFSv3 NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times NFSv4/pnfs: Clean up layout get on open NFSv4/pnfs: Fix layoutget behaviour after invalidation NFSv4/pnfs: Fix the layout barrier update NFS: Fix fscache read from NFS after cache error NFS: Ensure nfs_readpage returns promptly when internal error occurs sunrpc: remove an offlined xprt using sysfs sunrpc: provide showing transport's state info in the sysfs directory sunrpc: display xprt's queuelen of assigned tasks via sysfs sunrpc: provide multipath info in the sysfs directory NFSv4.1 identify and mark RPC tasks that can move between transports sunrpc: provide transport info in the sysfs directory SUNRPC: take a xprt offline using sysfs sunrpc: add dst_attr attributes to the sysfs xprt directory SUNRPC for TCP display xprt's source port in sysfs xprt_info SUNRPC query transport's source port SUNRPC display xprt's main value in sysfs's xprt_info SUNRPC mark the first transport sunrpc: add add sysfs directory per xprt under each xprt_switch ... commit 227c4d507c71acb7bece298a98d83e5b44433f62 Merge: bd9c350603298 28607bf3aa6f9 Author: Linus Torvalds Date: Fri Jul 9 09:37:56 2021 -0700 Merge tag 'f2fs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've improved the compression support especially for Android such as allowing compression for mmap files, replacing the immutable bit with internal bit to prohibits data writes explicitly, and adding a mount option, "compress_cache", to improve random reads. And, we added "readonly" feature to compact the partition w/ compression enabled, which will be useful for Android RO partitions. Enhancements: - support compression for mmap file - use an f2fs flag instead of IMMUTABLE bit for compression - support RO feature w/ extent_cache - fully support swapfile with file pinning - improve atgc tunability - add nocompress extensions to unselect files for compression Bug fixes: - fix false alaram on iget failure during GC - fix race condition on global pointers when there are multiple f2fs instances - add MODULE_SOFTDEP for initramfs As usual, we've also cleaned up some places for better code readability (e.g., sysfs/feature, debugging messages, slab cache name, and docs)" * tag 'f2fs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (32 commits) f2fs: drop dirty node pages when cp is in error status f2fs: initialize page->private when using for our internal use f2fs: compress: add nocompress extensions support MAINTAINERS: f2fs: update my email address f2fs: remove false alarm on iget failure during GC f2fs: enable extent cache for compression files in read-only f2fs: fix to avoid adding tab before doc section f2fs: introduce f2fs_casefolded_name slab cache f2fs: swap: support migrating swapfile in aligned write mode f2fs: swap: remove dead codes f2fs: compress: add compress_inode to cache compressed blocks f2fs: clean up /sys/fs/f2fs//features f2fs: add pin_file in feature list f2fs: Advertise encrypted casefolding in sysfs f2fs: Show casefolding support only when supported f2fs: support RO feature f2fs: logging neatening f2fs: introduce FI_COMPRESS_RELEASED instead of using IMMUTABLE bit f2fs: compress: remove unneeded preallocation f2fs: atgc: export entries for better tunability via sysfs ... commit bd9c3506032983d7bc3245015951db0aad9e6e3d Merge: f55966571d5eb feac00aad1237 Author: Linus Torvalds Date: Fri Jul 9 09:29:13 2021 -0700 Merge branch 'akpm' (patches from Andrew) Pull yet more updates from Andrew Morton: "54 patches. Subsystems affected by this patch series: lib, mm (slub, secretmem, cleanups, init, pagemap, and mremap), and debug" * emailed patches from Andrew Morton : (54 commits) powerpc/mm: enable HAVE_MOVE_PMD support powerpc/book3s64/mm: update flush_tlb_range to flush page walk cache mm/mremap: allow arch runtime override mm/mremap: hold the rmap lock in write mode when moving page table entries. mm/mremap: use pmd/pud_poplulate to update page table entries mm/mremap: don't enable optimized PUD move if page table levels is 2 mm/mremap: convert huge PUD move to separate helper selftest/mremap_test: avoid crash with static build selftest/mremap_test: update the test to handle pagesize other than 4K mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * kdump: use vmlinux_build_id to simplify buildid: fix kernel-doc notation buildid: mark some arguments const scripts/decode_stacktrace.sh: indicate 'auto' can be used for base path scripts/decode_stacktrace.sh: silence stderr messages from addr2line/nm scripts/decode_stacktrace.sh: support debuginfod x86/dumpstack: use %pSb/%pBb for backtrace printing arm64: stacktrace: use %pSb for backtrace printing module: add printk formats to add module build ID to stacktraces ... commit c667dcd4dfcd515ad2c9b3953a33d742985a0b5e Author: Thierry Reding Date: Thu Jul 8 12:39:32 2021 +0200 arm64: tegra: Enable SMMU support for USB on Tegra194 As of commit c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194"), SMMU support is enabled system-wide on Tegra194. However, there was a bit of overlap between the SMMU enablement and the USB support addition, so the USB device tree nodes are missing the iommus and interconnects properties. This in turn leads to SMMU faults for these devices, since by default the ARM SMMU will fault. Add the iommus and interconnects properties to the XUSB and XUDC device tree nodes to restore their functionality. Fixes: c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194") Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 34e0fc345ae728cd974d9ee09832abf62cf054c6 Author: Thierry Reding Date: Fri Jul 9 14:08:12 2021 +0200 arm64: tegra: Enable audio IOMMU support on Tegra194 Add iommus and interconnects properties to the sound device tree node on Tegra194. This ensures that the correct SID is used for translation of physical to I/O virtual addresses and that the path to system memory is properly described, which in turn can impact the range of memory that the device can address. Fixes: c7289b1c8a4e ("arm64: tegra: Enable SMMU support on Tegra194") Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit ecef6a9effe49e8e2635c839020b9833b71e934c Author: Christoph Hellwig Date: Fri Jul 9 15:02:37 2021 +0200 libata: fix ata_pio_sector for CONFIG_HIGHMEM Data transfers are not required to be block aligned in memory, so they span two pages. Fix this by splitting the call to >sff_data_xfer into two for that case. This has been broken since the initial libata import before the damn of git, but was uncovered by the legacy ide driver removal. Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210709130237.3730959-1-hch@lst.de Signed-off-by: Jens Axboe commit 9ce85ef2cb5c738754837a6937e120694cde33c9 Author: Jens Axboe Date: Fri Jul 9 08:20:28 2021 -0600 io_uring: remove dead non-zero 'poll' check Colin reports that Coverity complains about checking for poll being non-zero after having dereferenced it multiple times. This is a valid complaint, and actually a leftover from back when this code was based on the aio poll code. Kill the redundant check. Link: https://lore.kernel.org/io-uring/fe70c532-e2a7-3722-58a1-0fa4e5c5ff2c@canonical.com/ Reported-by: Colin Ian King Signed-off-by: Jens Axboe commit 48400483565f0b7e633cbef94b139ff295b59de3 Merge: f55966571d5eb 1fee9db9b42d8 Author: Thomas Gleixner Date: Fri Jul 9 15:35:13 2021 +0200 Merge tag 'irqchip-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Fix a MIPS bug where irqdomain loopkups could occur in a context where RCU is not allowed - Fix a documentation bug for handle_domain_irq commit 47ce8527fbba145a7723685bc9a27d9855e06491 Author: Martin Fäcknitz Date: Mon Jul 5 02:03:54 2021 +0200 MIPS: vdso: Invalid GIC access through VDSO Accessing raw timers (currently only CLOCK_MONOTONIC_RAW) through VDSO doesn't return the correct time when using the GIC as clock source. The address of the GIC mapped page is in this case not calculated correctly. The GIC mapped page is calculated from the VDSO data by subtracting PAGE_SIZE: void *get_gic(const struct vdso_data *data) { return (void __iomem *)data - PAGE_SIZE; } However, the data pointer is not page aligned for raw clock sources. This is because the VDSO data for raw clock sources (CS_RAW = 1) is stored after the VDSO data for coarse clock sources (CS_HRES_COARSE = 0). Therefore, only the VDSO data for CS_HRES_COARSE is page aligned: +--------------------+ | | | vd[CS_RAW] | ---+ | vd[CS_HRES_COARSE] | | +--------------------+ | -PAGE_SIZE | | | | GIC mapped page | <--+ | | +--------------------+ When __arch_get_hw_counter() is called with &vd[CS_RAW], get_gic returns the wrong address (somewhere inside the GIC mapped page). The GIC counter values are not returned which results in an invalid time. Fixes: a7f4df4e21dd ("MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()") Signed-off-by: Martin Fäcknitz Signed-off-by: Thomas Bogendoerfer commit 3efe180d5105d367ae1dfadb97892ab93a89a783 Author: Christian König Date: Tue Jul 6 08:51:25 2021 +0200 drm/qxl: add NULL check for bo->resource When allocations fails that can be NULL now. Signed-off-by: Christian König Reported-by: Daniel Bristot de Oliveira Tested-by: Daniel Bristot de Oliveira Tested-by: Roberto Sassu Fixes: bfa3357ef9ab ("drm/ttm: allocate resource object instead of embedding it v2") Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210708114710.8186-1-christian.koenig@amd.com commit 1fb5ba29ad0835c5cbfc69a27f9c2733cb65726e Author: John Fastabend Date: Wed Jul 7 15:38:48 2021 -0700 bpf: Selftest to verify mixing bpf2bpf calls and tailcalls with insn patch This adds some extra noise to the tailcall_bpf2bpf4 tests that will cause verify to patch insns. This then moves around subprog start/end insn index and poke descriptor insn index to ensure that verify and JIT will continue to track these correctly. If done correctly verifier should pass this program same as before and JIT should emit tail call logic. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210707223848.14580-3-john.fastabend@gmail.com commit f263a81451c12da5a342d90572e317e611846f2c Author: John Fastabend Date: Wed Jul 7 15:38:47 2021 -0700 bpf: Track subprog poke descriptors correctly and fix use-after-free Subprograms are calling map_poke_track(), but on program release there is no hook to call map_poke_untrack(). However, on program release, the aux memory (and poke descriptor table) is freed even though we still have a reference to it in the element list of the map aux data. When we run map_poke_run(), we then end up accessing free'd memory, triggering KASAN in prog_array_map_poke_run(): [...] [ 402.824689] BUG: KASAN: use-after-free in prog_array_map_poke_run+0xc2/0x34e [ 402.824698] Read of size 4 at addr ffff8881905a7940 by task hubble-fgs/4337 [ 402.824705] CPU: 1 PID: 4337 Comm: hubble-fgs Tainted: G I 5.12.0+ #399 [ 402.824715] Call Trace: [ 402.824719] dump_stack+0x93/0xc2 [ 402.824727] print_address_description.constprop.0+0x1a/0x140 [ 402.824736] ? prog_array_map_poke_run+0xc2/0x34e [ 402.824740] ? prog_array_map_poke_run+0xc2/0x34e [ 402.824744] kasan_report.cold+0x7c/0xd8 [ 402.824752] ? prog_array_map_poke_run+0xc2/0x34e [ 402.824757] prog_array_map_poke_run+0xc2/0x34e [ 402.824765] bpf_fd_array_map_update_elem+0x124/0x1a0 [...] The elements concerned are walked as follows: for (i = 0; i < elem->aux->size_poke_tab; i++) { poke = &elem->aux->poke_tab[i]; [...] The access to size_poke_tab is a 4 byte read, verified by checking offsets in the KASAN dump: [ 402.825004] The buggy address belongs to the object at ffff8881905a7800 which belongs to the cache kmalloc-1k of size 1024 [ 402.825008] The buggy address is located 320 bytes inside of 1024-byte region [ffff8881905a7800, ffff8881905a7c00) The pahole output of bpf_prog_aux: struct bpf_prog_aux { [...] /* --- cacheline 5 boundary (320 bytes) --- */ u32 size_poke_tab; /* 320 4 */ [...] In general, subprograms do not necessarily manage their own data structures. For example, BTF func_info and linfo are just pointers to the main program structure. This allows reference counting and cleanup to be done on the latter which simplifies their management a bit. The aux->poke_tab struct, however, did not follow this logic. The initial proposed fix for this use-after-free bug further embedded poke data tracking into the subprogram with proper reference counting. However, Daniel and Alexei questioned why we were treating these objects special; I agree, its unnecessary. The fix here removes the per subprogram poke table allocation and map tracking and instead simply points the aux->poke_tab pointer at the main programs poke table. This way, map tracking is simplified to the main program and we do not need to manage them per subprogram. This also means, bpf_prog_free_deferred(), which unwinds the program reference counting and kfrees objects, needs to ensure that we don't try to double free the poke_tab when free'ing the subprog structures. This is easily solved by NULL'ing the poke_tab pointer. The second detail is to ensure that per subprogram JIT logic only does fixups on poke_tab[] entries it owns. To do this, we add a pointer in the poke structure to point at the subprogram value so JITs can easily check while walking the poke_tab structure if the current entry belongs to the current program. The aux pointer is stable and therefore suitable for such comparison. On the jit_subprogs() error path, we omit cleaning up the poke->aux field because these are only ever referenced from the JIT side, but on error we will never make it to the JIT, so its fine to leave them dangling. Removing these pointers would complicate the error path for no reason. However, we do need to untrack all poke descriptors from the main program as otherwise they could race with the freeing of JIT memory from the subprograms. Lastly, a748c6975dea3 ("bpf: propagate poke descriptors to subprograms") had an off-by-one on the subprogram instruction index range check as it was testing 'insn_idx >= subprog_start && insn_idx <= subprog_end'. However, subprog_end is the next subprogram's start instruction. Fixes: a748c6975dea3 ("bpf: propagate poke descriptors to subprograms") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Co-developed-by: Daniel Borkmann Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210707223848.14580-2-john.fastabend@gmail.com commit 1fee9db9b42d821e8007289d4eea74bdf85b1543 Author: Marc Zyngier Date: Tue Jul 6 11:38:59 2021 +0100 irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry Since d4a45c68dc81 ("irqdomain: Protect the linear revmap with RCU"), any irqdomain lookup requires the RCU read lock to be held. This assumes that the architecture code will be structured such as irq_enter() will be called *before* the interrupt is looked up in the irq domain. However, this isn't the case for MIPS, and a number of drivers are structured to do it the other way around when handling an interrupt in their root irqchip (secondary irqchips are OK by construction). This results in a RCU splat on a lockdep-enabled kernel when the kernel takes an interrupt from idle, as reported by Guenter Roeck. Note that this could have fired previously if any driver had used tree-based irqdomain, which always had the RCU requirement. To solve this, provide a MIPS-specific helper (do_domain_IRQ()) as the pendent of do_IRQ() that will do thing in the right order (and maybe save some cycles in the process). Ideally, MIPS would be moved over to using handle_domain_irq(), but that's much more ambitious. Reported-by: Guenter Roeck Tested-by: Guenter Roeck [maz: add dependency on CONFIG_IRQ_DOMAIN after report from the kernelci bot] Signed-off-by: Marc Zyngier Cc: Thomas Bogendoerfer Cc: Serge Semin Link: https://lore.kernel.org/r/20210705172352.GA56304@roeck-us.net Link: https://lore.kernel.org/r/20210706110647.3979002-1-maz@kernel.org commit 2b452550a203d88112eaf0ba9fc4b750a000b496 Author: Florian Fainelli Date: Thu Jul 8 18:55:32 2021 -0700 net: bcmgenet: Ensure all TX/RX queues DMAs are disabled Make sure that we disable each of the TX and RX queues in the TDMA and RDMA control registers. This is a correctness change to be symmetrical with the code that enables the TX and RX queues. Tested-by: Maxime Ripard Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit e0a3cbcd5cef00cace01546cc6eaaa3b31940da9 Author: Ronnie Sahlberg Date: Thu Jul 8 09:24:16 2021 +1000 cifs: use helpers when parsing uid/gid mount options and validate them Use the nice helpers to initialize and the uid/gid/cred_uid when passed as mount arguments. Signed-off-by: Ronnie Sahlberg Acked-by: Pavel Shilovsky Signed-off-by: Steve French commit 5702b81ea47b3ca3db2e5fa4a382e72fd8eef693 Merge: 96248d6da6574 163f5de509a8e Author: David S. Miller Date: Thu Jul 8 14:16:39 2021 -0700 Merge branch 'ncsi-phy-link-up' Ivan Mikhaylov says: ==================== net/ncsi: Add NCSI Intel OEM command to keep PHY link up Add NCSI Intel OEM command to keep PHY link up and prevents any channel resets during the host load on i210. Also includes dummy response handler for Intel manufacturer id. Changes from v1: 1. sparse fixes about casts 2. put it after ncsi_dev_state_probe_cis instead of ncsi_dev_state_probe_channel because sometimes channel is not ready after it 3. inl -> intel ==================== Signed-off-by: David S. Miller commit 163f5de509a8ec193df94a9b9afbeb1a9e3f46a6 Author: Ivan Mikhaylov Date: Thu Jul 8 15:27:54 2021 +0300 net/ncsi: add dummy response handler for Intel boards Add the dummy response handler for Intel boards to prevent incorrect handling of OEM commands. Signed-off-by: Ivan Mikhaylov Signed-off-by: David S. Miller commit abd2fddc94a619b96bf41c60429d4c32bd118e17 Author: Ivan Mikhaylov Date: Thu Jul 8 15:27:53 2021 +0300 net/ncsi: add NCSI Intel OEM command to keep PHY up This allows to keep PHY link up and prevents any channel resets during the host load. It is KEEP_PHY_LINK_UP option(Veto bit) in i210 datasheet which block PHY reset and power state changes. Signed-off-by: Ivan Mikhaylov Signed-off-by: David S. Miller commit 27fa107d3b8d13a57cdd7c7a40bd6548d4b9cef8 Author: Ivan Mikhaylov Date: Thu Jul 8 15:27:52 2021 +0300 net/ncsi: fix restricted cast warning of sparse Sparse reports: net/ncsi/ncsi-rsp.c:406:24: warning: cast to restricted __be32 net/ncsi/ncsi-manage.c:732:33: warning: cast to restricted __be32 net/ncsi/ncsi-manage.c:756:25: warning: cast to restricted __be32 net/ncsi/ncsi-manage.c:779:25: warning: cast to restricted __be32 Signed-off-by: Ivan Mikhaylov Signed-off-by: David S. Miller commit 96248d6da65744e1baaa29e5c4e5dc233e29838b Author: Randy Dunlap Date: Thu Jul 8 10:33:10 2021 -0700 net: microchip: sparx5: fix kconfig warning PHY_SPARX5_SERDES depends on OF so SPARX5_SWITCH should also depend on OF since 'select' does not follow any dependencies. WARNING: unmet direct dependencies detected for PHY_SPARX5_SERDES Depends on [n]: (ARCH_SPARX5 || COMPILE_TEST [=n]) && OF [=n] && HAS_IOMEM [=y] Selected by [y]: - SPARX5_SWITCH [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROCHIP [=y] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y] Fixes: 3cfa11bac9bb ("net: sparx5: add the basic sparx5 driver") Signed-off-by: Randy Dunlap Cc: Lars Povlsen Cc: Steen Hegelund Cc: UNGLinuxDriver@microchip.com Cc: linux-arm-kernel@lists.infradead.org Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 015fe6fd29c4b9ac0f61b8c4455ef88e6018b9cc Author: Shahjada Abul Husain Date: Thu Jul 8 21:51:56 2021 +0530 cxgb4: fix IRQ free race during driver unload IRQs are requested during driver's ndo_open() and then later freed up in disable_interrupts() during driver unload. A race exists where driver can set the CXGB4_FULL_INIT_DONE flag in ndo_open() after the disable_interrupts() in driver unload path checks it, and hence misses calling free_irq(). Fix by unregistering netdevice first and sync with driver's ndo_open(). This ensures disable_interrupts() checks the flag correctly and frees up the IRQs properly. Fixes: b37987e8db5f ("cxgb4: Disable interrupts and napi before unregistering netdev") Signed-off-by: Shahjada Abul Husain Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller commit c34269041185dad1bab7a34f42ef9fab967a1684 Author: Aaron Ma Date: Thu Jul 8 21:17:10 2021 +0800 mt76: mt7921: continue to probe driver when fw already downloaded When reboot system, no power cycles, firmware is already downloaded, return -EIO will break driver as error: mt7921e: probe of 0000:03:00.0 failed with error -5 Skip firmware download and continue to probe. Signed-off-by: Aaron Ma Fixes: 1c099ab44727c ("mt76: mt7921: add MCU support") Signed-off-by: David S. Miller commit b9d233ea21f192702f8bbf3f5f640e2dde308b25 Author: Gatis Peisenieks Date: Thu Jul 8 12:49:04 2021 +0300 atl1c: fix Mikrotik 10/25G NIC detection Since Mikrotik 10/25G NIC MDIO op emulation is not 100% reliable, on rare occasions it can happen that some physical functions of the NIC do not get initialized due to timeouted early MDIO op. This changes the atl1c probe on Mikrotik 10/25G NIC not to depend on MDIO op emulation. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit 6a942f5780545ebd11aca8b3ac4b163397962322 Author: Valentin Schneider Date: Wed Jul 7 17:33:38 2021 +0100 s390: preempt: Fix preempt_count initialization S390's init_idle_preempt_count(p, cpu) doesn't actually let us initialize the preempt_count of the requested CPU's idle task: it unconditionally writes to the current CPU's. This clearly conflicts with idle_threads_init(), which intends to initialize *all* the idle tasks, including their preempt_count (or their CPU's, if the arch uses a per-CPU preempt_count). Unfortunately, it seems the way s390 does things doesn't let us initialize every possible CPU's preempt_count early on, as the pages where this resides are only allocated when a CPU is brought up and are freed when it is brought down. Let the arch-specific code set a CPU's preempt_count when its lowcore is allocated, and turn init_idle_preempt_count() into an empty stub. Fixes: f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled") Reported-by: Guenter Roeck Signed-off-by: Valentin Schneider Tested-by: Guenter Roeck Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/20210707163338.1623014-1-valentin.schneider@arm.com Signed-off-by: Vasily Gorbik commit 4ee471fe5a5a891ac4fcd45b5457fcb17de694de Author: Vasily Gorbik Date: Wed Jun 30 10:21:58 2021 +0200 s390/linkage: increase asm symbols alignment to 16 Both clang and gcc (for -march=z13 and later) align functions to 16 bytes at -O2 to benefit branch prediction. Make asm symbols alignment consistent with that. This also benefits potential ftrace code patching, which is currently able to patch 8 aligned bytes at once. With defconfig this currently increases .text size by 4104 bytes. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b55e692e6bcbec36b4e0ba683608e7e1e7aab8c7 Author: Heiko Carstens Date: Mon Jul 5 17:55:32 2021 +0200 s390: rename CALL_ON_STACK_NORETURN() to call_on_stack_noreturn() Lower case matches the call_on_stack() macro and is easier to read. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit a9b660849ffa70aaef868d0bc54e325919fe1281 Author: Heiko Carstens Date: Mon Jul 5 17:53:42 2021 +0200 s390: add type checking to CALL_ON_STACK_NORETURN() macro Make sure the to be called function takes no arguments (and returns void). Otherwise usage of CALL_ON_STACK_NORETURN() would generate broken code. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 60a4813c4794281084a0f3de544ccf209f29a957 Author: Heiko Carstens Date: Mon Jul 5 17:51:19 2021 +0200 s390: remove old CALL_ON_STACK() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b8f4c89fd719289cee5634e0b1e918ab081ece35 Author: Heiko Carstens Date: Mon Jul 5 20:56:40 2021 +0200 s390/softirq: use call_on_stack() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 58d4a785da45984ff7cf3046d5c3c35002c9d721 Author: Heiko Carstens Date: Mon Jul 5 20:38:42 2021 +0200 s390/lib: use call_on_stack() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 0f541cc20129b8529c33f8aa42734f8bdd006582 Author: Heiko Carstens Date: Mon Jul 5 20:38:36 2021 +0200 s390/smp: use call_on_stack() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 845370f47fa0833d1b39be189c8bfea29a78ecc0 Author: Heiko Carstens Date: Mon Jul 5 20:38:26 2021 +0200 s390/kexec: use call_on_stack() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit de556892dc96e33bba7cda6a398f4d367cead50e Author: Heiko Carstens Date: Mon Jul 5 20:38:14 2021 +0200 s390/irq: use call_on_stack() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7c496e66a20865b79ebd271b323b3c7e222bfa03 Author: Heiko Carstens Date: Mon Jul 5 20:16:18 2021 +0200 s390/mm: use call_on_stack() macro Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 41d71fe59cce41237f24f3b7bdc1b414069a34ed Author: Heiko Carstens Date: Mon Jul 5 20:16:10 2021 +0200 s390: introduce proper type handling call_on_stack() macro The existing CALL_ON_STACK() macro allows for subtle bugs: - There is no type checking of the function that is being called. That is: missing or too many arguments do not cause any compile error or warning. The same is true if the return type of the called function changes. This can lead to quite random bugs. - Sign and zero extension of arguments is missing. Given that the s390 C ABI requires that the caller of a function performs proper sign and zero extension this can also lead to subtle bugs. - If arguments to the CALL_ON_STACK() macros contain functions calls register corruption can happen due to register asm constructs being used. Therefore introduce a new call_on_stack() macro which is supposed to fix all these problems. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit bb250e64e4702774ddee052b57136ab222f59ce1 Author: Heiko Carstens Date: Mon Jul 5 20:57:49 2021 +0200 s390/irq: simplify on_async_stack() Make on_async_stack() a bit more readable, even though as usual it depends if one considers "!!!" readable or not. At least the new construct to check if the async stack is in use or not is a bit shorter and generates slightly better code. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 2ae6521504941650fd48bcefd288730c3e44211a Author: Heiko Carstens Date: Mon Jul 5 22:27:06 2021 +0200 s390/irq: inline do_softirq_own_stack() Move do_softirq_own_stack() to proper header file so it can be inlined; saving a few cycles. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 938e02beb3a0181ed1c7828e8939ffa32c350bea Author: Heiko Carstens Date: Mon Jul 5 22:26:26 2021 +0200 s390/irq: simplify do_softirq_own_stack() do_softirq_own_stack() is always called from task context and therefore it is not necessary to check if the async stack is currently used. Remove the check and directly switch to async stack. Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4516f355c55f6da231c494c6d2be7d863d02f13c Author: Harald Freudenberger Date: Mon Jul 5 18:22:56 2021 +0200 s390/ap: get rid of register asm in ap_dqap() This is the second part of the cleanup for the header file ap.h to remove the register asm statements. This patch deals with the inline ap_dqap() function where within the assembler code an odd register of an register pair is to be addressed. [hca@linux.ibm.com: this intentionally breaks compilation with any clang compilers prior to llvm-project commit 458eac257377 ("[SystemZ] Support the 'N' code for the odd register in inline-asm."). This is hopefully the last clang kernel compile breakage caused by incompatibilities between gcc and clang.] Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d26a357fe88e3875bcdf4a167d4182228c7e8964 Author: Sven Schnelle Date: Wed Jun 30 14:02:41 2021 +0200 s390: rename PIF_SYSCALL_RESTART to PIF_EXECVE_PGSTE_RESTART PIF_SYSCALL_RESTART is now only used to restart execve when loading PGSTE binaries. Rename the flag to reflect that, and avoid people thinking that this bit has anything to do with generic syscall restarting. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e3c7a8d7f44f4b36eb299563526ef8c5cb8011b0 Author: Sven Schnelle Date: Wed Jun 30 13:50:55 2021 +0200 s390: move restart of execve() syscall On s390, execve might have to be restarted for PGSTE binaries like kvm. In the past this was done via the PIF_SYSCALL_RESTART bit. However, with the recent changes, syscalls are now restarted differently. Now that execve() is the only call that might get restarted via PIF_SYSCALL_RESTART, move the loop to do_syscall(). This also has the advantage that the restart is no longer visible to userspace. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fbf50f47ea99d07aec59859027352d4837e84ce1 Author: Sven Schnelle Date: Fri Jun 25 15:06:06 2021 +0200 s390/signal: remove sigreturn on stack {rt_}sigreturn is now called from the vdso, so we no longer need the svc on the stack, and therefore no hack to support that mechanism on machines with non-executable stack. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit df29a7440c4b5c65765c8f60396b3b13063e24e9 Author: Sven Schnelle Date: Fri Jun 25 15:02:08 2021 +0200 s390/signal: switch to using vdso for sigreturn and syscall restart with generic entry, there's a bug when it comes to restarting of signals. The failing sequence is: a) a signal is coming in, and no handler is registered, so the lower part of arch_do_signal_or_restart() in arch/s390/kernel/signal.c sets PIF_SYSCALL_RESTART. b) a second signal gets pending while the kernel is still in the exit loop, and for that one, a handler exists. c) The first part of arch_do_signal_or_restart() is called. That part calls handle_signal(), which sets up stack + registers for handling the signal. d) __do_syscall() in arch/s390/kernel/syscall.c checks for PIF_SYSCALL_RESTART right before leaving to userspace. If it is set, it restart's the syscall. However, the registers are already setup for handling a signal from c). The syscall is now restarted with the wrong arguments. Change the code to: - use vdso for syscall_restart() instead of PIF_SYSCALL_RESTART because we cannot rewind and go back to userspace on s390 because the system call number might be encoded in the svc instruction. - for all other syscalls we rewind the PSW and return to userspace. Cc: # v5.12+ d57778feb987: s390/vdso: always enable vdso Cc: # v5.12+ 686341f2548b: s390/vdso64: add sigreturn,rt_sigreturn and restart_syscall Cc: # v5.12+ 43e1f76b0b69: s390/vdso: rename VDSO64_LBASE to VDSO_LBASE Cc: # v5.12+ 779df2248739: s390/vdso: add minimal compat vdso Cc: # v5.12+ Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 8f487ef2cbb2d4f6ca8c113d70da63baaf68c91a Author: Pavel Begunkov Date: Thu Jul 8 13:37:06 2021 +0100 io_uring: mitigate unlikely iopoll lag We have requests like IORING_OP_FILES_UPDATE that don't go through ->iopoll_list but get completed in place under ->uring_lock, and so after dropping the lock io_iopoll_check() should expect that some CQEs might have get completed in a meanwhile. Currently such events won't be accounted in @nr_events, and the loop will continue to poll even if there is enough of CQEs. It shouldn't be a problem as it's not likely to happen and so, but not nice either. Just return earlier in this case, it should be enough. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/66ef932cc66a34e3771bbae04b2953a8058e9d05.1625747741.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit debdd8e31895fdd1e2cfeb7a5aff1c83e49a91ba Author: Jonathan Lemon Date: Thu Jul 8 11:04:08 2021 -0700 ptp: Relocate lookup cookie to correct block. An earlier commit set the pps_lookup cookie, but the line was somehow added to the wrong code block. Correct this. Fixes: 8602e40fc813 ("ptp: Set lookup cookie when creating a PTP PPS source.") Signed-off-by: Jonathan Lemon Signed-off-by: Dario Binacchi Acked-by: Richard Cochran Signed-off-by: David S. Miller commit f55966571d5eb2876a11e48e798b4592fa1ffbb7 Merge: 8c1bfd746030a 21c355b09711e Author: Linus Torvalds Date: Thu Jul 8 12:28:15 2021 -0700 Merge tag 'drm-next-2021-07-08-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Some fixes for rc1 that came in the past weeks, mainly a bunch of amdgpu fixes, some i915 and the rest are misc around the place. I'm sending this a bit early so some more stuff may show up, but I'll probably take tomorrow off. dma-buf: - doc fixes amdgpu: - Misc Navi fixes - Powergating fix - Yellow Carp updates - Beige Goby updates - S0ix fix - Revert overlay validation fix - GPU reset fix for DC - PPC64 fix - Add new dimgrey cavefish DID - RAS fix - TTM fixes amdkfd: - SVM fixes radeon: - Fix missing drm_gem_object_put in error path - NULL ptr deref fix i915: - display DP VSC fix - DG1 display fix - IRQ fixes - IRQ demidlayering gma500: - bo leaks in error paths fixed" * tag 'drm-next-2021-07-08-1' of git://anongit.freedesktop.org/drm/drm: (52 commits) drm/i915: Drop all references to DRM IRQ midlayer drm/i915: Use the correct IRQ during resume drm/i915/display/dg1: Correctly map DPLLs during state readout drm/i915/display: Do not zero past infoframes.vsc drm/amdgpu: Conditionally reset SDMA RAS error counts drm/amdkfd: Maintain svm_bo reference in page->zone_device_data drm/amdkfd: add invalid pages debug at vram migration drm/amdkfd: skip migration for pages already in VRAM drm/amdkfd: skip invalid pages during migrations drm/amdkfd: classify and map mixed svm range pages in GPU drm/amdkfd: use hmm range fault to get both domain pfns drm/amdgpu: get owner ref in validate and map drm/amdkfd: set owner ref to svm range prefault drm/amdkfd: add owner ref param to get hmm pages drm/amdkfd: device pgmap owner at the svm migrate init drm/amdkfd: inc counter on child ranges with xnack off drm/amd/display: Extend DMUB diagnostic logging to DCN3.1 drm/amdgpu: Update NV SIMD-per-CU to 2 drm/amdgpu: add new dimgrey cavefish DID drm/amd/pm: skip PrepareMp1ForUnload message in s0ix ... commit c7bb4b89033b764eb07db4e060548a6311d801ee Author: Eric Dumazet Date: Thu Jul 8 00:21:09 2021 -0700 ipv6: tcp: drop silly ICMPv6 packet too big messages While TCP stack scales reasonably well, there is still one part that can be used to DDOS it. IPv6 Packet too big messages have to lookup/insert a new route, and if abused by attackers, can easily put hosts under high stress, with many cpus contending on a spinlock while one is stuck in fib6_run_gc() ip6_protocol_deliver_rcu() icmpv6_rcv() icmpv6_notify() tcp_v6_err() tcp_v6_mtu_reduced() inet6_csk_update_pmtu() ip6_rt_update_pmtu() __ip6_rt_update_pmtu() ip6_rt_cache_alloc() ip6_dst_alloc() dst_alloc() ip6_dst_gc() fib6_run_gc() spin_lock_bh() ... Some of our servers have been hit by malicious ICMPv6 packets trying to _increase_ the MTU/MSS of TCP flows. We believe these ICMPv6 packets are a result of a bug in one ISP stack, since they were blindly sent back for _every_ (small) packet sent to them. These packets are for one TCP flow: 09:24:36.266491 IP6 Addr1 > Victim ICMP6, packet too big, mtu 1460, length 1240 09:24:36.266509 IP6 Addr1 > Victim ICMP6, packet too big, mtu 1460, length 1240 09:24:36.316688 IP6 Addr1 > Victim ICMP6, packet too big, mtu 1460, length 1240 09:24:36.316704 IP6 Addr1 > Victim ICMP6, packet too big, mtu 1460, length 1240 09:24:36.608151 IP6 Addr1 > Victim ICMP6, packet too big, mtu 1460, length 1240 TCP stack can filter some silly requests : 1) MTU below IPV6_MIN_MTU can be filtered early in tcp_v6_err() 2) tcp_v6_mtu_reduced() can drop requests trying to increase current MSS. This tests happen before the IPv6 routing stack is entered, thus removing the potential contention and route exhaustion. Note that IPv6 stack was performing these checks, but too late (ie : after the route has been added, and after the potential garbage collect war) v2: fix typo caught by Martin, thanks ! v3: exports tcp_mtu_to_mss(), caught by David, thanks ! Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: Maciej Żenczykowski Cc: Martin KaFai Lau Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller commit 8c1bfd746030a14435c9b60d08a81af61332089b Merge: b0dfd9af28b60 bebedf2bb4a9e Author: Linus Torvalds Date: Thu Jul 8 12:18:04 2021 -0700 Merge tag 'pwm/for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This contains mostly various fixes, cleanups and some conversions to the atomic API. One noteworthy change is that PWM consumers can now pass a hint to the PWM core about the PWM usage, enabling PWM providers to implement various optimizations. There's also a fair bit of simplification here with the addition of some device-managed helpers as well as unification between the DT and ACPI firmware interfaces" * tag 'pwm/for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (50 commits) pwm: Remove redundant assignment to pointer pwm pwm: ep93xx: Fix read of uninitialized variable ret pwm: ep93xx: Prepare clock before using it pwm: ep93xx: Unfold legacy callbacks into ep93xx_pwm_apply() pwm: ep93xx: Implement .apply callback pwm: vt8500: Only unprepare the clock after the pwmchip was removed pwm: vt8500: Drop if with an always false condition pwm: tegra: Assert reset only after the PWM was unregistered pwm: tegra: Don't needlessly enable and disable the clock in .remove() pwm: tegra: Don't modify HW state in .remove callback pwm: tegra: Drop an if block with an always false condition pwm: core: Simplify some devm_*pwm*() functions pwm: core: Remove unused devm_pwm_put() pwm: core: Unify fwnode checks in the module pwm: core: Reuse fwnode_to_pwmchip() in ACPI case pwm: core: Convert to use fwnode for matching docs: firmware-guide: ACPI: Add a PWM example dt-bindings: pwm: pwm-tiecap: Add compatible string for AM64 SoC dt-bindings: pwm: pwm-tiecap: Convert to json schema pwm: sprd: Don't check the return code of pwmchip_remove() ... commit b0dfd9af28b60d7ec42c359ae84c1ba97e093100 Merge: 316a2c9b6a5f6 783d08bd02f5d Author: Linus Torvalds Date: Thu Jul 8 12:12:22 2021 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull more clk updates from Stephen Boyd: - A handful of fixes for lmk04832 driver - Migrate the basic clk divider to use determine rate ops - Fix modpost build for hisilicon hi3559a driver - Actually set the parent in k210_clk_set_parent() * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: Revert "clk: divider: Switch from .round_rate to .determine_rate by default" clk: hisilicon: hi3559a: Drop __init markings everywhere clk: meson: regmap: switch to determine_rate for the dividers clk: divider: Switch from .round_rate to .determine_rate by default clk: divider: Add re-usable determine_rate implementations clk: k210: Fix k210_clk_set_parent() clk: lmk04832: Fix spelling mistakes in dev_err messages and comments clk: lmk04832: fix return value check in lmk04832_probe() clk: stm32mp1: fix missing spin_lock_init() commit 316a2c9b6a5f6f056441275f748e077027179f36 Merge: f3791f4df569e d58b206110595 Author: Linus Torvalds Date: Thu Jul 8 12:06:20 2021 -0700 Merge tag 'pci-v5.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Fix dsm_label_utf16s_to_utf8s() buffer overrun (Krzysztof Wilczyński) - Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s() (Krzysztof Wilczyński) - Use sysfs_emit() and sysfs_emit_at() in "show" functions (Krzysztof Wilczyński) - Fix 'resource_alignment' newline issues (Krzysztof Wilczyński) - Add 'devspec' newline (Krzysztof Wilczyński) - Dynamically map ECAM regions (Russell King) Resource management: - Coalesce host bridge contiguous apertures (Kai-Heng Feng) PCIe native device hotplug: - Ignore Link Down/Up caused by DPC (Lukas Wunner) Power management: - Leave Apple Thunderbolt controllers on for s2idle or standby (Konstantin Kharlamov) Virtualization: - Work around Huawei Intelligent NIC VF FLR erratum (Chiqijun) - Clarify error message for unbound IOV devices (Moritz Fischer) - Add pci_reset_bus_function() Secondary Bus Reset interface (Raphael Norwitz) Peer-to-peer DMA: - Simplify distance calculation (Christoph Hellwig) - Finish RCU conversion of pdev->p2pdma (Eric Dumazet) - Rename upstream_bridge_distance() and rework doc (Logan Gunthorpe) - Collect acs list in stack buffer to avoid sleeping (Logan Gunthorpe) - Use correct calc_map_type_and_dist() return type (Logan Gunthorpe) - Warn if host bridge not in whitelist (Logan Gunthorpe) - Refactor pci_p2pdma_map_type() (Logan Gunthorpe) - Avoid pci_get_slot(), which may sleep (Logan Gunthorpe) Altera PCIe controller driver: - Add Joyce Ooi as Altera PCIe maintainer (Joyce Ooi) Broadcom iProc PCIe controller driver: - Fix multi-MSI base vector number allocation (Sandor Bodo-Merle) - Support multi-MSI only on uniprocessor kernel (Sandor Bodo-Merle) Freescale i.MX6 PCIe controller driver: - Limit DBI register length for imx6qp PCIe (Richard Zhu) - Add "vph-supply" for PHY supply voltage (Richard Zhu) - Enable PHY internal regulator when supplied >3V (Richard Zhu) - Remove imx6_pcie_probe() redundant error message (Zhen Lei) Intel Gateway PCIe controller driver: - Fix INTx enable (Martin Blumenstingl) Marvell Aardvark PCIe controller driver: - Fix checking for PIO Non-posted Request (Pali Rohár) - Implement workaround for the readback value of VEND_ID (Pali Rohár) MediaTek PCIe controller driver: - Remove redundant error printing in mtk_pcie_subsys_powerup() (Zhen Lei) MediaTek PCIe Gen3 controller driver: - Add missing MODULE_DEVICE_TABLE (Zou Wei) Microchip PolarFlare PCIe controller driver: - Make struct event_descs static (Krzysztof Wilczyński) Microsoft Hyper-V host bridge driver: - Fix race condition when removing the device (Long Li) - Remove bus device removal unused refcount/functions (Long Li) Mobiveil PCIe controller driver: - Remove unused readl and writel functions (Krzysztof Wilczyński) NVIDIA Tegra PCIe controller driver: - Add missing MODULE_DEVICE_TABLE (Zou Wei) NVIDIA Tegra194 PCIe controller driver: - Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift (Jon Hunter) - Fix host initialization during resume (Vidya Sagar) Rockchip PCIe controller driver: - Register IRQ handlers after device and data are ready (Javier Martinez Canillas)" * tag 'pci-v5.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (48 commits) PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma PCI: xgene: Annotate __iomem pointer PCI: Fix kernel-doc formatting PCI: cpcihp: Declare cpci_debug in header file MAINTAINERS: Add Joyce Ooi as Altera PCIe maintainer PCI: rockchip: Register IRQ handlers after device and data are ready PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift PCI: aardvark: Implement workaround for the readback value of VEND_ID PCI: aardvark: Fix checking for PIO Non-posted Request PCI: tegra194: Fix host initialization during resume PCI: tegra: Add missing MODULE_DEVICE_TABLE PCI: imx6: Enable PHY internal regulator when supplied >3V dt-bindings: imx6q-pcie: Add "vph-supply" for PHY supply voltage PCI: imx6: Limit DBI register length for imx6qp PCIe PCI: imx6: Remove imx6_pcie_probe() redundant error message PCI: intel-gw: Fix INTx enable PCI: iproc: Support multi-MSI only on uniprocessor kernel PCI: iproc: Fix multi-MSI base vector number allocation PCI: mediatek-gen3: Add missing MODULE_DEVICE_TABLE PCI: Dynamically map ECAM regions ... commit 27932b6a2088eac7a5afa5471963b926cfbb4de7 Author: Masahiro Yamada Date: Tue Jul 6 15:15:29 2021 +0900 scripts: add generic syscallnr.sh Like syscallhdr.sh and syscalltbl.sh, add a simple script to generate the __NR_syscalls, which should not be exported to userspace. This script is useful to replace arch/mips/kernel/syscalls/syscallnr.sh, refactor arch/s390/kernel/syscalls/syscalltbl, and eliminate the code surrounded by #ifdef __KERNEL__ / #endif from exported uapi/asm/unistd_*.h files. Signed-off-by: Masahiro Yamada commit c6a3a81d19b834e3aed819027f022c5938fca2ec Author: Masahiro Yamada Date: Mon Jul 5 15:06:54 2021 +0900 scripts: check duplicated syscall number in syscall table Currently, syscall{hdr,tbl}.sh sorts the entire syscall table, but you can assume it is already sorted by the syscall number. The generated syscall table does not work if the same syscall number appears twice. Check it in the script. Signed-off-by: Masahiro Yamada commit feac00aad12373b994ff4d340ff818792e833a0a Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:24 2021 -0700 powerpc/mm: enable HAVE_MOVE_PMD support mremap HAVE_MOVE_PMD/PUD optimization time comparison for 1GB region: 1GB mremap - Source PTE-aligned, Destination PTE-aligned mremap time: 2292772ns 1GB mremap - Source PMD-aligned, Destination PMD-aligned mremap time: 1158928ns 1GB mremap - Source PUD-aligned, Destination PUD-aligned mremap time: 63886ns Link: https://lkml.kernel.org/r/20210616045735.374532-4-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cec6515abbda4bea11ffa2cd700ce062bc07a6d7 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:21 2021 -0700 powerpc/book3s64/mm: update flush_tlb_range to flush page walk cache flush_tlb_range is special in that we don't specify the page size used for the translation. Hence when flushing TLB we flush the translation cache for all possible page sizes. The kernel also uses the same interface when moving page tables around. Such a move requires us to flush the page walk cache. Instead of adding another interface to force page walk cache flush, update flush_tlb_range to flush page walk cache if the range flushed is more than the PMD range. A page table move will always involve an invalidate range more than PMD_SIZE. Running microbenchmark with mprotect and parallel memory access didn't show any observable performance impact. Link: https://lkml.kernel.org/r/20210616045735.374532-3-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3bbda69c48d27474a9e6a90cf4680b295a7efa46 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:18 2021 -0700 mm/mremap: allow arch runtime override Patch series "Speedup mremap on ppc64", v8. This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires the platform to support updating higher-level page tables without updating page table entries. This also needs to invalidate the Page Walk Cache on architecture supporting the same. This patch (of 3): Architectures like ppc64 support faster mremap only with radix translation. Hence allow a runtime check w.r.t support for fast mremap. Link: https://lkml.kernel.org/r/20210616045735.374532-1-aneesh.kumar@linux.ibm.com Link: https://lkml.kernel.org/r/20210616045735.374532-2-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Cc: Kalesh Singh Cc: Nicholas Piggin Cc: Joel Fernandes Cc: Christophe Leroy Cc: Kirill A. Shutemov Cc: "Aneesh Kumar K . V" Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97113eb39fa7972722ff490b947d8af023e1f6a2 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:15 2021 -0700 mm/mremap: hold the rmap lock in write mode when moving page table entries. To avoid a race between rmap walk and mremap, mremap does take_rmap_locks(). The lock was taken to ensure that rmap walk don't miss a page table entry due to PTE moves via move_pagetables(). The kernel does further optimization of this lock such that if we are going to find the newly added vma after the old vma, the rmap lock is not taken. This is because rmap walk would find the vmas in the same order and if we don't find the page table attached to older vma we would find it with the new vma which we would iterate later. As explained in commit eb66ae030829 ("mremap: properly flush TLB before releasing the page") mremap is special in that it doesn't take ownership of the page. The optimized version for PUD/PMD aligned mremap also doesn't hold the ptl lock. This can result in stale TLB entries as show below. This patch updates the rmap locking requirement in mremap to handle the race condition explained below with optimized mremap:: Optmized PMD move CPU 1 CPU 2 CPU 3 mremap(old_addr, new_addr) page_shrinker/try_to_unmap_one mmap_write_lock_killable() addr = old_addr lock(pte_ptl) lock(pmd_ptl) pmd = *old_pmd pmd_clear(old_pmd) flush_tlb_range(old_addr) *new_pmd = pmd *new_addr = 10; and fills TLB with new addr and old pfn unlock(pmd_ptl) ptep_clear_flush() old pfn is free. Stale TLB entry Optimized PUD move also suffers from a similar race. Both the above race condition can be fixed if we force mremap path to take rmap lock. Link: https://lkml.kernel.org/r/20210616045239.370802-7-aneesh.kumar@linux.ibm.com Fixes: 2c91bd4a4e2e ("mm: speed up mremap by 20x on large regions") Fixes: c49dd3401802 ("mm: speedup mremap on 1GB or larger regions") Link: https://lore.kernel.org/linux-mm/CAHk-=wgXVR04eBNtxQfevontWnP6FDm+oj5vauQXP3S-huwbPw@mail.gmail.com Signed-off-by: Aneesh Kumar K.V Acked-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Christophe Leroy Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0881ace292b662d280f47308e93a2894ee7f98fb Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:12 2021 -0700 mm/mremap: use pmd/pud_poplulate to update page table entries pmd/pud_populate is the right interface to be used to set the respective page table entries. Some architectures like ppc64 do assume that set_pmd/pud_at can only be used to set a hugepage PTE. Since we are not setting up a hugepage PTE here, use the pmd/pud_populate interface. Link: https://lkml.kernel.org/r/20210616045239.370802-6-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d6655dff2e254a2ee1ca62cf88bed5620a0b47e1 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:09 2021 -0700 mm/mremap: don't enable optimized PUD move if page table levels is 2 With two level page table don't enable move_normal_pud. Link: https://lkml.kernel.org/r/20210616045239.370802-5-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d846db7d0e23139d1894e198fcd74dc7d5871ba Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:06 2021 -0700 mm/mremap: convert huge PUD move to separate helper With TRANSPARENT_HUGEPAGE_PUD enabled the kernel can find huge PUD entries. Add a helper to move huge PUD entries on mremap(). This will be used by a later patch to optimize mremap of PUD_SIZE aligned level 4 PTE mapped address This also make sure we support mremap on huge PUD entries even with CONFIG_HAVE_MOVE_PUD disabled. [aneesh.kumar@linux.ibm.com: fix build failure with clang-10] Link: https://lore.kernel.org/lkml/YMuOSnJsL9qkxweY@archlinux-ax161 Link: https://lkml.kernel.org/r/20210619134310.89098-1-aneesh.kumar@linux.ibm.com Link: https://lkml.kernel.org/r/20210616045239.370802-4-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9cc9c3456551bf78acdd330713cf513816bbdd2 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:10:03 2021 -0700 selftest/mremap_test: avoid crash with static build With a large mmap map size, we can overlap with the text area and using MAP_FIXED results in unmapping that area. Switch to MAP_FIXED_NOREPLACE and handle the EEXIST error. Link: https://lkml.kernel.org/r/20210616045239.370802-3-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Kalesh Singh Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f27a5c93cdd4dbcd2131099764aa188c7e2a2a88 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:09:59 2021 -0700 selftest/mremap_test: update the test to handle pagesize other than 4K Patch series "mrermap fixes", v2. This patch (of 6): Instead of hardcoding 4K page size fetch it using sysconf(). For the performance measurements test still assume 2M and 1G are hugepage sizes. Link: https://lkml.kernel.org/r/20210616045239.370802-1-aneesh.kumar@linux.ibm.com Link: https://lkml.kernel.org/r/20210616045239.370802-2-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Kalesh Singh Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Joel Fernandes Cc: Christophe Leroy Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc4875f0e791de554bdc45aa1dbd6e45e107e50f Author: Aneesh Kumar K.V Date: Wed Jul 7 18:09:56 2021 -0700 mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t * No functional change in this patch. [aneesh.kumar@linux.ibm.com: m68k build error reported by kernel robot] Link: https://lkml.kernel.org/r/87tulxnb2v.fsf@linux.ibm.com Link: https://lkml.kernel.org/r/20210615110859.320299-2-aneesh.kumar@linux.ibm.com Link: https://lore.kernel.org/linuxppc-dev/CAHk-=wi+J+iodze9FtjM3Zi4j4OeS+qqbKxME9QN4roxPEXH9Q@mail.gmail.com/ Signed-off-by: Aneesh Kumar K.V Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9cf6fa2458443118b84090aa1bf7a3630b5940e8 Author: Aneesh Kumar K.V Date: Wed Jul 7 18:09:53 2021 -0700 mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * No functional change in this patch. [aneesh.kumar@linux.ibm.com: fix] Link: https://lkml.kernel.org/r/87wnqtnb60.fsf@linux.ibm.com [sfr@canb.auug.org.au: another fix] Link: https://lkml.kernel.org/r/20210619134410.89559-1-aneesh.kumar@linux.ibm.com Link: https://lkml.kernel.org/r/20210615110859.320299-1-aneesh.kumar@linux.ibm.com Link: https://lore.kernel.org/linuxppc-dev/CAHk-=wi+J+iodze9FtjM3Zi4j4OeS+qqbKxME9QN4roxPEXH9Q@mail.gmail.com/ Signed-off-by: Aneesh Kumar K.V Signed-off-by: Stephen Rothwell Cc: Christophe Leroy Cc: Hugh Dickins Cc: Joel Fernandes Cc: Kalesh Singh Cc: Kirill A. Shutemov Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44e8a5e9120bf4fc1ab046b648b0598e6652c36e Author: Stephen Boyd Date: Wed Jul 7 18:09:49 2021 -0700 kdump: use vmlinux_build_id to simplify We can use the vmlinux_build_id array here now instead of open coding it. This mostly consolidates code. Link: https://lkml.kernel.org/r/20210511003845.2429846-14-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f14d029f98f0d4f369d64458084cf31e66f820f Author: Stephen Boyd Date: Wed Jul 7 18:09:46 2021 -0700 buildid: fix kernel-doc notation Kernel doc should use "Return:" instead of "Returns" to properly reflect the return values. Link: https://lkml.kernel.org/r/20210511003845.2429846-13-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 60eec32637161ca4455dfab6080215abe6b86a2a Author: Stephen Boyd Date: Wed Jul 7 18:09:42 2021 -0700 buildid: mark some arguments const These arguments are never modified so they can be marked const to indicate as such. Link: https://lkml.kernel.org/r/20210511003845.2429846-12-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5ce757d8f1bdf9def7d2f71862b48ed83d5ed12 Author: Stephen Boyd Date: Wed Jul 7 18:09:38 2021 -0700 scripts/decode_stacktrace.sh: indicate 'auto' can be used for base path Add "auto" to the usage message so that it's a little clearer that you can pass "auto" as the second argument. When passing "auto" the script tries to find the base path automatically instead of requiring it be passed on the commandline. Also use [] to indicate the variable argument and that it is optional so that we can differentiate from the literal "auto" that should be passed. Link: https://lkml.kernel.org/r/20210511003845.2429846-11-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Konstantin Khlebnikov Cc: Sasha Levin Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5bf0f3bc377e5f87bfd61ccc9c1efb3c6261f2c3 Author: Stephen Boyd Date: Wed Jul 7 18:09:35 2021 -0700 scripts/decode_stacktrace.sh: silence stderr messages from addr2line/nm Sometimes if you're using tools that have linked things improperly or have new features/sections that older tools don't expect you'll see warnings printed to stderr. We don't really care about these warnings, so let's just silence these messages to cleanup output of this script. Link: https://lkml.kernel.org/r/20210511003845.2429846-10-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Konstantin Khlebnikov Cc: Sasha Levin Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26681eb3724b617c4894cfb53cad2e3740323bc2 Author: Stephen Boyd Date: Wed Jul 7 18:09:31 2021 -0700 scripts/decode_stacktrace.sh: support debuginfod Now that stacktraces contain the build ID information we can update this script to use debuginfod-find to locate the debuginfo for the vmlinux and modules automatically. This can replace the existing code that requires specifying a path to vmlinux or tries to find the vmlinux and modules automatically by using the release number. Work it into the script as a fallback option if the vmlinux isn't specified on the commandline. Link: https://lkml.kernel.org/r/20210511003845.2429846-9-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Konstantin Khlebnikov Cc: Sasha Levin Cc: Petr Mladek Cc: Steven Rostedt Cc: Andy Shevchenko Cc: Matthew Wilcox Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Rasmus Villemoes Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ef8af2a8f25b16eec6d2865ca7d9116a24ad46a Author: Stephen Boyd Date: Wed Jul 7 18:09:27 2021 -0700 x86/dumpstack: use %pSb/%pBb for backtrace printing Let's use the new printk formats to print the stacktrace entries when printing a backtrace to the kernel logs. This will include any module's build ID[1] in it so that offline/crash debugging can easily locate the debuginfo for a module via something like debuginfod[2]. Link: https://lkml.kernel.org/r/20210511003845.2429846-8-swboyd@chromium.org Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1] Link: https://sourceware.org/elfutils/Debuginfod.html [2] Signed-off-by: Stephen Boyd Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Petr Mladek Cc: Steven Rostedt Cc: Andy Shevchenko Cc: Matthew Wilcox Cc: Baoquan He Cc: Catalin Marinas Cc: Dave Young Cc: Konstantin Khlebnikov Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f61b8706075a1d04ed27cec369e35cf128c728c3 Author: Stephen Boyd Date: Wed Jul 7 18:09:24 2021 -0700 arm64: stacktrace: use %pSb for backtrace printing Let's use the new printk format to print the stacktrace entry when printing a backtrace to the kernel logs. This will include any module's build ID[1] in it so that offline/crash debugging can easily locate the debuginfo for a module via something like debuginfod[2]. Link: https://lkml.kernel.org/r/20210511003845.2429846-7-swboyd@chromium.org Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1] Link: https://sourceware.org/elfutils/Debuginfod.html [2] Signed-off-by: Stephen Boyd Acked-by: Catalin Marinas Cc: Will Deacon Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Petr Mladek Cc: Steven Rostedt Cc: Andy Shevchenko Cc: Matthew Wilcox Cc: Baoquan He Cc: Borislav Petkov Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9294523e3768030ae8afb84110bcecc66425a647 Author: Stephen Boyd Date: Wed Jul 7 18:09:20 2021 -0700 module: add printk formats to add module build ID to stacktraces Let's make kernel stacktraces easier to identify by including the build ID[1] of a module if the stacktrace is printing a symbol from a module. This makes it simpler for developers to locate a kernel module's full debuginfo for a particular stacktrace. Combined with scripts/decode_stracktrace.sh, a developer can download the matching debuginfo from a debuginfod[2] server and find the exact file and line number for the functions plus offsets in a stacktrace that match the module. This is especially useful for pstore crash debugging where the kernel crashes are recorded in something like console-ramoops and the recovery kernel/modules are different or the debuginfo doesn't exist on the device due to space concerns (the debuginfo can be too large for space limited devices). Originally, I put this on the %pS format, but that was quickly rejected given that %pS is used in other places such as ftrace where build IDs aren't meaningful. There was some discussions on the list to put every module build ID into the "Modules linked in:" section of the stacktrace message but that quickly becomes very hard to read once you have more than three or four modules linked in. It also provides too much information when we don't expect each module to be traversed in a stacktrace. Having the build ID for modules that aren't important just makes things messy. Splitting it to multiple lines for each module quickly explodes the number of lines printed in an oops too, possibly wrapping the warning off the console. And finally, trying to stash away each module used in a callstack to provide the ID of each symbol printed is cumbersome and would require changes to each architecture to stash away modules and return their build IDs once unwinding has completed. Instead, we opt for the simpler approach of introducing new printk formats '%pS[R]b' for "pointer symbolic backtrace with module build ID" and '%pBb' for "pointer backtrace with module build ID" and then updating the few places in the architecture layer where the stacktrace is printed to use this new format. Before: Call trace: lkdtm_WARNING+0x28/0x30 [lkdtm] direct_entry+0x16c/0x1b4 [lkdtm] full_proxy_write+0x74/0xa4 vfs_write+0xec/0x2e8 After: Call trace: lkdtm_WARNING+0x28/0x30 [lkdtm 6c2215028606bda50de823490723dc4bc5bf46f9] direct_entry+0x16c/0x1b4 [lkdtm 6c2215028606bda50de823490723dc4bc5bf46f9] full_proxy_write+0x74/0xa4 vfs_write+0xec/0x2e8 [akpm@linux-foundation.org: fix build with CONFIG_MODULES=n, tweak code layout] [rdunlap@infradead.org: fix build when CONFIG_MODULES is not set] Link: https://lkml.kernel.org/r/20210513171510.20328-1-rdunlap@infradead.org [akpm@linux-foundation.org: make kallsyms_lookup_buildid() static] [cuibixuan@huawei.com: fix build error when CONFIG_SYSFS is disabled] Link: https://lkml.kernel.org/r/20210525105049.34804-1-cuibixuan@huawei.com Link: https://lkml.kernel.org/r/20210511003845.2429846-6-swboyd@chromium.org Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1] Link: https://sourceware.org/elfutils/Debuginfod.html [2] Signed-off-by: Stephen Boyd Signed-off-by: Bixuan Cui Signed-off-by: Randy Dunlap Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Petr Mladek Cc: Steven Rostedt Cc: Sergey Senozhatsky Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: Matthew Wilcox Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Sasha Levin Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22f4e66df79d0a730fcd6c17f3403b5ab8c72ced Author: Stephen Boyd Date: Wed Jul 7 18:09:17 2021 -0700 dump_stack: add vmlinux build ID to stack traces Add the running kernel's build ID[1] to the stacktrace information header. This makes it simpler for developers to locate the vmlinux with full debuginfo for a particular kernel stacktrace. Combined with scripts/decode_stracktrace.sh, a developer can download the correct vmlinux from a debuginfod[2] server and find the exact file and line number for the functions plus offsets in a stacktrace. This is especially useful for pstore crash debugging where the kernel crashes are recorded in the pstore logs and the recovery kernel is different or the debuginfo doesn't exist on the device due to space concerns (the data can be large and a security concern). The stacktrace can be analyzed after the crash by using the build ID to find the matching vmlinux and understand where in the function something went wrong. Example stacktrace from lkdtm: WARNING: CPU: 4 PID: 3255 at drivers/misc/lkdtm/bugs.c:83 lkdtm_WARNING+0x28/0x30 [lkdtm] Modules linked in: lkdtm rfcomm algif_hash algif_skcipher af_alg xt_cgroup uinput xt_MASQUERADE CPU: 4 PID: 3255 Comm: bash Not tainted 5.11 #3 aa23f7a1231c229de205662d5a9e0d4c580f19a1 Hardware name: Google Lazor (rev3+) with KB Backlight (DT) pstate: 00400009 (nzcv daif +PAN -UAO -TCO BTYPE=--) pc : lkdtm_WARNING+0x28/0x30 [lkdtm] The hex string aa23f7a1231c229de205662d5a9e0d4c580f19a1 is the build ID, following the kernel version number. Put it all behind a config option, STACKTRACE_BUILD_ID, so that kernel developers can remove this information if they decide it is too much. Link: https://lkml.kernel.org/r/20210511003845.2429846-5-swboyd@chromium.org Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1] Link: https://sourceware.org/elfutils/Debuginfod.html [2] Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Petr Mladek Cc: Steven Rostedt Cc: Andy Shevchenko Cc: Matthew Wilcox Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83cc6fa0049d7c5333a53f4d959a9457340284ea Author: Stephen Boyd Date: Wed Jul 7 18:09:13 2021 -0700 buildid: stash away kernels build ID on init Parse the kernel's build ID at initialization so that other code can print a hex format string representation of the running kernel's build ID. This will be used in the kdump and dump_stack code so that developers can easily locate the vmlinux debug symbols for a crash/stacktrace. [swboyd@chromium.org: fix implicit declaration of init_vmlinux_build_id()] Link: https://lkml.kernel.org/r/CAE-0n51UjTbay8N9FXAyE7_aR2+ePrQnKSRJ0gbmRsXtcLBVaw@mail.gmail.com Link: https://lkml.kernel.org/r/20210511003845.2429846-4-swboyd@chromium.org Signed-off-by: Stephen Boyd Acked-by: Baoquan He Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Dave Young Cc: Vivek Goyal Cc: Andy Shevchenko Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7eaf3cf3b7c5a49b3ca60e1ceb3d1d7430cc9d0e Author: Stephen Boyd Date: Wed Jul 7 18:09:10 2021 -0700 buildid: add API to parse build ID out of buffer Add an API that can parse the build ID out of a buffer, instead of a vma, to support printing a kernel module's build ID for stack traces. Link: https://lkml.kernel.org/r/20210511003845.2429846-3-swboyd@chromium.org Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Petr Mladek Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a010d79b6683b6b1e66be2ea7204944f1323661c Author: Stephen Boyd Date: Wed Jul 7 18:09:06 2021 -0700 buildid: only consider GNU notes for build ID parsing Patch series "Add build ID to stacktraces", v6. This series adds the kernel's build ID[1] to the stacktrace header printed in oops messages, warnings, etc. and the build ID for any module that appears in the stacktrace after the module name. The goal is to make the stacktrace more self-contained and descriptive by including the relevant build IDs in the kernel logs when something goes wrong. This can be used by post processing tools like script/decode_stacktrace.sh and kernel developers to easily locate the debug info associated with a kernel crash and line up what line and file things started falling apart at. To show how this can be used I've included a patch to decode_stacktrace.sh that downloads the debuginfo from a debuginfod server. This also includes some patches to make the buildid.c file use more const arguments and consolidate logic into buildid.c from kdump. These are left to the end as they were mostly cleanup patches. Here's an example lkdtm stacktrace on arm64. WARNING: CPU: 4 PID: 3255 at drivers/misc/lkdtm/bugs.c:83 lkdtm_WARNING+0x28/0x30 [lkdtm] Modules linked in: lkdtm rfcomm algif_hash algif_skcipher af_alg xt_cgroup uinput xt_MASQUERADE CPU: 4 PID: 3255 Comm: bash Not tainted 5.11 #3 aa23f7a1231c229de205662d5a9e0d4c580f19a1 Hardware name: Google Lazor (rev3+) with KB Backlight (DT) pstate: 00400009 (nzcv daif +PAN -UAO -TCO BTYPE=--) pc : lkdtm_WARNING+0x28/0x30 [lkdtm] lr : lkdtm_do_action+0x24/0x40 [lkdtm] sp : ffffffc0134fbca0 x29: ffffffc0134fbca0 x28: ffffff92d53ba240 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: ffffffe3622352c0 x23: 0000000000000020 x22: ffffffe362233366 x21: ffffffe3622352e0 x20: ffffffc0134fbde0 x19: 0000000000000008 x18: 0000000000000000 x17: ffffff929b6536fc x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000012 x13: ffffffe380ed892c x12: ffffffe381d05068 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000001 x8 : ffffffe362237000 x7 : aaaaaaaaaaaaaaaa x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000008 x2 : ffffff93fef25a70 x1 : ffffff93fef15788 x0 : ffffffe3622352e0 Call trace: lkdtm_WARNING+0x28/0x30 [lkdtm ed5019fdf5e53be37cb1ba7899292d7e143b259e] direct_entry+0x16c/0x1b4 [lkdtm ed5019fdf5e53be37cb1ba7899292d7e143b259e] full_proxy_write+0x74/0xa4 vfs_write+0xec/0x2e8 ksys_write+0x84/0xf0 __arm64_sys_write+0x24/0x30 el0_svc_common+0xf4/0x1c0 do_el0_svc_compat+0x28/0x3c el0_svc_compat+0x10/0x1c el0_sync_compat_handler+0xa8/0xcc el0_sync_compat+0x178/0x180 ---[ end trace 3d95032303e59e68 ]--- This patch (of 13): Some kernel elf files have various notes that also happen to have an elf note type of '3', which matches NT_GNU_BUILD_ID but the note name isn't "GNU". For example, this note trips up the existing logic: Owner Data size Description Xen 0x00000008 Unknown note type: (0x00000003) description data: 00 00 00 ffffff80 ffffffff ffffffff ffffffff ffffffff Let's make sure that it is a GNU note when parsing the build ID so that we can use this function to parse a vmlinux's build ID too. Link: https://lkml.kernel.org/r/20210511003845.2429846-1-swboyd@chromium.org Link: https://lkml.kernel.org/r/20210511003845.2429846-2-swboyd@chromium.org Fixes: bd7525dacd7e ("bpf: Move stack_map_get_build_id into lib") Signed-off-by: Stephen Boyd Reported-by: Petr Mladek Tested-by: Petr Mladek Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Andy Shevchenko Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Rasmus Villemoes Cc: Sasha Levin Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30120d72a41e0e29c859bd8d41a2dd4d4aa29d4d Author: Kefeng Wang Date: Wed Jul 7 18:09:03 2021 -0700 x86: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-16-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7cce365988e771c179c0b2a4e8e4763fdd233fd Author: Kefeng Wang Date: Wed Jul 7 18:09:00 2021 -0700 sh: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-15-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 638cd5a3062e4d022ed4b1cfdbf8f890d118c95a Author: Kefeng Wang Date: Wed Jul 7 18:08:57 2021 -0700 s390: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-14-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 723a42f4f6b2e032910885d389c6d9bdb0ef6eeb Author: Kefeng Wang Date: Wed Jul 7 18:08:54 2021 -0700 riscv: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-13-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Palmer Dabbelt Cc: Paul Walmsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6cd7547b360f1a936fd5fc34ef86dc345e242d06 Author: Kefeng Wang Date: Wed Jul 7 18:08:51 2021 -0700 powerpc: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-12-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Souptick Joarder Cc: Christophe Leroy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20f2eccfaade9c118bd9e138e46dec35a1ebfda6 Author: Kefeng Wang Date: Wed Jul 7 18:08:49 2021 -0700 openrisc: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-11-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Stafford Horne Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4154267a14929b6254a7634ddf0bb392a18cfb46 Author: Kefeng Wang Date: Wed Jul 7 18:08:46 2021 -0700 nios2: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-10-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Ley Foon Tan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de26fb41c24d5b92915f4d59ec49e4a16f01dd85 Author: Kefeng Wang Date: Wed Jul 7 18:08:43 2021 -0700 nds32: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-9-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Nick Hu Cc: Greentime Hu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ed408db174696c808d7293f8748e1f6e1c949ab3 Author: Kefeng Wang Date: Wed Jul 7 18:08:40 2021 -0700 m68k: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-8-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Greg Ungerer Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9772bdef22bf43f3ca467e22c7285331c212d5bf Author: Kefeng Wang Date: Wed Jul 7 18:08:37 2021 -0700 h8300: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-7-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79886ddced9b2953fe5b45c7883935bca073d28c Author: Kefeng Wang Date: Wed Jul 7 18:08:34 2021 -0700 csky: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Guo Ren Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29ffbca19e827efe0c85e9e8de2f485c34eaa01f Author: Kefeng Wang Date: Wed Jul 7 18:08:31 2021 -0700 arm64: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34f8602e3089db2fed41a5acf6aea20c0bf4c390 Author: Kefeng Wang Date: Wed Jul 7 18:08:29 2021 -0700 arm: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Russell King (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e339d50234d17af2a3668a631ba01fc14df474d Author: Kefeng Wang Date: Wed Jul 7 18:08:26 2021 -0700 arc: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Vineet Gupta arch/arc] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5748fbc533a32459582535b759887c45ca0fe556 Author: Kefeng Wang Date: Wed Jul 7 18:08:22 2021 -0700 mm: add setup_initial_init_mm() helper Patch series "init_mm: cleanup ARCH's text/data/brk setup code", v3. Add setup_initial_init_mm() helper, then use it to cleanup the text, data and brk setup code. This patch (of 15): Add setup_initial_init_mm() helper to setup kernel text, data and brk. Link: https://lkml.kernel.org/r/20210608083418.137226-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20210608083418.137226-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Souptick Joarder Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Greg Ungerer Cc: Guo Ren Cc: Heiko Carstens Cc: Ingo Molnar Cc: Jonas Bonn Cc: Ley Foon Tan Cc: Michael Ellerman Cc: Nick Hu Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Rich Felker Cc: Russell King (Oracle) Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06c8839815ac7aa2b44ea3bb3ee1820b08418f55 Author: Zhen Lei Date: Wed Jul 7 18:08:19 2021 -0700 mm: fix spelling mistakes in header files Fix some spelling mistakes in comments: successfull ==> successful potentialy ==> potentially alloced ==> allocated indicies ==> indices wont ==> won't resposible ==> responsible dirtyness ==> dirtiness droppped ==> dropped alread ==> already occured ==> occurred interupts ==> interrupts extention ==> extension slighly ==> slightly Dont't ==> Don't Link: https://lkml.kernel.org/r/20210531034849.9549-2-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Cc: Jerome Glisse Cc: Mike Kravetz Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76fe17ef588ad9f54c1a3cdf7d9512718cf98c85 Author: Mike Rapoport Date: Wed Jul 7 18:08:15 2021 -0700 secretmem: test: add basic selftest for memfd_secret(2) The test verifies that file descriptor created with memfd_secret does not allow read/write operations, that secret memory mappings respect RLIMIT_MEMLOCK and that remote accesses with process_vm_read() and ptrace() to the secret memory fail. Link: https://lkml.kernel.org/r/20210518072034.31572-8-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand Cc: Elena Reshetova Cc: Hagen Paul Pfeifer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Matthew Wilcox Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bb7f2ac24a028b20fca466b9633847b289b156a Author: Mike Rapoport Date: Wed Jul 7 18:08:11 2021 -0700 arch, mm: wire up memfd_secret system call where relevant Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Link: https://lkml.kernel.org/r/20210518072034.31572-7-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann Acked-by: Catalin Marinas Acked-by: David Hildenbrand Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand Cc: Elena Reshetova Cc: Hagen Paul Pfeifer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Matthew Wilcox Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a436f8ff6316c3c1a21a758e14ded930bd615d9 Author: Mike Rapoport Date: Wed Jul 7 18:08:07 2021 -0700 PM: hibernate: disable when there are active secretmem users It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be visible after the resume and this essentially will defeat the purpose of secret memory mappings. Prevent hibernation whenever there are active secret memory users. Link: https://lkml.kernel.org/r/20210518072034.31572-6-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: David Hildenbrand Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand Cc: Elena Reshetova Cc: Hagen Paul Pfeifer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Matthew Wilcox Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 Author: Mike Rapoport Date: Wed Jul 7 18:08:03 2021 -0700 mm: introduce memfd_secret system call to create "secret" memory areas Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The secretmem feature is off by default and the user must explicitly enable it at the boot time. Once secretmem is enabled, the user will be able to create a file descriptor using the memfd_secret() system call. The memory areas created by mmap() calls from this file descriptor will be unmapped from the kernel direct map and they will be only mapped in the page table of the processes that have access to the file descriptor. Secretmem is designed to provide the following protections: * Enhanced protection (in conjunction with all the other in-kernel attack prevention systems) against ROP attacks. Seceretmem makes "simple" ROP insufficient to perform exfiltration, which increases the required complexity of the attack. Along with other protections like the kernel stack size limit and address space layout randomization which make finding gadgets is really hard, absence of any in-kernel primitive for accessing secret memory means the one gadget ROP attack can't work. Since the only way to access secret memory is to reconstruct the missing mapping entry, the attacker has to recover the physical page and insert a PTE pointing to it in the kernel and then retrieve the contents. That takes at least three gadgets which is a level of difficulty beyond most standard attacks. * Prevent cross-process secret userspace memory exposures. Once the secret memory is allocated, the user can't accidentally pass it into the kernel to be transmitted somewhere. The secreremem pages cannot be accessed via the direct map and they are disallowed in GUP. * Harden against exploited kernel flaws. In order to access secretmem, a kernel-side attack would need to either walk the page tables and create new ones, or spawn a new privileged uiserspace process to perform secrets exfiltration using ptrace. The file descriptor based memory has several advantages over the "traditional" mm interfaces, such as mlock(), mprotect(), madvise(). File descriptor approach allows explicit and controlled sharing of the memory areas, it allows to seal the operations. Besides, file descriptor based memory paves the way for VMMs to remove the secret memory range from the userspace hipervisor process, for instance QEMU. Andy Lutomirski says: "Getting fd-backed memory into a guest will take some possibly major work in the kernel, but getting vma-backed memory into a guest without mapping it in the host user address space seems much, much worse." memfd_secret() is made a dedicated system call rather than an extension to memfd_create() because it's purpose is to allow the user to create more secure memory mappings rather than to simply allow file based access to the memory. Nowadays a new system call cost is negligible while it is way simpler for userspace to deal with a clear-cut system calls than with a multiplexer or an overloaded syscall. Moreover, the initial implementation of memfd_secret() is completely distinct from memfd_create() so there is no much sense in overloading memfd_create() to begin with. If there will be a need for code sharing between these implementation it can be easily achieved without a need to adjust user visible APIs. The secret memory remains accessible in the process context using uaccess primitives, but it is not exposed to the kernel otherwise; secret memory areas are removed from the direct map and functions in the follow_page()/get_user_page() family will refuse to return a page that belongs to the secret memory area. Once there will be a use case that will require exposing secretmem to the kernel it will be an opt-in request in the system call flags so that user would have to decide what data can be exposed to the kernel. Removing of the pages from the direct map may cause its fragmentation on architectures that use large pages to map the physical memory which affects the system performance. However, the original Kconfig text for CONFIG_DIRECT_GBPAGES said that gigabyte pages in the direct map "... can improve the kernel's performance a tiny bit ..." (commit 00d1c5e05736 ("x86: add gbpages switches")) and the recent report [1] showed that "... although 1G mappings are a good default choice, there is no compelling evidence that it must be the only choice". Hence, it is sufficient to have secretmem disabled by default with the ability of a system administrator to enable it at boot time. Pages in the secretmem regions are unevictable and unmovable to avoid accidental exposure of the sensitive data via swap or during page migration. Since the secretmem mappings are locked in memory they cannot exceed RLIMIT_MEMLOCK. Since these mappings are already locked independently from mlock(), an attempt to mlock()/munlock() secretmem range would fail and mlockall()/munlockall() will ignore secretmem mappings. However, unlike mlock()ed memory, secretmem currently behaves more like long-term GUP: secretmem mappings are unmovable mappings directly consumed by user space. With default limits, there is no excessive use of secretmem and it poses no real problem in combination with ZONE_MOVABLE/CMA, but in the future this should be addressed to allow balanced use of large amounts of secretmem along with ZONE_MOVABLE/CMA. A page that was a part of the secret memory area is cleared when it is freed to ensure the data is not exposed to the next user of that page. The following example demonstrates creation of a secret mapping (error handling is omitted): fd = memfd_secret(0); ftruncate(fd, MAP_SIZE); ptr = mmap(NULL, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); [1] https://lore.kernel.org/linux-mm/213b4567-46ce-f116-9cdf-bbd0c884eb3c@linux.intel.com/ [akpm@linux-foundation.org: suppress Kconfig whine] Link: https://lkml.kernel.org/r/20210518072034.31572-5-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Hagen Paul Pfeifer Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: Elena Reshetova Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox Cc: Mark Rutland Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Cc: David Hildenbrand Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d47c23b16aa78ff93a3050ccf4b1bd1c064b8b3 Author: Mike Rapoport Date: Wed Jul 7 18:07:59 2021 -0700 set_memory: allow querying whether set_direct_map_*() is actually enabled On arm64, set_direct_map_*() functions may return 0 without actually changing the linear map. This behaviour can be controlled using kernel parameters, so we need a way to determine at runtime whether calls to set_direct_map_invalid_noflush() and set_direct_map_default_noflush() have any effect. Extend set_memory API with can_set_direct_map() function that allows checking if calling set_direct_map_*() will actually change the page table, replace several occurrences of open coded checks in arm64 with the new function and provide a generic stub for architectures that always modify page tables upon calls to set_direct_map APIs. [arnd@arndb.de: arm64: kfence: fix header inclusion ] Link: https://lkml.kernel.org/r/20210518072034.31572-4-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: Catalin Marinas Reviewed-by: David Hildenbrand Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: Elena Reshetova Cc: Hagen Paul Pfeifer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Matthew Wilcox Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10cc327883919dbd2d77c858a50698622760639d Author: Mike Rapoport Date: Wed Jul 7 18:07:54 2021 -0700 riscv/Kconfig: make direct map manipulation options depend on MMU ARCH_HAS_SET_DIRECT_MAP and ARCH_HAS_SET_MEMORY configuration options have no meaning when CONFIG_MMU is disabled and there is no point to enable them for the nommu case. Add an explicit dependency on MMU for these options. Link: https://lkml.kernel.org/r/20210518072034.31572-3-rppt@kernel.org Signed-off-by: Mike Rapoport Reported-by: kernel test robot Reviewed-by: David Hildenbrand Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: Elena Reshetova Cc: Hagen Paul Pfeifer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Matthew Wilcox Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6aeb25425d07a8cf2deb4cc1db4d7a667e640839 Author: Mike Rapoport Date: Wed Jul 7 18:07:50 2021 -0700 mmap: make mlock_future_check() global Patch series "mm: introduce memfd_secret system call to create "secret" memory areas", v20. This is an implementation of "secret" mappings backed by a file descriptor. The file descriptor backing secret memory mappings is created using a dedicated memfd_secret system call The desired protection mode for the memory is configured using flags parameter of the system call. The mmap() of the file descriptor created with memfd_secret() will create a "secret" memory mapping. The pages in that mapping will be marked as not present in the direct map and will be present only in the page table of the owning mm. Although normally Linux userspace mappings are protected from other users, such secret mappings are useful for environments where a hostile tenant is trying to trick the kernel into giving them access to other tenants mappings. It's designed to provide the following protections: * Enhanced protection (in conjunction with all the other in-kernel attack prevention systems) against ROP attacks. Seceretmem makes "simple" ROP insufficient to perform exfiltration, which increases the required complexity of the attack. Along with other protections like the kernel stack size limit and address space layout randomization which make finding gadgets is really hard, absence of any in-kernel primitive for accessing secret memory means the one gadget ROP attack can't work. Since the only way to access secret memory is to reconstruct the missing mapping entry, the attacker has to recover the physical page and insert a PTE pointing to it in the kernel and then retrieve the contents. That takes at least three gadgets which is a level of difficulty beyond most standard attacks. * Prevent cross-process secret userspace memory exposures. Once the secret memory is allocated, the user can't accidentally pass it into the kernel to be transmitted somewhere. The secreremem pages cannot be accessed via the direct map and they are disallowed in GUP. * Harden against exploited kernel flaws. In order to access secretmem, a kernel-side attack would need to either walk the page tables and create new ones, or spawn a new privileged uiserspace process to perform secrets exfiltration using ptrace. In the future the secret mappings may be used as a mean to protect guest memory in a virtual machine host. For demonstration of secret memory usage we've created a userspace library https://git.kernel.org/pub/scm/linux/kernel/git/jejb/secret-memory-preloader.git that does two things: the first is act as a preloader for openssl to redirect all the OPENSSL_malloc calls to secret memory meaning any secret keys get automatically protected this way and the other thing it does is expose the API to the user who needs it. We anticipate that a lot of the use cases would be like the openssl one: many toolkits that deal with secret keys already have special handling for the memory to try to give them greater protection, so this would simply be pluggable into the toolkits without any need for user application modification. Hiding secret memory mappings behind an anonymous file allows usage of the page cache for tracking pages allocated for the "secret" mappings as well as using address_space_operations for e.g. page migration callbacks. The anonymous file may be also used implicitly, like hugetlb files, to implement mmap(MAP_SECRET) and use the secret memory areas with "native" mm ABIs in the future. Removing of the pages from the direct map may cause its fragmentation on architectures that use large pages to map the physical memory which affects the system performance. However, the original Kconfig text for CONFIG_DIRECT_GBPAGES said that gigabyte pages in the direct map "... can improve the kernel's performance a tiny bit ..." (commit 00d1c5e05736 ("x86: add gbpages switches")) and the recent report [1] showed that "... although 1G mappings are a good default choice, there is no compelling evidence that it must be the only choice". Hence, it is sufficient to have secretmem disabled by default with the ability of a system administrator to enable it at boot time. In addition, there is also a long term goal to improve management of the direct map. [1] https://lore.kernel.org/linux-mm/213b4567-46ce-f116-9cdf-bbd0c884eb3c@linux.intel.com/ This patch (of 7): It will be used by the upcoming secret memory implementation. Link: https://lkml.kernel.org/r/20210518072034.31572-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20210518072034.31572-2-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: David Hildenbrand Acked-by: James Bottomley Cc: Alexander Viro Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christopher Lameter Cc: Dan Williams Cc: Dave Hansen Cc: David Hildenbrand Cc: Elena Reshetova Cc: Hagen Paul Pfeifer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Bottomley Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: Matthew Wilcox Cc: Michael Kerrisk Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Roman Gushchin Cc: Shakeel Butt Cc: Shuah Khan Cc: Thomas Gleixner Cc: Tycho Andersen Cc: Will Deacon Cc: kernel test robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 788691464c29455346dc613a3b43c2fb9e5757a4 Author: Oliver Glitta Date: Wed Jul 7 18:07:47 2021 -0700 mm/slub: use stackdepot to save stack trace in objects Many stack traces are similar so there are many similar arrays. Stackdepot saves each unique stack only once. Replace field addrs in struct track with depot_stack_handle_t handle. Use stackdepot to save stack trace. The benefits are smaller memory overhead and possibility to aggregate per-cache statistics in the future using the stackdepot handle instead of matching stacks manually. [rdunlap@infradead.org: rename save_stack_trace()] Link: https://lkml.kernel.org/r/20210513051920.29320-1-rdunlap@infradead.org [vbabka@suse.cz: fix lockdep splat] Link: https://lkml.kernel.org/r/20210516195150.26740-1-vbabka@suse.czLink: https://lkml.kernel.org/r/20210414163434.4376-1-glittao@gmail.com Signed-off-by: Oliver Glitta Signed-off-by: Randy Dunlap Signed-off-by: Vlastimil Babka Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 113616ec5b64b23a1c9b663adafadabdfbec0f51 Author: Nathan Chancellor Date: Wed Jul 7 18:07:44 2021 -0700 hexagon: select ARCH_WANT_LD_ORPHAN_WARN Now that we handle all of the sections in a Hexagon defconfig, select ARCH_WANT_LD_ORPHAN_WARN so that unhandled sections are warned about by default. Link: https://lkml.kernel.org/r/20210521011239.1332345-4-nathan@kernel.org Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Brian Cain Cc: David Rientjes Cc: Oliver Glitta Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 681ba73c72302214686401e707e2087ed11a6556 Author: Nathan Chancellor Date: Wed Jul 7 18:07:41 2021 -0700 hexagon: use common DISCARDS macro ld.lld warns that the '.modinfo' section is not currently handled: ld.lld: warning: kernel/built-in.a(workqueue.o):(.modinfo) is being placed in '.modinfo' ld.lld: warning: kernel/built-in.a(printk/printk.o):(.modinfo) is being placed in '.modinfo' ld.lld: warning: kernel/built-in.a(irq/spurious.o):(.modinfo) is being placed in '.modinfo' ld.lld: warning: kernel/built-in.a(rcu/update.o):(.modinfo) is being placed in '.modinfo' The '.modinfo' section was added in commit 898490c010b5 ("moduleparam: Save information about built-in modules in separate file") to the DISCARDS macro but Hexagon has never used that macro. The unification of DISCARDS happened in commit 023bf6f1b8bf ("linker script: unify usage of discard definition") in 2009, prior to Hexagon being added in 2011. Switch Hexagon over to the DISCARDS macro so that anything that is expected to be discarded gets discarded. Link: https://lkml.kernel.org/r/20210521011239.1332345-3-nathan@kernel.org Fixes: e95bf452a9e2 ("Hexagon: Add configuration and makefiles for the Hexagon architecture.") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Brian Cain Cc: David Rientjes Cc: Oliver Glitta Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6fef087d0d37ba7dba8f3d75566eb4c256cd6742 Author: Nathan Chancellor Date: Wed Jul 7 18:07:38 2021 -0700 hexagon: handle {,SOFT}IRQENTRY_TEXT in linker script Patch series "hexagon: Fix build error with CONFIG_STACKDEPOT and select CONFIG_ARCH_WANT_LD_ORPHAN_WARN". This series fixes an error with ARCH=hexagon that was pointed out by the patch "mm/slub: use stackdepot to save stack trace in objects". The first patch fixes that error by handling the '.irqentry.text' and '.softirqentry.text' sections. The second patch switches Hexagon over to the common DISCARDS macro, which should have been done when Hexagon was merged into the tree to match commit 023bf6f1b8bf ("linker script: unify usage of discard definition"). The third patch selects CONFIG_ARCH_WANT_LD_ORPHAN_WARN so that something like this does not happen again. This patch (of 3): Patch "mm/slub: use stackdepot to save stack trace in objects" in -mm selects CONFIG_STACKDEPOT when CONFIG_STACKTRACE_SUPPORT is selected and CONFIG_STACKDEPOT requires IRQENTRY_TEXT and SOFTIRQENTRY_TEXT to be handled after commit 505a0ef15f96 ("kasan: stackdepot: move filter_irq_stacks() to stackdepot.c") due to the use of the __{,soft}irqentry_text_{start,end} section symbols. If those sections are not handled, the build is broken. $ make ARCH=hexagon CROSS_COMPILE=hexagon-linux- LLVM=1 LLVM_IAS=1 defconfig all ... ld.lld: error: undefined symbol: __irqentry_text_start >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a ld.lld: error: undefined symbol: __irqentry_text_end >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a ld.lld: error: undefined symbol: __softirqentry_text_start >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a ld.lld: error: undefined symbol: __softirqentry_text_end >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a >>> referenced by stackdepot.c >>> stackdepot.o:(filter_irq_stacks) in archive lib/built-in.a ... Add these sections to the Hexagon linker script so the build continues to work. ld.lld's orphan section warning would have caught this prior to the -mm commit mentioned above: ld.lld: warning: kernel/built-in.a(softirq.o):(.softirqentry.text) is being placed in '.softirqentry.text' ld.lld: warning: kernel/built-in.a(softirq.o):(.softirqentry.text) is being placed in '.softirqentry.text' ld.lld: warning: kernel/built-in.a(softirq.o):(.softirqentry.text) is being placed in '.softirqentry.text' Link: https://lkml.kernel.org/r/20210521011239.1332345-1-nathan@kernel.org Link: https://lkml.kernel.org/r/20210521011239.1332345-2-nathan@kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1381 Fixes: 505a0ef15f96 ("kasan: stackdepot: move filter_irq_stacks() to stackdepot.c") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Brian Cain Cc: Oliver Glitta Cc: Vlastimil Babka Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c23c80822fbdf69c1aacbca50b8339972697f850 Author: Zhen Lei Date: Wed Jul 7 18:07:34 2021 -0700 lib: fix spelling mistakes in header files Fix some spelling mistakes in comments found by "codespell": Hoever ==> However poiter ==> pointer representaion ==> representation uppon ==> upon independend ==> independent aquired ==> acquired mis-match ==> mismatch scrach ==> scratch struture ==> structure Analagous ==> Analogous interation ==> iteration And some were discovered manually by Joe Perches and Christoph Lameter: stroed ==> stored arch independent ==> an architecture independent A example structure for ==> Example structure for Link: https://lkml.kernel.org/r/20210609150027.14805-2-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Cc: Christoph Lameter Cc: Masami Hiramatsu Cc: Dennis Zhou Cc: Tejun Heo Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9dbbc3b9d09d6deba9f3b9e1d5b355032ed46a75 Author: Zhen Lei Date: Wed Jul 7 18:07:31 2021 -0700 lib: fix spelling mistakes Fix some spelling mistakes in comments: permanentely ==> permanently wont ==> won't remaning ==> remaining succed ==> succeed shouldnt ==> shouldn't alpha-numeric ==> alphanumeric storeing ==> storing funtion ==> function documenation ==> documentation Determin ==> Determine intepreted ==> interpreted ammount ==> amount obious ==> obvious interupts ==> interrupts occured ==> occurred asssociated ==> associated taking into acount ==> taking into account squence ==> sequence stil ==> still contiguos ==> contiguous matchs ==> matches Link: https://lkml.kernel.org/r/20210607072555.12416-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Reviewed-by: Jacob Keller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53b0fe36ab7c6eb3ce8ca711e636806649273463 Author: Zhen Lei Date: Wed Jul 7 18:07:28 2021 -0700 lib/test: fix spelling mistakes Fix some spelling mistakes in comments found by "codespell": thats ==> that's unitialized ==> uninitialized panicing ==> panicking sucess ==> success possitive ==> positive intepreted ==> interpreted Link: https://lkml.kernel.org/r/20210607133036.12525-2-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Acked-by: Yonghong Song [test_bfp.c] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3791f4df569eadb3b1f5f2a247068d031fb91f5 Author: Alexey Gladkov Date: Thu Jul 8 12:33:01 2021 +0200 Fix UCOUNT_RLIMIT_SIGPENDING counter leak We must properly handle an errors when we increase the rlimit counter and the ucounts reference counter. We have to this with RCU protection to prevent possible use-after-free that could occur due to concurrent put_cred_rcu(). The following reproducer triggers the problem: $ cat testcase.sh case "${STEP:-0}" in 0) ulimit -Si 1 ulimit -Hi 1 STEP=1 unshare -rU "$0" killall sleep ;; 1) for i in 1 2 3 4 5; do unshare -rU sleep 5 & done ;; esac with the KASAN report being along the lines of BUG: KASAN: use-after-free in put_ucounts+0x17/0xa0 Write of size 4 at addr ffff8880045f031c by task swapper/2/0 CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.13.0+ #19 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-alt4 04/01/2014 Call Trace: put_ucounts+0x17/0xa0 put_cred_rcu+0xd5/0x190 rcu_core+0x3bf/0xcb0 __do_softirq+0xe3/0x341 irq_exit_rcu+0xbe/0xe0 sysvec_apic_timer_interrupt+0x6a/0x90 asm_sysvec_apic_timer_interrupt+0x12/0x20 default_idle_call+0x53/0x130 do_idle+0x311/0x3c0 cpu_startup_entry+0x14/0x20 secondary_startup_64_no_verify+0xc2/0xcb Allocated by task 127: kasan_save_stack+0x1b/0x40 __kasan_kmalloc+0x7c/0x90 alloc_ucounts+0x169/0x2b0 set_cred_ucounts+0xbb/0x170 ksys_unshare+0x24c/0x4e0 __x64_sys_unshare+0x16/0x20 do_syscall_64+0x37/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 0: kasan_save_stack+0x1b/0x40 kasan_set_track+0x1c/0x30 kasan_set_free_info+0x20/0x30 __kasan_slab_free+0xeb/0x120 kfree+0xaa/0x460 put_cred_rcu+0xd5/0x190 rcu_core+0x3bf/0xcb0 __do_softirq+0xe3/0x341 The buggy address belongs to the object at ffff8880045f0300 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 28 bytes inside of 192-byte region [ffff8880045f0300, ffff8880045f03c0) The buggy address belongs to the page: page:000000008de0a388 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880045f0000 pfn:0x45f0 flags: 0x100000000000200(slab|node=0|zone=1) raw: 0100000000000200 ffffea00000f4640 0000000a0000000a ffff888001042a00 raw: ffff8880045f0000 000000008010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880045f0200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880045f0280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880045f0300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880045f0380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880045f0400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Disabling lock debugging due to kernel taint Fixes: d64696905554 ("Reimplement RLIMIT_SIGPENDING on top of ucounts") Cc: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Alexey Gladkov Signed-off-by: Linus Torvalds commit 878b3dfc42c4ddbf9e38cd9061e3ddd99a69747a Merge: dd5c153ed7839 6f081693e7b2b Author: Trond Myklebust Date: Sat Jun 26 12:20:23 2021 -0400 Merge part 2 of branch 'sysfs-devel' Signed-off-by: Trond Myklebust commit dd5c153ed7839e1e7c131dae7fa4d8eaaafb3eac Author: Trond Myklebust Date: Sat Jul 3 14:31:49 2021 -0400 NFSv4/pNFS: Return an error if _nfs4_pnfs_v3_ds_connect can't load NFSv3 Currently we fail to return an error if the NFSv3 module failed to load when we're trying to connect to a pNFS data server. Signed-off-by: Trond Myklebust commit f46f84931a0aa344678efe412d4b071d84d8a805 Author: Trond Myklebust Date: Sat Jul 3 14:34:20 2021 -0400 NFSv4/pNFS: Don't call _nfs4_pnfs_v3_ds_connect multiple times After we grab the lock in nfs4_pnfs_ds_connect(), there is no check for whether or not ds->ds_clp has already been initialised, so we can end up adding the same transports multiple times. Fixes: fc821d59209d ("pnfs/NFSv4.1: Add multipath capabilities to pNFS flexfiles servers over NFSv3") Signed-off-by: Trond Myklebust commit b4e89bcba2b3a966e043107cb52c682bb860cee7 Author: Trond Myklebust Date: Fri Jul 2 17:24:22 2021 -0400 NFSv4/pnfs: Clean up layout get on open Cache the layout in the arguments so we don't have to keep looking it up from the inode. Signed-off-by: Trond Myklebust commit 0b77f97a7e42adc72bd566ff8cb733ea426f74f6 Author: Trond Myklebust Date: Fri Jul 2 19:48:41 2021 -0400 NFSv4/pnfs: Fix layoutget behaviour after invalidation If the layout gets invalidated, we should wait for any outstanding layoutget requests for that layout to complete, and we should resend them only after re-establishing the layout stateid. Fixes: d29b468da4f9 ("pNFS/NFSv4: Improve rejection of out-of-order layouts") Signed-off-by: Trond Myklebust commit aa95edf309ef31e2df4a37ebf0e5c2ca2a6772ab Author: Trond Myklebust Date: Fri Jul 2 16:37:15 2021 -0400 NFSv4/pnfs: Fix the layout barrier update If we have multiple outstanding layoutget requests, the current code to update the layout barrier assumes that the outstanding layout stateids are updated in order. That's not necessarily the case. Instead of using the value of lo->plh_outstanding as a guesstimate for the window of values we need to accept, just wait to update the window until we're processing the last one. The intention here is just to ensure that we don't process 2^31 seqid updates without also updating the barrier. Fixes: 1bcf34fdac5f ("pNFS/NFSv4: Update the layout barrier when we schedule a layoutreturn") Signed-off-by: Trond Myklebust commit ba512c1bc3232124567a59a3995c773dc79716e8 Author: Dave Wysochanski Date: Tue Jun 29 13:13:57 2021 -0400 NFS: Fix fscache read from NFS after cache error Earlier commits refactored some NFS read code and removed nfs_readpage_async(), but neglected to properly fixup nfs_readpage_from_fscache_complete(). The code path is only hit when something unusual occurs with the cachefiles backing filesystem, such as an IO error or while a cookie is being invalidated. Mark page with PG_checked if fscache IO completes in error, unlock the page, and let the VM decide to re-issue based on PG_uptodate. When the VM reissues the readpage, PG_checked allows us to skip over fscache and read from the server. Link: https://marc.info/?l=linux-nfs&m=162498209518739 Fixes: 1e83b173b266 ("NFS: Add nfs_pageio_complete_read() and remove nfs_readpage_async()") Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust commit e0340f16a08d031de54ed91d26f57c9a966a776a Author: Dave Wysochanski Date: Tue Jun 29 05:11:28 2021 -0400 NFS: Ensure nfs_readpage returns promptly when internal error occurs A previous refactoring of nfs_readpage() might end up calling wait_on_page_locked_killable() even if readpage_async_filler() failed with an internal error and pg_error was non-zero (for example, if nfs_create_request() failed). In the case of an internal error, skip over wait_on_page_locked_killable() as this is only needed when the read is sent and an error occurs during completion handling. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust commit 526fca376412bb6f9a7417153e8550d9165027bd Merge: e9e8ee40b37af 681d5699cbe73 Author: Trond Myklebust Date: Mon Jun 21 11:39:45 2021 -0400 Merge branch 'sysfs-devel' Signed-off-by: Trond Myklebust commit 6f081693e7b2ba63422b735684b05a850a6351ba Author: Olga Kornievskaia Date: Wed Jun 23 23:28:53 2021 -0400 sunrpc: remove an offlined xprt using sysfs Once a transport has been put offline, this transport can be also removed from the list of transports. Any tasks that have been stuck on this transport would find the next available active transport and be re-tried. This transport would be removed from the xprt_switch list and freed. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 681d5699cbe734031c125cd5ca91826268af4568 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:22 2021 -0400 sunrpc: provide showing transport's state info in the sysfs directory In preparation of being able to change the xprt's state, add a way to show currect state of the transport. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 6a2840590b66e4914d583be61e40445386bb5835 Author: Olga Kornievskaia Date: Wed Jun 23 23:28:52 2021 -0400 sunrpc: display xprt's queuelen of assigned tasks via sysfs Once a task grabs a trasnport it's reflected in the queuelen of the rpc_xprt structure. Add display of that value in the xprt's info file in sysfs. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 0e5590358770ae779f3a8f5c36a3fbde40e344dc Author: Olga Kornievskaia Date: Tue Jun 8 15:59:21 2021 -0400 sunrpc: provide multipath info in the sysfs directory Allow to query xrpt_switch attributes. Currently showing the following fields of the rpc_xprt_switch structure: xps_nxprts, xps_nactive, xps_queuelen. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 85e39feead948bdf8322c961d7a9bebc20d629f3 Author: Olga Kornievskaia Date: Wed Jun 23 23:28:51 2021 -0400 NFSv4.1 identify and mark RPC tasks that can move between transports In preparation for when we can re-try a task on a different transport, identify and mark such RPC tasks as moveable. Only 4.1+ operarations can be re-tried on a different transport. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 4a09651a6b28748af401a1dd5cf9cea06c3aa329 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:20 2021 -0400 sunrpc: provide transport info in the sysfs directory Allow to query transport's attributes. Currently showing following fields of the rpc_xprt structure: state, last_used, cong, cwnd, max_reqs, min_reqs, num_reqs, sizes of queues binding, sending, pending, backlog. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b Author: Olga Kornievskaia Date: Wed Jun 23 23:28:50 2021 -0400 SUNRPC: take a xprt offline using sysfs Using sysfs's xprt_state attribute, mark a particular transport offline. It will not be picked during the round-robin selection. It's not allowed to take the main (1st created transport associated with the rpc_client) offline. Also bring a transport back online via sysfs by writing "online" and that would allow for this transport to be picked during the round- robin selection. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 587bc7255d26ca80b58026881db5fb3bf770cc43 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:19 2021 -0400 sunrpc: add dst_attr attributes to the sysfs xprt directory Allow to query and set the destination's address of a transport. Setting of the destination address is allowed only for TCP or RDMA based connections. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit c1830a63c79aa90f725ed6feaad097473f2b990d Author: Olga Kornievskaia Date: Wed Jun 23 23:28:49 2021 -0400 SUNRPC for TCP display xprt's source port in sysfs xprt_info Using TCP connection's source port it is useful to match connections seen on the network traces to the xprts used by the linux nfs client. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit a8482488a7d6d320f63a9ee1912dbb5ae5b80a61 Author: Olga Kornievskaia Date: Wed Jun 23 23:28:48 2021 -0400 SUNRPC query transport's source port Provide ability to query transport's source port. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 0e65ea43d9c7c038e167b20165a0e9ed1e9cca83 Author: Olga Kornievskaia Date: Wed Jun 23 23:28:47 2021 -0400 SUNRPC display xprt's main value in sysfs's xprt_info Display in sysfs in the information about the xprt if this is a main transport or not. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit e091853ebdb486fd8bde86b87178fdf3850914fc Author: Olga Kornievskaia Date: Wed Jun 23 23:28:46 2021 -0400 SUNRPC mark the first transport When an RPC client gets created it's first transport is special and should be marked a main transport. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit d408ebe04ac58eb370e2d264e88edbab746adda6 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:18 2021 -0400 sunrpc: add add sysfs directory per xprt under each xprt_switch Add individual transport directories under each transport switch group. For instance, for each nconnect=X connections there will be a transport directory. Naming conventions also identifies transport type -- xprt-- where type is udp, tcp, rdma, local, bc. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 2a338a543163ad6b42f4732396249cea6d3a33c8 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:17 2021 -0400 sunrpc: add a symlink from rpc-client directory to the xprt_switch An rpc client uses a transport switch and one ore more transports associated with that switch. Since transports are shared among rpc clients, create a symlink into the xprt_switch directory instead of duplicating entries under each rpc client. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit baea99445dd4675a834e8a5987d2f368adb62e6c Author: Olga Kornievskaia Date: Tue Jun 8 15:59:16 2021 -0400 sunrpc: add xprt_switch direcotry to sunrpc's sysfs Add xprt_switch directory to the sysfs and create individual xprt_swith subdirectories for multipath transport group. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit d3abc73987fd2a5992a9bdae9f44fa43d1b4db70 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:15 2021 -0400 sunrpc: keep track of the xprt_class in rpc_xprt structure We need to keep track of the type for a given transport. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 5b9268727f299f87432e8b035e9e8bec8ba13e8d Author: Olga Kornievskaia Date: Tue Jun 8 15:59:14 2021 -0400 sunrpc: add IDs to multipath This is used to uniquely identify sunrpc multipath objects in /sys. Signed-off-by: Dan Aloni Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 572caba402e10b35a080d1b43c0193da364f3a17 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:13 2021 -0400 sunrpc: add xprt id This adds a unique identifier for a sunrpc transport in sysfs, which is similarly managed to the unique IDs of clients. Signed-off-by: Dan Aloni Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit c5a382ebdbdaac27ec109993e29f9045d70297f2 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:12 2021 -0400 sunrpc: Create per-rpc_clnt sysfs kobjects These will eventually have files placed under them for sysfs operations. Signed-off-by: Anna Schumaker Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit c441f125de79121b97f1eb08dbfec85c8100a01e Author: Olga Kornievskaia Date: Tue Jun 8 15:59:11 2021 -0400 sunrpc: Create a client/ subdirectory in the sunrpc sysfs For network namespace separation. Signed-off-by: Anna Schumaker Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 746787489b0c3a879ddc671ce1e0d15e71b0d881 Author: Olga Kornievskaia Date: Tue Jun 8 15:59:10 2021 -0400 sunrpc: Create a sunrpc directory under /sys/kernel/ This is where we'll put per-rpc_client related files Signed-off-by: Anna Schumaker Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 3ecda64475bccdfdcbfd5b9b7e4bf639d8b233da Author: Baokun Li Date: Tue Jun 8 11:11:08 2021 +0800 ftrace: Use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Link: https://lkml.kernel.org/r/20210608031108.2820996-1-libaokun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Steven Rostedt (VMware) commit fa73514d5e620c2bb48b63e1dd509ce0942c39cf Author: Steven Rostedt (VMware) Date: Wed Jul 7 12:14:51 2021 -0400 tracing/selftests: Add tests to test histogram sym and sym-offset modifiers Add a test to the tracing selftests that will catch if the .sym or .sym-offset modifiers break in the future. Link: https://lkml.kernel.org/r/20210707121451.101a1002@oasis.local.home Acked-by: Tom Zanussi Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit f4a8e31ed84ec646c158824f423cb22d1f362bbf Author: Uwe Kleine-König Date: Thu Jul 1 10:27:55 2021 +0200 pwm: ep93xx: Ensure configuring period and duty_cycle isn't wrongly skipped As the last call to ep93xx_pwm_apply() might have exited early if state->enabled was false, the values for period and duty_cycle stored in pwm->state might not have been written to hardware and it must be ensured that they are configured before enabling the PWM. Fixes: 6d45374af539 ("pwm: ep93xx: Implement .apply callback") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 7d6d4aaf2809f209c7d6bcab2f9ae76797051cfa Author: Uwe Kleine-König Date: Thu Jul 1 10:27:54 2021 +0200 pwm: berlin: Ensure configuring period and duty_cycle isn't wrongly skipped As the last call to berlin_pwm_apply() might have exited early if state->enabled was false, the values for period and duty_cycle stored in pwm->state might not have been written to hardware and it must be ensured that they are configured before enabling the PWM. Fixes: 30dffb42fcd4 ("pwm: berlin: Implement .apply() callback") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 25f70b8f3d15b8c188ecb49c6007b86f3e775c20 Author: Uwe Kleine-König Date: Thu Jul 1 10:27:53 2021 +0200 pwm: tiecap: Ensure configuring period and duty_cycle isn't wrongly skipped As the last call to ecap_pwm_apply() might have exited early if state->enabled was false, the values for period and duty_cycle stored in pwm->state might not have been written to hardware and it must be ensured that they are configured before enabling the PWM. Fixes: 0ca7acd84766 ("pwm: tiecap: Implement .apply() callback") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fe8255f80b8617bc67a58f4ca2b54b3b9b32ff84 Author: Uwe Kleine-König Date: Thu Jul 1 10:27:52 2021 +0200 pwm: spear: Ensure configuring period and duty_cycle isn't wrongly skipped As the last call to spear_pwm_apply() might have exited early if state->enabled was false, the values for period and duty_cycle stored in pwm->state might not have been written to hardware and it must be ensured that they are configured before enabling the PWM. Fixes: 98761ce4b91b ("pwm: spear: Implement .apply() callback") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 65e2e6c1c20104ed19060a38f4edbf14e9f9a9a5 Author: Uwe Kleine-König Date: Thu Jul 1 10:27:51 2021 +0200 pwm: sprd: Ensure configuring period and duty_cycle isn't wrongly skipped As the last call to sprd_pwm_apply() might have exited early if state->enabled was false, the values for period and duty_cycle stored in pwm->state might not have been written to hardware and it must be ensured that they are configured before enabling the PWM. Fixes: 8aae4b02e8a6 ("pwm: sprd: Add Spreadtrum PWM support") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2c669ef6979c370f98d4b876e54f19613c81e075 Author: Valentin Schneider Date: Wed Jul 7 19:38:31 2021 +0100 powerpc/preempt: Don't touch the idle task's preempt_count during hotplug Powerpc currently resets a CPU's idle task preempt_count to 0 before said task starts executing the secondary startup routine (and becomes an idle task proper). This conflicts with commit f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled"). which initializes all of the idle tasks' preempt_count to PREEMPT_DISABLED during smp_init(). Note that this was superfluous before said commit, as back then the hotplug machinery would invoke init_idle() via idle_thread_get(), which would have already reset the CPU's idle task's preempt_count to PREEMPT_ENABLED. Get rid of this preempt_count write. Fixes: f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled") Reported-by: Bharata B Rao Signed-off-by: Valentin Schneider Tested-by: Guenter Roeck Tested-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210707183831.2106509-1-valentin.schneider@arm.com commit 779df2248739b6308c03b354c99e4c352141e3bc Author: Sven Schnelle Date: Fri Jun 25 14:50:08 2021 +0200 s390/vdso: add minimal compat vdso Add a small vdso for 31 bit compat application that provides trampolines for calls to sigreturn,rt_sigreturn,syscall_restart. This is requird for moving these syscalls away from the signal frame to the vdso. Note that this patch effectively disables CONFIG_COMPAT when using clang to compile the kernel. clang doesn't support 31 bit mode. We want to redirect sigreturn and restart_syscall to the vdso. However, the kernel cannot parse the ELF vdso file, so we need to generate header files which contain the offsets of the syscall instructions in the vdso page. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 43e1f76b0b69b86b2175ef755243e61fe40c75db Author: Sven Schnelle Date: Fri Jun 25 15:10:35 2021 +0200 s390/vdso: rename VDSO64_LBASE to VDSO_LBASE Will be used by both vdso32 and vdso64, so change the name. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 686341f2548b5a4c4ab1ee22427e046027ae1c9c Author: Sven Schnelle Date: Fri Jun 25 14:48:28 2021 +0200 s390/vdso64: add sigreturn,rt_sigreturn and restart_syscall Add minimalistic trampolines to vdso64 so we can return from signal without using the stack which requires pgm check handler hacks when NX is enabled. restart_syscall will be called from vdso to work around the architectural limitation that the syscall number might be encoded in the svc instruction, and therefore can not be changed. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d57778feb9878aa6b79c615fd029c2112d40a747 Author: Sven Schnelle Date: Wed Jun 23 14:10:00 2021 +0200 s390/vdso: always enable vdso With the upcoming move of the svc sigreturn instruction from the signal frame to vdso we need to have vdso always enabled. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b9639b3155d9fac737742324443d3f36ff7abc7c Author: Heiko Carstens Date: Mon Jul 5 12:06:55 2021 +0200 s390/ap: get rid of register asm Using register asm statements has been proven to be very error prone, especially when using code instrumentation where gcc may add function calls, which clobbers register contents in an unexpected way. Therefore get rid of register asm statements in ap code. There are also potential bugs, depending on inline decisions of the compiler. E.g. for: static inline struct ap_queue_status ap_tapq(ap_qid_t qid, unsigned long *info) { register unsigned long reg0 asm ("0") = qid; register struct ap_queue_status reg1 asm ("1"); register unsigned long reg2 asm ("2"); asm volatile(".long 0xb2af0000" /* PQAP(TAPQ) */ : "=d" (reg1), "=d" (reg2) : "d" (reg0) : "cc"); if (info) *info = reg2; return reg1; } In case of KCOV the "if (info)" line could cause a generated function call, which could clobber the contents of both reg2, and reg1. Similar can happen in case of KASAN for the "*info = reg2" line. Even though compilers will likely inline the function and optimize things away, this is not guaranteed. To get rid of this bug class, simply get rid of register asm constructs. Note: The inline function ap_dqap() will be handled in a separate patch because this one requires an addressing of the odd register of a register pair (which is done with %N[xxx] in the assembler code) and that's currently not supported by clang. Signed-off-by: Heiko Carstens Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 0aa4ff7688632a86bdb133fa106f2ccd514b91a7 Author: Sven Schnelle Date: Tue Jul 6 20:24:58 2021 +0200 s390/irq: remove HAVE_IRQ_EXIT_ON_IRQ_STACK This is no longer true since we switched to generic entry. The code switches to the IRQ stack before calling do_IRQ, but switches back to the kernel stack before calling irq_exit(). Fixes: 56e62a737028 ("s390: convert to generic entry") Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b8e9cc20b808e26329090c19ff80b7f5098e98ff Author: Ilya Leoshkevich Date: Fri Jul 2 15:54:55 2021 +0200 s390/traps: do not test MONITOR CALL without CONFIG_BUG tinyconfig fails to boot, because without CONFIG_BUG report_bug() always returns BUG_TRAP_TYPE_BUG, which causes mc 0,0 in test_monitor_call() to panic. Fix by skipping the test without CONFIG_BUG. Signed-off-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 1f0d22defd59f603d63ba51483eeb8d72726ce8b Author: Harald Freudenberger Date: Wed Jun 30 16:10:56 2021 +0200 s390/ap: Rework ap_dqap to deal with messages greater than recv buffer Rework of the ap_dqap() inline function with the dqap inline assembler invocation and the caller code in ap_queue.c to be able to handle replies which exceed the receive buffer size. ap_dqap() now provides two additional parameters to handle together with the caller the case where a reply in the firmware queue entry exceeds the given message buffer size. It depends on the caller how to exactly handle this. The behavior implemented now by ap_sm_recv() in ap_queue.c is to simple purge this entry from the firmware queue and let the caller 'receive' a -EMSGSIZE for the request without delivering any reply data - not even a truncated reply message. However, the reworked ap_dqap() could now get invoked in a way that the message is received in multiple parts and the caller assembles the parts into one reply message. Signed-off-by: Harald Freudenberger Suggested-by: Juergen Christ Reviewed-by: Juergen Christ Signed-off-by: Vasily Gorbik commit 0705e8d1e2207ceeb83dc6e1751b6b82718b353a Author: Theodore Ts'o Date: Fri Jul 2 18:05:03 2021 -0400 ext4: inline jbd2_journal_[un]register_shrinker() The function jbd2_journal_unregister_shrinker() was getting called twice when the file system was getting unmounted. On Power and ARM platforms this was causing kernel crash when unmounting the file system, when a percpu_counter was destroyed twice. Fix this by removing jbd2_journal_[un]register_shrinker() functions, and inlining the shrinker setup and teardown into journal_init_common() and jbd2_journal_destroy(). This means that ext4 and ocfs2 now no longer need to know about registering and unregistering jbd2's shrinker. Also, while we're at it, rename the percpu counter from j_jh_shrink_count to j_checkpoint_jh_count, since this makes it clearer what this counter is intended to track. Link: https://lore.kernel.org/r/20210705145025.3363130-1-tytso@mit.edu Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers") Reported-by: Jon Hunter Reported-by: Sachin Sant Tested-by: Sachin Sant Tested-by: Jon Hunter Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o commit 0955901908e80384592ed85aa164d7e5be6cc067 Author: Theodore Ts'o Date: Fri Jul 2 13:21:06 2021 -0400 ext4: fix flags validity checking for EXT4_IOC_CHECKPOINT Use the correct bitmask when checking for any not-yet-supported flags. Link: https://lore.kernel.org/r/20210702173425.1276158-1-tytso@mit.edu Fixes: 351a0a3fbc35 ("ext4: add ioctl EXT4_IOC_CHECKPOINT") Signed-off-by: Theodore Ts'o Reviewed-by: Leah Rumancik commit 61bb4a1c417e5b95d9edb4f887f131de32e419cb Author: Theodore Ts'o Date: Fri Jul 2 12:45:02 2021 -0400 ext4: fix possible UAF when remounting r/o a mmp-protected file system After commit 618f003199c6 ("ext4: fix memory leak in ext4_fill_super"), after the file system is remounted read-only, there is a race where the kmmpd thread can exit, causing sbi->s_mmp_tsk to point at freed memory, which the call to ext4_stop_mmpd() can trip over. Fix this by only allowing kmmpd() to exit when it is stopped via ext4_stop_mmpd(). Link: https://lore.kernel.org/r/20210707002433.3719773-1-tytso@mit.edu Reported-by: Ye Bin Bug-Report-Link: <20210629143603.2166962-1-yebin10@huawei.com> Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara commit db7b337709a15d33cc5e901d2ee35d3bb3e42b2f Author: David Hildenbrand Date: Wed Jun 2 20:57:20 2021 +0200 virtio-mem: prioritize unplug from ZONE_MOVABLE in Big Block Mode Let's handle unplug in Big Block Mode similar to Sub Block Mode -- prioritize memory blocks onlined to ZONE_MOVABLE. We won't care further about big blocks with mixed zones, as it's rather a corner case that won't matter in practice. Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-8-david@redhat.com Signed-off-by: Michael S. Tsirkin commit c6bc1422fa55033c1bd04c788203af8be2d5ce4c Author: David Hildenbrand Date: Wed Jun 2 20:57:19 2021 +0200 virtio-mem: simplify high-level unplug handling in Big Block Mode Let's simplify high-level big block selection when unplugging in Big Block Mode. Combine handling of offline and online blocks. We can get rid of virtio_mem_bbm_bb_is_offline() and simply use virtio_mem_bbm_offline_remove_and_unplug_bb(), as that already tolerates offline parts. We can race with concurrent onlining/offlining either way, so we don;t have to be super correct by failing if an offline big block we'd like to unplug just got (partially) onlined. Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-7-david@redhat.com Signed-off-by: Michael S. Tsirkin commit c740bb97cc84b88f160f32e0b5c80159e1c6fd9c Author: David Hildenbrand Date: Wed Jun 2 20:57:18 2021 +0200 virtio-mem: prioritize unplug from ZONE_MOVABLE in Sub Block Mode Until now, memory provided by a single virtio-mem device was usually either onlined completely to ZONE_MOVABLE (online_movable) or to ZONE_NORMAL (online_kernel); however, that will change in the future. There are two reasons why we want to track to which zone a memory blocks belongs to and prioritize ZONE_MOVABLE blocks: 1) Memory managed by ZONE_MOVABLE can more likely get unplugged, therefore, resulting in a faster memory hotunplug process. Further, we can more reliably unplug and remove complete memory blocks, removing metadata allocated for the whole memory block. 2) We want to avoid corner cases where unplugging with the current scheme (highest to lowest address) could result in accidential zone imbalances, whereby we remove too much ZONE_NORMAL memory for ZONE_MOVABLE memory of the same device. Let's track the zone via memory block states and try unplug from ZONE_MOVABLE first. Rename VIRTIO_MEM_SBM_MB_ONLINE* to VIRTIO_MEM_SBM_MB_KERNEL* to avoid even longer state names. In commit 27f852795a06 ("virtio-mem: don't special-case ZONE_MOVABLE"), we removed slightly similar tracking for fully plugged memory blocks to support unplugging from ZONE_MOVABLE at all -- as we didn't allow partially plugged memory blocks in ZONE_MOVABLE before that. That commit already mentioned "In the future, we might want to remember the zone again and use the information when (un)plugging memory." Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-6-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 5304ca3dd70c586012fb93f4a6d74e3ab750902d Author: David Hildenbrand Date: Wed Jun 2 20:57:17 2021 +0200 virtio-mem: simplify high-level unplug handling in Sub Block Mode Let's simplify by introducing a new virtio_mem_sbm_unplug_any_sb(), similar to virtio_mem_sbm_plug_any_sb(), to simplify high-level memory block selection when unplugging in Sub Block Mode. Rename existing virtio_mem_sbm_unplug_any_sb() to virtio_mem_sbm_unplug_any_sb_raw(). The only change is that we now temporarily unlock the hotplug mutex around cond_resched() when processing offline memory blocks, which doesn't make a real difference as we already have to temporarily unlock in virtio_mem_sbm_unplug_any_sb_offline() when removing a memory block. Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-5-david@redhat.com Signed-off-by: Michael S. Tsirkin commit f4cf803dff4c87656cf25d9c5ec3cf828839efec Author: David Hildenbrand Date: Wed Jun 2 20:57:16 2021 +0200 virtio-mem: simplify high-level plug handling in Sub Block Mode Let's simplify high-level memory block selection when plugging in Sub Block Mode. No need for two separate loops when selecting memory blocks for plugging memory. Avoid passing the "online" state by simply obtaining the state in virtio_mem_sbm_plug_any_sb(). Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-4-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 49d42872d520365df619e5092ff7fb225e3079b3 Author: David Hildenbrand Date: Wed Jun 2 20:57:15 2021 +0200 virtio-mem: use page_zonenum() in virtio_mem_fake_offline() Let's use page_zonenum() instead of zone_idx(page_zone()). Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-3-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 500817bf5e110ad9b7138bc582971bb7ee77d6f7 Author: David Hildenbrand Date: Wed Jun 2 20:57:14 2021 +0200 virtio-mem: don't read big block size in Sub Block Mode We are reading a Big Block Mode value while in Sub Block Mode when initializing. Fortunately, vm->bbm.bb_size maps to some counter in the vm->sbm.mb_count array, which is 0 at that point in time. No harm done; still, this was unintended and is not future-proof. Fixes: 4ba50cd3355d ("virtio-mem: Big Block Mode (BBM) memory hotplug") Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20210602185720.31821-2-david@redhat.com Signed-off-by: Michael S. Tsirkin commit efa08cb468cdd67855f63f341eac5f5f9ac93370 Author: Eli Cohen Date: Wed Jun 2 10:15:36 2021 +0800 virtio/vdpa: clear the virtqueue state during probe Clear the available index as part of the initialization process to clear and values that might be left from previous usage of the device. For example, if the device was previously used by vhost_vdpa and now probed by vhost_vdpa, you want to start with indices. Fixes: c043b4a8cf3b ("virtio: introduce a vDPA based transport") Signed-off-by: Eli Cohen Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210602021536.39525-5-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 1225c216d9542ed4883027d3af50035c35a7a03c Author: Jason Wang Date: Wed Jun 2 10:15:35 2021 +0800 vp_vdpa: allow set vq state to initial state after reset We used to fail the set_vq_state() since it was not supported yet by the virtio spec. But if the bus tries to set the state which is equal to the device initial state after reset, we can let it go. This is a must for virtio_vdpa() to set vq state during probe which is required for some vDPA parents. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210602021536.39525-4-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 0140b3d07617e71a8d9509776434ced107572fc8 Author: Jason Wang Date: Wed Jun 2 10:15:34 2021 +0800 virtio-pci library: introduce vp_modern_get_driver_features() This patch introduce a helper to get driver/guest features from the device. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210602021536.39525-3-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 530a5678bc0083e84f99f38f77ced8fbb3d18434 Author: Jason Wang Date: Wed Jun 2 10:15:33 2021 +0800 vdpa: support packed virtqueue for set/get_vq_state() This patch extends the vdpa_vq_state to support packed virtqueue state which is basically the device/driver ring wrap counters and the avail and used index. This will be used for the virito-vdpa support for the packed virtqueue and the future vhost/vhost-vdpa support for the packed virtqueue. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210602021536.39525-2-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 72b5e8958738aaa453db5149e6ca3bcf416023b9 Author: Jason Wang Date: Fri Jun 4 13:53:50 2021 +0800 virtio-ring: store DMA metadata in desc_extra for split virtqueue For split virtqueue, we used to depend on the address, length and flags stored in the descriptor ring for DMA unmapping. This is unsafe for the case since the device can manipulate the behavior of virtio driver, IOMMU drivers and swiotlb. For safety, maintain the DMA address, DMA length, descriptor flags and next filed of the non indirect descriptors in vring_desc_state_extra when DMA API is used for virtio as we did for packed virtqueue and use those metadata for performing DMA operations. Indirect descriptors should be safe since they are using streaming mappings. With this the descriptor ring is write only form the view of the driver. This slight increase the footprint of the drive but it's not noticed through pktgen (64B) test and netperf test in the case of virtio-net. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-8-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 5bc72234f7c65830e60806dbb73ae76bacd8a061 Author: Jason Wang Date: Fri Jun 4 13:53:49 2021 +0800 virtio: use err label in __vring_new_virtqueue() Using error label for unwind in __vring_new_virtqueue. This is useful for future refacotring. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-7-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit fe4c3862df630ec711133e686e023b4467da2ec1 Author: Jason Wang Date: Fri Jun 4 13:53:48 2021 +0800 virtio_ring: introduce virtqueue_desc_add_split() This patch introduces a helper for storing descriptor in the descriptor table for split virtqueue. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-6-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 44593865b7c5f55bf587f297c72d682c671eea2b Author: Jason Wang Date: Fri Jun 4 13:53:47 2021 +0800 virtio_ring: secure handling of mapping errors We should not depend on the DMA address, length and flag of descriptor table since they could be wrote with arbitrary value by the device. So this patch switches to use the stored one in desc_extra. Note that the indirect descriptors are fine since they are read-only streaming mappings. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-5-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 5a22242160201b819be2fe67e15cc9338f3ee582 Author: Jason Wang Date: Fri Jun 4 13:53:46 2021 +0800 virtio-ring: factor out desc_extra allocation A helper is introduced for the logic of allocating the descriptor extra data. This will be reused by split virtqueue. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-4-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 1f28750f2e113132791161563c6e7b99eaa4c46b Author: Jason Wang Date: Fri Jun 4 13:53:45 2021 +0800 virtio_ring: rename vring_desc_extra_packed Rename vring_desc_extra_packed to vring_desc_extra since the structure are pretty generic which could be reused by split virtqueue as well. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-3-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit aeef9b4733c5c2356c75ba4f5c99e1a09ff1721d Author: Jason Wang Date: Fri Jun 4 13:53:44 2021 +0800 virtio-ring: maintain next in extra state for packed virtqueue This patch moves next from vring_desc_state_packed to vring_desc_desc_extra_packed. This makes it simpler to let extra state to be reused by split virtqueue. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210604055350.58753-2-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit e3aadf2e1614174dc81d52cbb9dabb77913b11c6 Author: Eli Cohen Date: Sun Jun 6 08:31:28 2021 +0300 vdpa/mlx5: Clear vq ready indication upon device reset After device reset, the virtqueues are not ready so clear the ready field. Failing to do so can result in virtio_vdpa failing to load if the device was previously used by vhost_vdpa and the old values are ready. virtio_vdpa expects to find VQs in "not ready" state. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210606053128.170399-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit b57c46cb3c3bca46e1f0b258493572d234362de8 Author: Eli Cohen Date: Thu Jun 3 11:11:53 2021 +0300 vdpa/mlx5: Add support for doorbell bypassing Implement mlx5_get_vq_notification() to return the doorbell address. Since the notification area is mapped to userspace, make sure that the BAR size is at least PAGE_SIZE large. Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210603081153.5750-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit a7766ef18b33674fa164e2e2916cef16d4e17f43 Author: Michael S. Tsirkin Date: Tue Apr 13 01:30:45 2021 -0400 virtio_net: disable cb aggressively There are currently two cases where we poll TX vq not in response to a callback: start xmit and rx napi. We currently do this with callbacks enabled which can cause extra interrupts from the card. Used not to be a big issue as we run with interrupts disabled but that is no longer the case, and in some cases the rate of spurious interrupts is so high linux detects this and actually kills the interrupt. Fix up by disabling the callbacks before polling the tx vq. Signed-off-by: Michael S. Tsirkin commit 24d1e49415be546470b20429d748e240d0518b7e Author: Takashi Iwai Date: Thu Jul 8 11:07:38 2021 +0200 ALSA: intel8x0: Fix breakage at ac97 clock measurement The recent workaround for the wild interrupts in commit c1f0616124c4 ("ALSA: intel8x0: Don't update period unless prepared") leaded to a regression, causing the interrupt storm during ac97 clock measurement at the driver probe. We need to handle the interrupt while the clock measurement as well as the proper PCM streams. Fixes: c1f0616124c4 ("ALSA: intel8x0: Don't update period unless prepared") Reported-and-tested-by: Max Filippov Tested-by: Sergey Senozhatsky Cc: Link: https://lore.kernel.org/r/CAMo8BfKKMQkcsbOQaeEjq_FsJhdK=fn598dvh7YOcZshUSOH=g@mail.gmail.com Link: https://lore.kernel.org/r/20210708090738.1569-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c90b4503ccf42d9d367e843c223df44aa550e82a Author: Colin Xu Date: Wed Jul 7 08:45:31 2021 +0800 drm/i915/gvt: Clear d3_entered on elsp cmd submission. d3_entered flag is used to mark for vgpu_reset a previous power transition from D3->D0, typically for VM resume from S3, so that gvt could skip PPGTT invalidation in current vgpu_reset during resuming. In case S0ix exit, although there is D3->D0, guest driver continue to use vgpu as normal, with d3_entered set, until next shutdown/reboot or power transition. If a reboot follows a S0ix exit, device power state transite as: D0->D3->D0->D0(reboot), while system power state transites as: S0->S0 (reboot). There is no vgpu_reset until D0(reboot), thus d3_entered won't be cleared, the vgpu_reset will skip PPGTT invalidation however those PPGTT entries are no longer valid. Err appears like: gvt: vgpu 2: vfio_pin_pages failed for gfn 0xxxxx, ret -22 gvt: vgpu 2: fail: spt xxxx guest entry 0xxxxx type 2 gvt: vgpu 2: fail: shadow page xxxx guest entry 0xxxxx type 2. Give gvt a chance to clear d3_entered on elsp cmd submission so that the states before & after S0ix enter/exit are consistent. Fixes: ba25d977571e ("drm/i915/gvt: Do not destroy ppgtt_mm during vGPU D3->D0.") Reviewed-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210707004531.4873-1-colin.xu@intel.com commit 889d0e7dc68314a273627d89cbb60c09e1cc1c25 Author: Dongliang Mu Date: Wed Jul 7 23:56:32 2021 +0800 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE must be present to fix GPF. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Dongliang Mu Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210707155633.1486603-1-mudongliangabcd@gmail.com Signed-off-by: Stefan Schmidt commit 9615fe36b31d926f1c5107013b772dc226a6a7ca Author: Florian Fainelli Date: Wed Jul 7 21:10:51 2021 -0700 skbuff: Fix build with SKB extensions disabled We will fail to build with CONFIG_SKB_EXTENSIONS disabled after 8550ff8d8c75 ("skbuff: Release nfct refcount on napi stolen or re-used skbs") since there is an unconditionally use of skb_ext_find() without an appropriate stub. Simply build the code conditionally and properly guard against both COFNIG_SKB_EXTENSIONS as well as CONFIG_NET_TC_SKB_EXT being disabled. Fixes: Fixes: 8550ff8d8c75 ("skbuff: Release nfct refcount on napi stolen or re-used skbs") Signed-off-by: Florian Fainelli Reviewed-by: Roi Dayan Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit b05d4c576b697b9f462b9c532c997171d5c3b067 Author: Ira Weiny Date: Tue May 25 10:24:28 2021 -0700 dax: Ensure errno is returned from dax_direct_access If the caller specifies a negative nr_pages that is an invalid parameter. Return -EINVAL to ensure callers get an errno if they want to check it. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20210525172428.3634316-4-ira.weiny@intel.com Signed-off-by: Dan Williams commit 44788591c3cfb81d9315b8ee5c2076e51bfe8a39 Author: Ira Weiny Date: Tue May 25 10:24:27 2021 -0700 fs/dax: Clarify nr_pages to dax_direct_access() dax_direct_access() takes a number of pages. PHYS_PFN(PAGE_SIZE) is a very round about way to specify '1'. Change the nr_pages parameter to the explicit value of '1'. Reviewed-by: Dan Williams Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20210525172428.3634316-3-ira.weiny@intel.com Signed-off-by: Dan Williams commit 2e29be2e491595407087ab36a5e5a159be693f7b Author: Ira Weiny Date: Tue May 25 10:24:26 2021 -0700 fs/fuse: Remove unneeded kaddr parameter fuse_dax_mem_range_init() does not need the address or the pfn of the memory requested in dax_direct_access(). It is only calling direct access to get the number of pages. Remove the unused variables and stop requesting the kaddr and pfn from dax_direct_access(). Reviewed-by: Dan Williams Signed-off-by: Ira Weiny Reviewed-by: Vivek Goyal Link: https://lore.kernel.org/r/20210525172428.3634316-2-ira.weiny@intel.com Signed-off-by: Dan Williams commit 92c4bed59bc0ef2a92b99ca1fe1c7107ffa3125c Author: Roy, UjjaL Date: Wed Jul 7 23:48:33 2021 +0530 ipmr: Fix indentation issue Fixed indentation by removing extra spaces. Signed-off-by: Roy, UjjaL Signed-off-by: David S. Miller commit 271dbc31843244e5192f0f8a8be0da26995f944a Author: Dan Carpenter Date: Wed Jul 7 13:01:00 2021 +0300 sock: unlock on error in sock_setsockopt() If copy_from_sockptr() then we need to unlock before returning. Fixes: d463126e23f1 ("net: sock: extend SO_TIMESTAMPING for PHC binding") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 21c355b09711e95f8f0e7c1890b343c6cd350042 Merge: 5cebdea6f8cea f18f58012ee89 Author: Dave Airlie Date: Thu Jul 8 11:16:33 2021 +1000 Merge tag 'drm-misc-next-fixes-2021-07-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: * amdgpu: TTM fixes * dma-buf: Doc fixes * gma500: Fix potential BO leaks in error handling * radeon: Fix NULL-ptr deref Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YN2GK2SH64yqXqh9@linux-uq9g commit 5cebdea6f8cea0d167bf0b3535f9905c67e76e00 Merge: 0d3a1b37ab931 3dd6c11b60d2f Author: Dave Airlie Date: Thu Jul 8 10:51:22 2021 +1000 Merge tag 'drm-intel-next-fixes-2021-07-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next One fix targeting stable for display DP VSC, plus DG1 display fix and a bug fix of IRQs usages and cleanup references to the DRM IRQ midlayer. Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YOXDp/+CFDgJ2/7f@intel.com commit 0d3a1b37ab931fe31bf740be6fa135d770ade677 Merge: 8a02ea42bc1d4 93c5bcd4eaaaf Author: Dave Airlie Date: Thu Jul 8 08:45:20 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-07-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-07-01: amdgpu: - Misc Navi fixes - Powergating fix - Yellow Carp updates - Beige Goby updates - S0ix fix - Revert overlay validation fix - GPU reset fix for DC - PPC64 fix - Add new dimgrey cavefish DID - RAS fix amdkfd: - SVM fixes radeon: - Fix missing drm_gem_object_put in error path Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210701042241.25449-1-alexander.deucher@amd.com commit d4dc277c480c1faf87d452467d16f513b7ae2fb8 Author: Steve French Date: Wed Jul 7 14:03:54 2021 -0500 CIFS: Clarify SMB1 code for POSIX Lock Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for SMB1 PosixLock. This changeset doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711520 ("Out of bounds write") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit f371793d6e13a1387b83a72d7bb2c0e3a9ea654f Author: Steve French Date: Wed Jul 7 13:34:47 2021 -0500 CIFS: Clarify SMB1 code for rename open file Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for SMB1 RenameOpenFile. This changeset doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711521 ("Out of bounds write") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 1d719254c139fb62fb8056fb496b6fd007e71550 Author: Wei Li Date: Mon Jun 28 11:04:09 2021 +0800 tools: bpf: Fix error in 'make -C tools/ bpf_install' make[2]: *** No rule to make target 'install'. Stop. make[1]: *** [Makefile:122: runqslower_install] Error 2 make: *** [Makefile:116: bpf_install] Error 2 There is no rule for target 'install' in tools/bpf/runqslower/Makefile, and there is no need to install it, so just remove 'runqslower_install'. Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf") Signed-off-by: Wei Li Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210628030409.3459095-1-liwei391@huawei.com commit d7fba8ff3e50fb25ffe583bf945df052f6caffa2 Merge: 0e02bf5de46ae d322957ebfb9c Author: David S. Miller Date: Wed Jul 7 14:00:14 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Do not refresh timeout in SYN_SENT for syn retransmissions. Add selftest for unreplied TCP connection, from Florian Westphal. 2) Fix null dereference from error path with hardware offload in nftables. 3) Remove useless nf_ct_gre_keymap_flush() from netns exit path, from Vasily Averin. 4) Missing rcu read-lock side in ctnetlink helper info dump, also from Vasily. 5) Do not mark RST in the reply direction coming after SYN packet for an out-of-sync entry, from Ali Abdallah and Florian Westphal. 6) Add tcp_ignore_invalid_rst sysctl to allow to disable out of segment RSTs, from Ali. 7) KCSAN fix for nf_conntrack_all_lock(), from Manfred Spraul. 8) Honor NFTA_LAST_SET in nft_last. 9) Fix incorrect arithmetics when restore last_jiffies in nft_last. ==================== Signed-off-by: David S. Miller commit 0e02bf5de46ae30074a2e1a8194a422a84482a1a Author: Hangbin Liu Date: Wed Jul 7 16:15:30 2021 +0800 selftests: icmp_redirect: IPv6 PMTU info should be cleared after redirect After redirecting, it's already a new path. So the old PMTU info should be cleared. The IPv6 test "mtu exception plus redirect" should only has redirect info without old PMTU. The IPv4 test can not be changed because of legacy. Fixes: ec8105352869 ("selftests: Add redirect tests") Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 24b671aad4eae423e1abf5b7f08d9a5235458b8d Author: Hangbin Liu Date: Wed Jul 7 16:15:29 2021 +0800 selftests: icmp_redirect: remove from checking for IPv6 route get If the kernel doesn't enable option CONFIG_IPV6_SUBTREES, the RTA_SRC info will not be exported to userspace in rt6_fill_node(). And ip cmd will not print "from ::" to the route output. So remove this check. Fixes: ec8105352869 ("selftests: Add redirect tests") Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit eca81f09145d765c21dd8fb1ba5d874ca255c32c Author: YueHaibing Date: Wed Jul 7 15:53:35 2021 +0800 stmmac: platform: Fix signedness bug in stmmac_probe_config_dt() The "plat->phy_interface" variable is an enum and in this context GCC will treat it as an unsigned int so the error handling is never triggered. Fixes: b9f0b2f634c0 ("net: stmmac: platform: fix probe for ACPI devices") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 0d472c69c6a5e22cef9e5809e2f6d0ccd5934f4a Author: YueHaibing Date: Wed Jul 7 15:50:57 2021 +0800 stmmac: dwmac-loongson: Fix unsigned comparison to zero plat->phy_interface is unsigned integer, so the condition can't be less than zero and the warning will never printed. Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit e9f1cbc0c4114880090c7a578117d3b9cf184ad4 Merge: aef4226f91401 166fdb4dd05f2 Author: Linus Torvalds Date: Wed Jul 7 13:30:01 2021 -0700 Merge tag 'acpi-5.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These include fixes of the recently introduced support for the Platform Runtime Mechanism (PRM) feature, a new backlight quirk, a suspend-to-idle wakeup fix for non-Intel platforms and a fix for the AMBA bus resource list in /proc/iomem. Specifics: - Fix up the recently added Platform Runtime Mechanism (PRM) support by correnting a couple of implementation mistakes in it and adding a Kconfig help text to describe it (Aubrey Li, Rafael Wysocki). - Add backlight quirk for Dell Vostro 3350 (Hans de Goede). - Avoid spurious wakeups from suspend-to-idle on non-Intel platforms by restricting special EC GPE handling to the Intel ones (Mario Limonciello). - Modify the AMBA bus support in ACPI to avoid adding using resource names in /proc/iomem (Liguang Zhang)" * tag 'acpi-5.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Do not singal PRM support if not enabled ACPI: Correct \_SB._OSC bit definition for PRM ACPI: Kconfig: Provide help text for the ACPI_PRMT option ACPI: PM: Only mark EC GPE for wakeup on Intel systems ACPI: video: Add quirk for the Dell Vostro 3350 ACPI: AMBA: Fix resource name in /proc/iomem commit aef4226f914016cc00affa8476ba5164dcca56fd Merge: c6e8c51f6978c 843372db2e3bf Author: Linus Torvalds Date: Wed Jul 7 13:22:59 2021 -0700 Merge tag 'pm-5.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These include cpufreq core simplifications and fixes, cpufreq driver updates, cpuidle driver update, a generic power domains (genpd) locking fix and a debug-related simplification of the PM core. Specifics: - Drop the ->stop_cpu() (not really useful) and ->resolve_freq() (unused) cpufreq driver callbacks and modify the users of the former accordingly (Viresh Kumar, Rafael Wysocki). - Add frequency invariance support to the ACPI CPPC cpufreq driver again along with the related fixes and cleanups (Viresh Kumar). - Update the Meditak, qcom and SCMI ARM cpufreq drivers (Fabien Parent, Seiya Wang, Sibi Sankar, Christophe JAILLET). - Rename black/white-lists in the DT cpufreq driver (Viresh Kumar). - Add generic performance domains support to the dvfs DT bindings (Sudeep Holla). - Refine locking in the generic power domains (genpd) support code to avoid lock dependency issues (Stephen Boyd). - Update the MSM and qcom ARM cpuidle drivers (Bartosz Dudziak). - Simplify the PM core debug code by using ktime_us_delta() to compute time interval lengths (Mark-PK Tsai)" * tag 'pm-5.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (21 commits) PM: domains: Shrink locking area of the gpd_list_lock PM: sleep: Use ktime_us_delta() in initcall_debug_report() cpufreq: CPPC: Add support for frequency invariance arch_topology: Avoid use-after-free for scale_freq_data cpufreq: CPPC: Pass structure instance by reference cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init cpufreq: Remove ->resolve_freq() cpufreq: Reuse cpufreq_driver_resolve_freq() in __cpufreq_driver_target() cpufreq: Remove the ->stop_cpu() driver callback cpufreq: powernv: Migrate to ->exit() callback instead of ->stop_cpu() cpufreq: CPPC: Migrate to ->exit() callback instead of ->stop_cpu() cpufreq: intel_pstate: Combine ->stop_cpu() and ->offline() cpuidle: qcom: Add SPM register data for MSM8226 dt-bindings: arm: msm: Add SAW2 for MSM8226 dt-bindings: cpufreq: update cpu type and clock name for MT8173 SoC clk: mediatek: remove deprecated CLK_INFRA_CA57SEL for MT8173 SoC cpufreq: dt: Rename black/white-lists cpufreq: scmi: Fix an error message cpufreq: mediatek: add support for mt8365 dt-bindings: dvfs: Add support for generic performance domains ... commit c6e8c51f6978c7aa44641ea4e9071b42d921eb97 Merge: 9d69294be2a36 f1c74a6c07e76 Author: Linus Torvalds Date: Wed Jul 7 13:17:48 2021 -0700 Merge tag 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Battery/charger driver changes: - convert charger-manager binding to YAML - drop bd70528-charger driver - drop pm2301-charger driver - introduce rt5033-battery driver - misc improvements and fixes" * tag 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (42 commits) power: supply: ab8500: Fix an old bug power: supply: axp288_fuel_gauge: remove redundant continue statement power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic power: supply: axp288_fuel_gauge: Rename fuel_gauge_blacklist to no_battery_list power: supply: bq24190_charger: drop of_match_ptr() from device ID table drivers: power: add missing MODULE_DEVICE_TABLE in keystone-reset.c power: supply: ab8500: add missing MODULE_DEVICE_TABLE power: supply: charger-manager: add missing MODULE_DEVICE_TABLE power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLE power: supply: cpcap-charger: get the battery inserted infomation from cpcap-battery power: supply: cpcap-battery: invalidate config when incompatible measurements are read power: supply: axp20x_battery: allow disabling battery charging power: supply: max17040: drop unused platform data support power: supply: max17040: simplify POWER_SUPPLY_PROP_ONLINE power: supply: max17040: remove non-working POWER_SUPPLY_PROP_STATUS power: reset: at91-sama5d2_shdwc: Remove redundant error printing in at91_shdwc_probe() power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE power: supply: rt5033_battery: Fix device tree enumeration dt-bindings: power: supply: Add DT schema for richtek,rt5033-battery power: supply: Drop BD70528 support ... commit 9d69294be2a363a0128f4dc0316a7a4bb29ea91f Merge: 0cc2ea8cebe90 cf813c67d9619 Author: Linus Torvalds Date: Wed Jul 7 12:57:46 2021 -0700 Merge tag 'linux-watchdog-5.14-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Mstar MSC313e WDT driver - Add support for sama7g5-wdt - Add compatible for SC7280 SoC - Add compatible for Mediatek MT8195 - sbsa: Support architecture version 1 - Removal of the MV64x60 watchdog driver - Extra PCI IDs for hpwdt - Add hrtimer-based pretimeout feature - Add {min,max}_timeout sysfs nodes - keembay timeout and pre-timeout handling - Several fixes, cleanups and improvements * tag 'linux-watchdog-5.14-rc1' of git://www.linux-watchdog.org/linux-watchdog: (56 commits) watchdog: iTCO_wdt: use dev_err() instead of pr_err() watchdog: Add Mstar MSC313e WDT driver dt-bindings: watchdog: Add Mstar MSC313e WDT devicetree bindings documentation watchdog: iTCO_wdt: Account for rebooting on second timeout dt-bindings: watchdog: Convert arm,sbsa-gwdt to DT schema dt-bindings: watchdog: sama5d4-wdt: add compatible for sama7g5-wdt watchdog: sama5d4_wdt: add support for sama7g5-wdt dt-bindings: watchdog: sama5d4-wdt: convert to yaml watchdog: ziirave_wdt: Remove VERSION_FMT defines and add sysfs newlines dt-bindings: watchdog: Add compatible for Mediatek MT8195 dt-bindings: watchdog: dw-wdt: add description for rk3568 watchdog: imx_sc_wdt: fix pretimeout watchdog: diag288_wdt: Remove redundant assignment watchdog: Add hrtimer-based pretimeout feature dt-bindings: watchdog: Add compatible for SC7280 SoC watchdog: qcom: Move suspend/resume to suspend_late/resume_early watchdog: Fix a typo in the file orion_wdt.c watchdog: jz4740: Fix return value check in jz4740_wdt_probe() watchdog: Remove MV64x60 watchdog driver doc: mtk-wdt: support pre-timeout when the bark irq is available ... commit 0cc2ea8cebe909203f994e9113dc1f1b3907d03c Merge: a931dd33d3708 ab1016d39cc05 Author: Linus Torvalds Date: Wed Jul 7 12:50:08 2021 -0700 Merge tag 'nfsd-5.14' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: - add tracepoints for callbacks and for client creation and destruction - cache the mounts used for server-to-server copies - expose callback information in /proc/fs/nfsd/clients/*/info - don't hold locks unnecessarily while waiting for commits - update NLM to use xdr_stream, as we have for NFSv2/v3/v4 * tag 'nfsd-5.14' of git://linux-nfs.org/~bfields/linux: (69 commits) nfsd: fix NULL dereference in nfs3svc_encode_getaclres NFSD: Prevent a possible oops in the nfs_dirent() tracepoint nfsd: remove redundant assignment to pointer 'this' nfsd: Reduce contention for the nfsd_file nf_rwsem lockd: Update the NLMv4 SHARE results encoder to use struct xdr_stream lockd: Update the NLMv4 nlm_res results encoder to use struct xdr_stream lockd: Update the NLMv4 TEST results encoder to use struct xdr_stream lockd: Update the NLMv4 void results encoder to use struct xdr_stream lockd: Update the NLMv4 FREE_ALL arguments decoder to use struct xdr_stream lockd: Update the NLMv4 SHARE arguments decoder to use struct xdr_stream lockd: Update the NLMv4 SM_NOTIFY arguments decoder to use struct xdr_stream lockd: Update the NLMv4 nlm_res arguments decoder to use struct xdr_stream lockd: Update the NLMv4 UNLOCK arguments decoder to use struct xdr_stream lockd: Update the NLMv4 CANCEL arguments decoder to use struct xdr_stream lockd: Update the NLMv4 LOCK arguments decoder to use struct xdr_stream lockd: Update the NLMv4 TEST arguments decoder to use struct xdr_stream lockd: Update the NLMv4 void arguments decoder to use struct xdr_stream lockd: Update the NLMv1 SHARE results encoder to use struct xdr_stream lockd: Update the NLMv1 nlm_res results encoder to use struct xdr_stream lockd: Update the NLMv1 TEST results encoder to use struct xdr_stream ... commit bebedf2bb4a9e0cb4ffa72cbc960728051b338a4 Author: Colin Ian King Date: Tue Jul 6 16:11:32 2021 +0100 pwm: Remove redundant assignment to pointer pwm The pointer pwm is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko Signed-off-by: Thierry Reding commit c32aace0cf93383fde48c60ce0ae0c9073b6d360 Author: Pavel Begunkov Date: Wed Jul 7 19:24:24 2021 +0100 io_uring: fix drain alloc fail return code After a recent change io_drain_req() started to fail requests with result=0 in case of allocation failure, where it should be and have been -ENOMEM. Fixes: 76cc33d79175a ("io_uring: refactor io_req_defer()") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e068110ac4293e0c56cfc4d280d0f22b9303ec08.1625682153.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a931dd33d370896a683236bba67c0d6f3d01144d Merge: 1423e2660cf13 2c0f0f3639562 Author: Linus Torvalds Date: Wed Jul 7 11:41:32 2021 -0700 Merge tag 'modules-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module updates from Jessica Yu: - Fix incorrect logic in module_kallsyms_on_each_symbol() - Fix for a Coccinelle warning * tag 'modules-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: correctly exit module_kallsyms_on_each_symbol when fn() != 0 kernel/module: Use BUG_ON instead of if condition followed by BUG commit 166fdb4dd05f2e9f3b3d347682ab6d1b679b362d Merge: 7b167c4cb48ee 7718629432676 9249c32ec9197 392ed6a789803 Author: Rafael J. Wysocki Date: Wed Jul 7 20:18:11 2021 +0200 Merge branches 'acpi-misc', 'acpi-video' and 'acpi-prm' * acpi-misc: ACPI: AMBA: Fix resource name in /proc/iomem * acpi-video: ACPI: video: Add quirk for the Dell Vostro 3350 * acpi-prm: ACPI: Do not singal PRM support if not enabled ACPI: Correct \_SB._OSC bit definition for PRM ACPI: Kconfig: Provide help text for the ACPI_PRMT option commit 843372db2e3bf9694e98a1ff9d0da6dc3d53aab8 Merge: 5ddbecb497683 ad6b010d8129c 75674eb06a288 40ba55e40d0bd Author: Rafael J. Wysocki Date: Wed Jul 7 20:17:43 2021 +0200 Merge branches 'pm-cpuidle', 'pm-sleep' and 'pm-domains' * pm-cpuidle: cpuidle: qcom: Add SPM register data for MSM8226 dt-bindings: arm: msm: Add SAW2 for MSM8226 * pm-sleep: PM: sleep: Use ktime_us_delta() in initcall_debug_report() * pm-domains: PM: domains: Shrink locking area of the gpd_list_lock commit 1423e2660cf134a8f21f2451865a04792013e49e Merge: 4ea9031795671 93c2cdc975aab Author: Linus Torvalds Date: Wed Jul 7 11:12:01 2021 -0700 Merge tag 'x86-fpu-2021-07-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Thomas Gleixner: "Fixes and improvements for FPU handling on x86: - Prevent sigaltstack out of bounds writes. The kernel unconditionally writes the FPU state to the alternate stack without checking whether the stack is large enough to accomodate it. Check the alternate stack size before doing so and in case it's too small force a SIGSEGV instead of silently corrupting user space data. - MINSIGSTKZ and SIGSTKSZ are constants in signal.h and have never been updated despite the fact that the FPU state which is stored on the signal stack has grown over time which causes trouble in the field when AVX512 is available on a CPU. The kernel does not expose the minimum requirements for the alternate stack size depending on the available and enabled CPU features. ARM already added an aux vector AT_MINSIGSTKSZ for the same reason. Add it to x86 as well. - A major cleanup of the x86 FPU code. The recent discoveries of XSTATE related issues unearthed quite some inconsistencies, duplicated code and other issues. The fine granular overhaul addresses this, makes the code more robust and maintainable, which allows to integrate upcoming XSTATE related features in sane ways" * tag 'x86-fpu-2021-07-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (74 commits) x86/fpu/xstate: Clear xstate header in copy_xstate_to_uabi_buf() again x86/fpu/signal: Let xrstor handle the features to init x86/fpu/signal: Handle #PF in the direct restore path x86/fpu: Return proper error codes from user access functions x86/fpu/signal: Split out the direct restore code x86/fpu/signal: Sanitize copy_user_to_fpregs_zeroing() x86/fpu/signal: Sanitize the xstate check on sigframe x86/fpu/signal: Remove the legacy alignment check x86/fpu/signal: Move initial checks into fpu__restore_sig() x86/fpu: Mark init_fpstate __ro_after_init x86/pkru: Remove xstate fiddling from write_pkru() x86/fpu: Don't store PKRU in xstate in fpu_reset_fpstate() x86/fpu: Remove PKRU handling from switch_fpu_finish() x86/fpu: Mask PKRU from kernel XRSTOR[S] operations x86/fpu: Hook up PKRU into ptrace() x86/fpu: Add PKRU storage outside of task XSAVE buffer x86/fpu: Dont restore PKRU in fpregs_restore_userspace() x86/fpu: Rename xfeatures_mask_user() to xfeatures_mask_uabi() x86/fpu: Move FXSAVE_LEAK quirk info __copy_kernel_to_fpregs() x86/fpu: Rename __fpregs_load_activate() to fpregs_restore_userregs() ... commit 4ea90317956718e0648e1f87e56530db809a5a04 Merge: 383df634f1477 629a5d87e26fe Author: Linus Torvalds Date: Wed Jul 7 11:07:13 2021 -0700 Merge tag 'for-linus-5.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Only two minor patches this time: one cleanup patch and one patch refreshing a Xen header" * tag 'for-linus-5.14-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: sync include/xen/interface/io/ring.h with Xen's newest version xen: Use DEVICE_ATTR_*() macro commit 383df634f14778302879e41d985958070e8f2320 Merge: b5e6d1261e209 f1469e568bf6d Author: Linus Torvalds Date: Wed Jul 7 11:03:04 2021 -0700 Merge tag 'Wimplicit-fallthrough-clang-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull more fallthrough fixes from Gustavo Silva: "Fix maore fall-through warnings when building the kernel with clang and '-Wimplicit-fallthrough'" * tag 'Wimplicit-fallthrough-clang-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: Input: Fix fall-through warning for Clang scsi: aic94xx: Fix fall-through warning for Clang i3c: master: cdns: Fix fall-through warning for Clang net/mlx4: Fix fall-through warning for Clang commit b5e6d1261e2090df1325e762669c8eab6d4fb2fb Merge: d0fe3f47ef09b 234462bc7f230 Author: Linus Torvalds Date: Wed Jul 7 10:57:51 2021 -0700 Merge tag 'hwlock-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This adds a driver for the hardware spinlock in Allwinner sun6i" * tag 'hwlock-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: dt-bindings: hwlock: sun6i: Fix various warnings in binding hwspinlock: add sun6i hardware spinlock support dt-bindings: hwlock: add sun6i_hwspinlock commit d0fe3f47ef09bf5a74f7d20e129b2d15b4a824d0 Merge: 77d34a4683b05 aef6a521e5bf6 Author: Linus Torvalds Date: Wed Jul 7 10:50:03 2021 -0700 Merge tag 'rproc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds support for controlling the PRU and R5F clusters on the TI AM64x, the remote processor in i.MX7ULP, i.MX8MN/P and i.MX8ULP NXP and the audio, compute and modem remoteprocs in the Qualcomm SC8180x platform. It fixes improper ordering of cdev and device creation of the remoteproc control interface and it fixes resource leaks in the error handling path of rproc_add() and the Qualcomm modem and wifi remoteproc drivers. Lastly it fixes a few build warnings and replace the dummy parameter passed in the mailbox api of the stm32 driver to something not living on the stack" * tag 'rproc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (32 commits) remoteproc: qcom: pas: Add SC8180X adsp, cdsp and mpss dt-bindings: remoteproc: qcom: pas: Add SC8180X adsp, cdsp and mpss remoteproc: imx_rproc: support i.MX8ULP dt-bindings: remoteproc: imx_rproc: support i.MX8ULP remoteproc: stm32: fix mbox_send_message call remoteproc: core: Cleanup device in case of failure remoteproc: core: Fix cdev remove and rproc del remoteproc: core: Move validate before device add remoteproc: core: Move cdev add before device add remoteproc: pru: Add support for various PRU cores on K3 AM64x SoCs dt-bindings: remoteproc: pru: Update bindings for K3 AM64x SoCs remoteproc: qcom_wcnss: Use devm_qcom_smem_state_get() remoteproc: qcom_q6v5: Use devm_qcom_smem_state_get() to fix missing put() soc: qcom: smem_state: Add devm_qcom_smem_state_get() dt-bindings: remoteproc: qcom: pas: Fix indentation warnings remoteproc: imx-rproc: Fix IMX_REMOTEPROC configuration remoteproc: imx_rproc: support i.MX8MN/P remoteproc: imx_rproc: support i.MX7ULP remoteproc: imx_rproc: make clk optional remoteproc: imx_rproc: initial support for mutilple start/stop method ... commit 26c563731056c3ee66f91106c3078a8c36bb7a9e Author: Steven Rostedt (VMware) Date: Wed Jul 7 11:08:21 2021 -0400 tracing/histograms: Fix parsing of "sym-offset" modifier With the addition of simple mathematical operations (plus and minus), the parsing of the "sym-offset" modifier broke, as it took the '-' part of the "sym-offset" as a minus, and tried to break it up into a mathematical operation of "field.sym - offset", in which case it failed to parse (unless the event had a field called "offset"). Both .sym and .sym-offset modifiers should not be entered into mathematical calculations anyway. If ".sym-offset" is found in the modifier, then simply make it not an operation that can be calculated on. Link: https://lkml.kernel.org/r/20210707110821.188ae255@oasis.local.home Cc: Ingo Molnar Cc: Andrew Morton Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Daniel Bristot de Oliveira Cc: stable@vger.kernel.org Fixes: 100719dcef447 ("tracing: Add simple expression support to hist triggers") Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 2a780e8b64874ae5b4201a491799aef838da7bdd Author: Steve French Date: Tue Jul 6 21:42:08 2021 -0500 CIFS: Clarify SMB1 code for delete Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for SMB1 SetFileDisposition (which is used to unlink a file by setting the delete on close flag). This changeset doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711524 ("Out of bounds write") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit e3973ea3a7c218c1e92bdbfe1da934ef69d7a4ed Author: Steve French Date: Tue Jul 6 21:27:26 2021 -0500 CIFS: Clarify SMB1 code for SetFileSize Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for setting the file size using SMB1. This changeset doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711525 ("Out of bounds write") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 5616e895ecc56db8ba959e53638031a21353e0e2 Author: SanjayKumar Jeyakumar Date: Wed Jul 7 10:59:14 2021 +0530 tools/runqslower: Use __state instead of state Commit 2f064a59a11f ("sched: Change task_struct::state") renamed task->state to task->__state in task_struct. Fix runqslower to use the new name of the field. Fixes: 2f064a59a11f ("sched: Change task_struct::state") Signed-off-by: SanjayKumar Jeyakumar Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210707052914.21473-1-vjsanjay@gmail.com commit 7999d2555c9f879d006ea8469d74db9cdb038af0 Author: Alain Volmat Date: Wed Jul 7 10:27:00 2021 +0200 spi: stm32: fixes pm_runtime calls in probe/remove Add pm_runtime calls in probe/probe error path and remove in order to be consistent in all places in ordering and ensure that pm_runtime is disabled prior to resources used by the SPI controller. This patch also fixes the 2 following warnings on driver remove: WARNING: CPU: 0 PID: 743 at drivers/clk/clk.c:594 clk_core_disable_lock+0x18/0x24 WARNING: CPU: 0 PID: 743 at drivers/clk/clk.c:476 clk_unprepare+0x24/0x2c Fixes: 038ac869c9d2 ("spi: stm32: add runtime PM support") Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1625646426-5826-2-git-send-email-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit ea32af47f00a046a1f953370514d6d946efe0152 Author: Filipe Manana Date: Wed Jul 7 12:23:45 2021 +0100 btrfs: zoned: fix wrong mutex unlock on failure to allocate log root tree When syncing the log, if we fail to allocate the root node for the log root tree: 1) We are unlocking fs_info->tree_log_mutex, but at this point we have not yet locked this mutex; 2) We have locked fs_info->tree_root->log_mutex, but we end up not unlocking it; So fix this by unlocking fs_info->tree_root->log_mutex instead of fs_info->tree_log_mutex. Fixes: e75f9fd194090e ("btrfs: zoned: move log tree node allocation out of log_root_tree->log_mutex") CC: stable@vger.kernel.org # 5.13+ Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 9cc0b837e14ae913581ec1ea6e979a738f71b0fd Author: Johannes Thumshirn Date: Tue Jul 6 01:32:38 2021 +0900 btrfs: don't block if we can't acquire the reclaim lock If we can't acquire the reclaim_bgs_lock on block group reclaim, we block until it is free. This can potentially stall for a long time. While reclaim of block groups is necessary for a good user experience on a zoned file system, there still is no need to block as it is best effort only, just like when we're deleting unused block groups. CC: stable@vger.kernel.org # 5.13 Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit abb99cfdaf0759f8a619e5fecf52ccccdf310c8c Author: Naohiro Aota Date: Mon Jun 28 17:57:28 2021 +0900 btrfs: properly split extent_map for REQ_OP_ZONE_APPEND Damien reported a test failure with btrfs/209. The test itself ran fine, but the fsck ran afterwards reported a corrupted filesystem. The filesystem corruption happens because we're splitting an extent and then writing the extent twice. We have to split the extent though, because we're creating too large extents for a REQ_OP_ZONE_APPEND operation. When dumping the extent tree, we can see two EXTENT_ITEMs at the same start address but different lengths. $ btrfs inspect dump-tree /dev/nullb1 -t extent ... item 19 key (269484032 EXTENT_ITEM 126976) itemoff 15470 itemsize 53 refs 1 gen 7 flags DATA extent data backref root FS_TREE objectid 257 offset 786432 count 1 item 20 key (269484032 EXTENT_ITEM 262144) itemoff 15417 itemsize 53 refs 1 gen 7 flags DATA extent data backref root FS_TREE objectid 257 offset 786432 count 1 The duplicated EXTENT_ITEMs originally come from wrongly split extent_map in extract_ordered_extent(). Since extract_ordered_extent() uses create_io_em() to split an existing extent_map, we will have split->orig_start != split->start. Then, it will be logged with non-zero "extent data offset". Finally, the logged entries are replayed into a duplicated EXTENT_ITEM. Introduce and use proper splitting function for extent_map. The function is intended to be simple and specific usage for extract_ordered_extent() e.g. not supporting compression case (we do not allow splitting compressed extent_map anyway). There was a question raised by Qu, in summary why we want to split the extent map (and not the bio): The problem is not the limit on the zone end, which as you mention is the same as the block group end. The problem is that data write use zone append (ZA) operations. ZA BIOs cannot be split so a large extent may need to be processed with multiple ZA BIOs, While that is also true for regular writes, the major difference is that ZA are "nameless" write operation giving back the written sectors on completion. And ZA operations may be reordered by the block layer (not intentionally though). Combine both of these characteristics and you can see that the data for a large extent may end up being shuffled when written resulting in data corruption and the impossibility to map the extent to some start sector. To avoid this problem, zoned btrfs uses the principle "one data extent == one ZA BIO". So large extents need to be split. This is unfortunate, but we can revisit this later and optimize, e.g. merge back together the fragments of an extent once written if they actually were written sequentially in the zone. Reported-by: Damien Le Moal Fixes: d22002fd37bd ("btrfs: zoned: split ordered extent when bio is sent") CC: stable@vger.kernel.org # 5.12+ CC: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit 79bd37120b149532af5b21953643ed74af69654f Author: Filipe Manana Date: Tue Jun 29 14:43:06 2021 +0100 btrfs: rework chunk allocation to avoid exhaustion of the system chunk array Commit eafa4fd0ad0607 ("btrfs: fix exhaustion of the system chunk array due to concurrent allocations") fixed a problem that resulted in exhausting the system chunk array in the superblock when there are many tasks allocating chunks in parallel. Basically too many tasks enter the first phase of chunk allocation without previous tasks having finished their second phase of allocation, resulting in too many system chunks being allocated. That was originally observed when running the fallocate tests of stress-ng on a PowerPC machine, using a node size of 64K. However that commit also introduced a deadlock where a task in phase 1 of the chunk allocation waited for another task that had allocated a system chunk to finish its phase 2, but that other task was waiting on an extent buffer lock held by the first task, therefore resulting in both tasks not making any progress. That change was later reverted by a patch with the subject "btrfs: fix deadlock with concurrent chunk allocations involving system chunks", since there is no simple and short solution to address it and the deadlock is relatively easy to trigger on zoned filesystems, while the system chunk array exhaustion is not so common. This change reworks the chunk allocation to avoid the system chunk array exhaustion. It accomplishes that by making the first phase of chunk allocation do the updates of the device items in the chunk btree and the insertion of the new chunk item in the chunk btree. This is done while under the protection of the chunk mutex (fs_info->chunk_mutex), in the same critical section that checks for available system space, allocates a new system chunk if needed and reserves system chunk space. This way we do not have chunk space reserved until the second phase completes. The same logic is applied to chunk removal as well, since it keeps reserved system space long after it is done updating the chunk btree. For direct allocation of system chunks, the previous behaviour remains, because otherwise we would deadlock on extent buffers of the chunk btree. Changes to the chunk btree are by large done by chunk allocation and chunk removal, which first reserve chunk system space and then later do changes to the chunk btree. The other remaining cases are uncommon and correspond to adding a device, removing a device and resizing a device. All these other cases do not pre-reserve system space, they modify the chunk btree right away, so they don't hold reserved space for a long period like chunk allocation and chunk removal do. The diff of this change is huge, but more than half of it is just addition of comments describing both how things work regarding chunk allocation and removal, including both the new behavior and the parts of the old behavior that did not change. CC: stable@vger.kernel.org # 5.12+ Tested-by: Shin'ichiro Kawasaki Tested-by: Naohiro Aota Signed-off-by: Filipe Manana Tested-by: David Sterba Signed-off-by: David Sterba commit 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 Author: Filipe Manana Date: Tue Jun 29 14:43:05 2021 +0100 btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respective block group, it waits for that other task to finish creating the block group. This is to avoid exhaustion of the system chunk array in the superblock, which is limited, when we have a thundering herd of tasks allocating new chunks. This problem was described and fixed by commit eafa4fd0ad0607 ("btrfs: fix exhaustion of the system chunk array due to concurrent allocations"). However there are two very similar scenarios where this can lead to a deadlock: 1) Task B allocated a new system chunk and task A is waiting on task B to finish creation of the respective system block group. However before task B ends its transaction handle and finishes the creation of the system block group, it attempts to allocate another chunk (like a data chunk for an fallocate operation for a very large range). Task B will be unable to progress and allocate the new chunk, because task A set space_info->chunk_alloc to 1 and therefore it loops at btrfs_chunk_alloc() waiting for task A to finish its chunk allocation and set space_info->chunk_alloc to 0, but task A is waiting on task B to finish creation of the new system block group, therefore resulting in a deadlock; 2) Task B allocated a new system chunk and task A is waiting on task B to finish creation of the respective system block group. By the time that task B enter the final phase of block group allocation, which happens at btrfs_create_pending_block_groups(), when it modifies the extent tree, the device tree or the chunk tree to insert the items for some new block group, it needs to allocate a new chunk, so it ends up at btrfs_chunk_alloc() and keeps looping there because task A has set space_info->chunk_alloc to 1, but task A is waiting for task B to finish creation of the new system block group and release the reserved system space, therefore resulting in a deadlock. In short, the problem is if a task B needs to allocate a new chunk after it previously allocated a new system chunk and if another task A is currently waiting for task B to complete the allocation of the new system chunk. Unfortunately this deadlock scenario introduced by the previous fix for the system chunk array exhaustion problem does not have a simple and short fix, and requires a big change to rework the chunk allocation code so that chunk btree updates are all made in the first phase of chunk allocation. And since this deadlock regression is being frequently hit on zoned filesystems and the system chunk array exhaustion problem is triggered in more extreme cases (originally observed on PowerPC with a node size of 64K when running the fallocate tests from stress-ng), revert the changes from that commit. The next patch in the series, with a subject of "btrfs: rework chunk allocation to avoid exhaustion of the system chunk array" does the necessary changes to fix the system chunk array exhaustion problem. Reported-by: Naohiro Aota Link: https://lore.kernel.org/linux-btrfs/20210621015922.ewgbffxuawia7liz@naota-xeon/ Fixes: eafa4fd0ad0607 ("btrfs: fix exhaustion of the system chunk array due to concurrent allocations") CC: stable@vger.kernel.org # 5.12+ Tested-by: Shin'ichiro Kawasaki Tested-by: Naohiro Aota Signed-off-by: Filipe Manana Tested-by: David Sterba Signed-off-by: David Sterba commit 5f93e776c6734cea989aeb4f2d6c97e521baa683 Author: Johannes Thumshirn Date: Tue Jun 29 03:16:46 2021 +0900 btrfs: zoned: print unusable percentage when reclaiming block groups When we're automatically reclaiming a zone, because its zone_unusable value is above the reclaim threshold, we're only logging how much percent of the zone's capacity are used, but not how much of the capacity is unusable. Also print the percentage of the unusable space in the block group before we're reclaiming it. Example: BTRFS info (device sdg): reclaiming chunk 230686720 with 13% used 86% unusable CC: stable@vger.kernel.org # 5.13 Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 54afaae34ee49e98c1c902b444b42832551d090c Author: David Sterba Date: Wed Jun 23 17:54:54 2021 +0200 btrfs: zoned: fix types for u64 division in btrfs_reclaim_bgs_work The types in calculation of the used percentage in the reclaiming messages are both u64, though bg->length is either 1GiB (non-zoned) or the zone size in the zoned mode. The upper limit on zone size is 8GiB so this could theoretically overflow in the future, right now the values fit. Fixes: 18bb8bbf13c1 ("btrfs: zoned: automatically reclaim zones") CC: stable@vger.kernel.org # 5.13 Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit d322957ebfb9c21c2c72b66680f7c3ccd724e081 Author: Duncan Roe Date: Wed Jul 7 10:57:51 2021 +1000 netfilter: uapi: refer to nfnetlink_conntrack.h, not nf_conntrack_netlink.h nf_conntrack_netlink.h does not exist, refer to nfnetlink_conntrack.h instead. Signed-off-by: Duncan Roe Signed-off-by: Pablo Neira Ayuso commit a731763fc479a9c64456e0643d0ccf64203100c9 Author: Yu Kuai Date: Wed Jul 7 09:56:49 2021 +0800 blk-cgroup: prevent rcu_sched detected stalls warnings while iterating blkgs We run a test that create millions of cgroups and blkgs, and then trigger blkg_destroy_all(). blkg_destroy_all() will hold spin lock for a long time in such situation. Thus release the lock when a batch of blkgs are destroyed. blkcg_activate_policy() and blkcg_deactivate_policy() might have the same problem, however, as they are basically only called from module init/exit paths, let's leave them alone for now. Signed-off-by: Yu Kuai Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20210707015649.1929797-1-yukuai3@huawei.com Signed-off-by: Jens Axboe commit 307cc9baac5c07b23da78d75c3d4755e9cffab26 Author: Takashi Iwai Date: Wed Jul 7 13:24:47 2021 +0200 ALSA: usb-audio: Reduce latency at playback start, take#2 This is another attempt for the reduction of the latency at the start of a USB audio playback stream. The first attempt in the commit 9ce650a75a3b caused an unexpected regression (a deadlock with pipewire usage) and was later reverted by the commit 4b820e167bf6. The devils are always living in details, of course; the cause of the deadlock was the call of snd_pcm_period_elapsed() inside prepare_playback_urb() callback. In the original code, this callback is never called from the stream lock context as it's driven solely from the URB complete callback. Along with the movement of the URB submission into the trigger START, this prepare call may be also executed in the stream lock context, hence it deadlocked with the another lock in snd_pcm_period_elapsed(). (Note that this happens only conditionally with a small period size that matches with the URB buffer length, which was a reason I overlooked during my tests. Also, the problem wasn't seen in the capture stream because the capture stream handles the period-elapsed only at retire callback that isn't executed at the trigger.) If it were only about avoiding the deadlock, it'd be possible to use snd_pcm_period_elapsed_under_stream_lock() as a solution. However, in general, the period elapsed notification must be sent after the actual stream start, and replacing the call wouldn't satisfy the pattern. A better option is to delay the notification after the stream start procedure finished, instead. In the case of USB framework, one of the fitting place would be the complete callback of the first URB. So, as a workaround of the deadlock and the order fixes above, in addition to the re-applying the changes in the commit 9ce650a75a3, this patch introduces a new flag indicating the delayed period-elapsed handling and sets it under the possible deadlock condition (i.e. prepare callback being called before subs->running is set). Once when the flag is set, the period-elapsed call is handled at a later URB complete call instead. As a reference for the original motivation for the low-latency change, I cite here again: | USB-audio driver behaves a bit strangely for the playback stream -- | namely, it starts sending silent packets at PCM prepare state while | the actual data is submitted at first when the trigger START is | kicked off. This is a workaround for the behavior where URBs are | processed too quickly at the beginning. That is, if we start | submitting URBs at trigger START, the first few URBs will be | immediately completed, and this would result in the immediate | period-elapsed calls right after the start, which may confuse | applications. | | OTOH, submitting the data after silent URBs would, of course, result | in a certain delay of the actual data processing, and this is rather | more serious problem on modern systems, in practice. | | This patch tries to revert the workaround and lets the URB | submission starting at PCM trigger for the playback again. As far | as I've tested with various backends (native ALSA, PA, JACK, PW), I | haven't seen any problems (famous last words :) | | Note that the capture stream handling needs no such workaround, | since the capture is driven per received URB. Link: https://lore.kernel.org/r/4e71531f-4535-fd46-040e-506a3c256bbd@marcan.st Link: https://lore.kernel.org/r/s5hbl7li0fe.wl-tiwai@suse.de Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210707112447.27485-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit e9faf53c5a5d01f6f2a09ae28ec63a3bbd6f64fd Author: Dongliang Mu Date: Mon Jul 5 21:13:20 2021 +0800 ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE, MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID and MAC802154_HWSIM_EDGE_ATTR_LQI must be present to fix GPF. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Dongliang Mu Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210705131321.217111-1-mudongliangabcd@gmail.com Signed-off-by: Stefan Schmidt commit 3d970601dacaefc025a2d690dfd63f56b1bdde0b Author: Jiri Olsa Date: Tue Jul 6 17:16:58 2021 +0200 libperf: Change tests to single static and shared binaries Make tests to be two binaries 'tests_static' and 'tests_shared', so the maintenance is easier. Adding tests under libperf build system, so we define all the flags just once. Adding make-tests tule to just compile tests without running them. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shunsuke Nakamura Link: http://lore.kernel.org/lkml/20210706151704.73662-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b4b046ff9e3410593db7b35326cf696810af8f4f Author: Adrian Hunter Date: Thu Jul 1 20:51:32 2021 +0300 perf intel-pt: Add a config for max loops without consuming a packet The Intel PT decoder limits the number of unconditional branches (e.g. jmps) decoded without consuming any trace packets. Generally, a loop needs a conditional branch which generates a TNT packet, whereas a "ret" instruction will generate a TIP or TNT packet. So exceeding the limit is assumed to be a never-ending loop, which can happen if there has been a decoding error putting the decoder at the wrong place in the code. Up until now, the limit of 10000 has been enough but some analytic purposes have been reported to exceed that. Increase the limit to 100000, and make it configurable via perf config intel-pt.max-loops. Also amend the "Never-ending loop" message to mention the configuration entry. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20210701175132.3977-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 493be70ac3cdf016d3b608a6c3c0048242a68925 Author: Jin Yao Date: Thu Jun 10 11:45:57 2021 +0800 perf stat: Disable the NMI watchdog message on hybrid If we run a single workload that only runs on big core, there is always a ugly message about disabling the NMI watchdog because the atom is not counted. Before: # ./perf stat true Performance counter stats for 'true': 0.43 msec task-clock # 0.396 CPUs utilized 0 context-switches # 0.000 /sec 0 cpu-migrations # 0.000 /sec 45 page-faults # 103.918 K/sec 639,634 cpu_core/cycles/ # 1.477 G/sec cpu_atom/cycles/ (0.00%) 643,498 cpu_core/instructions/ # 1.486 G/sec cpu_atom/instructions/ (0.00%) 123,715 cpu_core/branches/ # 285.694 M/sec cpu_atom/branches/ (0.00%) 4,094 cpu_core/branch-misses/ # 9.454 M/sec cpu_atom/branch-misses/ (0.00%) 0.001092407 seconds time elapsed 0.001144000 seconds user 0.000000000 seconds sys Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog # ./perf stat -e '{cpu_atom/cycles/,msr/tsc/}' true Performance counter stats for 'true': cpu_atom/cycles/ (0.00%) msr/tsc/ (0.00%) 0.001904106 seconds time elapsed 0.001947000 seconds user 0.000000000 seconds sys Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog The events in group usually have to be from the same PMU. Try reorganizing the group. Now we disable the NMI watchdog message on hybrid, otherwise there are too many false positives. After: # ./perf stat true Performance counter stats for 'true': 0.79 msec task-clock # 0.419 CPUs utilized 0 context-switches # 0.000 /sec 0 cpu-migrations # 0.000 /sec 48 page-faults # 60.889 K/sec 777,692 cpu_core/cycles/ # 986.519 M/sec cpu_atom/cycles/ (0.00%) 669,147 cpu_core/instructions/ # 848.828 M/sec cpu_atom/instructions/ (0.00%) 128,635 cpu_core/branches/ # 163.176 M/sec cpu_atom/branches/ (0.00%) 4,089 cpu_core/branch-misses/ # 5.187 M/sec cpu_atom/branch-misses/ (0.00%) 0.001880649 seconds time elapsed 0.001935000 seconds user 0.000000000 seconds sys # ./perf stat -e '{cpu_atom/cycles/,msr/tsc/}' true Performance counter stats for 'true': cpu_atom/cycles/ (0.00%) msr/tsc/ (0.00%) 0.000963319 seconds time elapsed 0.000999000 seconds user 0.000000000 seconds sys Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210610034557.29766-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a3cbcadfdfc330c28a45f06e8f92fd1d59aafa19 Author: Kajol Jain Date: Mon Jun 28 12:19:35 2021 +0530 perf vendor events power10: Adds 24x7 nest metric events for power10 platform Patch adds 24x7 nest metric events for POWER10. Signed-off-by: Kajol Jain Tested-by: Nageswara R Sastry Cc: Athira Jajeev Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Paul Clarke Cc: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/lkml/20210628064935.163465-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit dea8cfcc33695f70f56023b416cf88ae44c8a45a Author: Kajol Jain Date: Mon Jun 28 11:53:41 2021 +0530 perf script python: Fix buffer size to report iregs in perf script Commit 48a1f565261d2ab1 ("perf script python: Add more PMU fields to event handler dict") added functionality to report fields like weight, iregs, uregs etc via perf report. That commit predefined buffer size to 512 bytes to print those fields. But in PowerPC, since we added extended regs support in: 068aeea3773a6f4c ("perf powerpc: Support exposing Performance Monitor Counter SPRs as part of extended regs") d735599a069f6936 ("powerpc/perf: Add extended regs support for power10 platform") Now iregs can carry more bytes of data and this predefined buffer size can result to data loss in perf script output. This patch resolves this issue by making the buffer size dynamic, based on the number of registers needed to print. It also changes the regs_map() return type from int to void, as it is not being used by the set_regs_in_dict(), its only caller. Fixes: 068aeea3773a6f4c ("perf powerpc: Support exposing Performance Monitor Counter SPRs as part of extended regs") Signed-off-by: Kajol Jain Tested-by: Nageswara R Sastry Cc: Athira Jajeev Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Paul Clarke Cc: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/lkml/20210628062341.155839-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit e63cbfa3bedb4495029a91b924bf910867416aa2 Author: Justin M. Forbes Date: Tue Jul 6 13:59:51 2021 -0500 perf trace: Fix the perf trace link location The install perf_dlfilter.h patch included what seems to be a typo in the Makefile.perf, which changed the location of the trace link from '$(DESTDIR_SQ)$(bindir_SQ)/trace' to '$(DESTDIR_SQ)$(dir_SQ)/trace'. This reverts it back to the correct location. Fixes: 0beb218315e06e88 ("perf build: Install perf_dlfilter.h") Signed-off-by: Justin M. Forbes Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Justin M. Forbes Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210706185952.116121-1-jforbes@fedoraproject.org Signed-off-by: Arnaldo Carvalho de Melo commit 83952286f26837161f7b4238a73c00f64fb46e96 Author: Riccardo Mancini Date: Tue Jun 22 00:21:08 2021 +0200 perf top: Fix overflow in elf_sec__is_text() ASan reports a heap-buffer-overflow in elf_sec__is_text when using perf-top. The bug is caused by the fact that secstrs is built from runtime_ss, while shdr is built from syms_ss if shdr.sh_type != SHT_NOBITS. Therefore, they point to two different ELF files. This patch renames secstrs to secstrs_run and adds secstrs_sym, so that the correct secstrs is chosen depending on shdr.sh_type. $ ASAN_OPTIONS=abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 ./perf top ================================================================= ==363148==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61300009add6 at pc 0x00000049875c bp 0x7f4f56446440 sp 0x7f4f56445bf0 READ of size 1 at 0x61300009add6 thread T6 #0 0x49875b in StrstrCheck(void*, char*, char const*, char const*) (/home/user/linux/tools/perf/perf+0x49875b) #1 0x4d13a2 in strstr (/home/user/linux/tools/perf/perf+0x4d13a2) #2 0xacae36 in elf_sec__is_text /home/user/linux/tools/perf/util/symbol-elf.c:176:9 #3 0xac3ec9 in elf_sec__filter /home/user/linux/tools/perf/util/symbol-elf.c:187:9 #4 0xac2c3d in dso__load_sym /home/user/linux/tools/perf/util/symbol-elf.c:1254:20 #5 0x883981 in dso__load /home/user/linux/tools/perf/util/symbol.c:1897:9 #6 0x8e6248 in map__load /home/user/linux/tools/perf/util/map.c:332:7 #7 0x8e66e5 in map__find_symbol /home/user/linux/tools/perf/util/map.c:366:6 #8 0x7f8278 in machine__resolve /home/user/linux/tools/perf/util/event.c:707:13 #9 0x5f3d1a in perf_event__process_sample /home/user/linux/tools/perf/builtin-top.c:773:6 #10 0x5f30e4 in deliver_event /home/user/linux/tools/perf/builtin-top.c:1197:3 #11 0x908a72 in do_flush /home/user/linux/tools/perf/util/ordered-events.c:244:9 #12 0x905fae in __ordered_events__flush /home/user/linux/tools/perf/util/ordered-events.c:323:8 #13 0x9058db in ordered_events__flush /home/user/linux/tools/perf/util/ordered-events.c:341:9 #14 0x5f19b1 in process_thread /home/user/linux/tools/perf/builtin-top.c:1109:7 #15 0x7f4f6a21a298 in start_thread /usr/src/debug/glibc-2.33-16.fc34.x86_64/nptl/pthread_create.c:481:8 #16 0x7f4f697d0352 in clone ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 0x61300009add6 is located 10 bytes to the right of 332-byte region [0x61300009ac80,0x61300009adcc) allocated by thread T6 here: #0 0x4f3f7f in malloc (/home/user/linux/tools/perf/perf+0x4f3f7f) #1 0x7f4f6a0a88d9 (/lib64/libelf.so.1+0xa8d9) Thread T6 created by T0 here: #0 0x464856 in pthread_create (/home/user/linux/tools/perf/perf+0x464856) #1 0x5f06e0 in __cmd_top /home/user/linux/tools/perf/builtin-top.c:1309:6 #2 0x5ef19f in cmd_top /home/user/linux/tools/perf/builtin-top.c:1762:11 #3 0x7b28c0 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #4 0x7b119f in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #5 0x7b2423 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #6 0x7b0c19 in main /home/user/linux/tools/perf/perf.c:539:3 #7 0x7f4f696f7b74 in __libc_start_main /usr/src/debug/glibc-2.33-16.fc34.x86_64/csu/../csu/libc-start.c:332:16 SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/user/linux/tools/perf/perf+0x49875b) in StrstrCheck(void*, char*, char const*, char const*) Shadow bytes around the buggy address: 0x0c268000b560: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c268000b570: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c268000b580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c268000b590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c268000b5a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c268000b5b0: 00 00 00 00 00 00 00 00 00 04[fa]fa fa fa fa fa 0x0c268000b5c0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c268000b5d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c268000b5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c268000b5f0: 07 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c268000b600: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==363148==ABORTING Suggested-by: Jiri Slaby Signed-off-by: Riccardo Mancini Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Fabian Hemmer Cc: Ian Rogers Cc: Jiri Olsa Cc: Jiri Slaby Cc: Mark Rutland Cc: Peter Zijlstra Cc: Remi Bernon Link: http://lore.kernel.org/lkml/20210621222108.196219-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 5a4451e4d562d5c3d24e6ff75c75a29832f273f6 Author: Riccardo Mancini Date: Mon Jul 5 18:15:25 2021 +0200 perf annotate: Fix 's' on source line when disasm is empty If the disasm is empty, 's' should fail. Instead it seemingly works, hiding the empty lines and causing an assertion error on the next time annotate is called (from within perf report). The problem is caused by a buffer overflow, caused by a wrong exit condition in annotate_browser__find_next_asm_line, which checks browser->b.top instead of browser->b.entries. This patch fixes the issue, making annotate_browser__toggle_source fail if the disasm is empty (nothing happens to the user). Fixes: 6de249d66d2e7881 ("perf annotate: Allow 's' on source code lines") Signed-off-by: Riccardo Mancini Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210705161524.72953-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit d5882a92ea7974edb83a0cf6bbe35c31263464ac Author: Masami Hiramatsu Date: Sun Jul 4 00:35:34 2021 +0900 perf probe: Do not show @plt function by default Fix the perf-probe --functions option do not show the PLT stub symbols (*@plt) by default. ----- $ ./perf probe -x /usr/lib64/libc-2.33.so -F | head a64l abort abs accept accept4 access acct addmntent addseverity adjtime ----- Reported-by: Thomas Richter Signed-off-by: Masami Hiramatsu Acked-by: Thomas Richter Tested-by: Arnaldo Carvalho de Melo Cc: Heiko Carstens Cc: Masami Hiramatsu Cc: Stefan Liebler Cc: Sven Schnelle Link: http://lore.kernel.org/lkml/162532653450.393143.12621329879630677469.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 87704345cc602a845be713abdc679d65dc600431 Author: Masami Hiramatsu Date: Sun Jul 4 00:35:27 2021 +0900 perf symbol-elf: Decode dynsym even if symtab exists In Fedora34, libc-2.33.so has both .dynsym and .symtab sections and most of (not all) symbols moved to .dynsym. In this case, perf only decode the symbols in .symtab, and perf probe can not list up the functions in the library. To fix this issue, decode both .symtab and .dynsym sections. Without this fix, ----- $ ./perf probe -x /usr/lib64/libc-2.33.so -F @plt @plt calloc@plt free@plt malloc@plt memalign@plt realloc@plt ----- With this fix. ----- $ ./perf probe -x /usr/lib64/libc-2.33.so -F @plt @plt a64l abort abs accept accept4 access acct addmntent ----- Reported-by: Thomas Richter Signed-off-by: Masami Hiramatsu Acked-by: Thomas Richter Cc: Heiko Carstens Cc: Stefan Liebler Cc: Sven Schnelle Link: http://lore.kernel.org/lkml/162532652681.393143.10163733179955267999.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit eb4717f733b5941a29ea4e0aec3227a0e0770487 Author: Masami Hiramatsu Date: Sun Jul 4 00:35:18 2021 +0900 perf probe: Fix debuginfo__new() to enable build-id based debuginfo Fix debuginfo__new() to set the build-id to dso before dso__read_binary_type_filename() so that it can find DSO_BINARY_TYPE__BUILDID_DEBUGINFO debuginfo correctly. However, this may not change the result, because elfutils (libdwfl) has its own debuginfo finder. With/without this patch, the perf probe correctly find the debuginfo file. This is just a failsafe and keep code's sanity (if you use dso__read_binary_type_filename(), you must set the build-id to the dso.) Reported-by: Thomas Richter Acked-by: Thomas Richter Signed-off-by: Masami Hiramatsu Cc: Heiko Carstens Cc: Stefan Liebler Cc: Sven Schnelle Link: http://lore.kernel.org/lkml/162532651863.393143.11692691321219235810.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit d80c228d44640f0b47b57a2ca4afa26ef87e16b0 Author: Chunguang Xu Date: Tue Jul 6 05:47:26 2021 +0800 block: fix the problem of io_ticks becoming smaller On the IO submission path, blk_account_io_start() may interrupt the system interruption. When the interruption returns, the value of part->stamp may have been updated by other cores, so the time value collected before the interruption may be less than part-> stamp. So when this happens, we should do nothing to make io_ticks more accurate? For kernels less than 5.0, this may cause io_ticks to become smaller, which in turn may cause abnormal ioutil values. Signed-off-by: Chunguang Xu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/1625521646-1069-1-git-send-email-brookxu.cn@gmail.com Signed-off-by: Jens Axboe commit c6af8db92b9a9bc89e3d25535fdc26cb61f419d0 Merge: 585af8ede7035 0755d3be2d9bb Author: Jens Axboe Date: Wed Jul 7 06:37:36 2021 -0600 Merge branch 'nvme-5.14' of git://git.infradead.org/nvme into block-5.14 Pull single NVMe fix from Christoph. * 'nvme-5.14' of git://git.infradead.org/nvme: nvme-tcp: can't set sk_user_data without write_lock commit 31028cbed26a8afa25533a10425ffa2ab794c76c Author: Zhen Lei Date: Wed Jul 7 15:40:51 2021 +0800 ALSA: isa: Fix error return code in snd_cmi8330_probe() When 'SB_HW_16' check fails, the error code -ENODEV instead of 0 should be returned, which is the same as that returned when 'WSS_HW_CMI8330' check fails. Fixes: 43bcd973d6d0 ("[ALSA] Add snd_card_set_generic_dev() call to ISA drivers") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210707074051.2663-1-thunder.leizhen@huawei.com Signed-off-by: Takashi Iwai commit 135cbd378eab336da15de9c84bbb22bf743b38a5 Author: Marek Vasut Date: Sat Jul 3 04:23:00 2021 +0200 spi: imx: mx51-ecspi: Reinstate low-speed CONFIGREG delay Since 00b80ac935539 ("spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook."), the MX51_ECSPI_CONFIG write no longer happens in prepare_transfer hook, but rather in prepare_message hook, however the MX51_ECSPI_CONFIG delay is still left in prepare_transfer hook and thus has no effect. This leads to low bus frequency operation problems described in 6fd8b8503a0dc ("spi: spi-imx: Fix out-of-order CS/SCLK operation at low speeds") again. Move the MX51_ECSPI_CONFIG write delay into the prepare_message hook as well, thus reinstating the low bus frequency fix. Fixes: 00b80ac935539 ("spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.") Signed-off-by: Marek Vasut Cc: Uwe Kleine-König Cc: Mark Brown Link: https://lore.kernel.org/r/20210703022300.296114-1-marex@denx.de Signed-off-by: Mark Brown commit ea986908ccfcc53204a03bb0841227e1b26578c4 Author: Axel Lin Date: Fri Jul 2 22:21:40 2021 +0800 regulator: mtk-dvfsrc: Fix wrong dev pointer for devm_regulator_register If use dev->parent, the regulator_unregister will not be called when this driver is unloaded. Fix it by using dev instead. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210702142140.2678130-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit c9cd752d8f3a6b13afc5332a60bea3e68f141738 Author: Ulf Hansson Date: Mon Jul 5 15:34:41 2021 +0200 regulator: fixed: Mark regulator-fixed-domain as deprecated A power domain should not be modelled as a regulator, not even for the simplest case as recent discussions have concluded around the existing regulator-fixed-domain DT binding. Fortunately, there is only one user of the binding that was recently added. Therefore, let's mark the binding as deprecated to prevent it from being further used. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20210705133441.11344-1-ulf.hansson@linaro.org Signed-off-by: Mark Brown commit 7e1088760cfe0bb1fdb1f0bd155bfd52f080683a Author: Mark Rutland Date: Wed Jul 7 09:30:32 2021 +0100 locking/atomic: sparc: Fix arch_cmpxchg64_local() Anatoly reports that since commit: ff5b4f1ed580c59d ("locking/atomic: sparc: move to ARCH_ATOMIC") ... it's possible to reliably trigger an oops by running: stress-ng -v --mmap 1 -t 30s ... which results in a NULL pointer dereference in __split_huge_pmd_locked(). The underlying problem is that commit ff5b4f1ed580c59d left arch_cmpxchg64_local() defined in terms of cmpxchg_local() rather than arch_cmpxchg_local(). In we wrap these with macros which use identically-named variables. When cmpxchg_local() nests inside cmpxchg64_local(), this casues it to use an unitialized variable as the pointer, which can be NULL. This can also be seen in pmdp_establish(), where the compiler can generate the pointer with a `clr` instruction: 0000000000000360 : 360: 9d e3 bf 50 save %sp, -176, %sp 364: fa 5e 80 00 ldx [ %i2 ], %i5 368: 82 10 00 1b mov %i3, %g1 36c: 84 10 20 00 clr %g2 370: c3 f0 90 1d casx [ %g2 ], %i5, %g1 374: 80 a7 40 01 cmp %i5, %g1 378: 32 6f ff fc bne,a %xcc, 368 37c: fa 5e 80 00 ldx [ %i2 ], %i5 380: d0 5e 20 40 ldx [ %i0 + 0x40 ], %o0 384: 96 10 00 1b mov %i3, %o3 388: 94 10 00 1d mov %i5, %o2 38c: 92 10 00 19 mov %i1, %o1 390: 7f ff ff 84 call 1a0 <__set_pmd_acct> 394: b0 10 00 1d mov %i5, %i0 398: 81 cf e0 08 return %i7 + 8 39c: 01 00 00 00 nop This patch fixes the problem by defining arch_cmpxchg64_local() in terms of arch_cmpxchg_local(), avoiding potential shadowing, and resulting in working cmpxchg64_local() and variants, e.g. 0000000000000360 : 360: 9d e3 bf 50 save %sp, -176, %sp 364: fa 5e 80 00 ldx [ %i2 ], %i5 368: 82 10 00 1b mov %i3, %g1 36c: c3 f6 90 1d casx [ %i2 ], %i5, %g1 370: 80 a7 40 01 cmp %i5, %g1 374: 32 6f ff fd bne,a %xcc, 368 378: fa 5e 80 00 ldx [ %i2 ], %i5 37c: d0 5e 20 40 ldx [ %i0 + 0x40 ], %o0 380: 96 10 00 1b mov %i3, %o3 384: 94 10 00 1d mov %i5, %o2 388: 92 10 00 19 mov %i1, %o1 38c: 7f ff ff 85 call 1a0 <__set_pmd_acct> 390: b0 10 00 1d mov %i5, %i0 394: 81 cf e0 08 return %i7 + 8 398: 01 00 00 00 nop 39c: 01 00 00 00 nop Fixes: ff5b4f1ed580c59d ("locking/atomic: sparc: move to ARCH_ATOMIC") Reported-by: Anatoly Pugachev Signed-off-by: Mark Rutland Signed-off-by: Ingo Molnar Tested-by: Anatoly Pugachev Link: https://lore.kernel.org/r/20210707083032.567-1-mark.rutland@arm.com commit 28607bf3aa6f9762b32dc7f1ed0488823c0651b8 Author: Jaegeuk Kim Date: Tue Jul 6 22:05:06 2021 -0700 f2fs: drop dirty node pages when cp is in error status Otherwise, writeback is going to fall in a loop to flush dirty inode forever before getting SBI_CLOSING. Signed-off-by: Jaegeuk Kim commit af0efa050caa66e8f304c42c94c76cb6c480cb7e Author: Toke Høiland-Jørgensen Date: Tue Jul 6 14:23:55 2021 +0200 libbpf: Restore errno return for functions that were already returning it The update to streamline libbpf error reporting intended to change all functions to return the errno as a negative return value if LIBBPF_STRICT_DIRECT_ERRS is set. However, if the flag is *not* set, the return value changes for the two functions that were already returning a negative errno unconditionally: bpf_link__unpin() and perf_buffer__poll(). This is a user-visible API change that breaks applications; so let's revert these two functions back to unconditionally returning a negative errno value. Fixes: e9fc3ce99b34 ("libbpf: Streamline error reporting for high-level APIs") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210706122355.236082-1-toke@redhat.com commit ab1016d39cc052064e32f25ad18ef8767a0ee3b8 Author: J. Bruce Fields Date: Thu Jul 1 20:06:56 2021 -0400 nfsd: fix NULL dereference in nfs3svc_encode_getaclres In error cases the dentry may be NULL. Before 20798dfe249a, the encoder also checked dentry and d_really_is_positive(dentry), but that looks like overkill to me--zero status should be enough to guarantee a positive dentry. This isn't the first time we've seen an error-case NULL dereference hidden in the initialization of a local variable in an xdr encoder. But I went back through the other recent rewrites and didn't spot any similar bugs. Reported-by: JianHong Yin Reviewed-by: Chuck Lever III Fixes: 20798dfe249a ("NFSD: Update the NFSv3 GETACL result encoder...") Signed-off-by: J. Bruce Fields commit 7b08cf62b1239a4322427d677ea9363f0ab677c6 Author: Chuck Lever Date: Fri Jun 25 11:12:49 2021 -0400 NFSD: Prevent a possible oops in the nfs_dirent() tracepoint The double copy of the string is a mistake, plus __assign_str() uses strlen(), which is wrong to do on a string that isn't guaranteed to be NUL-terminated. Fixes: 6019ce0742ca ("NFSD: Add a tracepoint to record directory entry encoding") Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit e34c0ce9136a0fe96f0f547898d14c44f3c9f147 Author: Colin Ian King Date: Thu May 13 16:16:39 2021 +0100 nfsd: remove redundant assignment to pointer 'this' The pointer 'this' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: J. Bruce Fields commit 474bc334698df98ce07c890f1898c7e7f389b0c7 Author: Trond Myklebust Date: Thu Jun 17 19:26:52 2021 -0400 nfsd: Reduce contention for the nfsd_file nf_rwsem When flushing out the unstable file writes as part of a COMMIT call, try to perform most of of the data writes and waits outside the semaphore. This means that if the client is sending the COMMIT as part of a memory reclaim operation, then it can continue performing I/O, with contention for the lock occurring only once the data sync is finished. Fixes: 5011af4c698a ("nfsd: Fix stable writes") Signed-off-by: Trond Myklebust Tested-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 0ff5b50ab1f7f39862d0cdf6803978d31b27f25e Author: Chuck Lever Date: Thu Jun 3 16:53:29 2021 -0400 lockd: Update the NLMv4 SHARE results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 447c14d48968d0d4c2733c3f8052cb63aa1deb38 Author: Chuck Lever Date: Thu Jun 3 16:53:23 2021 -0400 lockd: Update the NLMv4 nlm_res results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 1beef1473ccaa70a2d54f9e76fba5f534931ea23 Author: Chuck Lever Date: Thu Jun 3 16:53:17 2021 -0400 lockd: Update the NLMv4 TEST results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit ec757e423b4fcd6e5ea4405d1e8243c040458d78 Author: Chuck Lever Date: Thu Jun 3 16:53:11 2021 -0400 lockd: Update the NLMv4 void results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 3049e974a7c7cfa0c15fb807f4a3e75b2ab8517a Author: Chuck Lever Date: Thu Jun 3 16:53:04 2021 -0400 lockd: Update the NLMv4 FREE_ALL arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 7cf96b6d0104b12aa30961901879e428884b1695 Author: Chuck Lever Date: Thu Jun 3 16:52:58 2021 -0400 lockd: Update the NLMv4 SHARE arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit bc3665fd718b325cfff3abd383b00d1a87e028dc Author: Chuck Lever Date: Thu Jun 3 16:52:52 2021 -0400 lockd: Update the NLMv4 SM_NOTIFY arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit b4c24b5a41da63e5f3a9b6ea56cbe2a1efe49579 Author: Chuck Lever Date: Thu Jun 3 16:52:46 2021 -0400 lockd: Update the NLMv4 nlm_res arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit d76d8c25cea794f65615f3a2324052afa4b5f900 Author: Chuck Lever Date: Thu Jun 3 16:52:40 2021 -0400 lockd: Update the NLMv4 UNLOCK arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 1e1f38dcf3c031715191e1fd26f70a0affca4dbd Author: Chuck Lever Date: Thu Jun 3 16:52:34 2021 -0400 lockd: Update the NLMv4 CANCEL arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 0e5977af4fdc277984fca7d8c2e0c880935775a0 Author: Chuck Lever Date: Thu Jun 3 16:52:28 2021 -0400 lockd: Update the NLMv4 LOCK arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 345b4159a075b15dc4ae70f1db90fa8abf85d2e7 Author: Chuck Lever Date: Thu Jun 3 16:52:22 2021 -0400 lockd: Update the NLMv4 TEST arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 7956521aac58e434a05cf3c68c1b66c1312e5649 Author: Chuck Lever Date: Thu Jun 3 16:52:16 2021 -0400 lockd: Update the NLMv4 void arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 529ca3a116e8978575fec061a71fa6865a344891 Author: Chuck Lever Date: Thu Jun 3 16:52:10 2021 -0400 lockd: Update the NLMv1 SHARE results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit e96735a6980574ecbdb24c760b8d294095e47074 Author: Chuck Lever Date: Thu Jun 3 16:52:04 2021 -0400 lockd: Update the NLMv1 nlm_res results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit adf98a4850b9ede9fc174c78a885845fb08499a5 Author: Chuck Lever Date: Thu Jun 3 16:51:58 2021 -0400 lockd: Update the NLMv1 TEST results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit e26ec898b68b2ab64f379ba0fc0a615b2ad41f40 Author: Chuck Lever Date: Thu Jun 3 16:51:52 2021 -0400 lockd: Update the NLMv1 void results encoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 14e105256b9dcdf50a003e2e9a0da77e06770a4b Author: Chuck Lever Date: Thu Jun 3 16:51:46 2021 -0400 lockd: Update the NLMv1 FREE_ALL arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 890939e1266b9adf3b0acd5e0385b39813cb8f11 Author: Chuck Lever Date: Thu Jun 3 16:51:40 2021 -0400 lockd: Update the NLMv1 SHARE arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 137e05e2f735f696e117553f7fa5ef8fb09953e1 Author: Chuck Lever Date: Thu Jun 3 16:51:34 2021 -0400 lockd: Update the NLMv1 SM_NOTIFY arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 16ddcabe6240c4fb01c97f6fce6c35ddf8626ad5 Author: Chuck Lever Date: Thu Jun 3 16:51:28 2021 -0400 lockd: Update the NLMv1 nlm_res arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit c27045d302b022ed11d24a2653bceb6af56c6327 Author: Chuck Lever Date: Thu Jun 3 16:51:22 2021 -0400 lockd: Update the NLMv1 UNLOCK arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit f4e08f3ac8c4945ea54a740e3afcf44b34e7cf44 Author: Chuck Lever Date: Thu Jun 3 16:51:16 2021 -0400 lockd: Update the NLMv1 CANCEL arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit c1adb8c672ca2b085c400695ef064547d77eda29 Author: Chuck Lever Date: Thu Jun 3 16:51:10 2021 -0400 lockd: Update the NLMv1 LOCK arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 2fd0c67aabcf0f8821450b00ee511faa0b7761bf Author: Chuck Lever Date: Thu Jun 3 16:51:04 2021 -0400 lockd: Update the NLMv1 TEST arguments decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit cc1029b51273da5b342683e9ae14ab4eeaa15997 Author: Chuck Lever Date: Thu Jun 3 16:50:58 2021 -0400 lockd: Update the NLMv1 void argument decoder to use struct xdr_stream Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit a6a63ca5652ea05637ecfe349f9e895031529556 Author: Chuck Lever Date: Thu Jun 3 16:50:52 2021 -0400 lockd: Common NLM XDR helpers Add a .h file containing xdr_stream-based XDR helpers common to both NLMv3 and NLMv4. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit a9ad1a8090f58b2ed1774dd0f4c7cdb8210a3793 Author: Chuck Lever Date: Thu Jun 3 16:50:46 2021 -0400 lockd: Create a simplified .vs_dispatch method for NLM requests To enable xdr_stream-based encoding and decoding, create a bespoke RPC dispatch function for the lockd service. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 99cdf57b33e68df7afc876739c93a11f0b1ba807 Author: Chuck Lever Date: Thu Jun 3 16:50:40 2021 -0400 lockd: Remove stale comments Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 05570a2b01117209b500e1989ce8f1b0524c489f Author: J. Bruce Fields Date: Mon Jun 14 11:20:49 2021 -0400 nfsd: rpc_peeraddr2str needs rcu lock I'm not even sure cl_xprt can change here, but we're getting "suspicious RCU usage" warnings, and other rpc_peeraddr2str callers are taking the rcu lock. Signed-off-by: J. Bruce Fields commit f6260b98ec1493b214f13bb9d0545779ffe87748 Author: Colin Ian King Date: Sun Jun 13 15:06:52 2021 +0100 rpc: remove redundant initialization of variable status The variable status is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: J. Bruce Fields commit 5823e40055166cdf959a77e7b5fe75998b0b9b1f Author: ChenXiaoSong Date: Mon Jun 7 14:28:23 2021 +0800 nfs_common: fix doc warning Fix gcc W=1 warning: fs/nfs_common/grace.c:91: warning: Function parameter or member 'net' not described in 'locks_in_grace' Signed-off-by: ChenXiaoSong Signed-off-by: J. Bruce Fields commit 54185267e1fe476875e649bb18e1c4254c123305 Author: Wei Yongjun Date: Fri Jun 4 10:12:37 2021 +0000 NFSD: Fix error return code in nfsd4_interssc_connect() 'status' has been overwritten to 0 after nfsd4_ssc_setup_dul(), this cause 0 will be return in vfs_kern_mount() error case. Fix to return nfserr_nodev in this error. Fixes: f4e44b393389 ("NFSD: delay unmount source's export after inter-server copy completed.") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: J. Bruce Fields commit f47dc2d3013c65631bf8903becc7d88dc9d9966e Author: Dai Ngo Date: Thu Jun 3 20:02:26 2021 -0400 nfsd: fix kernel test robot warning in SSC code Fix by initializing pointer nfsd4_ssc_umount_item with NULL instead of 0. Replace return value of nfsd4_ssc_setup_dul with __be32 instead of int. Reported-by: kernel test robot Signed-off-by: Dai Ngo Signed-off-by: J. Bruce Fields commit 3518c8666f15cdd5d38878005dab1d589add1c19 Author: Dave Wysochanski Date: Wed Jun 2 13:51:39 2021 -0400 nfsd4: Expose the callback address and state of each NFS4 client In addition to the client's address, display the callback channel state and address in the 'info' file. Signed-off-by: Dave Wysochanski Signed-off-by: J. Bruce Fields commit d50295255e787a142a1329d53c7c410227ceaac2 Author: Zheng Yongjun Date: Mon May 31 14:36:40 2021 +0800 xprtrdma: Fix spelling mistakes Fix some spelling mistakes in comments: succes ==> success Signed-off-by: Zheng Yongjun Signed-off-by: J. Bruce Fields commit 934bd07fae7e55232845f909f78873ab8678ca74 Author: J. Bruce Fields Date: Tue May 25 14:53:44 2021 -0400 nfsd: move fsnotify on client creation outside spinlock This was causing a "sleeping function called from invalid context" warning. I don't think we need the set_and_test_bit() here; clients move from unconfirmed to confirmed only once, under the client_lock. The (conf == unconf) is a way to check whether we're in that confirming case, hopefully that's not too obscure. Fixes: 472d155a0631 "nfsd: report client confirmation status in "info" file" Signed-off-by: J. Bruce Fields commit 1958e5aef5098e28b7d6e6a2972649901ebecace Author: Jiapeng Chong Date: Fri Jun 25 17:28:24 2021 +0800 riscv: xip: Fix duplicate included asm/pgtable.h Clean up the following includecheck warning: ./arch/riscv/kernel/vmlinux-xip.lds.S: asm/pgtable.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Palmer Dabbelt commit 2a2ed5618a0e8a890d948b88b368c0459f35136c Author: Paul E. McKenney Date: Sun Jul 4 13:59:35 2021 -0700 rcu: Fix pr_info() formats and values in show_rcu_gp_kthreads() This commit changes from "%lx" to "%x" and from "0x1ffffL" to "0x1ffff" to match the change in type between the old field ->state (unsigned long) and the new field ->__state (unsigned int). Signed-off-by: Paul E. McKenney commit a9ab9cce9367a2cc02a3c7eb57a004dc0b8f380d Author: Paul E. McKenney Date: Tue May 25 11:28:40 2021 -0700 rcu-tasks: Don't delete holdouts within trc_wait_for_one_reader() Invoking trc_del_holdout() from within trc_wait_for_one_reader() is only a performance optimization because the RCU Tasks Trace grace-period kthread will eventually do this within check_all_holdout_tasks_trace(). But it is not a particularly important performance optimization because it only applies to the grace-period kthread, of which there is but one. This commit therefore removes this invocation of trc_del_holdout() in favor of the one in check_all_holdout_tasks_trace() in the grace-period kthread. Reported-by: "Xu, Yanfei" Signed-off-by: Paul E. McKenney commit ccd27f05ae7b8ebc40af5b004e94517a919aa862 Author: Nicolas Dichtel Date: Tue Jul 6 11:13:35 2021 +0200 ipv6: fix 'disable_policy' for fwd packets The goal of commit df789fe75206 ("ipv6: Provide ipv6 version of "disable_policy" sysctl") was to have the disable_policy from ipv4 available on ipv6. However, it's not exactly the same mechanism. On IPv4, all packets coming from an interface, which has disable_policy set, bypass the policy check. For ipv6, this is done only for local packets, ie for packets destinated to an address configured on the incoming interface. Let's align ipv6 with ipv4 so that the 'disable_policy' sysctl has the same effect for both protocols. My first approach was to create a new kind of route cache entries, to be able to set DST_NOPOLICY without modifying routes. This would have added a lot of code. Because the local delivery path is already handled, I choose to focus on the forwarding path to minimize code churn. Fixes: df789fe75206 ("ipv6: Provide ipv6 version of "disable_policy" sysctl") Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit ad1f37970875eef98eeaf478f55045f388b794a5 Author: Colin Ian King Date: Tue Jul 6 12:18:02 2021 +0100 octeontx2-pf: Fix assigned error return value that is never used Currently when the call to otx2_mbox_alloc_msg_cgx_mac_addr_update fails the error return variable rc is being assigned -ENOMEM and does not return early. rc is then re-assigned and the error case is not handled correctly. Fix this by returning -ENOMEM rather than assigning rc. Addresses-Coverity: ("Unused value") Fixes: 79d2be385e9e ("octeontx2-pf: offload DMAC filters to CGX/RPM block") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 7761e36bc7222d1221242c5f195ee0fd40caea40 Author: Alexandre Ghiti Date: Thu Jun 24 14:17:21 2021 +0200 riscv: Fix PTDUMP output now BPF region moved back to module region BPF region was moved back to the region below the kernel at the end of the module region by 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START aligned with PMD size"), so reflect this change in kernel page table output. Signed-off-by: Alexandre Ghiti Reviewed-by: Jisheng Zhang Fixes: 3a02764c372c ("riscv: Ensure BPF_JIT_REGION_START aligned with PMD size") Signed-off-by: Palmer Dabbelt commit ca6eaaa210deec0e41cbfc380bf89cf079203569 Author: Akira Tsukamoto Date: Wed Jun 23 21:40:39 2021 +0900 riscv: __asm_copy_to-from_user: Optimize unaligned memory access and pipeline stall This patch will reduce cpu usage dramatically in kernel space especially for application which use sys-call with large buffer size, such as network applications. The main reason behind this is that every unaligned memory access will raise exceptions and switch between s-mode and m-mode causing large overhead. First copy in bytes until reaches the first word aligned boundary in destination memory address. This is the preparation before the bulk aligned word copy. The destination address is aligned now, but oftentimes the source address is not in an aligned boundary. To reduce the unaligned memory access, it reads the data from source in aligned boundaries, which will cause the data to have an offset, and then combines the data in the next iteration by fixing offset with shifting before writing to destination. The majority of the improving copy speed comes from this shift copy. In the lucky situation that the both source and destination address are on the aligned boundary, perform load and store with register size to copy the data. Without the unrolling, it will reduce the speed since the next store instruction for the same register using from the load will stall the pipeline. At last, copying the remainder in one byte at a time. Signed-off-by: Akira Tsukamoto Signed-off-by: Palmer Dabbelt commit f1469e568bf6dcbdff9fd7cd7d2cc9ca9d06efeb Author: Gustavo A. R. Silva Date: Tue Jul 6 16:05:26 2021 -0500 Input: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 4e1c8c17ff129ab14a38c461dd9bb8f7ff8a36a0 Author: Gustavo A. R. Silva Date: Wed Jun 30 19:03:40 2021 -0500 scsi: aic94xx: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 1d10bf55d85d34eb73dd8263635f43fd72135d2d Author: Paul E. McKenney Date: Tue May 25 10:12:45 2021 -0700 rcu-tasks: Don't delete holdouts within trc_inspect_reader() As Yanfei pointed out, although invoking trc_del_holdout() is safe from the viewpoint of the integrity of the holdout list itself, the put_task_struct() invoked by trc_del_holdout() can result in use-after-free errors due to later accesses to this task_struct structure by the RCU Tasks Trace grace-period kthread. This commit therefore removes this call to trc_del_holdout() from trc_inspect_reader() in favor of the grace-period thread's existing call to trc_del_holdout(), thus eliminating that particular class of use-after-free errors. Reported-by: "Xu, Yanfei" Signed-off-by: Paul E. McKenney commit 05bc276cf243d90b9f1eb6ae2962f41eeb53a741 Author: Paul E. McKenney Date: Thu Jun 10 09:24:43 2021 -0700 refscale: Avoid false-positive warnings in ref_scale_reader() If the call to set_cpus_allowed_ptr() in ref_scale_reader() fails, a later WARN_ONCE() complains. But with the advent of 570a752b7a9b ("lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowed"), this complaint can be drowned out by complaints from smp_processor_id(). The rationale for this change is that refscale's kthreads are not marked with PF_NO_SETAFFINITY, which means that a system administrator could change affinity at any time. However, refscale is a performance/stress test, and the system administrator might well have a valid test-the-test reason for changing affinity. This commit therefore changes to raw_smp_processor_id() in order to avoid the noise, and also adds a WARN_ON_ONCE() to the call to set_cpus_allowed_ptr() in order to directly detect immediate failure. There is no WARN_ON_ONCE() within the test loop, allowing human-reflex-based affinity resetting, if desired. Signed-off-by: Paul E. McKenney commit 22b6d14992b733e9421a475f4d43df24629737ab Author: Paul E. McKenney Date: Fri Jun 4 12:37:44 2021 -0700 scftorture: Avoid false-positive warnings in scftorture_invoker() If the call to set_cpus_allowed_ptr() in scftorture_invoker() fails, a later WARN_ONCE() complains. But with the advent of 570a752b7a9b ("lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowed"), this complaint can be drowned out by complaints from smp_processor_id(). The rationale for this change is that scftorture's kthreads are not marked with PF_NO_SETAFFINITY, which means that a system administrator could change affinity at any time. However, scftorture is a torture test, and the system administrator might well have a valid test-the-test reason for changing affinity. This commit therefore changes to raw_smp_processor_id() in order to avoid the noise, and also adds a WARN_ON_ONCE() to the call to set_cpus_allowed_ptr() in order to directly detect immediate failure. There is no WARN_ON_ONCE() within the test loop, allowing human-reflex-based affinity resetting, if desired. Signed-off-by: Paul E. McKenney commit 31da94c25aea835ceac00575a9fd206c5a833fed Author: Tong Tiangen Date: Mon Jun 21 11:28:55 2021 +0800 riscv: add VMAP_STACK overflow detection This patch adds stack overflow detection to riscv, usable when CONFIG_VMAP_STACK=y. Overflow is detected in kernel exception entry(kernel/entry.S), if the kernel stack is overflow and been detected, the overflow handler is invoked on a per-cpu overflow stack. This approach preserves GPRs and the original exception information. The overflow detect is performed before any attempt is made to access the stack and the principle of stack overflow detection: kernel stacks are aligned to double their size, enabling overflow to be detected with a single bit test. For example, a 16K stack is aligned to 32K, ensuring that bit 14 of the SP must be zero. On an overflow (or underflow), this bit is flipped. Thus, overflow (of less than the size of the stack) can be detected by testing whether this bit is set. This gives us a useful error message on stack overflow, as can be trigger with the LKDTM overflow test: [ 388.053267] lkdtm: Performing direct entry EXHAUST_STACK [ 388.053663] lkdtm: Calling function with 1024 frame size to depth 32 ... [ 388.054016] lkdtm: loop 32/32 ... [ 388.054186] lkdtm: loop 31/32 ... [ 388.054491] lkdtm: loop 30/32 ... [ 388.054672] lkdtm: loop 29/32 ... [ 388.054859] lkdtm: loop 28/32 ... [ 388.055010] lkdtm: loop 27/32 ... [ 388.055163] lkdtm: loop 26/32 ... [ 388.055309] lkdtm: loop 25/32 ... [ 388.055481] lkdtm: loop 24/32 ... [ 388.055653] lkdtm: loop 23/32 ... [ 388.055837] lkdtm: loop 22/32 ... [ 388.056015] lkdtm: loop 21/32 ... [ 388.056188] lkdtm: loop 20/32 ... [ 388.058145] Insufficient stack space to handle exception! [ 388.058153] Task stack: [0xffffffd014260000..0xffffffd014264000] [ 388.058160] Overflow stack: [0xffffffe1f8d2c220..0xffffffe1f8d2d220] [ 388.058168] CPU: 0 PID: 89 Comm: bash Not tainted 5.12.0-rc8-dirty #90 [ 388.058175] Hardware name: riscv-virtio,qemu (DT) [ 388.058187] epc : number+0x32/0x2c0 [ 388.058247] ra : vsnprintf+0x2ae/0x3f0 [ 388.058255] epc : ffffffe0002d38f6 ra : ffffffe0002d814e sp : ffffffd01425ffc0 [ 388.058263] gp : ffffffe0012e4010 tp : ffffffe08014da00 t0 : ffffffd0142606e8 [ 388.058271] t1 : 0000000000000000 t2 : 0000000000000000 s0 : ffffffd014260070 [ 388.058303] s1 : ffffffd014260158 a0 : ffffffd01426015e a1 : ffffffd014260158 [ 388.058311] a2 : 0000000000000013 a3 : ffff0a01ffffff10 a4 : ffffffe000c398e0 [ 388.058319] a5 : 511b02ec65f3e300 a6 : 0000000000a1749a a7 : 0000000000000000 [ 388.058327] s2 : ffffffff000000ff s3 : 00000000ffff0a01 s4 : ffffffe0012e50a8 [ 388.058335] s5 : 0000000000ffff0a s6 : ffffffe0012e50a8 s7 : ffffffe000da1cc0 [ 388.058343] s8 : ffffffffffffffff s9 : ffffffd0142602b0 s10: ffffffd0142602a8 [ 388.058351] s11: ffffffd01426015e t3 : 00000000000f0000 t4 : ffffffffffffffff [ 388.058359] t5 : 000000000000002f t6 : ffffffd014260158 [ 388.058366] status: 0000000000000100 badaddr: ffffffd01425fff8 cause: 000000000000000f [ 388.058374] Kernel panic - not syncing: Kernel stack overflow [ 388.058381] CPU: 0 PID: 89 Comm: bash Not tainted 5.12.0-rc8-dirty #90 [ 388.058387] Hardware name: riscv-virtio,qemu (DT) [ 388.058393] Call Trace: [ 388.058400] [] walk_stackframe+0x0/0xce [ 388.058406] [] dump_backtrace+0x38/0x46 [ 388.058412] [] show_stack+0x10/0x18 [ 388.058418] [] dump_stack+0x74/0x8e [ 388.058424] [] panic+0xfc/0x2b2 [ 388.058430] [] print_trace_address+0x0/0x24 [ 388.058436] [] vsnprintf+0x2ae/0x3f0 [ 388.058956] SMP: stopping secondary CPUs Signed-off-by: Tong Tiangen Reviewed-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit 3dd6c11b60d2f1e4082221a8831f91093c4494aa Author: Thomas Zimmermann Date: Thu Jul 1 19:36:18 2021 +0200 drm/i915: Drop all references to DRM IRQ midlayer Remove all references to DRM's IRQ midlayer. i915 uses Linux' interrupt functions directly. v2: * also remove an outdated comment * move IRQ fix into separate patch * update Fixes tag (Daniel) Signed-off-by: Thomas Zimmermann Fixes: b318b82455bd ("drm/i915: Nuke drm_driver irq vfuncs") Cc: Ville Syrjälä Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210701173618.10718-3-tzimmermann@suse.de (cherry picked from commit 91b96f0008a2d66d76b525556e4818f5a4a089e4) Signed-off-by: Rodrigo Vivi commit 320ad343ea3023b4035dc4b5091eb19060391dbc Author: Thomas Zimmermann Date: Thu Jul 1 19:36:17 2021 +0200 drm/i915: Use the correct IRQ during resume The code in xcs_resume() probably didn't work as intended. It uses struct drm_device.irq, which is allocated to 0, but never initialized by i915 to the device's interrupt number. Change all calls to synchronize_hardirq() to intel_synchronize_irq(), which uses the correct interrupt. _hardirq() functions are not needed in this context. v5: * go back to _hardirq() after PCI probe reported wrong context; add rsp comment v4: * switch everything to intel_synchronize_irq() (Daniel) v3: * also use intel_synchronize_hardirq() at another callsite v2: * wrap irq code in intel_synchronize_hardirq() (Ville) Signed-off-by: Thomas Zimmermann Fixes: 536f77b1caa0 ("drm/i915/gt: Call stop_ring() from ring resume, again") Cc: Chris Wilson Cc: Mika Kuoppala Cc: Daniel Vetter Cc: Rodrigo Vivi Cc: Joonas Lahtinen Cc: Maarten Lankhorst Cc: Lucas De Marchi Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210701173618.10718-2-tzimmermann@suse.de (cherry picked from commit 27e4b467d94e216b365da388358c9407af818662) Signed-off-by: Rodrigo Vivi commit 995e9bcb42f99b68a45400f51bbbf41bb871ba2f Author: José Roberto de Souza Date: Wed Jun 30 14:05:22 2021 -0700 drm/i915/display/dg1: Correctly map DPLLs during state readout _DG1_DPCLKA0_CFGCR0 maps between DPLL 0 and 1 with one bit for phy A and B while _DG1_DPCLKA1_CFGCR0 maps between DPLL 2 and 3 with one bit for phy C and D. Reusing _cnl_ddi_get_pll() don't take that into cosideration returing DPLL 0 and 1 for phy C and D. That is a regression introduced in the refactor done in commit 351221ffc5e5 ("drm/i915: Move DDI clock readout to encoder->get_config()"). While at it also dropping the macros previously used, not reusing it to improve readability. BSpec: 50286 Fixes: 351221ffc5e5 ("drm/i915: Move DDI clock readout to encoder->get_config()") Cc: Lucas De Marchi Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210630210522.162674-1-jose.souza@intel.com (cherry picked from commit 3352d86dcd3336a117630f0c1cfbc6bb8c93e1cf) Signed-off-by: Rodrigo Vivi commit 07b72960d2b4a087ff2445e286159e69742069cc Author: Kees Cook Date: Thu Jun 17 14:33:01 2021 -0700 drm/i915/display: Do not zero past infoframes.vsc intel_dp_vsc_sdp_unpack() was using a memset() size (36, struct dp_sdp) larger than the destination (24, struct drm_dp_vsc_sdp), clobbering fields in struct intel_crtc_state after infoframes.vsc. Use the actual target size for the memset(). Fixes: 1b404b7dbb10 ("drm/i915/dp: Read out DP SDPs") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210617213301.1824728-1-keescook@chromium.org (cherry picked from commit c88e2647c5bb45d04dc4302018ebe6ebbf331823) Signed-off-by: Rodrigo Vivi commit 77d34a4683b053108ecd466cc7c4193b45805528 Merge: 4c55e2aeb8082 6fa630bf47382 Author: Linus Torvalds Date: Tue Jul 6 11:52:58 2021 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM development updates from Russell King: - Make it clear __swp_entry_to_pte() uses PTE_TYPE_FAULT - Updates for setting vmalloc size via command line to resolve an issue with the 8MiB hole not properly being accounted for, and clean up the code. - ftrace support for module PLTs - Spelling fixes - kbuild updates for removing generated files and pattern rules for generating files - Clang/llvm updates - Change the way the kernel is mapped, placing it in vmalloc space instead. - Remove arm_pm_restart from arm and aarch64. * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (29 commits) ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE ARM: 9097/1: mmu: Declare section start/end correctly ARM: 9096/1: Remove arm_pm_restart() ARM: 9095/1: ARM64: Remove arm_pm_restart() ARM: 9094/1: Register with kernel restart handler ARM: 9093/1: drivers: firmwapsci: Register with kernel restart handler ARM: 9092/1: xen: Register with kernel restart handler ARM: 9091/1: Revert "mm: qsd8x50: Fix incorrect permission faults" ARM: 9090/1: Map the lowmem and kernel separately ARM: 9089/1: Define kernel physical section start and end ARM: 9088/1: Split KERNEL_OFFSET from PAGE_OFFSET ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1 ARM: 9086/1: syscalls: use pattern rules to generate syscall headers ARM: 9085/1: remove unneeded abi parameter to syscallnr.sh ARM: 9084/1: simplify the build rule of mach-types.h ARM: 9083/1: uncompress: atags_to_fdt: Spelling s/REturn/Return/ ARM: 9082/1: [v2] mark prepare_page_table as __init ARM: 9079/1: ftrace: Add MODULE_PLTS support ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link() ARM: 9077/1: PLT: Move struct plt_entries definition to header ... commit 4c55e2aeb8082cb118cd63596bfe0dc5247b78e1 Merge: df8ba5f160335 ad4e600cbf897 Author: Linus Torvalds Date: Tue Jul 6 11:36:58 2021 -0700 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "One change to simplify Litex CSR (MMIO register) access by limiting them to 32-bit offsets. Now that this is agreed on among Litex hardware and kernel developers it will allow us to start upstreaming other Litex peripheral drivers" * tag 'for-linus' of git://github.com/openrisc/linux: drivers/soc/litex: remove 8-bit subregister option commit df8ba5f160335cf9ea09c0a037235331a171fe1a Merge: 76e2d16bd5d01 c8daba4640ac9 Author: Linus Torvalds Date: Tue Jul 6 11:29:18 2021 -0700 Merge tag 'kgdb-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "This was a extremely quiet cycle for kgdb. This consists of two patches that between them address spelling errors and a switch fallthrough warning" * tag 'kgdb-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kgdb: Fix fall-through warning for Clang kgdb: Fix spelling mistakes commit 76e2d16bd5d0193f891a0e30f14ef5c8c370bc8f Merge: 8e4f3e15175ff 5e5234462756a Author: Linus Torvalds Date: Tue Jul 6 11:24:14 2021 -0700 Merge branch 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle updates from Julia Lawall: "There are two new semantic patches: - minmax: To use min and max instead of ? : - swap: To use swap when possible Some other semantic patches have been updated to better conform to Linux kernel developer expectations or to make the explanation message more clear. Finally, there is a fix for the coccicheck script" * 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: coccinelle: api: remove kobj_to_dev.cocci script scripts: coccicheck: fix troubles on non-English builds coccinelle: misc: minmax: suppress patch generation for err returns drop unneeded *s coccinelle: irqf_oneshot: reduce the severity due to false positives coccinelle: misc: add swap script coccinelle: misc: update uninitialized_var.cocci documentation coccinelle: misc: restrict patch mode in flexible_array.cocci coccinelle: misc: add minmax script commit 8e4f3e15175ffab5d2126dc8e7c8cfcc1654a5aa Merge: 729437e334a9d c4e0cd4e0c165 Author: Linus Torvalds Date: Tue Jul 6 11:17:41 2021 -0700 Merge tag 'fuse-update-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Fixes for virtiofs submounts - Misc fixes and cleanups * tag 'fuse-update-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: virtiofs: Fix spelling mistakes fuse: use DIV_ROUND_UP helper macro for calculations fuse: fix illegal access to inode with reused nodeid fuse: allow fallocate(FALLOC_FL_ZERO_RANGE) fuse: Make fuse_fill_super_submount() static fuse: Switch to fc_mount() for submounts fuse: Call vfs_get_tree() for submounts fuse: add dedicated filesystem context ops for submounts virtiofs: propagate sync() to file server fuse: reject internal errno fuse: check connected before queueing on fpq->io fuse: ignore PG_workingset after stealing fuse: Fix infinite loop in sget_fc() fuse: Fix crash if superblock of submount gets killed early fuse: Fix crash in fuse_dentry_automount() error path commit 729437e334a9d9e079e2be9a42629316bee8a17e Merge: 7a5e9a17b2d89 0fdec1b3c9fbb Author: Linus Torvalds Date: Tue Jul 6 11:12:42 2021 -0700 Merge tag 'for-linus-5.14-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "A read-ahead adjustment and a fix. The readahead adjustment was suggested by Matthew Wilcox and looks like how I should have written it in the first place... the "df fix" was suggested by Walt Ligon, some Orangefs users have been complaining about whacky df output..." * tag 'for-linus-5.14-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: fix orangefs df output. orangefs: readahead adjustment commit 7a5e9a17b2d8905e368ddfb33ddd40ef57f2d7cc Merge: 79160a603bdb5 1e5654de0f518 Author: Linus Torvalds Date: Tue Jul 6 11:06:04 2021 -0700 Merge tag 'exfat-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Improved compatibility issue with exfat from some camera vendors. - Do not need to release root inode on error path. * tag 'exfat-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: handle wrong stream entry size in exfat_readdir() exfat: avoid incorrectly releasing for root inode commit 5ddef2ad96019d9495424c6d5139dcb5b732bd58 Merge: be5d1b61a2ad2 168e696a36792 Author: David S. Miller Date: Tue Jul 6 10:36:59 2021 -0700 Merge branch 'bonding-ipsec' Taehee Yoo says: ==================== net: fix bonding ipsec offload problems This series fixes some problems related to bonding ipsec offload. The 1, 5, and 8th patches are to add a missing rcu_read_lock(). The 2nd patch is to add null check code to bond_ipsec_add_sa. When bonding interface doesn't have an active real interface, the bond->curr_active_slave pointer is null. But bond_ipsec_add_sa() uses that pointer without null check. So that it results in null-ptr-deref. The 3 and 4th patches are to replace xs->xso.dev with xs->xso.real_dev. The 6th patch is to disallow to set ipsec offload if a real interface type is bonding. The 7th patch is to add struct bond_ipsec to manage SA. If bond mode is changed, or active real interface is changed, SA should be removed from old current active real interface then it should be added to new active real interface. But it can't, because it doesn't manage SA. The 9th patch is to fix incorrect return value of bond_ipsec_offload_ok(). v1 -> v2: - Add 9th patch. - Do not print warning when there is no SA in bond_ipsec_add_sa_all(). - Add comment for ipsec_lock. ==================== Signed-off-by: David S. Miller commit 168e696a36792a4a3b2525a06249e7472ef90186 Author: Taehee Yoo Date: Mon Jul 5 15:38:14 2021 +0000 bonding: fix incorrect return value of bond_ipsec_offload_ok() bond_ipsec_offload_ok() is called to check whether the interface supports ipsec offload or not. bonding interface support ipsec offload only in active-backup mode. So, if a bond interface is not in active-backup mode, it should return false but it returns true. Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 955b785ec6b3b2f9b91914d6eeac8ee66ee29239 Author: Taehee Yoo Date: Mon Jul 5 15:38:13 2021 +0000 bonding: fix suspicious RCU usage in bond_ipsec_offload_ok() To dereference bond->curr_active_slave, it uses rcu_dereference(). But it and the caller doesn't acquire RCU so a warning occurs. So add rcu_read_lock(). Splat looks like: WARNING: suspicious RCU usage 5.13.0-rc6+ #1179 Not tainted drivers/net/bonding/bond_main.c:571 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ping/974: #0: ffff888109e7db70 (sk_lock-AF_INET){+.+.}-{0:0}, at: raw_sendmsg+0x1303/0x2cb0 stack backtrace: CPU: 2 PID: 974 Comm: ping Not tainted 5.13.0-rc6+ #1179 Call Trace: dump_stack+0xa4/0xe5 bond_ipsec_offload_ok+0x1f4/0x260 [bonding] xfrm_output+0x179/0x890 xfrm4_output+0xfa/0x410 ? __xfrm4_output+0x4b0/0x4b0 ? __ip_make_skb+0xecc/0x2030 ? xfrm4_udp_encap_rcv+0x800/0x800 ? ip_local_out+0x21/0x3a0 ip_send_skb+0x37/0xa0 raw_sendmsg+0x1bfd/0x2cb0 Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 9a5605505d9c7dbfdb89cc29a8f5fc5cf9fd2334 Author: Taehee Yoo Date: Mon Jul 5 15:38:12 2021 +0000 bonding: Add struct bond_ipesc to manage SA bonding has been supporting ipsec offload. When SA is added, bonding just passes SA to its own active real interface. But it doesn't manage SA. So, when events(add/del real interface, active real interface change, etc) occur, bonding can't handle that well because It doesn't manage SA. So some problems(panic, UAF, refcnt leak)occur. In order to make it stable, it should manage SA. That's the reason why struct bond_ipsec is added. When a new SA is added to bonding interface, it is stored in the bond_ipsec list. And the SA is passed to a current active real interface. If events occur, it uses bond_ipsec data to handle these events. bond->ipsec_list is protected by bond->ipsec_lock. If a current active real interface is changed, the following logic works. 1. delete all SAs from old active real interface 2. Add all SAs to the new active real interface. 3. If a new active real interface doesn't support ipsec offload or SA's option, it sets real_dev to NULL. Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit b121693381b112b78c076dea171ee113e237c0e4 Author: Taehee Yoo Date: Mon Jul 5 15:38:11 2021 +0000 bonding: disallow setting nested bonding + ipsec offload bonding interface can be nested and it supports ipsec offload. So, it allows setting the nested bonding + ipsec scenario. But code does not support this scenario. So, it should be disallowed. interface graph: bond2 | bond1 | eth0 The nested bonding + ipsec offload may not a real usecase. So, disallowing this scenario is fine. Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit a22c39b831a081da9b2c488bd970a4412d926f30 Author: Taehee Yoo Date: Mon Jul 5 15:38:10 2021 +0000 bonding: fix suspicious RCU usage in bond_ipsec_del_sa() To dereference bond->curr_active_slave, it uses rcu_dereference(). But it and the caller doesn't acquire RCU so a warning occurs. So add rcu_read_lock(). Test commands: ip netns add A ip netns exec A bash modprobe netdevsim echo "1 1" > /sys/bus/netdevsim/new_device ip link add bond0 type bond ip link set eth0 master bond0 ip link set eth0 up ip link set bond0 up ip x s add proto esp dst 14.1.1.1 src 15.1.1.1 spi 0x07 mode \ transport reqid 0x07 replay-window 32 aead 'rfc4106(gcm(aes))' \ 0x44434241343332312423222114131211f4f3f2f1 128 sel src 14.0.0.52/24 \ dst 14.0.0.70/24 proto tcp offload dev bond0 dir in ip x s f Splat looks like: ============================= WARNING: suspicious RCU usage 5.13.0-rc3+ #1168 Not tainted ----------------------------- drivers/net/bonding/bond_main.c:448 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by ip/705: #0: ffff888106701780 (&net->xfrm.xfrm_cfg_mutex){+.+.}-{3:3}, at: xfrm_netlink_rcv+0x59/0x80 [xfrm_user] #1: ffff8880075b0098 (&x->lock){+.-.}-{2:2}, at: xfrm_state_delete+0x16/0x30 stack backtrace: CPU: 6 PID: 705 Comm: ip Not tainted 5.13.0-rc3+ #1168 Call Trace: dump_stack+0xa4/0xe5 bond_ipsec_del_sa+0x16a/0x1c0 [bonding] __xfrm_state_delete+0x51f/0x730 xfrm_state_delete+0x1e/0x30 xfrm_state_flush+0x22f/0x390 xfrm_flush_sa+0xd8/0x260 [xfrm_user] ? xfrm_flush_policy+0x290/0x290 [xfrm_user] xfrm_user_rcv_msg+0x331/0x660 [xfrm_user] ? rcu_read_lock_sched_held+0x91/0xc0 ? xfrm_user_state_lookup.constprop.39+0x320/0x320 [xfrm_user] ? find_held_lock+0x3a/0x1c0 ? mutex_lock_io_nested+0x1210/0x1210 ? sched_clock_cpu+0x18/0x170 netlink_rcv_skb+0x121/0x350 [ ... ] Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 2de7e4f67599affc97132bd07e30e3bd59d0b777 Author: Taehee Yoo Date: Mon Jul 5 15:38:09 2021 +0000 ixgbevf: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops There are two pointers in struct xfrm_state_offload, *dev, *real_dev. These are used in callback functions of struct xfrmdev_ops. The *dev points whether bonding interface or real interface. If bonding ipsec offload is used, it points bonding interface If not, it points real interface. And real_dev always points real interface. So, ixgbevf should always use real_dev instead of dev. Of course, real_dev always not be null. Test commands: ip link add bond0 type bond #eth0 is ixgbevf interface ip link set eth0 master bond0 ip link set bond0 up ip x s add proto esp dst 14.1.1.1 src 15.1.1.1 spi 0x07 mode \ transport reqid 0x07 replay-window 32 aead 'rfc4106(gcm(aes))' \ 0x44434241343332312423222114131211f4f3f2f1 128 sel src 14.0.0.52/24 \ dst 14.0.0.70/24 proto tcp offload dev bond0 dir in Splat looks like: KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 6 PID: 688 Comm: ip Not tainted 5.13.0-rc3+ #1168 RIP: 0010:ixgbevf_ipsec_find_empty_idx+0x28/0x1b0 [ixgbevf] Code: 00 00 0f 1f 44 00 00 55 53 48 89 fb 48 83 ec 08 40 84 f6 0f 84 9c 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 01 0f 8e 4c 01 00 00 66 81 3b 00 04 0f RSP: 0018:ffff8880089af390 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff8880089af4f8 R08: 0000000000000003 R09: fffffbfff4287e11 R10: 0000000000000001 R11: ffff888005de8908 R12: 0000000000000000 R13: ffff88810936a000 R14: ffff88810936a000 R15: ffff888004d78040 FS: 00007fdf9883a680(0000) GS:ffff88811a400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055bc14adbf40 CR3: 000000000b87c005 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ixgbevf_ipsec_add_sa+0x1bf/0x9c0 [ixgbevf] ? rcu_read_lock_sched_held+0x91/0xc0 ? ixgbevf_ipsec_parse_proto_keys.isra.9+0x280/0x280 [ixgbevf] ? lock_acquire+0x191/0x720 ? bond_ipsec_add_sa+0x48/0x350 [bonding] ? lockdep_hardirqs_on_prepare+0x3e0/0x3e0 ? rcu_read_lock_held+0x91/0xa0 ? rcu_read_lock_sched_held+0xc0/0xc0 bond_ipsec_add_sa+0x193/0x350 [bonding] xfrm_dev_state_add+0x2a9/0x770 ? memcpy+0x38/0x60 xfrm_add_sa+0x2278/0x3b10 [xfrm_user] ? xfrm_get_policy+0xaa0/0xaa0 [xfrm_user] ? register_lock_class+0x1750/0x1750 xfrm_user_rcv_msg+0x331/0x660 [xfrm_user] ? rcu_read_lock_sched_held+0x91/0xc0 ? xfrm_user_state_lookup.constprop.39+0x320/0x320 [xfrm_user] ? find_held_lock+0x3a/0x1c0 ? mutex_lock_io_nested+0x1210/0x1210 ? sched_clock_cpu+0x18/0x170 netlink_rcv_skb+0x121/0x350 [ ... ] Fixes: 272c2330adc9 ("xfrm: bail early on slave pass over skb") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 09adf7566d436322ced595b166dea48b06852efe Author: Taehee Yoo Date: Mon Jul 5 15:38:08 2021 +0000 net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops There are two pointers in struct xfrm_state_offload, *dev, *real_dev. These are used in callback functions of struct xfrmdev_ops. The *dev points whether bonding interface or real interface. If bonding ipsec offload is used, it points bonding interface If not, it points real interface. And real_dev always points real interface. So, netdevsim should always use real_dev instead of dev. Of course, real_dev always not be null. Test commands: ip netns add A ip netns exec A bash modprobe netdevsim echo "1 1" > /sys/bus/netdevsim/new_device ip link add bond0 type bond mode active-backup ip link set eth0 master bond0 ip link set eth0 up ip link set bond0 up ip x s add proto esp dst 14.1.1.1 src 15.1.1.1 spi 0x07 mode \ transport reqid 0x07 replay-window 32 aead 'rfc4106(gcm(aes))' \ 0x44434241343332312423222114131211f4f3f2f1 128 sel src 14.0.0.52/24 \ dst 14.0.0.70/24 proto tcp offload dev bond0 dir in Splat looks like: BUG: spinlock bad magic on CPU#5, kworker/5:1/53 lock: 0xffff8881068c2cc8, .magic: 11121314, .owner: /-1, .owner_cpu: -235736076 CPU: 5 PID: 53 Comm: kworker/5:1 Not tainted 5.13.0-rc3+ #1168 Workqueue: events linkwatch_event Call Trace: dump_stack+0xa4/0xe5 do_raw_spin_lock+0x20b/0x270 ? rwlock_bug.part.1+0x90/0x90 _raw_spin_lock_nested+0x5f/0x70 bond_get_stats+0xe4/0x4c0 [bonding] ? rcu_read_lock_sched_held+0xc0/0xc0 ? bond_neigh_init+0x2c0/0x2c0 [bonding] ? dev_get_alias+0xe2/0x190 ? dev_get_port_parent_id+0x14a/0x360 ? rtnl_unregister+0x190/0x190 ? dev_get_phys_port_name+0xa0/0xa0 ? memset+0x1f/0x40 ? memcpy+0x38/0x60 ? rtnl_phys_switch_id_fill+0x91/0x100 dev_get_stats+0x8c/0x270 rtnl_fill_stats+0x44/0xbe0 ? nla_put+0xbe/0x140 rtnl_fill_ifinfo+0x1054/0x3ad0 [ ... ] Fixes: 272c2330adc9 ("xfrm: bail early on slave pass over skb") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 105cd17a866017b45f3c45901b394c711c97bf40 Author: Taehee Yoo Date: Mon Jul 5 15:38:07 2021 +0000 bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s add proto esp dst 14.1.1.1 src 15.1.1.1 spi \ 0x07 mode transport reqid 0x07 replay-window 32 aead 'rfc4106(gcm(aes))' \ 0x44434241343332312423222114131211f4f3f2f1 128 sel src 14.0.0.52/24 \ dst 14.0.0.70/24 proto tcp offload dev bond0 dir in Splat looks like: KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 4 PID: 680 Comm: ip Not tainted 5.13.0-rc3+ #1168 RIP: 0010:bond_ipsec_add_sa+0xc4/0x2e0 [bonding] Code: 85 21 02 00 00 4d 8b a6 48 0c 00 00 e8 75 58 44 ce 85 c0 0f 85 14 01 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 0f 85 fc 01 00 00 48 8d bb e0 02 00 00 4d 8b 2c 24 48 RSP: 0018:ffff88810946f508 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff88810b4e8040 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff8fe34280 RDI: ffff888115abe100 RBP: ffff88810946f528 R08: 0000000000000003 R09: fffffbfff2287e11 R10: 0000000000000001 R11: ffff888115abe0c8 R12: 0000000000000000 R13: ffffffffc0aea9a0 R14: ffff88800d7d2000 R15: ffff88810b4e8330 FS: 00007efc5552e680(0000) GS:ffff888119c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055c2530dbf40 CR3: 0000000103056004 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: xfrm_dev_state_add+0x2a9/0x770 ? memcpy+0x38/0x60 xfrm_add_sa+0x2278/0x3b10 [xfrm_user] ? xfrm_get_policy+0xaa0/0xaa0 [xfrm_user] ? register_lock_class+0x1750/0x1750 xfrm_user_rcv_msg+0x331/0x660 [xfrm_user] ? rcu_read_lock_sched_held+0x91/0xc0 ? xfrm_user_state_lookup.constprop.39+0x320/0x320 [xfrm_user] ? find_held_lock+0x3a/0x1c0 ? mutex_lock_io_nested+0x1210/0x1210 ? sched_clock_cpu+0x18/0x170 netlink_rcv_skb+0x121/0x350 ? xfrm_user_state_lookup.constprop.39+0x320/0x320 [xfrm_user] ? netlink_ack+0x9d0/0x9d0 ? netlink_deliver_tap+0x17c/0xa50 xfrm_netlink_rcv+0x68/0x80 [xfrm_user] netlink_unicast+0x41c/0x610 ? netlink_attachskb+0x710/0x710 netlink_sendmsg+0x6b9/0xb70 [ ...] Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit b648eba4c69e5819880b4907e7fcb2bb576069ab Author: Taehee Yoo Date: Mon Jul 5 15:38:06 2021 +0000 bonding: fix suspicious RCU usage in bond_ipsec_add_sa() To dereference bond->curr_active_slave, it uses rcu_dereference(). But it and the caller doesn't acquire RCU so a warning occurs. So add rcu_read_lock(). Test commands: ip link add dummy0 type dummy ip link add bond0 type bond ip link set dummy0 master bond0 ip link set dummy0 up ip link set bond0 up ip x s add proto esp dst 14.1.1.1 src 15.1.1.1 spi 0x07 \ mode transport \ reqid 0x07 replay-window 32 aead 'rfc4106(gcm(aes))' \ 0x44434241343332312423222114131211f4f3f2f1 128 sel \ src 14.0.0.52/24 dst 14.0.0.70/24 proto tcp offload \ dev bond0 dir in Splat looks like: ============================= WARNING: suspicious RCU usage 5.13.0-rc3+ #1168 Not tainted ----------------------------- drivers/net/bonding/bond_main.c:411 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ip/684: #0: ffffffff9a2757c0 (&net->xfrm.xfrm_cfg_mutex){+.+.}-{3:3}, at: xfrm_netlink_rcv+0x59/0x80 [xfrm_user] 55.191733][ T684] stack backtrace: CPU: 0 PID: 684 Comm: ip Not tainted 5.13.0-rc3+ #1168 Call Trace: dump_stack+0xa4/0xe5 bond_ipsec_add_sa+0x18c/0x1f0 [bonding] xfrm_dev_state_add+0x2a9/0x770 ? memcpy+0x38/0x60 xfrm_add_sa+0x2278/0x3b10 [xfrm_user] ? xfrm_get_policy+0xaa0/0xaa0 [xfrm_user] ? register_lock_class+0x1750/0x1750 xfrm_user_rcv_msg+0x331/0x660 [xfrm_user] ? rcu_read_lock_sched_held+0x91/0xc0 ? xfrm_user_state_lookup.constprop.39+0x320/0x320 [xfrm_user] ? find_held_lock+0x3a/0x1c0 ? mutex_lock_io_nested+0x1210/0x1210 ? sched_clock_cpu+0x18/0x170 netlink_rcv_skb+0x121/0x350 ? xfrm_user_state_lookup.constprop.39+0x320/0x320 [xfrm_user] ? netlink_ack+0x9d0/0x9d0 ? netlink_deliver_tap+0x17c/0xa50 xfrm_netlink_rcv+0x68/0x80 [xfrm_user] netlink_unicast+0x41c/0x610 ? netlink_attachskb+0x710/0x710 netlink_sendmsg+0x6b9/0xb70 [ ... ] Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit be5d1b61a2ad28c7e57fe8bfa277373e8ecffcdc Author: Nguyen Dinh Phi Date: Tue Jul 6 07:19:12 2021 +0800 tcp: fix tcp_init_transfer() to not reset icsk_ca_initialized This commit fixes a bug (found by syzkaller) that could cause spurious double-initializations for congestion control modules, which could cause memory leaks or other problems for congestion control modules (like CDG) that allocate memory in their init functions. The buggy scenario constructed by syzkaller was something like: (1) create a TCP socket (2) initiate a TFO connect via sendto() (3) while socket is in TCP_SYN_SENT, call setsockopt(TCP_CONGESTION), which calls: tcp_set_congestion_control() -> tcp_reinit_congestion_control() -> tcp_init_congestion_control() (4) receive ACK, connection is established, call tcp_init_transfer(), set icsk_ca_initialized=0 (without first calling cc->release()), call tcp_init_congestion_control() again. Note that in this sequence tcp_init_congestion_control() is called twice without a cc->release() call in between. Thus, for CC modules that allocate memory in their init() function, e.g, CDG, a memory leak may occur. The syzkaller tool managed to find a reproducer that triggered such a leak in CDG. The bug was introduced when that commit 8919a9b31eb4 ("tcp: Only init congestion control if not initialized already") introduced icsk_ca_initialized and set icsk_ca_initialized to 0 in tcp_init_transfer(), missing the possibility for a sequence like the one above, where a process could call setsockopt(TCP_CONGESTION) in state TCP_SYN_SENT (i.e. after the connect() or TFO open sendmsg()), which would call tcp_init_congestion_control(). It did not intend to reset any initialization that the user had already explicitly made; it just missed the possibility of that particular sequence (which syzkaller managed to find). Fixes: 8919a9b31eb4 ("tcp: Only init congestion control if not initialized already") Reported-by: syzbot+f1e24a0594d4e3a895d3@syzkaller.appspotmail.com Signed-off-by: Nguyen Dinh Phi Acked-by: Neal Cardwell Tested-by: Neal Cardwell Signed-off-by: David S. Miller commit 8550ff8d8c75416e984d9c4b082845e57e560984 Author: Paul Blakey Date: Mon Jul 5 13:54:51 2021 +0300 skbuff: Release nfct refcount on napi stolen or re-used skbs When multiple SKBs are merged to a new skb under napi GRO, or SKB is re-used by napi, if nfct was set for them in the driver, it will not be released while freeing their stolen head state or on re-use. Release nfct on napi's stolen or re-used SKBs, and in gro_list_prepare, check conntrack metadata diff. Fixes: 5c6b94604744 ("net/mlx5e: CT: Handle misses after executing CT action") Reviewed-by: Roi Dayan Signed-off-by: Paul Blakey Signed-off-by: David S. Miller commit d58b2061105956f6e69691bf0259b1dd1e9fb601 Merge: 25f2d745666dd 42d7a8dc195f9 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:32 2021 -0500 Merge branch 'remotes/lorenzo/pci/mobiveil' - Removed unused readl and writel functions (Krzysztof Wilczyński) * remotes/lorenzo/pci/mobiveil: PCI: mobiveil: Remove unused readl and writel functions commit 25f2d745666dd18c513962ebd66fc8c7a3357898 Merge: 93f60bb915ca6 1243106474294 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:31 2021 -0500 Merge branch 'remotes/lorenzo/pci/microchip' - Make struct event_descs static (Krzysztof Wilczyński) * remotes/lorenzo/pci/microchip: PCI: microchip: Make the struct event_descs static commit 93f60bb915ca691e50f8a501dd63e164a0688481 Merge: 6b65fbf063a56 3a2e476dc5d02 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:31 2021 -0500 Merge branch 'remotes/lorenzo/pci/mediatek-gen3' - Add missing MODULE_DEVICE_TABLE for driver loading (Zou Wei) * remotes/lorenzo/pci/mediatek-gen3: PCI: mediatek-gen3: Add missing MODULE_DEVICE_TABLE commit 6b65fbf063a5620346d62ce19c0447a726203fb0 Merge: 19a41f995801b 28bba1e220775 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:31 2021 -0500 Merge branch 'remotes/lorenzo/pci/mediatek' - Drop redundant error message from mtk_pcie_subsys_powerup() (Zhen Lei) * remotes/lorenzo/pci/mediatek: PCI: mediatek: Remove redundant error printing in mtk_pcie_subsys_powerup() commit 19a41f995801bc4ab4e58ca4e713cdd4015f72ff Merge: 02722a8415025 2dc0a201d0f59 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:30 2021 -0500 Merge branch 'remotes/lorenzo/pci/iproc' - Fix multi-MSI base vector number allocation (Sandor Bodo-Merle) - Restrict multi-MSI support to uniprocessor kernel (Sandor Bodo-Merle) * remotes/lorenzo/pci/iproc: PCI: iproc: Support multi-MSI only on uniprocessor kernel PCI: iproc: Fix multi-MSI base vector number allocation commit 02722a841502506090e170b89eeccaeb3ee25589 Merge: 777e5e6ba918e 326dc2e1e59a9 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:30 2021 -0500 Merge branch 'remotes/lorenzo/pci/hv' - Fix race when removing device (Long Li) - Remove unused bus device removal refcount/functions (Long Li) * remotes/lorenzo/pci/hv: PCI: hv: Remove bus device removal unused refcount/functions PCI: hv: Fix a race condition when removing the device commit 777e5e6ba918ec4109e87f86b9ca1689565b659d Merge: c04881e8c4a35 5be967d5016ac Author: Bjorn Helgaas Date: Tue Jul 6 10:56:29 2021 -0500 Merge branch 'remotes/lorenzo/pci/ftpci100' - Rename PCI_IOSIZE, etc in ftpci100 to avoid macro name collisions (Randy Dunlap) * remotes/lorenzo/pci/ftpci100: PCI: ftpci100: Rename macro name collision commit c04881e8c4a354a3c81a0a58aaf2556975ce80e7 Merge: 4343292f80578 7f71a409fe3d9 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:29 2021 -0500 Merge branch 'remotes/lorenzo/pci/aardvark' - Decode PIO Posted/Non-posted Request correctly in error logging (Pali Rohár) - Work around incorrect Vendor ID in Marvell Armada 3700 (Pali Rohár) * remotes/lorenzo/pci/aardvark: PCI: aardvark: Implement workaround for the readback value of VEND_ID PCI: aardvark: Fix checking for PIO Non-posted Request commit 4343292f805786c2e4b5f455397459133c2f7851 Merge: 5e0716fc26a2d 347269c113f10 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:29 2021 -0500 Merge branch 'pci/kernel-doc' - Fix kernel-doc formatting errors (Krzysztof Wilczyński) * pci/kernel-doc: PCI: Fix kernel-doc formatting commit 5e0716fc26a2dd0caf9e8d838c2e83f5f0c70b75 Merge: 5a57de58a3d1e 662e4b03431f5 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:28 2021 -0500 Merge branch 'pci/host/xgene' - Annotate __iomem pointer (Bjorn Helgaas) * pci/host/xgene: PCI: xgene: Annotate __iomem pointer commit 5a57de58a3d1ebc9a3dc106b0e7007c3ccbf052f Merge: 7b8f0c867a565 f67092eff2bd4 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:28 2021 -0500 Merge branch 'pci/host/tegra194' - Fix host init during resume (Vidya Sagar) - Fix ill-defined MSI IRQ shift behavior (Jon Hunter) * pci/host/tegra194: PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift PCI: tegra194: Fix host initialization during resume commit 7b8f0c867a565827b0fe3a8a25d62317063c5ced Merge: d2918cb784977 7bf475a4614a9 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:27 2021 -0500 Merge branch 'pci/host/tegra' - Add missing MODULE_DEVICE_TABLE for driver loading (Zou Wei) * pci/host/tegra: PCI: tegra: Add missing MODULE_DEVICE_TABLE commit d2918cb784977bb550b936cfcbfe16bcba014628 Merge: 364a716bd73e9 3cf5f7ab230e2 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:27 2021 -0500 Merge branch 'pci/host/rockchip' - Register IRQ handlers after device and data are ready (Javier Martinez Canillas) * pci/host/rockchip: PCI: rockchip: Register IRQ handlers after device and data are ready commit 364a716bd73e9846d3118a43f600f8f517658b38 Merge: 570987cb4c4d5 655832d12f225 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:26 2021 -0500 Merge branch 'pci/host/intel-gw' - Fix INTx enable (Martin Blumenstingl) * pci/host/intel-gw: PCI: intel-gw: Fix INTx enable commit 570987cb4c4d5fea2270ea646657376f5a7369e4 Merge: 524e6b0395988 d2ce69ca25169 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:26 2021 -0500 Merge branch 'pci/host/imx6' - Drop redundant error message from imx6_pcie_probe() (Zhen Lei) - Limit DBI register length on i.MX 6QuadPlus (Richard Zhu) - Add "vph-supply" to indicate which regulator supplies PHY (Richard Zhu) - Enable PHY internal regulator when supplied >3V (Richard Zhu) * pci/host/imx6: PCI: imx6: Enable PHY internal regulator when supplied >3V dt-bindings: imx6q-pcie: Add "vph-supply" for PHY supply voltage PCI: imx6: Limit DBI register length for imx6qp PCIe PCI: imx6: Remove imx6_pcie_probe() redundant error message commit 524e6b0395988b93791ffe576cb671d4a6a7bf34 Merge: 7132700067f23 e9c3bbd68ec7d Author: Bjorn Helgaas Date: Tue Jul 6 10:56:26 2021 -0500 Merge branch 'pci/virtualization' - Clarify error message for unbound devices (Moritz Fischer) * pci/virtualization: PCI/IOV: Clarify error message for unbound devices commit 7132700067f234d37c234e5d711bb49ea06d2352 Merge: 131e4f76c9ae9 14c19b2a40b61 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:25 2021 -0500 Merge branch 'pci/sysfs' - Fix dsm_label_utf16s_to_utf8s() buffer overrun (Krzysztof Wilczyński) - Use sysfs_emit() and sysfs_emit_at() in "show" functions (Krzysztof Wilczyński) - Fix 'resource_alignment' newline issues (Krzysztof Wilczyński) - Add newline to 'devspec' sysfs file (Krzysztof Wilczyński) * pci/sysfs: PCI/sysfs: Add 'devspec' newline PCI/sysfs: Fix 'resource_alignment' newline issues PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions PCI/sysfs: Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s() PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun # Conflicts: # drivers/pci/p2pdma.c commit 131e4f76c9ae9636046bf04d19d43af0e4ae9807 Merge: 76d826c32f88a 65db04053efea Author: Bjorn Helgaas Date: Tue Jul 6 10:56:25 2021 -0500 Merge branch 'pci/resource' - Coalesce host bridge apertures so we can allocate large BARs that cross contiguous apertures (Kai-Heng Feng) * pci/resource: PCI: Coalesce host bridge contiguous apertures commit 76d826c32f88a1c39bc51cf262db48b4babc7414 Merge: e92605b0a0cda 411e2a43d210e Author: Bjorn Helgaas Date: Tue Jul 6 10:56:24 2021 -0500 Merge branch 'pci/reset' - Add pci_reset_bus_function() Secondary Bus Reset interface (Raphael Norwitz) - Work around Huawei Intelligent NIC VF FLR erratum (Chiqijun) * pci/reset: PCI: Work around Huawei Intelligent NIC VF FLR erratum PCI: Add pci_reset_bus_function() Secondary Bus Reset interface commit e92605b0a0cdafb6c37b9d1ad24fe1cf8280eeb6 Merge: c9fb9042c98df 4694ae373dc21 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:24 2021 -0500 Merge branch 'pci/pm' - Leave Apple Thunderbolt controllers on for s2idle or standby so they work after resume (Konstantin Kharlamov) * pci/pm: PCI: Leave Apple Thunderbolt controllers on for s2idle or standby commit c9fb9042c98df94197a1ba4cf14a77c8053b0fae Merge: 96b0df246c999 ae21f835a5bda Author: Bjorn Helgaas Date: Tue Jul 6 10:56:24 2021 -0500 Merge branch 'pci/p2pdma' - Rename Rename upstream_bridge_distance() to calc_map_type_and_dist() (Logan Gunthorpe) - Collect ACS list message in stack buffer to avoid sleeping (Logan Gunthorpe) - Use correct calc_map_type_and_dist() return type (Logan Gunthorpe) - Warn if host bridge not in whitelist (Logan Gunthorpe) - Refactor pci_p2pdma_map_type() (Logan Gunthorpe) - Avoid pci_get_slot(), which may sleep (Logan Gunthorpe) - Simplify distance calculation in __calc_map_type_and_dist() and calc_map_type_and_dist_warn() (Christoph Hellwig) - Finish RCU conversion of pdev->p2pdma (Eric Dumazet) * pci/p2pdma: PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma PCI/P2PDMA: Simplify distance calculation PCI/P2PDMA: Avoid pci_get_slot(), which may sleep PCI/P2PDMA: Refactor pci_p2pdma_map_type() PCI/P2PDMA: Warn if host bridge not in whitelist PCI/P2PDMA: Use correct calc_map_type_and_dist() return type PCI/P2PDMA: Collect acs list in stack buffer to avoid sleeping PCI/P2PDMA: Rename upstream_bridge_distance() and rework doc commit 96b0df246c999bee711570d1f6aefd3159f4b12b Merge: 56d2731cb27e1 4db221f6983aa Author: Bjorn Helgaas Date: Tue Jul 6 10:56:23 2021 -0500 Merge branch 'pci/misc' - Return true/false (not 1/0) from bool functions (Yang Li) - Add Joyce Ooi as Altera PCIe maintainer (Joyce Ooi) * pci/misc: MAINTAINERS: Add Joyce Ooi as Altera PCIe maintainer x86/pci: Return true/false (not 1/0) from bool functions commit 56d2731cb27e17ff8d2228ad4f78e9c0e8d13420 Merge: 5f2554cc0ae20 6d71cc4c91d85 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:23 2021 -0500 Merge branch 'pci/hotplug' - Ignore pciehp Link Down/Up caused by DPC so device remains bound to driver (Lukas Wunner) - Declare global cpci_debug in header file (Krzysztof Wilczyński) * pci/hotplug: PCI: cpcihp: Declare cpci_debug in header file PCI: pciehp: Ignore Link Down/Up caused by DPC commit 5f2554cc0ae202db743dc1155e55b7111409e822 Merge: 104eb9d8c9723 8e3237989b0d3 Author: Bjorn Helgaas Date: Tue Jul 6 10:56:22 2021 -0500 Merge branch 'pci/error' - Make domain/bus/dev/fn format in AER messages match pci_name() format (Yicong Yang) * pci/error: Documentation: PCI: Fix typo in pci-error-recovery.rst PCI/AER: Use consistent format when printing PCI device commit 104eb9d8c97235d73220821ed3c12ee6450cfa7a Merge: 6efb943b8616e 8fe55ef23387c Author: Bjorn Helgaas Date: Tue Jul 6 10:56:22 2021 -0500 Merge branch 'pci/enumeration' - Add a debug message on PCI device release (Niklas Schnelle) - Dynamically map ECAM regions to reduce vmalloc usage (Russell King) * pci/enumeration: PCI: Dynamically map ECAM regions PCI: Print a debug message on PCI device release commit ae21f835a5bda0ef1d00940373445693a764d89e Author: Eric Dumazet Date: Thu Jul 1 16:48:23 2021 -0500 PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma While looking at pci_alloc_p2pmem() I found RCU protection was not properly applied there, as pdev->p2pdma was potentially read multiple times. Fix pci_alloc_p2pmem(), add __rcu qualifier to p2pdma field of struct pci_dev, and fix all other accesses to this field with proper RCU verbs. Link: https://lore.kernel.org/r/20210701095621.3129283-1-eric.dumazet@gmail.com Fixes: 1570175abd16 ("PCI/P2PDMA: track pgmap references per resource, not globally") Signed-off-by: Eric Dumazet Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Cc: Dan Williams Cc: Ira Weiny Cc: Greg Kroah-Hartman Cc: "Jérôme Glisse" Cc: "Rafael J. Wysocki" commit 662e4b03431f5304603f1e42c4d4c2c1d64cba40 Author: Bjorn Helgaas Date: Mon May 17 12:18:39 2021 -0500 PCI: xgene: Annotate __iomem pointer "bar_addr" is passed as the argument to writel(), which expects a "void __iomem *". Annotate "bar_addr" correctly. Resolves an sparse "incorrect type in argument 2 (different address spaces)" warning. Link: https://lore.kernel.org/r/202105171809.Tay9fImZ-lkp@intel.com Link: https://lore.kernel.org/r/20210517171839.25777-1-helgaas@kernel.org Reported-by: kernel test robot Signed-off-by: Bjorn Helgaas Signed-off-by: Lorenzo Pieralisi commit 347269c113f10fbe893f11dd3ae5f44aa15d3111 Author: Krzysztof Wilczyński Date: Sat Jul 3 15:13:02 2021 +0000 PCI: Fix kernel-doc formatting Fix kernel-doc formatting throughout drivers/pci and related include files. No change to functionality intended. Check for warnings: $ find include drivers/pci -type f -path "*pci*.[ch]" | xargs scripts/kernel-doc -none [bhelgaas: squashed to one commit] Link: https://lore.kernel.org/r/20210509030237.368540-1-kw@linux.com Link: https://lore.kernel.org/r/20210703151306.1922450-1-kw@linux.com Link: https://lore.kernel.org/r/20210703151306.1922450-2-kw@linux.com Link: https://lore.kernel.org/r/20210703151306.1922450-3-kw@linux.com Link: https://lore.kernel.org/r/20210703151306.1922450-4-kw@linux.com Link: https://lore.kernel.org/r/20210703151306.1922450-5-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit d1b5b80da7058883758df2b5b7f506d4d4f9a5fa Author: Pablo Neira Ayuso Date: Mon Jul 5 20:14:21 2021 +0200 netfilter: nft_last: incorrect arithmetics when restoring last used Subtract the jiffies that have passed by to current jiffies to fix last used restoration. Fixes: 836382dc2471 ("netfilter: nf_tables: add last expression") Signed-off-by: Pablo Neira Ayuso commit 6ac4bac4ce48604cf0f4b04d61884552520ca55e Author: Pablo Neira Ayuso Date: Mon Jul 5 17:45:36 2021 +0200 netfilter: nft_last: honor NFTA_LAST_SET on restoration NFTA_LAST_SET tells us if this expression has ever seen a packet, do not ignore this attribute when restoring the ruleset. Fixes: 836382dc2471 ("netfilter: nf_tables: add last expression") Signed-off-by: Pablo Neira Ayuso commit cf4466ea47db891be785f867ca7f99e0cd9898c6 Author: Manfred Spraul Date: Sun Jun 27 18:19:18 2021 +0200 netfilter: conntrack: Mark access for KCSAN KCSAN detected an data race with ipc/sem.c that is intentional. As nf_conntrack_lock() uses the same algorithm: Update nf_conntrack_core as well: nf_conntrack_lock() contains a1) spin_lock() a2) smp_load_acquire(nf_conntrack_locks_all). a1) actually accesses one lock from an array of locks. nf_conntrack_locks_all() contains b1) nf_conntrack_locks_all=true (normal write) b2) spin_lock() b3) spin_unlock() b2 and b3 are done for every lock. This guarantees that nf_conntrack_locks_all() prevents any concurrent nf_conntrack_lock() owners: If a thread past a1), then b2) will block until that thread releases the lock. If the threat is before a1, then b3)+a1) ensure the write b1) is visible, thus a2) is guaranteed to see the updated value. But: This is only the latest time when b1) becomes visible. It may also happen that b1) is visible an undefined amount of time before the b3). And thus KCSAN will notice a data race. In addition, the compiler might be too clever. Solution: Use WRITE_ONCE(). Signed-off-by: Manfred Spraul Signed-off-by: Pablo Neira Ayuso commit 1da4cd82dd180224503e745ccf3220e3490d8897 Author: Ali Abdallah Date: Thu May 27 09:19:06 2021 +0200 netfilter: conntrack: add new sysctl to disable RST check This patch adds a new sysctl tcp_ignore_invalid_rst to disable marking out of segments RSTs as INVALID. Signed-off-by: Ali Abdallah Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c4edc3ccbc63947e697bd2e30afca8bfaa144998 Author: Ali Abdallah Date: Thu May 20 12:53:11 2021 +0200 netfilter: conntrack: improve RST handling when tuple is re-used If we receive a SYN packet in original direction on an existing connection tracking entry, we let this SYN through because conntrack might be out-of-sync. Conntrack gets back in sync when server responds with SYN/ACK and state gets updated accordingly. However, if server replies with RST, this packet might be marked as INVALID because td_maxack value reflects the *old* conntrack state and not the state of the originator of the RST. Avoid td_maxack-based checks if previous packet was a SYN. Unfortunately that is not be enough: an out of order ACK in original direction updates last_index, so we still end up marking valid RST. Thus disable the sequence check when we are not in established state and the received RST has a sequence of 0. Because marking RSTs as invalid usually leads to unwanted timeouts, also skip RST sequence checks if a conntrack entry is already closing. Such entries can already be evicted via GC in case the table is full. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Ali Abdallah Signed-off-by: Pablo Neira Ayuso commit 1df3af6dc3cfe643f43d46f202bd44861ccbdb99 Author: Nicholas Piggin Date: Tue Jul 6 15:13:10 2021 +1000 powerpc/64e: Fix system call illegal mtmsrd instruction BookE does not have mtmsrd, switch to use wrteei to enable MSR[EE]. Fixes: dd152f70bdc1 ("powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE]") Reported-by: Christian Zigotzky Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210706051310.608992-1-npiggin@gmail.com commit cd4220d23bf3f43cf720e82bdee681f383433ae2 Author: Christian Borntraeger Date: Thu Jul 1 17:42:24 2021 +0200 KVM: selftests: do not require 64GB in set_memory_region_test Unless the user sets overcommit_memory or has plenty of swap, the latest changes to the testcase will result in ENOMEM failures for hosts with less than 64GB RAM. As we do not use much of the allocated memory, we can use MAP_NORESERVE to avoid this error. Cc: Zenghui Yu Cc: vkuznets@redhat.com Cc: wanghaibin.wang@huawei.com Cc: stable@vger.kernel.org Fixes: 309505dd5685 ("KVM: selftests: Fix mapping length truncation in m{,un}map()") Tested-by: Zenghui Yu Link: https://lore.kernel.org/kvm/20210701160425.33666-1-borntraeger@de.ibm.com/ Signed-off-by: Christian Borntraeger commit fb5dad4084f0ea6b6df5fe90f157531ca6e20681 Author: Christian Borntraeger Date: Tue Jun 8 14:39:54 2021 +0200 KVM: selftests: introduce P44V64 for z196 and EC12 Older machines like z196 and zEC12 do only support 44 bits of physical addresses. Make this the default and check via IBC if we are on a later machine. We then add P47V64 as an additional model. Reviewed-by: David Hildenbrand Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Link: https://lore.kernel.org/kvm/20210701153853.33063-1-borntraeger@de.ibm.com/ Fixes: 1bc603af73dd ("KVM: selftests: introduce P47V64 for s390x") commit bc832065b60f973771ff3e657214bb21b559833c Author: Gu Shengxian Date: Mon Jul 5 18:35:43 2021 -0700 bpftool: Properly close va_list 'ap' by va_end() on error va_list 'ap' was opened but not closed by va_end() in error case. It should be closed by va_end() before the return. Fixes: aa52bcbe0e72 ("tools: bpftool: Fix json dump crash on powerpc") Signed-off-by: Gu Shengxian Signed-off-by: Daniel Borkmann Cc: Jiri Olsa Link: https://lore.kernel.org/bpf/20210706013543.671114-1-gushengxian507419@gmail.com commit 024591f9a6e0164ec23301784d1e6d8f6cacbe59 Author: Mike Rapoport Date: Mon Jul 5 08:43:10 2021 +0300 arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM The semantics of pfn_valid() is to check presence of the memory map for a PFN and not whether a PFN is in RAM. The memory map may be present for a hole in the physical memory and if such hole corresponds to an MMIO range, __arm_ioremap_pfn_caller() will produce a WARN() and fail: [ 2.863406] WARNING: CPU: 0 PID: 1 at arch/arm/mm/ioremap.c:287 __arm_ioremap_pfn_caller+0xf0/0x1dc [ 2.864812] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-09882-ga180bd1d7e16 #1 [ 2.865263] Hardware name: Generic DT based system [ 2.865711] Backtrace: [ 2.866063] [<80b07e58>] (dump_backtrace) from [<80b080ac>] (show_stack+0x20/0x24) [ 2.866633] r7:00000009 r6:0000011f r5:60000153 r4:80ddd1c0 [ 2.866922] [<80b0808c>] (show_stack) from [<80b18df0>] (dump_stack_lvl+0x58/0x74) [ 2.867117] [<80b18d98>] (dump_stack_lvl) from [<80b18e20>] (dump_stack+0x14/0x1c) [ 2.867309] r5:80118cac r4:80dc6774 [ 2.867404] [<80b18e0c>] (dump_stack) from [<80122fcc>] (__warn+0xe4/0x150) [ 2.867583] [<80122ee8>] (__warn) from [<80b08850>] (warn_slowpath_fmt+0x88/0xc0) [ 2.867774] r7:0000011f r6:80dc6774 r5:00000000 r4:814c4000 [ 2.867917] [<80b087cc>] (warn_slowpath_fmt) from [<80118cac>] (__arm_ioremap_pfn_caller+0xf0/0x1dc) [ 2.868158] r9:00000001 r8:9ef00000 r7:80e8b0d4 r6:0009ef00 r5:00000000 r4:00100000 [ 2.868346] [<80118bbc>] (__arm_ioremap_pfn_caller) from [<80118df8>] (__arm_ioremap_caller+0x60/0x68) [ 2.868581] r9:9ef00000 r8:821b6dc0 r7:00100000 r6:00000000 r5:815d1010 r4:80118d98 [ 2.868761] [<80118d98>] (__arm_ioremap_caller) from [<80118fcc>] (ioremap+0x28/0x30) [ 2.868958] [<80118fa4>] (ioremap) from [<8062871c>] (__devm_ioremap_resource+0x154/0x1c8) [ 2.869169] r5:815d1010 r4:814c5d2c [ 2.869263] [<806285c8>] (__devm_ioremap_resource) from [<8062899c>] (devm_ioremap_resource+0x14/0x18) [ 2.869495] r9:9e9f57a0 r8:814c4000 r7:815d1000 r6:815d1010 r5:8177c078 r4:815cf400 [ 2.869676] [<80628988>] (devm_ioremap_resource) from [<8091c6e4>] (fsi_master_acf_probe+0x1a8/0x5d8) [ 2.869909] [<8091c53c>] (fsi_master_acf_probe) from [<80723dbc>] (platform_probe+0x68/0xc8) [ 2.870124] r9:80e9dadc r8:00000000 r7:815d1010 r6:810c1000 r5:815d1010 r4:00000000 [ 2.870306] [<80723d54>] (platform_probe) from [<80721208>] (really_probe+0x1cc/0x470) [ 2.870512] r7:815d1010 r6:810c1000 r5:00000000 r4:815d1010 [ 2.870651] [<8072103c>] (really_probe) from [<807215cc>] (__driver_probe_device+0x120/0x1fc) [ 2.870872] r7:815d1010 r6:810c1000 r5:810c1000 r4:815d1010 [ 2.871013] [<807214ac>] (__driver_probe_device) from [<807216e8>] (driver_probe_device+0x40/0xd8) [ 2.871244] r9:80e9dadc r8:00000000 r7:815d1010 r6:810c1000 r5:812feaa0 r4:812fe994 [ 2.871428] [<807216a8>] (driver_probe_device) from [<80721a58>] (__driver_attach+0xa8/0x1d4) [ 2.871647] r9:80e9dadc r8:00000000 r7:00000000 r6:810c1000 r5:815d1054 r4:815d1010 [ 2.871830] [<807219b0>] (__driver_attach) from [<8071ee8c>] (bus_for_each_dev+0x88/0xc8) [ 2.872040] r7:00000000 r6:814c4000 r5:807219b0 r4:810c1000 [ 2.872194] [<8071ee04>] (bus_for_each_dev) from [<80722208>] (driver_attach+0x28/0x30) [ 2.872418] r7:810a2aa0 r6:00000000 r5:821b6000 r4:810c1000 [ 2.872570] [<807221e0>] (driver_attach) from [<8071f80c>] (bus_add_driver+0x114/0x200) [ 2.872788] [<8071f6f8>] (bus_add_driver) from [<80722ec4>] (driver_register+0x98/0x128) [ 2.873011] r7:81011d0c r6:814c4000 r5:00000000 r4:810c1000 [ 2.873167] [<80722e2c>] (driver_register) from [<80725240>] (__platform_driver_register+0x2c/0x34) [ 2.873408] r5:814dcb80 r4:80f2a764 [ 2.873513] [<80725214>] (__platform_driver_register) from [<80f2a784>] (fsi_master_acf_init+0x20/0x28) [ 2.873766] [<80f2a764>] (fsi_master_acf_init) from [<80f014a8>] (do_one_initcall+0x108/0x290) [ 2.874007] [<80f013a0>] (do_one_initcall) from [<80f01840>] (kernel_init_freeable+0x1ac/0x230) [ 2.874248] r9:80e9dadc r8:80f3987c r7:80f3985c r6:00000007 r5:814dcb80 r4:80f627a4 [ 2.874456] [<80f01694>] (kernel_init_freeable) from [<80b19f44>] (kernel_init+0x20/0x138) [ 2.874691] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:80b19f24 [ 2.874894] r4:00000000 [ 2.874977] [<80b19f24>] (kernel_init) from [<80100170>] (ret_from_fork+0x14/0x24) [ 2.875231] Exception stack(0x814c5fb0 to 0x814c5ff8) [ 2.875535] 5fa0: 00000000 00000000 00000000 00000000 [ 2.875849] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.876133] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 2.876363] r5:80b19f24 r4:00000000 [ 2.876683] ---[ end trace b2f74b8536829970 ]--- [ 2.876911] fsi-master-acf gpio-fsi: ioremap failed for resource [mem 0x9ef00000-0x9effffff] [ 2.877492] fsi-master-acf gpio-fsi: Error -12 mapping coldfire memory [ 2.877689] fsi-master-acf: probe of gpio-fsi failed with error -12 Use memblock_is_map_memory() instead of pfn_valid() to check if a PFN is in RAM or not. Reported-by: Guenter Roeck Fixes: a4d5613c4dc6 ("arm: extend pfn_valid to take into account freed memory map alignment") Signed-off-by: Mike Rapoport Tested-by: Guenter Roeck commit 70eee556b678d1e4cd4ea6742a577b596963fa25 Author: Jeff Xie Date: Sun Jun 20 20:01:51 2021 +0800 riscv: ptrace: add argn syntax This enables ftrace kprobe events to access kernel function arguments via $argN syntax. Signed-off-by: Jeff Xie Signed-off-by: Palmer Dabbelt commit 9eb4fcff220790f4afadf59160f2c696e99f0a84 Author: Nanyong Sun Date: Thu Jun 17 17:58:31 2021 +0800 riscv: mm: fix build errors caused by mk_pmd() With "riscv: mm: add THP support on 64-bit", mk_pmd() function introduce build errors, 1.build with CONFIG_ARCH_RV32I=y: arch/riscv/include/asm/pgtable.h: In function 'mk_pmd': arch/riscv/include/asm/pgtable.h:513:9: error: implicit declaration of function 'pfn_pmd'; did you mean 'pfn_pgd'? [-Werror=implicit-function-declaration] 2.build with CONFIG_SPARSEMEM=y && CONFIG_SPARSEMEM_VMEMMAP=n arch/riscv/include/asm/pgtable.h: In function 'mk_pmd': include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration] Move the definition of mk_pmd to pgtable-64.h to fix the first error. Use macro definition instead of inline function for mk_pmd to fix the second problem. It is similar to the mk_pte macro. Reported-by: kernel test robot Signed-off-by: Nanyong Sun Tested-by: Geert Uytterhoeven Signed-off-by: Palmer Dabbelt commit 658e2c5125bbbc9b9b5eac23b3c35b87df3c30b8 Author: Alexandre Ghiti Date: Thu Jun 17 15:53:07 2021 +0200 riscv: Introduce structure that group all variables regarding kernel mapping We have a lot of variables that are used to hold kernel mapping addresses, offsets between physical and virtual mappings and some others used for XIP kernels: they are all defined at different places in mm/init.c, so group them into a single structure with, for some of them, more explicit and concise names. Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit c9ebd3df43c067b57203737484076345b6df2fb4 Author: Jaegeuk Kim Date: Sun Jul 4 22:11:25 2021 -0700 f2fs: initialize page->private when using for our internal use We need to guarantee it's initially zero. Otherwise, it'll hurt entire flag operations. Fixes: b763f3bedc2d ("f2fs: restructure f2fs page.private layout") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2620e92ae6ed83260eb46d214554cd308ee35d92 Author: Wang Hai Date: Mon Jun 28 17:18:15 2021 +0800 bpf, samples: Fix xdpsock with '-M' parameter missing unload process Execute the following command and exit, then execute it again, the following error will be reported: $ sudo ./samples/bpf/xdpsock -i ens4f2 -M ^C $ sudo ./samples/bpf/xdpsock -i ens4f2 -M libbpf: elf: skipping unrecognized data section(16) .eh_frame libbpf: elf: skipping relo section(17) .rel.eh_frame for section(16) .eh_frame libbpf: Kernel error message: XDP program already attached ERROR: link set xdp fd failed Commit c9d27c9e8dc7 ("samples: bpf: Do not unload prog within xdpsock") removed the unloading prog code because of the presence of bpf_link. This is fine if XDP_SHARED_UMEM is disabled, but if it is enabled, unloading the prog is still needed. Fixes: c9d27c9e8dc7 ("samples: bpf: Do not unload prog within xdpsock") Signed-off-by: Wang Hai Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Cc: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20210628091815.2373487-1-wanghai38@huawei.com commit 79160a603bdb51916226caf4a6616cc4e1c58a58 Merge: c932ed0adb09a 7756f1d6369e6 Author: Linus Torvalds Date: Mon Jul 5 14:16:22 2021 -0700 Merge tag 'usb-5.14-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 USB and Thunderbolt patches for 5.14-rc1. Nothing major here just lots of little changes for new hardware and features. Highlights are: - more USB 4 support added to the thunderbolt core - build warning fixes all over the place - usb-serial driver updates and new device support - mtu3 driver updates - gadget driver updates - dwc3 driver updates - dwc2 driver updates - isp1760 host driver updates - musb driver updates - lots of other tiny things. Full details are in the shortlog. All of these have been in linux-next for a while now with no reported issues" * tag 'usb-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (223 commits) phy: qcom-qusb2: Add configuration for SM4250 and SM6115 dt-bindings: phy: qcom,qusb2: document sm4250/6115 compatible dt-bindings: usb: qcom,dwc3: Add bindings for sm6115/4250 USB: cdc-acm: blacklist Heimann USB Appset device usb: xhci-mtk: allow multiple Start-Split in a microframe usb: ftdi-elan: remove redundant continue statement in a while-loop usb: class: cdc-wdm: return the correct errno code xhci: remove redundant continue statement usb: dwc3: Fix debugfs creation flow usb: gadget: hid: fix error return code in hid_bind() usb: gadget: eem: fix echo command packet response issue usb: gadget: f_hid: fix endianness issue with descriptors Revert "USB: misc: Add onboard_usb_hub driver" Revert "of/platform: Add stubs for of_platform_device_create/destroy()" Revert "usb: host: xhci-plat: Create platform device for onboard hubs in probe()" Revert "arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub" xhci: solve a double free problem while doing s4 xhci: handle failed buffer copy to URB sg list and fix a W=1 copiler warning xhci: Add adaptive interrupt rate for isoch TRBs with XHCI_AVOID_BEI quirk xhci: Remove unused defines for ERST_SIZE and ERST_ENTRIES ... commit c932ed0adb09a7fa6d6649ee04dd78c83ab07ada Merge: a16d8644bad46 15279ebe99d7c Author: Linus Torvalds Date: Mon Jul 5 14:08:24 2021 -0700 Merge tag 'tty-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial updates from Greg KH: "Here is the big set of tty and serial driver patches for 5.14-rc1. A bit more than normal, but nothing major, lots of cleanups. Highlights are: - lots of tty api cleanups and mxser driver cleanups from Jiri - build warning fixes - various serial driver updates - coding style cleanups - various tty driver minor fixes and updates - removal of broken and disable r3964 line discipline (finally!) All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (227 commits) serial: mvebu-uart: remove unused member nb from struct mvebu_uart arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART dt-bindings: mvebu-uart: fix documentation serial: mvebu-uart: correctly calculate minimal possible baudrate serial: mvebu-uart: do not allow changing baudrate when uartclk is not available serial: mvebu-uart: fix calculation of clock divisor tty: make linux/tty_flip.h self-contained serial: Prefer unsigned int to bare use of unsigned serial: 8250: 8250_omap: Fix possible interrupt storm on K3 SoCs serial: qcom_geni_serial: use DT aliases according to DT bindings Revert "tty: serial: Add UART driver for Cortina-Access platform" tty: serial: Add UART driver for Cortina-Access platform MAINTAINERS: add me back as mxser maintainer mxser: Documentation, fix typos mxser: Documentation, make the docs up-to-date mxser: Documentation, remove traces of callout device mxser: introduce mxser_16550A_or_MUST helper mxser: rename flags to old_speed in mxser_set_serial_info mxser: use port variable in mxser_set_serial_info mxser: access info->MCR under info->slock ... commit a16d8644bad461bb073b92e812080ea6715ddf2b Merge: f5c13f1fdef9f 77ad1f0e99bd0 Author: Linus Torvalds Date: Mon Jul 5 14:01:53 2021 -0700 Merge tag 'staging-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver updates from Greg KH: "Here is the big set of IIO and staging driver patches for 5.14-rc1. Loads of IIO driver updates and additions in here, the shortlog has the full details. For the staging side, we moved a few drivers out of staging, and deleted the kpc2000 drivers as the original developer asked us to because no one was working on them anymore. Also in here are loads of coding style cleanups due to different intern projects focusing on the staging tree to try to get experience doing kernel development. All of these have been in the linux-next tree for a while with no reported problems" * tag 'staging-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (744 commits) staging: hi6421-spmi-pmic: cleanup some macros staging: hi6421-spmi-pmic: change identation of a table staging: hi6421-spmi-pmic: change a return code staging: hi6421-spmi-pmic: better name IRQs staging: hi6421-spmi-pmic: use devm_request_threaded_irq() staging: hisilicon,hi6421-spmi-pmic.yaml: cleanup descriptions spmi: hisi-spmi-controller: move driver from staging phy: phy-hi3670-usb3: move driver from staging into phy staging: rtl8188eu: remove include/rtw_debug.h header staging: rtl8188eu: remove GlobalDebugLevel variable staging: rtl8188eu: remove DRIVER_PREFIX preprocessor definition staging: rtl8188eu: remove RT_TRACE macro staging: rtl8188eu: remove all RT_TRACE calls from hal/rtl8188eu_recv.c staging: rtl8188eu: remove all RT_TRACE calls from hal/hal_intf.c staging: rtl8188eu: remove all RT_TRACE calls from hal/rtl8188eu_xmit.c staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_xmit.c staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_pwrctrl.c staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_recv.c staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_ioctl_set.c staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_ieee80211.c ... commit f5c13f1fdef9fed65b95c3c5f343d22c425ac1d7 Merge: eed0218e8cae9 3b1f941536af1 Author: Linus Torvalds Date: Mon Jul 5 13:51:41 2021 -0700 Merge tag 'driver-core-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core changes from Greg KH: "Here is the small set of driver core and debugfs updates for 5.14-rc1. Included in here are: - debugfs api cleanups (touched some drivers) - devres updates - tiny driver core updates and tweaks Nothing major in here at all, and all have been in linux-next for a while with no reported issues" * tag 'driver-core-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (27 commits) docs: ABI: testing: sysfs-firmware-memmap: add some memmap types. devres: Enable trace events devres: No need to call remove_nodes() when there none present devres: Use list_for_each_safe_from() in remove_nodes() devres: Make locking straight forward in release_nodes() kernfs: move revalidate to be near lookup drivers/base: Constify static attribute_group structs firmware_loader: remove unneeded 'comma' macro devcoredump: remove contact information driver core: Drop helper devm_platform_ioremap_resource_wc() component: Rename 'dev' to 'parent' component: Drop 'dev' argument to component_match_realloc() device property: Don't check for NULL twice in the loops driver core: auxiliary bus: Fix typo in the docs drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO debugfs: remove return value of debugfs_create_ulong() debugfs: remove return value of debugfs_create_bool() scsi: snic: debugfs: remove local storage of debugfs files b43: don't save dentries for debugfs b43legacy: don't save dentries for debugfs ... commit eed0218e8cae9fcd186c30e9fcf5fe46a87e056e Merge: 3f8b8e7dbd790 6f746d485fb91 Author: Linus Torvalds Date: Mon Jul 5 13:42:16 2021 -0700 Merge tag 'char-misc-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver updates from Greg KH: "Here is the big set of char / misc and other driver subsystem updates for 5.14-rc1. Included in here are: - habanalabs driver updates - fsl-mc driver updates - comedi driver updates - fpga driver updates - extcon driver updates - interconnect driver updates - mei driver updates - nvmem driver updates - phy driver updates - pnp driver updates - soundwire driver updates - lots of other tiny driver updates for char and misc drivers This is looking more and more like the "various driver subsystems mushed together" tree... All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (292 commits) mcb: Use DEFINE_RES_MEM() helper macro and fix the end address PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable bus: mhi: pci-generic: Add missing 'pci_disable_pcie_error_reporting()' calls bus: mhi: Wait for M2 state during system resume bus: mhi: core: Fix power down latency intel_th: Wait until port is in reset before programming it intel_th: msu: Make contiguous buffers uncached intel_th: Remove an unused exit point from intel_th_remove() stm class: Spelling fix nitro_enclaves: Set Bus Master for the NE PCI device misc: ibmasm: Modify matricies to matrices misc: vmw_vmci: return the correct errno code siox: Simplify error handling via dev_err_probe() fpga: machxo2-spi: Address warning about unused variable lkdtm/heap: Add init_on_alloc tests selftests/lkdtm: Enable various testable CONFIGs lkdtm: Add CONFIG hints in errors where possible lkdtm: Enable DOUBLE_FAULT on all architectures lkdtm/heap: Add vmalloc linear overflow test lkdtm/bugs: XFAIL UNALIGNED_LOAD_STORE_WRITE ... commit 5a0ae9872d5cb5f27590eed168d4b3b144350ed7 Author: Toke Høiland-Jørgensen Date: Mon Jul 5 12:38:41 2021 +0200 bpf, samples: Add -fno-asynchronous-unwind-tables to BPF Clang invocation The samples/bpf Makefile currently compiles BPF files in a way that will produce an .eh_frame section, which will in turn confuse libbpf and produce errors when loading BPF programs, like: libbpf: elf: skipping unrecognized data section(32) .eh_frame libbpf: elf: skipping relo section(33) .rel.eh_frame for section(32) .eh_frame Fix this by instruction Clang not to produce this section, as it's useless for BPF anyway. Suggested-by: Daniel Borkmann Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210705103841.180260-1-toke@redhat.com commit 3f8b8e7dbd79086ad48fcff33de9399f3da66a69 Merge: 463c09d09d426 1181f2164135d Author: Linus Torvalds Date: Mon Jul 5 12:16:00 2021 -0700 Merge tag 'backlight-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Drivers: - Add support for Richtek RT4831 Backlight New Device Support: - Add support for Qualcomm PMI8994 WLED Backlight Fix-ups: - Device Tree adaptions to richtek,rt4831-backlight - Trivial spelling, whitespace, etc in Kconfig - Use Atomic PWM API in lm3630a_bl Bug Fixes: - Fix Firmware Node Leak in error path in lm3630a_bl - Fix erroneous return codes in lm3630a_bl" * tag 'backlight-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: lm3630a: Convert to atomic PWM API and check for errors backlight: lm3630a: Fix return code of .update_status() callback backlight: Kconfig whitespace and indentation cleanups video: backlight: qcom-wled: Add PMI8994 compatible backlight: rt4831: Adds support for Richtek RT4831 backlight backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight backlight: lm3630a_bl: Put fwnode in error case during ->probe() commit 463c09d09d426d4dfe1a83e1461e28d6b2d7f66a Merge: 18ef082713ad1 8a14ded5a8cb7 Author: Linus Torvalds Date: Mon Jul 5 12:10:34 2021 -0700 Merge tag 'mfd-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull mfd updates from Lee Jones: "Core Frameworks: - Fix Software Node clean-up code New Drivers: - Add support for MediaTek MT6359 PMIC - Add support for Qualcomm PM8008 PMIC - Add support for Richtek RT4831 New Device Support: - Add support for Audio CODECs to Rockchip RK817 - Add support for Alder Lake-M to Intel LPSS PCI - Add support for Periph Device Charge to ChromeOS EC New Functionality: - Provide additional IRQs for wcd934x - Add optional Reset functionality to lp87565 Fix-ups: - Namespacing & visibility fixes to lp87565 - Differentiate between Power and Home key IRQs in mt6358 - Export I2C device tables in da9052-i2c, stmpe-i2c - Adapt IRQ flags in max8907, rn5t61, max8907 - Make some functions/devices optional in axp20x, cros_ec_dev - Explicitly include used header files in ioc3 - Remove superfluous lines in MAINTAINERS, sec-core, st,stm32-timers - Resolve Kerneldoc issues in omap-usb-host, omap-usb-tll, si476x-cmd, si476x-i2c - Convert arizona-core to a module - Copyright changes in hi655x-pmic - Drop support for board file initialisation in sec-core - Trivial spelling, whitespace etc updates in lp87565, si476x-cmd, mt6360-core, wm831x-core, twl-core, db8500-prcmu - Simplify various implementations of wcd934x, mt6360-core, max8997, max8998, da9052-i2c, da9062-core, sec-core, - Device Tree binding changes in google,cros-ec, richtek,rt4831-backlight, db8500-prcmu, qcom,pm8008, qcom,spmi-pmic - Use provided APIs to simplify t7l66xb, as3722, da9055-core, tps80031, 88pm800, 88pm805, asic3, sun6i-prcm, wm831x-core, wm831x-otp, ucb1x00-assabet, timberdale, sm501, pcf50633-core, kempld-core, janz-cmodio, intel_soc_pmic_bxtwc, ab8500-core Bug Fixes: - Fix unused variable warning in rk817_codec - Fix regulator voltage configuration in rohm-bd71828 - Fix ongoing freeing of regmap_config 'name' issue in syscon - Fix error handling path in da9063-i2c - Fix Kconfig issues in MFD_MP2629 - Fix DMA mask warnings in motorola-cpcap" * tag 'mfd-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (83 commits) mfd: cros_ec: Add peripheral device charger mfd: max8907: Remove IRQF_NO_AUTOEN flag mfd: ab8500-core: Use DEVICE_ATTR_RO/RW macro mfd: intel_soc_pmic_bxtwc: Use DEVICE_ATTR_ADMIN_RW macro mfd: janz-cmodio: Use DEVICE_ATTR_RO macro mfd: kempld-core: Use DEVICE_ATTR_RO macro mfd: pcf50633: Use DEVICE_ATTR_ADMIN_RO macro mfd: sm501: Use DEVICE_ATTR_RO macro mfd: timberdale: Use DEVICE_ATTR_RO macro mfd: ucb1x00-assabet: Use DEVICE_ATTR_RO macro mfd: wm831x: Use DEVICE_ATTR_RO macro mfd: wm831x: Use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_IRQ() to simplify code dt-bindings: mfd: stm32-timers: Remove #address/size cells from required properties mfd: sun6i-prcm: Use DEFINE_RES_MEM() to simplify code mfd: asic3: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code mfd: 88pm805: Use DEFINE_RES_IRQ_NAMED() to simplify code mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code mfd: tps80031: Use DEFINE_RES_IRQ() to simplify code mfd: da9055: Use DEFINE_RES_IRQ_NAMED() to simplify code mfd: as3722: Use DEFINE_RES_IRQ_NAMED() to simplify code ... commit 18ef082713ad1104c32cd17a15abdc3f43c9b28a Merge: 8f3f2ccf3c9ef 8d11cfb0c3754 Author: Linus Torvalds Date: Mon Jul 5 12:05:13 2021 -0700 Merge tag 'dmaengine-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "This time around we have a smaller pull request than usual and this includes code removal, so should be good! New drivers/devices - Support for QCOM SM8250 GPI DMA - removal of shdma-of driver and binding Updates: - arm-pl08x yaml binding move - altera-msgdma gained DT support - removal of imx-sdma platform data support - idxd and xilinx driver updates" * tag 'dmaengine-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (22 commits) dmaengine: imx-sdma: Remove platform data header dmaengine: xilinx: dpdma: Fix spacing around addr[i-1] dmaengine: xilinx: dpdma: Use kernel type u32 over uint32_t dmaengine: altera-msgdma: add OF support MAINTAINERS: add entry for Altera mSGDMA dt-bindings: dma: add schema for altera-msgdma dmaengine: xilinx: dpdma: fix kernel-doc dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy() dmaengine: sh: Remove unused shdma-of driver dt-bindings: dmaengine: Remove SHDMA Device Tree bindings dmaengine: qcom: gpi: Add SM8250 compatible dt-bindings: dmaengine: qcom: gpi: add compatible for sm8250 dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail dmaengine: ti: omap-dma: Skip pointless cpu_pm context restore on errors dmaengine: hsu: Account transferred bytes dmaengine: Move kdoc description of struct dma_chan_percpu closer to it dmaengine: xilinx: dpdma: Print debug message when losing vsync race dmaengine: xilinx: dpdma: Print channel number in kernel log messages dt-bindings: dma: convert arm-pl08x to yaml dmaengine: idxd: remove devm allocation for idxd->int_handles ... commit 8f3f2ccf3c9eff8e80e7993f8345a4fef52567be Merge: b8052599420cd d0244847f9fc5 Author: Linus Torvalds Date: Mon Jul 5 12:01:09 2021 -0700 Merge tag 'mmc-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson "MMC core: - Clear flags before allowing to retune MMC host: - sdhci: Clear unused bounce buffer at DMA mmap error path - sdhci: Fix warning message when accessing RPMB in HS400 mode - sdhci-of-arasan: Use clock-frequency property to update clk_xin - mtk-sd: Fixup compatible string for MT8195" * tag 'mmc-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode dt-bindings: mmc: change compatiable string for MT8195 mmc host IP mmc: sdhci: Clear unused bounce buffer at DMA mmap error path phy: intel: Fix for warnings due to EMMC clock 175Mhz change in FIP mmc: sdhci-of-arasan: Use clock-frequency property to update clk_xin mmc: core: clear flags before allowing to retune commit b8052599420cd94505baec1f22b4e7c9e5ae5fce Merge: 1f89a590b26e3 c34c1228fc1cf Author: Linus Torvalds Date: Mon Jul 5 11:48:14 2021 -0700 Merge tag 'gpio-updates-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "One new driver, support for new models in existing ones, dt-bindings conversions for several modules and improvements all over the place. Summary: - new driver for the IDT 79RC3243x GPIO controller - device tree bindings coversion to YAML for the following drivers: gpio-rk3328-grf, gpio-omap, gpio-davinci, gpio-zynq, gpio-stp, gpio-pcf857x - cleanup of probe functions in many drivers from Alexandru Ardelean, mostly dropping unnecessary calls to platform_set_drvdata() and removing error messages where none are needed (handled by the subsystem already) - several improvements to the core gpiolib and the sysfs interface code from Andy Shevchenko - conversion of the gpio-xilinx driver to using the bitmap API + improvements of suspend/resume handling + minor tweaks - convert the gpio-stmpe to using devres helpers exclusively in probe for improved robustness - updates for the generic gpio-regmap driver - updates for the gpio-dwapb driver - support for a new model in gpio-pca953x - cleanups in gpio-tegra186, gpio-104-idio-16, gpio-mxs & gpio-xgene - slight code refactoring of the gpio-zynq driver - documentation fixes from Mauro Carvalho Chehab - a bunch of minor tweaks and improvements all over the place" * tag 'gpio-updates-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (57 commits) docs: driver-api: gpio: using-gpio.rst: avoid using ReST :doc:`foo` markup dt-bindings: gpio: pcf857x: Convert to json-schema gpio: mxs: Prefer unsigned int to bare use of unsigned dt-bindings: gpio: stp: convert to json-schema dt-bindings: gpio: zynq: convert bindings to YAML dt-bindings: gpio: gpio-davinci: Convert to json-schema gpio: pca953x: Add support for the On Semi pca9655 gpio: gpio-xilinx: update on suspend and resume calls gpio: zynq: Check return value of irq_get_irq_data gpio: zynq: Check return value of pm_runtime_get_sync gpio: zynq: use module_platform_driver to simplify the code gpio: idt3243x: Fix return value check in idt_gpio_probe() MAINTAINERS: update ti,omap-gpio.yaml reference dt-bindings: gpio: Add devicetree binding for IDT 79RC32434 GPIO controller gpio: Add support for IDT 79RC3243x GPIO controller gpio: regmap: move drvdata to config data gpio-dwapb: Drop unused headers and sort the rest gpio: gpio-regmap: Use devm_add_action_or_reset() gpio: dwapb: Switch to use fwnode_irq_get() gpio: dwapb: Drop redundant check in dwapb_irq_set_type() ... commit 1f89a590b26e34ec7c32fbafaed446e52c3d0c3f Merge: da85e7ed69931 818b26588994d Author: Linus Torvalds Date: Mon Jul 5 11:42:45 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new driver for SparkFun Qwiic Joystick - pm8941-pwrkey driver now supports PMK8350 - a bunch of assorted driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (44 commits) Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl Input: hideep - fix the uninitialized use in hideep_nvm_unlock() Input: trackpoint - use kobj_to_dev() Input: atkbd - use kobj_to_dev() Input: tsc200x-core - use kobj_to_dev() Input: ims-pcu - use kobj_to_dev() Input: cros_ec_keyb - use kobj_to_dev() API dt-bindings: input: touchscreen: st1232: Convert to json-schema Input: i8042 - fix typos in comments Input: add SparkFun Qwiic Joystick driver dt-bindings: Add vendor prefix and bindings for Qwiic Joystick Input: cy8ctmg110_ts - switch to using gpiod API Input: cy8ctmg110_ts - switch to using managed resources Input: cy8ctmg110_ts - use endian helpers when converting data on wire Input: cy8ctmg110_ts - let I2C core configure wake interrupt Input: cy8ctmg110_ts - do not hardcode as wakeup source Input: cy8ctmg110_ts - do not hard code interrupt trigger Input: cy8ctmg110_ts - rely on platform code to supply interrupt Input: resistive-adc-touch - fix uninitialized variable 'press' Input: pm8941-pwrkey - add support for PMK8350 PON_HLOS PMIC peripheral ... commit da85e7ed6993144a9ca43a1106c7f898626390a3 Merge: 8fc4fb1728855 0bcc3939c98d8 Author: Linus Torvalds Date: Mon Jul 5 11:21:51 2021 -0700 Merge tag 'mtd/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Richard Weinberger: "MTD core changes: - Convert list_for_each to entry variant - Use MTD_DEVICE_ATTR_RO/RW() helper macros - Remove unnecessary OOM messages - Potential NULL dereference in mtd_otp_size() - Fix freeing of otp_info buffer - Create partname and partid debug files for child MTDs - tests: - Remove redundant assignment to err - Fix error return code in mtd_oobtest_init() - Add OTP NVMEM provider support - Allow specifying of_node - Convert sysfs sprintf/snprintf family to sysfs_emit Bindings changes: - Convert ti,am654-hbmc.txt to YAML schema - spi-nor: add otp property - Add OTP bindings - add YAML schema for the generic MTD bindings - Add brcm,trx-magic MTD device drivers changes: - Add support for microchip 48l640 EERAM - Remove superfluous "break" - sm_ftl: - Fix alignment of block comment - nftl: - Return -ENOMEM when kmalloc failed - nftlcore: - Remove set but rewrite variables - phram: - Fix error return code in phram_setup() - plat-ram: - Remove redundant dev_err call in platram_probe() MTD parsers changes: - Qcom: - Fix leaking of partition name - Redboot: - Fix style issues - Seek fis-index-block in the right node - trx: - Allow to use TRX parser on Mediatek SoCs - Allow to specify brcm, trx-magic in DT Raw NAND core: - Allow SDR timings to be nacked - Bring support for NV-DDR timings which involved a number of small preparation changes to bring new helpers, properly introduce NV-DDR structures, fill them, differenciate them and pick the best timing set. - Add the necessary infrastructure to parse the new gpio-cs property which aims at enlarging the number of available CS when a hardware controller is too constrained. - Update dead URL - Silence static checker warning in nand_setup_interface() - BBT: - Fix corner case in bad block table handling - onfi: - Use more recent ONFI specification wording - Use the BIT() macro when possible Raw NAND controller drivers: - Atmel: - Ensure the data interface is supported. - Arasan: - Finer grain NV-DDR configuration - Rename the data interface register - Use the right DMA mask - Leverage additional GPIO CS - Ensure proper configuration for the asserted target - Add support for the NV-DDR interface - Fix a macro parameter - brcmnand: - Convert bindings to json-schema - OMAP: - Various fixes and style improvements - Add larger page NAND chips support - PL35X: - New driver - QCOM: - Avoid writing to obsolete register - Delete an unneeded bool conversion - Allow override of partition parser - Marvell: - Minor documentation correction - Add missing clk_disable_unprepare() on error in marvell_nfc_resume() - R852: - Use DEVICE_ATTR_RO() helper macro - MTK: - Remove redundant dev_err call in mtk_ecc_probe() - HISI504: - Remove redundant dev_err call in probe SPI-NAND core: - Light reorganisation for the introduction of a core resume handler - Fix double counting of ECC stats SPI-NAND manufacturer drivers: - Macronix: - Add support for serial NAND flash SPI NOR core changes: - Ability to dump SFDP tables via sysfs - Support for erasing OTP regions on Winbond and similar flashes - Few API doc updates and fixes - Locking support for MX25L12805D SPI NOR controller drivers changes: - Use SPI_MODE_X_MASK in nxp-spifi - Intel Alder Lake-M SPI serial flash support" * tag 'mtd/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (125 commits) mtd: spi-nor: remove redundant continue statement mtd: rawnand: omap: Add larger page NAND chips support mtd: rawnand: omap: Various style fixes mtd: rawnand: omap: Check return values mtd: rawnand: omap: Rename a macro mtd: rawnand: omap: Aggregate the HW configuration of the ELM mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller dt-bindings: mtd: pl353-nand: Describe this hardware controller MAINTAINERS: Add PL353 NAND controller entry mtd: rawnand: qcom: avoid writing to obsolete register mtd: rawnand: marvell: Minor documentation correction mtd: rawnand: r852: use DEVICE_ATTR_RO() helper macro mtd: spinand: add SPI-NAND MTD resume handler mtd: spinand: Add spinand_init_flash() helper mtd: spinand: add spinand_read_cfg() helper mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume() mtd: rawnand: arasan: Finer grain NV-DDR configuration mtd: rawnand: arasan: Rename the data interface register mtd: rawnand: onfi: Fix endianness when reading NV-DDR values mtd: rawnand: arasan: Use the right DMA mask ... commit 8fc4fb1728855a22f9149079ba51877f5ee61fc9 Merge: a180bd1d7e161 3f605ee17f8e7 Author: Linus Torvalds Date: Mon Jul 5 11:16:28 2021 -0700 Merge tag 'm68knommu-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Fix fix missing LCD splash screen data initializer" * tag 'm68knommu-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: fix missing LCD splash screen data initializer commit 44c2cd80f2468f60f3f12b871e47fe435fea3759 Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:55:30 2021 -0300 tools headers UAPI: Sync files changed by the quotactl_fd new syscall To pick the changes in these csets: 64c2c2c62f92339b ("quota: Change quotactl_path() systcall to an fd-based one") 65ffb3d69ed3da28 ("quota: Wire up quotactl_fd syscall") That silences these perf build warnings and add support for those new syscalls in tools such as 'perf trace'. For instance, this is now possible: # perf trace -v -e quota* event qualifier tracepoint filter: (common_pid != 158365 && common_pid != 2512) && (id == 179 || id == 443) ^C# That is the filter expression attached to the raw_syscalls:sys_{enter,exit} tracepoints. $ grep quota tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 179 common quotactl sys_quotactl 443 common quotactl_fd sys_quotactl_fd $ This addresses these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl Warning: Kernel ABI header at 'tools/perf/arch/s390/entry/syscalls/syscall.tbl' differs from latest version at 'arch/s390/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl Warning: Kernel ABI header at 'tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl' differs from latest version at 'arch/mips/kernel/syscalls/syscall_n64.tbl' diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl Cc: Jan Kara Signed-off-by: Arnaldo Carvalho de Melo commit ced7c2877523323ff5498890c497f93dc84a0b64 Author: gushengxian Date: Mon Jul 5 05:50:01 2021 -0700 ALSA: emux: fix spelling mistakes Fix some spelling mistakes as follows: sensitivies ==> sensitivities pararameters ==> parameters approxmimation ==> approximation silet ==> silent Signed-off-by: gushengxian Link: https://lore.kernel.org/r/20210705125001.665734-1-gushengxian507419@gmail.com Signed-off-by: Takashi Iwai commit ff630b6ab952416bb52ab3528001fe4eb8e7dac7 Author: gushengxian Date: Mon Jul 5 05:00:52 2021 -0700 ALSA: usb-audio: fix spelling mistakes Fix some spelling mistakes as follows: altenate ==> alternate compatbile ==> compatible perfoms ==> performs dont'register ==> don't register periodicaly ==> periodically arount ==> around Signed-off-by: gushengxian Link: https://lore.kernel.org/r/20210705120052.665212-1-gushengxian507419@gmail.com Signed-off-by: Takashi Iwai commit a07ebc7e050ccdfec508449b2ef8f2b2aa90927b Author: Takashi Sakamoto Date: Mon Jul 5 20:14:55 2021 +0900 ALSA: bebob: correct duplicated entries with TerraTec OUI ALSA bebob driver has duplicated entries for modalias of 'ieee1394:ven00000AACmo00000002sp0000A02Dver00010001' since entries for two devices below have the same parameters: * Acoustic Reality eAR Master One, Eroica, Figaro, and Ciaccona * TerraTec Aureon 7.1 FireWire I relied on FFADO revision 737 to add the former entry, on the other hand, the latter is based on message posted by actual user with information of sysfs node: * https://sourceforge.net/p/ffado/mailman/ffado-user/thread/5743F969.2080204%40marcobaldo.ch/ It appears that they have OUI of Terratec Electronic GmbH (0x000aac) and the same model ID, thus suffice to say that they have something common in their internals. Although it's not going to make a big difference, this commit arranges the entries. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210705111455.63788-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 097e4e9dc7c7267465f461081b161691c70369eb Author: Arnaldo Carvalho de Melo Date: Fri Sep 27 11:30:30 2019 -0300 tools headers UAPI: Sync asm-generic/mman-common.h with the kernel To pick the changes from: Fixes: 4ca9b3859dac14bb ("mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables") That result in these changes in the tools: $ tools/perf/trace/beauty/madvise_behavior.sh > before $ cp include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman-common.h $ tools/perf/trace/beauty/madvise_behavior.sh > after $ diff -u before after --- before 2021-07-05 14:30:15.167212621 -0300 +++ after 2021-07-05 14:30:26.638462594 -0300 @@ -18,6 +18,8 @@ [19] = "KEEPONFORK", [20] = "COLD", [21] = "PAGEOUT", + [22] = "POPULATE_READ", + [23] = "POPULATE_WRITE", [100] = "HWPOISON", [101] = "SOFT_OFFLINE", }; $ I.e. now when madvise gets those behaviours as args, it will be able to translate from the number to a human readable string. This addresses the following perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h' diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h Cc: David Hildenbrand Cc: Linus Torvalds Signed-off-by: Arnaldo Carvalho de Melo commit ea57e8743e22cd0645f74c55db96f9c98c0ccda2 Author: gushengxian Date: Mon Jul 5 02:34:19 2021 -0700 ALSA: usx2y: fix spelling mistakes Fix some spelling mistakes as follows: wroong ==> wrong evrything ==> everything Signed-off-by: gushengxian Link: https://lore.kernel.org/r/20210705093419.664366-1-gushengxian507419@gmail.com Signed-off-by: Takashi Iwai commit 1d7a0395701842224bac870c32530cda30233c0c Author: gushengxian Date: Mon Jul 5 00:37:36 2021 -0700 ALSA: x86: fix spelling mistakes Fix some spelling mistakes as follows: regiter ==> register confgiuration ==> configuration playabck ==> playback platoform ==> platform Signed-off-by: gushengxian Link: https://lore.kernel.org/r/20210705073736.662875-1-gushengxian507419@gmail.com Signed-off-by: Takashi Iwai commit 42334fbc219eb110e054cedf9e553a142f735b11 Author: Frank Schäfer Date: Sat Jul 3 15:54:16 2021 +0200 ALSA: hda/realtek: fix mute led of the HP Pavilion 15-eh1xxx series The HP Pavilion 15-eh1xxx series uses the HP mainboard 88D0 with ALC287 and needs the ALC287_FIXUP_HP_GPIO_LED quirk to make the mute led working. Tested with a HP Pavilion 15-eh1557ng. Signed-off-by: Frank Schäfer Cc: Link: https://lore.kernel.org/r/20210703135416.13151-1-fschaefer.oss@googlemail.com Signed-off-by: Takashi Iwai commit 84d5c07d2dfb41fa7caacf29742f1dd9e56a15c6 Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:16:45 2021 -0300 tools headers UAPI: Update tools's copy of drm/drm.h header Picking the changes from: 2e290c8d8d29278b ("drm: document minimum kernel version for DRM_CLIENT_CAP_*") bbf4627ba6415711 ("drm: clarify and linkify DRM_CLIENT_CAP_WRITEBACK_CONNECTORS docs") 88938bf343efbc4d ("drm: reference mode flags in DRM_CLIENT_CAP_* docs") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h No changes in tooling as these are just C comment documentation changes. Cc: Simon Ser Signed-off-by: Arnaldo Carvalho de Melo commit 4a1cddeab501f6a9a248bef783bc48e8a91c098e Author: Arnaldo Carvalho de Melo Date: Mon May 3 11:51:17 2021 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the changes in: 2459e56fd8af0b47 ("drm/i915/uapi: implement object placement extension") ebcb40298947bdb0 ("drm/i915/uapi: introduce drm_i915_gem_create_ext") 710217292a61110a ("drm/i915/query: Expose memory regions through the query uAPI") e3bdccafb5bcfab2 ("drm/i915/uapi: convert i915_query and friend to kernel doc") 19d053d477a14506 ("drm/i915/uapi: convert i915_user_extension to kernel doc") 2ef6a01fb636997b ("drm/i915/uapi: fix kernel doc warnings") That picks a new ioctl: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/i915_drm.h tools/include/uapi/drm/i915_drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after --- before 2021-07-05 14:25:13.247680316 -0300 +++ after 2021-07-05 14:25:22.454874111 -0300 @@ -166,4 +166,5 @@ [DRM_COMMAND_BASE + 0x39] = "I915_QUERY", [DRM_COMMAND_BASE + 0x3a] = "I915_GEM_VM_CREATE", [DRM_COMMAND_BASE + 0x3b] = "I915_GEM_VM_DESTROY", + [DRM_COMMAND_BASE + 0x3c] = "I915_GEM_CREATE_EXT", }; $ Addressing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Cc: Abdiel Janulgue Cc: Matthew Auld Signed-off-by: Arnaldo Carvalho de Melo commit 688ef3e3061df3747e4d761ef71abe7371cf0e84 Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 11:04:23 2020 -0300 tools include UAPI: Sync sound/asound.h copy with the kernel sources Picking the changes from: 08fdced60ca08e34 ("ALSA: rawmidi: Add framing mode") Which entails no changes in the tooling side as it doesn't introduce new ioctls. To silence this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/sound/asound.h' differs from latest version at 'include/uapi/sound/asound.h' diff -u tools/include/uapi/sound/asound.h include/uapi/sound/asound.h Cc: David Henningsson Cc: Takashi Iwai Signed-off-by: Arnaldo Carvalho de Melo commit 944138f048f7d7591ec7568c94b21de8df2724d4 Author: Namhyung Kim Date: Thu Jul 1 14:12:27 2021 -0700 perf stat: Enable BPF counter with --for-each-cgroup Recently bperf was added to use BPF to count perf events for various purposes. This is an extension for the approach and targetting to cgroup usages. Unlike the other bperf, it doesn't share the events with other processes but it'd reduce unnecessary events (and the overhead of multiplexing) for each monitored cgroup within the perf session. When --for-each-cgroup is used with --bpf-counters, it will open cgroup-switches event per cpu internally and attach the new BPF program to read given perf_events and to aggregate the results for cgroups. It's only called when task is switched to a task in a different cgroup. Signed-off-by: Namhyung Kim Acked-by: Song Liu Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210701211227.1403788-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 892ba7f18621a02af4428c58d97451f64685dba4 Author: Namhyung Kim Date: Tue Jun 29 21:30:58 2021 -0700 perf report: Fix --task and --stat with pipe input Current 'perf report' fails to process a pipe input when --task or --stat options are used. This is because they reset all the tool callbacks and fails to find a matching event for a sample. When pipe input is used, the event info is passed via ATTR records so it needs to handle that operation. Otherwise the following error occurs. Note, -14 (= -EFAULT) comes from evlist__parse_sample(): # perf record -a -o- sleep 1 | perf report -i- --stat Can't parse sample, err = -14 0x271044 [0x38]: failed to process type: 9 Error: failed to process sample # Committer testing: Before: $ perf record -o- sleep 1 | perf report -i- --stat Can't parse sample, err = -14 [ perf record: Woken up 1 times to write data ] 0x1350 [0x30]: failed to process type: 9 Error: failed to process sample [ perf record: Captured and wrote 0.000 MB - ] $ After: $ perf record -o- sleep 1 | perf report -i- --stat [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] Aggregated stats: TOTAL events: 41 COMM events: 2 ( 4.9%) EXIT events: 1 ( 2.4%) SAMPLE events: 9 (22.0%) MMAP2 events: 4 ( 9.8%) ATTR events: 1 ( 2.4%) FINISHED_ROUND events: 1 ( 2.4%) THREAD_MAP events: 1 ( 2.4%) CPU_MAP events: 1 ( 2.4%) EVENT_UPDATE events: 1 ( 2.4%) TIME_CONV events: 1 ( 2.4%) FEATURE events: 19 (46.3%) cycles:uhH stats: SAMPLE events: 9 $ Fixes: a4a4d0a7a2b20f78 ("perf report: Add --stats option to display quick data statistics") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Ian Rogers Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210630043058.1131295-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c6c205ed442e4609a2bb3e369acc5f1007f782a2 Merge: f6a175cfcc8df e9e3720002f61 Author: David S. Miller Date: Mon Jul 5 10:16:18 2021 -0700 Merge branch 'stmmac-ptp' Xiaoliang Yang says: ==================== net: stmmac: re-configure tas basetime after ptp time adjust If the DWMAC Ethernet device has already set the Qbv EST configuration before using ptp to synchronize the time adjustment, the Qbv base time may change to be the past time of the new current time. This is not allowed by hardware. This patch calculates and re-configures the Qbv basetime after ptp time adjustment. v1->v2: Update est mutex lock to protect btr/ctr r/w to be atomic. Add btr_reserve to store basetime from qopt and used as origin base time in Qbv re-configuration. ==================== Signed-off-by: David S. Miller commit e9e3720002f61cd637a49ecafae77cac230eefae Author: Xiaoliang Yang Date: Mon Jul 5 18:26:55 2021 +0800 net: stmmac: ptp: update tas basetime after ptp adjust After adjusting the ptp time, the Qbv base time may be the past time of the new current time. dwmac5 hardware limited the base time cannot be set as past time. This patch add a btr_reserve to store the base time get from qopt, then calculate the base time and reset the Qbv configuration after ptp time adjust. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller commit b2aae654a4794ef898ad33a179f341eb610f6b85 Author: Xiaoliang Yang Date: Mon Jul 5 18:26:54 2021 +0800 net: stmmac: add mutex lock to protect est parameters Add a mutex lock to protect est structure parameters so that the EST parameters can be updated by other threads. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller commit 81c52c42afd92b741289208c65e5063b9e23ffb4 Author: Xiaoliang Yang Date: Mon Jul 5 18:26:53 2021 +0800 net: stmmac: separate the tas basetime calculation function Separate the TAS basetime calculation function so that it can be called by other functions. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller commit f6a175cfcc8df578adfdf06b05c82b3b8c8b5cfd Author: Yangbo Lu Date: Mon Jul 5 17:46:17 2021 +0800 ptp: fix format string mismatch in ptp_sysfs.c Fix format string mismatch in ptp_sysfs.c. Use %u for unsigned int. Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Reported-by: kernel test robot Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 55eac20617ca84129273ab248f4d7bfe456967de Author: Yangbo Lu Date: Mon Jul 5 16:53:06 2021 +0800 ptp: fix NULL pointer dereference in ptp_clock_register Fix NULL pointer dereference in ptp_clock_register. The argument "parent" of ptp_clock_register may be NULL pointer. Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") Reported-by: kernel test robot Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 40ba55e40d0bd740fb1cb2b77c1630013536e440 Author: Stephen Boyd Date: Thu Jun 24 13:18:02 2021 -0700 PM: domains: Shrink locking area of the gpd_list_lock On trogdor devices I see the following lockdep splat when stopping youtube with lockdep enabled in the kernel. ====================================================== WARNING: possible circular locking dependency detected 5.13.0-rc2 #71 Not tainted ------------------------------------------------------ ThreadPoolSingl/3969 is trying to acquire lock: ffffff80d4d5c080 (&inst->lock#3){+.+.}-{3:3}, at: vdec_buf_cleanup+0x3c/0x17c [venus_dec] but task is already holding lock: ffffff80d3c3c4f8 (&q->mmap_lock){+.+.}-{3:3}, at: vb2_core_reqbufs+0xe4/0x390 [videobuf2_common] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&q->mmap_lock){+.+.}-{3:3}: __mutex_lock_common+0xcc/0xb88 mutex_lock_nested+0x5c/0x68 vb2_mmap+0xf4/0x290 [videobuf2_common] v4l2_m2m_fop_mmap+0x44/0x50 [v4l2_mem2mem] v4l2_mmap+0x5c/0xa4 mmap_region+0x310/0x5a4 do_mmap+0x348/0x43c vm_mmap_pgoff+0xfc/0x178 ksys_mmap_pgoff+0x84/0xfc __arm64_compat_sys_aarch32_mmap2+0x2c/0x38 invoke_syscall+0x54/0x110 el0_svc_common+0x88/0xf0 do_el0_svc_compat+0x28/0x34 el0_svc_compat+0x24/0x34 el0_sync_compat_handler+0xc0/0xf0 el0_sync_compat+0x19c/0x1c0 -> #4 (&mm->mmap_lock){++++}-{3:3}: __might_fault+0x60/0x88 filldir64+0x124/0x3a0 dcache_readdir+0x7c/0x1ec iterate_dir+0xc4/0x184 __arm64_sys_getdents64+0x78/0x170 invoke_syscall+0x54/0x110 el0_svc_common+0xa8/0xf0 do_el0_svc_compat+0x28/0x34 el0_svc_compat+0x24/0x34 el0_sync_compat_handler+0xc0/0xf0 el0_sync_compat+0x19c/0x1c0 -> #3 (&sb->s_type->i_mutex_key#3){++++}-{3:3}: down_write+0x94/0x1f4 start_creating+0xb0/0x174 debugfs_create_dir+0x28/0x138 opp_debug_register+0x88/0xc0 _add_opp_dev+0x84/0x9c _add_opp_table_indexed+0x16c/0x310 _of_add_table_indexed+0x70/0xb5c dev_pm_opp_of_add_table_indexed+0x20/0x2c of_genpd_add_provider_onecell+0xc4/0x1c8 rpmhpd_probe+0x21c/0x278 platform_probe+0xb4/0xd4 really_probe+0x140/0x35c driver_probe_device+0x90/0xcc __device_attach_driver+0xa4/0xc0 bus_for_each_drv+0x8c/0xd8 __device_attach+0xc4/0x150 device_initial_probe+0x20/0x2c bus_probe_device+0x40/0xa4 device_add+0x22c/0x3fc of_device_add+0x44/0x54 of_platform_device_create_pdata+0xb0/0xf4 of_platform_bus_create+0x1d0/0x350 of_platform_populate+0x80/0xd4 devm_of_platform_populate+0x64/0xb0 rpmh_rsc_probe+0x378/0x3dc platform_probe+0xb4/0xd4 really_probe+0x140/0x35c driver_probe_device+0x90/0xcc __device_attach_driver+0xa4/0xc0 bus_for_each_drv+0x8c/0xd8 __device_attach+0xc4/0x150 device_initial_probe+0x20/0x2c bus_probe_device+0x40/0xa4 device_add+0x22c/0x3fc of_device_add+0x44/0x54 of_platform_device_create_pdata+0xb0/0xf4 of_platform_bus_create+0x1d0/0x350 of_platform_bus_create+0x21c/0x350 of_platform_populate+0x80/0xd4 of_platform_default_populate_init+0xb8/0xd4 do_one_initcall+0x1b4/0x400 do_initcall_level+0xa8/0xc8 do_initcalls+0x5c/0x9c do_basic_setup+0x2c/0x38 kernel_init_freeable+0x1a4/0x1ec kernel_init+0x20/0x118 ret_from_fork+0x10/0x30 -> #2 (gpd_list_lock){+.+.}-{3:3}: __mutex_lock_common+0xcc/0xb88 mutex_lock_nested+0x5c/0x68 __genpd_dev_pm_attach+0x70/0x18c genpd_dev_pm_attach_by_id+0xe4/0x158 genpd_dev_pm_attach_by_name+0x48/0x60 dev_pm_domain_attach_by_name+0x2c/0x38 dev_pm_opp_attach_genpd+0xac/0x160 vcodec_domains_get+0x94/0x14c [venus_core] core_get_v4+0x150/0x188 [venus_core] venus_probe+0x138/0x444 [venus_core] platform_probe+0xb4/0xd4 really_probe+0x140/0x35c driver_probe_device+0x90/0xcc device_driver_attach+0x58/0x7c __driver_attach+0xc8/0xe0 bus_for_each_dev+0x88/0xd4 driver_attach+0x30/0x3c bus_add_driver+0x10c/0x1e0 driver_register+0x70/0x108 __platform_driver_register+0x30/0x3c 0xffffffde113e1044 do_one_initcall+0x1b4/0x400 do_init_module+0x64/0x1fc load_module+0x17f4/0x1958 __arm64_sys_finit_module+0xb4/0xf0 invoke_syscall+0x54/0x110 el0_svc_common+0x88/0xf0 do_el0_svc_compat+0x28/0x34 el0_svc_compat+0x24/0x34 el0_sync_compat_handler+0xc0/0xf0 el0_sync_compat+0x19c/0x1c0 -> #1 (&opp_table->genpd_virt_dev_lock){+.+.}-{3:3}: __mutex_lock_common+0xcc/0xb88 mutex_lock_nested+0x5c/0x68 _set_required_opps+0x74/0x120 _set_opp+0x94/0x37c dev_pm_opp_set_rate+0xa0/0x194 core_clks_set_rate+0x28/0x58 [venus_core] load_scale_v4+0x228/0x2b4 [venus_core] session_process_buf+0x160/0x198 [venus_core] venus_helper_vb2_buf_queue+0xcc/0x130 [venus_core] vdec_vb2_buf_queue+0xc4/0x140 [venus_dec] __enqueue_in_driver+0x164/0x188 [videobuf2_common] vb2_core_qbuf+0x13c/0x47c [videobuf2_common] vb2_qbuf+0x88/0xec [videobuf2_v4l2] v4l2_m2m_qbuf+0x84/0x15c [v4l2_mem2mem] v4l2_m2m_ioctl_qbuf+0x24/0x30 [v4l2_mem2mem] v4l_qbuf+0x54/0x68 __video_do_ioctl+0x2bc/0x3bc video_usercopy+0x558/0xb04 video_ioctl2+0x24/0x30 v4l2_ioctl+0x58/0x68 v4l2_compat_ioctl32+0x84/0xa0 __arm64_compat_sys_ioctl+0x12c/0x140 invoke_syscall+0x54/0x110 el0_svc_common+0x88/0xf0 do_el0_svc_compat+0x28/0x34 el0_svc_compat+0x24/0x34 el0_sync_compat_handler+0xc0/0xf0 el0_sync_compat+0x19c/0x1c0 -> #0 (&inst->lock#3){+.+.}-{3:3}: __lock_acquire+0x248c/0x2d6c lock_acquire+0x240/0x314 __mutex_lock_common+0xcc/0xb88 mutex_lock_nested+0x5c/0x68 vdec_buf_cleanup+0x3c/0x17c [venus_dec] __vb2_queue_free+0x98/0x204 [videobuf2_common] vb2_core_reqbufs+0x14c/0x390 [videobuf2_common] vb2_reqbufs+0x58/0x74 [videobuf2_v4l2] v4l2_m2m_reqbufs+0x58/0x90 [v4l2_mem2mem] v4l2_m2m_ioctl_reqbufs+0x24/0x30 [v4l2_mem2mem] v4l_reqbufs+0x58/0x6c __video_do_ioctl+0x2bc/0x3bc video_usercopy+0x558/0xb04 video_ioctl2+0x24/0x30 v4l2_ioctl+0x58/0x68 v4l2_compat_ioctl32+0x84/0xa0 __arm64_compat_sys_ioctl+0x12c/0x140 invoke_syscall+0x54/0x110 el0_svc_common+0x88/0xf0 do_el0_svc_compat+0x28/0x34 el0_svc_compat+0x24/0x34 el0_sync_compat_handler+0xc0/0xf0 el0_sync_compat+0x19c/0x1c0 other info that might help us debug this: Chain exists of: &inst->lock#3 --> &mm->mmap_lock --> &q->mmap_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&q->mmap_lock); lock(&mm->mmap_lock); lock(&q->mmap_lock); lock(&inst->lock#3); *** DEADLOCK *** 1 lock held by ThreadPoolSingl/3969: #0: ffffff80d3c3c4f8 (&q->mmap_lock){+.+.}-{3:3}, at: vb2_core_reqbufs+0xe4/0x390 [videobuf2_common] stack backtrace: CPU: 2 PID: 3969 Comm: ThreadPoolSingl Not tainted 5.13.0-rc2 #71 Hardware name: Google Lazor (rev3+) with KB Backlight (DT) Call trace: dump_backtrace+0x0/0x1b4 show_stack+0x24/0x30 dump_stack+0xe0/0x15c print_circular_bug+0x32c/0x388 check_noncircular+0x138/0x140 __lock_acquire+0x248c/0x2d6c lock_acquire+0x240/0x314 __mutex_lock_common+0xcc/0xb88 mutex_lock_nested+0x5c/0x68 vdec_buf_cleanup+0x3c/0x17c [venus_dec] __vb2_queue_free+0x98/0x204 [videobuf2_common] vb2_core_reqbufs+0x14c/0x390 [videobuf2_common] vb2_reqbufs+0x58/0x74 [videobuf2_v4l2] v4l2_m2m_reqbufs+0x58/0x90 [v4l2_mem2mem] v4l2_m2m_ioctl_reqbufs+0x24/0x30 [v4l2_mem2mem] v4l_reqbufs+0x58/0x6c __video_do_ioctl+0x2bc/0x3bc video_usercopy+0x558/0xb04 video_ioctl2+0x24/0x30 v4l2_ioctl+0x58/0x68 v4l2_compat_ioctl32+0x84/0xa0 __arm64_compat_sys_ioctl+0x12c/0x140 invoke_syscall+0x54/0x110 el0_svc_common+0x88/0xf0 do_el0_svc_compat+0x28/0x34 el0_svc_compat+0x24/0x34 el0_sync_compat_handler+0xc0/0xf0 el0_sync_compat+0x19c/0x1c0 The 'gpd_list_lock' is nominally named as such to protect the 'gpd_list' from concurrent access and mutation. Unfortunately, holding that mutex around various OPP framework calls leads to lockdep splats because now we're doing various operations in OPP core such as registering with debugfs while holding the list lock. We don't need to hold any list mutex while we're calling into OPP, so let's shrink the locking area of the 'gpd_list_lock' so that lockdep isn't triggered. This also helps reduce contention on this lock, which probably doesn't matter much but at least is nice to have. Cc: Len Brown Cc: Pavel Machek Cc: Greg Kroah-Hartman Cc: Cc: Viresh Kumar Signed-off-by: Stephen Boyd Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 90810c25cf028bbd7e8abd9903c37610ef7072c7 Author: Steve French Date: Sat Jul 3 15:49:35 2021 -0500 smb3: fix typo in header file Although it compiles, the test robot correctly noted: 'cifsacl.h' file not found with include; use "quotes" instead Reported-by: kernel test robot Signed-off-by: Steve French commit 97e488073cfca0eea84450169ca4cbfcc64e33e3 Author: Randy Dunlap Date: Sun Jul 4 16:02:11 2021 -0700 mips: disable branch profiling in boot/decompress.o Use DISABLE_BRANCH_PROFILING for arch/mips/boot/compressed/decompress.o to prevent linkage errors. mips64-linux-ld: arch/mips/boot/compressed/decompress.o: in function `LZ4_decompress_fast_extDict': decompress.c:(.text+0x8c): undefined reference to `ftrace_likely_update' mips64-linux-ld: decompress.c:(.text+0xf4): undefined reference to `ftrace_likely_update' mips64-linux-ld: decompress.c:(.text+0x200): undefined reference to `ftrace_likely_update' mips64-linux-ld: decompress.c:(.text+0x230): undefined reference to `ftrace_likely_update' mips64-linux-ld: decompress.c:(.text+0x320): undefined reference to `ftrace_likely_update' mips64-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0x3f4): more undefined references to `ftrace_likely_update' follow Fixes: e76e1fdfa8f8 ("lib: add support for LZ4-compressed kernel") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Kyungsik Lee Signed-off-by: Thomas Bogendoerfer commit cddc40f5617e53f97ef019d5b29c1bd6cbb031ec Author: Arnd Bergmann Date: Fri Jul 2 16:28:37 2021 +0200 mips: always link byteswap helpers into decompressor My series to clean up the unaligned access implementation across architectures caused some mips randconfig builds to fail with: mips64-linux-ld: arch/mips/boot/compressed/decompress.o: in function `decompress_kernel': decompress.c:(.text.decompress_kernel+0x54): undefined reference to `__bswapsi2' It turns out that this problem has already been fixed for the XZ decompressor but now it also shows up in (at least) LZO and LZ4. From my analysis I concluded that the compiler could always have emitted those calls, but the different implementation allowed it to make otherwise better decisions about not inlining the byteswap, which results in the link error when the out-of-line code is missing. While it could be addressed by adding it to the two decompressor implementations that are known to be affected, but as this only adds 112 bytes to the kernel, the safer choice is to always add them. Fixes: c50ec6787536 ("MIPS: zboot: Fix the build with XZ compression on older GCC versions") Fixes: 0652035a5794 ("asm-generic: unaligned: remove byteshift helpers") Link: https://lore.kernel.org/linux-mm/202106301304.gz2wVY9w-lkp@intel.com/ Link: https://lore.kernel.org/linux-mm/202106260659.TyMe8mjr-lkp@intel.com/ Link: https://lore.kernel.org/linux-mm/202106172016.onWT6Tza-lkp@intel.com/ Link: https://lore.kernel.org/linux-mm/202105231743.JJcALnhS-lkp@intel.com/ Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Bogendoerfer commit 3f601608b71c3ca1e199898cd16f09d707fedb56 Author: Cédric Le Goater Date: Thu Jul 1 17:24:12 2021 +0200 powerpc/xive: Fix error handling when allocating an IPI This is a smatch warning: arch/powerpc/sysdev/xive/common.c:1161 xive_request_ipi() warn: unsigned 'xid->irq' is never less than zero. Fixes: fd6db2892eba ("powerpc/xive: Modernize XIVE-IPI domain with an 'alloc' handler") Cc: stable@vger.kernel.org # v5.13 Reported-by: kernel test robot Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210701152412.1507612-1-clg@kaod.org commit 307e5042c7bdae15308ef2e9b848833b84122eb0 Author: Naveen N. Rao Date: Thu Jul 1 20:38:59 2021 +0530 powerpc/bpf: Reject atomic ops in ppc32 JIT Commit 91c960b0056672 ("bpf: Rename BPF_XADD and prepare to encode other atomics in .imm") converted BPF_XADD to BPF_ATOMIC and updated all JIT implementations to reject JIT'ing instructions with an immediate value different from BPF_ADD. However, ppc32 BPF JIT was implemented around the same time and didn't include the same change. Update the ppc32 JIT accordingly. Fixes: 51c66ad849a7 ("powerpc/bpf: Implement extended BPF on PPC32") Cc: stable@vger.kernel.org # v5.13+ Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/426699046d89fe50f66ecf74bd31c01eda976ba5.1625145429.git.naveen.n.rao@linux.vnet.ibm.com commit 419ac821766cbdb9fd85872bb3f1a589df05c94c Author: Naveen N. Rao Date: Thu Jul 1 20:38:58 2021 +0530 powerpc/bpf: Fix detecting BPF atomic instructions Commit 91c960b0056672 ("bpf: Rename BPF_XADD and prepare to encode other atomics in .imm") converted BPF_XADD to BPF_ATOMIC and added a way to distinguish instructions based on the immediate field. Existing JIT implementations were updated to check for the immediate field and to reject programs utilizing anything more than BPF_ADD (such as BPF_FETCH) in the immediate field. However, the check added to powerpc64 JIT did not look at the correct BPF instruction. Due to this, such programs would be accepted and incorrectly JIT'ed resulting in soft lockups, as seen with the atomic bounds test. Fix this by looking at the correct immediate value. Fixes: 91c960b0056672 ("bpf: Rename BPF_XADD and prepare to encode other atomics in .imm") Reported-by: Jiri Olsa Signed-off-by: Naveen N. Rao Tested-by: Jiri Olsa Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4117b430ffaa8cd7af042496f87fd7539e4f17fd.1625145429.git.naveen.n.rao@linux.vnet.ibm.com commit cd5d5e602f502895e47e18cd46804d6d7014e65c Author: Christophe Leroy Date: Thu Jul 1 11:17:08 2021 +0000 powerpc/mm: Fix lockup on kernel exec fault The powerpc kernel is not prepared to handle exec faults from kernel. Especially, the function is_exec_fault() will return 'false' when an exec fault is taken by kernel, because the check is based on reading current->thread.regs->trap which contains the trap from user. For instance, when provoking a LKDTM EXEC_USERSPACE test, current->thread.regs->trap is set to SYSCALL trap (0xc00), and the fault taken by the kernel is not seen as an exec fault by set_access_flags_filter(). Commit d7df2443cd5f ("powerpc/mm: Fix spurious segfaults on radix with autonuma") made it clear and handled it properly. But later on commit d3ca587404b3 ("powerpc/mm: Fix reporting of kernel execute faults") removed that handling, introducing test based on error_code. And here is the problem, because on the 603 all upper bits of SRR1 get cleared when the TLB instruction miss handler bails out to ISI. Until commit cbd7e6ca0210 ("powerpc/fault: Avoid heavy search_exception_tables() verification"), an exec fault from kernel at a userspace address was indirectly caught by the lack of entry for that address in the exception tables. But after that commit the kernel mainly relies on KUAP or on core mm handling to catch wrong user accesses. Here the access is not wrong, so mm handles it. It is a minor fault because PAGE_EXEC is not set, set_access_flags_filter() should set PAGE_EXEC and voila. But as is_exec_fault() returns false as explained in the beginning, set_access_flags_filter() bails out without setting PAGE_EXEC flag, which leads to a forever minor exec fault. As the kernel is not prepared to handle such exec faults, the thing to do is to fire in bad_kernel_fault() for any exec fault taken by the kernel, as it was prior to commit d3ca587404b3. Fixes: d3ca587404b3 ("powerpc/mm: Fix reporting of kernel execute faults") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Christophe Leroy Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/024bb05105050f704743a0083fe3548702be5706.1625138205.git.christophe.leroy@csgroup.eu commit 6fa630bf473827aee48cbf0efbbdf6f03134e890 Author: Alex Sverdlin Date: Thu Jul 1 16:20:28 2021 +0100 ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE FTRACE_ADDR is only defined when CONFIG_DYNAMIC_FTRACE is defined, the latter is even stronger requirement than CONFIG_FUNCTION_TRACER (which is enough for MCOUNT_ADDR). Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZUVCQBHDMFVR7CCB7JPESLJEWERZDJ3T/ Fixes: 1f12fb25c5c5d22f ("ARM: 9079/1: ftrace: Add MODULE_PLTS support") Reported-by: kernel test robot Signed-off-by: Alexander Sverdlin Signed-off-by: Russell King commit bd39654a2282c1a51c044575a6bc00d641d5dfd1 Author: Harald Freudenberger Date: Fri Jun 25 12:29:46 2021 +0200 s390/AP: support new dynamic AP bus size limit This patch provides support for new dynamic AP bus message limit with the existing zcrypt device driver and AP bus core code. There is support for a new field 'ml' from TAPQ query. The field gives if != 0 the AP bus limit for this card in 4k chunk units. The actual message size limit per card is shown as a new read-only sysfs attribute. The sysfs attribute /sys/devices/ap/cardxx/max_msg_size shows the upper limit in bytes used by the AP bus and zcrypt device driver for requests and replies send to and received from this card. Currently up to CEX7 support only max 12kB msg size and thus the field shows 12288 meaning the upper limit of a valid msg for this card is 12kB. Please note that the usable payload is somewhat lower and depends on the msg type and thus the header struct which is to be prepended by the zcrypt dd. The dispatcher responsible for choosing the right card and queue is aware of the individual card AP bus message limit. So a request is only assigned to a queue of a card which is able to handle the size of the request (e.g. a 14kB request will never go to a max 12kB card). If no such card is found the ioctl will fail with ENODEV. The reply buffer held by the device driver is determined by the ml field of the TAPQ for this card. If a response from the card exceeds this limit however, the response is not truncated but the ioctl for this request will fail with errno EMSGSIZE to indicate that the device driver has dropped the response because it would overflow the buffer limit. If the request size does not indicate to the dispatcher that an adapter with extended limit is to be used, a random card will be chosen when no specific card is addressed (ANY addressing). This may result in an ioctl failure when the reply size needs an adapter with extended limit but the randomly chosen one is not capable of handling the broader reply size. The user space application needs to use dedicated addressing to forward such a request only to suitable cards to get requests like this processed properly. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Tuchscherer Signed-off-by: Vasily Gorbik commit a0ae5cd235cc32daa0aeb58fa466da2f1042fc8e Author: Heiko Carstens Date: Thu Jul 1 12:28:48 2021 +0200 s390/lib,string: fix strcat() inline asm constraint modifier "dummy" is not only used as output but also as input. Therefore use the correct "+" constraint modifier. Fixes: 8cf23c8e1fec ("s390/lib,string: get rid of register asm") Reported-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit a029a4eab39e4bf542907a3263773fce3d48c983 Author: Thomas Richter Date: Fri Jun 25 15:17:01 2021 +0200 s390/cpumf: Allow concurrent access for CPU Measurement Counter Facility Commit cf6acb8bdb1d ("s390/cpumf: Add support for complete counter set extraction") allows access to the CPU Measurement Counter Facility via character device /dev/hwctr. The access was exclusive via this device or via perf_event_open() system call. Only one path at a time was permitted. The CPU Measurement Counter Facility device driver blocked access to other processes. This patch removes this restriction and allows concurrent access to the CPU Measurement Counter Facility from multiple processes at the same time via perf_event_open() SVC and via /dev/hwctr device. The access via /dev/hwctr device is still exclusive, only one process is allowed to access this device. This patch - moves the /dev/hwctr device access from file perf_cpum_cf_diag.c. to file perf_cpum_cf.c. - use only one trace buffer .../s390dbf/cpum_cf. - remove cfset_csd structure and includes its members it into the structure cpu_cf_events. This results in one data structure and simplifies the access. - rework function familiy ctr_set_enable, ctr_set_disable, ctr_set_start and ctr_set_stop which operate on a counter set number. Now they operate on a counter set bit mask. - move CF_DIAG event functionality to file perf_cpum_cf.c. It now contains the complete functionality of the CPU Measurement Counter Facility: - Performance measurement support for counters using perf stat. - Support for complete counter set extraction with device /dev/hwctr. - Support for counter set extraction event CF_DIAG attached to samples using perf record. - removes file perf_cpum_cf_diag.c Signed-off-by: Thomas Richter Reviewed-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 5fa2ea0714d75bf631c111ca51e9bd2bf6dbfb87 Author: Alexander Gordeev Date: Fri Jun 18 08:17:18 2021 +0200 s390/mcck: move register validation to C code This update partially reverts commit 3037a52f9846 ("s390/nmi: do register validation as early as possible"). Storage error checks and control registers validation are left in the assembler code, since correct ASCEs and page tables are required to enable DAT - which is done before the C handler is entered. System damage, kernel instruction address and PSW MWP checks are left in the assembler code as well, since there is no way to proceed if one of these checks is failed. The getcpu vdso syscall reads CPU number from the programmable field of the TOD clock. Disregard the TOD programmable register validity bit and load the CPU number into the TOD programmable field unconditionally. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9f744abb4639e793689570fc9dcdf5f2f028bc9a Author: Alexander Egorenkov Date: Thu Mar 25 12:10:56 2021 +0100 s390/boot: replace magic string check with a bootdata flag The magic string "S390EP" at offset 0x10008 indicated to the decompressed kernel that it was booted by the decompressor. Introduce a new bootdata flag instead which conveys the same information in an explicit and a cleaner way. But keep the magic string because it is a kernel ABI. Signed-off-by: Alexander Egorenkov Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit 549abb7f36f2dbf91515bf5537a63ae47a275a35 Author: Alexander Gordeev Date: Fri Jun 18 08:17:17 2021 +0200 s390/mcck: keep machine check interruption codes sorted This update puts in order MCCK_CODE_CPU_TIMER_VALID code definition. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d35925b34996196d22a4357dc5212ab03af75151 Author: Alexander Gordeev Date: Fri Jun 18 08:17:16 2021 +0200 s390/mcck: move storage error checks to assembler The current storage errors tackling is wrong - the DAT is enabled in assembler code before the actual storage checks in C half are executed. In case the page tables themselves are damaged such approach is not going to work. With this update unrecoverable storage errors are not passed to C code for handling, but rather the machine is stopped right away. The only exception to this flow is when a machine check occurred in KVM guest - in this case the errors are reinjected by the handler. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7f6dc8d4c880f64b9d450d780d88985b264d8793 Author: Alexander Gordeev Date: Fri Jun 18 08:17:15 2021 +0200 s390/mcck: always enter C handler with DAT enabled The machine check handler must be entered with DAT disabled in case control registers are corrupted or a storage error happened and we can not tell if such error corresponds to a page table. Both of described conditions end up in stopping all CPUs and entering the disabled wait in C half of the handler. However, the storage errors are still checked after the DAT is enabled and C code is entered. In case a page table is damaged such flow is not expected to work. This update paves the way for moving the storage error checks from C to assembler half. All fatal errors that can only be handled with DAT disabled are handled in assembler half also. As result, the C half is only entered if the DAT is secured. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e2c13d64200bff0aa3964017cfabb0bc47691022 Author: Alexander Gordeev Date: Tue Jun 22 19:06:18 2021 +0200 s390/mcck: optimize user mode check in case of !CONFIG_KVM In case of the !CONFIG_KVM use "jz" instead of "jnz" when detecting user mode and get rid of unnecessary jump as result. Signed-off-by: Alexander Gordeev Reviewed-by: Christia Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fbbdfca5c5535f52ba47e46eacac899dfad7f384 Author: Alexander Gordeev Date: Fri Jun 18 08:17:13 2021 +0200 s390/entry.S: factor out SIEEXIT macro Factor out SIEEXIT macro and use it instead of cleanup_sie routine. As a side effect %r13 and %r14 are spared. Signed-off-by: Alexander Gordeev Reviewed-by: Christia Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 07f3a35df190082867fa302e46cab86d7a968ff3 Author: Heiko Carstens Date: Mon Jun 28 23:55:53 2021 +0200 s390/lib,uaccess: fix copy_in_user_mvcos() inline asm clobber list General register 0 is clobbered within the inline assembly and therefore must be listed in the clobber list. Fixes: d1e18efa8fa9 ("s390/lib,uaccess: get rid of register asm") Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 85b18d7b5e7ffefb2f076186511d39c4990aa005 Author: Janosch Frank Date: Tue Jan 12 05:40:53 2021 -0500 s390: mm: Fix secure storage access exception handling Turns out that the bit 61 in the TEID is not always 1 and if that's the case the address space ID and the address are unpredictable. Without an address and its address space ID we can't export memory and hence we can only send a SIGSEGV to the process or panic the kernel depending on who caused the exception. Unfortunately bit 61 is only reliable if we have the "misc" UV feature bit. Signed-off-by: Janosch Frank Reviewed-by: Christian Borntraeger Fixes: 084ea4d611a3d ("s390/mm: add (non)secure page access exceptions handlers") Cc: stable@vger.kernel.org Signed-off-by: Vasily Gorbik commit 47f7c6cf0082e1d963d1761b6bc2a94480fc8671 Author: Kefeng Wang Date: Sat Jun 26 15:34:37 2021 +0800 s390/kprobes: use is_kernel() helper Use is_kernel() helper instead of is_kernel_addr(). [hca@linux.ibm.com: add missing unsigned long cast] Cc: Vasily Gorbik Cc: Christian Borntraeger Signed-off-by: Kefeng Wang Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fa68bd09fc62240a383c0c601d3349c47db10c34 Author: Peter Zijlstra Date: Mon Jun 28 13:24:12 2021 +0200 kprobe/static_call: Restore missing static_call_text_reserved() Restore two hunks from commit: 6333e8f73b83 ("static_call: Avoid kprobes on inline static_call()s") that went walkabout in a Git merge commit. Fixes: 76d4acf22b48 ("Merge tag 'perf-kprobes-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") Signed-off-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210628113045.167127609@infradead.org Signed-off-by: Ingo Molnar commit 2bee6d16e4379326b1eea454e68c98b17456769e Author: Peter Zijlstra Date: Mon Jun 28 13:24:11 2021 +0200 static_call: Fix static_call_text_reserved() vs __init It turns out that static_call_text_reserved() was reporting __init text as being reserved past the time when the __init text was freed and re-used. This is mostly harmless and will at worst result in refusing a kprobe. Fixes: 6333e8f73b83 ("static_call: Avoid kprobes on inline static_call()s") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210628113045.106211657@infradead.org commit 9e667624c291753b8a5128f620f493d0b5226063 Author: Peter Zijlstra Date: Mon Jun 28 13:24:10 2021 +0200 jump_label: Fix jump_label_text_reserved() vs __init It turns out that jump_label_text_reserved() was reporting __init text as being reserved past the time when the __init text was freed and re-used. For a long time, this resulted in, at worst, not being able to kprobe text that happened to land at the re-used address. However a recent commit e7bf1ba97afd ("jump_label, x86: Emit short JMP") made it a fatal mistake because it now needs to read the instruction in order to determine the conflict -- an instruction that's no longer there. Fixes: 4c3ef6d79328 ("jump label: Add jump_label_text_reserved() to reserve jump points") Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210628113045.045141693@infradead.org commit 4840ce2267f9d887f333d88a037c82c566f84081 Author: Xiongwei Song Date: Tue Jun 29 21:59:16 2021 +0800 locking/lockdep: Fix meaningless /proc/lockdep output of lock classes on !CONFIG_PROVE_LOCKING When enabling CONFIG_LOCK_STAT=y, then CONFIG_LOCKDEP=y is forcedly enabled, but CONFIG_PROVE_LOCKING is disabled. We can get output from /proc/lockdep, which currently includes usages of lock classes. But the usages are meaningless, see the output below: / # cat /proc/lockdep all lock classes: ffffffff9af63350 ....: cgroup_mutex ffffffff9af54eb8 ....: (console_sem).lock ffffffff9af54e60 ....: console_lock ffffffff9ae74c38 ....: console_owner_lock ffffffff9ae74c80 ....: console_owner ffffffff9ae66e60 ....: cpu_hotplug_lock Only one usage context for each lock, this is because each usage is only changed in mark_lock() that is in the CONFIG_PROVE_LOCKING=y section, however in the test situation, it's not. The fix is to move the usages reading and seq_print from the !CONFIG_PROVE_LOCKING section to its defined section. Also, locks_after list of lock_class is empty when !CONFIG_PROVE_LOCKING, so do the same thing as what have done for usages of lock classes. With this patch with !CONFIG_PROVE_LOCKING we can get the results below: / # cat /proc/lockdep all lock classes: ffffffff85163290: cgroup_mutex ffffffff85154dd8: (console_sem).lock ffffffff85154d80: console_lock ffffffff85074b58: console_owner_lock ffffffff85074ba0: console_owner ffffffff85066d60: cpu_hotplug_lock ... a class key and the relevant class name each line. Signed-off-by: Xiongwei Song Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Waiman Long Link: https://lore.kernel.org/r/20210629135916.308210-1-sxwjean@me.com commit 0755d3be2d9bb6ea38598ccd30d6bbaa1a5c3a50 Author: Maurizio Lombardi Date: Fri Jul 2 10:11:21 2021 +0200 nvme-tcp: can't set sk_user_data without write_lock The sk_user_data pointer is supposed to be modified only while holding the write_lock "sk_callback_lock", otherwise we could race with other threads and crash the kernel. we can't take the write_lock in nvmet_tcp_state_change() because it would cause a deadlock, but the release_work queue will set the pointer to NULL later so we can simply remove the assignment. Fixes: b5332a9f3f3d ("nvmet-tcp: fix incorrect locking in state_change sk callback") Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 629a5d87e26fe96bcaab44cbb81f5866af6f7008 Author: Juergen Gross Date: Wed May 12 08:22:10 2021 +0200 xen: sync include/xen/interface/io/ring.h with Xen's newest version Sync include/xen/interface/io/ring.h with Xen's newest version in order to get the RING_COPY_RESPONSE() and RING_RESPONSE_PROD_OVERFLOW() macros. Note that this will correct the wrong license info by adding the missing original copyright notice. Signed-off-by: Juergen Gross commit 2060061767c5d3fd5d2477c8cf3407efeeabe8e0 Author: YueHaibing Date: Wed May 26 22:10:19 2021 +0800 xen: Use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210526141019.13752-1-yuehaibing@huawei.com Signed-off-by: Juergen Gross commit 818b26588994d9d95743fca0a427f08ec6c1c41d Merge: 45a4b68354ffc f8f84af5da9ee Author: Dmitry Torokhov Date: Sun Jul 4 23:05:31 2021 -0700 Merge branch 'next' into for-linus Prepare input updates for 5.14 merge window. commit f8f84af5da9ee04ef1d271528656dac42a090d00 Author: Alexander Larkin Date: Sun Jul 4 22:39:36 2021 -0700 Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl Even though we validate user-provided inputs we then traverse past validated data when applying the new map. The issue was originally discovered by Murray McAllister with this simple POC (if the following is executed by an unprivileged user it will instantly panic the system): int main(void) { int fd, ret; unsigned int buffer[10000]; fd = open("/dev/input/js0", O_RDONLY); if (fd == -1) printf("Error opening file\n"); ret = ioctl(fd, JSIOCSBTNMAP & ~IOCSIZE_MASK, &buffer); printf("%d\n", ret); } The solution is to traverse internal buffer which is guaranteed to only contain valid date when constructing the map. Fixes: 182d679b2298 ("Input: joydev - prevent potential read overflow in ioctl") Fixes: 999b874f4aa3 ("Input: joydev - validate axis/button maps before clobbering current ones") Reported-by: Murray McAllister Suggested-by: Linus Torvalds Signed-off-by: Alexander Larkin Link: https://lore.kernel.org/r/20210620120030.1513655-1-avlarkin82@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit a0e781a2a35a8dd4e6a38571998d59c6b0e32cd8 Author: Masahiro Yamada Date: Fri May 28 13:07:17 2021 +0900 sparc: syscalls: use pattern rules to generate syscall headers Use pattern rules to unify similar build rules between 32-bit and 64-bit. Signed-off-by: Masahiro Yamada commit e2a86a29ea7ef88cc2f559072fca24184ca2d820 Author: Masahiro Yamada Date: Fri May 28 13:06:37 2021 +0900 parisc: syscalls: use pattern rules to generate syscall headers Use pattern rules to unify similar build rules between 32-bit and 64-bit. Signed-off-by: Masahiro Yamada commit c1ba79ece88f33bae81617463d043fdf66e86a66 Author: Masahiro Yamada Date: Sun May 9 23:31:24 2021 +0900 nds32: add arch/nds32/boot/.gitignore Ignore arch/nds32/boot/Image. Signed-off-by: Masahiro Yamada commit a180bd1d7e16173d965b263c5a536aa40afa2a2a Author: Linus Torvalds Date: Sun Jul 4 16:12:42 2021 -0700 iov_iter: remove uaccess_kernel() warning from iov_iter_init() This warning was there to catch any architectures that still use CONFIG_SET_FS, and that would mis-use iov_iter_init() for anything that wasn't a proper user space pointer. So that WARN_ON_ONCE(uaccess_kernel()); makes perfect conceptual sense: you really shouldn't use a kernel pointer with set_fs(KERNEL_DS) and then pass it to iov_iter_init(). HOWEVER. Guenter Roeck reports that this warning actually triggers in no-mmu configurations of both ARM and m68k. And the reason isn't that they pass in a kernel pointer under set_fs(KERNEL_DS) at all: the reason is that in those configurations, "uaccess_kernel()" is simply not reliable. Those no-mmu setups set USER_DS and KERNEL_DS to the same values, so you can't test for the difference. In particular, the no-mmu case for ARM does #define USER_DS KERNEL_DS #define uaccess_kernel() (true) so USER_DS and KERNEL_DS have the same value, and uaccess_kernel() is always trivially true. The m68k case is slightly different and not quite as obvious. It does (spread out over multiple header files just to be extra exciting: asm/processor.h, asm/segment.h and asm-generic/uaccess.h): #define TASK_SIZE (0xFFFFFFFFUL) #define USER_DS MAKE_MM_SEG(TASK_SIZE) #define KERNEL_DS MAKE_MM_SEG(~0UL) #define get_fs() (current_thread_info()->addr_limit) #define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg) but the end result is the same: uaccess_kernel() will always be true, because USER_DS and KERNEL_DS end up having the same value, even if that value is defined differently. This is very arguably a misfeature in those implementations, but in the end we don't really care. All modern architectures have gotten rid of set_fs() already, and generic kernel code never uses it. And while the sanity check was a nice idea, an architecture would have to go the extra mile to actually break this. So this well-intentioned warning isn't really all that likely to find anything but these known false positives, and as such just isn't worth maintaining. Reported-by: Guenter Roeck Fixes: 8cd54c1c8480 ("iov_iter: separate direction from flavour") Cc: Matthew Wilcox Cc: Al Viro Signed-off-by: Linus Torvalds commit 28e92f990337b8b4c5fdec47667f8b96089c503e Merge: da803f82faa5c 641faf1b9064c Author: Linus Torvalds Date: Sun Jul 4 12:58:33 2021 -0700 Merge branch 'core-rcu-2021.07.04' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU updates from Paul McKenney: - Bitmap parsing support for "all" as an alias for all bits - Documentation updates - Miscellaneous fixes, including some that overlap into mm and lockdep - kvfree_rcu() updates - mem_dump_obj() updates, with acks from one of the slab-allocator maintainers - RCU NOCB CPU updates, including limited deoffloading - SRCU updates - Tasks-RCU updates - Torture-test updates * 'core-rcu-2021.07.04' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (78 commits) tasks-rcu: Make show_rcu_tasks_gp_kthreads() be static inline rcu-tasks: Make ksoftirqd provide RCU Tasks quiescent states rcu: Add missing __releases() annotation rcu: Remove obsolete rcu_read_unlock() deadlock commentary rcu: Improve comments describing RCU read-side critical sections rcu: Create an unrcu_pointer() to remove __rcu from a pointer srcu: Early test SRCU polling start rcu: Fix various typos in comments rcu/nocb: Unify timers rcu/nocb: Prepare for fine-grained deferred wakeup rcu/nocb: Only cancel nocb timer if not polling rcu/nocb: Delete bypass_timer upon nocb_gp wakeup rcu/nocb: Cancel nocb_timer upon nocb_gp wakeup rcu/nocb: Allow de-offloading rdp leader rcu/nocb: Directly call __wake_nocb_gp() from bypass timer rcu: Don't penalize priority boosting when there is nothing to boost rcu: Point to documentation of ordering guarantees rcu: Make rcu_gp_cleanup() be noinline for tracing rcu: Restrict RCU_STRICT_GRACE_PERIOD to at most four CPUs rcu: Make show_rcu_gp_kthreads() dump rcu_node structures blocking GP ... commit da803f82faa5ceeff34aa56c08ceba5384e44e47 Merge: b97efd5e98106 d25fba0e34742 Author: Linus Torvalds Date: Sun Jul 4 12:33:31 2021 -0700 Merge branch 'lkmm.2021.05.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull lkmm fixlet from Paul E McKenney. Fix missing underscore in Linux-kernel memory model docs. * 'lkmm.2021.05.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: tools/memory-model: Fix smp_mb__after_spinlock() spelling commit b97efd5e98106e1198884c13762ef03637605f87 Merge: a412897fb546f 117232c0b9126 Author: Linus Torvalds Date: Sun Jul 4 12:29:16 2021 -0700 Merge branch 'kcsan.2021.05.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull KCSAN updates from Paul McKenney. * 'kcsan.2021.05.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: kcsan: Use URL link for pointing access-marking.txt kcsan: Document "value changed" line kcsan: Report observed value changes kcsan: Remove kcsan_report_type kcsan: Remove reporting indirection kcsan: Refactor access_info initialization kcsan: Fold panic() call into print_report() kcsan: Refactor passing watchpoint/other_info kcsan: Distinguish kcsan_report() calls kcsan: Simplify value change detection kcsan: Add pointer to access-marking.txt to data_race() bullet commit a412897fb546fbb291095be576165ce757eff70b Merge: 2bb919b62f6e5 a4d5613c4dc6d Author: Linus Torvalds Date: Sun Jul 4 12:23:05 2021 -0700 Merge tag 'memblock-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock updates from Mike Rapoport: "Fix arm crashes caused by holes in the memory map. The coordination between freeing of unused memory map, pfn_valid() and core mm assumptions about validity of the memory map in various ranges was not designed for complex layouts of the physical memory with a lot of holes all over the place. Kefen Wang reported crashes in move_freepages() on a system with the following memory layout [1]: node 0: [mem 0x0000000080a00000-0x00000000855fffff] node 0: [mem 0x0000000086a00000-0x0000000087dfffff] node 0: [mem 0x000000008bd00000-0x000000008c4fffff] node 0: [mem 0x000000008e300000-0x000000008ecfffff] node 0: [mem 0x0000000090d00000-0x00000000bfffffff] node 0: [mem 0x00000000cc000000-0x00000000dc9fffff] node 0: [mem 0x00000000de700000-0x00000000de9fffff] node 0: [mem 0x00000000e0800000-0x00000000e0bfffff] node 0: [mem 0x00000000f4b00000-0x00000000f6ffffff] node 0: [mem 0x00000000fda00000-0x00000000ffffefff] These crashes can be mitigated by enabling CONFIG_HOLES_IN_ZONE on ARM and essentially turning pfn_valid_within() to pfn_valid() instead of having it hardwired to 1 on that architecture, but this would require to keep CONFIG_HOLES_IN_ZONE solely for this purpose. A cleaner approach is to update ARM's implementation of pfn_valid() to take into accounting rounding of the freed memory map to pageblock boundaries and make sure it returns true for PFNs that have memory map entries even if there is no physical memory backing those PFNs" Link: https://lore.kernel.org/lkml/2a1592ad-bc9d-4664-fd19-f7448a37edc0@huawei.com [1] * tag 'memblock-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: arm: extend pfn_valid to take into account freed memory map alignment memblock: ensure there is no overflow in memblock_overlaps_region() memblock: align freed memory map on pageblock boundaries with SPARSEMEM memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER commit 2bb919b62f6e5959552a90a399d09d683afa3d1d Merge: 0d4d4c6ff6deb d4a01902eb59e Author: Linus Torvalds Date: Sun Jul 4 12:17:38 2021 -0700 Merge tag 's390-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Rework inline asm to get rid of error prone "register asm" constructs, which are problematic especially when code instrumentation is enabled. In particular introduce and use register pair union to allocate even/odd register pairs. Unfortunately this breaks compatibility with older clang compilers and minimum clang version for s390 has been raised to 13. https://lore.kernel.org/linux-next/CAK7LNARuSmPCEy-ak0erPrPTgZdGVypBROFhtw+=3spoGoYsyw@mail.gmail.com/ - Fix gcc 11 warnings, which triggered various minor reworks all over the code. - Add zstd kernel image compression support. - Rework boot CPU lowcore handling. - De-duplicate and move kernel memory layout setup logic earlier. - Few fixes in preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for mem functions. - Remove broken and unused power management support leftovers in s390 drivers. - Disable stack-protector for decompressor and purgatory to fix buildroot build. - Fix vt220 sclp console name to match the char device name. - Enable HAVE_IOREMAP_PROT and add zpci_set_irq()/zpci_clear_irq() in zPCI code. - Remove some implausible WARN_ON_ONCEs and remove arch specific counter transaction call backs in favour of default transaction handling in perf code. - Extend/add new uevents for online/config/mode state changes of AP card / queue device in zcrypt. - Minor entry and ccwgroup code improvements. - Other small various fixes and improvements all over the code. * tag 's390-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (91 commits) s390/dasd: use register pair instead of register asm s390/qdio: get rid of register asm s390/ioasm: use symbolic names for asm operands s390/ioasm: get rid of register asm s390/cmf: get rid of register asm s390/lib,string: get rid of register asm s390/lib,uaccess: get rid of register asm s390/string: get rid of register asm s390/cmpxchg: use register pair instead of register asm s390/mm,pages-states: get rid of register asm s390/lib,xor: get rid of register asm s390/timex: get rid of register asm s390/hypfs: use register pair instead of register asm s390/zcrypt: Switch to flexible array member s390/speculation: Use statically initialized const for instructions virtio/s390: get rid of open-coded kvm hypercall s390/pci: add zpci_set_irq()/zpci_clear_irq() scripts/min-tool-version.sh: Raise minimum clang version to 13.0.0 for s390 s390/ipl: use register pair instead of register asm s390/mem_detect: fix tprot() program check new psw handling ... commit 0d4d4c6ff6debde4c44a418c59b304d4b514541c Merge: 0c66a95c7e014 90dc8c0e664ef Author: Linus Torvalds Date: Sun Jul 4 12:07:54 2021 -0700 Merge tag 'csky-for-linus-5.14-rc1' of git://github.com/c-sky/csky-linux Pull arch/csky updates from Guo Ren: "A small cleanup and a fixup" * tag 'csky-for-linus-5.14-rc1' of git://github.com/c-sky/csky-linux: csky: Kconfig: Remove unused selects csky: syscache: Fixup duplicate cache flush commit 0c66a95c7e014abc3489e69dd3972d9225027d49 Merge: 855ff900b8605 4ad6181e4b216 Author: Linus Torvalds Date: Sun Jul 4 11:55:13 2021 -0700 Merge tag 'cxl-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull CXL (Compute Express Link) updates from Dan Williams: "This subsystem is still in the build-out phase as the bulk of the update is improvements to enumeration and fleshing out the device model. In terms of new features, more mailbox commands have been added to the allowed-list in support of persistent memory provisioning support targeting v5.15. The critical update from an enumeration perspective is support for the CXL Fixed Memory Window Structure that indicates to Linux which system physical address ranges decode to the CXL Host Bridges in the system. This allows the driver to detect which address ranges have been mapped by firmware and what address ranges are available for future hotplug. So, again, mostly skeleton this round, with more meat targeting v5.15. Summary: - Add support for the CXL Fixed Memory Window Structure, a recent extension of the ACPI CEDT (CXL Early Discovery Table) - Add infrastructure for component registers - Add HDM (Host-managed device memory) decoder definitions - Define a device model for an HDM decoder tree - Bridge CXL persistent memory capabilities to an NVDIMM bus / device-model - Switch to fine grained mapping of CXL MMIO registers to allow different drivers / system software to own individual register blocks - Enable media provisioning commands, and publish the label storage area size in sysfs - Miscellaneous cleanups and fixes" * tag 'cxl-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (34 commits) cxl/pci: Rename CXL REGLOC ID cxl/acpi: Use the ACPI CFMWS to create static decoder objects cxl/acpi: Add the Host Bridge base address to CXL port objects cxl/pmem: Register 'pmem' / cxl_nvdimm devices libnvdimm: Drop unused device power management support libnvdimm: Export nvdimm shutdown helper, nvdimm_delete() cxl/pmem: Add initial infrastructure for pmem support cxl/core: Add cxl-bus driver infrastructure cxl/pci: Add media provisioning required commands cxl/component_regs: Fix offset cxl/hdm: Fix decoder count calculation cxl/acpi: Introduce cxl_decoder objects cxl/acpi: Enumerate host bridge root ports cxl/acpi: Add downstream port data to cxl_port instances cxl/Kconfig: Default drivers to CONFIG_CXL_BUS cxl/acpi: Introduce the root of a cxl_port topology cxl/pci: Fixup devm_cxl_iomap_block() to take a 'struct device *' cxl/pci: Add HDM decoder capabilities cxl/pci: Reserve individual register block regions cxl/pci: Map registers based on capabilities ... commit 855ff900b8605df2b9ea309534cd2f02dc0c4cb8 Merge: d2500a0c0e73d 9d6336831bdc7 Author: Linus Torvalds Date: Sun Jul 4 11:47:18 2021 -0700 Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - core supports now bus regulators controlling power for SCL/SDA - quite some DT binding conversions to YAML - added a seperate DT binding for the optional SMBus Alert feature - documentation with examples how to deal with I2C sysfs files - some bigger rework for the i801 driver - and a few usual driver updates * 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (42 commits) i2c: ali1535: mention that the device should not be disabled i2c: mpc: Restore reread of I2C status register i2c: core-smbus: Expose PEC calculate function for generic use Documentation: i2c: Add doc for I2C sysfs i2c: core: Disable client irq on reboot/shutdown dt-bindings: i2c: update bindings for MT8195 SoC i2c: imx: Fix some checkpatch warnings i2c: davinci: Simplify with dev_err_probe() i2c: cadence: Simplify with dev_err_probe() i2c: xiic: Simplify with dev_err_probe() i2c: cadence: Clear HOLD bit before xfer_size register rolls over dt-bindings: i2c: ce4100: Replace "ti,pcf8575" by "nxp,pcf8575" i2c: i801: Improve i801_setup_hstcfg i2c: i801: Use driver name constant instead of function dev_driver_string i2c: i801: Simplify initialization of i2c_board_info in i801_probe_optional_slaves i2c: i801: Improve status polling i2c: cht-wc: Replace of_node by NULL i2c: riic: Add RZ/G2L support dt-bindings: i2c: renesas,riic: Document RZ/G2L I2C controller dt-bindings: i2c: renesas,iic: Convert to json-schema ... commit d2500a0c0e73d4387cde9185edcdf397f52e428b Author: Martin K. Petersen Date: Sat Jul 3 11:58:33 2021 -0400 scsi: blkcg: Fix application ID config options Commit d2bcbeab4200 ("scsi: blkcg: Add app identifier support for blkcg") introduced an FC_APPID config option under SCSI. However, the added config option is not used anywhere. Simply remove it. The block layer BLK_CGROUP_FC_APPID config option is what actually controls whether the application ID code should be built or not. Make this option dependent on NVMe over FC since that is currently the only transport which supports the capability. Fixes: d2bcbeab4200 ("scsi: blkcg: Add app identifier support for blkcg") Reported-by: Linus Torvalds Signed-off-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 93274f1dd6b0a615b299beddf99871fe81f91275 Author: Dennis Zhou Date: Sat Jul 3 03:49:57 2021 +0000 percpu: flush tlb in pcpu_reclaim_populated() Prior to "percpu: implement partial chunk depopulation", pcpu_depopulate_chunk() was called only on the destruction path. This meant the virtual address range was on its way back to vmalloc which will handle flushing the tlbs for us. However, with pcpu_reclaim_populated(), we are now calling pcpu_depopulate_chunk() during the active lifecycle of a chunk. Therefore, we need to flush the tlb as well otherwise we can end up accessing the wrong page through an invalid tlb mapping as reported in [1]. [1] https://lore.kernel.org/lkml/20210702191140.GA3166599@roeck-us.net/ Fixes: f183324133ea ("percpu: implement partial chunk depopulation") Reported-and-tested-by: Guenter Roeck Signed-off-by: Dennis Zhou commit fe6a6de6692e7f7159c1ff42b07ecd737df712b4 Author: Srinivas Pandruvada Date: Mon Jun 28 14:58:03 2021 -0700 thermal/drivers/int340x/processor_thermal: Fix tcc setting The following fixes are done for tcc sysfs interface: - TCC is 6 bits only from bit 29-24 - TCC of 0 is valid - When BIT(31) is set, this register is read only - Check for invalid tcc value - Error for negative values Fixes: fdf4f2fb8e899 ("drivers: thermal: processor_thermal_device: Export sysfs interface for TCC offset") Signed-off-by: Srinivas Pandruvada Cc: stable@vger.kernel.org Acked-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210628215803.75038-1-srinivas.pandruvada@linux.intel.com commit ad079d981db6a4047b60c576df6430bed36bcd7d Author: Srinivas Pandruvada Date: Mon Jun 28 11:32:32 2021 -0700 thermal/drivers/int340x/processor_thermal: Fix warning for return value Fix smatch warnings: drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c:258 proc_thermal_pci_probe() warn: missing error code 'ret' Use PTR_ERR to return failure of thermal_zone_device_register(). Reported-by: kernel test robot Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210628183232.62877-1-srinivas.pandruvada@linux.intel.com commit 24e21d9f40ec3fb4228e3427454b733316a2a6c6 Author: Frank Wunderlich Date: Tue Jun 8 17:45:30 2021 +0200 thermal/drivers/mediatek: Add sensors-support Add HWMON-support to mediateks thermal driver to allow lm-sensors userspace tools read soc temperature Signed-off-by: Frank Wunderlich Reviewed-by: Matthias Brugger Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210608154530.70074-1-linux@fw-web.de commit acd65d5d1cf4a3324c8970ba74632abe069fe23e Author: Srinivas Pandruvada Date: Tue May 25 13:48:11 2021 -0700 thermal/drivers/int340x/processor_thermal: Add PCI MMIO based thermal driver Add a new PCI driver which register a thermal zone and allows to get notification for threshold violation by a RW trip point. These notifications are delivered from the device using MSI based interrupt. The main difference between this new PCI driver and the existing one is that the temperature and trip points directly use PCI MMIO instead of using ACPI methods. This driver registers a thermal zone "TCPU_PCI" in addition to the legacy processor thermal device, which uses ACPI companion device to set name, temperature and trips. This driver is enabled for AlderLake. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210525204811.3793651-3-srinivas.pandruvada@linux.intel.com commit 8fe145f7ceda7b8909cd471e1e75dd20dfbf41a5 Author: Srinivas Pandruvada Date: Tue May 25 13:48:10 2021 -0700 thermal/drivers/int340x/processor_thermal: Split enumeration and processing part Remove enumeration part from the processor_thermal_device to two different modules. One for ACPI and one for PCI: ACPI enumeration: int3401_thermal PCI part: processor_thermal_device_pci_legacy The current processor_thermal_device now just implements interface functions to be used by the ACPI and PCI enumeration module. This is done by: 1. Make functions proc_thermal_add() and proc_thermal_remove() non static and export them for usage in other processor_thermal_device_pci_legacy.c and in int3401_thermal.c. 2. Move the sysfs file creation for TCC offset and power limit attribute group to the proc_thermal_add() from the individual enumeration callbacks for PCI and ACPI. 3. Create new interface functions proc_thermal_mmio_add() and proc_thermal_mmio_remove() which will be called from the processor_thermal_device_pci_legacy module. 4. Export proc_thermal_resume(), so that it can be used by power management callbacks. 5. Remove special check for double enumeration as it never happens. While here, fix some cleanup on error conditions in proc_thermal_add(). No functional changes are expected with this change. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210525204811.3793651-2-srinivas.pandruvada@linux.intel.com commit 8b2ea897328c3e042ef7c3e80503c802db24a678 Author: Yang Li Date: Wed Jun 9 15:22:30 2021 +0800 thermal: devfreq_cooling: Fix kernel-doc Fix function name in devfreq_cooling.c comment to remove a warning found by kernel-doc. drivers/thermal/devfreq_cooling.c:479: warning: expecting prototype for devfreq_cooling_em_register_power(). Prototype was for devfreq_cooling_em_register() instead. Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Reviewed-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1623223350-128104-1-git-send-email-yang.lee@linux.alibaba.com commit da5e562fbc5676902d9007db4b05af9de7a890d5 Author: Andy Shevchenko Date: Fri Jun 18 18:34:51 2021 +0300 thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit() Switch to use find_first_zero_bit() instead of open-coded variant. Signed-off-by: Andy Shevchenko Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210618153451.89246-1-andriy.shevchenko@linux.intel.com commit 481bd297291b59480b87f88f88fbcff59455dcc3 Author: Bjorn Andersson Date: Tue Jun 8 13:16:38 2021 -0700 dt-bindings: thermal: tsens: Add sc8180x compatible The Qualcomm sc8180x platform has the usual tsens blocks, add compatible for this. Signed-off-by: Bjorn Andersson Acked-by: Thara Gopinath Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210608201638.2136344-1-bjorn.andersson@linaro.org commit 4b14c055a6f644cbeb1156ba24647e92fe51ec69 Author: Ezequiel Garcia Date: Thu May 6 14:55:13 2021 -0300 dt-bindings: rockchip-thermal: Support the RK3568 SoC compatible Add a new compatible for the thermal sensor device on RK3568 SoCs. Signed-off-by: Ezequiel Garcia Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506175514.168365-4-ezequiel@collabora.com commit 7d70aa141ed2dcd36c93e070ba62d96613ccc06b Author: Ezequiel Garcia Date: Thu May 6 14:55:12 2021 -0300 dt-bindings: thermal: convert rockchip-thermal to json-schema Convert Rockchip Thermal sensor dt-bindings to YAML. Signed-off-by: Ezequiel Garcia Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506175514.168365-3-ezequiel@collabora.com commit 5e5c9f9a75fc4532980c2e699caf8a36070a3a2e Author: Dmitry Osipenko Date: Wed Jun 16 22:04:13 2021 +0300 thermal/core/thermal_of: Stop zone device before unregistering it Zone device is enabled after thermal_zone_of_sensor_register() completion, but it's not disabled before senor is unregistered, leaving temperature polling active. This results in accessing a disabled zone device and produces a warning about this problem. Stop zone device before unregistering it in order to fix this "use-after-free" problem. Signed-off-by: Dmitry Osipenko Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210616190417.32214-3-digetx@gmail.com commit 1aab6b81af3c96e3181911140d2528e112335bef Author: Dmitry Osipenko Date: Wed Jun 16 22:04:12 2021 +0300 dt-bindings: thermal: Add binding for Tegra30 thermal sensor All NVIDIA Tegra30 SoCs have on-chip sensors which monitor temperature and voltage of the SoC. Sensors also controls CPU x2 freq throttle and emits emergency shutdown signal. TSENSOR has has two separate channels for each sensor placed in a different parts of the SoC. Add binding for the sensor hardware. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210616190417.32214-2-digetx@gmail.com commit 90dc8c0e664efcb14e2f133309d84bfdcb0b3d24 Author: Guo Ren Date: Wed May 12 15:58:41 2021 +0800 csky: Kconfig: Remove unused selects - GENERIC_ALLOCATOR is duplicated - Remove USB_ARCH_HAS_OHCI & USB_ARCH_HAS_EHCI, because they have been removed from linux. Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 6ea42c84f33368eb3fe1ec1bff8d7cb1a5c7b07a Author: Guo Ren Date: Tue May 4 14:08:44 2021 +0800 csky: syscache: Fixup duplicate cache flush The current csky logic of sys_cacheflush is wrong, it'll cause icache flush call dcache flush again. Now fixup it with a conditional "break & fallthrough". Fixes: 997153b9a75c ("csky: Add flush_icache_mm to defer flush icache all") Fixes: 0679d29d3e23 ("csky: fix syscache.c fallthrough warning") Acked-by: Randy Dunlap Co-Developed-by: Randy Dunlap Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 1e5654de0f51890f88abd409ebf4867782431e81 Author: Namjae Jeon Date: Fri Jun 11 09:40:24 2021 +0900 exfat: handle wrong stream entry size in exfat_readdir() The compatibility issue between linux exfat and exfat of some camera company was reported from Florian. In their exfat, if the number of files exceeds any limit, the DataLength in stream entry of the directory is no longer updated. So some files created from camera does not show in linux exfat. because linux exfat doesn't allow that cpos becomes larger than DataLength of stream entry. This patch check DataLength in stream entry only if the type is ALLOC_NO_FAT_CHAIN and add the check ensure that dentry offset does not exceed max dentries size(256 MB) to avoid the circular FAT chain issue. Fixes: ca06197382bd ("exfat: add directory operations") Cc: stable@vger.kernel.org # v5.9 Reported-by: Florian Cramer Reviewed-by: Sungjong Seo Tested-by: Chris Down Signed-off-by: Namjae Jeon commit 6ff63a150b5556012589ae59efac1b5eeb7d32c3 Author: Lorenzo Bianconi Date: Sat Jul 3 21:17:27 2021 +0200 net: marvell: always set skb_shared_info in mvneta_swbm_add_rx_fragment Always set skb_shared_info data structure in mvneta_swbm_add_rx_fragment routine even if the fragment contains only the ethernet FCS. Fixes: 039fbc47f9f1 ("net: mvneta: alloc skb_shared_info on the mvneta_rx_swbm stack") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 303392fd5c160822bf778270b28ec5ea50cab2b4 Merge: 8e8d9442d1139 7b97174cc93fa Author: Linus Torvalds Date: Sat Jul 3 11:57:42 2021 -0700 Merge tag 'leds-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "This contains quite a lot of fixes, with more fixes in my inbox that did not make it (sorry)" * tag 'leds-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (36 commits) leds: lgm: Fix up includes leds: ktd2692: Fix an error handling path leds: as3645a: Fix error return code in as3645a_parse_node() leds: turris-omnia: add missing MODULE_DEVICE_TABLE leds: lp55xx: Initialize enable GPIO direction to output leds: lm36274: Add missed property.h leds: el15203000: Make error handling more robust leds: pwm: Make error handling more robust leds: lt3593: Make use of device properties leds: lp50xx: Put fwnode in error case during ->probe() leds: lm3697: Don't spam logs when probe is deferred leds: lm3692x: Put fwnode in any case during ->probe() leds: lm36274: Correct headers (of*.h -> mod_devicetable.h) leds: lm36274: Put fwnode in error case during ->probe() leds: lm3532: Make error handling more robust leds: lm3532: select regmap I2C API leds: lgm-sso: Drop duplicate NULL check for GPIO operations leds: lgm-sso: Remove unneeded of_match_ptr() leds: lgm-sso: Fix clock handling leds: el15203000: Introduce to_el15203000_led() helper ... commit 8e8d9442d1139d05d0c3b83efa34c4b7693d2969 Merge: 58ec9059b396a 6a45ece4c9af4 Author: Linus Torvalds Date: Sat Jul 3 11:49:33 2021 -0700 Merge tag 'vfio-v5.14-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Module reference fixes, structure renaming (Max Gurtovoy) - Export and use common pci_dev_trylock() (Luis Chamberlain) - Enable direct mdev device creation and probing by parent (Christoph Hellwig & Jason Gunthorpe) - Fix mdpy error path leak (Colin Ian King) - Fix mtty list entry leak (Jason Gunthorpe) - Enforce mtty device limit (Alex Williamson) - Resolve concurrent vfio-pci mmap faults (Alex Williamson) * tag 'vfio-v5.14-rc1' of git://github.com/awilliam/linux-vfio: vfio/pci: Handle concurrent vma faults vfio/mtty: Enforce available_instances vfio/mtty: Delete mdev_devices_list vfio: use the new pci_dev_trylock() helper to simplify try lock PCI: Export pci_dev_trylock() and pci_dev_unlock() vfio/mdpy: Fix memory leak of object mdev_state->vconfig vfio/iommu_type1: rename vfio_group struck to vfio_iommu_group vfio/mbochs: Convert to use vfio_register_group_dev() vfio/mdpy: Convert to use vfio_register_group_dev() vfio/mtty: Convert to use vfio_register_group_dev() vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE driver core: Export device_driver_attach() driver core: Don't return EPROBE_DEFER to userspace during sysfs bind driver core: Flow the return code from ->probe() through to sysfs bind driver core: Better distinguish probe errors in really_probe driver core: Pull required checks into driver_probe_device() vfio/platform: remove unneeded parent_module attribute vfio: centralize module refcount in subsystem layer commit 58ec9059b396a570b208239b4edc45eeb68b14c4 Merge: d3acb15a3a1b8 7962c7d196e36 Author: Linus Torvalds Date: Sat Jul 3 11:41:14 2021 -0700 Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs name lookup updates from Al Viro: "Small namei.c patch series, mostly to simplify the rules for nameidata state. It's actually from the previous cycle - but I didn't post it for review in time... Changes visible outside of fs/namei.c: file_open_root() calling conventions change, some freed bits in LOOKUP_... space" * 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: namei: make sure nd->depth is always valid teach set_nameidata() to handle setting the root as well take LOOKUP_{ROOT,ROOT_GRABBED,JUMPED} out of LOOKUP_... space switch file_open_root() to struct path commit d3acb15a3a1b841dc709c3853ec900170b2478e5 Merge: f92a322a63517 6852df1266995 Author: Linus Torvalds Date: Sat Jul 3 11:30:04 2021 -0700 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter updates from Al Viro: "iov_iter cleanups and fixes. There are followups, but this is what had sat in -next this cycle. IMO the macro forest in there became much thinner and easier to follow..." * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (37 commits) csum_and_copy_to_pipe_iter(): leave handling of csum_state to caller clean up copy_mc_pipe_to_iter() pipe_zero(): we don't need no stinkin' kmap_atomic()... iov_iter: clean csum_and_copy_...() primitives up a bit copy_page_from_iter(): don't need kmap_atomic() for kvec/bvec cases copy_page_to_iter(): don't bother with kmap_atomic() for bvec/kvec cases iterate_xarray(): only of the first iteration we might get offset != 0 pull handling of ->iov_offset into iterate_{iovec,bvec,xarray} iov_iter: make iterator callbacks use base and len instead of iovec iov_iter: make the amount already copied available to iterator callbacks iov_iter: get rid of separate bvec and xarray callbacks iov_iter: teach iterate_{bvec,xarray}() about possible short copies iterate_bvec(): expand bvec.h macro forest, massage a bit iov_iter: unify iterate_iovec and iterate_kvec iov_iter: massage iterate_iovec and iterate_kvec to logics similar to iterate_bvec iterate_and_advance(): get rid of magic in case when n is 0 csum_and_copy_to_iter(): massage into form closer to csum_and_copy_from_iter() iov_iter: replace iov_iter_copy_from_user_atomic() with iterator-advancing variant [xarray] iov_iter_npages(): just use DIV_ROUND_UP() iov_iter_npages(): don't bother with iterate_all_kinds() ... commit f92a322a63517a798f2da57d56b483a6ae8f45a1 Merge: 757fa80f4edca e4b275531887f Author: Linus Torvalds Date: Sat Jul 3 11:23:40 2021 -0700 Merge branch 'work.d_path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs d_path() updates from Al Viro: "d_path.c refactoring" * 'work.d_path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: getcwd(2): clean up error handling d_path: prepend_path() is unlikely to return non-zero d_path: prepend_path(): lift the inner loop into a new helper d_path: prepend_path(): lift resetting b in case when we'd return 3 out of loop d_path: prepend_path(): get rid of vfsmnt d_path: introduce struct prepend_buffer d_path: make prepend_name() boolean d_path: lift -ENAMETOOLONG handling into callers of prepend_path() d_path: don't bother with return value of prepend() getcwd(2): saner logics around prepend_path() call d_path: get rid of path_with_deleted() d_path: regularize handling of root dentry in __dentry_path() d_path: saner calling conventions for __dentry_path() d_path: "\0" is {0,0}, not {0} commit 757fa80f4edca010769f3f8d116c19c85f27e817 Merge: a70bb580bfeae 4030a6e6a6a4a Author: Linus Torvalds Date: Sat Jul 3 11:13:22 2021 -0700 Merge tag 'trace-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: - Added option for per CPU threads to the hwlat tracer - Have hwlat tracer handle hotplug CPUs - New tracer: osnoise, that detects latency caused by interrupts, softirqs and scheduling of other tasks. - Added timerlat tracer that creates a thread and measures in detail what sources of latency it has for wake ups. - Removed the "success" field of the sched_wakeup trace event. This has been hardcoded as "1" since 2015, no tooling should be looking at it now. If one exists, we can revert this commit, fix that tool and try to remove it again in the future. - tgid mapping fixed to handle more than PID_MAX_DEFAULT pids/tgids. - New boot command line option "tp_printk_stop", as tp_printk causes trace events to write to console. When user space starts, this can easily live lock the system. Having a boot option to stop just after boot up is useful to prevent that from happening. - Have ftrace_dump_on_oops boot command line option take numbers that match the numbers shown in /proc/sys/kernel/ftrace_dump_on_oops. - Bootconfig clean ups, fixes and enhancements. - New ktest script that tests bootconfig options. - Add tracepoint_probe_register_may_exist() to register a tracepoint without triggering a WARN*() if it already exists. BPF has a path from user space that can do this. All other paths are considered a bug. - Small clean ups and fixes * tag 'trace-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (49 commits) tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT tracing: Simplify & fix saved_tgids logic treewide: Add missing semicolons to __assign_str uses tracing: Change variable type as bool for clean-up trace/timerlat: Fix indentation on timerlat_main() trace/osnoise: Make 'noise' variable s64 in run_osnoise() tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing tracing: Fix spelling in osnoise tracer "interferences" -> "interference" Documentation: Fix a typo on trace/osnoise-tracer trace/osnoise: Fix return value on osnoise_init_hotplug_support trace/osnoise: Make interval u64 on osnoise_main trace/osnoise: Fix 'no previous prototype' warnings tracing: Have osnoise_main() add a quiescent state for task rcu seq_buf: Make trace_seq_putmem_hex() support data longer than 8 seq_buf: Fix overflow in seq_buf_putmem_hex() trace/osnoise: Support hotplug operations trace/hwlat: Support hotplug operations trace/hwlat: Protect kdata->kthread with get/put_online_cpus trace: Add timerlat tracer trace: Add osnoise tracer ... commit a70bb580bfeaead9f685d4c28f7cd685c905d8c3 Merge: 4b820e167bf6f 6a9a930dc4415 Author: Linus Torvalds Date: Sat Jul 3 10:54:08 2021 -0700 Merge tag 'devicetree-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Refine reserved memory nomap handling - Merge some PCI and non-PCI address handling implementations - Simplify of_address.h header ifdefs - Improve printk handling of some 64-bit types - Convert adi,adv7511, Arm ccree, Arm SCMI, Arm SCU, Arm TWD timer, Arm VIC, arm,sbsa-gwdt, Arm/Amlogic SCPI, Aspeed I2C, Broadcom iProc PWM, linaro,optee-tz, MDIO GPIO, Mediatek RNG, MTD physmap, NXP pcf8563/pcf85263/pcf85363, Renesas TPU, renesas,emev2-smu, renesas,r9a06g032-sysctrl, sysc-rmobile, Tegra20 EMC, TI AM56 PCI, TI OMAP mailbox, TI SCI bindings, virtio-mmio, Zynq FPGA, and ZynqMP RTC to DT schema - Convert mux and mux controller bindings to schema. This includes MDIO IIO, and I2C muxes. - Add Arm PL031 RTC binding schema - Add vendor prefixes for StarFive Technology Co. Ltd. and Insignal Ltd - Fix some stale doc references - Remove stale property-units.txt. Superseded by schema in dt-schema repo. - Fixes for 'unevaluatedProperties' handling (enabled with experimental json-schema support) - Drop redundant usage of minItems and maxItems across the tree - Update some examples to use bindings with a schema * tag 'devicetree-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (83 commits) dt-bindings: Fix 'unevaluatedProperties' errors in DT graph users dt-bindings: display: renesas,du: Fix 'ports' reference dt-bindings: media: adv7180: Add missing video-interfaces.yaml reference dt-bindings: crypto: ccree: Convert to json-schema dt-bindings: fpga: zynq: convert bindings to YAML dt-bindings: rtc: zynqmp: convert bindings to YAML dt-bindings: interrupt-controller: Convert ARM VIC to json-schema of: of_reserved_mem: mark nomap memory instead of removing of: of_reserved_mem: only call memblock_free for normal reserved memory dt-bindings: Drop redundant minItems/maxItems dt-bindings: spmi: Correct 'reg' schema of: reserved-memory: Add stub for RESERVEDMEM_OF_DECLARE() dt-bindings: clk: vc5: Fix example dt-bindings: timer: renesas,tmu: add r8a779a0 TMU support dt-bindings: drm: bridge: adi,adv7511.txt: convert to yaml dt-bindings: PCI: ti,am65: Convert PCIe host/endpoint mode dt-bindings to YAML of: Remove superfluous casts when printing u64 values of: Fix truncation of memory sizes on 32-bit platforms dt-bindings: rtc: nxp,pcf8563: Absorb pcf85263/pcf85363 bindings dt-bindings: pwm: Use examples with documented/matching schema ... commit 8d622d21d24803408b256d96463eac4574dcf067 Author: Michael S. Tsirkin Date: Tue Apr 13 01:19:16 2021 -0400 virtio: fix up virtio_disable_cb virtio_disable_cb is currently a nop for split ring with event index. This is because it used to be always called from a callback when we know device won't trigger more events until we update the index. However, now that we run with interrupts enabled a lot we also poll without a callback so that is different: disabling callbacks will help reduce the number of spurious interrupts. Further, if using event index with a packed ring, and if being called from a callback, we actually do disable interrupts which is unnecessary. Fix both issues by tracking whenever we get a callback. If that is the case disabling interrupts with event index can be a nop. If not the case disable interrupts. Note: with a split ring there's no explicit "no interrupts" value. For now we write a fixed value so our chance of triggering an interupt is 1/ring size. It's probably better to write something related to the last used index there to reduce the chance even further. For now I'm keeping it simple. Signed-off-by: Michael S. Tsirkin commit 22bc63c58e876cc359d0b1566dee3db8ecc16722 Author: Michael S. Tsirkin Date: Tue Apr 13 01:38:08 2021 -0400 virtio_net: move txq wakeups under tx q lock We currently check num_free outside tx q lock which is unsafe: new packets can arrive meanwhile and there won't be space in the queue. Thus a spurious queue wakeup causing overhead and even packet drops. Move the check under the lock to fix that. Signed-off-by: Michael S. Tsirkin commit 5a2f966d0f3fa0ef6dada7ab9eda74cacee96b8a Author: Michael S. Tsirkin Date: Tue Apr 13 01:35:26 2021 -0400 virtio_net: move tx vq operation under tx queue lock It's unsafe to operate a vq from multiple threads. Unfortunately this is exactly what we do when invoking clean tx poll from rx napi. Same happens with napi-tx even without the opportunistic cleaning from the receive interrupt: that races with processing the vq in start_xmit. As a fix move everything that deals with the vq to under tx lock. Fixes: b92f1e6751a6 ("virtio-net: transmit napi") Signed-off-by: Michael S. Tsirkin commit 6f5312f801836e6af9bcbb0bdb44dc423e129206 Author: Eli Cohen Date: Wed Jun 2 11:58:54 2021 +0300 vdpa/mlx5: Add support for running with virtio_vdpa In order to support running vdpa using vritio_vdpa driver, we need to create a different kind of MR, one that has 1:1 mapping, since the addresses referring to virtqueues are dma addresses. We create the 1:1 MR in mlx5_vdpa_dev_add() only in case firmware supports the general capability umem_uid_0. The reason for that is that 1:1 MRs must be created with uid == 0 while virtqueue objects can be created with uid == 0 only when the firmware capability is on. If the set_map() callback is called with new translations provided through iotlb, the driver will destroy the 1:1 MR and create a regular one. Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210602085854.62690-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 7d23dcdf213c2e5f097eb7eec3148c26eb01d59f Author: Eli Cohen Date: Sun Jun 6 08:31:50 2021 +0300 vdp/mlx5: Fix setting the correct dma_device Before SF support was introduced, the DMA device was equal to mdev->device which was in essence equal to pdev->dev. With SF introduction this is no longer true. It has already been handled for vhost_vdpa since the reference to the dma device can from within mlx5_vdpa. With virtio_vdpa this broke. To fix this we set the real dma device when initializing the device. In addition, for the sake of consistency, previous references in the code to the dma device are changed to vdev->dma_dev. Fixes: d13a15d544ce5 ("vdpa/mlx5: Use the correct dma device when registering memory") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210606053150.170489-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit e13cd45d352dedac53529fb49e7d7e293f74fb90 Author: Eli Cohen Date: Mon May 31 19:04:04 2021 +0300 vdpa/mlx5: Support creating resources with uid == 0 Currently all resources must be created with uid != 0 which is essential when userspace processes are allocating virtquueue resources. Since this is a kernel implementation, it is perfectly legal to open resources with uid == 0. In case firmware supports, avoid allocating user context. Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210531160404.31368-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 71ab6a7cfbae27f86a3901daab10bfe13b3a1e3a Author: Eli Cohen Date: Sun May 30 12:03:49 2021 +0300 vdpa/mlx5: Fix possible failure in umem size calculation umem size is a 32 bit unsigned value so assigning it to an int could cause false failures. Set the calculated value inside the function and modify function name to reflect the fact it updates the size. This bug was found during code review but never had real impact to this date. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210530090349.8360-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit e3011776af16caf423f2c36d0047acd624c274fa Author: Eli Cohen Date: Sun May 30 12:03:17 2021 +0300 vdpa/mlx5: Fix umem sizes assignments on VQ create Fix copy paste bug assigning umem1 size to umem2 and umem3. The issue was discovered when trying to use a 1:1 MR that covers the entire address space where firmware complained that provided sizes are not large enough. 1:1 MRs are required to support virtio_vdpa. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20210530090317.8284-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 31c11db6bd93b0c051d2c835da4fa9bba636cfdb Author: Yang Li Date: Wed May 26 11:12:11 2021 +0800 virtio_ring: Fix kernel-doc Fix function name in virtio_ring.c kernel-doc comment to remove a warning found by clang_w1. drivers/virtio/virtio_ring.c:1903: warning: expecting prototype for virtqueue_get_buf(). Prototype was for virtqueue_get_buf_ctx() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1621998731-17445-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Michael S. Tsirkin commit d8f35f41e2b47ec94626dec93b47481d93580bfc Author: Mike Christie Date: Tue May 25 12:47:33 2021 -0500 vhost: fix up vhost_work coding style Switch from a mix of tabs and spaces to just tabs. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20210525174733.6212-6-michael.christie@oracle.com Reviewed-by: Stefano Garzarella Signed-off-by: Michael S. Tsirkin commit efb18e1e50b4dc1719f57089a7df9a8301ec48e4 Author: Mike Christie Date: Tue May 25 12:47:32 2021 -0500 vhost: fix poll coding style We use 3 coding styles in this struct. Switch to just tabs. Signed-off-by: Mike Christie Reviewed-by: Chaitanya Kulkarni Reviewed-by: Stefan Hajnoczi Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210525174733.6212-5-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin commit d60146c161befc8d62cba427be869b2231224347 Author: Mike Christie Date: Tue May 25 12:47:31 2021 -0500 vhost-scsi: reduce flushes during endpoint clearing vhost_scsi_flush will flush everything, so we can clear the backends then flush, then destroy. We don't need to flush before each vq destruction because after the flush we will have made sure there can be no new cmds started and there are no running cmds. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20210525174733.6212-4-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin commit 31fbea3ab94ea1bf537365e9340d64d216c3c3eb Author: Mike Christie Date: Tue May 25 12:47:30 2021 -0500 vhost-scsi: remove extra flushes The vhost work flush function was flushing the entire work queue, so there is no need for the double vhost_work_dev_flush calls in vhost_scsi_flush. And we do not need to call vhost_poll_flush for each poller because that call also ends up flushing the same work queue thread the vhost_work_dev_flush call flushed. Signed-off-by: Mike Christie Reviewed-by: Stefan Hajnoczi Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210525174733.6212-3-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin commit 1465cb6117bafbf998c05b79982903d17d15fe7f Author: Mike Christie Date: Tue May 25 12:47:29 2021 -0500 vhost: remove work arg from vhost_work_flush vhost_work_flush doesn't do anything with the work arg. This patch drops it and then renames vhost_work_flush to vhost_work_dev_flush to reflect that the function flushes all the works in the dev and not just a specific queue or work item. Signed-off-by: Mike Christie Acked-by: Jason Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210525174733.6212-2-michael.christie@oracle.com Reviewed-by: Stefano Garzarella Signed-off-by: Michael S. Tsirkin commit d00d8da5869a2608e97cfede094dfc5e11462a46 Author: Xie Yongji Date: Tue May 25 20:56:22 2021 +0800 virtio_console: Assure used length from device is limited The buf->len might come from an untrusted device. This ensures the value would not exceed the size of the buffer to avoid data corruption or loss. Signed-off-by: Xie Yongji Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210525125622.1203-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin commit 63947b3434f475418b9677a393d025c0962c2cf8 Author: Stefan Hajnoczi Date: Mon May 24 16:40:20 2021 +0100 virtio-blk: limit seg_max to a safe value The struct virtio_blk_config seg_max value is read from the device and incremented by 2 to account for the request header and status byte descriptors added by the driver. In preparation for supporting untrusted virtio-blk devices, protect against integer overflow and limit the value to a safe maximum. Signed-off-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20210524154020.98195-1-stefanha@redhat.com Reviewed-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin commit 7a43ce37cd595ed7b6e6a48bdb3a598e647aa738 Author: Shaokun Zhang Date: Mon May 24 20:04:44 2021 +0800 vhost: Remove the repeated declaration Function 'vhost_vring_ioctl' is declared twice, remove the repeated declaration. Cc: "Michael S. Tsirkin" Cc: Jason Wang Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1621857884-19964-1-git-send-email-zhangshaokun@hisilicon.com Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin commit 94e48d6aafef23143f92eadd010c505c49487576 Author: Jason Wang Date: Thu Jun 24 11:59:39 2021 +0800 vp_vdpa: correct the return value when fail to map notification We forget to assign a error value when we fail to map the notification during prove. This patch fixes it. Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 11d8ffed00b23 ("vp_vdpa: switch to use vp_modern_map_vq_notify()") Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210624035939.26618-1-jasowang@redhat.com Reviewed-by: Stefano Garzarella Signed-off-by: Michael S. Tsirkin commit 3f2869cace829fb4b80fc53b3ddaa7f4ba9acbf1 Author: Xie Yongji Date: Mon May 17 16:45:16 2021 +0800 virtio_net: Fix error handling in virtnet_restore() Do some cleanups in virtnet_restore() when virtnet_cpu_notif_add() failed. Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210517084516.332-1-xieyongji@bytedance.com Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin commit b71ba22e7c6c6b279c66f53ee7818709774efa1f Author: Xie Yongji Date: Mon May 17 16:43:32 2021 +0800 virtio-blk: Fix memory leak among suspend/resume procedure The vblk->vqs should be freed before we call init_vqs() in virtblk_restore(). Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20210517084332.280-1-xieyongji@bytedance.com Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin commit 42326903c6324eca02ae3139e293a1aeb7540037 Author: Zhu Lingshan Date: Mon May 10 16:10:15 2021 +0800 vDPA/ifcvf: reuse pre-defined macros for device ids and vendor ids This commit would reuse pre-defined macros for ifcvf device ids and vendor ids Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20210510081015.4212-3-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit d61914ea6adabde9126b0bed64a7a3a42249435e Author: Zhu Lingshan Date: Mon May 10 16:10:14 2021 +0800 virtio: update virtio id table, add transitional ids This commit updates virtio id table by adding transitional device ids Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20210510081015.4212-2-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 5f1b73a275f8c0ec03b46b01990e93d6dac30848 Author: Zhu Lingshan Date: Wed Jun 2 16:45:50 2021 +0800 vDPA/ifcvf: implement doorbell mapping for ifcvf This commit implements doorbell mapping feature for ifcvf. This feature maps the notify page to userspace, to eliminate vmexit when kick a vq. Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20210602084550.289599-3-lingshan.zhu@intel.com Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin commit 04c6ad8f22da9394687d30a0d5b5477c075e2833 Author: Zhu Lingshan Date: Wed Jun 2 16:45:49 2021 +0800 vDPA/ifcvf: record virtio notify base This commit records virtio notify base physical addr and calculate doorbell physical address for vqs. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210602084550.289599-2-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit e22626a876a086e1ce268ab31d1826dfc4c77550 Author: Wan Jiabing Date: Mon May 10 10:43:03 2021 +0800 vdpa_sim_blk: remove duplicate include of linux/blkdev.h In commit 7d189f617f83f ("vdpa_sim_blk: implement ramdisk behaviour") linux/blkdev.h was included here causing the duplicate include. Remove the later duplicate include. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210510024307.7143-1-wanjiabing@vivo.com Reviewed-by: Stefano Garzarella Signed-off-by: Michael S. Tsirkin commit 8693059284ddbe9e3a46b673d093247e91458917 Author: Stefano Garzarella Date: Tue May 4 15:54:44 2021 +0200 vhost-iotlb: fix vhost_iotlb_del_range() documentation Trivial change for the vhost_iotlb_del_range() documentation, fixing the function name in the comment block. Discovered with `make C=2 M=drivers/vhost`: ../drivers/vhost/iotlb.c:92: warning: expecting prototype for vring_iotlb_del_range(). Prototype was for vhost_iotlb_del_range() instead Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210504135444.158716-1-sgarzare@redhat.com Acked-by: Jason Wang Signed-off-by: Michael S. Tsirkin commit 4f118472d4b40142004bc6bc652a651f67bfee94 Author: Sohaib Date: Fri Apr 30 12:36:11 2021 +0200 virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal Prior to 72deb455b5ec ("block: remove CONFIG_LBDAF"), it was optional if the 32-bit kernel support block device and/or file sizes larger than 2 TiB (considering the sector size is 512 bytes) But now sector_t and blkcnt_t are always 64-bit in size. Suggested-by: Ahmad Fatoum Signed-off-by: Sohaib Mohammed Link: https://lore.kernel.org/r/20210430103611.77345-1-sohaib.amhmd@gmail.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin commit 4b820e167bf6f410ace479d8df5b15a574000e75 Author: Linus Torvalds Date: Fri Jul 2 22:05:52 2021 -0700 Revert "ALSA: usb-audio: Reduce latency at playback start" This reverts commit 9ce650a75a3b262c90789b42aedee8fc2ee04d53. This commit causes watchdog lockups on my machine, and while I have no idea what the cause is, it bisected right to this commit, and reverting the change promptly fixes it. At least occasionally one of the watchdog call traces was Call Trace: _raw_spin_lock_irqsave+0x35/0x40 snd_pcm_period_elapsed+0x1b/0xa0 [snd_pcm] snd_usb_endpoint_start+0x1a0/0x3c0 [snd_usb_audio] start_endpoints+0x23/0x90 [snd_usb_audio] snd_usb_substream_playback_trigger+0x7b/0x1a0 [snd_usb_audio] snd_pcm_common_ioctl+0x1c44/0x2360 [snd_pcm] snd_pcm_ioctl+0x2e/0x40 [snd_pcm] __se_sys_ioctl+0x72/0xc0 do_syscall_64+0x4c/0xa0 entry_SYSCALL_64_after_hwframe+0x44/0xae so presumably it's a locking error on that substream spinlock that snd_pcm_period_elapsed() takes. But at this point I just want to have a working system so that I can continue the merge window work tomorrow. Cc: Takashi Iwai Signed-off-by: Linus Torvalds commit b019e1187ce4bb1f120cbea1a412d8aadb499260 Author: Steve French Date: Thu Jul 1 21:01:19 2021 -0500 CIFS: Clarify SMB1 code for UnixSetPathInfo Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for doing SetPathInfo (setattr) when using the Unix extensions. This doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711528 ("Out of bounds read") Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit ded2d99cef169a12a1d3961a540728675f525846 Author: Steve French Date: Thu Jul 1 20:44:27 2021 -0500 CIFS: Clarify SMB1 code for UnixCreateSymLink Coverity also complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes) for creating SMB1 symlinks when using the Unix extensions. This doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711530 ("Out of bounds read") Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 819f916c835d0d022117ad97cb3a658546352ab8 Author: Steve French Date: Thu Jul 1 17:46:23 2021 -0500 cifs: clarify SMB1 code for UnixCreateHardLink Coverity complains about the way we calculate the offset (starting from the address of a 4 byte array within the header structure rather than from the beginning of the struct plus 4 bytes). This doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711529 ("Out of bounds read") Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 01cf30825c8729884090151ab97f1c9c5d14a8bc Author: Steve French Date: Thu Jul 1 12:22:47 2021 -0500 cifs: make locking consistent around the server session status There were three places where we were not taking the spinlock around updates to server->tcpStatus when it was being modified. To be consistent (also removes Coverity warning) and to remove possibility of race best to lock all places where it is updated. Two of the three were in initialization of the field and can't race - but added lock around the other. Addresses-Coverity: 1399512 ("Data race condition") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit b43c8909be52f2baca8884f967b418a88424494a Author: Paolo Abeni Date: Sat Jul 3 00:38:43 2021 +0200 udp: properly flush normal packet at GRO time If an UDP packet enters the GRO engine but is not eligible for aggregation and is not targeting an UDP tunnel, udp_gro_receive() will not set the flush bit, and packet could delayed till the next napi flush. Fix the issue ensuring non GROed packets traverse skb_gro_flush_final(). Reported-and-tested-by: Matthias Treydte Fixes: 18f25dc39990 ("udp: skip L4 aggregation for UDP tunnel packets") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit d6b63b5b7d7f363c6a54421533791e9849adf2e0 Merge: bd31b9efbf549 9a7b7ec3c6f2a Author: Linus Torvalds Date: Fri Jul 2 15:25:23 2021 -0700 Merge tag 'sound-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "As the diffstat scatters over the tree, we've got many tree-wide small changes, but also got quite a few intrusive changes in the core side. The only ABI-visible core change is the new rawmidi framing mode support while others are kernel-internal, mostly code refactoring and/or nice improvements. Here are some highlights: Core: - A new framing access mode for rawmidi to get timestamps - Cleanup / refactoring of buffer memory management helper code - Support for automatic negotiation of ASoC DAI formats - Revival of software suspend for PCM and control core, as a preliminary work for PCI BAR rescan support ASoC: - Accessory detection support for several Qualcomm parts - Support for IEC958 control with hdmi-codec - Merging of Tegra machine drivers into a single driver - Support for AmLogic SM1 TOACODEC, Intel AlderLake-M, several NXP i.MX8 variants, NXP TFA1 and TDF9897, Rockchip RK817, Qualcomm Quinary MI2S, Texas Instruments TAS2505 USB-audio: - Reduction of latency at playback start - Code cleanup / fixes of usx2y driver - Scarlett2 mixer code fixes and enhancements - Quirks for Ozone and Denon devices HD-audio: - A few quirks for HP and ASUS machines - Display power management fixes Others: - FireWire code refactoring and enhancements - Tree-wide trivial coding-style fixes" * tag 'sound-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits) ALSA: usb-audio: scarlett2: Fix for loop increment in scarlett2_usb_get_config ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 630 G8 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G8 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 450 G8 ALSA: hda/realtek - Add ALC285 HP init procedure ALSA: hda/realtek - Add type for ALC287 ALSA: scarlett2: Fix scarlett2_*_ctl_put() return values again ALSA: scarlett2: Fix pad count for 18i8 Gen 3 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC ALSA: firewire-lib: Fix 'amdtp_domain_start()' when no AMDTP_OUT_STREAM stream is found ASoC: qcom: lpass-cpu: mark IRQ_CLEAR register as volatile and readable ALSA: hda: Release codec display power during shutdown/reboot ALSA: hda: Release controller display power during shutdown/reboot ALSA: hda/realtek: Apply LED fixup for HP Dragonfly G1, too ASoC: fsl: remove unnecessary oom message ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible ASoC: tlv320aic32x4: add support for TAS2505 ASoC: tlv320aic32x4: add type to device private data struct ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource() ASoC: tegra: tegra210_admaif: Use devm_platform_get_and_ioremap_resource() ... commit bd31b9efbf549d9630bf2f269a3a56dcb29fcac1 Merge: 9f7b640f001f9 041761f4a4db6 Author: Linus Torvalds Date: Fri Jul 2 15:14:36 2021 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This series consists of the usual driver updates (ufs, ibmvfc, megaraid_sas, lpfc, elx, mpi3mr, qedi, iscsi, storvsc, mpt3sas) with elx and mpi3mr being new drivers. The major core change is a rework to drop the status byte handling macros and the old bit shifted definitions and the rest of the updates are minor fixes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (287 commits) scsi: aha1740: Avoid over-read of sense buffer scsi: arcmsr: Avoid over-read of sense buffer scsi: ips: Avoid over-read of sense buffer scsi: ufs: ufs-mediatek: Add missing of_node_put() in ufs_mtk_probe() scsi: elx: libefc: Fix IRQ restore in efc_domain_dispatch_frame() scsi: elx: libefc: Fix less than zero comparison of a unsigned int scsi: elx: efct: Fix pointer error checking in debugfs init scsi: elx: efct: Fix is_originator return code type scsi: elx: efct: Fix link error for _bad_cmpxchg scsi: elx: efct: Eliminate unnecessary boolean check in efct_hw_command_cancel() scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session() scsi: elx: efct: Fix error handling in efct_hw_init() scsi: elx: efct: Remove redundant initialization of variable lun scsi: elx: efct: Fix spelling mistake "Unexected" -> "Unexpected" scsi: lpfc: Fix build error in lpfc_scsi.c scsi: target: iscsi: Remove redundant continue statement scsi: qla4xxx: Remove redundant continue statement scsi: ppa: Switch to use module_parport_driver() scsi: imm: Switch to use module_parport_driver() scsi: mpt3sas: Fix error return value in _scsih_expander_add() ... commit 9f7b640f001f9781e0803fb60e7b3e7f2f1a1757 Merge: e4aa67b023167 1effb72a8179a Author: Linus Torvalds Date: Fri Jul 2 14:30:27 2021 -0700 Merge tag 'xfs-5.14-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "Most of the work this cycle has been on refactoring various parts of the codebase. The biggest non-cleanup changes are (1) reducing the number of cache flushes sent when writing the log; (2) a substantial number of log recovery fixes; and (3) I started accepting pull requests from contributors if the commits in their branches match what's been sent to the list. For a week or so I /had/ staged a major cleanup of the logging code from Dave Chinner, but it exposed so many lurking bugs in other parts of the logging and log recovery code that I decided to defer that patchset until we can address those latent bugs. Larger cleanups this time include walking the incore inode cache (me) and rework of the extended attribute code (Allison) to prepare it for adding logged xattr updates (and directory tree parent pointers) in future releases. Summary: - Refactor the buffer cache to use bulk page allocation - Convert agnumber-based AG iteration to walk per-AG structures - Clean up some unit conversions and other code warts - Reduce spinlock contention in the directio fastpath - Collapse all the inode cache walks into a single function - Remove indirect function calls from the inode cache walk code - Dramatically reduce the number of cache flushes sent when writing log buffers - Preserve inode sickness reports for longer - Rename xfs_eofblocks since it controls inode cache walks - Refactor the extended attribute code to prepare it for the addition of log intent items to make xattrs fully transactional - A few fixes to earlier large patchsets - Log recovery fixes so that we don't accidentally mark the log clean when log intent recovery fails - Fix some latent SOB errors - Clean up shutdown messages that get logged to dmesg - Fix a regression in the online shrink code - Fix a UAF in the buffer logging code if the fs goes offline - Fix uninitialized error variables - Fix a UAF in the CIL when commited log item callbacks race with a shutdown - Fix a bug where the CIL could hang trying to push part of the log ring buffer that hasn't been filled yet" * tag 'xfs-5.14-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (102 commits) xfs: don't wait on future iclogs when pushing the CIL xfs: Fix a CIL UAF by getting get rid of the iclog callback lock xfs: remove callback dequeue loop from xlog_state_do_iclog_callbacks xfs: don't nest icloglock inside ic_callback_lock xfs: Initialize error in xfs_attr_remove_iter xfs: fix endianness issue in xfs_ag_shrink_space xfs: remove dead stale buf unpin handling code xfs: hold buffer across unpin and potential shutdown processing xfs: force the log offline when log intent item recovery fails xfs: fix log intent recovery ENOSPC shutdowns when inactivating inodes xfs: shorten the shutdown messages to a single line xfs: print name of function causing fs shutdown instead of hex pointer xfs: fix type mismatches in the inode reclaim functions xfs: separate primary inode selection criteria in xfs_iget_cache_hit xfs: refactor the inode recycling code xfs: add iclog state trace events xfs: xfs_log_force_lsn isn't passed a LSN xfs: Fix CIL throttle hang when CIL space used going backwards xfs: journal IO cache flush reductions xfs: remove need_start_rec parameter from xlog_write() ... commit e4aa67b023167c570be95a39149a918cca9e36a0 Merge: ced4cca754a63 5d299f44d7658 Author: Linus Torvalds Date: Fri Jul 2 14:25:17 2021 -0700 Merge tag 'jfs-5.14' of git://github.com/kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "JFS fixes for 5.14" * tag 'jfs-5.14' of git://github.com/kleikamp/linux-shaggy: jfs: Avoid field-overflowing memcpy() jfs: remove unnecessary oom message jfs: fix GPF in diFree fs/jfs: Fix missing error code in lmLogInit() jfs: Remove trailing semicolon in macros fs: Fix typo issue commit ced4cca754a6322463720768ce50c45c2865ba5b Merge: e72b069609aa7 c886fa3cf6ffb Author: Linus Torvalds Date: Fri Jul 2 14:13:21 2021 -0700 Merge tag 'configfs-5.13' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: - fix a memleak in configfs_release_bin_file (Chung-Chiang Cheng) - implement the .read_iter and .write_iter (Bart Van Assche) - minor cleanups (Bart Van Assche, me) * tag 'configfs-5.13' of git://git.infradead.org/users/hch/configfs: configfs: simplify configfs_release_bin_file configfs: fix memleak in configfs_release_bin_file configfs: implement the .read_iter and .write_iter methods configfs: drop pointless kerneldoc comments configfs: fix the kerneldoc comment for configfs_create_bin_file commit b22580233d473dbf7bbfa4f6549c09e2c80e9e64 Author: Ronak Doshi Date: Thu Jul 1 23:44:27 2021 -0700 vmxnet3: fix cksum offload issues for tunnels with non-default udp ports Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") added support for encapsulation offload. However, the inner offload capability is to be restricted to UDP tunnels with default Vxlan and Geneve ports. This patch fixes the issue for tunnels with non-default ports using features check capability and filtering appropriate features for such tunnels. Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: David S. Miller commit 99f47ea437c113df0fb640ea87e0efd3838510aa Merge: a019abd802206 7cc93d888df76 Author: David S. Miller Date: Fri Jul 2 13:36:35 2021 -0700 Merge branch 'nfp-ct-fixes' Simon Horman says: ==================== small tc conntrack fixes Louis Peens says: The first patch makes sure that any callbacks registered to the ct->nf_tables table are cleaned up before freeing. The second patch removes what was effectively a workaround in the nfp driver because of the missing cleanup in patch 1. ==================== Signed-off-by: David S. Miller commit 7cc93d888df764a13f196e3d4aef38869f7dd217 Author: Louis Peens Date: Fri Jul 2 11:21:39 2021 +0200 nfp: flower-ct: remove callback delete deadlock The current location of the callback delete can lead to a race condition where deleting the callback requires a write_lock on the nf_table, but at the same time another thread from netfilter could have taken a read lock on the table before trying to offload. Since the driver is taking a rtnl_lock this can lead into a deadlock situation, where the netfilter offload will wait for the cls_flower rtnl_lock to be released, but this cannot happen since this is waiting for the nf_table read_lock to be released before it can delete the callback. Solve this by completely removing the nf_flow_table_offload_del_cb call, as this will now be cleaned up by act_ct itself when cleaning up the specific nf_table. Fixes: 62268e78145f ("nfp: flower-ct: add nft callback stubs") Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 77ac5e40c44eb78333fbc38482d61fc2af7dda0a Author: Louis Peens Date: Fri Jul 2 11:21:38 2021 +0200 net/sched: act_ct: remove and free nf_table callbacks When cleaning up the nf_table in tcf_ct_flow_table_cleanup_work there is no guarantee that the callback list, added to by nf_flow_table_offload_add_cb, is empty. This means that it is possible that the flow_block_cb memory allocated will be lost. Fix this by iterating the list and freeing the flow_block_cb entries before freeing the nf_table entry (via freeing ct_ft). Fixes: 978703f42549 ("netfilter: flowtable: Add API for registering to flow table events") Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit a019abd8022061b917da767cd1a66ed823724eab Author: Wolfgang Bumiller Date: Fri Jul 2 14:07:36 2021 +0200 net: bridge: sync fdb to new unicast-filtering ports Since commit 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode.") bridges with `vlan_filtering 1` and only 1 auto-port don't set IFF_PROMISC for unicast-filtering-capable ports. Normally on port changes `br_manage_promisc` is called to update the promisc flags and unicast filters if necessary, but it cannot distinguish between *new* ports and ones losing their promisc flag, and new ports end up not receiving the MAC address list. Fix this by calling `br_fdb_sync_static` in `br_add_if` after the port promisc flags are updated and the unicast filter was supposed to have been filled. Fixes: 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode.") Signed-off-by: Wolfgang Bumiller Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 81b4a0cc7565b08cadd0d02bae3434f127d1d72a Author: Eric Dumazet Date: Fri Jul 2 07:41:01 2021 -0700 sock: fix error in sock_setsockopt() Some tests are failing, John bisected the issue to a recent commit. sock_set_timestamp() parameters should be : 1) sk 2) optname 3) valbool Fixes: 371087aa476a ("sock: expose so_timestamp options for mptcp") Signed-off-by: Eric Dumazet Bisected-by: John Sperbeck Cc: Paolo Abeni Cc: Florian Westphal Cc: Mat Martineau Reviewed-by: Florian Westphal Signed-off-by: David S. Miller commit 561022acb1ce62e50f7a8258687a21b84282a4cb Author: Eric Dumazet Date: Fri Jul 2 13:09:03 2021 -0700 tcp: annotate data races around tp->mtu_info While tp->mtu_info is read while socket is owned, the write sides happen from err handlers (tcp_v[46]_mtu_reduced) which only own the socket spinlock. Fixes: 563d34d05786 ("tcp: dont drop MTU reduction indications") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e72b069609aa76cc1de35f5d434dbfaa5392ae9a Merge: cd3eb7efaa995 2b4bbc6231d78 Author: Linus Torvalds Date: Fri Jul 2 13:31:08 2021 -0700 Merge tag 'dma-mapping-5.14' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - a trivivial whitespace fix (Zhen Lei) - report -EEXIST errors in add_dma_entry (Hamza Mahfooz) * tag 'dma-mapping-5.14' of git://git.infradead.org/users/hch/dma-mapping: dma-debug: report -EEXIST errors in add_dma_entry dma-mapping: remove a trailing space commit cd3eb7efaa995db00db0ba64893814f9831be842 Merge: 35e43538af8fd 2b9d8e3e9a9bb Author: Linus Torvalds Date: Fri Jul 2 13:22:47 2021 -0700 Merge tag 'iommu-updates-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - SMMU Updates from Will Deacon: - SMMUv3: - Support stalling faults for platform devices - Decrease defaults sizes for the event and PRI queues - SMMUv2: - Support for a new '->probe_finalize' hook, needed by Nvidia - Even more Qualcomm compatible strings - Avoid Adreno TTBR1 quirk for DB820C platform - Intel VT-d updates from Lu Baolu: - Convert Intel IOMMU to use sva_lib helpers in iommu core - ftrace and debugfs supports for page fault handling - Support asynchronous nested capabilities - Various misc cleanups - Support for new VIOT ACPI table to make the VirtIO IOMMU available on x86 - Add the amd_iommu=force_enable command line option to enable the IOMMU on platforms where they are known to cause problems - Support for version 2 of the Rockchip IOMMU - Various smaller fixes, cleanups and refactorings * tag 'iommu-updates-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (66 commits) iommu/virtio: Enable x86 support iommu/dma: Pass address limit rather than size to iommu_setup_dma_ops() ACPI: Add driver for the VIOT table ACPI: Move IOMMU setup code out of IORT ACPI: arm64: Move DMA setup operations out of IORT iommu/vt-d: Fix dereference of pointer info before it is null checked iommu: Update "iommu.strict" documentation iommu/arm-smmu: Check smmu->impl pointer before dereferencing iommu/arm-smmu-v3: Remove unnecessary oom message iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails iommu/vt-d: Fix linker error on 32-bit iommu/vt-d: No need to typecast iommu/vt-d: Define counter explicitly as unsigned int iommu/vt-d: Remove unnecessary braces iommu/vt-d: Removed unused iommu_count in dmar domain iommu/vt-d: Use bitfields for DMAR capabilities iommu/vt-d: Use DEVICE_ATTR_RO macro iommu/vt-d: Fix out-bounds-warning in intel/svm.c iommu/vt-d: Add PRQ handling latency sampling ... commit 35e43538af8fd2cb39d58caca1134a87db173f75 Merge: a48ad6e7a35dc 4896df9d53ae5 Author: Linus Torvalds Date: Fri Jul 2 13:09:15 2021 -0700 Merge tag 'linux-kselftest-next-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest update from Shuah Khan: "Fixes to existing tests and framework: - migrate sgx test to kselftest harness - add new test cases to sgx test - ftrace test fix event-no-pid on 1-core machine - splice test adjust for handler fallback removal" * tag 'linux-kselftest-next-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/sgx: remove checks for file execute permissions selftests/ftrace: fix event-no-pid on 1-core machine selftests/sgx: Refine the test enclave to have storage selftests/sgx: Add EXPECT_EEXIT() macro selftests/sgx: Dump enclave memory map selftests/sgx: Migrate to kselftest harness selftests/sgx: Rename 'eenter' and 'sgx_call_vdso' selftests: timers: rtcpie: skip test if default RTC device does not exist selftests: lib.mk: Also install "config" and "settings" selftests: splice: Adjust for handler fallback removal selftests/tls: Add {} to avoid static checker warning selftests/resctrl: Fix incorrect parsing of option "-t" commit a48ad6e7a35dc3f3b521249204daf4c9427628e5 Merge: 019b3fd94ba73 1d71307a6f94d Author: Linus Torvalds Date: Fri Jul 2 12:58:26 2021 -0700 Merge tag 'linux-kselftest-kunit-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit update from Shuah Khan: "Fixes and features: - add support for skipped tests - introduce kunit_kmalloc_array/kunit_kcalloc() helpers - add gnu_printf specifiers - add kunit_shutdown - add unit test for filtering suites by names - convert lib/test_list_sort.c to use KUnit - code organization moving default config to tools/testing/kunit - refactor of internal parser input handling - cleanups and updates to documentation - code cleanup related to casts" * tag 'linux-kselftest-kunit-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (29 commits) kunit: add unit test for filtering suites by names kasan: test: make use of kunit_skip() kunit: test: Add example tests which are always skipped kunit: tool: Support skipped tests in kunit_tool kunit: Support skipped tests thunderbolt: test: Reinstate a few casts of bitfields kunit: tool: internal refactor of parser input handling lib/test: convert lib/test_list_sort.c to use KUnit kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers kunit: Remove the unused all_tests.config kunit: Move default config from arch/um -> tools/testing/kunit kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default kunit: Add gnu_printf specifiers lib/cmdline_kunit: Remove a cast which are no-longer required kernel/sysctl-test: Remove some casts which are no-longer required thunderbolt: test: Remove some casts which are no longer required mmc: sdhci-of-aspeed: Remove some unnecessary casts from KUnit tests iio: Remove a cast in iio-test-format which is no longer required device property: Remove some casts in property-entry-test Documentation: kunit: Clean up some string casts in examples ... commit 019b3fd94ba73d3ac615f0537440b81f129821f6 Merge: 4cad67197989c 4ebbbaa4ce852 Author: Linus Torvalds Date: Fri Jul 2 12:54:34 2021 -0700 Merge tag 'powerpc-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - A big series refactoring parts of our KVM code, and converting some to C. - Support for ARCH_HAS_SET_MEMORY, and ARCH_HAS_STRICT_MODULE_RWX on some CPUs. - Support for the Microwatt soft-core. - Optimisations to our interrupt return path on 64-bit. - Support for userspace access to the NX GZIP accelerator on PowerVM on Power10. - Enable KUAP and KUEP by default on 32-bit Book3S CPUs. - Other smaller features, fixes & cleanups. Thanks to: Andy Shevchenko, Aneesh Kumar K.V, Arnd Bergmann, Athira Rajeev, Baokun Li, Benjamin Herrenschmidt, Bharata B Rao, Christophe Leroy, Daniel Axtens, Daniel Henrique Barboza, Finn Thain, Geoff Levand, Haren Myneni, Jason Wang, Jiapeng Chong, Joel Stanley, Jordan Niethe, Kajol Jain, Nathan Chancellor, Nathan Lynch, Naveen N. Rao, Nicholas Piggin, Nick Desaulniers, Paul Mackerras, Russell Currey, Sathvika Vasireddy, Shaokun Zhang, Stephen Rothwell, Sudeep Holla, Suraj Jitindar Singh, Tom Rix, Vaibhav Jain, YueHaibing, Zhang Jianhua, and Zhen Lei. * tag 'powerpc-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (218 commits) powerpc: Only build restart_table.c for 64s powerpc/64s: move ret_from_fork etc above __end_soft_masked powerpc/64s/interrupt: clean up interrupt return labels powerpc/64/interrupt: add missing kprobe annotations on interrupt exit symbols powerpc/64: enable MSR[EE] in irq replay pt_regs powerpc/64s/interrupt: preserve regs->softe for NMI interrupts powerpc/64s: add a table of implicit soft-masked addresses powerpc/64e: remove implicit soft-masking and interrupt exit restart logic powerpc/64e: fix CONFIG_RELOCATABLE build warnings powerpc/64s: fix hash page fault interrupt handler powerpc/4xx: Fix setup_kuep() on SMP powerpc/32s: Fix setup_{kuap/kuep}() on SMP powerpc/interrupt: Use names in check_return_regs_valid() powerpc/interrupt: Also use exit_must_hard_disable() on PPC32 powerpc/sysfs: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE powerpc/ptrace: Refactor regs_set_return_{msr/ip} powerpc/ptrace: Move set_return_regs_changed() before regs_set_return_{msr/ip} powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi() powerpc/pseries/vas: Include irqdomain.h powerpc: mark local variables around longjmp as volatile ... commit 4cad67197989c81417810b89f09a3549b75a2441 Merge: 406254918b232 803f4e1eab7a8 Author: Linus Torvalds Date: Fri Jul 2 12:43:40 2021 -0700 Merge tag 'asm-generic-unaligned-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm/unaligned.h unification from Arnd Bergmann: "Unify asm/unaligned.h around struct helper The get_unaligned()/put_unaligned() helpers are traditionally architecture specific, with the two main variants being the "access-ok.h" version that assumes unaligned pointer accesses always work on a particular architecture, and the "le-struct.h" version that casts the data to a byte aligned type before dereferencing, for architectures that cannot always do unaligned accesses in hardware. Based on the discussion linked below, it appears that the access-ok version is not realiable on any architecture, but the struct version probably has no downsides. This series changes the code to use the same implementation on all architectures, addressing the few exceptions separately" Link: https://lore.kernel.org/lkml/75d07691-1e4f-741f-9852-38c0b4f520bc@synopsys.com/ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363 Link: https://lore.kernel.org/lkml/20210507220813.365382-14-arnd@kernel.org/ Link: git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git unaligned-rework-v2 Link: https://lore.kernel.org/lkml/CAHk-=whGObOKruA_bU3aPGZfoDqZM1_9wBkwREp0H0FgR-90uQ@mail.gmail.com/ * tag 'asm-generic-unaligned-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: simplify asm/unaligned.h asm-generic: uaccess: 1-byte access is always aligned netpoll: avoid put_unaligned() on single character mwifiex: re-fix for unaligned accesses apparmor: use get_unaligned() only for multi-byte words partitions: msdos: fix one-byte get_unaligned() asm-generic: unaligned always use struct helpers asm-generic: unaligned: remove byteshift helpers powerpc: use linux/unaligned/le_struct.h on LE power7 m68k: select CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS sh: remove unaligned access for sh4a openrisc: always use unaligned-struct header asm-generic: use asm-generic/unaligned.h for most architectures commit 406254918b232db198ed60f5bf1f8b84d96bca00 Merge: 71bd9341011f6 cf96b8e45a9bf Author: Linus Torvalds Date: Fri Jul 2 12:24:31 2021 -0700 Merge tag 'perf-tools-for-v5.14-2021-07-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tool updates from Arnaldo Carvalho de Melo: "Tools: - Add cgroup support for 'perf top' (-G). - Add support for KVM MSRs in 'perf kvm stat' - Support probes on init functions in 'perf probe', to support the bootconfig format. - Improve error reporting in 'perf probe'. - No need to synthesize BUILD_ID records in 'perf inject' if the MMAP2 records have build ids already. - Allow toggling source code ('s' hotkey) in 'perf annotate' in all lines. - Add itrace options support to 'perf annotate'. - Support to custom DSO filters for 'perf script'. Hardware enablement: - Support the HYBRID_TOPOLOGY and HYBRID_CPU_PMU_CAPS features in the perf.data file header. - Support PMU prefix for mem-load and mem-store events, to support hybrid (BIG little) CPUs such as Intel's Alderlake. - Support hybrid CPUs in 'perf mem' and 'perf c2c'. Hardware tracing: - Intel PT now supports tracing KVM guests. - Timestamp improvements for ARM's Coresight. Build: - Add 'make -C tools/perf build-test' entries for libopencsd/CORESIGHT=1 and libbpf/LIBBPF_DYNAMIC=1. - Use bison's --file-prefix-map option to avoid storing full paths when using O= in the perf build. Tests: - Improve the 'perf test' entries for libpfm4 and BPF counters. Misc: - Sync msr-index.h, mount.h, kvm headers with the kernel originals. - Add vendor events and metrics for Intel's Icelake Server & Client" * tag 'perf-tools-for-v5.14-2021-07-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (123 commits) perf session: Add missing evlist__delete when deleting a session perf annotate: Allow 's' on source code lines perf dlfilter: Add object_code() to perf_dlfilter_fns perf dlfilter: Add attr() to perf_dlfilter_fns perf dlfilter: Add srcline() to perf_dlfilter_fns perf dlfilter: Add insn() to perf_dlfilter_fns perf dlfilter: Add resolve_address() to perf_dlfilter_fns perf build: Install perf_dlfilter.h perf script: Add option to pass arguments to dlfilters perf script: Add option to list dlfilters perf script: Add dlfilter__filter_event_early() perf script: Add API for filtering via dynamically loaded shared object perf llvm: Return -ENOMEM when asprintf() fails perf cs-etm: Delay decode of non-timeless data until cs_etm__flush_events() tools headers UAPI: Synch KVM's svm.h header with the kernel tools kvm headers arm64: Update KVM headers from the kernel sources tools headers UAPI: Sync linux/kvm.h with the kernel sources tools headers cpufeatures: Sync with the kernel sources tools include UAPI: Update linux/mount.h copy tools arch x86: Sync the msr-index.h copy with the kernel sources ... commit 71bd9341011f626d692aabe024f099820f02c497 Merge: 3dbdb38e28690 b869d5be0acf0 Author: Linus Torvalds Date: Fri Jul 2 12:08:10 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "190 patches. Subsystems affected by this patch series: mm (hugetlb, userfaultfd, vmscan, kconfig, proc, z3fold, zbud, ras, mempolicy, memblock, migration, thp, nommu, kconfig, madvise, memory-hotplug, zswap, zsmalloc, zram, cleanups, kfence, and hmm), procfs, sysctl, misc, core-kernel, lib, lz4, checkpatch, init, kprobes, nilfs2, hfs, signals, exec, kcov, selftests, compress/decompress, and ipc" * emailed patches from Andrew Morton : (190 commits) ipc/util.c: use binary search for max_idx ipc/sem.c: use READ_ONCE()/WRITE_ONCE() for use_global_lock ipc: use kmalloc for msg_queue and shmid_kernel ipc sem: use kvmalloc for sem_undo allocation lib/decompressors: remove set but not used variabled 'level' selftests/vm/pkeys: exercise x86 XSAVE init state selftests/vm/pkeys: refill shadow register after implicit kernel write selftests/vm/pkeys: handle negative sys_pkey_alloc() return code selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random kcov: add __no_sanitize_coverage to fix noinstr for all architectures exec: remove checks in __register_bimfmt() x86: signal: don't do sas_ss_reset() until we are certain that sigframe won't be abandoned hfsplus: report create_date to kstat.btime hfsplus: remove unnecessary oom message nilfs2: remove redundant continue statement in a while-loop kprobes: remove duplicated strong free_insn_page in x86 and s390 init: print out unknown kernel parameters checkpatch: do not complain about positive return values starting with EPOLL checkpatch: improve the indented label test checkpatch: scripts/spdxcheck.py now requires python3 ... commit 8955b90c3cdad199137809aac8ccbbb585355913 Author: wenxu Date: Fri Jul 2 11:34:31 2021 +0800 net/sched: act_ct: fix err check for nf_conntrack_confirm The confirm operation should be checked. If there are any failed, the packet should be dropped like in ovs and netfilter. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: wenxu Signed-off-by: David S. Miller commit 1bfa4d0cb5adf954e0f4870a3ecb7cb19506320c Author: Bailey Forrest Date: Thu Jul 1 20:13:36 2021 -0700 gve: DQO: Remove incorrect prefetch The prefetch is incorrectly using the dma address instead of the virtual address. It's supposed to be: prefetch((char *)buf_state->page_info.page_address + buf_state->page_info.page_offset) However, after correcting this mistake, there is no evidence of performance improvement. Fixes: 9b8dd5e5ea48 ("gve: DQO: Add RX path") Signed-off-by: Bailey Forrest Signed-off-by: David S. Miller commit 40fc3054b45820c28ea3c65e2c86d041dc244a8a Author: Vadim Fedorenko Date: Fri Jul 2 02:47:00 2021 +0300 net: ipv6: fix return value of ip6_skb_dst_mtu Commit 628a5c561890 ("[INET]: Add IP(V6)_PMTUDISC_RPOBE") introduced ip6_skb_dst_mtu with return value of signed int which is inconsistent with actually returned values. Also 2 users of this function actually assign its value to unsigned int variable and only __xfrm6_output assigns result of this function to signed variable but actually uses as unsigned in further comparisons and calls. Change this function to return unsigned int value. Fixes: 628a5c561890 ("[INET]: Add IP(V6)_PMTUDISC_RPOBE") Reviewed-by: David Ahern Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller commit bde3c8ffdd4153a3e9f0b0d51d972b30113b35ac Author: Christophe JAILLET Date: Thu Jul 1 22:41:19 2021 +0200 gve: Simplify code and axe the use of a deprecated API The wrappers in include/linux/pci-dma-compat.h should go away. Replace 'pci_set_dma_mask/pci_set_consistent_dma_mask' by an equivalent and less verbose 'dma_set_mask_and_coherent()' call. Signed-off-by: Christophe JAILLET Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 633fa666401c42f9a106a509b7702c58c84524e2 Author: Jesper Dangaard Brouer Date: Thu Jul 1 15:16:53 2021 +0200 net/sched: sch_taprio: fix typo in comment I have checked that the IEEE standard 802.1Q-2018 section 8.6.9.4.5 is called AdminGateStates. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 19d67694745c5c9ed085d0d8332fa02d835a07d0 Author: Rodrigo Campos Date: Fri Jul 2 17:19:27 2021 +0200 Documentation: seccomp: Fix typo in user notification The close on exec flag is O_CLOEXEC, not O_EXEC. This patch just fixes the typo. Suggested-by: Christian Brauner Signed-off-by: Rodrigo Campos Acked-by: Christian Brauner Signed-off-by: Kees Cook Fixes: 0ae71c7720e3 ("seccomp: Support atomic "addfd + send reply"") Link: https://lore.kernel.org/r/20210702151927.263402-1-rodrigo@kinvolk.io commit 585af8ede7035379b712cacca80e9c2c34853d4b Author: Tetsuo Handa Date: Sat Jul 3 00:27:14 2021 +0900 loop: remove unused variable in loop_set_status() Commit 0384264ea8a39bd9 ("block: pass a gendisk to bdev_disk_changed") changed to pass lo->lo_disk instead of lo->lo_device. Fixes: 0384264ea8a3 ("block: pass a gendisk to bdev_disk_changed") Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20210702152714.7978-1-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Jens Axboe commit 392ed6a789803fbfd49994e95fe99cd07b07eb87 Author: Aubrey Li Date: Fri Jul 2 15:03:50 2021 +0800 ACPI: Do not singal PRM support if not enabled If the OS confirms PRM (Platform Runtime Mechanism) support through the \_SB._OSC PRM bit, the BIOS may start relying on the presence of PRM support in the OS, so prevent the PRM bit from being set in the \_SB._OSC capabilities bitmask when PRM support is not built in so as to avoid confusing the BIOS in that case. Fixes: 60faa8f1ac6e ("ACPI: Add \_SB._OSC bit for PRM") Signed-off-by: Aubrey Li [ rjw: Rewrite subject and changelog, replace #ifdef with if (IS_ENABLED()) ] Signed-off-by: Rafael J. Wysocki commit d4ba0b06306a70c99a43f9d452886a86e2d3bd26 Author: Kan Liang Date: Thu Jun 24 11:17:57 2021 -0700 perf/x86/intel/uncore: Clean up error handling path of iio mapping The error handling path of iio mapping looks fragile. We already fixed one issue caused by it, commit f797f05d917f ("perf/x86/intel/uncore: Fix for iio mapping on Skylake Server"). Clean up the error handling path and make the code robust. Reported-by: gushengxian Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/40e66cf9-398b-20d7-ce4d-433be6e08921@linux.intel.com commit 87bf399f86ecf36cc84fbeb7027a2995af649d6e Author: Zhang Rui Date: Fri Jun 25 21:32:47 2021 +0800 perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support Introduce icx_cstates for ICELAKE_X and ICELAKE_D, and also update the comments. On ICELAKE_X and ICELAKE_D, Core C1, Core C6, Package C2 and Package C6 Residency MSRs are supported. This patch has been tested on real hardware. Signed-off-by: Zhang Rui Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Acked-by: Artem Bityutskiy Link: https://lkml.kernel.org/r/20210625133247.2813-1-rui.zhang@intel.com commit 3e1493f46390618ea78607cb30c58fc19e2a5035 Author: Xuewen Yan Date: Wed Jun 30 22:12:04 2021 +0800 sched/uclamp: Ignore max aggregation if rq is idle When a task wakes up on an idle rq, uclamp_rq_util_with() would max aggregate with rq value. But since there is no task enqueued yet, the values are stale based on the last task that was running. When the new task actually wakes up and enqueued, then the rq uclamp values should reflect that of the newly woken up task effective uclamp values. This is a problem particularly for uclamp_max because it default to 1024. If a task p with uclamp_max = 512 wakes up, then max aggregation would ignore the capping that should apply when this task is enqueued, which is wrong. Fix that by ignoring max aggregation if the rq is idle since in that case the effective uclamp value of the rq will be the ones of the task that will wake up. Fixes: 9d20ad7dfc9a ("sched/uclamp: Add uclamp_util_with()") Signed-off-by: Xuewen Yan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider [qias: Changelog] Reviewed-by: Qais Yousef Link: https://lore.kernel.org/r/20210630141204.8197-1-xuewen.yan94@gmail.com commit 72d0ad7cb5bad265adb2014dbe46c4ccb11afaba Author: Odin Ugedal Date: Tue Jun 29 14:14:52 2021 +0200 sched/fair: Fix CFS bandwidth hrtimer expiry type The time remaining until expiry of the refresh_timer can be negative. Casting the type to an unsigned 64-bit value will cause integer underflow, making the runtime_refresh_within return false instead of true. These situations are rare, but they do happen. This does not cause user-facing issues or errors; other than possibly unthrottling cfs_rq's using runtime from the previous period(s), making the CFS bandwidth enforcement less strict in those (special) situations. Signed-off-by: Odin Ugedal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ben Segall Link: https://lore.kernel.org/r/20210629121452.18429-1-odin@uged.al commit ceb6ba45dc8074d2a1ec1117463dc94a20d4203d Author: Vincent Guittot Date: Thu Jul 1 19:18:37 2021 +0200 sched/fair: Sync load_sum with load_avg after dequeue commit 9e077b52d86a ("sched/pelt: Check that *_avg are null when *_sum are") reported some inconsitencies between *_avg and *_sum. commit 1c35b07e6d39 ("sched/fair: Ensure _sum and _avg values stay consistent") fixed some but one remains when dequeuing load. sync the cfs's load_sum with its load_avg after dequeuing the load of a sched_entity. Fixes: 9e077b52d86a ("sched/pelt: Check that *_avg are null when *_sum are") Reported-by: Sachin Sant Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Odin Ugedal Tested-by: Sachin Sant Link: https://lore.kernel.org/r/20210701171837.32156-1-vincent.guittot@linaro.org commit bd7a94c0fa41dfbea8564556c7a28b05e353c5da Author: Aubrey Li Date: Fri Jul 2 15:03:49 2021 +0800 ACPI: Correct \_SB._OSC bit definition for PRM According to Platform Runtime Mechanism Specification v1.0 [1], Page 42, \_SB._OSC bit 21 is used to indicate OS support for PRM. Update the definition of the PRM support bit in the code to match the specification. Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1] Fixes: 60faa8f1ac6e ("ACPI: Add \_SB._OSC bit for PRM") Signed-off-by: Aubrey Li [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit d0244847f9fc5e20df8b7483c8a4717fe0432d38 Author: Al Cooper Date: Thu Jun 24 12:30:45 2021 -0400 mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode When an eMMC device is being run in HS400 mode, any access to the RPMB device will cause the error message "mmc1: Invalid UHS-I mode selected". This happens as a result of tuning being disabled before RPMB access and then re-enabled after the RPMB access is complete. When tuning is re-enabled, the system has to switch from HS400 to HS200 to do the tuning and then back to HS400. As part of sequence to switch from HS400 to HS200 the system is temporarily put into HS mode. When switching to HS mode, sdhci_get_preset_value() is called and does not have support for HS mode and prints the warning message and returns the preset for SDR12. The fix is to add support for MMC and SD HS modes to sdhci_get_preset_value(). This can be reproduced on any system running eMMC in HS400 mode (not HS400ES) by using the "mmc" utility to run the following command: "mmc rpmb read-counter /dev/mmcblk0rpmb". Signed-off-by: Al Cooper Acked-by: Adrian Hunter Fixes: 52983382c74f ("mmc: sdhci: enhance preset value function") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210624163045.33651-1-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 2580d3f40022642452dd8422bfb8c22e54cf84bb Author: Frederic Weisbecker Date: Mon Jun 28 15:34:28 2021 +0200 xfrm: Fix RCU vs hash_resize_mutex lock inversion xfrm_bydst_resize() calls synchronize_rcu() while holding hash_resize_mutex. But then on PREEMPT_RT configurations, xfrm_policy_lookup_bytype() may acquire that mutex while running in an RCU read side critical section. This results in a deadlock. In fact the scope of hash_resize_mutex is way beyond the purpose of xfrm_policy_lookup_bytype() to just fetch a coherent and stable policy for a given destination/direction, along with other details. The lower level net->xfrm.xfrm_policy_lock, which among other things protects per destination/direction references to policy entries, is enough to serialize and benefit from priority inheritance against the write side. As a bonus, it makes it officially a per network namespace synchronization business where a policy table resize on namespace A shouldn't block a policy lookup on namespace B. Fixes: 77cc278f7b20 (xfrm: policy: Use sequence counters with associated lock) Cc: stable@vger.kernel.org Cc: Ahmed S. Darwish Cc: Peter Zijlstra (Intel) Cc: Varad Gautam Cc: Steffen Klassert Cc: Herbert Xu Cc: David S. Miller Signed-off-by: Frederic Weisbecker Signed-off-by: Steffen Klassert commit eaf228263921cd15962654b539d916380a0f076e Author: Steffen Klassert Date: Fri Jul 2 09:20:22 2021 +0200 Revert "xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype" This reverts commit d7b0408934c749f546b01f2b33d07421a49b6f3e. This commit tried to fix a locking bug introduced by commit 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock"). As it turned out, this patch did not really fix the bug. A proper fix for this bug is applied on top of this revert. Signed-off-by: Steffen Klassert commit 9d6336831bdc78e5207eaf147cc17228b5e984c3 Author: Wolfram Sang Date: Fri Jun 25 17:17:58 2021 +0200 i2c: ali1535: mention that the device should not be disabled The comment from the i801 driver is valid here, too, so copy it. Reported-by: Jean Delvare Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 763778cd79267dadf0ec7e044caf7563df0ab597 Author: Chris Packham Date: Fri Jul 2 15:27:24 2021 +1200 i2c: mpc: Restore reread of I2C status register Prior to commit 1538d82f4647 ("i2c: mpc: Interrupt driven transfer") the old interrupt handler would reread MPC_I2C_SR after checking the CSR_MIF bit. When the driver was re-written this was removed as it seemed unnecessary. However as it turns out this is necessary for i2c devices which do clock stretching otherwise we end up thinking the bus is still busy when processing the interrupt. Fixes: 1538d82f4647 ("i2c: mpc: Interrupt driven transfer") Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 151b1982be5d9f4ca641687ee1a4bb4fba5d26cf Author: Fengnan Chang Date: Tue Jun 8 19:15:08 2021 +0800 f2fs: compress: add nocompress extensions support When we create a directory with enable compression, all file write into directory will try to compress.But sometimes we may know, new file cannot meet compression ratio requirements. We need a nocompress extension to skip those files to avoid unnecessary compress page test. After add nocompress_extension, the priority should be: dir_flag < comp_extention,nocompress_extension < comp_file_flag, no_comp_file_flag. Priority in between FS_COMPR_FL, FS_NOCOMP_FS, extensions: * compress_extension=so; nocompress_extension=zip; chattr +c dir; touch dir/foo.so; touch dir/bar.zip; touch dir/baz.txt; then foo.so and baz.txt should be compresse, bar.zip should be non-compressed. chattr +c dir/bar.zip can enable compress on bar.zip. * compress_extension=so; nocompress_extension=zip; chattr -c dir; touch dir/foo.so; touch dir/bar.zip; touch dir/baz.txt; then foo.so should be compresse, bar.zip and baz.txt should be non-compressed. chattr+c dir/bar.zip; chattr+c dir/baz.txt; can enable compress on bar.zip and baz.txt. Signed-off-by: Fengnan Chang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 783d08bd02f5d33d6e9e7fea62b727e2b6fe6462 Author: Stephen Boyd Date: Thu Jul 1 18:10:58 2021 -0700 Revert "clk: divider: Switch from .round_rate to .determine_rate by default" This reverts commit db400ac1444b756030249ed4a35e53a68e557b59. We have drivers that are still using the .round_rate ops from here. We could implement both determine_rate and round_rate for these divider ops, but for now let's just kick out the commit that tried to change it and convert various drivers properly. Reported-by: Guenter Roeck Fixes: db400ac1444b ("clk: divider: Switch from .round_rate to .determine_rate by default") Cc: Jerome Brunet Cc: Martin Blumenstingl Link: https://lore.kernel.org/r/20210702011058.77284-1-sboyd@kernel.org Signed-off-by: Stephen Boyd commit c23a9fd209bc6f8c1fa6ee303fdf037d784a1627 Author: Vasily Averin Date: Thu Jul 1 08:02:49 2021 +0300 netfilter: ctnetlink: suspicious RCU usage in ctnetlink_dump_helpinfo Two patches listed below removed ctnetlink_dump_helpinfo call from under rcu_read_lock. Now its rcu_dereference generates following warning: ============================= WARNING: suspicious RCU usage 5.13.0+ #5 Not tainted ----------------------------- net/netfilter/nf_conntrack_netlink.c:221 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 stack backtrace: CPU: 1 PID: 2251 Comm: conntrack Not tainted 5.13.0+ #5 Call Trace: dump_stack+0x7f/0xa1 ctnetlink_dump_helpinfo+0x134/0x150 [nf_conntrack_netlink] ctnetlink_fill_info+0x2c2/0x390 [nf_conntrack_netlink] ctnetlink_dump_table+0x13f/0x370 [nf_conntrack_netlink] netlink_dump+0x10c/0x370 __netlink_dump_start+0x1a7/0x260 ctnetlink_get_conntrack+0x1e5/0x250 [nf_conntrack_netlink] nfnetlink_rcv_msg+0x613/0x993 [nfnetlink] netlink_rcv_skb+0x50/0x100 nfnetlink_rcv+0x55/0x120 [nfnetlink] netlink_unicast+0x181/0x260 netlink_sendmsg+0x23f/0x460 sock_sendmsg+0x5b/0x60 __sys_sendto+0xf1/0x160 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x36/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 49ca022bccc5 ("netfilter: ctnetlink: don't dump ct extensions of unconfirmed conntracks") Fixes: 0b35f6031a00 ("netfilter: Remove duplicated rcu_read_lock.") Signed-off-by: Vasily Averin Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 3dbdb38e286903ec220aaf1fb29a8d94297da246 Merge: e267992f9ef0b 3958e2d0c34e1 Author: Linus Torvalds Date: Thu Jul 1 17:22:14 2021 -0700 Merge branch 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - cgroup.kill is added which implements atomic killing of the whole subtree. Down the line, this should be able to replace the multiple userland implementations of "keep killing till empty". - PSI can now be turned off at boot time to avoid overhead for configurations which don't care about PSI. * 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: make per-cgroup pressure stall tracking configurable cgroup: Fix kernel-doc cgroup: inline cgroup_task_freeze() tests/cgroup: test cgroup.kill tests/cgroup: move cg_wait_for(), cg_prepare_for_wait() tests/cgroup: use cgroup.kill in cg_killall() docs/cgroup: add entry for cgroup.kill cgroup: introduce cgroup.kill commit e267992f9ef0bf717d70a9ee18049782f77e4b3a Merge: 19b438592238b e4d777003a43f Author: Linus Torvalds Date: Thu Jul 1 17:17:24 2021 -0700 Merge branch 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu updates from Dennis Zhou: - percpu chunk depopulation - depopulate backing pages for chunks with empty pages when we exceed a global threshold without those pages. This lets us reclaim a portion of memory that would previously be lost until the full chunk would be freed (possibly never). - memcg accounting cleanup - previously separate chunks were managed for normal allocations and __GFP_ACCOUNT allocations. These are now consolidated which cleans up the code quite a bit. - a few misc clean ups for clang warnings * 'for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: optimize locking in pcpu_balance_workfn() percpu: initialize best_upa variable percpu: rework memcg accounting mm, memcg: introduce mem_cgroup_kmem_disabled() mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as __ro_after_init percpu: make symbol 'pcpu_free_slot' static percpu: implement partial chunk depopulation percpu: use pcpu_free_slot instead of pcpu_nr_slots - 1 percpu: factor out pcpu_check_block_hint() percpu: split __pcpu_balance_workfn() percpu: fix a comment about the chunks ordering commit a23f89a9990684a0ca0cac4a2857c15d338ebe2d Author: Vasily Averin Date: Thu Jul 1 08:02:24 2021 +0300 netfilter: conntrack: nf_ct_gre_keymap_flush() removal nf_ct_gre_keymap_flush() is useless. It is called from nf_conntrack_cleanup_net_list() only and tries to remove nf_ct_gre_keymap entries from pernet gre keymap list. Though: a) at this point the list should already be empty, all its entries were deleted during the conntracks cleanup, because nf_conntrack_cleanup_net_list() executes nf_ct_iterate_cleanup(kill_all) before nf_conntrack_proto_pernet_fini(): nf_conntrack_cleanup_net_list +- nf_ct_iterate_cleanup | nf_ct_put | nf_conntrack_put | nf_conntrack_destroy | destroy_conntrack | destroy_gre_conntrack | nf_ct_gre_keymap_destroy `- nf_conntrack_proto_pernet_fini nf_ct_gre_keymap_flush b) Let's say we find that the keymap list is not empty. This means netns still has a conntrack associated with gre, in which case we should not free its memory, because this will lead to a double free and related crashes. However I doubt it could have gone unnoticed for years, obviously this does not happen in real life. So I think we can remove both nf_ct_gre_keymap_flush() and nf_conntrack_proto_pernet_fini(). Signed-off-by: Vasily Averin Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4ca041f919f13783b0b03894783deee00dbca19a Author: Colin Ian King Date: Thu Jun 24 20:57:18 2021 +0100 netfilter: nf_tables: Fix dereference of null pointer flow In the case where chain->flags & NFT_CHAIN_HW_OFFLOAD is false then nft_flow_rule_create is not called and flow is NULL. The subsequent error handling execution via label err_destroy_flow_rule will lead to a null pointer dereference on flow when calling nft_flow_rule_destroy. Since the error path to err_destroy_flow_rule has to cater for null and non-null flows, only call nft_flow_rule_destroy if flow is non-null to fix this issue. Addresses-Coverity: ("Explicity null dereference") Fixes: 3c5e44622011 ("netfilter: nf_tables: memleak in hw offload abort path") Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso commit e15d4cdf27cb0c1e977270270b2cea12e0955edd Author: Florian Westphal Date: Thu Jun 24 12:36:42 2021 +0200 netfilter: conntrack: do not renew entry stuck in tcp SYN_SENT state Consider: client -----> conntrack ---> Host client sends a SYN, but $Host is unreachable/silent. Client eventually gives up and the conntrack entry will time out. However, if the client is restarted with same addr/port pair, it may prevent the conntrack entry from timing out. This is noticeable when the existing conntrack entry has no NAT transformation or an outdated one and port reuse happens either on client or due to a NAT middlebox. This change prevents refresh of the timeout for SYN retransmits, so entry is going away after nf_conntrack_tcp_timeout_syn_sent seconds (default: 60). Entry will be re-created on next connection attempt, but then nat rules will be evaluated again. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 37d220b58d52d6da88b928e11bffd83f88c6ac79 Author: Florian Westphal Date: Thu Jun 24 12:36:41 2021 +0200 selftest: netfilter: add test case for unreplied tcp connections TCP connections in UNREPLIED state (only SYN seen) can be kept alive indefinitely, as each SYN re-sets the timeout. This means that even if a peer has closed its socket the entry never times out. This also prevents re-evaluation of configured NAT rules. Add a test case that sets SYN timeout to 10 seconds, then check that the nat redirection added later eventually takes effect. This is based off a repro script from Antonio Ojea. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 19b438592238b3b40c3f945bb5f9c4ca971c0c45 Merge: a32b344e6f437 cf02ce742f091 Author: Linus Torvalds Date: Thu Jul 1 17:03:11 2021 -0700 Merge tag 'mips_5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - add support for OpeneEmbed SOM9331 board - Ingenic fixes/improvments - other fixes and cleanups * tag 'mips_5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (39 commits) MIPS: Fix PKMAP with 32-bit MIPS huge page support MIPS: CI20: Add second percpu timer for SMP. MIPS: CI20: Reduce clocksource to 750 kHz. MIPS: Ingenic: Add MAC syscon nodes for Ingenic SoCs. dt-bindings: clock: Add documentation for MAC PHY control bindings. MIPS: X1830: Respect cell count of common properties. MIPS: set mips32r5 for virt extensions MIPS: loongsoon64: Reserve memory below starting pfn to prevent Oops MIPS: MT extensions are not available on MIPS32r1 mips/kvm: Use BUG_ON instead of if condition followed by BUG MIPS: OCTEON: octeon-usb: Use devm_platform_get_and_ioremap_resource() MIPS: add PMD table accounting into MIPS'pmd_alloc_one MIPS: Loongson64: fix spelling of SPDX tag MIPS: ingenic: rs90: Add dedicated VRAM memory region MIPS: ingenic: gcw0: Set codec to cap-less mode for FM radio MIPS: ingenic: jz4780: Fix I2C nodes to match DT doc MIPS: ingenic: Select CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER MIPS: Kconfig: ingenic: Ensure MACH_INGENIC_GENERIC selects all SoCs MIPS: cpu-probe: Fix FPU detection on Ingenic JZ4760(B) MIPS: boot: Support specifying UART port on Ingenic SoCs ... commit a32b344e6f4375c5bdc3e89d0997b7eae187a3b1 Merge: e04360a2ea01b bfa50166cd9d5 Author: Linus Torvalds Date: Thu Jul 1 16:57:14 2021 -0700 Merge tag 'pinctrl-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v5.14 kernel. Not so much going on. No core changes, just drivers. The most interesting would be that MIPS Ralink is migrating to pin control and we have some bindings but not yet code for the Apple M1 pin controller. New drivers: - Last merge window we created a driver for the Ralink RT2880. We are now moving the Ralink SoC pin control drivers out of the MIPS architecture code and into the pin control subsystem. This concerns RT288X, MT7620, RT305X, RT3883 and MT7621. - Qualcomm SM6125 SoC pin control driver. - Qualcomm spmi-gpio support for PM7325. - Qualcomm spmi-mpp also handles PMI8994 (just a compatible string) - Mediatek MT8365 SoC pin controller. - New device HID for the AMD GPIO controller. Improvements: - Pin bias config support for a slew of Renesas pin controllers. - Incremental improvements and non-urgent bug fixes to the Renesas SoC drivers. - Implement irq_set_wake on the AMD pin controller so we can wake up from external pin events. Misc: - Devicetree bindings for the Apple M1 pin controller, we will probably see a proper driver for this soon as well" * tag 'pinctrl-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (54 commits) pinctrl: ralink: rt305x: add missing include pinctrl: stm32: check for IRQ MUX validity during alloc() pinctrl: zynqmp: some code cleanups drivers: qcom: pinctrl: Add pinctrl driver for sm6125 dt-bindings: pinctrl: qcom: sm6125: Document SM6125 pinctrl driver dt-bindings: pinctrl: mcp23s08: add documentation for reset-gpios pinctrl: mcp23s08: Add optional reset GPIO pinctrl: mediatek: fix mode encoding pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq() pinctrl: bcm: Constify static pinmux_ops pinctrl: bcm: Constify static pinctrl_ops pinctrl: ralink: move RT288X SoC pinmux config into a new 'pinctrl-rt288x.c' file pinctrl: ralink: move MT7620 SoC pinmux config into a new 'pinctrl-mt7620.c' file pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' file pinctrl: ralink: move RT3883 SoC pinmux config into a new 'pinctrl-rt3883.c' file pinctrl: ralink: move MT7621 SoC pinmux config into a new 'pinctrl-mt7621.c' file pinctrl: ralink: move ralink architecture pinmux header into the driver pinctrl: single: config: enable the pin's input pinctrl: mtk: Fix mt8365 Kconfig dependency pinctrl: mcp23s08: fix race condition in irq handler ... commit 5140aaa4604ba96685dc04b4d2dde3384bbaecef Author: Kees Cook Date: Thu Jul 1 17:44:07 2021 +0200 s390: iucv: Avoid field over-reading memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. Add a wrapping struct to serve as the memcpy() source so the compiler can perform appropriate bounds checking, avoiding this future warning: In function '__fortify_memcpy', inlined from 'iucv_message_pending' at net/iucv/iucv.c:1663:4: ./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter) Signed-off-by: Kees Cook Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 6dce38b4b7ffb39539b49feca2b3ce34dbaadf02 Author: Christophe JAILLET Date: Thu Jul 1 22:18:37 2021 +0200 gve: Propagate error codes to caller If 'gve_probe()' fails, we should propagate the error code, instead of hard coding a -ENXIO value. Make sure that all error handling paths set a correct value for 'err'. Signed-off-by: Christophe JAILLET Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 2342ae10d1272d411a468a85a67647dd115b344f Author: Christophe JAILLET Date: Thu Jul 1 22:18:24 2021 +0200 gve: Fix an error handling path in 'gve_probe()' If the 'register_netdev() call fails, we must release the resources allocated by the previous 'gve_init_priv()' call, as already done in the remove function. Add a new label and the missing 'gve_teardown_priv_resources()' in the error handling path. Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC") Signed-off-by: Christophe JAILLET Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit e04360a2ea01bf42aa639b65aad81f502e896c7f Merge: 514798d36572f 3d8287544223a Author: Linus Torvalds Date: Thu Jul 1 14:54:03 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "This contains a replacement driver for Intel iWarp hardware. This new driver supports the old ethernet hardware and also newer chips that can do ROCE. Other than that, this contains the typical mix of patches: - Driver updates and cleanups for bnxt_re, cxgb4, mlx4, and mlx5 - Many static checker driven code clean ups, including a wide refcount_t conversion - Several series for the hns driver, more HIP09 HW capabilities, migration to new HW register manipulators, and code cleanups - Minor fixes and improvements in srp, rts, and cm - Improvements throughout for sysfs related code to use DEVICE_ATTR_*, make the ib_port sysfs first-class, and overall use sysfs APIs properly - Intel's new irdma driver replacing i40iw - rxe general clean ups and Memory Window support" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (211 commits) RDMA/core: Always release restrack object RDMA/mlx5: Don't access NULL-cleared mpi pointer RDMA/irdma: Fix potential overflow expression in irdma_prm_get_pbles RDMA/irdma: Check contents of user-space irdma_mem_reg_req object RDMA/rxe: Missing unlock on error in get_srq_wqe() RDMA/cma: Fix rdma_resolve_route() memory leak RDMA/core/sa_query: Remove unused argument RDMA/cma: Fix incorrect Packet Lifetime calculation RDMA/cma: Protect RMW with qp_mutex RDMA/cma: Remove unnecessary INIT->INIT transition RDMA/hns: Add window selection field of congestion control RDMA/hfi1: Remove use of kmap() RDMA/irdma: Remove use of kmap() RDMA/bnxt_re: Fix uninitialized struct bit field rsvd1 IB/isert: Align target max I/O size to initiator size RDMA/hns: Fix incorrect vlan enable bit in QPC MAINTAINERS: Update Broadcom RDMA maintainers RDMA/irdma: Use the queried port attributes RDMA/rxe: Fix redundant skb_put_zero RDMA/rxe: Fix extra copy in prepare_ack_packet ... commit aa3cf240b0c8ffef64a63818c97e48aa7c7f9a1f Merge: 6b28a86d6c0bb 382a7c20d9253 Author: David S. Miller Date: Thu Jul 1 14:39:28 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/t nguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-07-01 This series contains updates to igb, igc, ixgbe, e1000e, fm10k, and iavf drivers. Vinicius fixes a use-after-free issue present in igc and igb. Tom Rix fixes the return value for igc_read_phy_reg() when the operation is not supported for igc. Christophe Jaillet fixes unrolling of PCIe error reporting for ixgbe, igc, igb, fm10k, e10000e, and iavf. Alex ensures that q_vector array is not accessed beyond its bounds for igb. Jedrzej moves ring assignment to occur after bounds have been checked in igb. ==================== Signed-off-by: David S. Miller commit cd84bbbac12a173a381a64c6ec8b76a5277b87b5 Author: Stephen Brennan Date: Wed Jun 23 16:21:14 2021 -0700 ext4: use ext4_grp_locked_error in mb_find_extent Commit 5d1b1b3f492f ("ext4: fix BUG when calling ext4_error with locked block group") introduces ext4_grp_locked_error to handle unlocking a group in error cases. Otherwise, there is a possibility of a sleep while atomic. However, since 43c73221b3b1 ("ext4: replace BUG_ON with WARN_ON in mb_find_extent()"), mb_find_extent() has contained a ext4_error() call while a group spinlock is held. Replace this with ext4_grp_locked_error. Fixes: 43c73221b3b1 ("ext4: replace BUG_ON with WARN_ON in mb_find_extent()") Cc: # 4.14+ Signed-off-by: Stephen Brennan Reviewed-by: Lukas Czerner Reviewed-by: Junxiao Bi Link: https://lore.kernel.org/r/20210623232114.34457-1-stephen.s.brennan@oracle.com Signed-off-by: Theodore Ts'o commit 6b28a86d6c0bb02119f386ec2f56efde909e9bcb Author: Mohammad Athari Bin Ismail Date: Wed Jun 30 17:59:35 2021 +0800 net: stmmac: Terminate FPE workqueue in suspend Add stmmac_fpe_stop_wq() in stmmac_suspend() to terminate FPE workqueue during suspend. So, in suspend mode, there will be no FPE workqueue available. Without this fix, new additional FPE workqueue will be created in every suspend->resume cycle. Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure") Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit 6d71cc4c91d856f05d9f175fba866616dd1a7d1f Author: Krzysztof Wilczyński Date: Thu Jul 1 18:43:06 2021 +0000 PCI: cpcihp: Declare cpci_debug in header file cpci_debug is declared as a global variable in cpci_hotplug_core.c and used in cpci_hotplug_pci.c via an "extern". Add an extern declaration in the header file. Resolves the following sparse warning: drivers/pci/hotplug/cpci_hotplug_core.c:47:5: warning: symbol 'cpci_debug' was not declared. Should it be static? Link: https://lore.kernel.org/r/20210701184306.1492003-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 1c88995dfbf99704d2eab6ea47d048efe9cda68c Merge: 18a419bad63b7 19373d0233d04 Author: David S. Miller Date: Thu Jul 1 13:27:11 2021 -0700 Merge branch 'sms911x-dts' Geert Uytterhoeven says: ==================== sms911x: DTS fixes and DT binding to json-schema conversion This patch series converts the Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller Device Tree binding documentation to json-schema, after fixing a few issues in DTS files. Changed compared to v1[1]: - Dropped applied patches, - Add Reviewed-by, - Drop bogus double quotes in compatible values, - Add comment explaining why "additionalProperties: true" is needed. [1] [PATCH 0/5] sms911x: DTS fixes and DT binding to json-schema conversion https://lore.kernel.org/r/cover.1621518686.git.geert+renesas@glider.be ==================== Signed-off-by: David S. Miller commit 19373d0233d04ede649eee4269922e20dd133cf2 Author: Geert Uytterhoeven Date: Thu Jul 1 14:02:21 2021 +0200 dt-bindings: net: sms911x: Convert to json-schema Convert the Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller Device Tree binding documentation to json-schema. Document missing properties. Make "phy-mode" not required, as many DTS files do not have it, and the Linux drivers falls back to PHY_INTERFACE_MODE_NA. Correct nodename in example. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit b6c8801038234a6d837dfc683d79676d4022ad79 Author: Geert Uytterhoeven Date: Thu Jul 1 14:02:20 2021 +0200 ARM: dts: qcom-apq8060: Correct Ethernet node name and drop bogus irq property make dtbs_check: ethernet-ebi2@2,0: $nodename:0: 'ethernet-ebi2@2,0' does not match '^ethernet(@.*)?$' ethernet-ebi2@2,0: 'smsc,irq-active-low' does not match any of the regexes: 'pinctrl-[0-9]+' There is no "smsc,irq-active-low" property, as active low is the default. Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: David S. Miller commit 514798d36572fb8eba6ccff3de10c9615063a7f5 Merge: e058a84bfddc4 d2b21013bf5fb Author: Linus Torvalds Date: Thu Jul 1 13:26:16 2021 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This round has a diffstat dominated by Qualcomm clk drivers. Honestly though that's just a bunch of data so the diffstat reflects that. Looking beyond that there's just a bunch of updates all around in various clk drivers. Renesas and NXP (for i.MX) are two SoC vendors that have a lot of patches in here. Overall the driver changes look to be mostly enabling more clks and non-critical fixes that we could hold until the next merge window. I'm especially excited about the series from Arnd that graduates clkdev to be the only implementation of clk_get() and clk_put(). That's a good step in the right direction to migreate eveerything over to the common clk framework. Now we don't have to worry about clkdev specific details, they're just part of the clk API now. Core: - clkdev is now the only option, i.e. clk_get()/clk_put() is implemented in only one place in the kernel instead of in drivers/clk/clkdev.c and in architectures that want their own implementation New Drivers: - Texas Instruments' LMK04832 Ultra Low-Noise JESD204B Compliant Clock Jitter Cleaner With Dual Loop PLLs - Qualcomm MDM9607 GCC - Qualcomm SC8180X display clks - Qualcomm SM6125 GCC - Qualcomm SM8250 CAMCC (camera) - Renesas RZ/G2L SoC - Hisilicon hi3559A SoC Updates: - Stop using clock-output-names in ST clk drivers (yay!) - Support secure mode of STM32MP1 SoCs - Improve clock support for Actions S500 SoC - duty cycle setting support on qcom clks - Add TI am33xx spread spectrum clock support - Use determine_rate() for the Amlogic pll ops instead of round_rate() - Restrict Amlogic gp0/1 and audio plls range on g12a/sm1 - Improve Amlogic axg-audio controller error on deferral - Add NNA clocks on Amlogic g12a - Reduce memory footprint of Rockchip PLL rate tables - A fix for the newly added Rockchip rk3568 clk driver - Exported clock for the newly added Rockchip video decoder - Remove audio ipg clock from i.MX8MP - Remove deprecated legacy clock binding for i.MX SCU clock driver - Use common clk-imx8qxp for both i.MX8QXP and i.MX8QM - Add multiple clocks to clk-imx8qxp driver (enet, hdmi, lcdif, audio, parallel interface) - Add dedicated clock ops for i.MX paralel interface - Different fixes for clocks controlled by ATF on i.MX SoCs - Add A53/A72 frequency scaling support i.MX clk-scu driver - Add special case for DCSS clock on suspend for i.MX clk-scu driver - Add parent save/restore on suspend/resume to i.MX clk-scu driver - Skip runtime PM enablement for CPU clocks in i.MX clk-scu driver - Remove the sys1_pll/sys2_pll clock gates for i.MX8MQ and their bindings - Tegra clk driver no longer deasserts resets on clk_enable as it gets in the way of certain power-up sequences - Fix compile testing for Tegra clk driver - One patch to fix a divider on the Allwinner v3s Audio PLL - Add support for CPU core clock boost modes on Renesas R-Car Gen3 - Add ISPCS (Image Signal Processor) clocks on Renesas R-Car V3U - Switch SH/R-Mobile and R-Car "DIV6" clocks to .determine_rate() and improve support for multiple parents - Switch Renesas RZ/N1 divider clocks to .determine_rate() - Add ZA2 (Audio Clock Generator) clock on Renesas R-Car D3 - Convert ar7 to common clk framework - Convert ralink to common clk framework" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (161 commits) clk: zynqmp: Handle divider specific read only flag clk: zynqmp: Use firmware specific mux clock flags clk: zynqmp: Use firmware specific divider clock flags clk: zynqmp: Use firmware specific common clock flags clk: lmk04832: Use of match table clk: lmk04832: Depend on SPI clk: stm32mp1: new compatible for secure RCC support dt-bindings: clock: stm32mp1 new compatible for secure rcc dt-bindings: reset: add MCU HOLD BOOT ID for SCMI reset domains on stm32mp15 dt-bindings: reset: add IDs for SCMI reset domains on stm32mp15 dt-bindings: clock: add IDs for SCMI clocks on stm32mp15 reset: stm32mp1: remove stm32mp1 reset clk: hisilicon: Add clock driver for hi3559A SoC dt-bindings: Document the hi3559a clock bindings clk: si5341: Add sysfs properties to allow checking/resetting device faults clk: si5341: Add silabs,iovdd-33 property clk: si5341: Add silabs,xaxb-ext-clk property clk: si5341: Allow different output VDD_SEL values clk: si5341: Update initialization magic clk: si5341: Check for input clock presence and PLL lock on startup ... commit 18a419bad63b7f68a1979e28459782518e7b6bbe Author: Eric Dumazet Date: Wed Jun 30 09:42:44 2021 -0700 udp: annotate data races around unix_sk(sk)->gso_size Accesses to unix_sk(sk)->gso_size are lockless. Add READ_ONCE()/WRITE_ONCE() around them. BUG: KCSAN: data-race in udp_lib_setsockopt / udpv6_sendmsg write to 0xffff88812d78f47c of 2 bytes by task 10849 on cpu 1: udp_lib_setsockopt+0x3b3/0x710 net/ipv4/udp.c:2696 udpv6_setsockopt+0x63/0x90 net/ipv6/udp.c:1630 sock_common_setsockopt+0x5d/0x70 net/core/sock.c:3265 __sys_setsockopt+0x18f/0x200 net/socket.c:2104 __do_sys_setsockopt net/socket.c:2115 [inline] __se_sys_setsockopt net/socket.c:2112 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2112 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88812d78f47c of 2 bytes by task 10852 on cpu 0: udpv6_sendmsg+0x161/0x16b0 net/ipv6/udp.c:1299 inet6_sendmsg+0x5f/0x80 net/ipv6/af_inet6.c:642 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2337 ___sys_sendmsg net/socket.c:2391 [inline] __sys_sendmmsg+0x315/0x4b0 net/socket.c:2477 __do_sys_sendmmsg net/socket.c:2506 [inline] __se_sys_sendmmsg net/socket.c:2503 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2503 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x0000 -> 0x0005 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 10852 Comm: syz-executor.0 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reported-by: syzbot Signed-off-by: David S. Miller commit 71158bb1f2d2da61385c58fc1114e1a1c19984ba Author: Paolo Abeni Date: Wed Jun 30 13:42:13 2021 +0200 tcp: consistently disable header prediction for mptcp The MPTCP receive path is hooked only into the TCP slow-path. The DSS presence allows plain MPTCP traffic to hit that consistently. Since commit e1ff9e82e2ea ("net: mptcp: improve fallback to TCP"), when an MPTCP socket falls back to TCP, it can hit the TCP receive fast-path, and delay or stop triggering the event notification. Address the issue explicitly disabling the header prediction for MPTCP sockets. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/200 Fixes: e1ff9e82e2ea ("net: mptcp: improve fallback to TCP") Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit ca75bcf0a83b6cc7f53a593d98ec7121c4839b43 Author: Christoph Hellwig Date: Thu Jul 1 10:15:09 2021 +0200 net: remove the caif_hsi driver The caif_hsi driver relies on a cfhsi_get_ops symbol using symbol_get, but this symbol is not provided anywhere in the kernel tree. Remove this driver given that it is dead code. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 09ef17863f37235fe4e65a7d991e487b9ff6e553 Author: Xin Long Date: Wed Jun 30 20:18:20 2021 -0400 Documentation: add more details in tipc.rst kernel-doc for TIPC is too simple, we need to add more information for it. This patch is to extend the abstract, and add the Features and Links items. Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 4f408e1fa6e10b6da72691233369172bac7d9e9b Author: Sukadev Bhattiprolu Date: Wed Jun 30 14:36:17 2021 -0400 ibmvnic: retry reset if there are no other resets Normally, if a reset fails due to failover or other communication error there is another reset (eg: FAILOVER) in the queue and we would process that reset. But if we are unable to communicate with PHYP or VIOS after H_FREE_CRQ, there would be no other resets in the queue and the adapter would be in an undefined state even though it was in the OPEN state earlier. While starting the reset we set the carrier to off state so we won't even get the timeout resets. If the last queued reset fails, retry it as a hard reset (after the usual 60 second settling time). Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Dany Madden Signed-off-by: David S. Miller commit b2bc81481750b8457c51c2e48e7af9143663c093 Merge: 88827353c696d 5ce15f2783332 Author: David S. Miller Date: Thu Jul 1 13:08:19 2021 -0700 Merge branch 'ptp-virtual-clocks-and-timestamping' Yangbo Lu says: ==================== ptp: support virtual clocks and timestamping Current PTP driver exposes one PTP device to user which binds network interface/interfaces to provide timestamping. Actually we have a way utilizing timecounter/cyclecounter to virtualize any number of PTP clocks based on a same free running physical clock for using. The purpose of having multiple PTP virtual clocks is for user space to directly/easily use them for multiple domains synchronization. user space: ^ ^ | SO_TIMESTAMPING new flag: | Packets with | SOF_TIMESTAMPING_BIND_PHC | TX/RX HW timestamps v v +--------------------------------------------+ sock: | sock (new member sk_bind_phc) | +--------------------------------------------+ ^ ^ | ethtool_get_phc_vclocks | Convert HW timestamps | | to sk_bind_phc v v +--------------+--------------+--------------+ vclock: | ptp1 | ptp2 | ptpN | +--------------+--------------+--------------+ pclock: | ptp0 free running | +--------------------------------------------+ The block diagram may explain how it works. Besides the PTP virtual clocks, the packet HW timestamp converting to the bound PHC is also done in sock driver. For user space, PTP virtual clocks can be created via sysfs, and extended SO_TIMESTAMPING API (new flag SOF_TIMESTAMPING_BIND_PHC) can be used to bind one PTP virtual clock for timestamping. The test tool timestamping.c (together with linuxptp phc_ctl tool) can be used to verify: # echo 4 > /sys/class/ptp/ptp0/n_vclocks [ 129.399472] ptp ptp0: new virtual clock ptp2 [ 129.404234] ptp ptp0: new virtual clock ptp3 [ 129.409532] ptp ptp0: new virtual clock ptp4 [ 129.413942] ptp ptp0: new virtual clock ptp5 [ 129.418257] ptp ptp0: guarantee physical clock free running # # phc_ctl /dev/ptp2 set 10000 # phc_ctl /dev/ptp3 set 20000 # # timestamping eno0 2 SOF_TIMESTAMPING_TX_HARDWARE SOF_TIMESTAMPING_RAW_HARDWARE SOF_TIMESTAMPING_BIND_PHC # timestamping eno0 2 SOF_TIMESTAMPING_RX_HARDWARE SOF_TIMESTAMPING_RAW_HARDWARE SOF_TIMESTAMPING_BIND_PHC # timestamping eno0 3 SOF_TIMESTAMPING_TX_HARDWARE SOF_TIMESTAMPING_RAW_HARDWARE SOF_TIMESTAMPING_BIND_PHC # timestamping eno0 3 SOF_TIMESTAMPING_RX_HARDWARE SOF_TIMESTAMPING_RAW_HARDWARE SOF_TIMESTAMPING_BIND_PHC Changes for v2: - Converted to num_vclocks for creating virtual clocks. - Guranteed physical clock free running when using virtual clocks. - Fixed build warning. - Updated copyright. Changes for v3: - Supported PTP virtual clock in default in PTP driver. - Protected concurrency of ptp->num_vclocks accessing. - Supported PHC vclocks query via ethtool. - Extended SO_TIMESTAMPING API for PHC binding. - Converted HW timestamps to PHC bound, instead of previous binding domain value to PHC idea. - Other minor fixes. Changes for v4: - Used do_aux_work callback for vclock refreshing instead. - Used unsigned int for vclocks number, and max_vclocks for limitiation. - Fixed mutex locking. - Dynamically allocated memory for vclock index storage. - Removed ethtool ioctl command for vclocks getting. - Updated doc for ethtool phc vclocks get. - Converted to mptcp_setsockopt_sol_socket_timestamping(). - Passed so_timestamping for sock_set_timestamping. - Fixed checkpatch/build. - Other minor fixed. Changes for v5: - Fixed checkpatch/build/bug reported by test robot. ==================== Signed-off-by: David S. Miller commit 5ce15f2783332dce99ef04e2bdc927f0fa84105d Author: Yangbo Lu Date: Wed Jun 30 16:12:02 2021 +0800 MAINTAINERS: add entry for PTP virtual clock driver Add entry for PTP virtual clock driver. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 2214d7032479e50ff1fa7276e6efe1df08173fbf Author: Yangbo Lu Date: Wed Jun 30 16:12:01 2021 +0800 selftests/net: timestamping: support binding PHC Support binding PHC of PTP vclock for timestamping. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit d7c08826558811e1bf88de3750a7051f27d0e25c Author: Yangbo Lu Date: Wed Jun 30 16:12:00 2021 +0800 net: socket: support hardware timestamp conversion to PHC bound This patch is to support hardware timestamp conversion to PHC bound. This applies to both RX and TX since their skb handling (for TX, it's skb clone in error queue) all goes through __sock_recv_timestamp. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit d463126e23f112629edb01594141ca437a92a108 Author: Yangbo Lu Date: Wed Jun 30 16:11:59 2021 +0800 net: sock: extend SO_TIMESTAMPING for PHC binding Since PTP virtual clock support is added, there can be several PTP virtual clocks based on one PTP physical clock for timestamping. This patch is to extend SO_TIMESTAMPING API to support PHC (PTP Hardware Clock) binding by adding a new flag SOF_TIMESTAMPING_BIND_PHC. When PTP virtual clocks are in use, user space can configure to bind one for timestamping, but PTP physical clock is not supported and not needed to bind. This patch is preparation for timestamp conversion from raw timestamp to a specific PTP virtual clock time in core net. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 6c9a0a0f2333b1e3c29fef47a8b12131fce4905b Author: Yangbo Lu Date: Wed Jun 30 16:11:58 2021 +0800 mptcp: setsockopt: convert to mptcp_setsockopt_sol_socket_timestamping() Split timestamping handling into a new function mptcp_setsockopt_sol_socket_timestamping(). This is preparation for extending SO_TIMESTAMPING for PHC binding, since optval will no longer be integer. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 895487a3a10fb3a177e20dcde875515d46ccd4df Author: Yangbo Lu Date: Wed Jun 30 16:11:57 2021 +0800 ptp: add kernel API ptp_convert_timestamp() Add kernel API ptp_convert_timestamp() to convert raw hardware timestamp to a specified ptp vclock time. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit c156174a67070042d51d2c866146d3c934d5468c Author: Yangbo Lu Date: Wed Jun 30 16:11:56 2021 +0800 ethtool: add a new command for getting PHC virtual clocks Add an interface for getting PHC (PTP Hardware Clock) virtual clocks, which are based on PHC physical clock providing hardware timestamp to network packets. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit acb288e8047b7569fbc9af6fa6e9405315345103 Author: Yangbo Lu Date: Wed Jun 30 16:11:55 2021 +0800 ptp: add kernel API ptp_get_vclocks_index() Add kernel API ptp_get_vclocks_index() to get all ptp vclocks index on pclock. This is preparation for supporting ptp vclocks info query through ethtool. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 44c494c8e30e35713c7d11ca3c5ab332cbfabacf Author: Yangbo Lu Date: Wed Jun 30 16:11:54 2021 +0800 ptp: track available ptp vclocks information Track available ptp vclocks information. Record index values of available ptp vclocks during registering and unregistering. This is preparation for supporting ptp vclocks info query through ethtool. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 73f37068d540eba5f93ba3a0019bf479d35ebd76 Author: Yangbo Lu Date: Wed Jun 30 16:11:53 2021 +0800 ptp: support ptp physical/virtual clocks conversion Support ptp physical/virtual clocks conversion via sysfs. There will be a new attribute n_vclocks under ptp physical clock sysfs. - In default, the value is 0 meaning only ptp physical clock is in use. - Setting the value can create corresponding number of ptp virtual clocks to use. But current physical clock is guaranteed to stay free running. - Setting the value back to 0 can delete virtual clocks and back use physical clock again. Another new attribute max_vclocks control the maximum number of ptp vclocks. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 5d43f951b1ac797450bb4d230fdc960b739bea04 Author: Yangbo Lu Date: Wed Jun 30 16:11:52 2021 +0800 ptp: add ptp virtual clock driver framework This patch is to add ptp virtual clock driver framework utilizing timecounter/cyclecounter. The patch just exports two essential APIs for PTP driver. - ptp_vclock_register() - ptp_vclock_unregister() Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 88827353c696defc40de7a5cdae5a5a084598fe2 Merge: 764a4af9f0424 d7340f46beae0 Author: David S. Miller Date: Thu Jul 1 13:04:41 2021 -0700 Merge branch 'wwan-iosm-fixes' M Chetan Kumar says: ==================== net: wwan: iosm: fixes This patch series contains IOSM Driver fixes and details are are mentioned below. Patch1: Corrects uevent reporting format key=value pair. Patch2: Removes redundant IP session checks. Patch3: Correct link-Id number to be in sycn with MBIM session Id. Patch4: Update netdev tx stats. Patch5: Set netdev default mtu size. ==================== Signed-off-by: David S. Miller commit d7340f46beae05227f5f4a1c8cb18e81e0c3fe0e Author: M Chetan Kumar Date: Thu Jul 1 20:39:34 2021 +0530 net: wwan: iosm: set default mtu Set netdev default mtu size to 1500. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit c302e3a1c86f78421d58ef564ba22519b0b039c0 Author: M Chetan Kumar Date: Thu Jul 1 20:39:17 2021 +0530 net: wwan: iosm: fix netdev tx stats Update tx stats on successful packet consume, drop. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 5bb4eea0c5f5b9383a543293966bdf20e54988aa Author: M Chetan Kumar Date: Thu Jul 1 20:37:45 2021 +0530 net: wwan: iosm: correct link-id handling Link ID to be kept intact with MBIM session ID Ex: ID 0 should be associated to MBIM session ID 0. Reported-by: Loic Poulain Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 3bcfc0a2d3199d0a83d47ed67ad57a1c2f5a16d7 Author: M Chetan Kumar Date: Thu Jul 1 20:37:31 2021 +0530 net: wwan: iosm: remove reduandant check Remove reduandant IP session id check since required checks are in place under caller. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 856a5c97268d474282360c8a3cf4f37f6036dbec Author: M Chetan Kumar Date: Thu Jul 1 20:37:06 2021 +0530 net: wwan: iosm: fix uevent reporting Change uevent env variable name to IOSM_EVENT & correct reporting format to key=value pair. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 764a4af9f04244621964f148053d6e8703505311 Merge: 39d7101684a74 79d2be385e9ea Author: David S. Miller Date: Thu Jul 1 13:02:38 2021 -0700 Merge branch 'octeontx2-dmasc-filtering' Hariprasad Kelam says: ==================== DMAC based packet filtering Each MAC block supports 32 DMAC filters which can be configured to accept or drop packets based on address match This patch series adds mbox handlers and extends ntuple filter callbacks to accomdate DMAC filters such that user can install DMAC based filters on interface from ethtool. Patch1 adds necessary mbox handlers such that mbox consumers like PF netdev can add/delete/update DMAC filters and Patch2 adds debugfs support to dump current list of installed filters. Patch3 adds support to call mbox handlers upon receiving DMAC filters from ethtool ntuple commands. Change-log: v2 - - fixed indentation issues. v3 - - fixed kdoc warnings ==================== Signed-off-by: David S. Miller commit 79d2be385e9eabe4403eb85bcc7d3efc6b936a76 Author: Hariprasad Kelam Date: Wed Jun 30 15:40:59 2021 +0530 octeontx2-pf: offload DMAC filters to CGX/RPM block DMAC filtering can be achieved by either NPC MCAM rules or CGX/RPM MAC filters. Currently we are achieving this by NPC MCAM rules. This patch offloads DMAC filters to CGX/RPM MAC filters instead of NPC MCAM rules. Offloading DMAC filter to CGX/RPM block helps in reducing traffic to NPC block and save MCAM rules Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit dbc52debf95f8f902f74309e7ae0de38e1ed4e4c Author: Hariprasad Kelam Date: Wed Jun 30 15:40:58 2021 +0530 octeontx2-af: Debugfs support for DMAC filters Add debugfs support to display CGX/RPM DMAC filter table associated with pf. cat /sys/kernel/debug/octeontx2/cgx/cgx0/lmac0/mac_filter PCI dev RVUPF BROADCAST MULTICAST FILTER-MODE 0002:02:00.0 PF2 ACCEPT ACCEPT UNICAST DMAC-INDEX ADDRESS 0 00:0f:b7:06:17:06 1 1a:1b:1c:1d:1e:01 2 1a:1b:1c:1d:1e:02 Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 6f14078e3ee59ccc5806f7bff0f25f94a6d3ff80 Author: Sunil Kumar Kori Date: Wed Jun 30 15:40:57 2021 +0530 octeontx2-af: DMAC filter support in MAC block MAC block supports 32 dmac filters which are logically divided among all attached LMACS. For example MAC block0 having one LMAC then maximum supported filters are 32 where as MAC block1 having 4 enabled LMACS them maximum supported filteres are 8 for each LMAC. This patch adds mbox handlers to add/delete/update mac entry in DMAC filter table. Signed-off-by: Sunil Kumar Kori Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 39d7101684a74ac478e0b6411bcc68307a7f1c1a Merge: 1d11fa231cabe 5e437416ff669 Author: David S. Miller Date: Thu Jul 1 13:01:43 2021 -0700 Merge branch 'master' of ../net-next/ commit 4db221f6983aadd6d1975bab170f089afd6fd8d6 Author: Joyce Ooi Date: Thu Jul 1 14:52:47 2021 +0800 MAINTAINERS: Add Joyce Ooi as Altera PCIe maintainer Ley Foon Tan has moved to a different role, so add Joyce Ooi as Altera PCIe maintainer. The rfi@lists.rocketboards.org mailing list seems to be dead, so drop it. [bhelgaas: drop rfi@lists.rocketboards.org] Link: https://lore.kernel.org/r/20210701065247.152292-1-joyce.ooi@intel.com Signed-off-by: Joyce Ooi Signed-off-by: Bjorn Helgaas commit e058a84bfddc42ba356a2316f2cf1141974625c9 Merge: c288d9cd71043 8a02ea42bc1d4 Author: Linus Torvalds Date: Thu Jul 1 12:53:43 2021 -0700 Merge tag 'drm-next-2021-07-01' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "Highlights: - AMD enables two more GPUs, with resulting header files - i915 has started to move to TTM for discrete GPU and enable DG1 discrete GPU support (not by default yet) - new HyperV drm driver - vmwgfx adds arm64 support - TTM refactoring ongoing - 16bpc display support for AMD hw Otherwise it's just the usual insane amounts of work all over the place in lots of drivers and the core, as mostly summarised below: Core: - mark AGP ioctls as legacy - disable force probing for non-master clients - HDR metadata property helpers - HDMI infoframe signal colorimetry support - remove drm_device.pdev pointer - remove DRM_KMS_FB_HELPER config option - remove drm_pci_alloc/free - drm_err_*/drm_dbg_* helpers - use drm driver names for fbdev - leaked DMA handle fix - 16bpc fixed point format fourcc - add prefetching memcpy for WC - Documentation fixes aperture: - add aperture ownership helpers dp: - aux fixes - downstream 0 port handling - use extended base receiver capability DPCD - Rename DP_PSR_SELECTIVE_UPDATE to better mach eDP spec - mst: use khz as link rate during init - VCPI fixes for StarTech hub ttm: - provide tt_shrink file via debugfs - warn about freeing pinned BOs - fix swapping error handling - move page alignment into BO - cleanup ttm_agp_backend - add ttm_sys_manager - don't override vm_ops - ttm_bo_mmap removed - make ttm_resource base of all managers - remove VM_MIXEDMAP usage panel: - sysfs_emit support - simple: runtime PM support - simple: power up panel when reading EDID + caching bridge: - MHDP8546: HDCP support + DT bindings - MHDP8546: Register DP AUX channel with userspace - TI SN65DSI83 + SN65DSI84: add driver - Sil8620: Fix module dependencies - dw-hdmi: make CEC driver loading optional - Ti-sn65dsi86: refclk fixes, subdrivers, runtime pm - It66121: Add driver + DT bindings - Adv7511: Support I2S IEC958 encoding - Anx7625: fix power-on delay - Nwi-dsi: Modesetting fixes; Cleanups - lt6911: add missing MODULE_DEVICE_TABLE - cdns: fix PM reference leak hyperv: - add new DRM driver for HyperV graphics efifb: - non-PCI device handling fixes i915: - refactor IP/device versioning - XeLPD Display IP preperation work - ADL-P enablement patches - DG1 uAPI behind BROKEN - disable mmap ioctl for discerte GPUs - start enabling HuC loading for Gen12+ - major GuC backend rework for new platforms - initial TTM support for Discrete GPUs - locking rework for TTM prep - use correct max source link rate for eDP - %p4cc format printing - GLK display fixes - VLV DSI panel power fixes - PSR2 disabled for RKL and ADL-S - ACPI _DSM invalid access fixed - DMC FW path abstraction - ADL-S PCI ID update - uAPI headers converted to kerneldoc - initial LMEM support for DG1 - x86/gpu: add Jasperlake to gen11 early quirks amdgpu: - Aldebaran updates + initial SR-IOV - new GPU: Beige Goby and Yellow Carp support - more LTTPR display work - Vangogh updates - SDMA 5.x GCR fixes - PCIe ASPM support - Renoir TMZ enablement - initial multiple eDP panel support - use fdinfo to track devices/process info - pin/unpin TTM fixes - free resource on fence usage query - fix fence calculation - fix hotunplug/suspend issues - GC/MM register access macro cleanup for SR-IOV - W=1 fixes - ACPI ATCS/ATIF handling rework - 16bpc fixed point format support - Initial smartshift support - RV/PCO power tuning fixes - new INFO query for additional vbios info amdkfd: - SR-IOV aldebaran support - HMM SVM support radeon: - SMU regression fixes - Oland flickering fix vmwgfx: - enable console with fbdev emulation - fix cpu updates of coherent multisample surfaces - remove reservation semaphore - add initial SVGA3 support - support arm64 msm: - devcoredump support for display errors - dpu/dsi: yaml bindings conversion - mdp5: alpha/blend_mode/zpos support - a6xx: cached coherent buffer support - gpu iova fault improvement - a660 support rockchip: - RK3036 win1 scaling support - RK3066/3188 missing register support - RK3036/3066/3126/3188 alpha support mediatek: - MT8167 HDMI support - MT8183 DPI dual edge support tegra: - fixed YUV support/scaling on Tegra186+ ast: - use pcim_iomap - fix DP501 EDID bochs: - screen blanking support etnaviv: - export more GPU ID values to userspace - add HWDB entry for GPU on i.MX8MP - rework linear window calcs exynos: - pm runtime changes imx: - Annotate dma_fence critical section - fix PRG modifiers after drmm conversion - Add 8 pixel alignment fix for 1366x768 - fix YUV advertising - add color properties ingenic: - IPU planes fix panfrost: - Mediatek MT8183 support + DT bindings - export AFBC_FEATURES register to userspace simpledrm: - %pr for printing resources nouveau: - pin/unpin TTM fixes qxl: - unpin shadow BO virtio: - create dumb BOs as guest blob vkms: - drmm_universal_plane_alloc - add XRGB plane composition - overlay support" * tag 'drm-next-2021-07-01' of git://anongit.freedesktop.org/drm/drm: (1570 commits) drm/i915: Reinstate the mmap ioctl for some platforms drm/i915/dsc: abstract helpers to get bigjoiner primary/secondary crtc Revert "drm/msm/mdp5: provide dynamic bandwidth management" drm/msm/mdp5: provide dynamic bandwidth management drm/msm/mdp5: add perf blocks for holding fudge factors drm/msm/mdp5: switch to standard zpos property drm/msm/mdp5: add support for alpha/blend_mode properties drm/msm/mdp5: use drm_plane_state for pixel blend mode drm/msm/mdp5: use drm_plane_state for storing alpha value drm/msm/mdp5: use drm atomic helpers to handle base drm plane state drm/msm/dsi: do not enable PHYs when called for the slave DSI interface drm/msm: Add debugfs to trigger shrinker drm/msm/dpu: Avoid ABBA deadlock between IRQ modules drm/msm: devcoredump iommu fault support iommu/arm-smmu-qcom: Add stall support drm/msm: Improve the a6xx page fault handler iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info iommu/arm-smmu: Add support for driver IOMMU fault handlers drm/msm: export hangcheck_period in debugfs drm/msm/a6xx: add support for Adreno 660 GPU ... commit e09ee510600b941c62e94f6b59878cf53ba0e447 Author: Pavel Begunkov Date: Thu Jul 1 13:26:05 2021 +0100 io_uring: fix exiting io_req_task_work_add leaks If one entered io_req_task_work_add() not seeing PF_EXITING, it will set a ->task_state bit and try task_work_add(), which may fail by that moment. If that happens the function would try to cancel the request. However, in a meanwhile there might come other io_req_task_work_add() callers, which will see the bit set and leave their requests in the list, which will never be executed. Don't propagate an error, but clear the bit first and then fallback all requests that we can splice from the list. The callback functions have to be able to deal with PF_EXITING, so poll and apoll was modified via changing io_poll_rewait(). Fixes: 7cbf1722d5fc ("io_uring: provide FIFO ordering for task_work") Reported-by: Jens Axboe Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/060002f19f1fdbd130ba24aef818ea4d3080819b.1625142209.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5b0a6acc73fcac5f7d17badd09275bf7b9b46603 Author: Pavel Begunkov Date: Wed Jun 30 21:54:04 2021 +0100 io_uring: simplify task_work func Since we don't really use req->task_work anymore, get rid of it together with the nasty ->func aliasing between ->io_task_work and ->task_work, and hide ->fallback_node inside of io_task_work. Also, as task_work is gone now, replace the callback type from task_work_func_t to a function taking io_kiocb to avoid casting and simplify code. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9011bf9a13e3b5710c3cfc330da829ee25b5a029 Author: Pavel Begunkov Date: Wed Jun 30 21:54:03 2021 +0100 io_uring: fix stuck fallback reqs When task_work_add() fails, we use ->exit_task_work to queue the work. That will be run only in the cancellation path, which happens either when the ctx is dying or one of tasks with inflight requests is exiting or executing. There is a good chance that such a request would just get stuck in the list potentially hodling a file, all io_uring rsrc recycling or some other resources. Nothing terrible, it'll go away at some point, but we don't want to lock them up for longer than needed. Replace that hand made ->exit_task_work with delayed_work + llist inspired by fput_many(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c288d9cd710433e5991d58a0764c4d08a933b871 Merge: 911a2997a5b7c e149bd742b2db Author: Linus Torvalds Date: Thu Jul 1 12:16:24 2021 -0700 Merge tag 'for-5.14/io_uring-2021-06-30' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: - Multi-queue iopoll improvement (Fam) - Allow configurable io-wq CPU masks (me) - renameat/linkat tightening (me) - poll re-arm improvement (Olivier) - SQPOLL race fix (Olivier) - Cancelation unification (Pavel) - SQPOLL cleanups (Pavel) - Enable file backed buffers for shmem/memfd (Pavel) - A ton of cleanups and performance improvements (Pavel) - Followup and misc fixes (Colin, Fam, Hao, Olivier) * tag 'for-5.14/io_uring-2021-06-30' of git://git.kernel.dk/linux-block: (83 commits) io_uring: code clean for kiocb_done() io_uring: spin in iopoll() only when reqs are in a single queue io_uring: pre-initialise some of req fields io_uring: refactor io_submit_flush_completions io_uring: optimise hot path restricted checks io_uring: remove not needed PF_EXITING check io_uring: mainstream sqpoll task_work running io_uring: refactor io_arm_poll_handler() io_uring: reduce latency by reissueing the operation io_uring: add IOPOLL and reserved field checks to IORING_OP_UNLINKAT io_uring: add IOPOLL and reserved field checks to IORING_OP_RENAMEAT io_uring: refactor io_openat2() io_uring: simplify struct io_uring_sqe layout io_uring: update sqe layout build checks io_uring: fix code style problems io_uring: refactor io_sq_thread() io_uring: don't change sqpoll creds if not needed io_uring: Create define to modify a SQPOLL parameter io_uring: Fix race condition when sqp thread goes to sleep io_uring: improve in tctx_task_work() resubmission ... commit cf96b8e45a9bf74d2a6f1e1f88a41b10e9357c6b Author: Riccardo Mancini Date: Fri Jun 25 01:19:25 2021 +0200 perf session: Add missing evlist__delete when deleting a session ASan reports a memory leak caused by evlist not being deleted on exit in perf-report, perf-script and perf-data. The problem is caused by evlist->session not being deleted, which is allocated in perf_session__read_header, called in perf_session__new if perf_data is in read mode. In case of write mode, the session->evlist is filled by the caller. This patch solves the problem by calling evlist__delete in perf_session__delete if perf_data is in read mode. Changes in v2: - call evlist__delete from within perf_session__delete v1: https://lore.kernel.org/lkml/20210621234317.235545-1-rickyman7@gmail.com/ ASan report follows: $ ./perf script report flamegraph ================================================================= ==227640==ERROR: LeakSanitizer: detected memory leaks Indirect leak of 2704 byte(s) in 1 object(s) allocated from: #0 0x4f4137 in calloc (/home/user/linux/tools/perf/perf+0x4f4137) #1 0xbe3d56 in zalloc /home/user/linux/tools/lib/perf/../../lib/zalloc.c:8:9 #2 0x7f999e in evlist__new /home/user/linux/tools/perf/util/evlist.c:77:26 #3 0x8ad938 in perf_session__read_header /home/user/linux/tools/perf/util/header.c:3797:20 #4 0x8ec714 in perf_session__open /home/user/linux/tools/perf/util/session.c:109:6 #5 0x8ebe83 in perf_session__new /home/user/linux/tools/perf/util/session.c:213:10 #6 0x60c6de in cmd_script /home/user/linux/tools/perf/builtin-script.c:3856:12 #7 0x7b2930 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #8 0x7b120f in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #9 0x7b2493 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #10 0x7b0c89 in main /home/user/linux/tools/perf/perf.c:539:3 #11 0x7f5260654b74 (/lib64/libc.so.6+0x27b74) Indirect leak of 568 byte(s) in 1 object(s) allocated from: #0 0x4f4137 in calloc (/home/user/linux/tools/perf/perf+0x4f4137) #1 0xbe3d56 in zalloc /home/user/linux/tools/lib/perf/../../lib/zalloc.c:8:9 #2 0x80ce88 in evsel__new_idx /home/user/linux/tools/perf/util/evsel.c:268:24 #3 0x8aed93 in evsel__new /home/user/linux/tools/perf/util/evsel.h:210:9 #4 0x8ae07e in perf_session__read_header /home/user/linux/tools/perf/util/header.c:3853:11 #5 0x8ec714 in perf_session__open /home/user/linux/tools/perf/util/session.c:109:6 #6 0x8ebe83 in perf_session__new /home/user/linux/tools/perf/util/session.c:213:10 #7 0x60c6de in cmd_script /home/user/linux/tools/perf/builtin-script.c:3856:12 #8 0x7b2930 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #9 0x7b120f in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #10 0x7b2493 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #11 0x7b0c89 in main /home/user/linux/tools/perf/perf.c:539:3 #12 0x7f5260654b74 (/lib64/libc.so.6+0x27b74) Indirect leak of 264 byte(s) in 1 object(s) allocated from: #0 0x4f4137 in calloc (/home/user/linux/tools/perf/perf+0x4f4137) #1 0xbe3d56 in zalloc /home/user/linux/tools/lib/perf/../../lib/zalloc.c:8:9 #2 0xbe3e70 in xyarray__new /home/user/linux/tools/lib/perf/xyarray.c:10:23 #3 0xbd7754 in perf_evsel__alloc_id /home/user/linux/tools/lib/perf/evsel.c:361:21 #4 0x8ae201 in perf_session__read_header /home/user/linux/tools/perf/util/header.c:3871:7 #5 0x8ec714 in perf_session__open /home/user/linux/tools/perf/util/session.c:109:6 #6 0x8ebe83 in perf_session__new /home/user/linux/tools/perf/util/session.c:213:10 #7 0x60c6de in cmd_script /home/user/linux/tools/perf/builtin-script.c:3856:12 #8 0x7b2930 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #9 0x7b120f in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #10 0x7b2493 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #11 0x7b0c89 in main /home/user/linux/tools/perf/perf.c:539:3 #12 0x7f5260654b74 (/lib64/libc.so.6+0x27b74) Indirect leak of 32 byte(s) in 1 object(s) allocated from: #0 0x4f4137 in calloc (/home/user/linux/tools/perf/perf+0x4f4137) #1 0xbe3d56 in zalloc /home/user/linux/tools/lib/perf/../../lib/zalloc.c:8:9 #2 0xbd77e0 in perf_evsel__alloc_id /home/user/linux/tools/lib/perf/evsel.c:365:14 #3 0x8ae201 in perf_session__read_header /home/user/linux/tools/perf/util/header.c:3871:7 #4 0x8ec714 in perf_session__open /home/user/linux/tools/perf/util/session.c:109:6 #5 0x8ebe83 in perf_session__new /home/user/linux/tools/perf/util/session.c:213:10 #6 0x60c6de in cmd_script /home/user/linux/tools/perf/builtin-script.c:3856:12 #7 0x7b2930 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #8 0x7b120f in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #9 0x7b2493 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #10 0x7b0c89 in main /home/user/linux/tools/perf/perf.c:539:3 #11 0x7f5260654b74 (/lib64/libc.so.6+0x27b74) Indirect leak of 7 byte(s) in 1 object(s) allocated from: #0 0x4b8207 in strdup (/home/user/linux/tools/perf/perf+0x4b8207) #1 0x8b4459 in evlist__set_event_name /home/user/linux/tools/perf/util/header.c:2292:16 #2 0x89d862 in process_event_desc /home/user/linux/tools/perf/util/header.c:2313:3 #3 0x8af319 in perf_file_section__process /home/user/linux/tools/perf/util/header.c:3651:9 #4 0x8aa6e9 in perf_header__process_sections /home/user/linux/tools/perf/util/header.c:3427:9 #5 0x8ae3e7 in perf_session__read_header /home/user/linux/tools/perf/util/header.c:3886:2 #6 0x8ec714 in perf_session__open /home/user/linux/tools/perf/util/session.c:109:6 #7 0x8ebe83 in perf_session__new /home/user/linux/tools/perf/util/session.c:213:10 #8 0x60c6de in cmd_script /home/user/linux/tools/perf/builtin-script.c:3856:12 #9 0x7b2930 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #10 0x7b120f in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #11 0x7b2493 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #12 0x7b0c89 in main /home/user/linux/tools/perf/perf.c:539:3 #13 0x7f5260654b74 (/lib64/libc.so.6+0x27b74) SUMMARY: AddressSanitizer: 3728 byte(s) leaked in 7 allocation(s). Signed-off-by: Riccardo Mancini Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210624231926.212208-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 6de249d66d2e7881b0cefe7f5c9c8b5385f6c15f Author: Riccardo Mancini Date: Fri Jun 25 00:34:22 2021 +0200 perf annotate: Allow 's' on source code lines In perf annotate, when 's' is pressed on a line containing source code, it shows the message "Only available for assembly lines". This patch gets rid of the error, moving the cursr to the next available asm line (or the closest previous one if no asm line is found moving forwards), before hiding source code lines. Changes in v2: - handle case of no asm line found in annotate_browser__find_next_asm_line by returning NULL and handling error in caller. Signed-off-by: Riccardo Mancini Tested-by: Arnaldo Carvalho de Melo Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210624223423.189550-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit ec4c00fedbf3e713776d2776e88a7e4bc61b7efc Author: Adrian Hunter Date: Sun Jun 27 16:18:18 2021 +0300 perf dlfilter: Add object_code() to perf_dlfilter_fns Add a function, for use by dlfilters, to read object code. Signed-off-by: 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/20210627131818.810-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6495e762522d4cf73d0b339830091799881eb025 Author: Adrian Hunter Date: Sun Jun 27 16:18:17 2021 +0300 perf dlfilter: Add attr() to perf_dlfilter_fns Add a function, for use by dlfilters, to return the perf_event_attr structure. Signed-off-by: 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/20210627131818.810-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 244afc0c93205fa144c782562ad3f9435ae4ea93 Author: Adrian Hunter Date: Sun Jun 27 16:18:16 2021 +0300 perf dlfilter: Add srcline() to perf_dlfilter_fns Add a function, for use by dlfilters, to return source code file name and line number. Signed-off-by: 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/20210627131818.810-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e35995effdd3815cad7f0db8360c23d60479122a Author: Adrian Hunter Date: Sun Jun 27 16:18:15 2021 +0300 perf dlfilter: Add insn() to perf_dlfilter_fns Add a function, for use by dlfilters, to return instruction bytes. Signed-off-by: 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/20210627131818.810-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f645744c50806c0453b8d4a806c6347654035053 Author: Adrian Hunter Date: Sun Jun 27 16:18:14 2021 +0300 perf dlfilter: Add resolve_address() to perf_dlfilter_fns Add a function, for use by dlfilters, to resolve addresses from branch stacks or callchains. Signed-off-by: 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/20210627131818.810-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0beb218315e06e888acb576909513087e5d1fa5b Author: Adrian Hunter Date: Sun Jun 27 16:18:13 2021 +0300 perf build: Install perf_dlfilter.h Users of the --dlfilter option need to include perf_dlfilter.h in their filters. Install it to the include path. Signed-off-by: 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/20210627131818.810-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3d032a251605740b75decd3381dc9d496a245ca0 Author: Adrian Hunter Date: Sun Jun 27 16:18:12 2021 +0300 perf script: Add option to pass arguments to dlfilters Add option --dlarg to pass arguments to dlfilters. The --dlarg option can be repeated to pass more than 1 argument. Signed-off-by: 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/20210627131818.810-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 638e2b9984ee1b8d485366f74d579467880283b4 Author: Adrian Hunter Date: Sun Jun 27 16:18:11 2021 +0300 perf script: Add option to list dlfilters Add option --list-dlfilters to list dlfilters in the current directory or the exec-path e.g. ~/libexec/perf-core/dlfilters. Use with option -v (must come before option --list-dlfilters) to show long descriptions. Signed-off-by: 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/20210627131818.810-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9bde93a79a897719f829225d0b541b4b11af2c24 Author: Adrian Hunter Date: Sun Jun 27 16:18:10 2021 +0300 perf script: Add dlfilter__filter_event_early() filter_event_early() can be more than 30% faster than filter_event() because it is called before internal filtering. In other respects it is the same as filter_event(), except that it will be passed events that have yet to be filtered out. Signed-off-by: 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/20210627131818.810-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 291961fc3c28b4c1acfc3b03559aa14c286a6b0d Author: Adrian Hunter Date: Sun Jun 27 16:18:09 2021 +0300 perf script: Add API for filtering via dynamically loaded shared object In some cases, users want to filter very large amounts of data (e.g. from AUX area tracing like Intel PT) looking for something specific. While scripting such as Python can be used, Python is 10 to 20 times slower than C. So define a C API so that custom filters can be written and loaded. Signed-off-by: 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/20210627131818.810-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c435c166dcf526ac827bc964d82cc0d5e7a1fd0b Author: Arnaldo Carvalho de Melo Date: Thu Jul 1 14:20:58 2021 -0300 perf llvm: Return -ENOMEM when asprintf() fails Zhihao sent a patch but it made llvm__compile_bpf() return what asprintf() returns on error, which is just -1, but since this function returns -errno, fix it by returning -ENOMEM for this case instead. Fixes: cb76371441d098 ("perf llvm: Allow passing options to llc ...") Fixes: 5eab5a7ee032ac ("perf llvm: Display eBPF compiling command ...") Reported-by: Hulk Robot Reported-by: Zhihao Cheng Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Ingo Molnar Cc: Jiri Olsa Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Yu Kuai Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20210609115945.2193194-1-chengzhihao1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 0323dea3185a5ca347a5add7cae56ad37465338d Author: James Clark Date: Wed Jun 9 16:04:20 2021 +0300 perf cs-etm: Delay decode of non-timeless data until cs_etm__flush_events() Currently, timeless mode starts the decode on PERF_RECORD_EXIT, and non-timeless mode starts decoding on the fist PERF_RECORD_AUX record. This can cause the "data has no samples!" error if the first PERF_RECORD_AUX record comes before the first (or any relevant) PERF_RECORD_MMAP2 record because the mmaps are required by the decoder to access the binary data. This change pushes the start of non-timeless decoding to the very end of parsing the file. The PERF_RECORD_EXIT event can't be used because it might not exist in system-wide or snapshot modes. I have not been able to find the exact cause for the events to be intermittently in the wrong order in the basic scenario: perf record -e cs_etm/@tmc_etr0/u top But it can be made to happen every time with the --delay option. This is because "enable_on_exec" is disabled, which causes tracing to start before the process to be launched is exec'd. For example: perf record -e cs_etm/@tmc_etr0/u --delay=1 top perf report -D | grep 'AUX\|MAP' 0 16714475632740 0x520 [0x40]: PERF_RECORD_AUX offset: 0 size: 0x30 flags: 0 [] 0 16714476494960 0x5d0 [0x40]: PERF_RECORD_AUX offset: 0x30 size: 0x30 flags: 0 [] 0 16714478208900 0x660 [0x40]: PERF_RECORD_AUX offset: 0x60 size: 0x30 flags: 0 [] 4294967295 16714478293340 0x700 [0x70]: PERF_RECORD_MMAP2 8712/8712: [0x557a460000(0x54000) @ 0 00:17 5329258 0]: r-xp /usr/bin/top 4294967295 16714478353020 0x770 [0x88]: PERF_RECORD_MMAP2 8712/8712: [0x7f86f72000(0x34000) @ 0 00:17 5214354 0]: r-xp /usr/lib/aarch64-linux-gnu/ld-2.31.so Another scenario in which decoding from the first aux record fails is a workload that forks. Although the aux record comes after 'bash', it comes before 'top', which is what we are interested in. For example: perf record -e cs_etm/@tmc_etr0/u -- bash -c top perf report -D | grep 'AUX\|MAP' 4294967295 16853946421300 0x510 [0x70]: PERF_RECORD_MMAP2 8723/8723: [0x558f280000(0x142000) @ 0 00:17 5213953 0]: r-xp /usr/bin/bash 4294967295 16853946543560 0x580 [0x88]: PERF_RECORD_MMAP2 8723/8723: [0x7fbba6e000(0x34000) @ 0 00:17 5214354 0]: r-xp /usr/lib/aarch64-linux-gnu/ld-2.31.so 4294967295 16853946628420 0x608 [0x68]: PERF_RECORD_MMAP2 8723/8723: [0x7fbba9e000(0x1000) @ 0 00:00 0 0]: r-xp [vdso] 0 16853947067300 0x690 [0x40]: PERF_RECORD_AUX offset: 0 size: 0x3a60 flags: 0 [] ... 0 16853966602580 0x1758 [0x40]: PERF_RECORD_AUX offset: 0xc2470 size: 0x30 flags: 0 [] 4294967295 16853967119860 0x1818 [0x70]: PERF_RECORD_MMAP2 8723/8723: [0x5559e70000(0x54000) @ 0 00:17 5329258 0]: r-xp /usr/bin/top 4294967295 16853967181620 0x1888 [0x88]: PERF_RECORD_MMAP2 8723/8723: [0x7f9ed06000(0x34000) @ 0 00:17 5214354 0]: r-xp /usr/lib/aarch64-linux-gnu/ld-2.31.so 4294967295 16853967237180 0x1910 [0x68]: PERF_RECORD_MMAP2 8723/8723: [0x7f9ed36000(0x1000) @ 0 00:00 0 0]: r-xp [vdso] A third scenario is when the majority of time is spent in a shared library that is not loaded at startup. For example a dynamically loaded plugin. Testing ======= Testing was done by checking if any samples that are present in the old output are missing from the new output. Timestamps must be stripped out with awk because now they are set to the last AUX sample, rather than the first: ./perf script $4 | awk '!($4="")' > new.script ./perf-default script $4 | awk '!($4="")' > default.script comm -13 <(sort -u new.script) <(sort -u default.script) Testing showed that the new output is a superset of the old. When lines appear in the comm output, it is not because they are missing but because [unknown] is now resolved to sensible locations. For example last putp branch here now resolves to libtinfo, so it's not missing from the output, but is actually improved: Old: top 305 [001] 1 branches:uH: 402830 _init+0x30 (/usr/bin/top.procps) => 404a1c [unknown] (/usr/bin/top.procps) top 305 [001] 1 branches:uH: 404a20 [unknown] (/usr/bin/top.procps) => 402970 putp@plt+0x0 (/usr/bin/top.procps) top 305 [001] 1 branches:uH: 40297c putp@plt+0xc (/usr/bin/top.procps) => 0 [unknown] ([unknown]) New: top 305 [001] 1 branches:uH: 402830 _init+0x30 (/usr/bin/top.procps) => 404a1c [unknown] (/usr/bin/top.procps) top 305 [001] 1 branches:uH: 404a20 [unknown] (/usr/bin/top.procps) => 402970 putp@plt+0x0 (/usr/bin/top.procps) top 305 [001] 1 branches:uH: 40297c putp@plt+0xc (/usr/bin/top.procps) => 7f8ab39208 putp+0x0 (/lib/libtinfo.so.5.9) In the following two modes, decoding now works and the "data has no samples!" error is not displayed any more: perf record -e cs_etm/@tmc_etr0/u -- bash -c top perf record -e cs_etm/@tmc_etr0/u --delay=1 top In snapshot mode, there is also an improvement to decoding. Previously samples for the 'kill' process that was used to send SIGUSR2 were completely missing, because the process hadn't started yet. But now there are additional samples present: perf record -e cs_etm/@tmc_etr0/u --snapshot -a perf script stress 19380 [003] 161627.938153: 1000000 instructions:uH: aaaabb612fb4 [unknown] (/usr/bin/stress) kill 19644 [000] 161627.938153: 1000000 instructions:uH: ffffae0ef210 [unknown] (/lib/aarch64-linux-gnu/ld-2.27.so) stress 19380 [003] 161627.938153: 1000000 instructions:uH: ffff9e754d40 random_r+0x20 (/lib/aarch64-linux-gnu/libc-2.27.so) Also tested was the round trip of 'perf inject' followed by 'perf report' which has the same differences and improvements. Signed-off-by: James Clark Reviewed-by: Leo Yan Tested-by: Leo Yan Acked-by: Mathieu Poirier Cc: Al Grant Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210609130421.13934-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit f88bb1cb3e5cdf9a59c171bbbac2cfd78b1c3f05 Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 20:04:45 2020 -0300 tools headers UAPI: Synch KVM's svm.h header with the kernel To pick up the changes from: 59d21d67f37481cf ("KVM: SVM: Software reserved fields") Picking the new SVM_EXIT_SW exit reasons. Addressing this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h' diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h Cc: Paolo Bonzini Cc: Vineeth Pillai Signed-off-by: Arnaldo Carvalho de Melo commit 795c4ab87e1912533caee8daf3aad5a4729d4bcc Author: Arnaldo Carvalho de Melo Date: Mon Dec 21 12:53:44 2020 -0300 tools kvm headers arm64: Update KVM headers from the kernel sources To pick the changes from: f0376edb1ddcab19 ("KVM: arm64: Add ioctl to fetch/store tags in a guest") That don't causes 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: Marc Zyngier Cc: Steven Price Signed-off-by: Arnaldo Carvalho de Melo commit e48f62aece16c82ff29a2711f90f61a9199b4cad 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: 19238e75bd8ed8ff ("kvm: x86: Allow userspace to handle emulation errors") cb082bfab59a224a ("KVM: stats: Add fd-based API to read binary stats data") b87cc116c7e1bc62 ("KVM: PPC: Book3S HV: Add KVM_CAP_PPC_RPT_INVALIDATE capability") f0376edb1ddcab19 ("KVM: arm64: Add ioctl to fetch/store tags in a guest") 0dbb11230437895f ("KVM: X86: Introduce KVM_HC_MAP_GPA_RANGE hypercall") 6dba940352038b56 ("KVM: x86: Introduce KVM_GET_SREGS2 / KVM_SET_SREGS2") 644f706719f0297b ("KVM: x86: hyper-v: Introduce KVM_CAP_HYPERV_ENFORCE_CPUID") That automatically adds support for these new ioctls: $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after --- before 2021-07-01 13:42:07.006387354 -0300 +++ after 2021-07-01 13:45:16.051649301 -0300 @@ -95,6 +95,9 @@ [0xc9] = "XEN_HVM_SET_ATTR", [0xca] = "XEN_VCPU_GET_ATTR", [0xcb] = "XEN_VCPU_SET_ATTR", + [0xcc] = "GET_SREGS2", + [0xcd] = "SET_SREGS2", + [0xce] = "GET_STATS_FD", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ 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 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: Aaron Lewis Cc: Ashish Kalra Cc: Bharata B Rao Cc: Jing Zhang Cc: Marc Zyngier Cc: Maxim Levitsky Cc: Michael Ellerman Cc: Paolo Bonzini Cc: Steven Price Cc: Vitaly Kuznetsov Signed-off-by: Arnaldo Carvalho de Melo commit cc200a7de996fd829d18d59df861bb78d9c8a446 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: 1348924ba8169f35 ("x86/msr: Define new bits in TSX_FORCE_ABORT MSR") cbcddaa33d7e11a0 ("perf/x86/rapl: Use CPUID bit on AMD and Hygon parts") 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: Andrew Cooper Cc: Borislav Petkov Cc: Pawan Gupta Signed-off-by: Arnaldo Carvalho de Melo commit 14c6ef2b559688e04bec376e0778d9484dc9bd4d Author: Arnaldo Carvalho de Melo Date: Thu Jul 1 13:34:38 2021 -0300 tools include UAPI: Update linux/mount.h copy To pick the changes from: dd8b477f9a3d8edb ("mount: Support "nosymfollow" in new mount api") That ends up adding support for the new MOUNT_ATTR_NOSYMFOLLOW mount attribute: $ tools/perf/trace/beauty/fsmount.sh > before $ cp include/uapi/linux/mount.h tools/include/uapi/linux/mount.h $ tools/perf/trace/beauty/fsmount.sh > after $ diff -u before after --- before 2021-07-01 13:34:04.542517355 -0300 +++ after 2021-07-01 13:34:12.423694537 -0300 @@ -7,4 +7,5 @@ [ilog2(0x00000020) + 1] = "STRICTATIME", [ilog2(0x00000080) + 1] = "NODIRATIME", [ilog2(0x00100000) + 1] = "IDMAP", + [ilog2(0x00200000) + 1] = "NOSYMFOLLOW", }; $ So now one can use it in --filter expressions for tracepoints. This silences this perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/linux/mount.h' differs from latest version at 'include/uapi/linux/mount.h' diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h Cc: Christian Brauner Signed-off-by: Arnaldo Carvalho de Melo commit 04df0dc1189ab5c5c9406106b23127d3b8c9f056 Author: Arnaldo Carvalho de Melo Date: Thu Jul 1 13:32:18 2021 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: 1348924ba8169f35 ("x86/msr: Define new bits in TSX_FORCE_ABORT MSR") That cause no changes to tooling: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after $ Just silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h' diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Cc: Borislav Petkov Cc: Pawan Gupta Signed-off-by: Arnaldo Carvalho de Melo commit 8941ba502f74d72c40feffc1620e1b7b878b052b Author: Leo Yan Date: Wed May 19 15:19:39 2021 +0800 perf arm-spe: Don't wait for PERF_RECORD_EXIT event When decode Arm SPE trace, it waits for PERF_RECORD_EXIT event (the last perf event) for processing trace data, which is needless and even might cause logic error, e.g. it might fail to correlate perf events with Arm SPE events correctly. So this patch removes the condition checking for PERF_RECORD_EXIT event. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Dave Martin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20210519071939.1598923-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit afb5e9e47faf53e0f557e22979076dc1a94ef3d7 Author: Leo Yan Date: Wed May 19 15:19:38 2021 +0800 perf arm-spe: Bail out if the trace is later than perf event It's possible that record in Arm SPE trace is later than perf event and vice versa. This asks to correlate the perf events and Arm SPE synthesized events to be processed in the manner of correct timing. To achieve the time ordering, this patch reverses the flow, it firstly calls arm_spe_sample() and then calls arm_spe_decode(). By comparing the timestamp value and detect the perf event is coming earlier than Arm SPE trace data, it bails out from the decoding loop, the last record is pushed into auxtrace stack and is deferred to generate sample. To track the timestamp, everytime it updates timestamp for the latest record. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Dave Martin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519071939.1598923-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 85498f756f015e3ae89dbe0c94480ad76929752a Author: Leo Yan Date: Wed May 19 15:19:37 2021 +0800 perf arm-spe: Assign kernel time to synthesized event In current code, it assigns the arch timer counter to the synthesized samples Arm SPE trace, thus the samples don't contain the kernel time but only contain the raw counter value. To fix the issue, this patch converts the timer counter to kernel time and assigns it to sample timestamp. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Dave Martin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519071939.1598923-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 630519014c7b5abc544d93e07ad6e9328098bf68 Author: Leo Yan Date: Wed May 19 15:19:36 2021 +0800 perf arm-spe: Convert event kernel time to counter value When handle a perf event, Arm SPE decoder needs to decide if this perf event is earlier or later than the samples from Arm SPE trace data; to do comparision, it needs to use the same unit for the time. This patch converts the event kernel time to arch timer's counter value, thus it can be used to compare with counter value contained in Arm SPE Timestamp packet. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Dave Martin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519071939.1598923-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit c210c3069636d830bc81f438711f0ad4a1602805 Author: Leo Yan Date: Wed May 19 15:19:35 2021 +0800 perf arm-spe: Save clock parameters from TIME_CONV event During the recording phase, "perf record" tool synthesizes event PERF_RECORD_TIME_CONV for the hardware clock parameters and saves the event into the data file. Afterwards, when processing the data file, the event TIME_CONV will be processed at the very early time and is stored into session context. This patch extracts these parameters from the session context and saves into the structure "spe->tc" with the type perf_tsc_conversion, so that the parameters are ready for conversion between clock counter and time stamp. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Dave Martin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519071939.1598923-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 2f01c200d4405c4562e45e8bb4de44a5ce37b217 Author: Leo Yan Date: Thu Jul 1 17:35:36 2021 +0800 perf cs-etm: Remove callback cs_etm_find_snapshot() The callback cs_etm_find_snapshot() is invoked for snapshot mode, its main purpose is to find the correct AUX trace data and returns "head" and "old" (we can call "old" as "old head") to the caller, the caller __auxtrace_mmap__read() uses these two pointers to decide the AUX trace data size. This patch removes cs_etm_find_snapshot() with below reasons: - The first thing in cs_etm_find_snapshot() is to check if the head has wrapped around, if it is not, directly bails out. The checking is pointless, this is because the "head" and "old" pointers both are monotonical increasing so they never wrap around. - cs_etm_find_snapshot() adjusts the "head" and "old" pointers and assumes the AUX ring buffer is fully filled with the hardware trace data, so it always subtracts the difference "mm->len" from "head" to get "old". Let's imagine the snapshot is taken in very short interval, the tracers only fill a small chunk of the trace data into the AUX ring buffer, in this case, it's wrongly to copy the whole the AUX ring buffer to perf file. - As the "head" and "old" pointers are monotonically increased, the function __auxtrace_mmap__read() handles these two pointers properly. It calculates the reminders for these two pointers, and the size is clamped to be never more than "snapshot_size". We can simply reply on the function __auxtrace_mmap__read() to calculate the correct result for data copying, it's not necessary to add Arm CoreSight specific callback. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Daniel Kiss Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: http://lore.kernel.org/lkml/20210701093537.90759-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit d6a735ef3277c45f48c911b98669174bc4b650d9 Author: Namhyung Kim Date: Fri Jun 25 00:18:25 2021 -0700 perf bpf_counter: Move common functions to bpf_counter.h Some helper functions will be used for cgroup counting too. Move them to a header file for sharing. Committer notes: Fix the build on older systems with: - struct bpf_map_info map_info = {0}; + struct bpf_map_info map_info = { .id = 0, }; This wasn't breaking the build in such systems as bpf_counter.c isn't built due to: tools/perf/util/Build: perf-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o The bpf_counter.h file on the other hand is included from places that are built everywhere. Signed-off-by: Namhyung Kim Acked-by: Song Liu Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210625071826.608504-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 911a2997a5b7c16b27dfe83d8e2f614e44d90f74 Merge: a6ecc2a491e37 8b0ed8443ae64 Author: Linus Torvalds Date: Thu Jul 1 12:06:39 2021 -0700 Merge tag 'fs_for_v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull misc fs updates from Jan Kara: "The new quotactl_fd() syscall (remake of quotactl_path() syscall that got introduced & disabled in 5.13 cycle), and couple of udf, reiserfs, isofs, and writeback fixes and cleanups" * tag 'fs_for_v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: writeback: fix obtain a reference to a freeing memcg css quota: remove unnecessary oom message isofs: remove redundant continue statement quota: Wire up quotactl_fd syscall quota: Change quotactl_path() systcall to an fd-based one reiserfs: Remove unneed check in reiserfs_write_full_page() udf: Fix NULL pointer dereference in udf_symlink function reiserfs: add check for invalid 1st journal block commit 5e437416ff66981d8154687cfdf7de50b1d82bfc Merge: b71d09871566a 953b0dcbe2e3f Author: David S. Miller Date: Thu Jul 1 11:51:36 2021 -0700 Merge branch 'dsa-mv88e6xxx-topaz-fixes' Marek Behún says: ==================== dsa: mv88e6xxx: Topaz fixes here comes some fixes for the Topaz family (Marvell 88E6141 / 88E6341) which I found out about when I compared the Topaz' operations structure with that one of Peridot (6390). This is v2. In v1, I accidentally sent patches generated from wrong branch and the 5th patch does not contain a necessary change in serdes.c. Changes from v1: - the fifth patch, "enable SerDes RX stats for Topaz", needs another change in serdes.c - Andrew's Reviewed-by to 1,2,3,4 and 6 ==================== Signed-off-by: David S. Miller commit 953b0dcbe2e3f7bee98cc3bca2ec82c8298e9c16 Author: Marek Behún Date: Thu Jul 1 00:22:31 2021 +0200 net: dsa: mv88e6xxx: enable SerDes PCS register dump via ethtool -d on Topaz Commit bf3504cea7d7e ("net: dsa: mv88e6xxx: Add 6390 family PCS registers to ethtool -d") added support for dumping SerDes PCS registers via ethtool -d for Peridot. The same implementation is also valid for Topaz, but was not enabled at the time. Signed-off-by: Marek Behún Fixes: bf3504cea7d7e ("net: dsa: mv88e6xxx: Add 6390 family PCS registers to ethtool -d") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a03b98d68367b18e5db6d6850e2cc18754fba94a Author: Marek Behún Date: Thu Jul 1 00:22:30 2021 +0200 net: dsa: mv88e6xxx: enable SerDes RX stats for Topaz Commit 0df952873636a ("mv88e6xxx: Add serdes Rx statistics") added support for RX statistics on SerDes ports for Peridot. This same implementation is also valid for Topaz, but was not enabled at the time. We need to use the generic .serdes_get_lane() method instead of the Peridot specific one in the stats methods so that on Topaz the proper one is used. Signed-off-by: Marek Behún Fixes: 0df952873636a ("mv88e6xxx: Add serdes Rx statistics") Signed-off-by: David S. Miller commit c07fff3492acae41cedbabea395b644dd5872b8c Author: Marek Behún Date: Thu Jul 1 00:22:29 2021 +0200 net: dsa: mv88e6xxx: enable devlink ATU hash param for Topaz Commit 23e8b470c7788 ("net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.") introduced ATU hash algorithm access via devlink, but did not enable it for Topaz. Enable this feature also for Topaz. Signed-off-by: Marek Behún Fixes: 23e8b470c7788 ("net: dsa: mv88e6xxx: Add devlink param for ATU hash algorithm.") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3709488790022c85720f991bff50d48ed5a36e6a Author: Marek Behún Date: Thu Jul 1 00:22:28 2021 +0200 net: dsa: mv88e6xxx: enable .rmu_disable() on Topaz Commit 9e5baf9b36367 ("net: dsa: mv88e6xxx: add RMU disable op") introduced .rmu_disable() method with implementation for several models, but forgot to add Topaz, which can use the Peridot implementation. Use the Peridot implementation of .rmu_disable() on Topaz. Signed-off-by: Marek Behún Fixes: 9e5baf9b36367 ("net: dsa: mv88e6xxx: add RMU disable op") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 11527f3c4725640e6c40a2b7654e303f45e82a6c Author: Marek Behún Date: Thu Jul 1 00:22:27 2021 +0200 net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz Commit 40cff8fca9e3 ("net: dsa: mv88e6xxx: Fix stats histogram mode") introduced wrong .stats_set_histogram() method for Topaz family. The Peridot method should be used instead. Signed-off-by: Marek Behún Fixes: 40cff8fca9e3 ("net: dsa: mv88e6xxx: Fix stats histogram mode") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7da467d82d1ed4fb317aff836f99709169e73f10 Author: Marek Behún Date: Thu Jul 1 00:22:26 2021 +0200 net: dsa: mv88e6xxx: enable .port_set_policy() on Topaz Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") introduced .port_set_policy() method with implementation for several models, but forgot to add Topaz, which can use the 6352 implementation. Use the 6352 implementation of .port_set_policy() on Topaz. Signed-off-by: Marek Behún Fixes: f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1d11fa231cabeae09a95cb3e4cf1d9dd34e00f08 Author: Xin Long Date: Tue Jun 29 23:34:08 2021 -0400 sctp: move 198 addresses from unusable to private scope The doc draft-stewart-tsvwg-sctp-ipv4-00 that restricts 198 addresses was never published. These addresses as private addresses should be allowed to use in SCTP. As Michael Tuexen suggested, this patch is to move 198 addresses from unusable to private scope. Reported-by: Sérgio Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 650b2a846dddf33321489597287e6d825ec1d0ba Author: Xin Long Date: Tue Jun 29 23:30:36 2021 -0400 sctp: check pl.raise_count separately from its increment As Marcelo's suggestion this will make code more clear to read. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 5a3c680aa2c12c90c44af383fe6882a39875ab81 Author: Doug Berger Date: Tue Jun 29 17:14:19 2021 -0700 net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear Setting the EXT_ENERGY_DET_MASK bit allows the port energy detection logic of the internal PHY to prevent the system from sleeping. Some internal PHYs will report that energy is detected when the network interface is closed which can prevent the system from going to sleep if WoL is enabled when the interface is brought down. Since the driver does not support waking the system on this logic, this commit clears the bit whenever the internal PHY is powered up and the other logic for manipulating the bit is removed since it serves no useful function. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit b71d09871566a20ae8a1064e50f1e94813b18482 Author: Vladimir Oltean Date: Tue Jun 29 23:32:15 2021 +0300 net: dsa: return -EOPNOTSUPP when driver does not implement .port_lag_join The DSA core has a layered structure, and even though we end up returning 0 (success) to user space when setting a bonding/team upper that can't be offloaded, some parts of the framework actually need to know that we couldn't offload that. For example, if dsa_switch_lag_join returns 0 as it currently does, dsa_port_lag_join has no way to tell a successful offload from a software fallback, and it will call dsa_port_bridge_join afterwards. Then we'll think we're offloading the bridge master of the LAG, when in fact we're not even offloading the LAG. In turn, this will make us set skb->offload_fwd_mark = true, which is incorrect and the bridge doesn't like it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e6a16043fd3f60823835bbbaf7c81c455059a0d4 Merge: dbe69e4337221 5c0512072f651 Author: David S. Miller Date: Thu Jul 1 11:27:57 2021 -0700 Merge branch 'octeopntx2-LMTST-regions' Geetha sowjanya says: ==================== Dynamic LMTST region setup This patch series allows RVU PF/VF to allocate memory for LMTST operations instead of using memory reserved by firmware which is mapped as device memory. The LMTST mapping table contains the RVU PF/VF LMTST memory base address entries. This table is used by hardware for LMTST operations. Patch1 introduces new mailbox message to update the LMTST table with the new allocated memory address. ==================== Signed-off-by: David S. Miller commit 5c0512072f6517326d9fba083c4467f173ddd984 Author: Geetha sowjanya Date: Tue Jun 29 22:30:06 2021 +0530 octeontx2-pf: cn10k: Use runtime allocated LMTLINE region The current driver uses static LMTST region allocated by firmware. This memory gets populated as PF/VF BAR2. RVU PF/VF driver ioremap the memory as device memory for NIX/NPA operation. Since the memory is mapped as device memory we see performance degration. To address this issue this patch implements runtime memory allocation. RVU PF/VF allocates memory during device probe and share the base address with RVU AF. RVU AF then configure the LMT MAP table accordingly. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 893ae97214c385be02f8ec097298cc48c7f0d905 Author: Geetha sowjanya Date: Tue Jun 29 22:30:05 2021 +0530 octeontx2-af: cn10k: Support configurable LMTST regions This patch extends the lmtst_tbl_setup_req mbox to support run time LMTST configuration. RVU PF/VF and DPDK/ODP allocates a LMT region, creates a translation entry for a device via VFIO IOCTLs. This IOVA is shared with AF through above mbox. AF then uses RVU_SMMU transulation Widget and gets PA for the IOVA and updates the LMTtable entry for that device. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 873a1e3d207ae587a7a1cc1d84545146b449ea5d Author: Harman Kalra Date: Tue Jun 29 22:30:04 2021 +0530 octeontx2-af: cn10k: Setting up lmtst map table Introducing a new mailbox to support updating lmt entries and common lmt base address scheme i.e. multiple pcifuncs can share lmt region to reduce L1 cache pressure for application. Parameters passed to mailbox includes the primary pcifunc value whose lmt regions will be shared by other secondary pcifuncs. Here secondary pcifunc will be the one who is calling the mailbox. For example: By default each pcifunc has its own LMT base address: PCIFUNC1 LMT_BASE_ADDR A PCIFUNC2 LMT_BASE_ADDR B PCIFUNC3 LMT_BASE_ADDR C PCIFUNC4 LMT_BASE_ADDR D Application will choose PCIFUNC1 as base/primary pcifunc and as and when other pcifunc(secondary pcifuncs) gets probed, this mailbox will be called and LMTST table will be updated as: PCIFUNC1 LMT_BASE_ADDR A PCIFUNC2 LMT_BASE_ADDR A PCIFUNC3 LMT_BASE_ADDR A PCIFUNC4 LMT_BASE_ADDR A On FLR lmtst map table gets resetted to the default lmt base addresses for all secondary pcifuncs. Signed-off-by: Harman Kalra Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 0dbffbb5335a1e3aa6855e4ee317e25e669dd302 Author: Eric Dumazet Date: Tue Jun 29 07:12:45 2021 -0700 net: annotate data race around sk_ll_usec sk_ll_usec is read locklessly from sk_can_busy_loop() while another thread can change its value in sock_setsockopt() This is correct but needs annotations. BUG: KCSAN: data-race in __skb_try_recv_datagram / sock_setsockopt write to 0xffff88814eb5f904 of 4 bytes by task 14011 on cpu 0: sock_setsockopt+0x1287/0x2090 net/core/sock.c:1175 __sys_setsockopt+0x14f/0x200 net/socket.c:2100 __do_sys_setsockopt net/socket.c:2115 [inline] __se_sys_setsockopt net/socket.c:2112 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2112 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88814eb5f904 of 4 bytes by task 14001 on cpu 1: sk_can_busy_loop include/net/busy_poll.h:41 [inline] __skb_try_recv_datagram+0x14f/0x320 net/core/datagram.c:273 unix_dgram_recvmsg+0x14c/0x870 net/unix/af_unix.c:2101 unix_seqpacket_recvmsg+0x5a/0x70 net/unix/af_unix.c:2067 ____sys_recvmsg+0x15d/0x310 include/linux/uio.h:244 ___sys_recvmsg net/socket.c:2598 [inline] do_recvmmsg+0x35c/0x9f0 net/socket.c:2692 __sys_recvmmsg net/socket.c:2771 [inline] __do_sys_recvmmsg net/socket.c:2794 [inline] __se_sys_recvmmsg net/socket.c:2787 [inline] __x64_sys_recvmmsg+0xcf/0x150 net/socket.c:2787 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x00000000 -> 0x00000101 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 14001 Comm: syz-executor.3 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 42ca63f980842918560b25f0244307fd83b4777c Author: Yang Yingliang Date: Tue Jun 29 19:53:28 2021 +0800 net/802/garp: fix memleak in garp_request_join() I got kmemleak report when doing fuzz test: BUG: memory leak unreferenced object 0xffff88810c909b80 (size 64): comm "syz", pid 957, jiffies 4295220394 (age 399.090s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 08 00 00 00 01 02 00 04 ................ backtrace: [<00000000ca1f2e2e>] garp_request_join+0x285/0x3d0 [<00000000bf153351>] vlan_gvrp_request_join+0x15b/0x190 [<0000000024005e72>] vlan_dev_open+0x706/0x980 [<00000000dc20c4d4>] __dev_open+0x2bb/0x460 [<0000000066573004>] __dev_change_flags+0x501/0x650 [<0000000035b42f83>] rtnl_configure_link+0xee/0x280 [<00000000a5e69de0>] __rtnl_newlink+0xed5/0x1550 [<00000000a5258f4a>] rtnl_newlink+0x66/0x90 [<00000000506568ee>] rtnetlink_rcv_msg+0x439/0xbd0 [<00000000b7eaeae1>] netlink_rcv_skb+0x14d/0x420 [<00000000c373ce66>] netlink_unicast+0x550/0x750 [<00000000ec74ce74>] netlink_sendmsg+0x88b/0xda0 [<00000000381ff246>] sock_sendmsg+0xc9/0x120 [<000000008f6a2db3>] ____sys_sendmsg+0x6e8/0x820 [<000000008d9c1735>] ___sys_sendmsg+0x145/0x1c0 [<00000000aa39dd8b>] __sys_sendmsg+0xfe/0x1d0 Calling garp_request_leave() after garp_request_join(), the attr->state is set to GARP_APPLICANT_VO, garp_attr_destroy() won't be called in last transmit event in garp_uninit_applicant(), the attr of applicant will be leaked. To fix this leak, iterate and free each attr of applicant before rerturning from garp_uninit_applicant(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 4030a6e6a6a4a42ff8c18414c9e0c93e24cc70b8 Author: Paul Burton Date: Thu Jul 1 10:24:07 2021 -0700 tracing: Resize tgid_map to pid_max, not PID_MAX_DEFAULT Currently tgid_map is sized at PID_MAX_DEFAULT entries, which means that on systems where pid_max is configured higher than PID_MAX_DEFAULT the ftrace record-tgid option doesn't work so well. Any tasks with PIDs higher than PID_MAX_DEFAULT are simply not recorded in tgid_map, and don't show up in the saved_tgids file. In particular since systemd v243 & above configure pid_max to its highest possible 1<<22 value by default on 64 bit systems this renders the record-tgids option of little use. Increase the size of tgid_map to the configured pid_max instead, allowing it to cover the full range of PIDs up to the maximum value of PID_MAX_LIMIT if the system is configured that way. On 64 bit systems with pid_max == PID_MAX_LIMIT this will increase the size of tgid_map from 256KiB to 16MiB. Whilst this 64x increase in memory overhead sounds significant 64 bit systems are presumably best placed to accommodate it, and since tgid_map is only allocated when the record-tgid option is actually used presumably the user would rather it spends sufficient memory to actually record the tgids they expect. The size of tgid_map could also increase for CONFIG_BASE_SMALL=y configurations, but these seem unlikely to be systems upon which people are both configuring a large pid_max and running ftrace with record-tgid anyway. Of note is that we only allocate tgid_map once, the first time that the record-tgid option is enabled. Therefore its size is only set once, to the value of pid_max at the time the record-tgid option is first enabled. If a user increases pid_max after that point, the saved_tgids file will not contain entries for any tasks with pids beyond the earlier value of pid_max. Link: https://lkml.kernel.org/r/20210701172407.889626-2-paulburton@google.com Fixes: d914ba37d714 ("tracing: Add support for recording tgid of tasks") Cc: Ingo Molnar Cc: Joel Fernandes Cc: Signed-off-by: Paul Burton [ Fixed comment coding style ] Signed-off-by: Steven Rostedt (VMware) commit a34dcbfa1475f18a8f1b1dc3dedb76d746874e61 Author: Dan Carpenter Date: Tue Jun 29 11:19:44 2021 +0300 sctp: prevent info leak in sctp_make_heartbeat() The "hbinfo" struct has a 4 byte hole at the end so we have to zero it out to prevent stack information from being disclosed. Fixes: fe59379b9ab7 ("sctp: do the basic send and recv for PLPMTUD probe") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 996af62167d0e0ec69b938a3561e96f84ffff1aa Author: Yang Yingliang Date: Tue Jun 29 15:22:37 2021 +0800 net/802/mrp: fix memleak in mrp_request_join() I got kmemleak report when doing fuzz test: BUG: memory leak unreferenced object 0xffff88810c239500 (size 64): comm "syz-executor940", pid 882, jiffies 4294712870 (age 14.631s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 01 00 00 00 01 02 00 04 ................ backtrace: [<00000000a323afa4>] slab_alloc_node mm/slub.c:2972 [inline] [<00000000a323afa4>] slab_alloc mm/slub.c:2980 [inline] [<00000000a323afa4>] __kmalloc+0x167/0x340 mm/slub.c:4130 [<000000005034ca11>] kmalloc include/linux/slab.h:595 [inline] [<000000005034ca11>] mrp_attr_create net/802/mrp.c:276 [inline] [<000000005034ca11>] mrp_request_join+0x265/0x550 net/802/mrp.c:530 [<00000000fcfd81f3>] vlan_mvrp_request_join+0x145/0x170 net/8021q/vlan_mvrp.c:40 [<000000009258546e>] vlan_dev_open+0x477/0x890 net/8021q/vlan_dev.c:292 [<0000000059acd82b>] __dev_open+0x281/0x410 net/core/dev.c:1609 [<000000004e6dc695>] __dev_change_flags+0x424/0x560 net/core/dev.c:8767 [<00000000471a09af>] rtnl_configure_link+0xd9/0x210 net/core/rtnetlink.c:3122 [<0000000037a4672b>] __rtnl_newlink+0xe08/0x13e0 net/core/rtnetlink.c:3448 [<000000008d5d0fda>] rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3488 [<000000004882fe39>] rtnetlink_rcv_msg+0x369/0xa10 net/core/rtnetlink.c:5552 [<00000000907e6c54>] netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2504 [<00000000e7d7a8c4>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] [<00000000e7d7a8c4>] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1340 [<00000000e0645d50>] netlink_sendmsg+0x78e/0xc90 net/netlink/af_netlink.c:1929 [<00000000c24559b7>] sock_sendmsg_nosec net/socket.c:654 [inline] [<00000000c24559b7>] sock_sendmsg+0x139/0x170 net/socket.c:674 [<00000000fc210bc2>] ____sys_sendmsg+0x658/0x7d0 net/socket.c:2350 [<00000000be4577b5>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2404 Calling mrp_request_leave() after mrp_request_join(), the attr->state is set to MRP_APPLICANT_VO, mrp_attr_destroy() won't be called in last TX event in mrp_uninit_applicant(), the attr of applicant will be leaked. To fix this leak, iterate and free each attr of applicant before rerturning from mrp_uninit_applicant(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit b18114476a1432ad1db5d5605bc8cd131814d264 Author: Baowen Zheng Date: Tue Jun 29 09:22:11 2021 +0200 openvswitch: Optimize operation for key comparison In the current implement when comparing two flow keys, we will return result after comparing the whole key from start to end. In our optimization, we will return result in the first none-zero comparison, then we will improve the flow table looking up efficiency. Signed-off-by: Baowen Zheng Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit a3609ac24c18947737f5bc1746b8735814c521d1 Author: Oleksij Rempel Date: Tue Jun 29 06:43:05 2021 +0200 net: usb: asix: ax88772: suspend PHY on driver probe After probe/bind sequence is the PHY in active state, even if interface is stopped. As result, on some systems like Samsung Exynos5250 SoC based Arndale board, the ASIX PHY will be able to negotiate the link but fail to transmit the data. To handle it, suspend the PHY on probe. Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support") Signed-off-by: Oleksij Rempel Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: David S. Miller commit b869d5be0acf0e125e69adcffdca04000dc5b17c Author: Manfred Spraul Date: Wed Jun 30 18:57:18 2021 -0700 ipc/util.c: use binary search for max_idx If semctl(), msgctl() and shmctl() are called with IPC_INFO, SEM_INFO, MSG_INFO or SHM_INFO, then the return value is the index of the highest used index in the kernel's internal array recording information about all SysV objects of the requested type for the current namespace. (This information can be used with repeated ..._STAT or ..._STAT_ANY operations to obtain information about all SysV objects on the system.) There is a cache for this value. But when the cache needs up be updated, then the highest used index is determined by looping over all possible values. With the introduction of IPCMNI_EXTEND_SHIFT, this could be a loop over 16 million entries. And due to /proc/sys/kernel/*next_id, the index values do not need to be consecutive. With , msgget(), msgctl(,IPC_RMID) in a loop, I have observed a performance increase of around factor 13000. As there is no get_last() function for idr structures: Implement a "get_last()" using a binary search. As far as I see, ipc is the only user that needs get_last(), thus implement it in ipc/util.c and not in a central location. [akpm@linux-foundation.org: tweak comment, fix typo] Link: https://lkml.kernel.org/r/20210425075208.11777-2-manfred@colorfullife.com Signed-off-by: Manfred Spraul Acked-by: Davidlohr Bueso Cc: <1vier1@web.de> Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17d056e0bdaab3d3f1fbec1ac154addcc4183aed Author: Manfred Spraul Date: Wed Jun 30 18:57:15 2021 -0700 ipc/sem.c: use READ_ONCE()/WRITE_ONCE() for use_global_lock The patch solves three weaknesses in ipc/sem.c: 1) The initial read of use_global_lock in sem_lock() is an intentional race. KCSAN detects these accesses and prints a warning. 2) The code assumes that plain C read/writes are not mangled by the CPU or the compiler. 3) The comment it sysvipc_sem_proc_show() was hard to understand: The rest of the comments in ipc/sem.c speaks about sem_perm.lock, and suddenly this function speaks about ipc_lock_object(). To solve 1) and 2), use READ_ONCE()/WRITE_ONCE(). Plain C reads are used in code that owns sma->sem_perm.lock. The comment is updated to solve 3) [manfred@colorfullife.com: use READ_ONCE()/WRITE_ONCE() for use_global_lock] Link: https://lkml.kernel.org/r/20210627161919.3196-3-manfred@colorfullife.com Link: https://lkml.kernel.org/r/20210514175319.12195-1-manfred@colorfullife.com Signed-off-by: Manfred Spraul Reviewed-by: Paul E. McKenney Reviewed-by: Davidlohr Bueso Cc: <1vier1@web.de> Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bc8136a543aa839a848b49af5e101ac6de5f6b27 Author: Vasily Averin Date: Wed Jun 30 18:57:12 2021 -0700 ipc: use kmalloc for msg_queue and shmid_kernel msg_queue and shmid_kernel are quite small objects, no need to use kvmalloc for them. mhocko@: "Both of them are 256B on most 64b systems." Previously these objects was allocated via ipc_alloc/ipc_rcu_alloc(), common function for several ipc objects. It had kvmalloc call inside(). Later, this function went away and was finally replaced by direct kvmalloc call, and now we can use more suitable kmalloc/kfree for them. Link: https://lkml.kernel.org/r/0d0b6c9b-8af3-29d8-34e2-a565c53780f3@virtuozzo.com Reported-by: Alexey Dobriyan Signed-off-by: Vasily Averin Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc37a3b8b4388e73e8e3525556d9f1feeb232bb9 Author: Vasily Averin Date: Wed Jun 30 18:57:09 2021 -0700 ipc sem: use kvmalloc for sem_undo allocation Patch series "ipc: allocations cleanup", v2. Some ipc objects use the wrong allocation functions: small objects can use kmalloc(), and vice versa, potentially large objects can use kmalloc(). This patch (of 2): Size of sem_undo can exceed one page and with the maximum possible nsems = 32000 it can grow up to 64Kb. Let's switch its allocation to kvmalloc to avoid user-triggered disruptive actions like OOM killer in case of high-order memory shortage. User triggerable high order allocations are quite a problem on heavily fragmented systems. They can be a DoS vector. Link: https://lkml.kernel.org/r/ebc3ac79-3190-520d-81ce-22ad194986ec@virtuozzo.com Link: https://lkml.kernel.org/r/a6354fd9-2d55-2e63-dd4d-fa7dc1d11134@virtuozzo.com Signed-off-by: Vasily Averin Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Alexey Dobriyan Cc: Davidlohr Bueso Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Johannes Weiner Cc: Manfred Spraul Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b52348345b2cfe038d317de52bcdef788c6520d Author: Yu Kuai Date: Wed Jun 30 18:57:06 2021 -0700 lib/decompressors: remove set but not used variabled 'level' Fixes gcc '-Wunused-but-set-variable' warning: lib/decompress_unlzo.c:46:5: warning: variable `level' set but not used [-Wunused-but-set-variable] It is never used and so can be removed. [akpm@linux-foundation.org: warning: value computed is not used] Link: https://lkml.kernel.org/r/20210514062050.3532344-1-yukuai3@huawei.com Fixes: 7dd65feb6c60 ("lib: add support for LZO-compressed kernels") Signed-off-by: Yu Kuai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d892454b6814f07da676dae5e686cf221d34a1af Author: Dave Hansen Date: Wed Jun 30 18:57:03 2021 -0700 selftests/vm/pkeys: exercise x86 XSAVE init state On x86, there is a set of instructions used to save and restore register state collectively known as the XSAVE architecture. There are about a dozen different features managed with XSAVE. The protection keys register, PKRU, is one of those features. The hardware optimizes XSAVE by tracking when the state has not changed from its initial (init) state. In this case, it can avoid the cost of writing state to memory (it would usually just be a bunch of 0's). When the pkey register is 0x0 the hardware optionally choose to track the register as being in the init state (optimize away the writes). AMD CPUs do this more aggressively compared to Intel. On x86, PKRU is rarely in its (very permissive) init state. Instead, the value defaults to something very restrictive. It is not surprising that bugs have popped up in the rare cases when PKRU reaches its init state. Add a protection key selftest which gets the protection keys register into its init state in a way that should work on Intel and AMD. Then, do a bunch of pkey register reads to watch for inadvertent changes. This adds "-mxsave" to CFLAGS for all the x86 vm selftests in order to allow use of the XSAVE instruction __builtin functions. This will make the builtins available on all of the vm selftests, but is expected to be harmless. Link: https://lkml.kernel.org/r/20210611164202.1849B712@viggo.jf.intel.com Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Tested-by: Aneesh Kumar K.V Cc: Ram Pai Cc: Sandipan Das Cc: Florian Weimer Cc: "Desnes A. Nunes do Rosario" Cc: Ingo Molnar Cc: Thiago Jung Bauermann Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Suchanek Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6039ca254979694c5362dfebadd105e286c397bb Author: Dave Hansen Date: Wed Jun 30 18:56:59 2021 -0700 selftests/vm/pkeys: refill shadow register after implicit kernel write The pkey test code keeps a "shadow" of the pkey register around. This ensures that any bugs which might write to the register can be caught more quickly. Generally, userspace has a good idea when the kernel is going to write to the register. For instance, alloc_pkey() is passed a permission mask. The caller of alloc_pkey() can update the shadow based on the return value and the mask. But, the kernel can also modify the pkey register in a more sneaky way. For mprotect(PROT_EXEC) mappings, the kernel will allocate a pkey and write the pkey register to create an execute-only mapping. The kernel never tells userspace what key it uses for this. This can cause the test to fail with messages like: protection_keys_64.2: pkey-helpers.h:132: _read_pkey_reg: Assertion `pkey_reg == shadow_pkey_reg' failed. because the shadow was not updated with the new kernel-set value. Forcibly update the shadow value immediately after an mprotect(). Link: https://lkml.kernel.org/r/20210611164200.EF76AB73@viggo.jf.intel.com Fixes: 6af17cf89e99 ("x86/pkeys/selftests: Add PROT_EXEC test") Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Tested-by: Aneesh Kumar K.V Cc: Ram Pai Cc: Sandipan Das Cc: Florian Weimer Cc: "Desnes A. Nunes do Rosario" Cc: Ingo Molnar Cc: Thiago Jung Bauermann Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Suchanek Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf68294a2ec39ed7fec6a5b45d52034e6983157a Author: Dave Hansen Date: Wed Jun 30 18:56:56 2021 -0700 selftests/vm/pkeys: handle negative sys_pkey_alloc() return code The alloc_pkey() sefltest function wraps the sys_pkey_alloc() system call. On success, it updates its "shadow" register value because sys_pkey_alloc() updates the real register. But, the success check is wrong. pkey_alloc() considers any non-zero return code to indicate success where the pkey register will be modified. This fails to take negative return codes into account. Consider only a positive return value as a successful call. Link: https://lkml.kernel.org/r/20210611164157.87AB4246@viggo.jf.intel.com Fixes: 5f23f6d082a9 ("x86/pkeys: Add self-tests") Reported-by: Thomas Gleixner Signed-off-by: Dave Hansen Tested-by: Aneesh Kumar K.V Cc: Ram Pai Cc: Sandipan Das Cc: Florian Weimer Cc: "Desnes A. Nunes do Rosario" Cc: Ingo Molnar Cc: Thiago Jung Bauermann Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Suchanek Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f36ef407628835a7d7fb3d235b1f1aac7022d9a3 Author: Dave Hansen Date: Wed Jun 30 18:56:53 2021 -0700 selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random Patch series "selftests/vm/pkeys: Bug fixes and a new test". There has been a lot of activity on the x86 front around the XSAVE architecture which is used to context-switch processor state (among other things). In addition, AMD has recently joined the protection keys club by adding processor support for PKU. The AMD implementation helped uncover a kernel bug around the PKRU "init state", which actually applied to Intel's implementation but was just harder to hit. This series adds a test which is expected to help find this class of bug both on AMD and Intel. All the work around pkeys on x86 also uncovered a few bugs in the selftest. This patch (of 4): The "random" pkey allocation code currently does the good old: srand((unsigned int)time(NULL)); *But*, it unfortunately does this on every random pkey allocation. There may be thousands of these a second. time() has a one second resolution. So, each time alloc_random_pkey() is called, the PRNG is *RESET* to time(). This is nasty. Normally, if you do: srand(); foo = rand(); bar = rand(); You'll be quite guaranteed that 'foo' and 'bar' are different. But, if you do: srand(1); foo = rand(); srand(1); bar = rand(); You are quite guaranteed that 'foo' and 'bar' are the *SAME*. The recent "fix" effectively forced the test case to use the same "random" pkey for the whole test, unless the test run crossed a second boundary. Only run srand() once at program startup. This explains some very odd and persistent test failures I've been seeing. Link: https://lkml.kernel.org/r/20210611164153.91B76FB8@viggo.jf.intel.com Link: https://lkml.kernel.org/r/20210611164155.192D00FF@viggo.jf.intel.com Fixes: 6e373263ce07 ("selftests/vm/pkeys: fix alloc_random_pkey() to make it really random") Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Tested-by: Aneesh Kumar K.V Cc: Ram Pai Cc: Sandipan Das Cc: Florian Weimer Cc: "Desnes A. Nunes do Rosario" Cc: Ingo Molnar Cc: Thiago Jung Bauermann Cc: Michael Ellerman Cc: Michal Hocko Cc: Michal Suchanek Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 540540d06e9d9b3769b46d88def90f7e7c002322 Author: Marco Elver Date: Wed Jun 30 18:56:49 2021 -0700 kcov: add __no_sanitize_coverage to fix noinstr for all architectures Until now no compiler supported an attribute to disable coverage instrumentation as used by KCOV. To work around this limitation on x86, noinstr functions have their coverage instrumentation turned into nops by objtool. However, this solution doesn't scale automatically to other architectures, such as arm64, which are migrating to use the generic entry code. Clang [1] and GCC [2] have added support for the attribute recently. [1] https://github.com/llvm/llvm-project/commit/280333021e9550d80f5c1152a34e33e81df1e178 [2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cec4d4a6782c9bd8d071839c50a239c49caca689 The changes will appear in Clang 13 and GCC 12. Add __no_sanitize_coverage for both compilers, and add it to noinstr. Note: In the Clang case, __has_feature(coverage_sanitizer) is only true if the feature is enabled, and therefore we do not require an additional defined(CONFIG_KCOV) (like in the GCC case where __has_attribute(..) is always true) to avoid adding redundant attributes to functions if KCOV is off. That being said, compilers that support the attribute will not generate errors/warnings if the attribute is redundantly used; however, where possible let's avoid it as it reduces preprocessed code size and associated compile-time overheads. [elver@google.com: Implement __has_feature(coverage_sanitizer) in Clang] Link: https://lkml.kernel.org/r/20210527162655.3246381-1-elver@google.com [elver@google.com: add comment explaining __has_feature() in Clang] Link: https://lkml.kernel.org/r/20210527194448.3470080-1-elver@google.com Link: https://lkml.kernel.org/r/20210525175819.699786-1-elver@google.com Signed-off-by: Marco Elver Acked-by: Peter Zijlstra (Intel) Reviewed-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Cc: Nick Desaulniers Cc: Kees Cook Cc: Will Deacon Cc: Ard Biesheuvel Cc: Luc Van Oostenryck Cc: Arvind Sankar Cc: Masahiro Yamada Cc: Sami Tolvanen Cc: Arnd Bergmann Cc: Dmitry Vyukov Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bae7702a17e9a29d90a997c266296b44d7b087f0 Author: Alexey Dobriyan Date: Wed Jun 30 18:56:46 2021 -0700 exec: remove checks in __register_bimfmt() Delete NULL check, all callers pass valid pointer. Delete ->load_binary check -- failure to provide hook in a custom module will be very noticeable at the very first execve call. Link: https://lkml.kernel.org/r/YK1Gy1qXaLAR+tPl@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97c885d585c53d3f1ad4545b0ee10f0bdfaa1a4d Author: Al Viro Date: Wed Jun 30 18:56:43 2021 -0700 x86: signal: don't do sas_ss_reset() until we are certain that sigframe won't be abandoned Currently we handle SS_AUTODISARM as soon as we have stored the altstack settings into sigframe - that's the point when we have set the things up for eventual sigreturn to restore the old settings. And if we manage to set the sigframe up (we are not done with that yet), everything's fine. However, in case of failure we end up with sigframe-to-be abandoned and SIGSEGV force-delivered. And in that case we end up with inconsistent rules - late failures have altstack reset, early ones do not. It's trivial to get consistent behaviour - just handle SS_AUTODISARM once we have set the sigframe up and are committed to entering the handler, i.e. in signal_delivered(). Link: https://lore.kernel.org/lkml/20200404170604.GN23230@ZenIV.linux.org.uk/ Link: https://github.com/ClangBuiltLinux/linux/issues/876 Link: https://lkml.kernel.org/r/20210422230846.1756380-1-ndesaulniers@google.com Signed-off-by: Al Viro Signed-off-by: Nick Desaulniers Acked-by: Oleg Nesterov Tested-by: Nathan Chancellor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c3eb84092b326a353725edcc8274a3782f1d1524 Author: Chung-Chiang Cheng Date: Wed Jun 30 18:56:40 2021 -0700 hfsplus: report create_date to kstat.btime The create_date field of inode in hfsplus is corresponding to kstat.btime and could be reported in statx. Link: https://lkml.kernel.org/r/20210416172147.8736-1-cccheng@synology.com Signed-off-by: Chung-Chiang Cheng Reviewed-by: Viacheslav Dubeyko Cc: Christian Brauner Cc: James Morris Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7dcae11f4c5862be62443dabe94e10a07b5639fc Author: Zhen Lei Date: Wed Jun 30 18:56:37 2021 -0700 hfsplus: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Link: https://lkml.kernel.org/r/20210617084944.1279-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4048e5aa148b13da84132cc23b6503b626e2576 Author: Colin Ian King Date: Wed Jun 30 18:56:34 2021 -0700 nilfs2: remove redundant continue statement in a while-loop The continue statement at the end of the while-loop is redundant, remove it. Addresses-Coverity: ("Continue has no effect") Link: https://lkml.kernel.org/r/20210621100519.10257-1-colin.king@canonical.com Link: https://lkml.kernel.org/r/1624557664-17159-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66ce75144d4b33e376f187df3dec495fe47d2ad0 Author: Barry Song Date: Wed Jun 30 18:56:31 2021 -0700 kprobes: remove duplicated strong free_insn_page in x86 and s390 free_insn_page() in x86 and s390 is same with the common weak function in kernel/kprobes.c. Plus, the comment "Recover page to RW mode before releasing it" in x86 seems insensible to be there since resetting mapping is done by common code in vfree() of module_memfree(). So drop these two duplicated strong functions and related comment, then mark the common one in kernel/kprobes.c strong. Link: https://lkml.kernel.org/r/20210608065736.32656-1-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Acked-by: Masami Hiramatsu Acked-by: Heiko Carstens Reviewed-by: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: David S. Miller Cc: Qi Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86d1919a4fb0d9c115dd1d3b969f5d1650e45408 Author: Andrew Halaney Date: Wed Jun 30 18:56:28 2021 -0700 init: print out unknown kernel parameters It is easy to foobar setting a kernel parameter on the command line without realizing it, there's not much output that you can use to assess what the kernel did with that parameter by default. Make it a little more explicit which parameters on the command line _looked_ like a valid parameter for the kernel, but did not match anything and ultimately got tossed to init. This is very similar to the unknown parameter message received when loading a module. This assumes the parameters are processed in a normal fashion, some parameters (dyndbg= for example) don't register their parameter with the rest of the kernel's parameters, and therefore always show up in this list (and are also given to init - like the rest of this list). Another example is BOOT_IMAGE= is highlighted as an offender, which it technically is, but is passed by LILO and GRUB so most systems will see that complaint. An example output where "foobared" and "unrecognized" are intentionally invalid parameters: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.12-dirty debug log_buf_len=4M foobared unrecognized=foo Unknown command line parameters: foobared BOOT_IMAGE=/boot/vmlinuz-5.12-dirty unrecognized=foo Link: https://lkml.kernel.org/r/20210511211009.42259-1-ahalaney@redhat.com Signed-off-by: Andrew Halaney Suggested-by: Steven Rostedt Suggested-by: Borislav Petkov Acked-by: Borislav Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46b85bf96714267ab7855683b40103c9282aaf4e Author: Guenter Roeck Date: Wed Jun 30 18:56:25 2021 -0700 checkpatch: do not complain about positive return values starting with EPOLL checkpatch complains about positive return values of poll functions. Example: WARNING: return of an errno should typically be negative (ie: return -EPOLLIN) + return EPOLLIN; Poll functions return positive values. The defines for the return values of poll functions all start with EPOLL, resulting in a number of false positives. An often used workaround is to assign poll function return values to variables and returning that variable, but that is a less than perfect solution. There is no error definition which starts with EPOLL, so it is safe to omit the warning for return values starting with EPOLL. Link: https://lkml.kernel.org/r/20210622004334.638680-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Acked-by: Joe Perches Cc: Ricardo Ribalda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 690786511b32baba073f729844779172d2ed72b6 Author: Joe Perches Date: Wed Jun 30 18:56:22 2021 -0700 checkpatch: improve the indented label test checkpatch identifies a label only when a terminating colon immediately follows an identifier. Bitfield definitions can appear to be labels so ignore any spaces between the identifier terminating colon and any digit that may be used to define a bitfield length. Miscellanea: o Improve the initial checkpatch comment o Use the more typical '&&' instead of 'and' o Require the initial label character to be a non-digit (Can't use $Ident here because $Ident allows ## concatenation) o Use $sline instead of $line to ignore comments o Use '$sline !~ /.../' instead of '!($line =~ /.../)' Link: https://lkml.kernel.org/r/b54d673e7cde7de5de0c9ba4dd57dd0858580ca4.camel@perches.com Signed-off-by: Joe Perches Cc: Greg Kroah-Hartman Cc: Manikishan Ghantasala Cc: Alex Elder Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9363b31d769245cb7ec8a660460800d4b466911 Author: Guenter Roeck Date: Wed Jun 30 18:56:19 2021 -0700 checkpatch: scripts/spdxcheck.py now requires python3 Since commit d0259c42abff ("spdxcheck.py: Use Python 3"), spdxcheck.py explicitly expects to run as python3 script. If "python" still points to python v2.7 and the script is executed with "python scripts/spdxcheck.py", the following error may be seen even if git-python is installed for python3. Traceback (most recent call last): File "scripts/spdxcheck.py", line 10, in import git ImportError: No module named git To fix the problem, check for the existence of python3, check if the script is executable and not just for its existence, and execute it directly. Link: https://lkml.kernel.org/r/20210505211720.447111-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Cc: Joe Perches Cc: Bert Vermeulen Cc: Dwaipayan Ray Cc: Lukas Bulwahn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c484419efc09e7234c667aa72698cb79ba8d8ed Author: Dimitri John Ledkov Date: Wed Jun 30 18:56:16 2021 -0700 lib/decompress_unlz4.c: correctly handle zero-padding around initrds. lz4 compatible decompressor is simple. The format is underspecified and relies on EOF notification to determine when to stop. Initramfs buffer format[1] explicitly states that it can have arbitrary number of zero padding. Thus when operating without a fill function, be extra careful to ensure that sizes less than 4, or apperantly empty chunksizes are treated as EOF. To test this I have created two cpio initrds, first a normal one, main.cpio. And second one with just a single /test-file with content "second" second.cpio. Then i compressed both of them with gzip, and with lz4 -l. Then I created a padding of 4 bytes (dd if=/dev/zero of=pad4 bs=1 count=4). To create four testcase initrds: 1) main.cpio.gzip + extra.cpio.gzip = pad0.gzip 2) main.cpio.lz4 + extra.cpio.lz4 = pad0.lz4 3) main.cpio.gzip + pad4 + extra.cpio.gzip = pad4.gzip 4) main.cpio.lz4 + pad4 + extra.cpio.lz4 = pad4.lz4 The pad4 test-cases replicate the initrd load by grub, as it pads and aligns every initrd it loads. All of the above boot, however /test-file was not accessible in the initrd for the testcase #4, as decoding in lz4 decompressor failed. Also an error message printed which usually is harmless. Whith a patched kernel, all of the above testcases now pass, and /test-file is accessible. This fixes lz4 initrd decompress warning on every boot with grub. And more importantly this fixes inability to load multiple lz4 compressed initrds with grub. This patch has been shipping in Ubuntu kernels since January 2021. [1] ./Documentation/driver-api/early-userspace/buffer-format.rst BugLink: https://bugs.launchpad.net/bugs/1835660 Link: https://lore.kernel.org/lkml/20210114200256.196589-1-xnox@ubuntu.com/ # v0 Link: https://lkml.kernel.org/r/20210513104831.432975-1-dimitri.ledkov@canonical.com Signed-off-by: Dimitri John Ledkov Cc: Kyungsik Lee Cc: Yinghai Lu Cc: Bongkyu Kim Cc: Kees Cook Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Rajat Asthana Cc: Nick Terrell Cc: Gao Xiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fde9d6e839db604569ad5de5fbe7dd3cd8e2136 Author: Rajat Asthana Date: Wed Jun 30 18:56:13 2021 -0700 lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static Declare LZ4_decompress_safe_withPrefix64k as static to fix sparse warning: > warning: symbol 'LZ4_decompress_safe_withPrefix64k' was not declared. > Should it be static? Link: https://lkml.kernel.org/r/20210511154345.610569-1-thisisrast7@gmail.com Signed-off-by: Rajat Asthana Reviewed-by: Nick Terrell Cc: Gao Xiang Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c52729377eab025b238caeed48994a39c3b73f2 Author: Andy Shevchenko Date: Wed Jun 30 18:56:10 2021 -0700 kernel.h: split out kstrtox() and simple_strtox() to a separate header kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out kstrtox() and simple_strtox() helpers. At the same time convert users in header and lib folders to use new header. Though for time being include new header back to kernel.h to avoid twisted indirected includes for existing users. [andy.shevchenko@gmail.com: fix documentation references] Link: https://lkml.kernel.org/r/20210615220003.377901-1-andy.shevchenko@gmail.com Link: https://lkml.kernel.org/r/20210611185815.44103-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Jonathan Cameron Cc: Francis Laniel Cc: Randy Dunlap Cc: Kars Mulder Cc: Trond Myklebust Cc: Anna Schumaker Cc: "J. Bruce Fields" Cc: Chuck Lever Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce71efd03916ea8fe45e9ef6bd6abe4c20734a57 Author: Matteo Croce Date: Wed Jun 30 18:56:07 2021 -0700 lib/test_string.c: allow module removal The test_string module can't be removed because it lacks an exit hook. Since there is no reason for it to be permanent, add an empty one to allow module removal. Link: https://lkml.kernel.org/r/20210616234503.28678-1-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad65dcef3a87c24d6c6156eae5e7b47311d6e3cf Author: Alexey Dobriyan Date: Wed Jun 30 18:56:04 2021 -0700 lib: uninline simple_strtoull() Gcc inlines simple_strtoull() too agressively. Given that all 4 signatures match, everything very efficiently calls or tailcalls into simple_strtoull(): ffffffff81da0240 : ffffffff81da0240: 80 3f 2d cmp BYTE PTR [rdi],0x2d ffffffff81da0243: 74 05 je ffffffff81da024a ffffffff81da0245: e9 76 ff ff ff jmp simple_strtoull ffffffff81da024a: 48 83 c7 01 add rdi,0x1 ffffffff81da024e: e8 6d ff ff ff call simple_strtoull ffffffff81da0253: 48 f7 d8 neg rax ffffffff81da0256: c3 ret Space savings (on F34-ish .config) add/remove: 0/0 grow/shrink: 1/3 up/down: 52/-313 (-261) Function old new delta vsscanf 2167 2219 +52 simple_strtoul 72 2 -70 simple_strtoll 143 23 -120 simple_strtol 143 20 -123 Link: https://lkml.kernel.org/r/YMO2zoOQk2eF34tn@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a58be6277e4324c853babfd35890c2d5e171e8f Author: Alexey Dobriyan Date: Wed Jun 30 18:56:01 2021 -0700 lib: memscan() fixlet Generic version doesn't trucate second argument to char. Older brother memchr() does as do s390, sparc and i386 assembly versions. Fortunately, no code passes c >= 256. Link: https://lkml.kernel.org/r/YLv4cCf0t5UPdyK+@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 478485f6c0e5936b62c0c9393a865bfb00f037a5 Author: Zhen Lei Date: Wed Jun 30 18:55:58 2021 -0700 lib/mpi: fix spelling mistakes Fix some spelling mistakes in comments: flaged ==> flagged bufer ==> buffer multipler ==> multiplier MULTIPLER ==> MULTIPLIER leaset ==> least chnage ==> change Link: https://lkml.kernel.org/r/20210604074401.12198-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Cc: Herbert Xu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05911c5d964956442d17fe21db239de5a1dace4a Author: Zhen Lei Date: Wed Jun 30 18:55:55 2021 -0700 lib/decompressors: fix spelling mistakes Fix some spelling mistakes in comments: sentinal ==> sentinel compresed ==> compressed dependeny ==> dependency immediatelly ==> immediately dervied ==> derived splitted ==> split nore ==> not independed ==> independent asumed ==> assumed Link: https://lkml.kernel.org/r/20210604085656.12257-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Cc: Jiri Kosina Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6c75c4afceb8bc065a4ebb5c6c381452bf96f53 Author: Trent Piepho Date: Wed Jun 30 18:55:52 2021 -0700 lib/math/rational: add Kunit test cases Adds a number of test cases that cover a range of possible code paths. [akpm@linux-foundation.org: remove non-ascii characters, fix whitespace] [colin.king@canonical.com: fix spelling mistake "demominator" -> "denominator"] Link: https://lkml.kernel.org/r/20210526085049.6393-1-colin.king@canonical.com Link: https://lkml.kernel.org/r/20210525144250.214670-2-tpiepho@gmail.com Signed-off-by: Trent Piepho Signed-off-by: Colin Ian King Reviewed-by: Andy Shevchenko Cc: Daniel Latypov Cc: Oskar Schirmer Cc: Yiyuan Guo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65a0d3c14685663ba111038a35db70f559e39336 Author: Trent Piepho Date: Wed Jun 30 18:55:49 2021 -0700 lib/math/rational.c: fix divide by zero If the input is out of the range of the allowed values, either larger than the largest value or closer to zero than the smallest non-zero allowed value, then a division by zero would occur. In the case of input too large, the division by zero will occur on the first iteration. The best result (largest allowed value) will be found by always choosing the semi-convergent and excluding the denominator based limit when finding it. In the case of the input too small, the division by zero will occur on the second iteration. The numerator based semi-convergent should not be calculated to avoid the division by zero. But the semi-convergent vs previous convergent test is still needed, which effectively chooses between 0 (the previous convergent) vs the smallest allowed fraction (best semi-convergent) as the result. Link: https://lkml.kernel.org/r/20210525144250.214670-1-tpiepho@gmail.com Fixes: 323dd2c3ed0 ("lib/math/rational.c: fix possible incorrect result from rational fractions helper") Signed-off-by: Trent Piepho Reported-by: Yiyuan Guo Reviewed-by: Andy Shevchenko Cc: Oskar Schirmer Cc: Daniel Latypov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc72181a65990193f54284417efa01d4580014e6 Author: Andy Shevchenko Date: Wed Jun 30 18:55:46 2021 -0700 seq_file: drop unused *_escape_mem_ascii() There are no more users of the seq_escape_mem_ascii() followed by string_escape_mem_ascii(). Remove them for good. Link: https://lkml.kernel.org/r/20210504180819.73127-16-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0546391c20f01ca98c6fa42c8cd9e247599550a Author: Andy Shevchenko Date: Wed Jun 30 18:55:43 2021 -0700 nfsd: avoid non-flexible API in seq_quote_mem() The seq_escape_mem_ascii() is completely non-flexible and shouldn't be used. Replace it with properly called seq_escape_mem(). Link: https://lkml.kernel.org/r/20210504180819.73127-15-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc3de02eae89a1eb4a964b7b0a05bfb717904700 Author: Andy Shevchenko Date: Wed Jun 30 18:55:40 2021 -0700 seq_file: convert seq_escape() to use seq_escape_str() Convert seq_escape() to use seq_escape_str() rather than open coding it. Note, for now we leave it as an exported symbol due to some old code that can't tolerate ctype.h being (indirectly) included. Link: https://lkml.kernel.org/r/20210504180819.73127-14-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7ed4a3b922b04d2042cd2e19d1096fa457b6c11 Author: Andy Shevchenko Date: Wed Jun 30 18:55:37 2021 -0700 seq_file: add seq_escape_str() as replica of string_escape_str() In some cases we want to escape characters from NULL-terminated strings. Add seq_escape_str() as replica of string_escape_str() for that. Link: https://lkml.kernel.org/r/20210504180819.73127-13-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1d31aa172a4e6728918a06ee7f1d6bcb7507172c Author: Andy Shevchenko Date: Wed Jun 30 18:55:34 2021 -0700 seq_file: introduce seq_escape_mem() Introduce seq_escape_mem() to allow users to pass additional parameters to string_escape_mem(). Link: https://lkml.kernel.org/r/20210504180819.73127-12-andriy.shevchenko@linux.intel.com Suggested-by: Al Viro Signed-off-by: Andy Shevchenko Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be613b4025fa3894f3985283d5f2929161fae300 Author: Andy Shevchenko Date: Wed Jun 30 18:55:32 2021 -0700 MAINTAINERS: add myself as designated reviewer for generic string library Add myself as designated reviewer for generic string library. Link: https://lkml.kernel.org/r/20210504180819.73127-11-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 259fa5d7d825122c30ad4122c6a1cc937eb74c2d Author: Andy Shevchenko Date: Wed Jun 30 18:55:29 2021 -0700 lib/test-string_helpers: add test cases for new features We have got new flags and hence new features of string_escape_mem(). Add test cases for that. Link: https://lkml.kernel.org/r/20210504180819.73127-10-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69325698df55c609da96ebbd592e59d88c4d335d Author: Andy Shevchenko Date: Wed Jun 30 18:55:26 2021 -0700 lib/test-string_helpers: get rid of trailing comma in terminators Terminators by definition shouldn't accept anything behind. Make them robust by removing trailing commas. Link: https://lkml.kernel.org/r/20210504180819.73127-9-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 229563b196ed3ce36036a18b6bdfe4cce9dcbbd4 Author: Andy Shevchenko Date: Wed Jun 30 18:55:23 2021 -0700 lib/test-string_helpers: print flags in hexadecimal format Since flags are bitmapped, it's better to print them in hexadecimal format. Link: https://lkml.kernel.org/r/20210504180819.73127-8-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aec0d0966f20d131cc4ff6927b02d448a478a6d4 Author: Andy Shevchenko Date: Wed Jun 30 18:55:20 2021 -0700 lib/string_helpers: allow to append additional characters to be escaped Introduce a new flag to append additional characters, passed in 'only' parameter, to be escaped if they fall in the corresponding class. Link: https://lkml.kernel.org/r/20210504180819.73127-7-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0362c27fb373ea04eace9e7a70e61036ab81f09f Author: Andy Shevchenko Date: Wed Jun 30 18:55:17 2021 -0700 lib/string_helpers: introduce ESCAPE_NAP to escape non-ASCII and non-printable Some users may want to have an ASCII based filter for printable only characters, provided by conjunction of isascii() and isprint() functions. Here is the addition of a such. Link: https://lkml.kernel.org/r/20210504180819.73127-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0809783355cfe1cc1b2fa7f881c3a79df0b2a27 Author: Andy Shevchenko Date: Wed Jun 30 18:55:14 2021 -0700 lib/string_helpers: introduce ESCAPE_NA for escaping non-ASCII Some users may want to have an ASCII based filter, provided by isascii() function. Here is the addition of a such. Link: https://lkml.kernel.org/r/20210504180819.73127-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e5969aeb7f1e7d6f68d5501a6c040605272763e Author: Andy Shevchenko Date: Wed Jun 30 18:55:11 2021 -0700 lib/string_helpers: drop indentation level in string_escape_mem() The only one conditional is left on the upper level, move the rest to the same level and drop indentation level. No functional changes. Link: https://lkml.kernel.org/r/20210504180819.73127-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 62519b882d7485bae4c0a7e1e0adb576610400a9 Author: Andy Shevchenko Date: Wed Jun 30 18:55:08 2021 -0700 lib/string_helpers: move ESCAPE_NP check inside 'else' branch in a loop Refactor code to have better readability by moving ESCAPE_NP handling inside 'else' branch in the loop. No functional change intended. Link: https://lkml.kernel.org/r/20210504180819.73127-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexander Viro Cc: Chuck Lever Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 994b69703e86ed0ab2228fc606761a3b08d48af3 Author: Andy Shevchenko Date: Wed Jun 30 18:55:05 2021 -0700 lib/string_helpers: switch to use BIT() macro Patch series "lib/string_helpers: get rid of ugly *_escape_mem_ascii()", v3. Get rid of ugly *_escape_mem_ascii() API since it's not flexible and has the only single user. Provide better approach based on usage of the string_escape_mem() with appropriate flags. Test cases has been expanded accordingly to cover new functionality. This patch (of 15): Switch to use BIT() macro for flag definitions. No changes implied. Link: https://lkml.kernel.org/r/20210504180819.73127-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20210504180819.73127-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: "J. Bruce Fields" Cc: Chuck Lever Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92aeda50d4a96b7a30fc87960497d5e15b7428f7 Author: Zhen Lei Date: Wed Jun 30 18:55:02 2021 -0700 lib: decompress_bunzip2: remove an unneeded semicolon The semicolon immediately following '}' is unneeded. Link: https://lkml.kernel.org/r/20210508094926.2889-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f39650de687e35766572ac89dbcd16a5911e2f0a Author: Andy Shevchenko Date: Wed Jun 30 18:54:59 2021 -0700 kernel.h: split out panic and oops helpers kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out panic and oops helpers. There are several purposes of doing this: - dropping dependency in bug.h - dropping a loop by moving out panic_notifier.h - unload kernel.h from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. [akpm@linux-foundation.org: thread_info.h needs limits.h] [andriy.shevchenko@linux.intel.com: ia64 fix] Link: https://lkml.kernel.org/r/20210520130557.55277-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20210511074137.33666-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Co-developed-by: Andrew Morton Acked-by: Mike Rapoport Acked-by: Corey Minyard Acked-by: Christian Brauner Acked-by: Arnd Bergmann Acked-by: Kees Cook Acked-by: Wei Liu Acked-by: Rasmus Villemoes Signed-off-by: Andrew Morton Acked-by: Sebastian Reichel Acked-by: Luis Chamberlain Acked-by: Stephen Boyd Acked-by: Thomas Bogendoerfer Acked-by: Helge Deller # parisc Signed-off-by: Linus Torvalds commit 070c46505a265d54eba7f713760fa6ed984f2921 Author: Andy Shevchenko Date: Wed Jun 30 18:54:56 2021 -0700 drm: include only needed headers in ascii85.h The ascii85.h is user of exactly two headers, i.e. math.h and types.h. There is no need to carry on entire kernel.h. Link: https://lkml.kernel.org/r/20210611185915.44181-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Jani Nikula Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a52c5f3c8957872b2750314b56c64d9600542a9 Author: Jiapeng Chong Date: Wed Jun 30 18:54:53 2021 -0700 sysctl: remove redundant assignment to first Variable first is set to '0', but this value is never read as it is not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: kernel/sysctl.c:1562:4: warning: Value stored to 'first' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lkml.kernel.org/r/1620469990-22182-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Jiapeng Chong Reported-by: Abaci Robot Acked-by: Luis Chamberlain Cc: Kees Cook Cc: Iurii Zaikin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: John Fastabend Cc: KP Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3845f256a8b527127bfbd4ced21e93d9e89aa6d7 Author: Kalesh Singh Date: Wed Jun 30 18:54:49 2021 -0700 procfs/dmabuf: add inode number to /proc/*/fdinfo And 'ino' field to /proc//fdinfo/ and /proc//task//fdinfo/. The inode numbers can be used to uniquely identify DMA buffers in user space and avoids a dependency on /proc//fd/* when accounting per-process DMA buffer sizes. Link: https://lkml.kernel.org/r/20210308170651.919148-2-kaleshsingh@google.com Signed-off-by: Kalesh Singh Acked-by: Randy Dunlap Acked-by: Christian König Cc: Jann Horn Cc: Jeff Vander Stoep Cc: Kees Cook Cc: Suren Baghdasaryan Cc: Minchan Kim Cc: Hridya Valsaraju Cc: Matthew Wilcox Cc: Alexander Viro Cc: Kalesh Singh Cc: Alexey Dobriyan Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: Michal Hocko Cc: Alexey Gladkov Cc: Szabolcs Nagy Cc: Eric W. Biederman Cc: Christian Brauner Cc: Michel Lespinasse Cc: Bernd Edlinger Cc: Andrei Vagin Cc: Helge Deller Cc: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bc3fa0172a423afb34e6df7a3998e5f23b1a94a Author: Kalesh Singh Date: Wed Jun 30 18:54:44 2021 -0700 procfs: allow reading fdinfo with PTRACE_MODE_READ Android captures per-process system memory state when certain low memory events (e.g a foreground app kill) occur, to identify potential memory hoggers. In order to measure how much memory a process actually consumes, it is necessary to include the DMA buffer sizes for that process in the memory accounting. Since the handle to DMA buffers are raw FDs, it is important to be able to identify which processes have FD references to a DMA buffer. Currently, DMA buffer FDs can be accounted using /proc//fd/* and /proc//fdinfo -- both are only readable by the process owner, as follows: 1. Do a readlink on each FD. 2. If the target path begins with "/dmabuf", then the FD is a dmabuf FD. 3. stat the file to get the dmabuf inode number. 4. Read/ proc//fdinfo/, to get the DMA buffer size. Accessing other processes' fdinfo requires root privileges. This limits the use of the interface to debugging environments and is not suitable for production builds. Granting root privileges even to a system process increases the attack surface and is highly undesirable. Since fdinfo doesn't permit reading process memory and manipulating process state, allow accessing fdinfo under PTRACE_MODE_READ_FSCRED. Link: https://lkml.kernel.org/r/20210308170651.919148-1-kaleshsingh@google.com Signed-off-by: Kalesh Singh Suggested-by: Jann Horn Acked-by: Christian König Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Alexey Gladkov Cc: Andrei Vagin Cc: Bernd Edlinger Cc: Christian Brauner Cc: Eric W. Biederman Cc: Helge Deller Cc: Hridya Valsaraju Cc: James Morris Cc: Jeff Vander Stoep Cc: Jonathan Corbet Cc: Kees Cook Cc: Matthew Wilcox Cc: Mauro Carvalho Chehab Cc: Michal Hocko Cc: Michel Lespinasse Cc: Minchan Kim Cc: Randy Dunlap Cc: Suren Baghdasaryan Cc: Szabolcs Nagy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d238692b4b9f2c36e35af4c6e6f6da36184aeb3e Author: Marcelo Henrique Cerri Date: Wed Jun 30 18:54:38 2021 -0700 proc: Avoid mixing integer types in mem_rw() Use size_t when capping the count argument received by mem_rw(). Since count is size_t, using min_t(int, ...) can lead to a negative value that will later be passed to access_remote_vm(), which can cause unexpected behavior. Since we are capping the value to at maximum PAGE_SIZE, the conversion from size_t to int when passing it to access_remote_vm() as "len" shouldn't be a problem. Link: https://lkml.kernel.org/r/20210512125215.3348316-1-marcelo.cerri@canonical.com Reviewed-by: David Disseldorp Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Marcelo Henrique Cerri Cc: Alexey Dobriyan Cc: Souza Cascardo Cc: Christian Brauner Cc: Michel Lespinasse Cc: Helge Deller Cc: Oleg Nesterov Cc: Lorenzo Stoakes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f187163eb890d6d2a53f7efea2b6963fe9526e2 Author: Alistair Popple Date: Wed Jun 30 18:54:35 2021 -0700 nouveau/svm: implement atomic SVM access Some NVIDIA GPUs do not support direct atomic access to system memory via PCIe. Instead this must be emulated by granting the GPU exclusive access to the memory. This is achieved by replacing CPU page table entries with special swap entries that fault on userspace access. The driver then grants the GPU permission to update the page undergoing atomic access via the GPU page tables. When CPU access to the page is required a CPU fault is raised which calls into the device driver via MMU notifiers to revoke the atomic access. The original page table entries are then restored allowing CPU access to proceed. Link: https://lkml.kernel.org/r/20210616105937.23201-11-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Ben Skeggs Cc: Christoph Hellwig Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f81c69a2a144afefa277db4917a76bcaecfa2f2e Author: Alistair Popple Date: Wed Jun 30 18:54:32 2021 -0700 nouveau/svm: refactor nouveau_range_fault Call mmu_interval_notifier_insert() as part of nouveau_range_fault(). This doesn't introduce any functional change but makes it easier for a subsequent patch to alter the behaviour of nouveau_range_fault() to support GPU atomic operations. Link: https://lkml.kernel.org/r/20210616105937.23201-10-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Ben Skeggs Cc: Christoph Hellwig Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b659baea75469f0c5bd26f18461dfcdc1bbbac82 Author: Alistair Popple Date: Wed Jun 30 18:54:28 2021 -0700 mm: selftests for exclusive device memory Adds some selftests for exclusive device memory. Link: https://lkml.kernel.org/r/20210616105937.23201-9-apopple@nvidia.com Signed-off-by: Alistair Popple Acked-by: Jason Gunthorpe Tested-by: Ralph Campbell Reviewed-by: Ralph Campbell Cc: Ben Skeggs Cc: Christoph Hellwig Cc: Hugh Dickins Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b756a3b5e7ead8f6f4b03cea8ac22478ce04c8a8 Author: Alistair Popple Date: Wed Jun 30 18:54:25 2021 -0700 mm: device exclusive memory access Some devices require exclusive write access to shared virtual memory (SVM) ranges to perform atomic operations on that memory. This requires CPU page tables to be updated to deny access whilst atomic operations are occurring. In order to do this introduce a new swap entry type (SWP_DEVICE_EXCLUSIVE). When a SVM range needs to be marked for exclusive access by a device all page table mappings for the particular range are replaced with device exclusive swap entries. This causes any CPU access to the page to result in a fault. Faults are resovled by replacing the faulting entry with the original mapping. This results in MMU notifiers being called which a driver uses to update access permissions such as revoking atomic access. After notifiers have been called the device will no longer have exclusive access to the region. Walking of the page tables to find the target pages is handled by get_user_pages() rather than a direct page table walk. A direct page table walk similar to what migrate_vma_collect()/unmap() does could also have been utilised. However this resulted in more code similar in functionality to what get_user_pages() provides as page faulting is required to make the PTEs present and to break COW. [dan.carpenter@oracle.com: fix signedness bug in make_device_exclusive_range()] Link: https://lkml.kernel.org/r/YNIz5NVnZ5GiZ3u1@mwanda Link: https://lkml.kernel.org/r/20210616105937.23201-8-apopple@nvidia.com Signed-off-by: Alistair Popple Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Cc: Ben Skeggs Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a5cc85c407402ae66128d31f0422a3a7ffa5c5c Author: Alistair Popple Date: Wed Jun 30 18:54:22 2021 -0700 mm/memory.c: allow different return codes for copy_nonpresent_pte() Currently if copy_nonpresent_pte() returns a non-zero value it is assumed to be a swap entry which requires further processing outside the loop in copy_pte_range() after dropping locks. This prevents other values being returned to signal conditions such as failure which a subsequent change requires. Instead make copy_nonpresent_pte() return an error code if further processing is required and read the value for the swap entry in the main loop under the ptl. Link: https://lkml.kernel.org/r/20210616105937.23201-7-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Peter Xu Cc: Ben Skeggs Cc: Christoph Hellwig Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Ralph Campbell Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b49bf6ddbb0d7992c816846acfa5fd1cf751c36 Author: Alistair Popple Date: Wed Jun 30 18:54:19 2021 -0700 mm: rename migrate_pgmap_owner MMU notifier ranges have a migrate_pgmap_owner field which is used by drivers to store a pointer. This is subsequently used by the driver callback to filter MMU_NOTIFY_MIGRATE events. Other notifier event types can also benefit from this filtering, so rename the 'migrate_pgmap_owner' field to 'owner' and create a new notifier initialisation function to initialise this field. Link: https://lkml.kernel.org/r/20210616105937.23201-6-apopple@nvidia.com Signed-off-by: Alistair Popple Suggested-by: Peter Xu Reviewed-by: Peter Xu Cc: Ben Skeggs Cc: Christoph Hellwig Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Ralph Campbell Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a98a2f0c8ce1b2138cb8e3ae410444dedcc14809 Author: Alistair Popple Date: Wed Jun 30 18:54:16 2021 -0700 mm/rmap: split migration into its own function Migration is currently implemented as a mode of operation for try_to_unmap_one() generally specified by passing the TTU_MIGRATION flag or in the case of splitting a huge anonymous page TTU_SPLIT_FREEZE. However it does not have much in common with the rest of the unmap functionality of try_to_unmap_one() and thus splitting it into a separate function reduces the complexity of try_to_unmap_one() making it more readable. Several simplifications can also be made in try_to_migrate_one() based on the following observations: - All users of TTU_MIGRATION also set TTU_IGNORE_MLOCK. - No users of TTU_MIGRATION ever set TTU_IGNORE_HWPOISON. - No users of TTU_MIGRATION ever set TTU_BATCH_FLUSH. TTU_SPLIT_FREEZE is a special case of migration used when splitting an anonymous page. This is most easily dealt with by calling the correct function from unmap_page() in mm/huge_memory.c - either try_to_migrate() for PageAnon or try_to_unmap(). Link: https://lkml.kernel.org/r/20210616105937.23201-5-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig Reviewed-by: Ralph Campbell Cc: Ben Skeggs Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd62734ca60dbb2ab5bb19c8d837dd9990955310 Author: Alistair Popple Date: Wed Jun 30 18:54:12 2021 -0700 mm/rmap: split try_to_munlock from try_to_unmap The behaviour of try_to_unmap_one() is difficult to follow because it performs different operations based on a fairly large set of flags used in different combinations. TTU_MUNLOCK is one such flag. However it is exclusively used by try_to_munlock() which specifies no other flags. Therefore rather than overload try_to_unmap_one() with unrelated behaviour split this out into it's own function and remove the flag. Link: https://lkml.kernel.org/r/20210616105937.23201-4-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Ralph Campbell Reviewed-by: Christoph Hellwig Cc: Ben Skeggs Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4dd845b5a3e57ad07f26ef808707b064696fe34b Author: Alistair Popple Date: Wed Jun 30 18:54:09 2021 -0700 mm/swapops: rework swap entry manipulation code Both migration and device private pages use special swap entries that are manipluated by a range of inline functions. The arguments to these are somewhat inconsistent so rework them to remove flag type arguments and to make the arguments similar for both read and write entry creation. Link: https://lkml.kernel.org/r/20210616105937.23201-3-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Ralph Campbell Cc: Ben Skeggs Cc: Hugh Dickins Cc: John Hubbard Cc: "Matthew Wilcox (Oracle)" Cc: Peter Xu Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af5cdaf82238fb3637a0d0fff4670e5be71c611c Author: Alistair Popple Date: Wed Jun 30 18:54:06 2021 -0700 mm: remove special swap entry functions Patch series "Add support for SVM atomics in Nouveau", v11. Introduction ============ Some devices have features such as atomic PTE bits that can be used to implement atomic access to system memory. To support atomic operations to a shared virtual memory page such a device needs access to that page which is exclusive of the CPU. This series introduces a mechanism to temporarily unmap pages granting exclusive access to a device. These changes are required to support OpenCL atomic operations in Nouveau to shared virtual memory (SVM) regions allocated with the CL_MEM_SVM_ATOMICS clSVMAlloc flag. A more complete description of the OpenCL SVM feature is available at https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/ OpenCL_API.html#_shared_virtual_memory . Implementation ============== Exclusive device access is implemented by adding a new swap entry type (SWAP_DEVICE_EXCLUSIVE) which is similar to a migration entry. The main difference is that on fault the original entry is immediately restored by the fault handler instead of waiting. Restoring the entry triggers calls to MMU notifers which allows a device driver to revoke the atomic access permission from the GPU prior to the CPU finalising the entry. Patches ======= Patches 1 & 2 refactor existing migration and device private entry functions. Patches 3 & 4 rework try_to_unmap_one() by splitting out unrelated functionality into separate functions - try_to_migrate_one() and try_to_munlock_one(). Patch 5 renames some existing code but does not introduce functionality. Patch 6 is a small clean-up to swap entry handling in copy_pte_range(). Patch 7 contains the bulk of the implementation for device exclusive memory. Patch 8 contains some additions to the HMM selftests to ensure everything works as expected. Patch 9 is a cleanup for the Nouveau SVM implementation. Patch 10 contains the implementation of atomic access for the Nouveau driver. Testing ======= This has been tested with upstream Mesa 21.1.0 and a simple OpenCL program which checks that GPU atomic accesses to system memory are atomic. Without this series the test fails as there is no way of write-protecting the page mapping which results in the device clobbering CPU writes. For reference the test is available at https://ozlabs.org/~apopple/opencl_svm_atomics/ Further testing has been performed by adding support for testing exclusive access to the hmm-tests kselftests. This patch (of 10): Remove multiple similar inline functions for dealing with different types of special swap entries. Both migration and device private swap entries use the swap offset to store a pfn. Instead of multiple inline functions to obtain a struct page for each swap entry type use a common function pfn_swap_entry_to_page(). Also open-code the various entry_to_pfn() functions as this results is shorter code that is easier to understand. Link: https://lkml.kernel.org/r/20210616105937.23201-1-apopple@nvidia.com Link: https://lkml.kernel.org/r/20210616105937.23201-2-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: Ralph Campbell Reviewed-by: Christoph Hellwig Cc: "Matthew Wilcox (Oracle)" Cc: Hugh Dickins Cc: Peter Xu Cc: Shakeel Butt Cc: Ben Skeggs Cc: Jason Gunthorpe Cc: John Hubbard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff06e45d3aace3f93d23956c1e655224f363ebe2 Author: Marco Elver Date: Wed Jun 30 18:54:03 2021 -0700 kfence: unconditionally use unbound work queue Unconditionally use unbound work queue, and not just if wq_power_efficient is true. Because if the system is idle, KFENCE may wait, and by being run on the unbound work queue, we permit the scheduler to make better scheduling decisions and not require pinning KFENCE to the same CPU upon waking up. Link: https://lkml.kernel.org/r/20210521111630.472579-1-elver@google.com Fixes: 36f0b35d0894 ("kfence: use power-efficient work queue to run delayed work") Signed-off-by: Marco Elver Reported-by: Hillf Danton Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c2f7d14d84f767a797558609eb034511e02f41e Author: Anshuman Khandual Date: Wed Jun 30 18:53:59 2021 -0700 mm/thp: define default pmd_pgtable() Currently most platforms define pmd_pgtable() as pmd_page() duplicating the same code all over. Instead just define a default value i.e pmd_page() for pmd_pgtable() and let platforms override when required via . All the existing platform that override pmd_pgtable() have been moved into their respective header in order to precede before the new generic definition. This makes it much cleaner with reduced code. Link: https://lkml.kernel.org/r/1623646133-20306-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Geert Uytterhoeven Acked-by: Mike Rapoport Cc: Nick Hu Cc: Richard Henderson Cc: Vineet Gupta Cc: Catalin Marinas Cc: Will Deacon Cc: Guo Ren Cc: Brian Cain Cc: Geert Uytterhoeven Cc: Michal Simek Cc: Thomas Bogendoerfer Cc: Ley Foon Tan Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: "James E.J. Bottomley" Cc: Michael Ellerman Cc: Christophe Leroy Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Heiko Carstens Cc: Yoshinori Sato Cc: "David S. Miller" Cc: Jeff Dike Cc: Thomas Gleixner Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 351de44fde5afc3b0b23294ebf404e78065c2745 Author: Mel Gorman Date: Wed Jun 30 18:53:56 2021 -0700 mm/swap: make NODE_DATA an inline function on CONFIG_FLATMEM make W=1 generates the following warning in mm/workingset.c for allnoconfig mm/workingset.c: In function `unpack_shadow': mm/workingset.c:201:15: warning: variable `nid' set but not used [-Wunused-but-set-variable] int memcgid, nid; ^~~ On FLATMEM, NODE_DATA returns a global pglist_data without dereferencing nid. Make the helper an inline function to suppress the warning, add type checking and to apply any side-effects in the parameter list. Link: https://lkml.kernel.org/r/20210520084809.8576-15-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ffd8f251f1a61e592aa3146d2c3cfb6a992e80f2 Author: Mel Gorman Date: Wed Jun 30 18:53:53 2021 -0700 mm/page_alloc: move prototype for find_suitable_fallback make W=1 generates the following warning in mmap_lock.c for allnoconfig mm/page_alloc.c:2670:5: warning: no previous prototype for `find_suitable_fallback' [-Wmissing-prototypes] int find_suitable_fallback(struct free_area *area, unsigned int order, ^~~~~~~~~~~~~~~~~~~~~~ find_suitable_fallback is only shared outside of page_alloc.c for CONFIG_COMPACTION but to suppress the warning, move the protype outside of CONFIG_COMPACTION. It is not worth the effort at this time to find a clever way of allowing compaction.c to share the code or avoid the use entirely as the function is called on relatively slow paths. Link: https://lkml.kernel.org/r/20210520084809.8576-14-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d01079f3d0c0a9e306ffbdb2694c5281bd9e065e Author: Mel Gorman Date: Wed Jun 30 18:53:50 2021 -0700 mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations make W=1 generates the following warning in mmap_lock.c for allnoconfig mm/mmap_lock.c:213:6: warning: no previous prototype for `__mmap_lock_do_trace_start_locking' [-Wmissing-prototypes] void __mmap_lock_do_trace_start_locking(struct mm_struct *mm, bool write) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mmap_lock.c:219:6: warning: no previous prototype for `__mmap_lock_do_trace_acquire_returned' [-Wmissing-prototypes] void __mmap_lock_do_trace_acquire_returned(struct mm_struct *mm, bool write, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mmap_lock.c:226:6: warning: no previous prototype for `__mmap_lock_do_trace_released' [-Wmissing-prototypes] void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write) On !CONFIG_TRACING configurations, the code is dead so put it behind an #ifdef. [cuibixuan@huawei.com: fix warning when CONFIG_TRACING is not defined] Link: https://lkml.kernel.org/r/20210531033426.74031-1-cuibixuan@huawei.com Link: https://lkml.kernel.org/r/20210520084809.8576-13-mgorman@techsingularity.net Signed-off-by: Mel Gorman Signed-off-by: Bixuan Cui Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2bb6a033fb4078f1c528ee575f551064ed738d6f Author: Mel Gorman Date: Wed Jun 30 18:53:47 2021 -0700 mm/swap: make swap_address_space an inline function make W=1 generates the following warning in page_mapping() for allnoconfig mm/util.c:700:15: warning: variable `entry' set but not used [-Wunused-but-set-variable] swp_entry_t entry; ^~~~~ swap_address is a #define on !CONFIG_SWAP configurations. Make the helper an inline function to suppress the warning, add type checking and to apply any side-effects in the parameter list. Link: https://lkml.kernel.org/r/20210520084809.8576-12-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30522175d222c98f7976e34f6daf076e9f8cc723 Author: Mel Gorman Date: Wed Jun 30 18:53:44 2021 -0700 mm/z3fold: add kerneldoc fields for z3fold_pool make W=1 generates the following warning for z3fold_pool mm/z3fold.c:171: warning: Function parameter or member 'zpool' not described in 'z3fold_pool' mm/z3fold.c:171: warning: Function parameter or member 'zpool_ops' not described in 'z3fold_pool' Commit 9a001fc19ccc ("z3fold: the 3-fold allocator for compressed pages") simply did not document the fields at the time. Add rudimentary documentation. Link: https://lkml.kernel.org/r/20210520084809.8576-11-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a29a7506600d9511dc872a82a139dcfb71c49640 Author: Mel Gorman Date: Wed Jun 30 18:53:41 2021 -0700 mm/zbud: add kerneldoc fields for zbud_pool make W=1 generates the following warning for zbud_pool mm/zbud.c:105: warning: Function parameter or member 'zpool' not described in 'zbud_pool' mm/zbud.c:105: warning: Function parameter or member 'zpool_ops' not described in 'zbud_pool' Commit 479305fd7172 ("zpool: remove zpool_evict()") removed the zpool_evict helper and added the associated zpool and operations structure in struct zbud_pool but did not add documentation for the fields. Add rudimentary documentation. Link: https://lkml.kernel.org/r/20210520084809.8576-10-mgorman@techsingularity.net Fixes: 479305fd7172 ("zpool: remove zpool_evict()") Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5640c9ca7ed2e54628938f9d505c969b48e3fa67 Author: Mel Gorman Date: Wed Jun 30 18:53:38 2021 -0700 mm/memory_hotplug: fix kerneldoc comment for __remove_memory make W=1 generates the following warning for __remove_memory mm/memory_hotplug.c:2044: warning: expecting prototype for remove_memory(). Prototype was for __remove_memory() instead Commit eca499ab3749 ("mm/hotplug: make remove_memory() interface usable") introduced the kerneldoc comment and function but the kerneldoc name and function name did not match. Link: https://lkml.kernel.org/r/20210520084809.8576-9-mgorman@techsingularity.net Fixes: eca499ab3749 ("mm/hotplug: make remove_memory() interface usable") Signed-off-by: Mel Gorman Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba2d26660d0e13b3465917022aca78d49e259b59 Author: Mel Gorman Date: Wed Jun 30 18:53:35 2021 -0700 mm/memory_hotplug: fix kerneldoc comment for __try_online_node make W=1 generates the following warning for try_online_node mm/memory_hotplug.c:1087: warning: expecting prototype for try_online_node(). Prototype was for __try_online_node() instead Commit b9ff036082cd ("mm/memory_hotplug.c: make add_memory_resource use __try_online_node") renamed the function but did not update the associated kerneldoc. The function is static and somewhat specialised in nature so it's not clear it warrants being a kerneldoc by moving the comment to try_online_node. Hence, leave the comment of the internal helper in place but leave it out of kerneldoc and correct the function name in the comment. Link: https://lkml.kernel.org/r/20210520084809.8576-8-mgorman@techsingularity.net Fixes: Commit b9ff036082cd ("mm/memory_hotplug.c: make add_memory_resource use __try_online_node") Signed-off-by: Mel Gorman Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05395718b2fe48eb4970184c3a9f89f6b5e7440f Author: Mel Gorman Date: Wed Jun 30 18:53:32 2021 -0700 mm/memcontrol.c: fix kerneldoc comment for mem_cgroup_calculate_protection make W=1 generates the following warning for mem_cgroup_calculate_protection mm/memcontrol.c:6468: warning: expecting prototype for mem_cgroup_protected(). Prototype was for mem_cgroup_calculate_protection() instead Commit 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from protection checks") changed the function definition but not the associated kerneldoc comment. Link: https://lkml.kernel.org/r/20210520084809.8576-7-mgorman@techsingularity.net Fixes: 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from protection checks") Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Chris Down Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b417941f3ab1a276255e3ae52ff261dc2e196de7 Author: Mel Gorman Date: Wed Jun 30 18:53:29 2021 -0700 mm/mapping_dirty_helpers: remove double Note in kerneldoc make W=1 generates the following warning for mm/mapping_dirty_helpers.c mm/mapping_dirty_helpers.c:325: warning: duplicate section name 'Note' The helper function is very specific to one driver -- vmwgfx. While the two notes are separate, all of it needs to be taken into account when using the helper so make it one note. Link: https://lkml.kernel.org/r/20210520084809.8576-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7173090033c70886d925995e9dfdfb76dbb2441 Author: Mel Gorman Date: Wed Jun 30 18:53:25 2021 -0700 mm/page_alloc: make should_fail_alloc_page() static make W=1 generates the following warning for mm/page_alloc.c mm/page_alloc.c:3651:15: warning: no previous prototype for `should_fail_alloc_page' [-Wmissing-prototypes] noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) ^~~~~~~~~~~~~~~~~~~~~~ This function is deliberately split out for BPF to allow errors to be injected. The function is not used anywhere else so it is local to the file. Make it static which should still allow error injection to be used similar to how block/blk-core.c:should_fail_bio() works. Link: https://lkml.kernel.org/r/20210520084809.8576-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5da96bdd93ed732685fb511d9889d3f6c5717fad Author: Mel Gorman Date: Wed Jun 30 18:53:23 2021 -0700 mm/vmalloc: include header for prototype of set_iounmap_nonlazy make W=1 generates the following warning for mm/vmalloc.c mm/vmalloc.c:1599:6: warning: no previous prototype for `set_iounmap_nonlazy' [-Wmissing-prototypes] void set_iounmap_nonlazy(void) ^~~~~~~~~~~~~~~~~~~ This is an arch-generic function only used by x86. On other arches, it's dead code. Include the header with the definition and make it x86-64 specific. Link: https://lkml.kernel.org/r/20210520084809.8576-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f611fab71005af2d726033697e8abda0ee0994e8 Author: Mel Gorman Date: Wed Jun 30 18:53:19 2021 -0700 mm/vmscan: remove kerneldoc-like comment from isolate_lru_pages Patch series "Clean W=1 build warnings for mm/". This is a janitorial only. During development of a tool to catch build warnings early to avoid tripping the Intel lkp-robot, I noticed that mm/ is not clean for W=1. This is generally harmless but there is no harm in cleaning it up. It disrupts git blame a little but on relatively obvious lines that are unlikely to be git blame targets. This patch (of 13): make W=1 generates the following warning for vmscan.c mm/vmscan.c:1814: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst It is not a kerneldoc comment and isolate_lru_pages() is a static function. While the detailed comment is nice, it does not need to be exposed via kernel-doc. Link: https://lkml.kernel.org/r/20210520084809.8576-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20210520084809.8576-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: David Hildenbrand Cc: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 041711ce7cdf023f53d76f64d82b75210248e18d Author: Zhen Lei Date: Wed Jun 30 18:53:17 2021 -0700 mm: fix spelling mistakes Fix some spelling mistakes in comments: each having differents usage ==> each has a different usage statments ==> statements adresses ==> addresses aggresive ==> aggressive datas ==> data posion ==> poison higer ==> higher precisly ==> precisely wont ==> won't We moves tha ==> We move the endianess ==> endianness Link: https://lkml.kernel.org/r/20210519065853.7723-2-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Reviewed-by: Souptick Joarder Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fac7757e1fb05b75c8e22d4f8fe2f6c9c4d7edca Author: Anshuman Khandual Date: Wed Jun 30 18:53:13 2021 -0700 mm: define default value for FIRST_USER_ADDRESS Currently most platforms define FIRST_USER_ADDRESS as 0UL duplication the same code all over. Instead just define a generic default value (i.e 0UL) for FIRST_USER_ADDRESS and let the platforms override when required. This makes it much cleaner with reduced code. The default FIRST_USER_ADDRESS here would be skipped in when the given platform overrides its value via . Link: https://lkml.kernel.org/r/1620615725-24623-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Geert Uytterhoeven [m68k] Acked-by: Guo Ren [csky] Acked-by: Stafford Horne [openrisc] Acked-by: Catalin Marinas [arm64] Acked-by: Mike Rapoport Acked-by: Palmer Dabbelt [RISC-V] Cc: Richard Henderson Cc: Vineet Gupta Cc: Catalin Marinas Cc: Will Deacon Cc: Guo Ren Cc: Brian Cain Cc: Geert Uytterhoeven Cc: Michal Simek Cc: Thomas Bogendoerfer Cc: Ley Foon Tan Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Cc: "James E.J. Bottomley" Cc: Michael Ellerman Cc: Christophe Leroy Cc: Paul Walmsley Cc: Heiko Carstens Cc: Yoshinori Sato Cc: "David S. Miller" Cc: Jeff Dike Cc: Thomas Gleixner Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c4ffefd16daba0f29fa7d9534de20949b673eca0 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Wed Jun 30 18:53:10 2021 -0700 mm: fix typos and grammar error in comments We moves tha -> We move that in mm/swap.c statments -> statements in include/linux/mm.h Link: https://lkml.kernel.org/r/20210509063444.GA24745@hyeyoo Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd794835432c1fbdec5c34ab348ddb641ca2a42d Author: Yue Hu Date: Wed Jun 30 18:53:07 2021 -0700 zram: move backing_dev under macro CONFIG_ZRAM_WRITEBACK backing_dev is never used when not enable CONFIG_ZRAM_WRITEBACK and it's introduced from writeback feature. So it's needless also affect readability in that case. Link: https://lkml.kernel.org/r/20210521060544.2385-1-zbestahu@gmail.com Signed-off-by: Yue Hu Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 338483372626f9b89ed91ec0b422562ef53b0b12 Author: Miaohe Lin Date: Wed Jun 30 18:53:04 2021 -0700 mm/zsmalloc.c: improve readability for async_free_zspage() The class is extracted from pool->size_class[class_idx] again before calling __free_zspage(). It looks like class will change after we fetch the class lock. But this is misleading as class will stay unchanged. Link: https://lkml.kernel.org/r/20210624123930.1769093-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce8475b6a4e547fcea60410a8385d80988e12c7e Author: Miaohe Lin Date: Wed Jun 30 18:53:01 2021 -0700 mm/zsmalloc.c: remove confusing code in obj_free() Patch series "Cleanup for zsmalloc". This series contains cleanups to remove confusing code in obj_free(), combine two atomic ops and improve readability for async_free_zspage(). More details can be found in the respective changelogs. This patch (of 2): OBJ_ALLOCATED_TAG is only set for handle to indicate allocated object. It's irrelevant with obj. So remove this misleading code to improve readability. Link: https://lkml.kernel.org/r/20210624123930.1769093-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210624123930.1769093-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21bcc7266129a68919438934a37c8793a528ff2b Author: Namhyung Kim Date: Fri Jun 25 00:18:24 2021 -0700 perf tools: Add cgroup_is_v2() helper The cgroup_is_v2() is to check if the given subsystem is mounted on cgroup v2 or not. It'll be used by BPF cgroup code later. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210625071826.608504-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 69e874db4dded0f2fe56ae623d7f54318395c87d Author: Namhyung Kim Date: Fri Jun 25 00:18:23 2021 -0700 perf tools: Add read_cgroup_id() function The read_cgroup_id() is to read a cgroup id from a file handle using name_to_handle_at(2) for the given cgroup. It'll be used by bperf cgroup stat later. Committer notes: -int read_cgroup_id(struct cgroup *cgrp) +static inline int read_cgroup_id(struct cgroup *cgrp __maybe_unused) To fix the build when HAVE_FILE_HANDLE is not defined. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210625071826.608504-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 382a7c20d9253bcd5715789b8179528d0f3de72c Author: Jedrzej Jagielski Date: Fri Jun 11 22:42:17 2021 +0000 igb: Fix position of assignment to *ring Assignment to *ring should be done after correctness check of the argument queue. Fixes: 91db364236c8 ("igb: Refactor igb_configure_cbs()") Signed-off-by: Jedrzej Jagielski Acked-by: Vinicius Costa Gomes Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 6c19d772618fea40d9681f259368f284a330fd90 Author: Aleksandr Loktionov Date: Thu Apr 22 10:19:23 2021 +0000 igb: Check if num of q_vectors is smaller than max before array access Ensure that the adapter->q_vector[MAX_Q_VECTORS] array isn't accessed beyond its size. It was fixed by using a local variable num_q_vectors as a limit for loop index, and ensure that num_q_vectors is not bigger than MAX_Q_VECTORS. Fixes: 047e0030f1e6 ("igb: add new data structure for handling interrupts and NAPI") Signed-off-by: Aleksandr Loktionov Reviewed-by: Grzegorz Siwik Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Slawomir Laba Reviewed-by: Sylwester Dziedziuch Reviewed-by: Mateusz Palczewski Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit af30cbd2f4d6d66a9b6094e0aa32420bc8b20e08 Author: Christophe JAILLET Date: Wed Jun 16 07:53:02 2021 +0200 iavf: Fix an error handling path in 'iavf_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 5eae00c57f5e ("i40evf: main driver core") Signed-off-by: Christophe JAILLET Signed-off-by: Tony Nguyen commit 4589075608420bc49fcef6e98279324bf2bb91ae Author: Christophe JAILLET Date: Wed Jun 16 07:05:53 2021 +0200 e1000e: Fix an error handling path in 'e1000_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 111b9dc5c981 ("e1000e: add aer support") Signed-off-by: Christophe JAILLET Acked-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit e85e14d68f517ef12a5fb8123fff65526b35b6cd Author: Christophe JAILLET Date: Wed Jun 16 07:00:36 2021 +0200 fm10k: Fix an error handling path in 'fm10k_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 19ae1b3fb99c ("fm10k: Add support for PCI power management and error handling") Signed-off-by: Christophe JAILLET Signed-off-by: Tony Nguyen commit fea03b1cebd653cd095f2e9a58cfe1c85661c363 Author: Christophe JAILLET Date: Sat Jun 12 22:08:33 2021 +0200 igb: Fix an error handling path in 'igb_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 40a914fa72ab ("igb: Add support for pci-e Advanced Error Reporting") Signed-off-by: Christophe JAILLET Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c6bc9e5ce5d37cb3e6b552f41b92a193db1806ab Author: Christophe JAILLET Date: Sat Jun 12 22:00:05 2021 +0200 igc: Fix an error handling path in 'igc_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: c9a11c23ceb6 ("igc: Add netdev") Signed-off-by: Christophe JAILLET Tested-by: Dvora Fuxbrumer Acked-by: Sasha Neftin Signed-off-by: Tony Nguyen commit dd2aefcd5e37989ae5f90afdae44bbbf3a2990da Author: Christophe JAILLET Date: Sat Jun 12 15:46:09 2021 +0200 ixgbe: Fix an error handling path in 'ixgbe_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 6fabd715e6d8 ("ixgbe: Implement PCIe AER support") Signed-off-by: Christophe JAILLET Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 05682a0a61b6cbecd97a0f37f743b2cbfd516977 Author: Tom Rix Date: Fri May 21 12:50:19 2021 -0700 igc: change default return of igc_read_phy_reg() Static analysis reports this problem igc_main.c:4944:20: warning: The left operand of '&' is a garbage value if (!(phy_data & SR_1000T_REMOTE_RX_STATUS) && ~~~~~~~~ ^ phy_data is set by the call to igc_read_phy_reg() only if there is a read_reg() op, else it is unset and a 0 is returned. Change the return to -EOPNOTSUPP. Fixes: 208983f099d9 ("igc: Add watchdog") Signed-off-by: Tom Rix Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 7b292608db23ccbbfbfa50cdb155d01725d7a52e Author: Vinicius Costa Gomes Date: Thu May 13 17:31:04 2021 -0700 igb: Fix use-after-free error during reset Cleans the next descriptor to watch (next_to_watch) when cleaning the TX ring. Failure to do so can cause invalid memory accesses. If igb_poll() runs while the controller is reset this can lead to the driver try to free a skb that was already freed. (The crash is harder to reproduce with the igb driver, but the same potential problem exists as the code is identical to igc) Fixes: 7cc6fd4c60f2 ("igb: Don't bother clearing Tx buffer_info in igb_clean_tx_ring") Signed-off-by: Vinicius Costa Gomes Reported-by: Erez Geva Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 56ea7ed103b46970e171eb1c95916f393d64eeff Author: Vinicius Costa Gomes Date: Thu May 13 17:31:03 2021 -0700 igc: Fix use-after-free error during reset Cleans the next descriptor to watch (next_to_watch) when cleaning the TX ring. Failure to do so can cause invalid memory accesses. If igc_poll() runs while the controller is being reset this can lead to the driver try to free a skb that was already freed. Log message: [ 101.525242] refcount_t: underflow; use-after-free. [ 101.525251] WARNING: CPU: 1 PID: 646 at lib/refcount.c:28 refcount_warn_saturate+0xab/0xf0 [ 101.525259] Modules linked in: sch_etf(E) sch_mqprio(E) rfkill(E) intel_rapl_msr(E) intel_rapl_common(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) binfmt_misc(E) kvm_intel(E) kvm(E) irqbypass(E) crc32_pclmul(E) ghash_clmulni_intel(E) aesni_intel(E) mei_wdt(E) libaes(E) crypto_simd(E) cryptd(E) glue_helper(E) snd_hda_codec_hdmi(E) rapl(E) intel_cstate(E) snd_hda_intel(E) snd_intel_dspcfg(E) sg(E) soundwire_intel(E) intel_uncore(E) at24(E) soundwire_generic_allocation(E) iTCO_wdt(E) soundwire_cadence(E) intel_pmc_bxt(E) serio_raw(E) snd_hda_codec(E) iTCO_vendor_support(E) watchdog(E) snd_hda_core(E) snd_hwdep(E) snd_soc_core(E) snd_compress(E) snd_pcsp(E) soundwire_bus(E) snd_pcm(E) evdev(E) snd_timer(E) mei_me(E) snd(E) soundcore(E) mei(E) configfs(E) ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc32c_generic(E) crc16(E) mbcache(E) jbd2(E) sd_mod(E) t10_pi(E) crc_t10dif(E) crct10dif_generic(E) i915(E) ahci(E) libahci(E) ehci_pci(E) igb(E) xhci_pci(E) ehci_hcd(E) [ 101.525303] drm_kms_helper(E) dca(E) xhci_hcd(E) libata(E) crct10dif_pclmul(E) cec(E) crct10dif_common(E) tsn(E) igc(E) e1000e(E) ptp(E) i2c_i801(E) crc32c_intel(E) psmouse(E) i2c_algo_bit(E) i2c_smbus(E) scsi_mod(E) lpc_ich(E) pps_core(E) usbcore(E) drm(E) button(E) video(E) [ 101.525318] CPU: 1 PID: 646 Comm: irq/37-enp7s0-T Tainted: G E 5.10.30-rt37-tsn1-rt-ipipe #ipipe [ 101.525320] Hardware name: SIEMENS AG SIMATIC IPC427D/A5E31233588, BIOS V17.02.09 03/31/2017 [ 101.525322] RIP: 0010:refcount_warn_saturate+0xab/0xf0 [ 101.525325] Code: 05 31 48 44 01 01 e8 f0 c6 42 00 0f 0b c3 80 3d 1f 48 44 01 00 75 90 48 c7 c7 78 a8 f3 a6 c6 05 0f 48 44 01 01 e8 d1 c6 42 00 <0f> 0b c3 80 3d fe 47 44 01 00 0f 85 6d ff ff ff 48 c7 c7 d0 a8 f3 [ 101.525327] RSP: 0018:ffffbdedc0917cb8 EFLAGS: 00010286 [ 101.525329] RAX: 0000000000000000 RBX: ffff98fd6becbf40 RCX: 0000000000000001 [ 101.525330] RDX: 0000000000000001 RSI: ffffffffa6f2700c RDI: 00000000ffffffff [ 101.525332] RBP: ffff98fd6becc14c R08: ffffffffa7463d00 R09: ffffbdedc0917c50 [ 101.525333] R10: ffffffffa74c3578 R11: 0000000000000034 R12: 00000000ffffff00 [ 101.525335] R13: ffff98fd6b0b1000 R14: 0000000000000039 R15: ffff98fd6be35c40 [ 101.525337] FS: 0000000000000000(0000) GS:ffff98fd6e240000(0000) knlGS:0000000000000000 [ 101.525339] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 101.525341] CR2: 00007f34135a3a70 CR3: 0000000150210003 CR4: 00000000001706e0 [ 101.525343] Call Trace: [ 101.525346] sock_wfree+0x9c/0xa0 [ 101.525353] unix_destruct_scm+0x7b/0xa0 [ 101.525358] skb_release_head_state+0x40/0x90 [ 101.525362] skb_release_all+0xe/0x30 [ 101.525364] napi_consume_skb+0x57/0x160 [ 101.525367] igc_poll+0xb7/0xc80 [igc] [ 101.525376] ? sched_clock+0x5/0x10 [ 101.525381] ? sched_clock_cpu+0xe/0x100 [ 101.525385] net_rx_action+0x14c/0x410 [ 101.525388] __do_softirq+0xe9/0x2f4 [ 101.525391] __local_bh_enable_ip+0xe3/0x110 [ 101.525395] ? irq_finalize_oneshot.part.47+0xe0/0xe0 [ 101.525398] irq_forced_thread_fn+0x6a/0x80 [ 101.525401] irq_thread+0xe8/0x180 [ 101.525403] ? wake_threads_waitq+0x30/0x30 [ 101.525406] ? irq_thread_check_affinity+0xd0/0xd0 [ 101.525408] kthread+0x183/0x1a0 [ 101.525412] ? kthread_park+0x80/0x80 [ 101.525415] ret_from_fork+0x22/0x30 Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings") Reported-by: Erez Geva Signed-off-by: Vinicius Costa Gomes Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 9a7b7ec3c6f2aedb99c9f39dd9cb63c2deff3437 Author: Nathan Chancellor Date: Sat Jun 26 22:12:03 2021 -0700 ALSA: usb-audio: scarlett2: Fix for loop increment in scarlett2_usb_get_config Clang warns: sound/usb/mixer_scarlett_gen2.c:1189:32: warning: expression result unused [-Wunused-value] for (i = 0; i < count; i++, (u16 *)buf++) ^ ~~~~~ 1 warning generated. It appears the intention was to cast the void pointer to a u16 pointer so that the data could be iterated through like an array of u16 values. However, the cast happens after the increment because a cast is an rvalue, whereas the post-increment operator only works on lvalues, so the loop does not iterate as expected. This is not a bug in practice because count is not greater than one at the moment but this could change in the future so this should be fixed. Replace the cast with a temporary variable of the proper type, which is less error prone and fixes the iteration. Do the same thing for the 'u8 *' below this if block. Fixes: ac34df733d2d ("ALSA: usb-audio: scarlett2: Update get_config to do endian conversion") Link: https://github.com/ClangBuiltLinux/linux/issues/1408 Acked-by: Geoffrey D. Bennett Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210627051202.1888250-1-nathan@kernel.org Signed-off-by: Takashi Iwai commit fb3acdb2ba289aa06a5a995b3abef409bfe0a220 Author: Andy Chi Date: Thu Jul 1 17:14:15 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 630 G8 The HP ProBook 630 G8 using ALC236 codec which using 0x02 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Andy Chi Cc: Link: https://lore.kernel.org/r/20210701091417.9696-3-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit a3b7f9b8fa2967e1b3c2a402301715124c90306b Author: Andy Chi Date: Thu Jul 1 17:14:14 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G8 The HP ProBook 445 G8 using ALC236 codec. COEF index 0x34 bit 5 is used to control the playback mute LED, but the microphone mute LED is controlled using pin VREF instead of a COEF index. Therefore, add a quirk to make it works. Signed-off-by: Andy Chi Cc: Link: https://lore.kernel.org/r/20210701091417.9696-2-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit 2b70b264d34d398c77a5936e317336f00cf5badb Author: Andy Chi Date: Thu Jul 1 17:14:13 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 450 G8 The HP ProBook 450 G8 using ALC236 codec which using 0x02 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Andy Chi Cc: Link: https://lore.kernel.org/r/20210701091417.9696-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit 3c24e48330adfa46b87cdb892939996c67e498b5 Author: Kailang Yang Date: Thu Jul 1 09:33:33 2021 +0800 ALSA: hda/realtek - Add ALC285 HP init procedure ALC285 headphone initial procedure. It also could suitable for ALC215/ALC289/ALC225/ALC295/ALC299. Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/2b7539c3e96f41a4ab458d53ea5f5784@realtek.com Signed-off-by: Takashi Iwai commit 99cee034c28947fc122799b0b7714e01b047f3f3 Author: Kailang Yang Date: Thu Jul 1 09:09:37 2021 +0800 ALSA: hda/realtek - Add type for ALC287 Add independent type for ALC287. Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/2b7539c3e96f41a4ab458d53ea5f5784@realtek.com Signed-off-by: Takashi Iwai commit c36748ac545421d94a5091c754414c0f3664bf10 Author: Jérôme Glisse Date: Thu Jul 1 08:28:25 2021 -0700 misc: eeprom: at24: Always append device id even if label property is set. We need to append device id even if eeprom have a label property set as some platform can have multiple eeproms with same label and we can not register each of those with same label. Failing to register those eeproms trigger cascade failures on such platform (system is no longer working). This fix regression on such platform introduced with 4e302c3b568e Reported-by: Alexander Fomichev Fixes: 4e302c3b568e ("misc: eeprom: at24: fix NVMEM name with custom AT24 device name") Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse Signed-off-by: Bartosz Golaszewski commit 9b52363b9283376c868679bdcd6e19405a4aca5a Author: Rafael J. Wysocki Date: Thu Jul 1 18:34:52 2021 +0200 ACPI: Kconfig: Provide help text for the ACPI_PRMT option Add missing help text for CONFIG_ACPI_PRMT. Fixes: cefc7ca46235 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype") Reported-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit 7b167c4cb48ee3912f0068b9ea5ea4eacc1a5e36 Author: Mario Limonciello Date: Wed Jun 30 14:46:06 2021 -0500 ACPI: PM: Only mark EC GPE for wakeup on Intel systems When using s2idle on a variety of AMD notebook systems, they are experiencing spurious events that the EC or SMU are in the wrong state leading to a hard time waking up or higher than expected power consumption. These events only occur when the EC GPE is inadvertently set as a wakeup source. Originally the EC GPE was only set as a wakeup source when using the intel-vbtn or intel-hid drivers in commit 10a08fd65ec1 ("ACPI: PM: Set up EC GPE for system wakeup from drivers that need it") but during testing a reporter discovered that this was not enough for their ASUS Zenbook UX430UNR/i7-8550U to wakeup by lid event or keypress. Marking the EC GPE for wakeup universally resolved this for that reporter in commit b90ff3554aa3 ("ACPI: PM: s2idle: Always set up EC GPE for system wakeup"). However this behavior has lead to a number of problems: * On both Lenovo T14 and P14s the keyboard wakeup doesn't work, and sometimes the power button event doesn't work. * On HP 635 G7 detaching or attaching AC during suspend will cause the system not to wakeup * On Asus vivobook to prevent detaching AC causing resume problems * On Lenovo 14ARE05 to prevent detaching AC causing resume problems * On HP ENVY x360 to prevent detaching AC causing resume problems As there may be other Intel systems besides ASUS Zenbook UX430UNR/i7-8550U that don't use intel-vbtn or intel-hid, avoid these problems by only universally marking the EC GPE wakesource on non-AMD systems. Link: https://patchwork.kernel.org/project/linux-pm/cover/5997740.FPbUVk04hV@kreacher/#22825489 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1230 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1629 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by: Rafael J. Wysocki commit 75674eb06a28816af2a7331dcee4088cc1ab5f6d Author: Mark-PK Tsai Date: Thu Jul 1 08:45:38 2021 +0800 PM: sleep: Use ktime_us_delta() in initcall_debug_report() Use ktime_us_delta() to make the debug log more precise instead of shifting the return value of ktime_to_ns() applied to a ktime_sub() result by 10 bit positions to the right. Signed-off-by: Mark-PK Tsai [ rjw: Changelog rewrite, subject edits ] Signed-off-by: Rafael J. Wysocki commit 63c38d858e0b064a942383d33ccce4ca56df8283 Author: Christoph Hellwig Date: Thu Jul 1 10:16:38 2021 +0200 block: remove the bdgrab in blk_drop_partitions There is no need to hold a bdev reference when removing the partition. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210701081638.246552-3-hch@lst.de Signed-off-by: Jens Axboe commit 498dcc13fd6463de29b94e160f40ed04d5477cd8 Author: Christoph Hellwig Date: Thu Jul 1 10:16:37 2021 +0200 block: grab a device refcount in disk_uevent Sending uevents requires the struct device to be alive. To ensure that grab the device refcount instead of just an inode reference. Fixes: bc359d03c7ec ("block: add a disk_uevent helper") Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210701081638.246552-2-hch@lst.de Signed-off-by: Jens Axboe commit 2b7a8dc06d0f840345ae3c7ed6f9d55962b5f54a Author: Kees Cook Date: Thu Jul 1 16:22:21 2021 +0200 s390/dasd: Avoid field over-reading memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field array bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. Add a wrapping structure to serve as the memcpy() source, so the compiler can do appropriate bounds checking, avoiding this future warning: In function '__fortify_memcpy', inlined from 'create_uid' at drivers/s390/block/dasd_eckd.c:749:2: ./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter) Signed-off-by: Kees Cook Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20210701142221.3408680-3-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 299f2b5fc08be90aebcaa471b4d0f2bb94f2fbbf Author: Christoph Hellwig Date: Thu Jul 1 16:22:20 2021 +0200 dasd: unexport dasd_set_target_state dasd_set_target_state is only used inside of dasd_mod.ko, so don't export it. Signed-off-by: Christoph Hellwig Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20210701142221.3408680-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 558d6450c7755aa005d89021204b6cdcae5e848f Author: Ye Bin Date: Tue Jun 15 17:05:37 2021 +0800 ext4: fix WARN_ON_ONCE(!buffer_uptodate) after an error writing the superblock If a writeback of the superblock fails with an I/O error, the buffer is marked not uptodate. However, this can cause a WARN_ON to trigger when we attempt to write superblock a second time. (Which might succeed this time, for cerrtain types of block devices such as iSCSI devices over a flaky network.) Try to detect this case in flush_stashed_error_work(), and also change __ext4_handle_dirty_metadata() so we always set the uptodate flag, not just in the nojournal case. Before this commit, this problem can be repliciated via: 1. dmsetup create dust1 --table '0 2097152 dust /dev/sdc 0 4096' 2. mount /dev/mapper/dust1 /home/test 3. dmsetup message dust1 0 addbadblock 0 10 4. cd /home/test 5. echo "XXXXXXX" > t After a few seconds, we got following warning: [ 80.654487] end_buffer_async_write: bh=0xffff88842f18bdd0 [ 80.656134] Buffer I/O error on dev dm-0, logical block 0, lost async page write [ 85.774450] EXT4-fs error (device dm-0): ext4_check_bdev_write_error:193: comm kworker/u16:8: Error while async write back metadata [ 91.415513] mark_buffer_dirty: bh=0xffff88842f18bdd0 [ 91.417038] ------------[ cut here ]------------ [ 91.418450] WARNING: CPU: 1 PID: 1944 at fs/buffer.c:1092 mark_buffer_dirty.cold+0x1c/0x5e [ 91.440322] Call Trace: [ 91.440652] __jbd2_journal_temp_unlink_buffer+0x135/0x220 [ 91.441354] __jbd2_journal_unfile_buffer+0x24/0x90 [ 91.441981] __jbd2_journal_refile_buffer+0x134/0x1d0 [ 91.442628] jbd2_journal_commit_transaction+0x249a/0x3240 [ 91.443336] ? put_prev_entity+0x2a/0x200 [ 91.443856] ? kjournald2+0x12e/0x510 [ 91.444324] kjournald2+0x12e/0x510 [ 91.444773] ? woken_wake_function+0x30/0x30 [ 91.445326] kthread+0x150/0x1b0 [ 91.445739] ? commit_timeout+0x20/0x20 [ 91.446258] ? kthread_flush_worker+0xb0/0xb0 [ 91.446818] ret_from_fork+0x1f/0x30 [ 91.447293] ---[ end trace 66f0b6bf3d1abade ]--- Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210615090537.3423231-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit 6a9a930dc4415b2e8c0bf2085b2b0b2b291053d5 Author: Rob Herring Date: Wed Jun 23 10:43:44 2021 -0600 dt-bindings: Fix 'unevaluatedProperties' errors in DT graph users In testing out under development json-schema 2020-12 support, there's a few issues with 'unevaluatedProperties' and the graph schema. If 'graph.yaml#/properties/port' is used, then neither the port nor the endpoint(s) can have additional properties. 'graph.yaml#/$defs/port-base' needs to be used instead. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Cc: "Paul J. Murphy" Cc: Daniele Alessandrelli Cc: "Niklas Söderlund" Cc: Krzysztof Kozlowski Cc: Paul Kocialkowski Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Niklas Söderlund Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210623164344.2571043-1-robh@kernel.org commit bae4cbe1922bc71c73b86f8ebe3d2d53c7e38d3d Author: Rob Herring Date: Wed Jun 23 10:43:08 2021 -0600 dt-bindings: display: renesas,du: Fix 'ports' reference Fix the renesas,du binding 'ports' schema which is referencing the 'port' schema instead of the 'ports' schema. Fixes: 99d66127fad2 ("dt-bindings: display: renesas,du: Convert binding to YAML") Cc: Laurent Pinchart Cc: Kieran Bingham Cc: dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Link: https://lore.kernel.org/r/20210623164308.2570164-1-robh@kernel.org commit 0118915b447d370fde51ae5418bcaf108600b6b8 Author: Rob Herring Date: Wed Jun 23 10:42:56 2021 -0600 dt-bindings: media: adv7180: Add missing video-interfaces.yaml reference The adv7180 binding is using 'bus-width' property, but doesn't document it. Add a reference to the video-interfaces.yaml schema to properly document it. Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas") Cc: Lars-Peter Clausen Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210623164256.2569839-1-robh@kernel.org commit 8888ef2304d0ae78f3d5ec19653fa7cc4ffdbd7a Author: Axel Lin Date: Wed Jun 23 23:34:43 2021 +0800 regulator: bd9576: Fix testing wrong flag in check_temp_flag_mismatch Fix trivial copy-paste typo. Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210623153443.623856-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 9cf76a72af6ab81030dea6481b1d7bdd814fbdaf Author: Kyle Russell Date: Mon Jun 21 21:09:41 2021 -0400 ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits These are backwards from Table 7-71 of the TLV320AIC3100 spec [1]. This was broken in 12eb4d66ba2e when BCLK_MASTER and WCLK_MASTER were converted from 0x08 and 0x04 to BIT(2) and BIT(3), respectively. -#define AIC31XX_BCLK_MASTER 0x08 -#define AIC31XX_WCLK_MASTER 0x04 +#define AIC31XX_BCLK_MASTER BIT(2) +#define AIC31XX_WCLK_MASTER BIT(3) Probably just a typo since the defines were not listed in bit order. [1] https://www.ti.com/lit/gpn/tlv320aic3100 Signed-off-by: Kyle Russell Link: https://lore.kernel.org/r/20210622010941.241386-1-bkylerussell@gmail.com Signed-off-by: Mark Brown commit 3cf5f7ab230e2b886e493c7a8449ed50e29d2b98 Author: Javier Martinez Canillas Date: Tue Jun 8 10:04:09 2021 +0200 PCI: rockchip: Register IRQ handlers after device and data are ready An IRQ handler may be called at any time after it is registered, so anything it relies on must be ready before registration. rockchip_pcie_subsys_irq_handler() and rockchip_pcie_client_irq_handler() read registers in the PCIe controller, but we registered them before turning on clocks to the controller. If either is called before the clocks are turned on, the register reads fail and the machine hangs. Similarly, rockchip_pcie_legacy_int_handler() uses rockchip->irq_domain, but we installed it before initializing irq_domain. Register IRQ handlers after their data structures are initialized and clocks are enabled. Found by enabling CONFIG_DEBUG_SHIRQ, which calls the IRQ handler when it is being unregistered. An error during the probe path might cause this unregistration and IRQ handler execution before the device or data structure init has finished. [bhelgaas: commit log] Link: https://lore.kernel.org/r/20210608080409.1729276-1-javierm@redhat.com Reported-by: Peter Robinson Tested-by: Peter Robinson Signed-off-by: Javier Martinez Canillas Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Shawn Lin commit 4ebbbaa4ce8524b853dd6febf0176a6efa3482d7 Author: Michael Ellerman Date: Thu Jul 1 21:18:30 2021 +1000 powerpc: Only build restart_table.c for 64s Commit 9b69d48c7516 ("powerpc/64e: remove implicit soft-masking and interrupt exit restart logic") limited the implicit soft masking and restart logic to 64-bit Book3S only. However we are still building restart_table.c for all 64-bit, ie. Book3E also. There's no need to build it for 64e, and it also causes missing prototype warnings for 64e builds, because the prototype is already behind an #ifdef PPC_BOOK3S_64. Fixes: 9b69d48c7516 ("powerpc/64e: remove implicit soft-masking and interrupt exit restart logic") Reported-by: kernel test robot Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210701125026.292224-1-mpe@ellerman.id.au commit 5ddbecb4976835342f913067adf18b41ac6bd978 Merge: b3beca7618168 c503c193db7d7 Author: Rafael J. Wysocki Date: Thu Jul 1 14:25:43 2021 +0200 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq updates for v5.14-rc1 from Viresh Kumar: "- Add frequency invariance support for CPPC driver again and related fixes/changes." - Minor changes/cleanups for Meditak driver (Fabien Parent and Seiya Wang), Qcom platform (Sibi Sankar), and SCMI driver (Christophe JAILLET). - New bindings for generic performance domains (Sudeep Holla). - Rename black/white-lists (Viresh Kumar)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: CPPC: Add support for frequency invariance arch_topology: Avoid use-after-free for scale_freq_data cpufreq: CPPC: Pass structure instance by reference cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init dt-bindings: cpufreq: update cpu type and clock name for MT8173 SoC clk: mediatek: remove deprecated CLK_INFRA_CA57SEL for MT8173 SoC cpufreq: dt: Rename black/white-lists cpufreq: scmi: Fix an error message cpufreq: mediatek: add support for mt8365 dt-bindings: dvfs: Add support for generic performance domains cpufreq: blacklist SC7280 in cpufreq-dt-platdev commit 0fc4dcc13f090c941abfab453a24945a4005b350 Author: Toke Høiland-Jørgensen Date: Tue Jun 29 11:39:07 2021 +0200 bpf, devmap: Convert remaining READ_ONCE() to rcu_dereference_check() There were a couple of READ_ONCE()-invocations left-over by the devmap RCU conversion. Convert these to rcu_dereference_check() as well to avoid complaints from sparse. Fixes: 782347b6bcad ("xdp: Add proper __rcu annotations to redirect map entries") Reported-by: kernel test robot Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: Paul E. McKenney Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210629093907.573598-1-toke@redhat.com commit 50de417b7a5bfe8ab5c571427703f67c934736dc Merge: 459d2320dc21b 192664528154a Author: Takashi Iwai Date: Thu Jul 1 08:36:12 2021 +0200 Merge tag 'asoc-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.14 This release sees a nice new feature in the core from Morimoto-san, support for automatic negotiation of DAI formats between the components on the link. Otherwise the big highlight was the merging of the Tegra machine drivers into a single driver avoiding a bunch of duplication. - Support for automatic negotiation of DAI formats. - Accessory detection support for several Qualcomm parts. - Support for IEC958 control with hdmi-codec. - Merging of Tegra machine drivers into a single driver. - Support for AmLogic SM1 TOACODEC, Intel AlderLake-M, several NXP i.MX8 variants, NXP TFA1 and TDF9897, Rockchip RK817, Qualcomm Quinary MI2S, Texas Instruments TAS2505 commit 459d2320dc21bd69533589d2f0a37ca942edefb7 Author: Geoffrey D. Bennett Date: Sun Jun 27 22:52:56 2021 +0930 ALSA: scarlett2: Fix scarlett2_*_ctl_put() return values again Mixer control put callbacks should return 1 if the value is changed. Fix the mute, air, phantom, direct monitor, speaker switch, talkback, and MSD controls accordingly. Fix scarlett2_speaker_switch_enable() to not ignore the return value of scarlett2_sw_hw_change(). Reported-by: Aaron Wolf Tested-by: Aaron Wolf Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/76643f7ac81aef93351122d07881e30d51dcb1b9.1624798436.git.g@b4.vu Signed-off-by: Takashi Iwai commit fe9a23a6cc175cb47f536f596074bd1052c42de5 Author: Geoffrey D. Bennett Date: Sun Jun 27 22:52:26 2021 +0930 ALSA: scarlett2: Fix pad count for 18i8 Gen 3 The 18i8 Gen 3 has 4 inputs with a pad control, not 2. Update s18i8_gen3_info.pad_input_count. Reported-by: Aaron Wolf Tested-by: Aaron Wolf Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/29a6ce412a42373daab7c96c395560461fcf08c6.1624798436.git.g@b4.vu Signed-off-by: Takashi Iwai commit 498386d1c4d98a72db7a2f51473593ad563b45ae Merge: 5c6d4f97267f0 dfc2e8ae4066a Author: Takashi Iwai Date: Thu Jul 1 08:34:15 2021 +0200 Merge branch 'for-next' into for-linus commit 01112e5e20f5298a81639806cd0a3c587aade467 Merge: 47513f243b452 e5c35fa040197 Author: Palmer Dabbelt Date: Wed Jun 30 21:50:32 2021 -0700 Merge branch 'riscv-wx-mappings' into for-next This contains both the short-term fix for the W+X boot mappings and the larger cleanup. * riscv-wx-mappings: riscv: Map the kernel with correct permissions the first time riscv: Introduce set_kernel_memory helper riscv: Simplify xip and !xip kernel address conversion macros riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED riscv: mm: Fix W+X mappings at boot commit e5c35fa0401971701dcd7675f471b664698244dd Author: Alexandre Ghiti Date: Thu Jun 24 14:00:41 2021 +0200 riscv: Map the kernel with correct permissions the first time For 64-bit kernels, we map all the kernel with write and execute permissions and afterwards remove writability from text and executability from data. For 32-bit kernels, the kernel mapping resides in the linear mapping, so we map all the linear mapping as writable and executable and afterwards we remove those properties for unused memory and kernel mapping as described above. Change this behavior to directly map the kernel with correct permissions and avoid going through the whole mapping to fix the permissions. At the same time, this fixes an issue introduced by commit 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") as reported here https://github.com/starfive-tech/linux/issues/17. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit ab4a49d36010564c70fe5586a4c2b1985866616f Author: B. J. Wyman Date: Thu Jun 10 20:29:41 2021 +0000 ARM: dts: aspeed: everest: PSU #3 address change The third power supply had an I2C address conflict with another device in the system. The device will have the address changed from 6Ah to 6Dh. Signed-off-by: B. J. Wyman Reviewed-by: Eddie James Link: https://lore.kernel.org/r/20210610202940.3650554-1-bjwyman@gmail.com Fixes: d66d720b64e5 ("ARM: dts: aspeed: everest: Add power supply i2c devices") Signed-off-by: Joel Stanley commit faffd1b2bde3ee428d6891961f6a60f8e08749d6 Author: Andrew Jeffery Date: Mon Jun 28 11:06:05 2021 +0930 ARM: dts: everest: Add phase corrections for eMMC The values were determined experimentally via boot tests, not by measuring the bus behaviour with a scope. We plan to do scope measurements to confirm or refine the values and will update the devicetree if necessary once these have been obtained. However, with the patch we can write and read data without issue, where as booting the system without the patch failed at the point of mounting the rootfs. Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210628013605.1257346-1-andrew@aj.id.au Fixes: 2fc88f92359d ("mmc: sdhci-of-aspeed: Expose clock phase controls") Fixes: a5c5168478d7 ("ARM: dts: aspeed: Add Everest BMC machine") Signed-off-by: Joel Stanley commit 93c5bcd4eaaafd7c25c062089806c86d9b7890dd Author: Mukul Joshi Date: Tue Jun 29 16:34:10 2021 -0400 drm/amdgpu: Conditionally reset SDMA RAS error counts Reset SDMA RAS error counts during init only if persistent EDC harvesting is not supported. Signed-off-by: Mukul Joshi Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 7981ec65497a42ab83dfe43192ed7a98c542f001 Author: Alex Sierra Date: Tue Mar 9 22:12:15 2021 -0600 drm/amdkfd: Maintain svm_bo reference in page->zone_device_data Each zone-device page holds a reference to the SVM BO that manages its backing storage. This is necessary to correctly hold on to the BO in case zone_device pages are shared with a child-process. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3bf8282c6b9454422a24b1c443ece80ab325c389 Author: Alex Sierra Date: Wed May 12 11:02:33 2021 -0500 drm/amdkfd: add invalid pages debug at vram migration This is for debug purposes only. It conditionally generates partial migrations to test mixed CPU/GPU memory domain pages in a prange easily. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6ffecc946fada1c39455e89488dba57941e81659 Author: Alex Sierra Date: Wed Jun 30 15:09:10 2021 -0400 drm/amdkfd: skip migration for pages already in VRAM Migration skipped for pages that are already in VRAM domain. These could be the result of previous partial migrations to SYS RAM, and prefetch back to VRAM. Ex. Coherent pages in VRAM that were not written/invalidated after a copy-on-write. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1ade5f84cc25ddd02161859b59345dca9aabc2e8 Author: Alex Sierra Date: Wed May 12 10:54:58 2021 -0500 drm/amdkfd: skip invalid pages during migrations Invalid pages can be the result of pages that have been migrated already due to copy-on-write procedure or pages that were never migrated to VRAM in first place. This is not an issue anymore, as pranges now support mixed memory domains (CPU/GPU). Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1d5dbfe6c06a5269b535f8e6b13569f32c42ea60 Author: Alex Sierra Date: Wed May 5 14:15:50 2021 -0500 drm/amdkfd: classify and map mixed svm range pages in GPU [Why] svm ranges can have mixed pages from device or system memory. A good example is, after a prange has been allocated in VRAM and a copy-on-write is triggered by a fork. This invalidates some pages inside the prange. Endding up in mixed pages. [How] By classifying each page inside a prange, based on its type. Device or system memory, during dma mapping call. If page corresponds to VRAM domain, a flag is set to its dma_addr entry for each GPU. Then, at the GPU page table mapping. All group of contiguous pages within the same type are mapped with their proper pte flags. v2: Instead of using ttm_res to calculate vram pfns in the svm_range. It is now done by setting the vram real physical address into drm_addr array. This makes more flexible VRAM management, plus removes the need to have a BO reference in the svm_range. v3: Remove mapping member from svm_range Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 278a708758b5fc6d3101776b0e3846a8cd37e188 Author: Alex Sierra Date: Wed Jun 23 17:06:22 2021 -0500 drm/amdkfd: use hmm range fault to get both domain pfns Now that prange could have mixed domains (VRAM or SYSRAM), actual_loc nor svm_bo can not be used to check its current domain and eventually get its pfns to map them in GPU. Instead, pfns from both domains, are now obtained from hmm_range_fault through amdgpu_hmm_range_get_pages call. This is done everytime a GPU map occur. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1fc160cfe17ad741157ba8bf38ea5867f4d9fe53 Author: Alex Sierra Date: Thu May 6 13:18:40 2021 -0500 drm/amdgpu: get owner ref in validate and map Get the proper owner reference for amdgpu_hmm_range_get_pages function. This is useful for partial migrations. To avoid migrating back to system memory, VRAM pages, that are accessible by all devices in the same memory domain. Ex. multiple devices in the same hive. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a010d98a78c05652f9f2860f537efdcd65507c6d Author: Alex Sierra Date: Thu May 6 13:06:54 2021 -0500 drm/amdkfd: set owner ref to svm range prefault svm_range_prefault is called right before migrations to VRAM, to make sure pages are resident in system memory before the migration. With partial migrations, this reference is used by hmm range get pages to avoid migrating pages that are already in the same VRAM domain. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8c21fc49a8e637bee5c868dafbd7e3c885a926bd Author: Alex Sierra Date: Thu May 6 12:23:07 2021 -0500 drm/amdkfd: add owner ref param to get hmm pages The parameter is used in the dev_private_owner to decide if device pages in the range require to be migrated back to system memory, based if they are or not in the same memory domain. In this case, this reference could come from the same memory domain with devices connected to the same hive. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3a61dae854cccb32eb9f31b3b4efda8ea414e647 Author: Alex Sierra Date: Wed May 5 12:43:10 2021 -0500 drm/amdkfd: device pgmap owner at the svm migrate init GPUs in the same XGMI hive have direct access to all members'VRAM. When mapping memory to a GPU, we don't need hmm_range_fault to fault device-private pages in the same hive back to the host. Identifying the page owner as the hive, rather than the individual GPU, accomplishes this. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9e4a91cd9ea9b9d6218f6c64c57c5ff412de919f Author: Alex Sierra Date: Tue Jun 29 11:40:47 2021 -0500 drm/amdkfd: inc counter on child ranges with xnack off During GPU page table invalidation with xnack off, new ranges split may occur concurrently in the same prange. Creating a new child per split. Each child should also increment its invalid counter, to assure GPU page table updates in these ranges. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1d40ef902d4c82f830ba2ee5fd389b33a5374675 Author: Nicholas Kazlauskas Date: Wed Jun 30 10:07:29 2021 -0400 drm/amd/display: Extend DMUB diagnostic logging to DCN3.1 [Why & How] Extend existing support for DCN2.1 DMUB diagnostic logging to DCN3.1 so we can collect useful information if the DMUB hangs. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit aa6158112645aae514982ad8d56df64428fcf203 Author: Joseph Greathouse Date: Tue Jun 29 21:08:52 2021 -0500 drm/amdgpu: Update NV SIMD-per-CU to 2 Navi series GPUs have 2 SIMDs per CU (and then 2 CUs per WGP). The NV enum headers incorrectly listed this as 4, which later meant we were incorrectly reporting the number of SIMDs in the HSA topology. This could cause problems down the line for user-space applications that want to launch a fixed amount of work to each SIMD. Signed-off-by: Joseph Greathouse Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 06ac9b6c736ac9da600b1782d7ac6d6e746286c4 Author: Alex Deucher Date: Mon Jun 28 15:56:01 2021 -0400 drm/amdgpu: add new dimgrey cavefish DID Add new PCI device id. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0e2125227eeef98dbd1cb93c5dd7158981b3355e Author: Shyam Sundar S K Date: Mon Jun 28 13:24:40 2021 +0530 drm/amd/pm: skip PrepareMp1ForUnload message in s0ix The documentation around PrepareMp1ForUnload message says that anything sent to SMU after this command would be stalled as the PMFW would not be in a state to take further job requests. Technically this is right in case of S3 scenario. But, this might not be the case during s0ix as the PMC driver would be the last to send the SMU on the OS_HINT. If SMU gets a PrepareMp1ForUnload message before the OS_HINT, this would stall the entire S0ix process. Results show that, this message to SMU is not required during S0ix and hence skip it. Reviewed-by: Prike Liang Signed-off-by: Shyam Sundar S K Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 9f6a78572033b9c35268387630353fa1bdee0320 Author: Huang Rui Date: Tue Jun 22 17:33:54 2021 +0800 drm/amdgpu: move apu flags initialization to the start of device init In some asics, we need to adjust the behavior according to the apu flags at very early stage. Signed-off-by: Huang Rui Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit 25f178bbd07817acd43643c97d7e6232daf3c323 Author: Reka Norman Date: Tue Jun 29 11:27:18 2021 +1000 drm/amd/display: Respect CONFIG_FRAME_WARN=0 in dml Makefile Setting CONFIG_FRAME_WARN=0 should disable 'stack frame larger than' warnings. This is useful for example in KASAN builds. Make the dml Makefile respect this config. Fixes the following build warnings with CONFIG_KASAN=y and CONFIG_FRAME_WARN=0: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3642:6: warning: stack frame size of 2216 bytes in function 'dml30_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than=] drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3957:6: warning: stack frame size of 2568 bytes in function 'dml31_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than=] Reviewed-by: Harry Wentland Signed-off-by: Reka Norman Signed-off-by: Alex Deucher commit 9ba85914c36c8fed9bf3e8b69c0782908c1247b7 Author: Jing Xiangfeng Date: Tue Jun 29 19:44:55 2021 +0800 drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create() radeon_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Reviewed-by: Christian König Signed-off-by: Jing Xiangfeng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c339a80d3a5a580a1aaefc2c9eeeb2a1feee4763 Author: Michal Suchanek Date: Wed Jun 23 12:30:39 2021 +0200 drm/amdgpu/dc: Really fix DCN3.1 Makefile for PPC64 Also copy over the part that makes old gcc handling cross-platform. Fixes: df7a1658f257 ("drm/amdgpu/dc: fix DCN3.1 Makefile for PPC64") Fixes: 926d6972efb6 ("drm/amd/display: Add DCN3.1 blocks to the DC Makefile") Reviewed-by: Harry Wentland Signed-off-by: Michal Suchanek Signed-off-by: Alex Deucher commit c1bfd74bfef77bcefc88d12eaf8996c0dfd51331 Author: Tiezhu Yang Date: Mon Jun 28 10:53:06 2021 -0400 drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 On the Loongson64 platform used with Radeon GPU, shutdown or reboot failed when console=tty is in the boot cmdline. radeon_suspend_kms() puts the hw in the suspend state, especially set fb state as FBINFO_STATE_SUSPENDED: if (fbcon) { console_lock(); radeon_fbdev_set_suspend(rdev, 1); console_unlock(); } Then avoid to do any more fb operations in the related functions: if (p->state != FBINFO_STATE_RUNNING) return; So call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 to fix this issue, it looks like some kind of workaround like powerpc. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Tiezhu Yang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8dbe43e99f0f62fc4f829b4fedc5d628a329fc38 Author: Oak Zeng Date: Mon Jun 28 17:53:38 2021 -0500 drm/amdgpu: Set ttm caching flags during bo allocation The ttm caching flags (ttm_cached, ttm_write_combined etc) are used to determine a buffer object's mapping attributes in both CPU page table and GPU page table (when that buffer is also accessed by GPU). Currently the ttm caching flags are set in function amdgpu_ttm_io_mem_reserve which is called during DRM_AMDGPU_GEM_MMAP ioctl. This has a problem since the GPU mapping of the buffer object (ioctl DRM_AMDGPU_GEM_VA) can happen earlier than the mmap time, thus the GPU page table update code can't pick up the right ttm caching flags to decide the right GPU page table attributes. This patch moves the ttm caching flags setting to function amdgpu_vram_mgr_new - this function is called during the first step of a buffer object create (eg, DRM_AMDGPU_GEM_CREATE) so the later both CPU and GPU mapping function calls will pick up this flag for CPU/GPU page table set up. v2: rebase (Alex) Signed-off-by: Oak Zeng Suggested-by: Christian Koenig Reviewed-by: Christian Koenig Reviewed-by: Feifei Xu Tested-by: Po Huang Signed-off-by: Alex Deucher commit 2d6608b57c50c54c3e46649110e8ea5a40959c30 Author: Andrew Jeffery Date: Fri Jun 25 15:40:17 2021 +0930 ARM: dts: tacoma: Add phase corrections for eMMC The degree values were reversed out from the magic tap values of 7 (in) and 15 + inversion (out) initially suggested by Aspeed. With the patch tacoma survives several gigabytes of reads and writes using dd while without it locks up randomly during the boot process. Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210625061017.1149942-1-andrew@aj.id.au Fixes: 2fc88f92359d ("mmc: sdhci-of-aspeed: Expose clock phase controls") Fixes: 961216c135a8 ("ARM: dts: aspeed: Add Rainier system") Signed-off-by: Joel Stanley commit b66596f62665e8ef9a26508f2dc938289eac6d0c Author: Guchun Chen Date: Mon Jun 28 17:08:00 2021 +0800 drm/amd/display: fix null pointer access in gpu reset During GPU reset, when receiving a DMCUB OUTBUX0 interrupt, DAL code will set it to be OUTBOX interrupt and sets hw interrupt. However, OUTBOX interrupt is not registered yet, so a NULL pointer access will be executed. Call Trace: dal_irq_service_set+0x30/0x90 [amdgpu] dc_interrupt_set+0x24/0x30 [amdgpu] amdgpu_dm_set_dmub_outbox_irq_state+0x22/0x30 [amdgpu] amdgpu_irq_update+0x77/0xa0 [amdgpu] amdgpu_irq_gpu_reset_resume_helper+0x67/0xa0 [amdgpu] amdgpu_do_asic_reset+0x219/0x260 [amdgpu] amdgpu_device_gpu_recover.cold+0x8c5/0xb64 [amdgpu] amdgpu_debugfs_gpu_recover_show+0x2c/0x60 [amdgpu] seq_read_iter+0xc2/0x450 ? do_anonymous_page+0x22c/0x3b0 seq_read+0xf9/0x140 full_proxy_read+0x5c/0x90 vfs_read+0xaa/0x190 ksys_read+0x67/0xe0 __x64_sys_read+0x1a/0x20 Fixes: effbf6ca7eafda ("drm/amdgpu/display: remove an old DCN3 guard") Signed-off-by: Guchun Chen Reviewed-and-tested-by: Evan Quan Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit e38ca7e422791a4d1c01e56dbf7f9982db0ed365 Author: Guchun Chen Date: Mon Jun 28 17:03:48 2021 +0800 drm/amd/display: fix incorrrect valid irq check valid DAL irq should be < DAL_IRQ_SOURCES_NUMBER. Signed-off-by: Guchun Chen Reviewed-and-tested-by: Evan Quan Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e2329e74a615cc58b25c42b7aa1477a5e3f6a435 Author: Aaron Liu Date: Fri Jun 25 13:50:19 2021 +0800 drm/amdgpu: enable sdma0 tmz for Raven/Renoir(V2) Without driver loaded, SDMA0_UTCL1_PAGE.TMZ_ENABLE is set to 1 by default for all asic. On Raven/Renoir, the sdma goldsetting changes SDMA0_UTCL1_PAGE.TMZ_ENABLE to 0. This patch restores SDMA0_UTCL1_PAGE.TMZ_ENABLE to 1. Signed-off-by: Aaron Liu Acked-by: Luben Tuikov Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c10bc260e7c030364b5150aac7ebf048ddfb9502 Author: Alexandre Ghiti Date: Thu Jun 24 14:00:40 2021 +0200 riscv: Introduce set_kernel_memory helper This helper should be used for setting permissions to the kernel mapping as it takes pointers as arguments and then avoids explicit cast to unsigned long needed for the set_memory_* API. Suggested-by: Christoph Hellwig Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 47513f243b452a5e21180dcf3d6ac1c57e1781a6 Author: Liu Shixin Date: Tue Jun 15 11:07:34 2021 +0800 riscv: Enable KFENCE for riscv64 Add architecture specific implementation details for KFENCE and enable KFENCE for the riscv64 architecture. In particular, this implements the required interface in . KFENCE requires that attributes for pages from its memory pool can individually be set. Therefore, force the kfence pool to be mapped at page granularity. Testing this patch using the testcases in kfence_test.c and all passed. Signed-off-by: Liu Shixin Acked-by: Marco Elver Reviewed-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit f627476e8f1a15495fb363e4a25f495460e8c969 Author: Palmer Dabbelt Date: Fri Jun 11 20:40:42 2021 -0700 RISC-V: Use asm-generic for {in,out}{bwlq} The asm-generic implementation is functionally identical to the RISC-V version. Signed-off-by: Palmer Dabbelt Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 3f1e782998cdf6dac037588b99b10b787b00810a Author: Guo Ren Date: Sun Jun 6 17:20:50 2021 +0200 riscv: add ASID-based tlbflushing methods Implement optimized version of the tlb flushing routines for systems using ASIDs. These are behind the use_asid_allocator static branch to not affect existing systems not using ASIDs. Signed-off-by: Guo Ren [hch: rebased on top of previous cleanups, use the same algorithm as the non-ASID based code for local vs global flushes, keep functions as local as possible] Signed-off-by: Christoph Hellwig Tested-by: Guo Ren Signed-off-by: Palmer Dabbelt commit 70c7605c08c5979e5148085903bfed5feac09406 Author: Christoph Hellwig Date: Sun Jun 6 17:20:49 2021 +0200 riscv: pass the mm_struct to __sbi_tlb_flush_range Move the call mm_cpumask from the callers into __sbi_tlb_flush_range to reduce a bit of duplicate code and prepare for future changes. Signed-off-by: Christoph Hellwig Tested-by: Guo Ren Signed-off-by: Palmer Dabbelt commit 46b76f2e09dc35f70aca2f4349eb0d158f53fe93 Author: Miaohe Lin Date: Wed Jun 30 18:52:55 2021 -0700 mm/zswap.c: fix two bugs in zswap_writeback_entry() In the ZSWAP_SWAPCACHE_FAIL and ZSWAP_SWAPCACHE_EXIST case, we forgot to call zpool_unmap_handle() when zpool can't sleep. And we might sleep in zswap_get_swap_cache_page() while zpool can't sleep. To fix all of these, zpool_unmap_handle() should be done before zswap_get_swap_cache_page() when zpool can't sleep. Link: https://lkml.kernel.org/r/20210522092242.3233191-4-linmiaohe@huawei.com Fixes: fc6697a89f56 ("mm/zswap: add the flag can_sleep_mapped") Signed-off-by: Miaohe Lin Cc: Colin Ian King Cc: Dan Streetman Cc: Nathan Chancellor Cc: Sebastian Andrzej Siewior Cc: Seth Jennings Cc: Tian Tao Cc: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae34af1f11d0a6ae849b7605d15df9798dab7b46 Author: Miaohe Lin Date: Wed Jun 30 18:52:52 2021 -0700 mm/zswap.c: avoid unnecessary copy-in at map time The buf mapped via zpool_map_handle() is only used to store compressed page buffer and there is no information to extract from it. So we could use ZPOOL_MM_WO instead to avoid unnecessary copy-in at map time. Link: https://lkml.kernel.org/r/20210522092242.3233191-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Colin Ian King Cc: Dan Streetman Cc: Nathan Chancellor Cc: Sebastian Andrzej Siewior Cc: Seth Jennings Cc: Tian Tao Cc: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c1e9a2c668b4606e9c27fe420ddf83d113928c8 Author: Miaohe Lin Date: Wed Jun 30 18:52:49 2021 -0700 mm/zswap.c: remove unused function zswap_debugfs_exit() Patch series "Cleanup and fixup for zswap". This series contains cleanups to remove unused function and avoid unnecessary copy-in at map time. Also this fixes two bugs in the function zswap_writeback_entry(). More details can be found in the respective changelogs. This patch (of 3): zswap_debugfs_exit() is unused, remove it. Link: https://lkml.kernel.org/r/20210522092242.3233191-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210522092242.3233191-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Sebastian Andrzej Siewior Cc: Nathan Chancellor Cc: Colin Ian King Cc: Tian Tao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27cacaad16c549ce5dd30ae84100b7e680536822 Author: Oscar Salvador Date: Wed Jun 30 18:52:46 2021 -0700 mm,memory_hotplug: drop unneeded locking Currently, memory-hotplug code takes zone's span_writelock and pgdat's resize_lock when resizing the node/zone's spanned pages via {move_pfn_range_to_zone(),remove_pfn_range_from_zone()} and when resizing node and zone's present pages via adjust_present_page_count(). These locks are also taken during the initialization of the system at boot time, where it protects parallel struct page initialization, but they should not really be needed in memory-hotplug where all operations are a) synchronized on device level and b) serialized by the mem_hotplug_lock lock. [akpm@linux-foundation.org: remove now-unused locals] Link: https://lkml.kernel.org/r/20210531093958.15021-1-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Vlastimil Babka Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 786dee864804f8e851cf0f258df2ccbb4ee03d80 Author: Liam Mark Date: Wed Jun 30 18:52:43 2021 -0700 mm/memory_hotplug: rate limit page migration warnings When offlining memory the system can attempt to migrate a lot of pages, if there are problems with migration this can flood the logs. Printing all the data hogs the CPU and cause some RT threads to run for a long time, which may have some bad consequences. Rate limit the page migration warnings in order to avoid this. Link: https://lkml.kernel.org/r/20210505140542.24935-1-georgi.djakov@linaro.org Signed-off-by: Liam Mark Signed-off-by: Georgi Djakov Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5bfac53e31087525ba5a629124b3100393b4d3e Author: David Hildenbrand Date: Wed Jun 30 18:52:39 2021 -0700 selftests/vm: add test for MADV_POPULATE_(READ|WRITE) Let's add a simple test for MADV_POPULATE_READ and MADV_POPULATE_WRITE, verifying some error handling, that population works, and that softdirty tracking works as expected. For now, limit the test to private anonymous memory. Link: https://lkml.kernel.org/r/20210419135443.12822-6-david@redhat.com Signed-off-by: David Hildenbrand Cc: Arnd Bergmann Cc: Michal Hocko Cc: Oscar Salvador Cc: Matthew Wilcox (Oracle) Cc: Andrea Arcangeli Cc: Minchan Kim Cc: Jann Horn Cc: Jason Gunthorpe Cc: Dave Hansen Cc: Hugh Dickins Cc: Rik van Riel Cc: Michael S. Tsirkin Cc: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Chris Zankel Cc: Max Filippov Cc: Mike Kravetz Cc: Peter Xu Cc: Rolf Eike Beer Cc: Shuah Khan Cc: Ram Pai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2abdd8b8a29e10aa8d600d2d377690560eb5db3f Author: David Hildenbrand Date: Wed Jun 30 18:52:36 2021 -0700 selftests/vm: add protection_keys_32 / protection_keys_64 to gitignore We missed adding two binaries to gitignore. Link: https://lkml.kernel.org/r/20210419135443.12822-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Jason Gunthorpe Cc: Peter Xu Cc: Ram Pai Cc: Shuah Khan Cc: Andrea Arcangeli Cc: Arnd Bergmann Cc: Chris Zankel Cc: Dave Hansen Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Jann Horn Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Matt Turner Cc: Max Filippov Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Minchan Kim Cc: Richard Henderson Cc: Rik van Riel Cc: Rolf Eike Beer Cc: Thomas Bogendoerfer Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d334317a9ac5ab42d18a1268773d4d557df8c3e Author: David Hildenbrand Date: Wed Jun 30 18:52:32 2021 -0700 MAINTAINERS: add tools/testing/selftests/vm/ to MEMORY MANAGEMENT MEMORY MANAGEMENT seems to be a good fit. Link: https://lkml.kernel.org/r/20210419135443.12822-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Mike Rapoport Cc: Michal Hocko Cc: Oscar Salvador Cc: Jason Gunthorpe Cc: Peter Xu Cc: Shuah Khan Cc: Andrea Arcangeli Cc: Arnd Bergmann Cc: Chris Zankel Cc: Dave Hansen Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Jann Horn Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Matt Turner Cc: Max Filippov Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Minchan Kim Cc: Ram Pai Cc: Richard Henderson Cc: Rik van Riel Cc: Rolf Eike Beer Cc: Thomas Bogendoerfer Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ca9b3859dac14bbef0c27d00667bb5b10917adb Author: David Hildenbrand Date: Wed Jun 30 18:52:28 2021 -0700 mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables I. Background: Sparse Memory Mappings When we manage sparse memory mappings dynamically in user space - also sometimes involving MAP_NORESERVE - we want to dynamically populate/ discard memory inside such a sparse memory region. Example users are hypervisors (especially implementing memory ballooning or similar technologies like virtio-mem) and memory allocators. In addition, we want to fail in a nice way (instead of generating SIGBUS) if populating does not succeed because we are out of backend memory (which can happen easily with file-based mappings, especially tmpfs and hugetlbfs). While MADV_DONTNEED, MADV_REMOVE and FALLOC_FL_PUNCH_HOLE allow for reliably discarding memory for most mapping types, there is no generic approach to populate page tables and preallocate memory. Although mmap() supports MAP_POPULATE, it is not applicable to the concept of sparse memory mappings, where we want to populate/discard dynamically and avoid expensive/problematic remappings. In addition, we never actually report errors during the final populate phase - it is best-effort only. fallocate() can be used to preallocate file-based memory and fail in a safe way. However, it cannot really be used for any private mappings on anonymous files via memfd due to COW semantics. In addition, fallocate() does not actually populate page tables, so we still always get pagefaults on first access - which is sometimes undesired (i.e., real-time workloads) and requires real prefaulting of page tables, not just a preallocation of backend storage. There might be interesting use cases for sparse memory regions along with mlockall(MCL_ONFAULT) which fallocate() cannot satisfy as it does not prefault page tables. II. On preallcoation/prefaulting from user space Because we don't have a proper interface, what applications (like QEMU and databases) end up doing is touching (i.e., reading+writing one byte to not overwrite existing data) all individual pages. However, that approach 1) Can result in wear on storage backing, because we end up reading/writing each page; this is especially a problem for dax/pmem. 2) Can result in mmap_sem contention when prefaulting via multiple threads. 3) Requires expensive signal handling, especially to catch SIGBUS in case of hugetlbfs/shmem/file-backed memory. For example, this is problematic in hypervisors like QEMU where SIGBUS handlers might already be used by other subsystems concurrently to e.g, handle hardware errors. "Simply" doing preallocation concurrently from other thread is not that easy. III. On MADV_WILLNEED Extending MADV_WILLNEED is not an option because 1. It would change the semantics: "Expect access in the near future." and "might be a good idea to read some pages" vs. "Definitely populate/ preallocate all memory and definitely fail on errors.". 2. Existing users (like virtio-balloon in QEMU when deflating the balloon) don't want populate/prealloc semantics. They treat this rather as a hint to give a little performance boost without too much overhead - and don't expect that a lot of memory might get consumed or a lot of time might be spent. IV. MADV_POPULATE_READ and MADV_POPULATE_WRITE Let's introduce MADV_POPULATE_READ and MADV_POPULATE_WRITE, inspired by MAP_POPULATE, with the following semantics: 1. MADV_POPULATE_READ can be used to prefault page tables just like manually reading each individual page. This will not break any COW mappings. The shared zero page might get mapped and no backend storage might get preallocated -- allocation might be deferred to write-fault time. Especially shared file mappings require an explicit fallocate() upfront to actually preallocate backend memory (blocks in the file system) in case the file might have holes. 2. If MADV_POPULATE_READ succeeds, all page tables have been populated (prefaulted) readable once. 3. MADV_POPULATE_WRITE can be used to preallocate backend memory and prefault page tables just like manually writing (or reading+writing) each individual page. This will break any COW mappings -- e.g., the shared zeropage is never populated. 4. If MADV_POPULATE_WRITE succeeds, all page tables have been populated (prefaulted) writable once. 5. MADV_POPULATE_READ and MADV_POPULATE_WRITE cannot be applied to special mappings marked with VM_PFNMAP and VM_IO. Also, proper access permissions (e.g., PROT_READ, PROT_WRITE) are required. If any such mapping is encountered, madvise() fails with -EINVAL. 6. If MADV_POPULATE_READ or MADV_POPULATE_WRITE fails, some page tables might have been populated. 7. MADV_POPULATE_READ and MADV_POPULATE_WRITE will return -EHWPOISON when encountering a HW poisoned page in the range. 8. Similar to MAP_POPULATE, MADV_POPULATE_READ and MADV_POPULATE_WRITE cannot protect from the OOM (Out Of Memory) handler killing the process. While the use case for MADV_POPULATE_WRITE is fairly obvious (i.e., preallocate memory and prefault page tables for VMs), one issue is that whenever we prefault pages writable, the pages have to be marked dirty, because the CPU could dirty them any time. while not a real problem for hugetlbfs or dax/pmem, it can be a problem for shared file mappings: each page will be marked dirty and has to be written back later when evicting. MADV_POPULATE_READ allows for optimizing this scenario: Pre-read a whole mapping from backend storage without marking it dirty, such that eviction won't have to write it back. As discussed above, shared file mappings might require an explciit fallocate() upfront to achieve preallcoation+prepopulation. Although sparse memory mappings are the primary use case, this will also be useful for other preallocate/prefault use cases where MAP_POPULATE is not desired or the semantics of MAP_POPULATE are not sufficient: as one example, QEMU users can trigger preallocation/prefaulting of guest RAM after the mapping was created -- and don't want errors to be silently suppressed. Looking at the history, MADV_POPULATE was already proposed in 2013 [1], however, the main motivation back than was performance improvements -- which should also still be the case. V. Single-threaded performance comparison I did a short experiment, prefaulting page tables on completely *empty mappings/files* and repeated the experiment 10 times. The results correspond to the shortest execution time. In general, the performance benefit for huge pages is negligible with small mappings. V.1: Private mappings POPULATE_READ and POPULATE_WRITE is fastest. Note that Reading/POPULATE_READ will populate the shared zeropage where applicable -- which result in short population times. The fastest way to allocate backend storage (here: swap or huge pages) and prefault page tables is POPULATE_WRITE. V.2: Shared mappings fallocate() is fastest, however, doesn't prefault page tables. POPULATE_WRITE is faster than simple writes and read/writes. POPULATE_READ is faster than simple reads. Without a fd, the fastest way to allocate backend storage and prefault page tables is POPULATE_WRITE. With an fd, the fastest way is usually FALLOCATE+POPULATE_READ or FALLOCATE+POPULATE_WRITE respectively; one exception are actual files: FALLOCATE+Read is slightly faster than FALLOCATE+POPULATE_READ. The fastest way to allocate backend storage prefault page tables is FALLOCATE+POPULATE_WRITE -- except when dealing with actual files; then, FALLOCATE+POPULATE_READ is fastest and won't directly mark all pages as dirty. v.3: Detailed results ================================================== 2 MiB MAP_PRIVATE: ************************************************** Anon 4 KiB : Read : 0.119 ms Anon 4 KiB : Write : 0.222 ms Anon 4 KiB : Read/Write : 0.380 ms Anon 4 KiB : POPULATE_READ : 0.060 ms Anon 4 KiB : POPULATE_WRITE : 0.158 ms Memfd 4 KiB : Read : 0.034 ms Memfd 4 KiB : Write : 0.310 ms Memfd 4 KiB : Read/Write : 0.362 ms Memfd 4 KiB : POPULATE_READ : 0.039 ms Memfd 4 KiB : POPULATE_WRITE : 0.229 ms Memfd 2 MiB : Read : 0.030 ms Memfd 2 MiB : Write : 0.030 ms Memfd 2 MiB : Read/Write : 0.030 ms Memfd 2 MiB : POPULATE_READ : 0.030 ms Memfd 2 MiB : POPULATE_WRITE : 0.030 ms tmpfs : Read : 0.033 ms tmpfs : Write : 0.313 ms tmpfs : Read/Write : 0.406 ms tmpfs : POPULATE_READ : 0.039 ms tmpfs : POPULATE_WRITE : 0.285 ms file : Read : 0.033 ms file : Write : 0.351 ms file : Read/Write : 0.408 ms file : POPULATE_READ : 0.039 ms file : POPULATE_WRITE : 0.290 ms hugetlbfs : Read : 0.030 ms hugetlbfs : Write : 0.030 ms hugetlbfs : Read/Write : 0.030 ms hugetlbfs : POPULATE_READ : 0.030 ms hugetlbfs : POPULATE_WRITE : 0.030 ms ************************************************** 4096 MiB MAP_PRIVATE: ************************************************** Anon 4 KiB : Read : 237.940 ms Anon 4 KiB : Write : 708.409 ms Anon 4 KiB : Read/Write : 1054.041 ms Anon 4 KiB : POPULATE_READ : 124.310 ms Anon 4 KiB : POPULATE_WRITE : 572.582 ms Memfd 4 KiB : Read : 136.928 ms Memfd 4 KiB : Write : 963.898 ms Memfd 4 KiB : Read/Write : 1106.561 ms Memfd 4 KiB : POPULATE_READ : 78.450 ms Memfd 4 KiB : POPULATE_WRITE : 805.881 ms Memfd 2 MiB : Read : 357.116 ms Memfd 2 MiB : Write : 357.210 ms Memfd 2 MiB : Read/Write : 357.606 ms Memfd 2 MiB : POPULATE_READ : 356.094 ms Memfd 2 MiB : POPULATE_WRITE : 356.937 ms tmpfs : Read : 137.536 ms tmpfs : Write : 954.362 ms tmpfs : Read/Write : 1105.954 ms tmpfs : POPULATE_READ : 80.289 ms tmpfs : POPULATE_WRITE : 822.826 ms file : Read : 137.874 ms file : Write : 987.025 ms file : Read/Write : 1107.439 ms file : POPULATE_READ : 80.413 ms file : POPULATE_WRITE : 857.622 ms hugetlbfs : Read : 355.607 ms hugetlbfs : Write : 355.729 ms hugetlbfs : Read/Write : 356.127 ms hugetlbfs : POPULATE_READ : 354.585 ms hugetlbfs : POPULATE_WRITE : 355.138 ms ************************************************** 2 MiB MAP_SHARED: ************************************************** Anon 4 KiB : Read : 0.394 ms Anon 4 KiB : Write : 0.348 ms Anon 4 KiB : Read/Write : 0.400 ms Anon 4 KiB : POPULATE_READ : 0.326 ms Anon 4 KiB : POPULATE_WRITE : 0.273 ms Anon 2 MiB : Read : 0.030 ms Anon 2 MiB : Write : 0.030 ms Anon 2 MiB : Read/Write : 0.030 ms Anon 2 MiB : POPULATE_READ : 0.030 ms Anon 2 MiB : POPULATE_WRITE : 0.030 ms Memfd 4 KiB : Read : 0.412 ms Memfd 4 KiB : Write : 0.372 ms Memfd 4 KiB : Read/Write : 0.419 ms Memfd 4 KiB : POPULATE_READ : 0.343 ms Memfd 4 KiB : POPULATE_WRITE : 0.288 ms Memfd 4 KiB : FALLOCATE : 0.137 ms Memfd 4 KiB : FALLOCATE+Read : 0.446 ms Memfd 4 KiB : FALLOCATE+Write : 0.330 ms Memfd 4 KiB : FALLOCATE+Read/Write : 0.454 ms Memfd 4 KiB : FALLOCATE+POPULATE_READ : 0.379 ms Memfd 4 KiB : FALLOCATE+POPULATE_WRITE : 0.268 ms Memfd 2 MiB : Read : 0.030 ms Memfd 2 MiB : Write : 0.030 ms Memfd 2 MiB : Read/Write : 0.030 ms Memfd 2 MiB : POPULATE_READ : 0.030 ms Memfd 2 MiB : POPULATE_WRITE : 0.030 ms Memfd 2 MiB : FALLOCATE : 0.030 ms Memfd 2 MiB : FALLOCATE+Read : 0.031 ms Memfd 2 MiB : FALLOCATE+Write : 0.031 ms Memfd 2 MiB : FALLOCATE+Read/Write : 0.031 ms Memfd 2 MiB : FALLOCATE+POPULATE_READ : 0.030 ms Memfd 2 MiB : FALLOCATE+POPULATE_WRITE : 0.030 ms tmpfs : Read : 0.416 ms tmpfs : Write : 0.369 ms tmpfs : Read/Write : 0.425 ms tmpfs : POPULATE_READ : 0.346 ms tmpfs : POPULATE_WRITE : 0.295 ms tmpfs : FALLOCATE : 0.139 ms tmpfs : FALLOCATE+Read : 0.447 ms tmpfs : FALLOCATE+Write : 0.333 ms tmpfs : FALLOCATE+Read/Write : 0.454 ms tmpfs : FALLOCATE+POPULATE_READ : 0.380 ms tmpfs : FALLOCATE+POPULATE_WRITE : 0.272 ms file : Read : 0.191 ms file : Write : 0.511 ms file : Read/Write : 0.524 ms file : POPULATE_READ : 0.196 ms file : POPULATE_WRITE : 0.434 ms file : FALLOCATE : 0.004 ms file : FALLOCATE+Read : 0.197 ms file : FALLOCATE+Write : 0.554 ms file : FALLOCATE+Read/Write : 0.480 ms file : FALLOCATE+POPULATE_READ : 0.201 ms file : FALLOCATE+POPULATE_WRITE : 0.381 ms hugetlbfs : Read : 0.030 ms hugetlbfs : Write : 0.030 ms hugetlbfs : Read/Write : 0.030 ms hugetlbfs : POPULATE_READ : 0.030 ms hugetlbfs : POPULATE_WRITE : 0.030 ms hugetlbfs : FALLOCATE : 0.030 ms hugetlbfs : FALLOCATE+Read : 0.031 ms hugetlbfs : FALLOCATE+Write : 0.031 ms hugetlbfs : FALLOCATE+Read/Write : 0.030 ms hugetlbfs : FALLOCATE+POPULATE_READ : 0.030 ms hugetlbfs : FALLOCATE+POPULATE_WRITE : 0.030 ms ************************************************** 4096 MiB MAP_SHARED: ************************************************** Anon 4 KiB : Read : 1053.090 ms Anon 4 KiB : Write : 913.642 ms Anon 4 KiB : Read/Write : 1060.350 ms Anon 4 KiB : POPULATE_READ : 893.691 ms Anon 4 KiB : POPULATE_WRITE : 782.885 ms Anon 2 MiB : Read : 358.553 ms Anon 2 MiB : Write : 358.419 ms Anon 2 MiB : Read/Write : 357.992 ms Anon 2 MiB : POPULATE_READ : 357.533 ms Anon 2 MiB : POPULATE_WRITE : 357.808 ms Memfd 4 KiB : Read : 1078.144 ms Memfd 4 KiB : Write : 942.036 ms Memfd 4 KiB : Read/Write : 1100.391 ms Memfd 4 KiB : POPULATE_READ : 925.829 ms Memfd 4 KiB : POPULATE_WRITE : 804.394 ms Memfd 4 KiB : FALLOCATE : 304.632 ms Memfd 4 KiB : FALLOCATE+Read : 1163.359 ms Memfd 4 KiB : FALLOCATE+Write : 933.186 ms Memfd 4 KiB : FALLOCATE+Read/Write : 1187.304 ms Memfd 4 KiB : FALLOCATE+POPULATE_READ : 1013.660 ms Memfd 4 KiB : FALLOCATE+POPULATE_WRITE : 794.560 ms Memfd 2 MiB : Read : 358.131 ms Memfd 2 MiB : Write : 358.099 ms Memfd 2 MiB : Read/Write : 358.250 ms Memfd 2 MiB : POPULATE_READ : 357.563 ms Memfd 2 MiB : POPULATE_WRITE : 357.334 ms Memfd 2 MiB : FALLOCATE : 356.735 ms Memfd 2 MiB : FALLOCATE+Read : 358.152 ms Memfd 2 MiB : FALLOCATE+Write : 358.331 ms Memfd 2 MiB : FALLOCATE+Read/Write : 358.018 ms Memfd 2 MiB : FALLOCATE+POPULATE_READ : 357.286 ms Memfd 2 MiB : FALLOCATE+POPULATE_WRITE : 357.523 ms tmpfs : Read : 1087.265 ms tmpfs : Write : 950.840 ms tmpfs : Read/Write : 1107.567 ms tmpfs : POPULATE_READ : 922.605 ms tmpfs : POPULATE_WRITE : 810.094 ms tmpfs : FALLOCATE : 306.320 ms tmpfs : FALLOCATE+Read : 1169.796 ms tmpfs : FALLOCATE+Write : 933.730 ms tmpfs : FALLOCATE+Read/Write : 1191.610 ms tmpfs : FALLOCATE+POPULATE_READ : 1020.474 ms tmpfs : FALLOCATE+POPULATE_WRITE : 798.945 ms file : Read : 654.101 ms file : Write : 1259.142 ms file : Read/Write : 1289.509 ms file : POPULATE_READ : 661.642 ms file : POPULATE_WRITE : 1106.816 ms file : FALLOCATE : 1.864 ms file : FALLOCATE+Read : 656.328 ms file : FALLOCATE+Write : 1153.300 ms file : FALLOCATE+Read/Write : 1180.613 ms file : FALLOCATE+POPULATE_READ : 668.347 ms file : FALLOCATE+POPULATE_WRITE : 996.143 ms hugetlbfs : Read : 357.245 ms hugetlbfs : Write : 357.413 ms hugetlbfs : Read/Write : 357.120 ms hugetlbfs : POPULATE_READ : 356.321 ms hugetlbfs : POPULATE_WRITE : 356.693 ms hugetlbfs : FALLOCATE : 355.927 ms hugetlbfs : FALLOCATE+Read : 357.074 ms hugetlbfs : FALLOCATE+Write : 357.120 ms hugetlbfs : FALLOCATE+Read/Write : 356.983 ms hugetlbfs : FALLOCATE+POPULATE_READ : 356.413 ms hugetlbfs : FALLOCATE+POPULATE_WRITE : 356.266 ms ************************************************** [1] https://lkml.org/lkml/2013/6/27/698 [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/20210419135443.12822-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Arnd Bergmann Cc: Michal Hocko Cc: Oscar Salvador Cc: Matthew Wilcox (Oracle) Cc: Andrea Arcangeli Cc: Minchan Kim Cc: Jann Horn Cc: Jason Gunthorpe Cc: Dave Hansen Cc: Hugh Dickins Cc: Rik van Riel Cc: Michael S. Tsirkin Cc: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Chris Zankel Cc: Max Filippov Cc: Mike Kravetz Cc: Peter Xu Cc: Rolf Eike Beer Cc: Ram Pai Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a78f1ccd37fbcda706745220b5db76902b325900 Author: David Hildenbrand Date: Wed Jun 30 18:52:23 2021 -0700 mm: make variable names for populate_vma_page_range() consistent Patch series "mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables", v2. Excessive details on MADV_POPULATE_(READ|WRITE) can be found in patch #2. This patch (of 5): Let's make the variable names in the function declaration match the variable names used in the definition. Link: https://lkml.kernel.org/r/20210419135443.12822-1-david@redhat.com Link: https://lkml.kernel.org/r/20210419135443.12822-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: Jason Gunthorpe Cc: Peter Xu Cc: Andrea Arcangeli Cc: Arnd Bergmann Cc: Chris Zankel Cc: Dave Hansen Cc: Helge Deller Cc: Hugh Dickins Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: Jann Horn Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Matt Turner Cc: Max Filippov Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Minchan Kim Cc: Ram Pai Cc: Richard Henderson Cc: Rik van Riel Cc: Rolf Eike Beer Cc: Shuah Khan Cc: Thomas Bogendoerfer Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63703f37aa09e2c12c0ff25afbf5c460b21bfe4c Author: Kefeng Wang Date: Wed Jun 30 18:52:20 2021 -0700 mm: generalize ZONE_[DMA|DMA32] ZONE_[DMA|DMA32] configs have duplicate definitions on platforms that subscribe to them. Instead, just make them generic options which can be selected on applicable platforms. Also only x86/arm64 architectures could enable both ZONE_DMA and ZONE_DMA32 if EXPERT, add ARCH_HAS_ZONE_DMA_SET to make dma zone configurable and visible on the two architectures. Link: https://lkml.kernel.org/r/20210528074557.17768-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas [arm64] Acked-by: Geert Uytterhoeven [m68k] Acked-by: Mike Rapoport Acked-by: Palmer Dabbelt [RISC-V] Acked-by: Michal Simek [microblaze] Acked-by: Michael Ellerman [powerpc] Cc: Catalin Marinas Cc: Will Deacon Cc: Geert Uytterhoeven Cc: Thomas Bogendoerfer Cc: "David S. Miller" Cc: Ingo Molnar Cc: Borislav Petkov Cc: Richard Henderson Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db1d9152c91acf2fef2eb16718a0aafee60dde30 Author: Liam Howlett Date: Wed Jun 30 18:52:17 2021 -0700 mm/nommu: unexport do_munmap() do_munmap() does not take the mmap_write_lock(). vm_munmap() should be used instead. Link: https://lkml.kernel.org/r/20210604194002.648037-1-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Andrew Morton Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 176056fd740ecaa9873facfc257f8396804754ce Author: Chen Li Date: Wed Jun 30 18:52:14 2021 -0700 nommu: remove __GFP_HIGHMEM in vmalloc/vzalloc mm/nommu.c: void *__vmalloc(unsigned long size, gfp_t gfp_mask) { /* * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc() * returns only a logical address. */ return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); } nommu's __vmalloc just uses kmalloc internally and elimitates __GFP_HIGHMEM, so it makes no sense to add __GFP_HIGHMEM for nommu's vmalloc/vzalloc. [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/875z00rnp8.wl-chenli@uniontech.com Signed-off-by: Chen Li Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Cc: Greg Ungerer Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1212e00c93a8016dfd70d209f428f8e0edd5856f Author: Matthew Wilcox (Oracle) Date: Wed Jun 30 18:52:11 2021 -0700 mm/thp: fix strncpy warning Using MAX_INPUT_BUF_SZ as the maximum length of the string makes fortify complain as it thinks the string might be longer than the buffer, and if it is, we will end up with a "string" that is missing a NUL terminator. It's trivial to show that 'tok' points to a NUL-terminated string which is less than MAX_INPUT_BUF_SZ in length, so we may as well just use strcpy() and avoid the warning. Link: https://lkml.kernel.org/r/20210615200242.1716568-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36af67370e33db2ec48693dd20d6b3cd049e07af Author: Hugh Dickins Date: Wed Jun 30 18:52:08 2021 -0700 mm: hwpoison_user_mappings() try_to_unmap() with TTU_SYNC TTU_SYNC prevents an unlikely race, when try_to_unmap() returns shortly before the page is accounted as unmapped. It is unlikely to coincide with hwpoisoning, but now that we have the flag, hwpoison_user_mappings() would do well to use it. Link: https://lkml.kernel.org/r/329c28ed-95df-9a2c-8893-b444d8a6d340@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Acked-by: Naoya Horiguchi Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab02c252c8609c73ff2897c7e961b631e8bd409c Author: Hugh Dickins Date: Wed Jun 30 18:52:04 2021 -0700 mm/thp: remap_page() is only needed on anonymous THP THP splitting's unmap_page() only sets TTU_SPLIT_FREEZE when PageAnon, and migration entries are only inserted when TTU_MIGRATION (unused here) or TTU_SPLIT_FREEZE is set: so it's just a waste of time for remap_page() to search for migration entries to remove when !PageAnon. Link: https://lkml.kernel.org/r/f987bc44-f28e-688d-2424-b4722153ed8@google.com Fixes: baa355fd3314 ("thp: file pages support for split_huge_page()") Signed-off-by: Hugh Dickins Reviewed-by: Yang Shi Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1fb08ac63beedf58e2ae9f229ea1f9474949a185 Author: Yang Shi Date: Wed Jun 30 18:52:01 2021 -0700 mm: rmap: make try_to_unmap() void function Currently try_to_unmap() return bool value by checking page_mapcount(), however this may return false positive since page_mapcount() doesn't check all subpages of compound page. The total_mapcount() could be used instead, but its cost is higher since it traverses all subpages. Actually the most callers of try_to_unmap() don't care about the return value at all. So just need check if page is still mapped by page_mapped() when necessary. And page_mapped() does bail out early when it finds mapped subpage. Link: https://lkml.kernel.org/r/bb27e3fe-6036-b637-5086-272befbfe3da@google.com Suggested-by: Hugh Dickins Signed-off-by: Yang Shi Acked-by: Minchan Kim Reviewed-by: Shakeel Butt Acked-by: Kirill A. Shutemov Signed-off-by: Hugh Dickins Acked-by: Naoya Horiguchi Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Wang Yugui Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cebc774fdc9cb39b959968fbfd7aabe7a8a5154c Author: Anshuman Khandual Date: Wed Jun 30 18:51:58 2021 -0700 mm/thp: make ARCH_ENABLE_SPLIT_PMD_PTLOCK dependent on PGTABLE_LEVELS > 2 ARCH_ENABLE_SPLIT_PMD_PTLOCK is irrelevant unless there are more than two page table levels including PMD (also per Documentation/vm/split_page_table_lock.rst). Make this dependency explicit on remaining platforms i.e x86 and s390 where ARCH_ENABLE_SPLIT_PMD_PTLOCK is subscribed. Link: https://lkml.kernel.org/r/1622013501-20409-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Gerald Schaefer # s390 Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e346e6688c4aa18588f2c6a75b572d8ca7a65f5f Author: Yang Shi Date: Wed Jun 30 18:51:55 2021 -0700 mm: thp: skip make PMD PROT_NONE if THP migration is not supported A quick grep shows x86_64, PowerPC (book3s), ARM64 and S390 support both NUMA balancing and THP. But S390 doesn't support THP migration so NUMA balancing actually can't migrate any misplaced pages. Skip make PMD PROT_NONE for such case otherwise CPU cycles may be wasted by pointless NUMA hinting faults on S390. Link: https://lkml.kernel.org/r/20210518200801.7413-8-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Mel Gorman Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Huang Ying Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vasily Gorbik Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 662aeea7536d84d7e1d01739694e4748ba294ce0 Author: Yang Shi Date: Wed Jun 30 18:51:51 2021 -0700 mm: migrate: check mapcount for THP instead of refcount The generic migration path will check refcount, so no need check refcount here. But the old code actually prevents from migrating shared THP (mapped by multiple processes), so bail out early if mapcount is > 1 to keep the behavior. Link: https://lkml.kernel.org/r/20210518200801.7413-7-shy828301@gmail.com Signed-off-by: Yang Shi Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Huang Ying Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Michal Hocko Cc: Vasily Gorbik Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b0b515bfb3f4f3dc208862989e38ee5268a1003f Author: Yang Shi Date: Wed Jun 30 18:51:48 2021 -0700 mm: migrate: don't split THP for misplaced NUMA page The old behavior didn't split THP if migration is failed due to lack of memory on the target node. But the THP migration does split THP, so keep the old behavior for misplaced NUMA page migration. Link: https://lkml.kernel.org/r/20210518200801.7413-6-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Mel Gorman Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Huang Ying Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vasily Gorbik Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5fc5c3ae0c849c713c4291addb5fce699ad0972 Author: Yang Shi Date: Wed Jun 30 18:51:45 2021 -0700 mm: migrate: account THP NUMA migration counters correctly Now both base page and THP NUMA migration is done via migrate_misplaced_page(), keep the counters correctly for THP. Link: https://lkml.kernel.org/r/20210518200801.7413-5-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Mel Gorman Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Huang Ying Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vasily Gorbik Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5b5a3dd2c1fa61049b7789ce596faff4d659a61 Author: Yang Shi Date: Wed Jun 30 18:51:42 2021 -0700 mm: thp: refactor NUMA fault handling When the THP NUMA fault support was added THP migration was not supported yet. So the ad hoc THP migration was implemented in NUMA fault handling. Since v4.14 THP migration has been supported so it doesn't make too much sense to still keep another THP migration implementation rather than using the generic migration code. This patch reworks the NUMA fault handling to use generic migration implementation to migrate misplaced page. There is no functional change. After the refactor the flow of NUMA fault handling looks just like its PTE counterpart: Acquire ptl Prepare for migration (elevate page refcount) Release ptl Isolate page from lru and elevate page refcount Migrate the misplaced THP If migration fails just restore the old normal PMD. In the old code anon_vma lock was needed to serialize THP migration against THP split, but since then the THP code has been reworked a lot, it seems anon_vma lock is not required anymore to avoid the race. The page refcount elevation when holding ptl should prevent from THP split. Use migrate_misplaced_page() for both base page and THP NUMA hinting fault and remove all the dead and duplicate code. [dan.carpenter@oracle.com: fix a double unlock bug] Link: https://lkml.kernel.org/r/YLX8uYN01JmfLnlK@mwanda Link: https://lkml.kernel.org/r/20210518200801.7413-4-shy828301@gmail.com Signed-off-by: Yang Shi Signed-off-by: Dan Carpenter Acked-by: Mel Gorman Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Huang Ying Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vasily Gorbik Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4c0d8367ea492cdfc7f6d14763c02f472731592 Author: Yang Shi Date: Wed Jun 30 18:51:39 2021 -0700 mm: memory: make numa_migrate_prep() non-static The numa_migrate_prep() will be used by huge NUMA fault as well in the following patch, make it non-static. Link: https://lkml.kernel.org/r/20210518200801.7413-3-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Mel Gorman Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Huang Ying Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vasily Gorbik Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5db4f15c4fd7ae74dd40c6f84bf56dfcf13d10cf Author: Yang Shi Date: Wed Jun 30 18:51:35 2021 -0700 mm: memory: add orig_pmd to struct vm_fault Pach series "mm: thp: use generic THP migration for NUMA hinting fault", v3. When the THP NUMA fault support was added THP migration was not supported yet. So the ad hoc THP migration was implemented in NUMA fault handling. Since v4.14 THP migration has been supported so it doesn't make too much sense to still keep another THP migration implementation rather than using the generic migration code. It is definitely a maintenance burden to keep two THP migration implementation for different code paths and it is more error prone. Using the generic THP migration implementation allows us remove the duplicate code and some hacks needed by the old ad hoc implementation. A quick grep shows x86_64, PowerPC (book3s), ARM64 ans S390 support both THP and NUMA balancing. The most of them support THP migration except for S390. Zi Yan tried to add THP migration support for S390 before but it was not accepted due to the design of S390 PMD. For the discussion, please see: https://lkml.org/lkml/2018/4/27/953. Per the discussion with Gerald Schaefer in v1 it is acceptible to skip huge PMD for S390 for now. I saw there were some hacks about gup from git history, but I didn't figure out if they have been removed or not since I just found FOLL_NUMA code in the current gup implementation and they seems useful. Patch #1 ~ #2 are preparation patches. Patch #3 is the real meat. Patch #4 ~ #6 keep consistent counters and behaviors with before. Patch #7 skips change huge PMD to prot_none if thp migration is not supported. Test ---- Did some tests to measure the latency of do_huge_pmd_numa_page. The test VM has 80 vcpus and 64G memory. The test would create 2 processes to consume 128G memory together which would incur memory pressure to cause THP splits. And it also creates 80 processes to hog cpu, and the memory consumer processes are bound to different nodes periodically in order to increase NUMA faults. The below test script is used: echo 3 > /proc/sys/vm/drop_caches # Run stress-ng for 24 hours ./stress-ng/stress-ng --vm 2 --vm-bytes 64G --timeout 24h & PID=$! ./stress-ng/stress-ng --cpu $NR_CPUS --timeout 24h & # Wait for vm stressors forked sleep 5 PID_1=`pgrep -P $PID | awk 'NR == 1'` PID_2=`pgrep -P $PID | awk 'NR == 2'` JOB1=`pgrep -P $PID_1` JOB2=`pgrep -P $PID_2` # Bind load jobs to different nodes periodically to force generate # cross node memory access while [ -d "/proc/$PID" ] do taskset -apc 8 $JOB1 taskset -apc 8 $JOB2 sleep 300 taskset -apc 58 $JOB1 taskset -apc 58 $JOB2 sleep 300 done With the above test the histogram of latency of do_huge_pmd_numa_page is as shown below. Since the number of do_huge_pmd_numa_page varies drastically for each run (should be due to scheduler), so I converted the raw number to percentage. patched base @us[stress-ng]: [0] 3.57% 0.16% [1] 55.68% 18.36% [2, 4) 10.46% 40.44% [4, 8) 7.26% 17.82% [8, 16) 21.12% 13.41% [16, 32) 1.06% 4.27% [32, 64) 0.56% 4.07% [64, 128) 0.16% 0.35% [128, 256) < 0.1% < 0.1% [256, 512) < 0.1% < 0.1% [512, 1K) < 0.1% < 0.1% [1K, 2K) < 0.1% < 0.1% [2K, 4K) < 0.1% < 0.1% [4K, 8K) < 0.1% < 0.1% [8K, 16K) < 0.1% < 0.1% [16K, 32K) < 0.1% < 0.1% [32K, 64K) < 0.1% < 0.1% Per the result, patched kernel is even slightly better than the base kernel. I think this is because the lock contention against THP split is less than base kernel due to the refactor. To exclude the affect from THP split, I also did test w/o memory pressure. No obvious regression is spotted. The below is the test result *w/o* memory pressure. patched base @us[stress-ng]: [0] 7.97% 18.4% [1] 69.63% 58.24% [2, 4) 4.18% 2.63% [4, 8) 0.22% 0.17% [8, 16) 1.03% 0.92% [16, 32) 0.14% < 0.1% [32, 64) < 0.1% < 0.1% [64, 128) < 0.1% < 0.1% [128, 256) < 0.1% < 0.1% [256, 512) 0.45% 1.19% [512, 1K) 15.45% 17.27% [1K, 2K) < 0.1% < 0.1% [2K, 4K) < 0.1% < 0.1% [4K, 8K) < 0.1% < 0.1% [8K, 16K) 0.86% 0.88% [16K, 32K) < 0.1% 0.15% [32K, 64K) < 0.1% < 0.1% [64K, 128K) < 0.1% < 0.1% [128K, 256K) < 0.1% < 0.1% The series also survived a series of tests that exercise NUMA balancing migrations by Mel. This patch (of 7): Add orig_pmd to struct vm_fault so the "orig_pmd" parameter used by huge page fault could be removed, just like its PTE counterpart does. Link: https://lkml.kernel.org/r/20210518200801.7413-1-shy828301@gmail.com Link: https://lkml.kernel.org/r/20210518200801.7413-2-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Mel Gorman Cc: Kirill A. Shutemov Cc: Zi Yan Cc: Huang Ying Cc: Michal Hocko Cc: Hugh Dickins Cc: Gerald Schaefer Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb6ecbed0aa27360712d0674bf132843a9567344 Author: Collin Fijalkovich Date: Wed Jun 30 18:51:32 2021 -0700 mm, thp: relax the VM_DENYWRITE constraint on file-backed THPs Transparent huge pages are supported for read-only non-shmem files, but are only used for vmas with VM_DENYWRITE. This condition ensures that file THPs are protected from writes while an application is running (ETXTBSY). Any existing file THPs are then dropped from the page cache when a file is opened for write in do_dentry_open(). Since sys_mmap ignores MAP_DENYWRITE, this constrains the use of file THPs to vmas produced by execve(). Systems that make heavy use of shared libraries (e.g. Android) are unable to apply VM_DENYWRITE through the dynamic linker, preventing them from benefiting from the resultant reduced contention on the TLB. This patch reduces the constraint on file THPs allowing use with any executable mapping from a file not opened for write (see inode_is_open_for_write()). It also introduces additional conditions to ensure that files opened for write will never be backed by file THPs. Restricting the use of THPs to executable mappings eliminates the risk that a read-only file later opened for write would encounter significant latencies due to page cache truncation. The ld linker flag '-z max-page-size=(hugepage size)' can be used to produce executables with the necessary layout. The dynamic linker must map these file's segments at a hugepage size aligned vma for the mapping to be backed with THPs. Comparison of the performance characteristics of 4KB and 2MB-backed libraries follows; the Android dex2oat tool was used to AOT compile an example application on a single ARM core. 4KB Pages: ========== count event_name # count / runtime 598,995,035,942 cpu-cycles # 1.800861 GHz 81,195,620,851 raw-stall-frontend # 244.112 M/sec 347,754,466,597 iTLB-loads # 1.046 G/sec 2,970,248,900 iTLB-load-misses # 0.854122% miss rate Total test time: 332.854998 seconds. 2MB Pages: ========== count event_name # count / runtime 592,872,663,047 cpu-cycles # 1.800358 GHz 76,485,624,143 raw-stall-frontend # 232.261 M/sec 350,478,413,710 iTLB-loads # 1.064 G/sec 803,233,322 iTLB-load-misses # 0.229182% miss rate Total test time: 329.826087 seconds A check of /proc/$(pidof dex2oat64)/smaps shows THPs in use: /apex/com.android.art/lib64/libart.so FilePmdMapped: 4096 kB /apex/com.android.art/lib64/libart-compiler.so FilePmdMapped: 2048 kB Link: https://lkml.kernel.org/r/20210406000930.3455850-1-cfijalkovich@google.com Signed-off-by: Collin Fijalkovich Acked-by: Hugh Dickins Reviewed-by: William Kucharski Acked-by: Song Liu Cc: Suren Baghdasaryan Cc: Hridya Valsaraju Cc: Kalesh Singh Cc: Tim Murray Cc: Matthew Wilcox Cc: Alexander Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6acfb5ba150cf75005ce85e0e25d79ef2fec287c Author: Muchun Song Date: Wed Jun 30 18:51:29 2021 -0700 mm: migrate: fix missing update page_private to hugetlb_page_subpool Since commit d6995da31122 ("hugetlb: use page.private for hugetlb specific page flags") converts page.private for hugetlb specific page flags. We should use hugetlb_page_subpool() to get the subpool pointer instead of page_private(). This 'could' prevent the migration of hugetlb pages. page_private(hpage) is now used for hugetlb page specific flags. At migration time, the only flag which could be set is HPageVmemmapOptimized. This flag will only be set if the new vmemmap reduction feature is enabled. In addition, !page_mapping() implies an anonymous mapping. So, this will prevent migration of hugetb pages in anonymous mappings if the vmemmap reduction feature is enabled. In addition, that if statement checked for the rare race condition of a page being migrated while in the process of being freed. Since that check is now wrong, we could leak hugetlb subpool usage counts. The commit forgot to update it in the page migration routine. So fix it. [songmuchun@bytedance.com: fix compiler error when !CONFIG_HUGETLB_PAGE reported by Randy] Link: https://lkml.kernel.org/r/20210521022747.35736-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210520025949.1866-1-songmuchun@bytedance.com Fixes: d6995da31122 ("hugetlb: use page.private for hugetlb specific page flags") Signed-off-by: Muchun Song Reported-by: Anshuman Khandual Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Tested-by: Anshuman Khandual [arm64] Cc: Oscar Salvador Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16c9afc776608324ca71c0bc354987bab532f51d Author: Anshuman Khandual Date: Wed Jun 30 18:51:26 2021 -0700 arm64/mm: drop HAVE_ARCH_PFN_VALID CONFIG_SPARSEMEM_VMEMMAP is now the only available memory model on arm64 platforms and free_unused_memmap() would just return without creating any holes in the memmap mapping. There is no need for any special handling in pfn_valid() and HAVE_ARCH_PFN_VALID can just be dropped. This also moves the pfn upper bits sanity check into generic pfn_valid(). Link: https://lkml.kernel.org/r/1621947349-25421-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand Acked-by: Mike Rapoport Cc: Catalin Marinas Cc: Will Deacon Cc: David Hildenbrand Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7d9f306ba7052056edf9ccae596aeb400226af8 Author: Mike Rapoport Date: Wed Jun 30 18:51:22 2021 -0700 arm64: drop pfn_valid_within() and simplify pfn_valid() The arm64's version of pfn_valid() differs from the generic because of two reasons: * Parts of the memory map are freed during boot. This makes it necessary to verify that there is actual physical memory that corresponds to a pfn which is done by querying memblock. * There are NOMAP memory regions. These regions are not mapped in the linear map and until the previous commit the struct pages representing these areas had default values. As the consequence of absence of the special treatment of NOMAP regions in the memory map it was necessary to use memblock_is_map_memory() in pfn_valid() and to have pfn_valid_within() aliased to pfn_valid() so that generic mm functionality would not treat a NOMAP page as a normal page. Since the NOMAP regions are now marked as PageReserved(), pfn walkers and the rest of core mm will treat them as unusable memory and thus pfn_valid_within() is no longer required at all and can be disabled on arm64. pfn_valid() can be slightly simplified by replacing memblock_is_map_memory() with memblock_is_memory(). [rppt@kernel.org: fix merge fix] Link: https://lkml.kernel.org/r/YJtoQhidtIJOhYsV@kernel.org Link: https://lkml.kernel.org/r/20210511100550.28178-5-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: David Hildenbrand Acked-by: Ard Biesheuvel Reviewed-by: Kefeng Wang Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 873ba463914cf484371cba06959d320f9d3121ca Author: Mike Rapoport Date: Wed Jun 30 18:51:19 2021 -0700 arm64: decouple check whether pfn is in linear map from pfn_valid() The intended semantics of pfn_valid() is to verify whether there is a struct page for the pfn in question and nothing else. Yet, on arm64 it is used to distinguish memory areas that are mapped in the linear map vs those that require ioremap() to access them. Introduce a dedicated pfn_is_map_memory() wrapper for memblock_is_map_memory() to perform such check and use it where appropriate. Using a wrapper allows to avoid cyclic include dependencies. While here also update style of pfn_valid() so that both pfn_valid() and pfn_is_map_memory() declarations will be consistent. Link: https://lkml.kernel.org/r/20210511100550.28178-4-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: David Hildenbrand Acked-by: Ard Biesheuvel Reviewed-by: Kefeng Wang Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9092d4f7a1f846bcc72e9aace4ed64ed3fc4aa32 Author: Mike Rapoport Date: Wed Jun 30 18:51:16 2021 -0700 memblock: update initialization of reserved pages The struct pages representing a reserved memory region are initialized using reserve_bootmem_range() function. This function is called for each reserved region just before the memory is freed from memblock to the buddy page allocator. The struct pages for MEMBLOCK_NOMAP regions are kept with the default values set by the memory map initialization which makes it necessary to have a special treatment for such pages in pfn_valid() and pfn_valid_within(). Split out initialization of the reserved pages to a function with a meaningful name and treat the MEMBLOCK_NOMAP regions the same way as the reserved regions and mark struct pages for the NOMAP regions as PageReserved. Link: https://lkml.kernel.org/r/20210511100550.28178-3-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Acked-by: Ard Biesheuvel Reviewed-by: Kefeng Wang Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 51c656aef629bae94f2b07fcee7eabe280b905ea Author: Mike Rapoport Date: Wed Jun 30 18:51:13 2021 -0700 include/linux/mmzone.h: add documentation for pfn_valid() Patch series "arm64: drop pfn_valid_within() and simplify pfn_valid()", v4. These patches aim to remove CONFIG_HOLES_IN_ZONE and essentially hardwire pfn_valid_within() to 1. The idea is to mark NOMAP pages as reserved in the memory map and restore the intended semantics of pfn_valid() to designate availability of struct page for a pfn. With this the core mm will be able to cope with the fact that it cannot use NOMAP pages and the holes created by NOMAP ranges within MAX_ORDER blocks will be treated correctly even without the need for pfn_valid_within. This patch (of 4): Add comment describing the semantics of pfn_valid() that clarifies that pfn_valid() only checks for availability of a memory map entry (i.e. struct page) for a PFN rather than availability of usable memory backing that PFN. The most "generic" version of pfn_valid() used by the configurations with SPARSEMEM enabled resides in include/linux/mmzone.h so this is the most suitable place for documentation about semantics of pfn_valid(). Link: https://lkml.kernel.org/r/20210511100550.28178-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20210511100550.28178-2-rppt@kernel.org Signed-off-by: Mike Rapoport Suggested-by: Anshuman Khandual Reviewed-by: Anshuman Khandual Acked-by: Ard Biesheuvel Reviewed-by: Kefeng Wang Cc: Catalin Marinas Cc: David Hildenbrand Cc: Marc Zyngier Cc: Mark Rutland Cc: Mike Rapoport Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 269fbe72cded0afce0090103e90d2ae8ef8ac5b5 Author: Ben Widawsky Date: Wed Jun 30 18:51:10 2021 -0700 mm/mempolicy: use unified 'nodes' for bind/interleave/prefer policies Current structure 'mempolicy' uses a union to store the node info for bind/interleave/perfer policies. union { short preferred_node; /* preferred */ nodemask_t nodes; /* interleave/bind */ /* undefined for default */ } v; Since preferred node can also be represented by a nodemask_t with only ont bit set, unify these policies with using one nodemask_t 'nodes', which can remove a union, simplify the code and make it easier to support future's new policy's node info. Link: https://lore.kernel.org/r/20200630212517.308045-7-ben.widawsky@intel.com Link: https://lkml.kernel.org/r/1623399825-75651-1-git-send-email-feng.tang@intel.com Co-developed-by: Feng Tang Signed-off-by: Ben Widawsky Signed-off-by: Feng Tang Cc: Michal Hocko Cc: David Rientjes Cc: Dave Hansen Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Mike Kravetz Cc: Vlastimil Babka Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5947d23edd897ffe068564e91fd186adb95ee6d Author: Yang Shi Date: Wed Jun 30 18:51:07 2021 -0700 mm: mempolicy: don't have to split pmd for huge zero page When trying to migrate pages to obey mempolicy, the huge zero page is split by inserting base zero pfn to all PTEs, then the page table walk fallback to PTE level and just skips zero page. Skipping zero page for mempolicy has been the behavior of kernel since v2.6.16 due to commit f4598c8b3678 ("[PATCH] migration: make sure there is no attempt to migrate reserved pages."). So it seems pointless to split huge zero page, it could be just skipped like base zero page. Set ACTION_CONTINUE to prevent the walk_page_range() split the pmd for this case. Link: https://lkml.kernel.org/r/20210609172146.3594-1-shy828301@gmail.com Link: https://lkml.kernel.org/r/20210604203513.240709-1-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: Zi Yan Acked-by: Michal Hocko Cc: Naoya Horiguchi Cc: Kirill A. Shutemov Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95837924587c60425f941dc8cbfba61cb964fcb5 Author: Feng Tang Date: Wed Jun 30 18:51:03 2021 -0700 mm/mempolicy: unify the parameter sanity check for mbind and set_mempolicy Currently the kernel_mbind() and kernel_set_mempolicy() do almost the same operation for parameter sanity check. Add a helper function to unify the code to reduce the redundancy, and make it easier for changing the sanity check code in future. [thanks to David Rientjes for suggesting using helper function instead of macro]. [feng.tang@intel.com: add comment] Link: https://lkml.kernel.org/r/1622560492-1294-4-git-send-email-feng.tang@intel.com Link: https://lkml.kernel.org/r/1622469956-82897-4-git-send-email-feng.tang@intel.com Signed-off-by: Feng Tang Acked-by: Michal Hocko Cc: David Rientjes Cc: Dave Hansen Cc: Ben Widawsky Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Mike Kravetz Cc: Randy Dunlap Cc: Vlastimil Babka Cc: Andi Kleen Cc: Dan Williams Cc: Huang Ying Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7858d7bca7fbbbbd5b940d2ec371b2d060b21b84 Author: Feng Tang Date: Wed Jun 30 18:51:00 2021 -0700 mm/mempolicy: don't handle MPOL_LOCAL like a fake MPOL_PREFERRED policy MPOL_LOCAL policy has been setup as a real policy, but it is still handled like a faked POL_PREFERRED policy with one internal MPOL_F_LOCAL flag bit set, and there are many places having to judge the real 'prefer' or the 'local' policy, which are quite confusing. In current code, there are 4 cases that MPOL_LOCAL are used: 1. user specifies 'local' policy 2. user specifies 'prefer' policy, but with empty nodemask 3. system 'default' policy is used 4. 'prefer' policy + valid 'preferred' node with MPOL_F_STATIC_NODES flag set, and when it is 'rebind' to a nodemask which doesn't contains the 'preferred' node, it will perform as 'local' policy So make 'local' a real policy instead of a fake 'prefer' one, and kill MPOL_F_LOCAL bit, which can greatly reduce the confusion for code reading. For case 4, the logic of mpol_rebind_preferred() is confusing, as Michal Hocko pointed out: : I do believe that rebinding preferred policy is just bogus and it should : be dropped altogether on the ground that a preference is a mere hint from : userspace where to start the allocation. Unless I am missing something : cpusets will be always authoritative for the final placement. The : preferred node just acts as a starting point and it should be really : preserved when cpusets changes. Otherwise we have a very subtle behavior : corner cases. So dump all the tricky transformation between 'prefer' and 'local', and just record the new nodemask of rebinding. [feng.tang@intel.com: fix a problem in mpol_set_nodemask(), per Michal Hocko] Link: https://lkml.kernel.org/r/1622560492-1294-3-git-send-email-feng.tang@intel.com [feng.tang@intel.com: refine code and comments of mpol_set_nodemask(), per Michal] Link: https://lkml.kernel.org/r/20210603081807.GE56979@shbuild999.sh.intel.com Link: https://lkml.kernel.org/r/1622469956-82897-3-git-send-email-feng.tang@intel.com Signed-off-by: Feng Tang Suggested-by: Michal Hocko Acked-by: Michal Hocko Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Ben Widawsky Cc: Dan Williams Cc: Dave Hansen Cc: David Rientjes Cc: Huang Ying Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Kravetz Cc: Randy Dunlap Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b26e517a058bd40c790a1d9868c896842f2e4155 Author: Feng Tang Date: Wed Jun 30 18:50:56 2021 -0700 mm/mempolicy: cleanup nodemask intersection check for oom Patch series "mm/mempolicy: some fix and semantics cleanup", v4. Current memory policy code has some confusing and ambiguous part about MPOL_LOCAL policy, as it is handled as a faked MPOL_PREFERRED one, and there are many places having to distinguish them. Also the nodemask intersection check needs cleanup to be more explicit for OOM use, and handle MPOL_INTERLEAVE correctly. This patchset cleans up these and unifies the parameter sanity check for mbind() and set_mempolicy(). This patch (of 3): mempolicy_nodemask_intersects seem to be a general purpose mempolicy function. In fact it is partially tailored for the OOM purpose instead. The oom proper is the only existing user so rename the function to make that purpose explicit. While at it drop the MPOL_INTERLEAVE as those allocations never has a nodemask defined (see alloc_page_interleave) so this is a dead code and a confusing one because MPOL_INTERLEAVE is a hint rather than a hard requirement so it shouldn't be considered during the OOM. The final code can be reduced to a check for MPOL_BIND which is the only memory policy that is a hard requirement and thus relevant to a constrained OOM logic. [mhocko@suse.com: changelog edits] Link: https://lkml.kernel.org/r/1622560492-1294-1-git-send-email-feng.tang@intel.com Link: https://lkml.kernel.org/r/1622560492-1294-2-git-send-email-feng.tang@intel.com Link: https://lkml.kernel.org/r/1622469956-82897-1-git-send-email-feng.tang@intel.com Link: https://lkml.kernel.org/r/1622469956-82897-2-git-send-email-feng.tang@intel.com Signed-off-by: Feng Tang Suggested-by: Michal Hocko Acked-by: Michal Hocko Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Ben Widawsky Cc: Dan Williams Cc: Dave Hansen Cc: David Rientjes Cc: Huang Ying Cc: Mel Gorman Cc: Mike Kravetz Cc: Randy Dunlap Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b55ca5264b0c0092f238e2f4f33319ba6e9901ab Author: Wonhyuk Yang Date: Wed Jun 30 18:50:53 2021 -0700 mm/compaction: fix 'limit' in fast_isolate_freepages Because of 'min(1, ...)', fast_isolate_freepages set 'limit' to 0 or 1. This takes away the opportunities of find candinate pages. So, by making enough scans available, increases the probability of finding the appropriate freepage. Tested it on the thpscale and the results are as follows. 5.12.0 5.12.0 valnilla patched Amean fault-both-1 598.15 ( 0.00%) 592.56 ( 0.93%) Amean fault-both-3 1494.47 ( 0.00%) 1514.35 ( -1.33%) Amean fault-both-5 2519.48 ( 0.00%) 2471.76 ( 1.89%) Amean fault-both-7 3173.85 ( 0.00%) 3079.19 ( 2.98%) Amean fault-both-12 8063.83 ( 0.00%) 7858.29 ( 2.55%) Amean fault-both-18 8781.20 ( 0.00%) 7827.70 * 10.86%* Amean fault-both-24 12576.44 ( 0.00%) 12250.20 ( 2.59%) Amean fault-both-30 18503.27 ( 0.00%) 17528.11 * 5.27%* Amean fault-both-32 16133.69 ( 0.00%) 13874.24 * 14.00%* 5.12.0 5.12.0 vanilla patched Ops Compaction migrate scanned 6547133.00 5963901.00 Ops Compaction free scanned 32452453.00 26609101.00 5.12 5.12 vanilla patched Duration User 27.99 28.84 Duration System 244.08 236.76 Duration Elapsed 78.27 78.38 Link: https://lkml.kernel.org/r/20210626082443.22547-1-vvghjk1234@gmail.com Fixes: 5a811889de10f ("mm, compaction: use free lists to quickly locate a migration target") Signed-off-by: Wonhyuk Yang Acked-by: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2155fe54ddb6e289b4f7854df5a7d828d6efbb5 Author: Liu Xiang Date: Wed Jun 30 18:50:51 2021 -0700 mm: compaction: remove duplicate !list_empty(&sublist) check The list_splice_tail(&sublist, freelist) also do !list_empty(&sublist) check, so remove the duplicate call. Link: https://lkml.kernel.org/r/20210609095409.19920-1-liu.xiang@zlingsmart.com Signed-off-by: Liu Xiang Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17adb230d6a6e39f9ba39440ee8441291795dff4 Author: YueHaibing Date: Wed Jun 30 18:50:48 2021 -0700 mm/compaction: use DEVICE_ATTR_WO macro Use DEVICE_ATTR_WO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Link: https://lkml.kernel.org/r/20210523064521.32912-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2a03085ce88792bac2e25319fc2874a885e7e102 Author: Miaohe Lin Date: Wed Jun 30 18:50:45 2021 -0700 mm/zbud: don't export any zbud API The zbud doesn't need to export any API and it is meant to be used via zpool API since the commit 12d79d64bfd3 ("mm/zpool: update zswap to use zpool"). So we can remove the unneeded zbud.h and move down zpool API to avoid any forward declaration. [linmiaohe@huawei.com: fix unused function warnings when CONFIG_ZPOOL is disabled] Link: https://lkml.kernel.org/r/20210619025508.1239386-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210608114515.206992-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Dan Streetman Cc: Seth Jennings Cc: Nathan Chancellor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f356aeacf7bbf32131de10d3e400b25b62e3eaaa Author: Miaohe Lin Date: Wed Jun 30 18:50:42 2021 -0700 mm/zbud: reuse unbuddied[0] as buddied in zbud_pool Patch series "Cleanups for zbud", v2. This series contains just cleanups to save some possible memory in zbud_pool and avoid exporting any unneeded zbud API. More details can be found in the respective changelogs This patch (of 2): Since commit 9d8c5b5284e4 ("mm: zbud: fix condition check on allocation size"), zbud_pool.unbuddied[0] is always unused. We can reuse it as buddied field to save some possible memory. Link: https://lkml.kernel.org/r/20210608114515.206992-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210608114515.206992-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Seth Jennings Cc: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28473d91ff7f686d58047ff55f2fa98ab59114a4 Author: Miaohe Lin Date: Wed Jun 30 18:50:39 2021 -0700 mm/z3fold: use release_z3fold_page_locked() to release locked z3fold page We should use release_z3fold_page_locked() to release z3fold page when it's locked, although it looks harmless to use release_z3fold_page() now. Link: https://lkml.kernel.org/r/20210619093151.1492174-7-linmiaohe@huawei.com Fixes: dcf5aedb24f8 ("z3fold: stricter locking and more careful reclaim") Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dac0d1cfda56472378d330b1b76b9973557a7b1d Author: Miaohe Lin Date: Wed Jun 30 18:50:36 2021 -0700 mm/z3fold: fix potential memory leak in z3fold_destroy_pool() There is a memory leak in z3fold_destroy_pool() as it forgets to free_percpu pool->unbuddied. Call free_percpu for pool->unbuddied to fix this issue. Link: https://lkml.kernel.org/r/20210619093151.1492174-6-linmiaohe@huawei.com Fixes: d30561c56f41 ("z3fold: use per-cpu unbuddied lists") Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 767cc6c5568afa50ef6abbd4efb61beee56f9cc8 Author: Miaohe Lin Date: Wed Jun 30 18:50:33 2021 -0700 mm/z3fold: remove unused function handle_to_z3fold_header() handle_to_z3fold_header() is unused now. So we can remove it. As a result, get_z3fold_header() becomes the only caller of __get_z3fold_header() and the argument lock is always true. Therefore we could further fold the __get_z3fold_header() into get_z3fold_header() with lock = true. Link: https://lkml.kernel.org/r/20210619093151.1492174-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e891f60e28c3e90e2589a7d2147ae192dca11245 Author: Miaohe Lin Date: Wed Jun 30 18:50:30 2021 -0700 mm/z3fold: remove magic number in z3fold_create_pool() It's meaningless to pass a magic number 2 to __alloc_percpu() as there is a minimum alignment size of PCPU_MIN_ALLOC_SIZE (> 2) in it. Also there is no special alignment requirement for unbuddied. So we could replace this magic number with nature alignment, i.e. __alignof__(struct list_head), to improve readability. Link: https://lkml.kernel.org/r/20210619093151.1492174-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 014284a0815f6b9a6e10c8d575d37a5357ce033d Author: Miaohe Lin Date: Wed Jun 30 18:50:27 2021 -0700 mm/z3fold: avoid possible underflow in z3fold_alloc() It is not enough to just make sure the z3fold header is not larger than the page size. When z3fold header is equal to PAGE_SIZE, we would underflow when check alloc size against PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE in z3fold_alloc(). Make sure there has remaining spaces for its buddy to fix this theoretical issue. Link: https://lkml.kernel.org/r/20210619093151.1492174-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e3c0db4fec46b46a0c22b46bb55392b36ec940fc Author: Miaohe Lin Date: Wed Jun 30 18:50:24 2021 -0700 mm/z3fold: define macro NCHUNKS as TOTAL_CHUNKS - ZHDR_CHUNKS Patch series "Cleanup and fixup for z3fold". This series contains cleanups to remove unused function, redefine macro to improve readability and so on. Also this fixes several bugs in z3fold, such as memory leak in z3fold_destroy_pool(). More details can be found in the respective changelogs. This patch (of 6): To improve code readability, we could define macro NCHUNKS as TOTAL_CHUNKS - ZHDR_CHUNKS. No functional change intended. Link: https://lkml.kernel.org/r/20210619093151.1492174-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210619093151.1492174-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Wool Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6d9eee2a68619b5ba1c25e406a9403f33b56902 Author: David Hildenbrand Date: Wed Jun 30 18:50:21 2021 -0700 fs/proc/kcore: use page_offline_(freeze|thaw) Let's properly synchronize with drivers that set PageOffline(). Unfreeze/thaw every now and then, so drivers that want to set PageOffline() can make progress. Link: https://lkml.kernel.org/r/20210526093041.8800-7-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Mike Rapoport Reviewed-by: Oscar Salvador Cc: Aili Yao Cc: Alexey Dobriyan Cc: Alex Shi Cc: Haiyang Zhang Cc: Jason Wang Cc: Jiri Bohac Cc: "K. Y. Srinivasan" Cc: "Matthew Wilcox (Oracle)" Cc: "Michael S. Tsirkin" Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Cc: Stephen Hemminger Cc: Steven Price Cc: Wei Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6cc26d77613a970ed9b5ca66f230b29edf7c917e Author: David Hildenbrand Date: Wed Jun 30 18:50:18 2021 -0700 virtio-mem: use page_offline_(start|end) when setting PageOffline() Let's properly use page_offline_(start|end) to synchronize setting PageOffline(), so we won't have valid page access to unplugged memory regions from /proc/kcore. Existing balloon implementations usually allow reading inflated memory; doing so might result in unnecessary overhead in the hypervisor, which is currently the case with virtio-mem. For future virtio-mem use cases, it will be different when using shmem, huge pages, !anonymous private mappings, ... as backing storage for a VM. virtio-mem unplugged memory must no longer be accessed and access might result in undefined behavior. There will be a virtio spec extension to document this change, including a new feature flag indicating the changed behavior. We really don't want to race against PFN walkers reading random page content. Link: https://lkml.kernel.org/r/20210526093041.8800-6-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michael S. Tsirkin Acked-by: Mike Rapoport Reviewed-by: Oscar Salvador Cc: Aili Yao Cc: Alexey Dobriyan Cc: Alex Shi Cc: Haiyang Zhang Cc: Jason Wang Cc: Jiri Bohac Cc: "K. Y. Srinivasan" Cc: "Matthew Wilcox (Oracle)" Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Cc: Stephen Hemminger Cc: Steven Price Cc: Wei Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82840451936f0301781ece80322230fd8edfc648 Author: David Hildenbrand Date: Wed Jun 30 18:50:14 2021 -0700 mm: introduce page_offline_(begin|end|freeze|thaw) to synchronize setting PageOffline() A driver might set a page logically offline -- PageOffline() -- and turn the page inaccessible in the hypervisor; after that, access to page content can be fatal. One example is virtio-mem; while unplugged memory -- marked as PageOffline() can currently be read in the hypervisor, this will no longer be the case in the future; for example, when having a virtio-mem device backed by huge pages in the hypervisor. Some special PFN walkers -- i.e., /proc/kcore -- read content of random pages after checking PageOffline(); however, these PFN walkers can race with drivers that set PageOffline(). Let's introduce page_offline_(begin|end|freeze|thaw) for synchronizing. page_offline_freeze()/page_offline_thaw() allows for a subsystem to synchronize with such drivers, achieving that a page cannot be set PageOffline() while frozen. page_offline_begin()/page_offline_end() is used by drivers that care about such races when setting a page PageOffline(). For simplicity, use a rwsem for now; neither drivers nor users are performance sensitive. Link: https://lkml.kernel.org/r/20210526093041.8800-5-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Reviewed-by: Mike Rapoport Reviewed-by: Oscar Salvador Cc: Aili Yao Cc: Alexey Dobriyan Cc: Alex Shi Cc: Haiyang Zhang Cc: Jason Wang Cc: Jiri Bohac Cc: "K. Y. Srinivasan" Cc: "Matthew Wilcox (Oracle)" Cc: "Michael S. Tsirkin" Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Cc: Stephen Hemminger Cc: Steven Price Cc: Wei Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0daa322b8ff94d8ee4081c2c6868a1aaf1309642 Author: David Hildenbrand Date: Wed Jun 30 18:50:10 2021 -0700 fs/proc/kcore: don't read offline sections, logically offline pages and hwpoisoned pages Let's avoid reading: 1) Offline memory sections: the content of offline memory sections is stale as the memory is effectively unused by the kernel. On s390x with standby memory, offline memory sections (belonging to offline storage increments) are not accessible. With virtio-mem and the hyper-v balloon, we can have unavailable memory chunks that should not be accessed inside offline memory sections. Last but not least, offline memory sections might contain hwpoisoned pages which we can no longer identify because the memmap is stale. 2) PG_offline pages: logically offline pages that are documented as "The content of these pages is effectively stale. Such pages should not be touched (read/write/dump/save) except by their owner.". Examples include pages inflated in a balloon or unavailble memory ranges inside hotplugged memory sections with virtio-mem or the hyper-v balloon. 3) PG_hwpoison pages: Reading pages marked as hwpoisoned can be fatal. As documented: "Accessing is not safe since it may cause another machine check. Don't touch!" Introduce is_page_hwpoison(), adding a comment that it is inherently racy but best we can really do. Reading /proc/kcore now performs similar checks as when reading /proc/vmcore for kdump via makedumpfile: problematic pages are exclude. It's also similar to hibernation code, however, we don't skip hwpoisoned pages when processing pages in kernel/power/snapshot.c:saveable_page() yet. Note 1: we can race against memory offlining code, especially memory going offline and getting unplugged: however, we will properly tear down the identity mapping and handle faults gracefully when accessing this memory from kcore code. Note 2: we can race against drivers setting PageOffline() and turning memory inaccessible in the hypervisor. We'll handle this in a follow-up patch. Link: https://lkml.kernel.org/r/20210526093041.8800-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport Reviewed-by: Oscar Salvador Cc: Aili Yao Cc: Alexey Dobriyan Cc: Alex Shi Cc: Haiyang Zhang Cc: Jason Wang Cc: Jiri Bohac Cc: "K. Y. Srinivasan" Cc: "Matthew Wilcox (Oracle)" Cc: "Michael S. Tsirkin" Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Cc: Stephen Hemminger Cc: Steven Price Cc: Wei Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2711032c64a9c151a6469d53fdc7f9f4df7f6e45 Author: David Hildenbrand Date: Wed Jun 30 18:50:07 2021 -0700 fs/proc/kcore: pfn_is_ram check only applies to KCORE_RAM Let's resturcture the code, using switch-case, and checking pfn_is_ram() only when we are dealing with KCORE_RAM. Link: https://lkml.kernel.org/r/20210526093041.8800-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport Cc: Aili Yao Cc: Alexey Dobriyan Cc: Alex Shi Cc: Haiyang Zhang Cc: Jason Wang Cc: Jiri Bohac Cc: "K. Y. Srinivasan" Cc: "Matthew Wilcox (Oracle)" Cc: "Michael S. Tsirkin" Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Roman Gushchin Cc: Stephen Hemminger Cc: Steven Price Cc: Wei Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c36b419b111e28a657e6534aae07964a98a5ca9 Author: David Hildenbrand Date: Wed Jun 30 18:50:03 2021 -0700 fs/proc/kcore: drop KCORE_REMAP and KCORE_OTHER Patch series "fs/proc/kcore: don't read offline sections, logically offline pages and hwpoisoned pages", v3. Looking for places where the kernel might unconditionally read PageOffline() pages, I stumbled over /proc/kcore; turns out /proc/kcore needs some more love to not touch some other pages we really don't want to read -- i.e., hwpoisoned ones. Examples for PageOffline() pages are pages inflated in a balloon, memory unplugged via virtio-mem, and partially-present sections in memory added by the Hyper-V balloon. When reading pages inflated in a balloon, we essentially produce unnecessary load in the hypervisor; holes in partially present sections in case of Hyper-V are not accessible and already were a problem for /proc/vmcore, fixed in makedumpfile by detecting PageOffline() pages. In the future, virtio-mem might disallow reading unplugged memory -- marked as PageOffline() -- in some environments, resulting in undefined behavior when accessed; therefore, I'm trying to identify and rework all these (corner) cases. With this series, there is really only access via /dev/mem, /proc/vmcore and kdb left after I ripped out /dev/kmem. kdb is an advanced corner-case use case -- we won't care for now if someone explicitly tries to do nasty things by reading from/writing to physical addresses we better not touch. /dev/mem is a use case we won't support for virtio-mem, at least for now, so we'll simply disallow mapping any virtio-mem memory via /dev/mem next. /proc/vmcore is really only a problem when dumping the old kernel via something that's not makedumpfile (read: basically never), however, we'll try sanitizing that as well in the second kernel in the future. Tested via kcore_dump: https://github.com/schlafwandler/kcore_dump This patch (of 6): Commit db779ef67ffe ("proc/kcore: Remove unused kclist_add_remap()") removed the last user of KCORE_REMAP. Commit 595dd46ebfc1 ("vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page") removed the last user of KCORE_OTHER. Let's drop both types. While at it, also drop vaddr in "struct kcore_list", used by KCORE_REMAP only. Link: https://lkml.kernel.org/r/20210526093041.8800-1-david@redhat.com Link: https://lkml.kernel.org/r/20210526093041.8800-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Alexey Dobriyan Cc: "Matthew Wilcox (Oracle)" Cc: Oscar Salvador Cc: Michal Hocko Cc: Roman Gushchin Cc: Alex Shi Cc: Steven Price Cc: Mike Kravetz Cc: Aili Yao Cc: Jiri Bohac Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d719afcb34434ebfa7911338d8c777eca8452b0 Author: Mike Rapoport Date: Wed Jun 30 18:50:00 2021 -0700 docs: proc.rst: meminfo: briefly describe gaps in memory accounting Add a paragraph that explains that it may happen that the counters in /proc/meminfo do not add up to the overall memory usage. Link: https://lkml.kernel.org/r/20210421061127.1182723-1-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Michal Hocko Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka Cc: Jonathan Corbet Cc: Alexey Dobriyan Cc: Eric Dumazet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 781eb2cdd26f3748be57da9bed98bbe5b0dd99fb Author: Kefeng Wang Date: Wed Jun 30 18:49:57 2021 -0700 mm/kconfig: move HOLES_IN_ZONE into mm commit a55749639dc1 ("ia64: drop marked broken DISCONTIGMEM and VIRTUAL_MEM_MAP") drop VIRTUAL_MEM_MAP, so there is no need HOLES_IN_ZONE on ia64. Also move HOLES_IN_ZONE into mm/Kconfig, select it if architecture needs this feature. Link: https://lkml.kernel.org/r/20210417075946.181402-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas [arm64] Cc: Will Deacon Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ebc57f40316049139ab9ca3d19e52449106ee9f Author: Miaohe Lin Date: Wed Jun 30 18:49:54 2021 -0700 mm: workingset: define macro WORKINGSET_SHIFT The magic number 1 is used in several places in workingset.c. Define a macro WORKINGSET_SHIFT for it to improve code readability. Link: https://lkml.kernel.org/r/20210624122307.1759342-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 764c04a9cbe6f66334ed9a8a154e7d1b4b535da9 Author: Yu Zhao Date: Wed Jun 30 18:49:51 2021 -0700 include/trace/events/vmscan.h: remove mm_vmscan_inactive_list_is_low mm_vmscan_inactive_list_is_low has no users after commit b91ac374346b ("mm: vmscan: enforce inactive:active ratio at the reclaim root"). Remove it. Link: https://lkml.kernel.org/r/20210614194554.2683395-1-yuzhao@google.com Signed-off-by: Yu Zhao Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d2b8d2b67713da5de333a8849342503a9f21c60 Author: Yu Zhao Date: Wed Jun 30 18:49:48 2021 -0700 mm/vmscan.c: fix potential deadlock in reclaim_pages() Theoretically without the protect from memalloc_noreclaim_save() and memalloc_noreclaim_restore(), reclaim_pages() can go into the block I/O layer recursively and deadlock. Querying 'reclaim_pages' in our kernel crash databases didn't yield any results. So the deadlock seems unlikely to happen. A possible explanation is that the only user of reclaim_pages(), i.e., MADV_PAGEOUT, is usually called before memory pressure builds up, e.g., on Android and Chrome OS. Under such a condition, allocations in the block I/O layer can be fulfilled without diverting to direct reclaim and therefore the recursion is avoided. Link: https://lkml.kernel.org/r/20210622074642.785473-1-yuzhao@google.com Link: https://lkml.kernel.org/r/20210614194727.2684053-1-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a8f021ba0a220a95d4251ea3f199ef693f1249b Author: Axel Rasmussen Date: Wed Jun 30 18:49:45 2021 -0700 userfaultfd/selftests: exercise minor fault handling shmem support Enable test_uffdio_minor for test_type == TEST_SHMEM, and modify the test slightly to pass in / check for the right feature flags. Link: https://lkml.kernel.org/r/20210503180737.2487560-11-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ba6e8640844213e27c22f5eae915710f7b7998d Author: Axel Rasmussen Date: Wed Jun 30 18:49:41 2021 -0700 userfaultfd/selftests: reinitialize test context in each test Currently, the context (fds, mmap-ed areas, etc.) are global. Each test mutates this state in some way, in some cases really "clobbering it" (e.g., the events test mremap-ing area_dst over the top of area_src, or the minor faults tests overwriting the count_verify values in the test areas). We run the tests in a particular order, each test is careful to make the right assumptions about its starting state, etc. But, this is fragile. It's better for a test's success or failure to not depend on what some other prior test case did to the global state. To that end, clear and reinitialize the test context at the start of each test case, so whatever prior test cases did doesn't affect future tests. This is particularly relevant to this series because the events test's mremap of area_dst screws up assumptions the minor fault test was relying on. This wasn't a problem for hugetlb, as we don't mremap in that case. [peterx@redhat.com: fix conflict between this patch and the uffd pagemap series] Link: https://lkml.kernel.org/r/YKQqKrl+/cQ1utrb@t490s Link: https://lkml.kernel.org/r/20210503180737.2487560-10-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Signed-off-by: Peter Xu Reviewed-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5bb23edb18373b20ff740e56d7c97ea60fb51491 Author: Axel Rasmussen Date: Wed Jun 30 18:49:38 2021 -0700 userfaultfd/selftests: create alias mappings in the shmem test Previously, we just allocated two shm areas: area_src and area_dst. With this commit, change this so we also allocate area_src_alias, and area_dst_alias. area_*_alias and area_* (respectively) point to the same underlying physical pages, but are different VMAs. In a future commit in this series, we'll leverage this setup to exercise minor fault handling support for shmem, just like we do in the hugetlb_shared test. Link: https://lkml.kernel.org/r/20210503180737.2487560-9-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa2c2b58189b28ee7bd830b4cb71abfe5060fff2 Author: Axel Rasmussen Date: Wed Jun 30 18:49:34 2021 -0700 userfaultfd/selftests: use memfd_create for shmem test type This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so we can create alias mappings. Use memfd_create instead of actually passing in a tmpfs path like hugetlb does, since it's more convenient / simpler to run, and works just as well. Future commits will: 1. Setup the alias mappings. 2. Extend our tests to actually take advantage of this, to test new userfaultfd behavior being introduced in this series. Also, a small fix in the area we're changing: when the hugetlb setup fails in main(), pass in the right argv[] so we actually print out the hugetlb file path. Link: https://lkml.kernel.org/r/20210503180737.2487560-8-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d64ae3ab648a967b7ba5cc3e89281d76742c34e Author: Axel Rasmussen Date: Wed Jun 30 18:49:31 2021 -0700 userfaultfd/shmem: modify shmem_mfill_atomic_pte to use install_pte() In a previous commit, we added the mfill_atomic_install_pte() helper. This helper does the job of setting up PTEs for an existing page, to map it into a given VMA. It deals with both the anon and shmem cases, as well as the shared and private cases. In other words, shmem_mfill_atomic_pte() duplicates a case it already handles. So, expose it, and let shmem_mfill_atomic_pte() use it directly, to reduce code duplication. This requires that we refactor shmem_mfill_atomic_pte() a bit: Instead of doing accounting (shmem_recalc_inode() et al) part-way through the PTE setup, do it afterward. This frees up mfill_atomic_install_pte() from having to care about this accounting, and means we don't need to e.g. shmem_uncharge() in the error path. A side effect is this switches shmem_mfill_atomic_pte() to use lru_cache_add_inactive_or_unevictable() instead of just lru_cache_add(). This wrapper does some extra accounting in an exceptional case, if appropriate, so it's actually the more correct thing to use. Link: https://lkml.kernel.org/r/20210503180737.2487560-7-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Acked-by: Hugh Dickins Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 964ab0040ff9598783bf37776b5e31b27b50e293 Author: Axel Rasmussen Date: Wed Jun 30 18:49:27 2021 -0700 userfaultfd/shmem: advertise shmem minor fault support Now that the feature is fully implemented (the faulting path hooks exist so userspace is notified, and the ioctl to resolve such faults is available), advertise this as a supported feature. Link: https://lkml.kernel.org/r/20210503180737.2487560-6-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Hugh Dickins Acked-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 153132571f0204dc5844faf6b0f8096c6c29d277 Author: Axel Rasmussen Date: Wed Jun 30 18:49:24 2021 -0700 userfaultfd/shmem: support UFFDIO_CONTINUE for shmem With this change, userspace can resolve a minor fault within a shmem-backed area with a UFFDIO_CONTINUE ioctl. The semantics for this match those for hugetlbfs - we look up the existing page in the page cache, and install a PTE for it. This commit introduces a new helper: mfill_atomic_install_pte. Why handle UFFDIO_CONTINUE for shmem in mm/userfaultfd.c, instead of in shmem.c? The existing userfault implementation only relies on shmem.c for VM_SHARED VMAs. However, minor fault handling / CONTINUE work just fine for !VM_SHARED VMAs as well. We'd prefer to handle CONTINUE for shmem in one place, regardless of shared/private (to reduce code duplication). Why add a new mfill_atomic_install_pte helper? A problem we have with continue is that shmem_mfill_atomic_pte() and mcopy_atomic_pte() are *close* to what we want, but not exactly. We do want to setup the PTEs in a CONTINUE operation, but we don't want to e.g. allocate a new page, charge it (e.g. to the shmem inode), manipulate various flags, etc. Also we have the problem stated above: shmem_mfill_atomic_pte() and mcopy_atomic_pte() both handle one-half of the problem (shared / private) continue cares about. So, introduce mcontinue_atomic_pte(), to handle all of the shmem continue cases. Introduce the helper so it doesn't duplicate code with mcopy_atomic_pte(). In a future commit, shmem_mfill_atomic_pte() will also be modified to use this new helper. However, since this is a bigger refactor, it seems most clear to do it as a separate change. Link: https://lkml.kernel.org/r/20210503180737.2487560-5-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Hugh Dickins Acked-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c949b097ef2e332fa90708127c972b823fb58ec1 Author: Axel Rasmussen Date: Wed Jun 30 18:49:20 2021 -0700 userfaultfd/shmem: support minor fault registration for shmem This patch allows shmem-backed VMAs to be registered for minor faults. Minor faults are appropriately relayed to userspace in the fault path, for VMAs with the relevant flag. This commit doesn't hook up the UFFDIO_CONTINUE ioctl for shmem-backed minor faults, though, so userspace doesn't yet have a way to resolve such faults. Because of this, we also don't yet advertise this as a supported feature. That will be done in a separate commit when the feature is fully implemented. Link: https://lkml.kernel.org/r/20210503180737.2487560-4-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Peter Xu Acked-by: Hugh Dickins Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3460f6e5c1ed94c2ab7c1ccc032a5bebd88deaa7 Author: Axel Rasmussen Date: Wed Jun 30 18:49:17 2021 -0700 userfaultfd/shmem: combine shmem_{mcopy_atomic,mfill_zeropage}_pte Patch series "userfaultfd: add minor fault handling for shmem", v6. Overview ======== See the series which added minor faults for hugetlbfs [3] for a detailed overview of minor fault handling in general. This series adds the same support for shmem-backed areas. This series is structured as follows: - Commits 1 and 2 are cleanups. - Commits 3 and 4 implement the new feature (minor fault handling for shmem). - Commit 5 advertises that the feature is now available since at this point it's fully implemented. - Commit 6 is a final cleanup, modifying an existing code path to re-use a new helper we've introduced. - Commits 7, 8, 9, 10 update the userfaultfd selftest to exercise the feature. Use Case ======== In some cases it is useful to have VM memory backed by tmpfs instead of hugetlbfs. So, this feature will be used to support the same VM live migration use case described in my original series. Additionally, Android folks (Lokesh Gidra ) hope to optimize the Android Runtime garbage collector using this feature: "The plan is to use userfaultfd for concurrently compacting the heap. With this feature, the heap can be shared-mapped at another location where the GC-thread(s) could continue the compaction operation without the need to invoke userfault ioctl(UFFDIO_COPY) each time. OTOH, if and when Java threads get faults on the heap, UFFDIO_CONTINUE can be used to resume execution. Furthermore, this feature enables updating references in the 'non-moving' portion of the heap efficiently. Without this feature, uneccessary page copying (ioctl(UFFDIO_COPY)) would be required." [1] https://lore.kernel.org/patchwork/cover/1388144/ [2] https://lore.kernel.org/patchwork/patch/1408161/ [3] https://lore.kernel.org/linux-fsdevel/20210301222728.176417-1-axelrasmussen@google.com/T/#t This patch (of 9): Previously, we did a dance where we had one calling path in userfaultfd.c (mfill_atomic_pte), but then we split it into two in shmem_fs.h (shmem_{mcopy_atomic,mfill_zeropage}_pte), and then rejoined into a single shared function in shmem.c (shmem_mfill_atomic_pte). This is all a bit overly complex. Just call the single combined shmem function directly, allowing us to clean up various branches, boilerplate, etc. While we're touching this function, two other small cleanup changes: - offset is equivalent to pgoff, so we can get rid of offset entirely. - Split two VM_BUG_ON cases into two statements. This means the line number reported when the BUG is hit specifies exactly which condition was true. Link: https://lkml.kernel.org/r/20210503180737.2487560-1-axelrasmussen@google.com Link: https://lkml.kernel.org/r/20210503180737.2487560-3-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Acked-by: Hugh Dickins Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb3b2e0039837546b460d8c747b86b2632a975a1 Author: Peter Xu Date: Wed Jun 30 18:49:13 2021 -0700 userfaultfd/selftests: add pagemap uffd-wp test Add one anonymous specific test to start using pagemap. With pagemap support, we can directly read the uffd-wp bit from pgtable without triggering any fault, so it's easier to do sanity checks in unit tests. Meanwhile this test also leverages the newly introduced MADV_PAGEOUT madvise function to test swap ptes with uffd-wp bit set, and across fork()s. Link: https://lkml.kernel.org/r/20210428225030.9708-7-peterx@redhat.com Signed-off-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb8e37f35a2fe1f983ac21850e856e2c7498d469 Author: Peter Xu Date: Wed Jun 30 18:49:09 2021 -0700 mm/pagemap: export uffd-wp protection information Export the PTE/PMD status of uffd-wp to pagemap too. Link: https://lkml.kernel.org/r/20210428225030.9708-6-peterx@redhat.com Signed-off-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 00b151f21f390f1e0b294720a3660506abaf49cd Author: Peter Xu Date: Wed Jun 30 18:49:06 2021 -0700 mm/userfaultfd: fail uffd-wp registration if not supported We should fail uffd-wp registration immediately if the arch does not even have CONFIG_HAVE_ARCH_USERFAULTFD_WP defined. That'll block also relevant ioctls on e.g. UFFDIO_WRITEPROTECT because that'll check against VM_UFFD_WP, which can only be applied with a success registration. Remove the WP feature bit too for those archs when handling UFFDIO_API ioctl. Link: https://lkml.kernel.org/r/20210428225030.9708-5-peterx@redhat.com Signed-off-by: Peter Xu Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f34f1eac3820fc2722e5159acceb22545b30b0d Author: Peter Xu Date: Wed Jun 30 18:49:02 2021 -0700 mm/userfaultfd: fix uffd-wp special cases for fork() We tried to do something similar in b569a1760782 ("userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork") previously, but it's not doing it all right.. A few fixes around the code path: 1. We were referencing VM_UFFD_WP vm_flags on the _old_ vma rather than the new vma. That's overlooked in b569a1760782, so it won't work as expected. Thanks to the recent rework on fork code (7a4830c380f3a8b3), we can easily get the new vma now, so switch the checks to that. 2. Dropping the uffd-wp bit in copy_huge_pmd() could be wrong if the huge pmd is a migration huge pmd. When it happens, instead of using pmd_uffd_wp(), we should use pmd_swp_uffd_wp(). The fix is simply to handle them separately. 3. Forget to carry over uffd-wp bit for a write migration huge pmd entry. This also happens in copy_huge_pmd(), where we converted a write huge migration entry into a read one. 4. In copy_nonpresent_pte(), drop uffd-wp if necessary for swap ptes. 5. In copy_present_page() when COW is enforced when fork(), we also need to pass over the uffd-wp bit if VM_UFFD_WP is armed on the new vma, and when the pte to be copied has uffd-wp bit set. Remove the comment in copy_present_pte() about this. It won't help a huge lot to only comment there, but comment everywhere would be an overkill. Let's assume the commit messages would help. [peterx@redhat.com: fix a few thp pmd missing uffd-wp bit] Link: https://lkml.kernel.org/r/20210428225030.9708-4-peterx@redhat.com Link: https://lkml.kernel.org/r/20210428225030.9708-3-peterx@redhat.com Fixes: b569a1760782f ("userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork") Signed-off-by: Peter Xu Cc: Jerome Glisse Cc: Mike Rapoport Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5fc7a5f6fd04bc18f309d9f979b32ef7d1d0a997 Author: Peter Xu Date: Wed Jun 30 18:48:59 2021 -0700 mm/thp: simplify copying of huge zero page pmd when fork Patch series "mm/uffd: Misc fix for uffd-wp and one more test". This series tries to fix some corner case bugs for uffd-wp on either thp or fork(). Then it introduced a new test with pagemap/pageout. Patch layout: Patch 1: cleanup for THP, it'll slightly simplify the follow up patches Patch 2-4: misc fixes for uffd-wp here and there; please refer to each patch Patch 5: add pagemap support for uffd-wp Patch 6: add pagemap/pageout test for uffd-wp The last test introduced can also verify some of the fixes in previous patches, as the test will fail without the fixes. However it's not easy to verify all the changes in patch 2-4, but hopefully they can still be properly reviewed. Note that if considering the ongoing uffd-wp shmem & hugetlbfs work, patch 5 will be incomplete as it's missing e.g. hugetlbfs part or the special swap pte detection. However that's not needed in this series, and since that series is still during review, this series does not depend on that one (the last test only runs with anonymous memory, not file-backed). So this series can be merged even before that series. This patch (of 6): Huge zero page is handled in a special path in copy_huge_pmd(), however it should share most codes with a normal thp page. Trying to share more code with it by removing the special path. The only leftover so far is the huge zero page refcounting (mm_get_huge_zero_page()), because that's separately done with a global counter. This prepares for a future patch to modify the huge pmd to be installed, so that we don't need to duplicate it explicitly into huge zero page case too. Link: https://lkml.kernel.org/r/20210428225030.9708-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20210428225030.9708-2-peterx@redhat.com Signed-off-by: Peter Xu Cc: Kirill A. Shutemov Cc: Mike Kravetz , peterx@redhat.com Cc: Mike Rapoport Cc: Axel Rasmussen Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Jerome Glisse Cc: Alexander Viro Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Joe Perches Cc: Lokesh Gidra Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42e584eede17b21b03896961e0df45ece4d01e79 Author: Peter Xu Date: Wed Jun 30 18:48:55 2021 -0700 userfaultfd/selftests: unify error handling Introduce err()/_err() and replace all the different ways to fail the program, mostly "fprintf" and "perror" with tons of exit() calls. Always stop the test program at any failure. Link: https://lkml.kernel.org/r/20210412232753.1012412-6-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit de3ca8e4a56dda0f0dfb05d4fddab985cde5159a Author: Peter Xu Date: Wed Jun 30 18:48:52 2021 -0700 userfaultfd/selftests: only dump counts if mode enabled WP and MINOR modes are conditionally enabled on specific memory types. This patch avoids dumping tons of zeros for those cases when the modes are not supported at all. Link: https://lkml.kernel.org/r/20210412232753.1012412-5-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e08e18a785f9e901ca64062b9227c68d1b40ea3 Author: Peter Xu Date: Wed Jun 30 18:48:48 2021 -0700 userfaultfd/selftests: dropping VERIFY check in locking_thread It tries to check against all zeros and looped for quite a few times. However after that we'll verify the same page with count_verify, while count_verify can never be zero. So it means if it's a zero page we'll detect it anyways with below code. There's yet another place we conditionally check the fault flag - just do it unconditionally. Link: https://lkml.kernel.org/r/20210412232753.1012412-4-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ba4f8c355ef96ed521788d6707344f350bf78078 Author: Peter Xu Date: Wed Jun 30 18:48:44 2021 -0700 userfaultfd/selftests: remove the time() check on delayed uffd There seems to have no guarantee that time() will return the same for the two calls even if there's no delay, e.g. when a fault is accidentally crossing the changing of a second. Meanwhile, this message is also not helping that much since delay could happen with a lot of reasons, e.g., schedule latency of resolving thread. It may not mean an issue with uffd. Neither do I saw this error triggered either in the past runs. Even if it triggers, it'll be drown in all the rest of test logs. Remove it. Link: https://lkml.kernel.org/r/20210412232753.1012412-3-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Alexander Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2c6c06fff5098850b2b3b360758c9cc6102053f Author: Peter Xu Date: Wed Jun 30 18:48:41 2021 -0700 userfaultfd/selftests: use user mode only Patch series "userfaultfd/selftests: A few cleanups", v2. I wanted to cleanup userfaultfd.c fault handling for a long time. If it's not cleaned, when the new code grows the file it'll also grow the size that needs to be cleaned... This is my attempt to cleanup the userfaultfd selftest on fault handling, to use an err() macro instead of either fprintf() or perror() then another exit() call. The huge cleanup is done in the last patch. The first 4 patches are some other standalone cleanups for the same file, so I put them together. This patch (of 5): Userfaultfd selftest does not need to handle kernel initiated fault. Set user mode so it can be run even if unprivileged_userfaultfd=0 (which is the default). Link: https://lkml.kernel.org/r/20210412232753.1012412-2-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Andrea Arcangeli Cc: Mike Rapoport Cc: Alexander Viro Cc: Brian Geffon Cc: "Dr . David Alan Gilbert" Cc: Hugh Dickins Cc: Jerome Glisse Cc: Joe Perches Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: Mike Kravetz Cc: Mina Almasry Cc: Oliver Upton Cc: Shaohua Li Cc: Shuah Khan Cc: Stephen Rothwell Cc: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 510d25c92ec4ace4199a94f2f0cc9b8208c0de57 Author: Naoya Horiguchi Date: Wed Jun 30 18:48:38 2021 -0700 mm/hwpoison: disable pcp for page_handle_poison() Recent changes by patch "mm/page_alloc: allow high-order pages to be stored on the per-cpu lists" makes kernels determine whether to use pcp by pcp_allowed_order(), which breaks soft-offline for hugetlb pages. Soft-offline dissolves a migration source page, then removes it from buddy free list, so it's assumed that any subpage of the soft-offlined hugepage are recognized as a buddy page just after returning from dissolve_free_huge_page(). pcp_allowed_order() returns true for hugetlb, so this assumption is no longer true. So disable pcp during dissolve_free_huge_page() and take_page_off_buddy() to prevent soft-offlined hugepages from linking to pcp lists. Soft-offline should not be common events so the impact on performance should be minimal. And I think that the optimization of Mel's patch could benefit to hugetlb so zone_pcp_disable() is called only in hwpoison context. Link: https://lkml.kernel.org/r/20210617092626.291006-1-nao.horiguchi@gmail.com Signed-off-by: Naoya Horiguchi Acked-by: Mel Gorman Cc: Mike Kravetz Cc: David Hildenbrand Cc: Oscar Salvador Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7118fc2906e2925d7edb5ed9c8a57f2a5f23b849 Author: Mike Kravetz Date: Wed Jun 30 18:48:34 2021 -0700 hugetlb: address ref count racing in prep_compound_gigantic_page In [1], Jann Horn points out a possible race between prep_compound_gigantic_page and __page_cache_add_speculative. The root cause of the possible race is prep_compound_gigantic_page uncondittionally setting the ref count of pages to zero. It does this because prep_compound_gigantic_page is handed a 'group' of pages from an allocator and needs to convert that group of pages to a compound page. The ref count of each page in this 'group' is one as set by the allocator. However, the ref count of compound page tail pages must be zero. The potential race comes about when ref counted pages are returned from the allocator. When this happens, other mm code could also take a reference on the page. __page_cache_add_speculative is one such example. Therefore, prep_compound_gigantic_page can not just set the ref count of pages to zero as it does today. Doing so would lose the reference taken by any other code. This would lead to BUGs in code checking ref counts and could possibly even lead to memory corruption. There are two possible ways to address this issue. 1) Make all allocators of gigantic groups of pages be able to return a properly constructed compound page. 2) Make prep_compound_gigantic_page be more careful when constructing a compound page. This patch takes approach 2. In prep_compound_gigantic_page, use cmpxchg to only set ref count to zero if it is one. If the cmpxchg fails, call synchronize_rcu() in the hope that the extra ref count will be driopped during a rcu grace period. This is not a performance critical code path and the wait should be accceptable. If the ref count is still inflated after the grace period, then undo any modifications made and return an error. Currently prep_compound_gigantic_page is type void and does not return errors. Modify the two callers to check for and handle error returns. On error, the caller must free the 'group' of pages as they can not be used to form a gigantic page. After freeing pages, the runtime caller (alloc_fresh_huge_page) will retry the allocation once. Boot time allocations can not be retried. The routine prep_compound_page also unconditionally sets the ref count of compound page tail pages to zero. However, in this case the buddy allocator is constructing a compound page from freshly allocated pages. The ref count on those freshly allocated pages is already zero, so the set_page_count(p, 0) is unnecessary and could lead to confusion. Just remove it. [1] https://lore.kernel.org/linux-mm/CAG48ez23q0Jy9cuVnwAe7t_fdhMk2S7N5Hdi-GLcCeq5bsfLxw@mail.gmail.com/ Link: https://lkml.kernel.org/r/20210622021423.154662-3-mike.kravetz@oracle.com Fixes: 58a84aa92723 ("thp: set compound tail page _count to zero") Signed-off-by: Mike Kravetz Reported-by: Jann Horn Cc: Youquan Song Cc: Andrea Arcangeli Cc: Jan Kara Cc: John Hubbard Cc: "Kirill A . Shutemov" Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48b8d744ea841b8adf8d07bfe7a2d55f22e4d179 Author: Mike Kravetz Date: Wed Jun 30 18:48:31 2021 -0700 hugetlb: remove prep_compound_huge_page cleanup Patch series "Fix prep_compound_gigantic_page ref count adjustment". These patches address the possible race between prep_compound_gigantic_page and __page_cache_add_speculative as described by Jann Horn in [1]. The first patch simply removes the unnecessary/obsolete helper routine prep_compound_huge_page to make the actual fix a little simpler. The second patch is the actual fix and has a detailed explanation in the commit message. This potential issue has existed for almost 10 years and I am unaware of anyone actually hitting the race. I did not cc stable, but would be happy to squash the patches and send to stable if anyone thinks that is a good idea. [1] https://lore.kernel.org/linux-mm/CAG48ez23q0Jy9cuVnwAe7t_fdhMk2S7N5Hdi-GLcCeq5bsfLxw@mail.gmail.com/ This patch (of 2): I could not think of a reliable way to recreate the issue for testing. Rather, I 'simulated errors' to exercise all the error paths. The routine prep_compound_huge_page is a simple wrapper to call either prep_compound_gigantic_page or prep_compound_page. However, it is only called from gather_bootmem_prealloc which only processes gigantic pages. Eliminate the routine and call prep_compound_gigantic_page directly. Link: https://lkml.kernel.org/r/20210622021423.154662-1-mike.kravetz@oracle.com Link: https://lkml.kernel.org/r/20210622021423.154662-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Jan Kara Cc: Jann Horn Cc: John Hubbard Cc: "Kirill A . Shutemov" Cc: Matthew Wilcox Cc: Michal Hocko Cc: Youquan Song Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e6d41f12df0efcaa6e30b575d40f2529024cfce9 Author: Muchun Song Date: Wed Jun 30 18:48:28 2021 -0700 mm: hugetlb: introduce CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON When using HUGETLB_PAGE_FREE_VMEMMAP, the freeing unused vmemmap pages associated with each HugeTLB page is default off. Now the vmemmap is PMD mapped. So there is no side effect when this feature is enabled with no HugeTLB pages in the system. Someone may want to enable this feature in the compiler time instead of using boot command line. So add a config to make it default on when someone do not want to enable it via command line. Link: https://lkml.kernel.org/r/20210616094915.34432-4-songmuchun@bytedance.com Signed-off-by: Muchun Song Cc: Chen Huang Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d7a21715f25122779e2bed17db8c57aa01e922f Author: Muchun Song Date: Wed Jun 30 18:48:25 2021 -0700 mm: sparsemem: use huge PMD mapping for vmemmap pages The preparation of splitting huge PMD mapping of vmemmap pages is ready, so switch the mapping from PTE to PMD. Link: https://lkml.kernel.org/r/20210616094915.34432-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Chen Huang Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Michal Hocko Cc: Oscar Salvador Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3bc2b6a725963bb1b441356873da890e397c1a3f Author: Muchun Song Date: Wed Jun 30 18:48:22 2021 -0700 mm: sparsemem: split the huge PMD mapping of vmemmap pages Patch series "Split huge PMD mapping of vmemmap pages", v4. In order to reduce the difficulty of code review in series[1]. We disable huge PMD mapping of vmemmap pages when that feature is enabled. In this series, we do not disable huge PMD mapping of vmemmap pages anymore. We will split huge PMD mapping when needed. When HugeTLB pages are freed from the pool we do not attempt coalasce and move back to a PMD mapping because it is much more complex. [1] https://lore.kernel.org/linux-doc/20210510030027.56044-1-songmuchun@bytedance.com/ This patch (of 3): In [1], PMD mappings of vmemmap pages were disabled if the the feature hugetlb_free_vmemmap was enabled. This was done to simplify the initial implementation of vmmemap freeing for hugetlb pages. Now, remove this simplification by allowing PMD mapping and switching to PTE mappings as needed for allocated hugetlb pages. When a hugetlb page is allocated, the vmemmap page tables are walked to free vmemmap pages. During this walk, split huge PMD mappings to PTE mappings as required. In the unlikely case PTE pages can not be allocated, return error(ENOMEM) and do not optimize vmemmap of the hugetlb page. When HugeTLB pages are freed from the pool, we do not attempt to coalesce and move back to a PMD mapping because it is much more complex. [1] https://lkml.kernel.org/r/20210510030027.56044-8-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210616094915.34432-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210616094915.34432-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Oscar Salvador Cc: Michal Hocko Cc: David Hildenbrand Cc: Chen Huang Cc: Jonathan Corbet Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8cc5fcbb5be814c115085549b700e473685b11e9 Author: Mina Almasry Date: Wed Jun 30 18:48:19 2021 -0700 mm, hugetlb: fix racy resv_huge_pages underflow on UFFDIO_COPY On UFFDIO_COPY, if we fail to copy the page contents while holding the hugetlb_fault_mutex, we will drop the mutex and return to the caller after allocating a page that consumed a reservation. In this case there may be a fault that double consumes the reservation. To handle this, we free the allocated page, fix the reservations, and allocate a temporary hugetlb page and return that to the caller. When the caller does the copy outside of the lock, we again check the cache, and allocate a page consuming the reservation, and copy over the contents. Test: Hacked the code locally such that resv_huge_pages underflows produce a warning and the copy_huge_page_from_user() always fails, then: ./tools/testing/selftests/vm/userfaultfd hugetlb_shared 10 2 /tmp/kokonut_test/huge/userfaultfd_test && echo test success ./tools/testing/selftests/vm/userfaultfd hugetlb 10 2 /tmp/kokonut_test/huge/userfaultfd_test && echo test success Both tests succeed and produce no warnings. After the test runs number of free/resv hugepages is correct. [yuehaibing@huawei.com: remove set but not used variable 'vm_alloc_shared'] Link: https://lkml.kernel.org/r/20210601141610.28332-1-yuehaibing@huawei.com [almasrymina@google.com: fix allocation error check and copy func name] Link: https://lkml.kernel.org/r/20210605010626.1459873-1-almasrymina@google.com Link: https://lkml.kernel.org/r/20210528005029.88088-1-almasrymina@google.com Signed-off-by: Mina Almasry Signed-off-by: YueHaibing Cc: Axel Rasmussen Cc: Peter Xu Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22f3c951865be13dd32ba042b50bea3f6f93e115 Author: Nanyong Sun Date: Wed Jun 30 18:48:16 2021 -0700 khugepaged: selftests: remove debug_cow The debug_cow attribute had been removed since commit 4958e4d86ecb01 ("mm: thp: remove debug_cow switch"), so remove it in selftest code too, otherwise the khugepaged test will fail. Link: https://lkml.kernel.org/r/20210430051117.400189-1-sunnanyong@huawei.com Fixes: 4958e4d86ecb01 ("mm: thp: remove debug_cow switch") Signed-off-by: Nanyong Sun Cc: Yang Shi Cc: Zi Yan Cc: Kirill A. Shutemov Cc: Shuah Khan Cc: Kefeng Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6a8f7c4aa7eb50304b5c4e68eccd24313f3a785 Author: Christophe Leroy Date: Wed Jun 30 18:48:12 2021 -0700 powerpc/8xx: add support for huge pages on VMAP and VMALLOC powerpc 8xx has 4 page sizes: - 4k - 16k - 512k - 8M At the time being, vmalloc and vmap only support huge pages which are leaf at PMD level. Here the PMD level is 4M, it doesn't correspond to any supported page size. For now, implement use of 16k and 512k pages which is done at PTE level. Support of 8M pages will be implemented later, it requires vmalloc to support hugepd tables. Link: https://lkml.kernel.org/r/8b972f1c03fb6bd59953035f0a3e4d26659de4f8.1620795204.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Mike Kravetz Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3382bbee0464bf31e63853c6ec2a83ead77a01cc Author: Christophe Leroy Date: Wed Jun 30 18:48:09 2021 -0700 mm/vmalloc: enable mapping of huge pages at pte level in vmalloc On some architectures like powerpc, there are huge pages that are mapped at pte level. Enable it in vmalloc. For that, architectures can provide arch_vmap_pte_supported_shift() that returns the shift for pages to map at pte level. Link: https://lkml.kernel.org/r/2c717e3b1fba1894d890feb7669f83025bfa314d.1620795204.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Mike Kravetz Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7ee1f13d606c1b1be3bdaf1609f3991bc06da87 Author: Christophe Leroy Date: Wed Jun 30 18:48:06 2021 -0700 mm/vmalloc: enable mapping of huge pages at pte level in vmap On some architectures like powerpc, there are huge pages that are mapped at pte level. Enable it in vmap. For that, architectures can provide arch_vmap_pte_range_map_size() that returns the size of pages to map at pte level. Link: https://lkml.kernel.org/r/fb3ccc73377832ac6708181ec419128a2f98ce36.1620795204.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Mike Kravetz Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c742199a014de23ee92055c2473d91fe5561ffdf Author: Christophe Leroy Date: Wed Jun 30 18:48:03 2021 -0700 mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge For architectures with no PMD and/or no PUD, add stubs similar to what we have for architectures without P4D. [christophe.leroy@csgroup.eu: arm64: define only {pud/pmd}_{set/clear}_huge when useful] Link: https://lkml.kernel.org/r/73ec95f40cafbbb69bdfb43a7f53876fd845b0ce.1620990479.git.christophe.leroy@csgroup.eu [christophe.leroy@csgroup.eu: x86: define only {pud/pmd}_{set/clear}_huge when useful] Link: https://lkml.kernel.org/r/7fbf1b6bc3e15c07c24fa45278d57064f14c896b.1620930415.git.christophe.leroy@csgroup.eu Link: https://lkml.kernel.org/r/5ac5976419350e8e048d463a64cae449eb3ba4b0.1620795204.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Mike Kravetz Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Uladzislau Rezki Cc: Naresh Kamboju Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79c1c594f49a88fba9744cb5c85978c6b1b365ec Author: Christophe Leroy Date: Wed Jun 30 18:48:00 2021 -0700 mm/hugetlb: change parameters of arch_make_huge_pte() Patch series "Subject: [PATCH v2 0/5] Implement huge VMAP and VMALLOC on powerpc 8xx", v2. This series implements huge VMAP and VMALLOC on powerpc 8xx. Powerpc 8xx has 4 page sizes: - 4k - 16k - 512k - 8M At the time being, vmalloc and vmap only support huge pages which are leaf at PMD level. Here the PMD level is 4M, it doesn't correspond to any supported page size. For now, implement use of 16k and 512k pages which is done at PTE level. Support of 8M pages will be implemented later, it requires use of hugepd tables. To allow this, the architecture provides two functions: - arch_vmap_pte_range_map_size() which tells vmap_pte_range() what page size to use. A stub returning PAGE_SIZE is provided when the architecture doesn't provide this function. - arch_vmap_pte_supported_shift() which tells __vmalloc_node_range() what page shift to use for a given area size. A stub returning PAGE_SHIFT is provided when the architecture doesn't provide this function. This patch (of 5): At the time being, arch_make_huge_pte() has the following prototype: pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, struct page *page, int writable); vma is used to get the pages shift or size. vma is also used on Sparc to get vm_flags. page is not used. writable is not used. In order to use this function without a vma, replace vma by shift and flags. Also remove the used parameters. Link: https://lkml.kernel.org/r/cover.1620795204.git.christophe.leroy@csgroup.eu Link: https://lkml.kernel.org/r/f4633ac6a7da2f22f31a04a89e0a7026bb78b15b.1620795204.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Acked-by: Mike Kravetz Cc: Nicholas Piggin Cc: Mike Kravetz Cc: Mike Rapoport Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit babbbdd08af98a59089334eb3effbed5a7a0cf7f Author: Miaohe Lin Date: Wed Jun 30 18:47:57 2021 -0700 mm/huge_memory.c: don't discard hugepage if other processes are mapping it If other processes are mapping any other subpages of the hugepage, i.e. in pte-mapped thp case, page_mapcount() will return 1 incorrectly. Then we would discard the page while other processes are still mapping it. Fix it by using total_mapcount() which can tell whether other processes are still mapping it. Link: https://lkml.kernel.org/r/20210511134857.1581273-6-linmiaohe@huawei.com Fixes: b8d3c4c3009d ("mm/huge_memory.c: don't split THP page when MADV_FREE syscall is called") Reviewed-by: Yang Shi Signed-off-by: Miaohe Lin Cc: Alexey Dobriyan Cc: "Aneesh Kumar K . V" Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Minchan Kim Cc: Ralph Campbell Cc: Rik van Riel Cc: Song Liu Cc: William Kucharski Cc: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9132a468aafdaed5efd8dd5506b29f55a738782e Author: Miaohe Lin Date: Wed Jun 30 18:47:53 2021 -0700 mm/huge_memory.c: remove unnecessary tlb_remove_page_size() for huge zero pmd Commit aa88b68c3b1d ("thp: keep huge zero page pinned until tlb flush") introduced tlb_remove_page() for huge zero page to keep it pinned until flush is complete and prevents the page from being split under us. But huge zero page is kept pinned until all relevant mm_users reach zero since the commit 6fcb52a56ff6 ("thp: reduce usage of huge zero page's atomic counter"). So tlb_remove_page_size() for huge zero pmd is unnecessary now. Link: https://lkml.kernel.org/r/20210511134857.1581273-5-linmiaohe@huawei.com Reviewed-by: Yang Shi Acked-by: David Hildenbrand Signed-off-by: Miaohe Lin Cc: Alexey Dobriyan Cc: "Aneesh Kumar K . V" Cc: Anshuman Khandual Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Minchan Kim Cc: Ralph Campbell Cc: Rik van Riel Cc: Song Liu Cc: William Kucharski Cc: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e6be37b2e7bddfe0c76585ee7c7eee5acc8efeab Author: Miaohe Lin Date: Wed Jun 30 18:47:50 2021 -0700 mm/huge_memory.c: add missing read-only THP checking in transparent_hugepage_enabled() Since commit 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS"), read-only THP file mapping is supported. But it forgot to add checking for it in transparent_hugepage_enabled(). To fix it, we add checking for read-only THP file mapping and also introduce helper transhuge_vma_enabled() to check whether thp is enabled for specified vma to reduce duplicated code. We rename transparent_hugepage_enabled to transparent_hugepage_active to make the code easier to follow as suggested by David Hildenbrand. [linmiaohe@huawei.com: define transhuge_vma_enabled next to transhuge_vma_suitable] Link: https://lkml.kernel.org/r/20210514093007.4117906-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210511134857.1581273-4-linmiaohe@huawei.com Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi Cc: Alexey Dobriyan Cc: "Aneesh Kumar K . V" Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Minchan Kim Cc: Ralph Campbell Cc: Rik van Riel Cc: Song Liu Cc: William Kucharski Cc: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfe5c51c6029af0a6c302a0d5dcde3cc4e298a47 Author: Miaohe Lin Date: Wed Jun 30 18:47:46 2021 -0700 mm/huge_memory.c: use page->deferred_list Now that we can represent the location of ->deferred_list instead of ->mapping + ->index, make use of it to improve readability. Link: https://lkml.kernel.org/r/20210511134857.1581273-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi Reviewed-by: David Hildenbrand Cc: Alexey Dobriyan Cc: "Aneesh Kumar K . V" Cc: Anshuman Khandual Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kirill A. Shutemov Cc: Matthew Wilcox Cc: Minchan Kim Cc: Ralph Campbell Cc: Rik van Riel Cc: Song Liu Cc: William Kucharski Cc: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2bd53f18bb7f7cfc91b3bb527d7809376700a8e Author: Miaohe Lin Date: Wed Jun 30 18:47:43 2021 -0700 mm/huge_memory.c: remove dedicated macro HPAGE_CACHE_INDEX_MASK Patch series "Cleanup and fixup for huge_memory:, v3. This series contains cleanups to remove dedicated macro and remove unnecessary tlb_remove_page_size() for huge zero pmd. Also this adds missing read-only THP checking for transparent_hugepage_enabled() and avoids discarding hugepage if other processes are mapping it. More details can be found in the respective changelogs. Thi patch (of 5): Rewrite the pgoff checking logic to remove macro HPAGE_CACHE_INDEX_MASK which is only used here to simplify the code. Link: https://lkml.kernel.org/r/20210511134857.1581273-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210511134857.1581273-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi Reviewed-by: Anshuman Khandual Reviewed-by: David Hildenbrand Cc: Zi Yan Cc: William Kucharski Cc: Matthew Wilcox Cc: "Aneesh Kumar K . V" Cc: Ralph Campbell Cc: Song Liu Cc: Kirill A. Shutemov Cc: Rik van Riel Cc: Johannes Weiner Cc: Minchan Kim Cc: Hugh Dickins Cc: Alexey Dobriyan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b593b90dc9768d4873b8b7c60be2c69d8f5c180e Author: Shixin Liu Date: Wed Jun 30 18:47:40 2021 -0700 mm/debug_vm_pgtable: remove redundant pfn_{pmd/pte}() and fix one comment mistake Remove redundant pfn_{pmd/pte}() in {pmd/pte}_advanced_tests() and adjust pfn_pud() in pud_advanced_tests() to make it similar with other two functions. In addition, the branch condition should be CONFIG_TRANSPARENT_HUGEPAGE instead of CONFIG_ARCH_HAS_PTE_DEVMAP. Link: https://lkml.kernel.org/r/20210419071820.750217-2-liushixin2@huawei.com Signed-off-by: Shixin Liu Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5fe77be6bf14bf6c471be58c68edc9e0f97b72fb Author: Shixin Liu Date: Wed Jun 30 18:47:37 2021 -0700 mm/debug_vm_pgtable: move {pmd/pud}_huge_tests out of CONFIG_TRANSPARENT_HUGEPAGE The functions {pmd/pud}_set_huge and {pmd/pud}_clear_huge are not dependent on THP. Hence move {pmd/pud}_huge_tests out of CONFIG_TRANSPARENT_HUGEPAGE. Link: https://lkml.kernel.org/r/20210419071820.750217-1-liushixin2@huawei.com Signed-off-by: Shixin Liu Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 774905878fc9b0b9a5ee4a889b97f773a077aeee Author: Muchun Song Date: Wed Jun 30 18:47:33 2021 -0700 mm: hugetlb: introduce nr_free_vmemmap_pages in the struct hstate All the infrastructure is ready, so we introduce nr_free_vmemmap_pages field in the hstate to indicate how many vmemmap pages associated with a HugeTLB page that can be freed to buddy allocator. And initialize it in the hugetlb_vmemmap_init(). This patch is actual enablement of the feature. There are only (RESERVE_VMEMMAP_SIZE / sizeof(struct page)) struct page structs that can be used when CONFIG_HUGETLB_PAGE_FREE_VMEMMAP, so add a BUILD_BUG_ON to catch invalid usage of the tail struct page. Link: https://lkml.kernel.org/r/20210510030027.56044-10-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Mike Kravetz Reviewed-by: Oscar Salvador Reviewed-by: Miaohe Lin Tested-by: Chen Huang Tested-by: Bodeddula Balasubramaniam Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Barry Song Cc: Borislav Petkov Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Michal Hocko Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4bab4964a59f277915285787c828b810151de7a1 Author: Muchun Song Date: Wed Jun 30 18:47:29 2021 -0700 mm: memory_hotplug: disable memmap_on_memory when hugetlb_free_vmemmap enabled The parameter of memory_hotplug.memmap_on_memory is not compatible with hugetlb_free_vmemmap. So disable it when hugetlb_free_vmemmap is enabled. [akpm@linux-foundation.org: remove unneeded include, per Oscar] Link: https://lkml.kernel.org/r/20210510030027.56044-9-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Mike Kravetz Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Barry Song Cc: Bodeddula Balasubramaniam Cc: Borislav Petkov Cc: Chen Huang Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Michal Hocko Cc: Mina Almasry Cc: Oliver Neukum Cc: Oscar Salvador Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9fdff87e893ec5b7c32836675db80cf691b2a8b Author: Muchun Song Date: Wed Jun 30 18:47:25 2021 -0700 mm: hugetlb: add a kernel parameter hugetlb_free_vmemmap Add a kernel parameter hugetlb_free_vmemmap to enable the feature of freeing unused vmemmap pages associated with each hugetlb page on boot. We disable PMD mapping of vmemmap pages for x86-64 arch when this feature is enabled. Because vmemmap_remap_free() depends on vmemmap being base page mapped. Link: https://lkml.kernel.org/r/20210510030027.56044-8-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Barry Song Reviewed-by: Miaohe Lin Tested-by: Chen Huang Tested-by: Bodeddula Balasubramaniam Reviewed-by: Mike Kravetz Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Borislav Petkov Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Michal Hocko Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad2fa3717b74994a22519dbe045757135db00dbb Author: Muchun Song Date: Wed Jun 30 18:47:21 2021 -0700 mm: hugetlb: alloc the vmemmap pages associated with each HugeTLB page When we free a HugeTLB page to the buddy allocator, we need to allocate the vmemmap pages associated with it. However, we may not be able to allocate the vmemmap pages when the system is under memory pressure. In this case, we just refuse to free the HugeTLB page. This changes behavior in some corner cases as listed below: 1) Failing to free a huge page triggered by the user (decrease nr_pages). User needs to try again later. 2) Failing to free a surplus huge page when freed by the application. Try again later when freeing a huge page next time. 3) Failing to dissolve a free huge page on ZONE_MOVABLE via offline_pages(). This can happen when we have plenty of ZONE_MOVABLE memory, but not enough kernel memory to allocate vmemmmap pages. We may even be able to migrate huge page contents, but will not be able to dissolve the source huge page. This will prevent an offline operation and is unfortunate as memory offlining is expected to succeed on movable zones. Users that depend on memory hotplug to succeed for movable zones should carefully consider whether the memory savings gained from this feature are worth the risk of possibly not being able to offline memory in certain situations. 4) Failing to dissolve a huge page on CMA/ZONE_MOVABLE via alloc_contig_range() - once we have that handling in place. Mainly affects CMA and virtio-mem. Similar to 3). virito-mem will handle migration errors gracefully. CMA might be able to fallback on other free areas within the CMA region. Vmemmap pages are allocated from the page freeing context. In order for those allocations to be not disruptive (e.g. trigger oom killer) __GFP_NORETRY is used. hugetlb_lock is dropped for the allocation because a non sleeping allocation would be too fragile and it could fail too easily under memory pressure. GFP_ATOMIC or other modes to access memory reserves is not used because we want to prevent consuming reserves under heavy hugetlb freeing. [mike.kravetz@oracle.com: fix dissolve_free_huge_page use of tail/head page] Link: https://lkml.kernel.org/r/20210527231225.226987-1-mike.kravetz@oracle.com [willy@infradead.org: fix alloc_vmemmap_page_list documentation warning] Link: https://lkml.kernel.org/r/20210615200242.1716568-6-willy@infradead.org Link: https://lkml.kernel.org/r/20210510030027.56044-7-songmuchun@bytedance.com Signed-off-by: Muchun Song Signed-off-by: Mike Kravetz Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Mike Kravetz Reviewed-by: Oscar Salvador Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Barry Song Cc: Bodeddula Balasubramaniam Cc: Borislav Petkov Cc: Chen Huang Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Michal Hocko Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b65d4adbc0f0d4619f61ee9d8126bc5005b78802 Author: Muchun Song Date: Wed Jun 30 18:47:17 2021 -0700 mm: hugetlb: defer freeing of HugeTLB pages In the subsequent patch, we should allocate the vmemmap pages when freeing a HugeTLB page. But update_and_free_page() can be called under any context, so we cannot use GFP_KERNEL to allocate vmemmap pages. However, we can defer the actual freeing in a kworker to prevent from using GFP_ATOMIC to allocate the vmemmap pages. The __update_and_free_page() is where the call to allocate vmemmmap pages will be inserted. Link: https://lkml.kernel.org/r/20210510030027.56044-6-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Reviewed-by: Oscar Salvador Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Barry Song Cc: Bodeddula Balasubramaniam Cc: Borislav Petkov Cc: Chen Huang Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Michal Hocko Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f41f2ed43ca5258d70d53290d1951a21621f95c8 Author: Muchun Song Date: Wed Jun 30 18:47:13 2021 -0700 mm: hugetlb: free the vmemmap pages associated with each HugeTLB page Every HugeTLB has more than one struct page structure. We __know__ that we only use the first 4 (__NR_USED_SUBPAGE) struct page structures to store metadata associated with each HugeTLB. There are a lot of struct page structures associated with each HugeTLB page. For tail pages, the value of compound_head is the same. So we can reuse first page of tail page structures. We map the virtual addresses of the remaining pages of tail page structures to the first tail page struct, and then free these page frames. Therefore, we need to reserve two pages as vmemmap areas. When we allocate a HugeTLB page from the buddy, we can free some vmemmap pages associated with each HugeTLB page. It is more appropriate to do it in the prep_new_huge_page(). The free_vmemmap_pages_per_hpage(), which indicates how many vmemmap pages associated with a HugeTLB page can be freed, returns zero for now, which means the feature is disabled. We will enable it once all the infrastructure is there. [willy@infradead.org: fix documentation warning] Link: https://lkml.kernel.org/r/20210615200242.1716568-5-willy@infradead.org Link: https://lkml.kernel.org/r/20210510030027.56044-5-songmuchun@bytedance.com Signed-off-by: Muchun Song Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Oscar Salvador Tested-by: Chen Huang Tested-by: Bodeddula Balasubramaniam Acked-by: Michal Hocko Reviewed-by: Mike Kravetz Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Barry Song Cc: Borislav Petkov Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd39d4e9e71c5437b67c819c3d53032145bf2879 Author: Muchun Song Date: Wed Jun 30 18:47:09 2021 -0700 mm: hugetlb: gather discrete indexes of tail page For HugeTLB page, there are more metadata to save in the struct page. But the head struct page cannot meet our needs, so we have to abuse other tail struct page to store the metadata. In order to avoid conflicts caused by subsequent use of more tail struct pages, we can gather these discrete indexes of tail struct page. In this case, it will be easier to add a new tail page index later. Link: https://lkml.kernel.org/r/20210510030027.56044-4-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Reviewed-by: Miaohe Lin Tested-by: Chen Huang Tested-by: Bodeddula Balasubramaniam Acked-by: Michal Hocko Reviewed-by: Mike Kravetz Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Balbir Singh Cc: Barry Song Cc: Borislav Petkov Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6be24bed9da367c29b04e6fba8c9f27db39aa665 Author: Muchun Song Date: Wed Jun 30 18:47:04 2021 -0700 mm: hugetlb: introduce a new config HUGETLB_PAGE_FREE_VMEMMAP The option HUGETLB_PAGE_FREE_VMEMMAP allows for the freeing of some vmemmap pages associated with pre-allocated HugeTLB pages. For example, on X86_64 6 vmemmap pages of size 4KB each can be saved for each 2MB HugeTLB page. 4094 vmemmap pages of size 4KB each can be saved for each 1GB HugeTLB page. When a HugeTLB page is allocated or freed, the vmemmap array representing the range associated with the page will need to be remapped. When a page is allocated, vmemmap pages are freed after remapping. When a page is freed, previously discarded vmemmap pages must be allocated before remapping. The config option is introduced early so that supporting code can be written to depend on the option. The initial version of the code only provides support for x86-64. If config HAVE_BOOTMEM_INFO_NODE is enabled, the freeing vmemmap page code denpend on it to free vmemmap pages. Otherwise, just use free_reserved_page() to free vmemmmap pages. The routine register_page_bootmem_info() is used to register bootmem info. Therefore, make sure register_page_bootmem_info is enabled if HUGETLB_PAGE_FREE_VMEMMAP is defined. Link: https://lkml.kernel.org/r/20210510030027.56044-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Oscar Salvador Acked-by: Mike Kravetz Reviewed-by: Miaohe Lin Tested-by: Chen Huang Tested-by: Bodeddula Balasubramaniam Reviewed-by: Balbir Singh Cc: Alexander Viro Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Barry Song Cc: Borislav Petkov Cc: Dave Hansen Cc: David Hildenbrand Cc: David Rientjes Cc: HORIGUCHI NAOYA Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joao Martins Cc: Joerg Roedel Cc: Jonathan Corbet Cc: Matthew Wilcox Cc: Michal Hocko Cc: Mina Almasry Cc: Oliver Neukum Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Peter Zijlstra Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 426e5c429d16e4cd5ded46e21ff8e939bf8abd0f Author: Muchun Song Date: Wed Jun 30 18:47:00 2021 -0700 mm: memory_hotplug: factor out bootmem core functions to bootmem_info.c Patch series "Free some vmemmap pages of HugeTLB page", v23. This patch series will free some vmemmap pages(struct page structures) associated with each HugeTLB page when preallocated to save memory. In order to reduce the difficulty of the first version of code review. In this version, we disable PMD/huge page mapping of vmemmap if this feature was enabled. This acutely eliminates a bunch of the complex code doing page table manipulation. When this patch series is solid, we cam add the code of vmemmap page table manipulation in the future. The struct page structures (page structs) are used to describe a physical page frame. By default, there is an one-to-one mapping from a page frame to it's corresponding page struct. The HugeTLB pages consist of multiple base page size pages and is supported by many architectures. See hugetlbpage.rst in the Documentation directory for more details. On the x86 architecture, HugeTLB pages of size 2MB and 1GB are currently supported. Since the base page size on x86 is 4KB, a 2MB HugeTLB page consists of 512 base pages and a 1GB HugeTLB page consists of 4096 base pages. For each base page, there is a corresponding page struct. Within the HugeTLB subsystem, only the first 4 page structs are used to contain unique information about a HugeTLB page. HUGETLB_CGROUP_MIN_ORDER provides this upper limit. The only 'useful' information in the remaining page structs is the compound_head field, and this field is the same for all tail pages. By removing redundant page structs for HugeTLB pages, memory can returned to the buddy allocator for other uses. When the system boot up, every 2M HugeTLB has 512 struct page structs which size is 8 pages(sizeof(struct page) * 512 / PAGE_SIZE). HugeTLB struct pages(8 pages) page frame(8 pages) +-----------+ ---virt_to_page---> +-----------+ mapping to +-----------+ | | | 0 | -------------> | 0 | | | +-----------+ +-----------+ | | | 1 | -------------> | 1 | | | +-----------+ +-----------+ | | | 2 | -------------> | 2 | | | +-----------+ +-----------+ | | | 3 | -------------> | 3 | | | +-----------+ +-----------+ | | | 4 | -------------> | 4 | | 2MB | +-----------+ +-----------+ | | | 5 | -------------> | 5 | | | +-----------+ +-----------+ | | | 6 | -------------> | 6 | | | +-----------+ +-----------+ | | | 7 | -------------> | 7 | | | +-----------+ +-----------+ | | | | | | +-----------+ The value of page->compound_head is the same for all tail pages. The first page of page structs (page 0) associated with the HugeTLB page contains the 4 page structs necessary to describe the HugeTLB. The only use of the remaining pages of page structs (page 1 to page 7) is to point to page->compound_head. Therefore, we can remap pages 2 to 7 to page 1. Only 2 pages of page structs will be used for each HugeTLB page. This will allow us to free the remaining 6 pages to the buddy allocator. Here is how things look after remapping. HugeTLB struct pages(8 pages) page frame(8 pages) +-----------+ ---virt_to_page---> +-----------+ mapping to +-----------+ | | | 0 | -------------> | 0 | | | +-----------+ +-----------+ | | | 1 | -------------> | 1 | | | +-----------+ +-----------+ | | | 2 | ----------------^ ^ ^ ^ ^ ^ | | +-----------+ | | | | | | | | 3 | ------------------+ | | | | | | +-----------+ | | | | | | | 4 | --------------------+ | | | | 2MB | +-----------+ | | | | | | 5 | ----------------------+ | | | | +-----------+ | | | | | 6 | ------------------------+ | | | +-----------+ | | | | 7 | --------------------------+ | | +-----------+ | | | | | | +-----------+ When a HugeTLB is freed to the buddy system, we should allocate 6 pages for vmemmap pages and restore the previous mapping relationship. Apart from 2MB HugeTLB page, we also have 1GB HugeTLB page. It is similar to the 2MB HugeTLB page. We also can use this approach to free the vmemmap pages. In this case, for the 1GB HugeTLB page, we can save 4094 pages. This is a very substantial gain. On our server, run some SPDK/QEMU applications which will use 1024GB HugeTLB page. With this feature enabled, we can save ~16GB (1G hugepage)/~12GB (2MB hugepage) memory. Because there are vmemmap page tables reconstruction on the freeing/allocating path, it increases some overhead. Here are some overhead analysis. 1) Allocating 10240 2MB HugeTLB pages. a) With this patch series applied: # time echo 10240 > /proc/sys/vm/nr_hugepages real 0m0.166s user 0m0.000s sys 0m0.166s # bpftrace -e 'kprobe:alloc_fresh_huge_page { @start[tid] = nsecs; } kretprobe:alloc_fresh_huge_page /@start[tid]/ { @latency = hist(nsecs - @start[tid]); delete(@start[tid]); }' Attaching 2 probes... @latency: [8K, 16K) 5476 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [16K, 32K) 4760 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [32K, 64K) 4 | | b) Without this patch series: # time echo 10240 > /proc/sys/vm/nr_hugepages real 0m0.067s user 0m0.000s sys 0m0.067s # bpftrace -e 'kprobe:alloc_fresh_huge_page { @start[tid] = nsecs; } kretprobe:alloc_fresh_huge_page /@start[tid]/ { @latency = hist(nsecs - @start[tid]); delete(@start[tid]); }' Attaching 2 probes... @latency: [4K, 8K) 10147 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [8K, 16K) 93 | | Summarize: this feature is about ~2x slower than before. 2) Freeing 10240 2MB HugeTLB pages. a) With this patch series applied: # time echo 0 > /proc/sys/vm/nr_hugepages real 0m0.213s user 0m0.000s sys 0m0.213s # bpftrace -e 'kprobe:free_pool_huge_page { @start[tid] = nsecs; } kretprobe:free_pool_huge_page /@start[tid]/ { @latency = hist(nsecs - @start[tid]); delete(@start[tid]); }' Attaching 2 probes... @latency: [8K, 16K) 6 | | [16K, 32K) 10227 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [32K, 64K) 7 | | b) Without this patch series: # time echo 0 > /proc/sys/vm/nr_hugepages real 0m0.081s user 0m0.000s sys 0m0.081s # bpftrace -e 'kprobe:free_pool_huge_page { @start[tid] = nsecs; } kretprobe:free_pool_huge_page /@start[tid]/ { @latency = hist(nsecs - @start[tid]); delete(@start[tid]); }' Attaching 2 probes... @latency: [4K, 8K) 6805 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [8K, 16K) 3427 |@@@@@@@@@@@@@@@@@@@@@@@@@@ | [16K, 32K) 8 | | Summary: The overhead of __free_hugepage is about ~2-3x slower than before. Although the overhead has increased, the overhead is not significant. Like Mike said, "However, remember that the majority of use cases create HugeTLB pages at or shortly after boot time and add them to the pool. So, additional overhead is at pool creation time. There is no change to 'normal run time' operations of getting a page from or returning a page to the pool (think page fault/unmap)". Despite the overhead and in addition to the memory gains from this series. The following data is obtained by Joao Martins. Very thanks to his effort. There's an additional benefit which is page (un)pinners will see an improvement and Joao presumes because there are fewer memmap pages and thus the tail/head pages are staying in cache more often. Out of the box Joao saw (when comparing linux-next against linux-next + this series) with gup_test and pinning a 16G HugeTLB file (with 1G pages): get_user_pages(): ~32k -> ~9k unpin_user_pages(): ~75k -> ~70k Usually any tight loop fetching compound_head(), or reading tail pages data (e.g. compound_head) benefit a lot. There's some unpinning inefficiencies Joao was fixing[2], but with that in added it shows even more: unpin_user_pages(): ~27k -> ~3.8k [1] https://lore.kernel.org/linux-mm/20210409205254.242291-1-mike.kravetz@oracle.com/ [2] https://lore.kernel.org/linux-mm/20210204202500.26474-1-joao.m.martins@oracle.com/ This patch (of 9): Move bootmem info registration common API to individual bootmem_info.c. And we will use {get,put}_page_bootmem() to initialize the page for the vmemmap pages or free the vmemmap pages to buddy in the later patch. So move them out of CONFIG_MEMORY_HOTPLUG_SPARSE. This is just code movement without any functional change. Link: https://lkml.kernel.org/r/20210510030027.56044-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210510030027.56044-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Mike Kravetz Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Miaohe Lin Tested-by: Chen Huang Tested-by: Bodeddula Balasubramaniam Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Alexander Viro Cc: Paul E. McKenney Cc: Pawan Gupta Cc: Randy Dunlap Cc: Oliver Neukum Cc: Anshuman Khandual Cc: Joerg Roedel Cc: Mina Almasry Cc: David Rientjes Cc: Matthew Wilcox Cc: Michal Hocko Cc: Barry Song Cc: HORIGUCHI NAOYA Cc: Joao Martins Cc: Xiongchun Duan Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 812bae32e5d50914f75a6e036d3bde39ca86b0c3 Author: Zev Weiss Date: Fri Apr 16 02:51:13 2021 -0500 ARM: dts: aspeed: Update e3c246d4i vuart properties This device-tree was merged with a provisional vuart IRQ-polarity property that was still under review and ended up taking a somewhat different form. This patch updates it to match the final form of the new vuart properties, which additionally allow specifying the SIRQ number and LPC address. Signed-off-by: Zev Weiss Reviewed-by: Andrew Jeffery Fixes: ca03042f0f12 ("serial: 8250_aspeed_vuart: add aspeed, lpc-io-reg and aspeed, lpc-interrupts DT properties") Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210416075113.18047-1-zev@bewilderbeest.net Signed-off-by: Joel Stanley commit a6ecc2a491e378e00e65e59a006d4005e1c2f4af Merge: 2cfa582be8008 16aa4c9a1fbe7 Author: Linus Torvalds Date: Wed Jun 30 19:37:39 2021 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "In addition to bug fixes and cleanups, there are two new features for ext4 in 5.14: - Allow applications to poll on changes to /sys/fs/ext4/*/errors_count - Add the ioctl EXT4_IOC_CHECKPOINT which allows the journal to be checkpointed, truncated and discarded or zero'ed" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (32 commits) jbd2: export jbd2_journal_[un]register_shrinker() ext4: notify sysfs on errors_count value change fs: remove bdev_try_to_free_page callback ext4: remove bdev_try_to_free_page() callback jbd2: simplify journal_clean_one_cp_list() jbd2,ext4: add a shrinker to release checkpointed buffers jbd2: remove redundant buffer io error checks jbd2: don't abort the journal when freeing buffers jbd2: ensure abort the journal if detect IO error when writing original buffer back jbd2: remove the out label in __jbd2_journal_remove_checkpoint() ext4: no need to verify new add extent block jbd2: clean up misleading comments for jbd2_fc_release_bufs ext4: add check to prevent attempting to resize an fs with sparse_super2 ext4: consolidate checks for resize of bigalloc into ext4_resize_begin ext4: remove duplicate definition of ext4_xattr_ibody_inline_set() ext4: fsmap: fix the block/inode bitmap comment ext4: fix comment for s_hash_unsigned ext4: use local variable ei instead of EXT4_I() macro ext4: fix avefreec in find_group_orlov ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit ... commit c503c193db7d7ccc0c58b1ef694eaef331318149 Merge: 9821a195d4e26 1eb5dde674f57 Author: Viresh Kumar Date: Thu Jul 1 07:32:37 2021 +0530 Merge branch 'cpufreq/cppc-fie' into cpufreq/arm/linux-next commit 1eb5dde674f57b1a1918dab33f09e35cdd64eb07 Author: Viresh Kumar Date: Tue Jun 23 15:49:40 2020 +0530 cpufreq: CPPC: Add support for frequency invariance The Frequency Invariance Engine (FIE) is providing a frequency scaling correction factor that helps achieve more accurate load-tracking. Normally, this scaling factor can be obtained directly with the help of the cpufreq drivers as they know the exact frequency the hardware is running at. But that isn't the case for CPPC cpufreq driver. Another way of obtaining that is using the arch specific counter support, which is already present in kernel, but that hardware is optional for platforms. This patch updates the CPPC driver to register itself with the topology core to provide its own implementation (cppc_scale_freq_tick()) of topology_scale_freq_tick() which gets called by the scheduler on every tick. Note that the arch specific counters have higher priority than CPPC counters, if available, though the CPPC driver doesn't need to have any special handling for that. On an invocation of cppc_scale_freq_tick(), we schedule an irq work (since we reach here from hard-irq context), which then schedules a normal work item and cppc_scale_freq_workfn() updates the per_cpu arch_freq_scale variable based on the counter updates since the last tick. To allow platforms to disable this CPPC counter-based frequency invariance support, this is all done under CONFIG_ACPI_CPPC_CPUFREQ_FIE, which is enabled by default. This also exports sched_setattr_nocheck() as the CPPC driver can be built as a module. Cc: linux-acpi@vger.kernel.org Tested-by: Vincent Guittot Reviewed-by: Ionela Voinescu Tested-by: Qian Cai Signed-off-by: Viresh Kumar commit 83150f5d05f065fb5c12c612f119015cabdcc124 Author: Viresh Kumar Date: Tue Jun 15 14:27:50 2021 +0530 arch_topology: Avoid use-after-free for scale_freq_data Currently topology_scale_freq_tick() (which gets called from scheduler_tick()) may end up using a pointer to "struct scale_freq_data", which was previously cleared by topology_clear_scale_freq_source(), as there is no protection in place here. The users of topology_clear_scale_freq_source() though needs a guarantee that the previously cleared scale_freq_data isn't used anymore, so they can free the related resources. Since topology_scale_freq_tick() is called from scheduler tick, we don't want to add locking in there. Use the RCU update mechanism instead (which is already used by the scheduler's utilization update path) to guarantee race free updates here. synchronize_rcu() makes sure that all RCU critical sections that started before it is called, will finish before it returns. And so the callers of topology_clear_scale_freq_source() don't need to worry about their callback getting called anymore. Cc: Paul E. McKenney Fixes: 01e055c120a4 ("arch_topology: Allow multiple entities to provide sched_freq_tick() callback") Tested-by: Vincent Guittot Reviewed-by: Ionela Voinescu Tested-by: Qian Cai Signed-off-by: Viresh Kumar commit eead1840cbd31e553bf8ccdefbd5b065bf596b71 Author: Viresh Kumar Date: Fri Jun 18 13:42:23 2021 +0530 cpufreq: CPPC: Pass structure instance by reference Don't pass structure instance by value, pass it by reference instead. Tested-by: Vincent Guittot Reviewed-by: Ionela Voinescu Tested-by: Qian Cai Signed-off-by: Viresh Kumar commit fe2535a44904a77615a3af8e8fd7dafb98fb0e1b Author: Viresh Kumar Date: Fri Jun 18 13:31:27 2021 +0530 cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init It's a classic example of memleak, we allocate something, we fail and never free the resources. Make sure we free all resources on policy ->init() failures. Fixes: a28b2bfc099c ("cppc_cpufreq: replace per-cpu data array with a list") Tested-by: Vincent Guittot Reviewed-by: Ionela Voinescu Tested-by: Qian Cai Signed-off-by: Viresh Kumar commit b5cfbd35eccaa0b532dc0d8a31e4d59b5e314c93 Author: Yufen Yu Date: Thu Jun 10 10:32:41 2021 +0800 block: check disk exist before trying to add partition If disk have been deleted, we should return fail for ioctl BLKPG_DEL_PARTITION. Otherwise, the directory /sys/class/block may remain invalid symlinks file. The race as following: blkdev_open del_gendisk disk->flags &= ~GENHD_FL_UP; blk_drop_partitions blkpg_ioctl bdev_add_partition add_partition device_add device_add_class_symlinks ioctl may add_partition after del_gendisk() have tried to delete partitions. Then, symlinks file will be created. Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Yufen Yu Link: https://lore.kernel.org/r/20210610023241.3646241-1-yuyufen@huawei.com Signed-off-by: Jens Axboe commit 2cfa582be80081fb8db02d4d9b44bff34b82ac54 Merge: dbe69e4337221 5c0de3d72f8c0 Author: Linus Torvalds Date: Wed Jun 30 18:19:39 2021 -0700 Merge tag 'for-5.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Various DM persistent-data library improvements and fixes that benefit both the DM thinp and cache targets. - A few small DM kcopyd efficiency improvements. - Significant zoned related block core, DM core and DM zoned target changes that culminate with adding zoned append emulation (which is required to properly fix DM crypt's zoned support). - Various DM writecache target changes that improve efficiency. Adds an optional "metadata_only" feature that only promotes bios flagged with REQ_META. But the most significant improvement is writecache's ability to pause writeback, for a confiurable time, if/when the working set is larger than the cache (and the cache is full) -- this ensures performance is no worse than the slower origin device. * tag 'for-5.14/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (35 commits) dm writecache: make writeback pause configurable dm writecache: pause writeback if cache full and origin being written directly dm io tracker: factor out IO tracker dm btree remove: assign new_root only when removal succeeds dm zone: fix dm_revalidate_zones() memory allocation dm ps io affinity: remove redundant continue statement dm writecache: add optional "metadata_only" parameter dm writecache: add "cleaner" and "max_age" to Documentation dm writecache: write at least 4k when committing dm writecache: flush origin device when writing and cache is full dm writecache: have ssd writeback wait if the kcopyd workqueue is busy dm writecache: use list_move instead of list_del/list_add in writecache_writeback() dm writecache: commit just one block, not a full page dm writecache: remove unused gfp_t argument from wc_add_block() dm crypt: Fix zoned block device support dm: introduce zone append emulation dm: rearrange core declarations for extended use from dm-zone.c block: introduce BIO_ZONE_WRITE_LOCKED bio flag block: introduce bio zone helpers block: improve handling of all zones reset operation ... commit 8813587a996e7d2ae160be3b79f9f70d9fef4583 Author: Theodore Ts'o Date: Wed Jun 30 20:54:22 2021 -0400 Revert "ext4: consolidate checks for resize of bigalloc into ext4_resize_begin" The function ext4_resize_begin() gets called from three different places, and online resize for bigalloc file systems is disallowed from the old-style online resize (EXT4_IOC_GROUP_ADD and EXT4_IOC_GROUP_EXTEND), but it *is* supposed to be allowed via EXT4_IOC_RESIZE_FS. This reverts commit e9f9f61d0cdcb7f0b0b5feb2d84aa1c5894751f3. commit dbe69e43372212527abf48609aba7fc39a6daa27 Merge: a6eaf3850cb17 b6df00789e283 Author: Linus Torvalds Date: Wed Jun 30 15:51:09 2021 -0700 Merge tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: "Core: - BPF: - add syscall program type and libbpf support for generating instructions and bindings for in-kernel BPF loaders (BPF loaders for BPF), this is a stepping stone for signed BPF programs - infrastructure to migrate TCP child sockets from one listener to another in the same reuseport group/map to improve flexibility of service hand-off/restart - add broadcast support to XDP redirect - allow bypass of the lockless qdisc to improving performance (for pktgen: +23% with one thread, +44% with 2 threads) - add a simpler version of "DO_ONCE()" which does not require jump labels, intended for slow-path usage - virtio/vsock: introduce SOCK_SEQPACKET support - add getsocketopt to retrieve netns cookie - ip: treat lowest address of a IPv4 subnet as ordinary unicast address allowing reclaiming of precious IPv4 addresses - ipv6: use prandom_u32() for ID generation - ip: add support for more flexible field selection for hashing across multi-path routes (w/ offload to mlxsw) - icmp: add support for extended RFC 8335 PROBE (ping) - seg6: add support for SRv6 End.DT46 behavior - mptcp: - DSS checksum support (RFC 8684) to detect middlebox meddling - support Connection-time 'C' flag - time stamping support - sctp: packetization Layer Path MTU Discovery (RFC 8899) - xfrm: speed up state addition with seq set - WiFi: - hidden AP discovery on 6 GHz and other HE 6 GHz improvements - aggregation handling improvements for some drivers - minstrel improvements for no-ack frames - deferred rate control for TXQs to improve reaction times - switch from round robin to virtual time-based airtime scheduler - add trace points: - tcp checksum errors - openvswitch - action execution, upcalls - socket errors via sk_error_report Device APIs: - devlink: add rate API for hierarchical control of max egress rate of virtual devices (VFs, SFs etc.) - don't require RCU read lock to be held around BPF hooks in NAPI context - page_pool: generic buffer recycling New hardware/drivers: - mobile: - iosm: PCIe Driver for Intel M.2 Modem - support for Qualcomm MSM8998 (ipa) - WiFi: Qualcomm QCN9074 and WCN6855 PCI devices - sparx5: Microchip SparX-5 family of Enterprise Ethernet switches - Mellanox BlueField Gigabit Ethernet (control NIC of the DPU) - NXP SJA1110 Automotive Ethernet 10-port switch - Qualcomm QCA8327 switch support (qca8k) - Mikrotik 10/25G NIC (atl1c) Driver changes: - ACPI support for some MDIO, MAC and PHY devices from Marvell and NXP (our first foray into MAC/PHY description via ACPI) - HW timestamping (PTP) support: bnxt_en, ice, sja1105, hns3, tja11xx - Mellanox/Nvidia NIC (mlx5) - NIC VF offload of L2 bridging - support IRQ distribution to Sub-functions - Marvell (prestera): - add flower and match all - devlink trap - link aggregation - Netronome (nfp): connection tracking offload - Intel 1GE (igc): add AF_XDP support - Marvell DPU (octeontx2): ingress ratelimit offload - Google vNIC (gve): new ring/descriptor format support - Qualcomm mobile (rmnet & ipa): inline checksum offload support - MediaTek WiFi (mt76) - mt7915 MSI support - mt7915 Tx status reporting - mt7915 thermal sensors support - mt7921 decapsulation offload - mt7921 enable runtime pm and deep sleep - Realtek WiFi (rtw88) - beacon filter support - Tx antenna path diversity support - firmware crash information via devcoredump - Qualcomm WiFi (wcn36xx) - Wake-on-WLAN support with magic packets and GTK rekeying - Micrel PHY (ksz886x/ksz8081): add cable test support" * tag 'net-next-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2168 commits) tcp: change ICSK_CA_PRIV_SIZE definition tcp_yeah: check struct yeah size at compile time gve: DQO: Fix off by one in gve_rx_dqo() stmmac: intel: set PCI_D3hot in suspend stmmac: intel: Enable PHY WOL option in EHL net: stmmac: option to enable PHY WOL with PMT enabled net: say "local" instead of "static" addresses in ndo_dflt_fdb_{add,del} net: use netdev_info in ndo_dflt_fdb_{add,del} ptp: Set lookup cookie when creating a PTP PPS source. net: sock: add trace for socket errors net: sock: introduce sk_error_report net: dsa: replay the local bridge FDB entries pointing to the bridge dev too net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and dev_put are on the same dev net: dsa: include fdb entries pointing to bridge in the host fdb list net: dsa: include bridge addresses which are local in the host fdb list net: dsa: sync static FDB entries on foreign interfaces to hardware net: dsa: install the host MDB and FDB entries in the master's RX filter net: dsa: reference count the FDB addresses at the cross-chip notifier level net: dsa: introduce a separate cross-chip notifier type for host FDBs net: dsa: reference count the MDB entries at the cross-chip notifier level ... commit a6eaf3850cb171c328a8b0db6d3c79286a1eba9d Merge: f4cc74c9382d8 a22a5cb81e206 Author: Linus Torvalds Date: Wed Jun 30 15:37:49 2021 -0700 Merge tag 'sched-urgent-2021-06-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: - Fix a small inconsistency (bug) in load tracking, caught by a new warning that several people reported. - Flip CONFIG_SCHED_CORE to default-disabled, and update the Kconfig help text. * tag 'sched-urgent-2021-06-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Disable CONFIG_SCHED_CORE by default sched/fair: Ensure _sum and _avg values stay consistent commit f4cc74c9382d8b02181cfdc6d29ee5bc7a1f7d02 Merge: 92183137e6c14 14a832498c23c Author: Linus Torvalds Date: Wed Jun 30 15:36:48 2021 -0700 Merge tag 'microblaze-v5.14' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: - Remove unused PAGE_UP/DOWN macros - Fix trivial spelling mistake * tag 'microblaze-v5.14' of git://git.monstr.eu/linux-2.6-microblaze: arch: microblaze: Fix spelling mistake "vesion" -> "version" microblaze: Cleanup unused functions commit 92183137e6c14b68ff4de51f6ef371b2b1fe6e68 Merge: 5c874a5b29c26 1b8b719229197 Author: Linus Torvalds Date: Wed Jun 30 15:30:47 2021 -0700 Merge tag 'safesetid-5.14' of git://github.com/micah-morton/linux Pull SafeSetID update from Micah Morton: "One very minor code cleanup change that marks a variable as __initdata" * tag 'safesetid-5.14' of git://github.com/micah-morton/linux: LSM: SafeSetID: Mark safesetid_initialized as __initdata commit 5c874a5b29c264f88fafb323e8df7da7b214b6a9 Merge: 290fe0fa6f5a1 fe6bde732be8c Author: Linus Torvalds Date: Wed Jun 30 15:28:43 2021 -0700 Merge tag 'Smack-for-5.14' of git://github.com/cschaufler/smack-next Pull smack updates from Casey Schaufler: "There is nothing more significant than an improvement to a byte count check in smackfs. All changes have been in next for weeks" * tag 'Smack-for-5.14' of git://github.com/cschaufler/smack-next: Smack: fix doc warning Revert "Smack: Handle io_uring kernel thread privileges" smackfs: restrict bytes count in smk_set_cipso() security/smack/: fix misspellings using codespell tool commit 290fe0fa6f5a1a3374dfd03fe0eda6c43d53e6cf Merge: 6bd344e55f73f 0ecc617858fce Author: Linus Torvalds Date: Wed Jun 30 15:22:05 2021 -0700 Merge tag 'audit-pr-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Another merge window, another small audit pull request. Four patches in total: one is cosmetic, one removes an unnecessary initialization, one renames some enum values to prevent name collisions, and one converts list_del()/list_add() to list_move(). None of these are earth shattering and all pass the audit-testsuite tests while merging cleanly on top of your tree from earlier today" * tag 'audit-pr-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: remove unnecessary 'ret' initialization audit: remove trailing spaces and tabs audit: Use list_move instead of list_del/list_add audit: Rename enum audit_state constants to avoid AUDIT_DISABLED redefinition audit: add blank line after variable declarations commit 6bd344e55f73f7ae671bf5c1ebe5bd814f3c4b27 Merge: 44b6ed4cfab84 d99cf13f14200 Author: Linus Torvalds Date: Wed Jun 30 14:55:42 2021 -0700 Merge tag 'selinux-pr-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux updates from Paul Moore: - The slow_avc_audit() function is now non-blocking so we can remove the AVC_NONBLOCKING tricks; this also includes the 'flags' variant of avc_has_perm(). - Use kmemdup() instead of kcalloc()+copy when copying parts of the SELinux policydb. - The InfiniBand device name is now passed by reference when possible in the SELinux code, removing a strncpy(). - Minor cleanups including: constification of avtab function args, removal of useless LSM/XFRM function args, SELinux kdoc fixes, and removal of redundant assignments. * tag 'selinux-pr-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: kill 'flags' argument in avc_has_perm_flags() and avc_audit() selinux: slow_avc_audit has become non-blocking selinux: Fix kernel-doc selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC lsm_audit,selinux: pass IB device name by reference selinux: Remove redundant assignment to rc selinux: Corrected comment to match kernel-doc comment selinux: delete selinux_xfrm_policy_lookup() useless argument selinux: constify some avtab function arguments selinux: simplify duplicate_policydb_cond_list() by using kmemdup() commit efee99e68e69d8a1966f3d426cc0cea73e32c6d7 Author: Christoph Hellwig Date: Mon Jun 28 11:39:37 2021 +0200 ubd: remove dead code in ubd_setup_common Remove some leftovers of the fake major number parsing that cause complains from some compilers. Fixes: 2933a1b2c6f3 ("ubd: remove the code to register as the legacy IDE driver") Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210628093937.1325608-1-hch@lst.de Signed-off-by: Jens Axboe commit ae5e6886b4f8d62a9d01fea4221a854e541a1cd0 Author: Keith Busch Date: Thu Jun 10 14:44:37 2021 -0700 nvme: use return value from blk_execute_rq() We don't have an nvme status to report if the driver's .queue_rq() returns an error without dispatching the requested nvme command. Check the return value from blk_execute_rq() for all passthrough commands so the caller may know their command was not successful. If the command is from the target passthrough interface and fails to dispatch, synthesize the response back to the host as a internal target error. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210610214437.641245-5-kbusch@kernel.org Signed-off-by: Jens Axboe commit fb9b16e15cd70e21d8af7f03d700deb9509c2ce8 Author: Keith Busch Date: Thu Jun 10 14:44:36 2021 -0700 block: return errors from blk_execute_rq() The synchronous blk_execute_rq() had not provided a way for its callers to know if its request was successful or not. Return the blk_status_t result of the request. Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210610214437.641245-4-kbusch@kernel.org Signed-off-by: Jens Axboe commit be42a33b9252f0b3857cadb896e430ee17cccad4 Author: Keith Busch Date: Thu Jun 10 14:44:35 2021 -0700 nvme: use blk_execute_rq() for passthrough commands The generic blk_execute_rq() knows how to handle polled completions. Use that instead of implementing an nvme specific handler. Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210610214437.641245-3-kbusch@kernel.org Signed-off-by: Jens Axboe commit c01b5a814e7b28e327883838bad159194bdd68e8 Author: Keith Busch Date: Thu Jun 10 14:44:34 2021 -0700 block: support polling through blk_execute_rq Poll for completions if the request's hctx is a polling type. Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210610214437.641245-2-kbusch@kernel.org Signed-off-by: Jens Axboe commit da6269da4cfe29f484e8fd27c1496b81b47e2499 Author: Christoph Hellwig Date: Thu Jun 24 14:39:34 2021 +0200 block: remove REQ_OP_SCSI_{IN,OUT} With the legacy IDE driver gone drivers now use either REQ_OP_DRV_* or REQ_OP_SCSI_*, so unify the two concepts of passthrough requests into a single one. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5ec780a6eddacbbbc1c5d5838753c3ca43f93526 Author: Christoph Hellwig Date: Thu Jun 24 10:10:12 2021 +0200 block: mark blk_mq_init_queue_data static All driver uses are gone now. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20210624081012.256464-1-hch@lst.de Signed-off-by: Jens Axboe commit 8e60947d2f1ee675681a526da99fa587e63f78e3 Author: Christoph Hellwig Date: Wed Jun 23 16:59:08 2021 +0200 loop: rewrite loop_exit using idr_for_each_entry Use idr_for_each_entry to simplify removing all devices. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210623145908.92973-10-hch@lst.de Signed-off-by: Jens Axboe commit b9848081465d8734441408129bd44311c7b6d644 Author: Christoph Hellwig Date: Wed Jun 23 16:59:07 2021 +0200 loop: split loop_lookup loop_lookup has two callers - one wants to do the a find by index and the other wants any unbound loop device. Open code the respective functionality in each caller. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210623145908.92973-9-hch@lst.de Signed-off-by: Jens Axboe commit e5d66a10324f2a0c31153fd6210d99a9d00ef047 Author: Christoph Hellwig Date: Wed Jun 23 16:59:06 2021 +0200 loop: don't allow deleting an unspecified loop device Passing a negative index to loop_lookup while return any unbound device. Doing that for a delete does not make much sense, so add check to explicitly reject that case. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210623145908.92973-8-hch@lst.de Signed-off-by: Jens Axboe commit 18d1f200b3807c383d80cc00d6bbdee288e63b1f Author: Christoph Hellwig Date: Wed Jun 23 16:59:05 2021 +0200 loop: move loop_ctl_mutex locking into loop_add Move acquiring and releasing loop_ctl_mutex from the callers into loop_add. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210623145908.92973-7-hch@lst.de Signed-off-by: Jens Axboe commit f9d107644aa4943b383986a8aa36125379eeaa81 Author: Christoph Hellwig Date: Wed Jun 23 16:59:04 2021 +0200 loop: split loop_control_ioctl Split loop_control_ioctl into a helper for each command. This keeps the code nicely separated for the upcoming locking changes. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210623145908.92973-6-hch@lst.de Signed-off-by: Jens Axboe commit 4157fe0b3d16ceca4316674a90c681405cdd23bf Author: Christoph Hellwig Date: Wed Jun 23 16:59:03 2021 +0200 loop: don't call loop_lookup before adding a loop device loop_add returns the right error if the slot wasn't available. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210623145908.92973-5-hch@lst.de Signed-off-by: Jens Axboe commit d6da83d072c187d6a69d5a49e2320f62920889d7 Author: Christoph Hellwig Date: Wed Jun 23 16:59:02 2021 +0200 loop: remove the l argument to loop_add None of the callers cares about the allocated struct loop_device. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210623145908.92973-4-hch@lst.de Signed-off-by: Jens Axboe commit bd5c39edad535d9f6ccb99633930f9f7b768593c Author: Christoph Hellwig Date: Wed Jun 23 16:59:01 2021 +0200 loop: reduce loop_ctl_mutex coverage in loop_exit loop_ctl_mutex is only needed to iterate the IDR for removing the loop devices, so reduce the coverage. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210623145908.92973-3-hch@lst.de Signed-off-by: Jens Axboe commit 8b52d8be86d723085784317427d339528766d9a3 Author: Christoph Hellwig Date: Wed Jun 23 16:59:00 2021 +0200 loop: reorder loop_exit Unregister the misc and blockdevice first to prevent further access, and only then iterate to remove the devices. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210623145908.92973-2-hch@lst.de Signed-off-by: Jens Axboe commit 1033d103a9b795b41ca0bb90587047a65e2ed5ef Author: Christoph Hellwig Date: Mon Jun 21 10:01:44 2021 +0200 mmc: initialized disk->minors Fix a let hunk from the blk_mq_alloc_disk conversion. Fixes: 281ea6a5bfdc ("mmc: switch to blk_mq_alloc_disk") Reported-by: Marek Szyprowski Signed-off-by: Christoph Hellwig Tested-by: Marek Szyprowski Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20210621080144.3655131-1-hch@lst.de Signed-off-by: Jens Axboe commit 607d968a5769d8eef20ece19b84937f9c2676491 Author: Christoph Hellwig Date: Wed Jun 16 07:39:34 2021 +0200 mmc: switch to blk_mq_alloc_disk Use the blk_mq_alloc_disk to allocate the request_queue and gendisk together. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210616053934.880951-3-hch@lst.de Signed-off-by: Jens Axboe commit 249cda3325e0ff35dd8af9b5885f3aaf4ddd165d Author: Christoph Hellwig Date: Wed Jun 16 07:39:33 2021 +0200 mmc: remove an extra blk_{get,put}_queue pair The gendisk already acquires a reference to the queue when add_disk is called, which dropped on put_disk. So remove the superflous extra refcounting. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210616053934.880951-2-hch@lst.de Signed-off-by: Jens Axboe commit 6497ef8df568afbf5f3e38825a4590ff41611a54 Author: Prasanna Kumar Kalever Date: Thu Apr 29 15:58:28 2021 +0530 nbd: provide a way for userspace processes to identify device backends Problem: On reconfigure of device, there is no way to defend if the backend storage is matching with the initial backend storage. Say, if an initial connect request for backend "pool1/image1" got mapped to /dev/nbd0 and the userspace process is terminated. A next reconfigure request within NBD_ATTR_DEAD_CONN_TIMEOUT is allowed to use /dev/nbd0 for a different backend "pool1/image2" For example, an operation like below could be dangerous: $ sudo rbd-nbd map --try-netlink rbd-pool/ext4-image /dev/nbd0 $ sudo blkid /dev/nbd0 /dev/nbd0: UUID="bfc444b4-64b1-418f-8b36-6e0d170cfc04" TYPE="ext4" $ sudo pkill -9 rbd-nbd $ sudo rbd-nbd attach --try-netlink --device /dev/nbd0 rbd-pool/xfs-image /dev/nbd0 $ sudo blkid /dev/nbd0 /dev/nbd0: UUID="d29bf343-6570-4069-a9ea-2fa156ced908" TYPE="xfs" Solution: Provide a way for userspace processes to keep some metadata to identify between the device and the backend, so that when a reconfigure request is made, we can compare and avoid such dangerous operations. With this solution, as part of the initial connect request, backend path can be stored in the sysfs per device config, so that on a reconfigure request it's easy to check if the backend path matches with the initial connect backend path. Please note, ioctl interface to nbd will not have these changes, as there won't be any reconfigure. Signed-off-by: Prasanna Kumar Kalever Reviewed-by: Xiubo Li Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210429102828.31248-1-prasanna.kalever@redhat.com Signed-off-by: Jens Axboe commit 35efb594c3a8bbd41fca67658b03bf99441d488b Author: Christoph Hellwig Date: Mon Jun 14 08:07:59 2021 +0200 ubd: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210614060759.3965724-3-hch@lst.de Signed-off-by: Jens Axboe commit 7eb90f7e90a85b635b31bc0ac35846880c7470e7 Author: Christoph Hellwig Date: Mon Jun 14 08:07:58 2021 +0200 ubd: remove the code to register as the legacy IDE driver With the legacy IDE driver long deprecated, and modern userspace being much more flexible about dev_t assignments there is no reason to fake a registration as the legacy IDE driver in ubd. This registeration is a little problematic as it registers the same request_queue for multiple gendisks, so just remove it. Signed-off-by: Christoph Hellwig Acked-By: Anton Ivanov Link: https://lore.kernel.org/r/20210614060759.3965724-2-hch@lst.de Signed-off-by: Jens Axboe commit 2f43dbf3a7423ba14d827965d37fb6a56aa90009 Author: Christoph Hellwig Date: Mon Jun 14 08:02:31 2021 +0200 null_blk: remove an unused variable assignment in null_add_dev Fix up the recent blk_alloc_disk conversion. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210614060231.3965278-1-hch@lst.de Signed-off-by: Jens Axboe commit cc25592caa5dfbb3ae17ef616a8c8f2e910ae549 Author: Christoph Hellwig Date: Mon Jun 14 08:03:43 2021 +0200 mtip32xx: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210614060343.3965416-3-hch@lst.de Signed-off-by: Jens Axboe commit d2efa81dd8ba50b800accb3ef2b73474e5af9648 Author: Christoph Hellwig Date: Mon Jun 14 08:03:42 2021 +0200 mtip32xx: simplify sysfs setup Pass the driver specific attributes directly to device_add_disk instead of manually creating them after the disk registration. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210614060343.3965416-2-hch@lst.de Signed-off-by: Jens Axboe commit 44b6ed4cfab8474061707b60e35afaf2c92a9dc3 Merge: 440462198d9c4 fca41af18e103 Author: Linus Torvalds Date: Wed Jun 30 14:33:25 2021 -0700 Merge tag 'clang-features-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull clang feature updates from Kees Cook: - Add CC_HAS_NO_PROFILE_FN_ATTR in preparation for PGO support in the face of the noinstr attribute, paving the way for PGO and fixing GCOV. (Nick Desaulniers) - x86_64 LTO coverage is expanded to 32-bit x86. (Nathan Chancellor) - Small fixes to CFI. (Mark Rutland, Nathan Chancellor) * tag 'clang-features-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR compiler_attributes.h: cleanups for GCC 4.9+ compiler_attributes.h: define __no_profile, add to noinstr x86, lto: Enable Clang LTO for 32-bit as well CFI: Move function_nocfi() into compiler.h MAINTAINERS: Add Clang CFI section commit e149bd742b2db6a63fc078b1ea6843dc9b22678d Author: Hao Xu Date: Mon Jun 28 05:48:05 2021 +0800 io_uring: code clean for kiocb_done() A simple code clean for kiocb_done() Signed-off-by: Hao Xu Signed-off-by: Jens Axboe commit 915b3dde9b72cb4f531b04208daafcd0a257b847 Author: Hao Xu Date: Mon Jun 28 05:37:30 2021 +0800 io_uring: spin in iopoll() only when reqs are in a single queue We currently spin in iopoll() when requests to be iopolled are for same file(device), while one device may have multiple hardware queues. given an example: hw_queue_0 | hw_queue_1 req(30us) req(10us) If we first spin on iopolling for the hw_queue_0. the avg latency would be (30us + 30us) / 2 = 30us. While if we do round robin, the avg latency would be (30us + 10us) / 2 = 20us since we reap the request in hw_queue_1 in time. So it's better to do spinning only when requests are in same hardware queue. Signed-off-by: Hao Xu Signed-off-by: Jens Axboe commit 99ebe4efbd3882422db1fd6a1b477291ea8bdab7 Author: Pavel Begunkov Date: Sat Jun 26 21:40:49 2021 +0100 io_uring: pre-initialise some of req fields Most of requests are allocated from an internal cache, so it's waste of time fully initialising them every time. Instead, let's pre-init some of the fields we can during initial allocation (e.g. kmalloc(), see io_alloc_req()) and keep them valid on request recycling. There are four of them in this patch: ->ctx is always stays the same ->link is NULL on free, it's an invariant ->result is not even needed to init, just a precaution ->async_data we now clean in io_dismantle_req() as it's likely to never be allocated. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/892ba0e71309bba9fe9e0142472330bbf9d8f05d.1624739600.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5182ed2e332e8e11fa3c1649ef6d6546ccca64d0 Author: Pavel Begunkov Date: Sat Jun 26 21:40:48 2021 +0100 io_uring: refactor io_submit_flush_completions Don't init req_batch before we actually need it. Also, add a small clean up for req declaration. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ad85512e12bd3a20d521e9782750300970e5afc8.1624739600.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 4cfb25bf8877c947e5ae4875e387babe87e12afa Author: Pavel Begunkov Date: Sat Jun 26 21:40:47 2021 +0100 io_uring: optimise hot path restricted checks Move likely/unlikely from io_check_restriction() to specifically ctx->restricted check, because doesn't do what it supposed to and make the common path take an extra jump. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/22bf70d0a543dfc935d7276bdc73081784e30698.1624739600.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e5dc480d4ed9884274e95c757fa2d2e9cc1047ee Author: Pavel Begunkov Date: Sat Jun 26 21:40:46 2021 +0100 io_uring: remove not needed PF_EXITING check Since cancellation got moved before exit_signals(), there is no one left who can call io_run_task_work() with PF_EXIING set, so remove the check. Note that __io_req_task_submit() still needs a similar check. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f7f305ececb1e6044ea649fb983ca754805bb884.1624739600.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit dd432ea5204eeb92a2abf246ce518e68679da772 Author: Pavel Begunkov Date: Sat Jun 26 21:40:45 2021 +0100 io_uring: mainstream sqpoll task_work running task_works are widely used, so place io_run_task_work() directly into the main path of io_sq_thread(), and remove it from other places where it's not needed anymore. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/24eb5e35d519c590d3dffbd694b4c61a5fe49029.1624739600.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b2d9c3da77115b5172749dec20312651e67e0adf Author: Pavel Begunkov Date: Sat Jun 26 21:40:44 2021 +0100 io_uring: refactor io_arm_poll_handler() gcc 11 goes a weird path and duplicates most of io_arm_poll_handler() for READ and WRITE cases. Help it and move all pollin vs pollout specific bits under a single if-else, so there is no temptation for this kind of unfolding. before vs after: text data bss dec hex filename 85362 12650 8 98020 17ee4 ./fs/io_uring.o 85186 12650 8 97844 17e34 ./fs/io_uring.o Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1deea0037293a922a0358e2958384b2e42437885.1624739600.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 59b735aeeb0f23a760bc21f1c5a1ab6c79e9fe0e Author: Olivier Langlois Date: Tue Jun 22 05:17:39 2021 -0700 io_uring: reduce latency by reissueing the operation It is quite frequent that when an operation fails and returns EAGAIN, the data becomes available between that failure and the call to vfs_poll() done by io_arm_poll_handler(). Detecting the situation and reissuing the operation is much faster than going ahead and push the operation to the io-wq. Performance improvement testing has been performed with: Single thread, 1 TCP connection receiving a 5 Mbps stream, no sqpoll. 4 measurements have been taken: 1. The time it takes to process a read request when data is already available 2. The time it takes to process by calling twice io_issue_sqe() after vfs_poll() indicated that data was available 3. The time it takes to execute io_queue_async_work() 4. The time it takes to complete a read request asynchronously 2.25% of all the read operations did use the new path. ready data (baseline) avg 3657.94182918628 min 580 max 20098 stddev 1213.15975908162 reissue completion average 7882.67567567568 min 2316 max 28811 stddev 1982.79172973284 insert io-wq time average 8983.82276995305 min 3324 max 87816 stddev 2551.60056552038 async time completion average 24670.4758861127 min 10758 max 102612 stddev 3483.92416873804 Conclusion: On average reissuing the sqe with the patch code is 1.1uSec faster and in the worse case scenario 59uSec faster than placing the request on io-wq On average completion time by reissuing the sqe with the patch code is 16.79uSec faster and in the worse case scenario 73.8uSec faster than async completion. Signed-off-by: Olivier Langlois Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/9e8441419bb1b8f3c3fcc607b2713efecdef2136.1624364038.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit 22634bc5620d29765e5199c7b230a372c7ddcda2 Author: Jens Axboe Date: Wed Jun 23 09:07:45 2021 -0600 io_uring: add IOPOLL and reserved field checks to IORING_OP_UNLINKAT We can't support IOPOLL with non-pollable request types, and we should check for unused/reserved fields like we do for other request types. Fixes: 14a1143b68ee ("io_uring: add support for IORING_OP_UNLINKAT") Cc: stable@vger.kernel.org Reported-by: Dmitry Kadashev Signed-off-by: Jens Axboe commit ed7eb2592286ead7d3bfdf8adf65e65392167cc4 Author: Jens Axboe Date: Wed Jun 23 09:04:13 2021 -0600 io_uring: add IOPOLL and reserved field checks to IORING_OP_RENAMEAT We can't support IOPOLL with non-pollable request types, and we should check for unused/reserved fields like we do for other request types. Fixes: 80a261fd0032 ("io_uring: add support for IORING_OP_RENAMEAT") Cc: stable@vger.kernel.org Reported-by: Dmitry Kadashev Signed-off-by: Jens Axboe commit 12dcb58ac785ee678f577e1502d966b538375aae Author: Pavel Begunkov Date: Thu Jun 24 15:10:00 2021 +0100 io_uring: refactor io_openat2() Put do_filp_open() fail path of io_openat2() under a single if, deduplicating put_unused_fd(), making it look better and helping the hot path. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f4c84d25c049d0af2adc19c703bbfef607200209.1624543113.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9ba6a1c06279ce499fcf755d8134d679a1f3b4ed Author: Pavel Begunkov Date: Thu Jun 24 15:09:59 2021 +0100 io_uring: simplify struct io_uring_sqe layout Flatten struct io_uring_sqe, the last union is exactly 64B, so move them out of union { struct { ... }}, and decrease __pad2 size. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2e21ef7aed136293d654450bc3088973a8adc730.1624543113.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 16340eab61a3ed1b5c983c19cfa9f51929b2beeb Author: Pavel Begunkov Date: Thu Jun 24 15:09:58 2021 +0100 io_uring: update sqe layout build checks Add missing BUILD_BUG_SQE_ELEM() for ->buf_group verifying that SQE layout doesn't change. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1f9d21bd74599b856b3a632be4c23ffa184a3ef0.1624543113.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit fe7e325750299126b9cc86d3071af594b46c4518 Author: Pavel Begunkov Date: Thu Jun 24 15:09:57 2021 +0100 io_uring: fix code style problems Fix a bunch of problems mostly found by checkpatch.pl Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cfaf9a2f27b43934144fe9422a916bd327099f44.1624543113.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 1a924a808208c1880ef9f36b6bf98d27af045f06 Author: Pavel Begunkov Date: Thu Jun 24 15:09:56 2021 +0100 io_uring: refactor io_sq_thread() Move needs_sched declaration into the block where it's used, so it's harder to misuse/wrongfully reuse. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e4a07db1353ee38b924dd1b45394cf8e746130b4.1624543113.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 948e19479cb649587165243c6cc12d113c9cbbe0 Author: Pavel Begunkov Date: Thu Jun 24 15:09:55 2021 +0100 io_uring: don't change sqpoll creds if not needed SQPOLL doesn't need to change creds if it's not submitting requests. Move creds overriding into __io_sq_thread() after checking if there are SQEs pending. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c54368da2357ac539e0a333f7cfff70d5fb045b2.1624543113.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6a45ece4c9af473555f01f0f8b97eba56e3c7d0d Author: Alex Williamson Date: Mon Jun 28 14:08:12 2021 -0600 vfio/pci: Handle concurrent vma faults io_remap_pfn_range() will trigger a BUG_ON if it encounters a populated pte within the mapping range. This can occur because we map the entire vma on fault and multiple faults can be blocked behind the vma_lock. This leads to traces like the one reported below. We can use our vma_list to test whether a given vma is mapped to avoid this issue. [ 1591.733256] kernel BUG at mm/memory.c:2177! [ 1591.739515] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 1591.747381] Modules linked in: vfio_iommu_type1 vfio_pci vfio_virqfd vfio pv680_mii(O) [ 1591.760536] CPU: 2 PID: 227 Comm: lcore-worker-2 Tainted: G O 5.11.0-rc3+ #1 [ 1591.770735] Hardware name: , BIOS HixxxxFPGA 1P B600 V121-1 [ 1591.778872] pstate: 40400009 (nZcv daif +PAN -UAO -TCO BTYPE=--) [ 1591.786134] pc : remap_pfn_range+0x214/0x340 [ 1591.793564] lr : remap_pfn_range+0x1b8/0x340 [ 1591.799117] sp : ffff80001068bbd0 [ 1591.803476] x29: ffff80001068bbd0 x28: 0000042eff6f0000 [ 1591.810404] x27: 0000001100910000 x26: 0000001300910000 [ 1591.817457] x25: 0068000000000fd3 x24: ffffa92f1338e358 [ 1591.825144] x23: 0000001140000000 x22: 0000000000000041 [ 1591.832506] x21: 0000001300910000 x20: ffffa92f141a4000 [ 1591.839520] x19: 0000001100a00000 x18: 0000000000000000 [ 1591.846108] x17: 0000000000000000 x16: ffffa92f11844540 [ 1591.853570] x15: 0000000000000000 x14: 0000000000000000 [ 1591.860768] x13: fffffc0000000000 x12: 0000000000000880 [ 1591.868053] x11: ffff0821bf3d01d0 x10: ffff5ef2abd89000 [ 1591.875932] x9 : ffffa92f12ab0064 x8 : ffffa92f136471c0 [ 1591.883208] x7 : 0000001140910000 x6 : 0000000200000000 [ 1591.890177] x5 : 0000000000000001 x4 : 0000000000000001 [ 1591.896656] x3 : 0000000000000000 x2 : 0168044000000fd3 [ 1591.903215] x1 : ffff082126261880 x0 : fffffc2084989868 [ 1591.910234] Call trace: [ 1591.914837] remap_pfn_range+0x214/0x340 [ 1591.921765] vfio_pci_mmap_fault+0xac/0x130 [vfio_pci] [ 1591.931200] __do_fault+0x44/0x12c [ 1591.937031] handle_mm_fault+0xcc8/0x1230 [ 1591.942475] do_page_fault+0x16c/0x484 [ 1591.948635] do_translation_fault+0xbc/0xd8 [ 1591.954171] do_mem_abort+0x4c/0xc0 [ 1591.960316] el0_da+0x40/0x80 [ 1591.965585] el0_sync_handler+0x168/0x1b0 [ 1591.971608] el0_sync+0x174/0x180 [ 1591.978312] Code: eb1b027f 540000c0 f9400022 b4fffe02 (d4210000) Fixes: 11c4cd07ba11 ("vfio-pci: Fault mmaps to enable vma tracking") Reported-by: Zeng Tao Suggested-by: Zeng Tao Link: https://lore.kernel.org/r/162497742783.3883260.3282953006487785034.stgit@omen Signed-off-by: Alex Williamson commit 440462198d9c45e48f2d8d9b18c5702d92282f46 Merge: df668a5fe461b 5ed9b357024dc Author: Linus Torvalds Date: Wed Jun 30 12:21:16 2021 -0700 Merge tag 'for-5.14/drivers-2021-06-29' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "Pretty calm round, mostly just NVMe and a bit of MD: - NVMe updates (via Christoph) - improve the APST configuration algorithm (Alexey Bogoslavsky) - look for StorageD3Enable on companion ACPI device (Mario Limonciello) - allow selecting the network interface for TCP connections (Martin Belanger) - misc cleanups (Amit Engel, Chaitanya Kulkarni, Colin Ian King, Christoph) - move the ACPI StorageD3 code to drivers/acpi/ and add quirks for certain AMD CPUs (Mario Limonciello) - zoned device support for nvmet (Chaitanya Kulkarni) - fix the rules for changing the serial number in nvmet (Noam Gottlieb) - various small fixes and cleanups (Dan Carpenter, JK Kim, Chaitanya Kulkarni, Hannes Reinecke, Wesley Sheng, Geert Uytterhoeven, Daniel Wagner) - MD updates (Via Song) - iostats rewrite (Guoqing Jiang) - raid5 lock contention optimization (Gal Ofri) - Fall through warning fix (Gustavo) - Misc fixes (Gustavo, Jiapeng)" * tag 'for-5.14/drivers-2021-06-29' of git://git.kernel.dk/linux-block: (78 commits) nvmet: use NVMET_MAX_NAMESPACES to set nn value loop: Fix missing discard support when using LOOP_CONFIGURE nvme.h: add missing nvme_lba_range_type endianness annotations nvme: remove zeroout memset call for struct nvme-pci: remove zeroout memset call for struct nvmet: remove zeroout memset call for struct nvmet: add ZBD over ZNS backend support nvmet: add Command Set Identifier support nvmet: add nvmet_req_bio put helper for backends nvmet: add req cns error complete helper block: export blk_next_bio() nvmet: remove local variable nvmet: use nvme status value directly nvmet: use u32 type for the local variable nsid nvmet: use u32 for nvmet_subsys max_nsid nvmet: use req->cmd directly in file-ns fast path nvmet: use req->cmd directly in bdev-ns fast path nvmet: make ver stable once connection established nvmet: allow mn change if subsys not discovered nvmet: make sn stable once connection was established ... commit df668a5fe461bb9d7e899c538acc7197746038f4 Merge: df04fbe8680bf 2705dfb209477 Author: Linus Torvalds Date: Wed Jun 30 12:12:56 2021 -0700 Merge tag 'for-5.14/block-2021-06-29' of git://git.kernel.dk/linux-block Pull core block updates from Jens Axboe: - disk events cleanup (Christoph) - gendisk and request queue allocation simplifications (Christoph) - bdev_disk_changed cleanups (Christoph) - IO priority improvements (Bart) - Chained bio completion trace fix (Edward) - blk-wbt fixes (Jan) - blk-wbt enable/disable fix (Zhang) - Scheduler dispatch improvements (Jan, Ming) - Shared tagset scheduler improvements (John) - BFQ updates (Paolo, Luca, Pietro) - BFQ lock inversion fix (Jan) - Documentation improvements (Kir) - CLONE_IO block cgroup fix (Tejun) - Remove of ancient and deprecated block dump feature (zhangyi) - Discard merge fix (Ming) - Misc fixes or followup fixes (Colin, Damien, Dan, Long, Max, Thomas, Yang) * tag 'for-5.14/block-2021-06-29' of git://git.kernel.dk/linux-block: (129 commits) block: fix discard request merge block/mq-deadline: Remove a WARN_ON_ONCE() call blk-mq: update hctx->dispatch_busy in case of real scheduler blk: Fix lock inversion between ioc lock and bfqd lock bfq: Remove merged request already in bfq_requests_merged() block: pass a gendisk to bdev_disk_changed block: move bdev_disk_changed block: add the events* attributes to disk_attrs block: move the disk events code to a separate file block: fix trace completion for chained bio block/partitions/msdos: Fix typo inidicator -> indicator block, bfq: reset waker pointer with shared queues block, bfq: check waker only for queues with no in-flight I/O block, bfq: avoid delayed merge of async queues block, bfq: boost throughput by extending queue-merging times block, bfq: consider also creation time in delayed stable merge block, bfq: fix delayed stable merge check block, bfq: let also stably merged queues enjoy weight raising blk-wbt: make sure throttle is enabled properly blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled() ... commit 498cc50b3fa99b545532dc433d53d3c0b889cc98 Author: Stephen Boyd Date: Wed Jun 30 11:58:39 2021 -0700 clk: hisilicon: hi3559a: Drop __init markings everywhere This driver is a platform driver. The probe function can be called after kernel init, and try to reference kernel memory that has been freed. Drop the __init markings everywhere here to avoid referencing initdata from non-init code. Fixes modpost warnings. Reported-by: kernel test robot Cc: Dongjiu Geng Fixes: 6c81966107dc ("clk: hisilicon: Add clock driver for hi3559A SoC") Link: https://lore.kernel.org/r/20210630185839.3680834-1-sboyd@kernel.org Signed-off-by: Stephen Boyd commit e4c5ef6b9584a861210cf92955b7c8b1727688b9 Author: Martin Blumenstingl Date: Mon Jun 28 00:39:59 2021 +0200 clk: meson: regmap: switch to determine_rate for the dividers This increases the maxmium supported frequency on 32-bit systems from 2^31 (signed long as used by clk_ops.round_rate, maximum value: approx. 2.14GHz) to 2^32 (unsigned long as used by clk_ops.determine_rate, maximum value: approx. 4.29GHz). On Meson8/8b/8m2 the HDMI PLL and it's OD (post-dividers) are capable of running at up to 2.97GHz. So switch the divider implementation in clk-regmap to clk_ops.determine_rate to support these higher frequencies on 32-bit systems. Reviewed-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210627223959.188139-4-martin.blumenstingl@googlemail.com Signed-off-by: Stephen Boyd commit db400ac1444b756030249ed4a35e53a68e557b59 Author: Martin Blumenstingl Date: Mon Jun 28 00:39:58 2021 +0200 clk: divider: Switch from .round_rate to .determine_rate by default .determine_rate is meant to replace .round_rate. The former comes with a benefit which is especially relevant on 32-bit systems: since .determine_rate uses an "unsigned long" (compared to a "signed long" which is used by .round_rate) the maximum value on 32-bit systems increases from 2^31 (or approx. 2.14GHz) to 2^32 (or approx. 4.29GHz). Switch to a .determine_rate implementation by default so 32-bit systems can benefit from the increased maximum value as well as so we have one fewer user of .round_rate. Reviewed-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210627223959.188139-3-martin.blumenstingl@googlemail.com Signed-off-by: Stephen Boyd commit bbd7a6cc382f4317b08ba71151b23abf76fc4c34 Author: Martin Blumenstingl Date: Mon Jun 28 00:39:57 2021 +0200 clk: divider: Add re-usable determine_rate implementations These are useful when running on 32-bit systems to increase the upper supported frequency limit. clk_ops.round_rate returns a signed long which limits the maximum rate on 32-bit systems to 2^31 (or approx. 2.14GHz). clk_ops.determine_rate internally uses an unsigned long so the maximum rate on 32-bit systems is 2^32 or approx. 4.29GHz. To avoid code-duplication switch over divider_{ro_,}round_rate_parent to use the new divider_{ro_,}determine_rate functions. Reviewed-by: Jerome Brunet Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210627223959.188139-2-martin.blumenstingl@googlemail.com Signed-off-by: Stephen Boyd commit faa0e307948594b4379a86fff7fb2409067aed6f Author: Damien Le Moal Date: Tue Jun 22 15:45:02 2021 +0900 clk: k210: Fix k210_clk_set_parent() In k210_clk_set_parent(), add missing writel() call to update the mux register of a clock to change its parent. This also fixes a compilation warning with clang when compiling with W=1. Fixes: c6ca7616f7d5 ("clk: Add RISC-V Canaan Kendryte K210 clock driver") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20210622064502.14841-1-damien.lemoal@wdc.com Signed-off-by: Stephen Boyd commit df04fbe8680bfe07f3d7487eccff9f768bb02533 Merge: 4b5e35ce07581 b3e2964254825 Author: Linus Torvalds Date: Wed Jun 30 11:31:32 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - patch series that ensures that hid-multitouch driver disables touch and button-press reporting on hid-mt devices during suspend when the device is not configured as a wakeup-source, from Hans de Goede - support for ISH DMA on Intel EHL platform, from Even Xu - support for Renoir and Cezanne SoCs, Ambient Light Sensor and Human Presence Detection sensor for amd-sfh driver, from Basavaraj Natikar - other assorted code cleanups and device-specific fixes/quirks * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (45 commits) HID: thrustmaster: Switch to kmemdup() when allocate change_request HID: multitouch: Disable event reporting on suspend when the device is not a wakeup-source HID: logitech-dj: Implement may_wakeup ll-driver callback HID: usbhid: Implement may_wakeup ll-driver callback HID: core: Add hid_hw_may_wakeup() function HID: input: Add support for Programmable Buttons HID: wacom: Correct base usage for capacitive ExpressKey status bits HID: amd_sfh: Add initial support for HPD sensor HID: amd_sfh: Extend ALS support for newer AMD platform HID: amd_sfh: Extend driver capabilities for multi-generation support HID: surface-hid: Fix get-report request HID: sony: fix freeze when inserting ghlive ps3/wii dongles HID: usbkbd: Avoid GFP_ATOMIC when GFP_KERNEL is possible HID: amd_sfh: change in maintainer HID: intel-ish-hid: ipc: Specify that EHL no cache snooping HID: intel-ish-hid: ishtp: Add dma_no_cache_snooping() callback HID: intel-ish-hid: Set ISH driver depends on x86 HID: hid-input: add Surface Go battery quirk HID: intel-ish-hid: Fix minor typos in comments HID: usbmouse: Avoid GFP_ATOMIC when GFP_KERNEL is possible ... commit f20510d552e2941df2518c73c99fa2537575dbce Author: Alexey Bayduraev Date: Wed Jun 30 18:54:48 2021 +0300 tools lib: Adopt bitmap_intersects() operation from the kernel sources Adopt bitmap_intersects() routine that tests whether bitmaps bitmap1 and bitmap2 intersects. This routine will be used during thread masks initialization. Signed-off-by: Alexey Bayduraev Acked-by: Andi Kleen Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Antonov Cc: Alexander Shishkin Cc: Alexei Budankov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Link: http://lore.kernel.org/lkml/f75aa738d8ff8f9cffd7532d671f3ef3deb97a7c.1625065643.git.alexey.v.bayduraev@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4b5e35ce075817bc36d7c581b22853be984e5b41 Merge: e60d726f5d8cc 0a9ece9ba154d Author: Linus Torvalds Date: Wed Jun 30 11:27:49 2021 -0700 Merge tag 'edac_updates_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Tony Luck: "Various fixes and support for new CPUs: - Clean up error messages from thunderx_edac - Add MODULE_DEVICE_TABLE to ti_edac so it will autoload - Use %pR to print resources in aspeed_edac - Add Yazen Ghannam as MAINTAINER for AMD edac drivers - Fix Ice Lake and Sapphire Rapids drivers to report correct "near" or "far" device for errors in 2LM configurations - Add support of on package high bandwidth memory in Sapphire Rapids - New CPU support for three CPUs supporting in-band ECC (IOT SKUs for ICL-NNPI, Tiger Lake and Alder Lake) - Don't even try to load Intel EDAC drivers when running as a guest - Fix Kconfig dependency on X86_MCE_INTEL for EDAC_IGEN6" * tag 'edac_updates_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/igen6: fix core dependency EDAC/Intel: Do not load EDAC driver when running as a guest EDAC/igen6: Add Intel Alder Lake SoC support EDAC/igen6: Add Intel Tiger Lake SoC support EDAC/igen6: Add Intel ICL-NNPI SoC support EDAC/i10nm: Add support for high bandwidth memory EDAC/i10nm: Add detection of memory levels for ICX/SPR servers EDAC/skx_common: Add new ADXL components for 2-level memory MAINTAINERS: Make Yazen Ghannam maintainer for EDAC-AMD64 EDAC/aspeed: Use proper format string for printing resource EDAC/ti: Add missing MODULE_DEVICE_TABLE EDAC/thunderx: Remove irrelevant variable from error messages commit 857286e4c5ae5d2e860fd15d4628e707b434d7e5 Merge: 51f382428c17f 007b350a58754 Author: Arnaldo Carvalho de Melo Date: Wed Jun 30 15:27:32 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit e60d726f5d8ccc85f18b9f1f6839112dc8c58fb8 Merge: 776ba3ad659e4 0178f9d0f60ba Author: Linus Torvalds Date: Wed Jun 30 11:23:33 2021 -0700 Merge tag 'tpmdd-next-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm driver updates from Jarkko Sakkinen: "Bug fixes for TPM" [ This isn't actually the whole contents of the tag and thus doesn't contain Jarkko's signature - I dropped the two top commits that added support for signing modules using elliptic curve keys because there's a new series for that that fixes a few confising things - Linus ] * tag 'tpmdd-next-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: Replace WARN_ONCE() with dev_err_once() in tpm_tis_status() tpm_tis: Use DEFINE_RES_MEM() to simplify code tpm: fix some doc warnings in tpm1-cmd.c tpm_tis_spi: add missing SPI device ID entries tpm: add longer timeout for TPM2_CC_VERIFY_SIGNATURE char: tpm: move to use request_irq by IRQF_NO_AUTOEN flag tpm_tis_spi: set default probe function if device id not match tpm_crb: Use IOMEM_ERR_PTR when function returns iomem commit 2cdee50eda9d87f4fabba3df00caa4cc873f30ab Author: Colin Ian King Date: Tue Jun 29 11:29:56 2021 +0100 clk: lmk04832: Fix spelling mistakes in dev_err messages and comments There are handful of spelling mistakes in two dev_err error messages and comments. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210629102956.17901-1-colin.king@canonical.com Signed-off-by: Stephen Boyd commit b424f73b6c017f907fd4018bd109d62b237f7875 Author: Wang Hai Date: Wed Jun 30 10:03:22 2021 +0800 clk: lmk04832: fix return value check in lmk04832_probe() In case of error, the function devm_kzalloc() and devm_kcalloc() return NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 3bc61cfd6f4a ("clk: add support for the lmk04832") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20210630020322.2555946-1-wanghai38@huawei.com Reviewed-by: Liam Beguin Signed-off-by: Stephen Boyd commit b1f247714acb2a78452ba555807764b2c1115a40 Author: Wang Hai Date: Wed Jun 30 09:58:23 2021 +0800 clk: stm32mp1: fix missing spin_lock_init() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. Fixes: c392df194a2d ("clk: stm32mp1: move RCC reset controller into RCC clock driver") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20210630015824.2555840-1-wanghai38@huawei.com Signed-off-by: Stephen Boyd commit 776ba3ad659e4955079f57f8d859e7994ea35076 Merge: ebb81c14543fb 0e695c3f7f66c Author: Linus Torvalds Date: Wed Jun 30 11:15:39 2021 -0700 Merge tag 'platform-drivers-x86-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: "Highlights: - New think-lmi driver adding support for changing Lenovo Thinkpad BIOS settings from within Linux using the standard firmware- attributes class sysfs API - MS Surface aggregator-cdev now also supports forwarding events to user-space (for debugging / new driver development purposes only) - New intel_skl_int3472 driver this provides the necessary glue to translate ACPI table information to GPIOs, regulators, etc. for camera sensors on Intel devices with IPU3 attached MIPI cameras - A whole bunch of other fixes + device-specific quirk additions - New devm_work_autocancel() devm-helpers.h function" * tag 'platform-drivers-x86-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (83 commits) platform/x86: dell-wmi-sysman: Change user experience when Admin/System Password is modified platform/x86: intel_skl_int3472: Uninitialized variable in skl_int3472_handle_gpio_resources() platform/x86: think-lmi: Move kfree(setting->possible_values) to tlmi_attr_setting_release() platform/x86: think-lmi: Split current_value to reflect only the value platform/x86: think-lmi: Fix issues with duplicate attributes platform/x86: think-lmi: Return EINVAL when kbdlang gets set to a 0 length string platform/x86: intel_cht_int33fe: Move to its own subfolder platform/x86: intel_skl_int3472: Move to intel/ subfolder platform/x86: intel_skl_int3472: Provide skl_int3472_unregister_clock() platform/x86: intel_skl_int3472: Provide skl_int3472_unregister_regulator() platform/x86: intel_skl_int3472: Use ACPI GPIO resource directly platform/x86: intel_skl_int3472: Fix dependencies (drop CLKDEV_LOOKUP) platform/x86: intel_skl_int3472: Free ACPI device resources after use platform/x86: Remove "default n" entries platform/x86: ISST: Use numa node id for cpu pci dev mapping platform/x86: ISST: Optimize CPU to PCI device mapping tools/power/x86/intel-speed-select: v1.10 release tools/power/x86/intel-speed-select: Fix uncore memory frequency display extcon: extcon-max8997: Simplify driver using devm extcon: extcon-max8997: Fix IRQ freeing at error path ... commit ebb81c14543fb43cb2e1f2bfb5d32f5e390cf895 Merge: c0c6d209b6609 4f197188da668 Author: Linus Torvalds Date: Wed Jun 30 11:11:47 2021 -0700 Merge tag 'mailbox-v5.14' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - imx: add support for i.MX8ULP - mtk: code change around callback struct - qcom: add sm6125, MSM8939 fix for channel exhaustion - microchip: add support for polarfire controller - misc: cosmetic changes to bcm-2835,flexrm,pdc, arm-mhu and hisilicon * tag 'mailbox-v5.14' of git://git.linaro.org/landing-teams/working/fujitsu/integration: (26 commits) MAINTAINERS: add entry for polarfire soc mailbox dt-bindings: add bindings for polarfire soc system controller mbox: add polarfire soc system controller mailbox dt-bindings: add bindings for polarfire soc mailbox mailbox: imx: Avoid using val uninitialized in imx_mu_isr() mailbox: qcom: Add MSM8939 APCS support mailbox: qcom: Use PLATFORM_DEVID_AUTO to register platform device dt-bindings: mailbox: qcom: Add MSM8939 APCS compatible mailbox: qcom-apcs: Add SM6125 compatible dt-bindings: mailbox: Add binding for sm6125 mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush() mailbox: bcm-flexrm-mailbox: Remove redundant dev_err call in flexrm_mbox_probe() mailbox: bcm2835: Remove redundant dev_err call in bcm2835_mbox_probe() mailbox: qcom-ipcc: Fix IPCC mbox channel exhaustion mailbox: mtk-cmdq: Add struct cmdq_pkt in struct cmdq_cb_data mailbox: mtk-cmdq: Use mailbox rx_callback mailbox: mtk-cmdq: Remove cmdq_cb_status mailbox: imx-mailbox: support i.MX8ULP MU mailbox: imx: add xSR/xCR register array mailbox: imx: replace the xTR/xRR array with single register ... commit c0c6d209b66096b22a59a01bce48e4867704338e Merge: 007b350a58754 5b32dd281ee0a Author: Linus Torvalds Date: Wed Jun 30 11:09:37 2021 -0700 Merge tag 'for-linus-5.14-1' of git://github.com/cminyard/linux-ipmi Pull IPMI driver updates from Corey Minyard: "Mostly a restructure of the kcs_bmc driver to make it easier to use with different types of devices, and just to clean things up and improve things. Also some bug fixes for the kcs_bmc driver. One fix to the IPMI watchdog to stop the timer when the action is none. Not a big deal, but it's the right thing to do" * tag 'for-linus-5.14-1' of git://github.com/cminyard/linux-ipmi: ipmi: kcs_bmc_aspeed: Fix less than zero comparison of a unsigned int ipmi: kcs_bmc_aspeed: Optionally apply status address ipmi: kcs_bmc_aspeed: Fix IBFIE typo from datasheet ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration dt-bindings: ipmi: Add optional SerIRQ property to ASPEED KCS devices dt-bindings: ipmi: Convert ASPEED KCS binding to schema ipmi: kcs_bmc: Add serio adaptor ipmi: kcs_bmc: Enable IBF on open ipmi: kcs_bmc: Allow clients to control KCS IRQ state ipmi: kcs_bmc: Decouple the IPMI chardev from the core ipmi: kcs_bmc: Strip private client data from struct kcs_bmc ipmi: kcs_bmc: Split headers into device and client ipmi: kcs_bmc: Turn the driver data-structures inside-out ipmi: kcs_bmc: Split out kcs_bmc_cdev_ipmi ipmi: kcs_bmc: Rename {read,write}_{status,data}() functions ipmi: kcs_bmc: Make status update atomic ipmi: kcs_bmc_aspeed: Use of match data to extract KCS properties ipmi/watchdog: Stop watchdog timer when the current action is 'none' commit 9249c32ec9197e8d34fe5179c9e31668a205db04 Author: Hans de Goede Date: Wed Jun 30 17:23:16 2021 +0200 ACPI: video: Add quirk for the Dell Vostro 3350 The Dell Vostro 3350 ACPI video-bus device reports spurious ACPI_VIDEO_NOTIFY_CYCLE events resulting in spurious KEY_SWITCHVIDEOMODE events being reported to userspace (and causing trouble there). Add a quirk setting the report_key_events mask to REPORT_BRIGHTNESS_KEY_EVENTS so that the ACPI_VIDEO_NOTIFY_CYCLE events will be ignored, while still reporting brightness up/down hotkey-presses to userspace normally. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1911763 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 7718629432676b5ebd9a32940782fe297a0abf8d Author: Liguang Zhang Date: Tue Jun 29 19:27:48 2021 +0800 ACPI: AMBA: Fix resource name in /proc/iomem In function amba_handler_attach(), dev->res.name is initialized by amba_device_alloc. But when address_found is false, dev->res.name is assigned to null value, which leads to wrong resource name display in /proc/iomem, "" is seen for those resources. Signed-off-by: Liguang Zhang Signed-off-by: Rafael J. Wysocki commit b3beca76181681fce9cf72f37d19c3030e3353c0 Author: Viresh Kumar Date: Tue Jun 29 11:57:08 2021 +0530 cpufreq: Remove ->resolve_freq() Commit e3c062360870 ("cpufreq: add cpufreq_driver_resolve_freq()") introduced this callback, back in 2016, for drivers that provide the ->target() callback. The kernel hasn't seen a single user of it in the past 5 years and it is not likely to be used any time soon. Remove it for now. Signed-off-by: Viresh Kumar [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit f9ccdec24d91ffddf1c6f4173b0e191fc08c7d14 Author: Viresh Kumar Date: Tue Jun 29 11:57:07 2021 +0530 cpufreq: Reuse cpufreq_driver_resolve_freq() in __cpufreq_driver_target() __cpufreq_driver_target() open codes cpufreq_driver_resolve_freq(), lets make the former reuse the later. Separate out __resolve_freq() to accept relation as well as an argument and use it at both the locations. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 96e45e5202377da39d086ec19f8934ebcc5b0fd6 Author: Colin Ian King Date: Tue Jun 29 18:22:53 2021 +0100 pwm: ep93xx: Fix read of uninitialized variable ret There is a potential path in function ep93xx_pwm_apply where ret is never assigned a value and it is checked for an error code. Fix this by ensuring ret is zero'd in the success path to avoid this issue. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: f6ef94edf0f6 ("pwm: ep93xx: Unfold legacy callbacks into ep93xx_pwm_apply()") Signed-off-by: Colin Ian King Signed-off-by: Thierry Reding commit b235f8a39fc3ee09c804bf711c3039f92d867549 Author: Alexander Sverdlin Date: Mon Jun 14 01:30:41 2021 +0200 pwm: ep93xx: Prepare clock before using it Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework. Signed-off-by: Alexander Sverdlin Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 72cce47fe8f8dec55de8cd4574c574dec5195252 Author: Uwe Kleine-König Date: Wed Jun 23 16:02:40 2021 +0200 pwm: ep93xx: Unfold legacy callbacks into ep93xx_pwm_apply() This just puts the implementation of ep93xx_pwm_disable(), ep93xx_pwm_enable() and ep93xx_pwm_config() into their only caller. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 6d45374af539c84d17cfcf5a4e96bc4b2ca421e6 Author: Uwe Kleine-König Date: Wed Jun 23 16:02:39 2021 +0200 pwm: ep93xx: Implement .apply callback To ease review this reuses the formerly implemented callbacks. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 868f13bdea3304362dd882f216ba30a8bf4c10c8 Author: Uwe Kleine-König Date: Mon Jun 21 15:04:58 2021 +0200 pwm: vt8500: Only unprepare the clock after the pwmchip was removed Until pwmchip_remove() returns the PWM is supposed to work, so pwmchip_remove() must be called before the clock is stopped. The return value of pwmchip_remove doesn't need to be checked because it returns zero anyhow and I plan to make it return void soon. Signed-off-by: Uwe Kleine-König Acked-by: Arnd Bergmann Signed-off-by: Thierry Reding commit fb2cb3bff9e0ede1709620809374dd14c07b1e16 Author: Uwe Kleine-König Date: Mon Jun 21 15:04:57 2021 +0200 pwm: vt8500: Drop if with an always false condition vt8500_pwm_remove() is only called after vt8500_pwm_probe() returned successfully. In this case driver data was set to a non-NULL value and so chip can never be NULL. While touching this code also put declaration and assignment in a single line. Signed-off-by: Uwe Kleine-König Acked-by: Arnd Bergmann Signed-off-by: Thierry Reding commit 2f1a3bd4510afd8cf5ab5a6169ad64981a62dccf Author: Uwe Kleine-König Date: Thu Jun 17 11:51:43 2021 +0200 pwm: tegra: Assert reset only after the PWM was unregistered The driver is supposed to stay functional until pwmchip_remove() returns. So the reset must be asserted only after that. pwmchip_remove() always returns 0, so the return code can be ignored which keeps the tegra_pwm_remove() a bit simpler. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3b8b571fcc49e794703eb01a97e9ed8b85e88304 Author: Uwe Kleine-König Date: Thu Jun 17 11:51:42 2021 +0200 pwm: tegra: Don't needlessly enable and disable the clock in .remove() There is no reason to enable the PWM clock just to assert the reset control. (If the reset control depends on the clock this is a bug and probably it doesn't because in .probe() the reset is deasserted without the clock being enabled.) Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 86f7fa71cd830d18d7ebcaf719dffd5ddfe1acdd Author: Uwe Kleine-König Date: Thu Jun 17 11:51:41 2021 +0200 pwm: tegra: Don't modify HW state in .remove callback A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c1b8ac969febc8f413c4d71f0eefe2e107610449 Author: Uwe Kleine-König Date: Thu Jun 17 11:51:40 2021 +0200 pwm: tegra: Drop an if block with an always false condition tegra_pwm_remove() is only called after tegra_pwm_probe() successfully completed. In this case platform_set_drvdata() was called with a non-NULL value and so platform_get_drvdata(pdev) cannot return NULL. Returning an error code from a platform_driver's remove function is ignored anyway, so it's a good thing this exit path is gone. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9ae241d06ef7aca8ebe8b1df91e0621ba7de5195 Author: Andy Shevchenko Date: Mon Jun 7 15:24:58 2021 +0300 pwm: core: Simplify some devm_*pwm*() functions Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Andy Shevchenko Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c333b936c1530e76eba4e81091874d1217046131 Author: Andy Shevchenko Date: Mon Jun 7 15:24:57 2021 +0300 pwm: core: Remove unused devm_pwm_put() There are no users and seems no will come of the devm_pwm_put(). Remove the function. While at it, slightly update documentation. Signed-off-by: Andy Shevchenko Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e625fb70a6d21e4d9ca6d91924d4711a66fd634f Author: Andy Shevchenko Date: Mon Jun 7 15:24:56 2021 +0300 pwm: core: Unify fwnode checks in the module Historically we have two different approaches on how to check type of fwnode. Unify them using the latest and greatest fwnode related APIs. Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding commit e5c38ba9f2813beb8cb80ef3f5065bfe98a9a450 Author: Andy Shevchenko Date: Mon Jun 7 15:24:55 2021 +0300 pwm: core: Reuse fwnode_to_pwmchip() in ACPI case In ACPI case we may use matching by fwnode as provided via fwnode_to_pwmchip(). This makes device_to_pwmchip() not needed anymore. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Signed-off-by: Thierry Reding commit ca06616b1eed31126138aaf1a6b5bdd149b61da8 Author: Andy Shevchenko Date: Mon Jun 7 15:24:54 2021 +0300 pwm: core: Convert to use fwnode for matching When we traverse the list of the registered PWM controllers, use fwnode to match. This will help for further cleanup. Signed-off-by: Andy Shevchenko Signed-off-by: Thierry Reding commit ef3d13b867637f9a791b524100362ba7e2b69810 Author: Andy Shevchenko Date: Mon Jun 7 15:24:53 2021 +0300 docs: firmware-guide: ACPI: Add a PWM example When PWM support for ACPI has been added into the kernel, it missed the documentation update. Hence update documentation here. Fixes: 4a6ef8e37c4d ("pwm: Add support referencing PWMs from ACPI") Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Signed-off-by: Thierry Reding commit 9939648a53c4c795bdac0d54df22423f81ccf5f0 Author: Lokesh Vutla Date: Tue Jun 1 15:58:04 2021 +0530 dt-bindings: pwm: pwm-tiecap: Add compatible string for AM64 SoC Add compatible string for AM64 SoC in device tree binding. IP is compatible with ti,am3352-ecap, so adding the AM64 compatible under enum of one of the compatible list entry. Signed-off-by: Lokesh Vutla Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit b0b8d558efb5b607fc35fbccb9edb5230c41c0ba Author: Lokesh Vutla Date: Tue Jun 1 15:58:03 2021 +0530 dt-bindings: pwm: pwm-tiecap: Convert to json schema Convert the tiecap binding to DT schema format using json-schema. Along with this conversion the following changes are included: - 'clock' and 'clock-names' properties are marked required as driver fails to probe without these properties - Dropped ti,am33xx-ecap as it is no longer applicable. - 'power-domains' property is introduced and marked as optional. Signed-off-by: Lokesh Vutla Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 76982e478de4d682cb5fca26d6d3efe2d2545722 Author: Uwe Kleine-König Date: Sat May 22 17:04:32 2021 +0200 pwm: sprd: Don't check the return code of pwmchip_remove() pwmchip_remove() returns always 0. Don't use the value to make it possible to eventually change the function to return void. This is a good thing as pwmchip_remove() is usually called from a remove function (mostly for platform devices) and their return value is ignored by the device core anyhow. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fde25294dfd8e36e4e30b693c27a86232864002a Author: Zou Wei Date: Wed May 12 11:57:17 2021 +0800 pwm: img: Fix PM reference leak in img_pwm_enable() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Thierry Reding commit b63d60b2eaf3a20a60cbd3b1f252584604e828c7 Author: Uwe Kleine-König Date: Wed May 5 18:19:09 2021 +0200 pwm: pxa: Always use the same variable name for driver data In most functions the driver data variable is called pc. Do the same in the two remaining functions. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 81b7c173e3609ed77a9f9909406aefa122801a38 Author: Uwe Kleine-König Date: Wed May 5 18:19:08 2021 +0200 pwm: pxa: Drop if with an always false condition The .remove() function is only called after .probe() returned successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so platfrom_get_drvdata() returns the same non-NULL value. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 0512f0503b051a98608a9b0d33b75482b960a313 Author: Uwe Kleine-König Date: Tue May 4 15:25:37 2021 +0200 pwm: berlin: Don't check the return code of pwmchip_remove() pwmchip_remove() always returns 0. Don't use the value to make it possible to eventually change the function to return void. This is a good thing as pwmchip_remove() is usually called from a remove function (mostly for platform devices) and their return value is ignored by the device core anyhow. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30dffb42fcd4b127474f089e9c03fbc0dfc649a8 Author: Uwe Kleine-König Date: Tue May 4 15:25:36 2021 +0200 pwm: berlin: Implement .apply() callback To eventually get rid of all legacy drivers convert this driver to the modern world implementing .apply(). This just pushes down a slightly optimized variant of how legacy drivers are handled in the core. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3f3e805177afc04dccf43cc58856a14a000a593f Author: Uwe Kleine-König Date: Tue May 4 15:25:34 2021 +0200 pwm: berlin: use consistent naming for variables A struct berlin_pwm_chip * is now always called "bpc" (instead of "pwm" which is usually used for struct pwm_device * or "chip" which is usually used for struct pwm_chip *). The struct pwm_device * variables were named "pwm_dev" or "pwm"; they are now always called "pwm". Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3e0f897fd92662f0ff21ca1759d724a9ad574858 Author: Viresh Kumar Date: Wed Jun 23 09:54:42 2021 +0530 cpufreq: Remove the ->stop_cpu() driver callback Now that all users of ->stop_cpu() have been migrated to using other callbacks, drop it from the core. Signed-off-by: Viresh Kumar [ rjw: Minor edits in the subject and changelog ] Signed-off-by: Rafael J. Wysocki commit 952da0c9ab5b047665442dc239cee36d5c9edb98 Author: Viresh Kumar Date: Wed Jun 23 11:31:14 2021 +0530 cpufreq: powernv: Migrate to ->exit() callback instead of ->stop_cpu() Commit 367dc4aa932b ("cpufreq: Add stop CPU callback to cpufreq_driver interface") added the ->stop_cpu() callback to allow the drivers to do clean up before the CPU is completely down and its state can't be modified. At that time the CPU hotplug framework used to call the cpufreq core's registered notifier for different events like CPU_DOWN_PREPARE and CPU_POST_DEAD. The ->stop_cpu() callback was called during the CPU_DOWN_PREPARE event. This is no longer the case, cpuhp_cpufreq_offline() is called only once by the CPU hotplug core now and we don't really need two separate callbacks for cpufreq drivers, i.e. ->stop_cpu() and ->exit(), as everything can be done from the ->exit() callback itself. Migrate to using the ->exit() callback instead of ->stop_cpu(). Signed-off-by: Viresh Kumar [ rjw: Minor changelog edits ] Signed-off-by: Rafael J. Wysocki commit 9357a380f90a89a168d505561d11f68272e0e768 Author: Viresh Kumar Date: Wed Jun 23 09:54:39 2021 +0530 cpufreq: CPPC: Migrate to ->exit() callback instead of ->stop_cpu() Commit 367dc4aa932b ("cpufreq: Add stop CPU callback to cpufreq_driver interface") added the ->stop_cpu() callback to allow the drivers to do clean up before the CPU is completely down and its state can't be modified. At that time the CPU hotplug framework used to call the cpufreq core's registered notifier for different events like CPU_DOWN_PREPARE and CPU_POST_DEAD. The ->stop_cpu() callback was called during the CPU_DOWN_PREPARE event. This is no longer the case, cpuhp_cpufreq_offline() is called only once by the CPU hotplug core now and we don't really need two separate callbacks for cpufreq drivers, i.e. ->stop_cpu() and -exit() callback itself. Migrate to using the ->exit() callback instead of ->stop_cpu(). Signed-off-by: Viresh Kumar [ rjw: Minor edits in the changelog and subject ] Signed-off-by: Rafael J. Wysocki commit 49d6feef94c9f47ac4030563058f8a36267597b0 Author: Rafael J. Wysocki Date: Wed Jun 30 18:44:46 2021 +0200 cpufreq: intel_pstate: Combine ->stop_cpu() and ->offline() Combine the ->stop_cpu() and ->offline() callback routines for intel_pstate in the active mode so as to avoid setting the ->stop_cpu callback pointer which is going to be dropped from the framework. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 16aa4c9a1fbe763c147a964cdc1f5be8ed98ed13 Author: Zhang Yi Date: Wed Jun 30 16:36:38 2021 +0800 jbd2: export jbd2_journal_[un]register_shrinker() Export jbd2_journal_[un]register_shrinker() to fix this error when ext4 is built as a module: ERROR: modpost: "jbd2_journal_unregister_shrinker" undefined! ERROR: modpost: "jbd2_journal_register_shrinker" undefined! Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers") Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210630083638.140218-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit b81b3e959adb107cd5b36c7dc5ba1364bbd31eb2 Author: Paul Burton Date: Tue Jun 29 17:34:05 2021 -0700 tracing: Simplify & fix saved_tgids logic The tgid_map array records a mapping from pid to tgid, where the index of an entry within the array is the pid & the value stored at that index is the tgid. The saved_tgids_next() function iterates over pointers into the tgid_map array & dereferences the pointers which results in the tgid, but then it passes that dereferenced value to trace_find_tgid() which treats it as a pid & does a further lookup within the tgid_map array. It seems likely that the intent here was to skip over entries in tgid_map for which the recorded tgid is zero, but instead we end up skipping over entries for which the thread group leader hasn't yet had its own tgid recorded in tgid_map. A minimal fix would be to remove the call to trace_find_tgid, turning: if (trace_find_tgid(*ptr)) into: if (*ptr) ..but it seems like this logic can be much simpler if we simply let seq_read() iterate over the whole tgid_map array & filter out empty entries by returning SEQ_SKIP from saved_tgids_show(). Here we take that approach, removing the incorrect logic here entirely. Link: https://lkml.kernel.org/r/20210630003406.4013668-1-paulburton@google.com Fixes: d914ba37d714 ("tracing: Add support for recording tgid of tasks") Cc: Ingo Molnar Cc: Joel Fernandes Cc: Signed-off-by: Paul Burton Signed-off-by: Steven Rostedt (VMware) commit 78c14b385c195d4f25ab7c19186b8897a5b9ae3f Author: Joe Perches Date: Sat Jun 12 08:42:27 2021 -0700 treewide: Add missing semicolons to __assign_str uses The __assign_str macro has an unusual ending semicolon but the vast majority of uses of the macro already have semicolon termination. $ git grep -P '\b__assign_str\b' | wc -l 551 $ git grep -P '\b__assign_str\b.*;' | wc -l 480 Add semicolons to the __assign_str() uses without semicolon termination and all the other uses without semicolon termination via additional defines that are equivalent to __assign_str() with the eventual goal of removing the semicolon from the __assign_str() macro definition. Link: https://lore.kernel.org/lkml/1e068d21106bb6db05b735b4916bb420e6c9842a.camel@perches.com/ Link: https://lkml.kernel.org/r/48a056adabd8f70444475352f617914cef504a45.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Steven Rostedt (VMware) commit bfbf8d157a8e85beca929f1959f567e03eb72c34 Author: Austin Kim Date: Tue Jun 29 15:05:48 2021 +0100 tracing: Change variable type as bool for clean-up The wakeup_rt wakeup_dl, tracing_dl is only set to 0, 1. So changing type of wakeup_rt wakeup_dl, tracing_dl as bool makes relevant routine be more readable. Link: https://lkml.kernel.org/r/20210629140548.GA1627@raspberrypi Signed-off-by: Austin Kim [ Removed unneeded initialization of static bool tracing_dl ] Signed-off-by: Steven Rostedt (VMware) commit ad6b010d8129c67ff914996a019f7c50c8744b3f Merge: 3563f55ce6546 0f0ac1e4eef27 Author: Rafael J. Wysocki Date: Wed Jun 30 14:56:51 2021 +0200 Merge tag 'cpuidle-v5.14-rc1' of https://git.linaro.org/people/daniel.lezcano/linux Pull ARM cpuidle updates for v5.14 from Daniel Lezcano: "- Add support for Qcom MSM8226 (Bartosz Dudziak)" * tag 'cpuidle-v5.14-rc1' of https://git.linaro.org/people/daniel.lezcano/linux: cpuidle: qcom: Add SPM register data for MSM8226 dt-bindings: arm: msm: Add SAW2 for MSM8226 commit e4a5c19888a5f8a9390860ca493e643be58c8791 Author: Alain Volmat Date: Wed Jun 30 10:45:19 2021 +0200 spi: stm32h7: fix full duplex irq handler handling In case of Full-Duplex mode, DXP flag is set when RXP and TXP flags are set. But to avoid 2 different handlings, just add TXP and RXP flag in the mask instead of DXP, and then keep the initial handling of TXP and RXP events. Also rephrase comment about EOTIE which is one of the interrupt enable bits. It is not triggered by any event. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/1625042723-661-3-git-send-email-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit 5db5dd5be70eaf808d9fd90174b957fc5c2912cb Author: Axel Lin Date: Wed Jun 30 15:42:46 2021 +0800 regulator: hi6421v600: Fix getting wrong drvdata that causes boot failure Since config.dev = pdev->dev.parent in current code, so dev_get_drvdata(rdev->dev.parent) actually returns the drvdata of the mfd device rather than the regulator. Fix it. Fixes: 9bc146acc331 ("regulator: hi6421v600: Fix setting wrong driver_data") Reported-by: Mauro Carvalho Chehab Signed-off-by: Axel Lin Tested-by: Mauro Carvalho Chehab Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210630074246.2305166-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2c70ff56e49ae219640689a0c86041c0f656046f Author: Lucas Stach Date: Mon Jun 28 23:04:58 2021 +0200 ASoC: codecs: allow SSM2518 to be selected by the user Allow the Analog SSM2518 driver to be enabled without a large bunch of other drivers. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210628210458.2508973-1-l.stach@pengutronix.de Signed-off-by: Mark Brown commit cf02ce742f09188272bcc8b0e62d789eb671fc4c Author: Wei Li Date: Tue Jun 29 22:14:20 2021 +0800 MIPS: Fix PKMAP with 32-bit MIPS huge page support When 32-bit MIPS huge page support is enabled, we halve the number of pointers a PTE page holds, making its last half go to waste. Correspondingly, we should halve the number of kmap entries, as we just initialized only a single pte table for that in pagetable_init(). Fixes: 35476311e529 ("MIPS: Add partial 32-bit huge page support") Signed-off-by: Wei Li Signed-off-by: Thomas Bogendoerfer commit 34c522a07ccbfb0e6476713b41a09f9f51a06c9f Author: 周琰杰 (Zhou Yanjie) Date: Sat Jun 26 14:18:41 2021 +0800 MIPS: CI20: Add second percpu timer for SMP. 1.Add a new TCU channel as the percpu timer of core1, this is to prepare for the subsequent SMP support. The newly added channel will not adversely affect the current single-core state. 2.Adjust the position of TCU node to make it consistent with the order in jz4780.dtsi file. Tested-by: Nikolaus Schaller # on CI20 Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 23c64447b3538a6f34cb38aae3bc19dc1ec53436 Author: 周琰杰 (Zhou Yanjie) Date: Sat Jun 26 14:18:40 2021 +0800 MIPS: CI20: Reduce clocksource to 750 kHz. The original clock (3 MHz) is too fast for the clocksource, there will be a chance that the system may get stuck. Reported-by: Nikolaus Schaller Tested-by: Nikolaus Schaller # on CI20 Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit ab3040e1379bd6fcc260f1f7558ee9c2da62766b Author: 周琰杰 (Zhou Yanjie) Date: Sat Jun 26 14:18:39 2021 +0800 MIPS: Ingenic: Add MAC syscon nodes for Ingenic SoCs. Add MAC syscon nodes for X1000 SoC and X1830 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 2bc434b12d1283f16e388b0fd682303aa9c16db6 Author: 周琰杰 (Zhou Yanjie) Date: Sat Jun 26 14:18:38 2021 +0800 dt-bindings: clock: Add documentation for MAC PHY control bindings. Update the CGU binding documentation, add mac-phy-ctrl as a pattern property. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Acked-by: Stephen Boyd Signed-off-by: Thomas Bogendoerfer commit 579f73cf84859032c14b39562e35a39741a9c311 Author: 周琰杰 (Zhou Yanjie) Date: Sat Jun 26 14:18:37 2021 +0800 MIPS: X1830: Respect cell count of common properties. If N fields of X cells should be provided, then that's what the devicetree should represent, instead of having one single field of (N * X) cells. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 91fc46eced0f70526d74468ac6c932c90a8585b3 Author: Nicholas Piggin Date: Wed Jun 30 17:46:21 2021 +1000 powerpc/64s: move ret_from_fork etc above __end_soft_masked Code which runs with interrupts enabled should be moved above __end_soft_masked where possible, because maskable interrupts that hit below that symbol will need to consult the soft mask table, which is an extra cost. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-10-npiggin@gmail.com commit c59458b00aec4ba580d9628d36d6c984af94d192 Author: Nicholas Piggin Date: Wed Jun 30 17:46:20 2021 +1000 powerpc/64s/interrupt: clean up interrupt return labels Normal kernel-interrupt exits can get interrupt_return_srr_user_restart in their backtrace, which is an unusual and notable function, and it is part of the user-interrupt exit path, which is doubly confusing. Add non-local labels for both user and kernel interrupt exit cases to address this and make the user and kernel cases more symmetric. Also get rid of an unused label. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-9-npiggin@gmail.com commit 98798f33c6be5a511ab61958b40835b3ef08def2 Author: Nicholas Piggin Date: Wed Jun 30 17:46:19 2021 +1000 powerpc/64/interrupt: add missing kprobe annotations on interrupt exit symbols If one interrupt exit symbol must not be kprobed, none of them can be, without more justification for why it's safe. Disallow kprobing on any of the (non-local) labels in the exit paths. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-8-npiggin@gmail.com commit 2b43dd7653cca47d297756980846ebbfe8887fa1 Author: Nicholas Piggin Date: Wed Jun 30 17:46:18 2021 +1000 powerpc/64: enable MSR[EE] in irq replay pt_regs Similar to commit 2b48e96be2f9f ("powerpc/64: fix irq replay pt_regs->softe value"), enable MSR_EE in pt_regs->msr. This makes the regs look more normal. It also allows some extra debug checks to be added to interrupt handler entry. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-7-npiggin@gmail.com commit 1b0482229c302a3c6afd00d6b3bf0169cf279b44 Author: Nicholas Piggin Date: Wed Jun 30 17:46:17 2021 +1000 powerpc/64s/interrupt: preserve regs->softe for NMI interrupts If an NMI interrupt hits in an implicit soft-masked region, regs->softe is modified to reflect that. This may not be necessary for correctness at the moment, but it is less surprising and it's unhelpful when debugging or adding checks. Make sure this is changed back to how it was found before returning. Fixes: 4ec5feec1ad0 ("powerpc/64s: Make NMI record implicitly soft-masked code as irqs disabled") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-6-npiggin@gmail.com commit 325678fd052259e7c05ef29060a73c705ea90432 Author: Nicholas Piggin Date: Wed Jun 30 17:46:16 2021 +1000 powerpc/64s: add a table of implicit soft-masked addresses Commit 9d1988ca87dd ("powerpc/64: treat low kernel text as irqs soft-masked") ends up catching too much code, including ret_from_fork, and parts of interrupt and syscall return that do not expect to be interrupts to be soft-masked. If an interrupt gets marked pending, and then the code proceeds out of the implicit soft-masked region it will fail to deal with the pending interrupt. Fix this by adding a new table of addresses which explicitly marks the regions of code that are soft masked. This table is only checked for interrupts that below __end_soft_masked, so most kernel interrupts will not have the overhead of the table search. Fixes: 9d1988ca87dd ("powerpc/64: treat low kernel text as irqs soft-masked") Reported-by: Sachin Sant Signed-off-by: Nicholas Piggin Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-5-npiggin@gmail.com commit 9b69d48c7516a29cdaacd18d8bf5f575014a42a1 Author: Nicholas Piggin Date: Wed Jun 30 17:46:15 2021 +1000 powerpc/64e: remove implicit soft-masking and interrupt exit restart logic The implicit soft-masking to speed up interrupt return was going to be used by 64e as well, but it has not been extensively tested on that platform and is not considered ready. It was intended to be disabled before merge. Disable it for now. Most of the restart code is common with 64s, so with more correctness and performance testing this could be re-enabled again by adding the extra soft-mask checks to interrupt handlers and flipping exit_must_hard_disable(). Fixes: 9d1988ca87dd ("powerpc/64: treat low kernel text as irqs soft-masked") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-4-npiggin@gmail.com commit fce01acf830a697110ed72ecace4b0afdbcd53cb Author: Nicholas Piggin Date: Wed Jun 30 17:46:14 2021 +1000 powerpc/64e: fix CONFIG_RELOCATABLE build warnings CONFIG_RELOCATABLE=y causes build warnings from unresolved relocations. Fix these by using TOC addressing for these cases. Commit 24d33ac5b8ff ("powerpc/64s: Make prom_init require RELOCATABLE") caused some 64e configs to select RELOCATABLE resulting in these warnings, but the underlying issue was already there. This passes basic qemu testing. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-3-npiggin@gmail.com commit 5567b1ee29b7a83e8c01d99d34b5bbd306ce0bcf Author: Nicholas Piggin Date: Wed Jun 30 17:46:13 2021 +1000 powerpc/64s: fix hash page fault interrupt handler The early bad fault or key fault test in do_hash_fault() ends up calling into ___do_page_fault without having gone through an interrupt handler wrapper (except the initial _RAW one). This can end up calling local irq functions while the interrupt has not been reconciled, which will likely cause crashes and it trips up on a later patch that adds more assertions. pkey_exec_prot from selftests causes this path to be executed. There is no real reason to run the in_nmi() test should be performed before the key fault check. In fact if a perf interrupt in the hash fault code did a stack walk that was made to take a key fault somehow then running ___do_page_fault could possibly cause another hash fault causing problems. Move the in_nmi() test first, and then do everything else inside the regular interrupt handler function. Fixes: 3a96570ffceb ("powerpc: convert interrupt handlers to use wrappers") Reported-by: Sachin Sant Signed-off-by: Nicholas Piggin Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210630074621.2109197-2-npiggin@gmail.com commit fc4999864bca323f1b844fefe1b402632443c076 Author: Christophe Leroy Date: Tue Jun 29 12:24:21 2021 +0000 powerpc/4xx: Fix setup_kuep() on SMP On SMP, setup_kuep() is also called from start_secondary() since commit 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C"). start_secondary() is not an __init function. Remove the __init marker from setup_kuep() and bail out when not caller on the first CPU as the work is already done. Fixes: 10248dcba120 ("powerpc/44x: Implement Kernel Userspace Exec Protection (KUEP)") Fixes: 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C") Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8ee05934288994a65743a987acb1558f12c0c8c1.1624969450.git.christophe.leroy@csgroup.eu commit c89e632658e793fbbdcbfbe80a6c13bbf7203e9b Author: Christophe Leroy Date: Mon Jun 28 06:56:11 2021 +0000 powerpc/32s: Fix setup_{kuap/kuep}() on SMP On SMP, setup_kup() is also called from start_secondary(). start_secondary() is not an __init function. Remove the __init marker from setup_kuep() and setup_kuap(). Fixes: 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C") Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/42f4bd12b476942e4d5dc81c0e839d8871b20b1c.1624863319.git.christophe.leroy@csgroup.eu commit 0bcc3939c98d83955397eac1584d5f791fdc88d0 Merge: 600d050944e13 c17e5c85b32f8 Author: Miquel Raynal Date: Wed Jun 30 12:52:24 2021 +0200 Merge tag 'spi-nor/for-5.14' into mtd/next SPI NOR core changes: - Ability to dump SFDP tables via sysfs - Support for erasing OTP regions on Winbond and similar flashes - Few API doc updates and fixes - Locking support for MX25L12805D SPI NOR controller drivers changes: - Use SPI_MODE_X_MASK in nxp-spifi - Intel Alder Lake-M SPI serial flash support commit a22a5cb81e20657194fde6c835e07d28c4dfddbe Merge: d2343cb8d154f 1c35b07e6d398 Author: Ingo Molnar Date: Wed Jun 30 12:31:41 2021 +0200 Merge branch 'sched/core' into sched/urgent, to pick up fix Pick up a fix for a warning that several people reported. Signed-off-by: Ingo Molnar commit f18f58012ee894039cd59ee8c889bf499d7a3943 Author: Mikel Rychliski Date: Thu Jun 24 00:51:20 2021 -0400 drm/radeon: Fix NULL dereference when updating memory stats radeon_ttm_bo_destroy() is attempting to access the resource object to update memory counters. However, the resource object is already freed when ttm calls this function via the destroy callback. This causes an oops when a bo is freed: BUG: kernel NULL pointer dereference, address: 0000000000000010 RIP: 0010:radeon_ttm_bo_destroy+0x2c/0x100 [radeon] Call Trace: radeon_bo_unref+0x1a/0x30 [radeon] radeon_gem_object_free+0x33/0x50 [radeon] drm_gem_object_release_handle+0x69/0x70 [drm] drm_gem_handle_delete+0x62/0xa0 [drm] ? drm_mode_destroy_dumb+0x40/0x40 [drm] drm_ioctl_kernel+0xb2/0xf0 [drm] drm_ioctl+0x30a/0x3c0 [drm] ? drm_mode_destroy_dumb+0x40/0x40 [drm] radeon_drm_ioctl+0x49/0x80 [radeon] __x64_sys_ioctl+0x8e/0xd0 Avoid the issue by updating the counters in the delete_mem_notify callback instead. Also, fix memory statistic updating in radeon_bo_move() to identify the source type correctly. The source type needs to be saved before the move, because the moved from object may be altered by the move. Fixes: bfa3357ef9ab ("drm/ttm: allocate resource object instead of embedding it v2") Signed-off-by: Mikel Rychliski Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210624045121.15643-1-mikel@mikelr.com commit a4d5613c4dc6d413e0733e37db9d116a2a36b9f3 Author: Mike Rapoport Date: Mon May 17 21:50:08 2021 +0300 arm: extend pfn_valid to take into account freed memory map alignment When unused memory map is freed the preserved part of the memory map is extended to match pageblock boundaries because lots of core mm functionality relies on homogeneity of the memory map within pageblock boundaries. Since pfn_valid() is used to check whether there is a valid memory map entry for a PFN, make it return true also for PFNs that have memory map entries even if there is no actual memory populated there. Signed-off-by: Mike Rapoport Tested-by: Kefeng Wang Tested-by: Tony Lindgren commit 023accf5cdc1e504a9b04187ec23ff156fe53d90 Author: Mike Rapoport Date: Wed Jun 30 09:12:13 2021 +0300 memblock: ensure there is no overflow in memblock_overlaps_region() There maybe an overflow in memblock_overlaps_region() if it is called with base and size such that base + size > PHYS_ADDR_MAX Make sure that memblock_overlaps_region() caps the size to prevent such overflow and remove now duplicated call to memblock_cap_size() from memblock_is_region_reserved(). Signed-off-by: Mike Rapoport Tested-by: Tony Lindgren commit f921f53e089a12a192808ac4319f28727b35dc0f Author: Mike Rapoport Date: Mon May 17 21:31:59 2021 +0300 memblock: align freed memory map on pageblock boundaries with SPARSEMEM When CONFIG_SPARSEMEM=y the ranges of the memory map that are freed are not aligned to the pageblock boundaries which breaks assumptions about homogeneity of the memory map throughout core mm code. Make sure that the freed memory map is always aligned on pageblock boundaries regardless of the memory model selection. Signed-off-by: Mike Rapoport Tested-by: Tony Lindgren commit e2a86800d58639b3acde7eaeb9eb393dca066e08 Author: Mike Rapoport Date: Mon May 17 21:15:15 2021 +0300 memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER The code that frees unused memory map uses rounds start and end of the holes that are freed to MAX_ORDER_NR_PAGES to preserve continuity of the memory map for MAX_ORDER regions. Lots of core memory management functionality relies on homogeneity of the memory map within each pageblock which size may differ from MAX_ORDER in certain configurations. Although currently, for the architectures that use free_unused_memmap(), pageblock_order and MAX_ORDER are equivalent, it is cleaner to have common notation thought mm code. Replace MAX_ORDER_NR_PAGES with pageblock_nr_pages and update the comments to make it more clear why the alignment to pageblock boundaries is required. Signed-off-by: Mike Rapoport Tested-by: Tony Lindgren commit b3e29642548258c7cd2cb3326a776fff84cd6b69 Merge: 8f4ef88ebadef 498d0ddc6ae93 Author: Jiri Kosina Date: Wed Jun 30 09:15:15 2021 +0200 Merge branch 'for-5.14/multitouch' into for-linus - patch series that ensures that hid-multitouch driver disables touch and button-press reporting on hid-mt devices during suspend when the device is not configured as a wakeup-source, from Hans de Goede commit 8f4ef88ebadefcf16b7f616f8af940465c44bea2 Merge: 33197bd3e82f5 b413c59ead320 Author: Jiri Kosina Date: Wed Jun 30 09:12:44 2021 +0200 Merge branch 'for-5.14/logitech' into for-linus - support for LCD menu keys + LCD brightness control on the Logitech Z-10 speakers (with LCD) which use the same protocol as the G15 keyboards from Hans de Goede commit 33197bd3e82f5c60487e53d4a291dc2e6031833f Merge: 7f1f38039820e aa59d6bb5ec88 Author: Jiri Kosina Date: Wed Jun 30 09:06:53 2021 +0200 Merge branch 'for-5.14/intel-ish' into for-linus - support for ISH DMA on EHL platform from Even Xu - various code style fixes and cleanups from Lee Jones and Uwe Kleine-König commit 7f1f38039820eb361567c4ed91630b51db7c7c49 Merge: fd73788ce6a58 8dcaa046bf963 Author: Jiri Kosina Date: Wed Jun 30 09:05:31 2021 +0200 Merge branch 'for-5.14/google' into for-linus - device tree match for Google Whiskers device from Ikjoon Jang commit fd73788ce6a580f2bd353e0f364d31b6c16dcd12 Merge: 5a94296bc02ac bcfa8d14570d8 Author: Jiri Kosina Date: Wed Jun 30 09:03:51 2021 +0200 Merge branch 'for-5.14/core' into for-linus - device unbinding locking fix from Dmitry Torokhov - support for programmable buttons (mapping to KEY_MACRO# event codes) from Thomas Weißschuh - various other small fixes and code style improvements commit 5a94296bc02ac616336da7b5332b86d2ca8827f0 Merge: 3b770932eefb7 24a31ea94922d Author: Jiri Kosina Date: Wed Jun 30 09:02:28 2021 +0200 Merge branch 'for-5.14/amd-sfh' into for-linus - support for Renoir and Cezanne SoCs - support for Ambient Light Sensor - support for Human Presence Detection sensor all from Basavaraj Natikar commit 8a02ea42bc1d4c448caf1bab0e05899dad503f74 Merge: 4bac159e595d2 c90c4c6574f3f Author: Dave Airlie Date: Wed Jun 30 15:42:01 2021 +1000 Merge tag 'drm-intel-next-fixes-2021-06-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-next The biggest fix is the restoration of mmap ioctl for gen12 integrated parts which lack was breaking ADL-P with media stack. Besides that a small selftest fix and a theoretical overflow on i915->pipe_to_crtc_mapping. Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YNtsfguvCRSROBUZ@intel.com commit 4bac159e595d22d9acffdc7a3e5dfee193155d0c Merge: b322a50d17ede eed75ce7c8260 Author: Dave Airlie Date: Wed Jun 30 14:23:37 2021 +1000 Merge tag 'drm-misc-next-fixes-2021-06-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: * amdgpu: Fix test for allocation failures Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YNQxVybBGdjLMUQJ@linux-uq9g commit a2f55040cfbe7b208dc079232326fab86f2790c2 Author: Chengming Gui Date: Mon Apr 26 16:18:10 2021 +0800 drm/amd/amdgpu: enable gpu recovery for beige_goby Enable gpu recovery for beige_goby. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 91161b06be5729050a11e36366d2db8a679f35b6 Author: Darren Powell Date: Thu Jun 24 22:54:35 2021 -0400 amdgpu/pm: remove code duplication in show_power_cap calls v3: updated patch to apply to latest code v2: reorder to check pointers before calling pm_runtime_* functions created generic function and call with enum from * amdgpu_hwmon_show_power_cap_max * amdgpu_hwmon_show_power_cap * amdgpu_hwmon_show_power_cap_default === Test === AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} cp pp_show_power_cap.txt{,.old} lspci -nn | grep "VGA\|Display" > pp_show_power_cap.test.log FILES=" power1_cap power1_cap_max power1_cap_default " for f in $FILES do echo $f = `cat $HWMON_DIR/$f` >> pp_show_power_cap.test.log done Signed-off-by: Darren Powell Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ed50995514d319ff27dafe3747f04abab9e87bdf Author: Alex Deucher Date: Tue Jun 29 16:55:47 2021 -0400 drm/amdgpu/display: drop unused variable Remove unused variable. Fixes: e7d9560aeae514 ("Revert "drm/amd/display: Fix overlay validation by considering cursors"") Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit e7d9560aeae51415f6c9bc343feb783a441ff4c5 Author: Rodrigo Siqueira Date: Wed Jun 16 12:21:30 2021 -0400 Revert "drm/amd/display: Fix overlay validation by considering cursors" This reverts commit 33f409e60eb0c59a4d0d06a62ab4642a988e17f7. The patch that we are reverting here was originally applied because it fixes multiple IGT issues and flickering in Android. However, after a discussion with Sean Paul and Mark, it looks like that this patch might cause problems on ChromeOS. For this reason, we decided to revert this patch. Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Hersen Wu Cc: Sean Paul Cc: Mark Yacoub Cc: Greg Kroah-Hartman Signed-off-by: Rodrigo Siqueira Reviewed-by: Sean Paul Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b3a24461f9fb1579c3335c63d1e039bc5a6eda53 Author: Veerabadhran Gopalakrishnan Date: Sat Jun 19 00:10:46 2021 +0530 amdgpu/nv.c - Added codec query for Beige Goby Added the Beige Goby capabilities in codec query. v2: fix build error and indent (James) Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit c8af9390e5c01b83600a700bf287087d0eabb387 Author: Aaron Liu Date: Mon Jun 21 13:17:10 2021 +0800 drm/amdgpu: enable tmz on yellow carp The tmz functions are verified on yellow carp. So enable it by default. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d4ebc2007040a0aff01bfe1b194085d3867328fd Author: Philip Yang Date: Tue Jun 22 00:12:32 2021 -0400 drm/amdkfd: implement counters for vm fault and migration Add helper function to get process device data structure from adev to update counters. Update vm faults, page_in, page_out counters will no be executed in parallel, use WRITE_ONCE to avoid any form of compiler optimizations. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 751580b3ff9ac6bf39da8586e132dbebee2409ef Author: Philip Yang Date: Wed Jun 16 09:51:47 2021 -0400 drm/amdkfd: add sysfs counters for vm fault and migration This is part of SVM profiling API, export sysfs counters for per-process, per-GPU vm retry fault, pages migrated in and out of GPU vram. counters will not be updated in parallel in GPU retry fault handler and migration to vram/ram path, use READ_ONCE to avoid compiler optimization. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit dcdb4d904b4bd3078fe8d4d24b1658560d6078ef Author: Philip Yang Date: Mon Jun 21 18:51:26 2021 -0400 drm/amdkfd: fix sysfs kobj leak 3 cases of kobj leak, which causes memory leak: kobj_type must have release() method to free memory from release callback. Don't need NULL default_attrs to init kobj. sysfs files created under kobj_status should be removed with kobj_status as parent kobject. Remove queue sysfs files when releasing queue from process MMU notifier release callback. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 75ae84c89b136a5c0193ab7064b03cddfcebba39 Author: Philip Yang Date: Wed Jun 16 10:02:18 2021 -0400 drm/amdkfd: add helper function for kfd sysfs create No functionality change. Modify kfd_sysfs_create_file to use kobject as parameter, so it becomes common helper function to remove duplicate code and will simplify new kfd sysfs file create in future. Move pr_warn to helper function if sysfs file create failed. Set helper function as void return because caller doesn't use the helper function return value. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ff4b601a0541ad539947a135205b8125880ac3b4 Author: Evan Quan Date: Tue May 25 18:35:36 2021 +0800 drm/amdgpu: update HDP LS settings Avoid unnecessary register programming on feature disablement. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3e7fbfb40fd83a18d5e29fd35ea59dfbdcce6327 Author: Evan Quan Date: Tue May 25 18:34:25 2021 +0800 drm/amdgpu: update GFX MGCG settings Update GFX MGCG related settings. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 754e9883d48c2e3a50c4d53c42905e25df3862c7 Author: Evan Quan Date: Tue May 25 18:24:47 2021 +0800 drm/amdgpu: correct clock gating settings on feature unsupported Clock gating setting is still performed even when the corresponding CG feature is not supported. And the tricky part is disablement is actually performed no matter for enablement or disablement request. That seems not logically right. Considering HW should already properly take care of the CG state, we will just skip the corresponding clock gating setting when the feature is not supported. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit adcf949e664a8b04df2fb8aa916892e58561653c Author: Evan Quan Date: Tue May 25 14:36:29 2021 +0800 drm/amdgpu: fix the hang caused by PCIe link width switch SMU had set all the necessary fields for a link width switch but the width switch wasn't occurring because the link was idle in the L1 state. Setting LC_L1_RECONFIG_EN=0x1 will allow width switches to also be initiated while in L1 instead of waiting until the link is back in L0. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5a5da8ae9546031e43efd4fa5aa8baa481e83dfb Author: Evan Quan Date: Tue May 25 12:08:53 2021 +0800 drm/amdgpu: fix NAK-G generation during PCI-e link width switch A lot of NAK-G being generated when link widht switching is happening. WA for this issue is to program the SPC to 4 symbols per clock during bootup when the native PCIE width is x4. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 9c26ddb1c5b6e30c6bca48b8ad9205d96efe93d0 Author: Evan Quan Date: Tue May 25 11:43:38 2021 +0800 drm/amdgpu: fix Navi1x tcp power gating hang when issuing lightweight invalidaiton Fix TCP hang when a lightweight invalidation happens on Navi1x. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 0dbc2c81a1ab7dadfc534d89d79d4e8c394123af Author: Evan Quan Date: Tue May 25 11:15:55 2021 +0800 drm/amdgpu: correct tcp harvest setting Add missing settings for SQC bits. And correct some confusing logics around active wgp bitmap calculation. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit dafff0476d6554a5b84f0d48b99368333de58d5b Author: Chengzhe Liu Date: Fri Jun 18 17:02:55 2021 +0800 drm/amdgpu: Power down VCN and JPEG before disabling SMU features When unloading driver, if VCN is powered on, sending message DisableAllSmuFeatures to SMU will cause SMU hang. We need to power down VCN and JPEG before clean up SMU. Signed-off-by: Chengzhe Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a51482458dafb836dbf7c8ae3200ca8db7348201 Author: Zhan Liu Date: Mon Jun 14 14:54:14 2021 -0400 drm/amd/display: Enabling eDP no power sequencing with DAL feature mask [Why] Sometimes, DP receiver chip power-controlled externally by an Embedded Controller could be treated and used as eDP, if it drives mobile display. In this case, we shouldn't be doing power-sequencing, hence we can skip waiting for T7-ready and T9-ready." [How] Added a feature mask to enable eDP no power sequencing feature. To enable this, set 0x10 flag in amdgpu.dcfeaturemask on Linux command line. Signed-off-by: Zhan Liu Reviewed-by: Nikola Cornij Signed-off-by: Alex Deucher commit 007b350a58754a93ca9fe50c498cc27780171153 Merge: 8418dabd97ce4 957adb68b3f7d Author: Linus Torvalds Date: Tue Jun 29 20:30:00 2021 -0700 Merge tag 'dlm-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This is a major dlm networking enhancement that adds message retransmission so that the dlm can reliably continue operating when network connections fail and nodes reconnect. Previously, this would result in lost messages which could only be handled as a node failure" * tag 'dlm-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: (26 commits) fs: dlm: invalid buffer access in lookup error fs: dlm: fix race in mhandle deletion fs: dlm: rename socket and app buffer defines fs: dlm: introduce proto values fs: dlm: move dlm allow conn fs: dlm: use alloc_ordered_workqueue fs: dlm: fix memory leak when fenced fs: dlm: fix lowcomms_start error case fs: dlm: Fix spelling mistake "stucked" -> "stuck" fs: dlm: Fix memory leak of object mh fs: dlm: don't allow half transmitted messages fs: dlm: add midcomms debugfs functionality fs: dlm: add reliable connection if reconnect fs: dlm: add union in dlm header for lockspace id fs: dlm: move out some hash functionality fs: dlm: add functionality to re-transmit a message fs: dlm: make buffer handling per msg fs: dlm: add more midcomms hooks fs: dlm: public header in out utility fs: dlm: fix connection tcp EOF handling ... commit 8418dabd97ce4b0713c36dd8226978f737c342b0 Merge: bbd91626f71c1 7a607a41cdc6c Author: Linus Torvalds Date: Tue Jun 29 20:23:08 2021 -0700 Merge tag 'gfs2-v5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: "Various minor gfs2 cleanups and fixes" * tag 'gfs2-v5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Clean up gfs2_unstuff_dinode gfs2: Unstuff before locking page in gfs2_page_mkwrite gfs2: Clean up the error handling in gfs2_page_mkwrite gfs2: Fix error handling in init_statfs gfs2: Fix underflow in gfs2_page_mkwrite gfs2: Use list_move_tail instead of list_del/list_add_tail gfs2: Fix do_gfs2_set_flags description commit bbd91626f71c1582301044f5942751eeb4ca98ba Merge: b97902b62ae8d 0fa757b5d3ea6 Author: Linus Torvalds Date: Tue Jun 29 20:18:16 2021 -0700 Merge tag '5.14-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: - improve fallocate emulation - DFS fixes - minor multichannel fixes - various cleanup patches, many to address Coverity warnings * tag '5.14-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (38 commits) smb3: prevent races updating CurrentMid cifs: fix missing spinlock around update to ses->status cifs: missing null pointer check in cifs_mount smb3: fix possible access to uninitialized pointer to DACL cifs: missing null check for newinode pointer cifs: remove two cases where rc is set unnecessarily in sid_to_id SMB3: Add new info level for query directory cifs: fix NULL dereference in smb2_check_message() smbdirect: missing rc checks while waiting for rdma events cifs: Avoid field over-reading memcpy() smb311: remove dead code for non compounded posix query info cifs: fix SMB1 error path in cifs_get_file_info_unix smb3: fix uninitialized value for port in witness protocol move cifs: fix unneeded null check cifs: use SPDX-Licence-Identifier cifs: convert list_for_each to entry variant in cifs_debug.c cifs: convert list_for_each to entry variant in smb2misc.c cifs: avoid extra calls in posix_info_parse cifs: retry lookup and readdir when EAGAIN is returned. cifs: fix check of dfs interlinks ... commit b97902b62ae8d5bdd20f56278d8083b4324bf7b5 Merge: 30d1a556a9970 15845cbcd12a5 Author: Linus Torvalds Date: Tue Jun 29 20:10:16 2021 -0700 Merge tag 'fs.openat2.unknown_flags.v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull openat2 fixes from Christian Brauner: - Remove the unused VALID_UPGRADE_FLAGS define we carried from an extension to openat2() that we haven't merged. Aleksa might be getting back to it at some point but just not right now. - openat2() used to accidently ignore unknown flag values in the upper 32 bits. The new openat2() syscall verifies that no unknown O-flag values are set and returns an error to userspace if they are while the older open syscalls like open() and openat() simply ignore unknown flag values: #define O_FLAG_CURRENTLY_INVALID (1 << 31) struct open_how how = { .flags = O_RDONLY | O_FLAG_CURRENTLY_INVALID, .resolve = 0, }; /* fails */ fd = openat2(-EBADF, "/dev/null", &how, sizeof(how)); /* succeeds */ fd = openat(-EBADF, "/dev/null", O_RDONLY | O_FLAG_CURRENTLY_INVALID); However, openat2() silently truncates the upper 32 bits meaning: #define O_FLAG_CURRENTLY_INVALID_LOWER32 (1 << 31) #define O_FLAG_CURRENTLY_INVALID_UPPER32 (1 << 40) struct open_how how_lowe32 = { .flags = O_RDONLY | O_FLAG_CURRENTLY_INVALID_LOWER32, }; struct open_how how_upper32 = { .flags = O_RDONLY | O_FLAG_CURRENTLY_INVALID_UPPER32, }; /* fails */ fd = openat2(-EBADF, "/dev/null", &how_lower32, sizeof(how_lower32)); /* succeeds */ fd = openat2(-EBADF, "/dev/null", &how_upper32, sizeof(how_upper32)); Fix this by preventing the immediate truncation in build_open_flags() and add a compile-time check to catch when we add flags in the upper 32 bit range. * tag 'fs.openat2.unknown_flags.v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: test: add openat2() test for invalid upper 32 bit flag value open: don't silently ignore unknown O-flags in openat2() fcntl: remove unused VALID_UPGRADE_FLAGS commit 30d1a556a9970e02794501068fd91d4417363f0a Merge: 65090f30ab791 5990b5d770cbf Author: Linus Torvalds Date: Tue Jun 29 20:07:06 2021 -0700 Merge tag 'fs.mount_setattr.nosymfollow.v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull mount_setattr updates from Christian Brauner: "A few releases ago the old mount API gained support for a mount options which prevents following symlinks on a given mount. This adds support for it in the new mount api through the MOUNT_ATTR_NOSYMFOLLOW flag via mount_setattr() and fsmount(). With mount_setattr() that flag can even be applied recursively. There's an additional ack from Ross Zwisler who originally authored the nosymfollow patch. As I've already had the patches in my for-next I didn't add his ack explicitly" * tag 'fs.mount_setattr.nosymfollow.v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: tests: test MOUNT_ATTR_NOSYMFOLLOW with mount_setattr() mount: Support "nosymfollow" in new mount api commit d578b99443fde0968246cc7cbf3bc3016123c2f4 Author: Jonathan Davies Date: Fri Jun 11 14:02:08 2021 +0000 ext4: notify sysfs on errors_count value change After s_error_count is incremented, signal the change in the corresponding sysfs attribute via sysfs_notify. This allows userspace to poll() on changes to /sys/fs/ext4/*/errors_count. [ Moved call of ext4_notify_error_sysfs() to flush_stashed_error_work() to avoid BUG's caused by calling sysfs_notify trying to sleep after being called from an invalid context. -- TYT ] Signed-off-by: Jonathan Davies Link: https://lore.kernel.org/r/20210611140209.28903-1-jonathan.davies@nutanix.com Signed-off-by: Theodore Ts'o commit bfa50166cd9d5d190b20dc33d1ec7ae19ced7022 Author: Sergio Paracuellos Date: Tue Jun 29 16:34:07 2021 +0200 pinctrl: ralink: rt305x: add missing include Header 'rt305x.h' is ralink architecture dependent file where other general definitions which are in 'ralink_regs.h' are being used. This 'rt305x.h' is only being included in two different files: 'rt305x.c' and 'pinctrl-rt305x.c'. When file 'pinctrl-rt305x.c' is being compiled definitions in 'ralink_regs.h' are need to build it properly. Hence, add missing include 'ralink_regs.h' in 'pinctrl-rt305x.c' source to avoid compilation problems. Fixes: 3a1b0ca5a83b ("pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' file") Reported-by: kernel test robot Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210629143407.14703-1-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 65090f30ab791810a3dc840317e57df05018559c Merge: 349a2d52ffe59 0ed950d1f2814 Author: Linus Torvalds Date: Tue Jun 29 17:29:11 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: "191 patches. Subsystems affected by this patch series: kthread, ia64, scripts, ntfs, squashfs, ocfs2, kernel/watchdog, and mm (gup, pagealloc, slab, slub, kmemleak, dax, debug, pagecache, gup, swap, memcg, pagemap, mprotect, bootmem, dma, tracing, vmalloc, kasan, initialization, pagealloc, and memory-failure)" * emailed patches from Andrew Morton : (191 commits) mm,hwpoison: make get_hwpoison_page() call get_any_page() mm,hwpoison: send SIGBUS with error virutal address mm/page_alloc: split pcp->high across all online CPUs for cpuless nodes mm/page_alloc: allow high-order pages to be stored on the per-cpu lists mm: replace CONFIG_FLAT_NODE_MEM_MAP with CONFIG_FLATMEM mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA docs: remove description of DISCONTIGMEM arch, mm: remove stale mentions of DISCONIGMEM mm: remove CONFIG_DISCONTIGMEM m68k: remove support for DISCONTIGMEM arc: remove support for DISCONTIGMEM arc: update comment about HIGHMEM implementation alpha: remove DISCONTIGMEM and NUMA mm/page_alloc: move free_the_page mm/page_alloc: fix counting of managed_pages mm/page_alloc: improve memmap_pages dbg msg mm: drop SECTION_SHIFT in code comments mm/page_alloc: introduce vm.percpu_pagelist_high_fraction mm/page_alloc: limit the number of pages on PCP lists when reclaim is active mm/page_alloc: scale the number of pages that are batch freed ... commit 3d8287544223a3d2f37981c1f9ffd94d0b5e9ffc Author: Leon Romanovsky Date: Tue Jun 29 09:49:33 2021 +0300 RDMA/core: Always release restrack object Change location of rdma_restrack_del() to fix the bug where task_struct was acquired but not released, causing to resource leak. ucma_create_id() { ucma_alloc_ctx(); rdma_create_user_id() { rdma_restrack_new(); rdma_restrack_set_name() { rdma_restrack_attach_task.part.0(); <--- task_struct was gotten } } ucma_destroy_private_ctx() { ucma_put_ctx(); rdma_destroy_id() { _destroy_id() <--- id_priv was freed } } } Fixes: 889d916b6f8a ("RDMA/core: Don't access cm_id after its destruction") Link: https://lore.kernel.org/r/073ec27acb943ca8b6961663c47c5abe78a5c8cc.1624948948.git.leonro@nvidia.com Reported-by: Pavel Skripkin Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4a754d7637026b42b0c9ba5787ad5ee3bc2ff77f Author: Leon Romanovsky Date: Tue Jun 29 11:51:38 2021 +0300 RDMA/mlx5: Don't access NULL-cleared mpi pointer The "dev->port[i].mp.mpi" is set to NULL during mlx5_ib_unbind_slave_port() execution, however that field is needed to add device to unaffiliated list. Such flow causes to the following kernel panic while unloading mlx5_ib module in multi-port mode, hence the device should be added to the list prior to unbind call. RPC: Unregistered rdma transport module. RPC: Unregistered rdma backchannel transport module. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP NOPTI CPU: 4 PID: 1904 Comm: modprobe Not tainted 5.13.0-rc7_for_upstream_min_debug_2021_06_24_12_08 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5_ib_cleanup_multiport_master+0x18b/0x2d0 [mlx5_ib] Code: 00 04 0f 85 c4 00 00 00 48 89 df e8 ef fa ff ff 48 8b 83 40 0d 00 00 48 8b 15 b9 e8 05 00 4a 8b 44 28 20 48 89 05 ad e8 05 00 <48> c7 00 d0 57 c5 a0 48 89 50 08 48 89 02 39 ab 88 0a 00 00 0f 86 RSP: 0018:ffff888116ee3df8 EFLAGS: 00010296 RAX: 0000000000000000 RBX: ffff8881154f6000 RCX: 0000000000000080 RDX: ffffffffa0c557d0 RSI: ffff88810b69d200 RDI: 000000000002d8a0 RBP: 0000000000000002 R08: ffff888110780408 R09: 0000000000000000 R10: ffff88812452e1c0 R11: fffffffffff7e028 R12: 0000000000000000 R13: 0000000000000080 R14: ffff888102c58000 R15: 0000000000000000 FS: 00007f884393a740(0000) GS:ffff8882f5a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000001249f6004 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mlx5_ib_stage_init_cleanup+0x16/0xd0 [mlx5_ib] __mlx5_ib_remove+0x33/0x90 [mlx5_ib] mlx5r_remove+0x22/0x30 [mlx5_ib] auxiliary_bus_remove+0x18/0x30 __device_release_driver+0x177/0x220 driver_detach+0xc4/0x100 bus_remove_driver+0x58/0xd0 auxiliary_driver_unregister+0x12/0x20 mlx5_ib_cleanup+0x13/0x897 [mlx5_ib] __x64_sys_delete_module+0x154/0x230 ? exit_to_user_mode_prepare+0x104/0x140 do_syscall_64+0x3f/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f8842e095c7 Code: 73 01 c3 48 8b 0d d9 48 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a9 48 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffc68f6e758 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 00005638207929c0 RCX: 00007f8842e095c7 RDX: 0000000000000000 RSI: 0000000000000800 RDI: 0000563820792a28 RBP: 00005638207929c0 R08: 00007ffc68f6d701 R09: 0000000000000000 R10: 00007f8842e82880 R11: 0000000000000206 R12: 0000563820792a28 R13: 0000000000000001 R14: 0000563820792a28 R15: 00007ffc68f6fb40 Modules linked in: xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat xt_addrtype xt_conntrack nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter overlay rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_ipoib ib_cm ib_umad mlx5_ib(-) mlx4_ib ib_uverbs ib_core mlx4_en mlx4_core mlx5_core ptp pps_core [last unloaded: rpcrdma] CR2: 0000000000000000 ---[ end trace a0bb7e20804e9e9b ]--- Fixes: 7ce6095e3bff ("RDMA/mlx5: Don't add slave port to unaffiliated list") Link: https://lore.kernel.org/r/899ac1b33a995be5ec0e16a4765c4e43c2b1ba5b.1624956444.git.leonro@nvidia.com Reviewed-by: Itay Aveksis Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b6df00789e2831fff7a2c65aa7164b2a4dcbe599 Merge: 3f8ad50a9e43b a118ff661889e Author: Jakub Kicinski Date: Tue Jun 29 15:45:27 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Trivial conflict in net/netfilter/nf_tables_api.c. Duplicate fix in tools/testing/selftests/net/devlink_port_split.py - take the net-next version. skmsg, and L4 bpf - keep the bpf code but remove the flags and err params. Signed-off-by: Jakub Kicinski commit f1c74a6c07e76fcb31a4bcc1f437c4361a2674ce Author: Linus Walleij Date: Sun Jun 27 01:47:49 2021 +0200 power: supply: ab8500: Fix an old bug Trying to get the AB8500 charging driver working I ran into a bit of bitrot: we haven't used the driver for a while so errors in refactorings won't be noticed. This one is pretty self evident: use argument to the macro or we end up with a random pointer to something else. Cc: stable@vger.kernel.org Cc: Krzysztof Kozlowski Cc: Marcus Cooper Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core") Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit f390e4bd79289b85bfe345d4d9d160dc4926dfc1 Author: Colin Ian King Date: Fri Jun 18 10:29:24 2021 +0100 power: supply: axp288_fuel_gauge: remove redundant continue statement The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Signed-off-by: Colin Ian King Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 3a06b912a5ce494d7b7300b12719c562be7b566f Author: Hans de Goede Date: Thu Jun 17 21:27:02 2021 +0200 power: supply: axp288_fuel_gauge: Make "T3 MRD" no_battery_list DMI entry more generic It turns out that the "T3 MRD" DMI_BOARD_NAME value is used in a lot of different Cherry Trail x5-z8300 / x5-z8350 based Mini-PC / HDMI-stick models from Ace PC / Meegopad / MinisForum / Wintel (and likely also other vendors). Most of the other DMI strings on these boxes unfortunately contain various generic values like "Default string" or "$(DEFAULT_STRING)", so we cannot match on them. These devices do have their chassis-type correctly set to a value of "3" (desktop) which is a pleasant surprise, so also match on that. This should avoid the quirk accidentally also getting applied to laptops / tablets (which do actually have a battery). Although in my quite large database of Bay and Cherry Trail based devices DMIdecode dumps I don't have any laptops / tables with a board-name of "T3 MRD", so this should not be an issue. BugLink: https://askubuntu.com/questions/1206714/how-can-a-mini-pc-be-stopped-from-being-detected-as-a-laptop-with-a-battery/ Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 0973e96b4bbd19aa50881a8e0e4653b824420de6 Author: Hans de Goede Date: Thu Jun 17 21:27:01 2021 +0200 power: supply: axp288_fuel_gauge: Rename fuel_gauge_blacklist to no_battery_list As documented in the updated "Naming" chapter of Documentation/process/coding-style.rst, usage of the work blacklist should be avoided where possible. Rename the list of devices which have no battery to the axp288_no_battery_list, which also more accurately describes the contents of the list. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit df6f3f7eb70d310c3cee2d8e08ed32067fb6fcf4 Author: Andy Shevchenko Date: Thu Jun 17 21:23:10 2021 +0300 power: supply: bq24190_charger: drop of_match_ptr() from device ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr() does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF): drivers/power/supply/bq24190_charger.c:1972:34: warning: ‘bq24190_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Andy Shevchenko Signed-off-by: Sebastian Reichel commit 30e677a2ba2920b1234d1b38307dfa1dbb993e20 Author: Yu Jiahua Date: Tue Jun 15 19:46:22 2021 -0800 drivers: power: add missing MODULE_DEVICE_TABLE in keystone-reset.c 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. Signed-off-by: Yu Jiahua Signed-off-by: Sebastian Reichel commit dfe52db13ab8d24857a9840ec7ca75eef800c26c Author: Zou Wei Date: Sat Jun 5 09:21:41 2021 +0800 power: supply: ab8500: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Sebastian Reichel commit 073b5d5b1f9cc94a3eea25279fbafee3f4f5f097 Author: Zou Wei Date: Sat Jun 5 09:21:54 2021 +0800 power: supply: charger-manager: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Sebastian Reichel commit 4465b3a621e761d82d1a92e3fda88c5d33c804b8 Author: Zou Wei Date: Sat Jun 5 09:21:23 2021 +0800 power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Sebastian Reichel commit 349a2d52ffe59b7a0c5876fa7ee9f3eaf188b830 Merge: 72ad9f9d21539 fb38f314fbd17 Author: Linus Torvalds Date: Tue Jun 29 14:04:37 2021 -0700 Merge tag 'devprop-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "These unify device properties access in some pieces of code and make related changes. Specifics: - Handle device properties with software node API in the ACPI IORT table parsing code (Heikki Krogerus). - Unify of_node access in the common device properties code, constify the acpi_dma_supported() argument pointer and fix up CONFIG_ACPI=n stubs of some functions related to device properties (Andy Shevchenko)" * tag 'devprop-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Unify access to of_node ACPI: scan: Constify acpi_dma_supported() helper function ACPI: property: Constify stubs for CONFIG_ACPI=n case ACPI: IORT: Handle device properties with software node API device property: Retrieve fwnode from of_node via accessor commit 600d050944e133fde1f54b9113b01ccefbd82820 Merge: 6aa12138cd9ae c06dd49fd59a0 Author: Richard Weinberger Date: Tue Jun 29 23:01:39 2021 +0200 Merge tag 'nand/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next Raw NAND core: * Allow SDR timings to be nacked * Bring support for NV-DDR timings which involved a number of small preparation changes to bring new helpers, properly introduce NV-DDR structures, fill them, differenciate them and pick the best timing set. * Add the necessary infrastructure to parse the new gpio-cs property which aims at enlarging the number of available CS when a hardware controller is too constrained. * Update dead URL * Silence static checker warning in nand_setup_interface() * BBT: - Fix corner case in bad block table handling * onfi: - Use more recent ONFI specification wording - Use the BIT() macro when possible Raw NAND controller drivers: * Atmel: - Ensure the data interface is supported. * Arasan: - Finer grain NV-DDR configuration - Rename the data interface register - Use the right DMA mask - Leverage additional GPIO CS - Ensure proper configuration for the asserted target - Add support for the NV-DDR interface - Fix a macro parameter * brcmnand: - Convert bindings to json-schema * OMAP: - Various fixes and style improvements - Add larger page NAND chips support * PL35X: - New driver * QCOM: - Avoid writing to obsolete register - Delete an unneeded bool conversion - Allow override of partition parser * Marvell: - Minor documentation correction - Add missing clk_disable_unprepare() on error in marvell_nfc_resume() * R852: - Use DEVICE_ATTR_RO() helper macro * MTK: - Remove redundant dev_err call in mtk_ecc_probe() * HISI504: - Remove redundant dev_err call in probe SPI-NAND core: * Light reorganisation for the introduction of a core resume handler * Fix double counting of ECC stats SPI-NAND manufacturer drivers: * Macronix: - Add support for serial NAND flash commit 5f638e5ac61ef1b9b588efdf688acc0a4cecdca2 Author: Xie Yongji Date: Tue Jun 15 18:52:18 2021 +0800 scsi: virtio_scsi: Add validation for residual bytes from response This ensures that the residual bytes in response (might come from an untrusted device) will not exceed the data buffer length. Link: https://lore.kernel.org/r/20210615105218.214-1-xieyongji@bytedance.com Acked-by: Jason Wang Signed-off-by: Xie Yongji Signed-off-by: Martin K. Petersen commit 72ad9f9d215397aa0ffacf88c5f7e020b856d47f Merge: 5e6928249b81b 17aa26c96fb24 Author: Linus Torvalds Date: Tue Jun 29 13:50:21 2021 -0700 Merge tag 'pnp-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull PNP updates from Rafael Wysocki: "These get rid of unnecessary local variables and function, reduce code duplication and clean up message printing. Specifics: - Remove unnecessary local variables from isapnp_proc_attach_device() (Anupama K Patil). - Make the callers of pnp_alloc() use kzalloc() directly and drop the former (Heiner Kallweit). - Make two pieces of code use dev_dbg() instead of dev_printk() with the KERN_DEBUG message level (Heiner Kallweit). - Use DEVICE_ATTR_RO() instead of full DEVICE_ATTR() in some places in card.c (Zhen Lei). - Use list_for_each_entry() instead of list_for_each() in insert_device() (Zou Wei)" * tag 'pnp-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PNP: pnpbios: Use list_for_each_entry() instead of list_for_each() PNP: use DEVICE_ATTR_RO macro PNP: Switch over to dev_dbg() PNP: Remove pnp_alloc() drivers: pnp: isapnp: proc.c: Remove unnecessary local variables commit 7df47cdf199c2d014716d1baa252aa6021063443 Author: Wen Xiong Date: Thu Jun 24 21:11:25 2021 -0500 scsi: ipr: System crashes when seeing type 20 error Test team saw "4041: Incomplete multipath connection between enclosure and device" when I/O drawers/drives have bad connections. System crashes when handling these type 20 errors. [ 5.332452] ipr: 3/00-06-09: 4041: Incomplete multipath connection between enclosure and device [ 5.332460] ipr: 3/00-06-09: The IOA failed to detect an expected path to a device [ 5.332465] ipr: 3/00-06-09: Inactive path is failed: Resource Path=3/00-04-09 [ 5.332471] ipr: 3/00-06-09: Functional IOA port: Resource Path=3/00-04, Link rate=unknown, WWN=5005076059C38E05 [ 5.332478] ipr: 3/00-06-09: Incorrectly connected Device LUN: Resource Path=3/00-00-00-00-00-00-00-00-00-20-00-00-24-00-00-00-0, Link rate=unknown, WWN=0020000024000000 [ 5.332487] ipr: 3/00-06-09: Path element=FF: Resource Path=3/50-05-07-60-45-56-5A-9C-00-00-00-00-00-00-00-00-0, Link rate=unknown WWN=0000000000000000 [ 5.332492] ipr: 00000000: 54520EC8 00000000 00000000 4E532050 [ 5.332495] ipr: 00000010: 45522054 49434B3D 00000050 278130E6 [ 5.332498] ipr: 00000020: 033B5300 03282584 4C4D00E0 278039F3 [ 5.332501] ipr: 00000030: 033B5180 03282404 4C4D00E0 276A0282 [ 5.332504] ipr: 00000040: 033B5000 03281E04 447000E0 27697D19 [ 5.332507] ipr: 00000050: 033B4E80 03281D84 447000E0 27690524 [ 5.332509] ipr: 00000060: 033B4D00 03281C84 447000E0 27687FDA [ 5.332512] ipr: 00000070: 033B4B80 03281C04 447000E0 2767E787 [ 5.332515] ipr: 00000080: 033B4A00 03281B04 447000E0 27674F0A Link: https://lore.kernel.org/r/1624587085-10073-1-git-send-email-wenxiong@linux.vnet.ibm.com Acked-by: Brian King Signed-off-by: Wen Xiong Signed-off-by: Martin K. Petersen commit 104739aca4488909175e9e31d5cd7d75b82a2046 Author: Quat Le Date: Tue Jun 29 08:58:26 2021 -0700 scsi: core: Retry I/O for Notify (Enable Spinup) Required error If the device is power-cycled, it takes time for the initiator to transmit the periodic NOTIFY (ENABLE SPINUP) SAS primitive, and for the device to respond to the primitive to become ACTIVE. Retry the I/O request to allow the device time to become ACTIVE. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210629155826.48441-1-quat.le@oracle.com Reviewed-by: Bart Van Assche Signed-off-by: Quat Le Signed-off-by: Martin K. Petersen commit 5e6928249b81b4d8727ab6a4037a171d15455cb0 Merge: 3563f55ce6546 64f9111dd6225 Author: Linus Torvalds Date: Tue Jun 29 13:39:41 2021 -0700 Merge tag 'acpi-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to the 20210604 upstream revision, add preliminary support for the Platform Runtime Mechanism (PRM), address issues related to the handling of device dependencies in the ACPI device eunmeration code, improve the tracking of ACPI power resource states, improve the ACPI support for suspend-to-idle on AMD systems, continue the unification of message printing in the ACPI code, address assorted issues and clean up the code in a number of places. Specifics: - Update ACPICA code in the kernel to upstrea revision 20210604 including the following changes: - Add defines for the CXL Host Bridge Structureand and add the CFMWS structure definition to CEDT (Alison Schofield). - iASL: Finish support for the IVRS ACPI table (Bob Moore). - iASL: Add support for the SVKL table (Bob Moore). - iASL: Add full support for RGRT ACPI table (Bob Moore). - iASL: Add support for the BDAT ACPI table (Bob Moore). - iASL: add disassembler support for PRMT (Erik Kaneda). - Fix memory leak caused by _CID repair function (Erik Kaneda). - Add support for PlatformRtMechanism OpRegion (Erik Kaneda). - Add PRMT module header to facilitate parsing (Erik Kaneda). - Add _PLD panel positions (Fabian Wüthrich). - MADT: add Multiprocessor Wakeup Mailbox Structure and the SVKL table headers (Kuppuswamy Sathyanarayanan). - Use ACPI_FALLTHROUGH (Wei Ming Chen). - Add preliminary support for the Platform Runtime Mechanism (PRM) to allow the AML interpreter to call PRM functions (Erik Kaneda). - Address some issues related to the handling of device dependencies reported by _DEP in the ACPI device enumeration code and clean up some related pieces of it (Rafael Wysocki). - Improve the tracking of states of ACPI power resources (Rafael Wysocki). - Improve ACPI support for suspend-to-idle on AMD systems (Alex Deucher, Mario Limonciello, Pratik Vishwakarma). - Continue the unification and cleanup of message printing in the ACPI code (Hanjun Guo, Heiner Kallweit). - Fix possible buffer overrun issue with the description_show() sysfs attribute method (Krzysztof Wilczyński). - Improve the acpi_mask_gpe kernel command line parameter handling and clean up the core ACPI code related to sysfs (Andy Shevchenko, Baokun Li, Clayton Casciato). - Postpone bringing devices in the general ACPI PM domain to D0 during resume from system-wide suspend until they are really needed (Dmitry Torokhov). - Make the ACPI processor driver fix up C-state latency if not ordered (Mario Limonciello). - Add support for identifying devices depening on the given one that are not its direct descendants with the help of _DEP (Daniel Scally). - Extend the checks related to ACPI IRQ overrides on x86 in order to avoid false-positives (Hui Wang). - Add battery DPTF participant for Intel SoCs (Sumeet Pawnikar). - Rearrange the ACPI fan driver and device power management code to use a common list of device IDs (Rafael Wysocki). - Fix clang CFI violation in the ACPI BGRT table parsing code and clean it up (Nathan Chancellor). - Add GPE-related quirks for some laptops to the EC driver (Chris Chiu, Zhang Rui). - Make the ACPI PPTT table parsing code populate the cache-id value if present in the firmware (James Morse). - Remove redundant clearing of context->ret.pointer from acpi_run_osc() (Hans de Goede). - Add missing acpi_put_table() in acpi_init_fpdt() (Jing Xiangfeng). - Make ACPI APEI handle ARM Processor Error CPER records like Memory Error ones to avoid user space task lockups (Xiaofei Tan). - Stop warning about disabled ACPI in APEI (Jon Hunter). - Fix fall-through warning for Clang in the SBSHC driver (Gustavo A. R. Silva). - Add custom DSDT file as Makefile prerequisite (Richard Fitzgerald). - Initialize local variable to avoid garbage being returned (Colin Ian King). - Simplify assorted pieces of code, address assorted coding style and documentation issues and comment typos (Baokun Li, Christophe JAILLET, Clayton Casciato, Liu Shixin, Shaokun Zhang, Wei Yongjun, Yang Li, Zhen Lei)" * tag 'acpi-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (97 commits) ACPI: PM: postpone bringing devices to D0 unless we need them ACPI: tables: Add custom DSDT file as makefile prerequisite ACPI: bgrt: Use sysfs_emit ACPI: bgrt: Fix CFI violation ACPI: EC: trust DSDT GPE for certain HP laptop ACPI: scan: Simplify acpi_table_events_fn() ACPI: PM: Adjust behavior for field problems on AMD systems ACPI: PM: s2idle: Add support for new Microsoft UUID ACPI: PM: s2idle: Add support for multiple func mask ACPI: PM: s2idle: Refactor common code ACPI: PM: s2idle: Use correct revision id ACPI: sysfs: Remove tailing return statement in void function ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros ACPI: sysfs: Sort headers alphabetically ACPI: sysfs: Refactor param_get_trace_state() to drop dead code ACPI: sysfs: Unify pattern of memory allocations ACPI: sysfs: Allow bitmap list to be supplied to acpi_mask_gpe ACPI: sysfs: Make sparse happy about address space in use ACPI: scan: Fix race related to dropping dependencies ACPI: scan: Reorganize acpi_device_add() ... commit 62e528b80d6b5753e03f005e4858eefb7a84f877 Author: Sreekanth Reddy Date: Tue Jun 29 19:41:53 2021 +0530 scsi: mpi3mr: Fix warnings reported by smatch Fix the following warning reported by static analysis tool smatch: smatch warnings: drivers/scsi/mpi3mr/mpi3mr_os.c:873 mpi3mr_update_tgtdev() error: we previously assumed 'mrioc->shost' could be null (see line 870 Link: https://lore.kernel.org/r/20210629141153.3158-1-sreekanth.reddy@broadcom.com Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 2fc6d0ec54b9574c02f83ee64f42b77ac141ce90 Merge: eab4e6d953c10 601423bc0c064 Author: Sebastian Reichel Date: Tue Jun 29 22:38:37 2021 +0200 Merge branch 'psy-fixes' into psy-next commit 6a82f42a2e55d43bd99f1b457982be6c856c800d Author: Daniel Bristot de Oliveira Date: Tue Jun 29 19:10:27 2021 +0200 trace/timerlat: Fix indentation on timerlat_main() Dan Carpenter reported that: The patch a955d7eac177: "trace: Add timerlat tracer" from Jun 22, 2021, leads to the following static checker warning: kernel/trace/trace_osnoise.c:1400 timerlat_main() warn: inconsistent indenting here: 1389 while (!kthread_should_stop()) { 1390 now = ktime_to_ns(hrtimer_cb_get_time(&tlat->timer)); 1391 diff = now - tlat->abs_period; 1392 1393 s.seqnum = tlat->count; 1394 s.timer_latency = diff; 1395 s.context = THREAD_CONTEXT; 1396 1397 trace_timerlat_sample(&s); 1398 1399 #ifdef CONFIG_STACKTRACE 1400 if (osnoise_data.print_stack) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This should be indented another tab? 1401 if (osnoise_data.print_stack <= time_to_us(diff)) 1402 timerlat_dump_stack(); 1403 #endif /* CONFIG_STACKTRACE */ 1404 1405 tlat->tracing_thread = false; 1406 if (osnoise_data.stop_tracing_total) 1407 if (time_to_us(diff) >= osnoise_data.stop_tracing_total) 1408 osnoise_stop_tracing(); 1409 1410 wait_next_period(tlat); 1411 } And the static checker is right. Fix the indentation. Link: https://lkml.kernel.org/r/3d5d8c9258fbdcfa9d3c7362941b3d13a2a28d9d.1624986368.git.bristot@redhat.com Cc: Ingo Molnar Cc: Daniel Bristot de Oliveira Cc: Dan Carpenter Cc: linux-kernel@vger.kernel.org Fixes: a955d7eac177 ("trace: Add timerlat tracer") Reported-by: Dan Carpenter Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 19c3eaa72288ce161441dd6b74b765a094d73488 Author: Daniel Bristot de Oliveira Date: Tue Jun 29 19:10:26 2021 +0200 trace/osnoise: Make 'noise' variable s64 in run_osnoise() Dab Carpenter reported that: The patch bce29ac9ce0b: "trace: Add osnoise tracer" from Jun 22, 2021, leads to the following static checker warning: kernel/trace/trace_osnoise.c:1103 run_osnoise() warn: unsigned 'noise' is never less than zero. In this part of the code: 1100 /* 1101 * This shouldn't happen. 1102 */ 1103 if (noise < 0) { ^^^^^^^^^ 1104 osnoise_taint("negative noise!"); 1105 goto out; 1106 } 1107 And the static checker is right because 'noise' is u64. Make noise s64 and keep the check. It is important to check if the time read is behaving correctly - so we can trust the results. I also re-arranged some variable declarations. Link: https://lkml.kernel.org/r/acd7cd6e7d56b798a298c3bc8139a390b3c4ab52.1624986368.git.bristot@redhat.com Cc: Ingo Molnar Cc: Daniel Bristot de Oliveira Cc: Dan Carpenter Cc: linux-kernel@vger.kernel.org Fixes: bce29ac9ce0b ("trace: Add osnoise tracer") Reported-by: Dan Carpenter Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 3563f55ce65462063543dfa6a8d8c7fbfb9d7772 Merge: 1dfb0f47aca11 22b65d31ad9d1 Author: Linus Torvalds Date: Tue Jun 29 13:36:06 2021 -0700 Merge tag 'pm-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add hybrid processors support to the intel_pstate driver and make it work with more processor models when HWP is disabled, make the intel_idle driver use special C6 idle state paremeters when package C-states are disabled, add cooling support to the tegra30 devfreq driver, rework the TEO (timer events oriented) cpuidle governor, extend the OPP (operating performance points) framework to use the required-opps DT property in more cases, fix some issues and clean up a number of assorted pieces of code. Specifics: - Make intel_pstate support hybrid processors using abstract performance units in the HWP interface (Rafael Wysocki). - Add Icelake servers and Cometlake support in no-HWP mode to intel_pstate (Giovanni Gherdovich). - Make cpufreq_online() error path be consistent with the CPU device removal path in cpufreq (Rafael Wysocki). - Clean up 3 cpufreq drivers and the statistics code (Hailong Liu, Randy Dunlap, Shaokun Zhang). - Make intel_idle use special idle state parameters for C6 when package C-states are disabled (Chen Yu). - Rework the TEO (timer events oriented) cpuidle governor to address some theoretical shortcomings in it (Rafael Wysocki). - Drop unneeded semicolon from the TEO governor (Wan Jiabing). - Modify the runtime PM framework to accept unassigned suspend and resume callback pointers (Ulf Hansson). - Improve pm_runtime_get_sync() documentation (Krzysztof Kozlowski). - Improve device performance states support in the generic power domains (genpd) framework (Ulf Hansson). - Fix some documentation issues in genpd (Yang Yingliang). - Make the operating performance points (OPP) framework use the required-opps DT property in use cases that are not related to genpd (Hsin-Yi Wang). - Make lazy_link_required_opp_table() use list_del_init instead of list_del/INIT_LIST_HEAD (Yang Yingliang). - Simplify wake IRQs handling in the core system-wide sleep support code and clean up some coding style inconsistencies in it (Tian Tao, Zhen Lei). - Add cooling support to the tegra30 devfreq driver and improve its DT bindings (Dmitry Osipenko). - Fix some assorted issues in the devfreq core and drivers (Chanwoo Choi, Dong Aisheng, YueHaibing)" * tag 'pm-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits) PM / devfreq: passive: Fix get_target_freq when not using required-opp cpufreq: Make cpufreq_online() call driver->offline() on errors opp: Allow required-opps to be used for non genpd use cases cpuidle: teo: remove unneeded semicolon in teo_select() dt-bindings: devfreq: tegra30-actmon: Add cooling-cells dt-bindings: devfreq: tegra30-actmon: Convert to schema PM / devfreq: userspace: Use DEVICE_ATTR_RW macro PM: runtime: Clarify documentation when callbacks are unassigned PM: runtime: Allow unassigned ->runtime_suspend|resume callbacks PM: runtime: Improve path in rpm_idle() when no callback PM: hibernate: remove leading spaces before tabs PM: sleep: remove trailing spaces and tabs PM: domains: Drop/restore performance state votes for devices at runtime PM PM: domains: Return early if perf state is already set for the device PM: domains: Split code in dev_pm_genpd_set_performance_state() cpuidle: teo: Use kerneldoc documentation in admin-guide cpuidle: teo: Rework most recent idle duration values treatment cpuidle: teo: Change the main idle state selection logic cpuidle: teo: Cosmetic modification of teo_select() cpuidle: teo: Cosmetic modifications of teo_update() ... commit d2b21013bf5fb177c08b2c9c4dfa32ee0fc97b53 Merge: 4f47c91fc6a8f 301035c32e675 9b13ff4340dff 6c81966107dc0 Author: Stephen Boyd Date: Tue Jun 29 13:33:42 2021 -0700 Merge branches 'clk-st', 'clk-si' and 'clk-hisilicon' into clk-next - Stop using clock-output-names in ST clk drivers * clk-st: dt-bindings: clock: st: clkgen-fsyn: add new introduced compatible clk: st: clkgen-fsyn: embed soc clock outputs within compatible data dt-bindings: clock: st: clkgen-pll: add new introduced compatible clk: st: clkgen-pll: embed soc clock outputs within compatible data dt-bindings: clock: st: flexgen: add new introduced compatible clk: st: flexgen: embed soc clock outputs within compatible data clk: st: clkgen-pll: remove unused variable of struct clkgen_pll * clk-si: clk: si5341: Add sysfs properties to allow checking/resetting device faults clk: si5341: Add silabs,iovdd-33 property clk: si5341: Add silabs,xaxb-ext-clk property clk: si5341: Allow different output VDD_SEL values clk: si5341: Update initialization magic clk: si5341: Check for input clock presence and PLL lock on startup clk: si5341: Avoid divide errors due to bogus register contents clk: si5341: Wait for DEVICE_READY on startup dt-bindings: clock: clk-si5341: Add new attributes * clk-hisilicon: clk: hisilicon: Add clock driver for hi3559A SoC dt-bindings: Document the hi3559a clock bindings commit 4f47c91fc6a8f4b274d934648b53cb668c69c986 Merge: e51fbc55d3d3f bf68fdfdec6cd 21e743300dd0b fa5b6541423e7 db01868f1b263 bdbfc029374f6 Author: Stephen Boyd Date: Tue Jun 29 13:33:22 2021 -0700 Merge branches 'clk-lmk04832', 'clk-stm', 'clk-rohm', 'clk-actions' and 'clk-ingenic' into clk-next - Texas Instruments' LMK04832 Ultra Low-Noise JESD204B Compliant Clock Jitter Cleaner With Dual Loop PLLs - Support secure mode of STM32MP1 SoCs - Improve clock support for Actions S500 SoC * clk-lmk04832: clk: lmk04832: Use of match table clk: lmk04832: Depend on SPI clk: lmk04832: add support for digital delay clk: add support for the lmk04832 dt-bindings: clock: add ti,lmk04832 bindings * clk-stm: clk: stm32mp1: new compatible for secure RCC support dt-bindings: clock: stm32mp1 new compatible for secure rcc dt-bindings: reset: add MCU HOLD BOOT ID for SCMI reset domains on stm32mp15 dt-bindings: reset: add IDs for SCMI reset domains on stm32mp15 dt-bindings: clock: add IDs for SCMI clocks on stm32mp15 reset: stm32mp1: remove stm32mp1 reset clk: stm32mp1: move RCC reset controller into RCC clock driver clk: stm32mp1: convert to module driver clk: stm32mp1: remove intermediate pll clocks clk: stm32mp1: merge 'ck_hse_rtc' and 'ck_rtc' into one clock clk: stm32mp1: merge 'clk-hsi-div' and 'ck_hsi' into one clock * clk-rohm: clk: bd718xx: Drop BD70528 support * clk-actions: clk: actions: Add NIC and ETHERNET clock support for Actions S500 SoC dt-bindings: clock: Add NIC and ETHERNET bindings for Actions S500 SoC clk: actions: Fix AHPPREDIV-H-AHB clock chain on Owl S500 SoC clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC clk: actions: Fix SD clocks factor table on Owl S500 SoC clk: actions: Fix UART clock dividers on Owl S500 SoC * clk-ingenic: clk: ingenic: Add support for the JZ4760 clk: ingenic: Support overriding PLLs M/N/OD calc algorithm clk: ingenic: Remove pll_info.no_bypass_bit clk: ingenic: Read bypass register only when there is one clk: Support bypassing dividers dt-bindings: clock: ingenic: Add ingenic,jz4760{,b}-cgu compatibles commit e51fbc55d3d3f68a9fb37c4e95c88404c4ff244c Merge: 029eae234be34 14de023dc0f75 686f225039be2 feb29cc744c1d 03aea91bbe06d 99c6fc6d7ecb7 Author: Stephen Boyd Date: Tue Jun 29 13:33:16 2021 -0700 Merge branches 'clk-rockchip', 'clk-amlogic', 'clk-yaml', 'clk-zynq' and 'clk-socfpga' into clk-next * clk-rockchip: clk: rockchip: export ACLK_VCODEC for RK3036 clk: rockchip: fix rk3568 cpll clk gate bits clk: rockchip: Optimize PLL table memory usage * clk-amlogic: clk: meson: g12a: Add missing NNA source clocks for g12b clk: meson: axg-audio: improve deferral handling clk: meson: g12a: fix gp0 and hifi ranges clk: meson: pll: switch to determine_rate for the PLL ops * clk-yaml: dt-bindings: clock: gpio-mux-clock: Convert to json-schema * clk-zynq: clk: zynqmp: Handle divider specific read only flag clk: zynqmp: Use firmware specific mux clock flags clk: zynqmp: Use firmware specific divider clock flags clk: zynqmp: Use firmware specific common clock flags clk: zynqmp: pll: Remove some dead code clk: zynqmp: fix compile testing without ZYNQMP_FIRMWARE * clk-socfpga: clk: socfpga: clk-pll: Remove unused variable 'rc' clk: agilex/stratix10/n5x: fix how the bypass_reg is handled clk: agilex/stratix10: add support for the 2nd bypass clk: agilex/stratix10: fix bypass representation clk: agilex/stratix10: remove noc_clk commit 029eae234be34e47a7bcde5c429c04d9e761ad07 Merge: d915611eda071 4c5519facf378 fc336ae622df0 ee7fe68769ec8 2f0d67bf4cecb 8e5f17e6c2fd1 Author: Stephen Boyd Date: Tue Jun 29 13:33:10 2021 -0700 Merge branches 'clk-legacy', 'clk-vc5', 'clk-allwinner', 'clk-nvidia' and 'clk-imx' into clk-next * clk-legacy: clkdev: remove unused clkdev_alloc() interfaces clkdev: remove CONFIG_CLKDEV_LOOKUP m68k: coldfire: remove private clk_get/clk_put m68k: coldfire: use clkdev_lookup on most coldfire mips: ralink: convert to CONFIG_COMMON_CLK mips: ar7: convert to CONFIG_COMMON_CLK mips: ar7: convert to clkdev_lookup * clk-vc5: clk: vc5: fix output disabling when enabling a FOD * clk-allwinner: clk: sunxi-ng: v3s: fix incorrect postdivider on pll-audio * clk-nvidia: clk: tegra: clk-tegra124-dfll-fcpu: don't use devm functions for regulator clk: tegra: tegra124-emc: Fix clock imbalance in emc_set_timing() clk: tegra: Add stubs needed for compile-testing clk: tegra: Don't deassert reset on enabling clocks clk: tegra: Mark external clocks as not having reset control clk: tegra: cclk: Handle thermal DIV2 CPU frequency throttling clk: tegra: Don't allow zero clock rate for PLLs clk: tegra: Halve SCLK rate on Tegra20 clk: tegra: Ensure that PLLU configuration is applied properly clk: tegra: Fix refcounting of gate clocks clk: tegra30: Use 300MHz for video decoder by default * clk-imx: clk: imx8mq: remove SYS PLL 1/2 clock gates clk: imx: scu: Do not enable runtime PM for CPU clks clk: imx: scu: add parent save and restore clk: imx: scu: Only save DC SS clock using non-cached clock rate clk: imx: scu: Add A72 frequency scaling support clk: imx: scu: Add A53 frequency scaling support clk: imx: scu: bypass pi_pll enable status restore clk: imx: scu: detach pd if can't power up clk: imx: scu: bypass cpu clock save and restore clk: imx: scu: add parallel port clock ops clk: imx: scu: add more scu clocks clk: imx: scu: add enet rgmii gpr clocks clk: imx8qm: add clock valid resource checking clk: imx8qxp: add clock valid checking mechnism clk: imx: scu: add gpr clocks support clk: imx: scu: remove legacy scu clock binding support dt-bindings: arm: imx: scu: drop deprecated legacy clock binding dt-bindings: arm: imx: scu: fix naming typo of clk compatible string clk: imx: Remove the audio ipg clock from imx8mp commit d915611eda071984f895277ab26bbb80c792f5cb Merge: 7f54bf2640e87 51c8b49762e49 7f8a37a4b6978 06abc7537686a 9ba98c08dcb82 Author: Stephen Boyd Date: Tue Jun 29 13:32:46 2021 -0700 Merge branches 'clk-qcom', 'clk-versatile', 'clk-renesas', 'clk-sifive' and 'clk-ti' into clk-next - duty cycle setting support on qcom clks - qcom MDM9607 GCC - qcom sc8180x display clks - qcom SM6125 GCC - Add TI am33xx spread spectrum clock support * clk-qcom: (22 commits) clk: qcom: clk-alpha-pll: fix CAL_L write in alpha_pll_fabia_prepare clk: qcom: Add camera clock controller driver for SM8250 dt-bindings: clock: add QCOM SM8250 camera clock bindings clk: qcom: clk-alpha-pll: add support for zonda pll clk/qcom: Remove unused variables clk: qcom: smd-rpmcc: Add support for MSM8226 rpm clocks clk: qcom: gcc: Add support for Global Clock controller found on MSM8226 dt-bindings: clock: qcom: Add MSM8226 GCC clock bindings clk: qcom: Add SM6125 (TRINKET) GCC driver dt-bindings: clk: qcom: gcc-sm6125: Document SM6125 GCC driver clk: qcom: gcc: Add support for a new frequency for SC7280 clk: qcom: smd-rpm: Fix wrongly assigned RPM_SMD_PNOC_CLK dt-bindings: clock: qcom: rpmcc: Document MSM8226 compatible clk: qcom: dispcc-sm8250: Add EDP clocks clk: qcom: dispcc-sm8250: Add sc8180x support clk: qcom: smd-rpm: De-duplicate identical entries clk: qcom: smd-rpm: Switch to parent_data clk: qcom: Add MDM9607 GCC driver dt-bindings: clock: Add MDM9607 GCC clock bindings clk: qcom: cleanup some dev_err_probe() calls ... * clk-versatile: clk: versatile: Depend on HAS_IOMEM clk: versatile: remove dependency on ARCH_* * clk-renesas: (22 commits) clk: renesas: Add support for R9A07G044 SoC clk: renesas: Add CPG core wrapper for RZ/G2L SoC dt-bindings: clock: renesas: Document RZ/G2L SoC CPG driver dt-bindings: clock: Add r9a07g044 CPG Clock Definitions clk: renesas: r8a77995: Add ZA2 clock clk: renesas: cpg-mssr: Make srstclr[] comment block consistent clk: renesas: cpg-mssr: Remove unused [RM]MSTPCR() definitions clk: renesas: r9a06g032: Switch to .determine_rate() clk: renesas: div6: Implement range checking clk: renesas: div6: Consider all parents for requested rate clk: renesas: div6: Switch to .determine_rate() clk: renesas: div6: Simplify src mask handling clk: renesas: div6: Use clamp() instead of clamp_t() clk: renesas: rcar-usb2-clock-sel: Fix error handling in .probe() clk: renesas: r8a779a0: Add ISPCS clocks clk: renesas: rcar-gen3: Add boost support to Z clocks clk: renesas: rcar-gen3: Add custom clock for PLLs clk: renesas: rcar-gen3: Increase Z clock accuracy clk: renesas: rcar-gen3: Grammar s/dependent of/dependent on/ clk: renesas: rcar-gen3: Remove superfluous masking in cpg_z_clk_set_rate() ... * clk-sifive: clk: analogbits: fix doc warning in wrpll-cln28hpc.c clk: sifive: Fix kernel-doc * clk-ti: drivers: ti: remove redundant error message in adpll.c clk: keystone: syscon-clk: Add support for AM64 specific epwm-tbclk dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible clk: ti: add am33xx/am43xx spread spectrum clock support ARM: dts: am43xx-clocks: add spread spectrum support ARM: dts: am33xx-clocks: add spread spectrum support dt-bindings: ti: dpll: add spread spectrum support clk: ti: fix typo in routine description commit fca41af18e10318e4de090db47d9fa7169e1bf2f Author: Nathan Chancellor Date: Thu Feb 11 12:42:58 2021 -0700 qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute fw_cfg_showrev() is called by an indirect call in kobj_attr_show(), which violates clang's CFI checking because fw_cfg_showrev()'s second parameter is 'struct attribute', whereas the ->show() member of 'struct kobj_structure' expects the second parameter to be of type 'struct kobj_attribute'. $ cat /sys/firmware/qemu_fw_cfg/rev 3 $ dmesg | grep "CFI failure" [ 26.016832] CFI failure (target: fw_cfg_showrev+0x0/0x8): Fix this by converting fw_cfg_rev_attr to 'struct kobj_attribute' where this would have been caught automatically by the incompatible pointer types compiler warning. Update fw_cfg_showrev() accordingly. Fixes: 75f3e8e47f38 ("firmware: introduce sysfs driver for QEMU's fw_cfg device") Link: https://github.com/ClangBuiltLinux/linux/issues/1299 Signed-off-by: Nathan Chancellor Reviewed-by: Sami Tolvanen Tested-by: Sedat Dilek Reviewed-by: Sami Tolvanen Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kees Cook Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210211194258.4137998-1-nathan@kernel.org commit 1dfb0f47aca11350f45f8c04c3b83f0e829adfa9 Merge: a22c3f615a6fe 48f7eee81cd53 Author: Linus Torvalds Date: Tue Jun 29 12:44:51 2021 -0700 Merge tag 'x86-entry-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 entry code related updates from Thomas Gleixner: - Consolidate the macros for .byte ... opcode sequences - Deduplicate register offset defines in include files - Simplify the ia32,x32 compat handling of the related syscall tables to get rid of #ifdeffery. - Clear all EFLAGS which are not required for syscall handling - Consolidate the syscall tables and switch the generation over to the generic shell script and remove the CFLAGS tweaks which are not longer required. - Use 'int' type for system call numbers to match the generic code. - Add more selftests for syscalls * tag 'x86-entry-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/syscalls: Don't adjust CFLAGS for syscall tables x86/syscalls: Remove -Wno-override-init for syscall tables x86/uml/syscalls: Remove array index from syscall initializers x86/syscalls: Clear 'offset' and 'prefix' in case they are set in env x86/entry: Use int everywhere for system call numbers x86/entry: Treat out of range and gap system calls the same x86/entry/64: Sign-extend system calls on entry to int selftests/x86/syscall: Add tests under ptrace to syscall_numbering_64 selftests/x86/syscall: Simplify message reporting in syscall_numbering selftests/x86/syscall: Update and extend syscall_numbering_64 x86/syscalls: Switch to generic syscallhdr.sh x86/syscalls: Use __NR_syscalls instead of __NR_syscall_max x86/unistd: Define X32_NR_syscalls only for 64-bit kernel x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall x86/syscalls: Switch to generic syscalltbl.sh x86/entry/x32: Rename __x32_compat_sys_* to __x64_compat_sys_* commit a22c3f615a6fef6553e20c559d31ea817216b4e6 Merge: a941a0349cf11 056c52f5e824c Author: Linus Torvalds Date: Tue Jun 29 12:36:59 2021 -0700 Merge tag 'x86-irq-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 interrupt related updates from Thomas Gleixner: - Consolidate the VECTOR defines and the usage sites. - Cleanup GDT/IDT related code and replace open coded ASM with proper native helper functions. * tag 'x86-irq-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kexec: Set_[gi]dt() -> native_[gi]dt_invalidate() in machine_kexec_*.c x86: Add native_[ig]dt_invalidate() x86/idt: Remove address argument from idt_invalidate() x86/irq: Add and use NR_EXTERNAL_VECTORS and NR_SYSTEM_VECTORS x86/irq: Remove unused vectors defines commit a941a0349cf11ed250a04864fef268c2e05a1d32 Merge: 21edf50948728 2d0a9eb23ccfd Author: Linus Torvalds Date: Tue Jun 29 12:31:16 2021 -0700 Merge tag 'timers-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Time and clocksource/clockevent related updates: Core changes: - Infrastructure to support per CPU "broadcast" devices for per CPU clockevent devices which stop in deep idle states. This allows us to utilize the more efficient architected timer on certain ARM SoCs for normal operation instead of permanentely using the slow to access SoC specific clockevent device. - Print the name of the broadcast/wakeup device in /proc/timer_list - Make the clocksource watchdog more robust against delays between reading the current active clocksource and the watchdog clocksource. Such delays can be caused by NMIs, SMIs and vCPU preemption. Handle this by reading the watchdog clocksource twice, i.e. before and after reading the current active clocksource. In case that the two watchdog reads shows an excessive time delta, the read sequence is repeated up to 3 times. - Improve the debug output and add a test module for the watchdog mechanism. - Reimplementation of the venerable time64_to_tm() function with a faster and significantly smaller version. Straight from the source, i.e. the author of the related research paper contributed this! Driver changes: - No new drivers, not even new device tree bindings! - Fixes, improvements and cleanups and all over the place" * tag 'timers-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) time/kunit: Add missing MODULE_LICENSE() time: Improve performance of time64_to_tm() clockevents: Use list_move() instead of list_del()/list_add() clocksource: Print deviation in nanoseconds when a clocksource becomes unstable clocksource: Provide kernel module to test clocksource watchdog clocksource: Reduce clocksource-skew threshold clocksource: Limit number of CPUs checked for clock synchronization clocksource: Check per-CPU clock synchronization when marked unstable clocksource: Retry clock read if long delays detected clockevents: Add missing parameter documentation clocksource/drivers/timer-ti-dm: Drop unnecessary restore clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround clocksource/drivers/arm_global_timer: Remove duplicated argument in arm_global_timer clocksource/drivers/arm_global_timer: Make symbol 'gt_clk_rate_change_nb' static arm: zynq: don't disable CONFIG_ARM_GLOBAL_TIMER due to CONFIG_CPU_FREQ anymore clocksource/drivers/arm_global_timer: Implement rate compensation whenever source clock changes clocksource/drivers/ingenic: Rename unreasonable array names clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFG clocksource/drivers/mediatek: Ack and disable interrupts on suspend clocksource/drivers/samsung_pwm: Constify source IO memory ... commit 21edf50948728f55b685ad95f196ba46196eb767 Merge: 62180152e0944 3d2ce675aba7e Author: Linus Torvalds Date: Tue Jun 29 12:25:04 2021 -0700 Merge tag 'irq-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Updates for the interrupt subsystem: Core changes: - Cleanup and simplification of common code to invoke the low level interrupt flow handlers when this invocation requires irqdomain resolution. Add the necessary core infrastructure. - Provide a proper interface for modular PMU drivers to set the interrupt affinity. - Add a request flag which allows to exclude interrupts from spurious interrupt detection. Useful especially for IPI handlers which always return IRQ_HANDLED which turns the spurious interrupt detection into a pointless waste of CPU cycles. Driver changes: - Bulk convert interrupt chip drivers to the new irqdomain low level flow handler invocation mechanism. - Add device tree bindings for the Renesas R-Car M3-W+ SoC - Enable modular build of the Qualcomm PDC driver - The usual small fixes and improvements" * tag 'irq-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits) dt-bindings: interrupt-controller: arm,gic-v3: Describe GICv3 optional properties irqchip: gic-pm: Remove redundant error log of clock bulk irqchip/sun4i: Remove unnecessary oom message irqchip/irq-imx-gpcv2: Remove unnecessary oom message irqchip/imgpdc: Remove unnecessary oom message irqchip/gic-v3-its: Remove unnecessary oom message irqchip/gic-v2m: Remove unnecessary oom message irqchip/exynos-combiner: Remove unnecessary oom message irqchip: Bulk conversion to generic_handle_domain_irq() genirq: Move non-irqdomain handle_domain_irq() handling into ARM's handle_IRQ() genirq: Add generic_handle_domain_irq() helper irqchip/nvic: Convert from handle_IRQ() to handle_domain_irq() irqdesc: Fix __handle_domain_irq() comment genirq: Use irq_resolve_mapping() to implement __handle_domain_irq() and co irqdomain: Introduce irq_resolve_mapping() irqdomain: Protect the linear revmap with RCU irqdomain: Cache irq_data instead of a virq number in the revmap irqdomain: Use struct_size() helper when allocating irqdomain irqdomain: Make normal and nomap irqdomains exclusive powerpc: Move the use of irq_domain_add_nomap() behind a config option ... commit 62180152e0944e815ebbfd0ffd822d2b0e2cd8e7 Merge: 371fb85457c85 b22afcdf04c96 Author: Linus Torvalds Date: Tue Jun 29 12:23:02 2021 -0700 Merge tag 'smp-urgent-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug fix from Thomas Gleixner: "A fix for the CPU hotplug and cpusets interaction: cpusets delegate the hotplug work to a workqueue to prevent a lock order inversion vs. the CPU hotplug lock. The work is not flushed before the hotplug operation returns which creates user visible inconsistent state. Prevent this by flushing the work after dropping CPU hotplug lock and before releasing the outer mutex which serializes the CPU hotplug related sysfs interface operations" * tag 'smp-urgent-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Cure the cpusets trainwreck commit 371fb85457c857eeac1611d3661ee8e637f6548c Merge: e563592c3e429 130708331bc6b Author: Linus Torvalds Date: Tue Jun 29 12:21:21 2021 -0700 Merge tag 'smp-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug cleanup from Thomas Gleixner: "A simple cleanup for the CPU hotplug code to avoid per_cpu_ptr() reevaluation" * tag 'smp-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Simplify access to percpu cpuhp_state commit e563592c3e4296780e5a184a917b8b86e126f0b3 Merge: b694011a4aec3 94f2be50badfa Author: Linus Torvalds Date: Tue Jun 29 12:07:18 2021 -0700 Merge tag 'printk-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Add %pt[RT]s modifier to vsprintf(). It overrides ISO 8601 separator by using ' ' (space). It produces "YYYY-mm-dd HH:MM:SS" instead of "YYYY-mm-ddTHH:MM:SS". - Correctly parse long row of numbers by sscanf() when using the field width. Add extensive sscanf() selftest. - Generalize re-entrant CPU lock that has already been used to serialize dump_stack() output. It is part of the ongoing printk rework. It will allow to remove the obsoleted printk_safe buffers and introduce atomic consoles. - Some code clean up and sparse warning fixes. * tag 'printk-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: fix cpu lock ordering lib/dump_stack: move cpu lock to printk.c printk: Remove trailing semicolon in macros random32: Fix implicit truncation warning in prandom_seed_state() lib: test_scanf: Remove pointless use of type_min() with unsigned types selftests: lib: Add wrapper script for test_scanf lib: test_scanf: Add tests for sscanf number conversion lib: vsprintf: Fix handling of number field widths in vsscanf lib: vsprintf: scanf: Negative number must have field width > 1 usb: host: xhci-tegra: Switch to use %ptTs nilfs2: Switch to use %ptTs kdb: Switch to use %ptTs lib/vsprintf: Allow to override ISO 8601 date and time separator commit 3f8ad50a9e43b6a59070e6c9c5eec79626f81095 Author: Eric Dumazet Date: Tue Jun 29 06:53:14 2021 -0700 tcp: change ICSK_CA_PRIV_SIZE definition Instead of a magic number (13 currently) and having to change it every other year, use sizeof_field() macro. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 6706721d82f86e9360c3ad5339fe3da5e0988a51 Author: Eric Dumazet Date: Tue Jun 29 06:52:13 2021 -0700 tcp_yeah: check struct yeah size at compile time Compiler can perform the sanity check instead of waiting to load the module and crash the host. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ecd89c02da85f724a2d24bc5a7e28043cc24b5d7 Author: Dan Carpenter Date: Tue Jun 29 11:25:13 2021 +0300 gve: DQO: Fix off by one in gve_rx_dqo() The rx->dqo.buf_states[] array is allocated in gve_rx_alloc_ring_dqo() and it has rx->dqo.num_buf_states so this > needs to >= to prevent an out of bounds access. Fixes: 9b8dd5e5ea48 ("gve: DQO: Add RX path") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 66f1546dfd7debe50fc056a84b97f2a56c2d769d Merge: b03cfe6fdee4c 1dd53a61488d3 Author: David S. Miller Date: Tue Jun 29 11:34:48 2021 -0700 Merge branch 'stmmac-phy-wol' Ling Pei Lee says: ==================== tmmac: Add option to enable PHY WOL with PMT enabled This patchset main objective is to provide an option to enable PHY WoL even the PMT is enabled by default in the HW features. The current stmmac driver WOL implementation will enable MAC WOL if MAC HW PMT feature is on. Else, the driver will check for PHY WOL support. Intel EHL mgbe are designed to wake up through PHY WOL although the HW PMT is enabled.Hence, introduced use_phy_wol platform data to provide this PHY WOL option. Set use_phy_wol will disable the plat->pmt which currently used to determine the system to wake up by MAC WOL or PHY WOL. This WOL patchset includes of setting the device power state to D3hot. This is because the EHL PSE will need to PSE mgbe to be in D3 state in order for the PSE to goes into suspend mode. Change Log: V2: Drop Patch #3 net: stmmac: Reconfigure the PHY WOL settings in stmmac_resume(). ==================== commit 1dd53a61488d3fd916967fa334e95866637b0b2a Author: Voon Weifeng Date: Tue Jun 29 11:08:59 2021 +0800 stmmac: intel: set PCI_D3hot in suspend During suspend, set the Intel mgbe to D3hot state to save power consumption. Signed-off-by: Voon Weifeng Signed-off-by: Ling Pei Lee Signed-off-by: David S. Miller commit 945beb7556334166900508fab7e4f50fcd233593 Author: Ling Pei Lee Date: Tue Jun 29 11:08:58 2021 +0800 stmmac: intel: Enable PHY WOL option in EHL Enable PHY Wake On LAN in Intel EHL Intel platform. PHY Wake on LAN option is enabled due to Intel EHL Intel platform is designed for PHY Wake On LAN but not MAC Wake On LAN. Signed-off-by: Ling Pei Lee Signed-off-by: David S. Miller commit 5a9b876e9d76810536bac70c78d961198612919c Author: Ling Pei Lee Date: Tue Jun 29 11:08:57 2021 +0800 net: stmmac: option to enable PHY WOL with PMT enabled The current stmmac driver WOL implementation will enable MAC WOL if MAC HW PMT feature is on. Else, the driver will check for PHY WOL support. There is another case where MAC HW PMT is enabled but the platform still goes for the PHY WOL option. E.g, Intel platform are designed for PHY WOL but not MAC WOL although HW MAC PMT features are enabled. Introduce use_phy_wol platform data to select PHY WOL instead of depending on HW PMT features. Set use_phy_wol will disable the plat->pmt which currently used to determine the system to wake up by MAC WOL or PHY WOL. Signed-off-by: Ling Pei Lee Signed-off-by: David S. Miller commit b03cfe6fdee4cb85c4b04502f0adb3ce08ac03ba Merge: 8602e40fc8132 78ecc8903de2a Author: David S. Miller Date: Tue Jun 29 11:31:57 2021 -0700 Merge branch 'ndo_dflt_fdb-print' Vladimir Oltean says: ==================== Trivial print improvements in ndo_dflt_fdb_{add,del} These are some changes brought to the informational messages printed in the default .ndo_fdb_add and .ndo_fdb_del method implementations. ==================== Signed-off-by: David S. Miller commit 78ecc8903de2adf0387cbf06e5befe29c23f2739 Author: Vladimir Oltean Date: Tue Jun 29 03:29:26 2021 +0300 net: say "local" instead of "static" addresses in ndo_dflt_fdb_{add,del} "Static" is a loaded word, and probably not what the author meant when the code was written. In particular, this looks weird: $ bridge fdb add dev swp0 00:01:02:03:04:05 local # totally fine, but $ bridge fdb add dev swp0 00:01:02:03:04:05 static [ 2020.708298] swp0: FDB only supports static addresses # hmm what? By looking at the implementation which uses dev_uc_add/dev_uc_del it is absolutely clear that only local addresses are supported, and the proper Network Unreachability Detection state is being used for this purpose (user space indeed sets NUD_PERMANENT when local addresses are meant). So it is just the message that is wrong, fix it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 23ac0b421674fba943dd131e66b81ed7f3fb3d1d Author: Vladimir Oltean Date: Tue Jun 29 03:29:25 2021 +0300 net: use netdev_info in ndo_dflt_fdb_{add,del} Use the more modern printk helper for network interfaces, which also contains information about the associated struct device, and results in overall shorter line lengths compared to printing an open-coded dev->name. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8602e40fc8132383298f304ae060d80f210be23c Author: Jonathan Lemon Date: Mon Jun 28 11:25:33 2021 -0700 ptp: Set lookup cookie when creating a PTP PPS source. When creating a PTP device, the configuration block allows creation of an associated PPS device. However, there isn't any way to associate the two devices after creation. Set the PPS cookie, so pps_lookup_dev(ptp) performs correctly. Signed-off-by: Jonathan Lemon Signed-off-by: David S. Miller commit c79fa61c94f7a7aa7a185509fca1e1ae5c44ab23 Merge: 7f4e5c5b8cb00 e6a3e4434000d Author: David S. Miller Date: Tue Jun 29 11:28:21 2021 -0700 Merge branch 'inet-sk_error-tracers' Alexander Aring says: ==================== net: sock: add tracers for inet socket errors this patch series introduce tracers for sk_error_report socket callback calls. The use-case is that a user space application can monitor them and making an own heuristic about bad peer connections even over a socket lifetime. To make a specific example it could be use in the Linux cluster world to fence a "bad" behaving node. For now it's okay to only trace inet sockets. Other socket families can introduce their own tracers easily. Example output with trace-cmd: -0 [003] 201.799437: inet_sk_error_report: family=AF_INET protocol=IPPROTO_TCP sport=21064 dport=38941 saddr=192.168.122.57 daddr=192.168.122.251 saddrv6=::ffff:192.168.122.57 daddrv6=::ffff:192.168.122.251 error=104 - Alex changes since v2: - change "sk.sk_error_report(&ipc->sk);" to "sk_error_report(&ipc->sk);" in net/qrtr/qrtr.c ==================== Signed-off-by: David S. Miller commit e6a3e4434000de5c36d606e5b5da5f7ba49444bd Author: Alexander Aring Date: Sun Jun 27 18:48:22 2021 -0400 net: sock: add trace for socket errors This patch will add tracers to trace inet socket errors only. A user space monitor application can track connection errors indepedent from socket lifetime and do additional handling. For example a cluster manager can fence a node if errors occurs in a specific heuristic. Signed-off-by: Alexander Aring Signed-off-by: David S. Miller commit e3ae2365efc14269170a6326477e669332271ab3 Author: Alexander Aring Date: Sun Jun 27 18:48:21 2021 -0400 net: sock: introduce sk_error_report This patch introduces a function wrapper to call the sk_error_report callback. That will prepare to add additional handling whenever sk_error_report is called, for example to trace socket errors. Signed-off-by: Alexander Aring Signed-off-by: David S. Miller commit b694011a4aec3e8df98bc59fdb78e018b09de79d Merge: c54b245d01185 7d815f4afa87f Author: Linus Torvalds Date: Tue Jun 29 11:21:35 2021 -0700 Merge tag 'hyperv-next-signed-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: "Just a few minor enhancement patches and bug fixes" * tag 'hyperv-next-signed-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: PCI: hv: Add check for hyperv_initialized in init_hv_pci_drv() Drivers: hv: Move Hyper-V extended capability check to arch neutral code drivers: hv: Fix missing error code in vmbus_connect() x86/hyperv: fix logical processor creation hv_utils: Fix passing zero to 'PTR_ERR' warning scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer hv_balloon: Remove redundant assignment to region_start commit 0ed950d1f28142ccd9a9453c60df87853530d778 Author: Naoya Horiguchi Date: Mon Jun 28 19:43:17 2021 -0700 mm,hwpoison: make get_hwpoison_page() call get_any_page() __get_hwpoison_page() could fail to grab refcount by some race condition, so it's helpful if we can handle it by retrying. We already have retry logic, so make get_hwpoison_page() call get_any_page() when called from memory_failure(). As a result, get_hwpoison_page() can return negative values (i.e. error code), so some callers are also changed to handle error cases. soft_offline_page() does nothing for -EBUSY because that's enough and users in userspace can easily handle it. unpoison_memory() is also unchanged because it's broken and need thorough fixes (will be done later). Link: https://lkml.kernel.org/r/20210603233632.2964832-3-nao.horiguchi@gmail.com Signed-off-by: Naoya Horiguchi Cc: Oscar Salvador Cc: Muchun Song Cc: Mike Kravetz Cc: Michal Hocko Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3f5d80ea401ac857f2910e28b15f35b2cf902f4 Author: Naoya Horiguchi Date: Mon Jun 28 19:43:14 2021 -0700 mm,hwpoison: send SIGBUS with error virutal address Now an action required MCE in already hwpoisoned address surely sends a SIGBUS to current process, but the SIGBUS doesn't convey error virtual address. That's not optimal for hwpoison-aware applications. To fix the issue, make memory_failure() call kill_accessing_process(), that does pagetable walk to find the error virtual address. It could find multiple virtual addresses for the same error page, and it seems hard to tell which virtual address is correct one. But that's rare and sending incorrect virtual address could be better than no address. So let's report the first found virtual address for now. [naoya.horiguchi@nec.com: fix walk_page_range() return] Link: https://lkml.kernel.org/r/20210603051055.GA244241@hori.linux.bs1.fc.nec.co.jp Link: https://lkml.kernel.org/r/20210521030156.2612074-4-nao.horiguchi@gmail.com Signed-off-by: Naoya Horiguchi Cc: Tony Luck Cc: Aili Yao Cc: Oscar Salvador Cc: David Hildenbrand Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Jue Wang Cc: Borislav Petkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 203c06eef579c670b8eb3a24108b9837bf9b7737 Author: Mel Gorman Date: Mon Jun 28 19:43:11 2021 -0700 mm/page_alloc: split pcp->high across all online CPUs for cpuless nodes Dave Hansen reported the following about Feng Tang's tests on a machine with persistent memory onlined as a DRAM-like device. Feng Tang tossed these on a "Cascade Lake" system with 96 threads and ~512G of persistent memory and 128G of DRAM. The PMEM is in "volatile use" mode and being managed via the buddy just like the normal RAM. The PMEM zones are big ones: present 65011712 = 248 G high 134595 = 525 M The PMEM nodes, of course, don't have any CPUs in them. With your series, the pcp->high value per-cpu is 69584 pages or about 270MB per CPU. Scaled up by the 96 CPU threads, that's ~26GB of worst-case memory in the pcps per zone, or roughly 10% of the size of the zone. This should not cause a problem as such although it could trigger reclaim due to pages being stored on per-cpu lists for CPUs remote to a node. It is not possible to treat cpuless nodes exactly the same as normal nodes but the worst-case scenario can be mitigated by splitting pcp->high across all online CPUs for cpuless memory nodes. Link: https://lkml.kernel.org/r/20210616110743.GK30378@techsingularity.net Suggested-by: Dave Hansen Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Dave Hansen Cc: Hillf Danton Cc: Michal Hocko Cc: "Tang, Feng" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44042b4498728f4376e84bae1ac8016d146d850b Author: Mel Gorman Date: Mon Jun 28 19:43:08 2021 -0700 mm/page_alloc: allow high-order pages to be stored on the per-cpu lists The per-cpu page allocator (PCP) only stores order-0 pages. This means that all THP and "cheap" high-order allocations including SLUB contends on the zone->lock. This patch extends the PCP allocator to store THP and "cheap" high-order pages. Note that struct per_cpu_pages increases in size to 256 bytes (4 cache lines) on x86-64. Note that this is not necessarily a universal performance win because of how it is implemented. High-order pages can cause pcp->high to be exceeded prematurely for lower-orders so for example, a large number of THP pages being freed could release order-0 pages from the PCP lists. Hence, much depends on the allocation/free pattern as observed by a single CPU to determine if caching helps or hurts a particular workload. That said, basic performance testing passed. The following is a netperf UDP_STREAM test which hits the relevant patches as some of the network allocations are high-order. netperf-udp 5.13.0-rc2 5.13.0-rc2 mm-pcpburst-v3r4 mm-pcphighorder-v1r7 Hmean send-64 261.46 ( 0.00%) 266.30 * 1.85%* Hmean send-128 516.35 ( 0.00%) 536.78 * 3.96%* Hmean send-256 1014.13 ( 0.00%) 1034.63 * 2.02%* Hmean send-1024 3907.65 ( 0.00%) 4046.11 * 3.54%* Hmean send-2048 7492.93 ( 0.00%) 7754.85 * 3.50%* Hmean send-3312 11410.04 ( 0.00%) 11772.32 * 3.18%* Hmean send-4096 13521.95 ( 0.00%) 13912.34 * 2.89%* Hmean send-8192 21660.50 ( 0.00%) 22730.72 * 4.94%* Hmean send-16384 31902.32 ( 0.00%) 32637.50 * 2.30%* Functionally, a patch like this is necessary to make bulk allocation of high-order pages work with similar performance to order-0 bulk allocations. The bulk allocator is not updated in this series as it would have to be determined by bulk allocation users how they want to track the order of pages allocated with the bulk allocator. Link: https://lkml.kernel.org/r/20210611135753.GC30378@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Zi Yan Cc: Dave Hansen Cc: Michal Hocko Cc: Jesper Dangaard Brouer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43b02ba93b25b1caff7a3457fc5d005485e78da5 Author: Mike Rapoport Date: Mon Jun 28 19:43:05 2021 -0700 mm: replace CONFIG_FLAT_NODE_MEM_MAP with CONFIG_FLATMEM After removal of the DISCONTIGMEM memory model the FLAT_NODE_MEM_MAP configuration option is equivalent to FLATMEM. Drop CONFIG_FLAT_NODE_MEM_MAP and use CONFIG_FLATMEM instead. Link: https://lkml.kernel.org/r/20210608091316.3622-10-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9ee6cf5c60ed1070e786e53665f9b2f23f2bd11 Author: Mike Rapoport Date: Mon Jun 28 19:43:01 2021 -0700 mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA configuration options are equivalent. Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. Done with $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ $(git grep -wl NEED_MULTIPLE_NODES) with manual tweaks afterwards. [rppt@linux.ibm.com: fix arm boot crash] Link: https://lkml.kernel.org/r/YMj9vHhHOiCVN4BF@linux.ibm.com Link: https://lkml.kernel.org/r/20210608091316.3622-9-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48d9f3355a8eaa79b00472929b517df497fc6d5f Author: Mike Rapoport Date: Mon Jun 28 19:42:58 2021 -0700 docs: remove description of DISCONTIGMEM Remove description of DISCONTIGMEM from the "Memory Models" document and update VM sysctl description so that it won't mention DISCONIGMEM. Link: https://lkml.kernel.org/r/20210608091316.3622-8-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Reviewed-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3c251ab95b69f3dc189c4657baeac1b4c050789 Author: Mike Rapoport Date: Mon Jun 28 19:42:55 2021 -0700 arch, mm: remove stale mentions of DISCONIGMEM There are several places that mention DISCONIGMEM in comments or have stale code guarded by CONFIG_DISCONTIGMEM. Remove the dead code and update the comments. Link: https://lkml.kernel.org/r/20210608091316.3622-7-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Reviewed-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb1c50d3967f69f413b333713c2718d48d1ab7ea Author: Mike Rapoport Date: Mon Jun 28 19:42:52 2021 -0700 mm: remove CONFIG_DISCONTIGMEM There are no architectures that support DISCONTIGMEM left. Remove the configuration option and the dead code it was guarding in the generic memory management code. Link: https://lkml.kernel.org/r/20210608091316.3622-6-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ab06e10990c3a04e00318c5ca93048c0f53a0a7 Author: Mike Rapoport Date: Mon Jun 28 19:42:49 2021 -0700 m68k: remove support for DISCONTIGMEM DISCONTIGMEM was replaced by FLATMEM with freeing of the unused memory map in v5.11. Remove the support for DISCONTIGMEM entirely. Link: https://lkml.kernel.org/r/20210608091316.3622-5-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b793b442051550b6cc694213e276587e01bddcb Author: Mike Rapoport Date: Mon Jun 28 19:42:46 2021 -0700 arc: remove support for DISCONTIGMEM DISCONTIGMEM was replaced by FLATMEM with freeing of the unused memory map in v5.11. Remove the support for DISCONTIGMEM entirely. Link: https://lkml.kernel.org/r/20210608091316.3622-4-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Vineet Gupta Acked-by: Arnd Bergmann Acked-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7793e53901b31a06db534679e77c0cdeab260a2 Author: Mike Rapoport Date: Mon Jun 28 19:42:43 2021 -0700 arc: update comment about HIGHMEM implementation Arc does not use DISCONTIGMEM to implement high memory, update the comment describing how high memory works to reflect this. Link: https://lkml.kernel.org/r/20210608091316.3622-3-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Vineet Gupta Acked-by: Arnd Bergmann Reviewed-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fdb7d9b7acd02f573ae4fc0c7772f6b5c6b1bad0 Author: Mike Rapoport Date: Mon Jun 28 19:42:39 2021 -0700 alpha: remove DISCONTIGMEM and NUMA Patch series "Remove DISCONTIGMEM memory model", v3. SPARSEMEM memory model was supposed to entirely replace DISCONTIGMEM a (long) while ago. The last architectures that used DISCONTIGMEM were updated to use other memory models in v5.11 and it is about the time to entirely remove DISCONTIGMEM from the kernel. This set removes DISCONTIGMEM from alpha, arc and m68k, simplifies memory model selection in mm/Kconfig and replaces usage of redundant CONFIG_NEED_MULTIPLE_NODES and CONFIG_FLAT_NODE_MEM_MAP with CONFIG_NUMA and CONFIG_FLATMEM respectively. I've also removed NUMA support on alpha that was BROKEN for more than 15 years. There were also minor updates all over arch/ to remove mentions of DISCONTIGMEM in comments and #ifdefs. This patch (of 9): NUMA is marked broken on alpha for more than 15 years and DISCONTIGMEM was replaced with SPARSEMEM in v5.11. Remove both NUMA and DISCONTIGMEM support from alpha. Link: https://lkml.kernel.org/r/20210608091316.3622-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20210608091316.3622-2-rppt@kernel.org Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: David Hildenbrand Cc: Geert Uytterhoeven Cc: Ivan Kokshaysky Cc: Jonathan Corbet Cc: Matt Turner Cc: Richard Henderson Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21d02f8f8464e27434f477c73431075197a9f72f Author: Mel Gorman Date: Mon Jun 28 19:42:36 2021 -0700 mm/page_alloc: move free_the_page Patch series "Allow high order pages to be stored on PCP", v2. The per-cpu page allocator (PCP) only handles order-0 pages. With the series "Use local_lock for pcp protection and reduce stat overhead" and "Calculate pcp->high based on zone sizes and active CPUs", it's now feasible to store high-order pages on PCP lists. This small series allows PCP to store "cheap" orders where cheap is determined by PAGE_ALLOC_COSTLY_ORDER and THP-sized allocations. This patch (of 2): In the next page, free_compount_page is going to use the common helper free_the_page. This patch moves the definition to ease review. No functional change. Link: https://lkml.kernel.org/r/20210603142220.10851-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20210603142220.10851-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Dave Hansen Cc: Jesper Dangaard Brouer Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7ec104458e00d27a190348ac3a513f3df3699a4 Author: Liu Shixin Date: Mon Jun 28 19:42:33 2021 -0700 mm/page_alloc: fix counting of managed_pages commit f63661566fad ("mm/page_alloc.c: clear out zone->lowmem_reserve[] if the zone is empty") clears out zone->lowmem_reserve[] if zone is empty. But when zone is not empty and sysctl_lowmem_reserve_ratio[i] is set to zero, zone_managed_pages(zone) is not counted in the managed_pages either. This is inconsistent with the description of lowmem_reserve, so fix it. Link: https://lkml.kernel.org/r/20210527125707.3760259-1-liushixin2@huawei.com Fixes: f63661566fad ("mm/page_alloc.c: clear out zone->lowmem_reserve[] if the zone is empty") Signed-off-by: Liu Shixin Reported-by: yangerkun Reviewed-by: Baoquan He Acked-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e47aa90568de326625b19d7bc872f8d70b0820b0 Author: Dong Aisheng Date: Mon Jun 28 19:42:30 2021 -0700 mm/page_alloc: improve memmap_pages dbg msg Make debug message more accurate. Link: https://lkml.kernel.org/r/20210531091908.1738465-6-aisheng.dong@nxp.com Signed-off-by: Dong Aisheng Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 777c00f5ede4fcb9ae49a2a957bec26d4d8f4c29 Author: Dong Aisheng Date: Mon Jun 28 19:42:27 2021 -0700 mm: drop SECTION_SHIFT in code comments Actually SECTIONS_SHIFT is used in the kernel code, so the code comments is strictly incorrect. And since commit bbeae5b05ef6 ("mm: move page flags layout to separate header"), SECTIONS_SHIFT definition has been moved to include/linux/page-flags-layout.h, since code itself looks quite straighforward, instead of moving the code comment into the new place as well, we just simply remove it. This also fixed a checkpatch complain derived from the original code: WARNING: please, no space before tabs + * SECTIONS_SHIFT ^I^I#bits space required to store a section #$ Link: https://lkml.kernel.org/r/20210531091908.1738465-2-aisheng.dong@nxp.com Signed-off-by: Dong Aisheng Suggested-by: Yu Zhao Reviewed-by: Yu Zhao Cc: Andrey Konovalov Cc: Catalin Marinas Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74f44822097c665041010994502b5971d6cd9f04 Author: Mel Gorman Date: Mon Jun 28 19:42:24 2021 -0700 mm/page_alloc: introduce vm.percpu_pagelist_high_fraction This introduces a new sysctl vm.percpu_pagelist_high_fraction. It is similar to the old vm.percpu_pagelist_fraction. The old sysctl increased both pcp->batch and pcp->high with the higher pcp->high potentially reducing zone->lock contention. However, the higher pcp->batch value also potentially increased allocation latency while the PCP was refilled. This sysctl only adjusts pcp->high so that zone->lock contention is potentially reduced but allocation latency during a PCP refill remains the same. # grep -E "high:|batch" /proc/zoneinfo | tail -2 high: 649 batch: 63 # sysctl vm.percpu_pagelist_high_fraction=8 # grep -E "high:|batch" /proc/zoneinfo | tail -2 high: 35071 batch: 63 # sysctl vm.percpu_pagelist_high_fraction=64 high: 4383 batch: 63 # sysctl vm.percpu_pagelist_high_fraction=0 high: 649 batch: 63 [mgorman@techsingularity.net: fix documentation] Link: https://lkml.kernel.org/r/20210528151010.GQ30378@techsingularity.net Link: https://lkml.kernel.org/r/20210525080119.5455-7-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Dave Hansen Acked-by: Vlastimil Babka Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c49c2c47dab6b8d45022b3fabf0642a0e62e3109 Author: Mel Gorman Date: Mon Jun 28 19:42:21 2021 -0700 mm/page_alloc: limit the number of pages on PCP lists when reclaim is active When kswapd is active then direct reclaim is potentially active. In either case, it is possible that a zone would be balanced if pages were not trapped on PCP lists. Instead of draining remote pages, simply limit the size of the PCP lists while kswapd is active. Link: https://lkml.kernel.org/r/20210525080119.5455-6-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Dave Hansen Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b12e7e97938424de2bb1b95ba0bd6a49bad39f9 Author: Mel Gorman Date: Mon Jun 28 19:42:18 2021 -0700 mm/page_alloc: scale the number of pages that are batch freed When a task is freeing a large number of order-0 pages, it may acquire the zone->lock multiple times freeing pages in batches. This may unnecessarily contend on the zone lock when freeing very large number of pages. This patch adapts the size of the batch based on the recent pattern to scale the batch size for subsequent frees. As the machines I used were not large enough to test this are not large enough to illustrate a problem, a debugging patch shows patterns like the following (slightly editted for clarity) Baseline vanilla kernel time-unmap-14426 [...] free_pcppages_bulk: free 63 count 378 high 378 time-unmap-14426 [...] free_pcppages_bulk: free 63 count 378 high 378 time-unmap-14426 [...] free_pcppages_bulk: free 63 count 378 high 378 time-unmap-14426 [...] free_pcppages_bulk: free 63 count 378 high 378 time-unmap-14426 [...] free_pcppages_bulk: free 63 count 378 high 378 With patches time-unmap-7724 [...] free_pcppages_bulk: free 126 count 814 high 814 time-unmap-7724 [...] free_pcppages_bulk: free 252 count 814 high 814 time-unmap-7724 [...] free_pcppages_bulk: free 504 count 814 high 814 time-unmap-7724 [...] free_pcppages_bulk: free 751 count 814 high 814 time-unmap-7724 [...] free_pcppages_bulk: free 751 count 814 high 814 Link: https://lkml.kernel.org/r/20210525080119.5455-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Dave Hansen Acked-by: Vlastimil Babka Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04f8cfeaed0849e702278378bce3867577ca45fb Author: Mel Gorman Date: Mon Jun 28 19:42:15 2021 -0700 mm/page_alloc: adjust pcp->high after CPU hotplug events The PCP high watermark is based on the number of online CPUs so the watermarks must be adjusted during CPU hotplug. At the time of hot-remove, the number of online CPUs is already adjusted but during hot-add, a delta needs to be applied to update PCP to the correct value. After this patch is applied, the high watermarks are adjusted correctly. # grep high: /proc/zoneinfo | tail -1 high: 649 # echo 0 > /sys/devices/system/cpu/cpu4/online # grep high: /proc/zoneinfo | tail -1 high: 664 # echo 1 > /sys/devices/system/cpu/cpu4/online # grep high: /proc/zoneinfo | tail -1 high: 649 Link: https://lkml.kernel.org/r/20210525080119.5455-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Dave Hansen Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b92ca18e8ca596f4f3d80c1fe833bc57a1b2458c Author: Mel Gorman Date: Mon Jun 28 19:42:12 2021 -0700 mm/page_alloc: disassociate the pcp->high from pcp->batch The pcp high watermark is based on the batch size but there is no relationship between them other than it is convenient to use early in boot. This patch takes the first step and bases pcp->high on the zone low watermark split across the number of CPUs local to a zone while the batch size remains the same to avoid increasing allocation latencies. The intent behind the default pcp->high is "set the number of PCP pages such that if they are all full that background reclaim is not started prematurely". Note that in this patch the pcp->high values are adjusted after memory hotplug events, min_free_kbytes adjustments and watermark scale factor adjustments but not CPU hotplug events which is handled later in the series. On a test KVM instance; Before grep -E "high:|batch" /proc/zoneinfo | tail -2 high: 378 batch: 63 After grep -E "high:|batch" /proc/zoneinfo | tail -2 high: 649 batch: 63 [mgorman@techsingularity.net: fix __setup_per_zone_wmarks for parallel memory hotplug] Link: https://lkml.kernel.org/r/20210528105925.GN30378@techsingularity.net Link: https://lkml.kernel.org/r/20210525080119.5455-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Dave Hansen Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbbecb35a41cb5c63ef78e14cc8b95fa9130bc1a Author: Mel Gorman Date: Mon Jun 28 19:42:09 2021 -0700 mm/page_alloc: delete vm.percpu_pagelist_fraction Patch series "Calculate pcp->high based on zone sizes and active CPUs", v2. The per-cpu page allocator (PCP) is meant to reduce contention on the zone lock but the sizing of batch and high is archaic and neither takes the zone size into account or the number of CPUs local to a zone. With larger zones and more CPUs per node, the contention is getting worse. Furthermore, the fact that vm.percpu_pagelist_fraction adjusts both batch and high values means that the sysctl can reduce zone lock contention but also increase allocation latencies. This series disassociates pcp->high from pcp->batch and then scales pcp->high based on the size of the local zone with limited impact to reclaim and accounting for active CPUs but leaves pcp->batch static. It also adapts the number of pages that can be on the pcp list based on recent freeing patterns. The motivation is partially to adjust to larger memory sizes but is also driven by the fact that large batches of page freeing via release_pages() often shows zone contention as a major part of the problem. Another is a bug report based on an older kernel where a multi-terabyte process can takes several minutes to exit. A workaround was to use vm.percpu_pagelist_fraction to increase the pcp->high value but testing indicated that a production workload could not use the same values because of an increase in allocation latencies. Unfortunately, I cannot reproduce this test case myself as the multi-terabyte machines are in active use but it should alleviate the problem. The series aims to address both and partially acts as a pre-requisite. pcp only works with order-0 which is useless for SLUB (when using high orders) and THP (unconditionally). To store high-order pages on PCP, the pcp->high values need to be increased first. This patch (of 6): The vm.percpu_pagelist_fraction is used to increase the batch and high limits for the per-cpu page allocator (PCP). The intent behind the sysctl is to reduce zone lock acquisition when allocating/freeing pages but it has a problem. While it can decrease contention, it can also increase latency on the allocation side due to unreasonably large batch sizes. This leads to games where an administrator adjusts percpu_pagelist_fraction on the fly to work around contention and allocation latency problems. This series aims to alleviate the problems with zone lock contention while avoiding the allocation-side latency problems. For the purposes of review, it's easier to remove this sysctl now and reintroduce a similar sysctl later in the series that deals only with pcp->high. Link: https://lkml.kernel.org/r/20210525080119.5455-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20210525080119.5455-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Dave Hansen Acked-by: Vlastimil Babka Cc: Hillf Danton Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 151e084af4946344fe0d021f4110b69edaac1e8d Author: Minchan Kim Date: Mon Jun 28 19:42:06 2021 -0700 mm: page_alloc: dump migrate-failed pages only at -EBUSY alloc_contig_dump_pages() aims for helping debugging page migration failure by elevated page refcount compared to expected_count. (for the detail, please look at migrate_page_move_mapping) However, -ENOMEM is just the case that system is under memory pressure state, not relevant with page refcount at all. Thus, the dumping page list is not helpful for the debugging point of view. Link: https://lkml.kernel.org/r/YKa2Wyo9xqIErpfa@google.com Signed-off-by: Minchan Kim Reviewed-by: David Hildenbrand Cc: Suren Baghdasaryan Cc: John Dias Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 902499937e3a82156dcb5069b6df27640480e204 Author: Mel Gorman Date: Mon Jun 28 19:42:03 2021 -0700 mm/page_alloc: update PGFREE outside the zone lock in __free_pages_ok VM events do not need explicit protection by disabling IRQs so update the counter with IRQs enabled in __free_pages_ok. Link: https://lkml.kernel.org/r/20210512095458.30632-10-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df1acc856923c0a65c28b588585449106c316b71 Author: Mel Gorman Date: Mon Jun 28 19:42:00 2021 -0700 mm/page_alloc: avoid conflating IRQs disabled with zone->lock Historically when freeing pages, free_one_page() assumed that callers had IRQs disabled and the zone->lock could be acquired with spin_lock(). This confuses the scope of what local_lock_irq is protecting and what zone->lock is protecting in free_unref_page_list in particular. This patch uses spin_lock_irqsave() for the zone->lock in free_one_page() instead of relying on callers to have disabled IRQs. free_unref_page_commit() is changed to only deal with PCP pages protected by the local lock. free_unref_page_list() then first frees isolated pages to the buddy lists with free_one_page() and frees the rest of the pages to the PCP via free_unref_page_commit(). The end result is that free_one_page() is no longer depending on side-effects of local_lock to be correct. Note that this may incur a performance penalty while memory hot-remove is running but that is not a common operation. [lkp@intel.com: Ensure CMA pages get addded to correct pcp list] Link: https://lkml.kernel.org/r/20210512095458.30632-9-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 56f0e661ea8c0178e80048df7166653a51ef2c3d Author: Mel Gorman Date: Mon Jun 28 19:41:57 2021 -0700 mm/page_alloc: explicitly acquire the zone lock in __free_pages_ok __free_pages_ok() disables IRQs before calling a common helper free_one_page() that acquires the zone lock. This is not safe according to Documentation/locking/locktypes.rst and in this context, IRQ disabling is not protecting a per_cpu_pages structure either or a local_lock would be used. This patch explicitly acquires the lock with spin_lock_irqsave instead of relying on a helper. This removes the last instance of local_irq_save() in page_alloc.c. Link: https://lkml.kernel.org/r/20210512095458.30632-8-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43c95bcc51e4e7f3e3cbce01515fe429a4cf12a7 Author: Mel Gorman Date: Mon Jun 28 19:41:54 2021 -0700 mm/page_alloc: reduce duration that IRQs are disabled for VM counters IRQs are left disabled for the zone and node VM event counters. This is unnecessary as the affected counters are allowed to race for preemmption and IRQs. This patch reduces the scope of IRQs being disabled via local_[lock|unlock]_irq on !PREEMPT_RT kernels. One __mod_zone_freepage_state is still called with IRQs disabled. While this could be moved out, it's not free on all architectures as some require IRQs to be disabled for mod_zone_page_state on !PREEMPT_RT kernels. Link: https://lkml.kernel.org/r/20210512095458.30632-7-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e23060b2d0b7eebf37b3b6043ea68da0ebc0646 Author: Mel Gorman Date: Mon Jun 28 19:41:50 2021 -0700 mm/page_alloc: batch the accounting updates in the bulk allocator Now that the zone_statistics are simple counters that do not require special protection, the bulk allocator accounting updates can be batch updated without adding too much complexity with protected RMW updates or using xchg. Link: https://lkml.kernel.org/r/20210512095458.30632-6-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ac44a346a50988131db124a7e4bb99d3ec71706 Author: Mel Gorman Date: Mon Jun 28 19:41:47 2021 -0700 mm/vmstat: inline NUMA event counter updates __count_numa_event is small enough to be treated similarly to __count_vm_event so inline it. Link: https://lkml.kernel.org/r/20210512095458.30632-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f19298b9516c1a031b34b4147773457e3efe743b Author: Mel Gorman Date: Mon Jun 28 19:41:44 2021 -0700 mm/vmstat: convert NUMA statistics to basic NUMA counters NUMA statistics are maintained on the zone level for hits, misses, foreign etc but nothing relies on them being perfectly accurate for functional correctness. The counters are used by userspace to get a general overview of a workloads NUMA behaviour but the page allocator incurs a high cost to maintain perfect accuracy similar to what is required for a vmstat like NR_FREE_PAGES. There even is a sysctl vm.numa_stat to allow userspace to turn off the collection of NUMA statistics like NUMA_HIT. This patch converts NUMA_HIT and friends to be NUMA events with similar accuracy to VM events. There is a possibility that slight errors will be introduced but the overall trend as seen by userspace will be similar. The counters are no longer updated from vmstat_refresh context as it is unnecessary overhead for counters that may never be read by userspace. Note that counters could be maintained at the node level to save space but it would have a user-visible impact due to /proc/zoneinfo. [lkp@intel.com: Fix misplaced closing brace for !CONFIG_NUMA] Link: https://lkml.kernel.org/r/20210512095458.30632-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dbbee9d5cd83f9d0a29639e260516907ceb2ac3d Author: Mel Gorman Date: Mon Jun 28 19:41:41 2021 -0700 mm/page_alloc: convert per-cpu list protection to local_lock There is a lack of clarity of what exactly local_irq_save/local_irq_restore protects in page_alloc.c . It conflates the protection of per-cpu page allocation structures with per-cpu vmstat deltas. This patch protects the PCP structure using local_lock which for most configurations is identical to IRQ enabling/disabling. The scope of the lock is still wider than it should be but this is decreased later. It is possible for the local_lock to be embedded safely within struct per_cpu_pages but it adds complexity to free_unref_page_list. [akpm@linux-foundation.org: coding style fixes] [mgorman@techsingularity.net: work around a pahole limitation with zero-sized struct pagesets] Link: https://lkml.kernel.org/r/20210526080741.GW30378@techsingularity.net [lkp@intel.com: Make pagesets static] Link: https://lkml.kernel.org/r/20210512095458.30632-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Michal Hocko Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28f836b6777b6f42dce068a40d83a891deaaca37 Author: Mel Gorman Date: Mon Jun 28 19:41:38 2021 -0700 mm/page_alloc: split per cpu page lists and zone stats The PCP (per-cpu page allocator in page_alloc.c) shares locking requirements with vmstat and the zone lock which is inconvenient and causes some issues. For example, the PCP list and vmstat share the same per-cpu space meaning that it's possible that vmstat updates dirty cache lines holding per-cpu lists across CPUs unless padding is used. Second, PREEMPT_RT does not want to disable IRQs for too long in the page allocator. This series splits the locking requirements and uses locks types more suitable for PREEMPT_RT, reduces the time when special locking is required for stats and reduces the time when IRQs need to be disabled on !PREEMPT_RT kernels. Why local_lock? PREEMPT_RT considers the following sequence to be unsafe as documented in Documentation/locking/locktypes.rst local_irq_disable(); spin_lock(&lock); The pcp allocator has this sequence for rmqueue_pcplist (local_irq_save) -> __rmqueue_pcplist -> rmqueue_bulk (spin_lock). While it's possible to separate this out, it generally means there are points where we enable IRQs and reenable them again immediately. To prevent a migration and the per-cpu pointer going stale, migrate_disable is also needed. That is a custom lock that is similar, but worse, than local_lock. Furthermore, on PREEMPT_RT, it's undesirable to leave IRQs disabled for too long. By converting to local_lock which disables migration on PREEMPT_RT, the locking requirements can be separated and start moving the protections for PCP, stats and the zone lock to PREEMPT_RT-safe equivalent locking. As a bonus, local_lock also means that PROVE_LOCKING does something useful. After that, it's obvious that zone_statistics incurs too much overhead and leaves IRQs disabled for longer than necessary on !PREEMPT_RT kernels. zone_statistics uses perfectly accurate counters requiring IRQs be disabled for parallel RMW sequences when inaccurate ones like vm_events would do. The series makes the NUMA statistics (NUMA_HIT and friends) inaccurate counters that then require no special protection on !PREEMPT_RT. The bulk page allocator can then do stat updates in bulk with IRQs enabled which should improve the efficiency. Technically, this could have been done without the local_lock and vmstat conversion work and the order simply reflects the timing of when different series were implemented. Finally, there are places where we conflate IRQs being disabled for the PCP with the IRQ-safe zone spinlock. The remainder of the series reduces the scope of what is protected by disabled IRQs on !PREEMPT_RT kernels. By the end of the series, page_alloc.c does not call local_irq_save so the locking scope is a bit clearer. The one exception is that modifying NR_FREE_PAGES still happens in places where it's known the IRQs are disabled as it's harmless for PREEMPT_RT and would be expensive to split the locking there. No performance data is included because despite the overhead of the stats, it's within the noise for most workloads on !PREEMPT_RT. However, Jesper Dangaard Brouer ran a page allocation microbenchmark on a E5-1650 v4 @ 3.60GHz CPU on the first version of this series. Focusing on the array variant of the bulk page allocator reveals the following. (CPU: Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz) ARRAY variant: time_bulk_page_alloc_free_array: step=bulk size Baseline Patched 1 56.383 54.225 (+3.83%) 2 40.047 35.492 (+11.38%) 3 37.339 32.643 (+12.58%) 4 35.578 30.992 (+12.89%) 8 33.592 29.606 (+11.87%) 16 32.362 28.532 (+11.85%) 32 31.476 27.728 (+11.91%) 64 30.633 27.252 (+11.04%) 128 30.596 27.090 (+11.46%) While this is a positive outcome, the series is more likely to be interesting to the RT people in terms of getting parts of the PREEMPT_RT tree into mainline. This patch (of 9): The per-cpu page allocator lists and the per-cpu vmstat deltas are stored in the same struct per_cpu_pages even though vmstats have no direct impact on the per-cpu page lists. This is inconsistent because the vmstats for a node are stored on a dedicated structure. The bigger issue is that the per_cpu_pages structure is not cache-aligned and stat updates either cache conflict with adjacent per-cpu lists incurring a runtime cost or padding is required incurring a memory cost. This patch splits the per-cpu pagelists and the vmstat deltas into separate structures. It's mostly a mechanical conversion but some variable renaming is done to clearly distinguish the per-cpu pages structure (pcp) from the vmstats (pzstats). Superficially, this appears to increase the size of the per_cpu_pages structure but the movement of expire fills a structure hole so there is no impact overall. [mgorman@techsingularity.net: make it W=1 cleaner] Link: https://lkml.kernel.org/r/20210514144622.GA3735@techsingularity.net [mgorman@techsingularity.net: make it W=1 even cleaner] Link: https://lkml.kernel.org/r/20210516140705.GB3735@techsingularity.net [lkp@intel.com: check struct per_cpu_zonestat has a non-zero size] [vbabka@suse.cz: Init zone->per_cpu_zonestats properly] Link: https://lkml.kernel.org/r/20210512095458.30632-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20210512095458.30632-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Acked-by: Peter Zijlstra (Intel) Cc: Chuck Lever Cc: Jesper Dangaard Brouer Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Ingo Molnar Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0b8200d06ad6450c179407baa5f0f52f8cfcc97 Author: Andrii Nakryiko Date: Mon Jun 28 19:41:34 2021 -0700 kbuild: skip per-CPU BTF generation for pahole v1.18-v1.21 Commit "mm/page_alloc: convert per-cpu list protection to local_lock" will introduce a zero-sized per-CPU variable, which causes pahole to generate invalid BTF. Only pahole versions 1.18 through 1.21 are impacted, as before 1.18 pahole doesn't know anything about per-CPU variables, and 1.22 contains the proper fix for the issue. Luckily, pahole 1.18 got --skip_encoding_btf_vars option disabling BTF generation for per-CPU variables in anticipation of some unanticipated problems. So use this escape hatch to disable per-CPU var BTF info on those problematic pahole versions. Users relying on availability of per-CPU var BTFs would need to upgrade to pahole 1.22+, but everyone won't notice any regressions. Link: https://lkml.kernel.org/r/20210530002536.3193829-1-andrii@kernel.org Signed-off-by: Andrii Nakryiko Acked-by: Mel Gorman Cc: Arnaldo Carvalho de Melo Cc: Hao Luo Cc: Michal Suchanek Cc: Jiri Olsa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9660ecaa79ce5c068aa3138ca7e29a9402f284ed Author: Heiner Kallweit Date: Mon Jun 28 19:41:31 2021 -0700 mm/page_alloc: switch to pr_debug Having such debug messages in the dmesg log may confuse users. Therefore restrict debug output to cases where DEBUG is defined or dynamic debugging is enabled for the respective code piece. Link: https://lkml.kernel.org/r/976adb93-3041-ce63-48fc-55a6096a51c1@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1cfcee728391ece94a75e4b17fa87253d40c2185 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:28 2021 -0700 mm: optimise nth_page for contiguous memmap If the memmap is virtually contiguous (either because we're using a virtually mapped memmap or because we don't support a discontig memmap at all), then we can implement nth_page() by simple addition. Contrary to popular belief, the compiler is not able to optimise this itself for a vmemmap configuration. This reduces one example user (sg.c) by four instructions: struct page *page = nth_page(rsv_schp->pages[k], offset >> PAGE_SHIFT); before: 49 8b 45 70 mov 0x70(%r13),%rax 48 63 c9 movslq %ecx,%rcx 48 c1 eb 0c shr $0xc,%rbx 48 8b 04 c8 mov (%rax,%rcx,8),%rax 48 2b 05 00 00 00 00 sub 0x0(%rip),%rax R_X86_64_PC32 vmemmap_base-0x4 48 c1 f8 06 sar $0x6,%rax 48 01 d8 add %rbx,%rax 48 c1 e0 06 shl $0x6,%rax 48 03 05 00 00 00 00 add 0x0(%rip),%rax R_X86_64_PC32 vmemmap_base-0x4 after: 49 8b 45 70 mov 0x70(%r13),%rax 48 63 c9 movslq %ecx,%rcx 48 c1 eb 0c shr $0xc,%rbx 48 c1 e3 06 shl $0x6,%rbx 48 03 1c c8 add (%rax,%rcx,8),%rbx Link: https://lkml.kernel.org/r/20210413194625.1472345-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: Tejun Heo Cc: FUJITA Tomonori Cc: Douglas Gilbert Cc: Chris Wilson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f7dadf3958f882b393d3c4c60da232dbac66424 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:25 2021 -0700 mm: constify page_count and page_ref_count Now that compound_head() accepts a const struct page pointer, these two functions can be marked as not modifying the page pointer they are passed. Link: https://lkml.kernel.org/r/20210416231531.2521383-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca891f41c4c7921a03dfd0fa1faf324393724480 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:22 2021 -0700 mm: constify get_pfnblock_flags_mask and get_pfnblock_migratetype The struct page is not modified by these routines, so it can be marked const. Link: https://lkml.kernel.org/r/20210416231531.2521383-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f2317e34e2c7b97efd4600122115410795ebeea Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:19 2021 -0700 mm: make compound_head const-preserving If you pass a const pointer to compound_head(), you get a const pointer back; if you pass a mutable pointer, you get a mutable pointer back. Also remove an unnecessary forward definition of struct page; we're about to dereference page->compound_head, so it must already have been defined. Link: https://lkml.kernel.org/r/20210416231531.2521383-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8bf6f451bded5db7840b3b2932ef48be5dce6b38 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:16 2021 -0700 mm/page_owner: constify dump_page_owner dump_page_owner() only uses struct page to find the page_ext, and lookup_page_ext() already takes a const argument. Link: https://lkml.kernel.org/r/20210416231531.2521383-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be7c701fd42c2dd124ec5ce3493ec72e217738a8 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:13 2021 -0700 mm/debug: factor PagePoisoned out of __dump_page Move the PagePoisoned test into dump_page(). Skip the hex print for poisoned pages -- we know they're full of ffffffff. Move the reason printing from __dump_page() to dump_page(). Link: https://lkml.kernel.org/r/20210416231531.2521383-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 691d9497285a90346a67bfee5cac2007e5e18405 Author: Aaron Tomlin Date: Mon Jun 28 19:41:10 2021 -0700 mm/page_alloc: bail out on fatal signal during reclaim/compaction retry attempt A customer experienced a low-memory situation and decided to issue a SIGKILL (i.e. a fatal signal). Instead of promptly terminating as one would expect, the aforementioned task remained unresponsive. Further investigation indicated that the task was "stuck" in the reclaim/compaction retry loop. Now, it does not make sense to retry compaction when a fatal signal is pending. In the context of try_to_compact_pages(), indeed COMPACT_SKIPPED can be returned; albeit, not every zone, on the zone list, would be considered in the case a fatal signal is found to be pending. Yet, in should_compact_retry(), given the last known compaction result, each zone, on the zone list, can be considered/or checked (see compaction_zonelist_suitable()). For example, if a zone was found to succeed, then reclaim/compaction would be tried again (notwithstanding the above). This patch ensures that compaction is not needlessly retried irrespective of the last known compaction result e.g. if it was skipped, in the unlikely case a fatal signal is found pending. So, OOM is at least attempted. Link: https://lkml.kernel.org/r/20210520142901.3371299-1-atomlin@redhat.com Signed-off-by: Aaron Tomlin Reviewed-by: Vlastimil Babka Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2f07ec052ac1a720d6f1919e3dee7d73f04d495 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:41:07 2021 -0700 mm: make __dump_page static Patch series "Constify struct page arguments". While working on various solutions to the 32-bit struct page size regression, one of the problems I found was the networking stack expects to be able to pass const struct page pointers around, and the mm doesn't provide a lot of const-friendly functions to call. The root tangle of problems is that a lot of functions call VM_BUG_ON_PAGE(), which calls dump_page(), which calls a lot of functions which don't take a const struct page (but could be const). This patch (of 6): The only caller of __dump_page() now opencodes dump_page(), so remove it as an externally visible symbol. Link: https://lkml.kernel.org/r/20210416231531.2521383-1-willy@infradead.org Link: https://lkml.kernel.org/r/20210416231531.2521383-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Vlastimil Babka Reviewed-by: Anshuman Khandual Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b19bd1c976afeefc2ebba3d4dae8a4c296dae67f Author: Mike Rapoport Date: Mon Jun 28 19:41:04 2021 -0700 mm/mmzone.h: simplify is_highmem_idx() There is a lot of historical ifdefery in is_highmem_idx() and its helper zone_movable_is_highmem() that was required because of two different paths for nodes and zones initialization that were selected at compile time. Until commit 3f08a302f533 ("mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option") the movable_zone variable was only available for configurations that had CONFIG_HAVE_MEMBLOCK_NODE_MAP enabled so the test in zone_movable_is_highmem() used that variable only for such configurations. For other configurations the test checked if the index of ZONE_MOVABLE was greater by 1 than the index of ZONE_HIGMEM and then movable zone was considered a highmem zone. Needless to say, ZONE_MOVABLE - 1 equals ZONE_HIGHMEM by definition when CONFIG_HIGHMEM=y. Commit 3f08a302f533 ("mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option") made movable_zone variable always available. Since this variable is set to ZONE_HIGHMEM if CONFIG_HIGHMEM is enabled and highmem zone is populated, it is enough to check whether zone_idx == ZONE_MOVABLE && movable_zone == ZONE_HIGMEM to test if zone index points to a highmem zone. Remove zone_movable_is_highmem() that is not used anywhere except is_highmem_idx() and use the test above in is_highmem_idx() instead. Link: https://lkml.kernel.org/r/20210426141927.1314326-3-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: Anshuman Khandual Cc: Jonathan Corbet Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5a54c706e04a4ba7c4e3428776ac9e44aec17ea Author: Jungseung Lee Date: Mon Jun 28 19:41:02 2021 -0700 mm: report which part of mem is being freed on initmem case Add the details for figuring out which parts of the kernel image is being freed on initmem case. Before: Freeing unused kernel memory: 1024K After: Freeing unused kernel image (initmem) memory: 1024K Link: https://lkml.kernel.org/r/1622706274-4533-1-git-send-email-js07.lee@samsung.com Signed-off-by: Jungseung Lee Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a22bdc3c443d5abc420df1381e425b49e8901a3 Author: Kuan-Ying Lee Date: Mon Jun 28 19:40:58 2021 -0700 kasan: add memory corruption identification support for hardware tag-based mode Add memory corruption identification support for hardware tag-based mode. We store one old free pointer tag and free backtrace instead of five because hardware tag-based kasan only has 16 different tags. If we store as many stacks as SW tag-based kasan does(5 stacks), there is high probability to find the same tag in the stacks when out-of-bound issues happened and we will mistake out-of-bound issue for use-after-free. Link: https://lkml.kernel.org/r/20210626100931.22794-4-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Suggested-by: Marco Elver Reviewed-by: Alexander Potapenko Reviewed-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Chinwen Chang Cc: Greg Kroah-Hartman Cc: Matthias Brugger Cc: Nicholas Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0503b8a0b3c8ef1be55744a248bffb8f533d227 Author: Kuan-Ying Lee Date: Mon Jun 28 19:40:55 2021 -0700 kasan: integrate the common part of two KASAN tag-based modes 1. Move kasan_get_free_track() and kasan_set_free_info() into tags.c and combine these two functions for SW_TAGS and HW_TAGS kasan mode. 2. Move kasan_get_bug_type() to report_tags.c and make this function compatible for SW_TAGS and HW_TAGS kasan mode. Link: https://lkml.kernel.org/r/20210626100931.22794-3-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Suggested-by: Marco Elver Suggested-by: Greg Kroah-Hartman Reviewed-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Chinwen Chang Cc: Matthias Brugger Cc: Nicholas Tang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f06f78ab48fb90cfbef5289e5556704b74c46b7a Author: Kuan-Ying Lee Date: Mon Jun 28 19:40:52 2021 -0700 kasan: rename CONFIG_KASAN_SW_TAGS_IDENTIFY to CONFIG_KASAN_TAGS_IDENTIFY Patch series "kasan: add memory corruption identification support for hw tag-based kasan", v4. Add memory corruption identification for hardware tag-based KASAN mode. This patch (of 3): Rename CONFIG_KASAN_SW_TAGS_IDENTIFY to CONFIG_KASAN_TAGS_IDENTIFY in order to be compatible with hardware tag-based mode. Link: https://lkml.kernel.org/r/20210626100931.22794-1-Kuan-Ying.Lee@mediatek.com Link: https://lkml.kernel.org/r/20210626100931.22794-2-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Suggested-by: Marco Elver Reviewed-by: Alexander Potapenko Reviewed-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Matthias Brugger Cc: Chinwen Chang Cc: Nicholas Tang Cc: Kuan-Ying Lee Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb32c9c5d45662770160e0055cb672fd6e0813e8 Author: Daniel Axtens Date: Mon Jun 28 19:40:49 2021 -0700 kasan: use MAX_PTRS_PER_* for early shadow tables powerpc has a variable number of PTRS_PER_*, set at runtime based on the MMU that the kernel is booted under. This means the PTRS_PER_* are no longer constants, and therefore breaks the build. Switch to using MAX_PTRS_PER_*, which are constant. Link: https://lkml.kernel.org/r/20210624034050.511391-5-dja@axtens.net Signed-off-by: Daniel Axtens Suggested-by: Christophe Leroy Suggested-by: Balbir Singh Reviewed-by: Christophe Leroy Reviewed-by: Balbir Singh Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Aneesh Kumar K.V Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0f8aa4fa815daacb6eca52cae04820d6aecb7c2 Author: Daniel Axtens Date: Mon Jun 28 19:40:46 2021 -0700 mm: define default MAX_PTRS_PER_* in include/pgtable.h Commit c65e774fb3f6 ("x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable") made PTRS_PER_P4D variable on x86 and introduced MAX_PTRS_PER_P4D as a constant for cases which need a compile-time constant (e.g. fixed-size arrays). powerpc likewise has boot-time selectable MMU features which can cause other mm "constants" to vary. For KASAN, we have some static PTE/PMD/PUD/P4D arrays so we need compile-time maximums for all these constants. Extend the MAX_PTRS_PER_ idiom, and place default definitions in include/pgtable.h. These define MAX_PTRS_PER_x to be PTRS_PER_x unless an architecture has defined MAX_PTRS_PER_x in its arch headers. Clean up pgtable-nop4d.h and s390's MAX_PTRS_PER_P4D definitions while we're at it: both can just pick up the default now. Link: https://lkml.kernel.org/r/20210624034050.511391-4-dja@axtens.net Signed-off-by: Daniel Axtens Acked-by: Andrey Konovalov Reviewed-by: Christophe Leroy Reviewed-by: Marco Elver Cc: Aneesh Kumar K.V Cc: Balbir Singh Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af3751f3c2b6282bebcb56c35bbe4c8b671f80aa Author: Daniel Axtens Date: Mon Jun 28 19:40:42 2021 -0700 kasan: allow architectures to provide an outline readiness check Allow architectures to define a kasan_arch_is_ready() hook that bails out of any function that's about to touch the shadow unless the arch says that it is ready for the memory to be accessed. This is fairly uninvasive and should have a negligible performance penalty. This will only work in outline mode, so an arch must specify ARCH_DISABLE_KASAN_INLINE if it requires this. Link: https://lkml.kernel.org/r/20210624034050.511391-3-dja@axtens.net Signed-off-by: Daniel Axtens Reviewed-by: Marco Elver Suggested-by: Christophe Leroy Reviewed-by: Andrey Konovalov Cc: Balbir Singh Cc: Aneesh Kumar K.V Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 158f25522ca8cc87f512a03ed5e2a5923bd37eb3 Author: Daniel Axtens Date: Mon Jun 28 19:40:39 2021 -0700 kasan: allow an architecture to disable inline instrumentation Patch series "KASAN core changes for ppc64 radix KASAN", v16. Building on the work of Christophe, Aneesh and Balbir, I've ported KASAN to 64-bit Book3S kernels running on the Radix MMU. I've been trying this for a while, but we keep having collisions between the kasan code in the mm tree and the code I want to put in to the ppc tree. This series just contains the kasan core changes that we need. There should be no noticeable changes to other platforms. This patch (of 4): For annoying architectural reasons, it's very difficult to support inline instrumentation on powerpc64.* Add a Kconfig flag to allow an arch to disable inline. (It's a bit annoying to be 'backwards', but I'm not aware of any way to have an arch force a symbol to be 'n', rather than 'y'.) We also disable stack instrumentation in this case as it does things that are functionally equivalent to inline instrumentation, namely adding code that touches the shadow directly without going through a C helper. * on ppc64 atm, the shadow lives in virtual memory and isn't accessible in real mode. However, before we turn on virtual memory, we parse the device tree to determine which platform and MMU we're running under. That calls generic DT code, which is instrumented. Inline instrumentation in DT would unconditionally attempt to touch the shadow region, which we won't have set up yet, and would crash. We can make outline mode wait for the arch to be ready, but we can't change what the compiler inserts for inline mode. Link: https://lkml.kernel.org/r/20210624034050.511391-1-dja@axtens.net Link: https://lkml.kernel.org/r/20210624034050.511391-2-dja@axtens.net Signed-off-by: Daniel Axtens Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Christophe Leroy Cc: Aneesh Kumar K.V Cc: Balbir Singh Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3ff16d30f593d80a958104ee06a94562a12c5879 Author: David Gow Date: Mon Jun 28 19:40:36 2021 -0700 kasan: test: improve failure message in KUNIT_EXPECT_KASAN_FAIL() The KUNIT_EXPECT_KASAN_FAIL() macro currently uses KUNIT_EXPECT_EQ() to compare fail_data.report_expected and fail_data.report_found. This always gave a somewhat useless error message on failure, but the addition of extra compile-time checking with READ_ONCE() has caused it to get much longer, and be truncated before anything useful is displayed. Instead, just check fail_data.report_found by hand (we've just set report_expected to 'true'), and print a better failure message with KUNIT_FAIL(). Because of this, report_expected is no longer used anywhere, and can be removed. Beforehand, a failure in: KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)area)[3100]); would have looked like: [22:00:34] [FAILED] vmalloc_oob [22:00:34] # vmalloc_oob: EXPECTATION FAILED at lib/test_kasan.c:991 [22:00:34] Expected ({ do { extern void __compiletime_assert_705(void) __attribute__((__error__("Unsupported access size for {READ,WRITE}_ONCE()."))); if (!((sizeof(fail_data.report_expected) == sizeof(char) || sizeof(fail_data.repp [22:00:34] not ok 45 - vmalloc_oob With this change, it instead looks like: [22:04:04] [FAILED] vmalloc_oob [22:04:04] # vmalloc_oob: EXPECTATION FAILED at lib/test_kasan.c:993 [22:04:04] KASAN failure expected in "((volatile char *)area)[3100]", but none occurred [22:04:04] not ok 45 - vmalloc_oob Also update the example failure in the documentation to reflect this. Link: https://lkml.kernel.org/r/20210606005531.165954-1-davidgow@google.com Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Marco Elver Acked-by: Brendan Higgins Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Daniel Axtens Cc: David Gow Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 336abff6e8723c6b98e141372956e6c0c55e8ea4 Author: Alexander Potapenko Date: Mon Jun 28 19:40:33 2021 -0700 kasan: use dump_stack_lvl(KERN_ERR) to print stacks Most of the contents of KASAN reports are printed with pr_err(), so use a consistent logging level to print the memory access stacks. Link: https://lkml.kernel.org/r/20210506105405.3535023-2-glider@google.com Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Cc: Andrey Ryabinin Cc: Prasad Sodagudi Cc: Dmitry Vyukov Cc: he, bo Cc: Ingo Molnar Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Yanmin Zhang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4469c0f17ec63dcc8c9ed512f4330b566c2c0d34 Author: Alexander Potapenko Date: Mon Jun 28 19:40:30 2021 -0700 printk: introduce dump_stack_lvl() dump_stack() is used for many different cases, which may require a log level consistent with other kernel messages surrounding the dump_stack() call. Without that, certain systems that are configured to ignore the default level messages will miss stack traces in critical error reports. This patch introduces dump_stack_lvl() that behaves similarly to dump_stack(), but accepts a custom log level. The old dump_stack() becomes equal to dump_stack_lvl(KERN_DEFAULT). A somewhat similar patch has been proposed in 2012: https://lore.kernel.org/lkml/1332493269.2359.9.camel@hebo/ , but wasn't merged. [elver@google.com: add missing dump_stack_lvl() stub if CONFIG_PRINTK=n] Link: https://lkml.kernel.org/r/YJ0KAM0hQev1AmWe@elver.google.com Link: https://lkml.kernel.org/r/20210506105405.3535023-1-glider@google.com Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Cc: Petr Mladek Cc: Ingo Molnar Cc: he, bo Cc: Yanmin Zhang Cc: Prasad Sodagudi Cc: Dmitry Vyukov Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a850e932df657c11f2030920dbda5f5621cef091 Author: Rafael Aquini Date: Mon Jun 28 19:40:27 2021 -0700 mm: vmalloc: add cond_resched() in __vunmap() On non-preemptible kernel builds the watchdog can complain about soft lockups when vfree() is called against large vmalloc areas: [ 210.851798] kvmalloc-test: vmalloc(2199023255552) succeeded [ 238.654842] watchdog: BUG: soft lockup - CPU#181 stuck for 26s! [rmmod:5203] [ 238.662716] Modules linked in: kvmalloc_test(OE-) ... [ 238.772671] CPU: 181 PID: 5203 Comm: rmmod Tainted: G S OE 5.13.0-rc7+ #1 [ 238.781413] Hardware name: Intel Corporation PURLEY/PURLEY, BIOS PLYXCRB1.86B.0553.D01.1809190614 09/19/2018 [ 238.792383] RIP: 0010:free_unref_page+0x52/0x60 [ 238.797447] Code: 48 c1 fd 06 48 89 ee e8 9c d0 ff ff 84 c0 74 19 9c 41 5c fa 48 89 ee 48 89 df e8 b9 ea ff ff 41 f7 c4 00 02 00 00 74 01 fb 5b <5d> 41 5c c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 f0 29 77 [ 238.818406] RSP: 0018:ffffb4d87868fe98 EFLAGS: 00000206 [ 238.824236] RAX: 0000000000000000 RBX: 000000001da0c945 RCX: ffffb4d87868fe40 [ 238.832200] RDX: ffffd79d3beed108 RSI: ffffd7998501dc08 RDI: ffff9c6fbffd7010 [ 238.840166] RBP: 000000000d518cbd R08: ffffd7998501dc08 R09: 0000000000000001 [ 238.848131] R10: 0000000000000000 R11: ffffd79d3beee088 R12: 0000000000000202 [ 238.856095] R13: ffff9e5be3eceec0 R14: 0000000000000000 R15: 0000000000000000 [ 238.864059] FS: 00007fe082c2d740(0000) GS:ffff9f4c69b40000(0000) knlGS:0000000000000000 [ 238.873089] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 238.879503] CR2: 000055a000611128 CR3: 000000f6094f6006 CR4: 00000000007706e0 [ 238.887467] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 238.895433] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 238.903397] PKRU: 55555554 [ 238.906417] Call Trace: [ 238.909149] __vunmap+0x17c/0x220 [ 238.912851] __x64_sys_delete_module+0x13a/0x250 [ 238.918008] ? syscall_trace_enter.isra.20+0x13c/0x1b0 [ 238.923746] do_syscall_64+0x39/0x80 [ 238.927740] entry_SYSCALL_64_after_hwframe+0x44/0xae Like in other range zapping routines that iterate over a large list, lets just add cond_resched() within __vunmap()'s page-releasing loop in order to avoid the watchdog splats. Link: https://lkml.kernel.org/r/20210622225030.478384-1-aquini@redhat.com Signed-off-by: Rafael Aquini Acked-by: Nicholas Piggin Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Aaron Tomlin Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12b9f873a5d0e6b3846835ec973bbafa338d0b5a Author: Uladzislau Rezki Date: Mon Jun 28 19:40:23 2021 -0700 mm/vmalloc: fallback to a single page allocator Currently for order-0 pages we use a bulk-page allocator to get set of pages. From the other hand not allocating all pages is something that might occur. In that case we should fallbak to the single-page allocator trying to get missing pages, because it is more permissive(direct reclaim, etc). Introduce a vm_area_alloc_pages() function where the described logic is implemented. Link: https://lkml.kernel.org/r/20210521130718.GA17882@pc638.lan Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Cc: Mel Gorman Cc: Nicholas Piggin Cc: Hillf Danton Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4bdfeaf18a44b4d0bca945ace272cbf5e91a1b3 Author: Uladzislau Rezki (Sony) Date: Mon Jun 28 19:40:20 2021 -0700 mm/vmalloc: remove quoted strings split across lines A checkpatch.pl script complains on splitting a text across lines. It is because if a user wants to find an entire string he or she will not succeeded. WARNING: quoted string split across lines + "vmalloc size %lu allocation failure: " + "page order %u allocation failed", total: 0 errors, 1 warnings, 10 lines checked Link: https://lkml.kernel.org/r/20210521204359.19943-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Mel Gorman Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Hillf Danton Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd61413baa1052fc13e75dd092a0e23ac29a0205 Author: Uladzislau Rezki (Sony) Date: Mon Jun 28 19:40:17 2021 -0700 mm/vmalloc: print a warning message first on failure When a memory allocation for array of pages are not succeed emit a warning message as a first step and then perform the further cleanup. The reason it should be done in a right order is the clean up function which is free_vm_area() can potentially also follow its error paths what can lead to confusion what was broken first. Link: https://lkml.kernel.org/r/20210516202056.2120-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c1f4e690eecc795b2e4d4408e87302040fceca4 Author: Uladzislau Rezki (Sony) Date: Mon Jun 28 19:40:14 2021 -0700 mm/vmalloc: switch to bulk allocator in __vmalloc_area_node() Recently there has been introduced a page bulk allocator for users which need to get number of pages per one call request. For order-0 pages switch to an alloc_pages_bulk_array_node() instead of alloc_pages_node(), the reason is the former is not capable of allocating set of pages, thus a one call is per one page. Second, according to my tests the bulk allocator uses less cycles even for scenarios when only one page is requested. Running the "perf" on same test case shows below difference: - 45.18% __vmalloc_node - __vmalloc_node_range - 35.60% __alloc_pages - get_page_from_freelist 3.36% __list_del_entry_valid 3.00% check_preemption_disabled 1.42% prep_new_page - 31.00% __vmalloc_node - __vmalloc_node_range - 14.48% __alloc_pages_bulk 3.22% __list_del_entry_valid - 0.83% __alloc_pages get_page_from_freelist The "test_vmalloc.sh" also shows performance improvements: fix_size_alloc_test_4MB loops: 1000000 avg: 89105095 usec fix_size_alloc_test loops: 1000000 avg: 513672 usec full_fit_alloc_test loops: 1000000 avg: 748900 usec long_busy_list_alloc_test loops: 1000000 avg: 8043038 usec random_size_alloc_test loops: 1000000 avg: 4028582 usec fix_align_alloc_test loops: 1000000 avg: 1457671 usec fix_size_alloc_test_4MB loops: 1000000 avg: 62083711 usec fix_size_alloc_test loops: 1000000 avg: 449207 usec full_fit_alloc_test loops: 1000000 avg: 735985 usec long_busy_list_alloc_test loops: 1000000 avg: 5176052 usec random_size_alloc_test loops: 1000000 avg: 2589252 usec fix_align_alloc_test loops: 1000000 avg: 1365009 usec For example 4MB allocations illustrates ~30% gain, all the rest is also better. Link: https://lkml.kernel.org/r/20210516202056.2120-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Mel Gorman Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Nicholas Piggin Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a2afc59fb25027749bd41c44f47382522232019e Author: Uladzislau Rezki (Sony) Date: Mon Jun 28 19:40:11 2021 -0700 mm/page_alloc: add an alloc_pages_bulk_array_node() helper Patch series "vmalloc() vs bulk allocator", v2. This patch (of 3): Add a "node" variant of the alloc_pages_bulk_array() function. The helper guarantees that a __alloc_pages_bulk() is invoked with a valid NUMA node ID. Link: https://lkml.kernel.org/r/20210516202056.2120-1-urezki@gmail.com Link: https://lkml.kernel.org/r/20210516202056.2120-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Mel Gorman Cc: Mel Gorman Cc: Matthew Wilcox Cc: Nicholas Piggin Cc: Hillf Danton Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53d884a6675b0fd7bc8c7b4afd6ead6f17bc4c61 Author: Vincent Whitchurch Date: Mon Jun 28 19:40:08 2021 -0700 mm, tracing: unify PFN format strings Some trace event formats print PFNs as hex while others print them as decimal. This is rather annoying when attempting to grep through traces to understand what's going on with a particular page. $ git grep -ho 'pfn=[0x%lu]\+' include/trace/events/ | sort | uniq -c 11 pfn=0x%lx 12 pfn=%lu 2 pfn=%lx Printing as hex is in the majority in the trace events, and all the normal printks in mm/ also print PFNs as hex, so change all the PFN formats in the trace events to use 0x%lx. Link: https://lkml.kernel.org/r/20210602092608.1493-1-vincent.whitchurch@axis.com Signed-off-by: Vincent Whitchurch Cc: Steven Rostedt Cc: Ingo Molnar Cc: Jesper Dangaard Brouer Cc: Ilias Apalodimas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8df2c703d5d1a99cfc45124bfa6f5e1982e0166 Author: YueHaibing Date: Mon Jun 28 19:40:05 2021 -0700 mm/dmapool: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lkml.kernel.org/r/20210524112852.34716-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4c1ab0937c3a22c5e6e735b47fa3fa9c68dc26e Author: Souptick Joarder Date: Mon Jun 28 19:40:02 2021 -0700 h8300: remove unused variable Kernel test robot throws below warning -> >> arch/h8300/kernel/setup.c:72:26: warning: Unused variable: region [unusedVariable] struct memblock_region *region; Fixed it by removing unused variable. Link: https://lkml.kernel.org/r/20210602185431.11416-1-jrdr.linux@gmail.com Signed-off-by: Souptick Joarder Reported-by: kernel test robot Acked-by: Mike Rapoport Acked-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5673a60b80e8d1eaaa1e800e8a85451fd037f63e Author: Chen Li Date: Mon Jun 28 19:39:56 2021 -0700 mm: update legacy flush_tlb_* to use vma 1. These tlb flush functions have been using vma instead mm long time ago, but there is still some comments use mm as parameter. 2. the actual struct we use is vm_area_struct instead of vma_struct. 3. remove unused flush_kern_tlb_page. Link: https://lkml.kernel.org/r/87k0oaq311.wl-chenli@uniontech.com Signed-off-by: Chen Li Acked-by: Geert Uytterhoeven Cc: Russell King Cc: Jonas Bonn Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33e3575c5148c9874122d9a5062d58fc570f5ee6 Author: Liam Howlett Date: Mon Jun 28 19:39:53 2021 -0700 mm/mempolicy: use vma_lookup() in __access_remote_vm() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Link: https://lkml.kernel.org/r/20210521174745.2219620-23-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e418f9888463a80d559498a523e582b59e5ff2d Author: Liam Howlett Date: Mon Jun 28 19:39:50 2021 -0700 mm/memory.c: use vma_lookup() in __access_remote_vm() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-22-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5aaf07f0812adef788f9f08a73914148b5fdd40e Author: Liam Howlett Date: Mon Jun 28 19:39:47 2021 -0700 mm/mremap: use vma_lookup() in vma_to_resize() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-21-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 059b8b4875b3c046770e4f9fb553ece40b217b40 Author: Liam Howlett Date: Mon Jun 28 19:39:44 2021 -0700 mm/migrate: use vma_lookup() in do_pages_stat_array() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-20-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff69fb8100f18151f838c1e07368bbc98b437e6a Author: Liam Howlett Date: Mon Jun 28 19:39:41 2021 -0700 mm/ksm: use vma_lookup() in find_mergeable_vma() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-19-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46e6b31d4617612e47daeb7b4b6350b116349f6d Author: Liam Howlett Date: Mon Jun 28 19:39:38 2021 -0700 lib/test_hmm: use vma_lookup() in dmirror_migrate() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-18-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9016ddeddf8510f79b4c5816855cdd244e84ad7f Author: Liam Howlett Date: Mon Jun 28 19:39:35 2021 -0700 kernel/events/uprobes: use vma_lookup() in find_active_uprobe() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-17-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2beaf153e1d041e0a61e3aae618294f4a037055d Author: Liam Howlett Date: Mon Jun 28 19:39:32 2021 -0700 misc/sgi-gru/grufault: use vma_lookup() in gru_find_vma() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-16-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 49be780f798446ea86aa6cd687f9e51cbe569149 Author: Liam Howlett Date: Mon Jun 28 19:39:29 2021 -0700 media: videobuf2: use vma_lookup() in get_vaddr_frames() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Link: https://lkml.kernel.org/r/20210521174745.2219620-15-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da68547d3692e89984f2c952c0931aa27b9095cd Author: Liam Howlett Date: Mon Jun 28 19:39:26 2021 -0700 drm/amdgpu: use vma_lookup() in amdgpu_ttm_tt_get_user_pages() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-14-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Acked-by: Alex Deucher Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47bdd1db16e67ebfde6f77eaf7625b2292ae6d58 Author: Liam Howlett Date: Mon Jun 28 19:39:23 2021 -0700 net/ipv5/tcp: use vma_lookup() in tcp_zerocopy_receive() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-13-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: David Miller Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85715d6809014870a8a4d498b292fc5711a969e7 Author: Liam Howlett Date: Mon Jun 28 19:39:20 2021 -0700 vfio: use vma_lookup() instead of find_vma_intersection() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Link: https://lkml.kernel.org/r/20210521174745.2219620-12-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc98c03ba9ea970c6b346a6fe57f98c16a3971da Author: Liam Howlett Date: Mon Jun 28 19:39:17 2021 -0700 virt/kvm: use vma_lookup() instead of find_vma_intersection() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Link: https://lkml.kernel.org/r/20210521174745.2219620-11-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ce2c3fc0be6e7d0bb2236a33bbb7a0f1943bd81 Author: Liam Howlett Date: Mon Jun 28 19:39:14 2021 -0700 x86/sgx: use vma_lookup() in sgx_encl_find() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-10-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b93e042a59dd8c5b252eb0934f195f169ce68f9 Author: Liam Howlett Date: Mon Jun 28 19:39:11 2021 -0700 arch/m68k/kernel/sys_m68k: use vma_lookup() in sys_cacheflush() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-9-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f7020ac0dc9a7a7dfb2237c6e8ed13f40162a6b Author: Liam Howlett Date: Mon Jun 28 19:39:08 2021 -0700 arch/mips/kernel/traps: use vma_lookup() instead of find_vma() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-8-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 900c83f88af06bf0466c28bdde8a2c011b855e44 Author: Liam Howlett Date: Mon Jun 28 19:39:05 2021 -0700 arch/powerpc/kvm/book3s: use vma_lookup() in kvmppc_hv_setup_htab_rma() Using vma_lookup() removes the requirement to check if the address is within the returned vma. The code is easier to understand and more compact. Link: https://lkml.kernel.org/r/20210521174745.2219620-7-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27a14d287e16c308040508be9f0cb28bc935bd0e Author: Liam Howlett Date: Mon Jun 28 19:39:02 2021 -0700 arch/powerpc/kvm/book3s_hv_uvmem: use vma_lookup() instead of find_vma_intersection() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Link: https://lkml.kernel.org/r/20210521174745.2219620-6-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09eef83a801512a71b0c95c25e7d8fd69141aa1b Author: Liam Howlett Date: Mon Jun 28 19:38:59 2021 -0700 arch/arm64/kvm: use vma_lookup() instead of find_vma_intersection() vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Link: https://lkml.kernel.org/r/20210521174745.2219620-5-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b55541414bd00dbf64cf2ff4c4f1c41cd5cd42dc Author: Liam Howlett Date: Mon Jun 28 19:38:56 2021 -0700 arch/arc/kernel/troubleshoot: use vma_lookup() instead of find_vma() Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated. Link: https://lkml.kernel.org/r/20210521174745.2219620-4-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 064b2663603c76e9ab6fe1bb2e92d1a7299fff9e Author: Liam Howlett Date: Mon Jun 28 19:38:53 2021 -0700 drm/i915/selftests: use vma_lookup() in __igt_mmap() vma_lookup() will look up the vma at a specific address. find_vma() will start the search for a specific address and continue upwards. This fixes an issue with the selftest as the returned vma may not be the newly created vma, but simply the vma at a higher address. objects Link: https://lkml.kernel.org/r/20210521174745.2219620-3-Liam.Howlett@Oracle.com Fixes: 6fedafacae1b (drm/i915/selftests: Wrap vm_mmap() around GEM Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce6d42f2e4a2d98898419743b037a95661e3ac9d Author: Liam Howlett Date: Mon Jun 28 19:38:50 2021 -0700 mm: add vma_lookup(), update find_vma_intersection() comments Patch series "mm: Add vma_lookup()", v2. Many places in the kernel use find_vma() to get a vma and then check the start address of the vma to ensure the next vma was not returned. Other places use the find_vma_intersection() call with add, addr + 1 as the range; looking for just the vma at a specific address. The third use of find_vma() is by developers who do not know that the function starts searching at the provided address upwards for the next vma. This results in a bug that is often overlooked for a long time. Adding the new vma_lookup() function will allow for cleaner code by removing the find_vma() calls which check limits, making find_vma_intersection() calls of a single address to be shorter, and potentially reduce the incorrect uses of find_vma(). This patch (of 22): Many places in the kernel use find_vma() to get a vma and then check the start address of the vma to ensure the next vma was not returned. Other places use the find_vma_intersection() call with add, addr + 1 as the range; looking for just the vma at a specific address. The third use of find_vma() is by developers who do not know that the function starts searching at the provided address upwards for the next vma. This results in a bug that is often overlooked for a long time. Adding the new vma_lookup() function will allow for cleaner code by removing the find_vma() calls which check limits, making find_vma_intersection() calls of a single address to be shorter, and potentially reduce the incorrect uses of find_vma(). Also change find_vma_intersection() comments and declaration to be of the correct length and add kernel documentation style comment. Link: https://lkml.kernel.org/r/20210521174745.2219620-1-Liam.Howlett@Oracle.com Link: https://lkml.kernel.org/r/20210521174745.2219620-2-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Laurent Dufour Acked-by: David Hildenbrand Acked-by: Davidlohr Bueso Cc: David Miller Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2797e79f1a491fe4ffc4daf1104243ad07902d3f Author: Liu Xiang Date: Mon Jun 28 19:38:47 2021 -0700 mm/memory.c: fix comment of finish_mkwrite_fault() Fix the return value in comment of finish_mkwrite_fault(). Link: https://lkml.kernel.org/r/20210513093931.15234-1-liu.xiang@zlingsmart.com Signed-off-by: Liu Xiang Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35e43c5ff4d2da700e8ed2216acae81f62800eaa Author: Liam Howlett Date: Mon Jun 28 19:38:44 2021 -0700 mm/mmap: use find_vma_intersection() in do_mmap() for overlap Using find_vma_intersection() avoids the need for a temporary variable and makes the code cleaner. Link: https://lkml.kernel.org/r/20210511014328.2902782-1-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96d990239e31d9623fdb96e829237b997c9d3d63 Author: Liam Howlett Date: Mon Jun 28 19:38:41 2021 -0700 mm/mmap: introduce unlock_range() for code cleanup Both __do_munmap() and exit_mmap() unlock a range of VMAs using almost identical code blocks. Replace both blocks by a static inline function. [akpm@linux-foundation.org: tweak code layout] Link: https://lkml.kernel.org/r/20210510211021.2797427-1-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78d9cf6041b968cc881fd22e25e2662d1cec4dba Author: Gonzalo Matias Juarez Tello Date: Mon Jun 28 19:38:39 2021 -0700 mm/mmap.c: logic of find_vma_intersection repeated in __do_munmap Logic of find_vma_intersection() is repeated in __do_munmap(). Also, prev is assigned a value before checking vma->vm_start >= end which might end up on a return statement making that assignment useless. Calling find_vma_intersection() checks that condition and returns NULL if no vma is found, hence only the !vma check is needed in __do_munmap(). Link: https://lkml.kernel.org/r/20210409162129.18313-1-gmjuareztello@gmail.com Signed-off-by: Gonzalo Matias Juarez Tello Reviewed-by: Andrew Morton Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b8db39fad98cbb1d36e079236a446fad710daea Author: David Hildenbrand Date: Mon Jun 28 19:38:35 2021 -0700 mm: ignore MAP_EXECUTABLE in ksys_mmap_pgoff() Let's also remove masking off MAP_EXECUTABLE from ksys_mmap_pgoff(): the last in-tree occurrence of MAP_EXECUTABLE is now in LEGACY_MAP_MASK, which accepts the flag e.g., for MAP_SHARED_VALIDATE; however, the flag is ignored throughout the kernel now. Add a comment to LEGACY_MAP_MASK stating that MAP_EXECUTABLE is ignored. Link: https://lkml.kernel.org/r/20210421093453.6904-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: "Eric W. Biederman" Reviewed-by: Kees Cook Cc: Alexander Shishkin Cc: Alexander Viro Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Catalin Marinas Cc: Don Zickus Cc: Feng Tang Cc: Greg Ungerer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kevin Brodsky Cc: Mark Rutland Cc: Michal Hocko Cc: Mike Rapoport Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4eec6a3dfb7a6257ddcacf15e9428fe5834ffd4 Author: David Hildenbrand Date: Mon Jun 28 19:38:31 2021 -0700 binfmt: remove in-tree usage of MAP_EXECUTABLE Ever since commit e9714acf8c43 ("mm: kill vma flag VM_EXECUTABLE and mm->num_exe_file_vmas"), VM_EXECUTABLE is gone and MAP_EXECUTABLE is essentially completely ignored. Let's remove all usage of MAP_EXECUTABLE. [akpm@linux-foundation.org: fix blooper in fs/binfmt_aout.c. per David] Link: https://lkml.kernel.org/r/20210421093453.6904-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: "Eric W. Biederman" Reviewed-by: Kees Cook Cc: Alexander Shishkin Cc: Alexander Viro Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Catalin Marinas Cc: Don Zickus Cc: Feng Tang Cc: Greg Ungerer Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kevin Brodsky Cc: Mark Rutland Cc: Michal Hocko Cc: Mike Rapoport Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fa207525f6ae241c19cbe4c470c5cb9bea4aab0 Author: David Hildenbrand Date: Mon Jun 28 19:38:28 2021 -0700 perf: MAP_EXECUTABLE does not indicate VM_MAYEXEC Patch series "perf/binfmt/mm: remove in-tree usage of MAP_EXECUTABLE". Stumbling over the history of MAP_EXECUTABLE, I noticed that we still have some in-tree users that we can get rid of. This patch (of 3): Before commit e9714acf8c43 ("mm: kill vma flag VM_EXECUTABLE and mm->num_exe_file_vmas"), VM_EXECUTABLE indicated MAP_EXECUTABLE. MAP_EXECUTABLE is nowadays essentially ignored by the kernel and does not relate to VM_MAYEXEC. Link: https://lkml.kernel.org/r/20210421093453.6904-1-david@redhat.com Link: https://lkml.kernel.org/r/20210421093453.6904-2-david@redhat.com Fixes: f972eb63b100 ("perf: Pass protection and flags bits through mmap2 interface") Signed-off-by: David Hildenbrand Cc: Peter Zijlstra Acked-by: "Eric W. Biederman" Reviewed-by: Kees Cook Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Alexander Viro Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Greg Ungerer Cc: Mike Rapoport Cc: Catalin Marinas Cc: Kevin Brodsky Cc: Michal Hocko Cc: Feng Tang Cc: Don Zickus Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a1803bb582c50909a7f6cc4153360eaf5ae8fc8 Author: Huilong Deng Date: Mon Jun 28 19:38:24 2021 -0700 mm: memcontrol: remove trailing semicolon in macros Macros should not use a trailing semicolon. Link: https://lkml.kernel.org/r/20210614091530.22117-1-denghuilong@cdjrlc.com Signed-off-by: Huilong Deng Reviewed-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Roman Gushchin Cc: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c74d40e8b5e2ac5eee1ca45b12d3e174915f1d88 Author: Dan Schatzberg Date: Mon Jun 28 19:38:21 2021 -0700 loop: charge i/o to mem and blk cg The current code only associates with the existing blkcg when aio is used to access the backing file. This patch covers all types of i/o to the backing file and also associates the memcg so if the backing file is on tmpfs, memory is charged appropriately. This patch also exports cgroup_get_e_css and int_active_memcg so it can be used by the loop module. Link: https://lkml.kernel.org/r/20210610173944.1203706-4-schatzberg.dan@gmail.com Signed-off-by: Dan Schatzberg Acked-by: Johannes Weiner Acked-by: Jens Axboe Cc: Chris Down Cc: Michal Hocko Cc: Ming Lei Cc: Shakeel Butt Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04f94e3fbe1afcb815d7c7ace78c6779772aa837 Author: Dan Schatzberg Date: Mon Jun 28 19:38:18 2021 -0700 mm: charge active memcg when no mm is set set_active_memcg() worked for kernel allocations but was silently ignored for user pages. This patch establishes a precedence order for who gets charged: 1. If there is a memcg associated with the page already, that memcg is charged. This happens during swapin. 2. If an explicit mm is passed, mm->memcg is charged. This happens during page faults, which can be triggered in remote VMs (eg gup). 3. Otherwise consult the current process context. If there is an active_memcg, use that. Otherwise, current->mm->memcg. Previously, if a NULL mm was passed to mem_cgroup_charge (case 3) it would always charge the root cgroup. Now it looks up the active_memcg first (falling back to charging the root cgroup if not set). Link: https://lkml.kernel.org/r/20210610173944.1203706-3-schatzberg.dan@gmail.com Signed-off-by: Dan Schatzberg Acked-by: Johannes Weiner Acked-by: Tejun Heo Acked-by: Chris Down Acked-by: Jens Axboe Reviewed-by: Shakeel Butt Reviewed-by: Michal Koutný Cc: Michal Hocko Cc: Ming Lei Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 87579e9b7d8dc36e7cfc40c03f1ae5634e16e2c5 Author: Dan Schatzberg Date: Mon Jun 28 19:38:15 2021 -0700 loop: use worker per cgroup instead of kworker Patch series "Charge loop device i/o to issuing cgroup", v14. The loop device runs all i/o to the backing file on a separate kworker thread which results in all i/o being charged to the root cgroup. This allows a loop device to be used to trivially bypass resource limits and other policy. This patch series fixes this gap in accounting. A simple script to demonstrate this behavior on cgroupv2 machine: ''' #!/bin/bash set -e CGROUP=/sys/fs/cgroup/test.slice LOOP_DEV=/dev/loop0 if [[ ! -d $CGROUP ]] then sudo mkdir $CGROUP fi grep oom_kill $CGROUP/memory.events # Set a memory limit, write more than that limit to tmpfs -> OOM kill sudo unshare -m bash -c " echo \$\$ > $CGROUP/cgroup.procs; echo 0 > $CGROUP/memory.swap.max; echo 64M > $CGROUP/memory.max; mount -t tmpfs -o size=512m tmpfs /tmp; dd if=/dev/zero of=/tmp/file bs=1M count=256" || true grep oom_kill $CGROUP/memory.events # Set a memory limit, write more than that limit through loopback # device -> no OOM kill sudo unshare -m bash -c " echo \$\$ > $CGROUP/cgroup.procs; echo 0 > $CGROUP/memory.swap.max; echo 64M > $CGROUP/memory.max; mount -t tmpfs -o size=512m tmpfs /tmp; truncate -s 512m /tmp/backing_file losetup $LOOP_DEV /tmp/backing_file dd if=/dev/zero of=$LOOP_DEV bs=1M count=256; losetup -D $LOOP_DEV" || true grep oom_kill $CGROUP/memory.events ''' Naively charging cgroups could result in priority inversions through the single kworker thread in the case where multiple cgroups are reading/writing to the same loop device. This patch series does some minor modification to the loop driver so that each cgroup can make forward progress independently to avoid this inversion. With this patch series applied, the above script triggers OOM kills when writing through the loop device as expected. This patch (of 3): Existing uses of loop device may have multiple cgroups reading/writing to the same device. Simply charging resources for I/O to the backing file could result in priority inversion where one cgroup gets synchronously blocked, holding up all other I/O to the loop device. In order to avoid this priority inversion, we use a single workqueue where each work item is a "struct loop_worker" which contains a queue of struct loop_cmds to issue. The loop device maintains a tree mapping blk css_id -> loop_worker. This allows each cgroup to independently make forward progress issuing I/O to the backing file. There is also a single queue for I/O associated with the rootcg which can be used in cases of extreme memory shortage where we cannot allocate a loop_worker. The locking for the tree and queues is fairly heavy handed - we acquire a per-loop-device spinlock any time either is accessed. The existing implementation serializes all I/O through a single thread anyways, so I don't believe this is any worse. [colin.king@canonical.com: fixes] Link: https://lkml.kernel.org/r/20210610173944.1203706-1-schatzberg.dan@gmail.com Link: https://lkml.kernel.org/r/20210610173944.1203706-2-schatzberg.dan@gmail.com Signed-off-by: Dan Schatzberg Reviewed-by: Ming Lei Acked-by: Jens Axboe Cc: Johannes Weiner Cc: Michal Hocko Cc: Chris Down Cc: Shakeel Butt Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b51478a0b3c7040bfcadf6e2e04df5ddde59fd98 Author: wenhuizhang Date: Mon Jun 28 19:38:12 2021 -0700 memcontrol: use flexible-array member Change deprecated zero-length-and-one-element-arrays into flexible array member.Zero-length and one-element arrays detected by Lukas's CodeChecker. Zero/one element arrays cause undefined behaviours if sizeof() used. Link: https://lkml.kernel.org/r/20210518200910.29912-1-wenhui@gwmail.gwu.edu Signed-off-by: wenhuizhang Reviewed-by: Muchun Song Acked-by: Michal Hocko Cc: Shakeel Butt Cc: Johannes Weiner Cc: Roman Gushchin Cc: Muchun Song Cc: Yang Shi Cc: Alex Shi Cc: Alexander Duyck Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ef56b78b888c2fa15b6140fbdb88853d7d4fecd Author: Muchun Song Date: Mon Jun 28 19:38:09 2021 -0700 mm: vmscan: remove noinline_for_stack The noinline_for_stack is introduced by commit 666356297ec4 ("vmscan: set up pagevec as late as possible in shrink_inactive_list()"), its purpose is to delay the allocation of pagevec as late as possible to save stack memory. But the commit 2bcf88796381 ("mm: take pagevecs off reclaim stack") replace pagevecs by lists of pages_to_free. So we do not need noinline_for_stack, just remove it (let the compiler decide whether to inline). Link: https://lkml.kernel.org/r/20210417043538.9793-9-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 271dd6b1f636a99a3a77889935296c063f5a3cbe Author: Muchun Song Date: Mon Jun 28 19:38:06 2021 -0700 mm: memcontrol: move obj_cgroup_uncharge_pages() out of css_set_lock The css_set_lock is used to guard the list of inherited objcgs. So there is no need to uncharge kernel memory under css_set_lock. Just move it out of the lock. Link: https://lkml.kernel.org/r/20210417043538.9793-8-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9838354e16a2a920d5a228559850d10fa588a18d Author: Muchun Song Date: Mon Jun 28 19:38:03 2021 -0700 mm: memcontrol: simplify the logic of objcg pinning memcg The obj_cgroup_release() and memcg_reparent_objcgs() are serialized by the css_set_lock. We do not need to care about objcg->memcg being released in the process of obj_cgroup_release(). So there is no need to pin memcg before releasing objcg. Remove those pinning logic to simplfy the code. There are only two places that modifies the objcg->memcg. One is the initialization to objcg->memcg in the memcg_online_kmem(), another is objcgs reparenting in the memcg_reparent_objcgs(). It is also impossible for the two to run in parallel. So xchg() is unnecessary and it is enough to use WRITE_ONCE(). Link: https://lkml.kernel.org/r/20210417043538.9793-7-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7467c39128bda1d58af08aaeb0c7ba54d0ec87ae Author: Muchun Song Date: Mon Jun 28 19:37:59 2021 -0700 mm: memcontrol: rename lruvec_holds_page_lru_lock to page_matches_lruvec lruvec_holds_page_lru_lock() doesn't check anything about locking and is used to check whether the page belongs to the lruvec. So rename it to page_matches_lruvec(). Link: https://lkml.kernel.org/r/20210417043538.9793-6-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Michal Hocko Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Roman Gushchin Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2e4d28dd9f6478dd54d47b91edc3fe62c019968 Author: Muchun Song Date: Mon Jun 28 19:37:56 2021 -0700 mm: memcontrol: simplify lruvec_holds_page_lru_lock We already have a helper lruvec_memcg() to get the memcg from lruvec, we do not need to do it ourselves in the lruvec_holds_page_lru_lock(). So use lruvec_memcg() instead. And if mem_cgroup_disabled() returns false, the page_memcg(page) (the LRU pages) cannot be NULL. So remove the odd logic of "memcg = page_memcg(page) ? : root_mem_cgroup". And use lruvec_pgdat to simplify the code. We can have a single definition for this function that works for !CONFIG_MEMCG, CONFIG_MEMCG + mem_cgroup_disabled() and CONFIG_MEMCG. Link: https://lkml.kernel.org/r/20210417043538.9793-5-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a984226f457f849eb9c4ce727eeaa3b5080597d8 Author: Muchun Song Date: Mon Jun 28 19:37:53 2021 -0700 mm: memcontrol: remove the pgdata parameter of mem_cgroup_page_lruvec All the callers of mem_cgroup_page_lruvec() just pass page_pgdat(page) as the 2nd parameter to it (except isolate_migratepages_block()). But for isolate_migratepages_block(), the page_pgdat(page) is also equal to the local variable of @pgdat. So mem_cgroup_page_lruvec() do not need the pgdat parameter. Just remove it to simplify the code. Link: https://lkml.kernel.org/r/20210417043538.9793-4-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2884b6b7eed4fc14c0630fb16e56a4c66c786d33 Author: Muchun Song Date: Mon Jun 28 19:37:50 2021 -0700 mm: memcontrol: bail out early when !mm in get_mem_cgroup_from_mm When mm is NULL, we do not need to hold rcu lock and call css_tryget for the root memcg. And we also do not need to check !mm in every loop of while. So bail out early when !mm. Link: https://lkml.kernel.org/r/20210417043538.9793-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8dc87c7d1fec8851925ca96ade0d65d3dcf89cce Author: Muchun Song Date: Mon Jun 28 19:37:47 2021 -0700 mm: memcontrol: fix page charging in page replacement Patch series "memcontrol code cleanup and simplification", v3. This patch (of 8): The pages aren't accounted at the root level, so do not charge the page to the root memcg in page replacement. Although we do not display the value (mem_cgroup_usage) so there shouldn't be any actual problem, but there is a WARN_ON_ONCE in the page_counter_cancel(). Who knows if it will trigger? So it is better to fix it. Link: https://lkml.kernel.org/r/20210417043538.9793-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210417043538.9793-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5c8b16b596e15471db22ed8ed10aafbf1a11878 Author: Muchun Song Date: Mon Jun 28 19:37:44 2021 -0700 mm: memcontrol: fix root_mem_cgroup charging The below scenario can cause the page counters of the root_mem_cgroup to be out of balance. CPU0: CPU1: objcg = get_obj_cgroup_from_current() obj_cgroup_charge_pages(objcg) memcg_reparent_objcgs() // reparent to root_mem_cgroup WRITE_ONCE(iter->memcg, parent) // memcg == root_mem_cgroup memcg = get_mem_cgroup_from_objcg(objcg) // do not charge to the root_mem_cgroup try_charge(memcg) obj_cgroup_uncharge_pages(objcg) memcg = get_mem_cgroup_from_objcg(objcg) // uncharge from the root_mem_cgroup refill_stock(memcg) drain_stock(memcg) page_counter_uncharge(&memcg->memory) get_obj_cgroup_from_current() never returns a root_mem_cgroup's objcg, so we never explicitly charge the root_mem_cgroup. And it's not going to change. It's all about a race when we got an obj_cgroup pointing at some non-root memcg, but before we were able to charge it, the cgroup was gone, objcg was reparented to the root and so we're skipping the charging. Then we store the objcg pointer and later use to uncharge the root_mem_cgroup. This can cause the page counter to be less than the actual value. Although we do not display the value (mem_cgroup_usage) so there shouldn't be any actual problem, but there is a WARN_ON_ONCE in the page_counter_cancel(). Who knows if it will trigger? So it is better to fix it. Link: https://lkml.kernel.org/r/20210425075410.19255-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Xiongchun Duan Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13e680fb6a1e7749ef4f4824ed883684ceb838df Author: Waiman Long Date: Mon Jun 28 19:37:41 2021 -0700 mm: memcg/slab: disable cache merging for KMALLOC_NORMAL caches The KMALLOC_NORMAL (kmalloc-) caches are for unaccounted objects only when CONFIG_MEMCG_KMEM is enabled. To make sure that this condition remains true, we will have to prevent KMALOC_NORMAL caches to merge with other kmem caches. This is now done by setting its refcount to -1 right after its creation. Link: https://lkml.kernel.org/r/20210505200610.13943-4-longman@redhat.com Signed-off-by: Waiman Long Suggested-by: Roman Gushchin Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Reviewed-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Michal Hocko Cc: Pekka Enberg Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 494c1dfe855ec1f70f89552fce5eadf4a1717552 Author: Waiman Long Date: Mon Jun 28 19:37:38 2021 -0700 mm: memcg/slab: create a new set of kmalloc-cg- caches There are currently two problems in the way the objcg pointer array (memcg_data) in the page structure is being allocated and freed. On its allocation, it is possible that the allocated objcg pointer array comes from the same slab that requires memory accounting. If this happens, the slab will never become empty again as there is at least one object left (the obj_cgroup array) in the slab. When it is freed, the objcg pointer array object may be the last one in its slab and hence causes kfree() to be called again. With the right workload, the slab cache may be set up in a way that allows the recursive kfree() calling loop to nest deep enough to cause a kernel stack overflow and panic the system. One way to solve this problem is to split the kmalloc- caches (KMALLOC_NORMAL) into two separate sets - a new set of kmalloc- (KMALLOC_NORMAL) caches for unaccounted objects only and a new set of kmalloc-cg- (KMALLOC_CGROUP) caches for accounted objects only. All the other caches can still allow a mix of accounted and unaccounted objects. With this change, all the objcg pointer array objects will come from KMALLOC_NORMAL caches which won't have their objcg pointer arrays. So both the recursive kfree() problem and non-freeable slab problem are gone. Since both the KMALLOC_NORMAL and KMALLOC_CGROUP caches no longer have mixed accounted and unaccounted objects, this will slightly reduce the number of objcg pointer arrays that need to be allocated and save a bit of memory. On the other hand, creating a new set of kmalloc caches does have the effect of reducing cache utilization. So it is properly a wash. The new KMALLOC_CGROUP is added between KMALLOC_NORMAL and KMALLOC_RECLAIM so that the first for loop in create_kmalloc_caches() will include the newly added caches without change. [vbabka@suse.cz: don't create kmalloc-cg caches with cgroup.memory=nokmem] Link: https://lkml.kernel.org/r/20210512145107.6208-1-longman@redhat.com [akpm@linux-foundation.org: un-fat-finger v5 delta creation] [longman@redhat.com: disable cache merging for KMALLOC_NORMAL caches] Link: https://lkml.kernel.org/r/20210505200610.13943-4-longman@redhat.com Link: https://lkml.kernel.org/r/20210512145107.6208-1-longman@redhat.com Link: https://lkml.kernel.org/r/20210505200610.13943-3-longman@redhat.com Signed-off-by: Waiman Long Signed-off-by: Vlastimil Babka Suggested-by: Vlastimil Babka Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Michal Hocko Cc: Pekka Enberg Cc: Vladimir Davydov [longman@redhat.com: fix for CONFIG_ZONE_DMA=n] Suggested-by: Roman Gushchin Reviewed-by: Vlastimil Babka Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41eb5df1cbc9b302fc263ad7c9f38cfc38b4df61 Author: Waiman Long Date: Mon Jun 28 19:37:34 2021 -0700 mm: memcg/slab: properly set up gfp flags for objcg pointer array Patch series "mm: memcg/slab: Fix objcg pointer array handling problem", v4. Since the merging of the new slab memory controller in v5.9, the page structure stores a pointer to objcg pointer array for slab pages. When the slab has no used objects, it can be freed in free_slab() which will call kfree() to free the objcg pointer array in memcg_alloc_page_obj_cgroups(). If it happens that the objcg pointer array is the last used object in its slab, that slab may then be freed which may caused kfree() to be called again. With the right workload, the slab cache may be set up in a way that allows the recursive kfree() calling loop to nest deep enough to cause a kernel stack overflow and panic the system. In fact, we have a reproducer that can cause kernel stack overflow on a s390 system involving kmalloc-rcl-256 and kmalloc-rcl-128 slabs with the following kfree() loop recursively called 74 times: [ 285.520739] [<000000000ec432fc>] kfree+0x4bc/0x560 [ 285.520740] [<000000000ec43466>] __free_slab+0xc6/0x228 [ 285.520741] [<000000000ec41fc2>] __slab_free+0x3c2/0x3e0 [ 285.520742] [<000000000ec432fc>] kfree+0x4bc/0x560 : While investigating this issue, I also found an issue on the allocation side. If the objcg pointer array happen to come from the same slab or a circular dependency linkage is formed with multiple slabs, those affected slabs can never be freed again. This patch series addresses these two issues by introducing a new set of kmalloc-cg- caches split from kmalloc- caches. The new set will only contain non-reclaimable and non-dma objects that are accounted in memory cgroups whereas the old set are now for unaccounted objects only. By making this split, all the objcg pointer arrays will come from the kmalloc- caches, but those caches will never hold any objcg pointer array. As a result, deeply nested kfree() call and the unfreeable slab problems are now gone. This patch (of 4): Since the merging of the new slab memory controller in v5.9, the page structure may store a pointer to obj_cgroup pointer array for slab pages. Currently, only the __GFP_ACCOUNT bit is masked off. However, the array is not readily reclaimable and doesn't need to come from the DMA buffer. So those GFP bits should be masked off as well. Do the flag bit clearing at memcg_alloc_page_obj_cgroups() to make sure that it is consistently applied no matter where it is called. Link: https://lkml.kernel.org/r/20210505200610.13943-1-longman@redhat.com Link: https://lkml.kernel.org/r/20210505200610.13943-2-longman@redhat.com Fixes: 286e04b8ed7a ("mm: memcg/slab: allocate obj_cgroups for non-root slab pages") Signed-off-by: Waiman Long Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Reviewed-by: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 559271146efc0bf125e6390191f683eab884e4a1 Author: Waiman Long Date: Mon Jun 28 19:37:30 2021 -0700 mm/memcg: optimize user context object stock access Most kmem_cache_alloc() calls are from user context. With instrumentation enabled, the measured amount of kmem_cache_alloc() calls from non-task context was about 0.01% of the total. The irq disable/enable sequence used in this case to access content from object stock is slow. To optimize for user context access, there are now two sets of object stocks (in the new obj_stock structure) for task context and interrupt context access respectively. The task context object stock can be accessed after disabling preemption which is cheap in non-preempt kernel. The interrupt context object stock can only be accessed after disabling interrupt. User context code can access interrupt object stock, but not vice versa. The downside of this change is that there are more data stored in local object stocks and not reflected in the charge counter and the vmstat arrays. However, this is a small price to pay for better performance. [longman@redhat.com: fix potential uninitialized variable warning] Link: https://lkml.kernel.org/r/20210526193602.8742-1-longman@redhat.com [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/20210506150007.16288-5-longman@redhat.com Signed-off-by: Waiman Long Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Tejun Heo Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Roman Gushchin Cc: Muchun Song Cc: Alex Shi Cc: Chris Down Cc: Yafang Shao Cc: Wei Yang Cc: Masayoshi Mizuma Cc: Xing Zhengjun Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5387c90490f7f42df3209154ca955a453ee01b41 Author: Waiman Long Date: Mon Jun 28 19:37:27 2021 -0700 mm/memcg: improve refill_obj_stock() performance There are two issues with the current refill_obj_stock() code. First of all, when nr_bytes reaches over PAGE_SIZE, it calls drain_obj_stock() to atomically flush out remaining bytes to obj_cgroup, clear cached_objcg and do a obj_cgroup_put(). It is likely that the same obj_cgroup will be used again which leads to another call to drain_obj_stock() and obj_cgroup_get() as well as atomically retrieve the available byte from obj_cgroup. That is costly. Instead, we should just uncharge the excess pages, reduce the stock bytes and be done with it. The drain_obj_stock() function should only be called when obj_cgroup changes. Secondly, when charging an object of size not less than a page in obj_cgroup_charge(), it is possible that the remaining bytes to be refilled to the stock will overflow a page and cause refill_obj_stock() to uncharge 1 page. To avoid the additional uncharge in this case, a new allow_uncharge flag is added to refill_obj_stock() which will be set to false when called from obj_cgroup_charge() so that an uncharge_pages() call won't be issued right after a charge_pages() call unless the objcg changes. A multithreaded kmalloc+kfree microbenchmark on a 2-socket 48-core 96-thread x86-64 system with 96 testing threads were run. Before this patch, the total number of kilo kmalloc+kfree operations done for a 4k large object by all the testing threads per second were 4,304 kops/s (cgroup v1) and 8,478 kops/s (cgroup v2). After applying this patch, the number were 4,731 (cgroup v1) and 418,142 (cgroup v2) respectively. This represents a performance improvement of 1.10X (cgroup v1) and 49.3X (cgroup v2). Link: https://lkml.kernel.org/r/20210506150007.16288-4-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Shakeel Butt Cc: Alex Shi Cc: Chris Down Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Masayoshi Mizuma Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Pekka Enberg Cc: Roman Gushchin Cc: Tejun Heo Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Xing Zhengjun Cc: Yafang Shao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68ac5b3c8db2fda00af594eca4100aceaf927c0e Author: Waiman Long Date: Mon Jun 28 19:37:23 2021 -0700 mm/memcg: cache vmstat data in percpu memcg_stock_pcp Before the new slab memory controller with per object byte charging, charging and vmstat data update happen only when new slab pages are allocated or freed. Now they are done with every kmem_cache_alloc() and kmem_cache_free(). This causes additional overhead for workloads that generate a lot of alloc and free calls. The memcg_stock_pcp is used to cache byte charge for a specific obj_cgroup to reduce that overhead. To further reducing it, this patch makes the vmstat data cached in the memcg_stock_pcp structure as well until it accumulates a page size worth of update or when other cached data change. Caching the vmstat data in the per-cpu stock eliminates two writes to non-hot cachelines for memcg specific as well as memcg-lruvecs specific vmstat data by a write to a hot local stock cacheline. On a 2-socket Cascade Lake server with instrumentation enabled and this patch applied, it was found that about 20% (634400 out of 3243830) of the time when mod_objcg_state() is called leads to an actual call to __mod_objcg_state() after initial boot. When doing parallel kernel build, the figure was about 17% (24329265 out of 142512465). So caching the vmstat data reduces the number of calls to __mod_objcg_state() by more than 80%. Link: https://lkml.kernel.org/r/20210506150007.16288-3-longman@redhat.com Signed-off-by: Waiman Long Reviewed-by: Shakeel Butt Cc: Alex Shi Cc: Chris Down Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Masayoshi Mizuma Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Pekka Enberg Cc: Roman Gushchin Cc: Tejun Heo Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Xing Zhengjun Cc: Yafang Shao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fdbcb2a6d6778e0b91938529694e5f40b4a66130 Author: Waiman Long Date: Mon Jun 28 19:37:19 2021 -0700 mm/memcg: move mod_objcg_state() to memcontrol.c Patch series "mm/memcg: Reduce kmemcache memory accounting overhead", v6. With the recent introduction of the new slab memory controller, we eliminate the need for having separate kmemcaches for each memory cgroup and reduce overall kernel memory usage. However, we also add additional memory accounting overhead to each call of kmem_cache_alloc() and kmem_cache_free(). For workloads that require a lot of kmemcache allocations and de-allocations, they may experience performance regression as illustrated in [1] and [2]. A simple kernel module that performs repeated loop of 100,000,000 kmem_cache_alloc() and kmem_cache_free() of either a small 32-byte object or a big 4k object at module init time with a batch size of 4 (4 kmalloc's followed by 4 kfree's) is used for benchmarking. The benchmarking tool was run on a kernel based on linux-next-20210419. The test was run on a CascadeLake server with turbo-boosting disable to reduce run-to-run variation. The small object test exercises mainly the object stock charging and vmstat update code paths. The large object test also exercises the refill_obj_stock() and __memcg_kmem_charge()/__memcg_kmem_uncharge() code paths. With memory accounting disabled, the run time was 3.130s with both small object big object tests. With memory accounting enabled, both cgroup v1 and v2 showed similar results in the small object test. The performance results of the large object test, however, differed between cgroup v1 and v2. The execution times with the application of various patches in the patchset were: Applied patches Run time Accounting overhead %age 1 %age 2 --------------- -------- ------------------- ------ ------ Small 32-byte object: None 11.634s 8.504s 100.0% 271.7% 1-2 9.425s 6.295s 74.0% 201.1% 1-3 9.708s 6.578s 77.4% 210.2% 1-4 8.062s 4.932s 58.0% 157.6% Large 4k object (v2): None 22.107s 18.977s 100.0% 606.3% 1-2 20.960s 17.830s 94.0% 569.6% 1-3 14.238s 11.108s 58.5% 354.9% 1-4 11.329s 8.199s 43.2% 261.9% Large 4k object (v1): None 36.807s 33.677s 100.0% 1075.9% 1-2 36.648s 33.518s 99.5% 1070.9% 1-3 22.345s 19.215s 57.1% 613.9% 1-4 18.662s 15.532s 46.1% 496.2% N.B. %age 1 = overhead/unpatched overhead %age 2 = overhead/accounting disabled time Patch 2 (vmstat data stock caching) helps in both the small object test and the large v2 object test. It doesn't help much in v1 big object test. Patch 3 (refill_obj_stock improvement) does help the small object test but offer significant performance improvement for the large object test (both v1 and v2). Patch 4 (eliminating irq disable/enable) helps in all test cases. To test for the extreme case, a multi-threaded kmalloc/kfree microbenchmark was run on the 2-socket 48-core 96-thread system with 96 testing threads in the same memcg doing kmalloc+kfree of a 4k object with accounting enabled for 10s. The total number of kmalloc+kfree done in kilo operations per second (kops/s) were as follows: Applied patches v1 kops/s v1 change v2 kops/s v2 change --------------- --------- --------- --------- --------- None 3,520 1.00X 6,242 1.00X 1-2 4,304 1.22X 8,478 1.36X 1-3 4,731 1.34X 418,142 66.99X 1-4 4,587 1.30X 438,838 70.30X With memory accounting disabled, the kmalloc/kfree rate was 1,481,291 kop/s. This test shows how significant the memory accouting overhead can be in some extreme situations. For this multithreaded test, the improvement from patch 2 mainly comes from the conditional atomic xchg of objcg->nr_charged_bytes in mod_objcg_state(). By using an unconditional xchg, the operation rates were similar to the unpatched kernel. Patch 3 elminates the single highly contended cacheline of objcg->nr_charged_bytes for cgroup v2 leading to a huge performance improvement. Cgroup v1, however, still has another highly contended cacheline in the shared page counter &memcg->kmem. So the improvement is only modest. Patch 4 helps in cgroup v2, but performs worse in cgroup v1 as eliminating the irq_disable/irq_enable overhead seems to aggravate the cacheline contention. [1] https://lore.kernel.org/linux-mm/20210408193948.vfktg3azh2wrt56t@gabell/T/#u [2] https://lore.kernel.org/lkml/20210114025151.GA22932@xsang-OptiPlex-9020/ This patch (of 4): mod_objcg_state() is moved from mm/slab.h to mm/memcontrol.c so that further optimization can be done to it in later patches without exposing unnecessary details to other mm components. Link: https://lkml.kernel.org/r/20210506150007.16288-1-longman@redhat.com Link: https://lkml.kernel.org/r/20210506150007.16288-2-longman@redhat.com Signed-off-by: Waiman Long Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Alex Shi Cc: Chris Down Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Masayoshi Mizuma Cc: Matthew Wilcox Cc: Michal Hocko Cc: Muchun Song Cc: Pekka Enberg Cc: Tejun Heo Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: Wei Yang Cc: Xing Zhengjun Cc: Yafang Shao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eea4a5011ae520c98d0a14474ecde44f29659861 Author: Huang Ying Date: Mon Jun 28 19:37:16 2021 -0700 swap: check mapping_empty() for swap cache before being freed To check whether all pages and shadow entries in swap cache has been removed before swap cache is freed. Link: https://lkml.kernel.org/r/20210608005121.511140-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Miaohe Lin Cc: Matthew Wilcox Cc: Minchan Kim Cc: Joonsoo Kim Cc: Johannes Weiner Cc: Vlastimil Babka Cc: Hugh Dickins Cc: Mel Gorman Cc: Michal Hocko Cc: Dan Williams Cc: Christoph Hellwig Cc: Ilya Dryomov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4c4a3f48480730214c4f02ffa480f6bf5b0718f Author: Huang Ying Date: Mon Jun 28 19:37:12 2021 -0700 mm: free idle swap cache page after COW With commit 09854ba94c6a ("mm: do_wp_page() simplification"), after COW, the idle swap cache page (neither the page nor the corresponding swap entry is mapped by any process) will be left in the LRU list, even if it's in the active list or the head of the inactive list. So, the page reclaimer may take quite some overhead to reclaim these actually unused pages. To help the page reclaiming, in this patch, after COW, the idle swap cache page will be tried to be freed. To avoid to introduce much overhead to the hot COW code path, a) there's almost zero overhead for non-swap case via checking PageSwapCache() firstly. b) the page lock is acquired via trylock only. To test the patch, we used pmbench memory accessing benchmark with working-set larger than available memory on a 2-socket Intel server with a NVMe SSD as swap device. Test results shows that the pmbench score increases up to 23.8% with the decreased size of swap cache and swapin throughput. Link: https://lkml.kernel.org/r/20210601053143.1380078-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Suggested-by: Johannes Weiner [use free_swap_cache()] Acked-by: Johannes Weiner Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Peter Xu Cc: Mel Gorman Cc: Rik van Riel Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Dave Hansen Cc: Tim Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4b451143fa275a31f17a93adac3b8dbb3d20ca2 Author: Huang Ying Date: Mon Jun 28 19:37:09 2021 -0700 mm, swap: remove unnecessary smp_rmb() in swap_type_to_swap_info() Before commit c10d38cc8d3e ("mm, swap: bounds check swap_info array accesses to avoid NULL derefs"), the typical code to reference the swap_info[] is as follows, type = swp_type(swp_entry); if (type >= nr_swapfiles) /* handle invalid swp_entry */; p = swap_info[type]; /* access fields of *p. OOPS! p may be NULL! */ Because the ordering isn't guaranteed, it's possible that swap_info[type] is read before "nr_swapfiles". And that may result in NULL pointer dereference. So after commit c10d38cc8d3e, the code becomes, struct swap_info_struct *swap_type_to_swap_info(int type) { if (type >= READ_ONCE(nr_swapfiles)) return NULL; smp_rmb(); return READ_ONCE(swap_info[type]); } /* users */ type = swp_type(swp_entry); p = swap_type_to_swap_info(type); if (!p) /* handle invalid swp_entry */; /* dereference p */ Where the value of swap_info[type] (that is, "p") is checked to be non-zero before being dereferenced. So, the NULL deferencing becomes impossible even if "nr_swapfiles" is read after swap_info[type]. Therefore, the "smp_rmb()" becomes unnecessary. And, we don't even need to read "nr_swapfiles" here. Because the non-zero checking for "p" is sufficient. We just need to make sure we will not access out of the boundary of the array. With the change, nr_swapfiles will only be accessed with swap_lock held, except in swapcache_free_entries(). Where the absolute correctness of the value isn't needed, as described in the comments. We still need to guarantee swap_info[type] is read before being dereferenced. That can be satisfied via the data dependency ordering enforced by READ_ONCE(swap_info[type]). This needs to be paired with proper write barriers. So smp_store_release() is used in alloc_swap_info() to guarantee the fields of *swap_info[type] is initialized before swap_info[type] itself being written. Note that the fields of *swap_info[type] is initialized to be 0 via kvzalloc() firstly. The assignment and deferencing of swap_info[type] is like rcu_assign_pointer() and rcu_dereference(). Link: https://lkml.kernel.org/r/20210520073301.1676294-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Cc: Daniel Jordan Cc: Dan Carpenter Cc: Andrea Parri Cc: Peter Zijlstra (Intel) Cc: Andi Kleen Cc: Dave Hansen Cc: Omar Sandoval Cc: Paul McKenney Cc: Tejun Heo Cc: Will Deacon Cc: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1cfcc8306a767bda9a8fe6fddb3e80ca9ab7656b Author: Miaohe Lin Date: Mon Jun 28 19:37:06 2021 -0700 mm/swap_slots.c: delete meaningless forward declarations deactivate_swap_slots_cache() and reactivate_swap_slots_cache() are only called below their implementations. So these forward declarations are meaningless and should be removed. Link: https://lkml.kernel.org/r/20210520134022.1370406-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb7709c5f3e55e230b9c8d8e79aa261b316066c2 Author: Miaohe Lin Date: Mon Jun 28 19:37:03 2021 -0700 mm/swap: remove unused local variable nr_shadows Since commit 55c653b71e8c ("mm: stop accounting shadow entries"), nr_shadows is not used anymore. Link: https://lkml.kernel.org/r/20210520134022.1370406-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Matthew Wilcox (Oracle) Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb243f7dc62429343404b052e9c51d745e618346 Author: Miaohe Lin Date: Mon Jun 28 19:37:00 2021 -0700 mm/swapfile: move get_swap_page_of_type() under CONFIG_HIBERNATION Patch series "Cleanups for swap", v2. This series contains just cleanups to remove some unused variables, delete meaningless forward declarations and so on. More details can be found in the respective changelogs. This patch (of 4): We should move get_swap_page_of_type() under CONFIG_HIBERNATION since the only caller of this function is now suspend routine. [linmiaohe@huawei.com: move scan_swap_map() under CONFIG_HIBERNATION] Link: https://lkml.kernel.org/r/20210521070855.2015094-1-linmiaohe@huawei.com [linmiaohe@huawei.com: fold scan_swap_map() into the only caller get_swap_page_of_type()] Link: https://lkml.kernel.org/r/20210527120328.3935132-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210520134022.1370406-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210520134022.1370406-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2efa33fc7f6ec94a3a538c1a264273c889be2b36 Author: Miaohe Lin Date: Mon Jun 28 19:36:57 2021 -0700 mm/shmem: fix shmem_swapin() race with swapoff When I was investigating the swap code, I found the below possible race window: CPU 1 CPU 2 ----- ----- shmem_swapin swap_cluster_readahead if (likely(si->flags & (SWP_BLKDEV | SWP_FS_OPS))) { swapoff .. si->swap_file = NULL; .. struct inode *inode = si->swap_file->f_mapping->host;[oops!] Close this race window by using get/put_swap_device() to guard against concurrent swapoff. Link: https://lkml.kernel.org/r/20210426123316.806267-5-linmiaohe@huawei.com Fixes: 8fd2e0b505d1 ("mm: swap: check if swap backing device is congested or not") Signed-off-by: Miaohe Lin Reviewed-by: "Huang, Ying" Cc: Dennis Zhou Cc: Tim Chen Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Joonsoo Kim Cc: Alex Shi Cc: Matthew Wilcox Cc: Minchan Kim Cc: Wei Yang Cc: Yang Shi Cc: David Hildenbrand Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c046235a826370d528a29c44e0ce05f9685d8b4 Author: Miaohe Lin Date: Mon Jun 28 19:36:53 2021 -0700 mm/swap: remove confusing checking for non_swap_entry() in swap_ra_info() The non_swap_entry() was used for working with VMA based swap readahead via commit ec560175c0b6 ("mm, swap: VMA based swap readahead"). At that time, the non_swap_entry() checking is necessary because the function is called before checking that in do_swap_page(). Then it's moved to swap_ra_info() since commit eaf649ebc3ac ("mm: swap: clean up swap readahead"). After that, the non_swap_entry() checking is unnecessary, because swap_ra_info() is called after non_swap_entry() has been checked already. The resulting code is confusing as the non_swap_entry() check looks racy now because while we released the pte lock, somebody else might have faulted in this pte. So we should check whether it's swap pte first to guard against such race or swap_type will be unexpected. But the race isn't important because it will not cause problem. We would have enough checking when we really operate the PTE entries later. So we remove the non_swap_entry() check here to avoid confusion. Link: https://lkml.kernel.org/r/20210426123316.806267-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: "Huang, Ying" Cc: Alex Shi Cc: David Hildenbrand Cc: Dennis Zhou Cc: Hugh Dickins Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Michal Hocko Cc: Minchan Kim Cc: Tim Chen Cc: Wei Yang Cc: Yang Shi Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2799e77529c2a25492a4395db93996e3dacd762d Author: Miaohe Lin Date: Mon Jun 28 19:36:50 2021 -0700 swap: fix do_swap_page() race with swapoff When I was investigating the swap code, I found the below possible race window: CPU 1 CPU 2 ----- ----- do_swap_page if (data_race(si->flags & SWP_SYNCHRONOUS_IO) swap_readpage if (data_race(sis->flags & SWP_FS_OPS)) { swapoff .. p->swap_file = NULL; .. struct file *swap_file = sis->swap_file; struct address_space *mapping = swap_file->f_mapping;[oops!] Note that for the pages that are swapped in through swap cache, this isn't an issue. Because the page is locked, and the swap entry will be marked with SWAP_HAS_CACHE, so swapoff() can not proceed until the page has been unlocked. Fix this race by using get/put_swap_device() to guard against concurrent swapoff. Link: https://lkml.kernel.org/r/20210426123316.806267-3-linmiaohe@huawei.com Fixes: 0bcac06f27d7 ("mm,swap: skip swapcache for swapin of synchronous device") Signed-off-by: Miaohe Lin Reviewed-by: "Huang, Ying" Cc: Alex Shi Cc: David Hildenbrand Cc: Dennis Zhou Cc: Hugh Dickins Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Michal Hocko Cc: Minchan Kim Cc: Tim Chen Cc: Wei Yang Cc: Yang Shi Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63d8620ecf93b5d8d0a254471184d08f8e8f538d Author: Miaohe Lin Date: Mon Jun 28 19:36:46 2021 -0700 mm/swapfile: use percpu_ref to serialize against concurrent swapoff Patch series "close various race windows for swap", v6. When I was investigating the swap code, I found some possible race windows. This series aims to fix all these races. But using current get/put_swap_device() to guard against concurrent swapoff for swap_readpage() looks terrible because swap_readpage() may take really long time. And to reduce the performance overhead on the hot-path as much as possible, it appears we can use the percpu_ref to close this race window(as suggested by Huang, Ying). The patch 1 adds percpu_ref support for swap and most of the remaining patches try to use this to close various race windows. More details can be found in the respective changelogs. This patch (of 4): Using current get/put_swap_device() to guard against concurrent swapoff for some swap ops, e.g. swap_readpage(), looks terrible because they might take really long time. This patch adds the percpu_ref support to serialize against concurrent swapoff(as suggested by Huang, Ying). Also we remove the SWP_VALID flag because it's used together with RCU solution. Link: https://lkml.kernel.org/r/20210426123316.806267-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210426123316.806267-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: "Huang, Ying" Cc: Alex Shi Cc: David Hildenbrand Cc: Dennis Zhou Cc: Hugh Dickins Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Michal Hocko Cc: Minchan Kim Cc: Tim Chen Cc: Wei Yang Cc: Yang Shi Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e17eae2b839937817d771e2f5d2b30e5e2b81bb7 Author: Christophe Leroy Date: Mon Jun 28 19:36:43 2021 -0700 mm: pagewalk: fix walk for hugepage tables Pagewalk ignores hugepd entries and walk down the tables as if it was traditionnal entries, leading to crazy result. Add walk_hugepd_range() and use it to walk hugepage tables. Link: https://lkml.kernel.org/r/38d04410700c8d02f28ba37e020b62c55d6f3d2c.1624597695.git.christophe.leroy@csgroup.eu Signed-off-by: Christophe Leroy Reviewed-by: Steven Price Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Daniel Axtens Cc: "Oliver O'Halloran" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a458b76a4171f893efa7657dc079924580a8746a Author: Andrea Arcangeli Date: Mon Jun 28 19:36:40 2021 -0700 mm: gup: pack has_pinned in MMF_HAS_PINNED has_pinned 32bit can be packed in the MMF_HAS_PINNED bit as a noop cleanup. Any atomic_inc/dec to the mm cacheline shared by all threads in pin-fast would reintroduce a loss of SMP scalability to pin-fast, so there's no future potential usefulness to keep an atomic in the mm for this. set_bit(MMF_HAS_PINNED) will be theoretically a bit slower than WRITE_ONCE (atomic_set is equivalent to WRITE_ONCE), but the set_bit (just like atomic_set after this commit) has to be still issued only once per "mm", so the difference between the two will be lost in the noise. will-it-scale "mmap2" shows no change in performance with enterprise config as expected. will-it-scale "pin_fast" retains the > 4000% SMP scalability performance improvement against upstream as expected. This is a noop as far as overall performance and SMP scalability are concerned. [peterx@redhat.com: pack has_pinned in MMF_HAS_PINNED] Link: https://lkml.kernel.org/r/YJqWESqyxa8OZA+2@t490s [akpm@linux-foundation.org: coding style fixes] [peterx@redhat.com: fix build for task_mmu.c, introduce mm_set_has_pinned_flag, fix comments] Link: https://lkml.kernel.org/r/20210507150553.208763-4-peterx@redhat.com Signed-off-by: Andrea Arcangeli Signed-off-by: Peter Xu Reviewed-by: John Hubbard Cc: Hugh Dickins Cc: Jan Kara Cc: Jann Horn Cc: Jason Gunthorpe Cc: Kirill Shutemov Cc: Kirill Tkhai Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 292648ac5cf16ec1fce33e29e0f9e35da7de63f7 Author: Andrea Arcangeli Date: Mon Jun 28 19:36:36 2021 -0700 mm: gup: allow FOLL_PIN to scale in SMP has_pinned cannot be written by each pin-fast or it won't scale in SMP. This isn't "false sharing" strictly speaking (it's more like "true non-sharing"), but it creates the same SMP scalability bottleneck of "false sharing". To verify the improvement, below test is done on 40 cpus host with Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz (must be with CONFIG_GUP_TEST=y): $ sudo chrt -f 1 ./gup_test -a -m 512 -j 40 Where we can get (average value for 40 threads): Old kernel: 477729.97 (+- 3.79%) New kernel: 89144.65 (+-11.76%) On a similar condition with 256 cpus, this commits increases the SMP scalability of pin_user_pages_fast() executed by different threads of the same process by more than 4000%. [peterx@redhat.com: rewrite commit message, add parentheses against "(A & B)"] Link: https://lkml.kernel.org/r/20210507150553.208763-3-peterx@redhat.com Signed-off-by: Andrea Arcangeli Signed-off-by: Peter Xu Reviewed-by: John Hubbard Cc: Hugh Dickins Cc: Jan Kara Cc: Jann Horn Cc: Jason Gunthorpe Cc: Kirill Shutemov Cc: Kirill Tkhai Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f39bd8534594535f6fd968ee7e05d6a70b74d1a9 Author: Peter Xu Date: Mon Jun 28 19:36:33 2021 -0700 mm/gup_benchmark: support threading Patch series "mm/gup: Fix pin page write cache bouncing on has_pinned", v2. This series contains 3 patches, the 1st one enables threading for gup_benchmark in the kselftest. The latter two patches are collected from Andrea's local branch which can fix write cache bouncing issue with pinning fast-gup. To be explicit on the latter two patches: - the 2nd patch fixes the perf degrade when introducing has_pinned, then - the last patch tries to remove the has_pinned with a bit in mm->flags For patch 3: originally I think we had a plan to reuse has_pinned into a counter very soon, however that's not happening at least until today, so maybe it proves that we can remove it until we really want such a counter for whatever reason. As the commit message stated, it saves 4 bytes for each mm without observable regressions. Regarding testing: we can reference to the commit message of patch 2 for some detailed testing with will-is-scale. Meanwhile I did patch 1 just because then we can even easily verify the patchset using the existing kselftest facilities or even regress test it in the future with the repo if we want. Below numbers are extra verification tests that I did besides commit message of patch 2 using the new gup_benchmark and 256 cpus. Below test is done on 40 cpus host with Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, and I can get similar result (of course the write cache bouncing get severe with even more cores). After patch 1 applied (only test patch, so using old kernel): $ sudo chrt -f 1 ./gup_test -a -m 512 -j 40 PIN_FAST_BENCHMARK: Time: get:459632 put:5990 us PIN_FAST_BENCHMARK: Time: get:461967 put:5840 us PIN_FAST_BENCHMARK: Time: get:464521 put:6140 us PIN_FAST_BENCHMARK: Time: get:465176 put:7100 us PIN_FAST_BENCHMARK: Time: get:465960 put:6733 us PIN_FAST_BENCHMARK: Time: get:465324 put:6781 us PIN_FAST_BENCHMARK: Time: get:466018 put:7130 us PIN_FAST_BENCHMARK: Time: get:466362 put:7118 us PIN_FAST_BENCHMARK: Time: get:465118 put:6975 us PIN_FAST_BENCHMARK: Time: get:466422 put:6602 us PIN_FAST_BENCHMARK: Time: get:465791 put:6818 us PIN_FAST_BENCHMARK: Time: get:467091 put:6298 us PIN_FAST_BENCHMARK: Time: get:467694 put:5432 us PIN_FAST_BENCHMARK: Time: get:469575 put:5581 us PIN_FAST_BENCHMARK: Time: get:468124 put:6055 us PIN_FAST_BENCHMARK: Time: get:468877 put:6720 us PIN_FAST_BENCHMARK: Time: get:467212 put:4961 us PIN_FAST_BENCHMARK: Time: get:467834 put:6697 us PIN_FAST_BENCHMARK: Time: get:470778 put:6398 us PIN_FAST_BENCHMARK: Time: get:469788 put:6310 us PIN_FAST_BENCHMARK: Time: get:488277 put:7113 us PIN_FAST_BENCHMARK: Time: get:486613 put:7085 us PIN_FAST_BENCHMARK: Time: get:486940 put:7202 us PIN_FAST_BENCHMARK: Time: get:488728 put:7101 us PIN_FAST_BENCHMARK: Time: get:487570 put:7327 us PIN_FAST_BENCHMARK: Time: get:489260 put:7027 us PIN_FAST_BENCHMARK: Time: get:488846 put:6866 us PIN_FAST_BENCHMARK: Time: get:488521 put:6745 us PIN_FAST_BENCHMARK: Time: get:489950 put:6459 us PIN_FAST_BENCHMARK: Time: get:489777 put:6617 us PIN_FAST_BENCHMARK: Time: get:488224 put:6591 us PIN_FAST_BENCHMARK: Time: get:488644 put:6477 us PIN_FAST_BENCHMARK: Time: get:488754 put:6711 us PIN_FAST_BENCHMARK: Time: get:488875 put:6743 us PIN_FAST_BENCHMARK: Time: get:489290 put:6657 us PIN_FAST_BENCHMARK: Time: get:490264 put:6684 us PIN_FAST_BENCHMARK: Time: get:489631 put:6737 us PIN_FAST_BENCHMARK: Time: get:488434 put:6655 us PIN_FAST_BENCHMARK: Time: get:492213 put:6297 us PIN_FAST_BENCHMARK: Time: get:491124 put:6173 us After the whole series applied (new fixed kernel): $ sudo chrt -f 1 ./gup_test -a -m 512 -j 40 PIN_FAST_BENCHMARK: Time: get:82038 put:7041 us PIN_FAST_BENCHMARK: Time: get:82144 put:6817 us PIN_FAST_BENCHMARK: Time: get:83417 put:6674 us PIN_FAST_BENCHMARK: Time: get:82540 put:6594 us PIN_FAST_BENCHMARK: Time: get:83214 put:6681 us PIN_FAST_BENCHMARK: Time: get:83444 put:6889 us PIN_FAST_BENCHMARK: Time: get:83194 put:7499 us PIN_FAST_BENCHMARK: Time: get:84876 put:7369 us PIN_FAST_BENCHMARK: Time: get:86092 put:10289 us PIN_FAST_BENCHMARK: Time: get:86153 put:10415 us PIN_FAST_BENCHMARK: Time: get:85026 put:7751 us PIN_FAST_BENCHMARK: Time: get:85458 put:7944 us PIN_FAST_BENCHMARK: Time: get:85735 put:8154 us PIN_FAST_BENCHMARK: Time: get:85851 put:8299 us PIN_FAST_BENCHMARK: Time: get:86323 put:9617 us PIN_FAST_BENCHMARK: Time: get:86288 put:10496 us PIN_FAST_BENCHMARK: Time: get:87697 put:9346 us PIN_FAST_BENCHMARK: Time: get:87980 put:8382 us PIN_FAST_BENCHMARK: Time: get:88719 put:8400 us PIN_FAST_BENCHMARK: Time: get:87616 put:8588 us PIN_FAST_BENCHMARK: Time: get:86730 put:9563 us PIN_FAST_BENCHMARK: Time: get:88167 put:8673 us PIN_FAST_BENCHMARK: Time: get:86844 put:9777 us PIN_FAST_BENCHMARK: Time: get:88068 put:11774 us PIN_FAST_BENCHMARK: Time: get:86170 put:15676 us PIN_FAST_BENCHMARK: Time: get:87967 put:12827 us PIN_FAST_BENCHMARK: Time: get:95773 put:7652 us PIN_FAST_BENCHMARK: Time: get:87734 put:13650 us PIN_FAST_BENCHMARK: Time: get:89833 put:14237 us PIN_FAST_BENCHMARK: Time: get:96186 put:8029 us PIN_FAST_BENCHMARK: Time: get:95532 put:8886 us PIN_FAST_BENCHMARK: Time: get:95351 put:5826 us PIN_FAST_BENCHMARK: Time: get:96401 put:8407 us PIN_FAST_BENCHMARK: Time: get:96473 put:8287 us PIN_FAST_BENCHMARK: Time: get:97177 put:8430 us PIN_FAST_BENCHMARK: Time: get:98120 put:5263 us PIN_FAST_BENCHMARK: Time: get:96271 put:7757 us PIN_FAST_BENCHMARK: Time: get:99628 put:10467 us PIN_FAST_BENCHMARK: Time: get:99344 put:10045 us PIN_FAST_BENCHMARK: Time: get:94212 put:15485 us Summary: Old kernel: 477729.97 (+-3.79%) New kernel: 89144.65 (+-11.76%) This patch (of 3): Add a new parameter "-j N" to support concurrent gup test. Link: https://lkml.kernel.org/r/20210507150553.208763-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20210507150553.208763-2-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: John Hubbard Cc: Jan Kara Cc: Michal Hocko Cc: Kirill Tkhai Cc: Kirill Shutemov Cc: Oleg Nesterov Cc: Jann Horn Cc: Andrea Arcangeli Cc: Jason Gunthorpe Cc: Matthew Wilcox Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a6b2162005f24c7caa10d7f10dba487629787f2 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:36:30 2021 -0700 mm: move page dirtying prototypes from mm.h These functions implement the address_space ->set_page_dirty operation and should live in pagemap.h, not mm.h so that the rest of the kernel doesn't get funny ideas about calling them directly. Link: https://lkml.kernel.org/r/20210615162342.1669332-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b82a96c9253333a8834b2df5f262a39cccf4f6c7 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:36:27 2021 -0700 fs: remove noop_set_page_dirty() Use __set_page_dirty_no_writeback() instead. This will set the dirty bit on the page, which will be used to avoid calling set_page_dirty() in the future. It will have no effect on actually writing the page back, as the pages are not on any LRU lists. [akpm@linux-foundation.org: export __set_page_dirty_no_writeback() to modules] Link: https://lkml.kernel.org/r/20210615162342.1669332-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Al Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc50eee3291556d623b64bb4b1dc345b971e184e Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:36:24 2021 -0700 fs: remove anon_set_page_dirty() Use __set_page_dirty_no_writeback() instead. This will set the dirty bit on the page, which will be used to avoid calling set_page_dirty() in the future. It will have no effect on actually writing the page back, as the pages are not on any LRU lists. Link: https://lkml.kernel.org/r/20210615162342.1669332-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fd7353f88bde80d557b6d74a5351979fc8b1b8db Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:36:21 2021 -0700 iomap: use __set_page_dirty_nobuffers The only difference between iomap_set_page_dirty() and __set_page_dirty_nobuffers() is that the latter includes a debugging check that a !Uptodate page has private data. Link: https://lkml.kernel.org/r/20210615162342.1669332-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f18be363c3332dedaabb9fc050a282a00f4f646 Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:36:18 2021 -0700 mm/writeback: use __set_page_dirty in __set_page_dirty_nobuffers This is fundamentally the same code, so just call it instead of duplicating it. Link: https://lkml.kernel.org/r/20210615162342.1669332-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Cc: Al Viro Cc: Dan Williams Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e1cae881a0646f31fe2bda90297d820da1137eb Author: Matthew Wilcox (Oracle) Date: Mon Jun 28 19:36:15 2021 -0700 mm/writeback: move __set_page_dirty() to core mm Patch series "Further set_page_dirty cleanups". Prompted by Christoph's recent patches, here are some more patches to improve the state of set_page_dirty(). They're all from the folio tree, so they've been tested to a certain extent. This patch (of 6): Nothing in __set_page_dirty() is specific to buffer_head, so move it to mm/page-writeback.c. That removes the only caller of account_page_dirtied() outside of page-writeback.c, so make it static. Link: https://lkml.kernel.org/r/20210615162342.1669332-1-willy@infradead.org Link: https://lkml.kernel.org/r/20210615162342.1669332-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Cc: Jan Kara Cc: Al Viro Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0af573780b0b13fceb7fabd49dc1b073cee9a507 Author: Christoph Hellwig Date: Mon Jun 28 19:36:12 2021 -0700 mm: require ->set_page_dirty to be explicitly wired up Remove the CONFIG_BLOCK default to __set_page_dirty_buffers and just wire that method up for the missing instances. [hch@lst.de: ecryptfs: add a ->set_page_dirty cludge] Link: https://lkml.kernel.org/r/20210624125250.536369-1-hch@lst.de Link: https://lkml.kernel.org/r/20210614061512.3966143-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Cc: Al Viro Cc: Matthew Wilcox (Oracle) Cc: Tyler Hicks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1e3dbe9818e3caa4e467255a348df56912ca549 Author: Christoph Hellwig Date: Mon Jun 28 19:36:09 2021 -0700 fs: move ramfs_aops to libfs Move the ramfs aops to libfs and reuse them for kernfs and configfs. Thosw two did not wire up ->set_page_dirty before and now get __set_page_dirty_no_writeback, which is the right one for no-writeback address_space usage. Drop the now unused exports of the libfs helpers only used for ramfs-style pagecache usage. Link: https://lkml.kernel.org/r/20210614061512.3966143-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Cc: Al Viro Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34ebcce793245e64db3b40f24486c59668e1f059 Author: Christoph Hellwig Date: Mon Jun 28 19:36:06 2021 -0700 fs: unexport __set_page_dirty Patch series "remove the implicit .set_page_dirty default". This series cleans up a few lose ends around ->set_page_dirty, most importantly removes the default to the buffer head based on if no method is wired up. This patch (of 3): __set_page_dirty is only used by built-in code. Link: https://lkml.kernel.org/r/20210614061512.3966143-1-hch@lst.de Link: https://lkml.kernel.org/r/20210614061512.3966143-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Matthew Wilcox (Oracle) Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c22d70a162d3cc177282c4487be4d54876ca55c8 Author: Roman Gushchin Date: Mon Jun 28 19:36:03 2021 -0700 writeback, cgroup: release dying cgwbs by switching attached inodes Asynchronously try to release dying cgwbs by switching attached inodes to the nearest living ancestor wb. It helps to get rid of per-cgroup writeback structures themselves and of pinned memory and block cgroups, which are significantly larger structures (mostly due to large per-cpu statistics data). This prevents memory waste and helps to avoid different scalability problems caused by large piles of dying cgroups. Reuse the existing mechanism of inode switching used for foreign inode detection. To speed things up batch up to 115 inode switching in a single operation (the maximum number is selected so that the resulting struct inode_switch_wbs_context can fit into 1024 bytes). Because every switching consists of two steps divided by an RCU grace period, it would be too slow without batching. Please note that the whole batch counts as a single operation (when increasing/decreasing isw_nr_in_flight). This allows to keep umounting working (flush the switching queue), however prevents cleanups from consuming the whole switching quota and effectively blocking the frn switching. A cgwb cleanup operation can fail due to different reasons (e.g. not enough memory, the cgwb has an in-flight/pending io, an attached inode in a wrong state, etc). In this case the next scheduled cleanup will make a new attempt. An attempt is made each time a new cgwb is offlined (in other words a memcg and/or a blkcg is deleted by a user). In the future an additional attempt scheduled by a timer can be implemented. [guro@fb.com: replace open-coded "115" with arithmetic] Link: https://lkml.kernel.org/r/YMEcSBcq/VXMiPPO@carbon.dhcp.thefacebook.com [guro@fb.com: add smp_mb() to inode_prepare_wbs_switch()] Link: https://lkml.kernel.org/r/YMFa+guFw7OFjf3X@carbon.dhcp.thefacebook.com [willy@infradead.org: fix documentation] Link: https://lkml.kernel.org/r/20210615200242.1716568-2-willy@infradead.org Link: https://lkml.kernel.org/r/20210608230225.2078447-9-guro@fb.com Signed-off-by: Roman Gushchin Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Tejun Heo Acked-by: Dennis Zhou Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dave Chinner Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5fbe6b7ad6ef1fbdf8074a6ca9fdab739bf86d4 Author: Roman Gushchin Date: Mon Jun 28 19:35:59 2021 -0700 writeback, cgroup: support switching multiple inodes at once Currently only a single inode can be switched to another writeback structure at once. That means to switch an inode a separate inode_switch_wbs_context structure must be allocated, and a separate rcu callback and work must be scheduled. It's fine for the existing ad-hoc switching, which is not happening that often, but sub-optimal for massive switching required in order to release a writeback structure. To prepare for it, let's add a support for switching multiple inodes at once. Instead of containing a single inode pointer, inode_switch_wbs_context will contain a NULL-terminated array of inode pointers. inode_do_switch_wbs() will be called for each inode. To optimize the locking bdi->wb_switch_rwsem, old_wb's and new_wb's list_locks will be acquired and released only once altogether for all inodes. wb_wakeup() will be also be called only once. Instead of calling wb_put(old_wb) after each successful switch, wb_put_many() is introduced and used. Link: https://lkml.kernel.org/r/20210608230225.2078447-8-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Reviewed-by: Jan Kara Acked-by: Dennis Zhou Cc: Alexander Viro Cc: Dave Chinner Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72d4512e9cb14d790e361c0e085186a7ef2d2431 Author: Roman Gushchin Date: Mon Jun 28 19:35:56 2021 -0700 writeback, cgroup: split out the functional part of inode_switch_wbs_work_fn() Split out the functional part of the inode_switch_wbs_work_fn() function as inode_do switch_wbs() to reuse it later for switching inodes attached to dying cgwbs. This commit doesn't bring any functional changes. Link: https://lkml.kernel.org/r/20210608230225.2078447-7-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Jan Kara Acked-by: Tejun Heo Acked-by: Dennis Zhou Cc: Alexander Viro Cc: Dave Chinner Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3b6a6df38aa514d97e8c6fcc748be1d4142bec9 Author: Roman Gushchin Date: Mon Jun 28 19:35:53 2021 -0700 writeback, cgroup: keep list of inodes attached to bdi_writeback Currently there is no way to iterate over inodes attached to a specific cgwb structure. It limits the ability to efficiently reclaim the writeback structure itself and associated memory and block cgroup structures without scanning all inodes belonging to a sb, which can be prohibitively expensive. While dirty/in-active-writeback an inode belongs to one of the bdi_writeback's io lists: b_dirty, b_io, b_more_io and b_dirty_time. Once cleaned up, it's removed from all io lists. So the inode->i_io_list can be reused to maintain the list of inodes, attached to a bdi_writeback structure. This patch introduces a new wb->b_attached list, which contains all inodes which were dirty at least once and are attached to the given cgwb. Inodes attached to the root bdi_writeback structures are never placed on such list. The following patch will use this list to try to release cgwbs structures more efficiently. Link: https://lkml.kernel.org/r/20210608230225.2078447-6-guro@fb.com Signed-off-by: Roman Gushchin Suggested-by: Jan Kara Reviewed-by: Jan Kara Acked-by: Tejun Heo Acked-by: Dennis Zhou Cc: Alexander Viro Cc: Dave Chinner Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29264d92a0f157f3147129066d912718b99fc6b0 Author: Roman Gushchin Date: Mon Jun 28 19:35:50 2021 -0700 writeback, cgroup: switch to rcu_work API in inode_switch_wbs() Inode's wb switching requires two steps divided by an RCU grace period. It's currently implemented as an RCU callback inode_switch_wbs_rcu_fn(), which schedules inode_switch_wbs_work_fn() as a work. Switching to the rcu_work API allows to do the same in a cleaner and slightly shorter form. Link: https://lkml.kernel.org/r/20210608230225.2078447-5-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Jan Kara Acked-by: Tejun Heo Acked-by: Dennis Zhou Cc: Alexander Viro Cc: Dave Chinner Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8826ee4fe75051f8cbfa5d4a9aa70565938e724c Author: Roman Gushchin Date: Mon Jun 28 19:35:47 2021 -0700 writeback, cgroup: increment isw_nr_in_flight before grabbing an inode isw_nr_in_flight is used to determine whether the inode switch queue should be flushed from the umount path. Currently it's increased after grabbing an inode and even scheduling the switch work. It means the umount path can walk past cleanup_offline_cgwb() with active inode references, which can result in a "Busy inodes after unmount." message and use-after-free issues (with inode->i_sb which gets freed). Fix it by incrementing isw_nr_in_flight before doing anything with the inode and decrementing in the case when switching wasn't scheduled. The problem hasn't yet been seen in the real life and was discovered by Jan Kara by looking into the code. Link: https://lkml.kernel.org/r/20210608230225.2078447-4-guro@fb.com Signed-off-by: Roman Gushchin Suggested-by: Jan Kara Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dave Chinner Cc: Dennis Zhou Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 592fa002180af3425ba962b8e74edd680f0ec77b Author: Roman Gushchin Date: Mon Jun 28 19:35:44 2021 -0700 writeback, cgroup: add smp_mb() to cgroup_writeback_umount() A full memory barrier is required between clearing SB_ACTIVE flag in generic_shutdown_super() and checking isw_nr_in_flight in cgroup_writeback_umount(), otherwise a new switch operation might be scheduled after atomic_read(&isw_nr_in_flight) returned 0. This would result in a non-flushed isw_wq, and a potential crash. The problem hasn't yet been seen in the real life and was discovered by Jan Kara by looking into the code. Link: https://lkml.kernel.org/r/20210608230225.2078447-3-guro@fb.com Signed-off-by: Roman Gushchin Suggested-by: Jan Kara Reviewed-by: Jan Kara Cc: Alexander Viro Cc: Dave Chinner Cc: Dennis Zhou Cc: Jan Kara Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ade5867b4b878b00a4526b8621442f9442536ce Author: Roman Gushchin Date: Mon Jun 28 19:35:41 2021 -0700 writeback, cgroup: do not switch inodes with I_WILL_FREE flag Patch series "cgroup, blkcg: prevent dirty inodes to pin dying memory cgroups", v9. When an inode is getting dirty for the first time it's associated with a wb structure (see __inode_attach_wb()). It can later be switched to another wb (if e.g. some other cgroup is writing a lot of data to the same inode), but otherwise stays attached to the original wb until being reclaimed. The problem is that the wb structure holds a reference to the original memory and blkcg cgroups. So if an inode has been dirty once and later is actively used in read-only mode, it has a good chance to pin down the original memory and blkcg cgroups forever. This is often the case with services bringing data for other services, e.g. updating some rpm packages. In the real life it becomes a problem due to a large size of the memcg structure, which can easily be 1000x larger than an inode. Also a really large number of dying cgroups can raise different scalability issues, e.g. making the memory reclaim costly and less effective. To solve the problem inodes should be eventually detached from the corresponding writeback structure. It's inefficient to do it after every writeback completion. Instead it can be done whenever the original memory cgroup is offlined and writeback structure is getting killed. Scanning over a (potentially long) list of inodes and detach them from the writeback structure can take quite some time. To avoid scanning all inodes, attached inodes are kept on a new list (b_attached). To make it less noticeable to a user, the scanning and switching is performed from a work context. Big thanks to Jan Kara, Dennis Zhou, Hillf Danton and Tejun Heo for their ideas and contribution to this patchset. This patch (of 8): If an inode's state has I_WILL_FREE flag set, the inode will be freed soon, so there is no point in trying to switch the inode to a different cgwb. I_WILL_FREE was ignored since the introduction of the inode switching, so it looks like it doesn't lead to any noticeable issues for a user. This is why the patch is not intended for a stable backport. Link: https://lkml.kernel.org/r/20210608230225.2078447-1-guro@fb.com Link: https://lkml.kernel.org/r/20210608230225.2078447-2-guro@fb.com Signed-off-by: Roman Gushchin Suggested-by: Jan Kara Acked-by: Tejun Heo Reviewed-by: Jan Kara Acked-by: Dennis Zhou Cc: Alexander Viro Cc: Dave Chinner Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 87e3789749750d83aa085f04f74242087de0154b Author: Chi Wu Date: Mon Jun 28 19:35:37 2021 -0700 mm/page-writeback: use __this_cpu_inc() in account_page_dirtied() As account_page_dirtied() was always protected by xa_lock_irqsave(), so using __this_cpu_inc() is better. Link: https://lkml.kernel.org/r/20210512144742.4764-1-wuchi.zero@gmail.com Signed-off-by: Chi Wu Reviewed-by: Jan Kara Cc: Howard Cochran Cc: Miklos Szeredi Cc: Sedat Dilek Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0323155437870dbbae6e30fb659d7514c9f649da Author: Chi Wu Date: Mon Jun 28 19:35:34 2021 -0700 mm/page-writeback: update the comment of Dirty position control As the value of pos_ratio_polynom() clamp between 0 and 2LL << RATELIMIT_CALC_SHIFT, the global control line should be consistent with it. Link: https://lkml.kernel.org/r/20210511103606.3732-1-wuchi.zero@gmail.com Signed-off-by: Chi Wu Reviewed-by: Jan Kara Cc: Jens Axboe Cc: Howard Cochran Cc: Miklos Szeredi Cc: Sedat Dilek Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab19939a6a5010cba4e9cb04dd8bee03c72edcbd Author: Chi Wu Date: Mon Jun 28 19:35:31 2021 -0700 mm/page-writeback: Fix performance when BDI's share of ratio is 0. Fix performance when BDI's share of ratio is 0. The issue is similar to commit 74d369443325 ("writeback: Fix performance regression in wb_over_bg_thresh()"). Balance_dirty_pages and the writeback worker will also disagree on whether writeback when a BDI uses BDI_CAP_STRICTLIMIT and BDI's share of the thresh ratio is zero. For example, A thread on cpu0 writes 32 pages and then balance_dirty_pages, it will wake up background writeback and pauses because wb_dirty > wb->wb_thresh = 0 (share of thresh ratio is zero). A thread may runs on cpu0 again because scheduler prefers pre_cpu. Then writeback worker may runs on other cpus(1,2..) which causes the value of wb_stat(wb, WB_RECLAIMABLE) in wb_over_bg_thresh is 0 and does not writeback and returns. Thus, balance_dirty_pages keeps looping, sleeping and then waking up the worker who will do nothing. It remains stuck in this state until the writeback worker hit the right dirty cpu or the dirty pages expire. The fix that we should get the wb_stat_sum radically when thresh is low. Link: https://lkml.kernel.org/r/20210428225046.16301-1-wuchi.zero@gmail.com Signed-off-by: Chi Wu Reviewed-by: Jan Kara Cc: Tejun Heo Cc: Miklos Szeredi Cc: Sedat Dilek Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5defd497ed78fdc2bad115b0b4316c0c0de8b485 Author: Kefeng Wang Date: Mon Jun 28 19:35:28 2021 -0700 mm: page-writeback: kill get_writeback_state() comments The get_writeback_state() has gone since 2006, kill related comments. Link: https://lkml.kernel.org/r/20210508125026.56600-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8af4d0892cbb84fc3913de75ba5da374147a691 Author: Gavin Shan Date: Mon Jun 28 19:35:25 2021 -0700 virtio_balloon: specify page reporting order if needed The page reporting won't be triggered if the freeing page can't come up with a free area, whose size is equal or bigger than the threshold (page reporting order). The default page reporting order, equal to @pageblock_order, is too huge on some architectures to trigger page reporting. One example is ARM64 when 64KB base page size is used. PAGE_SIZE: 64KB pageblock_order: 13 (512MB) MAX_ORDER: 14 This specifies the page reporting order to 5 (2MB) for this specific case so that page reporting can be triggered. Link: https://lkml.kernel.org/r/20210625014710.42954-5-gshan@redhat.com Signed-off-by: Gavin Shan Reviewed-by: Alexander Duyck Cc: Michael S. Tsirkin Cc: David Hildenbrand Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f849c6f9572d8cef407f55928d3dc68fc42ad3e Author: Gavin Shan Date: Mon Jun 28 19:35:22 2021 -0700 mm/page_reporting: allow driver to specify reporting order The page reporting order (threshold) is sticky to @pageblock_order by default. The page reporting can never be triggered because the freeing page can't come up with a free area like that huge. The situation becomes worse when the system memory becomes heavily fragmented. For example, the following configurations are used on ARM64 when 64KB base page size is enabled. In this specific case, the page reporting won't be triggered until the freeing page comes up with a 512MB free area. That's hard to be met, especially when the system memory becomes heavily fragmented. PAGE_SIZE: 64KB HPAGE_SIZE: 512MB pageblock_order: 13 (512MB) MAX_ORDER: 14 This allows the drivers to specify the page reporting order when the page reporting device is registered. It falls back to @pageblock_order if it's not specified by the driver. The existing users (hv_balloon and virtio_balloon) don't specify it and @pageblock_order is still taken as their page reporting order. So this shouldn't introduce any functional changes. Link: https://lkml.kernel.org/r/20210625014710.42954-4-gshan@redhat.com Signed-off-by: Gavin Shan Reviewed-by: Alexander Duyck Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Hildenbrand Cc: "Michael S. Tsirkin" Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f58780a8e3851edae5bafb7d3af19425308a37f5 Author: Gavin Shan Date: Mon Jun 28 19:35:19 2021 -0700 mm/page_reporting: export reporting order as module parameter The macro PAGE_REPORTING_MIN_ORDER is defined as the page reporting threshold. It can't be adjusted at runtime. This introduces a variable (@page_reporting_order) to replace the marcro (PAGE_REPORTING_MIN_ORDER). MAX_ORDER is assigned to it initially, meaning the page reporting is disabled. It will be specified by driver if valid one is provided. Otherwise, it will fall back to @pageblock_order. It's also exported so that the page reporting order can be adjusted at runtime. Link: https://lkml.kernel.org/r/20210625014710.42954-3-gshan@redhat.com Signed-off-by: Gavin Shan Suggested-by: David Hildenbrand Reviewed-by: Alexander Duyck Cc: Anshuman Khandual Cc: Catalin Marinas Cc: "Michael S. Tsirkin" Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5631de543acb5c7a740534e727f7432e45a9e6dd Author: Gavin Shan Date: Mon Jun 28 19:35:16 2021 -0700 mm/page_reporting: fix code style in __page_reporting_request() Patch series "mm/page_reporting: Make page reporting work on arm64 with 64KB page size", v4. The page reporting threshold is currently equal to @pageblock_order, which is 13 and 512MB on arm64 with 64KB base page size selected. The page reporting won't be triggered if the freeing page can't come up with a free area like that huge. The condition is hard to be met, especially when the system memory becomes fragmented. This series intends to solve the issue by having page reporting threshold as 5 (2MB) on arm64 with 64KB base page size. The patches are organized as: PATCH[1/4] Fix some coding style in __page_reporting_request(). PATCH[2/4] Represents page reporting order with variable so that it can be exported as module parameter. PATCH[3/4] Allows the device driver (e.g. virtio_balloon) to specify the page reporting order when the device info is registered. PATCH[4/4] Specifies the page reporting order to 5, corresponding to 2MB in size on ARM64 when 64KB base page size is used. This patch (of 4): The lines of comments would be starting with one, instead two space. This corrects the style. Link: https://lkml.kernel.org/r/20210625014710.42954-1-gshan@redhat.com Link: https://lkml.kernel.org/r/20210625014710.42954-2-gshan@redhat.com Signed-off-by: Gavin Shan Reviewed-by: Alexander Duyck Cc: David Hildenbrand Cc: "Michael S. Tsirkin" Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 832b50725373e8c46781b7d4db104ec9cf564a6b Author: Nicolas Saenz Julienne Date: Mon Jun 28 19:35:13 2021 -0700 mm: mmap_lock: use local locks instead of disabling preemption mmap_lock will explicitly disable/enable preemption upon manipulating its local CPU variables. This is to be expected, but in this case, it doesn't play well with PREEMPT_RT. The preemption disabled code section also takes a spin-lock. Spin-locks in RT systems will try to schedule, which is exactly what we're trying to avoid. To mitigate this, convert the explicit preemption handling to local_locks. Which are RT aware, and will disable migration instead of preemption when PREEMPT_RT=y. The faulty call trace looks like the following: __mmap_lock_do_trace_*() preempt_disable() get_mm_memcg_path() cgroup_path() kernfs_path_from_node() spin_lock_irqsave() /* Scheduling while atomic! */ Link: https://lkml.kernel.org/r/20210604163506.2103900-1-nsaenzju@redhat.com Fixes: 2b5067a8143e3 ("mm: mmap_lock: add tracepoints around lock acquisition ") Signed-off-by: Nicolas Saenz Julienne Tested-by: Axel Rasmussen Reviewed-by: Axel Rasmussen Cc: Vlastimil Babka Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65ac1a60a57e2c55f2ac37f27095f6b012295e81 Author: Anshuman Khandual Date: Mon Jun 28 19:35:10 2021 -0700 mm/debug_vm_pgtable: ensure THP availability via has_transparent_hugepage() On certain platforms, THP support could not just be validated via the build option CONFIG_TRANSPARENT_HUGEPAGE. Instead has_transparent_hugepage() also needs to be called upon to verify THP runtime support. Otherwise the debug test will just run into unusable THP helpers like in the case of a 4K hash config on powerpc platform [1]. This just moves all pfn_pmd() and pfn_pud() after THP runtime validation with has_transparent_hugepage() which prevents the mentioned problem. [1] https://bugzilla.kernel.org/show_bug.cgi?id=213069 Link: https://lkml.kernel.org/r/1621397588-19211-1-git-send-email-anshuman.khandual@arm.com Fixes: 787d563b8642 ("mm/debug_vm_pgtable: fix kernel crash by checking for THP support") Signed-off-by: Anshuman Khandual Cc: Aneesh Kumar K.V Cc: Christophe Leroy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 85f29cd6a12d430706c39247e7d0207590f581df Author: Tang Bin Date: Mon Jun 28 19:35:07 2021 -0700 tools/vm/page_owner_sort.c: check malloc() return Link: https://lkml.kernel.org/r/20210506131402.10416-1-tangbin@cmss.chinamobile.com Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a14e3779dd58c16b30e56558146e5cc850ba8b0 Author: Jan Kara Date: Mon Jun 28 19:35:04 2021 -0700 dax: fix ENOMEM handling in grab_mapping_entry() grab_mapping_entry() has a bug in handling of ENOMEM condition. Suppose we have a PMD entry at index i which we are downgrading to a PTE entry. grab_mapping_entry() will set pmd_downgrade to true, lock the entry, clear the entry in xarray, and decrement mapping->nrpages. The it will call: entry = dax_make_entry(pfn_to_pfn_t(0), flags); dax_lock_entry(xas, entry); which inserts new PTE entry into xarray. However this may fail allocating the new node. We handle this by: if (xas_nomem(xas, mapping_gfp_mask(mapping) & ~__GFP_HIGHMEM)) goto retry; however pmd_downgrade stays set to true even though 'entry' returned from get_unlocked_entry() will be NULL now. And we will go again through the downgrade branch. This is mostly harmless except that mapping->nrpages is decremented again and we temporarily have an invalid entry stored in xarray. Fix the problem by setting pmd_downgrade to false each time we lookup the entry we work with so that it matches the entry we found. Link: https://lkml.kernel.org/r/20210622160015.18004-1-jack@suse.cz Fixes: b15cd800682f ("dax: Convert page fault handlers to XArray") Signed-off-by: Jan Kara Reviewed-by: Dan Williams Cc: Matthew Wilcox Cc: "Aneesh Kumar K.V" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54dd200c5a251b5db9f6f0f72a251c28e0d7da43 Author: Yanfei Xu Date: Mon Jun 28 19:35:01 2021 -0700 mm/kmemleak: fix possible wrong memory scanning period This commit contains 3 modifications: 1. Convert the type of jiffies_scan_wait to "unsigned long". 2. Use READ/WRITE_ONCE() for accessing "jiffies_scan_wait". 3. Fix the possible wrong memory scanning period. If you set a large memory scanning period like blow, then the "secs" variable will be non-zero, however the value of "jiffies_scan_wait" will be zero. echo "scan=0x10000000" > /sys/kernel/debug/kmemleak It is because the type of the msecs_to_jiffies()'s parameter is "unsigned int", and the "secs * 1000" is larger than its max value. This in turn leads a unexpected jiffies_scan_wait, maybe zero. We corret it by replacing kstrtoul() with kstrtouint(), and check the msecs to prevent it larger than UINT_MAX. Link: https://lkml.kernel.org/r/20210613174022.23044-1-yanfei.xu@windriver.com Signed-off-by: Yanfei Xu Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65ebdeef103fd70988fdd0ffef1d4fecb0cb97ed Author: Georgi Djakov Date: Mon Jun 28 19:34:58 2021 -0700 mm/slub: add taint after the errors are printed When running the kernel with panic_on_taint, the usual slub debug error messages are not being printed when object corruption happens. That's because we panic in add_taint(), which is called before printing the additional information. This is a bit unfortunate as the error messages are actually very useful, especially before a panic. Let's fix this by moving add_taint() after the errors are printed on the console. Link: https://lkml.kernel.org/r/1623860738-146761-1-git-send-email-quic_c_gdjako@quicinc.com Signed-off-by: Georgi Djakov Acked-by: Rafael Aquini Acked-by: David Rientjes Acked-by: Vlastimil Babka Reviewed-by: Aaron Tomlin Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 64dd68497be76ab4e237cca06f5324e220d0f050 Author: Faiyaz Mohammed Date: Mon Jun 28 19:34:55 2021 -0700 mm: slub: move sysfs slab alloc/free interfaces to debugfs alloc_calls and free_calls implementation in sysfs have two issues, one is PAGE_SIZE limitation of sysfs and other is it does not adhere to "one value per file" rule. To overcome this issues, move the alloc_calls and free_calls implementation to debugfs. Debugfs cache will be created if SLAB_STORE_USER flag is set. Rename the alloc_calls/free_calls to alloc_traces/free_traces, to be inline with what it does. [faiyazm@codeaurora.org: fix the leak of alloc/free traces debugfs interface] Link: https://lkml.kernel.org/r/1624248060-30286-1-git-send-email-faiyazm@codeaurora.org Link: https://lkml.kernel.org/r/1623438200-19361-1-git-send-email-faiyazm@codeaurora.org Signed-off-by: Faiyaz Mohammed Reviewed-by: Vlastimil Babka Reviewed-by: Greg Kroah-Hartman Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 792702911f581f7793962fbeb99d5c3a1b28f4c3 Author: Stephen Boyd Date: Mon Jun 28 19:34:52 2021 -0700 slub: force on no_hash_pointers when slub_debug is enabled Obscuring the pointers that slub shows when debugging makes for some confusing slub debug messages: Padding overwritten. 0x0000000079f0674a-0x000000000d4dce17 Those addresses are hashed for kernel security reasons. If we're trying to be secure with slub_debug on the commandline we have some big problems given that we dump whole chunks of kernel memory to the kernel logs. Let's force on the no_hash_pointers commandline flag when slub_debug is on the commandline. This makes slub debug messages more meaningful and if by chance a kernel address is in some slub debug object dump we will have a better chance of figuring out what went wrong. Note that we don't use %px in the slub code because we want to reduce the number of places that %px is used in the kernel. This also nicely prints a big fat warning at kernel boot if slub_debug is on the commandline so that we know that this kernel shouldn't be used on production systems. [akpm@linux-foundation.org: fix build with CONFIG_SLUB_DEBUG=n] Link: https://lkml.kernel.org/r/20210601182202.3011020-5-swboyd@chromium.org Signed-off-by: Stephen Boyd Acked-by: Vlastimil Babka Acked-by: Petr Mladek Cc: Joe Perches Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 582d1212edc73e6459d5219a24f312799877b61e Author: Joe Perches Date: Mon Jun 28 19:34:49 2021 -0700 slub: indicate slab_fix() uses printf formats Ideally, slab_fix() would be marked with __printf and the format here would not use \n as that's emitted by the slab_fix(). Make these changes. Link: https://lkml.kernel.org/r/20210601182202.3011020-4-swboyd@chromium.org Signed-off-by: Joe Perches Acked-by: Vlastimil Babka Signed-off-by: Stephen Boyd Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Muchun Song Cc: Pekka Enberg Cc: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a88ef87f861e10611e9162c4c701704bfdeed85 Author: Stephen Boyd Date: Mon Jun 28 19:34:46 2021 -0700 slub: actually use 'message' in restore_bytes() The message argument isn't used here. Let's pass the string to the printk message so that the developer can figure out what's happening, instead of guessing that a redzone is being restored, etc. Link: https://lkml.kernel.org/r/20210601182202.3011020-3-swboyd@chromium.org Signed-off-by: Stephen Boyd Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Reviewed-by: Muchun Song Cc: Christoph Lameter Cc: Joe Perches Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02ac47d0cdd48c0c859a6ac7a6fad49c8e413ce1 Author: Stephen Boyd Date: Mon Jun 28 19:34:43 2021 -0700 slub: restore slub_debug=- behavior Petch series "slub: Print non-hashed pointers in slub debugging", v3. I was doing some debugging recently and noticed that my pointers were being hashed while slub_debug was on the kernel commandline. Let's force on the no hash pointer option when slub_debug is on the kernel commandline so that the prints are more meaningful. The first two patches are something else I noticed while looking at the code. The message argument is never used so the debugging messages are not as clear as they could be and the slub_debug=- behavior seems to be busted. Then there's a printf fixup from Joe and the final patch is the one that force disables pointer hashing. This patch (of 4): Passing slub_debug=- on the kernel commandline is supposed to disable slub debugging. This is especially useful with CONFIG_SLUB_DEBUG_ON where the default is to have slub debugging enabled in the build. Due to some code reorganization this behavior was dropped, but the code to make it work mostly stuck around. Restore the previous behavior by disabling the static key when we parse the commandline and see that we're trying to disable slub debugging. Link: https://lkml.kernel.org/r/20210601182202.3011020-1-swboyd@chromium.org Link: https://lkml.kernel.org/r/20210601182202.3011020-2-swboyd@chromium.org Fixes: ca0cab65ea2b ("mm, slub: introduce static key for slub_debug()") Signed-off-by: Stephen Boyd Acked-by: Vlastimil Babka Reviewed-by: Muchun Song Cc: Christoph Lameter Cc: David Rientjes Cc: Joe Perches Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 588c7fa022d7b2361500ead5660d9a1a2ecd9b7d Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Mon Jun 28 19:34:39 2021 -0700 mm, slub: change run-time assertion in kmalloc_index() to compile-time Currently when size is not supported by kmalloc_index, compiler will generate a run-time BUG() while compile-time error is also possible, and better. So change BUG to BUILD_BUG_ON_MSG to make compile-time check possible. Also remove code that allocates more than 32MB because current implementation supports only up to 32MB. [42.hyeyoo@gmail.com: fix support for clang 10] Link: https://lkml.kernel.org/r/20210518181247.GA10062@hyeyoo [vbabka@suse.cz: fix false-positive assert in kernel/bpf/local_storage.c] Link: https://lkml.kernel.org/r/bea97388-01df-8eac-091b-a3c89b4a4a09@suse.czLink: https://lkml.kernel.org/r/20210511173448.GA54466@hyeyoo [elver@google.com: kfence fix] Link: https://lkml.kernel.org/r/20210512195227.245000695c9014242e9a00e5@linux-foundation.org Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka Reviewed-by: Vlastimil Babka Signed-off-by: Marco Elver Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d8e374c6d46a648333b9ef87983bc726f8e56bc Author: Oliver Glitta Date: Mon Jun 28 19:34:36 2021 -0700 slub: remove resiliency_test() function Function resiliency_test() is hidden behind #ifdef SLUB_RESILIENCY_TEST that is not part of Kconfig, so nobody runs it. This function is replaced with KUnit test for SLUB added by the previous patch "selftests: add a KUnit test for SLUB debugging functionality". Link: https://lkml.kernel.org/r/20210511150734.3492-3-glittao@gmail.com Signed-off-by: Oliver Glitta Reviewed-by: Marco Elver Acked-by: Vlastimil Babka Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Oliver Glitta Cc: Brendan Higgins Cc: Daniel Latypov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f9f78b1b376f82cdd8ed73cc0abdb74d0453d43 Author: Oliver Glitta Date: Mon Jun 28 19:34:33 2021 -0700 mm/slub, kunit: add a KUnit test for SLUB debugging functionality SLUB has resiliency_test() function which is hidden behind #ifdef SLUB_RESILIENCY_TEST that is not part of Kconfig, so nobody runs it. KUnit should be a proper replacement for it. Try changing byte in redzone after allocation and changing pointer to next free node, first byte, 50th byte and redzone byte. Check if validation finds errors. There are several differences from the original resiliency test: Tests create own caches with known state instead of corrupting shared kmalloc caches. The corruption of freepointer uses correct offset, the original resiliency test got broken with freepointer changes. Scratch changing random byte test, because it does not have meaning in this form where we need deterministic results. Add new option CONFIG_SLUB_KUNIT_TEST in Kconfig. Tests next_pointer, first_word and clobber_50th_byte do not run with KASAN option on. Because the test deliberately modifies non-allocated objects. Use kunit_resource to count errors in cache and silence bug reports. Count error whenever slab_bug() or slab_fix() is called or when the count of pages is wrong. [glittao@gmail.com: remove unused function test_exit(), from SLUB KUnit test] Link: https://lkml.kernel.org/r/20210512140656.12083-1-glittao@gmail.com [akpm@linux-foundation.org: export kasan_enable/disable_current to modules] Link: https://lkml.kernel.org/r/20210511150734.3492-2-glittao@gmail.com Signed-off-by: Oliver Glitta Reviewed-by: Vlastimil Babka Acked-by: Daniel Latypov Acked-by: Marco Elver Cc: Brendan Higgins Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26c6cb7cf830349c6518a7efe1c32ac796cd192e Author: Vlastimil Babka Date: Mon Jun 28 19:34:30 2021 -0700 kunit: make test->lock irq safe The upcoming SLUB kunit test will be calling kunit_find_named_resource() from a context with disabled interrupts. That means kunit's test->lock needs to be IRQ safe to avoid potential deadlocks and lockdep splats. This patch therefore changes the test->lock usage to spin_lock_irqsave() and spin_unlock_irqrestore(). Link: https://lkml.kernel.org/r/20210511150734.3492-1-glittao@gmail.com Signed-off-by: Vlastimil Babka Signed-off-by: Oliver Glitta Reviewed-by: Brendan Higgins Cc: Christoph Lameter Cc: Daniel Latypov Cc: David Rientjes Cc: Joonsoo Kim Cc: Marco Elver Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4acaa7d5045e21d5469232d0e6e79cdaf6755754 Author: gumingtao Date: Mon Jun 28 19:34:27 2021 -0700 slab: use __func__ to trace function name It is better to use __func__ to trace function name. Link: https://lkml.kernel.org/r/31fdbad5c45cd1e26be9ff37be321b8586b80fee.1624355507.git.gumingtao@xiaomi.com Signed-off-by: gumingtao Acked-by: Christoph Lameter Acked-by: David Rientjes Reviewed-by: Aaron Tomlin Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 256f7a6791e8f19bafa1d702f69a6a6ba16250e3 Author: Wang Qing Date: Mon Jun 28 19:34:24 2021 -0700 doc: watchdog: modify the doc related to "watchdog/%u" "watchdog/%u" threads has be replaced by cpu_stop_work. The current description is extremely misleading. Link: https://lkml.kernel.org/r/1619687073-24686-5-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Reviewed-by: Petr Mladek Cc: "Guilherme G. Piccoli" Cc: Joe Perches Cc: Jonathan Corbet Cc: Kees Cook Cc: Mauro Carvalho Chehab Cc: Qais Yousef Cc: Randy Dunlap Cc: Santosh Sivaraj Cc: Stephen Kitt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e55fda8cdcba2cb3d5d46ae5fcd5f243f8b70d6e Author: Wang Qing Date: Mon Jun 28 19:34:20 2021 -0700 doc: watchdog: modify the explanation related to watchdog thread "watchdog/%u" threads has be replaced by cpu_stop_work. The current description is extremely misleading. Link: https://lkml.kernel.org/r/1619687073-24686-4-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Reviewed-by: Petr Mladek Cc: "Guilherme G. Piccoli" Cc: Joe Perches Cc: Jonathan Corbet Cc: Kees Cook Cc: Mauro Carvalho Chehab Cc: Qais Yousef Cc: Randy Dunlap Cc: Santosh Sivaraj Cc: Stephen Kitt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b124ac45bda0338f2aa3969e7c135139267f8987 Author: Wang Qing Date: Mon Jun 28 19:34:17 2021 -0700 kernel: watchdog: modify the explanation related to watchdog thread The watchdog thread has been replaced by cpu_stop_work, modify the explanation related. Link: https://lkml.kernel.org/r/1619687073-24686-2-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Reviewed-by: Petr Mladek Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: Joe Perches Cc: Stephen Kitt Cc: Kees Cook Cc: Randy Dunlap Cc: "Guilherme G. Piccoli" Cc: Qais Yousef Cc: Santosh Sivaraj Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ed6d4e418d98e78c9f2b895d76cdaed7a7ccbdb Author: Colin Ian King Date: Mon Jun 28 19:34:14 2021 -0700 ocfs2: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Link: https://lkml.kernel.org/r/20210613135148.74658-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0f798db0586b34c552997f8c9d923a5db21fe5e Author: Chen Huang Date: Mon Jun 28 19:34:11 2021 -0700 ocfs2: replace simple_strtoull() with kstrtoull() simple_strtoull() is deprecated in some situation since it does not check for the range overflow, use kstrtoull() instead. Link: https://lkml.kernel.org/r/20210526092020.554341-3-chenhuang5@huawei.com Signed-off-by: Chen Huang Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01f01399136ca290e20cb21839c32a52ce626d16 Author: Wan Jiabing Date: Mon Jun 28 19:34:08 2021 -0700 ocfs2: remove repeated uptodate check for buffer In commit 60f91826ca62 ("buffer: Avoid setting buffer bits that are already set"), function set_buffer_##name was added a test_bit() to check buffer, which is the same as function buffer_##name. The !buffer_uptodate(bh) here is a repeated check. Remove it. Link: https://lkml.kernel.org/r/20210425025702.13628-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca49b6d856ebde1e795e8bee37c461bff9939e02 Author: Colin Ian King Date: Mon Jun 28 19:34:05 2021 -0700 ocfs2: remove redundant assignment to pointer queue The pointer queue is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Link: https://lkml.kernel.org/r/20210513113957.57539-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54e948c60cc843b6e84dc44496edc91f51d2a28e Author: Dan Carpenter Date: Mon Jun 28 19:34:01 2021 -0700 ocfs2: fix snprintf() checking The snprintf() function returns the number of bytes which would have been printed if the buffer was large enough. In other words it can return ">= remain" but this code assumes it returns "== remain". The run time impact of this bug is not very severe. The next iteration through the loop would trigger a WARN() when we pass a negative limit to snprintf(). We would then return success instead of -E2BIG. The kernel implementation of snprintf() will never return negatives so there is no need to check and I have deleted that dead code. Link: https://lkml.kernel.org/r/20210511135350.GV1955@kadam Fixes: a860f6eb4c6a ("ocfs2: sysfile interfaces for online file check") Fixes: 74ae4e104dfc ("ocfs2: Create stack glue sysfs files.") Signed-off-by: Dan Carpenter Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74ef829e41be8ada93e1d1dfa681c11be338c8d5 Author: Yang Yingliang Date: Mon Jun 28 19:33:58 2021 -0700 ocfs2: remove unnecessary INIT_LIST_HEAD() The list_head o2hb_node_events is initialized statically. It is unnecessary to initialize by INIT_LIST_HEAD(). Link: https://lkml.kernel.org/r/20210511115847.3817395-1-yangyingliang@huawei.com Signed-off-by: Yang Yingliang Reported-by: Hulk Robot Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10dde05b89980ef147f590d2735d7dd53aa39c88 Author: Vincent Whitchurch Date: Mon Jun 28 19:33:55 2021 -0700 squashfs: add option to panic on errors Add an errors=panic mount option to make squashfs trigger a panic when errors are encountered, similar to several other filesystems. This allows a kernel dump to be saved using which the corruption can be analysed and debugged. Inspired by a pre-fs_context patch by Anton Eliasson. Link: https://lkml.kernel.org/r/20210527125019.14511-1-vincent.whitchurch@axis.com Signed-off-by: Vincent Whitchurch Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d98e4d95411bbde2220a7afa38dcc9c14d71acbe Author: Desmond Cheong Zhi Xi Date: Mon Jun 28 19:33:52 2021 -0700 ntfs: fix validity check for file name attribute When checking the file name attribute, we want to ensure that it fits within the bounds of ATTR_RECORD. To do this, we should check that (attr record + file name offset + file name length) < (attr record + attr record length). However, the original check did not include the file name offset in the calculation. This means that corrupted on-disk metadata might not caught by the incorrect file name check, and lead to an invalid memory access. An example can be seen in the crash report of a memory corruption error found by Syzbot: https://syzkaller.appspot.com/bug?id=a1a1e379b225812688566745c3e2f7242bffc246 Adding the file name offset to the validity check fixes this error and passes the Syzbot reproducer test. Link: https://lkml.kernel.org/r/20210614050540.289494-1-desmondcheongzx@gmail.com Signed-off-by: Desmond Cheong Zhi Xi Reported-by: syzbot+213ac8bb98f7f4420840@syzkaller.appspotmail.com Tested-by: syzbot+213ac8bb98f7f4420840@syzkaller.appspotmail.com Acked-by: Anton Altaparmakov Cc: Shuah Khan Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1c9142004e7e21d6d3d2cd6a339845771ce6a27 Author: Colin Ian King Date: Mon Jun 28 19:33:50 2021 -0700 scripts/spelling.txt: add more spellings to spelling.txt Here are some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel in the past few months. Link: https://lkml.kernel.org/r/20210514093655.8829-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1b1f1e627c0085fb2e2b5690929a3d53879cc67 Author: Steven Rostedt (VMware) Date: Mon Jun 28 19:33:47 2021 -0700 streamline_config.pl: add softtabstop=4 for vim users The tab stop for Perl files is by default (at least in emacs) to be 4 spaces, where a tab is used for all 8 spaces. Add a local variable comment to make vim do the same by default, and this will help keep the file consistent in the future when others edit it via vim and not emacs. Link: https://lkml.kernel.org/r/20210322214032.293992979@goodmis.org Signed-off-by: Steven Rostedt (VMware) Cc: Masahiro Yamada Cc: "John (Warthog9) Hawley" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b83c8ba40cebcee1d07cb852c23d616acf8988b7 Author: Steven Rostedt (VMware) Date: Mon Jun 28 19:33:44 2021 -0700 streamline_config.pl: make spacing consistent Patch series "streamline_config.pl: Fix Perl spacing". Talking with John Hawley about how vim and emacs deal with Perl files with respect to tabs and spaces, I found that some of my Perl code in the kernel had inconsistent spacing. The way emacs handles Perl by default is to use 4 spaces per indent, but make all 8 spaces into a single tab. Vim does not do this by default. But if you add the vim variable control: # vim: softtabstop=4 to a perl file, it makes vim behave the same way as emacs. The first patch is to change all 8 spaces into a single tab (mostly from people editing the file with vim). The next patch adds the softtabstop variable to make vim act like emacs by default. This patch (of 2): As Perl code tends to have 4 space indentation, but uses tabs for every 8 spaces, make that consistent in the streamline_config.pl code. Replace all 8 spaces with a single tab. Link: https://lkml.kernel.org/r/20210322214032.133596267@goodmis.org Signed-off-by: Steven Rostedt (VMware) Cc: "John (Warthog9) Hawley" Cc: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5f320ff8a79501bb59338278336ec43acb9d7e2 Author: Arnd Bergmann Date: Mon Jun 28 19:33:41 2021 -0700 ia64: mca_drv: fix incorrect array size calculation gcc points out a mistake in the mca driver that goes back to before the git history: arch/ia64/kernel/mca_drv.c: In function 'init_record_index_pools': arch/ia64/kernel/mca_drv.c:346:54: error: expression does not compute the number of elements in this array; element typ e is 'int', not 'size_t' {aka 'long unsigned int'} [-Werror=sizeof-array-div] 346 | for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++) | ^ This is the same as sizeof(size_t), which is two shorter than the actual array. Use the ARRAY_SIZE() macro to get the correct calculation instead. Link: https://lkml.kernel.org/r/20210514214123.875971-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Masahiro Yamada Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f589c67ff08c82405f3e69603ac159ea76933a50 Author: Randy Dunlap Date: Mon Jun 28 19:33:38 2021 -0700 ia64: headers: drop duplicated words Delete the repeated words "to" and "the". Link: https://lkml.kernel.org/r/20210507184837.10754-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Fenghua Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d71ba1649fa3c464c51ec7163e4b817345bff2c7 Author: Petr Mladek Date: Mon Jun 28 19:33:35 2021 -0700 kthread_worker: fix return value when kthread_mod_delayed_work() races with kthread_cancel_delayed_work_sync() kthread_mod_delayed_work() might race with kthread_cancel_delayed_work_sync() or another kthread_mod_delayed_work() call. The function lets the other operation win when it sees work->canceling counter set. And it returns @false. But it should return @true as it is done by the related workqueue API, see mod_delayed_work_on(). The reason is that the return value might be used for reference counting. It has to distinguish the case when the number of queued works has changed or stayed the same. The change is safe. kthread_mod_delayed_work() return value is not checked anywhere at the moment. Link: https://lore.kernel.org/r/20210521163526.GA17916@redhat.com Link: https://lkml.kernel.org/r/20210610133051.15337-4-pmladek@suse.com Signed-off-by: Petr Mladek Reported-by: Oleg Nesterov Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Tejun Heo Cc: Minchan Kim Cc: Cc: Martin Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20ce0c2d5a303c41c0e02ceb596837868e290dcc Author: Jonathan Neuschäfer Date: Mon Jun 28 19:33:32 2021 -0700 kthread: switch to new kerneldoc syntax for named variable macro argument The syntax without dots is available since commit 43756e347f21 ("scripts/kernel-doc: Add support for named variable macro arguments"). The same HTML output is produced with and without this patch. Link: https://lkml.kernel.org/r/20210513161702.1721039-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Neuschäfer Cc: Jens Axboe Cc: Felix Kuehling Cc: Valentin Schneider Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff4b2b4014cbffb3d32b22629252f4dc8616b0fe Author: Mel Gorman Date: Mon Jun 28 19:33:29 2021 -0700 mm/page_alloc: correct return value of populated elements if bulk array is populated Dave Jones reported the following This made it into 5.13 final, and completely breaks NFSD for me (Serving tcp v3 mounts). Existing mounts on clients hang, as do new mounts from new clients. Rebooting the server back to rc7 everything recovers. The commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") returns the wrong value if the array is already populated which is interpreted as an allocation failure. Dave reported this fixes his problem and it also passed a test running dbench over NFS. Link: https://lkml.kernel.org/r/20210628150219.GC3840@techsingularity.net Fixes: b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") Signed-off-by: Mel Gorman Reported-by: Dave Jones Tested-by: Dave Jones Cc: Dan Carpenter Cc: Jesper Dangaard Brouer Cc: Vlastimil Babka Cc: [5.13+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 122e093c1734361dedb64f65c99b93e28e4624f4 Author: Mike Rapoport Date: Mon Jun 28 19:33:26 2021 -0700 mm/page_alloc: fix memory map initialization for descending nodes On systems with memory nodes sorted in descending order, for instance Dell Precision WorkStation T5500, the struct pages for higher PFNs and respectively lower nodes, could be overwritten by the initialization of struct pages corresponding to the holes in the memory sections. For example for the below memory layout [ 0.245624] Early memory node ranges [ 0.248496] node 1: [mem 0x0000000000001000-0x0000000000090fff] [ 0.251376] node 1: [mem 0x0000000000100000-0x00000000dbdf8fff] [ 0.254256] node 1: [mem 0x0000000100000000-0x0000001423ffffff] [ 0.257144] node 0: [mem 0x0000001424000000-0x0000002023ffffff] the range 0x1424000000 - 0x1428000000 in the beginning of node 0 starts in the middle of a section and will be considered as a hole during the initialization of the last section in node 1. The wrong initialization of the memory map causes panic on boot when CONFIG_DEBUG_VM is enabled. Reorder loop order of the memory map initialization so that the outer loop will always iterate over populated memory regions in the ascending order and the inner loop will select the zone corresponding to the PFN range. This way initialization of the struct pages for the memory holes will be always done for the ranges that are actually not populated. [akpm@linux-foundation.org: coding style fixes] Link: https://lkml.kernel.org/r/YNXlMqBbL+tBG7yq@kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=213073 Link: https://lkml.kernel.org/r/20210624062305.10940-1-rppt@kernel.org Fixes: 0740a50b9baa ("mm/page_alloc.c: refactor initialization of struct page for holes in memory layout") Signed-off-by: Mike Rapoport Cc: Boris Petkov Cc: Robert Shteynfeld Cc: Baoquan He Cc: Vlastimil Babka Cc: David Hildenbrand Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c24d37322548a6ec3caec67100d28b9c1f89f60a Author: Jann Horn Date: Mon Jun 28 19:33:23 2021 -0700 mm/gup: fix try_grab_compound_head() race with split_huge_page() try_grab_compound_head() is used to grab a reference to a page from get_user_pages_fast(), which is only protected against concurrent freeing of page tables (via local_irq_save()), but not against concurrent TLB flushes, freeing of data pages, or splitting of compound pages. Because no reference is held to the page when try_grab_compound_head() is called, the page may have been freed and reallocated by the time its refcount has been elevated; therefore, once we're holding a stable reference to the page, the caller re-checks whether the PTE still points to the same page (with the same access rights). The problem is that try_grab_compound_head() has to grab a reference on the head page; but between the time we look up what the head page is and the time we actually grab a reference on the head page, the compound page may have been split up (either explicitly through split_huge_page() or by freeing the compound page to the buddy allocator and then allocating its individual order-0 pages). If that happens, get_user_pages_fast() may end up returning the right page but lifting the refcount on a now-unrelated page, leading to use-after-free of pages. To fix it: Re-check whether the pages still belong together after lifting the refcount on the head page. Move anything else that checks compound_head(page) below the refcount increment. This can't actually happen on bare-metal x86 (because there, disabling IRQs locks out remote TLB flushes), but it can happen on virtualized x86 (e.g. under KVM) and probably also on arm64. The race window is pretty narrow, and constantly allocating and shattering hugepages isn't exactly fast; for now I've only managed to reproduce this in an x86 KVM guest with an artificially widened timing window (by adding a loop that repeatedly calls `inl(0x3f8 + 5)` in `try_get_compound_head()` to force VM exits, so that PV TLB flushes are used instead of IPIs). As requested on the list, also replace the existing VM_BUG_ON_PAGE() with a warning and bailout. Since the existing code only performed the BUG_ON check on DEBUG_VM kernels, ensure that the new code also only performs the check under that configuration - I don't want to mix two logically separate changes together too much. The macro VM_WARN_ON_ONCE_PAGE() doesn't return a value on !DEBUG_VM, so wrap the whole check in an #ifdef block. An alternative would be to change the VM_WARN_ON_ONCE_PAGE() definition for !DEBUG_VM such that it always returns false, but since that would differ from the behavior of the normal WARN macros, it might be too confusing for readers. Link: https://lkml.kernel.org/r/20210615012014.1100672-1-jannh@google.com Fixes: 7aef4172c795 ("mm: handle PTE-mapped tail pages in gerneric fast gup implementaiton") Signed-off-by: Jann Horn Reviewed-by: John Hubbard Cc: Matthew Wilcox Cc: Kirill A. Shutemov Cc: Jan Kara Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f4e5c5b8cb00138ad1a10cab87bbd1e2d4d3376 Merge: 84fe73996c2e7 63c51453c82cd Author: David S. Miller Date: Tue Jun 29 10:46:23 2021 -0700 Merge branch 'dsa-rx-filtering' Vladimir Oltean says: ==================== RX filtering in DSA This is my fourth stab (identical to the third one except sent as non-RFC) at creating a list of unicast and multicast addresses that the DSA CPU ports must trap. I am reusing a lot of Tobias's work which he submitted here: https://patchwork.kernel.org/project/netdevbpf/cover/20210116012515.3152-1-tobias@waldekranz.com/ My additions to Tobias' work come in the form of taking some care that additions and removals of host addresses are properly balanced, so that we can do reference counting on them for cross-chip setups and multiple bridges spanning the same switch (I am working on an NXP board where both are real requirements). During the last attempted submission of multiple CPU ports for DSA: https://patchwork.kernel.org/project/netdevbpf/cover/20210410133454.4768-1-ansuelsmth@gmail.com/ it became clear that the concept of multiple CPU ports would not be compatible with the idea of address learning on those CPU ports (when those CPU ports are statically assigned to user ports, not in a LAG) unless the switch supports complete FDB isolation, which most switches do not. So DSA needs to manage in software all addresses that are installed on the CPU port(s), which is what this patch set does. Compared to all earlier attempts, this series does not fiddle with how DSA operates the ports in standalone mode at all, just when bridged. We need to sort that out properly, then any optimization that comes in standalone mode (i.e. IFF_UNICAST_FLT) can come later. ==================== Signed-off-by: David S. Miller commit 63c51453c82cddc27556233ff41041ea9fc49fe0 Author: Vladimir Oltean Date: Tue Jun 29 17:06:58 2021 +0300 net: dsa: replay the local bridge FDB entries pointing to the bridge dev too When we join a bridge that already has some local addresses pointing to itself, we do not get those notifications. Similarly, when we leave that bridge, we do not get notifications for the deletion of those entries. The only switchdev notifications we get are those of entries added while the DSA port is enslaved to the bridge. This makes use cases such as the following work properly (with the number of additions and removals properly balanced): ip link add br0 type bridge ip link add br1 type bridge ip link set br0 address 00:01:02:03:04:05 ip link set br1 address 00:01:02:03:04:05 ip link set swp0 up ip link set swp1 up ip link set swp0 master br0 ip link set swp1 master br1 ip link set br0 up ip link set br1 up ip link del br1 # 00:01:02:03:04:05 still installed on the CPU port ip link del br0 # 00:01:02:03:04:05 finally removed from the CPU port Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4bed397c3e65638e9118956bda85d2a9bcac3668 Author: Vladimir Oltean Date: Tue Jun 29 17:06:57 2021 +0300 net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and dev_put are on the same dev When (a) "dev" is a bridge port which the DSA switch tree offloads, but is otherwise not a dsa slave (such as a LAG netdev), or (b) "dev" is the bridge net device itself then strange things happen to the dev_hold/dev_put pair: dsa_schedule_work() will still be called with a DSA port that offloads that netdev, but dev_hold() will be called on the non-DSA netdev. Then the "if" condition in dsa_slave_switchdev_event_work() does not pass, because "dev" is not a DSA netdev, so dev_put() is not called. This results in the simple fact that we have a reference counting mismatch on the "dev" net device. This can be seen when we add support for host addresses installed on the bridge net device. ip link add br1 type bridge ip link set br1 address 00:01:02:03:04:05 ip link set swp0 master br1 ip link del br1 [ 968.512278] unregister_netdevice: waiting for br1 to become free. Usage count = 5 It seems foolish to do penny pinching and not add the net_device pointer in the dsa_switchdev_event_work structure, so let's finally do that. As an added bonus, when we start offloading local entries pointing towards the bridge, these will now properly appear as 'offloaded' in 'bridge fdb' (this was not possible before, because 'dev' was assumed to only be a DSA net device): 00:01:02:03:04:05 dev br0 vlan 1 offload master br0 permanent 00:01:02:03:04:05 dev br0 offload master br0 permanent Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 81a619f787593daf6224068c6dc8022ece591844 Author: Vladimir Oltean Date: Tue Jun 29 17:06:56 2021 +0300 net: dsa: include fdb entries pointing to bridge in the host fdb list The bridge supports a legacy way of adding local (non-forwarded) FDB entries, which works on an individual port basis: bridge fdb add dev swp0 00:01:02:03:04:05 master local As well as a new way, added by Roopa Prabhu in commit 3741873b4f73 ("bridge: allow adding of fdb entries pointing to the bridge device"): bridge fdb add dev br0 00:01:02:03:04:05 self local The two commands are functionally equivalent, except that the first one produces an entry with fdb->dst == swp0, and the other an entry with fdb->dst == NULL. The confusing part, though, is that even if fdb->dst is swp0 for the 'local on port' entry, that destination is not used. Nonetheless, the idea is that the bridge has reference counting for local entries, and local entries pointing towards the bridge are still 'as local' as local entries for a port. The bridge adds the MAC addresses of the interfaces automatically as FDB entries with is_local=1. For the MAC address of the ports, fdb->dst will be equal to the port, and for the MAC address of the bridge, fdb->dst will point towards the bridge (i.e. be NULL). Therefore, if the MAC address of the bridge is not inherited from either of the physical ports, then we must explicitly catch local FDB entries emitted towards the br0, otherwise we'll miss the MAC address of the bridge (and, of course, any entry with 'bridge add dev br0 ... self local'). Co-developed-by: Tobias Waldekranz Signed-off-by: Tobias Waldekranz Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 10fae4ac89ce5c2ead6c6c35fd09651b5f97ae05 Author: Tobias Waldekranz Date: Tue Jun 29 17:06:55 2021 +0300 net: dsa: include bridge addresses which are local in the host fdb list The bridge automatically creates local (not forwarded) fdb entries pointing towards physical ports with their interface MAC addresses. For switchdev, the significance of these fdb entries is the exact opposite of that of non-local entries: instead of sending these frame outwards, we must send them inwards (towards the host). NOTE: The bridge's own MAC address is also "local". If that address is not shared with any port, the bridge's MAC is not be added by this functionality - but the following commit takes care of that case. NOTE 2: We mark these addresses as host-filtered regardless of the value of ds->assisted_learning_on_cpu_port. This is because, as opposed to the speculative logic done for dynamic address learning on foreign interfaces, the local FDB entries are rather fixed, so there isn't any risk of them migrating from one bridge port to another. Signed-off-by: Tobias Waldekranz Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3068d466a67ec96a6972f248f5c7a7b6763dbeb1 Author: Vladimir Oltean Date: Tue Jun 29 17:06:54 2021 +0300 net: dsa: sync static FDB entries on foreign interfaces to hardware DSA is able to install FDB entries towards the CPU port for addresses which were dynamically learnt by the software bridge on foreign interfaces that are in the same bridge with a DSA switch interface. Since this behavior is opportunistic, it is guarded by the "assisted_learning_on_cpu_port" property which can be enabled by drivers and is not done automatically (since certain switches may support address learning of packets coming from the CPU port). But if those FDB entries added on the foreign interfaces are static (added by the user) instead of dynamically learnt, currently DSA does not do anything (and arguably it should). Because static FDB entries are not supposed to move on their own, there is no downside in reusing the "assisted_learning_on_cpu_port" logic to sync static FDB entries to the DSA CPU port unconditionally, even if assisted_learning_on_cpu_port is not requested by the driver. For example, this situation: br0 / \ swp0 dummy0 $ bridge fdb add 02:00:de:ad:00:01 dev dummy0 vlan 1 master static Results in DSA adding an entry in the hardware FDB, pointing this address towards the CPU port. The same is true for entries added to the bridge itself, e.g: $ bridge fdb add 02:00:de:ad:00:01 dev br0 vlan 1 self local (except that right now, DSA still ignores 'local' FDB entries, this will be changed in a later patch) Signed-off-by: Tobias Waldekranz Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 26ee7b06a4d3086a3751b69c14663ba6c6bbfe7f Author: Vladimir Oltean Date: Tue Jun 29 17:06:53 2021 +0300 net: dsa: install the host MDB and FDB entries in the master's RX filter If the DSA master implements strict address filtering, then the unicast and multicast addresses kept by the DSA CPU ports should be synchronized with the address lists of the DSA master. Note that we want the synchronization of the master's address lists even if the DSA switch doesn't support unicast/multicast database operations, on the premises that the packets will be flooded to the CPU in that case, and we should still instruct the master to receive them. This is why we do the dev_uc_add() etc first, even if dsa_port_notify() returns -EOPNOTSUPP. In turn, dev_uc_add() and friends return error only if memory allocation fails, so it is probably ok to check and propagate that error code and not just ignore it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3f6e32f92a027e91f001070ec324dd3b534d948c Author: Vladimir Oltean Date: Tue Jun 29 17:06:52 2021 +0300 net: dsa: reference count the FDB addresses at the cross-chip notifier level The same concerns expressed for host MDB entries are valid for host FDBs just as well: - in the case of multiple bridges spanning the same switch chip, deleting a host FDB entry that belongs to one bridge will result in breakage to the other bridge - not deleting FDB entries across DSA links means that the switch's hardware tables will eventually run out, given enough wear&tear So do the same thing and introduce reference counting for CPU ports and DSA links using the same data structures as we have for MDB entries. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3dc80afc509831ec436e14d8ae74de330b37636d Author: Vladimir Oltean Date: Tue Jun 29 17:06:51 2021 +0300 net: dsa: introduce a separate cross-chip notifier type for host FDBs DSA treats some bridge FDB entries by trapping them to the CPU port. Currently, the only class of such entries are FDB addresses learnt by the software bridge on a foreign interface. However there are many more to be added: - FDB entries with the is_local flag (for termination) added by the bridge on the user ports (typically containing the MAC address of the bridge port) - FDB entries pointing towards the bridge net device (for termination). Typically these contain the MAC address of the bridge net device. - Static FDB entries installed on a foreign interface that is in the same bridge with a DSA user port. The reason why a separate cross-chip notifier for host FDBs is justified compared to normal FDBs is the same as in the case of host MDBs: the cross-chip notifier matching function in switch.c should avoid installing these entries on routing ports that route towards the targeted switch, but not towards the CPU. This is required in order to have proper support for H-like multi-chip topologies. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 161ca59d39e909d37eeeaf14bc1165b114790d00 Author: Vladimir Oltean Date: Tue Jun 29 17:06:50 2021 +0300 net: dsa: reference count the MDB entries at the cross-chip notifier level Ever since the cross-chip notifiers were introduced, the design was meant to be simplistic and just get the job done without worrying too much about dangling resources left behind. For example, somebody installs an MDB entry on sw0p0 in this daisy chain topology. It gets installed using ds->ops->port_mdb_add() on sw0p0, sw1p4 and sw2p4. | sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ user ] [ user ] [ user ] [ dsa ] [ cpu ] [ x ] [ ] [ ] [ ] [ ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] | +---------+ | sw2p0 sw2p1 sw2p2 sw2p3 sw2p4 [ user ] [ user ] [ user ] [ user ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] Then the same person deletes that MDB entry. The cross-chip notifier for deletion only matches sw0p0: | sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ user ] [ user ] [ user ] [ dsa ] [ cpu ] [ x ] [ ] [ ] [ ] [ ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] [ ] [ ] [ ] [ ] [ ] | +---------+ | sw2p0 sw2p1 sw2p2 sw2p3 sw2p4 [ user ] [ user ] [ user ] [ user ] [ dsa ] [ ] [ ] [ ] [ ] [ ] Why? Because the DSA links are 'trunk' ports, if we just go ahead and delete the MDB from sw1p4 and sw2p4 directly, we might delete those multicast entries when they are still needed. Just consider the fact that somebody does: - add a multicast MAC address towards sw0p0 [ via the cross-chip notifiers it gets installed on the DSA links too ] - add the same multicast MAC address towards sw0p1 (another port of that same switch) - delete the same multicast MAC address from sw0p0. At this point, if we deleted the MAC address from the DSA links, it would be flooded, even though there is still an entry on switch 0 which needs it not to. So that is why deletions only match the targeted source port and nothing on DSA links. Of course, dangling resources means that the hardware tables will eventually run out given enough additions/removals, but hey, at least it's simple. But there is a bigger concern which needs to be addressed, and that is our support for SWITCHDEV_OBJ_ID_HOST_MDB. DSA simply translates such an object into a dsa_port_host_mdb_add() which ends up as ds->ops->port_mdb_add() on the upstream port, and a similar thing happens on deletion: dsa_port_host_mdb_del() will trigger ds->ops->port_mdb_del() on the upstream port. When there are 2 VLAN-unaware bridges spanning the same switch (which is a use case DSA proudly supports), each bridge will install its own SWITCHDEV_OBJ_ID_HOST_MDB entries. But upon deletion, DSA goes ahead and emits a DSA_NOTIFIER_MDB_DEL for dp->cpu_dp, which is shared between the user ports enslaved to br0 and the user ports enslaved to br1. Not good. The host-trapped multicast addresses installed by br1 will be deleted when any state changes in br0 (IGMP timers expire, or ports leave, etc). To avoid this, we could of course go the route of the zero-sum game and delete the DSA_NOTIFIER_MDB_DEL call for dp->cpu_dp. But the better design is to just admit that on shared ports like DSA links and CPU ports, we should be reference counting calls, even if this consumes some dynamic memory which DSA has traditionally avoided. On the flip side, the hardware tables of switches are limited in size, so it would be good if the OS managed them properly instead of having them eventually overflow. To address the memory usage concern, we only apply the refcounting of MDB entries on ports that are really shared (CPU ports and DSA links) and not on user ports. In a typical single-switch setup, this means only the CPU port (and the host MDB entries are not that many, really). The name of the newly introduced data structures (dsa_mac_addr) is chosen in such a way that will be reusable for host FDB entries (next patch). With this change, we can finally have the same matching logic for the MDB additions and deletions, as well as for their host-trapped variants. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b8e997c490036f38d48687415fd1367e00e98fb9 Author: Vladimir Oltean Date: Tue Jun 29 17:06:49 2021 +0300 net: dsa: introduce a separate cross-chip notifier type for host MDBs Commit abd49535c380 ("net: dsa: execute dsa_switch_mdb_add only for routing port in cross-chip topologies") does a surprisingly good job even for the SWITCHDEV_OBJ_ID_HOST_MDB use case, where DSA simply translates a switchdev object received on dp into a cross-chip notifier for dp->cpu_dp. To visualize how that works, imagine the daisy chain topology below and consider a SWITCHDEV_OBJ_ID_HOST_MDB object emitted on sw2p0. How does the cross-chip notifier know to match on all the right ports (sw0p4, the dedicated CPU port, sw1p4, an upstream DSA link, and sw2p4, another upstream DSA link)? | sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ user ] [ user ] [ user ] [ dsa ] [ cpu ] [ ] [ ] [ ] [ ] [ x ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] | +---------+ | sw2p0 sw2p1 sw2p2 sw2p3 sw2p4 [ user ] [ user ] [ user ] [ user ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] The answer is simple: the dedicated CPU port of sw2p0 is sw0p4, and dsa_routing_port returns the upstream port for all switches. That is fine, but there are other topologies where this does not work as well. There are trees with "H" topologies in the wild, where there are 2 or more switches with DSA links between them, but every switch has its dedicated CPU port. For these topologies, it seems stupid for the neighbor switches to install an MDB entry on the routing port, since these multicast addresses are fundamentally different than the usual ones we support (and that is the justification for this patch, to introduce the concept of a termination plane multicast MAC address, as opposed to a forwarding plane multicast MAC address). For example, when a SWITCHDEV_OBJ_ID_HOST_MDB would get added to sw0p0, without this patch, it would get treated as a regular port MDB on sw0p2 and it would match on the ports below (including the sw1p3 routing port). | | sw0p0 sw0p1 sw0p2 sw0p3 sw1p3 sw1p2 sw1p1 sw1p0 [ user ] [ user ] [ cpu ] [ dsa ] [ dsa ] [ cpu ] [ user ] [ user ] [ ] [ ] [ x ] [ ] ---- [ x ] [ ] [ ] [ ] With the patch, the host MDB notifier on sw0p0 matches only on the local switch, which is what we want for a termination plane address. | | sw0p0 sw0p1 sw0p2 sw0p3 sw1p3 sw1p2 sw1p1 sw1p0 [ user ] [ user ] [ cpu ] [ dsa ] [ dsa ] [ cpu ] [ user ] [ user ] [ ] [ ] [ x ] [ ] ---- [ ] [ ] [ ] [ ] Name this new matching function "dsa_switch_host_address_match" since we will be reusing it soon for host FDB entries as well. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 63609c8fac40810b0b14c9512d47b11965cea37f Author: Vladimir Oltean Date: Tue Jun 29 17:06:48 2021 +0300 net: dsa: introduce dsa_is_upstream_port and dsa_switch_is_upstream_of In preparation for the new cross-chip notifiers for host addresses, let's introduce some more topology helpers which we are going to use to discern switches that are in our path towards the dedicated CPU port from switches that aren't. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b117e1e8a86d363fc1ad53df8d2c47884d2c0048 Author: Vladimir Oltean Date: Tue Jun 29 17:06:47 2021 +0300 net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_del We want to add reference counting for FDB entries in cross-chip topologies, and in order for that to have any chance of working and not be unbalanced (leading to entries which are never deleted), we need to ensure that higher layers are sane, because if they aren't, it's garbage in, garbage out. For example, if we add a bridge FDB entry twice, the bridge properly errors out: $ bridge fdb add dev swp0 00:01:02:03:04:07 master static $ bridge fdb add dev swp0 00:01:02:03:04:07 master static RTNETLINK answers: File exists However, the same thing cannot be said about the bridge bypass operations: $ bridge fdb add dev swp0 00:01:02:03:04:07 $ bridge fdb add dev swp0 00:01:02:03:04:07 $ bridge fdb add dev swp0 00:01:02:03:04:07 $ bridge fdb add dev swp0 00:01:02:03:04:07 $ echo $? 0 But one 'bridge fdb del' is enough to remove the entry, no matter how many times it was added. The bridge bypass operations are impossible to maintain in these circumstances and lack of support for reference counting the cross-chip notifiers is holding us back from making further progress, so just drop support for them. The only way left for users to install static bridge FDB entries is the proper one, using the "master static" flags. With this change, rtnl_fdb_add() falls back to calling ndo_dflt_fdb_add() which uses the duplicate-exclusive variant of dev_uc_add(): dev_uc_add_excl(). Because DSA does not (yet) declare IFF_UNICAST_FLT, this results in us going to promiscuous mode: $ bridge fdb add dev swp0 00:01:02:03:04:05 [ 28.206743] device swp0 entered promiscuous mode $ bridge fdb add dev swp0 00:01:02:03:04:05 RTNETLINK answers: File exists So even if it does not completely fail, there is at least some indication that it is behaving differently from before, and closer to user space expectations, I would argue (the lack of a "local|static" specifier defaults to "local", or "host-only", so dev_uc_add() is a reasonable default implementation). If the generic implementation of .ndo_fdb_add provided by Vlad Yasevich is a proof of anything, it only proves that the implementation provided by DSA was always wrong, by not looking at "ndm->ndm_state & NUD_NOARP" (the "static" flag which means that the FDB entry points outwards) and "ndm->ndm_state & NUD_PERMANENT" (the "local" flag which means that the FDB entry points towards the host). It all used to mean the same thing to DSA. Update the documentation so that the users are not confused about what's going on. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f851a721a638316a8257459db8359f2930d4b473 Author: Vladimir Oltean Date: Tue Jun 29 17:06:46 2021 +0300 net: bridge: allow br_fdb_replay to be called for the bridge device When a port joins a bridge which already has local FDB entries pointing to the bridge device itself, we would like to offload those, so allow the "dev" argument to be equal to the bridge too. The code already does what we need in that case. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6eb38bf8eb90748dbf4191f6c4940ae76223b0a4 Author: Tobias Waldekranz Date: Tue Jun 29 17:06:45 2021 +0300 net: bridge: switchdev: send FDB notifications for host addresses Treat addresses added to the bridge itself in the same way as regular ports and send out a notification so that drivers may sync it down to the hardware FDB. Signed-off-by: Tobias Waldekranz Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3e19ae7c6fd62978ae518b17ae0e30ab8d17ed07 Author: Vladimir Oltean Date: Tue Jun 29 17:06:44 2021 +0300 net: bridge: use READ_ONCE() and WRITE_ONCE() compiler barriers for fdb->dst Annotate the writer side of fdb->dst: - fdb_create() - br_fdb_update() - fdb_add_entry() - br_fdb_external_learn_add() with WRITE_ONCE() and the reader side: - br_fdb_test_addr() - br_fdb_update() - fdb_fill_info() - fdb_add_entry() - fdb_delete_by_addr_and_port() - br_fdb_external_learn_add() - br_switchdev_fdb_notify() with compiler barriers such that the readers do not attempt to reload fdb->dst multiple times, leading to potentially different destination ports when the fdb entry is updated concurrently. This is especially important in read-side sections where fdb->dst is used more than once, but let's convert all accesses for the sake of uniformity. Suggested-by: Nikolay Aleksandrov Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e9e8ee40b37af80626236517d6b7f110526bf2ff Merge: 5483b904bf336 df2c7b951f439 Author: Trond Myklebust Date: Mon Jun 21 11:39:14 2021 -0400 Merge branch 'leases-devel' Signed-off-by: Trond Myklebust commit df2c7b951f439a0342495a4a049d808f679c474c Author: Trond Myklebust Date: Fri Jun 25 15:08:39 2021 -0400 NFSv4: setlease should return EAGAIN if locks are not available Instead of returning ENOLCK when we can't hand out a lease, we should be returning EAGAIN. Signed-off-by: Trond Myklebust commit e97bc66377bca097e1f3349ca18ca17f202ff659 Author: Trond Myklebust Date: Tue May 11 23:41:10 2021 -0400 NFS: nfs_find_open_context() may only select open files If a file has already been closed, then it should not be selected to support further I/O. Signed-off-by: Trond Myklebust [Trond: Fix an invalid pointer deref reported by Colin Ian King] commit cd8f318fbd266b127ffc93cc4c1eaf9a5196fafb Author: Jing Xiangfeng Date: Tue Jun 29 19:59:56 2021 +0800 drm/gma500: Add the missed drm_gem_object_put() in psb_user_framebuffer_create() psb_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210629115956.15160-1-jingxiangfeng@huawei.com commit 82c850c12fc250bdba25e7e66f54adab2ffcfcd6 Author: Randy Dunlap Date: Sun Jun 27 17:40:12 2021 -0700 : correct a function name in kernel-doc Fix kernel-doc function name warning: ../include/linux/dma-resv.h:227: warning: expecting prototype for dma_resv_exclusive(). Prototype was for dma_resv_excl_fence() instead Fixes: 6edbd6abb783d ("dma-buf: rename and cleanup dma_resv_get_excl v3") Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: Christian König Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210628004012.6792-1-rdunlap@infradead.org commit 9913d5745bd720c4266805c8d29952a3702e4eca Author: Steven Rostedt (VMware) Date: Tue Jun 29 09:40:10 2021 -0400 tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing All internal use cases for tracepoint_probe_register() is set to not ever be called with the same function and data. If it is, it is considered a bug, as that means the accounting of handling tracepoints is corrupted. If the function and data for a tracepoint is already registered when tracepoint_probe_register() is called, it will call WARN_ON_ONCE() and return with EEXISTS. The BPF system call can end up calling tracepoint_probe_register() with the same data, which now means that this can trigger the warning because of a user space process. As WARN_ON_ONCE() should not be called because user space called a system call with bad data, there needs to be a way to register a tracepoint without triggering a warning. Enter tracepoint_probe_register_may_exist(), which can be called, but will not cause a WARN_ON() if the probe already exists. It will still error out with EEXIST, which will then be sent to the user space that performed the BPF system call. This keeps the previous testing for issues with other users of the tracepoint code, while letting BPF call it with duplicated data and not warn about it. Link: https://lore.kernel.org/lkml/20210626135845.4080-1-penguin-kernel@I-love.SAKURA.ne.jp/ Link: https://syzkaller.appspot.com/bug?id=41f4318cf01762389f4d1c1c459da4f542fe5153 Cc: stable@vger.kernel.org Fixes: c4f6699dfcb85 ("bpf: introduce BPF_RAW_TRACEPOINT") Reported-by: syzbot Reported-by: Tetsuo Handa Tested-by: syzbot+721aa903751db87aa244@syzkaller.appspotmail.com Signed-off-by: Steven Rostedt (VMware) commit 2fee14ac97dc74f6a8525e69640c6972a4f36899 Author: Wenbin Mei Date: Tue Jun 15 11:00:33 2021 +0800 dt-bindings: mmc: change compatiable string for MT8195 mmc host IP MT8195 mmc host IP is compatible with MT8183, and currently it shows: properties: compatible: oneOf: ... - items: - const: mediatek,mt8192-mmc - const: mediatek,mt8195-mmc - const: mediatek,mt8183-mmc which means the compatible string in the device tree would be: compatible = "mediatek,mt8192-mmc", "mediatek,mt8195-mmc", "mediatek,mt8183-mmc"; The bindings is wrong and that isn't the result we want. instead we want: properties: compatible: oneOf: ... - items: - const: mediatek,mt8192-mmc - const: mediatek,mt8183-mmc - items: - const: mediatek,mt8195-mmc - const: mediatek,mt8183-mmc which would give us: compatible = "mediatek,mt8192-mmc", "mediatek,mt8183-mmc"; and compatible = "mediatek,mt8195-mmc", "mediatek,mt8183-mmc"; Fixes: eb9cb7227e5c (dt-bindings: mmc: Add compatible for Mediatek MT8195) Signed-off-by: Wenbin Mei Acked-by: Rob Herring Link: https://lore.kernel.org/r/1623726033-16073-2-git-send-email-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit 49036ba889e346da6ebf2f741fe0b0ee49a11b08 Author: Takashi Iwai Date: Fri Jun 11 12:19:48 2021 +0200 mmc: sdhci: Clear unused bounce buffer at DMA mmap error path When DMA-mapping of the bounce buffer fails, the driver tries to fall back, but it leaves the allocated host->bounce_buffer although its size is zero. Later on, the driver checks the use of bounce buffer with host->bounce_buffer pointer, and it tries to use the buffer incorrectly, resulting in Oops. This patch clears the release the unused buffer and clears the bounce_buffer pointer for addressing the problem. Acked-by: Adrian Hunter Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210611101948.18972-1-tiwai@suse.de Signed-off-by: Ulf Hansson commit 2f2b73a29d2aabf5ad0150856c3e5cb6e04dcfc1 Author: Rashmi A Date: Thu Jun 3 23:52:42 2021 +0530 phy: intel: Fix for warnings due to EMMC clock 175Mhz change in FIP Since the EMMC clock was changed from 200Mhz to 175Mhz in FIP, there were some warnings introduced, as the frequency values being checked was still wrt 200Mhz in code. Hence, the frequency checks are now updated based on the current 175Mhz EMMC clock changed in FIP. Spamming kernel log msg: "phy phy-20290000.mmc_phy.2: Unsupported rate: 43750000" Signed-off-by: Rashmi A Reviewed-by: Adrian Hunter Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20210603182242.25733-3-rashmi.a@intel.com Signed-off-by: Ulf Hansson commit b2af322792d64d3748b9915cbcbd031dd035d7e2 Author: Rashmi A Date: Thu Jun 3 23:52:41 2021 +0530 mmc: sdhci-of-arasan: Use clock-frequency property to update clk_xin If clock-frequency property is set and it is not the same as the current clock rate of clk_xin(base clock frequency), set clk_xin to use the provided clock rate. Signed-off-by: Rashmi A Reviewed-by: Adrian Hunter Tested-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/20210603182242.25733-2-rashmi.a@intel.com Signed-off-by: Ulf Hansson commit 77347eda64ed5c9383961d1de9165f9d0b7d8df6 Author: Wolfram Sang Date: Thu Jun 24 17:16:14 2021 +0200 mmc: core: clear flags before allowing to retune It might be that something goes wrong during tuning so the MMC core will immediately trigger a retune. In our case it was: - we sent a tuning block - there was an error so we need to send an abort cmd to the eMMC - the abort cmd had a CRC error - retune was set by the MMC core This lead to a vicious circle causing a performance regression of 75%. So, clear retuning flags before we enable retuning to start with a known cleared state. Reported-by Yoshihiro Shimoda Suggested-by: Adrian Hunter Signed-off-by: Wolfram Sang Acked-by: Adrian Hunter Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Fixes: bd11e8bd03ca ("mmc: core: Flag re-tuning is needed on CRC errors") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210624151616.38770-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 22b65d31ad9d10cdd726239966b6d6f67db8f251 Merge: ed562d280cb77 5937c3ce21228 bc6f49213426a Author: Rafael J. Wysocki Date: Tue Jun 29 15:53:19 2021 +0200 Merge branches 'pm-domains' and 'pm-devfreq' * pm-domains: PM: domains: Drop/restore performance state votes for devices at runtime PM PM: domains: Return early if perf state is already set for the device PM: domains: Split code in dev_pm_genpd_set_performance_state() PM: domains: fix some kernel-doc issues * pm-devfreq: PM / devfreq: passive: Fix get_target_freq when not using required-opp dt-bindings: devfreq: tegra30-actmon: Add cooling-cells dt-bindings: devfreq: tegra30-actmon: Convert to schema PM / devfreq: userspace: Use DEVICE_ATTR_RW macro PM / devfreq: imx8m-ddrc: Remove DEVFREQ_GOV_SIMPLE_ONDEMAND dependency PM / devfreq: tegra30: Support thermal cooling PM / devfreq: imx-bus: Remove imx_bus_get_dev_status PM / devfreq: Add missing error code in devfreq_add_device() commit ed562d280cb775ae4ba940bb4b81a1fbcfb303cb Merge: afe94fb82c113 3b7180573c250 795e0e38de2c3 Author: Rafael J. Wysocki Date: Tue Jun 29 15:53:07 2021 +0200 Merge branches 'pm-cpufreq' and 'pm-cpuidle' * pm-cpufreq: cpufreq: Make cpufreq_online() call driver->offline() on errors cpufreq: loongson2: Remove unused linux/sched.h headers cpufreq: sh: Remove unused linux/sched.h headers cpufreq: stats: Clean up local variable in cpufreq_stats_create_table() cpufreq: intel_pstate: hybrid: Fix build with CONFIG_ACPI unset cpufreq: sc520_freq: add 'fallthrough' to one case cpufreq: intel_pstate: Add Cometlake support in no-HWP mode cpufreq: intel_pstate: Add Icelake servers support in no-HWP mode cpufreq: intel_pstate: hybrid: CPU-specific scaling factor cpufreq: intel_pstate: hybrid: Avoid exposing two global attributes * pm-cpuidle: cpuidle: teo: remove unneeded semicolon in teo_select() cpuidle: teo: Use kerneldoc documentation in admin-guide cpuidle: teo: Rework most recent idle duration values treatment cpuidle: teo: Change the main idle state selection logic cpuidle: teo: Cosmetic modification of teo_select() cpuidle: teo: Cosmetic modifications of teo_update() intel_idle: Adjust the SKX C6 parameters if PC6 is disabled commit afe94fb82c113727de211e32af88982534ba8b0c Merge: fff3df4bac009 4ec4f059088b4 480f0de68cadd Author: Rafael J. Wysocki Date: Tue Jun 29 15:52:53 2021 +0200 Merge branches 'pm-core' and 'pm-sleep' * pm-core: PM: runtime: Clarify documentation when callbacks are unassigned PM: runtime: Allow unassigned ->runtime_suspend|resume callbacks PM: runtime: Improve path in rpm_idle() when no callback PM: runtime: document common mistake with pm_runtime_get_sync() * pm-sleep: PM: hibernate: remove leading spaces before tabs PM: sleep: remove trailing spaces and tabs PM: hibernate: fix spelling mistakes PM: wakeirq: Set IRQF_NO_AUTOEN when requesting the IRQ commit fff3df4bac0093bc8d4e5d349fc1bcd9c7c14da2 Merge: 4d6035f9bf4ea d5ddd4c921ab9 Author: Rafael J. Wysocki Date: Tue Jun 29 15:52:13 2021 +0200 Merge branch 'pm-opp' * pm-opp: opp: Allow required-opps to be used for non genpd use cases opp: use list_del_init instead of list_del/INIT_LIST_HEAD commit 64f9111dd6225a50b8fdd365dfdda275c2a708c0 Merge: 8b457d60608aa 4370cbf350dba ccb5ecdc2ddea 8e3ecc68e33ff 120f4aa80b4ca Author: Rafael J. Wysocki Date: Tue Jun 29 15:51:25 2021 +0200 Merge branches 'acpi-ec', 'acpi-apei', 'acpi-soc' and 'acpi-misc' * acpi-ec: ACPI: EC: trust DSDT GPE for certain HP laptop ACPI: EC: Make more Asus laptops use ECDT _GPE * acpi-apei: ACPI: APEI: fix synchronous external aborts in user-mode ACPI: APEI: Don't warn if ACPI is disabled * acpi-soc: ACPI: LPSS: Use kstrtol() instead of simple_strtol() * acpi-misc: ACPI: NVS: fix doc warnings in nvs.c ACPI: NUMA: fix typo in a comment ACPI: OSL: Use DEFINE_RES_IO_NAMED() to simplify code ACPI: bus: Call kobject_put() in acpi_init() error path ACPI: bus: Remove unneeded assignment ACPI: configfs: Replace ACPI_INFO() with pr_debug() ACPI: ipmi: Remove address space handler in error path ACPI: event: Remove redundant initialization of local variable ACPI: sbshc: Fix fall-through warning for Clang commit 8b457d60608aa76d7ce9c04a312669761025ba42 Merge: 3a616ec7977b3 7d966119f7db5 0ac2c0e4ff4b4 Author: Rafael J. Wysocki Date: Tue Jun 29 15:50:37 2021 +0200 Merge branches 'acpi-dptf' and 'acpi-messages' * acpi-dptf: ACPI: DPTF: Add battery participant for Intel SoCs * acpi-messages: ACPI: Remove the macro PREFIX "ACPI: " ACPI: sleep: Unify the message printing ACPI: sbs: Unify the message printing ACPI: scan: Unify the log message printing ACPI: sbshc: Unify the message printing ACPI: sysfs: Cleanup message printing ACPI: reboot: Unify the message printing ACPI: processor_throttling: Cleanup the printing messages ACPI: processor_perflib: Cleanup print messages ACPI: processor_thermal: Remove unused PREFIX for printing ACPI: pci_root: Unify the message printing ACPI: osl: Remove the duplicated PREFIX for message printing ACPI: nvs: Unify the message printing ACPI: glue: Clean up the printing messages ACPI: event: Use pr_*() macros to replace printk() ACPI: bus: Use pr_*() macros to replace printk() ACPI: blacklist: Unify the message printing ACPI: cmos_rtc: Using pr_fmt() and remove PREFIX commit 3a616ec7977b3576caf8214cf92cac646f41cd55 Merge: 2f4edfadbcb2b d7a188bb87d8d df35ee7086411 14fad24d0520c Author: Rafael J. Wysocki Date: Tue Jun 29 15:48:08 2021 +0200 Merge branches 'acpi-prm', 'acpi-sysfs' and 'acpi-x86' * acpi-prm: ACPI: PRM: make symbol 'prm_module_list' static ACPI: Add \_SB._OSC bit for PRM ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype * acpi-sysfs: ACPI: sysfs: Remove tailing return statement in void function ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros ACPI: sysfs: Sort headers alphabetically ACPI: sysfs: Refactor param_get_trace_state() to drop dead code ACPI: sysfs: Unify pattern of memory allocations ACPI: sysfs: Allow bitmap list to be supplied to acpi_mask_gpe ACPI: sysfs: Make sparse happy about address space in use ACPI: sysfs: fix doc warnings in device_sysfs.c ACPI: sysfs: Drop four redundant return statements ACPI: sysfs: Fix a buffer overrun problem with description_show() * acpi-x86: x86/acpi: Switch to pr_xxx log functions commit 2f4edfadbcb2b50b47b4b6cfbe943db9c3262bc0 Merge: dfef7710d7496 f7599be2bb769 2ef53bf714777 0ec4e55e9f571 Author: Rafael J. Wysocki Date: Tue Jun 29 15:47:29 2021 +0200 Merge branches 'acpi-pm', 'acpi-processor' and 'acpi-resources' * acpi-pm: ACPI: PM: postpone bringing devices to D0 unless we need them ACPI: PM: Adjust behavior for field problems on AMD systems ACPI: PM: s2idle: Add support for new Microsoft UUID ACPI: PM: s2idle: Add support for multiple func mask ACPI: PM: s2idle: Refactor common code ACPI: PM: s2idle: Use correct revision id ACPI: power: Use dev_dbg() to print some messages ACPI: sleep: Fix acpi_pm_pre_suspend() kernel-doc ACPI: power: Rework turning off unused power resources ACPI: power: Save the last known state of each power resource ACPI: power: Use u8 as the power resource state data type ACPI: PM / fan: Put fan device IDs into separate header file ACPI: PM: s2idle: Add missing LPS0 functions for AMD * acpi-processor: ACPI: processor_throttling: Fix several coding style issues ACPI: processor_throttling: Remove redundant initialization of 'obj' ACPI: processor idle: Fix up C-state latency if not ordered * acpi-resources: ACPI: resources: Add checks for ACPI IRQ override commit dfef7710d749617513a6c8c2bfb29ba415dab7e8 Merge: f9ef9b82ea18e 84b7355b7a8ac 8d287e8292ea1 d1059c1b11468 Author: Rafael J. Wysocki Date: Tue Jun 29 15:46:52 2021 +0200 Merge branches 'acpi-bus', 'acpi-scan' and 'acpi-tables' * acpi-bus: ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc() * acpi-scan: ACPI: scan: Simplify acpi_table_events_fn() ACPI: scan: Fix race related to dropping dependencies ACPI: scan: Reorganize acpi_device_add() ACPI: scan: Fix device object rescan in acpi_scan_clear_dep() ACPI: scan: Make acpi_walk_dep_device_list() ACPI: scan: Rearrange acpi_dev_get_first_consumer_dev_cb() ACPI: scan: Define acpi_bus_put_acpi_device() as static inline ACPI: scan: initialize local variable to avoid garbage being returned ACPI: scan: Add function to fetch dependent of ACPI device ACPI: scan: Extend acpi_walk_dep_device_list() ACPI: scan: Rearrange dep_unmet initialization * acpi-tables: ACPI: tables: Add custom DSDT file as makefile prerequisite ACPI: bgrt: Use sysfs_emit ACPI: bgrt: Fix CFI violation ACPI: tables: FPDT: Add missing acpi_put_table() in acpi_init_fpdt() ACPI: tables: PPTT: Populate cache-id if provided by firmware commit f9ef9b82ea18e78d4cf614875a130f1a0316e645 Merge: 49b9441a25817 9f8c7baedabc9 Author: Rafael J. Wysocki Date: Tue Jun 29 15:45:52 2021 +0200 Merge branch 'acpica' * acpica: ACPICA: Add PRMT module header to facilitate parsing ACPICA: Update version to 20210604 ACPICA: Add support for PlatformRtMechanism OperationRegion handler ACPICA: iASL: add disassembler support for PRMT ACPICA: Add the CFMWS structure definition to the CEDT table ACPICA: Add defines for the CXL Host Bridge Structure (CHBS) ACPICA: iASL: Add support for the BDAT ACPI table ACPICA: Add _PLD panel positions ACPICA: Use ACPI_FALLTHROUGH ACPICA: iASL Table Compiler: Add full support for RGRT ACPI table ACPICA: iASL: Add support for the SVKL table ACPICA: iASL: Finish support for the IVRS ACPI table ACPICA: Fix memory leak caused by _CID repair function ACPICA: Add SVKL table headers ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Mailbox Structure commit 2705dfb2094777e405e065105e307074af8965c1 Author: Ming Lei Date: Mon Jun 28 10:33:12 2021 +0800 block: fix discard request merge ll_new_hw_segment() is reached only in case of single range discard merge, and we don't have max discard segment size limit actually, so it is wrong to run the following check: if (req->nr_phys_segments + nr_phys_segs > blk_rq_get_max_segments(req)) it may be always false since req->nr_phys_segments is initialized as one, and bio's segment count is still 1, blk_rq_get_max_segments(reg) is 1 too. Fix the issue by not doing the check and bypassing the calculation of discard request's nr_phys_segments. Based on analysis from Wang Shanker. Cc: Christoph Hellwig Reported-by: Wang Shanker Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210628023312.1903255-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit ba3fea547236bfd325f4713dfb0569e150010894 Author: Gustavo A. R. Silva Date: Tue Jun 29 08:37:04 2021 -0500 i3c: master: cdns: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit ba2472eaf7255dfba27cea0b674ffcc0ee348293 Author: Nirmoy Das Date: Tue Jun 29 13:44:13 2021 +0200 drm/amdgpu: return early for non-TTM_PL_TT type BOs Return early for non-TTM_PL_TT BOs so that we don't pass wrong pointer to amdgpu_gtt_mgr_has_gart_addr() which assumes ttm_resource argument to be TTM_PL_TT type BO's. v3: remove extra braces. v2: merge if-conditions. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210629114413.3371-1-nirmoy.das@amd.com commit 6ca24c65632e5c8a46641fa81e0c42a81b5822a5 Author: Gustavo A. R. Silva Date: Tue Jun 29 08:17:23 2021 -0500 net/mlx4: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Tariq Toukan Signed-off-by: Gustavo A. R. Silva commit d5ddd4c921ab9e39ef898f1df52acafaea92e182 Merge: 13311e74253fe 4fa82a87ba55f Author: Rafael J. Wysocki Date: Tue Jun 29 15:05:57 2021 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework updates for v5.14 from Viresh Kumar: "This pull request: - allows partial use of required-opps for non-genpd users. - does a minor cleanup and uses list_del_init()." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Allow required-opps to be used for non genpd use cases opp: use list_del_init instead of list_del/INIT_LIST_HEAD commit 7c1a80e80cde008f271bae630d28cf684351e807 Author: Pavel Skripkin Date: Fri Jun 25 13:23:54 2021 +0300 net: xfrm: fix memory leak in xfrm_user_rcv_msg Syzbot reported memory leak in xfrm_user_rcv_msg(). The problem was is non-freed skb's frag_list. In skb_release_all() skb_release_data() will be called only in case of skb->head != NULL, but netlink_skb_destructor() sets head to NULL. So, allocated frag_list skb should be freed manualy, since consume_skb() won't take care of it Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator") Reported-and-tested-by: syzbot+fb347cf82c73a90efcca@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Steffen Klassert commit 7a607a41cdc6c6f27b8e234cb44ce57070513dac Author: Andreas Gruenbacher Date: Thu Jun 17 21:36:50 2021 +0200 gfs2: Clean up gfs2_unstuff_dinode Split __gfs2_unstuff_inode off from gfs2_unstuff_dinode and clean up the code a little. All remaining callers now pass NULL as the page argument of gfs2_unstuff_dinode, so remove that argument. Signed-off-by: Andreas Gruenbacher commit 64090cbe4bff240e9a5266e956fcaf449ea6b327 Author: Andreas Gruenbacher Date: Thu Jun 17 23:04:14 2021 +0200 gfs2: Unstuff before locking page in gfs2_page_mkwrite In gfs2_page_mkwrite, unstuff inodes before locking the page. That way, we won't have to pass in the locked page to gfs2_unstuff_inode, and gfs2_unstuff_inode can look up and lock the page itself. Signed-off-by: Andreas Gruenbacher commit 0fc3bcd6b6e34281254658bef27c45ec8c19e50c Author: Andreas Gruenbacher Date: Thu May 13 14:30:31 2021 +0200 gfs2: Clean up the error handling in gfs2_page_mkwrite We're setting an error number so that block_page_mkwrite_return translates it into the corresponding VM_FAULT_* code in several places, but this is getting confusing, so set the VM_FAULT_* codes directly instead. (No change in functionality.) Signed-off-by: Andreas Gruenbacher commit c994a3ec7ecc8bd2a837b2061e8a76eb8efc082b Author: Nick Desaulniers Date: Mon Jun 28 14:50:26 2021 -0700 MIPS: set mips32r5 for virt extensions Clang's integrated assembler only accepts these instructions when the cpu is set to mips32r5. With this change, we can assemble malta_defconfig with Clang via `make LLVM_IAS=1`. Link: https://github.com/ClangBuiltLinux/linux/issues/763 Reported-by: Dmitry Golovin Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Bogendoerfer commit 6817c944430d00f71ccaa9c99ff5b0096aeb7873 Author: zhanglianjie Date: Mon Jun 28 17:11:05 2021 +0800 MIPS: loongsoon64: Reserve memory below starting pfn to prevent Oops The cause of the problem is as follows: 1. when cat /sys/devices/system/memory/memory0/valid_zones, test_pages_in_a_zone() will be called. 2. test_pages_in_a_zone() finds the zone according to stat_pfn = 0. The smallest pfn of the numa node in the mips architecture is 128, and the page corresponding to the previous 0~127 pfn is not initialized (page->flags is 0xFFFFFFFF) 3. The nid and zonenum obtained using page_zone(pfn_to_page(0)) are out of bounds in the corresponding array, &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)], access to the out-of-bounds zone member variables appear abnormal, resulting in Oops. Therefore, it is necessary to keep the page between 0 and the minimum pfn to prevent Oops from appearing. Signed-off-by: zhanglianjie Signed-off-by: Thomas Bogendoerfer commit cad065ed8d8831df67b9754cc4437ed55d8b48c0 Author: Paul Cercueil Date: Fri Jun 25 11:49:29 2021 +0100 MIPS: MT extensions are not available on MIPS32r1 MIPS MT extensions were added with the MIPS 34K processor, which was based on the MIPS32r2 ISA. This fixes a build error when building a generic kernel for a MIPS32r1 CPU. Fixes: c434b9f80b09 ("MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol") Cc: stable@vger.kernel.org # v5.9 Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 94f2be50badfa88e96033e77621c6711d58f84d3 Merge: d8c032145fccf 3342aa8e6b4f6 Author: Petr Mladek Date: Tue Jun 29 09:53:17 2021 +0200 Merge branch 'printk-rework' into for-linus commit d8c032145fccfead0c3f733e7b6aaa4e81f9d326 Merge: 80ae552917228 d327ea15a3050 Author: Petr Mladek Date: Tue Jun 29 09:51:58 2021 +0200 Merge branch 'for-5.14-vsprintf-scanf' into for-linus commit 80ae552917228b97ca9f7df83f74ac306d6fd68f Merge: 4249cb7d92006 2f9e0f8c7e173 Author: Petr Mladek Date: Tue Jun 29 09:51:45 2021 +0200 Merge branch 'for-5.14-vsprintf-pts' into for-linus commit 03aea91bbe06d4ffae8c22c9e1e6671a76fd6d5a Author: Rajan Vaja Date: Mon Jun 28 00:01:22 2021 -0700 clk: zynqmp: Handle divider specific read only flag Add support for divider specific read only CCF flag (CLK_DIVIDER_READ_ONLY). Signed-off-by: Rajan Vaja Link: https://lore.kernel.org/r/20210628070122.26217-5-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit 54530ed17d1cc096f9ab0319001c96a63f772c62 Author: Rajan Vaja Date: Mon Jun 28 00:01:21 2021 -0700 clk: zynqmp: Use firmware specific mux clock flags Use ZynqMP specific mux clock flags instead of using CCF flags. Signed-off-by: Rajan Vaja Link: https://lore.kernel.org/r/20210628070122.26217-4-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit 1b09c308e64969f545f4b9474b786ad90dddf9a2 Author: Rajan Vaja Date: Mon Jun 28 00:01:20 2021 -0700 clk: zynqmp: Use firmware specific divider clock flags Use ZynqMP specific divider clock flags instead of using CCF flags. Signed-off-by: Rajan Vaja Link: https://lore.kernel.org/r/20210628070122.26217-3-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit 610a5d83010eaf02a857321092cf0cd02178bee7 Author: Rajan Vaja Date: Mon Jun 28 00:01:19 2021 -0700 clk: zynqmp: Use firmware specific common clock flags Currently firmware passes CCF specific flags to ZynqMP clock driver. So firmware needs to be updated if CCF flags are changed. The firmware should have its own 'flag number space' that is distinct from the common clk framework's 'flag number space'. So define and use ZynqMP specific common clock flags instead of using CCF flags. Signed-off-by: Rajan Vaja Link: https://lore.kernel.org/r/20210628070122.26217-2-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit bf68fdfdec6cd9a14323a61612ae9d7c510fbbdc Author: Stephen Boyd Date: Mon Jun 28 23:07:51 2021 -0700 clk: lmk04832: Use of match table Presumably we want to use this match table so add a module device table and set the driver match pointer appropriately. Reported-by: kernel test robot Cc: Liam Beguin Fixes: 3bc61cfd6f4a ("clk: add support for the lmk04832") Link: https://lore.kernel.org/r/20210629060751.3119453-2-sboyd@kernel.org Signed-off-by: Stephen Boyd commit 97a1c5cbbfe4b84573df2edc6b782132f8e012ad Author: Stephen Boyd Date: Mon Jun 28 23:07:50 2021 -0700 clk: lmk04832: Depend on SPI This driver depends on SPI. Otherwise compilation fails clk-lmk04832.c:(.text+0x1668): undefined reference to `spi_get_device_id' Reported-by: kernel test robot Cc: Liam Beguin Fixes: 3bc61cfd6f4a ("clk: add support for the lmk04832") Link: https://lore.kernel.org/r/20210629060751.3119453-1-sboyd@kernel.org Signed-off-by: Stephen Boyd commit df99446d5c2a63dc6e6920c8090da0e9da6539d5 Author: Javed Hasan Date: Thu Jun 24 10:18:02 2021 -0700 scsi: qedf: Add check to synchronize abort and flush A race condition was observed between qedf_cleanup_fcport() and qedf_process_error_detect()->qedf_initiate_abts(): [2069091.203145] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [2069091.213100] IP: [] qedf_process_error_detect+0x96/0x130 [qedf] [2069091.223391] PGD 1943049067 PUD 194304e067 PMD 0 [2069091.233420] Oops: 0000 [#1] SMP [2069091.361820] CPU: 1 PID: 14751 Comm: kworker/1:46 Kdump: loaded Tainted: P OE ------------ 3.10.0-1160.25.1.el7.x86_64 #1 [2069091.388474] Hardware name: HPE Synergy 480 Gen10/Synergy 480 Gen10 Compute Module, BIOS I42 04/08/2020 [2069091.402148] Workqueue: qedf_io_wq qedf_fp_io_handler [qedf] [2069091.415780] task: ffff9bb9f5190000 ti: ffff9bacaef9c000 task.ti: ffff9bacaef9c000 [2069091.429590] RIP: 0010:[] [] qedf_process_error_detect+0x96/0x130 [qedf] [2069091.443666] RSP: 0018:ffff9bacaef9fdb8 EFLAGS: 00010246 [2069091.457692] RAX: 0000000000000000 RBX: ffff9bbbbbfb18a0 RCX: ffffffffc0672310 [2069091.471997] RDX: 00000000000005de RSI: ffffffffc066e7f0 RDI: ffff9beb3f4538d8 [2069091.486130] RBP: ffff9bacaef9fdd8 R08: 0000000000006000 R09: 0000000000006000 [2069091.500321] R10: 0000000000001551 R11: ffffb582996ffff8 R12: ffffb5829b39cc18 [2069091.514779] R13: ffff9badab380c28 R14: ffffd5827f643900 R15: 0000000000000040 [2069091.529472] FS: 0000000000000000(0000) GS:ffff9beb3f440000(0000) knlGS:0000000000000000 [2069091.543926] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [2069091.558942] CR2: 0000000000000030 CR3: 000000193b9a2000 CR4: 00000000007607e0 [2069091.573424] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [2069091.587876] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [2069091.602007] PKRU: 00000000 [2069091.616010] Call Trace: [2069091.629902] [] qedf_process_cqe+0x109/0x2e0 [qedf] [2069091.643941] [] qedf_fp_io_handler+0x26/0x60 [qedf] [2069091.657948] [] process_one_work+0x17f/0x440 [2069091.672111] [] worker_thread+0x126/0x3c0 [2069091.686057] [] ? manage_workers.isra.26+0x2a0/0x2a0 [2069091.700033] [] kthread+0xd1/0xe0 [2069091.713891] [] ? insert_kthread_work+0x40/0x40 Add check in qedf_process_error_detect(). When flush is active, let the cmds be completed from the cleanup contex. Link: https://lore.kernel.org/r/20210624171802.598-1-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit c54b245d011855ea91c5beff07f1db74143ce614 Merge: e17c120f48f7d 5e6b8a50a7cec Author: Linus Torvalds Date: Mon Jun 28 20:39:26 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull user namespace rlimit handling update from Eric Biederman: "This is the work mainly by Alexey Gladkov to limit rlimits to the rlimits of the user that created a user namespace, and to allow users to have stricter limits on the resources created within a user namespace." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: cred: add missing return error code when set_cred_ucounts() failed ucounts: Silence warning in dec_rlimit_ucounts ucounts: Set ucount_max to the largest positive value the type can hold kselftests: Add test to check for rlimit changes in different user namespaces Reimplement RLIMIT_MEMLOCK on top of ucounts Reimplement RLIMIT_SIGPENDING on top of ucounts Reimplement RLIMIT_MSGQUEUE on top of ucounts Reimplement RLIMIT_NPROC on top of ucounts Use atomic_t for ucounts reference counting Add a reference to ucounts for each cred Increase size of ucounts to atomic_long_t commit e17c120f48f7d86ed9fd6e44e9436d32997fd9ec Merge: 8ec035ac4a139 13dfead49db07 Author: Linus Torvalds Date: Mon Jun 28 20:13:28 2021 -0700 Merge tag 'array-bounds-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull array-bounds fixes from Gustavo Silva: "Fix an out-of-bounds warning in the media subsystem. This is part of the ongoing efforts to globally enable -Warray-bounds" * tag 'array-bounds-fixes-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2() commit 0aaea62da698bb36f1cc01ef305571cde28b68f9 Author: Sreekanth Reddy Date: Wed Jun 23 12:51:52 2021 +0530 scsi: MAINTAINERS: Add mpi3mr driver maintainers Adding mpi3mr driver entry. Link: https://lore.kernel.org/r/20210623072153.25758-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 8ec035ac4a1391c16c3cf328e6e8d9531d7a229f Merge: 07bdc0746a5a2 40e67c120093a Author: Linus Torvalds Date: Mon Jun 28 20:03:38 2021 -0700 Merge tag 'fallthrough-fixes-clang-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo Silva: "Fix many fall-through warnings when building with Clang 12.0.0 and '-Wimplicit-fallthrough' so that we at some point will be able to enable that warning by default" * tag 'fallthrough-fixes-clang-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: (26 commits) rxrpc: Fix fall-through warnings for Clang drm/nouveau/clk: Fix fall-through warnings for Clang drm/nouveau/therm: Fix fall-through warnings for Clang drm/nouveau: Fix fall-through warnings for Clang xfs: Fix fall-through warnings for Clang xfrm: Fix fall-through warnings for Clang tipc: Fix fall-through warnings for Clang sctp: Fix fall-through warnings for Clang rds: Fix fall-through warnings for Clang net/packet: Fix fall-through warnings for Clang net: netrom: Fix fall-through warnings for Clang ide: Fix fall-through warnings for Clang hwmon: (max6621) Fix fall-through warnings for Clang hwmon: (corsair-cpro) Fix fall-through warnings for Clang firewire: core: Fix fall-through warnings for Clang braille_console: Fix fall-through warnings for Clang ipv4: Fix fall-through warnings for Clang qlcnic: Fix fall-through warnings for Clang bnxt_en: Fix fall-through warnings for Clang netxen_nic: Fix fall-through warnings for Clang ... commit 07bdc0746a5a23c5bdd041feb2fd8cd7b5ee7a97 Merge: 616ea5cc4a7b0 1d1f6cc5818c7 Author: Linus Torvalds Date: Mon Jun 28 19:57:00 2021 -0700 Merge tag 'pstore-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "Use normal block device I/O path for pstore/blk. (Christoph Hellwig, Kees Cook, Pu Lehui)" * tag 'pstore-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore/blk: Include zone in pstore_device_info pstore/blk: Fix kerndoc and redundancy on blkdev param pstore/blk: Use the normal block device I/O path pstore/blk: Move verify_size() macro out of function pstore/blk: Improve failure reporting commit 616ea5cc4a7b058f8c27e37b9a597d8704c49130 Merge: 233a806b00e31 9a03abc16c770 Author: Linus Torvalds Date: Mon Jun 28 19:49:37 2021 -0700 Merge tag 'seccomp-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: - Add "atomic addfd + send reply" mode to SECCOMP_USER_NOTIF to better handle EINTR races visible to seccomp monitors. (Rodrigo Campos, Sargun Dhillon) - Improve seccomp selftests for readability in CI systems. (Kees Cook) * tag 'seccomp-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: Avoid using "sysctl" for report selftests/seccomp: Flush benchmark output selftests/seccomp: More closely track fds being assigned selftests/seccomp: Add test for atomic addfd+send seccomp: Support atomic "addfd + send reply" commit b27c4577557045f1ab3cdfeabfc7f3cd24aca1fe Author: Javed Hasan Date: Tue Jun 15 09:59:39 2021 -0700 scsi: libfc: Fix array index out of bound exception Fix array index out of bound exception in fc_rport_prli_resp(). Link: https://lore.kernel.org/r/20210615165939.24327-1-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 233a806b00e31b3ab8d57a68f1aab40cf1e5eaea Merge: 122fa8c588316 98cf4951842ad Author: Linus Torvalds Date: Mon Jun 28 16:53:05 2021 -0700 Merge tag 'docs-5.14' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "This was a reasonably active cycle for documentation; this includes: - Some kernel-doc cleanups. That script is still regex onslaught from hell, but it has gotten a little better. - Improvements to the checkpatch docs, which are also used by the tool itself. - A major update to the pathname lookup documentation. - Elimination of :doc: markup, since our automarkup magic can create references from filenames without all the extra noise. - The flurry of Chinese translation activity continues. Plus, of course, the usual collection of updates, typo fixes, and warning fixes" * tag 'docs-5.14' of git://git.lwn.net/linux: (115 commits) docs: path-lookup: use bare function() rather than literals docs: path-lookup: update symlink description docs: path-lookup: update get_link() ->follow_link description docs: path-lookup: update WALK_GET, WALK_PUT desc docs: path-lookup: no get_link() docs: path-lookup: update i_op->put_link and cookie description docs: path-lookup: i_op->follow_link replaced with i_op->get_link docs: path-lookup: Add macro name to symlink limit description docs: path-lookup: remove filename_mountpoint docs: path-lookup: update do_last() part docs: path-lookup: update path_mountpoint() part docs: path-lookup: update path_to_nameidata() part docs: path-lookup: update follow_managed() part docs: Makefile: Use CONFIG_SHELL not SHELL docs: Take a little noise out of the build process docs: x86: avoid using ReST :doc:`foo` markup docs: virt: kvm: s390-pv-boot.rst: avoid using ReST :doc:`foo` markup docs: userspace-api: landlock.rst: avoid using ReST :doc:`foo` markup docs: trace: ftrace.rst: avoid using ReST :doc:`foo` markup docs: trace: coresight: coresight.rst: avoid using ReST :doc:`foo` markup ... commit 122fa8c588316aacafe7e5a393bb3e875eaf5b25 Merge: 7aed4d57b113f 629e33a16809a Author: Linus Torvalds Date: Mon Jun 28 16:28:41 2021 -0700 Merge tag 'for-5.14-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "A normal mix of improvements, core changes and features that user have been missing or complaining about. User visible changes: - new sysfs exports: - add sysfs knob to limit scrub IO bandwidth per device - device stats are also available in /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats - support cancellable resize and device delete ioctls - change how the empty value is interpreted when setting a property, so far we have only 'btrfs.compression' and we need to distinguish a reset to defaults and setting "do not compress", in general the empty value will always mean 'reset to defaults' for any other property, for compression it's either 'no' or 'none' to forbid compression Performance improvements: - no need for full sync when truncation does not touch extents, reported run time change is -12% - avoid unnecessary logging of xattrs during fast fsyncs (+17% throughput, -17% runtime on xattr stress workload) Core: - preemptive flushing improvements and fixes - adjust clamping logic on multi-threaded workloads to avoid flushing too soon - take into account global block reserve, may help on almost full filesystems - continue flushing when there are enough pending delalloc and ordered bytes - simplify logic around conditional transaction commit, a workaround used in the past for throttling that's been superseded by ticket reservations that manage the throttling in a better way - subpage blocksize preparation: - submit read time repair only for each corrupted sector - scrub repair now works with sectors and not pages - free space cache (v1) works with sectors and not pages - more fine grained bio tracking for extents - subpage support in page callbacks, extent callbacks, end io callbacks - simplify transaction abort logic and always abort and don't check various potentially unreliable stats tracked by the transaction - exclusive operations can do more checks when started and allow eg. cancellation of the same running operation - ensure relocation never runs while we have send operations running, e.g. when zoned background auto reclaim starts Fixes: - zoned: more sanity checks of write pointer - improve error handling in delayed inodes - send: - fix invalid path for unlink operations after parent orphanization - fix crash when memory allocations trigger reclaim - skip compression of we have only one page (can't make things better) - empty value of a property newly means reset to default Other: - lots of cleanups, comment updates, yearly typo fixing - disable build on platforms having page size 256K" * tag 'for-5.14-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (101 commits) btrfs: remove unused btrfs_fs_info::total_pinned btrfs: rip out btrfs_space_info::total_bytes_pinned btrfs: rip the first_ticket_bytes logic from fail_all_tickets btrfs: remove FLUSH_DELAYED_REFS from data ENOSPC flushing btrfs: rip out may_commit_transaction btrfs: send: fix crash when memory allocations trigger reclaim btrfs: ensure relocation never runs while we have send operations running btrfs: shorten integrity checker extent data mount option btrfs: switch mount option bits to enums and use wider type btrfs: props: change how empty value is interpreted btrfs: compression: don't try to compress if we don't have enough pages btrfs: fix unbalanced unlock in qgroup_account_snapshot() btrfs: sysfs: export dev stats in devinfo directory btrfs: fix typos in comments btrfs: remove a stale comment for btrfs_decompress_bio() btrfs: send: use list_move_tail instead of list_del/list_add_tail btrfs: disable build on platforms having page size 256K btrfs: send: fix invalid path for unlink operations after parent orphanization btrfs: inline wait_current_trans_commit_start in its caller btrfs: sink wait_for_unblock parameter to async commit ... commit f67092eff2bd40650aad54a1a1910160f41d864a Author: Jon Hunter Date: Fri Jun 18 17:02:19 2021 +0100 PCI: tegra194: Fix tegra_pcie_ep_raise_msi_irq() ill-defined shift tegra_pcie_ep_raise_msi_irq() shifted a signed 32-bit value left by 31 bits. The behavior of this is implementation-defined. Replace the shift by BIT(), which is well-defined. Found by cppcheck: $ cppcheck --enable=all drivers/pci/controller/dwc/pcie-tegra194.c Checking drivers/pci/controller/dwc/pcie-tegra194.c ... drivers/pci/controller/dwc/pcie-tegra194.c:1829:23: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour. See condition at line 1826. [shiftTooManyBitsSigned] appl_writel(pcie, (1 << irq), APPL_MSI_CTRL_1); ^ [bhelgaas: commit log] Link: https://lore.kernel.org/r/20210618160219.303092-1-jonathanh@nvidia.com Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") Signed-off-by: Jon Hunter Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 7aed4d57b113f81214bea1ddb10480f620ade800 Merge: a58e203530ebd 8215d5b7f15f8 Author: Linus Torvalds Date: Mon Jun 28 16:24:18 2021 -0700 Merge tag 'erofs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "No noticable change available for this cycle. Just a bugfix related to sb chksum feature, two minor cleanups and Chao's email address update: - fix wrong error code overwritten due to sb checksum feature - two minor cleanups - update Chao's email address" * tag 'erofs-for-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: MAINTAINERS: erofs: update my email address erofs: clean up file headers & footers erofs: remove the occupied parameter from z_erofs_pagevec_enqueue() erofs: fix error return code in erofs_read_superblock() commit a58e203530ebdf6e5413bebc7f976d756188a4b5 Merge: a60c538ed2ff9 2fc2b430f559f Author: Linus Torvalds Date: Mon Jun 28 16:20:48 2021 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: "A couple bug fixes for fs/crypto/: - Fix handling of major dirhash values that happen to be 0. - Fix cases where keys were derived differently on big endian systems than on little endian systems (affecting some newer features only)" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: fix derivation of SipHash keys on big endian CPUs fscrypt: don't ignore minor_hash when hash is 0 commit a60c538ed2ff9d084544a894219eed9c5ab980e5 Merge: 9cd19f02c46a2 907a399de7b05 Author: Linus Torvalds Date: Mon Jun 28 16:15:50 2021 -0700 Merge tag 'integrity-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity subsystem updates from Mimi Zohar: "The large majority of the changes are EVM portable & immutable signature related: removing a dependency on loading an HMAC key, safely allowing file metadata included in the EVM portable & immutable signatures to be modified, allowing EVM signatures to fulfill IMA file signature policy requirements, including the EVM file metadata signature in lieu of an IMA file data signature in the measurement list, and adding dynamic debugging of EVM file metadata. In addition, in order to detect critical data or file change reversions, duplicate measurement records are permitted in the IMA measurement list. The remaining patches address compiler, sparse, and doc warnings" * tag 'integrity-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: (31 commits) evm: Check xattr size discrepancy between kernel and user evm: output EVM digest calculation info IMA: support for duplicate measurement records ima: Fix warning: no previous prototype for function 'ima_add_kexec_buffer' ima: differentiate between EVM failures in the audit log ima: Fix fall-through warning for Clang ima: Pass NULL instead of 0 to ima_get_action() in ima_file_mprotect() ima: Include header defining ima_post_key_create_or_update() ima/evm: Fix type mismatch ima: Set correct casting types doc: Fix warning in Documentation/security/IMA-templates.rst evm: Don't return an error in evm_write_xattrs() if audit is not enabled ima: Define new template evm-sig ima: Define new template fields xattrnames, xattrlengths and xattrvalues evm: Verify portable signatures against all protected xattrs ima: Define new template field imode ima: Define new template fields iuid and igid ima: Add ima_show_template_uint() template library function ima: Don't remove security.ima if file must not be appraised ima: Introduce template field evmsig and write to field sig as fallback ... commit a118ff661889ecee3ca90f8125bad8fb5bbc07d5 Author: Paolo Pisati Date: Mon Jun 28 16:54:24 2021 +0200 selftests: net: devlink_port_split: check devlink returned an element before dereferencing it And thus avoid a Python stacktrace: ~/linux/tools/testing/selftests/net$ ./devlink_port_split.py Traceback (most recent call last): File "/home/linux/tools/testing/selftests/net/./devlink_port_split.py", line 277, in main() File "/home/linux/tools/testing/selftests/net/./devlink_port_split.py", line 242, in main dev = list(devs.keys())[0] IndexError: list index out of range Signed-off-by: Paolo Pisati Signed-off-by: David S. Miller commit 9cd19f02c46a2dfaf70b8d450fb16f9eb246dfa4 Merge: 6159c49e12284 98eaa63e96273 Author: Linus Torvalds Date: Mon Jun 28 16:13:37 2021 -0700 Merge tag 'tomoyo-pr-20210628' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo fix from Tetsuo Handa: "A doc warning fix from ChenXiaoSong" * tag 'tomoyo-pr-20210628' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: fix doc warnings commit 21e743300dd0b9e57425de4a9ba651493b165e03 Author: Gabriel Fernandez Date: Thu Jun 17 07:18:14 2021 +0200 clk: stm32mp1: new compatible for secure RCC support Platform STM32MP1 can be used in configuration where some clock resources cannot be accessed by Linux kernel when executing in non-secure state of the CPU(s). In such configuration, the RCC clock driver must not register clocks it cannot access. They are expected to be registered from another clock driver such as the SCMI clock driver. This change uses specific compatible string "st,stm32mp1-rcc-secure" to specify RCC clock driver configuration where RCC is secure. Signed-off-by: Etienne Carriere Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-12-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 94b7888b67c4e301635bbfdea1403ed0693242fd Author: Gabriel Fernandez Date: Thu Jun 17 07:18:13 2021 +0200 dt-bindings: clock: stm32mp1 new compatible for secure rcc Introduce new compatible string "st,stm32mp1-rcc-secure" for stm32mp1 clock driver when the device is configured with RCC security support hardened. Signed-off-by: Etienne Carriere Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210617051814.12018-11-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit f040e135c59adeddfbe8be276cf9adc88caf678c Author: Gabriel Fernandez Date: Thu Jun 17 07:18:12 2021 +0200 dt-bindings: reset: add MCU HOLD BOOT ID for SCMI reset domains on stm32mp15 Add ID to SCMI0 to exposes reset controller for the MCU HOLD BOOT resource. Signed-off-by: Arnaud Pouliquen Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210617051814.12018-10-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 256c7521cb5e964c67fc807f0afc27104561018d Author: Gabriel Fernandez Date: Thu Jun 17 07:18:11 2021 +0200 dt-bindings: reset: add IDs for SCMI reset domains on stm32mp15 stm32mp15 TZ secure firmware provides SCMI reset domains for secure resources. This change defines the SCMI reset domain identifiers used by SCMI agents and servers. Stm32mp15 TZ secure firmware provides SCMI clocks for oscillators, some PLL output and few secure aware interfaces. This change defines the SCMI clock identifiers used by SCMI agents and servers. Server SCMI0 exposes reset controllers for resources under RCC[TZEN] configuration control. Signed-off-by: Etienne Carriere Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210617051814.12018-9-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit bd08b193cf13e26d77dd68dbda1c60c7a2e86b6c Author: Gabriel Fernandez Date: Thu Jun 17 07:18:10 2021 +0200 dt-bindings: clock: add IDs for SCMI clocks on stm32mp15 stm32mp15 TZ secure firmware provides SCMI clocks for oscillators, some PLL output and few secure aware interfaces. This change defines the SCMI clock identifiers used by SCMI agents and servers. Server SCMI0 exposes clocks and reset controllers for resources under RCC[TZEN] configuration control. Server SCMI1 exposes clocks for resources under RCC[MCKPROT] control. Signed-off-by: Etienne Carriere Signed-off-by: Gabriel Fernandez Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210617051814.12018-8-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 590ff40e06d802f6080e03443c6bcff0cd4ba37d Author: Gabriel Fernandez Date: Thu Jun 17 07:18:09 2021 +0200 reset: stm32mp1: remove stm32mp1 reset st32mp1 RCC reset driver was moved into stm32mp1 RCC clock driver. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-7-gabriel.fernandez@foss.st.com Acked-by: Philipp Zabel Signed-off-by: Stephen Boyd commit 6159c49e12284b4880fd60e0575a71a40556a67e Merge: 31e798fd6f0ff 9f38b678ffc4e Author: Linus Torvalds Date: Mon Jun 28 16:04:56 2021 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Algorithms: - Fix rmmod crash with x86/curve25519 - Add ECDH NIST P384 - Generate assembly files at build-time with perl scripts on arm - Switch to HMAC SHA512 DRBG as default DRBG Drivers: - Add sl3516 crypto engine - Add ECDH NIST P384 support in hisilicon/hpre - Add {ofb,cfb,ctr} over {aes,sm4} in hisilicon/sec - Add {ccm,gcm} over {aes,sm4} in hisilicon/sec - Enable omap hwrng driver for TI K3 family - Add support for AEAD algorithms in qce" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (142 commits) crypto: sl3516 - depends on HAS_IOMEM crypto: hisilicon/qm - implement for querying hardware tasks status. crypto: sl3516 - Fix build warning without CONFIG_PM MAINTAINERS: update caam crypto driver maintainers list crypto: nx - Fix numerous sparse byte-order warnings crypto: nx - Fix RCU warning in nx842_OF_upd_status crypto: api - Move crypto attr definitions out of crypto.h crypto: nx - Fix memcpy() over-reading in nonce crypto: hisilicon/sec - Fix spelling mistake "fallbcak" -> "fallback" crypto: sa2ul - Remove unused auth_len variable crypto: sl3516 - fix duplicated inclusion crypto: hisilicon/zip - adds the max shaper type rate crypto: hisilicon/hpre - adds the max shaper type rate crypto: hisilicon/sec - adds the max shaper type rate crypto: hisilicon/qm - supports to inquiry each function's QoS crypto: hisilicon/qm - add pf ping single vf function crypto: hisilicon/qm - merges the work initialization process into a single function crypto: hisilicon/qm - add the "alg_qos" file node crypto: hisilicon/qm - supports writing QoS int the host crypto: api - remove CRYPTOA_U32 and related functions ... commit 84fe73996c2e7407006002ef92d7354a56b69fed Merge: b74ef9f9cb91f 127d7355abb35 Author: David S. Miller Date: Mon Jun 28 15:54:57 2021 -0700 Merge branch 'do_once_lite' Tanner Love says: ==================== net: update netdev_rx_csum_fault() print dump only once First patch implements DO_ONCE_LITE to abstract uses of the ".data.once" trick. It is defined in its own, new header file -- rather than alongside the existing DO_ONCE in include/linux/once.h -- because include/linux/once.h includes include/linux/jump_label.h, and this causes the build to break for some architectures if include/linux/once.h is included in include/linux/printk.h or include/asm-generic/bug.h. Second patch uses DO_ONCE_LITE in netdev_rx_csum_fault to print dump only once. ==================== Signed-off-by: David S. Miller commit 127d7355abb355b05ff4b42d6e18cc97aa9d1d11 Author: Tanner Love Date: Mon Jun 28 09:50:07 2021 -0400 net: update netdev_rx_csum_fault() print dump only once Printing this stack dump multiple times does not provide additional useful information, and consumes time in the data path. Printing once is sufficient. Changes v2: Format indentation properly Signed-off-by: Tanner Love Acked-by: Eric Dumazet Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller commit a358f40600b3b39ae3906b6118625b99c0aa7a34 Author: Tanner Love Date: Mon Jun 28 09:50:06 2021 -0400 once: implement DO_ONCE_LITE for non-fast-path "do once" functionality Certain uses of "do once" functionality reside outside of fast path, and so do not require jump label patching via static keys, making existing DO_ONCE undesirable in such cases. Replace uses of __section(".data.once") with DO_ONCE_LITE(_IF)? This patch changes the return values of xfs_printk_once, printk_once, and printk_deferred_once. Before, they returned whether the print was performed, but now, they always return true. This is okay because the return values of the following macros are entirely ignored throughout the kernel: - xfs_printk_once - xfs_warn_once - xfs_notice_once - xfs_info_once - printk_once - pr_emerg_once - pr_alert_once - pr_crit_once - pr_err_once - pr_warn_once - pr_notice_once - pr_info_once - pr_devel_once - pr_debug_once - printk_deferred_once - orc_warn Changes v3: - Expand commit message to explain why changing return values of xfs_printk_once, printk_once, printk_deferred_once is benign v2: - Fix i386 build warnings Signed-off-by: Tanner Love Acked-by: Eric Dumazet Acked-by: Mahesh Bandewar Acked-by: Steven Rostedt (VMware) Signed-off-by: David S. Miller commit b74ef9f9cb91fc86c642af965b7598c4df1c9922 Author: Nathan Chancellor Date: Sun Jun 27 11:45:43 2021 -0700 net: sparx5: Do not use mac_addr uninitialized in mchp_sparx5_probe() Clang warns: drivers/net/ethernet/microchip/sparx5/sparx5_main.c:760:29: warning: variable 'mac_addr' is uninitialized when used here [-Wuninitialized] if (of_get_mac_address(np, mac_addr)) { ^~~~~~~~ drivers/net/ethernet/microchip/sparx5/sparx5_main.c:669:14: note: initialize the variable 'mac_addr' to silence this warning u8 *mac_addr; ^ = NULL 1 warning generated. mac_addr is only used to store the value retrieved from of_get_mac_address(), which is then copied into the base_mac member of the sparx5 struct using ether_addr_copy(). It is easier to just use the base_mac address directly, which avoids the warning and the extra copy. Fixes: 3cfa11bac9bb ("net: sparx5: add the basic sparx5 driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1413 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 31e798fd6f0ff0acdc49c1a358b581730936a09a Merge: 36824f198c621 61c6f04a988e4 Author: Linus Torvalds Date: Mon Jun 28 15:49:58 2021 -0700 Merge tag 'media/v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - V4L2 core control API was split into separate files - New RC maps: tango and tc-90405 - Hantro driver got support for G2/HEVC decoder - av7710 is moving to staging, together with some legacy APIs - several cleanups related to compat_ioctl32 code - Move the MPEG-2 stateless control type out of staging - Address several issues with RPM get logic on media drivers - Lots of cleanups, bug fixes and improvements. * tag 'media/v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (394 commits) media: s5p-mfc: Fix display delay control creation media: mtk-vpu: on suspend, read/write regs only if vpu is running media: video-mux: Skip dangling endpoints media: Fix Media Controller API config checks media: i2c: rdacm20: Re-work ov10635 reset media: i2c: rdacm20: Check return values media: i2c: rdacm20: Report camera module name media: i2c: rdacm20: Enable noise immunity media: i2c: rdacm20: Embed 'serializer' field media: i2c: rdacm21: Power up OV10640 before OV490 media: i2c: rdacm21: Fix OV10640 powerup media: i2c: rdacm21: Add delay after OV490 reset media: i2c: max9271: Introduce wake_up() function media: i2c: max9271: Check max9271_write() return media: i2c: max9286: Rework comments in .bound() media: i2c: max9286: Define high channel amplitude media: i2c: max9286: Cache channel amplitude media: i2c: max9286: Rename reverse_channel_mv media: i2c: max9286: Adjust parameters indent media: hantro: add support for Rockchip RK3036 ... commit 74e7feff0e22f054839c18b29658d33e7b2d8512 Author: Vladimir Oltean Date: Sun Jun 27 17:27:08 2021 +0300 net: dsa: sja1105: fix dynamic access to L2 Address Lookup table for SJA1110 The SJA1105P/Q/R/S and SJA1110 may have the same layout for the command to read/write/search for L2 Address Lookup entries, but as explained in the comments at the beginning of the sja1105_dynamic_config.c file, the command portion of the buffer is at the end, and we need to obtain a pointer to it by adding the length of the entry to the buffer. Alas, the length of an L2 Address Lookup entry is larger in SJA1110 than it is for SJA1105P/Q/R/S, so we need to create a common helper to access the command buffer, and this receives as argument the length of the entry buffer. Fixes: 3e77e59bf8cf ("net: dsa: sja1105: add support for the SJA1110 switch family") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b856150c8098f12996ee81c3ab2a65adbaeeb3ec Author: David Bauer Date: Sun Jun 27 12:16:07 2021 +0200 net: phy: at803x: mask 1000 Base-X link mode AR8031/AR8033 have different status registers for copper and fiber operation. However, the extended status register is the same for both operation modes. As a result of that, ESTATUS_1000_XFULL is set to 1 even when operating in copper TP mode. Remove this mode from the supported link modes, as this driver currently only supports copper operation. Signed-off-by: David Bauer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f7458934b0791c39a001e4d902fc3bf697b439b5 Author: Horatiu Vultur Date: Sat Jun 26 22:18:04 2021 +0200 net: bridge: mrp: Update the Test frames for MRA According to the standard IEC 62439-2, in case the node behaves as MRA and needs to send Test frames on ring ports, then these Test frames need to have an Option TLV and a Sub-Option TLV which has the type AUTO_MGR. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 36824f198c621cebeb22966b5e244378fa341295 Merge: 9840cfcb97fc8 b8917b4ae44d1 Author: Linus Torvalds Date: Mon Jun 28 15:40:51 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "This covers all architectures (except MIPS) so I don't expect any other feature pull requests this merge window. ARM: - Add MTE support in guests, complete with tag save/restore interface - Reduce the impact of CMOs by moving them in the page-table code - Allow device block mappings at stage-2 - Reduce the footprint of the vmemmap in protected mode - Support the vGIC on dumb systems such as the Apple M1 - Add selftest infrastructure to support multiple configuration and apply that to PMU/non-PMU setups - Add selftests for the debug architecture - The usual crop of PMU fixes PPC: - Support for the H_RPT_INVALIDATE hypercall - Conversion of Book3S entry/exit to C - Bug fixes S390: - new HW facilities for guests - make inline assembly more robust with KASAN and co x86: - Allow userspace to handle emulation errors (unknown instructions) - Lazy allocation of the rmap (host physical -> guest physical address) - Support for virtualizing TSC scaling on VMX machines - Optimizations to avoid shattering huge pages at the beginning of live migration - Support for initializing the PDPTRs without loading them from memory - Many TLB flushing cleanups - Refuse to load if two-stage paging is available but NX is not (this has been a requirement in practice for over a year) - A large series that separates the MMU mode (WP/SMAP/SMEP etc.) from CR0/CR4/EFER, using the MMU mode everywhere once it is computed from the CPU registers - Use PM notifier to notify the guest about host suspend or hibernate - Support for passing arguments to Hyper-V hypercalls using XMM registers - Support for Hyper-V TLB flush hypercalls and enlightened MSR bitmap on AMD processors - Hide Hyper-V hypercalls that are not included in the guest CPUID - Fixes for live migration of virtual machines that use the Hyper-V "enlightened VMCS" optimization of nested virtualization - Bugfixes (not many) Generic: - Support for retrieving statistics without debugfs - Cleanups for the KVM selftests API" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (314 commits) KVM: x86: rename apic_access_page_done to apic_access_memslot_enabled kvm: x86: disable the narrow guest module parameter on unload selftests: kvm: Allows userspace to handle emulation errors. kvm: x86: Allow userspace to handle emulation errors KVM: x86/mmu: Let guest use GBPAGES if supported in hardware and TDP is on KVM: x86/mmu: Get CR4.SMEP from MMU, not vCPU, in shadow page fault KVM: x86/mmu: Get CR0.WP from MMU, not vCPU, in shadow page fault KVM: x86/mmu: Drop redundant rsvd bits reset for nested NPT KVM: x86/mmu: Optimize and clean up so called "last nonleaf level" logic KVM: x86: Enhance comments for MMU roles and nested transition trickiness KVM: x86/mmu: WARN on any reserved SPTE value when making a valid SPTE KVM: x86/mmu: Add helpers to do full reserved SPTE checks w/ generic MMU KVM: x86/mmu: Use MMU's role to determine PTTYPE KVM: x86/mmu: Collapse 32-bit PAE and 64-bit statements for helpers KVM: x86/mmu: Add a helper to calculate root from role_regs KVM: x86/mmu: Add helper to update paging metadata KVM: x86/mmu: Don't update nested guest's paging bitmasks if CR0.PG=0 KVM: x86/mmu: Consolidate reset_rsvds_bits_mask() calls KVM: x86/mmu: Use MMU role_regs to get LA57, and drop vCPU LA57 helper KVM: x86/mmu: Get nested MMU's root level from the MMU's role ... commit f0305e732a1a144dcdb1536b828ee4a5cc1d212f Merge: e1289cfb634c1 1f0536139cb8e Author: David S. Miller Date: Mon Jun 28 15:35:50 2021 -0700 Merge tag 'for-net-next-2021-06-28' 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 QCA_ROME device (0cf3:e500) and RTL8822CE - Update management interface revision to 21 - Use of incluse language - Proper handling of HCI_LE_Advertising_Set_Terminated event - Recovery handing of HCI ncmd=0 - Various memory fixes ==================== Signed-off-by: David S. Miller commit f9beb95e6a2669fa35e34a6ff52808b181efa20f Merge: 9ea3e52c5bc8b ef6c8d6ccf0c1 Author: David S. Miller Date: Mon Jun 28 15:34:50 2021 -0700 Merge branch 'sctp-size-validations' Marcelo Ricardo Leitner says: ==================== sctp: add some size validations Ilja Van Sprundel reported that some size validations on inbound SCTP packets were missing. After some code review, I noticed two others that are all fixed here. Thanks Ilja for reporting this. ==================== Signed-off-by: David S. Miller commit ef6c8d6ccf0c1dccdda092ebe8782777cd7803c9 Author: Marcelo Ricardo Leitner Date: Mon Jun 28 16:13:44 2021 -0300 sctp: add param size validation for SCTP_PARAM_SET_PRIMARY When SCTP handles an INIT chunk, it calls for example: sctp_sf_do_5_1B_init sctp_verify_init sctp_verify_param sctp_process_init sctp_process_param handling of SCTP_PARAM_SET_PRIMARY sctp_verify_init() wasn't doing proper size validation and neither the later handling, allowing it to work over the chunk itself, possibly being uninitialized memory. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit b6ffe7671b24689c09faa5675dd58f93758a97ae Author: Marcelo Ricardo Leitner Date: Mon Jun 28 16:13:43 2021 -0300 sctp: validate chunk size in __rcv_asconf_lookup In one of the fallbacks that SCTP has for identifying an association for an incoming packet, it looks for AddIp chunk (from ASCONF) and take a peek. Thing is, at this stage nothing was validating that the chunk actually had enough content for that, allowing the peek to happen over uninitialized memory. Similar check already exists in actual asconf handling in sctp_verify_asconf(). Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 50619dbf8db77e98d821d615af4f634d08e22698 Author: Marcelo Ricardo Leitner Date: Mon Jun 28 16:13:42 2021 -0300 sctp: add size validation when walking chunks The first chunk in a packet is ensured to be present at the beginning of sctp_rcv(), as a packet needs to have at least 1 chunk. But the second one, may not be completely available and ch->length can be over uninitialized memory. Fix here is by only trying to walk on the next chunk if there is enough to hold at least the header, and then proceed with the ch->length validation that is already there. Reported-by: Ilja Van Sprundel Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 0c5dc070ff3d6246d22ddd931f23a6266249e3db Author: Marcelo Ricardo Leitner Date: Mon Jun 28 16:13:41 2021 -0300 sctp: validate from_addr_param return Ilja reported that, simply putting it, nothing was validating that from_addr_param functions were operating on initialized memory. That is, the parameter itself was being validated by sctp_walk_params, but it doesn't check for types and their specific sizes and it could be a 0-length one, causing from_addr_param to potentially work over the next parameter or even uninitialized memory. The fix here is to, in all calls to from_addr_param, check if enough space is there for the wanted IP address type. Reported-by: Ilja Van Sprundel Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit e1289cfb634c19b5755452ba03c82aa76c0cfd7c Merge: 1fd07f33c3ea2 a78cae2476812 Author: David S. Miller Date: Mon Jun 28 15:28:03 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2021-06-28 The following pull-request contains BPF updates for your *net-next* tree. We've added 37 non-merge commits during the last 12 day(s) which contain a total of 56 files changed, 394 insertions(+), 380 deletions(-). The main changes are: 1) XDP driver RCU cleanups, from Toke Høiland-Jørgensen and Paul E. McKenney. 2) Fix bpf_skb_change_proto() IPv4/v6 GSO handling, from Maciej Żenczykowski. 3) Fix false positive kmemleak report for BPF ringbuf alloc, from Rustam Kovhaev. 4) Fix x86 JIT's extable offset calculation for PROBE_LDX NULL, from Ravi Bangoria. 5) Enable libbpf fallback probing with tracing under RHEL7, from Jonathan Edwards. 6) Clean up x86 JIT to remove unused cnt tracking from EMIT macro, from Jiri Olsa. 7) Netlink cleanups for libbpf to please Coverity, from Kumar Kartikeya Dwivedi. 8) Allow to retrieve ancestor cgroup id in tracing programs, from Namhyung Kim. 9) Fix lirc BPF program query to use user-provided prog_cnt, from Sean Young. 10) Add initial libbpf doc including generated kdoc for its API, from Grant Seltzer. 11) Make xdp_rxq_info_unreg_mem_model() more robust, from Jakub Kicinski. 12) Fix up bpfilter startup log-level to info level, from Gary Lin. ==================== Signed-off-by: David S. Miller commit 4c18347238ab5a4ee0e71ca765460d84c75a26b5 Author: Jeff Layton Date: Fri Jun 18 13:05:06 2021 -0400 ceph: take reference to req->r_parent at point of assignment Currently, we set the r_parent pointer but then don't take a reference to it until we submit the request. If we end up freeing the req before that point, then we'll do a iput when we shouldn't. Instead, take the inode reference in the callers, so that it's always safe to call ceph_mdsc_put_request on the req, even before submission. Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 23c2c76ead541b3b7c9336bd4f3737494736b2ee Author: Jeff Layton Date: Fri Jun 4 12:03:09 2021 -0400 ceph: eliminate ceph_async_iput() Now that we don't need to hold session->s_mutex or the snap_rwsem when calling ceph_check_caps, we can eliminate ceph_async_iput and just use normal iput calls. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 7732fe168edaea825ed65954712c825f4625f2ba Author: Jeff Layton Date: Mon Jun 14 15:38:39 2021 -0400 ceph: don't take s_mutex in ceph_flush_snaps Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 0449a35222e97efe05cd00885bfe4a6924dee5c7 Author: Jeff Layton Date: Wed Jun 9 14:01:52 2021 -0400 ceph: don't take s_mutex in try_flush_caps The s_mutex doesn't protect anything in this codepath. Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 6a92b08fdad22ae3558faaef561587ebfcb8b901 Author: Jeff Layton Date: Fri Jun 4 11:01:25 2021 -0400 ceph: don't take s_mutex or snap_rwsem in ceph_check_caps These locks appear to be completely unnecessary. Almost all of this function is done under the inode->i_ceph_lock, aside from the actual sending of the message. Don't take either lock in this function. Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9 Author: Jeff Layton Date: Fri Jun 4 12:03:09 2021 -0400 ceph: eliminate session->s_gen_ttl_lock Turn s_cap_gen field into an atomic_t, and just rely on the fact that we hold the s_mutex when changing the s_cap_ttl field. Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit 7e65624d32b6e0429b1d3559e5585657f34f74a1 Author: Jeff Layton Date: Wed Jun 9 14:09:52 2021 -0400 ceph: allow ceph_put_mds_session to take NULL or ERR_PTR ...to simplify some error paths. Signed-off-by: Jeff Layton Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov commit df2c0cb7f8e8c83e495260ad86df8c5da947f2a7 Author: Jeff Layton Date: Tue Jun 1 09:24:38 2021 -0400 ceph: clean up locking annotation for ceph_get_snap_realm and __lookup_snap_realm They both say that the snap_rwsem must be held for write, but I don't see any real reason for it, and it's not currently always called that way. The lookup is just walking the rbtree, so holding it for read should be fine there. The "get" is bumping the refcount and (possibly) removing it from the empty list. I see no need to hold the snap_rwsem for write for that. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit a6862e6708c15995bc10614b2ef34ca35b4b9078 Author: Jeff Layton Date: Tue Jun 1 08:13:38 2021 -0400 ceph: add some lockdep assertions around snaprealm handling Turn some comments into lockdep asserts. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit f3fd3ea6a26aed5449028608b639f6c6b2fda7f7 Author: Jeff Layton Date: Tue Jun 1 10:07:56 2021 -0400 ceph: decoding error in ceph_update_snap_realm should return -EIO Currently ceph_update_snap_realm returns -EINVAL when it hits a decoding error, which is the wrong error code. -EINVAL implies that the user gave us a bogus argument to a syscall or something similar. -EIO is more descriptive when we hit a decoding error. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 903f4fec78dd05a48fdccdf4539c040fb2d5bbf4 Author: Xiubo Li Date: Thu May 13 09:40:53 2021 +0800 ceph: add IO size metrics support This will collect IO's total size and then calculate the average size, and also will collect the min/max IO sizes. The debugfs will show the size metrics in bytes and will let the userspace applications to switch to what they need. URL: https://tracker.ceph.com/issues/49913 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit fc123d5f504bfb26d5947c68c5eb1b164d069509 Author: Xiubo Li Date: Wed Apr 28 14:08:39 2021 +0800 ceph: update and rename __update_latency helper to __update_stdev The new __update_stdev() helper will only compute the standard deviation. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 8ecd34c797a8626694e6ab400282709d327411c3 Author: Xiubo Li Date: Thu May 13 09:40:52 2021 +0800 ceph: simplify the metrics struct Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit dc915ecde8632d48568f90e1852ed4685478ea00 Author: Baokun Li Date: Thu Jun 10 19:50:58 2021 +0800 libceph: fix doc warnings in cls_lock_client.c Add description to fix the following W=1 kernel build warnings: net/ceph/cls_lock_client.c:28: warning: Function parameter or member 'osdc' not described in 'ceph_cls_lock' net/ceph/cls_lock_client.c:28: warning: Function parameter or member 'oid' not described in 'ceph_cls_lock' net/ceph/cls_lock_client.c:28: warning: Function parameter or member 'oloc' not described in 'ceph_cls_lock' [ idryomov: tweak osdc description ] Signed-off-by: Baokun Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit da6ebb4d67d93e16824f82cc47214825491d8e7a Author: zuoqilin Date: Thu Jun 10 17:45:05 2021 +0800 libceph: remove unnecessary ret variable in ceph_auth_init() There is no necessary to define variable assignment, just return directly to simplify the steps. Signed-off-by: zuoqilin Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 1e6de263d1164bf1361c4ee3f1252730daba96d1 Author: Zheng Yongjun Date: Wed Jun 2 14:56:35 2021 +0800 libceph: fix some spelling mistakes Fix some spelling mistakes in comments: - enconding ==> encoding - ambigous ==> ambiguous - orignal ==> original - encyption ==> encryption Signed-off-by: Zheng Yongjun Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit d71a95e7ffab880bdc81680b67368088f2e20d47 Author: Ilya Dryomov Date: Sat May 15 12:04:39 2021 +0200 libceph: kill ceph_none_authorizer::reply_buf We never receive authorizer replies with cephx disabled, so it is bogus. Also, it still uses the old zero-length array style. Reported-by: Gustavo A. R. Silva Signed-off-by: Ilya Dryomov commit 4364c6938dcbb78d9c5b6e4c94b5b81e939383dc Author: Jeff Layton Date: Thu May 13 11:29:31 2021 -0400 ceph: make ceph_queue_cap_snap static Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 675d4d8997ac1891aa143a049b10ce0f4d4a2117 Author: Wei Yongjun Date: Fri May 14 06:39:53 2021 +0000 ceph: make ceph_netfs_read_ops static The sparse tool complains as follows: fs/ceph/addr.c:316:37: warning: symbol 'ceph_netfs_read_ops' was not declared. Should it be static? This symbol is not used outside of addr.c, so mark it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 22d41cdcd3cfd467a4af074165357fcbea1c37f5 Author: Jeff Layton Date: Tue May 4 10:08:30 2021 -0400 ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty The checks for page->mapping are odd, as set_page_dirty is an address_space operation, and I don't see where it would be called on a non-pagecache page. The warning about the page lock also seems bogus. The comment over set_page_dirty() says that it can be called without the page lock in some rare cases. I don't think we want to warn if that's the case. Reported-by: Matthew Wilcox Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 1fd07f33c3ea2b4aa77426f13e8cb91d4f55af8f Author: Andreas Roeseler Date: Sat Jun 26 09:07:46 2021 -0500 ipv6: ICMPV6: add response to ICMPV6 RFC 8335 PROBE messages This patch builds off of commit 2b246b2569cd2ac6ff700d0dce56b8bae29b1842 and adds functionality to respond to ICMPV6 PROBE requests. Add icmp_build_probe function to construct PROBE requests for both ICMPV4 and ICMPV6. Modify icmpv6_rcv to detect ICMPV6 PROBE messages and call the icmpv6_echo_reply handler. Modify icmpv6_echo_reply to build a PROBE response message based on the queried interface. This patch has been tested using a branch of the iputils git repo which can be found here: https://github.com/Juniper-Clinic-2020/iputils/tree/probe-request Signed-off-by: Andreas Roeseler Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 9ea3e52c5bc8bb4a084938dc1e3160643438927a Author: gushengxian Date: Sat Jun 26 04:56:06 2021 -0700 flow_offload: action should not be NULL when it is referenced "action" should not be NULL when it is referenced. Signed-off-by: gushengxian <13145886936@163.com> Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 83300c69e797343c560086b1a4be56443c0d7f5e Author: Yang Yingliang Date: Sat Jun 26 12:44:20 2021 +0800 net: sparx5: fix error return code in sparx5_register_notifier_blocks() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: d6fce5141929 ("net: sparx5: add switching support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 8f4c38f7588650690ffa08f7784c831e0a8c38e7 Author: Yang Yingliang Date: Sat Jun 26 12:44:19 2021 +0800 net: sparx5: fix return value check in sparx5_create_targets() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 3cfa11bac9bb ("net: sparx5: add the basic sparx5 driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit f00af5cc58ec5aae83ce4860e4912d61fb143d5e Author: Yang Yingliang Date: Sat Jun 26 12:44:18 2021 +0800 net: sparx5: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Fixes: 3cfa11bac9bb ("net: sparx5: add the basic sparx5 driver") Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 4bec3cea34e9ffd028aabff1d7a295a96dd87ef1 Merge: 3095f512e3177 5589b8f1a2c74 Author: David S. Miller Date: Mon Jun 28 14:15:07 2021 -0700 Merge tag 'mlx5-updates-2021-06-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-06-26 This series provides small updates to mlx5 driver. 1) Increase hairpin buffer size 2) Improve peroformance in SF allocation 3) Add IPsec support to uplink representor 4) Add stats for number of deleted kTLS TX offloaded connections 5) Add support for flow sampler in SW steering ==================== Signed-off-by: David S. Miller commit 3095f512e317730c08fdc1fcaa93dde90d798793 Merge: a1b05634e1f0a 7491894532341 Author: David S. Miller Date: Mon Jun 28 14:09:04 2021 -0700 Merge branch 'bridge-replay-helpers' Vladimir Oltean says: ==================== Cleanup for the bridge replay helpers This patch series brings some improvements to the logic added to the bridge and DSA to handle LAG interfaces sandwiched between a bridge and a DSA switch port. br0 / \ / \ bond0 swp2 / \ / \ swp0 swp1 In particular, it ensures that the switchdev object additions and deletions are well balanced per physical port. This is important for future work in the area of offloading local bridge FDB entries to hardware in the context of DSA requesting a replay of those entries at bridge join time (this will be submitted in a future patch series). Due to some difficulty ensuring that the deletion of local FDB entries pointing towards the bridge device itself is notified to switchdev in time (before the switchdev port disconnects from the bridge), this is potentially still not the final form in which the replay helpers will exist. I'm thinking about moving from the pull mode (in which DSA requests the replay) to a push mode (in which the bridge initiates the replay). Nonetheless, these preliminary changes are needed either way. The patch series also addresses some feedback from Nikolai which is long overdue by now (sorry). Switchdev driver maintainers were deliberately omitted due to the trivial nature of the driver changes (just a function prototype). Changes in v2: - fix build issue in patch 4 (function prototype mismatch) - move switchdev object unsync to the NETDEV_PRECHANGEUPPER code path ==================== Signed-off-by: David S. Miller commit 7491894532341cff11babd1fe3bd68537166bcc4 Author: Vladimir Oltean Date: Sun Jun 27 14:54:29 2021 +0300 net: dsa: replay a deletion of switchdev objects for ports leaving a bridged LAG When a DSA switch port leaves a bonding interface that is under a bridge, there might be dangling switchdev objects on that port left behind, because the bridge is not aware that its lower interface (the bond) changed state in any way. Call the bridge replay helpers with adding=false before changing dp->bridge_dev to NULL, because we need to simulate to dsa_slave_port_obj_del() that these notifications were emitted by the bridge. We add this hook to the NETDEV_PRECHANGEUPPER event handler, because we are calling into switchdev (and the __switchdev_handle_port_obj_del fanout helpers expect the upper/lower adjacency lists to still be valid) and PRECHANGEUPPER is the last moment in time when they still are. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4ede74e73b5b540b2a20bb6d5ad4d69348ba51fc Author: Vladimir Oltean Date: Sun Jun 27 14:54:28 2021 +0300 net: dsa: refactor the prechangeupper sanity checks into a dedicated function We need to add more logic to the DSA NETDEV_PRECHANGEUPPER event handler, more exactly we need to request an unsync of switchdev objects. In order to fit more code, refactor the existing logic into a helper. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7e8c18586daf7c1653c4b43a8119bc9662ed8fa6 Author: Vladimir Oltean Date: Sun Jun 27 14:54:27 2021 +0300 net: bridge: allow the switchdev replay functions to be called for deletion When a switchdev port leaves a LAG that is a bridge port, the switchdev objects and port attributes offloaded to that port are not removed: ip link add br0 type bridge ip link add bond0 type bond mode 802.3ad ip link set swp0 master bond0 ip link set bond0 master br0 bridge vlan add dev bond0 vid 100 ip link set swp0 nomaster VLAN 100 will remain installed on swp0 despite it going into standalone mode, because as far as the bridge is concerned, nothing ever happened to its bridge port. Let's extend the bridge vlan, fdb and mdb replay functions to take a 'bool adding' argument, and make DSA and ocelot call the replay functions with 'adding' as false from the switchdev unsync path, for the switch port that leaves the bridge. Note that this patch in itself does not salvage anything, because in the current pull mode of operation, DSA still needs to call the replay helpers with adding=false. This will be done in another patch. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bdf123b455ce596aec6e410ec36fe3687b6a2140 Author: Vladimir Oltean Date: Sun Jun 27 14:54:26 2021 +0300 net: bridge: constify variables in the replay helpers Some of the arguments and local variables for the newly added switchdev replay helpers can be const, so let's make them so. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0d2cfbd41c4a5a0ca5598d1874b1081138cd64c6 Author: Vladimir Oltean Date: Sun Jun 27 14:54:25 2021 +0300 net: bridge: ignore switchdev events for LAG ports which didn't request replay There is a slight inconvenience in the switchdev replay helpers added recently, and this is when: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 bridge vlan add dev bond0 vid 100 ip link set swp0 master bond0 ip link set swp1 master bond0 Since the underlying driver (currently only DSA) asks for a replay of VLANs when swp0 and swp1 join the LAG because it is bridged, what will happen is that DSA will try to react twice on the VLAN event for swp0. This is not really a huge problem right now, because most drivers accept duplicates since the bridge itself does, but it will become a problem when we add support for replaying switchdev object deletions. Let's fix this by adding a blank void *ctx in the replay helpers, which will be passed on by the bridge in the switchdev notifications. If the context is NULL, everything is the same as before. But if the context is populated with a valid pointer, the underlying switchdev driver (currently DSA) can use the pointer to 'see through' the bridge port (which in the example above is bond0) and 'know' that the event is only for a particular physical port offloading that bridge port, and not for all of them. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 69bfac968a06aab5927160f8736485f85c3e8ee8 Author: Vladimir Oltean Date: Sun Jun 27 14:54:24 2021 +0300 net: switchdev: add a context void pointer to struct switchdev_notifier_info In the case where the driver asks for a replay of a certain type of event (port object or attribute) for a bridge port that is a LAG, it may do so because this port has just joined the LAG. But there might already be other switchdev ports in that LAG, and it is preferable that those preexisting switchdev ports do not act upon the replayed event. The solution is to add a context to switchdev events, which is NULL most of the time (when the bridge layer initiates the call) but which can be set to a value controlled by the switchdev driver when a replay is requested. The driver can then check the context to figure out if all ports within the LAG should act upon the switchdev event, or just the ones that match the context. We have to modify all switchdev_handle_* helper functions as well as the prototypes in the drivers that use these helpers too, because these helpers hide the underlying struct switchdev_notifier_info from us and there is no way to retrieve the context otherwise. The context structure will be populated and used in later patches. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 97558e880f63f372f72cf7cd24dfc4befac13c28 Author: Vladimir Oltean Date: Sun Jun 27 14:54:23 2021 +0300 net: ocelot: delete call to br_fdb_replay Not using this driver, I did not realize it doesn't react to SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE notifications, but it implements just the bridge bypass operations (.ndo_fdb_{add,del}). So the call to br_fdb_replay just produces notifications that are ignored, delete it for now. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e887b2df62513505ac6f6db2cb59ee6234ab042b Author: Vladimir Oltean Date: Sun Jun 27 14:54:22 2021 +0300 net: bridge: include the is_local bit in br_fdb_replay Since commit 2c4eca3ef716 ("net: bridge: switchdev: include local flag in FDB notifications"), the bridge emits SWITCHDEV_FDB_ADD_TO_DEVICE events with the is_local flag populated (but we ignore it nonetheless). We would like DSA to start treating this bit, but it is still not populated by the replay helper, so add it there too. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a78cae2476812cecaa4a33d0086bbb53986906bc Author: Jakub Kicinski Date: Fri Jun 25 15:16:12 2021 -0700 xdp: Move the rxq_info.mem clearing to unreg_mem_model() xdp_rxq_info_unreg() implicitly calls xdp_rxq_info_unreg_mem_model(). This may well be confusing to the driver authors, and lead to double free if they call xdp_rxq_info_unreg_mem_model() before xdp_rxq_info_unreg() (when mem model type == MEM_TYPE_PAGE_POOL). In fact error path of mvpp2_rxq_init() seems to currently do exactly that. The double free will result in refcount underflow in page_pool_destroy(). Make the interface a little more programmer friendly by clearing type and id so that xdp_rxq_info_unreg_mem_model() can be called multiple times. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210625221612.2637086-1-kuba@kernel.org commit 9840cfcb97fc8b6aa7b36cec3cc3fd763f14052e Merge: 17cfb9d332243 3d1bf78c7b13a Author: Linus Torvalds Date: Mon Jun 28 14:04:24 2021 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "There's a reasonable amount here and the juicy details are all below. It's worth noting that the MTE/KASAN changes strayed outside of our usual directories due to core mm changes and some associated changes to some other architectures; Andrew asked for us to carry these [1] rather that take them via the -mm tree. Summary: - Optimise SVE switching for CPUs with 128-bit implementations. - Fix output format from SVE selftest. - Add support for versions v1.2 and 1.3 of the SMC calling convention. - Allow Pointer Authentication to be configured independently for kernel and userspace. - PMU driver cleanups for managing IRQ affinity and exposing event attributes via sysfs. - KASAN optimisations for both hardware tagging (MTE) and out-of-line software tagging implementations. - Relax frame record alignment requirements to facilitate 8-byte alignment with KASAN and Clang. - Cleanup of page-table definitions and removal of unused memory types. - Reduction of ARCH_DMA_MINALIGN back to 64 bytes. - Refactoring of our instruction decoding routines and addition of some missing encodings. - Move entry code moved into C and hardened against harmful compiler instrumentation. - Update booting requirements for the FEAT_HCX feature, added to v8.7 of the architecture. - Fix resume from idle when pNMI is being used. - Additional CPU sanity checks for MTE and preparatory changes for systems where not all of the CPUs support 32-bit EL0. - Update our kernel string routines to the latest Cortex Strings implementation. - Big cleanup of our cache maintenance routines, which were confusingly named and inconsistent in their implementations. - Tweak linker flags so that GDB can understand vmlinux when using RELR relocations. - Boot path cleanups to enable early initialisation of per-cpu operations needed by KCSAN. - Non-critical fixes and miscellaneous cleanup" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (150 commits) arm64: tlb: fix the TTL value of tlb_get_level arm64: Restrict undef hook for cpufeature registers arm64/mm: Rename ARM64_SWAPPER_USES_SECTION_MAPS arm64: insn: avoid circular include dependency arm64: smp: Bump debugging information print down to KERN_DEBUG drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number arm64: suspend: Use cpuidle context helpers in cpu_suspend() PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter() arm64: Convert cpu_do_idle() to using cpuidle context helpers arm64: Add cpuidle context save/restore helpers arm64: head: fix code comments in set_cpu_boot_mode_flag arm64: mm: drop unused __pa(__idmap_text_start) arm64: mm: fix the count comments in compute_indices arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan arm64: mm: Pass original fault address to handle_mm_fault() arm64/mm: Drop SECTION_[SHIFT|SIZE|MASK] arm64/mm: Use CONT_PMD_SHIFT for ARM64_MEMSTART_SHIFT arm64/mm: Drop SWAPPER_INIT_MAP_SIZE arm64: Conditionally configure PTR_AUTH key of the kernel. ... commit 17cfb9d332243f6d2551818df27d666d3dd70a23 Merge: 1b1cf8fe99830 c1367ee016e35 Author: Linus Torvalds Date: Mon Jun 28 14:01:03 2021 -0700 Merge tag 'm68k-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - update Finn's email address in MAINTAINERS - defconfig updates - minor fixes and improvements * tag 'm68k-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: atari: Fix ATARI_KBD_CORE kconfig unmet dependency warning m68k: defconfig: Update defconfigs for v5.13-rc1 MAINTAINERS, .mailmap: Update Finn Thain's email address m68k: dma: Remove unnecessary include of asm/cacheflush.h m68k: Drop -fno-strength-reduce from KBUILD_CFLAGS commit d2343cb8d154fe20c4499711bb3a9af2095b2b4b Author: Ingo Molnar Date: Mon Jun 28 21:55:16 2021 +0200 sched/core: Disable CONFIG_SCHED_CORE by default This option at minimum adds extra code to the scheduler - even if it's default unused - and most users wouldn't want it. Reported-by: Linus Torvalds Signed-off-by: Ingo Molnar commit a1b05634e1f0ab11a37906557c8e8eb2aeece222 Merge: 2eeae3a5cb33e 93cb62d98e9c3 Author: David S. Miller Date: Mon Jun 28 13:41:06 2021 -0700 Merge branch 'bnxt_en-ptp' Michael Chan says: ==================== bnxt_en: Add hardware PTP timestamping support on 575XX devices Add PTP RX and TX hardware timestamp support on 575XX devices. These devices use the two-step method to implement the IEEE-1588 timestamping support. v2: Add spinlock to serialize access to the timecounter. Use .do_aux_work() for the periodic timer reading and to get the TX timestamp from the firmware. Propagate error code from ptp_clock_register(). Make the 64-bit timer access safe on 32-bit CPUs. Read PHC using direct register access. ==================== Signed-off-by: David S. Miller commit 93cb62d98e9c3d8c94cc09a15b9ab1faf342c392 Author: Michael Chan Date: Sun Jun 27 13:19:50 2021 -0400 bnxt_en: Enable hardware PTP support Call bnxt_ptp_init() to initialize and register with the clock driver to enable PTP support. Call bnxt_ptp_free() to unregister and clean up during shutdown. Reviewed-by: Edwin Peer Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 83bb623c968e7351aee5111547693f95f330dc5a Author: Pavan Chebbi Date: Sun Jun 27 13:19:49 2021 -0400 bnxt_en: Transmit and retrieve packet timestamps Setup the TXBD to enable TX timestamp if requested. At TX packet DMA completion, if we requested TX timestamp on that packet, we defer to .do_aux_work() to obtain the TX timestamp from the firmware before we free the TX SKB. v2: Use .do_aux_work() to get the TX timestamp from firmware. Reviewed-by: Edwin Peer Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7f5515d19cd7aa02a866fd86622a022f12e06f0f Author: Pavan Chebbi Date: Sun Jun 27 13:19:48 2021 -0400 bnxt_en: Get the RX packet timestamp If the RX packet is timestamped by the hardware, the RX completion record will contain the lower 32-bit of the timestamp. This needs to be combined with the upper 16-bit of the periodic timestamp that we get from the timer. The previous snapshot in ptp->old_timer is used to make sure that the snapshot is not ahead of the RX timestamp and we adjust for wrap-around if needed. v2: Make ptp->old_time read access safe on 32-bit CPUs. Reviewed-by: Edwin Peer Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 390862f45c85b8ebbf9c5c09192bf413a8fb72f8 Author: Pavan Chebbi Date: Sun Jun 27 13:19:47 2021 -0400 bnxt_en: Get the full 48-bit hardware timestamp periodically From the bnxt_timer(), read the 48-bit hardware running clock periodically and store it in ptp->current_time. The previous snapshot of the clock will be stored in ptp->old_time. The old_time snapshot will be used in the next patches to compute the RX packet timestamps. v2: Use .do_aux_work() to read the timer periodically. Reviewed-by: Edwin Peer Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 118612d519d83b98ead11195a5c818f5e8904654 Author: Michael Chan Date: Sun Jun 27 13:19:46 2021 -0400 bnxt_en: Add PTP clock APIs, ioctls, and ethtool methods Add the clock APIs to set/get/adjust the hw clock, and the related ioctls and ethtool methods. v2: Propagate error code from ptp_clock_register(). Add spinlock to serialize access to the timecounter. The timecounter is accessed in process context and the RX datapath. Read the PHC using direct registers. Reviewed-by: Edwin Peer Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ae5c42f0b92ca0abefe2e3930a14fc2e716c81a2 Author: Michael Chan Date: Sun Jun 27 13:19:45 2021 -0400 bnxt_en: Get PTP hardware capability from firmware Store PTP hardware info in a structure if hardware and firmware support PTP. Reviewed-by: Edwin Peer Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 78eeadb8fea6d1a37d5060fe2ea0a0b45f8d8860 Author: Michael Chan Date: Sun Jun 27 13:19:44 2021 -0400 bnxt_en: Update firmware interface to 1.10.2.47 Adding the PTP related firmware interface is the main change. There is also a name change for admin_mtu, requiring code fixup. Reviewed-by: Pavan Chebbi Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2eeae3a5cb33ed922facc52483d2d1ce8b2d019e Merge: c948b46a7dcd1 d59daf6a4ceed Author: David S. Miller Date: Mon Jun 28 13:34:58 2021 -0700 Merge branch 'hns3-next' Guangbin Huang says: ==================== net: hns3: add new debugfs commands This series adds three new debugfs commands for the HNS3 ethernet driver. change log: V1 -> V2: 1. remove patch "net: hns3: add support for link diagnosis info in debugfs" and use ethtool extended link state to implement similar function according to Jakub Kicinski's opinion. ==================== Signed-off-by: David S. Miller commit d59daf6a4ceedf342f349e94f1300e1598213252 Author: Jian Shen Date: Sat Jun 26 09:00:17 2021 +0800 net: hns3: add support for dumping MAC umv counter in debugfs This patch adds support of dumping MAC umv counter in debugfs, which will be helpful for debugging. The display style is below: $ cat umv_info num_alloc_vport : 2 max_umv_size : 256 wanted_umv_size : 256 priv_umv_size : 85 share_umv_size : 86 vport(0) used_umv_num : 1 vport(1) used_umv_num : 1 Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 03a92fe8cedb6f619df416d38d0b57fd55070cd7 Author: Jian Shen Date: Sat Jun 26 09:00:16 2021 +0800 net: hns3: add support for FD counter in debugfs Previously, the flow director counter is not enabled. To improve the maintainability for chechking whether flow director hit or not, enable flow director counter for each function, and add debugfs query inerface to query the counters for each function. The debugfs command is below: cat fd_counter func_id hit_times pf 0 vf0 0 vf1 0 Signed-off-by: Jian Shen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c948b46a7dcd131e3ac3d4ed48f9cfaaa9103d58 Merge: 1b077ce1c5be7 d4cfb7fe57135 Author: David S. Miller Date: Mon Jun 28 13:31:57 2021 -0700 Merge branch 'tipc-next' Menglong Dong says: ==================== net: tipc: fix FB_MTU eat two pages and do some code cleanup In the first patch, FB_MTU is redefined to make sure data size will not exceed PAGE_SIZE. Besides, I removed the alignment for buf_size in tipc_buf_acquire, because skb_alloc_fclone will do the alignment job. In the second patch, I removed align() in msg.c and replace it with ALIGN(). Changes since V5: - remove blank line after Fixes in commit log in the first patch Changes since V4: - remove ONE_PAGE_SKB_SZ and replace it with one_page_mtu in the first patch. - fix some code style problems for the second patch. ==================== Signed-off-by: David S. Miller commit d4cfb7fe5713521280925019e7a7857b373aa627 Author: Menglong Dong Date: Sun Jun 27 23:37:45 2021 -0700 net: tipc: replace align() with ALIGN in msg.c The function align() which is defined in msg.c is redundant, replace it with ALIGN() and introduce a BUF_ALIGN(). Signed-off-by: Menglong Dong Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 0c6de0c943dbb42831bf7502eb5c007f71e752d2 Author: Menglong Dong Date: Sun Jun 27 23:37:44 2021 -0700 net: tipc: fix FB_MTU eat two pages FB_MTU is used in 'tipc_msg_build()' to alloc smaller skb when memory allocation fails, which can avoid unnecessary sending failures. The value of FB_MTU now is 3744, and the data size will be: (3744 + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) + \ SKB_DATA_ALIGN(BUF_HEADROOM + BUF_TAILROOM + 3)) which is larger than one page(4096), and two pages will be allocated. To avoid it, replace '3744' with a calculation: (PAGE_SIZE - SKB_DATA_ALIGN(BUF_OVERHEAD) - \ SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) What's more, alloc_skb_fclone() will call SKB_DATA_ALIGN for data size, and it's not necessary to make alignment for buf_size in tipc_buf_acquire(). So, just remove it. Fixes: 4c94cc2d3d57 ("tipc: fall back to smaller MTU if allocation of local send skb fails") Signed-off-by: Menglong Dong Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 5c0de3d72f8c05678ed769bea24e98128f7ab570 Author: Mikulas Patocka Date: Mon Jun 28 09:59:37 2021 -0400 dm writecache: make writeback pause configurable Commit 95b88f4d71cb953e02206be3c757083601391a0f ("dm writecache: pause writeback if cache full and origin being written directly") introduced a code that pauses cache flushing if we are issuing writes directly to the origin. Improve that initial commit by making the timeout code configurable (via the option "pause_writeback"). Also change the default from 1s to 3s because it performed better. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 1b1cf8fe99830e8c95f0fe110b02ba51c2bbc4e0 Merge: 5f498328a91b5 d28397eaf4c27 Author: Linus Torvalds Date: Mon Jun 28 13:30:02 2021 -0700 Merge tag 'x86-splitlock-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 splitlock updates from Ingo Molnar: - Add the "ratelimit:N" parameter to the split_lock_detect= boot option, to rate-limit the generation of bus-lock exceptions. This is both easier on system resources and kinder to offending applications than the current policy of outright killing them. - Document the split-lock detection feature and its parameters. * tag 'x86-splitlock-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/x86: Add ratelimit in buslock.rst Documentation/admin-guide: Add bus lock ratelimit x86/bus_lock: Set rate limit for bus lock Documentation/x86: Add buslock.rst commit 5f498328a91b59841557b8c4e8f0360e509dd454 Merge: e98e8864b0b55 314a1e1eabea5 Author: Linus Torvalds Date: Mon Jun 28 13:27:46 2021 -0700 Merge tag 'x86-mm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm update from Ingo Molnar: "Do not create the x86/init_pkru debugfs file if the CPU doesn't support PKRU" * tag 'x86-mm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pkeys: Skip 'init_pkru' debugfs file creation when pkeys not supported commit 1b077ce1c5be7cdb0e40ea2c2565ed8c878b05e9 Merge: 007b312c6f294 b5a1d1fe0cbb9 Author: David S. Miller Date: Mon Jun 28 13:17:16 2021 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git /klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2021-06-28 1) Remove an unneeded error assignment in esp4_gro_receive(). From Yang Li. 2) Add a new byseq state hashtable to find acquire states faster. From Sabrina Dubroca. 3) Remove some unnecessary variables in pfkey_create(). From zuoqilin. 4) Remove the unused description from xfrm_type struct. From Florian Westphal. 5) Fix a spelling mistake in the comment of xfrm_state_ok(). From gushengxian. 6) Replace hdr_off indirections by a small helper function. From Florian Westphal. 7) Remove xfrm4_output_finish and xfrm6_output_finish declarations, they are not used anymore.From Antony Antony. 8) Remove xfrm replay indirections. From Florian Westphal. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit e98e8864b0b553389bbb7d2ed197729a434ba0f0 Merge: 8e4d7a78f08a7 d06aca989c243 Author: Linus Torvalds Date: Mon Jun 28 13:16:44 2021 -0700 Merge tag 'x86-misc-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 uapi fixlet from Ingo Molnar: "Fix the UAPI header to build in user-space too" * tag 'x86-misc-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/elf: Use _BITUL() macro in UAPI headers commit 8e4d7a78f08a788a839bd88a2710ba7a71a86e24 Merge: 98e62da8b3ee9 1d3156396cf6e Author: Linus Torvalds Date: Mon Jun 28 13:10:25 2021 -0700 Merge tag 'x86-cleanups-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Misc cleanups & removal of obsolete code" * tag 'x86-cleanups-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sgx: Correct kernel-doc's arg name in sgx_encl_release() doc: Remove references to IBM Calgary x86/setup: Document that Windows reserves the first MiB x86/crash: Remove crash_reserve_low_1M() x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options x86/alternative: Align insn bytes vertically x86: Fix leftover comment typos x86/asm: Simplify __smp_mb() definition x86/alternatives: Make the x86nops[] symbol static commit 97d0a6874478802b68e3bea7aa9b9a333d257182 Author: Alex Williamson Date: Fri Jun 25 15:20:06 2021 -0600 vfio/mtty: Enforce available_instances The sample mtty mdev driver doesn't actually enforce the number of device instances it claims are available. Implement this properly. Link: https://lore.kernel.org/r/162465624894.3338367.12935940647049917981.stgit@omen Reviewed-by: Jason Gunthorpe Reviewed-by: Cornelia Huck Reviewed by: Kirti Wankhede Signed-off-by: Alex Williamson commit 98e62da8b3ee9ac3faf388fd78ee982a765170a7 Merge: 1b98ed0e83577 fd2afa70eff05 Author: Linus Torvalds Date: Mon Jun 28 13:06:24 2021 -0700 Merge tag 'x86-cache-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resource control documentation fixes from Ingo Molnar: "Fix Docbook comments in the x86/resctrl code" * tag 'x86-cache-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Fix kernel-doc in internal.h x86/resctrl: Fix kernel-doc in pseudo_lock.c commit 007b312c6f294770de01fbc0643610145012d244 Merge: c4512c63b1193 2433647bc8d98 Author: David S. Miller Date: Mon Jun 28 13:06:12 2021 -0700 Merge tag 'mac80211-next-for-net-next-2021-06-25' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes berg says: ==================== Lots of changes: * aggregation handling improvements for some drivers * hidden AP discovery on 6 GHz and other HE 6 GHz improvements * minstrel improvements for no-ack frames * deferred rate control for TXQs to improve reaction times * virtual time-based airtime scheduler * along with various little cleanups/fixups ==================== Signed-off-by: David S. Miller commit 1b98ed0e83577bc03515f498a5de342f7dbf0b47 Merge: 909489bf9f88d f279b49f13bd2 Author: Linus Torvalds Date: Mon Jun 28 13:05:09 2021 -0700 Merge tag 'x86-boot-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot update from Ingo Molnar: "Modernize the genimage.sh script, add a 'hdimage' target and EFI support" * tag 'x86-boot-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Modernize genimage script; hdimage+EFI support commit c4512c63b1193c73b3f09c598a6d0a7f88da1dd8 Author: Matthieu Baerts Date: Fri Jun 25 14:25:22 2021 -0700 mptcp: fix 'masking a bool' warning Dan Carpenter reported an issue introduced in commit fde56eea01f9 ("mptcp: refine mptcp_cleanup_rbuf") where a new boolean (ack_pending) is masked with 0x9. This is not the intention to ignore values by using a boolean. This variable should not have a 'bool' type: we should keep the 'u8' to allow this comparison. Fixes: fde56eea01f9 ("mptcp: refine mptcp_cleanup_rbuf") Reported-by: Dan Carpenter Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit 3f2db250099f46988088800052cdf2332c7aba61 Author: Pavel Skripkin Date: Fri Jun 25 23:23:48 2021 +0300 net: sched: fix warning in tcindex_alloc_perfect_hash Syzbot reported warning in tcindex_alloc_perfect_hash. The problem was in too big cp->hash, which triggers warning in kmalloc. Since cp->hash comes from userspace, there is no need to warn if value is not correct Fixes: b9a24bb76bf6 ("net_sched: properly handle failure case of tcf_exts_init()") Reported-and-tested-by: syzbot+1071ad60cd7df39fdadb@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Acked-by: Cong Wang Signed-off-by: David S. Miller commit 909489bf9f88d314dc18be930cefa99ec9a4aac7 Merge: e5a0fc4e20d3b 41f45fb045bcc Author: Linus Torvalds Date: Mon Jun 28 12:57:11 2021 -0700 Merge tag 'x86-asm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: - Micro-optimize and standardize the do_syscall_64() calling convention - Make syscall entry flags clearing more conservative - Clean up syscall table handling - Clean up & standardize assembly macros, in preparation of FRED - Misc cleanups and fixes * tag 'x86-asm-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Make valid on cross-builds as well x86/regs: Syscall_get_nr() returns -1 for a non-system call x86/entry: Split PUSH_AND_CLEAR_REGS into two submacros x86/syscall: Maximize MSR_SYSCALL_MASK x86/syscall: Unconditionally prototype {ia32,x32}_sys_call_table[] x86/entry: Reverse arguments to do_syscall_64() x86/entry: Unify definitions from and x86/asm: Use _ASM_BYTES() in x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence x86/asm: Have the __ASM_FORM macros handle commas in arguments commit 9a03abc16c77062c73972df08206f1031862d9b4 Author: Kees Cook Date: Thu Jun 17 16:18:34 2021 -0700 selftests/seccomp: Avoid using "sysctl" for report Instead of depending on "sysctl" being installed, just use "grep -H" for sysctl status reporting. Additionally report kernel version for easier comparisons. Signed-off-by: Kees Cook commit 62ddb91b7771626658c382c2b849a058f1586123 Author: Kees Cook Date: Wed May 26 19:46:30 2021 -0700 selftests/seccomp: Flush benchmark output When running the seccomp benchmark under a test runner, it wouldn't provide any feedback on progress. Set stdout unbuffered. Suggested-by: Will Drewry Signed-off-by: Kees Cook commit 93e720d710dfe689099c23bb91414303cf715d27 Author: Kees Cook Date: Wed May 26 19:49:15 2021 -0700 selftests/seccomp: More closely track fds being assigned Since the open fds might not always start at "4" (especially when running under kselftest, etc), start counting from the first assigned fd, rather than using the more permissive EXPECT_GE(fd, 0). Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20210527032948.3730953-1-keescook@chromium.org Reviewed-by: Rodrigo Campos Acked-by: Christian Brauner commit e540ad97e73cefb41e93d0c06d0fe6a8620a77e0 Author: Rodrigo Campos Date: Mon May 17 12:39:08 2021 -0700 selftests/seccomp: Add test for atomic addfd+send This just adds a test to verify that when using the new introduced flag to ADDFD, a valid fd is added and returned as the syscall result. Signed-off-by: Rodrigo Campos Signed-off-by: Sargun Dhillon Acked-by: Tycho Andersen Acked-by: Christian Brauner Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210517193908.3113-5-sargun@sargun.me commit 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c Author: Rodrigo Campos Date: Mon May 17 12:39:07 2021 -0700 seccomp: Support atomic "addfd + send reply" Alban Crequy reported a race condition userspace faces when we want to add some fds and make the syscall return them[1] using seccomp notify. The problem is that currently two different ioctl() calls are needed by the process handling the syscalls (agent) for another userspace process (target): SECCOMP_IOCTL_NOTIF_ADDFD to allocate the fd and SECCOMP_IOCTL_NOTIF_SEND to return that value. Therefore, it is possible for the agent to do the first ioctl to add a file descriptor but the target is interrupted (EINTR) before the agent does the second ioctl() call. This patch adds a flag to the ADDFD ioctl() so it adds the fd and returns that value atomically to the target program, as suggested by Kees Cook[2]. This is done by simply allowing seccomp_do_user_notification() to add the fd and return it in this case. Therefore, in this case the target wakes up from the wait in seccomp_do_user_notification() either to interrupt the syscall or to add the fd and return it. This "allocate an fd and return" functionality is useful for syscalls that return a file descriptor only, like connect(2). Other syscalls that return a file descriptor but not as return value (or return more than one fd), like socketpair(), pipe(), recvmsg with SCM_RIGHTs, will not work with this flag. This effectively combines SECCOMP_IOCTL_NOTIF_ADDFD and SECCOMP_IOCTL_NOTIF_SEND into an atomic opteration. The notification's return value, nor error can be set by the user. Upon successful invocation of the SECCOMP_IOCTL_NOTIF_ADDFD ioctl with the SECCOMP_ADDFD_FLAG_SEND flag, the notifying process's errno will be 0, and the return value will be the file descriptor number that was installed. [1]: https://lore.kernel.org/lkml/CADZs7q4sw71iNHmV8EOOXhUKJMORPzF7thraxZYddTZsxta-KQ@mail.gmail.com/ [2]: https://lore.kernel.org/lkml/202012011322.26DCBC64F2@keescook/ Signed-off-by: Rodrigo Campos Signed-off-by: Sargun Dhillon Acked-by: Tycho Andersen Acked-by: Christian Brauner Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210517193908.3113-4-sargun@sargun.me commit e5a0fc4e20d3b672489efc22b515c549bb77db42 Merge: 9269d27e519ae 1dcc917a0eed9 Author: Linus Torvalds Date: Mon Jun 28 12:46:30 2021 -0700 Merge tag 'x86-apic-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 exception handling updates from Ingo Molnar: - Clean up & simplify AP exception handling setup. - Consolidate the disjoint IDT setup code living in idt_setup_traps() and idt_setup_ist_traps() into a single idt_setup_traps() initialization function and call it before cpu_init(). * tag 'x86-apic-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/idt: Rework IDT setup for boot CPU x86/cpu: Init AP exception handling from cpu_init_secondary() commit 8eb517a2a4ae447b009f1d971004d334d244549e Merge: ff8744b5eb116 b2d898c8a523f Author: David S. Miller Date: Mon Jun 28 12:44:18 2021 -0700 Merge branch 'reset-mac' Guillaume Nault says: ==================== net: reset MAC header consistently across L3 virtual devices Some virtual L3 devices, like vxlan-gpe and gre (in collect_md mode), reset the MAC header pointer after they parsed the outer headers. This accurately reflects the fact that the decapsulated packet is pure L3 packet, as that makes the MAC header 0 bytes long (the MAC and network header pointers are equal). However, many L3 devices only adjust the network header after decapsulation and leave the MAC header pointer to its original value. This can confuse other parts of the networking stack, like TC, which then considers the outer headers as one big MAC header. This patch series makes the following L3 tunnels behave like VXLAN-GPE: bareudp, ipip, sit, gre, ip6gre, ip6tnl, gtp. The case of gre is a bit special. It already resets the MAC header pointer in collect_md mode, so only the classical mode needs to be adjusted. However, gre also has a special case that expects the MAC header pointer to keep pointing to the outer header even after decapsulation. Therefore, patch 4 keeps an exception for this case. Ideally, we'd centralise the call to skb_reset_mac_header() in ip_tunnel_rcv(), to avoid manual calls in ipip (patch 2), sit (patch 3) and gre (patch 4). That's unfortunately not feasible currently, because of the gre special case discussed above that precludes us from resetting the MAC header unconditionally. The original motivation is to redirect bareudp packets to Ethernet devices (as described in patch 1). The rest of this series aims at bringing consistency across all L3 devices (apart from gre's special case unfortunately). Note: the gtp patch results from pure code inspection and has been compiled tested only. ==================== Signed-off-by: David S. Miller commit b2d898c8a523f44ee7b3eea608e81a6e2264579f Author: Guillaume Nault Date: Fri Jun 25 15:33:23 2021 +0200 gtp: reset mac_header after decap For consistency with other L3 tunnel devices, reset the mac_header pointer after decapsulation. This makes the mac_header 0 bytes long, thus making it clear that this skb has no mac_header. Compile tested only. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit da5a2e49f064a86a3b102b20c545f855a7298394 Author: Guillaume Nault Date: Fri Jun 25 15:33:17 2021 +0200 ip6_tunnel: allow redirecting ip6gre and ipxip6 packets to eth devices Reset the mac_header pointer even when the tunnel transports only L3 data (in the ARPHRD_ETHER case, this is already done by eth_type_trans). This prevents other parts of the stack from mistakenly accessing the outer header after the packet has been decapsulated. In practice, this allows to push an Ethernet header to ipip6, ip6ip6, mplsip6 or ip6gre packets and redirect them to an Ethernet device: $ tc filter add dev ip6tnl0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Without this patch, push_eth refuses to add an ethernet header because the skb appears to already have a MAC header. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit aab1e898c26c3e4289c62b6d6482948672fab939 Author: Guillaume Nault Date: Fri Jun 25 15:33:13 2021 +0200 gre: let mac_header point to outer header only when necessary Commit e271c7b4420d ("gre: do not keep the GRE header around in collect medata mode") did reset the mac_header for the collect_md case. Let's extend this behaviour to classical gre devices as well. ipgre_header_parse() seems to be the only case that requires mac_header to point to the outer header. We can detect this case accurately by checking ->header_ops. For all other cases, we can reset mac_header. This allows to push an Ethernet header to ipgre packets and redirect them to an Ethernet device: $ tc filter add dev gre0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Before this patch, this worked only for collect_md gre devices. Now this works for regular gre devices as well. Only the special case of gre devices that use ipgre_header_ops isn't supported. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 730eed2772e740c30229d03e3d578cc00a5ae304 Author: Guillaume Nault Date: Fri Jun 25 15:33:08 2021 +0200 sit: allow redirecting ip6ip, ipip and mplsip packets to eth devices Even though sit transports L3 data (IPv6, IPv4 or MPLS) packets, it needs to reset the mac_header pointer, so that other parts of the stack don't mistakenly access the outer header after the packet has been decapsulated. There are two rx handlers to modify: ipip6_rcv() for the ip6ip mode and sit_tunnel_rcv() which is used to re-implement the ipip and mplsip modes of ipip.ko. This allows to push an Ethernet header to sit packets and redirect them to an Ethernet device: $ tc filter add dev sit0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Without this patch, push_eth refuses to add an ethernet header because the skb appears to already have a MAC header. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 7ad136fd288c0e0177eb29e04ec289e1b873b270 Author: Guillaume Nault Date: Fri Jun 25 15:33:04 2021 +0200 ipip: allow redirecting ipip and mplsip packets to eth devices Even though ipip transports IPv4 or MPLS packets, it needs to reset the mac_header pointer, so that other parts of the stack don't mistakenly access the outer header after the packet has been decapsulated. This allows to push an Ethernet header to ipip or mplsip packets and redirect them to an Ethernet device: $ tc filter add dev ipip0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Without this patch, push_eth refuses to add an ethernet header because the skb appears to already have a MAC header. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 99c8719b79814cab3fd43519591dcc41c978a48c Author: Guillaume Nault Date: Fri Jun 25 15:33:01 2021 +0200 bareudp: allow redirecting bareudp packets to eth devices Even though bareudp transports L3 data (typically IP or MPLS), it needs to reset the mac_header pointer, so that other parts of the stack don't mistakenly access the outer header after the packet has been decapsulated. This allows to push an Ethernet header to bareudp packets and redirect them to an Ethernet device: $ tc filter add dev bareudp0 ingress matchall \ action vlan push_eth dst_mac 00:00:5e:00:53:01 \ src_mac 00:00:5e:00:53:00 \ action mirred egress redirect dev eth0 Without this patch, push_eth refuses to add an ethernet header because the skb appears to already have a MAC header. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit fade56410c22cacafb1be9f911a0afd3701d8366 Author: Vadim Fedorenko Date: Fri Jun 25 19:21:39 2021 +0300 net: lwtunnel: handle MTU calculation in forwading Commit 14972cbd34ff ("net: lwtunnel: Handle fragmentation") moved fragmentation logic away from lwtunnel by carry encap headroom and use it in output MTU calculation. But the forwarding part was not covered and created difference in MTU for output and forwarding and further to silent drops on ipv4 forwarding path. Fix it by taking into account lwtunnel encap headroom. The same commit also introduced difference in how to treat RTAX_MTU in IPv4 and IPv6 where latter explicitly removes lwtunnel encap headroom from route MTU. Make IPv4 version do the same. Fixes: 14972cbd34ff ("net: lwtunnel: Handle fragmentation") Suggested-by: David Ahern Signed-off-by: Vadim Fedorenko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 9269d27e519ae9a89be8d288f59d1ec573b0c686 Merge: 54a728dc5e4fe 09fe880ed7a16 Author: Linus Torvalds Date: Mon Jun 28 12:22:06 2021 -0700 Merge tag 'timers-nohz-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timers/nohz updates from Ingo Molnar: - Micro-optimize tick_nohz_full_cpu() - Optimize idle exit tick restarts to be less eager - Optimize tick_nohz_dep_set_task() to only wake up a single CPU. This reduces IPIs and interruptions on nohz_full CPUs. - Optimize tick_nohz_dep_set_signal() in a similar fashion. - Skip IPIs in tick_nohz_kick_task() when trying to kick a non-running task. - Micro-optimize tick_nohz_task_switch() IRQ flags handling to reduce context switching costs. - Misc cleanups and fixes * tag 'timers-nohz-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Add myself as context tracking maintainer tick/nohz: Call tick_nohz_task_switch() with interrupts disabled tick/nohz: Kick only _queued_ task whose tick dependency is updated tick/nohz: Change signal tick dependency to wake up CPUs of member tasks tick/nohz: Only wake up a single target cpu when kicking a task tick/nohz: Update nohz_full Kconfig help tick/nohz: Update idle_exittime on actual idle exit tick/nohz: Remove superflous check for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE tick/nohz: Conditionally restart tick on idle exit tick/nohz: Evaluate the CPU expression after the static key commit 54a728dc5e4feb0a9278ad62b19f34ad21ed0ee4 Merge: 28a27cbd86076 adf3c31e18b76 Author: Linus Torvalds Date: Mon Jun 28 12:14:19 2021 -0700 Merge tag 'sched-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler udpates from Ingo Molnar: - Changes to core scheduling facilities: - Add "Core Scheduling" via CONFIG_SCHED_CORE=y, which enables coordinated scheduling across SMT siblings. This is a much requested feature for cloud computing platforms, to allow the flexible utilization of SMT siblings, without exposing untrusted domains to information leaks & side channels, plus to ensure more deterministic computing performance on SMT systems used by heterogenous workloads. There are new prctls to set core scheduling groups, which allows more flexible management of workloads that can share siblings. - Fix task->state access anti-patterns that may result in missed wakeups and rename it to ->__state in the process to catch new abuses. - Load-balancing changes: - Tweak newidle_balance for fair-sched, to improve 'memcache'-like workloads. - "Age" (decay) average idle time, to better track & improve workloads such as 'tbench'. - Fix & improve energy-aware (EAS) balancing logic & metrics. - Fix & improve the uclamp metrics. - Fix task migration (taskset) corner case on !CONFIG_CPUSET. - Fix RT and deadline utilization tracking across policy changes - Introduce a "burstable" CFS controller via cgroups, which allows bursty CPU-bound workloads to borrow a bit against their future quota to improve overall latencies & batching. Can be tweaked via /sys/fs/cgroup/cpu//cpu.cfs_burst_us. - Rework assymetric topology/capacity detection & handling. - Scheduler statistics & tooling: - Disable delayacct by default, but add a sysctl to enable it at runtime if tooling needs it. Use static keys and other optimizations to make it more palatable. - Use sched_clock() in delayacct, instead of ktime_get_ns(). - Misc cleanups and fixes. * tag 'sched-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (72 commits) sched/doc: Update the CPU capacity asymmetry bits sched/topology: Rework CPU capacity asymmetry detection sched/core: Introduce SD_ASYM_CPUCAPACITY_FULL sched_domain flag psi: Fix race between psi_trigger_create/destroy sched/fair: Introduce the burstable CFS controller sched/uclamp: Fix uclamp_tg_restrict() sched/rt: Fix Deadline utilization tracking during policy change sched/rt: Fix RT utilization tracking during policy change sched: Change task_struct::state sched,arch: Remove unused TASK_STATE offsets sched,timer: Use __set_current_state() sched: Add get_current_state() sched,perf,kvm: Fix preemption condition sched: Introduce task_is_running() sched: Unbreak wakeups sched/fair: Age the average idle time sched/cpufreq: Consider reduced CPU capacity in energy calculation sched/fair: Take thermal pressure into account while estimating energy thermal/cpufreq_cooling: Update offline CPUs per-cpu thermal_pressure sched/fair: Return early from update_tg_cfs_load() if delta == 0 ... commit 28a27cbd86076c1a6be311c751b421c4c17a7dd9 Merge: a15286c63d113 012669c740e6e Author: Linus Torvalds Date: Mon Jun 28 12:03:20 2021 -0700 Merge tag 'perf-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events updates from Ingo Molnar: - Platform PMU driver updates: - x86 Intel uncore driver updates for Skylake (SNR) and Icelake (ICX) servers - Fix RDPMC support - Fix [extended-]PEBS-via-PT support - Fix Sapphire Rapids event constraints - Fix :ppp support on Sapphire Rapids - Fix fixed counter sanity check on Alder Lake & X86_FEATURE_HYBRID_CPU - Other heterogenous-PMU fixes - Kprobes: - Remove the unused and misguided kprobe::fault_handler callbacks. - Warn about kprobes taking a page fault. - Fix the 'nmissed' stat counter. - Misc cleanups and fixes. * tag 'perf-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix task context PMU for Hetero perf/x86/intel: Fix instructions:ppp support in Sapphire Rapids perf/x86/intel: Add more events requires FRONTEND MSR on Sapphire Rapids perf/x86/intel: Fix fixed counter check warning for some Alder Lake perf/x86/intel: Fix PEBS-via-PT reload base value for Extended PEBS perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task kprobes: Do not increment probe miss count in the fault handler x86,kprobes: WARN if kprobes tries to handle a fault kprobes: Remove kprobe::fault_handler uprobes: Update uprobe_write_opcode() kernel-doc comment perf/hw_breakpoint: Fix DocBook warnings in perf hw_breakpoint perf/core: Fix DocBook warnings perf/core: Make local function perf_pmu_snapshot_aux() static perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on SNR perf/x86/intel/uncore: Generalize I/O stacks to PMON mapping procedure perf/x86/intel/uncore: Drop unnecessary NULL checks after container_of() commit a15286c63d113d4296c58867994cd266a28f5d6d Merge: b89c07dea1613 0e8a89d49d451 Author: Linus Torvalds Date: Mon Jun 28 11:45:29 2021 -0700 Merge tag 'locking-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - Core locking & atomics: - Convert all architectures to ARCH_ATOMIC: move every architecture to ARCH_ATOMIC, then get rid of ARCH_ATOMIC and all the transitory facilities and #ifdefs. Much reduction in complexity from that series: 63 files changed, 756 insertions(+), 4094 deletions(-) - Self-test enhancements - Futexes: - Add the new FUTEX_LOCK_PI2 ABI, which is a variant that doesn't set FLAGS_CLOCKRT (.e. uses CLOCK_MONOTONIC). [ The temptation to repurpose FUTEX_LOCK_PI's implicit setting of FLAGS_CLOCKRT & invert the flag's meaning to avoid having to introduce a new variant was resisted successfully. ] - Enhance futex self-tests - Lockdep: - Fix dependency path printouts - Optimize trace saving - Broaden & fix wait-context checks - Misc cleanups and fixes. * tag 'locking-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits) locking/lockdep: Correct the description error for check_redundant() futex: Provide FUTEX_LOCK_PI2 to support clock selection futex: Prepare futex_lock_pi() for runtime clock selection lockdep/selftest: Remove wait-type RCU_CALLBACK tests lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING lockdep: Fix wait-type for empty stack locking/selftests: Add a selftest for check_irq_usage() lockding/lockdep: Avoid to find wrong lock dep path in check_irq_usage() locking/lockdep: Remove the unnecessary trace saving locking/lockdep: Fix the dep path printing for backwards BFS selftests: futex: Add futex compare requeue test selftests: futex: Add futex wait test seqlock: Remove trailing semicolon in macros locking/lockdep: Reduce LOCKDEP dependency list locking/lockdep,doc: Improve readability of the block matrix locking/atomics: atomic-instrumented: simplify ifdeffery locking/atomic: delete !ARCH_ATOMIC remnants locking/atomic: xtensa: move to ARCH_ATOMIC locking/atomic: sparc: move to ARCH_ATOMIC locking/atomic: sh: move to ARCH_ATOMIC ... commit b89c07dea16137696d0f2d479ef665ef7c1022ab Merge: 6796355bc49b6 e31694e0a7a70 d33b9035e14a3 Author: Linus Torvalds Date: Mon Jun 28 11:35:55 2021 -0700 Merge tags 'objtool-urgent-2021-06-28' and 'objtool-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix and updates from Ingo Molnar: "An ELF format fix for a section flags mismatch bug that breaks kernel tooling such as kpatch-build. The biggest change in this cycle is the new code to handle and rewrite variable sized jump labels - which results in slightly tighter code generation in hot paths, through the use of short(er) NOPs. Also a number of cleanups and fixes, and a change to the generic include/linux/compiler.h to handle a s390 GCC quirk" * tag 'objtool-urgent-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Don't make .altinstructions writable * tag 'objtool-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Improve reloc hash size guestimate instrumentation.h: Avoid using inline asm operand modifiers compiler.h: Avoid using inline asm operand modifiers kbuild: Fix objtool dependency for 'OBJECT_FILES_NON_STANDARD_ := n' objtool: Reflow handle_jump_alt() jump_label/x86: Remove unused JUMP_LABEL_NOP_SIZE jump_label, x86: Allow short NOPs objtool: Provide stats for jump_labels objtool: Rewrite jump_label instructions objtool: Decode jump_entry::key addend jump_label, x86: Emit short JMP jump_label: Free jump_entry::key bit1 for build use jump_label, x86: Add variable length patching support jump_label, x86: Introduce jump_entry_size() jump_label, x86: Improve error when we fail expected text jump_label, x86: Factor out the __jump_table generation jump_label, x86: Strip ASM jump_label support x86, objtool: Dont exclude arch/x86/realmode/ objtool: Rewrite hashtable sizing commit 6796355bc49b625a701389c954073c4e5dad4381 Merge: d04f7de0a5134 267be9dbacf44 Author: Linus Torvalds Date: Mon Jun 28 11:34:16 2021 -0700 Merge tag 'efi-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "Two driver API cleanups, and a log message tweak" * tag 'efi-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Log 32/64-bit mismatch with kernel as an error efi/dev-path-parser: Switch to use for_each_acpi_dev_match() efi/apple-properties: Handle device properties with software node API commit d04f7de0a5134de13420e72ae62a26f05d312c06 Merge: 2594b713c12fa 8d9d46bbf3b6b Author: Linus Torvalds Date: Mon Jun 28 11:29:12 2021 -0700 Merge tag 'x86_sev_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV updates from Borislav Petkov: - Differentiate the type of exception the #VC handler raises depending on code executed in the guest and handle the case where failure to get the RIP would result in a #GP, as it should, instead of in a #PF - Disable interrupts while the per-CPU GHCB is held - Split the #VC handler depending on where the #VC exception has happened and therefore provide for precise context tracking like the rest of the exception handlers deal with noinstr regions now - Add defines for the GHCB version 2 protocol so that further shared development with KVM can happen without merge conflicts - The usual small cleanups * tag 'x86_sev_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Use "SEV: " prefix for messages from sev.c x86/sev: Add defines for GHCB version 2 MSR protocol requests x86/sev: Split up runtime #VC handler for correct state tracking x86/sev: Make sure IRQs are disabled while GHCB is active x86/sev: Propagate #GP if getting linear instruction address failed x86/insn: Extend error reporting from insn_fetch_from_user[_inatomic]() x86/insn-eval: Make 0 a valid RIP for insn_get_effective_ip() x86/sev: Fix error message in runtime #VC handler commit 2594b713c12faa8976f97d8d16b3d8b343ff4ea2 Merge: f565b20734d32 293649307ef9a Author: Linus Torvalds Date: Mon Jun 28 11:22:40 2021 -0700 Merge tag 'x86_cpu_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Borislav Petkov: - New AMD models support - Allow MONITOR/MWAIT to be used for C1 state entry on Hygon too - Use the special RAPL CPUID bit to detect the functionality on AMD and Hygon instead of doing family matching. - Add support for new Intel microcode deprecating TSX on some models and do not enable kernel workarounds for those CPUs when TSX transactions always abort, as a result of that microcode update. * tag 'x86_cpu_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsx: Clear CPUID bits when TSX always force aborts x86/events/intel: Do not deploy TSX force abort workaround when TSX is deprecated x86/msr: Define new bits in TSX_FORCE_ABORT MSR perf/x86/rapl: Use CPUID bit on AMD and Hygon parts x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems x86/amd_nb: Add AMD family 19h model 50h PCI ids x86/cpu: Fix core name for Sapphire Rapids commit f565b20734d32bab5a899123d2c58909dbf46a5d Merge: 2a5c61843e31c 429b2ba70812f Author: Linus Torvalds Date: Mon Jun 28 11:19:40 2021 -0700 Merge tag 'ras_core_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: - Add the required information to the faked APEI-reported mem error so that the kernel properly attempts to offline the corresponding page, as it does for kernel-detected correctable errors. - Fix a typo in AMD's error descriptions. * tag 'ras_core_for_v5.14_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: EDAC/mce_amd: Fix typo "FIfo" -> "Fifo" x86/mce: Include a MCi_MISC value in faked mce logs x86/MCE/AMD, EDAC/mce_amd: Add new SMCA bank types commit 2a5c61843e31cefd099f085764c2df2dac9fcd65 Merge: 69609a91ac1d8 a5f6c0f85a09f Author: Linus Torvalds Date: Mon Jun 28 11:13:26 2021 -0700 Merge tag 'hwmon-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - Delta DPS920AB - Flex PIM4006, PIM4328 and PIM4820 - MPS MP2888 - Sensirion SHT4X Added chip support to existing drivers: - Flex BMR310, BMR456, BMR457, BMR458, BMR480, BMR490, BMR491, and BMR492 - TI TMP1075 - Renesas ZLS1003, ZLS4009 and ZL8802 Other: - Dropped explicit ACPI support for MAX31722 and LM70; the APIC IDs in those drivers do not exist. - Support set_trips() callback into thermal subsystem - Minor fixes and improvements in various drivers" * tag 'hwmon-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (49 commits) hwmon: Support set_trips() of thermal device ops hwmon: (lm90) Prevent integer underflows of temperature calculations hwmon: (lm90) Disable interrupt on suspend hwmon: (lm90) Unmask hardware interrupt hwmon: (lm90) Use hwmon_notify_event() hwmon: (lm90) Don't override interrupt trigger type hwmon: (pmbus/dps920ab) Delete some dead code hwmon: (ntc_thermistor) Drop unused headers. MAINTAINERS: Add Delta DPS920AB PSU driver dt-bindings: trivial-devices: Add Delta DPS920AB hwmon: (pmbus) Add driver for Delta DPS-920AB PSU hwmon: (pmbus/pim4328) Add documentation for the pim4328 PMBus driver hwmon: (pmbus/pim4328) Add PMBus driver for PIM4006, PIM4328 and PIM4820 hwmon: (pmbus) Allow phase function even if it's not on page hwmon: (pmbus) Add support for reading direct mode coefficients hwmon: (pmbus) Add new pmbus flag NO_WRITE_PROTECT docs: hwmon: adm1177.rst: avoid using ReSt :doc:`foo` markup hwmon: (pmbus_core) Check adapter PEC support hwmon: (ina3221) use CVRF only for single-shot conversion hwmon: (max31790) Detect and report zero fan speed ... commit b62613b431bdababc90bf1440b2c7427172d94f4 Author: Colin Ian King Date: Mon Jun 28 13:55:22 2021 +0100 tracing: Fix spelling in osnoise tracer "interferences" -> "interference" There is a spelling mistake in a TP_printk message, the word interferences is not the plural of interference. Fix this. Link: https://lkml.kernel.org/r/20210628125522.56361-1-colin.king@canonical.com Reviewed-by: Daniel Bristot de Oliveira Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit bd09c0556eca17f55fb09a26b6ed27bedd1b42ef Author: Daniel Bristot de Oliveira Date: Mon Jun 28 11:45:50 2021 +0200 Documentation: Fix a typo on trace/osnoise-tracer s/RUNTIME IN USE/RUNTIME IN US/ Link: https://lkml.kernel.org/r/43e5160422a967218aa651c47f523e8d32d6a59e.1624872608.git.bristot@redhat.com Fixes: bce29ac9ce0b ("trace: Add osnoise tracer") Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 498627b4ac85780b9962ed9b5c5abbefd884ef8e Author: Daniel Bristot de Oliveira Date: Mon Jun 28 11:45:49 2021 +0200 trace/osnoise: Fix return value on osnoise_init_hotplug_support kernel test robot reported: >> kernel/trace/trace_osnoise.c:1584:2: error: void function 'osnoise_init_hotplug_support' should not return a value [-Wreturn-type] return 0; When !CONFIG_HOTPLUG_CPU. Fix it problem by removing the return value. Link: https://lkml.kernel.org/r/c7fc67f1a117cc88bab2e508c898634872795341.1624872608.git.bristot@redhat.com Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations") Reported-by: kernel test robot Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 2a81afa326fd23add336cfd7e35e1d699d11d9c4 Author: Daniel Bristot de Oliveira Date: Mon Jun 28 11:45:48 2021 +0200 trace/osnoise: Make interval u64 on osnoise_main kernel test robot reported: >> kernel/trace/trace_osnoise.c:966:3: warning: comparison of distinct pointer types ('typeof ((interval)) *' (aka 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types] do_div(interval, USEC_PER_MSEC); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/div64.h:228:28: note: expanded from macro 'do_div' (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ As interval cannot be negative because sample_period >= sample_runtime, making interval u64 on osnoise_main() is enough to fix this problem. Link: https://lkml.kernel.org/r/4ae1e7780563598563de079a3ef6d4d10b5f5546.1624872608.git.bristot@redhat.com Fixes: bce29ac9ce0b ("trace: Add osnoise tracer") Reported-by: kernel test robot Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit f7d9f6370e006400655ff96cb148f56598492d91 Author: Daniel Bristot de Oliveira Date: Mon Jun 28 11:45:47 2021 +0200 trace/osnoise: Fix 'no previous prototype' warnings kernel test robot reported some osnoise functions with "no previous prototype." Fix these warnings by making local functions static, and by adding: void osnoise_trace_irq_entry(int id); void osnoise_trace_irq_exit(int id, const char *desc); to include/linux/trace.h. Link: https://lkml.kernel.org/r/e40d3cb4be8bde921f4b40fa6a095cf85ab807bd.1624872608.git.bristot@redhat.com Fixes: bce29ac9ce0b ("trace: Add osnoise tracer") Reported-by: kernel test robot Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit b96285e10aad234acfa0628f7e8336990f778c03 Author: Steven Rostedt (VMware) Date: Mon Jun 28 11:49:53 2021 -0400 tracing: Have osnoise_main() add a quiescent state for task rcu ftracetest triggered: INFO: rcu_tasks detected stalls on tasks: 00000000b92b832d: .. nvcsw: 1/1 holdout: 1 idle_cpu: -1/7 task:osnoise/7 state:R running task stack: 0 pid: 2133 ppid: 2 flags:0x00004000 Call Trace: ? asm_sysvec_apic_timer_interrupt+0x12/0x20 ? asm_sysvec_apic_timer_interrupt+0x12/0x20 ? trace_hardirqs_on+0x2b/0xe0 ? asm_sysvec_apic_timer_interrupt+0x12/0x20 ? trace_clock_local+0xc/0x20 ? osnoise_main+0x10e/0x450 ? trace_softirq_entry_callback+0x50/0x50 ? kthread+0x153/0x170 ? __kthread_bind_mask+0x60/0x60 ? ret_from_fork+0x22/0x30 While running osnoise tracer with other tracers that rely on synchronize_rcu_tasks(), where that just hung. The reason is that osnoise_main() never schedules out if the interval is less than 1, and this will cause synchronize_rcu_tasks() to never return. Link: https://lkml.kernel.org/r/20210628114953.6dc06a91@oasis.local.home Fixes: bce29ac9ce0bb ("trace: Add osnoise tracer") Acked-by: Paul E. McKenney Reviewed-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 69609a91ac1d82f9c958a762614edfe0ac8498e3 Merge: c10383b3fb102 1bee1ecf232cd Author: Linus Torvalds Date: Mon Jun 28 11:10:20 2021 -0700 Merge tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The biggest single thing in the diffstat here is a massive overhaul of the PXA2xx driver from Andy Shevchenko (the IP is still in use on modern Intel systems), though we also have quite a lot of core work as well: - Better support for mixing native and GPIO chip selects also from Andy. - Support for devices with multiple chip selects from Sebastian Reichel. - Helper for polling status registers in spi-mem from Patrice Chotard. - Support for Renesas RZ/N1 and Rockchip RV1126" * tag 'spi-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (86 commits) spi: core: add dma_map_dev for dma device spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML spi: Fix self assignment issue with ancillary->mode spi: spi-sh-msiof: : use proper DMAENGINE API for termination spi: spi-rspi: : use proper DMAENGINE API for termination spi: spi-rockchip: add description for rv1126 spi: rockchip: Support SPI_CS_HIGH spi: rockchip: Support cs-gpio spi: rockchip: Wait for STB status in slave mode tx_xfer spi: rockchip: Set rx_fifo interrupt waterline base on transfer item spi: rockchip: add compatible string for rv1126 spi: spi-sun6i: Fix chipselect/clock bug spi: dt-bindings: support devices with multiple chipselects spi: add ancillary device support spi: xilinx: convert to yaml spi: convert Cadence SPI bindings to YAML spi: stm32-qspi: Remove unused qspi field of struct stm32_qspi_flash spi: add of_device_uevent_modalias support spi: meson-spicc: fix memory leak in meson_spicc_probe spi: meson-spicc: fix a wrong goto jump for avoiding memory leak. ... commit c10383b3fb10286dfeac7754ca964ec992f6fe78 Merge: 52f8cf8b0b540 7fb593cbd88cf Author: Linus Torvalds Date: Mon Jun 28 11:06:10 2021 -0700 Merge tag 'regulator-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "The main core change this release is generic support for handling of hardware errors from Matti Vaittinen, including some small updates to the reboot and thermal code so we can share support for powering off the system if things are going wrong enough. Otherwise this release we've mainly seen the addition of new drivers, including MT6359 which has pulled in some small changes from the MFD tree for build dependencies. - Support for controlling the trigger points for hardware error detection, and shared handlers for this. - Support for Maxim MAX8993, Mediatek MT6359 and MT6359P, Qualcomm PM8226 and SA8115P-ADP, and Sylergy TCS4526" * tag 'regulator-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (91 commits) regulator: bd9576: Fix uninitializes variable may_have_irqs regulator: max8893: Select REGMAP_I2C to fix build error regulator: da9052: Ensure enough delay time for .set_voltage_time_sel regulator: mt6358: Fix vdram2 .vsel_mask regulator: hi6421v600: Fix setting wrong driver_data MAINTAINERS: Add reviewer for regulator irq_helpers regulator: bd9576: Fix the driver name in id table regulator: bd9576: Support error reporting regulator: bd9576 add FET ON-resistance for OCW regulator: add property parsing and callbacks to set protection limits regulator: IRQ based event/error notification helpers regulator: move rdev_print helpers to internal.h regulator: add warning flags thermal: Use generic HW-protection shutdown API reboot: Add hardware protection power-off regulator: Add protection limit properties regulator: hi6421v600: Fix setting idle mode regulator: Add MAX8893 bindings regulator: max8893: add regulator driver regulator: hi6421: Use correct variable type for regmap api val argument ... commit 52f8cf8b0b540a8e4ebba52fe5ee3f57c2682f92 Merge: ef60eb0eb6e0a d17032f2befac Author: Linus Torvalds Date: Mon Jun 28 11:02:06 2021 -0700 Merge tag 'regmap-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "The big thing this release is support for accessing the register maps of MDIO devices via the framework. We've also added support for 7/17 register formats on bytestream transports and inverted status registers in regmap-irq" * tag 'regmap-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: mdio: Reject invalid addresses regmap: mdio: Fix regmap_bus pointer constness regmap: mdio: Add clause-45 support regmap: mdio: Clean up invalid clause-22 addresses regmap-irq: Introduce inverted status registers support regmap: add support for 7/17 register formating regmap: mdio: Don't modify output if error happened regmap: Add MDIO bus support regmap-i2c: Set regmap max raw r/w from quirks commit ef60eb0eb6e0aaf0aae302cb6362a81b2491e997 Merge: 43bd8a67cd10e 98b5ce4c08ca8 Author: Linus Torvalds Date: Mon Jun 28 10:44:54 2021 -0700 Merge tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC and MEMSTICK updates from Ulf Hansson: "MMC core: - Add support for Cache Ctrl for SD cards - Add support for Power Off Notification for SD cards - Add support for read/write of the SD function extension registers - Allow broken eMMC HS400 mode to be disabled via DT - Allow UHS-I voltage switch for SDSC cards if supported - Disable command queueing in the ioctl path - Enable eMMC sleep commands to use HW busy polling to minimize delay - Extend re-use of the common polling loop to standardize behaviour - Take into account MMC_CAP_NEED_RSP_BUSY for eMMC HPI commands MMC host: - jz4740: Add support for the JZ4775 variant - sdhci-acpi: Disable write protect detection on Toshiba Encore 2 WT8-B - sdhci-esdhc-imx: Advertise HS400 support through MMC caps - sdhci-esdhc-imx: Enable support for system wakeup for SDIO - sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211 - vub3000: Fix control-request direction MEMSTICK: - A couple of fixes/cleanups" * tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (54 commits) mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211 dt-bindings: mmc: sdhci-iproc: Add brcm,bcm7211a0-sdhci mmc: JZ4740: Add support for JZ4775 dt-bindings: mmc: JZ4740: Add bindings for JZ4775 mmc: sdhci-esdhc-imx: Enable support for system wakeup for SDIO mmc: Improve function name when aborting a tuning cmd mmc: sdhci-of-aspeed: Turn down a phase correction warning mmc: debugfs: add description for module parameter mmc: via-sdmmc: add a check against NULL pointer dereference mmc: sdhci-sprd: use sdhci_sprd_writew mmc: sdhci-esdhc-imx: remove unused is_imx6q_usdhc mmc: core: Allow UHS-I voltage switch for SDSC cards if supported mmc: mmc_spi: Imply container_of() to be no-op mmc: mmc_spi: Drop duplicate 'mmc_spi' in the debug messages mmc: dw_mmc-pltfm: Remove unused mmc: sdhci-of-aspeed: Configure the SDHCIs as specified by the devicetree. mmc: core: Add a missing SPDX license header mmc: vub3000: fix control-request direction mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding mmc: sdhci_am654: Use pm_runtime_resume_and_get() to replace open coding ... commit 43bd8a67cd10e9526656e2bc160e52920bd9e43c Merge: 66d9282523b32 1af11d098db18 Author: Linus Torvalds Date: Mon Jun 28 10:39:46 2021 -0700 Merge tag 'for-5.14/libata-2021-06-27' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "The big change in this round is that we're finally in a position where we can sanely remove the old drivers/ide/ code, as libata covers everything we need by now. This is exciting for two reasons: 1) we delete a lot of legacy code that doesn't really meet the standards we have today, and 2) it enables us to clean up various bits in the block layer that exist only because of the old IDE code. Outside of that, just a few minor fixes here, fixups for warnings, etc" * tag 'for-5.14/libata-2021-06-27' of git://git.kernel.dk/linux-block: (29 commits) ata: rb532_cf: remove redundant codes ide: remove the legacy ide driver m68k: use libata instead of the legacy ide driver ARM: disable CONFIG_IDE in pxa_defconfig ARM: disable CONFIG_IDE in footbridge_defconfig alpha: use libata instead of the legacy ide driver pata_cypress: add a module option to disable BM-DMA ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht' ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in ' ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht' ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht' ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht' ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht' ata: sata_mv: Do not over-write initialise fields in 'mv6_sht' ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht' ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT() ata: include: libata: Move fields commonly over-written to separate MACRO ahci: Add support for Dell S140 and later controllers ata: ahci_sunxi: Disable DIPM ... commit 66d9282523b3228183b14d9f812872dd2620704d Author: Mel Gorman Date: Mon Jun 28 16:02:19 2021 +0100 mm/page_alloc: Correct return value of populated elements if bulk array is populated Dave Jones reported the following This made it into 5.13 final, and completely breaks NFSD for me (Serving tcp v3 mounts). Existing mounts on clients hang, as do new mounts from new clients. Rebooting the server back to rc7 everything recovers. The commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") returns the wrong value if the array is already populated which is interpreted as an allocation failure. Dave reported this fixes his problem and it also passed a test running dbench over NFS. Fixes: b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") Reported-and-tested-by: Dave Jones Signed-off-by: Mel Gorman Cc: [5.13+] Signed-off-by: Linus Torvalds commit 1988e0d84161dabd99d1c27033fbd6ee439bf432 Author: Linus Walleij Date: Fri Jun 4 01:18:30 2021 +0200 drm/panel: nt35510: Do not fail if DSI read fails Failing to read the MTP over DSI should not bring down the system and make us bail out from using the display, it turns out that this happens when toggling the display off and on, and that write is often still working so the display output is just fine. Printing an error is enough. Tested by killing the Gnome session repeatedly on the Samsung Skomer. Fixes: 899f24ed8d3a ("drm/panel: Add driver for Novatek NT35510-based panels") Cc: Stephan Gerhold Reported-by: newbyte@disroot.org Acked-by: Stefan Hansson Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210603231830.3200040-1-linus.walleij@linaro.org commit 6549c46af8551b346bcc0b9043f93848319acd5c Author: Axel Lin Date: Sun Jun 27 16:04:18 2021 +0800 regulator: rt5033: Fix n_voltages settings for BUCK and LDO For linear regulators, the n_voltages should be (max - min) / step + 1. Buck voltage from 1v to 3V, per step 100mV, and vout mask is 0x1f. If value is from 20 to 31, the voltage will all be fixed to 3V. And LDO also, just vout range is different from 1.2v to 3v, step is the same. If value is from 18 to 31, the voltage will also be fixed to 3v. Signed-off-by: Axel Lin Reviewed-by: ChiYuan Huang Link: https://lore.kernel.org/r/20210627080418.1718127-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2b6a761be079f9fa8abf3157b5679a6f38885db4 Author: ChiYuan Huang Date: Sat Jun 26 23:58:32 2021 +0800 regulator: rtmv20: Fix wrong mask for strobe-polarity-high Fix wrong mask for strobe-polarity-high. Signed-off-by: ChiYuan Huang In-reply-to: Reviewed-by: Axel Lin Link: https://lore.kernel.org/r/1624723112-26653-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit d4de9aa58be728025436b0fb2176295abec02635 Merge: e588332271b9c 33c8516841ea4 Author: Mark Brown Date: Mon Jun 28 17:47:52 2021 +0100 Merge series "ASoC: Intel: machine driver corrections" from Pierre-Louis Bossart : The first fix solves an underflow in SoundWire platforms using the max98373 amplifier, the rest of the patches are minor corrections in machine drivers. The fix should be queued for the 5.14 cycle, the rest should be harmless but can be deferred for 5.15 if it's too late already. Brent Lu (2): ASoC: SOF: add a helper to get topology configured bclk ASoC: Intel: sof_cs42l42: use helper function to get bclk frequency Gongjun Song (1): ASoC: Intel: soc-acpi: add support for SoundWire of TGL-H-RVP Rander Wang (1): ASoC: Intel: boards: fix xrun issue on platform with max98373 include/sound/sof.h | 1 + sound/soc/intel/boards/sof_cs42l42.c | 8 +- sound/soc/intel/boards/sof_sdw_max98373.c | 81 ++++++++++++------- .../intel/common/soc-acpi-intel-tgl-match.c | 15 ++++ sound/soc/sof/sof-audio.c | 42 ++++++++-- 5 files changed, 111 insertions(+), 36 deletions(-) -- 2.25.1 commit e588332271b9cde6252dac8973b77e580cd639bd Author: Charles Keepax Date: Sat Jun 26 16:59:40 2021 +0100 ASoC: wm_adsp: Add CCM_CORE_RESET to Halo start core When starting the Halo core it is advised to also write the core reset bit, this ensures the part starts up in the appropriate state. Omitting this doesn't cause issues on most parts but cs40l25 requires it and it is advised on all Halo parts. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210626155941.12251-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit dd6fb8ff2210f74b056bf9234d0605e8c26a8ac0 Author: Charles Keepax Date: Sat Jun 26 16:59:39 2021 +0100 ASoC: wm_adsp: Correct wm_coeff_tlv_get handling When wm_coeff_tlv_get was updated it was accidentally switch to the _raw version of the helper causing it to ignore the current DSP state it should be checking. Switch the code back to the correct helper so that users can't read the controls when they arn't available. Fixes: 73ecf1a673d3 ("ASoC: wm_adsp: Correct cache handling of new kernel control API") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210626155941.12251-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 0c4f8fd3ed9cb27228497f0ae495ea6cef7017b1 Author: Peter Robinson Date: Sun Jun 27 11:59:55 2021 +0100 ASoC: remove zte zx dangling kconfig In commit dc98f1d we removed the zte zx sound drivers but there was a dangling Kconfig left around for the codec so fix this. Fixes: dc98f1d655ca ("ASoC: remove zte zx drivers") Signed-off-by: Peter Robinson Cc: Arnd Bergmann Cc: Mark Brown Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210627105955.3410015-1-pbrobinson@gmail.com Signed-off-by: Mark Brown commit 8b0ed8443ae6458786580d36b7d5f8125535c5d4 Author: Muchun Song Date: Fri Apr 2 17:11:45 2021 +0800 writeback: fix obtain a reference to a freeing memcg css The caller of wb_get_create() should pin the memcg, because wb_get_create() relies on this guarantee. The rcu read lock only can guarantee that the memcg css returned by css_from_id() cannot be released, but the reference of the memcg can be zero. rcu_read_lock() memcg_css = css_from_id() wb_get_create(memcg_css) cgwb_create(memcg_css) // css_get can change the ref counter from 0 back to 1 css_get(memcg_css) rcu_read_unlock() Fix it by holding a reference to the css before calling wb_get_create(). This is not a problem I encountered in the real world. Just the result of a code review. Fixes: 682aa8e1a6a1 ("writeback: implement unlocked_inode_to_wb transaction and use it for stat updates") Link: https://lore.kernel.org/r/20210402091145.80635-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Michal Hocko Acked-by: Tejun Heo Signed-off-by: Jan Kara commit bf1c5bc21b879bcddc8cf0fe0e1c3110fc8d25d6 Author: Chao Yu Date: Sun Jun 27 21:29:18 2021 +0800 MAINTAINERS: f2fs: update my email address Old email address will be invalid after a few days, update it to kernel.org one. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 132e3209789c647e37dc398ef36af4de13f104b4 Author: Jaegeuk Kim Date: Tue Jun 22 12:56:44 2021 -0700 f2fs: remove false alarm on iget failure during GC This patch removes setting SBI_NEED_FSCK when GC gets an error on f2fs_iget, since f2fs_iget can give ENOMEM and others by race condition. If we set this critical fsck flag, we'll get EIO during fsync via the below code path. In f2fs_inplace_write_data(), if (is_sbi_flag_set(sbi, SBI_NEED_FSCK) || f2fs_cp_error(sbi)) { err = -EIO; goto drop_bio; } Fixes: 9557727876674 ("f2fs: drop inplace IO if fs status is abnormal") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4215d054aea002ab36290504b1d8bb98df43d3eb Author: Daeho Jeong Date: Tue Jun 15 15:39:04 2021 -0700 f2fs: enable extent cache for compression files in read-only Let's allow extent cache for RO partition. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 33c8516841ea4fa12fdb8961711bf95095c607ee Author: Rander Wang Date: Fri Jun 25 15:50:39 2021 -0500 ASoC: Intel: boards: fix xrun issue on platform with max98373 On TGL platform with max98373 codec the trigger start sequence is fe first, then codec component and sdw link is the last. Recently a delay was introduced in max98373 codec driver and this resulted to the start of sdw stream transmission was delayed and the data transmitted by fw can't be consumed by sdw controller, so xrun happened. Adding delay in trigger function is a bad idea. This patch enable spk pin in prepare function and disable it in hw_free to avoid xrun issue caused by delay in trigger. Fixes: 3a27875e91fb ("ASoC: max98373: Added 30ms turn on/off time delay") BugLink: https://github.com/thesofproject/sof/issues/4066 Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210625205042.65181-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0dd1b7fc3e7d30802d5839f6bf8957023b437ad4 Author: Jason Gunthorpe Date: Fri Jun 25 12:56:04 2021 -0300 vfio/mtty: Delete mdev_devices_list Dan points out that an error case left things on this list. It is also missing locking in available_instances_show(). Further study shows the list isn't needed at all, just store the total ports in use in an atomic and delete the whole thing. Reported-by: Dan Carpenter Fixes: 09177ac91921 ("vfio/mtty: Convert to use vfio_register_group_dev()") Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-0bc56b362ca7+62-mtty_used_ports_jgg@nvidia.com Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit ccff81e1d028bbbf8573d3364a87542386c707bf Author: Rustam Kovhaev Date: Sat Jun 26 11:11:56 2021 -0700 bpf: Fix false positive kmemleak report in bpf_ringbuf_area_alloc() kmemleak scans struct page, but it does not scan the page content. If we allocate some memory with kmalloc(), then allocate page with alloc_page(), and if we put kmalloc pointer somewhere inside that page, kmemleak will report kmalloc pointer as a false positive. We can instruct kmemleak to scan the memory area by calling kmemleak_alloc() and kmemleak_free(), but part of struct bpf_ringbuf is mmaped to user space, and if struct bpf_ringbuf changes we would have to revisit and review size argument in kmemleak_alloc(), because we do not want kmemleak to scan the user space memory. Let's simplify things and use kmemleak_not_leak() here. For posterity, also adding additional prior analysis from Andrii: I think either kmemleak or syzbot are misreporting this. I've added a bunch of printks around all allocations performed by BPF ringbuf. [...] On repro side I get these two warnings: [vmuser@archvm bpf]$ sudo ./repro BUG: memory leak unreferenced object 0xffff88810d538c00 (size 64): comm "repro", pid 2140, jiffies 4294692933 (age 14.540s) hex dump (first 32 bytes): 00 af 19 04 00 ea ff ff c0 ae 19 04 00 ea ff ff ................ 80 ae 19 04 00 ea ff ff c0 29 2e 04 00 ea ff ff .........)...... backtrace: [<0000000077bfbfbd>] __bpf_map_area_alloc+0x31/0xc0 [<00000000587fa522>] ringbuf_map_alloc.cold.4+0x48/0x218 [<0000000044d49e96>] __do_sys_bpf+0x359/0x1d90 [<00000000f601d565>] do_syscall_64+0x2d/0x40 [<0000000043d3112a>] entry_SYSCALL_64_after_hwframe+0x44/0xae BUG: memory leak unreferenced object 0xffff88810d538c80 (size 64): comm "repro", pid 2143, jiffies 4294699025 (age 8.448s) hex dump (first 32 bytes): 80 aa 19 04 00 ea ff ff 00 ab 19 04 00 ea ff ff ................ c0 ab 19 04 00 ea ff ff 80 44 28 04 00 ea ff ff .........D(..... backtrace: [<0000000077bfbfbd>] __bpf_map_area_alloc+0x31/0xc0 [<00000000587fa522>] ringbuf_map_alloc.cold.4+0x48/0x218 [<0000000044d49e96>] __do_sys_bpf+0x359/0x1d90 [<00000000f601d565>] do_syscall_64+0x2d/0x40 [<0000000043d3112a>] entry_SYSCALL_64_after_hwframe+0x44/0xae Note that both reported leaks (ffff88810d538c80 and ffff88810d538c00) correspond to pages array bpf_ringbuf is allocating and tracking properly internally. Note also that syzbot repro doesn't close FD of created BPF ringbufs, and even when ./repro itself exits with error, there are still two forked processes hanging around in my system. So clearly ringbuf maps are alive at that point. So reporting any memory leak looks weird at that point, because that memory is being used by active referenced BPF ringbuf. It's also a question why repro doesn't clean up its forks. But if I do a `pkill repro`, I do see that all the allocated memory is /properly/ cleaned up [and the] "leaks" are deallocated properly. BTW, if I add close() right after bpf() syscall in syzbot repro, I see that everything is immediately deallocated, like designed. And no memory leak is reported. So I don't think the problem is anywhere in bpf_ringbuf code, rather in the leak detection and/or repro itself. Reported-by: syzbot+5d895828587f49e7fe9b@syzkaller.appspotmail.com Signed-off-by: Rustam Kovhaev [ Daniel: also included analysis from Andrii to the commit log ] Signed-off-by: Daniel Borkmann Tested-by: syzbot+5d895828587f49e7fe9b@syzkaller.appspotmail.com Cc: Dmitry Vyukov Cc: Andrii Nakryiko Link: https://lore.kernel.org/bpf/CAEf4BzYk+dqs+jwu6VKXP-RttcTEGFe+ySTGWT9CRNkagDiJVA@mail.gmail.com Link: https://lore.kernel.org/lkml/YNTAqiE7CWJhOK2M@nuc10 Link: https://lore.kernel.org/lkml/20210615101515.GC26027@arm.com Link: https://syzkaller.appspot.com/bug?extid=5d895828587f49e7fe9b Link: https://lore.kernel.org/bpf/20210626181156.1873604-1-rkovhaev@gmail.com commit 95b861a7935bf75f647959073093ab8058b88c26 Author: Namhyung Kim Date: Sun Jun 27 08:36:27 2021 -0700 bpf: Allow bpf_get_current_ancestor_cgroup_id for tracing Allow the helper to be called from tracing programs. This is needed to handle cgroup hiererachies in the program. Signed-off-by: Namhyung Kim Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210627153627.824198-1-namhyung@kernel.org commit 1c35b07e6d3986474e5635be566e7bc79d97c64d Author: Odin Ugedal Date: Thu Jun 24 13:18:15 2021 +0200 sched/fair: Ensure _sum and _avg values stay consistent The _sum and _avg values are in general sync together with the PELT divider. They are however not always completely in perfect sync, resulting in situations where _sum gets to zero while _avg stays positive. Such situations are undesirable. This comes from the fact that PELT will increase period_contrib, also increasing the PELT divider, without updating _sum and _avg values to stay in perfect sync where (_sum == _avg * divider). However, such PELT change will never lower _sum, making it impossible to end up in a situation where _sum is zero and _avg is not. Therefore, we need to ensure that when subtracting load outside PELT, that when _sum is zero, _avg is also set to zero. This occurs when (_sum < _avg * divider), and the subtracted (_avg * divider) is bigger or equal to the current _sum, while the subtracted _avg is smaller than the current _avg. Reported-by: Sachin Sant Reported-by: Naresh Kamboju Signed-off-by: Odin Ugedal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Tested-by: Sachin Sant Link: https://lore.kernel.org/r/20210624111815.57937-1-odin@uged.al commit 5483b904bf336948826594610af4c9bbb0d9e3aa Author: Zhang Xiaoxu Date: Sat Jun 26 15:50:42 2021 +0800 SUNRPC: Should wake up the privileged task firstly. When find a task from wait queue to wake up, a non-privileged task may be found out, rather than the privileged. This maybe lead a deadlock same as commit dfe1fe75e00e ("NFSv4: Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode()"): Privileged delegreturn task is queued to privileged list because all the slots are assigned. If there has no enough slot to wake up the non-privileged batch tasks(session less than 8 slot), then the privileged delegreturn task maybe lost waked up because the found out task can't get slot since the session is on draining. So we should treate the privileged task as the emergency task, and execute it as for as we can. Reported-by: Hulk Robot Fixes: 5fcdfacc01f3 ("NFSv4: Return delegations synchronously in evict_inode") Cc: stable@vger.kernel.org Signed-off-by: Zhang Xiaoxu Signed-off-by: Trond Myklebust commit fcb170a9d825d7db4a3fb870b0300f5a40a8d096 Author: Zhang Xiaoxu Date: Sat Jun 26 15:50:41 2021 +0800 SUNRPC: Fix the batch tasks count wraparound. The 'queue->nr' will wraparound from 0 to 255 when only current priority queue has tasks. This maybe lead a deadlock same as commit dfe1fe75e00e ("NFSv4: Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode()"): Privileged delegreturn task is queued to privileged list because all the slots are assigned. When non-privileged task complete and release the slot, a non-privileged maybe picked out. It maybe allocate slot failed when the session on draining. If the 'queue->nr' has wraparound to 255, and no enough slot to service it, then the privileged delegreturn will lost to wake up. So we should avoid the wraparound on 'queue->nr'. Reported-by: Hulk Robot Fixes: 5fcdfacc01f3 ("NFSv4: Return delegations synchronously in evict_inode") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Zhang Xiaoxu Signed-off-by: Trond Myklebust commit b42ad64f5f216db05310783cbded56176c3a09df Author: Dave Wysochanski Date: Thu Jun 24 11:34:18 2021 -0400 NFS: Remove unnecessary inode parameter from nfs_pageio_complete_read() Simplify nfs_pageio_complete_read() by using the inode pointer saved inside nfs_pageio_descriptor. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust commit eae00c5d6e48ccb2d78ae5873743d7d1a572951b Author: Scott Mayhew Date: Tue Jun 22 08:11:59 2021 -0400 nfs: update has_sec_mnt_opts after cloning lsm options from parent After calling security_sb_clone_mnt_opts() in nfs_get_root(), it's necessary to copy the value of has_sec_mnt_opts from the cloned super_block's nfs_server. Otherwise, calls to nfs_compare_super() using this super_block may not return the correct result, leading to mount failures. For example, mounting an nfs server with the following in /etc/exports: /export *(rw,insecure,crossmnt,no_root_squash,security_label) and having /export/scratch on a separate block device. mount -o v4.2,context=system_u:object_r:root_t:s0 server:/export/test /mnt/test mount -o v4.2,context=system_u:object_r:swapfile_t:s0 server:/export/scratch /mnt/scratch The second mount would fail with "mount.nfs: /mnt/scratch is busy or already mounted or sharecache fail" and "SELinux: mount invalid. Same superblock, different security settings for..." would appear in the syslog. Also while we're in there, replace several instances of "NFS_SB(s)" with "server", which was already declared at the top of the nfs_get_root(). Fixes: ec1ade6a0448 ("nfs: account for selinux security context when deciding to share superblock") Signed-off-by: Scott Mayhew Signed-off-by: Trond Myklebust commit 61c6f04a988e420a1fc5e8e81cf9aebf142a7bd6 Author: Marek Szyprowski Date: Fri Apr 23 22:44:57 2021 +0200 media: s5p-mfc: Fix display delay control creation v4l2_ctrl_new_std() fails if the caller provides no 'step' parameter for integer control, so define it to fix following error: s5p_mfc_dec_ctrls_setup:1166: Adding control (1) failed Fixes: c3042bff918a ("media: s5p-mfc: Use display delay and display enable std controls") Signed-off-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11420749c6b4b237361750de3d5b5579175f8622 Author: Dafna Hirschfeld Date: Fri Apr 23 19:27:45 2021 +0200 media: mtk-vpu: on suspend, read/write regs only if vpu is running If the vpu is not running, we should not rely on VPU_IDLE_REG value. In this case, the suspend cb should only unprepare the clock. This fixes a system-wide suspend to ram failure: [ 273.073363] PM: suspend entry (deep) [ 273.410502] mtk-msdc 11230000.mmc: phase: [map:ffffffff] [maxlen:32] [final:10] [ 273.455926] Filesystems sync: 0.378 seconds [ 273.589707] Freezing user space processes ... (elapsed 0.003 seconds) done. [ 273.600104] OOM killer disabled. [ 273.603409] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 273.613361] mwifiex_sdio mmc2:0001:1: None of the WOWLAN triggers enabled [ 274.784952] mtk_vpu 10020000.vpu: vpu idle timeout [ 274.789764] PM: dpm_run_callback(): platform_pm_suspend+0x0/0x70 returns -5 [ 274.796740] mtk_vpu 10020000.vpu: PM: failed to suspend: error -5 [ 274.802842] PM: Some devices failed to suspend, or early wake event detected [ 275.426489] OOM killer enabled. [ 275.429718] Restarting tasks ... [ 275.435765] done. [ 275.447510] PM: suspend exit Fixes: 1f565e263c3e ("media: mtk-vpu: VPU should be in idle state before system is suspended") Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 95778c2d0979618e3349b1d2324ec282a5a6adbf Author: Philipp Zabel Date: Mon Mar 22 15:44:08 2021 +0100 media: video-mux: Skip dangling endpoints i.MX6 device tree include files contain dangling endpoints for the board device tree writers' convenience. These are still included in many existing device trees. Treat dangling endpoints as non-existent to support them. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Fixes: 612b385efb1e ("media: video-mux: Create media links in bound notifier") Signed-off-by: Mauro Carvalho Chehab commit 328aac5ecd119ede3633f7d17969b1ff34ccc784 Author: Ravi Bangoria Date: Tue Jun 22 16:30:26 2021 +0530 bpf, x86: Fix extable offset calculation Commit 4c5de127598e1 ("bpf: Emit explicit NULL pointer checks for PROBE_LDX instructions.") is emitting a couple of instructions before the actual load. Consider those additional instructions while calculating extable offset. Fixes: 4c5de127598e1 ("bpf: Emit explicit NULL pointer checks for PROBE_LDX instructions.") Signed-off-by: Ravi Bangoria Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210622110026.1157847-1-ravi.bangoria@linux.ibm.com commit 839a534f1e853f1aec100d06040c0037b89c2dc3 Author: Chen Li Date: Wed Jun 9 11:48:55 2021 +0800 exfat: avoid incorrectly releasing for root inode In d_make_root, when we fail to allocate dentry for root inode, we will iput root inode and returned value is NULL in this function. So we do not need to release this inode again at d_make_root's caller. Signed-off-by: Chen Li Signed-off-by: Namjae Jeon commit 0fdec1b3c9fbb5e856a40db5993c9eaf91c74a83 Author: Mike Marshall Date: Tue May 18 08:09:13 2021 -0400 orangefs: fix orangefs df output. Orangefs df output is whacky. Walt Ligon suggested this might fix it. It seems way more in line with reality now... Signed-off-by: Mike Marshall commit 24523e45b44f9fff9662cd5d1423d5c2291ef131 Author: Mike Marshall Date: Tue May 18 08:07:21 2021 -0400 orangefs: readahead adjustment Matthew Wilcox suggested that perhaps it could be "possible for rac->file to be NULL if the caller doesn't have a struct file"... Signed-off-by: Mike Marshall commit 5d49d3508b3c67201bd3e1bf7f4ef049111b7051 Author: Andreas Gruenbacher Date: Mon Jun 28 19:14:50 2021 +0800 gfs2: Fix error handling in init_statfs On an error path, init_statfs calls iput(pn) after pn has already been put. Fix that by setting pn to NULL after the initial iput. Fixes: 97fd734ba17e ("gfs2: lookup local statfs inodes prior to journal recovery") Cc: stable@vger.kernel.org # v5.10+ Reported-by: Jing Xiangfeng Signed-off-by: Andreas Gruenbacher commit d3c51c55cb9274dd43c156f1f26b5eb4d5f2d58c Author: Andreas Gruenbacher Date: Mon Jun 21 22:28:50 2021 +0200 gfs2: Fix underflow in gfs2_page_mkwrite On filesystems with a block size smaller than PAGE_SIZE and non-empty files smaller then PAGE_SIZE, gfs2_page_mkwrite could end up allocating excess blocks beyond the end of the file, similar to fallocate. This doesn't make sense; fix it. Reported-by: Bob Peterson Fixes: 184b4e60853d ("gfs2: Fix end-of-file handling in gfs2_page_mkwrite") Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Andreas Gruenbacher commit 38a618dbf47f837f11df01052977dcaf31c5c2a8 Author: Baokun Li Date: Tue Jun 8 11:12:44 2021 +0800 gfs2: Use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Andreas Gruenbacher commit 0f1616f6df294fe460432630850c0e0a8c30a192 Author: Andreas Gruenbacher Date: Thu May 20 14:52:46 2021 +0200 gfs2: Fix do_gfs2_set_flags description Commit 88b631cbfbeb ("gfs2: convert to fileattr") changed the argument list without updating the description. Signed-off-by: Andreas Gruenbacher commit c90c4c6574f3feaf2203b5671db1907a1e15c653 Author: Thomas Hellström Date: Thu Jun 24 13:29:14 2021 +0200 drm/i915: Reinstate the mmap ioctl for some platforms Reinstate the mmap ioctl for all current integrated platforms. The intention was really to have it disabled for discrete graphics where we enforce a single mmap mode. This was reported to break ADL-P with the media stack, which was not the intention. Although longer term we do still plan to sunset this ioctl even for integrated, in favour of using mmap_offset instead. Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+") Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Acked-by: Daniel Vetter Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210624112914.311984-1-thomas.hellstrom@linux.intel.com (cherry picked from commit d3f3baa3562a5d09f3e87f5fdf84952112807753) Signed-off-by: Rodrigo Vivi commit a1934772719333afc47d776049b65231c2704317 Author: Jani Nikula Date: Thu Jun 10 12:05:28 2021 +0300 drm/i915/dsc: abstract helpers to get bigjoiner primary/secondary crtc Add a single point of truth for figuring out the primary/secondary crtc for bigjoiner instead of duplicating the magic pipe +/- 1 in multiple places. Also fix the pipe validity checks to properly take non-contiguous pipes into account. The current checks may theoretically overflow i915->pipe_to_crtc_mapping[pipe], albeit with a warning, due to fused off pipes, as INTEL_NUM_PIPES() returns the actual number of pipes on the platform, and the check is for INTEL_NUM_PIPES() == pipe + 1. Prefer primary/secondary terminology going forward. v2: - Improved abstractions for pipe validity etc. Fixes: 8a029c113b17 ("drm/i915/dp: Modify VDSC helpers to configure DSC for Bigjoiner slave") Fixes: d961eb20adb6 ("drm/i915/bigjoiner: atomic commit changes for uncompressed joiner") Cc: Animesh Manna Cc: Manasi Navare Cc: Vandita Kulkarni Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210610090528.20511-1-jani.nikula@intel.com (cherry picked from commit 17203224f0536cf223dc5789028d04a768d96ec3) Signed-off-by: Rodrigo Vivi commit 0ca7acd847665f4554ef133c532b3bd855b7bb7f Author: Uwe Kleine-König Date: Sat May 1 18:01:39 2021 +0200 pwm: tiecap: Implement .apply() callback To eventually get rid of all legacy drivers convert this driver to the modern world implementing .apply(). This just pushes down a slightly optimized variant of how legacy drivers are handled in the core. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ec67fba92ebf6249b8155613063e403c695696c6 Author: Uwe Kleine-König Date: Thu Apr 29 15:32:18 2021 +0200 pwm: tiecap: Drop .free() callback ecap_pwm_free is only called when a consumer releases the PWM (using pwm_put() or pwm_free()). The consumer is expected to disable the PWM before doing that. It's not clear if a warning about that is justified, but if it is this is independent of the actual driver and can better be done in the core. Also if there is a good reason it's wrong to disable the hardware and so the call to pm_runtime_put_sync() should be dropped. Moreover there is no matching pwm_runtime_get call and so the runtime usage counter might become negative. Fixes: 8e0cb05b3b75 ("pwm: pwm-tiecap: PWM driver support for ECAP APWM") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ad5e085c63f59391f5cfbde64fbff192872dfe8f Author: Uwe Kleine-König Date: Fri Apr 23 18:59:02 2021 +0200 pwm: Drop irrelevant error path from pwmchip_remove() Since the PWM core uses device links (commit b2c200e3f2fd ("pwm: Add consumer device link")) each consumer driver that requested the PWMs is already gone. If they called pwm_put() (as they should) the PWMF_REQUESTED bit is not set. If they failed (which is a bug) the PWMF_REQUESTED bit might still be set, but the driver that cared is gone, so nothing bad happens if the PWM chip goes away even if the PWMF_REQUESTED is still present. So the check can be dropped. With this change pwmchip_remove() returns always 0, so lowlevel drivers don't need to check the return code any more. Once all drivers dropped this check this function can be changed to return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 66a03c4fd9e95e192c574811a1f4ea8f62992358 Author: Uwe Kleine-König Date: Tue May 25 22:31:56 2021 +0200 pwm: crc: Simplify using devm_pwmchip_add() With devm_pwmchip_add() we can drop pwmchip_remove() from the device remove callback. The latter can then go away, too and as this is the only user of platform_get_drvdata(), the respective call to platform_set_drvdata() can go, too. Signed-off-by: Uwe Kleine-König Reviewed-by: Hans de Goede Signed-off-by: Thierry Reding commit f7edeb4023efcd6494176095560ddd34f3bab006 Author: Uwe Kleine-König Date: Tue May 25 08:35:28 2021 +0200 pwm: imx1: Simplify using devm_pwmchip_add() With devm_pwmchip_add() we can drop pwmchip_remove() from the device remove callback. The latter can then go away, too and as this is the only user of platform_get_drvdata(), the respective call to platform_set_drvdata() can go, too. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1bc6ea31cb41d50302a3c9b401964cf0a88d41f9 Author: Uwe Kleine-König Date: Tue May 25 08:35:27 2021 +0200 pwm: imx1: Don't disable clocks at device remove time The .remove() callback disables clocks that were not enabled in .probe(). So just probing and then unbinding the driver results in a clk enable imbalance. So just drop the call to disable the clocks. (Which BTW was also in the wrong order because the call makes the PWM unfunctional and so should have come only after pwmchip_remove()). Fixes: 9f4c8f9607c3 ("pwm: imx: Add ipg clock operation") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9c6a02e6d5c6b8432acf3c11667fc347c60d2e76 Author: Uwe Kleine-König Date: Sun May 23 15:34:43 2021 +0200 pwm: clps711x: Simplify using devm_pwmchip_add() With devm_pwmchip_add() we can drop pwmchip_remove() from the device remove callback. The latter can then go away, too and as this is the only user of platform_get_drvdata(), the respective call to platform_set_drvdata() can go, too. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f41227eb8fb79b2ebdd286c0febc1e6b313095ff Author: Uwe Kleine-König Date: Mon May 10 21:09:25 2021 +0200 pwm: meson: Simplify using devm_pwmchip_add() Signed-off-by: Uwe Kleine-König Acked-by: Martin Blumenstingl Signed-off-by: Thierry Reding commit d1e487b7a3c5f8144156b37d45fc7e724e752a05 Author: Uwe Kleine-König Date: Wed Apr 7 10:01:55 2021 +0200 pwm: lpss: Simplify using devm_pwmchip_add() Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit bcda91bf86c1ff7647df85029d69f2aed80f210e Author: Uwe Kleine-König Date: Wed Apr 7 10:01:54 2021 +0200 pwm: Add a device-managed function to add PWM chips This potentially simplifies low-level PWM drivers. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 0e3c1f30b03599f2ee8ff3327eca53c99564ba13 Author: Randy Dunlap Date: Sun Jun 27 17:40:44 2021 -0700 genirq/irqdesc: Drop excess kernel-doc entry @lookup Fix kernel-doc warning in irqdesc.c: ../kernel/irq/irqdesc.c:692: warning: Excess function parameter 'lookup' description in 'handle_domain_irq' Fixes: e1c054918c6c ("genirq: Move non-irqdomain handle_domain_irq() handling into ARM's handle_IRQ()") Signed-off-by: Randy Dunlap Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210628004044.9011-1-rdunlap@infradead.org commit 3d2ce675aba7e2425710e23268579a5d76c7e725 Merge: 006ae1970a8cd c51e96dace68a Author: Thomas Gleixner Date: Mon Jun 28 11:55:20 2021 +0200 Merge tag 'irqchip-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - Revamped the irqdomain internals to consistently cache irqdata - Expose a new API to simplify IRQ handling involving an irqdomain by not using the IRQ number - Convert all the irqchip drivers to this new API - Allow the Qualcomm PDC driver to be compiled as a module - Fix HiSi MBIGEN compile warning when CONFIG_ACPI isn't selected - Remove a bunch of spurious printks on error paths - The obligatory couple of DT updates commit 0e695c3f7f66c66e0a1da90cc5378198a656d494 Author: Prasanth KSR Date: Mon Jun 28 14:19:06 2021 +0530 platform/x86: dell-wmi-sysman: Change user experience when Admin/System Password is modified Whenever user has changed an Admin/System Password using the sysfs, then we are automatically copying the new password to existing password field. Co-developed-by: Divya Bharathi Signed-off-by: Divya Bharathi Signed-off-by: Prasanth KSR Link: https://lore.kernel.org/r/20210628084906.4233-1-prasanth.ksr@dell.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit caf23895ce96e90d8667328144344263ff0e7f1f Author: Dan Carpenter Date: Fri Jun 25 16:01:04 2021 +0300 platform/x86: intel_skl_int3472: Uninitialized variable in skl_int3472_handle_gpio_resources() This function returns negative error codes, zero (to indicate that everything has been completed successfully) and one (to indicate that more resources need to be handled still). This code prints an uninitialized error message when the function returns one which potentially leads to an Oops. Fixes: 5de691bffe57 ("platform/x86: Add intel_skl_int3472 driver") Signed-off-by: Dan Carpenter Reviewed-by: Daniel Scally Link: https://lore.kernel.org/r/YNXTkLNtiTDlFlZa@mwanda Signed-off-by: Hans de Goede commit 23dcd7497c227a16acdda5e44f141fdc1e660f94 Author: Hans de Goede Date: Mon Jun 28 11:36:00 2021 +0200 platform/x86: think-lmi: Move kfree(setting->possible_values) to tlmi_attr_setting_release() We must not free the possible_values string before we have called sysfs_remove_group(kobj, &tlmi_attr_group) otherwise there is a race where a sysfs read of possible_values could reference the free-ed memory. Move the kfree(setting->possible_values) together with the free of the actual tlmi_attr_setting struct to avoid this race. Signed-off-by: Hans de Goede commit 0fdf10e5fc964c315cf131a2eaab9cc531a9f40f Author: Mario Limonciello Date: Tue Jun 22 15:07:55 2021 -0500 platform/x86: think-lmi: Split current_value to reflect only the value Currently attributes will show things like: `BootOrderLock,Disable` rather than just `Disable`. Of course this works, but the attribute is intended to be read by userspace tools and not require further processing. That is a userspace tool can display a drop down of `possible_values` and `current_value` is one of them from the list. This also aligns `think-lmi` with how `dell-wmi-sysman` works. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210622200755.12379-3-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1bcad8e510b27ad843315ab2c27ccf459e3acded Author: Mario Limonciello Date: Tue Jun 22 15:07:54 2021 -0500 platform/x86: think-lmi: Fix issues with duplicate attributes On an AMD based Lenovo T14, I find that the module doesn't work at all, and instead has a traceback with messages like: ``` sysfs: cannot create duplicate filename '/devices/virtual/firmware-attributes/thinklmi/attributes/Reserved' ``` Duplicate and reserved values showing up appear to be a firmware bug, but they shouldn't make the driver explode. So catch them and skip them. Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210622200755.12379-2-mario.limonciello@amd.com [hdegoede@redhat.com: Add missing kfree(tlmi_priv.setting[i])] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d4a01902eb59e478ab7c7d36d7bb90d94a315f89 Author: Heiko Carstens Date: Mon Jun 21 22:19:28 2021 +0200 s390/dasd: use register pair instead of register asm Using register asm statements has been proven to be very error prone, especially when using code instrumentation where gcc may add function calls, which clobbers register contents in an unexpected way. Therefore get rid of register asm statement in dasd code, even though there is currently nothing wrong with it. This way we know for sure that the above mentioned bug class won't be introduced here. Reviewed-by: Stefan Haberland Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d3e2ff5436d6ee38b572ba5c01dc7994769bec54 Author: Heiko Carstens Date: Tue Jun 22 15:26:16 2021 +0200 s390/qdio: get rid of register asm Reviewed-by: Benjamin Block Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7496209a8944efd7b7feb2a0f960419c077c94d1 Author: Heiko Carstens Date: Tue Jun 22 14:50:27 2021 +0200 s390/ioasm: use symbolic names for asm operands Change remaining inline assemblies to also use symbolic names for operands, use "Q" constraint when possible, and use "+" modifier so that an operand needs to be specified only once. Acked-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b94bcca28342e676126431917f7c1e8d3f6b8b18 Author: Heiko Carstens Date: Tue Jun 22 14:43:07 2021 +0200 s390/ioasm: get rid of register asm Acked-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6d7c628be71dafa851b482c6dd90d2fa4ee3f6c4 Author: Heiko Carstens Date: Tue Jun 22 14:07:23 2021 +0200 s390/cmf: get rid of register asm Acked-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 8cf23c8e1fec64c8a1e748816f2f2926cacfb0fa Author: Heiko Carstens Date: Mon Jun 21 14:56:46 2021 +0200 s390/lib,string: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d1e18efa8fa960dc18bca493efaf6adaecb38c7d Author: Heiko Carstens Date: Mon Jun 21 13:38:45 2021 +0200 s390/lib,uaccess: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 8f45db5555e38cf67cc38e485013e40e4a23c624 Author: Heiko Carstens Date: Mon Jun 21 11:30:30 2021 +0200 s390/string: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 79ee201e26020cd950f7852a5ca12c395a3ee6e9 Author: Heiko Carstens Date: Thu Jun 17 21:18:14 2021 +0200 s390/cmpxchg: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 2bd67038f89e6400afcdbdc53ad1fde674a58195 Author: Heiko Carstens Date: Thu Jun 17 20:30:15 2021 +0200 s390/mm,pages-states: get rid of register asm There is no reason to use fixed registers for the essa instruction. Therefore remove the register asm construct. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7e86f967f4c98a6ad2a8c33c39f041e2955c05c8 Author: Heiko Carstens Date: Thu Jun 17 20:11:40 2021 +0200 s390/lib,xor: get rid of register asm Looking at the generate code this was just a micro-optimization. However given that as many register asm constructs as possible will be removed from s390 code, remove this one as well. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fcc91d5d40475a5d0ea8f6b63f6fe8a693fc2142 Author: Heiko Carstens Date: Thu Jun 17 11:32:53 2021 +0200 s390/timex: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit cf1ffce243bc5a6f173621e5fa5afca67993e2c7 Author: Heiko Carstens Date: Thu Jun 17 10:26:57 2021 +0200 s390/hypfs: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 2a18a5502648128288ed62edf02018ffc08c69d6 Author: Kees Cook Date: Wed Jun 16 13:19:02 2021 -0700 s390/zcrypt: Switch to flexible array member In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading/writing across neighboring array fields. Switch from zero-element arrays to flexible arrays so the compiler will perform appropriate bounds checking, avoiding these future warnings: In function '__fortify_memcpy', inlined from 'cca_sec2protkey' at drivers/s390/crypto/zcrypt_ccamisc.c:645:2: ./include/linux/fortify-string.h:244:4: error: call to '__write_overflow_field' declared with attribute error: detected write beyond size of field (1st parameter) In function '__fortify_memcpy', inlined from 'cca_clr2seckey' at drivers/s390/crypto/zcrypt_ccamisc.c:568:3: ./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter) In function '__fortify_memcpy', inlined from 'cca_genseckey' at drivers/s390/crypto/zcrypt_ccamisc.c:429:2: ./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210616201903.1245949-1-keescook@chromium.org Signed-off-by: Vasily Gorbik commit c74d3c182ab4a3db6c3c2a6c4b3c8b9a7f1feb1a Author: Kees Cook Date: Wed Jun 16 13:18:23 2021 -0700 s390/speculation: Use statically initialized const for instructions In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid confusing the checks when using a static const source. Move the static const array into a variable so the compiler can perform appropriate bounds checking. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210616201823.1245603-1-keescook@chromium.org Signed-off-by: Vasily Gorbik commit e5e1bdf0bca8cd16ad39ed2febf6f689d9c07586 Author: Heiko Carstens Date: Mon Jun 21 16:45:22 2021 +0200 virtio/s390: get rid of open-coded kvm hypercall do_kvm_notify() and __do_kvm_notify() are an (exact) open-coded variant of kvm_hypercall3(). Therefore simply make use of kvm_hypercall3(), and get rid of duplicated code. Signed-off-by: Heiko Carstens Reviewed-by: Cornelia Huck Reviewed-by: Christian Borntraeger Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20210621144522.1304273-1-hca@linux.ibm.com Signed-off-by: Vasily Gorbik commit c1e18c17bda68cdf2b58744b2864836de05dcf3a Author: Niklas Schnelle Date: Thu Dec 10 15:28:05 2020 +0100 s390/pci: add zpci_set_irq()/zpci_clear_irq() Pull the directed vs floating IRQ check into common zpci_set_irq()/zpci_clear_irq() functions and expose them for the rest of the zPCI subsystem. Furthermore we add a zdev flag bit to easily check if IRQs are registered. This is needed for use in resetting a zPCI function. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit e2bc3e91d91ede6710801fa0737e4e4ed729b19e Author: Nathan Chancellor Date: Thu Jun 17 12:31:40 2021 -0700 scripts/min-tool-version.sh: Raise minimum clang version to 13.0.0 for s390 clang versions prior to the current development version of 13.0.0 cannot compile s390 after commit 3abbdfde5a65 ("s390/bitops: use register pair instead of register asm") and the s390 maintainers do not intend to work around this in the kernel. Codify this in scripts/min-tool-version.sh similar to arm64 with GCC 5.1.0 so that there are no reports of broken builds. [hca@linux.ibm.com: breaking compatibility with older clang compilers is intended to finally make use of a feature which allows the compiler to allocate even/odd register pairs. This is possible since a very long time with gcc, but only since llvm-project commit d058262b1471 ("[SystemZ] Support i128 inline asm operands.") with clang. Using that feature allows to get rid of error prone register asm statements, of which the above named kernel commit is only the first of a larger not yet complete series.] Reported-by: Naresh Kamboju Signed-off-by: Nathan Chancellor Acked-by: Nick Desaulniers Acked-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210617193139.856957-1-nathan@kernel.org Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 2d0a9eb23ccfdf11308bec6db0bc007585d919d2 Author: Thomas Gleixner Date: Sat Jun 26 22:44:11 2021 +0200 time/kunit: Add missing MODULE_LICENSE() [ mingo: MODULE_LICENSE() takes a string. ] Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 66192b2e3fd8ab97ed518d6c0240e26655a20b4b Author: Kai Ye Date: Sat Jun 26 10:50:33 2021 +0800 crypto: hisilicon/sec - fix the process of disabling sva prefetching The open interface of the sva prefetching function is distinguish the chip version. But the close interface of the sva prefetching function doesn't distinguish the chip version. As a result, the sva prefetching close operation is also performed on Kunpeng920, those registers are important on Kunpeng920, which eventually leads to abnormal hardware problems. So need to fix it immediately. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit e29dd5c8382e39210a180b75b68912f536893ef0 Author: Geert Uytterhoeven Date: Fri Jun 25 15:27:24 2021 +0200 crypto: sl3516 - Add dependency on ARCH_GEMINI The Storlink SL3516 crypto engine is only present on Storlink Semiconductor/Storm Semiconductor/Cortina Systems Gemini SoCs. Hence add a dependency on ARCH_GEMINI, to prevent asking the user about this driver when configuring a kernel without Gemini support. While at it, group the dependencies. Fixes: 46c5338db7bd45b2 ("crypto: sl3516 - Add sl3516 crypto engine") Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit df941fdd779e43112323a9c057dbbdbc0b1512a2 Author: Geert Uytterhoeven Date: Fri Jun 25 15:27:23 2021 +0200 crypto: sl3516 - Typo s/Stormlink/Storlink/ According to Documentation/devicetree/bindings/arm/gemini.txt, the company was originally named "Storlink Semiconductor", and later renamed to "Storm Semiconductor". Fixes: 46c5338db7bd45b2 ("crypto: sl3516 - Add sl3516 crypto engine") Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit 8833272d876eb5320e4c7c31cc455542510dc4c3 Author: Stephan Müller Date: Thu Jun 24 17:44:35 2021 +0200 crypto: drbg - self test for HMAC(SHA-512) Considering that the HMAC(SHA-512) DRBG is the default DRBG now, a self test is to be provided. The test vector is obtained from a successful NIST ACVP test run. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu commit 6ee55a6f50fe28207d829a535effcedad37991ea Author: Herbert Xu Date: Thu Jun 24 14:35:29 2021 +0800 crypto: omap - Drop obsolete PageSlab check As it is now legal to call flush_dcache_page on slab pages we no longer need to do the check in the omap driver. This patch also uses flush_dcache_page instead of flush_kernel_dcache_page because the page we're writing to could be anything. Reported-by: Ira Weiny Signed-off-by: Herbert Xu commit b0d2193ba643ec8246e7a194e336c71018b8e6f3 Author: Herbert Xu Date: Thu Jun 24 14:32:15 2021 +0800 crypto: scatterwalk - Remove obsolete PageSlab check As it is now legal to call flush_dcache_page on slab pages we no longer need to do the check in the Crypto API. Reported-by: Ira Weiny Signed-off-by: Herbert Xu commit cd5c91fe62519af6af238bbead32f2943a85c7de Author: Colin Ian King Date: Tue Jun 22 16:16:08 2021 +0100 crypto: qat - ratelimit invalid ioctl message and print the invalid cmd Currently incorrect QAT ioctls can spam the kernel log with error messages of the form "QAT: Invalid ioctl" if a userspace program uses the wrong ioctl command. Quench the messages by ratelimiting them and also print the invalid command being used as that is useful to know. Signed-off-by: Colin Ian King Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 6c81966107dc0caa5d2ebedbcebb5f10d865064d Author: Dongjiu Geng Date: Tue Mar 23 19:29:33 2021 +0800 clk: hisilicon: Add clock driver for hi3559A SoC Add clock drivers for hi3559A SoC, this driver controls the SoC registers to supply different clocks to different IPs in the SoC. Signed-off-by: Dongjiu Geng Link: https://lore.kernel.org/r/1616498973-47067-3-git-send-email-gengdongjiu1@gmail.com [sboyd@kernel.org: Mark arrays static, add __iomem, drop unused array, avoid kfree of devm memory] Signed-off-by: Stephen Boyd commit b87111da42f328c0e658e36e6782bb341ee742ea Author: Dongjiu Geng Date: Tue Mar 23 19:29:32 2021 +0800 dt-bindings: Document the hi3559a clock bindings Add DT bindings documentation for hi3559a SoC clock. Signed-off-by: Dongjiu Geng Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1616498973-47067-2-git-send-email-gengdongjiu1@gmail.com Signed-off-by: Stephen Boyd commit 9b13ff4340dff30f361462999a6a122fcc4e473f Author: Robert Hancock Date: Thu Mar 25 13:26:43 2021 -0600 clk: si5341: Add sysfs properties to allow checking/resetting device faults Add sysfs property files to allow viewing the current and latched states of the input present and PLL lock bits, and allow resetting the latched fault state. This allows manual checks or automated userspace polling for faults occurring after initialization. Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-10-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit 2f02c5e42a55fbdb1b4f113df2c26a5c99e8d578 Author: Robert Hancock Date: Thu Mar 25 13:26:42 2021 -0600 clk: si5341: Add silabs,iovdd-33 property Add a property to allow specifying that the external I2C IO pins are using 3.3V voltage thresholds rather than 1.8V. Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-9-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit ab89a3439ffa61913a625c34758a46c8ca0c0713 Author: Robert Hancock Date: Thu Mar 25 13:26:41 2021 -0600 clk: si5341: Add silabs,xaxb-ext-clk property Add a property to allow specifying that the device XA/XB pins are used for an external clock input rather than for a clock crystal. Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-8-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit b7bbf6ec4940d1a69811ec354edeeb9751fa8e85 Author: Robert Hancock Date: Thu Mar 25 13:26:40 2021 -0600 clk: si5341: Allow different output VDD_SEL values The driver was not previously programming the VDD_SEL values for each output to indicate what external VDDO voltage was used for each. Add ability to specify a regulator supplying the VDDO pin for each output of the device. The voltage of the regulator is used to automatically set the VDD_SEL value appropriately. If no regulator is specified and the chip is being reconfigured, assume 2.5V which appears to be the chip default. Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-7-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit 3c9b49b0031aefb81adfdba5ab0ddf3ca3a2cdc9 Author: Robert Hancock Date: Thu Mar 25 13:26:39 2021 -0600 clk: si5341: Update initialization magic Update the default register settings to include the VCO_RESET_CALCODE settings (set by the SiLabs ClockBuilder software but not described in the datasheet). Also update part of the initialization sequence to match ClockBuilder and the datasheet. Fixes: 3044a860fd ("clk: Add Si5341/Si5340 driver") Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-6-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit 71dcc4d1f7d2ad97ff7ab831281bc6893ff713a2 Author: Robert Hancock Date: Thu Mar 25 13:26:38 2021 -0600 clk: si5341: Check for input clock presence and PLL lock on startup After initializing the device, wait for it to report that the input clock is present and the PLL has locked before declaring success. Fixes: 3044a860fd ("clk: Add Si5341/Si5340 driver") Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-5-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit 78f6f406026d688868223d5dbeb197a4f7e9a9fd Author: Robert Hancock Date: Thu Mar 25 13:26:37 2021 -0600 clk: si5341: Avoid divide errors due to bogus register contents If the Si5341 is being initially programmed and has no stored NVM configuration, some of the register contents may contain unexpected values, such as zeros, which could cause divide by zero errors during driver initialization. Trap errors caused by zero registers or zero clock rates which could result in divide errors later in the code. Fixes: 3044a860fd ("clk: Add Si5341/Si5340 driver") Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-4-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit 6e7d2de1e000d36990923ed80d2e78dfcb545cee Author: Robert Hancock Date: Thu Mar 25 13:26:36 2021 -0600 clk: si5341: Wait for DEVICE_READY on startup The Si5341 datasheet warns that before accessing any other registers, including the PAGE register, we need to wait for the DEVICE_READY register to indicate the device is ready, or the process of the device loading its state from NVM can be corrupted. Wait for DEVICE_READY on startup before continuing initialization. This is done using a raw I2C register read prior to setting up regmap to avoid any potential unwanted automatic PAGE register accesses from regmap at this stage. Fixes: 3044a860fd ("clk: Add Si5341/Si5340 driver") Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-3-robert.hancock@calian.com Signed-off-by: Stephen Boyd commit c832bb98d3706f843a207fff44ddf8a6422289a1 Author: Robert Hancock Date: Thu Mar 25 13:26:35 2021 -0600 dt-bindings: clock: clk-si5341: Add new attributes Add new silabs,xaxb-ext-clk and silabs,iovdd-33 properties. Changed vdd-supply on top-level node to optional since it is not actually used by the driver. Removed vdd-supply from output sub-nodes, as it was not supported by the driver and it is not easily possible to support this in that location with the kernel regulator infrastructure. Changed to have vddoX-supply attributes for each output on the top-level device node. Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20210325192643.2190069-2-robert.hancock@calian.com Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 9ba98c08dcb827b84318f9547536423d3afa68ac Author: Yu Jiahua Date: Tue Jun 15 19:48:26 2021 -0800 drivers: ti: remove redundant error message in adpll.c There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Yu Jiahua Link: https://lore.kernel.org/r/20210616034826.37276-1-yujiahua1@huawei.com Signed-off-by: Stephen Boyd commit 301035c32e6754c2293d3aba77e6de3e3dded7fe Author: Alain Volmat Date: Wed Mar 31 22:16:32 2021 +0200 dt-bindings: clock: st: clkgen-fsyn: add new introduced compatible New compatible are added, supporting various kind of clkgen-fsyn used for STiH407, STiH410 and STiH418 Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/20210331201632.24530-8-avolmat@me.com Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 5dc1a12711b3338e3227f30c5ac15921d719d5c4 Author: Alain Volmat Date: Wed Mar 31 22:16:31 2021 +0200 clk: st: clkgen-fsyn: embed soc clock outputs within compatible data In order to avoid relying on the old style description via the DT clock-output-names, add compatible data describing the flexgen outputs clocks for all STiH407/STiH410 and STiH418 SOCs. In order to ease transition between the two methods, this commit introduce the new compatible without removing the old method. Once DTs will be fixed, the method relying on DT clock-output-names will be removed from this driver as well as old compatibles. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20210331201632.24530-7-avolmat@me.com Signed-off-by: Stephen Boyd commit 8df309e9c5e173eea83909d5575eab89965541af Author: Alain Volmat Date: Wed Mar 31 22:16:30 2021 +0200 dt-bindings: clock: st: clkgen-pll: add new introduced compatible New compatible are added, supporting various kind of clkgen-pll used for STiH407, STiH410 and STiH418 Signed-off-by: Alain Volmat Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210331201632.24530-6-avolmat@me.com Signed-off-by: Stephen Boyd commit 92ef1b2beb109c23e2348de8b7ef9d0736fa0b3d Author: Alain Volmat Date: Wed Mar 31 22:16:29 2021 +0200 clk: st: clkgen-pll: embed soc clock outputs within compatible data In order to avoid relying on the old style description via the DT clock-output-names, add compatible data describing the flexgen outputs clocks for all STiH407/STiH410 and STiH418 SOCs. In order to ease transition between the two methods, this commit introduce the new compatible without removing the old method. Once DTs will be fixed, the method relying on DT clock-output-names will be removed from this driver as well as old compatibles. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20210331201632.24530-5-avolmat@me.com Signed-off-by: Stephen Boyd commit fa745c71b8e75e85ce129dd9097a00ac7a9df47f Author: Alain Volmat Date: Wed Mar 31 22:16:28 2021 +0200 dt-bindings: clock: st: flexgen: add new introduced compatible New compatible are added, supporting various kind of flexgen in STiH407, STiH410 and STiH418 Signed-off-by: Alain Volmat Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210331201632.24530-4-avolmat@me.com Signed-off-by: Stephen Boyd commit 574dffc2995cc96f1c13e802576d1fb146ebd387 Author: Alain Volmat Date: Wed Mar 31 22:16:27 2021 +0200 clk: st: flexgen: embed soc clock outputs within compatible data In order to avoid relying on the old style description via the DT clock-output-names, add compatible data describing the flexgen outputs clocks for all STiH407/STiH410 and STiH418 SOCs. In order to ease transition between the two methods, this commit introduce the new compatible without removing the old method. Once DTs will be fixed, the method relying on DT clock-output-names will be removed from this driver as well as old compatibles. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20210331201632.24530-3-avolmat@me.com Signed-off-by: Stephen Boyd commit b5a87e692c044c42bf9309cde4bc455bec246c60 Author: Alain Volmat Date: Wed Mar 31 22:16:26 2021 +0200 clk: st: clkgen-pll: remove unused variable of struct clkgen_pll ODF field within the struct clkgen_pll is never used by the driver and can thus be removed. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20210331201632.24530-2-avolmat@me.com Signed-off-by: Stephen Boyd commit bdbfc029374f6d9ed31bc44983501fd1008b677f Author: Paul Cercueil Date: Sun May 30 17:49:23 2021 +0100 clk: ingenic: Add support for the JZ4760 Add the CGU code and the compatible string to the TCU driver to support the JZ4760 SoC. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210530164923.18134-7-paul@crapouillou.net Signed-off-by: Stephen Boyd commit b60b0b55926bea93c0f00000ac884fa1b3c9a492 Author: Paul Cercueil Date: Sun May 30 17:49:22 2021 +0100 clk: ingenic: Support overriding PLLs M/N/OD calc algorithm SoC-specific code can now provide a callback if they need to compute the M/N/OD values in a specific way. Signed-off-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) # on CU1000-neo/X1000E Link: https://lore.kernel.org/r/20210530164923.18134-6-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 037f1ffd0f0a6bad89e17aa4698c97ef430c6ad1 Author: Paul Cercueil Date: Sun May 30 17:49:21 2021 +0100 clk: ingenic: Remove pll_info.no_bypass_bit We can express that a PLL has no bypass bit by simply setting the .bypass_bit field to a negative value. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210530164923.18134-5-paul@crapouillou.net Tested-by: 周琰杰 (Zhou Yanjie) # on CU1830-neo/X1830 Signed-off-by: Stephen Boyd commit 315a8423b20362bb675c5263cb237ecb51d9589e Author: Paul Cercueil Date: Sun May 30 17:49:20 2021 +0100 clk: ingenic: Read bypass register only when there is one Rework the clock code so that the bypass register is only read when there is actually a bypass functionality. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210530164923.18134-4-paul@crapouillou.net Tested-by: 周琰杰 (Zhou Yanjie) # on CU1830-neo/X1830 Signed-off-by: Stephen Boyd commit 249592bf6d5d52cacdc2f5a07f23368fc1b11324 Author: Paul Cercueil Date: Sun May 30 17:49:19 2021 +0100 clk: Support bypassing dividers When a clock is declared as both CGU_CLK_DIV and CGU_CLK_MUX, the CGU code expects the mux to be applied first, the divider second. On the JZ4760, and maybe on some other SoCs, some clocks also have a mux setting and a divider, but the divider is not applied to all parents selectable from the mux. This could be solved by creating two clocks, one with CGU_CLK_DIV and one with CGU_CLK_MUX, but that would increase the number of clocks. Instead, add a 8-bit mask to CGU_CLK_DIV clocks. If the bit corresponding to the parent clock's index is set, the divider is bypassed. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210530164923.18134-3-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 2e1ae04f7fe049bb012c273e5281a3c145924ea1 Author: Paul Cercueil Date: Sun May 30 17:49:18 2021 +0100 dt-bindings: clock: ingenic: Add ingenic,jz4760{,b}-cgu compatibles Add ingenic,jz4760-cgu and ingenic,jz4760b-cgu compatible strings for the JZ4760 and JZ4760B SoCs respectively. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210530164923.18134-2-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 7f54bf2640e877c8a9b4cc7e2b29f82e3ca1a284 Author: Jonathan Marek Date: Tue Jun 8 22:28:52 2021 -0400 clk: qcom: clk-alpha-pll: fix CAL_L write in alpha_pll_fabia_prepare Caught this when looking at alpha-pll code. Untested but it is clear that this was intended to write to PLL_CAL_L_VAL and not PLL_ALPHA_VAL. Fixes: 691865bad627 ("clk: qcom: clk-alpha-pll: Add support for Fabia PLL calibration") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210609022852.4151-1-jonathan@marek.ca Signed-off-by: Stephen Boyd commit db01868f1b26378baf254c1f2c57b7deeeda7f08 Author: Cristian Ciocaltea Date: Thu Jun 10 23:05:26 2021 +0300 clk: actions: Add NIC and ETHERNET clock support for Actions S500 SoC Add support for the missing NIC and ETHERNET clocks in the Actions Semi Owl S500 SoC clock driver. Additionally, change APB clock parent from AHB to the newly added NIC. Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/d62e4f1f85c5cef05be14d9e8143e88bbddd2e0f.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit a4acefd85825f1d0b7299a804b2c3fc4153f1e3a Author: Cristian Ciocaltea Date: Thu Jun 10 23:05:25 2021 +0300 dt-bindings: clock: Add NIC and ETHERNET bindings for Actions S500 SoC Add the missing NIC and ETHERNET clock bindings constants for Actions Semi Owl S500 SoC. Signed-off-by: Cristian Ciocaltea Acked-by: Rob Herring Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1d0902cf073f76a1a602410061481ccb3fc36a72.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit fd90b5b9045274360b12cea0f2ce50f3bcfb25cc Author: Cristian Ciocaltea Date: Thu Jun 10 23:05:24 2021 +0300 clk: actions: Fix AHPPREDIV-H-AHB clock chain on Owl S500 SoC There are a few issues with the setup of the Actions Semi Owl S500 SoC's clock chain involving AHPPREDIV, H and AHB clocks: * AHBPREDIV clock is defined as a muxer only, although it also acts as a divider. * H clock is using a wrong divider register offset * AHB is defined as a multi-rate factor clock, but it is actually just a fixed pass clock. Let's provide the following fixes: * Change AHBPREDIV clock to an ungated OWL_COMP_DIV definition. * Use the correct register shift value in the OWL_DIVIDER definition for H clock * Drop the unneeded 'ahb_factor_table[]' and change AHB clock to an ungated OWL_COMP_FIXED_FACTOR definition. Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/21c1abd19a7089b65a34852ac6513961be88cbe1.1623354574.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit a8f1f03caa51aa7a69c671aa87c475034db7d368 Author: Cristian Ciocaltea Date: Thu Jun 10 23:05:23 2021 +0300 clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC The following clocks of the Actions Semi Owl S500 SoC have been defined to use a shared clock factor table 'bisp_factor_table[]': DE[1-2], VCE, VDE, BISP, SENSOR[0-1] There are several issues involved in this approach: * 'bisp_factor_table[]' describes the configuration of a regular 8-rates divider, so its usage is redundant. Additionally, judging by the BISP clock context, it is incomplete since it maps only 8 out of 12 possible entries. * The clocks mentioned above are not identical in terms of the available rates, therefore cannot rely on the same factor table. Specifically, BISP and SENSOR* are standard 12-rate dividers so their configuration should rely on a proper clock div table, while VCE and VDE require a factor table that is a actually a subset of the one needed for DE[1-2] clocks. Let's fix this by implementing the following: * Add new factor tables 'de_factor_table' and 'hde_factor_table' to properly handle DE[1-2], VCE and VDE clocks. * Add a common div table 'std12rate_div_table' for BISP and SENSOR[0-1] clocks converted to OWL_COMP_DIV. * Drop the now unused 'bisp_factor_table[]'. Additionally, drop the CLK_IGNORE_UNUSED flag for SENSOR[0-1] since there is no reason to always keep ON those clocks. Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/e675820a46cd9930d8d576c6cae61d41c1a8416f.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit fe1f71e338d77814da3ef44e9f64d32981a6ccdf Author: Cristian Ciocaltea Date: Thu Jun 10 23:05:22 2021 +0300 clk: actions: Fix SD clocks factor table on Owl S500 SoC Drop the unsupported entries in the factor table used for the SD[0-2] clocks definitions on the Actions Semi Owl S500 SoC. Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/196c948d708a22b8198c95f064a0f6b6820f9980.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit 2dca2a619a907579e3e65e7c1789230c2b912e88 Author: Cristian Ciocaltea Date: Thu Jun 10 23:05:21 2021 +0300 clk: actions: Fix UART clock dividers on Owl S500 SoC Use correct divider registers for the Actions Semi Owl S500 SoC's UART clocks. Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/4714d05982b19ac5fec2ed74f54be42d8238e392.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit fa5b6541423e7e1fb5deeacc36abea9163d23720 Author: Matti Vaittinen Date: Tue May 25 13:15:10 2021 +0300 clk: bd718xx: Drop BD70528 support The only known BD70528 use-cases are such that the PMIC is controlled from separate MCU which is not running Linux. I am not aware of any Linux driver users. Furthermore, it seems there is no demand for this IC. Let's ease the maintenance burden and drop the driver. We can always add it back if there is sudden need for it. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/937ed0828486a08e2d00bce2815d491c1c9c49b4.1621937490.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Stephen Boyd commit c392df194a2d126124128c9ce2109b27e3c43077 Author: Gabriel Fernandez Date: Thu Jun 17 07:18:08 2021 +0200 clk: stm32mp1: move RCC reset controller into RCC clock driver RCC clock and reset controller shared same memory mapping. As RCC clock driver is now a module, the best way to register clock and reset controller is to do it in same driver. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-6-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 95272370e2905cbe30d29112101cd8fb8c4c5db6 Author: Gabriel Fernandez Date: Thu Jun 17 07:18:07 2021 +0200 clk: stm32mp1: convert to module driver Adds support for probe deferral in way to prepare integration of the security in RCC clock and reset drivers. Some kernel clocks will be provided by the SCMI drivers. Since RCC clock driver create clocks which parents are SCMI clocks, RCC clock driver probe can be deferred. Signed-off-by: Etienne Carriere Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-5-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 9008fddee4be8797b2e7ab1747348176079fed25 Author: Gabriel Fernandez Date: Thu Jun 17 07:18:06 2021 +0200 clk: stm32mp1: remove intermediate pll clocks This patch is to prepare STM32MP1 clocks in trusted mode. Integrate the mux clock into pll clock will facilitate to have a more coherent clock tree in no trusted / trusted mode. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-4-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 152efe5662ea442085a20dd7993c472bed5b084c Author: Gabriel Fernandez Date: Thu Jun 17 07:18:05 2021 +0200 clk: stm32mp1: merge 'ck_hse_rtc' and 'ck_rtc' into one clock 'ck_rtc' has multiple clocks as input (ck_hsi, ck_lsi, and ck_hse). A divider is available only on the specific rtc input for ck_hse. This Merge will facilitate to have a more coherent clock tree in no trusted / trusted world. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-3-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 47c671da45dc6e0940843cb67e644e77c84cede3 Author: Gabriel Fernandez Date: Thu Jun 17 07:18:04 2021 +0200 clk: stm32mp1: merge 'clk-hsi-div' and 'ck_hsi' into one clock This patch is to prepare STM32MP1 clocks in trusted mode. This Merge will facilitate to have a more coherent clock tree in no trusted / trusted world. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20210617051814.12018-2-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 6181baa177d417211ea28de793524ec3d13b256d Author: Liam Beguin Date: Thu Apr 22 20:40:56 2021 -0400 clk: lmk04832: add support for digital delay The digital delay allows outputs to be delayed from 8 to 1023 VCO cycles. The delay step can be as small as half the period of the clock distribution path. For example, a 3.2-GHz VCO frequency results in 156.25-ps steps. The digital delay value takes effect on the clock output phase after a SYNC event. This is required to support JESD204B subclass 1. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20210423004057.283926-3-liambeguin@gmail.com Signed-off-by: Stephen Boyd commit 3bc61cfd6f4a57de32132075b15b0ac8987ced1d Author: Liam Beguin Date: Thu Apr 22 20:40:55 2021 -0400 clk: add support for the lmk04832 The LMK04832 is an ultra-high performance clock conditioner with JEDEC JESD204B support and is also pin compatible with the LMK0482x family of devices. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20210423004057.283926-2-liambeguin@gmail.com Signed-off-by: Stephen Boyd commit 199ead4008b2078772c4efc3851a31af75eb4013 Author: Liam Beguin Date: Thu Apr 22 20:40:57 2021 -0400 dt-bindings: clock: add ti,lmk04832 bindings Document devicetree bindings for Texas Instruments' LMK04832. The LMK04208 is a high performance clock conditioner with superior clock jitter cleaning, generation, and distribution with JEDEC JESD204B support. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20210423004057.283926-4-liambeguin@gmail.com Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 99c6fc6d7ecb7961b33d6503a71c868bb4009478 Author: Jian Xin Date: Wed Jun 9 15:37:42 2021 +0800 clk: socfpga: clk-pll: Remove unused variable 'rc' Fix the following build warning: drivers/clk/socfpga/clk-pll.c: In function ‘__socfpga_pll_init’: drivers/clk/socfpga/clk-pll.c:83:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] Signed-off-by: Jian Xin Link: https://lore.kernel.org/r/20210609073742.722911-1-xinjian34324@163.com Signed-off-by: Stephen Boyd commit 5d66ca79b58cb3cbeb4720c7da064faf03c27446 Author: Jonathan Marek Date: Tue Jun 8 22:20:48 2021 -0400 clk: qcom: Add camera clock controller driver for SM8250 Add support for the camera clock controller found on SM8250. Based on the downstream driver. Signed-off-by: Jonathan Marek Reviewed-by: Robert Foss Link: https://lore.kernel.org/r/20210609022051.2171-4-jonathan@marek.ca [sboyd@kernel.org: Add UL to avoid decimal problems] Signed-off-by: Stephen Boyd commit a3b82fa77b861364b5abac3bf310124276e8f65d Author: Jonathan Marek Date: Tue Jun 8 22:20:47 2021 -0400 dt-bindings: clock: add QCOM SM8250 camera clock bindings Add device tree bindings for camera clock controller for Qualcomm Technology Inc's SM8250 SoC. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210609022051.2171-3-jonathan@marek.ca Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit f21b6bfecc2760eaa9c2b485c74dffddbe92151a Author: Jonathan Marek Date: Tue Jun 8 22:20:46 2021 -0400 clk: qcom: clk-alpha-pll: add support for zonda pll Ported over from the downstream driver. Will be used by SM8250 CAMCC. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210609022051.2171-2-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 652c96bb9bfe5e28f859785575d68e8d50140c14 Author: Pu Lehui Date: Wed Jun 9 14:18:48 2021 +0800 clk/qcom: Remove unused variables Fix gcc '-Wunused-const-variable' warnings: drivers/clk/qcom/gcc-mdm9607.c:122:37: warning: 'gcc_xo_gpll0_gpll1' defined but not used [-Wunused-const-variable=] drivers/clk/qcom/gcc-mdm9607.c:116:32: warning: 'gcc_xo_gpll0_gpll1_map' defined but not used [-Wunused-const-variable=] drivers/clk/qcom/gcc-mdm9607.c:42:37: warning: 'gcc_xo_sleep' defined but not used [-Wunused-const-variable=] drivers/clk/qcom/gcc-mdm9607.c:37:32: warning: 'gcc_xo_sleep_map' defined but not used [-Wunused-const-variable=] Let's remove them. Signed-off-by: Pu Lehui Link: https://lore.kernel.org/r/20210609061848.87415-1-pulehui@huawei.com Reported-by: kbuild test robot Signed-off-by: Stephen Boyd commit d1312020feec95d43bde0e04b4cf16916f979393 Author: Bartosz Dudziak Date: Sat Jun 5 12:40:40 2021 +0200 clk: qcom: smd-rpmcc: Add support for MSM8226 rpm clocks Add compatible for rpm smd clocks, PMIC and bus clocks which are required on MSM8226 for clients to vote on. Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210605104040.12960-1-bartosz.dudziak@snejp.pl Signed-off-by: Stephen Boyd commit 76f53d9bd900996072e7565d1d5ad8aeedae2bb5 Author: Bartosz Dudziak Date: Sun Apr 18 14:29:06 2021 +0200 clk: qcom: gcc: Add support for Global Clock controller found on MSM8226 Modify existing MSM8974 driver to support MSM8226 SoC. Override frequencies which are different in this older chip. Register all the clocks to the framework for the clients to be able to request for them. Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210418122909.71434-3-bartosz.dudziak@snejp.pl Signed-off-by: Stephen Boyd commit e184d788af5c10d00c7430dcb1f8c7cf086567a2 Author: Bartosz Dudziak Date: Sun Apr 18 14:29:05 2021 +0200 dt-bindings: clock: qcom: Add MSM8226 GCC clock bindings Add compatible device strings and the include files for the MSM8226 GCC. Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210418122909.71434-2-bartosz.dudziak@snejp.pl Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 4b8d6ae57cdf7ac50b473b89ec05613fc2c8143c Author: Konrad Dybcio Date: Sat Jun 5 14:10:38 2021 +0200 clk: qcom: Add SM6125 (TRINKET) GCC driver Add the clocks supported in global clock controller, which clock the peripherals like BLSPs, SDCC, USB, MDSS etc. Register all the clocks to the clock framework for the clients to be able to request for them. Signed-off-by: Konrad Dybcio Signed-off-by: Martin Botka Link: https://lore.kernel.org/r/20210605121040.282053-2-martin.botka@somainline.org Reviewed-by: Bjorn Andersson [sboyd@kernel.org: Mark gcc_sm6125_hws array static] Signed-off-by: Stephen Boyd commit 11fa5f8392eede198bc1218b97b03c063ee9d080 Author: Martin Botka Date: Sat Jun 5 14:10:37 2021 +0200 dt-bindings: clk: qcom: gcc-sm6125: Document SM6125 GCC driver Document the newly added SM6125 GCC driver. Signed-off-by: Martin Botka Link: https://lore.kernel.org/r/20210605121040.282053-1-martin.botka@somainline.org Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit ca1c667f4be935825fffb232a106c9d3f1c09b0b Author: Taniya Das Date: Wed Jun 23 17:27:51 2021 +0530 clk: qcom: gcc: Add support for a new frequency for SC7280 There is a requirement to support 52MHz for qup clocks for bluetooth usecase, thus update the frequency table to support the frequency. Fixes: a3cc092196ef ("clk: qcom: Add Global Clock controller (GCC) driver for SC7280") Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1624449471-9984-1-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit dfd1427c3769ba51297777dbb296f1802d72dbf6 Author: Dinh Nguyen Date: Thu Jun 10 21:52:01 2021 -0500 clk: agilex/stratix10/n5x: fix how the bypass_reg is handled If the bypass_reg is set, then we can return the bypass parent, however, if there is not a bypass_reg, we need to figure what the correct parent mux is. The previous code never handled the parent mux if there was a bypass_reg. Fixes: 80c6b7a0894f ("clk: socfpga: agilex: add clock driver for the Agilex platform") Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210611025201.118799-4-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit c2c9c5661a48bf2e67dcb4e989003144304acd6a Author: Dinh Nguyen Date: Thu Jun 10 21:52:00 2021 -0500 clk: agilex/stratix10: add support for the 2nd bypass The EMAC clocks on Stratix10/Agilex/N5X have an additional bypass that was not being accounted for. The bypass selects between emaca_clk/emacb_clk and boot_clk. Because the bypass register offset is different between Stratix10 and Agilex/N5X, it's best to create a new function to calculate the bypass. Fixes: 80c6b7a0894f ("clk: socfpga: agilex: add clock driver for the Agilex platform") Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210611025201.118799-3-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit 6855ee839699bdabb4b16cf942557fd763bcb1fa Author: Dinh Nguyen Date: Thu Jun 10 21:51:59 2021 -0500 clk: agilex/stratix10: fix bypass representation Each of these clocks(s2f_usr0/1, sdmmc_clk, gpio_db, emac_ptp, emac0/1/2) have a bypass setting that can use the boot_clk. The previous representation was not correct. Fix the representation. Fixes: 80c6b7a0894f ("clk: socfpga: agilex: add clock driver for the Agilex platform") Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210611025201.118799-2-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit efbe21df3e889c0f4bf682c2b7e2465d60b0127c Author: Dinh Nguyen Date: Thu Jun 10 21:51:58 2021 -0500 clk: agilex/stratix10: remove noc_clk Early documentation had a noc_clk, but in reality, it's just the noc_free_clk. Remove the noc_clk clock and just use the noc_free_clk. Fixes: 80c6b7a0894f ("clk: socfpga: agilex: add clock driver for the Agilex platform") Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210611025201.118799-1-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit c06bc5a3fb42304d815a2dc41e324b5a97c9f7da Author: Bart Van Assche Date: Sun Jun 27 14:11:12 2021 -0700 block/mq-deadline: Remove a WARN_ON_ONCE() call The purpose of the WARN_ON_ONCE() statement in dd_insert_request() is to verify that dd_prepare_request() cleared rq->elv.priv[0]. Since dd_prepare_request() is called during request initialization but not if a request is requeued, a warning is triggered if a request is requeued. Fix this by removing the WARN_ON_ONCE() statement. This patch suppresses the following kernel warning: WARNING: CPU: 28 PID: 432 at block/mq-deadline-main.c:740 dd_insert_request+0x4d4/0x5b0 Workqueue: kblockd blk_mq_requeue_work Call Trace: dd_insert_requests+0xfa/0x130 blk_mq_sched_insert_request+0x22c/0x240 blk_mq_requeue_work+0x21c/0x2d0 process_one_work+0x4c2/0xa70 worker_thread+0x2e5/0x6d0 kthread+0x21c/0x250 ret_from_fork+0x1f/0x30 Reported-by: Sachin Sant Fixes: 08a9ad8bf607 ("block/mq-deadline: Add cgroup support") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210627211112.12720-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 8215d5b7f15f8643bf12fe005b2bc0cc322aff62 Author: Chao Yu Date: Sun Jun 27 21:32:29 2021 +0800 MAINTAINERS: erofs: update my email address Old email address will be invalid after a few days, update it to kernel.org one. Link: https://lore.kernel.org/r/20210627133229.8025-1-chao@kernel.org Signed-off-by: Chao Yu Acked-by: Gao Xiang Signed-off-by: Gao Xiang commit 4f197188da668180d5ea7d808ae6221ce66cfe33 Author: Conor Dooley Date: Thu Jun 24 16:01:52 2021 +0100 MAINTAINERS: add entry for polarfire soc mailbox Add Lewis Hanly as a maintainer for the Microchip SoC directory and the system services mailbox driver Signed-off-by: Conor Dooley Signed-off-by: Jassi Brar commit c317ae30afc26112e64e832253dc780e32c7b734 Author: Conor Dooley Date: Thu Jun 24 16:01:39 2021 +0100 dt-bindings: add bindings for polarfire soc system controller Add device tree bindings for the MSS system controller on the Microchip PolarFire SoC. Signed-off-by: Conor Dooley Reviewed-by: Rob Herring Signed-off-by: Jassi Brar commit 83d7b1560810e038e1d07ca6bff41edaeae29725 Author: Conor Dooley Date: Thu Jun 24 16:00:55 2021 +0100 mbox: add polarfire soc system controller mailbox This driver adds support for the single mailbox channel of the MSS system controller on the Microchip PolarFire SoC. Signed-off-by: Conor Dooley Signed-off-by: Jassi Brar commit ed9543d6f2c444457b1936026f67cb8d3bf70bc7 Author: Conor Dooley Date: Thu Jun 24 16:00:48 2021 +0100 dt-bindings: add bindings for polarfire soc mailbox Add device tree bindings for the MSS system controller mailbox on the Microchip PolarFire SoC. Signed-off-by: Conor Dooley Reviewed-by: Rob Herring Signed-off-by: Jassi Brar commit e80a7e7eafcd5e75bf8c73164cae954b3f0addbc Author: Nathan Chancellor Date: Mon Jun 21 11:56:45 2021 -0700 mailbox: imx: Avoid using val uninitialized in imx_mu_isr() Clang warns: drivers/mailbox/imx-mailbox.c:284:2: warning: variable 'val' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ drivers/mailbox/imx-mailbox.c:288:7: note: uninitialized use occurs here if (!val) ^~~ drivers/mailbox/imx-mailbox.c:263:9: note: initialize the variable 'val' to silence this warning u32 val, ctrl; ^ = 0 1 warning generated. Prior to commit 91c8c1fbe498 ("mailbox: imx: add xSR/xCR register array"), val was always initialized in imx_mu_isr() but now, it is not initialized in the default case. Return IRQ_NONE like the statement below does and add a message that there is an unhandled type for this switch statement so that it can be updated. Fixes: 91c8c1fbe498 ("mailbox: imx: add xSR/xCR register array") Link: https://github.com/ClangBuiltLinux/linux/issues/1404 Signed-off-by: Nathan Chancellor Signed-off-by: Jassi Brar commit 8a7cdb108d3020e221944fbd52b9e047f3f51594 Author: Shawn Guo Date: Tue Jun 22 08:39:19 2021 +0800 mailbox: qcom: Add MSM8939 APCS support Enable MSM8939 APCS support by adding the compatible. It reuses msm8916_apcs_data. Signed-off-by: Shawn Guo Signed-off-by: Jassi Brar commit 96e39e95c01283ff5695dafe659df88ada802159 Author: Shawn Guo Date: Tue Jun 22 08:39:18 2021 +0800 mailbox: qcom: Use PLATFORM_DEVID_AUTO to register platform device In adding APCS clock support for MSM8939, the second clock registration fails due to duplicate device name like below. [ 0.519657] sysfs: cannot create duplicate filename '/bus/platform/devices/qcom-apcs-msm8916-clk' ... [ 0.661158] qcom_apcs_ipc b111000.mailbox: failed to register APCS clk This is because MSM8939 has 3 APCS instances for Cluster0 (little cores), Cluster1 (big cores) and CCI (Cache Coherent Interconnect). Although only APCS of Cluster0 and Cluster1 have IPC bits, each of 3 APCS has A53PLL clock control bits. That said, 3 'qcom-apcs-msm8916-clk' devices need to be registered to instantiate all 3 clocks. Use PLATFORM_DEVID_AUTO rather than PLATFORM_DEVID_NONE for platform_device_register_data() call to fix the issue above. Signed-off-by: Shawn Guo Reviewed-by: Bjorn Andersson Signed-off-by: Jassi Brar commit 2ef6123182face5df85e585dfddff1e013659ee9 Author: Shawn Guo Date: Tue Jun 22 08:39:17 2021 +0800 dt-bindings: mailbox: qcom: Add MSM8939 APCS compatible Add compatible for the Qualcomm MSM8939 APCS block to the Qualcomm APCS bindings. Signed-off-by: Shawn Guo Acked-by: Rob Herring Signed-off-by: Jassi Brar commit 72648436b55f310749352e005a508ede082f63d6 Author: Martin Botka Date: Sat Jun 12 11:46:30 2021 +0200 mailbox: qcom-apcs: Add SM6125 compatible This commit adds compatible for the SM6125 SoC Signed-off-by: Martin Botka Signed-off-by: Jassi Brar commit 4649d722c37bec95fd818b6e46179d31c8b9807b Author: Martin Botka Date: Sat Jun 12 11:46:29 2021 +0200 dt-bindings: mailbox: Add binding for sm6125 This patch adds the binding for sm6125 Signed-off-by: Martin Botka Acked-by: Rob Herring Signed-off-by: Jassi Brar commit cc3eb51814d0f31671d57e85d4912403a11506e9 Author: Dan Carpenter Date: Tue Jun 22 16:08:52 2021 +0300 mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush() The "cb" pointer needs to be initialized before can assign "data.data = cb->data;". Signed-off-by: Dan Carpenter Reviewed-by: Chun-Kuang Hu Signed-off-by: Jassi Brar commit c0d580cefa46f28873202b7e3df9313a570633bd Author: Zhihao Cheng Date: Tue Jun 1 16:28:34 2021 +0800 mailbox: bcm-flexrm-mailbox: Remove redundant dev_err call in flexrm_mbox_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Signed-off-by: Jassi Brar commit 01c59166b4a00026b2a5b072b3149d5009a33e7b Author: Zhihao Cheng Date: Tue Jun 1 16:24:54 2021 +0800 mailbox: bcm2835: Remove redundant dev_err call in bcm2835_mbox_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Signed-off-by: Jassi Brar commit d6fbfdbc12745ce24bcd348dbf7e652353b3e59c Author: Sibi Sankar Date: Wed Jun 16 23:12:58 2021 +0530 mailbox: qcom-ipcc: Fix IPCC mbox channel exhaustion Fix IPCC (Inter-Processor Communication Controller) channel exhaustion by setting the channel private data to NULL on mbox shutdown. Err Logs: remoteproc: MBA booted without debug policy, loading mpss remoteproc: glink-edge: failed to acquire IPC channel remoteproc: failed to probe subdevices for remoteproc: -16 Fixes: fa74a0257f45 ("mailbox: Add support for Qualcomm IPCC") Signed-off-by: Sibi Sankar Cc: stable@vger.kernel.org Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Signed-off-by: Jassi Brar commit 8ebc3b5aa4cfafd8b9d58e2595a12f0715594619 Author: Chun-Kuang Hu Date: Mon Mar 15 07:33:23 2021 +0800 mailbox: mtk-cmdq: Add struct cmdq_pkt in struct cmdq_cb_data Current client use 'struct cmdq_pkt' as callback data, so change 'void *data' to 'struct cmdq_pkt *pkt'. Keep data until client use pkt instead of data. Signed-off-by: Chun-Kuang Hu Reviewed-by: Yongqiang Niu Signed-off-by: Jassi Brar commit 1b6b0ce2240e717bd5839cc106a0bf6cdbac9abc Author: Chun-Kuang Hu Date: Mon Mar 15 07:33:22 2021 +0800 mailbox: mtk-cmdq: Use mailbox rx_callback 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. But the client driver has already used cmdq_task_cb, so keep cmdq_task_cb until all client driver use rx_callback instead of cmdq_task_cb. Signed-off-by: Chun-Kuang Hu Reviewed-by: Yongqiang Niu Signed-off-by: Jassi Brar commit b3c0d72b092e52ae7369b52fb97f63eb2ea7f16a Author: Chun-Kuang Hu Date: Mon Mar 15 07:33:21 2021 +0800 mailbox: mtk-cmdq: Remove cmdq_cb_status cmdq_cb_status is an error status. Use the standard error number instead of cmdq_cb_status to prevent status duplication. Signed-off-by: Chun-Kuang Hu Reviewed-by: Yongqiang Niu Signed-off-by: Jassi Brar commit 4f0b776ef5831700fe47567f6d986be410d7b9e4 Author: Peng Fan Date: Fri May 28 18:06:03 2021 +0800 mailbox: imx-mailbox: support i.MX8ULP MU i.MX8ULP MU has different register layout and bit layout compared with i.MX6SX/7ULP/8. So add enum imx_mu_type to show it is IMX_MU_V2 or IMX_MU_V1. For IMX_MU_V2 mu hardware, check it when calculating bit offset to get the correct offset. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit f689a7cf75975680eb2993d7360dbe6dd7617e17 Author: Peng Fan Date: Fri May 28 18:06:02 2021 +0800 mailbox: imx: add xSR/xCR register array We are going to add a new platform which has 4 status registers(SR, TSR, RSR, GSR) and 4 control registers(CR, TCR, RCR, GCR), so extend xSR and xCR to register array and adapt code to use it. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 32f7443d4139208927bc9c3fda8e2a77ec24fe14 Author: Peng Fan Date: Fri May 28 18:06:01 2021 +0800 mailbox: imx: replace the xTR/xRR array with single register The xTR/xRR registers are using 4 bytes stride and continuous. Considering we will support more TR and RR registers, use base + idx * 4 method to calculate register address, not hardcoding in driver. Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit 8339642c930500140fe27621d783630b002a6342 Author: Peng Fan Date: Fri May 28 18:06:00 2021 +0800 dt-bindings: mailbox: imx-mu: add i.MX8ULP MU support The register layout and bits definition of i.MX8ULP MU is different compared with others, let's add the compatible for the new MU. Acked-by: Rob Herring Signed-off-by: Peng Fan Signed-off-by: Jassi Brar commit c7701684eef8aab8b612812d179dfb2467176a6f Author: Hao Fang Date: Sat May 22 18:12:54 2021 +0800 mailbox: hisilicon: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to https://www.hisilicon.com/en. Signed-off-by: Hao Fang Reviewed-by: Leo Yan Signed-off-by: Jassi Brar commit d9605fefe37811f8eaf03689bc41fdb43ee6d589 Author: Bjorn Andersson Date: Mon May 31 15:17:30 2021 -0700 MAINTAINERS: Add dt-bindings to mailbox entry The MAINTAINER entry for the MAILBOX framework does not cover the dt-bindings and as such Jassi is not among the recipients for such patches. Signed-off-by: Bjorn Andersson Signed-off-by: Jassi Brar commit ff16cae3a31a2ff9dbfd3c053f252128e66c8aba Author: Zhen Lei Date: Tue May 11 19:35:58 2021 +0800 mailbox: mediatek: Remove redundant error printing in cmdq_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Jassi Brar commit 3edf083f901fb0ff26b2eb107eb15c93d3e62545 Author: Zhen Lei Date: Tue May 11 19:56:54 2021 +0800 mailbox: bcm-pdc: Remove redundant error printing in pdc_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Jassi Brar commit 9f0752355b211c98ccf2c678e8fddda8d325501a Author: Zhen Lei Date: Tue May 11 17:45:21 2021 +0800 mailbox: arm_mhu: Remove redundant error printing in mhu_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Jassi Brar commit a9601ac5e9160a3f96348ebc5d0751397a501701 Author: Trond Myklebust Date: Sat Jun 26 11:07:59 2021 -0400 NFS: Avoid duplicate resets of attribute cache timeouts We know that the attributes changed on the server if and only if the change attribute is different. Otherwise, we're just refreshing our cache with values that were already known to be stale. Signed-off-by: Trond Myklebust commit 20cf7d4ea4ad7d9830b01ff7444f6ac64a727a23 Author: Trond Myklebust Date: Fri Jun 25 15:49:31 2021 -0400 NFSv4: Fix handling of non-atomic change attrbute updates If the change attribute update is declared to be non-atomic by the server, or our cached value does not match the server's value before the operation was performed, then we should declare the inode cache invalid. On the other hand, if the change to the directory raced with a lookup or getattr which already updated the change attribute, then optimise away the revalidation. Signed-off-by: Trond Myklebust commit 213bb58475b57786e4336bc8bfd5029e16257c49 Author: Trond Myklebust Date: Sat Jun 26 09:23:51 2021 -0400 NFS: Fix up inode attribute revalidation timeouts The inode is considered revalidated when we've checked the value of the change attribute against our cached value since that suffices to establish whether or not the other cached values are valid. Signed-off-by: Trond Myklebust commit 6a2cbc58d6c9d90cd74288cc497c2b45815bc064 Author: Yun Zhou Date: Sat Jun 26 11:21:56 2021 +0800 seq_buf: Make trace_seq_putmem_hex() support data longer than 8 Since the raw memory 'data' does not go forward, it will dump repeated data if the data length is more than 8. If we want to dump longer data blocks, we need to repeatedly call macro SEQ_PUT_HEX_FIELD. I think it is a bit redundant, and multiple function calls also affect the performance. Link: https://lore.kernel.org/lkml/20210625122453.5e2fe304@oasis.local.home/ Link: https://lkml.kernel.org/r/20210626032156.47889-2-yun.zhou@windriver.com Cc: stable@vger.kernel.org Fixes: 6d2289f3faa7 ("tracing: Make trace_seq_putmem_hex() more robust") Signed-off-by: Yun Zhou Signed-off-by: Steven Rostedt (VMware) commit d3b16034a24a112bb83aeb669ac5b9b01f744bb7 Author: Yun Zhou Date: Sat Jun 26 11:21:55 2021 +0800 seq_buf: Fix overflow in seq_buf_putmem_hex() There's two variables being increased in that loop (i and j), and i follows the raw data, and j follows what is being written into the buffer. We should compare 'i' to MAX_MEMHEX_BYTES or compare 'j' to HEX_CHARS. Otherwise, if 'j' goes bigger than HEX_CHARS, it will overflow the destination buffer. Link: https://lore.kernel.org/lkml/20210625122453.5e2fe304@oasis.local.home/ Link: https://lkml.kernel.org/r/20210626032156.47889-1-yun.zhou@windriver.com Cc: stable@vger.kernel.org Fixes: 5e3ca0ec76fce ("ftrace: introduce the "hex" output method") Signed-off-by: Yun Zhou Signed-off-by: Steven Rostedt (VMware) commit 5589b8f1a2c74670cbca9ea98756dbb8f92569b8 Author: Raed Salem Date: Fri Jun 19 09:42:07 2020 -0500 net/mlx5e: Add IPsec support to uplink representor Add the xfrm xdo and ipsec_init/cleanup to uplink representor to support IPsec in SRIOV switchdev mode. Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Signed-off-by: Saeed Mahameed commit e8c8276145309890e9e6b7ccf37ed731375a6a96 Author: Tariq Toukan Date: Mon Sep 7 15:11:06 2020 +0300 net/mlx5e: kTLS, Add stats for number of deleted kTLS TX offloaded connections Expose ethtool SW counter for the number of kTLS device-offloaded TX connections that are finished and deleted. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 5bd8cee2b9c5aa31d58ed97caca433f0bf74c574 Author: Eli Cohen Date: Mon Apr 26 09:58:55 2021 +0300 net/mlx5: SF, Improve performance in SF allocation Avoid second traversal on the SF table by recording the first free entry and using it in case the looked up entry was not found in the table. Signed-off-by: Eli Cohen Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 6cdc686aa3163192ebce8ea72efee806729172c2 Author: Ariel Levkovich Date: Wed Dec 2 21:46:04 2020 +0200 net/mlx5: Increase hairpin buffer size The max packet size a hairpin queue is able to handle is determined by the total hairpin buffer size divided by 4. Currently the buffer size is set to 32KB which makes the max packet size to be 8KB and doesn't support jumbo frames of size 9KB. This change increases the buffer size to 64KB to increase the max frame size and support 9KB frames. Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit 1ab6dc35e9148e3cb4a837fdd08f1ca56b55eda0 Author: Yevgeny Kliteynik Date: Mon Apr 19 16:23:49 2021 +0300 net/mlx5: DR, Add support for flow sampler offload Add SW steering support for sFlow / flow sampler action. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 6f8515568e69d97ddcbd9bfca10f57e9f4591d59 Author: Yevgeny Kliteynik Date: Mon Apr 19 16:32:16 2021 +0300 net/mlx5: Compare sampler flow destination ID in fs_core When comparing sampler flow destinations, in fs_core, consider sampler ID as well. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 1f0536139cb8e8175ca034e12706b86f77f9061e Author: Nigel Christian Date: Wed Jun 16 15:45:02 2021 -0400 Bluetooth: hci_uart: Remove redundant assignment to fw_ptr The variable fw_ptr is assigned a value that is not read and the same value is assigned in the patch goto. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Nigel Christian Signed-off-by: Marcel Holtmann commit 23837a6d7a1a61818ed94a6b8af552d6cf7d32d5 Author: Luiz Augusto von Dentz Date: Tue Jun 22 20:59:02 2021 -0700 Bluetooth: Fix handling of HCI_LE_Advertising_Set_Terminated event Error status of this event means that it has ended due reasons other than a connection: 'If advertising has terminated as a result of the advertising duration elapsing, the Status parameter shall be set to the error code Advertising Timeout (0x3C).' 'If advertising has terminated because the Max_Extended_Advertising_Events was reached, the Status parameter shall be set to the error code Limit Reached (0x43).' Fixes: acf0aeae431a0 ("Bluetooth: Handle ADv set terminated event") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 43e59cb7e6077110c4622e61a188e7703e8c7e36 Author: Marcel Holtmann Date: Tue Jun 15 21:23:35 2021 +0200 Bluetooth: Increment management interface revision Increment the mgmt revision due to recent changes. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit dd912f43bbda87ed37099a9287e4fbb7c85af706 Author: Colin Ian King Date: Wed Jun 16 14:07:57 2021 +0100 Bluetooth: btmrvl: remove redundant continue statement The continue statement in the for-loop has no effect, remove it. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit c9ed0a7077306f9d41d74fb006ab5dbada8349c5 Author: Luiz Augusto von Dentz Date: Wed Jun 9 11:09:27 2021 -0700 Bluetooth: Fix Set Extended (Scan Response) Data These command do have variable length and the length can go up to 251, so this changes the struct to not use a fixed size and then when creating the PDU only the actual length of the data send to the controller. Fixes: a0fb3726ba551 ("Bluetooth: Use Set ext adv/scan rsp data if controller supports") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 3d4f9c00492b4e21641e5140a5e78cb50b58d60b Author: Archie Pusaka Date: Fri Jun 4 16:26:27 2021 +0800 Bluetooth: use inclusive language when filtering devices This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: blacklist -> reject list whitelist -> accept list Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit 39bc74ca0119025e3cc24b97ebd964b5c605aa83 Author: Archie Pusaka Date: Fri Jun 4 16:26:26 2021 +0800 Bluetooth: use inclusive language when tracking connections This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> central slave -> peripheral Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit 74be523ce6bed0531e4f31c3e1387909589e9bfe Author: Archie Pusaka Date: Fri Jun 4 16:26:25 2021 +0800 Bluetooth: use inclusive language in HCI role comments This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> initiator (for smp) or central (everything else) slave -> responder (for smp) or peripheral (everything else) The #define preprocessor terms are unchanged for now to not disturb dependent APIs. Signed-off-by: Archie Pusaka Signed-off-by: Marcel Holtmann commit 83b4b19551411c83bbcf677718ab5d9f60d982f6 Author: Kai Ye Date: Thu Jun 3 15:41:05 2021 +0800 Bluetooth: smp: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 79dbeafe5ef162ede87c916054755a987e93e542 Author: Kai Ye Date: Thu Jun 3 15:41:04 2021 +0800 Bluetooth: sco: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 496bdeeeda09e84f469f47e66f6d38d3735f802f Author: Kai Ye Date: Thu Jun 3 15:41:03 2021 +0800 Bluetooth: msft: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 85d6728421c9b2797dea3a20f213dd44d9f8d7cd Author: Kai Ye Date: Thu Jun 3 15:41:02 2021 +0800 Bluetooth: mgmt: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 610850bebc5baaf92d113247387b9fcab187259f Author: Kai Ye Date: Thu Jun 3 15:41:00 2021 +0800 Bluetooth: amp: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit fad48d848cf64d4673474c9ebcb9f6fbf66aa3b8 Author: Kai Ye Date: Thu Jun 3 15:40:59 2021 +0800 Bluetooth: a2mp: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 658d5d8080b5ec6184402d3cf37c2070e4d9b6db Author: Kai Ye Date: Thu Jun 3 15:40:58 2021 +0800 Bluetooth: 6lowpan: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 093dabb4f1aff982f7ef1cebf4e24be3fe47bcdb Author: Kai Ye Date: Thu Jun 3 15:40:56 2021 +0800 Bluetooth: hidp: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit b442a8533b02b44bafa81b67a3571b2b106fcc88 Author: Kai Ye Date: Thu Jun 3 15:40:55 2021 +0800 Bluetooth: cmtp: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 8c8ca05d3291d5e77eccf8f87106506a90aa82a2 Author: Kai Ye Date: Thu Jun 3 15:40:54 2021 +0800 Bluetooth: bnep: Use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 4f00bfb372674d586c4a261bfc595cbce101fbb6 Author: Tim Jiang Date: Tue Jun 1 17:57:10 2021 +0800 Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc. This is btsoc timing issue, after host start to downloading bt firmware, ep2 need time to switch from function acl to function dfu, so host add 20ms delay as workaround. Signed-off-by: Tim Jiang Signed-off-by: Marcel Holtmann commit ca17a5cccf8b6d35dab4729bea8f4350bc0b4caf Author: Tim Jiang Date: Tue Jun 1 17:57:25 2021 +0800 Bluetooth: btusb: use default nvm if boardID is 0 for wcn6855. if boardID is 0, will use the default nvm file without surfix. Signed-off-by: Tim Jiang Signed-off-by: Marcel Holtmann commit a1b2fdf97f3659948d83ff491abbab73e591c982 Author: Zhang Qilong Date: Mon May 31 22:24:49 2021 +0800 Bluetooth: btmtkuart: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Using pm_runtime_resume_and_get is more appropriate for simplifing code Signed-off-by: Zhang Qilong Signed-off-by: Marcel Holtmann commit 67ffb1857a182d90c0e7db16752b556d6cf3944f Author: Archie Pusaka Date: Mon May 31 16:37:28 2021 +0800 Bluetooth: use inclusive language in comments This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: slave -> peripheral blacklisted -> blocked Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit fad646e16d3cafd67d3cfff8e66f77401190957e Author: Archie Pusaka Date: Mon May 31 16:37:25 2021 +0800 Bluetooth: use inclusive language in SMP This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> initiator slave -> responder Signed-off-by: Archie Pusaka Signed-off-by: Marcel Holtmann commit ef365da1803de7891589c75304c8c36bb7cf4b98 Author: Archie Pusaka Date: Mon May 31 16:37:23 2021 +0800 Bluetooth: use inclusive language in HCI LE features This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> central slave -> peripheral Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit 6397729bb74df3918187c5e96fb0f63c5f5292d9 Author: Archie Pusaka Date: Mon May 31 16:37:22 2021 +0800 Bluetooth: use inclusive language to describe CPB This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced when describing the connectionless peripheral broadcast feature: master -> central slave -> peripheral Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit 76c185a51505262fe19b5a2cd5dd70199d21949b Author: Archie Pusaka Date: Mon May 31 16:37:21 2021 +0800 Bluetooth: use inclusive language in hci_core.h This patch replaces some non-inclusive terms based on the appropriate language mapping table compiled by the Bluetooth SIG: https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Specifically, these terms are replaced: master -> central slave -> peripheral These attributes are not used elsewhere in the code. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit 799acb9347915bfe4eac0ff2345b468f0a1ca207 Author: Luiz Augusto von Dentz Date: Fri May 28 11:45:02 2021 -0700 Bluetooth: mgmt: Fix slab-out-of-bounds in tlv_data_is_valid This fixes parsing of LTV entries when the length is 0. Found with: tools/mgmt-tester -s "Add Advertising - Success (ScRsp only)" Add Advertising - Success (ScRsp only) - run Sending Add Advertising (0x003e) Test condition added, total 1 [ 11.004577] ================================================================== [ 11.005292] BUG: KASAN: slab-out-of-bounds in tlv_data_is_valid+0x87/0xe0 [ 11.005984] Read of size 1 at addr ffff888002c695b0 by task mgmt-tester/87 [ 11.006711] [ 11.007176] [ 11.007429] Allocated by task 87: [ 11.008151] [ 11.008438] The buggy address belongs to the object at ffff888002c69580 [ 11.008438] which belongs to the cache kmalloc-64 of size 64 [ 11.010526] The buggy address is located 48 bytes inside of [ 11.010526] 64-byte region [ffff888002c69580, ffff888002c695c0) [ 11.012423] The buggy address belongs to the page: [ 11.013291] [ 11.013544] Memory state around the buggy address: [ 11.014359] ffff888002c69480: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.015453] ffff888002c69500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.016232] >ffff888002c69580: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc [ 11.017010] ^ [ 11.017547] ffff888002c69600: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc [ 11.018296] ffff888002c69680: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.019116] ================================================================== Fixes: 2bb36870e8cb2 ("Bluetooth: Unify advertising instance flags check") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 9fd2e2949b43dea869f7fce0f8f51df44f635d59 Author: Joakim Tjernlund Date: Fri May 28 17:26:44 2021 +0200 Bluetooth: btrtl: rename USB fw for RTL8761 According Realteks own BT drivers firmware RTL8761B is for UART and RTL8761BU is for USB. Change existing 8761B to UART and add an 8761BU entry for USB Signed-off-by: Joakim Tjernlund Signed-off-by: Marcel Holtmann commit 33404381c5e875cbd57eec6d9bbacd3b13b404c9 Author: Joakim Tjernlund Date: Fri May 28 17:26:45 2021 +0200 Bluetooth: btusb: Add 0x0b05:0x190e Realtek 8761BU (ASUS BT500) device. T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#= 18 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0b05 ProdID=190e Rev= 2.00 S: Manufacturer=Realtek S: Product=ASUS USB-BT500 S: SerialNumber=xxxxxxxx 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: Joakim Tjernlund Signed-off-by: Marcel Holtmann commit 3011faa29bc6f45d1388b8588cb9c5a5154927e7 Author: Archie Pusaka Date: Thu May 27 15:19:54 2021 +0800 Bluetooth: hci_h5: Add RTL8822CS capabilities RTL8822 chipset supports WBS, and this information is conveyed in btusb.c. However, the UART driver doesn't have this information just yet. Signed-off-by: Archie Pusaka Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 02ce2c2c24024aade65a8d91d6a596651eaf2d0a Author: Tedd Ho-Jeong An Date: Wed May 26 10:36:22 2021 -0700 Bluetooth: mgmt: Fix the command returns garbage parameter value When the Get Device Flags command fails, it returns the error status with the parameters filled with the garbage values. Although the parameters are not used, it is better to fill with zero than the random values. Signed-off-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit c32d624640fd2254ec40e76e4a176e75de77ee09 Author: Yun-Hao Chung Date: Thu May 20 13:12:09 2021 +0800 Bluetooth: disable filter dup when scan for adv monitor Disable duplicates filter when scanning for advertisement monitor for the following reasons. The scanning includes active scan and passive scan. For HW pattern filtering (ex. MSFT), Realtek and Qualcomm controllers ignore RSSI_Sampling_Period when the duplicates filter is enabled. For SW pattern filtering, when we're not doing interleaved scanning, it is necessary to disable duplicates filter, otherwise hosts can only receive one advertisement and it's impossible to know if a peer is still in range. Signed-off-by: Yun-Hao Chung Reviewed-by: Archie Pusaka Reviewed-by: Manish Mandlik Signed-off-by: Marcel Holtmann commit 79699a7056ff784524d1baa387f30ddf98e14a1c Author: Sathish Narasimman Date: Thu May 20 17:12:01 2021 +0530 Bluetooth: Translate additional address type during le_conn_comp When using controller based address resolution, then the destination address type during le_conn_complete uses 0x02 & 0x03 if controller resolves the destination address(RPA). These address types need to be converted back into either 0x00 0r 0x01 Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit c615943ef0525fdaea631ca42ded446e11389062 Author: YueHaibing Date: Thu May 20 21:32:35 2021 +0800 Bluetooth: RFCOMM: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Marcel Holtmann commit e848dbd364aca44c9d23c04bef964fab79e2b34f Author: Hilda Wu Date: Fri May 14 11:19:01 2021 +0800 Bluetooth: btusb: Add support USB ALT 3 for WBS Because mSBC frames do not need to be aligned to the SCO packet boundary. Using USB ALT 3 let HCI payload >= 60 bytes, let mSBC data satisfy 60 Bytes avoid payload unaligned situation and fixed some headset no voise issue. USB Alt 3 supported also need HFP support transparent MTU in 72 Bytes. Signed-off-by: Hilda Wu Signed-off-by: Marcel Holtmann commit de895b43932cb47e69480540be7eca289af24f23 Author: Luiz Augusto von Dentz Date: Wed May 19 13:41:51 2021 -0700 Bluetooth: L2CAP: Fix invalid access on ECRED Connection response The use of l2cap_chan_del is not safe under a loop using list_for_each_entry. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 1fa20d7d4aad02206e84b74915819fbe9f81dab3 Author: Luiz Augusto von Dentz Date: Wed May 19 13:41:50 2021 -0700 Bluetooth: L2CAP: Fix invalid access if ECRED Reconfigure fails The use of l2cap_chan_del is not safe under a loop using list_for_each_entry. Reported-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 1c58e933aba23f68c0d3f192f7cc6eed8fabd694 Author: Szymon Janc Date: Tue May 18 16:54:36 2021 +0200 Bluetooth: Remove spurious error message Even with rate limited reporting this is very spammy and since it is remote device that is providing bogus data there is no need to report this as error. Since real_len variable was used only to allow conditional error message it is now also removed. [72454.143336] bt_err_ratelimited: 10 callbacks suppressed [72454.143337] Bluetooth: hci0: advertising data len corrected [72454.296314] Bluetooth: hci0: advertising data len corrected [72454.892329] Bluetooth: hci0: advertising data len corrected [72455.051319] Bluetooth: hci0: advertising data len corrected [72455.357326] Bluetooth: hci0: advertising data len corrected [72455.663295] Bluetooth: hci0: advertising data len corrected [72455.787278] Bluetooth: hci0: advertising data len corrected [72455.942278] Bluetooth: hci0: advertising data len corrected [72456.094276] Bluetooth: hci0: advertising data len corrected [72456.249137] Bluetooth: hci0: advertising data len corrected [72459.416333] bt_err_ratelimited: 13 callbacks suppressed [72459.416334] Bluetooth: hci0: advertising data len corrected [72459.721334] Bluetooth: hci0: advertising data len corrected [72460.011317] Bluetooth: hci0: advertising data len corrected [72460.327171] Bluetooth: hci0: advertising data len corrected [72460.638294] Bluetooth: hci0: advertising data len corrected [72460.946350] Bluetooth: hci0: advertising data len corrected [72461.225320] Bluetooth: hci0: advertising data len corrected [72461.690322] Bluetooth: hci0: advertising data len corrected [72462.118318] Bluetooth: hci0: advertising data len corrected [72462.427319] Bluetooth: hci0: advertising data len corrected [72464.546319] bt_err_ratelimited: 7 callbacks suppressed [72464.546319] Bluetooth: hci0: advertising data len corrected [72464.857318] Bluetooth: hci0: advertising data len corrected [72465.163332] Bluetooth: hci0: advertising data len corrected [72465.278331] Bluetooth: hci0: advertising data len corrected [72465.432323] Bluetooth: hci0: advertising data len corrected [72465.891334] Bluetooth: hci0: advertising data len corrected [72466.045334] Bluetooth: hci0: advertising data len corrected [72466.197321] Bluetooth: hci0: advertising data len corrected [72466.340318] Bluetooth: hci0: advertising data len corrected [72466.498335] Bluetooth: hci0: advertising data len corrected [72469.803299] bt_err_ratelimited: 10 callbacks suppressed Signed-off-by: Szymon Janc Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=203753 Cc: stable@vger.kernel.org Signed-off-by: Marcel Holtmann commit 0324d19cb99804d99e42c990b8b1e191575a091b Author: Daniel Lenski Date: Tue May 18 10:25:46 2021 -0700 Bluetooth: btusb: Add a new QCA_ROME device (0cf3:e500) This patch adds the 0cf3:e500 Bluetooth device (from a QCA9377 board) as a QCA_ROME device. It appears to be functionally identical to another device ID, also from a QCA9377 board, which was previously marked as QCA_ROME in 0a03f98b98c201191e3ba15a0e33f46d8660e1fd ("Bluetooth: Add a new 04ca:3015 QCA_ROME device"). Without this patch, the WiFi side of the QCA9377 board is slow or unusable when the Bluetooth side is in use. See https://askubuntu.com/a/1137852 for another report of QCA_ROME fixing this issue for this device ID. /sys/kernel/debug/usb/devices: T: Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cf3 ProdID=e500 Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Daniel Lenski Signed-off-by: Marcel Holtmann commit 7a4cb1635a4b879f8d118ec7c6586aef913819f3 Author: Venkata Lakshmi Narayana Gubba Date: Tue May 18 22:04:46 2021 +0530 dt-bindings: net: bluetooth: Add device tree bindings for QTI chip wcn6750 This patch enables regulators and gpios for the Qualcomm Bluetooth wcn6750 controller. Signed-off-by: Venkata Lakshmi Narayana Gubba Reviewed-by: Rob Herring Signed-off-by: Marcel Holtmann commit d88c6de4f8b6e6f1b6c3e3a85d39106c83553bc9 Author: Venkata Lakshmi Narayana Gubba Date: Tue May 18 22:04:45 2021 +0530 dt-bindings: net: bluetooth: Convert Qualcomm BT binding to DT schema Converted Qualcomm Bluetooth binidings to DT schema. Signed-off-by: Venkata Lakshmi Narayana Gubba Reviewed-by: Rob Herring Signed-off-by: Marcel Holtmann commit 99fba8e3f1d1fd60042187a90ba2381efc1833f7 Author: Venkata Lakshmi Narayana Gubba Date: Tue May 18 22:04:44 2021 +0530 Bluetooth: btqca: Moved extracting rom version info to common place Moved extracting rom version info to common place as this code is common in all if else ladder in qca_uart_setup. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit ecf6b2d9566606cd78bdc0af36e5a938624b13d1 Author: Venkata Lakshmi Narayana Gubba Date: Tue May 18 22:04:43 2021 +0530 Bluetooth: btqca: Add support for firmware image with mbn type for WCN6750 1. Added support to download firmware image with mbn type for wcn6750 as it supports mbn type image. 2. If mbn type image is not present then check for tlv type image. 3. Added debug logs for mbn type image. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit d8f97da1b92d2fe89d51c673ecf80c4016119e5c Author: Venkata Lakshmi Narayana Gubba Date: Tue May 18 22:04:42 2021 +0530 Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6750 Added regulators,GPIOs and changes required to power on/off wcn6750. Added support for firmware download for wcn6750. Changes done in detail: 1. Added regulators and corresponding current values. 2. Added sw_ctrl GPIO pin which is output from BT SoC and indicates status of clock supply to BT SoC. 3. Added inline function to check if the SoC type is wcn6750. 4. Modified the function qca_wcn3990_init() to support wcn6750 and renamed it to qca_regulator_init(). Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit 0ea9fd001a14ebc294f112b0361a4e601551d508 Author: Kai-Heng Feng Date: Fri May 14 15:14:52 2021 +0800 Bluetooth: Shutdown controller after workqueues are flushed or cancelled Rfkill block and unblock Intel USB Bluetooth [8087:0026] may make it stops working: [ 509.691509] Bluetooth: hci0: HCI reset during shutdown failed [ 514.897584] Bluetooth: hci0: MSFT filter_enable is already on [ 530.044751] usb 3-10: reset full-speed USB device number 5 using xhci_hcd [ 545.660350] usb 3-10: device descriptor read/64, error -110 [ 561.283530] usb 3-10: device descriptor read/64, error -110 [ 561.519682] usb 3-10: reset full-speed USB device number 5 using xhci_hcd [ 566.686650] Bluetooth: hci0: unexpected event for opcode 0x0500 [ 568.752452] Bluetooth: hci0: urb 0000000096cd309b failed to resubmit (113) [ 578.797955] Bluetooth: hci0: Failed to read MSFT supported features (-110) [ 586.286565] Bluetooth: hci0: urb 00000000c522f633 failed to resubmit (113) [ 596.215302] Bluetooth: hci0: Failed to read MSFT supported features (-110) Or kernel panics because other workqueues already freed skb: [ 2048.663763] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 2048.663775] #PF: supervisor read access in kernel mode [ 2048.663779] #PF: error_code(0x0000) - not-present page [ 2048.663782] PGD 0 P4D 0 [ 2048.663787] Oops: 0000 [#1] SMP NOPTI [ 2048.663793] CPU: 3 PID: 4491 Comm: rfkill Tainted: G W 5.13.0-rc1-next-20210510+ #20 [ 2048.663799] Hardware name: HP HP EliteBook 850 G8 Notebook PC/8846, BIOS T76 Ver. 01.01.04 12/02/2020 [ 2048.663801] RIP: 0010:__skb_ext_put+0x6/0x50 [ 2048.663814] Code: 8b 1b 48 85 db 75 db 5b 41 5c 5d c3 be 01 00 00 00 e8 de 13 c0 ff eb e7 be 02 00 00 00 e8 d2 13 c0 ff eb db 0f 1f 44 00 00 55 <8b> 07 48 89 e5 83 f8 01 74 14 b8 ff ff ff ff f0 0f c1 07 83 f8 01 [ 2048.663819] RSP: 0018:ffffc1d105b6fd80 EFLAGS: 00010286 [ 2048.663824] RAX: 0000000000000000 RBX: ffff9d9ac5649000 RCX: 0000000000000000 [ 2048.663827] RDX: ffffffffc0d1daf6 RSI: 0000000000000206 RDI: 0000000000000000 [ 2048.663830] RBP: ffffc1d105b6fd98 R08: 0000000000000001 R09: ffff9d9ace8ceac0 [ 2048.663834] R10: ffff9d9ace8ceac0 R11: 0000000000000001 R12: ffff9d9ac5649000 [ 2048.663838] R13: 0000000000000000 R14: 00007ffe0354d650 R15: 0000000000000000 [ 2048.663843] FS: 00007fe02ab19740(0000) GS:ffff9d9e5f8c0000(0000) knlGS:0000000000000000 [ 2048.663849] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2048.663853] CR2: 0000000000000000 CR3: 0000000111a52004 CR4: 0000000000770ee0 [ 2048.663856] PKRU: 55555554 [ 2048.663859] Call Trace: [ 2048.663865] ? skb_release_head_state+0x5e/0x80 [ 2048.663873] kfree_skb+0x2f/0xb0 [ 2048.663881] btusb_shutdown_intel_new+0x36/0x60 [btusb] [ 2048.663905] hci_dev_do_close+0x48c/0x5e0 [bluetooth] [ 2048.663954] ? __cond_resched+0x1a/0x50 [ 2048.663962] hci_rfkill_set_block+0x56/0xa0 [bluetooth] [ 2048.664007] rfkill_set_block+0x98/0x170 [ 2048.664016] rfkill_fop_write+0x136/0x1e0 [ 2048.664022] vfs_write+0xc7/0x260 [ 2048.664030] ksys_write+0xb1/0xe0 [ 2048.664035] ? exit_to_user_mode_prepare+0x37/0x1c0 [ 2048.664042] __x64_sys_write+0x1a/0x20 [ 2048.664048] do_syscall_64+0x40/0xb0 [ 2048.664055] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 2048.664060] RIP: 0033:0x7fe02ac23c27 [ 2048.664066] 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 [ 2048.664070] RSP: 002b:00007ffe0354d638 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 2048.664075] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fe02ac23c27 [ 2048.664078] RDX: 0000000000000008 RSI: 00007ffe0354d650 RDI: 0000000000000003 [ 2048.664081] RBP: 0000000000000000 R08: 0000559b05998440 R09: 0000559b05998440 [ 2048.664084] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 [ 2048.664086] R13: 0000000000000000 R14: ffffffff00000000 R15: 00000000ffffffff So move the shutdown callback to a place where workqueues are either flushed or cancelled to resolve the issue. Signed-off-by: Kai-Heng Feng Signed-off-by: Marcel Holtmann commit 27f4d1f214ae4a3364623f212ea2d45f772d35b1 Author: Mikhail Rudenko Date: Mon May 10 02:28:37 2021 +0300 Bluetooth: btbcm: Add entry for BCM43430B0 UART Bluetooth This patch adds the device ID for the BCM43430B0 module, found e.g. in certain revisions of AMPAK AP6212 chip. The required firmware file is named 'BCM43430B0.hcd'. Signed-off-by: Mikhail Rudenko Signed-off-by: Marcel Holtmann commit b43ca511178ed0ab6fd2405df28cf9e100273020 Author: Connor Abbott Date: Fri May 7 14:27:33 2021 +0200 Bluetooth: btqca: Don't modify firmware contents in-place struct firmware::data is marked const, and when the firmware is compressed with xz (default at least with Fedora) it's mapped read-only which results in a crash: BUG: unable to handle page fault for address: ffffae57c0ca5047 PGD 100000067 P4D 100000067 PUD 1001ce067 PMD 10165a067 PTE 8000000112bba161 Oops: 0003 [#1] SMP NOPTI CPU: 3 PID: 204 Comm: kworker/u17:0 Not tainted 5.12.1-test+ #1 Hardware name: Dell Inc. XPS 13 9310/0F7M4C, BIOS 1.2.5 12/10/2020 Workqueue: hci0 hci_power_on [bluetooth] RIP: 0010:qca_download_firmware+0x27c/0x4e0 [btqca] Code: 1b 75 04 80 48 0c 01 0f b7 c6 8d 54 02 0c 41 39 d7 0f 8e 62 fe ff ff 48 63 c2 4c 01 e8 0f b7 38 0f b7 70 02 66 83 ff 11 75 d3 <80> 48 0c 80 41 83 fc 03 7e 6e 88 58 0d eb ce 41 0f b6 45 0e 48 8b RSP: 0018:ffffae57c08dfc68 EFLAGS: 00010246 RAX: ffffae57c0ca503b RBX: 000000000000000e RCX: 0000000000000000 RDX: 0000000000000037 RSI: 0000000000000006 RDI: 0000000000000011 RBP: ffff978d9949e000 R08: ffff978d84ed7540 R09: ffffae57c0ca5000 R10: 000000000010cd00 R11: 0000000000000001 R12: 0000000000000005 R13: ffffae57c0ca5004 R14: ffff978d98ca8680 R15: 00000000000016a9 FS: 0000000000000000(0000) GS:ffff9794ef6c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffae57c0ca5047 CR3: 0000000113d5a004 CR4: 0000000000770ee0 PKRU: 55555554 Call Trace: qca_uart_setup+0x2cb/0x1390 [btqca] ? qca_read_soc_version+0x136/0x220 [btqca] qca_setup+0x288/0xab0 [hci_uart] hci_dev_do_open+0x1f3/0x780 [bluetooth] ? try_to_wake_up+0x1c1/0x4f0 hci_power_on+0x3f/0x200 [bluetooth] process_one_work+0x1ec/0x380 worker_thread+0x53/0x3e0 ? process_one_work+0x380/0x380 kthread+0x11b/0x140 ? kthread_associate_blkcg+0xa0/0xa0 ret_from_fork+0x1f/0x30 Modules linked in: llc ip_set nf_tables nfnetlink snd_soc_skl_hda_dsp(+) ip6table_filter snd_soc_hdac_hdmi ip6_tables qrtr_mhi iptable_filter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic s> dell_wmi_sysman(+) dell_smbios snd dcdbas mhi vfat videobuf2_vmalloc i2c_i801 videobuf2_memops videobuf2_v4l2 dell_wmi_descriptor fat wmi_bmof soundcore i2c_smbus videobuf2_common libarc4 mei_me mei hid_se> i2c_hid_acpi i2c_hid video pinctrl_tigerlake fuse CR2: ffffae57c0ca5047 This also seems to fix a failure to suspend due to the firmware download on bootup getting interrupted by the crash: Bluetooth: hci0: SSR or FW download time out PM: dpm_run_callback(): acpi_subsys_suspend+0x0/0x60 returns -110 PM: Device serial0-0 failed to suspend: error -110 PM: Some devices failed to suspend, or early wake event detected Fixes: 83e8196 ("Bluetooth: btqca: Introduce generic QCA ROME support") Cc: Venkata Lakshmi Narayana Gubba Cc: stable@vger.kernel.org Signed-off-by: Connor Abbott Signed-off-by: Marcel Holtmann commit 06d213d8a89a6f55b708422c3dda2b22add10748 Author: Kiran K Date: Thu Apr 8 22:31:59 2021 +0530 Bluetooth: Fix alt settings for incoming SCO with transparent coding format For incoming SCO connection with transparent coding format, alt setting of CVSD is getting applied instead of Transparent. Before fix: < HCI Command: Accept Synchron.. (0x01|0x0029) plen 21 #2196 [hci0] 321.342548 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 #2197 [hci0] 321.343585 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Comp.. (0x2c) plen 17 #2198 [hci0] 321.351666 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) ........ > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2336 [hci0] 321.383655 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2337 [hci0] 321.389558 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2338 [hci0] 321.393615 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2339 [hci0] 321.393618 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2340 [hci0] 321.393618 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2341 [hci0] 321.397070 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2342 [hci0] 321.403622 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2343 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2344 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2345 [hci0] 321.403625 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2346 [hci0] 321.404569 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2347 [hci0] 321.412091 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2348 [hci0] 321.413626 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2349 [hci0] 321.413630 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2350 [hci0] 321.413630 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2351 [hci0] 321.419674 After fix: < HCI Command: Accept Synchronou.. (0x01|0x0029) plen 21 #309 [hci0] 49.439693 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 #310 [hci0] 49.440308 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Complete (0x2c) plen 17 #311 [hci0] 49.449308 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) < SCO Data TX: Handle 257 flags 0x00 dlen 60 #312 [hci0] 49.450421 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #313 [hci0] 49.457927 > HCI Event: Max Slots Change (0x1b) plen 3 #314 [hci0] 49.460345 Handle: 256 Max slots: 5 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #315 [hci0] 49.465453 > SCO Data RX: Handle 257 flags 0x00 dlen 60 #316 [hci0] 49.470502 > SCO Data RX: Handle 257 flags 0x00 dlen 60 #317 [hci0] 49.470519 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #318 [hci0] 49.472996 > SCO Data RX: Handle 257 flags 0x00 dlen 60 #319 [hci0] 49.480412 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #320 [hci0] 49.480492 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #321 [hci0] 49.487989 > SCO Data RX: Handle 257 flags 0x00 dlen 60 #322 [hci0] 49.490303 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #323 [hci0] 49.495496 > SCO Data RX: Handle 257 flags 0x00 dlen 60 #324 [hci0] 49.500304 > SCO Data RX: Handle 257 flags 0x00 dlen 60 #325 [hci0] 49.500311 Signed-off-by: Kiran K Signed-off-by: Lokendra Singh Signed-off-by: Marcel Holtmann commit b0e56db78744000a26b03fb442d6f944f68a8386 Author: Jiapeng Chong Date: Thu Apr 15 16:49:28 2021 +0800 Bluetooth: 6lowpan: remove unused function Fix the following clang warning: net/bluetooth/6lowpan.c:913:20: warning: unused function 'bdaddr_type' [-Wunused-function]. net/bluetooth/6lowpan.c:106:35: warning: unused function 'peer_lookup_ba' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Marcel Holtmann commit de75cd0d9b2f3250d5f25846bb5632ccce6275f4 Author: Manish Mandlik Date: Thu Apr 29 10:24:22 2021 -0700 Bluetooth: Add ncmd=0 recovery handling During command status or command complete event, the controller may set ncmd=0 indicating that it is not accepting any more commands. In such a case, host holds off sending any more commands to the controller. If the controller doesn't recover from such condition, host will wait forever, until the user decides that the Bluetooth is broken and may power cycles the Bluetooth. This patch triggers the hardware error to reset the controller and driver when it gets into such state as there is no other wat out. Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Manish Mandlik Signed-off-by: Marcel Holtmann commit 59f90f1351282ea2dbd0c59098fd9bb2634e920e Author: Pavel Skripkin Date: Mon May 3 13:06:05 2021 +0300 Bluetooth: hci_qca: fix potential GPF In qca_power_shutdown() qcadev local variable is initialized by hu->serdev.dev private data, but hu->serdev can be NULL and there is a check for it. Since, qcadev is not used before if (!hu->serdev) return; we can move its initialization after this "if" to prevent GPF. Fixes: 5559904ccc08 ("Bluetooth: hci_qca: Add QCA Rome power off support to the qca_power_shutdown()") Cc: stable@vger.kernel.org # v5.6+ Cc: Rocky Liao Signed-off-by: Pavel Skripkin Reviewed-by: Johan Hovold Signed-off-by: Marcel Holtmann commit 4ef36a52b0e47c80bbfd69c0cce61c7ae9f541ed Author: Yu Liu Date: Mon Apr 19 16:53:30 2021 -0700 Bluetooth: Fix the HCI to MGMT status conversion table 0x2B, 0x31 and 0x33 are reserved for future use but were not present in the HCI to MGMT conversion table, this caused the conversion to be incorrect for the HCI status code greater than 0x2A. Reviewed-by: Miao-chen Chou Signed-off-by: Yu Liu Signed-off-by: Marcel Holtmann commit 3cfdf8fcaafa62a4123f92eb0f4a72650da3a479 Author: Thadeu Lima de Souza Cascardo Date: Tue Apr 13 13:21:03 2021 -0300 Bluetooth: cmtp: fix file refcount when cmtp_attach_device fails When cmtp_attach_device fails, cmtp_add_connection returns the error value which leads to the caller to doing fput through sockfd_put. But cmtp_session kthread, which is stopped in this path will also call fput, leading to a potential refcount underflow or a use-after-free. Add a refcount before we signal the kthread to stop. The kthread will try to grab the cmtp_session_sem mutex before doing the fput, which is held when get_file is called, so there should be no races there. Reported-by: Ryota Shiga Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Marcel Holtmann commit 44e936d7459cac598d9fe0b6d23cc9d12b648d5e Author: Muhammad Usama Anjum Date: Tue Apr 13 22:52:08 2021 +0500 Bluetooth: btusb: fix memory leak If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and then error should be returned to prevent memory leak. Addresses-Coverity: ("Prevent memory leak") Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for Mediatek Chip.") Signed-off-by: Muhammad Usama Anjum Signed-off-by: Marcel Holtmann commit 393dc5d19c825906f955210f10ee3befc39854f7 Author: mark-yw.chen Date: Mon Apr 12 23:06:27 2021 +0800 Bluetooth: btusb: Add support for Lite-On Mediatek Chip Add support for Lite-On Mediatek Chip (MT7921) Lite On VID = 04CA. * /sys/kernel/debug/usb/devices T: Bus=01 Lev=03 Prnt=04 Port=01 Cnt=02 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3802 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= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us Signed-off-by: mark-yw.chen Signed-off-by: Marcel Holtmann commit 8454ed9ff9647e31e061fb5eb2e39ce79bc5e960 Author: mark-yw.chen Date: Mon Apr 12 23:06:26 2021 +0800 Bluetooth: btusb: Fixed too many in-token issue for Mediatek Chip. This patch reduce in-token during download patch procedure. Don't submit urb for polling event before sending hci command. Signed-off-by: mark-yw.chen Signed-off-by: Marcel Holtmann commit 1cb027f2f803d0a7abe9c291f0625e6bccd25999 Author: Colin Ian King Date: Fri Apr 9 17:53:14 2021 +0100 Bluetooth: virtio_bt: add missing null pointer check on alloc_skb call return The call to alloc_skb with the GFP_KERNEL flag can return a null sk_buff pointer, so add a null check to avoid any null pointer deference issues. Addresses-Coverity: ("Dereference null return value") Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver") Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit 1c6ed31b1696d9b5462ba5ce15b83f5ea955600c Author: Yu Liu Date: Fri Apr 9 15:04:06 2021 -0700 Bluetooth: Return whether a connection is outbound When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user space we will set the flags to tell if the established connection is outbound or not. This is useful for the user space to log better metrics and error messages. Reviewed-by: Miao-chen Chou Reviewed-by: Alain Michaud Signed-off-by: Yu Liu Signed-off-by: Marcel Holtmann commit 07d85dbe411a1194eef5b70f1a5d070ee1e226a5 Author: Qiheng Lin Date: Sat Apr 10 10:19:35 2021 +0800 Bluetooth: use flexible-array member instead of zero-length array Fix the following coccicheck warning: net/bluetooth/msft.c:37:6-13: WARNING use flexible-array member instead net/bluetooth/msft.c:42:6-10: WARNING use flexible-array member instead net/bluetooth/msft.c:52:6-10: WARNING use flexible-array member instead Signed-off-by: Qiheng Lin Signed-off-by: Marcel Holtmann commit c469c9c9733cc92bef6d4bf2c0f5bea0550abf4d Author: Kai Ye Date: Fri Apr 2 18:46:29 2021 +0800 Bluetooth: 6lowpan: delete unneeded variable initialization Delete unneeded variable initialization. Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit b064037ea4104120418ccbf39951a6d529a9d6d5 Author: Christophe Leroy Date: Fri Jun 25 14:49:09 2021 +0000 powerpc/interrupt: Use names in check_return_regs_valid() trap->regs == 0x3000 is trap_is_scv() trap 0x500 is INTERRUPT_EXTERNAL Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d48bf0184a1de185eb0ed3282247f8a294710674.1624632537.git.christophe.leroy@csgroup.eu commit c8895e271f7994a3ecb13b8a280e39aa53879545 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:32 2021 +0200 trace/osnoise: Support hotplug operations Enable and disable osnoise/timerlat thread during on CPU hotplug online and offline operations respectivelly. Link: https://lore.kernel.org/linux-doc/20210621134636.5b332226@oasis.local.home/ Link: https://lkml.kernel.org/r/39f98590b3caeb3c32f09526214058efe0e9272a.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Steven Rostedt (VMware) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit ba998f7d9531ef4ce462cabd2ce57a7558c33ede Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:31 2021 +0200 trace/hwlat: Support hotplug operations Enable and disable hwlat thread during cpu hotplug online and offline operations, respectivelly. Link: https://lore.kernel.org/linux-doc/20210621134636.5b332226@oasis.local.home/ Link: https://lkml.kernel.org/r/52012d25ea35491a0f8088b947864d8df8e25157.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Steven Rostedt (VMware) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 039a602db393c00665e7a3b968b15fb6fd7042b1 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:29 2021 +0200 trace/hwlat: Protect kdata->kthread with get/put_online_cpus In preparation to the hotplug support, protect kdata->kthread with get/put_online_cpus() to avoid concurrency with hotplug operations. Link: https://lore.kernel.org/linux-doc/20210621134636.5b332226@oasis.local.home/ Link: https://lkml.kernel.org/r/8bdb2a56f46abfd301d6fffbf43448380c09a6f5.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Suggested-by: Steven Rostedt (VMware) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit a955d7eac1779b437ceb24fc352026a2cbcec140 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:28 2021 +0200 trace: Add timerlat tracer The timerlat tracer aims to help the preemptive kernel developers to found souces of wakeup latencies of real-time threads. Like cyclictest, the tracer sets a periodic timer that wakes up a thread. The thread then computes a *wakeup latency* value as the difference between the *current time* and the *absolute time* that the timer was set to expire. The main goal of timerlat is tracing in such a way to help kernel developers. Usage Write the ASCII text "timerlat" into the current_tracer file of the tracing system (generally mounted at /sys/kernel/tracing). For example: [root@f32 ~]# cd /sys/kernel/tracing/ [root@f32 tracing]# echo timerlat > current_tracer It is possible to follow the trace by reading the trace trace file: [root@f32 tracing]# cat trace # tracer: timerlat # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # || / # |||| ACTIVATION # TASK-PID CPU# |||| TIMESTAMP ID CONTEXT LATENCY # | | | |||| | | | | -0 [000] d.h1 54.029328: #1 context irq timer_latency 932 ns <...>-867 [000] .... 54.029339: #1 context thread timer_latency 11700 ns -0 [001] dNh1 54.029346: #1 context irq timer_latency 2833 ns <...>-868 [001] .... 54.029353: #1 context thread timer_latency 9820 ns -0 [000] d.h1 54.030328: #2 context irq timer_latency 769 ns <...>-867 [000] .... 54.030330: #2 context thread timer_latency 3070 ns -0 [001] d.h1 54.030344: #2 context irq timer_latency 935 ns <...>-868 [001] .... 54.030347: #2 context thread timer_latency 4351 ns The tracer creates a per-cpu kernel thread with real-time priority that prints two lines at every activation. The first is the *timer latency* observed at the *hardirq* context before the activation of the thread. The second is the *timer latency* observed by the thread, which is the same level that cyclictest reports. The ACTIVATION ID field serves to relate the *irq* execution to its respective *thread* execution. The irq/thread splitting is important to clarify at which context the unexpected high value is coming from. The *irq* context can be delayed by hardware related actions, such as SMIs, NMIs, IRQs or by a thread masking interrupts. Once the timer happens, the delay can also be influenced by blocking caused by threads. For example, by postponing the scheduler execution via preempt_disable(), by the scheduler execution, or by masking interrupts. Threads can also be delayed by the interference from other threads and IRQs. The timerlat can also take advantage of the osnoise: traceevents. For example: [root@f32 ~]# cd /sys/kernel/tracing/ [root@f32 tracing]# echo timerlat > current_tracer [root@f32 tracing]# echo osnoise > set_event [root@f32 tracing]# echo 25 > osnoise/stop_tracing_total_us [root@f32 tracing]# tail -10 trace cc1-87882 [005] d..h... 548.771078: #402268 context irq timer_latency 1585 ns cc1-87882 [005] dNLh1.. 548.771082: irq_noise: local_timer:236 start 548.771077442 duration 4597 ns cc1-87882 [005] dNLh2.. 548.771083: irq_noise: reschedule:253 start 548.771083017 duration 56 ns cc1-87882 [005] dNLh2.. 548.771086: irq_noise: call_function_single:251 start 548.771083811 duration 2048 ns cc1-87882 [005] dNLh2.. 548.771088: irq_noise: call_function_single:251 start 548.771086814 duration 1495 ns cc1-87882 [005] dNLh2.. 548.771091: irq_noise: call_function_single:251 start 548.771089194 duration 1558 ns cc1-87882 [005] dNLh2.. 548.771094: irq_noise: call_function_single:251 start 548.771091719 duration 1932 ns cc1-87882 [005] dNLh2.. 548.771096: irq_noise: call_function_single:251 start 548.771094696 duration 1050 ns cc1-87882 [005] d...3.. 548.771101: thread_noise: cc1:87882 start 548.771078243 duration 10909 ns timerlat/5-1035 [005] ....... 548.771103: #402268 context thread timer_latency 25960 ns For further information see: Documentation/trace/timerlat-tracer.rst Link: https://lkml.kernel.org/r/71f18efc013e1194bcaea1e54db957de2b19ba62.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit bce29ac9ce0bb0b0b146b687ab978378c21e9078 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:27 2021 +0200 trace: Add osnoise tracer In the context of high-performance computing (HPC), the Operating System Noise (*osnoise*) refers to the interference experienced by an application due to activities inside the operating system. In the context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread can cause noise to the system. Moreover, hardware-related jobs can also cause noise, for example, via SMIs. The osnoise tracer leverages the hwlat_detector by running a similar loop with preemption, SoftIRQs and IRQs enabled, thus allowing all the sources of *osnoise* during its execution. Using the same approach of hwlat, osnoise takes note of the entry and exit point of any source of interferences, increasing a per-cpu interference counter. The osnoise tracer also saves an interference counter for each source of interference. The interference counter for NMI, IRQs, SoftIRQs, and threads is increased anytime the tool observes these interferences' entry events. When a noise happens without any interference from the operating system level, the hardware noise counter increases, pointing to a hardware-related noise. In this way, osnoise can account for any source of interference. At the end of the period, the osnoise tracer prints the sum of all noise, the max single noise, the percentage of CPU available for the thread, and the counters for the noise sources. Usage Write the ASCII text "osnoise" into the current_tracer file of the tracing system (generally mounted at /sys/kernel/tracing). For example:: [root@f32 ~]# cd /sys/kernel/tracing/ [root@f32 tracing]# echo osnoise > current_tracer It is possible to follow the trace by reading the trace trace file:: [root@f32 tracing]# cat trace # tracer: osnoise # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth MAX # || / SINGLE Interference counters: # |||| RUNTIME NOISE % OF CPU NOISE +-----------------------------+ # TASK-PID CPU# |||| TIMESTAMP IN US IN US AVAILABLE IN US HW NMI IRQ SIRQ THREAD # | | | |||| | | | | | | | | | | <...>-859 [000] .... 81.637220: 1000000 190 99.98100 9 18 0 1007 18 1 <...>-860 [001] .... 81.638154: 1000000 656 99.93440 74 23 0 1006 16 3 <...>-861 [002] .... 81.638193: 1000000 5675 99.43250 202 6 0 1013 25 21 <...>-862 [003] .... 81.638242: 1000000 125 99.98750 45 1 0 1011 23 0 <...>-863 [004] .... 81.638260: 1000000 1721 99.82790 168 7 0 1002 49 41 <...>-864 [005] .... 81.638286: 1000000 263 99.97370 57 6 0 1006 26 2 <...>-865 [006] .... 81.638302: 1000000 109 99.98910 21 3 0 1006 18 1 <...>-866 [007] .... 81.638326: 1000000 7816 99.21840 107 8 0 1016 39 19 In addition to the regular trace fields (from TASK-PID to TIMESTAMP), the tracer prints a message at the end of each period for each CPU that is running an osnoise/CPU thread. The osnoise specific fields report: - The RUNTIME IN USE reports the amount of time in microseconds that the osnoise thread kept looping reading the time. - The NOISE IN US reports the sum of noise in microseconds observed by the osnoise tracer during the associated runtime. - The % OF CPU AVAILABLE reports the percentage of CPU available for the osnoise thread during the runtime window. - The MAX SINGLE NOISE IN US reports the maximum single noise observed during the runtime window. - The Interference counters display how many each of the respective interference happened during the runtime window. Note that the example above shows a high number of HW noise samples. The reason being is that this sample was taken on a virtual machine, and the host interference is detected as a hardware interference. Tracer options The tracer has a set of options inside the osnoise directory, they are: - osnoise/cpus: CPUs at which a osnoise thread will execute. - osnoise/period_us: the period of the osnoise thread. - osnoise/runtime_us: how long an osnoise thread will look for noise. - osnoise/stop_tracing_us: stop the system tracing if a single noise higher than the configured value happens. Writing 0 disables this option. - osnoise/stop_tracing_total_us: stop the system tracing if total noise higher than the configured value happens. Writing 0 disables this option. - tracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will be used, which is currently 5 us. Additional Tracing In addition to the tracer, a set of tracepoints were added to facilitate the identification of the osnoise source. - osnoise:sample_threshold: printed anytime a noise is higher than the configurable tolerance_ns. - osnoise:nmi_noise: noise from NMI, including the duration. - osnoise:irq_noise: noise from an IRQ, including the duration. - osnoise:softirq_noise: noise from a SoftIRQ, including the duration. - osnoise:thread_noise: noise from a thread, including the duration. Note that all the values are *net values*. For example, if while osnoise is running, another thread preempts the osnoise thread, it will start a thread_noise duration at the start. Then, an IRQ takes place, preempting the thread_noise, starting a irq_noise. When the IRQ ends its execution, it will compute its duration, and this duration will be subtracted from the thread_noise, in such a way as to avoid the double accounting of the IRQ execution. This logic is valid for all sources of noise. Here is one example of the usage of these tracepoints:: osnoise/8-961 [008] d.h. 5789.857532: irq_noise: local_timer:236 start 5789.857529929 duration 1845 ns osnoise/8-961 [008] dNh. 5789.858408: irq_noise: local_timer:236 start 5789.858404871 duration 2848 ns migration/8-54 [008] d... 5789.858413: thread_noise: migration/8:54 start 5789.858409300 duration 3068 ns osnoise/8-961 [008] .... 5789.858413: sample_threshold: start 5789.858404555 duration 8723 ns interferences 2 In this example, a noise sample of 8 microseconds was reported in the last line, pointing to two interferences. Looking backward in the trace, the two previous entries were about the migration thread running after a timer IRQ execution. The first event is not part of the noise because it took place one millisecond before. It is worth noticing that the sum of the duration reported in the tracepoints is smaller than eight us reported in the sample_threshold. The reason roots in the overhead of the entry and exit code that happens before and after any interference execution. This justifies the dual approach: measuring thread and tracing. Link: https://lkml.kernel.org/r/e649467042d60e7b62714c9c6751a56299d15119.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira [ Made the following functions static: trace_irqentry_callback() trace_irqexit_callback() trace_intel_irqentry_callback() trace_intel_irqexit_callback() Added to include/trace.h: osnoise_arch_register() osnoise_arch_unregister() Fixed define logic for LATENCY_FS_NOTIFY Reported-by: kernel test robot ] Signed-off-by: Steven Rostedt (VMware) commit db0f032512443678d30aa26c247099220e3e5aee Author: Fabien Dessenne Date: Thu Jun 17 16:46:02 2021 +0200 pinctrl: stm32: check for IRQ MUX validity during alloc() Considering the following irq_domain_ops call chain: - .alloc() is called when a clients calls platform_get_irq() or gpiod_to_irq() - .activate() is called next, when the clients calls request_threaded_irq() Check for the IRQ MUX conflict during the first stage (alloc instead of activate). This avoids to provide the client with an IRQ that can't be used. Signed-off-by: Fabien Dessenne Link: https://lore.kernel.org/r/20210617144602.2557619-1-fabien.dessenne@foss.st.com Signed-off-by: Linus Walleij commit 6880c987e45172fdaca0b4c07b0990f5b3c74f70 Author: Steven Rostedt (VMware) Date: Fri Jun 25 19:47:33 2021 -0400 tracing: Add LATENCY_FS_NOTIFY to define if latency_fsnotify() is defined With the coming addition of the osnoise tracer, the configs needed to include the latency_fsnotify() has become more complex, and to keep the declaration in the header file the same as in the C file, just have the logic needed to define it in one place, and that defines LATENCY_FS_NOTIFY which will be used in the C code. Reported-by: kernel test robot Signed-off-by: Steven Rostedt (VMware) commit fa99e7013827858b9cfe43ebe539b9060a7861e8 Author: Sai Krishna Potthuri Date: Mon Jun 21 16:30:14 2021 +0530 pinctrl: zynqmp: some code cleanups Some minor code cleanups and updates which includes - Mention module name under help in Kconfig. - Remove extra lines and duplicate Pin range checks. - Replace 'return ret' with 'return 0' in success path. - Copyright year update. - use devm_pinctrl_register() instead pinctrl_register() in probe. Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/1624273214-66849-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij commit 767e6e7130b288d856e4f2be365554dc6147a80a Author: Christophe Leroy Date: Fri Jun 25 14:31:46 2021 +0000 powerpc/interrupt: Also use exit_must_hard_disable() on PPC32 Reduce #ifdefs a bit by making exit_must_hard_disable() return true on PPC32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/52531029563c1fc823b790058e799d0ca71b028c.1624631463.git.christophe.leroy@csgroup.eu commit 2f0d67bf4cecb7b5c1c91c85c6a0c08a830adb85 Author: Alexandru Ardelean Date: Thu Jun 24 11:47:37 2021 +0300 clk: tegra: clk-tegra124-dfll-fcpu: don't use devm functions for regulator The purpose of the device-managed functions is to bind the life-time of an object to that of a parent device object. This is not the case for the 'vdd-cpu' regulator in this driver. A reference is obtained via devm_regulator_get() and immediately released with devm_regulator_put(). In this case, the usage of devm_ functions is slightly excessive, as the un-managed versions of these functions is a little cleaner (and slightly more economical in terms of allocation). This change converts the devm_regulator_{get,put}() to regulator_{get,put}() in the get_alignment_from_regulator() function of this driver. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210624084737.42336-1-aardelean@deviqon.com Reviewed-by: Thierry Reding Signed-off-by: Stephen Boyd commit b9ec1c1f9c1bd0344a34a3309b9cc8eba59d7da8 Author: Christophe JAILLET Date: Sat May 1 13:24:32 2021 +0200 clk: zynqmp: pll: Remove some dead code 'clk_hw_set_rate_range()' does not return any error code and 'ret' is known to be 0 at this point, so this message can never be displayed. Remove it. Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/71a9fed5f762a71248b8ac73c0a15af82f3ce1e2.1619867987.git.christophe.jaillet@wanadoo.fr Reviewed-by: Michael Tretter Signed-off-by: Stephen Boyd commit 6c9feabc2c6bd49abbd2130341e7cb91f42d3fa5 Author: Michal Simek Date: Tue Jun 22 12:15:11 2021 +0200 clk: zynqmp: fix compile testing without ZYNQMP_FIRMWARE When the firmware code is disabled, the incomplete error handling in the clk driver causes compile-time warnings: drivers/clk/zynqmp/pll.c: In function 'zynqmp_pll_recalc_rate': drivers/clk/zynqmp/pll.c:147:29: error: 'fbdiv' is used uninitialized [-Werror=uninitialized] 147 | rate = parent_rate * fbdiv; | ~~~~~~~~~~~~^~~~~~~ In function 'zynqmp_pll_get_mode', inlined from 'zynqmp_pll_recalc_rate' at drivers/clk/zynqmp/pll.c:148:6: drivers/clk/zynqmp/pll.c:61:27: error: 'ret_payload' is used uninitialized [-Werror=uninitialized] 61 | return ret_payload[1]; | ~~~~~~~~~~~^~~ drivers/clk/zynqmp/pll.c: In function 'zynqmp_pll_recalc_rate': drivers/clk/zynqmp/pll.c:53:13: note: 'ret_payload' declared here 53 | u32 ret_payload[PAYLOAD_ARG_CNT]; | ^~~~~~~~~~~ drivers/clk/zynqmp/clk-mux-zynqmp.c: In function 'zynqmp_clk_mux_get_parent': drivers/clk/zynqmp/clk-mux-zynqmp.c:57:16: error: 'val' is used uninitialized [-Werror=uninitialized] 57 | return val; | ^~~ As it was apparently intentional to support this for compile testing purposes, change the code to have just enough error handling for the compiler to not notice the remaining bugs. Fixes: 21f237534661 ("clk: zynqmp: Drop dependency on ARCH_ZYNQMP") Co-developed-by: Arnd Bergmann Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/f1c4e8c903fe2d5df5413421920a56890a46387a.1624356908.git.michal.simek@xilinx.com Signed-off-by: Stephen Boyd commit aef6a521e5bf61b3be4567f6c88776956a6d8b32 Author: Bjorn Andersson Date: Tue Jun 8 10:49:44 2021 -0700 remoteproc: qcom: pas: Add SC8180X adsp, cdsp and mpss The Qualcomm SC8180X has the typical ADSP, CDSP and MPSS remote processors operated using the PAS interface, add support for these. Attempts to configuring mss.lvl is failing, so a new adsp_data is provided that skips this resource, for now. Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210608174944.2045215-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 4865ed13604538991c247db7756f3046102cce6d Author: Bjorn Andersson Date: Tue Jun 8 10:49:43 2021 -0700 dt-bindings: remoteproc: qcom: pas: Add SC8180X adsp, cdsp and mpss Add compatibles for the Audio DSP, Compute DSP and Modem subsystem found in the Qualcomm SC8180x to the Peripheral Authentication Service remoteproc binding. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210608174944.2045215-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit feb29cc744c1d4d503138708964f21840c23b3ea Author: Geert Uytterhoeven Date: Fri Jun 11 14:30:47 2021 +0200 dt-bindings: clock: gpio-mux-clock: Convert to json-schema Convert the simple GPIO clock multiplexer Device Tree binding documentation to json-schema. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/14cb3b4da446f26a4780e0bd1b58788eb6085d05.1623414619.git.geert+renesas@glider.be Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 62de4f29e9174e67beb8d34ef5ced6730e087a31 Author: Steven Rostedt Date: Tue Jun 22 16:42:26 2021 +0200 trace: Add __print_ns_to_secs() and __print_ns_without_secs() helpers To have nanosecond output displayed in a more human readable format, its nicer to convert it to a seconds format (XXX.YYYYYYYYY). The problem is that to do so, the numbers must be divided by NSEC_PER_SEC, and moded too. But as these numbers are 64 bit, this can not be done simply with '/' and '%' operators, but must use do_div() instead. Instead of performing the expensive do_div() in the hot path of the tracepoint, it is more efficient to perform it during the output phase. But passing in do_div() can confuse the parser, and do_div() doesn't work exactly like a normal C function. It modifies the number in place, and we don't want to modify the actual values in the ring buffer. Two helper functions are now created: __print_ns_to_secs() and __print_ns_without_secs() They both take a value of nanoseconds, and the former will return that number divided by NSEC_PER_SEC, and the latter will mod it with NSEC_PER_SEC giving a way to print a nice human readable format: __print_fmt("time=%llu.%09u", __print_ns_to_secs(REC->nsec_val), __print_ns_without_secs(REC->nsec_val)) Link: https://lkml.kernel.org/r/e503b903045496c4ccde52843e1e318b422f7a56.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Steven Rostedt Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit aa892f8c887dd4331458d04de9425cde6664c694 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:25 2021 +0200 trace/hwlat: Remove printk from sampling loop hwlat has some time operation checks on the sample loop, and it is currently using pr_err (printk) to report them. The problem is that this can lead the system to an unresponsible state due to an overflow of printk messages. This problem can be mitigated by writing the error message to the trace buffer. Remove the printk messages from the sampling loop, switching the to messages in the trace buffer. No functional change. Link: https://lkml.kernel.org/r/9d77c34869748aa105e965c769d24642914eea3a.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit f27a1c9e1ba1e4f18f2c01e7bcbc400651ed821d Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:24 2021 +0200 trace/hwlat: Use trace_min_max_param for width and window params Use the trace_min_max_param to reduce code duplication. No functional change. Link: https://lkml.kernel.org/r/b91accd5a7c6c14ea02d3379aae974ba22b47dd6.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit bc87cf0a08d437ea192b15f0918cb581a8698f15 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:23 2021 +0200 trace: Add a generic function to read/write u64 values from tracefs The hwlat detector and (in preparation for) the osnoise/timerlat tracers have a set of u64 parameters that the user can read/write via tracefs. For instance, we have hwlat_detector's window and width. To reduce the code duplication, hwlat's window and width share the same read function. However, they do not share the write functions because they do different parameter checks. For instance, the width needs to be smaller than the window, while the window needs to be larger than the window. The same pattern repeats on osnoise/timerlat, and a large portion of the code was devoted to the write function. Despite having different checks, the write functions have the same structure: read a user-space buffer take the lock that protects the value check for minimum and maximum acceptable values save the value release the lock return success or error To reduce the code duplication also in the write functions, this patch provides a generic read and write implementation for u64 values that need to be within some minimum and/or maximum parameters, while (potentially) being protected by a lock. To use this interface, the structure trace_min_max_param needs to be filled: struct trace_min_max_param { struct mutex *lock; u64 *val; u64 *min; u64 *max; }; The desired value is stored on the variable pointed by *val. If *min points to a minimum acceptable value, it will be checked during the write operation. Likewise, if *max points to a maximum allowable value, it will be checked during the write operation. Finally, if *lock points to a mutex, it will be taken at the beginning of the operation and released at the end. The definition of a trace_min_max_param needs to passed as the (private) *data for tracefs_create_file(), and the trace_min_max_fops (added by this patch) as the *fops file_operations. Link: https://lkml.kernel.org/r/3e35760a7c8b5c55f16ae5ad5fc54a0e71cbe647.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit f46b16520a087e892a189db9c23ccf7e9bb5fa69 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:22 2021 +0200 trace/hwlat: Implement the per-cpu mode Implements the per-cpu mode in which a sampling thread is created for each cpu in the "cpus" (and tracing_mask). The per-cpu mode has the potention to speed up the hwlat detection by running on multiple CPUs at the same time, at the cost of higher cpu usage with irqs disabled. Use with care. [ Changed get_cpu_data() to static. Reported-by: kernel test robot ] Link: https://lkml.kernel.org/r/ec06d0ab340e8460d293772faba19ad8a5c371aa.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 1effb72a8179a02c2dd8a268454ccf50bf68aa50 Author: Dave Chinner Date: Fri Jun 25 11:21:02 2021 -0700 xfs: don't wait on future iclogs when pushing the CIL The iclogbuf ring attached to the struct xlog is circular, hence the first and last iclogs in the ring can only be determined by comparing them against the log->l_iclog pointer. In xfs_cil_push_work(), we want to wait on previous iclogs that were issued so that we can flush them to stable storage with the commit record write, and it simply waits on the previous iclog in the ring. This, however, leads to CIL push hangs in generic/019 like so: task:kworker/u33:0 state:D stack:12680 pid: 7 ppid: 2 flags:0x00004000 Workqueue: xfs-cil/pmem1 xlog_cil_push_work Call Trace: __schedule+0x30b/0x9f0 schedule+0x68/0xe0 xlog_wait_on_iclog+0x121/0x190 ? wake_up_q+0xa0/0xa0 xlog_cil_push_work+0x994/0xa10 ? _raw_spin_lock+0x15/0x20 ? xfs_swap_extents+0x920/0x920 process_one_work+0x1ab/0x390 worker_thread+0x56/0x3d0 ? rescuer_thread+0x3c0/0x3c0 kthread+0x14d/0x170 ? __kthread_bind_mask+0x70/0x70 ret_from_fork+0x1f/0x30 With other threads blocking in either xlog_state_get_iclog_space() waiting for iclog space or xlog_grant_head_wait() waiting for log reservation space. The problem here is that the previous iclog on the ring might actually be a future iclog. That is, if log->l_iclog points at commit_iclog, commit_iclog is the first (oldest) iclog in the ring and there are no previous iclogs pending as they have all completed their IO and been activated again. IOWs, commit_iclog->ic_prev points to an iclog that will be written in the future, not one that has been written in the past. Hence, in this case, waiting on the ->ic_prev iclog is incorrect behaviour, and depending on the state of the future iclog, we can end up with a circular ABA wait cycle and we hang. The fix is made more complex by the fact that many iclogs states cannot be used to determine if the iclog is a past or future iclog. Hence we have to determine past iclogs by checking the LSN of the iclog rather than their state. A past ACTIVE iclog will have a LSN of zero, while a future ACTIVE iclog will have a LSN greater than the current iclog. We don't wait on either of these cases. Similarly, a future iclog that hasn't completed IO will have an LSN greater than the current iclog and so we don't wait on them. A past iclog that is still undergoing IO completion will have a LSN less than the current iclog and those are the only iclogs that we need to wait on. Hence we can use the iclog LSN to determine what iclogs we need to wait on here. Fixes: 5fd9256ce156 ("xfs: separate CIL commit record IO") Reported-by: Brian Foster Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 95b88f4d71cb953e02206be3c757083601391a0f Author: Mikulas Patocka Date: Fri Jun 25 15:33:02 2021 -0400 dm writecache: pause writeback if cache full and origin being written directly Implementation reuses dm_io_tracker, that until now was only used by dm-cache, to track if any writes were issued directly to the origin (due to cache being full) within the last second. If so writeback is paused for a second. This change improves performance for when the cache is full and IO is issued directly to the origin device (rather than through the cache). Depends-on: d53f1fafec9d ("dm writecache: do direct write if the cache is full") Suggested-by: Joe Thornber Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit dc4fa29fe445933f51e08674f3b325547ba52de1 Author: Mike Snitzer Date: Fri Jun 25 12:10:26 2021 -0400 dm io tracker: factor out IO tracker Allow other code to use dm_io_tracker. Signed-off-by: Mike Snitzer commit b6e58b5466b2959f83034bead2e2e1395cca8aeb Author: Hou Tao Date: Thu Jun 17 15:45:47 2021 +0800 dm btree remove: assign new_root only when removal succeeds remove_raw() in dm_btree_remove() may fail due to IO read error (e.g. read the content of origin block fails during shadowing), and the value of shadow_spine::root is uninitialized, but the uninitialized value is still assign to new_root in the end of dm_btree_remove(). For dm-thin, the value of pmd->details_root or pmd->root will become an uninitialized value, so if trying to read details_info tree again out-of-bound memory may occur as showed below: general protection fault, probably for non-canonical address 0x3fdcb14c8d7520 CPU: 4 PID: 515 Comm: dmsetup Not tainted 5.13.0-rc6 Hardware name: QEMU Standard PC RIP: 0010:metadata_ll_load_ie+0x14/0x30 Call Trace: sm_metadata_count_is_more_than_one+0xb9/0xe0 dm_tm_shadow_block+0x52/0x1c0 shadow_step+0x59/0xf0 remove_raw+0xb2/0x170 dm_btree_remove+0xf4/0x1c0 dm_pool_delete_thin_device+0xc3/0x140 pool_message+0x218/0x2b0 target_message+0x251/0x290 ctl_ioctl+0x1c4/0x4d0 dm_ctl_ioctl+0xe/0x20 __x64_sys_ioctl+0x7b/0xb0 do_syscall_64+0x40/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixing it by only assign new_root when removal succeeds Signed-off-by: Hou Tao Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 28436ba34b7d1b6af2a898d37ee678a1eb643db4 Author: Damien Le Moal Date: Sat Jun 19 08:15:19 2021 +0900 dm zone: fix dm_revalidate_zones() memory allocation Make sure that the zone write pointer offset array is allocated with a vmalloc in dm_zone_revalidate_cb() by passing GFP_KERNEL gfp flag to kvcalloc(). However, since we do not want to trigger IOs while revalidating zones, change dm_revalidate_zones() to have the zone scan done in GFP_NOIO context using memalloc_noio_save/restore calls. Reported-by: Dan Carpenter Fixes: bb37d77239af ("dm: introduce zone append emulation") Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 326dbde2e0a77be107c9ddd04899fd9ee27ffc94 Author: Colin Ian King Date: Wed Jun 16 14:29:53 2021 +0100 dm ps io affinity: remove redundant continue statement The continue statement at the end of a for-loop has no effect, remove it. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Signed-off-by: Mike Snitzer commit 611c3e168b1c5b6cf81e6deb8f6b4eb83f6b53fd Author: Mikulas Patocka Date: Mon Jun 21 05:22:21 2021 -0400 dm writecache: add optional "metadata_only" parameter Add a "metadata_only" parameter that when present: only metadata is promoted to the cache. This option improves performance for heavier REQ_META workloads (e.g. device-mapper-test-suite's "git clone and checkout" benchmark improves from 341s to 312s). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit cd039afa0ad86e1f01921cc5abf7f80d2449543a Author: Mike Snitzer Date: Fri Jun 25 15:18:59 2021 -0400 dm writecache: add "cleaner" and "max_age" to Documentation Backfill missing Documentation. Fixes: 93de44eb3fc8 ("dm writecache: implement the "cleaner" policy") Fixes: 3923d4854e18 ("dm writecache: implement gradual cleanup") Signed-off-by: Mike Snitzer commit 0fa757b5d3ea6e3d3d59f0e0d34c8214b8643b8f Author: Steve French Date: Fri Jun 25 13:54:32 2021 -0500 smb3: prevent races updating CurrentMid There was one place where we weren't locking CurrentMid, and although likely to be safe since even without the lock since it is during negotiate protocol, it is more consistent to lock it in this last remaining place, and avoids confusing Coverity warning. Addresses-Coverity: 1486665 ("Data race condition") Signed-off-by: Steve French commit ff8744b5eb116fdf9b80a6ff774393afac7325bd Merge: 17081633e22d8 b81c191c468bb Author: David S. Miller Date: Fri Jun 25 11:59:11 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-06-25 This series contains updates to ice driver only. Jesse adds support for tracepoints to aide in debugging. Maciej adds support for PTP auxiliary pin support. Victor removes the VSI info from the old aggregator when moving the VSI to another aggregator. Tony removes an unnecessary VSI assignment. Christophe Jaillet fixes a memory leak for failed allocation in ice_pf_dcb_cfg(). ==================== Signed-off-by: David S. Miller commit 17081633e22d83be928a779fd7acd04b247dec90 Author: Guvenc Gulce Date: Fri Jun 25 17:11:02 2021 +0200 net/smc: Ensure correct state of the socket in send path When smc_sendmsg() is called before the SMC socket initialization has completed, smc_tx_sendmsg() will access un-initialized fields of the SMC socket which results in a null-pointer dereference. Fix this by checking the socket state first in smc_tx_sendmsg(). Fixes: e0e4b8fa5338 ("net/smc: Add SMC statistics support") Reported-by: syzbot+5dda108b672b54141857@syzkaller.appspotmail.com Reviewed-by: Karsten Graul Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 4e3db44a242a4e2afe33b59793898ecbb61d478e Merge: ac53c26433b51 c2a3823dad498 Author: David S. Miller Date: Fri Jun 25 11:50:02 2021 -0700 Merge tag 'wireless-drivers-next-2021-06-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.14 Second, and most likely the last, set of patches for v5.14. mt76 and iwlwifi have most patches in this round, but rtw88 also has some new features. Nothing special really standing out. mt76 * mt7915 MSI support * disable ASPM on mt7915 * mt7915 tx status reporting * mt7921 decap offload rtw88 * beacon filter support * path diversity support * firmware crash information via devcoredump * quirks for disabling pci capabilities mt7601u * add USB ID for a XiaoDu WiFi Dongle ath11k * enable support for QCN9074 PCI devices brcmfmac * support parse country code map from DeviceTree iwlwifi * support for new hardware * support for BIOS control of 11ax enablement in Russia * support UNII4 band enablement from BIOS ==================== Signed-off-by: David S. Miller commit ac53c26433b51f1835ce5a935970e427d83e3ec5 Author: Marcin Wojtas Date: Fri Jun 25 12:38:53 2021 +0200 net: mdiobus: withdraw fwnode_mdbiobus_register The newly implemented fwnode_mdbiobus_register turned out to be problematic - in case the fwnode_/of_/acpi_mdio are built as modules, a dependency cycle can be observed during the depmod phase of modules_install, eg.: depmod: ERROR: Cycle detected: fwnode_mdio -> of_mdio -> fwnode_mdio depmod: ERROR: Found 2 modules in dependency cycles! OR: depmod: ERROR: Cycle detected: acpi_mdio -> fwnode_mdio -> acpi_mdio depmod: ERROR: Found 2 modules in dependency cycles! A possible solution could be to rework fwnode_mdiobus_register, so that to merge the contents of acpi_mdiobus_register and of_mdiobus_register. However feasible, such change would be very intrusive and affect huge amount of the of_mdiobus_register users. Since there are currently 2 users of ACPI and MDIO (xgmac_mdio and mvmdio), withdraw the fwnode_mdbiobus_register and roll back to a simple 'if' condition in affected drivers. Fixes: 62a6ef6a996f ("net: mdiobus: Introduce fwnode_mdbiobus_register()") Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit d6765985a42a660f078896d5c5b27f97c580a490 Author: Petr Oros Date: Fri Jun 25 10:27:45 2021 +0200 Revert "be2net: disable bh with spin_lock in be_process_mcc" Patch was based on wrong presumption that be_poll can be called only from bh context. It reintroducing old regression (also reverted) and causing deadlock when we use netconsole with benet in bonding. Old revert: commit 072a9c486004 ("netpoll: revert 6bdb7fe3104 and fix be_poll() instead") [ 331.269715] bond0: (slave enp0s7f0): Releasing backup interface [ 331.270121] CPU: 4 PID: 1479 Comm: ifenslave Not tainted 5.13.0-rc7+ #2 [ 331.270122] Call Trace: [ 331.270122] [c00000001789f200] [c0000000008c505c] dump_stack+0x100/0x174 (unreliable) [ 331.270124] [c00000001789f240] [c008000001238b9c] be_poll+0x64/0xe90 [be2net] [ 331.270125] [c00000001789f330] [c000000000d1e6e4] netpoll_poll_dev+0x174/0x3d0 [ 331.270127] [c00000001789f400] [c008000001bc167c] bond_poll_controller+0xb4/0x130 [bonding] [ 331.270128] [c00000001789f450] [c000000000d1e624] netpoll_poll_dev+0xb4/0x3d0 [ 331.270129] [c00000001789f520] [c000000000d1ed88] netpoll_send_skb+0x448/0x470 [ 331.270130] [c00000001789f5d0] [c0080000011f14f8] write_msg+0x180/0x1b0 [netconsole] [ 331.270131] [c00000001789f640] [c000000000230c0c] console_unlock+0x54c/0x790 [ 331.270132] [c00000001789f7b0] [c000000000233098] vprintk_emit+0x2d8/0x450 [ 331.270133] [c00000001789f810] [c000000000234758] vprintk+0xc8/0x270 [ 331.270134] [c00000001789f850] [c000000000233c28] printk+0x40/0x54 [ 331.270135] [c00000001789f870] [c000000000ccf908] __netdev_printk+0x150/0x198 [ 331.270136] [c00000001789f910] [c000000000ccfdb4] netdev_info+0x68/0x94 [ 331.270137] [c00000001789f950] [c008000001bcbd70] __bond_release_one+0x188/0x6b0 [bonding] [ 331.270138] [c00000001789faa0] [c008000001bcc6f4] bond_do_ioctl+0x42c/0x490 [bonding] [ 331.270139] [c00000001789fb60] [c000000000d0d17c] dev_ifsioc+0x17c/0x400 [ 331.270140] [c00000001789fbc0] [c000000000d0db70] dev_ioctl+0x390/0x890 [ 331.270141] [c00000001789fc10] [c000000000c7c76c] sock_do_ioctl+0xac/0x1b0 [ 331.270142] [c00000001789fc90] [c000000000c7ffac] sock_ioctl+0x31c/0x6e0 [ 331.270143] [c00000001789fd60] [c0000000005b9728] sys_ioctl+0xf8/0x150 [ 331.270145] [c00000001789fdb0] [c0000000000336c0] system_call_exception+0x160/0x2f0 [ 331.270146] [c00000001789fe10] [c00000000000d35c] system_call_common+0xec/0x278 [ 331.270147] --- interrupt: c00 at 0x7fffa6c6ec00 [ 331.270147] NIP: 00007fffa6c6ec00 LR: 0000000105c4185c CTR: 0000000000000000 [ 331.270148] REGS: c00000001789fe80 TRAP: 0c00 Not tainted (5.13.0-rc7+) [ 331.270148] MSR: 800000000280f033 CR: 28000428 XER: 00000000 [ 331.270155] IRQMASK: 0 [ 331.270156] GPR00: 0000000000000036 00007fffd494d5b0 00007fffa6d57100 0000000000000003 [ 331.270158] GPR04: 0000000000008991 00007fffd494d6d0 0000000000000008 00007fffd494f28c [ 331.270161] GPR08: 0000000000000003 0000000000000000 0000000000000000 0000000000000000 [ 331.270164] GPR12: 0000000000000000 00007fffa6dfa220 0000000000000000 0000000000000000 [ 331.270167] GPR16: 0000000105c44880 0000000000000000 0000000105c60088 0000000105c60318 [ 331.270170] GPR20: 0000000105c602c0 0000000105c44560 0000000000000000 0000000000000000 [ 331.270172] GPR24: 00007fffd494dc50 00007fffd494d6a8 0000000105c60008 00007fffd494d6d0 [ 331.270175] GPR28: 00007fffd494f27e 0000000105c6026c 00007fffd494f284 0000000000000000 [ 331.270178] NIP [00007fffa6c6ec00] 0x7fffa6c6ec00 [ 331.270178] LR [0000000105c4185c] 0x105c4185c [ 331.270179] --- interrupt: c00 This reverts commit d0d006a43e9a7a796f6f178839c92fcc222c564d. Fixes: d0d006a43e9a7a ("be2net: disable bh with spin_lock in be_process_mcc") Signed-off-by: Petr Oros Signed-off-by: David S. Miller commit b81c191c468bb9f9e63cb19cdf090732e3218dce Author: Christophe JAILLET Date: Sun Jun 20 15:28:06 2021 +0200 ice: Fix a memory leak in an error handling path in 'ice_pf_dcb_cfg()' If this 'kzalloc()' fails we must free some resources as in all the other error handling paths of this function. Fixes: 348048e724a0 ("ice: Implement iidc operations") Signed-off-by: Christophe JAILLET Signed-off-by: Tony Nguyen commit 70fa0a078099881c1e0553a7c351a28a575afcfc Author: Tony Nguyen Date: Mon Jun 14 14:46:07 2021 -0700 ice: remove unnecessary VSI assignment ice_get_vf_vsi() is being called twice for the same VSI. Remove the unnecessary call/assignment. Signed-off-by: Tony Nguyen Tested-by: Tony Brelinski commit 37c592062b16d349dc2344936ee6100265d327a0 Author: Victor Raj Date: Mon Jun 14 14:46:06 2021 -0700 ice: remove the VSI info from previous agg Remove the VSI info from previous aggregator after moving the VSI to a new aggregator. Signed-off-by: Victor Raj Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 172db5f91d5f7b91670c68a7547798b0b5374158 Author: Maciej Machnikowski Date: Wed Jun 16 09:35:22 2021 -0700 ice: add support for auxiliary input/output pins The E810 device supports programmable pins for enabling both input and output events related to the PTP hardware clock. This includes both output signals with programmable period, as well as timestamping of events on input pins. Add support for enabling these using the CONFIG_PTP_1588_CLOCK interface. This allows programming the software defined pins to take advantage of the hardware clock features. Signed-off-by: Maciej Machnikowski Signed-off-by: Jacob Keller Signed-off-by: Tony Nguyen commit 1db1a862a08f85edc36aad091236ac9b818e949e Author: Bailey Forrest Date: Thu Jun 24 19:55:41 2021 -0700 gve: Fix swapped vars when fetching max queues Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC") Signed-off-by: Bailey Forrest Signed-off-by: David S. Miller commit a1bb8505e92101df94080f81298e3640f5fbe037 Author: Dave Chinner Date: Fri Jun 25 11:21:01 2021 -0700 xfs: Fix a CIL UAF by getting get rid of the iclog callback lock The iclog callback chain has it's own lock. That was added way back in 2008 by myself to alleviate severe lock contention on the icloglock in commit 114d23aae512 ("[XFS] Per iclog callback chain lock"). This was long before delayed logging took the icloglock out of the hot transaction commit path and removed all contention on it. Hence the separate ic_callback_lock doesn't serve any scalability purpose anymore, and hasn't for close on a decade. Further, we only attach callbacks to iclogs in one place where we are already taking the icloglock soon after attaching the callbacks. We also have to drop the icloglock to run callbacks and grab it immediately afterwards again. So given that the icloglock is no longer hot, making it cover callbacks again doesn't really change the locking patterns very much at all. We also need to extend the icloglock to cover callback addition to fix a zero-day UAF in the CIL push code. This occurs when shutdown races with xlog_cil_push_work() and the shutdown runs the callbacks before the push releases the iclog. This results in the CIL context structure attached to the iclog being freed by the callback before the CIL push has finished referencing it, leading to UAF bugs. Hence, to avoid this UAF, we need the callback attachment to be atomic with post processing of the commit iclog and references to the structures being attached to the iclog. This requires holding the icloglock as that's the only way to serialise iclog state against a shutdown in progress. The result is we need to be using the icloglock to protect the callback list addition and removal and serialise them with shutdown. That makes the ic_callback_lock redundant and so it can be removed. Fixes: 71e330b59390 ("xfs: Introduce delayed logging core code") Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b6903358c230c517b29ecdb6123276d96cc0beab Author: Dave Chinner Date: Fri Jun 25 11:21:01 2021 -0700 xfs: remove callback dequeue loop from xlog_state_do_iclog_callbacks If we are processing callbacks on an iclog, nothing can be concurrently adding callbacks to the loop. We only add callbacks to the iclog when they are in ACTIVE or WANT_SYNC state, and we explicitly do not add callbacks if the iclog is already in IOERROR state. The only way to have a dequeue racing with an enqueue is to be processing a shutdown without a direct reference to an iclog in ACTIVE or WANT_SYNC state. As the enqueue avoids this race condition, we only ever need a single dequeue operation in xlog_state_do_iclog_callbacks(). Hence we can remove the loop. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6be001021f0b307c8c1544e8b3ac87de20d711de Author: Dave Chinner Date: Fri Jun 25 11:21:00 2021 -0700 xfs: don't nest icloglock inside ic_callback_lock It's completely unnecessary because callbacks are added to iclogs without holding the icloglock, hence no amount of ordering between the icloglock and ic_callback_lock will order the removal of callbacks from the iclog. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f92e1869d74e1acc6551256eb084a1c14a054e19 Author: David Thompson Date: Thu Jun 24 21:11:46 2021 -0400 Add Mellanox BlueField Gigabit Ethernet driver This patch adds build and driver logic for the "mlxbf_gige" Ethernet driver from Mellanox Technologies. The second generation BlueField SoC from Mellanox supports an out-of-band GigaBit Ethernet management port to the Arm subsystem. This driver supports TCP/IP network connectivity for that port, and provides back-end routines to handle basic ethtool requests. The driver interfaces to the Gigabit Ethernet block of BlueField SoC via MMIO accesses to registers, which contain control information or pointers describing transmit and receive resources. There is a single transmit queue, and the port supports transmit ring sizes of 4 to 256 entries. There is a single receive queue, and the port supports receive ring sizes of 32 to 32K entries. The transmit and receive rings are allocated from DMA coherent memory. There is a 16-bit producer and consumer index per ring to denote software ownership and hardware ownership, respectively. The main driver logic such as probe(), remove(), and netdev ops are in "mlxbf_gige_main.c". Logic in "mlxbf_gige_rx.c" and "mlxbf_gige_tx.c" handles the packet processing for receive and transmit respectively. The logic in "mlxbf_gige_ethtool.c" supports the handling of some basic ethtool requests: get driver info, get ring parameters, get registers, and get statistics. The logic in "mlxbf_gige_mdio.c" is the driver controlling the Mellanox BlueField hardware that interacts with a PHY device via MDIO/MDC pins. This driver does the following: - At driver probe time, it configures several BlueField MDIO parameters such as sample rate, full drive, voltage and MDC - It defines functions to read and write MDIO registers and registers the MDIO bus. - It defines the phy interrupt handler reporting a link up/down status change - This driver's probe is invoked from the main driver logic while the phy interrupt handler is registered in ndo_open. Driver limitations - Only supports 1Gbps speed - Only supports GMII protocol - Supports maximum packet size of 2KB - Does not support scatter-gather buffering Testing - Successful build of kernel for ARM64, ARM32, X86_64 - Tested ARM64 build on FastModels & Palladium - Tested ARM64 build on several Mellanox boards that are built with the BlueField-2 SoC. The testing includes coverage in the areas of networking (e.g. ping, iperf, ifconfig, route), file transfers (e.g. SCP), and various ethtool options relevant to this driver. Signed-off-by: David Thompson Signed-off-by: Asmaa Mnebhi Reviewed-by: Liming Sun Signed-off-by: David S. Miller commit d3a3340b6af28ab79a66687973fb0287d976d490 Author: Allison Henderson Date: Fri Jun 25 11:19:58 2021 -0700 xfs: Initialize error in xfs_attr_remove_iter A recent bug report generated a warning that a code path in xfs_attr_remove_iter could potentially return error uninitialized in the case of XFS_DAS_RM_SHRINK state. Fix this by initializing error. Signed-off-by: Allison Henderson Reported-by: Dan Carpenter Reviewed-by: Brian Foster Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ff70202b2d1ad522275c6aadc8c53519b6a22c57 Author: Nicolas Dichtel Date: Thu Jun 24 10:05:05 2021 +0200 dev_forward_skb: do not scrub skb mark within the same name space The goal is to keep the mark during a bpf_redirect(), like it is done for legacy encapsulation / decapsulation, when there is no x-netns. This was initially done in commit 213dd74aee76 ("skbuff: Do not scrub skb mark within the same name space"). When the call to skb_scrub_packet() was added in dev_forward_skb() (commit 8b27f27797ca ("skb: allow skb_scrub_packet() to be used by tunnels")), the second argument (xnet) was set to true to force a call to skb_orphan(). At this time, the mark was always cleanned up by skb_scrub_packet(), whatever xnet value was. This call to skb_orphan() was removed later in commit 9c4c325252c5 ("skbuff: preserve sock reference when scrubbing the skb."). But this 'true' stayed here without any real reason. Let's correctly set xnet in ____dev_forward_skb(), this function has access to the previous interface and to the new interface. Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 1d71307a6f94df3750f8f884545a769e227172fe Author: Daniel Latypov Date: Tue Apr 20 19:04:27 2021 -0700 kunit: add unit test for filtering suites by names This adds unit tests for kunit_filter_subsuite() and kunit_filter_suites(). Note: what the executor means by "subsuite" is the array of suites corresponding to each test file. This patch lightly refactors executor.c to avoid the use of global variables to make it testable. It also includes a clever `kfree_at_end()` helper that makes this test easier to write than it otherwise would have been. Tested by running just the new tests using itself $ ./tools/testing/kunit/kunit.py run '*exec*' Signed-off-by: Daniel Latypov Reviewed-by: David Gow Acked-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 40eb5cf4cc913dbb615eb97d05f2353f0404a464 Author: Marco Elver Date: Thu Jun 24 23:58:15 2021 -0700 kasan: test: make use of kunit_skip() Make use of the recently added kunit_skip() to skip tests, as it permits TAP parsers to recognize if a test was deliberately skipped. Signed-off-by: Marco Elver Signed-off-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit d99ea675141934a1ea5cd1b2adff34eafcb779bc Author: David Gow Date: Thu Jun 24 23:58:14 2021 -0700 kunit: test: Add example tests which are always skipped Add two new tests to the example test suite, both of which are always skipped. This is used as an example for how to write tests which are skipped, and to demonstrate the difference between kunit_skip() and kunit_mark_skipped(). Note that these tests are enabled by default, so a default run of KUnit will have two skipped tests. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Reviewed-by: Marco Elver Signed-off-by: Shuah Khan commit 5acaf6031f5349244e1fcfd74eb7b6212154fab3 Author: David Gow Date: Thu Jun 24 23:58:13 2021 -0700 kunit: tool: Support skipped tests in kunit_tool Add support for the SKIP directive to kunit_tool's TAP parser. Skipped tests now show up as such in the printed summary. The number of skipped tests is counted, and if all tests in a suite are skipped, the suite is also marked as skipped. Otherwise, skipped tests do affect the suite result. Example output: [00:22:34] ======== [SKIPPED] example_skip ======== [00:22:34] [SKIPPED] example_skip_test # SKIP this test should be skipped [00:22:34] [SKIPPED] example_mark_skipped_test # SKIP this test should be skipped [00:22:34] ============================================================ [00:22:34] Testing complete. 2 tests run. 0 failed. 0 crashed. 2 skipped. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 6d2426b2f258da19fbe5fa1c93a5695460390eac Author: David Gow Date: Thu Jun 24 23:58:12 2021 -0700 kunit: Support skipped tests The kunit_mark_skipped() macro marks the current test as "skipped", with the provided reason. The kunit_skip() macro will mark the test as skipped, and abort the test. The TAP specification supports this "SKIP directive" as a comment after the "ok" / "not ok" for a test. See the "Directives" section of the TAP spec for details: https://testanything.org/tap-specification.html#directives The 'success' field for KUnit tests is replaced with a kunit_status enum, which can be SUCCESS, FAILURE, or SKIPPED, combined with a 'status_comment' containing information on why a test was skipped. A new 'kunit_status' test suite is added to test this. Signed-off-by: David Gow Tested-by: Marco Elver Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 824945a5b0ff8260a568b87968172d728446d8f7 Author: David Gow Date: Thu Jun 24 01:48:23 2021 -0700 thunderbolt: test: Reinstate a few casts of bitfields Partially revert "thunderbolt: test: Remove some casts which are no longer required". It turns out that typeof() doesn't support bitfields, so these still need to be cast to the appropriate enum. The only mention of typeof() and bitfields I can find is in the proposal to standardise them: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2619.htm This was caught by the kernel test robot: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/FDKBHAV7QNLNFU5NBI2RKV56DWDSOLGM/ Fixes: 8f0877c26e4b ("thunderbolt: test: Remove some casts which are no longer required") Reported-by: kernel test robot Signed-off-by: David Gow Signed-off-by: Shuah Khan commit b29b14f11d8803e59645644363d7b1cb314fff3f Author: Daniel Latypov Date: Wed May 26 01:22:17 2021 -0700 kunit: tool: internal refactor of parser input handling Note: this does not change the parser behavior at all (except for making one error message more useful). This is just an internal refactor. The TAP output parser currently operates over a List[str]. This works, but we only ever need to be able to "peek" at the current line and the ability to "pop" it off. Also, using a List means we need to wait for all the output before we can start parsing. While this is not an issue for most tests which are really lightweight, we do have some longer (~5 minutes) tests. This patch introduces an LineStream wrapper class that * Exposes a peek()/pop() interface instead of manipulating an array * this allows us to more easily add debugging code [1] * Can consume an input from a generator * we can now parse results as tests are running (the parser code currently doesn't print until the end, so no impact yet). * Tracks the current line number to print better error messages * Would allow us to add additional features more easily, e.g. storing N previous lines so we can print out invalid lines in context, etc. [1] The parsing logic is currently quite fragile. E.g. it'll often say the kernel "CRASHED" if there's something slightly wrong with the output format. When debugging a test that had some memory corruption issues, it resulted in very misleading errors from the parser. Now we could easily add this to trace all the lines consumed and why +import inspect ... def pop(self) -> str: n = self._next + print(f'popping {n[0]}: {n[1].ljust(40, " ")}| caller={inspect.stack()[1].function}') Example output: popping 77: TAP version 14 | caller=parse_tap_header popping 78: 1..1 | caller=parse_test_plan popping 79: # Subtest: kunit_executor_test | caller=parse_subtest_header popping 80: 1..2 | caller=parse_subtest_plan popping 81: ok 1 - parse_filter_test | caller=parse_ok_not_ok_test_case popping 82: ok 2 - filter_subsuite_test | caller=parse_ok_not_ok_test_case popping 83: ok 1 - kunit_executor_test | caller=parse_ok_not_ok_test_suite If we introduce an invalid line, we can see the parser go down the wrong path: popping 77: TAP version 14 | caller=parse_tap_header popping 78: 1..1 | caller=parse_test_plan popping 79: # Subtest: kunit_executor_test | caller=parse_subtest_header popping 80: 1..2 | caller=parse_subtest_plan popping 81: 1..2 # this is invalid! | caller=parse_ok_not_ok_test_case popping 82: ok 1 - parse_filter_test | caller=parse_ok_not_ok_test_case popping 83: ok 2 - filter_subsuite_test | caller=parse_ok_not_ok_test_case popping 84: ok 1 - kunit_executor_test | caller=parse_ok_not_ok_test_case [ERROR] ran out of lines before end token Signed-off-by: Daniel Latypov Reviewed-by: David Gow Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit ebd09577be6c15ee2d343cf60e5bb819946a5ee8 Author: Daniel Latypov Date: Mon May 3 13:58:35 2021 -0700 lib/test: convert lib/test_list_sort.c to use KUnit Functionally, this just means that the test output will be slightly changed and it'll now depend on CONFIG_KUNIT=y/m. It'll still run at boot time and can still be built as a loadable module. There was a pre-existing patch to convert this test that I found later, here [1]. Compared to [1], this patch doesn't rename files and uses KUnit features more heavily (i.e. does more than converting pr_err() calls to KUNIT_FAIL()). What this conversion gives us: * a shorter test thanks to KUnit's macros * a way to run this a bit more easily via kunit.py (and CONFIG_KUNIT_ALL_TESTS=y) [2] * a structured way of reporting pass/fail * uses kunit-managed allocations to avoid the risk of memory leaks * more descriptive error messages: * i.e. it prints out which fields are invalid, what the expected values are, etc. What this conversion does not do: * change the name of the file (and thus the name of the module) * change the name of the config option Leaving these as-is for now to minimize the impact to people wanting to run this test. IMO, that concern trumps following KUnit's style guide for both names, at least for now. [1] https://lore.kernel.org/linux-kselftest/20201015014616.309000-1-vitor@massaru.org/ [2] Can be run via $ ./tools/testing/kunit/kunit.py run --kunitconfig /dev/stdin < Tested-by: David Gow Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit 7122debb4367ee5c89237e5d36dcc0007d7ec43c Author: Daniel Latypov Date: Mon May 3 13:58:34 2021 -0700 kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers Add in: * kunit_kmalloc_array() and wire up kunit_kmalloc() to be a special case of it. * kunit_kcalloc() for symmetry with kunit_kzalloc() This should using KUnit more natural by making it more similar to the existing *alloc() APIs. And while we shouldn't necessarily be writing unit tests where overflow should be a concern, it can't hurt to be safe. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit bc6f49213426a4a93d2cdd49af8fa58aa0eab4d8 Merge: 13311e74253fe 8c37d01e1a860 Author: Rafael J. Wysocki Date: Fri Jun 25 19:10:52 2021 +0200 Merge tag 'devfreq-next-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq material for v5.14 from Chanwoo Choi: 1. Update devfreq core - Use DEVICE_ATTR_RW macro for devfreq userspace governor. - Add missing error code in devfreq_add_device(). - Fix get_target_freq() when not using required-opp. 2. Update devfreq drivers - Remove unneeded get_dev_status() and polling_ms from imx-bus.c, because imx-bus.c doesn't support simple_ondemand. - Remove unneeded DEVFREQ_GOV_SIMPLE_ONDEMAND dependecy from imx8m-ddrc.c, because it doesn't support the simple_ondemand governor. - Use tegra30-devfreq.c as thermal cooling device. - Convert dt-binding doc style to yaml and add cooling-cells property information to dt-binding doc for tegra30-devfreq.c. * tag 'devfreq-next-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: passive: Fix get_target_freq when not using required-opp dt-bindings: devfreq: tegra30-actmon: Add cooling-cells dt-bindings: devfreq: tegra30-actmon: Convert to schema PM / devfreq: userspace: Use DEVICE_ATTR_RW macro PM / devfreq: imx8m-ddrc: Remove DEVFREQ_GOV_SIMPLE_ONDEMAND dependency PM / devfreq: tegra30: Support thermal cooling PM / devfreq: imx-bus: Remove imx_bus_get_dev_status PM / devfreq: Add missing error code in devfreq_add_device() commit 1f700757224effe598690b34e95329aff4e3e362 Author: Shiraz Saleem Date: Fri Jun 25 11:23:29 2021 -0500 RDMA/irdma: Fix potential overflow expression in irdma_prm_get_pbles Coverity reports a signed 32-bit overflow on "1 << pprm->pble_shift" when used expression to compute bits_needed that expects 64bit, unsigned. Fix this by using the 1ULL in the left shift operator and convert mem_size to u64. Link: https://lore.kernel.org/r/20210625162329.1654-3-tatyana.e.nikolova@intel.com Reported-by: coverity-bot Addresses-Coverity-ID: 1505157 ("Integer handling issues") Fixes: 915cc7ac0f8e ("RDMA/irdma: Add miscellaneous utility definitions") Signed-off-by: Shiraz Saleem Signed-off-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit 46308965ae6fdc7c25deb2e8c048510ae51bbe66 Author: Shiraz Saleem Date: Fri Jun 25 11:23:28 2021 -0500 RDMA/irdma: Check contents of user-space irdma_mem_reg_req object The contents of user-space req object is used in array indexing in irdma_handle_q_mem without checking for valid values. Guard against bad input on each of these req object pages by limiting them to number of pages that make up the region. Link: https://lore.kernel.org/r/20210625162329.1654-2-tatyana.e.nikolova@intel.com Reported-by: coverity-bot Addresses-Coverity-ID: 1505160 ("TAINTED_SCALAR") Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Shiraz Saleem Signed-off-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit dfc2e8ae4066a95c7f9c2bb2dfa26651feaa6b83 Author: Jeremy Szu Date: Fri Jun 25 21:34:13 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC The HP EliteBook 830 G8 Notebook PC using ALC285 codec which using 0x04 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210625133414.26760-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit cb9516be7708a2a18ec0a19fe3a225b5b3bc92c7 Author: Ming Lei Date: Fri Jun 25 10:02:48 2021 +0800 blk-mq: update hctx->dispatch_busy in case of real scheduler Commit 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io") starts to support io batching submission by using hctx->dispatch_busy. However, blk_mq_update_dispatch_busy() isn't changed to update hctx->dispatch_busy in that commit, so fix the issue by updating hctx->dispatch_busy in case of real scheduler. Reported-by: Jan Kara Reviewed-by: Jan Kara Fixes: 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210625020248.1630497-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 3089cf6d3caa1eb344aac05c875f4aeaf891552d Author: Jesse Brandeburg Date: Tue Jun 8 16:35:17 2021 -0700 ice: add tracepoints This patch is modeled after one by Scott Peterson for i40e. Add tracepoints to the driver, via a new file ice_trace.h and some new trace calls added in interesting places in the driver. Add some tracing for DIMLIB to help debug interrupt moderation problems. Performance should not be affected, and this can be very useful for debugging and adding new trace events to paths in the future. Note eBPF programs can attach to these events, as well as perf can count them since we're attaching to the events subsystem in the kernel. Co-developed-by: Ben Shelton Signed-off-by: Ben Shelton Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b8917b4ae44d1b945f6fba3d8ee6777edb44633b Merge: 79b1e56509beb 188982cda00eb Author: Paolo Bonzini Date: Fri Jun 25 11:24:24 2021 -0400 Merge tag 'kvmarm-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for v5.14. - Add MTE support in guests, complete with tag save/restore interface - Reduce the impact of CMOs by moving them in the page-table code - Allow device block mappings at stage-2 - Reduce the footprint of the vmemmap in protected mode - Support the vGIC on dumb systems such as the Apple M1 - Add selftest infrastructure to support multiple configuration and apply that to PMU/non-PMU setups - Add selftests for the debug architecture - The usual crop of PMU fixes commit 87cf5127968ab3c543ebd98253052b928f9b47da Author: Quan Nguyen Date: Wed May 19 14:49:28 2021 +0700 i2c: core-smbus: Expose PEC calculate function for generic use Expose the PEC calculation i2c_smbus_pec() for generic use. Signed-off-by: Quan Nguyen Acked-by: Matt Johnston Signed-off-by: Wolfram Sang commit 36941dfe0e8c3e2da7851b9648fd74bd3a3e78ce Author: Dan Carpenter Date: Fri Jun 25 16:03:06 2021 +0300 RDMA/rxe: Missing unlock on error in get_srq_wqe() This error path needs to unlock before returning. Fixes: ec0fa2445c18 ("RDMA/rxe: Fix over copying in get_srq_wqe") Link: https://lore.kernel.org/r/YNXUCmnPsSkPyhkm@mwanda Signed-off-by: Dan Carpenter Reviewed-by: Majd Dibbiny Reviewed-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 74f160ead74bfe5f2b38afb4fcf86189f9ff40c9 Author: Gerd Rausch Date: Thu Jun 24 11:55:31 2021 -0700 RDMA/cma: Fix rdma_resolve_route() memory leak Fix a memory leak when "mda_resolve_route() is called more than once on the same "rdma_cm_id". This is possible if cma_query_handler() triggers the RDMA_CM_EVENT_ROUTE_ERROR flow which puts the state machine back and allows rdma_resolve_route() to be called again. Link: https://lore.kernel.org/r/f6662b7b-bdb7-2706-1e12-47c61d3474b6@oracle.com Signed-off-by: Gerd Rausch Signed-off-by: Jason Gunthorpe commit 79b1e56509beb8d53b2b92f27555cd2175c67b8a Merge: a01b45e9d34d2 1f703d2cf2046 Author: Paolo Bonzini Date: Fri Jun 25 10:50:11 2021 -0400 Merge tag 'kvm-s390-next-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Features for 5.14 - new HW facilities for guests - make inline assembly more robust with KASAN and co commit 590e1e4254458455477e4e857cd00733280a3d73 Author: Jason Wang Date: Thu Jun 24 14:36:32 2021 +0800 powerpc/sysfs: 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: Jason Wang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210624063632.25632-1-wangborong@cdjrlc.com commit cae4644673ec5f54c77deab67a57c41395a1539f Author: Christophe Leroy Date: Fri Jun 25 11:13:17 2021 +0000 powerpc/ptrace: Refactor regs_set_return_{msr/ip} regs_set_return_msr() and regs_set_return_ip() have a copy of the code of set_return_regs_changed(). Call the later instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/baf64a91557d3811c155616a6aa23ed7b3b21da4.1624619582.git.christophe.leroy@csgroup.eu commit 5f0f95f1e1b64fe55679059837dafb3439b57012 Author: Christophe Leroy Date: Fri Jun 25 11:13:16 2021 +0000 powerpc/ptrace: Move set_return_regs_changed() before regs_set_return_{msr/ip} regs_set_return_msr() and regs_set_return_ip() have a copy of the code of set_return_regs_changed(). Move up set_return_regs_changed() so it can be reused by regs_set_return_{msr/ip} Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/49f4fb051a3e1cb69f7305d5b6768aec14727c32.1624619582.git.christophe.leroy@csgroup.eu commit 7c6986ade69e3c81bac831645bc72109cd798a80 Author: Michael Ellerman Date: Fri Jun 25 16:28:41 2021 +1000 powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi() In raise_backtrace_ipi() we iterate through the cpumask of CPUs, sending each an IPI asking them to do a backtrace, but we don't wait for the backtrace to happen. We then iterate through the CPU mask again, and if any CPU hasn't done the backtrace and cleared itself from the mask, we print a trace on its behalf, noting that the trace may be "stale". This works well enough when a CPU is not responding, because in that case it doesn't receive the IPI and the sending CPU is left to print the trace. But when all CPUs are responding we are left with a race between the sending and receiving CPUs, if the sending CPU wins the race then it will erroneously print a trace. This leads to spurious "stale" traces from the sending CPU, which can then be interleaved messily with the receiving CPU, note the CPU numbers, eg: [ 1658.929157][ C7] rcu: Stack dump where RCU GP kthread last ran: [ 1658.929223][ C7] Sending NMI from CPU 7 to CPUs 1: [ 1658.929303][ C1] NMI backtrace for cpu 1 [ 1658.929303][ C7] CPU 1 didn't respond to backtrace IPI, inspecting paca. [ 1658.929362][ C1] CPU: 1 PID: 325 Comm: kworker/1:1H Tainted: G W E 5.13.0-rc2+ #46 [ 1658.929405][ C7] irq_soft_mask: 0x01 in_mce: 0 in_nmi: 0 current: 325 (kworker/1:1H) [ 1658.929465][ C1] Workqueue: events_highpri test_work_fn [test_lockup] [ 1658.929549][ C7] Back trace of paca->saved_r1 (0xc0000000057fb400) (possibly stale): [ 1658.929592][ C1] NIP: c00000000002cf50 LR: c008000000820178 CTR: c00000000002cfa0 To fix it, change the logic so that the sending CPU waits 5s for the receiving CPU to print its trace. If the receiving CPU prints its trace successfully then the sending CPU just continues, avoiding any spurious "stale" trace. This has the added benefit of allowing all CPUs to print their traces in order and avoids any interleaving of their output. Fixes: 5cc05910f26e ("powerpc/64s: Wire up arch_trigger_cpumask_backtrace()") Cc: stable@vger.kernel.org # v4.18+ Reported-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210625140408.3351173-1-mpe@ellerman.id.au commit 31df7195b100f7e7b7ac07675d93b3b504400fe9 Author: Alex Qiu Date: Mon May 17 16:56:05 2021 -0700 Documentation: i2c: Add doc for I2C sysfs This doc helps Linux users navigate through I2C sysfs and learn the system I2C topology. Signed-off-by: Alex Qiu Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit efcbea302698b610c30f92167b933294f2350d5f Author: Håkon Bugge Date: Fri Jun 25 14:30:57 2021 +0200 RDMA/core/sa_query: Remove unused argument Fixes:4c33bd1926cc ("IB/SA: Add support to query OPA path records") Link: https://lore.kernel.org/r/1624624257-3677-1-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit e84045eab69c625bc0b0bf24d8e05bc65da1eed1 Author: Håkon Bugge Date: Tue Jun 22 16:13:27 2021 +0200 RDMA/cma: Fix incorrect Packet Lifetime calculation An approximation for the PacketLifeTime is half the local ACK timeout. The encoding for both timers are logarithmic. If the local ACK timeout is set, but zero, it means the timer is disabled. In this case, we choose the CMA_IBOE_PACKET_LIFETIME value, since 50% of infinite makes no sense. Before this commit, the PacketLifeTime became 255 if local ACK timeout was zero (not running). Fixed by explicitly testing for timeout being zero. Fixes: e1ee1e62bec4 ("RDMA/cma: Use ACK timeout for RoCE packetLifeTime") Link: https://lore.kernel.org/r/1624371207-26710-1-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 188982cda00ebfe28b50c2905d9bbaa2e9a001b9 Merge: 9f03db6673598 98db7259fa7b9 Author: Marc Zyngier Date: Thu Jun 24 15:12:43 2021 +0100 Merge branch kvm-arm64/mmu/mte into kvmarm-master/next Last minute fix for MTE, making sure the pages are flagged as MTE before they are released. * kvm-arm64/mmu/mte: KVM: arm64: Set the MTE tag bit before releasing the page Signed-off-by: Marc Zyngier commit 2b9d8e3e9a9bb693a8b8bd26ad192db037517759 Merge: 13311e74253fe 340ec061f7650 c55356c534aa6 1c461ef9c49e6 934ed4580c0a1 b65412c25fa60 8ce4904bfd22d 531353e650db0 Author: Joerg Roedel Date: Fri Jun 25 15:23:25 2021 +0200 Merge branches 'iommu/fixes', 'arm/rockchip', 'arm/smmu', 'x86/vt-d', 'x86/amd', 'virtio' and 'core' into next commit 1bee1ecf232cd90ad112d78ab5124850b4e5ea09 Merge: edf978a5a17dc b470e10eb43f1 Author: Mark Brown Date: Fri Jun 25 14:08:26 2021 +0100 Merge remote-tracking branch 'spi/for-5.14' into spi-next commit edf978a5a17dc9e38625b33821dc71f10c46f694 Merge: 04045c479a25b 0d7993b234c9f Author: Mark Brown Date: Fri Jun 25 14:08:25 2021 +0100 Merge remote-tracking branch 'spi/for-5.13' into spi-linus commit 04045c479a25b1cf76ee4d4a347d2a32e31cf909 Merge: 13311e74253fe f60d7270c8a3d Author: Mark Brown Date: Fri Jun 25 14:08:23 2021 +0100 Merge remote-tracking branch 'spi/for-5.12' into spi-linus commit 192664528154a84fab4e6d820f9cb2e2e0835544 Merge: c073a58a7ec59 6a7f5bd6185e1 Author: Mark Brown Date: Fri Jun 25 14:08:03 2021 +0100 Merge remote-tracking branch 'asoc/for-5.14' into asoc-next commit c073a58a7ec59145f8a0b87403d559645bfd9edb Merge: 13311e74253fe a7a0a2feb957e Author: Mark Brown Date: Fri Jun 25 14:08:01 2021 +0100 Merge remote-tracking branch 'asoc/for-5.13' into asoc-linus commit 8ce4904bfd22de04ac3cd35d469c0a3337bdeb7b Author: Jean-Philippe Brucker Date: Fri Jun 18 17:21:00 2021 +0200 iommu/virtio: Enable x86 support With the VIOT support in place, x86 platforms can now use the virtio-iommu. Because the other x86 IOMMU drivers aren't yet ready to use the acpi_dma_setup() path, x86 doesn't implement arch_setup_dma_ops() at the moment. Similarly to Vt-d and AMD IOMMU, clear the DMA ops and call iommu_setup_dma_ops() from probe_finalize(). Acked-by: Joerg Roedel Acked-by: Michael S. Tsirkin Tested-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210618152059.1194210-6-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit ac6d704679d343e55615551f19e9b2e18d68518b Author: Jean-Philippe Brucker Date: Fri Jun 18 17:20:59 2021 +0200 iommu/dma: Pass address limit rather than size to iommu_setup_dma_ops() Passing a 64-bit address width to iommu_setup_dma_ops() is valid on virtual platforms, but isn't currently possible. The overflow check in iommu_dma_init_domain() prevents this even when @dma_base isn't 0. Pass a limit address instead of a size, so callers don't have to fake a size to work around the check. The base and limit parameters are being phased out, because: * they are redundant for x86 callers. dma-iommu already reserves the first page, and the upper limit is already in domain->geometry. * they can now be obtained from dev->dma_range_map on Arm. But removing them on Arm isn't completely straightforward so is left for future work. As an intermediate step, simplify the x86 callers by passing dummy limits. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20210618152059.1194210-5-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 3cf485540e7b8550936ce3602edf2f58e4007304 Author: Jean-Philippe Brucker Date: Fri Jun 18 17:20:58 2021 +0200 ACPI: Add driver for the VIOT table The ACPI Virtual I/O Translation Table describes topology of para-virtual platforms, similarly to vendor tables DMAR, IVRS and IORT. For now it describes the relation between virtio-iommu and the endpoints it manages. Three steps are needed to configure DMA of endpoints: (1) acpi_viot_init(): parse the VIOT table, find or create the fwnode associated to each vIOMMU device. This needs to happen after acpi_scan_init(), because it relies on the struct device and their fwnode to be available. (2) When probing the vIOMMU device, the driver registers its IOMMU ops within the IOMMU subsystem. This step doesn't require any intervention from the VIOT driver. (3) viot_iommu_configure(): before binding the endpoint to a driver, find the associated IOMMU ops. Register them, along with the endpoint ID, into the device's iommu_fwspec. If step (3) happens before step (2), it is deferred until the IOMMU is initialized, then retried. Tested-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20210618152059.1194210-4-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 11a8c5e3a94b12848f24d9c63b5c175ce0b80729 Author: Jean-Philippe Brucker Date: Fri Jun 18 17:20:57 2021 +0200 ACPI: Move IOMMU setup code out of IORT Extract the code that sets up the IOMMU infrastructure from IORT, since it can be reused by VIOT. Move it one level up into a new acpi_iommu_configure_id() function, which calls the IORT parsing function which in turn calls the acpi_iommu_fwspec_init() helper. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20210618152059.1194210-3-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit db59e1b6e49201beacdbd0622aa3594f2de4f727 Author: Jean-Philippe Brucker Date: Fri Jun 18 17:20:56 2021 +0200 ACPI: arm64: Move DMA setup operations out of IORT Extract generic DMA setup code out of IORT, so it can be reused by VIOT. Keep it in drivers/acpi/arm64 for now, since it could break x86 platforms that haven't run this code so far, if they have invalid tables. Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20210618152059.1194210-2-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 7f71a409fe3d9358da07c77f15bb5b7960f12253 Author: Pali Rohár Date: Fri Jun 25 00:26:20 2021 +0200 PCI: aardvark: Implement workaround for the readback value of VEND_ID Marvell Armada 3700 Functional Errata, Guidelines, and Restrictions document describes in erratum 4.1 PCIe value of vendor ID (Ref #: 243): The readback value of VEND_ID (RD0070000h [15:0]) is 1B4Bh, while it should read 11ABh. The firmware can write the correct value, 11ABh, through VEND_ID (RD0076044h [15:0]). Implement this workaround in aardvark driver for both PCI vendor id and PCI subsystem vendor id. This change affects and fixes PCI vendor id of emulated PCIe root bridge. After this change emulated PCIe root bridge has correct vendor id. Link: https://lore.kernel.org/r/20210624222621.4776-5-pali@kernel.org Fixes: 8a3ebd8de328 ("PCI: aardvark: Implement emulated root PCI bridge config space") Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marek Behún Cc: stable@vger.kernel.org commit 3b770932eefb7c0c6319d332023efee87eb12913 Author: Yang Yingliang Date: Tue May 11 19:30:33 2021 +0800 HID: thrustmaster: Switch to kmemdup() when allocate change_request Use kmemdup() helper instead of open-coding to simplify the code when allocate change_request. Signed-off-by: Yang Yingliang Signed-off-by: Jiri Kosina commit 498d0ddc6ae931e4e79a57c56b6dd4576aa435b6 Author: Hans de Goede Date: Sat May 29 17:14:24 2021 +0200 HID: multitouch: Disable event reporting on suspend when the device is not a wakeup-source Disable event reporting on suspend when the hid device is not a wakeup-source. This should help save some extra power in this case. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 622d97cf7f2b4efb36bec3c85b5c1db5e3dfd586 Author: Hans de Goede Date: Sat May 29 17:14:23 2021 +0200 HID: logitech-dj: Implement may_wakeup ll-driver callback Without a ll-driver callback hid_hw_may_wakeup() will return: device_may_wakeup(hdev->dev.parent), but for the hid devices instantiated by logitech-dj for devices behind the receiver the logitech-dj hid(pp)-device is the parent. Add a logi_dj_ll_may_wakeup() callback which calls hid_hw_may_wakeup() on the logitech-dj hid(pp) parent-hid-device. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 978e786c5e9bf538da0a4807539608a52d9be16b Author: Hans de Goede Date: Sat May 29 17:14:22 2021 +0200 HID: usbhid: Implement may_wakeup ll-driver callback Without a ll-driver callback hid_hw_may_wakeup() will return: device_may_wakeup(hdev->dev.parent), usb_hid_driver instantiated hid devices have their parent set to the usb-interface to which the usb_hid_driver is bound, but the power/wakeup* sysfs attributes are part of the usb-device. Add a may_wakeup ll-driver callback which calls device_may_wakeup() on the usb-device instead. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 24e166f43e93de0e9b0a460ecfe4bab1f12212d7 Author: Hans de Goede Date: Sat May 29 17:14:21 2021 +0200 HID: core: Add hid_hw_may_wakeup() function Add a hid_hw_may_wakeup() function, which is the equivalent of device_may_wakeup() for hid devices. In most cases this just returns device_may_wakeup(hdev->dev.parent), but for some ll-drivers this is not correct. E.g. usb_hid_driver instantiated hid devices have their parent set to the usb-interface to which the usb_hid_driver is bound, but the power/wakeup* sysfs attributes are part of the usb-device, which is the usb-interface's parent. For these special cases a new may_wakeup callback is added to hid_ll_driver, so that ll-drivers can override the default behavior. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 15279ebe99d7c6142d9f1a6ae4ded66c0f168678 Author: Pali Rohár Date: Fri Jun 25 00:49:05 2021 +0200 serial: mvebu-uart: remove unused member nb from struct mvebu_uart Member nb in struct mvebu_uart is not set nor read. So remove it completely. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20210624224909.6350-7-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2cbfdedef39fb5994b8f1e1df068eb8440165975 Author: Pali Rohár Date: Fri Jun 25 00:49:04 2021 +0200 arm64: dts: marvell: armada-37xx: Fix reg for standard variant of UART UART1 (standard variant with DT node name 'uart0') has register space 0x12000-0x12018 and not whole size 0x200. So fix also this in example. Signed-off-by: Pali Rohár Fixes: c737abc193d1 ("arm64: dts: marvell: Fix A37xx UART0 register size") Link: https://lore.kernel.org/r/20210624224909.6350-6-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit 56b3276954f0e3b32760997a904fcbaec25bc005 Author: Pali Rohár Date: Fri Jun 25 00:49:03 2021 +0200 dt-bindings: mvebu-uart: fix documentation Both UARTs support higher baudrates and are not limited to baudrate 230400. Only current kernel driver implementation has limitation for both UARTs in maximal baudrate 230400. This limitation will be removed in next patches. So remove incorrect information about (hardware) limitation from bindings. UART1 (standard variant with DT node name 'uart0') has register space 0x12000-0x12018 and not whole size 0x200. So fix also this in example. Signed-off-by: Pali Rohár Fixes: d160c3413478 ("dt-bindings: mvebu-uart: update documentation with extended UART") Link: https://lore.kernel.org/r/20210624224909.6350-5-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit deeaf963569a0d9d1b08babb771f61bb501a5704 Author: Pali Rohár Date: Fri Jun 25 00:49:02 2021 +0200 serial: mvebu-uart: correctly calculate minimal possible baudrate For default (x16) scheme which is currently used by mvebu-uart.c driver, maximal divisor of UART base clock is 1023*16. Therefore there is limit for minimal supported baudrate. This change calculate it correctly and prevents setting invalid divisor 0 into hardware registers. Signed-off-by: Pali Rohár Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate") Link: https://lore.kernel.org/r/20210624224909.6350-4-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit ecd6b010d81f97b06b2f64d2d4f50ebf5acddaa9 Author: Pali Rohár Date: Fri Jun 25 00:49:01 2021 +0200 serial: mvebu-uart: do not allow changing baudrate when uartclk is not available Testing mvuart->clk for non-error is not enough as mvuart->clk may contain valid clk pointer but when clk_prepare_enable(mvuart->clk) failed then port->uartclk is zero. When mvuart->clk is not available then port->uartclk is zero too. Parent clock rate port->uartclk is needed to calculate UART clock divisor and without it is not possible to change baudrate. So fix test condition when it is possible to change baudrate. Signed-off-by: Pali Rohár Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate") Link: https://lore.kernel.org/r/20210624224909.6350-3-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9078204ca5c33ba20443a8623a41a68a9995a70d Author: Pali Rohár Date: Fri Jun 25 00:49:00 2021 +0200 serial: mvebu-uart: fix calculation of clock divisor The clock divisor should be rounded to the closest value. Signed-off-by: Pali Rohár Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate") Cc: stable@vger.kernel.org # 0e4cf69ede87 ("serial: mvebu-uart: clarify the baud rate derivation") Link: https://lore.kernel.org/r/20210624224909.6350-2-pali@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8ceeac307a79f68c0d0c72d6e48b82fa424204ec Author: Pali Rohár Date: Thu Jun 24 23:33:43 2021 +0200 PCI: aardvark: Fix checking for PIO Non-posted Request PIO_NON_POSTED_REQ for PIO_STAT register is incorrectly defined. Bit 10 in register PIO_STAT indicates the response is to a non-posted request. Link: https://lore.kernel.org/r/20210624213345.3617-2-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marek Behún Cc: stable@vger.kernel.org commit b470e10eb43f19e08245cd87dd3192a8141cfbb5 Author: Vinod Koul Date: Fri Jun 25 10:52:11 2021 +0530 spi: core: add dma_map_dev for dma device Some controllers like qcom geni need the parent device to be used for dma mapping, so add a dma_map_dev field and let drivers fill this to be used as mapping device Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210625052213.32260-4-vkoul@kernel.org Signed-off-by: Mark Brown commit c58db2abb19fd2bf23fb25bb3630a9f540df6042 Author: Nobuhiro Iwamatsu Date: Mon Jun 14 06:43:17 2021 +0900 spi: convert Xilinx Zynq UltraScale+ MPSoC GQSPI bindings to YAML Convert spi for Xilinx Zynq UltraScale+ MPSoC GQSPI bindings documentation to YAML. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210613214317.296667-1-iwamatsu@nigauri.org Signed-off-by: Mark Brown commit a196fa78a26571359740f701cf30d774eb8a72cb Author: Gary Lin Date: Wed Jun 23 12:09:18 2021 +0800 bpfilter: Specify the log level for the kmsg message Per the kmsg document [0], if we don't specify the log level with a prefix "" in the message string, the default log level will be applied to the message. Since the default level could be warning(4), this would make the log utility such as journalctl treat the message, "Started bpfilter", as a warning. To avoid confusion, this commit adds the prefix "<5>" to make the message always a notice. [0] https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg Fixes: 36c4357c63f3 ("net: bpfilter: print umh messages to /dev/kmsg") Reported-by: Martin Loviska Signed-off-by: Gary Lin Signed-off-by: Daniel Borkmann Acked-by: Dmitrii Banshchikov Link: https://lore.kernel.org/bpf/20210623040918.8683-1-glin@suse.com commit c34c1228fc1cfe83aed909995f5b82e0ab7cb977 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:29 2021 +0200 docs: driver-api: gpio: using-gpio.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Reviewed-by: Linus Walleij Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Bartosz Golaszewski commit d766dfee58e19d5781f6f9acb5092376742e7888 Author: Geert Uytterhoeven Date: Tue Jun 1 17:25:47 2021 +0200 dt-bindings: gpio: pcf857x: Convert to json-schema Convert the PCF857x-compatible I/O expanders Device Tree binding documentation to json-schema. Document missing compatible values, properties, and gpio hogs. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit cdee1d6222546e9ec886b1deb241ab9566517d97 Author: Jinchao Wang Date: Thu Jun 24 18:15:17 2021 +0800 gpio: mxs: Prefer unsigned int to bare use of unsigned Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Jinchao Wang Signed-off-by: Bartosz Golaszewski commit eda627f6be8aede0e4a80fd0274a2ba944d40f2c Author: Aleksander Jan Bajkowski Date: Thu Jun 3 15:59:45 2021 +0200 dt-bindings: gpio: stp: convert to json-schema Convert the Lantiq STP Device Tree binding documentation to json-schema. Add the missing pinctrl property to the example. Add missing lantiq,phy3 and lantiq,phy4 bindings for xRX300 and xRX330 SoCs. Signed-off-by: Aleksander Jan Bajkowski Acked-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 77ad1f0e99bd00af024e650b862cfda3137af660 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:46:01 2021 +0200 staging: hi6421-spmi-pmic: cleanup some macros Before moving this driver out of staging, cleanup the macros, in order to make the driver clearer. No functional changes. Suggested-by: Lee Jones Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/95341999de15b395242b5b7850ec5e727420ce19.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5ff96c9672c52aa90749b786ef81c50a7a680713 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:46:00 2021 +0200 staging: hi6421-spmi-pmic: change identation of a table The struct regmap_config is idented with two tabs. Just one tab is enough. Suggested-by: Lee Jones Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a4d718b0479e3867bedc93861e4b2c9c1321aabd.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0fb8de638c76d7387bb7d76bf7e491392b72a651 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:45:59 2021 +0200 staging: hi6421-spmi-pmic: change a return code return -ENODEV if irq_create_mapping() fails at probing time. Suggested-by: Lee Jones Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e978eabd99c0d3c471026659a2c585deb706e2c4.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 943f5a04e154936a6a42b8e377c301e7db372283 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:45:58 2021 +0200 staging: hi6421-spmi-pmic: better name IRQs Instead of naming them as just "hisi", use hi6421v600 to make it clearer. Suggested-by: Lee Jones Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/327fb075905b889a43a0f9dced29ea9966d611f8.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit fc3d3369c6e1bfc9181d2d7ff8c452ef24e36e41 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:45:57 2021 +0200 staging: hi6421-spmi-pmic: use devm_request_threaded_irq() Use devm_request_threaded_irq() in order to simplify the driver. Suggested-by: Lee Jones Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b47827c3466eeef3a7de6ac56b1fe93b5ff84e30.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit cb5d92d1124601e27251a994f681dbe70cbfb4d0 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:45:55 2021 +0200 staging: hisilicon,hi6421-spmi-pmic.yaml: cleanup descriptions Minor cleanups at the schema: - There's no need to describe interrupt-controller; - gpios need a description. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9f421e254061a42b7b598bd96b12f05460c175c9.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit e562cf3aea3e1ea46566907f7627e5512840a2b4 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:45:54 2021 +0200 spmi: hisi-spmi-controller: move driver from staging The Hisilicon 6421v600 SPMI driver is ready for mainstream. So, move it from staging. Acked-by: Stephen Boyd Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/35b9f9169889c1f4d51eff8bf2035450c9e02576.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8de6b7edd493af5587e479afa85706d6fe9c5725 Author: Mauro Carvalho Chehab Date: Fri Jun 25 09:45:53 2021 +0200 phy: phy-hi3670-usb3: move driver from staging into phy The phy USB3 driver for Hisilicon 970 (hi3670) is ready for mainstream. Mode it from staging into the main driver's phy/ directory. Acked-by: Rob Herring Acked-By: Vinod Koul Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/dcf66a01aaeaab93cda52f9a283ecbdf9fa71bb8.1624606660.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4834446035a1011ff1231626ef33555d64c4fd78 Author: Jiri Slaby Date: Fri Jun 25 09:35:11 2021 +0200 tty: make linux/tty_flip.h self-contained If someone includes linux/tty_flip.h before linux/tty.h, they see many compiler errors like: include/linux/tty_flip.h:23:30: error: invalid use of undefined type 'struct tty_port' include/linux/tty_flip.h:26:14: error: invalid use of undefined type 'struct tty_buffer' tty_flip.h actually lexicographically sorts before tty.h. So if people sort includes (as I tried in amiserial), the compilation suddenly breaks. Solve this by including linux/tty.h from linux/tty_flip.h, so that everything is defined as needed. Another alternative would be to uninline tty_insert_flip_char and just insert forward declarations of tty_port and tty_buffer structs into tty_flip.h as that inline is the only real user. But that would mean slowing down the fast path without any good reason. (Provided the fix is that easy and there were no real problems with this until now.) Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210625073511.4514-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0cbbeaf370221fc469c95945dd3c1198865c5fe4 Author: Christophe JAILLET Date: Thu Jun 24 20:49:36 2021 +0200 ALSA: firewire-lib: Fix 'amdtp_domain_start()' when no AMDTP_OUT_STREAM stream is found The intent here is to return an error code if we don't find what we are looking for in the 'list_for_each_entry()' loop. 's' is not NULL if the list is empty or if we scan the complete list. Introduce a new 'found' variable to handle such cases. Fixes: 60dd49298ec5 ("ALSA: firewire-lib: handle several AMDTP streams in callback handler of IRQ target") Signed-off-by: Christophe JAILLET Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/9c9a53a4905984a570ba5672cbab84f2027dedc1.1624560484.git.christophe.jaillet@wanadoo.fr Signed-off-by: Takashi Iwai commit 4420fa312826b41f3f8150a30a204ab1c45dae8d Author: Phillip Potter Date: Fri Jun 25 01:07:56 2021 +0100 staging: rtl8188eu: remove include/rtw_debug.h header Remove include/rtw_debug.h header file, as this isn't used and gets rid of the various other definitions we don't need. Also move the DRIVERVERSION constant value directly to os_dep/os_intfs.c as it is only used there anyway. This results in removal of more unnecessary code. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-24-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 4424ddb0ee83350c27e421830a5748b8bbdb3e55 Author: Phillip Potter Date: Fri Jun 25 01:07:55 2021 +0100 staging: rtl8188eu: remove GlobalDebugLevel variable Remove GlobalDebugLevel variable and all of its uses, as it is now no longer used anywhere in this driver. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-23-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 3fd18e0321c9522dd18af5174135f320ce7dbe82 Author: Phillip Potter Date: Fri Jun 25 01:07:54 2021 +0100 staging: rtl8188eu: remove DRIVER_PREFIX preprocessor definition Remove DRIVER_PREFIX preprocessor definition, as well as the short block of dumping code that uses it in core/rtw_recv.c - this code is unneeded, as normal debugging facilities can tell us what driver this is simply by pathname etc. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-22-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 85f1c72a1ef4dad7687d26cb9a66fdca6d3daf64 Author: Phillip Potter Date: Fri Jun 25 01:07:53 2021 +0100 staging: rtl8188eu: remove RT_TRACE macro Remove RT_TRACE macro from include/rtw_debug.h, as it now has no callers, and does not follow best practices and kernel coding conventions. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-21-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 254b0a1e4cf6166530c46d10d676300f956f1e59 Author: Phillip Potter Date: Fri Jun 25 01:07:52 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from hal/rtl8188eu_recv.c Remove all RT_TRACE calls from hal/rtl8188eu_recv.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-20-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit da5dae9b84446e7a076cc4d136c9e79c7f073803 Author: Phillip Potter Date: Fri Jun 25 01:07:51 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from hal/hal_intf.c Remove all RT_TRACE calls from hal/hal_intf.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-19-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 8787b57f379262b91358b916a5810f55f1608b61 Author: Phillip Potter Date: Fri Jun 25 01:07:50 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from hal/rtl8188eu_xmit.c Remove all RT_TRACE calls from hal/rtl8188eu_xmit.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-18-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit e3a5f40c5809a2ffc5fb9f8d2d659733fc6a3c3b Author: Phillip Potter Date: Fri Jun 25 01:07:49 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_xmit.c Remove all RT_TRACE calls from core/rtw_xmit.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-17-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 5700b8330ca67dd0cdf983a58b6e47a31f21fe4f Author: Phillip Potter Date: Fri Jun 25 01:07:48 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_pwrctrl.c Remove all RT_TRACE calls from core/rtw_pwrctrl.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-16-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 435a384417f0886cce88690af4e1d73efb767ecc Author: Phillip Potter Date: Fri Jun 25 01:07:47 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_recv.c Remove all RT_TRACE calls from core/rtw_recv.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-15-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f1fb05f06a56eaacd1b2866d50ea5e45fd851c3b Author: Phillip Potter Date: Fri Jun 25 01:07:46 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_ioctl_set.c Remove all RT_TRACE calls from core/rtw_ioctl_set.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-14-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 5e28bb5ad6520966b8e8fcb05bee36af978bb2cd Author: Phillip Potter Date: Fri Jun 25 01:07:45 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_ieee80211.c Remove all RT_TRACE calls from core/rtw_ieee80211.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-13-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit dbc2850c86518c0a60072b1327afc0ee8e487420 Author: Phillip Potter Date: Fri Jun 25 01:07:44 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_wlan_util.c Remove all RT_TRACE calls from core/rtw_wlan_util.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-12-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 6f518ce18b43b091024142c5b56109190acdd2be Author: Phillip Potter Date: Fri Jun 25 01:07:43 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_led.c Remove all RT_TRACE calls from core/rtw_led.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-11-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 9b7f6d9fd425c37b82dc00f37901fb9c95db44d4 Author: Phillip Potter Date: Fri Jun 25 01:07:42 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_mlme.c Remove all RT_TRACE calls from core/rtw_mlme.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove rtw_atimdone_event_callback and rtw_cpwm_event_callback functions and their associated header declarations/usages, as all they do is call RT_TRACE and nothing else. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-10-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 8040692730df8e7d98bac535a63f473f2e032ec4 Author: Phillip Potter Date: Fri Jun 25 01:07:41 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_mlme_ext.c Remove all RT_TRACE calls from core/rtw_mlme_ext.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-9-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 9eb8004c87c0fe7395ba00811d1cf7e023085713 Author: Phillip Potter Date: Fri Jun 25 01:07:40 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_sta_mgt.c Remove all RT_TRACE calls from core/rtw_sta_mgt.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-8-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit ebb02b8f93a9d39f681dcfed89ee83cafbd97e21 Author: Phillip Potter Date: Fri Jun 25 01:07:39 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_security.c Remove all RT_TRACE calls from core/rtw_security.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 0bf20e534d124c967193d2044250a779c0b04595 Author: Phillip Potter Date: Fri Jun 25 01:07:38 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from os_dep/recv_linux.c Remove all RT_TRACE calls from os_dep/recv_linux.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 0299b6df594b4a325d1c09057e82458192d9b0ca Author: Phillip Potter Date: Fri Jun 25 01:07:37 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from os_dep/mlme_linux.c Remove all RT_TRACE calls from os_dep/mlme_linux.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f53ae8193fdb8cdd671dcf122dec0e9cca5ed2ba Author: Phillip Potter Date: Fri Jun 25 01:07:36 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from os_dep/os_intfs.c Remove all RT_TRACE calls from os_dep/os_intfs.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 887af3fa7195c68e3341b23dd1c1e69311d69504 Author: Phillip Potter Date: Fri Jun 25 01:07:35 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from os_dep/xmit_linux.c Remove all RT_TRACE calls from os_dep/xmit_linux.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 7aae846a7b2807a0118f2b53e8e2991ee4d63a3e Author: Phillip Potter Date: Fri Jun 25 01:07:34 2021 +0100 staging: rtl8188eu: remove all RT_TRACE calls from os_dep/ioctl_linux.c Remove all RT_TRACE calls from os_dep/ioctl_linux.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210625000756.6313-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit c736fb97051c39c74bf5d4684bdac1766d43e175 Author: Michael Ellerman Date: Fri Jun 25 14:50:24 2021 +1000 powerpc/pseries/vas: Include irqdomain.h There are patches in flight to break the dependency between asm/irq.h and linux/irqdomain.h, which would break compilation of vas.c because it needs the declaration of irq_create_mapping() etc. So add an explicit include of irqdomain.h to avoid that becoming a problem in future. Reported-by: Stephen Rothwell Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210625045337.3197833-1-mpe@ellerman.id.au commit a2305e3de819394a7adf68078964a92d06f9db33 Author: Arnd Bergmann Date: Thu Apr 29 10:06:38 2021 +0200 powerpc: mark local variables around longjmp as volatile gcc-11 points out that modifying local variables next to a longjmp/setjmp may cause undefined behavior: arch/powerpc/kexec/crash.c: In function 'crash_kexec_prepare_cpus.constprop': arch/powerpc/kexec/crash.c:108:22: error: variable 'ncpus' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbere d] arch/powerpc/kexec/crash.c:109:13: error: variable 'tries' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbere d] arch/powerpc/xmon/xmon.c: In function 'xmon_print_symbol': arch/powerpc/xmon/xmon.c:3625:21: error: variable 'name' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c: In function 'stop_spus': arch/powerpc/xmon/xmon.c:4057:13: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c: In function 'restart_spus': arch/powerpc/xmon/xmon.c:4098:13: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c: In function 'dump_opal_msglog': arch/powerpc/xmon/xmon.c:3008:16: error: variable 'pos' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c: In function 'show_pte': arch/powerpc/xmon/xmon.c:3207:29: error: variable 'tsk' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c: In function 'show_tasks': arch/powerpc/xmon/xmon.c:3302:29: error: variable 'tsk' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c: In function 'xmon_core': arch/powerpc/xmon/xmon.c:494:13: error: variable 'cmd' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c:860:21: error: variable 'bp' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c:860:21: error: variable 'bp' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] arch/powerpc/xmon/xmon.c:492:48: error: argument 'fromipi' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] According to the documentation, marking these as 'volatile' is sufficient to avoid the problem, and it shuts up the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210429080708.1520360-1-arnd@kernel.org commit d40a82be2f79d16cc18c28c14d267da240659949 Author: Paul Mackerras Date: Tue May 4 17:43:43 2021 +1000 powerpc/pmu: Make the generic compat PMU use the architected events This changes generic-compat-pmu.c so that it only uses architected events defined in Power ISA v3.0B, rather than event encodings which, while common to all the IBM Power Systems implementations, are nevertheless implementation-specific rather than architected. The intention is that any CPU implementation designed to conform to Power ISA v3.0B or later can use generic-compat-pmu.c. In addition to the existing events for cycles and instructions, this adds several other architected events, including alternative encodings for some events. In order to make it possible to measure cycles and instructions at the same time as each other, we set the CC5-6RUN bit in MMCR0, which makes PMC5 and PMC6 count instructions and cycles regardless of the run bit, so their events are now PM_CYC and PM_INST_CMPL rather than PM_RUN_CYC and PM_RUN_INST_CMPL (the latter are still available via other event codes). Note that POWER9 has an erratum where one architected event (PM_FLOP_CMPL, floating-point operations completed, code 0x100f4) does not work correctly. Given that there is a specific PMU driver for P9 which will be used in preference to generic-compat-pmu.c, that is not a real problem. Signed-off-by: Paul Mackerras Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YJD7L9yeoxvxqeYi@thinks.paulus.ozlabs.org commit bfb0c9fcf5870036e54081b28cae2af5f9ee7088 Author: Nathan Lynch Date: Mon May 3 21:53:29 2021 -0500 powerpc/pseries/dlpar: use rtas_get_sensor() Instead of making bare calls to get-sensor-state, use rtas_get_sensor(), which correctly handles busy and extended delay statuses. Fixes: ab519a011caa ("powerpc/pseries: Kernel DLPAR Infrastructure") Signed-off-by: Nathan Lynch Reviewed-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210504025329.1713878-1-nathanl@linux.ibm.com commit 4bfa5ddff924c2d5b2427f752515ca594dade19f Author: Nathan Lynch Date: Mon May 3 12:58:11 2021 -0500 powerpc/rtas-rtc: remove unused constant RTAS_CLOCK_BUSY is unused, remove it. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210503175811.1528208-1-nathanl@linux.ibm.com commit d2827e5e2e0f0941a651f4b1ca5e9b778c4b5293 Author: Kajol Jain Date: Sun Apr 18 13:10:03 2021 +0530 powerpc/papr_scm: trivial: fix typo in a comment There is a spelling mistake "byes" -> "bytes" in a comment of function drc_pmem_query_stats(). Fix that typo. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210418074003.6651-1-kjain@linux.ibm.com commit 95839225639ba7c3d8d7231b542728dcf222bf2d Author: Michael Ellerman Date: Wed Jun 23 23:05:14 2021 +1000 powerpc: Fix is_kvm_guest() / kvm_para_available() Commit a21d1becaa3f ("powerpc: Reintroduce is_kvm_guest() as a fast-path check") added is_kvm_guest() and changed kvm_para_available() to use it. is_kvm_guest() checks a static key, kvm_guest, and that static key is set in check_kvm_guest(). The problem is check_kvm_guest() is only called on pseries, and even then only in some configurations. That means is_kvm_guest() always returns false on all non-pseries and some pseries depending on configuration. That's a bug. For PR KVM guests this is noticable because they no longer do live patching of themselves, which can be detected by the omission of a message in dmesg such as: KVM: Live patching for a fast VM worked To fix it make check_kvm_guest() an initcall, to ensure it's always called at boot. It needs to be core so that it runs before kvm_guest_init() which is postcore. To be an initcall it needs to return int, where 0 means success, so update that. We still call it manually in pSeries_smp_probe(), because that runs before init calls are run. Fixes: a21d1becaa3f ("powerpc: Reintroduce is_kvm_guest() as a fast-path check") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210623130514.2543232-1-mpe@ellerman.id.au commit 24d33ac5b8ffb7a0e697344fea8591376162548f Author: Michael Ellerman Date: Wed Jun 23 23:04:54 2021 +1000 powerpc/64s: Make prom_init require RELOCATABLE When we boot from open firmware (OF) using PPC_OF_BOOT_TRAMPOLINE, aka. prom_init, we run parts of the kernel at an address other than the link address. That happens because OF loads the kernel above zero (OF is at zero) and we run prom_init before copying the kernel down to zero. Currently that works even for non-relocatable kernels, because we do various fixups to the prom_init code to make it run where it's loaded. However those fixups are not sufficient if the kernel becomes large enough. In that case prom_init()'s final call to __start() can end up generating a plt branch: bl c000000002000018 <00000078.plt_branch.__start> That results in the kernel jumping to the linked address of __start, 0xc000000000000000, when really it needs to jump to the 0xc000000000000000 + the runtime address because the kernel is still running at the load address. We could do further shenanigans to handle that, see Jordan's patch for example: https://lore.kernel.org/linuxppc-dev/20210421021721.1539289-1-jniethe5@gmail.com However it is much simpler to just require a kernel with prom_init() to be built relocatable. The result works in all configurations without further work, and requires less code. This should have no effect on most people, as our defconfigs and essentially all distro configs already have RELOCATABLE enabled. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210623130454.2542945-1-mpe@ellerman.id.au commit c6c27e3d84648e6188fba314ae21a005e60bdcd4 Author: Haren Myneni Date: Tue Jun 22 22:17:46 2021 -0700 selftests/powerpc: Use req_max_processed_len from sysfs NX capabilities On PowerVM, the hypervisor defines the maximum buffer length for each NX request and the kernel exported this value via sysfs. This patch reads this value if the sysfs entry is available and is used to limit the request length. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ed908341b1eb7ca0183c028a4ed4a0cf48bfe0f6.camel@linux.ibm.com commit 20ccb004bad659c186f9091015a956da220d615d Author: Naveen N. Rao Date: Wed Jun 9 14:30:24 2021 +0530 powerpc/bpf: Use bctrl for making function calls blrl corrupts the link stack. Instead use bctrl when making function calls from BPF programs. Reported-by: Anton Blanchard Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609090024.1446800-1-naveen.n.rao@linux.vnet.ibm.com commit b8ee3e6d6c5eec7e66de82449382f1a206db2046 Author: Naveen N. Rao Date: Tue Jun 1 13:18:01 2021 +0530 powerpc/xmon: Add support for running a command on all cpus in xmon It is sometimes desirable to run a command on all cpus in xmon. A typical scenario is to obtain the backtrace from all cpus in xmon if there is a soft lockup. Add rudimentary support for the same. The command to be run on all cpus should be prefixed with 'c#'. As an example, 'c#t' will run 't' command and produce a backtrace on all cpus in xmon. Since many xmon commands are not sensible for running in this manner, we only allow a predefined list of commands -- 'r', 'S' and 't' for now. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210601074801.617363-1-naveen.n.rao@linux.vnet.ibm.com commit dcf57af201eb2ba401e62df374afb7543c81b523 Author: Naveen N. Rao Date: Mon May 24 17:32:27 2021 +0530 powerpc/configs: Enable STACK_TRACER and FTRACE_SYSCALLS in some of the configs Both these config options are generally enabled in distro kernels. Enable the same in a few powerpc64 configs to get better coverage and testing. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210524120227.3333208-1-naveen.n.rao@linux.vnet.ibm.com commit 12b58492e60bf5a31d7f41e8a6f8ceb6f87e710e Author: Naveen N. Rao Date: Wed May 19 16:17:21 2021 +0530 powerpc/kprobes: Warn if instruction patching failed When arming and disarming probes, we currently assume that instruction patching can never fail, and don't have a mechanism to surface errors. Add a warning in case instruction patching ever fails. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/18d7b1309f938c08ce07738100932b551bdd3a52.1621416666.git.naveen.n.rao@linux.vnet.ibm.com commit 0566fa760d235c119cef92119efc3ab11486a08a Author: Naveen N. Rao Date: Wed May 19 16:17:18 2021 +0530 powerpc/kprobes: Roll IS_RFI() macro into IS_RFID() In kprobes and xmon, we should exclude both 32-bit and 64-bit variants of mtmsr and rfi instructions from being stepped. Have IS_RFID() also detect a rfi instruction similar to IS_MTMSRD(). Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eee32e1b75dae85d471c89b4c0a123ad4b0aabf8.1621416666.git.naveen.n.rao@linux.vnet.ibm.com commit de21e1377c4fe65bfd8d31e446482c1bc2232997 Author: Vaibhav Jain Date: Thu Jun 24 13:36:21 2021 +0530 powerpc/papr_scm: Add support for reporting dirty-shutdown-count Persistent memory devices like NVDIMMs can loose cached writes in case something prevents flush on power-fail. Such situations are termed as dirty shutdown and are exposed to applications as last-shutdown-state (LSS) flag and a dirty-shutdown-counter(DSC) as described at [1]. The latter being useful in conditions where multiple applications want to detect a dirty shutdown event without racing with one another. PAPR-NVDIMMs have so far only exposed LSS style flags to indicate a dirty-shutdown-state. This patch further adds support for DSC via the "ibm,persistence-failed-count" device tree property of an NVDIMM. This property is a monotonic increasing 64-bit counter thats an indication of number of times an NVDIMM has encountered a dirty-shutdown event causing persistence loss. Since this value is not expected to change after system-boot hence papr_scm reads & caches its value during NVDIMM probe and exposes it as a PAPR sysfs attributed named 'dirty_shutdown' to match the name of similarly named NFIT sysfs attribute. Also this value is available to libnvdimm via PAPR_PDSM_HEALTH payload. 'struct nd_papr_pdsm_health' has been extended to add a new member called 'dimm_dsc' presence of which is indicated by the newly introduced PDSM_DIMM_DSC_VALID flag. References: [1] https://pmem.io/documents/Dirty_Shutdown_Handling-V1.0.pdf Signed-off-by: Vaibhav Jain Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210624080621.252038-1-vaibhav@linux.ibm.com commit ed78f56e1271f108e8af61baeba383dcd77adbec Author: Vaibhav Jain Date: Thu May 13 14:53:49 2021 +0530 powerpc/papr_scm: Make 'perf_stats' invisible if perf-stats unavailable In case performance stats for an nvdimm are not available, reading the 'perf_stats' sysfs file returns an -ENOENT error. A better approach is to make the 'perf_stats' file entirely invisible to indicate that performance stats for an nvdimm are unavailable. So this patch updates 'papr_nd_attribute_group' to add a 'is_visible' callback implemented as newly introduced 'papr_nd_attribute_visible()' that returns an appropriate mode in case performance stats aren't supported in a given nvdimm. Also the initialization of 'papr_scm_priv.stat_buffer_len' is moved from papr_scm_nvdimm_init() to papr_scm_probe() so that it value is available when 'papr_nd_attribute_visible()' is called during nvdimm initialization. Even though 'perf_stats' attribute is available since v5.9, there are no known user-space tools/scripts that are dependent on presence of its sysfs file. Hence I dont expect any user-space breakage with this patch. Fixes: 2d02bf835e57 ("powerpc/papr_scm: Fetch nvdimm performance stats from PHYP") Signed-off-by: Vaibhav Jain Reviewed-by: Dan Williams Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210513092349.285021-1-vaibhav@linux.ibm.com commit 511eea5e2ccdfdbf3d626bde0314e551f247dd18 Author: Naveen N. Rao Date: Wed Jun 23 05:23:30 2021 +0000 powerpc/kprobes: Fix Oops by passing ppc_inst as a pointer to emulate_step() on ppc32 Trying to use a kprobe on ppc32 results in the below splat: BUG: Unable to handle kernel data access on read at 0x7c0802a6 Faulting instruction address: 0xc002e9f0 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K PowerPC 44x Platform Modules linked in: CPU: 0 PID: 89 Comm: sh Not tainted 5.13.0-rc1-01824-g3a81c0495fdb #7 NIP: c002e9f0 LR: c0011858 CTR: 00008a47 REGS: c292fd50 TRAP: 0300 Not tainted (5.13.0-rc1-01824-g3a81c0495fdb) MSR: 00009000 CR: 24002002 XER: 20000000 DEAR: 7c0802a6 ESR: 00000000 NIP [c002e9f0] emulate_step+0x28/0x324 LR [c0011858] optinsn_slot+0x128/0x10000 Call Trace: opt_pre_handler+0x7c/0xb4 (unreliable) optinsn_slot+0x128/0x10000 ret_from_syscall+0x0/0x28 The offending instruction is: 81 24 00 00 lwz r9,0(r4) Here, we are trying to load the second argument to emulate_step(): struct ppc_inst, which is the instruction to be emulated. On ppc64, structures are passed in registers when passed by value. However, per the ppc32 ABI, structures are always passed to functions as pointers. This isn't being adhered to when setting up the call to emulate_step() in the optprobe trampoline. Fix the same. Fixes: eacf4c0202654a ("powerpc: Enable OPTPROBES on PPC32") Cc: stable@vger.kernel.org Signed-off-by: Naveen N. Rao Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5bdc8cbc9a95d0779e27c9ddbf42b40f51f883c0.1624425798.git.christophe.leroy@csgroup.eu commit 1af11d098db18bfda5168dc407513726e1b1bdb3 Author: gushengxian Date: Tue Jun 22 04:55:07 2021 -0700 ata: rb532_cf: remove redundant codes The codes "dev_err(&pdev->dev, "no IRQ resource found\n");" is redundant because platform_get_irq() already prints an error. Signed-off-by: gushengxian Link: https://lore.kernel.org/r/20210622115507.359017-1-13145886936@163.com Signed-off-by: Jens Axboe commit fd2ef39cc9a6b9c4c41864ac506906c52f94b06a Author: Jan Kara Date: Wed Jun 23 11:36:34 2021 +0200 blk: Fix lock inversion between ioc lock and bfqd lock Lockdep complains about lock inversion between ioc->lock and bfqd->lock: bfqd -> ioc: put_io_context+0x33/0x90 -> ioc->lock grabbed blk_mq_free_request+0x51/0x140 blk_put_request+0xe/0x10 blk_attempt_req_merge+0x1d/0x30 elv_attempt_insert_merge+0x56/0xa0 blk_mq_sched_try_insert_merge+0x4b/0x60 bfq_insert_requests+0x9e/0x18c0 -> bfqd->lock grabbed blk_mq_sched_insert_requests+0xd6/0x2b0 blk_mq_flush_plug_list+0x154/0x280 blk_finish_plug+0x40/0x60 ext4_writepages+0x696/0x1320 do_writepages+0x1c/0x80 __filemap_fdatawrite_range+0xd7/0x120 sync_file_range+0xac/0xf0 ioc->bfqd: bfq_exit_icq+0xa3/0xe0 -> bfqd->lock grabbed put_io_context_active+0x78/0xb0 -> ioc->lock grabbed exit_io_context+0x48/0x50 do_exit+0x7e9/0xdd0 do_group_exit+0x54/0xc0 To avoid this inversion we change blk_mq_sched_try_insert_merge() to not free the merged request but rather leave that upto the caller similarly to blk_mq_sched_try_merge(). And in bfq_insert_requests() we make sure to free all the merged requests after dropping bfqd->lock. Fixes: aee69d78dec0 ("block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler") Reviewed-by: Ming Lei Acked-by: Paolo Valente Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210623093634.27879-3-jack@suse.cz Signed-off-by: Jens Axboe commit a921c655f2033dd1ce1379128efe881dda23ea37 Author: Jan Kara Date: Wed Jun 23 11:36:33 2021 +0200 bfq: Remove merged request already in bfq_requests_merged() Currently, bfq does very little in bfq_requests_merged() and handles all the request cleanup in bfq_finish_requeue_request() called from blk_mq_free_request(). That is currently safe only because blk_mq_free_request() is called shortly after bfq_requests_merged() while bfqd->lock is still held. However to fix a lock inversion between bfqd->lock and ioc->lock, we need to call blk_mq_free_request() after dropping bfqd->lock. That would mean that already merged request could be seen by other processes inside bfq queues and possibly dispatched to the device which is wrong. So move cleanup of the request from bfq_finish_requeue_request() to bfq_requests_merged(). Acked-by: Paolo Valente Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210623093634.27879-2-jack@suse.cz Signed-off-by: Jens Axboe commit 19938bafa7ae8fc0a4a2c1c1430abb1a04668da1 Author: Jian-Hong Pan Date: Thu Jun 24 11:22:41 2021 +0800 net: bcmgenet: Add mdio-bcm-unimac soft dependency The Broadcom UniMAC MDIO bus from mdio-bcm-unimac module comes too late. So, GENET cannot find the ethernet PHY on UniMAC MDIO bus. This leads GENET fail to attach the PHY as following log: bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000 ... could not attach to PHY bcmgenet fd580000.ethernet eth0: failed to connect to PHY uart-pl011 fe201000.serial: no DMA platform data libphy: bcmgenet MII bus: probed ... unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus It is not just coming too late, there is also no way for the module loader to figure out the dependency between GENET and its MDIO bus driver unless we provide this MODULE_SOFTDEP hint. This patch adds the soft dependency to load mdio-bcm-unimac module before genet module to fix this issue. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=213485 Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Signed-off-by: Jian-Hong Pan Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit c305b9e6d553f73b8434dd781736d180d63b1d64 Author: zhang kai Date: Thu Jun 24 11:09:14 2021 +0800 ipv6: delete useless dst check in ip6_dst_lookup_tail parameter dst always points to null. Signed-off-by: zhang kai Signed-off-by: David S. Miller commit be7f62eebaff2f86c1467a2d33930a0a7a87675b Author: Vladimir Oltean Date: Thu Jun 24 18:52:07 2021 +0300 net: dsa: sja1105: fix NULL pointer dereference in sja1105_reload_cbs() priv->cbs is an array of priv->info->num_cbs_shapers elements of type struct sja1105_cbs_entry which only get allocated if CONFIG_NET_SCH_CBS is enabled. However, sja1105_reload_cbs() is called from sja1105_static_config_reload() which in turn is called for any of the items in sja1105_reset_reasons, therefore during the normal runtime of the driver and not just from a code path which can be triggered by the tc-cbs offload. The sja1105_reload_cbs() function does not contain a check whether the priv->cbs array is NULL or not, it just assumes it isn't and proceeds to iterate through the credit-based shaper elements. This leads to a NULL pointer dereference. The solution is to return success if the priv->cbs array has not been allocated, since sja1105_reload_cbs() has nothing to do. Fixes: 4d7525085a9b ("net: dsa: sja1105: offload the Credit-Based Shaper qdisc") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c4bf1f25c6c187864681d5ad4dd1fa92f62d5d32 Author: Vidya Sagar Date: Tue May 4 22:51:57 2021 +0530 PCI: tegra194: Fix host initialization during resume Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke host initialization during resume as it misses out calling the API dw_pcie_setup_rc() which is required for host and MSI initialization. Link: https://lore.kernel.org/r/20210504172157.29712-1-vidyas@nvidia.com Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization") Tested-by: Jon Hunter Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 7bf475a4614a9722b9b989e53184a02596cf16d1 Author: Zou Wei Date: Wed May 12 12:07:02 2021 +0800 PCI: tegra: Add missing MODULE_DEVICE_TABLE Add missing MODULE_DEVICE_TABLE definition so we generate correct modalias for automatic loading of this driver when it is built as a module. Link: https://lore.kernel.org/r/1620792422-16535-1-git-send-email-zou_wei@huawei.com Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar Acked-by: Thierry Reding commit 911bd1b1f08f31b74607c3e989955b97da588279 Author: Ido Schimmel Date: Thu Jun 24 22:47:24 2021 +0300 mlxsw: core_env: Avoid unnecessary memcpy()s Simply get a pointer to the data in the register payload instead of copying it to a temporary buffer. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 8bead5c2a2551ffb66a1c5a8d9356e55420ed095 Merge: 2e7256f12cdb1 0303b30375dff Author: David S. Miller Date: Thu Jun 24 15:39:59 2021 -0700 Merge tag 'ieee802154-for-davem-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2021-06-24 An update from ieee802154 for your *net* tree. This time we only have fixes for ieee802154 hwsim driver. Sparked from some syzcaller reports We got a potential crash fix from Eric Dumazet and two memory leak fixes from Dongliang Mu. ==================== Signed-off-by: David S. Miller commit e8192476de58f044576adb2179dd1a05e3a9e903 Author: Bailey Forrest Date: Thu Jun 24 15:08:52 2021 -0700 gve: Fix warnings reported for DQO patchset https://patchwork.kernel.org/project/netdevbpf/list/?series=506637&state=* - Remove unused variable - Use correct integer type for string formatting. - Remove `inline` in C files Fixes: 9c1a59a2f4bc ("gve: DQO: Add ring allocation and initialization") Fixes: a57e5de476be ("gve: DQO: Add TX path") Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 2e7256f12cdb16eaa2515b6231d665044a07c51a Author: Sasha Neftin Date: Thu Jun 24 12:02:48 2021 -0700 e1000e: Check the PCIm state Complete to commit def4ec6dce393e ("e1000e: PCIm function state support") Check the PCIm state only on CSME systems. There is no point to do this check on non CSME systems. This patch fixes a generation a false-positive warning: "Error in exiting dmoff" Fixes: def4ec6dce39 ("e1000e: PCIm function state support") Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit a01b45e9d34d278129296daf91c4771143fa9dd9 Author: Maxim Levitsky Date: Wed Jun 23 14:29:55 2021 +0300 KVM: x86: rename apic_access_page_done to apic_access_memslot_enabled This better reflects the purpose of this variable on AMD, since on AMD the AVIC's memory slot can be enabled and disabled dynamically. Signed-off-by: Maxim Levitsky Message-Id: <20210623113002.111448-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 88213da2351479c529c368a9b763c4d52f02255b Author: Aaron Lewis Date: Wed Jun 23 20:34:27 2021 +0000 kvm: x86: disable the narrow guest module parameter on unload When the kvm_intel module unloads the module parameter 'allow_smaller_maxphyaddr' is not cleared because the backing variable is defined in the kvm module. As a result, if the module parameter's state was set before kvm_intel unloads, it will also be set when it reloads. Explicitly clear the state in vmx_exit() to prevent this from happening. Signed-off-by: Aaron Lewis Message-Id: <20210623203426.1891402-1-aaronlewis@google.com> Signed-off-by: Paolo Bonzini Reviewed-by: Jim Mattson commit 39bbcc3a4e39a41a494ea245858db581bf83e752 Author: Aaron Lewis Date: Mon May 10 07:48:34 2021 -0700 selftests: kvm: Allows userspace to handle emulation errors. This test exercises the feature KVM_CAP_EXIT_ON_EMULATION_FAILURE. When enabled, errors in the in-kernel instruction emulator are forwarded to userspace with the instruction bytes stored in the exit struct for KVM_EXIT_INTERNAL_ERROR. So, when the guest attempts to emulate an 'flds' instruction, which isn't able to be emulated in KVM, instead of failing, KVM sends the instruction to userspace to handle. For this test to work properly the module parameter 'allow_smaller_maxphyaddr' has to be set. Signed-off-by: Aaron Lewis Reviewed-by: Jim Mattson Message-Id: <20210510144834.658457-3-aaronlewis@google.com> Signed-off-by: Paolo Bonzini commit 19238e75bd8ed8ffe784bf5b37586e77b2093742 Author: Aaron Lewis Date: Mon May 10 07:48:33 2021 -0700 kvm: x86: Allow userspace to handle emulation errors Add a fallback mechanism to the in-kernel instruction emulator that allows userspace the opportunity to process an instruction the emulator was unable to. When the in-kernel instruction emulator fails to process an instruction it will either inject a #UD into the guest or exit to userspace with exit reason KVM_INTERNAL_ERROR. This is because it does not know how to proceed in an appropriate manner. This feature lets userspace get involved to see if it can figure out a better path forward. Signed-off-by: Aaron Lewis Reviewed-by: David Edmondson Message-Id: <20210510144834.658457-2-aaronlewis@google.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 27de925044e18eb056d6157305c841b1408621b5 Author: Sean Christopherson Date: Tue Jun 22 10:57:39 2021 -0700 KVM: x86/mmu: Let guest use GBPAGES if supported in hardware and TDP is on Let the guest use 1g hugepages if TDP is enabled and the host supports GBPAGES, KVM can't actively prevent the guest from using 1g pages in this case since they can't be disabled in the hardware page walker. While injecting a page fault if a bogus 1g page is encountered during a software page walk is perfectly reasonable since KVM is simply honoring userspace's vCPU model, doing so arguably doesn't provide any meaningful value, and at worst will be horribly confusing as the guest will see inconsistent behavior and seemingly spurious page faults. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-55-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9a65d0b70fa06ae46b9f8ab7dc8e6b3c6f4661ba Author: Sean Christopherson Date: Tue Jun 22 10:57:38 2021 -0700 KVM: x86/mmu: Get CR4.SMEP from MMU, not vCPU, in shadow page fault Use the current MMU instead of vCPU state to query CR4.SMEP when handling a page fault. In the nested NPT case, the current CR4.SMEP reflects L2, whereas the page fault is shadowing L1's NPT, which uses L1's hCR4. Practically speaking, this is a nop a NPT walks are always user faults, i.e. this code will never be reached, but fix it up for consistency. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-54-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fdaa293598f908adb945001dabb305225144e183 Author: Sean Christopherson Date: Tue Jun 22 10:57:37 2021 -0700 KVM: x86/mmu: Get CR0.WP from MMU, not vCPU, in shadow page fault Use the current MMU instead of vCPU state to query CR0.WP when handling a page fault. In the nested NPT case, the current CR0.WP reflects L2, whereas the page fault is shadowing L1's NPT. Practically speaking, this is a nop a NPT walks are always user faults, but fix it up for consistency. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-53-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f82fdaf536ee6de36e3a7b4764f17b81afb8ef93 Author: Sean Christopherson Date: Tue Jun 22 10:57:36 2021 -0700 KVM: x86/mmu: Drop redundant rsvd bits reset for nested NPT Drop the extra reset of shadow_zero_bits in the nested NPT flow now that shadow_mmu_init_context computes the correct level for nested NPT. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-52-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 7cd138db5cae0dac295714b4412a9b44fb4f4e65 Author: Sean Christopherson Date: Tue Jun 22 10:57:35 2021 -0700 KVM: x86/mmu: Optimize and clean up so called "last nonleaf level" logic Drop the pre-computed last_nonleaf_level, which is arguably wrong and at best confusing. Per the comment: Can have large pages at levels 2..last_nonleaf_level-1. the intent of the variable would appear to be to track what levels can _legally_ have large pages, but that intent doesn't align with reality. The computed value will be wrong for 5-level paging, or if 1gb pages are not supported. The flawed code is not a problem in practice, because except for 32-bit PSE paging, bit 7 is reserved if large pages aren't supported at the level. Take advantage of this invariant and simply omit the level magic math for 64-bit page tables (including PAE). For 32-bit paging (non-PAE), the adjustments are needed purely because bit 7 is ignored if PSE=0. Retain that logic as is, but make is_last_gpte() unique per PTTYPE so that the PSE check is avoided for PAE and EPT paging. In the spirit of avoiding branches, bump the "last nonleaf level" for 32-bit PSE paging by adding the PSE bit itself. Note, bit 7 is ignored or has other meaning in CR3/EPTP, but despite FNAME(walk_addr_generic) briefly grabbing CR3/EPTP in "pte", they are not PTEs and will blow up all the other gpte helpers. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-51-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 616007c866a250143e95ea7a696bd924df251f8a Author: Sean Christopherson Date: Tue Jun 22 10:57:34 2021 -0700 KVM: x86: Enhance comments for MMU roles and nested transition trickiness Expand the comments for the MMU roles. The interactions with gfn_track PGD reuse in particular are hairy. Regarding PGD reuse, add comments in the nested virtualization flows to call out why kvm_init_mmu() is unconditionally called even when nested TDP is used. Cc: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-50-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3b77daa5efe1cb343ee498ade6ee58c8ada58074 Author: Sean Christopherson Date: Tue Jun 22 10:57:33 2021 -0700 KVM: x86/mmu: WARN on any reserved SPTE value when making a valid SPTE Replace make_spte()'s WARN on a collision with the magic MMIO value with a generic WARN on reserved bits being set (including EPT's reserved WX combination). Warning on any reserved bits covers MMIO, A/D tracking bits with PAE paging, and in theory any future goofs that are introduced. Opportunistically convert to ONCE behavior to avoid spamming the kernel log, odds are very good that if KVM screws up one SPTE, it will botch all SPTEs for the same MMU. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-49-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 961f84457cd4e2fc479e59d015f1d292ec30373b Author: Sean Christopherson Date: Tue Jun 22 10:57:32 2021 -0700 KVM: x86/mmu: Add helpers to do full reserved SPTE checks w/ generic MMU Extract the reserved SPTE check and print helpers in get_mmio_spte() to new helpers so that KVM can also WARN on reserved badness when making a SPTE. Tag the checking helper with __always_inline to improve the probability of the compiler generating optimal code for the checking loop, e.g. gcc appears to avoid using %rbp when the helper is tagged with a vanilla "inline". No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-48-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 36f267871edceafbfbbc5d570c34c089a2afa1c1 Author: Sean Christopherson Date: Tue Jun 22 10:57:31 2021 -0700 KVM: x86/mmu: Use MMU's role to determine PTTYPE Use the MMU's role instead of vCPU state or role_regs to determine the PTTYPE, i.e. which helpers to wire up. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-47-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fe660f7244d7e237ab7726813dc9aec8e94900d6 Author: Sean Christopherson Date: Tue Jun 22 10:57:30 2021 -0700 KVM: x86/mmu: Collapse 32-bit PAE and 64-bit statements for helpers Skip paging32E_init_context() and paging64_init_context_common() and go directly to paging64_init_context() (was the common version) now that the relevant flows don't need to distinguish between 64-bit PAE and 32-bit PAE for other reasons. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-46-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f4bd6f73763a91a0c6fc39974d57034e19f25494 Author: Sean Christopherson Date: Tue Jun 22 10:57:29 2021 -0700 KVM: x86/mmu: Add a helper to calculate root from role_regs Add a helper to calculate the level for non-EPT page tables from the MMU's role_regs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-45-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 533f9a4b387bf79c722faf0a760a09129d9627f9 Author: Sean Christopherson Date: Tue Jun 22 10:57:28 2021 -0700 KVM: x86/mmu: Add helper to update paging metadata Consolidate MMU guest metadata updates into a common helper for TDP, shadow, and nested MMUs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-44-seanjc@google.com> Signed-off-by: Paolo Bonzini commit af0eb17e99e5df76380404881e3e5042d582a6b3 Author: Sean Christopherson Date: Tue Jun 22 10:57:27 2021 -0700 KVM: x86/mmu: Don't update nested guest's paging bitmasks if CR0.PG=0 Don't bother updating the bitmasks and last-leaf information if paging is disabled as the metadata will never be used. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-43-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fa4b558802c0ed4ef8132c1b2d1e993c519eb0ae Author: Sean Christopherson Date: Tue Jun 22 10:57:26 2021 -0700 KVM: x86/mmu: Consolidate reset_rsvds_bits_mask() calls Move calls to reset_rsvds_bits_mask() out of the various mode statements and under a more generic CR0.PG=1 check. This will allow for additional code consolidation in the future. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-42-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 87e99d7d7054f6a861f18b0e2f30280d2f526f23 Author: Sean Christopherson Date: Tue Jun 22 10:57:25 2021 -0700 KVM: x86/mmu: Use MMU role_regs to get LA57, and drop vCPU LA57 helper Get LA57 from the role_regs, which are initialized from the vCPU even though TDP is enabled, instead of pulling the value directly from the vCPU when computing the guest's root_level for TDP MMUs. Note, the check is inside an is_long_mode() statement, so that requirement is not lost. Use role_regs even though the MMU's role is available and arguably "better". A future commit will consolidate the guest root level logic, and it needs access to EFER.LMA, which is not tracked in the role (it can't be toggled on VM-Exit, unlike LA57). Drop is_la57_mode() as there are no remaining users, and to discourage pulling MMU state from the vCPU (in the future). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-41-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5472fcd4c6c8026565644f31490cfddfdafb9519 Author: Sean Christopherson Date: Tue Jun 22 10:57:24 2021 -0700 KVM: x86/mmu: Get nested MMU's root level from the MMU's role Initialize the MMU's (guest) root_level using its mmu_role instead of redoing the calculations. The role_regs used to calculate the mmu_role are initialized from the vCPU, i.e. this should be a complete nop. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-40-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a4c93252fed1517362d2ce43c6a5fd50a1152ed6 Author: Sean Christopherson Date: Tue Jun 22 10:57:23 2021 -0700 KVM: x86/mmu: Drop "nx" from MMU context now that there are no readers Drop kvm_mmu.nx as there no consumers left. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-39-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 90599c280123618049af5cf375aae5b4e73bec03 Author: Sean Christopherson Date: Tue Jun 22 10:57:22 2021 -0700 KVM: x86/mmu: Use MMU's role to get EFER.NX during MMU configuration Get the MMU's effective EFER.NX from its role instead of using the one-off, dedicated flag. This will allow dropping said flag in a future commit. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-38-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 84a16226046d1c9339a9be3f2b76ea2dc5677f02 Author: Sean Christopherson Date: Tue Jun 22 10:57:21 2021 -0700 KVM: x86/mmu: Use MMU's role/role_regs to compute context's metadata Use the MMU's role and role_regs to calculate the MMU's guest root level and NX bit. For some flows, the vCPU state may not be correct (or relevant), e.g. EPT doesn't interact with EFER.NX and nested NPT will configure the guest_mmu with possibly-stale vCPU state. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-37-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cd628f0f1e1ce0709c2c6bc852b1a3abf9638b26 Author: Sean Christopherson Date: Tue Jun 22 10:57:20 2021 -0700 KVM: x86/mmu: Use MMU's role to detect EFER.NX in guest page walk Use the NX bit from the MMU's role instead of the MMU itself so that the redundant, dedicated "nx" flag can be dropped. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-36-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b67a93a87e1f9281a1d9f4a28052fed49b4591f1 Author: Sean Christopherson Date: Tue Jun 22 10:57:19 2021 -0700 KVM: x86/mmu: Use MMU's roles to compute last non-leaf level Use the MMU's role to get CR4.PSE when determining the last level at which the guest _cannot_ create a non-leaf PTE, i.e. cannot create a huge page. Note, the existing logic is arguably wrong when considering 5-level paging and the case where 1gb pages aren't supported. In practice, the logic is confusing but not broken, because except for 32-bit non-PAE paging, bit 7 (_PAGE_PSE) bit is reserved when a huge page isn't supported at that level. I.e. setting bit 7 will terminate the guest walk one way or another. Furthermore, last_nonleaf_level is only consulted after KVM has verified there are no reserved bits set. All that confusion will be addressed in a future patch by dropping last_nonleaf_level entirely. For now, massage the code to continue the march toward using mmu_role for (almost) all MMU computations. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-35-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2e4c06618d4024f760ba6dfab0978533bd00d03e Author: Sean Christopherson Date: Tue Jun 22 10:57:18 2021 -0700 KVM: x86/mmu: Use MMU's role to compute PKRU bitmask Use the MMU's role to calculate the Protection Keys (Restrict Userspace) bitmask instead of pulling bits from current vCPU state. For some flows, the vCPU state may not be correct (or relevant), e.g. EPT doesn't interact with PKRU. Case in point, the "ept" param simply disappears. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-34-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c596f1470ab7adb9ba6edf301b1f8f29dcefb55f Author: Sean Christopherson Date: Tue Jun 22 10:57:17 2021 -0700 KVM: x86/mmu: Use MMU's role to compute permission bitmask Use the MMU's role to generate the permission bitmasks for the MMU. For some flows, the vCPU state may not be correct (or relevant), e.g. the nested NPT MMU can be initialized with incoherent vCPU state. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-33-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b705a277b7059673c93e7ada01cc446dfae3e85a Author: Sean Christopherson Date: Tue Jun 22 10:57:16 2021 -0700 KVM: x86/mmu: Drop vCPU param from reserved bits calculator Drop the vCPU param from __reset_rsvds_bits_mask() as it's now unused, and ideally will remain unused in the future. Any information that's needed by the low level helper should be explicitly provided as it's used for both shadow/host MMUs and guest MMUs, i.e. vCPU state may be meaningless or simply wrong. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-32-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4e9c0d80dbbd2dd411d726ed10eccaaba6d63a08 Author: Sean Christopherson Date: Tue Jun 22 10:57:15 2021 -0700 KVM: x86/mmu: Use MMU's role to get CR4.PSE for computing rsvd bits Use the MMU's role to get CR4.PSE when calculating reserved bits for the guest's PTEs. Practically speaking, this is a glorified nop as the role always come from vCPU state for the relevant flows, but converting to the roles will provide consistency once everything else is converted, and will Just Work if the "always comes from vCPU" behavior were ever to change (unlikely). Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-31-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8c985b2d8e682edac84bde63cef660cc574f795e Author: Sean Christopherson Date: Tue Jun 22 10:57:14 2021 -0700 KVM: x86/mmu: Don't grab CR4.PSE for calculating shadow reserved bits Unconditionally pass pse=false when calculating reserved bits for shadow PTEs. CR4.PSE is only relevant for 32-bit non-PAE paging, which KVM does not use for shadow paging (including nested NPT). Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-30-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 18db1b1790a899880dc4afdb9ac6c82c91080d66 Author: Sean Christopherson Date: Tue Jun 22 10:57:13 2021 -0700 KVM: x86/mmu: Always set new mmu_role immediately after checking old role Refactor shadow MMU initialization to immediately set its new mmu_role after verifying it differs from the old role, and so that all flavors of MMU initialization share the same check-and-set pattern. Immediately setting the role will allow future commits to use mmu_role to configure the MMU without consuming stale state. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-29-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 84c679f5f52c7a98c9f0986ff89d50dc073b97f3 Author: Sean Christopherson Date: Tue Jun 22 10:57:12 2021 -0700 KVM: x86/mmu: Set CR4.PKE/LA57 in MMU role iff long mode is active Don't set cr4_pke or cr4_la57 in the MMU role if long mode isn't active, which is required for protection keys and 5-level paging to be fully enabled. Ignoring the bit avoids unnecessary reconfiguration on reuse, and also means consumers of mmu_role don't need to manually check for long mode. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-28-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ca8d664f509932eb316a4ae3926176be745e3b3d Author: Sean Christopherson Date: Tue Jun 22 10:57:11 2021 -0700 KVM: x86/mmu: Do not set paging-related bits in MMU role if CR0.PG=0 Don't set CR0/CR4/EFER bits in the MMU role if paging is disabled, paging modifiers are irrelevant if there is no paging in the first place. Somewhat arbitrarily clear gpte_is_8_bytes for shadow paging if paging is disabled in the guest. Again, there are no guest PTEs to process, so the size is meaningless. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-27-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6066772455f21ce1e90f003243c9864091621773 Author: Sean Christopherson Date: Tue Jun 22 10:57:10 2021 -0700 KVM: x86/mmu: Add accessors to query mmu_role bits Add accessors via a builder macro for all mmu_role bits that track a CR0, CR4, or EFER bit, abstracting whether the bits are in the base or the extended role. Future commits will switch to using mmu_role instead of vCPU state to configure the MMU, i.e. there are about to be a large number of users. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-26-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 167f8a5cae99fb2050d3d674ca84457a526e23dd Author: Sean Christopherson Date: Tue Jun 22 10:57:09 2021 -0700 KVM: x86/mmu: Rename "nxe" role bit to "efer_nx" for macro shenanigans Rename "nxe" to "efer_nx" so that future macro magic can use the pattern _ for all CR0, CR4, and EFER bits that included in the role. Using "efer_nx" also makes it clear that the role bit reflects EFER.NX, not the NX bit in the corresponding PTE. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-25-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8626c120baefe68d22a22d6af9a7eed0b50bee90 Author: Sean Christopherson Date: Tue Jun 22 10:57:08 2021 -0700 KVM: x86/mmu: Use MMU's role_regs, not vCPU state, to compute mmu_role Use the provided role_regs to calculate the mmu_role instead of pulling bits from current vCPU state. For some flows, e.g. nested TDP, the vCPU state may not be correct (or relevant). Cc: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-24-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cd6767c334b628cf566db56c778e67f7e6ae2845 Author: Sean Christopherson Date: Tue Jun 22 10:57:07 2021 -0700 KVM: x86/mmu: Ignore CR0 and CR4 bits in nested EPT MMU role Do not incorporate CR0/CR4 bits into the role for the nested EPT MMU, as EPT behavior is not influenced by CR0/CR4. Note, this is the guest_mmu, (L1's EPT), not nested_mmu (L2's IA32 paging); the nested_mmu does need CR0/CR4, and is initialized in a separate flow. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-23-seanjc@google.com> Signed-off-by: Paolo Bonzini commit af098972295aab280b362090aef964d4eb89f63f Author: Sean Christopherson Date: Tue Jun 22 10:57:06 2021 -0700 KVM: x86/mmu: Consolidate misc updates into shadow_mmu_init_context() Consolidate the MMU metadata update calls to deduplicate code, and to prep for future cleanup. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-22-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 594e91a100ccab334675c4fc9145e6ef3c788449 Author: Sean Christopherson Date: Tue Jun 22 10:57:05 2021 -0700 KVM: x86/mmu: Add struct and helpers to retrieve MMU role bits from regs Introduce "struct kvm_mmu_role_regs" to hold the register state that is incorporated into the mmu_role. For nested TDP, the register state that is factored into the MMU isn't vCPU state; the dedicated struct will be used to propagate the correct state throughout the flows without having to pass multiple params, and also provides helpers for the various flag accessors. Intentionally make the new helpers cumbersome/ugly by prepending four underscores. In the not-too-distant future, it will be preferable to use the mmu_role to query bits as the mmu_role can drop irrelevant bits without creating contradictions, e.g. clearing CR4 bits when CR0.PG=0. Reserve the clean helper names (no underscores) for the mmu_role. Add a helper for vCPU conversion, which is the common case. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-21-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d555f7057ebe34aae42fe2f592a3047e9b151326 Author: Sean Christopherson Date: Tue Jun 22 10:57:04 2021 -0700 KVM: x86/mmu: Grab shadow root level from mmu_role for shadow MMUs Use the mmu_role to initialize shadow root level instead of assuming the level of KVM's shadow root (host) is the same as that of the guest root, or in the case of 32-bit non-PAE paging where KVM forces PAE paging. For nested NPT, the shadow root level cannot be adapted to L1's NPT root level and is instead always the TDP root level because NPT uses the current host CR0/CR4/EFER, e.g. 64-bit KVM can't drop into 32-bit PAE to shadow L1's NPT. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-20-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 16be1d12925305d4d20fd897632d9a6836a865c8 Author: Sean Christopherson Date: Tue Jun 22 10:57:03 2021 -0700 KVM: x86/mmu: Move nested NPT reserved bit calculation into MMU proper Move nested NPT's invocation of reset_shadow_zero_bits_mask() into the MMU proper and unexport said function. Aside from dropping an export, this is a baby step toward eliminating the call entirely by fixing the shadow_root_level confusion. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-19-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 20f632bd0060e12fca083adc44b097231e2f4649 Author: Sean Christopherson Date: Tue Jun 22 10:57:02 2021 -0700 KVM: x86: Read and pass all CR0/CR4 role bits to shadow MMU helper Grab all CR0/CR4 MMU role bits from current vCPU state when initializing a non-nested shadow MMU. Extract the masks from kvm_post_set_cr{0,4}(), as the CR0/CR4 update masks must exactly match the mmu_role bits, with one exception (see below). The "full" CR0/CR4 will be used by future commits to initialize the MMU and its role, as opposed to the current approach of pulling everything from vCPU, which is incorrect for certain flows, e.g. nested NPT. CR4.LA57 is an exception, as it can be toggled on VM-Exit (for L1's MMU) but can't be toggled via MOV CR4 while long mode is active. I.e. LA57 needs to be in the mmu_role, but technically doesn't need to be checked by kvm_post_set_cr4(). However, the extra check is completely benign as the hardware restrictions simply mean LA57 will never be _the_ cause of a MMU reset during MOV CR4. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-18-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 18feaad3c6556192b0d28f0777b021d137076917 Author: Sean Christopherson Date: Tue Jun 22 10:57:01 2021 -0700 KVM: x86/mmu: Drop smep_andnot_wp check from "uses NX" for shadow MMUs Drop the smep_andnot_wp role check from the "uses NX" calculation now that all non-nested shadow MMUs treat NX as used via the !TDP check. The shadow MMU for nested NPT, which shares the helper, does not need to deal with SMEP (or WP) as NPT walks are always "user" accesses and WP is explicitly noted as being ignored: Table walks for guest page tables are always treated as user writes at the nested page table level. A table walk for the guest page itself is always treated as a user access at the nested page table level The host hCR0.WP bit is ignored under nested paging. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-17-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 31e96bc63655ba643e31d83d8652b43f01e43f5b Author: Sean Christopherson Date: Tue Jun 22 10:57:00 2021 -0700 KVM: nSVM: Add a comment to document why nNPT uses vmcb01, not vCPU state Add a comment in the nested NPT initialization flow to call out that it intentionally uses vmcb01 instead current vCPU state to get the effective hCR4 and hEFER for L1's NPT context. Note, despite nSVM's efforts to handle the case where vCPU state doesn't reflect L1 state, the MMU may still do the wrong thing due to pulling state from the vCPU instead of the passed in CR0/CR4/EFER values. This will be addressed in future commits. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit dbc4739b6b3ed478531155c832573a3fb1ab32d9 Author: Sean Christopherson Date: Tue Jun 22 10:56:59 2021 -0700 KVM: x86: Fix sizes used to pass around CR0, CR4, and EFER When configuring KVM's MMU, pass CR0 and CR4 as unsigned longs, and EFER as a u64 in various flows (mostly MMU). Passing the params as u32s is functionally ok since all of the affected registers reserve bits 63:32 to zero (enforced by KVM), but it's technically wrong. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0337f585f57fc80a50e0645ca709512687185c72 Author: Sean Christopherson Date: Tue Jun 22 10:56:58 2021 -0700 KVM: x86/mmu: Rename unsync helper and update related comments Rename mmu_need_write_protect() to mmu_try_to_unsync_pages() and update a variety of related, stale comments. Add several new comments to call out subtle details, e.g. that upper-level shadow pages are write-tracked, and that can_unsync is false iff KVM is in the process of synchronizing pages. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 479a1efc8119d8699cca73d00625b28003d0a1f8 Author: Sean Christopherson Date: Tue Jun 22 10:56:57 2021 -0700 KVM: x86/mmu: Drop the intermediate "transient" __kvm_sync_page() Nove the kvm_unlink_unsync_page() call out of kvm_sync_page() and into it's sole caller, and fold __kvm_sync_page() into kvm_sync_page() since the latter becomes a pure pass-through. There really should be no reason for code to do a complete sync of a shadow page outside of the full kvm_mmu_sync_roots(), e.g. the one use case that creeped in turned out to be flawed and counter-productive. Drop the stale comment about @sp->gfn needing to be write-protected, as it directly contradicts the kvm_mmu_get_page() usage. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 07dc4f35a44c8f85ba7262b56b70c3fcbc3b74fd Author: Sean Christopherson Date: Wed Jun 23 12:49:19 2021 -0400 KVM: x86/mmu: comment on kvm_mmu_get_page's syncing of pages Explain the usage of sync_page() in kvm_mmu_get_page(), which is subtle in how and why it differs from mmu_sync_children(). Signed-off-by: Sean Christopherson [Split out of a different patch by Sean. - Paolo] Signed-off-by: Paolo Bonzini commit 2640b0865395b6a31f76d6eca9937dec3e876ca3 Author: Sean Christopherson Date: Tue Jun 22 10:56:56 2021 -0700 KVM: x86/mmu: WARN and zap SP when sync'ing if MMU role mismatches When synchronizing a shadow page, WARN and zap the page if its mmu role isn't compatible with the current MMU context, where "compatible" is an exact match sans the bits that have no meaning in the overall MMU context or will be explicitly overwritten during the sync. Many of the helpers used by sync_page() are specific to the current context, updating a SMM vs. non-SMM shadow page would use the wrong memslots, updating L1 vs. L2 PTEs might work but would be extremely bizaree, and so on and so forth. Drop the guard with respect to 8-byte vs. 4-byte PTEs in __kvm_sync_page(), it was made useless when kvm_mmu_get_page() stopped trying to sync shadow pages irrespective of the current MMU context. Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 00a669780ffa8c4b5f3e37346b5bf45508dd15bb Author: Sean Christopherson Date: Tue Jun 22 10:56:55 2021 -0700 KVM: x86/mmu: Use MMU role to check for matching guest page sizes Originally, __kvm_sync_page used to check the cr4_pae bit in the role to avoid zapping 4-byte kvm_mmu_pages when guest page size are 8-byte or the other way round. However, in commit 47c42e6b4192 ("KVM: x86: fix handling of role.cr4_pae and rename it to 'gpte_size'", 2019-03-28) it was observed that this did not work for nested EPT, where the page table size would be 8 bytes even if CR4.PAE=0. (Note that the check still has to be done for nested *NPT*, so it is not possible to use tdp_enabled or similar). Therefore, a hack was introduced to identify nested EPT shadow pages and unconditionally call __kvm_sync_page() on them. However, it is possible to do without the hack to identify nested EPT shadow pages: if EPT is active, there will be no shadow pages in non-EPT format, and all of them will have gpte_is_8_bytes set to true; we can just check the MMU role directly, and the test will always be true. Even for non-EPT shadow MMUs, this test should really always be true now that __kvm_sync_page() is called if and only if the role is an exact match (kvm_mmu_get_page()) or is part of the current MMU context (kvm_mmu_sync_roots()). A future commit will convert the likely-pointless check into a meaningful WARN to enforce that the mmu_roles of the current context and the shadow page are compatible. Cc: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ddc16abbbae9cd21705323d47158fb9c334438ba Author: Sean Christopherson Date: Tue Jun 22 10:56:54 2021 -0700 KVM: x86/mmu: Unconditionally zap unsync SPs when creating >4k SP at GFN When creating a new upper-level shadow page, zap unsync shadow pages at the same target gfn instead of attempting to sync the pages. This fixes a bug where an unsync shadow page could be sync'd with an incompatible context, e.g. wrong smm, is_guest, etc... flags. In practice, the bug is relatively benign as sync_page() is all but guaranteed to fail its check that the guest's desired gfn (for the to-be-sync'd page) matches the current gfn associated with the shadow page. I.e. kvm_sync_page() would end up zapping the page anyways. Alternatively, __kvm_sync_page() could be modified to explicitly verify the mmu_role of the unsync shadow page is compatible with the current MMU context. But, except for this specific case, __kvm_sync_page() is called iff the page is compatible, e.g. the transient sync in kvm_mmu_get_page() requires an exact role match, and the call from kvm_sync_mmu_roots() is only synchronizing shadow pages from the current MMU (which better be compatible or KVM has problems). And as described above, attempting to sync shadow pages when creating an upper-level shadow page is unlikely to succeed, e.g. zero successful syncs were observed when running Linux guests despite over a million attempts. Fixes: 9f1a122f970d ("KVM: MMU: allow more page become unsync at getting sp time") Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-10-seanjc@google.com> [Remove WARN_ON after __kvm_sync_page. - Paolo] Signed-off-by: Paolo Bonzini commit 6c032f12dd1e80a9dcd4847feab134d14e5551f8 Author: Sean Christopherson Date: Tue Jun 22 10:56:53 2021 -0700 Revert "KVM: MMU: record maximum physical address width in kvm_mmu_extended_role" Drop MAXPHYADDR from mmu_role now that all MMUs have their role invalidated after a CPUID update. Invalidating the role forces all MMUs to re-evaluate the guest's MAXPHYADDR, and the guest's MAXPHYADDR can only be changed only through a CPUID update. This reverts commit de3ccd26fafc707b09792d9b633c8b5b48865315. Cc: Yu Zhang Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 63f5a1909f9e465eb446274969f65471794deafb Author: Sean Christopherson Date: Tue Jun 22 10:56:52 2021 -0700 KVM: x86: Alert userspace that KVM_SET_CPUID{,2} after KVM_RUN is broken Warn userspace that KVM_SET_CPUID{,2} after KVM_RUN "may" cause guest instability. Initialize last_vmentry_cpu to -1 and use it to detect if the vCPU has been run at least once when its CPUID model is changed. KVM does not correctly handle changes to paging related settings in the guest's vCPU model after KVM_RUN, e.g. MAXPHYADDR, GBPAGES, etc... KVM could theoretically zap all shadow pages, but actually making that happen is a mess due to lock inversion (vcpu->mutex is held). And even then, updating paging settings on the fly would only work if all vCPUs are stopped, updated in concert with identical settings, then restarted. To support running vCPUs with different vCPU models (that affect paging), KVM would need to track all relevant information in kvm_mmu_page_role. Note, that's the _page_ role, not the full mmu_role. Updating mmu_role isn't sufficient as a vCPU can reuse a shadow page translation that was created by a vCPU with different settings and thus completely skip the reserved bit checks (that are tied to CPUID). Tracking CPUID state in kvm_mmu_page_role is _extremely_ undesirable as it would require doubling gfn_track from a u16 to a u32, i.e. would increase KVM's memory footprint by 2 bytes for every 4kb of guest memory. E.g. MAXPHYADDR (6 bits), GBPAGES, AMD vs. INTEL = 1 bit, and SEV C-BIT would all need to be tracked. In practice, there is no remotely sane use case for changing any paging related CPUID entries on the fly, so just sweep it under the rug (after yelling at userspace). Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 49c6f8756cdffeb9af1fbcb86bacacced26465d7 Author: Sean Christopherson Date: Tue Jun 22 10:56:51 2021 -0700 KVM: x86: Force all MMUs to reinitialize if guest CPUID is modified Invalidate all MMUs' roles after a CPUID update to force reinitizliation of the MMU context/helpers. Despite the efforts of commit de3ccd26fafc ("KVM: MMU: record maximum physical address width in kvm_mmu_extended_role"), there are still a handful of CPUID-based properties that affect MMU behavior but are not incorporated into mmu_role. E.g. 1gb hugepage support, AMD vs. Intel handling of bit 8, and SEV's C-Bit location all factor into the guest's reserved PTE bits. The obvious alternative would be to add all such properties to mmu_role, but doing so provides no benefit over simply forcing a reinitialization on every CPUID update, as setting guest CPUID is a rare operation. Note, reinitializing all MMUs after a CPUID update does not fix all of KVM's woes. Specifically, kvm_mmu_page_role doesn't track the CPUID properties, which means that a vCPU can reuse shadow pages that should not exist for the new vCPU model, e.g. that map GPAs that are now illegal (due to MAXPHYADDR changes) or that set bits that are now reserved (PAGE_SIZE for 1gb pages), etc... Tracking the relevant CPUID properties in kvm_mmu_page_role would address the majority of problems, but fully tracking that much state in the shadow page role comes with an unpalatable cost as it would require a non-trivial increase in KVM's memory footprint. The GBPAGES case is even worse, as neither Intel nor AMD provides a way to disable 1gb hugepage support in the hardware page walker, i.e. it's a virtualization hole that can't be closed when using TDP. In other words, resetting the MMU after a CPUID update is largely a superficial fix. But, it will allow reverting the tracking of MAXPHYADDR in the mmu_role, and that case in particular needs to mostly work because KVM's shadow_root_level depends on guest MAXPHYADDR when 5-level paging is supported. For cases where KVM botches guest behavior, the damage is limited to that guest. But for the shadow_root_level, a misconfigured MMU can cause KVM to incorrectly access memory, e.g. due to walking off the end of its shadow page tables. Fixes: 7dcd57552008 ("x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed") Cc: Yu Zhang Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f71a53d1180d5ecc346f0c6a23191d837fe2871b Author: Sean Christopherson Date: Tue Jun 22 10:56:50 2021 -0700 Revert "KVM: x86/mmu: Drop kvm_mmu_extended_role.cr4_la57 hack" Restore CR4.LA57 to the mmu_role to fix an amusing edge case with nested virtualization. When KVM (L0) is using TDP, CR4.LA57 is not reflected in mmu_role.base.level because that tracks the shadow root level, i.e. TDP level. Normally, this is not an issue because LA57 can't be toggled while long mode is active, i.e. the guest has to first disable paging, then toggle LA57, then re-enable paging, thus ensuring an MMU reinitialization. But if L1 is crafty, it can load a new CR4 on VM-Exit and toggle LA57 without having to bounce through an unpaged section. L1 can also load a new CR3 on exit, i.e. it doesn't even need to play crazy paging games, a single entry PML5 is sufficient. Such shenanigans are only problematic if L0 and L1 use TDP, otherwise L1 and L2 share an MMU that gets reinitialized on nested VM-Enter/VM-Exit due to mmu_role.base.guest_mode. Note, in the L2 case with nested TDP, even though L1 can switch between L2s with different LA57 settings, thus bypassing the paging requirement, in that case KVM's nested_mmu will track LA57 in base.level. This reverts commit 8053f924cad30bf9f9a24e02b6c8ddfabf5202ea. Fixes: 8053f924cad3 ("KVM: x86/mmu: Drop kvm_mmu_extended_role.cr4_la57 hack") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ef318b9edf66a082f23d00d79b70c17b4c055a26 Author: Sean Christopherson Date: Tue Jun 22 10:56:49 2021 -0700 KVM: x86/mmu: Use MMU's role to detect CR4.SMEP value in nested NPT walk Use the MMU's role to get its effective SMEP value when injecting a fault into the guest. When walking L1's (nested) NPT while L2 is active, vCPU state will reflect L2, whereas NPT uses the host's (L1 in this case) CR0, CR4, EFER, etc... If L1 and L2 have different settings for SMEP and L1 does not have EFER.NX=1, this can result in an incorrect PFEC.FETCH when injecting #NPF. Fixes: e57d4a356ad3 ("KVM: Add instruction fetch checking when walking guest page table") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0aa1837533e5f4be8cc21bbc06314c23ba2c5447 Author: Sean Christopherson Date: Tue Jun 22 10:56:48 2021 -0700 KVM: x86: Properly reset MMU context at vCPU RESET/INIT Reset the MMU context at vCPU INIT (and RESET for good measure) if CR0.PG was set prior to INIT. Simply re-initializing the current MMU is not sufficient as the current root HPA may not be usable in the new context. E.g. if TDP is disabled and INIT arrives while the vCPU is in long mode, KVM will fail to switch to the 32-bit pae_root and bomb on the next VM-Enter due to running with a 64-bit CR3 in 32-bit mode. This bug was papered over in both VMX and SVM, but still managed to rear its head in the MMU role on VMX. Because EFER.LMA=1 requires CR0.PG=1, kvm_calc_shadow_mmu_root_page_role() checks for EFER.LMA without first checking CR0.PG. VMX's RESET/INIT flow writes CR0 before EFER, and so an INIT with the vCPU in 64-bit mode will cause the hack-a-fix to generate the wrong MMU role. In VMX, the INIT issue is specific to running without unrestricted guest since unrestricted guest is available if and only if EPT is enabled. Commit 8668a3c468ed ("KVM: VMX: Reset mmu context when entering real mode") resolved the issue by forcing a reset when entering emulated real mode. In SVM, commit ebae871a509d ("kvm: svm: reset mmu on VCPU reset") forced a MMU reset on every INIT to workaround the flaw in common x86. Note, at the time the bug was fixed, the SVM problem was exacerbated by a complete lack of a CR4 update. The vendor resets will be reverted in future patches, primarily to aid bisection in case there are non-INIT flows that rely on the existing VMX logic. Because CR0.PG is unconditionally cleared on INIT, and because CR0.WP and all CR4/EFER paging bits are ignored if CR0.PG=0, simply checking that CR0.PG was '1' prior to INIT/RESET is sufficient to detect a required MMU context reset. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 112022bdb5bc372e00e6e43cb88ee38ea67b97bd Author: Sean Christopherson Date: Tue Jun 22 10:56:47 2021 -0700 KVM: x86/mmu: Treat NX as used (not reserved) for all !TDP shadow MMUs Mark NX as being used for all non-nested shadow MMUs, as KVM will set the NX bit for huge SPTEs if the iTLB mutli-hit mitigation is enabled. Checking the mitigation itself is not sufficient as it can be toggled on at any time and KVM doesn't reset MMU contexts when that happens. KVM could reset the contexts, but that would require purging all SPTEs in all MMUs, for no real benefit. And, KVM already forces EFER.NX=1 when TDP is disabled (for WP=0, SMEP=1, NX=0), so technically NX is never reserved for shadow MMUs. Fixes: b8e8c8303ff2 ("kvm: mmu: ITLB_MULTIHIT mitigation") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f0d4379087d8a83f478b371ff7786e8df0cc2314 Author: Sean Christopherson Date: Tue Jun 22 10:56:46 2021 -0700 KVM: x86/mmu: Remove broken WARN that fires on 32-bit KVM w/ nested EPT Remove a misguided WARN that attempts to detect the scenario where using a special A/D tracking flag will set reserved bits on a non-MMIO spte. The WARN triggers false positives when using EPT with 32-bit KVM because of the !64-bit clause, which is just flat out wrong. The whole A/D tracking goo is specific to EPT, and one of the big selling points of EPT is that EPT is decoupled from the host's native paging mode. Drop the WARN instead of trying to salvage the check. Keeping a check specific to A/D tracking bits would essentially regurgitate the same code that led to KVM needed the tracking bits in the first place. A better approach would be to add a generic WARN on reserved bits being set, which would naturally cover the A/D tracking bits, work for all flavors of paging, and be self-documenting to some extent. Fixes: 8a406c89532c ("KVM: x86/mmu: Rename and document A/D scheme for TDP SPTEs") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210622175739.3610207-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit bc9e9e672df9f16f3825320c53ec01b3d44add28 Author: Jing Zhang Date: Wed Jun 23 17:28:46 2021 -0400 KVM: debugfs: Reuse binary stats descriptors To remove code duplication, use the binary stats descriptors in the implementation of the debugfs interface for statistics. This unifies the definition of statistics for the binary and debugfs interfaces. Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-8-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit 0b45d58738cd67d8b63bf093bd56f2f57a00f642 Author: Jing Zhang Date: Fri Jun 18 22:27:08 2021 +0000 KVM: selftests: Add selftest for KVM statistics data binary interface Add selftest to check KVM stats descriptors validity. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Tested-by: Fuad Tabba #arm64 Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-7-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit fdc09ddd40645b0e3f245e4512fd4b4c34cde5e5 Author: Jing Zhang Date: Fri Jun 18 22:27:07 2021 +0000 KVM: stats: Add documentation for binary statistics interface This new API provides a file descriptor for every VM and VCPU to read KVM statistics data in binary format. It is meant to provide a lightweight, flexible, scalable and efficient lock-free solution for user space telemetry applications to pull the statistics data periodically for large scale systems. The pulling frequency could be as high as a few times per second. The statistics descriptors are defined by KVM in kernel and can be by userspace to discover VM/VCPU statistics during the one-time setup stage. The statistics data itself could be read out by userspace telemetry periodically without any extra parsing or setup effort. There are a few existed interface protocols and definitions, but no one can fulfil all the requirements this interface implemented as below: 1. During high frequency periodic stats reading, there should be no extra efforts except the stats data read itself. 2. Support stats annotation, like type (cumulative, instantaneous, peak, histogram, etc) and unit (counter, time, size, cycles, etc). 3. The stats data reading should be free of lock/synchronization. We don't care about the consistency between all the stats data. All stats data can not be read out at exactly the same time. We really care about the change or trend of the stats data. The lock-free solution is not just for efficiency and scalability, also for the stats data accuracy and usability. For example, in the situation that all the stats data readings are protected by a global lock, if one VCPU died somehow with that lock held, then all stats data reading would be blocked, then we have no way from stats data that which VCPU has died. 4. The stats data reading workload can be handed over to other unprivileged process. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Reviewed-by: Fuad Tabba Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-6-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit ce55c049459cff0034cc1bcfdce3bf343a2d6317 Author: Jing Zhang Date: Fri Jun 18 22:27:06 2021 +0000 KVM: stats: Support binary stats retrieval for a VCPU Add a VCPU ioctl to get a statistics file descriptor by which a read functionality is provided for userspace to read out VCPU stats header, descriptors and data. Define VCPU statistics descriptors and header for all architectures. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba #arm64 Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-5-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit fcfe1baeddbf1c7c448b44c82586d0cbc8abc9f5 Author: Jing Zhang Date: Fri Jun 18 22:27:05 2021 +0000 KVM: stats: Support binary stats retrieval for a VM Add a VM ioctl to get a statistics file descriptor by which a read functionality is provided for userspace to read out VM stats header, descriptors and data. Define VM statistics descriptors and header for all architectures. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba #arm64 Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-4-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit 180208cedfec5e6aea53a06e954feffc846c34ab Author: Geert Uytterhoeven Date: Fri Jun 11 14:20:17 2021 +0200 dt-bindings: crypto: ccree: Convert to json-schema Convert the Arm TrustZone CryptoCell cryptographic engine Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/ab361a862755e281f5fef67b3f678d66ae201781.1623413974.git.geert+renesas@glider.be commit 1e32084cb535024ffcd5f1846677cf7f630036ab Author: Nobuhiro Iwamatsu Date: Mon Jun 14 06:28:56 2021 +0900 dt-bindings: fpga: zynq: convert bindings to YAML Convert FPGA for Xilinx Zynq SoC bindings documentation to YAML. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20210613212856.296153-1-iwamatsu@nigauri.org Signed-off-by: Rob Herring commit b14e889c31b5beaab74954efb3672dac3049995e Author: Nobuhiro Iwamatsu Date: Mon Jun 14 05:50:22 2021 +0900 dt-bindings: rtc: zynqmp: convert bindings to YAML Convert Real Time Clock for Xilinx Zynq MPSoC SoC bindings documentation to YAML schemas. And this renamed the file to compatible string of DT. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20210613205022.292575-1-iwamatsu@nigauri.org Signed-off-by: Rob Herring commit 0060a4f28a9ef45ae8163c0805e944a2b1546762 Author: Steve French Date: Thu Jun 24 15:28:04 2021 -0500 cifs: fix missing spinlock around update to ses->status In the other places where we update ses->status we protect the updates via GlobalMid_Lock. So to be consistent add the same locking around it in cifs_put_smb_ses where it was missing. Addresses-Coverity: 1268904 ("Data race condition") Signed-off-by: Steve French commit b64210f2f7c11c757432ba3701d88241b2b98fb1 Author: Dmitry Torokhov Date: Fri Jun 4 16:27:44 2021 -0700 i2c: core: Disable client irq on reboot/shutdown If an i2c client receives an interrupt during reboot or shutdown it may be too late to service it by making an i2c transaction on the bus because the i2c controller has already been shutdown. This can lead to system hangs if the i2c controller tries to make a transfer that is doomed to fail because the access to the i2c pins is already shut down, or an iommu translation has been torn down so i2c controller register access doesn't work. Let's simply disable the irq if there isn't a shutdown callback for an i2c client when there is an irq associated with the device. This will make sure that irqs don't come in later than the time that we can handle it. We don't do this if the i2c client device already has a shutdown callback because presumably they're doing the right thing and quieting the device so irqs don't come in after the shutdown callback returns. Reported-by: kernel test robot [swboyd@chromium.org: Dropped newline, added commit text, added interrupt.h for robot build error] Signed-off-by: Stephen Boyd Signed-off-by: Dmitry Torokhov Signed-off-by: Wolfram Sang commit b05c8922c98de489f52e5d327837857e35d25422 Author: Kewei.Xu Date: Tue Jun 8 11:16:38 2021 +0800 dt-bindings: i2c: update bindings for MT8195 SoC Add a DT binding documentation for the MT8195 soc. Signed-off-by: Kewei.Xu Reviewed-by: Matthias Brugger Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 2f799b25dbaa75027041f55db49a14c59f3116aa Author: Kwon Tae-young Date: Wed Jun 23 17:36:43 2021 +0900 i2c: imx: Fix some checkpatch warnings Fix the following warnings reported by checkpatch:: drivers/i2c/busses/i2c-imx.c:173: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' drivers/i2c/busses/i2c-imx.c:175: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' drivers/i2c/busses/i2c-imx.c:176: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' drivers/i2c/busses/i2c-imx.c:177: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' drivers/i2c/busses/i2c-imx.c:455: WARNING: Unnecessary ftrace-like logging - prefer using ftrace drivers/i2c/busses/i2c-imx.c:602: WARNING: Unnecessary ftrace-like logging - prefer using ftrace drivers/i2c/busses/i2c-imx.c:638: WARNING: Unnecessary ftrace-like logging - prefer using ftrace drivers/i2c/busses/i2c-imx.c:1170: WARNING: Unnecessary ftrace-like logging - prefer using ftrace drivers/i2c/busses/i2c-imx.c:1374: WARNING: Unnecessary ftrace-like logging - prefer using ftrace drivers/i2c/busses/i2c-imx.c:1398: WARNING: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Kwon Tae-young Reviewed-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 1ed1fe24170082bd82f62282eea0d0f8d0462a8e Merge: 98ebad48b8866 fea1d5b17f821 Author: David S. Miller Date: Thu Jun 24 12:58:03 2021 -0700 Merge branch 'sctp-pmtud-convergence' Xin Long says: ==================== sctp: make the PLPMTUD probe more effective and efficient As David Laight noticed, it currently takes quite some time to find the optimal pmtu in the Search state, and also lacks the black hole detection in the Search Complete state. This patchset is to address them to mke the PLPMTUD probe more effective and efficient. ==================== Signed-off-by: David S. Miller commit fea1d5b17f821b78abbdadb9cb6f28fe433b635e Author: Xin Long Date: Thu Jun 24 11:48:09 2021 -0400 sctp: send the next probe immediately once the last one is acked These is no need to wait for 'interval' period for the next probe if the last probe is already acked in search state. The 'interval' period waiting should be only for probe failure timeout and the current pmtu check when it's in search complete state. This change will shorten the probe time a lot in search state, and also fix the document accordingly. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 0dac127c05579854405ef14480936b32371ddaed Author: Xin Long Date: Thu Jun 24 11:48:08 2021 -0400 sctp: do black hole detection in search complete state Currently the PLPMUTD probe will stop for a long period (interval * 30) after it enters search complete state. If there's a pmtu change on the route path, it takes a long time to be aware if the ICMP TooBig packet is lost or filtered. As it says in rfc8899#section-4.3: "A DPLPMTUD method MUST NOT rely solely on this method." (ICMP PTB message). This patch is to enable the other method for search complete state: "A PL can use the DPLPMTUD probing mechanism to periodically generate probe packets of the size of the current PLPMTU." With this patch, the probe will continue with the current pmtu every 'interval' until the PMTU_RAISE_TIMER 'timeout', which we implement by adding raise_count to raise the probe size when it counts to 30 and removing the SCTP_PL_COMPLETE check for PMTU_RAISE_TIMER. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 98ebad48b8866eec6cceb07de304082e8302c1d1 Merge: 89bddde389a8a 75e994709f8a7 Author: David S. Miller Date: Thu Jun 24 12:55:57 2021 -0700 Merge branch 'sja1110-doc' Vladimir Oltean says: ==================== Document the NXP SJA1110 switch as supported Now that most of the basic work for SJA1110 support has been done in the sja1105 DSA driver, let's add the missing documentation bits to make it clear that the driver can be used. ==================== Signed-off-by: David S. Miller commit 75e994709f8a7c34ae826731b50ec1a0c4d99404 Author: Vladimir Oltean Date: Thu Jun 24 17:55:24 2021 +0300 net: dsa: sja1105: document the SJA1110 in the Kconfig Mention support for the SJA1110 in menuconfig. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 44531076338fc9d9556685d3e7efc2526185760d Author: Vladimir Oltean Date: Thu Jun 24 17:55:23 2021 +0300 Documentation: net: dsa: add details about SJA1110 Denote that the new switch generation is supported, detail its pin strapping options (with differences compared to SJA1105) and explain how MDIO access to the internal 100base-T1 and 100base-TX PHYs is performed. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d2ce69ca2516906f08b0b239df9c4e9493a4c193 Author: Richard Zhu Date: Fri Jun 4 09:47:49 2021 +0800 PCI: imx6: Enable PHY internal regulator when supplied >3V The i.MX8MQ PCIe PHY needs 1.8V in default but can be supplied by either a 1.8V or a 3.3V regulator. The "vph-supply" DT property tells us which external regulator supplies the PHY. If that regulator supplies anything over 3V, enable the PHY's internal 3.3V-to-1.8V regulator. Link: https://lore.kernel.org/r/1622771269-13844-3-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach commit c9d511dc84610498f370bbfff16e1c194b93c8d8 Author: Richard Zhu Date: Fri Jun 4 09:47:48 2021 +0800 dt-bindings: imx6q-pcie: Add "vph-supply" for PHY supply voltage The i.MX8MQ PCIe PHY can use either a 1.8V or a 3.3V power supply. Add a "vph-supply" property to indicate which regulator supplies power for the PHY. Link: https://lore.kernel.org/r/1622771269-13844-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Rob Herring commit 7a289a164c734f53178607c24a063551cabd76d9 Author: Richard Zhu Date: Sat Feb 20 10:49:48 2021 +0800 PCI: imx6: Limit DBI register length for imx6qp PCIe Define the length of the DBI registers and limit config space to its length. This makes sure that the kernel does not access registers beyond that point that otherwise would lead to an abort on the i.MX 6QuadPlus. See commit 075af61c19cd ("PCI: imx6: Limit DBI register length") that resolves a similar issue on the i.MX 6Quad PCIe. Link: https://lore.kernel.org/r/1613789388-2495-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Reviewed-by: Krzysztof Wilczyński commit fd6403756f4c142ed788d27cde8d7cae3fba3956 Author: Zhen Lei Date: Tue May 11 19:45:47 2021 +0800 PCI: imx6: Remove imx6_pcie_probe() redundant error message When devm_ioremap_resource() fails, __devm_ioremap_resource() prints an error message including the device name, failure cause, and possibly resource information. Remove the error message from imx6_pcie_probe() since it's redundant. Link: https://lore.kernel.org/r/20210511114547.5601-1-thunder.leizhen@huawei.com Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Acked-by: Richard Zhu commit fd7ce282afc41092f64ad9e3d46f2d896ef1e175 Merge: 624085a31c1ad 956e759d5f8e0 Author: David S. Miller Date: Thu Jun 24 12:49:08 2021 -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 2021-06-24 This series contains updates to i40e driver only. Dinghao Liu corrects error handling for failed i40e_vsi_request_irq() call. Mateusz allows for disabling of autonegotiation for all BaseT media. Jesse corrects the multiplier being used on 5Gb speeds for PTP. Jan adds locking in paths calling i40e_setup_pf_switch() that were missing it. ==================== Signed-off-by: David S. Miller commit 89bddde389a8a02b678dcb49bd8a10e341b018e5 Merge: 478890682ff71 9b8dd5e5ea48b Author: David S. Miller Date: Thu Jun 24 12:47:39 2021 -0700 Merge branch 'gve-dqo' Bailey Forrest says: ==================== gve: Introduce DQO descriptor format DQO is the descriptor format for our next generation virtual NIC. The existing descriptor format will be referred to as "GQI" in the patch set. One major change with DQO is it uses dual descriptor rings for both TX and RX queues. The TX path uses a TX queue to send descriptors to HW, and receives packet completion events on a TX completion queue. The RX path posts buffers to HW using an RX buffer queue and receives incoming packets on an RX queue. One important note is that DQO descriptors and doorbells are little endian. We continue to use the existing big endian control plane infrastructure. The general format of the patch series is: - Refactor existing code/data structures to be shared by DQO - Expand admin queues to support DQO device setup - Expand data structures and device setup to support DQO - Add logic to setup DQO queues - Implement datapath ==================== Signed-off-by: David S. Miller commit 9b8dd5e5ea48bbb7532d20c4093a79d8283e4029 Author: Bailey Forrest Date: Thu Jun 24 11:06:32 2021 -0700 gve: DQO: Add RX path The RX queue has an array of `gve_rx_buf_state_dqo` objects. All allocated pages have an associated buf_state object. When a buffer is posted on the RX buffer queue, the buffer ID will be the buf_state's index into the RX queue's array. On packet reception, the RX queue will have one descriptor for each buffer associated with a received packet. Each RX descriptor will have a buffer_id that was posted on the buffer queue. Notable mentions: - We use a default buffer size of 2048 bytes. Based on page size, we may post separate sections of a single page as separate buffers. - The driver holds an extra reference on pages passed up the receive path with an skb and keeps these pages on a list. When posting new buffers to the NIC, we check if any of these pages has only our reference, or another buffer sized segment of the page has no references. If so, it is free to reuse. This page recycling approach is a common netdev optimization that reduces page alloc/free calls. - Pages in the free list have a page_count bias in order to avoid an atomic increment of pagecount every time we attempt to reuse a page. # references = page_count() - bias - In order to track when a page is safe to reuse, we keep track of the last offset which had a single SKB reference. When this occurs, it implies that every single other offset is reusable. Otherwise, we don't know if offsets can be safely reused. - We maintain two free lists of pages. List #1 (recycled_buf_states) contains pages we know can be reused right away. List #2 (used_buf_states) contains pages which cannot be used right away. We only attempt to get pages from list #2 when list #1 is empty. We only attempt to use a small fixed number pages from list #2 before giving up and allocating a new page. Both lists are FIFOs in hope that by the time we attempt to reuse a page, the references were dropped. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit a57e5de476be0b4b7f42beb6a21c19ad9c577aa3 Author: Bailey Forrest Date: Thu Jun 24 11:06:31 2021 -0700 gve: DQO: Add TX path TX SKBs will have their buffers DMA mapped with the device. Each buffer will have at least one TX descriptor associated. Each SKB will also have a metadata descriptor. Each TX queue maintains an array of `gve_tx_pending_packet_dqo` objects. Every TX SKB will have an associated pending_packet object. A TX SKB's descriptors will use its pending_packet's index as the completion tag, which will be returned on the TX completion queue. The device implements a "flow-miss model". Most packets will simply receive a packet completion. The flow-miss system may choose to process a packet based on its contents. A TX packet which experiences a flow miss would receive a miss completion followed by a later reinjection completion. The miss-completion is received when the packet starts to be processed by the flow-miss system and the reinjection completion is received when the flow-miss system completes processing the packet and sends it on the wire. Notable mentions: - Buffers may be freed after receiving the miss-completion, but in order to avoid packet reordering, we do not complete the SKB until receiving the reinjection completion. - The driver must robustly handle the unlikely scenario where a miss completion does not have an associated reinjection completion. This is accomplished by maintaining a list of packets which have a pending reinjection completion. After a short timeout (5 seconds), the SKB and buffers are released and the pending_packet is moved to a second list which has a longer timeout (60 seconds), where the pending_packet will not be reused. When the longer timeout elapses, the driver may assume the reinjection completion would never be received and the pending_packet may be reused. - Completion handling is triggered by an interrupt and is done in the NAPI poll function. Because the TX path and completion exist in different threading contexts they maintain their own lists for free pending_packet objects. The TX path uses a lock-free approach to steal the list from the completion path. - Both the TSO context and general context descriptors have metadata bytes. The device requires that if multiple descriptors contain the same field, each descriptor must have the same value set for that field. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 0dcc144a7994007e50afe4806e0e4ef860f58013 Author: Bailey Forrest Date: Thu Jun 24 11:06:30 2021 -0700 gve: DQO: Configure interrupts on device up When interrupts are first enabled, we also set the ratelimits, which will be static for the entire usage of the device. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 9c1a59a2f4bcf9926ac5814ae0ce53e449ee0b95 Author: Bailey Forrest Date: Thu Jun 24 11:06:29 2021 -0700 gve: DQO: Add ring allocation and initialization Allocate the buffer and completion ring structures. Do not populate the rings yet. That will happen in the respective rx and tx datapath follow-on patches Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 5e8c5adf95f8a537ec08e8e3798d8bc3464deee8 Author: Bailey Forrest Date: Thu Jun 24 11:06:28 2021 -0700 gve: DQO: Add core netdev features Add napi netdev device registration, interrupt handling and initial tx and rx polling stubs. The stubs will be filled in follow-on patches. Also: - LRO feature advertisement and handling - Also update ethtool logic Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 1f6228e459f8bcfcda2f6a157bbd1ceb57b566f4 Author: Bailey Forrest Date: Thu Jun 24 11:06:27 2021 -0700 gve: Update adminq commands to support DQO queues DQO queue creation requires additional parameters: - TX completion/RX buffer queue size - TX completion/RX buffer queue address - TX/RX queue size - RX buffer size Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit a4aa1f1e69df5612bcc0d7cf2ca23b9fae79941b Author: Bailey Forrest Date: Thu Jun 24 11:06:26 2021 -0700 gve: Add DQO fields for core data structures - Add new DQO datapath structures: - `gve_rx_buf_queue_dqo` - `gve_rx_compl_queue_dqo` - `gve_rx_buf_state_dqo` - `gve_tx_desc_dqo` - `gve_tx_pending_packet_dqo` - Incorporate these into the existing ring data structures: - `gve_rx_ring` - `gve_tx_ring` Noteworthy mentions: - `gve_rx_buf_state` represents an RX buffer which was posted to HW. Each RX queue has an array of these objects and the index into the array is used as the buffer_id when posted to HW. - `gve_tx_pending_packet_dqo` is treated similarly for TX queues. The completion_tag is the index into the array. - These two structures have links for linked lists which are represented by 16b indexes into a contiguous array of these structures. This reduces memory footprint compared to 64b pointers. - We use unions for the writeable datapath structures to reduce cache footprint. GQI specific members will renamed like DQO members in a future patch. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 223198183ff1fc099184081f997bf1f710f1ef72 Author: Bailey Forrest Date: Thu Jun 24 11:06:25 2021 -0700 gve: Add dqo descriptors General description of rings and descriptors: TX ring is used for sending TX packet buffers to the NIC. It has the following descriptors: - `gve_tx_pkt_desc_dqo` - Data buffer descriptor - `gve_tx_tso_context_desc_dqo` - TSO context descriptor - `gve_tx_general_context_desc_dqo` - Generic metadata descriptor Metadata is a collection of 12 bytes. We define `gve_tx_metadata_dqo` which represents the logical interpetation of the metadata bytes. It's helpful to define this structure because the metadata bytes exist in multiple descriptor types (including `gve_tx_tso_context_desc_dqo`), and the device requires same field has the same value in all descriptors. The TX completion ring is used to receive completions from the NIC. Having a separate ring allows for completions to be out of order. The completion descriptor `gve_tx_compl_desc` has several different types, most important are packet and descriptor completions. Descriptor completions are used to notify the driver when descriptors sent on the TX ring are done being consumed. The descriptor completion is only used to signal that space is cleared in the TX ring. A packet completion will be received when a packet transmitted on the TX queue is done being transmitted. In addition there are "miss" and "reinjection" completions. The device implements a "flow-miss model". Most packets will simply receive a packet completion. The flow-miss system may choose to process a packet based on its contents. A TX packet which experiences a flow miss would receive a miss completion followed by a later reinjection completion. The miss-completion is received when the packet starts to be processed by the flow-miss system and the reinjection completion is received when the flow-miss system completes processing the packet and sends it on the wire. The RX buffer ring is used to send buffers to HW via the `gve_rx_desc_dqo` descriptor. Received packets are put into the RX queue by the device, which populates the `gve_rx_compl_desc_dqo` descriptor. The RX descriptors refer to buffers posted by the buffer queue. Received buffers may be returned out of order, such as when HW LRO is enabled. Important concepts: - "TX" and "RX buffer" queues, which send descriptors to the device, use MMIO doorbells to notify the device of new descriptors. - "RX" and "TX completion" queues, which receive descriptors from the device, use a "generation bit" to know when a descriptor was populated by the device. The driver initializes all bits with the "current generation". The device will populate received descriptors with the "next generation" which is inverted from the current generation. When the ring wraps, the current/next generation are swapped. - It's the driver's responsibility to ensure that the RX and TX completion queues are not overrun. This can be accomplished by limiting the number of descriptors posted to HW. - TX packets have a 16 bit completion_tag and RX buffers have a 16 bit buffer_id. These will be returned on the TX completion and RX queues respectively to let the driver know which packet/buffer was completed. Bitfields are used to describe descriptor fields. This notation is more concise and readable than shift-and-mask. It is possible because the driver is restricted to little endian platforms. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit c4b87ac87635879ecf0d26807dc00df9bb7eb508 Author: Bailey Forrest Date: Thu Jun 24 11:06:24 2021 -0700 gve: Add support for DQO RX PTYPE map Unlike GQI, DQO RX descriptors do not contain the L3 and L4 type of the packet. L3 and L4 types are necessary in order to set the hash and csum on RX SKBs correctly. DQO RX descriptors instead contain a 10 bit PTYPE index. The PTYPE map enables the device to tell the driver how to map from PTYPE index to L3/L4 type. The device doesn't provide any guarantees about the range of possible PTYPEs, so we just use a 1024 entry array to implement a fast mapping structure. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 5ca2265eefc0bdfc80d4cbe9f70a81c40c41ae60 Author: Bailey Forrest Date: Thu Jun 24 11:06:23 2021 -0700 gve: adminq: DQO specific device descriptor logic - In addition to TX and RX queues, DQO has TX completion and RX buffer queues. - TX completions are received when the device has completed sending a packet on the wire. - RX buffers are posted on a separate queue form the RX completions. - DQO descriptor rings are allowed to be smaller than PAGE_SIZE. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit a5886ef4f4bfc305bfd9efdf6166621b5c602fca Author: Bailey Forrest Date: Thu Jun 24 11:06:22 2021 -0700 gve: Introduce per netdev `enum gve_queue_format` The currently supported queue formats are: - GQI_RDA - GQI with raw DMA addressing - GQI_QPL - GQI with queue page list - DQO_RDA - DQO with raw DMA addressing The old `gve_priv.raw_addressing` value is only used for GQI_RDA, so we remove it in favor of just checking against GQI_RDA Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 8a39d3e0dadfe27a50019fa83dc57c5158e42ed1 Author: Bailey Forrest Date: Thu Jun 24 11:06:21 2021 -0700 gve: Introduce a new model for device options The current model uses an integer ID and a fixed size struct for the parameters of each device option. The new model allows the device option structs to grow in size over time. A driver may assume that changes to device option structs will always be appended. New device options will also generally have a `supported_features_mask` so that the driver knows which fields within a particular device option are enabled. `gve_device_option.feat_mask` is changed to `required_features_mask`, and it is a bitmask which must match the value expected by the driver. This gives the device the ability to break backwards compatibility with old drivers for certain features by blocking the old drivers from trying to use the feature. We maintain ABI compatibility with the old model for GVE_DEV_OPT_ID_RAW_ADDRESSING in case a driver is using a device which does not support the new model. This patch introduces some new terminology: RDA - Raw DMA Addressing - Buffers associated with SKBs are directly DMA mapped and read/updated by the device. QPL - Queue Page Lists - Driver uses bounce buffers which are DMA mapped with the device for read/write and data is copied from/to SKBs. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 920fb45193551dc0e6cd8fa89e2487906f1867f6 Author: Bailey Forrest Date: Thu Jun 24 11:06:20 2021 -0700 gve: Make gve_rx_slot_page_info.page_offset an absolute offset Using `page_offset` like a boolean means a page may only be split into two sections. With page sizes larger than 4k, this can be very wasteful. Future commits in this patchset use `struct gve_rx_slot_page_info` in a way which supports a fixed buffer size and a variable page size. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit 35f9b2f43f8e0aee52421640912edc1ec309fd2e Author: Bailey Forrest Date: Thu Jun 24 11:06:19 2021 -0700 gve: gve_rx_copy: Move padding to an argument Future use cases will have a different padding value. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit dbdaa6754051280d929514a1722b9d5bc7c65a61 Author: Bailey Forrest Date: Thu Jun 24 11:06:18 2021 -0700 gve: Move some static functions to a common file These functions will be shared by the GQI and DQO variants of the GVNIC driver as of follow-up patches in this series. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit c6a7ed77ee6334f3a85a0f3db74ca80101e25304 Author: Bailey Forrest Date: Thu Jun 24 11:06:17 2021 -0700 gve: Update GVE documentation to describe DQO DQO is a new descriptor format for our next generation virtual NIC. Signed-off-by: Bailey Forrest Reviewed-by: Willem de Bruijn Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit b7705ba6d0c4aac52688a96884bd6fde91f3b2fb Author: Sudeep Holla Date: Thu Jun 17 21:53:17 2021 +0100 dt-bindings: interrupt-controller: Convert ARM VIC to json-schema Convert the ARM VIC binding document to DT schema format using json-schema. Cc: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210617205317.3060163-1-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 7b25995f5319adc354a430df0eb2ec7f79a1e807 Author: Dong Aisheng Date: Fri Jun 11 21:11:53 2021 +0800 of: of_reserved_mem: mark nomap memory instead of removing Since commit 86588296acbf ("fdt: Properly handle "no-map" field in the memory region"), nomap memory is changed to call memblock_mark_nomap() instead of memblock_remove(). But it only changed the reserved memory with fixed addr and size case in early_init_dt_reserve_memory_arch(), not including the dynamical allocation by size case in early_init_dt_alloc_reserved_memory_arch(). Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng Reviewed-by: Quentin Perret Link: https://lore.kernel.org/r/20210611131153.3731147-2-aisheng.dong@nxp.com Signed-off-by: Rob Herring commit 3c6867a12a224db1ff83b68a8ae91ece26986e1f Author: Dong Aisheng Date: Fri Jun 11 21:11:52 2021 +0800 of: of_reserved_mem: only call memblock_free for normal reserved memory For nomap case, the memory block will be removed by memblock_remove() in early_init_dt_alloc_reserved_memory_arch(). So it's meaningless to call memblock_free() on error path. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng Link: https://lore.kernel.org/r/20210611131153.3731147-1-aisheng.dong@nxp.com Signed-off-by: Rob Herring commit 655832d12f2251e04031294f547c86935a0a126d Author: Martin Blumenstingl Date: Wed Jan 6 14:55:40 2021 +0100 PCI: intel-gw: Fix INTx enable The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code however was taking (for example) "13" as raw value instead of taking BIT(13). Define the legacy PCI interrupt bits using the BIT() macro and then use these in PCIE_APP_IRN_INT. Link: https://lore.kernel.org/r/20210106135540.48420-1-martin.blumenstingl@googlemail.com Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver") Signed-off-by: Martin Blumenstingl Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Rahul Tanwar commit 624085a31c1ad6a80b1e53f686bf6ee92abbf6e8 Author: Eric Dumazet Date: Thu Jun 24 03:07:20 2021 -0700 ipv6: fix out-of-bound access in ip6_parse_tlv() First problem is that optlen is fetched without checking there is more than one byte to parse. Fix this by taking care of IPV6_TLV_PAD1 before fetching optlen (under appropriate sanity checks against len) Second problem is that IPV6_TLV_PADN checks of zero padding are performed before the check of remaining length. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: c1412fce7ecc ("net/ipv6/exthdrs.c: Strict PadN option checking") Signed-off-by: Eric Dumazet Cc: Paolo Abeni Cc: Tom Herbert Signed-off-by: David S. Miller commit d9b6d26f6569d3ff748f6ba7a9ea3929abe5a17e Merge: abe90454f0759 d67fb4772d9a6 Author: David S. Miller Date: Thu Jun 24 12:41:13 2021 -0700 Merge branch 'macsec-key-length' Antoine Tenart says: ==================== net: macsec: fix key length when offloading The key length used to copy the key to offloading drivers and to store it is wrong and was working by chance as it matched the default key length. But using a different key length fails. Fix it by using instead the max length accepted in uAPI to store the key and the actual key length when copying it. This was tested on the MSCC PHY driver but not on the Atlantic MAC (looking at the code it looks ok, but testing would be appreciated). ==================== Signed-off-by: David S. Miller commit d67fb4772d9a6cfd10f1109f0e7b1e6eb58c8e16 Author: Antoine Tenart Date: Thu Jun 24 11:38:30 2021 +0200 net: atlantic: fix the macsec key length The key length used to store the macsec key was set to MACSEC_KEYID_LEN (16), which is an issue as: - This was never meant to be the key length. - The key length can be > 16. Fix this by using MACSEC_MAX_KEY_LEN instead (the max length accepted in uAPI). Fixes: 27736563ce32 ("net: atlantic: MACSec egress offload implementation") Fixes: 9ff40a751a6f ("net: atlantic: MACSec ingress offload implementation") Reported-by: Lior Nahmanson Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit c309217f91f2d2097c2a0a832d9bff50b88c81dc Author: Antoine Tenart Date: Thu Jun 24 11:38:29 2021 +0200 net: phy: mscc: fix macsec key length The key length used to store the macsec key was set to MACSEC_KEYID_LEN (16), which is an issue as: - This was never meant to be the key length. - The key length can be > 16. Fix this by using MACSEC_MAX_KEY_LEN instead (the max length accepted in uAPI). Fixes: 28c5107aa904 ("net: phy: mscc: macsec support") Reported-by: Lior Nahmanson Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 1f7fe5121127e037b86592ba42ce36515ea0e3f7 Author: Antoine Tenart Date: Thu Jun 24 11:38:28 2021 +0200 net: macsec: fix the length used to copy the key for offloading The key length used when offloading macsec to Ethernet or PHY drivers was set to MACSEC_KEYID_LEN (16), which is an issue as: - This was never meant to be the key length. - The key length can be > 16. Fix this by using MACSEC_MAX_KEY_LEN to store the key (the max length accepted in uAPI) and secy->key_len to copy it. Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure") Reported-by: Lior Nahmanson Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 7bb7d802af1d0b2608ef5afafcf968073a50acb7 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:21 2021 +0200 trace/hwlat: Switch disable_migrate to mode none When in the round-robin mode, if the tracer detects a change in the hwlatd thread affinity by an external tool, e.g., taskset, the round-robin logic is disabled. The disable_migrate variable currently tracks this. With the addition of the "mode" config and the mode "none," the disable_migrate logic is equivalent to switch to the "none" mode. Hence, instead of using a hidden variable to track this behavior, switch the mode to none, informing the user about this change. Link: https://lkml.kernel.org/r/a679af672458d6b1f62252605905c5214030f247.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 8fa826b7344d6752f5cfd72380d9fe7bd8c6b928 Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:20 2021 +0200 trace/hwlat: Implement the mode config option Provides the "mode" config to the hardware latency detector. hwlatd has two different operation modes. The default mode is the "round-robin" one, in which a single hwlatd thread runs, migrating among the allowed CPUs in a "round-robin" fashion. This is the current behavior. The "none" sets the allowed cpumask for a single hwlatd thread at the startup, but skips the round-robin, letting the scheduler handle the migration. In preparation to the per-cpu mode. Link: https://lkml.kernel.org/r/f3b1271262aa030c680e26615c1b9b2d71e55e92.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit bb1b24cf41b5b3b96a921f80f9799e7be75f167d Author: Daniel Bristot de Oliveira Date: Tue Jun 22 16:42:19 2021 +0200 trace/hwlat: Fix Clark's email Clark's email is williams@redhat.com. No functional change. Link: https://lkml.kernel.org/r/6fa4b49e17ab8a1ff19c335ab7cde38d8afb0e29.1624372313.git.bristot@redhat.com Cc: Phil Auld Cc: Sebastian Andrzej Siewior Cc: Kate Carcia Cc: Jonathan Corbet Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Clark Willaims Cc: John Kacur Cc: Juri Lelli Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (VMware) commit 478890682ff7124bf4eaa6f0af382e9d2c937f73 Author: Yajun Deng Date: Thu Jun 24 15:35:08 2021 +0800 usbnet: add usbnet_event_names[] for kevent Modify the netdev_dbg content from int to char * in usbnet_defer_kevent(), this looks more readable. Signed-off-by: Yajun Deng Signed-off-by: David S. Miller commit 171ec346fc8936f52e1184f1ab1377ee40052bfc Author: Steven Rostedt (VMware) Date: Fri Jun 18 11:26:47 2021 -0400 bootconfig/tracing/ktest: Add ktest examples of testing bootconfig bootconfig is a new feature that appends scripts onto the initrd, and the kernel executes the scripts as an extended kernel command line. Need to add tests to test that the happened. To test the bootconfig properly, the initrd needs to be updated and the kernel rebooted. ktest is the perfect solution to perform these tests. Add a example bootconfig.conf in the tools/testing/ktest/examples/include and example bootconfig scripts in tools/testing/ktest/examples/bootconfig and also include verifier scripts that ktest will install on the target and run to make sure that the bootconfig options in the scripts took place after the target rebooted with the new initrd update. Link: https://lkml.kernel.org/r/20210618112647.6a81dec5@oasis.local.home Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 742b4c0d1efe7a7640ad17f1bbf696a1305f6495 Author: Luis Chamberlain Date: Tue Jun 22 19:28:24 2021 -0700 vfio: use the new pci_dev_trylock() helper to simplify try lock Use the new pci_dev_trylock() helper to simplify our locking. Signed-off-by: Luis Chamberlain Reviewed-by: Cornelia Huck Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20210623022824.308041-3-mcgrof@kernel.org Signed-off-by: Alex Williamson commit e3a9b1212b9d6cb20751196e338f4a5138d539d3 Author: Luis Chamberlain Date: Tue Jun 22 19:28:23 2021 -0700 PCI: Export pci_dev_trylock() and pci_dev_unlock() Other places in the kernel use this form, and so just provide a common path for it. Acked-by: Bjorn Helgaas Signed-off-by: Luis Chamberlain Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20210623022824.308041-2-mcgrof@kernel.org Signed-off-by: Alex Williamson commit 0af5160edb87b1868eba514422d3991628a018f8 Author: Colin Ian King Date: Tue Jun 22 19:37:10 2021 +0100 vfio/mdpy: Fix memory leak of object mdev_state->vconfig In the case where the call to vfio_register_group_dev fails the error return path kfree's mdev_state but not mdev_state->vconfig. Fix this by kfree'ing mdev_state->vconfig before returning. Addresses-Coverity: ("Resource leak") Fixes: 437e41368c01 ("vfio/mdpy: Convert to use vfio_register_group_dev()") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210622183710.28954-1-colin.king@canonical.com Signed-off-by: Alex Williamson commit 51f382428c17f172f430f9be8de4246b8f15f97c Author: Joshua Martinez Date: Wed Jun 16 23:18:29 2021 +0000 perf top: Add cgroup support for perf top (-G) Added callback option (-G) to support cgroups for 'perf top'. Added condition to make sure -cgroup and --all-cgroups aren't both enabled. Example: $perf top -e cycles -G system.slice/docker-6b95a5eb649c0d671eba3835f0d93973d05a088f3ae8602246bde37affb1ba3e.scope -a --stdio PerfTop: 3330 irqs/sec kernel:68.2% exact: 0.0% lost: 0/0 drop: 0/11075 [4000Hz cpu-clock], (all, 4 CPUs) ------------------------------------------------------------------------------------------------------------------------------------------------------- 27.32% [unknown] [.] 0x00007f8ab7b69352 11.44% [kernel] [k] 0xffffffff968cd657 3.12% [kernel] [k] 0xffffffff96160e96 2.63% [kernel] [k] 0xffffffff96160eb0 1.96% [kernel] [k] 0xffffffff9615fcf6 1.42% [kernel] [k] 0xffffffff964ddfc7 1.09% [kernel] [k] 0xffffffff96160e90 0.81% [kernel] [k] 0xffffffff96160eb3 0.67% [kernel] [k] 0xffffffff9615fec1 0.57% [kernel] [k] 0xffffffff961ee1d0 0.53% [unknown] [.] 0x00007f8ab7b6666c 0.53% [kernel] [k] 0xffffffff96160e64 0.52% [kernel] [k] 0xffffffff9616c303 0.51% [kernel] [k] 0xffffffffc08e7d50 ... Signed-off-by: Joshua Martinez Reviewed-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: joshua martinez Link: http://lore.kernel.org/lkml/20210616231829.3735671-1-joshuamart@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b01d550663fa5fd40a1785b0f1211fb657892edf Author: Colin Ian King Date: Wed Jun 23 18:23:00 2021 +0100 spi: Fix self assignment issue with ancillary->mode There is an assignment of ancillary->mode to itself which looks dubious since the proceeding comment states that the speed and mode is taken over from the SPI main device, indicating that ancillary->mode should assigned using the value spi->mode. Fix this. Addresses-Coverity: ("Self assignment") Fixes: 0c79378c0199 ("spi: add ancillary device support") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210623172300.161484-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 6a7f5bd6185e1c86256d5e52c3bb7a4d390d6e19 Author: Srinivas Kandagatla Date: Thu Jun 24 10:21:53 2021 +0100 ASoC: qcom: lpass-cpu: mark IRQ_CLEAR register as volatile and readable Currently IRQ_CLEAR register is marked as write-only, however using regmap_update_bits on this register will have some side effects. so mark IRQ_CLEAR register appropriately as readable and volatile. Fixes: da0363f7bfd3 ("ASoC: qcom: Fix for DMA interrupt clear reg overwriting") Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Tested-by: Srinivasa Rao Mandadapu Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210624092153.5771-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit ca0c448d2b9f43e3175835d536853854ef544e22 Author: Håkon Bugge Date: Tue Jun 22 15:39:57 2021 +0200 RDMA/cma: Protect RMW with qp_mutex The struct rdma_id_private contains three bit-fields, tos_set, timeout_set, and min_rnr_timer_set. These are set by accessor functions without any synchronization. If two or all accessor functions are invoked in close proximity in time, there will be Read-Modify-Write from several contexts to the same variable, and the result will be intermittent. Fixed by protecting the bit-fields by the qp_mutex in the accessor functions. The consumer of timeout_set and min_rnr_timer_set is in rdma_init_qp_attr(), which is called with qp_mutex held for connected QPs. Explicit locking is added for the consumers of tos and tos_set. This commit depends on ("RDMA/cma: Remove unnecessary INIT->INIT transition"), since the call to rdma_init_qp_attr() from cma_init_conn_qp() does not hold the qp_mutex. Fixes: 2c1619edef61 ("IB/cma: Define option to set ack timeout and pack tos_set") Fixes: 3aeffc46afde ("IB/cma: Introduce rdma_set_min_rnr_timer()") Link: https://lore.kernel.org/r/1624369197-24578-3-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit dc70f7c3ed34b081c02a611591c5079c53b771b8 Author: Håkon Bugge Date: Tue Jun 22 15:39:56 2021 +0200 RDMA/cma: Remove unnecessary INIT->INIT transition In rdma_create_qp(), a connected QP will be transitioned to the INIT state. Afterwards, the QP will be transitioned to the RTR state by the cma_modify_qp_rtr() function. But this function starts by performing an ib_modify_qp() to the INIT state again, before another ib_modify_qp() is performed to transition the QP to the RTR state. Hence, there is no need to transition the QP to the INIT state in rdma_create_qp(). Link: https://lore.kernel.org/r/1624369197-24578-2-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 67faf76d2674a013b322d68e1c324c2d8cdd875a Merge: c88c192dc3ea2 d0f482bb06f94 Author: David S. Miller Date: Thu Jun 24 11:28:13 2021 -0700 Merge branch 'add-sparx5i-driver' Steen Hegelund says: ==================== Adding the Sparx5i Switch Driver This series provides the Microchip Sparx5i Switch Driver The SparX-5 Enterprise Ethernet switch family provides a rich set of Enterprise switching features such as advanced TCAM-based VLAN and QoS processing enabling delivery of differentiated services, and security through TCAMbased frame processing using versatile content aware processor (VCAP). IPv4/IPv6 Layer 3 (L3) unicast and multicast routing is supported with up to 18K IPv4/9K IPv6 unicast LPM entries and up to 9K IPv4/3K IPv6 (S,G) multicast groups. L3 security features include source guard and reverse path forwarding (uRPF) tasks. Additional L3 features include VRF-Lite and IP tunnels (IP over GRE/IP). The SparX-5 switch family features a highly flexible set of Ethernet ports with support for 10G and 25G aggregation links, QSGMII, USGMII, and USXGMII. The device integrates a powerful 1 GHz dual-core ARM® Cortex®-A53 CPU enabling full management of the switch and advanced Enterprise applications. The SparX-5 switch family targets managed Layer 2 and Layer 3 equipment in SMB, SME, and Enterprise where high port count 1G/2.5G/5G/10G switching with 10G/25G aggregation links is required. The SparX-5 switch family consists of following SKUs: VSC7546 SparX-5-64 supports up to 64 Gbps of bandwidth with the following primary port configurations. - 6 ×10G - 16 × 2.5G + 2 × 10G - 24 × 1G + 4 × 10G VSC7549 SparX-5-90 supports up to 90 Gbps of bandwidth with the following primary port configurations. - 9 × 10G - 16 × 2.5G + 4 × 10G - 48 × 1G + 4 × 10G VSC7552 SparX-5-128 supports up to 128 Gbps of bandwidth with the following primary port configurations. - 12 × 10G - 6 x 10G + 2 x 25G - 16 × 2.5G + 8 × 10G - 48 × 1G + 8 × 10G VSC7556 SparX-5-160 supports up to 160 Gbps of bandwidth with the following primary port configurations. - 16 × 10G - 10 × 10G + 2 × 25G - 16 × 2.5G + 10 × 10G - 48 × 1G + 10 × 10G VSC7558 SparX-5-200 supports up to 200 Gbps of bandwidth with the following primary port configurations. - 20 × 10G - 8 × 25G In addition, the device supports one 10/100/1000/2500/5000 Mbps SGMII/SerDes node processor interface (NPI) Ethernet port. Time sensitive networking (TSN) is supported through a comprehensive set of features including frame preemption, cut-through, frame replication and elimination for reliability, enhanced scheduling: credit-based shaping, time-aware shaping, cyclic queuing, and forwarding, and per-stream policing and filtering. Together with IEEE 1588 and IEEE 802.1AS support, this guarantees low-latency deterministic networking for Industrial Ethernet. The Sparx5i support is developed on the PCB134 and PCB135 evaluation boards. - PCB134 main networking features: - 12x SFP+ front 10G module slots (connected to Sparx5i through SFI). - 8x SFP28 front 25G module slots (connected to Sparx5i through SFI high speed). - Optional, one additional 10/100/1000BASE-T (RJ45) Ethernet port (on-board VSC8211 PHY connected to Sparx5i through SGMII). - PCB135 main networking features: - 48x1G (10/100/1000M) RJ45 front ports using 12xVSC8514 QuadPHY’s each connected to VSC7558 through QSGMII. - 4x10G (1G/2.5G/5G/10G) RJ45 front ports using the AQR407 10G QuadPHY each port connects to VSC7558 through SFI. - 4x SFP28 25G module slots on back connected to VSC7558 through SFI high speed. - Optional, one additional 1G (10/100/1000M) RJ45 port using an on-board VSC8211 PHY, which can be connected to VSC7558 NPI port through SGMII using a loopback add-on PCB) This series provides support for: - SFPs and DAC cables via PHYLINK with a number of 5G, 10G and 25G devices and media types. - Port module configuration for 10M to 25G speeds with SGMII, QSGMII, 1000BASEX, 2500BASEX and 10GBASER as appropriate for these modes. - SerDes configuration via the Sparx5i SerDes driver (see below). - Host mode providing register based injection and extraction. - Switch mode providing MAC/VLAN table learning and Layer2 switching offloaded to the Sparx5i switch. - STP state, VLAN support, host/bridge port mode, Forwarding DB, and configuration and statistics via ethtool. More support will be added at a later stage. The Sparx5i Chip Register Model can be browsed at this location: https://github.com/microchip-ung/sparx-5_reginfo and the datasheet is available here: https://ww1.microchip.com/downloads/en/DeviceDoc/SparX-5_Family_L2L3_Enterprise_10G_Ethernet_Switches_Datasheet_00003822B.pdf The series depends on the following series currently on their way into the kernel: - 25G Base-R phy mode Link: https://lore.kernel.org/r/20210611125453.313308-1-steen.hegelund@microchip.com/ - Sparx5 Reset Driver Link: https://lore.kernel.org/r/20210416084054.2922327-1-steen.hegelund@microchip.com/ ChangeLog: v5: - cover letter - updated the description to match the latest data sheets - basic driver - added error message in case of reset controller error - port struct: replacing has_sfp with inband, adding pause_adv - host mode - port cleanup: unregisters netdevs and then removes phylink etc - checking for pause_adv when comparing port config changes - getting duplex and pause state in the link_up callback. - getting inband, autoneg and pause_adv config in the pcs_config callback. - port - use only the pause_adv bits when getting aneg status - use the inband state when updating the PCS and port config v4: - basic driver: Using devm_reset_control_get_optional_shared to get the reset control, and let the reset framework check if it is valid. - host mode (phylink): Use the PCS operations to get state and update configuration. Removed the setting of interface modes. Let phylink control this. Using the new 5gbase-r and 25gbase-r modes. Using a helper function to check if one of the 3 base-r modes has been selected. Currently it will not be possible to change the interface mode by changing the speed (e.g via ethtool). This will be added later. v3: - basic driver: - removed unneeded braces - release reference to ports node after use - use dev_err_probe to handle DEFER - update error value when bailing out (a few cases) - updated formatting of port struct and grouping of bool values - simplified the spx5_rmw and spx5_inst_rmw inline functions - host mode (netdev): - removed lockless flag - added port timer init - host mode (packet - manual injection): - updated error counters in error situations - implemented timer handling of watermark threshold: stop and restart netif queues. - fixed error message handling (rate limited) - fixed comment style error - used DIV_ROUND_UP macro - removed a debug message for open ports v2: - Updated bindings: - drop minItems for the reg property - Statistics implementation: - Reorganized statistics into ethtool groups: eth-phy, eth-mac, eth-ctrl, rmon as defined by the IEEE 802.3 categories and RFC 2819. - The remaining statistics are provided by the classic ethtool statistics command. - Hostmode support: - Removed netdev renaming - Validate ethernet address in sparx5_set_mac_address() ==================== Signed-off-by: David S. Miller commit d0f482bb06f9447d44d2cae0386a0bd768c3cc16 Author: Steen Hegelund Date: Thu Jun 24 09:07:58 2021 +0200 arm64: dts: sparx5: Add the Sparx5 switch node This provides the configuration for the currently available evaluation boards PCB134 and PCB135. The series depends on the following series currently on its way into the kernel: - Sparx5 Reset Driver Link: https://lore.kernel.org/r/20210416084054.2922327-1-steen.hegelund@microchip.com/ Signed-off-by: Steen Hegelund Signed-off-by: Lars Povlsen Signed-off-by: Bjarni Jonasson Signed-off-by: David S. Miller commit af4b11022e2d39865e390dd50946c4e8703ec3c7 Author: Steen Hegelund Date: Thu Jun 24 09:07:57 2021 +0200 net: sparx5: add ethtool configuration and statistics support This adds statistic counters for the network interfaces provided by the driver. It also adds CPU port counters (which are not exposed by ethtool). This also adds support for configuring the network interface parameters via ethtool: speed, duplex, aneg etc. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit 0a9d48ad0d09ce869ea44e405e066959aa5d5371 Author: Steen Hegelund Date: Thu Jun 24 09:07:56 2021 +0200 net: sparx5: add calendar bandwidth allocation support This configures the Sparx5 calendars according to the bandwidth requested in the Device Tree nodes. It also checks if the total requested bandwidth is within the specs of the detected Sparx5 models limits. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit d6fce5141929697a27f029c633433d487f6f62cb Author: Steen Hegelund Date: Thu Jun 24 09:07:55 2021 +0200 net: sparx5: add switching support This adds SwitchDev support by hardware offloading the software bridge. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit 78eab33bb68b565176917b24a0b72a2f5b938d84 Author: Steen Hegelund Date: Thu Jun 24 09:07:54 2021 +0200 net: sparx5: add vlan support This adds Sparx5 VLAN support. Sparx5 has more VLAN features than provided here, but these will be added in later series. For now we only add the basic L2 features. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit b37a1bae742f92cc9b1f777d54e04ee3d86bbfc2 Author: Steen Hegelund Date: Thu Jun 24 09:07:53 2021 +0200 net: sparx5: add mactable support This adds the Sparx5 MAC tables: listening for MAC table updates and updating on request. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit 946e7fd5053a218d3907268cd85c9a519561d5d8 Author: Steen Hegelund Date: Thu Jun 24 09:07:52 2021 +0200 net: sparx5: add port module support This add configuration of the Sparx5 port module instances. Sparx5 has in total 65 logical ports (denoted D0 to D64) and 33 physical SerDes connections (S0 to S32). The 65th port (D64) is fixed allocated to SerDes0 (S0). The remaining 64 ports can in various multiplexing scenarios be connected to the remaining 32 SerDes using QSGMII, or USGMII or USXGMII extenders. 32 of the ports can have a 1:1 mapping to the 32 SerDes. Some additional ports (D65 to D69) are internal to the device and do not connect to port modules or SerDes macros. For example, internal ports are used for frame injection and extraction to the CPU queues. The 65 logical ports are split up into the following blocks. - 13 x 5G ports (D0-D11, D64) - 32 x 2G5 ports (D16-D47) - 12 x 10G ports (D12-D15, D48-D55) - 8 x 25G ports (D56-D63) Each logical port supports different line speeds, and depending on the speeds supported, different port modules (MAC+PCS) are needed. A port supporting 5 Gbps, 10 Gbps, or 25 Gbps as maximum line speed, will have a DEV5G, DEV10G, or DEV25G module to support the 5 Gbps, 10 Gbps (incl 5 Gbps), or 25 Gbps (including 10 Gbps and 5 Gbps) speeds. As well as, it will have a shadow DEV2G5 port module to support the lower speeds (10/100/1000/2500Mbps). When a port needs to operate at lower speed and the shadow DEV2G5 needs to be connected to its corresponding SerDes Not all interface modes are supported in this series, but will be added at a later stage. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit f3cad2611a77f0229dc16aa7bd2ef63e35ea9fb6 Author: Steen Hegelund Date: Thu Jun 24 09:07:51 2021 +0200 net: sparx5: add hostmode with phylink support This patch adds netdevs and phylink support for the ports in the switch. It also adds register based injection and extraction for these ports. Frame DMA support for injection and extraction will be added in a later series. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Signed-off-by: David S. Miller commit 3cfa11bac9bbede3066e15bcd5fb26c755c3da45 Author: Steen Hegelund Date: Thu Jun 24 09:07:50 2021 +0200 net: sparx5: add the basic sparx5 driver This adds the Sparx5 basic SwitchDev driver framework with IO range mapping, switch device detection and core clock configuration. Support for ports, phylink, netdev, mactable etc. are in the following patches. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Signed-off-by: Lars Povlsen Reviewed-by: Philipp Zabel Signed-off-by: David S. Miller commit f8c63088a98bac8926cb40ecf46ebd71dc1232c4 Author: Steen Hegelund Date: Thu Jun 24 09:07:49 2021 +0200 dt-bindings: net: sparx5: Add sparx5-switch bindings Document the Sparx5 switch device driver bindings Signed-off-by: Steen Hegelund Signed-off-by: Lars Povlsen Signed-off-by: Bjarni Jonasson Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit abe90454f0759d6e0b4b70b8b4ea9c5cd0ce8f93 Merge: ede285b105d3f b17233d385d0b Author: David S. Miller Date: Thu Jun 24 11:24:36 2021 -0700 Merge tag 'linux-can-fixes-for-5.13-20210624' of git://git.kernel.org/ pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-06-24 this is a pull request of 2 patches for net/master. The first patch is by Norbert Slusarek and prevent allocation of filter for optlen == 0 in the j1939 CAN protocol. The last patch is by Stephane Grosjean and fixes a potential starvation in the TX path of the peak_pciefd driver. ==================== Signed-off-by: David S. Miller commit ede285b105d3f3c87edc47ff4d76c6d8cb228382 Merge: c2f5c57d99deb 154b3b2a6ffca Author: David S. Miller Date: Thu Jun 24 11:22:24 2021 -0700 Merge branch 'ibmvnic-fixes' Sukadev Bhattiprolu says: ==================== ibmvnic: Assorted bug fixes Assorted bug fixes that we tested over the last several weeks. Thanks to Brian King, Cris Forno, Dany Madden and Rick Lindsley for reviews and help with testing. ==================== Signed-off-by: David S. Miller commit 154b3b2a6ffca445379063ef49f71895104d5a5e Author: Sukadev Bhattiprolu Date: Wed Jun 23 21:13:16 2021 -0700 ibmvnic: parenthesize a check Parenthesize a check to be more explicit and to fix a sparse warning seen on some distros. Fixes: 91dc5d2553fbf ("ibmvnic: fix miscellaneous checks") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit f6ebca8efa52e4ae770f0325d618e7bcf08ada0c Author: Sukadev Bhattiprolu Date: Wed Jun 23 21:13:15 2021 -0700 ibmvnic: free tx_pool if tso_pool alloc fails Free tx_pool and clear it, if allocation of tso_pool fails. release_tx_pools() assumes we have both tx and tso_pools if ->tx_pool is non-NULL. If allocation of tso_pool fails in init_tx_pools(), the assumption will not be true and we would end up dereferencing ->tx_buff, ->free_map fields from a NULL pointer. Fixes: 3205306c6b8d ("ibmvnic: Update TX pool initialization routine") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit 552a33729f1a7cc5115d0752064fe9abd6e3e336 Author: Sukadev Bhattiprolu Date: Wed Jun 23 21:13:14 2021 -0700 ibmvnic: set ltb->buff to NULL after freeing free_long_term_buff() checks ltb->buff to decide whether we have a long term buffer to free. So set ltb->buff to NULL afer freeing. While here, also clear ->map_id, fix up some coding style and log an error. Fixes: 9c4eaabd1bb39 ("Check CRQ command return codes") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit 72368f8b2b9e4106072a2728bed3367d54641c22 Author: Sukadev Bhattiprolu Date: Wed Jun 23 21:13:13 2021 -0700 ibmvnic: account for bufs already saved in indir_buf This fixes a crash in replenish_rx_pool() when called from ibmvnic_poll() after a previous call to replenish_rx_pool() encountered an error when allocating a socket buffer. Thanks to Rick Lindsley and Dany Madden for helping debug the crash. Fixes: 4f0b6812e9b9 ("ibmvnic: Introduce batched RX buffer descriptor transmission") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit 65d6470d139a6c1655fccb5cbacbeaba8e8ad2f8 Author: Sukadev Bhattiprolu Date: Wed Jun 23 21:13:12 2021 -0700 ibmvnic: clean pending indirect buffs during reset We batch subordinate command response queue (scrq) descriptors that we need to send to the VIOS using an "indirect" buffer. If after we queue one or more scrqs in the indirect buffer encounter an error (say fail to allocate an skb), we leave the queued scrq descriptors in the indirect buffer until the next call to ibmvnic_xmit(). On the next call to ibmvnic_xmit(), it is possible that the adapter is going through a reset and it is possible that the long term buffers have been unmapped on the VIOS side. If we proceed to flush (send) the packets that are in the indirect buffer, we will end up using the old map ids and this can cause the VIOS to trigger an unnecessary FATAL error reset. Instead of flushing packets remaining on the indirect_buff, discard (clean) them instead. Fixes: 0d973388185d4 ("ibmvnic: Introduce xmit_more support using batched subCRQ hcalls") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit 2ca220f92878470c6ba03f9946e412323093cc94 Author: Dany Madden Date: Wed Jun 23 21:13:11 2021 -0700 Revert "ibmvnic: remove duplicate napi_schedule call in open function" This reverts commit 7c451f3ef676c805a4b77a743a01a5c21a250a73. When a vnic interface is taken down and then up, connectivity is not restored. We bisected it to this commit. Reverting this commit until we can fully investigate the issue/benefit of the change. Fixes: 7c451f3ef676 ("ibmvnic: remove duplicate napi_schedule call in open function") Reported-by: Cristobal Forno Reported-by: Abdul Haleem Signed-off-by: Dany Madden Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit 0ec13aff058a82426c8d44b688c804cc4a5a0a3d Author: Sukadev Bhattiprolu Date: Wed Jun 23 21:13:10 2021 -0700 Revert "ibmvnic: simplify reset_long_term_buff function" This reverts commit 1c7d45e7b2c29080bf6c8cd0e213cc3cbb62a054. We tried to optimize the number of hcalls we send and skipped sending the REQUEST_MAP calls for some maps. However during resets, we need to resend all the maps to the VIOS since the VIOS does not remember the old values. In fact we may have failed over to a new VIOS which will not have any of the mappings. When we send packets with map ids the VIOS does not know about, it triggers a FATAL reset. While the client does recover from the FATAL error reset, we are seeing a large number of such resets. Handling FATAL resets is lot more unnecessary work than issuing a few more hcalls so revert the commit and resend the maps to the VIOS. Fixes: 1c7d45e7b2c ("ibmvnic: simplify reset_long_term_buff function") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David S. Miller commit c88c192dc3ea209694cc08f4ccf51f920d26bdae Author: Marcin Wojtas Date: Thu Jun 24 02:51:51 2021 +0200 net: mdiobus: fix fwnode_mdbiobus_register() fallback case The fallback case of fwnode_mdbiobus_register() (relevant for !CONFIG_FWNODE_MDIO) was defined with wrong argument name, causing a compilation error. Fix that. Signed-off-by: Marcin Wojtas Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6d123b81ac615072a8525c13c6c41b695270a15d Author: Jakub Kicinski Date: Wed Jun 23 14:44:38 2021 -0700 net: ip: avoid OOM kills with large UDP sends over loopback Dave observed number of machines hitting OOM on the UDP send path. The workload seems to be sending large UDP packets over loopback. Since loopback has MTU of 64k kernel will try to allocate an skb with up to 64k of head space. This has a good chance of failing under memory pressure. What's worse if the message length is <32k the allocation may trigger an OOM killer. This is entirely avoidable, we can use an skb with page frags. af_unix solves a similar problem by limiting the head length to SKB_MAX_ALLOC. This seems like a good and simple approach. It means that UDP messages > 16kB will now use fragments if underlying device supports SG, if extra allocator pressure causes regressions in real workloads we can switch to trying the large allocation first and falling back. v4: pre-calculate all the additions to alloclen so we can be sure it won't go over order-2 Reported-by: Dave Jones Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7ae61c5f16671ecaf23526feb6892c8249d0c2d7 Author: Yixing Liu Date: Tue Jun 22 20:16:03 2021 +0800 RDMA/hns: Add window selection field of congestion control The window selection field is necessary for congestion control of HIP09, it is got from firmware and then filled into QPC. Some algorithms need it to decide whether to limit the number of windows. Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW") Link: https://lore.kernel.org/r/1624364163-44185-1-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ae24bab257bb2043b53c80e65cdd8b507ace06c4 Author: Lorenz Bauer Date: Wed Jun 23 15:56:46 2021 +0200 tools/testing: add a selftest for SO_NETNS_COOKIE Make sure that SO_NETNS_COOKIE returns a non-zero value, and that sockets from different namespaces have a distinct cookie value. Signed-off-by: Lorenz Bauer Signed-off-by: David S. Miller commit e8b9eab99232c4e62ada9d7976c80fd5e8118289 Author: Martynas Pumputis Date: Wed Jun 23 15:56:45 2021 +0200 net: retrieve netns cookie via getsocketopt It's getting more common to run nested container environments for testing cloud software. One of such examples is Kind [1] which runs a Kubernetes cluster in Docker containers on a single host. Each container acts as a Kubernetes node, and thus can run any Pod (aka container) inside the former. This approach simplifies testing a lot, as it eliminates complicated VM setups. Unfortunately, such a setup breaks some functionality when cgroupv2 BPF programs are used for load-balancing. The load-balancer BPF program needs to detect whether a request originates from the host netns or a container netns in order to allow some access, e.g. to a service via a loopback IP address. Typically, the programs detect this by comparing netns cookies with the one of the init ns via a call to bpf_get_netns_cookie(NULL). However, in nested environments the latter cannot be used given the Kubernetes node's netns is outside the init ns. To fix this, we need to pass the Kubernetes node netns cookie to the program in a different way: by extending getsockopt() with a SO_NETNS_COOKIE option, the orchestrator which runs in the Kubernetes node netns can retrieve the cookie and pass it to the program instead. Thus, this is following up on Eric's commit 3d368ab87cf6 ("net: initialize net->net_cookie at netns setup") to allow retrieval via SO_NETNS_COOKIE. This is also in line in how we retrieve socket cookie via SO_COOKIE. [1] https://kind.sigs.k8s.io/ Signed-off-by: Lorenz Bauer Signed-off-by: Martynas Pumputis Cc: Eric Dumazet Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 36f5625af34c89d6c5426c43d321520d668c584c Author: Ira Weiny Date: Mon Jun 21 23:14:19 2021 -0700 RDMA/hfi1: Remove use of kmap() kmap() is being deprecated and will break uses of device dax after PKS protection is introduced.[1] The kmap() used in sdma does not need to be global. Use the new kmap_local_page() which works with PKS and may provide better performance for this thread local mapping anyway. [1] https://lore.kernel.org/lkml/20201009195033.3208459-59-ira.weiny@intel.com/ Link: https://lore.kernel.org/r/20210622061422.2633501-2-ira.weiny@intel.com Signed-off-by: Ira Weiny Signed-off-by: Jason Gunthorpe commit 7364e74d48ec094f46f6a5abfd91dcebece94c0c Author: Ira Weiny Date: Tue Jun 22 09:56:22 2021 -0700 RDMA/irdma: Remove use of kmap() kmap() is being deprecated and will break uses of device dax after PKS protection is introduced.[1] The kmap() used in the irdma CM driver is thread local. Therefore kmap_local_page() is sufficient to use and may provide performance benefits as well. kmap_local_page() will work with device dax and pgmap protected pages. Use kmap_local_page() instead of kmap(). [1] https://lore.kernel.org/lkml/20201009195033.3208459-59-ira.weiny@intel.com/ Link: https://lore.kernel.org/r/20210622165622.2638628-1-ira.weiny@intel.com Signed-off-by: Ira Weiny Signed-off-by: Jason Gunthorpe commit 956e759d5f8e0859e86b951a8779c60af633aafd Author: Jan Sokolowski Date: Fri Jun 11 12:01:41 2021 +0200 i40e: Fix missing rtnl locking when setting up pf switch A recent change that made i40e use new udp_tunnel infrastructure uses a method that expects to be called under rtnl lock. However, not all codepaths do the lock prior to calling i40e_setup_pf_switch. Fix that by adding additional rtnl locking and unlocking. Fixes: 40a98cb6f01f ("i40e: convert to new udp_tunnel infrastructure") Signed-off-by: Jan Sokolowski Signed-off-by: Mateusz Palczewski Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 26b0ce8dd3dd704393dbace4dc416adfeffe531f Author: Jesse Brandeburg Date: Fri May 7 11:56:25 2021 -0700 i40e: fix PTP on 5Gb links As reported by Alex Sergeev, the i40e driver is incrementing the PTP clock at 40Gb speeds when linked at 5Gb. Fix this bug by making sure that the right multiplier is selected when linked at 5Gb. Fixes: 3dbdd6c2f70a ("i40e: Add support for 5Gbps cards") Cc: stable@vger.kernel.org Reported-by: Alex Sergeev Suggested-by: Alex Sergeev Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 0384264ea8a39bd98c9a3158060565f650c056a6 Author: Christoph Hellwig Date: Thu Jun 24 14:32:40 2021 +0200 block: pass a gendisk to bdev_disk_changed bdev_disk_changed can only operate on whole devices. Make that clear by passing a gendisk instead of the struct block_device. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210624123240.441814-3-hch@lst.de Signed-off-by: Jens Axboe commit 630161cfdf5cdc696a82b59410d1ff00b23d946e Author: Christoph Hellwig Date: Thu Jun 24 14:32:39 2021 +0200 block: move bdev_disk_changed Move bdev_disk_changed to block/partitions/core.c, together with the rest of the partition scanning code. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210624123240.441814-2-hch@lst.de Signed-off-by: Jens Axboe commit 2bc8cda5ea4b42ff78be1b11011092d57b424d37 Author: Christoph Hellwig Date: Thu Jun 24 09:38:43 2021 +0200 block: add the events* attributes to disk_attrs Add the events attributes to the disk_attrs array, which ensures they are added by the driver core when the device is created rather than adding them after the device has been added, which is racy versus uevents and requires more boilerplate code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210624073843.251178-3-hch@lst.de Signed-off-by: Jens Axboe commit d5870edfa3afc4608231267ea3b8e4beb3eab1ee Author: Christoph Hellwig Date: Thu Jun 24 09:38:42 2021 +0200 block: move the disk events code to a separate file Move the code for handling disk events from genhd.c into a new file as it isn't very related to the rest of the file while at the same time requiring lots of forward declarations. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210624073843.251178-2-hch@lst.de Signed-off-by: Jens Axboe commit 0cc84b9a6003fa7f6ef5d19e7c8532a01cd41776 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:09 2021 +0200 ti: Remove rcu_read_lock() around XDP program invocation The cpsw driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Tested-by: Grygorii Strashko Reviewed-by: Grygorii Strashko Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/bpf/20210624160609.292325-20-toke@redhat.com commit 2f1e432d339c5fed435adf521cae392755721050 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:08 2021 +0200 stmmac: Remove rcu_read_lock() around XDP program invocation The stmmac driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Link: https://lore.kernel.org/bpf/20210624160609.292325-19-toke@redhat.com commit 7b6ee873ff20c22af355661b241defa7f6ed7582 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:07 2021 +0200 netsec: Remove rcu_read_lock() around XDP program invocation The netsec driver has a rcu_read_lock()/rcu_read_unlock() pair around the full RX loop, covering everything up to and including xdp_do_flush(). This is actually the correct behaviour, but because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), it is also technically redundant. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep the rcu_read_lock() around anymore, so let's just remove it. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Ilias Apalodimas Cc: Jassi Brar Link: https://lore.kernel.org/bpf/20210624160609.292325-18-toke@redhat.com commit 4eb14e3fc6197b7205069ed4e2b31eafa11a0697 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:06 2021 +0200 sfc: Remove rcu_read_lock() around XDP program invocation The sfc driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Edward Cree Cc: Martin Habets Link: https://lore.kernel.org/bpf/20210624160609.292325-17-toke@redhat.com commit 4415db6ca85ae57830a83290388f2b9dfa5f237f Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:05 2021 +0200 qede: Remove rcu_read_lock() around XDP program invocation The qede driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: Ariel Elior Cc: gr-everest-linux-l2@marvell.com Link: https://lore.kernel.org/bpf/20210624160609.292325-16-toke@redhat.com commit d5789621b658369b21bd13446bab8102cf75df65 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:04 2021 +0200 nfp: Remove rcu_read_lock() around XDP program invocation The nfp driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. While this is not actually an issue for the nfp driver because it doesn't support XDP_REDIRECT (and thus doesn't call xdp_do_flush()), the rcu_read_lock() is still unneeded. And With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: Simon Horman Cc: oss-drivers@netronome.com Link: https://lore.kernel.org/bpf/20210624160609.292325-15-toke@redhat.com commit c4411b371c104e65efb531ebd4d8892c568e3a29 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:03 2021 +0200 mlx4: Remove rcu_read_lock() around XDP program invocation The mlx4 driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Also switch the RCU dereferences in the driver loop itself to the _bh variants. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: Tariq Toukan Link: https://lore.kernel.org/bpf/20210624160609.292325-14-toke@redhat.com commit 959ad7ec066d9a61557ad6aedf77ea9b54c82df0 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:02 2021 +0200 marvell: Remove rcu_read_lock() around XDP program invocation The mvneta and mvpp2 drivers have rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: Thomas Petazzoni Cc: Russell King Cc: Marcin Wojtas Link: https://lore.kernel.org/bpf/20210624160609.292325-13-toke@redhat.com commit 49589b23d5a92dff4a7cb705608dff7dd13ef709 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:01 2021 +0200 intel: Remove rcu_read_lock() around XDP program invocation The Intel drivers all have rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Tested-by: Jesper Dangaard Brouer # i40e Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Link: https://lore.kernel.org/bpf/20210624160609.292325-12-toke@redhat.com commit 547aabcac3251c40e4cd09d79dba70f7eab8cca2 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:06:00 2021 +0200 freescale: Remove rcu_read_lock() around XDP program invocation The dpaa and dpaa2 drivers have rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: Camelia Groza Cc: Ioana Radulescu Cc: Madalin Bucur Cc: Ioana Ciornei Link: https://lore.kernel.org/bpf/20210624160609.292325-11-toke@redhat.com commit 36baafe347a85a9d85f61aac0a9b53c53635829e Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:59 2021 +0200 thunderx: Remove rcu_read_lock() around XDP program invocation The thunderx driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: Sunil Goutham Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/bpf/20210624160609.292325-10-toke@redhat.com commit 158c1399fc45c5178a3f2b8b68ff2faa2e36a52d Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:58 2021 +0200 bnxt: Remove rcu_read_lock() around XDP program invocation The bnxt driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: Michael Chan Link: https://lore.kernel.org/bpf/20210624160609.292325-9-toke@redhat.com commit 0939e0537896e421e391fa4b1a0b052907808e0d Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:57 2021 +0200 ena: Remove rcu_read_lock() around XDP program invocation The ena driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP program invocations. However, the actual lifetime of the objects referred by the XDP program invocation is longer, all the way through to the call to xdp_do_flush(), making the scope of the rcu_read_lock() too small. This turns out to be harmless because it all happens in a single NAPI poll cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock() misleading. Rather than extend the scope of the rcu_read_lock(), just get rid of it entirely. With the addition of RCU annotations to the XDP_REDIRECT map types that take bh execution into account, lockdep even understands this to be safe, so there's really no reason to keep it around. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: Saeed Bishara Cc: Guy Tzalik Link: https://lore.kernel.org/bpf/20210624160609.292325-8-toke@redhat.com commit 77151ccf10659d4066074f278402032f3265f0cc Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:56 2021 +0200 bpf, sched: Remove unneeded rcu_read_lock() around BPF program invocation The rcu_read_lock() call in cls_bpf and act_bpf are redundant: on the TX side, there's already a call to rcu_read_lock_bh() in __dev_queue_xmit(), and on RX there's a covering rcu_read_lock() in netif_receive_skb{,_list}_internal(). With the previous patches we also amended the lockdep checks in the map code to not require any particular RCU flavour, so we can just get rid of the rcu_read_lock()s. Suggested-by: Daniel Borkmann Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210624160609.292325-7-toke@redhat.com commit 782347b6bcad07ddb574422e01e22c92e05928c8 Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:55 2021 +0200 xdp: Add proper __rcu annotations to redirect map entries XDP_REDIRECT works by a three-step process: the bpf_redirect() and bpf_redirect_map() helpers will lookup the target of the redirect and store it (along with some other metadata) in a per-CPU struct bpf_redirect_info. Next, when the program returns the XDP_REDIRECT return code, the driver will call xdp_do_redirect() which will use the information thus stored to actually enqueue the frame into a bulk queue structure (that differs slightly by map type, but shares the same principle). Finally, before exiting its NAPI poll loop, the driver will call xdp_do_flush(), which will flush all the different bulk queues, thus completing the redirect. Pointers to the map entries will be kept around for this whole sequence of steps, protected by RCU. However, there is no top-level rcu_read_lock() in the core code; instead drivers add their own rcu_read_lock() around the XDP portions of the code, but somewhat inconsistently as Martin discovered[0]. However, things still work because everything happens inside a single NAPI poll sequence, which means it's between a pair of calls to local_bh_disable()/local_bh_enable(). So Paul suggested[1] that we could document this intention by using rcu_dereference_check() with rcu_read_lock_bh_held() as a second parameter, thus allowing sparse and lockdep to verify that everything is done correctly. This patch does just that: we add an __rcu annotation to the map entry pointers and remove the various comments explaining the NAPI poll assurance strewn through devmap.c in favour of a longer explanation in filter.c. The goal is to have one coherent documentation of the entire flow, and rely on the RCU annotations as a "standard" way of communicating the flow in the map code (which can additionally be understood by sparse and lockdep). The RCU annotation replacements result in a fairly straight-forward replacement where READ_ONCE() becomes rcu_dereference_check(), WRITE_ONCE() becomes rcu_assign_pointer() and xchg() and cmpxchg() gets wrapped in the proper constructs to cast the pointer back and forth between __rcu and __kernel address space (for the benefit of sparse). The one complication is that xskmap has a few constructions where double-pointers are passed back and forth; these simply all gain __rcu annotations, and only the final reference/dereference to the inner-most pointer gets changed. With this, everything can be run through sparse without eliciting complaints, and lockdep can verify correctness even without the use of rcu_read_lock() in the drivers. Subsequent patches will clean these up from the drivers. [0] https://lore.kernel.org/bpf/20210415173551.7ma4slcbqeyiba2r@kafai-mbp.dhcp.thefacebook.com/ [1] https://lore.kernel.org/bpf/20210419165837.GA975577@paulmck-ThinkPad-P17-Gen-1/ Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210624160609.292325-6-toke@redhat.com commit 694cea395fded425008e93cd90cfdf7a451674af Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:54 2021 +0200 bpf: Allow RCU-protected lookups to happen from bh context XDP programs are called from a NAPI poll context, which means the RCU reference liveness is ensured by local_bh_disable(). Add rcu_read_lock_bh_held() as a condition to the RCU checks for map lookups so lockdep understands that the dereferences are safe from inside *either* an rcu_read_lock() section *or* a local_bh_disable() section. While both bh_disabled and rcu_read_lock() provide RCU protection, they are semantically distinct, so we need both conditions to prevent lockdep complaints. This change is done in preparation for removing the redundant rcu_read_lock()s from drivers. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210624160609.292325-5-toke@redhat.com commit e74c74f9e51deb725e72d129084ba8252d47222d Author: Toke Høiland-Jørgensen Date: Thu Jun 24 18:05:53 2021 +0200 doc: Give XDP as example of non-obvious RCU reader/updater pairing This commit gives an example of non-obvious RCU reader/updater pairing in the guise of the XDP feature in networking, which calls BPF programs from network-driver NAPI (softirq) context. Signed-off-by: Paul E. McKenney Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210624160609.292325-4-toke@redhat.com commit 9a145c04a293933002ec288a4d6b4f370b59e4d1 Author: Paul E. McKenney Date: Thu Jun 24 18:05:52 2021 +0200 doc: Clarify and expand RCU updaters and corresponding readers This commit clarifies which primitives readers can use given that the corresponding updaters have made a specific choice. This commit also adds this information for the various RCU Tasks flavors. While in the area, it removes a paragraph that no longer applies in any straightforward manner. Signed-off-by: Paul E. McKenney Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210624160609.292325-3-toke@redhat.com commit b9964ce74544ea6cbc4eabd2c89a531adf7f291d Author: Paul E. McKenney Date: Thu Jun 24 18:05:51 2021 +0200 rcu: Create an unrcu_pointer() to remove __rcu from a pointer The xchg() and cmpxchg() functions are sometimes used to carry out RCU updates. Unfortunately, this can result in sparse warnings for both the old-value and new-value arguments, as well as for the return value. The arguments can be dealt with using RCU_INITIALIZER(): old_p = xchg(&p, RCU_INITIALIZER(new_p)); But a sparse warning still remains due to assigning the __rcu pointer returned from xchg to the (most likely) non-__rcu pointer old_p. This commit therefore provides an unrcu_pointer() macro that strips the __rcu. This macro can be used as follows: old_p = unrcu_pointer(xchg(&p, RCU_INITIALIZER(new_p))); Reported-by: Toke Høiland-Jørgensen Signed-off-by: Paul E. McKenney Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210624160609.292325-2-toke@redhat.com commit 9262793e59f0423437166a879a73d056b1fe6f9a Author: Mateusz Palczewski Date: Wed Mar 10 11:12:54 2021 +0000 i40e: Fix autoneg disabling for non-10GBaseT links Disabling autonegotiation was allowed only for 10GBaseT PHY. The condition was changed to check if link media type is BaseT. Fixes: 3ce12ee9d8f9 ("i40e: Fix order of checks when enabling/disabling autoneg in ethtool") Reviewed-by: Aleksandr Loktionov Reviewed-by: Karen Sornek Signed-off-by: Dawid Lukwinski Signed-off-by: Mateusz Palczewski Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 9c04cfcd4aad232e36306cdc5c74cd9fc9148a7e Author: Dinghao Liu Date: Sun Feb 28 19:50:58 2021 +0800 i40e: Fix error handling in i40e_vsi_open When vsi->type == I40E_VSI_FDIR, we have caught the return value of i40e_vsi_request_irq() but without further handling. Check and execute memory clean on failure just like the other i40e_vsi_request_irq(). Fixes: 8a9eb7d3cbcab ("i40e: rework fdir setup and teardown") Signed-off-by: Dinghao Liu Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c2a3823dad4988943c0b0f61af9336301e30d4e5 Author: Kalle Valo Date: Thu Jun 24 08:29:18 2021 +0300 iwlwifi: acpi: remove unused function iwl_acpi_eval_dsm_func() Stephen reported a warning: drivers/net/wireless/intel/iwlwifi/fw/acpi.c:720:12: warning: 'iwl_acpi_eval_dsm_func' defined but not used [-Wunused-function] The warning is correct and the function is not used anywhere, so let's just remove it. Reported-by: Stephen Rothwell Fixes: 7119f02b5d34 ("iwlwifi: mvm: support BIOS enable/disable for 11ax in Russia") Signed-off-by: Kalle Valo Acked-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210624052918.4946-1-kvalo@codeaurora.org commit 1d8820d5462dcdd34f3eb7ef4893536c439e476d Author: Po-Hao Huang Date: Thu Jun 24 10:34:59 2021 +0800 rtw88: fix c2h memory leak Fix erroneous code that leads to unreferenced objects. During H2C operations, some functions returned without freeing the memory that only the function have access to. Release these objects when they're no longer needed to avoid potentially memory leaks. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210624023459.10294-1-pkshih@realtek.com commit 1a3ac5c651a0c859bdea64ed964fc93c2ba980d3 Author: Shawn Guo Date: Sat Apr 17 15:54:28 2021 +0800 brcmfmac: support parse country code map from DT With any regulatory domain requests coming from either user space or 802.11 IE (Information Element), the country is coded in ISO3166 standard. It needs to be translated to firmware country code and revision with the mapping info in settings->country_codes table. Support populate country_codes table by parsing the mapping from DT. The BRCMF_BUSTYPE_SDIO bus_type check gets separated from general DT validation, so that country code can be handled as general part rather than SDIO bus specific one. Signed-off-by: Shawn Guo Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210417075428.2671-1-shawn.guo@linaro.org commit 60b6a7e6a0f4382cd689f9afdac816964fec2921 Author: Edward Hsieh Date: Thu Jun 24 20:30:30 2021 +0800 block: fix trace completion for chained bio For chained bio, trace_block_bio_complete in bio_endio is currently called only by the parent bio once upon all chained bio completed. However, the sector and size for the parent bio are modified in bio_split. Therefore, the size and sector of the complete events might not match the queue events in blktrace. The original fix of bio completion trace ("block: trace completion of all bios.") wants multiple complete events to correspond to one queue event but missed this. The issue can be reproduced by md/raid5 read with bio cross chunks. To fix, move trace completion into the loop for every chained bio to call. Fixes: fbbaf700e7b1 ("block: trace completion of all bios.") Reviewed-by: Wade Liang Reviewed-by: BingJing Chang Signed-off-by: Edward Hsieh Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210624123030.27014-1-edwardh@synology.com Signed-off-by: Jens Axboe commit cb082bfab59a224a49ae803fed52cd03e8d6b5e0 Author: Jing Zhang Date: Fri Jun 18 22:27:04 2021 +0000 KVM: stats: Add fd-based API to read binary stats data This commit defines the API for userspace and prepare the common functionalities to support per VM/VCPU binary stats data readings. The KVM stats now is only accessible by debugfs, which has some shortcomings this change series are supposed to fix: 1. The current debugfs stats solution in KVM could be disabled when kernel Lockdown mode is enabled, which is a potential rick for production. 2. The current debugfs stats solution in KVM is organized as "one stats per file", it is good for debugging, but not efficient for production. 3. The stats read/clear in current debugfs solution in KVM are protected by the global kvm_lock. Besides that, there are some other benefits with this change: 1. All KVM VM/VCPU stats can be read out in a bulk by one copy to userspace. 2. A schema is used to describe KVM statistics. From userspace's perspective, the KVM statistics are self-describing. 3. With the fd-based solution, a separate telemetry would be able to read KVM stats in a less privileged environment. 4. After the initial setup by reading in stats descriptors, a telemetry only needs to read the stats data itself, no more parsing or setup is needed. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba #arm64 Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-3-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit 0193cc908b5ae8aff2e2d2997ca5d4ae26ed24d4 Author: Jing Zhang Date: Fri Jun 18 22:27:03 2021 +0000 KVM: stats: Separate generic stats from architecture specific ones Generic KVM stats are those collected in architecture independent code or those supported by all architectures; put all generic statistics in a separate structure. This ensures that they are defined the same way in the statistics API which is being added, removing duplication among different architectures in the declaration of the descriptors. No functional change intended. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Signed-off-by: Jing Zhang Message-Id: <20210618222709.1858088-2-jingzhangos@google.com> Signed-off-by: Paolo Bonzini commit 6c6e166b2c8513721d166c74060d26d3f4aecb48 Author: Sean Christopherson Date: Tue Jun 22 00:24:54 2021 -0700 KVM: x86/mmu: Don't WARN on a NULL shadow page in TDP MMU check Treat a NULL shadow page in the "is a TDP MMU" check as valid, non-TDP root. KVM uses a "direct" PAE paging MMU when TDP is disabled and the guest is running with paging disabled. In that case, root_hpa points at the pae_root page (of which only 32 bytes are used), not a standard shadow page, and the WARN fires (a lot). Fixes: 0b873fd7fb53 ("KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check") Cc: David Matlack Signed-off-by: Sean Christopherson Message-Id: <20210622072454.3449146-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ef6a74b2e55e97daf4c7ba2d287878dc3f693b41 Author: Sean Christopherson Date: Tue Jun 22 13:05:29 2021 -0700 KVM: sefltests: Add x86-64 test to verify MMU reacts to CPUID updates Add an x86-only test to verify that x86's MMU reacts to CPUID updates that impact the MMU. KVM has had multiple bugs where it fails to reconfigure the MMU after the guest's vCPU model changes. Sadly, this test is effectively limited to shadow paging because the hardware page walk handler doesn't support software disabling of GBPAGES support, and KVM doesn't manually walk the GVA->GPA on faults for performance reasons (doing so would large defeat the benefits of TDP). Don't require !TDP for the tests as there is still value in running the tests with TDP, even though the tests will fail (barring KVM hacks). E.g. KVM should not completely explode if MAXPHYADDR results in KVM using 4-level vs. 5-level paging for the guest. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-20-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ad5f16e422258d51414e7d8aaf856000eec9dfce Author: Sean Christopherson Date: Tue Jun 22 13:05:28 2021 -0700 KVM: selftests: Add hugepage support for x86-64 Add x86-64 hugepage support in the form of a x86-only variant of virt_pg_map() that takes an explicit page size. To keep things simple, follow the existing logic for 4k pages and disallow creating a hugepage if the upper-level entry is present, even if the desired pfn matches. Opportunistically fix a double "beyond beyond" reported by checkpatch. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-19-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b007e904b36a945d01a9080d754702ca5f9c68b4 Author: Sean Christopherson Date: Tue Jun 22 13:05:27 2021 -0700 KVM: selftests: Genericize upper level page table entry struct In preparation for adding hugepage support, replace "pageMapL4Entry", "pageDirectoryPointerEntry", and "pageDirectoryEntry" with a common "pageUpperEntry", and add a helper to create an upper level entry. All upper level entries have the same layout, using unique structs provides minimal value and requires a non-trivial amount of code duplication. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-18-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f681d6861b0c7b28af1a339171602a6e82b1cbda Author: Sean Christopherson Date: Tue Jun 22 13:05:26 2021 -0700 KVM: selftests: Add PTE helper for x86-64 in preparation for hugepages Add a helper to retrieve a PTE pointer given a PFN, address, and level in preparation for adding hugepage support. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-17-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6d96ca6a602b24013c8be1160d40c667e133ddb9 Author: Sean Christopherson Date: Tue Jun 22 13:05:25 2021 -0700 KVM: selftests: Rename x86's page table "address" to "pfn" Rename the "address" field to "pfn" in x86's page table structs to match reality. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cce0c23dd944068d7f07a03938d5b3cbcdaf4148 Author: Sean Christopherson Date: Tue Jun 22 13:05:24 2021 -0700 KVM: selftests: Add wrapper to allocate page table page Add a helper to allocate a page for use in constructing the guest's page tables. All architectures have identical address and memslot requirements (which appear to be arbitrary anyways). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 444d084b467ce0e99a8d709100ee7ebb0c493515 Author: Sean Christopherson Date: Tue Jun 22 13:05:23 2021 -0700 KVM: selftests: Unconditionally allocate EPT tables in memslot 0 Drop the EPTP memslot param from all EPT helpers and shove the hardcoded '0' down to the vm_phy_page_alloc() calls. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4307af730b8543714a76be9d77422a5762671435 Author: Sean Christopherson Date: Tue Jun 22 13:05:22 2021 -0700 KVM: selftests: Unconditionally use memslot '0' for page table allocations Drop the memslot param from virt_pg_map() and virt_map() and shove the hardcoded '0' down to the vm_phy_page_alloc() calls. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a75a895e6457784fdf2a0a20a024ae29ff8a7f28 Author: Sean Christopherson Date: Tue Jun 22 22:05:21 2021 +0200 KVM: selftests: Unconditionally use memslot 0 for vaddr allocations Drop the memslot param(s) from vm_vaddr_alloc() now that all callers directly specific '0' as the memslot. Drop the memslot param from virt_pgd_alloc() as well since vm_vaddr_alloc() is its only user. I.e. shove the hardcoded '0' down to the vm_phy_pages_alloc() calls. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5ed9b357024dc43f75099f597187df05bcd5173c Merge: 2b9ac22b12a26 3c3ee16532c1b Author: Jens Axboe Date: Thu Jun 24 09:39:02 2021 -0600 Merge tag 'nvme-5.14-2021-06-22' of git://git.infradead.org/nvme into for-5.14/drivers Pull NVMe updates from Christoph "nvme updates for Linux 5.14: - move the ACPI StorageD3 code to drivers/acpi/ and add quirks for certain AMD CPUs (Mario Limonciello) - zoned device support for nvmet (Chaitanya Kulkarni) - fix the rules for changing the serial number in nvmet (Noam Gottlieb) - various small fixes and cleanups (Dan Carpenter, JK Kim, Chaitanya Kulkarni, Hannes Reinecke, Wesley Sheng, Geert Uytterhoeven, Daniel Wagner)" * tag 'nvme-5.14-2021-06-22' of git://git.infradead.org/nvme: (38 commits) nvmet: use NVMET_MAX_NAMESPACES to set nn value nvme.h: add missing nvme_lba_range_type endianness annotations nvme: remove zeroout memset call for struct nvme-pci: remove zeroout memset call for struct nvmet: remove zeroout memset call for struct nvmet: add ZBD over ZNS backend support nvmet: add Command Set Identifier support nvmet: add nvmet_req_bio put helper for backends nvmet: add req cns error complete helper block: export blk_next_bio() nvmet: remove local variable nvmet: use nvme status value directly nvmet: use u32 type for the local variable nsid nvmet: use u32 for nvmet_subsys max_nsid nvmet: use req->cmd directly in file-ns fast path nvmet: use req->cmd directly in bdev-ns fast path nvmet: make ver stable once connection established nvmet: allow mn change if subsys not discovered nvmet: make sn stable once connection was established nvmet: change sn size and check validity ... commit 93c2cdc975aab53c222472c5b96c2d41dbeb350c Author: Thomas Gleixner Date: Thu Jun 24 17:09:18 2021 +0200 x86/fpu/xstate: Clear xstate header in copy_xstate_to_uabi_buf() again The change which made copy_xstate_to_uabi_buf() usable for [x]fpregs_get() removed the zeroing of the header which means the header, which is copied to user space later, contains except for the xfeatures member, random stack content. Add the memset() back to zero it before usage. Fixes: eb6f51723f03 ("x86/fpu: Make copy_xstate_to_kernel() usable for [x]fpregs_get()") Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/875yy3wb8h.ffs@nanos.tec.linutronix.de commit acc6100d3ffa24bdd2add8ea85fb66811bcce5d4 Author: Zhang Yi Date: Thu Jun 10 19:24:40 2021 +0800 fs: remove bdev_try_to_free_page callback After remove the unique user of sop->bdev_try_to_free_page() callback, we could remove the callback and the corresponding blkdev_releasepage() at all. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-9-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 3b672e3aedffc9f092e7e7eae0050a97a8ca508e Author: Zhang Yi Date: Thu Jun 10 19:24:39 2021 +0800 ext4: remove bdev_try_to_free_page() callback After we introduce a jbd2 shrinker to release checkpointed buffer's journal head, we could free buffer without bdev_try_to_free_page() under memory pressure. So this patch remove the whole bdev_try_to_free_page() callback directly. It also remove many use-after-free issues relate to it together. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-8-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit dbf2bab7935b65689f3b39178cf87374f0334ead Author: Zhang Yi Date: Thu Jun 10 19:24:38 2021 +0800 jbd2: simplify journal_clean_one_cp_list() Now that __try_to_free_cp_buf() remove checkpointed buffer or transaction when the buffer is not 'busy', which is only called by journal_clean_one_cp_list(). This patch simplify this function by remove __try_to_free_cp_buf() and invoke __cp_buffer_busy() directly. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-7-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 4ba3fcdde7e36af93610ceb3cc38365b14539865 Author: Zhang Yi Date: Thu Jun 10 19:24:37 2021 +0800 jbd2,ext4: add a shrinker to release checkpointed buffers Current metadata buffer release logic in bdev_try_to_free_page() have a lot of use-after-free issues when umount filesystem concurrently, and it is difficult to fix directly because ext4 is the only user of s_op->bdev_try_to_free_page callback and we may have to add more special refcount or lock that is only used by ext4 into the common vfs layer, which is unacceptable. One better solution is remove the bdev_try_to_free_page callback, but the real problem is we cannot easily release journal_head on the checkpointed buffer, so try_to_free_buffers() cannot release buffers and page under memory pressure, which is more likely to trigger out-of-memory. So we cannot remove the callback directly before we find another way to release journal_head. This patch introduce a shrinker to free journal_head on the checkpointed transaction. After the journal_head got freed, try_to_free_buffers() could free buffer properly. Signed-off-by: Zhang Yi Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-6-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 214eb5a4d8a2032fb9f0711d1b202eb88ee02920 Author: Zhang Yi Date: Thu Jun 10 19:24:36 2021 +0800 jbd2: remove redundant buffer io error checks Now that __jbd2_journal_remove_checkpoint() can detect buffer io error and mark journal checkpoint error, then we abort the journal later before updating log tail to ensure the filesystem works consistently. So we could remove other redundant buffer io error checkes. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-5-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 235d68069cbd158cb00835d434e9e9accf9a6dd4 Author: Zhang Yi Date: Thu Jun 10 19:24:35 2021 +0800 jbd2: don't abort the journal when freeing buffers Now that we can be sure the journal is aborted once a buffer has failed to be written back to disk, we can remove the journal abort logic in jbd2_journal_try_to_free_buffers() which was introduced in commit c044f3d8360d ("jbd2: abort journal if free a async write error metadata buffer"), because it may cost and propably is not safe. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-4-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit fcf37549ae19e904bc6a5eadf5c25eca36100c5e Author: Zhang Yi Date: Thu Jun 10 19:24:34 2021 +0800 jbd2: ensure abort the journal if detect IO error when writing original buffer back Although we merged c044f3d8360 ("jbd2: abort journal if free a async write error metadata buffer"), there is a race between jbd2_journal_try_to_free_buffers() and jbd2_journal_destroy(), so the jbd2_log_do_checkpoint() may still fail to detect the buffer write io error flag which may lead to filesystem inconsistency. jbd2_journal_try_to_free_buffers() ext4_put_super() jbd2_journal_destroy() __jbd2_journal_remove_checkpoint() detect buffer write error jbd2_log_do_checkpoint() jbd2_cleanup_journal_tail() <--- lead to inconsistency jbd2_journal_abort() Fix this issue by introducing a new atomic flag which only have one JBD2_CHECKPOINT_IO_ERROR bit now, and set it in __jbd2_journal_remove_checkpoint() when freeing a checkpoint buffer which has write_io_error flag. Then jbd2_journal_destroy() will detect this mark and abort the journal to prevent updating log tail. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-3-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 1866cba842437f3e7a5a8ee5b558744d9ae844d0 Author: Zhang Yi Date: Thu Jun 10 19:24:33 2021 +0800 jbd2: remove the out label in __jbd2_journal_remove_checkpoint() The 'out' lable just return the 'ret' value and seems not required, so remove this label and switch to return appropriate value immediately. This patch also do some minor cleanup, no logical change. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210610112440.3438139-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 0caaefbaf2a429c256c7469cb603ca8918e96fb0 Author: yangerkun Date: Wed Jun 9 15:55:45 2021 +0800 ext4: no need to verify new add extent block ext4_ext_grow_indepth will add a new extent block which has init the expected content. We can mark this buffer as verified so to stop a useless check in __read_extent_tree_block. Signed-off-by: yangerkun Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210609075545.1442160-1-yangerkun@huawei.com Signed-off-by: Theodore Ts'o commit d07621d9b9b8231187cc6e2121c927b3b8016789 Author: yangerkun Date: Tue Jun 8 22:12:36 2021 +0800 jbd2: clean up misleading comments for jbd2_fc_release_bufs This comments was for jbd2_fc_wait_bufs, not for jbd2_fc_release_bufs. Remove this misleading comments. Signed-off-by: yangerkun Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210608141236.459441-1-yangerkun@huawei.com Signed-off-by: Theodore Ts'o commit fcc84fe12fd8271ea0d94cbac4ae02f9162f56fd Author: Mauro Carvalho Chehab Date: Thu Jun 24 16:01:31 2021 +0200 staging: hisi-spmi-controller: rename spmi-channel property The spmi-channel is not used on other drivers. So, rename it, in order to document that this is specific to those devices. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ed45fc5d84d7b531343ee5d3466ebfac26217da0.1624542940.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 83fb097ba87adbc4bf1550ef6bee450764f34e1b Author: Mauro Carvalho Chehab Date: Thu Jun 24 16:01:30 2021 +0200 staging: phy-hi3670-usb3: do a some minor cleanups Before moving this driver out of staging: 1. group some integers altogether; 2. Use: return some_function() instead of: ret = some_function(); return ret; This is just a cleanup. No functional changes. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/55db419e42fd3af72494acbe0ea0f0d1de8906ac.1624542940.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3b1f941536af17537da09a7552c8e74804dd6823 Author: Jianpeng Ma Date: Wed Jun 23 10:31:26 2021 +0800 docs: ABI: testing: sysfs-firmware-memmap: add some memmap types. Compare with arch/x86/kernel/e820.c, types of memmap omitted some. So add. Signed-off-by: Jianpeng Ma Link: https://lore.kernel.org/r/20210623023126.104380-1-jianpeng.ma@intel.com Signed-off-by: Greg Kroah-Hartman commit b1489186cc8391e0c1e342f9fbc3eedf6b944c61 Author: Josh Triplett Date: Mon Jun 7 12:15:24 2021 -0700 ext4: add check to prevent attempting to resize an fs with sparse_super2 The in-kernel ext4 resize code doesn't support filesystem with the sparse_super2 feature. It fails with errors like this and doesn't finish the resize: EXT4-fs (loop0): resizing filesystem from 16640 to 7864320 blocks EXT4-fs warning (device loop0): verify_reserved_gdb:760: reserved GDT 2 missing grp 1 (32770) EXT4-fs warning (device loop0): ext4_resize_fs:2111: error (-22) occurred during file system resize EXT4-fs (loop0): resized filesystem to 2097152 To reproduce: mkfs.ext4 -b 4096 -I 256 -J size=32 -E resize=$((256*1024*1024)) -O sparse_super2 ext4.img 65M truncate -s 30G ext4.img mount ext4.img /mnt python3 -c 'import fcntl, os, struct ; fd = os.open("/mnt", os.O_RDONLY | os.O_DIRECTORY) ; fcntl.ioctl(fd, 0x40086610, struct.pack("Q", 30 * 1024 * 1024 * 1024 // 4096), False) ; os.close(fd)' dmesg | tail e2fsck ext4.img The userspace resize2fs tool has a check for this case: it checks if the filesystem has sparse_super2 set and if the kernel provides /sys/fs/ext4/features/sparse_super2. However, the former check requires manually reading and parsing the filesystem superblock. Detect this case in ext4_resize_begin and error out early with a clear error message. Signed-off-by: Josh Triplett Link: https://lore.kernel.org/r/74b8ae78405270211943cd7393e65586c5faeed1.1623093259.git.josh@joshtriplett.org Signed-off-by: Theodore Ts'o commit e9f9f61d0cdcb7f0b0b5feb2d84aa1c5894751f3 Author: Josh Triplett Date: Mon Jun 7 12:15:08 2021 -0700 ext4: consolidate checks for resize of bigalloc into ext4_resize_begin Two different places checked for attempts to resize a filesystem with the bigalloc feature. Move the check into ext4_resize_begin, which both places already call. Signed-off-by: Josh Triplett Link: https://lore.kernel.org/r/bee03303d999225ecb3bfa5be8576b2f4c6edbe6.1623093259.git.josh@joshtriplett.org Signed-off-by: Theodore Ts'o commit a5f6c0f85a09f46c88c0ac53f3d2f70eef105a65 Author: Dmitry Osipenko Date: Wed Jun 23 07:22:31 2021 +0300 hwmon: Support set_trips() of thermal device ops Support set_trips() callback of thermal device ops. This allows HWMON device to operatively notify thermal core about temperature changes, which is very handy to have in a case where HWMON sensor is used by CPU thermal zone that performs passive cooling and emergency shutdown on overheat. Thermal core will be able to react faster to temperature changes. The set_trips() callback is entirely optional. If HWMON sensor doesn't support setting thermal trips, then the callback is a NO-OP. The dummy callback has no effect on the thermal core. The temperature trips are either complement the temperature polling mechanism of thermal core or replace the polling if sensor can set the trips and polling is disabled by a particular device in a device-tree. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210623042231.16008-3-digetx@gmail.com Signed-off-by: Guenter Roeck commit b50aa49638c7e12abf4ecc483f4e928c5cccc1b0 Author: Dmitry Osipenko Date: Wed Jun 23 07:22:30 2021 +0300 hwmon: (lm90) Prevent integer underflows of temperature calculations The min/max/crit and all other temperature values that are passed to the driver are unlimited and value that is close to INT_MIN results in integer underflow of the temperature calculations made by the driver for LM99 sensor. Temperature hysteresis is among those values that need to be limited, but limiting of hysteresis is independent from the sensor version. Add the missing limits. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210623042231.16008-2-digetx@gmail.com Signed-off-by: Guenter Roeck commit 310c097c2bdbea253d6ee4e064f3e65580ef93ac Author: Ritesh Harjani Date: Thu Jun 3 07:33:02 2021 +0530 ext4: remove duplicate definition of ext4_xattr_ibody_inline_set() ext4_xattr_ibody_inline_set() & ext4_xattr_ibody_set() have the exact same definition. Hence remove ext4_xattr_ibody_inline_set() and all its call references. Convert the callers of it to call ext4_xattr_ibody_set() instead. [ Modified to preserve ext4_xattr_ibody_set() and remove ext4_xattr_ibody_inline_set() instead. -- TYT ] Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/fd566b799bbbbe9b668eb5eecde5b5e319e3694f.1622685482.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit f35d2f249ef05b9671e7898f09ad89aa78f99122 Author: Nicholas Piggin Date: Tue Jun 22 15:30:36 2021 +1000 powerpc/64s: Fix copy-paste data exposure into newly created tasks copy-paste contains implicit "copy buffer" state that can contain arbitrary user data (if the user process executes a copy instruction). This could be snooped by another process if a context switch hits while the state is live. So cp_abort is executed on context switch to clear out possible sensitive data and prevent the leak. cp_abort is done after the low level _switch(), which means it is never reached by newly created tasks, so they could snoop on this buffer between their first and second context switch. Fix this by doing the cp_abort before calling _switch. Add some comments which should make the issue harder to miss. Fixes: 07d2a628bc000 ("powerpc/64s: Avoid cpabort in context switch when possible") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210622053036.474678-1-npiggin@gmail.com commit a27755d57e0b8c1109a6b1485e52a5f9d51bd4eb Author: Christophe Leroy Date: Fri Jun 4 14:54:15 2021 +0000 powerpc/32: Avoid #ifdef nested with FTR_SECTION on booke syscall entry On booke, SYSCALL_ENTRY macro nests an FTR_SECTION with a #ifdef CONFIG_KVM_BOOKE_HV. Duplicate the single instruction alternative to avoid nesting. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/33db61d5f85146262dbe26648f8f87eca3cae393.1622818435.git.christophe.leroy@csgroup.eu commit 4bd9e05ac7b8b1f7d0c28702cb684417501a5e39 Author: Christophe Leroy Date: Fri Jun 4 14:54:14 2021 +0000 powerpc/32: Reduce code duplication of system call entry booke and non booke do pretty similar things in SYSCALL_ENTRY macro just before calling jumping to transfer_to_syscall(). Do them in transfer_to_syscall() instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/552e27fa09394a6bc70585fcdfa237f99a5d1267.1622818435.git.christophe.leroy@csgroup.eu commit 275dcf24e253f4f5b200bc8cca5eac32a23b08c8 Author: Christophe Leroy Date: Fri Jun 4 14:54:13 2021 +0000 powerpc/32: Interchange r1 and r11 in SYSCALL_ENTRY on booke To better match non booke version of SYSCALL_ENTRY macro, interchange r1 and r11 in the booke version. While at it, in both versions use r1 instead of r11 to save _NIP and _CCR. All other uses of r11 will go away in next patch, so don't bother changing them for now. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1684c39724a069b0ce1aa82eaee6ec194e354e4e.1622818435.git.christophe.leroy@csgroup.eu commit 10e9252f043ecda0dad7cde6ef87db5d10dff2c7 Author: Christophe Leroy Date: Fri Jun 4 14:54:12 2021 +0000 powerpc/32: Interchange r10 and r12 in SYSCALL_ENTRY on non booke To better match booke version of SYSCALL_ENTRY macro, interchange r10 and r12 in the non booke version. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5ab3a517bc883a2fc905fb2cb5ee9344f37b2cfa.1622818435.git.christophe.leroy@csgroup.eu commit 56afad885228902d090558a0b1cf75e9809e831d Author: Christophe Leroy Date: Fri Jun 4 09:57:36 2021 +0000 powerpc: Remove klimit klimit is a global variable initialised at build time with the value of _end. This variable is never modified, so _end symbol can be used directly. Remove klimit. Signed-off-by: Christophe Leroy Reviewed-by: Kefeng Wang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9fa9ba6807c17f93f35a582c199c646c4a8bfd9c.1622800638.git.christophe.leroy@csgroup.eu commit 6ca6512c716afd6e37281372c4c35aa6afd71d10 Author: Christophe Leroy Date: Mon Apr 19 10:47:27 2021 +0000 powerpc/mm: Properly coalesce pages in ptdump Commit aaa229529244 ("powerpc/mm: Add physical address to Linux page table dump") changed range coalescing to only combine ranges that are both virtually and physically contiguous, in order to avoid erroneous combination of unrelated mappings in IOREMAP space. But in the VMALLOC space, mappings almost never have contiguous physical pages, so the commit mentionned above leads to dumping one line per page for vmalloc mappings. Taking into account the vmalloc always leave a gap between two areas, we never have two mappings dumped as a single combination even if they have the exact same flags. The only space that may have encountered such an issue was the early IOREMAP which is not using vmalloc engine. But previous commits added gaps between early IO mappings, so it is not an issue anymore. That commit created some difficulties with KASAN mappings, see commit cabe8138b23c ("powerpc: dump as a single line areas mapping a single physical page.") and with huge page, see commit b00ff6d8c1c3 ("powerpc/ptdump: Properly handle non standard page size"). So, almost revert commit aaa229529244 to properly coalesce pages mapped with the same flags as before, only keep the display of the first physical address of the range, as it can be usefull especially for IO mappings. It brings back powerpc at the same level as other architectures and simplifies the conversion to GENERIC PTDUMP. With the patch: ---[ kasan shadow mem start ]--- 0xf8000000-0xf8ffffff 0x07000000 16M huge rw present dirty accessed 0xf9000000-0xf91fffff 0x01434000 2M r present accessed 0xf9200000-0xf95affff 0x02104000 3776K rw present dirty accessed 0xfef5c000-0xfeffffff 0x01434000 656K r present accessed ---[ kasan shadow mem end ]--- Before: ---[ kasan shadow mem start ]--- 0xf8000000-0xf8ffffff 0x07000000 16M huge rw present dirty accessed 0xf9000000-0xf91fffff 0x01434000 16K r present accessed 0xf9200000-0xf9203fff 0x02104000 16K rw present dirty accessed 0xf9204000-0xf9207fff 0x0213c000 16K rw present dirty accessed 0xf9208000-0xf920bfff 0x02174000 16K rw present dirty accessed 0xf920c000-0xf920ffff 0x02188000 16K rw present dirty accessed 0xf9210000-0xf9213fff 0x021dc000 16K rw present dirty accessed 0xf9214000-0xf9217fff 0x02220000 16K rw present dirty accessed 0xf9218000-0xf921bfff 0x023c0000 16K rw present dirty accessed 0xf921c000-0xf921ffff 0x023d4000 16K rw present dirty accessed 0xf9220000-0xf9227fff 0x023ec000 32K rw present dirty accessed ... 0xf93b8000-0xf93e3fff 0x02614000 176K rw present dirty accessed 0xf93e4000-0xf94c3fff 0x027c0000 896K rw present dirty accessed 0xf94c4000-0xf94c7fff 0x0236c000 16K rw present dirty accessed 0xf94c8000-0xf94cbfff 0x041f0000 16K rw present dirty accessed 0xf94cc000-0xf94cffff 0x029c0000 16K rw present dirty accessed 0xf94d0000-0xf94d3fff 0x041ec000 16K rw present dirty accessed 0xf94d4000-0xf94d7fff 0x0407c000 16K rw present dirty accessed 0xf94d8000-0xf94f7fff 0x041c0000 128K rw present dirty accessed ... 0xf95ac000-0xf95affff 0x042b0000 16K rw present dirty accessed 0xfef5c000-0xfeffffff 0x01434000 16K r present accessed ---[ kasan shadow mem end ]--- Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c56ce1f5c3c75adc9811b1a5f9c410fa74183a8d.1618828806.git.christophe.leroy@csgroup.eu commit 57307f1b6edd781fba2bf9f7ec5f4d17a881ea54 Author: Christophe Leroy Date: Mon Apr 19 10:47:26 2021 +0000 powerpc/mm: Leave a gap between early allocated IO areas Vmalloc system leaves a gap between allocated areas. It helps catching overflows. Do the same for IO areas which are allocated with early_ioremap_range() until slab_is_available(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c433e358190fb5d47650463ea1ab755fc7b73e6e.1618828806.git.christophe.leroy@csgroup.eu commit 0e8554b5d7801b0aebc6c348a0a9f7706aa17b3b Author: Andy Shevchenko Date: Wed Jun 16 16:43:03 2021 +0300 powerpc/papr_scm: Properly handle UUID types and API Parse to and export from UUID own type, before dereferencing. This also fixes wrong comment (Little Endian UUID is something else) and should eliminate the direct strict types assignments. Fixes: 43001c52b603 ("powerpc/papr_scm: Use ibm,unit-guid as the iset cookie") Fixes: 259a948c4ba1 ("powerpc/pseries/scm: Use a specific endian format for storing uuid from the device tree") Signed-off-by: Andy Shevchenko Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210616134303.58185-1-andriy.shevchenko@linux.intel.com commit 0e5962b2ec3d07204fd995ed07870bff3322525c Author: Daniel Henrique Barboza Date: Tue Jun 22 10:39:23 2021 -0300 powerpc/pseries: fail quicker in dlpar_memory_add_by_ic() The validation done at the start of dlpar_memory_add_by_ic() is an all of nothing scenario - if any LMBs in the range is marked as RESERVED we can fail right away. We then can remove the 'lmbs_available' var and its check with 'lmbs_to_add' since the whole LMB range was already validated in the previous step. Signed-off-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210622133923.295373-4-danielhb413@gmail.com commit c2aaddcc65b343fad4ed184e625abd3e68f63b9b Author: Daniel Henrique Barboza Date: Tue Jun 22 10:39:22 2021 -0300 powerpc/pseries: break early in dlpar_memory_add_by_count() loops After a successful dlpar_add_lmb() call the LMB is marked as reserved. Later on, depending whether we added enough LMBs or not, we rely on the marked LMBs to see which ones might need to be removed, and we remove the reservation of all of them. These are done in for_each_drmem_lmb() loops without any break condition. This means that we're going to check all LMBs of the partition even after going through all the reserved ones. This patch adds break conditions in both loops to avoid this. The 'lmbs_added' variable was renamed to 'lmbs_reserved', and it's now being decremented each time a lmb reservation is removed, indicating if there are still marked LMBs to be processed. Signed-off-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210622133923.295373-3-danielhb413@gmail.com commit b3e3b4db7a9bafdd81735e6f8db0c5ee9b9d0b5f Author: Daniel Henrique Barboza Date: Tue Jun 22 10:39:21 2021 -0300 powerpc/pseries: skip reserved LMBs in dlpar_memory_add_by_count() The function is counting reserved LMBs as available to be added, but they aren't. This will cause the function to miscalculate the available LMBs and can trigger errors later on when executing dlpar_add_lmb(). Signed-off-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210622133923.295373-2-danielhb413@gmail.com commit bab26238bbd44d5a4687c0a64fd2c7f2755ea937 Author: Nicholas Piggin Date: Wed Jun 23 14:12:45 2021 +1000 powerpc: Offline CPU in stop_this_cpu() printk_safe_flush_on_panic() has special lock breaking code for the case where we panic()ed with the console lock held. It relies on panic IPI causing other CPUs to mark themselves offline. Do as most other architectures do. This effectively reverts commit de6e5d38417e ("powerpc: smp_send_stop do not offline stopped CPUs"), unfortunately it may result in some false positive warnings, but the alternative is more situations where we can crash without getting messages out. Fixes: de6e5d38417e ("powerpc: smp_send_stop do not offline stopped CPUs") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210623041245.865134-1-npiggin@gmail.com commit f5f48e8cb93f4acd77411df0327b61066985bea8 Author: Nicholas Piggin Date: Wed Jun 23 13:29:09 2021 +1000 powerpc: Make PPC_IRQ_SOFT_MASK_DEBUG depend on PPC64 32-bit platforms don't have irq soft masking. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210623032909.826010-1-npiggin@gmail.com commit 0cdff98b395e5ab71b650c3df154217b1348e9b5 Author: Nicholas Piggin Date: Wed Jun 23 12:29:24 2021 +1000 powerpc/64s: Remove irq mask workaround in accumulate_stolen_time() The caller has been moved to C after irq soft-mask state has been reconciled, and Linux IRQs have been marked as disabled, so this no longer needs to play games with IRQ internals. Fixes: 68b34588e202 ("powerpc/64/sycall: Implement syscall entry/exit logic in C") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210623022924.704645-1-npiggin@gmail.com commit 633c8e9800f3884a26b2af59be8ce27696ad6ebf Author: Nicholas Piggin Date: Wed Jun 23 12:15:28 2021 +1000 powerpc/pseries: Enable hardlockup watchdog for PowerVM partitions PowerVM will not arbitrarily oversubscribe or stop guests, page out the guest kernel text to a NFS volume connected by carrier pigeon to abacus based storage, etc., as a KVM host might. So PowerVM guests are not likely to be killed by the hard lockup watchdog in normal operation, even with shared processor LPARs which still get a minimum allotment of CPU time. Enable the hard lockup detector by default on !KVM guests, which we will assume is PowerVM. It has been useful in finding problems on bare metal kernels. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210623021528.702241-1-npiggin@gmail.com commit 6eaaf9de3599865ee3b339d90cb24f2153f40bf4 Author: Nicholas Piggin Date: Tue Jun 22 22:16:28 2021 +1000 powerpc/64s/interrupt: Check and fix srr_valid without crashing The PPC_RFI_SRR_DEBUG check added by patch "powerpc/64s: avoid reloading (H)SRR registers if they are still valid" has a few deficiencies. It does not fix the actual problem, it's not enabled by default, and it causes a program check interrupt which can cause more difficulties. However there are a lot of paths which may clobber SRRs or change return regs, and difficult to have a high confidence that all paths are covered without wider testing. Add a relatively low overhead always-enabled check that catches most such cases, reports once, and fixes it so the kernel can continue. Signed-off-by: Nicholas Piggin [mpe: Rebase, use switch & INT names, squash in race fix from Nick] Signed-off-by: Michael Ellerman commit ae58b1c645895c28ca155843db6788d57ea99e11 Author: Christophe Leroy Date: Fri Jun 18 01:51:16 2021 +1000 powerpc/interrupt: Remove prep_irq_for_user_exit() prep_irq_for_user_exit() has only one caller, squash it inside that caller. Signed-off-by: Christophe Leroy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-18-npiggin@gmail.com commit 61eece2d1707796fd45225ea3d20e9289251311c Author: Christophe Leroy Date: Fri Jun 18 01:51:15 2021 +1000 powerpc/interrupt: Refactor prep_irq_for_{user/kernel_enabled}_exit() prep_irq_for_user_exit() is a superset of prep_irq_for_kernel_enabled_exit(). Rename prep_irq_for_kernel_enabled_exit() as prep_irq_for_enabled_exit() and have prep_irq_for_user_exit() use it. Signed-off-by: Christophe Leroy Signed-off-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-17-npiggin@gmail.com commit 99f98f849cf13e5fac532979ccdb77dff07665db Author: Christophe Leroy Date: Fri Jun 18 01:51:14 2021 +1000 powerpc/interrupt: Interchange prep_irq_for_{kernel_enabled/user}_exit() prep_irq_for_user_exit() is a superset of prep_irq_for_kernel_enabled_exit(). In order to allow refactoring in following patch, interchange the two. This will allow prep_irq_for_user_exit() to call a renamed version of prep_irq_for_kernel_enabled_exit(). Signed-off-by: Christophe Leroy Signed-off-by: Nicholas Piggin Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-16-npiggin@gmail.com commit a214ee8802adb864d175ea6ca4176223bcc11d2b Author: Christophe Leroy Date: Fri Jun 18 01:51:13 2021 +1000 powerpc/interrupt: Refactor interrupt_exit_user_prepare() interrupt_exit_user_prepare() is a superset of interrupt_exit_user_prepare_main(). Refactor to avoid code duplication. Signed-off-by: Christophe Leroy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-15-npiggin@gmail.com commit f84aa284947f325c5697d35b92abd2047224f24b Author: Christophe Leroy Date: Fri Jun 18 01:51:12 2021 +1000 powerpc/interrupt: Rename and lightly change syscall_exit_prepare_main() Rename syscall_exit_prepare_main() into interrupt_exit_prepare_main() Pass it the 'ret' so that it can 'or' it directly instead of oring twice, once inside the function and once outside. And remove 'r3' parameter which is not used. Signed-off-by: Christophe Leroy Signed-off-by: Nicholas Piggin Reviewed-by: Nicholas Piggin [np: split out some changes into other patches] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-14-npiggin@gmail.com commit 13799748b957bc5659f97c036224b0f4b42172e2 Author: Nicholas Piggin Date: Fri Jun 18 01:51:11 2021 +1000 powerpc/64: use interrupt restart table to speed up return from interrupt Use the restart table facility to return from interrupt or system calls without disabling MSR[EE] or MSR[RI]. Interrupt return asm is put into the low soft-masked region, to prevent interrupts being processed here, although they are still taken as masked interrupts which causes SRRs to be clobbered, and a pending soft-masked interrupt to require replaying. The return code uses restart table regions to redirct to a fixup handler rather than continue with the exit, if such an interrupt happens. In this case the interrupt return is redirected to a fixup handler which reloads r1 for the interrupt stack and reloads registers and sets state up to replay the soft-masked interrupt and try the exit again. Some types of security exit fallback flushes and barriers are currently unable to cope with reentrant interrupts, e.g., because they store some state in the scratch SPR which would be clobbered even by masked interrupts. For now the interrupts-enabled exits are disabled when these flushes are used. Signed-off-by: Nicholas Piggin [mpe: Guard unused exit_must_hard_disable() as reported by lkp] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-13-npiggin@gmail.com commit 9d1988ca87dd90ecf80a0601c7fd13071fbb1a83 Author: Nicholas Piggin Date: Fri Jun 18 01:51:10 2021 +1000 powerpc/64: treat low kernel text as irqs soft-masked Treat code below __end_soft_masked as soft-masked for the purpose of alternate return. 64s already mostly does this for scv entry. This will be used to exit from interrupts without disabling MSR[EE]. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-12-npiggin@gmail.com commit 862fa563524b9f92d7e89fe332732bd3421772db Author: Nicholas Piggin Date: Fri Jun 18 01:51:09 2021 +1000 powerpc/64: interrupt soft-enable race fix Prevent interrupt restore from allowing racing hard interrupts going ahead of previous soft-pending ones, by using the soft-masked restart handler to allow a store to clear the soft-mask while knowing nothing is soft-pending. This probably doesn't matter much in practice, but it's a simple demonstrator / test case to exercise the restart table logic. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-11-npiggin@gmail.com commit f23699c93becd746295aaa506537882a46a62219 Author: Nicholas Piggin Date: Fri Jun 18 01:51:08 2021 +1000 powerpc/64: allow alternate return locations for soft-masked interrupts The exception table fixup adjusts a failed page fault's interrupt return location if it was taken at an address specified in the exception table, to a corresponding fixup handler address. Introduce a variation of that idea which adds a fixup table for NMIs and soft-masked asynchronous interrupts. This will be used to protect certain critical sections that are sensitive to being clobbered by interrupts coming in (due to using the same SPRs and/or irq soft-mask state). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-10-npiggin@gmail.com commit 63e40806eea984f770c992120bbfd71b589ea580 Author: Nicholas Piggin Date: Fri Jun 18 01:51:07 2021 +1000 powerpc/64s: save one more register in the masked interrupt handler This frees up one more register (and takes advantage of that to clean things up a little bit). This register will be used in the following patch. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-9-npiggin@gmail.com commit dd152f70bdc1b91445b10c65ac874b90c93fb3b5 Author: Nicholas Piggin Date: Fri Jun 18 01:51:06 2021 +1000 powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE] This extends the MSR[RI]=0 window a little further into the system call in order to pair RI and EE enabling with a single mtmsrd. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-8-npiggin@gmail.com commit e754f4d13e3919aafa485657599907aa63b9a40c Author: Nicholas Piggin Date: Fri Jun 18 01:51:05 2021 +1000 powerpc/64: move interrupt return asm to interrupt_64.S The next patch would like to move interrupt return assembly code to a low location before general text, so move it into its own file and include via head_64.S Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-7-npiggin@gmail.com commit 59dc5bfca0cb6a29db1a50847684eb5c19f8f400 Author: Nicholas Piggin Date: Fri Jun 18 01:51:03 2021 +1000 powerpc/64s: avoid reloading (H)SRR registers if they are still valid When an interrupt is taken, the SRR registers are set to return to where it left off. Unless they are modified in the meantime, or the return address or MSR are modified, there is no need to reload these registers when returning from interrupt. Introduce per-CPU flags that track the validity of SRR and HSRR registers. These are cleared when returning from interrupt, when using the registers for something else (e.g., OPAL calls), when adjusting the return address or MSR of a context, and when context switching (which changes the return address and MSR). This improves the performance of interrupt returns. Signed-off-by: Nicholas Piggin [mpe: Fold in fixup patch from Nick] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-5-npiggin@gmail.com commit 1df7d5e4baeac74d14c1bee18b2dff9302b3efbc Author: Nicholas Piggin Date: Fri Jun 18 01:51:02 2021 +1000 powerpc/64s: introduce different functions to return from SRR vs HSRR interrupts This makes no real difference yet except that HSRR type interrupts will use hrfid to return. This is important for the next patch. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-4-npiggin@gmail.com commit bf9155f1970c4dbf9ec6b87d3688433bd494a4e1 Author: Nicholas Piggin Date: Fri Jun 18 01:51:01 2021 +1000 powerpc: remove interrupt exit helpers unused argument The msr argument is not used, remove it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-3-npiggin@gmail.com commit 9a3ed7adcabce24a85fbe05f54e762b18756ec22 Author: Christophe Leroy Date: Fri Jun 18 01:51:00 2021 +1000 powerpc/interrupt: Fix CONFIG ifdef typo CONFIG_PPC_BOOK3S should be CONFIG_PPC_BOOK3S_64. restore_math is a no-op for other configurations. Signed-off-by: Christophe Leroy [np: split from another patch] Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210617155116.2167984-2-npiggin@gmail.com commit ffaacd97fd37b9f4e825d8107f5cba5470458f0e Author: Michael Ellerman Date: Mon Jun 21 16:49:38 2021 +1000 powerpc/prom_init: Pass linux_banner to firmware via option vector 7 Pass the value of linux_banner to firmware via option vector 7. Option vector 7 is described in "LoPAR" Linux on Power Architecture Reference v2.9, in table B.7 on page 824: An ASCII character formatted null terminated string that describes the client operating system. The string shall be human readable and may be displayed on the console. The string can be up to 256 bytes total, including the nul terminator. linux_banner contains lots of information, and should make it possible to identify the exact kernel version that is running: const char linux_banner[] = "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; For example: Linux version 4.15.0-144-generic (buildd@bos02-ppc64el-018) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #148-Ubuntu SMP Sat May 8 02:32:13 UTC 2021 (Ubuntu 4.15.0-144.148-generic 4.15.18) It's also printed at boot to the console/dmesg, which should make it possible to correlate what firmware receives with the console/dmesg on the machine. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621064938.2021419-2-mpe@ellerman.id.au commit f47d5a4fc254e62ea5af5cbb2fc3e68901def434 Author: Michael Ellerman Date: Mon Jun 21 16:49:37 2021 +1000 powerpc/prom_init: Convert prom_strcpy() into prom_strscpy_pad() In a subsequent patch we'd like to have something like a strscpy_pad() implementation usable in prom_init.c. Currently we have a strcpy() implementation with only one caller, so convert it into strscpy_pad() and update the caller. Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621064938.2021419-1-mpe@ellerman.id.au commit 3018fbc63632e6d30abde228f29aaeaf78b782bf Author: Michael Ellerman Date: Thu Jun 24 22:34:20 2021 +1000 powerpc/64s: Fix boot failure with 4K Radix When using the Radix MMU our PGD is always 64K, and must be naturally aligned. For a 4K page size kernel that means page alignment of swapper_pg_dir is not sufficient, leading to failure to boot. Use the existing MAX_PTRS_PER_PGD which has the correct value, and avoids us hard-coding 64K here. Fixes: e72421a085a8 ("powerpc: Define swapper_pg_dir[] in C") Reported-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210624123420.2784187-1-mpe@ellerman.id.au commit 0bc919d3e0b8149a60d2444c6a8e2b5974556522 Author: Maciej Żenczykowski Date: Wed Jun 16 17:09:52 2021 -0700 bpf: Support all gso types in bpf_skb_change_proto() Since we no longer modify gso_size, it is now theoretically safe to not set SKB_GSO_DODGY and reset gso_segs to zero. This also means the skb_is_gso_tcp() check should no longer be necessary. Unfortunately we cannot remove the skb_{decrease,increase}_gso_size() helpers, as they are still used elsewhere: bpf_skb_net_grow() without BPF_F_ADJ_ROOM_FIXED_GSO bpf_skb_net_shrink() without BPF_F_ADJ_ROOM_FIXED_GSO net/core/lwt_bpf.c's handle_gso_type() Signed-off-by: Maciej Żenczykowski Signed-off-by: Daniel Borkmann Cc: Dongseok Yi Cc: Willem de Bruijn Link: https://lore.kernel.org/bpf/20210617000953.2787453-3-zenczykowski@gmail.com commit 6f746d485fb9188dc67dce7de63d21f0c28a1f2e Author: Zhen Lei Date: Wed Jun 16 15:30:30 2021 +0800 mcb: Use DEFINE_RES_MEM() helper macro and fix the end address Use DEFINE_RES_MEM() to save a couple of lines of code, which makes the code a bit shorter and easier to read. The start address does not need to appear twice. By the way, the value of '.end' should be "start + size - 1". So the previous writing should have omitted subtracted 1. Fixes: acf5e051ac44 ("MCB: add support for SC31 to mcb-lpc") Fixes: 73edc8f7ccef ("mcb: Added support for LPC or non PCI based MCB carrier") Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210616073030.834-2-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit d02908ad8f34cf98128ee83ec7813ae968b7ea10 Author: Jinchao Wang Date: Thu Jun 24 10:09:29 2021 +0800 PNP: moved EXPORT_SYMBOL so that it immediately followed its function/variable change made to resolve following checkpatch message: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Jinchao Wang Link: https://lore.kernel.org/r/20210624020929.49968-1-wjc@cdjrlc.com Signed-off-by: Greg Kroah-Hartman commit 98db7259fa7b963d80da49fd636744e28a78981e Author: Marc Zyngier Date: Thu Jun 24 14:21:05 2021 +0100 KVM: arm64: Set the MTE tag bit before releasing the page Setting a page flag without holding a reference to the page is living dangerously. In the tag-writing path, we drop the reference to the page by calling kvm_release_pfn_dirty(), and only then set the PG_mte_tagged bit. It would be safer to do it the other way round. Fixes: f0376edb1ddca ("KVM: arm64: Add ioctl to fetch/store tags in a guest") Cc: Catalin Marinas Reviewed-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/87k0mjidwb.wl-maz@kernel.org commit a25d144fb883c73506ba384de476bbaff8220a95 Author: Christophe JAILLET Date: Mon Jun 21 21:46:13 2021 +0530 bus: mhi: pci-generic: Add missing 'pci_disable_pcie_error_reporting()' calls If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call Add the missing call in the error handling path of the probe and in the remove function. Cc: Fixes: b012ee6bfe2a ("mhi: pci_generic: Add PCI error handlers") Signed-off-by: Christophe JAILLET Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/f70c14701f4922d67e717633c91b6c481b59f298.1623445348.git.christophe.jaillet@wanadoo.fr Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210621161616.77524-6-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 02b49cd1174527e611768fc2ce0f75a74dfec7ae Author: Baochen Qiang Date: Mon Jun 21 21:46:11 2021 +0530 bus: mhi: Wait for M2 state during system resume During system resume, MHI host triggers M3->M0 transition and then waits for target device to enter M0 state. Once done, the device queues a state change event into ctrl event ring and notifies MHI host by raising an interrupt, where a tasklet is scheduled to process this event. In most cases, the tasklet is served timely and wait operation succeeds. However, there are cases where CPU is busy and cannot serve this tasklet for some time. Once delay goes long enough, the device moves itself to M1 state and also interrupts MHI host after inserting a new state change event to ctrl ring. Later when CPU finally has time to process the ring, there will be two events: 1. For M3->M0 event, which is the first event to be processed queued first. The tasklet handler serves the event, updates device state to M0 and wakes up the task. 2. For M0->M1 event, which is processed later, the tasklet handler triggers M1->M2 transition and updates device state to M2 directly, then wakes up the MHI host (if it is still sleeping on this wait queue). Note that although MHI host has been woken up while processing the first event, it may still has no chance to run before the second event is processed. In other words, MHI host has to keep waiting till timeout causing the M0 state to be missed. kernel log here: ... Apr 15 01:45:14 test-NUC8i7HVK kernel: [ 4247.911251] mhi 0000:06:00.0: Entered with PM state: M3, MHI state: M3 Apr 15 01:45:14 test-NUC8i7HVK kernel: [ 4247.917762] mhi 0000:06:00.0: State change event to state: M0 Apr 15 01:45:14 test-NUC8i7HVK kernel: [ 4247.917767] mhi 0000:06:00.0: State change event to state: M1 Apr 15 01:45:14 test-NUC8i7HVK kernel: [ 4338.788231] mhi 0000:06:00.0: Did not enter M0 state, MHI state: M2, PM state: M2 ... Fix this issue by simply adding M2 as a valid state for resume. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Cc: stable@vger.kernel.org Fixes: 0c6b20a1d720 ("bus: mhi: core: Add support for MHI suspend and resume") Signed-off-by: Baochen Qiang Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210524040312.14409-1-bqiang@codeaurora.org [mani: slightly massaged the commit message] Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210621161616.77524-4-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 44b1eba44dc537edf076f131f1eeee7544d0e04f Author: Loic Poulain Date: Mon Jun 21 21:46:10 2021 +0530 bus: mhi: core: Fix power down latency On graceful power-down/disable transition, when an MHI reset is performed, the MHI device loses its context, including interrupt configuration. However, the current implementation is waiting for event(irq) driven state change to confirm reset has been completed, which never happens, and causes reset timeout, leading to unexpected high latency of the mhi_power_down procedure (up to 45 seconds). Fix that by moving to the recently introduced poll_reg_field method, waiting for the reset bit to be cleared, in the same way as the power_on procedure. Cc: stable@vger.kernel.org Fixes: a6e2e3522f29 ("bus: mhi: core: Add support for PM state transitions") Signed-off-by: Loic Poulain Reviewed-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Hemant Kumar Link: https://lore.kernel.org/r/1620029090-8975-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210621161616.77524-3-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit ab1afed701d2db7eb35c1a2526a29067a38e93d1 Author: Alexander Shishkin Date: Mon Jun 21 18:12:46 2021 +0300 intel_th: Wait until port is in reset before programming it Some devices don't drain their pipelines if we don't make sure that the corresponding output port is in reset before programming it for a new trace capture, resulting in bits of old trace appearing in the new trace capture. Fix that by explicitly making sure the reset is asserted before programming new trace capture. Reviewed-by: Andy Shevchenko Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210621151246.31891-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 02ca71effb96595fb7e0a17df1aaedc5d2e30747 Author: Alexander Shishkin Date: Mon Jun 21 18:12:45 2021 +0300 intel_th: msu: Make contiguous buffers uncached We already keep the multiblock mode buffers uncached, but forget the single mode. Address this. Reviewed-by: Andy Shevchenko Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210621151246.31891-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ae128916fb87a91ae41bec0461330e8a81500d84 Author: Uwe Kleine-König Date: Mon Jun 21 18:12:44 2021 +0300 intel_th: Remove an unused exit point from intel_th_remove() As described in the added comment device_for_each_child() never returns a non-zero value. So remove the corresponding error check. This simplifies the quest to make struct bus_type::remove() return void. Reviewed-by: Andy Shevchenko Signed-off-by: Uwe Kleine-König Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210621151246.31891-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d0b371e5fba0ef2b4e3f6a3f1b5fe7f8bd97897e Author: Randy Dunlap Date: Mon Jun 21 18:12:43 2021 +0300 stm class: Spelling fix Drop the repeated word "the" in a comment. Cc: Alexander Shishkin Cc: Andrew Morton Cc: Greg Kroah-Hartman [alexander.shishkin: fixed the commit message] Reviewed-by: Andy Shevchenko Signed-off-by: Randy Dunlap Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210621151246.31891-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ee00d6b3c7aa65f97ace382ddf59739e65f5e8dd Author: Ritesh Harjani Date: Mon May 31 09:19:08 2021 +0530 ext4: fsmap: fix the block/inode bitmap comment While debugging fstest ext4/027 failure, found below comment to be wrong and confusing. Hence fix it while we are at it. Signed-off-by: Ritesh Harjani Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/e79134132db7ea42f15747b5c669ee91cc1aacdf.1622432690.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit d874742f6a734c73c22235f9d56b8f10bcf17c5f Author: Longpeng(Mike) Date: Mon Jun 21 08:40:46 2021 +0800 nitro_enclaves: Set Bus Master for the NE PCI device Enable Bus Master for the NE PCI device, according to the PCI spec for submitting memory or I/O requests: Master Enable – Controls the ability of a PCI Express Endpoint to issue Memory and I/O Read/Write Requests, and the ability of a Root or Switch Port to forward Memory and I/O Read/Write Requests in the Upstream direction Cc: Andra Paraschiv Cc: Alexandru Vasile Cc: Alexandru Ciobotaru Reviewed-by: Andra Paraschiv Signed-off-by: Longpeng(Mike) Link: https://lore.kernel.org/r/20210621004046.1419-1-longpeng2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 364745fbe981a4370f50274475da4675661104df Author: Maciej Żenczykowski Date: Wed Jun 16 17:09:51 2021 -0700 bpf: Do not change gso_size during bpf_skb_change_proto() This is technically a backwards incompatible change in behaviour, but I'm going to argue that it is very unlikely to break things, and likely to fix *far* more then it breaks. In no particular order, various reasons follow: (a) I've long had a bug assigned to myself to debug a super rare kernel crash on Android Pixel phones which can (per stacktrace) be traced back to BPF clat IPv6 to IPv4 protocol conversion causing some sort of ugly failure much later on during transmit deep in the GSO engine, AFAICT precisely because of this change to gso_size, though I've never been able to manually reproduce it. I believe it may be related to the particular network offload support of attached USB ethernet dongle being used for tethering off of an IPv6-only cellular connection. The reason might be we end up with more segments than max permitted, or with a GSO packet with only one segment... (either way we break some assumption and hit a BUG_ON) (b) There is no check that the gso_size is > 20 when reducing it by 20, so we might end up with a negative (or underflowing) gso_size or a gso_size of 0. This can't possibly be good. Indeed this is probably somehow exploitable (or at least can result in a kernel crash) by delivering crafted packets and perhaps triggering an infinite loop or a divide by zero... As a reminder: gso_size (MSS) is related to MTU, but not directly derived from it: gso_size/MSS may be significantly smaller then one would get by deriving from local MTU. And on some NICs (which do loose MTU checking on receive, it may even potentially be larger, for example my work pc with 1500 MTU can receive 1520 byte frames [and sometimes does due to bugs in a vendor plat46 implementation]). Indeed even just going from 21 to 1 is potentially problematic because it increases the number of segments by a factor of 21 (think DoS, or some other crash due to too many segments). (c) It's always safe to not increase the gso_size, because it doesn't result in the max packet size increasing. So the skb_increase_gso_size() call was always unnecessary for correctness (and outright undesirable, see later). As such the only part which is potentially dangerous (ie. could cause backwards compatibility issues) is the removal of the skb_decrease_gso_size() call. (d) If the packets are ultimately destined to the local device, then there is absolutely no benefit to playing around with gso_size. It only matters if the packets will egress the device. ie. we're either forwarding, or transmitting from the device. (e) This logic only triggers for packets which are GSO. It does not trigger for skbs which are not GSO. It will not convert a non-GSO MTU sized packet into a GSO packet (and you don't even know what the MTU is, so you can't even fix it). As such your transmit path must *already* be able to handle an MTU 20 bytes larger then your receive path (for IPv4 to IPv6 translation) - and indeed 28 bytes larger due to IPv4 fragments. Thus removing the skb_decrease_gso_size() call doesn't actually increase the size of the packets your transmit side must be able to handle. ie. to handle non-GSO max-MTU packets, the IPv4/IPv6 device/ route MTUs must already be set correctly. Since for example with an IPv4 egress MTU of 1500, IPv4 to IPv6 translation will already build 1520 byte IPv6 frames, so you need a 1520 byte device MTU. This means if your IPv6 device's egress MTU is 1280, your IPv4 route must be 1260 (and actually 1252, because of the need to handle fragments). This is to handle normal non-GSO packets. Thus the reduction is simply not needed for GSO packets, because when they're correctly built, they will already be the right size. (f) TSO/GSO should be able to exactly undo GRO: the number of packets (TCP segments) should not be modified, so that TCP's MSS counting works correctly (this matters for congestion control). If protocol conversion changes the gso_size, then the number of TCP segments may increase or decrease. Packet loss after protocol conversion can result in partial loss of MSS segments that the sender sent. How's the sending TCP stack going to react to receiving ACKs/SACKs in the middle of the segments it sent? (g) skb_{decrease,increase}_gso_size() are already no-ops for GSO_BY_FRAGS case (besides triggering WARN_ON_ONCE). This means you already cannot guarantee that gso_size (and thus resulting packet MTU) is changed. ie. you must assume it won't be changed. (h) changing gso_size is outright buggy for UDP GSO packets, where framing matters (I believe that's also the case for SCTP, but it's already excluded by [g]). So the only remaining case is TCP, which also doesn't want it (see [f]). (i) see also the reasoning on the previous attempt at fixing this (commit fa7b83bf3b156c767f3e4a25bbf3817b08f3ff8e) which shows that the current behaviour causes TCP packet loss: In the forwarding path GRO -> BPF 6 to 4 -> GSO for TCP traffic, the coalesced packet payload can be > MSS, but < MSS + 20. bpf_skb_proto_6_to_4() will upgrade the MSS and it can be > the payload length. After then tcp_gso_segment checks for the payload length if it is <= MSS. The condition is causing the packet to be dropped. tcp_gso_segment(): [...] mss = skb_shinfo(skb)->gso_size; if (unlikely(skb->len <= mss)) goto out; [...] Thus changing the gso_size is simply a very bad idea. Increasing is unnecessary and buggy, and decreasing can go negative. Fixes: 6578171a7ff0 ("bpf: add bpf_skb_change_proto helper") Signed-off-by: Maciej Żenczykowski Signed-off-by: Daniel Borkmann Cc: Dongseok Yi Cc: Willem de Bruijn Link: https://lore.kernel.org/bpf/CANP3RGfjLikQ6dg=YpBU0OeHvyv7JOki7CyOUS9modaXAi-9vQ@mail.gmail.com Link: https://lore.kernel.org/bpf/20210617000953.2787453-2-zenczykowski@gmail.com commit 1db376113e45e31eeeda6f91096808cf1827e70c Author: Guoqing Chi Date: Mon Jun 21 03:11:00 2021 +0000 misc: ibmasm: Modify matricies to matrices The plural of "matrix" is "matrices". Signed-off-by: Guoqing Chi Link: https://lore.kernel.org/r/20210621031100.13093-1-chi962464zy@163.com Signed-off-by: Greg Kroah-Hartman commit 7487257cea875a2ee0aab088ee1dd92cd77698d4 Author: Junlin Yang Date: Sat Jun 19 19:28:54 2021 +0800 misc: vmw_vmci: return the correct errno code When kzalloc failed, should return -ENOMEM rather than -EINVAL. Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210619112854.1720-1-angkery@163.com Signed-off-by: Greg Kroah-Hartman commit 75020f2df6e431f0916972f3f816346dcaa0187f Author: Thorsten Scherer Date: Wed Jun 16 08:17:36 2021 +0200 siox: Simplify error handling via dev_err_probe() commit a787e5400a1c ("driver core: add device probe log helper") introduced a helper for a common error checking pattern. Use it. Acked-by: Uwe Kleine-König Signed-off-by: Thorsten Scherer Link: https://lore.kernel.org/r/20210616061736.3786173-2-t.scherer@eckelmann.de Signed-off-by: Greg Kroah-Hartman commit 1e2658aef517bec2327b22e1ddb12e33cceee38e Author: Moritz Fischer Date: Fri Jun 18 15:46:18 2021 -0700 fpga: machxo2-spi: Address warning about unused variable Address warning about unused variable in case CONFIG_OF is not set. warning: unused variable 'of_match' [-Wunused-const-variable] static const struct of_device_id of_match[] = { Fixes: 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2 support") Cc: Arnd Bergmann Cc: Tom Rix Cc: Greg Kroah-Hartman Reported-by: Arnd Bergmann Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210618224618.1487323-1-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6d2424a84533d3563ef525cb6e19cfda13abc472 Author: Eric Biggers Date: Thu May 27 16:55:57 2021 -0700 ext4: fix comment for s_hash_unsigned Fix the comment for s_hash_unsigned to not be the opposite of what it actually is. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20210527235557.2377525-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit bcfa8d14570d85c998a9b706b074ab151b286edf Author: Thomas Weißschuh Date: Tue Jun 15 23:41:03 2021 +0200 HID: input: Add support for Programmable Buttons Map them to KEY_MACRO# event codes. These buttons are defined by HID as follows: "The user defines the function of these buttons to control software applications or GUI objects." This matches the semantics of the KEY_MACRO# input event codes that Linux supports. Also add support for HID "Named Array" collections. Also add hid-debug support for KEY_MACRO#. Signed-off-by: Thomas Weißschuh Signed-off-by: Jiri Kosina commit ba47396e1c042619f1c038ad19493aef737677f5 Author: Maciej Żenczykowski Date: Wed Jun 16 17:09:50 2021 -0700 Revert "bpf: Check for BPF_F_ADJ_ROOM_FIXED_GSO when bpf_skb_change_proto" This reverts commit fa7b83bf3b156c767f3e4a25bbf3817b08f3ff8e. See the followup commit for the reasoning why I believe the appropriate approach is to simply make this change without a flag, but it can basically be summarized as using this helper without the flag is bug-prone or outright buggy, and thus the default should be this new behaviour. As this commit has only made it into net-next/master, but not into any real release, such a backwards incompatible change is still ok. Signed-off-by: Maciej Żenczykowski Signed-off-by: Daniel Borkmann Cc: Dongseok Yi Cc: Willem de Bruijn Link: https://lore.kernel.org/bpf/20210617000953.2787453-1-zenczykowski@gmail.com commit 37a0ca7f3e60cb1fc076444b964b45fdaf930a52 Author: Kees Cook Date: Wed Jun 23 13:39:36 2021 -0700 lkdtm/heap: Add init_on_alloc tests Add SLAB and page allocator tests for init_on_alloc. Testing for init_on_free was already happening via the poisoning tests. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-10-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit b61ce4d81ba29d0b70487635105e12ec44c3a873 Author: Kees Cook Date: Wed Jun 23 13:39:35 2021 -0700 selftests/lkdtm: Enable various testable CONFIGs Add a handful of LKDTM-testable features that depend on certain CONFIGs so that they are visible in logs for CI systems that run the selftests. Others could be added, but may be seen as having too high a trade-off for general testing. Cc: kernelci@groups.io Suggested-by: Guillaume Tucker Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-9-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 5b777131bd8005acaf7e9d6e7690214155f42890 Author: Kees Cook Date: Wed Jun 23 13:39:34 2021 -0700 lkdtm: Add CONFIG hints in errors where possible For various failure conditions, try to include some details about where to look for reasons about the failure. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-8-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit f123c42bbeff26bfe8bdb08a01307e92d51eec39 Author: Kees Cook Date: Wed Jun 23 13:39:33 2021 -0700 lkdtm: Enable DOUBLE_FAULT on all architectures Where feasible, I prefer to have all tests visible on all architectures, but to have them wired to XFAIL. DOUBLE_FAIL was set up to XFAIL, but wasn't actually being added to the test list. Fixes: cea23efb4de2 ("lkdtm/bugs: Make double-fault test always available") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-7-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 9c4f6ebc3665b33f15ee97ba1eb2c9bed341b8e6 Author: Kees Cook Date: Wed Jun 23 13:39:32 2021 -0700 lkdtm/heap: Add vmalloc linear overflow test Similar to the existing slab overflow and stack exhaustion tests, add VMALLOC_LINEAR_OVERFLOW (and rename the slab test SLAB_LINEAR_OVERFLOW). Additionally unmarks the test as destructive. (It should be safe in the face of misbehavior.) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-6-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit a15676ac8f24a9ac5fd881cf17be4be13fa0910a Author: Kees Cook Date: Wed Jun 23 13:39:31 2021 -0700 lkdtm/bugs: XFAIL UNALIGNED_LOAD_STORE_WRITE When built under CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, this test is expected to fail (i.e. not trip an exception). Fixes: 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-5-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 0acbdbc7205cf754e76c4f234dde4fa42316f50d Author: Kees Cook Date: Wed Jun 23 13:39:30 2021 -0700 selftests/lkdtm: Fix expected text for free poison Freed memory poisoning can be tested a few ways, so update the expected text to reflect the non-Oopsing alternative. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-4-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit c2eb472bbe25b3f360990f23b293b3fbadfa4bc0 Author: Kees Cook Date: Wed Jun 23 13:39:29 2021 -0700 selftests/lkdtm: Fix expected text for CR4 pinning The error text for CR4 pinning changed. Update the test to match. Fixes: a13b9d0b9721 ("x86/cpu: Use pinning mask for CR4 bits needing to be 0") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-3-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 04831e892b41618914b2123ae3b4fa77252e8656 Author: Kees Cook Date: Wed Jun 23 13:39:28 2021 -0700 selftests/lkdtm: Avoid needing explicit sub-shell Some environments do not set $SHELL when running tests. There's no need to use $SHELL here anyway, since "cat" can be used to receive any delivered signals from the kernel. Additionally avoid using bash-isms in the command, and record stderr for posterity. Fixes: 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets") Cc: stable@vger.kernel.org Suggested-by: Guillaume Tucker Suggested-by: David Laight Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210623203936.3151093-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 424d8237945c6c448c8b3f23885d464fb5685c97 Author: Jason Gerecke Date: Wed Jun 23 09:58:09 2021 -0700 HID: wacom: Correct base usage for capacitive ExpressKey status bits The capacitive status of ExpressKeys is reported with usages beginning at 0x940, not 0x950. Bring our driver into alignment with reality. Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina commit 647d446d66e493d23ca1047fa8492b0269674530 Author: Sean Young Date: Wed Jun 23 22:37:54 2021 +0100 media, bpf: Do not copy more entries than user space requested The syscall bpf(BPF_PROG_QUERY, &attr) should use the prog_cnt field to see how many entries user space provided and return ENOSPC if there are more programs than that. Before this patch, this is not checked and ENOSPC is never returned. Note that one lirc device is limited to 64 bpf programs, and user space I'm aware of -- ir-keytable -- always gives enough space for 64 entries already. However, we should not copy program ids than are requested. Signed-off-by: Sean Young Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210623213754.632-1-sean@mess.org commit 3d1bf78c7b13a0ad88e77dce94df88400f47e0dd Merge: a4a49140ae84e ad4711f962e08 Author: Will Deacon Date: Thu Jun 24 14:07:04 2021 +0100 Merge branch 'for-next/sve' into for-next/core Optimise SVE switching for CPUs with 128-bit implementations. * for-next/sve: arm64/sve: Skip flushing Z registers with 128 bit vectors arm64/sve: Use the sve_flush macros in sve_load_from_fpsimd_state() arm64/sve: Split _sve_flush macro into separate Z and predicate flushes commit a4a49140ae84e74f5d831c2416fe4860c8ff9d34 Merge: 26a0f50fd7d43 cfa7ff959a789 Author: Will Deacon Date: Thu Jun 24 14:06:54 2021 +0100 Merge branch 'for-next/smccc' into for-next/core Add support for versions v1.2 and 1.3 of the SMC calling convention. * for-next/smccc: arm64: smccc: Support SMCCC v1.3 SVE register saving hint arm64: smccc: Add support for SMCCCv1.2 extended input/output registers commit 26a0f50fd7d435ddb556969e5563ba7213697859 Merge: bd23fdba41783 63ebdb77afa96 Author: Will Deacon Date: Thu Jun 24 14:06:38 2021 +0100 Merge branch 'for-next/selftests' into for-next/core Fix output format from SVE selftest. * for-next/selftests: kselftest/arm64: Add missing newline to SVE test skipping output commit bd23fdba41783251c82e9b6476bcef39a37c9bbd Merge: 2e5d34d26a906 d053e71ac8442 Author: Will Deacon Date: Thu Jun 24 14:06:23 2021 +0100 Merge branch 'for-next/ptrauth' into for-next/core Allow Pointer Authentication to be configured independently for kernel and userspace. * for-next/ptrauth: arm64: Conditionally configure PTR_AUTH key of the kernel. arm64: Add ARM64_PTR_AUTH_KERNEL config option commit 2e5d34d26a906f17a773cd3c67ee91dd2118c898 Merge: fdceddb06a5ff d96b1b8c9f79b Author: Will Deacon Date: Thu Jun 24 14:05:40 2021 +0100 Merge branch 'for-next/perf' into for-next/core PMU driver cleanups for managing IRQ affinity and exposing event attributes via sysfs. * for-next/perf: (36 commits) drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number arm64: perf: Simplify EVENT ATTR macro in perf_event.c drivers/perf: Simplify EVENT ATTR macro in fsl_imx8_ddr_perf.c drivers/perf: Simplify EVENT ATTR macro in xgene_pmu.c drivers/perf: Simplify EVENT ATTR macro in qcom_l3_pmu.c drivers/perf: Simplify EVENT ATTR macro in qcom_l2_pmu.c drivers/perf: Simplify EVENT ATTR macro in SMMU PMU driver perf: Add EVENT_ATTR_ID to simplify event attributes perf/smmuv3: Don't trample existing events with global filter perf/hisi: Constify static attribute_group structs perf: qcom: Remove redundant dev_err call in qcom_l3_cache_pmu_probe() drivers/perf: hisi: Fix data source control arm64: perf: Add more support on caps under sysfs perf: qcom_l2_pmu: move to use request_irq by IRQF_NO_AUTOEN flag arm_pmu: move to use request_irq by IRQF_NO_AUTOEN flag perf: arm_spe: use DEVICE_ATTR_RO macro perf: xgene_pmu: use DEVICE_ATTR_RO macro perf: qcom: use DEVICE_ATTR_RO macro perf: arm_pmu: use DEVICE_ATTR_RO macro ... commit fdceddb06a5ff5ad3894cf9e8124d5af38ac5793 Merge: 81ad4bb1fe91d c275c5c6d50a0 Author: Will Deacon Date: Thu Jun 24 14:05:25 2021 +0100 Merge branch 'for-next/mte' into for-next/core KASAN optimisations for the hardware tagging (MTE) implementation. * for-next/mte: kasan: disable freed user page poisoning with HW tags arm64: mte: handle tags zeroing at page allocation time kasan: use separate (un)poison implementation for integrated init mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable() kasan: speed up mte_set_mem_tag_range commit 81ad4bb1fe91d28d793d801e462a284c7f82cc40 Merge: 078834caafbfc 52218fcd61cb4 Author: Will Deacon Date: Thu Jun 24 14:04:33 2021 +0100 Merge branch 'for-next/mm' into for-next/core Lots of cleanup to our various page-table definitions, but also some non-critical fixes and removal of some unnecessary memory types. The most interesting change here is the reduction of ARCH_DMA_MINALIGN back to 64 bytes, since we're not aware of any machines that need a higher value with the way the code is structured (only needed for non-coherent DMA). * for-next/mm: arm64: tlb: fix the TTL value of tlb_get_level arm64/mm: Rename ARM64_SWAPPER_USES_SECTION_MAPS arm64: head: fix code comments in set_cpu_boot_mode_flag arm64: mm: drop unused __pa(__idmap_text_start) arm64: mm: fix the count comments in compute_indices arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan arm64: mm: Pass original fault address to handle_mm_fault() arm64/mm: Drop SECTION_[SHIFT|SIZE|MASK] arm64/mm: Use CONT_PMD_SHIFT for ARM64_MEMSTART_SHIFT arm64/mm: Drop SWAPPER_INIT_MAP_SIZE arm64: mm: decode xFSC in mem_abort_decode() arm64: mm: Add is_el1_data_abort() helper arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) arm64: mm: Remove unused support for Normal-WT memory type arm64: acpi: Map EFI_MEMORY_WT memory as Normal-NC arm64: mm: Remove unused support for Device-GRE memory type arm64: mm: Use better bitmap_zalloc() arm64/mm: Make vmemmap_free() available only with CONFIG_MEMORY_HOTPLUG arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad() arm64/mm: Validate CONFIG_PGTABLE_LEVELS commit 078834caafbfc0fcbe5a380ff3102ed6bb5d7012 Merge: 2c9bd9d806757 cf814bcfa1e66 Author: Will Deacon Date: Thu Jun 24 14:04:19 2021 +0100 Merge branch 'for-next/misc' into for-next/core Reduce loglevel of useless print during CPU offlining. * for-next/misc: arm64: smp: Bump debugging information print down to KERN_DEBUG commit 2c9bd9d806757bc84e9d744044d6937a85df5f60 Merge: 181a126979307 1cbdf60bd1b74 Author: Will Deacon Date: Thu Jun 24 14:04:00 2021 +0100 Merge branch 'for-next/kasan' into for-next/core Optimise out-of-line KASAN checking when using software tagging. * for-next/kasan: kasan: arm64: support specialized outlined tag mismatch checks commit 181a126979307a0192f41a4a1fac235d6f4ac9f0 Merge: 6cf61e061e8e3 69bb0585ebb0c Author: Will Deacon Date: Thu Jun 24 14:03:24 2021 +0100 Merge branch 'for-next/insn' into for-next/core Refactoring of our instruction decoding routines and addition of some missing encodings. * for-next/insn: arm64: insn: avoid circular include dependency arm64: insn: move AARCH64_INSN_SIZE into arm64: insn: decouple patching from insn code arm64: insn: Add load/store decoding helpers arm64: insn: Add some opcodes to instruction decoder arm64: insn: Add barrier encodings arm64: insn: Add SVE instruction class arm64: Move instruction encoder/decoder under lib/ arm64: Move aarch32 condition check functions arm64: Move patching utilities out of instruction encoding/decoding commit 6cf61e061e8e3d9c00fb49373196ed5f03235285 Merge: aeb3e82e43235 b5df5b8307b1d Author: Will Deacon Date: Thu Jun 24 14:01:55 2021 +0100 Merge branch 'for-next/entry' into for-next/core The never-ending entry.S refactoring continues, putting us in a much better place wrt compiler instrumentation whilst moving more of the code into C. * for-next/entry: arm64: idle: don't instrument idle code with KCOV arm64: entry: don't instrument entry code with KCOV arm64: entry: make NMI entry/exit functions static arm64: entry: split SDEI entry arm64: entry: split bad stack entry arm64: entry: fold el1_inv() into el1h_64_sync_handler() arm64: entry: handle all vectors with C arm64: entry: template the entry asm functions arm64: entry: improve bad_mode() arm64: entry: move bad_mode() to entry-common.c arm64: entry: consolidate EL1 exception returns arm64: entry: organise entry vectors consistently arm64: entry: organise entry handlers consistently arm64: entry: convert IRQ+FIQ handlers to C arm64: entry: add a call_on_irq_stack helper arm64: entry: move NMI preempt logic to C arm64: entry: move arm64_preempt_schedule_irq to entry-common.c arm64: entry: convert SError handlers to C arm64: entry: unmask IRQ+FIQ after EL0 handling arm64: remove redundant local_daif_mask() in bad_mode() commit 5607fa6c3da3189de1bac356c73bc4fcaf4c0234 Author: Jinchao Wang Date: Thu Jun 24 10:12:07 2021 +0800 serial: Prefer unsigned int to bare use of unsigned Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Jinchao Wang Link: https://lore.kernel.org/r/20210624021207.58059-1-wjc@cdjrlc.com Signed-off-by: Greg Kroah-Hartman commit b67e830d38fa9335d927fe67e812e3ed81b4689c Author: Vignesh Raghavendra Date: Tue Jun 22 20:27:04 2021 +0530 serial: 8250: 8250_omap: Fix possible interrupt storm on K3 SoCs On K3 family of SoCs (which includes AM654 SoC), it is observed that RX TIMEOUT is signalled after RX FIFO has been drained, in which case a dummy read of RX FIFO is required to clear RX TIMEOUT condition. Otherwise, this would lead to an interrupt storm. Fix this by introducing UART_RX_TIMEOUT_QUIRK flag and doing a dummy read in IRQ handler when RX TIMEOUT is reported with no data in RX FIFO. Fixes: be70874498f3 ("serial: 8250_omap: Add support for AM654 UART controller") Reported-by: Jan Kiszka Tested-by: Jan Kiszka Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210622145704.11168-1-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit 08b0adb1ae5456a7785ac3c8fdfdc351206f99c3 Author: Dmitry Baryshkov Date: Tue Jun 22 00:15:28 2021 +0300 serial: qcom_geni_serial: use DT aliases according to DT bindings Device tree bindings do not specify "hsuart" aliases, instead all serial ports should use "serial" alias name as noted by Rob Herring [1]. Make qcom_geni_serial driver use "serial" alias and fallback to "hsuart" if one is not found. [1] https://lore.kernel.org/linux-arm-msm/6dd1f5cd-03c7-5945-9fa2-1c2698405110@linaro.org/ Cc: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210621211528.1607516-1-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit cddd53e8aa4fc442e26a7a7be183593ce31453ca Author: Greg Kroah-Hartman Date: Thu Jun 24 14:46:32 2021 +0200 Revert "tty: serial: Add UART driver for Cortina-Access platform" This reverts commit b61c8bf4694b5115766849378dcb8787ff54e65e. It never made it to a public mailing list and still needs some work based on the review comments. So revert it for now. Reported-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/CAMuHMdXA9-ajoAza2JAW5879ECieMm1dbBbKHgJhDa7=3kWu3w@mail.gmail.com Cc: Jason Li Signed-off-by: Greg Kroah-Hartman commit 0c5a11c0ca25621a44d83ae17c2ca6422d7bbbab Author: Fabio Aiuto Date: Wed Jun 23 15:01:03 2021 +0200 staging: rtl8723bs: convert function to static function chk_sta_is_alive() is used only inside core/rtw_ap.c so remove the prototype and convert it to static. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210623130103.7727-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit bee5ebf02dbb49dd975d5e0584440a0a2867807d Author: Fabio Aiuto Date: Tue Jun 22 15:10:01 2021 +0200 staging: rtl8723bs: remove item from TODO list remove item related to 5Ghz code deletion from driver's TODO list. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/842b5ce0623be738d611d883433a8bf2aa895e90.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 990a1472930bf2bb7927ea2def4b434790780a8d Author: Fabio Aiuto Date: Tue Jun 22 15:10:00 2021 +0200 staging: rtl8723bs: fix check allowing 5Ghz settings fix check allowing 5Ghz settings, only disabled and 2.4Ghz enabled states are allowed. Fix comment accordingly. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/df7d0ecc02ac7a27e568768523dd7b3f34acd551.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 43cf7e96fe456d4598e44f21e994021987fa9089 Author: Fabio Aiuto Date: Tue Jun 22 15:09:59 2021 +0200 staging: rtl8723bs: remove obsolete 5Ghz comments remove obsolete 5Ghz comments. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/608f0b08ffae821d695cb2eadcffbd592912c906.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d490a27e23c5fb79b766530016ab8665169498e Author: Fabio Aiuto Date: Tue Jun 22 15:09:58 2021 +0200 staging: rtl8723bs: fix macro value for 2.4Ghz only device fix IQK_Matrix_Settings_NUM macro value to 14 which is the max channel number value allowed in a 2.4Ghz device. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0b4a876929949248aa18cb919da3583c65e4ee4e.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6a782e4a4ebf32173de819a7c4c89724ac4c2817 Author: Fabio Aiuto Date: Tue Jun 22 15:09:57 2021 +0200 staging: rtl8723bs: remove unused ODM_CMNINFO_BOARD_TYPE enum item remove ODM_CMNINFO_BOARD_TYPE enum item, fix comments accordingly (given that 5GHz code isn't supported). Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e3adfc218779c9c1ea904e806f77fc5007be180f.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc2cda0fe3297db9c2b2f146574eb5ba8d94ec72 Author: Fabio Aiuto Date: Tue Jun 22 15:09:56 2021 +0200 staging: rtl8723bs: remove VHT dead code remove VHT dead code, as the device doesn't support VHT (which is a 802.11ac capability). Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2ca4be24e401bd862a96e2641a9b0377be36a25d.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9e749e6f352aebcffba5f366a47973447101db9f Author: Fabio Aiuto Date: Tue Jun 22 15:09:55 2021 +0200 staging: rtl8723bs: remove 5Ghz code related to RF power calibration remove 5Ghz code related to RF calibration. Remove table arrays, variables and macros related to RF power tracking. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f2096f71ae80f0cb7805a0e48536babc9809a3de.1624367072.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit aa0b6160eac75c093e1ecee141f3540777784d0c Author: Fabio Aiuto Date: Tue Jun 22 15:09:54 2021 +0200 staging: rtl8723bs: remove some unused 5Ghz macro definitions remove some unused 5Ghz macro definitions. Fix comments accordingly. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8d2933555170e5f206b9198a203e8a31ee2b7702.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec84d0ae54a6774091b3b7d1e9da32589f48b2f9 Author: Fabio Aiuto Date: Tue Jun 22 15:09:53 2021 +0200 staging: rtl8723bs: remove 5Ghz code related to channel plan definition remove 5Ghz code related to channel plan definition. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/17a707952cec951893748d2cb59d02a294cdd1be.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 997f608107158c73511cd031851d4c33f95250a4 Author: Fabio Aiuto Date: Tue Jun 22 15:09:52 2021 +0200 staging: rtl8723bs: beautify prototypes in include/hal_com_phycfg.h beautify function prototypes in incldue/hal_com_phycfg.h in order to ease grep searches. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8f6796cbbe726dd912fababe94b3dd1d8dcabbb7.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 284a8037453199962f781211adb4f8f80108e346 Author: Fabio Aiuto Date: Tue Jun 22 15:09:51 2021 +0200 staging: rtl8723bs: remove all branchings between 2.4Ghz and 5Ghz band types remove all code branchings tied to dual band support. The device works only on 2.4Ghz band so there's no need to check which band we are on. Removed all code branches that would be valid only for 5Ghz for it's dead code. Removed enums, table fields indexing by band type, function arguments passing current band type and all other thing related to telling us which band we are on. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/72bb27f6a7b3be607f93f5b406d863dd08376986.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c659a46871148f98022b8c60b09053e2f20dc825 Author: Fabio Aiuto Date: Tue Jun 22 15:09:50 2021 +0200 staging: rtl8723bs: remove struct rt_channel_plan_5g remove struct rt_channel_plan_5g, for rtl8723bs works only on 2.4Ghz band. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c9780328291ef84a8b0874e34da881d5e3885ddc.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e5d6664e273a8678cf24a3b419ea8a2db5fdfc26 Author: Fabio Aiuto Date: Tue Jun 22 15:09:49 2021 +0200 staging: rtl8723bs: remove 5Ghz field in struct registry_priv remove unused 5Ghz field in struct registry_priv. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3a58fae5330a321dd570d1a7931a5b17bb3996a8.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d5fd85ea85590ad2c960fd96d4eaeeaa5327ff3 Author: Fabio Aiuto Date: Tue Jun 22 15:09:48 2021 +0200 staging: rtl8723bs: rename enum items related to channel bonding since rtl8723bs card allows only 20Mhz and 40Mhz channels, rename enum items related to channel bonding accordingly to the only composite channel bandwidth allowed in 2.4Ghz (i.e. 40Mhz) in a HT context (since VHT isn't supported) Example: VHT_DATA_SC_20_LOWER_OF_80MHZ -> HT_DATA_SC_LOWER_OF_40MHZ Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a4172419996bdcaf96f0d9b5438b3b2372ff69b7.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit aa9224a800439d5af35302c7b50e4bb5d2f036cc Author: Fabio Aiuto Date: Tue Jun 22 15:09:47 2021 +0200 staging: rtl8723bs: remove unused enum items related to channel bonding remove unused enum items related to channel bonding. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/beb6760c04116b4720edf7257149828653bbda26.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33137187d3c8c82b2ae264bb8313dfa2e2f354e1 Author: Fabio Aiuto Date: Tue Jun 22 15:09:46 2021 +0200 staging: rtl8723bs: remove code related to unsupported channel bandwidth remove all code related to unsupported channel bandwidth (i.e. 80, 80+80, 160 Mhz). rtl8723bs NIC works only on 20 and 40 Mhz channels. Module parameter rtw_bw_mode can only have two values: 0 and 1 (20 Mhz and 40Mhz). So modify the default value setting to zero the 5Ghz nibble. Comments modified accordingly. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7b2ee7cc0abfd8744ed5ff4a654fb333fee77ec7.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 708180a92cd8bff18b3d2ac05172815bcc0b6b9a Author: Fabio Aiuto Date: Tue Jun 22 15:09:45 2021 +0200 staging: rtl8723bs: remove all 5Ghz network types remove all 5Ghz network types. rtl8723bs works on 802.11bgn standards and on 2.4Ghz band. So remove all code related to 802.11a and 802.11ac standards, which the device doesn't support. Acked-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7e4644a71d0ba2819370171b3dc78bfc755f6313.1624367071.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2b1aca59e11f64e616edb734efcf9d230b390b1e Author: Phillip Potter Date: Thu Jun 24 00:49:02 2021 +0100 staging: rtl8188eu: remove MSG_88E macro from include/rtw_debug.h Remove definition of MSG_88E macro from include/rtw_debug.h, as it no longer has any callers and does not follow kernel coding conventions. Removing this macro leaves only RT_TRACE and associated definitions. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-10-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 4ce8ae20286feae1999dabb6772ca0330be5ccf1 Author: Phillip Potter Date: Thu Jun 24 00:49:00 2021 +0100 staging: rtl8188eu: remove MSG_88E call from hal/odm.c Remove MSG_88E call from hal/odm.c as this macro is unnecessary, and this call is dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-8-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit ffa3e77ca71d0463cf97efec9c83ade36fac3894 Author: Phillip Potter Date: Thu Jun 24 00:48:59 2021 +0100 staging: rtl8188eu: remove DBG_88E_LEVEL macro from include/rtw_debug.h Remove definition of DBG_88E_LEVEL macro from include/rtw_debug.h, as it no longer has any callers and does not follow kernel coding conventions. Removing all such macros will ultimately allow the removal of this file. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit c511354263c03cb87f421f4cec9307f101767c57 Author: Phillip Potter Date: Thu Jun 24 00:48:58 2021 +0100 staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_xmit.c Remove all DBG_88E_LEVEL calls from core/rtw_xmit.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 0389516cb429da83796856a712461b0cfd9c9524 Author: Phillip Potter Date: Thu Jun 24 00:48:57 2021 +0100 staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_pwrctrl.c Remove all DBG_88E_LEVEL calls from core/rtw_pwrctrl.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 8e727b9353ec38637ff9457bfe0222009c73da13 Author: Phillip Potter Date: Thu Jun 24 00:48:56 2021 +0100 staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_ioctl_set.c Remove all DBG_88E_LEVEL calls from core/rtw_ioctl_set.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit fe16215de4b0d4bded5069e02e83b5b380447af0 Author: Phillip Potter Date: Thu Jun 24 00:48:55 2021 +0100 staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_mlmw_ext.c Remove all DBG_88E_LEVEL calls from core/rtw_mlmw_ext.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit e57dcbf698f86856c7a4e9617071260521e618d1 Author: Phillip Potter Date: Thu Jun 24 00:48:54 2021 +0100 staging: rtl8188eu: remove all DBG_88E_LEVEL calls from os_dep/ioctl_linux.c Remove all DBG_88E_LEVEL calls from os_dep/ioctl_linux.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210623234902.7411-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f38143580e8f710dc82acb94ee31624c705d97cc Author: Martin Kaiser Date: Sun Jun 20 19:53:01 2021 +0200 staging: rtl8188eu: remove more unused defines Remove some defines for register addresses and bits which obviously refer to chipsets other than rtl8188eu. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-13-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0684c15d32fd915b782afb9410eb6608948da9a1 Author: Martin Kaiser Date: Sun Jun 20 19:53:00 2021 +0200 staging: rtl8188eu: remove sdio defines Remove sdio defines which are not used by this driver. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ea7810f6e0b2df9762e7f987096639d505a1bfd0 Author: Martin Kaiser Date: Sun Jun 20 19:52:59 2021 +0200 staging: rtl8188eu: make efuse_ReadEFuse static The function is used only inside rtw_efuse.c. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit c372251719f2fc081fc2d2e0b0a71a7724e2d526 Author: Martin Kaiser Date: Sun Jun 20 19:52:58 2021 +0200 staging: rtl8188eu: remove RT_TRACE prints from pwrseqcmd.c Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0e02d10ec293f58b4350b0ded7dede0486cad6c3 Author: Martin Kaiser Date: Sun Jun 20 19:52:57 2021 +0200 staging: rtl8188eu: simplify rtl88eu_mon_init The code looks a bit nicer without goto. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 896e9022998a0c34220d0b60f68d2e36d7adb97d Author: Martin Kaiser Date: Sun Jun 20 19:52:56 2021 +0200 staging: rtl8188eu: remove HAL_INIT_PROFILE_TAG Remove HAL_INIT_PROFILE_TAG, which is an empty loop already. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b4399591371dc753205acc57316fdeecbb287659 Author: Martin Kaiser Date: Sun Jun 20 19:52:55 2021 +0200 staging: rtl8188eu: remove RT_TRACE and MSG_88E prints from usb_halinit.c Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ef803a9a49ef2e1da3049c91663af95d5887aed1 Author: Martin Kaiser Date: Sun Jun 20 19:52:54 2021 +0200 staging: rtl8188eu: remove unnecessary if clause if and else do the same thing. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 7ad9bc70e1acdc9746e5c49db38f86d43e2c9bd3 Author: Martin Kaiser Date: Sun Jun 20 19:52:53 2021 +0200 staging: rtl8188eu: remove efuse type A number of efuse-related functions have an "efuse type" parameter. This type is not used and can be removed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 7c12683cf7c9e58edd217b194f67defc71249614 Author: Martin Kaiser Date: Sun Jun 20 19:52:52 2021 +0200 staging: rtl8188eu: remove a couple of unused defines Remove some defines which are not used by this driver. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3b4b55a041a8dbc582d11f79a89e4df52e7fecf1 Author: Martin Kaiser Date: Sun Jun 20 19:52:51 2021 +0200 staging: rtl8188eu: remove RT_TRACE prints from rtl8188e_hal_init.c Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit abc6baa88224527979c4ee7de7ac12c60abf2049 Author: Martin Kaiser Date: Sun Jun 20 19:52:50 2021 +0200 staging: rtl8188eu: remove RT_TRACE prints from usb_intf.c Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit c1ccff4682da1e60f5d3820ba9381c977b562a29 Author: Martin Kaiser Date: Sun Jun 20 19:52:49 2021 +0200 staging: rtl8188eu: handle errors from dev_alloc_name Fail the usb interface initialization if dev_alloc_name returns an error. Other wlan drivers like natsemi or atmel use the same error handling. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620175301.14988-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit deefd9211ded45a8d2088763b095fd7f2f151d34 Author: Martin Kaiser Date: Sun Jun 20 19:40:57 2021 +0200 staging: rtl8188eu: fix usb_submit_urb error handling usb_read_port prepares a bulk in urb and calls usb_submit_urb to pass the usb to the usb core. It seems wrong that usb_read_port returns success to its caller if usb_submit_urb failed with -EPERM. According to drivers/usb/core/urb.c, usb_submit_urb returns -EPERM when an urb is resubmitted after being cancelled by usb_kill_urb etc. The only caller who checks the return value of usb_read_port is rtw_hal_inirp_init. This function submits the bulk in urbs for the first time after the netdevice is opened. We'll not receive -EPERM from usb_submit_urb in this case. The urbs are resubmitted by read_port_complete, which does not check for errors from usb_read_port. This driver may kill pending bulk in urbs when the netdevice is closed when the driver is unloaded or the system goes to sleep. I don't think that this will interrupt an ongoing netdev open. Suggested-by: Dan Carpenter Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210620174057.10201-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 872cfb096d3a009709b56f23f5280a359bbe58e2 Author: Christophe JAILLET Date: Sat Jun 19 22:14:34 2021 +0200 staging: rtl8188eu: remove "rtw_ieee80211_back_parties" This enum is unused. It is also close to "ieee80211_back_parties" in "include/linux/ieee80211.h", which should be used if needed. So remove it Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f389e0d54a5a8a46c9a696207541aa1cb433676b.1624132543.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 12a17d72f7948148b80c0dfa72ea983da33464ba Author: Christophe JAILLET Date: Sat Jun 19 22:14:20 2021 +0200 staging: rtl8188eu: remove "rtw_ieee80211_back_actioncode" This enum is the same as "ieee80211_back_actioncode" in "include/linux/ieee80211.h". Update the code accordingly and remove useless comment. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/6b6d8d81e7b2115e9206d2960ce09e1b2e8b6381.1624132543.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 9a4ccb73a5fb19ac51d3d54bc731bfef8f80fc09 Author: Michael Straube Date: Sat Jun 19 19:50:55 2021 +0200 staging: rtl8188eu: remove useless comment Remove block comment about function HwSuspendModeEnable92Cu. The comment contains no useful information and there is even no HwSuspendModeEnable92Cu function in the driver code. 'git grep -n HwSuspendModeEnable92Cu drivers/staging/rtl8188eu' returns nothing. Reviewed-by: Martin Kaiser Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210619175055.5122-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit eb64c6f60ed5406da496cf772fee4b29674bcbb1 Author: Christophe JAILLET Date: Sun Jun 20 10:21:31 2021 +0200 staging: rtl8723bs: Fix an error handling path 'ret' is known to be 0 at this point. It must be set to -ENOMEM if a memory allocation occurs. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/a9533d1594900152e1e64e9f09e54240e3b7062a.1624177169.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit aeb3e82e432350234cd6803daf3057832d5e1178 Merge: eea3e2dec4c85 ca940790d2ddc Author: Will Deacon Date: Thu Jun 24 13:37:47 2021 +0100 Merge branch 'for-next/docs' into for-next/core Update booting requirements for the FEAT_HCX feature, added to v8.7 of the architecture. * for-next/docs: arm64: Document requirement for access to FEAT_HCX commit eea3e2dec4c856677333fee7e8d56547cbd99121 Merge: eda2171d85472 77345ef70445a Author: Will Deacon Date: Thu Jun 24 13:36:39 2021 +0100 Merge branch 'for-next/cpuidle' into for-next/core Fix resume from idle when pNMI is being used. * for-next/cpuidle: arm64: suspend: Use cpuidle context helpers in cpu_suspend() PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter() arm64: Convert cpu_do_idle() to using cpuidle context helpers arm64: Add cpuidle context save/restore helpers commit eda2171d854722ec85ad99daedc331bc00c9cdda Merge: 5ceb045541ad9 cf292e93f423f Author: Will Deacon Date: Thu Jun 24 13:35:46 2021 +0100 Merge branch 'for-next/cpufeature' into for-next/core Additional CPU sanity checks for MTE and preparatory changes for systems where not all of the CPUs support 32-bit EL0. * for-next/cpufeature: arm64: Restrict undef hook for cpufeature registers arm64: Kill 32-bit applications scheduled on 64-bit-only CPUs KVM: arm64: Kill 32-bit vCPUs on systems with mismatched EL0 support arm64: Allow mismatched 32-bit EL0 support arm64: cpuinfo: Split AArch32 registers out into a separate struct arm64: Check if GMID_EL1.BS is the same on all CPUs arm64: Change the cpuinfo_arm64 member type for some sysregs to u64 commit 5ceb045541ad979fd304ca2321bf1fbb76189867 Merge: 25377204ebd4d 6b8f648959e50 Author: Will Deacon Date: Thu Jun 24 13:33:57 2021 +0100 Merge branch 'for-next/cortex-strings' into for-next/core Update our kernel string routines to the latest Cortex Strings implementation. * for-next/cortex-strings: arm64: update string routine copyrights and URLs arm64: Rewrite __arch_clear_user() arm64: Better optimised memchr() arm64: Import latest memcpy()/memmove() implementation arm64: Add assembly annotations for weak-PI-alias madness arm64: Import latest version of Cortex Strings' strncmp arm64: Import updated version of Cortex Strings' strlen arm64: Import latest version of Cortex Strings' strcmp arm64: Import latest version of Cortex Strings' memcmp commit 25377204ebd4db2048c873b7c68874247a391998 Merge: 216fe62d6fa85 fade9c2c6ee2b Author: Will Deacon Date: Thu Jun 24 13:33:02 2021 +0100 Merge branch 'for-next/caches' into for-next/core Big cleanup of our cache maintenance routines, which were confusingly named and inconsistent in their implementations. * for-next/caches: arm64: Rename arm64-internal cache maintenance functions arm64: Fix cache maintenance function comments arm64: sync_icache_aliases to take end parameter instead of size arm64: __clean_dcache_area_pou to take end parameter instead of size arm64: __clean_dcache_area_pop to take end parameter instead of size arm64: __clean_dcache_area_poc to take end parameter instead of size arm64: __flush_dcache_area to take end parameter instead of size arm64: dcache_by_line_op to take end parameter instead of size arm64: __inval_dcache_area to take end parameter instead of size arm64: Fix comments to refer to correct function __flush_icache_range arm64: Move documentation of dcache_by_line_op arm64: assembler: remove user_alt arm64: Downgrade flush_icache_range to invalidate arm64: Do not enable uaccess for invalidate_icache_range arm64: Do not enable uaccess for flush_icache_range arm64: Apply errata to swsusp_arch_suspend_exit arm64: assembler: add conditional cache fixups arm64: assembler: replace `kaddr` with `addr` commit 7756f1d6369e61d1cc47d6e51619d1e1d1681a2e Author: Iskren Chernev Date: Tue Jun 22 23:32:40 2021 +0300 phy: qcom-qusb2: Add configuration for SM4250 and SM6115 The SM4250 and SM6115 uses the same register layout as MSM8996, but the tune sequence is a bit different. Reviewed-by: Bjorn Andersson Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20210622203240.559979-4-iskren.chernev@gmail.com Signed-off-by: Greg Kroah-Hartman commit bbaabe0d26742e914eccc26d818128a84ec40458 Author: Iskren Chernev Date: Tue Jun 22 23:32:39 2021 +0300 dt-bindings: phy: qcom,qusb2: document sm4250/6115 compatible This compatible string is for the HS USB PHY on sm4250 and sm6115 platforms. Reviewed-by: Bjorn Andersson Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20210622203240.559979-3-iskren.chernev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f0b20fb0568f770524e1e6515d217a95d0f418c Author: Iskren Chernev Date: Tue Jun 22 23:32:38 2021 +0300 dt-bindings: usb: qcom,dwc3: Add bindings for sm6115/4250 Add the compatible string for SM6115/4250 SoC from Qualcomm. Reviewed-by: Bjorn Andersson Signed-off-by: Iskren Chernev Link: https://lore.kernel.org/r/20210622203240.559979-2-iskren.chernev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 216fe62d6fa85b0a3a6a0e66f11da29db4be7490 Merge: e7cf636cba4cf 27f2a4db76e8d Author: Will Deacon Date: Thu Jun 24 13:31:41 2021 +0100 Merge branch 'for-next/build' into for-next/core Tweak linker flags so that GDB can understand vmlinux when using RELR relocations. * for-next/build: Makefile: fix GDB warning with CONFIG_RELR commit 4897807753e078655a78de39ed76044d784f3e63 Author: Hannu Hartikainen Date: Tue Jun 22 17:14:54 2021 +0300 USB: cdc-acm: blacklist Heimann USB Appset device The device (32a7:0000 Heimann Sensor GmbH USB appset demo) claims to be a CDC-ACM device in its descriptors but in fact is not. If it is run with echo disabled it returns garbled data, probably due to something that happens in the TTY layer. And when run with echo enabled (the default), it will mess up the calibration data of the sensor the first time any data is sent to the device. In short, I had a bad time after connecting the sensor and trying to get it to work. I hope blacklisting it in the cdc-acm driver will save someone else a bit of trouble. Signed-off-by: Hannu Hartikainen Cc: stable Link: https://lore.kernel.org/r/20210622141454.337948-1-hannu@hrtk.in Signed-off-by: Greg Kroah-Hartman commit e7cf636cba4cf0650169ddbc449645d03a5eedae Merge: 0b573a025aa65 16c230b30de8b Author: Will Deacon Date: Thu Jun 24 13:30:13 2021 +0100 Merge branch 'for-next/boot' into for-next/core Boot path cleanups to enable early initialisation of per-cpu operations needed by KCSAN. * for-next/boot: arm64: scs: Drop unused 'tmp' argument to scs_{load, save} asm macros arm64: smp: initialize cpu offset earlier arm64: smp: unify task and sp setup arm64: smp: remove stack from secondary_data arm64: smp: remove pointless secondary_data maintenance arm64: assembler: add set_this_cpu_offset commit 24a31ea94922d391a96a9dd0a9a830de65423817 Author: Basavaraj Natikar Date: Fri Jun 18 13:48:38 2021 +0530 HID: amd_sfh: Add initial support for HPD sensor Add Human Presence Detection (HPD) sensors support on AMD next generation HPD supported platforms. Signed-off-by: Basavaraj Natikar Reviewed-by: Nehal Shah Reviewed-by: Shyam Sundar S K Signed-off-by: Jiri Kosina commit 0aad9c95eb9a2b086322e28ae2e58ad25598604e Author: Basavaraj Natikar Date: Fri Jun 18 13:48:37 2021 +0530 HID: amd_sfh: Extend ALS support for newer AMD platform Extend ALS support for AMD next generation SoC's like Renoir, Cezanne. AMD next generation platforms use C2P message register to read ALS sensor data instead of DRAM address. Signed-off-by: Basavaraj Natikar Reviewed-by: Nehal Shah Reviewed-by: Shyam Sundar S K Signed-off-by: Jiri Kosina commit f264481ad614dfd9aae59eeefa5fc664cdf173ae Author: Basavaraj Natikar Date: Fri Jun 18 13:48:36 2021 +0530 HID: amd_sfh: Extend driver capabilities for multi-generation support Initial driver support only covered the first generation of SFH platforms. In order to support the future generations introduce ops selection to distinguish the different platforms. Signed-off-by: Basavaraj Natikar Reviewed-by: Nehal Shah Reviewed-by: Shyam Sundar S K Signed-off-by: Jiri Kosina commit 50e7a31d30e8221632675abed3be306382324ca2 Author: Shuah Khan Date: Wed Jun 16 17:19:06 2021 +0200 media: Fix Media Controller API config checks Smatch static checker warns that "mdev" can be null: sound/usb/media.c:287 snd_media_device_create() warn: 'mdev' can also be NULL If CONFIG_MEDIA_CONTROLLER is disabled, this file should not be included in the build. The below conditions in the sound/usb/Makefile are in place to ensure that media.c isn't included in the build. sound/usb/Makefile: snd-usb-audio-$(CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER) += media.o select SND_USB_AUDIO_USE_MEDIA_CONTROLLER if MEDIA_CONTROLLER && (MEDIA_SUPPORT=y || MEDIA_SUPPORT=SND_USB_AUDIO) The following config check in include/media/media-dev-allocator.h is in place to enable the API only when CONFIG_MEDIA_CONTROLLER and CONFIG_USB are enabled. #if defined(CONFIG_MEDIA_CONTROLLER) && defined(CONFIG_USB) This check doesn't work as intended when CONFIG_USB=m. When CONFIG_USB=m, CONFIG_USB_MODULE is defined and CONFIG_USB is not. The above config check doesn't catch that CONFIG_USB is defined as a module and disables the API. This results in sound/usb enabling Media Controller specific ALSA driver code, while Media disables the Media Controller API. Fix the problem requires two changes: 1. Change the check to use IS_ENABLED to detect when CONFIG_USB is enabled as a module or static. Since CONFIG_MEDIA_CONTROLLER is a bool, leave the check unchanged to be consistent with drivers/media/Makefile. 2. Change the drivers/media/mc/Makefile to include mc-dev-allocator.o in mc-objs when CONFIG_USB is enabled. Link: https://lore.kernel.org/alsa-devel/YLeAvT+R22FQ%2FEyw@mwanda/ Reported-by: Dan Carpenter Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6becfe913bda839ae27224a2ea9d6cfb07c3fa2d Author: Colin Ian King Date: Wed Jun 23 19:24:37 2021 +0100 RDMA/bnxt_re: Fix uninitialized struct bit field rsvd1 The bit field rsvd1 in resp is not being initialized and garbage data is being copied from the stack back to userspace via the ib_copy_to_udata call. Fix this by setting the entire struct resp to zero; this will ensure that further new bit fields in the future will be zero'd too. Link: https://lore.kernel.org/r/20210623182437.163801-1-colin.king@canonical.com Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 879740517dab ("RDMA/bnxt_re: Update ABI to pass wqe-mode to user space") Signed-off-by: Colin Ian King [jgg: remove extra zeroing] Signed-off-by: Jason Gunthorpe commit 0b573a025aa65e9c6634fb230c5aebe14cc677d9 Merge: c4681547bcce7 33c222aeda145 Author: Will Deacon Date: Thu Jun 24 13:15:09 2021 +0100 Merge branch 'for-next/stacktrace' into for-next/core Relax frame record alignment requirements to facilitate 8-byte alignment with KASAN and Clang. * for-next/stacktrace: arm64: stacktrace: Relax frame record alignment requirement to 8 bytes arm64: Change the on_*stack functions to take a size argument arm64: Implement stack trace termination record commit d3997fce189fc4423169c51a81ba5ca01144d886 Author: Chunfeng Yun Date: Fri Jun 18 13:46:05 2021 +0800 usb: xhci-mtk: allow multiple Start-Split in a microframe This patch is used to relax bandwidth schedule by allowing multiple Start-Split in the same microframe. Reviewed-and-Tested-by: Ikjoon Jang Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623995165-25759-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 269072a3d9073aa975f4f16bdfd828c6ab15e755 Author: Colin Ian King Date: Mon Jun 21 10:55:45 2021 +0100 usb: ftdi-elan: remove redundant continue statement in a while-loop The continue statement at the end of the while-loop is redundant, remove it. Signed-off-by: Colin Ian King Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210621095545.9659-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 42601e356bfa8123e44a3d726d4abd4164a71f7c Author: Junlin Yang Date: Mon Jun 21 21:24:15 2021 +0800 usb: class: cdc-wdm: return the correct errno code The "rv" is initialized to "-ENOMEM", because "rv" is re-assigned to "-EINVAL", when kmalloc & usb_alloc_urb failed, the return value should return "-ENOMEM" rather than "-EINVAL",so the "rv" assignment is placed in the position where usb_endpoint_is_int_in is false. Acked-by: Oliver Neukum Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210621132415.2341-1-angkery@163.com Signed-off-by: Greg Kroah-Hartman commit 109d19a5eb3ddbdb87c43bfd4bcf644f4569da64 Author: Max Gurtovoy Date: Mon May 24 11:52:15 2021 +0300 IB/isert: Align target max I/O size to initiator size Since the Linux iser initiator default max I/O size set to 512KB and since there is no handshake procedure for this size in iser protocol, set the default max IO size of the target to 512KB as well. For changing the default values, there is a module parameter for both drivers. Link: https://lore.kernel.org/r/20210524085215.29005-1-mgurtovoy@nvidia.com Reviewed-by: Alaa Hleihel Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit ced50fc49f3bde2892c3d7fad7b3b6bfbc6ef90e Author: Jiri Olsa Date: Wed Jun 23 13:25:04 2021 +0200 bpf, x86: Remove unused cnt increase from EMIT macro Removing unused cnt increase from EMIT macro together with cnt declarations. This was introduced in commit [1] to ensure proper code generation. But that code was removed in commit [2] and this extra code was left in. [1] b52f00e6a715 ("x86: bpf_jit: implement bpf_tail_call() helper") [2] ebf7d1f508a7 ("bpf, x64: rework pro/epilogue and tailcall handling in JIT") Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210623112504.709856-1-jolsa@kernel.org commit 8d11cfb0c37547bd6b1cdc7c2653c1e6b5ec5abb Author: Vladimir Zapolskiy Date: Sun Jun 20 22:11:03 2021 +0300 dmaengine: imx-sdma: Remove platform data header Since commit 6c5f05a6cd88 ("ARM: imx3: Remove imx3 soc_init()") there are no more users of struct sdma_script_start_addrs outside of the driver itself, thus let's move the struct declaration just to the driver source code and remove the header file as unused one. Signed-off-by: Vladimir Zapolskiy Cc: Fabio Estevam Cc: Shawn Guo Cc: Arnd Bergmann Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210620191103.156626-1-vz@mleia.com Signed-off-by: Vinod Koul commit 72cce7dd9f0aa88f82a5612e7d4f9993c34d0d17 Author: Michal Simek Date: Wed Jun 23 13:07:38 2021 +0200 dmaengine: xilinx: dpdma: Fix spacing around addr[i-1] Use proper spacing for array calculation. Issue is reported by checkpatch.pl --strict. Signed-off-by: Michal Simek Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/ef7cde6f793bfa6f3dd0a8898bad13b6407479b0.1624446456.git.michal.simek@xilinx.com Signed-off-by: Vinod Koul commit 536bc5e6fdabbbfd4cb84a2d3b6c1aad17b44757 Author: Michal Simek Date: Wed Jun 23 13:05:39 2021 +0200 dmaengine: xilinx: dpdma: Use kernel type u32 over uint32_t Use u32 kernel type instead of uint32_t. Issue is reported by checkpatch.pl --strict. Signed-off-by: Michal Simek Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/9569008794d519b487348bfeafbfd76c5da5755e.1624446336.git.michal.simek@xilinx.com Signed-off-by: Vinod Koul commit 8e9910c5ad97aa9479ab19e6535065522d6a0f08 Merge: 00a738b86ec0c 8051334e901f2 Author: Greg Kroah-Hartman Date: Thu Jun 24 12:54:28 2021 +0200 Merge tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.14-rc1 Here are the USB-serial updates for 5.14-rc1, including: - gpio support for CP2108 - chars_in_buffer and write_room return-value updates - chars_in_buffer and write_room clean ups Included are also various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cp210x: add support for GPIOs on CP2108 USB: serial: drop irq-flags initialisations USB: serial: mos7840: drop buffer-callback return-value comments USB: serial: mos7720: drop buffer-callback sanity checks USB: serial: io_edgeport: drop buffer-callback sanity checks USB: serial: digi_acceleport: add chars_in_buffer locking USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting USB: serial: make usb_serial_driver::chars_in_buffer return uint USB: serial: make usb_serial_driver::write_room return uint commit 276010551664f73b6f1616dde471d6f0d63a73ba Author: Cassio Neri Date: Tue Jun 22 22:36:16 2021 +0100 time: Improve performance of time64_to_tm() The current implementation of time64_to_tm() contains unnecessary loops, branches and look-up tables. The new one uses an arithmetic-based algorithm appeared in [1] and is approximately 3x faster (YMMV). The drawback is that the new code isn't intuitive and contains many 'magic numbers' (not unusual for this type of algorithm). However, [1] justifies all those numbers and, given this function's history, the code is unlikely to need much maintenance, if any at all. Add a KUnit test for it which checks every day in a 160,000 years interval centered at 1970-01-01 against the expected result. [1] Neri, Schneider, "Euclidean Affine Functions and Applications to Calendar Algorithms". https://arxiv.org/abs/2102.06959 Signed-off-by: Cassio Neri Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210622213616.313046-1-cassio.neri@gmail.com commit ca46ad2214473df1a6a9496be17156d65ba89b9f Author: Joel Stanley Date: Thu Jun 24 18:37:42 2021 +0930 ARM: dts: aspeed: Fix AST2600 machines line names Tacoma and Rainier both have a line-names array that is too long: gpio gpiochip0: gpio-line-names is length 232 but should be at most length 208 This was probably copied from an AST2500 device tree that did have more GPIOs on the controller. Fixes: e9b24b55ca4f ("ARM: dts: aspeed: rainier: Add gpio line names") Fixes: 2f68e4e7df67 ("ARM: dts: aspeed: tacoma: Add gpio line names") Link: https://lore.kernel.org/r/20210624090742.56640-1-joel@jms.id.au Signed-off-by: Joel Stanley commit 408633c326c487f4f32d02c7d891c9b0242d5c45 Author: Sean Christopherson Date: Tue Jun 22 13:05:20 2021 -0700 KVM: selftests: Use "standard" min virtual address for CPUID test alloc Use KVM_UTIL_MIN_ADDR as the minimum for x86-64's CPUID array. The system page size was likely used as the minimum because _something_ had to be provided. Increasing the min from 0x1000 to 0x2000 should have no meaningful impact on the test, and will allow changing vm_vaddr_alloc() to use KVM_UTIL_MIN_VADDR as the default. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 233446c1e68f6086a7f6738318a5314b528fb642 Author: Sean Christopherson Date: Tue Jun 22 13:05:19 2021 -0700 KVM: selftests: Use alloc page helper for xAPIC IPI test Use the common page allocation helper for the xAPIC IPI test, effectively raising the minimum virtual address from 0x1000 to 0x2000. Presumably the test won't explode if it can't get a page at address 0x1000... Cc: Peter Shier Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5ae4d8706f091278709cd8af410685dd17c1dca9 Author: Sean Christopherson Date: Tue Jun 22 13:05:18 2021 -0700 KVM: selftests: Use alloc_page helper for x86-64's GDT/IDT/TSS allocations Switch to the vm_vaddr_alloc_page() helper for x86-64's "kernel" allocations now that the helper uses the same min virtual address as the open coded versions. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 106a2e766eae7161a0500048004bbc2f75ea9a98 Author: Sean Christopherson Date: Tue Jun 22 13:05:17 2021 -0700 KVM: selftests: Lower the min virtual address for misc page allocations Reduce the minimum virtual address of page allocations from 0x10000 to KVM_UTIL_MIN_VADDR (0x2000). Both values appear to be completely arbitrary, and reducing the min to KVM_UTIL_MIN_VADDR will allow for additional consolidation of code. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a9db9609c0e41d8c06611678d45dff36ded563dc Author: Sean Christopherson Date: Tue Jun 22 13:05:16 2021 -0700 KVM: selftests: Add helpers to allocate N pages of virtual memory Add wrappers to allocate 1 and N pages of memory using de facto standard values as the defaults for minimum virtual address, data memslot, and page table memslot. Convert all compatible users. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 95be3709ff4e3af848c285ebddea9916a24d6d0f Author: Sean Christopherson Date: Tue Jun 22 13:05:15 2021 -0700 KVM: selftests: Use "standard" min virtual address for Hyper-V pages Use the de facto standard minimum virtual address for Hyper-V's hcall params page. It's the allocator's job to not double-allocate memory, i.e. there's no reason to force different regions for the params vs. hcall page. This will allow adding a page allocation helper with a "standard" minimum address. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1dcd1c58ae7dc42102d2976421aefb5362427b9e Author: Sean Christopherson Date: Tue Jun 22 13:05:14 2021 -0700 KVM: selftests: Unconditionally use memslot 0 for x86's GDT/TSS setup Refactor x86's GDT/TSS allocations to for memslot '0' at its vm_addr_alloc() call sites instead of passing in '0' from on high. This is a step toward using a common helper for allocating pages. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 7a4f1a75b78c10d0d0e90841f45a60e12f599eff Author: Sean Christopherson Date: Tue Jun 22 13:05:13 2021 -0700 KVM: selftests: Unconditionally use memslot 0 when loading elf binary Use memslot '0' for all vm_vaddr_alloc() calls when loading the test binary. This is the first step toward adding a helper to handle page allocations with a default value for the target memslot. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 96d41cfd1bb9964602fabea9c7e72ca723f749db Author: Sean Christopherson Date: Tue Jun 22 13:05:12 2021 -0700 KVM: selftests: Zero out the correct page in the Hyper-V features test Fix an apparent copy-paste goof in hyperv_features where hcall_page (which is two pages, so technically just the first page) gets zeroed twice, and hcall_params gets zeroed none times. Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ecc3a92c6f4953c134a9590c762755e6593f507c Author: Sean Christopherson Date: Tue Jun 22 13:05:11 2021 -0700 KVM: selftests: Remove errant asm/barrier.h include to fix arm64 build Drop an unnecessary include of asm/barrier.h from dirty_log_test.c to allow the test to build on arm64. arm64, s390, and x86 all build cleanly without the include (PPC and MIPS aren't supported in KVM's selftests). arm64's barrier.h includes linux/kasan-checks.h, which is not copied into tools/. In file included from ../../../../tools/include/asm/barrier.h:8, from dirty_log_test.c:19: .../arm64/include/asm/barrier.h:12:10: fatal error: linux/kasan-checks.h: No such file or directory 12 | #include | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. Fixes: 84292e565951 ("KVM: selftests: Add dirty ring buffer test") Cc: Peter Xu Signed-off-by: Sean Christopherson Message-Id: <20210622200529.3650424-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b33bb78a1fada6445c265c585ee0dd0fc6279102 Author: Sean Christopherson Date: Tue Jun 22 10:22:44 2021 -0700 KVM: nVMX: Handle split-lock #AC exceptions that happen in L2 Mark #ACs that won't be reinjected to the guest as wanted by L0 so that KVM handles split-lock #AC from L2 instead of forwarding the exception to L1. Split-lock #AC isn't yet virtualized, i.e. L1 will treat it like a regular #AC and do the wrong thing, e.g. reinject it into L2. Fixes: e6f8b6c12f03 ("KVM: VMX: Extend VMXs #AC interceptor to handle split lock #AC in guest") Cc: Xiaoyao Li Signed-off-by: Sean Christopherson Message-Id: <20210622172244.3561540-1-seanjc@google.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 31c656570065727028f96c811b5ea9fc61502a18 Author: Colin Ian King Date: Tue Jun 22 16:09:12 2021 +0100 KVM: x86/mmu: Fix uninitialized boolean variable flush In the case where kvm_memslots_have_rmaps(kvm) is false the boolean variable flush is not set and is uninitialized. If is_tdp_mmu_enabled(kvm) is true then the call to kvm_tdp_mmu_zap_collapsible_sptes passes the uninitialized value of flush into the call. Fix this by initializing flush to false. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: e2209710ccc5 ("KVM: x86/mmu: Skip rmap operations if rmaps not allocated") Signed-off-by: Colin Ian King Reviewed-by: Sean Christopherson Message-Id: <20210622150912.23429-1-colin.king@canonical.com> Signed-off-by: Paolo Bonzini commit e5830fb13b8cad5e3bdf84f0f7a3dcb4f4d9bcbb Author: Hou Wenlong Date: Tue Jun 22 21:55:32 2021 +0800 KVM: selftests: fix triple fault if ept=0 in dirty_log_test Commit 22f232d134e1 ("KVM: selftests: x86: Set supported CPUIDs on default VM") moved vcpu_set_cpuid into vm_create_with_vcpus, but dirty_log_test doesn't use it to create vm. So vcpu's CPUIDs is not set, the guest's pa_bits in kvm would be smaller than the value queried by userspace. However, the dirty track memory slot is in the highest GPA, the reserved bits in gpte would be set with wrong pa_bits. For shadow paging, page fault would fail in permission_fault and be injected into guest. Since guest doesn't have idt, it finally leads to vm_exit for triple fault. Move vcpu_set_cpuid into vm_vcpu_add_default to set supported CPUIDs on default vcpu, since almost all tests need it. Fixes: 22f232d134e1 ("KVM: selftests: x86: Set supported CPUIDs on default VM") Signed-off-by: Hou Wenlong Message-Id: <411ea2173f89abce56fc1fca5af913ed9c5a89c9.1624351343.git.houwenlong93@linux.alibaba.com> Signed-off-by: Paolo Bonzini commit 18f63b15b0283d6f37be3174e2c7b6f2d6ed91cf Author: Jim Mattson Date: Mon Jun 21 15:16:48 2021 -0700 KVM: x86: Print CPU of last attempted VM-entry when dumping VMCS/VMCB Failed VM-entry is often due to a faulty core. To help identify bad cores, print the id of the last logical processor that attempted VM-entry whenever dumping a VMCS or VMCB. Signed-off-by: Jim Mattson Message-Id: <20210621221648.1833148-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit fd2afa70eff057fab57c9e06708b68677b261a0c Author: Fabio M. De Francesco Date: Sat Jun 19 00:32:06 2021 +0200 x86/resctrl: Fix kernel-doc in internal.h Add description of undocumented parameters. Issues detected by scripts/kernel-doc. Signed-off-by: Fabio M. De Francesco Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20210618223206.29539-1-fmdefrancesco@gmail.com commit f9b871c89ae61d5a4c0b81659fa6819c50d4ced2 Author: Fabio M. De Francesco Date: Wed Jun 16 20:15:30 2021 +0200 x86/resctrl: Fix kernel-doc in pseudo_lock.c Add undocumented parameters detected by scripts/kernel-doc. Signed-off-by: Fabio M. De Francesco Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20210616181530.4094-1-fmdefrancesco@gmail.com commit 5c89c2c7fbfa9124dd521c375b9c82b9ed75bc28 Merge: 3099406ef4832 3b7961a326f8a Author: Takashi Iwai Date: Thu Jun 24 10:02:45 2021 +0200 Merge tag 'asoc-fix-v5.13-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Fixes for v5.13 A final batch of fixes for v5.13, this is larger than I'd like due to the fixes for a series of suspend issues that Intel turned up in their testing this week. commit adf3c31e18b765ea24eba7b0c1efc076b8ee3d55 Author: Beata Michalska Date: Thu Jun 3 15:06:27 2021 +0100 sched/doc: Update the CPU capacity asymmetry bits Update the documentation bits referring to capacity aware scheduling with regards to newly introduced SD_ASYM_CPUCAPACITY_FULL sched_domain flag. Signed-off-by: Beata Michalska Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20210603140627.8409-4-beata.michalska@arm.com commit c744dc4ab58d1c09624ca3397cf15b142a0e0cb7 Author: Beata Michalska Date: Thu Jun 3 15:06:26 2021 +0100 sched/topology: Rework CPU capacity asymmetry detection Currently the CPU capacity asymmetry detection, performed through asym_cpu_capacity_level, tries to identify the lowest topology level at which the highest CPU capacity is being observed, not necessarily finding the level at which all possible capacity values are visible to all CPUs, which might be bit problematic for some possible/valid asymmetric topologies i.e.: DIE [ ] MC [ ][ ] CPU [0] [1] [2] [3] [4] [5] [6] [7] Capacity |.....| |.....| |.....| |.....| L M B B Where: arch_scale_cpu_capacity(L) = 512 arch_scale_cpu_capacity(M) = 871 arch_scale_cpu_capacity(B) = 1024 In this particular case, the asymmetric topology level will point at MC, as all possible CPU masks for that level do cover the CPU with the highest capacity. It will work just fine for the first cluster, not so much for the second one though (consider the find_energy_efficient_cpu which might end up attempting the energy aware wake-up for a domain that does not see any asymmetry at all) Rework the way the capacity asymmetry levels are being detected, allowing to point to the lowest topology level (for a given CPU), where full set of available CPU capacities is visible to all CPUs within given domain. As a result, the per-cpu sd_asym_cpucapacity might differ across the domains. This will have an impact on EAS wake-up placement in a way that it might see different range of CPUs to be considered, depending on the given current and target CPUs. Additionally, those levels, where any range of asymmetry (not necessarily full) is being detected will get identified as well. The selected asymmetric topology level will be denoted by SD_ASYM_CPUCAPACITY_FULL sched domain flag whereas the 'sub-levels' would receive the already used SD_ASYM_CPUCAPACITY flag. This allows maintaining the current behaviour for asymmetric topologies, with misfit migration operating correctly on lower levels, if applicable, as any asymmetry is enough to trigger the misfit migration. The logic there relies on the SD_ASYM_CPUCAPACITY flag and does not relate to the full asymmetry level denoted by the sd_asym_cpucapacity pointer. Detecting the CPU capacity asymmetry is being based on a set of available CPU capacities for all possible CPUs. This data is being generated upon init and updated once CPU topology changes are being detected (through arch_update_cpu_topology). As such, any changes to identified CPU capacities (like initializing cpufreq) need to be explicitly advertised by corresponding archs to trigger rebuilding the data. Additional -dflags- parameter, used when building sched domains, has been removed as well, as the asymmetry flags are now being set directly in sd_init. Suggested-by: Peter Zijlstra Suggested-by: Valentin Schneider Signed-off-by: Beata Michalska Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Dietmar Eggemann Tested-by: Valentin Schneider Link: https://lore.kernel.org/r/20210603140627.8409-3-beata.michalska@arm.com commit 2309a05d2abe713f7debc951640b010370c8befb Author: Beata Michalska Date: Thu Jun 3 15:06:25 2021 +0100 sched/core: Introduce SD_ASYM_CPUCAPACITY_FULL sched_domain flag Introducing new, complementary to SD_ASYM_CPUCAPACITY, sched_domain topology flag, to distinguish between shed_domains where any CPU capacity asymmetry is detected (SD_ASYM_CPUCAPACITY) and ones where a full set of CPU capacities is visible to all domain members (SD_ASYM_CPUCAPACITY_FULL). With the distinction between full and partial CPU capacity asymmetry, brought in by the newly introduced flag, the scope of the original SD_ASYM_CPUCAPACITY flag gets shifted, still maintaining the existing behaviour when one is detected on a given sched domain, allowing misfit migrations within sched domains that do not observe full range of CPU capacities but still do have members with different capacity values. It loses though it's meaning when it comes to the lowest CPU asymmetry sched_domain level per-cpu pointer, which is to be now denoted by SD_ASYM_CPUCAPACITY_FULL flag. Signed-off-by: Beata Michalska Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20210603140627.8409-2-beata.michalska@arm.com commit 8f91efd870ea5d8bc10b0fcc9740db51cd4c0c83 Author: Zhaoyang Huang Date: Fri Jun 11 08:29:34 2021 +0800 psi: Fix race between psi_trigger_create/destroy Race detected between psi_trigger_destroy/create as shown below, which cause panic by accessing invalid psi_system->poll_wait->wait_queue_entry and psi_system->poll_timer->entry->next. Under this modification, the race window is removed by initialising poll_wait and poll_timer in group_init which are executed only once at beginning. psi_trigger_destroy() psi_trigger_create() mutex_lock(trigger_lock); rcu_assign_pointer(poll_task, NULL); mutex_unlock(trigger_lock); mutex_lock(trigger_lock); if (!rcu_access_pointer(group->poll_task)) { timer_setup(poll_timer, poll_timer_fn, 0); rcu_assign_pointer(poll_task, task); } mutex_unlock(trigger_lock); synchronize_rcu(); del_timer_sync(poll_timer); <-- poll_timer has been reinitialized by psi_trigger_create() So, trigger_lock/RCU correctly protects destruction of group->poll_task but misses this race affecting poll_timer and poll_wait. Fixes: 461daba06bdc ("psi: eliminate kthread_worker from psi trigger scheduling mechanism") Co-developed-by: ziwei.dai Signed-off-by: ziwei.dai Co-developed-by: ke.wang Signed-off-by: ke.wang Signed-off-by: Zhaoyang Huang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Suren Baghdasaryan Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/1623371374-15664-1-git-send-email-huangzhaoyang@gmail.com commit f4183717b370ad28dd0c0d74760142b20e6e7931 Author: Huaixin Chang Date: Mon Jun 21 17:27:58 2021 +0800 sched/fair: Introduce the burstable CFS controller The CFS bandwidth controller limits CPU requests of a task group to quota during each period. However, parallel workloads might be bursty so that they get throttled even when their average utilization is under quota. And they are latency sensitive at the same time so that throttling them is undesired. We borrow time now against our future underrun, at the cost of increased interference against the other system users. All nicely bounded. Traditional (UP-EDF) bandwidth control is something like: (U = \Sum u_i) <= 1 This guaranteeds both that every deadline is met and that the system is stable. After all, if U were > 1, then for every second of walltime, we'd have to run more than a second of program time, and obviously miss our deadline, but the next deadline will be further out still, there is never time to catch up, unbounded fail. This work observes that a workload doesn't always executes the full quota; this enables one to describe u_i as a statistical distribution. For example, have u_i = {x,e}_i, where x is the p(95) and x+e p(100) (the traditional WCET). This effectively allows u to be smaller, increasing the efficiency (we can pack more tasks in the system), but at the cost of missing deadlines when all the odds line up. However, it does maintain stability, since every overrun must be paired with an underrun as long as our x is above the average. That is, suppose we have 2 tasks, both specify a p(95) value, then we have a p(95)*p(95) = 90.25% chance both tasks are within their quota and everything is good. At the same time we have a p(5)p(5) = 0.25% chance both tasks will exceed their quota at the same time (guaranteed deadline fail). Somewhere in between there's a threshold where one exceeds and the other doesn't underrun enough to compensate; this depends on the specific CDFs. At the same time, we can say that the worst case deadline miss, will be \Sum e_i; that is, there is a bounded tardiness (under the assumption that x+e is indeed WCET). The benefit of burst is seen when testing with schbench. Default value of kernel.sched_cfs_bandwidth_slice_us(5ms) and CONFIG_HZ(1000) is used. mkdir /sys/fs/cgroup/cpu/test echo $$ > /sys/fs/cgroup/cpu/test/cgroup.procs echo 100000 > /sys/fs/cgroup/cpu/test/cpu.cfs_quota_us echo 100000 > /sys/fs/cgroup/cpu/test/cpu.cfs_burst_us ./schbench -m 1 -t 3 -r 20 -c 80000 -R 10 The average CPU usage is at 80%. I run this for 10 times, and got long tail latency for 6 times and got throttled for 8 times. Tail latencies are shown below, and it wasn't the worst case. Latency percentiles (usec) 50.0000th: 19872 75.0000th: 21344 90.0000th: 22176 95.0000th: 22496 *99.0000th: 22752 99.5000th: 22752 99.9000th: 22752 min=0, max=22727 rps: 9.90 p95 (usec) 22496 p99 (usec) 22752 p95/cputime 28.12% p99/cputime 28.44% The interferenece when using burst is valued by the possibilities for missing the deadline and the average WCET. Test results showed that when there many cgroups or CPU is under utilized, the interference is limited. More details are shown in: https://lore.kernel.org/lkml/5371BD36-55AE-4F71-B9D7-B86DC32E3D2B@linux.alibaba.com/ Co-developed-by: Shanpei Chen Signed-off-by: Shanpei Chen Co-developed-by: Tianchen Ding Signed-off-by: Tianchen Ding Signed-off-by: Huaixin Chang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ben Segall Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20210621092800.23714-2-changhuaixin@linux.alibaba.com commit 9f38b678ffc4e2ccf167a1131c0403dc4f5e1bb7 Author: Corentin Labbe Date: Mon Jun 21 18:59:26 2021 +0000 crypto: sl3516 - depends on HAS_IOMEM The sl3516 driver need to depend on HAS_IOMEM. This fixes a build error: ERROR: modpost: "devm_platform_ioremap_resource" [drivers/crypto/gemini/sl3516-ce.ko] undefined! Reported-by: kernel test robot Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit e31694e0a7a709293319475d8001e05e31f2178c Author: Josh Poimboeuf Date: Wed Jun 23 10:42:28 2021 -0500 objtool: Don't make .altinstructions writable When objtool creates the .altinstructions section, it sets the SHF_WRITE flag to make the section writable -- unless the section had already been previously created by the kernel. The mismatch between kernel-created and objtool-created section flags can cause failures with external tooling (kpatch-build). And the section doesn't need to be writable anyway. Make the section flags consistent with the kernel's. Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls") Reported-by: Joe Lawrence Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/6c284ae89717889ea136f9f0064d914cd8329d31.1624462939.git.jpoimboe@redhat.com commit d18344c0d095df544bd7174b8fae2cba523dd4a4 Author: Wenkai Lin Date: Fri Jun 18 17:36:06 2021 +0800 crypto: hisilicon/qm - implement for querying hardware tasks status. This patch adds a function hisi_qm_is_q_updated to check if the task is ready in hardware queue when user polls an UACCE queue.This prevents users from repeatedly querying whether the accelerator has completed tasks, which wastes CPU resources. Signed-off-by: Wenkai Lin Signed-off-by: Herbert Xu commit cac6f1b87b1f7feafb7db349a2b1ca86634bc950 Author: YueHaibing Date: Fri Jun 18 17:35:51 2021 +0800 crypto: sl3516 - Fix build warning without CONFIG_PM drivers/crypto/gemini/sl3516-ce-core.c:345:12: warning: ‘sl3516_ce_pm_resume’ defined but not used [-Wunused-function] static int sl3516_ce_pm_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~ The driver needs PM, otherwise clock and resets are never set. So make it depends on PM to fix this warning. Signed-off-by: YueHaibing Suggested-by: LABBE Corentin Signed-off-by: Herbert Xu commit f873a4d650399ba5af20460f650fa7ea530cbf9e Author: Horia Geantă Date: Thu Jun 17 12:19:26 2021 +0300 MAINTAINERS: update caam crypto driver maintainers list Aymen steps down as caam maintainer, being replaced by Pankaj. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit b20d9a73a3b2a859d32ae569588557bc47c87a1e Author: Herbert Xu Date: Thu Jun 17 16:00:12 2021 +0800 crypto: nx - Fix numerous sparse byte-order warnings The nx driver started out its life as a BE-only driver. However, somewhere along the way LE support was partially added. This never seems to have been extended all the way but it does trigger numerous warnings during build. This patch fixes all those warnings, but it doesn't mean that the driver will work on LE. Signed-off-by: Herbert Xu commit 2a96726bd0ccde4f12b9b9a9f61f7b1ac5af7e10 Author: Herbert Xu Date: Thu Jun 17 15:57:12 2021 +0800 crypto: nx - Fix RCU warning in nx842_OF_upd_status The function nx842_OF_upd_status triggers a sparse RCU warning when it directly dereferences the RCU-protected devdata. This appears to be an accident as there was another variable of the same name that was passed in from the caller. After it was removed (because the main purpose of using it, to update the status member was itself removed) the global variable unintenionally stood in as its replacement. This patch restores the devdata parameter. Fixes: 90fd73f912f0 ("crypto: nx - remove pSeries NX 'status' field") Signed-off-by: Herbert Xu commit 5163ab505e489400b4738b2a5547ec83d2dff7bb Author: Herbert Xu Date: Thu Jun 17 15:28:10 2021 +0800 crypto: api - Move crypto attr definitions out of crypto.h The definitions for crypto_attr-related types and enums are not needed by most Crypto API users. This patch moves them out of crypto.h and into algapi.h/internal.h depending on the extent of their use. Signed-off-by: Herbert Xu commit 74c66120fda6596ad57f41e1607b3a5d51ca143d Author: Kees Cook Date: Wed Jun 16 13:34:59 2021 -0700 crypto: nx - Fix memcpy() over-reading in nonce Fix typo in memcpy() where size should be CTR_RFC3686_NONCE_SIZE. Fixes: 030f4e968741 ("crypto: nx - Fix reentrancy bugs") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit 84c2c729eabda52a2f6caa087d51f0d7420bca0c Author: Colin Ian King Date: Tue Jun 15 11:11:53 2021 +0100 crypto: hisilicon/sec - Fix spelling mistake "fallbcak" -> "fallback" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit d886d55f4c7345ea1628ecc49eaea3f496f8d3cb Author: Herbert Xu Date: Tue Jun 15 14:14:52 2021 +0800 crypto: sa2ul - Remove unused auth_len variable This patch removes the unused auth_len variable from sa_aead_dma_in_callback. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 533d87fbb82583d37e4af7bbab26d070523b48ee Author: kernel test robot Date: Tue Jun 15 09:31:03 2021 +0800 crypto: sl3516 - fix duplicated inclusion drivers/crypto/gemini/sl3516-ce-cipher.c: linux/io.h is included more than once. Generated by: scripts/checkincludes.pl Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Herbert Xu commit b17233d385d0b6b43ecf81d43008cb1bbb008166 Author: Stephane Grosjean Date: Wed Jun 23 16:26:00 2021 +0200 can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path Rather than just indicating that transmission can start, this patch requires the explicit flushing of the network TX queue when the driver is informed by the device that it can transmit, next to its configuration. In this way, if frames have already been written by the application, they will actually be transmitted. Fixes: ffd137f7043c ("can: peak/pcie_fd: remove useless code when interface starts") Link: https://lore.kernel.org/r/20210623142600.149904-1-s.grosjean@peak-system.com Cc: linux-stable Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit aaf473d0100f64abc88560e2bea905805bcf2a8e Author: Norbert Slusarek Date: Sun Jun 20 14:38:42 2021 +0200 can: j1939: j1939_sk_setsockopt(): prevent allocation of j1939 filter for optlen == 0 If optval != NULL and optlen == 0 are specified for SO_J1939_FILTER in j1939_sk_setsockopt(), memdup_sockptr() will return ZERO_PTR for 0 size allocation. The new filter will be mistakenly assigned ZERO_PTR. This patch checks for optlen != 0 and filter will be assigned NULL in case of optlen == 0. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/r/20210620123842.117975-1-nslusarek@gmx.net Signed-off-by: Norbert Slusarek Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 4ce8ad95f0afe927e9a29e7ad491274ebe3a8a7b Author: Olivier Langlois Date: Wed Jun 23 11:50:18 2021 -0700 io_uring: Create define to modify a SQPOLL parameter The magic number used to cap the number of entries extracted from an io_uring instance SQ before moving to the other instances is an interesting parameter to experiment with. A define has been created to make it easy to change its value from a single location. Signed-off-by: Olivier Langlois Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/b401640063e77ad3e9f921e09c9b3ac10a8bb923.1624473200.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit 997135017716c33f3405e86cca5da9567b40a08e Author: Olivier Langlois Date: Wed Jun 23 11:50:11 2021 -0700 io_uring: Fix race condition when sqp thread goes to sleep If an asynchronous completion happens before the task is preparing itself to wait and set its state to TASK_INTERRUPTIBLE, the completion will not wake up the sqp thread. Cc: stable@vger.kernel.org Signed-off-by: Olivier Langlois Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/d1419dc32ec6a97b453bee34dc03fa6a02797142.1624473200.git.olivier@trillion01.com Signed-off-by: Jens Axboe commit b62b189f7e2cfd1089b37be57b2e6672d5c3ae14 Merge: 2995b50376b99 01610a24cefa1 Author: Olof Johansson Date: Wed Jun 23 19:04:14 2021 -0700 Merge tag 'v5.14-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Basic support for the new rk3568 soc. * tag 'v5.14-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add basic dts for RK3568 EVB arm64: dts: rockchip: add core dtsi for RK3568 SoC arm64: dts: rockchip: add generic pinconfig settings used by most Rockchip socs Link: https://lore.kernel.org/r/4876354.ZzFAyJQhcr@diego Signed-off-by: Olof Johansson commit 048c958f12a223f154987ade94a702cc25fa0485 Merge: 3d6fe39ac6cc5 9600948a2e919 Author: Olof Johansson Date: Wed Jun 23 19:03:28 2021 -0700 Merge tag 'tee-reviewer-for-v5.13' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/fixes Add Sumit Garg as TEE reviewer * tag 'tee-reviewer-for-v5.13' of git://git.linaro.org:/people/jens.wiklander/linux-tee: MAINTAINERS: Add myself as TEE subsystem reviewer Link: https://lore.kernel.org/r/20210622130454.GA2196996@jade Signed-off-by: Olof Johansson commit 2995b50376b99672ebe0c3d1875d351a4bfbe077 Merge: c21cc3d892735 36e9534dfcb5b Author: Olof Johansson Date: Wed Jun 23 19:02:33 2021 -0700 Merge tag 'v5.14-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Nodes for the Hantro-based video codecs on rk3036, rk3066, rk3188 and rk322x. * tag 'v5.14-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add vpu and vdec node for RK322x ARM: dts: rockchip: add vpu nodes for RK3066 and RK3188 ARM: dts: rockchip: add vpu node for RK3036 Link: https://lore.kernel.org/r/4611716.rnzMqkiUVr@diego Signed-off-by: Olof Johansson commit e6adbcb7e2d71b0e0e0deb6f904783aeb79728be Merge: c8700d80d75e8 8ae030c34dce4 Author: Olof Johansson Date: Wed Jun 23 19:01:57 2021 -0700 Merge tag 'qcom-arm64-defconfig-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Additional Qualcomm ARM64 defconfig udpate for v5.14 The Qualcomm Robotics RB3 Development Kit has a Renesas USB HUB on one of the PCIe busses, which requires the releated driver to be enabled to provide functional Ethernet and additional USB host ports. * tag 'qcom-arm64-defconfig-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable renesas usb xhci pci host controller Link: https://lore.kernel.org/r/20210621165015.943060-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit c21cc3d8927350db675957bb44633eea9607da85 Merge: 73d1774e0f6e3 abe66bb7a2f6e Author: Olof Johansson Date: Wed Jun 23 19:01:39 2021 -0700 Merge tag 'qcom-arm64-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Additional Qualcomm ARM64 DT updates for v5.14 After a series of refactorings and additions to the SM8150 and SM8250 platform definitions, this adds new devicetree definitions for Sony Xperia 1, 5, 1II and 5II. It defines the Qualcomm SA8155p automotive platform as a derrivative of SM8150 and introduces the Automotive Deveopment Platform board. Lastly ipq8074 gains the definiton of an additiona I2C master and the SDHCI bus votes for sc7180 are tweaked. * tag 'qcom-arm64-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (25 commits) arm64: dts: ipq8074: Add QUP6 I2C node arm64: dts: qcom: sc7180: bus votes for eMMC and SD card arm64: dts: qcom: sm8250-edo: Add Samsung touchscreen arm64: dts: qcom: sm8250-edo: Enable GPI DMA arm64: dts: qcom: sm8250-edo: Enable ADSP/CDSP/SLPI arm64: dts: qcom: sm8250-edo: Enable PCIe arm64: dts: qcom: sm8250: Commonize PCIe pins arm64: dts: qcom: sm8250-edo: Add hardware keys arm64: dts: qcom: sa8155p-adp: Add base dts file arm64: dts: qcom: pmm8155au_2: Add base dts file arm64: dts: qcom: pmm8155au_1: Add base dts file arm64: dts: qcom: sm8250-edo: Fix up double "pinctrl-1" arm64: dts: qcom: sm8[12]50-pm8150: Move RESIN to pm8150 dtsi arm64: dts: qcom: sm8250: Add support for SONY Xperia 1 II / 5 II (Edo platform) arm64: dts: qcom: sm8250: Move gpio.h inclusion to SoC DTSI arm64: dts: qcom: sm8250: Add SDHCI2 sleep mode pinctrl arm64: dts: qcom: sm8150: Add support for SONY Xperia 1 / 5 (Kumano platform) arm64: dts: qcom: sm8150: Disable Adreno and modem by default arm64: dts: qcom: sm8250: Disable Adreno and Venus by default arm64: dts: qcom: sm8250: Add GPI DMA nodes ... Link: https://lore.kernel.org/r/20210621164946.942956-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 73d1774e0f6e3b6bee637b38ea0f2e722423f9fa Merge: f82c6e6dd1497 eb607cd4957fb Author: Olof Johansson Date: Wed Jun 23 19:00:04 2021 -0700 Merge tag 'v5.14-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt A lot of dt-yaml related fixes; PCIe, USB and pwm-fans for Helios64; Display rotation and audio codec for the Odroid Go Advance; IR, spdif and usb-c support for rk3399-firefly; USB support for rk3308 and some rk3328 boards and setting the PCIe link speed to actually only supported speed on rk3399. * tag 'v5.14-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (30 commits) arm64: dts: rockchip: Re-add regulator-always-on for vcc_sdio for rk3399-roc-pc arm64: dts: rockchip: Re-add regulator-boot-on, regulator-always-on for vdd_gpu on rk3399-roc-pc arm64: dts: rockchip: add ir-receiver for rk3399-roc-pc arm64: dts: rockchip: Add USB-C port details for rk3399 Firefly arm64: dts: rockchip: Sort rk3399 firefly pinmux entries arm64: dts: rockchip: add infrared receiver node to RK3399 Firefly arm64: dts: rockchip: add SPDIF node for rk3399-firefly arm64: dts: rockchip: Add Rotation Property for OGA Panel arm64: dts: rockchip: Add support for USB on helios64 arm64: dts: rockchip: add USB support to rk3308.dtsi arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 arm64: dts: rockchip: add rk817 codec to Odroid Go arm64: dts: rename grf-gpio nodename in rk3328.dtsi arm64: dts: rockchip: Add support for PCIe on helios64 arm64: dts: rockchip: Add support for two PWM fans on helios64 arm64: dts: rockchip: fix regulator-gpio states array arm64: dts: rockchip: add #power-domain-cells to power domain nodes arm64: dts: rockchip: Fix power-controller node names for rk3399 arm64: dts: rockchip: Fix power-controller node names for rk3328 arm64: dts: rockchip: Fix power-controller node names for px30 ... Link: https://lore.kernel.org/r/2796982.e9J7NaK4W3@phil Signed-off-by: Olof Johansson commit f82c6e6dd149757022ba3ed8502d56201652fb0f Merge: 43b3219861c7e 623ba75a5d6b8 Author: Olof Johansson Date: Wed Jun 23 18:58:56 2021 -0700 Merge tag 'v5.14-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt A lot of fixes related to the dt-binding yaml conversion, power-domain additions for rk322x and rk3036 and the missing mmc aliases move to board files on rk3066/rk3188. * tag 'v5.14-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add power controller for RK322x ARM: dts: rockchip: add power controller for RK3036 ARM: dts: rockchip: add labels to the timer nodes on rk3066a ARM: dts: rockchip: fix supply properties in io-domains nodes ARM: dts: rockchip: remove #phy-cells from usbphy node rk3066/rk3188 ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 ARM: dts: rockchip: move mmc aliases to board dts on rk3066/rk3188 ARM: dts: rockchip: move and restyle grf nodes rk3066/rk3188 ARM: dts: rockchip: rename vcc_stdby node name for rk3066a-rayeager.dts ARM: dts: rockchip: Remove more clock-names from PWM nodes ARM: dts: rockchip: add #power-domain-cells to power domain nodes ARM: dts: rockchip: Fix power-controller node names for rk3288 ARM: dts: rockchip: Fix power-controller node names for rk3188 ARM: dts: rockchip: Fix power-controller node names for rk3066a ARM: dts: rockchip: Remove useless interrupt-names on IOMMU node on rk3036 ARM: dts: rockchip: Fix IOMMU nodes properties on rk322x ARM: dts: rockchip: Fix the timer clocks order ARM: dts: rockchip: fix pinctrl sleep nodename for rk3036-kylin and rk3288 ARM: dts: rockchip: Fix thermal sensor cells o rk322x Link: https://lore.kernel.org/r/2084346.irdbgypaU6@phil Signed-off-by: Olof Johansson commit 2afd1c20e7547887f37f638d6b7953138d8c948e Merge: 115484216b07c fcafd31b5f535 Author: Olof Johansson Date: Wed Jun 23 18:58:26 2021 -0700 Merge tag 'v5.14-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/drivers Yaml conversion of grf, pmu and power-domain bindings, Power-domains for rk3568 + necessary plumbing, Fixes for the usbphy bindings. * tag 'v5.14-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml dt-bindings: soc: rockchip: convert grf.txt to YAML soc: rockchip: power-domain: add rk3568 powerdomains dt-bindings: power: rockchip: Add bindings for RK3568 Soc dt-bindings: power: rockchip: Convert to json-schema dt-bindings: arm: rockchip: add more compatible strings to pmu.yaml dt-bindings: arm: rockchip: convert pmu.txt to YAML soc: rockchip: power-domain: Add a meaningful power domain name dt-bindings: add power-domain header for RK3568 SoCs Link: https://lore.kernel.org/r/4647955.GXAFRqVoOG@phil Signed-off-by: Olof Johansson commit 43b3219861c7e38f7fca966779053ebba797362f Merge: 707472acca6d8 e3850467bf8c8 Author: Olof Johansson Date: Wed Jun 23 18:57:53 2021 -0700 Merge tag 'mvebu-dt64-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt64 for 5.14 (part 1) on Armada 3700: Move turris-mox-rwtm firmware node to a more generic place on AP807: Make SD/MMC controller still usbale with older kernel CP11x: update comphy references cn9130: Improve NAND partitioning scheme for cn9130-db * tag 'mvebu-dt64-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arch/arm64/boot/dts/marvell: fix NAND partitioning scheme Documentation/bindings: phy: update references to cp11x arm64: dts: ensure backward compatibility of the AP807 Xenon arm64: dts: marvell: armada-37xx: move firmware node to generic dtsi file Link: https://lore.kernel.org/r/878s3429zi.fsf@BL-laptop Signed-off-by: Olof Johansson commit 115484216b07c2753fcc6ddf3d8acdde8fdbd4fc Merge: 4014f3177b0a4 90ae47215de3f Author: Olof Johansson Date: Wed Jun 23 18:57:38 2021 -0700 Merge tag 'mvebu-drivers-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/drivers mvebu drivers for 5.14 (part 1) Make the turris mox rwtm firmware more generic for Armada 3700 SoCs * tag 'mvebu-drivers-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string Link: https://lore.kernel.org/r/87bl802a2d.fsf@BL-laptop Signed-off-by: Olof Johansson commit 4014f3177b0a49bcd0ad3d347f36b7a57150a556 Merge: 25da503ecce8f fae2016099226 Author: Olof Johansson Date: Wed Jun 23 18:57:21 2021 -0700 Merge tag 'mvebu-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/drivers mvebu fixes for 5.13 (part 1) Few fixes for the Turris Mox rWTM firmware found on the Armada 3700 SoCs. * tag 'mvebu-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: firmware: turris-mox-rwtm: show message about HWRNG registration firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng firmware: turris-mox-rwtm: report failures better firmware: turris-mox-rwtm: fix reply status decoding function Link: https://lore.kernel.org/r/87eecx0w6s.fsf@BL-laptop Signed-off-by: Olof Johansson commit 707472acca6d83aa0c1cba250c258c915cca48c9 Merge: e356dc4c088df d71abfcc6c050 Author: Olof Johansson Date: Wed Jun 23 18:49:10 2021 -0700 Merge tag 'ti-k3-dt-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/dt Devicetree changes for TI K3 platforms for v5.14 merge window: * New features: - AM64 gains PCIe and USB3 for am64-sk board, R5 remote proc (includes AM64 rproc bindings tag from Bjorn's tree) - AM65, J721e gains ICSSG MDIO nodes - AM65: UHS mode speed enabled on am65 * Fixes: - Fixups on AM64 SRAM model thanks to a ROM bug for USB DFU mode - Schema related cleanups across j7*, am65, 64 - Few misc Fixups on AM64 where MAC address could conflict; j7200 for USB2 Rx sensitivity etc. * tag 'ti-k3-dt-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (37 commits) arm64: dts: ti: k3-am642-evm/sk: Add DDR carveout memory nodes for R5Fs arm64: dts: ti: k3-am642-evm/sk: Add mailboxes to R5Fs arm64: dts: ti: k3-am64-main: Add MAIN domain R5F cluster nodes arm64: dts: ti: k3-am64-main: Update TF-A load address to workaround USB DFU limitation arm64: dts: ti: k3-am64-main: Reserve OCMRAM for DMSC-lite and secure proxy communication arm64: dts: ti: k3-am64-main: Update TF-A's maximum size and node name arm64: dts: ti: Drop reg-io-width/reg-shift from UART nodes arm64: dts: ti: k3-am642-evm: align ti,pindir-d0-out-d1-in property with dt-shema arm64: dts: ti: am65: align ti,pindir-d0-out-d1-in property with dt-shema arm64: dts: ti: k3-am642-main: fix ports mac properties arm64: dts: ti: iot2050: Configure r5f cluster on basic variant in split mode arm64: dts: ti: k3-am642-sk: Disable PCIe arm64: dts: ti: k3-am642-sk: Enable USB Super-Speed HOST port arm64: dts: ti: k3-am642-evm: Enable PCIe and SERDES arm64: dts: ti: k3-am64-main: Add PCIe DT node arm64: dts: ti: k3-am64-main: Add SERDES DT node arm64: dts: ti: k3-j721e-common-proc-board: Re-name "link" name as "phy" arm64: dts: ti: k3-j721e-common-proc-board: Use external clock for SERDES arm64: dts: ti: k3-j721e-main: Add #clock-cells property to serdes DT node arm64: dts: ti: k3-j721e-main: Fix external refclk input to SERDES ... Link: https://lore.kernel.org/r/20210619000150.6ooqnxxsnsvncs5u@pushchair Signed-off-by: Olof Johansson commit 95ef7152366382619e99c09a2c59a341f01ea29e Merge: 6b4670af9f49c 0da518dae87dd Author: Olof Johansson Date: Wed Jun 23 18:47:38 2021 -0700 Merge tag 'ixp4xx-arm-soc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/soc This is a major chunk of IXP4xx modernization: - Fist we move some registers around to make room for the predetermined PCI I/O space. - Then we add some Kconfig options to make it possible to use the old PCI driver in parallell with the new shiny one. - Then we add the new PCI driver and some bindings for it. - On top of this we add an (ages old) patch from Arnd that centralize the CPU/SoC detection in drivers/soc and make the header a standard Linux header to avoid the business in drivers. - Then we split out and modernize some platform data headers for pata, and hwrandom, and top it up with DT bindings and support for hwrandom. * tag 'ixp4xx-arm-soc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ixp4xx: fix spelling mistake in Kconfig "Devce" -> "Device" hw_random: ixp4xx: Add OF support hw_random: ixp4xx: Add DT bindings hw_random: ixp4xx: Turn into a module hw_random: ixp4xx: Use SPDX license tag hw_random: ixp4xx: enable compile-testing pata: ixp4xx: split platform data to its own header soc: ixp4xx: move cpu detection to linux/soc/ixp4xx/cpu.h PCI: ixp4xx: Add a new driver for IXP4xx PCI: ixp4xx: Add device tree bindings for IXP4xx ARM/ixp4xx: Make NEED_MACH_IO_H optional ARM/ixp4xx: Move the virtual IObases Link: https://lore.kernel.org/r/CACRpkdbw6HSpp7k6q1FYGmtafLmdAu8bFnpHQOdfBDYYsdLbkw@mail.gmail.com Signed-off-by: Olof Johansson commit e356dc4c088df44723e072a3bda9ee6a86f8c122 Merge: def0c98367eab 9b11fec7345f2 Author: Olof Johansson Date: Wed Jun 23 18:46:19 2021 -0700 Merge tag 'omap-for-v5.14/dt-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree binding clean-up for omaps for v5.14 Minor devicetree clean-up for omaps for the binding checks: - Drop unsupported dmas for omap2/3 i2c - Drop redundant ehrpwm compatible - Drop am33xx-ecap compatible no longer needed - Correct node names for ecap - Drop unsupported interrupts for ecap - Drop redundant ti,pcf8575 - Correct usage for ti,pindir-d0-out-d1-in * tag 'omap-for-v5.14/dt-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema ARM: dts: dra7x-evm: Drop "ti,pcf8575" ARM: dts: am33xx: Drop interrupt property from ecap nodes ARM: dts: ti: Fix node name for all ecap dt nodes ARM: dts: ti: Drop usage of ti,am33xx-ecap from DT nodes ARM: dts: ti: drop usage of redundant compatible ARM: dts: omap2/3: Drop dmas property from I2C node Link: https://lore.kernel.org/r/pull-1624002812-396117@atomide.com-2 Signed-off-by: Olof Johansson commit 6b4670af9f49c76f9be7f3ef2d1654dfee04a4de Merge: 777cf27fb2266 093a474ce10d8 Author: Olof Johansson Date: Wed Jun 23 18:45:21 2021 -0700 Merge tag 'omap-for-v5.14/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Non-urgent fixes for omaps for v5.14 merge window Warn and block suspend for am335x unless the PM related modules and firmware are loaded and warn otherwise. Otherwise we easily end up with a suspended system with nothing capable of waking it up. We also drop a duplicated prototype for am33xx_init_early(). * tag 'omap-for-v5.14/fixes-not-urgent-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Block suspend for am3 and am4 if PM is not configured ARM: OMAP2+: remove duplicated prototype ARM: dts: dra7: Fix duplicate USB4 target module node ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power bus: ti-sysc: Fix flakey idling of uarts and stop using swsup_sidle_act bus: ti-sysc: Fix am335x resume hang for usb otg module ARM: OMAP2+: Fix build warning when mmc_omap is not built ARM: OMAP1: isp1301-omap: Add missing gpiod_add_lookup_table function ARM: OMAP1: Fix use of possibly uninitialized irq variable bus: ti-sysc: Fix missing quirk flags for sata Link: https://lore.kernel.org/r/pull-1624002812-396117@atomide.com Signed-off-by: Olof Johansson commit 3d6fe39ac6cc596d50ff031acdf69434fad64049 Merge: f2a4ba9ec23b7 78b4b165280d3 Author: Olof Johansson Date: Wed Jun 23 18:44:45 2021 -0700 Merge tag 'omap-for-v5.13/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fix duplicate usb4 regression for dra74 variants USB4 is only present in DRA74x variants, and I managed to add it for the other variants too with the recent legacy platform data removal. * tag 'omap-for-v5.13/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: dra7: Fix duplicate USB4 target module node Link: https://lore.kernel.org/r/pull-1623999845-180025@atomide.com Signed-off-by: Olof Johansson commit def0c98367eabeed058980abb591d5ddf0c9e70b Merge: 79eb3cbf02d4a e3211e414d26c Author: Olof Johansson Date: Wed Jun 23 18:44:05 2021 -0700 Merge tag 'hisi-arm64-dt-for-5.14' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: HiSilicon ARM64 DT updates for 5.14 - Correct the HiSilicon copyright * tag 'hisi-arm64-dt-for-5.14' of git://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: use the correct HiSilicon copyright Link: https://lore.kernel.org/r/60CBF4AE.7040301@hisilicon.com Signed-off-by: Olof Johansson commit 79eb3cbf02d4a46c08b811da7e88e51948c4eda0 Merge: 9be389934dc5f da1eab9e15ef9 Author: Olof Johansson Date: Wed Jun 23 18:35:15 2021 -0700 Merge tag 'hisi-arm32-dt-for-5.14' of git://github.com/hisilicon/linux-hisi into arm/dt ARM: DT: HiSilicon ARM32 DT updates for 5.14 - Correct the HiSilicon copyright * tag 'hisi-arm32-dt-for-5.14' of git://github.com/hisilicon/linux-hisi: ARM: dts: hisilicon: use the correct HiSilicon copyright Link: https://lore.kernel.org/r/60CBF408.7040302@hisilicon.com Signed-off-by: Olof Johansson commit 8c37d01e1a86073d15ea7084390fba58d9a1665f Author: Chanwoo Choi Date: Thu Jun 17 15:05:43 2021 +0900 PM / devfreq: passive: Fix get_target_freq when not using required-opp The 86ad9a24f21e ("PM / devfreq: Add required OPPs support to passive governor") supported the required-opp property for using devfreq passive governor. But, 86ad9a24f21e has caused the problem on use-case when required-opp is not used such as exynos-bus.c devfreq driver. So that fix the get_target_freq of passive governor for supporting the case of when required-opp is not used. Fixes: 86ad9a24f21e ("PM / devfreq: Add required OPPs support to passive governor") Signed-off-by: Chanwoo Choi commit 4896df9d53ae5521f3ce83751e828ad70bc65c80 Author: Dave Hansen Date: Mon Jun 21 12:05:56 2021 -0700 selftests/sgx: remove checks for file execute permissions The SGX selftests can fail for a bunch of non-obvious reasons like 'noexec' permissions on /dev (which is the default *EVERYWHERE* it seems). A new test mistakenly also looked for +x permission on the /dev/sgx_enclave. File execute permissions really only apply to the ability of execve() to work on a file, *NOT* on the ability for an application to map the file with PROT_EXEC. SGX needs to mmap(PROT_EXEC), but doesn't need to execve() the device file. Remove the check. Fixes: 4284f7acb78b ("selftests/sgx: Improve error detection and messages") Reported-by: Tim Gardner Cc: Jarkko Sakkinen Cc: Reinette Chatre Cc: Dave Hansen Cc: Shuah Khan Cc: linux-sgx@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Reinette Chatre Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit 162004a2f7ef5c77600e364dc4e9315b0e6ca386 Author: Steve French Date: Wed Jun 23 19:32:24 2021 -0500 cifs: missing null pointer check in cifs_mount We weren't checking if tcon is null before setting dfs path, although we check for null tcon in an earlier assignment statement. Addresses-Coverity: 1476411 ("Dereference after null check") Signed-off-by: Steve French commit 07b60713b57a8f952d029a2b6849d003d9c16108 Author: Krzysztof Kozlowski Date: Wed Jun 23 15:43:15 2021 +0200 selftests/ftrace: fix event-no-pid on 1-core machine When running event-no-pid test on small machines (e.g. cloud 1-core instance), other events might not happen: + cat trace + cnt=0 + [ 0 -eq 0 ] + fail No other events were recorded [15] event tracing - restricts events based on pid notrace filtering [FAIL] Schedule a simple sleep task to be sure that some other process events get recorded. Fixes: ebed9628f5c2 ("selftests/ftrace: Add test to test new set_event_notrace_pid file") Signed-off-by: Krzysztof Kozlowski Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan commit a5628263a9f8d47d9a1548fe9d5d75ba4423a735 Author: Steve French Date: Tue Jun 22 17:54:50 2021 -0500 smb3: fix possible access to uninitialized pointer to DACL dacl_ptr can be null so we must check for it everywhere it is used in build_sec_desc. Addresses-Coverity: 1475598 ("Explicit null dereference") Signed-off-by: Steve French commit 0917310b984c1ac24da2be0ebe992539b9ba94ed Author: Steve French Date: Tue Jun 22 19:53:08 2021 -0500 cifs: missing null check for newinode pointer in cifs_do_create we check if newinode is valid before referencing it but are missing the check in one place in fs/cifs/dir.c Addresses-Coverity: 1357292 ("Dereference after null check") Acked-by: Sachin Prabhu Signed-off-by: Steve French commit 8a5124c0f33c65a0d94aacac8294e90a87ecf3f6 Author: David Gow Date: Fri May 21 21:42:41 2021 -0700 kunit: Remove the unused all_tests.config This isn't used anywhere. While it's possible that people were manually referencing it, the new default config (in default.config in the same path) provides equivalent functionality. Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit d9d6b8225e7319fde69b1aa59c3bb66d501f3845 Author: David Gow Date: Fri May 21 21:42:40 2021 -0700 kunit: Move default config from arch/um -> tools/testing/kunit The default .kunitconfig file is currently kept in arch/um/configs/kunit_defconfig, but -- with the impending QEMU patch -- will no-longer be exclusively used for UML-based kernels. Move it alongside the other KUnit configs in tools/testing/kunit/configs, and give it a name which matches the existing all_tests.config and broken_on_uml.config files. Also update the Getting Started documentation to point to the new file. Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit b0841b51cac92cc1d2aa15a67a86eb026eabbb46 Author: David Gow Date: Fri May 21 21:42:39 2021 -0700 kunit: arch/um/configs: Enable KUNIT_ALL_TESTS by default Make the default .kunitconfig (specified in arch/um/configs/kunit_defconfig) specify CONFIG_KUNIT_ALL_TESTS by default. KUNIT_ALL_TESTS runs all tests which have satisfied dependencies in the current .config (which would be the architecture defconfig). Currently, the default .kunitconfig enables only the example tests and KUnit's own tests. While this does provide a good example of what a .kunitconfig for running a few individual tests should look like, it does mean that kunit_tool runs a pretty paltry collection of tests by default. The example tests' config entry (CONFIG_KUNIT_EXAMPLE_TEST=y) continues to be included -- despite now being redundant -- to provide an example of how tests are enabled when KUNIT_ALL_TESTS is disabled. A default run of ./tools/testing/kunit/kunit.py run now runs 70 tests instead of 14. Signed-off-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 44acdbb250a57240ec113f12bd6229854681ea5f Author: David Gow Date: Thu May 13 13:03:50 2021 -0700 kunit: Add gnu_printf specifiers Some KUnit functions use variable arguments to implement a printf-like format string. Use the __printf() attribute to let the compiler warn if invalid format strings are passed in. If the kernel is build with W=1, it complained about the lack of these specifiers, e.g.: ../lib/kunit/test.c:72:2: warning: function ‘kunit_log_append’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Signed-off-by: David Gow Reviewed-by: Daniel Latypov Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit 7b97174cc93fadb055258f4f8f3b964e9968e59f Author: Linus Walleij Date: Mon Jun 14 01:16:47 2021 +0200 leds: lgm: Fix up includes This driver is including the legacy GPIO header but the only thing it is using from that header is the wrong define for GPIOF_DIR_OUT. Fix it up by using GPIO_LINE_DIRECTION_OUT and including the correct consumer and driver headers. Cc: Amireddy Mallikarjuna reddy Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit ee78b9360e14c276f5ceaa4a0d06f790f04ccdad Author: Christophe JAILLET Date: Fri May 21 13:21:01 2021 +0200 leds: ktd2692: Fix an error handling path In 'ktd2692_parse_dt()', if an error occurs after a successful 'regulator_enable()' call, we should call 'regulator_enable()'. This is the same in 'ktd2692_probe()', if an error occurs after a successful 'ktd2692_parse_dt()' call. Instead of adding 'regulator_enable()' in several places, implement a resource managed solution and simplify the remove function accordingly. Fixes: b7da8c5c725c ("leds: Add ktd2692 flash LED driver") Signed-off-by: Christophe JAILLET Signed-off-by: Pavel Machek commit 35713d9b8f090d7a226e4aaeeb742265cde33c82 Merge: a2f7dc00ea51a a3e5e5797faad Author: David S. Miller Date: Wed Jun 23 15:46:25 2021 -0700 Merge branch 'devlink-rate-limit-fixes' Dmytro Linkin says: ==================== Fixes for devlink rate objects API Patch #1 fixes not decreased refcount of parent node for destroyed leaf object. Patch #2 fixes incorect eswitch mode check. Patch #3 protects list traversing with a lock. ==================== Signed-off-by: David S. Miller commit a3e5e5797faad0db319d106afaa31b9020fac44f Author: Dmytro Linkin Date: Wed Jun 23 16:43:15 2021 +0300 devlink: Protect rate list with lock while switching modes Devlink eswitch set command doesn't hold devlink->lock, which makes possible race condition between rate list traversing and others devlink rate KAPI calls, like devlink_rate_nodes_destroy(). Hold devlink lock while traversing the list. Fixes: a8ecb93ef03d ("devlink: Introduce rate nodes") Signed-off-by: Dmytro Linkin Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ff99324ded0176d28c3d8de7cac44580cf79d52a Author: Dmytro Linkin Date: Wed Jun 23 16:43:14 2021 +0300 devlink: Remove eswitch mode check for mode set call When eswitch is disabled, querying its current mode results in error. Due to this when trying to set the eswitch mode for mlx5 devices, it fails to set the eswitch switchdev mode. Hence remove such check. Fixes: a8ecb93ef03d ("devlink: Introduce rate nodes") Signed-off-by: Dmytro Linkin Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 1321ed5e76488cfd7a5d3ee83254be9b7c1cc581 Author: Dmytro Linkin Date: Wed Jun 23 16:43:13 2021 +0300 devlink: Decrease refcnt of parent rate object on leaf destroy Port functions, like SFs, can be deleted by the user when its leaf rate object has parent node. In such case node refcnt won't be decreased which blocks the node from deletion later. Do simple refcnt decrease, since driver in cleanup stage. This: 1) assumes that driver took proper internal parent unset action; 2) allows to avoid nested callbacks call and deadlock. Fixes: d75559845078 ("devlink: Allow setting parent node of rate objects") Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 255ede3b129041eae4edfdce121cedbfabfdd30e Author: David Gow Date: Thu May 13 12:32:04 2021 -0700 lib/cmdline_kunit: Remove a cast which are no-longer required With some of the stricter type checking in KUnit's EXPECT macros removed, a cast in cmdline_kunit is no longer required. Remove the unnecessary cast, using NULL instead of (int *) to make it clearer. Signed-off-by: David Gow Acked-by: Andy Shevchenko Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 388ca2e024dd5e6fa9eb5eafa56bd33707bcd594 Author: David Gow Date: Thu May 13 12:32:02 2021 -0700 kernel/sysctl-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 sysctl-test are no longer required. Remove the unnecessary casts, making the conditions clearer. Signed-off-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 8f0877c26e4b695f824c5dbcc4b964ce238328aa Author: David Gow Date: Thu May 13 12:32:01 2021 -0700 thunderbolt: 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 the thunderbolt KUnit tests are no longer required. Remove the unnecessary casts, making the conditions clearer. Signed-off-by: David Gow Acked-by: Mika Westerberg Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 97847240c0d5f7d5878b1c2b9f28bbd3fcae4eee Author: David Gow Date: Thu May 13 12:32:00 2021 -0700 mmc: sdhci-of-aspeed: Remove some unnecessary casts from KUnit tests With KUnit's EXPECT macros no longer typechecking arguments as strictly, get rid of a number of now unnecessary casts. Signed-off-by: David Gow Acked-by: Andrew Jeffery Acked-by: Ulf Hansson Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 28dce2c4a83d6e34936ba8d5c3ee780861460100 Author: David Gow Date: Thu May 13 12:31:59 2021 -0700 iio: Remove a cast in iio-test-format which is no longer required KUnit's EXPECT macros no longer typecheck as stringently, so casting the result of strcmp() is now unnecessary. Signed-off-by: David Gow Reviewed-by: Brendan Higgins Acked-by: Jonathan Cameron Signed-off-by: Shuah Khan commit 6d2e97894b67778109679443008c2d063787540e Author: David Gow Date: Thu May 13 12:31:58 2021 -0700 device property: Remove some casts in property-entry-test With some of the stricter type checking in KUnit's EXPECT macros removed, several casts in property-entry-test are no longer required. Remove the unnecessary casts, making the conditions clearer. Signed-off-by: David Gow Acked-by: Greg Kroah-Hartman Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 99a8e899fab95be3e6b66edf7b303a58f6997be4 Author: David Gow Date: Thu May 13 12:31:57 2021 -0700 Documentation: kunit: Clean up some string casts in examples As the type checking is no longer excessively strict, get rid of the unsightly (char*) casts -- and comment discussing them -- from the KUnit usage page. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit 3747b5c0d8ec8b03b0856e29241949baa0e67803 Author: David Gow Date: Thu May 13 12:31:56 2021 -0700 kunit: Assign strings to 'const char*' in STREQ assertions Currently, the KUNIT_EXPECT_STREQ() and related macros assign both string arguments to variables of their own type (via typeof()). This seems to be to prevent the macro argument from being evaluated multiple times. However, this doesn't work if one of these is a fixed-length character array, rather than a character pointer, as (for example) char[16] will always allocate a new string. By always using 'const char*' (the type strcmp expects), we're always just taking a pointer to the string, which works even with character arrays. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 6e62dfa6d14f8fd2b07ad30b8a1c597d40d36ac1 Author: David Gow Date: Thu May 13 12:31:55 2021 -0700 kunit: Do not typecheck binary assertions The use of typecheck() in KUNIT_EXPECT_EQ() and friends is causing more problems than I think it's worth. Things like enums need to have their values explicitly cast, and literals all need to be very precisely typed, else a large warning will be printed. While typechecking does have its uses, the additional overhead of having lots of needless casts -- combined with the awkward error messages which don't mention which types are involved -- makes tests less readable and more difficult to write. By removing the typecheck() call, the two arguments still need to be of compatible types, but don't need to be of exactly the same time, which seems a less confusing and more useful compromise. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit b322a50d17ede5cff6622040f345228afecdcc45 Merge: 334200bf52f06 8fe44c080a53a Author: Dave Airlie Date: Thu Jun 24 07:57:40 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-06-22-1' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-06-22-1: amdgpu: - Userptr BO fixes - RAS fixes - Beige Goby fixes - Add some missing freesync documentation - Aldebaran fixes - SR-IOV fixes - Potential memory corruption fix in framebuffer handling - Revert GFX9, 10 doorbell fixes, we just end up trading one bug for another - Multi-plane cursor fixes with rotation - LTTPR fixes - Backlight fixes - eDP fix - Fold DRM_AMD_DC_DCN3_1 into DRM_AMD_DC_DCN - Misc code cleanups amdkfd: - Topology fix - Locking fix radeon: - Misc code cleanup Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210622210345.27297-1-alexander.deucher@amd.com commit 6f9866a166cd1ad3ebb2dcdb3874aa8fee8dea2f Author: Thomas Gleixner Date: Wed Jun 23 14:02:32 2021 +0200 x86/fpu/signal: Let xrstor handle the features to init There is no reason to do an extra XRSTOR from init_fpstate for feature bits which have been cleared by user space in the FX magic xfeatures storage. Just clear them in the task's XSTATE header and do a full restore which will put these cleared features into init state. There is no real difference in performance because the current code already does a full restore when the xfeatures bits are preserved as the signal frame setup has stored them, which is the full UABI feature set. [ bp: Use the negated mxcsr_feature_mask in the MXCSR check. ] Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.804115017@linutronix.de commit 334200bf52f0637a5ab8331c557dfcecbb9c30fa Merge: 61c0cb8ae7943 e88bbc91849b2 Author: Dave Airlie Date: Thu Jun 24 07:15:17 2021 +1000 Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next * devcoredump support for display errors * dpu: irq cleanup/refactor * dpu: dt bindings conversion to yaml * dsi: dt bindings conversion to yaml * mdp5: alpha/blend_mode/zpos support * a6xx: cached coherent buffer support * a660 support * gpu iova fault improvements: - info about which block triggered the fault, etc - generation of gpu devcoredump on fault * assortment of other cleanups and fixes Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGs4=qsGBBbyn-4JWqW4-YUSTKh67X3DsPQ=T2D9aXKqNA@mail.gmail.com commit c2f5c57d99debf471a1b263cdf227e55f1364e95 Merge: bcc3f2a829b9e 7506d211b9328 Author: David S. Miller Date: Wed Jun 23 14:12:14 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-06-23 The following pull-request contains BPF updates for your *net* tree. We've added 14 non-merge commits during the last 6 day(s) which contain a total of 13 files changed, 137 insertions(+), 64 deletions(-). Note that when you merge net into net-next, there is a small merge conflict between 9f2470fbc4cb ("skmsg: Improve udp_bpf_recvmsg() accuracy") from bpf with c49661aa6f70 ("skmsg: Remove unused parameters of sk_msg_wait_data()") from net-next. Resolution is to: i) net/ipv4/udp_bpf.c: take udp_msg_wait_data() and remove err parameter from the function, ii) net/ipv4/tcp_bpf.c: take tcp_msg_wait_data() and remove err parameter from the function, iii) for net/core/skmsg.c and include/linux/skmsg.h: remove the sk_msg_wait_data() implementation and its prototype in header. The main changes are: 1) Fix BPF poke descriptor adjustments after insn rewrite, from John Fastabend. 2) Fix regression when using BPF_OBJ_GET with non-O_RDWR flags, from Maciej Żenczykowski. 3) Various bug and error handling fixes for UDP-related sock_map, from Cong Wang. 4) Fix patching of vmlinux BTF IDs with correct endianness, from Tony Ambardar. 5) Two fixes for TX descriptor validation in AF_XDP, from Magnus Karlsson. 6) Fix overflow in size calculation for bpf_map_area_alloc(), from Bui Quang Minh. ==================== Signed-off-by: David S. Miller commit e88bbc91849b2bf57683119c339e52916d34433f Author: Rob Clark Date: Wed Jun 23 14:06:20 2021 -0700 Revert "drm/msm/mdp5: provide dynamic bandwidth management" This reverts commit c1d12c19efd91b9cda5472bc4ec48854e67c24a8. Breaks armv7 build ERROR: modpost: "__aeabi_ldivmod" [drivers/gpu/drm/msm/msm.ko] undefined! Signed-off-by: Rob Clark commit bcc3f2a829b9edbe3da5fb117ee5a63686d31834 Author: Eric Dumazet Date: Wed Jun 23 08:27:00 2021 -0700 ipv6: exthdrs: do not blindly use init_net I see no reason why max_dst_opts_cnt and max_hbh_opts_cnt are fetched from the initial net namespace. The other sysctls (max_dst_opts_len & max_hbh_opts_len) are in fact already using the current ns. Note: it is not clear why ipv6_destopt_rcv() use two ways to get to the netns : 1) dev_net(dst->dev) Originally used to increment IPSTATS_MIB_INHDRERRORS 2) dev_net(skb->dev) Tom used this variant in his patch. Maybe this calls to use ipv6_skb_net() instead ? Fixes: 47d3d7ac656a ("ipv6: Implement limits on Hop-by-Hop and Destination options") Signed-off-by: Eric Dumazet Cc: Tom Herbert Cc: Coco Li Signed-off-by: David S. Miller commit a2f7dc00ea51a9dbb7c5b4ca8e508acb24f7ca8c Author: Xianting Tian Date: Wed Jun 23 11:16:22 2021 -0400 virtio_net: Use virtio_find_vqs_ctx() helper virtio_find_vqs_ctx() is defined but never be called currently, it is the right place to use it. Signed-off-by: Xianting Tian Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 10ed7ce42b13790ba85f8e10110d89a2bce58807 Author: Kuniyuki Iwashima Date: Wed Jun 23 15:06:34 2021 +0900 net/tls: Remove the __TLS_DEC_STATS() macro. The commit d26b698dd3cd ("net/tls: add skeleton of MIB statistics") introduced __TLS_DEC_STATS(), but it is not used and __SNMP_DEC_STATS() is not defined also. Let's remove it. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit b2ac9800cfe0f8da16abc4e74e003440361c112e Author: Jian-Hong Pan Date: Wed Jun 23 11:28:03 2021 +0800 net: bcmgenet: Fix attaching to PYH failed on RPi 4B The Broadcom UniMAC MDIO bus from mdio-bcm-unimac module comes too late. So, GENET cannot find the ethernet PHY on UniMAC MDIO bus. This leads GENET fail to attach the PHY as following log: bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000 ... could not attach to PHY bcmgenet fd580000.ethernet eth0: failed to connect to PHY uart-pl011 fe201000.serial: no DMA platform data libphy: bcmgenet MII bus: probed ... unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus This patch adds the soft dependency to load mdio-bcm-unimac module before genet module to avoid the issue. Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=213485 Signed-off-by: Jian-Hong Pan Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 4d293fe1c69c157c15ac06918a805e5fef036682 Author: Di Zhu Date: Wed Jun 23 11:21:08 2021 +0800 bonding: allow nesting of bonding device The commit 3c9ef511b9fa ("bonding: avoid adding slave device with IFF_MASTER flag") fix a crash when add slave device with IFF_MASTER, but it rejects the scenario of nested bonding device. As Eric Dumazet described: since there indeed is a usage scenario about nesting bonding, we should not break it. So we add a new judgment condition to allow nesting of bonding device. Fixes: 3c9ef511b9fa ("bonding: avoid adding slave device with IFF_MASTER flag") Suggested-by: Jay Vosburgh Signed-off-by: Di Zhu Signed-off-by: David S. Miller commit 2ec73ece4efd818536519f1c5908017122d2e7b5 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:17 2021 +0200 docs: dev-tools: kunit: don't use a table for docs name We'll be replacing :doc:`foo` references to Documentation/foo.rst. Yet, here it happens inside a table. Doing a search-and-replace would break it. Yet, as there's no good reason to use a table there, let's just convert it into a list. Reviewed-by: David Gow Acked-by: Brendan Higgins Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Shuah Khan commit 96a30960a2c5246c8ffebe8a3c9031f9df094d97 Author: Zhen Lei Date: Sat May 15 11:06:46 2021 +0800 leds: as3645a: Fix error return code in as3645a_parse_node() Return error code -ENODEV rather than '0' when the indicator node can not be found. Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver") Reported-by: Hulk Robot Acked-by: Sakari Ailus Signed-off-by: Zhen Lei Signed-off-by: Pavel Machek commit 9d0150db97583cfbb6b44cbe02241a1a48f90210 Author: Zou Wei Date: Wed May 12 14:49:18 2021 +0800 leds: turris-omnia: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Pavel Machek commit a5d3d1adc95f4ac5968b7a77ee95a3abbbb96f49 Author: Doug Zobel Date: Mon May 10 15:40:00 2021 -0500 leds: lp55xx: Initialize enable GPIO direction to output The "Convert to use GPIO descriptors" commit changed the initialization of the enable GPIO from GPIOF_DIR_OUT to GPIOD_ASIS. This breaks systems where the GPIO does not default to output. Changing the enable initialization to GPIOD_OUT_LOW. Signed-off-by: Doug Zobel Signed-off-by: Pavel Machek commit 55d444b310c64b084dcc62ba3e4dc3862269fb96 Author: Kuniyuki Iwashima Date: Wed Jun 23 08:35:29 2021 +0900 tcp: Add stats for socket migration. This commit adds two stats for the socket migration feature to evaluate the effectiveness: LINUX_MIB_TCPMIGRATEREQ(SUCCESS|FAILURE). If the migration fails because of the own_req race in receiving ACK and sending SYN+ACK paths, we do not increment the failure stat. Then another CPU is responsible for the req. Link: https://lore.kernel.org/bpf/CAK6E8=cgFKuGecTzSCSQ8z3YJ_163C0uwO9yRvfDSE7vOe9mJA@mail.gmail.com/ Suggested-by: Yuchung Cheng Signed-off-by: Kuniyuki Iwashima Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit 7525de2516fba8661bdea409718708c711c5d5e1 Author: David Wilder Date: Tue Jun 22 14:52:15 2021 -0700 ibmveth: Set CHECKSUM_PARTIAL if NULL TCP CSUM. TCP checksums on received packets may be set to NULL by the sender if CSO is enabled. The hypervisor flags these packets as check-sum-ok and the skb is then flagged CHECKSUM_UNNECESSARY. If these packets are then forwarded the sender will not request CSO due to the CHECKSUM_UNNECESSARY flag. The result is a TCP packet sent with a bad checksum. This change sets up CHECKSUM_PARTIAL on these packets causing the sender to correctly request CSUM offload. Signed-off-by: David Wilder Reviewed-by: Pradeep Satyanarayana Tested-by: Cristobal Forno Signed-off-by: David S. Miller commit fe87797bf245946e9d07e4a9ca1cd92f48a410d6 Merge: a7b62112f0abf f1267798c9809 Author: David S. Miller Date: Wed Jun 23 12:48:07 2021 -0700 Merge tag 'mlx5-net-next-2021-06-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-net-next-2021-06-22 1) Various minor cleanups and fixes from net-next branch 2) Optimize mlx5 feature check on tx and a fix to allow Vxlan with Ipsec offloads ==================== Signed-off-by: David S. Miller commit 7c2becf7968bda70c457565d42d06f76251edefe Merge: f4b29d2ee903f dd72fadf2186f Author: David S. Miller Date: Wed Jun 23 12:34:15 2021 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2021-06-23 1) Don't return a mtu smaller than 1280 on IPv6 pmtu discovery. From Sabrina Dubroca 2) Fix seqcount rcu-read side in xfrm_policy_lookup_bytype for the PREEMPT_RT case. From Varad Gautam. 3) Remove a repeated declaration of xfrm_parse_spi. From Shaokun Zhang. 4) IPv4 beet mode can't handle fragments, but IPv6 does. commit 68dc022d04eb ("xfrm: BEET mode doesn't support fragments for inner packets") handled IPv4 and IPv6 the same way. Relax the check for IPv6 because fragments are possible here. From Xin Long. 5) Memory allocation failures are not reported for XFRMA_ENCAP and XFRMA_COADDR in xfrm_state_construct. Fix this by moving both cases in front of the function. 6) Fix a missing initialization in the xfrm offload fallback fail case for bonding devices. From Ayush Sawal. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit a7b62112f0abf58a7f6d2bdfef40b637a4a1c4d4 Merge: 0a36a75c68188 24610ed80df65 Author: David S. Miller Date: Wed Jun 23 12:31:28 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Skip non-SCTP packets in the new SCTP chunk support for nft_exthdr, from Phil Sutter. 2) Simplify TCP option sanity check for TCP packets, also from Phil. 3) Add a new expression to store when the rule has been used last time. 4) Pass the hook state object to log function, from Florian Westphal. 5) Document the new sysctl knobs to tune the flowtable timeouts, from Oz Shlomo. 6) Fix snprintf error check in the new nfnetlink_hook infrastructure, from Dan Carpenter. ==================== Signed-off-by: David S. Miller commit 0a36a75c6818800c67057458376e99b5f77c2a1f Author: Andrea Righi Date: Tue Jun 22 09:46:48 2021 +0200 selftests: icmp_redirect: support expected failures According to a comment in commit 99513cfa16c6 ("selftest: Fixes for icmp_redirect test") the test "IPv6: mtu exception plus redirect" is expected to fail, because of a bug in the IPv6 logic that hasn't been fixed yet apparently. We should probably consider this failure as an "expected failure", therefore change the script to return XFAIL for that particular test and also report the total amount of expected failures at the end of the run. Signed-off-by: Andrea Righi Signed-off-by: David S. Miller commit e940eb3c1ba8202a73004e6af62508cb9fbb9a0b Merge: 38f75922a6905 d3e0f57501bde Author: David S. Miller Date: Wed Jun 23 12:17:35 2021 -0700 Merge branch 'lockless-qdisc-opts' Yunsheng Lin says: ==================== Some optimization for lockless qdisc Patch 1: remove unnecessary seqcount operation. Patch 2: implement TCQ_F_CAN_BYPASS. Patch 3: remove qdisc->empty. Performance data for pktgen in queue_xmit mode + dummy netdev with pfifo_fast: threads unpatched patched delta 1 2.60Mpps 3.21Mpps +23% 2 3.84Mpps 5.56Mpps +44% 4 5.52Mpps 5.58Mpps +1% 8 2.77Mpps 2.76Mpps -0.3% 16 2.24Mpps 2.23Mpps -0.4% Performance for IP forward testing: 1.05Mpps increases to 1.16Mpps, about 10% improvement. V3: Add 'Acked-by' from Jakub and 'Tested-by' from Vladimir, and resend based on latest net-next. V2: Adjust the comment and commit log according to discussion in V1. V1: Drop RFC tag, add nolock_qdisc_is_empty() and do the qdisc empty checking without the protection of qdisc->seqlock to aviod doing unnecessary spin_trylock() for contention case. RFC v4: Use STATE_MISSED and STATE_DRAINING to indicate non-empty qdisc, and add patch 1 and 3. ==================== Signed-off-by: David S. Miller commit d3e0f57501bde8a9585aff79afcffd99e6a5d91c Author: Yunsheng Lin Date: Tue Jun 22 14:49:57 2021 +0800 net: sched: remove qdisc->empty for lockless qdisc As MISSED and DRAINING state are used to indicate a non-empty qdisc, qdisc->empty is not longer needed, so remove it. Acked-by: Jakub Kicinski Tested-by: Vladimir Oltean # flexcan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit c4fef01ba4793a85b2d38a472bddd1e3b56d9585 Author: Yunsheng Lin Date: Tue Jun 22 14:49:56 2021 +0800 net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc Currently pfifo_fast has both TCQ_F_CAN_BYPASS and TCQ_F_NOLOCK flag set, but queue discipline by-pass does not work for lockless qdisc because skb is always enqueued to qdisc even when the qdisc is empty, see __dev_xmit_skb(). This patch calls sch_direct_xmit() to transmit the skb directly to the driver for empty lockless qdisc, which aviod enqueuing and dequeuing operation. As qdisc->empty is not reliable to indicate a empty qdisc because there is a time window between enqueuing and setting qdisc->empty. So we use the MISSED state added in commit a90c57f2cedd ("net: sched: fix packet stuck problem for lockless qdisc"), which indicate there is lock contention, suggesting that it is better not to do the qdisc bypass in order to avoid packet out of order problem. In order to make MISSED state reliable to indicate a empty qdisc, we need to ensure that testing and clearing of MISSED state is within the protection of qdisc->seqlock, only setting MISSED state can be done without the protection of qdisc->seqlock. A MISSED state testing is added without the protection of qdisc->seqlock to aviod doing unnecessary spin_trylock() for contention case. As the enqueuing is not within the protection of qdisc->seqlock, there is still a potential data race as mentioned by Jakub [1]: thread1 thread2 thread3 qdisc_run_begin() # true qdisc_run_begin(q) set(MISSED) pfifo_fast_dequeue clear(MISSED) # recheck the queue qdisc_run_end() enqueue skb1 qdisc empty # true qdisc_run_begin() # true sch_direct_xmit() # skb2 qdisc_run_begin() set(MISSED) When above happens, skb1 enqueued by thread2 is transmited after skb2 is transmited by thread3 because MISSED state setting and enqueuing is not under the qdisc->seqlock. If qdisc bypass is disabled, skb1 has better chance to be transmited quicker than skb2. This patch does not take care of the above data race, because we view this as similar as below: Even at the same time CPU1 and CPU2 write the skb to two socket which both heading to the same qdisc, there is no guarantee that which skb will hit the qdisc first, because there is a lot of factor like interrupt/softirq/cache miss/scheduling afffecting that. There are below cases that need special handling: 1. When MISSED state is cleared before another round of dequeuing in pfifo_fast_dequeue(), and __qdisc_run() might not be able to dequeue all skb in one round and call __netif_schedule(), which might result in a non-empty qdisc without MISSED set. In order to avoid this, the MISSED state is set for lockless qdisc and __netif_schedule() will be called at the end of qdisc_run_end. 2. The MISSED state also need to be set for lockless qdisc instead of calling __netif_schedule() directly when requeuing a skb for a similar reason. 3. For netdev queue stopped case, the MISSED case need clearing while the netdev queue is stopped, otherwise there may be unnecessary __netif_schedule() calling. So a new DRAINING state is added to indicate this case, which also indicate a non-empty qdisc. 4. As there is already netif_xmit_frozen_or_stopped() checking in dequeue_skb() and sch_direct_xmit(), which are both within the protection of qdisc->seqlock, but the same checking in __dev_xmit_skb() is without the protection, which might cause empty indication of a lockless qdisc to be not reliable. So remove the checking in __dev_xmit_skb(), and the checking in the protection of qdisc->seqlock seems enough to avoid the cpu consumption problem for netdev queue stopped case. 1. https://lkml.org/lkml/2021/5/29/215 Acked-by: Jakub Kicinski Tested-by: Vladimir Oltean # flexcan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit dd25296afaf60b5140ddfa9e3d8e5d9df7076754 Author: Yunsheng Lin Date: Tue Jun 22 14:49:55 2021 +0800 net: sched: avoid unnecessary seqcount operation for lockless qdisc qdisc->running seqcount operation is mainly used to do heuristic locking on q->busylock for locked qdisc, see qdisc_is_running() and __dev_xmit_skb(). So avoid doing seqcount operation for qdisc with TCQ_F_NOLOCK flag. Acked-by: Jakub Kicinski Tested-by: Vladimir Oltean # flexcan Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit d59eedc0e408565cb65eab46040bb1a07eaec315 Author: Peng Fan Date: Tue Jun 22 14:01:48 2021 +0800 remoteproc: imx_rproc: support i.MX8ULP i.MX8ULP is a new SoC with Ultra low power support, it has a Cortex-M33 core and two Cortex-A35 cores. We need to add new configuration because it could not reuse the previous i.MX7/8 configuration. i.MX8ULP M33 core is kicked by ROM, it is not under control of A35 core. So need to mark the method is IMX_RPROC_NONE. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210622060148.18411-3-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 5f5fb97491b9a934a1ae0196d073e7fe603d8c91 Author: Peng Fan Date: Tue Jun 22 14:01:47 2021 +0800 dt-bindings: remoteproc: imx_rproc: support i.MX8ULP Add i.MX8ULP remote processor(Cortex-M33) compatible string Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20210622060148.18411-2-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 51c4b4e212269a8634dee2000182cfca7f11575b Author: Arnaud Pouliquen Date: Tue Apr 20 11:19:22 2021 +0200 remoteproc: stm32: fix mbox_send_message call mbox_send_message is called by passing a local dummy message or a function parameter. As the message is queued, it is dereferenced. This works because the message field is not used by the stm32 ipcc driver, but it is not clean. Fix by passing a constant string in all cases. The associated comments are removed because rproc should not have to deal with the behavior of the mailbox frame. Reported-by: Bjorn Andersson Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210420091922.29429-1-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit 7dbdb8bd7c028c83ac75e5c97536559a7274c797 Author: Siddharth Gupta Date: Mon Jun 14 19:21:11 2021 -0700 remoteproc: core: Cleanup device in case of failure When a failure occurs in rproc_add() it returns an error, but does not cleanup after itself. This change adds the failure path in such cases. Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1623723671-5517-5-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit 930eec0be20c93a53160c74005a1485a230e6911 Author: Siddharth Gupta Date: Mon Jun 14 19:21:10 2021 -0700 remoteproc: core: Fix cdev remove and rproc del The rproc_char_device_remove() call currently unmaps the cdev region instead of simply deleting the cdev that was added as a part of the rproc_char_device_add() call. This change fixes that behaviour, and also fixes the order in which device_del() and cdev_del() need to be called. Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1623723671-5517-4-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit 519346ecabd3c1d5821f076b5df1695ecfabe2f6 Author: Siddharth Gupta Date: Mon Jun 14 19:21:09 2021 -0700 remoteproc: core: Move validate before device add We can validate whether the remoteproc is correctly setup before making the cdev_add and device_add calls. This saves us the trouble of cleaning up later on. Signed-off-by: Siddharth Gupta Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1623723671-5517-3-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit c6659ee893e29912dd47f4d1d2db810fadf4d8fd Author: Siddharth Gupta Date: Mon Jun 14 19:21:08 2021 -0700 remoteproc: core: Move cdev add before device add When cdev_add is called after device_add has been called there is no way for the userspace to know about the addition of a cdev as cdev_add itself doesn't trigger a uevent notification, or for the kernel to know about the change to devt. This results in two problems: - mknod is never called for the cdev and hence no cdev appears on devtmpfs. - sysfs links to the new cdev are not established. The cdev needs to be added and devt assigned before device_add() is called in order for the relevant sysfs and devtmpfs entries to be created and the uevent to be properly populated. Signed-off-by: Siddharth Gupta Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1623723671-5517-2-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit 0740ec0893ea1d74a217000d684e79b6e648bb9d Author: Suman Anna Date: Wed Jun 23 12:32:42 2021 -0500 remoteproc: pru: Add support for various PRU cores on K3 AM64x SoCs The K3 AM64x family of SoCs have a ICSSG IP that is similar to the version on AM65x SR2.0 SoCs with some minor differences. The AM64x SoCs contain two instances of this newer ICSSG IP. Each ICSSG processor subsystem contains 2 primary PRU cores, 2 auxiliary PRU cores called RTUs, and 2 new auxiliary cores called Transmit PRUs (Tx_PRUs). Enhance the existing PRU remoteproc driver to support all these PRU, RTU and Tx_PRU cores by using specific compatibles. The cores have the same memory copying limitations as on AM65x, so reuses the custom memcpy function within the driver's ELF loader implementation. The initial names for the firmware images for each PRU core are retrieved from DT nodes, and can be adjusted through sysfs if required. Reviewed-by: Grygorii Strashko Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210623173243.7862-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit bfc245129caa84dd384caf002921ededf5917951 Author: Suman Anna Date: Wed Jun 23 12:32:41 2021 -0500 dt-bindings: remoteproc: pru: Update bindings for K3 AM64x SoCs The K3 AM64x SoCs have an ICSSG IP that is similar to the IP revisions used on K3 AM65x SR2.0 and J721E SoCs. The ICSSG IP on K3 AM64x SoCs have the same set of two PRU cores, two RTU cores and two auxiliary PRU cores called Transmit PRUs (Tx_PRUs). There are some minor differences surrounding the PRU cores like different Broadside RAM (BSRAM) sizes w.r.t AM65x SR1.0 SoCs. Update the PRU remoteproc bindings for these PRU cores on AM64x SoCs. Reviewed-by: Grygorii Strashko Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210623173243.7862-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 8131156974cb1a698ff568314434aa0519e2a2a0 Author: Stephan Gerhold Date: Fri Jun 18 13:15:56 2021 +0200 remoteproc: qcom_wcnss: Use devm_qcom_smem_state_get() Use the new managed devm_qcom_smem_state_get() variant instead of calling qcom_smem_state_put() explicitly in remove() to simplify the code a bit. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210618111556.53416-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 632f1ca39698a278aba3ac3ef299bf623d760bb9 Author: Stephan Gerhold Date: Fri Jun 18 13:15:55 2021 +0200 remoteproc: qcom_q6v5: Use devm_qcom_smem_state_get() to fix missing put() qcom_q6v5 is requesting a smem state with qcom_smem_state_get() but qcom_smem_state_put() is not called anywhere. Use the new devm_() variant to fix this without making the code more complicated. Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210618111556.53416-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 61d1961adf4bd57d1b2c6d94d97323263c470cb2 Author: Stephan Gerhold Date: Fri Jun 18 13:15:54 2021 +0200 soc: qcom: smem_state: Add devm_qcom_smem_state_get() It is easy to forget to call qcom_smem_state_put() after a qcom_smem_state_get(). Introduce a devm_qcom_smem_state_get() helper function that automates this so that qcom_smem_state_put() is automatically called when a device is removed. Signed-off-by: Stephan Gerhold Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210618111556.53416-1-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 4c4a525ae590623eb3ba667151194a024e643ffd Author: Steve French Date: Tue Jun 22 14:07:36 2021 -0500 cifs: remove two cases where rc is set unnecessarily in sid_to_id In both these cases sid_to_id unconditionally returned success, and used the default uid/gid for the mount, so setting rc is confusing and simply gets overwritten (set to 0) later in the function. Addresses-Coverity: 1491672 ("Unused value") Signed-off-by: Steve French commit fcb3635f5018e53024c6be3c3213737f469f74ff Author: Thomas Gleixner Date: Wed Jun 23 14:02:31 2021 +0200 x86/fpu/signal: Handle #PF in the direct restore path If *RSTOR raises an exception, then the slow path is taken. That's wrong because if the reason was not #PF then going through the slow path is waste of time because that will end up with the same conclusion that the data is invalid. Now that the wrapper around *RSTOR return an negative error code, which is the negated trap number, it's possible to differentiate. If the *RSTOR raised #PF then handle it directly in the fast path and if it was some other exception, e.g. #GP, then give up and do not try the fast path. This removes the legacy frame FRSTOR code from the slow path because FRSTOR is not a ia32_fxstate frame and is therefore handled in the fast path. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.696022863@linutronix.de commit 2438c0bd598b5547333e0e3c1581da078569f130 Author: Steve French Date: Tue Jun 22 13:56:20 2021 -0500 SMB3: Add new info level for query directory The recently updated MS-SMB2 (June 2021) added protocol definitions for a new level 60 for query directory (FileIdExtdDirectoryInformation). Signed-off-by: Steve French commit aee8c67a4faa40a8df4e79316dbfc92d123989c1 Author: Thomas Gleixner Date: Wed Jun 23 14:02:30 2021 +0200 x86/fpu: Return proper error codes from user access functions When *RSTOR from user memory raises an exception, there is no way to differentiate them. That's bad because it forces the slow path even when the failure was not a fault. If the operation raised eg. #GP then going through the slow path is pointless. Use _ASM_EXTABLE_FAULT() which stores the trap number and let the exception fixup return the negated trap number as error. This allows to separate the fast path and let it handle faults directly and avoid the slow path for all other exceptions. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.601480369@linutronix.de commit 1689b0b554defd5a7863bbd434ae911b8869504a Author: Dan Carpenter Date: Tue Jun 22 13:59:55 2021 +0300 cifs: fix NULL dereference in smb2_check_message() This code sets "ses" to NULL which will lead to a NULL dereference on the second iteration through the loop. Fixes: 85346c17e425 ("cifs: convert list_for_each to entry variant in smb2misc.c") Signed-off-by: Dan Carpenter Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 0a6c2e9ec91c96bde1e8ce063180ac6e05e680f7 Author: Thomas Gleixner Date: Wed Jun 23 14:02:29 2021 +0200 x86/fpu/signal: Split out the direct restore code Prepare for smarter failure handling of the direct restore. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.493455414@linutronix.de commit cdcec1b77001e7f2cd10dccfc6d9b6d5d3f1f3ea Author: Thomas Gleixner Date: Wed Jun 23 14:02:28 2021 +0200 x86/fpu/signal: Sanitize copy_user_to_fpregs_zeroing() Now that user_xfeatures is correctly set when xsave is enabled, remove the duplicated initialization of components. Rename the function while at it. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.377341297@linutronix.de commit 1258a8c896044564514c1b53795ba3033b1e9fd6 Author: Thomas Gleixner Date: Wed Jun 23 14:02:27 2021 +0200 x86/fpu/signal: Sanitize the xstate check on sigframe Utilize the check for the extended state magic in the FX software reserved bytes and set the parameters for restoring fx_only in the relevant members of fw_sw_user. This allows further cleanups on top because the data is consistent. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.277738268@linutronix.de commit 9ba589f9cdbd8906465b108bc7ec0fc1519a06d3 Author: Thomas Gleixner Date: Wed Jun 23 14:02:26 2021 +0200 x86/fpu/signal: Remove the legacy alignment check Checking for the XSTATE buffer being 64-byte aligned, and if not, deciding just to restore the FXSR state is daft. If user space provides an unaligned math frame and has the extended state magic set in the FX software reserved bytes, then it really can keep the pieces. If the frame is unaligned and the FX software magic is not set, then fx_only is already set and the restore will use fxrstor. Remove it. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.184149902@linutronix.de commit 99a5901951b70251965b0d1542d4a8c616842a99 Author: Thomas Gleixner Date: Wed Jun 23 14:02:25 2021 +0200 x86/fpu/signal: Move initial checks into fpu__restore_sig() __fpu__restore_sig() is convoluted and some of the basic checks can trivially be done in the calling function as well as the final error handling of clearing user state. [ bp: Fixup typos. ] Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121457.086336154@linutronix.de commit bf68a7d98922e1665019b8bf0c4791500837c857 Author: Thomas Gleixner Date: Wed Jun 23 14:02:24 2021 +0200 x86/fpu: Mark init_fpstate __ro_after_init Nothing has to write into that state after init. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.992342060@linutronix.de commit 72a6c08c44e4460e39315ca828f60b8d5afd6b19 Author: Thomas Gleixner Date: Wed Jun 23 14:02:23 2021 +0200 x86/pkru: Remove xstate fiddling from write_pkru() The PKRU value of a task is stored in task->thread.pkru when the task is scheduled out. PKRU is restored on schedule in from there. So keeping the XSAVE buffer up to date is a pointless exercise. Remove the xstate fiddling and cleanup all related functions. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.897372712@linutronix.de commit 0e8c54f6b2c8b1037cef9276e451522ee90ed969 Author: Thomas Gleixner Date: Wed Jun 23 14:02:22 2021 +0200 x86/fpu: Don't store PKRU in xstate in fpu_reset_fpstate() PKRU for a task is stored in task->thread.pkru when the task is scheduled out. For 'current' the authoritative source of PKRU is the hardware. fpu_reset_fpstate() has two callers: 1) fpu__clear_user_states() for !FPU systems. For those PKRU is irrelevant 2) fpu_flush_thread() which is invoked from flush_thread(). flush_thread() resets the hardware to the kernel restrictive default value. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.802850233@linutronix.de commit 954436989cc550dd91aab98363240c9c0a4b7e23 Author: Thomas Gleixner Date: Wed Jun 23 14:02:21 2021 +0200 x86/fpu: Remove PKRU handling from switch_fpu_finish() PKRU is already updated and the xstate is not longer the proper source of information. [ bp: Use cpu_feature_enabled() ] Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.708180184@linutronix.de commit 559c664751e54f5ddebd91ef640f7d346132ee44 Merge: 78f0a64f66d4f 4c59eac6ac434 Author: Kalle Valo Date: Wed Jun 23 20:48:56 2021 +0300 Merge tag 'iwlwifi-next-for-kalle-2021-06-22' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches for v5.14 * Some robustness improvements in the PCI code; * Remove some duplicate and unused declarations; * Improve PNVM load robustness by increasing the timeout a bit; * Support for a new HW; * Suport for BIOS control of 11ax enablement in Russia; * Support UNII4 enablement from BIOS; * Support LMR feedback; * Fix in TWT; * Some fixes in IML (image loader) DMA handling; * Fixes in WoWLAN; * Updates in the WoWLAN FW commands; * Add one new device to the PCI ID lists; * Support reading PNVM from a UEFI variable; * Bump the supported FW API version; * Some other small fixes, clean-ups and improvements. # gpg: Signature made Tue 22 Jun 2021 05:19:19 PM EEST # gpg: using RSA key 1772CD7E06F604F5A6EBCB26A1479CA21A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) " [full] # gpg: aka "Luciano Roth Coelho (Intel) " [full] commit 30a304a138738d71a09c730ca8044e9662de0dbf Author: Thomas Gleixner Date: Wed Jun 23 14:02:20 2021 +0200 x86/fpu: Mask PKRU from kernel XRSTOR[S] operations As the PKRU state is managed separately restoring it from the xstate buffer would be counterproductive as it might either restore a stale value or reinit the PKRU state to 0. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.606745195@linutronix.de commit 78f0a64f66d4f582987bbe45433374b61c21500f Author: Dmitry Osipenko Date: Wed May 12 00:15:49 2021 +0300 brcmfmac: Silence error messages about unsupported firmware features KMSG is flooded with error messages about unsupported firmware features of BCM4329 chip. The GET_ASSOCLIST error became especially noisy with a newer NetworkManager version of Ubuntu 21.04. Turn the noisy error messages into info messages and print them out only once. Signed-off-by: Dmitry Osipenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511211549.30571-2-digetx@gmail.com commit 761025b51c540ae1fc9516b5dafa55cd109e4871 Author: Dmitry Osipenko Date: Wed May 12 00:15:48 2021 +0300 cfg80211: Add wiphy_info_once() Add wiphy_info_once() helper that prints info message only once. Signed-off-by: Dmitry Osipenko Acked-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511211549.30571-1-digetx@gmail.com commit e84ba47e313dbc097bf859bb6e4f9219883d5f78 Author: Dave Hansen Date: Wed Jun 23 14:02:19 2021 +0200 x86/fpu: Hook up PKRU into ptrace() One nice thing about having PKRU be XSAVE-managed is that it gets naturally exposed into the XSAVE-using ABIs. Now that XSAVE will not be used to manage PKRU, these ABIs need to be manually enabled to deal with PKRU. ptrace() uses copy_uabi_xstate_to_kernel() to collect the tracee's XSTATE. As PKRU is not in the task's XSTATE buffer, use task->thread.pkru for filling in up the ptrace buffer. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.508770763@linutronix.de commit 3b7180573c250eb6e2a7eec54ae91f27472332ea Author: Rafael J. Wysocki Date: Tue Jun 22 21:11:39 2021 +0200 cpufreq: Make cpufreq_online() call driver->offline() on errors In the CPU removal path the ->offline() callback provided by the driver is always invoked before ->exit(), but in the cpufreq_online() error path it is not, so ->exit() is expected to somehow know the context in which it has been called and act accordingly. That is less than straightforward, so make cpufreq_online() invoke the driver's ->offline() callback, if present, on errors before ->exit() too. This only potentially affects intel_pstate. Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of CPUs") Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 5ef7a5fb2b15adf0e277fa42dc17b84623e0a956 Merge: 829eea7c94e0b d3a1a18ab034f Author: Kalle Valo Date: Wed Jun 23 20:39:07 2021 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.14. Major changes: ath11k * enable support for QCN9074 PCI devices commit e7c07d5e0750e921d60e63dd181886c479a0ee19 Author: Weihang Li Date: Wed Jun 23 16:50:01 2021 +0800 RDMA/hns: Fix incorrect vlan enable bit in QPC The QPC_RQ/SQ_VLAN_EN bit in QPC should be enabled, not the QPC mask. Fixes: f0cb411aad23 ("RDMA/hns: Use new interface to modify QP context") Link: https://lore.kernel.org/r/1624438201-11915-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit c95f60a875d3bd5778c56e862512168893010b04 Author: Selvin Xavier Date: Wed Jun 23 01:14:49 2021 -0700 MAINTAINERS: Update Broadcom RDMA maintainers Updating the maintainers file as Devesh decidied to leave Broadcom. Link: https://lore.kernel.org/r/1624436089-28263-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 9782a712eb971ce483442076e79eb1d8d608646e Author: Dave Hansen Date: Wed Jun 23 14:02:18 2021 +0200 x86/fpu: Add PKRU storage outside of task XSAVE buffer PKRU is currently partly XSAVE-managed and partly not. It has space in the task XSAVE buffer and is context-switched by XSAVE/XRSTOR. However, it is switched more eagerly than FPU because there may be a need for PKRU to be up-to-date for things like copy_to/from_user() since PKRU affects user-permission memory accesses, not just accesses from userspace itself. This leaves PKRU in a very odd position. XSAVE brings very little value to the table for how Linux uses PKRU except for signal related XSTATE handling. Prepare to move PKRU away from being XSAVE-managed. Allocate space in the thread_struct for it and save/restore it in the context-switch path separately from the XSAVE-managed features. task->thread_struct.pkru is only valid when the task is scheduled out. For the current task the authoritative source is the hardware, i.e. it has to be retrieved via rdpkru(). Leave the XSAVE code in place for now to ensure bisectability. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.399107624@linutronix.de commit f7599be2bb7694d94b65a57a74aba75f2c101c28 Author: Dmitry Torokhov Date: Tue Jun 22 14:39:39 2021 -0700 ACPI: PM: postpone bringing devices to D0 unless we need them Currently ACPI power domain brings devices into D0 state in the "resume early" phase. Normally this does not cause any issues, as powering up happens quickly. However there are peripherals that have certain timing requirements for powering on, for example some models of Elan touchscreens need 300msec after powering up/releasing reset line before they can accept commands from the host. Such devices will dominate the time spent in early resume phase and cause increase in overall resume time as we wait for early resume to complete before we can proceed to the normal resume stage. There are ways for a driver to indicate that it can tolerate device being in the low power mode and that it knows how to power the device back up when resuming, bit that requires changes to individual drivers that may not really care about details of ACPI controlled power management. This change attempts to solve this issue at ACPI power domain level, by postponing powering up device until we get to the normal resume stage, unless there is early resume handler defined for the device, or device does not declare any resume handlers, in which case we continue powering up such devices early. This allows us to shave off several hundred milliseconds of resume time on affected systems. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 2ebe81c6d800576e1213f9d7cf0068017ae610c1 Author: Thomas Gleixner Date: Wed Jun 23 14:02:17 2021 +0200 x86/fpu: Dont restore PKRU in fpregs_restore_userspace() switch_to() and flush_thread() write the task's PKRU value eagerly so the PKRU value of current is always valid in the hardware. That means there is no point in restoring PKRU on exit to user or when reactivating the task's FPU registers in the signal frame setup path. This allows to remove all the xstate buffer updates with PKRU values once the PKRU state is stored in thread struct while a task is scheduled out. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.303919033@linutronix.de commit d1059c1b1146870c52f3dac12cb7b6cbf39ed27f Author: Richard Fitzgerald Date: Mon Jun 21 16:24:33 2021 +0100 ACPI: tables: Add custom DSDT file as makefile prerequisite A custom DSDT file is mostly used during development or debugging, and in that case it is quite likely to want to rebuild the kernel after changing ONLY the content of the DSDT. This patch adds the custom DSDT as a prerequisite to tables.o to ensure a rebuild if the DSDT file is updated. Make will merge the prerequisites from multiple rules for the same target. Signed-off-by: Richard Fitzgerald Signed-off-by: Rafael J. Wysocki commit 65e952102122bf89f0e4f1bebf8664e32587aaed Author: Thomas Gleixner Date: Wed Jun 23 14:02:16 2021 +0200 x86/fpu: Rename xfeatures_mask_user() to xfeatures_mask_uabi() Rename it so it's clear that this is about user ABI features which can differ from the feature set which the kernel saves and restores because the kernel handles e.g. PKRU differently. But the user ABI (ptrace, signal frame) expects it to be there. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.211585137@linutronix.de commit 6554ca9cc8c7502895f9c20b3e5e9d81c5edc986 Author: Nathan Chancellor Date: Tue Jun 22 18:38:02 2021 -0700 ACPI: bgrt: Use sysfs_emit sysfs_emit is preferred to snprintf for emitting values after commit 2efc459d06f1 ("sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output"). Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Rafael J. Wysocki commit f37ccf8fce155d08ae2a4fb3db677911ced0c21a Author: Nathan Chancellor Date: Tue Jun 22 18:38:01 2021 -0700 ACPI: bgrt: Fix CFI violation clang's Control Flow Integrity requires that every indirect call has a valid target, which is based on the type of the function pointer. The *_show() functions in this file are written as if they will be called from dev_attr_show(); however, they will be called from sysfs_kf_seq_show() because the files were created by sysfs_create_group() and the sysfs ops are based on kobj_sysfs_ops because of kobject_add_and_create(). Because the *_show() functions do not match the type of the show() member in struct kobj_attribute, there is a CFI violation. $ cat /sys/firmware/acpi/bgrt/{status,type,version,{x,y}offset}} 1 0 1 522 307 $ dmesg | grep "CFI failure" [ 267.761825] CFI failure (target: type_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8): [ 267.762246] CFI failure (target: xoffset_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8): [ 267.762584] CFI failure (target: status_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8): [ 267.762973] CFI failure (target: yoffset_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8): [ 267.763330] CFI failure (target: version_show.d5e1ad21498a5fd14edbc5c320906598.cfi_jt+0x0/0x8): Convert these functions to the type of the show() member in struct kobj_attribute so that there is no more CFI violation. Because these functions are all so similar, combine them into a macro. Fixes: d1ff4b1cdbab ("ACPI: Add support for exposing BGRT data") Link: https://github.com/ClangBuiltLinux/linux/issues/1406 Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Rafael J. Wysocki commit 1d9bffab116fadfe1594f5fea2b50ab280d81d30 Author: Thomas Gleixner Date: Wed Jun 23 14:02:15 2021 +0200 x86/fpu: Move FXSAVE_LEAK quirk info __copy_kernel_to_fpregs() copy_kernel_to_fpregs() restores all xfeatures but it is also the place where the AMD FXSAVE_LEAK bug is handled. That prevents fpregs_restore_userregs() to limit the restored features, which is required to untangle PKRU and XSTATE handling and also for the upcoming supervisor state management. Move the FXSAVE_LEAK quirk into __copy_kernel_to_fpregs() and deinline that function which has become rather fat. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.114271278@linutronix.de commit 727d01100e15b18c67f05fb697779ad2a6c99b63 Author: Thomas Gleixner Date: Wed Jun 23 14:02:14 2021 +0200 x86/fpu: Rename __fpregs_load_activate() to fpregs_restore_userregs() Rename it so that it becomes entirely clear what this function is about. It's purpose is to restore the FPU registers to the state which was saved in the task's FPU memory state either at context switch or by an in kernel FPU user. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121456.018867925@linutronix.de commit 33344368cb08f8d6bf55a32aa052318d3a69ea84 Author: Andy Lutomirski Date: Wed Jun 23 14:02:13 2021 +0200 x86/fpu: Clean up the fpu__clear() variants fpu__clear() currently resets both register state and kernel XSAVE buffer state. It has two modes: one for all state (supervisor and user) and another for user state only. fpu__clear_all() uses the "all state" (user_only=0) mode, while a number of signal paths use the user_only=1 mode. Make fpu__clear() work only for user state (user_only=1) and remove the "all state" (user_only=0) code. Rename it to match so it can be used by the signal paths. Replace the "all state" (user_only=0) fpu__clear() functionality. Use the TIF_NEED_FPU_LOAD functionality instead of making any actual hardware registers changes in this path. Instead of invoking fpu__initialize() just memcpy() init_fpstate into the task's FPU state because that has already the correct format and in case of PKRU also contains the default PKRU value. Move the actual PKRU write out into flush_thread() where it belongs and where it will end up anyway when PKRU and XSTATE have been untangled. For bisectability a workaround is required which stores the PKRU value in the xstate memory until PKRU is untangled from XSTATE for context switching and return to user. [ Dave Hansen: Polished changelog ] [ tglx: Fixed the PKRU fallout ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.922729522@linutronix.de commit e7ecad17c84d0f6bef635c20d02bbe4096eea700 Author: Thomas Gleixner Date: Wed Jun 23 14:02:12 2021 +0200 x86/fpu: Rename fpu__clear_all() to fpu_flush_thread() Make it clear what the function is about. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.827979263@linutronix.de commit 371071131cd1032c1e9172c51234a2a324841cab Author: Thomas Gleixner Date: Wed Jun 23 14:02:11 2021 +0200 x86/fpu: Use pkru_write_default() in copy_init_fpstate_to_fpregs() There is no point in using copy_init_pkru_to_fpregs() which in turn calls write_pkru(). write_pkru() tries to fiddle with the task's xstate buffer for nothing because the XRSTOR[S](init_fpstate) just cleared the xfeature flag in the xstate header which makes get_xsave_addr() fail. It's a useless exercise anyway because the reinitialization activates the FPU so before the task's xstate buffer can be used again a XRSTOR[S] must happen which in turn dumps the PKRU value. Get rid of the now unused copy_init_pkru_to_fpregs(). Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.732508792@linutronix.de commit fa8c84b77a54bf3cf351c8b4b26a5aca27a14013 Author: Thomas Gleixner Date: Wed Jun 23 14:02:10 2021 +0200 x86/cpu: Write the default PKRU value when enabling PKE In preparation of making the PKRU management more independent from XSTATES, write the default PKRU value into the hardware right after enabling PKRU in CR4. This ensures that switch_to() and copy_thread() have the correct setting for init task and the per CPU idle threads right away. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.622983906@linutronix.de commit ff7ebff47c595e747aa1bb10d8a30b2acb7d425b Author: Thomas Gleixner Date: Wed Jun 23 14:02:09 2021 +0200 x86/pkru: Provide pkru_write_default() Provide a simple and trivial helper which just writes the PKRU default value without trying to fiddle with the task's xsave buffer. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.513729794@linutronix.de commit 739e2eec0f4849eb411567407d61491f923db405 Author: Thomas Gleixner Date: Wed Jun 23 14:02:08 2021 +0200 x86/pkru: Provide pkru_get_init_value() When CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is disabled then the following code fails to compile: if (cpu_feature_enabled(X86_FEATURE_OSPKE)) { u32 pkru = READ_ONCE(init_pkru_value); .. } because init_pkru_value is defined as '0' which makes READ_ONCE() upset. Provide an accessor macro to avoid #ifdeffery all over the place. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.404880646@linutronix.de commit 8a1dc55a3f3ef0a723c3c117a567e7b5dd2c1793 Author: Thomas Gleixner Date: Wed Jun 23 14:02:07 2021 +0200 x86/cpu: Sanitize X86_FEATURE_OSPKE X86_FEATURE_OSPKE is enabled first on the boot CPU and the feature flag is set. Secondary CPUs have to enable CR4.PKE as well and set their per CPU feature flag. That's ineffective because all call sites have checks for boot_cpu_data. Make it smarter and force the feature flag when PKU is enabled on the boot cpu which allows then to use cpu_feature_enabled(X86_FEATURE_OSPKE) all over the place. That either compiles the code out when PKEY support is disabled in Kconfig or uses a static_cpu_has() for the feature check which makes a significant difference in hotpaths, e.g. context switch. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.305113644@linutronix.de commit b2681e791dbcee6acb1dca7a5076a0285109ac4c Author: Thomas Gleixner Date: Wed Jun 23 14:02:06 2021 +0200 x86/fpu: Rename and sanitize fpu__save/copy() Both function names are a misnomer. fpu__save() is actually about synchronizing the hardware register state into the task's memory state so that either coredump or a math exception handler can inspect the state at the time where the problem happens. The function guarantees to preserve the register state, while "save" is a common terminology for saving the current state so it can be modified and restored later. This is clearly not the case here. Rename it to fpu_sync_fpstate(). fpu__copy() is used to clone the current task's FPU state when duplicating task_struct. While the register state is a copy the rest of the FPU state is not. Name it accordingly and remove the really pointless @src argument along with the warning which comes along with it. Nothing can ever copy the FPU state of a non-current task. It's clearly just a consequence of arch_dup_task_struct(), but it makes no sense to proliferate that further. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.196727450@linutronix.de commit 784a46618f634973a17535b7d3d03cd4ebc0ccbd Author: Dave Hansen Date: Wed Jun 23 14:02:05 2021 +0200 x86/pkeys: Move read_pkru() and write_pkru() write_pkru() was originally used just to write to the PKRU register. It was mercifully short and sweet and was not out of place in pgtable.h with some other pkey-related code. But, later work included a requirement to also modify the task XSAVE buffer when updating the register. This really is more related to the XSAVE architecture than to paging. Move the read/write_pkru() to asm/pkru.h. pgtable.h won't miss them. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121455.102647114@linutronix.de commit a75c52896b6d42d6600db4d4dd9f7e4bde9218db Author: Thomas Gleixner Date: Wed Jun 23 14:02:04 2021 +0200 x86/fpu/xstate: Sanitize handling of independent features The copy functions for the independent features are horribly named and the supervisor and independent part is just overengineered. The point is that the supplied mask has either to be a subset of the independent features or a subset of the task->fpu.xstate managed features. Rewrite it so it checks for invalid overlaps of these areas in the caller supplied feature mask. Rename it so it follows the new naming convention for these operations. Mop up the function documentation. This allows to use that function for other purposes as well. Suggested-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Tested-by: Kan Liang Link: https://lkml.kernel.org/r/20210623121455.004880675@linutronix.de commit 01707b66535872f7a0d87f66078fd018d1814be0 Author: Andy Lutomirski Date: Wed Jun 23 14:02:03 2021 +0200 x86/fpu: Rename "dynamic" XSTATEs to "independent" The salient feature of "dynamic" XSTATEs is that they are not part of the main task XSTATE buffer. The fact that they are dynamically allocated is irrelevant and will become quite confusing when user math XSTATEs start being dynamically allocated. Rename them to "independent" because they are independent of the main XSTATE code. This is just a search-and-replace with some whitespace updates to keep things aligned. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/1eecb0e4f3e07828ebe5d737ec77dc3b708fad2d.1623388344.git.luto@kernel.org Link: https://lkml.kernel.org/r/20210623121454.911450390@linutronix.de commit b76411b1b568311bfd89d03acc587ffc1548c26f Author: Thomas Gleixner Date: Wed Jun 23 14:02:02 2021 +0200 x86/fpu: Rename initstate copy functions Again this not a copy. It's restoring register state from kernel memory. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.816581630@linutronix.de commit 1c61fada304c125c3f8a2b8eb1896406e4098a05 Author: Thomas Gleixner Date: Wed Jun 23 14:02:01 2021 +0200 x86/fpu: Rename copy_kernel_to_fpregs() to restore_fpregs_from_fpstate() This is not a copy functionality. It restores the register state from the supplied kernel buffer. No functional changes. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.716058365@linutronix.de commit 012669c740e6e2afa8bdb95394d06676f933dd2d Author: Peter Zijlstra Date: Tue Jun 22 16:21:01 2021 +0200 perf: Fix task context PMU for Hetero On HETEROGENEOUS hardware (ARM big.Little, Intel Alderlake etc.) each CPU might have a different hardware PMU. Since each such PMU is represented by a different struct pmu, but we only have a single HW task context. That means that the task context needs to switch PMU type when it switches CPUs. Not doing this means that ctx->pmu calls (pmu_{dis,en}able(), {start,commit,cancel}_txn() etc.) are called against the wrong PMU and things will go wobbly. Fixes: f83d2f91d259 ("perf/x86/intel: Add Alder Lake Hybrid support") Reported-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Kan Liang Link: https://lkml.kernel.org/r/YMsy7BuGT8nBTspT@hirez.programming.kicks-ass.net commit 1d5c7880992a06679585e7e568cc679c0c5fd4f2 Author: Kan Liang Date: Fri Jun 18 08:12:54 2021 -0700 perf/x86/intel: Fix instructions:ppp support in Sapphire Rapids Perf errors out when sampling instructions:ppp. $ perf record -e instructions:ppp -- true Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (instructions:ppp). The instruction PDIR is only available on the fixed counter 0. The event constraint has been updated to fixed0_constraint in icl_get_event_constraints(). The Sapphire Rapids codes unconditionally error out for the event which is not available on the GP counter 0. Make the instructions:ppp an exception. Fixes: 61b985e3e775 ("perf/x86/intel: Add perf core PMU support for Sapphire Rapids") Reported-by: Yasin, Ahmad Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1624029174-122219-4-git-send-email-kan.liang@linux.intel.com commit d18216fafecf2a3a7c2b97086892269d6ab3cd5e Author: Kan Liang Date: Fri Jun 18 08:12:53 2021 -0700 perf/x86/intel: Add more events requires FRONTEND MSR on Sapphire Rapids On Sapphire Rapids, there are two more events 0x40ad and 0x04c2 which rely on the FRONTEND MSR. If the FRONTEND MSR is not set correctly, the count value is not correct. Update intel_spr_extra_regs[] to support them. Fixes: 61b985e3e775 ("perf/x86/intel: Add perf core PMU support for Sapphire Rapids") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1624029174-122219-3-git-send-email-kan.liang@linux.intel.com commit ee72a94ea4a6d8fa304a506859cd07ecdc0cf5c4 Author: Kan Liang Date: Fri Jun 18 08:12:52 2021 -0700 perf/x86/intel: Fix fixed counter check warning for some Alder Lake For some Alder Lake machine, the below fixed counter check warning may be triggered. [ 2.010766] hw perf events fixed 5 > max(4), clipping! Current perf unconditionally increases the number of the GP counters and the fixed counters for a big core PMU on an Alder Lake system, because the number enumerated in the CPUID only reflects the common counters. The big core may has more counters. However, Alder Lake may have an alternative configuration. With that configuration, the X86_FEATURE_HYBRID_CPU is not set. The number of the GP counters and fixed counters enumerated in the CPUID is accurate. Perf mistakenly increases the number of counters. The warning is triggered. Directly use the enumerated value on the system with the alternative configuration. Fixes: f83d2f91d259 ("perf/x86/intel: Add Alder Lake Hybrid support") Reported-by: Jin Yao Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1624029174-122219-2-git-send-email-kan.liang@linux.intel.com commit 4c58d922c0877e23cc7d3d7c6bff49b85faaca89 Author: Like Xu Date: Mon Jun 21 11:47:10 2021 +0800 perf/x86/intel: Fix PEBS-via-PT reload base value for Extended PEBS If we use the "PEBS-via-PT" feature on a platform that supports extended PBES, like this: perf record -c 10000 \ -e '{intel_pt/branch=0/,branch-instructions/aux-output/p}' uname we will encounter the following call trace: [ 250.906542] unchecked MSR access error: WRMSR to 0x14e1 (tried to write 0x0000000000000000) at rIP: 0xffffffff88073624 (native_write_msr+0x4/0x20) [ 250.920779] Call Trace: [ 250.923508] intel_pmu_pebs_enable+0x12c/0x190 [ 250.928359] intel_pmu_enable_event+0x346/0x390 [ 250.933300] x86_pmu_start+0x64/0x80 [ 250.937231] x86_pmu_enable+0x16a/0x2f0 [ 250.941434] perf_event_exec+0x144/0x4c0 [ 250.945731] begin_new_exec+0x650/0xbf0 [ 250.949933] load_elf_binary+0x13e/0x1700 [ 250.954321] ? lock_acquire+0xc2/0x390 [ 250.958430] ? bprm_execve+0x34f/0x8a0 [ 250.962544] ? lock_is_held_type+0xa7/0x120 [ 250.967118] ? find_held_lock+0x32/0x90 [ 250.971321] ? sched_clock_cpu+0xc/0xb0 [ 250.975527] bprm_execve+0x33d/0x8a0 [ 250.979452] do_execveat_common.isra.0+0x161/0x1d0 [ 250.984673] __x64_sys_execve+0x33/0x40 [ 250.988877] do_syscall_64+0x3d/0x80 [ 250.992806] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 250.998302] RIP: 0033:0x7fbc971d82fb [ 251.002235] Code: Unable to access opcode bytes at RIP 0x7fbc971d82d1. [ 251.009303] RSP: 002b:00007fffb8aed808 EFLAGS: 00000202 ORIG_RAX: 000000000000003b [ 251.017478] RAX: ffffffffffffffda RBX: 00007fffb8af2f00 RCX: 00007fbc971d82fb [ 251.025187] RDX: 00005574792aac50 RSI: 00007fffb8af2f00 RDI: 00007fffb8aed810 [ 251.032901] RBP: 00007fffb8aed970 R08: 0000000000000020 R09: 00007fbc9725c8b0 [ 251.040613] R10: 6d6c61632f6d6f63 R11: 0000000000000202 R12: 00005574792aac50 [ 251.048327] R13: 00007fffb8af35f0 R14: 00005574792aafdf R15: 00005574792aafe7 This is because the target reload msr address is calculated based on the wrong base msr and the target reload msr value is accessed from ds->pebs_event_reset[] with the wrong offset. According to Intel SDM Table 2-14, for extended PBES feature, the reload msr for MSR_IA32_FIXED_CTRx should be based on MSR_RELOAD_FIXED_CTRx. For fixed counters, let's fix it by overriding the reload msr address and its value, thus avoiding out-of-bounds access. Fixes: 42880f726c66("perf/x86/intel: Support PEBS output to PT") Signed-off-by: Like Xu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210621034710.31107-1-likexu@tencent.com commit 08ded2cd18a09749e67a14426aa7fd1b04ab1dc0 Author: Thomas Gleixner Date: Wed Jun 23 14:02:00 2021 +0200 x86/fpu: Get rid of the FNSAVE optimization The FNSAVE support requires conditionals in quite some call paths because FNSAVE reinitializes the FPU hardware. If the save has to preserve the FPU register state then the caller has to conditionally restore it from memory when FNSAVE is in use. This also requires a conditional in context switch because the restore avoidance optimization cannot work with FNSAVE. As this only affects 20+ years old CPUs there is really no reason to keep this optimization effective for FNSAVE. It's about time to not optimize for antiques anymore. Just unconditionally FRSTOR the save content to the registers and clean up the conditionals all over the place. Suggested-by: Dave Hansen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.617369268@linutronix.de commit ebe7234b08a42d69bae94c4062a84777ea26ef99 Author: Thomas Gleixner Date: Wed Jun 23 14:01:59 2021 +0200 x86/fpu: Rename copy_fpregs_to_fpstate() to save_fpregs_to_fpstate() A copy is guaranteed to leave the source intact, which is not the case when FNSAVE is used as that reinitilizes the registers. Save does not make such guarantees and it matches what this is about, i.e. to save the state for a later restore. Rename it to save_fpregs_to_fpstate(). Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.508853062@linutronix.de commit 522e92743b35351bda1b6a9136560f833a9c2490 Author: Thomas Gleixner Date: Wed Jun 23 14:01:58 2021 +0200 x86/fpu: Deduplicate copy_uabi_from_user/kernel_to_xstate() copy_uabi_from_user_to_xstate() and copy_uabi_from_kernel_to_xstate() are almost identical except for the copy function. Unify them. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Acked-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20210623121454.414215896@linutronix.de commit cc883cdf68f5e4d437450e1696953c6bbdff6c6b Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:39 2020 +0200 i2c: davinci: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 1cc34413ff3f18c30e5df89fefd95cc0f3b3292e Author: Thomas Gleixner Date: Wed Jun 23 14:01:57 2021 +0200 x86/fpu: Rename xstate copy functions which are related to UABI Rename them to reflect that these functions deal with user space format XSAVE buffers. copy_kernel_to_xstate() -> copy_uabi_from_kernel_to_xstate() copy_user_to_xstate() -> copy_sigframe_from_user_to_xstate() Again a clear statement that these functions deal with user space ABI. Suggested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.318485015@linutronix.de commit 2d1a83a4f36f1a6fd8c510db409772e34bf4eed1 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:38 2020 +0200 i2c: cadence: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 9dbba3f87c7823cf35e63fb7a2449a5d54b3b799 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:36 2020 +0200 i2c: xiic: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 6fdc908cb56123591baa4259400cfb0787582b11 Author: Thomas Gleixner Date: Wed Jun 23 14:01:56 2021 +0200 x86/fpu: Rename fregs-related copy functions The function names for fnsave/fnrstor operations are horribly named and a permanent source of confusion. Rename: copy_kernel_to_fregs() to frstor() copy_fregs_to_user() to fnsave_to_user_sigframe() copy_user_to_fregs() to frstor_from_user_sigframe() so it's clear what these are doing. All these functions are really low level wrappers around the equally named instructions, so mapping to the documentation is just natural. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.223594101@linutronix.de commit dd66b39f600b0c4d17008226e76ff0f98a2ef674 Author: Raviteja Narayanam Date: Tue Nov 24 13:16:05 2020 +0530 i2c: cadence: Clear HOLD bit before xfer_size register rolls over On Xilinx zynq SOC if the delay between address register write and control register write in cdns_mrecv function is more, the xfer size register rolls over and controller is stuck. This is an IP bug and is resolved in later versions of IP. To avoid this scenario, disable the interrupts on the current processor core between the two register writes and enable them later. This can help achieve the timing constraint. Signed-off-by: Raviteja Narayanam Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 872c65dbf669b3b471b3d8656391a6b4f736d22b Author: Thomas Gleixner Date: Wed Jun 23 14:01:55 2021 +0200 x86/math-emu: Rename frstor() This is in the way of renaming the low level hardware accessors to match the instruction name. Prepend it with FPU_ which is consistent vs. the rest of the emulation code. No functional change. [ bp: Correct the Reported-by: ] Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.111665161@linutronix.de commit 16dcf4385933a02bb21d0af86a04439d151ad42a Author: Thomas Gleixner Date: Wed Jun 23 14:01:54 2021 +0200 x86/fpu: Rename fxregs-related copy functions The function names for fxsave/fxrstor operations are horribly named and a permanent source of confusion. Rename: copy_fxregs_to_kernel() to fxsave() copy_kernel_to_fxregs() to fxrstor() copy_fxregs_to_user() to fxsave_to_user_sigframe() copy_user_to_fxregs() to fxrstor_from_user_sigframe() so it's clear what these are doing. All these functions are really low level wrappers around the equally named instructions, so mapping to the documentation is just natural. While at it, replace the static_cpu_has(X86_FEATURE_FXSR) with use_fxsr() to be consistent with the rest of the code. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121454.017863494@linutronix.de commit 2433647bc8d983a543e7d31b41ca2de1c7e2c198 Author: Toke Høiland-Jørgensen Date: Wed Jun 23 15:47:55 2021 +0200 mac80211: Switch to a virtual time-based airtime scheduler This switches the airtime scheduler in mac80211 to use a virtual time-based scheduler instead of the round-robin scheduler used before. This has a couple of advantages: - No need to sync up the round-robin scheduler in firmware/hardware with the round-robin airtime scheduler. - If several stations are eligible for transmission we can schedule both of them; no need to hard-block the scheduling rotation until the head of the queue has used up its quantum. - The check of whether a station is eligible for transmission becomes simpler (in ieee80211_txq_may_transmit()). The drawback is that scheduling becomes slightly more expensive, as we need to maintain an rbtree of TXQs sorted by virtual time. This means that ieee80211_register_airtime() becomes O(logN) in the number of currently scheduled TXQs because it can change the order of the scheduled stations. We mitigate this overhead by only resorting when a station changes position in the tree, and hopefully N rarely grows too big (it's only TXQs currently backlogged, not all associated stations), so it shouldn't be too big of an issue. To prevent divisions in the fast path, we maintain both station sums and pre-computed reciprocals of the sums. This turns the fast-path operation into a multiplication, with divisions only happening as the number of active stations change (to re-compute the current sum of all active station weights). To prevent this re-computation of the reciprocal from happening too frequently, we use a time-based notion of station activity, instead of updating the weight every time a station gets scheduled or de-scheduled. As queues can oscillate between empty and occupied quite frequently, this can significantly cut down on the number of re-computations. It also has the added benefit of making the station airtime calculation independent on whether the queue happened to have drained at the time an airtime value was accounted. Co-developed-by: Yibo Zhao Signed-off-by: Yibo Zhao Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20210623134755.235545-1-toke@redhat.com Signed-off-by: Johannes Berg commit 2832943c789aa6a89eb3d1cf1a466e817ae451a7 Author: Ping-Ke Shih Date: Wed Jun 23 21:48:26 2021 +0800 Revert "mac80211: HE STA disassoc due to QOS NULL not sent" This reverts commit f39b07fdfb68 ("mac80211: HE STA disassoc due to QOS NULL not sent") Since iwlwifi specific workaround, which blocks to send NDP, is removed, we can revert this commit. Signed-off-by: Ping-Ke Shih Link: https://lore.kernel.org/r/20210623134826.10318-2-pkshih@realtek.com Signed-off-by: Johannes Berg commit 744757e46bf13ec3a7b3507d17ab3faab9516d43 Author: Ping-Ke Shih Date: Wed Jun 23 21:48:25 2021 +0800 mac80211: remove iwlwifi specific workaround NDPs of null_response Remove the remaining workaround that is not removed by the commit e41eb3e408de ("mac80211: remove iwlwifi specific workaround that broke sta NDP tx") Fixes: 41cbb0f5a295 ("mac80211: add support for HE") Signed-off-by: Ping-Ke Shih Link: https://lore.kernel.org/r/20210623134826.10318-1-pkshih@realtek.com Signed-off-by: Johannes Berg commit 95f83ee8d857f006813755e89a126f1048b001e8 Author: Abinaya Kalaiselvan Date: Wed Jun 23 20:10:44 2021 +0530 mac80211: fix NULL ptr dereference during mesh peer connection for non HE devices "sband->iftype_data" is not assigned with any value for non HE supported devices, which causes NULL pointer access during mesh peer connection in those devices. Fix this by accessing the pointer after HE capabilities condition check. Cc: stable@vger.kernel.org Fixes: 7f7aa94bcaf0 (mac80211: reduce peer HE MCS/NSS to own capabilities) Signed-off-by: Abinaya Kalaiselvan Link: https://lore.kernel.org/r/1624459244-4497-1-git-send-email-akalaise@codeaurora.org Signed-off-by: Johannes Berg commit 6b862ba1821441e6083cf061404694d33a841526 Author: Thomas Gleixner Date: Wed Jun 23 14:01:53 2021 +0200 x86/fpu: Rename copy_user_to_xregs() and copy_xregs_to_user() The function names for xsave[s]/xrstor[s] operations are horribly named and a permanent source of confusion. Rename: copy_xregs_to_user() to xsave_to_user_sigframe() copy_user_to_xregs() to xrstor_from_user_sigframe() so it's entirely clear what this is about. This is also a clear indicator of the potentially different storage format because this is user ABI and cannot use compacted format. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.924266705@linutronix.de commit b16313f71c1050ad5c92548925e0e9cec26989ab Author: Thomas Gleixner Date: Wed Jun 23 14:01:52 2021 +0200 x86/fpu: Rename copy_xregs_to_kernel() and copy_kernel_to_xregs() The function names for xsave[s]/xrstor[s] operations are horribly named and a permanent source of confusion. Rename: copy_xregs_to_kernel() to os_xsave() copy_kernel_to_xregs() to os_xrstor() These are truly low level wrappers around the actual instructions XSAVE[OPT]/XRSTOR and XSAVES/XRSTORS with the twist that the selection based on the available CPU features happens with an alternative to avoid conditionals all over the place and to provide the best performance for hot paths. The os_ prefix tells that this is the OS selected mechanism. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.830239347@linutronix.de commit 7fb593cbd88cf4df01c096d4dc320f027dfa2560 Merge: ebad413c3cb04 ddf275b219ab2 Author: Mark Brown Date: Wed Jun 23 16:56:31 2021 +0100 Merge remote-tracking branch 'regulator/for-5.14' into regulator-next commit ebad413c3cb04d60bb6b5f2ec4009af52a8761cb Merge: 13311e74253fe 50c9462edcbf9 Author: Mark Brown Date: Wed Jun 23 16:56:28 2021 +0100 Merge remote-tracking branch 'regulator/for-5.13' into regulator-linus commit d74d99229f4d48f42d674f7a8a1137179efd67ac Merge: a26dee29ec04a c58c7e9bf55ce Author: Mark Brown Date: Wed Jun 23 16:54:52 2021 +0100 Merge series "Support ROCKCHIP SPI new feature" from Jon Lin : Changes in v10: - The internal CS inactive function is only supported after VER 0x00110002 Changes in v9: - Conver to use CS GPIO description Changes in v8: - There is a problem with the version 7 mail format. resend it Changes in v7: - Fall back "rockchip,rv1126-spi" to "rockchip,rk3066-spi" Changes in v6: - Consider to compatibility, the "rockchip,rk3568-spi" is removed in Series-changes v5, so the commit massage should also remove the corresponding information Changes in v5: - Change to leave one compatible id rv1126, and rk3568 is compatible with rv1126 Changes in v4: - Adjust the order patches - Simply commit massage like redundancy "application" content Changes in v3: - Fix compile error which is find by Sascha in [v2,2/8] Jon Lin (6): dt-bindings: spi: spi-rockchip: add description for rv1126 spi: rockchip: add compatible string for rv1126 spi: rockchip: Set rx_fifo interrupt waterline base on transfer item spi: rockchip: Wait for STB status in slave mode tx_xfer spi: rockchip: Support cs-gpio spi: rockchip: Support SPI_CS_HIGH .../devicetree/bindings/spi/spi-rockchip.yaml | 1 + drivers/spi/spi-rockchip.c | 55 ++++++++++++++----- 2 files changed, 41 insertions(+), 15 deletions(-) -- 2.17.1 commit 1f3171252dc586745bb548d48f3bcedfea34b58d Author: Thomas Gleixner Date: Wed Jun 23 14:01:51 2021 +0200 x86/fpu: Get rid of copy_supervisor_to_kernel() If the fast path of restoring the FPU state on sigreturn fails or is not taken and the current task's FPU is active then the FPU has to be deactivated for the slow path to allow a safe update of the tasks FPU memory state. With supervisor states enabled, this requires to save the supervisor state in the memory state first. Supervisor states require XSAVES so saving only the supervisor state requires to reshuffle the memory buffer because XSAVES uses the compacted format and therefore stores the supervisor states at the beginning of the memory state. That's just an overengineered optimization. Get rid of it and save the full state for this case. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.734561971@linutronix.de commit 9fe8a6f5eed8fff6b2d7dbc99b911334e311732d Author: Thomas Gleixner Date: Wed Jun 23 14:01:50 2021 +0200 x86/fpu: Cleanup arch_set_user_pkey_access() The function does a sanity check with a WARN_ON_ONCE() but happily proceeds when the pkey argument is out of range. Clean it up. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.635764326@linutronix.de commit 71ef453355a9197fcfd8ff22391a4ad7861d79e6 Author: Dave Hansen Date: Wed Jun 23 14:01:49 2021 +0200 x86/kvm: Avoid looking up PKRU in XSAVE buffer PKRU is being removed from the kernel XSAVE/FPU buffers. This removal will probably include warnings for code that look up PKRU in those buffers. KVM currently looks up the location of PKRU but doesn't even use the pointer that it gets back. Rework the code to avoid calling get_xsave_addr() except in cases where its result is actually used. This makes the code more clear and also avoids the inevitable PKRU warnings. This is probably a good cleanup and could go upstream idependently of any PKRU rework. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.541037562@linutronix.de commit 02b93c0b00df222b9ccf7a1fbd0eb59353d0a58c Author: Thomas Gleixner Date: Wed Jun 23 14:01:48 2021 +0200 x86/fpu: Get rid of using_compacted_format() This function is pointlessly global and a complete misnomer because it's usage is related to both supervisor state checks and compacted format checks. Remove it and just make the conditions check the XSAVES feature. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.425493349@linutronix.de commit dbb60ac764581e62f2116c5a6b8926ba3a872dd4 Author: Thomas Gleixner Date: Wed Jun 23 14:01:47 2021 +0200 x86/fpu: Move fpu__write_begin() to regset The only usecase for fpu__write_begin is the set() callback of regset, so the function is pointlessly global. Move it to the regset code and rename it to fpu_force_restore() which is exactly decribing what the function does. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.328652975@linutronix.de commit 5a32fac8dbe8adc08c10e2c8770c95aebfc627cd Author: Thomas Gleixner Date: Wed Jun 23 14:01:46 2021 +0200 x86/fpu/regset: Move fpu__read_begin() into regset The function can only be used from the regset get() callbacks safely. So there is no reason to have it globally exposed. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.234942936@linutronix.de commit afac9e894364418731d1d7e66c1118b31fd130e8 Author: Thomas Gleixner Date: Wed Jun 23 14:01:45 2021 +0200 x86/fpu: Remove fpstate_sanitize_xstate() No more users. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.124819167@linutronix.de commit 3f7f75634ccefefcc929696f346db7a748e78f79 Author: Thomas Gleixner Date: Wed Jun 23 14:01:44 2021 +0200 x86/fpu: Use copy_xstate_to_uabi_buf() in fpregs_get() Use the new functionality of copy_xstate_to_uabi_buf() to retrieve the FX state when XSAVE* is in use. This avoids to overwrite the FPU state buffer with fpstate_sanitize_xstate() which is error prone and duplicated code. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121453.014441775@linutronix.de commit adc997b3d66d1cfa8c15a7dbafdaef239a51b5db Author: Thomas Gleixner Date: Wed Jun 23 14:01:43 2021 +0200 x86/fpu: Use copy_xstate_to_uabi_buf() in xfpregs_get() Use the new functionality of copy_xstate_to_uabi_buf() to retrieve the FX state when XSAVE* is in use. This avoids overwriting the FPU state buffer with fpstate_sanitize_xstate() which is error prone and duplicated code. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.901736860@linutronix.de commit eb6f51723f03c9a1c098ed196a31a03e626b9fb6 Author: Thomas Gleixner Date: Wed Jun 23 14:01:42 2021 +0200 x86/fpu: Make copy_xstate_to_kernel() usable for [x]fpregs_get() When xsave with init state optimization is used then a component's state in the task's xsave buffer can be stale when the corresponding feature bit is not set. fpregs_get() and xfpregs_get() invoke fpstate_sanitize_xstate() to update the task's xsave buffer before retrieving the FX or FP state. That's just duplicated code as copy_xstate_to_kernel() already handles this correctly. Add a copy mode argument to the function which allows to restrict the state copy to the FP and SSE features. Also rename the function to copy_xstate_to_uabi_buf() so the name reflects what it is doing. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.805327286@linutronix.de commit da53f60bb86e60830932926cf1093953a811912c Author: Andy Lutomirski Date: Wed Jun 23 14:01:41 2021 +0200 x86/fpu: Clean up fpregs_set() fpregs_set() has unnecessary complexity to support short or nonzero-offset writes and to handle the case in which a copy from userspace overwrites some of the target buffer and then fails. Support for partial writes is useless -- just require that the write has offset 0 and the correct size, and copy into a temporary kernel buffer to avoid clobbering the state if the user access fails. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.710467587@linutronix.de commit 145e9e0d8c6fada4a40f9fc65b34658077874d9c Author: Andy Lutomirski Date: Wed Jun 23 14:01:40 2021 +0200 x86/fpu: Fail ptrace() requests that try to set invalid MXCSR values There is no benefit from accepting and silently changing an invalid MXCSR value supplied via ptrace(). Instead, return -EINVAL on invalid input. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.613614842@linutronix.de commit 6164331d15f7d912fb9369245368e9564ea49813 Author: Andy Lutomirski Date: Wed Jun 23 14:01:39 2021 +0200 x86/fpu: Rewrite xfpregs_set() xfpregs_set() was incomprehensible. Almost all of the complexity was due to trying to support nonsensically sized writes or -EFAULT errors that would have partially or completely overwritten the destination before failing. Nonsensically sized input would only have been possible using PTRACE_SETREGSET on REGSET_XFP. Fortunately, it appears (based on Debian code search results) that no one uses that API at all, let alone with the wrong sized buffer. Failed user access can be handled more cleanly by first copying to kernel memory. Just rewrite it to require sensible input. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.504234607@linutronix.de commit 3a3351126ee8f1f1c86c4c79c60a650c1da89733 Author: Dave Hansen Date: Wed Jun 23 14:01:38 2021 +0200 x86/fpu: Simplify PTRACE_GETREGS code ptrace() has interfaces that let a ptracer inspect a ptracee's register state. This includes XSAVE state. The ptrace() ABI includes a hardware-format XSAVE buffer for both the SETREGS and GETREGS interfaces. In the old days, the kernel buffer and the ptrace() ABI buffer were the same boring non-compacted format. But, since the advent of supervisor states and the compacted format, the kernel buffer has diverged from the format presented in the ABI. This leads to two paths in the kernel: 1. Effectively a verbatim copy_to_user() which just copies the kernel buffer out to userspace. This is used when the kernel buffer is kept in the non-compacted form which means that it shares a format with the ptrace ABI. 2. A one-state-at-a-time path: copy_xstate_to_kernel(). This is theoretically slower since it does a bunch of piecemeal copies. Remove the verbatim copy case. Speed probably does not matter in this path, and the vast majority of new hardware will use the one-state-at-a-time path anyway. This ensures greater testing for the "slow" path. This also makes enabling PKRU in this interface easier since a single path can be patched instead of two. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.408457100@linutronix.de commit 947f4947cf00ea1e6d319eb182c64ea51ba4de8d Author: Thomas Gleixner Date: Wed Jun 23 14:01:37 2021 +0200 x86/fpu: Reject invalid MXCSR values in copy_kernel_to_xstate() Instead of masking out reserved bits, check them and reject the provided state as invalid if not zero. Suggested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.308388343@linutronix.de commit 43be46e89698a41dbf4fff81a322f4c2ae21b5e2 Author: Thomas Gleixner Date: Wed Jun 23 14:01:36 2021 +0200 x86/fpu: Sanitize xstateregs_set() xstateregs_set() operates on a stopped task and tries to copy the provided buffer into the task's fpu.state.xsave buffer. Any error while copying or invalid state detected after copying results in wiping the target task's FPU state completely including supervisor states. That's just wrong. The caller supplied invalid data or has a problem with unmapped memory, so there is absolutely no justification to corrupt the target state. Fix this with the following modifications: 1) If data has to be copied from userspace, allocate a buffer and copy from user first. 2) Use copy_kernel_to_xstate() unconditionally so that header checking works correctly. 3) Return on error without corrupting the target state. This prevents corrupting states and lets the caller deal with the problem it caused in the first place. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.214903673@linutronix.de commit 07d6688b22e09be465652cf2da0da6bf86154df6 Author: Thomas Gleixner Date: Wed Jun 23 14:01:35 2021 +0200 x86/fpu: Limit xstate copy size in xstateregs_set() If the count argument is larger than the xstate size, this will happily copy beyond the end of xstate. Fixes: 91c3dba7dbc1 ("x86/fpu/xstate: Fix PTRACE frames for XSAVES") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.120741557@linutronix.de commit e68524456c855e500f0a636adb1aa977e1e0b4d8 Author: Thomas Gleixner Date: Wed Jun 23 14:01:34 2021 +0200 x86/fpu: Move inlines where they belong They are only used in fpstate_init() and there is no point to have them in a header just to make reading the code harder. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121452.023118522@linutronix.de commit 4098b3eef37be19572d270f9b761c3e8ffcf37ac Author: Thomas Gleixner Date: Wed Jun 23 14:01:33 2021 +0200 x86/fpu: Remove unused get_xsave_field_ptr() Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Andy Lutomirski Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121451.915614415@linutronix.de commit ce38f038ede735fd425ebda10d1758420a669a87 Author: Thomas Gleixner Date: Wed Jun 23 14:01:32 2021 +0200 x86/fpu: Get rid of fpu__get_supported_xfeatures_mask() This function is really not doing what the comment advertises: "Find supported xfeatures based on cpu features and command-line input. This must be called after fpu__init_parse_early_param() is called and xfeatures_mask is enumerated." fpu__init_parse_early_param() does not exist anymore and the function just returns a constant. Remove it and fix the caller and get rid of further references to fpu__init_parse_early_param(). Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121451.816404717@linutronix.de commit 4e8e4313cf81add679e1c57677d689c02e382a67 Author: Thomas Gleixner Date: Wed Jun 23 14:01:31 2021 +0200 x86/fpu: Make xfeatures_mask_all __ro_after_init Nothing has to modify this after init. But of course there is code which unconditionally masks xfeatures_mask_all on CPU hotplug. This goes unnoticed during boot hotplug because at that point the variable is still RW mapped. This is broken in several ways: 1) Masking this in post init CPU hotplug means that any modification of this state goes unnoticed until actual hotplug happens. 2) If that ever happens then these bogus feature bits are already populated all over the place and the system is in inconsistent state vs. the compacted XSTATE offsets. If at all then this has to panic the machine because the inconsistency cannot be undone anymore. Make this a one-time paranoia check in xstate init code and disable xsave when this happens. Reported-by: Kan Liang Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121451.712803952@linutronix.de commit ce578f16348b003675c928a1992498b33b515f18 Author: Thomas Gleixner Date: Wed Jun 23 14:01:30 2021 +0200 x86/fpu: Mark various FPU state variables __ro_after_init Nothing modifies these after booting. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Reviewed-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20210623121451.611751529@linutronix.de commit b3607269ff57fd3c9690cb25962c5e4b91a0fd3b Author: Thomas Gleixner Date: Wed Jun 23 14:01:29 2021 +0200 x86/pkeys: Revert a5eff7259790 ("x86/pkeys: Add PKRU value to init_fpstate") This cannot work and it's unclear how that ever made a difference. init_fpstate.xsave.header.xfeatures is always 0 so get_xsave_addr() will always return a NULL pointer, which will prevent storing the default PKRU value in init_fpstate. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121451.451391598@linutronix.de commit 9625895011d130033d1bc7aac0d77a9bf68ff8a6 Author: Thomas Gleixner Date: Wed Jun 23 14:01:28 2021 +0200 x86/fpu: Fix copy_xstate_to_kernel() gap handling The gap handling in copy_xstate_to_kernel() is wrong when XSAVES is in use. Using init_fpstate for copying the init state of features which are not set in the xstate header is only correct for the legacy area, but not for the extended features area because when XSAVES is in use then init_fpstate is in compacted form which means the xstate offsets which are used to copy from init_fpstate are not valid. Fortunately, this is not a real problem today because all extended features in use have an all-zeros init state, but it is wrong nevertheless and with a potentially dynamically sized init_fpstate this would result in an access outside of the init_fpstate. Fix this by keeping track of the last copied state in the target buffer and explicitly zero it when there is a feature or alignment gap. Use the compacted offset when accessing the extended feature space in init_fpstate. As this is not a functional issue on older kernels this is intentionally not tagged for stable. Fixes: b8be15d58806 ("x86/fpu/xstate: Re-enable XSAVES") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210623121451.294282032@linutronix.de commit c4cf5f61982e35348f522464010445efcc0aeb60 Merge: b7c11876d24bd f9dfb5e390fab Author: Borislav Petkov Date: Wed Jun 23 17:42:12 2021 +0200 Merge x86/urgent into x86/fpu Pick up dependent changes which either went mainline (x86/urgent is based on -rc7 and that contains them) as urgent fixes and the current x86/urgent branch which contains two more urgent fixes, so that the bigger FPU rework can base off ontop. Signed-off-by: Borislav Petkov commit a26dee29ec04a3f6779684852c36a2a71fd68fd8 Author: Wolfram Sang Date: Wed Jun 23 11:58:43 2021 +0200 spi: spi-sh-msiof: : use proper DMAENGINE API for termination dmaengine_terminate_all() is deprecated in favor of explicitly saying if it should be sync or async. Here, we want dmaengine_terminate_sync() because there is no other synchronization code in the driver to handle an async case. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210623095843.3228-3-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown commit 29176edd6e7ad7333d0bb19a309b2104fa4f4341 Author: Wolfram Sang Date: Wed Jun 23 11:58:42 2021 +0200 spi: spi-rspi: : use proper DMAENGINE API for termination dmaengine_terminate_all() is deprecated in favor of explicitly saying if it should be sync or async. Here, we want dmaengine_terminate_sync() because there is no other synchronization code in the driver to handle an async case. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210623095843.3228-2-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown commit 8cc802bd75fbf840635e7d4d48050bbcab4d938d Merge: f5e2d697d3cbd 8e0eb2fb5c073 Author: Mark Brown Date: Wed Jun 23 16:31:14 2021 +0100 Merge series "ASoC: tlv320aic32x4: Add support for TAS2505" from Claudius Heine : Hi, this is v2 from my patchset that add support for the TAS2505 to the tlv320aic32x4 driver. kind regards, Claudius Changes from v1: - clarified commit message of first patch, which add the type value to the struct - removed unnecessary code to put and get speaker volume - removed 'Gain' from 'HP Driver Playback Volume' control - fixed rebase issues Claudius Heine (3): ASoC: tlv320aic32x4: add type to device private data struct ASoC: tlv320aic32x4: add support for TAS2505 ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible .../bindings/sound/tlv320aic32x4.txt | 1 + sound/soc/codecs/tlv320aic32x4-i2c.c | 22 ++- sound/soc/codecs/tlv320aic32x4-spi.c | 23 ++- sound/soc/codecs/tlv320aic32x4.c | 139 +++++++++++++++++- sound/soc/codecs/tlv320aic32x4.h | 10 ++ 5 files changed, 186 insertions(+), 9 deletions(-) base-commit: 70585216fe7730d9fb5453d3e2804e149d0fe201 -- 2.32.0 commit f5e2d697d3cbd6d20684eddd3e280809c30e37a1 Merge: 723ca2f89412a fc8344e63e595 Author: Mark Brown Date: Wed Jun 23 16:31:13 2021 +0100 Merge series "ASoC: tegra: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang : Use devm_platform_get_and_ioremap_resource() to simplify code. Yang Yingliang (4): ASoC: tegra20: i2s: Use devm_platform_get_and_ioremap_resource() ASoC: tegra20: spdif: Use devm_platform_get_and_ioremap_resource() ASoC: tegra: tegra210_admaif: Use devm_platform_get_and_ioremap_resource() ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource() sound/soc/tegra/tegra20_i2s.c | 3 +-- sound/soc/tegra/tegra20_spdif.c | 3 +-- sound/soc/tegra/tegra210_admaif.c | 4 +--- sound/soc/tegra/tegra30_ahub.c | 3 +-- 4 files changed, 4 insertions(+), 9 deletions(-) -- 2.25.1 commit c1d12c19efd91b9cda5472bc4ec48854e67c24a8 Author: Dmitry Baryshkov Date: Tue May 25 16:13:16 2021 +0300 drm/msm/mdp5: provide dynamic bandwidth management Instead of using static bandwidth setup, manage bandwidth dynamically, depending on the amount of allocated planes, their format and resolution. Co-developed-with: James Willcox Signed-off-by: Dmitry Baryshkov Reported-by: kernel test robot Link: https://lore.kernel.org/r/20210525131316.3117809-8-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 310317719ef1735da2fa2e36375889ff90fd89c8 Author: James Willcox Date: Tue May 25 16:13:15 2021 +0300 drm/msm/mdp5: add perf blocks for holding fudge factors Prior downstream kernels had "fudge factors" in devicetree which would be applied to things like interconnect bandwidth calculations. Bring some of those values back here. Signed-off-by: James Willcox [DB: changed _ff to _inefficiency, fixed patch description] Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210525131316.3117809-7-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 7d36db0be3b9f906b291c40c805746a63754a455 Author: Dmitry Baryshkov Date: Tue May 25 16:13:14 2021 +0300 drm/msm/mdp5: switch to standard zpos property Instead of implemeting zpos property on our own, use standard zpos property support. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210525131316.3117809-6-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit ed6b97e5b5a78fbdf7dbfa2745db7289fc333d7f Author: Dmitry Baryshkov Date: Tue May 25 16:13:13 2021 +0300 drm/msm/mdp5: add support for alpha/blend_mode properties Hook alpha and pixel blend mode support to be exported as proper DRM plane properties. This allows using this functionality from the userspace. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210525131316.3117809-5-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit a4fdc260290202ae69c789fb56b274b7dfa321f3 Author: Dmitry Baryshkov Date: Tue May 25 16:13:12 2021 +0300 drm/msm/mdp5: use drm_plane_state for pixel blend mode Use drm_plane_state's 'pixel_blend_mode' field rather than using 'premultiplied' field to mdp5_plane_state. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210525131316.3117809-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 21ab7e8dc9cf15290cb51317b8fb63cf2ff617ed Author: Dmitry Baryshkov Date: Tue May 25 16:13:11 2021 +0300 drm/msm/mdp5: use drm_plane_state for storing alpha value Use drm_plane_state's 'alpha' field rather than adding extra 'alpha' field to mdp5_plane_state. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210525131316.3117809-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 9074b67b83bd007ea731095c498671769b68a30e Author: Dmitry Baryshkov Date: Tue May 25 16:13:10 2021 +0300 drm/msm/mdp5: use drm atomic helpers to handle base drm plane state Use generic helpers code to manage drm_plane_state part of mdp5_plane state instead of manually coding all the details. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210525131316.3117809-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit a14440042fe8dac6b7c507a946f46a6f50c9c05d Author: Dmitry Baryshkov Date: Thu Jun 10 00:12:11 2021 +0300 drm/msm/dsi: do not enable PHYs when called for the slave DSI interface Move the call to dsi_mgr_phy_enable after checking whether the DSI interface is slave, so that PHY enablement happens together with the host enablement. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210609211211.2561090-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 5434941fd45d30dadc7e9e1227cf109bb3796d22 Author: Rob Clark Date: Mon Jun 14 08:06:18 2021 -0700 drm/msm: Add debugfs to trigger shrinker Just for the purposes of testing. Write to it the # of objects to scan, read back the # freed. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210614150618.729610-1-robdclark@gmail.com Signed-off-by: Rob Clark commit c96348a8fbff90ef610b0323218e9d585683bdd2 Author: Bjorn Andersson Date: Fri Jun 11 10:00:03 2021 -0700 drm/msm/dpu: Avoid ABBA deadlock between IRQ modules Handling of the interrupt callback lists is done in dpu_core_irq.c, under the "cb_lock" spinlock. When these operations results in the need for enableing or disabling the IRQ in the hardware the code jumps to dpu_hw_interrupts.c, which protects its operations with "irq_lock" spinlock. When an interrupt fires, dpu_hw_intr_dispatch_irq() inspects the hardware state while holding the "irq_lock" spinlock and jumps to dpu_core_irq_callback_handler() to invoke the registered handlers, which traverses the callback list under the "cb_lock" spinlock. As such, in the event that these happens concurrently we'll end up with a deadlock. Prior to '1c1e7763a6d4 ("drm/msm/dpu: simplify IRQ enabling/disabling")' the enable/disable of the hardware interrupt was done outside the "cb_lock" region, optimitically by using an atomic enable-counter for each interrupt and an warning print if someone changed the list between the atomic_read and the time the operation concluded. Rather than re-introducing the large array of atomics, this change embraces the fact that dpu_core_irq and dpu_hw_interrupts are deeply entangled and make them share the single "irq_lock". Following this step it's suggested that we squash the two parts into a single irq handling thing. Fixes: 1c1e7763a6d4 ("drm/msm/dpu: simplify IRQ enabling/disabling") Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210611170003.3539059-1-bjorn.andersson@linaro.org Signed-off-by: Rob Clark commit e25e92e08e32c6bf63a968929d232f13dcf9938c Author: Rob Clark Date: Thu Jun 10 14:44:13 2021 -0700 drm/msm: devcoredump iommu fault support Wire up support to stall the SMMU on iova fault, and collect a devcore- dump snapshot for easier debugging of faults. Currently this is a6xx-only, but mostly only because so far it is the only one using adreno-smmu-priv. Signed-off-by: Rob Clark Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/20210610214431.539029-6-robdclark@gmail.com Signed-off-by: Rob Clark commit ba6014a4e480c3c2b169438c47273a113c35ba4e Author: Rob Clark Date: Thu Jun 10 14:44:12 2021 -0700 iommu/arm-smmu-qcom: Add stall support Add, via the adreno-smmu-priv interface, a way for the GPU to request the SMMU to stall translation on faults, and then later resume the translation, either retrying or terminating the current translation. This will be used on the GPU side to "freeze" the GPU while we snapshot useful state for devcoredump. Signed-off-by: Rob Clark Acked-by: Jordan Crouse Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210610214431.539029-5-robdclark@gmail.com Signed-off-by: Rob Clark commit 2a574cc05d380665648c067689ce300168169a68 Author: Jordan Crouse Date: Thu Jun 10 14:44:11 2021 -0700 drm/msm: Improve the a6xx page fault handler Use the new adreno-smmu-priv fault info function to get more SMMU debug registers and print the current TTBR0 to debug per-instance pagetables and figure out which GPU block generated the request. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210610214431.539029-4-robdclark@gmail.com Signed-off-by: Rob Clark commit ab5df7b953d87efddba4f9df83862f7dcb39b8d5 Author: Jordan Crouse Date: Thu Jun 10 14:44:10 2021 -0700 iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info Add a callback in adreno-smmu-priv to read interesting SMMU registers to provide an opportunity for a richer debug experience in the GPU driver. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210610214431.539029-3-robdclark@gmail.com Signed-off-by: Rob Clark commit f8f934c180f629bb927a04fd90d6a16ef1a94073 Author: Jordan Crouse Date: Thu Jun 10 14:44:09 2021 -0700 iommu/arm-smmu: Add support for driver IOMMU fault handlers Call report_iommu_fault() to allow upper-level drivers to register their own fault handlers. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Acked-by: Will Deacon Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210610214431.539029-2-robdclark@gmail.com Signed-off-by: Rob Clark commit 1d2fa58e0dda3344999cad9b195eb539310ad093 Author: Samuel Iglesias Gonsalvez Date: Mon Jun 7 12:44:41 2021 +0200 drm/msm: export hangcheck_period in debugfs While keeping the previous default value for hangcheck period, we allow now the possibility of configuring its value via debugfs. Signed-off-by: Samuel Iglesias Gonsalvez Link: https://lore.kernel.org/r/20210607104441.184700-1-siglesias@igalia.com Signed-off-by: Rob Clark commit f6d62d091cfd1c307a1bb83ef46d334d9ac27751 Author: Jonathan Marek Date: Tue Jun 8 13:27:48 2021 -0400 drm/msm/a6xx: add support for Adreno 660 GPU Add adreno_is_{a660,a650_family} helpers and convert update existing adreno_is_a650 usage based on downstream driver's logic (changing into adreno_is_a650_family or adding adreno_is_a660). And add the remaining changes required for A660, again based on the downstream driver: missing GMU allocations, additional register init, dummy hfi BW table, cp protect list, entry in gpulist table, hwcg table, updated a6xx_ucode_check_version check. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210608172808.11803-6-jonathan@marek.ca Signed-off-by: Rob Clark commit 564499f5ddbb2d8529a460e24ef6bd2e8593c775 Author: Jonathan Marek Date: Tue Jun 8 13:27:47 2021 -0400 drm/msm/a6xx: add missing PC_DBG_ECO_CNTL bit for a640/a650 See downstream's "disable_tseskip" flag. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210608172808.11803-5-jonathan@marek.ca Signed-off-by: Rob Clark commit 58e933e3f012d47d88ca35cd8688d4a31a0def4d Author: Jonathan Marek Date: Tue Jun 8 13:27:46 2021 -0400 drm/msm/a6xx: add GMU_CX_GMU_CX_FALNEXT_INTF write for a650 downstream msm-5.14 kernel added a write to this register, so match that. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210608172808.11803-4-jonathan@marek.ca Signed-off-by: Rob Clark commit 64245fc55172a0083814c5be193bf4891b9096e2 Author: Jonathan Marek Date: Tue Jun 8 13:27:45 2021 -0400 drm/msm/a6xx: use AOP-initialized PDC for a650 SM8250 AOP firmware already sets up PDC registers for us, and it only needs to be enabled. This path will be used for other newer GPUs. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210608172808.11803-3-jonathan@marek.ca Signed-off-by: Rob Clark commit bda1d6e56038698b1cf856ecef5ab4cc569d9079 Author: Jonathan Marek Date: Tue Jun 8 13:27:44 2021 -0400 drm/msm: remove unused icc_path/ocmem_icc_path These aren't used by anything anymore. Signed-off-by: Jonathan Marek Reviewed-by: Akhil P Oommen Link: https://lore.kernel.org/r/20210608172808.11803-2-jonathan@marek.ca Signed-off-by: Rob Clark commit cc4c26d4ae4e458669d46ff69f16ac0c74f7cd49 Author: Rob Clark Date: Sun May 30 15:44:23 2021 -0700 drm/msm: Generated register update Based on mesa commit daa2ccff7a0201941db3901780d179e2634057d5 Small bit of .c churn in the phy code to adapt to split up of phy related registers. Signed-off-by: Rob Clark commit b3fbfa234348c620ea2883aa9115d1359003cd54 Author: Dmitry Baryshkov Date: Sat May 15 22:09:09 2021 +0300 drm/msm/dpu: hw_blk: make dpu_hw_blk empty opaque structure The code does not really use dpu_hw_blk fields, so drop them, making dpu_hw_blk empty structure. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210515190909.1809050-5-dmitry.baryshkov@linaro.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit dfa35bac99305a7af03147516055fcc93d9d277a Author: Dmitry Baryshkov Date: Sat May 15 22:09:08 2021 +0300 drm/msm/dpu: use struct dpu_hw_merge_3d in dpu_hw_pingpong Use struct dpu_hw_merge_3d pointer in struct dpu_hw_pingpong rather than using struct dpu_hw_blk. This is the only user of dpu_hw_blk.id, which will be cleaned in the next patch. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210515190909.1809050-4-dmitry.baryshkov@linaro.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 6f94be582d6faa9e027c026ccc684a0dad398717 Author: Dmitry Baryshkov Date: Sat May 15 22:09:07 2021 +0300 drm/msm/dpu: drop dpu_hw_blk_destroy function The dpu_hw_blk_destroy() function is empty, so we can drop it now. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210515190909.1809050-3-dmitry.baryshkov@linaro.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 88b0f5a56d119856df113100000f84585b7a7c48 Author: Dmitry Baryshkov Date: Sat May 15 22:09:06 2021 +0300 drm/msm/dpu: remove unused dpu_hw_blk features Remove all unused dpu_hw_blk features and functions: - dpu_hw_blk_get()/_put() and respective refcounting, - global list of all dpu_hw_blk instances, - dpu_hw_blk_ops and empty implementation inside each hw_blk subdriver. This leaves dpu_hw_blk as a placeholder with just type and index. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210515190909.1809050-2-dmitry.baryshkov@linaro.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 299b809e89e8afa31546b84177909fc2305e07fe Author: Dmitry Baryshkov Date: Fri Jun 4 13:41:13 2021 +0300 drm/msm/dsi: print error code when MIPI DSI host registration fails In order to ease debugging of DSI host registration issues, print return code of dsi_mgr_setup_components(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 44b4fcbc455356f00b7681220b43b75914abfe3a Author: Lee Jones Date: Wed Jun 2 15:32:48 2021 +0100 drm/msm/dp/dp_link: Fix some potential doc-rot Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/dp/dp_link.c:374: warning: expecting prototype for dp_parse_video_pattern_params(). Prototype was for dp_link_parse_video_pattern_params() instead drivers/gpu/drm/msm/dp/dp_link.c:573: warning: expecting prototype for dp_parse_phy_test_params(). Prototype was for dp_link_parse_phy_test_params() instead drivers/gpu/drm/msm/dp/dp_link.c:975: warning: expecting prototype for dp_link_process_downstream_port_status_change(). Prototype was for dp_link_process_ds_port_status_change() instead Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Chandan Uddaraju Cc: Kuogee Hsieh Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210602143300.2330146-15-lee.jones@linaro.org Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 2eb4bfc0b71efa1e5eede0350afc38c83da00fda Author: Lee Jones Date: Wed Jun 2 15:32:47 2021 +0100 drm/msm/dp/dp_catalog: Correctly document param 'dp_catalog' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/dp/dp_catalog.c:206: warning: Function parameter or member 'dp_catalog' not described in 'dp_catalog_aux_reset' drivers/gpu/drm/msm/dp/dp_catalog.c:206: warning: Excess function parameter 'aux' description in 'dp_catalog_aux_reset' Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Chandan Uddaraju Cc: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210602143300.2330146-14-lee.jones@linaro.org Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 37c68900a252ce39eee3b8b65ae00322a483f912 Author: Lee Jones Date: Wed Jun 2 15:32:46 2021 +0100 drm/msm/msm_gem: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/msm_gem.c:364: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/msm/msm_gem.c:763: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210602143300.2330146-13-lee.jones@linaro.org Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 02023638da7fde5c51e4dc7706e176398f940689 Author: Lee Jones Date: Wed Jun 2 15:32:45 2021 +0100 drm/msm/disp/dpu1/dpu_plane: Fix a couple of naming issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:373: warning: expecting prototype for _dpu_plane_set_panic_lut(). Prototype was for _dpu_plane_set_danger_lut() instead drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:498: warning: expecting prototype for _dpu_plane_set_vbif_qos(). Prototype was for _dpu_plane_set_qos_remap() instead Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210602143300.2330146-12-lee.jones@linaro.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit bce98bf7f6cea9c192c139bf97d1815b5d382785 Author: Stephen Boyd Date: Fri Apr 30 12:31:00 2021 -0700 drm/msm: Use VERB() for extra verbose logging These messages are useful for bringup/early development but in production they don't provide much value. We know what sort of GPU we have and interrupt information can be gathered other ways. This cuts down on lines in the drm debug logs that happen too often, making the debug logs practically useless. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210430193104.1770538-3-swboyd@chromium.org [resolve merge conflicts with dpu irq refactor] Signed-off-by: Rob Clark commit f591dbb5fb8c82569378893b48f0ac9ebec78289 Author: Kuogee Hsieh Date: Thu Jun 3 08:40:46 2021 -0700 drm/msm/dp: power off DP phy at suspend Normal DP suspend operation contains two steps, display off followed by dp suspend, to complete system wide suspending cycle if display is up at that time. In this case, DP phy will be powered off at display off. However there is an exception case that depending on the timing of dongle plug in during system wide suspending, sometimes display off procedure may be skipped and dp suspend was called directly. In this case, dp phy is stay at powered on (phy->power_count = 1) so that at next resume dp driver crash at main link clock enable due to phy is not physically powered on. This patch will call dp_ctrl_off_link_stream() to tear down main link and power off phy at dp_pm_suspend() if main link had been brought up. Changes in V2: -- stashed changes into dp_ctrl.c -- add is_phy_on to monitor phy state Changes in V3: -- delete is_phy_on -- call dp_ctrl_off_link_stream() from dp_pm_suspend() Changes in V4: -- delete changes made at dp_power.c -- move main link status checking to dp_pm_suspend Changes in V5: -- correct commit id at Fixes tag Fixes: 8dbde399044b ("drm/msm/dp: handle irq_hpd with sink_count = 0 correctly) Signed-off-by: Kuogee Hsieh Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1622734846-14179-1-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark commit 0920b0f6e7b47526799d87ee273ea63e300488a0 Author: Shaokun Zhang Date: Tue May 25 20:22:07 2021 +0800 drm/msm/dp: remove the repeated declaration Function 'dp_catalog_audio_enable' is declared twice, remove the repeated declaration. Cc: Rob Clark Cc: Abhinav Kumar Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1621945327-10871-1-git-send-email-zhangshaokun@hisilicon.com Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 9389a0e7b17c7d781ef77003138f0c82f5a0aa4c Author: Guenter Roeck Date: Tue May 25 04:29:04 2021 -0700 drm/msm/dpu: Drop unnecessary NULL checks after container_of in dpu_encoder The result of container_of() operations is never NULL unless the embedded element is the first element of the structure. This is not the case here. The NULL checks on the result of container_of() are therefore unnecessary and misleading. Remove them. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210525112904.1747066-1-linux@roeck-us.net Reviewed-by: Dmitry Baryshkov [DB: fixed patch subject] Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 5ed7944dfa508cce927870fecf370bad778b7910 Author: Guenter Roeck Date: Mon May 24 20:20:33 2021 -0700 drm/msm/dp: Drop unnecessary NULL checks after container_of The result of container_of() operations is never NULL unless the embedded element is the first element of the structure. This is not the case here. The NULL check on the result of container_of() is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> While at it, remove unused but assigned variable hpd in dp_display_usbpd_attention_cb(). Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210525032033.453143-1-linux@roeck-us.net Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 08b2a9bb54aef2231d14493d6b7d2175fbd8c60b Author: Arnd Bergmann Date: Fri May 14 23:30:17 2021 +0200 drm/msm/dsi: fix 32-bit clang warning clang is a little overzealous with warning about a constant conversion in an untaken branch of a ternary expression: drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c:975:48: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 5000000000 to 705032704 [-Werror,-Wconstant-conversion] .max_pll_rate = (5000000000ULL < ULONG_MAX) ? 5000000000UL : ULONG_MAX, ^~~~~~~~~~~~ Rewrite this to use a preprocessor conditional instead to avoid the warning. Fixes: 076437c9e360 ("drm/msm/dsi: move min/max PLL rate to phy config") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210514213032.575161-1-arnd@kernel.org Reviewed-by: Nathan Chancellor Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 7d21fb8af5db8aec617a001ad87c2a0f25c24634 Author: Bernard Zhao Date: Wed Apr 7 06:06:21 2021 -0700 drm/msm: remove unneeded variable ret This patch fix coccicheck warning: drivers/gpu/drm/msm/dp/dp_link.c:848:5-8: Unneeded variable: "ret". Return "0" on line 880 Also remove unneeded function return value check. Signed-off-by: Bernard Zhao Link: https://lore.kernel.org/r/20210407130654.3387-1-bernard@vivo.com Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 614f94b5416d3fdc3fb96876092a43872eff57a4 Author: Zhen Lei Date: Wed Apr 7 16:33:34 2021 +0800 drm/msm/dpu: remove unused local variable 'cmd_enc' Fixes the following W=1 kernel build warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function ‘dpu_encoder_phys_cmd_wait_for_commit_done’: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:688:31: warning: variable ‘cmd_enc’ set but not used [-Wunused-but-set-variable] Fixes: fe286893ed34 ("drm/msm/dpu: Remove unused call in wait_for_commit_done") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210407083334.2762-1-thunder.leizhen@huawei.com Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 0c86f885116e929c4a315de9f1ada02374c31d79 Author: Lee Jones Date: Wed Mar 3 13:42:29 2021 +0000 drm/msm/dp/dp_display: Remove unused variable 'hpd' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/msm/dp/dp_display.c: In function ‘dp_display_usbpd_attention_cb’: drivers/gpu/drm/msm/dp/dp_display.c:496:19: warning: variable ‘hpd’ set but not used [-Wunused-but-set-variable] Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Kuogee Hsieh Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210303134319.3160762-4-lee.jones@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 48c305808da700cda1a476f77e0a2ad50dd2e8b4 Author: zuoqilin Date: Thu Mar 18 11:24:22 2021 +0800 drm/msm: Remove unneeded variable: "rc" Remove unneeded variable: "rc". Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210318032422.1285-1-zuoqilin1@163.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 11120e9351d809b39a92f0e6e9b7e7848d4de98b Author: Yangtao Li Date: Sun Mar 14 19:34:04 2021 +0300 drm/msm: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314163408.22292-12-digetx@gmail.com Reviewed-by: Viresh Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 46188352307c2000f3d48feea2587432a8e83f41 Author: Bhaskar Chowdhury Date: Thu Mar 18 11:56:50 2021 +0530 drm/msm/dp: Fixed couple of typos s/modueles/modules/ ....two different places Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210318062650.19886-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit d2dfd21fcbf0f28c473a6c497e62b53e711c25b9 Author: Bhaskar Chowdhury Date: Mon Mar 22 17:36:01 2021 +0530 drm/msm/dpu: Fix a typo s/poiner/pointer/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322120601.2086438-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 6bac5b13b4ec72f3b39e6d483154cc9f6dee6a03 Author: Bhaskar Chowdhury Date: Mon Mar 22 11:57:23 2021 +0530 drm/msm/dpu: Fix a typo s/struture/structure/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322062723.3215931-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit e020ac961ce5d038de66dc7f6ffca98899e9a3f3 Author: Zhen Lei Date: Mon May 10 14:38:05 2021 +0800 drm/msm/dpu: Fix error return code in dpu_mdss_init() The error code returned by platform_get_irq() is stored in 'irq', it's forgotten to be copied to 'ret' before being returned. As a result, the value 0 of 'ret' is returned incorrectly. After the above fix is completed, initializing the local variable 'ret' to 0 is no longer needed, remove it. In addition, when dpu_mdss_init() is successfully returned, the value of 'ret' is always 0. Therefore, replace "return ret" with "return 0" to make the code clearer. Fixes: 070e64dc1bbc ("drm/msm/dpu: Convert to a chained irq chip") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210510063805.3262-2-thunder.leizhen@huawei.com Reviewed-by: Stephen Boyd Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit a1c9b1e3bdd6d8dc43c18699772fb6cf4497d45a Author: Zhen Lei Date: Sat May 8 10:28:36 2021 +0800 drm/msm: Fix error return code in msm_drm_init() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 7f9743abaa79 ("drm/msm: validate display and event threads") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210508022836.1777-1-thunder.leizhen@huawei.com Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 8c08c7b51ad33b75d480a20fb68a6f1376629e0e Merge: a1f2ba60eace2 170b763597d3a Author: Rob Clark Date: Wed Jun 23 07:32:59 2021 -0700 Merge branch 'msm-fixes-v5.13-rc6' into msm-next-redo Syncing up with -rc6 fixes to avoid conflicts with a660 patches. Signed-off-by: Rob Clark commit a1f2ba60eace242fd034173db3762f342a824a2e Author: Krishna Manikandan Date: Thu May 27 10:37:56 2021 +0530 drm/msm/disp/dpu1: avoid perf update in frame done event Crtc perf update from frame event work can result in wrong bandwidth and clock update from dpu if the work is scheduled after the swap state has happened. Avoid such issues by moving perf update to complete commit once the frame is accepted by the hardware. Fixes: a29c8c024165 ("drm/msm/disp/dpu1: fix display underruns during modeset") Signed-off-by: Krishna Manikandan Tested-by: Douglas Anderson Link: https://lore.kernel.org/r/1622092076-5100-1-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 5b702d787b47e19f5aebb4f11360678493759a3b Author: Stephen Boyd Date: Fri Apr 30 12:31:04 2021 -0700 drm/msm/disp: Move various debug logs to atomic bucket These prints flood the logs with drm debugging set to enable kms and driver logging (DRM_UT_KMS and DRM_UT_DRIVER). Let's move these prints to the atomic bucket (DRM_UT_ATOMIC) as they're related to the atomic paths. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210430193104.1770538-7-swboyd@chromium.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit f6bc4e1d5126df97328d66c765117236b445a79c Author: Stephen Boyd Date: Fri Apr 30 12:31:03 2021 -0700 drm/msm/disp: Use plane debug print helper Use the DPU_DEBUG_PLANE() helper to print the plane number instead of open coding it. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210430193104.1770538-6-swboyd@chromium.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 7cb017db1896d9afd30c6ba9bb9ef1fe7a990f00 Author: Stephen Boyd Date: Fri Apr 30 12:31:02 2021 -0700 drm/msm: Move FB debug prints to drm_dbg_state() These are verbose prints that tell us about the framebuffer state. Let's move them to drm_dbg_state() so that they're only printed if we're interested in verbose state logging while drm debugging. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210430193104.1770538-5-swboyd@chromium.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit e45b40ab9bf021acf7252f11ec663fb7991c5227 Author: Stephen Boyd Date: Fri Apr 30 12:31:01 2021 -0700 drm/msm/dp: Drop malformed debug print This print is missing a newline, and doesn't really provide any value. Drop it. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210430193104.1770538-4-swboyd@chromium.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit 721c6e0c6aed62c7add2070d8f06e5156a4273cd Author: Stephen Boyd Date: Fri Apr 30 12:30:59 2021 -0700 drm/msm: Move vblank debug prints to drm_dbg_vbl() Put these debug prints in the vblank code into the appropriate vblank category via drm_dbg_vbl(). Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210430193104.1770538-2-swboyd@chromium.org Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit d94fc8f36f78e3a288ffd8b61809c433ca6999bd Author: Dmitry Baryshkov Date: Sun May 16 23:29:11 2021 +0300 drm/msm/dpu: simplify IRQ enabling/disabling Merge dpu_core_irq_enable() into dpu_core_irq_register_callback() and dpu_core_irq_disable() into dpu_core_irq_unregister_callback(), because they are called in pairs. There is no need to have separate enable/disable pair, we can enable hardware IRQ when first callback is registered and when the last callback is unregistered. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210516202910.2141079-7-dmitry.baryshkov@linaro.org [fixup tracepoint compile warns] Signed-off-by: Rob Clark commit 18b20ac0ec2ff5c1d971ba4a857eaea1dd16f608 Author: Dmitry Baryshkov Date: Sun May 16 23:29:10 2021 +0300 drm/msm/dpu: drop remains of old irq lookup subsystem There is no more need for the dpu_intr_type types, dpu_irq_map table, individual intr defines and obsolete_irq field. Drop all of them now. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210516202910.2141079-6-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 667e9985ee24caec46799eb481fcb3b227d8a503 Author: Dmitry Baryshkov Date: Sun May 16 23:29:09 2021 +0300 drm/msm/dpu: replace IRQ lookup with the data in hw catalog The IRQ table in the dpu_hw_interrupts.h is big, ugly, and hard to maintain. There are only few interrupts used from that table. Newer generations use different IRQ locations. Move this data to hw catalog. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210516202910.2141079-5-dmitry.baryshkov@linaro.org [fixup tracepoint compile warns/err] Signed-off-by: Rob Clark commit 597762d5bf5024e7c7a079a66d056d983e1a40f2 Author: Dmitry Baryshkov Date: Sun May 16 23:29:08 2021 +0300 drm/msm/dpu: define interrupt register names In order to make mdss_irqs readable (and error-prone) define names for interrupt register indices. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210516202910.2141079-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 98fbe6bb5bb29a44e0b8eb2b97d89c0ed37d91bb Author: Dmitry Baryshkov Date: Sun May 16 23:29:07 2021 +0300 drm/msm/dpu: hw_intr: always call dpu_hw_intr_clear_intr_status_nolock Always call dpu_hw_intr_clear_intr_status_nolock() from the dpu_hw_intr_dispatch_irqs(). This simplifies the callback function (which call clears the interrupts anyway) and enforces clearing the hw interrupt status. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210516202910.2141079-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 09e3a2b4421e14f624331afe5847199e254fd2fb Author: Dmitry Baryshkov Date: Sun May 16 23:29:06 2021 +0300 drm/msm/dpu: merge dpu_hw_intr_get_interrupt_statuses into dpu_hw_intr_dispatch_irqs There is little sense in reading interrupt statuses and right after that going after the array of statuses to dispatch them. Merge both loops into single function doing read and dispatch. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210516202910.2141079-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit e305f678e9879999b4050554201bb6f130a55fae Author: Stephen Boyd Date: Fri May 7 14:25:05 2021 -0700 drm/msm/dp: Handle aux timeouts, nacks, defers Let's look at the irq status bits after a transfer and see if we got a nack or a defer or a timeout, instead of telling drm layers that everything was fine, while still printing an error message. I wasn't sure about NACK+DEFER so I lumped all those various errors along with a nack so that the drm core can figure out that things are just not going well. The important thing is that we're now returning -ETIMEDOUT when the message times out and nacks for bad addresses. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Reviewed-by: Kuogee Hsieh Link: https://lore.kernel.org/r/20210507212505.1224111-4-swboyd@chromium.org Signed-off-by: Rob Clark commit 47327fdd7e85ed4a90b76c2fcf69967f98230935 Author: Stephen Boyd Date: Fri May 7 14:25:04 2021 -0700 drm/msm/dp: Shrink locking area of dp_aux_transfer() We don't need to hold the lock to inspect the message we're going to transfer, and we don't need to clear the busy flag either. Take the lock later and bail out earlier if conditions aren't met. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Reviewed-by: Kuogee Hsieh Link: https://lore.kernel.org/r/20210507212505.1224111-3-swboyd@chromium.org Signed-off-by: Rob Clark commit 24c7861b811b05172733f4bdcce5737df9ba476b Author: Stephen Boyd Date: Fri May 7 14:25:03 2021 -0700 drm/msm/dp: Simplify aux irq handling code We don't need to stash away 'isr' in the aux structure to pass to two functions. Let's use a local variable instead. And we can complete the completion variable in one place instead of two to simplify the code. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Cc: Kuogee Hsieh Cc: aravindh@codeaurora.org Cc: Sean Paul Signed-off-by: Stephen Boyd Reviewed-by: Kuogee Hsieh Link: https://lore.kernel.org/r/20210507212505.1224111-2-swboyd@chromium.org Signed-off-by: Rob Clark commit 53e231705e1ceb9cc3be87dc36a50d057e0c8bad Author: Dmitry Baryshkov Date: Fri May 28 01:03:30 2021 +0300 drm/msm: fix display snapshotting if DP or DSI is disabled Fix following warnings generated when either DP or DSI support is disabled: drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c:141:3: error: implicit declaration of function 'msm_dp_snapshot'; did you mean 'msm_dsi_snapshot'? [-Werror=implicit-function-declaration] drivers/gpu/drm/msm/msm_kms.h:127:26: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:867:21: error: initialization of 'void (*)(struct msm_disp_state *, struct msm_kms *)' from incompatible pointer type 'void (*)(struct msm_disp_state *, struct msm_kms *)' [-Werror=incompatible-pointer-types] drivers/gpu/drm/msm/dsi/dsi.h:94:30: warning: 'struct msm_disp_state' declared inside parameter list will not be visible outside of this definition or declaration Reported-by: kernel test robot Cc: Abhinav Kumar Fixes: 1c3b7ac1a71d ("drm/msm: pass dump state as a function argument") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210527220330.3364716-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 9ef364432db4a11ff2dbee398d7ed06e93bdfe5e Author: Jonathan Marek Date: Fri Apr 23 15:08:21 2021 -0400 drm/msm: deprecate MSM_BO_UNCACHED (map as writecombine instead) There shouldn't be any reason to ever use uncached over writecombine, so just use writecombine for MSM_BO_UNCACHED. Note: userspace never used MSM_BO_UNCACHED anyway Signed-off-by: Jonathan Marek Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/20210423190833.25319-6-jonathan@marek.ca Signed-off-by: Rob Clark commit d12e339044a00ecae993b06672c38c168a92f0c3 Author: Jonathan Marek Date: Fri Apr 23 15:08:20 2021 -0400 drm/msm: add MSM_BO_CACHED_COHERENT Add a new cache mode for creating coherent host-cached BOs. Signed-off-by: Jonathan Marek Reviewed-by: Jordan Crouse Link: https://lore.kernel.org/r/20210423190833.25319-5-jonathan@marek.ca Signed-off-by: Rob Clark commit af9b3547079915d682d14ea98018d6fa6edf97ca Author: Jonathan Marek Date: Fri Apr 23 15:08:19 2021 -0400 drm/msm: use the right pgprot when mapping BOs in the kernel Use the same logic as the userspace mapping. This fixes msm_rd with cached BOs. Signed-off-by: Jonathan Marek Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/20210423190833.25319-4-jonathan@marek.ca Signed-off-by: Rob Clark commit a5fc7aa901b6818c67cc7e5cef8201fbaab8fa1b Author: Jonathan Marek Date: Fri Apr 23 15:08:18 2021 -0400 drm/msm: replace MSM_BO_UNCACHED with MSM_BO_WC for internal objects msm_gem_get_vaddr() currently always maps as writecombine, so use the right flag instead of relying on broken behavior (things don't actually work if they are mapped as uncached). Signed-off-by: Jonathan Marek Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/20210423190833.25319-3-jonathan@marek.ca Signed-off-by: Rob Clark commit 8eaf9b02acb5512db33d15ec039a6be285eaa5e2 Author: Jonathan Marek Date: Fri Apr 23 15:08:17 2021 -0400 drm/msm: remove unnecessary mmap logic for cached BOs No one knows what this is for anymore, so just remove it. Signed-off-by: Jonathan Marek Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/20210423190833.25319-2-jonathan@marek.ca Signed-off-by: Rob Clark commit d91940e28970390eadcd2faa0e1751409d62f4df Author: Dmitry Baryshkov Date: Tue Apr 27 03:18:28 2021 +0300 drm/msm/dsi: add DSI PHY registers to snapshot data Add DSI PHY registers to the msm state snapshots to be able to check their contents. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210427001828.2375555-5-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit bac2c6a62ed91ba4f6c7c14a6a40b7c696b35645 Author: Dmitry Baryshkov Date: Tue Apr 27 03:18:27 2021 +0300 drm/msm: get rid of msm_iomap_size Instead of looping throught the resources each time to get the DSI CTRL area size, get it at the ioremap time. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210427001828.2375555-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 2503003cb2b8cbf419c686af15cdf1239f4fff17 Author: Dmitry Baryshkov Date: Tue Apr 27 03:18:26 2021 +0300 drm/msm: make msm_disp_state transient data struct Instead of allocating snapshotting structure at the driver probe time and later handling concurrent access, actual state, etc, make msm_disp_state transient struct. Allocate one when snapshotting happens and free it after coredump data is read by userspace. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210427001828.2375555-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit eb9d6c7ebe44df4bf077e71de809bb7b216da38c Author: Dmitry Baryshkov Date: Tue Apr 27 03:18:25 2021 +0300 drm/msm: pass dump state as a function argument Instead of always getting the disp_state from drm device, pass it as an argument. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210427001828.2375555-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 2ec5b3dc18bab1108f49262e59fc22bb5939fe0b Author: Abhinav Kumar Date: Fri Apr 16 13:57:25 2021 -0700 drm/msm: add disp snapshot points across dpu driver Add snapshot points across dpu driver to trigger dumps when critical errors are hit. changes in v5: - change the callers to use the snapshot function directly Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-8-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit d87fe031bf3aac81d583f1ac57888691cc154dc5 Author: Abhinav Kumar Date: Fri Apr 16 13:57:24 2021 -0700 drm/msm: add support to take dsi, dp and dpu snapshot Add support to take the register snapshot of dsi, dp and dpu modules. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-7-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit a698b5cdfe63663dc6d5cb4c19109cd9757f8daf Author: Abhinav Kumar Date: Fri Apr 16 13:57:23 2021 -0700 drm/msm/disp/dpu1: add API to take DPU register snapshot Add an API to take a snapshot of DPU controller registers. This API will be used by the msm_disp_snapshot module to capture the DPU snapshot. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-6-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit 0f6090f37f801871b292c296ed34eb2b089a0477 Author: Abhinav Kumar Date: Fri Apr 16 13:57:22 2021 -0700 drm/msm/dp: add API to take DP register snapshot Add an API to take a snapshot of DP controller registers. This API will be used by the msm_disp_snapshot module to capture the DP snapshot. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-5-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit 9d30a4bcf43c255498a537169c9bf279e6ec55de Author: Abhinav Kumar Date: Fri Apr 16 13:57:21 2021 -0700 drm/msm/dsi: add API to take DSI register snapshot Add an API to take a snapshot of DSI controller registers. This API will be used by the msm_disp_snapshot module to capture the DSI snapshot. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-4-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit 98659487b845c05b6bed85d881713545db674c7c Author: Abhinav Kumar Date: Fri Apr 16 13:57:20 2021 -0700 drm/msm: add support to take dpu snapshot Add the msm_disp_snapshot module which adds supports to dump dpu registers and capture the drm atomic state which can be used in case of error conditions. changes in v5: - start storing disp_state in msm_kms instead of dpu_kms - get rid of MSM_DISP_SNAPSHOT_IN_* enum by simplifying the functions - move snprintf inside the snapshot core by using varargs - get rid of some stale code comments - allow snapshot module for non-DPU targets Reported-by: kernel test robot Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-3-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit a4324a7a1c3d57ecfba0fee3e8b2d370eb5597c9 Author: Abhinav Kumar Date: Fri Apr 16 13:57:19 2021 -0700 drm: allow drm_atomic_print_state() to accept any drm_printer Currently drm_atomic_print_state() internally allocates and uses a drm_info printer. Allow it to accept any drm_printer type so that the API can be leveraged even for taking drm snapshot. Rename the drm_atomic_print_state() to drm_atomic_print_new_state() so that it reflects its functionality better. changes in v5: - none Reported-by: kernel test robot Signed-off-by: Abhinav Kumar Reviewed-by: Daniel Vetter Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1618606645-19695-2-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit f21c8a276c2daddddf58d483b49b01d0603f0316 Author: Kuogee Hsieh Date: Fri May 21 15:25:30 2021 -0700 drm/msm/dp: handle irq_hpd with sink_count = 0 correctly irq_hpd interrupt should be handled after dongle plugged in and before dongle unplugged. Hence irq_hpd interrupt is enabled at the end of the plugin handle and disabled at the beginning of unplugged handle. Current irq_hpd with sink_count = 0 is wrongly handled same as the dongle unplugged which tears down the mainlink and disables the phy. This patch fixes this problem by only tearing down the mainlink but keeping phy enabled at irq_hpd with sink_count = 0 handle so that next irq_hpd with sink_count =1 can be handled by setup mainlink only. This patch also set dongle into D3 (power off) state at end of handling irq_hpd with sink_count = 0. Changes in v2: -- add ctrl->phy_Power_count Changes in v3: -- del ctrl->phy_Power_count -- add phy_power_off to dp_ctrl_off_link_stream() Changes in v4: -- return immediately if clock disable failed at dp_ctrl_off_link_stream() Changes in v5: -- set dongle to D3 (power off) state at dp_ctrl_off_link_stream() Changes in v6: -- add Fixes tag Fixes: ea9f337ce81e ("drm/msm/dp: reset dp controller only at boot up and pm_resume") Signed-off-by: Kuogee Hsieh Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1621635930-30161-1-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark commit 3099406ef4832124ce572cfbbc914e8a385ca38f Author: Imre Deak Date: Wed Jun 23 16:46:01 2021 +0300 ALSA: hda: Release codec display power during shutdown/reboot Similarly to the previous patch for the HDA controller make sure here that codecs also drop the display power reference during shutdown and reboot. This fixes a power ref leaked WARN in i915 during shutdown if the HDA driver is built with CONFIG_PM=n. Suggested-by: Takashi Iwai References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618 References: https://lore.kernel.org/intel-gfx/s5hzgvhngw6.wl-tiwai@suse.de Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20210623134601.2128663-2-imre.deak@intel.com Signed-off-by: Takashi Iwai commit 472e18f63c425dda97b888f40f858ea54e3efc17 Author: Imre Deak Date: Wed Jun 23 16:46:00 2021 +0300 ALSA: hda: Release controller display power during shutdown/reboot Make sure the HDA driver's display power reference is released during shutdown/reboot. During the shutdown/reboot sequence the pci device core calls the pm_runtime_resume handler for all devices before calling the driver's shutdown callback and so the HDA driver's runtime resume callback will acquire a display power reference (on HSW/BDW). This triggers a power reference held WARN on HSW/BDW in the i915 driver's subsequent shutdown handler, which expects all display power references to be released by that time. Since the HDA controller is stopped in the shutdown handler in any case, let's follow here the same sequence as the one during runtime suspend. This will also reset the HDA link and drop the display power reference, getting rid of the above WARN. Tested on HSW. v2: - Fix the build for CONFIG_PM=n (Takashi) - s/__azx_runtime_suspend/azx_shutdown_chip/ Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3618 References: https://lore.kernel.org/lkml/cea1f9a-52e0-b83-593d-52997fe1aaf6@er-systems.de Reported-and-tested-by: Thomas Voegtle Signed-off-by: Imre Deak Link: https://lore.kernel.org/r/20210623134601.2128663-1-imre.deak@intel.com Signed-off-by: Takashi Iwai commit 5d299f44d7658f4423e33a0b9915bc8d81687511 Author: Kees Cook Date: Mon Jun 21 16:23:22 2021 -0700 jfs: Avoid field-overflowing memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field array bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Introduce more unions to cover the full inline data section, so that the entire 256 bytes can be addressed by memcpy() without thinking it is crossing field boundaries. Additionally adjusts dir memcpy() to use existing union names to get the same coverage. diffoscope shows there are no binary differences before/after excepting the name of the initcall, which is line number based: $ diffoscope --exclude-directory-metadata yes before/fs after/fs --- before/fs +++ after/fs │ --- before/fs/jfs ├── +++ after/fs/jfs │ │ --- before/fs/jfs/super.o │ ├── +++ after/fs/jfs/super.o │ │ ├── readelf --wide --symbols {} │ │ │ @@ -2,15 +2,15 @@ │ │ │ Symbol table '.symtab' contains 158 entries: │ │ │ Num: Value Size Type Bind Vis Ndx Name ... │ │ │ - 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 6 __initcall__kmod_jfs__319_1049_ini t_jfs_fs6 │ │ │ + 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 6 __initcall__kmod_jfs__319_1050_ini t_jfs_fs6 ... Signed-off-by: Kees Cook Signed-off-by: Dave Kleikamp commit e15a56b7469529b4225e5c504ba6d51851e3bba4 Author: Zhen Lei Date: Thu Jun 17 17:02:38 2021 +0800 jfs: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Dave Kleikamp commit 9d574f985fe33efd6911f4d752de6f485a1ea732 Author: Pavel Skripkin Date: Sun Jun 6 17:24:05 2021 +0300 jfs: fix GPF in diFree Avoid passing inode with JFS_SBI(inode->i_sb)->ipimap == NULL to diFree()[1]. GFP will appear: struct inode *ipimap = JFS_SBI(ip->i_sb)->ipimap; struct inomap *imap = JFS_IP(ipimap)->i_imap; JFS_IP() will return invalid pointer when ipimap == NULL Call Trace: diFree+0x13d/0x2dc0 fs/jfs/jfs_imap.c:853 [1] jfs_evict_inode+0x2c9/0x370 fs/jfs/inode.c:154 evict+0x2ed/0x750 fs/inode.c:578 iput_final fs/inode.c:1654 [inline] iput.part.0+0x3fe/0x820 fs/inode.c:1680 iput+0x58/0x70 fs/inode.c:1670 Reported-and-tested-by: syzbot+0a89a7b56db04c21a656@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Dave Kleikamp commit 52218fcd61cb42bde0d301db4acb3ffdf3463cc7 Author: Zhenyu Ye Date: Wed Jun 23 15:05:22 2021 +0800 arm64: tlb: fix the TTL value of tlb_get_level The TTL field indicates the level of page table walk holding the *leaf* entry for the address being invalidated. But currently, the TTL field may be set to an incorrent value in the following stack: pte_free_tlb __pte_free_tlb tlb_remove_table tlb_table_invalidate tlb_flush_mmu_tlbonly tlb_flush In this case, we just want to flush a PTE page, but the tlb->cleared_pmds is set and we get tlb_level = 2 in the tlb_get_level() function. This may cause some unexpected problems. This patch set the TTL field to 0 if tlb->freed_tables is set. The tlb->freed_tables indicates page table pages are freed, not the leaf entry. Cc: # 5.9.x Fixes: c4ab2cbc1d87 ("arm64: tlb: Set the TTL field in flush_tlb_range") Acked-by: Catalin Marinas Reported-by: ZhuRui Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/b80ead47-1f88-3a00-18e1-cacc22f54cc4@huawei.com Signed-off-by: Will Deacon commit 0178f9d0f60ba07e09bab57381a3ef18e2c1fd7f Author: Jarkko Sakkinen Date: Wed Jun 9 16:26:19 2021 +0300 tpm: Replace WARN_ONCE() with dev_err_once() in tpm_tis_status() Do not tear down the system when getting invalid status from a TPM chip. This can happen when panic-on-warn is used. Instead, introduce TPM_TIS_INVALID_STATUS bitflag and use it to trigger once the error reporting per chip. In addition, print out the value of TPM_STS for improved forensics. Link: https://lore.kernel.org/keyrings/YKzlTR1AzUigShtZ@kroah.com/ Fixes: 55707d531af6 ("tpm_tis: Add a check for invalid status") Cc: stable@vger.kernel.org Signed-off-by: Jarkko Sakkinen Reviewed-by: Greg Kroah-Hartman commit 5a118a39ec9207f9b8cddb013ad270c80bc84a1c Author: Zhen Lei Date: Thu Jun 3 15:49:55 2021 +0800 tpm_tis: Use DEFINE_RES_MEM() to simplify code Use DEFINE_RES_MEM() to save a couple of lines of code, which is simpler and more readable. The start address does not need to appear twice. Signed-off-by: Zhen Lei Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 6e0fe58b08e747c73b848de92ccec944f31dddce Author: Yang Yingliang Date: Tue Jun 1 20:22:30 2021 +0800 tpm: fix some doc warnings in tpm1-cmd.c Fix the following make W=1 warnings: drivers/char/tpm/tpm1-cmd.c:325: warning: expecting prototype for tpm_startup(). Prototype was for tpm1_startup() instead drivers/char/tpm/tpm1-cmd.c:621: warning: expecting prototype for tpm_continue_selftest(). Prototype was for tpm1_continue_selftest() instead Signed-off-by: Yang Yingliang Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c46ed2281bbe4b84e6f3d4bdfb0e4e9ab813fa9d Author: Javier Martinez Canillas Date: Thu May 27 17:23:52 2021 +0200 tpm_tis_spi: add missing SPI device ID entries The SPI core always reports a "MODALIAS=spi:", even if the device was registered via OF. This means that this module won't auto-load if a DT has for example has a node with a compatible "infineon,slb9670" string. In that case kmod will expect a "MODALIAS=of:N*T*Cinfineon,slb9670" uevent but instead will get a "MODALIAS=spi:slb9670", which is not present in the kernel module aliases: $ modinfo drivers/char/tpm/tpm_tis_spi.ko | grep alias alias: of:N*T*Cgoogle,cr50C* alias: of:N*T*Cgoogle,cr50 alias: of:N*T*Ctcg,tpm_tis-spiC* alias: of:N*T*Ctcg,tpm_tis-spi alias: of:N*T*Cinfineon,slb9670C* alias: of:N*T*Cinfineon,slb9670 alias: of:N*T*Cst,st33htpm-spiC* alias: of:N*T*Cst,st33htpm-spi alias: spi:cr50 alias: spi:tpm_tis_spi alias: acpi*:SMO0768:* To workaround this issue, add in the SPI device ID table all the entries that are present in the OF device ID table. Reported-by: Alexander Wellbrock Signed-off-by: Javier Martinez Canillas Tested-by: Peter Robinson Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 5317677db4290366c95f4209de387d6c9b48707f Author: Amir Mizinski Date: Tue May 25 14:13:25 2021 +0300 tpm: add longer timeout for TPM2_CC_VERIFY_SIGNATURE While running a TPM2_CC_VERIFY_SIGNATURE operation with RSA 3072-bit keys the TPM driver fails with the following error: "kernel: [ 2416.187522] tpm tpm0: Operation Timed out" Since the TPM PC Client specification does not specify a number for verify signature operation timeout, and the duration of TPM2_CC_VERIFY_SIGNATURE with RSA 3072-bit keys exceeds the current timeout of TPM_LONG (2 seconds), it is preferable to pick the longest timeout possible. Therefore, set the duration for TPM2_CC_VERIFY_SIGNATUE to TPM_LONG_LONG (5 minutes). [jarkko@kernel.org: mangled the short summary a bit] Link: https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/ Signed-off-by: Amir Mizinski Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 446cd6f0f3045dd971845e2082ff7b5dbd235743 Author: Tian Tao Date: Mon May 17 09:18:44 2021 +0800 char: tpm: move to use request_irq by IRQF_NO_AUTOEN flag disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. Link: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 114e43371c58992c3ceece219cc359f16314b2c9 Author: Liguang Zhang Date: Fri May 7 22:52:55 2021 +0800 tpm_tis_spi: set default probe function if device id not match In DSDT table, TPM _CID was SMO0768, and no _HID definition. After a kernel upgrade from 4.19 to 5.10, TPM probe function was changed which causes device probe fails. In order to make newer kernel to be compatible with the older acpi definition, it would be best set default probe function. Signed-off-by: Liguang Zhang Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 7937bd532fe6f6342206b3e002bd791bf25085e0 Author: Tian Tao Date: Thu Apr 29 15:39:39 2021 +0800 tpm_crb: Use IOMEM_ERR_PTR when function returns iomem This is to simplify the code, and IOMEM_ERR_PTR(err) is same with (__force void __iomem *)ERR_PTR(err). Signed-off-by: Tian Tao Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 6e899fa027addf2dd069714184c58a7c8c4b3030 Author: Bassem Dawood Date: Sat Feb 27 16:58:15 2021 +1100 mac80211: Enable power save after receiving NULL packet ACK Trigger dynamic_ps_timer to re-evaluate power saving once a null function packet (with PM = 1) is ACKed, otherwise dynamic PS is not enabled at that point. Signed-off-by: Bassem Dawood Link: https://lore.kernel.org/r/20210227055815.14838-1-bassem@morsemicro.com [reformatting] Signed-off-by: Johannes Berg commit 52dfd86aa568e433b24357bb5fc725560f1e22d8 Author: Hans de Goede Date: Thu Jan 21 12:54:18 2021 +0100 vboxsf: Add support for the atomic_open directory-inode op Opening a new file is done in 2 steps on regular filesystems: 1. Call the create inode-op on the parent-dir to create an inode to hold the meta-data related to the file. 2. Call the open file-op to get a handle for the file. vboxsf however does not really use disk-backed inodes because it is based on passing through file-related system-calls through to the hypervisor. So both steps translate to an open(2) call being passed through to the hypervisor. With the handle returned by the first call immediately being closed again. Making 2 open calls for a single open(..., O_CREATE, ...) calls has 2 problems: a) It is not really efficient. b) It actually breaks some apps. An example of b) is doing a git clone inside a vboxsf mount. When git clone tries to create a tempfile to store the pak files which is downloading the following happens: 1. vboxsf_dir_mkfile() gets called with a mode of 0444 and succeeds. 2. vboxsf_file_open() gets called with file->f_flags containing O_RDWR. When the host is a Linux machine this fails because doing a open(..., O_RDWR) on a file which exists and has mode 0444 results in an -EPERM error. Other network-filesystems and fuse avoid the problem of needing to pass 2 open() calls to the other side by using the atomic_open directory-inode op. This commit fixes git clone not working inside a vboxsf mount, by adding support for the atomic_open directory-inode op. As an added bonus this should also make opening new files faster. The atomic_open implementation is modelled after the atomic_open implementations from the 9p and fuse code. Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support") Reported-by: Ludovic Pouzenc Signed-off-by: Hans de Goede commit 02f840f90764f22f5c898901849bdbf0cee752ba Author: Hans de Goede Date: Thu Jan 21 10:55:03 2021 +0100 vboxsf: Add vboxsf_[create|release]_sf_handle() helpers Factor out the code to create / release a struct vboxsf_handle into 2 new helper functions. This is a preparation patch for adding atomic_open support. Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support") Signed-off-by: Hans de Goede commit ab0c29687bc7a890d1a86ac376b0b0fd78b2d9b6 Author: Hans de Goede Date: Thu Jan 21 10:22:27 2021 +0100 vboxsf: Make vboxsf_dir_create() return the handle for the created file Make vboxsf_dir_create() optionally return the vboxsf-handle for the created file. This is a preparation patch for adding atomic_open support. Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support") Signed-off-by: Hans de Goede commit cc3ddee97cff034cea4d095de4a484c92a219bf5 Author: Hans de Goede Date: Thu Jan 21 10:08:59 2021 +0100 vboxsf: Honor excl flag to the dir-inode create op Honor the excl flag to the dir-inode create op, instead of behaving as if it is always set. Note the old behavior still worked most of the time since a non-exclusive open only calls the create op, if there is a race and the file is created between the dentry lookup and the calling of the create call. While at it change the type of the is_dir parameter to the vboxsf_dir_create() helper from an int to a bool, to be consistent with the use of bool for the excl parameter. Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support") Signed-off-by: Hans de Goede commit 0ac05b25c3dd8299204ae9d50c1c2f7f05eef08f Author: Takashi Iwai Date: Wed Jun 23 14:20:22 2021 +0200 ALSA: hda/realtek: Apply LED fixup for HP Dragonfly G1, too HP Dragonfly G1 (SSID 103c:861f) also requires the same quirk for the mute and mic-mute LED just as Dragonfly G2 model. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213329 Cc: Link: https://lore.kernel.org/r/20210623122022.26179-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d4e1406618a1bdb2f5379213a6b8c9c5fa3bdac7 Merge: 5471a8123503c d97c0ff5a124f Author: Greg Kroah-Hartman Date: Wed Jun 23 13:37:29 2021 +0200 Merge tag 'extcon-next-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon next for v5.14 Detailed description for this pull request: 1. Update extcon-sm5502 provider driver - Convert devicetree binding document sytle with yaml for extcon-sm5502.c and add support for SM5504 chip to extcon-sm5502.c. - Use devm_regmap_add_irq_chip and probe_new for extcon-sm5502.c 2. Add missing modalias string for extcon-max8997.c. 3. Initialize the status data of extcon-intel-mrfld.c on probe time in order to prevent the mismatch issue. * tag 'extcon-next-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: sm5502: Add support for SM5504 extcon: sm5502: Refactor driver to use chip-specific struct dt-bindings: extcon: sm5502: Document siliconmitus,sm5504-muic dt-bindings: extcon: sm5502: Convert to DT schema extcon: sm5502: Implement i2c_driver->probe_new() extcon: sm5502: Use devm_regmap_add_irq_chip() extcon: max8997: Add missing modalias string extcon: sm5502: Drop invalid register write in sm5502_reg_data extcon: intel-mrfld: Sync hardware and software state on init commit c58c7e9bf55ced301fdd9c8c1841361cc5fc8458 Author: Jon Lin Date: Mon Jun 21 18:47:55 2021 +0800 spi: spi-rockchip: add description for rv1126 The description below will be used for rv1126.dtsi or compatible one in the future Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20210621104800.19088-2-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 736b81e075172f1e6cd7a8bc1a1374a2dee9e4dc Author: Jon Lin Date: Mon Jun 21 18:48:48 2021 +0800 spi: rockchip: Support SPI_CS_HIGH 1.Add standard spi-cs-high support 2.Refer to spi-controller.yaml for details Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20210621104848.19539-2-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit b8d423711d1870c5e1280d5bbb0639fe6638a60e Author: Jon Lin Date: Mon Jun 21 18:48:47 2021 +0800 spi: rockchip: Support cs-gpio 1.Add standard cs-gpio support 2.Refer to spi-controller.yaml for details Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20210621104848.19539-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 2758bd093ac35ca5b62dbecfd30dab60e8b59790 Author: Jon Lin Date: Mon Jun 21 18:47:58 2021 +0800 spi: rockchip: Wait for STB status in slave mode tx_xfer After ROCKCHIP_SPI_VER2_TYPE2, SR->STB is a more accurate judgment bit for spi slave transmition. Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20210621104800.19088-5-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 4a47fcdb5f8b220a396e896a4efed51c13e27d8b Author: Jon Lin Date: Mon Jun 21 18:47:57 2021 +0800 spi: rockchip: Set rx_fifo interrupt waterline base on transfer item The error here is to calculate the width as 8 bits. In fact, 16 bits should be considered. Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20210621104800.19088-4-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 0f4f58b847b23d79185ad20ecf629c9f913f4f41 Author: Jon Lin Date: Mon Jun 21 18:47:56 2021 +0800 spi: rockchip: add compatible string for rv1126 Add compatible string for rv1126 for potential applications. Signed-off-by: Jon Lin Link: https://lore.kernel.org/r/20210621104800.19088-3-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit ddf275b219ab22bc07c14ac88c290694089dced0 Author: Colin Ian King Date: Tue Jun 22 15:47:30 2021 +0100 regulator: bd9576: Fix uninitializes variable may_have_irqs The boolean variable may_have_irqs is not ininitialized and is only being set to true in the case where chip is ROHM_CHIP_TYPE_BD9576. Fix this by ininitialized may_have_irqs to false. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: e7bf1fa58c46 ("regulator: bd9576: Support error reporting") Signed-off-by: Colin Ian King Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210622144730.22821-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 1aeb1a72f330a0fa21610fb44769cd0e68379418 Author: Axel Lin Date: Tue Jun 22 22:15:26 2021 +0800 regulator: max8893: Select REGMAP_I2C to fix build error Fix build error if REGMAP_I2C is not set. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210622141526.472175-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit a336dc8f683e5be794186b5643cd34cb28dd2c53 Author: Axel Lin Date: Fri Jun 18 22:14:11 2021 +0800 regulator: da9052: Ensure enough delay time for .set_voltage_time_sel Use DIV_ROUND_UP to prevent truncation by integer division issue. This ensures we return enough delay time. Also fix returning negative value when new_sel < old_sel. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210618141412.4014912-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit c3ab0e28a437c213e5e2c1d890f3891b6952b9ca Merge: ba1f82456ba84 51696f39cbee5 Author: Paolo Bonzini Date: Wed Jun 23 05:43:45 2021 -0400 Merge branch 'topic/ppc-kvm' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux into HEAD - Support for the H_RPT_INVALIDATE hypercall - Conversion of Book3S entry/exit to C - Bug fixes commit 65be6aa36ded2d2e3bf5058f4d3385b5a2a7ef2e Author: Johannes Berg Date: Wed Jun 23 13:05:47 2021 +0200 mac80211: add HE 6 GHz capability only if supported The HE 6 GHz capability should only be included if there are actually available channels on 6 GHz, and if that's the case we need to get it from the 6 GHz band data, not whatever other band we're on now. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.290bf5c87030.I178aff1c3a6e32456d4ac9238e4a2eb47d209ccd@changeid Link: https://lore.kernel.org/r/iwlwifi.20210618133832.05e935e8dd98.I83ff7eb2ae8ebdf2e30c4fa2461344d9e569f599@changeid Signed-off-by: Johannes Berg commit 15fae3410f1d879b18e08fe8ef293d538549dfcb Author: Johannes Berg Date: Fri Jun 18 13:41:55 2021 +0300 mac80211: notify driver on mgd TX completion We have mgd_prepare_tx(), but sometimes drivers may want/need to take action when the exchange finishes, whether successfully or not. Add a notification to the driver on completion, i.e. call the new method mgd_complete_tx(). To unify the two scenarios, and to add more information, make both of them take a struct that has the duration (prepare only), subtype (both) and success (complete only). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.5d94e78f6230.I6dc979606b6f28701b740d7aab725f7853a5a155@changeid Signed-off-by: Johannes Berg commit 7d29bc50b30e58102dd0e7a6beb1a72cc41029c5 Author: Johannes Berg Date: Fri Jun 18 13:41:42 2021 +0300 mac80211: always include HE 6GHz capability in probe request If HE/6GHz is available (thus we consider dot11HE6GOptionImplemented to be true), then always include the corresponding capability in the probe request as required by the spec. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.25ee4a54a7d0.I8cebd799c85524c8123a11941a104dbdefc03762@changeid Signed-off-by: Johannes Berg commit 52bb205213a8169cc40e1eba96483a9e488c17d3 Author: Ilan Peer Date: Fri Jun 18 13:41:41 2021 +0300 cfg80211: Support hidden AP discovery over 6GHz band To discover a hidden AP on the 6GHz band, the probe request sent to the AP needs to include the AP's SSID, as some APs would not respond with a probe response based only on short SSID match. To support hidden AP discovery over the 6GHz band, when constructing the specific 6GHz band scan also include SSIDs that were part of the original scan request, so these can be used in the probe requests transmitted during scan. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.218df9d3203c.Ice0f7a2f6a65f1f9710b7898591481baeefaf490@changeid Signed-off-by: Johannes Berg commit 9bd6a83e53a7a4d82f95b354856b64f4359cdddc Author: Johannes Berg Date: Fri Jun 18 13:41:53 2021 +0300 mac80211: add vendor-specific capabilities to assoc request When sending an association request, add any vendor specific capabilities at the end of the frame. This way, mac80211 is still completely in charge of building the frame, but drivers can determine what should be added depending on the band and interface type. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.80d716d69a5f.I28097ff19be6b22aebdc33a72795d2662755d41f@changeid Signed-off-by: Johannes Berg commit f4f8650588d35deafaa4a4e28cceb3557a71e711 Author: Johannes Berg Date: Fri Jun 18 13:41:52 2021 +0300 cfg80211: allow advertising vendor-specific capabilities There may be cases where vendor-specific elements need to be used over the air. Rather than have driver or firmware add them and possibly cause problems that way, add them to the iftype-data band capabilities. This way we can advertise to userspace first, and use them in mac80211 next. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.e8c4f0347276.Iee5964682b3e9ec51fc1cd57a7c62383eaf6ddd7@changeid Signed-off-by: Johannes Berg commit 1b7b3ac8ff3317cdcf07a1c413de9bdb68019c2b Author: Miri Korenblit Date: Fri Jun 18 13:41:46 2021 +0300 cfg80211: set custom regdomain after wiphy registration We used to set regulatory info before the registration of the device and then the regulatory info didn't get set, because the device isn't registered so there isn't a device to set the regulatory info for. So set the regulatory info after the device registration. Call reg_process_self_managed_hints() once again after the device registration because it does nothing before it. Signed-off-by: Miri Korenblit Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.c96eadcffe80.I86799c2c866b5610b4cf91115c21d8ceb525c5aa@changeid Signed-off-by: Johannes Berg commit 0bc47057b54b73e5f6d36bfc7c5c96e15be1f221 Author: Johannes Berg Date: Fri Jun 18 13:41:40 2021 +0300 mac80211: conditionally advertise HE in probe requests While building probe requests, only enable HE capability if there are actually any channels in the band with HE enabled, otherwise we're not really capable. We're doing the same in association requests, so doing it here makes it consistent. This also makes HE not appear available if it isn't due to regulatory constraints. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.b5513f2af335.Ic01862678712ae4238cea43ad2185928865efad2@changeid Signed-off-by: Johannes Berg commit be989891e4f2ff5649bf22ab05a7cdd3a287e34b Author: Johannes Berg Date: Fri Jun 18 13:41:39 2021 +0300 cfg80211: add cfg80211_any_usable_channels() This helper function checks if there are any usable channels on any of the given bands with the given properties (as expressed by disallowed channel flags). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.2b613addaa85.Idaf8b859089490537878a7de5c7453a873a3f638@changeid Signed-off-by: Johannes Berg commit 723ca2f89412abe47b7cbb276f683ddb292c172c Author: Zhen Lei Date: Thu Jun 17 18:31:41 2021 +0800 ASoC: fsl: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210617103141.1765-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown commit 8e0eb2fb5c0732a6fa53f2df7079754152857c24 Author: Claudius Heine Date: Thu Jun 17 10:52:30 2021 +0200 ASoC: tlv320aic32x4: dt-bindings: add TAS2505 to compatible This adds 'ti,tas2505' for TAS2505 to the list of allowed compatible strings. Signed-off-by: Claudius Heine Link: https://lore.kernel.org/r/20210617085230.1851503-4-ch@denx.de Signed-off-by: Mark Brown commit b4525b6196cd7f83eba16d8679a55f8bb9571052 Author: Claudius Heine Date: Thu Jun 17 10:52:29 2021 +0200 ASoC: tlv320aic32x4: add support for TAS2505 This adds support for TAS2505 and TAS2521 to the tlv320aic32x4 driver. The TAS2505 seems to be a stripped down version of the TLV320AIC32X4 so it makes sense to handle them in the same driver. Signed-off-by: Claudius Heine Link: https://lore.kernel.org/r/20210617085230.1851503-3-ch@denx.de Signed-off-by: Mark Brown commit 688d47cdd9344b1485eb28c2a7aa99743ed529a3 Author: Claudius Heine Date: Thu Jun 17 10:52:28 2021 +0200 ASoC: tlv320aic32x4: add type to device private data struct While this driver can already handle different device variants, the variant information cannot be used in the driver code and therefor cannot have different code paths depending on the device variant. This change adds a `type` value into the `aic32x4_priv` structure, that contains a device variant identifier, which was set when the driver was bound to the device. Signed-off-by: Claudius Heine Link: https://lore.kernel.org/r/20210617085230.1851503-2-ch@denx.de Signed-off-by: Mark Brown commit fc8344e63e595fa1f2e783aaae0253570cd8eea8 Author: Yang Yingliang Date: Fri Jun 18 10:47:22 2021 +0800 ASoC: tegra30: ahub: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210618024722.2618842-5-yangyingliang@huawei.com Signed-off-by: Mark Brown commit c29b6382d23c8bea604033f98604b7b1e543b1e7 Author: Yang Yingliang Date: Fri Jun 18 10:47:21 2021 +0800 ASoC: tegra: tegra210_admaif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210618024722.2618842-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 8d81f0da47bbea7f4eb6cdae5210c8c3bd8ce50f Author: Yang Yingliang Date: Fri Jun 18 10:47:20 2021 +0800 ASoC: tegra20: spdif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210618024722.2618842-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 8ad9e5baa90f76c5125b23419fc458e206371bce Author: Yang Yingliang Date: Fri Jun 18 10:47:19 2021 +0800 ASoC: tegra20: i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210618024722.2618842-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 0d7993b234c9fad8cb6bec6adfaa74694ba85ecb Author: Mirko Vogt Date: Mon Jun 14 16:45:07 2021 +0200 spi: spi-sun6i: Fix chipselect/clock bug The current sun6i SPI implementation initializes the transfer too early, resulting in SCK going high before the transfer. When using an additional (gpio) chipselect with sun6i, the chipselect is asserted at a time when clock is high, making the SPI transfer fail. This is due to SUN6I_GBL_CTL_BUS_ENABLE being written into SUN6I_GBL_CTL_REG at an early stage. Moving that to the transfer function, hence, right before the transfer starts, mitigates that problem. Fixes: 3558fe900e8af (spi: sunxi: Add Allwinner A31 SPI controller driver) Signed-off-by: Mirko Vogt Signed-off-by: Ralf Schlatterbeck Link: https://lore.kernel.org/r/20210614144507.y3udezjfbko7eavv@runtux.com Signed-off-by: Mark Brown commit 50c9462edcbf900f3d5097ca3ad60171346124de Author: Hsin-Hsiung Wang Date: Wed Jun 23 12:56:09 2021 +0800 regulator: mt6358: Fix vdram2 .vsel_mask The valid vsel value are 0 and 12, so the .vsel_mask should be 0xf. Signed-off-by: Hsin-Hsiung Wang Reviewed-by: Axel Lin Link: https://lore.kernel.org/r/1624424169-510-1-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Mark Brown commit a7a0a2feb957e446b2bcf732f245ba04fc8b6314 Author: Shengjiu Wang Date: Tue Jun 22 20:31:24 2021 +0800 ASoC: fsl_spdif: Fix unexpected interrupt after suspend When system enter suspend, the machine driver suspend callback function will be called, then the cpu driver trigger callback (SNDRV_PCM_TRIGGER_SUSPEND) be called, it would disable the interrupt. But the machine driver suspend and cpu dai driver suspend order maybe changed, the cpu dai driver's suspend callback is called before machine driver's suppend callback, then the interrupt is not cleared successfully in trigger callback. So need to clear interrupts in cpu dai driver's suspend callback to avoid such issue. Fixes: 9cb2b3796e08 ("ASoC: fsl_spdif: Add pm runtime function") Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1624365084-7934-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit b767ecdaf98a999ef710f4f290bdd89257a90db0 Author: Johannes Berg Date: Fri Jun 18 13:41:56 2021 +0300 cfg80211: reg: improve bad regulatory warning There's a WARN_ON here but it says nothing, and the later dump of the regdomain aren't usually printed. As a first step, include the regdomain code in the WARN_ON message, just like in other similar instances. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.853ffdd6c62b.I63e37b2ab184ee3653686e4df4dd23eb303687d2@changeid Signed-off-by: Johannes Berg commit aeddc05fa9cff35402fc569cc6e7fca6ee36bac1 Author: Sosthène Guédon Date: Thu Jun 3 19:39:39 2021 +0200 nl80211: Fix typo pmsr->pmsr This was mis-spelled in the policy, fix that. Signed-off-by: Sosthène Guédon Link: https://lore.kernel.org/r/YLkT27RG0DaWLUot@arch.localdomain Signed-off-by: Johannes Berg commit ab4040df6efb87f92c7ec5bd65b5a093654d6a85 Author: Zheng Yongjun Date: Mon Jun 7 23:00:47 2021 +0800 mac80211: fix some spelling mistakes Fix some spelling mistakes in comments: freeed ==> freed addreses ==> addresses containging ==> containing capablity ==> capability sucess ==> success atleast ==> at least Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20210607150047.2855962-1-zhengyongjun3@huawei.com Signed-off-by: Johannes Berg commit 8d9d46bbf3b6b7ff8edcac33603ab45c29e0e07f Author: Joerg Roedel Date: Tue Jun 22 16:48:25 2021 +0200 x86/sev: Use "SEV: " prefix for messages from sev.c The source file has been renamed froms sev-es.c to sev.c, but the messages are still prefixed with "SEV-ES: ". Change that to "SEV: " to make it consistent. Fixes: e759959fe3b8 ("x86/sev-es: Rename sev-es.{ch} to sev.{ch}") Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210622144825.27588-4-joro@8bytes.org commit f253683e602996b250db7a3a7b77e0e908c9dbbc Author: Johannes Berg Date: Fri Jun 18 13:41:51 2021 +0300 cfg80211: remove ieee80211_get_he_sta_cap() This function turned out to be too easy to misuse since it doesn't consider the interface type. Remove it now that we no longer use it in mac80211. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.8c9c72f914b0.I68e9c0626dc77a0f67f238a05ae16a0b77b09895@changeid Signed-off-by: Johannes Berg commit bac2fd3d753430032043098dd55543037e3f7a60 Author: Johannes Berg Date: Fri Jun 18 13:41:50 2021 +0300 mac80211: remove use of ieee80211_get_he_sta_cap() All uses of ieee80211_get_he_sta_cap() were actually wrong, in net/mac80211/mlme.c they were wrong because that code is also used for P2P (which is a different interface type), in net/mac80211/main.c that should check all interface types. Fix all that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.ede114bc8b46.Ibcd9a5d98430e936344eb6d242ef8a65c2f59b74@changeid Signed-off-by: Johannes Berg commit 64a8747238291c7c497517ab2590c473f708d9be Author: Johannes Berg Date: Fri Jun 18 13:41:48 2021 +0300 cfg80211: trace more information in assoc trace event Add more information to the assoc trace event so we can see more precisely what's going on and what options were used. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.86c58fca486d.Iabd8f036d2ef1d770fd20ed3ccd149f32154f430@changeid Signed-off-by: Johannes Berg commit 6516ee22f2a99efca7211ff61f23f778c988bfd4 Author: Johannes Berg Date: Fri Jun 18 13:41:47 2021 +0300 mac80211: improve AP disconnect message If the AP changes capability/bandwidth in some fashion, the message might be somewhat misleading and we don't know what really changed. Modify the message to speak about "caps/bw" instead of just "bandwidth", and print out the flags. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.dc22c48985fa.I4bf5fbc17ec783c21d4b50c8c35b1de390896ccd@changeid Signed-off-by: Johannes Berg commit c74025f47ac855344d1188a4224a7af216843b22 Author: Johannes Berg Date: Fri Jun 18 13:41:44 2021 +0300 mac80211: rearrange struct txq_info for fewer holes We can slightly decrease the size of struct txq_info by rearranging some fields for fewer holes, so do that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.1bf019a1fe2e.Ib54622b8d6dc1a9a7dc484e573c073119450538b@changeid Signed-off-by: Johannes Berg commit 9c7c637050b42b6e368bb39b8d0edff728268341 Author: Johannes Berg Date: Fri Jun 18 13:41:38 2021 +0300 ieee80211: add defines for HE PHY cap byte 10 One bit out of the previously completely reserved byte 10 in the PHY capabilities is used since 802.11ax D7.0, add a new define for it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.c026feb3873d.I380f52a05ddb4153bc77ff7f276a3484819f69b2@changeid Signed-off-by: Johannes Berg commit 45daaa1318410794de956fb8e9d06aed2dbb23d0 Author: Ilan Peer Date: Fri Jun 18 13:41:37 2021 +0300 mac80211: Properly WARN on HW scan before restart The following race was possible: 1. The device driver requests HW restart. 2. A scan is requested from user space and is propagated to the driver. During this flow HW_SCANNING flag is set. 3. The thread that handles the HW restart is scheduled, and before starting the actual reconfiguration it checks that HW_SCANNING is not set. The flow does so without acquiring any lock, and thus the WARN fires. Fix this by checking that HW_SCANNING is on only after RTNL is acquired, i.e., user space scan request handling is no longer in transit. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.8238ab3e19ab.I2693c581c70251472b4f9089e37e06fb2c18268f@changeid Signed-off-by: Johannes Berg commit dd3e4fc75b4ab8186a133cfe9d49666a2f8186e0 Author: Avraham Stern Date: Fri Jun 18 13:41:36 2021 +0300 nl80211/cfg80211: add BSS color to NDP ranging parameters In NDP ranging, the initiator need to set the BSS color in the NDP to the BSS color of the responder. Add the BSS color as a parameter for NDP ranging. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.f097a6144b59.I27dec8b994df52e691925ea61be4dd4fa6d396c0@changeid Signed-off-by: Johannes Berg commit d8b261548dcf1058646cc48159c88d42d4b9a3b6 Author: Shaul Triebitz Date: Fri Jun 18 13:41:35 2021 +0300 mac80211: add to bss_conf if broadcast TWT is supported Add to struct ieee80211_bss_conf a twt_broadcast field. Set it to true if both STA and AP support broadcast TWT. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.f7c105237541.I50b302044e2b35e5ed4d3fb8bc7bd3d8bb89b1e1@changeid Signed-off-by: Johannes Berg commit 7da70d6cdf0dbc2c62e4a5759db9b63ef8d90c32 Author: Krishnanand Prabhu Date: Fri Jun 18 13:41:28 2021 +0300 ieee80211: define timing measurement in extended capabilities IE Define the bit used for timing measurement support in extended capabilities IE, used for time synchronization. Signed-off-by: Krishnanand Prabhu Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.b75f40765538.I92b50e43e29272c97d17ed5f37f216f4caf0f205@changeid Signed-off-by: Johannes Berg commit d6c375095ade4ea4d20ada1f020c821bf0bfe7fa Author: Mordechay Goodstein Date: Fri Jun 18 13:41:30 2021 +0300 mac80211: handle rate control (RC) racing with chanctx definition chanctx represents the current phy configuration and rate scale uses it for achieving max throughput, so if phy changes bandwidth to narrow bandwidth, RC should be _first_ updated to avoid using the wider bandwidth before updating the phy, and vice versa. We assume in the patch that station interface is always updated before updating phy context by calling ieee80211_vif_update_chandef. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.fc4e24496aa2.Ic40ea947c2f65739ea4b5fe3babd0a544240ced6@changeid Signed-off-by: Johannes Berg commit 7d7b00759e56bd2c0ff8b1155cb00f452dfc1c5d Author: Johannes Berg Date: Fri Jun 18 13:41:33 2021 +0300 mac80211: free skb in WEP error case If, for some strange reason, ieee80211_wep_encrypt() fails in ieee80211_send_auth() free the SKB instead of sending out the useless frame, in addition to the warning. This can't really happen since the SKB was freshly allocated. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.98f058d7a8b2.Ie605e6a10e72eae02f5734032826af48b85b6d11@changeid Signed-off-by: Johannes Berg commit 79ea0a5fad749dabfd7b8a1b73dd6662383762d1 Author: Shaul Triebitz Date: Fri Jun 18 13:41:34 2021 +0300 mac80211: move SMPS mode setting after ieee80211_prep_connection ieee80211_mgd_assoc calls ieee80211_prep_connection which might call ieee80211_prep_channel and set smps_mode to OFF. That will override the previous setting of smps_mode in ieee80211_mgd_assoc and HT SMPS will be set to "disabled" in the association request frame. Move the setting of smps_mode in ieee80211_mgd_assoc to after the call to ieee80211_prep_connection. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.d8e5cc4b527f.Icf3a67fffbdd8c408c0cadfe43f8f4cffdc90acb@changeid Signed-off-by: Johannes Berg commit 10a35c222bc6fdd71421e800003b4c4c02d41bba Author: Johannes Berg Date: Fri Jun 18 13:41:32 2021 +0300 mac80211: allow SMPS requests only in client mode The code currently allows this for AP mode, but then ignores it. Clarify that since the spec doesn't allow it in AP mode. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.0465f8bcbe32.Iba39fc559ecfa887be00a5f3beabd881e5c86e54@changeid Signed-off-by: Johannes Berg commit e41eb3e408de27982a5f8f50b2dd8002bed96908 Author: Felix Fietkau Date: Sat Jun 19 12:15:17 2021 +0200 mac80211: remove iwlwifi specific workaround that broke sta NDP tx Sending nulldata packets is important for sw AP link probing and detecting 4-address mode links. The checks that dropped these packets were apparently added to work around an iwlwifi firmware bug with multi-TID aggregation. Fixes: 41cbb0f5a295 ("mac80211: add support for HE") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20210619101517.90806-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 1806239dec0dacde373f0b53f076319f6c6d95cb Author: Christophe JAILLET Date: Sat Jun 19 15:36:30 2021 +0200 ieee80211: add the value for Category '6' in "rtw_ieee80211_category" Preparation work for removing the "enum rtw_ieee80211_category" in "drivers/staging/rtl8188eu/include/ieee80211.h" and "drivers/staging/rtl8723bs/include/ieee80211.h". This enum is similar to "enum ieee80211_category" from "include/linux/ieee80211.h". However it defines the value '6' as RTW_WLAN_CATEGORY_FT. So add a corresponding value in "ieee80211_category" Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/66be0187869bd7dae1c0b0785a32db695ee9872e.1624108556.git.christophe.jaillet@wanadoo.fr Signed-off-by: Johannes Berg commit 93efeeea0fe6b3352e492e855a7262bc5645af14 Author: Nguyen Dinh Phi Date: Tue Jun 22 23:24:29 2021 +0800 mac80211_hwsim: record stats in non-netlink path The data go through mac80211_hwsim_tx_frame_no_nl() wasn't counted. Signed-off-by: Nguyen Dinh Phi Link: https://lore.kernel.org/r/20210622152429.881230-1-phind.uet@gmail.com Signed-off-by: Johannes Berg commit 626c30f9e77354301ff9162c3bdddaf92d9b5cf3 Author: Weilun Du Date: Thu May 6 11:05:29 2021 -0700 mac80211_hwsim: add concurrent channels scanning support over virtio This fixed the crash when setting channels to 2 or more when communicating over virtio. Signed-off-by: Weilun Du Link: https://lore.kernel.org/r/20210506180530.3418576-1-wdu@google.com Signed-off-by: Johannes Berg commit e6ed929b4140d293bf8523f0376ed9bbdce29c47 Author: Wen Gong Date: Sun May 23 23:36:24 2021 -0400 wireless: add check of field VHT Extended NSS BW Capable for 160/80+80 MHz setting Table 9-251—Supported VHT-MCS and NSS Set subfields, it has subfield VHT Extended NSS BW Capable, its definition is: Indicates whether the STA is capable of interpreting the Extended NSS BW Support subfield of the VHT Capabilities Information field. This patch is to add check for the subfield. Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/20210524033624.16993-1-wgong@codeaurora.org Signed-off-by: Johannes Berg commit 4f2e3eb6c985cc8c2b88d5089b1920b831bc5ed9 Author: Ryder Lee Date: Fri Jun 18 04:38:59 2021 +0800 mac80211: check per vif offload_flags in Tx path offload_flags has been introduced to indicate encap status of each interface. An interface can encap offload at runtime, or if it has some extra limitations it can simply override the flags, so it's more flexible to check offload_flags in Tx path. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/177785418cf407808bf3a44760302d0647076990.1623961575.git.ryder.lee@mediatek.com Signed-off-by: Johannes Berg commit 3187ba0cea77c8a4cdaed44fbff02c6e63e509aa Author: Ryder Lee Date: Thu Jun 17 18:31:13 2021 +0200 mac80211: add rate control support for encap offload The software rate control cannot deal with encap offload, so fix it. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/20210617163113.75815-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 03c3911d2d67a43ad4ffd15b534a5905d6ce5c59 Author: Ryder Lee Date: Thu Jun 17 18:31:12 2021 +0200 mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue Make ieee80211_tx_h_rate_ctrl() get called on dequeue to improve performance since it reduces the turnaround time for rate control. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/20210617163113.75815-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 08a46c6420013c4ecb61262b4869fdd7e82f918a Author: Felix Fietkau Date: Thu Jun 17 18:31:11 2021 +0200 mac80211: move A-MPDU session check from minstrel_ht to mac80211 This avoids calling back into tx handlers from within the rate control module. Preparation for deferring rate control until tx dequeue Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20210617163113.75815-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 358ae88881adc3ac1544104272eb7e9408f80b39 Author: Emmanuel Grumbach Date: Wed Jun 16 23:28:26 2021 +0300 cfg80211: expose the rfkill device to the low level driver This will allow the low level driver to query the rfkill state. Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20210616202826.9833-1-emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg commit 3f9d9725cb7daf7e9a834aa4f24d88b049c3c1f5 Author: Johannes Berg Date: Wed Jun 16 21:28:05 2021 +0200 mac80211: don't open-code LED manipulations We shouldn't open-code led_trigger_blink() or led_trigger_event(), use them instead of badly open-coding them. This also fixes the locking, led_trigger_blink() and led_trigger_event() now use read_lock_irqsave(). Link: https://lore.kernel.org/r/20210616212804.b19ba1c60353.I8ea1b4defd5e12fc20ef281291e602feeec336a6@changeid Signed-off-by: Johannes Berg commit d656a4c6ead6c3f252b2f2532bc9735598f7e317 Author: Johannes Berg Date: Thu Jun 10 22:08:16 2021 +0200 mac80211: consider per-CPU statistics if present If we have been keeping per-CPU statistics, consider them regardless of USES_RSS, because we may not actually fill those, for example in non-fast-RX cases when the connection is not compatible with fast-RX. If we didn't fill them, the additional data will be zero and not affect anything, and if we did fill them then it's more correct to consider them. This fixes an issue in mesh mode where some statistics are not updated due to USES_RSS being set, but fast-RX isn't used. Reported-by: Thiraviyam Mariyappan Link: https://lore.kernel.org/r/20210610220814.13b35f5797c5.I511e9b33c5694e0d6cef4b6ae755c873d7c22124@changeid Signed-off-by: Johannes Berg commit 310f134ed41fcaa03eff302b1e69f1ce1ee21841 Author: Brijesh Singh Date: Wed Jun 23 08:40:00 2021 +0200 x86/sev: Add defines for GHCB version 2 MSR protocol requests Add the necessary defines for supporting the GHCB version 2 protocol. This includes defines for: - MSR-based AP hlt request/response - Hypervisor Feature request/response This is the bare minimum of requests that need to be supported by a GHCB version 2 implementation. There are more requests in the specification, but those depend on Secure Nested Paging support being available. These defines are shared between SEV host and guest support. [ bp: Fold in https://lkml.kernel.org/r/20210622144825.27588-2-joro@8bytes.org too. Simplify the brewing macro maze into readability. ] Co-developed-by: Tom Lendacky Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/YNLXQIZ5e1wjkshG@8bytes.org commit 9df66d5b9f45c39b3925d16e8947cc10009b186d Author: Ping-Ke Shih Date: Wed Jun 9 15:59:44 2021 +0800 cfg80211: fix default HE tx bitrate mask in 2G band In 2G band, a HE sta can only supports HT and HE, but not supports VHT. In this case, default HE tx bitrate mask isn't filled, when we use iw to set bitrates without any parameter. Signed-off-by: Ping-Ke Shih Link: https://lore.kernel.org/r/20210609075944.51130-1-pkshih@realtek.com Signed-off-by: Johannes Berg commit 057e377af24a4f48f9d8340029e765df0345f048 Author: Shaokun Zhang Date: Fri May 28 18:07:04 2021 +0800 mac80211: remove the repeated declaration Function 'ieee80211_sta_set_rx_nss' is declared twice, so remove the repeated declaration. Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622196424-62403-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Johannes Berg commit 4e6c78bdcfbc3aad01a527e46b89e7ab70e0c332 Author: Philipp Borgers Date: Wed May 19 14:20:19 2021 +0200 mac80211: refactor rc_no_data_or_no_ack_use_min function Use newly introduced helper function ieee80211_is_tx_data to check if frame is a data frame. Takes into account that hardware encapsulation can be enabled for a frame and therefore no ieee80211 header is present. Signed-off-by: Philipp Borgers Link: https://lore.kernel.org/r/20210519122019.92359-4-borgers@mi.fu-berlin.de Signed-off-by: Johannes Berg commit d333322361e7a099dc74df2498d3fa5fde5c4fa7 Author: Philipp Borgers Date: Wed May 19 14:20:18 2021 +0200 mac80211: do not use low data rates for data frames with no ack flag Data Frames with no ack flag set should be handled by the rate controler. Make sure we reach the rate controler by returning early from rate_control_send_low if the frame is a data frame with no ack flag. Signed-off-by: Philipp Borgers Link: https://lore.kernel.org/r/20210519122019.92359-3-borgers@mi.fu-berlin.de Signed-off-by: Johannes Berg commit cff7b5ca25353bef5909e357a9912f3d44b32af5 Author: Philipp Borgers Date: Wed May 19 14:20:17 2021 +0200 mac80211: add ieee80211_is_tx_data helper function Add a helper function that checks if a frame is a data frame. Frames with hardware encapsulation enabled are data frames. Signed-off-by: Philipp Borgers Link: https://lore.kernel.org/r/20210519122019.92359-2-borgers@mi.fu-berlin.de Signed-off-by: Johannes Berg commit 4ebdce1dcbd44099b0e68db859b21d97b051492c Author: Johannes Berg Date: Mon May 17 23:07:57 2021 +0200 mac80211: simplify ieee80211_add_station() There's no need to do some kind of weird err and RCU dance just use sta_info_insert() directly. Link: https://lore.kernel.org/r/20210517230754.55abd10056c0.I6f5a3b7b23347b2cdaf64e6d5ce1d9e904059654@changeid Signed-off-by: Johannes Berg commit f057d1403689309c6277961d5c348d4841959a9c Author: Johannes Berg Date: Mon May 17 23:07:56 2021 +0200 mac80211: use sdata->skb_queue for TDLS We need to differentiate these frames since the ones we currently put on the skb_queue_tdls_chsw have already been converted to ethernet format, but now that we've got a single place to enqueue to the sdata->skb_queue this isn't hard. Just differentiate based on protocol and adjust the code to queue the SKBs appropriately. Link: https://lore.kernel.org/r/20210517230754.17034990abef.I5342f2183c0d246b18d36c511eb3b6be298a6572@changeid Signed-off-by: Johannes Berg commit 07bd1c79c9fbf038483c50031b0f302613a54eb6 Author: Johannes Berg Date: Mon May 17 23:07:55 2021 +0200 mac80211: refactor SKB queue processing a bit This is a very long loop body, move it into its own function instead, keeping only the kcov and free outside in the loop body. Link: https://lore.kernel.org/r/20210517230754.6bc6cdd68570.I28a86ebdb19601ca1965c4dc654cc49fc1064efa@changeid Signed-off-by: Johannes Berg commit 0044cc177f23aff1f66589f87c5f1172e9f09fdc Author: Johannes Berg Date: Mon May 17 23:07:54 2021 +0200 mac80211: unify queueing SKB to iface We have a bunch of places that open-code the same to queue an SKB to an interface, unify that. Link: https://lore.kernel.org/r/20210517230754.113b65febd5a.Ie0e1d58a2885e75f242cb6e06f3b9660117fef93@changeid Signed-off-by: Johannes Berg commit 0edab4ff84b67fc585bb47aba37833da18f5a9dc Author: Philipp Borgers Date: Mon May 17 14:01:45 2021 +0200 mac80211: minstrel_ht: ignore frame that was sent with noAck flag QoS Data Frames that were sent with a No Ack policy should be ignored by the minstrel statistics. There will never be an Ack for these frames so there is no way to draw conclusions about the success of the transmission. Signed-off-by: Philipp Borgers Link: https://lore.kernel.org/r/20210517120145.132814-1-borgers@mi.fu-berlin.de Signed-off-by: Johannes Berg commit 5b5c9f3bd5f3d726d07ab8e4776d241863963a6e Author: Dan Carpenter Date: Sat May 8 16:03:51 2021 +0300 cfg80211: clean up variable use in cfg80211_parse_colocated_ap() The "ap_info->tbtt_info_len" and "length" variables are the same value but it is confusing how the names are mixed up. Let's use "length" everywhere for consistency. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YJaMNzZENkYFAYQX@mwanda Signed-off-by: Johannes Berg commit 21b7805434f6598eaf70329f78cf3da0bd4aa3e9 Author: Johannes Berg Date: Thu May 6 22:12:00 2021 +0200 cfg80211: remove CFG80211_MAX_NUM_DIFFERENT_CHANNELS We no longer need to put any limits here, hardware will and mac80211-hwsim can do whatever it likes. The reason we had this was some accounting code (still mentioned in the comment) but that code was deleted in commit c781944b71f8 ("cfg80211: Remove unused cfg80211_can_use_iftype_chan()"). Link: https://lore.kernel.org/r/20210506221159.d1d61db1d31c.Iac4da68d54b9f1fdc18a03586bbe06aeb9515425@changeid Signed-off-by: Johannes Berg commit 5eae2705004895a9aa917f5df6c1a2da8eeb4fd5 Author: Yang Li Date: Fri Apr 30 17:21:23 2021 +0800 mac80211: Remove redundant assignment to ret Variable 'ret' is set to -ENODEV but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: net/mac80211/debugfs_netdev.c:60:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1619774483-116805-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Johannes Berg commit c2a8637c055e4ea86cd414bbf02034d1449685cc Author: Yang Li Date: Wed Apr 28 17:59:05 2021 +0800 net: wireless: wext_compat.c: Remove redundant assignment to ps Variable 'ps' is set to wdev->ps but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/wireless/wext-compat.c:1170:7: warning: Value stored to 'ps' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1619603945-116891-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Johannes Berg commit e93bdd78406da9ed01554c51e38b2a02c8ef8025 Author: Gustavo A. R. Silva Date: Thu Apr 22 15:00:32 2021 -0500 wireless: wext-spy: Fix out-of-bounds warning Fix the following out-of-bounds warning: net/wireless/wext-spy.c:178:2: warning: 'memcpy' offset [25, 28] from the object at 'threshold' is out of the bounds of referenced subobject 'low' with type 'struct iw_quality' at offset 20 [-Warray-bounds] The problem is that the original code is trying to copy data into a couple of struct members adjacent to each other in a single call to memcpy(). This causes a legitimate compiler warning because memcpy() overruns the length of &threshold.low and &spydata->spy_thr_low. As these are just a couple of struct members, fix this by using direct assignments, instead of memcpy(). This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422200032.GA168995@embeddedor Signed-off-by: Johannes Berg commit 5471a8123503c6ca694b5f2543f0a6dfd4080976 Merge: f274e2962677d 15692a80d9491 Author: Greg Kroah-Hartman Date: Wed Jun 23 10:33:34 2021 +0200 Merge tag 'phy-for-5.14_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next Vinod writes: phy-for-5.14 version 2 - Updates: - Yaml conversion for renesas,rcar-gen3 pcie phy and rockchip-usb-phy bindings - Support for devm_phy_get() taking NULL phy name - New support: - PCIe phy for Qualcomm IPQ60xx - PCIe phy for Qualcomm SDX55 - USB phy for RK3308 - CAN transceivers phy for TI TCAN104x - Innosilicon-based CSI dphy for rockchip * tag 'phy-for-5.14_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (36 commits) phy: Revert "phy: ralink: Kconfig: convert mt7621-pci-phy into 'bool'" phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe() phy: uniphier-pcie: Fix updating phy parameters phy/rockchip: add Innosilicon-based CSI dphy dt-bindings: phy: add yaml binding for rockchip-inno-csi-dphy phy: rockchip: remove redundant initialization of pointer cfg phy: phy-can-transceiver: Add support for generic CAN transceiver driver dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers phy: core: Reword the comment specifying the units of max_link_rate to be Mbps phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe() phy: phy-mtk-mipi-dsi: Remove redundant dev_err call in mtk_mipi_tx_probe() phy: phy-mmp3-hsic: Remove redundant dev_err call in mmp3_hsic_phy_probe() phy: bcm-ns-usb3: Remove redundant dev_err call in bcm_ns_usb3_mdio_probe() MAINTAINERS: update marvell,armada-3700-utmi-phy.yaml reference phy: phy-twl4030-usb: use DEVICE_ATTR_RO macro dt-bindings: phy: convert rockchip-usb-phy.txt to YAML phy: phy-rockchip-inno-usb2: add support for RK3308 USB phy dt-bindings: phy: rockchip-inno-usb2: add compatible for rk3308 USB phy phy: stm32: manage optional vbus regulator on phy_power_on/off dt-bindings: phy: add vbus-supply optional property to phy-stm32-usbphyc ... commit ae44705f98ca0ecb117765c9c03950de2b0686dc Author: Takashi Sakamoto Date: Wed Jun 23 16:59:41 2021 +0900 ALSA: firewire-motu: fix register handling for 896 After further investigation, I find out some mistakes for 896 about its register. This commit fixes it. Fixes: b431f16f1685 ("ALSA: firewire-motu: add support for MOTU 896") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e949e338d7bbd0820b0595f2f44b37dd28ff5fff Author: Takashi Sakamoto Date: Wed Jun 23 16:59:40 2021 +0900 ALSA: firewire-motu: fix register handling for 828 After further investigation, I find out some mistakes for 828 about its register. This commit fixes it. Fixes: d13d6b284d8b ("ALSA: firewire-motu: add support for MOTU 828") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 7203233ea7fde84a3f7a3a1b1498988d3db3ce88 Author: Takashi Sakamoto Date: Wed Jun 23 16:59:39 2021 +0900 ALSA: firewire-motu: use macro instead of magic number for clock source in v3 protocol This commit adds a series of macro for source of sampling clock in version 3 protocol. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ef8f14ad2aeceda904b2fdfb54a366f2095620a5 Author: Takashi Sakamoto Date: Wed Jun 23 16:59:38 2021 +0900 ALSA: firewire-motu: code refactoring for source detection of sampling clock in v3 protocol Current implementation of driver has two similar helper functions for source detection of sampling clock. This commit merges them as a code refactoring. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 53ed8cf625fae18b2557d5b806a50f7c65555f61 Author: Takashi Sakamoto Date: Wed Jun 23 16:59:37 2021 +0900 ALSA: firewire-motu: code refactoring for packet format detection in v2 protocol Current implementation of driver has several similar helper functions for packet format detection in protocol version 2. This commit merges them as code refactoring. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 184aa6b7e1054b235cea3f53ac2dd9276d674659 Author: Takashi Sakamoto Date: Wed Jun 23 16:59:36 2021 +0900 ALSA: firewire-motu: use macro instead of magic number for clock source in v2 protocol This commit adds a series of macro for source of sampling clock in version 2 protocol. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 683d36690f8a34a6323b6b3a655e5fa56ef80b5f Author: Takashi Sakamoto Date: Wed Jun 23 16:59:35 2021 +0900 ALSA: firewire-motu: add support for AES/EBU clock source in v2 protocol Although MOTU Traveler supports AES/EBU source for sampling clock, current implementation of driver doesn't code it. This commit adds support for AES/EBU source in protocol version 2. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 25eb438920e43ff49c6041a23619f22af6b21a5c Author: Takashi Sakamoto Date: Wed Jun 23 16:59:34 2021 +0900 ALSA: firewire-motu: code refactoring for detection of clock source in v2 protocol Current implementation of driver has two similar helper functions for source detection of sampling clock. This commit merges them as a code refactoring. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit fa4db23233eb912234bdfb0b26a38be079c6b5ea Author: Takashi Sakamoto Date: Wed Jun 23 16:59:33 2021 +0900 ALSA: firewire-motu: fix detection for S/PDIF source on optical interface in v2 protocol The devices in protocol version 2 has a register with flag for IEC 60958 signal detection as source of sampling clock without discrimination between coaxial and optical interfaces. On the other hand, current implementation of driver manage to interpret type of signal on optical interface instead. This commit fixes the detection of optical/coaxial interface for S/PDIF signal. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210623075941.72562-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 3c16dc40aab84bab9cf54c2b61a458bb86b180c3 Author: Chao Yu Date: Tue Jun 8 07:31:22 2021 +0800 f2fs: fix to avoid adding tab before doc section Otherwise whole section after tab will be invisible in compiled html format document. Cc: Mauro Carvalho Chehab Fixes: 89272ca1102e ("docs: filesystems: convert f2fs.txt to ReST") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4d9a2bb1a6babc9280a8b4e7a95ada9bf6e51e9a Author: Chao Yu Date: Fri Jun 11 07:46:30 2021 +0800 f2fs: introduce f2fs_casefolded_name slab cache Add a slab cache: "f2fs_casefolded_name" for memory allocation of casefold name. Reviewed-by: Eric Biggers Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 859fca6b706e005f7cf19aa2ce7bb4005bcef427 Author: Chao Yu Date: Wed May 26 14:29:27 2021 +0800 f2fs: swap: support migrating swapfile in aligned write mode This patch supports to migrate swapfile in aligned write mode during swapon in order to keep swapfile being aligned to section as much as possible, then pinned swapfile will locates fully filled section which may not affected by GC. However, for the case that swapfile's size is not aligned to section size, it will still leave last extent in file's tail as unaligned due to its size is smaller than section size, like case #2. case #1 xfs_io -f /mnt/f2fs/file -c "pwrite 0 4M" -c "fsync" Before swapon: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..3047]: 1123352..1126399 3048 0x1000 1: [3048..7143]: 237568..241663 4096 0x1000 2: [7144..8191]: 245760..246807 1048 0x1001 After swapon: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..8191]: 249856..258047 8192 0x1001 Kmsg: F2FS-fs (zram0): Swapfile (2) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate(2097152 * n) case #2 xfs_io -f /mnt/f2fs/file -c "pwrite 0 3M" -c "fsync" Before swapon: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..3047]: 246808..249855 3048 0x1000 1: [3048..6143]: 237568..240663 3096 0x1001 After swapon: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..4095]: 258048..262143 4096 0x1000 1: [4096..6143]: 238616..240663 2048 0x1001 Kmsg: F2FS-fs (zram0): Swapfile: last extent is not aligned to section F2FS-fs (zram0): Swapfile (2) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate(2097152 * n) Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0b8fc00601c0d8bea19667bbc66f00e13d954e4a Author: Chao Yu Date: Wed May 26 14:29:26 2021 +0800 f2fs: swap: remove dead codes After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()"), we will never run into original logic of check_swap_activate() before f2fs supports non 4k-sized page, so let's delete those dead codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6ce19aff0b8cd386860855185c6cd79337fc4d2b Author: Chao Yu Date: Thu May 20 19:51:50 2021 +0800 f2fs: compress: add compress_inode to cache compressed blocks Support to use address space of inner inode to cache compressed block, in order to improve cache hit ratio of random read. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4c89b53d05f1f5d25e9aec09c00351994101cc97 Author: Jaegeuk Kim Date: Thu Jun 3 12:31:08 2021 -0700 f2fs: clean up /sys/fs/f2fs//features Let's create /sys/fs/f2fs//feature_list/ to meet sysfs rule. Note that there are three feature list entries: 1) /sys/fs/f2fs/features : shows runtime features supported by in-kernel f2fs along with Kconfig. - ref. F2FS_FEATURE_RO_ATTR() 2) /sys/fs/f2fs/$s_id/features : shows on-disk features enabled by mkfs.f2fs, used for old kernels. This won't add new feature anymore, and thus, users should check entries in 3) instead of this 2). 3) /sys/fs/f2fs/$s_id/feature_list : shows on-disk features enabled by mkfs.f2fs per instance, which follows sysfs entry rule where each entry should expose single value. This list covers old feature list provided by 2) and beyond. Therefore, please add new on-disk feature in this list only. - ref. F2FS_SB_FEATURE_RO_ATTR() Reviewed-by: Chao Yu Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 4a196df4cfba0b6a74023e6b36427f2bf2ddcdba Author: Jaegeuk Kim Date: Thu Jun 3 22:30:09 2021 -0700 f2fs: add pin_file in feature list This patch adds missing pin_file feature supported by kernel. Fixes: f5a53edcf01e ("f2fs: support aligned pinned file") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4c039d5452691fe80260e4c3dd7b629a095bd0a7 Author: Daniel Rosenberg Date: Thu Jun 3 09:50:38 2021 +0000 f2fs: Advertise encrypted casefolding in sysfs Older kernels don't support encryption with casefolding. This adds the sysfs entry encrypted_casefold to show support for those combined features. Support for this feature was originally added by commit 7ad08a58bf67 ("f2fs: Handle casefolding with Encryption") Fixes: 7ad08a58bf67 ("f2fs: Handle casefolding with Encryption") Cc: stable@vger.kernel.org # v5.11+ Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 39307f8ee3539478c28e71b4909b5b028cce14b1 Author: Daniel Rosenberg Date: Thu Jun 3 09:50:37 2021 +0000 f2fs: Show casefolding support only when supported The casefolding feature is only supported when CONFIG_UNICODE is set. This modifies the feature list f2fs presents under sysfs accordingly. Fixes: 5aba54302a46 ("f2fs: include charset encoding information in the superblock") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a7d9fe3c33887085a2e10c085d378126314dc222 Author: Jaegeuk Kim Date: Fri May 21 01:32:53 2021 -0700 f2fs: support RO feature Given RO feature in superblock, we don't need to check provisioning/reserve spaces and SSA area. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 833dcd35453713ced96e086daecf7f023709e6a4 Author: Joe Perches Date: Wed May 26 13:05:36 2021 -0700 f2fs: logging neatening Update the logging uses that have unnecessary newlines as the f2fs_printk function and so its f2fs_ macro callers already adds one. This allows searching single line logging entries with an easier grep and also avoids unnecessary blank lines in the logging. Miscellanea: o Coalesce formats o Align to open parenthesis Signed-off-by: Joe Perches Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c61404153eb683da9c35aad133131554861ed561 Author: Jaegeuk Kim Date: Tue May 25 11:39:35 2021 -0700 f2fs: introduce FI_COMPRESS_RELEASED instead of using IMMUTABLE bit Once we release compressed blocks, we used to set IMMUTABLE bit. But it turned out it disallows every fs operations which we don't need for compression. Let's just prevent writing data only. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8f1d49832636d514e949b29ce64370ebebf6d6d2 Author: Chao Yu Date: Wed May 12 17:52:58 2021 +0800 f2fs: compress: remove unneeded preallocation We will reserve iblocks for compression saved, so during compressed cluster overwrite, we don't need to preallocate blocks for later write. In addition, it adds a bug_on to detect wrong reserved iblock number in __f2fs_cluster_blocks(). Bug fix in the original patch by Jaegeuk: If we released compressed blocks having an immutable bit, we can see less number of compressed block addresses. Let's fix wrong BUG_ON. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4b9718b5a201eddcd00d9db6c36b18840125c7ee Author: Ilya Maximets Date: Tue Jun 22 20:56:47 2021 +0200 docs, af_xdp: Consistent indentation in examples Examples in this document use all kinds of indentation from 3 to 5 spaces and even mixed with tabs. Making them all even and equal to 4 spaces. Signed-off-by: Ilya Maximets Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20210622185647.3705104-1-i.maximets@ovn.org commit 1f703d2cf20464338c3d5279dddfb65ac79b8782 Author: Christian Borntraeger Date: Mon Jan 25 13:39:45 2021 +0100 KVM: s390: allow facility 192 (vector-packed-decimal-enhancement facility 2) pass through newer vector instructions if vector support is enabled. Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger commit a3efa842926600b04cb1252e9211892c3bfc4d49 Author: Christian Borntraeger Date: Tue Mar 9 16:24:19 2021 +0100 KVM: s390: gen_facilities: allow facilities 165, 193, 194 and 196 This enables the NNPA, BEAR enhancement,reset DAT protection and processor activity counter facilities via the cpu model. Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger commit 15692a80d9491b42f910f61f5ef2171b3c2eb15c Author: Vinod Koul Date: Wed Jun 23 12:58:37 2021 +0530 phy: Revert "phy: ralink: Kconfig: convert mt7621-pci-phy into 'bool'" This reverts commit 6eded551cefe ("phy: ralink: Kconfig: convert mt7621-pci-phy into 'bool'") as we don't want drivers to be built in and should be a module instead Signed-off-by: Vinod Koul commit 4fa3b91bdee1b08348c82660668ca0ca34e271ad Author: Heiko Carstens Date: Mon Jun 21 16:03:56 2021 +0200 KVM: s390: get rid of register asm usage Using register asm statements has been proven to be very error prone, especially when using code instrumentation where gcc may add function calls, which clobbers register contents in an unexpected way. Therefore get rid of register asm statements in kvm code, even though there is currently nothing wrong with them. This way we know for sure that this bug class won't be introduced here. Signed-off-by: Heiko Carstens Reviewed-by: Christian Borntraeger Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20210621140356.1210771-1-hca@linux.ibm.com [borntraeger@de.ibm.com: checkpatch strict fix] Signed-off-by: Christian Borntraeger commit bf3ec9deaa33889630722c47f7bb86ba58872ea7 Author: Thierry Reding Date: Mon Jun 21 16:00:36 2021 +0200 dt-bindings: arm-smmu: Fix json-schema syntax Commit 4287861dca9d ("dt-bindings: arm-smmu: Add Tegra186 compatible string") introduced a jsonschema syntax error as a result of a rebase gone wrong. Fix it. Fixes: 4287861dca9d ("dt-bindings: arm-smmu: Add Tegra186 compatible string") Reported-by: Rob Herring Signed-off-by: Thierry Reding Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210621140036.2879563-1-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 61c0cb8ae7943b4fad5d62213c1748f1a07fe594 Merge: bde431fbe834a 24ff3dc18b99c Author: Dave Airlie Date: Wed Jun 23 14:46:22 2021 +1000 Merge tag 'drm-misc-next-fixes-2021-06-18' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Short summary of fixes pull: * hyperv: advertise the correct formatmodifiers for its primary plane * dp_mst: VCPI fixes to make it work with StarTech hub * dp_mst: Fix build error Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YMxgI1oluBpPyfu6@linux-uq9g.fritz.box commit bde431fbe834a212d08b802170a2fd282a1f1581 Merge: f45fbbb6d5cff 46f99eebda089 Author: Dave Airlie Date: Wed Jun 23 14:24:31 2021 +1000 Merge tag 'drm/tegra/for-5.14-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v5.14-rc1 The two major changes here are fixed YUV support as well as scaling on Tegra186 and later. This allows Tegra DRM to be used, for example, as a video sink for the kmssink gstreamer plugin. The remainder of the changes are minor fixes. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20210611165157.3569315-1-thierry.reding@gmail.com commit 2506f5dcb8282aa7adf77965ef147bb5b68973e3 Author: Zhen Lei Date: Wed Jun 16 11:44:19 2021 +0800 scsi: mvsas: Use DEVICE_ATTR_RO()/RW() macro Use DEVICE_ATTR_RO()/RW() macro helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210616034419.725-5-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit 4c92f89802552f345e7577ba614874f1d6a710f4 Author: Zhen Lei Date: Wed Jun 16 11:44:18 2021 +0800 scsi: megaraid_mbox: Use DEVICE_ATTR_ADMIN_RO() macro Use DEVICE_ATTR_ADMIN_RO() macro helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210616034419.725-4-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit 80068f82284a3bbb2763a2280027daa95da4f73d Author: Zhen Lei Date: Wed Jun 16 11:44:17 2021 +0800 scsi: qedf: Use DEVICE_ATTR_RO() macro Use DEVICE_ATTR_RO() macro helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210616034419.725-3-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit ffa636470aefc41a634025e958b32b006d59a29a Author: Zhen Lei Date: Wed Jun 16 11:44:16 2021 +0800 scsi: qedi: Use DEVICE_ATTR_RO() macro Use DEVICE_ATTR_RO() macro helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210616034419.725-2-thunder.leizhen@huawei.com Acked-by: Manish Rangankar Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit 1897c5c7597566264cff4827fd4f02e243f773ca Author: Christophe JAILLET Date: Sun Jun 13 09:10:16 2021 +0200 scsi: message: mptfc: Switch from pci_ to dma_ API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'mptfc_GetFcDevPage0()' GFP_KERNEL can be used because it is already used in this function and no lock is acquired in the between. When memory is allocated in 'mptfc_GetFcPortPage0()' and 'mptfc_GetFcPortPage1()' GFP_KERNEL can be used because they already call 'mpt_config()' which has an explicit 'might_sleep()'. While at it, also remove some useless casting. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Link: https://lore.kernel.org/r/95afc589713ade2110e7812159ce3e9ab453ec18.1623568121.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit c7fa2c855e892721bafafdf6393342c000e0ef77 Author: Christophe JAILLET Date: Sat Jun 12 09:18:47 2021 +0200 scsi: be2iscsi: Fix some missing space in some messages Fix a few style issues reported by checkpatch.pl: - Avoid duplicated word in comment. - Add missing space in messages. - Unneeded continuation line character. - Unneeded extra spaces. - Unneeded log message after memory allocation failure. Link: https://lore.kernel.org/r/8cb62f0eb96ec7ce7a73fe97cb4490dd5121ecff.1623482155.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 030e4138d11fced3b831c2761e4cecf347bae99c Author: Christophe JAILLET Date: Sat Jun 12 09:18:34 2021 +0200 scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe() If an error occurs after a pci_enable_pcie_error_reporting() call, it must be undone by a corresponding pci_disable_pcie_error_reporting() call, as already done in the remove function. Link: https://lore.kernel.org/r/77adb02cfea7f1364e5603ecf3930d8597ae356e.1623482155.git.christophe.jaillet@wanadoo.fr Fixes: 3567f36a09d1 ("[SCSI] be2iscsi: Fix AER handling in driver") Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 75d645a61cf9c960b20650914386f20f993f81bc Author: YueHaibing Date: Thu Jun 17 11:13:26 2021 +0800 scsi: ufs: Fix build warning without CONFIG_PM drivers/scsi/ufs/ufshcd.c:9770:12: warning: ‘ufshcd_rpmb_resume’ defined but not used [-Wunused-function] static int ufshcd_rpmb_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:9037:12: warning: ‘ufshcd_wl_runtime_resume’ defined but not used [-Wunused-function] static int ufshcd_wl_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/ufs/ufshcd.c:9017:12: warning: ‘ufshcd_wl_runtime_suspend’ defined but not used [-Wunused-function] static int ufshcd_wl_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~ Move it into #ifdef block to fix this. Link: https://lore.kernel.org/r/20210617031326.36908-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 73b306a2bcb75e37b8065aa714ad2c6949c90ebf Author: SeongJae Park Date: Fri Jun 18 16:45:14 2021 +0000 scsi: bnx2fc: Remove meaningless bnx2fc_abts_cleanup() return value assignment Commit 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already in ABTS processing") made bnx2fc_eh_abort() return FAILED when io_req was alrady in ABTS processing, regardless of the return value of bnx2fc_abts_cleanup(). However, the change left the assignment of the return value of bnx2fc_abts_cleanup(). Remove this. This issue was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc. Link: https://lore.kernel.org/r/20210618164514.6299-1-sj38.park@gmail.com Fixes: 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already in ABTS processing") Acked-by: Saurav Kashyap Signed-off-by: SeongJae Park Signed-off-by: Martin K. Petersen commit d94d8158e1841813624e9fecf93a12e64e004dd8 Author: Quinn Tran Date: Fri Jun 18 22:24:27 2021 -0700 scsi: qla2xxx: Add heartbeat check Use "no-op" mailbox command to check if the adapter firmware is still responsive. Link: https://lore.kernel.org/r/20210619052427.6440-1-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit c43ddbf97f46b93727718408d60a47ce8c08f30c Author: Hannes Reinecke Date: Tue Jun 22 11:11:53 2021 +0200 scsi: virtio_scsi: Do not overwrite SCSI status When a sense code is present we should not override the SAM status; the driver already sets it based on the response from the hypervisor. In addition we should only copy the sense buffer if one is actually provided by the hypervisor. Link: https://lore.kernel.org/r/20210622091153.29231-1-hare@suse.de Fixes: 464a00c9e0ad ("scsi: core: Kill DRIVER_SENSE") Tested-by: Guenter Roeck Tested-by: Jiri Slaby Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit f9505c72b2ee80cb68af95449a5215906130e3be Author: chenyichong Date: Wed May 26 13:29:30 2021 +0800 ext4: use local variable ei instead of EXT4_I() macro Signed-off-by: chenyichong Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210526052930.11278-1-chenyichong@uniontech.com Signed-off-by: Theodore Ts'o commit c89849cc0259f3d33624cc3bd127685c3c0fa25d Author: Pan Dong Date: Tue May 25 15:36:56 2021 +0800 ext4: fix avefreec in find_group_orlov The avefreec should be average free clusters instead of average free blocks, otherwize Orlov's allocator will not work properly when bigalloc enabled. Cc: stable@kernel.org Signed-off-by: Pan Dong Link: https://lore.kernel.org/r/20210525073656.31594-1-pandong.peter@bytedance.com Signed-off-by: Theodore Ts'o commit 4fb7c70a889ead2e91e184895ac6e5354b759135 Author: Zhang Yi Date: Sat May 22 18:30:45 2021 +0800 ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit The cache_cnt parameter of tracepoint ext4_es_shrink_exit means the remaining cache count after shrink, but now it is the cache count before shrink, fix it by read sbi->s_extent_cache_cnt again. Fixes: 1ab6c4997e04 ("fs: convert fs shrinkers to new scan/count API") Cc: stable@vger.kernel.org # 3.12+ Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210522103045.690103-3-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit e5e7010e5444d923e4091cafff61d05f2d19cada Author: Zhang Yi Date: Sat May 22 18:30:44 2021 +0800 ext4: remove check for zero nr_to_scan in ext4_es_scan() After converting fs shrinkers to new scan/count API, we are no longer pass zero nr_to_scan parameter to detect the number of objects to free, just remove this check. Fixes: 1ab6c4997e04 ("fs: convert fs shrinkers to new scan/count API") Cc: stable@vger.kernel.org # 3.12+ Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210522103045.690103-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit b2d2e7573548295a14db999095fd1df40352c91a Author: Tian Tao Date: Thu May 20 14:55:52 2021 +0800 ext4: remove set but rewrite variables In the ext4_dx_add_entry function, the at variable is assigned but will reset just after “again:” label. So delete the unnecessary assignment. this will not chang the logic. Signed-off-by: Tian Tao Reviewed-by: Artem Blagodarenko Link: https://lore.kernel.org/r/1621493752-36890-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Theodore Ts'o commit fd7b23be92059f14537cb9cac0f0894c3a9b1284 Author: Leah Rumancik Date: Tue May 18 15:13:27 2021 +0000 ext4: update journal documentation Add a section about journal checkpointing, including information about the ioctl EXT4_IOC_CHECKPOINT which can be used to trigger a journal checkpoint from userspace. Also, update the journal allocation information to reflect that up to 10240000 blocks are used for the journal and that the journal is not necessarily contiguous. Signed-off-by: Leah Rumancik Changes in v5: - clarify behavior of DRY_RUN flag Link: https://lore.kernel.org/r/20210518151327.130198-3-leah.rumancik@gmail.com Signed-off-by: Theodore Ts'o commit 351a0a3fbc3584a00036f05cfdb0cd3eb1dca92a Author: Leah Rumancik Date: Tue May 18 15:13:26 2021 +0000 ext4: add ioctl EXT4_IOC_CHECKPOINT ioctl EXT4_IOC_CHECKPOINT checkpoints and flushes the journal. This includes forcing all the transactions to the log, checkpointing the transactions, and flushing the log to disk. This ioctl takes u32 "flags" as an argument. Three flags are supported. EXT4_IOC_CHECKPOINT_FLAG_DRY_RUN can be used to verify input to the ioctl. It returns error if there is any invalid input, otherwise it returns success without performing any checkpointing. The other two flags, EXT4_IOC_CHECKPOINT_FLAG_DISCARD and EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT, can be used to issue requests to discard or zeroout the journal logs blocks, respectively. At this point, EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT is primarily added to enable testing of this codepath on devices that don't support discard. EXT4_IOC_CHECKPOINT_FLAG_DISCARD and EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT cannot both be set. Systems that wish to achieve content deletion SLO can set up a daemon that calls this ioctl at a regular interval such that it matches with the SLO requirement. Thus, with this patch, the ext4_dir_entry2 wipeout patch[1], and the Ext4 "-o discard" mount option set, Ext4 can now guarantee that all file contents, file metatdata, and filenames will not be accessible through the filesystem and will have had discard or zeroout requests issued for corresponding device blocks. The __jbd2_journal_erase function could also be used to discard or zero-fill the journal during journal load after recovery. This would provide a potential solution to a journal replay bug reported earlier this year[2]. After a successful journal recovery, e2fsck can call this ioctl to discard the journal as well. [1] https://lore.kernel.org/linux-ext4/YIHknqxngB1sUdie@mit.edu/ [2] https://lore.kernel.org/linux-ext4/YDZoaacIYStFQT8g@mit.edu/ Link: https://lore.kernel.org/r/20210518151327.130198-2-leah.rumancik@gmail.com Signed-off-by: Leah Rumancik Signed-off-by: Theodore Ts'o commit 49da96d77938db21864dae6b7736b71e96c1d203 Author: Yufen Yu Date: Tue Jun 22 11:40:37 2021 +0800 scsi: libsas: Add LUN number check in .slave_alloc callback Offlining a SATA device connected to a hisi SAS controller and then scanning the host will result in detecting 255 non-existent devices: # lsscsi [2:0:0:0] disk ATA Samsung SSD 860 2B6Q /dev/sda [2:0:1:0] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdb [2:0:2:0] disk SEAGATE ST600MM0006 B001 /dev/sdc # echo "offline" > /sys/block/sdb/device/state # echo "- - -" > /sys/class/scsi_host/host2/scan # lsscsi [2:0:0:0] disk ATA Samsung SSD 860 2B6Q /dev/sda [2:0:1:0] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdb [2:0:1:1] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdh ... [2:0:1:255] disk ATA WDC WD2003FYYS-3 1D01 /dev/sdjb After a REPORT LUN command issued to the offline device fails, the SCSI midlayer tries to do a sequential scan of all devices whose LUN number is not 0. However, SATA does not support LUN numbers at all. Introduce a generic sas_slave_alloc() handler which will return -ENXIO for SATA devices if the requested LUN number is larger than 0 and make libsas drivers use this function as their .slave_alloc callback. Link: https://lore.kernel.org/r/20210622034037.1467088-1-yuyufen@huawei.com Reported-by: Wu Bo Suggested-by: John Garry Reviewed-by: John Garry Reviewed-by: Jason Yan Signed-off-by: Yufen Yu Signed-off-by: Martin K. Petersen commit 59506abe5e3474cd69b768b2c1a5760f872c72fe Author: Bart Van Assche Date: Mon Jun 21 19:46:54 2021 -0700 scsi: core: Inline scsi_mq_alloc_queue() Since scsi_mq_alloc_queue() only has one caller, inline it. This change was suggested by Christoph Hellwig. Link: https://lore.kernel.org/r/20210622024654.12543-1-bvanassche@acm.org Cc: Christoph Hellwig Cc: Ming Lei Cc: Ed Tsai Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 332a9dd1d86f1e7203fc7f0fd7e82f0b304200fe Author: Colin Ian King Date: Mon Jun 21 16:17:27 2021 +0100 scsi: aic7xxx: Fix unintentional sign extension issue on left shift of u8 The shifting of the u8 integer returned fom ahc_inb(ahc, port+3) by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of the u8 is set then all then all the upper 32 bits of the u64 end up as also being set because of the sign-extension. Fix this by casting the u8 values to a u64 before the 24 bit left shift. [ This dates back to 2002, I found the offending commit from the git history git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git, commit f58eb66c0b0a ("Update aic7xxx driver to 6.2.10...") ] Link: https://lore.kernel.org/r/20210621151727.20667-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unintended sign extension") commit f7c95d7460e342f812eaf9b4b74f100d5afaf258 Author: James Smart Date: Sat Jun 19 08:57:29 2021 -0700 scsi: elx: efct: Fix vport list linkage in LIO backend vport is linked onto the driver's vport list at allocation, but failure path fails to remove it from the list. Change location of linkage until after complete vport completion. Link: https://lore.kernel.org/r/20210619155729.20049-1-jsmart2021@gmail.com Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines") Reported-by: Dan Carpenter Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f6060eb1344717bf22d592a6e1b69818b07cad6e Author: James Smart Date: Sat Jun 19 08:56:41 2021 -0700 scsi: elx: libefc_sli: Fix ANDing with zero bit value Flags value is being set to a constant and ANDed with 0 which always results in 0. Remove the assignment line. Link: https://lore.kernel.org/r/20210619155641.19942-1-jsmart2021@gmail.com Fixes: 1628f5b4976f ("scsi: elx: libefc_sli: Populate and post different WQEs") Reported-by: Dan Carpenter Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f45fbbb6d5cff29ddfc708676ec1c2496eed3a07 Merge: d472b36efbf8a 13311e74253fe Author: Dave Airlie Date: Wed Jun 23 10:07:48 2021 +1000 Backmerge tag 'v5.13-rc7' into drm-next Backmerge Linux 5.13-rc7 to make some pulls from later bases apply, and to bake in the conflicts so far. commit feda49a1a550d271593cbe9d198527cfd78dd8c4 Author: Kamal Heib Date: Sun Jun 20 23:15:03 2021 +0300 RDMA/irdma: Use the queried port attributes Instead of hard code the gid_table_len value, use the value from the ib_query_port() attributes. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20210620201503.67055-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit f4b29d2ee903f15b5e3f9bbb485079b2a7fe6616 Merge: ce8eb4c728ef4 e31f072ffab03 Author: David S. Miller Date: Tue Jun 22 16:27:54 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Nicolas Dichtel updates MAINTAINERS file to add Netfilter IRC channel. 2) Skip non-IPv6 packets in nft_exthdr. 3) Skip non-TCP packets in nft_osf. 4) Skip non-TCP/UDP packets in nft_tproxy. 5) Memleak in hardware offload infrastructure when counters are used for first time in a rule. 6) The VLAN transfer routine must use FLOW_DISSECTOR_KEY_BASIC instead of FLOW_DISSECTOR_KEY_CONTROL. Moreover, make a more robust check for 802.1q and 802.1ad to restore simple matching on transport protocols. 7) Fix bogus EPERM when listing a ruleset when table ownership flag is set on. 8) Honor table ownership flag when table is referenced by handle. ==================== Signed-off-by: David S. Miller commit 01d5d96542fd4e383da79593f8a3450995ce2257 Author: Leah Rumancik Date: Tue May 18 15:13:25 2021 +0000 ext4: add discard/zeroout flags to journal flush Add a flags argument to jbd2_journal_flush to enable discarding or zero-filling the journal blocks while flushing the journal. Signed-off-by: Leah Rumancik Link: https://lore.kernel.org/r/20210518151327.130198-1-leah.rumancik@gmail.com Signed-off-by: Theodore Ts'o commit f1267798c9809283ff45664bc2c4e465f1500a4b Author: Huy Nguyen Date: Mon Jun 14 17:33:49 2021 +0300 net/mlx5: Fix checksum issue of VXLAN and IPsec crypto offload The packet is VXLAN packet over IPsec transport mode tunnel which has the following format: [IP1 | ESP | UDP | VXLAN | IP2 | TCP] NVIDIA ConnectX card cannot do checksum offload for two L4 headers. The solution is using the checksum partial offload similar to VXLAN | TCP packet. Hardware calculates IP1, IP2 and TCP checksums and software calculates UDP checksum. However, unlike VXLAN | TCP case, IPsec's mlx5 driver cannot access the inner plaintext IP protocol type. Therefore, inner_ipproto is added in the sec_path structure to provide this information. Also, utilize the skb's csum_start to program L4 inner checksum offset. While at it, remove the call to mlx5e_set_eseg_swp and setup software parser fields directly in mlx5e_ipsec_set_swp. mlx5e_set_eseg_swp is not needed as the two features (GENEVE and IPsec) are different and adding this sharing layer creates unnecessary complexity and affect performance. For the case VXLAN packet over IPsec tunnel mode tunnel, checksum offload is disabled because the hardware does not support checksum offload for three L3 (IP) headers. Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Cc: Steffen Klassert Signed-off-by: Saeed Mahameed commit fa4535238fb5f306f95de89371a993057b32b2a4 Author: Huy Nguyen Date: Mon Jun 14 17:33:48 2021 +0300 net/xfrm: Add inner_ipproto into sec_path The inner_ipproto saves the inner IP protocol of the plain text packet. This allows vendor's IPsec feature making offload decision at skb's features_check and configuring hardware at ndo_start_xmit. For example, ConnectX6-DX IPsec device needs the plaintext's IP protocol to support partial checksum offload on VXLAN/GENEVE packet over IPsec transport mode tunnel. Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Cc: Steffen Klassert Acked-by: Steffen Klassert Signed-off-by: Saeed Mahameed commit dd7cf00f87dc6cba8dd87dd6c9a5f18f187976ff Author: Huy Nguyen Date: Mon Jun 14 17:33:47 2021 +0300 net/mlx5: Optimize mlx5e_feature_checks for non IPsec packet mlx5e_ipsec_feature_check belongs to mlx5e_tunnel_features_check. Also, IPsec is not the default configuration so it should be checked at the end instead of the beginning of mlx5e_features_check. Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Signed-off-by: Saeed Mahameed commit 5bf3ee97f4669dc9353f5aaf1c9f1a38cfbcdb1c Author: caihuoqing Date: Thu Jun 17 10:32:15 2021 +0800 net/mlx5: remove "default n" from Kconfig remove "default n" and "No" is default Signed-off-by: caihuoqing Signed-off-by: Saeed Mahameed commit 2cc7dad75da2bbbe2cd39caf295e4b3343f51dcb Author: Colin Ian King Date: Wed Jun 16 15:19:50 2021 +0100 net/mlx5: Fix spelling mistake "enught" -> "enough" There is a spelling mistake in a mlx5_core_err error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Saeed Mahameed commit d4472a4b8c61a76a1fdcca8a03d6470d7565d87c Author: Nathan Chancellor Date: Thu Jun 17 17:03:59 2021 -0700 net/mlx5: Use cpumask_available() in mlx5_eq_create_generic() When CONFIG_CPUMASK_OFFSTACK is unset, cpumask_var_t is not a pointer but a single element array, meaning its address in a structure cannot be NULL as long as it is not the first element, which it is not. This results in a clang warning: drivers/net/ethernet/mellanox/mlx5/core/eq.c:715:14: warning: address of array 'param->affinity' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!param->affinity) ~~~~~~~~^~~~~~~~ 1 warning generated. The helper cpumask_available was added in commit f7e30f01a9e2 ("cpumask: Add helper cpumask_available()") to handle situations like this so use it to keep the meaning of the code the same while resolving the warning. Fixes: e4e3f24b822f ("net/mlx5: Provide cpumask at EQ creation phase") Link: https://github.com/ClangBuiltLinux/linux/issues/1400 Signed-off-by: Nathan Chancellor Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 9201ab5f55223760ce7e8890815b1beaf41e2e7a Author: Jiapeng Chong Date: Tue Jun 22 14:09:21 2021 +0800 net/mlx5: Fix missing error code in mlx5_init_fs() The error code is missing in this code scenario, add the error code '-ENOMEM' to the return value 'err'. Eliminate the follow smatch warning: drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:2973 mlx5_init_fs() warn: missing error code 'err'. Reported-by: Abaci Robot Fixes: 4a98544d1827 ("net/mlx5: Move chains ft pool to be used by all firmware steering"). Signed-off-by: Jiapeng Chong Signed-off-by: Saeed Mahameed commit 7506d211b932870155bcb39e3dd9e39fab45a7c7 Author: John Fastabend Date: Wed Jun 16 15:55:00 2021 -0700 bpf: Fix null ptr deref with mixed tail calls and subprogs The sub-programs prog->aux->poke_tab[] is populated in jit_subprogs() and then used when emitting 'BPF_JMP|BPF_TAIL_CALL' insn->code from the individual JITs. The poke_tab[] to use is stored in the insn->imm by the code adding it to that array slot. The JIT then uses imm to find the right entry for an individual instruction. In the x86 bpf_jit_comp.c this is done by calling emit_bpf_tail_call_direct with the poke_tab[] of the imm value. However, we observed the below null-ptr-deref when mixing tail call programs with subprog programs. For this to happen we just need to mix bpf-2-bpf calls and tailcalls with some extra calls or instructions that would be patched later by one of the fixup routines. So whats happening? Before the fixup_call_args() -- where the jit op is done -- various code patching is done by do_misc_fixups(). This may increase the insn count, for example when we patch map_lookup_up using map_gen_lookup hook. This does two things. First, it means the instruction index, insn_idx field, of a tail call instruction will move by a 'delta'. In verifier code, struct bpf_jit_poke_descriptor desc = { .reason = BPF_POKE_REASON_TAIL_CALL, .tail_call.map = BPF_MAP_PTR(aux->map_ptr_state), .tail_call.key = bpf_map_key_immediate(aux), .insn_idx = i + delta, }; Then subprog start values subprog_info[i].start will be updated with the delta and any poke descriptor index will also be updated with the delta in adjust_poke_desc(). If we look at the adjust subprog starts though we see its only adjusted when the delta occurs before the new instructions, /* NOTE: fake 'exit' subprog should be updated as well. */ for (i = 0; i <= env->subprog_cnt; i++) { if (env->subprog_info[i].start <= off) continue; Earlier subprograms are not changed because their start values are not moved. But, adjust_poke_desc() does the offset + delta indiscriminately. The result is poke descriptors are potentially corrupted. Then in jit_subprogs() we only populate the poke_tab[] when the above insn_idx is less than the next subprogram start. From above we corrupted our insn_idx so we might incorrectly assume a poke descriptor is not used in a subprogram omitting it from the subprogram. And finally when the jit runs it does the deref of poke_tab when emitting the instruction and crashes with below. Because earlier step omitted the poke descriptor. The fix is straight forward with above context. Simply move same logic from adjust_subprog_starts() into adjust_poke_descs() and only adjust insn_idx when needed. [ 82.396354] bpf_testmod: version magic '5.12.0-rc2alu+ SMP preempt mod_unload ' should be '5.12.0+ SMP preempt mod_unload ' [ 82.623001] loop10: detected capacity change from 0 to 8 [ 88.487424] ================================================================== [ 88.487438] BUG: KASAN: null-ptr-deref in do_jit+0x184a/0x3290 [ 88.487455] Write of size 8 at addr 0000000000000008 by task test_progs/5295 [ 88.487471] CPU: 7 PID: 5295 Comm: test_progs Tainted: G I 5.12.0+ #386 [ 88.487483] Hardware name: Dell Inc. Precision 5820 Tower/002KVM, BIOS 1.9.2 01/24/2019 [ 88.487490] Call Trace: [ 88.487498] dump_stack+0x93/0xc2 [ 88.487515] kasan_report.cold+0x5f/0xd8 [ 88.487530] ? do_jit+0x184a/0x3290 [ 88.487542] do_jit+0x184a/0x3290 ... [ 88.487709] bpf_int_jit_compile+0x248/0x810 ... [ 88.487765] bpf_check+0x3718/0x5140 ... [ 88.487920] bpf_prog_load+0xa22/0xf10 Fixes: a748c6975dea3 ("bpf: propagate poke descriptors to subprograms") Reported-by: Jussi Maki Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Reviewed-by: Daniel Borkmann commit 38f75922a6905b010f597fc70dbb5db28398728e Merge: a432c771e2d9b fde56eea01f96 Author: David S. Miller Date: Tue Jun 22 14:36:01 2021 -0700 Merge branch 'mptcp-C-flag-and-fixes' Mat Martineau says: ==================== mptcp: Connection-time 'C' flag and two fixes Here are six more patches from the MPTCP tree. Most of them add support for the 'C' flag in the MPTCP connection-time option headers. This flag affects how the initial address and port are treated by each peer. Normally one peer may send MP_JOIN requests to the remote address and port that were used when initiating the MPTCP connection. The 'C' bit indicates that MP_JOINs should only be sent to remote addresses that have been advertised with ADD_ADDR. The other two patches are unrelated improvements. Patches 1-4: Add the 'C' flag feature, a sysctl to optionally enable it, and a selftest. Patch 5: Adjust rp_filter settings in a selftest. Patch 6: Improve rbuf cleanup for MPTCP sockets. ==================== Signed-off-by: David S. Miller commit fde56eea01f96b664eb63033990be0fd2a945da5 Author: Paolo Abeni Date: Tue Jun 22 12:25:23 2021 -0700 mptcp: refine mptcp_cleanup_rbuf The current cleanup rbuf tries a bit too hard to avoid acquiring the subflow socket lock. We may end-up delaying the needed ack, or skip acking a blocked subflow. Address the above extending the conditions used to trigger the cleanup to reflect more closely what TCP does and invoking tcp_cleanup_rbuf() on all the active subflows. Note that we can't replicate the exact tests implemented in tcp_cleanup_rbuf(), as MPTCP lacks some of the required info - e.g. ping-pong mode. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d8e336f77e3bce440f78432d259c9ddedada7b79 Author: Yonglong Li Date: Tue Jun 22 12:25:22 2021 -0700 selftests: mptcp: turn rp_filter off on each NIC To turn rp_filter off we should: echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter and echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter before NIC created. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Yonglong Li Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0cddb4a6f4e3a008d0a62be31829bdde21cf0530 Author: Geliang Tang Date: Tue Jun 22 12:25:21 2021 -0700 selftests: mptcp: add deny_join_id0 testcases This patch added a new argument '-d' for mptcp_join.sh script, to invoke the testcases for the MP_CAPABLE 'C' flag. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit df377be38725ced628251c1a3b954ef932a5586e Author: Geliang Tang Date: Tue Jun 22 12:25:20 2021 -0700 mptcp: add deny_join_id0 in mptcp_options_received This patch added a new flag named deny_join_id0 in struct mptcp_options_received. Set it when MP_CAPABLE with the flag MPTCP_CAP_DENYJOIN_ID0 is received. Also add a new flag remote_deny_join_id0 in struct mptcp_pm_data. When the flag deny_join_id0 is set, set this remote_deny_join_id0 flag. In mptcp_pm_create_subflow_or_signal_addr, if the remote_deny_join_id0 flag is set, and the remote address id is zero, stop this connection. Suggested-by: Florian Westphal Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit bab6b88e056038f618b2fb977d95b05ad3da8d0c Author: Geliang Tang Date: Tue Jun 22 12:25:19 2021 -0700 mptcp: add allow_join_id0 in mptcp_out_options This patch defined a new flag MPTCP_CAP_DENY_JOIN_ID0 for the third bit, labeled "C" of the MP_CAPABLE option. Add a new flag allow_join_id0 in struct mptcp_out_options. If this flag is set, send out the MP_CAPABLE option with the flag MPTCP_CAP_DENY_JOIN_ID0. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d2f77960e5b03b2d373252b2ee150a4a14010f99 Author: Geliang Tang Date: Tue Jun 22 12:25:18 2021 -0700 mptcp: add sysctl allow_join_initial_addr_port This patch added a new sysctl, named allow_join_initial_addr_port, to control whether allow peers to send join requests to the IP address and port number used by the initial subflow. Suggested-by: Florian Westphal Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 87e2a58ca6c7095e5dc43e25212183afbfe0ad64 Author: Lokesh Vutla Date: Fri May 28 10:27:43 2021 +0530 clk: keystone: syscon-clk: Add support for AM64 specific epwm-tbclk AM64 has 9 instances of EPWM modules. And each instance has a clk to Timer-Base sub-module that can be controlled by Control module. Update the driver with all the 9 instance of clocks associated to ti,am64-epwm-tbclk. Signed-off-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210528045743.16537-3-lokeshvutla@ti.com Reviewed-by: Tero Kristo Signed-off-by: Stephen Boyd commit 958ae02e8df8b656fa66d6172e8e35e8da2e3a4c Author: Lokesh Vutla Date: Fri May 28 10:27:42 2021 +0530 dt-bindings: clock: ehrpwm: Add support for AM64 specific compatible Introduce AM64 specific compatible for epwm time-base sub-module clock. Signed-off-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210528045743.16537-2-lokeshvutla@ti.com Acked-by: Rob Herring Reviewed-by: Tero Kristo Signed-off-by: Stephen Boyd commit 8fe44c080a53ac0ccbe88053a2e40f9acca33091 Author: Alex Deucher Date: Mon Jun 21 16:51:30 2021 -0400 drm/amdgpu/display: fold DRM_AMD_DC_DCN3_1 into DRM_AMD_DC_DCN No need for a separate flag now that DCN3.1 is not in bring up. Fold into DRM_AMD_DC_DCN like previous DCN IPs. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 519424d776ec5e629781855a57f05aac5ef60ecb Author: Bernard Zhao Date: Mon Jun 21 06:05:07 2021 -0700 drm/radeon: delete useless function return values & remove meaningless if(r) check code Function radeon_fence_driver_init always returns success, the function type maybe coule be changed to void. This patch first delete the check of the return value of the function call radeon_fence_driver_init, then, optimise the function declaration and function to void type. Reviewed-by: Christian König Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit a7268cf9a412208fcc0a930b1017057d81ba20dd Author: Aric Cyr Date: Sun Jun 13 19:41:46 2021 -0400 drm/amd/display: 3.2.141 Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 021eaef8ae2ad518b23d1196fe95ec5f590fa3ea Author: Anthony Koo Date: Sat Jun 12 20:33:42 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.71 - Introduce CMD for EDID CEA block parsing - Add SCR5 definition for reporting eDP power sequencer status Signed-off-by: Anthony Koo Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7335d95659329b20743674fe6fa0ff76a6985154 Author: Josip Pavic Date: Thu Jun 10 15:30:28 2021 -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 Signed-off-by: Josip Pavic Reviewed-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 715bfff397634c44d616e27e11c873be1d442977 Author: Stylon Wang Date: Thu Jun 10 14:11:57 2021 +0800 drm/amd/display: Revert "Guard ASSR with internal display flag" This reverts commit 9127daa0a8d88a6e6452eb8b7c9be4c3f42a867e. [Why] 1. Previous patch regresses on some embedded panels. 2. Project coreboot doesn't support passing of internal display flag. [How] This reverts "Guard ASSR with internal display flag" commit. Fixes: 9127daa0a8d88a ("drm/amd/display: Guard ASSR with internal display flag") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1620 Signed-off-by: Stylon Wang Reviewed-by: Wesley Chalmers Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit f274e2962677d77bcd0d1d767e1d2737edf07893 Merge: 40292383640a2 46bdcac533cca Author: Greg Kroah-Hartman Date: Tue Jun 22 22:03:25 2021 +0200 Merge tag 'icc-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 5.14 Here are changes for the 5.14-rc1 merge window consisting of interconnect driver updates. Driver changes: - New driver for SC7280 platforms. Signed-off-by: Georgi Djakov * tag 'icc-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: Add SC7280 interconnect provider driver dt-bindings: interconnect: Add Qualcomm SC7280 DT bindings commit 686f225039be2846845349669edbfc5771ba647a Merge: 6efb943b8616e 8271813e404cd Author: Stephen Boyd Date: Tue Jun 22 13:01:30 2021 -0700 Merge tag 'clk-meson-v5.14-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - Use determine_rate() for the pll ops instead of round_rate() - Restrict gp0/1 and audio plls range on g12a/sm1 - Improve axg-audio controller error on deferral - Add NNA clocks on g12a * tag 'clk-meson-v5.14-1' of https://github.com/BayLibre/clk-meson: clk: meson: g12a: Add missing NNA source clocks for g12b clk: meson: axg-audio: improve deferral handling clk: meson: g12a: fix gp0 and hifi ranges clk: meson: pll: switch to determine_rate for the PLL ops commit 91bc92d783fecb77b8bfa80787c8cfca6513a928 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:47:24 2021 +0930 MAINTAINERS: Add Focusrite Scarlett Gen 2/3 Mixer Driver entry Add Focusrite Scarlett Gen 2/3 Mixer Driver entry. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210622171724.GA15534@m.b4.vu Signed-off-by: Takashi Iwai commit d5bda7e03982f67ce2f6c0d79b750fb27077331a Author: Geoffrey D. Bennett Date: Wed Jun 23 02:34:13 2021 +0930 ALSA: usb-audio: scarlett2: Add support for the talkback feature Add support for the talkback feature of the 18i20 Gen 3. Co-developed-by: Vladimir Sadovnikov Signed-off-by: Vladimir Sadovnikov Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/e39599893a7479c290e1aaec6c79dcee87681b47.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit ac34df733d2dfe3b553897a1e9e1a44414f09834 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:34:09 2021 +0930 ALSA: usb-audio: scarlett2: Update get_config to do endian conversion For configuration items with a size of 16, scarlett2_usb_get_config() was filling *buf with little-endian data. Update it to convert to CPU endian. This function is not currently used so affects nothing yet; will be used by the upcoming talkback feature. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/cbc8b6eedd859dd27086ab4126d724a86dd50bcb.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit e914d8432cb4b99e8a3c42c12e912179a1cf3e73 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:33:58 2021 +0930 ALSA: usb-audio: scarlett2: Add speaker switching support The 18i8 and 18i20 Gen 3 support "speaker switching". Add a Speaker Switch control which can be set to Off/Main/Alt. When speaker switching is enabled or disabled, the interface may change the state of the Analog Outputs 3 and 4 routing and the global mute button, so use a flag private->speaker_switching_switched to note that those should be checked when the next "monitor other" notification is received. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/874193a534cd0aeb6f2e108ae761cadd2dc25ad2.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 8df25eb0a2ecdcc25a869f6126c35f89af90efb2 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:33:50 2021 +0930 ALSA: usb-audio: scarlett2: Update mux controls to allow updates Enabling/disabling speaker switching will update the mux configuration. To prepare for this, add a private->mux_updated flag and update the scarlett2_mux_src_enum_ctl_get() callback to check it. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/5ce3bb9fe4006b550d18c783c5ff640fe0bfbfcb.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit f02da6534810acb8d101143255a30e706ec7bb81 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:33:45 2021 +0930 ALSA: usb-audio: scarlett2: Add sw_hw_ctls and mux_ctls Save the struct snd_kcontrol pointers for the sw_hw and mux controls. This is in preparation for speaker switching support which needs to be able to update those controls. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/269d89181bf29dbea80ba6f8cfff84fb23b77f86.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 3b9e3720a91e419785de0fa536d24557ae6474e8 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:33:36 2021 +0930 ALSA: usb-audio: scarlett2: Split up sw_hw_enum_ctl_put() Split part of scarlett2_sw_hw_enum_ctl_put() out into scarlett2_sw_hw_change() so that the code which actually makes the change is available in its own function. This will be used by the speaker switching support which needs to set the SW/HW switch to HW when speaker switching is enabled. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/f2cf91841ba067b490e7709bc4b14f4532b4ddd5.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 9cfe1276a6736fe0bc84ed956e318c37cd0934e8 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:33:16 2021 +0930 ALSA: usb-audio: scarlett2: Label 18i8 Gen 3 line outputs correctly The 18i8 Gen 3 analogue 7/8 outputs are identified as line 3/4 on the rear of the unit. Add support for remapping the channel numbers to match the labelling. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/461acb911509e60e9ab48109ece3bbadae7440c8.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 6ef9fa4a0eb4cdc1f9a20070d2fca374bec62fff Author: Geoffrey D. Bennett Date: Wed Jun 23 02:33:08 2021 +0930 ALSA: usb-audio: scarlett2: Add direct monitor support The Solo and 2i2 devices don't have a mixer but they do have a "direct monitor" switch. Add support for getting and setting the state of this switch. Co-developed-by: Vladimir Sadovnikov Signed-off-by: Vladimir Sadovnikov Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/61d23dc4feb3b046d870ad7203e66ff2bd1d278c.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit ae58a1a1d7a49906737d6593dcad61acf12640e1 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:32:40 2021 +0930 ALSA: usb-audio: scarlett2: Add phantom power switch support Some inputs on Gen 3 models support software-selectable phantom power. Add support for getting and setting the state of those switches and the "Phantom Power Persistence" switch. Co-developed-by: Vladimir Sadovnikov Signed-off-by: Vladimir Sadovnikov Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/5837ce8a8c686560fc8f40b4204dd2a10721869b.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit dbbd4f9ea06612f78261d3a9b6bc74ed5770537d Author: Geoffrey D. Bennett Date: Wed Jun 23 02:32:36 2021 +0930 ALSA: usb-audio: scarlett2: Add "air" switch support Some inputs on Gen 3 models have an "air" feature which can be enabled from the driver or (model-dependent) from the front panel. Add support for getting and setting the state of those switches. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/44d448a4150b9c068754759c9fdd2bfe21484487.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 2fa96277fee64c74a2d9343e369d7eb846271a88 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:32:31 2021 +0930 ALSA: usb-audio: scarlett2: Add support for Solo and 2i2 Gen 3 Add initial support for the Focusrite Scarlett Solo and 2i2 devices: - They have no mixer - They don't support reporting sync status or levels - The configuration space is laid out differently to the other models - There is no level (line/inst) switch on input 1 of the Solo Co-developed-by: Vladimir Sadovnikov Signed-off-by: Vladimir Sadovnikov Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/190b90f6f1f8f8d4dfb5f0a7761ff8ae5c40fdde.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 9e15fae6c51a362418f8b3054f1322c54675df94 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:32:25 2021 +0930 ALSA: usb-audio: scarlett2: Allow bit-level access to config Add support for accessing configuration values when multiple values are stored in one byte. Needed by the upcoming Solo and 2i2 Gen 3 support. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/4e54e9e106ec7029c1a668c51b4fc769a7eb4ed0.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 8aea2e32a9e3c3a685dc6f3f7d58fbbd6263a857 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:32:09 2021 +0930 ALSA: usb-audio: scarlett2: Move get config above set config Move scarlett2_usb_get() and scarlett2_usb_get_config() above the functions relating to updating the configuration so that scarlett2_usb_set_config() can call scarlett2_usb_get() in a subsequent patch. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/1549f8e44548be679119f0b1462f888f4a03812d.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 303f204e83526d8f83220f41ba93b5af796bc323 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:31:52 2021 +0930 ALSA: usb-audio: scarlett2: Add Gen 3 MSD mode switch Add a control to disable the Gen 3 MSD mode so that the full functionality of the device is available. Don't create the other controls until MSD mode is disabled. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/1cb93bbe585f6b0a74f5dc27450bc87e1f3776dc.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit a5b3612305b221425a7e2244d0620b9c4ebf25ed Author: Geoffrey D. Bennett Date: Wed Jun 23 02:31:44 2021 +0930 ALSA: usb-audio: scarlett2: Add support for "input-other" notify Some models allow the level and pad settings to be controlled from the front-panel of the device. For these, the device will send an "input-other" notification to prompt the driver to re-read the status of those settings. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/06289a7697455e96b7dbdfd2d384d4b20f8df6e0.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 4be47798d76e6e694d8258eeb4d4be0a64371e34 Author: Geoffrey D. Bennett Date: Wed Jun 23 02:31:37 2021 +0930 ALSA: usb-audio: scarlett2: Add Gen 3 mixer support Add mixer support for the Focusrite Scarlett 4i4, 8i6, 18i8, and 18i20 Gen 3 devices. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/22d0dc877dec026eb19630edec217ab72ebcd50a.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit 785b6f29a795f109685f286b91e0250c206fbffb Author: Takashi Iwai Date: Wed Jun 23 02:30:49 2021 +0930 ALSA: usb-audio: scarlett2: Fix wrong resume call The current way of the scarlett2 mixer code managing the usb_mixer_elem_info object is wrong in two ways: it passes its internal index to the head.id field, and the val_type field is uninitialized. This ended up with the wrong execution at the resume because a bogus unit id is passed wrongly. Also, in the later code extensions, we'll have more mixer elements, and passing the index will overflow the unit id size (of 256). This patch corrects those issues. It introduces a new value type, USB_MIXER_BESPOKEN, which indicates a non-standard mixer element, and use this type for all scarlett2 mixer elements, as well as initializing the fixed unit id 0 for avoiding the overflow. Tested-by: Geoffrey D. Bennett Signed-off-by: Geoffrey D. Bennett Cc: Link: https://lore.kernel.org/r/49721219f45b7e175e729b0d9d9c142fd8f4342a.1624379707.git.g@b4.vu Signed-off-by: Takashi Iwai commit b126bbac98d4ce4f6e78604027c60f536893eb78 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:46 2021 +0930 ALSA: usb-audio: scarlett2: Fix Level Meter control The Level Meter control had a fixed number of channels and therefore only worked with the 18i20 Gen 2. Fix the control to contain the correct number of channels. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/5e9a2d5c136270db2d048db53a3b4b6e6d4a63de.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit e2cc91ac8f4e1b03a0e3e822c338401284c0b550 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:43 2021 +0930 ALSA: usb-audio: scarlett2: Split struct scarlett2_ports The scarlett2_ports struct contains both generic (hardware IDs and descriptions) and model-specific (port count) data. Remove the generic data from the scarlett2_device_info struct so it is not repeated for every model. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/7a9e57e4e55a482390c692a9e60731d72b664a15.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 6522c36419af1cc3e9613d4c5342cbdc740a359a Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:41 2021 +0930 ALSA: usb-audio: scarlett2: Allow arbitrary ordering of mux entries Some Gen 3 devices do not put all of the mux entries for the same port types together in order in the "set mux" message data. To prepare for this, replace the struct scarlett2_ports num[] array and the assignment_order[] array with mux_assignment[], a list of port types and ranges that is defined in the struct scarlett2_device_info. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/08e8d784d78262cb57496d28ef1ad7b6213a90ab.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 0c88f9db1910ff4fdfb9238970715be5e20cdcc0 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:39 2021 +0930 ALSA: usb-audio: scarlett2: Add mute support For each analogue output, in addition to the output volume (gain) control, the hardware also has a mute control. Add ALSA mute controls for each analogue output. If the device has the line_out_hw_vol feature, then the mute control is disabled along with the output volume control when the switch is set to HW. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/6fad82174b44633e46cfd96332a038de74d544f2.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 06250c89d47cefb51d13fa27e1d6f3032831c8c8 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:37 2021 +0930 ALSA: usb-audio: scarlett2: Add scarlett2_vol_ctl_write() helper Add helper function for setting the read/write status of a volume control. This will simplify the upcoming mute control support. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/00dd57e1abb3fa379fb51d4ac8537dbddc09f0ea.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 904e6da1fd725245269cedb4d9b4be74a2b22818 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:35 2021 +0930 ALSA: usb-audio: scarlett2: Remove repeated device info comments Document the fields of struct scarlett2_device_info in the definition of the struct, not in each instantiation. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/3486e4d38973333d4ec38f32578c16a9f97bf6c8.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 6fd9d695f305c8e18e8e87c28117c249040641c8 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:33 2021 +0930 ALSA: usb-audio: scarlett2: Move info lookup out of init function The info variable is not used by snd_scarlett_gen2_init() except to pass it to snd_scarlett_gen2_controls_create(), so move the lookup into that function. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/c4b6d17708e104503d9a2b88f9b3320bb9904cfa.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit d92b91576e3787659917f32d514de8c4d75631b4 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:31 2021 +0930 ALSA: usb-audio: scarlett2: Improve device info lookup Add the USB device ID to the scarlett2_device_info struct so that the switch statement which finds the appropriate struct can be replaced with a loop that looks through an array of pointers to those structs. Suggested-by: Vladimir Sadovnikov Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/474c408c29fb280a611e47e49e59ca2fb9810d27.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 76cb680603d5af2ccb40541b41d690113cf2df1f Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:29 2021 +0930 ALSA: usb-audio: scarlett2: Reformat scarlett2_config_items[] Use designated initializers and merge lines in preparation for more configuration items coming soon. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/512d14eeb3571a266810c954d0f83140a3af7afc.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 077e104e2e8b5e4a06ac0091201e6d9293cb5370 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:26 2021 +0930 ALSA: usb-audio: scarlett2: Merge common line in capture strings Use a common sprintf() format for the mixer element names generated in scarlett2_add_line_in_ctls() in preparation for more of them. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/d91dce45ac75a541c21f47540ecbda24bd83f68c.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit f3c61043013b8bad97f77b2cab0b438d75b94150 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:24 2021 +0930 ALSA: usb-audio: scarlett2: Add "Sync Status" control Add "Sync Status" control to display the sync locked/unlocked status. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/d6967d7a34b2ea7e0672ba819e4ed8b99e8dcd35.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit e840ee303639a4dcee35fc92613a02702341ae6c Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:20 2021 +0930 ALSA: usb-audio: scarlett2: Always enable interrupt polling Always enable interrupt polling as every model has some sort of status to report. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/8f49a6b9a9805ee0db221706193b7bb43b7fff75.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit c712c6c0ff2d60478582e337185bcdd520a7dc2e Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:18 2021 +0930 ALSA: usb-audio: scarlett2: Fix 6i6 Gen 2 line out descriptions There are two headphone outputs, and they map to the four analogue outputs. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/205e5e5348f08ded0cc4da5446f604d4b91db5bf.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit acf91b8122c7f61d60e05852bcbb880b72c00968 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:13 2021 +0930 ALSA: usb-audio: scarlett2: Update initialisation sequence The old initialisation code only works with Gen 2 devices. Replace it with an initialisation sequence that works on both Gen 2 and Gen 3 devices. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/6e5c4fedb74b813872f6a4b7fba30b6c471fa63a.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 1f7fa6e5afbf20a28ce7c20149825946f25c1059 Author: Geoffrey D. Bennett Date: Tue Jun 22 03:39:06 2021 +0930 ALSA: usb-audio: scarlett2: Add usb_tx/rx functions Pull out snd_usb_ctl_msg() calls from scarlett2_usb() and put into scarlett2_usb_tx() and scarlett2_usb_rx() functions. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/720d1d6f227fc8f5d7d6191a8de62db796940235.1624294591.git.g@b4.vu Signed-off-by: Takashi Iwai commit 0f7c956533680d5c905d256044d7b23f180dc230 Author: Dan Carpenter Date: Tue Jun 22 22:02:02 2021 +0300 ALSA: hdsp: fix a test for copy_to_user() failure The copy_to_user() function returns the number of bytes remaining to be copied. It doesn't return negatives. Fixes: 66c8f75919dd ("ALSA: hdsp: Fix assignment in if condition") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YNIzqpVR6L2t/RwJ@mwanda Signed-off-by: Takashi Iwai commit 0303b30375dff5351a79cc2c3c87dfa4fda29bed Author: Eric Dumazet Date: Mon Jun 21 11:02:44 2021 -0700 ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl() Both MAC802154_HWSIM_ATTR_RADIO_ID and MAC802154_HWSIM_ATTR_RADIO_EDGE must be present to avoid a crash. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Eric Dumazet Cc: Alexander Aring Cc: Stefan Schmidt Reported-by: syzbot Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210621180244.882076-1-eric.dumazet@gmail.com Signed-off-by: Stefan Schmidt commit 28a5501c3383f0e6643012c187b7c2027ef42aea Author: Dongliang Mu Date: Wed Jun 16 10:09:01 2021 +0800 ieee802154: hwsim: Fix memory leak in hwsim_add_one No matter from hwsim_remove or hwsim_del_radio_nl, hwsim_del fails to remove the entry in the edges list. Take the example below, phy0, phy1 and e0 will be deleted, resulting in e1 not freed and accessed in the future. hwsim_phys | ------------------------------ | | phy0 (edges) phy1 (edges) ----> e1 (idx = 1) ----> e0 (idx = 0) Fix this by deleting and freeing all the entries in the edges list between hwsim_edge_unsubscribe_me and list_del(&phy->list). Reported-by: syzbot+b80c9959009a9325cdff@syzkaller.appspotmail.com Fixes: 1c9f4a3fce77 ("ieee802154: hwsim: fix rcu handling") Signed-off-by: Dongliang Mu Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210616020901.2759466-1-mudongliangabcd@gmail.com Signed-off-by: Stefan Schmidt commit 2d3b2e4427e2d74085bd2c17ffd737875871c983 Author: Bob Pearson Date: Thu Jun 17 23:57:43 2021 -0500 RDMA/rxe: Fix redundant skb_put_zero rxe_init_packet() in rxe_net.c calls skb_put_zero() to reserve space for the payload and zero it out. All these bytes are then re-written with RoCE headers and payload. Remove this useless extra copy. Fixes: ecb238f6a7f3 ("IB/cxgb4: use skb_put_zero()/__skb_put_zero") Link: https://lore.kernel.org/r/20210618045742.204195-7-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 3896bde92d036de4376b9b4dfa3753ea23659f30 Author: Bob Pearson Date: Thu Jun 17 23:57:42 2021 -0500 RDMA/rxe: Fix extra copy in prepare_ack_packet Currently prepare_ack_packet writes almost all the fields of the BTH in the ack packet twice. Replace code with the subroutine init_bth(). Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20210618045742.204195-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit ec0fa2445c18ec49a0b7ee0aaa82d1ec00968fc9 Author: Bob Pearson Date: Thu Jun 17 23:57:41 2021 -0500 RDMA/rxe: Fix over copying in get_srq_wqe Currently get_srq_wqe() in rxe_resp.c copies the maximum possible number of bytes from the wqe into the QPs copy of the SRQ wqe. This is usually extra work and risks reading past the end of the SRQ circular buffer if the SRQ is configured with less than the maximum possible number of SGEs. Check the number of SGEs is not too large. Compute the actual number of bytes in the WR and copy only those. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20210618045742.204195-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 1993cbed65bb590a3479d175fc1ac3c775b6bba8 Author: Bob Pearson Date: Thu Jun 17 23:57:40 2021 -0500 RDMA/rxe: Fix extra copies in build_rdma_network_hdr build_rdma_network_hdr() in rxe_resp.c does more copying than is needed. Remove this subroutine and eliminate the extra copies for IPV6 and reduce the extra copying for IPV4. Fixes: e404f945a610 ("IB/rxe: improved debug prints & code cleanup") Link: https://lore.kernel.org/r/20210618045742.204195-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 230bb836ee88683052b01e3bff3885c440a785b1 Author: Bob Pearson Date: Thu Jun 17 23:57:39 2021 -0500 RDMA/rxe: Fix redundant call to ip_send_check For IPV4 packets sent on the wire the rxe driver calls ip_local_out() which immediately calls __ip_local_out() which sets iph->tot_len and calls ip_send_check(). This code is duplicated in prepare4(). On the loopback path the IP header checksum and tot_len fields are not used so they do not need to be set. Remove this redundant code. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20210618045742.204195-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit fceb24a73eec7bbc717e516d5420ae786c514d38 Author: Bob Pearson Date: Thu Jun 17 23:57:38 2021 -0500 RDMA/rxe: Fix useless copy in send_atomic_ack In send_atomic_ack() in rxe_resp.c there is code copying ack_pkt into the skb->cb[]. This doesn't do anything useful because the cb[] is not used in the transmit path by the rxe driver. Remove this code. Fixes: 4c93496f18ce ("IB/rxe: do not copy extra stack memory to skb") Link: https://lore.kernel.org/r/20210618045742.204195-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit d5d182ea5aa2ae3cb20f98dddcfeaf263b802c07 Author: Lang Cheng Date: Tue Jun 22 19:53:56 2021 +0800 RDMA/hns: Add vendor_err info to error WC ULP can get more error information of CQ through verbs instead of prints. Link: https://lore.kernel.org/r/1624362836-11631-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a432c771e2d9bc059ffe3028faf040c08b6a9f98 Merge: aff0824dc4d6e 9e47df005cab6 Author: David S. Miller Date: Tue Jun 22 11:28:52 2021 -0700 Merge branch 'sctp-packetization-path-MTU' Xin Long says: ==================== sctp: implement RFC8899: Packetization Layer Path MTU Discovery for SCTP transport Overview(From RFC8899): In contrast to PMTUD, Packetization Layer Path MTU Discovery (PLPMTUD) [RFC4821] introduces a method that does not rely upon reception and validation of PTB messages. It is therefore more robust than Classical PMTUD. This has become the recommended approach for implementing discovery of the PMTU [BCP145]. It uses a general strategy in which the PL sends probe packets to search for the largest size of unfragmented datagram that can be sent over a network path. Probe packets are sent to explore using a larger packet size. If a probe packet is successfully delivered (as determined by the PL), then the PLPMTU is raised to the size of the successful probe. If a black hole is detected (e.g., where packets of size PLPMTU are consistently not received), the method reduces the PLPMTU. SCTP Probe Packets: As the RFC suggested, the probe packets consist of an SCTP common header followed by a HEARTBEAT chunk and a PAD chunk. The PAD chunk is used to control the length of the probe packet. The HEARTBEAT chunk is used to trigger the sending of a HEARTBEAT ACK chunk to confirm this probe on the HEARTBEAT sender. The HEARTBEAT chunk also carries a Heartbeat Information parameter that includes the probe size to help an implementation associate a HEARTBEAT ACK with the size of probe that was sent. The sender use the nonce and the probe size to verify the information returned. Detailed Implementation on SCTP: +------+ +------->| Base |-----------------+ Connectivity | +------+ | or BASE_PLPMTU | | | confirmation failed | | v | | Connectivity +-------+ | | and BASE_PLPMTU | Error | | | confirmed +-------+ | | | Consistent | v | connectivity Black Hole | +--------+ | and BASE_PLPMTU detected | | Search |<---------------+ confirmed | +--------+ | ^ | | | | | Raise | | Search | timer | | algorithm | expired | | completed | | | | | v | +-----------------+ +---| Search Complete | +-----------------+ When PLPMTUD is enabled, it's in Base state, and starts to probe with BASE_PLPMTU (1200). If this probe succeeds, it goes to Search state; If this probe fails, it goes to Error state under which pl.pmtu goes down to MIN_PLPMTU (512) and keeps probing with BASE_PLPMTU until it succeeds and goes to Search state. During the Search state, the probe size is growing by a Big step (32) every time when the last probe succeeds at the beginning. Once a probe (such as 1420) fails after trying MAX_PROBES (3) times, the probe_size goes back to the last one (1420 - 32 = 1388), meanwhile 'probe_high' is set to 1420 and the growing step becomes a Small one (4). Then the probe is continuing with a Small step grown each round. Until it gets the optimal size (such as 1400) when probe with its next probe size (1404) fails, it sync this size to pathmtu and goes to Complete state. In Complete state, it will only does a probe check for the pathmtu just set, if it fails, which means a Black Hole is detected and it goes back to Base state. If it succeeds, it goes back to Search state again, and probe is continuing with growing a Small step (1400 + 4). If this probe fails, probe_high is set and goes back to 1388 and then Complete state, which is kind of a loop normally. However if the env's pathmtu changes to a big size somehow, this probe will succeed and then probe continues with growing a Big step (1400 + 32) each round until another probe fails. PTB Messages Process: PLPMTUD doesn't rely on these package to find the pmtu, and shouldn't trust it either. When processing them, it only changes the probe_size to PL_PTB_SIZE(info - hlen) if 'pl.pmtu < PL_PTB_SIZE < the current probe_size' druing Search state. As this could help probe_size to get to the optimal size faster, for exmaple: pl.pmtu = 1388, probe_size = 1420, while the env's pathmtu = 1400. When probe_size is 1420, a Toobig packet with 1400 comes back. If probe size changes to use 1400, it will save quite a few rounds to get there. But of course after having this value, PLPMTUD will still verify it on its own before using it. Patches: - Patch 1-6: introduce some new constants/variables from the RFC, systcl and members in transport, APIs for the following patches, chunks and a timer for the probe sending and some codes for the probe receiving. - Patch 7-9: implement the state transition on the tx path, rx path and toobig ICMP packet processing. This is the main algorithm part. - Patch 10: activate this feature - Patch 11-14: improve the process for ICMP packets for SCTP over UDP, so that it can also be covered by this feature. Tests: - do sysctl and setsockopt tests for this feature's enabling and disabling. - get these pr_debug points for this feature by # cat /sys/kernel/debug/dynamic_debug/control | grep PLP and enable them on kernel dynamic debug, then play with the pathmtu and check if the state transition and plpmtu change match the RFC. - do the above tests for SCTP over IPv4/IPv6 and SCTP over UDP. v1->v2: - See Patch 06/14. ==================== Signed-off-by: David S. Miller commit 9e47df005cab63e545671dba8dfd6852fff1c2cf Author: Xin Long Date: Tue Jun 22 14:05:00 2021 -0400 sctp: process sctp over udp icmp err on sctp side Previously, sctp over udp was using udp tunnel's icmp err process, which only does sk lookup on sctp side. However for sctp's icmp error process, there are more things to do, like syncing assoc pmtu/retransmit packets for toobig type err, and starting proto_unreach_timer for unreach type err etc. Now after adding PLPMTUD, which also requires to process toobig type err on sctp side. This patch is to process icmp err on sctp side by parsing the type/code/info in .encap_err_lookup and call sctp's icmp processing functions. Note as the 'redirect' err process needs to know the outer ip(v6) header's, we have to leave it to udp(v6)_err to handle it. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit d83060759a652ccb64d7486fe38c8347b4a64048 Author: Xin Long Date: Tue Jun 22 14:04:59 2021 -0400 sctp: extract sctp_v4_err_handle function from sctp_v4_err This patch is to extract sctp_v4_err_handle() from sctp_v4_err() to only handle the icmp err after the sock lookup, and it also makes the code clearer. sctp_v4_err_handle() will be used in sctp over udp's err handling in the following patch. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit f6549bd37b927655c6fecad88428a731cd8a4a34 Author: Xin Long Date: Tue Jun 22 14:04:58 2021 -0400 sctp: extract sctp_v6_err_handle function from sctp_v6_err This patch is to extract sctp_v6_err_handle() from sctp_v6_err() to only handle the icmp err after the sock lookup, and it also makes the code clearer. sctp_v6_err_handle() will be used in sctp over udp's err handling in the following patch. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 237a6a2e318c1ed7429e72f2640054bdda91646f Author: Xin Long Date: Tue Jun 22 14:04:57 2021 -0400 sctp: remove the unessessary hold for idev in sctp_v6_err Same as in tcp_v6_err() and __udp6_lib_err(), there's no need to hold idev in sctp_v6_err(), so just call __in6_dev_get() instead. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 7307e4fa4d295f6dc017fe4b19467c486a1275d7 Author: Xin Long Date: Tue Jun 22 14:04:56 2021 -0400 sctp: enable PLPMTUD when the transport is ready sctp_transport_pl_reset() is called whenever any of these 3 members in transport is changed: - probe_interval - param_flags & SPP_PMTUD_ENABLE - state == ACTIVE If all are true, start the PLPMTUD when it's not yet started. If any of these is false, stop the PLPMTUD when it's already running. sctp_transport_pl_update() is called when the transport dst has changed. It will restart the PLPMTUD probe. Again, the pathmtu won't change but use the dst's mtu until the Search phase is done. Note that after using PLPMTUD, the pathmtu is only initialized with the dst mtu when the transport dst changes. At other time it is updated by pl.pmtu. So sctp_transport_pmtu_check() will be called only when PLPMTUD is disabled in sctp_packet_config(). After this patch, the PLPMTUD feature from RFC8899 will be activated and can be used by users. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 83696408317735d105ad86a5470b39879ad2ec4d Author: Xin Long Date: Tue Jun 22 14:04:55 2021 -0400 sctp: do state transition when receiving an icmp TOOBIG packet PLPMTUD will short-circuit the old process for icmp TOOBIG packets. This part is described in rfc8899#section-4.6.2 (PL_PTB_SIZE = PTB_SIZE - other_headers_len). Note that from rfc8899#section-5.2 State Machine, each case below is for some specific states only: a) PL_PTB_SIZE < MIN_PLPMTU || PL_PTB_SIZE >= PROBED_SIZE, discard it, for any state b) MIN_PLPMTU < PL_PTB_SIZE < BASE_PLPMTU, Base -> Error, for Base state c) BASE_PLPMTU <= PL_PTB_SIZE < PLPMTU, Search -> Base or Complete -> Base, for Search and Complete states. d) PLPMTU < PL_PTB_SIZE < PROBED_SIZE, set pl.probe_size to PL_PTB_SIZE then verify it, for Search state. The most important one is case d), which will help find the optimal fast during searching. Like when pathmtu = 1392 for SCTP over IPv4, the search will be (20 is iphdr_len): 1. probe with 1200 - 20 2. probe with 1232 - 20 3. probe with 1264 - 20 ... 7. probe with 1388 - 20 8. probe with 1420 - 20 When sending the probe with 1420 - 20, TOOBIG may come with PL_PTB_SIZE = 1392 - 20. Then it matches case d), and saves some rounds to try with the 1392 - 20 probe. But of course, PLPMTUD doesn't trust TOOBIG packets, and it will go back to the common searching once the probe with the new size can't be verified. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit b87641aff9e772fda15d3386d159646eada2ceef Author: Xin Long Date: Tue Jun 22 14:04:54 2021 -0400 sctp: do state transition when a probe succeeds on HB ACK recv path As described in rfc8899#section-5.2, when a probe succeeds, there might be the following state transitions: - Base -> Search, occurs when probe succeeds with BASE_PLPMTU, pl.pmtu is not changing, pl.probe_size increases by SCTP_PL_BIG_STEP, - Error -> Search, occurs when probe succeeds with BASE_PLPMTU, pl.pmtu is changed from SCTP_MIN_PLPMTU to SCTP_BASE_PLPMTU, pl.probe_size increases by SCTP_PL_BIG_STEP. - Search -> Search Complete, occurs when probe succeeds with the probe size SCTP_MAX_PLPMTU less than pl.probe_high, pl.pmtu is not changing, but update *pathmtu* with it, pl.probe_size is set back to pl.pmtu to double check it. - Search Complete -> Search, occurs when probe succeeds with the probe size equal to pl.pmtu, pl.pmtu is not changing, pl.probe_size increases by SCTP_PL_MIN_STEP. So search process can be described as: 1. When it just enters 'Search' state, *pathmtu* is not updated with pl.pmtu, and probe_size increases by a big step (SCTP_PL_BIG_STEP) each round. 2. Until pl.probe_high is set when a probe fails, and probe_size decreases back to pl.pmtu, as described in the last patch. 3. When the probe with the new size succeeds, probe_size changes to increase by a small step (SCTP_PL_MIN_STEP) due to pl.probe_high is set. 4. Until probe_size is next to pl.probe_high, the searching finishes and it goes to 'Complete' state and updates *pathmtu* with pl.pmtu, and then probe_size is set to pl.pmtu to confirm by once more probe. 5. This probe occurs after "30 * probe_inteval", a much longer time than that in Search state. Once it is done it goes to 'Search' state again with probe_size increased by SCTP_PL_MIN_STEP. As we can see above, during the searching, pl.pmtu changes while *pathmtu* doesn't. *pathmtu* is only updated when the search finishes by which it gets an optimal value for it. A big step is used at the beginning until it gets close to the optimal value, then it changes to a small step until it has this optimal value. The small step is also used in 'Complete' until it goes to 'Search' state again and the probe with 'pmtu + the small step' succeeds, which means a higher size could be used. Then probe_size changes to increase by a big step again until it gets close to the next optimal value. Note that anytime when black hole is detected, it goes directly to 'Base' state with pl.pmtu set to SCTP_BASE_PLPMTU, as described in the last patch. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 1dc68c194571acc4027de5f8378227d0c0ff7e13 Author: Xin Long Date: Tue Jun 22 14:04:53 2021 -0400 sctp: do state transition when PROBE_COUNT == MAX_PROBES on HB send path The state transition is described in rfc8899#section-5.2, PROBE_COUNT == MAX_PROBES means the probe fails for MAX times, and the state transition includes: - Base -> Error, occurs when BASE_PLPMTU Confirmation Fails, pl.pmtu is set to SCTP_MIN_PLPMTU, probe_size is still SCTP_BASE_PLPMTU; - Search -> Base, occurs when Black Hole Detected, pl.pmtu is set to SCTP_BASE_PLPMTU, probe_size is set back to SCTP_BASE_PLPMTU; - Search Complete -> Base, occurs when Black Hole Detected pl.pmtu is set to SCTP_BASE_PLPMTU, probe_size is set back to SCTP_BASE_PLPMTU; Note a black hole is encountered when a sender is unaware that packets are not being delivered to the destination endpoint. So it includes the probe failures with equal probe_size to pl.pmtu, and definitely not include that with greater probe_size than pl.pmtu. The later one is the normal probe failure where probe_size should decrease back to pl.pmtu and pl.probe_high is set. pl.probe_high would be used on HB ACK recv path in the next patch. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit fe59379b9ab7ddad157f5379fa47dbf84c9b5e09 Author: Xin Long Date: Tue Jun 22 14:04:52 2021 -0400 sctp: do the basic send and recv for PLPMTUD probe This patch does exactly what rfc8899#section-6.2.1.2 says: The SCTP sender needs to be able to determine the total size of a probe packet. The HEARTBEAT chunk could carry a Heartbeat Information parameter that includes, besides the information suggested in [RFC4960], the probe size to help an implementation associate a HEARTBEAT ACK with the size of probe that was sent. The sender could also use other methods, such as sending a nonce and verifying the information returned also contains the corresponding nonce. The length of the PAD chunk is computed by reducing the probing size by the size of the SCTP common header and the HEARTBEAT chunk. Note that HB ACK chunk will carry back whatever HB chunk carried, including the probe_size we put it in; We also check hbinfo->probe_size in the HB ACK against link->pl.probe_size to validate this HB ACK chunk. v1->v2: - Remove the unused 'sp' and add static for sctp_packet_bundle_pad(). Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 92548ec2f1f92d0c0b60ce59592b645571672568 Author: Xin Long Date: Tue Jun 22 14:04:51 2021 -0400 sctp: add the probe timer in transport for PLPMTUD There are 3 timers described in rfc8899#section-5.1.1: PROBE_TIMER, PMTU_RAISE_TIMER, CONFIRMATION_TIMER This patches adds a 'probe_timer' in transport, and it works as either PROBE_TIMER or PMTU_RAISE_TIMER. At most time, it works as PROBE_TIMER and expires every a 'probe_interval' time to send the HB probe packet. When transport pl enters COMPLETE state, it works as PMTU_RAISE_TIMER and expires in 'probe_interval * 30' time to go back to SEARCH state and do searching again. SCTP HB is an acknowledged packet, CONFIRMATION_TIMER is not needed. The timer will start when transport pl enters BASE state and stop when it enters DISABLED state. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit d9e2e410ae301d4b540e965daca51de0e65e8a26 Author: Xin Long Date: Tue Jun 22 14:04:50 2021 -0400 sctp: add the constants/variables and states and some APIs for transport These are 4 constants described in rfc8899#section-5.1.2: MAX_PROBES, MIN_PLPMTU, MAX_PLPMTU, BASE_PLPMTU; And 2 variables described in rfc8899#section-5.1.3: PROBED_SIZE, PROBE_COUNT; And 5 states described in rfc8899#section-5.2: DISABLED, BASE, SEARCH, SEARCH_COMPLETE, ERROR; And these 4 APIs are used to reset/update PLPMTUD, check if PLPMTUD is enabled, and calculate the additional headers length for a transport. Note the member 'probe_high' in transport will be set to the probe size when a probe fails with this probe size in the next patches. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 3190b649b4d9391be7bde3edd8e924e451c5d2f6 Author: Xin Long Date: Tue Jun 22 14:04:49 2021 -0400 sctp: add SCTP_PLPMTUD_PROBE_INTERVAL sockopt for sock/asoc/transport With this socket option, users can change probe_interval for a transport, asoc or sock after it's created. Note that if the change is for an asoc, also apply the change to each transport in this asoc. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit d1e462a7a5f359cbb9a0e8fbfafcfb6657034105 Author: Xin Long Date: Tue Jun 22 14:04:48 2021 -0400 sctp: add probe_interval in sysctl and sock/asoc/transport PLPMTUD can be enabled by doing 'sysctl -w net.sctp.probe_interval=n'. 'n' is the interval for PLPMTUD probe timer in milliseconds, and it can't be less than 5000 if it's not 0. All asoc/transport's PLPMTUD in a new socket will be enabled by default. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 745a32117b5a0799ce1dd28d5a74dc2b7bf37692 Author: Xin Long Date: Tue Jun 22 14:04:47 2021 -0400 sctp: add pad chunk and its make function and event table This chunk is defined in rfc4820#section-3, and used to pad an SCTP packet. The receiver must discard this chunk and continue processing the rest of the chunks in the packet. Add it now, as it will be bundled with a heartbeat chunk to probe pmtu in the following patches. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit c4eb44ffd9d7d30902345accb2bd1e2334d1f5f2 Author: Shiraz Saleem Date: Tue Jun 22 12:52:31 2021 -0500 RDMA/irdma: Check return value from ib_umem_find_best_pgsz iwmr->page_size stores the return from ib_umem_find_best_pgsz and maybe zero when used in ib_umem_num_dma_blocks thus causing a divide by zero error. Fix this by erroring out of irdma_reg_user when 0 is returned from ib_umem_find_best_pgsz. Link: https://lore.kernel.org/r/20210622175232.439-3-tatyana.e.nikolova@intel.com Reported-by: coverity-bot Addresses-Coverity-ID: 1505149 ("Integer handling issues") Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Shiraz Saleem Signed-off-by: Tatyana Nikolova Signed-off-by: Jason Gunthorpe commit b743b86ce6bb2b32a05962a9cc713894d9736ae1 Author: Adrian Hunter Date: Mon Jun 21 18:05:06 2021 +0300 perf script: Share addr_al between functions Share the addr_location of 'addr' so that it need not be resolved more than once. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210621150514.32159-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4371fbc0c9c4bcd812e96bafd54a666c330292e8 Author: Adrian Hunter Date: Mon Jun 21 18:05:05 2021 +0300 perf script: Move filtering before scripting To make it possible to use filtering with scripts, move filtering before scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210621150514.32159-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f176199dc7a8a35cfd2bc76f57604614d6fafecc Author: Lang Cheng Date: Fri Jun 18 18:10:20 2021 +0800 RDMA/hns: Fix spelling mistakes of original 'orignal' should be 'original'. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Link: https://lore.kernel.org/r/1624011020-16992-11-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit cf7d00bff439490fa65fc192a43d913987105adc Author: Yixing Liu Date: Fri Jun 18 18:10:19 2021 +0800 RDMA/hns: Simplify the judgment in hns_roce_v2_post_send() The QP type has been checked in check_send_valid(), if it's not RC, it will process the UD/GSI branch. Link: https://lore.kernel.org/r/1624011020-16992-10-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit c462a0242bd938967c9a69c41364f80e188c1a7a Author: Wenpeng Liang Date: Fri Jun 18 18:10:18 2021 +0800 RDMA/hns: Encapsulate flushing CQE as a function The process of flushing CQE can be encapsultated into a function, which can reduce duplicate code. Link: https://lore.kernel.org/r/1624011020-16992-9-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a33958ca5204f8d2342fd8fe9f547e33fa6c07ed Author: Yangyang Li Date: Fri Jun 18 18:10:17 2021 +0800 RDMA/hns: Modify function return value type hns_roce_init_qp_table() will only return 0, because this function does not need to return a value, so it is modified to void type. Link: https://lore.kernel.org/r/1624011020-16992-8-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit c2614b99337db74d1f667e447798c5434658ac7e Author: Xi Wang Date: Fri Jun 18 18:10:16 2021 +0800 RDMA/hns: Clean definitions of EQC structure Remove unused members in EQ context structure. Fixes: 782832f25404 ("RDMA/hns: Simplify the function config_eqc()") Link: https://lore.kernel.org/r/1624011020-16992-7-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 58bc7acaf3f80525d6ee715c97c77066bc00f76b Author: Yangyang Li Date: Fri Jun 18 18:10:15 2021 +0800 RDMA/hns: Delete unnecessary branch of hns_roce_v2_query_qp When query_qp is called by userspace, max_send_wr and max_send_sge are set to 0 by the kernel driver. However, the userspace does not use these two return values from the kernel driver, but uses its own calculated values. So there is no need for special treatment. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/1624011020-16992-6-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit cc925ece79ada57fe513c514d02abc45bf803819 Author: Yangyang Li Date: Fri Jun 18 18:10:14 2021 +0800 RDMA/hns: Add member assignments for qp_init_attr Some kernel ULPs need to use the return value of qp_init_attr, so add member assignments for qp_init_attr. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/1624011020-16992-5-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 125073e76ba3c7cdedef0fb538d2f22be1f33f92 Author: Yixing Liu Date: Fri Jun 18 18:10:13 2021 +0800 RDMA/hns: Fix some print issues Remove redundant print and fix a character type mismatch. Fixes: 0e0ab04b5bbe ("RDMA/hns: Refactor the MTR creation flow") Link: https://lore.kernel.org/r/1624011020-16992-4-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2a38c0f10e6d7d28e06ff1eb1f350804c4850275 Author: Yixing Liu Date: Fri Jun 18 18:10:12 2021 +0800 RDMA/hns: Fix uninitialized variable A random value will be returned if the condition below is not met, so it needs to be initialized. Fixes: 9ea9a53ea93b ("RDMA/hns: Add mapped page count checking for MTR") Link: https://lore.kernel.org/r/1624011020-16992-3-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit e13026578b727becf2614f34a4f35e7f0ed21be1 Author: Lang Cheng Date: Fri Jun 18 18:10:11 2021 +0800 RDMA/hns: Force rewrite inline flag of WQE When a non-inline WR reuses a WQE that was used for inline last time, the remaining inline flag should be cleared. Fixes: 62490fd5a865 ("RDMA/hns: Avoid unnecessary memset on WQEs in post_send") Link: https://lore.kernel.org/r/1624011020-16992-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 9300041c661dacc0b4036f29315cef6008bc940d Author: Adrian Hunter Date: Mon Jun 21 18:05:04 2021 +0300 perf script: Move filter_cpu() earlier Generally, it should be more efficient if filter_cpu() comes before machine__resolve() because filter_cpu() is much less code than machine__resolve(). Example: $ perf record --sample-cpu -- make -C tools/perf >/dev/null Before: $ perf stat -- perf script -C 0 >/dev/null Performance counter stats for 'perf script -C 0': 116.94 msec task-clock # 0.992 CPUs utilized 2 context-switches # 17.103 /sec 0 cpu-migrations # 0.000 /sec 8,187 page-faults # 70.011 K/sec 478,351,812 cycles # 4.091 GHz 564,785,464 instructions # 1.18 insn per cycle 114,341,105 branches # 977.789 M/sec 2,615,495 branch-misses # 2.29% of all branches 0.117840576 seconds time elapsed 0.085040000 seconds user 0.032396000 seconds sys After: $ perf stat -- perf script -C 0 >/dev/null Performance counter stats for 'perf script -C 0': 107.45 msec task-clock # 0.992 CPUs utilized 3 context-switches # 27.919 /sec 0 cpu-migrations # 0.000 /sec 7,964 page-faults # 74.117 K/sec 438,417,260 cycles # 4.080 GHz 522,571,855 instructions # 1.19 insn per cycle 105,187,488 branches # 978.921 M/sec 2,356,261 branch-misses # 2.24% of all branches 0.108282546 seconds time elapsed 0.095935000 seconds user 0.011991000 seconds sys Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210621150514.32159-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2833c977c3049f521784e8954d4c90e4941187db Merge: fdcebbc2ac2cf 336529518e972 Author: Jason Gunthorpe Date: Tue Jun 22 15:08:39 2021 -0300 Merge branch 'mlx5_realtime_ts' into rdma.git for-next Aharon Landau says: ==================== In case device supports only real-time timestamp, the kernel will fail to create QP despite rdma-core requested such timestamp type. It is because device returns free-running timestamp, and the conversion from free-running to real-time is performed in the user space. This series fixes it, by returning real-time timestamp. ==================== * mlx5_realtime_ts: RDMA/mlx5: Support real-time timestamp directly from the device RDMA/mlx5: Refactor get_ts_format functions to simplify code Signed-off-by: Jason Gunthorpe commit 51c2ee6d121ceb31ab8d35aff4ce53007aefb455 Author: Nick Desaulniers Date: Mon Jun 21 16:18:22 2021 -0700 Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR We don't want compiler instrumentation to touch noinstr functions, which are annotated with the no_profile_instrument_function function attribute. Add a Kconfig test for this and make GCOV depend on it, and in the future, PGO. If an architecture is using noinstr, it should denote that via this Kconfig value. That makes Kconfigs that depend on noinstr able to express dependencies in an architecturally agnostic way. Cc: Masahiro Yamada Link: https://lore.kernel.org/lkml/YMTn9yjuemKFLbws@hirez.programming.kicks-ass.net/ Link: https://lore.kernel.org/lkml/YMcssV%2Fn5IBGv4f0@hirez.programming.kicks-ass.net/ Suggested-by: Nathan Chancellor Suggested-by: Peter Zijlstra Signed-off-by: Nick Desaulniers Reviewed-by: Peter Oberparleiter Reviewed-by: Nathan Chancellor Acked-by: Mark Rutland Acked-by: Heiko Carstens Acked-by: Peter Zijlstra (Intel) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210621231822.2848305-4-ndesaulniers@google.com commit ae4d682dfd3350d9836dafeed1fc5aa1e27c4963 Author: Nick Desaulniers Date: Mon Jun 21 16:18:21 2021 -0700 compiler_attributes.h: cleanups for GCC 4.9+ Since commit 6ec4476ac825 ("Raise gcc version requirement to 4.9") we no longer support building the kernel with GCC 4.8; drop the preprocess checks for __GNUC_MINOR__ version. It's implied that if __GNUC_MAJOR__ is 4, then the only supported version of __GNUC_MINOR__ left is 9. Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Peter Zijlstra (Intel) Reviewed-by: Miguel Ojeda Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210621231822.2848305-3-ndesaulniers@google.com commit 380d53c45ff21f66870ee965b62613137f9d010d Author: Nick Desaulniers Date: Mon Jun 21 16:18:20 2021 -0700 compiler_attributes.h: define __no_profile, add to noinstr noinstr implies that we would like the compiler to avoid instrumenting a function. Add support for the compiler attribute no_profile_instrument_function to compiler_attributes.h, then add __no_profile to the definition of noinstr. Link: https://lore.kernel.org/lkml/20210614162018.GD68749@worktop.programming.kicks-ass.net/ Link: https://reviews.llvm.org/D104257 Link: https://reviews.llvm.org/D104475 Link: https://reviews.llvm.org/D104658 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 Reviewed-by: Fangrui Song Reviewed-by: Miguel Ojeda Suggested-by: Peter Zijlstra Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Peter Zijlstra (Intel) Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210621231822.2848305-2-ndesaulniers@google.com commit 629e33a16809ae0274e1f5fc3d22b92b9bd0fdf1 Author: Nikolay Borisov Date: Tue Jun 22 16:27:38 2021 +0300 btrfs: remove unused btrfs_fs_info::total_pinned This got added 14 years ago in 324ae4df00fd ("Btrfs: Add block group pinned accounting back") but it was not ever used. Subsequently its usage got gradually removed in 8790d502e440 ("Btrfs: Add support for mirroring across drives") and 11833d66be94 ("Btrfs: improve async block group caching"). Let's remove it for good! Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit aff0824dc4d6ef5ee164c0e98e64d91731ca585b Author: Lorenzo Bianconi Date: Tue Jun 22 19:18:31 2021 +0200 net: marvell: return csum computation result from mvneta_rx_csum/mvpp2_rx_csum This is a preliminary patch to add hw csum hint support to mvneta/mvpp2 xdp implementation Tested-by: Matteo Croce Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit f84974e75f539a814a0a0caee62df7cff23eb072 Merge: 1b134d8d756a9 e46905641316d Author: David S. Miller Date: Tue Jun 22 10:52:40 2021 -0700 Merge branch 'tc-testing-dnat-tuple-collision' Marcelo Ricardo Leitner says: ==================== tc-testing: add test for ct DNAT tuple collision That was fixed in 13c62f5371e3 ("net/sched: act_ct: handle DNAT tuple collision"). For that, it requires that tdc is able to send diverse packets with scapy, which is then done on the 2nd patch of this series. ==================== Signed-off-by: David S. Miller commit e46905641316d7ffed867651310f176b1434ef69 Author: Marcelo Ricardo Leitner Date: Tue Jun 22 12:05:02 2021 -0300 tc-testing: add test for ct DNAT tuple collision When this test fails, /proc/net/nf_conntrack gets only 1 entry: ipv4 2 tcp 6 119 SYN_SENT src=10.0.0.10 dst=10.0.0.10 sport=5000 dport=10 [UNREPLIED] src=20.0.0.1 dst=10.0.0.10 sport=10 dport=5000 mark=0 secctx=system_u:object_r:unlabeled_t:s0 zone=0 use=2 When it works, it gets 2 entries: ipv4 2 tcp 6 119 SYN_SENT src=10.0.0.10 dst=10.0.0.20 sport=5000 dport=10 [UNREPLIED] src=20.0.0.1 dst=10.0.0.10 sport=10 dport=58203 mark=0 secctx=system_u:object_r:unlabeled_t:s0 zone=0 use=2 ipv4 2 tcp 6 119 SYN_SENT src=10.0.0.10 dst=10.0.0.10 sport=5000 dport=10 [UNREPLIED] src=20.0.0.1 dst=10.0.0.10 sport=10 dport=5000 mark=0 secctx=system_u:object_r:unlabeled_t:s0 zone=0 use=2 The missing entry is because the 2nd packet hits a tuple collusion and the conntrack entry doesn't get allocated. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 11f04de9021a14566f2ddee0fc9edd9c1783077c Author: Marcelo Ricardo Leitner Date: Tue Jun 22 12:05:01 2021 -0300 tc-testing: add support for sending various scapy packets It can be worth sending different scapy packets on a given test, as in the last patch of this series. For that, lets listify the scapy attribute and simply iterate over it. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit b4fd096cbb871340be837491fa1795864a48b2d9 Author: Marcelo Ricardo Leitner Date: Tue Jun 22 12:05:00 2021 -0300 tc-testing: fix list handling python lists don't have an 'add' method, but 'append'. Fixes: 14e5175e9e04 ("tc-testing: introduce scapyPlugin for basic traffic") Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit e3c9cfd07dcbc9ae4208c17813998ce6f08e88df Author: Ian Rogers Date: Mon Jun 21 14:56:46 2021 -0700 perf test: Pass the verbose option to shell tests Having a verbose option will allow shell tests to provide extra failure details when the fail or skip. Committer notes: Keep the 'script' variable at PATH_MAX, as its just something we'll pass to system(), not really a "path", so being arbitrary, reduce the patch size by not adding the three extra bytes to the 'script' variable. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20210621215648.2991319-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ce8eb4c728ef40b554b4f3d8963f11ed44502e00 Author: Vignesh Raghavendra Date: Tue Jun 22 20:08:57 2021 +0530 net: ti: am65-cpsw-nuss: Fix crash when changing number of TX queues When changing number of TX queues using ethtool: # ethtool -L eth0 tx 1 [ 135.301047] Unable to handle kernel paging request at virtual address 00000000af5d0000 [...] [ 135.525128] Call trace: [ 135.525142] dma_release_from_dev_coherent+0x2c/0xb0 [ 135.525148] dma_free_attrs+0x54/0xe0 [ 135.525156] k3_cppi_desc_pool_destroy+0x50/0xa0 [ 135.525164] am65_cpsw_nuss_remove_tx_chns+0x88/0xdc [ 135.525171] am65_cpsw_set_channels+0x3c/0x70 [...] This is because k3_cppi_desc_pool_destroy() which is called after k3_udma_glue_release_tx_chn() in am65_cpsw_nuss_remove_tx_chns() references struct device that is unregistered at the end of k3_udma_glue_release_tx_chn() Therefore the right order is to call k3_cppi_desc_pool_destroy() and destroy desc pool before calling k3_udma_glue_release_tx_chn(). Fix this throughout the driver. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Vignesh Raghavendra Signed-off-by: David S. Miller commit 1b134d8d756a944deb5f8cc14e7ea6573730442f Author: Loic Poulain Date: Tue Jun 22 16:21:40 2021 +0200 MAINTAINERS: network: add entry for WWAN This patch adds maintainer info for drivers/net/wwan subdir, including WWAN core and drivers. Adding Sergey and myself as maintainers and Johannes as reviewer. Signed-off-by: Loic Poulain Acked-by: Sergey Ryazanov Signed-off-by: David S. Miller commit c4ab7b56be0f6f18f025ddc8d469cce54f82415a Author: Aaron Conole Date: Tue Jun 22 10:02:33 2021 -0400 openvswitch: add trace points This makes openvswitch module use the event tracing framework to log the upcall interface and action execution pipeline. When using openvswitch as the packet forwarding engine, some types of debugging are made possible simply by using the ovs-vswitchd's ofproto/trace command. However, such a command has some limitations: 1. When trying to trace packets that go through the CT action, the state of the packet can't be determined, and probably would be potentially wrong. 2. Deducing problem packets can sometimes be difficult as well even if many of the flows are known 3. It's possible to use the openvswitch module even without the ovs-vswitchd (although, not common use). Introduce the event tracing points here to make it possible for working through these problems in kernel space. The style is copied from the mac80211 driver-trace / trace code for consistency - this creates some checkpatch splats, but the official 'guide' for adding tracepoints, as well as the existing examples all add the same splats so it seems acceptable. Signed-off-by: Aaron Conole Signed-off-by: David S. Miller commit b0e03950dd71315204c24a3dffb2d9fc477e82de Author: Dan Carpenter Date: Tue Jun 22 14:51:43 2021 +0300 stmmac: dwmac-loongson: fix uninitialized variable in loongson_dwmac_probe() The "mdio" variable is never set to false. Also it should be a bool type instead of int. Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit fdcebbc2ac2cfd82a18857b0c85067fa7e8f5233 Merge: 6d33cabf2baf3 13311e74253fe Author: Jason Gunthorpe Date: Tue Jun 22 14:42:52 2021 -0300 Merge tag 'v5.13-rc7' into rdma.git for-next Linux 5.13-rc7 Needed for dependencies in following patches. Merge conflict in rxe_cmop.c resolved by compining both patches. Signed-off-by: Jason Gunthorpe commit a4bdf76f54e142a5d54189f2c81b69095bf347ff Merge: 98534fce52efc 88f9a87afeeec Author: David S. Miller Date: Tue Jun 22 10:40:55 2021 -0700 Merge branch 'ethtool-eeprom' Ido Schimmel says: ==================== ethtool: Module EEPROM API improvements This patchset contains various improvements to recently introduced module EEPROM netlink API. Noticed these while adding module EEPROM write support. ==================== Signed-off-by: David S. Miller commit 88f9a87afeeec5dfdda3651f3db96d0006172d91 Author: Ido Schimmel Date: Tue Jun 22 09:50:52 2021 +0300 ethtool: Validate module EEPROM offset as part of policy Validate the offset to read from module EEPROM as part of the netlink policy and remove the corresponding check from the code. This also makes it possible to query the offset range from user space: $ genl ctrl policy name ethtool ... ID: 0x14 policy[32]:attr[2]: type=U32 range:[0,255] ... Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0dc7dd02ba7ab5f623f5e3a36443ec441364285a Author: Ido Schimmel Date: Tue Jun 22 09:50:51 2021 +0300 ethtool: Validate module EEPROM length as part of policy Validate the number of bytes to read from the module EEPROM as part of the netlink policy and remove the corresponding check from the code. This also makes it possible to query the length range from user space: $ genl ctrl policy name ethtool ... ID: 0x14 policy[32]:attr[3]: type=U32 range:[1,128] ... Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b8c48be23c2d03834fe01c3ea757d9df8b97013d Author: Ido Schimmel Date: Tue Jun 22 09:50:50 2021 +0300 ethtool: Use kernel data types for internal EEPROM struct The struct is not visible to user space and therefore should not use the user visible data types. Instead, use internal data types like other structures in the file. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 37a025e83902903df658489665499a548a53423b Author: Ido Schimmel Date: Tue Jun 22 09:50:49 2021 +0300 ethtool: Document behavior when module EEPROM bank attribute is omitted The kernel assumes bank 0 when 'ETHTOOL_MSG_MODULE_EEPROM_GET' is sent without 'ETHTOOL_A_MODULE_EEPROM_BANK'. Document it as part of the interface documentation. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f5fe211d13af52077bb66e89a5410fa75f691fe8 Author: Ido Schimmel Date: Tue Jun 22 09:50:48 2021 +0300 ethtool: Decrease size of module EEPROM get policy array The 'ETHTOOL_A_MODULE_EEPROM_DATA' attribute is not part of the get request. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 913d026fbfaf114ff87afcc77fa4e9309f87f114 Author: Ido Schimmel Date: Tue Jun 22 09:50:47 2021 +0300 ethtool: Document correct attribute type 'ETHTOOL_A_MODULE_EEPROM_DATA' is a binary attribute, not a nested one. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 78c57f22e3c87ab0a2844d7c9a120eba51ae34f4 Author: Ido Schimmel Date: Tue Jun 22 09:50:46 2021 +0300 ethtool: Use correct command name in title The command is called 'ETHTOOL_MSG_MODULE_EEPROM_GET', not 'ETHTOOL_MSG_MODULE_EEPROM'. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 98534fce52efc76d961f5fe4188a97a5db93c7dd Author: gushengxian Date: Mon Jun 21 23:05:19 2021 -0700 bridge: cfm: remove redundant return Return statements are not needed in Void function. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit ddeacc4f6494e07cbb6f033627926623f3e7a9d0 Author: Rafał Miłecki Date: Tue Jun 22 07:24:15 2021 +0200 net: broadcom: bcm4908_enet: reset DMA rings sw indexes properly Resetting software indexes in bcm4908_dma_alloc_buf_descs() is not enough as it's called during device probe only. Driver resets DMA on every .ndo_open callback and it's required to reset indexes then. This fixes inconsistent rings state and stalled traffic after interface down & up sequence. Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver") Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller commit c69f114d09891adfa3e301a35d9e872b8b7b5a50 Author: Miao Wang Date: Tue Jun 22 12:24:50 2021 +0800 net/ipv4: swap flow ports when validating source When doing source address validation, the flowi4 struct used for fib_lookup should be in the reverse direction to the given skb. fl4_dport and fl4_sport returned by fib4_rules_early_flow_dissect should thus be swapped. Fixes: 5a847a6e1477 ("net/ipv4: Initialize proto and ports in flow struct") Signed-off-by: Miao Wang Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 3c9ef511b9fa128a4c62e3aa0aac4c6b190f0d55 Author: Di Zhu Date: Tue Jun 22 11:09:29 2021 +0800 bonding: avoid adding slave device with IFF_MASTER flag The following steps will definitely cause the kernel to crash: ip link add vrf1 type vrf table 1 modprobe bonding.ko max_bonds=1 echo "+vrf1" >/sys/class/net/bond0/bonding/slaves rmmod bonding The root cause is that: When the VRF is added to the slave device, it will fail, and some cleaning work will be done. because VRF device has IFF_MASTER flag, cleanup process will not clear the IFF_BONDING flag. Then, when we unload the bonding module, unregister_netdevice_notifier() will treat the VRF device as a bond master device and treat netdev_priv() as struct bonding{} which actually is struct net_vrf{}. By analyzing the processing logic of bond_enslave(), it seems that it is not allowed to add the slave device with the IFF_MASTER flag, so we need to add a code check for this situation. Signed-off-by: Di Zhu Signed-off-by: David S. Miller commit a6e3f2985a80ef6a45a17d2d9d9151f17ea3ce07 Author: Jakub Kicinski Date: Mon Jun 21 18:52:54 2021 -0700 ip6_tunnel: fix GRE6 segmentation Commit 6c11fbf97e69 ("ip6_tunnel: add MPLS transmit support") moved assiging inner_ipproto down from ipxip6_tnl_xmit() to its callee ip6_tnl_xmit(). The latter is also used by GRE. Since commit 38720352412a ("gre: Use inner_proto to obtain inner header protocol") GRE had been depending on skb->inner_protocol during segmentation. It sets it in gre_build_header() and reads it in gre_gso_segment(). Changes to ip6_tnl_xmit() overwrite the protocol, resulting in GSO skbs getting dropped. Note that inner_protocol is a union with inner_ipproto, GRE uses the former while the change switched it to the latter (always setting it to just IPPROTO_GRE). Restore the original location of skb_set_inner_ipproto(), it is unclear why it was moved in the first place. Fixes: 6c11fbf97e69 ("ip6_tunnel: add MPLS transmit support") Signed-off-by: Jakub Kicinski Tested-by: Vadim Fedorenko Signed-off-by: David S. Miller commit 336529518e9724d4cecabc622e57bcdce02e7c61 Author: Aharon Landau Date: Wed Jun 16 10:57:39 2021 +0300 RDMA/mlx5: Support real-time timestamp directly from the device Currently, if the user asks for a real-time timestamp, the device will return a free-running one, and the timestamp will be translated to real-time in the user-space. When the device supports only real-time timestamp and not free-running, the creation of the QP will fail even though the user needs supported the real-time one. To prevent this, we will return the real-time timestamp directly from the device. Link: https://lore.kernel.org/r/c6cfc8e6f038575c5c2de6505830f7e74e4de80d.1623829775.git.leonro@nvidia.com Signed-off-by: Aharon Landau Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e596212e0f4be3313df9801a66bfa62777392515 Merge: 3ddd6e2f71092 597dbae77ee5a Author: David S. Miller Date: Tue Jun 22 10:22:42 2021 -0700 Merge branch 'mptcp-fixes' Mat Martineau says: ==================== mptcp: Fixes for v5.13 Here are two MPTCP fixes from Paolo. Patch 1 fixes some possible connect-time race conditions with MPTCP-level connection state changes. Patch 2 deletes a duplicate function declaration. ==================== Signed-off-by: David S. Miller commit 597dbae77ee5a2347b1b800c25c89a9181dd8a57 Author: Paolo Abeni Date: Mon Jun 21 17:33:09 2021 -0700 mptcp: drop duplicate mptcp_setsockopt() declaration commit 7896248983ef ("mptcp: add skeleton to sync msk socket options to subflows") introduced a duplicate declaration of mptcp_setsockopt(), just drop it. Reported-by: Florian Westphal Fixes: 7896248983ef ("mptcp: add skeleton to sync msk socket options to subflows") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 490274b47468793e3e157c2df6b2da0e646cc4a9 Author: Paolo Abeni Date: Mon Jun 21 17:33:08 2021 -0700 mptcp: avoid race on msk state changes The msk socket state is currently updated in a few spots without owning the msk socket lock itself. Some of such operations are safe, as they happens before exposing the msk socket to user-space and can't race with other changes. A couple of them, at connect time, can actually race with close() or shutdown(), leaving breaking the socket state machine. This change addresses the issue moving such update under the msk socket lock with the usual: scheme. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/56 Fixes: 8fd738049ac3 ("mptcp: fallback in case of simultaneous connect") Fixes: c3c123d16c0e ("net: mptcp: don't hang in mptcp_sendmsg() after TCP fallback") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit f2fcffe392c1fd8324f131bf33d7d350eff44bb6 Author: Kees Cook Date: Mon Jun 21 15:21:12 2021 -0700 hv_netvsc: Avoid field-overflowing memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. Add flexible array to represent start of buf_info, improving readability and avoid future warning where memcpy() thinks it is writing past the end of the structure. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 64a81b24487f0d2fba0f033029eec2abc7d82cee Author: Florian Fainelli Date: Mon Jun 21 15:10:55 2021 -0700 net: dsa: b53: Create default VLAN entry explicitly In case CONFIG_VLAN_8021Q is not set, there will be no call down to the b53 driver to ensure that the default PVID VLAN entry will be configured with the appropriate untagged attribute towards the CPU port. We were implicitly relying on dsa_slave_vlan_rx_add_vid() to do that for us, instead make it explicit. Reported-by: Vladimir Oltean Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit ee8e7622e09af0675f4d7c1dec9702791591d02b Author: Kees Cook Date: Mon Jun 21 14:54:19 2021 -0700 octeontx2-af: Avoid field-overflowing memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring fields. To avoid having memcpy() think a u64 "prof" is being written beyond, adjust the prof member type by adding struct nix_bandprof_s to the union to match the other structs. This silences the following future warning: In file included from ./include/linux/string.h:253, from ./include/linux/bitmap.h:10, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/cpumask.h:5, from ./arch/x86/include/asm/msr.h:11, from ./arch/x86/include/asm/processor.h:22, from ./arch/x86/include/asm/timex.h:5, from ./include/linux/timex.h:65, from ./include/linux/time32.h:13, from ./include/linux/time.h:60, from ./include/linux/stat.h:19, from ./include/linux/module.h:13, from drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:11: In function '__fortify_memcpy_chk', inlined from '__fortify_memcpy' at ./include/linux/fortify-string.h:310:2, inlined from 'rvu_nix_blk_aq_enq_inst' at drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:910:5: ./include/linux/fortify-string.h:268:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); please use struct_group() [-Wattribute-warning] 268 | __write_overflow_field(); | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c: ... else if (req->ctype == NIX_AQ_CTYPE_BANDPROF) memcpy(&rsp->prof, ctx, sizeof(struct nix_bandprof_s)); ... Signed-off-by: Kees Cook Tested-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit 7dd5d437c258bbf4cc15b35229e5208b87b8b4e0 Author: Bui Quang Minh Date: Sun Jun 13 21:34:39 2021 +0700 bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc In 32-bit architecture, the result of sizeof() is a 32-bit integer so the expression becomes the multiplication between 2 32-bit integer which can potentially leads to integer overflow. As a result, bpf_map_area_alloc() allocates less memory than needed. Fix this by casting 1 operand to u64. Fixes: 0d2c4f964050 ("bpf: Eliminate rlimit-based memory accounting for sockmap and sockhash maps") Fixes: 99c51064fb06 ("devmap: Use bpf_map_area_alloc() for allocating hash buckets") Fixes: 546ac1ffb70d ("bpf: add devmap, a map for storing net device references") Signed-off-by: Bui Quang Minh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210613143440.71975-1-minhquangbui99@gmail.com commit 0555b221528e9cb11f5766dcdee19c809187e42e Author: Steve French Date: Mon Jun 21 16:25:20 2021 -0500 smbdirect: missing rc checks while waiting for rdma events There were two places where we weren't checking for error (e.g. ERESTARTSYS) while waiting for rdma resolution. Addresses-Coverity: 1462165 ("Unchecked return value") Reviewed-by: Tom Talpey Reviewed-by: Long Li Signed-off-by: Steve French commit 6d33cabf2baf304730d01a942095416b3a8329ab Author: Kees Cook Date: Wed Jun 16 13:26:15 2021 -0700 RDMA/core: Use flexible array for mad data In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. Without a flexible array, this looks like an attempt to perform a memcpy() read beyond the end of the packet->mad.data array: drivers/infiniband/core/user_mad.c: memcpy(packet->msg->mad, packet->mad.data, IB_MGMT_MAD_HDR); Switch from [0] to [] to use the appropriately handled type for trailing bytes. Link: https://lore.kernel.org/r/20210616202615.1247242-1-keescook@chromium.org Signed-off-by: Kees Cook Signed-off-by: Jason Gunthorpe commit 78c235f9ea61ad636a032f2fb1f35ffbf7d02d7c Merge: 1a77de09b71fe 699409240389c Author: David S. Miller Date: Tue Jun 22 10:01:17 2021 -0700 Merge branch 'wwan-link-creation-improvements' Sergey Ryazanov says: ==================== net: WWAN link creation improvements This series is intended to make the WWAN network links management easier for WWAN device drivers. The series begins with adding support for network links creation to the WWAN HW simulator to facilitate code testing. Then there are a couple of changes that prepe the WWAN core code for further modifications. The following patches (4-6) simplify driver unregistering procedures by performing the created links cleanup in the WWAN core. 7th patch is to avoid the odd hold of a driver module. Next patches (8th and 9th) make it easier for drivers to create a network interface for a default data channel. Finally, 10th patch adds support for reporting of data link (aka channel aka context) id to make user aware which network interface is bound to which WWAN device data channel. All core changes have been tested with the HW simulator. The MHI and IOSM drivers were only compile tested as I have no access to this hardware. So the coresponding patches require ACK from the driver authors. Changelog: v1 -> v2: * rebased on top of latest net-next * patch that reworks the creation of mhi_net default netdev was dropped; as Loic explained, this network device has different purpose depending on a driver mode; Loic has a plan to rework the mhi_net driver, so we will defer the default netdev creation reworkings * add a new patch that creates a default network interface for IOSM modems * 7th, 8th, 10th patches have a minor updates (see the patches for details) ==================== Signed-off-by: David S. Miller commit 699409240389c2994e5fa1cb7d7599129bc7cfdf Author: Sergey Ryazanov Date: Tue Jun 22 01:51:00 2021 +0300 wwan: core: add WWAN common private data for netdev The WWAN core not only multiplex the netdev configuration data, but process it too, and needs some space to store its private data associated with the netdev. Add a structure to keep common WWAN core data. The structure will be stored inside the netdev private data before WWAN driver private data and have a field to make it easier to access the driver data. Also add a helper function that simplifies drivers access to their data. At the moment we use the common WWAN private data to store the WWAN data link (channel) id at the time the link is created, and report it back to user using the .fill_info() RTNL callback. This should help the user to be aware which network interface is bound to which WWAN device data channel. Signed-off-by: Sergey Ryazanov CC: M Chetan Kumar CC: Intel Corporation Signed-off-by: David S. Miller commit 83068395bbfcd96db74af75c6dc3a87a4f952220 Author: Sergey Ryazanov Date: Tue Jun 22 01:50:59 2021 +0300 net: iosm: create default link via WWAN core Utilize the just introduced WWAN core feature to create a default netdev for the default data (IP MUX) channel. Signed-off-by: Sergey Ryazanov CC: M Chetan Kumar CC: Intel Corporation Signed-off-by: David S. Miller commit ca374290aaade741a4781ae5f6e1ba7515e4e5fa Author: Sergey Ryazanov Date: Tue Jun 22 01:50:58 2021 +0300 wwan: core: support default netdev creation Most, if not each WWAN device driver will create a netdev for the default data channel. Therefore, add an option for the WWAN netdev ops registration function to create a default netdev for the WWAN device. A WWAN device driver should pass a default data channel link id to the ops registering function to request the creation of a default netdev, or a special value WWAN_NO_DEFAULT_LINK to inform the WWAN core that the default netdev should not be created. For now, only wwan_hwsim utilize the default link creation option. Other drivers will be reworked next. Signed-off-by: Sergey Ryazanov CC: M Chetan Kumar CC: Intel Corporation Signed-off-by: David S. Miller commit 9f0248ea476ee59d336d7c8bf1a5d0919d93d030 Author: Sergey Ryazanov Date: Tue Jun 22 01:50:57 2021 +0300 wwan: core: no more hold netdev ops owning module The WWAN netdev ops owner holding was used to protect from the unexpected memory disappear. This approach causes a dependency cycle (driver -> core -> driver) and effectively prevents a WWAN driver unloading. E.g. WWAN hwsim could not be unloaded until all simulated devices are removed: ~# modprobe wwan_hwsim devices=2 ~# lsmod | grep wwan wwan_hwsim 16384 2 wwan 20480 1 wwan_hwsim ~# rmmod wwan_hwsim rmmod: ERROR: Module wwan_hwsim is in use ~# echo > /sys/kernel/debug/wwan_hwsim/hwsim0/destroy ~# echo > /sys/kernel/debug/wwan_hwsim/hwsim1/destroy ~# lsmod | grep wwan wwan_hwsim 16384 0 wwan 20480 1 wwan_hwsim ~# rmmod wwan_hwsim For a real device driver this will cause an inability to unload module until a served device is physically detached. Since the last commit we are removing all child netdev(s) when a driver unregister the netdev ops. This allows us to permit the driver unloading, since any sane driver will call ops unregistering on a device deinitialization. So, remove the holding of an ops owner to make it easier to unload a driver module. The owner field has also beed removed from the ops structure as there are no more users of this field. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 322a0ba99c50d6abadeda709f0552eb8dac6668c Author: Sergey Ryazanov Date: Tue Jun 22 01:50:56 2021 +0300 net: iosm: drop custom netdev(s) removing Since the last commit, the WWAN core will remove all our network interfaces for us at the time of the WWAN netdev ops unregistering. Therefore, we can safely drop the custom code that cleans the list of created netdevs. Anyway it no longer removes any netdev, since all netdevs were removed earlier in the wwan_unregister_ops() call. Signed-off-by: Sergey Ryazanov Reviewed-by: M Chetan Kumar CC: M Chetan Kumar CC: Intel Corporation Signed-off-by: David S. Miller commit 2f75238014f074daddd79ccc17fa1caf72ff3815 Author: Sergey Ryazanov Date: Tue Jun 22 01:50:55 2021 +0300 wwan: core: remove all netdevs on ops unregistering We use the ops owner module hold to protect against ops memory disappearing. But this approach does not protect us from a driver that unregisters ops but forgets to remove netdev(s) that were created using this ops. In such case, we are left with netdev(s), which can not be removed since ops is gone. Moreover, batch netdevs removing on deinitialization is a desireable option for WWAN drivers as it is a quite common task. Implement deletion of all created links on WWAN netdev ops unregistering in the same way that RTNL removes all links on RTNL ops unregistering. Simply remove all child netdevs of a device whose WWAN netdev ops is unregistering. This way we protecting the kernel from buggy drivers and make it easier to write a driver deinitialization code. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit f492fccf3d62ba8e8b4d75d3f2ab82af25b18ffa Author: Sergey Ryazanov Date: Tue Jun 22 01:50:54 2021 +0300 wwan: core: multiple netdevs deletion support Use unregister_netdevice_queue() instead of simple unregister_netdevice() if the WWAN netdev ops does not provide a dellink callback. This will help to accelerate deletion of multiple netdevs. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 58c3b421c62edd30b0b660e3e6711ad91842c271 Author: Sergey Ryazanov Date: Tue Jun 22 01:50:53 2021 +0300 wwan: core: require WWAN netdev setup callback existence The setup callback will be unconditionally passed to the alloc_netdev_mqs(), where the NULL pointer dereference will cause the kernel panic. So refuse to register WWAN netdev ops with warning generation if the setup callback is not provided. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 355a4e7e0a231af80fc0f470235dc6747d2e0936 Author: Sergey Ryazanov Date: Tue Jun 22 01:50:52 2021 +0300 wwan: core: relocate ops registering code It is unlikely that RTNL callbacks will call WWAN ops (un-)register functions, but it is highly likely that the ops (un-)register functions will use RTNL link create/destroy handlers. So move the WWAN network interface ops (un-)register functions below the RTNL callbacks to be able to call them without forward declarations. No functional changes, just code relocation. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit f842f48891ad962c1dcac2c162f72862643fc221 Author: Sergey Ryazanov Date: Tue Jun 22 01:50:51 2021 +0300 wwan_hwsim: support network interface creation Add support for networking interface creation via the WWAN core by registering the WWAN netdev creation ops for each simulated WWAN device. Implemented minimalistic netdev support where the xmit callback just consumes all egress skbs. This should help with WWAN network interfaces creation testing. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit 1a77de09b71fe522191b241cfc9fedb5ebab5c69 Merge: 070258effa3b9 a4debc4772f44 Author: David S. Miller Date: Tue Jun 22 09:57:45 2021 -0700 Merge branch 'mptcp-optimizations' Mat Martineau says: ==================== mptcp: A few optimizations Here is a set of patches that we've accumulated and tested in the MPTCP tree. Patch 1 removes the MPTCP-level tx skb cache that added complexity but did not provide a meaningful benefit. Patch 2 uses the fast socket lock in more places. Patch 3 improves handling of a data-ready flag. Patch 4 deletes an unnecessary and racy connection state check. Patch 5 adds a MIB counter for one type of invalid MPTCP header. Patch 6 improves self test failure output. ==================== Signed-off-by: David S. Miller commit a4debc4772f44737358ea4210f6fca1f19f5c783 Author: Matthieu Baerts Date: Mon Jun 21 15:54:38 2021 -0700 selftests: mptcp: display proper reason to abort tests Without this modification, we were often displaying this error messages: FAIL: Could not even run loopback test But $ret could have been set to a non 0 value in many different cases: - net.mptcp.enabled=0 is not working as expected - setsockopt(..., TCP_ULP, "mptcp", ...) is allowed - ping between each netns are failing - tests between ns1 as a receiver and ns>1 are failing - other tests not involving ns1 as a receiver are failing So not only for the loopback test. Now a clearer message, including the time it took to run all tests, is displayed. Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 06285da96a1cdbad265a212f6729e19a515127a2 Author: Paolo Abeni Date: Mon Jun 21 15:54:37 2021 -0700 mptcp: add MIB counter for invalid mapping Account this exceptional events for better introspection. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8cfc47fc2eb0fd2d6eaa9e4b23b4bf6ef1bfaeef Author: Paolo Abeni Date: Mon Jun 21 15:54:36 2021 -0700 mptcp: drop redundant test in move_skbs_to_msk() Currently we check the msk state to avoid enqueuing new skbs at msk shutdown time. Such test is racy - as we can't acquire the msk socket lock - and useless, as the caller already checked the subflow field 'disposable', covering the same scenario in a race free manner - read and updated under the ssk socket lock. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3c90e377a1e87a35a7f868ed1c53ea4d62379a8d Author: Paolo Abeni Date: Mon Jun 21 15:54:35 2021 -0700 mptcp: don't clear MPTCP_DATA_READY in sk_wait_event() If we don't flush entirely the receive queue, we need set again such bit later. We can simply avoid clearing it. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 75e908c33615999abe1f3a8429d25dea30d28e4e Author: Paolo Abeni Date: Mon Jun 21 15:54:34 2021 -0700 mptcp: use fast lock for subflows when possible There are a bunch of callsite where the ssk socket lock is acquired using the full-blown version eligible for the fast variant. Let's move to the latter. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8ce568ed06ce4ca38c0b67d8de9b8d75b731f90a Author: Paolo Abeni Date: Mon Jun 21 15:54:33 2021 -0700 mptcp: drop tx skb cache The mentioned cache was introduced to reduce the number of skb allocation in atomic context, but the required complexity is excessive. This change remove the mentioned cache. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ce09673636f9581d2e2e24af785c463c030a1fd8 Merge: 45237f9898fce a96bfed64c898 Author: Arnaldo Carvalho de Melo Date: Tue Jun 22 13:56:50 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes, since perf/urgent is already upstream. Signed-off-by: Arnaldo Carvalho de Melo commit 070258effa3b9603ac0cd6a40297b00a01ea5fd8 Merge: 64295f0d01ae0 8d909440ab3b1 Author: David S. Miller Date: Tue Jun 22 09:54:55 2021 -0700 Merge branch 'marvell-mdio-ACPI' Marcin Wojtas says: ==================== ACPI MDIO support for Marvell controllers The third version of the patchset main change is dropping a clock handling optimisation patch for mvmdio driver. Other than that it sets explicit dependency on FWNODE_MDIO for CONFIG_FSL_XGMAC_MDIO and applies minor cosmetic improvements (please see the 'Changelog' below). The firmware ACPI description is exposed in the public github branch: https://github.com/semihalf-wojtas-marcin/edk2-platforms/commits/acpi-mdio-r20210613 There is also MacchiatoBin firmware binary available for testing: https://drive.google.com/file/d/1eigP_aeM4wYQpEaLAlQzs3IN_w1-kQr0 I'm looking forward to the comments or remarks. Best regards, Marcin Changelog: v2->v3 * Rebase on top of net-next/master. * Drop "net: mvmdio: simplify clock handling" patch. * 1/6 - fix code block comments. * 2/6 - unchanged * 3/6 - add "depends on FWNODE_MDIO" for CONFIG_FSL_XGMAC_MDIO * 4/6 - drop mention about the clocks from the commit message. * 5/6 - unchanged * 6/6 - add Andrew's RB. v1->v2 * 1/7 - new patch * 2/7 - new patch * 3/7 - new patch * 4/7 - new patch * 5/7 - remove unnecessary `if (has_acpi_companion())` and rebase onto the new clock handling * 6/7 - remove deprecated comment * 7/7 - no changes ==================== Signed-off-by: David S. Miller commit 8d909440ab3b118627b002e4e19e806b866371ba Author: Marcin Wojtas Date: Mon Jun 21 19:30:28 2021 +0200 net: mvpp2: remove unused 'has_phy' field The 'has_phy' field from struct mvpp2_port is no longer used. Remove it. Signed-off-by: Marcin Wojtas Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit dfce1bab8fdc2a2603a896ed836905ba63f13384 Author: Marcin Wojtas Date: Mon Jun 21 19:30:27 2021 +0200 net: mvpp2: enable using phylink with ACPI Now that the MDIO and phylink are supported in the ACPI world, enable to use them in the mvpp2 driver. Ensure a backward compatibility with the firmware whose ACPI description does not contain the necessary elements for the proper phy handling and fall back to relying on the link interrupts instead. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit c54da4c1acb1d62b3aec36b18473c430675e26d4 Author: Marcin Wojtas Date: Mon Jun 21 19:30:26 2021 +0200 net: mvmdio: add ACPI support This patch introducing ACPI support for the mvmdio driver by adding acpi_match_table with two entries: * "MRVL0100" for the SMI operation * "MRVL0101" for the XSMI mode Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit 33fc11f0983b969f6da3a295567aa814e958980b Author: Marcin Wojtas Date: Mon Jun 21 19:30:25 2021 +0200 net/fsl: switch to fwnode_mdiobus_register Utilize the newly added helper routine for registering the MDIO bus via fwnode_ interface. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit 62a6ef6a996f5eec73d30d079573a1fa8f95fcd9 Author: Marcin Wojtas Date: Mon Jun 21 19:30:24 2021 +0200 net: mdiobus: Introduce fwnode_mdbiobus_register() This patch introduces a new helper function that wraps acpi_/of_ mdiobus_register() and allows its usage via common fwnode_ interface. Fall back to raw mdiobus_register() in case CONFIG_FWNODE_MDIO is not enabled, in order to satisfy compatibility in all future user drivers. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit 7c4d7ca8cce3c8167e10f52a5afb553851f2086b Author: Marcin Wojtas Date: Mon Jun 21 19:30:23 2021 +0200 Documentation: ACPI: DSD: describe additional MAC configuration Document additional MAC configuration modes which can be processed by the existing fwnode_ phylink helpers: * "managed" standard ACPI _DSD property [1] * "fixed-link" data-only subnode linked in the _DSD package via generic mechanism of the hierarchical data extension [2] [1] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf [2] https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.pdf Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit 3ddd6e2f71092766b6040b9c33cf9906577b4025 Author: Íñigo Huguet Date: Mon Jun 21 17:32:38 2021 +0200 sfc: avoid duplicated code in ef10_sriov The fail path of efx_ef10_sriov_alloc_vf_vswitching is identical to the full content of efx_ef10_sriov_free_vf_vswitching, so replace it for a single call to efx_ef10_sriov_free_vf_vswitching. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 9a022e76500e8ce86dbce83c7856cf59820dce24 Author: Íñigo Huguet Date: Mon Jun 21 17:32:37 2021 +0200 sfc: explain that "attached" VFs only refer to Xen During SRIOV disabling it is checked wether any VF is currently attached to a guest, using pci_vfs_assigned function. However, this check only works with VFs attached with Xen, not with vfio/KVM. Added comments clarifying this point. Also, replaced manual check of PCI_DEV_FLAGS_ASSIGNED flag and used the helper function pci_is_dev_assigned instead. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 1ebe4feb8b442884f5a28d2437040096723dd1ea Author: Íñigo Huguet Date: Mon Jun 21 17:32:36 2021 +0200 sfc: error code if SRIOV cannot be disabled If SRIOV cannot be disabled during device removal or module unloading, return error code so it can be logged properly in the calling function. Note that this can only happen if any VF is currently attached to a guest using Xen, but not with vfio/KVM. Despite that in that case the VFs won't work properly with PF removed and/or the module unloaded, I have let it as is because I don't know what side effects may have changing it, and also it seems to be the same that other drivers are doing in this situation. In the case of being called during SRIOV reconfiguration, the behavior hasn't changed because the function is called with force=false. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 45423cff1db66cf0993e8a9bd0ac93e740149e49 Author: Íñigo Huguet Date: Mon Jun 21 17:32:35 2021 +0200 sfc: avoid double pci_remove of VFs If pci_remove was called for a PF with VFs, the removal of the VFs was called twice from efx_ef10_sriov_fini: one directly with pci_driver->remove and another implicit by calling pci_disable_sriov, which also perform the VFs remove. This was leading to crashing the kernel on the second attempt. Given that pci_disable_sriov already calls to pci remove function, get rid of the direct call to pci_driver->remove from the driver. 2 different ways to trigger the bug: - Create one or more VFs, then attach the PF to a virtual machine (at least with qemu/KVM) - Create one or more VFs, then remove the PF with: echo 1 > /sys/bus/pci/devices/PF_PCI_ID/remove Removing sfc module does not trigger the error, at least for me, because it removes the VF first, and then the PF. Example of a log with the error: list_del corruption, ffff967fd20a8ad0->next is LIST_POISON1 (dead000000000100) ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:47! [...trimmed...] RIP: 0010:__list_del_entry_valid.cold.1+0x12/0x4c [...trimmed...] Call Trace: efx_dissociate+0x1f/0x140 [sfc] efx_pci_remove+0x27/0x150 [sfc] pci_device_remove+0x3b/0xc0 device_release_driver_internal+0x103/0x1f0 pci_stop_bus_device+0x69/0x90 pci_stop_and_remove_bus_device+0xe/0x20 pci_iov_remove_virtfn+0xba/0x120 sriov_disable+0x2f/0xe0 efx_ef10_pci_sriov_disable+0x52/0x80 [sfc] ? pcie_aer_is_native+0x12/0x40 efx_ef10_sriov_fini+0x72/0x110 [sfc] efx_pci_remove+0x62/0x150 [sfc] pci_device_remove+0x3b/0xc0 device_release_driver_internal+0x103/0x1f0 unbind_store+0xf6/0x130 kernfs_fop_write+0x116/0x190 vfs_write+0xa5/0x1a0 ksys_write+0x4f/0xb0 do_syscall_64+0x5b/0x1a0 entry_SYSCALL_64_after_hwframe+0x65/0xca Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 64295f0d01ae0661a2cea42c598070b1c87ca6e0 Author: Eric Dumazet Date: Mon Jun 21 07:53:48 2021 -0700 virtio/vsock: avoid NULL deref in virtio_transport_seqpacket_allow() Make sure the_virtio_vsock is not NULL before dereferencing it. general protection fault, probably for non-canonical address 0xdffffc0000000071: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000388-0x000000000000038f] CPU: 0 PID: 8452 Comm: syz-executor406 Not tainted 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:virtio_transport_seqpacket_allow+0xbf/0x210 net/vmw_vsock/virtio_transport.c:503 Code: e8 c6 d9 ab f8 84 db 0f 84 0f 01 00 00 e8 09 d3 ab f8 48 8d bd 88 03 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e 2a 01 00 00 44 0f b6 a5 88 03 00 00 RSP: 0018:ffffc90003757c18 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: 0000000000000071 RSI: ffffffff88c908e7 RDI: 0000000000000388 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff88c90a06 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff88c90840 R14: 0000000000000000 R15: 0000000000000001 FS: 0000000001bee300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000082 CR3: 000000002847e000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: vsock_assign_transport+0x575/0x700 net/vmw_vsock/af_vsock.c:490 vsock_connect+0x200/0xc00 net/vmw_vsock/af_vsock.c:1337 __sys_connect_file+0x155/0x1a0 net/socket.c:1824 __sys_connect+0x161/0x190 net/socket.c:1841 __do_sys_connect net/socket.c:1851 [inline] __se_sys_connect net/socket.c:1848 [inline] __x64_sys_connect+0x6f/0xb0 net/socket.c:1848 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x43ee69 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:00007ffd49e7c788 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee69 RDX: 0000000000000010 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 0000000000402e50 R08: 0000000000000000 R09: 0000000000400488 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ee0 R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488 Fixes: 53efbba12cc7 ("virtio/vsock: enable SEQPACKET for transport") Signed-off-by: Eric Dumazet Cc: Arseny Krasnov Reported-by: syzbot Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 85e8b032d6ebb0f698a34dd22c2f13443d905888 Author: Eric Dumazet Date: Mon Jun 21 07:44:17 2021 -0700 vxlan: add missing rcu_read_lock() in neigh_reduce() syzbot complained in neigh_reduce(), because rcu_read_lock_bh() is treated differently than rcu_read_lock() WARNING: suspicious RCU usage 5.13.0-rc6-syzkaller #0 Not tainted ----------------------------- include/net/addrconf.h:313 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 3 locks held by kworker/0:0/5: #0: ffff888011064d38 ((wq_completion)events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888011064d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888011064d38 ((wq_completion)events){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888011064d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888011064d38 ((wq_completion)events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888011064d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x871/0x1600 kernel/workqueue.c:2247 #1: ffffc90000ca7da8 ((work_completion)(&port->wq)){+.+.}-{0:0}, at: process_one_work+0x8a5/0x1600 kernel/workqueue.c:2251 #2: ffffffff8bf795c0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1da/0x3130 net/core/dev.c:4180 stack backtrace: CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events ipvlan_process_multicast Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 __in6_dev_get include/net/addrconf.h:313 [inline] __in6_dev_get include/net/addrconf.h:311 [inline] neigh_reduce drivers/net/vxlan.c:2167 [inline] vxlan_xmit+0x34d5/0x4c30 drivers/net/vxlan.c:2919 __netdev_start_xmit include/linux/netdevice.h:4944 [inline] netdev_start_xmit include/linux/netdevice.h:4958 [inline] xmit_one net/core/dev.c:3654 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3670 __dev_queue_xmit+0x2133/0x3130 net/core/dev.c:4246 ipvlan_process_multicast+0xa99/0xd70 drivers/net/ipvlan/ipvlan_core.c:287 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Fixes: f564f45c4518 ("vxlan: add ipv6 proxy support") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 2dc0a201d0f59e6818ef443609f0850a32910844 Author: Sandor Bodo-Merle Date: Tue Jun 22 17:26:30 2021 +0200 PCI: iproc: Support multi-MSI only on uniprocessor kernel The interrupt affinity scheme used by this driver is incompatible with multi-MSI as it implies moving the doorbell address to that of another MSI group. This isn't possible for multi-MSI, as all the MSIs must have the same doorbell address. As such it is restricted to systems with a single CPU. Link: https://lore.kernel.org/r/20210622152630.40842-2-sbodomerle@gmail.com Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs") Reported-by: Marc Zyngier Signed-off-by: Sandor Bodo-Merle Signed-off-by: Lorenzo Pieralisi Acked-by: Marc Zyngier Acked-by: Pali Rohár Acked-by: Ray Jui commit e673d697b9a234fc3544ac240e173cef8c82b349 Author: Sandor Bodo-Merle Date: Tue Jun 22 17:26:29 2021 +0200 PCI: iproc: Fix multi-MSI base vector number allocation Commit fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs") introduced multi-MSI support with a broken allocation mechanism (it failed to reserve the proper number of bits from the inner domain). Natural alignment of the base vector number was also not guaranteed. Link: https://lore.kernel.org/r/20210622152630.40842-1-sbodomerle@gmail.com Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs") Reported-by: Pali Rohár Signed-off-by: Sandor Bodo-Merle Signed-off-by: Lorenzo Pieralisi Acked-by: Marc Zyngier Acked-by: Pali Rohár Acked-by: Ray Jui commit d3a1a18ab034fcbec575d10f016b4ae02358cbde Author: Kees Cook Date: Thu Jun 17 10:10:58 2021 -0700 wcn36xx: Avoid memset() beyond end of struct field In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring array fields. Instead of writing past the end of the header to reach the rest of the body, replace the redundant function with existing macro to wipe struct contents and set field values. Additionally adjusts macro to add missing parens. Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210617171058.3410494-1-keescook@chromium.org commit c8bcd82a4efd053cdd5ce515a8b0003011a5f756 Author: Kees Cook Date: Wed Jun 16 12:54:10 2021 -0700 ath11k: Avoid memcpy() over-reading of he_cap In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring array fields. Since peer_he_cap_{mac,phy}info and he_cap_elem.{mac,phy}_cap_info are not the same sizes, memcpy() was reading beyond field boundaries. Instead, correctly cap the copy length and pad out any difference in size (peer_he_cap_macinfo is 8 bytes whereas mac_cap_info is 6, and peer_he_cap_phyinfo is 12 bytes whereas phy_cap_info is 11). Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210616195410.1232119-1-keescook@chromium.org commit 829eea7c94e0bac804e65975639a2f2e5f147033 Author: Wei Mingzhi Date: Sat Jun 19 00:08:40 2021 +0800 mt7601u: add USB device ID for some versions of XiaoDu WiFi Dongle. USB device ID of some versions of XiaoDu WiFi Dongle is 2955:1003 instead of 2955:1001. Both are the same mt7601u hardware. Signed-off-by: Wei Mingzhi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210618160840.305024-1-whistler@member.fsf.org commit 59c668d700be72bdf76932f5a7db0af947ee0539 Author: Kees Cook Date: Thu Jun 17 10:15:22 2021 -0700 mwifiex: Avoid memset() over-write of WEP key_material In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring array fields. When preparing to call mwifiex_set_keyparamset_wep(), key_material is treated very differently from its structure layout (which has only a single struct mwifiex_ie_type_key_param_set). Instead, add a new type to the union so memset() can correctly reason about the size of the structure. Note that the union ("params", 196 bytes) containing key_material was not large enough to hold the target of this memset(): sizeof(struct mwifiex_ie_type_key_param_set) == 60, NUM_WEP_KEYS = 4, so 240 bytes, or 44 bytes past the end of "params". The good news is that it appears that the command buffer, as allocated, is 2048 bytes (MWIFIEX_SIZE_OF_CMD_BUFFER), so no neighboring memory appears to be getting clobbered. Signed-off-by: Kees Cook Reviewed-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210617171522.3410951-1-keescook@chromium.org commit 0d5e743db480642818401fb34bbc3f0da28abdfb Author: Kees Cook Date: Thu Jun 17 10:13:17 2021 -0700 rtlwifi: rtl8192de: Fully initialize curvecount_val In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring array fields. The size argument to memset() is bytes, but the array element size of curvecount_val is u32, so "CV_CURVE_CNT * 2" was only 1/4th of the contents of curvecount_val. Adjust memset() to wipe full buffer size. Signed-off-by: Kees Cook Reviewed-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210617171317.3410722-1-keescook@chromium.org commit 3f26f7665c5ddc880444e3daaecb3a46794ba3a4 Author: Kees Cook Date: Wed Jun 16 21:14:31 2021 -0700 mwl8k: Avoid memcpy() over-reading of mcs.rx_mask In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. Use the sub-structure address directly. Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210617041431.2168953-1-keescook@chromium.org commit 70ca8441ebfc4412dc9d3c56409e73dba959ab34 Author: Kees Cook Date: Wed Jun 16 13:39:51 2021 -0700 orinoco: Avoid field-overflowing memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring array fields. Validate the expected key size and introduce a wrapping structure to use as the multi-field memcpy() destination so that overflows can be correctly detected. Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210616203952.1248910-1-keescook@chromium.org commit b38678a73c4d8a3616ca14713154e062b4c4db63 Author: wengjianfeng Date: Thu May 20 08:55:45 2021 +0800 rtw88: coex: remove unnecessary variable and label In some funciton, the variable ret just used as return value,and out label just return ret,so ret and out label are unnecessary, we should delete these and use return true/false to replace. Signed-off-by: wengjianfeng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210520005545.31272-1-samirweng1979@163.com commit 956c6d4f20c5446727e0c912dd8f527f2dc7b779 Author: Ping-Ke Shih Date: Mon Jun 7 09:22:54 2021 +0800 rtw88: add quirks to disable pci capabilities 8821CE with ASPM cannot work properly on Protempo Ltd L116HTN6SPW. Add a quirk to disable the cap. The reporter describes the symptom is that this module (driver) causes frequent freezes, randomly but usually within a few minutes of running (thus very soon after boot): screen display remains frozen, no response to either keyboard or mouse input. All I can do is to hold the power button to power off, then reboot. Reported-by: Paul Szabo Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210607012254.6306-1-pkshih@realtek.com commit ae04f15b1a83e813f5c270f44692766dc3c5a6ce Author: Po-Hao Huang Date: Fri May 28 11:29:01 2021 +0800 rtw88: refine unwanted h2c command Don't send beacon filter h2c when there is no valid context. Return early instead of printing out warning messages, so others won't get confused. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210528032901.12927-3-pkshih@realtek.com commit 7b80f3e48c4b0ff85ff91945a2537d0bbc3e3cc4 Author: Zong-Zhe Yang Date: Fri May 28 11:29:00 2021 +0800 rtw88: dump FW crash via devcoredump Use device coredump framework instead of print_hex_dump to support FW crash dump. Pass data to the framework if preparing and dumping are successful. The framework will take the ownership of the data. The data will be freed after the framework determines its lifetime is over. A new coredump will not work if the previous one still exists. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210528032901.12927-2-pkshih@realtek.com commit a853d234e179086040912a8bbb3341829c079495 Author: Chin-Yen Lee Date: Fri May 14 15:55:17 2021 +0800 rtw88: notify fw when driver in scan-period to avoid potential problem It is found that driver scan could be affected by dynamic mechanism of firmware, so we notify firmware to stop it in the scan period. Another, firmware will detect the background noise and report to driver for further use. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210514075517.14216-3-pkshih@realtek.com commit 9a711831c4e71f29897b3489c3097081aea580c4 Author: Chin-Yen Lee Date: Fri May 14 15:55:16 2021 +0800 rtw88: add rtw_fw_feature_check api add api to check if a certain feature is supported. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210514075517.14216-2-pkshih@realtek.com commit 7a1baaaee6c866455c9c77bf9b0405941a3678c7 Author: Po-Hao Huang Date: Thu May 6 16:36:43 2021 +0800 rtw88: 8822c: update RF parameter tables to v62 Update RTL8822C devices' RF tables to v62. This fixes higher than expected spur in 2400 MHz under CCK mask. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210506083643.18317-1-pkshih@realtek.com commit 3eab8ca6b1756d551da42e958c6f48f68cf470d3 Author: Wan Jiabing Date: Fri Apr 30 10:49:50 2021 +0800 rtw88: Remove duplicate include of coex.h In commit fb8517f4fade4 ("rtw88: 8822c: add CFO tracking"), "coex.h" was added here which caused the duplicate include. Remove the later duplicate include. Signed-off-by: Wan Jiabing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210430024951.33406-1-wanjiabing@vivo.com commit 05684fd583e1acc34dddea283838fbfbed4904a0 Author: Po-Hao Huang Date: Mon Apr 26 09:32:52 2021 +0800 rtw88: 8822c: fix lc calibration timing Before this patch, we use value from 2 seconds ago to decide whether we should do lc calibration. Although this don't happen frequently, fix flow to the way it should be. Fixes: 7ae7784ec2a8 ("rtw88: 8822c: add LC calibration for RTL8822C") Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210426013252.5665-3-pkshih@realtek.com commit 1188301fd8ef370ef344a98fbbf04b8b07148294 Author: Po-Hao Huang Date: Mon Apr 26 09:32:51 2021 +0800 rtw88: add path diversity This feature chooses to transmit with antenna that has better signal strength periodically under 1ss rate. It can benefit connection quality in the following cases: 1. User is far away from the AP. 2. The far-field pattern of the antenna showed significant signal strength difference. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210426013252.5665-2-pkshih@realtek.com commit cd96e22bc1da0a7ddbe0769f6e393022aa8be1f1 Author: Po-Hao Huang Date: Mon Apr 26 09:32:50 2021 +0800 rtw88: add beacon filter support Adding this supports beacon filter and CQM. Let firmware perform connection quality monitor and beacon processing. This make host CPU wakeup less under power save mode. To make mechanisms work as usual, fw will notify driver events such as signal change and beacon loss. This feature needs firmware 9.9.8 or newer to support it, and driver is compatible with older firmware. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210426013252.5665-1-pkshih@realtek.com commit 4e82d2e20f3b11f253bc5c6e92f05ed3694a1ae3 Author: Baokun Li Date: Wed Jun 9 15:02:42 2021 +0800 clockevents: Use list_move() instead of list_del()/list_add() Simplify the code. Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210609070242.1322450-1-libaokun1@huawei.com commit ee62a5c6bb100b6fb07f3da3818c10a24d440e10 Author: Kumar Kartikeya Dwivedi Date: Sat Jun 19 09:44:54 2021 +0530 libbpf: Switch to void * casting in netlink helpers Netlink helpers I added in 8bbb77b7c7a2 ("libbpf: Add various netlink helpers") used char * casts everywhere, and there were a few more that existed from before. Convert all of them to void * cast, as it is treated equivalently by clang/gcc for the purposes of pointer arithmetic and to follow the convention elsewhere in the kernel/libbpf. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210619041454.417577-2-memxor@gmail.com commit 0ae64fb6b645e0f976e08bc3c05e518856f19d00 Author: Kumar Kartikeya Dwivedi Date: Sat Jun 19 09:44:53 2021 +0530 libbpf: Add request buffer type for netlink messages Coverity complains about OOB writes to nlmsghdr. There is no OOB as we write to the trailing buffer, but static analyzers and compilers may rightfully be confused as the nlmsghdr pointer has subobject provenance (and hence subobject bounds). Fix this by using an explicit request structure containing the nlmsghdr, struct tcmsg/ifinfomsg, and attribute buffer. Also switch nh_tail (renamed to req_tail) to cast req * to char * so that it can be understood as arithmetic on pointer to the representation array (hence having same bound as request structure), which should further appease analyzers. As a bonus, callers don't have to pass sizeof(req) all the time now, as size is implicitly obtained using the pointer. While at it, also reduce the size of attribute buffer to 128 bytes (132 for ifinfomsg using functions due to the padding). Summary of problem: Even though C standard allows interconvertibility of pointer to first member and pointer to struct, for the purposes of alias analysis it would still consider the first as having pointer value "pointer to T" where T is type of first member hence having subobject bounds, allowing analyzers within reason to complain when object is accessed beyond the size of pointed to object. The only exception to this rule may be when a char * is formed to a member subobject. It is not possible for the compiler to be able to tell the intent of the programmer that it is a pointer to member object or the underlying representation array of the containing object, so such diagnosis is suppressed. Fixes: 715c5ce454a6 ("libbpf: Add low level TC-BPF management API") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210619041454.417577-1-memxor@gmail.com commit 22a22383371667962b46bd90d534cc57669537ac Author: Feng Tang Date: Thu May 27 12:01:24 2021 -0700 clocksource: Print deviation in nanoseconds when a clocksource becomes unstable Currently when an unstable clocksource is detected, the raw counters of that clocksource and watchdog will be printed, which can only be understood after some math calculation. So print the delta in nanoseconds as well to make it easier for humans to check the results. [ paulmck: Fix typo. ] Signed-off-by: Feng Tang Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210527190124.440372-6-paulmck@kernel.org commit 1253b9b87e42ab6a3d5c2cb27af2bdd67d7e50ff Author: Paul E. McKenney Date: Thu May 27 12:01:23 2021 -0700 clocksource: Provide kernel module to test clocksource watchdog When the clocksource watchdog marks a clock as unstable, this might be due to that clock being unstable or it might be due to delays that happen to occur between the reads of the two clocks. It would be good to have a way of testing the clocksource watchdog's ability to distinguish between these two causes of clock skew and instability. Therefore, provide a new clocksource-wdtest module selected by a new TEST_CLOCKSOURCE_WATCHDOG Kconfig option. This module has a single module parameter named "holdoff" that provides the number of seconds of delay before testing should start, which defaults to zero when built as a module and to 10 seconds when built directly into the kernel. Very large systems that boot slowly may need to increase the value of this module parameter. This module uses hand-crafted clocksource structures to do its testing, thus avoiding messing up timing for the rest of the kernel and for user applications. This module first verifies that the ->uncertainty_margin field of the clocksource structures are set sanely. It then tests the delay-detection capability of the clocksource watchdog, increasing the number of consecutive delays injected, first provoking console messages complaining about the delays and finally forcing a clock-skew event. Unexpected test results cause at least one WARN_ON_ONCE() console splat. If there are no splats, the test has passed. Finally, it fuzzes the value returned from a clocksource to test the clocksource watchdog's ability to detect time skew. This module checks the state of its clocksource after each test, and uses WARN_ON_ONCE() to emit a console splat if there are any failures. This should enable all types of test frameworks to detect any such failures. This facility is intended for diagnostic use only, and should be avoided on production systems. Reported-by: Chris Mason Suggested-by: Thomas Gleixner Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Tested-by: Feng Tang Link: https://lore.kernel.org/r/20210527190124.440372-5-paulmck@kernel.org commit 2e27e793e280ff12cb5c202a1214c08b0d3a0f26 Author: Paul E. McKenney Date: Thu May 27 12:01:22 2021 -0700 clocksource: Reduce clocksource-skew threshold Currently, WATCHDOG_THRESHOLD is set to detect a 62.5-millisecond skew in a 500-millisecond WATCHDOG_INTERVAL. This requires that clocks be skewed by more than 12.5% in order to be marked unstable. Except that a clock that is skewed by that much is probably destroying unsuspecting software right and left. And given that there are now checks for false-positive skews due to delays between reading the two clocks, it should be possible to greatly decrease WATCHDOG_THRESHOLD, at least for fine-grained clocks such as TSC. Therefore, add a new uncertainty_margin field to the clocksource structure that contains the maximum uncertainty in nanoseconds for the corresponding clock. This field may be initialized manually, as it is for clocksource_tsc_early and clocksource_jiffies, which is copied to refined_jiffies. If the field is not initialized manually, it will be computed at clock-registry time as the period of the clock in question based on the scale and freq parameters to __clocksource_update_freq_scale() function. If either of those two parameters are zero, the tens-of-milliseconds WATCHDOG_THRESHOLD is used as a cowardly alternative to dividing by zero. No matter how the uncertainty_margin field is calculated, it is bounded below by twice WATCHDOG_MAX_SKEW, that is, by 100 microseconds. Note that manually initialized uncertainty_margin fields are not adjusted, but there is a WARN_ON_ONCE() that triggers if any such field is less than twice WATCHDOG_MAX_SKEW. This WARN_ON_ONCE() is intended to discourage production use of the one-nanosecond uncertainty_margin values that are used to test the clock-skew code itself. The actual clock-skew check uses the sum of the uncertainty_margin fields of the two clocksource structures being compared. Integer overflow is avoided because the largest computed value of the uncertainty_margin fields is one billion (10^9), and double that value fits into an unsigned int. However, if someone manually specifies (say) UINT_MAX, they will get what they deserve. Note that the refined_jiffies uncertainty_margin field is initialized to TICK_NSEC, which means that skew checks involving this clocksource will be sufficently forgiving. In a similar vein, the clocksource_tsc_early uncertainty_margin field is initialized to 32*NSEC_PER_MSEC, which replicates the current behavior and allows custom setting if needed in order to address the rare skews detected for this clocksource in current mainline. Suggested-by: Thomas Gleixner Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Acked-by: Feng Tang Link: https://lore.kernel.org/r/20210527190124.440372-4-paulmck@kernel.org commit fa218f1cce6ba40069c8daab8821de7e6be1cdd0 Author: Paul E. McKenney Date: Thu May 27 12:01:21 2021 -0700 clocksource: Limit number of CPUs checked for clock synchronization Currently, if skew is detected on a clock marked CLOCK_SOURCE_VERIFY_PERCPU, that clock is checked on all CPUs. This is thorough, but might not be what you want on a system with a few tens of CPUs, let alone a few hundred of them. Therefore, by default check only up to eight randomly chosen CPUs. Also provide a new clocksource.verify_n_cpus kernel boot parameter. A value of -1 says to check all of the CPUs, and a non-negative value says to randomly select that number of CPUs, without concern about selecting the same CPU multiple times. However, make use of a cpumask so that a given CPU will be checked at most once. Suggested-by: Thomas Gleixner # For verify_n_cpus=1. Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Acked-by: Feng Tang Link: https://lore.kernel.org/r/20210527190124.440372-3-paulmck@kernel.org commit 7560c02bdffb7c52d1457fa551b9e745d4b9e754 Author: Paul E. McKenney Date: Thu May 27 12:01:20 2021 -0700 clocksource: Check per-CPU clock synchronization when marked unstable Some sorts of per-CPU clock sources have a history of going out of synchronization with each other. However, this problem has purportedy been solved in the past ten years. Except that it is all too possible that the problem has instead simply been made less likely, which might mean that some of the occasional "Marking clocksource 'tsc' as unstable" messages might be due to desynchronization. How would anyone know? Therefore apply CPU-to-CPU synchronization checking to newly unstable clocksource that are marked with the new CLOCK_SOURCE_VERIFY_PERCPU flag. Lists of desynchronized CPUs are printed, with the caveat that if it is the reporting CPU that is itself desynchronized, it will appear that all the other clocks are wrong. Just like in real life. Reported-by: Chris Mason Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Acked-by: Feng Tang Link: https://lore.kernel.org/r/20210527190124.440372-2-paulmck@kernel.org commit db3a34e17433de2390eb80d436970edcebd0ca3e Author: Paul E. McKenney Date: Thu May 27 12:01:19 2021 -0700 clocksource: Retry clock read if long delays detected When the clocksource watchdog marks a clock as unstable, this might be due to that clock being unstable or it might be due to delays that happen to occur between the reads of the two clocks. Yes, interrupts are disabled across those two reads, but there are no shortage of things that can delay interrupts-disabled regions of code ranging from SMI handlers to vCPU preemption. It would be good to have some indication as to why the clock was marked unstable. Therefore, re-read the watchdog clock on either side of the read from the clock under test. If the watchdog clock shows an excessive time delta between its pair of reads, the reads are retried. The maximum number of retries is specified by a new kernel boot parameter clocksource.max_cswd_read_retries, which defaults to three, that is, up to four reads, one initial and up to three retries. If more than one retry was required, a message is printed on the console (the occasional single retry is expected behavior, especially in guest OSes). If the maximum number of retries is exceeded, the clock under test will be marked unstable. However, the probability of this happening due to various sorts of delays is quite small. In addition, the reason (clock-read delays) for the unstable marking will be apparent. Reported-by: Chris Mason Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Acked-by: Feng Tang Link: https://lore.kernel.org/r/20210527190124.440372-1-paulmck@kernel.org commit 657e473e8813f62c536f74650188d078f9fff345 Merge: 4b1d51715d1cf bf35a1eeaca61 Author: Mark Brown Date: Tue Jun 22 15:48:07 2021 +0100 Merge series "ASoC: Intel: machine driver corrections" from Pierre-Louis Bossart : Some of these patches dealing with Sparse warnings were submitted earlier but not merged. I grouped them with a couple of fixes from Kai. v2: added Mark Brown in CC, was missed in v1 added Richard Fitzgerald Tested-by Kai Vehmanen (3): ASoC: Intel: sof_sdw: use mach data for ADL RVP DMIC count ASoC: Intel: sof_sdw: remove hdac-hdmi support ASoC: Intel: skl_hda_dsp_generic: Update Kconfig documentation Pierre-Louis Bossart (7): ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters ASoC: Intel: sof_sdw: fix signed/unsigned warning ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values ASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tables sound/soc/intel/boards/Kconfig | 7 ++-- sound/soc/intel/boards/bxt_da7219_max98357a.c | 4 +- sound/soc/intel/boards/bxt_rt298.c | 3 +- sound/soc/intel/boards/ehl_rt5660.c | 2 +- sound/soc/intel/boards/glk_rt5682_max98357a.c | 4 +- sound/soc/intel/boards/kbl_da7219_max98357a.c | 4 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 5 +-- sound/soc/intel/boards/kbl_rt5660.c | 2 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 3 +- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- .../soc/intel/boards/skl_nau88l25_max98357a.c | 3 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 3 +- sound/soc/intel/boards/skl_rt286.c | 3 +- sound/soc/intel/boards/sof_cs42l42.c | 3 +- sound/soc/intel/boards/sof_da7219_max98373.c | 6 +-- sound/soc/intel/boards/sof_rt5682.c | 20 +++------- sound/soc/intel/boards/sof_sdw.c | 5 +-- sound/soc/intel/boards/sof_sdw_common.h | 1 - sound/soc/intel/boards/sof_sdw_hdmi.c | 37 +----------------- .../intel/common/soc-acpi-intel-adl-match.c | 28 +++++++------- .../intel/common/soc-acpi-intel-cml-match.c | 20 +++++----- .../intel/common/soc-acpi-intel-cnl-match.c | 2 +- .../intel/common/soc-acpi-intel-glk-match.c | 2 +- .../intel/common/soc-acpi-intel-icl-match.c | 12 +++--- .../intel/common/soc-acpi-intel-jsl-match.c | 6 +-- .../intel/common/soc-acpi-intel-kbl-match.c | 2 +- .../intel/common/soc-acpi-intel-tgl-match.c | 38 +++++++++---------- 27 files changed, 83 insertions(+), 144 deletions(-) -- 2.25.1 commit 0e8a89d49d45197770f2e57fb15f1bc9ded96eb0 Author: Xiongwei Song Date: Fri Jun 18 21:02:30 2021 +0800 locking/lockdep: Correct the description error for check_redundant() If there is no matched result, check_redundant() will return BFS_RNOMATCH. Signed-off-by: Xiongwei Song Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Boqun Feng Link: https://lkml.kernel.org/r/20210618130230.123249-1-sxwjean@me.com commit bf22a6976897977b0a3f1aeba6823c959fc4fdae Author: Thomas Gleixner Date: Thu Apr 22 21:44:23 2021 +0200 futex: Provide FUTEX_LOCK_PI2 to support clock selection The FUTEX_LOCK_PI futex operand uses a CLOCK_REALTIME based absolute timeout since it was implemented, but it does not require that the FUTEX_CLOCK_REALTIME flag is set, because that was introduced later. In theory as none of the user space implementations can set the FUTEX_CLOCK_REALTIME flag on this operand, it would be possible to creatively abuse it and make the meaning invers, i.e. select CLOCK_REALTIME when not set and CLOCK_MONOTONIC when set. But that's a nasty hackery. Another option would be to have a new FUTEX_CLOCK_MONOTONIC flag only for FUTEX_LOCK_PI, but that's also awkward because it does not allow libraries to handle the timeout clock selection consistently. So provide a new FUTEX_LOCK_PI2 operand which implements the timeout semantics which the other operands use and leave FUTEX_LOCK_PI alone. Reported-by: Kurt Kanzenbach Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210422194705.440773992@linutronix.de commit e112c41341c03d9224a9fc522bdb3539bc849b56 Author: Thomas Gleixner Date: Thu Apr 22 21:44:22 2021 +0200 futex: Prepare futex_lock_pi() for runtime clock selection futex_lock_pi() is the only futex operation which cannot select the clock for timeouts (CLOCK_MONOTONIC/CLOCK_REALTIME). That's inconsistent and there is no particular reason why this cannot be supported. This was overlooked when CLOCK_REALTIME_FLAG was introduced and unfortunately not reported when the inconsistency was discovered in glibc. Prepare the function and enforce the CLOCK_REALTIME_FLAG on FUTEX_LOCK_PI so that a new FUTEX_LOCK_PI2 can implement it correctly. Reported-by: Kurt Kanzenbach Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210422194705.338657741@linutronix.de commit 1a8122960484b19d8d887fb32e1cf42be5647533 Author: Peter Zijlstra Date: Thu Jun 17 20:57:20 2021 +0200 lockdep/selftest: Remove wait-type RCU_CALLBACK tests The problem is that rcu_callback_map doesn't have wait_types defined, and doing so would make it indistinguishable from SOFTIRQ in any case. Remove it. Fixes: 9271a40d2a14 ("lockdep/selftest: Add wait context selftests") Signed-off-by: Peter Zijlstra (Intel) Tested-by: Joerg Roedel Link: https://lore.kernel.org/r/20210617190313.384290291@infradead.org commit c0c2c0dad6a06e0c05e9a52d65f932bd54364c97 Author: Peter Zijlstra Date: Thu Jun 17 20:57:19 2021 +0200 lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING When PROVE_RAW_LOCK_NESTING=y many of the selftests FAILED because HARDIRQ context is out-of-bounds for spinlocks. Instead make the default hardware context the threaded hardirq context, which preserves the old locking rules. The wait-type specific locking selftests will have a non-threaded HARDIRQ variant. Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks") Signed-off-by: Peter Zijlstra (Intel) Tested-by: Joerg Roedel Link: https://lore.kernel.org/r/20210617190313.322096283@infradead.org commit f8b298cc39f0619544c607eaef09fd0b2afd10f3 Author: Peter Zijlstra Date: Thu Jun 17 20:57:18 2021 +0200 lockdep: Fix wait-type for empty stack Even the very first lock can violate the wait-context check, consider the various IRQ contexts. Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks") Signed-off-by: Peter Zijlstra (Intel) Tested-by: Joerg Roedel Link: https://lore.kernel.org/r/20210617190313.256987481@infradead.org commit 8946ccc25ed22d957ca7f0b6fac1dcf6d25eaf1f Author: Boqun Feng Date: Sat Jun 19 01:01:10 2021 +0800 locking/selftests: Add a selftest for check_irq_usage() Johannes Berg reported a lockdep problem which could be reproduced by the special test case introduced in this patch, so add it. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210618170110.3699115-5-boqun.feng@gmail.com commit 7b1f8c6179769af6ffa055e1169610b51d71edd5 Author: Boqun Feng Date: Sat Jun 19 01:01:09 2021 +0800 lockding/lockdep: Avoid to find wrong lock dep path in check_irq_usage() In the step #3 of check_irq_usage(), we seach backwards to find a lock whose usage conflicts the usage of @target_entry1 on safe/unsafe. However, we should only keep the irq-unsafe usage of @target_entry1 into consideration, because it could be a case where a lock is hardirq-unsafe but soft-safe, and in check_irq_usage() we find it because its hardirq-unsafe could result into a hardirq-safe-unsafe deadlock, but currently since we don't filter out the other usage bits, so we may find a lock dependency path softirq-unsafe -> softirq-safe, which in fact doesn't cause a deadlock. And this may cause misleading lockdep splats. Fix this by only keeping LOCKF_ENABLED_IRQ_ALL bits when we try the backwards search. Reported-by: Johannes Berg Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210618170110.3699115-4-boqun.feng@gmail.com commit d4c157c7b1a67a0844a904baaca9a840c196c103 Author: Boqun Feng Date: Sat Jun 19 01:01:08 2021 +0800 locking/lockdep: Remove the unnecessary trace saving In print_bad_irq_dependency(), save_trace() is called to set the ->trace for @prev_root as the current call trace, however @prev_root corresponds to the the held lock, which may not be acquired in current call trace, therefore it's wrong to use save_trace() to set ->trace of @prev_root. Moreover, with our adjustment of printing backwards dependency path, the ->trace of @prev_root is unncessary, so remove it. Reported-by: Johannes Berg Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210618170110.3699115-3-boqun.feng@gmail.com commit 69c7a5fb2482636f525f016c8333fdb9111ecb9d Author: Boqun Feng Date: Sat Jun 19 01:01:07 2021 +0800 locking/lockdep: Fix the dep path printing for backwards BFS We use the same code to print backwards lock dependency path as the forwards lock dependency path, and this could result into incorrect printing because for a backwards lock_list ->trace is not the call trace where the lock of ->class is acquired. Fix this by introducing a separate function on printing the backwards dependency path. Also add a few comments about the printing while we are at it. Reported-by: Johannes Berg Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210618170110.3699115-2-boqun.feng@gmail.com commit 0213b7083e81f4acd69db32cb72eb4e5f220329a Author: Qais Yousef Date: Thu Jun 17 17:51:55 2021 +0100 sched/uclamp: Fix uclamp_tg_restrict() Now cpu.uclamp.min acts as a protection, we need to make sure that the uclamp request of the task is within the allowed range of the cgroup, that is it is clamp()'ed correctly by tg->uclamp[UCLAMP_MIN] and tg->uclamp[UCLAMP_MAX]. As reported by Xuewen [1] we can have some corner cases where there's inversion between uclamp requested by task (p) and the uclamp values of the taskgroup it's attached to (tg). Following table demonstrates 2 corner cases: | p | tg | effective -----------+-----+------+----------- CASE 1 -----------+-----+------+----------- uclamp_min | 60% | 0% | 60% -----------+-----+------+----------- uclamp_max | 80% | 50% | 50% -----------+-----+------+----------- CASE 2 -----------+-----+------+----------- uclamp_min | 0% | 30% | 30% -----------+-----+------+----------- uclamp_max | 20% | 50% | 20% -----------+-----+------+----------- With this fix we get: | p | tg | effective -----------+-----+------+----------- CASE 1 -----------+-----+------+----------- uclamp_min | 60% | 0% | 50% -----------+-----+------+----------- uclamp_max | 80% | 50% | 50% -----------+-----+------+----------- CASE 2 -----------+-----+------+----------- uclamp_min | 0% | 30% | 30% -----------+-----+------+----------- uclamp_max | 20% | 50% | 30% -----------+-----+------+----------- Additionally uclamp_update_active_tasks() must now unconditionally update both UCLAMP_MIN/MAX because changing the tg's UCLAMP_MAX for instance could have an impact on the effective UCLAMP_MIN of the tasks. | p | tg | effective -----------+-----+------+----------- old -----------+-----+------+----------- uclamp_min | 60% | 0% | 50% -----------+-----+------+----------- uclamp_max | 80% | 50% | 50% -----------+-----+------+----------- *new* -----------+-----+------+----------- uclamp_min | 60% | 0% | *60%* -----------+-----+------+----------- uclamp_max | 80% |*70%* | *70%* -----------+-----+------+----------- [1] https://lore.kernel.org/lkml/CAB8ipk_a6VFNjiEnHRHkUMBKbA+qzPQvhtNjJ_YNzQhqV_o8Zw@mail.gmail.com/ Fixes: 0c18f2ecfcc2 ("sched/uclamp: Fix wrong implementation of cpu.uclamp.min") Reported-by: Xuewen Yan Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210617165155.3774110-1-qais.yousef@arm.com commit d7d607096ae6d378b4e92d49946d22739c047d4c Author: Vincent Donnefort Date: Mon Jun 21 11:37:52 2021 +0100 sched/rt: Fix Deadline utilization tracking during policy change DL keeps track of the utilization on a per-rq basis with the structure avg_dl. This utilization is updated during task_tick_dl(), put_prev_task_dl() and set_next_task_dl(). However, when the current running task changes its policy, set_next_task_dl() which would usually take care of updating the utilization when the rq starts running DL tasks, will not see a such change, leaving the avg_dl structure outdated. When that very same task will be dequeued later, put_prev_task_dl() will then update the utilization, based on a wrong last_update_time, leading to a huge spike in the DL utilization signal. The signal would eventually recover from this issue after few ms. Even if no DL tasks are run, avg_dl is also updated in __update_blocked_others(). But as the CPU capacity depends partly on the avg_dl, this issue has nonetheless a significant impact on the scheduler. Fix this issue by ensuring a load update when a running task changes its policy to DL. Fixes: 3727e0e ("sched/dl: Add dl_rq utilization tracking") Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/1624271872-211872-3-git-send-email-vincent.donnefort@arm.com commit fecfcbc288e9f4923f40fd23ca78a6acdc7fdf6c Author: Vincent Donnefort Date: Mon Jun 21 11:37:51 2021 +0100 sched/rt: Fix RT utilization tracking during policy change RT keeps track of the utilization on a per-rq basis with the structure avg_rt. This utilization is updated during task_tick_rt(), put_prev_task_rt() and set_next_task_rt(). However, when the current running task changes its policy, set_next_task_rt() which would usually take care of updating the utilization when the rq starts running RT tasks, will not see a such change, leaving the avg_rt structure outdated. When that very same task will be dequeued later, put_prev_task_rt() will then update the utilization, based on a wrong last_update_time, leading to a huge spike in the RT utilization signal. The signal would eventually recover from this issue after few ms. Even if no RT tasks are run, avg_rt is also updated in __update_blocked_others(). But as the CPU capacity depends partly on the avg_rt, this issue has nonetheless a significant impact on the scheduler. Fix this issue by ensuring a load update when a running task changes its policy to RT. Fixes: 371bf427 ("sched/rt: Add rt_rq utilization tracking") Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/1624271872-211872-2-git-send-email-vincent.donnefort@arm.com commit 64ab7071254c178e81a6d0203354aad6521258ea Author: Baokun Li Date: Tue Jun 8 10:43:05 2021 +0800 clockevents: Add missing parameter documentation Add the missing documentation for the @cpu parameter of tick_cleanup_dead_cpu(). Signed-off-by: Baokun Li Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210608024305.2750999-1-libaokun1@huawei.com commit a736143afd036f2078fe19435b16fd55abc789a9 Merge: 4a21192e2796c 51696f39cbee5 Author: Michael Ellerman Date: Wed Jun 23 00:19:08 2021 +1000 Merge branch 'topic/ppc-kvm' into next Pull in some more ppc KVM patches we are keeping in our topic branch. In particular this brings in the series to add H_RPT_INVALIDATE. commit 51696f39cbee5bb684e7959c0c98b5f54548aa34 Author: Nathan Chancellor Date: Mon Jun 21 11:24:40 2021 -0700 KVM: PPC: Book3S HV: Workaround high stack usage with clang LLVM does not emit optimal byteswap assembly, which results in high stack usage in kvmhv_enter_nested_guest() due to the inlining of byteswap_pt_regs(). With LLVM 12.0.0: arch/powerpc/kvm/book3s_hv_nested.c:289:6: error: stack frame size of 2512 bytes in function 'kvmhv_enter_nested_guest' [-Werror,-Wframe-larger-than=] long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu) ^ 1 error generated. While this gets fixed in LLVM, mark byteswap_pt_regs() as noinline_for_stack so that it does not get inlined and break the build due to -Werror by default in arch/powerpc/. Not inlining saves approximately 800 bytes with LLVM 12.0.0: arch/powerpc/kvm/book3s_hv_nested.c:290:6: warning: stack frame size of 1728 bytes in function 'kvmhv_enter_nested_guest' [-Wframe-larger-than=] long kvmhv_enter_nested_guest(struct kvm_vcpu *vcpu) ^ 1 warning generated. Cc: stable@vger.kernel.org # v4.20+ Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1292 Link: https://bugs.llvm.org/show_bug.cgi?id=49610 Link: https://lore.kernel.org/r/202104031853.vDT0Qjqj-lkp@intel.com/ Link: https://gist.github.com/ba710e3703bf45043a31e2806c843ffd Link: https://lore.kernel.org/r/20210621182440.990242-1-nathan@kernel.org commit 8c13212443230d03ff25014514ec0d53498c0912 Author: Jiajun Cao Date: Tue Jun 22 21:19:42 2021 +0800 ALSA: hda: Add IRQ check for platform_get_irq() The function hda_tegra_first_init() neglects to check the return value after executing platform_get_irq(). hda_tegra_first_init() should check the return value (if negative error number) for errors so as to not pass a negative value to the devm_request_irq(). Fix it by adding a check for the return value irq_id. Signed-off-by: Jiajun Cao Signed-off-by: Xin Tan Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20210622131947.94346-1-jjcao20@fudan.edu.cn Signed-off-by: Takashi Iwai commit 9f03db6673598f618f10ba01b3f8824bd5f31a41 Merge: 2fea6cf7d3214 04c02c201d7e8 Author: Marc Zyngier Date: Tue Jun 22 15:09:34 2021 +0100 Merge branch kvm-arm64/mmu/mte into kvmarm-master/next KVM/arm64 support for MTE, courtesy of Steven Price. It allows the guest to use memory tagging, and offers a new userspace API to save/restore the tags. * kvm-arm64/mmu/mte: KVM: arm64: Document MTE capability and ioctl KVM: arm64: Add ioctl to fetch/store tags in a guest KVM: arm64: Expose KVM_ARM_CAP_MTE KVM: arm64: Save/restore MTE registers KVM: arm64: Introduce MTE VM feature arm64: mte: Sync tags for pages where PTE is untagged Signed-off-by: Marc Zyngier commit 4c59eac6ac434e08b65edd3d4bef41adfa90f58e Author: Luca Coelho Date: Mon Jun 21 10:37:40 2021 +0300 iwlwifi: bump FW API to 64 for AX devices Start supporting API version 64 for AX devices. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.8144a5b7d9a7.Ibf77fd7daa7d22f7c46d1c4a572ab9441a761299@changeid Signed-off-by: Luca Coelho commit 48d0c8d5a0b9999f4111efc6a1afa85199f039ea Author: Johannes Berg Date: Mon Jun 21 10:37:39 2021 +0300 iwlwifi: fw: dump TCM error table if present If the TCM is present in the hardware (as advertised in the firmware file TLV data), dump its error log table during firmware error dumps. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.2d2149f6654f.Id831f8fbca59900ba7efc623ffca0ca938b664d3@changeid Signed-off-by: Luca Coelho commit c863797b8198e1b34516023198708ddb0f9fd2b9 Author: ybaruch Date: Mon Jun 21 10:37:38 2021 +0300 iwlwifi: add 9560 killer device add new killer devices configurations. Signed-off-by: ybaruch Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.4179f7191531.I3d5ed6b2b39fcd42863a679e21bda23a6c14253e@changeid Signed-off-by: Luca Coelho commit 4db7cf1e0108ce4376e111ac23693be12128e2f3 Author: Johannes Berg Date: Mon Jun 21 10:37:37 2021 +0300 iwlwifi: move error dump to fw utils Conceptually, this belongs more into the firmware utils rather than the mvm opmode, so move the collection and output there. Note that this slightly changes the format of the Status line. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.b82b60d81346.Ide3b688107f6a59c7fc7eb1d8f2002b0a5c1f2d2@changeid Signed-off-by: Luca Coelho commit 9dad325f9d57508b154f0bebbc341a8528e5729c Author: Luca Coelho Date: Mon Jun 21 10:37:36 2021 +0300 iwlwifi: support loading the reduced power table from UEFI This new feature allows OEMs to set a special reduced power table in a UEFI variable, which we use to tell the firmware to change the TX power tables. Read the variable and store it in a dram block to pass it to the firmware. We do this as part of the PNVM loading flow. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.259a33ba5074.I2e0bb142d2a9c412547cba89b62dd077b328fdc4@changeid Signed-off-by: Luca Coelho commit 84c3c9952afbf7df39937095aa0ad70b58703e91 Author: Luca Coelho Date: Mon Jun 21 10:37:35 2021 +0300 iwlwifi: move UEFI code to a separate file We are going to read more variables from UEFI, so it's cleaner to have all the code that handles UEFI variables in a separate file. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.c705ac86f2e9.Ia7421c17fe52929e4098b4f0cf070809ed3ef906@changeid Signed-off-by: Luca Coelho commit 5c157941cda00e9a1127a7a909177900f9195e19 Author: Emmanuel Grumbach Date: Mon Jun 21 10:37:34 2021 +0300 iwlwifi: mvm: introduce iwl_wowlan_get_status_cmd We need to pass the station id to teach the firmware on which station id we want to get the status. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.45218d913d07.I61a086936508230d86b454636945ceb0b9ea09fd@changeid Signed-off-by: Luca Coelho commit 80e6711919d4a13d00dfed185d850316b7f993ce Author: Emmanuel Grumbach Date: Mon Jun 21 10:37:33 2021 +0300 iwlwifi: mvm: introduce iwl_wowlan_kek_kck_material_cmd_v4 We need to pass the station id to teach the firmware on which station id we want to configure the key material. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.13417410e9ea.I140c16e70f8ac91cec7e8189e182e2f672c39258@changeid Signed-off-by: Luca Coelho commit 0b35991a80762773078aa8ba044baf485b293e45 Author: Emmanuel Grumbach Date: Mon Jun 21 10:37:32 2021 +0300 iwlwifi: mvm: update iwl_wowlan_patterns_cmd We need to pass the station id to tell the firmware on which station we want to configure the patterns. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210621103449.73eceb822890.I37347afbc01497a8a9e4d4afe4fa9a965abd31ac@changeid Signed-off-by: Luca Coelho commit b60bc716ba26319205d570406187fd941a96bdf3 Author: Emmanuel Grumbach Date: Fri Jun 18 11:01:21 2021 +0300 iwlwifi: mvm: introduce iwl_proto_offload_cmd_v4 We need to pass the station id to tell the firmware on which station we want to configure the protocol offload. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.c25913d2c08c.Ic0fefac81afb9a2fe396d73528e30e09a8c5eae0@changeid Signed-off-by: Luca Coelho commit 12236e9af903f7a36f24d24a9b70ba8f8e2859e4 Author: Luca Coelho Date: Fri Jun 18 11:01:20 2021 +0300 iwlwifi: fix NUM_IWL_UCODE_TLV_* definitions to avoid sparse errors We were assigning these macros manually when sparse is running, but with newer versions of sparse, it started causing other warnings. Fix it by making it a macro when sparse is running. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.dc658639e07f.I69ab6d59ff10c55c8517621eb20a52194dc4783a@changeid Signed-off-by: Luca Coelho commit 947689756352af9bd0486c1a19fffc7837ae0335 Author: Johannes Berg Date: Fri Jun 18 11:01:19 2021 +0300 iwlwifi: pcie: free some DMA memory earlier In gen3, after firmware is alive, we no longer need the firmware and image loader images, only the context info itself and PRPH info/scratch need to remain. Call iwl_pcie_ctxt_info_gen3_free() appropriately in the alive callback (iwl_trans_pcie_gen2_fw_alive()) with a new argument indicating whether it can free everything or only partially. The context info and PRPH scratch are also not needed after PNVM load, but we don't have a good hook for freeing after that, so keep them for now. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.8230d91a46c1.Ia7db71e5e6265ca87363f1481eac1bc3bbebb15c@changeid Signed-off-by: Luca Coelho commit fa331068a591d9df5f345173c0c9c44234b61569 Author: Johannes Berg Date: Fri Jun 18 11:01:18 2021 +0300 iwlwifi: mvm: fill phy_data.d1 for no-data RX We don't fill in phy_data.d1 in no-data RX, and thus we pretend some data is actually filled in radiotap when it isn't or has default (zero) values. Fill in phy_data.d1 appropriately, and while at it also move the info_type initialization into the initializer. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.3d488885f77c.Ib97a2bc57c1e9fb98927dc6f802568db313abe3b@changeid Signed-off-by: Luca Coelho commit 26d18c75a7496c4c52b0b6789e713dc76ebfbc87 Author: Johannes Berg Date: Fri Jun 18 11:01:17 2021 +0300 iwlwifi: pcie: fix context info freeing After firmware alive, iwl_trans_pcie_gen2_fw_alive() is called to free the context info. However, on gen3 that will then free the context info with the wrong size. Since we free this allocation later, let it stick around until the device is stopped for now, freeing some of it earlier is a separate change. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.afb63fb8cbc1.If4968db8e09f4ce2a1d27a6d750bca3d132d7d70@changeid Signed-off-by: Luca Coelho commit 310f60f53a86eba680d9bc20a371e13b06a5f903 Author: Johannes Berg Date: Fri Jun 18 11:01:16 2021 +0300 iwlwifi: pcie: free IML DMA memory allocation In the case of gen3 devices with image loader (IML) support, we were leaking the IML DMA allocation and never freeing it. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.07e117dbedb7.I7bb9ebbe0617656986c2a598ea5e827b533bd3b9@changeid Signed-off-by: Luca Coelho commit d65ab7c0e0b92056754185d3f6925d7318730e94 Author: Emmanuel Grumbach Date: Fri Jun 18 11:01:15 2021 +0300 iwlwifi: mvm: support LONG_GROUP for WOWLAN_GET_STATUSES version It's been a while that the firmware uses LONG_GROUP by default and not LEGACY_GROUP. Until now the firmware wrongly advertise the WOWLAN_GET_STATUS command's version with LEGACY_GROUP, but it is now being fixed. In order to support both firmwares, first try to get the version number of the command with the LONG_GROUP and if the firmware didn't advertise the command version with LONG_GROUP, try to get the command version with LEGACY_GROUP. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.cd6f4e421430.Iec07c746c8e65bc267e4750f38e4f74f2010ca45@changeid Signed-off-by: Luca Coelho commit 5b16565a7f9d82c6aa475ede72d62424b70f7726 Author: Naftali Goldstein Date: Fri Jun 18 11:01:14 2021 +0300 iwlwifi: support ver 6 of WOWLAN_CONFIGURATION and ver 10 of WOWLAN_GET_STATUSES These two version updates deprecate the need to set/get the nonqos sequence counter during suspend/resume flow respectively; NICs supporting this version maintain this counter internally and don't lose it during the suspend/resume flow. Note that this means that for such NICs the NON_QOS_TX_COUNTER_CMD is no longer ever sent. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.dd25dd667798.I8db9adcdbb133304b58cf417f8698611138c83b4@changeid Signed-off-by: Luca Coelho commit b1c6cec04bbc1fe7e83cc7a1b054cc962feffb7e Author: Naftali Goldstein Date: Fri Jun 18 11:01:13 2021 +0300 iwlwifi: mvm: don't request mac80211 to disable/enable sta's queues When operating in AP mode with NICs supporting the AP_LINK_PS hw flag, mac80211 doesn't need to start/stop queueing tx for connected stations because the FW already handles that. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.64df994c8fbb.I0fa5cda3a5f893a396eef30a01522422be359e69@changeid Signed-off-by: Luca Coelho commit 7b3954a1d69a992a781e71036950f9254f8147f6 Author: Ilan Peer Date: Fri Jun 18 11:01:12 2021 +0300 iwlwifi: mvm: Explicitly stop session protection before unbinding In case of unbinding, the FW would remove the session protection time events without sending a notification, so explicitly cancel the session protection, so future requests for mgd_prepare_tx() would not assume that the session protection is running. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618105614.7c30f85ed241.Ibc19fdbefca7135f2c4ea83d0aef6b81b5033dcd@changeid Signed-off-by: Luca Coelho commit 54b4fda5a761f97b8918607dbb4cd3b9e711aab6 Author: Abhishek Naik Date: Thu Jun 17 10:08:52 2021 +0300 iwlwifi: mvm: Read acpi dsm to get unii4 enable/disable bitmap. Read the UNII4 setting from the ACPI table and use it in the LARI_CONFIG_CHANGE_CMD accordingly. This setting allows OEMs to enable or disable UNII4, bypassing the FW defaults. Signed-off-by: Abhishek Naik Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.223090c509c4.If03cb5393607ae494041b6187bcec134d6a1e06d@changeid Signed-off-by: Luca Coelho commit 8e08e191fc932b4fc2de014c358f8946a4af57e1 Author: Johannes Berg Date: Thu Jun 17 11:07:28 2021 +0300 iwlwifi: pcie: remove TR/CR tail allocations The TR/CR tail data are meant to be per-queue-arrays, however, we allocate them completely wrong (we have a separate allocation per queue). Looking at this more closely, it turns out that the hardware never uses these - we have a separate free list per RX queue and maintain a write pointer for that in a register, and the RX itself is indicated in the RB status (rb_stts) DMA region. Despite nothing using the tail pointers, the hardware will unconditionally access them to write updates, even when we aren't using CRs/TRs. Give it dummy values that we never use/update so it can do that without causing trouble. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617110647.5f5764e04c46.I4d5de1929be048085767f1234a1e07b517ab6a2d@changeid Signed-off-by: Luca Coelho commit bef99c7d9177b268eb08b959eed28797eff6bdae Author: Johannes Berg Date: Thu Jun 17 10:08:50 2021 +0300 iwlwifi: pcie: fix some kernel-doc comments "ubd" is really called "used_bd", fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.2d4b46c656bb.Iff9ee6a7e65d439169202911dad2cbea626fb887@changeid Signed-off-by: Luca Coelho commit 81468083f3c76a08183813e3af63a7c3cea3f537 Author: Bharata B Rao Date: Mon Jun 21 14:20:03 2021 +0530 KVM: PPC: Book3S HV: Use H_RPT_INVALIDATE in nested KVM In the nested KVM case, replace H_TLB_INVALIDATE by the new hcall H_RPT_INVALIDATE if available. The availability of this hcall is determined from "hcall-rpt-invalidate" string in ibm,hypertas-functions DT property. Signed-off-by: Bharata B Rao Reviewed-by: Fabiano Rosas Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621085003.904767-7-bharata@linux.ibm.com commit b87cc116c7e1bc62a84d8c46acd401db179edb11 Author: Bharata B Rao Date: Mon Jun 21 14:20:02 2021 +0530 KVM: PPC: Book3S HV: Add KVM_CAP_PPC_RPT_INVALIDATE capability Now that we have H_RPT_INVALIDATE fully implemented, enable support for the same via KVM_CAP_PPC_RPT_INVALIDATE KVM capability Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621085003.904767-6-bharata@linux.ibm.com commit 53324b51c5eee22d420a2df68b1820d929fa90f3 Author: Bharata B Rao Date: Mon Jun 21 14:20:01 2021 +0530 KVM: PPC: Book3S HV: Nested support in H_RPT_INVALIDATE Enable support for process-scoped invalidations from nested guests and partition-scoped invalidations for nested guests. Process-scoped invalidations for any level of nested guests are handled by implementing H_RPT_INVALIDATE handler in the nested guest exit path in L0. Partition-scoped invalidation requests are forwarded to the right nested guest, handled there and passed down to L0 for eventual handling. Signed-off-by: Bharata B Rao [aneesh: Nested guest partition-scoped invalidation changes] Signed-off-by: Aneesh Kumar K.V [mpe: Squash in fixup patch] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621085003.904767-5-bharata@linux.ibm.com commit 1181f2164135d770bdad297290b73d274787389b Author: Uwe Kleine-König Date: Mon Jun 21 14:21:48 2021 +0200 backlight: lm3630a: Convert to atomic PWM API and check for errors The practical upside here is that this only needs a single API call to program the hardware which (depending on the underlaying hardware) can be more effective and prevents glitches. Up to now the return value of the pwm functions was ignored. Fix this and propagate the error to the caller. Signed-off-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit b9481a667a90ec739995e85f91f3672ca44d6ffa Author: Uwe Kleine-König Date: Mon Jun 21 14:21:47 2021 +0200 backlight: lm3630a: Fix return code of .update_status() callback According to .update_status() is supposed to return 0 on success and a negative error code otherwise. Adapt lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status() to actually do it. While touching that also add the error code to the failure message. Signed-off-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 04c02c201d7e8149ae336ead69fb64e4e6f94bc9 Author: Steven Price Date: Mon Jun 21 12:17:16 2021 +0100 KVM: arm64: Document MTE capability and ioctl A new capability (KVM_CAP_ARM_MTE) identifies that the kernel supports granting a guest access to the tags, and provides a mechanism for the VMM to enable it. A new ioctl (KVM_ARM_MTE_COPY_TAGS) provides a simple way for a VMM to access the tags of a guest without having to maintain a PROT_MTE mapping in userspace. The above capability gates access to the ioctl. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210621111716.37157-7-steven.price@arm.com commit f0376edb1ddcab19a473b4bf1fbd5b6bbed3705b Author: Steven Price Date: Mon Jun 21 12:17:15 2021 +0100 KVM: arm64: Add ioctl to fetch/store tags in a guest The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM and it's unlikely the tags are correct for the VMM). Instead add a new ioctl which allows the VMM to easily read/write the tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE while the VMM can still read/write the tags for the purpose of migration. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210621111716.37157-6-steven.price@arm.com commit 673638f434ee4a00319e254ade338c57618d6f7e Author: Steven Price Date: Mon Jun 21 12:17:14 2021 +0100 KVM: arm64: Expose KVM_ARM_CAP_MTE It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210621111716.37157-5-steven.price@arm.com commit e1f358b5046479d2897f23b1d5b092687c6e7a67 Author: Steven Price Date: Mon Jun 21 12:17:13 2021 +0100 KVM: arm64: Save/restore MTE registers Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210621111716.37157-4-steven.price@arm.com commit ea7fc1bb1cd1b92b42b1d9273ce7e231d3dc9321 Author: Steven Price Date: Mon Jun 21 12:17:12 2021 +0100 KVM: arm64: Introduce MTE VM feature Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging for a VM. This will expose the feature to the guest and automatically tag memory pages touched by the VM as PG_mte_tagged (and clear the tag storage) to ensure that the guest cannot see stale tags, and so that the tags are correctly saved/restored across swap. Actually exposing the new capability to user space happens in a later patch. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price [maz: move VM_SHARED sampling into the critical section] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210621111716.37157-3-steven.price@arm.com commit 5dec6d96d12d33900ec315972c8e47a73bcc378d Author: Maciej Żenczykowski Date: Fri Jun 18 03:55:26 2021 -0700 bpf: Fix regression on BPF_OBJ_GET with non-O_RDWR flags This reverts commit d37300ed1821 ("bpf: program: Refuse non-O_RDWR flags in BPF_OBJ_GET"). It breaks Android userspace which expects to be able to fetch programs with just read permissions. See: https://cs.android.com/android/platform/superproject/+/master:frameworks/libs/net/common/native/bpf_syscall_wrappers/include/BpfSyscallWrappers.h;drc=7005c764be23d31fa1d69e826b4a2f6689a8c81e;l=124 Side-note: another option to fix it would be to extend bpf_prog_new_fd() and to pass in used file mode flags in the same way as we do for maps via bpf_map_new_fd(). Meaning, they'd end up in anon_inode_getfd() and thus would be retained for prog fd operations with bpf() syscall. Right now these flags are not checked with progs since they are immutable for their lifetime (as opposed to maps which can be updated from user space). In future this could potentially change with new features, but at that point it's still fine to do the bpf_prog_new_fd() extension when needed. For a simple stable fix, a revert is less churn. Fixes: d37300ed1821 ("bpf: program: Refuse non-O_RDWR flags in BPF_OBJ_GET") Signed-off-by: Maciej Żenczykowski [ Daniel: added side-note to commit message ] Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/bpf/20210618105526.265003-1-zenczykowski@gmail.com commit 138a12d865749e28b39300b8a07337811253939b Author: Josef Bacik Date: Tue Jun 22 15:52:01 2021 +0300 btrfs: rip out btrfs_space_info::total_bytes_pinned We used this in may_commit_transaction() in order to determine if we needed to commit the transaction. However we no longer have that logic and thus have no use of this counter anymore, so delete it. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ffad6961db6c44b324e4ee5a8025e5f63c657d7 Author: Josef Bacik Date: Tue Jun 22 15:52:00 2021 +0300 btrfs: rip the first_ticket_bytes logic from fail_all_tickets This was a trick implemented to handle the case where we had a giant reservation in front of a bunch of little reservations in the ticket queue. If the giant reservation was too large for the transaction commit to make a difference we'd ENOSPC everybody out instead of committing the transaction. This logic was put in to force us to go back and re-try the transaction commit logic to see if we could make progress. Instead now we know we've committed the transaction, so any space that would have been recovered is now available, and would be caught by the btrfs_try_granting_tickets() in this loop, so we no longer need this code and can simply delete it. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 048085539243bfd43839fe3dc6cbc02b0c620fdc Author: Josef Bacik Date: Tue Jun 22 15:51:59 2021 +0300 btrfs: remove FLUSH_DELAYED_REFS from data ENOSPC flushing Since we unconditionally commit the transaction now we no longer need to run the delayed refs to make sure our total_bytes_pinned value is uptodate, we can simply commit the transaction. Remove this stage from the data flushing list. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit c416a30cddec0840520e9ffb170aea6c6b6c64af Author: Josef Bacik Date: Tue Jun 22 15:51:58 2021 +0300 btrfs: rip out may_commit_transaction may_commit_transaction was introduced before the ticketing infrastructure existed. There was a problem where we'd legitimately be out of space, but every reservation would trigger a transaction commit and then fail. Thus if you had 1000 things trying to make a reservation, they'd all do the flushing loop and thus commit the transaction 1000 times before they'd get their ENOSPC. This helper was introduced to short circuit this, if there wasn't space that could be reclaimed by committing the transaction then simply ENOSPC out. This made true ENOSPC tests much faster as we didn't waste a bunch of time. However many of our bugs over the years have been from cases where we didn't account for some space that would be reclaimed by committing a transaction. The delayed refs rsv space, delayed rsv, many pinned bytes miscalculations, etc. And in the meantime the original problem has been solved with ticketing. We no longer will commit the transaction 1000 times. Instead we'll get 1000 waiters, we will go through the flushing mechanisms, and if there's no progress after 2 loops we ENOSPC everybody out. The ticketing infrastructure gives us a deterministic way to see if we're making progress or not, thus we avoid a lot of extra work. So simplify this step by simply unconditionally committing the transaction. This removes what is arguably our most common source of early ENOSPC bugs and will allow us to drastically simplify many of the things we track because we simply won't need them with this stuff gone. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 03470ba71fde9698efcfe28fc36a5c3a05045c32 Author: Shaul Triebitz Date: Thu Jun 17 10:08:49 2021 +0300 iwlwifi: advertise broadcast TWT support If the firmware supports broadcast TWT (know by TLV), add the broadcast TWT HE MAC capability. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.80fee3171b53.Idfb69643f4044ec26865d023d0c2a1d6466694aa@changeid Signed-off-by: Luca Coelho commit 9600948a2e919cabc18f196373e9f60c32bdb44e Author: Sumit Garg Date: Tue Jun 15 17:41:03 2021 +0530 MAINTAINERS: Add myself as TEE subsystem reviewer Since I have been helping with TEE subsystem reviews, so make that role official. Signed-off-by: Sumit Garg Signed-off-by: Jens Wiklander commit 35b22c19afe71c37540c0e4b574a441d27b03853 Author: Filipe Manana Date: Mon Jun 21 11:10:39 2021 +0100 btrfs: send: fix crash when memory allocations trigger reclaim When doing a send we don't expect the task to ever start a transaction after the initial check that verifies if commit roots match the regular roots. This is because after that we set current->journal_info with a stub (special value) that signals we are in send context, so that we take a read lock on an extent buffer when reading it from disk and verifying it is valid (its generation matches the generation stored in the parent). This stub was introduced in 2014 by commit a26e8c9f75b0bf ("Btrfs: don't clear uptodate if the eb is under IO") in order to fix a concurrency issue between send and balance. However there is one particular exception where we end up needing to start a transaction and when this happens it results in a crash with a stack trace like the following: [60015.902283] kernel: WARNING: CPU: 3 PID: 58159 at arch/x86/include/asm/kfence.h:44 kfence_protect_page+0x21/0x80 [60015.902292] kernel: Modules linked in: uinput rfcomm snd_seq_dummy (...) [60015.902384] kernel: CPU: 3 PID: 58159 Comm: btrfs Not tainted 5.12.9-300.fc34.x86_64 #1 [60015.902387] kernel: Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./F2A88XN-WIFI, BIOS F6 12/24/2015 [60015.902389] kernel: RIP: 0010:kfence_protect_page+0x21/0x80 [60015.902393] kernel: Code: ff 0f 1f 84 00 00 00 00 00 55 48 89 fd (...) [60015.902396] kernel: RSP: 0018:ffff9fb583453220 EFLAGS: 00010246 [60015.902399] kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff9fb583453224 [60015.902401] kernel: RDX: ffff9fb583453224 RSI: 0000000000000000 RDI: 0000000000000000 [60015.902402] kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [60015.902404] kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 [60015.902406] kernel: R13: ffff9fb583453348 R14: 0000000000000000 R15: 0000000000000001 [60015.902408] kernel: FS: 00007f158e62d8c0(0000) GS:ffff93bd37580000(0000) knlGS:0000000000000000 [60015.902410] kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [60015.902412] kernel: CR2: 0000000000000039 CR3: 00000001256d2000 CR4: 00000000000506e0 [60015.902414] kernel: Call Trace: [60015.902419] kernel: kfence_unprotect+0x13/0x30 [60015.902423] kernel: page_fault_oops+0x89/0x270 [60015.902427] kernel: ? search_module_extables+0xf/0x40 [60015.902431] kernel: ? search_bpf_extables+0x57/0x70 [60015.902435] kernel: kernelmode_fixup_or_oops+0xd6/0xf0 [60015.902437] kernel: __bad_area_nosemaphore+0x142/0x180 [60015.902440] kernel: exc_page_fault+0x67/0x150 [60015.902445] kernel: asm_exc_page_fault+0x1e/0x30 [60015.902450] kernel: RIP: 0010:start_transaction+0x71/0x580 [60015.902454] kernel: Code: d3 0f 84 92 00 00 00 80 e7 06 0f 85 63 (...) [60015.902456] kernel: RSP: 0018:ffff9fb5834533f8 EFLAGS: 00010246 [60015.902458] kernel: RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000000 [60015.902460] kernel: RDX: 0000000000000801 RSI: 0000000000000000 RDI: 0000000000000039 [60015.902462] kernel: RBP: ffff93bc0a7eb800 R08: 0000000000000001 R09: 0000000000000000 [60015.902463] kernel: R10: 0000000000098a00 R11: 0000000000000001 R12: 0000000000000001 [60015.902464] kernel: R13: 0000000000000000 R14: ffff93bc0c92b000 R15: ffff93bc0c92b000 [60015.902468] kernel: btrfs_commit_inode_delayed_inode+0x5d/0x120 [60015.902473] kernel: btrfs_evict_inode+0x2c5/0x3f0 [60015.902476] kernel: evict+0xd1/0x180 [60015.902480] kernel: inode_lru_isolate+0xe7/0x180 [60015.902483] kernel: __list_lru_walk_one+0x77/0x150 [60015.902487] kernel: ? iput+0x1a0/0x1a0 [60015.902489] kernel: ? iput+0x1a0/0x1a0 [60015.902491] kernel: list_lru_walk_one+0x47/0x70 [60015.902495] kernel: prune_icache_sb+0x39/0x50 [60015.902497] kernel: super_cache_scan+0x161/0x1f0 [60015.902501] kernel: do_shrink_slab+0x142/0x240 [60015.902505] kernel: shrink_slab+0x164/0x280 [60015.902509] kernel: shrink_node+0x2c8/0x6e0 [60015.902512] kernel: do_try_to_free_pages+0xcb/0x4b0 [60015.902514] kernel: try_to_free_pages+0xda/0x190 [60015.902516] kernel: __alloc_pages_slowpath.constprop.0+0x373/0xcc0 [60015.902521] kernel: ? __memcg_kmem_charge_page+0xc2/0x1e0 [60015.902525] kernel: __alloc_pages_nodemask+0x30a/0x340 [60015.902528] kernel: pipe_write+0x30b/0x5c0 [60015.902531] kernel: ? set_next_entity+0xad/0x1e0 [60015.902534] kernel: ? switch_mm_irqs_off+0x58/0x440 [60015.902538] kernel: __kernel_write+0x13a/0x2b0 [60015.902541] kernel: kernel_write+0x73/0x150 [60015.902543] kernel: send_cmd+0x7b/0xd0 [60015.902545] kernel: send_extent_data+0x5a3/0x6b0 [60015.902549] kernel: process_extent+0x19b/0xed0 [60015.902551] kernel: btrfs_ioctl_send+0x1434/0x17e0 [60015.902554] kernel: ? _btrfs_ioctl_send+0xe1/0x100 [60015.902557] kernel: _btrfs_ioctl_send+0xbf/0x100 [60015.902559] kernel: ? enqueue_entity+0x18c/0x7b0 [60015.902562] kernel: btrfs_ioctl+0x185f/0x2f80 [60015.902564] kernel: ? psi_task_change+0x84/0xc0 [60015.902569] kernel: ? _flat_send_IPI_mask+0x21/0x40 [60015.902572] kernel: ? check_preempt_curr+0x2f/0x70 [60015.902576] kernel: ? selinux_file_ioctl+0x137/0x1e0 [60015.902579] kernel: ? expand_files+0x1cb/0x1d0 [60015.902582] kernel: ? __x64_sys_ioctl+0x82/0xb0 [60015.902585] kernel: __x64_sys_ioctl+0x82/0xb0 [60015.902588] kernel: do_syscall_64+0x33/0x40 [60015.902591] kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae [60015.902595] kernel: RIP: 0033:0x7f158e38f0ab [60015.902599] kernel: Code: ff ff ff 85 c0 79 9b (...) [60015.902602] kernel: RSP: 002b:00007ffcb2519bf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [60015.902605] kernel: RAX: ffffffffffffffda RBX: 00007ffcb251ae00 RCX: 00007f158e38f0ab [60015.902607] kernel: RDX: 00007ffcb2519cf0 RSI: 0000000040489426 RDI: 0000000000000004 [60015.902608] kernel: RBP: 0000000000000004 R08: 00007f158e297640 R09: 00007f158e297640 [60015.902610] kernel: R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000000 [60015.902612] kernel: R13: 0000000000000002 R14: 00007ffcb251aee0 R15: 0000558c1a83e2a0 [60015.902615] kernel: ---[ end trace 7bbc33e23bb887ae ]--- This happens because when writing to the pipe, by calling kernel_write(), we end up doing page allocations using GFP_HIGHUSER | __GFP_ACCOUNT as the gfp flags, which allow reclaim to happen if there is memory pressure. This allocation happens at fs/pipe.c:pipe_write(). If the reclaim is triggered, inode eviction can be triggered and that in turn can result in starting a transaction if the inode has a link count of 0. The transaction start happens early on during eviction, when we call btrfs_commit_inode_delayed_inode() at btrfs_evict_inode(). This happens if there is currently an open file descriptor for an inode with a link count of 0 and the reclaim task gets a reference on the inode before that descriptor is closed, in which case the reclaim task ends up doing the final iput that triggers the inode eviction. When we have assertions enabled (CONFIG_BTRFS_ASSERT=y), this triggers the following assertion at transaction.c:start_transaction(): /* Send isn't supposed to start transactions. */ ASSERT(current->journal_info != BTRFS_SEND_TRANS_STUB); And when assertions are not enabled, it triggers a crash since after that assertion we cast current->journal_info into a transaction handle pointer and then dereference it: if (current->journal_info) { WARN_ON(type & TRANS_EXTWRITERS); h = current->journal_info; refcount_inc(&h->use_count); (...) Which obviously results in a crash due to an invalid memory access. The same type of issue can happen during other memory allocations we do directly in the send code with kmalloc (and friends) as they use GFP_KERNEL and therefore may trigger reclaim too, which started to happen since 2016 after commit e780b0d1c1523e ("btrfs: send: use GFP_KERNEL everywhere"). The issue could be solved by setting up a NOFS context for the entire send operation so that reclaim could not be triggered when allocating memory or pages through kernel_write(). However that is not very friendly and we can in fact get rid of the send stub because: 1) The stub was introduced way back in 2014 by commit a26e8c9f75b0bf ("Btrfs: don't clear uptodate if the eb is under IO") to solve an issue exclusive to when send and balance are running in parallel, however there were other problems between balance and send and we do not allow anymore to have balance and send run concurrently since commit 9e967495e0e0ae ("Btrfs: prevent send failures and crashes due to concurrent relocation"). More generically the issues are between send and relocation, and that last commit eliminated only the possibility of having send and balance run concurrently, but shrinking a device also can trigger relocation, and on zoned filesystems we have relocation of partially used block groups triggered automatically as well. The previous patch that has a subject of: "btrfs: ensure relocation never runs while we have send operations running" Addresses all the remaining cases that can trigger relocation. 2) We can actually allow starting and even committing transactions while in a send context if needed because send is not holding any locks that would block the start or the commit of a transaction. So get rid of all the logic added by commit a26e8c9f75b0bf ("Btrfs: don't clear uptodate if the eb is under IO"). We can now always call clear_extent_buffer_uptodate() at verify_parent_transid() since send is the only case that uses commit roots without having a transaction open or without holding the commit_root_sem. Reported-by: Chris Murphy Link: https://lore.kernel.org/linux-btrfs/CAJCQCtRQ57=qXo3kygwpwEBOU_CA_eKvdmjP52sU=eFvuVOEGw@mail.gmail.com/ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1cea5cf0e664290cc917da9a2c1f8df3716891cd Author: Filipe Manana Date: Mon Jun 21 11:10:38 2021 +0100 btrfs: ensure relocation never runs while we have send operations running Relocation and send do not play well together because while send is running a block group can be relocated, a transaction committed and the respective disk extents get re-allocated and written to or discarded while send is about to do something with the extents. This was explained in commit 9e967495e0e0ae ("Btrfs: prevent send failures and crashes due to concurrent relocation"), which prevented balance and send from running in parallel but it did not address one remaining case where chunk relocation can happen: shrinking a device (and device deletion which shrinks a device's size to 0 before deleting the device). We also have now one more case where relocation is triggered: on zoned filesystems partially used block groups get relocated by a background thread, introduced in commit 18bb8bbf13c183 ("btrfs: zoned: automatically reclaim zones"). So make sure that instead of preventing balance from running when there are ongoing send operations, we prevent relocation from happening. This uses the infrastructure recently added by a patch that has the subject: "btrfs: add cancellable chunk relocation support". Also it adds a spinlock used exclusively for the exclusivity between send and relocation, as before fs_info->balance_mutex was used, which would make an attempt to run send to block waiting for balance to finish, which can take a lot of time on large filesystems. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cbeaae4f6f6e787b7dac6230a31d9ad93d594f95 Author: David Sterba Date: Fri Jun 18 16:16:49 2021 +0200 btrfs: shorten integrity checker extent data mount option Subjectively, CHECK_INTEGRITY_INCLUDING_EXTENT_DATA is quite long and calling it CHECK_INTEGRITY_DATA still keeps the meaning and matches the mount option name. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit ccd9395b5241310f1ef518ad371f8de779f0b681 Author: David Sterba Date: Fri Jun 18 14:57:05 2021 +0200 btrfs: switch mount option bits to enums and use wider type Switch defines of BTRFS_MOUNT_* to an enum (the symbolic names are recorded in the debugging information for convenience). There are two more things done but separating them would not make much sense as it's touching the same lines: - Renumber shifts 18..31 to 17..30 to get rid of the hole in the sequence. - Use 1UL as the value that gets shifted because we're approaching the 32bit limit and due to integer promotions the value of (1 << 31) becomes 0xffffffff80000000 when cast to unsigned long (eg. the option manipulating helpers). This is not causing any problems yet as the operations are in-memory and masking the 31st bit works, we don't have more than 31 bits so the ill effects of not masking higher bits don't happen. But once we have more, the problems will emerge. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 5548c8c6f55bf0097075b3720e14857e3272429f Author: David Sterba Date: Mon Jun 14 18:10:04 2021 +0200 btrfs: props: change how empty value is interpreted Based on user feedback and actual problems with compression property, there's no support to unset any compression options, or to force no compression flag. Note: This has changed recently in e2fsprogs 1.46.2, 'chattr +m' (setting NOCOMPRESS). In btrfs properties, the empty value should really mean reset to defaults, for all properties in general. Right now there's only the compression one, so this change should not cause too many problems. Old behaviour: $ lsattr file ---------------------- file # the NOCOMPRESS bit is set $ btrfs prop set file compression '' $ lsattr file ---------------------m file This is equivalent to 'btrfs prop set file compression no' in current btrfs-progs as the 'no' or 'none' values are translated to an empty string. This is where the new behaviour is different: empty string drops the compression flag (-c) and nocompress (-m): $ lsattr file ---------------------- file # No change $ btrfs prop set file compression '' $ lsattr file ---------------------- file $ btrfs prop set file compression lzo $ lsattr file --------c------------- file $ btrfs prop get file compression compression=lzo $ btrfs prop set file compression '' # Reset to the initial state $ lsattr file ---------------------- file # Set NOCOMPRESS bit $ btrfs prop set file compression no $ lsattr file ---------------------m file This obviously brings problems with backward compatibility, so this patch should not be backported without making sure the updated btrfs-progs are also used and that scripts have been updated to use the new semantics. Summary: - old kernel: no, none, "" - set NOCOMPRESS bit - new kernel: no, none - set NOCOMPRESS bit "" - drop all compression flags, ie. COMPRESS and NOCOMPRESS Signed-off-by: David Sterba commit f2165627319ffd33a6217275e5690b1ab5c45763 Author: David Sterba Date: Mon Jun 14 12:45:18 2021 +0200 btrfs: compression: don't try to compress if we don't have enough pages The early check if we should attempt compression does not take into account the number of input pages. It can happen that there's only one page, eg. a tail page after some ranges of the BTRFS_MAX_UNCOMPRESSED have been processed, or an isolated page that won't be converted to an inline extent. The single page would be compressed but a later check would drop it again because the result size must be at least one block shorter than the input. That can never work with just one page. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: David Sterba commit 44365827cccc1441d4187509257e5276af133a49 Author: Naohiro Aota Date: Mon Jun 21 10:21:14 2021 +0900 btrfs: fix unbalanced unlock in qgroup_account_snapshot() qgroup_account_snapshot() is trying to unlock the not taken tree_log_mutex in a error path. Since ret != 0 in this case, we can just return from here. Fixes: 2a4d84c11a87 ("btrfs: move delayed ref flushing for qgroup into qgroup helper") CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Qu Wenruo Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit da658b5708c68b03b395b7c5c50bae47826db8cc Author: David Sterba Date: Fri Jun 4 15:00:05 2021 +0200 btrfs: sysfs: export dev stats in devinfo directory The device stats can be read by ioctl, wrapped by command 'btrfs device stats'. Provide another source where to read the information in /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats . The format is a list of 'key value' pairs one per line, which is common in other stat files. The names are the same as used in other device stat outputs. The stats are all in one file as it's the snapshot of all available stats. The 'one value per file' format is not very suitable here. The stats should be valid right after the stats item is read from disk, shortly after initializing the device. In case the stats are not yet valid, print just 'invalid' as the file contents. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 1a9fd4172d5c8ba64735b3aef7eed643d398ce05 Author: David Sterba Date: Fri May 21 17:42:23 2021 +0200 btrfs: fix typos in comments Fix typos that have snuck in since the last round. Found by codespell. Signed-off-by: David Sterba commit c86bdc9b7c2c396ad476ecbb20738d2720bf0992 Author: Qu Wenruo Date: Fri Jun 11 09:31:06 2021 +0800 btrfs: remove a stale comment for btrfs_decompress_bio() Since commit 8140dc30a432 ("btrfs: btrfs_decompress_bio() could accept compressed_bio instead"), btrfs_decompress_bio() accepts "struct compressed_bio" other than open-coded parameter list. Thus the comments for the parameter list is no longer needed. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit bb930007c006c5d7b8ecba41bb5bafd2dcd1fa79 Author: Baokun Li Date: Fri Jun 11 14:51:15 2021 +0800 btrfs: send: use list_move_tail instead of list_del/list_add_tail Use list_move_tail() instead of list_del() + list_add_tail() as it's doing the same thing and allows further cleanups. Open code name_cache_used() as there is only one user. Reported-by: Hulk Robot Signed-off-by: Baokun Li Reviewed-by: David Sterba Signed-off-by: David Sterba commit b05fbcc36be1f8597a1febef4892053a0b2f3f60 Author: Christophe Leroy Date: Thu Jun 10 05:23:02 2021 +0000 btrfs: disable build on platforms having page size 256K With a config having PAGE_SIZE set to 256K, BTRFS build fails with the following message include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0 BTRFS_MAX_COMPRESSED being 128K, BTRFS cannot support platforms with 256K pages at the time being. There are two platforms that can select 256K pages: - hexagon - powerpc Disable BTRFS when 256K page size is selected. Supporting this would require changes to the subpage mode that's currently being developed. Given that 256K is many times larger than page sizes commonly used and for what the algorithms and structures have been tuned, it's out of scope and disabling build is a reasonable option. Reported-by: kernel test robot Signed-off-by: Christophe Leroy [ update changelog ] Signed-off-by: David Sterba commit d8ac76cdd1755b21e8c008c28d0b7251c0b14986 Author: Filipe Manana Date: Wed Jun 9 11:25:03 2021 +0100 btrfs: send: fix invalid path for unlink operations after parent orphanization During an incremental send operation, when processing the new references for the current inode, we might send an unlink operation for another inode that has a conflicting path and has more than one hard link. However this path was computed and cached before we processed previous new references for the current inode. We may have orphanized a directory of that path while processing a previous new reference, in which case the path will be invalid and cause the receiver process to fail. The following reproducer triggers the problem and explains how/why it happens in its comments: $ cat test-send-unlink.sh #!/bin/bash DEV=/dev/sdi MNT=/mnt/sdi mkfs.btrfs -f $DEV >/dev/null mount $DEV $MNT # Create our test files and directory. Inode 259 (file3) has two hard # links. touch $MNT/file1 touch $MNT/file2 touch $MNT/file3 mkdir $MNT/A ln $MNT/file3 $MNT/A/hard_link # Filesystem looks like: # # . (ino 256) # |----- file1 (ino 257) # |----- file2 (ino 258) # |----- file3 (ino 259) # |----- A/ (ino 260) # |---- hard_link (ino 259) # # Now create the base snapshot, which is going to be the parent snapshot # for a later incremental send. btrfs subvolume snapshot -r $MNT $MNT/snap1 btrfs send -f /tmp/snap1.send $MNT/snap1 # Move inode 257 into directory inode 260. This results in computing the # path for inode 260 as "/A" and caching it. mv $MNT/file1 $MNT/A/file1 # Move inode 258 (file2) into directory inode 260, with a name of # "hard_link", moving first inode 259 away since it currently has that # location and name. mv $MNT/A/hard_link $MNT/tmp mv $MNT/file2 $MNT/A/hard_link # Now rename inode 260 to something else (B for example) and then create # a hard link for inode 258 that has the old name and location of inode # 260 ("/A"). mv $MNT/A $MNT/B ln $MNT/B/hard_link $MNT/A # Filesystem now looks like: # # . (ino 256) # |----- tmp (ino 259) # |----- file3 (ino 259) # |----- B/ (ino 260) # | |---- file1 (ino 257) # | |---- hard_link (ino 258) # | # |----- A (ino 258) # Create another snapshot of our subvolume and use it for an incremental # send. btrfs subvolume snapshot -r $MNT $MNT/snap2 btrfs send -f /tmp/snap2.send -p $MNT/snap1 $MNT/snap2 # Now unmount the filesystem, create a new one, mount it and try to # apply both send streams to recreate both snapshots. umount $DEV mkfs.btrfs -f $DEV >/dev/null mount $DEV $MNT # First add the first snapshot to the new filesystem by applying the # first send stream. btrfs receive -f /tmp/snap1.send $MNT # The incremental receive operation below used to fail with the # following error: # # ERROR: unlink A/hard_link failed: No such file or directory # # This is because when send is processing inode 257, it generates the # path for inode 260 as "/A", since that inode is its parent in the send # snapshot, and caches that path. # # Later when processing inode 258, it first processes its new reference # that has the path of "/A", which results in orphanizing inode 260 # because there is a a path collision. This results in issuing a rename # operation from "/A" to "/o260-6-0". # # Finally when processing the new reference "B/hard_link" for inode 258, # it notices that it collides with inode 259 (not yet processed, because # it has a higher inode number), since that inode has the name # "hard_link" under the directory inode 260. It also checks that inode # 259 has two hardlinks, so it decides to issue a unlink operation for # the name "hard_link" for inode 259. However the path passed to the # unlink operation is "/A/hard_link", which is incorrect since currently # "/A" does not exists, due to the orphanization of inode 260 mentioned # before. The path is incorrect because it was computed and cached # before the orphanization. This results in the receiver to fail with # the above error. btrfs receive -f /tmp/snap2.send $MNT umount $MNT When running the test, it fails like this: $ ./test-send-unlink.sh Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap1' At subvol /mnt/sdi/snap1 Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap2' At subvol /mnt/sdi/snap2 At subvol snap1 At snapshot snap2 ERROR: unlink A/hard_link failed: No such file or directory Fix this by recomputing a path before issuing an unlink operation when processing the new references for the current inode if we previously have orphanized a directory. A test case for fstests will follow soon. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5c1f09422e666a00f99c5f821a40b46df5f871c8 Author: Avraham Stern Date: Thu Jun 17 10:08:48 2021 +0300 iwlwifi: mvm: support LMR feedback If the LMR feedback is set in the ranging request, set the corresponding flag in the fw command. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.0c00dd724f5c.I8283b95c26f4226deaea42e7be35aa9d41eb7580@changeid Signed-off-by: Luca Coelho commit 1381eb5c8ed5141bbf39325b80153072647186b6 Author: Johannes Berg Date: Thu Jun 17 10:08:47 2021 +0300 iwlwifi: correct HE capabilities The (default) HE capabilities for our devices weren't handled correctly, adjust them to match the correct capabilities of the devices. Since the device regulatory will not allow 160 MHz on 5 GHz, don't advertise this capability by default; do it only if an NVM file is being loaded that might change the regulatory parameters. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.e8d0b02ec86b.Ia6ef8cc0480d38af25e6ac45fad9fb15bdfcbc2c@changeid Signed-off-by: Luca Coelho commit b26d4996c862864c5f74f858ee343002530473fb Author: Harish Mitty Date: Thu Jun 17 10:08:46 2021 +0300 iwlwifi: mvm: Call NMI instead of REPLY_ERROR For IWL_DEVICE_FAMILY_22000 & greater, driver will call NMI instead of REPLY_ERROR as FW->Infra does not support this command for this family onwards. Signed-off-by: Harish Mitty Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.597f4246c79d.Ia0a1bbc2e66b4e849174db685208fc2b8bd5732e@changeid Signed-off-by: Luca Coelho commit 976ac0af7ba2c5424bc305b926c0807d96fdcc83 Author: Shaul Triebitz Date: Thu Jun 17 10:08:45 2021 +0300 iwlwifi: mvm: fix error print when session protection ends When the session protection ends and the Driver is not associated or a beacon was not heard, the Driver prints "No beacons heard...". That's confusing for the case where not associated. Change the print when not associated to "Not associated...". Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.41a5a5a894fa.I9eabb76e7a3a7f4abbed8f2ef918f1df8e825726@changeid Signed-off-by: Luca Coelho commit 2a7ce54ccc23e6a6f2e619cfe657a587accb1a3e Author: Johannes Berg Date: Thu Jun 17 10:08:44 2021 +0300 iwlwifi: mvm: honour firmware SMPS requests The firmware can now request SMPS (due to thermal conditions), add some code to honour such requests and bubble them up through the stack, subject to our other SMPS constraints, e.g. from Bluetooth. Then, if the firmware requests SMPS, then we know that it supports a small extension to the PHY configuration API where a chain mask of 0 means "use 1 but pick which one yourself", so in this case we use that extension. During firmware restart, we stay in the previous state, and the FW will send us a notification at startup (only) if the temperature is below the lower or above the high threshold, to sync the state. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.85656b7684b9.I7a661a0758d070a750d3a91874d1a0f5fab9febc@changeid Signed-off-by: Luca Coelho commit a171399fd687a7d2fa56a10c9a2d7084a647677d Author: Johannes Berg Date: Thu Jun 17 10:08:43 2021 +0300 iwlwifi: mvm: apply RX diversity per PHY context SMPS requests may differ per interfaces due to e.g. Bluetooth only interfering on 2.4 GHz, so if that's the case we should, in the case of multiple PHY contexts, still allow RX diversity on PHY context that have no interfaces with SMPS requests. Fix the code to pass through the PHY context in question and skip interfaces with non-matching PHY context while iterating. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.123c6b05809d.I992e3d1c6a29850d02eeec01712b5b685b963a87@changeid Signed-off-by: Luca Coelho commit 46d1da21d0cbf237d9f80ba66261fb1435ba2103 Author: Johannes Berg Date: Thu Jun 17 10:08:42 2021 +0300 iwlwifi: mvm: don't request SMPS in AP mode This is not valid (in the spec) and mac80211 will soon warn on it, in addition to ignoring it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.d568df20e273.Id45ae38f9b16b3c56fa62266e3e89a1421ea07b0@changeid Signed-off-by: Luca Coelho commit aa899e683fe537793eb81e06ee93ee8ec7cf3f78 Author: Johannes Berg Date: Thu Jun 17 10:08:41 2021 +0300 iwlwifi: pcie: identify the RF module Identify and print out the RF module to be able to identify (from logs and through debugfs) which one (and version) is present on the system. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210617100544.cd1ef97b2c04.Iad42a59902a87a50b45b9ce88705863686a83b54@changeid Signed-off-by: Luca Coelho commit a451b823074ca40bda686f3fb48875103e17d7da Author: Mukesh Sisodiya Date: Sat Jun 12 14:32:45 2021 +0300 iwlwifi: yoyo: support region TLV version 2 Region TLV version 2 now includes more data, but it is not relevant for the driver. In order to support this new version, just mask the new part out. Signed-off-by: Mukesh Sisodiya Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.60dd4c60ab49.I44fe02af389d3ab089363bf9bde0d99a4c1ff383@changeid Signed-off-by: Luca Coelho commit 7e10d7ae960212f84972a2c59dd9a1a5e23fd4a4 Author: Johannes Berg Date: Sat Jun 12 14:32:44 2021 +0300 iwlwifi: remove duplicate iwl_ax201_cfg_qu_hr declaration This configuration struct is declared twice, remove one of the declarations. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.a08c905ec25b.Iff706f9d5b7b666e306549c419d04dcd4d81e5fd@changeid Signed-off-by: Luca Coelho commit 163c36150179503dae869f0f17355eedb32b7af4 Author: Johannes Berg Date: Sat Jun 12 14:32:43 2021 +0300 iwlwifi: pcie: remove CSR_HW_RF_ID_TYPE_CHIP_ID This is duplicated with CSR_HW_RFID_TYPE so just use the latter for less typing/shorter lines. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.00b220f4ba53.I1fe216a46e7d9c1316d681daa293064f16ff1899@changeid Signed-off-by: Luca Coelho commit 57e6492cf0fd2e39feaa7ac39c68383f44bde6ac Author: Johannes Berg Date: Sat Jun 12 14:32:42 2021 +0300 iwlwifi: pcie: print interrupt number, not index Printing the interrupt index in our local array isn't very useful in an error message, print the interrupt number (as also shown in e.g. /proc/interrupts) instead. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.05bc5157e606.Ifb65b5ed2e5296fd8258c40c4287b5443b06d337@changeid Signed-off-by: Luca Coelho commit 7e2c14372bd89ffe4cefd678b8b1743cac376f4c Author: Matti Gottlieb Date: Sat Jun 12 14:32:41 2021 +0300 iwlwifi: pcie: Add support for AX231 radio module with Ma devices Add support for AX231 radio modules, which we call Fm. These modules can be used with the Ma family of devices and above. Signed-off-by: Matti Gottlieb Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.c1fdd153d686.I7ee0485c52fb429de1fe171cb6dc0ae593a26788@changeid Signed-off-by: Luca Coelho commit 5cc816ef9db1fe03f73e56e9d8f118add9c6efe4 Author: Luca Coelho Date: Sat Jun 12 14:32:40 2021 +0300 iwlwifi: increase PNVM load timeout The FW has a watchdog of 200ms in the PNVM load flow, so the driver should have a slightly higher timeout. Change the timeout from 100ms to 250ms. Signed-off-by: Luca Coelho Fixes: 70d3ca86b025 ("iwlwifi: mvm: ring the doorbell and wait for PNVM load completion") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.ba22aec1e2be.I36bfadc28c480f4fc57266c075a79e8ea4a6934f@changeid Signed-off-by: Luca Coelho commit f00c3f9e2cfc144d5f40803ea3cd0d0cb09745cc Author: Johannes Berg Date: Sat Jun 12 14:32:39 2021 +0300 iwlwifi: pcie: handle pcim_iomap_table() failures better pcim_iomap_table() might return NULL, so we shouldn't unconditionally dereference the return value by taking the [0] entry. Handle this better by checking for NULL first, and then separately checking if the [0] entry is NULL. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.9aa4f0e3574a.I458b283f203d5f927f00be1bfbd4b8ebf11c5ae4@changeid Signed-off-by: Luca Coelho commit 8835a64f74c46baebfc946cd5a2c861b866ebcee Author: Johannes Berg Date: Sat Jun 12 14:32:38 2021 +0300 iwlwifi: mvm: don't change band on bound PHY contexts When we have a P2P Device active, we attempt to only change the PHY context it uses when we get a new remain-on-channel, if the P2P Device is the only user of the PHY context. This is fine if we're switching within a band, but if we're switching bands then the switch implies a removal and re-add of the PHY context, which isn't permitted by the firmware while it's bound to an interface. Fix the code to skip the unbind/release/... cycle only if the band doesn't change (or we have old devices that can switch the band on the fly as well.) Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.e9ac313f70f3.I713b9d109957df7e7d9ed0861d5377ce3f8fccd3@changeid Signed-off-by: Luca Coelho commit 7a9a44456d742bdf66a3394a6e718c6cece20f69 Author: Luca Coelho Date: Sat Jun 12 14:32:37 2021 +0300 iwlwifi: remove unused REMOTE_WAKE_CONFIG_CMD definitions We don't use this command anymore and it is going to be removed from the FW. Remove all related definitions. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.549b282ae9a4.Iced05882d73b869e19f50e6a6e7bf9ce6cd7899b@changeid Signed-off-by: Luca Coelho commit e348b8a62c147a2def03ebfa8218f1c8de157bf8 Author: Luca Coelho Date: Sat Jun 12 14:32:36 2021 +0300 iwlwifi: mvm: fix indentation in some scan functions Two functions had indentation mistakes which were causing sparse warnings. Fix them. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.12f3b9fea57e.I42a7556d43de78ec6387e3a699eca10482b0485d@changeid Signed-off-by: Luca Coelho commit c4ae8b9d0f3217308766e1ed3eaad14054b02467 Author: Luca Coelho Date: Sat Jun 12 14:32:35 2021 +0300 iwlwifi: mvm: pass the clock type to iwl_mvm_get_sync_time() Allow the caller to pass the clock type to iwl_mvm_get_sync_time() so callers with different needs can decide whether to use boottime or realtime. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.093f6660e69b.Ifd2328ac2130269f729c9c1bceec44ba01d79e88@changeid Signed-off-by: Luca Coelho commit 7119f02b5d3449cea7736161590ae45289a57963 Author: Miri Korenblit Date: Sat Jun 12 14:32:34 2021 +0300 iwlwifi: mvm: support BIOS enable/disable for 11ax in Russia Read the new BIOS DSM and Pass to FW if to disable\enable 11ax for Russia according to the BIOS key. This is needed to enable OEMs to control enable/disable 11ax in Russia. Also add support for future "enable 11ax in country X" features. Signed-off-by: Miri Korenblit Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210612142637.a705f7cedff8.I580f1021cabcc37e88f5ec5e9a6bbf00aae514b6@changeid Signed-off-by: Luca Coelho commit d90609a4b72dbfe42da2a55f3078c35e669948e0 Author: Sebastian Reichel Date: Mon Jun 21 19:53:56 2021 +0200 spi: dt-bindings: support devices with multiple chipselects Add binding support for devices, that have more than one chip select. A typical example are SPI connected microcontroller, that can also be programmed over SPI like NXP Kinetis or chips with a configuration and a data chip select, such as Microchip's MRF89XA transceiver. Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20210621175359.126729-3-sebastian.reichel@collabora.com Signed-off-by: Mark Brown commit 0c79378c01999bd60057c475f163ec807c24891f Author: Sebastian Reichel Date: Mon Jun 21 19:53:55 2021 +0200 spi: add ancillary device support Introduce support for ancillary devices, similar to existing implementation for I2C. This is useful for devices having multiple chip-selects, for example some microcontrollers provide a normal SPI interface and a flashing SPI interface. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20210621175359.126729-2-sebastian.reichel@collabora.com Signed-off-by: Mark Brown commit 8a14ded5a8cb7d4146c12f984b5346bffde9b70f Author: Daisuke Nojiri Date: Wed Jun 16 11:51:25 2021 -0700 mfd: cros_ec: Add peripheral device charger This patch adds a cell entry for PCHG (Peripheral CHarGer). PCHG is a framework managing power supplies for peripheral devices. Signed-off-by: Daisuke Nojiri Signed-off-by: Lee Jones commit 9bc146acc33125cd9f365b92f1c02ec89f639977 Author: Axel Lin Date: Tue Jun 22 12:33:29 2021 +0800 regulator: hi6421v600: Fix setting wrong driver_data Current code set "config.driver_data = sreg" but sreg only init the mutex, the othere fields are just zero. Fix it by pass *info to config.driver_data so each regulator can get corresponding data by rdev_get_drvdata(). Separate enable_mutex from struct hi6421_spmi_reg_info since only need one mutex for the driver. Fixes: d2dfd50a0b57 ("staging: hikey9xx: hi6421v600-regulator: move LDO config from DT") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210622043329.392072-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 4b1d51715d1cf78a1527fe426fc0278dcfea1959 Author: Shengjiu Wang Date: Wed Jun 2 14:42:12 2021 +0800 ASoC: fsl-asoc-card: change dev_err to dev_dbg for defer probe Don't need to print error message for defer probe Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1622616132-10391-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 907f0a3051869a61499905377212500155bd28ec Author: Guido Günther Date: Tue Jun 22 10:27:09 2021 +0200 ASoC: simple-card: Fill in driver name alsa-ucm groups by driver name so fill that in as well. Otherwise the presented information is redundant and doesn't reflect the used driver. We can't just use 'asoc-simple-card' since the driver name is restricted to 15 characters. Before: # cat /proc/asound/cards 0 [Devkit ]: Librem_5_Devkit - Librem 5 Devkit Librem 5 Devkit After: 0 [Devkit ]: simple-card - Librem 5 Devkit Librem 5 Devkit Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/YNGe3akAntQi8qJD@qwark.sigxcpu.org Signed-off-by: Mark Brown commit 0ba0f44fd516b34c9f40cd82fd480705d0f378dc Author: Yang Yingliang Date: Thu Jun 17 11:27:56 2021 +0800 ASoC: SOF: imx: Add missing of_node_put() in imx8_probe() This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exiting this function. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617032756.599359-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d245fff1013cb7456ea9ca3f7b858e438c6bbf79 Author: Srinivas Kandagatla Date: Mon Jun 21 14:45:02 2021 +0100 ASoC: codecs: wcd938x: fix uninitialized symbol warnings This patch fixes below two uninitialized symbol warnings warning: sound/soc/codecs/wcd938x.c:2092 wcd938x_tx_swr_ctrl() error: uninitialized symbol 'rate' sound/soc/codecs/wcd938x.c:2189 wcd938x_tx_channel_config() error: uninitialized symbol 'reg'. First one my brining in check to already existing if condition and second one by adding a default switch case to avoid any access to reg. Reported-by: Dan Carpenter Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210621134502.19537-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 8c4863c261c812a1088b0f8c6b66386d885390e1 Author: Srinivas Kandagatla Date: Mon Jun 21 14:45:01 2021 +0100 ASoC: codecs: wcd938x: fix unused variable warning This patch fixes below warning: unused variable wcd938x_dt_match by placing device match table under CONFIG_OF Reported-by: kernel test robot Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210621134502.19537-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit bf35a1eeaca618341409f94c90271bb14d1c484a Author: Kai Vehmanen Date: Mon Jun 21 14:40:57 2021 -0500 ASoC: Intel: skl_hda_dsp_generic: Update Kconfig documentation The Kconfig documentation for SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH is a bit misleading as it refers to a set of older platforms, while in practise this machine driver supports all modern Intel systems with Smart Sound Technology based DSP and HDA codecs. Modify the Kconfig text to reflect current state. Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210621194057.21711-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 53b98536fb64f1b6ff5a1b2cfc36bbfa90619414 Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:56 2021 -0500 ASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tables When we have a platform_device_id table, we can use MODULE_DEVICE_TABLE to automatically generate the modalias. As a result we can remove the manual insertion of MODULE_ALIAS. Reported-by: Hulk Robot Suggested-by: Zou Wei Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210621194057.21711-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0c52d3e222889138e6a8dd1c1ad05fcc41c6bdfa Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:55 2021 -0500 ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values Sparse throws the following type of warnings: sound/soc/intel/common/soc-acpi-intel-adl-match.c:34:24: error: constant 0x000020025D071100 is so big it is long Let's add the 'ull' suffix to make this go away and find real issues. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210621194057.21711-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0a1f3958eab16cd31bf3d714363471a7a6722dc9 Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:54 2021 -0500 ASoC: Intel: sof_sdw: fix signed/unsigned warning Sparse throws the following warning: sound/soc/intel/boards/sof_sdw.c:796:31: error: incorrect type in argument 6 (different signedness) sound/soc/intel/boards/sof_sdw.c:796:31: expected int *group_id sound/soc/intel/boards/sof_sdw.c:796:31: got unsigned int * The group_id cannot be negative, use unsigned int. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210621194057.21711-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1cc04d195dc245457a45df60e6558b460b8e4c71 Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:53 2021 -0500 ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters Sparse throws the following warning: sound/soc/intel/boards/sof_da7219_max98373.c:438:25: error: too long initializer-string for array of char(no space for nul char) Fix by using 'mx' acronym for Maxim. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210621194057.21711-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 94efd726b947f265bd313605c9f73edec5469d65 Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:52 2021 -0500 ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters Sparse throws the following warnings: sound/soc/intel/boards/kbl_da7219_max98357a.c:647:25: error: too long initializer-string for array of char(no space for nul char) Fix by using the 'mx' acronym for Maxim. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210621194057.21711-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bc47256afef38175a0ad6bcfd4dbab9d2c65b377 Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:51 2021 -0500 ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters Sparse throws the following warning: sound/soc/intel/boards/glk_rt5682_max98357a.c:622:25: error: too long initializer-string for array of char(no space for nul char) Fix by using the 'mx' acronym for Maxim Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210621194057.21711-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 590cfb082837cc6c0c595adf1711330197c86a58 Author: Pierre-Louis Bossart Date: Mon Jun 21 14:40:50 2021 -0500 ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters Some Chromebooks machine driver aliases exceed 20 characters, which leads to sparse warnings: sound/soc/intel/boards/sof_rt5682.c:959:25: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/sof_rt5682.c:989:25: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/sof_rt5682.c:1039:25: error: too long initializer-string for array of char(no space for nul char) Fix by using the 'mx' shortcut for Maxim platforms (already used in platform firmware) Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210621194057.21711-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b0cf3d3ccf31f31c9c415566968caf1405fc0893 Author: Kai Vehmanen Date: Mon Jun 21 14:40:49 2021 -0500 ASoC: Intel: sof_sdw: remove hdac-hdmi support Remove support for using hdac_hdmi codec driver. No known products use this configuration and hdac_hdmi cannot support all the platforms sof_sdw does. This change also fixes a bug in Kconfig rules. SND_SOC_INTEL_SOUNDWIRE_SOF_MACH did not have a select SND_SOC_HDAC_HDMI and this could cause build failures. Reported-by: Richard Fitzgerald Tested-by: Richard Fitzgerald Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210621194057.21711-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 505351329d26e684588a6919c0407b8a0f5c3813 Author: Kai Vehmanen Date: Mon Jun 21 14:40:48 2021 -0500 ASoC: Intel: sof_sdw: use mach data for ADL RVP DMIC count On the reference boards, number of PCH dmics may vary and the number should be taken from driver machine data. Remove the SOF_SDW_PCH_DMIC quirk to make DMIC number configurable. Fixes:d25bbe80485f8 ("ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp") BugLink: https://github.com/thesofproject/sof/issues/4185 Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210621194057.21711-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cf292e93f423fdebdf751a22ea01249196806328 Author: Raphael Gault Date: Mon May 17 13:02:56 2021 -0500 arm64: Restrict undef hook for cpufeature registers This commit modifies the mask of the mrs_hook declared in arch/arm64/kernel/cpufeatures.c which emulates only feature register access. This is necessary because this hook's mask was too large and thus masking any mrs instruction, even if not related to the emulated registers which made the pmu emulation inefficient. Signed-off-by: Raphael Gault Signed-off-by: Rob Herring Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210517180256.2881891-1-robh@kernel.org Signed-off-by: Will Deacon commit 40292383640a2a4f73632e08a553681d0d88c80a Author: Tomas Winkler Date: Mon Jun 21 22:37:56 2021 +0300 mei: revamp mei extension header structure layout. The mei extension header was build as array of flexible structures which will not work if actually more headers are added. (Currently only vtag header was used). Sparse reports: drivers/misc/mei/hw.h:253:32: warning: array of flexible structures Use basic type u8 for the variable sized extension. Define explicitly mei_ext_hdr_vtag structure. And also fix mei_ext_next() function to point correctly to the end of the header. Note: the headers are part of firmware interface and need to be __packed. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20210621193756.134027-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 09f8c33a4cad3623874766033544abf34e3e365d Author: Tamar Mashiah Date: Mon Jun 21 22:37:55 2021 +0300 mei: fix kdoc in the driver Over time the functions were renamed, but this was not always reflected in kdoc, fix that. Signed-off-by: Tamar Mashiah Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20210621193756.134027-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 8254ee0e0ac4a047b8c30a07e85d090fc2ecf7d5 Merge: 1730a594ac164 b7a71fddc0ddf Author: Greg Kroah-Hartman Date: Tue Jun 22 12:37:19 2021 +0200 Merge tag 'misc-habanalabs-next-2021-06-22' 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.14: - Change communication protocol with f/w. The new protocl allows better backward compatibility between different f/w versions and is more stable. - Send hard-reset cause to f/w after a hard-reset has happened. - Move to indirection when generating interrupts to f/w. - Better progress and error messages during the f/w load stage. - Recognize that f/w is with enabled security according to device ID. - Add validity check to event queue mechanism. - Add new event from f/w that will indicate a daemon has been terminated inside the f/w. - Move to TLB cache range invalidation in the device's MMU. - Disable memory scrubbing by default for performance. - Many fixes for sparse/smatch reported errors. - Enable by default stop-on-err in the ASIC. - Move to ASYNC device probing to speedup loading of driver in server with multiple devices. - Fix to stop using disabled NIC ports when doing collective operation. - Use standard error codes instead of positive values. - Add support for resetting device after user has finished using it. - Add debugfs option to avoid reset when a CS has got stuck. - Add print of the last 8 CS pointers in case of error in QMANs. - Add statistics on opening of the FD of a device. * tag 'misc-habanalabs-next-2021-06-22' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (72 commits) habanalabs/gaudi: refactor hard-reset related code habanalabs/gaudi: add support for NIC DERR habanalabs: add validity check for signal cs habanalabs: get lower/upper 32 bits via masking habanalabs: allow reset upon device release debugfs: add skip_reset_on_timeout option habanalabs: fix typo habanalabs/gaudi: correct driver events numbering habanalabs: remove a rogue #ifdef habanalabs/gaudi: print last QM PQEs on error habanalabs/goya: add '__force' attribute to suppress false alarm habanalabs: added open_stats info ioctl habanalabs/gaudi: set the correct rc in case of err habanalabs/gaudi: update coresight configuration habanalabs: remove node from list before freeing the node habanalabs: set rc as 'valid' in case of intentional func exit habanalabs: zero complex structures using memset habanalabs: print more info when failing to pin user memory habanalabs: Fix an error handling path in 'hl_pci_probe()' habanalabs: print firmware versions ... commit 1730a594ac1640854b2675b5eeb0e0494a3e6ea6 Merge: 91812dd0937cc 3d3e88e336338 Author: Greg Kroah-Hartman Date: Tue Jun 22 12:36:29 2021 +0200 Merge tag 'soundwire-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 5.14-rc1 Updates for v5.14-rc1 are: - Core has odd updates including improving clock stop codes, write api, handling ENODATA etc - Drivers has Big move of Intel driver to be aux dev and minor updates to Intel/cadence driver * tag 'soundwire-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: stream: Fix test for DP prepare complete soundwire: bus: Make sdw_nwrite() data pointer argument const soundwire: intel: move to auxiliary bus soundwire: cadence: remove the repeated declaration soundwire: dmi-quirks: remove duplicate initialization soundwire: cadence_master: always set CMD_ACCEPT soundwire: bus: add missing \n in dynamic debug soundwire: bus: handle -ENODATA errors in clock stop/start sequences soundwire: add missing kernel-doc description soundwire: bus: only use CLOCK_STOP_MODE0 and fix confusions soundwire: bandwidth allocation: improve error messages soundwire/ASoC: add leading zeroes in peripheral device name commit 01610a24cefa182b155a17e38cd0b84f8a3f0529 Author: Liang Chen Date: Tue Jun 22 10:05:17 2021 +0800 arm64: dts: rockchip: add basic dts for RK3568 EVB This patch add rk3568-evb1-v10.dts for RK3568 evaluation board. add uart/emmc/i2c/rk809 node for basic function. Signed-off-by: Liang Chen Link: https://lore.kernel.org/r/20210622020517.13100-5-cl@rock-chips.com Signed-off-by: Heiko Stuebner commit a3adc0b9071d880dcceb78b5e921843502f272bd Author: Liang Chen Date: Tue Jun 22 10:05:16 2021 +0800 arm64: dts: rockchip: add core dtsi for RK3568 SoC RK3568 is a high-performance and low power quad-core application processor designed for personal mobile internet device and AIoT equipment. This patch add basic core dtsi file for it. We use scmi_clk for cortex-a55 instead of standard ARMCLK, so that kernel/uboot/rtos can change cpu clk with the same code in ATF, and we will enalbe a special high-performance PLL when high frequency is required. The smci_clk code is in ATF, and clkid for cpu is 0, as below: cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x0>; clocks = <&scmi_clk 0>; }; Signed-off-by: Liang Chen Link: https://lore.kernel.org/r/20210622020517.13100-4-cl@rock-chips.com Signed-off-by: Heiko Stuebner commit 3a2e476dc5d02af3422143b07d8db1eced475314 Author: Zou Wei Date: Tue May 11 15:11:31 2021 +0800 PCI: mediatek-gen3: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Link: https://lore.kernel.org/r/1620717091-108691-1-git-send-email-zou_wei@huawei.com Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit e31f072ffab0397a328b31a9589dcf9733dc9c72 Author: Pablo Neira Ayuso Date: Tue Jun 22 12:10:49 2021 +0200 netfilter: nf_tables: do not allow to delete table with owner by handle nft_table_lookup_byhandle() also needs to validate the netlink PortID owner when deleting a table by handle. Fixes: 6001a930ce03 ("netfilter: nftables: introduce table ownership") Signed-off-by: Pablo Neira Ayuso commit 534799097a777e82910f77a4f9d289c815a9a64e Author: Pablo Neira Ayuso Date: Tue Jun 22 11:45:11 2021 +0200 netfilter: nf_tables: skip netlink portID validation if zero nft_table_lookup() allows us to obtain the table object by the name and the family. The netlink portID validation needs to be skipped for the dump path, since the ownership only applies to commands to update the given table. Skip validation if the specified netlink PortID is zero when calling nft_table_lookup(). Fixes: 6001a930ce03 ("netfilter: nftables: introduce table ownership") Signed-off-by: Pablo Neira Ayuso commit ef0bff8ba8dfa53780fca0fd5c369f9c78fc30cf Author: Liang Chen Date: Tue Jun 22 10:05:15 2021 +0800 arm64: dts: rockchip: add generic pinconfig settings used by most Rockchip socs The pinconfig settings for Rockchip SoCs are pretty similar on all socs, so move them to a shared dtsi to be included, instead of redefining them for each soc. Signed-off-by: Liang Chen Link: https://lore.kernel.org/r/20210622020517.13100-3-cl@rock-chips.com Signed-off-by: Heiko Stuebner commit 71d69e82f4168713afd89804d6e5f52d0e3848a2 Author: Hans de Goede Date: Mon Jun 21 21:36:48 2021 +0200 platform/x86: think-lmi: Return EINVAL when kbdlang gets set to a 0 length string Commit 0ddcf3a6b442 ("platform/x86: think-lmi: Avoid potential read before start of the buffer") moved the length == 0 up to before stripping the '\n' which typically gets added when users echo a value to a sysfs-attribute from the shell. This avoids a potential buffer-underrun, but it also causes a behavioral change, prior to this change "echo > kbdlang", iow writing just a single '\n' would result in an EINVAL error, but after the change this gets accepted setting kbdlang to an empty string. Fix this by replacing the manual '\n' check with using strchrnul() to get the length till '\n' or terminating 0 in one go; and then do the length != 0 check after this. Fixes: 0ddcf3a6b442 ("platform/x86: think-lmi: Avoid potential read before start of the buffer") Reported-by: Juha Leppänen Suggested-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210621193648.44138-1-hdegoede@redhat.com commit 72fbcac2f40e690e1a5584358750e546a2678c2c Author: Andy Shevchenko Date: Fri Jun 18 15:55:16 2021 +0300 platform/x86: intel_cht_int33fe: Move to its own subfolder Since we have started collecting Intel x86 specific drivers in their own folder, move intel_cht_int33fe to its own subfolder there. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210618125516.53510-8-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 8bd836feb6cad6bd746da09a86bda0f5ee5c4b01 Author: Andy Shevchenko Date: Fri Jun 18 15:55:15 2021 +0300 platform/x86: intel_skl_int3472: Move to intel/ subfolder Start collecting Intel x86 related drivers in its own subfolder. Move intel_skl_int3472 first. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210618125516.53510-7-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 7cb5dd8e2c8ce2b8f778f37cfd8bb955d663d16d Author: André Almeida Date: Mon May 31 13:50:36 2021 -0300 selftests: futex: Add futex compare requeue test Add testing for futex_cmp_requeue(). The first test just requeues from one waiter to another one, and wakes it. The second performs both wake and requeue, and checks the return values to see if the operation woke/requeued the expected number of waiters. Signed-off-by: André Almeida Signed-off-by: Thomas Gleixner Acked-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20210531165036.41468-3-andrealmeid@collabora.com commit c3d128581f64a9b3729e697a63760ff0a2c4a8fe Author: André Almeida Date: Mon May 31 13:50:35 2021 -0300 selftests: futex: Add futex wait test There are three different strategies to uniquely identify a futex in the kernel: - Private futexes: uses the pointer to mm_struct and the page address - Shared futexes: checks if the page containing the address is a PageAnon: - If it is, uses the same data as a private futexes - If it isn't, uses an inode sequence number from struct inode and the page's index Create a selftest to check those three paths and basic wait/wake mechanism. Signed-off-by: André Almeida Signed-off-by: Thomas Gleixner Acked-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20210531165036.41468-2-andrealmeid@collabora.com commit 7540599a5ef1cbe8d20993ca0c3202d8409338e1 Author: Andy Shevchenko Date: Fri Jun 18 15:55:14 2021 +0300 platform/x86: intel_skl_int3472: Provide skl_int3472_unregister_clock() For the sake of APIs to be properly layered provide skl_int3472_unregister_clock(). Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20210618125516.53510-6-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 7b2baa407c3c9e6f74c7edfa181eeb001e75ed3e Author: Andy Shevchenko Date: Fri Jun 18 15:55:13 2021 +0300 platform/x86: intel_skl_int3472: Provide skl_int3472_unregister_regulator() For the sake of APIs to be properly layered provide skl_int3472_unregister_regulator(). Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20210618125516.53510-5-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 719941878bc95af5e1368eca56fd4dcbd3633f10 Author: Andy Shevchenko Date: Fri Jun 18 15:55:12 2021 +0300 platform/x86: intel_skl_int3472: Use ACPI GPIO resource directly When we call acpi_gpio_get_io_resource(), the output will be the pointer to the ACPI GPIO resource. Use it directly instead of dereferencing the generic resource. Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20210618125516.53510-4-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit a438dd11081a6ff1b8aa13cc96f07e2ca2f33a36 Author: Andy Shevchenko Date: Fri Jun 18 15:55:11 2021 +0300 platform/x86: intel_skl_int3472: Fix dependencies (drop CLKDEV_LOOKUP) Besides the fact that COMMON_CLK selects CLKDEV_LOOKUP, the latter is going to be removed from clock framework. Reviewed-by: Daniel Scally Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210618125516.53510-3-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit a4310246430096a876a8d54ca7ad52d6603b9cda Author: Andy Shevchenko Date: Fri Jun 18 15:55:10 2021 +0300 platform/x86: intel_skl_int3472: Free ACPI device resources after use We may free ACPI device resources immediately after use. Refactor skl_int3472_parse_crs() accordingly. Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20210618125516.53510-2-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 362372ceb6556f338e230f2d90af27b47f82365a Author: Takashi Iwai Date: Tue Jun 22 11:06:47 2021 +0200 ALSA: usb-audio: Fix OOB access at proc output At extending the available mixer values for 32bit types, we forgot to add the corresponding entries for the format dump in the proc output. This may result in OOB access. Here adds the missing entries. Fixes: bc18e31c3042 ("ALSA: usb-audio: Fix parameter block size for UAC2 control requests") Cc: Link: https://lore.kernel.org/r/20210622090647.14021-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3ece696c1acaa2ecac2e55143fc0c3ac413369c0 Author: Andy Shevchenko Date: Fri Jun 18 15:55:09 2021 +0300 platform/x86: Remove "default n" entries Linus already once did that for PDx86, don't repeat our mistakes. TL;DR: 'n' *is* the default 'default'. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210618125516.53510-1-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit ce1b06c5f5e7fd2af8bc89323d9eb3102d8e3fe2 Author: Zhen Lei Date: Fri Jun 18 09:47:20 2021 +0800 quota: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. After that, the static function getdqbuf() becomes unnecessary, get rid of it and instead call kmalloc() directly. Link: https://lore.kernel.org/r/20210618014720.1977-2-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Jan Kara commit 69e3b846d8a753f9f279f29531ca56b0f7563ad0 Author: Steven Price Date: Mon Jun 21 12:17:11 2021 +0100 arm64: mte: Sync tags for pages where PTE is untagged A KVM guest could store tags in a page even if the VMM hasn't mapped the page with PROT_MTE. So when restoring pages from swap we will need to check to see if there are any saved tags even if !pte_tagged(). However don't check pages for which pte_access_permitted() returns false as these will not have been swapped out. Reviewed-by: Catalin Marinas Signed-off-by: Steven Price Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210621111716.37157-2-steven.price@arm.com commit 3342aa8e6b4f6e3f1521e9b4cf5cfe50dbc37774 Author: John Ogness Date: Thu Jun 17 11:56:51 2021 +0206 printk: fix cpu lock ordering The cpu lock implementation uses a full memory barrier to take the lock, but no memory barriers when releasing the lock. This means that changes performed by a lock owner may not be seen by the next lock owner. This may have been "good enough" for use by dump_stack() as a serialization mechanism, but it is not enough to provide proper protection for a critical section. Correct this problem by using acquire/release memory barriers for lock/unlock, respectively. Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210617095051.4808-3-john.ogness@linutronix.de commit 766c268bc6d39b8124e50d075a36b8a3305bc8e2 Author: John Ogness Date: Thu Jun 17 11:56:50 2021 +0206 lib/dump_stack: move cpu lock to printk.c dump_stack() implements its own cpu-reentrant spinning lock to best-effort serialize stack traces in the printk log. However, there are other functions (such as show_regs()) that can also benefit from this serialization. Move the cpu-reentrant spinning lock (cpu lock) into new helper functions printk_cpu_lock_irqsave()/printk_cpu_unlock_irqrestore() so that it is available for others as well. For !CONFIG_SMP the cpu lock is a NOP. Note that having multiple cpu locks in the system can easily lead to deadlock. Code needing a cpu lock should use the printk cpu lock, since the printk cpu lock could be acquired from any code and any context. Also note that it is not necessary for a cpu lock to disable interrupts. However, in upcoming work this cpu lock will be used for emergency tasks (for example, atomic consoles during kernel crashes) and any interruptions while holding the cpu lock should be avoided if possible. Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek [pmladek@suse.com: Backported on top of 5.13-rc1.] Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210617095051.4808-2-john.ogness@linutronix.de commit 2fea6cf7d32141b9e95e30500f1d50a9f92a7371 Merge: 85c653fcc6353 b356a83108873 Author: Marc Zyngier Date: Tue Jun 22 08:53:56 2021 +0100 Merge branch kvm-arm64/selftest/sysreg-list-fix into kvmarm-master/next Selftest updates from Andrew Jones, fixing the sysgreg list expectations by dealing with multiple configurations, such as with or without a PMU. * kvm-arm64/selftest/sysreg-list-fix: KVM: arm64: Update MAINTAINERS to include selftests KVM: arm64: selftests: get-reg-list: Split base and pmu registers KVM: arm64: selftests: get-reg-list: Remove get-reg-list-sve KVM: arm64: selftests: get-reg-list: Provide config selection option KVM: arm64: selftests: get-reg-list: Prepare to run multiple configs at once KVM: arm64: selftests: get-reg-list: Introduce vcpu configs commit b356a831088730a3ef36848cd9f2d62dcac392bf Author: Marc Zyngier Date: Tue Jun 22 08:46:44 2021 +0100 KVM: arm64: Update MAINTAINERS to include selftests As the KVM/arm64 selftests are routed via the kvmarm tree, add the relevant references to the MAINTAINERS file. Suggested-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210622070732.zod7gaqhqo344vg6@gator commit 313673bad871750c0c829def53d037868af75b67 Author: Andrew Jones Date: Mon May 31 12:33:44 2021 +0200 KVM: arm64: selftests: get-reg-list: Split base and pmu registers Since KVM commit 11663111cd49 ("KVM: arm64: Hide PMU registers from userspace when not available") the get-reg-list* tests have been failing with ... ... There are 74 missing registers. The following lines are missing registers: ... where the 74 missing registers are all PMU registers. This isn't a bug in KVM that the selftest found, even though it's true that a KVM userspace that wasn't setting the KVM_ARM_VCPU_PMU_V3 VCPU flag, but still expecting the PMU registers to be in the reg-list, would suddenly no longer have their expectations met. In that case, the expectations were wrong, though, so that KVM userspace needs to be fixed, and so does this selftest. The fix for this selftest is to pull the PMU registers out of the base register sublist into their own sublist and then create new, pmu-enabled vcpu configs which can be tested. Signed-off-by: Andrew Jones Reviewed-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210531103344.29325-6-drjones@redhat.com commit 32edd2290889d0cd0751dd11853e5a368188066d Author: Andrew Jones Date: Mon May 31 12:33:43 2021 +0200 KVM: arm64: selftests: get-reg-list: Remove get-reg-list-sve Now that we can easily run the test for multiple vcpu configs, let's merge get-reg-list and get-reg-list-sve into just get-reg-list. We also add a final change to make it more possible to run multiple tests, which is to fork the test, rather than directly run it. That allows a test to fail, but subsequent tests can still run. Signed-off-by: Andrew Jones Reviewed-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210531103344.29325-5-drjones@redhat.com commit f3032fcc9cf065733ce9a50057aaeffd6c464e2e Author: Andrew Jones Date: Mon May 31 12:33:42 2021 +0200 KVM: arm64: selftests: get-reg-list: Provide config selection option Add a new command line option that allows the user to select a specific configuration, e.g. --config=sve will give the sve config. Also provide help text and the --help/-h options. Signed-off-by: Andrew Jones Reviewed-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210531103344.29325-4-drjones@redhat.com commit 94e9223c06bece9165a36f0f56bac3552a45cbfc Author: Andrew Jones Date: Mon May 31 12:33:41 2021 +0200 KVM: arm64: selftests: get-reg-list: Prepare to run multiple configs at once We don't want to have to create a new binary for each vcpu config, so prepare to run the test for multiple vcpu configs in a single binary. We do this by factoring out the test from main() and then looping over configs. When given '--list' we still never print more than a single reg-list for a single vcpu config though, because it would be confusing otherwise. No functional change intended. Signed-off-by: Andrew Jones Reviewed-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210531103344.29325-3-drjones@redhat.com commit 2f9ace5d4557f8ceea07969d6214c320f5e50c0c Author: Andrew Jones Date: Mon May 31 12:33:40 2021 +0200 KVM: arm64: selftests: get-reg-list: Introduce vcpu configs We already break register lists into sublists that get selected based on vcpu config. However, since we only had two configs (vregs and sve), we didn't structure the code very well to manage them. Restructure it now to more cleanly handle register sublists that are dependent on the vcpu config. This patch has no intended functional change (except for the vcpu config name now being prepended to all output). Signed-off-by: Andrew Jones Reviewed-by: Ricardo Koller Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210531103344.29325-2-drjones@redhat.com commit c886fa3cf6ffbe13006053ceb27c93d41928de30 Author: Christoph Hellwig Date: Tue Jun 22 09:43:56 2021 +0200 configfs: simplify configfs_release_bin_file Remove the clearing of various fields just before freeing the buffer structure. Signed-off-by: Christoph Hellwig commit 3c252b087de08d3cb32468b54a158bd7ad0ae2f7 Author: Chung-Chiang Cheng Date: Fri Jun 18 15:59:25 2021 +0800 configfs: fix memleak in configfs_release_bin_file When reading binary attributes in progress, buffer->bin_buffer is setup in configfs_read_bin_file() but never freed. Fixes: 03607ace807b4 ("configfs: implement binary attributes") Signed-off-by: Chung-Chiang Cheng [hch: move the vfree rather than duplicating it] Signed-off-by: Christoph Hellwig commit a801fcfeef96702fa3f9b22ad56c5eb1989d9221 Author: Zhihao Cheng Date: Fri Jun 18 16:11:03 2021 +0800 ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode xfstests-generic/476 reports a warning message as below: WARNING: CPU: 2 PID: 30347 at fs/inode.c:361 inc_nlink+0x52/0x70 Call Trace: do_rename+0x502/0xd40 [ubifs] ubifs_rename+0x8b/0x180 [ubifs] vfs_rename+0x476/0x1080 do_renameat2+0x67c/0x7b0 __x64_sys_renameat2+0x6e/0x90 do_syscall_64+0x66/0xe0 entry_SYSCALL_64_after_hwframe+0x44/0xae Following race case can cause this: rename_whiteout(Thread 1) wb_workfn(Thread 2) ubifs_rename do_rename __writeback_single_inode spin_lock(&inode->i_lock) whiteout->i_state |= I_LINKABLE inode->i_state &= ~dirty; ---- How race happens on i_state: (tmp = whiteout->i_state | I_LINKABLE) (tmp = inode->i_state & ~dirty) (whiteout->i_state = tmp) (inode->i_state = tmp) ---- spin_unlock(&inode->i_lock) inc_nlink(whiteout) WARN_ON(!(inode->i_state & I_LINKABLE)) !!! Fix to add i_lock to avoid i_state update race condition. Fixes: 9e0a1fff8db56ea ("ubifs: Implement RENAME_WHITEOUT") Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 07c32de44e67882e66f4f81f78d2a16bb72337e4 Author: Zheng Yongjun Date: Fri Jun 4 09:45:56 2021 +0800 ubifs: Fix spelling mistakes Fix some spelling mistakes in comments: withoug ==> without numer ==> number aswell ==> as well referes ==> refers childs ==> children unnecesarry ==> unnecessary Signed-off-by: Zheng Yongjun Reviewed-by: Alexander Dahl Signed-off-by: Richard Weinberger commit c4e0cd4e0c16544ff0afecf07a5fe17de6077233 Author: Zheng Yongjun Date: Fri Jun 4 09:46:17 2021 +0800 virtiofs: Fix spelling mistakes Fix some spelling mistakes in comments: refernce ==> reference happnes ==> happens threhold ==> threshold splitted ==> split mached ==> matched Signed-off-by: Zheng Yongjun Signed-off-by: Miklos Szeredi commit 6c88632be3827899953d9bc2260da378394007b7 Author: Wu Bo Date: Tue May 25 15:40:47 2021 +0800 fuse: use DIV_ROUND_UP helper macro for calculations Replace open coded divisor calculations with the DIV_ROUND_UP kernel macro for better readability. Signed-off-by: Wu Bo Signed-off-by: Miklos Szeredi commit 15db16837a35d8007cb8563358787412213db25e Author: Amir Goldstein Date: Mon Jun 21 14:03:53 2021 +0300 fuse: fix illegal access to inode with reused nodeid Server responds to LOOKUP and other ops (READDIRPLUS/CREATE/MKNOD/...) with ourarg containing nodeid and generation. If a fuse inode is found in inode cache with the same nodeid but different generation, the existing fuse inode should be unhashed and marked "bad" and a new inode with the new generation should be hashed instead. This can happen, for example, with passhrough fuse filesystem that returns the real filesystem ino/generation on lookup and where real inode numbers can get recycled due to real files being unlinked not via the fuse passthrough filesystem. With current code, this situation will not be detected and an old fuse dentry that used to point to an older generation real inode, can be used to access a completely new inode, which should be accessed only via the new dentry. Note that because the FORGET message carries the nodeid w/o generation, the server should wait to get FORGET counts for the nlookup counts of the old and reused inodes combined, before it can free the resources associated to that nodeid. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 6b1bdb56b17c25f640261f3b18030cb0a21d7878 Author: Richard W.M. Jones Date: Wed May 12 17:18:48 2021 +0100 fuse: allow fallocate(FALLOC_FL_ZERO_RANGE) The current fuse module filters out fallocate(FALLOC_FL_ZERO_RANGE) returning -EOPNOTSUPP. libnbd's nbdfuse would like to translate FALLOC_FL_ZERO_RANGE requests into the NBD command NBD_CMD_WRITE_ZEROES which allows NBD servers that support it to do zeroing efficiently. This commit treats this flag exactly like FALLOC_FL_PUNCH_HOLE. A way to test this, requiring fuse >= 3, nbdkit >= 1.8 and the latest nbdfuse from https://gitlab.com/nbdkit/libnbd/-/tree/master/fuse is to create a file containing some data and "mirror" it to a fuse file: $ dd if=/dev/urandom of=disk.img bs=1M count=1 $ nbdkit file disk.img $ touch mirror.img $ nbdfuse mirror.img nbd://localhost & (mirror.img -> nbdfuse -> NBD over loopback -> nbdkit -> disk.img) You can then run commands such as: $ fallocate -z -o 1024 -l 1024 mirror.img and check that the content of the original file ("disk.img") stays synchronized. To show NBD commands, export LIBNBD_DEBUG=1 before running nbdfuse. To clean up: $ fusermount3 -u mirror.img $ killall nbdkit Signed-off-by: Richard W.M. Jones Signed-off-by: Miklos Szeredi commit 1b539917374d26fb64395eeb5d4baebd7ad38f61 Author: Greg Kurz Date: Fri Jun 4 18:11:56 2021 +0200 fuse: Make fuse_fill_super_submount() static This function used to be called from fuse_dentry_automount(). This code was moved to fuse_get_tree_submount() in the same file since then. It is unlikely there will ever be another user. No need to be extern in this case. Signed-off-by: Greg Kurz Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit 29e0e4df9d2bd1f7dd3c7293bf49e08a9d27e811 Author: Greg Kurz Date: Fri Jun 4 18:11:55 2021 +0200 fuse: Switch to fc_mount() for submounts fc_mount() already handles the vfs_get_tree(), sb->s_umount unlocking and vfs_create_mount() sequence. Using it greatly simplifies fuse_dentry_automount(). Signed-off-by: Greg Kurz Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit 266eb3f2fae488fd19ee5acfc01ba9d483715699 Author: Greg Kurz Date: Fri Jun 4 18:11:54 2021 +0200 fuse: Call vfs_get_tree() for submounts We recently fixed an infinite loop by setting the SB_BORN flag on submounts along with the write barrier needed by super_cache_count(). This is the job of vfs_get_tree() and FUSE shouldn't have to care about the barrier at all. Split out some code from fuse_dentry_automount() to the dedicated fuse_get_tree_submount() handler for submounts and call vfs_get_tree(). Signed-off-by: Greg Kurz Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit fe0a7bd81bfefe5eb73bce55682586c6c266e21e Author: Greg Kurz Date: Fri Jun 4 18:11:53 2021 +0200 fuse: add dedicated filesystem context ops for submounts The creation of a submount is open-coded in fuse_dentry_automount(). This brings a lot of complexity and we recently had to fix bugs because we weren't setting SB_BORN or because we were unlocking sb->s_umount before sb was fully configured. Most of these could have been avoided by using the mount API instead of open-coding. Basically, this means coming up with a proper ->get_tree() implementation for submounts and call vfs_get_tree(), or better fc_mount(). The creation of the superblock for submounts is quite different from the root mount. Especially, it doesn't require to allocate a FUSE filesystem context, nor to parse parameters. Introduce a dedicated context ops for submounts to make this clear. This is just a placeholder for now, fuse_get_tree_submount() will be populated in a subsequent patch. Only visible change is that we stop allocating/freeing a useless FUSE filesystem context with submounts. Signed-off-by: Greg Kurz Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit 2d82ab251ef0f6e7716279b04e9b5a01a86ca530 Author: Greg Kurz Date: Thu May 20 17:46:54 2021 +0200 virtiofs: propagate sync() to file server Even if POSIX doesn't mandate it, linux users legitimately expect sync() to flush all data and metadata to physical storage when it is located on the same system. This isn't happening with virtiofs though: sync() inside the guest returns right away even though data still needs to be flushed from the host page cache. This is easily demonstrated by doing the following in the guest: $ dd if=/dev/zero of=/mnt/foo bs=1M count=5K ; strace -T -e sync sync 5120+0 records in 5120+0 records out 5368709120 bytes (5.4 GB, 5.0 GiB) copied, 5.22224 s, 1.0 GB/s sync() = 0 <0.024068> and start the following in the host when the 'dd' command completes in the guest: $ strace -T -e fsync /usr/bin/sync virtiofs/foo fsync(3) = 0 <10.371640> There are no good reasons not to honor the expected behavior of sync() actually: it gives an unrealistic impression that virtiofs is super fast and that data has safely landed on HW, which isn't the case obviously. Implement a ->sync_fs() superblock operation that sends a new FUSE_SYNCFS request type for this purpose. Provision a 64-bit placeholder for possible future extensions. Since the file server cannot handle the wait == 0 case, we skip it to avoid a gratuitous roundtrip. Note that this is per-superblock: a FUSE_SYNCFS is send for the root mount and for each submount. Like with FUSE_FSYNC and FUSE_FSYNCDIR, lack of support for FUSE_SYNCFS in the file server is treated as permanent success. This ensures compatibility with older file servers: the client will get the current behavior of sync() not being propagated to the file server. Note that such an operation allows the file server to DoS sync(). Since a typical FUSE file server is an untrusted piece of software running in userspace, this is disabled by default. Only enable it with virtiofs for now since virtiofsd is supposedly trusted by the guest kernel. Reported-by: Robert Krawitz Signed-off-by: Greg Kurz Signed-off-by: Miklos Szeredi commit 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 Author: Miklos Szeredi Date: Tue Jun 22 09:15:35 2021 +0200 fuse: reject internal errno Don't allow userspace to report errors that could be kernel-internal. Reported-by: Anatoly Trosinenko Fixes: 334f485df85a ("[PATCH] FUSE - device functions") Cc: # v2.6.14 Signed-off-by: Miklos Szeredi commit 80ef08670d4c28a06a3de954bd350368780bcfef Author: Miklos Szeredi Date: Tue Jun 22 09:15:35 2021 +0200 fuse: check connected before queueing on fpq->io A request could end up on the fpq->io list after fuse_abort_conn() has reset fpq->connected and aborted requests on that list: Thread-1 Thread-2 ======== ======== ->fuse_simple_request() ->shutdown ->__fuse_request_send() ->queue_request() ->fuse_abort_conn() ->fuse_dev_do_read() ->acquire(fpq->lock) ->wait_for(fpq->lock) ->set err to all req's in fpq->io ->release(fpq->lock) ->acquire(fpq->lock) ->add req to fpq->io After the userspace copy is done the request will be ended, but req->out.h.error will remain uninitialized. Also the copy might block despite being already aborted. Fix both issues by not allowing the request to be queued on the fpq->io list after fuse_abort_conn() has processed this list. Reported-by: Pradeep P V K Fixes: fd22d62ed0c3 ("fuse: no fc->lock for iqueue parts") Cc: # v4.2 Signed-off-by: Miklos Szeredi commit dd72fadf2186fc8a6018f97fe72f4d5ca05df440 Author: Ayush Sawal Date: Tue Jun 22 09:25:31 2021 +0530 xfrm: Fix xfrm offload fallback fail case In case of xfrm offload, if xdo_dev_state_add() of driver returns -EOPNOTSUPP, xfrm offload fallback is failed. In xfrm state_add() both xso->dev and xso->real_dev are initialized to dev and when err(-EOPNOTSUPP) is returned only xso->dev is set to null. So in this scenario the condition in func validate_xmit_xfrm(), if ((x->xso.dev != dev) && (x->xso.real_dev == dev)) return skb; returns true, due to which skb is returned without calling esp_xmit() below which has fallback code. Hence the CRYPTO_FALLBACK is failing. So fixing this with by keeping x->xso.real_dev as NULL when err is returned in func xfrm_dev_state_add(). Fixes: bdfd2d1fa79a ("bonding/xfrm: use real_dev instead of slave_dev") Signed-off-by: Ayush Sawal Signed-off-by: Steffen Klassert commit 9a1ac95a59d0724ffac2181a98b232c3f94f49f5 Author: Aharon Landau Date: Wed Jun 16 10:57:38 2021 +0300 RDMA/mlx5: Refactor get_ts_format functions to simplify code QPC, SQC and RQC timestamp formats and capabilities are always equal because they represent general hardware support. So instead of code duplication, let's merge them into general enum and logic. Signed-off-by: Aharon Landau Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky commit 2b4bbc6231d789f58676d2ccc42177df163e1c4a Author: Hamza Mahfooz Date: Tue May 18 08:54:43 2021 -0400 dma-debug: report -EEXIST errors in add_dma_entry Since, overlapping mappings are not supported by the DMA API we should report an error if active_cacheline_insert returns -EEXIST. Suggested-by: Dan Williams Signed-off-by: Hamza Mahfooz Signed-off-by: Christoph Hellwig commit bab1622350699dc209db4f50d9ab99e6f6465334 Author: Zhen Lei Date: Tue Jun 8 15:52:19 2021 +0800 dma-mapping: remove a trailing space Signed-off-by: Zhen Lei Signed-off-by: Christoph Hellwig commit fbcff33d4204cbcb8e60faa3465a2156fdda398a Author: Kees Cook Date: Mon Jun 21 14:44:46 2021 -0700 cifs: Avoid field over-reading memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring fields. Instead of using memcpy to read across multiple struct members, just perform per-member assignments as already done for other members. Signed-off-by: Kees Cook Signed-off-by: Steve French commit 5b32dd281ee0a269f39ecf6b48f0cd3f37264842 Author: Colin Ian King Date: Wed Jun 16 17:29:13 2021 +0100 ipmi: kcs_bmc_aspeed: Fix less than zero comparison of a unsigned int The comparisons of the unsigned int hw_type to less than zero always false because it is unsigned. Fix this by using an int for the assignment and less than zero check. Addresses-Coverity: ("Unsigned compared against 0") Fixes: 9d2df9a0ad80 ("ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration") Signed-off-by: Colin Ian King Message-Id: <20210616162913.15259-1-colin.king@canonical.com> Signed-off-by: Corey Minyard commit d0ec795c8c275ceca2076861f7fe3cc5f18da348 Author: Andrew Jeffery Date: Tue Jun 8 20:17:57 2021 +0930 ipmi: kcs_bmc_aspeed: Optionally apply status address Some Aspeed KCS devices can derive the status register address from the address of the data register. As such, the address of the status register can be implicit in the configuration if desired. On the other hand, sometimes address schemes might be requested that are incompatible with the default addressing scheme. Allow these requests where possible if the devicetree specifies the status register address. Signed-off-by: Andrew Jeffery Reviewed-by: Chia-Wei Wang Message-Id: <20210608104757.582199-17-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 78ff5a1666cd4a1129ca53dad5c68700fe63ab6a Author: Andrew Jeffery Date: Tue Jun 8 20:17:56 2021 +0930 ipmi: kcs_bmc_aspeed: Fix IBFIE typo from datasheet Input Buffer Full Interrupt Enable (IBFIE) is typoed as IBFIF for some registers in the datasheet. Fix the driver to use the sensible acronym. Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-16-andrew@aj.id.au> Signed-off-by: Corey Minyard commit a5e4236d560579a20e2bc870f6e6f32e4e7c0354 Author: Andrew Jeffery Date: Tue Jun 8 20:17:55 2021 +0930 ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration Apply the SerIRQ ID and level/sense behaviours from the devicetree if provided. Signed-off-by: Andrew Jeffery Message-Id: <20210608104757.582199-15-andrew@aj.id.au> Signed-off-by: Corey Minyard commit a7fd43d95054fe03cac3878538dcf12caa854889 Author: Andrew Jeffery Date: Tue Jun 8 20:17:54 2021 +0930 dt-bindings: ipmi: Add optional SerIRQ property to ASPEED KCS devices Allocating IO and IRQ resources to LPC devices is in-theory an operation for the host, however ASPEED don't appear to expose this capability outside the BMC (e.g. SuperIO). Instead, we are left with BMC-internal registers for managing these resources, so introduce a devicetree property for KCS devices to describe SerIRQ properties. Signed-off-by: Andrew Jeffery Reviewed-by: Rob Herring Message-Id: <20210608104757.582199-14-andrew@aj.id.au> Signed-off-by: Corey Minyard commit e880275ccfa120bf6235180ca76f01271b7b97ec Author: Andrew Jeffery Date: Tue Jun 8 20:17:53 2021 +0930 dt-bindings: ipmi: Convert ASPEED KCS binding to schema Given the deprecated binding, improve the ability to detect issues in the platform devicetrees. Further, a subsequent patch will introduce a new interrupts property for specifying SerIRQ behaviour, so convert before we do any further additions. Signed-off-by: Andrew Jeffery Reviewed-by: Rob Herring Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-13-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 3a3d2f6a4c64b9e709edc13b685ce46c8629060e Author: Andrew Jeffery Date: Tue Jun 8 20:17:52 2021 +0930 ipmi: kcs_bmc: Add serio adaptor kcs_bmc_serio acts as a bridge between the KCS drivers in the IPMI subsystem and the existing userspace interfaces available through the serio subsystem. This is useful when userspace would like to make use of the BMC KCS devices for purposes that aren't IPMI. Signed-off-by: Andrew Jeffery Message-Id: <20210608104757.582199-12-andrew@aj.id.au> Reviewed-by: Zev Weiss Signed-off-by: Corey Minyard commit fb6379f524ff56314fa857bb5c84bd22eee41eb7 Author: Andrew Jeffery Date: Tue Jun 8 20:17:51 2021 +0930 ipmi: kcs_bmc: Enable IBF on open This way devices don't get delivered IRQs when no-one is interested. Signed-off-by: Andrew Jeffery Message-Id: <20210608104757.582199-11-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 28651e6c4237f4aee5e0744ce37d3a50e7b1f36b Author: Andrew Jeffery Date: Tue Jun 8 20:17:50 2021 +0930 ipmi: kcs_bmc: Allow clients to control KCS IRQ state Add a mechanism for controlling whether the client associated with a KCS device will receive Input Buffer Full (IBF) and Output Buffer Empty (OBE) events. This enables an abstract implementation of poll() for KCS devices. A wart in the implementation is that the ASPEED KCS devices don't support an OBE interrupt for the BMC. Instead we pretend it has one by polling the status register waiting for the Output Buffer Full (OBF) bit to clear, and generating an event when OBE is observed. Cc: CS20 KWLiu Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-10-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 7cafff991e32d4b97251982ab0665601b65f2736 Author: Andrew Jeffery Date: Tue Jun 8 20:17:49 2021 +0930 ipmi: kcs_bmc: Decouple the IPMI chardev from the core Now that we have untangled the data-structures, split the userspace interface out into its own module. Userspace interfaces and drivers are registered to the KCS BMC core to support arbitrary binding of either. Signed-off-by: Andrew Jeffery Message-Id: <20210608104757.582199-9-andrew@aj.id.au> Reviewed-by: Zev Weiss Signed-off-by: Corey Minyard commit d4e7ac68f771addc19352121706d8584eb0166cd Author: Andrew Jeffery Date: Tue Jun 8 20:17:48 2021 +0930 ipmi: kcs_bmc: Strip private client data from struct kcs_bmc Move all client-private data out of `struct kcs_bmc` into the KCS client implementation. With this change the KCS BMC core code now only concerns itself with abstract `struct kcs_bmc` and `struct kcs_bmc_client` types, achieving expected separation of concerns. Further, the change clears the path for implementation of alternative userspace interfaces. The chardev data-structures are rearranged in the same manner applied to the KCS device driver data-structures in an earlier patch - `struct kcs_bmc_client` is embedded in the client's private data and we exploit container_of() to translate as required. Finally, now that it is free of client data, `struct kcs_bmc` is renamed to `struct kcs_bmc_device` to contrast `struct kcs_bmc_client`. Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-8-andrew@aj.id.au> Signed-off-by: Corey Minyard commit faae6e391eda73a5b9870c78349064282a625bfa Author: Andrew Jeffery Date: Tue Jun 8 20:17:47 2021 +0930 ipmi: kcs_bmc: Split headers into device and client Strengthen the distinction between code that abstracts the implementation of the KCS behaviours (device drivers) and code that exploits KCS behaviours (clients). Neither needs to know about the APIs required by the other, so provide separate headers. Signed-off-by: Andrew Jeffery Message-Id: <20210608104757.582199-7-andrew@aj.id.au> Reviewed-by: Zev Weiss Signed-off-by: Corey Minyard commit d7096970075ef47c9906fd241cc4939cc11ddd01 Author: Andrew Jeffery Date: Tue Jun 8 20:17:46 2021 +0930 ipmi: kcs_bmc: Turn the driver data-structures inside-out Make the KCS device drivers responsible for allocating their own memory. Until now the private data for the device driver was allocated internal to the private data for the chardev interface. This coupling required the slightly awkward API of passing through the struct size for the driver private data to the chardev constructor, and then retrieving a pointer to the driver private data from the allocated chardev memory. In addition to being awkward, the arrangement prevents the implementation of alternative userspace interfaces as the device driver private data is not independent. Peel a layer off the onion and turn the data-structures inside out by exploiting container_of() and embedding `struct kcs_device` in the driver private data. Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-6-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 55ab48b4e356212fbe084ca110db73bb9a6e7058 Author: Andrew Jeffery Date: Tue Jun 8 20:17:45 2021 +0930 ipmi: kcs_bmc: Split out kcs_bmc_cdev_ipmi Take steps towards defining a coherent API to separate the KCS device drivers from the userspace interface. Decreasing the coupling will improve the separation of concerns and enable the introduction of alternative userspace interfaces. For now, simply split the chardev logic out to a separate file. The code continues to build into the same module. Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-5-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 961f7a3af9a9e60bbd2f95ae2d3e9e5e6f41fe6a Author: Andrew Jeffery Date: Tue Jun 8 20:17:44 2021 +0930 ipmi: kcs_bmc: Rename {read,write}_{status,data}() functions Rename the functions in preparation for separating the IPMI chardev out from the KCS BMC core. Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-4-andrew@aj.id.au> Signed-off-by: Corey Minyard commit ec6f0cf17a639743e622d4156b0a5009263fd479 Author: Andrew Jeffery Date: Tue Jun 8 20:17:43 2021 +0930 ipmi: kcs_bmc: Make status update atomic Enable more efficient implementation of read-modify-write sequences. Both device drivers for the KCS BMC stack use regmaps. The new callback allows us to exploit regmap_update_bits(). Signed-off-by: Andrew Jeffery Reviewed-by: Zev Weiss Message-Id: <20210608104757.582199-3-andrew@aj.id.au> Signed-off-by: Corey Minyard commit 78ca0c0549803ab0f5ecab43e295111b7ccdc7f2 Author: Andrew Jeffery Date: Tue Jun 8 20:17:42 2021 +0930 ipmi: kcs_bmc_aspeed: Use of match data to extract KCS properties Unpack and remove the aspeed_kcs_probe_of_v[12]() functions to aid rearranging how the private device-driver memory is allocated. Signed-off-by: Andrew Jeffery Message-Id: <20210608104757.582199-2-andrew@aj.id.au> Reviewed-by: Zev Weiss Signed-off-by: Corey Minyard commit a8f3522c9a1f4a31e93b17f2b5310a2b615f5581 Author: Darrick J. Wong Date: Mon Jun 21 17:39:09 2021 -0700 xfs: fix endianness issue in xfs_ag_shrink_space The AGI buffer is in big-endian format, so we must convert the endianness to CPU format to do any comparisons. Fixes: 46141dc891f7 ("xfs: introduce xfs_ag_shrink_space()") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Gao Xiang commit 20ec0a6d6016aa28b9b3299be18baef1a0f91cd2 Author: Xiao Yang Date: Mon Jun 21 15:14:56 2021 +0800 RDMA/rxe: Don't overwrite errno from ib_umem_get() rxe_mr_init_user() always returns the fixed -EINVAL when ib_umem_get() fails so it's hard for user to know which actual error happens in ib_umem_get(). For example, ib_umem_get() will return -EOPNOTSUPP when trying to pin pages on a DAX file. Return actual error as mlx4/mlx5 does. Link: https://lore.kernel.org/r/20210621071456.4259-1-ice_yangxiao@163.com Signed-off-by: Xiao Yang Signed-off-by: Jason Gunthorpe commit 4bf5cc63192b9f1adf44525c3da06056b4cf7925 Author: Kees Cook Date: Wed Jun 16 13:37:44 2021 -0700 IB/mlx4: Avoid field-overflowing memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally writing across neighboring array fields. Use the ether_addr_copy() helper instead, as already done for smac. Link: https://lore.kernel.org/r/20210616203744.1248551-1-keescook@chromium.org Signed-off-by: Kees Cook Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7404bddeb43902725c6b65421032f090ccea496b Author: Jack Wang Date: Mon Jun 21 07:53:40 2021 +0200 rnbd/rtrs-clt: Query and use max_segments from rtrs-clt. With fast memory registration on write request, rnbd-clt can do bigger IO without split. rnbd-clt now can query rtrs-clt to get the max_segments, instead of using BMAX_SEGMENTS. BMAX_SEGMENTS is not longer needed, so remove it. Link: https://lore.kernel.org/r/20210621055340.11789-6-jinpu.wang@ionos.com Cc: Jens Axboe Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit 6fc45596506b7a6d8c734d3f1b435318c7e7f678 Author: Jack Wang Date: Mon Jun 21 07:53:39 2021 +0200 RDMA/rtrs-clt: Raise MAX_SEGMENTS As we can do fast memory registration on write, we can increase the max_segments, default to 512K. Link: https://lore.kernel.org/r/20210621055340.11789-5-jinpu.wang@ionos.com Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit df1885a755784da3ef285f36d9230c1d090ef186 Author: Jack Wang Date: Mon Jun 21 07:53:38 2021 +0200 RDMA/rtrs_clt: Alloc less memory with write path fast memory registration With write path fast memory registration, we need less memory for each request. With fast memory registration, we can reduce max_send_sge to save memory usage. Also convert the kmalloc_array to kcalloc. Link: https://lore.kernel.org/r/20210621055340.11789-4-jinpu.wang@ionos.com Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit 2ece9ec62e5b276b4635d391c844b2ffcd10bbf1 Author: Jack Wang Date: Mon Jun 21 07:53:37 2021 +0200 RDMA/rtrs-clt: Write path fast memory registration With fast memory registration in write path, we can reduce the memory consumption by using less max_send_sge, support IO bigger than 116 KB (29 segments * 4 KB) without splitting, and it also make the IO path more symmetric. To avoid some times MR reg failed, waiting for the invalidation to finish before the new mr reg. Introduce a refcount, only finish the request when both local invalidation and io reply are there. Link: https://lore.kernel.org/r/20210621055340.11789-3-jinpu.wang@ionos.com Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Signed-off-by: Dima Stepanov Signed-off-by: Jason Gunthorpe commit 630e438f040c3838206b5e6717b9b5c29edf3548 Author: Jack Wang Date: Mon Jun 21 07:53:36 2021 +0200 RDMA/rtrs: Introduce head/tail wr Introduce tail wr, we can send as the last wr, we want to send the local invalidate wr after rdma wr in later patch. While at it, also fix coding style issue. Link: https://lore.kernel.org/r/20210621055340.11789-2-jinpu.wang@ionos.com Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit 879740517daba2a1d3229f8a54fc2b1cb78a4f07 Author: Devesh Sharma Date: Thu Jun 17 01:58:17 2021 +0530 RDMA/bnxt_re: Update ABI to pass wqe-mode to user space Changing ucontext ABI response structure to pass wqe_mode to user library. A flag in comp_mask has been set to indicate presence of wqe_mode. Moved wqe-mode ABI to uapi/rdma/bnxt_re-abi.h Link: https://lore.kernel.org/r/20210616202817.1185276-1-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 84dcd8c7eab8bc29a6eb402b535651171a9a9d54 Author: Anand Khoje Date: Wed Jun 16 21:15:08 2021 +0530 IB/core: Shuffle locks in ib_port_data to save memory pahole shows two 4-byte holes in struct ib_port_data after pkey_list_lock and netdev_lock respectively. Shuffling the netdev_lock to be after pkey_list_lock, this shaves off eight bytes from the struct. Link: https://lore.kernel.org/r/20210616154509.1047-3-anand.a.khoje@oracle.com Suggested-by: Haakon Bugge Signed-off-by: Anand Khoje Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c5f8f2c5e5bfd4fd5fc5c413051ad14b7873b1fd Author: Anand Khoje Date: Wed Jun 16 21:15:07 2021 +0530 IB/core: Removed port validity check from ib_get_cached_subnet_prefix Removed port validity check from ib_get_cached_subnet_prefix() as this check is not needed because "port_num" is valid. Link: https://lore.kernel.org/r/20210616154509.1047-2-anand.a.khoje@oracle.com Suggested-by: Leon Romanovsky Signed-off-by: Anand Khoje Signed-off-by: Haakon Bugge Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 14de023dc0f752acad89e6932a96bdded479c60c Merge: 6efb943b8616e 2adafc0512625 Author: Stephen Boyd Date: Mon Jun 21 16:43:07 2021 -0700 Merge tag 'v5.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: - Reduce memory footprint of PLL rate tables - A fix for the newly added rk3568 clk driver - exported clock for the newly added video decoder * tag 'v5.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: export ACLK_VCODEC for RK3036 clk: rockchip: fix rk3568 cpll clk gate bits clk: rockchip: Optimize PLL table memory usage commit 8e5f17e6c2fd1bbe355ba53318f73e3e87fb3a1b Merge: 6efb943b8616e c586f53ae159c Author: Stephen Boyd Date: Mon Jun 21 16:39:34 2021 -0700 Merge tag 'clk-imx-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Remove audio ipg clock from i.MX8MP - Fix naming typo of clock compatible string - Remove deprecated legacy clock binding for SCU clock driver - Use common clk-imx8qxp for both i.MX8QXP and i.MX8QM - Add multiple clocks to clk-imx8qxp driver (enet, hdmi, lcdif, audio, parallel interface) - Add dedicated clock ops for paralel interface - Different fixes for clocks controlled by ATF - Fix different issues related to parallel interface clocks - Add A53/A72 frequency scaling support clk-scu driver - Add special case for DCSS clock on suspend for clk-scu driver - Add parent save/restore on suspend/resume to clk-scu driver - Skip runtime PM enablement for CPU clocks in clk-scu driver - Remove the sys1_pll/sys2_pll clock gates for i.MX8MQ and their bindings * tag 'clk-imx-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx8mq: remove SYS PLL 1/2 clock gates clk: imx: scu: Do not enable runtime PM for CPU clks clk: imx: scu: add parent save and restore clk: imx: scu: Only save DC SS clock using non-cached clock rate clk: imx: scu: Add A72 frequency scaling support clk: imx: scu: Add A53 frequency scaling support clk: imx: scu: bypass pi_pll enable status restore clk: imx: scu: detach pd if can't power up clk: imx: scu: bypass cpu clock save and restore clk: imx: scu: add parallel port clock ops clk: imx: scu: add more scu clocks clk: imx: scu: add enet rgmii gpr clocks clk: imx8qm: add clock valid resource checking clk: imx8qxp: add clock valid checking mechnism clk: imx: scu: add gpr clocks support clk: imx: scu: remove legacy scu clock binding support dt-bindings: arm: imx: scu: drop deprecated legacy clock binding dt-bindings: arm: imx: scu: fix naming typo of clk compatible string clk: imx: Remove the audio ipg clock from imx8mp commit 3f4e557db50805c5033ee486e7e028ba82e66f1b Merge: 6efb943b8616e f13570e7e830c Author: Stephen Boyd Date: Mon Jun 21 16:36:46 2021 -0700 Merge tag 'for-5.14-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-nvidia Pull Tegra clk driver updates from Thierry Reding: This contains a few fixes across the board and adds stubs to allow certain drivers to be compile-tested. One other notable change added here is that clock enabling no longer deasserts the reset. Drivers are now supposed to do that explicitly because doing it implicitly can get in the way of certain power-up sequences. * tag 'for-5.14-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: tegra124-emc: Fix clock imbalance in emc_set_timing() clk: tegra: Add stubs needed for compile-testing clk: tegra: Don't deassert reset on enabling clocks clk: tegra: Mark external clocks as not having reset control clk: tegra: cclk: Handle thermal DIV2 CPU frequency throttling clk: tegra: Don't allow zero clock rate for PLLs clk: tegra: Halve SCLK rate on Tegra20 clk: tegra: Ensure that PLLU configuration is applied properly clk: tegra: Fix refcounting of gate clocks clk: tegra30: Use 300MHz for video decoder by default commit ee7fe68769ec862886d30528c057cfb7d013e692 Merge: 6efb943b8616e 47e4dc4e63e1d Author: Stephen Boyd Date: Mon Jun 21 16:33:56 2021 -0700 Merge tag 'sunxi-clk-fixes-for-5.13-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull one Allwinner clk driver update from Maxime Ripard: - One patch to fix a divider on the v3s Audio PLL * tag 'sunxi-clk-fixes-for-5.13-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: v3s: fix incorrect postdivider on pll-audio commit bf194997c7319ba968d3f7c47258b4be5f01f81e Author: Leon Romanovsky Date: Wed Jun 16 09:09:47 2021 +0300 RDMA: Fix kernel-doc warnings about wrong comment Compilation with W=1 produces warnings similar to the below. drivers/infiniband/ulp/ipoib/ipoib_main.c:320: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst All such occurrences were found with the following one line git grep -A 1 "\/\*\*" drivers/infiniband/ Link: https://lore.kernel.org/r/e57d5f4ddd08b7a19934635b44d6d632841b9ba7.1623823612.git.leonro@nvidia.com Reviewed-by: Jack Wang #rtrs Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7f8a37a4b69783a1b52795d92dabc0df0e84804c Merge: 6435c49913949 17f0ff3d49ff1 Author: Stephen Boyd Date: Mon Jun 21 16:22:53 2021 -0700 Merge tag 'renesas-clk-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add support for the new RZ/G2L SoC * tag 'renesas-clk-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: Add support for R9A07G044 SoC clk: renesas: Add CPG core wrapper for RZ/G2L SoC dt-bindings: clock: renesas: Document RZ/G2L SoC CPG driver dt-bindings: clock: Add r9a07g044 CPG Clock Definitions commit 36e9534dfcb5b09b919d2831d6a19aa3856b95a1 Author: Alex Bee Date: Thu May 27 17:44:55 2021 +0200 ARM: dts: rockchip: add vpu and vdec node for RK322x The VPU and the VDEC IP block of RK322x are the same as RK3399 has and the drivers can be used as-is. Add the respective nodes to the device tree. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210527154455.358869-13-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit db3fc8fa0fcfa481cd8087c2ee068d1d1988c3a2 Author: Alex Bee Date: Thu May 27 17:44:54 2021 +0200 ARM: dts: rockchip: add vpu nodes for RK3066 and RK3188 Add the vpu node to the common rk3xxx.dtsi and only the powerdomain property to the SoC specific device trees. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210527154455.358869-12-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 9d34d4aa896d00d398d799caa839a1494ba7c018 Author: Alex Bee Date: Thu May 27 17:44:53 2021 +0200 ARM: dts: rockchip: add vpu node for RK3036 Add the vpu node and the node for the attached iommu for RK3036. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210527154455.358869-11-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit ef2c3ddaa4ed0b1d9de34378d08d3e24a3fec7ac Author: Kees Cook Date: Mon Jun 21 14:35:09 2021 -0700 ibmvnic: Use strscpy() instead of strncpy() Since these strings are expected to be NUL-terminated and the buffers are exactly sized (in vnic_client_data_len()) with no padding, strncpy() can be safely replaced with strscpy() here, as strncpy() on NUL-terminated string is considered deprecated[1]. This has the side-effect of silencing a -Warray-bounds warning due to the compiler being confused about the vlcd incrementing: In file included from ./include/linux/string.h:253, from ./include/linux/bitmap.h:10, from ./include/linux/cpumask.h:12, from ./include/linux/mm_types_task.h:14, from ./include/linux/mm_types.h:5, from ./include/linux/buildid.h:5, from ./include/linux/module.h:14, from drivers/net/ethernet/ibm/ibmvnic.c:35: In function '__fortify_strncpy', inlined from 'vnic_add_client_data' at drivers/net/ethernet/ibm/ibmvnic.c:3919:2: ./include/linux/fortify-string.h:39:30: warning: '__builtin_strncpy' offset 12 from the object at 'v lcd' is out of the bounds of referenced subobject 'name' with type 'char[]' at offset 12 [-Warray-bo unds] 39 | #define __underlying_strncpy __builtin_strncpy | ^ ./include/linux/fortify-string.h:51:9: note: in expansion of macro '__underlying_strncpy' 51 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/ibm/ibmvnic.c: In function 'vnic_add_client_data': drivers/net/ethernet/ibm/ibmvnic.c:3883:7: note: subobject 'name' declared here 3883 | char name[]; | ^~~~ [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Cc: Dany Madden Cc: Sukadev Bhattiprolu Cc: Thomas Falcon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit a3fa449ffcf5bcf9c3dddf62c11599cdc79ef54a Author: Guillaume Nault Date: Mon Jun 21 22:08:49 2021 +0200 net: handle ARPHRD_IP6GRE in dev_is_mac_header_xmit() Similar to commit 3b707c3008ca ("net: dev_is_mac_header_xmit() true for ARPHRD_RAWIP"), add ARPHRD_IP6GRE to dev_is_mac_header_xmit(), to make ip6gre compatible with act_mirred and __bpf_redirect(). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 0cd58e5c53babb9237b741dbef711f0a9eb6d3fd Author: Eric Dumazet Date: Mon Jun 21 10:54:49 2021 -0700 pkt_sched: sch_qfq: fix qfq_change_class() error path If qfq_change_class() is unable to allocate memory for qfq_aggregate, it frees the class that has been inserted in the class hash table, but does not unhash it. Defer the insertion after the problematic allocation. BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:884 [inline] BUG: KASAN: use-after-free in qdisc_class_hash_insert+0x200/0x210 net/sched/sch_api.c:731 Write of size 8 at addr ffff88814a534f10 by task syz-executor.4/31478 CPU: 0 PID: 31478 Comm: syz-executor.4 Not tainted 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 hlist_add_head include/linux/list.h:884 [inline] qdisc_class_hash_insert+0x200/0x210 net/sched/sch_api.c:731 qfq_change_class+0x96c/0x1990 net/sched/sch_qfq.c:489 tc_ctl_tclass+0x514/0xe50 net/sched/sch_api.c:2113 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5564 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdc7b5f0188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 00007fdc7b5f01d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffcf7310b3f R14: 00007fdc7b5f0300 R15: 0000000000022000 Allocated by task 31445: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] ____kasan_kmalloc mm/kasan/common.c:507 [inline] ____kasan_kmalloc mm/kasan/common.c:466 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:516 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:686 [inline] qfq_change_class+0x705/0x1990 net/sched/sch_qfq.c:464 tc_ctl_tclass+0x514/0xe50 net/sched/sch_api.c:2113 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5564 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 31445: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1583 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1608 slab_free mm/slub.c:3168 [inline] kfree+0xe5/0x7f0 mm/slub.c:4212 qfq_change_class+0x10fb/0x1990 net/sched/sch_qfq.c:518 tc_ctl_tclass+0x514/0xe50 net/sched/sch_api.c:2113 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5564 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88814a534f00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 16 bytes inside of 128-byte region [ffff88814a534f00, ffff88814a534f80) The buggy address belongs to the page: page:ffffea0005294d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14a534 flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000200 ffffea00004fee00 0000000600000006 ffff8880110418c0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 29797, ts 604817765317, free_ts 604810151744 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1646 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1786 new_slab mm/slub.c:1849 [inline] new_slab_objects mm/slub.c:2595 [inline] ___slab_alloc+0x4a1/0x810 mm/slub.c:2758 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2798 slab_alloc_node mm/slub.c:2880 [inline] slab_alloc mm/slub.c:2922 [inline] __kmalloc+0x315/0x330 mm/slub.c:4050 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:686 [inline] __register_sysctl_table+0x112/0x1090 fs/proc/proc_sysctl.c:1318 mpls_dev_sysctl_register+0x1b7/0x2d0 net/mpls/af_mpls.c:1421 mpls_add_dev net/mpls/af_mpls.c:1472 [inline] mpls_dev_notify+0x214/0x8b0 net/mpls/af_mpls.c:1588 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2121 call_netdevice_notifiers_extack net/core/dev.c:2133 [inline] call_netdevice_notifiers net/core/dev.c:2147 [inline] register_netdevice+0x106b/0x1500 net/core/dev.c:10312 veth_newlink+0x585/0xac0 drivers/net/veth.c:1547 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3452 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] free_pcp_prepare+0x223/0x300 mm/page_alloc.c:1342 free_unref_page_prepare mm/page_alloc.c:3250 [inline] free_unref_page+0x12/0x1d0 mm/page_alloc.c:3298 __vunmap+0x783/0xb60 mm/vmalloc.c:2566 free_work+0x58/0x70 mm/vmalloc.c:80 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Memory state around the buggy address: ffff88814a534e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88814a534e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88814a534f00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88814a534f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88814a535000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Fixes: 462dbc9101acd ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit c7396f2eac2bf9d767d9cf49bd26224fbb894aaf Author: Max Gurtovoy Date: Tue Jun 8 14:28:41 2021 +0300 vfio/iommu_type1: rename vfio_group struck to vfio_iommu_group The vfio_group structure is already defined in vfio module so in order to improve code readability and for simplicity, rename the vfio_group structure in vfio_iommu_type1 module to vfio_iommu_group. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20210608112841.51897-1-mgurtovoy@nvidia.com Signed-off-by: Alex Williamson commit 6d5516177d3b723fe9701b89e69db18cf0ca0421 Author: Boris Sukholitko Date: Mon Jun 21 12:24:29 2021 +0300 Revert "net/sched: cls_flower: Remove match on n_proto" This reverts commit 0dca2c7404a938cb10c85d0515cee40ed5348788. The commit in question breaks hardware offload of flower filters. Quoting Vladimir Oltean : fl_hw_replace_filter() and fl_reoffload() create a struct flow_cls_offload with a rule->match.mask member derived from the mask of the software classifier: &f->mask->key - that same mask that is used for initializing the flow dissector keys, and the one from which Boris removed the basic.n_proto member because it was bothering him. Reported-by: Vadym Kochan Signed-off-by: Boris Sukholitko Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit b8b79c414eca4e9bcab645e02cb92c48db974ce9 Author: Eldar Gasanov Date: Mon Jun 21 11:54:38 2021 +0300 net: dsa: mv88e6xxx: Fix adding vlan 0 8021q module adds vlan 0 to all interfaces when it starts. When 8021q module is loaded it isn't possible to create bond with mv88e6xxx interfaces, bonding module dipslay error "Couldn't add bond vlan ids", because it tries to add vlan 0 to slave interfaces. There is unexpected behavior in the switch. When a PVID is assigned to a port the switch changes VID to PVID in ingress frames with VID 0 on the port. Expected that the switch doesn't assign PVID to tagged frames with VID 0. But there isn't a way to change this behavior in the switch. Fixes: 57e661aae6a8 ("net: dsa: mv88e6xxx: Link aggregation support") Signed-off-by: Eldar Gasanov Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit eeb90e26ed05dd44553d557057bf35f08f853af8 Author: Logush Oliver Date: Tue Jun 8 15:27:24 2021 -0400 drm/amd/display: Fix edp_bootup_bl_level initialization issue [why] Updating the file to fix the missing line Signed-off-by: Logush Oliver Reviewed-by: Charlene Liu Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 452c76dfd24f799677d7ea4735daf89f479128f2 Author: Charlene Liu Date: Tue May 25 14:06:37 2021 -0400 drm/amd/display: get refclk from MICROSECOND_TIME_BASE_DIV HW register [why] recent VBIOS dce_infotable reference clock change caused a I2c regression. instead of relying on vbios, let's get it from HW directly. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1a365683d6df1bf22d248fe62d227867793a58f1 Author: Roman Li Date: Tue Jun 8 17:32:16 2021 -0400 drm/amd/display: Delay PSR entry [Why] After panel power up, if PSR entry attempted too early, PSR state may get stuck in transition. This could happen if the panel is not ready to respond to the SDP PSR entry message. In this case dmub f/w is unable to abort PSR entry since abortion is not permitted after the SDP has been sent. [How] Skip 5 pageflips before PSR enable. Signed-off-by: Roman Li Reviewed-by: Hersen Wu Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9253e11503b4c091509c723f3330119b4fc8c7f0 Author: Aurabindo Pillai Date: Wed Apr 21 15:05:11 2021 -0400 drm/amd/display: get socBB from VBIOS for dcn302 and dcn303 [why] Some SOC BB paramters may vary per SKU, and it does not make sense for driver to hardcode these values. This change was added for dcn30 and dcn301, but not for dcn302 and dcn303 [how] Parse the values from VBIOS if available, and use them if valid Fixes: 93669c8e480dca ("drm/amd/display: get socBB from VBIOS") Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Acked-by: Alex Deucher Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d8ddeb155c00a557afb8e0f65280009552acb61e Author: Wesley Chalmers Date: Wed Jun 9 13:26:40 2021 -0400 drm/amd/display: Fix incorrect variable name [WHY] extended_end_address can only be calculated from the extended_address and extended_size Signed-off-by: Wesley Chalmers Reviewed-by: Ashley Thomas Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 068312559d33d90b2802561df7bff35ed407cd73 Author: Martin Tsai Date: Tue Jun 8 13:48:32 2021 +0800 drm/amd/display: Clear lane settings after LTTPRs have been trained [Why] The voltage swing has to start from the minimum level when transmit TPS1 over Main-Link in clock recovery sequence. The lane settings from current design will inherit the existing VS/PE values that could be adjusted by Repeater X, and to use the adjusted voltage swing level in Repeater X-1 or DPRX could violate DP specs. [How] To reset VS from lane settings after LTTPRs have been trained to meet the requirement. Signed-off-by: Martin Tsai Reviewed-by: Wenjing Liu Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5d9e7fe8ef9b1c91a4821eef4533f4010e011117 Author: Nikola Cornij Date: Mon Jun 7 20:36:05 2021 -0400 drm/amd/display: Clamp VStartup value at DML calculations time [why] Some timings with a large VBlank cause the value to overflow the register related, while also producing other wrong values in DML output. [how] Clamp VStartup at the DCN3.1 maximum value Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d9b20b45ec32fff5430cc57b28aa20136ef09d76 Author: Aric Cyr Date: Tue Jun 1 18:44:50 2021 -0400 drm/amd/display: Multiplane cursor position incorrect when plane rotated [Why] When video plane is rotate the cursor position is incorrect and not matching the desktop location. [How] When a plane is rotated 90 or 270 degrees, the src_rect.width and height should be swapped when determining the scaling factor compared to the dst_rect. Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 962f2f1ae273399e357a3192d5413ca57f9b4885 Author: Yifan Zhang Date: Sat Jun 19 11:40:54 2021 +0800 Revert "drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue." This reverts commit 631003101c516ea29a74aee59666708857b9a805. Reason for revert: side effect of enlarging CP_MEC_DOORBELL_RANGE may cause some APUs fail to enter gfxoff in certain user cases. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ce03b94ba682a67e8233c9ee3066071656ded58f Author: Esben Haabendal Date: Mon Jun 21 10:20:08 2021 +0200 net: ll_temac: Remove left-over debug message Fixes: f63963411942 ("net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY") Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit a334bb697973ab8ce0e50ae03953daaad7fb9b14 Author: Yifan Zhang Date: Sat Jun 19 11:39:43 2021 +0800 Revert "drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell." This reverts commit 1ba7b24ba68e7c04b1e67d986d02b966b4eaaaa0. Reason for revert: Side effect of enlarging CP_MEC_DOORBELL_RANGE may cause some APUs fail to enter gfxoff in certain user cases. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c7ff9cff70601ea19245d997bb977344663434c7 Author: Longpeng(Mike) Date: Mon Jun 21 14:26:01 2021 +0800 vsock: notify server to shutdown when client has pending signal The client's sk_state will be set to TCP_ESTABLISHED if the server replay the client's connect request. However, if the client has pending signal, its sk_state will be set to TCP_CLOSE without notify the server, so the server will hold the corrupt connection. client server 1. sk_state=TCP_SYN_SENT | 2. call ->connect() | 3. wait reply | | 4. sk_state=TCP_ESTABLISHED | 5. insert to connected list | 6. reply to the client 7. sk_state=TCP_ESTABLISHED | 8. insert to connected list | 9. *signal pending* <--------------------- the user kill client 10. sk_state=TCP_CLOSE | client is exiting... | 11. call ->release() | virtio_transport_close if (!(sk->sk_state == TCP_ESTABLISHED || sk->sk_state == TCP_CLOSING)) return true; *return at here, the server cannot notice the connection is corrupt* So the client should notify the peer in this case. Cc: David S. Miller Cc: Jakub Kicinski Cc: Jorgen Hansen Cc: Norbert Slusarek Cc: Andra Paraschiv Cc: Colin Ian King Cc: David Brazdil Cc: Alexander Popov Suggested-by: Stefano Garzarella Link: https://lkml.org/lkml/2021/5/17/418 Signed-off-by: lixianming Signed-off-by: Longpeng(Mike) Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit fe0bdbde0756e29784ec9770d3a418c9d1640eee Author: Yejune Deng Date: Mon Jun 21 13:12:25 2021 +0800 net: add pf_family_names[] for protocol family Modify the pr_info content from int to char * in sock_register() and sock_unregister(), this looks more readable. Fixed build error in ARCH=sparc64. Signed-off-by: Yejune Deng Reported-by: kernel test robot Signed-off-by: David S. Miller commit b90788459cd6d140171b046f0b37fad341ade0a3 Author: Christophe JAILLET Date: Sun Jun 20 15:43:28 2021 +0200 net: mana: Fix a memory leak in an error handling path in 'mana_create_txq()' If this test fails we must free some resources as in all the other error handling paths of this function. Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Signed-off-by: Christophe JAILLET Reviewed-by: Dexuan Cui Signed-off-by: David S. Miller commit c829de3989f53e535bd6ab5b942df8c5c8863d3f Merge: b40d7af798a0a 19e068b18e729 Author: David S. Miller Date: Mon Jun 21 14:38:48 2021 -0700 Merge branch 'ingenic-fixes' Zhou Yanjie says: ==================== Fix for Ingenic MAC support. 1.Remove the unexpected "snps,dwmac" item in the example. ==================== Signed-off-by: David S. Miller commit 19e068b18e729aecca4fbe5b261b05b59230c80f Author: 周琰杰 (Zhou Yanjie) Date: Sun Jun 20 20:38:49 2021 +0800 dt-bindings: dwmac: Remove unexpected item. Remove the unexpected "snps,dwmac" item in the example. Fixes: 3b8401066e5a ("dt-bindings: dwmac: Add bindings for new Ingenic SoCs.") Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: David S. Miller commit b40d7af798a0a459d65bd95f34e3dff004eb554a Author: Christophe JAILLET Date: Sun Jun 20 11:49:40 2021 +0200 net: hns3: Fix a memory leak in an error handling path in 'hclge_handle_error_info_log()' If this 'kzalloc()' fails we must free some resources as in all the other error handling paths of this function. Fixes: 2e2deee7618b ("net: hns3: add the RAS compatibility adaptation solution") Signed-off-by: Christophe JAILLET Reviewed-by: Jiaran Zhang Signed-off-by: David S. Miller commit bc01b7617d46524a3e31cf73e4e1948a9b3b702b Merge: 3b62a62429b26 681c1615f8914 Author: Alex Williamson Date: Mon Jun 21 15:29:51 2021 -0600 Merge branch 'hch-mdev-direct-v4' into v5.14/vfio/next commit 681c1615f8914451cfd432ad30e2f307b6490542 Author: Jason Gunthorpe Date: Thu Jun 17 16:22:18 2021 +0200 vfio/mbochs: Convert to use vfio_register_group_dev() This is straightforward conversion, the mdev_state is actually serving as the vfio_device and we can replace all the mdev_get_drvdata()'s and the wonky dead code with a simple container_of(). Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210617142218.1877096-11-hch@lst.de Signed-off-by: Alex Williamson commit 437e41368c01fba8c220d7ca2f6b9d7fde92beee Author: Jason Gunthorpe Date: Thu Jun 17 16:22:17 2021 +0200 vfio/mdpy: Convert to use vfio_register_group_dev() This is straightforward conversion, the mdev_state is actually serving as the vfio_device and we can replace all the mdev_get_drvdata()'s and the wonky dead code with a simple container_of(). Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210617142218.1877096-10-hch@lst.de Signed-off-by: Alex Williamson commit 09177ac9192198bec24a81c822ebeef4197c3c8b Author: Jason Gunthorpe Date: Thu Jun 17 16:22:16 2021 +0200 vfio/mtty: Convert to use vfio_register_group_dev() This is straightforward conversion, the mdev_state is actually serving as the vfio_device and we can replace all the mdev_get_drvdata()'s and the wonky dead code with a simple container_of() Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Kirti Wankhede Link: https://lore.kernel.org/r/20210617142218.1877096-9-hch@lst.de Signed-off-by: Alex Williamson commit 88a21f265ce50a17e6e71e3fb4467625cf234c5a Author: Jason Gunthorpe Date: Thu Jun 17 16:22:15 2021 +0200 vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind This allows a mdev driver to opt out of using vfio_mdev.c, instead the driver will provide a 'struct mdev_driver' and register directly with the driver core. Much of mdev_parent_ops becomes unused in this mode: - create()/remove() are done via the mdev_driver probe()/remove() - mdev_attr_groups becomes mdev_driver driver.dev_groups - Wrapper function callbacks are replaced with the same ones from struct vfio_device_ops Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Cornelia Huck Reviewed-by: Greg Kroah-Hartman Reviewed-by: Kirti Wankhede Link: https://lore.kernel.org/r/20210617142218.1877096-8-hch@lst.de Signed-off-by: Alex Williamson commit af3ab3f9b986cdbc1b97b8a3341ce78851edb0dd Author: Jason Gunthorpe Date: Thu Jun 17 16:22:14 2021 +0200 vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE For some reason the vfio_mdev shim mdev_driver has its own module and kconfig. As the next patch requires access to it from mdev.ko merge the two modules together and remove VFIO_MDEV_DEVICE. A later patch deletes this driver entirely. Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Cornelia Huck Reviewed-by: Greg Kroah-Hartman Reviewed-by: Kirti Wankhede Link: https://lore.kernel.org/r/20210617142218.1877096-7-hch@lst.de Signed-off-by: Alex Williamson commit 0d9f837c6958a4c14e6bcb5c5edf6c851d65f507 Author: Jason Gunthorpe Date: Thu Jun 17 16:22:13 2021 +0200 driver core: Export device_driver_attach() This is intended as a replacement API for device_bind_driver(). It has at least the following benefits: - Internal locking. Few of the users of device_bind_driver() follow the locking rules - Calls device driver probe() internally. Notably this means that devm support for probe works correctly as probe() error will call devres_release_all() - struct device_driver -> dev_groups is supported - Simplified calling convention, no need to manually call probe(). The general usage is for situations that already know what driver to bind and need to ensure the bind is synchronized with other logic. Call device_driver_attach() after device_add(). If probe() returns a failure then this will be preserved up through to the error return of device_driver_attach(). Signed-off-by: Jason Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Cornelia Huck Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210617142218.1877096-6-hch@lst.de Signed-off-by: Alex Williamson commit 45ddcb42949f825f0caa25352e825cede94b6aba Author: Christoph Hellwig Date: Thu Jun 17 16:22:12 2021 +0200 driver core: Don't return EPROBE_DEFER to userspace during sysfs bind EPROBE_DEFER is an internal kernel error code and it should not be leaked to userspace via the bind_store() sysfs. Userspace doesn't have this constant and cannot understand it. Further, it doesn't really make sense to have userspace trigger a deferred probe via bind_store(), which could eventually succeed, while simultaneously returning an error back. Resolve this by splitting driver_probe_device so that the version used by the sysfs binding that turns EPROBE_DEFER into -EAGAIN, while the one used for internally binding keeps the error code, and calls driver_deferred_probe_add where needed. This also allows to nicely split out the defer_all_probes / probe_count checks so that they actually allow for full device_{block,unblock}_probing protection while not bothering the sysfs bind case. Signed-off-by: Christoph Hellwig Reviewed-by: Cornelia Huck Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210617142218.1877096-5-hch@lst.de Signed-off-by: Alex Williamson commit ef6dcbdd8eb2f44dce70a3abecc32d43cc5f3e64 Author: Christoph Hellwig Date: Thu Jun 17 16:22:11 2021 +0200 driver core: Flow the return code from ->probe() through to sysfs bind Currently really_probe() returns 1 on success and 0 if the probe() call fails. This return code arrangement is designed to be useful for __device_attach_driver() which is walking the device list and trying every driver. 0 means to keep trying. However, it is not useful for the other places that call through to really_probe() that do actually want to see the probe() return code. For instance bind_store() would be better to return the actual error code from the driver's probe method, not discarding it and returning -ENODEV. Reorganize things so that really_probe() returns the error code from ->probe as a (inverted) positive number, and 0 for successful attach. With this, __device_attach_driver can ignore the (positive) probe errors, return 1 to exit the loop for a successful binding and pass on the other negative errors, while device_driver_attach simplify inverts the positive errors and returns all errors to the sysfs code. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20210617142218.1877096-4-hch@lst.de Signed-off-by: Alex Williamson commit e1499647c69c72c4583273e773d8c2786cb4bee9 Author: Christoph Hellwig Date: Thu Jun 17 16:22:10 2021 +0200 driver core: Better distinguish probe errors in really_probe really_probe tries to special case errors from ->probe, but due to all other initialization added to the function over time now a lot of internal errors hit that code path as well. Untangle that by adding a new probe_err local variable and apply the special casing only to that. Signed-off-by: Christoph Hellwig Reviewed-by: Cornelia Huck Reviewed-by: Greg Kroah-Hartman Reviewed-by: Kirti Wankhede Link: https://lore.kernel.org/r/20210617142218.1877096-3-hch@lst.de Signed-off-by: Alex Williamson commit 204db60c83574559a8e08ce4bbd0029d56b8ab2e Author: Jason Gunthorpe Date: Thu Jun 17 16:22:09 2021 +0200 driver core: Pull required checks into driver_probe_device() Checking if the dev is dead or if the dev is already bound is a required precondition to invoking driver_probe_device(). All the call chains leading here duplicate these checks. Add it directly to driver_probe_device() so the precondition is clear and remove the checks from device_driver_attach() and __driver_attach_async_helper(). The other call chain going through __device_attach_driver() does have these same checks but they are inlined into logic higher up the call stack and can't be removed. The sysfs uAPI call chain starting at bind_store() is a bit confused because it reads dev->driver unlocked and returns -ENODEV if it is !NULL, otherwise it reads it again under lock and returns 0 if it is !NULL. Fix this to always return -EBUSY and always read dev->driver under its lock. Done in preparation for the next patches which will add additional callers to driver_probe_device() and will need these checks as well. Signed-off-by: Jason Gunthorpe [hch: drop the extra checks in device_driver_attach and bind_store] Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20210617142218.1877096-2-hch@lst.de Signed-off-by: Alex Williamson commit 4f35dabb51f68f8cc6d3289870762feb417993ea Merge: 0d0f2a36e38a0 70b639dc41ad4 Author: David S. Miller Date: Mon Jun 21 14:28:53 2021 -0700 Merge branch 'nnicstar-fixes' Zheyu Ma says: ==================== atm: nicstar: fix two bugs about error handling Zheyu Ma (2): atm: nicstar: use 'dma_free_coherent' instead of 'kfree' atm: nicstar: register the interrupt handler in the right place ==================== Signed-off-by: David S. Miller commit 70b639dc41ad499384e41e106fce72e36805c9f2 Author: Zheyu Ma Date: Sun Jun 20 15:24:15 2021 +0000 atm: nicstar: register the interrupt handler in the right place Because the error handling is sequential, the application of resources should be carried out in the order of error handling, so the operation of registering the interrupt handler should be put in front, so as not to free the unregistered interrupt handler during error handling. This log reveals it: [ 3.438724] Trying to free already-free IRQ 23 [ 3.439060] WARNING: CPU: 5 PID: 1 at kernel/irq/manage.c:1825 free_irq+0xfb/0x480 [ 3.440039] Modules linked in: [ 3.440257] CPU: 5 PID: 1 Comm: swapper/0 Not tainted 5.12.4-g70e7f0549188-dirty #142 [ 3.440793] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 3.441561] RIP: 0010:free_irq+0xfb/0x480 [ 3.441845] Code: 6e 08 74 6f 4d 89 f4 e8 c3 78 09 00 4d 8b 74 24 18 4d 85 f6 75 e3 e8 b4 78 09 00 8b 75 c8 48 c7 c7 a0 ac d5 85 e8 95 d7 f5 ff <0f> 0b 48 8b 75 c0 4c 89 ff e8 87 c5 90 03 48 8b 43 40 4c 8b a0 80 [ 3.443121] RSP: 0000:ffffc90000017b50 EFLAGS: 00010086 [ 3.443483] RAX: 0000000000000000 RBX: ffff888107c6f000 RCX: 0000000000000000 [ 3.443972] RDX: 0000000000000000 RSI: ffffffff8123f301 RDI: 00000000ffffffff [ 3.444462] RBP: ffffc90000017b90 R08: 0000000000000001 R09: 0000000000000003 [ 3.444950] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 [ 3.444994] R13: ffff888107dc0000 R14: ffff888104f6bf00 R15: ffff888107c6f0a8 [ 3.444994] FS: 0000000000000000(0000) GS:ffff88817bd40000(0000) knlGS:0000000000000000 [ 3.444994] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.444994] CR2: 0000000000000000 CR3: 000000000642e000 CR4: 00000000000006e0 [ 3.444994] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3.444994] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3.444994] Call Trace: [ 3.444994] ns_init_card_error+0x18e/0x250 [ 3.444994] nicstar_init_one+0x10d2/0x1130 [ 3.444994] local_pci_probe+0x4a/0xb0 [ 3.444994] pci_device_probe+0x126/0x1d0 [ 3.444994] ? pci_device_remove+0x100/0x100 [ 3.444994] really_probe+0x27e/0x650 [ 3.444994] driver_probe_device+0x84/0x1d0 [ 3.444994] ? mutex_lock_nested+0x16/0x20 [ 3.444994] device_driver_attach+0x63/0x70 [ 3.444994] __driver_attach+0x117/0x1a0 [ 3.444994] ? device_driver_attach+0x70/0x70 [ 3.444994] bus_for_each_dev+0xb6/0x110 [ 3.444994] ? rdinit_setup+0x40/0x40 [ 3.444994] driver_attach+0x22/0x30 [ 3.444994] bus_add_driver+0x1e6/0x2a0 [ 3.444994] driver_register+0xa4/0x180 [ 3.444994] __pci_register_driver+0x77/0x80 [ 3.444994] ? uPD98402_module_init+0xd/0xd [ 3.444994] nicstar_init+0x1f/0x75 [ 3.444994] do_one_initcall+0x7a/0x3d0 [ 3.444994] ? rdinit_setup+0x40/0x40 [ 3.444994] ? rcu_read_lock_sched_held+0x4a/0x70 [ 3.444994] kernel_init_freeable+0x2a7/0x2f9 [ 3.444994] ? rest_init+0x2c0/0x2c0 [ 3.444994] kernel_init+0x13/0x180 [ 3.444994] ? rest_init+0x2c0/0x2c0 [ 3.444994] ? rest_init+0x2c0/0x2c0 [ 3.444994] ret_from_fork+0x1f/0x30 [ 3.444994] Kernel panic - not syncing: panic_on_warn set ... [ 3.444994] CPU: 5 PID: 1 Comm: swapper/0 Not tainted 5.12.4-g70e7f0549188-dirty #142 [ 3.444994] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 3.444994] Call Trace: [ 3.444994] dump_stack+0xba/0xf5 [ 3.444994] ? free_irq+0xfb/0x480 [ 3.444994] panic+0x155/0x3ed [ 3.444994] ? __warn+0xed/0x150 [ 3.444994] ? free_irq+0xfb/0x480 [ 3.444994] __warn+0x103/0x150 [ 3.444994] ? free_irq+0xfb/0x480 [ 3.444994] report_bug+0x119/0x1c0 [ 3.444994] handle_bug+0x3b/0x80 [ 3.444994] exc_invalid_op+0x18/0x70 [ 3.444994] asm_exc_invalid_op+0x12/0x20 [ 3.444994] RIP: 0010:free_irq+0xfb/0x480 [ 3.444994] Code: 6e 08 74 6f 4d 89 f4 e8 c3 78 09 00 4d 8b 74 24 18 4d 85 f6 75 e3 e8 b4 78 09 00 8b 75 c8 48 c7 c7 a0 ac d5 85 e8 95 d7 f5 ff <0f> 0b 48 8b 75 c0 4c 89 ff e8 87 c5 90 03 48 8b 43 40 4c 8b a0 80 [ 3.444994] RSP: 0000:ffffc90000017b50 EFLAGS: 00010086 [ 3.444994] RAX: 0000000000000000 RBX: ffff888107c6f000 RCX: 0000000000000000 [ 3.444994] RDX: 0000000000000000 RSI: ffffffff8123f301 RDI: 00000000ffffffff [ 3.444994] RBP: ffffc90000017b90 R08: 0000000000000001 R09: 0000000000000003 [ 3.444994] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 [ 3.444994] R13: ffff888107dc0000 R14: ffff888104f6bf00 R15: ffff888107c6f0a8 [ 3.444994] ? vprintk_func+0x71/0x110 [ 3.444994] ns_init_card_error+0x18e/0x250 [ 3.444994] nicstar_init_one+0x10d2/0x1130 [ 3.444994] local_pci_probe+0x4a/0xb0 [ 3.444994] pci_device_probe+0x126/0x1d0 [ 3.444994] ? pci_device_remove+0x100/0x100 [ 3.444994] really_probe+0x27e/0x650 [ 3.444994] driver_probe_device+0x84/0x1d0 [ 3.444994] ? mutex_lock_nested+0x16/0x20 [ 3.444994] device_driver_attach+0x63/0x70 [ 3.444994] __driver_attach+0x117/0x1a0 [ 3.444994] ? device_driver_attach+0x70/0x70 [ 3.444994] bus_for_each_dev+0xb6/0x110 [ 3.444994] ? rdinit_setup+0x40/0x40 [ 3.444994] driver_attach+0x22/0x30 [ 3.444994] bus_add_driver+0x1e6/0x2a0 [ 3.444994] driver_register+0xa4/0x180 [ 3.444994] __pci_register_driver+0x77/0x80 [ 3.444994] ? uPD98402_module_init+0xd/0xd [ 3.444994] nicstar_init+0x1f/0x75 [ 3.444994] do_one_initcall+0x7a/0x3d0 [ 3.444994] ? rdinit_setup+0x40/0x40 [ 3.444994] ? rcu_read_lock_sched_held+0x4a/0x70 [ 3.444994] kernel_init_freeable+0x2a7/0x2f9 [ 3.444994] ? rest_init+0x2c0/0x2c0 [ 3.444994] kernel_init+0x13/0x180 [ 3.444994] ? rest_init+0x2c0/0x2c0 [ 3.444994] ? rest_init+0x2c0/0x2c0 [ 3.444994] ret_from_fork+0x1f/0x30 [ 3.444994] Dumping ftrace buffer: [ 3.444994] (ftrace buffer empty) [ 3.444994] Kernel Offset: disabled [ 3.444994] Rebooting in 1 seconds.. Signed-off-by: Zheyu Ma Signed-off-by: David S. Miller commit 6a1e5a4af17e440dd82a58a2c5f40ff17a82b722 Author: Zheyu Ma Date: Sun Jun 20 15:24:14 2021 +0000 atm: nicstar: use 'dma_free_coherent' instead of 'kfree' When 'nicstar_init_one' fails, 'ns_init_card_error' will be executed for error handling, but the correct memory free function should be used, otherwise it will cause an error. Since 'card->rsq.org' and 'card->tsq.org' are allocated using 'dma_alloc_coherent' function, they should be freed using 'dma_free_coherent'. Fix this by using 'dma_free_coherent' instead of 'kfree' This log reveals it: [ 3.440294] kernel BUG at mm/slub.c:4206! [ 3.441059] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 3.441430] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.12.4-g70e7f0549188-dirty #141 [ 3.441986] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 3.442780] RIP: 0010:kfree+0x26a/0x300 [ 3.443065] Code: e8 3a c3 b9 ff e9 d6 fd ff ff 49 8b 45 00 31 db a9 00 00 01 00 75 4d 49 8b 45 00 a9 00 00 01 00 75 0a 49 8b 45 08 a8 01 75 02 <0f> 0b 89 d9 b8 00 10 00 00 be 06 00 00 00 48 d3 e0 f7 d8 48 63 d0 [ 3.443396] RSP: 0000:ffffc90000017b70 EFLAGS: 00010246 [ 3.443396] RAX: dead000000000100 RBX: 0000000000000000 RCX: 0000000000000000 [ 3.443396] RDX: 0000000000000000 RSI: ffffffff85d3df94 RDI: ffffffff85df38e6 [ 3.443396] RBP: ffffc90000017b90 R08: 0000000000000001 R09: 0000000000000001 [ 3.443396] R10: 0000000000000000 R11: 0000000000000001 R12: ffff888107dc0000 [ 3.443396] R13: ffffea00001f0100 R14: ffff888101a8bf00 R15: ffff888107dc0160 [ 3.443396] FS: 0000000000000000(0000) GS:ffff88817bc80000(0000) knlGS:0000000000000000 [ 3.443396] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.443396] CR2: 0000000000000000 CR3: 000000000642e000 CR4: 00000000000006e0 [ 3.443396] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3.443396] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3.443396] Call Trace: [ 3.443396] ns_init_card_error+0x12c/0x220 [ 3.443396] nicstar_init_one+0x10d2/0x1130 [ 3.443396] local_pci_probe+0x4a/0xb0 [ 3.443396] pci_device_probe+0x126/0x1d0 [ 3.443396] ? pci_device_remove+0x100/0x100 [ 3.443396] really_probe+0x27e/0x650 [ 3.443396] driver_probe_device+0x84/0x1d0 [ 3.443396] ? mutex_lock_nested+0x16/0x20 [ 3.443396] device_driver_attach+0x63/0x70 [ 3.443396] __driver_attach+0x117/0x1a0 [ 3.443396] ? device_driver_attach+0x70/0x70 [ 3.443396] bus_for_each_dev+0xb6/0x110 [ 3.443396] ? rdinit_setup+0x40/0x40 [ 3.443396] driver_attach+0x22/0x30 [ 3.443396] bus_add_driver+0x1e6/0x2a0 [ 3.443396] driver_register+0xa4/0x180 [ 3.443396] __pci_register_driver+0x77/0x80 [ 3.443396] ? uPD98402_module_init+0xd/0xd [ 3.443396] nicstar_init+0x1f/0x75 [ 3.443396] do_one_initcall+0x7a/0x3d0 [ 3.443396] ? rdinit_setup+0x40/0x40 [ 3.443396] ? rcu_read_lock_sched_held+0x4a/0x70 [ 3.443396] kernel_init_freeable+0x2a7/0x2f9 [ 3.443396] ? rest_init+0x2c0/0x2c0 [ 3.443396] kernel_init+0x13/0x180 [ 3.443396] ? rest_init+0x2c0/0x2c0 [ 3.443396] ? rest_init+0x2c0/0x2c0 [ 3.443396] ret_from_fork+0x1f/0x30 [ 3.443396] Modules linked in: [ 3.443396] Dumping ftrace buffer: [ 3.443396] (ftrace buffer empty) [ 3.458593] ---[ end trace 3c6f8f0d8ef59bcd ]--- [ 3.458922] RIP: 0010:kfree+0x26a/0x300 [ 3.459198] Code: e8 3a c3 b9 ff e9 d6 fd ff ff 49 8b 45 00 31 db a9 00 00 01 00 75 4d 49 8b 45 00 a9 00 00 01 00 75 0a 49 8b 45 08 a8 01 75 02 <0f> 0b 89 d9 b8 00 10 00 00 be 06 00 00 00 48 d3 e0 f7 d8 48 63 d0 [ 3.460499] RSP: 0000:ffffc90000017b70 EFLAGS: 00010246 [ 3.460870] RAX: dead000000000100 RBX: 0000000000000000 RCX: 0000000000000000 [ 3.461371] RDX: 0000000000000000 RSI: ffffffff85d3df94 RDI: ffffffff85df38e6 [ 3.461873] RBP: ffffc90000017b90 R08: 0000000000000001 R09: 0000000000000001 [ 3.462372] R10: 0000000000000000 R11: 0000000000000001 R12: ffff888107dc0000 [ 3.462871] R13: ffffea00001f0100 R14: ffff888101a8bf00 R15: ffff888107dc0160 [ 3.463368] FS: 0000000000000000(0000) GS:ffff88817bc80000(0000) knlGS:0000000000000000 [ 3.463949] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.464356] CR2: 0000000000000000 CR3: 000000000642e000 CR4: 00000000000006e0 [ 3.464856] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3.465356] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3.465860] Kernel panic - not syncing: Fatal exception [ 3.466370] Dumping ftrace buffer: [ 3.466616] (ftrace buffer empty) [ 3.466871] Kernel Offset: disabled [ 3.467122] Rebooting in 1 seconds.. Signed-off-by: Zheyu Ma Signed-off-by: David S. Miller commit ebe9d9eb9c24e6638275599c36795784888d9e18 Merge: 6ff5f8135af71 52c4a1a85f4b3 Author: David S. Miller Date: Mon Jun 21 14:24:21 2021 -0700 Merge branch 'fec-tx' Joakim Zhang says: ==================== net: fec: fix TX bandwidth fluctuations This patch set intends to fix TX bandwidth fluctuations, any feedback would be appreciated. --- ChangeLogs: V1: remove RFC tag, RFC discussions please turn to below: https://lore.kernel.org/lkml/YK0Ce5YxR2WYbrAo@lunn.ch/T/ V2: change functions to be static in this patch set. And add the t-b tag. V3: fix sparse warining: ntohs()->htons() ==================== Signed-off-by: David S. Miller commit 52c4a1a85f4b346c39c896c0168f4a843b3385ff Author: Fugang Duan Date: Mon Jun 21 14:27:37 2021 +0800 net: fec: add ndo_select_queue to fix TX bandwidth fluctuations As we know that AVB is enabled by default, and the ENET IP design is queue 0 for best effort, queue 1&2 for AVB Class A&B. Bandwidth of each queue 1&2 set in driver is 50%, TX bandwidth fluctuated when selecting tx queues randomly with FEC_QUIRK_HAS_AVB quirk available. This patch adds ndo_select_queue callback to select queues for transmitting to fix this issue. It will always return queue 0 if this is not a vlan packet, and return queue 1 or 2 based on priority of vlan packet. You may complain that in fact we only use single queue for trasmitting if we are not targeted to VLAN. Yes, but seems we have no choice, since AVB is enabled when the driver probed, we can't switch this feature dynamicly. After compare multiple queues to single queue, TX throughput almost no improvement. One way we can implemet is to configure the driver to multiple queues with Round-robin scheme by default. Then add ndo_setup_tc callback to enable/disable AVB feature for users. Unfortunately, ENET AVB IP seems not follow the standard 802.1Qav spec. We only can program DMAnCFG[IDLE_SLOPE] field to calculate bandwidth fraction. And idle slope is restricted to certain valus (a total of 19). It's far away from CBS QDisc implemented in Linux TC framework. If you strongly suggest to do this, I think we only can support limited numbers of bandwidth and reject others, but it's really urgly and wried. With this patch, VLAN tagged packets route to queue 0/1/2 based on vlan priority; VLAN untagged packets route to queue 0. Tested-by: Frieder Schrempf Reported-by: Frieder Schrempf Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Reported-by: kernel test robot Signed-off-by: David S. Miller commit 471ff4455d61c9929ae912328859921708e1eafc Author: Joakim Zhang Date: Mon Jun 21 14:27:36 2021 +0800 net: fec: add FEC_QUIRK_HAS_MULTI_QUEUES represents i.MX6SX ENET IP Frieder Schrempf reported a TX throuthput issue [1], it happens quite often that the measured bandwidth in TX direction drops from its expected/nominal value to something like ~50% (for 100M) or ~67% (for 1G) connections. [1] https://lore.kernel.org/linux-arm-kernel/421cc86c-b66f-b372-32f7-21e59f9a98bc@kontron.de/ The issue becomes clear after digging into it, Net core would select queues when transmitting packets. Since FEC have not impletemented ndo_select_queue callback yet, so it will call netdev_pick_tx to select queues randomly. For i.MX6SX ENET IP with AVB support, driver default enables this feature. According to the setting of QOS/RCMRn/DMAnCFG registers, AVB configured to Credit-based scheme, 50% bandwidth of each queue 1&2. With below tests let me think more: 1) With FEC_QUIRK_HAS_AVB quirk, can reproduce TX bandwidth fluctuations issue. 2) Without FEC_QUIRK_HAS_AVB quirk, can't reproduce TX bandwidth fluctuations issue. The related difference with or w/o FEC_QUIRK_HAS_AVB quirk is that, whether we program FTYPE field of TxBD or not. As I describe above, AVB feature is enabled by default. With FEC_QUIRK_HAS_AVB quirk, frames in queue 0 marked as non-AVB, and frames in queue 1&2 marked as AVB Class A&B. It's unreasonable if frames in queue 1&2 are not required to be time-sensitive. So when Net core select tx queues ramdomly, Credit-based scheme would work and lead to TX bandwidth fluctuated. On the other hand, w/o FEC_QUIRK_HAS_AVB quirk, frames in queue 1&2 are all marked as non-AVB, so Credit-based scheme would not work. Till now, how can we fix this TX throughput issue? Yes, please remove FEC_QUIRK_HAS_AVB quirk if you suffer it from time-nonsensitive networking. However, this quirk is used to indicate i.MX6SX, other setting depends on it. So this patch adds a new quirk FEC_QUIRK_HAS_MULTI_QUEUES to represent i.MX6SX, it is safe for us remove FEC_QUIRK_HAS_AVB quirk now. FEC_QUIRK_HAS_AVB quirk is set by default in the driver, and users may not know much about driver details, they would waste effort to find the root cause, that is not we want. The following patch is a implementation to fix it and users don't need to modify the driver. Tested-by: Frieder Schrempf Reported-by: Frieder Schrempf Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 0d0f2a36e38a08809ebcf5b4786528a7ba03d2e4 Merge: d452d48b9f8b1 5957a8901db44 Author: David S. Miller Date: Mon Jun 21 14:21:29 2021 -0700 Merge branch 'mptcp-sdeq-fixes' Mat Martineau says: ==================== mptcp: 32-bit sequence number improvements MPTCP-level sequence numbers are 64 bits, but RFC 8684 allows use of 32-bit sequence numbers in the DSS option to save header space. Those 32-bit numbers are the least significant bits of the full 64-bit sequence number, so the receiver must infer the correct upper 32 bits. These two patches improve the logic for determining the full 64-bit sequence numbers when the 32-bit truncated version has wrapped around. ==================== Signed-off-by: David S. Miller commit 5957a8901db44c03540505ccedd95031c21ef2f2 Author: Paolo Abeni Date: Fri Jun 18 15:02:21 2021 -0700 mptcp: fix 32 bit DSN expansion The current implementation of 32 bit DSN expansion is buggy. After the previous patch, we can simply reuse the newly introduced helper to do the expansion safely. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/120 Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 1502328f17ab0684ca5ed6764433aa0a83bdaf95 Author: Paolo Abeni Date: Fri Jun 18 15:02:20 2021 -0700 mptcp: fix bad handling of 32 bit ack wrap-around When receiving 32 bits DSS ack from the peer, the MPTCP need to expand them to 64 bits value. The current code is buggy WRT detecting 32 bits ack wrap-around: when the wrap-around happens the current unsigned 32 bit ack value is lower than the previous one. Additionally check for possible reverse wrap and make the helper visible, so that we could re-use it for the next patch. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/204 Fixes: cc9d25669866 ("mptcp: update per unacked sequence on pkt reception") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit ddcc5c544eb0991501761622b651cf43ce660a22 Author: Thomas Bracht Laumann Jespersen Date: Sat Jun 19 21:51:31 2021 +0200 block/partitions/msdos: Fix typo inidicator -> indicator Just a fix for a small typo in msdos_partition(). Signed-off-by: Thomas Bracht Laumann Jespersen Link: https://lore.kernel.org/r/20210619195130.19348-1-t@laumann.xyz Signed-off-by: Jens Axboe commit 9a2ac41b13c573703d6689f51f3e27dd658324be Author: Paolo Valente Date: Sat Jun 19 16:09:48 2021 +0200 block, bfq: reset waker pointer with shared queues Commit 85686d0dc194 ("block, bfq: keep shared queues out of the waker mechanism") leaves shared bfq_queues out of the waker-detection mechanism. It attains this goal by not updating the pointer last_completed_rq_bfqq, if the last request completed belongs to a shared bfq_queue (so that the pointer will not point to the shared bfq_queue). Yet this has a side effect: the pointer last_completed_rq_bfqq keeps pointing, deceptively, to a bfq_queue that actually is not the last one to have had a request completed. As a consequence, such a bfq_queue may deceptively be considered as a waker of some bfq_queue, even of some shared bfq_queue. To address this issue, reset last_completed_rq_bfqq if the last request completed belongs to a shared queue. Fixes: 85686d0dc194 ("block, bfq: keep shared queues out of the waker mechanism") Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210619140948.98712-8-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit efc72524b3a9e4e7bc7c07f756528736409ec1b7 Author: Paolo Valente Date: Sat Jun 19 16:09:47 2021 +0200 block, bfq: check waker only for queues with no in-flight I/O Consider two bfq_queues, say Q1 and Q2, with Q2 empty. If a request of Q1 gets completed shortly before a new request arrives for Q2, then BFQ flags Q1 as a candidate waker for Q2. Yet, the arrival of this new request may have a different cause, in the following case. If also Q2 has requests in flight while waiting for the arrival of a new request, then the completion of its own requests may be the actual cause of the awakening of the process that sends I/O to Q2. So Q1 may be flagged wrongly as a candidate waker. This commit avoids this deceptive flagging, by disabling candidate-waker flagging for Q2, if Q2 has in-flight I/O. Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210619140948.98712-7-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit bd3664b362381c4c1473753ebedf0ab242a60d1d Author: Paolo Valente Date: Sat Jun 19 16:09:46 2021 +0200 block, bfq: avoid delayed merge of async queues Since commit 430a67f9d616 ("block, bfq: merge bursts of newly-created queues"), BFQ may schedule a merge between a newly created sync bfq_queue, say Q2, and the last sync bfq_queue created, say Q1. To this goal, BFQ stores the address of Q1 in the field bic->stable_merge_bfqq of the bic associated with Q2. So, when the time for the possible merge arrives, BFQ knows which bfq_queue to merge Q2 with. In particular, BFQ checks for possible merges on request arrivals. Yet the same bic may also be associated with an async bfq_queue, say Q3. So, if a request for Q3 arrives, then the above check may happen to be executed while the bfq_queue at hand is Q3, instead of Q2. In this case, Q1 happens to be merged with an async bfq_queue. This is not only a conceptual mistake, because async queues are to be kept out of queue merging, but also a bug that leads to inconsistent states. This commits simply filters async queues out of delayed merges. Fixes: 430a67f9d616 ("block, bfq: merge bursts of newly-created queues") Tested-by: Holger Hoffstätte Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210619140948.98712-6-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 7812472f973047a886e4ed9a91d98d6627dd746f Author: Pietro Pedroni Date: Sat Jun 19 16:09:45 2021 +0200 block, bfq: boost throughput by extending queue-merging times One of the methods with which bfq boosts throughput is by merging queues. One of the merging variants in bfq is the stable merge. This mechanism is activated between two queues only if they are created within a certain maximum time T1 from each other. Merging can happen soon or be delayed. In the second case, before merging, bfq needs to evaluate a throughput-boost parameter that indicates whether the queue generates a high throughput is served alone. Merging occurs when this throughput-boost is not high enough. In particular, this parameter is evaluated and late merging may occur only after at least a time T2 from the creation of the queue. Currently T1 and T2 are set to 180ms and 200ms, respectively. In this way the merging mechanism rarely occurs because time is not enough. This results in a noticeable lowering of the overall throughput with some workloads (see the example below). This commit introduces two constants bfq_activation_stable_merging and bfq_late_stable_merging in order to increase the duration of T1 and T2. Both the stable merging activation time and the late merging time are set to 600ms. This value has been experimentally evaluated using sqlite benchmark in the Phoronix Test Suite on a HDD. The duration of the benchmark before this fix was 111.02s, while now it has reached 97.02s, a better result than that of all the other schedulers. Signed-off-by: Pietro Pedroni Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210619140948.98712-5-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit d4f49983fa3944416c28379c35fbe10c68455ea4 Author: Paolo Valente Date: Sat Jun 19 16:09:44 2021 +0200 block, bfq: consider also creation time in delayed stable merge Since commit 430a67f9d616 ("block, bfq: merge bursts of newly-created queues"), BFQ may schedule a merge between a newly created sync bfq_queue and the last sync bfq_queue created. Such a merging is not performed immediately, because BFQ needs first to find out whether the newly created queue actually reaches a higher throughput if not merged at all (and in that case BFQ will not perform any stable merging). To check that, a little time must be waited after the creation of the new queue, so that some I/O can flow in the queue, and statistics on such I/O can be computed. Yet, to evaluate the above waiting time, the last split time is considered as start time, instead of the creation time of the queue. This is a mistake, because considering the split time is correct only in the following scenario. The queue undergoes a non-stable merges on the arrival of its very first I/O request, due to close I/O with some other queue. While the queue is merged for close I/O, stable merging is not considered. Yet the queue may then happen to be split, if the close I/O finishes (or happens to be a false positive). From this time on, the queue can again be considered for stable merging. But, again, a little time must elapse, to let some new I/O flow in the queue and to get updated statistics. To wait for this time, the split time is to be taken into account. Yet, if the queue does not undergo a non-stable merge on the arrival of its very first request, then BFQ immediately checks whether the stable merge is to be performed. It happens because the split time for a queue is initialized to minus infinity when the queue is created. This commit fixes this mistake by adding the missing condition. Now the check for delayed stable-merge is performed after a little time is elapsed not only from the last queue split time, but also from the creation time of the queue. Fixes: 430a67f9d616 ("block, bfq: merge bursts of newly-created queues") Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210619140948.98712-4-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit e03f2ab78a4a673e4af23c3b855591c48b9de4d7 Author: Luca Mariotti Date: Sat Jun 19 16:09:43 2021 +0200 block, bfq: fix delayed stable merge check When attempting to schedule a merge of a given bfq_queue with the currently in-service bfq_queue or with a cooperating bfq_queue among the scheduled bfq_queues, delayed stable merge is checked for rotational or non-queueing devs. For this stable merge to be performed, some conditions must be met. If the current bfq_queue underwent some split from some merged bfq_queue, one of these conditions is that two hundred milliseconds must elapse from split, otherwise this condition is always met. Unfortunately, by mistake, time_is_after_jiffies() was written instead of time_is_before_jiffies() for this check, verifying that less than two hundred milliseconds have elapsed instead of verifying that at least two hundred milliseconds have elapsed. Fix this issue by replacing time_is_after_jiffies() with time_is_before_jiffies(). Signed-off-by: Luca Mariotti Signed-off-by: Paolo Valente Signed-off-by: Pietro Pedroni Link: https://lore.kernel.org/r/20210619140948.98712-3-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 511a2699237611b062df7798476bf3a1392910b9 Author: Paolo Valente Date: Sat Jun 19 16:09:42 2021 +0200 block, bfq: let also stably merged queues enjoy weight raising Merged bfq_queues are kept out of weight-raising (low-latency) mechanisms. The reason is that these queues are usually created for non-interactive and non-soft-real-time tasks. Yet this is not the case for stably-merged queues. These queues are merged just because they are created shortly after each other. So they may easily serve the I/O of an interactive or soft-real time application, if the application happens to spawn multiple processes. To address this issue, this commits lets also stably-merged queued enjoy weight raising. Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210619140948.98712-2-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 76a8040817b4b9c69b53f9b326987fa891b4082a Author: Zhang Yi Date: Sat Jun 19 17:37:00 2021 +0800 blk-wbt: make sure throttle is enabled properly After commit a79050434b45 ("blk-rq-qos: refactor out common elements of blk-wbt"), if throttle was disabled by wbt_disable_default(), we could not enable again, fix this by set enable_state back to WBT_STATE_ON_DEFAULT. Fixes: a79050434b45 ("blk-rq-qos: refactor out common elements of blk-wbt") Signed-off-by: Zhang Yi Link: https://lore.kernel.org/r/20210619093700.920393-3-yi.zhang@huawei.com Signed-off-by: Jens Axboe commit 1d0903d61e9645c6330b94247b96dd873dfc11c8 Author: Zhang Yi Date: Sat Jun 19 17:36:59 2021 +0800 blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled() Now that we disable wbt by simply zero out rwb->wb_normal in wbt_disable_default() when switch elevator to bfq, but it's not safe because it will become false positive if we change queue depth. If it become false positive between wbt_wait() and wbt_track() when submit write request, it will lead to drop rqw->inflight to -1 in wbt_done(), which will end up trigger IO hung. Fix this issue by introduce a new state which mean the wbt was disabled. Fixes: a79050434b45 ("blk-rq-qos: refactor out common elements of blk-wbt") Signed-off-by: Zhang Yi Link: https://lore.kernel.org/r/20210619093700.920393-2-yi.zhang@huawei.com Signed-off-by: Jens Axboe commit fb926032b3209300f9dc454a36b8299582ae545c Author: Bart Van Assche Date: Thu Jun 17 17:44:56 2021 -0700 block/mq-deadline: Prioritize high-priority requests While one or more requests with a certain I/O priority are pending, do not dispatch lower priority requests. Dispatch lower priority requests anyway after the "aging" time has expired. This patch has been tested as follows: modprobe scsi_debug ndelay=1000000 max_queue=16 && sd='' && while [ -z "$sd" ]; do sd=/dev/$(basename /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/*) done && echo $((100*1000)) > /sys/block/$sd/queue/iosched/aging_expire && cd /sys/fs/cgroup/blkio/ && echo $$ >cgroup.procs && echo restrict-to-be >blkio.prio.class && mkdir -p hipri && cd hipri && echo none-to-rt >blkio.prio.class && { max-iops -a1 -d32 -j1 -e mq-deadline $sd >& ~/low-pri.txt & } && echo $$ >cgroup.procs && max-iops -a1 -d32 -j1 -e mq-deadline $sd >& ~/hi-pri.txt Result: * 11000 IOPS for the high-priority job * 40 IOPS for the low-priority job If the aging expiry time is changed from 100s into 0, the IOPS results change into 6712 and 6796 IOPS. The max-iops script is a script that runs fio with the following arguments: --bs=4K --gtod_reduce=1 --ioengine=libaio --ioscheduler=${arg_e} --runtime=60 --norandommap --rw=read --thread --buffered=0 --numjobs=${arg_j} --iodepth=${arg_d} --iodepth_batch_submit=${arg_a} --iodepth_batch_complete=$((arg_d / 2)) --name=${positional_argument_1} --filename=${positional_argument_1} Reviewed-by: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-17-bvanassche@acm.org Signed-off-by: Jens Axboe commit 08a9ad8bf607388d768a341957d53eae64250c2d Author: Bart Van Assche Date: Thu Jun 17 17:44:55 2021 -0700 block/mq-deadline: Add cgroup support Maintain statistics per cgroup and export these to user space. These statistics are essential for verifying whether the proper I/O priorities have been assigned to requests. An example of the statistics data with this patch applied: $ cat /sys/fs/cgroup/io.stat 11:2 rbytes=0 wbytes=0 rios=3 wios=0 dbytes=0 dios=0 [NONE] dispatched=0 inserted=0 merged=171 [RT] dispatched=0 inserted=0 merged=0 [BE] dispatched=0 inserted=0 merged=0 [IDLE] dispatched=0 inserted=0 merged=0 8:32 rbytes=2142720 wbytes=0 rios=105 wios=0 dbytes=0 dios=0 [NONE] dispatched=0 inserted=0 merged=171 [RT] dispatched=0 inserted=0 merged=0 [BE] dispatched=0 inserted=0 merged=0 [IDLE] dispatched=0 inserted=0 merged=0 Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-16-bvanassche@acm.org Signed-off-by: Jens Axboe commit 38ba64d12d4cf9fa260c45d7398e2a24afaceefa Author: Bart Van Assche Date: Thu Jun 17 17:44:54 2021 -0700 block/mq-deadline: Track I/O statistics Track I/O statistics per I/O priority and export these statistics to debugfs. These statistics help developers of the deadline scheduler. Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-15-bvanassche@acm.org Signed-off-by: Jens Axboe commit c807ab520fc3fd056c47c74ced63f9d3991a171b Author: Bart Van Assche Date: Thu Jun 17 17:44:53 2021 -0700 block/mq-deadline: Add I/O priority support Maintain one dispatch list and one FIFO list per I/O priority class: RT, BE and IDLE. Maintain statistics for each priority level. Split the debugfs attributes per priority level as follows: $ ls /sys/kernel/debug/block/.../sched/ async_depth dispatch2 read_next_rq write2_fifo_list batching read0_fifo_list starved write_next_rq dispatch0 read1_fifo_list write0_fifo_list dispatch1 read2_fifo_list write1_fifo_list Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-14-bvanassche@acm.org Signed-off-by: Jens Axboe commit d672d325b1492f5b0e54b7226f01e2d57b58bfb4 Author: Bart Van Assche Date: Thu Jun 17 17:44:52 2021 -0700 block/mq-deadline: Micro-optimize the batching algorithm When dispatching the first request of a batch, the deadline_move_request() call clears .next_rq[] for the opposite data direction. .next_rq[] is not restored when changing data direction. Fix this by not clearing .next_rq[] and by keeping track of the data direction of a batch in a variable instead. This patch is a micro-optimization because: - The number of deadline_next_request() calls for the read direction is halved. - The number of times that deadline_next_request() returns NULL is reduced. Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-13-bvanassche@acm.org Signed-off-by: Jens Axboe commit 07757588e5076748308dd95ee2e3cd0b82ebb8c4 Author: Bart Van Assche Date: Thu Jun 17 17:44:51 2021 -0700 block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests For interactive workloads it is important that synchronous requests are not delayed. Hence reserve 25% of scheduler tags for synchronous requests. This patch still allows asynchronous requests to fill the hardware queues since blk_mq_init_sched() makes sure that the number of scheduler requests is the double of the hardware queue depth. From blk_mq_init_sched(): q->nr_requests = 2 * min_t(unsigned int, q->tag_set->queue_depth, BLKDEV_MAX_RQ); Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-12-bvanassche@acm.org Signed-off-by: Jens Axboe commit d6d7f013d65491eaff477b9bd83b80111f5be9e4 Author: Bart Van Assche Date: Thu Jun 17 17:44:50 2021 -0700 block/mq-deadline: Improve the sysfs show and store macros Define separate macros for integers and jiffies to improve readability. Use sysfs_emit() and kstrtoint() instead of sprintf() and simple_strtol(). The former functions are the recommended functions. Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-11-bvanassche@acm.org Signed-off-by: Jens Axboe commit 004a26b327c2e1ea88b2638cf16c0e30e82f297e Author: Bart Van Assche Date: Thu Jun 17 17:44:49 2021 -0700 block/mq-deadline: Improve compile-time argument checking Modern compilers complain if an out-of-range value is passed to a function argument that has an enumeration type. Let the compiler detect out-of-range data direction arguments instead of verifying the data_dir argument at runtime. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-10-bvanassche@acm.org Signed-off-by: Jens Axboe commit 3e9a99eba058f79736dccaf25934f8d6ca380fb3 Author: Bart Van Assche Date: Thu Jun 17 17:44:48 2021 -0700 block/mq-deadline: Rename dd_init_queue() and dd_exit_queue() Change "queue" into "sched" to make the function names reflect better the purpose of these functions. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-9-bvanassche@acm.org Signed-off-by: Jens Axboe commit 2f295beab40f13ab93c004d45372238f2066a5ee Author: Bart Van Assche Date: Thu Jun 17 17:44:47 2021 -0700 block/mq-deadline: Remove two local variables Make __dd_dispatch_request() easier to read by removing two local variables. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-8-bvanassche@acm.org Signed-off-by: Jens Axboe commit 3bd473f41ae990815d6f75d285b161eebf361278 Author: Bart Van Assche Date: Thu Jun 17 17:44:46 2021 -0700 block/mq-deadline: Add two lockdep_assert_held() statements Document the locking strategy by adding two lockdep_assert_held() statements. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-7-bvanassche@acm.org Signed-off-by: Jens Axboe commit 46eae2e32a6adc368230b4df0501082c5233e99c Author: Bart Van Assche Date: Thu Jun 17 17:44:45 2021 -0700 block/mq-deadline: Add several comments Make the code easier to read by adding more comments. Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-6-bvanassche@acm.org Signed-off-by: Jens Axboe commit 556910e39249d55e23deaec479f49e7d85bc0d24 Author: Bart Van Assche Date: Thu Jun 17 17:44:44 2021 -0700 block: Introduce the ioprio rq-qos policy Introduce an rq-qos policy that assigns an I/O priority to requests based on blk-cgroup configuration settings. This policy has the following advantages over the ioprio_set() system call: - This policy is cgroup based so it has all the advantages of cgroups. - While ioprio_set() does not affect page cache writeback I/O, this rq-qos controller affects page cache writeback I/O for filesystems that support assiociating a cgroup with writeback I/O. See also Documentation/admin-guide/cgroup-v2.rst. Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210618004456.7280-5-bvanassche@acm.org Signed-off-by: Jens Axboe commit fb44023e70224c3bd9eb949bd3ab66876bd14c56 Author: Bart Van Assche Date: Thu Jun 17 17:44:43 2021 -0700 block/blk-rq-qos: Move a function from a header file into a C file rq_qos_id_to_name() is only used in blk-mq-debugfs.c so move that function into in blk-mq-debugfs.c. Cc: Damien Le Moal Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Reviewed-by: Himanshu Madhani Link: https://lore.kernel.org/r/20210618004456.7280-4-bvanassche@acm.org Signed-off-by: Jens Axboe commit 19688d7f9592b8222f530037d9328fdc90fff14c Author: Bart Van Assche Date: Thu Jun 17 17:44:42 2021 -0700 block/blk-cgroup: Swap the blk_throtl_init() and blk_iolatency_init() calls Before adding more calls in this function, simplify the error path. Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Tejun Heo Cc: Christoph Hellwig Cc: Ming Lei Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Reviewed-by: Himanshu Madhani Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20210618004456.7280-3-bvanassche@acm.org Signed-off-by: Jens Axboe commit 5f6776ba413ce273f7cb211f1cf8771f0cde7c81 Author: Bart Van Assche Date: Thu Jun 17 17:44:41 2021 -0700 block/Kconfig: Make the BLK_WBT and BLK_WBT_MQ entries consecutive These entries were consecutive at the time of their introduction but are no longer consecutive. Make these again consecutive. Additionally, modify the help text since it refers to blk-mq and since the legacy block layer has been removed. Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Ming Lei Cc: Himanshu Madhani Signed-off-by: Bart Van Assche Reviewed-by: Himanshu Madhani Link: https://lore.kernel.org/r/20210618004456.7280-2-bvanassche@acm.org Signed-off-by: Jens Axboe commit ea45fdf82cc90430bb7c280e5e53821e833782c5 Author: Pablo Neira Ayuso Date: Sat Jun 19 01:25:14 2021 +0200 netfilter: nf_tables_offload: check FLOW_DISSECTOR_KEY_BASIC in VLAN transfer logic The VLAN transfer logic should actually check for FLOW_DISSECTOR_KEY_BASIC, not FLOW_DISSECTOR_KEY_CONTROL. Moreover, do not fallback to case 2) .n_proto is set to 802.1q or 802.1ad, if FLOW_DISSECTOR_KEY_BASIC is unset. Fixes: 783003f3bb8a ("netfilter: nftables_offload: special ethertype handling for VLAN") Signed-off-by: Pablo Neira Ayuso commit 3c5e44622011b9ea21bd425875dcccfc9a158f5f Author: Pablo Neira Ayuso Date: Sat Jun 19 00:55:20 2021 +0200 netfilter: nf_tables: memleak in hw offload abort path Release flow from the abort path, this is easy to reproduce since b72920f6e4a9 ("netfilter: nftables: counter hardware offload support"). If the preparation phase fails, then the abort path is exercised without releasing the flow rule object. unreferenced object 0xffff8881f0fa7700 (size 128): comm "nft", pid 1335, jiffies 4294931120 (age 4163.740s) hex dump (first 32 bytes): 08 e4 de 13 82 88 ff ff 98 e4 de 13 82 88 ff ff ................ 48 e4 de 13 82 88 ff ff 01 00 00 00 00 00 00 00 H............... backtrace: [<00000000634547e7>] flow_rule_alloc+0x26/0x80 [<00000000c8426156>] nft_flow_rule_create+0xc9/0x3f0 [nf_tables] [<0000000075ff8e46>] nf_tables_newrule+0xc79/0x10a0 [nf_tables] [<00000000ba65e40e>] nfnetlink_rcv_batch+0xaac/0xf90 [nfnetlink] [<00000000505c614a>] nfnetlink_rcv+0x1bb/0x1f0 [nfnetlink] [<00000000eb78e1fe>] netlink_unicast+0x34b/0x480 [<00000000a8f72c94>] netlink_sendmsg+0x3af/0x690 [<000000009cb1ddf4>] sock_sendmsg+0x96/0xa0 [<0000000039d06e44>] ____sys_sendmsg+0x3fe/0x440 [<00000000137e82ca>] ___sys_sendmsg+0xd8/0x140 [<000000000c6bf6a6>] __sys_sendmsg+0xb3/0x130 [<0000000043bd6268>] do_syscall_64+0x40/0xb0 [<00000000afdebc2d>] entry_SYSCALL_64_after_hwframe+0x44/0xae Remove flow rule release from the offload commit path, otherwise error from the offload commit phase might trigger a double-free due to the execution of the abort_offload -> abort. After this patch, the abort path takes care of releasing the flow rule. This fix also needs to move the nft_flow_rule_create() call before the transaction object is added otherwise the abort path might find a NULL pointer to the flow rule object for the NFT_CHAIN_HW_OFFLOAD case. While at it, rename BASIC-like goto tags to slightly more meaningful names rather than adding a new "err3" tag. Fixes: 63b48c73ff56 ("netfilter: nf_tables_offload: undo updates if transaction fails") Signed-off-by: Pablo Neira Ayuso commit 867de40c4c23e6d7f89f9ce4272a5d1b1484c122 Author: Mikulas Patocka Date: Mon Jun 21 14:48:29 2021 -0400 dm writecache: write at least 4k when committing SSDs perform badly with sub-4k writes (because they perfrorm read-modify-write internally), so make sure writecache writes at least 4k when committing. Fixes: 991bd8d7bc78 ("dm writecache: commit just one block, not a full page") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 24610ed80df65a564d6165d15505a950d05f9f5a Author: Dan Carpenter Date: Sat Jun 19 16:55:46 2021 +0300 netfilter: nfnetlink_hook: fix check for snprintf() overflow The kernel version of snprintf() can't return negatives. The "ret > (int)sizeof(sym)" check is off by one because and it should be >=. Finally, we need to set a negative error code. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Dan Carpenter Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 972d6a7dcec3ad3226661034c5d8cb2d30585157 Author: Rob Herring Date: Tue Jun 15 13:15:43 2021 -0600 dt-bindings: Drop redundant minItems/maxItems If a property has an 'items' list, then a 'minItems' or 'maxItems' with the same size as the list is redundant and can be dropped. Note that is DT schema specific behavior and not standard json-schema behavior. The tooling will fixup the final schema adding any unspecified minItems/maxItems. This condition is partially checked with the meta-schema already, but only if both 'minItems' and 'maxItems' are equal to the 'items' length. An improved meta-schema is pending. Cc: Jens Axboe Cc: Stephen Boyd Cc: Herbert Xu Cc: "David S. Miller" Cc: David Airlie Cc: Daniel Vetter Cc: Bartosz Golaszewski Cc: Kamal Dasu Cc: Lars-Peter Clausen Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Joerg Roedel Cc: Mauro Carvalho Chehab Cc: Krzysztof Kozlowski Cc: Jakub Kicinski Cc: Wolfgang Grandegger Cc: Andrew Lunn Cc: Vivien Didelot Cc: Vladimir Oltean Cc: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Linus Walleij Cc: "Uwe Kleine-König" Cc: Lee Jones Cc: Ohad Ben-Cohen Cc: Mathieu Poirier Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Zhang Rui Cc: Daniel Lezcano Cc: Wim Van Sebroeck Cc: Guenter Roeck Signed-off-by: Rob Herring Acked-by: Marc Kleine-Budde Acked-by: Ulf Hansson # for MMC Acked-by: Jassi Brar Acked-By: Vinod Koul Reviewed-by: Greg Kroah-Hartman Reviewed-by: Arnaud Pouliquen Acked-by: Mark Brown Acked-by: Philipp Zabel Acked-by: Wolfram Sang # for I2C Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210615191543.1043414-1-robh@kernel.org commit dc4014752eb7489eff43d426bf6b1caeb4092699 Author: Rob Herring Date: Tue Jun 15 11:20:24 2021 -0600 dt-bindings: spmi: Correct 'reg' schema 'reg' is defined to be N address entries of M cells each. For SPMI, N is 1 and M is 1 or 2. The schema fails to define the number of entries as it only specifies the inner cell(s). To fix, add an outer items list with 1 entry. Cc: Stephen Boyd Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210615172024.856360-1-robh@kernel.org commit 67a066b35765d13a55a56edd9b1f54dee9e441e1 Author: Dmitry Osipenko Date: Thu Jun 10 19:23:13 2021 +0300 of: reserved-memory: Add stub for RESERVEDMEM_OF_DECLARE() The reserved-memory Kconfig could be disabled when drivers are compile-tested. In this case RESERVEDMEM_OF_DECLARE() produces a noisy warning about the orphaned __reservedmem_of_table section. Add the missing stub that fixes the warning. In particular this is needed for compile-testing of NVIDIA Tegra210 memory driver which uses reserved-memory. Reported-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210610162313.20942-1-digetx@gmail.com Signed-off-by: Rob Herring commit 89f8a707d00890d302f6d4320d4ecdba12c26bdf Author: Sean Anderson Date: Mon Jun 7 15:05:46 2021 -0400 dt-bindings: clk: vc5: Fix example The example properties do not match the binding. Fix them, and prohibit undocumented properties in clock nodes to prevent this from happening in the future. Fixes: 45c940184b50 ("dt-bindings: clk: versaclock5: convert to yaml") Signed-off-by: Sean Anderson Reviewed-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210607190546.2616259-1-sean.anderson@seco.com Signed-off-by: Rob Herring commit 6ff5f8135af71beaa1345fc10eb595c7c39f9424 Merge: 41505d3f0f513 f9bcdc362c777 Author: David S. Miller Date: Mon Jun 21 12:50:20 2021 -0700 Merge branch 'dsa-cross-chip' Vladimir Oltean says: ==================== Improvement for DSA cross-chip setups This series improves some aspects in multi-switch DSA tree topologies: - better device tree validation - better handling of MTU changes - better handling of multicast addresses - removal of some unused code ==================== Signed-off-by: David S. Miller commit f9bcdc362c7776b875c0f390e982cbac597d660f Author: Vladimir Oltean Date: Mon Jun 21 19:42:19 2021 +0300 net: dsa: remove cross-chip support from the MRP notifiers With MRP hardware assist being supported only by the ocelot switch family, which by design does not support cross-chip bridging, the current match functions are at best a guess and have not been confirmed in any way to do anything relevant in a multi-switch topology. Drop the code and make the notifiers match only on the targeted switch port. Cc: Horatiu Vultur Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 88faba20e2100c1f367133af56612742ad37df08 Author: Vladimir Oltean Date: Mon Jun 21 19:42:18 2021 +0300 net: dsa: targeted MTU notifiers should only match on one port dsa_slave_change_mtu() calls dsa_port_mtu_change() twice: - it sends a cross-chip notifier with the MTU of the CPU port which is used to update the DSA links. - it sends one targeted MTU notifier which is supposed to only match the user port on which we are changing the MTU. The "propagate_upstream" variable is used here to bypass the cross-chip notifier system from switch.c But due to a mistake, the second, targeted notifier matches not only on the user port, but also on the DSA link which is a member of the same switch, if that exists. And because the DSA links of the entire dst were programmed in a previous round to the largest_mtu via a "propagate_upstream == true" notification, then the dsa_port_mtu_change(propagate_upstream == false) call that is immediately upcoming will break the MTU on the one DSA link which is chip-wise local to the dp whose MTU is changing right now. Example given this daisy chain topology: sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ cpu ] [ user ] [ user ] [ dsa ] [ user ] [ x ] [ ] [ ] [ x ] [ ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] ip link set sw0p1 mtu 9000 ip link set sw1p1 mtu 9000 # at this stage, sw0p1 and sw1p1 can talk # to one another using jumbo frames ip link set sw0p2 mtu 1500 # this programs the sw0p3 DSA link first to # the largest_mtu of 9000, then reprograms it to # 1500 with the "propagate_upstream == false" # notifier, breaking communication between # sw0p1 and sw1p1 To escape from this situation, make the targeted match really match on a single port - the user port, and rename the "propagate_upstream" variable to "targeted_match" to clarify the intention and avoid future issues. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4e4ab7950044d195f6e3d4dac328f506badb6efa Author: Vladimir Oltean Date: Mon Jun 21 19:42:17 2021 +0300 net: dsa: calculate the largest_mtu across all ports in the tree If we have a cross-chip topology like this: sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ cpu ] [ user ] [ user ] [ dsa ] [ user ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] and we issue the following commands: 1. ip link set sw0p1 mtu 1700 2. ip link set sw1p1 mtu 1600 we notice the following happening: Command 1. emits a non-targeted MTU notifier for the CPU port (sw0p0) with the largest_mtu calculated across switch 0, of 1700. This matches sw0p0, sw0p3 and sw1p4 (all CPU ports and DSA links). Then, it emits a targeted MTU notifier for the user port (sw0p1), again with MTU 1700 (this doesn't matter). Command 2. emits a non-targeted MTU notifier for the CPU port (sw0p0) with the largest_mtu calculated across switch 1, of 1600. This matches the same group of ports as above, and decreases the MTU for the CPU port and the DSA links from 1700 to 1600. As a result, the sw0p1 user port can no longer communicate with its CPU port at MTU 1700. To address this, we should calculate the largest_mtu across all switches that may share a CPU port, and only emit MTU notifiers with that value. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit abd49535c3801f33c3ca42d81271d7e535adce81 Author: Vladimir Oltean Date: Mon Jun 21 19:42:16 2021 +0300 net: dsa: execute dsa_switch_mdb_add only for routing port in cross-chip topologies Currently, the notifier for adding a multicast MAC address matches on the targeted port and on all DSA links in the system, be they upstream or downstream links. This leads to a considerable amount of useless traffic. Consider this daisy chain topology, and a MDB add notifier emitted on sw0p0. It matches on sw0p0, sw0p3, sw1p3 and sw2p4. sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ user ] [ user ] [ user ] [ dsa ] [ cpu ] [ x ] [ ] [ ] [ x ] [ ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] [ ] [ ] [ ] [ x ] [ x ] | +---------+ | sw2p0 sw2p1 sw2p2 sw2p3 sw2p4 [ user ] [ user ] [ user ] [ user ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] But switch 0 has no reason to send the multicast traffic for that MAC address on sw0p3, which is how it reaches switches 1 and 2. Those switches don't expect, according to the user configuration, to receive this multicast address from switch 1, and they will drop it anyway, because the only valid destination is the port they received it on. They only need to configure themselves to deliver that multicast address _towards_ switch 1, where the MDB entry is installed. Similarly, switch 1 should not send this multicast traffic towards sw1p3, because that is how it reaches switch 2. With this change, the heat map for this MDB notifier changes as follows: sw0p0 sw0p1 sw0p2 sw0p3 sw0p4 [ user ] [ user ] [ user ] [ dsa ] [ cpu ] [ x ] [ ] [ ] [ ] [ ] | +---------+ | sw1p0 sw1p1 sw1p2 sw1p3 sw1p4 [ user ] [ user ] [ user ] [ dsa ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] | +---------+ | sw2p0 sw2p1 sw2p2 sw2p3 sw2p4 [ user ] [ user ] [ user ] [ user ] [ dsa ] [ ] [ ] [ ] [ ] [ x ] Now the mdb notifier behaves the same as the fdb notifier. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a8986681ccada614a30df7248390780e7708a763 Author: Vladimir Oltean Date: Mon Jun 21 19:42:15 2021 +0300 net: dsa: export the dsa_port_is_{user,cpu,dsa} helpers The difference between dsa_is_user_port and dsa_port_is_user is that the former needs to look up the list of ports of the DSA switch tree in order to find the struct dsa_port, while the latter directly receives it as an argument. dsa_is_user_port is already in widespread use and has its place, so there isn't any chance of converting all callers to a single form. But being able to do: dsa_port_is_user(dp) instead of dsa_is_user_port(dp->ds, dp->index) is much more efficient too, especially when the "dp" comes from an iterator over the DSA switch tree - this reduces the complexity from quadratic to linear. Move these helpers from dsa2.c to include/net/dsa.h so that others can use them too. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8674f8d310215d2bb7469b80e6cfccc044f717b3 Author: Vladimir Oltean Date: Mon Jun 21 19:42:14 2021 +0300 net: dsa: assert uniqueness of dsa,member properties The cross-chip notifiers work by comparing each ds->index against the info->sw_index value from the notifier. The ds->index is retrieved from the device tree dsa,member property. If a single tree cross-chip topology does not declare unique switch IDs, this will result in hard-to-debug issues/voodoo effects such as the cross-chip notifier for one switch port also matching the port with the same number from another switch. Check in dsa_switch_parse_member_of() whether the DSA switch tree contains a DSA switch with the index we're preparing to add, before actually adding it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d452d48b9f8b1a7f8152d33ef52cfd7fe1735b0a Author: Jakub Kicinski Date: Fri Jun 18 13:34:06 2021 -0700 tls: prevent oversized sendfile() hangs by ignoring MSG_MORE We got multiple reports that multi_chunk_sendfile test case from tls selftest fails. This was sort of expected, as the original fix was never applied (see it in the first Link:). The test in question uses sendfile() with count larger than the size of the underlying file. This will make splice set MSG_MORE on all sendpage calls, meaning TLS will never close and flush the last partial record. Eric seem to have addressed a similar problem in commit 35f9c09fe9c7 ("tcp: tcp_sendpages() should call tcp_push() once") by introducing MSG_SENDPAGE_NOTLAST. Unlike MSG_MORE MSG_SENDPAGE_NOTLAST is not set on the last call of a "pipefull" of data (PIPE_DEF_BUFFERS == 16, so every 16 pages or whenever we run out of data). Having a break every 16 pages should be fine, TLS can pack exactly 4 pages into a record, so for aligned reads there should be no difference, unaligned may see one extra record per sendpage(). Sticking to TCP semantics seems preferable to modifying splice, but we can revisit it if real life scenarios show a regression. Reported-by: Vadim Fedorenko Reported-by: Seth Forshee Link: https://lore.kernel.org/netdev/1591392508-14592-1-git-send-email-pooja.trivedi@stackpath.com/ Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Jakub Kicinski Tested-by: Seth Forshee Signed-off-by: David S. Miller commit 41505d3f0f51329c959e92479ed1219a2e85f5c2 Author: Peng Li Date: Sat Jun 19 15:28:38 2021 +0800 net: c101: remove redundant spaces According to the chackpatch.pl, no space before tabs. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 7774318b9e5eb8ecfb42be04d65ff8ac657b5faa Author: Peng Li Date: Sat Jun 19 15:28:37 2021 +0800 net: c101: replace comparison to NULL with "!card" According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 4f7d2247f839c8cf266662a83238c85ef21ea9c6 Author: Peng Li Date: Sat Jun 19 15:28:36 2021 +0800 net: c101: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit c3dcb4b6c41965648769ca47060f6abe8dee8a37 Merge: 63d66ec924d32 1e27b9e408039 Author: David S. Miller Date: Mon Jun 21 12:33:05 2021 -0700 Merge branch 'mlxsw-eeprom-page-by-page' Ido Schimmel says: ==================== mlxsw: Add support for module EEPROM read by page Add support for ethtool_ops::get_module_eeprom_by_page() operation. Patch #1 adds necessary field in device register. Patch #2 documents possible MCIA status values so that more meaningful error messages could be returned to user space via extack. Patch #3 adds the actual implementation. =================== Signed-off-by: David S. Miller commit 1e27b9e408039af6210708f76c6fe735c2c2c9c1 Author: Ido Schimmel Date: Mon Jun 21 10:50:41 2021 +0300 mlxsw: core: Add support for module EEPROM read by page Add support for ethtool_ops::get_module_eeprom_by_page() which allows user space to read transceiver module EEPROM based on passed parameters. The I2C address is not validated in order to avoid module-specific code. In case of wrong address, error will be returned from device's firmware. Tested by comparing output with legacy method (ioctl) output. Signed-off-by: Ido Schimmel Tested-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit cecefb3a6eeb5d835abd051e67e27e1506289ccf Author: Ido Schimmel Date: Mon Jun 21 10:50:40 2021 +0300 mlxsw: reg: Document possible MCIA status values Will be used to emit meaningful messages to user space via extack in a subsequent patch. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d51ea60e01f9fab3269e18d46657a9ae0c2fa3ad Author: Ido Schimmel Date: Mon Jun 21 10:50:39 2021 +0300 mlxsw: reg: Add bank number to MCIA register Add bank number to MCIA (Management Cable Info Access) register in order to allow access to banked pages on EEPROMs using CMIS (Common Management Interface Specification) memory map. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 63d66ec924d3237437e4aa4152cd2d98e318a171 Merge: be752283a2a2b 1bb1a117878b9 Author: David S. Miller Date: Mon Jun 21 12:31:00 2021 -0700 Merge branch 'ipa-v3.1' Alex Elder says: ==================== net: ipa: add support for IPA v3.1 This series adds support for IPA v3.1, used by the Qualcomm Snapdragon 835 (MSM8998). The first patch adds "qcom,msm8998-ipa" to the DT binding. The next four patches add code to ensure correct operation on IPA v3.1: - Avoid touching unsupported inter-EE interrupt mask registers - Set the proper flags in the clock configuration register - Work around the lack of an IPA FLAVOR_0 register - Work around the lack of a GSI PARAM_2 register The last patch defines configuration data for this version of IPA. Many thanks are due to AngeloGioacchino Del Regno and Jami Kettunen, both associated with SoMainline. Angelo first posted code to implement most of what was required for this, and Jami has been helpful testing these changes on his hardware. ==================== Signed-off-by: David S. Miller commit 1bb1a117878b925dcb959830cd3384c11ed0dea5 Author: Alex Elder Date: Mon Jun 21 12:56:27 2021 -0500 net: ipa: add IPA v3.1 configuration data Add support for the MSM8998 SoC, which includes IPA version 3.1. Originally proposed by AngeloGioacchino Del Regno. Link: https://lore.kernel.org/netdev/20210211175015.200772-6-angelogioacchino.delregno@somainline.org Signed-off-by: Alex Elder Acked-by: AngeloGioacchino Del Regno Signed-off-by: David S. Miller commit bae70a803a771d0f1e55cfe1db195d8af2765dd8 Author: Alex Elder Date: Mon Jun 21 12:56:26 2021 -0500 net: ipa: introduce gsi_ring_setup() Prior to IPA v3.5.1, there is no HW_PARAM_2 GSI register, which we use to determine the number of channels and endpoints per execution environment. In that case, we will just assume the number supported is the maximum supported by the driver. Introduce gsi_ring_setup() to encapsulate the code that determines the number of channels and endpoints. Update GSI_EVT_RING_COUNT_MAX so it is big enough to handle any available channel for all supported hardware (IPA v4.9 can have 23 channels and 24 event rings). Signed-off-by: Alex Elder Acked-by: AngeloGioacchino Del Regno Signed-off-by: David S. Miller commit 110971d1ee4db10f48374a9303e86db158da354e Author: Alex Elder Date: Mon Jun 21 12:56:25 2021 -0500 net: ipa: FLAVOR_0 register doesn't exist until IPA v3.5 The FLAVOR_0 version first appears in IPA v3.5, so avoid attempting to read it for versions prior to that. This register contains a concise definition of the number and direction of endpoints supported by the hardware, and without it we can't verify endpoint configuration in ipa_endpoint_config(). In this case, just indicate that any endpoint number is available for use. Originally proposed by AngeloGioacchino Del Regno. Link: https://lore.kernel.org/netdev/20210211175015.200772-3-angelogioacchino.delregno@somainline.org Signed-off-by: Alex Elder Acked-by: AngeloGioacchino Del Regno Signed-off-by: David S. Miller commit 3833d0abd2c5827fb50a6cc9f1654d7ea0b64b2c Author: Alex Elder Date: Mon Jun 21 12:56:24 2021 -0500 net: ipa: disable misc clock gating for IPA v3.1 For IPA v3.1, a workaround is needed to disable gating on a MISC clock. I have no further explanation, but this is what the downstream code (msm-4.4) does. This was suggested in a patch from AngeloGioacchino Del Regno. Link: https://lore.kernel.org/netdev/20210211175015.200772-2-angelogioacchino.delregno@somainline.org Signed-off-by: Alex Elder Acked-by: AngeloGioacchino Del Regno Signed-off-by: David S. Miller commit c31d73494fa5016596f0b36aeb3e388160c9c473 Author: Alex Elder Date: Mon Jun 21 12:56:23 2021 -0500 net: ipa: inter-EE interrupts aren't always available The GSI inter-EE interrupts are not supported prior to IPA v3.5. Don't attempt to initialize them in gsi_irq_setup() for hardware that does not support them. Originally proposed by AngeloGioacchino Del Regno. Link: https://lore.kernel.org/netdev/20210211175015.200772-4-angelogioacchino.delregno@somainline.org Signed-off-by: Alex Elder Acked-by: AngeloGioacchino Del Regno Signed-off-by: David S. Miller commit 2afd6c8b43c1ee50444d410e953d7d2adf86b5ea Author: Alex Elder Date: Mon Jun 21 12:56:22 2021 -0500 dt-bindings: net: qcom,ipa: add support for MSM8998 Add support for "qcom,msm8998-ipa", which uses IPA v3.1. Originally proposed by AngeloGioacchino Del Regno. Link: https://lore.kernel.org/linux-arm-msm/20210211175015.200772-8-angelogioacchino.delregno@somainline.org Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit be752283a2a2b4bfc2df512b5d9b03a34aece252 Author: Al Viro Date: Sat Jun 19 03:50:33 2021 +0000 __unix_find_socket_byname(): don't pass hash and type separately We only care about exclusive or of those, so pass that directly. Makes life simpler for callers as well... Signed-off-by: Al Viro Signed-off-by: David S. Miller commit c0c3b8d380a8f54c75786d41f6f9efbe761dac6c Author: Al Viro Date: Sat Jun 19 03:50:32 2021 +0000 unix_bind_bsd(): unlink if we fail after successful mknod We can do that more or less safely, since the parent is held locked all along. Yes, somebody might observe the object via dcache, only to have it disappear afterwards, but there's really no good way to prevent that. It won't race with other bind(2) or attempts to move the sucker elsewhere, or put something else in its place - locked parent prevents that. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 56c1731b280dc71febf5df80fcac1923ea973ab8 Author: Al Viro Date: Sat Jun 19 03:50:31 2021 +0000 unix_bind_bsd(): move done_path_create() call after dealing with ->bindlock Final preparations for doing unlink on failure past the successful mknod. We can't hold ->bindlock over ->mknod() or ->unlink(), since either might do sb_start_write() (e.g. on overlayfs). However, we can do it while holding filesystem and VFS locks - doing kern_path_create() vfs_mknod() grab ->bindlock if u->addr had been set drop ->bindlock done_path_create return -EINVAL else assign the address to socket drop ->bindlock done_path_create return 0 would be deadlock-free. Here we massage unix_bind_bsd() to that form. We are still doing equivalent transformations. Next commit will *not* be an equivalent transformation - it will add a call of vfs_unlink() before done_path_create() in "alread bound" case. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 71e6be6f7d2bada7099d79205779c4452d4fd35b Author: Al Viro Date: Sat Jun 19 03:50:30 2021 +0000 fold unix_mknod() into unix_bind_bsd() Signed-off-by: Al Viro Signed-off-by: David S. Miller commit fa42d910a38ee310d5c6826563dd58a08735d5b0 Author: Al Viro Date: Sat Jun 19 03:50:29 2021 +0000 unix_bind(): take BSD and abstract address cases into new helpers unix_bind_bsd() and unix_bind_abstract() respectively. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit aee515170576609a0aa3413dc06a7f36f05a5fe2 Author: Al Viro Date: Sat Jun 19 03:50:28 2021 +0000 unix_bind(): separate BSD and abstract cases We do get some duplication that way, but it's minor compared to parts that are different. What we get is an ability to change locking in BSD case without making failure exits very hard to follow. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit c34d4582518ff83a4848c2d33a46be82e2499a5b Author: Al Viro Date: Sat Jun 19 03:50:27 2021 +0000 unix_bind(): allocate addr earlier makes it easier to massage; we do pay for that by extra work (kmalloc+memcpy+kfree) in some error cases, but those are not on the hot paths anyway. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit 185ab886d3fb283e837283c343bf539c371e26cf Author: Al Viro Date: Sat Jun 19 03:50:26 2021 +0000 af_unix: take address assignment/hash insertion into a new helper Duplicated logics in all bind variants (autobind, bind-to-path, bind-to-abstract) gets taken into a common helper. Signed-off-by: Al Viro Signed-off-by: David S. Miller commit d52f9b22d56f3fb304f35565aaff22c94c3d758e Merge: 0d98ec879ddce ab4a0b8fcb9a9 Author: David S. Miller Date: Mon Jun 21 12:23:49 2021 -0700 Merge tag 'linux-can-fixes-for-5.13-20210619' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-06-19 this is a pull request of 5 patches for net/master. The first patch is by Thadeu Lima de Souza Cascardo and fixes a potential use-after-free in the CAN broadcast manager socket, by delaying the release of struct bcm_op after synchronize_rcu(). Oliver Hartkopp's patch fixes a similar potential user-after-free in the CAN gateway socket by synchronizing RCU operations before removing gw job entry. Another patch by Oliver Hartkopp fixes a potential use-after-free in the ISOTP socket by omitting unintended hrtimer restarts on socket release. Oleksij Rempel's patch for the j1939 socket fixes a potential use-after-free by setting the SOCK_RCU_FREE flag on the socket. The last patch is by Pavel Skripkin and fixes a use-after-free in the ems_usb CAN driver. All patches are intended for stable and have stable@v.k.o on Cc. ==================== Signed-off-by: David S. Miller commit 0d98ec879ddce4f0c9d6913789dcb2d5a9443dbb Merge: 536ba2e06d1aa 1f9482aa8d412 Author: David S. Miller Date: Mon Jun 21 12:21:46 2021 -0700 Merge tag 'wireless-drivers-2021-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.13 Only one important fix for an mwifiex regression. mwifiex * fix deadlock during rmmod or firmware reset, regression from cfg80211 RTNL changes in v5.12-rc1 ==================== Signed-off-by: David S. Miller commit 43c9a8111680043d065025510a034336417084d1 Author: Dan Carpenter Date: Sat Jun 19 16:53:26 2021 +0300 nfp: flower-ct: check for error in nfp_fl_ct_offload_nft_flow() The nfp_fl_ct_add_flow() function can fail so we need to check for failure. Fixes: 95255017e0a8 ("nfp: flower-ct: add nft flows to nft list") Signed-off-by: Dan Carpenter Reviewed-by: Louis Peens Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 753ba09aa3ea14b593b168d3ef541da00f4659f5 Author: Dan Carpenter Date: Sat Jun 19 16:52:22 2021 +0300 net: qualcomm: rmnet: fix two pointer math bugs We recently changed these two pointers from void pointers to struct pointers and it breaks the pointer math so now the "txphdr" points beyond the end of the buffer. Fixes: 56a967c4f7e5 ("net: qualcomm: rmnet: Remove some unneeded casts") Signed-off-by: Dan Carpenter Reviewed-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit d5fff4629beadf262559cae79012ce0dee268c1d Author: Dan Carpenter Date: Sat Jun 19 16:51:26 2021 +0300 net: iosm: remove an unnecessary NULL check The address of &ipc_mux->ul_adb can't be NULL because it points to the middle of a non-NULL struct. Fixes: 9413491e20e1 ("net: iosm: encode or decode datagram") Signed-off-by: Dan Carpenter Reviewed-by: M Chetan Kumar Signed-off-by: David S. Miller commit 1a1100d53f12451d50bc5ebbc941517760912ab8 Author: Dan Carpenter Date: Sat Jun 19 16:50:21 2021 +0300 net/smc: Fix ENODATA tests in smc_nl_get_fback_stats() These functions return negative ENODATA but the minus sign was left out in the tests. Fixes: f0dd7bf5e330 ("net/smc: Add netlink support for SMC fallback statistics") Signed-off-by: Dan Carpenter Acked-by: Guvenc Gulce Signed-off-by: David S. Miller commit 956c3ae411b2746c5018e0454909eb8c662b31ef Author: Dan Carpenter Date: Sat Jun 19 16:49:18 2021 +0300 net: hns3: fix a double shift bug These flags are used to set and test bits like this: if (!test_bit(HCLGE_PTP_FLAG_TX_EN, &ptp->flags) || The issue is that test_bit() takes a bit number like 1, but we are passing BIT(1) instead and it's testing BIT(BIT(1)). This does not cause a problem because it is always done consistently and the bit values are very small. Fixes: 0bf5eb788512 ("net: hns3: add support for PTP") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit faebad853455b7126450c1690f7c31e048213543 Author: Dan Carpenter Date: Sat Jun 19 16:47:38 2021 +0300 net: hns3: fix different snprintf() limit This patch doesn't affect runtime at all, it's just a correctness issue. The ptp->info.name[] buffer has 16 characters but the snprintf() limit was capped at 32 characters. Fortunately, HCLGE_DRIVER_NAME is "hclge" which isn't close to 16 characters so we're fine. Fixes: 0bf5eb788512 ("net: hns3: add support for PTP") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 291c53e4dacd3a2cc3152d8af37f07f8496c594a Author: Jakub Kicinski Date: Fri Jun 18 13:25:04 2021 -0700 selftests: tls: fix chacha+bidir tests ChaCha support did not adjust the bidirectional test. We need to set up KTLS in reverse direction correctly, otherwise these two cases will fail: tls.12_chacha.bidir tls.13_chacha.bidir Fixes: 4f336e88a870 ("selftests/tls: add CHACHA20-POLY1305 to tls selftests") Signed-off-by: Jakub Kicinski Acked-by: Vadim Fedorenko Signed-off-by: David S. Miller commit baa00119d69e3318da8d99867fc1170ebddf09ce Author: Jakub Kicinski Date: Fri Jun 18 13:25:03 2021 -0700 selftests: tls: clean up uninitialized warnings A bunch of tests uses uninitialized stack memory as random data to send. This is harmless but generates compiler warnings. Explicitly init the buffers with random data. Signed-off-by: Jakub Kicinski Acked-by: Vadim Fedorenko Signed-off-by: David S. Miller commit 536ba2e06d1aaaed8a11c30e1609281cd955082e Author: Haiyang Zhang Date: Fri Jun 18 12:35:39 2021 -0700 hv_netvsc: Set needed_headroom according to VF Set needed_headroom according to VF if VF needs a bigger headroom. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 2b4cd14fd995e0a863b2ced4cba0bcd804d89ebc Author: Sebastian Andrzej Siewior Date: Thu Jun 17 09:38:17 2021 +0200 net/netif_receive_skb_core: Use migrate_disable() The preempt disable around do_xdp_generic() has been introduced in commit bbbe211c295ff ("net: rcu lock and preempt disable missing around generic xdp") For BPF it is enough to use migrate_disable() and the code was updated as it can be seen in commit 3c58482a382ba ("bpf: Provide bpf_prog_run_pin_on_cpu() helper") This is a leftover which was not converted. Use migrate_disable() before invoking do_xdp_generic(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller commit 89837eb4b2463c556a123437f242d6c2bc62ce81 Author: Yunsheng Lin Date: Thu Jun 17 09:04:14 2021 +0800 net: sched: add barrier to ensure correct ordering for lockless qdisc The spin_trylock() was assumed to contain the implicit barrier needed to ensure the correct ordering between STATE_MISSED setting/clearing and STATE_MISSED checking in commit a90c57f2cedd ("net: sched: fix packet stuck problem for lockless qdisc"). But it turns out that spin_trylock() only has load-acquire semantic, for strongly-ordered system(like x86), the compiler barrier implicitly contained in spin_trylock() seems enough to ensure the correct ordering. But for weakly-orderly system (like arm64), the store-release semantic is needed to ensure the correct ordering as clear_bit() and test_bit() is store operation, see queued_spin_lock(). So add the explicit barrier to ensure the correct ordering for the above case. Fixes: a90c57f2cedd ("net: sched: fix packet stuck problem for lockless qdisc") Signed-off-by: Yunsheng Lin Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 603113c514e95c3350598bc3cccbd03af7ea4ab2 Author: Antoine Tenart Date: Fri Jun 18 17:15:53 2021 +0200 vrf: do not push non-ND strict packets with a source LLA through packet taps again Non-ND strict packets with a source LLA go through the packet taps again, while non-ND strict packets with other source addresses do not, and we can see a clone of those packets on the vrf interface (we should not). This is due to a series of changes: Commit 6f12fa775530[1] made non-ND strict packets not being pushed again in the packet taps. This changed with commit 205704c618af[2] for those packets having a source LLA, as they need a lookup with the orig_iif. The issue now is those packets do not skip the 'vrf_ip6_rcv' function to the end (as the ones without a source LLA) and go through the check to call packet taps again. This check was changed by commit 6f12fa775530[1] and do not exclude non-strict packets anymore. Packets matching 'need_strict && !is_ndisc && is_ll_src' are now being sent through the packet taps again. This can be seen by dumping packets on the vrf interface. Fix this by having the same code path for all non-ND strict packets and selectively lookup with the orig_iif for those with a source LLA. This has the effect to revert to the pre-205704c618af[2] condition, which should also be easier to maintain. [1] 6f12fa775530 ("vrf: mark skb for multicast or link-local as enslaved to VRF") [2] 205704c618af ("vrf: packets with lladdr src needs dst at input with orig_iif when needs strict") Fixes: 205704c618af ("vrf: packets with lladdr src needs dst at input with orig_iif when needs strict") Cc: Stephen Suryaputra Reported-by: Paolo Abeni Signed-off-by: Antoine Tenart Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5e5234462756a39e56f4182694f47ec72b5abe52 Author: Keith Busch Date: Mon Jun 21 10:48:08 2021 -0700 coccinelle: api: remove kobj_to_dev.cocci script Using kobj_to_dev() instead of container_of() is not universally accepted among maintainers as an improvement. The warning leads to repeated patch submissions that won't be accepted. Remove the script. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Denis Efremov Cc: Julia Lawall Signed-off-by: Keith Busch Signed-off-by: Julia Lawall Acked-by: Jens Axboe Acked-by: Denis Efremov commit da43b7bebc3504f232b0849c04b787ca1544bee2 Author: Yangyang Li Date: Thu Jun 10 19:50:14 2021 +0800 RDMA/hns: Use IDA interface to manage xrcd index Switch xrcd index allocation and release from hns own bitmap interface to IDA interface. Link: https://lore.kernel.org/r/1623325814-55737-7-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 645f059346bfa32a51c44e638f58bcaa5571167e Author: Yangyang Li Date: Thu Jun 10 19:50:13 2021 +0800 RDMA/hns: Use IDA interface to manage pd index Switch pd index allocation and release from hns own bitmap interface to IDA interface. Link: https://lore.kernel.org/r/1623325814-55737-6-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d38936f01030f39bd90609c4d9c8f09cdaea1b62 Author: Yangyang Li Date: Thu Jun 10 19:50:12 2021 +0800 RDMA/hns: Use IDA interface to manage mtpt index Switch mtpt index allocation and release from hns own bitmap interface to IDA interface. Link: https://lore.kernel.org/r/1623325814-55737-5-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 38e375b7710f37a8ec98ec44baf2468e442206d9 Author: Yangyang Li Date: Thu Jun 10 19:50:11 2021 +0800 RDMA/hns: Remove unused RR mechanism Round-robin (RR) is no longer used in the allocation of the bitmap table, and all the function input parameters that use this mechanism are BITMAP_NO_RR. The code that defines and uses the RR needs to be deleted. Link: https://lore.kernel.org/r/1623325814-55737-4-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 1bc530c79d9346e3298359d4dbdbad204d078885 Author: Yangyang Li Date: Thu Jun 10 19:50:10 2021 +0800 RDMA/hns: Remove the unused hns_roce_bitmap_free_range function hns_roce_bitmap_free_range() is only called inside hns_roce_bitmap_free(), and the input parameter "cnt" is set to a constant 1. In addition, the driver does not use alloc_range scenarios, so free_range does not need to exist. Link: https://lore.kernel.org/r/1623325814-55737-3-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 24977edbb5c5e342bf63c533f43bdcb55d48d9fd Author: Yangyang Li Date: Thu Jun 10 19:50:09 2021 +0800 RDMA/hns: Remove the unused hns_roce_bitmap_alloc_range function The function is no longer used. Link: https://lore.kernel.org/r/1623325814-55737-2-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 3cea7b4a7d9b3cb8036ca799fe4254a710cd7e40 Author: Wenpeng Liang Date: Thu Jun 10 19:40:32 2021 +0800 RDMA/core: Fix incorrect print format specifier There are some '%u' for 'int' and '%d' for 'unsigend int', they should be fixed. Link: https://lore.kernel.org/r/1623325232-30900-1-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d1c02a745179ce9a2ed4c559422bf73bd5d99e1b Merge: 9d598cd737d15 66376e152303b Author: Mark Brown Date: Mon Jun 21 19:31:17 2021 +0100 Merge series "regulator: qcom,rpmh-regulator: Add support for pmic available on SA8155p-adp board" from Bhupesh Sharma : Changes since v2: ----------------- - v2 series can be found here: https://lore.kernel.org/linux-arm-msm/20210615074543.26700-1-bhupesh.sharma@linaro.org/T/#m8303d27d561b30133992da88198abb78ea833e21 - Addressed review comments from Bjorn and Mark. - As per suggestion from Bjorn, seperated the patches in different patchsets (specific to each subsystem) to ease review and patch application. Changes since v1: ----------------- - v1 series can be found here: https://lore.kernel.org/linux-arm-msm/20210607113840.15435-1-bhupesh.sharma@linaro.org/T/#mc524fe82798d4c4fb75dd0333318955e0406ad18 - Addressed review comments from Bjorn and Vinod received on the v1 series. This series adds the regulator support code for SA8155p-adp board which is based on Qualcomm snapdragon sa8155p SoC which in turn is simiar to the sm8150 SoC. This board supports a new PMIC PMM8155AU. While at it, also make some cosmetic changes to the regulator driver and dt-bindings to make sure the compatibles are alphabetical and also fix issues with extra comma(s) at the end of terminator line(s). Cc: Mark Brown Cc: Bjorn Andersson Bhupesh Sharma (5): dt-bindings: regulator: qcom,rpmh-regulator: Arrange compatibles alphabetically dt-bindings: regulator: qcom,rpmh-regulator: Add compatible for SA8155p-adp board pmic regulator: qcom-rpmh: Cleanup terminator line commas regulator: qcom-rpmh: Add terminator at the end of pm7325x_vreg_data[] array regulator: qcom-rpmh: Add new regulator found on SA8155p adp board .../regulator/qcom,rpmh-regulator.yaml | 17 ++--- drivers/regulator/qcom-rpmh-regulator.c | 62 +++++++++++++++---- 2 files changed, 59 insertions(+), 20 deletions(-) -- 2.31.1 commit 9d598cd737d15b5770c5bddf35a512f7ab07b78b Merge: 57c045bc72700 d55444adedaee Author: Mark Brown Date: Mon Jun 21 19:28:42 2021 +0100 Merge series "Extend regulator notification support" from Matti Vaittinen : Extend regulator notification support This series extends the regulator notification and error flag support. Initial discussion on the topic can be found here: https://lore.kernel.org/lkml/6046836e22b8252983f08d5621c35ececb97820d.camel@fi.rohmeurope.com/ In a nutshell - the series adds: 1. WARNING level events/error flags. (Patch 3) Current regulator 'ERROR' event notifications for over/under voltage, over current and over temperature are used to indicate condition where monitored entity is so badly "off" that it actually indicates a hardware error which can not be recovered. The most typical hanling for that is believed to be a (graceful) system-shutdown. Here we add set of 'WARNING' level flags to allow sending notifications to consumers before things are 'that badly off' so that consumer drivers can implement recovery-actions. 2. Device-tree properties for specifying limit values. (Patches 1, 5) Add limits for above mentioned 'ERROR' and 'WARNING' levels (which send notifications to consumers) and also for a 'PROTECTION' level (which will be used to immediately shut-down the regulator(s) W/O informing consumer drivers. Typically implemented by hardware). Property parsing is implemented in regulator core which then calls callback operations for limit setting from the IC drivers. A warning is emitted if protection is requested by device tree but the underlying IC does not support configuring requested protection. 3. Helpers which can be registered by IC. (Patch 4) Target is to avoid implementing IRQ handling and IRQ storm protection in each IC driver. (Many of the ICs implementin these IRQs do not allow masking or acking the IRQ but keep the IRQ asserted for the whole duration of problem keeping the processor in IRQ handling loop). 4. Emergency poweroff function (refactored out of the thermal_core to kernel/reboot.c) which is called if IC fires error IRQs but IC reading fails and given retry-count is exceeded. (Patches 2, 4) Please note that the mutex in the emergency shutdown was replaced by a simple atomic in order to allow call from any context. The helper was attempted to be done so it could be used to implement roughly same logic as is used in qcom-labibb regulator. This means amongst other things a safety shut-down if IC registers are not readable. Using these shut-down retry counters are optional. The idea is that the helper could be also used by simpler ICs which do not provide status register(s) which can be used to check if error is still active. ICs which do not have such status register can simply omit the 'renable' callback (and retry-counts etc) - and helper assumes the situation is Ok and re-enables IRQ after given time period. If problem persists the handler is ran again and another notification is sent - but at least the delay allows processor to avoid IRQ loop. Patch 7 takes this notification support in use at BD9576MUF. Patch 8 is related to MFD change which is not really related to the RFC here. It was added to this series in order to avoid potential conflicts. Patch 9 adds a maintainers entry. Changelog v10-RESEND: - rebased on v5.13-rc4 Changelog v10: - rebased on v5.13-rc2 - Move rdev_*() print macros to the internal.h and use rdev_dbg() from irq_helpers.c - Export rdev_get_name() and move it from coupler.h to driver.h for others to use. (It was already in coupler.h but not exported - usage was limited and coupler.h does not sound like optimal place as rdev_name is not only used by coupled regulators) - Send all regulator notifications from irq_helpers.c at one OR'd event for the sake of simplicity. For BD9576 this does not matter as it has own IRQ for each event case. Header defining events says they may be OR'd. - Change WARN() at protection shutdown to pr_emerg as suggested by Petr. Changelog v9: - rebases on v5.13-rc1 - Update thermal documentation - Fix regulator notification event number Changelog v8: - split shutdown API adding and thermal core taking it in use to own patches. - replace the spinlock with atomic when ensuring the emergency shutdown is only called once. Changelog v7: general: - rebased on v5.12-rc7 - new patch for refactoring the hw-failure reboot logic out of thermal_core.c for others to use. notification helpers: - fix regulator error_flags query - grammar/typos - do not BUG() but attempt to shut-down the system - use BITS_PER_TYPE() Changelog v6: Add MAINTAINERS entry Changes to IRQ notifiers - move devm functions to drivers/regulator/devres.c - drop irq validity check - use devm_add_action_or_reset() - fix styling issues - fix kerneldocs Changelog v5: - Fix the badly formatted pr_emerg() call. Changelog v4: - rebased on v5.12-rc6 - dropped RFC - fix external FET DT-binding. - improve prints for cases when expecting HW failure. - styling and typos Changelog v3: Regulator core: - Fix dangling pointer access at regulator_irq_helper() stpmic1_regulator: - fix function prototype (compile error) bd9576-regulator: - Update over current limits to what was given in new data-sheet (REV00K) - Allow over-current monitoring without external FET. Set limits to values given in data-sheet (REV00K). Changelog v2: Generic: - rebase on v5.12-rc2 + BD9576 series - Split devm variant of delayed wq to own series Regulator framework: - Provide non devm variant of IRQ notification helpers - shorten dt-property names as suggested by Rob - unconditionally call map_event in IRQ handling and require it to be populated BD9576 regulators: - change the FET resistance property to micro-ohms - fix voltage computation in OC limit setting commit 439779ffd9096526e57994b118a3169c9ec57f72 Merge: d7085db6e1923 a2f6ed4a44721 Author: Mark Brown Date: Mon Jun 21 19:16:54 2021 +0100 Merge series "ASoC: fsl: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang : patch #1 ~ #8: Use devm_platform_get_and_ioremap_resource() patch #9 check return value of platform_get_resource_byname() v2: change error message in patch #9 Yang Yingliang (9): ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname() sound/soc/fsl/fsl_asrc.c | 3 +-- sound/soc/fsl/fsl_aud2htx.c | 3 +-- sound/soc/fsl/fsl_easrc.c | 3 +-- sound/soc/fsl/fsl_esai.c | 3 +-- sound/soc/fsl/fsl_micfil.c | 3 +-- sound/soc/fsl/fsl_sai.c | 3 +-- sound/soc/fsl/fsl_spdif.c | 3 +-- sound/soc/fsl/fsl_ssi.c | 3 +-- sound/soc/fsl/fsl_xcvr.c | 4 ++++ 9 files changed, 12 insertions(+), 16 deletions(-) -- 2.25.1 commit d7085db6e19237cc4987d5eda95e35b44175a108 Merge: ef7eb57d21e88 8439c5861cf0c Author: Mark Brown Date: Mon Jun 21 19:16:53 2021 +0100 Merge series "ASoC: tidyup snd_soc_of_parse_daifmt()" from Kuninori Morimoto : Hi Mark These are v3 of parsing for daifmt. I want to add new audio-graph-card2 sound card driver, and this is last part of necessary soc-core cleanup for it. Current some drivers are using DT, and then, snd_soc_of_parse_daifmt() parses daifmt, but bitclock/frame provider parsing part is one of headache, because we are assuming below both cases. A) node { bitclock-master; frame-master; ... }; B) link { bitclock-master = <&xxx>; frame-master = <&xxx>; ... }; The original was style A), and style B) was added later. snd_soc_of_parse_daifmt() parses A) style as original style, and user need to update to B) style for clock_provider part if needed. To handle it more flexibile, this patch-set adds new functions which separates snd_soc_of_parse_daifmt() helper function. snd_soc_daifmt_parse_format() : format part snd_soc_daifmt_parse_clock_provider_as_flag() : clock part for style A) snd_soc_daifmt_parse_clock_provider_as_phandl() : clock part for style B) snd_soc_daifmt_parse_clock_provider_as_bitmap() : clock part use with _from_bitmap v1 -> v2 - tidyup parse_clock_provider functions to _as_flag/phandle/bitmap() - don't exchange code style on each drivers. v2 -> v3 - use daifmt as much as possible (don't use daiclk) on each driver. Link: https://lore.kernel.org/r/875yypdxlm.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87czsvdc4o.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (8): ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap() ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped() ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider() ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider() ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider() ASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider() ASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider() ASoC: soc-core: remove snd_soc_of_parse_daifmt() include/sound/soc.h | 21 ++++- sound/soc/atmel/mikroe-proto.c | 9 ++- sound/soc/fsl/fsl-asoc-card.c | 7 +- sound/soc/generic/simple-card-utils.c | 16 ++-- sound/soc/meson/meson-card-utils.c | 6 +- sound/soc/soc-core.c | 109 +++++++++++++++++--------- 6 files changed, 106 insertions(+), 62 deletions(-) -- 2.25.1 commit ef7eb57d21e88ecb2a4e2c6f2c4118245e2efb21 Merge: b4fd4ea7b628a bb17379cf278c Author: Mark Brown Date: Mon Jun 21 19:16:52 2021 +0100 Merge series "ASoC: sunxi: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang : Use devm_platform_get_and_ioremap_resource() to simplify code. Yang Yingliang (3): ASoC: sunxi: sun4i-codec: Use devm_platform_get_and_ioremap_resource() ASoC: sun4i-i2s: Use devm_platform_get_and_ioremap_resource() ASoC: sunxi: sun4i-spdif: Use devm_platform_get_and_ioremap_resource() sound/soc/sunxi/sun4i-codec.c | 3 +-- sound/soc/sunxi/sun4i-i2s.c | 3 +-- sound/soc/sunxi/sun4i-spdif.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) -- 2.25.1 commit b4fd4ea7b628abbc721a0c6ddbb3fb3e454b2c62 Merge: ea837090b3882 b73cbd7b1c2d4 Author: Mark Brown Date: Mon Jun 21 19:16:51 2021 +0100 Merge series "ASoC: samsung: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang : Use devm_platform_get_and_ioremap_resource() to simplify code. Yang Yingliang (4): ASoC: samsung: i2s: Use devm_platform_get_and_ioremap_resource() ASoC: samsung: pcm: Use devm_platform_get_and_ioremap_resource() ASoC: samsung: s3c2412-i2s: Use devm_platform_get_and_ioremap_resource() ASoC: samsung: s3c24xx-i2s: Use devm_platform_get_and_ioremap_resource() sound/soc/samsung/i2s.c | 3 +-- sound/soc/samsung/pcm.c | 3 +-- sound/soc/samsung/s3c2412-i2s.c | 3 +-- sound/soc/samsung/s3c24xx-i2s.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) -- 2.25.1 commit 57dba89ad2e294b2260bc26de2646cb7665869bb Author: Xi Wang Date: Mon Jun 21 16:00:43 2021 +0800 RDMA/hns: Clean SRQC structure definition Remove unused members in srq context structure. Link: https://lore.kernel.org/r/1624262443-24528-10-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2b035e7312b508a54c0c7875c3a9c068cd2124d4 Author: Yixing Liu Date: Mon Jun 21 16:00:42 2021 +0800 RDMA/hns: Use new interface to write DB related fields Use hr_write_reg() instead of roce_set_field(). Link: https://lore.kernel.org/r/1624262443-24528-9-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit fd9e3679af8d741de6fd514ee33421696579fb1b Author: Yixing Liu Date: Mon Jun 21 16:00:41 2021 +0800 RDMA/hns: Use new interface to write FRMR fields Use "hr_reg_write" to replace "roce_set_filed". Link: https://lore.kernel.org/r/1624262443-24528-8-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f778bf1b8c14df81e7af1e7788553921f80c1b8c Author: Lang Cheng Date: Mon Jun 21 16:00:40 2021 +0800 RDMA/hns: Use new interface to get CQE fields WQE_INDEX and OPCODE and QPN of CQE use redundant masks. Just remove them. Link: https://lore.kernel.org/r/1624262443-24528-7-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f0cb411aad23aff0f1dc530d0d6306a5df0574cc Author: Lang Cheng Date: Mon Jun 21 16:00:39 2021 +0800 RDMA/hns: Use new interface to modify QP context Fill all QPC fileds with hr_reg_*() instead of roce_set_*(). SQPN is used for HIP08 ES only, it should be removed. Link: https://lore.kernel.org/r/1624262443-24528-6-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f6fcd28d49a7f1aaadad89e1ce4301472e20869b Author: Yixing Liu Date: Mon Jun 21 16:00:38 2021 +0800 RDMA/hns: Use new interface to write CQ context. Use hr_reg_*() to write CQ context, it's simpler than roce_set_*(). Link: https://lore.kernel.org/r/1624262443-24528-5-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a762fe656b1d59a3d597c0556aa6c029c569364a Author: Lang Cheng Date: Mon Jun 21 16:00:37 2021 +0800 RDMA/hns: Add hr_reg_write_bool() In order to avoid to do bitwise operations on a boolean value, add a new register interface to avoid sparse comlaint about "dubious: x & !y" when calling hr_reg_write(ctx, field, !!val). Fixes: dc504774408b ("RDMA/hns: Use new interface to set MPT related fields") Fixes: 495c24808ce7 ("RDMA/hns: Add XRC subtype in QPC and XRC type in SRQC") Link: https://lore.kernel.org/r/1624262443-24528-4-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit fe331da0f210c60342b042a03fe53f1b564b412b Author: Weihang Li Date: Mon Jun 21 16:00:36 2021 +0800 RDMA/hns: Add a check to ensure integer mtu is positive GCC may reports an running time assert error when a value calculated from ib_mtu_enum_to_int() is using as 'val' in FIELD_PREDP: include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_1524' declared with attribute error: FIELD_PREP: value too large for the field So a check is added about whether integer mtu from ib_mtu_enum_to_int() is negative to avoid this warning. Link: https://lore.kernel.org/r/1624262443-24528-3-git-send-email-liweihang@huawei.com Reported-by: kernel test robot Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 78c1da52704853bcc57399ca76b5b6e9e08ca627 Author: Weihang Li Date: Mon Jun 21 16:00:35 2021 +0800 RDMA/hns: Do not use !! for values that are already bool when calling hr_reg_write() There is no need to use "!!" before "eq->eqe_size == HNS_ROCE_V3_EQE_SIZE", or sparse will complain about "dubious: x & !y". Fixes: 782832f25404 ("RDMA/hns: Simplify the function config_eqc()") Link: https://lore.kernel.org/r/1624262443-24528-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2062d44da3499eed3c7d005df8f0b54d300ac0b5 Author: Anshuman Khandual Date: Fri Jun 18 10:17:02 2021 +0530 arm64/mm: Rename ARM64_SWAPPER_USES_SECTION_MAPS ARM64_SWAPPER_USES_SECTION_MAPS implies that a PMD level huge page mappings are used for swapper, idmap and vmemmap. Lets make it PMD explicit removing any possible confusion with generic memory sections and also bit generic as it's applicable for idmap and vmemmap mappings as well. Hence rename it as ARM64_KERNEL_USES_PMD_MAPS instead. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/1623991622-24294-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit e53d3aa0b605c49d780e1b2fd0b49dba4154f32b Author: Brian Foster Date: Mon Jun 21 09:43:14 2021 -0700 xfs: remove dead stale buf unpin handling code This code goes back to a time when transaction commits wrote directly to iclogs. The associated log items were pinned, written to the log, and then "uncommitted" if some part of the log write had failed. This uncommit sequence called an ->iop_unpin_remove() handler that was eventually folded into ->iop_unpin() via the remove parameter. The log subsystem has since changed significantly in that transactions commit to the CIL instead of direct to iclogs, though log items must still be aborted in the event of an eventual log I/O error. However, the context for a log item abort is now asynchronous from transaction commit, which means the committing transaction has been freed by this point in time and the transaction uncommit sequence of events is no longer relevant. Further, since stale buffers remain locked at transaction commit through unpin, we can be certain that the buffer is not associated with any transaction when the unpin callback executes. Remove this unused hunk of code and replace it with an assertion that the buffer is disassociated from transaction context. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 84d8949e770745b16a7e8a68dcb1d0f3687bdee9 Author: Brian Foster Date: Mon Jun 21 09:43:14 2021 -0700 xfs: hold buffer across unpin and potential shutdown processing The special processing used to simulate a buffer I/O failure on fs shutdown has a difficult to reproduce race that can result in a use after free of the associated buffer. Consider a buffer that has been committed to the on-disk log and thus is AIL resident. The buffer lands on the writeback delwri queue, but is subsequently locked, committed and pinned by another transaction before submitted for I/O. At this point, the buffer is stuck on the delwri queue as it cannot be submitted for I/O until it is unpinned. A log checkpoint I/O failure occurs sometime later, which aborts the bli. The unpin handler is called with the aborted log item, drops the bli reference count, the pin count, and falls into the I/O failure simulation path. The potential problem here is that once the pin count falls to zero in ->iop_unpin(), xfsaild is free to retry delwri submission of the buffer at any time, before the unpin handler even completes. If delwri queue submission wins the race to the buffer lock, it observes the shutdown state and simulates the I/O failure itself. This releases both the bli and delwri queue holds and frees the buffer while xfs_buf_item_unpin() sits on xfs_buf_lock() waiting to run through the same failure sequence. This problem is rare and requires many iterations of fstest generic/019 (which simulates disk I/O failures) to reproduce. To avoid this problem, grab a hold on the buffer before the log item is unpinned if the associated item has been aborted and will require a simulated I/O failure. The hold is already required for the simulated I/O failure, so the ordering simply guarantees the unpin handler access to the buffer before it is unpinned and thus processed by the AIL. This particular ordering is required so long as the AIL does not acquire a reference on the bli, which is the long term solution to this problem. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4e6b8270c820c8c57a73f869799a0af2b56eff3e Author: Darrick J. Wong Date: Fri Jun 18 11:57:07 2021 -0700 xfs: force the log offline when log intent item recovery fails If any part of log intent item recovery fails, we should shut down the log immediately to stop the log from writing a clean unmount record to disk, because the metadata is not consistent. The inability to cancel a dirty transaction catches most of these cases, but there are a few things that have slipped through the cracks, such as ENOSPC from a transaction allocation, or runtime errors that result in cancellation of a non-dirty transaction. This solves some weird behaviors reported by customers where a system goes down, the first mount fails, the second succeeds, but then the fs goes down later because of inconsistent metadata. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 81ed94751b1513fcc5978dcc06eb1f5b4e55a785 Author: Darrick J. Wong Date: Fri Jun 18 11:57:07 2021 -0700 xfs: fix log intent recovery ENOSPC shutdowns when inactivating inodes During regular operation, the xfs_inactive operations create transactions with zero block reservation because in general we're freeing space, not asking for more. The per-AG space reservations created at mount time enable us to handle expansions of the refcount btree without needing to reserve blocks to the transaction. Unfortunately, log recovery doesn't create the per-AG space reservations when intent items are being recovered. This isn't an issue for intent item recovery itself because they explicitly request blocks, but any inode inactivation that can happen during log recovery uses the same xfs_inactive paths as regular runtime. If a refcount btree expansion happens, the transaction will fail due to blk_res_used > blk_res, and we shut down the filesystem unnecessarily. Fix this problem by making per-AG reservations temporarily so that we can handle the inactivations, and releasing them at the end. This brings the recovery environment closer to the runtime environment. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c06ad17cfa0bac3b51c9b3448a843860d29bc85a Author: Darrick J. Wong Date: Mon Jun 21 10:01:14 2021 -0700 xfs: shorten the shutdown messages to a single line Consolidate the shutdown messages to a single line containing the reason, the passed-in flags, the source of the shutdown, and the end result. This means we now only have one line to look for when debugging, which is useful when the fs goes down while something else is flooding dmesg. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Chandan Babu R commit 3a1c3abe89710c60c98a8f59a5f16e5dfe249e49 Author: Darrick J. Wong Date: Fri Jun 18 11:57:07 2021 -0700 xfs: print name of function causing fs shutdown instead of hex pointer In xfs_do_force_shutdown, print the symbolic name of the function that called us to shut down the filesystem instead of a raw hex pointer. This makes debugging a lot easier: XFS (sda): xfs_do_force_shutdown(0x2) called from line 2440 of file fs/xfs/xfs_log.c. Return address = ffffffffa038bc38 becomes: XFS (sda): xfs_do_force_shutdown(0x2) called from line 2440 of file fs/xfs/xfs_log.c. Return address = xfs_trans_mod_sb+0x25 Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner Reviewed-by: Chandan Babu R commit 10be350b8c6c426b82d4df937f25b37eabdc3d67 Author: Darrick J. Wong Date: Fri Jun 18 11:57:06 2021 -0700 xfs: fix type mismatches in the inode reclaim functions It's currently unlikely that we will ever end up with more than 4 billion inodes waiting for reclamation, but the fs object code uses long int for object counts and we're certainly capable of generating that many. Instead of truncating the internal counters, widen them and report the object counts correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R Reviewed-by: Dave Chinner commit 77b4d2861e8381d00e4b9bd1be2a355dda99ff60 Author: Darrick J. Wong Date: Fri Jun 18 11:57:06 2021 -0700 xfs: separate primary inode selection criteria in xfs_iget_cache_hit During review of the v6 deferred inode inactivation patchset[1], Dave commented that _cache_hit should have a clear separation between inode selection criteria and actions performed on a selected inode. Move a hunk to make this true, and compact the shrink cases in the function. [1] https://lore.kernel.org/linux-xfs/162310469340.3465262.504398465311182657.stgit@locust/T/#mca6d958521cb88bbc1bfe1a30767203328d410b5 Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit ff7bebeb91f8cc2e26e7dabbf301da5ec0e9328c Author: Darrick J. Wong Date: Fri Jun 18 11:57:05 2021 -0700 xfs: refactor the inode recycling code Hoist the code in xfs_iget_cache_hit that restores the VFS inode state to an xfs_inode that was previously vfs-destroyed. The next patch will add a new set of state flags, so we need the helper to avoid duplication. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 956f6daa84bf50dd5bd13a64b57cae446bca3899 Author: Dave Chinner Date: Fri Jun 18 11:57:05 2021 -0700 xfs: add iclog state trace events For the DEBUGS! Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5f9b4b0de8dc2fb8eb655463b438001c111570fe Author: Dave Chinner Date: Fri Jun 18 08:21:52 2021 -0700 xfs: xfs_log_force_lsn isn't passed a LSN In doing an investigation into AIL push stalls, I was looking at the log force code to see if an async CIL push could be done instead. This lead me to xfs_log_force_lsn() and looking at how it works. xfs_log_force_lsn() is only called from inode synchronisation contexts such as fsync(), and it takes the ip->i_itemp->ili_last_lsn value as the LSN to sync the log to. This gets passed to xlog_cil_force_lsn() via xfs_log_force_lsn() to flush the CIL to the journal, and then used by xfs_log_force_lsn() to flush the iclogs to the journal. The problem is that ip->i_itemp->ili_last_lsn does not store a log sequence number. What it stores is passed to it from the ->iop_committing method, which is called by xfs_log_commit_cil(). The value this passes to the iop_committing method is the CIL context sequence number that the item was committed to. As it turns out, xlog_cil_force_lsn() converts the sequence to an actual commit LSN for the related context and returns that to xfs_log_force_lsn(). xfs_log_force_lsn() overwrites it's "lsn" variable that contained a sequence with an actual LSN and then uses that to sync the iclogs. This caused me some confusion for a while, even though I originally wrote all this code a decade ago. ->iop_committing is only used by a couple of log item types, and only inode items use the sequence number it is passed. Let's clean up the API, CIL structures and inode log item to call it a sequence number, and make it clear that the high level code is using CIL sequence numbers and not on-disk LSNs for integrity synchronisation purposes. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit 19f4e7cc819771812a7f527d7897c2deffbf7a00 Author: Dave Chinner Date: Fri Jun 18 08:21:51 2021 -0700 xfs: Fix CIL throttle hang when CIL space used going backwards A hang with tasks stuck on the CIL hard throttle was reported and largely diagnosed by Donald Buczek, who discovered that it was a result of the CIL context space usage decrementing in committed transactions once the hard throttle limit had been hit and processes were already blocked. This resulted in the CIL push not waking up those waiters because the CIL context was no longer over the hard throttle limit. The surprising aspect of this was the CIL space usage going backwards regularly enough to trigger this situation. Assumptions had been made in design that the relogging process would only increase the size of the objects in the CIL, and so that space would only increase. This change and commit message fixes the issue and documents the result of an audit of the triggers that can cause the CIL space to go backwards, how large the backwards steps tend to be, the frequency in which they occur, and what the impact on the CIL accounting code is. Even though the CIL ctx->space_used can go backwards, it will only do so if the log item is already logged to the CIL and contains a space reservation for it's entire logged state. This is tracked by the shadow buffer state on the log item. If the item is not previously logged in the CIL it has no shadow buffer nor log vector, and hence the entire size of the logged item copied to the log vector is accounted to the CIL space usage. i.e. it will always go up in this case. If the item has a log vector (i.e. already in the CIL) and the size decreases, then the existing log vector will be overwritten and the space usage will go down. This is the only condition where the space usage reduces, and it can only occur when an item is already tracked in the CIL. Hence we are safe from CIL space usage underruns as a result of log items decreasing in size when they are relogged. Typically this reduction in CIL usage occurs from metadata blocks being free, such as when a btree block merge occurs or a directory enter/xattr entry is removed and the da-tree is reduced in size. This generally results in a reduction in size of around a single block in the CIL, but also tends to increase the number of log vectors because the parent and sibling nodes in the tree needs to be updated when a btree block is removed. If a multi-level merge occurs, then we see reduction in size of 2+ blocks, but again the log vector count goes up. The other vector is inode fork size changes, which only log the current size of the fork and ignore the previously logged size when the fork is relogged. Hence if we are removing items from the inode fork (dir/xattr removal in shortform, extent record removal in extent form, etc) the relogged size of the inode for can decrease. No other log items can decrease in size either because they are a fixed size (e.g. dquots) or they cannot be relogged (e.g. relogging an intent actually creates a new intent log item and doesn't relog the old item at all.) Hence the only two vectors for CIL context size reduction are relogging inode forks and marking buffers active in the CIL as stale. Long story short: the majority of the code does the right thing and handles the reduction in log item size correctly, and only the CIL hard throttle implementation is problematic and needs fixing. This patch makes that fix, as well as adds comments in the log item code that result in items shrinking in size when they are relogged as a clear reminder that this can and does happen frequently. The throttle fix is based upon the change Donald proposed, though it goes further to ensure that once the throttle is activated, it captures all tasks until the CIL push issues a wakeup, regardless of whether the CIL space used has gone back under the throttle threshold. This ensures that we prevent tasks reducing the CIL slightly under the throttle threshold and then making more changes that push it well over the throttle limit. This is acheived by checking if the throttle wait queue is already active as a condition of throttling. Hence once we start throttling, we continue to apply the throttle until the CIL context push wakes everything on the wait queue. We can use waitqueue_active() for the waitqueue manipulations and checks as they are all done under the ctx->xc_push_lock. Hence the waitqueue has external serialisation and we can safely peek inside the wait queue without holding the internal waitqueue locks. Many thanks to Donald for his diagnostic and analysis work to isolate the cause of this hang. Reported-and-tested-by: Donald Buczek Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit eef983ffeae7a1cdde8c3338155ae2dd74b8621b Author: Dave Chinner Date: Fri Jun 18 08:21:51 2021 -0700 xfs: journal IO cache flush reductions Currently every journal IO is issued as REQ_PREFLUSH | REQ_FUA to guarantee the ordering requirements the journal has w.r.t. metadata writeback. THe two ordering constraints are: 1. we cannot overwrite metadata in the journal until we guarantee that the dirty metadata has been written back in place and is stable. 2. we cannot write back dirty metadata until it has been written to the journal and guaranteed to be stable (and hence recoverable) in the journal. The ordering guarantees of #1 are provided by REQ_PREFLUSH. This causes the journal IO to issue a cache flush and wait for it to complete before issuing the write IO to the journal. Hence all completed metadata IO is guaranteed to be stable before the journal overwrites the old metadata. The ordering guarantees of #2 are provided by the REQ_FUA, which ensures the journal writes do not complete until they are on stable storage. Hence by the time the last journal IO in a checkpoint completes, we know that the entire checkpoint is on stable storage and we can unpin the dirty metadata and allow it to be written back. This is the mechanism by which ordering was first implemented in XFS way back in 2002 by commit 95d97c36e5155075ba2eb22b17562cfcc53fcf96 ("Add support for drive write cache flushing") in the xfs-archive tree. A lot has changed since then, most notably we now use delayed logging to checkpoint the filesystem to the journal rather than write each individual transaction to the journal. Cache flushes on journal IO are necessary when individual transactions are wholly contained within a single iclog. However, CIL checkpoints are single transactions that typically span hundreds to thousands of individual journal writes, and so the requirements for device cache flushing have changed. That is, the ordering rules I state above apply to ordering of atomic transactions recorded in the journal, not to the journal IO itself. Hence we need to ensure metadata is stable before we start writing a new transaction to the journal (guarantee #1), and we need to ensure the entire transaction is stable in the journal before we start metadata writeback (guarantee #2). Hence we only need a REQ_PREFLUSH on the journal IO that starts a new journal transaction to provide #1, and it is not on any other journal IO done within the context of that journal transaction. The CIL checkpoint already issues a cache flush before it starts writing to the log, so we no longer need the iclog IO to issue a REQ_REFLUSH for us. Hence if XLOG_START_TRANS is passed to xlog_write(), we no longer need to mark the first iclog in the log write with REQ_PREFLUSH for this case. As an added bonus, this ordering mechanism works for both internal and external logs, meaning we can remove the explicit data device cache flushes from the iclog write code when using external logs. Given the new ordering semantics of commit records for the CIL, we need iclogs containing commit records to issue a REQ_PREFLUSH. We also require unmount records to do this. Hence for both XLOG_COMMIT_TRANS and XLOG_UNMOUNT_TRANS xlog_write() calls we need to mark the first iclog being written with REQ_PREFLUSH. For both commit records and unmount records, we also want them immediately on stable storage, so we want to also mark the iclogs that contain these records to be marked REQ_FUA. That means if a record is split across multiple iclogs, they are all marked REQ_FUA and not just the last one so that when the transaction is completed all the parts of the record are on stable storage. And for external logs, unmount records need a pre-write data device cache flush similar to the CIL checkpoint cache pre-flush as the internal iclog write code does not do this implicitly anymore. As an optimisation, when the commit record lands in the same iclog as the journal transaction starts, we don't need to wait for anything and can simply use REQ_FUA to provide guarantee #2. This means that for fsync() heavy workloads, the cache flush behaviour is completely unchanged and there is no degradation in performance as a result of optimise the multi-IO transaction case. The most notable sign that there is less IO latency on my test machine (nvme SSDs) is that the "noiclogs" rate has dropped substantially. This metric indicates that the CIL push is blocking in xlog_get_iclog_space() waiting for iclog IO completion to occur. With 8 iclogs of 256kB, the rate is appoximately 1 noiclog event to every 4 iclog writes. IOWs, every 4th call to xlog_get_iclog_space() is blocking waiting for log IO. With the changes in this patch, this drops to 1 noiclog event for every 100 iclog writes. Hence it is clear that log IO is completing much faster than it was previously, but it is also clear that for large iclog sizes, this isn't the performance limiting factor on this hardware. With smaller iclogs (32kB), however, there is a substantial difference. With the cache flush modifications, the journal is now running at over 4000 write IOPS, and the journal throughput is largely identical to the 256kB iclogs and the noiclog event rate stays low at about 1:50 iclog writes. The existing code tops out at about 2500 IOPS as the number of cache flushes dominate performance and latency. The noiclog event rate is about 1:4, and the performance variance is quite large as the journal throughput can fall to less than half the peak sustained rate when the cache flush rate prevents metadata writeback from keeping up and the log runs out of space and throttles reservations. As a result: logbsize fsmark create rate rm -rf before 32kb 152851+/-5.3e+04 5m28s patched 32kb 221533+/-1.1e+04 5m24s before 256kb 220239+/-6.2e+03 4m58s patched 256kb 228286+/-9.2e+03 5m06s The rm -rf times are included because I ran them, but the differences are largely noise. This workload is largely metadata read IO latency bound and the changes to the journal cache flushing doesn't really make any noticable difference to behaviour apart from a reduction in noiclog events from background CIL pushing. Signed-off-by: Dave Chinner Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit 3468bb1ca6e8840789e13c7b9d8b0c556b4fbe79 Author: Dave Chinner Date: Fri Jun 18 08:21:50 2021 -0700 xfs: remove need_start_rec parameter from xlog_write() The CIL push is the only call to xlog_write that sets this variable to true. The other callers don't need a start rec, and they tell xlog_write what to do by passing the type of ophdr they need written in the flags field. The need_start_rec parameter essentially tells xlog_write to to write an extra ophdr with a XLOG_START_TRANS type, so get rid of the variable to do this and pass XLOG_START_TRANS as the flag value into xlog_write() from the CIL push. $ size fs/xfs/xfs_log.o* text data bss dec hex filename 27595 560 8 28163 6e03 fs/xfs/xfs_log.o.orig 27454 560 8 28022 6d76 fs/xfs/xfs_log.o.patched Signed-off-by: Dave Chinner Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit bad77c375e8de6c776c848e443f7dc2d0d909be5 Author: Dave Chinner Date: Fri Jun 18 08:21:50 2021 -0700 xfs: CIL checkpoint flushes caches unconditionally Currently every journal IO is issued as REQ_PREFLUSH | REQ_FUA to guarantee the ordering requirements the journal has w.r.t. metadata writeback. THe two ordering constraints are: 1. we cannot overwrite metadata in the journal until we guarantee that the dirty metadata has been written back in place and is stable. 2. we cannot write back dirty metadata until it has been written to the journal and guaranteed to be stable (and hence recoverable) in the journal. These rules apply to the atomic transactions recorded in the journal, not to the journal IO itself. Hence we need to ensure metadata is stable before we start writing a new transaction to the journal (guarantee #1), and we need to ensure the entire transaction is stable in the journal before we start metadata writeback (guarantee #2). The ordering guarantees of #1 are currently provided by REQ_PREFLUSH being added to every iclog IO. This causes the journal IO to issue a cache flush and wait for it to complete before issuing the write IO to the journal. Hence all completed metadata IO is guaranteed to be stable before the journal overwrites the old metadata. However, for long running CIL checkpoints that might do a thousand journal IOs, we don't need every single one of these iclog IOs to issue a cache flush - the cache flush done before the first iclog is submitted is sufficient to cover the entire range in the log that the checkpoint will overwrite because the CIL space reservation guarantees the tail of the log (completed metadata) is already beyond the range of the checkpoint write. Hence we only need a full cache flush between closing off the CIL checkpoint context (i.e. when the push switches it out) and issuing the first journal IO. Rather than plumbing this through to the journal IO, we can start this cache flush the moment the CIL context is owned exclusively by the push worker. The cache flush can be in progress while we process the CIL ready for writing, hence reducing the latency of the initial iclog write. This is especially true for large checkpoints, where we might have to process hundreds of thousands of log vectors before we issue the first iclog write. In these cases, it is likely the cache flush has already been completed by the time we have built the CIL log vector chain. Signed-off-by: Dave Chinner Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit 0431d926b399d74f1cde2c355d48289c6d7fa882 Author: Dave Chinner Date: Fri Jun 18 08:21:49 2021 -0700 xfs: async blkdev cache flush The new checkpoint cache flush mechanism requires us to issue an unconditional cache flush before we start a new checkpoint. We don't want to block for this if we can help it, and we have a fair chunk of CPU work to do between starting the checkpoint and issuing the first journal IO. Hence it makes sense to amortise the latency cost of the cache flush by issuing it asynchronously and then waiting for it only when we need to issue the first IO in the transaction. To do this, we need async cache flush primitives to submit the cache flush bio and to wait on it. The block layer has no such primitives for filesystems, so roll our own for the moment. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit b5071ada510a76eac0d02912bf66297b9e30ca59 Author: Dave Chinner Date: Fri Jun 18 08:21:49 2021 -0700 xfs: remove xfs_blkdev_issue_flush It's a one line wrapper around blkdev_issue_flush(). Just replace it with direct calls to blkdev_issue_flush(). Signed-off-by: Dave Chinner Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit ba1f82456ba8438a8abc96274d57bfe76d34a4a8 Author: Sean Christopherson Date: Fri Jun 18 14:46:58 2021 -0700 KVM: nVMX: Dynamically compute max VMCS index for vmcs12 Calculate the max VMCS index for vmcs12 by walking the array to find the actual max index. Hardcoding the index is prone to bitrot, and the calculation is only done on KVM bringup (albeit on every CPU, but there aren't _that_ many null entries in the array). Fixes: 3c0f99366e34 ("KVM: nVMX: Add a TSC multiplier field in VMCS12") Signed-off-by: Sean Christopherson Message-Id: <20210618214658.2700765-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5140bc7d6bc8abad58b4f2a2c011607bfd922992 Author: Jim Mattson Date: Fri Jun 18 16:59:41 2021 -0700 KVM: VMX: Skip #PF(RSVD) intercepts when emulating smaller maxphyaddr As part of smaller maxphyaddr emulation, kvm needs to intercept present page faults to see if it needs to add the RSVD flag (bit 3) to the error code. However, there is no need to intercept page faults that already have the RSVD flag set. When setting up the page fault intercept, add the RSVD flag into the #PF error code mask field (but not the #PF error code match field) to skip the intercept when the RSVD flag is already set. Signed-off-by: Jim Mattson Message-Id: <20210618235941.1041604-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 4370cbf350dbaca984dbda9f9ce3fac45d6949d5 Author: Zhang Rui Date: Mon Jun 21 09:37:27 2021 +0800 ACPI: EC: trust DSDT GPE for certain HP laptop On HP Pavilion Gaming Laptop 15-cx0xxx, the ECDT EC and DSDT EC share the same port addresses but different GPEs. And the DSDT GPE is the right one to use. The current code duplicates DSDT EC with ECDT EC if the port addresses are the same, and uses ECDT GPE as a result, which breaks this machine. Introduce a new quirk for the HP laptop to trust the DSDT GPE, and avoid duplicating even if the port addresses are the same. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209989 Reported-and-tested-by: Shao Fu, Chen Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 8d287e8292ea126d55beb29f2b3f07dfad5b6bc0 Author: Rafael J. Wysocki Date: Wed Jun 16 16:05:50 2021 +0200 ACPI: scan: Simplify acpi_table_events_fn() Notice that the table field of struct acpi_table_events_work is never read and its event field is always equal to ACPI_TABLE_EVENT_LOAD, so both of them are redundant. Accordingly, drop struct acpi_table_events_work and use struct work_struct directly instead of it, simplify acpi_scan_table_handler() and rename it to acpi_scan_table_notify(). Moreover, make acpi_bus_table_handler() check the event code against ACPI_TABLE_EVENT_LOAD before calling acpi_scan_table_notify(), so it is not necessary to do that check in the latter. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 6cbab787c853548b0d2658f95f7346ea58eec45f Merge: 771fac5e26c17 bcc936c5d5159 Author: Rafael J. Wysocki Date: Mon Jun 21 18:32:42 2021 +0200 Merge back cpufreq material for v5.14. commit abe66bb7a2f6e308f2fb059d60b1076df84306ad Author: Robert Marko Date: Sat Jun 19 18:27:51 2021 +0200 arm64: dts: ipq8074: Add QUP6 I2C node Add node to support the QUP6 I2C controller inside of IPQ8074. It is exactly the same as QUP2 and QUP3 controllers. Some routers like Xiaomi AX9000 and Netgear RBK850 use this bus. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210619162751.2336974-1-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit 1fcb6fcd74a222d9ead54d405842fc763bb86262 Author: Gao Xiang Date: Fri Jun 18 12:20:55 2021 +0800 nfs: fix acl memory leak of posix_acl_create() When looking into another nfs xfstests report, I found acl and default_acl in nfs3_proc_create() and nfs3_proc_mknod() error paths are possibly leaked. Fix them in advance. Fixes: 013cdf1088d7 ("nfs: use generic posix ACL infrastructure for v3 Posix ACLs") Cc: Trond Myklebust Cc: Anna Schumaker Cc: Christoph Hellwig Cc: Joseph Qi Signed-off-by: Gao Xiang Signed-off-by: Trond Myklebust commit bc1c56e9bbe92766d017efb5f0a0c71f80da5570 Author: NeilBrown Date: Tue Jun 15 11:18:38 2021 +1000 SUNRPC: prevent port reuse on transports which don't request it. If an RPC client is created without RPC_CLNT_CREATE_REUSEPORT, it should not reuse the source port when a TCP connection is re-established. This is currently implemented by preventing the source port being recorded after a successful connection (the call to xs_set_srcport()). However the source port is also recorded after a successful bind in xs_bind(). This may not be needed at all and certainly is not wanted when RPC_CLNT_CREATE_REUSEPORT wasn't requested. So avoid that assignment when xprt.reuseport is not set. With this change, NFSv4.1 and later mounts use a different port number on each connection. This is helpful with some firewalls which don't cope well with port reuse. Signed-off-by: NeilBrown Fixes: e6237b6feb37 ("NFSv4.1: Don't rebind to the same source port when reconnecting to the server") Signed-off-by: Trond Myklebust commit bb24cc0f37a2d12f780ab2a57df046274a0bec38 Author: Colin Ian King Date: Sun Jun 13 15:06:52 2021 +0100 rpc: remove redundant initialization of variable status The variable status is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Trond Myklebust commit 1477d44ce47d6cf3b2bab1afbca573b4f677666c Author: Avihai Horon Date: Wed Jun 9 14:05:03 2021 +0300 RDMA/mlx5: Enable Relaxed Ordering by default for kernel ULPs Relaxed Ordering is a capability that can only benefit users that support it. All kernel ULPs should support Relaxed Ordering, as they are designed to read data only after observing the CQE and use the DMA API correctly. Hence, implicitly enable Relaxed Ordering by default for MR transfers in kernel ULPs. Link: https://lore.kernel.org/r/b7e820aab7402b8efa63605f4ea465831b3b1e5e.1623236426.git.leonro@nvidia.com Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5c10a3dbe9220ca7bcee716c13c8a8563bcb010a Author: Jonathan Edwards Date: Sat Jun 19 11:10:07 2021 -0400 libbpf: Add extra BPF_PROG_TYPE check to bpf_object__probe_loading eBPF has been backported for RHEL 7 w/ kernel 3.10-940+ [0]. However only the following program types are supported [1]: BPF_PROG_TYPE_KPROBE BPF_PROG_TYPE_TRACEPOINT BPF_PROG_TYPE_PERF_EVENT For libbpf this causes an EINVAL return during the bpf_object__probe_loading call which only checks to see if programs of type BPF_PROG_TYPE_SOCKET_FILTER can load. The following will try BPF_PROG_TYPE_TRACEPOINT as a fallback attempt before erroring out. BPF_PROG_TYPE_KPROBE was not a good candidate because on some kernels it requires knowledge of the LINUX_VERSION_CODE. [0] https://www.redhat.com/en/blog/introduction-ebpf-red-hat-enterprise-linux-7 [1] https://access.redhat.com/articles/3550581 Signed-off-by: Jonathan Edwards Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210619151007.GA6963@165gc.onmicrosoft.com commit 781dd0431eb549f9cb1fdddf91a50d985febe884 Author: Cong Wang Date: Mon Jun 14 19:13:42 2021 -0700 skmsg: Increase sk->sk_drops when dropping packets It is hard to observe packet drops without increasing relevant drop counters, here we should increase sk->sk_drops which is a protocol-independent counter. Fortunately psock is always associated with a struct sock, we can just use psock->sk. Suggested-by: John Fastabend Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-9-xiyou.wangcong@gmail.com commit 42830571f1fd9751b3fbf38084bbb253320e185f Author: Cong Wang Date: Mon Jun 14 19:13:41 2021 -0700 skmsg: Pass source psock to sk_psock_skb_redirect() sk_psock_skb_redirect() only takes skb as a parameter, we will need to know where this skb is from, so just pass the source psock to this function as a new parameter. This patch prepares for the next one. Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-8-xiyou.wangcong@gmail.com commit 1581a6c1c3291a8320b080f4411345f60229976d Author: Cong Wang Date: Mon Jun 14 19:13:40 2021 -0700 skmsg: Teach sk_psock_verdict_apply() to return errors Currently sk_psock_verdict_apply() is void, but it handles some error conditions too. Its caller is impossible to learn whether it succeeds or fails, especially sk_psock_verdict_recv(). Make it return int to indicate error cases and propagate errors to callers properly. Fixes: ef5659280eb1 ("bpf, sockmap: Allow skipping sk_skb parser program") Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-7-xiyou.wangcong@gmail.com commit 0cf6672b23c8aa9d9274798dd63cbf6ede77ef90 Author: Cong Wang Date: Mon Jun 14 19:13:39 2021 -0700 skmsg: Fix a memory leak in sk_psock_verdict_apply() If the dest psock does not set SK_PSOCK_TX_ENABLED, the skb can't be queued anywhere so must be dropped. This one is found during code review. Fixes: 799aa7f98d53 ("skmsg: Avoid lock_sock() in sk_psock_backlog()") Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-6-xiyou.wangcong@gmail.com commit 30b9c54a707db4155735cf71f4600241c1b7b6ff Author: Cong Wang Date: Mon Jun 14 19:13:38 2021 -0700 skmsg: Clear skb redirect pointer before dropping it When we drop skb inside sk_psock_skb_redirect(), we have to clear its skb->_sk_redir pointer too, otherwise kfree_skb() would misinterpret it as a valid skb->_skb_refdst and dst_release() would eventually complain. Fixes: e3526bb92a20 ("skmsg: Move sk_redir from TCP_SKB_CB to skb") Reported-by: Jiang Wang Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-5-xiyou.wangcong@gmail.com commit e00a5c331bf57f41fcfdc5da4f5caeafe5e54c1d Author: Cong Wang Date: Mon Jun 14 19:13:37 2021 -0700 udp: Fix a memory leak in udp_read_sock() sk_psock_verdict_recv() clones the skb and uses the clone afterward, so udp_read_sock() should free the skb after using it, regardless of error or not. This fixes a real kmemleak. Fixes: d7f571188ecf ("udp: Implement ->read_sock() for sockmap") Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-4-xiyou.wangcong@gmail.com commit a7e65fe7d8201527129206754db1a2db6a6b2fde Author: Cong Wang Date: Mon Jun 14 19:13:36 2021 -0700 selftests/bpf: Retry for EAGAIN in udp_redir_to_connected() We use non-blocking sockets for testing sockmap redirections, and got some random EAGAIN errors from UDP tests. There is no guarantee the packet would be immediately available to receive as soon as it is sent out, even on the local host. For UDP, this is especially true because it does not lock the sock during BH (unlike the TCP path). This is probably why we only saw this error in UDP cases. No matter how hard we try to make the queue empty check accurate, it is always possible for recvmsg() to beat ->sk_data_ready(). Therefore, we should just retry in case of EAGAIN. Fixes: d6378af615275 ("selftests/bpf: Add a test case for udp sockmap") Reported-by: Jiang Wang Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-3-xiyou.wangcong@gmail.com commit 9f2470fbc4cb4583c080bb729a998933ba61aca4 Author: Cong Wang Date: Mon Jun 14 19:13:35 2021 -0700 skmsg: Improve udp_bpf_recvmsg() accuracy I tried to reuse sk_msg_wait_data() for different protocols, but it turns out it can not be simply reused. For example, UDP actually uses two queues to receive skb: udp_sk(sk)->reader_queue and sk->sk_receive_queue. So we have to check both of them to know whether we have received any packet. Also, UDP does not lock the sock during BH Rx path, it makes no sense for its ->recvmsg() to lock the sock. It is always possible for ->recvmsg() to be called before packets actually arrive in the receive queue, we just use best effort to make it accurate here. Fixes: 1f5be6b3b063 ("udp: Implement udp_bpf_recvmsg() for sockmap") Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210615021342.7416-2-xiyou.wangcong@gmail.com commit be1a5408868af341f61f93c191b5e346ee88c82a Author: Joerg Roedel Date: Fri Jun 18 13:54:09 2021 +0200 x86/sev: Split up runtime #VC handler for correct state tracking Split up the #VC handler code into a from-user and a from-kernel part. This allows clean and correct state tracking, as the #VC handler needs to enter NMI-state when raised from kernel mode and plain IRQ state when raised from user-mode. Fixes: 62441a1fb532 ("x86/sev-es: Correctly track IRQ states in runtime #VC handler") Suggested-by: Peter Zijlstra Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210618115409.22735-3-joro@8bytes.org commit d187f217335dba2b49fc9002aab2004e04acddee Author: Joerg Roedel Date: Fri Jun 18 13:54:08 2021 +0200 x86/sev: Make sure IRQs are disabled while GHCB is active The #VC handler only cares about IRQs being disabled while the GHCB is active, as it must not be interrupted by something which could cause another #VC while it holds the GHCB (NMI is the exception for which the backup GHCB exits). Make sure nothing interrupts the code path while the GHCB is active by making sure that callers of __sev_{get,put}_ghcb() have disabled interrupts upfront. [ bp: Massage commit message. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210618115409.22735-2-joro@8bytes.org commit eed75ce7c8260e0d5612ced4a88180ab991e207c Author: Dan Carpenter Date: Fri Jun 18 11:37:21 2021 +0300 drm/amdgpu: fix amdgpu_preempt_mgr_new() There is a reversed if statement in amdgpu_preempt_mgr_new() so it always returns -ENOMEM. Fixes: 09b020bb05a5 ("Merge tag 'drm-misc-next-2021-06-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next") Signed-off-by: Dan Carpenter Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/YMxbQXg/Wqm0ACxt@mwanda Signed-off-by: Christian König commit ae5d29d4e70ac53d758032df870ca9012b44c69a Author: David Sterba Date: Thu Jun 3 17:20:24 2021 +0200 btrfs: inline wait_current_trans_commit_start in its caller Function wait_current_trans_commit_start is now fairly trivial so it can be inlined in its only caller. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 32cc4f8759e19661e3a349419f0bcf6dcfddd323 Author: David Sterba Date: Thu Jun 3 17:20:21 2021 +0200 btrfs: sink wait_for_unblock parameter to async commit There's only one caller left btrfs_ioctl_start_sync that passes 0, so we can remove the switch in btrfs_commit_transaction_async. A cleanup 9babda9f33fd ("btrfs: Remove async_transid from btrfs_mksubvol/create_subvol/create_snapshot") removed calls that passed 1, so this is a followup. As this removes last call of wait_current_trans_commit_start_and_unblock, remove the function as well. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit bfaa324e9a8073f539e5cf2d4fe14fe55e317525 Author: Nathan Chancellor Date: Thu Jun 3 10:43:11 2021 -0700 btrfs: remove total_data_size variable in btrfs_batch_insert_items() clang warns: fs/btrfs/delayed-inode.c:684:6: warning: variable 'total_data_size' set but not used [-Wunused-but-set-variable] int total_data_size = 0, total_size = 0; ^ 1 warning generated. This variable's value has been unused since commit fc0d82e103c7 ("btrfs: sink total_data parameter in setup_items_for_insert"). Eliminate it. Link: https://github.com/ClangBuiltLinux/linux/issues/1391 Reviewed-by: Nikolay Borisov Signed-off-by: Nathan Chancellor Reviewed-by: David Sterba Signed-off-by: David Sterba commit 77d255348bb2ce9a174cca020aa38f2ce82cb2bc Author: Nikolay Borisov Date: Tue Jun 1 09:08:15 2021 +0300 btrfs: eliminate insert label in add_falloc_range By way of inverting the list_empty conditional the insert label can be eliminated, making the function's flow entirely linear. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d078efae6f3854eadf9def9cbb4f30389c0c504 Author: Qu Wenruo Date: Mon Jun 7 17:02:58 2021 +0800 btrfs: subpage: fix a rare race between metadata endio and eb freeing [BUG] There is a very rare ASSERT() triggering during full fstests run for subpage rw support. No other reproducer so far. The ASSERT() gets triggered for metadata read in btrfs_page_set_uptodate() inside end_page_read(). [CAUSE] There is still a small race window for metadata only, the race could happen like this: T1 | T2 ------------------------------------+----------------------------- end_bio_extent_readpage() | |- btrfs_validate_metadata_buffer() | | |- free_extent_buffer() | | Still have 2 refs | |- end_page_read() | |- if (unlikely(PagePrivate()) | | The page still has Private | | | free_extent_buffer() | | | Only one ref 1, will be | | | released | | |- detach_extent_buffer_page() | | |- btrfs_detach_subpage() |- btrfs_set_page_uptodate() | The page no longer has Private| >>> ASSERT() triggered <<< | This race window is super small, thus pretty hard to hit, even with so many runs of fstests. But the race window is still there, we have to go another way to solve it other than relying on random PagePrivate() check. Data path is not affected, as it will lock the page before reading, while unlocking the page after the last read has finished, thus no race window. [FIX] This patch will fix the bug by repurposing btrfs_subpage::readers. Now btrfs_subpage::readers will be a member shared by both metadata and data. For metadata path, we don't do the page unlock as metadata only relies on extent locking. At the same time, teach page_range_has_eb() to take btrfs_subpage::readers into consideration. So that even if the last eb of a page gets freed, page::private won't be detached as long as there still are pending end_page_read() calls. By this we eliminate the race window, this will slight increase the metadata memory usage, as the page may not be released as frequently as usual. But it should not be a big deal. The code got introduced in ("btrfs: submit read time repair only for each corrupted sector"), but the fix is in a separate patch to keep the problem description and the crash is rare so it should not hurt bisectability. Signed-off-by: Qu Wegruo Signed-off-by: David Sterba commit bcd77455d590eaa0422a5e84ae852007cfce574a Author: Qu Wenruo Date: Mon May 31 16:50:55 2021 +0800 btrfs: don't clear page extent mapped if we're not invalidating the full page [BUG] With current btrfs subpage rw support, the following script can lead to fs hang: $ mkfs.btrfs -f -s 4k $dev $ mount $dev -o nospace_cache $mnt $ fsstress -w -n 100 -p 1 -s 1608140256 -v -d $mnt The fs will hang at btrfs_start_ordered_extent(). [CAUSE] In above test case, btrfs_invalidate() will be called with the following parameters: offset = 0 length = 53248 page dirty = 1 subpage dirty bitmap = 0x2000 Since @offset is 0, btrfs_invalidate() will try to invalidate the full page, and finally call clear_page_extent_mapped() which will detach subpage structure from the page. And since the page no longer has subpage structure, the subpage dirty bitmap will be cleared, preventing the dirty range from being written back, thus no way to wake up the ordered extent. [FIX] Just follow other filesystems, only to invalidate the page if the range covers the full page. There are cases like truncate_setsize() which can call btrfs_invalidatepage() with offset == 0 and length != 0 for the last page of an inode. Although the old code will still try to invalidate the full page, we are still safe to just wait for ordered extent to finish. So it shouldn't cause extra problems. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 0528476b6ac7832f31e2ed740a57ae31316b124e Author: Qu Wenruo Date: Mon May 31 16:50:54 2021 +0800 btrfs: fix the filemap_range_has_page() call in btrfs_punch_hole_lock_range() [BUG] With current subpage RW support, the following script can hang the fs with 64K page size. # mkfs.btrfs -f -s 4k $dev # mount $dev -o nospace_cache $mnt # fsstress -w -n 50 -p 1 -s 1607749395 -d $mnt The kernel will do an infinite loop in btrfs_punch_hole_lock_range(). [CAUSE] In btrfs_punch_hole_lock_range() we: - Truncate page cache range - Lock extent io tree - Wait any ordered extents in the range. We exit the loop until we meet all the following conditions: - No ordered extent in the lock range - No page is in the lock range The latter condition has a pitfall, it only works for sector size == PAGE_SIZE case. While can't handle the following subpage case: 0 32K 64K 96K 128K | |///////||//////| || lockstart=32K lockend=96K - 1 In this case, although the range crosses 2 pages, truncate_pagecache_range() will invalidate no page at all, but only zero the [32K, 96K) range of the two pages. Thus filemap_range_has_page(32K, 96K-1) will always return true, thus we will never meet the loop exit condition. [FIX] Fix the problem by doing page alignment for the lock range. Function filemap_range_has_page() has already handled lend < lstart case, we only need to round up @lockstart, and round_down @lockend for truncate_pagecache_range(). This modification should not change any thing for sector size == PAGE_SIZE case, as in that case our range is already page aligned. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3115deb381e9242527017700cc7a946799d3af25 Author: Qu Wenruo Date: Mon May 31 16:50:53 2021 +0800 btrfs: reflink: make copy_inline_to_page() to be subpage compatible The modifications are: - Page copy destination For subpage case, one page can contain multiple sectors, thus we can no longer expect the memcpy_to_page()/btrfs_decompress() to copy data into page offset 0. The correct offset is offset_in_page(file_offset) now, which should handle both regular sectorsize and subpage cases well. - Page status update Now we need to use subpage helper to handle the page status update. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2d8ec40ee46d211fa8396678210faf19e013b093 Author: Qu Wenruo Date: Mon May 31 16:50:52 2021 +0800 btrfs: make btrfs_page_mkwrite() to be subpage compatible Only set_page_dirty() and SetPageUptodate() is not subpage compatible. Convert them to subpage helpers, so that __extent_writepage_io() can submit page content correctly. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6c9ac8be458152a6316cf28fcd52c7f38f7ec8ec Author: Qu Wenruo Date: Mon May 31 16:50:51 2021 +0800 btrfs: make btrfs_truncate_block() to be subpage compatible btrfs_truncate_block() itself is already mostly subpage compatible, the only missing part is the page dirtying code. Currently if we have a sector that needs to be truncated, we set the sector aligned range delalloc, then set the full page dirty. The problem is, current subpage code requires subpage dirty bit to be set, or __extent_writepage_io() won't submit bio, thus leads to ordered extent never to finish. So this patch will make btrfs_truncate_block() to call btrfs_page_set_dirty() helper to replace set_page_dirty() to fix the problem. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c5ef5c6c733a087fc3f8b298010d7e6911bff1e3 Author: Qu Wenruo Date: Mon May 31 16:50:50 2021 +0800 btrfs: make __extent_writepage_io() only submit dirty range for subpage __extent_writepage_io() function originally just iterates through all the extent maps of a page, and submits any regular extents. This is fine for sectorsize == PAGE_SIZE case, as if a page is dirty, we need to submit the only sector contained in the page. But for subpage case, one dirty page can contain several clean sectors with at least one dirty sector. If __extent_writepage_io() still submit all regular extent maps, it can submit data which is already written to disk. And since such already written data won't have corresponding ordered extents, it will trigger a BUG_ON() in btrfs_csum_one_bio(). Change the behavior of __extent_writepage_io() by finding the first dirty byte in the page, and only submit the dirty range other than the full extent. Since we're also here, also modify the following calls to be subpage compatible: - SetPageError() - end_page_writeback() Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit d2a9106448abad5646591795c8962ac043db4f89 Author: Qu Wenruo Date: Mon May 31 16:50:49 2021 +0800 btrfs: make btrfs_set_range_writeback() subpage compatible Function btrfs_set_range_writeback() currently just sets the page writeback unconditionally. Change it to call the subpage helper so that we can handle both cases well. Since the subpage helpers needs btrfs_fs_info, also change the parameter to accept btrfs_inode. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4750af3bbe5d975951b09afc61f18c7b29db7d44 Author: Qu Wenruo Date: Mon May 31 16:50:48 2021 +0800 btrfs: prevent extent_clear_unlock_delalloc() to unlock page not locked by __process_pages_contig() In cow_file_range(), after we have succeeded creating an inline extent, we unlock the page with extent_clear_unlock_delalloc() by passing locked_page == NULL. For sectorsize == PAGE_SIZE case, this is just making the page lock and unlock harder to grab. But for incoming subpage case, it can be a big problem. For incoming subpage case, page locking have two entry points: - __process_pages_contig() In that case, we know exactly the range we want to lock (which only requires sector alignment). To handle the subpage requirement, we introduce btrfs_subpage::writers to page::private, and will update it in __process_pages_contig(). - Other directly lock/unlock_page() call sites Those won't touch btrfs_subpage::writers at all. This means, page locked by __process_pages_contig() can only be unlocked by __process_pages_contig(). Thankfully we already have the existing infrastructure in the form of @locked_page in various call sites. Unfortunately, extent_clear_unlock_delalloc() in cow_file_range() after creating an inline extent is the exception. It intentionally call extent_clear_unlock_delalloc() with locked_page == NULL, to also unlock current page (and clear its dirty/writeback bits). To co-operate with incoming subpage modifications, and make the page lock/unlock pair easier to understand, this patch will still call extent_clear_unlock_delalloc() with locked_page, and only unlock the page in __extent_writepage(). Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit a33a8e9afcab270bfd8081ded8efb8c1e9eac7f3 Author: Qu Wenruo Date: Mon May 31 16:50:47 2021 +0800 btrfs: update locked page dirty/writeback/error bits in __process_pages_contig When __process_pages_contig() gets called for extent_clear_unlock_delalloc(), if we hit the locked page, only Private2 bit is updated, but dirty/writeback/error bits are all skipped. There are several call sites that call extent_clear_unlock_delalloc() with locked_page and PAGE_CLEAR_DIRTY/PAGE_SET_WRITEBACK/PAGE_END_WRITEBACK - cow_file_range() - run_delalloc_nocow() - cow_file_range_async() All for their error handling branches. For those call sites, since we skip the locked page for dirty/error/writeback bit update, the locked page will still have its subpage dirty bit remaining. Normally it's the call sites which locked the page to handle the locked page, but it won't hurt if we also do the update. Especially there are already other call sites doing the same thing by manually passing NULL as locked_page. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit b945a4637ec72a8ed0e526580a136d24f11abde1 Author: Qu Wenruo Date: Mon May 31 16:50:46 2021 +0800 btrfs: make page Ordered bit to be subpage compatible This involves the following modification: - Ordered extent creation This is done in process_one_page(), now PAGE_SET_ORDERED will call subpage helper to do the work. - endio functions This is done in btrfs_mark_ordered_io_finished(). - btrfs_invalidatepage() - btrfs_cleanup_ordered_extents() Use the subpage page helper, and add an extra branch to exit if the locked page have covered the full range. Now the usage of page Ordered flag for ordered extent accounting is fully subpage compatible. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 6f17400bd92e82ad549ea5374ffc71e35e2e4ee5 Author: Qu Wenruo Date: Mon May 31 16:50:45 2021 +0800 btrfs: introduce helpers for subpage ordered status This patch introduces the following functions to handle btrfs subpage ordered (Private2) status: - btrfs_subpage_set_ordered() - btrfs_subpage_clear_ordered() - btrfs_subpage_test_ordered() These helpers can only be called when the range is ensured to be inside the page. - btrfs_page_set_ordered() - btrfs_page_clear_ordered() - btrfs_page_test_ordered() These helpers can handle both regular sector size and subpage without problem. These functions are here to coordinate btrfs_invalidatepage() with btrfs_writepage_endio_finish_ordered(), to make sure only one of those functions can finish the ordered extent. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 1e1de38792e0ae28ac4a07628f20e42536c9202b Author: Qu Wenruo Date: Mon May 31 16:50:44 2021 +0800 btrfs: make process_one_page() to handle subpage locking Introduce a new data inodes specific subpage member, writers, to record how many sectors are under page lock for delalloc writing. This member acts pretty much the same as readers, except it's only for delalloc writes. This is important for delalloc code to trace which page can really be freed, as we have cases like run_delalloc_nocow() where we may exit processing nocow range inside a page, but need to exit to do cow half way. In that case, we need a way to determine if we can really unlock a full page. With the new btrfs_subpage::writers, there is a new requirement: - Page locked by process_one_page() must be unlocked by process_one_page() There are still tons of call sites manually lock and unlock a page, without updating btrfs_subpage::writers. So if we lock a page through process_one_page() then it must be unlocked by process_one_page() to keep btrfs_subpage::writers consistent. This will be handled in next patch. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 9047e3170a06f60a96a1d4a2f7762000657c7bbb Author: Qu Wenruo Date: Mon May 31 16:50:43 2021 +0800 btrfs: make end_bio_extent_writepage() to be subpage compatible Now in end_bio_extent_writepage(), the only subpage incompatible code is the end_page_writeback(). Just call the subpage helpers. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit e38992be1f6cf3ed88169347b7d92cec40cc44d3 Author: Qu Wenruo Date: Mon May 31 16:50:42 2021 +0800 btrfs: make __process_pages_contig() to handle subpage dirty/error/writeback status For __process_pages_contig() and process_one_page(), to handle subpage we only need to pass bytenr in and call subpage helpers to handle dirty/error/writeback status. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f02a85d2d551f1a34ac3a02b59d419767c97556b Author: Qu Wenruo Date: Mon May 31 16:50:41 2021 +0800 btrfs: make btrfs_dirty_pages() to be subpage compatible Since the extent io tree operations in btrfs_dirty_pages() are already subpage compatible, we only need to make the page status update to use subpage helpers. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 321a02db327a82aeaf9a114518705293cb8c2b31 Author: Qu Wenruo Date: Mon May 31 16:50:40 2021 +0800 btrfs: only require sector size alignment for end_bio_extent_writepage() Just like read page, for subpage support we only require sector size alignment. So change the error message condition to only require sector alignment. This should not affect existing code, as for regular sectorsize == PAGE_SIZE case, we are still requiring page alignment. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 60e2d25500aa74388bd0a30a39bb84249f2c75d5 Author: Qu Wenruo Date: Mon May 31 16:50:39 2021 +0800 btrfs: provide btrfs_page_clamp_*() helpers In the coming subpage RW supports, there are a lot of page status update calls which need to be converted to subpage compatible version, which needs @start and @len. Some call sites already have such @start/@len and are already in page range, like various endio functions. But there are also call sites which need to clamp the range for subpage case, like btrfs_dirty_pagse() and __process_contig_pages(). Here we introduce new helpers, btrfs_page_clamp_*(), to do and only do the clamp for subpage version. Although in theory all existing btrfs_page_*() calls can be converted to use btrfs_page_clamp_*() directly, but that would make us to do unnecessary clamp operations. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit ed8f13bf4a2ccb6c90d3210421455c2ceae678de Author: Qu Wenruo Date: Mon May 31 16:50:38 2021 +0800 btrfs: refactor page status update into process_one_page() In __process_pages_contig() we update page status according to page_ops. That update process is a bunch of 'if' branches, which lie inside two loops, this makes it pretty hard to expand for later subpage operations. So this patch will extract these operations into its own function, process_one_pages(). Also since we're refactoring __process_pages_contig(), also move the new helper and __process_pages_contig() before the first caller of them, to remove the forward declaration. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 98af9ab12b49a5ae338b523e64b5a7dd637781d4 Author: Qu Wenruo Date: Mon May 31 16:50:37 2021 +0800 btrfs: pass bytenr directly to __process_pages_contig() As a preparation for incoming subpage support, we need bytenr passed to __process_pages_contig() directly, not the current page index. So change the parameter and all callers to pass bytenr in. With the modification, here we need to replace the old @index_ret with @processed_end for __process_pages_contig(), but this brings a small problem. Normally we follow the inclusive return value, meaning @processed_end should be the last byte we processed. If parameter @start is 0, and we failed to lock any page, then we would return @processed_end as -1, causing more problems for __unlock_for_delalloc(). So here for @processed_end, we use two different return value patterns. If we have locked any page, @processed_end will be the last byte of locked page. Or it will be @start otherwise. This change will impact lock_delalloc_pages(), so it needs to check @processed_end to only unlock the range if we have locked any. Tested-by: Ritesh Harjani # [ppc64] Tested-by: Anand Jain # [aarch64] Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 968f2566ad897d643af66df0d44c070128402941 Author: Qu Wenruo Date: Tue May 18 15:09:41 2021 +0800 btrfs: fix hang when run_delalloc_range() failed [BUG] When running subpage preparation patches on x86, btrfs/125 will hang forever with one ordered extent never finished. [CAUSE] The test case btrfs/125 itself will always fail as the fix is never merged. When the test fails at balance, btrfs needs to cleanup the ordered extent in btrfs_cleanup_ordered_extents() for data reloc inode. The problem is in the sequence how we cleanup the page Order bit. Currently it works like: btrfs_cleanup_ordered_extents() |- find_get_page(); |- btrfs_page_clear_ordered(page); | Now the page doesn't have Ordered bit anymore. | !!! This also includes the first (locked) page !!! | |- offset += PAGE_SIZE | This is to skip the first page |- __endio_write_update_ordered() |- btrfs_mark_ordered_io_finished(NULL) Except the first page, all ordered extents are finished. Then the locked page is cleaned up in __extent_writepage(): __extent_writepage() |- If (PageError(page)) |- end_extent_writepage() |- btrfs_mark_ordered_io_finished(page) |- if (btrfs_test_page_ordered(page)) |- !!! The page gets skipped !!! The ordered extent is not decreased as the page doesn't have ordered bit anymore. This leaves the ordered extent with bytes_left == sectorsize, thus never finish. [FIX] The fix is to ensure we never clear page Ordered bit without running the ordered extent accounting. Here we choose to skip the locked page in btrfs_cleanup_ordered_extents() so that later end_extent_writepage() can properly finish the ordered extent. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f57ad93735fd66e5ce085f3818c85551abd0cbe8 Author: Qu Wenruo Date: Wed Apr 7 19:22:13 2021 +0800 btrfs: rename PagePrivate2 to PageOrdered inside btrfs Inside btrfs we use Private2 page status to indicate we have an ordered extent with pending IO for the sector. But the page status name, Private2, tells us nothing about the bit itself, so this patch will rename it to Ordered. And with extra comment about the bit added, so reader who is still uncertain about the page Ordered status, will find the comment pretty easily. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3b8358407aac088564f7db35ea842376686d0c92 Author: Qu Wenruo Date: Tue Apr 6 19:54:53 2021 +0800 btrfs: refactor btrfs_invalidatepage() for subpage support This patch will refactor btrfs_invalidatepage() for the incoming subpage support. The involved modifications are: - Use while() loop instead of "goto again;" - Use single variable to determine whether to delete extent states Each branch will also have comments why we can or cannot delete the extent states - Do qgroup free and extent states deletion per-loop Current code can only work for PAGE_SIZE == sectorsize case. This refactor also makes it clear what we do for different sectors: - Sectors without ordered extent We're completely safe to remove all extent states for the sector(s) - Sectors with ordered extent, but no Private2 bit This means the endio has already been executed, we can't remove all extent states for the sector(s). - Sectors with ordere extent, still has Private2 bit This means we need to decrease the ordered extent accounting. And then it comes to two different variants: * We have finished and removed the ordered extent Then it's the same as "sectors without ordered extent" * We didn't finished the ordered extent We can remove some extent states, but not all. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit c095f3333fc4ae3e6881b9269962252ffd6b5de2 Author: Qu Wenruo Date: Tue Apr 27 15:03:40 2021 +0800 btrfs: introduce btrfs_lookup_first_ordered_range() Although we already have btrfs_lookup_first_ordered_extent() and btrfs_lookup_ordered_extent(), they all have their own limitations: - btrfs_lookup_ordered_extent() can't do extra range check It's only designed to lookup any ordered extent before certain bytenr. - btrfs_lookup_first_ordered_extent() may not return the first ordered extent in the range It doesn't ensure the first ordered extent is returned. The existing callers are only interested in exhausting all ordered extents in a range, the order is not important. For incoming btrfs_invalidatepage() refactoring, we need a way to properly iterate all ordered extents in their bytenr order of a range. So this patch will introduce a new function, btrfs_lookup_first_ordered_range(), to do ordered extent with bytenr order awareness and extra range check. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 266a258678b9f254647f4297843cfbfbddde220a Author: Qu Wenruo Date: Tue Apr 6 08:27:18 2021 +0800 btrfs: update comments in btrfs_invalidatepage() The existing comments in btrfs_invalidatepage() don't really get to the point, especially for what Private2 is really representing and how the race avoidance is done. The truth is, there are only three entrances to do ordered extent accounting: - btrfs_writepage_endio_finish_ordered() - __endio_write_update_ordered() Those two entrance are just endio functions for dio and buffered write. - btrfs_invalidatepage() But there is a pitfall, in endio functions there is no check on whether the ordered extent is already accounted. They just blindly clear the Private2 bit and do the accounting. So it's all btrfs_invalidatepage()'s responsibility to make sure we won't do double account for the same sector. That's why in btrfs_invalidatepage() we have to wait for page writeback, this will ensure all submitted bios have finished, thus their endio functions have finished the accounting on the ordered extent. Then we also check page Private2 to ensure that, we only run ordered extent accounting on pages who has no bio submitted. This patch will rework related comments to make it more clear on the race and how we use wait_on_page_writeback() and Private2 to prevent double accounting on ordered extent. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit e65f152e43484807b4caf7300e70d882e4652566 Author: Qu Wenruo Date: Thu Apr 1 15:15:06 2021 +0800 btrfs: refactor how we finish ordered extent io for endio functions Btrfs has two endio functions to mark certain io range finished for ordered extents: - __endio_write_update_ordered() This is for direct IO - btrfs_writepage_endio_finish_ordered() This for buffered IO. However they go different routines to handle ordered extent io: - Whether to iterate through all ordered extents __endio_write_update_ordered() will but btrfs_writepage_endio_finish_ordered() will not. In fact, iterating through all ordered extents will benefit later subpage support, while for current PAGE_SIZE == sectorsize requirement this behavior makes no difference. - Whether to update page Private2 flag __endio_write_update_ordered() will not update page Private2 flag as for iomap direct IO, the page can not be even mapped. While btrfs_writepage_endio_finish_ordered() will clear Private2 to prevent double accounting against btrfs_invalidatepage(). Those differences are pretty subtle, and the ordered extent iterations code in callers makes code much harder to read. So this patch will introduce a new function, btrfs_mark_ordered_io_finished(), to do the heavy lifting: - Iterate through all ordered extents in the range - Do the ordered extent accounting - Queue the work for finished ordered extent This function has two new feature: - Proper underflow detection and recovery The old underflow detection will only detect the problem, then continue. No proper info like root/inode/ordered extent info, nor noisy enough to be caught by fstests. Furthermore when underflow happens, the ordered extent will never finish. New error detection will reset the bytes_left to 0, do proper kernel warning, and output extra info including root, ino, ordered extent range, the underflow value. - Prevent double accounting based on Private2 flag Now if we find a range without Private2 flag, we will skip to next range. As that means someone else has already finished the accounting of ordered extent. This makes no difference for current code, but will be a critical part for incoming subpage support, as we can call btrfs_mark_ordered_io_finished() for multiple sectors if they are beyond inode size. Thus such double accounting prevention is a key feature for subpage. Now both endio functions only need to call that new function. And since the only caller of btrfs_dec_test_first_ordered_pending() is removed, also remove btrfs_dec_test_first_ordered_pending() completely. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 87b4d86baae219a9a79f6b0a1434b2a42fd40d09 Author: Qu Wenruo Date: Fri Jan 22 14:00:52 2021 +0800 btrfs: make Private2 lifespan more consistent Currently we use page Private2 bit to indicate that we have ordered extent for the page range. But the lifespan of it is not consistent, during regular writeback path, there are two locations to clear the same PagePrivate2: T ----- Page marked Dirty | + ----- Page marked Private2, through btrfs_run_dealloc_range() | + ----- Page cleared Private2, through btrfs_writepage_cow_fixup() | in __extent_writepage_io() | ^^^ Private2 cleared for the first time | + ----- Page marked Writeback, through btrfs_set_range_writeback() | in __extent_writepage_io(). | + ----- Page cleared Private2, through | btrfs_writepage_endio_finish_ordered() | ^^^ Private2 cleared for the second time. | + ----- Page cleared Writeback, through btrfs_writepage_endio_finish_ordered() Currently PagePrivate2 is mostly to prevent ordered extent accounting being executed for both endio and invalidatepage. Thus only the one who cleared page Private2 is responsible for ordered extent accounting. But the fact is, in btrfs_writepage_endio_finish_ordered(), page Private2 is cleared and ordered extent accounting is executed unconditionally. The race prevention only happens through btrfs_invalidatepage(), where we wait for the page writeback first, before checking the Private2 bit. This means, Private2 is also protected by Writeback bit, and there is no need for btrfs_writepage_cow_fixup() to clear Priavte2. This patch will change btrfs_writepage_cow_fixup() to just check PagePrivate2, not to clear it. The clearing will happen in either btrfs_invalidatepage() or btrfs_writepage_endio_finish_ordered(). This makes the Private2 bit easier to understand, just meaning the page has unfinished ordered extent attached to it. And this patch is a hard requirement for the incoming refactoring for how we finished ordered IO for endio context, as the coming patch will check Private2 to determine if we need to do the ordered extent accounting. Thus this patch is definitely needed or we will hang due to unfinished ordered extent. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 38a39ac77e089515acbe85c6c70c3df1e728357d Author: Qu Wenruo Date: Thu Apr 8 20:32:27 2021 +0800 btrfs: pass btrfs_inode to btrfs_writepage_endio_finish_ordered() There is a pretty bad abuse of btrfs_writepage_endio_finish_ordered() in end_compressed_bio_write(). It passes compressed pages to btrfs_writepage_endio_finish_ordered(), which is only supposed to accept inode pages. Thankfully the important info here is the inode, so let's pass btrfs_inode directly into btrfs_writepage_endio_finish_ordered(), and make @page parameter optional. By this, end_compressed_bio_write() can happily pass page=NULL while still getting everything done properly. Also, to cooperate with such modification, replace @page parameter for trace_btrfs_writepage_end_io_hook() with btrfs_inode. Although this removes page_index info, the existing start/len should be enough for most usage. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit fa04c16574c08ddea6885b5cd6a0ecb941bfa3c0 Author: Qu Wenruo Date: Tue Apr 27 12:53:35 2021 +0800 btrfs: make subpage metadata write path call its own endio functions For subpage metadata, we're reusing two functions for subpage metadata write: - end_bio_extent_buffer_writepage() - write_one_eb() But the truth is, for subpage we just call end_bio_subpage_eb_writepage() without using any bit in end_bio_extent_buffer_writepage(). For write_one_eb(), it's pretty similar, but with a small part of code reused. There is really no need to pollute the existing code path if we're not really using most of them. So this patch will do the following change to separate the subpage metadata write path from regular write path by: - Use end_bio_subpage_eb_writepage() directly as endio in write_one_subpage_eb() - Directly call write_one_subpage_eb() in submit_eb_subpage() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 390ed29b817e6de4e8a9dd1749659e7de8ed1c4c Author: Qu Wenruo Date: Wed Apr 14 16:42:15 2021 +0800 btrfs: refactor submit_extent_page() to make bio and its flag tracing easier There is a lot of code inside extent_io.c needs both "struct bio **bio_ret" and "unsigned long prev_bio_flags", along with some parameters like "unsigned long bio_flags". Such strange parameters are here for bio assembly. For example, we have such inode page layout: 0 4K 8K 12K |<-- Extent A-->|<- EB->| Then what we do is: - Page [0, 4K) *bio_ret = NULL So we allocate a new bio to bio_ret, Add page [0, 4K) to *bio_ret. - Page [4K, 8K) *bio_ret != NULL We found this page is continuous to *bio_ret, and if we're not at stripe boundary, we add page [4K, 8K) to *bio_ret. - Page [8K, 12K) *bio_ret != NULL But we found this page is not continuous, so we submit *bio_ret, then allocate a new bio, and add page [8K, 12K) to the new bio. This means we need to record both the bio and its bio_flag, but we record them manually using those strange parameter list, other than encapsulating them into their own structure. So this patch will introduce a new structure, btrfs_bio_ctrl, to record both the bio, and its bio_flags. Also, in above case, for all pages added to the bio, we need to check if the new page crosses stripe boundary. This check itself can be time consuming, and we don't really need to do that for each page. This patch also integrates the stripe boundary check into btrfs_bio_ctrl. When a new bio is allocated, the stripe and ordered extent boundary is also calculated, so no matter how large the bio will be, we only calculate the boundaries once, to save some CPU time. The following functions/structures are affected: - struct extent_page_data Replace its bio pointer with structure btrfs_bio_ctrl (embedded structure, not pointer) - end_write_bio() - flush_write_bio() Just change how bio is fetched - btrfs_bio_add_page() Use pre-calculated boundaries instead of re-calculating them. And use @bio_ctrl to replace @bio and @prev_bio_flags. - calc_bio_boundaries() New function - submit_extent_page() callers - btrfs_do_readpage() callers - contiguous_readpages() callers To Use @bio_ctrl to replace @bio and @prev_bio_flags, and how to grab bio. - btrfs_bio_fits_in_ordered_extent() Removed, as now the ordered extent size limit is done at bio allocation time, no need to check for each page range. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1a0b5c4d6445abcbdc95cff4aa4e1dc9e565607a Author: Qu Wenruo Date: Tue Apr 13 18:00:47 2021 +0800 btrfs: allow btrfs_bio_fits_in_stripe() to accept bio without any page Function btrfs_bio_fits_in_stripe() now requires a bio with at least one page added. Or btrfs_get_chunk_map() will fail with -ENOENT. But in fact this requirement is not needed at all, as we can just pass sectorsize for btrfs_get_chunk_map(). This tiny behavior change is important for later subpage refactoring on submit_extent_page(). As for 64K page size, we can have a page range with pgoff=0 and size=64K. If the logical bytenr is just 16K before the stripe boundary, we have to split the page range into two bios. This means, we must check page range against stripe boundary, even adding the range to an empty bio. This tiny refactoring is for the incoming changes, but on its own, regular sectorsize == PAGE_SIZE is not affected anyway. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 43c0d1a5e117954b8193912939eb01390b2f01f2 Author: Qu Wenruo Date: Tue Apr 13 17:58:48 2021 +0800 btrfs: remove the unused parameter @len for btrfs_bio_fits_in_stripe() The parameter @len is not really used in btrfs_bio_fits_in_stripe(), just remove it. It got removed in 420343131970 ("btrfs: let callers of btrfs_get_io_geometry pass the em"), before that btrfs_get_chunk_map utilized it. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0044ae11e8be86b5e39857d47017417d4cda00f2 Author: Qu Wenruo Date: Tue Apr 13 14:23:14 2021 +0800 btrfs: make free space cache size consistent across different PAGE_SIZE Currently free space cache inode size is determined by two factors: - block group size - PAGE_SIZE This means, for the same sized block groups, with different PAGE_SIZE, it will result in different inode sizes. This will not be a good thing for subpage support, so change the requirement for PAGE_SIZE to sectorsize. Now for the same 4K sectorsize btrfs, it should result the same inode size no matter what the PAGE_SIZE is. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 8df507cbb5952719353c912a021b66c27641e90c Author: Qu Wenruo Date: Thu Apr 22 19:02:46 2021 +0800 btrfs: scrub: fix subpage repair error caused by hard coded PAGE_SIZE [BUG] For the following file layout, scrub will not be able to repair all these two repairable error, but in fact make one corruption even unrepairable: inode offset 0 4k 8K Mirror 1 |XXXXXX| | Mirror 2 | |XXXXXX| [CAUSE] The root cause is the hard coded PAGE_SIZE, which makes scrub repair to go crazy for subpage. For above case, when reading the first sector, we use PAGE_SIZE other than sectorsize to read, which makes us to read the full range [0, 64K). In fact, after 8K there may be no data at all, we can just get some garbage. Then when doing the repair, we also writeback a full page from mirror 2, this means, we will also writeback the corrupted data in mirror 2 back to mirror 1, leaving the range [4K, 8K) unrepairable. [FIX] This patch will modify the following PAGE_SIZE use with sectorsize: - scrub_print_warning_inode() Remove the min() and replace PAGE_SIZE with sectorsize. The min() makes no sense, as csum is done for the full sector with padding. This fixes a bug that subpage report extra length like: checksum error at logical 298844160 on dev /dev/mapper/arm_nvme-test, physical 575668224, root 5, inode 257, offset 0, length 12288, links 1 (path: file) Where the error is only 1 sector. - scrub_handle_errored_block() Comments with PAGE|page involved, all changed to sector. - scrub_setup_recheck_block() - scrub_repair_page_from_good_copy() - scrub_add_page_to_wr_bio() - scrub_wr_submit() - scrub_add_page_to_rd_bio() - scrub_block_complete() Replace PAGE_SIZE with sectorsize. This solves several problems where we read/write extra range for subpage case. RAID56 code is excluded intentionally, as RAID56 has extra PAGE_SIZE usage, and is not really safe enough. Thus we will reject RAID56 for subpage in later commit. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit ec87b42f7095a92e484e34c2c9bb486ae79d6548 Author: Nikolay Borisov Date: Mon May 31 10:37:03 2021 +0300 btrfs: use list_last_entry in add_falloc_range Instead of calling list_entry with head->prev simply call list_last_entry which makes it obvious which member of the list is being referred. This allows to remove the extra 'prev' pointer. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4183abf6cbfd8e71c5e19df697d8e43f1a2a6908 Author: Anand Jain Date: Sat May 29 17:48:36 2021 +0800 btrfs: fix comment about max_out in btrfs_compress_pages Commit e5d74902362f ("btrfs: derive maximum output size in the compression implementation") removed @max_out argument in btrfs_compress_pages() but its comment remained, remove it. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 65b5355f77082804949390dc2629256c8c24f69d Author: Anand Jain Date: Sat May 29 17:48:35 2021 +0800 btrfs: optimize variables size in btrfs_submit_compressed_write Patch "btrfs: reduce compressed_bio member's types" reduced some member's size. Function arguments @len, @compressed_len and @nr_pages can be declared as unsigned int. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 356b4a2dc151c65e5abce07b7c0e4a146769892b Author: Anand Jain Date: Sat May 29 17:48:34 2021 +0800 btrfs: optimize variables size in btrfs_submit_compressed_read Patch "btrfs: reduce compressed_bio member's types" reduced some member's size. Declare the variables @compressed_len, @nr_pages and @pg_index size as an unsigned int in the function btrfs_submit_compressed_read. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1d08ce58406d1cd6222fca72144146c7ee1450ec Author: Anand Jain Date: Sat May 29 17:48:33 2021 +0800 btrfs: reduce the variable size to fit nr_pages Patch "btrfs: reduce compressed_bio member's types" reduced the @nr_pages size to unsigned int, its cascading effects are updated here. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit b590b839720cf4fa46798ee6e950ed7369f52a15 Author: Filipe Manana Date: Fri May 28 11:37:32 2021 +0100 btrfs: avoid unnecessary logging of xattrs during fast fsyncs When logging an inode we always log all its xattrs, so that we are able to figure out which ones should be deleted during log replay. However this is unnecessary when we are doing a fast fsync and no xattrs were added, changed or deleted since the last time we logged the inode in the current transaction. So skip the logging of xattrs when the inode was previously logged in the current transaction and no xattrs were added, changed or deleted. If any changes to xattrs happened, than the inode has BTRFS_INODE_COPY_EVERYTHING set in its runtime flags and the xattrs get logged. This saves time on scanning for xattrs, allocating memory, COWing log tree extent buffers and adding more lock contention on the extent buffers when there are multiple tasks logging in parallel. The use of xattrs is common when using ACLs, some applications, or when using security modules like SELinux where every inode gets a security xattr added to it. The following test script, using fio, was used on a box with 12 cores, 64G of RAM, a NVMe device and the default non-debug kernel config from Debian. It uses 8 concurrent jobs each writing in blocks of 64K to its own 4G file, each file with a single xattr of 50 bytes (about the same size for an ACL or SELinux xattr), doing random buffered writes with an fsync after each write. $ cat test.sh #!/bin/bash DEV=/dev/nvme0n1 MNT=/mnt/test MOUNT_OPTIONS="-o ssd" MKFS_OPTIONS="-d single -m single" NUM_JOBS=8 FILE_SIZE=4G cat < /tmp/fio-job.ini [writers] rw=randwrite fsync=1 fallocate=none group_reporting=1 direct=0 bs=64K ioengine=sync size=$FILE_SIZE directory=$MNT numjobs=$NUM_JOBS EOF echo "performance" | \ tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f $MKFS_OPTIONS $DEV > /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo "Creating files before fio runs, each with 1 xattr of 50 bytes" for ((i = 0; i < $NUM_JOBS; i++)); do path="$MNT/writers.$i.0" truncate -s $FILE_SIZE $path setfattr -n user.xa1 -v $(printf '%0.sX' $(seq 50)) $path done fio /tmp/fio-job.ini umount $MNT fio output before this change: WRITE: bw=120MiB/s (126MB/s), 120MiB/s-120MiB/s (126MB/s-126MB/s), io=32.0GiB (34.4GB), run=272145-272145msec fio output after this change: WRITE: bw=142MiB/s (149MB/s), 142MiB/s-142MiB/s (149MB/s-149MB/s), io=32.0GiB (34.4GB), run=230408-230408msec +16.8% throughput, -16.6% runtime Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 67ae34b69c4146e40f3828ecb59ff00a840c01dc Author: David Sterba Date: Fri May 14 21:21:27 2021 +0200 btrfs: add device delete cancel Accept device name "cancel" as a request to cancel running device deletion operation. The string is literal, in case there's a real device named "cancel", pass it as full absolute path or as "./cancel" This works for v1 and v2 ioctls when the device is specified by name. Moving chunks from the device uses relocation, use the conditional exclusive operation start and cancellation helpers Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit bb059a37c9ff3e40c0348e82a7e3ebd3918cf418 Author: David Sterba Date: Tue May 18 21:12:33 2021 +0200 btrfs: add cancellation to resize Accept literal string "cancel" as resize operation and interpret that as a request to cancel the running operation. If it's running, wait until it finishes current work and return ECANCELED. Shrinking resize uses relocation to move the chunks away, use the conditional exclusive operation start and cancellation helpers. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 17aaa434ed39cbad48824ef4bb9ec3707091ae5b Author: David Sterba Date: Fri May 14 21:32:44 2021 +0200 btrfs: add wrapper for conditional start of exclusive operation To support optional cancellation of some operations, add helper that will wrap all the combinations. In normal mode it's same as btrfs_exclop_start, in cancellation mode it checks if it's already running and request cancellation and waits until completion. The error codes can be returned to to user space and semantics is not changed, adding ECANCELED. This should be evaluated as an error and that the operation has not completed and the operation should be restarted or the filesystem status reviewed. Signed-off-by: David Sterba commit 578bda9e17fdb6b6eaab1980f87dd1819b123da0 Author: David Sterba Date: Tue May 18 21:05:52 2021 +0200 btrfs: introduce try-lock semantics for exclusive op start Add try-lock for exclusive operation start to allow callers to do more checks. The same operation must already be running. The try-lock and unlock must pair and are a substitute for btrfs_exclop_start, thus it must also pair with btrfs_exclop_finish to release the exclop context. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 907d2710d727541fffabdc52a025916d5109b3e5 Author: David Sterba Date: Tue May 18 00:37:36 2021 +0200 btrfs: add cancellable chunk relocation support Add support code that will allow canceling relocation on the chunk granularity. This is different and independent of balance, that also uses relocation but is a higher level operation and manages it's own state and pause/cancellation requests. Relocation is used for resize (shrink) and device deletion so this will be a common point to implement cancellation for both. The context is entirely in btrfs_relocate_block_group and btrfs_recover_relocation, enclosing one chunk relocation. The status bit is set and unset between the chunks. As relocation can take long, the effects may not be immediate and the request and actual action can slightly race. The fs_info::reloc_cancel_req is only supposed to be increased and does not pair with decrement like fs_info::balance_cancel_req. Reviewed-by: Filipe Manana Signed-off-by: David Sterba commit 0d7ed32c1eebfa34e28d24930ea598a4492d289e Author: David Sterba Date: Fri May 14 17:42:30 2021 +0200 btrfs: protect exclusive_operation by super_lock The exclusive operation is now atomically checked and set using bit operations. Switch it to protection by spinlock. The super block lock is not frequently used and adding a new lock seems like an overkill so it should be safe to reuse it. The reason to use spinlock is to enhance the locking context so more checks can be done, eg. allowing the same exclusive operation enter the exclop section and cancel the running one. This will be used for resize and device delete. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 24880be59c5abdb4f686e17fcf4414518d7fec31 Author: David Sterba Date: Mon Sep 21 22:07:14 2020 +0200 btrfs: clean up header members offsets in write helpers Move header offsetof() to the expression that calculates the address so it's part of get_eb_offset_in_page where the 2nd parameter is the member offset. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit dfd29eed4ab5881a1af9f07c3573c0be5593dc1f Author: David Sterba Date: Mon Sep 21 22:07:14 2020 +0200 btrfs: simplify eb checksum verification in btrfs_validate_metadata_buffer The verification copies the calculated checksum bytes to a temporary buffer but this is not necessary. We can map the eb header on the first page and use the checksum bytes directly. This saves at least one function call and boundary checks so it could lead to a minor performance improvement. Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit ff14aa798756a6b98b6020e51e52168128ffa9d7 Author: David Sterba Date: Mon Sep 21 21:58:14 2020 +0200 btrfs: remove extra sb::s_id from message in btrfs_validate_metadata_buffer The s_id is already printed by message helpers. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 282ab3ff16120ec670fe3330e85f8ebf13092f21 Author: David Sterba Date: Mon Oct 14 14:38:33 2019 +0200 btrfs: reduce compressed_bio members' types Several members of compressed_bio are of type that's unnecessarily big for the values that they'd hold: - the size of the uncompressed and compressed data is 128K now, we can keep is as int - same for number of pages - the compress type fits to a byte - the errors is 0/1 The size of the unpatched structure is 80 bytes with several holes. Reordering nr_pages next to the pages the hole after pending_bios is filled and the resulting size is 56 bytes. This keeps the csums array aligned to 8 bytes, which is nice. Further size optimizations may be possible but right now it looks good to me: struct compressed_bio { refcount_t pending_bios; /* 0 4 */ unsigned int nr_pages; /* 4 4 */ struct page * * compressed_pages; /* 8 8 */ struct inode * inode; /* 16 8 */ u64 start; /* 24 8 */ unsigned int len; /* 32 4 */ unsigned int compressed_len; /* 36 4 */ u8 compress_type; /* 40 1 */ u8 errors; /* 41 1 */ /* XXX 2 bytes hole, try to pack */ int mirror_num; /* 44 4 */ struct bio * orig_bio; /* 48 8 */ u8 sums[]; /* 56 0 */ /* size: 56, cachelines: 1, members: 12 */ /* sum members: 54, holes: 1, sum holes: 2 */ /* last cacheline: 56 bytes */ }; Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 49547068f6fdd148d62eaeb06163213422125d9b Author: David Sterba Date: Tue Sep 15 21:10:03 2020 +0200 btrfs: document byte swap optimization of root_item::flags accessors Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 7735cd755b590f34a2b019a0a980dd56493a4d65 Author: David Sterba Date: Thu Nov 28 15:37:46 2019 +0100 btrfs: scrub: factor out common scrub_stripe constraints There are common values set for the stripe constraints, some of them are already factored out. Do that for increment and mirror_num as well. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 1aeb6b563aea18cd55c73cf666d1d3245a00f08c Author: David Sterba Date: Tue Jul 7 18:38:05 2020 +0200 btrfs: clear log tree recovering status if starting transaction fails When a log recovery is in progress, lots of operations have to take that into account, so we keep this status per tree during the operation. Long time ago error handling revamp patch 79787eaab461 ("btrfs: replace many BUG_ONs with proper error handling") removed clearing of the status in an error branch. Add it back as was intended in e02119d5a7b4 ("Btrfs: Add a write ahead tree log to optimize synchronous operations"). There are probably no visible effects, log replay is done only during mount and if it fails all structures are cleared so the stale status won't be kept. Fixes: 79787eaab461 ("btrfs: replace many BUG_ONs with proper error handling") Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 6819703f5a365c95488b07066a8744841bf14231 Author: David Sterba Date: Tue Jul 7 18:30:06 2020 +0200 btrfs: clear defrag status of a root if starting transaction fails The defrag loop processes leaves in batches and starting transaction for each. The whole defragmentation on a given root is protected by a bit but in case the transaction fails, the bit is not cleared In case the transaction fails the bit would prevent starting defragmentation again, so make sure it's cleared. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 8c5ec995616f1202ab92e195fd75d6f60d86f85c Author: David Sterba Date: Fri May 7 20:00:14 2021 +0200 btrfs: sysfs: fix format string for some discard stats The type of discard_bitmap_bytes and discard_extent_bytes is u64 so the format should be %llu, though the actual values would hardly ever overflow to negative values. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 5963ffcaf383134985a5a2d8a4baa582d3999e0a Author: Josef Bacik Date: Thu May 20 11:21:31 2021 -0400 btrfs: always abort the transaction if we abort a trans handle While stress testing our error handling I noticed that sometimes we would still commit the transaction even though we had aborted the transaction. Currently we track if a trans handle has dirtied any metadata, and if it hasn't we mark the filesystem as having an error (so no new transactions can be started), but we will allow the current transaction to complete as we do not mark the transaction itself as having been aborted. This sounds good in theory, but we were not properly tracking IO errors in btrfs_finish_ordered_io, and thus committing the transaction with bogus free space data. This isn't necessarily a problem per-se with the free space cache, as the other guards in place would have kept us from accepting the free space cache as valid, but highlights a real world case where we had a bug and could have corrupted the filesystem because of it. This "skip abort on empty trans handle" is nice in theory, but assumes we have perfect error handling everywhere, which we clearly do not. Also we do not allow further transactions to be started, so all this does is save the last transaction that was happening, which doesn't necessarily gain us anything other than the potential for real corruption. Remove this particular bit of code, if we decide we need to abort the transaction then abort the current one and keep us from doing real harm to the file system, regardless of whether this specific trans handle dirtied anything or not. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0d7d316597c00fbc13fffadaab27a448d5a6a60f Author: Filipe Manana Date: Mon May 24 11:35:55 2021 +0100 btrfs: don't set the full sync flag when truncation does not touch extents At btrfs_truncate() where we truncate the inode either to the same size or to a smaller size, we always set the full sync flag on the inode. This is needed in case the truncation drops or trims any file extent items that start beyond or cross the new inode size, so that the next fsync drops all inode items from the log and scans again the fs/subvolume tree to find all items that must be logged. However if the truncation does not drop or trims any file extent items, we do not need to set the full sync flag and force the next fsync to use the slow code path. So do not set the full sync flag in such cases. One use case where it is frequent to do truncations that do not change the inode size and do not drop any extents (no prealloc extents beyond i_size) is when running Microsoft's SQL Server inside a Docker container. One example workload is the one Philipp Fent reported recently, in the thread with a link below. In this workload a large number of fsyncs are preceded by such truncate operations. After this change I constantly get the runtime for that workload from Philipp to be reduced by about -12%, for example from 184 seconds down to 162 seconds. Link: https://lore.kernel.org/linux-btrfs/93c4600e-5263-5cba-adf0-6f47526e7561@in.tum.de/ Tested-by: Anand Jain Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 4f7e67378e1bccd4d1d4de5d7f5aaf928cc07928 Author: Filipe Manana Date: Mon May 24 11:35:54 2021 +0100 btrfs: fix misleading and incomplete comment of btrfs_truncate() The comment at the top of btrfs_truncate() mentions that csum items are dropped or truncated to the new i_size, but this is wrong and non sense, as they are unrelated to the i_size and are located in the csums tree and not on a tree with inode items (fs/subvolume tree or a log tree). Instead that claim applies to file extent items, so fix the comment to refer to them instead. While at it make the whole comment for the function more descriptive and follow the kernel doc style. Tested-by: Anand Jain Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 04587ad9bef6ce9d510325b4ba9852b6129eebdb Author: Josef Bacik Date: Fri May 21 16:44:09 2021 -0400 btrfs: abort transaction if we fail to update the delayed inode If we fail to update the delayed inode we need to abort the transaction, because we could leave an inode with the improper counts or some other such corruption behind. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bb385bedded3ccbd794559600de4a09448810f4a Author: Josef Bacik Date: Fri May 21 16:44:08 2021 -0400 btrfs: fix error handling in __btrfs_update_delayed_inode If we get an error while looking up the inode item we'll simply bail without cleaning up the delayed node. This results in this style of warning happening on commit: WARNING: CPU: 0 PID: 76403 at fs/btrfs/delayed-inode.c:1365 btrfs_assert_delayed_root_empty+0x5b/0x90 CPU: 0 PID: 76403 Comm: fsstress Tainted: G W 5.13.0-rc1+ #373 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 RIP: 0010:btrfs_assert_delayed_root_empty+0x5b/0x90 RSP: 0018:ffffb8bb815a7e50 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff95d6d07e1888 RCX: ffff95d6c0fa3000 RDX: 0000000000000002 RSI: 000000000029e91c RDI: ffff95d6c0fc8060 RBP: ffff95d6c0fc8060 R08: 00008d6d701a2c1d R09: 0000000000000000 R10: ffff95d6d1760ea0 R11: 0000000000000001 R12: ffff95d6c15a4d00 R13: ffff95d6c0fa3000 R14: 0000000000000000 R15: ffffb8bb815a7e90 FS: 00007f490e8dbb80(0000) GS:ffff95d73bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6e75555cb0 CR3: 00000001101ce001 CR4: 0000000000370ef0 Call Trace: btrfs_commit_transaction+0x43c/0xb00 ? finish_wait+0x80/0x80 ? vfs_fsync_range+0x90/0x90 iterate_supers+0x8c/0x100 ksys_sync+0x50/0x90 __do_sys_sync+0xa/0x10 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Because the iref isn't dropped and this leaves an elevated node->count, so any release just re-queues it onto the delayed inodes list. Fix this by going to the out label to handle the proper cleanup of the delayed node. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a4cb90dc015cf18aa31bf7b8c38bf6426d9aed6a Author: Josef Bacik Date: Fri May 21 16:44:07 2021 -0400 btrfs: make btrfs_release_delayed_iref handle the !iref case Right now we only cleanup the delayed iref if we have BTRFS_DELAYED_NODE_DEL_IREF set on the node. However we have some error conditions that need to cleanup the iref if it still exists, so to make this code cleaner move the test_bit into btrfs_release_delayed_iref itself and unconditionally call it in each of the cases instead. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit eb3b50536642b6e1ba67e84dcacdd9ccef30d850 Author: David Sterba Date: Wed Oct 9 13:58:13 2019 +0200 btrfs: scrub: per-device bandwidth control Add sysfs interface to limit io during scrub. We relied on the ionice interface to do that, eg. the idle class let the system usable while scrub was running. This has changed when mq-deadline got widespread and did not implement the scheduling classes. That was a CFQ thing that got deleted. We've got numerous complaints from users about degraded performance. Currently only BFQ supports that but it's not a common scheduler and we can't ask everybody to switch to it. Alternatively the cgroup io limiting can be used but that also a non-trivial setup (v2 required, the controller must be enabled on the system). This can still be used if desired. Other ideas that have been explored: piggy-back on ionice (that is set per-process and is accessible) and interpret the class and classdata as bandwidth limits, but this does not have enough flexibility as there are only 8 allowed and we'd have to map fixed limits to each value. Also adjusting the value would need to lookup the process that currently runs scrub on the given device, and the value is not sticky so would have to be adjusted each time scrub runs. Running out of options, sysfs does not look that bad: - it's accessible from scripts, or udev rules - the name is similar to what MD-RAID has (/proc/sys/dev/raid/speed_limit_max or /sys/block/mdX/md/sync_speed_max) - the value is sticky at least for filesystem mount time - adjusting the value has immediate effect - sysfs is available in constrained environments (eg. system rescue) - the limit also applies to device replace Sysfs: - raw value is in bytes - values written to the file accept suffixes like K, M - file is in the per-device directory /sys/fs/btrfs/FSID/devinfo/DEVID/scrub_speed_max - 0 means use default priority of IO The scheduler is a simple deadline one and the accuracy is up to nearest 128K. Signed-off-by: David Sterba commit e7ff9e6b8e7d89199119468ae61b29a56f81ad28 Author: Johannes Thumshirn Date: Wed May 19 00:40:29 2021 +0900 btrfs: zoned: factor out zoned device lookup To be able to construct a zone append bio we need to look up the btrfs_device. The code doing the chunk map lookup to get the device is present in btrfs_submit_compressed_write and submit_extent_page. Factor out the lookup calls into a helper and use it in the submission paths. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 50535db8fbf67d44522de5b79ddf66fb6d0c14a8 Author: Tian Tao Date: Wed May 5 09:26:28 2021 +0800 btrfs: return EAGAIN if defrag is canceled When inode defrag is canceled, the error is set to EAGAIN but then overwritten by number of defragmented bytes. As this would hide the error, rather return EAGAIN. This does not harm 'btrfs fi defrag', it will print the error and continue to next file (as it does in for any other error). Signed-off-by: Tian Tao Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 1245835d24f1ea989a0cbcdf93ddea3dcbc3814f Author: Qu Wenruo Date: Mon May 3 10:08:56 2021 +0800 btrfs: remove io_failure_record::in_validation The io_failure_record::in_validation was introduced to handle failed bio which cross several sectors. In such case, we still need to verify which sectors are corrupted. But since we've changed the way how we handle corrupted sectors, by only submitting repair for each corrupted sector, there is no need for extra validation any more. This patch will cleanup all io_failure_record::in_validation related code. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 150e4b0597a7988f44d13e5199f08749c8ff432d Author: Qu Wenruo Date: Mon May 3 10:08:55 2021 +0800 btrfs: submit read time repair only for each corrupted sector Currently btrfs_submit_read_repair() has some extra check on whether the failed bio needs extra validation for repair. But we can avoid all these extra mechanisms if we submit the repair for each sector. By this, each read repair can be easily handled without the need to verify which sector is corrupted. This will also benefit subpage, as one subpage bvec can contain several sectors, making the extra verification more complex. So this patch will: - Introduce repair_one_sector() The main code submitting repair, which is more or less the same as old btrfs_submit_read_repair(). But this time, it only repairs one sector. - Make btrfs_submit_read_repair() to handle sectors differently There are 3 different cases: * Good sector We need to release the page and extent, set the range uptodate. * Bad sector and failed to submit repair bio We need to release the page and extent, but not set the range uptodate. * Bad sector but repair bio submitted The page and extent release will be handled by the submitted repair bio. Nothing needs to be done. Since btrfs_submit_read_repair() will handle the page and extent release now, we need to skip to next bvec even we hit some error. - Change the lifespan of @uptodate in end_bio_extent_readpage() Since now btrfs_submit_read_repair() will handle the full bvec which contains any corruption, we don't need to bother updating @uptodate bit anymore. Just let @uptodate to be local variable inside the main loop, so that any error from one bvec won't affect later bvec. - Only export btrfs_repair_one_sector(), unexport btrfs_submit_read_repair() The only outside caller for read repair is DIO, which already submits its repair for just one sector. Only export btrfs_repair_one_sector() for DIO. This patch will focus on the change on the repair path, the extra validation code is still kept as is, and will be cleaned up later. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 08508fea07cdf6f62e61bae85d3af55433a16f98 Author: Qu Wenruo Date: Mon May 3 10:08:54 2021 +0800 btrfs: make btrfs_verify_data_csum() to return a bitmap This will provide the basis for later per-sector repair for subpage, while still keeping the existing code happy. As if all csums match, the return value will be 0, same as now. Only when csum mismatches, the return value is different. The new return value will be a bitmap, for 4K sectorsize and 4K page size, it will be either 1, instead of the -EIO (which is not used directly by the callers, no effective change). But for 4K sectorsize and 64K page size, aka subpage case, since the bvec can contain multiple sectors, knowing which sectors are corrupted will allow us to submit repair only for corrupted sectors. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f4dcfb30452631f7f308c144e1fd4d8a6ad7111b Author: Johannes Thumshirn Date: Tue May 11 00:17:26 2021 +0900 btrfs: rename check_async_write and let it return bool The 'check_async_write' function is a helper used in 'btrfs_submit_metadata_bio' and it checks if asynchronous writing can be used for metadata. Make the function return bool and get rid of the local variable async in btrfs_submit_metadata_bio storing the result of check_async_write's tests. As this is touching all function call sites, also rename it to should_async_write as this is more in line with the naming we use. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 06e1e7f4223c98965fb721b4b1e12083cfbe777e Author: Johannes Thumshirn Date: Fri Apr 30 15:34:18 2021 +0200 btrfs: zoned: bail out if we can't read a reliable write pointer If we can't read a reliable write pointer from a sequential zone fail creating the block group with an I/O error. Also if the read write pointer is beyond the end of the respective zone, fail the creation of the block group on this zone with an I/O error. While this could also happen in real world scenarios with misbehaving drives, this issue addresses a problem uncovered by fstests' test case generic/475. CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 47cdfb5e1dd60422ec2cbc53b667f73ff9a411dc Author: Naohiro Aota Date: Fri Apr 30 15:34:17 2021 +0200 btrfs: zoned: print message when zone sanity check type fails This extends patch 784daf2b9628 ("btrfs: zoned: sanity check zone type"), the message was supposed to be there but was lost during merge. We want to make the error noticeable so add it. Fixes: 784daf2b9628 ("btrfs: zoned: sanity check zone type") CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 385f421f18be653d21ccfd6520fbddf206ad43eb Author: Josef Bacik Date: Wed Apr 28 13:38:48 2021 -0400 btrfs: handle preemptive delalloc flushing slightly differently If we decide to flush delalloc from the preemptive flusher, we really do not want to wait on ordered extents, as it gains us nothing. However there was logic to go ahead and wait on ordered extents if there was more ordered bytes than delalloc bytes. We do not want this behavior, so pass through whether this flushing is for preemption, and do not wait for ordered extents if that's the case. Also break out of the shrink loop after the first flushing, as we just want to one shot shrink delalloc. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 3e101569973e8c95ba60b5501f8a3caf7754894c Author: Josef Bacik Date: Wed Apr 28 13:38:47 2021 -0400 btrfs: only ignore delalloc if delalloc is much smaller than ordered While testing heavy delalloc workloads I noticed that sometimes we'd just stop preemptively flushing when we had loads of delalloc available to flush. This is because we skip preemptive flushing if delalloc <= ordered. However if we start with say 4gib of delalloc, and we flush 2gib of that, we'll stop flushing there, when we still have 2gib of delalloc to flush. Instead adjust the ordered bytes down by half, this way if 2/3 of our outstanding delalloc reservations are tied up by ordered extents we don't bother preemptive flushing, as we're getting close to the state where we need to wait on ordered extents. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 30acce4eb032251be4767ee393a7e6e9748259d6 Author: Josef Bacik Date: Wed Apr 28 13:38:46 2021 -0400 btrfs: don't include the global rsv size in the preemptive used amount When deciding if we should preemptively flush space, we will add in the amount of space used by all block rsvs. However this also includes the global block rsv, which isn't flushable so shouldn't be accounted for in this calculation. If we decide to use ->bytes_may_use in our used calculation we need to subtract the global rsv size from this amount so it most closely matches the flushable space. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 1239e2da16bf85e13063de7d2e9638219efca984 Author: Josef Bacik Date: Wed Apr 28 13:38:45 2021 -0400 btrfs: use the global rsv size in the preemptive thresh calculation We calculate the amount of "free" space available for normal reservations by taking the total space and subtracting out the hard used space, which is readonly, used, and reserved space. However we weren't taking into account the global block rsv, which is essentially hard used space. Handle this by subtracting it from the available free space, so that our threshold more closely mirrors reality. We need to do the check because it's possible that the global_rsv_size + used is > total_bytes, sometimes the global reserve can end up being calculated as larger than the available size (think small filesystems where we only have the original 8MiB chunk of metadata). It doesn't usually happen, but that can get us into trouble so this is safer. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 610a6ef44ea83ef1c1e10b8270bbd157fbde3181 Author: Josef Bacik Date: Wed Apr 28 13:38:44 2021 -0400 btrfs: take into account global rsv in need_preemptive_reclaim Global rsv can't be used for normal allocations, and for very full file systems we can decide to try and async flush constantly even though there's really not a lot of space to reclaim. Deal with this by including the global block rsv size in the "total used" calculation. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 0aae4ca9e952b83f71ce50af1290f0f5d9ab9df6 Author: Josef Bacik Date: Wed Apr 28 13:38:43 2021 -0400 btrfs: only clamp the first time we have to start flushing We were clamping the threshold for preemptive reclaim any time we added a ticket to wait on, which if we have a lot of threads means we'd essentially max out the clamp the first time we start to flush. Instead of doing this, simply do it every time we have to start flushing, this will make us ramp up gradually instead of going to max clamping as soon as we start needing to do flushing. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit ed738ba7f96170384f3e94a38be5536560eabc00 Author: Josef Bacik Date: Wed Apr 28 13:38:42 2021 -0400 btrfs: check worker before need_preemptive_reclaim need_preemptive_reclaim() does some calculations, which aren't heavy, but if we're already running preemptive reclaim there's no reason to do them at all, so re-order the checks so that we don't do the calculation if we're already doing reclaim. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 94358c35d80a8de5054c295d48332611d48222b4 Author: Su Yue Date: Sun Apr 25 16:35:04 2021 +0800 btrfs: remove stale comment for argument seed of btrfs_find_device Commit b2598edf8b36 ("btrfs: remove unused argument seed from btrfs_find_device") removed the argument seed from btrfs_find_device but forgot the comment, so remove it. Reviewed-by: Anand Jain Signed-off-by: Su Yue Reviewed-by: David Sterba Signed-off-by: David Sterba commit dc56219fe22e9d2f395f5c58ba3277f8df4cff84 Author: Goldwyn Rodrigues Date: Thu Apr 8 07:40:25 2021 -0500 btrfs: correct try_lock_extent() usage in read_extent_buffer_subpage() try_lock_extent() returns 1 on success or 0 for failure and not an error code. If try_lock_extent() fails, read_extent_buffer_subpage() returns zero indicating subpage extent read success. Return EAGAIN/EWOULDBLOCK if try_lock_extent() fails in locking the extent. Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit f0c6fbbb90504fb7e9dbf0865463d3c2b4de49e5 Author: Bharata B Rao Date: Mon Jun 21 14:20:00 2021 +0530 KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE H_RPT_INVALIDATE does two types of TLB invalidations: 1. Process-scoped invalidations for guests when LPCR[GTSE]=0. This is currently not used in KVM as GTSE is not usually disabled in KVM. 2. Partition-scoped invalidations that an L1 hypervisor does on behalf of an L2 guest. This is currently handled by H_TLB_INVALIDATE hcall and this new replaces the old that. This commit enables process-scoped invalidations for L1 guests. Support for process-scoped and partition-scoped invalidations from/for nested guests will be added separately. Process scoped tlbie invalidations from L1 and nested guests need RS register for TLBIE instruction to contain both PID and LPID. This patch introduces primitives that execute tlbie instruction with both PID and LPID set in prepartion for H_RPT_INVALIDATE hcall. A description of H_RPT_INVALIDATE follows: int64   /* H_Success: Return code on successful completion */         /* H_Busy - repeat the call with the same */         /* H_Parameter, H_P2, H_P3, H_P4, H_P5 : Invalid parameters */ hcall(const uint64 H_RPT_INVALIDATE, /* Invalidate RPT translation lookaside information */       uint64 id,        /* PID/LPID to invalidate */       uint64 target,    /* Invalidation target */       uint64 type,      /* Type of lookaside information */       uint64 pg_sizes, /* Page sizes */       uint64 start,     /* Start of Effective Address (EA) range (inclusive) */       uint64 end)       /* End of EA range (exclusive) */ Invalidation targets (target) ----------------------------- Core MMU        0x01 /* All virtual processors in the partition */ Core local MMU  0x02 /* Current virtual processor */ Nest MMU        0x04 /* All nest/accelerator agents in use by the partition */ A combination of the above can be specified, except core and core local. Type of translation to invalidate (type) --------------------------------------- NESTED       0x0001  /* invalidate nested guest partition-scope */ TLB          0x0002  /* Invalidate TLB */ PWC          0x0004  /* Invalidate Page Walk Cache */ PRT          0x0008  /* Invalidate caching of Process Table Entries if NESTED is clear */ PAT          0x0008  /* Invalidate caching of Partition Table Entries if NESTED is set */ A combination of the above can be specified. Page size mask (pages) ---------------------- 4K              0x01 64K             0x02 2M              0x04 1G              0x08 All sizes       (-1UL) A combination of the above can be specified. All page sizes can be selected with -1. Semantics: Invalidate radix tree lookaside information            matching the parameters given. * Return H_P2, H_P3 or H_P4 if target, type, or pageSizes parameters are different from the defined values. * Return H_PARAMETER if NESTED is set and pid is not a valid nested LPID allocated to this partition * Return H_P5 if (start, end) doesn't form a valid range. Start and end should be a valid Quadrant address and  end > start. * Return H_NotSupported if the partition is not in running in radix translation mode. * May invalidate more translation information than requested. * If start = 0 and end = -1, set the range to cover all valid addresses. Else start and end should be aligned to 4kB (lower 11 bits clear). * If NESTED is clear, then invalidate process scoped lookaside information. Else pid specifies a nested LPID, and the invalidation is performed   on nested guest partition table and nested guest partition scope real addresses. * If pid = 0 and NESTED is clear, then valid addresses are quadrant 3 and quadrant 0 spaces, Else valid addresses are quadrant 0. * Pages which are fully covered by the range are to be invalidated.   Those which are partially covered are considered outside invalidation range, which allows a caller to optimally invalidate ranges that may   contain mixed page sizes. * Return H_SUCCESS on success. Signed-off-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621085003.904767-4-bharata@linux.ibm.com commit d6265cb33b710789cbc390316eba50a883d6dcc8 Author: Bharata B Rao Date: Mon Jun 21 14:19:59 2021 +0530 powerpc/book3s64/radix: Add H_RPT_INVALIDATE pgsize encodings to mmu_psize_def Add a field to mmu_psize_def to store the page size encodings of H_RPT_INVALIDATE hcall. Initialize this while scanning the radix AP encodings. This will be used when invalidating with required page size encoding in the hcall. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621085003.904767-3-bharata@linux.ibm.com commit f09216a190a4c2f62e1725f9d92e7c122b4ee423 Author: Aneesh Kumar K.V Date: Mon Jun 21 14:19:58 2021 +0530 KVM: PPC: Book3S HV: Fix comments of H_RPT_INVALIDATE arguments The type values H_RPTI_TYPE_PRT and H_RPTI_TYPE_PAT indicate invalidating the caching of process and partition scoped entries respectively. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210621085003.904767-2-bharata@linux.ibm.com commit 907a399de7b0566236c480d0c01ff52220532fb1 Author: Roberto Sassu Date: Mon Jun 21 14:29:12 2021 +0200 evm: Check xattr size discrepancy between kernel and user The kernel and the user obtain an xattr value in two different ways: kernel (EVM): uses vfs_getxattr_alloc() which obtains the xattr value from the filesystem handler (raw value); user (ima-evm-utils): uses vfs_getxattr() which obtains the xattr value from the LSMs (normalized value). Normally, this does not have an impact unless security.selinux is set with setfattr, with a value not terminated by '\0' (this is not the recommended way, security.selinux should be set with the appropriate tools such as chcon and restorecon). In this case, the kernel and the user see two different xattr values: the former sees the xattr value without '\0' (raw value), the latter sees the value with '\0' (value normalized by SELinux). This could result in two different verification outcomes from EVM and ima-evm-utils, if a signature was calculated with a security.selinux value terminated by '\0' and the value set in the filesystem is not terminated by '\0'. The former would report verification failure due to the missing '\0', while the latter would report verification success (because it gets the normalized value with '\0'). This patch mitigates this issue by comparing in evm_calc_hmac_or_hash() the size of the xattr returned by the two xattr functions and by warning the user if there is a discrepancy. Signed-off-by: Roberto Sassu Suggested-by: Mimi Zohar Signed-off-by: Mimi Zohar commit d55444adedaee5a3024c61637032057fcf38491b Author: Matti Vaittinen Date: Thu Jun 3 08:43:26 2021 +0300 MAINTAINERS: Add reviewer for regulator irq_helpers Add a reviewer entry for the regulator irq_helpers. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/2a4286ed98fd69b2539919e6a3e84d2e9804b4da.1622628334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit e71e7d3df7eb712fc29b609bd712a63d60b81b5f Author: Matti Vaittinen Date: Thu Jun 3 08:43:04 2021 +0300 regulator: bd9576: Fix the driver name in id table Driver name was changed in MFD cell: https://lore.kernel.org/lkml/560b9748094392493ebf7af11b6cc558776c4fd5.1613031055.git.matti.vaittinen@fi.rohmeurope.com/ Fix the ID table to match this. Fixes: b1b3ced38979 ("mfd: Support ROHM BD9576MUF and BD9573MUF") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/e0483149333626b3bea298f305cf2809429d1822.1622628334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit e7bf1fa58c46db9f72220c4472272d6da0a54c91 Author: Matti Vaittinen Date: Thu Jun 3 08:42:46 2021 +0300 regulator: bd9576: Support error reporting BD9573 and BD9576 support set of "protection" interrupts for "fatal" issues. Those lead to SOC reset as PMIC shuts the power outputs. Thus there is no relevant IRQ handling for them. Few "detection" interrupts were added to the BD9576 with the idea that SOC could take some recovery-action before error gets unrecoverable. Add support for over and under voltage detection for Vout1 ... Vout4 and VoutL1. Add over-current detection for VoutS1 and finally a thermal warning (common for all regulators) which alerts 30 C before temperature reaches the thermal shutdown point. This way consumer drivers can build error-recovery mechanisms. Unfortunately the BD9576 interrupt logic was not re-evaluated. IRQs are not designed to be properly acknowleged - and IRQ line is kept active for whole duration of error condition (in comparison to informing only about state change). Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/05c4f7a8e30ef1d4d5f3ceab07da4ebe68f5b4ed.1622628334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 627793e4ca4f511837de893545baf0e1b8174dc2 Author: Matti Vaittinen Date: Thu Jun 3 08:42:30 2021 +0300 regulator: bd9576 add FET ON-resistance for OCW BD9576MUF provides over-current protection and detection. Current is measured as voltage loss over external FET. Allow specifying FET's on resistance so current monitoring limits can be converted to voltages. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/e5feb160d7e09f33fff5b88f1928c66a15c6680f.1622628334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 89a6a5e56c8248a077d12424a1383a6b18ea840b Author: Matti Vaittinen Date: Thu Jun 3 08:42:12 2021 +0300 regulator: add property parsing and callbacks to set protection limits Add DT property parsing code and setting callback for regulator over/under voltage, over-current and temperature error limits. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/e7b8007ba9eae7076178bf3363fb942ccb1cc9a5.1622628334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 7111c6d1b31b42c8c758f6681e895a5116e3bad6 Author: Matti Vaittinen Date: Thu Jun 3 08:41:55 2021 +0300 regulator: IRQ based event/error notification helpers Provide helper function for IC's implementing regulator notifications when an IRQ fires. The helper also works for IRQs which can not be acked. Helper can be set to disable the IRQ at handler and then re-enabling it on delayed work later. The helper also adds regulator_get_error_flags() errors in cache for the duration of IRQ disabling. Signed-off-by: Matti Vaittinen Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/ebdf86d8c22b924667ec2385330e30fcbfac0119.1622628334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 157d2230193ae683fcffcc1cd0a2c3aa4479955f Author: Matti Vaittinen Date: Thu Jun 3 08:41:37 2021 +0300 regulator: move rdev_print helpers to internal.h The rdev print helpers are a nice way to print messages related to a specific regulator device. Move them from core.c to internal.h As the rdev print helpers use rdev_get_name() export it from core.c. Also move the declaration from coupler.h to driver.h because the rdev name is not just a coupled regulator property. I guess the main audience for rdev_get_name() will be the regulator core and drivers. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/dc7fd70dc31de4d0e820b7646bb78eeb04f80735.1622628333.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit e6c3092d43faf0aa095160cc552f8c05490d0962 Author: Matti Vaittinen Date: Thu Jun 3 08:41:21 2021 +0300 regulator: add warning flags Add 'warning' level events and error flags to regulator core. Current regulator core notifications are used to inform consumers about errors where HW is misbehaving in such way it is assumed to be broken/unrecoverable. There are PMICs which are designed for system(s) that may have use for regulator indications sent before HW is damaged so that some board/consumer specific recovery-event can be performed while continuing most of the normal operations. Add new WARNING level events and notifications to be used for that purpose. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/9b54aa5589ae4b5945d53d114bac3fae55fa4818.1622628333.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit db0aeb4f074f7023da26fb65078197c39590346b Author: Matti Vaittinen Date: Thu Jun 3 08:41:03 2021 +0300 thermal: Use generic HW-protection shutdown API The hardware shutdown function was exported from kernel/reboot for other subsystems to use. Logic is copied from the thermal_core. The protection mutex is replaced by an atomic_t to allow calls also from an IRQ context. Also the WARN() was replaced by pr_emerg() based on discussions here: https://lore.kernel.org/lkml/YJuPwAZroVZ%2Fw633@alley/ and here: https://lore.kernel.org/linux-iommu/20210331093104.383705-4-geert+renesas@glider.be/ Use the exported API instead of implementing own just for the thermal_core. Signed-off-by: Matti Vaittinen Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/5531e89d9e710f5d10e7cdce3ee58957335b9e03.1622628333.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit dfa19b11385d4cf8f0242fd93e2073e25183c331 Author: Matti Vaittinen Date: Thu Jun 3 08:40:45 2021 +0300 reboot: Add hardware protection power-off There can be few cases when we need to shut-down the system in order to protect the hardware. Currently this is done at least by the thermal core when temperature raises over certain limit. Some PMICs can also generate interrupts for example for over-current or over-voltage, voltage drops, short-circuit, ... etc. On some systems these are a sign of hardware failure and only thing to do is try to protect the rest of the hardware by shutting down the system. Add shut-down logic which can be used by all subsystems instead of implementing the shutdown in each subsystem. The logic is stolen from thermal_core with difference of using atomic_t instead of a mutex in order to allow calls directly from IRQ context and changing the WARN() to pr_emerg() as discussed here: https://lore.kernel.org/lkml/YJuPwAZroVZ%2Fw633@alley/ and here: https://lore.kernel.org/linux-iommu/20210331093104.383705-4-geert+renesas@glider.be/ Signed-off-by: Matti Vaittinen Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/e83ec1ca9408f90c857ea9dcdc57b14d9037b03f.1622628333.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 673e851b7da81256e73fb738c550ec39bac1c9ff Author: Matti Vaittinen Date: Thu Jun 3 08:40:28 2021 +0300 regulator: Add protection limit properties Support specifying protection/error/warning limits for regulator over current, over temperature and over/under voltage. Most of the PMICs support only "protection" feature but few setups do also support error/warning level indications. On many ICs most of the protection limits can't actually be set. But for example the ampere limit for over-current protection on ROHM BD9576 can be configured - or feature can be completely disabled. Provide limit setting for all protections/errors for the sake of the completeness and do that using own properties for all so that not all users would need to set all levels when only one or few are supported. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/ae2c6056d5ed1334912d27e736d23c9151065433.1622628333.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 57c045bc727001c43b6a65adb0418aa7b3e6dbd0 Author: Axel Lin Date: Sat Jun 19 20:34:23 2021 +0800 regulator: hi6421v600: Fix setting idle mode commit db27f8294cd7 changed eco_mode << (ffs(sreg->eco_mode_mask) - 1) to sreg->eco_mode_mask << (ffs(sreg->eco_mode_mask) - 1) which is wrong. Fix it by simply set val = sreg->eco_mode_mask. In additional, sreg->eco_mode_mask can be 0 (LDO3, LDO33, LDO34). Return -EINVAL if idle mode is not supported when sreg->eco_mode_mask is 0. While at it, also use unsigned int for reg_val/val which is the expected type for regmap_read and regmap_update_bits. Fixes: db27f8294cd7 ("staging: regulator: hi6421v600-regulator: use shorter names for OF properties") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210619123423.4091429-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 01c5741b82969d096ac0870d997b7d2f5a5fe970 Author: Sergey Larin Date: Fri Jun 18 17:16:07 2021 +0300 regulator: Add MAX8893 bindings Add Maxim MAX8893 PMIC device tree bindings. The example is also provided. Signed-off-by: Sergey Larin Link: https://lore.kernel.org/r/20210618141607.884-2-cerg2010cerg2010@mail.ru Signed-off-by: Mark Brown commit d83f778c627ad4e80bd82dbc88ffa1b1b18876bb Author: Sergey Larin Date: Fri Jun 18 17:16:06 2021 +0300 regulator: max8893: add regulator driver MAX8893 is a simple regulator which can be found on some of Sasmsung phones. Signed-off-by: Sergey Larin Link: https://lore.kernel.org/r/20210618141607.884-1-cerg2010cerg2010@mail.ru Signed-off-by: Mark Brown commit ae60e6a9d24e89a74e2512204ad04de94921bdd2 Author: Axel Lin Date: Sat Jun 19 20:41:33 2021 +0800 regulator: hi6421: Use correct variable type for regmap api val argument Use unsigned int instead of u32 for regmap_read/regmap_update_bits val argument. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210619124133.4096683-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 66376e152303bb60d6a75328b7bc998de86f8c08 Author: Bhupesh Sharma Date: Thu Jun 17 10:47:09 2021 +0530 regulator: qcom,rpmh-regulator: Add compatible for SA8155p-adp board pmic Add compatible string for pmm8155au pmic found on the SA8155p-adp board. Cc: Mark Brown Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210617051712.345372-3-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown commit 85adaac269c36d8e2e0a5de87a1dc4ec06e984f1 Author: Bhupesh Sharma Date: Thu Jun 17 10:47:08 2021 +0530 regulator: qcom,rpmh-regulator: Arrange compatibles alphabetically Arrange the compatibles inside qcom-rpmh regulator device tree bindings alphabetically. Cc: Mark Brown Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210617051712.345372-2-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown commit 9a336ed97d00bb69547272fc7d0439802bece375 Author: Bhupesh Sharma Date: Thu Jun 17 10:47:12 2021 +0530 regulator: qcom-rpmh: Add new regulator found on SA8155p adp board SA8155p-adp board supports a new regulator - pmm8155au. The output power management circuits in this regulator include: - FTS510 smps, - HFS510 smps, and - LDO510 linear regulators Add support for the same. Cc: Mark Brown Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210617051712.345372-6-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown commit f26cdadad729743888eb4ac2c17eac3cf845b493 Author: Bhupesh Sharma Date: Thu Jun 17 10:47:11 2021 +0530 regulator: qcom-rpmh: Add terminator at the end of pm7325x_vreg_data[] array Add missing terminator(s) at the end of pm7325x_vreg_data[] array instances. Fixes: c4e5aa3dbee5 ("regulator: qcom-rpmh: Add PM7325/PMR735A regulator support") Cc: Mark Brown Reviewed-by: Bjorn Andersson Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210617051712.345372-5-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown commit ba5dabf40e9143ff6c48943b76a532d5ab34d0e8 Author: Bhupesh Sharma Date: Thu Jun 17 10:47:10 2021 +0530 regulator: qcom-rpmh: Cleanup terminator line commas Cleanup the qcom-rpmh regulator driver to remove comma(s) at the end of the terminator line(s). Cc: Mark Brown Reviewed-by: Bjorn Andersson Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210617051712.345372-4-bhupesh.sharma@linaro.org Signed-off-by: Mark Brown commit ea837090b388245744988083313f6e9c7c9b9699 Author: Shengjiu Wang Date: Fri Jun 18 20:38:33 2021 +0800 ASoC: fsl_xcvr: disable all interrupts when suspend happens There is an unhandled interrupt after suspend, which cause endless interrupt when system resume, so system may hang. Disable all interrupts in runtime suspend callback to avoid above issue. Fixes: 28564486866f ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver") Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1624019913-3380-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 3aed3ddf9639a4f915984177ff8a2253f3f8acfe Author: Dan Carpenter Date: Fri Jun 18 16:44:24 2021 +0300 ASoC: tegra: Fix a NULL vs IS_ERR() check The tegra_machine_parse_phandle() function doesn't return NULL, it returns error pointers. Fixes: cc8f70f56039 ("ASoC: tegra: Unify ASoC machine drivers") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/YMyjOKFsPe9SietU@mwanda Signed-off-by: Mark Brown commit 77b7bae7802848feabe37a92533bee64387906e7 Author: Yang Yingliang Date: Tue Jun 15 22:07:11 2021 +0800 ASoC: qcom: lpass-cpu: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615140711.1676704-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit e6bb518199181c9c35827a48142fbb548125d0b0 Author: Yang Yingliang Date: Tue Jun 15 22:07:10 2021 +0800 ASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615140711.1676704-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 683b0df26c3333a5c020a2764b71a70d082c1c61 Author: Shuming Fan Date: Thu Jun 17 17:08:22 2021 +0800 ASoC: rt711: add two jack detection modes Some boards use different circuits for jack detection. This patch adds two modes as below 1. JD2/2 ports/external resister 100k 2. JD2/1 port/JD voltage 1.8V Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210617090822.16960-1-shumingf@realtek.com Signed-off-by: Mark Brown commit b73cbd7b1c2d477d143c544bdc2b3415bae58a14 Author: Yang Yingliang Date: Wed Jun 16 17:16:52 2021 +0800 ASoC: samsung: s3c24xx-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210616091652.2552927-5-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 87a32d00249e6e3c6b1ac020d36136b2cd75fcc8 Author: Yang Yingliang Date: Wed Jun 16 17:16:51 2021 +0800 ASoC: samsung: s3c2412-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210616091652.2552927-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit c3255553d6b6cd5c8de42d2faa80e1d33401cb3b Author: Yang Yingliang Date: Wed Jun 16 17:16:50 2021 +0800 ASoC: samsung: pcm: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210616091652.2552927-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 5eb8262c686509ffb60a5b04ca6ee562f02cbaf5 Author: Yang Yingliang Date: Wed Jun 16 17:16:49 2021 +0800 ASoC: samsung: i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210616091652.2552927-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 8439c5861cf0c88037f6e9cdd3ba5f1c472f847a Author: Kuninori Morimoto Date: Mon Jun 14 09:58:35 2021 +0900 ASoC: soc-core: remove snd_soc_of_parse_daifmt() No driver is using snd_soc_of_parse_daifmt(). This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zgvtuuro.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2c7fd9de8956ea1d8ea18b11d33fcf2fde9da81e Author: Kuninori Morimoto Date: Mon Jun 14 09:58:22 2021 +0900 ASoC: simple-card-utils: switch to use snd_soc_daifmt_parse_format/clock_provider() This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from snd_soc_of_parse_daifmt(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871r95w9ch.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0c4c7a9667daf52c88cfc7fe44201ff653eab8f9 Author: Kuninori Morimoto Date: Mon Jun 14 09:58:05 2021 +0900 ASoC: meson: switch to use snd_soc_daifmt_parse_format/clock_provider() This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from snd_soc_of_parse_daifmt(). Signed-off-by: Kuninori Morimoto Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/8735tlw9cy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3bba9414512fc16c96c4cd25ee6447c8da4b4a76 Author: Kuninori Morimoto Date: Mon Jun 14 09:57:51 2021 +0900 ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider() This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from snd_soc_of_parse_daifmt(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874ke1w9dc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 22108b9c2248f187d2b50af14e48807a0fb3db79 Author: Kuninori Morimoto Date: Mon Jun 14 09:57:19 2021 +0900 ASoC: atmel: switch to use snd_soc_daifmt_parse_format/clock_provider() This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from snd_soc_of_parse_daifmt(). Signed-off-by: Kuninori Morimoto Reviewed-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/875yyhw9e8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7766861d1f8d3afc35361ab599eee6851fcd4416 Author: Kuninori Morimoto Date: Mon Jun 14 09:57:08 2021 +0900 ASoC: soc-core: add snd_soc_daifmt_parse_format/clock_provider() snd_soc_of_parse_daifmt() parses daifmt, but bitclock/frame provider parsing part is one of headacke, because we are assuming below both cases. A) node { bitclock-master; frame-master; ... }; B) link { bitclock-master = <&xxx>; frame-master = <&xxx>; ... }; The original was style A), and style B) was added later by commit b3ca11ff59bc ("ASoC: simple-card: Move dai-link level properties away from dai subnodes"). snd_soc_of_parse_daifmt() parses it as style A), and user need to update it to style B) if needed. To handle it more flexibile, this patch adds new functions which separates snd_soc_of_parse_daifmt() helper function. snd_soc_daifmt_parse_format() :for DAI format snd_soc_daifmt_parse_clock_provider_as_flag() :for style A) snd_soc_daifmt_parse_clock_provider_as_phandl() :for style B) snd_soc_daifmt_parse_clock_provider_as_bitmap() :use with _from_bitmap This means snd_soc_of_parse_daifmt() == snd_soc_daifmt_parse_format() | snd_soc_daifmt_parse_clock_provider_as_flag() This patch also indicate relatesionship comment for snd_soc_daifmt_clock_provider_from_bitmap(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877dixw9ej.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b44a67f89366597364693e07e814660d5df8c66f Author: Kuninori Morimoto Date: Mon Jun 14 09:56:54 2021 +0900 ASoC: soc-core: add snd_soc_daifmt_clock_provider_fliped() Sometimes we want to get CLOCK_PROVIDER fliped dai_fmt. This patch adds new snd_soc_daifmt_clock_provider_fliped() for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878s3dw9ex.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 91ae447762517c814672e2e5ff2383348101a032 Author: Kuninori Morimoto Date: Mon Jun 14 09:56:46 2021 +0900 ASoC: soc-core: add snd_soc_daifmt_clock_provider_from_bitmap() This patch adds snd_soc_daifmt_clock_provider_from_bitmap() function to judge clock/frame master from its bitmap. This is prepare for snd_soc_of_parse_daifmt() cleanup. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6ntw9f5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bb17379cf278c15574b0c1c94a76531f637970c7 Author: Yang Yingliang Date: Thu Jun 17 12:50:12 2021 +0800 ASoC: sunxi: sun4i-spdif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617045012.1119650-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit cc384f05c05618dfcf1990054c1f40bedbb01cca Author: Yang Yingliang Date: Thu Jun 17 12:50:11 2021 +0800 ASoC: sun4i-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617045012.1119650-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 37c617f1cf062b56141a06e2ae355e3ecc8b8451 Author: Yang Yingliang Date: Thu Jun 17 12:50:10 2021 +0800 ASoC: sunxi: sun4i-codec: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617045012.1119650-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit a2f6ed4a44721d3a9fdf4da7e0743cb13866bf61 Author: Yang Yingliang Date: Tue Jun 15 09:39:22 2021 +0800 ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname() It will cause null-ptr-deref if platform_get_resource_byname() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-10-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 67798860e6d0114149562e6897cf07ba4bebc1d6 Author: Yang Yingliang Date: Tue Jun 15 09:39:21 2021 +0800 ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-9-yangyingliang@huawei.com Signed-off-by: Mark Brown commit cbb7ea0aebf0c07061be615cab97ac9cab8a48a0 Author: Yang Yingliang Date: Tue Jun 15 09:39:20 2021 +0800 ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-8-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 664107f63888bdd8a5e1d38c8246b9508a1dc46a Author: Yang Yingliang Date: Tue Jun 15 09:39:19 2021 +0800 ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-7-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d9bf1e791ae61d606b0da0003ad19dbe7f252fe8 Author: Yang Yingliang Date: Tue Jun 15 09:39:18 2021 +0800 ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-6-yangyingliang@huawei.com Signed-off-by: Mark Brown commit f25bb69e6f04a3d45effbe1c571f5f3ac10253bb Author: Yang Yingliang Date: Tue Jun 15 09:39:17 2021 +0800 ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-5-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 2cd16cf0d6bbb47adddc633c60ca405f672e64f4 Author: Yang Yingliang Date: Tue Jun 15 09:39:16 2021 +0800 ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 41e90cbbc50085487b4633f08c86dd71b0f18d7f Author: Yang Yingliang Date: Tue Jun 15 09:39:15 2021 +0800 ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit c66d7621737fb07e660b3d6eef40636ef4e9103a Author: Yang Yingliang Date: Tue Jun 15 09:39:14 2021 +0800 ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615013922.784296-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 61eb1b24f9e4f4e0725aa5f8164a932c933f3339 Author: Axel Lin Date: Sun Jun 20 21:27:15 2021 +0800 regulator: hi655x: Fix pass wrong pointer to config.driver_data Current code sets config.driver_data to a zero initialized regulator which is obviously wrong. Fix it. Fixes: 4618119b9be5 ("regulator: hi655x: enable regulator for hi655x PMIC") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210620132715.60215-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 3b7961a326f8a7e03f54a19f02fedae8d488b80f Author: Codrin Ciubotariu Date: Fri Jun 18 18:07:41 2021 +0300 ASoC: atmel-i2s: Fix usage of capture and playback at the same time For both capture and playback streams to work at the same time, only the needed values from a register need to be updated. Also, clocks should be enabled only when the first stream is started and stopped when there is no running stream. Fixes: b543e467d1a9 ("ASoC: atmel-i2s: add driver for the new Atmel I2S controller") Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210618150741.401739-2-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 489a830a25e1730aebf7ff53430c170db9a1771b Author: Codrin Ciubotariu Date: Fri Jun 18 18:07:40 2021 +0300 ASoC: atmel-i2s: Set symmetric sample bits The I2S needs to have the same sample bits for both capture and playback streams. Fixes: b543e467d1a9 ("ASoC: atmel-i2s: add driver for the new Atmel I2S controller") Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210618150741.401739-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 50b1ce617d66d04f1f9006e51793e6cffcdec6ea Author: Timur Tabi Date: Sun Jun 20 11:01:35 2021 -0500 MAINTAINERS: remove Timur Tabi from Freescale SOC sound drivers I haven't touched these drivers in seven years, and none of the patches sent to me these days affect code that I wrote. The other maintainers are doing a very good job without me. Signed-off-by: Timur Tabi Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210620160135.28651-1-timur@kernel.org Signed-off-by: Mark Brown commit d2bf75f4f6b277c35eb887859139df7c2d390b87 Author: Pierre-Louis Bossart Date: Mon Jun 14 13:08:15 2021 -0500 ASoC: rt711-sdca-sdw: fix race condition on system suspend In the initial driver we cancelled deferred work, but there is still a window of time where a new interrupt could result in new deferred work executed after the link is disabled, leading to an IO error. While we did not see this IO error on RT711-sdca-based platforms, the code pattern is similar to the RT700 case where the IO error was noted, so the fix is added for consistency. This patch uses an 'disable_irq_lock' mutex to prevent new interrupts from happening after the start of the system suspend. The choice of a mutex v. a spinlock is mainly due to the time required to clear interrupts, which requires a command to be transmitted by the SoundWire host IP and acknowledged with an interrupt. The 'interrupt_callback' routine is also not meant to be called from an interrupt context. An additional 'disable_irq' flag prevents race conditions where the status changes before the interrupts are disabled, but the workqueue handling status changes is scheduled after the completion of the system suspend. On resume the interrupts are re-enabled already by the io_init routine so we only clear the flag. The code is slightly different from the other codecs since the interrupt callback deals with the SDCA interrupts, leading to a much larger section that's protected by the mutex. The SoundWire interrupt scheme requires a read after clearing a status, it's not clear from the specifications what would happen if SDCA interrupts are disabled in the middle of the sequence, so the entire interrupt status read/write is kept as is, even if in the end we discard the information. BugLink: https://github.com/thesofproject/linux/issues/2943 Fixes: 7ad4d237e7c4 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20210614180815.153711-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 14f4946d55d335692462f6fa4eb4ace0bf6ad1d9 Author: Pierre-Louis Bossart Date: Mon Jun 14 13:08:14 2021 -0500 ASoC: rt5682-sdw: fix race condition on system suspend In the initial driver we cancelled deferred work, but there is still a window of time where a new interrupt could result in new deferred work executed after the link is disabled, leading to an IO error. While we did not see this IO error on RT5682-based platforms, the code pattern is similar to the RT700 case where the IO error was noted, so the fix is added for consistency. This patch uses an 'disable_irq_lock' mutex to prevent new interrupts from happening after the start of the system suspend. The choice of a mutex v. a spinlock is mainly due to the time required to clear interrupts, which requires a command to be transmitted by the SoundWire host IP and acknowledged with an interrupt. The 'interrupt_callback' routine is also not meant to be called from an interrupt context. An additional 'disable_irq' flag prevents race conditions where the status changes before the interrupts are disabled, but the workqueue handling status changes is scheduled after the completion of the system suspend. On resume the interrupts are re-enabled already by the io_init routine so we only clear the flag. The Fixes tag points to a 5.10 commit, there's no need to propagate this change to earlier upstream versions. BugLink: https://github.com/thesofproject/linux/issues/2943 Fixes: 4a55000722d7 ('ASoC: codecs: rt*.c: remove useless pointer cast') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20210614180815.153711-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 18236370a098428d7639686daa36584d0d363c9e Author: Pierre-Louis Bossart Date: Mon Jun 14 13:08:13 2021 -0500 ASoC: rt711-sdw: fix race condition on system suspend In previous commits we cancelled deferred work, but there is still a window of time where a new interrupt could result in new deferred work executed after the link is disabled, leading to an IO error. While we did not see this IO error on RT711-based platforms, the code pattern is similar to the RT700 case where the IO error was noted, so the fix is added for consistency. This patch uses an 'disable_irq_lock' mutex to prevent new interrupts from happening after the start of the system suspend. The choice of a mutex v. a spinlock is mainly due to the time required to clear interrupts, which requires a command to be transmitted by the SoundWire host IP and acknowledged with an interrupt. The 'interrupt_callback' routine is also not meant to be called from an interrupt context. An additional 'disable_irq' flag prevents race conditions where the status changes before the interrupts are disabled, but the workqueue handling status changes is scheduled after the completion of the system suspend. On resume the interrupts are re-enabled already by the io_init routine so we only clear the flag. BugLink: https://github.com/thesofproject/linux/issues/2943 Fixes: 501ef013390b ('ASoC: rt711: wait for the delayed work to finish when the system suspends') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20210614180815.153711-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 60888ef827e354d7a3611288d86629e5f1824613 Author: Pierre-Louis Bossart Date: Mon Jun 14 13:08:12 2021 -0500 ASoC: rt700-sdw: fix race condition on system suspend In previous commits we cancelled deferred work, but there is still a window of time where a new interrupt could result in new deferred work executed after the link is disabled, leading to an IO error. This patch uses an 'disable_irq_lock' mutex to prevent new interrupts from happening after the start of the system suspend. The choice of a mutex v. a spinlock is mainly due to the time required to clear interrupts, which requires a command to be transmitted by the SoundWire host IP and acknowledged with an interrupt. The 'interrupt_callback' routine is also not meant to be called from an interrupt context. An additional 'disable_irq' flag prevents race conditions where the status changes before the interrupts are disabled, but the workqueue handling status changes is scheduled after the completion of the system suspend. On resume the interrupts are re-enabled already by the io_init routine so we only clear the flag. BugLink: https://github.com/thesofproject/linux/issues/2943 Fixes: 5f2df2a4583b ('ASoC: rt700: wait for the delayed work to finish when the system suspends') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20210614180815.153711-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d38ebaf2c88442a830d402fa7805ddbb60c4cd0c Author: Pierre-Louis Bossart Date: Mon Jun 14 13:08:11 2021 -0500 soundwire: export sdw_update() and sdw_update_no_pm() We currently export sdw_read() and sdw_write() but the sdw_update() and sdw_update_no_pm() are currently available only to the bus code. This was missed in an earlier contribution. Export both functions so that codec drivers can perform read-modify-write operations without duplicating the code. Fixes: b04c975e654c ('soundwire: bus: use sdw_update_no_pm when initializing a device') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20210614180815.153711-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4a21192e2796c3338c4b0083b494a84a61311aaf Author: Joel Stanley Date: Fri Jun 18 13:49:43 2021 +1000 powerpc/boot: Add a boot wrapper for Microwatt This allows microwatt's kernel to be built with an embedded device tree. Load to arch/powerpc/boot/dtbImage.microwatt to 0x500000: mw_debug -b fpga stop load arch/powerpc/boot/dtbImage.microwatt 500000 start Signed-off-by: Joel Stanley Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwX19wym3kQ7guu@thinks.paulus.ozlabs.org commit c93f80849bdd9b45d834053ae1336e28f0026c84 Author: Benjamin Herrenschmidt Date: Fri Jun 18 13:49:00 2021 +1000 powerpc/boot: Fixup device-tree on little endian This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwXrPT8nc4YUdJ9@thinks.paulus.ozlabs.org commit 4a1511eb342bd80c6ea0e8a7ce0bbe68aac96ac5 Author: Paul Mackerras Date: Fri Jun 18 13:48:12 2021 +1000 powerpc/microwatt: Add microwatt_defconfig Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwXfL8hOpReIiiP@thinks.paulus.ozlabs.org commit c25769fddaec13509b6cdc7ad17458f239c4cee7 Author: Paul Mackerras Date: Fri Jun 18 13:47:08 2021 +1000 powerpc/microwatt: Add support for hardware random number generator Microwatt's hardware RNG is accessed using the DARN instruction. Signed-off-by: Paul Mackerras Reviewed-by: Nicholas Piggin Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwXPHlV/ZleiQUY@thinks.paulus.ozlabs.org commit 48b545b8018db61ab4978d29c73c16b9fbfad12c Author: Benjamin Herrenschmidt Date: Fri Jun 18 13:46:32 2021 +1000 powerpc/microwatt: Use standard 16550 UART for console This adds support to the Microwatt platform to use the standard 16550-style UART which available in the standalone Microwatt FPGA. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwXGCTzedpQje7r@thinks.paulus.ozlabs.org commit aa9c5adf2f61da39c92280d9336e091852e292ff Author: Benjamin Herrenschmidt Date: Fri Jun 18 13:45:53 2021 +1000 powerpc/xics: Add a native ICS backend for microwatt This is a simple native ICS backend that matches the layout of the Microwatt implementation of ICS. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool [mpe: Add empty ics_native_init() to unbreak non-microwatt builds] Signed-off-by: Michael Ellerman fixup-ics Link: https://lore.kernel.org/r/YMwW8cxrwB2W5EUN@thinks.paulus.ozlabs.org commit 0d0f9e5f2fa7aacf22892078a1065fa5d0ce941b Author: Benjamin Herrenschmidt Date: Fri Jun 18 13:45:11 2021 +1000 powerpc/microwatt: Populate platform bus from device-tree Just like any other embedded platform. Add an empty soc node. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwWx98+PMibZq/G@thinks.paulus.ozlabs.org commit 151b88e8482167f6eb3117d82e4905efb5e72662 Author: Paul Mackerras Date: Fri Jun 18 13:44:16 2021 +1000 powerpc: Add Microwatt device tree Microwatt currently runs with MSR[HV] = 0, hence the usable-privilege properties don't have bit 2 (for HV support) set, and we need the /chosen/ibm,architecture-vec-5 property. Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwWkPcXlGDSQ9Q3@thinks.paulus.ozlabs.org commit 53d143fe08c24c2ce44ee329e41c2a6aad57ebb5 Author: Paul Mackerras Date: Fri Jun 18 13:43:41 2021 +1000 powerpc: Add Microwatt platform Microwatt is a FPGA-based implementation of the Power ISA. It currently only implements little-endian 64-bit mode, and does not (yet) support SMP, VMX, VSX or transactional memory. It has an optional FPU, and an optional MMU (required for running Linux, obviously) which implements a configurable radix tree but not hypervisor mode or nested radix translation. This adds a new machine type to support FPGA-based SoCs with a Microwatt core. CONFIG_MATH_EMULATION can be selected for Microwatt SOCs which don't have the FPU. Signed-off-by: Paul Mackerras Reviewed-by: Nicholas Piggin Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/YMwWbZVREsVug9R0@thinks.paulus.ozlabs.org commit c988cfd38e489d9390d253d4392590daf451d87a Author: Christophe Leroy Date: Wed Jun 9 11:34:31 2021 +1000 powerpc/32: use set_memory_attr() Use set_memory_attr() instead of the PPC32 specific change_page_attr() change_page_attr() was checking that the address was not mapped by blocks and was handling highmem, but that's unneeded because the affected pages can't be in highmem and block mapping verification is already done by the callers. Signed-off-by: Christophe Leroy [ruscur: rebase on powerpc/merge with Christophe's new patches] Signed-off-by: Russell Currey Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-10-jniethe5@gmail.com commit 4d1755b6a762149ae022a32fb2bbeefb6680baa6 Author: Christophe Leroy Date: Wed Jun 9 11:34:30 2021 +1000 powerpc/mm: implement set_memory_attr() In addition to the set_memory_xx() functions which allows to change the memory attributes of not (yet) used memory regions, implement a set_memory_attr() function to: - set the final memory protection after init on currently used kernel regions. - enable/disable kernel memory regions in the scope of DEBUG_PAGEALLOC. Unlike the set_memory_xx() which can act in three step as the regions are unused, this function must modify 'on the fly' as the kernel is executing from them. At the moment only PPC32 will use it and changing page attributes on the fly is not an issue. Reported-by: kbuild test robot [ruscur: cast "data" to unsigned long instead of int] Signed-off-by: Christophe Leroy Signed-off-by: Russell Currey Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-9-jniethe5@gmail.com commit c35717c71e983ed55d61e523cbd11a798429bc82 Author: Russell Currey Date: Wed Jun 9 11:34:29 2021 +1000 powerpc: Set ARCH_HAS_STRICT_MODULE_RWX To enable strict module RWX on powerpc, set: CONFIG_STRICT_MODULE_RWX=y You should also have CONFIG_STRICT_KERNEL_RWX=y set to have any real security benefit. ARCH_HAS_STRICT_MODULE_RWX is set to require ARCH_HAS_STRICT_KERNEL_RWX. This is due to a quirk in arch/Kconfig and arch/powerpc/Kconfig that makes STRICT_MODULE_RWX *on by default* in configurations where STRICT_KERNEL_RWX is *unavailable*. Since this doesn't make much sense, and module RWX without kernel RWX doesn't make much sense, having the same dependencies as kernel RWX works around this problem. Book3s/32 603 and 604 core processors are not able to write protect kernel pages so do not set ARCH_HAS_STRICT_MODULE_RWX for Book3s/32. [jpn: - predicate on !PPC_BOOK3S_604 - make module_alloc() use PAGE_KERNEL protection] Signed-off-by: Russell Currey Signed-off-by: Jordan Niethe Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-8-jniethe5@gmail.com commit 62e3d4210ac9c35783d0e8fc306df4239c540a79 Author: Jordan Niethe Date: Wed Jun 9 11:34:28 2021 +1000 powerpc/bpf: Write protect JIT code Add the necessary call to bpf_jit_binary_lock_ro() to remove write and add exec permissions to the JIT image after it has finished being written. Without CONFIG_STRICT_MODULE_RWX the image will be writable and executable until the call to bpf_jit_binary_lock_ro(). Signed-off-by: Jordan Niethe Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-7-jniethe5@gmail.com commit bc33cfdb0bb84d9e4b125a617a437c29ddcac4d9 Author: Jordan Niethe Date: Wed Jun 9 11:34:27 2021 +1000 powerpc/bpf: Remove bpf_jit_free() Commit 74451e66d516 ("bpf: make jited programs visible in traces") added a default bpf_jit_free() implementation. Powerpc did not use the default bpf_jit_free() as powerpc did not set the images read-only. The default bpf_jit_free() called bpf_jit_binary_unlock_ro() is why it could not be used for powerpc. Commit d53d2f78cead ("bpf: Use vmalloc special flag") moved keeping track of read-only memory to vmalloc. This included removing bpf_jit_binary_unlock_ro(). Therefore there is no reason powerpc needs its own bpf_jit_free(). Remove it. Signed-off-by: Jordan Niethe Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-6-jniethe5@gmail.com commit 6a3a58e6230dc5b646ce3511436d7e74fc7f764b Author: Russell Currey Date: Wed Jun 9 11:34:26 2021 +1000 powerpc/kprobes: Mark newly allocated probes as ROX Add the arch specific insn page allocator for powerpc. This allocates ROX pages if STRICT_KERNEL_RWX is enabled. These pages are only written to with patch_instruction() which is able to write RO pages. Signed-off-by: Russell Currey Signed-off-by: Christophe Leroy [jpn: Reword commit message, switch to __vmalloc_node_range()] Signed-off-by: Jordan Niethe Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-5-jniethe5@gmail.com commit 4fcc636615b1a309b39cab101a2b433cbf1f63f1 Author: Jordan Niethe Date: Wed Jun 9 11:34:25 2021 +1000 powerpc/modules: Make module_alloc() Strict Module RWX aware Make module_alloc() use PAGE_KERNEL protections instead of PAGE_KERNEL_EXEX if Strict Module RWX is enabled. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-4-jniethe5@gmail.com commit 71a5b3db9f209ea5d1e07371017e65398d3c6fbc Author: Jordan Niethe Date: Wed Jun 9 11:34:24 2021 +1000 powerpc/lib/code-patching: Set up Strict RWX patching earlier setup_text_poke_area() is a late init call so it runs before mark_rodata_ro() and after the init calls. This lets all the init code patching simply write to their locations. In the future, kprobes is going to allocate its instruction pages RO which means they will need setup_text__poke_area() to have been already called for their code patching. However, init_kprobes() (which allocates and patches some instruction pages) is an early init call so it happens before setup_text__poke_area(). start_kernel() calls poking_init() before any of the init calls. On powerpc, poking_init() is currently a nop. setup_text_poke_area() relies on kernel virtual memory, cpu hotplug and per_cpu_areas being setup. setup_per_cpu_areas(), boot_cpu_hotplug_init() and mm_init() are called before poking_init(). Turn setup_text_poke_area() into poking_init(). Signed-off-by: Jordan Niethe Reviewed-by: Christophe Leroy Reviewed-by: Russell Currey [mpe: Fold in missing prototype for poking_init() from lkp] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-3-jniethe5@gmail.com commit 1f9ad21c3b384a8f16d8c46845a48a01d281a603 Author: Russell Currey Date: Wed Jun 9 11:34:23 2021 +1000 powerpc/mm: Implement set_memory() routines The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX, and are generally useful primitives to have. This implementation is designed to be generic across powerpc's many MMUs. It's possible that this could be optimised to be faster for specific MMUs. This implementation does not handle cases where the caller is attempting to change the mapping of the page it is executing from, or if another CPU is concurrently using the page being altered. These cases likely shouldn't happen, but a more complex implementation with MMU-specific code could safely handle them. On hash, the linear mapping is not kept in the linux pagetable, so this will not change the protection if used on that range. Currently these functions are not used on the linear map so just WARN for now. apply_to_existing_page_range() does not work on huge pages so for now disallow changing the protection of huge pages. [jpn: - Allow set memory functions to be used without Strict RWX - Hash: Disallow certain regions - Have change_page_attr() take function pointers to manipulate ptes - Radix: Add ptesync after set_pte_at()] Signed-off-by: Russell Currey Signed-off-by: Christophe Leroy Signed-off-by: Jordan Niethe Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210609013431.9805-2-jniethe5@gmail.com commit 393eff5a7b357a23db3e786e24b5ba8762cc6820 Author: Nicholas Piggin Date: Mon May 3 23:02:42 2021 +1000 powerpc/pesries: Get STF barrier requirement from H_GET_CPU_CHARACTERISTICS This allows the hypervisor / firmware to describe this workarounds to the guest. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210503130243.891868-4-npiggin@gmail.com commit 84ed26fd00c514da57cd46aa3728a48f1f9b35cd Author: Nicholas Piggin Date: Mon May 3 23:02:41 2021 +1000 powerpc/security: Add a security feature for STF barrier Rather than tying this mitigation to RFI L1D flush requirement, add a new bit for it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210503130243.891868-3-npiggin@gmail.com commit 65c7d070850e109a8a75a431f5a7f6eb4c007b77 Author: Nicholas Piggin Date: Mon May 3 23:02:40 2021 +1000 powerpc/pseries: Get entry and uaccess flush required bits from H_GET_CPU_CHARACTERISTICS This allows the hypervisor / firmware to describe these workarounds to the guest. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210503130243.891868-2-npiggin@gmail.com commit 710e682286784b50b882fc4befdf83c587059211 Author: Nicholas Piggin Date: Fri Jun 11 21:11:04 2021 +1000 powerpc/boot: add zImage.lds to targets This prevents spurious rebuilds of the lds and then wrappers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210611111104.1058991-1-npiggin@gmail.com commit 3729e0ec59a20825bd4c8c70996b2df63915e1dd Author: Nicholas Piggin Date: Tue May 18 00:03:55 2021 +1000 powerpc/powernv: Fix machine check reporting of async store errors POWER9 and POWER10 asynchronous machine checks due to stores have their cause reported in SRR1 but SRR1[42] is set, which in other cases indicates DSISR cause. Check for these cases and clear SRR1[42], so the cause matching uses the i-side (SRR1) table. Fixes: 7b9f71f974a1 ("powerpc/64s: POWER9 machine check handler") Fixes: 201220bb0e8c ("powerpc/powernv: Machine check handler for POWER10") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210517140355.2325406-1-npiggin@gmail.com commit 69bb0585ebb0c48c93fc55fc27afbfc06adef2fd Author: Mark Rutland Date: Fri Jun 18 16:11:22 2021 +0100 arm64: insn: avoid circular include dependency Nathan reports that when building with CONFIG_LTO_CLANG_THIN=y, the build fails due to BUILD_BUG_ON() not being defined before its uss in . The problem is that with LTO, we patch READ_ONCE(), and includes , creating a circular include chain: ... and so when includes , none of the BUILD_BUG* definitions have happened yet. To avoid this, let's move AARCH64_INSN_SIZE into a header without any dependencies, such that it can always be safely included. At the same time, avoid including in , which should no longer be necessary (and doesn't make sense when insn.h is consumed by userspace). Reported-by: Nathan Chancellor Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20210621080830.GA37068@C02TD0UTHF1T.local Fixes: 3e00e39d9dad ("arm64: insn: move AARCH64_INSN_SIZE into ") Signed-off-by: Will Deacon commit e17362d683fb6bcda0e419ec0ad7cabb8252c509 Author: Linus Walleij Date: Thu Jun 17 11:50:49 2021 +0100 ARM: 9097/1: mmu: Declare section start/end correctly The kernel test robot reported an interesting bug: A debug print was using %08x with kernel_sec_start and kernel_sec_end being phys_addr_t which can be either u32 or u64 (possibly more). Actually these should just be declared as u32 to begin with: they are declared as such in the assembly in head.S and the kernel definitely boots in a 32 bit physical address space. Redeclare the kernel_sec_start and kernel_sec_end to rid the bug. Reported-by: kernel test robot Fixes: 6e121df14ccd ("ARM: 9090/1: Map the lowmem and kernel separately") Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 45ca16072b700f1e62a908f2de4a12d39edbb49e Author: Nobuhiro Iwamatsu Date: Mon May 31 21:07:53 2021 +0900 dt-bindings: gpio: zynq: convert bindings to YAML Convert gpio for Xilinx Zynq SoC bindings documentation to YAML. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 00a738b86ec0c88ad4745f658966f951cbe4c885 Merge: ab37ac690ed08 b18f901382fdb Author: Greg Kroah-Hartman Date: Mon Jun 21 12:22:27 2021 +0200 Merge tag 'thunderbolt-for-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v5.14 merge window This includes following Thunderbolt/USB4 changes for the v5.14 merge window: * Add self-authenticate quirk for a new Dell dock * NVM improvements * Align wake configuration with the USB4 connection manager guide * USB4 buffer allocation support * Retimer NVM firmware upgrade support when there is no device attached * Support for Intel Alder Lake integrated Thunderbolt/USB4 controller * A couple of miscellaneous cleanups. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (29 commits) thunderbolt: Fix DROM handling for USB4 DROM thunderbolt: Add support for Intel Alder Lake thunderbolt: No need to include in usb4_port.c thunderbolt: Poll 10ms for REG_FW_STS_NVM_AUTH_DONE to be set thunderbolt: Add device links only when software connection manager is used thunderbolt: Bond lanes only when dual_link_port != NULL in alloc_dev_default() thunderbolt: Check for NVM authentication status after the operation started thunderbolt: Add WRITE_ONLY and AUTHENTICATE_ONLY NVM operations for retimers thunderbolt: Allow router NVM authenticate separately thunderbolt: Move nvm_write_ops to tb.h thunderbolt: Add support for retimer NVM upgrade when there is no link thunderbolt: Add additional USB4 port operations for retimer access thunderbolt: Add support for ACPI _DSM to power on/off retimers thunderbolt: Add USB4 port devices thunderbolt: Log the link as TBT instead of TBT3 thunderbolt: Add KUnit tests for credit allocation thunderbolt: Add quirk for Intel Goshen Ridge DP credits thunderbolt: Allocate credits according to router preferences thunderbolt: Update port credits after bonding is enabled/disabled thunderbolt: Read router preferred credit allocation information ... commit c830b87a761b942474a7de95acb7f57a366fe73b Author: Aswath Govindraju Date: Mon May 24 20:49:54 2021 +0530 dt-bindings: gpio: gpio-davinci: Convert to json-schema Convert gpio-davinci dt-binding documentation from txt to yaml format. Signed-off-by: Aswath Govindraju Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit a2cdc24e20573cf719f3171071368f4f7781d970 Author: zhouchuangao Date: Fri Apr 23 01:35:09 2021 -0700 mips/kvm: Use BUG_ON instead of if condition followed by BUG BUG_ON uses unlikely in if(), it can be optimized at compile time. Usually, the condition in if() is not satisfied. In my opinion, this can improve the efficiency of the multi-stage pipeline. Signed-off-by: zhouchuangao Signed-off-by: Thomas Bogendoerfer commit f9cd46a4bb6ce8e9ca827afd2b294266251ef936 Author: Yang Yingliang Date: Sat Jun 5 15:55:37 2021 +0800 MIPS: OCTEON: octeon-usb: Use devm_platform_get_and_ioremap_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). And use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: Thomas Bogendoerfer commit ab37ac690ed08c5f41723f2143e3b9e682f031e6 Author: Colin Ian King Date: Fri Jun 18 10:04:47 2021 +0100 xhci: remove redundant continue statement The continue statement at the end of a for-loop has no effect, remove it. Signed-off-by: Colin Ian King Addresses-Coverity: ("Continue has no effect") Cc: Mathias Nyman Link: https://lore.kernel.org/r/20210618090447.99114-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 84524d1232ecca7cf8678e851b254f05cff4040a Author: Minas Harutyunyan Date: Thu Jun 17 09:55:24 2021 -0700 usb: dwc3: Fix debugfs creation flow Creation EP's debugfs called earlier than debugfs folder for dwc3 device created. As result EP's debugfs are created in '/sys/kernel/debug' instead of '/sys/kernel/debug/usb/dwc3.1.auto'. Moved dwc3_debugfs_init() function call before calling dwc3_core_init_mode() to allow create dwc3 debugfs parent before creating EP's debugfs's. Fixes: 8d396bb0a5b6 ("usb: dwc3: debugfs: Add and remove endpoint dirs dynamically") Cc: stable Reviewed-by: Jack Pham Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/01fafb5b2d8335e98e6eadbac61fc796bdf3ec1a.1623948457.git.Minas.Harutyunyan@synopsys.com Signed-off-by: Greg Kroah-Hartman commit d97c0ff5a124f48109c4b32d6471c7bccd497009 Author: Stephan Gerhold Date: Thu Jun 3 10:52:22 2021 +0200 extcon: sm5502: Add support for SM5504 SM5504 is another MUIC from Silicon Mitus that is fairly similar to SM5502. They seem to use the same register set, but: - SM5504 has some additional bits in SM5502_REG_CONTROL - SM5504 has a quite different set of interrupts - SM5504 reports USB OTG as dev_type1 = BIT(0) instead of BIT(7) Overall it's minor and we can support this by defining a separate struct sm5502_type for SM5504. Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit f33c056dea2ea6633d40d36371457380d372c607 Author: Stephan Gerhold Date: Thu Jun 3 10:52:21 2021 +0200 extcon: sm5502: Refactor driver to use chip-specific struct Prepare for supporting SM5504 in the extcon-sm5502 driver by replacing enum sm5504_types with a struct sm5504_type that stores the chip-specific definitions. This struct can then be defined separately for SM5504 without having to add if (type == TYPE_SM5504) everywhere in the code. Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit 85b8326ed1513bcd9ab79df2d0d5fae11981be90 Author: Stephan Gerhold Date: Fri Jun 4 11:01:40 2021 +0900 dt-bindings: extcon: sm5502: Document siliconmitus,sm5504-muic Document support for SM5504 with the new siliconmitus,sm5504-muic compatible. Acked-by: Rob Herring Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit 59ab522d5b6183b4a19f8f8720e9f4806ceb7069 Author: Stephan Gerhold Date: Mon May 31 15:34:36 2021 +0200 dt-bindings: extcon: sm5502: Convert to DT schema Convert the extcon-sm5502 device tree bindings to DT schema. Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit b1b76af23de825fec79369ff5c9d8915b0fae5f0 Author: Stephan Gerhold Date: Mon May 31 15:34:34 2021 +0200 extcon: sm5502: Implement i2c_driver->probe_new() sm5022_muic_i2c_probe() does not use the i2c_device_id, so implement i2c_driver->probe_new() instead of probe(). Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit d3a213d23c5248f40986cbf8699c755c204ba90e Author: Stephan Gerhold Date: Mon May 31 15:34:33 2021 +0200 extcon: sm5502: Use devm_regmap_add_irq_chip() Use devm_regmap_add_irq_chip() to avoid having to remove the irqchip explicitly in sm5502_muic_i2c_remove(). Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit dc11fc2991e9efbceef93912b83e333d2835fb19 Author: Marek Szyprowski Date: Fri Apr 23 22:46:24 2021 +0200 extcon: max8997: Add missing modalias string The platform device driver name is "max8997-muic", so advertise it properly in the modalias string. This fixes automated module loading when this driver is compiled as a module. Fixes: b76668ba8a77 ("Extcon: add MAX8997 extcon driver") Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi commit d25b224f8e5507879b36a769a6d1324cf163466c Author: Stephan Gerhold Date: Mon May 31 15:34:35 2021 +0200 extcon: sm5502: Drop invalid register write in sm5502_reg_data When sm5502_init_dev_type() iterates over sm5502_reg_data to initialize the registers it is limited by ARRAY_SIZE(sm5502_reg_data). There is no need to add another empty element to sm5502_reg_data. Having the additional empty element in sm5502_reg_data will just result in writing 0xff to register 0x00, which does not really make sense. Fixes: 914b881f9452 ("extcon: sm5502: Add support new SM5502 extcon device driver") Signed-off-by: Stephan Gerhold Signed-off-by: Chanwoo Choi commit ecb5bdff901139850fb3ca3ae2d0cccac045bc52 Author: Ferry Toth Date: Tue May 18 23:27:09 2021 +0200 extcon: intel-mrfld: Sync hardware and software state on init extcon driver for Basin Cove PMIC shadows the switch status used for dwc3 DRD to detect a change in the switch position. This change initializes the status at probe time. Cc: stable@vger.kernel.org Fixes: 492929c54791 ("extcon: mrfld: Introduce extcon driver for Basin Cove PMIC") Reviewed-by: Andy Shevchenko Signed-off-by: Ferry Toth Signed-off-by: Chanwoo Choi commit 88693f770bb09c196b1eb5f06a484a254ecb9924 Author: Yang Yingliang Date: Fri Jun 18 12:38:35 2021 +0800 usb: gadget: hid: fix error return code in hid_bind() Fix to return a negative error code from the error handling case instead of 0. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210618043835.2641360-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit ed914d48b6a1040d1039d371b56273d422c0081e Author: Huang Pei Date: Fri Jun 11 15:09:46 2021 +0800 MIPS: add PMD table accounting into MIPS'pmd_alloc_one This fixes Page Table accounting bug. MIPS is the ONLY arch just defining __HAVE_ARCH_PMD_ALLOC_ONE alone. Since commit b2b29d6d011944 (mm: account PMD tables like PTE tables), "pmd_free" in asm-generic with PMD table accounting and "pmd_alloc_one" in MIPS without PMD table accounting causes PageTable accounting number negative, which read by global_zone_page_state(), always returns 0. Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit 4249d6fbc10fd997abdf8a1ea49c0389a0edf706 Author: Linyu Yuan Date: Wed Jun 16 19:51:42 2021 +0800 usb: gadget: eem: fix echo command packet response issue when receive eem echo command, it will send a response, but queue this response to the usb request which allocate from gadget device endpoint zero, and transmit the request to IN endpoint of eem interface. on dwc3 gadget, it will trigger following warning in function __dwc3_gadget_ep_queue(), if (WARN(req->dep != dep, "request %pK belongs to '%s'\n", &req->request, req->dep->name)) return -EINVAL; fix it by allocating a usb request from IN endpoint of eem interface, and transmit the usb request to same IN endpoint of eem interface. Signed-off-by: Linyu Yuan Cc: stable Link: https://lore.kernel.org/r/20210616115142.34075-1-linyyuan@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 06476b5bed2a686b6a1c8a9e011104a631adffc3 Author: Tom Rix Date: Thu Jun 10 14:44:35 2021 -0700 MIPS: Loongson64: fix spelling of SPDX tag checkpatch looks for SPDX-License-Identifier. So change the '_' to '-' Signed-off-by: Tom Rix Signed-off-by: Thomas Bogendoerfer commit 33cb46c4676d01956811b68a29157ea969a5df70 Author: Ruslan Bilovol Date: Thu Jun 17 19:27:55 2021 +0300 usb: gadget: f_hid: fix endianness issue with descriptors Running sparse checker it shows warning message about incorrect endianness used for descriptor initialization: | f_hid.c:91:43: warning: incorrect type in initializer (different base types) | f_hid.c:91:43: expected restricted __le16 [usertype] bcdHID | f_hid.c:91:43: got int Fixing issue with cpu_to_le16() macro, however this is not a real issue as the value is the same both endians. Cc: Fabien Chouteau Cc: Segiy Stetsyuk Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/20210617162755.29676-1-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4249cb7d920060dfa925d3b9f6a37f0a7c025a16 Author: Huilong Deng Date: Sun Jun 20 22:29:15 2021 +0800 printk: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Huilong Deng Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit f2dca339fa7d7089c66ece2ad6b69185093bc06e Merge: cfb0276373dfb 33e99b65a1349 Author: Greg Kroah-Hartman Date: Mon Jun 21 11:13:01 2021 +0200 Merge tag 'usb-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Some tiny improvements for cdns USB3 drivers, no important things. * tag 'usb-v5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdns3: cdns3-gadget: Use list_move_tail instead of list_del/list_add_tail doc: dt-binding: cdns,usb3: Add interrupt-names property under required usb: cdnsp: Useless condition has been removed usb: cdns3: Corrected comment to align with kernel-doc comment commit cfb0276373dfb5dccef0f60df0d1f7c0328918a7 Merge: 04d72afa34edd 13311e74253fe Author: Greg Kroah-Hartman Date: Mon Jun 21 10:56:05 2021 +0200 Merge tag 'v5.13-rc7' into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b22afcdf04c96ca58327784e280e10288cfd3303 Author: Thomas Gleixner Date: Sat Mar 27 22:01:36 2021 +0100 cpu/hotplug: Cure the cpusets trainwreck Alexey and Joshua tried to solve a cpusets related hotplug problem which is user space visible and results in unexpected behaviour for some time after a CPU has been plugged in and the corresponding uevent was delivered. cpusets delegate the hotplug work (rebuilding cpumasks etc.) to a workqueue. This is done because the cpusets code has already a lock nesting of cgroups_mutex -> cpu_hotplug_lock. A synchronous callback or waiting for the work to finish with cpu_hotplug_lock held can and will deadlock because that results in the reverse lock order. As a consequence the uevent can be delivered before cpusets have consistent state which means that a user space invocation of sched_setaffinity() to move a task to the plugged CPU fails up to the point where the scheduled work has been processed. The same is true for CPU unplug, but that does not create user observable failure (yet). It's still inconsistent to claim that an operation is finished before it actually is and that's the real issue at hand. uevents just make it reliably observable. Obviously the problem should be fixed in cpusets/cgroups, but untangling that is pretty much impossible because according to the changelog of the commit which introduced this 8 years ago: 3a5a6d0c2b03("cpuset: don't nest cgroup_mutex inside get_online_cpus()") the lock order cgroups_mutex -> cpu_hotplug_lock is a design decision and the whole code is built around that. So bite the bullet and invoke the relevant cpuset function, which waits for the work to finish, in _cpu_up/down() after dropping cpu_hotplug_lock and only when tasks are not frozen by suspend/hibernate because that would obviously wait forever. Waiting there with cpu_add_remove_lock, which is protecting the present and possible CPU maps, held is not a problem at all because neither work queues nor cpusets/cgroups have any lockchains related to that lock. Waiting in the hotplug machinery is not problematic either because there are already state callbacks which wait for hardware queues to drain. It makes the operations slightly slower, but hotplug is slow anyway. This ensures that state is consistent before returning from a hotplug up/down operation. It's still inconsistent during the operation, but that's a different story. Add a large comment which explains why this is done and why this is not a dump ground for the hack of the day to work around half thought out locking schemes. Document also the implications vs. hotplug operations and serialization or the lack of it. Thanks to Alexy and Joshua for analyzing why this temporary sched_setaffinity() failure happened. Fixes: 3a5a6d0c2b03("cpuset: don't nest cgroup_mutex inside get_online_cpus()") Reported-by: Alexey Klimov Reported-by: Joshua Baker Signed-off-by: Thomas Gleixner Tested-by: Alexey Klimov Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87tuowcnv3.ffs@nanos.tec.linutronix.de commit b5a1d1fe0cbb9d20ba661134a09561af1dc9ebf5 Author: Florian Westphal Date: Fri Jun 18 15:52:00 2021 +0200 xfrm: replay: remove last replay indirection This replaces the overflow indirection with the new xfrm_replay_overflow helper. After this, the 'repl' pointer in xfrm_state is no longer needed and can be removed as well. xfrm_replay_overflow() is added in two incarnations, one is used when the kernel is compiled with xfrm hardware offload support enabled, the other when its disabled. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit adfc2fdbae30d42edebad01d0ea1eed43036f1fe Author: Florian Westphal Date: Fri Jun 18 15:51:59 2021 +0200 xfrm: replay: avoid replay indirection Add and use xfrm_replay_check helper instead of indirection. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 25cfb8bc97c2b8447f86b1ad376ee672b6b173d4 Author: Florian Westphal Date: Fri Jun 18 15:51:58 2021 +0200 xfrm: replay: remove recheck indirection Adds new xfrm_replay_recheck() helper and calls it from xfrm input path instead of the indirection. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit c7f877833c9f361be8e88d6b140d8314e80892aa Author: Florian Westphal Date: Fri Jun 18 15:51:57 2021 +0200 xfrm: replay: remove advance indirection Similar to other patches: add a new helper to avoid an indirection. v2: fix 'net/xfrm/xfrm_replay.c:519:13: warning: 'seq' may be used uninitialized in this function' warning. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit cfc61c598e43772cc4f76b8fc40c5ec70675716b Author: Florian Westphal Date: Fri Jun 18 15:51:56 2021 +0200 xfrm: replay: avoid xfrm replay notify indirection replay protection is implemented using a callback structure and then called via x->repl->notify(), x->repl->recheck(), and so on. all the differect functions are always built-in, so this could be direct calls instead. This first patch prepares for removal of the x->repl structure. Add an enum with the three available replay modes to the xfrm_state structure and then replace all x->repl->notify() calls by the new xfrm_replay_notify() helper. The helper checks the enum internally to adapt behaviour as needed. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit b7a71fddc0ddfdd66cdefcf5bf1f59a0f0bdea57 Author: Koby Elbaz Date: Tue Jun 15 17:07:02 2021 +0300 habanalabs/gaudi: refactor hard-reset related code There is code related to hard-reset, which is done in gaudi specific code. However, this code can be used by future ASICs and therefore it is better to move it to the common code section. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6c31f494d8a9cf7e6081f94717a46ce789da6bc6 Author: Ofir Bitton Date: Thu Jun 17 09:52:55 2021 +0300 habanalabs/gaudi: add support for NIC DERR We add support for NIC DERR ECC error events, in case this error is received a device reset will be performed. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3817b352aad3b43f897c3034b16886cdb949b720 Author: farah kassabri Date: Tue Jun 1 16:44:28 2021 +0300 habanalabs: add validity check for signal cs In preparation for a new feature that allows the user to reserve signals ahead of submissions, we need to change a current assumption in the code. Currently, the driver uses 2 SOBs to support signal CS. When the first SOB reaches max value, the driver switches to the other one and assumes that when it will need to switch back to the first one, all of the signals have already been handled. This assumption won't hold when the new feature will be added, because using signal reservation, the driver can reach the max SOB value very fast. The change is to add a validity check when submitting a signal CS, to make sure the previous SOB is available (all the signals attached to it indeed finished). Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 69dbbbadad4f579048d441c5472482601a306935 Author: Koby Elbaz Date: Thu Jun 17 17:04:16 2021 +0300 habanalabs: get lower/upper 32 bits via masking fix multiple similar occurrences of the following sparse warning: 'warning: cast truncates bits from constant value (7ffc113000 becomes fc113000)' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 23bace677a3d928b388b6204d64c08b8c6fd468c Author: Ofir Bitton Date: Tue Jun 8 17:24:52 2021 +0300 habanalabs: allow reset upon device release We introduce a new type of reset which is reset upon device release. This reset is very similar to soft reset except the fact it is performed only upon device release and not upon user sysfs request nor TDR. The purpose of this reset is to make sure the device is returned to IDLE state after the current user has finished working with the device. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit cf813c67d9619fd474c785698cbed543b94209dd Author: Enrico Weigelt, metux IT consult Date: Wed Jun 16 20:17:08 2021 +0200 watchdog: iTCO_wdt: use dev_err() instead of pr_err() Use dev_err() instead of pr_err(), so device name is also shown in the log. Signed-off-by: Enrico Weigelt, metux IT consult Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210616181708.19530-2-info@metux.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e9800b7994642a794afd4894f072541c14277ce8 Author: Daniel Palmer Date: Sat Jun 5 19:04:40 2021 +0200 watchdog: Add Mstar MSC313e WDT driver It adds a driver for the IP block handling the watchdog timer found for Mstar MSC313e SoCs and newer. Signed-off-by: Daniel Palmer Co-developed-by: Romain Perier Signed-off-by: Romain Perier Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210611200801.52139-3-romain.perier@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3e5fcb022addc4f1d32b2ca2676f0541b556512c Author: Romain Perier Date: Fri Jun 11 22:07:59 2021 +0200 dt-bindings: watchdog: Add Mstar MSC313e WDT devicetree bindings documentation This adds the documentation for the devicetree bindings of the Mstar MSC313e watchdog driver, found from MSC313e SoCs and newer. Signed-off-by: Romain Perier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210611200801.52139-2-romain.perier@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit cb011044e34c293e139570ce5c01aed66a34345c Author: Jan Kiszka Date: Sun May 30 13:24:23 2021 +0200 watchdog: iTCO_wdt: Account for rebooting on second timeout This was already attempted to fix via 1fccb73011ea: If the BIOS did not enable TCO SMIs, the timer definitely needs to trigger twice in order to cause a reboot. If TCO SMIs are on, as well as SMIs in general, we can continue to assume that the BIOS will perform a reboot on the first timeout. QEMU with its ICH9 and related BIOS falls into the former category, currently taking twice the configured timeout in order to reboot the machine. For iTCO version that fall under turn_SMI_watchdog_clear_off, this is also true and was currently only addressed for v1, irrespective of the turn_SMI_watchdog_clear_off value. Signed-off-by: Jan Kiszka Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/0b8bb307-d08b-41b5-696c-305cdac6789c@siemens.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5b606ae892e3194c5ef42dece094306a14cf9e94 Author: Rob Herring Date: Mon Jun 7 14:40:22 2021 -0500 dt-bindings: watchdog: Convert arm,sbsa-gwdt to DT schema Convert the arm,sbsa-gwdt binding to DT schema format. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Fu Wei Cc: linux-watchdog@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210607194022.3095736-1-robh@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 12dbbf085fa1a78b6cafb02cf0f40b21160206e7 Author: Eugen Hristev Date: Thu May 27 13:01:20 2021 +0300 dt-bindings: watchdog: sama5d4-wdt: add compatible for sama7g5-wdt This driver is also compatible with the watchdog on sama7g5 SoC. Add the corresponding compatible string to the binding. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210527100120.266796-3-eugen.hristev@microchip.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5ae233fba8edee84fdd70e72a69bb7a41a273194 Author: Eugen Hristev Date: Thu May 27 13:01:19 2021 +0300 watchdog: sama5d4_wdt: add support for sama7g5-wdt Add support for compatible sama7g5-wdt. The sama7g5 wdt is the same hardware block as on sam9x60. Adapt the driver to use the sam9x60/sama7g5 variant if either of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt). Signed-off-by: Eugen Hristev Acked-by: Nicolas Ferre Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210527100120.266796-2-eugen.hristev@microchip.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 13b191692d917b62d50c3956ed9c6ef3d0fbb001 Author: Eugen Hristev Date: Thu May 27 13:01:18 2021 +0300 dt-bindings: watchdog: sama5d4-wdt: convert to yaml Convert the old txt binding to yaml format. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210527100120.266796-1-eugen.hristev@microchip.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6da96e6e9244f67f6dd472a8e5f6abe1deba9048 Author: Juerg Haefliger Date: Thu May 20 09:29:18 2021 +0200 watchdog: ziirave_wdt: Remove VERSION_FMT defines and add sysfs newlines Remove the ZIIRAVE_{BL,FW}_VERION_FMT defines since they're only used in very few places. While at it, add newlines to sysfs outputs. Suggested-By: Joe Perches Signed-off-by: Juerg Haefliger Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210520072918.76482-1-juergh@canonical.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b326f2c85f3d79996a58749d9b17b644d440d68a Author: Seiya Wang Date: Tue Mar 16 19:14:36 2021 +0800 dt-bindings: watchdog: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of watchdog for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Reviewed-by: Guenter Roeck Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319023427.16711-5-seiya.wang@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e4c721d7167f32331ff436b036fe8fca0b70f094 Author: Liang Chen Date: Thu Apr 29 16:11:45 2021 +0800 dt-bindings: watchdog: dw-wdt: add description for rk3568 add "rockchip,rk3568-wdt", "snps,dw-wdt" for watchdog nodes on a rk3568 platform to snps,dw-wdt.yaml. Signed-off-by: Liang Chen Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210429081151.17558-5-cl@rock-chips.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 854478a381078ee86ae2a7908a934b1ded399130 Author: Stefan Eichenberger Date: Tue Apr 6 14:12:47 2021 +0200 watchdog: imx_sc_wdt: fix pretimeout If the WDIOF_PRETIMEOUT flag is not set when registering the device the driver will not show the sysfs entries or register the default governor. By moving the registering after the decision whether pretimeout is supported this gets fixed. Signed-off-by: Stefan Eichenberger Reviewed-by: Guenter Roeck Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20210519080311.142928-1-eichest@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 266b2e335ce0c396096be4b649b819cc62b8c791 Author: Junlin Yang Date: Wed Feb 3 20:24:04 2021 +0800 watchdog: diag288_wdt: Remove redundant assignment The assign for 'ret' is redundant and can be removed, because it will be assigned before use. Signed-off-by: Junlin Yang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210203122404.752-1-angkery@163.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7b7d2fdc8c3e3f9fdb3558d674e1eeddc16c7d9e Author: Curtis Klein Date: Wed Feb 3 12:11:30 2021 -0800 watchdog: Add hrtimer-based pretimeout feature This adds the option to use a hrtimer to generate a watchdog pretimeout event for hardware watchdogs that do not natively support watchdog pretimeouts. With this enabled, all watchdogs will appear to have pretimeout support in userspace. If no pretimeout value is set, there will be no change in the watchdog's behavior. If a pretimeout value is set for a specific watchdog that does not have built-in pretimeout support, a timer will be started that should fire at the specified time before the watchdog timeout would occur. When the watchdog is successfully pinged, the timer will be restarted. If the timer is allowed to fire it will generate a pretimeout event. However because a software timer is used, it may not be able to fire in every circumstance. If the watchdog does support a pretimeout natively, that functionality will be used instead of the hrtimer. The general design of this feaure was inspired by the software watchdog, specifically its own pretimeout implementation. However the software watchdog and this feature are completely independent. They can be used together; with or without CONFIG_SOFT_WATCHDOG_PRETIMEOUT enabled. The main advantage of using the hrtimer pretimeout with a hardware watchdog, compared to running the software watchdog with a hardware watchdog, is that if the hardware watchdog driver is unable to ping the watchdog (e.g. due to a bus or communication error), then the hrtimer pretimeout would still fire whereas the software watchdog would not. Signed-off-by: Curtis Klein Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1612383090-27110-1-git-send-email-curtis.klein@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e1138cef88a53eb24c2536cef788a7293824c789 Author: Sai Prakash Ranjan Date: Mon Mar 15 11:35:01 2021 +0530 dt-bindings: watchdog: Add compatible for SC7280 SoC Add compatible for watchdog timer on SC7280 SoC. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1615788301-29891-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8442ef6f11cf3efa2d5d2fbec5aef67368a8915b Author: Sai Prakash Ranjan Date: Thu Mar 11 01:50:04 2021 +0530 watchdog: qcom: Move suspend/resume to suspend_late/resume_early During suspend/resume usecases and tests, it is common to see issues such as lockups either in suspend path or resume path because of the bugs in the corresponding device driver pm handling code. In such cases, it is important that watchdog is active to make sure that we either receive a watchdog pretimeout notification or a bite causing reset instead of a hang causing us to hard reset the machine. There are good reasons as to why we need this because: * We can have a watchdog pretimeout governor set to panic in which case we can have a backtrace which would help identify the issue with the particular driver and cause a normal reboot. * Even in case where there is no pretimeout support, a watchdog bite is still useful because some firmware has debug support to dump CPU core context on watchdog bite for post-mortem analysis. * One more usecase which comes to mind is of warm reboot. In case we hard reset the target, a cold reboot could be induced resulting in lose of ddr contents thereby losing all the debug info. Currently, the watchdog pm callback just invokes the usual suspend and resume callback which do not have any special ordering in the sense that a watchdog can be suspended before the buggy device driver suspend callback and watchdog resume can happen after the buggy device driver resume callback. This would mean that the watchdog will not be active when the buggy driver cause the lockups thereby hanging the system. So to make sure this doesn't happen, move the watchdog pm to use late/early system pm callbacks which will ensure that the watchdog is suspended late and resumed early so that it can catch such issues. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Guenter Roeck Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210310202004.1436-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bbfdad82efb30cae910b96b2cb4045812794c89d Author: Bhaskar Chowdhury Date: Wed Mar 17 10:47:34 2021 +0530 watchdog: Fix a typo in the file orion_wdt.c s/freqency/frequency/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210317051734.97314-1-unixbhaskar@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 29e85f53fb58b45b9e9276dcdf1f1cb762dd1c9f Author: Wei Yongjun Date: Thu Mar 4 04:59:09 2021 +0000 watchdog: jz4740: Fix return value check in jz4740_wdt_probe() In case of error, the function device_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 6d532143c915 ("watchdog: jz4740: Use regmap provided by TCU driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20210304045909.945799-1-weiyongjun1@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bc65baf73b68448e79e8ff797522d1976788deb1 Author: Christophe Leroy Date: Thu Mar 18 17:25:06 2021 +0000 watchdog: Remove MV64x60 watchdog driver Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed the last selector of CONFIG_MV64X60. Therefore CONFIG_MV64X60_WDT cannot be selected anymore and can be removed. Signed-off-by: Christophe Leroy Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/9c2952bcfaec3b1789909eaa36bbce2afbfab7ab.1616085654.git.christophe.leroy@csgroup.eu Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5f8ebd4766dd072c8152255d45b352d444592a33 Author: Wang Qing Date: Sun Apr 25 09:52:07 2021 +0800 doc: mtk-wdt: support pre-timeout when the bark irq is available Add description of pre-timeout in mtk-wdt. Signed-off-by: Wang Qing Acked-by: Rob Herring Link: https://lore.kernel.org/r/1619148020-2236-3-git-send-email-wangqing@vivo.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1bbce7792bd19b95e44fd37db88b98091191e199 Author: Wang Qing Date: Sun Apr 25 09:52:06 2021 +0800 watchdog: mtk: support pre-timeout when the bark irq is available Use the bark interrupt as the pretimeout notifier if available. When the watchdog timer expires in dual mode, an interrupt will be triggered first, then the timing restarts. The reset signal will be initiated when the timer expires again. The pretimeout notification shall occur at timeout-sec/2. V2: - panic() by default if WATCHDOG_PRETIMEOUT_GOV is not enabled. V3: - Modify the pretimeout behavior, manually reset after the pretimeout - is processed and wait until timeout. V4: - Remove pretimeout related processing. - Add dual mode control separately. V5: - Fix some formatting and printing problems. V6: - Realize pretimeout processing through dualmode. V7: - Add set_pretimeout(). V8/V9: - Fix some formatting problems. Signed-off-by: Wang Qing Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1619315527-8171-2-git-send-email-wangqing@vivo.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4700df05d3848c8ceb92662792d45d938e533f5a Author: Lukas Bulwahn Date: Mon Mar 22 07:53:37 2021 +0100 watchdog: fix syntactic kernel-doc issues The command 'find drivers/watchdog | xargs ./scripts/kernel-doc -none' reports a number of kernel-doc warnings in the watchdog subsystem. Address the kernel-doc warnings that were purely syntactic issues with kernel-doc comments. The remaining kernel-doc warnings are of type "Excess function parameter" and "Function parameter or member not described". These warnings would need to be addressed in a second pass with a bit more insight into the APIs and purpose of the functions in the watchdog subsystem. Signed-off-by: Lukas Bulwahn Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210322065337.617-1-lukas.bulwahn@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fdc46a1485853e6d275b1ce68eb44986fa96480d Author: Flavio Suligoi Date: Tue Feb 16 15:17:27 2021 +0100 watchdog: wdat_wdg: fix typo Fix the following typo: "recommeded" --> "recommended" "firmare" --> "firmware" Signed-off-by: Flavio Suligoi Reviewed-by: Mika Westerberg Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210216141727.641224-1-f.suligoi@asem.it Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e379c2199de4280243e43118dceb4ea5e97059a3 Author: Álvaro Fernández Rojas Date: Tue Feb 23 09:00:42 2021 +0100 watchdog: bcm7038_wdt: add big endian support bcm7038_wdt can be used on bmips big endian (bcm63xx) devices too. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210223080042.29569-1-noltari@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 879a70843afdf6cc66dd70f4f04a44e1d8afed7d Author: Bhaskar Chowdhury Date: Sun Mar 21 03:03:01 2021 +0530 watchdog: sl28cpld_wdt: Fix a typo s/parmeter/parameter/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Reviewed-by: Guenter Roeck Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210320213301.8513-1-unixbhaskar@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 48027d0d9a77e051619f9cd5d311be12a4cb9380 Author: Srinivas Neeli Date: Mon Mar 29 21:49:39 2021 +0530 watchdog: of_xilinx_wdt: Skip printing pointer value "%p" is not printing the pointer value. In driver, printing pointer value is not useful so avoiding print. iSigned-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210329161939.37680-6-srinivas.neeli@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f185de2231ce3214bb242f56b5d73641d5269508 Author: Srinivas Neeli Date: Mon Mar 29 21:49:38 2021 +0530 watchdog: of_xilinx_wdt: Remove passing null pointer clk is an optional property, if clock not defined, calling clk_prepare_enable() and devm_add_action_or_reset() are not useful. so calling these two apis only when clock is present. Addresses-Coverity:"FORWARD_NULL" Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210329161939.37680-5-srinivas.neeli@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a40b2c3dc360d2c8c8614864f523dd0923b5f876 Author: Srinivas Goud Date: Mon Mar 29 21:49:37 2021 +0530 watchdog: of_xilinx_wdt: Used dev_dbg() This patch removes pr_info in stop function and adds dev_dbg() in start/stop function to display device specific debug info. Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210329161939.37680-4-srinivas.neeli@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 73ec94403190c7a3a8c174614ea65f04f0b9617e Author: Srinivas Goud Date: Mon Mar 29 21:49:36 2021 +0530 watchdog: of_xilinx_wdt: Used BIT macro Used BIT macro instead of mask value. Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210329161939.37680-3-srinivas.neeli@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b2802e78beca7c98805f20cbb4adb97c000703b1 Author: Srinivas Goud Date: Mon Mar 29 21:49:35 2021 +0530 watchdog: of_xilinx_wdt: Add comment to spinlock Based on checkpatch every spinlock should be documented. The patch is fixing this issue: ./scripts/checkpatch.pl --strict -f drivers/watchdog/of_xilinx_wdt.c CHECK: spinlock_t definition without comment + spinlock_t spinlock; Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210329161939.37680-2-srinivas.neeli@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0a1186e49b010b4ecdcc60dd356b5751d7642dd4 Author: Tian Tao Date: Thu Apr 1 10:25:21 2021 +0800 watchdog: meson_wdt: Use device_get_match_data() helper Use the device_get_match_data() helper instead of open coding. Signed-off-by: Tian Tao Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1617243921-56774-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c891ef7d80da1855b5bba478a564c184df314ea4 Author: Wong Vee Khee Date: Thu Apr 1 11:32:09 2021 +0800 watchdog: Fix a typo in Kconfig s/thershold/threshold Cc: Vijayakannan Ayyathurai Signed-off-by: Wong Vee Khee Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210401033209.9929-1-vee.khee.wong@linux.intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4d12252b37a2f907a1d08ac705caed9f780cabfa Author: Jiapeng Chong Date: Tue Apr 13 17:34:20 2021 +0800 watchdog: it87_wdt: remove useless function Fix the following clang warning: drivers/watchdog/it87_wdt.c:155:20: warning: unused function 'superio_outw' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1618306460-57286-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e7dc481c92060f9ce872878b0b7a08c24713a7e5 Author: Tao Ren Date: Fri Apr 16 20:42:49 2021 -0700 watchdog: aspeed: fix hardware timeout calculation Fix hardware timeout calculation in aspeed_wdt_set_timeout function to ensure the reload value does not exceed the hardware limit. Fixes: efa859f7d786 ("watchdog: Add Aspeed watchdog driver") Reported-by: Amithash Prasad Signed-off-by: Tao Ren Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210417034249.5978-1-rentao.bupt@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0102882979582b6f9a351edcf600da9574030193 Author: Randy Dunlap Date: Sun Apr 18 17:07:03 2021 -0700 watchdog: clean up the Kconfig file Change a non-working ftp: URL to https:. Wrap long lines earlier. Spell "IP" with capital letters. Change "it`s" to "it's". The backtick (grave accent) is not an apostrophe. Signed-off-by: Randy Dunlap Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210419000704.17745-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3bb21781d13516baf14dc051dbe2b3145c704cda Author: Juerg Haefliger Date: Tue May 11 08:18:12 2021 +0200 watchdog: Use sysfs_emit() and sysfs_emit_at() in "show" functions Convert sprintf() in sysfs "show" functions to sysfs_emit() and sysfs_emit_at() in order to check for buffer overruns in sysfs outputs. Signed-off-by: Juerg Haefliger Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210511061812.480172-1-juergh@canonical.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d0212f095ab56672f6f36aabc605bda205e1e0bf Author: Zou Wei Date: Wed May 12 14:57:56 2021 +0800 watchdog: Fix possible use-after-free by calling del_timer_sync() This driver's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Guenter Roeck Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/1620802676-19701-1-git-send-email-zou_wei@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 90b7c141132244e8e49a34a4c1e445cce33e07f4 Author: Zou Wei Date: Tue May 11 15:04:51 2021 +0800 watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff() This module's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1620716691-108460-1-git-send-email-zou_wei@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6ddf5087f8022847556a4fec1d37a613f7e395d5 Author: Juerg Haefliger Date: Tue May 11 08:29:53 2021 +0200 watchdog: Add {min,max}_timeout sysfs nodes The valid range for the 'timeout' value is useful information so expose the min and max timeout values via sysfs. Signed-off-by: Juerg Haefliger Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210511062953.485252-1-juergh@canonical.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3452239effed2b6ea25835f93bdb8a31f6829ffe Author: Andy Shevchenko Date: Mon May 17 20:49:12 2021 +0300 watchdog: sp805: Fix kernel doc description Kernel doc validation script is not happy CHECK .../sp805_wdt.c .../sp805_wdt.c:73: warning: Function parameter or member 'rate' not described in 'sp805_wdt' Fix this by describing rate parameter. While at it, mark clk one optional. Fixes: dc0e4a3bb7dc ("watchdog: sp805: Add clock-frequency property") Cc: Srinath Mannam Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517174912.26419-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 05f0a994cd27bac4f49c9c4f961922f91a582295 Author: Andy Shevchenko Date: Mon May 17 20:44:56 2021 +0300 watchdog: sp805: Use devm_clk_get_optional() Replace open coded variants of devm_clk_get_optional(). While at it, drop unneeded OF and ACPI dependency as the APIs in use are provider agnostic. Cc: Srinath Mannam Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck Reviewed-by: Srinath Mannam Link: https://lore.kernel.org/r/20210517174456.22050-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 742b80c56135971e35e6753c7400d7d6ee842a90 Author: Jerry Hoemann Date: Wed May 12 22:03:32 2021 -0600 watchdog/hpwdt: New PCI IDs New hardware with new PCI ID info. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1620878612-24736-2-git-send-email-jerry.hoemann@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5185c4e8a8cc584382c6dd08dcd4f59e1e90638d Author: Jiapeng Chong Date: Thu May 13 19:09:42 2021 +0800 watchdog: dw_wdt: Fix duplicate included linux/kernel.h Clean up the following includecheck warning: ./drivers/watchdog/dw_wdt.c: linux/kernel.h is included more than once. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1620904182-74107-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c08a6b31e4917034f0ed0cb457c3bb209576f542 Author: Zou Wei Date: Tue May 11 15:01:35 2021 +0800 watchdog: Fix possible use-after-free in wdt_startup() This module's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1620716495-108352-1-git-send-email-zou_wei@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e0b101ab01c719a5a81b21ff16bbd33a868f9189 Author: Robin Gong Date: Sat May 15 01:21:15 2021 +0800 watchdog: imx2_wdt: avoid to ping before resume back Since watchdog_ping_work is not freezable so that it maybe scheduled before imx2_wdt_resume where watchdog clock enabled, hence, kernel will hang in imx2_wdt_ping without clock, and then watchdog reset happen. Add clk_is_on to prevent the above case by ignoring ping until watchdog driver resume back indeed. Signed-off-by: Robin Gong Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1621012875-22667-1-git-send-email-yibin.gong@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 76215889be9d2cd388207545424bbbe3bf80e1ea Author: Randy Dunlap Date: Sun May 16 14:17:03 2021 -0700 watchdog: mtx-1: drop au1000.h header file The mtx-1_wdt driver does not need the au1000.h header file. Instead, the header file causes build errors, so drop it. This change fixes multiple build errors, all in au1000.h. E.g.: In file included from ../drivers/watchdog/mtx-1_wdt.c:44: ../arch/mips/include/asm/mach-au1x00/au1000.h: In function 'alchemy_rdsys': ../arch/mips/include/asm/mach-au1x00/au1000.h:603:36: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Werror=implicit-function-declaration] 603 | void __iomem *b = (void __iomem *)KSEG1ADDR(AU1000_SYS_PHYS_ADDR); ../arch/mips/include/asm/mach-au1x00/au1000.h:603:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 603 | void __iomem *b = (void __iomem *)KSEG1ADDR(AU1000_SYS_PHYS_ADDR); Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible") Signed-off-by: Randy Dunlap Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: Florian Fainelli Reviewed-by: Guenter Roeck Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210516211703.25349-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit abd3ac7902fb77f8386f485f7284253fc0c4d803 Author: Shaokun Zhang Date: Mon May 17 20:10:08 2021 +0800 watchdog: sbsa: Support architecture version 1 For Armv8.6, The frequency of CNTFRQ_EL0 is standardized to a frequency of 1GHz, so Arm Base System Architecture 1.0[1] has introduced watchdog revision 1 that increases the length the watchdog offset register to 48 bit, while other operation of the watchdog remains the same. The driver can determine which version of the watchdog is implemented through the watchdog interface identification register (W_IID). If the version is 0x1, the watchdog offset register will be 48 bit, otherwise it will be 32 bit. [1] https://developer.arm.com/documentation/den0094/latest Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Suravee Suthikulpanit Cc: Al Stone Cc: Jianchao Hu Cc: Huiqiang Wang Signed-off-by: Shaokun Zhang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1621253408-23401-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d1fb8bbd769f11e406955ee1a81413d8d78b957b Author: Shruthi Sanil Date: Mon May 17 23:19:53 2021 +0530 watchdog: keembay: Typo corrections and other blank operations Corrected typos, aligned the tabs and added new lines wherever required for better readability Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-10-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 613c4db220260304c9da4a865e5c4735414a11b4 Author: Shruthi Sanil Date: Mon May 17 23:19:52 2021 +0530 watchdog: keembay: WDT SMC handler MACRO name update Updated the WDT SMC handler MACRO name to make it clear that its a ARM SMC handler that helps in clearing the WDT interrupt bit. Reviewed-by: Guenter Roeck Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-9-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3168be5d66ac6c3508a880022f79b5a887865d5d Author: Shruthi Sanil Date: Mon May 17 23:19:50 2021 +0530 watchdog: keembay: Removed timeout update in the TO ISR In the TO ISR removed updating the Timeout value because its not serving any purpose as the timer would have already expired and the system would be rebooting. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-7-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 624873f1e7f8aa9f19333546aff3777ee10c8934 Author: Shruthi Sanil Date: Mon May 17 23:19:51 2021 +0530 watchdog: keembay: MACRO for WDT enable and disable values Introduced MACRO's for WDT enable and disable values for better readability Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-8-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9eb25269271c679e8cfcc7df5c0c5e9d0572fc27 Author: Shruthi Sanil Date: Mon May 17 23:19:49 2021 +0530 watchdog: keembay: Remove timeout update in the WDT start function Removed set timeout from the start WDT function. There is a function defined to set the timeout. Hence no need to set the timeout again in start function as the timeout would have been already updated before calling the start/enable. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-6-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0e36a09faea25f4564d41a0c28938199b605148e Author: Shruthi Sanil Date: Mon May 17 23:19:48 2021 +0530 watchdog: keembay: Clear either the TO or TH interrupt bit During the interrupt service routine of the TimeOut interrupt and the ThresHold interrupt, the respective interrupt clear bit have to be cleared and not both. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-5-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 75f6c56dfeec92c53e09a72896547888ac9a27d7 Author: Shruthi Sanil Date: Mon May 17 23:19:47 2021 +0530 watchdog: keembay: Update pretimeout to zero in the TH ISR The pretimeout has to be updated to zero during the ISR of the ThresHold interrupt. Else the TH interrupt would be triggerred for every tick until the timeout. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-4-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0f7bfaf10c0abc979220442bae2af4f1f869c41e Author: Shruthi Sanil Date: Mon May 17 23:19:46 2021 +0530 watchdog: keembay: Upadate WDT pretimeout for every update in timeout The pre-timeout value to be programmed to the register has to be calculated and updated for every change in the timeout value. Else the threshold time wouldn't be calculated to its corresponding timeout. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-3-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 29353816300c79cb5157ed2719cc71285c7b77aa Author: Shruthi Sanil Date: Mon May 17 23:19:45 2021 +0530 watchdog: keembay: Update WDT pre-timeout during the initialization The pretimeout register has a default reset value. Hence when a smaller WDT timeout is set which would be lesser than the default pretimeout, the system behaves abnormally, starts triggering the pretimeout interrupt even when the WDT is not enabled, most of the times leading to system crash. Hence an update in the pre-timeout is also required for the default timeout that is being configured. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil Link: https://lore.kernel.org/r/20210517174953.19404-2-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6c0a2078134aba6a77291554035304df9e16b85c Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:52 2021 +0930 ALSA: usb-audio: scarlett2: Remove hard-coded USB #defines Remove the hard-coded interface number and related constants for the vendor-specific interface and look them up from the USB endpoint descriptor. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164652.GA9237@m.b4.vu Signed-off-by: Takashi Iwai commit 296726319289f0d5ff9b6d1cc039fbab4d413b98 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:48 2021 +0930 ALSA: usb-audio: scarlett2: Don't copy struct scarlett2_config scarlett2_usb_set_config() and scarlett2_usb_get_config() were copying struct scarlett2_config. Use a pointer instead. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164648.GA9231@m.b4.vu Signed-off-by: Takashi Iwai commit 64c02a9d3f9c8ca167c216acb86da02c1b7299b9 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:47 2021 +0930 ALSA: usb-audio: scarlett2: Fix union usage in mixer control callbacks Fix mixer control callbacks to use the correct members of the struct snd_ctl_elem_value. The use of value.integer and value.enumerated were swapped in a few places. Update scarlett2_mux_src_enum_ctl_put() to use min() instead of clamp() as value.enumerated.item is unsigned. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164647.GA9226@m.b4.vu Signed-off-by: Takashi Iwai commit c5d8e008032f3cd5f266d552732973a960b0bd4b Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:45 2021 +0930 ALSA: usb-audio: scarlett2: Fix scarlett2_*_ctl_put() return values Mixer control put callbacks should return 1 if the value is changed. Fix the sw_hw, level, pad, and button controls accordingly. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164645.GA9221@m.b4.vu Signed-off-by: Takashi Iwai commit 9b5ddea9ce5a68d7d2bedcb69901ac2a86c96c7b Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:43 2021 +0930 ALSA: usb-audio: scarlett2: Fix data_mutex lock The private->vol_updated flag was being checked outside of the mutex_lock/unlock() of private->data_mutex leading to the volume data being fetched twice from the device unnecessarily or old volume data being returned. Update scarlett2_*_ctl_get() and include the private->vol_updated flag check inside the critical region. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164643.GA9216@m.b4.vu Signed-off-by: Takashi Iwai commit 3eeb2a19dba65fe63dd755e3209831312e0ad9ed Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:41 2021 +0930 ALSA: usb-audio: scarlett2: Add temp variable for consistency Add index temporary variable to scarlett2_mixer_ctl_put() for consistency with the other *_ctl_put() functions. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164641.GA9211@m.b4.vu Signed-off-by: Takashi Iwai commit e46f2195c86b008b678364e33c3efda7d533de18 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:39 2021 +0930 ALSA: usb-audio: scarlett2: Rename struct scarlett2_mixer_data Rename struct scarlett2_mixer_data to struct scarlett2_data. A less-wordy name is better because it is used everywhere, and although this is a mixer driver, it also controls other vendor-specific features. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164639.GA9206@m.b4.vu Signed-off-by: Takashi Iwai commit dbd82c0550633c19f08e26f9b5c36e20459da8b8 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:36 2021 +0930 ALSA: usb-audio: scarlett2: Rename buttons/interrupts/vol To match the vendor's terminology, change #defines, identifiers, and comments: - mute/dim/hardware buttons are now called dim/mute - mixer status/interrupt is now notify - vol is now monitor Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164636.GA9199@m.b4.vu Signed-off-by: Takashi Iwai commit 03bdbcf08a8cb7ba69a67115d33a85e6bc6e7481 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:34 2021 +0930 ALSA: usb-audio: scarlett2: Remove redundant info->button_count The per-model button_count value was used to determine whether dim/mute controls should be added, but these are present iff line_out_hw_vol is true. Remove button_count and replace with SCARLETT2_BUTTON_MAX and a check for line_out_hw_vol true. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164634.GA9193@m.b4.vu Signed-off-by: Takashi Iwai commit 411b22ed67c9ee11680a3fae96c7fd6477814274 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:32 2021 +0930 ALSA: usb-audio: scarlett2: Remove interrupt debug message Just ignore instead of printing an error if the interrupt data is not the expected length. This check was for development and the condition has not been observed. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164632.GA9186@m.b4.vu Signed-off-by: Takashi Iwai commit b677b6c6d8224888483042e54d083c0926bfefc7 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:30 2021 +0930 ALSA: usb-audio: scarlett2: Remove unused/useless code Remove #define not used. Remove useless assignments and copies. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164630.GA9180@m.b4.vu Signed-off-by: Takashi Iwai commit 06a21621795870c73acdeb64198f103b9a38053d Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:28 2021 +0930 ALSA: usb-audio: scarlett2: Coding style improvements Improve alignment and readability with: - Whitespace fixes - Add leading zeros to 32-bit flag values - Rename SCARLETT2_USB_GET_METER_LEVELS to SCARLETT2_USB_GET_METER - Rename SCARLETT2_PORT_DIRECTIONS to SCARLETT2_PORT_DIRNS Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164628.GA9172@m.b4.vu Signed-off-by: Takashi Iwai commit c5210f213456383482b4a77c5310282a89a106b5 Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:25 2021 +0930 ALSA: usb-audio: scarlett2: Fix 18i8 Gen 2 PCM Input count The 18i8 Gen 2 has 8 PCM Inputs, not 20. Fix the ports entry in s18i8_gen2_info. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164625.GA9165@m.b4.vu Signed-off-by: Takashi Iwai commit 2975c588dfa29fe3ba17434d5f4a3afa5e5d8f3b Author: Geoffrey D. Bennett Date: Mon Jun 21 02:16:22 2021 +0930 ALSA: usb-audio: scarlett2: Remove incorrect S/PDIF comment The 18i8 Gen 2 S/PDIF outputs are available at 192kHz, unlike the 18i20 Gen 2. Remove the comment that says otherwise. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210620164622.GA9155@m.b4.vu Signed-off-by: Takashi Iwai commit f7eedcb8539ddcbb6fe7791f1b4ccf43f905c72f Author: Christophe JAILLET Date: Sat Jun 5 15:17:43 2021 +0200 phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe() Add an error handling path in the probe to release some resources, as already done in the remove function. Fixes: 609adde838f4 ("phy: Add a driver for dm816x USB PHY") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ac5136881f6bdec50be19b3bf73b3bc1b15ef1f1.1622898974.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 3c3ee16532c1be92350a2a88bd19283b7bdf32e9 Author: Chaitanya Kulkarni Date: Sun Jun 20 20:01:09 2021 -0700 nvmet: use NVMET_MAX_NAMESPACES to set nn value For Spec regarding MNAN value:- If the controller supports Asymmetric Namespace Access Reporting, then this field shall be set to a non-zero value that is less than or equal to the NN value. Instead of using subsys->max_nsid that gets calculated dynamically, use NVMET_MAX_NAMESPACES value to report NN. This way we will maintain the MNAN value spec compliant with NN. Without this patch, code results in the following error :- [337976.409142] nvme nvme1: Invalid MNAN value 1024 Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 4a90bbb478dbf18ecdec9dcf8eb708e319d24264 Author: Kunihiko Hayashi Date: Mon Jun 7 12:50:42 2021 +0900 phy: uniphier-pcie: Fix updating phy parameters The current driver uses a value from register TEST_O as the original value for register TEST_I, though, the value is overwritten by "param", so there is a bug that the original value isn't no longer used. The value of TEST_O[7:0] should be masked with "mask", replaced with "param", and placed in the bitfield TESTI_DAT_MASK as new TEST_I value. Fixes: c6d9b1324159 ("phy: socionext: add PCIe PHY driver support") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1623037842-19363-1-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Vinod Koul commit c17e5c85b32f8809135f3211ba2525fb98b5c09f Author: Colin Ian King Date: Fri Jun 18 10:33:31 2021 +0100 mtd: spi-nor: remove redundant continue statement The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Signed-off-by: Vignesh Raghavendra Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav commit bd1f775d6027810d366600e2490a2ff247e3466e Author: Heiko Stuebner Date: Thu Jun 10 23:29:35 2021 +0200 phy/rockchip: add Innosilicon-based CSI dphy The CSI dphy found for example on the rk3326/px30 and rk3368 is based on an IP design from Innosilicon. Add a driver for it. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210610212935.3520341-3-heiko@sntech.de Signed-off-by: Vinod Koul commit ba66207eb01f4b581ce984756f7cd4fbbf4780c3 Author: Heiko Stuebner Date: Thu Jun 10 23:29:34 2021 +0200 dt-bindings: phy: add yaml binding for rockchip-inno-csi-dphy Some Rockchip SoCs like the rk3368, rk3326, px30 use a CSI dphy based on an Innosilicon IP. Add a binding for them. Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610212935.3520341-2-heiko@sntech.de Signed-off-by: Vinod Koul commit de82b841833b584fd799947e60bd5eccd8846baa Author: Colin Ian King Date: Wed Jun 9 12:39:01 2021 +0100 phy: rockchip: remove redundant initialization of pointer cfg The pointer cfg is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210609113901.185230-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit e0ae8a9aaeed7262f349e025b2162e8a13cb58d9 Author: Steve French Date: Sat Jun 19 16:19:09 2021 -0500 smb311: remove dead code for non compounded posix query info Although we may need this in some cases in the future, remove the currently unused, non-compounded version of POSIX query info, SMB11_posix_query_info (instead smb311_posix_query_path_info is now called e.g. when revalidating dentries or retrieving info for getattr) Addresses-Coverity: 1495708 ("Resource leaks") Signed-off-by: Steve French commit e39df24169a2ceb0d359eb3a05ff982711f2eb32 Author: Steve French Date: Sat Jun 19 15:53:18 2021 -0500 cifs: fix SMB1 error path in cifs_get_file_info_unix We were trying to fill in uninitialized file attributes in the error case. Addresses-Coverity: 139689 ("Uninitialized variables") Signed-off-by: Steve French commit ff93b71a3eff25fe9d4364ef13b6e01d935600c6 Author: Steve French Date: Sat Jun 19 12:22:20 2021 -0500 smb3: fix uninitialized value for port in witness protocol move Although in practice this can not occur (since IPv4 and IPv6 are the only two cases currently supported), it is cleaner to avoid uninitialized variable warnings. Addresses smatch warning: fs/cifs/cifs_swn.c:468 cifs_swn_store_swn_addr() error: uninitialized symbol 'port'. Reported-by: kernel test robot Reported-by: Dan Carpenter CC: Samuel Cabrero Signed-off-by: Steve French commit 3559134eccad022fc4a5a56910e8f7d38ab0d30d Author: Steve French Date: Sat Jun 19 12:01:37 2021 -0500 cifs: fix unneeded null check tcon can not be null in SMB2_tcon function so the check is not relevant and removing it makes Coverity happy. Acked-by: Ronnie Sahlberg Addresses-Coverity: 13250131 ("Dereference before null check") Signed-off-by: Steve French commit 929be906fa83151c4c77c07cd3d780439d38b153 Author: Steve French Date: Fri Jun 18 00:31:49 2021 -0500 cifs: use SPDX-Licence-Identifier Add SPDX license identifier and replace license boilerplate. Corrects various checkpatch errors with the older format for noting the LGPL license. Signed-off-by: Steve French commit a506ccb47c9e93fde843532670a7805452bf699b Author: Baokun Li Date: Thu Jun 17 19:36:40 2021 +0800 cifs: convert list_for_each to entry variant in cifs_debug.c convert list_for_each() to list_for_each_entry() where applicable. Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Steve French commit 647f592734a033b7f23865190de5df05e50381d0 Author: Baokun Li Date: Fri Jun 18 12:02:32 2021 +0800 cifs: convert list_for_each to entry variant in smb2misc.c convert list_for_each() to list_for_each_entry() where applicable. Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Steve French commit ca38fabc31ecf8a2cd14ff92a68936db59106409 Author: Ronnie Sahlberg Date: Fri Jun 18 10:58:30 2021 +1000 cifs: avoid extra calls in posix_info_parse In posix_info_parse() we call posix_info_sid_size twice for each of the owner and the group sid. The first time to check that it is valid, i.e. >= 0 and the second time to just pass it in as a length to memcpy(). As this is a pure function we know that it can not be negative the second time and this is technically a false warning in coverity. However, as it is a pure function we are just wasting cycles by calling it a second time. Record the length from the first time we call it and save some cycles as well as make Coverity happy. Addresses-Coverity-ID: 1491379 ("Argument can not be negative") Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 6efa994e35a402ae4ae2161b6439c94b64816cee Author: Thiago Rafael Becker Date: Tue Jun 15 13:42:56 2021 -0300 cifs: retry lookup and readdir when EAGAIN is returned. According to the investigation performed by Jacob Shivers at Red Hat, cifs_lookup and cifs_readdir leak EAGAIN when the user session is deleted on the server. Fix this issue by implementing a retry with limits, as is implemented in cifs_revalidate_dentry_attr. Reproducer based on the work by Jacob Shivers: ~~~ $ cat readdir-cifs-test.sh #!/bin/bash # Install and configure powershell and sshd on the windows # server as descibed in # https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview # This script uses expect(1) USER=dude SERVER=192.168.0.2 RPATH=root PASS='password' function debug_funcs { for line in $@ ; do echo "func $line +p" > /sys/kernel/debug/dynamic_debug/control done } function setup { echo 1 > /proc/fs/cifs/cifsFYI debug_funcs wait_for_compound_request \ smb2_query_dir_first cifs_readdir \ compound_send_recv cifs_reconnect_tcon \ generic_ip_connect cifs_reconnect \ smb2_reconnect_server smb2_reconnect \ cifs_readv_from_socket cifs_readv_receive tcpdump -i eth0 -w cifs.pcap host 192.168.2.182 & sleep 5 dmesg -C } function test_call { if [[ $1 == 1 ]] ; then tracer="strace -tt -f -s 4096 -o trace-$(date -Iseconds).txt" fi # Change the command here to anything appropriate $tracer ls $2 > /dev/null res=$? if [[ $1 == 1 ]] ; then if [[ $res == 0 ]] ; then 1>&2 echo success else 1>&2 echo "failure ($res)" fi fi } mountpoint /mnt > /dev/null || mount -t cifs -o username=$USER,pass=$PASS //$SERVER/$RPATH /mnt test_call 0 /mnt/ /usr/bin/expect << EOF set timeout 60 spawn ssh $USER@$SERVER expect "yes/no" { send "yes\r" expect "*?assword" { send "$PASS\r" } } "*?assword" { send "$PASS\r" } expect ">" { send "powershell close-smbsession -force\r" } expect ">" { send "exit\r" } expect eof EOF sysctl -w vm.drop_caches=2 > /dev/null sysctl -w vm.drop_caches=2 > /dev/null setup test_call 1 /mnt/ ~~~ Signed-off-by: Thiago Rafael Becker Acked-by: Ronnie Sahlberg Signed-off-by: Steve French commit 889c2a700799f3b6f82210925e1faf4a9b833c4a Author: Paulo Alcantara Date: Mon Jun 14 12:58:20 2021 -0300 cifs: fix check of dfs interlinks Interlink is a special type of DFS link that resolves to a different DFS domain-based namespace. To determine whether it is an interlink or not, check if ReferralServers and StorageServers bits are set to 1 and 0 respectively in ReferralHeaderFlags, as specified in MS-DFSC 3.1.5.4.5 Determining Whether a Referral Response is an Interlink. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 0475c3655e6ebd1d6d6f0e705eba97fce39a08e3 Author: Hyunchul Lee Date: Tue Jun 8 23:53:14 2021 +0900 cifs: decoding negTokenInit with generic ASN1 decoder Decode negTokenInit with lib/asn1_decoder. For that, add OIDs in linux/oid_registry.h and a negTokenInit ASN1 file, "spnego_negtokeninit.asn1". And define decoder's callback functions, which are the gssapi_this_mech for checking SPENGO oid and the neg_token_init_mech_type for getting authentication mechanisms supported by a server. Signed-off-by: Hyunchul Lee Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 1023e90b733acd1da98ba7067aa0fa8b998eed19 Author: Paulo Alcantara Date: Tue Jun 8 13:50:06 2021 -0300 cifs: avoid starvation when refreshing dfs cache When refreshing the DFS cache, keep SMB2 IOCTL calls as much outside critical sections as possible and avoid read/write starvation when getting new DFS referrals by using broken or slow connections. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 0d52df81e07739db25afe72e10dcc623b271d905 Author: Steve French Date: Tue Jun 8 16:43:41 2021 -0500 cifs: enable extended stats by default CONFIG_CIFS_STATS2 can be very useful since it shows latencies by command, and allows enabling the slow response dynamic tracepoint which can be useful to identify performance problems. For example: Total time spent processing by command. Time units are jiffies (1000 per second) SMB3 CMD Number Total Time Fastest Slowest -------- ------ ---------- ------- ------- 0 1 2 2 2 1 2 6 2 4 2 0 0 0 0 3 4 11 2 4 4 2 16 5 11 5 4546 34104 2 487 6 4421 32901 2 487 7 0 0 0 0 8 695 2781 2 39 9 391 1708 2 27 10 0 0 0 0 11 4 6 1 2 12 0 0 0 0 13 0 0 0 0 14 3887 17696 0 128 15 0 0 0 0 16 1471 9950 1 487 17 169 2695 9 116 18 80 381 2 10 1 2 6 2 4 2 0 0 0 0 3 4 11 2 4 4 2 16 5 11 5 4546 34104 2 487 6 4421 32901 2 487 7 0 0 0 0 8 695 2781 2 39 9 391 1708 2 27 10 0 0 0 0 11 4 6 1 2 12 0 0 0 0 13 0 0 0 0 14 3887 17696 0 128 15 0 0 0 0 16 1471 9950 1 487 17 169 2695 9 116 18 80 381 2 10 Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit e695a9ad0305af6e8b0cbc24a54976ac2120cbb3 Author: Shyam Prasad N Date: Sun May 23 16:54:42 2021 +0000 cifs: missed ref-counting smb session in find When we lookup an smb session based on session id, we did not up the ref-count for the session. This can potentially cause issues if the session is freed from under us. Signed-off-by: Shyam Prasad N Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit f3c852b0b0fc0e4ecabbf2e8480c2a088d54b588 Author: Paulo Alcantara Date: Fri Jun 4 19:25:33 2021 -0300 cifs: do not share tcp servers with dfs mounts It isn't enough to have unshared tcons because multiple DFS mounts can connect to same target server and failover to different servers, so we can't use a single tcp server for such cases. For the simplest solution, use nosharesock option to achieve that. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c950fc7af9a7c20b60d7c1ffe5fd4d982ec8cd6c Author: Paulo Alcantara Date: Fri Jun 4 19:25:32 2021 -0300 cifs: set a minimum of 2 minutes for refreshing dfs cache We don't want to refresh the dfs cache in very short intervals, so setting a minimum interval of 2 minutes is OK. If it needs to be refreshed immediately, one could have the cache cleared with $ echo 0 > /proc/fs/cifs/dfscache and then remounting the dfs share. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 42caeba713b12ee0dfc085f6fb2f7cde2a64f91a Author: Paulo Alcantara Date: Fri Jun 4 19:25:31 2021 -0300 cifs: fix path comparison and hash calc Fix cache lookup and hash calculations when handling paths with different cases. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c870a8e70e682764dfca6771d3ee5d632babb3e5 Author: Paulo Alcantara Date: Fri Jun 4 19:25:30 2021 -0300 cifs: handle different charsets in dfs cache Convert all dfs paths to dfs cache's local codepage (@cache_cp) and avoid mixing them with different charsets. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c9f7110399059100e69dba08a58658890be75f6f Author: Paulo Alcantara Date: Fri Jun 4 19:25:29 2021 -0300 cifs: keep referral server sessions alive At every mount, keep all sessions alive that were used for chasing the DFS referrals as long as the dfs mounts are active. Use those sessions in DFS cache to refresh all active tcons as well as cached entries. They will be managed by a list of mount_group structures that will be indexed by a randomly generated uuid at mount time, so we can put all the sessions related to specific dfs mounts and avoid leaking them. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 2b133b7e216b9dae42fe504c7aa090363d96745a Author: Paulo Alcantara Date: Fri Jun 4 19:25:28 2021 -0300 cifs: get rid of @noreq param in __dfs_cache_find() @noreq param isn't used anywhere, so just remove it. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit f3191fc8004d6d200d850395bbad8dab8f367945 Author: Paulo Alcantara Date: Fri Jun 4 19:25:27 2021 -0300 cifs: do not send tree disconnect to ipc shares On session close, the IPC is closed and the server must release all tcons of the session. It doesn't matter if we send a ipc close or not. Besides, it will make the server to not close durable and resilient files on session close, as specified in MS-SMB2 3.3.5.6 Receiving an SMB2 LOGOFF Request. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 966a3cb7c7db786452a87afdc3b48858fc4d4d6b Author: Ronnie Sahlberg Date: Thu Jun 3 15:31:01 2021 +1000 cifs: improve fallocate emulation RHBZ: 1866684 We don't have a real fallocate in the SMB2 protocol so we used to emulate fallocate by simply switching the file to become non-sparse. But as that could potantially consume a lot more data than we intended to fallocate (large sparse file and fallocating a thin slice in the middle) we would only do this IFF the fallocate request was for virtually the entire file. This patch improves this and starts allowing us to fallocate smaller chunks of a file by overwriting the region with 0, for the parts that are unallocated. The method used is to first query the server for FSCTL_QUERY_ALLOCATED_RANGES to find what is unallocated in the fallocate range and then to only overwrite-with-zero the unallocated ranges to fill in the holes. As overwriting-with-zero is different from just allocating blocks, and potentially much more expensive, we limit this to only allow fallocate ranges up to 1Mb in size. Reported-by: kernel test robot Signed-off-by: Ronnie Sahlberg Acked-by: Aurelien Aptel Acked-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit aaf36df3eddde763e6fe2b082db101820f2d2a90 Author: Baokun Li Date: Thu Jun 10 19:48:17 2021 +0800 cifs: fix doc warnings in cifs_dfs_ref.c Add description for `cifs_compose_mount_options` to fix the W=1 warnings: fs/cifs/cifs_dfs_ref.c:139: warning: Function parameter or member 'devname' not described in 'cifs_compose_mount_options' Signed-off-by: Baokun Li Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 032e091d3e3b260f3f85d8bd781d99690589085c Author: Colin Ian King Date: Sun Jun 13 15:01:23 2021 +0100 cifs: remove redundant initialization of variable rc The variable rc is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 57c8ce7ab3fc2ac894d4a0f26776fbd7a5fd48bc Author: Rikard Falkeborn Date: Wed May 26 22:35:45 2021 +0200 cifs: Constify static struct genl_ops The only usage of cifs_genl_ops[] is to assign its address to the ops field in the genl_family struct, which is a pointer to const. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit a23a71abca941fdbac32e504c6d78cf99c6df70f Author: YueHaibing Date: Sat May 29 19:48:48 2021 +0800 cifs: Remove unused inline function is_sysvol_or_netlogon() is_sysvol_or_netlogon() is never used, so can remove it. Signed-off-by: YueHaibing Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit f2756527d37563b98d18fe9f1fa56ada2e79f7cf Author: Steve French Date: Sat Jun 5 15:33:00 2021 -0500 cifs: remove duplicated prototype smb2_find_smb_ses was defined twice in smb2proto.h Signed-off-by: Steve French commit 5e538959f019f9d356ba5b16deba25ef4da892ca Author: Aurelien Aptel Date: Fri May 28 16:32:48 2021 +0200 cifs: fix ipv6 formating in cifs_ses_add_channel Use %pI6 for IPv6 addresses Signed-off-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3f605ee17f8e785ba6ff69bee8e584e377a3cf28 Author: Greg Ungerer Date: Tue Apr 27 23:49:31 2021 +1000 m68knommu: fix missing LCD splash screen data initializer The kernel test robot reports that the "screen_bits" splash screen data is missing for the dragen platform: arch/m68k/68000/dragen2.c:73:16: error: 'screen_bits' undeclared (first use in this function) 73 | LSSA = (long) screen_bits; | ^~~~~~~~~~~ arch/m68k/68000/dragen2.c:73:16: note: each undeclared identifier is reported only once for each function it appears in Digging around a bit I found the screen_bits data structure was originally in a screen.h file that was generated from a screen.xbm file. That was removed in commit 0c0e6db80683 ("m68k: drop unused parts of 68VZ328 Makefile"). Other splash screen initializers for 68000 targets are kept here as the C data structures so lets do the same for this one. Add the missing screen.h file and include it in the dragen specific startup code. Reported-by: kernel test robot Signed-off-by: Greg Ungerer Acked-by: Arnd Bergmann commit 77bbbc0cf84834ed130838f7ac1988567f4d0288 Author: Suraj Jitindar Singh Date: Wed Jun 2 14:04:41 2021 +1000 KVM: PPC: Book3S HV: Fix TLB management on SMT8 POWER9 and POWER10 processors The POWER9 vCPU TLB management code assumes all threads in a core share a TLB, and that TLBIEL execued by one thread will invalidate TLBs for all threads. This is not the case for SMT8 capable POWER9 and POWER10 (big core) processors, where the TLB is split between groups of threads. This results in TLB multi-hits, random data corruption, etc. Fix this by introducing cpu_first_tlb_thread_sibling etc., to determine which siblings share TLBs, and use that in the guest TLB flushing code. [npiggin@gmail.com: add changelog and comment] Signed-off-by: Paul Mackerras Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210602040441.3984352-1-npiggin@gmail.com commit 7d815f4afa87f2032b650ae1bba7534b550a6b8b Author: Haiyang Zhang Date: Tue May 25 16:17:33 2021 -0700 PCI: hv: Add check for hyperv_initialized in init_hv_pci_drv() Add check for hv_is_hyperv_initialized() at the top of init_hv_pci_drv(), so if the pci-hyperv driver is force-loaded on non Hyper-V platforms, the init_hv_pci_drv() will exit immediately, without any side effects, like assignments to hvpci_block_ops, etc. Signed-off-by: Haiyang Zhang Reported-and-tested-by: Mohammad Alqayeem Reviewed-by: Wei Liu Link: https://lore.kernel.org/r/1621984653-1210-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Wei Liu commit 94af1e732abe6e83fb146fc89d6f520e6a939c6a Author: Fabio Estevam Date: Thu Jun 3 11:34:47 2021 -0300 rtc: pcf8563: Fix the datasheet URL The current datasheet URL is no longer valid. Replace with a valid one. Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210603143447.2223353-3-festevam@gmail.com commit 663bff1753a88195328fa7dc97cb96c9916343ed Author: Fabio Estevam Date: Thu Jun 3 11:34:46 2021 -0300 rtc: pcf85063: Fix the datasheet URL The current datasheet URL is no longer valid. Replace with a valid one. Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210603143447.2223353-2-festevam@gmail.com commit 836e9ea3ccc263d17fdeb90f28089ff1d945500d Author: Fabio Estevam Date: Thu Jun 3 11:34:45 2021 -0300 rtc: pcf2127: Fix the datasheet URL The current datasheet URL is no longer valid. Replace with a valid one. Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210603143447.2223353-1-festevam@gmail.com commit 4aa908fe4704ef9c09a6b2c19b4b49855a3d6055 Author: Geert Uytterhoeven Date: Tue Jun 1 17:25:44 2021 +0200 dt-bindings: i2c: ce4100: Replace "ti,pcf8575" by "nxp,pcf8575" The TI part is equivalent to the NXP part, and its compatible value is not documented in the DT bindings. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 0a9ece9ba154dd6205709108180952c55e630833 Author: Randy Dunlap Date: Sat Jun 19 09:02:03 2021 -0700 EDAC/igen6: fix core dependency igen6_edac needs mce_register()/unregister() functions, so it should depend on X86_MCE (or X86_MCE_INTEL). That change prevents these build errors: ld: drivers/edac/igen6_edac.o: in function `igen6_remove': igen6_edac.c:(.text+0x494): undefined reference to `mce_unregister_decode_chain' ld: drivers/edac/igen6_edac.o: in function `igen6_probe': igen6_edac.c:(.text+0xf5b): undefined reference to `mce_register_decode_chain' Fixes: 10590a9d4f23e ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210619160203.2026-1-rdunlap@infradead.org commit c601610cd73d4cfc2dcbae185c134deb7c4c52cc Author: Heiner Kallweit Date: Tue May 25 22:07:17 2021 +0200 i2c: i801: Improve i801_setup_hstcfg i801_setup_hstcfg() leaves the bits in priv->original_hstcfg that we're interested in intact. Therefore we can remove the return value from the function and use priv->original_hstcfg directly. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit d4a994f69f0bed0ba49db12d7bae2c891dc4b51f Author: Heiner Kallweit Date: Tue May 25 22:04:23 2021 +0200 i2c: i801: Use driver name constant instead of function dev_driver_string We are the driver, so we can use the driver name directly instead of retrieving it by calling dev_driver_string(). Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit 8d83973e7a85b2fab168894ea327dfd4e6ef596e Author: Heiner Kallweit Date: Tue May 25 22:01:31 2021 +0200 i2c: i801: Simplify initialization of i2c_board_info in i801_probe_optional_slaves Why shall we bother to open-code something that the compiler can do for us. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 44c54c4ec391412c7f529e53d27844dadc6d536a Author: Heiner Kallweit Date: Tue May 25 21:59:05 2021 +0200 i2c: i801: Improve status polling Polling uses the same timeout as irq mode: 400 * 500us = 200ms = HZ / 5. So let's use the adapter->timeout value also for polling. This has the advantage that userspace can control the timeout value for polling as well. In addition change the code to make it better readable. Last but not least remove the timeout debug messages. Calls to both functions are followed by a call to i801_check_post() that will print an error message in case of timeout. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit e11654ec22a3e00975a499fcfdbf0407e2d41b60 Author: Andy Shevchenko Date: Wed Jun 9 20:30:35 2021 +0300 i2c: cht-wc: Replace of_node by NULL The driver is run on the platforms where OF node is always NULL. The confusion comes from IRQ domain APIs that take either OF or firmware node as input parameter. Since fwnode is not used here either, replace of_node by NULL. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Signed-off-by: Wolfram Sang commit 010e765b406f8e08685ea5b687c63a5ea234719a Author: Biju Das Date: Tue Jun 15 09:54:00 2021 +0100 i2c: riic: Add RZ/G2L support RZ/G2L i2c controller is compatible with RZ/A i2c controller. By default IP is in reset state, so need to perform release reset before accessing any register. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Philipp Zabel Signed-off-by: Wolfram Sang commit a431a0914f9276aa70b7075cb43b9cdc537eaf29 Author: Biju Das Date: Tue Jun 15 09:53:59 2021 +0100 dt-bindings: i2c: renesas,riic: Document RZ/G2L I2C controller Document RZ/G2L I2C controller bindings. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 4a7e7408688de048bffa5e0e00d246b5f854bcf7 Author: Geert Uytterhoeven Date: Wed Jun 16 15:51:43 2021 +0200 dt-bindings: rtc: ti,bq32k: Convert to json-schema Convert the TI BQ32000 I2C Serial Real-Time Clock Device Tree binding documentation to json-schema. Document missing properties. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/42d9c71b4ee1f120e0cdcf6b266547d29d1fb9a4.1623851377.git.geert+renesas@glider.be commit 632ce67773dace482a8c4fcbedd4c19154e38d37 Author: Geert Uytterhoeven Date: Fri Jun 18 13:04:11 2021 +0200 dt-bindings: i2c: renesas,iic: Convert to json-schema Convert the Renesas R-Mobile I2C Bus Interface (IIC) Device Tree binding documentation to json-schema. Document missing properties. R-Mobile A1 and SH-Mobile have multiple interrupts. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 7e124917809705f05e0c9f0f72a38102e6aa4eff Author: Marek Vasut Date: Thu Jun 10 17:00:44 2021 +0200 dt-bindings: rtc: rx8900: Convert to YAML schema Convert the Epson RX8900 DT bindings to YAML schema. Signed-off-by: Marek Vasut Cc: Alexandre Belloni Cc: Rob Herring Cc: kernel@dh-electronics.com Cc: linux-rtc@vger.kernel.org To: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210610150044.29792-1-marex@denx.de commit 5690951154f7bd084e5e3676021c5bbf2042797e Author: Geert Uytterhoeven Date: Fri Jun 18 13:04:07 2021 +0200 dt-bindings: i2c: renesas,iic: Always declare generic compatibility According to the Hardware User's Manual, automatic transmission for PMIC control (DVFS) is not available on the R-Car E3 and RZ/G2E SoC. Experiments showed this really means that support for automatic DVFS is not present, while the IIC automatic transmission feature itself is still available, albeit not super useful. Hence there is no longer a reason not to declare compatibility with the R-Car Gen3-specific and generic versions, and the corresponding paragraph can be dropped. Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit fc3c335226a92f69aa01061e66b60ace88475dd3 Author: Colin Ian King Date: Wed Jun 9 13:00:50 2021 +0100 rtc: v3020: remove redundant initialization of variable retval The variable retval is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210609120050.185746-1-colin.king@canonical.com commit 950ac33dbe6ff656a623d862022f0762ec061ba7 Author: Martin Fuzzey Date: Mon Jun 7 19:36:40 2021 +0200 rtc: stm32: Fix unbalanced clk_disable_unprepare() on probe error path The STM32MP1 RTC may have 2 clocks, the pclk and the rtc_ck. If clk_prepare_enable() fails for the second clock (rtc_ck) we must only call clk_disable_unprepare() for the first clock (pclk) but currently we call it on both leading to a WARN: [ 15.629568] WARNING: CPU: 0 PID: 146 at drivers/clk/clk.c:958 clk_core_disable+0xb0/0xc8 [ 15.637620] ck_rtc already disabled [ 15.663322] CPU: 0 PID: 146 Comm: systemd-udevd Not tainted 5.4.77-pknbsp-svn5759-atag-v5.4.77-204-gea4235203137-dirty #2413 [ 15.674510] Hardware name: STM32 (Device Tree Support) [ 15.679658] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 15.687371] [] (show_stack) from [] (dump_stack+0xc0/0xe0) [ 15.694574] [] (dump_stack) from [] (__warn+0xc8/0xf0) [ 15.701428] [] (__warn) from [] (warn_slowpath_fmt+0x60/0x94) [ 15.708894] [] (warn_slowpath_fmt) from [] (clk_core_disable+0xb0/0xc8) [ 15.717230] [] (clk_core_disable) from [] (clk_core_disable_lock+0x18/0x24) [ 15.725924] [] (clk_core_disable_lock) from [] (stm32_rtc_probe+0x124/0x5e4 [rtc_stm32]) [ 15.735739] [] (stm32_rtc_probe [rtc_stm32]) from [] (platform_drv_probe+0x48/0x98) [ 15.745095] [] (platform_drv_probe) from [] (really_probe+0x1f0/0x458) [ 15.753338] [] (really_probe) from [] (driver_probe_device+0x70/0x1c4) [ 15.761584] [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) [ 15.770439] [] (device_driver_attach) from [] (__driver_attach+0xcc/0x170) [ 15.779032] [] (__driver_attach) from [] (bus_for_each_dev+0x58/0x7c) [ 15.787191] [] (bus_for_each_dev) from [] (bus_add_driver+0xdc/0x1f8) [ 15.795352] [] (bus_add_driver) from [] (driver_register+0x7c/0x110) [ 15.803425] [] (driver_register) from [] (do_one_initcall+0x70/0x1b8) [ 15.811588] [] (do_one_initcall) from [] (do_init_module+0x58/0x1f8) [ 15.819660] [] (do_init_module) from [] (load_module+0x1e58/0x23c8) [ 15.827646] [] (load_module) from [] (sys_finit_module+0xa0/0xd4) [ 15.835459] [] (sys_finit_module) from [] (__sys_trace_return+0x0/0x20) Signed-off-by: Martin Fuzzey Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Cc: stable@vger.kernel.org Reviewed-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1623087421-19722-1-git-send-email-martin.fuzzey@flowbird.group commit e5e3352580702b3727637dd988cddfe6a5880fe9 Author: Matti Vaittinen Date: Thu May 27 13:58:19 2021 +0300 rtc: bd70528: Drop BD70528 support The only known BD70528 use-cases are such that the PMIC is controlled from separate MCU which is not running Linux. I am not aware of any Linux driver users. Furthermore, it seems there is no demand for this IC. Let's ease the maintenance burden and drop the driver. We can always add it back if there is sudden need for it. Signed-off-by: Matti Vaittinen Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210527105819.GA3111334@localhost.localdomain commit 742b0d7e15c333303daad4856de0764f4bc83601 Author: Krzysztof Kozlowski Date: Wed May 26 13:20:34 2021 -0400 rtc: max77686: Do not enforce (incorrect) 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 falling - but instead rely on Devicetree to configure it. The Maxim 77686 datasheet describes the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. The interrupt line is shared between PMIC and RTC driver, so using level sensitive interrupt is here especially important to avoid races. With an edge configuration in case if first PMIC signals interrupt followed shortly after by the RTC, the interrupt might not be yet cleared/acked thus the second one would not be noticed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210526172036.183223-6-krzysztof.kozlowski@canonical.com commit b958da7919e2c325ba8c6e34c947f745e5c66cef Author: Yang Yingliang Date: Mon May 17 19:06:41 2021 +0800 rtc: m41t80: correct kerneldoc function names Fix the following make W=1 kernel build warnings: drivers/rtc/rtc-m41t80.c:811: warning: expecting prototype for wdt_close(). Prototype was for wdt_release() instead drivers/rtc/rtc-m41t80.c:830: warning: expecting prototype for notify_sys(). Prototype was for wdt_notify_sys() instead Signed-off-by: Yang Yingliang Reviewed-by: Randy Dunlap Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210517110641.473386-1-yangyingliang@huawei.com commit a8fdbefd75f660b471112d7d0bf583adf78f5c34 Author: Yang Yingliang Date: Mon May 17 12:59:01 2021 +0800 rtc: sysfs: Correct kerneldoc function name hctosys_show() Fix the following make W=1 kernel build warning: drivers/rtc/sysfs.c:115: warning: expecting prototype for rtc_sysfs_show_hctosys(). Prototype was for hctosys_show() instead Signed-off-by: Yang Yingliang Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210517045901.3461800-1-yangyingliang@huawei.com commit 47661ee1821fc3a6b5ae07aac37410d6ccada976 Author: Thierry Reding Date: Fri Jun 18 13:18:46 2021 +0200 memory: tegra: Add compile-test stub for tegra_mc_probe_device() The tegra_mc_probe_device() symbol is only available when the TEGRA_MC Kconfig option is enabled. Provide a stub if that's not the case so that the driver can be compile-tested. Reported-by: kernel test robot Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210618111846.1286166-1-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 87ac3d002d567fac3527d6612865e81cfd783727 Author: Mimi Zohar Date: Thu May 13 18:36:04 2021 -0400 evm: output EVM digest calculation info Output the data used in calculating the EVM digest and the resulting digest as ascii hexadecimal strings. Suggested-by: Lakshmi Ramasubramanian (CONFIG_DYNAMIC_DEBUG) Reviewed-by: Lakshmi Ramasubramanian Reported-by: kernel test robot (Use %zu for size_t) Signed-off-by: Mimi Zohar commit 99cd49bb39516d1beb1c38ae629b15ccb923198c Author: Haren Myneni Date: Thu Jun 17 13:39:41 2021 -0700 crypto/nx: Register and unregister VAS interface on PowerVM The user space uses /dev/crypto/nx-gzip interface to setup VAS windows, create paste mapping and close windows. This patch adds changes to create/remove this interface with VAS register/unregister functions on PowerVM platform. Signed-off-by: Haren Myneni Acked-by: Herbert Xu Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/121ea1f4eb3004f3b8f4fe8abefaecc88b292efd.camel@linux.ibm.com commit 8c099490fd2bd3b012b3b6d0babbba3b90e69b55 Author: Haren Myneni Date: Thu Jun 17 13:39:08 2021 -0700 crypto/nx: Add sysfs interface to export NX capabilities Export NX-GZIP capabilities to usrespace in sysfs /sys/devices/vio/ibm,compression-v1/nx_gzip_caps directory. These are queried by userspace accelerator libraries to set minimum length heuristics and maximum limits on request sizes. NX-GZIP capabilities: min_compress_len /*Recommended minimum compress length in bytes*/ min_decompress_len /*Recommended minimum decompress length in bytes*/ req_max_processed_len /* Maximum number of bytes processed in one request */ NX will return RMA_Reject if the request buffer size is greater than req_max_processed_len. Signed-off-by: Haren Myneni Acked-by: Herbert Xu Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/510da86abbd904878d5f13d74aba72603c37d783.camel@linux.ibm.com commit b4ba22114c78de48fda3818f569f75e97d58c719 Author: Haren Myneni Date: Thu Jun 17 13:38:36 2021 -0700 crypto/nx: Get NX capabilities for GZIP coprocessor type The hypervisor provides different NX capabilities that it supports. These capabilities such as recommended minimum compression / decompression lengths and the maximum request buffer size in bytes are used to define the user space NX request. NX will reject the request if the buffer size is more than the maximum buffer size. Whereas compression / decompression lengths are recommended values for better performance. Changes to get NX overall capabilities which points to the specific features that the hypervisor supports. Then retrieve the capabilities for the specific feature (available only for NXGZIP). Signed-off-by: Haren Myneni Acked-by: Herbert Xu Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f2b6a1fb8b6112595a73d81c67a35af4e7f5d0a3.camel@linux.ibm.com commit 7da00b0e71334aa1e3d8db1cc1f40eb47cb1e188 Author: Haren Myneni Date: Thu Jun 17 13:37:42 2021 -0700 crypto/nx: Rename nx-842-pseries file name to nx-common-pseries Rename nx-842-pseries.c to nx-common-pseries.c to add code for new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni Acked-by: Herbert Xu Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1fcf672209a14ea8944bd3e49c8a7381c8f450f8.camel@linux.ibm.com commit 6d0aaf5e0de00491de136f387ebed55604cedebe Author: Haren Myneni Date: Thu Jun 17 13:37:06 2021 -0700 powerpc/pseries/vas: Setup IRQ and fault handling NX generates an interrupt when sees a fault on the user space buffer and the hypervisor forwards that interrupt to OS. Then the kernel handles the interrupt by issuing H_GET_NX_FAULT hcall to retrieve the fault CRB information. This patch also adds changes to setup and free IRQ per each window and also handles the fault by updating the CSB. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b8fc66dcb783d06a099a303e5cfc69087bb3357a.camel@linux.ibm.com commit b22f2d88e435cdada32581ca1f11b9806adf459a Author: Haren Myneni Date: Thu Jun 17 13:36:28 2021 -0700 powerpc/pseries/vas: Integrate API with open/close windows This patch adds VAS window allocatioa/close with the corresponding hcalls. Also changes to integrate with the existing user space VAS API and provide register/unregister functions to NX pseries driver. The driver register function is used to create the user space interface (/dev/crypto/nx-gzip) and unregister to remove this entry. The user space process opens this device node and makes an ioctl to allocate VAS window. The close interface is used to deallocate window. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e8d956bace3f182c4d2e66e343ff37cb0391d1fd.camel@linux.ibm.com commit ca77d48854177bb9749aef7329201f03b2382fbb Author: Haren Myneni Date: Thu Jun 17 13:35:54 2021 -0700 powerpc/pseries/vas: Implement getting capabilities from hypervisor The hypervisor provides VAS capabilities for GZIP default and QoS features. These capabilities gives information for the specific features such as total number of credits available in LPAR, maximum credits allowed per window, maximum credits allowed in LPAR, whether usermode copy/paste is supported, and etc. This patch adds the following: - Retrieve all features that are provided by hypervisor using H_QUERY_VAS_CAPABILITIES hcall with 0 as feature type. - Retrieve capabilities for the specific feature using the same hcall and the feature type (1 for QoS and 2 for default type). Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/177c88608cb88f7b87d1c546103f18cec6c056b4.camel@linux.ibm.com commit f33ecfde30ce6909fff41339285e0274bb403fb8 Author: Haren Myneni Date: Thu Jun 17 13:35:22 2021 -0700 powerpc/pseries/vas: Add hcall wrappers for VAS handling This patch adds the following hcall wrapper functions to allocate, modify and deallocate VAS windows, and retrieve VAS capabilities. H_ALLOCATE_VAS_WINDOW: Allocate VAS window H_DEALLOCATE_VAS_WINDOW: Close VAS window H_MODIFY_VAS_WINDOW: Setup window before using H_QUERY_VAS_CAPABILITIES: Get VAS capabilities Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/40fb02a4d56ca4e240b074a15029082055be5997.camel@linux.ibm.com commit 540761b7f51067d76b301c64abc50328ded89b1c Author: Haren Myneni Date: Thu Jun 17 13:34:43 2021 -0700 powerpc/vas: Define QoS credit flag to allocate window PowerVM introduces two different type of credits: Default and Quality of service (QoS). The total number of default credits available on each LPAR depends on CPU resources configured. But these credits can be shared or over-committed across LPARs in shared mode which can result in paste command failure (RMA_busy). To avoid NX HW contention, the hypervisor ntroduces QoS credit type which makes sure guaranteed access to NX esources. The system admins can assign QoS credits or each LPAR via HMC. Default credit type is used to allocate a VAS window by default as on PowerVM implementation. But the process can pass VAS_TX_WIN_FLAG_QOS_CREDIT flag with VAS_TX_WIN_OPEN ioctl to open QoS type window. Signed-off-by: Haren Myneni Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/aa950b7b8e8077364267720274a7b9ec34e76e73.camel@linux.ibm.com commit 8f3a6c92802b7c48043954ba3b507e9b33d8c898 Author: Haren Myneni Date: Thu Jun 17 13:34:05 2021 -0700 powerpc/pseries/vas: Define VAS/NXGZIP hcalls and structs This patch adds hcalls and other definitions. Also define structs that are used in VAS implementation on PowerVM. Signed-off-by: Haren Myneni Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b4b8c594c27ee4aa6be9dc6dc4ee7331571cbbe8.camel@linux.ibm.com commit 7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85 Author: Haren Myneni Date: Thu Jun 17 13:33:28 2021 -0700 powerpc/vas: Define and use common vas_window struct Many elements in vas_struct are used on PowerNV and PowerVM platforms. vas_window is used for both TX and RX windows on PowerNV and for TX windows on PowerVM. So some elements are specific to these platforms. So this patch defines common vas_window and platform specific window structs (pnv_vas_window on PowerNV). Also adds the corresponding changes in PowerNV vas code. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1698c35c158dfe52c6d2166667823d3d4a463353.camel@linux.ibm.com commit 3b26797350352479f37216d674c8e5d126faab66 Author: Haren Myneni Date: Thu Jun 17 13:32:38 2021 -0700 powerpc/vas: Move update_csb/dump_crb to common book3s platform If a coprocessor encounters an error translating an address, the VAS will cause an interrupt in the host. The kernel processes the fault by updating CSB. This functionality is same for both powerNV and pseries. So this patch moves these functions to common vas-api.c and the actual functionality is not changed. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bf8d5b0770fa1ef5cba88c96580caa08d999d3b5.camel@linux.ibm.com commit 3856aa542d90ed79cd5ed4cfd828b1fb04017131 Author: Haren Myneni Date: Thu Jun 17 13:31:43 2021 -0700 powerpc/vas: Create take/drop pid and mm reference functions Take pid and mm references when each window opens and drops during close. This functionality is needed for powerNV and pseries. So this patch defines the existing code as functions in common book3s platform vas-api.c Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2fa40df962250a737c804e58202924717b39e381.camel@linux.ibm.com commit 1a0d0d5ed5e3cd9e3fc1ad4459f1db2f3618fce0 Author: Haren Myneni Date: Thu Jun 17 13:31:06 2021 -0700 powerpc/vas: Add platform specific user window operations PowerNV uses registers to open/close VAS windows, and getting the paste address. Whereas the hypervisor calls are used on PowerVM. This patch adds the platform specific user space window operations and register with the common VAS user space interface. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f85091f4ace67f951ac04d60394d67b21e2f5d3c.camel@linux.ibm.com commit 06c6fad9bfe0b6439e18ea1f1cf0d178405ccf25 Author: Haren Myneni Date: Thu Jun 17 13:30:24 2021 -0700 powerpc/powernv/vas: Rename register/unregister functions powerNV and pseries drivers register / unregister to the corresponding platform specific VAS separately. Then these VAS functions call the common API with the specific window operations. So rename powerNV VAS API register/unregister functions. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9db00d58dbdcb7cfc07a1df95f3d2a9e3e5d746a.camel@linux.ibm.com commit 413d6ed3eac387a2876893c337174f0c5b99d01d Author: Haren Myneni Date: Thu Jun 17 13:29:48 2021 -0700 powerpc/vas: Move VAS API to book3s common platform The pseries platform will share vas and nx code and interfaces with the PowerNV platform, so create the arch/powerpc/platforms/book3s/ directory and move VAS API code there. Functionality is not changed. Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e05c8db17b9eabe3545b902d034238e4c6c08180.camel@linux.ibm.com commit 91cdbb955aa94ee0841af4685be40937345d29b8 Author: Haren Myneni Date: Thu Jun 17 13:29:05 2021 -0700 powerpc/powernv/vas: Release reference to tgid during window close The kernel handles the NX fault by updating CSB or sending signal to process. In multithread applications, children can open VAS windows and can exit without closing them. But the parent can continue to send NX requests with these windows. To prevent pid reuse, reference will be taken on pid and tgid when the window is opened and release them during window close. The current code is not releasing the tgid reference which can cause pid leak and this patch fixes the issue. Fixes: db1c08a740635 ("powerpc/vas: Take reference to PID and mm for user space windows") Cc: stable@vger.kernel.org # 5.8+ Reported-by: Nicholas Piggin Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6020fc4d444864fe20f7dcdc5edfe53e67480a1c.camel@linux.ibm.com commit 3d3e88e336338834086278236d42039f3cde50e1 Author: Richard Fitzgerald Date: Fri Jun 18 15:47:45 2021 +0100 soundwire: stream: Fix test for DP prepare complete In sdw_prep_deprep_slave_ports(), after the wait_for_completion() the DP prepare status register is read. If this indicates that the port is now prepared, the code should continue with the port setup. It is irrelevant whether the wait_for_completion() timed out if the port is now ready. The previous implementation would always fail if the wait_for_completion() timed out, even if the port was reporting successful prepare. This patch also fixes a minor bug where the return from sdw_read() was not checked for error - any error code with LSBits clear could be misinterpreted as a successful port prepare. Fixes: 79df15b7d37c ("soundwire: Add helpers for ports operations") Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210618144745.30629-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit 031e668bc1ad7ccdbfb2b67b838bb6b7cc44ecf3 Author: Richard Fitzgerald Date: Wed Jun 16 15:59:01 2021 +0100 soundwire: bus: Make sdw_nwrite() data pointer argument const Idiomatically, write functions should take const pointers to the data buffer, as they don't change the data. They are also likely to be called from functions that receive a const data pointer. Internally the pointer is passed to function/structs shared with the read functions, requiring a cast, but this is an implementation detail that should be hidden by the public API. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20210616145901.29402-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit f8fbcdfb0665de60997d9746809e1704ed782bbc Author: Takashi Iwai Date: Sun Jun 20 08:59:52 2021 +0200 ALSA: hda/realtek: Fix bass speaker DAC mapping for Asus UM431D Asus Zenbook 14 UM431D has two speaker pins and a headphone pin, and the auto-parser ends up assigning the bass to the third DAC 0x06. Although the tone comes out, it's inconvenient because this DAC has no volume control unlike two other DACs. For obtaining the volume control for the bass speaker, this patch enforces the mapping to let both front and bass speaker pins sharing the same DAC. It's not ideal but a little bit of improvement. Since we've already applied the same workaround for another ASUS machine, we just need to hook the chain to the existing quirk. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212547 Cc: Link: https://lore.kernel.org/r/20210620065952.18948-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 434591b2a77def0e78abfa38e5d7c4bca954e68a Author: Elia Devito Date: Sat Jun 19 22:41:04 2021 +0200 ALSA: hda/realtek: Improve fixup for HP Spectre x360 15-df0xxx On HP Spectre x360 15-df0xxx, after system boot with plugged headset, the headset mic are not detected. Moving pincfg and DAC's config to single fixup function fix this. [ The actual bug in the original code was that it used a chain to ALC286_FIXUP_SPEAKER2_TO_DAC1, and it contains not only the DAC1 route fix but also another chain to ALC269_FIXUP_THINKPAD_ACPI. I thought the latter one is harmless for non-Thinkpad, but it doesn't seem so; it contains again yet another chain to ALC269_FIXUP_SKI_IGNORE, and this might be bad for some machines, including this HP machine. -- tiwai ] Signed-off-by: Elia Devito Cc: Link: https://lore.kernel.org/r/20210619204105.5682-1-eliadevito@gmail.com Signed-off-by: Takashi Iwai commit 50ebe56222bfa0911a932930f9229ee5995508d9 Author: Takashi Sakamoto Date: Sat Jun 19 17:39:22 2021 +0900 ALSA: bebob: add support for ToneWeal FW66 A user of FFADO project reported the issue of ToneWeal FW66. As a result, the device is identified as one of applications of BeBoB solution. I note that in the report the device returns contradictory result in plug discovery process for audio subunit. Fortunately ALSA BeBoB driver doesn't perform it thus it's likely to handle the device without issues. I receive no reaction to test request for this patch yet, however it would be worth to add support for it. daniel@gibbonmoon:/sys/bus/firewire/devices/fw1$ grep -r . * Binary file config_rom matches dev:244:1 guid:0x0023270002000000 hardware_version:0x000002 is_local:0 model:0x020002 model_name:FW66 power/runtime_active_time:0 power/runtime_active_kids:0 power/runtime_usage:0 power/runtime_status:unsupported power/async:disabled power/runtime_suspended_time:0 power/runtime_enabled:disabled power/control:auto subsystem/drivers_autoprobe:1 uevent:MAJOR=244 uevent:MINOR=1 uevent:DEVNAME=fw1 units:0x00a02d:0x010001 vendor:0x002327 vendor_name:ToneWeal fw1.0/uevent:MODALIAS=ieee1394:ven00002327mo00020002sp0000A02Dver00010001 fw1.0/power/runtime_active_time:0 fw1.0/power/runtime_active_kids:0 fw1.0/power/runtime_usage:0 fw1.0/power/runtime_status:unsupported fw1.0/power/async:disabled fw1.0/power/runtime_suspended_time:0 fw1.0/power/runtime_enabled:disabled fw1.0/power/control:auto fw1.0/model:0x020002 fw1.0/rom_index:15 fw1.0/specifier_id:0x00a02d fw1.0/model_name:FW66 fw1.0/version:0x010001 fw1.0/modalias:ieee1394:ven00002327mo00020002sp0000A02Dver00010001 Cc: Daniel Jozsef Reference: https://lore.kernel.org/alsa-devel/20200119164335.GA11974@workstation/ Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210619083922.16060-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit cac7100d4c51c04979dacdfe6c9a5e400d3f0a27 Author: Yizhuo Zhai Date: Sat Jun 19 22:26:50 2021 -0700 Input: hideep - fix the uninitialized use in hideep_nvm_unlock() Inside function hideep_nvm_unlock(), variable "unmask_code" could be uninitialized if hideep_pgm_r_reg() returns error, however, it is used in the later if statement after an "and" operation, which is potentially unsafe. Signed-off-by: Yizhuo Signed-off-by: Dmitry Torokhov commit eacacdb5fc961a7e3aec36502e4cbda8b6d5b3a8 Author: YueHaibing Date: Sat Jun 19 22:13:29 2021 -0700 Input: trackpoint - use kobj_to_dev() Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210607122722.36736-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov commit 50221b0b68a621a4d688ab9e4165a79a2247ad6e Author: YueHaibing Date: Sat Jun 19 22:13:06 2021 -0700 Input: atkbd - use kobj_to_dev() Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210607122653.33784-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov commit 6ffd4c7964d20c88211746b4ac8a37f5c5517180 Author: YueHaibing Date: Sat Jun 19 22:12:43 2021 -0700 Input: tsc200x-core - use kobj_to_dev() Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210607122451.36708-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov commit f519f78c7e95b56cadd395443bf39316fea1990c Author: YueHaibing Date: Sat Jun 19 22:12:32 2021 -0700 Input: ims-pcu - use kobj_to_dev() Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210607122533.10608-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov commit 25531d612bac96dceea46994cd385791a0396aea Author: zhouchuangao Date: Sat Jun 19 22:10:59 2021 -0700 Input: cros_ec_keyb - use kobj_to_dev() API Use kobj_to_dev() API instead of container_of(). Signed-off-by: zhouchuangao Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1624025283-56360-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: Dmitry Torokhov commit eb607cd4957fb0ef97beb2a8293478be6a54240a Author: Alex Bee Date: Sat Jun 19 14:13:06 2021 +0200 arm64: dts: rockchip: Re-add regulator-always-on for vcc_sdio for rk3399-roc-pc Re-add the regulator-always-on property for vcc_sdio which supplies sdmmc, since it gets disabled during reboot now and the bootrom expects it to be enabled when booting from SD card. This makes rebooting impossible in that case and requires a hard reset to boot again. Fixes: 04a0077fdb19 ("arm64: dts: rockchip: Remove always-on properties from regulator nodes on rk3399-roc-pc.") Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210619121306.7740-1-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 06b2818678d9b35102c9816ffaf6893caf306ed0 Author: Alex Bee Date: Sat Jun 19 14:14:46 2021 +0200 arm64: dts: rockchip: Re-add regulator-boot-on, regulator-always-on for vdd_gpu on rk3399-roc-pc This might be a limitation of either the current panfrost driver devfreq implementation or how the gpu is implemented in RK3399 SoC. The gpu regulator must never get disabled or the registers get (randomly?) inaccessable by the driver. (see all other RK3399 boards) Fixes: ec7d731d81e7 ("arm64: dts: rockchip: Add node for gpu on rk3399-roc-pc") Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210619121446.7802-1-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit ab4a0b8fcb9a95c02909b62049811bd2e586aaa4 Author: Pavel Skripkin Date: Thu Jun 17 21:51:30 2021 +0300 net: can: ems_usb: fix use-after-free in ems_usb_disconnect() In ems_usb_disconnect() dev pointer, which is netdev private data, is used after free_candev() call: | if (dev) { | unregister_netdev(dev->netdev); | free_candev(dev->netdev); | | unlink_all_urbs(dev); | | usb_free_urb(dev->intr_urb); | | kfree(dev->intr_in_buffer); | kfree(dev->tx_msg_buffer); | } Fix it by simply moving free_candev() at the end of the block. Fail log: | BUG: KASAN: use-after-free in ems_usb_disconnect | Read of size 8 at addr ffff88804e041008 by task kworker/1:2/2895 | | CPU: 1 PID: 2895 Comm: kworker/1:2 Not tainted 5.13.0-rc5+ #164 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a-rebuilt.opensuse.4 | Workqueue: usb_hub_wq hub_event | Call Trace: | dump_stack (lib/dump_stack.c:122) | print_address_description.constprop.0.cold (mm/kasan/report.c:234) | kasan_report.cold (mm/kasan/report.c:420 mm/kasan/report.c:436) | ems_usb_disconnect (drivers/net/can/usb/ems_usb.c:683 drivers/net/can/usb/ems_usb.c:1058) Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface") Link: https://lore.kernel.org/r/20210617185130.5834-1-paskripkin@gmail.com Cc: linux-stable Signed-off-by: Pavel Skripkin Signed-off-by: Marc Kleine-Budde commit 22c696fed25c63c7f67508309820358b94a96b6d Author: Oleksij Rempel Date: Thu Jun 17 15:06:23 2021 +0200 can: j1939: j1939_sk_init(): set SOCK_RCU_FREE to call sk_destruct() after RCU is done Set SOCK_RCU_FREE to let RCU to call sk_destruct() on completion. Without this patch, we will run in to j1939_can_recv() after priv was freed by j1939_sk_release()->j1939_sk_sock_destruct() Fixes: 25fe97cb7620 ("can: j1939: move j1939_priv_put() into sk_destruct callback") Link: https://lore.kernel.org/r/20210617130623.12705-1-o.rempel@pengutronix.de Cc: linux-stable Reported-by: Thadeu Lima de Souza Cascardo Reported-by: syzbot+bdf710cfc41c186fdff3@syzkaller.appspotmail.com Signed-off-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 14a4696bc3118ba49da28f79280e1d55603aa737 Author: Oliver Hartkopp Date: Fri Jun 18 19:37:13 2021 +0200 can: isotp: isotp_release(): omit unintended hrtimer restart on socket release When closing the isotp socket, the potentially running hrtimers are canceled before removing the subscription for CAN identifiers via can_rx_unregister(). This may lead to an unintended (re)start of a hrtimer in isotp_rcv_cf() and isotp_rcv_fc() in the case that a CAN frame is received by isotp_rcv() while the subscription removal is processed. However, isotp_rcv() is called under RCU protection, so after calling can_rx_unregister, we may call synchronize_rcu in order to wait for any RCU read-side critical sections to finish. This prevents the reception of CAN frames after hrtimer_cancel() and therefore the unintended (re)start of the hrtimers. Link: https://lore.kernel.org/r/20210618173713.2296-1-socketcan@hartkopp.net Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol") Cc: linux-stable Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit fb8696ab14adadb2e3f6c17c18ed26b3ecd96691 Author: Oliver Hartkopp Date: Fri Jun 18 19:36:45 2021 +0200 can: gw: synchronize rcu operations before removing gw job entry can_can_gw_rcv() is called under RCU protection, so after calling can_rx_unregister(), we have to call synchronize_rcu in order to wait for any RCU read-side critical sections to finish before removing the kmem_cache entry with the referenced gw job entry. Link: https://lore.kernel.org/r/20210618173645.2238-1-socketcan@hartkopp.net Fixes: c1aabdf379bc ("can-gw: add netlink based CAN routing") Cc: linux-stable Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit e1d635bc94bce69e45a2d4e93c94178613e01229 Author: Alex Bee Date: Sat Jun 19 14:16:42 2021 +0200 arm64: dts: rockchip: add ir-receiver for rk3399-roc-pc Like some other RK3399 boards RK3399-ROC-PC has an ir receiver connected to pwm3 which can be used as gpio-ir-receiver. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210619121642.7892-1-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit d5f9023fa61ee8b94f37a93f08e94b136cf1e463 Author: Thadeu Lima de Souza Cascardo Date: Sat Jun 19 13:18:13 2021 -0300 can: bcm: delay release of struct bcm_op after synchronize_rcu() can_rx_register() callbacks may be called concurrently to the call to can_rx_unregister(). The callbacks and callback data, though, are protected by RCU and the struct sock reference count. So the callback data is really attached to the life of sk, meaning that it should be released on sk_destruct. However, bcm_remove_op() calls tasklet_kill(), and RCU callbacks may be called under RCU softirq, so that cannot be used on kernels before the introduction of HRTIMER_MODE_SOFT. However, bcm_rx_handler() is called under RCU protection, so after calling can_rx_unregister(), we may call synchronize_rcu() in order to wait for any RCU read-side critical sections to finish. That is, bcm_rx_handler() won't be called anymore for those ops. So, we only free them, after we do that synchronize_rcu(). Fixes: ffd980f976e7 ("[CAN]: Add broadcast manager (bcm) protocol") Link: https://lore.kernel.org/r/20210619161813.2098382-1-cascardo@canonical.com Cc: linux-stable Reported-by: syzbot+0f7e7e5e2f4f40fa89c0@syzkaller.appspotmail.com Reported-by: Norbert Slusarek Signed-off-by: Thadeu Lima de Souza Cascardo Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit dda2626b86c2c1813b7bfdd10d2fdd849611fc97 Merge: e3a5de6d81d8b 0de449d599594 Author: David S. Miller Date: Sat Jun 19 11:46:24 2021 -0700 Merge branch 'ezchip-fixes' Pavel Skripkin says: ==================== net: ethernat: ezchip: bug fixing and code improvments While manual code reviewing, I found some error in ezchip driver. Two of them looks very dangerous: 1. use-after-free in nps_enet_remove Accessing netdev private data after free_netdev() 2. wrong error handling of platform_get_irq() It can cause passing negative irq to request_irq() Also, in 2nd patch I removed redundant check to increase execution speed and make code more straightforward. ==================== Signed-off-by: David S. Miller commit 0de449d599594f5472e00267d651615c7f2c6c1d Author: Pavel Skripkin Date: Fri Jun 18 19:14:47 2021 +0300 net: ethernet: ezchip: fix error handling As documented at drivers/base/platform.c for platform_get_irq: * Gets an IRQ for a platform device and prints an error message if finding the * IRQ fails. Device drivers should check the return value for errors so as to * not pass a negative integer value to the request_irq() APIs. So, the driver should check that platform_get_irq() return value is _negative_, not that it's equal to zero, because -ENXIO (return value from request_irq() if irq was not found) will pass this check and it leads to passing negative irq to request_irq() Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 4ae85b23e1f052379f0316e42494e2f84f2a3e6f Author: Pavel Skripkin Date: Fri Jun 18 19:14:37 2021 +0300 net: ethernet: ezchip: remove redundant check err varibale will be set everytime, when code gets into this path. This check will just slowdown the execution and that's all. Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit e4b8700e07a86e8eab6916aa5c5ba99042c34089 Author: Pavel Skripkin Date: Fri Jun 18 19:14:31 2021 +0300 net: ethernet: ezchip: fix UAF in nps_enet_remove priv is netdev private data, but it is used after free_netdev(). It can cause use-after-free when accessing priv pointer. So, fix it by moving free_netdev() after netif_napi_del() call. Fixes: 0dd077093636 ("NET: Add ezchip ethernet driver") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit e3a5de6d81d8b2199935c7eb3f7d17a50a7075b7 Author: Pavel Skripkin Date: Fri Jun 18 17:57:31 2021 +0300 net: ethernet: aeroflex: fix UAF in greth_of_remove static int greth_of_remove(struct platform_device *of_dev) { ... struct greth_private *greth = netdev_priv(ndev); ... unregister_netdev(ndev); free_netdev(ndev); of_iounmap(&of_dev->resource[0], greth->regs, resource_size(&of_dev->resource[0])); ... } greth is netdev private data, but it is used after free_netdev(). It can cause use-after-free when accessing greth pointer. So, fix it by moving free_netdev() after of_iounmap() call. Fixes: d4c41139df6e ("net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 4c7f85a321a1ac265159c22a6998ef4f2a60c21d Author: Dmitry Osipenko Date: Sat Jun 19 00:54:55 2021 +0300 hwmon: (lm90) Disable interrupt on suspend I2C accesses are prohibited and will error out after suspending of the I2C controller, hence we need to ensure that interrupt won't fire on suspend when it's too late. Disable interrupt across suspend/resume. Signed-off-by: Dmitry Osipenko Signed-off-by: Guenter Roeck commit 2abdc357c55d9e728f6710cf22618889f16a00f6 Author: Dmitry Osipenko Date: Sat Jun 19 00:54:54 2021 +0300 hwmon: (lm90) Unmask hardware interrupt The ALERT interrupt is enabled by default after power-on, but it could be masked by bootloader. For example this is the case on Acer A500 tablet device. Unmask the hardware interrupt if interrupt is provided. Signed-off-by: Dmitry Osipenko Signed-off-by: Guenter Roeck commit 94dbd23ed88ce70d7baacfa20d21bc0070d1a8da Author: Dmitry Osipenko Date: Sat Jun 19 00:54:53 2021 +0300 hwmon: (lm90) Use hwmon_notify_event() Use hwmon_notify_event() to notify userspace and thermal core about temperature changes. Suggested-by: Guenter Roeck Signed-off-by: Dmitry Osipenko Signed-off-by: Guenter Roeck commit d97fb837b8cce400892e7f0ccf4755edb225ad36 Author: Dmitry Osipenko Date: Sat Jun 19 00:54:52 2021 +0300 hwmon: (lm90) Don't override interrupt trigger type The lm90 driver sets interrupt trigger type to level-low. This type is not suitable for sensors like NCT1008 that don't deassert interrupt line until temperature is back to normal, resulting in interrupt storm. The appropriate trigger type should come from OF device description and currently it's overridden by the driver's trigger type. Don't specify the trigger type in the driver code, letting interrupt core to use the device-specific trigger type. Signed-off-by: Dmitry Osipenko Signed-off-by: Guenter Roeck commit 49f5b114e36ebc69318ab95f98b57df7458b0f42 Author: Anilkumar Kolli Date: Thu Jun 17 11:29:40 2021 +0300 ath11k: Enable QCN9074 device The issues mentioned in commit 4e80946197a8 ("ath11k: add qcn9074 pci device support") are fixed in firmware. This patch enables QCN9074 device. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210615211348.92168-1-jouni@codeaurora.org commit 8a952a955de705724b715e4b595a89bee8c11b9f Author: Caleb Connolly Date: Thu Jun 17 11:29:40 2021 +0300 ath10k: demote chan info without scan request warning Some devices/firmwares cause this to be printed every 5-15 seconds, though it has no impact on functionality. Demote this to a debug message. I see this on SDM845 and MSM8998 platforms, specifically the OnePlus 6 devices, PocoPhone F1 and OnePlus 5. On the OnePlus 6 (SDM845) we are stuck with the following signed vendor fw: [ 9.339873] ath10k_snoc 18800000.wifi: qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001 [ 9.339897] ath10k_snoc 18800000.wifi: qmi fw_version 0x20060029 fw_build_timestamp 2019-07-12 02:14 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c8-00041-QCAHLSWMTPLZ-1 The OnePlus 5 (MSM8998) is using firmware: [ 6096.956799] ath10k_snoc 18800000.wifi: qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40010002 [ 6096.956824] ath10k_snoc 18800000.wifi: qmi fw_version 0x1007007e fw_build_timestamp 2020-04-14 22:45 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0.c6-00126-QCAHLSWMTPLZ-1.211883.1.278648. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0.c8-00041-QCAHLSWMTPLZ-1 Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.1.0.c6-00126-QCAHLSWMTPLZ-1.211883.1.278648 Signed-off-by: Caleb Connolly Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210522171609.299611-1-caleb@connolly.tech commit adf6a0f8c0a656df3d29403f314bf3e0dbb2dd77 Author: Íñigo Huguet Date: Tue May 11 09:19:27 2021 +0200 rtl8xxxu: avoid parsing short RX packet One USB data buffer can contain multiple received network packets. If that's the case, they're processed this way: 1. Original buffer is cloned 2. Original buffer is trimmed to contain only the first network packet 3. This first network packet is passed to network stack 4. Cloned buffer is trimmed to eliminate the first network packet 5. Repeat with the cloned buffer until there are no more network packets inside However, if the space remaining in original buffer after the first network packet is not enough to contain at least another network packet descriptor, it is not cloned. The loop parsing this packets ended if remaining space == 0. But if the remaining space was > 0 but < packet descriptor size, another iteration of the loop was done, processing again the previous packet because cloning didn't happen. Moreover, the ownership of this packet had been passed to network stack in the previous iteration. This patch ensures that no extra iteration is done if the remaining size is not enough for one packet, and also avoid the first iteration for the same reason. Probably this doesn't happen in practice, but can happen theoretically. Signed-off-by: Íñigo Huguet Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511071926.8951-1-ihuguet@redhat.com commit c240b044edefa3c3af4014a4030e017dd95b59a1 Author: Pascal Terjan Date: Sat Apr 24 18:29:59 2021 +0100 rtl8xxxu: Fix device info for RTL8192EU devices Based on 2001:3319 and 2357:0109 which I used to test the fix and 0bda:818b and 2357:0108 for which I found efuse dumps online. == 2357:0109 == === Before === Vendor: Realtek Product: \x03802.11n NI Serial: === After === Vendor: Realtek Product: 802.11n NIC Serial not available. == 2001:3319 == === Before === Vendor: Realtek Product: Wireless N Serial: no USB Adap === After === Vendor: Realtek Product: Wireless N Nano USB Adapter Serial not available. Signed-off-by: Pascal Terjan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210424172959.1559890-1-pterjan@google.com commit b566b2e82ffa95f64d1c367d3098adbd2af11561 Merge: 0c33795231bff 61a1f99dd1e3c Author: Kalle Valo Date: Sat Jun 19 11:49:26 2021 +0300 Merge tag 'mt76-for-kvalo-2021-06-18' of https://github.com/nbd168/wireless into pending mt76 patches for 5.14 * mt7915 MSI support * disable ASPM on mt7915 * mt7915 tx status reporting * mt7921 decap offload * driver fixes * cleanups * mt7921 runtime power management improvements * testmode improvements/fixes * runtime PM improvements commit a406bfda89c78a75327f8b6a0281b5d3bed493a1 Author: Peter Robinson Date: Sun Jun 13 22:52:37 2021 +0100 arm64: dts: rockchip: Add USB-C port details for rk3399 Firefly Add the initial details for the USB-C port. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20210613215237.830160-4-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit 5768c5ff0709aeea40fbdc8e362733f5a99fc458 Author: Peter Robinson Date: Sun Jun 13 22:52:36 2021 +0100 arm64: dts: rockchip: Sort rk3399 firefly pinmux entries Sort the rk3399 firefly pinmux entries in alphabetical order and de-dupe the pmic entries. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20210613215237.830160-3-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit 4fab8e3655e476170281884d999c4d758d405fac Author: Peter Robinson Date: Sun Jun 13 22:52:35 2021 +0100 arm64: dts: rockchip: add infrared receiver node to RK3399 Firefly This adds the RK3399 Firefly’s infrared receiver to its dts. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20210613215237.830160-2-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit ba2401ab87bc2049a49d45f75013f6faebd120f1 Author: Peter Robinson Date: Sun Jun 13 22:52:34 2021 +0100 arm64: dts: rockchip: add SPDIF node for rk3399-firefly This patch adds the SPDIF sound node and related settings for rk3399-firefly. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20210613215237.830160-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit edb39de5d731f147c7b08c4a5eb246ae1dbdd947 Author: Chris Morgan Date: Mon Jun 14 11:18:49 2021 -0500 arm64: dts: rockchip: Add Rotation Property for OGA Panel Add rotation property for Odroid Go Advance panel to note that it is rotated 270 degrees. Rotation affects DRM connector after this patch: https://cgit.freedesktop.org/drm/drm/commit/drivers/gpu/drm/panel/panel-elida-kd35t133.c?id=610d9c311b1387f8c4ac602fee1f2a1cb0508707 Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20210614161849.332-1-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 1aee020155f364ef538370d3392969f1077b9bae Author: Wan Jiabing Date: Sat Jun 19 10:02:59 2021 +0800 um: remove unneeded semicolon in um_arch.c Fix following coccicheck warning: ./arch/um/kernel/um_arch.c:284:34-35: Unneeded semicolon Signed-off-by: Wan Jiabing Signed-off-by: Richard Weinberger commit 61a1f99dd1e3c145fce9d601b52e7adb8f37322a Author: Lorenzo Bianconi Date: Fri Jun 18 12:30:47 2021 +0200 mt76: mt7921: allow chip reset during device restart Disable chip full reset just during device probing but allow it during hw restart. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a27238a0488e14b2e558053b8b8a9a501e9385c6 Author: Lorenzo Bianconi Date: Fri Jun 18 10:08:24 2021 +0200 mt76: mt7615: set macwork timeout according to runtime-pm Set macwork timeout value according to runtime-pm in order to reduce power consumption Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8aff2d915d7f434582d6e840535f19a88a8c71ab Author: Lorenzo Bianconi Date: Fri Jun 18 10:08:23 2021 +0200 mt76: mt7663s: enable runtime-pm Allow the user to enable runtime-pm for mt7663s driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c2f9e631f098caf7176cbabda7a9cc2721352ff2 Author: Lorenzo Bianconi Date: Fri Jun 18 10:08:22 2021 +0200 mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path Similar to mt7663e, rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 50a97efe218e848e26b7fd4d09fb6d9f88f90e6e Author: Lorenzo Bianconi Date: Fri Jun 18 10:08:21 2021 +0200 mt76: mt7663s: rely on pm reference counting As already done for mt7921 and mt7663e, rely on pm reference counting in drv/fw_own Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit aac5104bf631e27032944346a526533b106506d5 Author: Lorenzo Bianconi Date: Fri Jun 18 10:08:20 2021 +0200 mt76: sdio: do not run mt76_txq_schedule directly In order to support runtime-pm for sdio, do not run mt76_txq_schedule directly, but schedule tx_worker instead Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1153668eefca6860dba3a6e94f24bf7146d62d50 Author: Deren Wu Date: Thu Jun 17 22:38:25 2021 +0800 mt76: mt7921: enable HE BFee capability Enables HE MU/SU beamformee functionality Signed-off-by: Eric-SY Chang Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 5512c974437c6b9d2be9c9e723b7dfc21c32a5f8 Author: Lorenzo Bianconi Date: Thu Jun 17 13:02:09 2021 +0200 mt76: disable TWT capabilities for the moment Disable TWT REQ/RES mac capabilities since TWT is not supported yet in mt7915/mt7921. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c368362c36d3d4cedbc9a1c9caa95960912cc429 Author: Ryder Lee Date: Thu Jun 17 15:17:49 2021 +0800 mt76: fix iv and CCMP header insertion The iv from RXD is only for TKIP_RSC/CCMP_PN/GCMP_PN, and it needs a check for CCMP header insertion. Move mt76_cipher_type to mt76.h to reduce duplicated code. Signed-off-by: Xing Song Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 723885a6750102e5d807429b3d06aa6b0d29cc66 Author: Sean Wang Date: Thu Jun 17 09:39:19 2021 +0800 mt76: mt7921: fix the coredump is being truncated Fix the maximum size of the coredump generated with current mt7921 firmware. Otherwise, a truncated coredump would be reported to userland via dev_coredumpv. Also, there is an additional error handling enhanced in the patch to avoid the possible invalid buffer access when the system failed to create the buffer to hold the coredump. Fixes: 0da3c795d07b ("mt76: mt7921: add coredump support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 78b0328ff8c46fce64eb969d2572c3f631735dc1 Author: Sean Wang Date: Wed Jun 16 05:31:10 2021 +0800 mt76: mt7921: fix kernel warning when reset on vif is not sta ieee80211_disconnect is only called for the staton mode. [ 714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787 ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.116704] Hardware name: MediaTek Asurada rev1 board (DT) [ 714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e] [ 714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO) [ 714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [ 714.144083] sp : ffffffc0107cbbd0 [ 714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928 [ 714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000 [ 714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38 [ 714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860 [ 714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860 [ 714.173950] x19: 0000000000000001 x18: 000000000000b67e [ 714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0 [ 714.184571] x15: 0000000000000000 x14: 0000000000000227 [ 714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060 [ 714.195191] x11: 0000000000000000 x10: 0000000000000000 [ 714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006 [ 714.205812] x7 : 2828282828282828 x6 : ffffffb200440396 [ 714.211122] x5 : 0000000000000000 x4 : 0000000000000004 [ 714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90 [ 714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90 [ 714.227054] Call trace: [ 714.229594] ieee80211_disconnect+0x108/0x118 [mac80211] [ 714.234913] mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [ 714.240313] __iterate_interfaces+0xc4/0xdc [mac80211] [ 714.245541] ieee80211_iterate_interfaces+0x4c/0x68 [mac80211] [ 714.251381] mt7921_mac_reset_work+0x410/0x468 [mt7921e] [ 714.256696] process_one_work+0x208/0x3c8 [ 714.260706] worker_thread+0x23c/0x3e8 [ 714.264456] kthread+0x140/0x17c [ 714.267685] ret_from_fork+0x10/0x18 Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 495cd981afe78b12fee635bfe35897eae427d89e Author: Lorenzo Bianconi Date: Sat Jun 12 16:49:30 2021 +0200 mt76: mt7921: introduce dedicated control for deep_sleep Introduce ds_enable switch to fully control fw deep_sleep capability Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8225816d2974204c09228f94c0451bd959575475 Author: Lorenzo Bianconi Date: Sat Jun 12 14:48:48 2021 +0200 mt76: mt7921: limit txpower according to userlevel power Limit tx power for single-sku according to userlevel power. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e5bca8c5d2cd3502c15170a57c81a7587a38e957 Author: Lorenzo Bianconi Date: Sat Jun 12 14:43:03 2021 +0200 mt76: mt7921: improve code readability for mt7921_update_txs Introduce mt7921_update_txs routine in order to improve code readability for tx timestamp parsing/configuration. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit aa967eb791198f9cf5304493c93f7567dfc8a5ff Author: Sean Wang Date: Mon May 10 23:14:53 2021 +0800 mt76: mt7921: add deep sleep control to runtime-pm knob Add addtional the deep sleep control to runtime-pm knob to allow us to control driver switching between the full power mode and the deep sleep mode the firmware is able to support. Reviewed-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit f5056657f995f0e36bc9e30e5f608ff55c1bdf72 Author: Sean Wang Date: Mon May 10 23:14:52 2021 +0800 mt76: mt7921: enable deep sleep at runtime Enable the deep sleep mode with that firmware is able to trap into the doze state at runtime to reduce the power consumption further. The deep sleep mode is not allowed in the STA state transition with the firmware to have the fast connection experience as we've done in the full power mode Reviewed-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 2707ff4dd7b1479dbd44ebb3c74788084cc95245 Author: Ryder Lee Date: Sat Jun 12 02:04:20 2021 +0800 mt76: mt7915: fix IEEE80211_HE_PHY_CAP7_MAX_NC for station mode The value of station mode is always 0. Fixed: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit e7f1c44192df90c17d486d8e3614a338772132d5 Author: Tom Rix Date: Thu Jun 10 14:44:38 2021 -0700 mt76: use SPDX header file comment style header files should use '/* SPDX ... */ Change from c file comment syle to header style Signed-off-by: Tom Rix Signed-off-by: Felix Fietkau commit c44ccf1dcce89c1d29500d209d93092acd32349d Author: Tom Rix Date: Thu Jun 10 14:44:37 2021 -0700 mt76: add a space between comment char and SPDX tag checkpatch expects a space between '#' and 'SPDX...' Add a space. Signed-off-by: Tom Rix Signed-off-by: Felix Fietkau commit b70946ced192a04a4d462e384ee1b44caed79acd Author: Ryder Lee Date: Fri Jun 11 04:03:26 2021 +0800 mt76: mt7915: improve MU stability - Adjust starec flow since VHT MU group is only updated by starec_vht follows starec_bf settings. - Drop unnecessary MU BF checks. TX MPDU PER (Status = Success): TOT_MPDU_CNT FAIL_MPDU_CNT TX_PER WCID Rate 1 VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF 114 0 0.00% VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF_MU 64 0 0.00% VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF 128 0 0.00% VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF_MU 745 0 0.00% VHT_BW80_2SS_MCS8_LGI_LDPC_MUBF_MU 856 0 0.00% VHT_BW80_2SS_MCS8_SGI_LDPC_MUBF_MU 1430 4 0.28% VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF_MU 5220 31 0.59% VHT_BW80_2SS_MCS9_LGI_LDPC_iBF 59 0 0.00% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF 64 2 3.12% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF_MU 22132 76 0.34% VHT_BW80_2SS_MCS9_SGI_LDPC_iBF 2866 1 0.03% 2 VHT_BW80_2SS_MCS7_LGI_LDPC_MUBF_MU 3781 5 0.13% VHT_BW80_2SS_MCS7_SGI_LDPC_MUBF_MU 735 0 0.00% VHT_BW80_2SS_MCS8_LGI_LDPC_MUBF_MU 1270 365 28.74% VHT_BW80_2SS_MCS8_SGI_LDPC_MUBF_MU 3420 57 1.67% VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF 128 0 0.00% VHT_BW80_2SS_MCS9_LGI_LDPC_MUBF_MU 64 0 0.00% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF 191 0 0.00% VHT_BW80_2SS_MCS9_SGI_LDPC_MUBF_MU 18833 320 1.70% VHT_BW80_2SS_MCS9_SGI_LDPC_iBF 6040 0 0.00% 287 OFDM 6M Tested-by: Evelyn Tsai Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit fd843822231337f356f2cb2af2f7e43efac015bb Author: Ryder Lee Date: Fri Jun 11 02:43:46 2021 +0800 mt76: mt7915: introduce mt7915_mcu_set_txbf() Use mt7915_mcu_set_txbf() to reduce global functions. This can be easily extended to support other TxBF commands in further patches. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit c560b137a2164c7160f4edc1813f3e335de6bdff Author: Ryder Lee Date: Fri Jun 11 02:43:45 2021 +0800 mt76: make mt76_update_survey() per phy Reduce duplicated survey for DBDC. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 0d733327c531814c0fb9ef4eea86ca0d6eddfe9e Author: Felix Fietkau Date: Tue May 25 18:45:04 2021 +0200 mt76: mt7915: drop the use of repeater entries for station interfaces There are firmware or hardware issues, which are currently causing tx hangs when attempting to use these interfaces Signed-off-by: Felix Fietkau commit 1f9dde02aab74a32e896ef10e15d72c39e54bb14 Author: Lorenzo Bianconi Date: Sat Jun 5 13:50:52 2021 +0200 mt76: connac: check band caps in mt76_connac_mcu_set_rate_txpower Check device band capabilities before configuring single-sku Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 90052b844d7a6db8649239434b262d28b1430cf4 Author: Lorenzo Bianconi Date: Thu Jun 10 09:44:12 2021 +0200 mt76: move mt76_get_next_pkt_id in mt76.h In order to remove duplicated code, move mt76_get_next_pkt_id routine in mt76.h Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 49c9a263d76a0cf2bb0e36f193036b45545d4eee Author: Lorenzo Bianconi Date: Wed Jun 9 17:13:58 2021 +0200 mt76: reduce rx buffer size to 2048 Reduce rx buffer size to 2048 for mt7921/mt7915/mt7615 since we now support rx amsdu offload Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit abded041a07467c2f3dfe10afd9ea10572c63cc9 Author: Sean Wang Date: Wed Jun 9 14:15:32 2021 +0800 mt76: connac: fix the maximum interval schedule scan can support Maximum interval (in seconds) for schedule scan plan supported by the offload firmware can be U16_MAX. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 89043529c8b833d87391f1844e9d1cc1643393eb Author: Shayne Chen Date: Tue Jun 8 14:55:58 2021 +0800 mt76: mt7915: fix rx fcs error count in testmode FCS error packets are filtered by default and won't be reported to driver, so that RX fcs error and PER in testmode always show zero. Fix this issue by reading fcs error count from hw counter. We did't fix this issue by disabling fcs error rx filter since it may let HW suffer some SER errors. Fixes: 5d8a83f09941 ("mt76: mt7915: implement testmode rx support") Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit a0d65f627ba0fc7d93fddda3c11d3543dbe1c425 Author: Shayne Chen Date: Tue Jun 8 14:55:57 2021 +0800 mt76: testmode: move chip-specific stats dump before common stats Move chip-specific stats dumping part before common stats dumping to provide flexibility for per-chip driver to modify the value of common stats. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit f7d2958ca4614a53b155b9ac37c400b216357394 Author: Lorenzo Bianconi Date: Sun Jun 6 15:18:12 2021 +0200 mt76: connac: add mt76_connac_mcu_get_nic_capability utility routine Introduce mt76_connac_mcu_get_nic_capability utility routine to poll device capabilities returned by mcu fw for CE devices (mt7663/mt7921). This is a preliminary patch to introduce 6GHz support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5bc52dee44f667507f6d54c70cd22bd2fa52e26b Author: Lorenzo Bianconi Date: Sat Jun 5 15:12:48 2021 +0200 mt76: mt7921: make mt7921_set_channel static Make mt7921_set_channel routine static since it is only used in main.c Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 271fa685365842962f56651c9d1a33a0d0d3b30b Author: Lorenzo Bianconi Date: Sat Jun 5 13:46:03 2021 +0200 mt76: mt7921: wake the device before dumping power table Always wake the device up before dumping the single_sku power table otherwise the device can hang. Fixes: ea29acc97c555 ("mt76: mt7921: add dumping Tx power table") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6ab079e2aba283e3e356cc60dd3d0648adc15b1d Author: Lorenzo Bianconi Date: Wed Jun 2 23:25:28 2021 +0200 mt76: connac: add mt76_connac_power_save_sched in mt76_connac_pm_unref Schedule power_save work running mt76_connac_pm_unref in order to reduce power consumption Tested-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 82453b1cbf9ef166364c12b5464251f16bac5f51 Author: Lorenzo Bianconi Date: Wed Jun 2 18:00:14 2021 +0200 mt76: connac: fix UC entry is being overwritten Fix UC entry is being overwritten by BC entry Tested-by: Deren Wu Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 435d68f9cffda3ea3c6f65897ddac4357bcb8fd8 Author: Felix Fietkau Date: Sun Jun 6 09:45:54 2021 +0200 mt76: mt7921: enable VHT BFee capability Enables VHT beamformee functionality Signed-off-by: Leon Yen Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit ee8ba94f9cc9afab570fd71ad421292f6360983c Author: Ryder Lee Date: Mon May 17 12:45:58 2021 +0800 mt76: mt7915: fix MT_EE_CAL_GROUP_SIZE Fix wrong offset for pre-calibration data. Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit e3343d0fef6a368cf5b5b34e99e4a4768ee51242 Author: Ryder Lee Date: Wed Jun 2 11:04:03 2021 +0800 mt76: mt7615: update radar parameters Patch radar parameters to match the SDK to avoid possible false alarms. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 798bffd8004fd10c084131b07519d0f6f0c2fac0 Author: Ryder Lee Date: Wed Jun 2 09:50:17 2021 +0800 mt76: mt7915: setup drr group for peers This is a prerequisite for MU functionality. Tested-by: Evelyn Tsai Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 9f367c81de94a8171f7149f14a5f740f0009dd27 Author: Deren Wu Date: Tue Jun 1 01:01:22 2021 +0800 mt76: mt7921: enable random mac address during sched_scan Enable src address randomization during scheduled scanning Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 15539a5ba6fc1ee6c84e06b2f4977032ca5be202 Author: Lorenzo Bianconi Date: Mon May 31 17:53:29 2021 +0200 mt76: mt7921: remove mt7921_get_wtbl_info routine Since now the fw reports tx rate events without polling, mt7921_get_wtbl_info and related structures are no longer used. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a60951d4faa0ef2e475797dd217c2eaee32ed1c2 Author: Lorenzo Bianconi Date: Mon May 31 08:33:18 2021 +0200 mt76: mt7921: enable hw offloading for wep keys Enable wep key hw offloading for sta mode. This patch fixes WoW support for wep connections. Tested-by: Deren.Wu Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 83d229d28b10d5da9b71a06bee6395567bee732a Author: Shayne Chen Date: Sat May 29 19:11:50 2021 +0800 mt76: mt7915: read all eeprom fields from fw in efuse mode If efuse mode is used, read all values from fw during eeprom init, which makes it more convinient to check if rf values in efuse are properly burned. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 6543002811960d882d722127b4b11e835af0db40 Author: Ryder Lee Date: Sat May 15 12:17:29 2021 +0800 mt76: mt7915: use mt7915_mcu_get_mib_info() to get survey data Firmware functions (SCS, MU ...) also require read-clear phy counters, hence firmware prepares a global task to read shared fields out to a shared pool to avoid concurrency. Switch to event format accordingly. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 5ff4c4aab79b39810b30f5fd63117245d7554cb5 Author: Lorenzo Bianconi Date: Fri May 28 19:11:42 2021 +0200 mt76: mt7921: set MT76_RESET during mac reset Set MT76_RESET during mt7921_mac_reset in order to avoid packet transmissions. Move tx scheduling at the end of reset routine. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7f731405eeca869c51c8792544ef5b26c28c31c3 Author: Felix Fietkau Date: Tue Jun 1 22:26:31 2021 +0200 mt76: mt7915: improve error recovery reliability - Remove no-op code for queue lock/unlock, which is no longer needed - Set a missing DMA flag - Wait for full completion of error recovery before restarting tx - Schedule IRQ tasklet to ensure that IRQ mask gets written Signed-off-by: Felix Fietkau commit 8af414e8835be1a214ac16c37fc8686ef68218e6 Author: Lorenzo Bianconi Date: Fri May 28 13:02:24 2021 +0200 mt76: allow hw driver code to overwrite wiphy interface_modes Move wiphy interface_modes configuration in mt76_alloc_device and mt76_alloc_phy in order to be overwritten by hw specific code since some drivers do not support all operating modes (mt7921 supports sta only in the current codebase) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e3fd9934cf6e22c30e843d1902695b2379318be0 Author: Deren Wu Date: Fri May 28 01:05:33 2021 +0800 mt76: mt7921: update statistic in active mode only wakeup chip every 250ms may cause huge power consumption try to update statistic counter only if in active status only, and it would lead fewer power cost Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 3cce2b98e0241ff238e25eca1dbb480534a7695a Author: Deren Wu Date: Fri May 28 19:38:09 2021 +0800 mt76: mt7921: introduce mac tx done handling Instead of read tx status from mac table, add new mechanisam to hanele tx done event for data frame, every 250ms This event indicate the real tx status of this pkt in mac layer and would help mac80211 correct status more frequently Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 3253f8fddd954aba9ac88ce3c34551dcca505b21 Author: Ryder Lee Date: Thu Apr 22 06:20:03 2021 +0800 mt76: mt7615: fix potential overflow on large shift Fix the following static checker warning: error: undefined (user controlled) shift '(((1))) << (c->omac_idx)' Fixes: 402a695b1ae6 ("mt76: mt7615: fix CSA notification for DBDC") Reported-by: Dan Carpenter Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 223cea6d3c974acd393bfac2d168b2945a6cf1e5 Author: Lorenzo Bianconi Date: Thu May 27 13:35:30 2021 +0200 mt76: testmode: remove undefined behaviour in mt76_testmode_alloc_skb Get rid of an undefined behaviour in mt76_testmode_alloc_skb routine allocating skb frames Fixes: 2601dda8faa76 ("mt76: testmode: add support to send larger packet") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d705ae86852d7676214c0a71479b52f528bdd0d1 Author: Lorenzo Bianconi Date: Thu May 27 13:35:29 2021 +0200 mt76: testmode: remove unnecessary function calls in mt76_testmode_free_skb Get rid of unnecessary function calls in mt76_testmode_free_skb routine since they are already managed by dev_kfree_skb Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fe2c3b1fc64ea0c7a5b2ca2f671b4572ff99baf8 Author: Lorenzo Bianconi Date: Thu May 27 13:35:28 2021 +0200 mt76: testmode: fix memory leak in mt76_testmode_alloc_skb Free all pending frames in case of failure in mt76_testmode_alloc_skb routine Fixes: 2601dda8faa76 ("mt76: testmode: add support to send larger packet") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ffce39bfb6073ff6f74a1332e6563b2d18392a5b Author: Lorenzo Bianconi Date: Thu May 27 13:01:24 2021 +0200 mt76: mt7615: remove useless if condition in mt7615_add_interface() Get rid of unnecessary if condition in mt7615_add_interface routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ae130bb8d4bd601f72ff7c93f049a498ecc58b87 Author: Shayne Chen Date: Tue May 25 18:34:09 2021 +0800 mt76: mt7915: use mt7915_mcu_get_txpower_sku() to get per-rate txpower Get per-rate txpower with mcu command. This is the preparation of co-driver for the next chipset, which has different tmac power registers but can share this same command. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit accbcea4f301e7db084b0a393de8100bdae26ce6 Author: Ryder Lee Date: Tue May 25 17:22:24 2021 +0800 mt76: mt7615: add .offset_tsf callback It's much more accurate than .get_tsf + .set_tsf and switch to use mt76_rmw to operate tsf registers. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 160731341845171fd0e5ecd39fe0a43cc9d9af36 Author: Ryder Lee Date: Tue May 25 16:45:14 2021 +0800 mt76: mt7915: add .offset_tsf callback It's much more accurate than .get_tsf + .set_tsf, and switch to use mt76_rmw to operate tsf registers. Tested-by: Xing Song Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 01f7da40917923bf9d8fd8d5c9a6ed646004e47c Author: Lorenzo Bianconi Date: Sun May 23 23:10:12 2021 +0200 mt76: mt7921: reset wfsys during hw probe This patch fixes a mcu hang during device probe on Marvell ESPRESSObin after a hot reboot. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d74c4b5667425c35d74906795a08e02e29df5b46 Author: Lorenzo Bianconi Date: Sun May 23 23:08:05 2021 +0200 mt76: mt7921: do not schedule hw reset if the device is not running Do not schedule hw full reset if the device is not fully initialized (e.g if the channel has not been configured yet). This patch fixes the kernel crash reported below [ 44.440266] mt7921e 0000:01:00.0: chip reset failed [ 44.527575] Unable to handle kernel paging request at virtual address ffffffc02f3e0000 [ 44.535771] Mem abort info: [ 44.538646] ESR = 0x96000006 [ 44.541792] EC = 0x25: DABT (current EL), IL = 32 bits [ 44.547268] SET = 0, FnV = 0 [ 44.550413] EA = 0, S1PTW = 0 [ 44.553648] Data abort info: [ 44.556613] ISV = 0, ISS = 0x00000006 [ 44.560563] CM = 0, WnR = 0 [ 44.563619] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000000955000 [ 44.570530] [ffffffc02f3e0000] pgd=100000003ffff003, p4d=100000003ffff003, pud=100000003ffff003, pmd=0000000000000000 [ 44.581489] Internal error: Oops: 96000006 [#1] SMP [ 44.606406] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.13.0-rc1-espressobin-12875-g6dc7f82ebc26 #33 [ 44.617264] Hardware name: Globalscale Marvell ESPRESSOBin Board (DT) [ 44.623905] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO BTYPE=--) [ 44.630100] pc : __queue_work+0x1f0/0x500 [ 44.634249] lr : __queue_work+0x1e8/0x500 [ 44.638384] sp : ffffffc010003d70 [ 44.641798] x29: ffffffc010003d70 x28: 0000000000000000 x27: ffffff8003989200 [ 44.649166] x26: ffffffc010c08510 x25: 0000000000000002 x24: ffffffc010ad90b0 [ 44.656533] x23: ffffffc010c08508 x22: 0000000000000012 x21: 0000000000000000 [ 44.663899] x20: ffffff8006385238 x19: ffffffc02f3e0000 x18: 00000000000003c9 [ 44.671266] x17: 0000000000000000 x16: 0000000000000000 x15: 000009b1a8a3bf90 [ 44.678632] x14: 0098968000000000 x13: 0000000000000000 x12: 0000000000000325 [ 44.685998] x11: ffffff803fda1928 x10: 0000000000000001 x9 : ffffffc010003e98 [ 44.693365] x8 : 0000000000000032 x7 : fff8000000000000 x6 : 0000000000000035 [ 44.700732] x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffffffc010adf700 [ 44.708098] x2 : ffffff8006385238 x1 : 000000007fffffff x0 : 0000000000000000 [ 44.715465] Call trace: [ 44.717982] __queue_work+0x1f0/0x500 [ 44.721760] delayed_work_timer_fn+0x18/0x20 [ 44.726167] call_timer_fn+0x2c/0x178 [ 44.729947] run_timer_softirq+0x488/0x5c8 [ 44.734172] _stext+0x11c/0x378 [ 44.737411] irq_exit+0x100/0x108 [ 44.740830] __handle_domain_irq+0x60/0xb0 [ 44.745059] gic_handle_irq+0x70/0x2b4 [ 44.748929] el1_irq+0xb8/0x13c [ 44.752167] arch_cpu_idle+0x14/0x30 [ 44.755858] default_idle_call+0x38/0x168 [ 44.759994] do_idle+0x1fc/0x210 [ 44.763325] cpu_startup_entry+0x20/0x58 [ 44.767372] rest_init+0xb8/0xc8 [ 44.770703] arch_call_rest_init+0xc/0x14 [ 44.774841] start_kernel+0x408/0x424 [ 44.778623] Code: aa1403e0 97fff54f aa0003f5 b5fff500 (f9400275) [ 44.784907] ---[ end trace be73c3142d8c36a9 ]--- [ 44.789668] Kernel panic - not syncing: Oops: Fatal exception in interrupt Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f5e3db30135f1157d2fac83f16e0347b1e38b9c5 Author: Lorenzo Bianconi Date: Sun May 23 23:03:26 2021 +0200 mt76: mt7921: return proper error value in mt7921_mac_init Return possible error values in mt7921_mac_init routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b4b880b90cb3863ca98e4ad55107d159742a79ae Author: YN Chen Date: Thu May 20 11:46:35 2021 +0800 mt76: connac: add bss color support for sta mode Add bss color support for sta mode Signed-off-by: Jayden.Kuo Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit a2d3442e3db1028f57efdeff26cd6e72a82cb648 Author: Lorenzo Bianconi Date: Thu May 20 11:46:41 2021 +0800 mt76: mt7921: enable runtime pm by default mt7921 is mainly used in CE/IoT market so enable runtime-pm by default Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 213f87289ea01514acdbfeed9f65bcb5f12aef70 Author: Sean Wang Date: Thu May 20 11:46:40 2021 +0800 mt76: mt7921: fix OMAC idx usage OMAC idx have to be same with BSS idx according to firmware usage. Fixes: e0f9fdda81bd ("mt76: mt7921: add ieee80211_ops") Reviewed-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit f86625ae0e35924ed495cdf0ff2d3133cb6e3010 Author: Sean Wang Date: Thu May 20 11:46:39 2021 +0800 mt76: mt7921: fix invalid register access in wake_work Make sure mt7921_pm_wake_work wouldn't be scheduled after the driver is in suspend mode to fix the following the kernel crash. [ 3515.390012] mt7921e 0000:01:00.0: calling pci_pm_suspend+0x0/0x22c @ 2869, parent: 0000:00:00.0 [ 3515.390015] mt7921e 0000:01:00.0: mt7921_pci_suspend + [ 3515.396395] anx7625 3-0058: anx7625_suspend+0x0/0x6c returned 0 after 0 usecs [ 3515.405965] mt7921e 0000:01:00.0: mt7921_pci_suspend - [ 3515.411336] usb 1-1.4: usb_dev_suspend+0x0/0x2c returned 0 after 1 usecs [ 3515.411513] SError Interrupt on CPU7, code 0xbe000011 -- SError [ 3515.411515] CPU: 7 PID: 2849 Comm: kworker/u16:27 Not tainted 5.4.114 #44 [ 3515.411516] Hardware name: MediaTek Asurada rev1 board (DT) [ 3515.411517] Workqueue: mt76 mt7921_pm_wake_work [mt7921e] [ 3515.411518] pstate: 80c00009 (Nzcv daif +PAN +UAO) [ 3515.411519] pc : mt76_mmio_rr+0x30/0xf0 [mt76] [ 3515.411520] lr : mt7921_rr+0x38/0x44 [mt7921e] [ 3515.411520] sp : ffffffc015813c50 [ 3515.411521] x29: ffffffc015813c50 x28: 0000000000000402 [ 3515.411522] x27: ffffffe5a2012138 x26: ffffffe5a1eea018 [ 3515.411524] x25: 00000000328be505 x24: 00000000000a0002 [ 3515.411525] x23: 0000000000000006 x22: ffffffbd29b7a300 [ 3515.411527] x21: ffffffbd29b7a300 x20: 00000000000e0010 [ 3515.411528] x19: 00000000eac08f43 x18: 0000000000000000 [ 3515.411529] x17: 0000000000000000 x16: ffffffe5a16b2914 [ 3515.411531] x15: 0000000000000010 x14: 0000000000000010 [ 3515.411532] x13: 00000000003dd3a2 x12: 0000000000010000 [ 3515.411533] x11: ffffffe597abec14 x10: 0000000000000010 [ 3515.411535] x9 : ffffffe597abeba8 x8 : ffffffc013ce0010 [ 3515.411536] x7 : 000000b2b5593519 x6 : 0000000000300000 [ 3515.411537] x5 : 0000000000000000 x4 : 0000000000000032 [ 3515.411539] x3 : 0000000000000000 x2 : 0000000000000004 [ 3515.411540] x1 : 00000000000e0010 x0 : ffffffbd29b7a300 [ 3515.411542] Kernel panic - not syncing: Asynchronous SError Interrupt [ 3515.411543] CPU: 7 PID: 2849 Comm: kworker/u16:27 Not tainted 5.4.114 #44 [ 3515.411544] Hardware name: MediaTek Asurada rev1 board (DT) [ 3515.411544] Workqueue: mt76 mt7921_pm_wake_work [mt7921e] [ 3515.411545] Call trace: [ 3515.411546] dump_backtrace+0x0/0x14c [ 3515.411546] show_stack+0x20/0x2c [ 3515.411547] dump_stack+0xa0/0xfc [ 3515.411548] panic+0x154/0x350 [ 3515.411548] panic+0x0/0x350 [ 3515.411549] arm64_serror_panic+0x78/0x84 [ 3515.411550] do_serror+0x0/0x118 [ 3515.411550] do_serror+0xa4/0x118 [ 3515.411551] el1_error+0x84/0xf8 [ 3515.411552] mt76_mmio_rr+0x30/0xf0 [mt76] [ 3515.411552] mt7921_rr+0x38/0x44 [mt7921e] [ 3515.411553] __mt76_poll_msec+0x5c/0x9c [mt76] [ 3515.411554] __mt7921_mcu_drv_pmctrl+0x50/0x94 [mt7921e] [ 3515.411555] mt7921_mcu_drv_pmctrl+0x38/0xb0 [mt7921e] [ 3515.411555] mt7921_pm_wake_work+0x34/0xd4 [mt7921e] [ 3515.411556] process_one_work+0x208/0x3c8 [ 3515.411557] worker_thread+0x23c/0x3e8 [ 3515.411557] kthread+0x144/0x178 [ 3515.411558] ret_from_fork+0x10/0x18 [ 3515.418831] SMP: stopping secondary CPUs [ 3515.418832] Kernel Offset: 0x2590c00000 from 0xffffffc010000000 [ 3515.418832] PHYS_OFFSET: 0xffffffc400000000 [ 3515.418833] CPU features: 0x080026,2a80aa18 [ 3515.418834] Memory Limit: none [DL] 00000000 00000000 010701 Fixes: 1d8efc741df80 ("mt76: mt7921: introduce Runtime PM support") Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit f07ac384b4579f294bb1e0380ed501156219ed71 Author: Sean Wang Date: Thu May 20 11:46:38 2021 +0800 mt76: mt7921: avoid unnecessary consecutive WiFi resets Avoid unnecessary consecutive WiFi resets by dropping reset request when reset work is working. Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit f011c3691a7efe66b1ef76bbf7821973b8490a15 Author: Deren Wu Date: Thu May 20 11:46:36 2021 +0800 mt76: connac: update BA win size in Rx direction Update BA size used data transimission in the Rx direction to improve Rx throughput. Reviewed-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: Leon Yen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 109e505ad944dc207aaa9ee134b0994be09d291d Author: Ryder Lee Date: Sat Apr 24 06:02:06 2021 +0800 mt76: mt7615: add thermal sensor device support Similar to mt7915, switching to use standard hwmon sysfs. For reading temperature, cat /sys/class/ieee80211/phy*/hwmon*/temp1_input Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 34b877d972bec8cbf397a57393317672cf92996f Author: Ryder Lee Date: Sat Apr 24 06:02:05 2021 +0800 mt76: mt7915: add thermal cooling device support Thermal cooling device support is added to control the temperature by throttling the data transmission for the given duration. Throttling is done by adjusting Tx period by given percentage of time. The thermal device allows user to configure duty cycle. Throttling can be disabled by setting the duty cycle to 0. The cooling device can be found under /sys/class/thermal/cooling_deviceX/. Corresponding soft link to this device can be found under phy folder To set duty cycle as 80%, echo 80 > /sys/class/ieee80211/phy*/cooling_device/cur_state Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 33fe9c639c13de03ce04a1dc2c904d66d1cd02eb Author: Ryder Lee Date: Sat Apr 24 06:02:04 2021 +0800 mt76: mt7915: add thermal sensor device support This provides userspace with a unified interface, hwmon sysfs, to monitor temperature in the hardware and can be adapted to system monitoring tools. For reading temperature, cat /sys/class/ieee80211/phy*/hwmon*/temp1_input Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 10de032a31683585292cd10b598d896d7bcf276f Author: Sean Wang Date: Mon May 10 23:14:57 2021 +0800 mt76: mt7921: add back connection monitor support Hw beacon cmd to the mt7921 firmware doesn't only filter out the beacon, but also performs its own connection monitoring, including periodic keep-alives to the AP and probing the AP on beacon loss. Will indicate the host with the event when the firmware detects the connection is lost. Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support") Reviewed-by: Lorenzo Bianconi Signed-off-by: Deren Wu Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit edb5aebc1c3db312e74e1dcf75b8626ee5300596 Author: Sean Wang Date: Mon May 10 23:14:55 2021 +0800 mt76: mt7921: consider the invalid value for to_rssi It is possible the RCPI from the certain antenna is an invalid value, especially packets are receiving while the system is frequently entering deep sleep mode, so consider calculating RSSI with the reasonable upper bound to avoid report the wrong value to the mac80211 layer. Fixes: 163f4d22c118 ("mt76: mt7921: add MAC support") Reviewed-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 193e5f22eeb2a9661bff8bc0d8519e6ded48c807 Author: YN Chen Date: Mon May 10 23:14:54 2021 +0800 mt76: connac: fix WoW with disconnetion and bitmap pattern Update MCU command usage to fix WoW configuration with disconnection and bitmap pattern and to avoid magic number. Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support") Reviewed-by: Lorenzo Bianconi Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 7bf0a71e839822bb6ba04a6e163ad334314e2659 Author: Sean Wang Date: Thu May 20 11:46:37 2021 +0800 mt76: mt7921: fix reset under the deep sleep is enabled To fix possibly the race to access register between the WiFi reset and the other context that is caused by explicitly cancelling ps_work and wake_work to break PM_STATE consistency. Deep sleep would cause the hardware into the inactive state, so we forcely put device drv_own state before we start to reset. The patch also ignore the reset request when the procedure is in progress to avoid the consecutive WiFi resets. localhost ~ # [ 2932.073966] SError Interrupt on CPU7, code 0xbe000011 [ 2932.073967] CPU: 7 PID: 8761 Comm: kworker/u16:2 Not tainted 5.4.112 #30 [ 2932.073968] Hardware name: MediaTek Asurada rev1 board (DT) [ 2932.073968] Workqueue: phy0 ieee80211_reconfig_filter [mac80211] [ 2932.073969] pstate: 80400089 (Nzcv daIf +PAN -UAO) [ 2932.073969] pc : el1_irq+0x78/0x180 [ 2932.073970] lr : mt76_mmio_rmw+0x30/0x5c [mt76] [ 2932.073970] sp : ffffffc01142bad0 [ 2932.073970] x29: ffffffc01142bc00 x28: ffffff8f96fb1e00 [ 2932.073971] x27: ffffffd2cdc12138 x26: ffffffd2cdaeb018 [ 2932.073972] x25: 0000000000000000 x24: ffffff8fa8e14c08 [ 2932.073973] x23: 0000000080c00009 x22: ffffffd2a5603918 [ 2932.073974] x21: ffffffc01142bc10 x20: 0000007fffffffff [ 2932.073975] x19: 0000000000000000 x18: 0000000000000400 [ 2932.073975] x17: 0000000000000400 x16: ffffffd2cd2b87dc [ 2932.073976] x15: 0000000000000000 x14: 0000000000000000 [ 2932.073977] x13: 0000000000000001 x12: 0000000000000001 [ 2932.073978] x11: 0000000000000001 x10: 000000000010e000 [ 2932.073978] x9 : 0000000000000000 x8 : ffffffc013921404 [ 2932.073979] x7 : 000000b2b5593519 x6 : 0000000000300000 [ 2932.073980] x5 : 0000000000000000 x4 : ffffffc01142bbc8 [ 2932.073980] x3 : 00000000000001f0 x2 : 0000000000000000 [ 2932.073981] x1 : 0000000000021404 x0 : ffffff8fa8e12300 [ 2932.073982] Kernel panic - not syncing: Asynchronous SError Interrupt [ 2932.073983] CPU: 7 PID: 8761 Comm: kworker/u16:2 Not tainted 5.4.112 #30 [ 2932.073983] Hardware name: MediaTek Asurada rev1 board (DT) [ 2932.073984] Workqueue: phy0 ieee80211_reconfig_filter [mac80211] [ 2932.073984] Call trace: [ 2932.073985] dump_backtrace+0x0/0x14c [ 2932.073985] show_stack+0x20/0x2c [ 2932.073985] dump_stack+0xa0/0xf8 [ 2932.073986] panic+0x154/0x360 [ 2932.073986] test_taint+0x0/0x44 [ 2932.073986] arm64_serror_panic+0x78/0x84 [ 2932.073987] do_serror+0x0/0x118 [ 2932.073987] do_serror+0xa4/0x118 [ 2932.073987] el1_error+0x84/0xf8 [ 2932.073988] el1_irq+0x78/0x180 [ 2932.073988] mt76_mmio_rr+0x30/0xf0 [mt76] [ 2932.073988] mt76_mmio_rmw+0x30/0x5c [mt76] [ 2932.073989] mt7921_rmw+0x4c/0x5c [mt7921e] [ 2932.073989] mt7921_configure_filter+0x138/0x160 [mt7921e] [ 2932.073990] ieee80211_configure_filter+0x2f0/0x3e0 [mac80211] [ 2932.073990] ieee80211_reconfig_filter+0x1c/0x28 [mac80211] [ 2932.073990] process_one_work+0x208/0x3c8 [ 2932.073991] worker_thread+0x23c/0x3e8 [ 2932.073991] kthread+0x140/0x17c [ 2932.073992] ret_from_fork+0x10/0x18 [ 2932.074071] SMP: stopping secondary CPUs [ 2932.074071] Kernel Offset: 0x12bc800000 from 0xffffffc010000000 [ 2932.074072] PHYS_OFFSET: 0xfffffff180000000 [ 2932.074072] CPU features: 0x080026,2a80aa18 [ 2932.074072] Memory Limit: none Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 4bfa291251623486711693a69d9eaa539478d340 Author: Sean Wang Date: Mon May 10 23:14:51 2021 +0800 mt76: connac: fw_own rely on all packet memory all being free If the device is MMIO-based, we must ensure all TxD/TxP on the host memory all being consumed by the device prior to safely switching to fw_own state. Fixes: ec7bd7b4a9c0 ("mt76: connac: check wake refcount in mcu_fw_pmctrl") Reviewed-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 2c80c02a682aefc073df2cfbb48c77c74579cb4a Author: Sean Wang Date: Mon May 10 23:14:50 2021 +0800 mt76: mt7921: Don't alter Rx path classifier Keep Rx path classifier the mt7921 firmware prefers to allow frames pass through MCU. Fixes: 5c14a5f944b9 ("mt76: mt7921: introduce mt7921e support") Reviewed-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 20eb83c749609199443972cf80fb6004fc36afc6 Author: Sean Wang Date: Mon May 10 23:14:49 2021 +0800 mt76: mt7921: fix mt7921_wfsys_reset sequence WiFi subsytem reset should control MT_WFSYS_SW_RST_B and then poll the same register until the bit WFSYS_SW_INIT_DONE bit is set. Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Reviewed-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 54c31b9e6507cd8183a27fa862cc3a407a332076 Author: Lorenzo Bianconi Date: Mon May 10 10:13:07 2021 +0200 mt76: mt7663: enable hw rx header translation As already done for mt7615 and mt7915, enable rx header translation offload for mt7663 in order to reduce cpu load in the rx path. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2f83054342dcce87e2f47b60af9aa7cfbcf4b80e Author: Lorenzo Bianconi Date: Mon May 10 09:13:03 2021 +0200 mt76: mt7615: free irq if mt7615_mmio_probe fails As already done for mt7915 and mt7921, free registered irq line if mt7615_mmio_probe routine fails Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 47cbf73cf924ce2202332f61e705f4ed9bd6a74e Author: Lorenzo Bianconi Date: Fri May 7 12:26:11 2021 +0200 mt76: mt76x0: use dev_debug instead of dev_err for hw_rf_ctrl BIT(0) in MT_EE_NIC_CONF_1 is use to notify the driver if the radio RF switch is controlled through a gpio. Use dev_debug instead of dev_err to log this info. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8d3cdc1bbb1d355f0ebef973175ae5fd74286feb Author: Lorenzo Bianconi Date: Tue Apr 27 12:07:14 2021 +0200 mt76: mt7615: fix NULL pointer dereference in tx_prepare_skb() Fix theoretical NULL pointer dereference in mt7615_tx_prepare_skb and mt7663_usb_sdio_tx_prepare_skb routines. This issue has been identified by code analysis. Fixes: 6aa4ed7927f11 ("mt76: mt7615: implement DMA support for MT7622") Fixes: 4bb586bc33b98 ("mt76: mt7663u: sync probe sampling with rate configuration") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d7400a2f3e295b8cee692c7a66e10f60015a3c37 Author: Lorenzo Bianconi Date: Tue Apr 27 12:05:00 2021 +0200 mt76: fix possible NULL pointer dereference in mt76_tx Even if this is not a real issue since mt76_tx is never run with wcid set to NULL, fix a theoretical NULL pointer dereference in mt76_tx routine Fixes: db9f11d3433f7 ("mt76: store wcid tx rate info in one u32 reduce locking") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 76be6c076c0774844670df818233c488538bae02 Author: Ryder Lee Date: Tue Apr 27 07:14:27 2021 +0800 mt76: mt7915: add .set_bitrate_mask() callback Add runtime configuration for bitrate mask. This update firmware rate control to add a boundary on top of table to limit the rate selection for each peer, so when user set bitrates vht-mcs-5 1:9, which actually means nss = 1 mcs = 0~9. This only applies to data frames as for other mgmt, mcast, bcast still use legacy rates as it is. Note that driver does not support GI configuration. Example: iw dev wlan0 set bitrates vht-mcs-5 1:9 he-mcs-5 2:7 iw dev wlan0 set bitrates legacy-5 6 he-mcs-5 2:0-11 Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit a441a77a736cd20e2f6529be4d610e5956bac6fa Author: Ryder Lee Date: Tue Apr 27 07:14:26 2021 +0800 mt76: mt7915: cleanup mt7915_mcu_sta_rate_ctrl_tlv() Remove obsoleted codes. This is the preparation for .set_bitrate_mask(). Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 0e75732764e86a7741d7807b4408cd02cbaf1e0c Author: Lorenzo Bianconi Date: Thu May 6 20:13:35 2021 +0200 mt76: mt7921: enable rx csum offload As already done for mt7615 and mt7915, enable hw rx checksum offload. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 24299fc869f7caded8ae30a33f205ab37be729d4 Author: Lorenzo Bianconi Date: Thu May 6 20:13:34 2021 +0200 mt76: mt7921: enable rx header traslation offload As already done for mt7615 and mt7915, enable rx header translation offload for mt7921 in order to reduce cpu load in the rx path. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 868fe07ee612f81a493504190cdfcc9d344c9dc3 Author: Lorenzo Bianconi Date: Thu May 6 20:13:33 2021 +0200 mt76: connac: add missing configuration in mt76_connac_mcu_wtbl_hdr_trans_tlv Add missing configuration parameters in mt76_connac_mcu_wtbl_hdr_trans_tlv routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5b0b5c6a1c2195942ac48ec8bbf567789f903353 Author: Lorenzo Bianconi Date: Thu May 6 20:13:32 2021 +0200 mt76: mt7921: enable rx hw de-amsdu Enable hw rx-amsdu de-aggregation support available in 7921 devices. This is a preliminary patch to enable rx checksum offload. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 861fad474ec7638aeca46a508da4ea81612374b9 Author: Dan Carpenter Date: Mon May 3 17:53:59 2021 +0300 mt76: mt7915: fix a signedness bug in mt7915_mcu_apply_tx_dpd() "idx" needs to be signed for the error handling to work. Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau commit 64cf5ad3c2fa841e4b416343a7ea69c63d60fa4e Author: Evelyn Tsai Date: Mon May 3 16:04:37 2021 +0800 mt76: mt7915: fix tssi indication field of DBDC NICs Correct the bitfield which indicates TSSI on/off for MT7915D NIC. Signed-off-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 54b8fdebe4f45aafb61a0c73872a50d53791b091 Author: Lorenzo Bianconi Date: Thu Apr 29 18:32:56 2021 +0200 mt76: move mt76_rates in mt76 module Move mt76_rates array in mt76 module and remove duplicated code since it is shared by all drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit aaf35899668ffca7999f8a5b02bf051b5fe5dc1a Author: Geert Uytterhoeven Date: Fri Jun 18 21:24:31 2021 -0700 dt-bindings: input: touchscreen: st1232: Convert to json-schema Convert the Sitronix st1232/st1633 touchscreen controller Device Tree binding documentation to json-schema. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Acked-by: Martin Kepplinger Link: https://lore.kernel.org/r/fbba650cff07780c28ad6dd8dbef5cc1451b7762.1623418065.git.geert+renesas@glider.be Signed-off-by: Dmitry Torokhov commit c2d7ed9d680fd14aa5486518bd0d0fa5963c6403 Author: Tyson Moore Date: Mon Jun 14 10:17:45 2021 -0700 Input: i8042 - fix typos in comments This trivial patch fixes two spelling typos in i8042.c: - 'i8042_unlock_ship()' to 'i8042_unlock_chip()' - 'i8042_controller init' to 'i8042_controller_init' Signed-off-by: Tyson Moore Link: https://lore.kernel.org/r/20210612060753.28968-1-tyson@tyson.me Signed-off-by: Dmitry Torokhov commit 552e4047f3341ead7c7d61eddfc5c39dbf20452b Author: Oleh Kravchenko Date: Thu Jun 10 15:16:17 2021 -0700 Input: add SparkFun Qwiic Joystick driver A simple analog joystick built on Low Power ATtiny85 Microcontroller. Directional movements are measured with two 10 kΩ potentiometers connected with a gimbal mechanism that separates the horizontal and vertical movements. This joystick also has a select button that is actuated when the joystick is pressed down. Input events polled over the I2C bus. Product page: https://www.sparkfun.com/products/15168 Firmware and hardware sources: https://github.com/sparkfun/Qwiic_Joystick Tested on RPi4B and O4-iMX-NANO boards. Signed-off-by: Oleh Kravchenko Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210608223130.16830-2-oleg@kaa.org.ua Signed-off-by: Dmitry Torokhov commit 9b2336965a4c664b200af81f6bc214757b9f64e2 Author: Oleh Kravchenko Date: Thu Jun 10 15:15:52 2021 -0700 dt-bindings: Add vendor prefix and bindings for Qwiic Joystick Add vendor prefix for SparkFun Electronics. Update trivial-devices.yaml with SparkFun Qwiic Joystick description. Signed-off-by: Oleh Kravchenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210608223130.16830-1-oleg@kaa.org.ua Signed-off-by: Dmitry Torokhov commit 041761f4a4db662e38b4ae9d510b8beb24c7d4b6 Author: Kees Cook Date: Wed Jun 16 14:24:37 2021 -0700 scsi: aha1740: Avoid over-read of sense buffer In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. SCtmp->sense_buffer is 96 bytes, but ecbptr->sense is 14 bytes. Instead of over-reading ecbptr->sense, copy only the actual contents and zero pad the remaining bytes, avoiding potential over-reads. Link: https://lore.kernel.org/r/20210616212437.1727088-1-keescook@chromium.org Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit 86a6a0bdbe2beb4cc7bc80eccd835b62a1f0c364 Author: Kees Cook Date: Wed Jun 16 14:24:28 2021 -0700 scsi: arcmsr: Avoid over-read of sense buffer In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. pcmd->sense_buffer is 96 bytes, and was being manually zero-filled. However, struct SENSE_DATA is 18 bytes, with ccb->arcmsr_cdb.SenseData only being 15 bytes, resulting in a 3 byte over-read. Copy only the contents of ccb->arcmsr_cdb.SenseData and zero fill the remainder, avoiding potential over-reads. Link: https://lore.kernel.org/r/20210616212428.1726958-1-keescook@chromium.org Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit 4ab293c2809efa1499c3290ff007d98a9ee2fab2 Author: Kees Cook Date: Wed Jun 16 14:24:08 2021 -0700 scsi: ips: Avoid over-read of sense buffer In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy() avoid intentionally reading across neighboring array fields. scb->scsi_cmd->sense_buffer is 96 bytes: #define SCSI_SENSE_BUFFERSIZE 96 tapeDCDB->sense_info is 56 bytes: typedef struct { ... uint8_t sense_info[56]; } IPS_DCDB_TABLE_TAPE, ... scb->dcdb.sense_info is 64 bytes: typedef struct { ... uint8_t sense_info[64]; ... } IPS_DCDB_TABLE, ... Copying 96 bytes from either was copying beyond the end of the respective buffers, leading to potential memory content exposures. Correctly copy the actual buffer contents and zero pad the remaining bytes. Link: https://lore.kernel.org/r/20210616212408.1726812-1-keescook@chromium.org Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit d8b34a32a44078abef55e9fee5b3ddc7755d7c30 Author: Zou Wei Date: Thu Jun 17 19:32:02 2021 +0800 scsi: ufs: ufs-mediatek: Add missing of_node_put() in ufs_mtk_probe() The function is missing a of_node_put() on node. Fix this by adding the call before returning. Link: https://lore.kernel.org/r/1623929522-4389-1-git-send-email-zou_wei@huawei.com Reported-by: Hulk Robot Reviewed-by: Stanley Chu Signed-off-by: Zou Wei Signed-off-by: Martin K. Petersen commit 7cca85dff2d2a67836ecb2f4bf6466bc5080e007 Author: Dan Carpenter Date: Fri Jun 18 16:43:59 2021 +0300 scsi: elx: libefc: Fix IRQ restore in efc_domain_dispatch_frame() Calling a nested spin_lock_irqsave() will overwrite the original "flags" so that they can not be enabled again at the end. Link: https://lore.kernel.org/r/YMyjH16k4M1yEmmU@mwanda Fixes: 3146240f19bf ("scsi: elx: libefc: FC Domain state machine interfaces") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 99cf922692021823bd2f87aa307fa6cb28e91ad1 Author: Colin Ian King Date: Wed Jun 16 18:04:01 2021 +0100 scsi: elx: libefc: Fix less than zero comparison of a unsigned int The comparison of the u32 variable rc to less than zero always false because it is unsigned. Fix this by making it an int. Link: https://lore.kernel.org/r/20210616170401.15831-1-colin.king@canonical.com Fixes: 202bfdffae27 ("scsi: elx: libefc: FC node ELS and state handling") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unsigned compared against 0") commit ae3272ec5e9772de143b6326b2c3a61529786ddd Author: James Smart Date: Fri Jun 18 16:30:04 2021 -0700 scsi: elx: efct: Fix pointer error checking in debugfs init debugfs_create_xxx routines, which return pointers, are being checked for error by looking for NULL values. The routines may return pointer-munged -Exxx codes, so they should be using IS_ERR() to adapt. There are two cases: - The first case is on initial directory creation, which actually doesn't need to be checked. So remove the check. - Creation of the sessions subdirectory. Modify this creation to create under the initial directory created, and fix failure check. Link: https://lore.kernel.org/r/20210618233004.83769-1-jsmart2021@gmail.com Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines") Reported-by: Dan Carpenter Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ca7f33c6b4a9b9893a5ba3aac57e7255510a4aac Author: James Smart Date: Fri Jun 18 16:15:24 2021 -0700 scsi: elx: efct: Fix is_originator return code type efct_hw_iotype_is_originator() is returning a negative (-EIO) status which doesn't make sense for a u8 function type. Reviewing the code, the function only needs to return true/false, thus a bool status is most appropriate. Change the function return type and patch up the one callee as the bool inverses the if check. Link: https://lore.kernel.org/r/20210618231524.83179-1-jsmart2021@gmail.com Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines") Reported-by: Dan Carpenter Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d66a65b7f5d219528520e287ff53aea1b5252ec3 Author: James Smart Date: Fri Jun 18 10:40:50 2021 -0700 scsi: elx: efct: Fix link error for _bad_cmpxchg cmpxchg is being used on a bool type, which is requiring architecture support that isn't compatible with a bool. Convert variable abort_in_progress from bool to int. Link: https://lore.kernel.org/r/20210618174050.80302-1-jsmart2021@gmail.com Fixes: ebc076b3eddc ("scsi: elx: efct: Tie into kernel Kconfig and build process") Reported-by: kernel test robot Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0d7be7a8a0090b1c3b982c2b1a944d0d5cad7b39 Author: Nathan Chancellor Date: Wed Jun 16 23:31:23 2021 -0700 scsi: elx: efct: Eliminate unnecessary boolean check in efct_hw_command_cancel() clang warns: drivers/scsi/elx/efct/efct_hw.c:1523:17: warning: address of array 'ctx->buf' will always evaluate to 'true' [-Wpointer-bool-conversion] (!ctx->buf ? U32_MAX : *((u32 *)ctx->buf))); ~~~~~~^~~ buf is an array in the middle of a struct so deferencing it is not a problem as long as ctx is not NULL. Eliminate the check, which fixes the warning. Link: https://github.com/ClangBuiltLinux/linux/issues/1398 Link: https://lore.kernel.org/r/20210617063123.21239-1-nathan@kernel.org Fixes: 580c0255e4ef ("scsi: elx: efct: RQ buffer, memory pool allocation and deallocation APIs") Reviewed-by: James Smart Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit a25503617834920e772b9abda608d902dbf26b5c Author: Nathan Chancellor Date: Wed Jun 16 23:17:21 2021 -0700 scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session() clang warns: drivers/scsi/elx/efct/efct_lio.c:1216:24: warning: variable 'id' is uninitialized when used here [-Wuninitialized] se_sess, node, id); ^~ Shuffle the debug print after id's initialization so that the actual value is printed. Link: https://github.com/ClangBuiltLinux/linux/issues/1397 Link: https://lore.kernel.org/r/20210617061721.2405511-1-nathan@kernel.org Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines") Reviewed-by: James Smart Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit 41962aba2dc622b456aaf3c20e1089084714f73f Author: Wei Yongjun Date: Thu Jun 17 02:48:37 2021 +0000 scsi: elx: efct: Fix error handling in efct_hw_init() Fix to return negative error code -ENOMEM from the error handling case instead of 0. Also fix typo in error message. Link: https://lore.kernel.org/r/20210617024837.1023069-1-weiyongjun1@huawei.com Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines") Reported-by: Hulk Robot Reviewed-by: James Smart Signed-off-by: Wei Yongjun Signed-off-by: Martin K. Petersen commit 61bf3fdb5dd0e6980a6b514a924ea1da75e2a946 Author: Colin Ian King Date: Wed Jun 16 18:16:21 2021 +0100 scsi: elx: efct: Remove redundant initialization of variable lun The variable "lun" is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Link: https://lore.kernel.org/r/20210616171621.16176-1-colin.king@canonical.com Reviewed-by: James Smart Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unused value") commit 5911429343a87bdc8575915c9f6a9a2ddb6af7fe Author: Colin Ian King Date: Wed Jun 16 15:26:37 2021 +0100 scsi: elx: efct: Fix spelling mistake "Unexected" -> "Unexpected" There is a spelling mistake in a efc_log_info message. Fix it. Link: https://lore.kernel.org/r/20210616142637.12706-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 66b4d63bddccc99b8710bbafb036274da1b2e5ad Author: James Smart Date: Fri Jun 18 10:18:42 2021 -0700 scsi: lpfc: Fix build error in lpfc_scsi.c Integration with VMID patches resulted in a build error when CONFIG_DEBUG_FS is disabled and driver option CONFIG_SCSI_LPFC_DEBUG_FS is disabled. It results in an undefined variable: lpfc_scsi:5595:3: error: 'uuid' undeclared (first use in this function); did you mean 'upid'? Link: https://lore.kernel.org/r/20210618171842.79710-1-jsmart2021@gmail.com Fixes: 33c79741deaf ("scsi: lpfc: vmid: Introduce VMID in I/O path") Reported-by: kernel test robot Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 79366f0a8de24fc451017b710467deaa2811d6eb Author: Colin Ian King Date: Thu Jun 17 12:43:47 2021 +0100 scsi: target: iscsi: Remove redundant continue statement The continue statement at the end of a loop has no effect, remove it. Link: https://lore.kernel.org/r/20210617114347.10247-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Continue has no effect") commit 2e72bf7ec71d62f758f64cdfb17bbb98d649dd2d Author: Colin Ian King Date: Thu Jun 17 08:37:43 2021 +0100 scsi: qla4xxx: Remove redundant continue statement The continue statement at the end of a for-loop has no effect, remove it. Link: https://lore.kernel.org/r/20210617073743.151008-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Continue has no effect") commit 364fb4e512774038c720ab160535b0b30969bed8 Author: Andy Shevchenko Date: Wed Jun 16 17:25:40 2021 +0300 scsi: ppa: Switch to use module_parport_driver() Switch to use module_parport_driver() to reduce boilerplate code. Link: https://lore.kernel.org/r/20210616142540.45676-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 0e025183f177944a541bd5feb29f0c4e232b2618 Author: Andy Shevchenko Date: Wed Jun 16 17:24:29 2021 +0300 scsi: imm: Switch to use module_parport_driver() Switch to use module_parport_driver() to reduce boilerplate code. Link: https://lore.kernel.org/r/20210616142429.45373-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit d6c2ce435ffe23ef7f395ae76ec747414589db46 Author: Zhen Lei Date: Fri May 14 16:13:00 2021 +0800 scsi: mpt3sas: Fix error return value in _scsih_expander_add() When an expander does not contain any 'phys', an appropriate error code -1 should be returned, as done elsewhere in this function. However, we currently do not explicitly assign this error code to 'rc'. As a result, 0 was incorrectly returned. Link: https://lore.kernel.org/r/20210514081300.6650-1-thunder.leizhen@huawei.com Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit cf750be8e68e8c2755f0ee29784463a2da91e922 Author: Suganath Prabu S Date: Fri Jun 18 21:25:06 2021 +0530 scsi: mpt3sas: Fix Coverity reported issue Fix the structurally dead code (UNREACHABLE) type of error reported by Coverity. Link: https://lore.kernel.org/r/20210618155506.2609112-1-suganath-prabu.subramani@broadcom.com Reported-by: Colin Ian King Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit adc2e56ebe6377f5c032d96aee0feac30a640453 Merge: 4bea7207a80c8 9ed13a17e38e0 Author: Jakub Kicinski Date: Fri Jun 18 19:47:02 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Trivial conflicts in net/can/isotp.c and tools/testing/selftests/net/mptcp/mptcp_connect.sh scaled_ppm_to_ppb() was moved from drivers/ptp/ptp_clock.c to include/linux/ptp_clock_kernel.h in -next so re-apply the fix there. Signed-off-by: Jakub Kicinski commit cdbbe6ce26f6e991014596e50d6be280fbc302be Author: Wolfram Sang Date: Mon Jun 7 14:48:28 2021 +0200 dt-bindings: timer: renesas,tmu: add r8a779a0 TMU support Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210607124828.1984-1-wsa+renesas@sang-engineering.com Signed-off-by: Rob Herring commit 6fe3a4ab4c3138fa0bce960708c605d99d421c0c Author: Yang Yingliang Date: Fri Jun 4 15:14:07 2021 +0800 scsi: mpi3mr: Make some symbols static Fix the following warnings: drivers/scsi/mpi3mr/mpi3mr_os.c:24:5: warning: symbol 'prot_mask' was not declared. Should it be static? drivers/scsi/mpi3mr/mpi3mr_os.c:28:5: warning: symbol 'prot_guard_mask' was not declared. Should it be static? drivers/scsi/mpi3mr/mpi3mr_os.c:31:5: warning: symbol 'logging_level' was not declared. Should it be static? Link: https://lore.kernel.org/r/20210604071407.1360742-1-yangyingliang@huawei.com Reported-by: Hulk Robot Acked-by: Kashyap Desai Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit a254eae30b45bb5f03b66e6b1047829cd4337976 Author: Yang Yingliang Date: Thu Jun 3 23:16:53 2021 +0800 scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc() Fix to return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/20210603151653.711020-1-yangyingliang@huawei.com Fixes: fb9b04574f14 ("scsi: mpi3mr: Add support for recovering controller") Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Reported-by: Hulk Robot Acked-by: Kashyap Desai Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit f9dc034d0402be35288959bfb44a41363be2b13e Author: Yang Yingliang Date: Thu Jun 3 23:28:03 2021 +0800 scsi: mpi3mr: Fix missing unlock on error Goto unlock path before return from function in the error handling case. Link: https://lore.kernel.org/r/20210603152803.717505-1-yangyingliang@huawei.com Fixes: c9566231cfaf ("scsi: mpi3mr: Create operational request and reply queue pair") Reported-by: Hulk Robot Acked-by: Kashyap Desai Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit 3078d964c0fe6cf8eba197c862d1011cb7c0e7b4 Author: Oz Shlomo Date: Thu Jun 17 09:50:06 2021 +0300 docs: networking: Update connection tracking offload sysctl parameters Document the following connection offload configuration parameters: - nf_flowtable_tcp_timeout - nf_flowtable_tcp_pickup - nf_flowtable_udp_timeout - nf_flowtable_udp_pickup Signed-off-by: Oz Shlomo Signed-off-by: Pablo Neira Ayuso commit 24981fa336b61f2c5b305ab62e571c7196323cfb Author: Michel Dänzer Date: Wed Jun 16 12:46:51 2021 +0200 drm/amdgpu: Call drm_framebuffer_init last for framebuffer init Once drm_framebuffer_init has returned 0, the framebuffer is hooked up to the reference counting machinery and can no longer be destroyed with a simple kfree. Therefore, it must be called last. If drm_framebuffer_init returns 0 but its caller then returns non-0, there will likely be memory corruption fireworks down the road. The following lead me to this fix: [ 12.891228] kernel BUG at lib/list_debug.c:25! [...] [ 12.891263] RIP: 0010:__list_add_valid+0x4b/0x70 [...] [ 12.891324] Call Trace: [ 12.891330] drm_framebuffer_init+0xb5/0x100 [drm] [ 12.891378] amdgpu_display_gem_fb_verify_and_init+0x47/0x120 [amdgpu] [ 12.891592] ? amdgpu_display_user_framebuffer_create+0x10d/0x1f0 [amdgpu] [ 12.891794] amdgpu_display_user_framebuffer_create+0x126/0x1f0 [amdgpu] [ 12.891995] drm_internal_framebuffer_create+0x378/0x3f0 [drm] [ 12.892036] ? drm_internal_framebuffer_create+0x3f0/0x3f0 [drm] [ 12.892075] drm_mode_addfb2+0x34/0xd0 [drm] [ 12.892115] ? drm_internal_framebuffer_create+0x3f0/0x3f0 [drm] [ 12.892153] drm_ioctl_kernel+0xe2/0x150 [drm] [ 12.892193] drm_ioctl+0x3da/0x460 [drm] [ 12.892232] ? drm_internal_framebuffer_create+0x3f0/0x3f0 [drm] [ 12.892274] amdgpu_drm_ioctl+0x43/0x80 [amdgpu] [ 12.892475] __se_sys_ioctl+0x72/0xc0 [ 12.892483] do_syscall_64+0x33/0x40 [ 12.892491] entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: f258907fdd835e "drm/amdgpu: Verify bo size can fit framebuffer size on init." Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit d9db759652044ea96fc2905d2c5f926f30ca3413 Author: Wan Jiabing Date: Wed Jun 16 22:40:17 2021 +0800 drm/display: Fix duplicated argument Fix coccicheck warning: ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c: 55:12-42: duplicated argument to && or || Reviewed-by: Harry Wentland Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit dc22356c8f118007040b27d5b4d75031c5a699f2 Author: Shaokun Zhang Date: Fri Jun 18 09:23:23 2021 +0800 drm/amd/display: Remove the repeated dpp1_full_bypass declaration Function 'dpp1_full_bypass' is declared twice, so remove the repeated declaration and unnessary blank line. Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Shaokun Zhang Signed-off-by: Alex Deucher commit bb82ea3b0423fbbfd46ac27215df5af7a2fba923 Author: Gustavo A. R. Silva Date: Wed Jun 16 15:52:06 2021 -0500 drm/amd/display: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix the following warning by replacing a /* fall through */ comment with the new pseudo-keyword macro fallthrough: rivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:672:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER: ^ Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings, so in order to globally enable -Wimplicit-fallthrough for Clang, these comments need to be replaced with fallthrough; in the whole codebase. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Harry Wentland Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 23549470eaf9f7c0897822ad2d06118b2dfccbd1 Author: Pu Lehui Date: Thu Jun 17 09:16:32 2021 +0800 drm/amd/display: remove unused variable 'dc' GCC reports the following warning with W=1: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_psr.c:70:13: warning: variable ‘dc’ set but not used [-Wunused-but-set-variable] 70 | struct dc *dc = NULL; | ^~ This variable is not used in function, this commit remove it to fix the warning. Reviewed-by: Harry Wentland Signed-off-by: Pu Lehui Signed-off-by: Alex Deucher commit 85019b19d484b0616dd7b68ffbca2e01d28b5c8b Author: Pu Lehui Date: Thu Jun 17 10:31:09 2021 +0800 drm/amd/display: Fix gcc unused variable warning GCC reports the following warning with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3635:17: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 3635 | enum dc_status status = DC_ERROR_UNEXPECTED; | ^~~~~~ The variable should be used for error check, let's fix it. Reviewed-by: Harry Wentland Signed-off-by: Pu Lehui Signed-off-by: Alex Deucher commit 56f221b6389e7ab99c30bbf01c71998ae92fc584 Author: xinhui pan Date: Tue Jun 15 15:11:07 2021 +0800 drm/amdkfd: Walk through list with dqm lock hold To avoid any list corruption. Signed-off-by: xinhui pan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 376002f4b028504a07868f7ee96ad41e0f69ae09 Author: Bokun Zhang Date: Tue Jan 5 16:15:57 2021 -0500 drm/amd/amdgpu: Use IP discovery data to determine VCN enablement instead of MMSCH In the past, we use MMSCH to determine whether a VCN is enabled or not. This is not reliable since after a FLR, MMSCH may report junk data. It is better to use IP discovery data. Signed-off-by: Bokun Zhang Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 942ab769c51d1a0447d080fcb91c1217f7c0c0c4 Author: Yifan Zhang Date: Thu Jun 17 21:50:41 2021 +0800 drm/amdgpu: remove unused parameter in amdgpu_gart_bind Pagelist is no long used in amdgpu_gart_bind. Remove it. Signed-off-by: Yifan Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f1802aa706893e670123789d625161c9e5afe772 Author: Yifan Zha Date: Fri Jun 11 18:31:01 2021 +0800 drm/amd/pm: Disable SMU messages in navi10 sriov [Why] sriov vf send unsupported SMU message lead to fail. [How] disable related messages in sriov. Signed-off-by: Yifan Zha Acked-by: Jingwen Chen Reviewed-by: Jack Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 513befa63446cea8d399fd78761fc11ae518143d Author: Stanley.Yang Date: Fri Jun 11 15:38:50 2021 +0800 drm/amdgpu: message smu to update hbm bad page number Use SMU to update the bad pages rather than directly accessing the EEPROM from the driver. Signed-off-by: Stanley.Yang Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 7c5f3d7d61619cc03b4c4876120b923dbd44a553 Author: Ashish Pawar Date: Thu Jun 17 13:51:23 2021 +0800 drm/amdgpu: PWRBRK sequence changes for Aldebaran Modify power brake enablement sequence on Aldebaran Signed-off-by: Ashish Pawar Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 6ec598cc9dfbf40433e94a2ed1a622e3ef80268b Author: Stanley.Yang Date: Wed Jun 16 21:14:01 2021 +0800 drm/amdgpu: fix bad address translation for sienna_cichlid Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 09b6744cc629d1fc1526b65b1585a1603d62ce7d Author: Darren Powell Date: Wed Jun 16 00:12:19 2021 -0400 amdgpu/pm: replaced snprintf usage in amdgpu_pm.c with sysfs_emit replaced snprintf usage in amdgpu_pm.c with sysfs_emit fixed warning on comparing int with uint32_t in amdgpu_get_pp_num_states() == Test == AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} lspci -nn | grep "VGA\|Display" > scnprintf.test.log FILES="pp_num_states pp_od_clk_voltage pp_features pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_vclk pp_dpm_dclk pp_dpm_dcefclk pp_power_profile_mode " for f in $FILES do echo === $f === >> scnprintf.test.log cat $HWMON_DIR/device/$f >> scnprintf.test.log done Signed-off-by: Darren Powell Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit c9cfbf7f44bf17001f597360c8b642ae3ec91bfc Author: Eric Huang Date: Wed Jun 16 11:42:13 2021 -0400 drm/amdkfd: Set iolink non-coherent in topology Fix non-coherent bit of iolink properties flag which always is 0. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5fd953a3f6e25859ad1633ccd9f6320f1067a46d Author: Rodrigo Siqueira Date: Tue Jun 8 13:37:18 2021 -0400 drm/amd/display: Add Freesync video documentation Recently, we added support for an experimental feature named Freesync video; for more details on that, refer to: commit 6f59f229f8ed ("drm/amd/display: Skip modeset for front porch change") commit d10cd527f5e5 ("drm/amd/display: Add freesync video modes based on preferred modes") commit 0eb1af2e8205 ("drm/amd/display: Add module parameter for freesync video mode") Nevertheless, we did not document it in detail in our driver. This commit introduces a kernel-doc and expands the module parameter description. Cc: Aurabindo Pillai Cc: Sean Paul Cc: Harry Wentland Signed-off-by: Rodrigo Siqueira Reviewed by: Aurabindo Pillai Signed-off-by: Alex Deucher commit f42cfb469f9b4a1c002a03cce3d9329376800a6f Author: Grant Seltzer Date: Fri Jun 18 14:04:59 2021 +0000 bpf: Add documentation for libbpf including API autogen This patch is meant to start the initiative to document libbpf. It includes .rst files which are text documentation describing building, API naming convention, as well as an index to generated API documentation. In this approach the generated API documentation is enabled by the kernels existing kernel documentation system which uses sphinx. The resulting docs would then be synced to kernel.org/doc You can test this by running `make htmldocs` and serving the html in Documentation/output. Since libbpf does not yet have comments in kernel doc format, see kernel.org/doc/html/latest/doc-guide/kernel-doc.html for an example so you can test this. The advantage of this approach is to use the existing sphinx infrastructure that the kernel has, and have libbpf docs in the same place as everything else. The current plan is to have the libbpf mirror sync the generated docs and version them based on the libbpf releases which are cut on github. This patch includes the addition of libbpf_api.rst which pulls comment documentation from header files in libbpf under tools/lib/bpf/. The comment docs would be of the standard kernel doc format. Signed-off-by: Grant Seltzer Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210618140459.9887-2-grantseltzer@gmail.com commit 26c0504ad3e0fdee808dbf458dd31d7c12469ef9 Author: Alex Deucher Date: Tue Jun 15 17:29:44 2021 -0400 drm/amdgpu/vcn3: drop extraneous Beige Goby hunk Probably a rebase leftover. This doesn't apply to SR-IOV, and the non-SR-IOV code below it already handles this properly. Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit ceaf9f57195c458a94487965441926998fcadcfd Author: Aurabindo Pillai Date: Wed Jun 16 09:41:38 2021 -0400 drm/amd/display: Increase stutter watermark for dcn302 and dcn303 [Why] Current watermarks end up programming lowers watermarks which results in screen flickering and underflow for certain modes like 1440p. [How] Add 11us to stutter exit & stutter enter plus exit watermark. Signed-off-by: Aurabindo Pillai Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e11d5e0d68cb7f1d796a25fac046e64d3696f22f Author: Stanley.Yang Date: Tue Jun 15 16:26:49 2021 +0800 drm/amdgpu: add vega20 to ras quirk list Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 84408d5f3892534da9e8e5d5b21126c91f8cac1a Author: xinhui pan Date: Wed Jun 16 12:32:34 2021 +0800 drm/amdgpu: Set TTM_PAGE_FLAG_SG earlier for userprt BOs Because TTM do page counting on userptr BOs which is actually not needed. To avoid that, lets set TTM_PAGE_FLAG_SG after tt_create and before tt_populate. Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4bea7207a80c8bba3b3eb5b84c407b162968475f Merge: 01bf086b7c836 31c143f712750 Author: David S. Miller Date: Fri Jun 18 13:13:40 2021 -0700 Merge branch 'RPMSG-WWAN-CTRL-driver' Stephan Gerhold says: ==================== net: wwan: Add RPMSG WWAN CTRL driver This patch series adds a WWAN "control" driver for the remote processor messaging (rpmsg) subsystem. This subsystem allows communicating with an integrated modem DSP on many Qualcomm SoCs, e.g. MSM8916 or MSM8974. The driver is a fairly simple glue layer between WWAN and RPMSG and is mostly based on the existing mhi_wwan_ctrl.c and rpmsg_char.c. For more information, see commit message in PATCH 2/3. I already posted a RFC for this a while ago: https://lore.kernel.org/linux-arm-msm/YLfL9Q+4860uqS8f@gerhold.net/ and now I'm looking for some feedback for the actual changes. :) Changes in v3: - PATCH 2/3: Clarify commit message - PATCH 3/3: Fix build error for cdc-wdm.c, use extra tx_blocking() op instead v2: https://lore.kernel.org/netdev/20210618075243.42046-1-stephan@gerhold.net/ Changes in v2: Only in PATCH 3/3 - Fix EPOLLOUT being always set even if poll op is defined - Rename poll() op -> tx_poll() since it should be only used for TX v1: https://lore.kernel.org/netdev/20210615133229.213064-1-stephan@gerhold.net/ ==================== Signed-off-by: David S. Miller commit 31c143f712750143abaca396236bbe8707700111 Author: Stephan Gerhold Date: Fri Jun 18 19:36:11 2021 +0200 net: wwan: Allow WWAN drivers to provide blocking tx and poll function At the moment, the WWAN core provides wwan_port_txon/off() to implement blocking writes. The tx() port operation should not block, instead wwan_port_txon/off() should be called when the TX queue is full or has free space again. However, in some cases it is not straightforward to make use of that functionality. For example, the RPMSG API used by rpmsg_wwan_ctrl.c does not provide any way to be notified when the TX queue has space again. Instead, it only provides the following operations: - rpmsg_send(): blocking write (wait until there is space) - rpmsg_trysend(): non-blocking write (return error if no space) - rpmsg_poll(): set poll flags depending on TX queue state Generally that's totally sufficient for implementing a char device, but it does not fit well to the currently provided WWAN port ops. Most of the time, using the non-blocking rpmsg_trysend() in the WWAN tx() port operation works just fine. However, with high-frequent writes to the char device it is possible to trigger a situation where this causes issues. For example, consider the following (somewhat unrealistic) example: # dd if=/dev/zero bs=1000 of=/dev/wwan0qmi0 dd: error writing '/dev/wwan0qmi0': Resource temporarily unavailable 1+0 records out This fails immediately after writing the first record. It's likely only a matter of time until this triggers issues for some real application (e.g. ModemManager sending a lot of large QMI packets). The rpmsg_char device does not have this problem, because it uses rpmsg_trysend() and rpmsg_poll() to support non-blocking operations. Make it possible to use the same in the RPMSG WWAN driver by adding two new optional wwan_port_ops: - tx_blocking(): send data blocking if allowed - tx_poll(): set additional TX poll flags This integrates nicely with the RPMSG API and does not require any change in existing WWAN drivers. With these changes, the dd example above blocks instead of exiting with an error. Cc: Loic Poulain Signed-off-by: Stephan Gerhold Signed-off-by: David S. Miller commit 5e90abf49c2adfbd6954429c2a1aafdfe9fcab92 Author: Stephan Gerhold Date: Fri Jun 18 19:36:10 2021 +0200 net: wwan: Add RPMSG WWAN CTRL driver The remote processor messaging (rpmsg) subsystem provides an interface to communicate with other remote processors. On many Qualcomm SoCs this is used to communicate with an integrated modem DSP that implements most of the modem functionality and provides high-level protocols like QMI or AT to allow controlling the modem. For QMI, most older Qualcomm SoCs (e.g. MSM8916/MSM8974) have a standalone "DATA5_CNTL" channel that allows exchanging QMI messages. Note that newer SoCs (e.g. SDM845) only allow exchanging QMI messages via a shared QRTR channel that is available via a socket API on Linux. For AT, the "DATA4" channel accepts at least a limited set of AT commands, on many older and newer Qualcomm SoCs, although QMI is typically the preferred control protocol. Often there are additional QMI/AT channels (usually named DATA*_CNTL for QMI and DATA* for AT), but it is not clear if those are really functional on all devices. Also, at the moment there is no use case for having multiple QMI/AT ports. If needed more channels could be added later after more testing. Note that the data path (network interface) is entirely separate from the control path and varies between Qualcomm SoCs, e.g. "IPA" on newer Qualcomm SoCs or "BAM-DMUX" on some older ones. The RPMSG WWAN CTRL driver exposes the QMI/AT control ports via the WWAN subsystem, and therefore allows userspace like ModemManager to set up the modem. Until now, ModemManager had to use the RPMSG-specific rpmsg-char where the channels must be explicitly exposed as a char device first and don't show up directly in sysfs. The driver is a fairly simple glue layer between WWAN and RPMSG and is mostly based on the existing mhi_wwan_ctrl.c and rpmsg_char.c. Cc: Loic Poulain Cc: Bjorn Andersson Signed-off-by: Stephan Gerhold Signed-off-by: David S. Miller commit 60302ce4ea075369641426ef407c110e36ea8ba1 Author: Stephan Gerhold Date: Fri Jun 18 19:36:09 2021 +0200 rpmsg: core: Add driver_data for rpmsg_device_id Most device_id structs provide a driver_data field that can be used by drivers to associate data more easily for a particular device ID. Add the same for the rpmsg_device_id. Cc: Bjorn Andersson Signed-off-by: Stephan Gerhold Signed-off-by: David S. Miller commit 01bf086b7c836bf5ccb6a92bb98b42ebfc841fc7 Merge: 103ebe658a262 37dc8fea8656f Author: David S. Miller Date: Fri Jun 18 13:10:36 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Jesse Brandeburg says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-06-18 Update three of the Intel Ethernet drivers with similar (but not the same) improvements to simplify the packet type table init, while removing an unused structure entry. For the ice driver, the table is extended to 10 bits, which is the hardware limit, and for now is initialized to zero. The end result is slightly reduced memory usage, removal of a bunch of code, and more specific initialization. ==================== Signed-off-by: Stefano Garzarella commit 819f9ab430a4478ce519e5cc8ae4de438d8ad4ba Author: Zhihao Cheng Date: Mon May 31 20:52:10 2021 +0800 ubifs: Remove ui_mutex in ubifs_xattr_get and change_xattr Since ubifs_xattr_get and ubifs_xattr_set cannot being executed parallelly after importing @host_ui->xattr_sem, now we can remove ui_mutex imported by commit ab92a20bce3b4c2 ("ubifs: make ubifs_[get|set]xattr atomic"). @xattr_size, @xattr_names and @xattr_cnt can't be out of protection by @host_ui->mutex yet, they are sill accesed in other places, such as pack_inode() called by ubifs_write_inode() triggered by page-writeback. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit f4e3634a3b642225a530c292fdb1e8a4007507f5 Author: Zhihao Cheng Date: Mon May 31 20:52:09 2021 +0800 ubifs: Fix races between xattr_{set|get} and listxattr operations UBIFS may occur some problems with concurrent xattr_{set|get} and listxattr operations, such as assertion failure, memory corruption, stale xattr value[1]. Fix it by importing a new rw-lock in @ubifs_inode to serilize write operations on xattr, concurrent read operations are still effective, just like ext4. [1] https://lore.kernel.org/linux-mtd/20200630130438.141649-1-houtao1@huawei.com Fixes: 1e51764a3c2ac05a23 ("UBIFS: add new flash file system") Cc: stable@vger.kernel.org # v2.6+ Signed-off-by: Zhihao Cheng Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit be076fdf8369f3b4842362c64cd681f3d498f3dd Author: Dan Carpenter Date: Tue May 11 10:12:00 2021 +0300 ubifs: fix snprintf() checking The snprintf() function returns the number of characters (not counting the NUL terminator) that it would have printed if we had space. This buffer has UBIFS_DFS_DIR_LEN characters plus one extra for the terminator. Printing UBIFS_DFS_DIR_LEN is okay but anything higher will result in truncation. Thus the comparison needs to be change from == to >. These strings are compile time constants so this patch doesn't affect runtime. Fixes: ae380ce04731 ("UBIFS: lessen the size of debugging info data structure") Signed-off-by: Dan Carpenter Reviewed-by: Alexander Dahl Signed-off-by: Richard Weinberger commit a2c2a622d41168f9fea2aa3f76b9fbaa88531aac Author: Zhen Lei Date: Sat May 8 11:33:13 2021 +0800 ubifs: journal: Fix error return code in ubifs_jnl_write_inode() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 9ca2d7326444 ("ubifs: Limit number of xattrs per inode") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Richard Weinberger commit 103ebe658a262ef5b5db7f01d83857cf82a087d0 Author: David S. Miller Date: Fri Jun 18 13:02:45 2021 -0700 Revert "net: add pf_family_names[] for protocol family" This reverts commit 1f3c98eaddec857e16a7a1c6cd83317b3dc89438. Does not build... Signed-off-by: David S. Miller commit 1f3c98eaddec857e16a7a1c6cd83317b3dc89438 Author: Yejune Deng Date: Fri Jun 18 22:32:47 2021 +0800 net: add pf_family_names[] for protocol family Modify the pr_info content from int to char *, this looks more readable. Signed-off-by: Yejune Deng Signed-off-by: David S. Miller commit 0d1ad06af239179d336f6eb0ef3ca40f70ce09ce Merge: 7437a2230e399 91aa49a8fa0ff Author: David S. Miller Date: Fri Jun 18 12:59:53 2021 -0700 Merge branch 'csock-seqpoacket-small-fixes' Stefano Garzarella says: ==================== vsock: small fixes for seqpacket support This series contains few patches to clean up a bit the code of seqpacket recently merged in the net-next tree. No functionality changes. ==================== Signed-off-by: Stefano Garzarella commit 91aa49a8fa0ffa66966be275b2575009cc12fd3b Author: Stefano Garzarella Date: Fri Jun 18 15:35:26 2021 +0200 vsock/virtio: remove redundant `copy_failed` variable When memcpy_to_msg() fails in virtio_transport_seqpacket_do_dequeue(), we already set `dequeued_len` with the negative error value returned by memcpy_to_msg(). So we can directly check `dequeued_len` value instead of using a dedicated flag variable to skip the copy path for the rest of fragments. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 0de5b2e67275695d6ad7369c594feb1578f891fd Author: Stefano Garzarella Date: Fri Jun 18 15:35:25 2021 +0200 vsock: rename vsock_wait_data() vsock_wait_data() is used only by STREAM and SEQPACKET sockets, so let's rename it to vsock_connectible_wait_data(), using the same nomenclature (connectible) used in other functions after the introduction of SEQPACKET. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit cc97141afd768d36eaef1b3e1afea2a74da7df27 Author: Stefano Garzarella Date: Fri Jun 18 15:35:24 2021 +0200 vsock: rename vsock_has_data() vsock_has_data() is used only by STREAM and SEQPACKET sockets, so let's rename it to vsock_connectible_has_data(), using the same nomenclature (connectible) used in other functions after the introduction of SEQPACKET. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 7437a2230e3993bb374fe546e5137b94b3ec302b Author: wengjianfeng Date: Fri Jun 18 16:52:26 2021 +0800 NFC: nxp-nci: remove unnecessary label Remove unnecessary label chunk_exit and return directly. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit 9e25f01b5f529d397be2e3f595b0b54ae9e80c58 Author: Dan Carpenter Date: Fri Jun 18 16:46:01 2021 +0300 hwmon: (pmbus/dps920ab) Delete some dead code The debugfs_create_dir() function returns error pointers, it doesn't return NULL. But debugfs functions don't need to be checked in normal situations and we can just delete this code. Fixes: 1f442e213ce5 ("hwmon: (pmbus) Add driver for Delta DPS-920AB PSU") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YMyjmR54ErLtc1sH@mwanda Signed-off-by: Guenter Roeck commit 61c77533b82ba810452e47cd9429aeb95effdd8c Author: Vladimir Oltean Date: Fri Jun 18 16:48:12 2021 +0300 net: dsa: sja1105: completely error out in sja1105_static_config_reload if something fails If reloading the static config fails for whatever reason, for example if sja1105_static_config_check_valid() fails, then we "goto out_unlock_ptp" but we print anyway that "Reset switch and programmed static config.", which is confusing because we didn't. We also do a bunch of other stuff like reprogram the XPCS and reload the credit-based shapers, as if a switch reset took place, which didn't. So just unlock the PTP lock and goto out, skipping all of that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1303e7f9b64f5da10d0f59dfda84aa014f968eae Author: Vladimir Oltean Date: Fri Jun 18 16:44:00 2021 +0300 net: dsa: sja1105: allow the TTEthernet configuration in the static config for SJA1110 Currently sja1105_static_config_check_valid() is coded up to detect whether TTEthernet is supported based on device ID, and this check was not updated to cover SJA1110. However, it is desirable to have as few checks for the device ID as possible, so the driver core is more generic. So what we can do is look at the static config table operations implemented by that specific switch family (populated by sja1105_static_config_init) whether the schedule table has a non-zero maximum entry count (meaning that it is supported) or not. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 961045004b774aae7a244fa0435f8a6a2495c234 Author: Yunsheng Lin Date: Fri Jun 18 20:09:45 2021 +0800 net: hns3: fix reuse conflict of the rx page In the current rx page reuse handling process, the rx page buffer may have conflict between driver and stack in high-pressure scenario. To fix this problem, we need to check whether the page is only owned by driver at the begin and at the end of a page to make sure there is no reuse conflict between driver and stack when desc_cb->page_offset is rollbacked to zero or increased. Fixes: fa7711b888f2 ("net: hns3: optimize the rx page reuse handling process") Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit cb5a82d2b9aaca66ed74c424c9d79f0a5bfdbac4 Author: Vladimir Oltean Date: Fri Jun 18 14:52:54 2021 +0300 net: dsa: sja1105: properly power down the microcontroller clock for SJA1110 It turns out that powering down the BASE_TIMER_CLK does not turn off the microcontroller, just its timers, including the one for the watchdog. So the embedded microcontroller is still running, and potentially still doing things. To prevent unwanted interference, we should power down the BASE_MCSS_CLK as well (MCSS = microcontroller subsystem). The trouble is that currently we turn off the BASE_TIMER_CLK for SJA1110 from the .clocking_setup() method, mostly because this is a Clock Generation Unit (CGU) setting which was traditionally configured in that method for SJA1105. But in SJA1105, the CGU was used for bringing up the port clocks at the proper speeds, and in SJA1110 it's not (but rather for initial configuration), so it's best that we rebrand the sja1110_clocking_setup() method into what it really is - an implementation of the .disable_microcontroller() method. Since disabling the microcontroller only needs to be done once, at probe time, we can choose the best place to do that as being in sja1105_setup(), before we upload the static config to the device. This guarantees that the static config being used by the switch afterwards is really ours. Note that the procedure to upload a static config necessarily resets the switch. This already did not reset the microcontroller, only the switch core, so since the .disable_microcontroller() method is guaranteed to be called by that point, if it's disabled, it remains disabled. Add a comment to make that clear. With the code movement for SJA1110 from .clocking_setup() to .disable_microcontroller(), both methods are optional and are guarded by "if" conditions. Tested by enabling in the device tree the rev-mii switch port 0 that goes towards the microcontroller, and flashing a firmware that would have networking. Without this patch, the microcontroller can be pinged, with this patch it cannot. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b89ecd60d38ec042d63bdb376c722a16f92bcb88 Author: Miklos Szeredi Date: Fri Jun 18 21:16:42 2021 +0200 fuse: ignore PG_workingset after stealing Fix the "fuse: trying to steal weird page" warning. Description from Johannes Weiner: "Think of it as similar to PG_active. It's just another usage/heat indicator of file and anon pages on the reclaim LRU that, unlike PG_active, persists across deactivation and even reclaim (we store it in the page cache / swapper cache tree until the page refaults). So if fuse accepts pages that can legally have PG_active set, PG_workingset is fine too." Reported-by: Thomas Lindroth Fixes: 1899ad18c607 ("mm: workingset: tell cache transitions from workingset thrashing") Cc: # v4.20 Signed-off-by: Miklos Szeredi commit 60ae9f883138f27021c2eafed9a6f22d833f1436 Author: Colin Ian King Date: Fri Jun 18 11:19:19 2021 +0100 qlcnic: remove redundant continue statement The continue statement at the end of a for-loop has no effect, it is redundant and can be removed. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 040c12570e6865b1a219c9d7f7f4a924a6570d1e Author: Colin Ian King Date: Fri Jun 18 11:01:55 2021 +0100 net: bridge: remove redundant continue statement The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit c44924c532fb9bb80b48d141a0f8391e9c280112 Author: Colin Ian King Date: Fri Jun 18 10:44:25 2021 +0100 net: stmmac: remove redundant continue statement The continue statement in the for-loop has no effect, remove it. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit bd70957438f0cc4879cbdff8bbc8614bc1cddf49 Author: Pavel Machek Date: Fri Jun 18 11:35:26 2021 +0200 net: pxa168_eth: Fix a potential data race in pxa168_eth_remove Commit 0571a753cb07 cancelled delayed work too late, keeping small race. Cancel work sooner to close it completely. Signed-off-by: Pavel Machek (CIP) Fixes: 0571a753cb07 ("net: pxa168_eth: Fix a potential data race in pxa168_eth_remove") Signed-off-by: David S. Miller commit 96a19319921ceb4b2f4c49d1b9bf9de1161e30ca Author: wengjianfeng Date: Fri Jun 18 17:10:16 2021 +0800 NFC: nxp-nci: remove unnecessary labels Simplify the code by removing unnecessary labels and returning directly. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit e44dc724826cc26bd5406eab156d2f633bb44d8d Author: dingsenjie Date: Fri Jun 18 15:34:31 2021 +0800 ethernet: marvell/octeontx2: Simplify the return expression of npc_is_same Simplify the return expression in the rvu_npc_fs.c Signed-off-by: dingsenjie Signed-off-by: David S. Miller commit 9fd2bc3206b31c8ff6d54d643730d4c3470471d6 Author: Dongliang Mu Date: Fri Jun 18 15:32:04 2021 +0800 net: caif: modify the label out_err to out Modify the label out_err to out to avoid the meanless kfree. Signed-off-by: Dongliang Mu Signed-off-by: David S. Miller commit 9d72b8da9f13349be11914823d7bd8186c6a91ce Author: Jakub Kicinski Date: Thu Jun 17 21:55:56 2021 -0700 net: vlan: pass thru all GSO_SOFTWARE in hw_enc_features Currently UDP tunnel devices on top of VLANs lose the ability to offload UDP GSO. Widen the pass thru features from TSO to all GSO_SOFTWARE. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 68277749a0133fa6f9f5ec8576691e5fc9718610 Author: Qing Zhang Date: Fri Jun 18 10:53:37 2021 +0800 dt-bindings: dwmac: Add bindings for new Loongson SoC and bridge chip Add the dwmac bindings for the Loongson-2K SoC and the LS7A bridge chip. Signed-off-by: Qing Zhang Signed-off-by: David S. Miller commit 47a311c31a51e44130c92dc11f9f0d7c8c1f9be0 Author: Qing Zhang Date: Fri Jun 18 10:53:36 2021 +0800 MIPS: Loongson64: DTS: Add GMAC support for LS7A PCH The GMAC module is now supported, enable it. Signed-off-by: Qing Zhang Signed-off-by: David S. Miller commit f8a11425075ff11b4b5784f077cb84f3d2dfb3f0 Author: Qing Zhang Date: Fri Jun 18 10:53:35 2021 +0800 MIPS: Loongson64: Add GMAC support for Loongson-2K1000 The GMAC module is now supported, enable it. Signed-off-by: Qing Zhang Signed-off-by: David S. Miller commit 30bba69d7db40e732d6c0aa6d4890c60d717e314 Author: Qing Zhang Date: Fri Jun 18 10:53:34 2021 +0800 stmmac: pci: Add dwmac support for Loongson This GMAC module is integrated into the Loongson-2K SoC and the LS7A bridge chip. Signed-off-by: Qing Zhang Signed-off-by: Jiaxun Yang Signed-off-by: David S. Miller commit 909cca8cabfcedd63f91f3373aacc3ef7e25c236 Merge: a778e93de636c 7d40bfc1933ef Author: David S. Miller Date: Fri Jun 18 11:42:40 2021 -0700 Merge branch 'hostess_sv11-cleanups' Peng Li says: ==================== net: hostess_sv11: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 7d40bfc1933efbbd65762b0bcb63287c07125370 Author: Peng Li Date: Fri Jun 18 10:32:24 2021 +0800 net: hostess_sv11: fix the alignment issue Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 67c1876897da8445f78fe6ca665a4b56f447c6d1 Author: Peng Li Date: Fri Jun 18 10:32:23 2021 +0800 net: hostess_sv11: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit d25a944693c7949842bbba3597481d7fd264e3ed Author: Peng Li Date: Fri Jun 18 10:32:22 2021 +0800 net: hostess_sv11: remove dead code This patch removes the dead code. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 9562aef3c0c38a8577f1d3c6f80a496e3f4f686d Author: Peng Li Date: Fri Jun 18 10:32:21 2021 +0800 net: hostess_sv11: fix the code style issue about switch and case According to the chackpatch.pl, switch and case should be at the same indent. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 534f76d46245a18f82e008cdf449ad2408d07760 Author: Peng Li Date: Fri Jun 18 10:32:20 2021 +0800 net: hostess_sv11: remove trailing whitespace This patch removes trailing whitespace. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit fe9be8daef8a7e6bd539fa57a9e14c6b4f8261f7 Author: Peng Li Date: Fri Jun 18 10:32:19 2021 +0800 net: hostess_sv11: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit fefed8af5ed40b861ee4d95c3e32804e7a33df96 Author: Peng Li Date: Fri Jun 18 10:32:18 2021 +0800 net: hostess_sv11: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: David S. Miller commit a778e93de636ca54c5346553ed3a8bee6a80b327 Merge: e7f3863c6d345 af66d3e1c3fa6 Author: David S. Miller Date: Fri Jun 18 11:40:12 2021 -0700 Merge branch 'mptcp-dss-checksums' Mat Martineau says: ==================== mptcp: DSS checksum support RFC 8684 defines a DSS checksum feature that allows MPTCP to detect middlebox interference with the MPTCP DSS header and the portion of the data stream associated with that header. So far, the MPTCP implementation in the Linux kernel has not supported this feature. This patch series adds DSS checksum support. By default, the kernel will not request checksums when sending SYN or SYN/ACK packets for MPTCP connections. Outgoing checksum requests can be enabled with a per-namespace net.mptcp.checksum_enabled sysctl. MPTCP connections will now proceed with DSS checksums when the peer requests them, whether the sysctl is enabled or not. Patches 1-5 add checksum bits to the outgoing SYN, SYN/ACK, and data packet headers. This includes calculating the checksum using a range of data and the MPTCP DSS mapping for that data. Patches 6-10 handle the checksum request in the SYN or SYN/ACK, and receiving and verifying the DSS checksum on data packets. Patch 11 adjusts the MPTCP-level retransmission process for checksum compatibility. Patches 12-14 add checksum-related MIBs, the net.mptcp.checksum_enabled sysctl, and a checksum field to debug trace output. Patches 15 & 16 add selftests. The series is slightly longer than the preferred 15-patch limit that patchwork warns about. I do try to stay below that whenever possible - this series does implement one feature and is, I think, cohesive enough to justify keeping it together. If it's at all problematic please let me know! A trivial merge conflict with net/master is introduced in patch 15: a commit in net/master removes a couple of nearby lines of code. ==================== Signed-off-by: David S. Miller commit af66d3e1c3fa65f2187ab418b9934068049ea27a Author: Geliang Tang Date: Thu Jun 17 16:46:22 2021 -0700 selftests: mptcp: enable checksum in mptcp_join.sh This patch added a new argument "-C" for the mptcp_join.sh script to set the sysctl checksum_enabled to 1 in ns1 and ns2 to enable the data checksum. In chk_join_nr, check the counter of the mib for the data checksum. Also added a new argument "-S" for the mptcp_join.sh script to start the test cases that verify the checksum handshake: * Sender and listener both have checksums off * Sender and listener both have checksums on * Sender checksums off, listener checksums on * Sender checksums on, listener checksums off The output looks like this: 01 checksum test 0 0 sum[ ok ] - csum [ ok ] 02 checksum test 1 1 sum[ ok ] - csum [ ok ] 03 checksum test 0 1 sum[ ok ] - csum [ ok ] 04 checksum test 1 0 sum[ ok ] - csum [ ok ] 05 no JOIN syn[ ok ] - synack[ ok ] - ack[ ok ] sum[ ok ] - csum [ ok ] 06 single subflow, limited by client syn[ ok ] - synack[ ok ] - ack[ ok ] sum[ ok ] - csum [ ok ] Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 94d66ba1d8e4803066b9c6a16274343a425ed1bf Author: Geliang Tang Date: Thu Jun 17 16:46:21 2021 -0700 selftests: mptcp: enable checksum in mptcp_connect.sh This patch added a new argument "-C" for the mptcp_connect.sh script to set the sysctl checksum_enabled to 1 in ns1, ns2, ns3 and ns4 to enable the data checksum. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 401e3030e68f1c761a7137dc6f0cf39f585ab4bd Author: Geliang Tang Date: Thu Jun 17 16:46:20 2021 -0700 mptcp: dump csum fields in mptcp_dump_mpext In mptcp_dump_mpext, dump the csum fields, csum and csum_reqd in struct mptcp_dump_mpext too. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit fc3c82eebf8e2e193412612f509530b4ff5611bf Author: Geliang Tang Date: Thu Jun 17 16:46:19 2021 -0700 mptcp: add a new sysctl checksum_enabled This patch added a new sysctl, named checksum_enabled, to control whether DSS checksum can be enabled. Acked-by: Paolo Abeni Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit fe3ab1cbd357d9d0903f2d00038c2cb7141e7fe5 Author: Geliang Tang Date: Thu Jun 17 16:46:18 2021 -0700 mptcp: add the mib for data checksum This patch added the mib for the data checksum, MPTCP_MIB_DATACSUMERR. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 4e14867d5e9185e38f730d65c89b728640d68dd1 Author: Paolo Abeni Date: Thu Jun 17 16:46:17 2021 -0700 mptcp: tune re-injections for csum enabled mode If the MPTCP-level checksum is enabled, on re-injections we must spool a complete DSS, or the receive side will not be able to compute the csum and process any data. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit dd8bcd1768ff76bf2da1154897871adcc4ec078a Author: Paolo Abeni Date: Thu Jun 17 16:46:16 2021 -0700 mptcp: validate the data checksum This patch added three new members named data_csum, csum_len and map_csum in struct mptcp_subflow_context, implemented a new function named mptcp_validate_data_checksum(). If the current mapping is valid and csum is enabled traverse the later pending skbs and compute csum incrementally till the whole mapping has been covered. If not enough data is available in the rx queue, return MAPPING_EMPTY - that is, no data. Next subflow_data_ready invocation will trigger again csum computation. When the full DSS is available, validate the csum and return to the caller an appropriate error code, to trigger subflow reset of fallback as required by the RFC. Additionally: - if the csum prevence in the DSS don't match the negotiated value e.g. csum present, but not requested, return invalid mapping to trigger subflow reset. - keep some csum state, to avoid re-compute the csum on the same data when multiple rx queue traversal are required. - clean-up the uncompleted mapping from the receive queue on close, to allow proper subflow disposal Co-developed-by: Geliang Tang Signed-off-by: Geliang Tang Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 390b95a5fb84e7999eedb021382c96d1500e01fc Author: Geliang Tang Date: Thu Jun 17 16:46:15 2021 -0700 mptcp: receive checksum for DSS In mptcp_parse_option, adjust the expected_opsize, and always parse the data checksum value from the receiving DSS regardless of csum presence. Then save it in mp_opt->csum. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 208e8f66926c5d73e3f359385c1dd49dbc48d067 Author: Geliang Tang Date: Thu Jun 17 16:46:14 2021 -0700 mptcp: receive checksum for MP_CAPABLE with data This patch added a new member named csum in struct mptcp_options_received. When parsing the MP_CAPABLE with data, if the checksum is enabled, adjust the expected_opsize. If the receiving option length matches the length with the data checksum, get the checksum value and save it in mp_opt->csum. And in mptcp_incoming_options, pass it to mpext->csum. We always parse any csum/nocsum combination and delay the presence check to later code, to allow reset if missing. Additionally, in the TX path, use the newly introduce ext field to avoid MPTCP csum recomputation on TCP retransmission and unneeded csum update on when setting the data fin_flag. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0625118115cf2ee8e435bf86d1c1f0bfdee9d7c8 Author: Geliang Tang Date: Thu Jun 17 16:46:13 2021 -0700 mptcp: add csum_reqd in mptcp_options_received This patch added a new flag csum_reqd in struct mptcp_options_received, if the flag MPTCP_CAP_CHECKSUM_REQD is set in the receiving MP_CAPABLE suboption, set this flag. In mptcp_sk_clone and subflow_finish_connect, if the csum_reqd flag is set, enable the msk->csum_enabled flag. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c863225b79426459feca2ef5b0cc2f07e8e68771 Author: Geliang Tang Date: Thu Jun 17 16:46:12 2021 -0700 mptcp: add sk parameter for mptcp_get_options This patch added a new parameter name sk in mptcp_get_options(). Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c5b39e26d0036423be09c39ad142e91a2d5d278b Author: Geliang Tang Date: Thu Jun 17 16:46:11 2021 -0700 mptcp: send out checksum for DSS In mptcp_write_options, if the checksum is enabled, adjust the option length and send out the data checksum with DSS suboption. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c94b1f96dcfb2e5bd072b10f3429ccf28778ad58 Author: Geliang Tang Date: Thu Jun 17 16:46:10 2021 -0700 mptcp: send out checksum for MP_CAPABLE with data If the checksum is enabled, send out the data checksum with the MP_CAPABLE suboption with data. In mptcp_established_options_mp, save the data checksum in opts->ext_copy.csum. In mptcp_write_options, adjust the option length and send it out with the MP_CAPABLE suboption. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 06fe1719aa501e3b574b1b2b3a7ad2ddac5fb9cb Author: Geliang Tang Date: Thu Jun 17 16:46:09 2021 -0700 mptcp: add csum_reqd in mptcp_out_options This patch added a new member csum_reqd in struct mptcp_out_options and struct mptcp_subflow_request_sock. Initialized it with the helper function mptcp_is_checksum_enabled(). In mptcp_write_options, if this field is enabled, send out the MP_CAPABLE suboption with the MPTCP_CAP_CHECKSUM_REQD flag. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d0cc298745f5abb3c43319cb9485daf3471d6f94 Author: Geliang Tang Date: Thu Jun 17 16:46:08 2021 -0700 mptcp: generate the data checksum This patch added a new member named csum in struct mptcp_ext, implemented a new function named mptcp_generate_data_checksum(). Generate the data checksum in mptcp_sendmsg_frag, save it in mpext->csum. Note that we must generate the csum for zero window probe, too. Do the csum update incrementally, to avoid multiple csum computation when the data is appended to existing skb. Note that in a later patch we will skip unneeded csum related operation. Changes not included here to keep the delta small. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 752e906732c69412087f716e93baa0330cb7cce3 Author: Geliang Tang Date: Thu Jun 17 16:46:07 2021 -0700 mptcp: add csum_enabled in mptcp_sock This patch added a new member named csum_enabled in struct mptcp_sock, used a dummy mptcp_is_checksum_enabled() helper to initialize it. Also added a new member named mptcpi_csum_enabled in struct mptcp_info to expose the csum_enabled flag. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e7f3863c6d34531a92e711a856422e81d5c5f27d Merge: 5a336f97f1f50 03a0b567a03d6 Author: David S. Miller Date: Fri Jun 18 11:35:47 2021 -0700 Merge branch 'seg6.end.dt6' Andrea Mayer says: ==================== seg6: add support for SRv6 End.DT46 Behavior SRv6 End.DT46 Behavior is defined in the IETF RFC 8986 [1] along with SRv6 End.DT4 and End.DT6 Behaviors. The proposed End.DT46 implementation is meant to support the decapsulation of both IPv4 and IPv6 traffic coming from a *single* SRv6 tunnel. The SRv6 End.DT46 Behavior greatly simplifies the setup and operations of SRv6 VPNs in the Linux kernel. - patch 1/2 is the core patch that adds support for the SRv6 End.DT46 Behavior; - patch 2/2 adds the selftest for SRv6 End.DT46 Behavior. The patch introducing the new SRv6 End.DT46 Behavior in iproute2 will follow shortly. Comments, suggestions and improvements are very welcome as always! ==================== Signed-off-by: David S. Miller commit 03a0b567a03d6449e9d68a591b3f12373b1fc091 Author: Andrea Mayer Date: Thu Jun 17 19:16:45 2021 +0200 selftests: seg6: add selftest for SRv6 End.DT46 Behavior this selftest is designed for evaluating the new SRv6 End.DT46 Behavior used, in this example, for implementing IPv4/IPv6 L3 VPN use cases. Signed-off-by: Andrea Mayer Signed-off-by: Paolo Lungaroni Acked-by: David Ahern Signed-off-by: David S. Miller commit 8b532109bf885b7b59b93487bc4672eb6d071b78 Author: Andrea Mayer Date: Thu Jun 17 19:16:44 2021 +0200 seg6: add support for SRv6 End.DT46 Behavior IETF RFC 8986 [1] includes the definition of SRv6 End.DT4, End.DT6, and End.DT46 Behaviors. The current SRv6 code in the Linux kernel only implements End.DT4 and End.DT6 which can be used respectively to support IPv4-in-IPv6 and IPv6-in-IPv6 VPNs. With End.DT4 and End.DT6 it is not possible to create a single SRv6 VPN tunnel to carry both IPv4 and IPv6 traffic. The proposed End.DT46 implementation is meant to support the decapsulation of IPv4 and IPv6 traffic coming from a single SRv6 tunnel. The implementation of the SRv6 End.DT46 Behavior in the Linux kernel greatly simplifies the setup and operations of SRv6 VPNs. The SRv6 End.DT46 Behavior leverages the infrastructure of SRv6 End.DT{4,6} Behaviors implemented so far, because it makes use of a VRF device in order to force the routing lookup into the associated routing table. To make the End.DT46 work properly, it must be guaranteed that the routing table used for routing lookup operations is bound to one and only one VRF during the tunnel creation. Such constraint has to be enforced by enabling the VRF strict_mode sysctl parameter, i.e.: $ sysctl -wq net.vrf.strict_mode=1 Note that the same approach is used for the SRv6 End.DT4 Behavior and for the End.DT6 Behavior in VRF mode. The command used to instantiate an SRv6 End.DT46 Behavior is straightforward, i.e.: $ ip -6 route add 2001:db8::1 encap seg6local action End.DT46 vrftable 100 dev vrf100. [1] https://www.rfc-editor.org/rfc/rfc8986.html#name-enddt46-decapsulation-and-s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Performance and impact of SRv6 End.DT46 Behavior on the SRv6 Networking ======================================================================= This patch aims to add the SRv6 End.DT46 Behavior with minimal impact on the performance of SRv6 End.DT4 and End.DT6 Behaviors. In order to verify this, we tested the performance of the newly introduced SRv6 End.DT46 Behavior and compared it with the performance of SRv6 End.DT{4,6} Behaviors, considering both the patched kernel and the kernel before applying the End.DT46 patch (referred to as vanilla kernel). In details, the following decapsulation scenarios were considered: 1.a) IPv6 traffic in SRv6 End.DT46 Behavior on patched kernel; 1.b) IPv4 traffic in SRv6 End.DT46 Behavior on patched kernel; 2.a) SRv6 End.DT6 Behavior (VRF mode) on patched kernel; 2.b) SRv6 End.DT4 Behavior on patched kernel; 3.a) SRv6 End.DT6 Behavior (VRF mode) on vanilla kernel (without the End.DT46 patch); 3.b) SRv6 End.DT4 Behavior on vanilla kernel (without the End.DT46 patch). All tests were performed on a testbed deployed on the CloudLab [2] facilities. We considered IPv{4,6} traffic handled by a single core (at 2.4 GHz on a Xeon(R) CPU E5-2630 v3) on kernel 5.13-rc1 using packets of size ~ 100 bytes. Scenario (1.a): average 684.70 kpps; std. dev. 0.7 kpps; Scenario (1.b): average 711.69 kpps; std. dev. 1.2 kpps; Scenario (2.a): average 690.70 kpps; std. dev. 1.2 kpps; Scenario (2.b): average 722.22 kpps; std. dev. 1.7 kpps; Scenario (3.a): average 690.02 kpps; std. dev. 2.6 kpps; Scenario (3.b): average 721.91 kpps; std. dev. 1.2 kpps; Considering the results for the patched kernel (1.a, 1.b, 2.a, 2.b) we observe that the performance degradation incurred in using End.DT46 rather than End.DT6 and End.DT4 respectively for IPv6 and IPv4 traffic is minimal, around 0.9% and 1.5%. Such very minimal performance degradation is the price to be paid if one prefers to use a single tunnel capable of handling both types of traffic (IPv4 and IPv6). Comparing the results for End.DT4 and End.DT6 under the patched and the vanilla kernel (2.a, 2.b, 3.a, 3.b) we observe that the introduction of the End.DT46 patch has no impact on the performance of End.DT4 and End.DT6. [2] https://www.cloudlab.us Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5a336f97f1f5011cdca5467ef96372fd6d2fd128 Author: Ioana Ciornei Date: Thu Jun 17 18:55:52 2021 +0300 Documentation: ACPI: DSD: fix block code comments Use the '.. code-block:: none' to properly highlight the documented DSDT entries. This also fixes warnings in the documentation build process. Fixes: e71305acd81c ("Documentation: ACPI: DSD: Document MDIO PHY") Reported-by: Stephen Rothwell Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 79ab2b37034b7790bd598597faddf689f5b10676 Author: Ioana Ciornei Date: Thu Jun 17 18:55:51 2021 +0300 Documentation: ACPI: DSD: include phy.rst in the toctree Include the new phy.rst into the index of the ACPI support documentation. Fixes: e71305acd81c ("Documentation: ACPI: DSD: Document MDIO PHY") Reported-by: Stephen Rothwell Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit d1434cf513583a6abe5b65f1824c741e9e7af764 Author: Colin Ian King Date: Thu Jun 17 13:14:49 2021 +0100 net: neterion: vxge: remove redundant continue statement The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 275b51c27cc382325cf833dfbe1ce44071c2e2c4 Author: Oleksandr Mazur Date: Thu Jun 17 14:36:32 2021 +0300 drivers: net: netdevsim: fix devlink_trap selftests failing devlink_trap tests for the netdevsim fail due to misspelled debugfs file name. Change this name, as well as name of callback function, to match the naming as in the devlink itself - 'trap_drop_counter'. Test-results: selftests: drivers/net/netdevsim: devlink_trap.sh TEST: Initialization [ OK ] TEST: Trap action [ OK ] TEST: Trap metadata [ OK ] TEST: Non-existing trap [ OK ] TEST: Non-existing trap action [ OK ] TEST: Trap statistics [ OK ] TEST: Trap group action [ OK ] TEST: Non-existing trap group [ OK ] TEST: Trap group statistics [ OK ] TEST: Trap policer [ OK ] TEST: Trap policer binding [ OK ] TEST: Port delete [ OK ] TEST: Device delete [ OK ] Fixes: a7b3527a43fe ("drivers: net: netdevsim: add devlink trap_drop_counter_get implementation") Signed-off-by: Oleksandr Mazur Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 77b7cfd0dc6842d7babe8def776e92b135db7faf Author: Shaik Sajida Bhanu Date: Wed Jun 16 14:52:24 2021 +0530 arm64: dts: qcom: sc7180: bus votes for eMMC and SD card Update peak bandwidth and average bandwidth vote values for eMMC and SDCard. This patch calculates the new votes as per the comments from https://lore.kernel.org/patchwork/patch/1399453/#1619566. Signed-off-by: Shaik Sajida Bhanu Link: https://lore.kernel.org/r/1623835344-29607-1-git-send-email-sbhanu@codeaurora.org Signed-off-by: Bjorn Andersson commit 7c6090ee2a7b3315410cfc83a94c3eb057407b25 Author: Wang Hai Date: Wed Jun 16 12:25:34 2021 +0800 samples/bpf: Fix the error return code of xdp_redirect's main() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. If bpf_map_update_elem() failed, main() should return a negative error. Fixes: 832622e6bd18 ("xdp: sample program for new bpf_redirect helper") Signed-off-by: Wang Hai Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210616042534.315097-1-wanghai38@huawei.com commit 85102ba58b4125ebad941d7555c3c248b23efd16 Author: Wang Hai Date: Wed Jun 16 12:23:24 2021 +0800 samples/bpf: Fix Segmentation fault for xdp_redirect command A Segmentation fault error is caused when the following command is executed. $ sudo ./samples/bpf/xdp_redirect lo Segmentation fault This command is missing a device as an argument, resulting in out-of-bounds access from argv. If the number of devices for the xdp_redirect parameter is not 2, we should report an error and exit. Fixes: 24251c264798 ("samples/bpf: add option for native and skb mode for redirect apps") Signed-off-by: Wang Hai Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210616042324.314832-1-wanghai38@huawei.com commit e76c7e1f15fe48996ca3ecfd6f2a21a67d07f9b7 Author: Konrad Dybcio Date: Wed Jun 16 14:27:08 2021 +0200 arm64: dts: qcom: sm8250-edo: Add Samsung touchscreen Add Samsung touchscreen node and relevant pin configuration to make the phones actually interactable with. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616122708.144770-6-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 4a62a824282e245e6429c0f40c66931430d2fce5 Author: Konrad Dybcio Date: Wed Jun 16 14:27:07 2021 +0200 arm64: dts: qcom: sm8250-edo: Enable GPI DMA Enable GPI DMA for Edo devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616122708.144770-5-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit f0cedfc398813aa404a235d5684676056eeb160d Author: Konrad Dybcio Date: Wed Jun 16 14:27:06 2021 +0200 arm64: dts: qcom: sm8250-edo: Enable ADSP/CDSP/SLPI Enabling the hardware thankfully comes down to a simple status = "okay". We assume that the firmware is provided by the Linux distribution, as it's signed and needs to come from the stock Android. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616122708.144770-4-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit db92d8cdde33a862fe43b0b7d5a802ad24bfa8b9 Author: Konrad Dybcio Date: Wed Jun 16 14:27:05 2021 +0200 arm64: dts: qcom: sm8250-edo: Enable PCIe Enable PCIe0 (Wi-Fi) and 2 (SDX55m) interfaces and PHYs and assign relevant pins and regulators. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616122708.144770-3-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 13e948a36db782a57a92570bbd60702587624727 Author: Konrad Dybcio Date: Wed Jun 16 14:27:04 2021 +0200 arm64: dts: qcom: sm8250: Commonize PCIe pins Commonize PCIe pins, as the configuration is SoC-common and doesn't change (or at least doesn't change much) between boards. While at it, remove "output-low" from the RB5 board, as it's not necessary - we already explicitly pull the perst pin low. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616122708.144770-2-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 46e14907c71628ea82daea8911b9f449f478f9b4 Author: Konrad Dybcio Date: Wed Jun 16 14:27:03 2021 +0200 arm64: dts: qcom: sm8250-edo: Add hardware keys Volume Down, GAssist (pdx206 only) and camera keys live on PMIC pins, with the latter kind being broken for now.. Add these and PON-connected Volume Up & PWR. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616122708.144770-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 98cf4951842adbb03079dadedddf30b95e623cb0 Merge: 222a28edce38b 8943474a416c0 Author: Jonathan Corbet Date: Fri Jun 18 11:37:35 2021 -0600 Merge branch 'path-lookup' into docs-next From Fox Chen: The Path lookup is a very complex subject in VFS. The path-lookup document provides a very detailed guidance to help people understand how path lookup works in the kernel. This document was originally written based on three lwn articles five years ago. As times goes by, some of the content is outdated. This patchset is intended to update the document to make it more relevant to current codebase. commit 5b85e8f2225c21b68eb93c1c9e071fc3f989de1d Author: Bhupesh Sharma Date: Thu Jun 17 11:15:48 2021 +0530 arm64: dts: qcom: sa8155p-adp: Add base dts file Add base DTS file for SA8155p Automotive Development Platform. It enables boot to console, adds tlmm reserved range and ufs flash. It also includes pmic file. SA8155p-adp board is based on sa8155p Qualcomm Snapdragon SoC. SA8155p platform is similar to the SM8150, so use this as base for now. Cc: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210617054548.353293-6-bhupesh.sharma@linaro.org Signed-off-by: Bjorn Andersson commit 8943474a416c0d2eac2366c22be1458ad0ceb812 Author: Fox Chen Date: Thu May 27 17:16:18 2021 +0800 docs: path-lookup: use bare function() rather than literals As suggested by Matthew Wilcox and Jonathan Corbet, drop ``...`` literals around function names of this patchset. Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-14-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit ef4aa53f36a932e656a3b91cdc8a9a9dcb9cef81 Author: Fox Chen Date: Thu May 27 17:16:17 2021 +0800 docs: path-lookup: update symlink description instead of lookup_real()/vfs_create(), i_op->lookup() and i_op->create() will be called directly. update vfs_open() logic should_follow_link is merged into lookup_last() or open_last_lookup() which returns symlink name instead of an integer. Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-13-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 3c1be84b8d82959a6b7fedb598b8781fa1d09421 Author: Fox Chen Date: Thu May 27 17:16:16 2021 +0800 docs: path-lookup: update get_link() ->follow_link description get_link() is merged into pick_link(). i_op->follow_link is replaced with i_op->get_link(). get_link() can return ERR_PTR(0) which equals NULL. Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-12-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit de9414adafe4da174212909e054222948aa620fc Author: Fox Chen Date: Thu May 27 17:16:15 2021 +0800 docs: path-lookup: update WALK_GET, WALK_PUT desc WALK_GET is changed to WALK_TRAILING with a different meaning. Here it should be WALK_NOFOLLOW. WALK_PUT dosn't exist, we have WALK_MORE. WALK_PUT == !WALK_MORE And there is not should_follow_link(). Related commits: commit 8c4efe22e7c4 ("namei: invert the meaning of WALK_FOLLOW") commit 1c4ff1a87e46 ("namei: invert WALK_PUT logics") Signed-off-by: Fox Chen Reviewed-by: NeilBrown [jc: applied language tweaks suggested by Neil] Link: https://lore.kernel.org/r/20210527091618.287093-11-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 18edb95a88a947b10536be4dc86b4a190715f816 Author: Fox Chen Date: Thu May 27 17:16:14 2021 +0800 docs: path-lookup: no get_link() no get_link() anymore. we have step_into() and pick_link(). walk_component() will call step_into(), in turn call pick_link, and return symlink name. Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-10-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 671f73356f6a2aa2fb1bb71f8fdeeba858b6fec6 Author: Fox Chen Date: Thu May 27 17:16:13 2021 +0800 docs: path-lookup: update i_op->put_link and cookie description No inode->put_link operation anymore. We use delayed_call to deal with link destruction. Cookie has been replaced with struct delayed_call. Related commit: commit fceef393a538 ("switch ->get_link() to delayed_call, kill ->put_link()") Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-9-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 4a00e4bd59bbd5eac26f1792eb8d7d60f6cafe9a Author: Fox Chen Date: Thu May 27 17:16:12 2021 +0800 docs: path-lookup: i_op->follow_link replaced with i_op->get_link follow_link has been replaced by get_link() which can be called in RCU mode. see commit: commit 6b2553918d8b ("replace ->follow_link() with new method that could stay in RCU mode") Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-8-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit d2d3dd5ecce11ba560ff024e63ddb1640b7b27b0 Author: Fox Chen Date: Thu May 27 17:16:11 2021 +0800 docs: path-lookup: Add macro name to symlink limit description Add macro name MAXSYMLINKS to the symlink limit description, so that it is consistent with path name length description above. Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-7-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 34ef75ef25c6fdea899acdb0a466f8ed0c365644 Author: Fox Chen Date: Thu May 27 17:16:10 2021 +0800 docs: path-lookup: remove filename_mountpoint No filename_mountpoint any more see commit: commit 161aff1d93ab ("LOOKUP_MOUNTPOINT: fold path_mountpointat() into path_lookupat()") Without filename_mountpoint and path_mountpoint(), the numbers should be four & three: "These four correspond roughly to the three path_*() functions" Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-6-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 71e0a67dc6c26018e27fe0c670e2db023aa72d22 Author: Fox Chen Date: Thu May 27 17:16:09 2021 +0800 docs: path-lookup: update do_last() part traling_symlink() was merged into lookup_last, do_last(). do_last() has later been split into open_last_lookups() and do_open(). see related commit: commit c5971b8c6354 ("take post-lookup part of do_last() out of loop") Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-5-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 8593d2cc8c2f09164d674b2318661ede00dd4d0e Author: Fox Chen Date: Thu May 27 17:16:08 2021 +0800 docs: path-lookup: update path_mountpoint() part path_mountpoint() doesn't exist anymore. Have been folded into path_lookup_at when flag is set with LOOKUP_MOUNTPOINT. Check commit: commit 161aff1d93abf0e ("LOOKUP_MOUNTPOINT: fold path_mountpointat() into path_lookupat()") Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-4-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 084c86837a3583c7cf56d74f91fb8e6191f99a8a Author: Fox Chen Date: Thu May 27 17:16:07 2021 +0800 docs: path-lookup: update path_to_nameidata() part No path_to_namei() anymore, step_into() will be called. Related commit: commit c99687a03a78 ("fold path_to_nameidata() into its only remaining caller") Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-3-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit 993b892610d159dc16f6556dd0bf111ddc3ce0b9 Author: Fox Chen Date: Thu May 27 17:16:06 2021 +0800 docs: path-lookup: update follow_managed() part No follow_managed() anymore, handle_mounts(), traverse_mounts(), will do the job. see commit 9deed3ebca24 ("new helper: traverse_mounts()") Signed-off-by: Fox Chen Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20210527091618.287093-2-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet commit b557471bb286b5df7eda477041d58b12d4b44219 Author: Bhupesh Sharma Date: Thu Jun 17 11:15:47 2021 +0530 arm64: dts: qcom: pmm8155au_2: Add base dts file Add base DTS file for pmm8155au_2 along with GPIOs, power-on, rtc and vadc nodes. Cc: Mark Brown Cc: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210617054548.353293-5-bhupesh.sharma@linaro.org [bjorn: Added gpio-ranges to pmm8155au_2_gpios] Signed-off-by: Bjorn Andersson commit 10489ef12feddd7e663851fc45aeb65855dcf2a8 Author: Bhupesh Sharma Date: Thu Jun 17 11:15:46 2021 +0530 arm64: dts: qcom: pmm8155au_1: Add base dts file Add base DTS file for pmm8155au_1 along with GPIOs, power-on, rtc and vadc nodes. Cc: Mark Brown Cc: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210617054548.353293-4-bhupesh.sharma@linaro.org [bjorn: Added gpio-ranges to pmm8155au_1_gpios] Signed-off-by: Bjorn Andersson commit 222a28edce38b62074a950fb243df621c602b4d3 Author: Kees Cook Date: Thu Jun 17 15:58:08 2021 -0700 docs: Makefile: Use CONFIG_SHELL not SHELL Fix think-o about which variable to find the Kbuild-configured shell. This has accidentally worked due to most shells setting $SHELL by default. Fixes: 51e46c7a4007 ("docs, parallelism: Rearrange how jobserver reservations are made") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210617225808.3907377-1-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 7e78dd816e458fbc2928a068d70009178d5d070d Author: Xi Wang Date: Fri Jun 11 14:14:49 2021 +0800 RDMA/hns: Clear extended doorbell info before using Both of HIP08 and HIP09 require the extended doorbell information to be cleared before being used. Fixes: 6b63597d3540 ("RDMA/hns: Add TSQ link table support") Link: https://lore.kernel.org/r/1623392089-35639-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 45237f9898fce54a8cc6d40f7455291e0e6c4277 Author: Masami Hiramatsu Date: Sat Jun 5 01:28:43 2021 +0900 perf probe: Add --bootconfig to output definition in bootconfig format Now the boot-time tracing supports kprobes events and that must be written in bootconfig file in the following format. ftrace.event.kprobes..probes = 'perf probe' already supports --definition (-D) action to show probe definitions, but the format is for tracefs: [p|r][:EVENT_NAME] This patch adds the --bootconfig option for -D action so that it outputs the probe definitions in bootconfig format. E.g. $ perf probe --bootconfig -D "path_lookupat:7 err:s32 s:string" ftrace.event.kprobes.path_lookupat_L7.probe = 'path_lookupat.isra.0+309 err_s32=%ax:s32 s_string=+0(%r13):string' Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/162282412351.452340.14871995440005640114.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit d26ea4814476841f806509745dcd398bf0598314 Author: Masami Hiramatsu Date: Sat Jun 5 01:28:33 2021 +0900 perf probe: Cleanup synthesize_probe_trace_command() Cleanup synthesize_probe_trace_command() to simplify the code path. Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/162282411361.452340.16886399333622147122.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit f338de22192085a476dd1bc9eac5e074a48f34f9 Author: Masami Hiramatsu Date: Sat Jun 5 01:28:23 2021 +0900 perf probe: Support probes on init functions for offline kernel 'perf probe' internally checks the probe target is in the text area in post-process (after analyzing debuginfo). But it fails if the probe target is in the "inittext". This is a good limitation for the online kernel because such functions have gone after booting. However, for using it for boot-time tracing, user may want to put a probe on init functions. This skips the post checking process if the target is offline kenrel so that user can get the probe definition on the init functions. Without this patch: $ perf probe -k ./build-x86_64/vmlinux -D do_mount_root:10 Probe point 'do_mount_root:10' not found. Error: Failed to add events. With this patch: $ perf probe -k ./build-x86_64/vmlinux -D do_mount_root:10 p:probe/do_mount_root_L10 mount_block_root+300 Signed-off-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/162282410293.452340.13347006295826431632.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit a49ed2b4e2e5eed0b5082f7f5d36123c0070b9ab Author: Ian Rogers Date: Thu Jun 17 11:42:16 2021 -0700 perf test: Make stat bpf counters test more robust If the test is run on a hypervisor then the cycles event may not be counted, skip the test in this situation. Fail the test if cycles are not counted in the subsequent bpf counter run. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20210617184216.2075588-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2638fbd351e8cdc3bca266004b6d348063153c3b Author: Ian Rogers Date: Thu Jun 17 11:42:15 2021 -0700 perf test: Add verbose skip output for bpf counters Provide additional context for when the stat bpf counters test skips. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20210617184216.2075588-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a95fbe2abafdad800cc9a1ee6a08501c6835c8ba Author: Jack Wang Date: Mon Jun 14 11:03:37 2021 +0200 RDMA/rtrs: Check device max_qp_wr limit when create QP Currently we only check device max_qp_wr limit for IO connection, but not for service connection. We should check for both. So save the max_qp_wr device limit in wr_limit, and use it for both IO connections and service connections. While at it, also remove an outdated comments. Link: https://lore.kernel.org/r/20210614090337.29557-6-jinpu.wang@ionos.com Suggested-by: Leon Romanovsky Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 354462eb7f528dadd68e8a0e7e6d69794b801f95 Author: Guoqing Jiang Date: Mon Jun 14 11:03:36 2021 +0200 RDMA/rtrs: Rename cq_size/queue_size to cq_num/queue_num Those variables are passed to create_cq, create_qp, rtrs_iu_alloc and rtrs_iu_free, so these *_size means the num of unit. And cq_size also means number of cq element. Also move the setting of cq_num to common path. Link: https://lore.kernel.org/r/20210614090337.29557-5-jinpu.wang@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Md Haris Iqbal Signed-off-by: Jack Wang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b012f0ad5321e86d61f5c9eabba3320347221d06 Author: Md Haris Iqbal Date: Mon Jun 14 11:03:35 2021 +0200 RDMA/rtrs: RDMA_RXE requires more number of WR When using rdma_rxe, post_one_recv() returns ENOMEM error due to the full recv queue. This patch increase the number of WR for receive queue to support all devices. Link: https://lore.kernel.org/r/20210614090337.29557-4-jinpu.wang@ionos.com Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0509ebfa3385a90c5239e071d63c81b21bc8fd18 Author: Jack Wang Date: Mon Jun 14 11:03:34 2021 +0200 RDMA/rtrs-clt: Use minimal max_send_sge when create qp We use device limit max_send_sge, which is suboptimal for memory usage. We don't need that much for User Con, 1 is enough. And for IO con, sess->max_segments + 1 is enough Link: https://lore.kernel.org/r/20210614090337.29557-3-jinpu.wang@ionos.com Signed-off-by: Jack Wang Signed-off-by: Guoqing Jiang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5e91eabf66c854f16ca2e954e5c68939bc81601e Author: Jack Wang Date: Mon Jun 14 11:03:33 2021 +0200 RDMA/rtrs-srv: Set minimal max_send_wr and max_recv_wr Currently rtrs when create_qp use a coarse numbers (bigger in general), which leads to hardware create more resources which only waste memory with no benefits. For max_send_wr, we don't really need alway max_qp_wr size when creating qp, reduce it to cq_size. For max_recv_wr, cq_size is enough. With the patch when sess_queue_depth=128, per session (2 paths) memory consumption reduced from 188 MB to 65MB When always_invalidate is enabled, we need send more wr, so treat it special. Fixes: 9cb837480424e ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20210614090337.29557-2-jinpu.wang@ionos.com Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1948fc065a89f18d057b8ffaef6d7242ad99edb8 Author: Takashi Iwai Date: Fri Jun 18 18:17:20 2021 +0200 ALSA: hda/realtek: Add another ALC236 variant support The codec chip 10ec:0230 is another variant of ALC236, combined with a card reader. Apply the equivalent setup as 10ec:0236. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1184869 Cc: Link: https://lore.kernel.org/r/20210618161720.28694-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a79da21b48cc5f81b047ae4e70b4d9cb49c93a6a Author: lijiazi Date: Fri Jun 18 11:17:20 2021 +0800 blk-wbt: remove outdated comment Now wbt_wait() returns void, so remove now outdated comment. Signed-off-by: lijiazi Link: https://lore.kernel.org/r/1623986240-13878-1-git-send-email-lijiazi@xiaomi.com Signed-off-by: Jens Axboe commit 8fbd6c15ea0a1d5e5d4e8ce4cc31e31afbcc1678 Author: Mario Limonciello Date: Thu Jun 17 11:42:12 2021 -0500 ACPI: PM: Adjust behavior for field problems on AMD systems Some AMD Systems with uPEP _HID AMD004/AMDI005 have an off by one bug in their function mask return. This means that they will call entrance but not exit for matching functions. Other AMD systems with this HID should use the Microsoft generic UUID. AMD systems with uPEP HID AMDI006 should be using the Microsoft method. Signed-off-by: Mario Limonciello Tested-by: Julian Sikorski Tested-by: Kai-Heng Feng Signed-off-by: Rafael J. Wysocki commit 5dbf509975780851251361f2db287fdce11b7cae Author: Pratik Vishwakarma Date: Thu Jun 17 11:42:11 2021 -0500 ACPI: PM: s2idle: Add support for new Microsoft UUID This adds supports for _DSM notifications to the Microsoft UUID described by Microsoft documentation for s2idle. Link: https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Pratik Vishwakarma Tested-by: Julian Sikorski Signed-off-by: Rafael J. Wysocki commit 3f4b116c0b3955a9c30479c1d8177874b2e828e6 Author: Pratik Vishwakarma Date: Thu Jun 17 11:42:10 2021 -0500 ACPI: PM: s2idle: Add support for multiple func mask Required for follow-up patch adding new UUID needing new function mask. Signed-off-by: Pratik Vishwakarma Tested-by: Julian Sikorski Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit 4a012dc82d504f9b6a9654e4a28d1938c9a6cb2f Author: Pratik Vishwakarma Date: Thu Jun 17 11:42:09 2021 -0500 ACPI: PM: s2idle: Refactor common code Refactor common code to prepare for upcoming changes. * Remove unused struct. * Print error before returning. * Frees ACPI obj if _DSM type is not as expected. * Treat lps0_dsm_func_mask as an integer rather than character * Remove extra out_obj * Move rev_id Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Pratik Vishwakarma Tested-by: Julian Sikorski Signed-off-by: Rafael J. Wysocki commit 904d4a6c074b9d69b673c7cd7d66f55cfa7610ea Author: Pratik Vishwakarma Date: Thu Jun 17 11:42:08 2021 -0500 ACPI: PM: s2idle: Use correct revision id AMD spec mentions only revision 0. With this change, device constraint list is populated properly. Signed-off-by: Pratik Vishwakarma Tested-by: Julian Sikorski Signed-off-by: Rafael J. Wysocki commit 85c653fcc6353b44ee6cad18746be5bb2b08be42 Merge: cb5faa8c7df02 fade9c2c6ee2b Author: Marc Zyngier Date: Fri Jun 18 17:30:39 2021 +0100 Merge branch arm64/for-next/caches into kvmarm-master/next arm64 cache management function cleanup from Fuad Tabba, shared with the arm64 tree. * arm64/for-next/caches: arm64: Rename arm64-internal cache maintenance functions arm64: Fix cache maintenance function comments arm64: sync_icache_aliases to take end parameter instead of size arm64: __clean_dcache_area_pou to take end parameter instead of size arm64: __clean_dcache_area_pop to take end parameter instead of size arm64: __clean_dcache_area_poc to take end parameter instead of size arm64: __flush_dcache_area to take end parameter instead of size arm64: dcache_by_line_op to take end parameter instead of size arm64: __inval_dcache_area to take end parameter instead of size arm64: Fix comments to refer to correct function __flush_icache_range arm64: Move documentation of dcache_by_line_op arm64: assembler: remove user_alt arm64: Downgrade flush_icache_range to invalidate arm64: Do not enable uaccess for invalidate_icache_range arm64: Do not enable uaccess for flush_icache_range arm64: Apply errata to swsusp_arch_suspend_exit arm64: assembler: add conditional cache fixups arm64: assembler: replace `kaddr` with `addr` Signed-off-by: Marc Zyngier commit df35ee70864111c20ecb36745ffc5f821301d0e7 Author: Andy Shevchenko Date: Fri Jun 18 16:41:28 2021 +0300 ACPI: sysfs: Remove tailing return statement in void function The tail return statement is redundant in void functions. Remove it. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit a9c4cf299f5f79d5016c8a9646fa1fc49381a8c1 Author: Andy Shevchenko Date: Fri Jun 18 16:41:27 2021 +0300 ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros We have a few open-coded __ATTR_RO() and __ATTR_RW() macros. Replace the custom code with generic macros. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 37dc8fea8656f149e0fa5a03a2736b32350fe2b1 Author: Jesse Brandeburg Date: Tue Feb 23 15:47:07 2021 -0800 iavf: clean up packet type lookup table Remove the unused ptype struct value, which makes table init easier for the zero entries, and use ranged initializer to remove a bunch of code (works with gcc and clang). There is no significant functional change. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit c6e088bf30dccb9fb7b7df7c394a2fe10eb3a27a Author: Jesse Brandeburg Date: Tue Feb 23 15:47:06 2021 -0800 i40e: clean up packet type lookup table Remove the unused ptype struct value, which makes table init easier for the zero entries, and use ranged initializer to remove a bunch of code (works with gcc and clang). There is no significant functional change. Signed-off-by: Jesse Brandeburg Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit dda90cb90a5ced4ebfb75e3f06d59fa1abb58f65 Author: Jesse Brandeburg Date: Tue Feb 23 15:47:05 2021 -0800 ice: report hash type such as L2/L3/L4 The hardware is reporting the type of the hash used for RSS as a PTYPE field in the receive descriptor. Use this value to set the skb packet hash type by extending the hash type table to cover all 10-bits of possible values (requiring some variables to be changed from u8 to u16), and then use that table to convert to one of the possible values in enum pkt_hash_types. While we're here, remove the unused ptype struct value, which makes table init easier for the zero entries, and use ranged initializer to remove a bunch of code (works with gcc and clang). Without this change, the kernel will recalculate the hash in software, which can consume extra CPU cycles. Co-developed-by: Kiran Patil Signed-off-by: Kiran Patil Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit f6b6a80360995ad175e43d220af979f119e52cd3 Merge: 245a057fee18b 3d41fff3ae398 Author: Thomas Gleixner Date: Fri Jun 18 17:57:47 2021 +0200 Merge tag 'timers-v5.14' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent/source updates from Daniel Lezcano: - Remove arch_timer_rate1 variable as it is unused in the architected ARM timer (Jisheng Zhang) - Minor cleanups (whitespace, constification, ...) for the Samsung pwm timer (Krzysztof Kozlowski) - Acknowledge and disable the timer interrupt at suspend time to prevent the suspend to be aborted by the ATF if there is a pending one on the Mediatek timer (Evan Benn) - Save and restore the configuration register at suspend/resume time for TI dm timer (Tony Lindgren) - Set the scene for the next timers support by renaming the array variables on the Ingenic time (Zhou Yanjie) - Add the clock rate change notification to adjust the prescalar value and compensate the clock source on the ARM global timer (Andrea Merello) - Add missing variable static annotation on the ARM global timer (Zou Wei) - Remove a duplicate argument when building the bits field on the ARM global timer (Wan Jiabing) - Improve the timer workaround function by reducing the loop on the Allwinner A64 timer (Samuel Holland) - Do no restore the register context in case of error on the TI dm timer (Tony Lindgren) Link: https://lore.kernel.org/r/65ed5f60-d7a5-b4ae-ff78-0382d4671cc5@linaro.org commit a79b28c284fd910bb291dbf307a26f4d432e88f3 Author: Dave Chinner Date: Fri Jun 18 08:21:48 2021 -0700 xfs: separate CIL commit record IO To allow for iclog IO device cache flush behaviour to be optimised, we first need to separate out the commit record iclog IO from the rest of the checkpoint so we can wait for the checkpoint IO to complete before we issue the commit record. This separation is only necessary if the commit record is being written into a different iclog to the start of the checkpoint as the upcoming cache flushing changes requires completion ordering against the other iclogs submitted by the checkpoint. If the entire checkpoint and commit is in the one iclog, then they are both covered by the one set of cache flush primitives on the iclog and hence there is no need to separate them for ordering. Otherwise, we need to wait for all the previous iclogs to complete so they are ordered correctly and made stable by the REQ_PREFLUSH that the commit record iclog IO issues. This guarantees that if a reader sees the commit record in the journal, they will also see the entire checkpoint that commit record closes off. This also provides the guarantee that when the commit record IO completes, we can safely unpin all the log items in the checkpoint so they can be written back because the entire checkpoint is stable in the journal. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Brian Foster Reviewed-by: Allison Henderson Signed-off-by: Darrick J. Wong commit 18842e0a4f48564bbed541947abd8131fd0e9734 Author: Geert Uytterhoeven Date: Fri Jun 18 08:24:04 2021 -0700 xfs: Fix 64-bit division on 32-bit in xlog_state_switch_iclogs() On 32-bit (e.g. m68k): ERROR: modpost: "__udivdi3" [fs/xfs/xfs.ko] undefined! Fix this by using a uint32_t intermediate, like before. Reported-by: noreply@ellerman.id.au Fixes: 7660a5b48fbef958 ("xfs: log stripe roundoff is a property of the log") Signed-off-by: Geert Uytterhoeven Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7a778f9dc32deae4f748903f6f9169dc01cbcd28 Author: Pavel Begunkov Date: Thu Jun 17 18:14:10 2021 +0100 io_uring: improve in tctx_task_work() resubmission If task_state is cleared, io_req_task_work_add() will go the slow path adding a task_work, setting the task_state, waking up the task and so on. Not to mention it's expensive. tctx_task_work() first clears the state and then executes all the work items queued, so if any of them resubmits or adds new task_work items, it would unnecessarily go through the slow path of io_req_task_work_add(). Let's clear the ->task_state at the end. We still have to check ->task_list for emptiness afterward to synchronise with io_req_task_work_add(), do that, and set the state back if we're going to retry, because clearing not-ours task_state on the next iteration would be buggy. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1ef72cdac7022adf0cd7ce4bfe3bb5c82a62eb93.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 16f72070386fca59312bde696cff917bb04b183e Author: Pavel Begunkov Date: Thu Jun 17 18:14:09 2021 +0100 io_uring: don't resched with empty task_list Entering tctx_task_work() with empty task_list is a strange scenario, that can happen only on rare occasion during task exit, so let's not check for task_list emptiness in advance and do it do-while style. The code still correct for the empty case, just would do extra work about which we don't care. Do extra step and do the check before cond_resched(), so we don't resched if have nothing to execute. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c4173e288e69793d03c7d7ce826f9d28afba718a.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c6538be9e4883d1371adaff45712b1b2172773dd Author: Pavel Begunkov Date: Thu Jun 17 18:14:08 2021 +0100 io_uring: refactor tctx task_work list splicing We don't need a full copy of tctx->task_list in tctx_task_work(), but only a first one, so just assign node directly. Taking into account that task_works are run in a context of a task, it's very unlikely to first see non-empty tctx->task_list and then splice it empty, can only happen with task_work cancellations that is not-normal slow path anyway. Hence, get rid of the check in the end, it's there not for validity but "performance" purposes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d076c83fedb8253baf43acb23b8fafd7c5da1714.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ebd0df2e63426bbd9ed50966e888c87eac88fc30 Author: Pavel Begunkov Date: Thu Jun 17 18:14:07 2021 +0100 io_uring: optimise task_work submit flushing tctx_task_work() tries to fetch a next batch of requests, but before it would flush completions from the previous batch that may be sub-optimal. E.g. io_req_task_queue() executes a head of the link where all the linked may be enqueued through the same io_req_task_queue(). And there are more cases for that. Do the flushing at the end, so it can cache completions of several waves of a single tctx_task_work(), and do the flush at the very end. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3cac83934e4fbce520ff8025c3524398b3ae0270.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3f18407dc6f2db0968daaa36c39a772c2c9f8ea7 Author: Pavel Begunkov Date: Thu Jun 17 18:14:06 2021 +0100 io_uring: inline __tctx_task_work() Inline __tctx_task_work() into tctx_task_work() in preparation for further optimisations. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f9c05c4bc9763af7bd8e25ebc3c5f7b6f69148f8.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a3dbdf54da80326fd12bc11ad75ecd699a82374f Author: Pavel Begunkov Date: Thu Jun 17 18:14:05 2021 +0100 io_uring: refactor io_get_sequence() Clean up io_get_sequence() and add a comment describing the magic around sequence correction. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f55dc409936b8afa4698d24b8677a34d31077ccb.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c854357bc1b965e1e261c612d5be1297dfb3e406 Author: Pavel Begunkov Date: Thu Jun 17 18:14:04 2021 +0100 io_uring: clean all flags in io_clean_op() at once Clean all flags in io_clean_op() in the end in one operation, will save us a couple of operation and binary size. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b8efe1f022a037f74e7fe497c69fb554d59bfeaf.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 1dacb4df4ebe61ec2005d7ab82ee38ffa7125ee7 Author: Pavel Begunkov Date: Thu Jun 17 18:14:03 2021 +0100 io_uring: simplify iovec freeing in io_clean_op() We don't get REQ_F_NEED_CLEANUP for rw unless there is ->free_iovec set, so remove the optimisation of NULL checking it inline, kfree() will take care if that would ever be the case. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a233dc655d3d45bd4f69b73d55a61de46d914415.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b8e64b530011162adda0e176150774d22326c50c Author: Pavel Begunkov Date: Thu Jun 17 18:14:02 2021 +0100 io_uring: track request creds with a flag Currently, if req->creds is not NULL, then there are creds assigned. Track the invariant with a new flag in req->flags. No need to clear the field at init, and also cleanup can be efficiently moved into io_clean_op(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5f8baeb8d3b909487f555542350e2eac97005556.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c10d1f986b4e2a906862148c77a97f186cc08b9e Author: Pavel Begunkov Date: Thu Jun 17 18:14:01 2021 +0100 io_uring: move creds from io-wq work to io_kiocb io-wq now doesn't have anything to do with creds now, so move ->creds from struct io_wq_work into request (aka struct io_kiocb). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8520c72ab8b8f4b96db12a228a2ab4c094ae64e1.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2a2758f26df519fab011f49d53440382dda8e1a5 Author: Pavel Begunkov Date: Thu Jun 17 18:14:00 2021 +0100 io_uring: refactor io_submit_flush_completions() struct io_comp_state is always contained in struct io_ring_ctx, don't pass them into io_submit_flush_completions() separately, it makes the interface cleaner and simplifies it for the compiler. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/44d6ca57003a82484338e95197024dbd65a1b376.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e6ab8991c5d0b0deae0961dc22c0edd1dee328f5 Author: Pavel Begunkov Date: Thu Jun 17 18:13:59 2021 +0100 io_uring: fix false WARN_ONCE WARNING: CPU: 1 PID: 11749 at fs/io-wq.c:244 io_wqe_wake_worker fs/io-wq.c:244 [inline] WARNING: CPU: 1 PID: 11749 at fs/io-wq.c:244 io_wqe_enqueue+0x7f6/0x910 fs/io-wq.c:751 A WARN_ON_ONCE() in io_wqe_wake_worker() can be triggered by a valid userspace setup. Replace it with pr_warn. Reported-by: syzbot+ea2f1484cffe5109dc10@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f7ede342c3342c4c26668f5168e2993e38bbd99c.1623949695.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a6a65fef5ef8d0a6a0ce514eb66b2f3dfa777b48 Author: Dave Chinner Date: Fri Jun 18 08:21:48 2021 -0700 xfs: log stripe roundoff is a property of the log We don't need to look at the xfs_mount and superblock every time we need to do an iclog roundoff calculation. The property is fixed for the life of the log, so store the roundoff in the log at mount time and use that everywhere. On a debug build: $ size fs/xfs/xfs_log.o.* text data bss dec hex filename 27360 560 8 27928 6d18 fs/xfs/xfs_log.o.orig 27219 560 8 27787 6c8b fs/xfs/xfs_log.o.patched Signed-off-by: Dave Chinner Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Allison Henderson commit 9bb38aa080394fb327c90eff75388e0598f266f0 Author: Shaokun Zhang Date: Fri Jun 18 08:14:31 2021 -0700 xfs: remove redundant initialization of variable error 'error' will be initialized, so clean up the redundant initialization. Cc: "Darrick J. Wong" Signed-off-by: Shaokun Zhang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 90e2c1c20ac672756a2835b5a92a606dd48a4aa3 Author: Dave Chinner Date: Fri Jun 18 08:14:20 2021 -0700 xfs: perag may be null in xfs_imap() Dan Carpenter's static checker reported: The patch 7b13c5155182: "xfs: use perag for ialloc btree cursors" from Jun 2, 2021, leads to the following Smatch complaint: fs/xfs/libxfs/xfs_ialloc.c:2403 xfs_imap() error: we previously assumed 'pag' could be null (see line 2294) And it's right. Fix it. Fixes: 7b13c5155182 ("xfs: use perag for ialloc btree cursors") Reported-by: Dan Carpenter Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit d1015e2ebda64af30c9b30c7e049de1b203180cf Merge: 68b2c8bcdb813 816c8e39b7ea0 Author: Darrick J. Wong Date: Fri Jun 18 08:13:22 2021 -0700 Merge tag 'xfs-delay-ready-attrs-v20.1' of https://github.com/allisonhenderson/xfs_work into xfs-5.14-merge4 xfs: Delay Ready Attributes Hi all, This set is a subset of a larger series for Dealyed Attributes. Which is a subset of a yet larger series for parent pointers. Delayed attributes allow attribute operations (set and remove) to be logged and committed in the same way that other delayed operations do. This allows more complex operations (like parent pointers) to be broken up into multiple smaller transactions. To do this, the existing attr operations must be modified to operate as a delayed operation. This means that they cannot roll, commit, or finish transactions. Instead, they return -EAGAIN to allow the calling function to handle the transaction. In this series, we focus on only the delayed attribute portion. We will introduce parent pointers in a later set. The set as a whole is a bit much to digest at once, so I usually send out the smaller sub series to reduce reviewer burn out. But the entire extended series is visible through the included github links. Updates since v19: Added Darricks fix for the remote block accounting as well as some minor nits about the default assert in xfs_attr_set_iter. Spent quite a bit of time testing this cycle to weed out any more unexpected bugs. No new test failures were observed with the addition of this set. xfs: Fix default ASSERT in xfs_attr_set_iter Replaced the assert with ASSERT(0); xfs: Add delay ready attr remove routines Added Darricks fix for remote block accounting This series can be viewed on github here: https://github.com/allisonhenderson/xfs_work/tree/delay_ready_attrs_v20 As well as the extended delayed attribute and parent pointer series: https://github.com/allisonhenderson/xfs_work/tree/delay_ready_attrs_v20_extended And the test cases: https://github.com/allisonhenderson/xfs_work/tree/pptr_xfstestsv3 In order to run the test cases, you will need have the corresponding xfsprogs changes as well. Which can be found here: https://github.com/allisonhenderson/xfs_work/tree/delay_ready_attrs_xfsprogs_v20 https://github.com/allisonhenderson/xfs_work/tree/delay_ready_attrs_xfsprogs_v20_extended To run the xfs attributes tests run: check -g attr To run as delayed attributes run: export MOUNT_OPTIONS="-o delattr" check -g attr To run parent pointer tests: check -g parent I've also made the corresponding updates to the user space side as well, and ported anything they need to seat correctly. Questions, comment and feedback appreciated! Thanks all! Allison * tag 'xfs-delay-ready-attrs-v20.1' of https://github.com/allisonhenderson/xfs_work: xfs: Make attr name schemes consistent xfs: Fix default ASSERT in xfs_attr_set_iter xfs: Clean up xfs_attr_node_addname_clear_incomplete xfs: Remove xfs_attr_rmtval_set xfs: Add delay ready attr set routines xfs: Add delay ready attr remove routines xfs: Hoist node transaction handling xfs: Hoist xfs_attr_leaf_addname xfs: Hoist xfs_attr_node_addname xfs: Add helper xfs_attr_node_addname_find_attr xfs: Separate xfs_attr_node_addname and xfs_attr_node_addname_clear_incomplete xfs: Refactor xfs_attr_set_shortform xfs: Add xfs_attr_node_remove_name xfs: Reverse apply 72b97ea40d commit 61e8aeda9398925f8c6fc290585bdd9727d154c4 Author: Tony Ambardar Date: Thu Jun 17 23:14:04 2021 -0700 bpf: Fix libelf endian handling in resolv_btfids The vmlinux ".BTF_ids" ELF section is declared in btf_ids.h to hold a list of zero-filled BTF IDs, which is then patched at link-time with correct values by resolv_btfids. The section is flagged as "allocable" to preclude compression, but notably the section contents (BTF IDs) are untyped. When patching the BTF IDs, resolve_btfids writes in host-native endianness and relies on libelf for any required translation on reading and updating vmlinux. However, since the type of the .BTF_ids section content defaults to ELF_T_BYTE (i.e. unsigned char), no translation occurs. This results in incorrect patched values when cross-compiling to non-native endianness, and can manifest as kernel Oops and test failures which are difficult to troubleshoot [1]. Explicitly set the type of patched data to ELF_T_WORD, the architecture- neutral ELF type corresponding to the u32 BTF IDs. This enables libelf to transparently perform any needed endian conversions. Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Cc: Frank Eigler Cc: Mark Wielaard Cc: Jiri Olsa Cc: Yonghong Song Link: https://lore.kernel.org/bpf/CAPGftE_eY-Zdi3wBcgDfkz_iOr1KF10n=9mJHm1_a_PykcsoeA@mail.gmail.com [1] Link: https://lore.kernel.org/bpf/20210618061404.818569-1-Tony.Ambardar@gmail.com commit f654fae47e83e56b454fbbfd0af0a4f232e356d6 Author: Magnus Karlsson Date: Fri Jun 18 09:58:05 2021 +0200 xsk: Fix broken Tx ring validation Fix broken Tx ring validation for AF_XDP. The commit under the Fixes tag, fixed an off-by-one error in the validation but introduced another error. Descriptors are now let through even if they straddle a chunk boundary which they are not allowed to do in aligned mode. Worse is that they are let through even if they straddle the end of the umem itself, tricking the kernel to read data outside the allowed umem region which might or might not be mapped at all. Fix this by reintroducing the old code, but subtract the length by one to fix the off-by-one error that the original patch was addressing. The test chunk != chunk_end makes sure packets do not straddle chunk boundraries. Note that packets of zero length are allowed in the interface, therefore the test if the length is non-zero. Fixes: ac31565c2193 ("xsk: Fix for xp_aligned_validate_desc() when len == chunk_size") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Reviewed-by: Xuan Zhuo Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20210618075805.14412-1-magnus.karlsson@gmail.com commit 2f99619820c2269534eb2c0cde44870313c6d353 Author: Magnus Karlsson Date: Thu Jun 17 11:22:55 2021 +0200 xsk: Fix missing validation for skb and unaligned mode Fix a missing validation of a Tx descriptor when executing in skb mode and the umem is in unaligned mode. A descriptor could point to a buffer straddling the end of the umem, thus effectively tricking the kernel to read outside the allowed umem region. This could lead to a kernel crash if that part of memory is not mapped. In zero-copy mode, the descriptor validation code rejects such descriptors by checking a bit in the DMA address that tells us if the next page is physically contiguous or not. For the last page in the umem, this bit is not set, therefore any descriptor pointing to a packet straddling this last page boundary will be rejected. However, the skb path does not use this bit since it copies out data and can do so to two different pages. (It also does not have the array of DMA address, so it cannot even store this bit.) The code just returned that the packet is always physically contiguous. But this is unfortunately also returned for the last page in the umem, which means that packets that cross the end of the umem are being allowed, which they should not be. Fix this by introducing a check for this in the SKB path only, not penalizing the zero-copy path. Fixes: 2b43470add8c ("xsk: Introduce AF_XDP buffer allocation API") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20210617092255.3487-1-magnus.karlsson@gmail.com commit 52d7e288444906aa5c99888e80a9cc1a1423ed92 Author: Dan Carpenter Date: Fri Jun 18 16:45:22 2021 +0300 blk-mq: fix an IS_ERR() vs NULL bug The __blk_mq_alloc_disk() function doesn't return NULLs it returns error pointers. Fixes: b461dfc49eb6 ("blk-mq: add the blk_mq_alloc_disk APIs") Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/YMyjci35WBqrtqG+@mwanda Signed-off-by: Jens Axboe commit 2b9ac22b12a266eb4fec246a07b504dd4983b16b Author: Kristian Klausen Date: Fri Jun 18 13:51:57 2021 +0200 loop: Fix missing discard support when using LOOP_CONFIGURE Without calling loop_config_discard() the discard flag and parameters aren't set/updated for the loop device and worst-case they could indicate discard support when it isn't the case (ex: if the LOOP_SET_STATUS ioctl was used with a different file prior to LOOP_CONFIGURE). Cc: # 5.8.x- Fixes: 3448914e8cc5 ("loop: Add LOOP_CONFIGURE ioctl") Signed-off-by: Kristian Klausen Link: https://lore.kernel.org/r/20210618115157.31452-1-kristian@klausen.dk Signed-off-by: Jens Axboe commit e42cfb1da0bf33c313318da201730324c423351d Author: Damien Le Moal Date: Fri Jun 18 10:59:22 2021 +0900 block: Remove unnecessary elevator operation checks The insert_requests and dispatch_request elevator operations are mandatory for the correct execution of an elevator, and all implemented elevators (bfq, kyber and mq-deadline) implement them. As a result, there is no need to check for these operations before calling them when a queue has an elevator set. This simplifies the code in __blk_mq_sched_dispatch_requests() and blk_mq_sched_insert_request(). To avoid out-of-tree elevators to crash the kernel in case of bad implementation, add a check in elv_register() to verify that these operations are implemented. A small, probably not significant, IOPS improvement of 0.1% is observed with this patch applied (4.117 MIOPS to 4.123 MIOPS, average of 20 fio runs doing 4K random direct reads with psync and 32 jobs). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20210618015922.713999-1-damien.lemoal@wdc.com Signed-off-by: Jens Axboe commit f0c1c4d2864ed614f90d2da1bab1a1c42907b940 Author: Ming Lei Date: Wed Jun 9 14:30:46 2021 +0800 blk-mq: fix use-after-free in blk_mq_exit_sched tagset can't be used after blk_cleanup_queue() is returned because freeing tagset usually follows blk_clenup_queue(). Commit d97e594c5166 ("blk-mq: Use request queue-wide tags for tagset-wide sbitmap") adds check on q->tag_set->flags in blk_mq_exit_sched(), and causes use-after-free. Fixes it by using hctx->flags. Reported-by: syzbot+77ba3d171a25c56756ea@syzkaller.appspotmail.com Fixes: d97e594c5166 ("blk-mq: Use request queue-wide tags for tagset-wide sbitmap") Cc: John Garry Signed-off-by: Ming Lei Tested-by: John Garry Reviewed-by: John Garry Link: https://lore.kernel.org/r/20210609063046.122843-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit d71abfcc6c050b72ba735b74f3e3848ce07ddd15 Author: Suman Anna Date: Tue Jun 15 14:57:18 2021 -0500 arm64: dts: ti: k3-am642-evm/sk: Add DDR carveout memory nodes for R5Fs Two carveout reserved memory nodes each have been added for each of the R5F remote processor devices within the MAIN domain on the TI AM642 EVM and SK boards. These nodes are assigned to the respective rproc device nodes as well. The first region will be used as the DMA pool for the rproc devices, and the second region will furnish the static carveout regions for the firmware memory. An additional reserved memory node is also added to reserve a portion of the DDR memory to be used for performing inter-processor communication between all the remote processors running RTOS or baremetal firmwares. 8 MB of memory is reserved for this purpose, and this accounts for all the vrings and vring buffers between all the possible pairs of remote processors. The current carveout addresses and sizes are defined statically for each rproc device. The R5F processors do not have an MMU, and as such require the exact memory used by the firmwares to be set-aside. The firmware images do not require any RSC_CARVEOUT entries in their resource tables to allocate the memory for firmware memory segments. NOTE: 1. The R5F1 carveouts are needed only if the R5F cluster is running in Split (non Single-CPU) mode. The reserved memory nodes can be disabled later on if there is no use-case defined to use the corresponding remote processor. 2. The AM64x SoCs do not have any DSPs and one less R5F cluster compared to J721E SoCs. So, while the carveout memories reserved for the R5F clusters present on the SoC match to those on J721E, the overall memory map reserved for firmwares is quite different. The number of R5F clusters on AM64x SoCs are same as on J7200 SoCs, but the AM64x SoCs also have an additional M4F core, so the RTOS IPC memory region is 1 MB higher than on J7200 SoCs. Signed-off-by: Suman Anna Reviewed-by: Praneeth Bajjuri Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210615195718.15898-4-s-anna@ti.com commit 0afadba435892c8d330e3238b9cc7f9ee8b20e90 Author: Suman Anna Date: Tue Jun 15 14:57:17 2021 -0500 arm64: dts: ti: k3-am642-evm/sk: Add mailboxes to R5Fs Add the required 'mboxes' property to all the R5F processors for the TI AM642 EVM and SK boards. The mailboxes and some shared memory are required for running the Remote Processor Messaging (RPMsg) stack between the host processor and each of the R5Fs. The chosen sub-mailboxes match the values used in the current firmware images. This can be changed, if needed, as per the system integration needs after making appropriate changes on the firmware side as well. Note that any R5F Core1 resources are needed and used only when that R5F cluster is configured for Split-mode. Signed-off-by: Suman Anna Reviewed-by: Praneeth Bajjuri Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210615195718.15898-3-s-anna@ti.com commit a4f221cd68b306d6311237e47b531d21fab8dfa4 Author: Suman Anna Date: Tue Jun 15 14:57:16 2021 -0500 arm64: dts: ti: k3-am64-main: Add MAIN domain R5F cluster nodes The AM64x SoCs have 2 dual-core Arm Cortex-R5F processor (R5FSS) subsystems/clusters. Both the R5F clusters are present within the MAIN domain (MAIN_R5FSS0 & MAIN_R5FSS1). Each of these can be configured at boot time to be either run in a new "Single-CPU" mode or in an Asymmetric Multi Processing (AMP) fashion in Split-mode. The mode is restricted to "Single-CPU" on some devices with the appropriate eFuse bit set, but the most common devices support both modes. These subsystems have 64 KB each Tightly-Coupled Memory (TCM) internal memories for each core split between two banks - ATCM and BTCM (further interleaved into two banks). The TCMs of both Cores are combined in Single-CPU mode to provide a larger 128 KB of memory. The other notable difference is that the TCMs are spaced 1 MB apart on these SoCs unlike the existing SoCs. Add the DT nodes for both these MAIN domain R5F cluster/subsystems, the two R5F cores are added as child nodes to each of the corresponding R5F cluster node. Both the clusters are configured to run in Split mode by default, with the ATCMs enabled to allow the R5 cores to execute code from DDR with boot-strapping code from ATCM. The inter-processor communication between the main A72 cores and these processors is achieved through shared memory and Mailboxes. The following firmware names are used by default for these cores, and can be overridden in a board dts file if desired: MAIN R5FSS0 Core0: am64-main-r5f0_0-fw (both in Single-CPU & Split modes) MAIN R5FSS0 Core1: am64-main-r5f0_1-fw (needed only in Split mode) MAIN R5FSS1 Core0: am64-main-r5f1_0-fw (both in Single-CPU & Split modes) MAIN R5FSS1 Core1: am64-main-r5f1_1-fw (needed only in Split mode) NOTE: A R5FSS cluster can be configured in "Single-CPU" mode by using a value of 2 for the "ti,cluster-mode" property. Value of 1 is not permitted (fails the dtbs_check). Signed-off-by: Suman Anna Reviewed-by: Praneeth Bajjuri Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210615195718.15898-2-s-anna@ti.com commit b75596dbdb69afaa9247cda1a9c6fe0d4a36bcdc Merge: 3de27ef12ccb5 c16ced60f3bf4 Author: Nishanth Menon Date: Fri Jun 18 09:41:44 2021 -0500 Merge tag '20210327143117.1840-2-s-anna@ti.com' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc into ti-k3-dts-next v5.13-rc1 + 20210327143117.1840-2-s-anna@ti.com * tag '20210327143117.1840-2-s-anna@ti.com' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: dt-bindings: remoteproc: k3-r5f: Update bindings for AM64x SoCs Signed-off-by: Nishanth Menon commit 5a4e0f58e2d959e2de0f0f1ddaa169e60711d2f0 Author: Heiko Carstens Date: Mon Jun 14 22:32:21 2021 +0200 s390/ipl: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit da9057576785aaab52e706e76c0475c85b77ec14 Author: Heiko Carstens Date: Mon Jun 14 22:09:20 2021 +0200 s390/mem_detect: fix tprot() program check new psw handling The tprot() inline asm temporarily changes the program check new psw to redirect a potential program check on the diag instruction. Restoring of the program check new psw is done in C code behind the inline asm. This can be problematic, especially if the function is inlined, since the compiler can reorder instructions in such a way that a different instruction, which may result in a program check, might be executed before the program check new psw has been restored. To avoid such a scenario move restoring into the inline asm. For consistency reasons move also saving of the original program check new psw into the inline asm. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 1b2f281f45afd5def728288df9732a74e8d12582 Author: Heiko Carstens Date: Mon Jun 14 21:57:58 2021 +0200 s390/mem_detect: use register pair instead of register asm ...and slightly cleanup the inline asm. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 86807f348f418a84970eebb8f9912a7eea16b497 Author: Heiko Carstens Date: Mon Jun 14 21:40:43 2021 +0200 s390/mem_detect: fix diag260() program check new psw handling The __diag260() inline asm temporarily changes the program check new psw to redirect a potential program check on the diag instruction. Restoring of the program check new psw is done in C code behind the inline asm. This can be problematic, especially if the function is inlined, since the compiler can reorder instructions in such a way that a different instruction, which may result in a program check, might be executed before the program check new psw has been restored. To avoid such a scenario move restoring into the inline asm. For consistency reasons move also saving of the original program check new psw into the inline asm. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d99aea73b4de2357095e1059637ef5427e9473e8 Author: Heiko Carstens Date: Mon Jun 14 21:30:44 2021 +0200 s390/facility: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit dbb8864b28d6323cb38e5ce332cc3bb7f46ed5d3 Author: Heiko Carstens Date: Mon Jun 14 21:07:37 2021 +0200 s390/uaccess: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 5fe29839deb49ae5e9af32c1d344c867398b33eb Author: Heiko Carstens Date: Mon Jun 14 19:54:42 2021 +0200 s390/sysinfo: get rid of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 53c1c2504b6b35871b20c832be96163c846f3517 Author: Heiko Carstens Date: Mon Jun 14 19:38:07 2021 +0200 s390/pgtable: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9e2509265560a7b82cecfd39caae5cf7d62e59f3 Author: Heiko Carstens Date: Mon Jun 14 18:55:07 2021 +0200 s390/ipl_parm: use register pair instead of register asm ...and slightly cleanup the inline asm. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 88c2510cecb7e2b518e3c4fdf3cf0e13ebe9377c Author: Heiko Carstens Date: Mon Jun 14 14:49:31 2021 +0200 s390/ipl_parm: fix program check new psw handling The __diag308() inline asm temporarily changes the program check new psw to redirect a potential program check on the diag instruction. Restoring of the program check new psw is done in C code behind the inline asm. This can be problematic, especially if the function is inlined, since the compiler can reorder instructions in such a way that a different instruction, which may result in a program check, might be executed before the program check new psw has been restored. To avoid such a scenario move restoring into the inline asm. For consistency reasons move also saving of the original program check new psw into the inline asm. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d66a4c7f760bb13222af9d69a6dca893130d193f Author: Niklas Schnelle Date: Tue Jun 15 17:08:23 2021 +0200 s390/pci: use register pair instead of register asm Reviewed-by: Heiko Carstens Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit f3827dc6b06e3b49f8a50daa899af82581daf090 Author: Julian Wiedmann Date: Mon Jun 14 09:14:27 2021 +0200 s390/hvc_iucv: Remove power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove the hvc_iucv_driver, but keep the device struct around so that it can continue to provide the hvc_iucv_dev_attr_groups attributes. Signed-off-by: Julian Wiedmann Acked-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 7b034d9c1b08b3d06ad712283c1115a7fe39e354 Author: Dimitri John Ledkov Date: Tue Jun 15 12:41:50 2021 +0100 s390/boot: add zstd support Enable ztsd support in s390/boot, to enable booting with zstd compressed kernel when configured with CONFIG_KERNEL_ZSTD=y. BOOT_HEAP_SIZE is defined to 0x30000 in this case. Actual decompressor memory usage with allyesconfig is currently 0x26150. BugLink: https://bugs.launchpad.net/bugs/1931725 Signed-off-by: Dimitri John Ledkov cc: Heiko Carstens cc: Vasily Gorbik cc: Christian Borntraeger cc: linux-s390@vger.kernel.org Link: https://lore.kernel.org/r/20210615114150.325080-1-dimitri.ledkov@canonical.com [gor: added BOOT_HEAP_SIZE for zstd] Signed-off-by: Vasily Gorbik commit 54f45214522ae74dc23ad262346ce1abbf96b1ed Author: Vasily Gorbik Date: Wed Jun 16 00:36:41 2021 +0200 s390/decompressor: correct BOOT_HEAP_SIZE condition Currently BOOT_HEAP_SIZE is always defined as 0x400000 due to bogus condition. Use CONFIG_KERNEL_BZIP2 instead of CONFIG_HAVE_KERNEL_BZIP2 to correct that. BOOT_HEAP_SIZE of 0x10000 is still good enough for every decompressor algorithm but bzip2. Actual decompressor memory usage with allyesconfig is the following: gzip 0xbc28 bzip2 0x379518 xz 0x7410 lzma 0x3e6c lzo 0 lz4 0 Signed-off-by: Vasily Gorbik commit 87929cae887d9f5ef0d8505f18f6bafe8f7964ba Author: Zou Wei Date: Tue Jun 15 14:57:00 2021 +0800 s390/sclp: convert list_for_each to entry variant convert list_for_each() to list_for_each_entry() where applicable. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1623740220-15846-1-git-send-email-zou_wei@huawei.com Signed-off-by: Vasily Gorbik commit 0a9d947fbe3e89e44758e1b8bf0098e98b3ccd78 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/cpcmd: use register pair instead of register asm Remove register asm usage from diag8_noresponse() since it wasn't needed at all. There is no requirement for even/odd register pairs for diag 0x8. For diag_response() use register pairs to fulfill the rx+1 and ry+1 requirements as required if a response buffer is specified. Also change the inline asm to return the condition code of the diagnose instruction and do the conditional handling of response length calculation in C. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 25130c1a9e99c7b10af6d542d62808476a0dff24 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/sigp: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6a7b4e4ee1d9f7444dc7fe3ec1b3cf441a3ce9b4 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/sthyi: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit dda74578e7da917fdf2e16608c1f8ad2e87c451f Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/maccess: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit a29a6b5a925b52fbec6b10edf8a7b713fda72bf1 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/checksum: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 3c45a07bee619bb997b75b323f8d014e3efb36f8 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/diag: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 75c89a2bc6ef00fd3c38c69cba82a92d0535887a Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/page: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ddd38fd261e7cd7772caea0128d0bee65bf1b159 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/smp: use register pair instead of register asm Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4f38c7aefed3c5c4e0d57837ad4c81cfad05df50 Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390/bitops: use register pair instead of register asm Get rid of register asm statement and use a register pair. This allows the compiler to allocate registers on its own. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c4655a2098236d36c5b0678e56c9ea04308b45ed Author: Heiko Carstens Date: Wed Jun 9 22:59:13 2021 +0200 s390: introduce register pair union Introduce a register pair union, which is supposed to be used for inline assemblies where instructions require parameters in even/odd numbered register pairs. This is more or less the same register pair construct which was available for 31 bit builds which was removed with commit 5a79859ae0f3 ("s390: remove 31 bit support"). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6b8ed170956388725ac1ef0ea3eff34df323ee03 Author: Peter Oberparleiter Date: Fri Jun 11 13:28:13 2021 +0200 s390/vmlogrdr: Remove power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover vmlogrdr-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 2f7e52084e8408cc549c8ba8592da8174e14e5b6 Author: Peter Oberparleiter Date: Fri Jun 11 13:03:53 2021 +0200 s390/sclp: Remove sclp base power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp base-related power management code. Note that we keep the registration of the sclp platform driver since it is used to externalize non-PM related attributes in sysfs. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 9b357ccddb69d8e69d0de6f1ee307d5c171df19d Author: Peter Oberparleiter Date: Fri Jun 11 11:13:40 2021 +0200 s390/sclp: Remove quiesce power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp quiesce-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit fc8ebe820b595e1e53d7d0419bae59e3624fc7ef Author: Peter Oberparleiter Date: Fri Jun 11 11:11:36 2021 +0200 s390/sclp: Remove memory hotplug power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp memory hotplug-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 2f554d8b0a1e1b8b84af744f7dda38f74e21b180 Author: Peter Oberparleiter Date: Fri Jun 11 11:07:15 2021 +0200 s390/sclp: Remove vt220 power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp vt220-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 5602bf8a7b05084d6fbb15c5889af6861ac61661 Author: Peter Oberparleiter Date: Fri Jun 11 11:05:40 2021 +0200 s390/sclp: Remove console power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover sclp console-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 21adcf11f62db0347bb95740d02bcf2867ed5e01 Author: Peter Oberparleiter Date: Wed Jun 9 17:17:23 2021 +0200 s390/monwriter: Remove power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover monwriter-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 8e1eaf4d834a6f51ece2a9ac9ebdf1854ec482e9 Author: Peter Oberparleiter Date: Wed Jun 9 16:59:29 2021 +0200 s390/monreader: Remove power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover monreader-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 28ac9b195d662dd8c5e4cc5fefb80bd3121aaee0 Author: Peter Oberparleiter Date: Wed Jun 9 16:18:58 2021 +0200 s390/xpram: Remove power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover xpram-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit e2f4d7b55b9900a15ed1911b0aead485395b765d Author: Peter Oberparleiter Date: Wed Jun 9 15:46:17 2021 +0200 s390/dcssblk: Remove power management support Power management support was removed for s390 with commit 394216275c7d ("s390: remove broken hibernate / power management support"). Remove leftover dcssblk-related power management code. Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit c749d8c018daf5fba6dfac7b6c5c78b27efd7d65 Author: Vineeth Vijayan Date: Wed Jun 9 09:21:08 2021 +0200 s390/cio: dont call css_wait_for_slow_path() inside a lock Currently css_wait_for_slow_path() gets called inside the chp->lock. The path-verification-loop of slowpath inside this lock could lead to deadlock as reported by the lockdep validator. The ccw_device_get_chp_desc() during the instance of a device-set-online would try to acquire the same 'chp->lock' to read the chp->desc. The instance of this function can get called from multiple scenario, like probing or setting-device online manually. This could, in some corner-cases lead to the deadlock. lockdep validator reported this as, CPU0 CPU1 ---- ---- lock(&chp->lock); lock(kn->active#43); lock(&chp->lock); lock((wq_completion)cio); The chp->lock was introduced to serialize the access of struct channel_path. This lock is not needed for the css_wait_for_slow_path() function, so invoke the slow-path function outside this lock. Fixes: b730f3a93395 ("[S390] cio: add lock to struct channel_path") Cc: Reviewed-by: Peter Oberparleiter Signed-off-by: Vineeth Vijayan Signed-off-by: Vasily Gorbik commit 4aca3ab45d725fe8c4d8be6b67c904c3c3cc6a1d Author: Heiko Carstens Date: Thu Jun 10 17:58:00 2021 +0200 s390/irqflags: always inline arch irqflags functions All s390 irqflags functions are very small and should be always inlined. Therefore mark them __always_inline. This also allows to get rid of the rather odd notrace attribute for these small functions, which was only added to prevent tracing iff any of these functions would not be inlined. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9c9a915afd90f7534c16a71d1cd44b58596fddf3 Author: Heiko Carstens Date: Thu Jun 10 17:50:25 2021 +0200 s390/processor: always inline stap() and __load_psw_mask() s390 is the only architecture which makes use of the __no_kasan_or_inline attribute for two functions. Given that both stap() and __load_psw_mask() are very small functions they can and should be always inlined anyway. Therefore get rid of __no_kasan_or_inline and always inline these functions. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d2beeb3bc74ec897ced7309c3a104fa4b3be0ac3 Author: Peter Oberparleiter Date: Wed Jun 9 14:05:56 2021 +0200 s390/debug: Remove pointer obfuscation When read via debugfs, s390dbf debug-views print the kernel address of the call-site that created a trace entry. The kernel's %p pointer hashing feature obfuscates this address, and commit 860ec7c6e21c ("s390/debug: use pK for kernel pointers") made this obfuscation configurable via the kptr_restrict sysctl. Obfuscation of kernel address data printed via s390dbf debug-views does not add any additional protection since the associated debugfs files are only accessible to the root user that typically has enough other means to obtain kernel address data. Also trace payload data may contain binary representations of kernel addresses as part of logged data structues. Requiring such payload data to be obfuscated as well would be impractical and greatly diminish the use of s390dbf. Therefore completely remove pointer obfuscation from s390dbf debug-views. Reviewed-by: Steffen Maier Acked-by: Heiko Carstens Signed-off-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 6a9100ad132c61e4ff345277862e3fecfb7cdf0e Author: Vasily Gorbik Date: Thu Oct 8 15:07:27 2020 +0200 s390/setup: cleanup reserve/remove_oldmem Since OLDMEM_BASE/OLDMEM_SIZE is already taken into consideration and is reflected in ident_map_size. reserve/remove_oldmem() is no longer needed and could be removed. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 0c4f2623b95779fe8cfb277fa255e4b91c0f96f0 Author: Vasily Gorbik Date: Tue Oct 6 22:12:39 2020 +0200 s390: setup kernel memory layout early Currently there are two separate places where kernel memory layout has to be known and adjusted: 1. early kasan setup. 2. paging setup later. Those 2 places had to be kept in sync and adjusted to reflect peculiar technical details of one another. With additional factors which influence kernel memory layout like ultravisor secure storage limit, complexity of keeping two things in sync grew up even more. Besides that if we look forward towards creating identity mapping and enabling DAT before jumping into uncompressed kernel - that would also require full knowledge of and control over kernel memory layout. So, de-duplicate and move kernel memory layout setup logic into the decompressor. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 94f31542f176d4218dfca92a7d9f96ebb0a3ea31 Merge: aa2ddd2425721 87ee8de23c9df Author: Hans de Goede Date: Fri Jun 18 15:30:32 2021 +0200 Merge tag 'devm-helpers-v5.14-1' into review-hans Signed tag for the immutable devm-helpers branch for merging into the extcon and pdx86 trees. commit aa2ddd24257213bdfd2f65058531810ac57455dc Author: Srinivas Pandruvada Date: Wed Jun 16 15:13:29 2021 -0700 platform/x86: ISST: Use numa node id for cpu pci dev mapping There is a problem in mapping CPU to a PCI device instance when the bus numbers are reused in different packages. This was observed on some Sapphire Rapids systems. The current implementation reads bus number assigned to a CPU package via MSR 0x128. This allows to establish relationship between a CPU and a PCI device. This allows to update power related parameters to a MMIO offset in a PCI device space which is unique to a CPU. But if two packages uses same bus number then this mapping will not be unique. When bus number is reused, PCI device will use different domain number or segment number. So we need to be aware of this domain information while matching CPU to PCI bus number. This domain information is not available via any MSR. So need to use ACPI numa node information. There is an interface already available in the Linux to read numa node for a CPU and a PCI device. This change uses this interface to check the numa node of a match PCI device with bus number. If the bus number and numa node matches with the CPU's assigned bus number and numa node, the matched PCI device instance will be returned to the caller. It is possible that before Sapphire Rapids, the numa node is not defined for the Speed Select PCI device in some OEM systems. In this case to restore old behavior, return the last matched PCI device for domain 0 unlsess there are more than one matches. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20210616221329.1909276-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1e42de8e53d32bbd7a732df49d872a30b4f888b4 Author: Srinivas Pandruvada Date: Wed Jun 16 15:13:28 2021 -0700 platform/x86: ISST: Optimize CPU to PCI device mapping It was observed that some of the high performance benchmarks are spending more time in kernel depending on which CPU package they are executing. The difference is significant and benchmark scores varies more than 10%. These benchmarks adjust class of service to improve thread performance which run in parallel. This class of service change causes access to MMIO region of Intel Speed Select PCI devices depending on the CPU package they are executing. This mapping from CPU to PCI device instance uses a standard Linux PCI interface "pci_get_domain_bus_and_slot()". This function does a linear search to get to a PCI device. Since these platforms have 100+ PCI devices, this search can be expensive in fast path for benchmarks. Since the device and function of PCI device is fixed for Intel Speed Select PCI devices, the CPU to PCI device information can be cached at the same time when bus number for the CPU is read. In this way during runtime the cached information can be used. This improves performance of these benchmarks significantly. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20210616221329.1909276-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 307722e872658ee8cfa4ee0f9a7aa9a1b2207417 Author: Srinivas Pandruvada Date: Thu Jun 10 14:36:35 2021 -0700 tools/power/x86/intel-speed-select: v1.10 release This release adds following change: - Fix reporting of memory frequency Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 159f130f60f402273b235801d1fde3fc115c6795 Author: Srinivas Pandruvada Date: Wed May 12 03:17:32 2021 -0700 tools/power/x86/intel-speed-select: Fix uncore memory frequency display The uncore memory frequency value from the mailbox command CONFIG_TDP_GET_MEM_FREQ needs to be scaled based on the platform for display. There is no single constant multiplier. This change introduces CPU model specific memory frequency multiplier. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit cb5faa8c7df02a83dd18d8b5c4090a69e93523ec Merge: b88835a89df70 d0c94c49792cf Author: Marc Zyngier Date: Fri Jun 18 14:25:59 2021 +0100 Merge branch kvm-arm64/pmu-fixes into kvmarm-master/next Fixes for the PMUv3 emulation of PMCR_EL0: - Don't spuriously reset the cycle counter when resetting other counters - Force PMCR_EL0 to become effective after having restored it * kvm-arm64/pmu-fixes: KVM: arm64: Restore PMU configuration on first run KVM: arm64: Don't zero the cycle count register when PMCR_EL0.P is set commit 934ed4580c0a13a49ab7c4cbf94cd1958c0679ed Author: Colin Ian King Date: Fri Jun 11 14:50:24 2021 +0100 iommu/vt-d: Fix dereference of pointer info before it is null checked The assignment of iommu from info->iommu occurs before info is null checked hence leading to a potential null pointer dereference issue. Fix this by assigning iommu and checking if iommu is null after null checking info. Addresses-Coverity: ("Dereference before null check") Fixes: 4c82b88696ac ("iommu/vt-d: Allocate/register iopf queue for sva devices") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210611135024.32781-1-colin.king@canonical.com Signed-off-by: Joerg Roedel commit d0c94c49792cf780cbfefe29f81bb8c3b73bc76b Author: Marc Zyngier Date: Thu Jun 3 16:50:02 2021 +0100 KVM: arm64: Restore PMU configuration on first run Restoring a guest with an active virtual PMU results in no perf counters being instanciated on the host side. Not quite what you'd expect from a restore. In order to fix this, force a writeback of PMCR_EL0 on the first run of a vcpu (using a new request so that it happens once the vcpu has been loaded). This will in turn create all the host-side counters that were missing. Reported-by: Jinank Jain Tested-by: Jinank Jain Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/87wnrbylxv.wl-maz@kernel.org Link: https://lore.kernel.org/r/b53dfcf9bbc4db7f96154b1cd5188d72b9766358.camel@amazon.de commit 62eec0d73393a136b4523952cecbda1438f1f1b9 Author: Florian Westphal Date: Wed Jun 16 22:06:19 2021 +0200 netfilter: conntrack: pass hook state to log functions The packet logger backend is unable to provide the incoming (or outgoing) interface name because that information isn't available. Pass the hook state, it contains the network namespace, the protocol family, the network interfaces and other things. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2a71fabf6a1bc9162a84e18d6ab991230ca4d588 Author: Alexandru Elisei Date: Fri Jun 18 11:51:39 2021 +0100 KVM: arm64: Don't zero the cycle count register when PMCR_EL0.P is set According to ARM DDI 0487G.a, page D13-3895, setting the PMCR_EL0.P bit to 1 has the following effect: "Reset all event counters accessible in the current Exception level, not including PMCCNTR_EL0, to zero." Similar behaviour is described for AArch32 on page G8-7022. Make it so. Fixes: c01d6a18023b ("KVM: arm64: pmu: Only handle supported event counters") Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210618105139.83795-1-alexandru.elisei@arm.com commit 4d041216c83dd9933c7c72b40511bb3585fa1724 Author: Yuri Nudelman Date: Sun Jun 13 09:22:20 2021 +0300 debugfs: add skip_reset_on_timeout option To be able to debug long-running CS better, without changing the userspace code, we are adding a new option through debugfs interface to skip the reset of the device in case of CS timeout. Signed-off-by: Yuri Nudelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 38e19d0b87ebc380341d5c026abed9e8060b2d37 Author: Zvika Yehudai Date: Tue Jun 15 14:12:20 2021 +0300 habanalabs: fix typo fix a spelling error in comment Signed-off-by: Zvika Yehudai Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7d5ba005cfbcf8f1f441bbbe72881dc2be54e82c Author: Ofir Bitton Date: Mon Jun 7 15:22:56 2021 +0300 habanalabs/gaudi: correct driver events numbering Currently driver sends fc interrupt id to FW instead of using cpu interrupt id. We intend to fix that and keep backward compatibility by using the same interrupt values. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5bdc657320168900e185f7d84d1ad8915205944d Author: Oded Gabbay Date: Tue Jun 15 12:00:38 2021 +0300 habanalabs: remove a rogue #ifdef There was a rogue #ifdef that crept into the upstream code for backwards compatibility which isn't needed of course. Signed-off-by: Oded Gabbay commit 2718e1d32238370404923d0eaa074647f2c788a5 Author: Ohad Sharabi Date: Mon May 24 09:59:31 2021 +0300 habanalabs/gaudi: print last QM PQEs on error In case QMAN has an error and stop_on_err is true, print specific information of the "offending" command buffer batch. If the error occurred on one of the higher CPs, the CQ pointer and size will be printed along with (up to) last 8 PQEs of the stream. If the error occurred in the lower CP, the CQ pointer and size will be printed along with (up to) last 8 PQEs of ALL upper CPs as we have no way to know which upper CP sent the job there. This is done so higher SW levels will be able to debug their CS by extracting the raw data of the offending command buffer batch and examine those offline to detect the issue. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f18cb6b58e34e0c4e8c11940b906c8c945493973 Author: Koby Elbaz Date: Mon Jun 14 08:06:15 2021 +0300 habanalabs/goya: add '__force' attribute to suppress false alarm fix (suppress) the following sparse warnings: 'warning: cast removes address space of expression' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e307b302be8beb7fb59aa16621d5081b69397076 Author: Yuri Nudelman Date: Mon May 24 11:25:21 2021 +0300 habanalabs: added open_stats info ioctl In a system with multiple ASICs, there is a need to provide monitoring tools with information on how long a device was opened and how many times a device was opened. Therefore, we add a new opcode to the INFO ioctl to provide that information. Signed-off-by: Yuri Nudelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1f7ef4bf41c7c2abad3d21b8c69db11fc3ebc4f5 Author: Koby Elbaz Date: Thu Jun 10 09:14:43 2021 +0300 habanalabs/gaudi: set the correct rc in case of err fix the following smatch warnings: gaudi_internal_cb_pool_init() warn: missing error code 'rc' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ba662265feac21ef2f47de97e1ab2107d5091a13 Author: Tal Albo Date: Thu Jun 10 12:18:37 2021 +0300 habanalabs/gaudi: update coresight configuration Update STMTCSR and STMSYNCR values in order to reduce amount of sync packets Signed-off-by: Tal Albo Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f5eb7bf0c487a212ebda3c1b048fc3ccabacc147 Author: Koby Elbaz Date: Wed Jun 9 21:43:52 2021 +0300 habanalabs: remove node from list before freeing the node fix the following smatch warnings: goya_pin_memory_before_cs() warn: '&userptr->job_node' not removed from list gaudi_pin_memory_before_cs() warn: '&userptr->job_node' not removed from list Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 11d5cb8b95456e2432dfee2ffcebf0623998493a Author: Koby Elbaz Date: Thu Jun 10 09:01:57 2021 +0300 habanalabs: set rc as 'valid' in case of intentional func exit fix the following smatch warnings: hl_fw_static_init_cpu() warn: missing error code 'rc' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b538888c3e49a0d1f1c59ef1b1ed2cd3d6e45db9 Author: Koby Elbaz Date: Thu Jun 10 15:09:54 2021 +0300 habanalabs: zero complex structures using memset fix the following sparse warnings: 'warning: Using plain integer as NULL pointer' 'warning: missing braces around initializer' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f5d6e39eb2a933a1734cd8a620c8bcd52c4a0947 Author: Tomer Tayar Date: Thu Jun 10 20:48:39 2021 +0300 habanalabs: print more info when failing to pin user memory pin_user_pages_fast() might fail and return a negative number, or pin less pages than requested and return the number of the pages that were pinned. For the latter, it is informative to print also the memory size and the number of requested pages. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3002f467a0b0a70aec01d9f446da4ac8c6fda10b Author: Christophe JAILLET Date: Sat Jun 12 07:39:51 2021 +0200 habanalabs: Fix an error handling path in 'hl_pci_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 2e5eda4681f9 ("habanalabs: PCIe Advanced Error Reporting support") Signed-off-by: Christophe JAILLET Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c9d2f5cf27c5712d5d6bc4ba0d10a3b21bd84ad2 Author: Oded Gabbay Date: Wed Jun 9 10:04:35 2021 +0300 habanalabs: print firmware versions Firmware in habanalabs devices is composed of several components. During device initialization, we read these versions from the device. Print them during device initialization to allow better visibility in automated systems. Signed-off-by: Oded Gabbay commit 4efb6b2b4662871c7299723e3e26976bfcd3a809 Author: Omer Shpigelman Date: Wed Jun 9 10:17:49 2021 +0300 habanalabs: add hard reset timeout for PLDM Hard reset flow on PLDM might take more than 2 minutes. Hence add a dedicated hard reset timeout of 6 minutes for PLDM. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4b09901cf71fdb71f7652b22a4f5e033f7defef9 Author: Bharat Jauhari Date: Fri May 28 13:14:34 2021 +0300 habanalabs: enable dram scramble before linux f/w In current code, for dynamic f/w loading flow, DRAM scrambling is enabled post Linux fit image is loaded to the card. This can cause the device CPU to go into reset state. The correct sequence should be: 1. Load boot fit image 2. Enable scrambling 3. Load Linux fit image This commit aligns the DRAM scrambling enabling with the static f/w load flow. Signed-off-by: Bharat Jauhari Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 358526be824f311e1db0d192cb9e96d85d27ac1d Author: Ofir Bitton Date: Thu Feb 11 11:09:12 2021 +0200 habanalabs: enable stop on error for all QMANs and engines If there is an error in the QMAN/engine, there is no point of trying to continue running the workload. It is better to stop to allow the user to debug the program. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e1222c2794de72f295aa2992ca5eeebd3614183f Author: Ohad Sharabi Date: Sun Jun 6 22:38:23 2021 +0300 habanalabs: report EQ fault during heartbeat In case we have EQ fault we would like to know about it. For this, a status bitmask was added in which EQ_FAULT bit is set by FW in case of EQ fault. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 12d133deb30d55076efaf7d2fdbce0a9a0ce8501 Author: Koby Elbaz Date: Thu Jun 3 13:18:20 2021 +0300 habanalabs: small code refactoring Use datatype defines instead of hard coded values, and rename set_fixed_properties function. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f1a29770b2158c2c5a4c92cfd57600a6d6062973 Author: Oded Gabbay Date: Sun Jun 6 11:38:12 2021 +0300 habanalabs/gaudi: use standard error codes When there is an ECC error in the HBM, return a standard error code, -EIO in this case, and not a positive value. Signed-off-by: Oded Gabbay commit 0f37510ca34848718db1003479bb4671e8f3c112 Author: Ohad Sharabi Date: Thu Jun 3 00:24:32 2021 +0300 habanalabs: fix mask to obtain page offset When converting virtual address to physical we need to add correct offset to the physical page. For this we need to use mask that include ALL bits of page offset. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6a785e368a675008dc7a09938480a07ac1aa8956 Author: Ohad Sharabi Date: Sat May 29 23:26:10 2021 +0300 habanalabs: skip valid test for boot_dev_sts regs Get rid of the need to check if boot_dev_sts is valid on every access to value read from these registers. This is done by storing the register value in hdev props ONLY if register is enabled. This way if register is NOT enabled all capability bits will not be set. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 84586de496103453c0c8dbf5c233f10381644cf5 Author: Ofir Bitton Date: Thu May 20 13:30:31 2021 +0300 habanalabs: reset device upon FD close if not idle If device is not idle after user closes the FD we must reset device as next user that will try to open FD will encounter a non-functional device. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8e8125f192288802267157f613c0ca654dfbde8e Author: Yuri Nudelman Date: Tue May 25 14:49:52 2021 +0300 habanalabs: add debug flag to prevent failure on timeout Sometimes it is useful to allow the command to continue running despite the timeout occurred, to differentiate between really stuck or just very time consuming commands. This can be achieved by passing a new debug flag alongside the cs, HL_CS_FLAGS_SKIP_RESET_ON_TIMEOUT. Anyway, if the timeout occurred, a warning print shall be issued, however this shall not fail the submission. Signed-off-by: Yuri Nudelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 254fac6d1a73aac40aa4d423c993965987728040 Author: Ofir Bitton Date: Wed Jun 2 11:56:31 2021 +0300 habanalabs/gaudi: add FW alive event support In order for driver to be aware of process or thread crashes inside GAUDI's CPU, we introduce a new event which contains all relevant information. Upon event reception, driver will dump information and will reset the device. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a39725819c816c87c6b4eeca4c10197a41e2a928 Author: Ofir Bitton Date: Mon May 24 22:58:44 2021 +0300 habanalabs/gaudi: don't use disabled ports in collective wait In the collective wait, we put jobs on the QMANs of all the NICs. The code takes into account if a port is disabled only in case of PCI card. When this info arrives from the f/w, the code doesn't take it into account, and it tries to schedule jobs on NICs that aren't enabled and thats a bug. To fix this, after the f/w sends us the list of disabled ports, we update the state of the QMANs according to that list. In addition, we need to update the HW_CAP bits so the collective wait operation will not try to use those QMANs. We also need to update the collective master monitor mask. Moreover, we need to add a protection for such future cases and in case the user will try to submit work to those QMANs. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5a967fb3a74113724cf3f5fd9021d43fe2bda32e Author: Oded Gabbay Date: Mon May 31 17:01:43 2021 +0300 habanalabs/gaudi: update to latest f/w specs Update the firmware interface files to their latest version. Signed-off-by: Oded Gabbay commit 5bc691d84966cd763d06c9c70b68c97835793c88 Author: Ofir Bitton Date: Tue May 25 22:09:13 2021 +0300 habanalabs/gaudi: split host irq interfaces towards FW Current implementation uses a single interrupt interface towards FW, this interface is causing races between interrupt types. We split this interface to interface per interrupt type. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 135ade0c6afccbe874bdda811201733e5b57c9bc Author: Oded Gabbay Date: Wed May 26 11:14:21 2021 +0300 habanalabs: prefer ASYNC device probing There is no dependency when probing multiple devices so indicate to the kernel that it can probe our devices in ASYNC fashion. This shortens insmod of the driver from ~2 minutes to 20 seconds on a system with 8 devices. Signed-off-by: Oded Gabbay commit ae151bcfab04f3580382a81b608a72773d19c25d Author: Tomer Tayar Date: Mon May 24 22:35:06 2021 +0300 habanalabs/gaudi: add ARB to QM stop on error masks Update the QM stop on error masks to also stop on ARB errors. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9081021029fd97d09056ed6ab13912339efab571 Author: Oded Gabbay Date: Tue May 25 21:35:13 2021 +0300 habanalabs/gaudi: don't use nic_ports_mask in compute nic_ports_mask is used by the networking part of the driver. In the compute part, we use the HW_CAP bits to select what is active and what is not. Signed-off-by: Oded Gabbay commit b92c637c5f5ef7e3e21dbc7bfa7f1999450f3902 Author: Koby Elbaz Date: Wed May 19 15:16:52 2021 +0300 habanalabs/gaudi: set the correct cpu_id on MME2_QM failure This fix was applied since there was an incorrect reported CPU ID to GIC such that an error in MME2 QMAN aliased to be an arriving from DMA0_QM. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a60d075c81f0730b62b277d9a94842a3737a4a42 Author: Oded Gabbay Date: Sun May 23 19:00:49 2021 +0300 habanalabs/gaudi: refactor reset code After all the latest changes to the reset code, there were some redundancy and errors in the flows. If the Linux FIT is loaded to the ASIC CPU, we need to communicate with it only via GIC. If it is not loaded, we need to either use COMMS protocol (for newer f/w) or MSG_TO_CPU register (for older f/w). In addition, if we halted the device CPU then we need to mark that the driver will do the reset, regardless of the capabilities. Also, to prevent false errors, we need to keep track whether the device CPU was already halted. If so, we shouldn't try to halt it again. Signed-off-by: Oded Gabbay commit 4cb4508c86d700bdf243e013630ba1af93a01892 Author: Ohad Sharabi Date: Thu May 20 09:09:03 2021 +0300 habanalabs: track security status using positive logic Using negative logic (i.e. fw_security_disabled) is confusing. Modify the flag to use positive logic (fw_security_enabled). Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4080308e33bd6ebdb10d0ce62545690cb9be23e4 Author: Koby Elbaz Date: Thu May 20 12:45:58 2021 +0300 habanalabs/gaudi: use COMMS to reset device / halt CPU This is needed because legacy FW 'communication' protocol will soon become obsolete. Because COMMS is a boot protocol, communicating through it is supported only until Linux is loaded to the device CPU, where in that case we will fallback to the former implementation. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3649eaea2754e0d64a5a6726e46093b490c226d7 Author: Koby Elbaz Date: Tue May 18 15:43:47 2021 +0300 habanalabs/gaudi: disable GIC usage if security is enabled Security is set based on PCI ID, and after reading preboot status bits. GIC usage is set in both scenarios since GIC can't be used when security is enabled. Moreover, writing to GIC/SP is enabled only after Linux is fully loaded. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7feffb6815450bbcbed96a870a36a56f20608640 Author: Koby Elbaz Date: Tue May 18 15:05:35 2021 +0300 habanalabs: read preboot status bits in an earlier stage On newer releases, host won't be able to trigger an interrupt directly to the ASIC GIC controller. To be able to decide whether GIC can/not be used, we must read device's preboot status bits in a stage that precedes the possible first use of GIC (when device is in dirty state). Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1242e9f0f45873607f8e6699b4339c81d9f3de73 Author: Oded Gabbay Date: Wed May 19 14:52:14 2021 +0300 habanalabs: check running index in eqe control To harden the event queue mechanism, we add a running index to the control header of the entry. The firmware writes the index in each entry and the driver verifies that the index of the current entry is larger by 1 of the index of the previous entry. In case it isn't, the driver will treat the entry as if it wasn't valid (it won't process it but won't skip it). Signed-off-by: Oded Gabbay commit 7fb2a1f5b7f81dce20587e79aae8fe8a9ac03986 Author: Oded Gabbay Date: Wed May 12 20:46:12 2021 +0300 habanalabs: set memory scrubbing to disabled by default Scrubbing memory after every unmap is very costly in terms of performance. If a user wants it he can enable it but the default should prioritize performance. Signed-off-by: Oded Gabbay commit 1dae12fe1bf7ae98f31223b47253f4dd6b0a2909 Author: Ofir Bitton Date: Wed May 12 09:07:39 2021 +0300 habanalabs/gaudi: do not move HBM bar if iATU done by FW As iATU configuration is done by FW, driver should not try and move HBM bar. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e591a49cb585ca76d4f9aad2e9635ec7e6a4fb23 Author: Koby Elbaz Date: Wed May 12 18:05:46 2021 +0300 habanalabs/gaudi: read GIC sts after FW is loaded Reading of GIC privileged status will be done after F/W is loaded, because privileged GIC capability is only available with the correct ARMCP version, and after it's loaded. Such versions necessarily support COMMS, so GIC alternatives (SP regs) will be read directly from dynamic regs. As well, initiation of DMA QMANs will occur after F/W is loaded since it depends on GIC configuration. In case F/W isn't loaded there's no problem since either way there won't be any GIC IRQ handling. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 190ec49710a9fe0d5e9e36fe1a2fa864c048484f Author: Ohad Sharabi Date: Tue May 11 16:02:41 2021 +0300 habanalabs: check if asic secured with asic type Fix issue in which the input to the function is_asic_secured was device PCI_IDS number instead of the asic_type enumeration. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3e0ca9fab10bc06111e9c13c9c7d29ed3fcab351 Author: Koby Elbaz Date: Tue May 4 20:10:47 2021 +0300 habanalabs/gaudi: send hard reset cause to preboot LKD should provide hard reset cause to preboot prior to loading any FW components (in case needed). Current implementation is based on the new FW 'COMMS' protocol In cased 'COMMS' is disabled - reset cause won't be sent. Currently, only 2 reset causes are shared: HEARTBEAT & TDR. Sending the reset cause will provide the missing watchdog info that the firmware needs to provide to the BMC. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a782422b20f4b3433099b0e1e4d6a9e5f1a87f5f Author: Oded Gabbay Date: Sun May 9 09:49:36 2021 +0300 habanalabs: notify before f/w loading An information print notifying on starting to load the f/w was removed by mistake when moving to the new dynamic f/w loading mechanism. Restore that print as the F/W loading usually takes between 10 to 20 seconds and this print helps the user know the status of the driver load. Signed-off-by: Oded Gabbay commit 8121736bbf3d5cbd3dcae1e8a40c31fff5713427 Author: Koby Elbaz Date: Mon May 3 23:03:15 2021 +0300 habanalabs/gaudi: use scratchpad regs instead of GIC controller Due to new security restrictions, GIC controller can no longer be accessed from user/kernel. To monitor that, a new status bit will be read from preboot caps, indicating whether direct access to GIC is blocked. In case it is blocked, driver will use scratchpad registers instead of using GIC interface on two main scenarios: The first of which LKD triggers interrupts to F/W through GIC, and the second of when LKD configures all engines/QMANs to write to GIC when they want to report an error. From F/W perspective, it will poll on all SPs, and once IRQ number is retrieved, SP register is cleared, and it will perform the write to the GIC to trigger the IRQ handler. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e67a60400ffc75f52705ae8cac937fd8f00e153a Author: Ohad Sharabi Date: Sun May 2 15:45:21 2021 +0300 habanalabs: read f/w's 2-nd sts and err registers Maintain both STS1 and ERR1 registers used for status communication with F/W. Those are not maintained as we currently have less than 31 statuses/error defined and so LKD did not refer to those register. The reason to read them now is to try to support future f/w versions with current driver. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ea7d5e7b102bf0bd41eef1faa6b2337e45791a62 Author: Ohad Sharabi Date: Mon May 3 09:44:22 2021 +0300 habanalabs: avoid using uninitialized pointer When attempting to read FW component's version we should break if input FW component is invalid in order to avoid using uninitialized destination pointer. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6542c3541d0f9405626faff9509aa28671fc3804 Author: Ohad Sharabi Date: Sun May 2 09:56:51 2021 +0300 habanalabs: set dma mask from fw once fw done iatu config When setting "DMA mask from FW" we are reading PSOC_GLOBAL_CONF register which is allowed only once FW has done it's iATU configuration. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c07c54e9de32ea8e89e7c2a112c14f59602a402c Author: Oded Gabbay Date: Sun May 2 12:28:48 2021 +0300 habanalabs: better error print for pin failure Print the user given pointer and error code on failure to get user pages for easier debugging. Signed-off-by: Oded Gabbay commit 3f18b8421fcd1e9370c240245756f6179d6f357c Author: Omer Shpigelman Date: Thu Apr 29 22:29:29 2021 +0300 habanalabs: add missing space after casting Change casting code according to kernel coding style. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7693f5d39ee0134b1398a57c2998a0b67ef56700 Author: Oded Gabbay Date: Thu Apr 29 16:50:05 2021 +0300 habanalabs: ignore device unusable status Some users might want to implement their own policy of when the device is unusable so we need to ignore this status in the driver and continue loading as normal. Signed-off-by: Oded Gabbay commit b31e59bc55435fd2e43817344dfaea85219e39a4 Author: Ohad Sharabi Date: Thu Apr 22 10:01:22 2021 +0300 habanalabs: load linux image to device Implementing dynamic linux image load to the device. This patch also implements the FW communication steps during the boot-fit. This patch also enables the dynamic protocol based on the compatibility flag. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8a43c83fec120185db1308a2641a310d15243a79 Author: Ohad Sharabi Date: Sun Apr 11 10:32:18 2021 +0300 habanalabs: load boot fit to device Implementing dynamic boot fit image load to the device. Note that some necessary adjustment were added to the static loader as well so that both loaders can co-exist. as this is not the final FW load stage the dynamic FW load is still forced to be non functional. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b8e785c559c066e747d3391c126ea19db9d5e736 Author: Oded Gabbay Date: Mon Apr 26 18:32:25 2021 +0300 habanalabs: use dev_dbg upon hint address failure Hint address failure that results in a valid mapping with an address that was allocated by the driver is not a real failure. Therefore, the driver shouldn't notify about this in kernel log. The user is responsible to check the returned address. Signed-off-by: Oded Gabbay commit a5d4f2e92f0d0032a2fce492a483310e4bae1d3f Author: Guy Nisan Date: Wed Apr 7 18:31:29 2021 +0300 habanalabs: modify progress status messages Indicate "progress" instead of "error" when reporting progress status. Change "u-boot stopped by user" to "Cannot boot" message as CPU_BOOT_STATUS_UBOOT_NOT_READY may indicate a fatal error that prevent u-boot from loading firmware. Signed-off-by: Guy Nisan Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 38fbcc6ec9a3812f355c0360f6e37966ceb24a7c Author: Ofir Bitton Date: Tue Apr 20 10:15:25 2021 +0300 habanalabs: give FW a grace time for configuring iATU iATU (internal Address Translation Unit of the PCI controller) configuration is being done by FW right after driver enables the PCI device. Hence, driver must add a minor sleep afterwards in order to make sure FW finishes configuring iATU regions. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 90bd4798a8bbea05a0383c5f430db9105b40391e Author: Oded Gabbay Date: Fri Apr 23 15:57:39 2021 +0300 habanalabs: update to latest f/w headers Update the common and GAUDI firmware header files to the latest version. The latest version use the correct endianness types so this commit also contains minor changes to the code to use the correct conversions when reading/writing to the firmware structures. Signed-off-by: Oded Gabbay commit c592c270fe1f24668ba9c9991d762e850333e63d Author: Ohad Sharabi Date: Wed Apr 21 13:03:21 2021 +0300 habanalabs: expose ASIC specific PCI info to common code LKD has interfaces in which it receives device address. For instance the debugfs_read/write variants receives device address for CFG/SRAM/DRAM for read/write and need to translate to the mapped PCI BAR address. In addition, the dynamic FW load protocol dictates that the address to which the LKD will copy the image for the next FW component will be received as a device address and can be placed either in SRAM or DRAM. We need to distinguish those regions as the access methods to those regions are different (in DRAM we possibly need to set the BAR base). Looking forward this code will be used to remove duplicated code in the debugfs_read/write that search the memory region for the input device address. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 22a795b4af5a7bc66335166054805c1f103c3e4d Author: Ohad Sharabi Date: Thu Apr 8 13:42:00 2021 +0300 habanalabs: dynamic fw load reset protocol First stage of the dynamic FW load protocol is to reset the protocol to avoid residues from former load cycles. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 50f036df476c6e58f597f684345141e406b12099 Author: Ohad Sharabi Date: Sun Apr 11 15:26:28 2021 +0300 habanalabs: use common fw_version read Instead of using multiple ASIC specific copies of functions to read the FW version use single common one that gets ASIC specific arguments. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 08c03a19662fd628e8866d89769d594c1d8c8093 Author: Alon Mizrahi Date: Thu Apr 8 15:30:59 2021 +0300 habanalabs: use mmu cache range invalidation Use mmu cache range invalidation instead of entire cache invalidation because it yields better performance. In GOYA and GAUDI, always use entire cache invalidation because these ASICs don't support range invalidation. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a22f0ec0731ddf6355e6bf93ded189fca2542cdf Author: Ohad Sharabi Date: Sun Apr 11 23:06:46 2021 +0300 habanalabs: refactor init device cpu code Replace multiple arguments to init device CPU function by passing firmware loader managing structure that is initialized per ASIC with the loader parameters. In addition, the FW loader management structure is now part of the habanalabs device, this way the loader parameters will be able to be communicated across various boot stages. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 364690429a603ac4a7e8df3c3b98b51c914c7c3f Author: Ohad Sharabi Date: Thu Apr 8 10:22:17 2021 +0300 habanalabs: request f/w in separate function This refactor is needed due to the dynamic FW load in which requesting the FW file (and getting its attributes) is not immediately followed by copying FW file content. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6e16ab6c326cd149c086ccbab6da9ccff1a528ff Author: Ohad Sharabi Date: Thu Mar 25 10:06:26 2021 +0200 habanalabs: prepare preboot stage to dynamic f/w load Start the skeleton for the dynamic F/W load by marking current preboot code path as legacy. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3b39840083ef809e71206e9717d5bd502317e696 Author: Oded Gabbay Date: Sun Apr 11 08:43:50 2021 +0300 habanalabs: update firmware files to latest Update the firmware files to the latest from the firmware team. Signed-off-by: Oded Gabbay commit 7bd1e23e5f1381c58ed2a68045ac042dd174c55f Author: Moti Haimovski Date: Thu Apr 8 21:18:03 2021 +0300 habanalabs: increase ELBI reset timeout for PLDM On PLDM, in case of NIC hangs, the ELBI reset to take much longer than expected. As a result an increase in the ELBI reset timeout is required. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 45ce213392df07b9e2443666c0910e1617882cf3 Author: Wei Yongjun Date: Wed Jun 2 11:36:43 2021 +0000 ASoC: rk817: Constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210602113643.3037374-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit eb1e9b8f581a48943073c60adc3cd3cf63972580 Author: Flavio Suligoi Date: Fri Jun 18 10:53:24 2021 +0200 ASoC: fsi: fix spelling mistake Fix "thse" --> "these" in struct fsi_stream declaration. Signed-off-by: Flavio Suligoi Link: https://lore.kernel.org/r/20210618085324.1038524-1-f.suligoi@asem.it Signed-off-by: Mark Brown commit b88835a89df7083510478896caafbf7292cea760 Merge: fbba7e69b061b 25aa28691bb96 Author: Marc Zyngier Date: Fri Jun 18 12:36:30 2021 +0100 Merge branch kvm-arm64/mmu/stage2-cmos into kvmarm-master/next Cache maintenance updates from Yanan Wang, moving the CMOs down into the page-table code. This ensures that we only issue them when actually performing a mapping rather than upfront. * kvm-arm64/mmu/stage2-cmos: KVM: arm64: Move guest CMOs to the fault handlers KVM: arm64: Tweak parameters of guest cache maintenance functions KVM: arm64: Introduce mm_ops member for structure stage2_attr_data KVM: arm64: Introduce two cache maintenance callbacks commit 25aa28691bb960a76f0cffd8862144a29487f6ff Author: Yanan Wang Date: Thu Jun 17 18:58:24 2021 +0800 KVM: arm64: Move guest CMOs to the fault handlers We currently uniformly perform CMOs of D-cache and I-cache in function user_mem_abort before calling the fault handlers. If we get concurrent guest faults(e.g. translation faults, permission faults) or some really unnecessary guest faults caused by BBM, CMOs for the first vcpu are necessary while the others later are not. By moving CMOs to the fault handlers, we can easily identify conditions where they are really needed and avoid the unnecessary ones. As it's a time consuming process to perform CMOs especially when flushing a block range, so this solution reduces much load of kvm and improve efficiency of the stage-2 page table code. We can imagine two specific scenarios which will gain much benefit: 1) In a normal VM startup, this solution will improve the efficiency of handling guest page faults incurred by vCPUs, when initially populating stage-2 page tables. 2) After live migration, the heavy workload will be resumed on the destination VM, however all the stage-2 page tables need to be rebuilt at the moment. So this solution will ease the performance drop during resuming stage. Reviewed-by: Fuad Tabba Signed-off-by: Yanan Wang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210617105824.31752-5-wangyanan55@huawei.com commit 378e6a9c78a02b4b609846aa0afccf34d3038977 Author: Yanan Wang Date: Thu Jun 17 18:58:23 2021 +0800 KVM: arm64: Tweak parameters of guest cache maintenance functions Adjust the parameter "kvm_pfn_t pfn" of __clean_dcache_guest_page and __invalidate_icache_guest_page to "void *va", which paves the way for converting these two guest CMO functions into callbacks in structure kvm_pgtable_mm_ops. No functional change. Reviewed-by: Fuad Tabba Signed-off-by: Yanan Wang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210617105824.31752-4-wangyanan55@huawei.com commit a4d5ca5c7cd8fe85056b8cb838fbcb7e5a05f356 Author: Yanan Wang Date: Thu Jun 17 18:58:22 2021 +0800 KVM: arm64: Introduce mm_ops member for structure stage2_attr_data Also add a mm_ops member for structure stage2_attr_data, since we will move I-cache maintenance for guest stage-2 to the permission path and as a result will need mm_ops for some callbacks. Reviewed-by: Fuad Tabba Signed-off-by: Yanan Wang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210617105824.31752-3-wangyanan55@huawei.com commit 6204004de3160900435bdb4b9a2fb8749a9277d2 Author: Yanan Wang Date: Thu Jun 17 18:58:21 2021 +0800 KVM: arm64: Introduce two cache maintenance callbacks To prepare for performing CMOs for guest stage-2 in the fault handlers in pgtable.c, here introduce two cache maintenance callbacks in struct kvm_pgtable_mm_ops. We also adjust the comment alignment for the existing part but make no real content change at all. Reviewed-by: Fuad Tabba Signed-off-by: Yanan Wang [maz: fixed up comments and renamed callbacks] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210617105824.31752-2-wangyanan55@huawei.com commit b61c8bf4694b5115766849378dcb8787ff54e65e Author: Jason Li Date: Tue Jun 15 09:57:48 2021 -0700 tty: serial: Add UART driver for Cortina-Access platform This driver supports Cortina Access UART IP integrated in most all CAXXXX line of SoCs. Earlycom is also supported Signed-off-by: Jason Li Link: https://lore.kernel.org/r/20210615165750.31261-1-alex.nemirovsky@cortina-access.com Signed-off-by: Greg Kroah-Hartman commit 18aaa97eee7ddb770963d84aeaf5e95a8f8af088 Author: Jiri Slaby Date: Fri Jun 18 08:15:16 2021 +0200 MAINTAINERS: add me back as mxser maintainer I was given a few cards from MOXA (thanks a lot). Provided I can now test changes, I cleaned up the driver a bit and can continue maintaining it. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-71-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0dd77d02c3333c14f8892b379fae3f731af23897 Author: Jiri Slaby Date: Fri Jun 18 08:15:15 2021 +0200 mxser: Documentation, fix typos Fix some typos in the mxser's documentation. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-70-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b34440ffada76527dd39a7a6e753ac31ede3ae88 Author: Jiri Slaby Date: Fri Jun 18 08:15:14 2021 +0200 mxser: Documentation, make the docs up-to-date Remove all the obsolete information from the documentation of mxser driver. Either it was about the out-of-tree driver, or it was superseded by udev et al. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-69-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a7f6afcd4ec61136fda54abd3555125a32a9d34e Author: Jiri Slaby Date: Fri Jun 18 08:15:13 2021 +0200 mxser: Documentation, remove traces of callout device Callout devices are ancient history, so remove its traces from mxser's documentation. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-68-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5d1ea1ad288fc9e76acb5ec8af1bc16bb799c14f Author: Jiri Slaby Date: Fri Jun 18 08:15:12 2021 +0200 mxser: introduce mxser_16550A_or_MUST helper This check is used in the code on many places. Either in positive or negative form. So introduce a helper called mxser_16550A_or_MUST for this purpose. And replace all the occurrences. This simplifies many ifs in there. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-67-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 06cc52ef8284fa8c95552e6ad0da93d89774eb7f Author: Jiri Slaby Date: Fri Jun 18 08:15:11 2021 +0200 mxser: rename flags to old_speed in mxser_set_serial_info Local 'flags' are used to store speed in mxser_set_serial_info, not actual flags (by doing & ASYNC_SPD_MASK). So rename 'flags' to 'old_speed' (after what it is). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-66-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 1b3086b6e602f47d73be282d734dbebbce80d39a Author: Jiri Slaby Date: Fri Jun 18 08:15:10 2021 +0200 mxser: use port variable in mxser_set_serial_info mxser_set_serial_info already defined a local 'port' of type struct tty_port. So use it in the code everywhere. This eliminates some text from the code there. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-65-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 202acdaa143a75d54dd9eec905c7faca7071c1a8 Author: Jiri Slaby Date: Fri Jun 18 08:15:09 2021 +0200 mxser: access info->MCR under info->slock info->MCR is protected by info->slock all over the code. Extend the lock in mxser_tiocmget around the info->MCR fetch too. It likely doesn't change anything, but it's always good to be consistent. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-64-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 464fbf6c4fc22f13df641bacd85840cfb826ba40 Author: Jiri Slaby Date: Fri Jun 18 08:15:08 2021 +0200 mxser: fix typos around enhanced mode Fix spelling of "enhanced" in macros and comments around them. While "enchance" comes from the original Moxa's driver, I don't think it was meant to be that. From the context, they obviously mean "enhanced". Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-63-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit aaa28e9f250ca0a63b69b7125a10d49e1c264f85 Author: Jiri Slaby Date: Fri Jun 18 08:15:07 2021 +0200 mxser: decrypt FCR values Currently, some of the values written to FCR are magic constants. But they are composed of well-defined bits. Use these named macros in place of the constants. No changes in objdump -d. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-62-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 265ceff7aeaa1001b4bea810e1b832d138352b3f Author: Jiri Slaby Date: Fri Jun 18 08:15:06 2021 +0200 mxser: remove xmit_cnt < 0 tests mxser_port::xmit_cnt is unsigned, it cannot be negative. Therefore remove all the xmit_cnt < 0 tests. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-61-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 740165f7acbf1e73e6a7bfa2e8642b2e86cdee94 Author: Jiri Slaby Date: Fri Jun 18 08:15:05 2021 +0200 mxser: introduce and use start/stop_tx helpers Starting and stopping TX is performed on many places in the driver. It is repeated outb and info->IER modification. Create few helpers (__mxser_start_tx, mxser_start_tx, __mxser_stop_tx) and use them in the code instead of open coding. This should be a base for an uart driver for this device in the future. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-60-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit be4866671f8302f04e0485573e97d3a5dfe93fca Author: Jiri Slaby Date: Fri Jun 18 08:15:04 2021 +0200 mxser: extract and dedup CTS handling CTS is handled on two locations in mxser. Extract the code into separation function mxser_handle_cts. And call it from the two locations. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-59-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 8aff64e00f1eced4e73ca81c7599c06851da4475 Author: Jiri Slaby Date: Fri Jun 18 08:15:03 2021 +0200 mxser: don't start TX from tty_operations::put_char TX is not supposed to be started from tty_operations::put_char. Line disciplines ought to call tty_operations::put_char several times and then do a single tty_operations::flush_chars to start TX. Fix this in mxser by removing TX startup from mxser_put_char. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-58-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 007bbdc87522d17d711ca6bef0d4fe85f62f8c84 Author: Jiri Slaby Date: Fri Jun 18 08:15:02 2021 +0200 mxser: cleanup mxser_dtr_rts mxser_dtr_rts now does all inb, outb, & or | in a single statement. The code is hard to follow, so make it more readable by doing one-line = one-statement. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-57-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5990843328360dcded98104f75045a92d241c043 Author: Jiri Slaby Date: Fri Jun 18 08:15:01 2021 +0200 mxser: cleanup mxser_rs_break mxser_rs_break now does all inb, outb, & or | in a single statement. The code is hard to follow, so make it more readable by doing one-line = one-statement. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-56-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 987a4cfee5765c9d7242a81d2f90e1429c83201b Author: Jiri Slaby Date: Fri Jun 18 08:15:00 2021 +0200 mxser: remove pointless ioaddr checks struct mxser_port::ioaddr can never be NULL once set in ->probe. Hence the checks for it are pointless. Remove them. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-55-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ad1c92ff6ee948584603ef2e004704cfceb899a4 Author: Jiri Slaby Date: Fri Jun 18 08:14:59 2021 +0200 mxser: alloc only needed # of ports Many boards have only 2 ports. But we always allocate 8 ports (struct mxser_port) in each struct mxser_board. Switch this to an empty/variable sized array ([]) and allocate the needed number of ports using struct_size helper in ->probe. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-54-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f8b6b327aa73dd69577abd4e164447a9cc124315 Author: Jiri Slaby Date: Fri Jun 18 08:14:58 2021 +0200 mxser: alloc struct mxser_board dynamically There is no need to preallocate an array of four struct mxser_board's. In most cases a single board or two will be present in a machine. So allocate struct mxser_board as needed in ->probe. This makes mxser_boards a bit array. There we store which indexes are free (unallocated). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-53-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 13d4aba8a9747c5f88e537cc065a511fe64f92eb Author: Jiri Slaby Date: Fri Jun 18 08:14:57 2021 +0200 mxser: make mxser_board::idx really an index mxser_board::idx is named as index, but actually contain a base. So assign index there. And for base, introduce a local variable. This is needed for the next patch (use index as a bit index). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-52-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 42ad25fc46d3f6b6fe5b4b933dd328677e328ec7 Author: Jiri Slaby Date: Fri Jun 18 08:14:56 2021 +0200 mxser: rework and simplify mxser_open In mxser_open, tty->port is already set thanks to tty_port_register_device in ->probe. So we can simply use container_of to deduce the struct mxser_port's pointer. Thus avoiding divisions and complex computations. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-51-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c3db20c3b71bf14d49e4a6582325e22db4e74a75 Author: Jiri Slaby Date: Fri Jun 18 08:14:55 2021 +0200 mxser: cleanup mxser_process_txrx_fifo Rename process_txrx_fifo to mxser_process_txrx_fifo and: * remove useless parentheses * return from the 'if's true branch and process the rest in normal code flow (shift the code one level left) All this to make the code more readable. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-50-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c24c31ff4a7d392945293fd61e844921b9f26f33 Author: Jiri Slaby Date: Fri Jun 18 08:14:54 2021 +0200 mxser: remove mxser_cardinfo Now that mxser_cards array (of struct mxser_cardinfo) contains only port count and a quirk, we can encode these two directly into pci_device_id::driver_data. And we can remove this struct completely. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-49-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 1e37f7333c89a5364511e3a0eaf28ff617ee42ed Author: Jiri Slaby Date: Fri Jun 18 08:14:53 2021 +0200 mxser: remove info message from probe There is a dev_info in ->probe which prints device's name, bus and slot numbers. All these can be fetched from the lspci output. So remove this useless print. This eliminates the whole mxser_cardinfo::name field. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-48-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7f0e79dc09692357ecd9bb7b9674352b74e0ffad Author: Jiri Slaby Date: Fri Jun 18 08:14:52 2021 +0200 mxser: move request irq to probe and switch to managed Move request_irq from mxser_initbrd to mxser_probe so that we can switch it to managed request. It simplifies the cleanup code. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-47-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit dcb04e21bba349875c97467062a0d5cb06f7524d Author: Jiri Slaby Date: Fri Jun 18 08:14:51 2021 +0200 mxser: pci, switch to managed resources Switch to managed resources for PCI using pcim_enable_device. Regions and device disabling is now taken care of by the core and we need not unwind. Neither in ->probe, nor in ->remove. That simplifies the code. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-46-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d450f0852fccccc4ae7ec4103e146ae1b61a6fef Author: Jiri Slaby Date: Fri Jun 18 08:14:50 2021 +0200 mxser: inline mxser_board_remove into mxser_remove The only user of mxser_board_remove is mxser_remove. Move there those few lines. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-45-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 57faa7d6148c2de56f7558eb0d4c837264553ba5 Author: Jiri Slaby Date: Fri Jun 18 08:14:49 2021 +0200 mxser: move board init into mxser_initbrd What's done in ->probe for board is actually its initialization. So move it to mxser_initbrd where it belongs. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-44-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b441eb0f69d19cddf2018ded38a5f3ea7e392836 Author: Jiri Slaby Date: Fri Jun 18 08:14:48 2021 +0200 mxser: clean up the rest of MUST helpers Clean up the rest of MUST helpers. They all can use the newly added mxser_must_set_EFR. And passing a bool instead of having two functions (_enable+_disable) simplifies the code a lot too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-43-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b286484b3bb1d01dfd6095f01c8ad04b78f1a625 Author: Jiri Slaby Date: Fri Jun 18 08:14:47 2021 +0200 mxser: introduce mxser_must_select_bank and use it Again, selecting a bank in the EFR register is duplicated many times. Extract it to a separate function (mxser_must_select_bank) and use it on all the places. This cleans up most of the helpers. And mxser_get_must_hardware_id now returns the HW ID directly, not via a by-reference parameter. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-42-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit edb7d27cd10382b6fdb3af50873a04f108c4ee64 Author: Jiri Slaby Date: Fri Jun 18 08:14:46 2021 +0200 mxser: dedup mxser_must_set_enhance_mode There are multiple copies of setting the EFR register. Separate it to a new universal function called __mxser_must_set_EFR. And use it in the code by introducing mxser_must_set_enhance_mode instead of mxser_disable_must_enchance_mode and mxser_enable_must_enchance_mode. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-41-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 238d117d17516f92f5db958809ddec30731e9342 Author: Jiri Slaby Date: Fri Jun 18 08:14:45 2021 +0200 mxser: simplify mxser_ioctl_op_mode * ModeMask local array is just inverted OP_MODE_MASK shifted by shiftbit. Drop this array and use the value directly. * return from the if's true branch and drop 'else' branch by moving the code completely outside the if. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-40-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9fae5f857e124e843c7a41a04a49b3f9256a2d77 Author: Jiri Slaby Date: Fri Jun 18 08:14:44 2021 +0200 mxser: extract mxser_ioctl_op_mode This ioctl code sets RS232, RS422 or RS485 mode. Move the code to a separate function (mxser_ioctl_op_mode) with a note that these mxser-special ioctls should be likely replaced eventually by TIOCGRS485 and TIOCSRS485. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-39-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2c21832b55dd6f2c5be48133997b6614c1e6327b Author: Jiri Slaby Date: Fri Jun 18 08:14:43 2021 +0200 mxser: cleanup mxser_change_speed * use UART macros instead of magic constants * let the default case reuse already existing code (CS5 case) Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-38-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d811b26ba3a78d45ccfc8e562323d9104d321c87 Author: Jiri Slaby Date: Fri Jun 18 08:14:42 2021 +0200 mxser: drop mxser_port::custom_divisor It's an once-set constant, so define a macro for the constant (MXSER_CUSTOM_DIVISOR) and use it in the code instead. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-37-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a6970c39c311f393c2a2b43733e1b4ce2b241f53 Author: Jiri Slaby Date: Fri Jun 18 08:14:41 2021 +0200 mxser: drop mxser_port::baud_base It's an once-set constant, so define a macro for the constant (MXSER_BAUD_BASE) and use it in the code instead. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-36-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 01c3de9a10bb917b50d98f5565fb50dcafd1239a Author: Jiri Slaby Date: Fri Jun 18 08:14:40 2021 +0200 mxser: remove unused mxser_port::stop_rx It's been a long time since mxser_port::stop_rx was abandoned. Remove it. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-35-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit cc673990292c21c4bc02461e362d920fe8a7858b Author: Jiri Slaby Date: Fri Jun 18 08:14:39 2021 +0200 mxser: drop unused mxser_port::normal_termios After the previous patches, mxser_port::normal_termios is unused, so time to wave bye-bye. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-34-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 389fc82e475be8f6c1745f804470bea5e3bf7dc1 Author: Jiri Slaby Date: Fri Jun 18 08:14:38 2021 +0200 mxser: don't allocate MXSER_PORTS + 1 The MXSER_PORTS's tty_device is never registered and neither its tty_port instance exists. Hence, it's quite pointless to allocate it. It used to be used for global information fetches via ioctls. We have just removed these as non-existent tty_device+tty_port was exactly the reason to remove the ioctls. It would be peculiar to add this "virtual" port as we require a backing tty_port since commit ecbbfd44a08f (TTY: move tty buffers to tty_port) in 2012. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-33-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 95b3ea4c6f45f3172dae29f303579743c2aa303d Author: Jiri Slaby Date: Fri Jun 18 08:14:37 2021 +0200 mxser: remove cnt from mxser_receive_chars After the previous ioctls removal, cnt is needed only in mxser_receive_chars_old now. So remove it from mxser_receive_chars and mxser_receive_chars_new and account only in mxser_receive_chars_old. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-32-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 47f82769181fdb755bc86aff881775357383ff68 Author: Jiri Slaby Date: Fri Jun 18 08:14:36 2021 +0200 mxser: remove MOXA_HighSpeedOn ioctl 1) The semantics are defined exactly nowhere. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. 3) It's not even mentioned in any of the mxser utilities. Provided the above, remove this mxser-special ioctl. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-31-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a7574ca74a6e9021f6a058aa21dab84e552cab22 Author: Jiri Slaby Date: Fri Jun 18 08:14:35 2021 +0200 mxser: remove MOXA_ASPP_OQUEUE ioctl 1) The semantics are defined exactly nowhere. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. 3) It's not even mentioned in any of the mxser utilities. Provided the above, remove this mxser-special ioctl. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-30-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c94deae5b708b21727eae5bc830cb176c05ec2e8 Author: Jiri Slaby Date: Fri Jun 18 08:14:34 2021 +0200 mxser: remove MOXA_GETMSTATUS ioctl 1) MOXA_GETMSTATUS is broken at least since commit ecbbfd44a08f (TTY: move tty buffers to tty_port) in 2012. Even though it's mentioned in the mon_pa moxa utility, obviously noone ever tried that in that timeframe. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. Provided the above, remove this mxser-special ioctl. And remove the whole concept of mxser_ioctl_special as this was the last ioctl in there. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-29-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 476c351db8f0e8a837c144a916b23b3abf5a655b Author: Jiri Slaby Date: Fri Jun 18 08:14:33 2021 +0200 mxser: remove MOXA_GETDATACOUNT ioctl 1) MOXA_GETDATACOUNT is broken at least since commit ecbbfd44a08f (TTY: move tty buffers to tty_port) in 2012. Even though it's mentioned in the mon_p moxa utility, obviously noone ever tried that in that timeframe. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. Provided the above, remove this mxser-special ioctl. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-28-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a1ebc3794e9c737efdaafaeefc054ce473b0751d Author: Jiri Slaby Date: Fri Jun 18 08:14:32 2021 +0200 mxser: remove MOXA_CHKPORTENABLE ioctl 1) MOXA_CHKPORTENABLE is broken at least since commit ecbbfd44a08f (TTY: move tty buffers to tty_port) in 2012. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. 3) It's not even mentioned in any of the mxser utilities. Provided the above, remove this mxser-special ioctl. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-27-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 489435e4abc01682d4da31c9666e2e251e697182 Author: Jiri Slaby Date: Fri Jun 18 08:14:31 2021 +0200 mxser: remove MOXA_ASPP_LSTATUS ioctl 1) The semantics are defined exactly nowhere. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. 3) It's not even mentioned in any of the mxser utilities. Provided the above, remove this mxser-special ioctl. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 644c55d229537d6770615b01f074537776973a5b Author: Jiri Slaby Date: Fri Jun 18 08:14:30 2021 +0200 mxser: remove MOXA_ASPP_MON and friends 1) MOXA_ASPP_MON_EXT is broken at least since commit ecbbfd44a08f (TTY: move tty buffers to tty_port) in 2012. 2) The ioctl definitions were never exposed to userspace, so noone should actually be reliably using them. 3) They're not even mentioned in any of the mxser utilities. So remove all these mxser-special ioctls: MOXA_ASPP_MON, MOXA_ASPP_MON_EXT, and MOXA_SDS_RSTICOUNTER. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-25-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ef3dff8a0af9387b881e278676a460ab9c132d12 Author: Jiri Slaby Date: Fri Jun 18 08:14:29 2021 +0200 mxser: remove MOXA_SET_BAUD_METHOD ioctl 1) The semantics are defined exactly nowhere. 2) The ioctl definition was never exposed to userspace, so noone should actually be reliably using this. 3) It's not even mentioned in any of the mxser utilities. Provided the above, remove this mxser-special ioctl. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-24-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 413d555e1296e667d574404f00b2e582bb733040 Author: Jiri Slaby Date: Fri Jun 18 08:14:28 2021 +0200 mxser: remove MOXA_GET_MAJOR deprecated ioctl MOXA_GET_MAJOR was deprecated in commit 41aee9a121fd (Char: mxser, ioctl cleanup) in 2008. Remove this ioctl finally. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-23-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a7f8f2c9dcb25ae220ce119794fd1eff417f2b03 Author: Jiri Slaby Date: Fri Jun 18 08:14:27 2021 +0200 mxser: drop unused MOXA_DIAGNOSE macro It's unused. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-22-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 70640052324b69de70711c2a3e43bb0a8cff5f7a Author: Jiri Slaby Date: Fri Jun 18 08:14:26 2021 +0200 mxser: drop UART_MCR_AFE and UART_LSR_SPECIAL defines * UART_MCR_AFE is a redefinition of serial_reg.h's one. * UART_LSR_SPECIAL is a redefinition of serial_reg.h's UART_LSR_BRK_ERROR_BITS. So remove both and replace the latter uses by already defined UART_LSR_BRK_ERROR_BITS. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-21-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 02e431444b52728872570a14ade413a2a26be657 Author: Jiri Slaby Date: Fri Jun 18 08:14:25 2021 +0200 mxser: make xmit ring buffer variables unsigned Make the xmit ring buffer pointers and counter (xmit_head, xmit_tail, xmit_cnt) unsigned. Now, the assumptions for the compiler are clear -- they cannot be negative. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-20-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a93963e41ffeff71a735f4fab95d2cbacd9da7a8 Author: Jiri Slaby Date: Fri Jun 18 08:14:24 2021 +0200 mxser: correct types for uart variables In struct mxser_port, all the UART registers and masks, and the xon/xoff character are stored into int. Let's re-type all these as UART registers are 8bit (u8) and xon/xoff character is an unsigned char (cc_t in ktermios). This save some bytes in memory, but more importantly the change makes it what it really is. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-19-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6de6e5c4becb5494d09d44ce4db1c54dc43afbae Author: Jiri Slaby Date: Fri Jun 18 08:14:23 2021 +0200 mxser: remove else from LSR bits checks UART_LSR_SPECIAL is composed of UART_LSR_BI, UART_LSR_PE, UART_LSR_FE, UART_LSR_OE. So status cannot be anything else. Remove the unused else branch. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-18-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0c4194218cf206405c39e9d3380886a627c0602c Author: Jiri Slaby Date: Fri Jun 18 08:14:22 2021 +0200 mxser: extract mxser_receive_chars_old Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e5ce1bcedac6875ce9d1ff4bafdf150a899a5694 Author: Jiri Slaby Date: Fri Jun 18 08:14:21 2021 +0200 mxser: extract mxser_receive_chars_new Extract the new handling of receive chars (using the MUST chip enhancements) into a separate function. This eliminates the need for the intr_old label and makes the code of mxser_receive_chars more compact. In the next step, we will extract the old handling too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9cb5c9c3226ba78e33169721f31b459e6791d6ab Author: Jiri Slaby Date: Fri Jun 18 08:14:20 2021 +0200 mxser: simplify mxser_interrupt and drop mxser_board::vector_mask mxser_board::vector_mask is just a bitfield with bits set for all available ports. We can obtain this value simply by "BIT(brd->info->nports) - 1" directly in the ISR. So remove vector_mask and simplify the code a bit. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9e40ea1f785292356cfb39aafff7d346b46d8b4f Author: Jiri Slaby Date: Fri Jun 18 08:14:19 2021 +0200 mxser: extract port ISR The ISR is terrible mix of letters. Let's extract the proper per-port handling to a separate function called mxser_port_isr. This way, we can actually see what both mxser_interrupt and mxser_port_isr do now. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 15517806037c8633ff44e6cd2099d3de22233b4a Author: Jiri Slaby Date: Fri Jun 18 08:14:18 2021 +0200 mxser: cleanup LSR handling in mxser_receive_chars mxser_interrupt is a bit confusing as it passes a pointer to LSR variable ("status") to mxser_receive_chars. That function can indeed update the LCR variable. Make this clear by not passing a variable by reference, instead, return updated status. And change its type accordingly -- to u8. Note that the next patches will rework ISR so that even the definition of status will be u8 soon too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit cef222cbffccab4ac137b2d4d232103ac9ed8a89 Author: Jiri Slaby Date: Fri Jun 18 08:14:17 2021 +0200 mxser: remove nonsense from ISR request_irq was passed a board. There is no need to check dev_id and/or find the appropriate board in the ISR. Neither check if board is NULL. Remove this nonsense. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 928f946426905dd3ab4e166699baa26358cd8a8b Author: Jiri Slaby Date: Fri Jun 18 08:14:16 2021 +0200 mxser: move max_baud from port to board mxser_port::max_baud is actually a board property, not port's. So move it to mxser_board. While at it, drop the printk informing about max baud rate during probe. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 58a2ddb3aa859c7e5a7beee2c43c80ac2229c1ca Author: Jiri Slaby Date: Fri Jun 18 08:14:15 2021 +0200 mxser: drop constant board::uart_type board::uart_type is always set to PORT_16550A. So, use this constant in the code instead. And drop the mxser_board member. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e45583668e0313c422c650d5da11405624cf547c Author: Jiri Slaby Date: Fri Jun 18 08:14:14 2021 +0200 mxser: introduce enum mxser_must_hwid Provided the MUST HW ID is an enumeration, define one (enum mxser_must_hwid) and use it in the code. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 292955a7c011e2351a7ed6f8d7e418d4f3fdd585 Author: Jiri Slaby Date: Fri Jun 18 08:14:13 2021 +0200 mxser: rename mxser_board::chip_flag to must_hwid It is named IsMoxaMustChipFlag in the original Moxa's driver. Over the time, it was reduced to chip_flag which doesn't make much sense. So dub it again by what it is: must_hwid (mxser_must_get_hwid assigns to it). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 3b6618299a38c8bc21c6f70109c52a2dc8627350 Author: Jiri Slaby Date: Fri Jun 18 08:14:12 2021 +0200 mxser: rename CheckIsMoxaMust to mxser_get_must_hwid CheckIsMoxaMust actually finds out what the card is. So rename it to mxser_must_get_hwid, so that the name conforms to the semantics of the function. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit dc33f644f1cbcf333eb13e213f2e4af82af1dfcd Author: Jiri Slaby Date: Fri Jun 18 08:14:11 2021 +0200 mxser: cleanup Gpci_uart_info struct The Gpci_uart_info structure contains up to tripled information and chose weird types for the members. Deduplicate the members and choose proper types for the data -- everything can be u8 except baud rate. There, we use speed_t, which is used in this context. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4463cc5b8cbeb38cf1bf4b25ac285a9cd10a7f2b Author: Jiri Slaby Date: Fri Jun 18 08:14:10 2021 +0200 mxser: integrate mxser.h into .c As mxser.h serves only mxser.c, integrate the definitions into .c and drop .h. There are some "semi-public" ioctl definitions, but they are mostly go away in the next patches. If something, they would need to live in an uapi header anyway. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit cede216a0539db096e7767e7dd77ac4544415e49 Author: Jiri Slaby Date: Fri Jun 18 08:14:09 2021 +0200 mxser: remove info printout from init There is no reason/desire to print module information upon module load. Drop this printk (and a version define). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 152549026901afb1e8143a4e07df6cb8df42f3bf Author: Jiri Slaby Date: Fri Jun 18 08:14:08 2021 +0200 mxser: renumber mxser_cards After the ISA cards removal in the previous patch, the mxser_cards array has holes in it. So renumber the array while updating PCI device's driver_data. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 291343676e328e1493204faa149746829c488b06 Author: Jiri Slaby Date: Fri Jun 18 08:14:07 2021 +0200 mxser: drop ISA support While mxser PCI cards are still around and produced (Moxa provided me with two recently), ISA cards are obsolete for a long time. I haven't seen anyone using the cards and the ISA code paths are barely tested. Hence, remove ISA support from mxser driver so that we can clean the driver up. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210618061516.662-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6cbb3aa0f9d5d23221df787cf36f74d3866fdb78 Author: Shreyas Krishnakumar Date: Wed Jun 16 13:09:21 2021 +0530 staging: rtl8723bs: rtw_efuse: Fix coding style Remove unnecessary braces around single statement blocks as warned by checkpatch.pl Signed-off-by: Shreyas Krishnakumar Link: https://lore.kernel.org/r/20210616073921.156814-1-shreyaskumar1035@gmail.com Signed-off-by: Greg Kroah-Hartman commit 78adf574c969c14a470b686af8d6bd7e1dcf142b Author: Yang Yingliang Date: Wed Jun 16 16:12:43 2021 +0800 staging: rtl8723bs: hal: use eth_broadcast_addr() to assign broadcast address Using eth_broadcast_addr() to assign broadcast address instead of copying from an array that contains the all-ones broadcast address. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616081243.2511663-4-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3b0a4a1bdb0f6348dba797a0fa1cf161f5639ded Author: Yang Yingliang Date: Wed Jun 16 16:12:42 2021 +0800 staging: rtl8723bs: core: use eth_broadcast_addr() to assign broadcast address Using eth_broadcast_addr() to assign broadcast address instead of copying from an array that contains the all-ones broadcast address. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616081243.2511663-3-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 44c26bec861476f89ac5aee0bb19df128a42543b Author: Yang Yingliang Date: Wed Jun 16 16:12:41 2021 +0800 staging: rtl8723bs: os_dep: use eth_broadcast_addr() to assign broadcast address Using eth_broadcast_addr() to assign broadcast address instead of memset() or copying from an array that contains the all-ones broadcast address. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616081243.2511663-2-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3c07e1eaafdb642fe7f8dd050ce04552c875057e Author: Qiang Ma Date: Wed Jun 16 20:53:32 2021 +0800 staging: r8188eu/core: remove the check for NULL pointer in _rtw_enqueue_cmd() Remove the check for _rtw_enqueue_cmd(), because rtw_enqueue_cmd() already has a check of NULL pointer, so this condition is not possible. Signed-off-by: Qiang Ma Link: https://lore.kernel.org/r/20210616125332.31674-1-maqianga@uniontech.com Signed-off-by: Greg Kroah-Hartman commit a85adbb5858a29cf7e364985583724fa996a8839 Author: Caleb D.S. Brzezinski Date: Wed Jun 16 21:26:03 2021 +0000 staging: ks7010: Wrap macro definitions in parenthesis Wrap the definition of TX_RATE_* constants in parenthesis to prevent incorrect casting during expansion, as recommended by checkpatch.pl. Signed-off-by: Caleb D.S. Brzezinski Link: https://lore.kernel.org/r/20210616212552.117604-1-calebdsb@protonmail.com Signed-off-by: Greg Kroah-Hartman commit 609e9339dc71241512f053adbab6e571c63dffe9 Author: Colin Ian King Date: Thu Jun 17 13:04:11 2021 +0100 staging: rts5208: remove redundant continue statement The continue statement at the end of a for-loop has no effect, remove it. Signed-off-by: Colin Ian King Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210617120411.11612-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 594ea7358b051d4638fb587e0234a8a038f47e3d Author: liuhailong Date: Fri Jun 18 17:50:35 2021 +0800 staging: android: ashmem: add size field in procfs fdinfo add this information to help user to find ashmem problem. ashmem leak scenario: -000|fd = ashmem_create_region -001|mmap and pagefault -002|munmap -003|forget close(fd) <---- which lead to ashmem leak Signed-off-by: liuhailong 收件人: 刘海龙(DuckBuBee) Link: https://lore.kernel.org/r/20210618095035.32410-1-liuhailong@oppo.com Signed-off-by: Greg Kroah-Hartman commit 0485cf8dbe964b6cc485178da6ee8ae7b2d0d15c Author: David Matlack Date: Thu Jun 17 23:19:48 2021 +0000 KVM: x86/mmu: Remove redundant root_hpa checks The root_hpa checks below the top-level check in kvm_mmu_page_fault are theoretically redundant since there is no longer a way for the root_hpa to be reset during a page fault. The details of why are described in commit ddce6208217c ("KVM: x86/mmu: Move root_hpa validity checks to top of page fault handler") __direct_map, kvm_tdp_mmu_map, and get_mmio_spte are all only reachable through kvm_mmu_page_fault, therefore their root_hpa checks are redundant. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20210617231948.2591431-5-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 63c0cac938edfa5d72bfbe8f1eeb9d47b397829c Author: David Matlack Date: Thu Jun 17 23:19:47 2021 +0000 KVM: x86/mmu: Refactor is_tdp_mmu_root into is_tdp_mmu This change simplifies the call sites slightly and also abstracts away the implementation detail of looking at root_hpa as the mechanism for determining if the mmu is the TDP MMU. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20210617231948.2591431-4-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit 0b873fd7fb53ed7343ee7ee166e1373aec02a9cb Author: David Matlack Date: Thu Jun 17 23:19:46 2021 +0000 KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check This check is redundant because the root shadow page will only be a TDP MMU page if is_tdp_mmu_enabled() returns true, and is_tdp_mmu_enabled() never changes for the lifetime of a VM. It's possible that this check was added for performance reasons but it is unlikely that it is useful in practice since to_shadow_page() is cheap. That being said, this patch also caches the return value of is_tdp_mmu_root() in direct_page_fault() since there's no reason to duplicate the call so many times, so performance is not a concern. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20210617231948.2591431-3-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit aa23c0ad14228ccfcd0b6f799dd34b348a5f2b1e Author: David Matlack Date: Thu Jun 17 23:19:45 2021 +0000 KVM: x86/mmu: Remove redundant is_tdp_mmu_root check The check for is_tdp_mmu_root in kvm_tdp_mmu_map is redundant because kvm_tdp_mmu_map's only caller (direct_page_fault) already checks is_tdp_mmu_root. Suggested-by: Sean Christopherson Signed-off-by: David Matlack Message-Id: <20210617231948.2591431-2-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit c62efff28bb5eb60d60415a0dd0c864c64be0671 Author: Paolo Bonzini Date: Fri Jun 18 06:42:10 2021 -0400 KVM: x86: Stub out is_tdp_mmu_root on 32-bit hosts If is_tdp_mmu_root is not inlined, the elimination of TDP MMU calls as dead code might not work out. To avoid this, explicitly declare the stubbed is_tdp_mmu_root on 32-bit hosts. Signed-off-by: Paolo Bonzini commit 8bbed95d2cb6e5de8a342d761a89b0a04faed7be Author: Sean Christopherson Date: Tue Jun 15 09:45:34 2021 -0700 KVM: x86: WARN and reject loading KVM if NX is supported but not enabled WARN if NX is reported as supported but not enabled in EFER. All flavors of the kernel, including non-PAE 32-bit kernels, set EFER.NX=1 if NX is supported, even if NX usage is disable via kernel command line. KVM relies on NX being enabled if it's supported, e.g. KVM will generate illegal NPT entries if nx_huge_pages is enabled and NX is supported but not enabled. Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Message-Id: <20210615164535.2146172-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b26a71a1a5b93531bd93305c9c0c7eae2d5cace1 Author: Sean Christopherson Date: Tue Jun 15 09:45:33 2021 -0700 KVM: SVM: Refuse to load kvm_amd if NX support is not available Refuse to load KVM if NX support is not available. Shadow paging has assumed NX support since commit 9167ab799362 ("KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active"), and NPT has assumed NX support since commit b8e8c8303ff2 ("kvm: mmu: ITLB_MULTIHIT mitigation"). While the NX huge pages mitigation should not be enabled by default for AMD CPUs, it can be turned on by userspace at will. Unlike Intel CPUs, AMD does not provide a way for firmware to disable NX support, and Linux always sets EFER.NX=1 if it is supported. Given that it's extremely unlikely that a CPU supports NPT but not NX, making NX a formal requirement is far simpler than adding requirements to the mitigation flow. Fixes: 9167ab799362 ("KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active") Fixes: b8e8c8303ff2 ("kvm: mmu: ITLB_MULTIHIT mitigation") Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Message-Id: <20210615164535.2146172-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 23f079c2494e9b25048db970b1f4dadf19c3c990 Author: Sean Christopherson Date: Tue Jun 15 09:45:32 2021 -0700 KVM: VMX: Refuse to load kvm_intel if EPT and NX are disabled Refuse to load KVM if NX support is not available and EPT is not enabled. Shadow paging has assumed NX support since commit 9167ab799362 ("KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active"), so for all intents and purposes this has been a de facto requirement for over a year. Do not require NX support if EPT is enabled purely because Intel CPUs let firmware disable NX support via MSR_IA32_MISC_ENABLES. If not for that, VMX (and KVM as a whole) could require NX support with minimal risk to breaking userspace. Fixes: 9167ab799362 ("KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active") Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Message-Id: <20210615164535.2146172-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2f064a59a11ff9bc22e52e9678bc601404c7cb34 Author: Peter Zijlstra Date: Fri Jun 11 10:28:17 2021 +0200 sched: Change task_struct::state Change the type and name of task_struct::state. Drop the volatile and shrink it to an 'unsigned int'. Rename it in order to find all uses such that we can use READ_ONCE/WRITE_ONCE as appropriate. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Acked-by: Will Deacon Acked-by: Daniel Thompson Link: https://lore.kernel.org/r/20210611082838.550736351@infradead.org commit 7c3edd6d9cb4d8ea8db5b167dc2eee94d7e4667b Author: Peter Zijlstra Date: Fri Jun 11 10:28:16 2021 +0200 sched,arch: Remove unused TASK_STATE offsets All 6 architectures define TASK_STATE in asm-offsets, but then never actually use it. Remove the definitions to make sure they never will. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210611082838.472811363@infradead.org commit 600642ae9050a872055119ba09d0decc43f6c843 Author: Peter Zijlstra Date: Fri Jun 11 10:28:15 2021 +0200 sched,timer: Use __set_current_state() There's an existing helper for setting TASK_RUNNING; must've gotten lost last time we did this cleanup. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210611082838.409696194@infradead.org commit d6c23bb3a2ad2f8f7dd46292b8bc54d27f2fb3f1 Author: Peter Zijlstra Date: Fri Jun 11 10:28:14 2021 +0200 sched: Add get_current_state() Remove yet another few p->state accesses. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210611082838.347475156@infradead.org commit 3ba9f93b12361e005dd65fcc8072b42e3189f4f4 Author: Peter Zijlstra Date: Fri Jun 11 10:28:13 2021 +0200 sched,perf,kvm: Fix preemption condition When ran from the sched-out path (preempt_notifier or perf_event), p->state is irrelevant to determine preemption. You can get preempted with !task_is_running() just fine. The right indicator for preemption is if the task is still on the runqueue in the sched-out path. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210611082838.285099381@infradead.org commit b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 Author: Peter Zijlstra Date: Fri Jun 11 10:28:12 2021 +0200 sched: Introduce task_is_running() Replace a bunch of 'p->state == TASK_RUNNING' with a new helper: task_is_running(p). Signed-off-by: Peter Zijlstra (Intel) Acked-by: Davidlohr Bueso Acked-by: Geert Uytterhoeven Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210611082838.222401495@infradead.org commit 37aadc687ab441bbcb693ddae613acf9afcea1ab Author: Peter Zijlstra Date: Fri Jun 11 10:28:11 2021 +0200 sched: Unbreak wakeups Remove broken task->state references and let wake_up_process() DTRT. The anti-pattern in these patches breaks the ordering of ->state vs COND as described in the comment near set_current_state() and can lead to missed wakeups: (OoO load, observes RUNNING)<-. for (;;) { | t->state = UNINTERRUPTIBLE; | smp_mb(); ,-----> | (observes !COND) | / if (COND) ---------' | COND = 1; break; `- if (t->state != RUNNING) wake_up_process(t); // not done schedule(); // forever waiting } t->state = TASK_RUNNING; Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Acked-by: Greg Kroah-Hartman Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210611082838.160855222@infradead.org commit b2c0931a07b7376c6291e0cfb347ad27f7b66263 Merge: 94aafc3ee31dc a7b359fc6a37f Author: Ingo Molnar Date: Fri Jun 18 11:31:25 2021 +0200 Merge branch 'sched/urgent' into sched/core, to resolve conflicts This commit in sched/urgent moved the cfs_rq_is_decayed() function: a7b359fc6a37: ("sched/fair: Correctly insert cfs_rq's to list on unthrottle") and this fresh commit in sched/core modified it in the old location: 9e077b52d86a: ("sched/pelt: Check that *_avg are null when *_sum are") Merge the two variants. Conflicts: kernel/sched/fair.c Signed-off-by: Ingo Molnar commit 0c3ae641a27a41e4998663b34c133d6ff3131df7 Author: Martin Botka Date: Mon Jun 14 19:27:10 2021 +0200 drivers: qcom: pinctrl: Add pinctrl driver for sm6125 This patch adds pinctrl driver for sm6125. Signed-off-by: Martin Botka Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210614172713.558192-2-martin.botka@somainline.org Signed-off-by: Linus Walleij commit d3decc70d0793c2e2126bcced9e99877ea27a96d Author: Martin Botka Date: Mon Jun 14 19:27:09 2021 +0200 dt-bindings: pinctrl: qcom: sm6125: Document SM6125 pinctrl driver Document the newly added SM6125 pinctrl driver Signed-off-by: Martin Botka Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210614172713.558192-1-martin.botka@somainline.org Signed-off-by: Linus Walleij commit c06dd49fd59a0abd6fa3d9fc5f6eb1776af4e5e4 Author: Miquel Raynal Date: Thu Jun 10 15:49:06 2021 +0200 mtd: rawnand: omap: Add larger page NAND chips support There is no reason to be limited to 4kiB page NAND chips just because this is the maximum length the ELM is able to handle in one go. Just call the ELM several times and it will process as many data as needed. Here we introduce the concept of ECC page (which is at most 4kiB). The ELM will be sought as many times as there are ECC pages. Signed-off-by: Miquel Raynal Tested-by: Ryan Barnett Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-6-miquel.raynal@bootlin.com commit 496030b1b71e2129ce2cf1411f18ee55ec305ab6 Author: Miquel Raynal Date: Thu Jun 10 15:49:05 2021 +0200 mtd: rawnand: omap: Various style fixes Fix the comments style, declare the variables in a reverse Christmas tree order, add an upper case character at the beginning of a sentence. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-5-miquel.raynal@bootlin.com commit 11a017782852ad6a59d7a449b69478ddc1d30cf0 Author: Miquel Raynal Date: Thu Jun 10 15:49:04 2021 +0200 mtd: rawnand: omap: Check return values Check the return value of many helpers which might return error codes. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-4-miquel.raynal@bootlin.com commit e29973843d9293a57c5c8f14094d0fa74b770ed7 Author: Miquel Raynal Date: Thu Jun 10 15:49:03 2021 +0200 mtd: rawnand: omap: Rename a macro The macro BADBLOCK_MARKER_LENGTH is pretty long and could be reduced to BBM_LEN which is more handy to use in the code. This is a purely cosmetic change and is only done to avoid further change to contain 100+ char lines just because of this definition. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-3-miquel.raynal@bootlin.com commit 47b4c8bd5db1c986c8b4b7189791701fe5c1897e Author: Miquel Raynal Date: Thu Jun 10 15:49:02 2021 +0200 mtd: rawnand: omap: Aggregate the HW configuration of the ELM Instead of calling elm_config() for each possible BCH configuration, just save the BCH configuration that must be applied and use it in a single call at the bottom. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610134906.3503303-2-miquel.raynal@bootlin.com commit 08d8c62164a322eb923034acacf25246b775593a Author: Miquel Raynal Date: Thu Jun 10 10:20:40 2021 +0200 mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller This hardware controller is embedded in XilinX Zynq-7000 SoCs and has partial support for Hamming ECC correction. This work is inspired from the original contributions of Punnaiah Choudary Kalluri and Naga Sureshkumar Relli. Signed-off-by: Miquel Raynal Tested-by: Michael Walle [on zynq-7000] Link: https://lore.kernel.org/linux-mtd/20210610082040.2075611-19-miquel.raynal@bootlin.com commit 2f86102bd5484f145870213e79f6fbcf90f494c0 Author: Miquel Raynal Date: Thu Jun 10 10:20:39 2021 +0200 dt-bindings: mtd: pl353-nand: Describe this hardware controller Add a yaml description of this NAND controller which is described as a subnode of the SMC bus. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20210610082040.2075611-18-miquel.raynal@bootlin.com commit d70c6b026069cb8a26a37770c710345679044978 Author: Miquel Raynal Date: Thu Jun 10 10:20:38 2021 +0200 MAINTAINERS: Add PL353 NAND controller entry Add Naga from Xilinx and myself responsible of this driver. Signed-off-by: Miquel Raynal Acked-by: Naga Sureshkumar Relli Link: https://lore.kernel.org/linux-mtd/20210610082040.2075611-17-miquel.raynal@bootlin.com commit bfb34eced5595ee137e46d83d12b50d4ef6fc0c9 Author: Md Sadre Alam Date: Tue Jun 8 12:18:36 2021 +0530 mtd: rawnand: qcom: avoid writing to obsolete register QPIC_EBI2_ECC_BUF_CFG register got obsolete from QPIC V2.0 onwards. Avoid writing this register if QPIC version is V2.0 or newer. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1623134916-562-1-git-send-email-mdalam@codeaurora.org commit f856c4e9cf22471b956d2b026a71fa2bf7f4d05a Author: Souptick Joarder Date: Tue Jun 8 01:07:36 2021 +0530 mtd: rawnand: marvell: Minor documentation correction Kernel test robot throws below warning -> drivers/mtd/nand/raw/marvell_nand.c:454: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Minor documentation correction. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Cc: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210607193736.4654-1-jrdr.linux@gmail.com commit 21db4f475d56cbfa187ccc24a22e27ba024ec62c Author: Zhen Lei Date: Thu Jun 3 20:33:39 2021 +0800 mtd: rawnand: r852: use DEVICE_ATTR_RO() helper macro Use DEVICE_ATTR_RO() helper macro instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210603123339.12089-1-thunder.leizhen@huawei.com commit f145b9dcf998427f1e3f96f61b6ca9afd629dfda Author: Patrice Chotard Date: Wed Jun 2 11:49:13 2021 +0200 mtd: spinand: add SPI-NAND MTD resume handler After power up, all SPI NAND's blocks are locked. Only read operations are allowed, write and erase operations are forbidden. The SPI NAND framework unlocks all the blocks during its initialization. During a standby low power, the memory is powered down, losing its configuration. During the resume, the QSPI driver state is restored but the SPI NAND framework does not reconfigured the memory. This patch adds SPI-NAND MTD PM handlers for resume ops. SPI NAND resume op re-initializes SPI NAND flash to its probed state. Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210602094913.26472-4-patrice.chotard@foss.st.com commit 41e005c23ee7689ae36b49bde4fec08e89ed121d Author: Patrice Chotard Date: Wed Jun 2 11:49:12 2021 +0200 mtd: spinand: Add spinand_init_flash() helper Add spinand_init_flash() helper which implement all needed init for future SPI-NAND resume ops. Signed-off-by: Patrice Chotard Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210602094913.26472-3-patrice.chotard@foss.st.com commit ff0cd841d2a60ea6b711e35dce767dcf0aa294e5 Author: Patrice Chotard Date: Wed Jun 2 11:49:11 2021 +0200 mtd: spinand: add spinand_read_cfg() helper Put REG_CFG reading code in spinand_read_cfg(). This function will be needed by the future SPI-NAND resume ops. Signed-off-by: Patrice Chotard Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210602094913.26472-2-patrice.chotard@foss.st.com commit ae94c49527aa9bd3b563349adc4b5617747ca6bd Author: Yang Yingliang Date: Tue Jun 1 20:58:14 2021 +0800 mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_resume() Add clk_disable_unprepare() on error path in marvell_nfc_resume(). Fixes: bd9c3f9b3c00 ("mtd: rawnand: marvell: add suspend and resume hooks") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210601125814.3260364-1-yangyingliang@huawei.com commit 76e12c104f627a24487fe1bfa0ed8563e36a5ce2 Author: Miquel Raynal Date: Thu May 27 10:49:59 2021 +0200 mtd: rawnand: arasan: Finer grain NV-DDR configuration Add support for the timings register which may improve a bit the overall throughput. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210527084959.208804-2-miquel.raynal@bootlin.com commit 23739c34f56c7eaa62d00b70dc8bf31b8244ef83 Author: Miquel Raynal Date: Thu May 27 10:49:58 2021 +0200 mtd: rawnand: arasan: Rename the data interface register There are 2 timing registers: - "data interface" - "timings" So far, the "data interface" register was named "timings" which begins misleading when bringing support for the "timings" register. Rename it to "data_iface". Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210527084959.208804-1-miquel.raynal@bootlin.com commit 55e06ae25ea23516026fd0b2b70d5692037b86a8 Author: Miquel Raynal Date: Thu May 27 10:49:13 2021 +0200 mtd: rawnand: onfi: Fix endianness when reading NV-DDR values Without the use of le16_to_cpu(), these accesses would have been wrong on a big-endian machine. Reported-by: kernel test robot Fixes: 45606518f961 ("mtd: rawnand: Add onfi_fill_nvddr_interface_config() helper") Fixes: 9310668fb60a ("mtd: rawnand: Retrieve NV-DDR timing modes from the ONFI parameter page") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210527084913.208635-1-miquel.raynal@bootlin.com commit cf67edce22c5d7edc6cad64dbeb1d5d7d0099837 Author: Miquel Raynal Date: Thu May 27 10:45:48 2021 +0200 mtd: rawnand: arasan: Use the right DMA mask Xilinx ZynqMP SoC and the Arasan controller support 64-bit DMA addressing. Define the right mask otherwise the default is 32 and some accesses may overflow the default mask. Reported-by: Jorge Courett Signed-off-by: Miquel Raynal Tested-by: Jorge Courett Link: https://lore.kernel.org/linux-mtd/20210527084548.208429-1-miquel.raynal@bootlin.com commit 5b24119e9103a767b065fcf37db2b65bbcf0d52f Author: Takashi Sakamoto Date: Fri Jun 18 13:07:13 2021 +0900 ALSA: firewire-motu: fix rx packet format at higher rate for MOTU 828 mk3 Hybrid I assumed that the combination of packet formats for MOTU 828 mk3 Hybrid is the same as MOTU 828 mk3 FireWire. However at higher sampling rate, it is different. MOTU 828 mk3 Hybrid has additional 4 dummy data chunks for rx packet. This commit fixes the issue to which I address at a commit f2ac3b839540 ("ALSA: firewire-motu: sequence replay for source packet header"). Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210618040713.114611-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6b6c17fe6fa58900fa69dd000d5333b679e5e33e Author: Takashi Sakamoto Date: Fri Jun 18 13:04:47 2021 +0900 ALSA: bebob: fix rx packet format for Yamaha GO44/GO46, Terratec Phase 24/x24 Below devices reports zero as the number of channels for external output plug with MIDI type: * Yamaha GO44/GO46 * Terratec Phase 24/X24 As a result, rx packet format is invalid and they generate silent sound. This is a regression added in v5.13. This commit fixes the bug, addressed at a commit 1bd1b3be8655 ("ALSA: bebob: perform sequence replay for media clock recovery"). Cc: Fixes: 5c6ea94f2b7c ("ALSA: bebob: detect the number of available MIDI ports") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210618040447.113306-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c3d2c88209e85045a364e80fe12a6cde16745b72 Author: Jeremy Szu Date: Fri Jun 18 01:14:20 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook x360 830 G8 The HP EliteBook x360 830 G8 using ALC285 codec which using 0x04 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210617171422.16652-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 04d72afa34edd14d99db7536d22819cdbb2b2e4c Author: Greg Kroah-Hartman Date: Fri Jun 18 08:39:24 2021 +0200 Revert "USB: misc: Add onboard_usb_hub driver" This reverts commit b4e326165e21d6a11483f6a4de2174b933413554 as the patch series is causing build issues in linux-next at the moment. Cc: Matthias Kaehlcke Link: https://lore.kernel.org/r/YMuRcrE8xlWnFSWW@google.com Signed-off-by: Greg Kroah-Hartman commit 738d5ad104bbbe5d1bfb6c0553bb4a1eb91cc433 Author: Greg Kroah-Hartman Date: Fri Jun 18 08:38:47 2021 +0200 Revert "of/platform: Add stubs for of_platform_device_create/destroy()" This reverts commit 412981e06294dac3254d83bbf71d4184ea911d05 as the patch series is causing build issues in linux-next at the moment. Cc: Matthias Kaehlcke Link: https://lore.kernel.org/r/YMuRcrE8xlWnFSWW@google.com Signed-off-by: Greg Kroah-Hartman commit 70b8edf9bb6be97e46374c601c687b4f4b0716e1 Author: Greg Kroah-Hartman Date: Fri Jun 18 08:37:19 2021 +0200 Revert "usb: host: xhci-plat: Create platform device for onboard hubs in probe()" This reverts commit c950686b382d0ea5234545fcce252c9e63d7b7a9 as the patch series is causing build issues in linux-next at the moment. Cc: Matthias Kaehlcke Link: https://lore.kernel.org/r/YMuRcrE8xlWnFSWW@google.com Signed-off-by: Greg Kroah-Hartman commit 8e4167f34a3be35af3708ea2f0e5bb3fc71eab75 Author: Greg Kroah-Hartman Date: Fri Jun 18 08:35:58 2021 +0200 Revert "arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub" This reverts commit 1da8116eb0c5dfc05cfb89896239badb18c4daf3. It causes merge issues with linux-next, and there are larger build problems overall with this patch series, so the whole thing is being reverted for now. Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20210617144346.564be887@canb.auug.org.au Cc: Bjorn Andersson Cc: Matthias Kaehlcke Signed-off-by: Greg Kroah-Hartman commit 4fa82a87ba55f5eca7d194055572110652daa264 Author: Hsin-Yi Wang Date: Wed Jun 16 13:33:35 2021 +0800 opp: Allow required-opps to be used for non genpd use cases Don't limit required_opp_table to genpd only. One possible use case is cpufreq based devfreq governor, which can use required-opps property to derive devfreq from cpufreq. Though the OPP core still doesn't support non-genpd required-opps in _set_required_opps(). Suggested-by: Chanwoo Choi Signed-off-by: Hsin-Yi Wang [ Viresh: Update _set_required_opps() to check for genpd ] Signed-off-by: Viresh Kumar commit d472b36efbf8a27dc8a80519db8b5a8caffe42b6 Merge: 43ccc7831fc48 a4b0b97aace09 Author: Dave Airlie Date: Fri Jun 18 12:55:08 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-06-16' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-06-16: amdgpu: - Aldebaran fixes - Expose asic independent throttler status - BACO fixes for navi1x - Smartshift fixes - Misc code cleanups - RAS fixes for Sienna Cichlid - Gamma verificaton fixes - DC LTTPR fixes - DP AUX timeout handling fixes - GFX9, 10 powergating fixes amdkfd: - TLB flush fixes when using SDMA - Locking fixes - SVM fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210617031719.4013-1-alexander.deucher@amd.com commit 0c38740c08962ab109267cb23f4a40df2ccf2bbf Author: Andrii Nakryiko Date: Thu Jun 17 17:28:24 2021 -0700 selftests/bpf: Fix ringbuf test fetching map FD Seems like 4d1b62986125 ("selftests/bpf: Convert few tests to light skeleton.") and 704e2beba23c ("selftests/bpf: Test ringbuf mmap read-only and read-write restrictions") were done independently on bpf and bpf-next trees and are in conflict with each other, despite a clean merge. Fix fetching of ringbuf's map_fd to use light skeleton properly. Fixes: 704e2beba23c ("selftests/bpf: Test ringbuf mmap read-only and read-write restrictions") Fixes: 4d1b62986125 ("selftests/bpf: Convert few tests to light skeleton.") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210618002824.2081922-1-andrii@kernel.org commit f0a029fff4a50eb01648810a77ba1873e829fdd4 Author: Tony Luck Date: Tue Jun 15 10:44:19 2021 -0700 EDAC/Intel: Do not load EDAC driver when running as a guest There's little to no point in loading an EDAC driver running in a guest: 1) The CPU model reported by CPUID may not represent actual h/w 2) The hypervisor likely does not pass in access to memory controller devices 3) Hypervisors generally do not pass corrected error details to guests Add a check in each of the Intel EDAC drivers for X86_FEATURE_HYPERVISOR and simply return -ENODEV in the init routine. Acked-by: Borislav Petkov Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210615174419.GA1087688@agluck-desk2.amr.corp.intel.com commit ad774bd5a8c23a319773ac3668382f24d62a39a8 Author: Qiuxu Zhuo Date: Fri Jun 11 10:01:23 2021 -0700 EDAC/igen6: Add Intel Alder Lake SoC support Alder Lake SoC shares the same memory controller and In-Band ECC (IBECC) IP with Tiger Lake SoC. Like Tiger Lake, it also has two memory controllers each associated one IBECC instance. The minor differences include the MMIO offset of each memory controller and the type of memory error address logged in the IBECC. So add Alder Lake compute die IDs, adjust the MMIO offset for each memory controller and handle the type of memory error address logged in the IBECC for Alder Lake EDAC support. Tested-by: Vrukesh V Panse Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210611170123.1057025-7-tony.luck@intel.com commit 0b7338b27e821a61cfa695077aa352312c0ab2f6 Author: Qiuxu Zhuo Date: Fri Jun 11 10:01:22 2021 -0700 EDAC/igen6: Add Intel Tiger Lake SoC support Tiger Lake SoC shares the same memory controller and In-Band ECC (IBECC) IP with Elkhart Lake SoC. The main differences are that Tiger Lake has two memory controllers each associated with one IBECC and uses Machine Check for the memory error notification. So add Tiger Lake compute die IDs, MCE decoding chain registration, and memory slice decoding for Tiger Lake EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210611170123.1057025-6-tony.luck@intel.com commit 4e591c056819850366d2fcb642f4f40dd4eef93a Author: Qiuxu Zhuo Date: Fri Jun 11 10:01:21 2021 -0700 EDAC/igen6: Add Intel ICL-NNPI SoC support The Ice Lake Neural Network Processor for Deep Learning Inference (ICL-NNPI) SoC shares the same memory controller and In-Band ECC with Elkhart Lake SoC. Add the ICL-NNPI compute die IDs for EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210611170123.1057025-5-tony.luck@intel.com commit c945088384d00e6eb61535cc4ba25bc062090909 Author: Qiuxu Zhuo Date: Fri Jun 11 10:01:20 2021 -0700 EDAC/i10nm: Add support for high bandwidth memory A future Xeon processor will include in-package HBM (high bandwidth memory). The in-package HBM memory controller shares the same architecture with the regular DDR memory controller. Add the HBM memory controller devices for EDAC support. Tested-by: Hongyu Ning Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210611170123.1057025-4-tony.luck@intel.com commit 4bd4d32e9a38d7ffb091b4109ab63c8f601e5678 Author: Qiuxu Zhuo Date: Fri Jun 11 10:01:19 2021 -0700 EDAC/i10nm: Add detection of memory levels for ICX/SPR servers Current i10nm_edac driver is only for system configured in 1-level memory. If the system is configured in 2-level memory, the driver doesn't report the 1st level memory DIMM for the error address, even if the error occurs in the 1st level memory. Both Ice Lake servers and Sapphire Rapids servers can be configured in 2-level memory. Add detection of memory levels to i10nm_edac for the two kinds of servers so that the driver can report the 2nd level memory DIMM or the 1st level memory DIMM according to error source. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210611170123.1057025-3-tony.luck@intel.com commit 2f4348e5a86198704368a699a7c4cdeb21d569f5 Author: Qiuxu Zhuo Date: Fri Jun 11 10:01:18 2021 -0700 EDAC/skx_common: Add new ADXL components for 2-level memory Some Intel servers may configure memory in 2 levels, using fast "near" memory (e.g. DDR) as a cache for larger, slower, "far" memory (e.g. 3D X-point). In these configurations the BIOS ADXL address translation for an address in a 2-level memory range will provide details of both the "near" and far components. Current exported ADXL components are only for 1-level memory system or for 2nd level memory of 2-level memory system. So add new ADXL components for 1st level memory of 2-level memory system to fully support 2-level memory system and the detection of memory error source(1st level memory or 2nd level memory). Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20210611170123.1057025-2-tony.luck@intel.com commit 4ad6181e4b216ed0cb52f45d3c6d2c70c8ae9243 Author: Ben Widawsky Date: Thu Jun 17 17:30:09 2021 -0700 cxl/pci: Rename CXL REGLOC ID The current naming is confusing and wrong. The Register Locator is identified by the DSVSEC identifier, not an offset. Cc: Dan Williams Signed-off-by: Ben Widawsky Link: https://lore.kernel.org/r/20210618003009.956929-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 3e23d17ce1980c7cbd9426a3764eef7d7bcd443f Author: Alison Schofield Date: Thu Jun 17 16:12:16 2021 -0700 cxl/acpi: Use the ACPI CFMWS to create static decoder objects The ACPI CXL Early Discovery Table (CEDT) includes a list of CXL memory resources in CXL Fixed Memory Window Structures (CFMWS). Retrieve each CFMWS in the CEDT and add a cxl_decoder object to the root port (root0) for each memory resource. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Ben Widawsky Link: https://lore.kernel.org/r/d2b73eecfb7ea22e1103f1894b271a89958b4c41.1623968958.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit da6aafec3dca6132dd80a74a4d918ffd86c7ae35 Author: Alison Schofield Date: Thu Jun 17 16:12:15 2021 -0700 cxl/acpi: Add the Host Bridge base address to CXL port objects The base address for the Host Bridge port component registers is located in the CXL Host Bridge Structure (CHBS) of the ACPI CXL Early Discovery Table (CEDT). Retrieve the CHBS for each Host Bridge (ACPI0016 device) and include that base address in the port object. Co-developed-by: Vishal Verma Signed-off-by: Vishal Verma Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Ben Widawsky Link: https://lore.kernel.org/r/a475ce137b899bc7ae5ba9550b5f198cb29ccbfd.1623968958.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 43ccc7831fc4864b99954914537ec3c819997f41 Merge: 1bd8a7dc28c1c ec8747c52434b Author: Dave Airlie Date: Fri Jun 18 10:21:44 2021 +1000 Merge tag 'mediatek-drm-next-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.14 1. Add MT8167 HDMI support 2. Fix PM reference leak 3. Add MT8183 DPI dual edge support Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20210616150301.292-1-chunkuang.hu@kernel.org commit e4d777003a43feab2e000749163e531f6c48c385 Author: Roman Gushchin Date: Thu Jun 17 12:03:22 2021 -0700 percpu: optimize locking in pcpu_balance_workfn() pcpu_balance_workfn() unconditionally calls pcpu_balance_free(), pcpu_reclaim_populated(), pcpu_balance_populated() and pcpu_balance_free() again. Each call to pcpu_balance_free() and pcpu_reclaim_populated() will cause at least one acquisition of the pcpu_lock. So even if the balancing was scheduled because of a failed atomic allocation, pcpu_lock will be acquired at least 4 times. This obviously increases the contention on the pcpu_lock. To optimize the scheme let's grab the pcpu_lock on the upper level (in pcpu_balance_workfn()) and keep it generally locked for the whole duration of the scheduled work, but release conditionally to perform any slow operations like chunk (de)population and creation of new chunks. Signed-off-by: Roman Gushchin Signed-off-by: Dennis Zhou commit cf814bcfa1e661d6d2fe74ed6da3d2aa558c894a Author: Lee Jones Date: Thu Jun 17 08:30:59 2021 +0100 arm64: smp: Bump debugging information print down to KERN_DEBUG This sort of information is only generally useful when debugging. No need to have these sprinkled through the kernel log otherwise. Cc: Will Deacon Cc: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617073059.315542-1-lee.jones@linaro.org Signed-off-by: Will Deacon commit 2db7ab6b4c962e2499c86e8fe9cb1369ebaf91d1 Author: Steven Rostedt (VMware) Date: Thu Jun 17 16:20:41 2021 -0400 tracing: Have ftrace_dump_on_oops kernel parameter take numbers The kernel parameter for ftrace_dump_on_oops can take a single assignment. That is, it can be: ftrace_dump_on_oops or ftrace_dump_on_oops=orig_cpu But the content in the sysctl file is a number. 0 for disabled 1 for ftrace_dump_on_oops (all CPUs) 2 for ftrace_dump_on_oops (orig CPU) Allow the kernel command line to take a number as well to match the sysctl numbers. That is: ftrace_dump_on_oops=1 is the same as ftrace_dump_on_oops and ftrace_dump_on_oops=2 is the same as ftrace_dump_on_oops=orig_cpu Signed-off-by: Steven Rostedt (VMware) commit 80f9733114e8f925b88d8f4e65ee827640ce4253 Author: Shaokun Zhang Date: Mon May 31 11:17:07 2021 +0800 um: Remove the repeated declaration Function 'os_flush_stdout' is declared twice, so remove the repeated declaration. Cc: Jeff Dike Cc: Richard Weinberger Signed-off-by: Shaokun Zhang Signed-off-by: Richard Weinberger commit ccf1236ecac476d9d2704866d9a476c86e387971 Author: Zhen Lei Date: Sat May 8 11:22:39 2021 +0800 um: fix error return code in winch_tramp() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 89df6bfc0405 ("uml: DEBUG_SHIRQ fixes") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-By: anton.ivanov@cambridgegreys.com Signed-off-by: Richard Weinberger commit b77e81fbe5f5fb4ad9a61ec80f6d1e30b6da093a Author: Zhen Lei Date: Sat May 8 11:13:54 2021 +0800 um: fix error return code in slip_open() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: a3c77c67a443 ("[PATCH] uml: slirp and slip driver cleanups and fixes") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-By: anton.ivanov@cambridgegreys.com Signed-off-by: Richard Weinberger commit 558f9b2f94dbd2d5c5c8292aa13e081cc11ea7d9 Author: YiFei Zhu Date: Tue Apr 20 00:56:10 2021 -0500 um: Fix stack pointer alignment GCC assumes that stack is aligned to 16-byte on call sites [1]. Since GCC 8, GCC began using 16-byte aligned SSE instructions to implement assignments to structs on stack. When CC_OPTIMIZE_FOR_PERFORMANCE is enabled, this affects os-Linux/sigio.c, write_sigio_thread: struct pollfds *fds, tmp; tmp = current_poll; Note that struct pollfds is exactly 16 bytes in size. GCC 8+ generates assembly similar to: movdqa (%rdi),%xmm0 movaps %xmm0,-0x50(%rbp) This is an issue, because movaps will #GP if -0x50(%rbp) is not aligned to 16 bytes [2], and how rbp gets assigned to is via glibc clone thread_start, then function prologue, going though execution trace similar to (showing only relevant instructions): sub $0x10,%rsi mov %rcx,0x8(%rsi) mov %rdi,(%rsi) syscall pop %rax pop %rdi callq *%rax push %rbp mov %rsp,%rbp The stack pointer always points to the topmost element on stack, rather then the space right above the topmost. On push, the pointer decrements first before writing to the memory pointed to by it. Therefore, there is no need to have the stack pointer pointer always point to valid memory unless the stack is poped; so the `- sizeof(void *)` in the code is unnecessary. On the other hand, glibc reserves the 16 bytes it needs on stack and pops itself, so by the call instruction the stack pointer is exactly the caller-supplied sp. It then push the 16 bytes of the return address and the saved stack pointer, so the base pointer will be 16-byte aligned if and only if the caller supplied sp is 16-byte aligned. Therefore, the caller must supply a 16-byte aligned pointer, which `stack + UM_KERN_PAGE_SIZE` already satisfies. On a side note, musl is unaffected by this issue because it forces 16 byte alignment via `and $-16,%rsi` in its clone wrapper. Similarly, glibc i386 is also unaffected because it has `andl $0xfffffff0, %ecx`. To reproduce this bug, enable CONFIG_UML_RTC and CC_OPTIMIZE_FOR_PERFORMANCE. uml_rtc will call add_sigio_fd which will then cause write_sigio_thread to either go into segfault loop or panic with "Segfault with no mm". Similarly, signal stacks will be aligned by the host kernel upon signal delivery. `- sizeof(void *)` to sigaltstack is unconventional and extraneous. On a related note, initialization of longjmp buffers do require `- sizeof(void *)`. This is to account for the return address that would have been pushed to the stack at the call site. The reason for uml to respect 16-byte alignment, rather than telling GCC to assume 8-byte alignment like the host kernel since commit d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if supported"), is because uml links against libc. There is no reason to assume libc is also compiled with that flag and assumes 8-byte alignment rather than 16-byte. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 [2] https://c9x.me/x86/html/file_module_x86_id_180.html Signed-off-by: YiFei Zhu Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Johannes Berg Signed-off-by: Richard Weinberger commit 80f849bf541ef9b633a9c08ac208f9c9afd14eb9 Author: Johannes Berg Date: Mon Mar 15 23:38:04 2021 +0100 um: implement flush_cache_vmap/flush_cache_vunmap vmalloc() heavy workloads in UML are extremely slow, due to flushing the entire kernel VM space (flush_tlb_kernel_vm()) on the first segfault. Implement flush_cache_vmap() to avoid that, and while at it also add flush_cache_vunmap() since it's trivial. This speeds up my vmalloc() heavy test of copying files out from /sys/kernel/debug/gcov/ by 30x (from 30s to 1s.) Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit dd3035a21ba7ccaa883d7107d357ad06320d78fc Author: Anton Ivanov Date: Fri Mar 12 15:16:09 2021 +0000 um: add a UML specific futex implementation The generic asm futex implementation emulates atomic access to memory by doing a get_user followed by put_user. These translate to two mapping operations on UML with paging enabled in the meantime. This, in turn may end up changing interrupts, invoking the signal loop, etc. This replaces the generic implementation by a mapping followed by an operation on the mapped segment. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit c0ecca6604b80e438b032578634c6e133c7028f6 Author: Anton Ivanov Date: Fri Mar 12 15:16:08 2021 +0000 um: enable the use of optimized xor routines in UML This patch enables the use of optimized xor routines from the x86 tree as well as the necessary fpu api shims so they can work on UML. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit d8fb32f4790f2a286e58db8548016378ac35fc6f Author: Anton Ivanov Date: Fri Mar 12 15:16:07 2021 +0000 um: Add support for host CPU flags and alignment 1. Reflect host cpu flags into the UML instance so they can be used to select the correct implementations for xor, crypto, etc. 2. Reflect host cache alignment into UML instance. This is important when running 32 bit on a 64 bit host as 32 bit by default aligns to 32 while the actual alignment should be 64. Ditto for some Xeons which align at 128. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 25da503ecce8f523c1c1c678659cb484d3bcd73f Merge: 1eb5f83ee936d 48a74b1147f7d Author: Olof Johansson Date: Thu Jun 17 12:54:28 2021 -0700 Merge tag 'reset-for-v5.14-2' of git://git.pengutronix.de/pza/linux into arm/drivers Reset controller updates for v5.14, part2 This tag contains a few small fixes, allows to build the Berlin reset driver as a module, and adds stubs to the reset controller API to allow compile-testing drivers outside of drivers/reset without enabling the reset framework. * tag 'reset-for-v5.14-2' of git://git.pengutronix.de/pza/linux: reset: Add compile-test stubs reset: berlin: support module build reset: bail if try_module_get() fails reset: mchp: sparx5: fix return value check in mchp_sparx5_map_io() reset: lantiq: use devm_reset_controller_register() reset: hi6220: Use the correct HiSilicon copyright Link: https://lore.kernel.org/r/14d33ac19b2a107e97ce1ab264987b707baa9ba7.camel@pengutronix.de Signed-off-by: Olof Johansson commit 386093c68ba3e8bcfe7f46deba901e0e80713c29 Author: Johannes Berg Date: Mon Mar 8 14:02:37 2021 +0100 um: allow not setting extra rpaths in the linux binary There doesn't seem to be any reason for the rpath being set in the binaries, at on systems that I tested on. On the other hand, setting rpath is actually harming binaries in some cases, e.g. if using nix-based compilation environments where /lib & /lib64 are not part of the actual environment. Add a new Kconfig option (under EXPERT, for less user confusion) that allows disabling the rpath additions. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 102caec1075fe993fb1ef95368ec1c3b2e5d0d77 Author: Jonathan Corbet Date: Mon Jun 14 16:07:24 2021 -0600 docs: Take a little noise out of the build process Sphinx 3.0 works at this point (albeit slowly) so stop scaring people with a loud warning. We also don't need to babble about CJK support in the LaTeX build. Signed-off-by: Jonathan Corbet commit 43c590cb86665be702c0af0231a10ec813df9cfd Author: Johannes Berg Date: Fri Mar 5 13:19:59 2021 +0100 um: virtio/pci: enable suspend/resume The UM virtual PCI devices currently cannot be suspended properly since the virtio driver already disables VQs well before the PCI bus's suspend_noirq wants to complete the transition by writing to PCI config space. After trying around for a long time with moving the devices on the DPM list, trying to create dependencies between them, etc. I gave up and instead added UML specific cross-driver API that lets the virt-pci code enable not suspending/resuming VQs for its devices. This then allows the PCI bus suspend_noirq to still talk to the device, and suspend/resume works properly. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 68f5d3f3b6543266b29e047cfaf9842333019b4c Author: Johannes Berg Date: Fri Mar 5 13:19:58 2021 +0100 um: add PCI over virtio emulation driver To support testing of PCI/PCIe drivers in UML, add a PCI bus support driver. This driver uses virtio, which in UML is really just vhost-user, to talk to devices, and adds the devices to the virtual PCI bus in the system. Since virtio already allows DMA/bus mastering this really isn't all that hard, of course we need the logic_iomem infrastructure that was added by a previous patch. The protocol to talk to the device is has a few fairly simple messages for reading to/writing from config and IO spaces, and messages for the device to send the various interrupts (INT#, MSI/MSI-X and while suspended PME#). Note that currently no offical virtio device ID is assigned for this protocol, as a consequence this patch requires defining it in the Kconfig, with a default that makes the driver refuse to work at all. Finally, in order to add support for MSI/MSI-X interrupts, some small changes are needed in the UML IRQ code, it needs to have more interrupts, changing NR_IRQS from 64 to 128 if this driver is enabled, but not actually use them for anything so that the generic IRQ domain/MSI infrastructure can allocate IRQ numbers. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit a5ab7c8467f1934236e33d5fa1c3c6de831a6648 Author: Johannes Berg Date: Fri Mar 5 13:19:57 2021 +0100 um: irqs: allow invoking time-travel handler multiple times If we happen to get multiple messages while IRQS are already suspended, we still need to handle them, since otherwise the simulation blocks. Remove the "prevent nesting" part, time_travel_add_irq_event() will deal with being called multiple times just fine. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit d6b399a0e02a9063a5812af6cb8b657a4a1ecf68 Author: Johannes Berg Date: Fri Mar 5 13:19:56 2021 +0100 um: time-travel/signals: fix ndelay() in interrupt We should be able to ndelay() from any context, even from an interrupt context! However, this is broken (not functionally, but locking-wise) in time-travel because we'll get into the time-travel code and enable interrupts to handle messages on other time-travel aware subsystems (only virtio for now). Luckily, I've already reworked the time-travel aware signal (interrupt) delivery for suspend/resume to have a time travel handler, which runs directly in the context of the signal and not from the Linux interrupt. In order to fix this time-travel issue then, we need to do a few things: 1) rework the signal handling code to call time-travel handlers (only) if interrupts are disabled but signals aren't blocked, instead of marking it only pending there. This is needed to not deadlock other communication. 2) rework time-travel to not enable interrupts while it's waiting for a message; 3) rework time-travel to not (just) disable interrupts but rather block signals at a lower level while it needs them disabled for communicating with the controller. Finally, since now we can actually spend even virtual time in interrupts-disabled sections, the delay warning when we deliver a time-travel delayed interrupt is no longer valid, things can (and should) now get delayed. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 33c7d0616a0482def19d7f981d4eaa429086c771 Author: Johannes Berg Date: Fri Mar 5 13:19:55 2021 +0100 um: expose time-travel mode to userspace side This will be necessary in the userspace side to fix the signal/interrupt handling in time-travel=ext mode, which is the next patch. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit fbb42e7fe2c4962cb51776fff5462e6264d9716b Author: Johannes Berg Date: Fri Mar 5 13:19:54 2021 +0100 um: export signals_enabled directly Use signals_enabled instead of always jumping through a function call to read it, there's not much point in that. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 2efea7dfaa67eba020e88bcb07a10030de63dfa5 Author: Johannes Berg Date: Fri Mar 5 13:19:53 2021 +0100 um: remove unused smp_sigio_handler() declaration This function doesn't exist, remove its declaration. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit ca2e334232b6cd4ae5af9da2df83c009d042aefb Author: Johannes Berg Date: Fri Mar 5 13:19:52 2021 +0100 lib: add iomem emulation (logic_iomem) Add IO memory emulation that uses callbacks for read/write to the allocated regions. The callbacks can be registered by the users using logic_iomem_alloc(). To use, an architecture must 'select LOGIC_IOMEM' in Kconfig and then include into asm/io.h to get the __raw_read*/__raw_write* functions. Optionally, an architecture may 'select LOGIC_IOMEM_FALLBACK' in which case non-emulated regions will 'fall back' to the various real_* functions that must then be provided. Cc: Arnd Bergmann Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 0bbadafdc49d11a1836e5946f517d18cceaea6c8 Author: Johannes Berg Date: Fri Mar 5 13:19:51 2021 +0100 um: allow disabling NO_IOMEM Adjust the kconfig a little to allow disabling NO_IOMEM in UML. To make an "allyesconfig" with CONFIG_NO_IOMEM=n build, adjust a few Kconfig things elsewhere and add dummy asm/fb.h and asm/vga.h files. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 257e65246259e3a85968bcd5b86e045a94e60db3 Merge: a557f67cd7034 0ffd643875d3f Author: Jonathan Corbet Date: Thu Jun 17 13:25:34 2021 -0600 Merge branch 'mauro' into docs-next Mauro says: > As discussed at: > https://lore.kernel.org/linux-doc/871r9k6rmy.fsf@meer.lwn.net/ > > It is better to avoid using :doc:`foo` to refer to Documentation/foo.rst, as the > automarkup.py extension should handle it automatically, on most cases. > > There are a couple of exceptions to this rule: > > 1. when :doc: tag is used to point to a kernel-doc DOC: markup; > 2. when it is used with a named tag, e. g. :doc:`some name `; > > On this series: > > Patch 1 manually adjust the references inside driver-api/pm/devices.rst, > as there it uses :file:`foo` to refer to some Documentation/ files; > > Patch 2 converts a table at Documentation/dev-tools/kunit/api/index.rst > into a list, carefully avoiding the > > The remaining patches convert the other occurrences via a replace script. > They were manually edited, in order to honour 80-columns where possible. > > This series based on docs-next branch. In order to avoid merge conflicts, > I rebased it internally against yesterday's linux-next, dropping a patch > and a hunk that would have caused conflicts there. > commit 0ffd643875d3f7dac3cd9fbc637a3645c48ba21f Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:44 2021 +0200 docs: x86: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/17c68b5f1d72488431c77c1de9f13683fe9f536c.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit c6c032bf2c5483c668461d5f33d83034c791fd91 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:43 2021 +0200 docs: virt: kvm: s390-pv-boot.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8c0fc6578ff6384580fd0d622f363bbbd4fe91da.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 69fe5540153ff7d7ed4ee36ad4037603eb9c45c9 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:42 2021 +0200 docs: userspace-api: landlock.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/24888a9c5da3c505b2bc274fcd83be348dbaf972.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 81a2d57873d94b030de789ebe9b8009241abc775 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:41 2021 +0200 docs: trace: ftrace.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/cf9b03ff4b7917d9846503f198372bc6b821445b.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e480336c25d3dbdfdc5d18225b6f26804369ddba Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:40 2021 +0200 docs: trace: coresight: coresight.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/c79be625f7c90468e13d5380f0e4e1c1ccfa2fc8.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d3122273bd852f532c0d4632b7ade1b11953873d Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:39 2021 +0200 docs: security: landlock.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9174021ef2c87f395a4cc0895a4b2f7fd97db626.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 9912d0bb9deeaa4b0680a94fbdaa3ae31e891c1b Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:38 2021 +0200 docs: process: submitting-patches.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d172ab629c3e32c8d27ed4b9d2a209933e2a7178.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit bffbae6d19edc72a408cdbe915d482be0c91e047 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:37 2021 +0200 docs: PCI: pci.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/8697cf945390f6b45fefb4c5fe22ed1c8070e32e.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e5424f0aec76abd6567e844fbd9a0eb7d138374b Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:36 2021 +0200 docs: PCI: endpoint: pci-endpoint-cfs.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Acked-by: Bjorn Helgaas Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4b18febe4a4f030dd9d43e5e6a2a0aa28bd5b734.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 8d4a0adc9cab0d2a5643bacfd42cd64d1f09ae09 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:35 2021 +0200 docs: networking: devlink: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4553858bc9a5442eba6d71caff8047e84ece4d9b.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 7f3f7bfbbe02cdfeacf9375c73fd33787554bf8f Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:34 2021 +0200 docs: kernel-hacking: hacking.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9537b74d897fab13552535d79337060a3b241b8c.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 25edd3a1625f76ac2265f3357550a782bd2ac7ff Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:33 2021 +0200 docs: i2c: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Acked-by: Wolfram Sang Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/569722e3f7d73d746c145ea78d2b4fbe5defee90.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4d361d6cc74512308beac8997e4b66d5231e8bfe Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:32 2021 +0200 docs: firmware-guide: acpi: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/7162043c18f1ea96c446b332400e44e8087ba142.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ab8e8da694d4921252c2dd3fecbd2ab64eaf0eb2 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:31 2021 +0200 docs: driver-api: usb: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/2cd2dc3e6bacde587aeb09a3951594cfb0102014.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit bbbaf2264db0f0a29d69e3690df67348d95f1cb3 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:30 2021 +0200 docs: driver-api: surface_aggregator: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Acked-by: Maximilian Luz Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6097027b4de4c9015485cb73b297b98660c4296d.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 85aa9afd7bf1b239480dd73d5535978b99300fe7 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:29 2021 +0200 docs: driver-api: gpio: using-gpio.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Reviewed-by: Linus Walleij Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/506a41353937c455c2e79b5960b0976edc8aa9e9.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 29602b7c1ecc4a4692e903ac85b09d6b79e0e57d Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:28 2021 +0200 docs: driver-api: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/095b04bff6d49b4097382398bb91102eaa3f0fd3.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit fd88d2e598dcd13807ecabfc6e1170d2c0ab830a Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:27 2021 +0200 docs: doc-guide: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d6cbe5183406e3378ed4bd0f84f4bcf85a15009c.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 6dce82b28a93492af7a817b2b3166aaf775e4aba Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:26 2021 +0200 docs: devicetree: bindings: submitting-patches.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0048c23d47b582dd1a1959628fd2b895209ac826.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 654a5bd0eadbef5f7196215b755dcecd965f11c1 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:25 2021 +0200 docs: dev-tools: kunit: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Reviewed-by: David Gow Acked-by: Brendan Higgins Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6fde409079959a95b62b9b2692503608d7ff0dbd.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 3a8b57d27a19a341e8d6222630a2c532ef594c42 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:24 2021 +0200 docs: dev-tools: testing-overview.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6bbecd4170ee08f36f8060b0719a46c64a21aefc.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit a822b2ee266587c3665c471f0de86a3ccbc280b1 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:23 2021 +0200 docs: core-api: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d967d490b6655735b7df292f88859b5a1b07d0d7.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 6aadf740aab962702ef97cdba29877867cbc0e31 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:22 2021 +0200 docs: bpf: bpf_lsm.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/fcee73b9bb55a8d0efd07cf04076c66278a42db4.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4cd4bdf85c79a87a3510b2e729b074d97546ee52 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:21 2021 +0200 docs: block: biodoc.rst: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1d26256b305e02da82a6a990910a5b5fb9a0355e.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 2793e19d63275304da0359409a1f28b689df1ed8 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:20 2021 +0200 docs: admin-guide: sysctl: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/12abd2290c7ebc05c89178d2556bea740bd70fac.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e499f4c297e9136a579b4eaee75a3c6ba7172eac Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:19 2021 +0200 docs: admin-guide: hw-vuln: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4e378517761f3df07165d5ecdac5a0a81577e68f.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 17420f3138b957e571144f337b866f8c7a7c1682 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:18 2021 +0200 docs: admin-guide: pm: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/04616d9fc0b4a0d33486fa0018631a2db2eba860.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 9129faf9040d9005e70c604a163faa9f183b00ee Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:17 2021 +0200 docs: dev-tools: kunit: don't use a table for docs name We'll be replacing :doc:`foo` references to Documentation/foo.rst. Yet, here it happens inside a table. Doing a search-and-replace would break it. Yet, as there's no good reason to use a table there, let's just convert it into a list. Reviewed-by: David Gow Acked-by: Brendan Higgins Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/07d3a8ccafbb6345d6e78fb090290859e84361a1.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 559a66b868d987dca55894218d11d59e5bafafe0 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:27:16 2021 +0200 docs: devices.rst: better reference documentation docs There's no need to use either :file: or :doc: tags for documentation, as automarkup.py automatically converts Documentation/*.rst into a cross-reference. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5d9c9949a104d10b537a2d780bccad69a2dc58f9.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit a557f67cd70344bf28442baac4c9b6c94aecb60b Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:14 2021 +0200 docs: PCI: Replace non-breaking spaces to avoid PDF issues The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Acked-by: Bjorn Helgaas Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8036126a59adb720dbc9233341ad5a08531cf73f.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 729979ebef22b7527ea377bb2814df97ad7d4078 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:13 2021 +0200 docs: networking: device_drivers: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Reviewed-by: Jesse Brandeburg Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9bd9f5c067c4b068a974730a14fe8d68e1be0c9a.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d9d2c82738b7cacefde30b701d2ddc4879f6c39a Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:12 2021 +0200 docs: filesystems: ext4: blockgroup.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+2217 ('∗'): ASTERISK OPERATOR use ASCII asterisk instead of the ASTERISK OPERATOR Signed-off-by: Mauro Carvalho Chehab Acked-by: Theodore Ts'o Link: https://lore.kernel.org/r/c5c3c384c48779ca7c9dcd90183cefe20ac82928.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 1a967a312270356c249466b10bb39890a96e301e Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:11 2021 +0200 docs: vm: zswap.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9a93b72f99f8f3328269076ceff50248ac9c5af5.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 570eb861243c07f2c3923af428ed20cd3f9d0a29 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:10 2021 +0200 docs: usb: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+feff (''): BOM as it is not needed on UTF-8 Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/0a4b0c38a9cd1133402a04a7ff60fefd9682d42e.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit f40c2a25b9c33b08ad2098f64b7d1cbaa3daab9f Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:09 2021 +0200 docs: driver-api: ioctl.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b2186e313f990488ded56d9b8d35a2d1fe479aa1.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 90f40f514f907f0b12873a7337ea638731848ff2 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:08 2021 +0200 docs: trace: coresight: coresight-etm4x-reference.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b6a04e881bc80a3c1d3d23ccbc8208ca3c9053fd.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 349660e944b5bcb82df1dbb2156ced9fc9c05351 Author: Mauro Carvalho Chehab Date: Wed Jun 16 08:55:07 2021 +0200 docs: admin-guide: reporting-issues.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/551a2af0e654226067e5c376d3e2d959cc738f39.1623826294.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ae1b2aaee7e215f985bf10aad8978f524d8dca60 Author: Hao Chen Date: Thu Jun 17 10:33:00 2021 +0800 Documentation: ACPI: fix error script name The correct script name should be 'divergence.sh' instead of 'divergences.sh'. I didn't find divergences.sh in the path of acpica/generate/linux/. Signed-off-by: Hao Chen Link: https://lore.kernel.org/r/20210617023300.30114-1-chenhaoa@uniontech.com Signed-off-by: Jonathan Corbet commit 8fe088bd4fd12f4c8899b51d5bc3daad98767d49 Merge: 200cedf1925a1 587b839de733a Author: David S. Miller Date: Thu Jun 17 12:11:28 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-06-17 This series contains updates to ice driver only. Jake corrects a couple of entries in the PTYPE table to properly reflect the datasheet and removes unneeded NULL checks for some PTP calls. Paul reduces the scope of variables and removes the use of a local variable. Shaokun Zhang removes a duplicate function declaration. Lorenzo Bianconi fixes a compilation warning if PTP_1588_CLOCK is disabled. Colin Ian King changes a for loop to remove an unneeded 'continue'. ==================== Signed-off-by: David S. Miller commit 200cedf1925a13aaa262d3b7118ee5e064fc3cf3 Merge: a31fcbceef37f 37cb4b9ce062d Author: David S. Miller Date: Thu Jun 17 12:08:46 2021 -0700 Merge branch 'hdlc_ppp-cleanups' Guangbin Huang says: ==================== net: hdlc_ppp: clean up some code style issues This patchset clean up some code style issues. --- Change Log: V1 -> V2: 1. remove patch "net: hdlc_ppp: fix the comments style issue" and patch "net: hdlc_ppp: remove redundant spaces" from this patchset. ==================== Signed-off-by: David S. Miller commit 37cb4b9ce062d9a6657bcce639644c2e3d07ccf8 Author: Peng Li Date: Thu Jun 17 22:03:19 2021 +0800 net: hdlc_ppp: add required space Add space required after that ','. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit ee58a3c7c6bbabb0bf3685a8b437b5d4be33890c Author: Peng Li Date: Thu Jun 17 22:03:18 2021 +0800 net: hdlc_ppp: remove unnecessary out of memory message This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 4ec479527b9a637d4115d428f0b59d28f0760723 Author: Peng Li Date: Thu Jun 17 22:03:17 2021 +0800 net: hdlc_ppp: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit cb36c4112c528ffa6b2005bb083559c54d66810e Author: Peng Li Date: Thu Jun 17 22:03:16 2021 +0800 net: hdlc_ppp: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" or "foo*bar" should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 2b57681f94aff059e75a7a5041f0f66ce0627fc4 Author: Peng Li Date: Thu Jun 17 22:03:15 2021 +0800 net: hdlc_ppp: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit f271606f5289c87a3c18cb1cee9ff9ac03c6cb64 Author: Peng Li Date: Thu Jun 17 22:03:14 2021 +0800 net: hdlc_ppp: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit a31fcbceef37f7a502b8dc70e2c2767e68232e74 Merge: b67fda9a8280b 7e33d84db1a8a Author: David S. Miller Date: Thu Jun 17 12:06:53 2021 -0700 Merge branch 'mdio-nodes' Ioana Ciornei says: ==================== net: mdio: setup both fwnode and of_node The first patch in this series fixes a bug introduced by mistake in the previous ACPI MDIO patch set. The next two patches are adding a new helper which takes a device and a fwnode_handle and populates both the of_node and fwnode so that we make sure that a bug like this does not happen anymore. Also, the new helper is used in the MDIO area. ==================== Signed-off-by: David S. Miller commit 7e33d84db1a8a6c3000e9b02c074c17819680755 Author: Ioana Ciornei Date: Thu Jun 17 15:29:05 2021 +0300 net: mdio: use device_set_node() to setup both fwnode and of Use the newly introduced helper to setup both the of_node and the fwnode for a given device. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 43e76d463c09a0272b84775bcc727c1eb8b384b2 Author: Ioana Ciornei Date: Thu Jun 17 15:29:04 2021 +0300 driver core: add a helper to setup both the of_node and fwnode of a device There are many places where both the fwnode_handle and the of_node of a device need to be populated. Add a function which does both so that we have consistency. Suggested-by: Andrew Lunn Signed-off-by: Ioana Ciornei Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 70ef608c224af39c7eee850d763b986954594de6 Author: Ioana Ciornei Date: Thu Jun 17 15:29:03 2021 +0300 net: mdio: setup of_node for the MDIO device By mistake, the of_node of the MDIO device was not setup in the patch linked below. As a consequence, any PHY driver that depends on the of_node in its probe callback was not be able to successfully finish its probe on a PHY, thus the Generic PHY driver was used instead. Fix this by actually setting up the of_node. Fixes: bc1bee3b87ee ("net: mdiobus: Introduce fwnode_mdiobus_register_phy()") Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit b67fda9a8280b14d44712d2ad6413e0074b070b8 Author: Hayes Wang Date: Thu Jun 17 18:00:15 2021 +0800 r8152: store the information of the pipes Store the information of the pipes to avoid calling usb_rcvctrlpipe(), usb_sndctrlpipe(), usb_rcvbulkpipe(), usb_sndbulkpipe(), and usb_rcvintpipe() frequently. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit a52171ae7b803f4587b8172d1768313b4d093d0a Merge: 4de772511fd13 f20792d425d2e Author: David S. Miller Date: Thu Jun 17 11:54:56 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2021-06-17 The following pull-request contains BPF updates for your *net-next* tree. We've added 50 non-merge commits during the last 25 day(s) which contain a total of 148 files changed, 4779 insertions(+), 1248 deletions(-). The main changes are: 1) BPF infrastructure to migrate TCP child sockets from a listener to another in the same reuseport group/map, from Kuniyuki Iwashima. 2) Add a provably sound, faster and more precise algorithm for tnum_mul() as noted in https://arxiv.org/abs/2105.05398, from Harishankar Vishwanathan. 3) Streamline error reporting changes in libbpf as planned out in the 'libbpf: the road to v1.0' effort, from Andrii Nakryiko. 4) Add broadcast support to xdp_redirect_map(), from Hangbin Liu. 5) Extends bpf_map_lookup_and_delete_elem() functionality to 4 more map types, that is, {LRU_,PERCPU_,LRU_PERCPU_,}HASH, from Denis Salopek. 6) Support new LLVM relocations in libbpf to make them more linker friendly, also add a doc to describe the BPF backend relocations, from Yonghong Song. 7) Silence long standing KUBSAN complaints on register-based shifts in interpreter, from Daniel Borkmann and Eric Biggers. 8) Add dummy PT_REGS macros in libbpf to fail BPF program compilation when target arch cannot be determined, from Lorenz Bauer. 9) Extend AF_XDP to support large umems with 1M+ pages, from Magnus Karlsson. 10) Fix two minor libbpf tc BPF API issues, from Kumar Kartikeya Dwivedi. 11) Move libbpf BPF_SEQ_PRINTF/BPF_SNPRINTF macros that can be used by BPF programs to bpf_helpers.h header, from Florent Revest. ==================== Signed-off-by: David S. Miller commit d96b1b8c9f79b6bb234a31c80972a6f422079376 Author: Jing Xiangfeng Date: Thu Jun 17 20:26:14 2021 +0800 drivers/perf: fix the missed ida_simple_remove() in ddr_perf_probe() ddr_perf_probe() misses to call ida_simple_remove() in an error path. Jump to cpuhp_state_err to fix it. Signed-off-by: Jing Xiangfeng Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/20210617122614.166823-1-jingxiangfeng@huawei.com Signed-off-by: Will Deacon commit 4e16f283edc289820e9b2d6f617ed8e514ee8396 Author: Tuan Phan Date: Thu Jun 17 09:08:49 2021 -0700 perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number When multiple dtcs share the same IRQ number, the irq_friend which used to refer to dtc object gets calculated incorrect which leads to invalid pointer. Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver") Signed-off-by: Tuan Phan Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/1623946129-3290-1-git-send-email-tuanphan@os.amperecomputing.com Signed-off-by: Will Deacon commit 4de772511fd13aa5e7b9bf485ce26f87e6de2bb8 Merge: 55d96f72e8ddc 14870b75fe0be Author: David S. Miller Date: Thu Jun 17 11:39:48 2021 -0700 Merge branch 'gianfar-64-bit-stats' Esben Haabendal says: ==================== net: gianfar: 64-bit statistics and rx_missed_errors counter This series replaces the legacy 32-bit statistics to proper 64-bit ditto, and implements rx_missed_errors counter on top of that. The device supports a 16-bit RDRP counter, and a related carry bit and interrupt, which allows implementation of a robust 64-bit counter. ==================== Signed-off-by: David S. Miller commit 14870b75fe0be5c565339f008ba25326f86a7ce8 Author: Esben Haabendal Date: Thu Jun 17 11:49:28 2021 +0200 net: gianfar: Implement rx_missed_errors counter Devices with RMON support has a 16-bit RDRP counter. It provides: "Receive dropped packets counter. Increments for frames received which are streamed to system but are later dropped due to lack of system resources." To handle more than 2^16 dropped packets, a carry bit in CAR1 register is set on overflow, so we enable irq when this is set, extending the counter to 2^64 for handling situations where lots of packets are missed (e.g. during heavy network storms). Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 8da32a1071af4af7723269ad4e84cc6160e2dc41 Author: Esben Haabendal Date: Thu Jun 17 11:49:26 2021 +0200 net: gianfar: Add definitions for CAR1 and CAM1 register bits These are for carry status and interrupt mask bits of statistics registers. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit e2dbbbe52c4a0f7704735b49f864fe8ea06111e5 Author: Esben Haabendal Date: Thu Jun 17 11:49:23 2021 +0200 net: gianfar: Avoid 16 bytes of memset The memset on CAMx is wrong, as it actually unmasks all carry irq's, which we clearly are not interested in. The memset on CARx registers is just pointless, as they are W1C. So let's just stop the memset before CAR1. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit ef09487431a96029b64a7a6fc4ced46662e921e7 Author: Esben Haabendal Date: Thu Jun 17 11:49:20 2021 +0200 net: gianfar: Clear CAR registers The CAR1 and CAR2 registers are W1C style registers, to the memset does not actually clear them. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 2658530d797ff33d110efd1513b7a7ef33ba5a30 Author: Esben Haabendal Date: Thu Jun 17 11:49:17 2021 +0200 net: gianfar: Extend statistics counters to 64-bit No reason to wrap counter values at 2^32. Especially the bytes counters can wrap pretty fast on Gbit networks. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit d59a24fd1bdbeea88c621cae746a5a2531f62a50 Author: Esben Haabendal Date: Thu Jun 17 11:49:15 2021 +0200 net: gianfar: Convert to ndo_get_stats64 interface No reason to produce the legacy net_device_stats struct, only to have it converted to rtnl_link_stats64. And as a bonus, this allows for improving counter size to 64 bit. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 55d96f72e8ddc0a294e0b9c94016edbb699537e1 Author: Yang Yingliang Date: Thu Jun 17 16:02:07 2021 +0800 net: sched: fix error return code in tcf_del_walker() When nla_put_u32() fails, 'ret' could be 0, it should return error code in tcf_del_walker(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit b244163f2c45c12053cb0291c955f892e79ed8a9 Author: Yang Yingliang Date: Thu Jun 17 13:11:19 2021 +0800 net: ipa: Add missing of_node_put() in ipa_firmware_load() This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exiting this function. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Acked-by: Alex Elder Signed-off-by: David S. Miller commit 2d8ea148e553e1dd4e80a87741abdfb229e2b323 Author: Jian Shen Date: Thu Jun 17 11:37:11 2021 +0800 net: fix mistake path for netdev_features_strings Th_strings arrays netdev_features_strings, tunable_strings, and phy_tunable_strings has been moved to file net/ethtool/common.c. So fixes the comment. Signed-off-by: Jian Shen Signed-off-by: David S. Miller commit f1b8325508327a302f1d5cd8a4bf51e2c9c72fa9 Author: Kai Huang Date: Tue Jun 15 12:57:11 2021 +1200 KVM: x86/mmu: Fix TDP MMU page table level TDP MMU iterator's level is identical to page table's actual level. For instance, for the last level page table (whose entry points to one 4K page), iter->level is 1 (PG_LEVEL_4K), and in case of 5 level paging, the iter->level is mmu->shadow_root_level, which is 5. However, struct kvm_mmu_page's level currently is not set correctly when it is allocated in kvm_tdp_mmu_map(). When iterator hits non-present SPTE and needs to allocate a new child page table, currently iter->level, which is the level of the page table where the non-present SPTE belongs to, is used. This results in struct kvm_mmu_page's level always having its parent's level (excpet root table's level, which is initialized explicitly using mmu->shadow_root_level). This is kinda wrong, and not consistent with existing non TDP MMU code. Fortuantely sp->role.level is only used in handle_removed_tdp_mmu_page() and kvm_tdp_mmu_zap_sp(), and they are already aware of this and behave correctly. However to make it consistent with legacy MMU code (and fix the issue that both root page table and its child page table have shadow_root_level), use iter->level - 1 in kvm_tdp_mmu_map(), and change handle_removed_tdp_mmu_page() and kvm_tdp_mmu_zap_sp() accordingly. Reviewed-by: Ben Gardon Signed-off-by: Kai Huang Message-Id: Signed-off-by: Paolo Bonzini commit 857f84743e4b78500afae010d866675642e18e90 Author: Kai Huang Date: Tue Jun 15 12:57:10 2021 +1200 KVM: x86/mmu: Fix pf_fixed count in tdp_mmu_map_handle_target_level() Currently pf_fixed is not increased when prefault is true. This is not correct, since prefault here really means "async page fault completed". In that case, the original page fault from the guest was morphed into as async page fault and pf_fixed was not increased. So when prefault indicates async page fault is completed, pf_fixed should be increased. Additionally, currently pf_fixed is also increased even when page fault is spurious, while legacy MMU increases pf_fixed when page fault returns RET_PF_EMULATE or RET_PF_FIXED. To fix above two issues, change to increase pf_fixed when return value is not RET_PF_SPURIOUS (RET_PF_RETRY has already been ruled out by reaching here). More information: https://lore.kernel.org/kvm/cover.1620200410.git.kai.huang@intel.com/T/#mbb5f8083e58a2cd262231512b9211cbe70fc3bd5 Fixes: bb18842e2111 ("kvm: x86/mmu: Add TDP MMU PF handler") Reviewed-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <2ea8b7f5d4f03c99b32bc56fc982e1e4e3d3fc6b.1623717884.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 57a3e96d6d17ae5ac9861ef34af024a627f1c3bb Author: Kai Huang Date: Tue Jun 15 12:57:09 2021 +1200 KVM: x86/mmu: Fix return value in tdp_mmu_map_handle_target_level() Currently tdp_mmu_map_handle_target_level() returns 0, which is RET_PF_RETRY, when page fault is actually fixed. This makes kvm_tdp_mmu_map() also return RET_PF_RETRY in this case, instead of RET_PF_FIXED. Fix by initializing ret to RET_PF_FIXED. Note that kvm_mmu_page_fault() resumes guest on both RET_PF_RETRY and RET_PF_FIXED, which means in practice returning the two won't make difference, so this fix alone won't be necessary for stable tree. Fixes: bb18842e2111 ("kvm: x86/mmu: Add TDP MMU PF handler") Reviewed-by: Sean Christopherson Reviewed-by: Ben Gardon Signed-off-by: Kai Huang Message-Id: Signed-off-by: Paolo Bonzini commit 2735886c9ef115fc7b40d27bfe73605c38e9d56b Author: Wanpeng Li Date: Wed Jun 9 00:16:40 2021 -0700 KVM: LAPIC: Keep stored TMCCT register value 0 after KVM_SET_LAPIC KVM_GET_LAPIC stores the current value of TMCCT and KVM_SET_LAPIC's memcpy stores it in vcpu->arch.apic->regs, KVM_SET_LAPIC could store zero in vcpu->arch.apic->regs after it uses it, and then the stored value would always be zero. In addition, the TMCCT is always computed on-demand and never directly readable. Suggested-by: Paolo Bonzini Signed-off-by: Wanpeng Li Message-Id: <1623223000-18116-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 0dbb11230437895f7cd6fc55da61cef011e997d8 Author: Ashish Kalra Date: Tue Jun 8 18:05:43 2021 +0000 KVM: X86: Introduce KVM_HC_MAP_GPA_RANGE hypercall This hypercall is used by the SEV guest to notify a change in the page encryption status to the hypervisor. The hypercall should be invoked only when the encryption attribute is changed from encrypted -> decrypted and vice versa. By default all guest pages are considered encrypted. The hypercall exits to userspace to manage the guest shared regions and integrate with the userspace VMM's migration code. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Steve Rutherford Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Co-developed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini Message-Id: <90778988e1ee01926ff9cac447aacb745f954c8c.1623174621.git.ashish.kalra@amd.com> Signed-off-by: Paolo Bonzini commit e3cb6fa0e2bf4ffc6225a55851f0cf2b93b50f91 Author: Paolo Bonzini Date: Thu Jun 10 12:30:32 2021 -0400 KVM: switch per-VM stats to u64 Make them the same type as vCPU stats. There is no reason to limit the counters to unsigned long. Signed-off-by: Paolo Bonzini commit 01f1b6ed2b846ae124bb54c636ddadb4dd1813a3 Author: Oleksandr Mazur Date: Wed Jun 16 20:46:07 2021 +0300 documentation: networking: devlink: fix prestera.rst formatting that causes build warnings Fixes: 66826c43e63d ("documentation: networking: devlink: add prestera switched driver Documentation") Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit d356dbe23f607dc1a05eb3af887a6ea21c519cb3 Author: Colin Ian King Date: Tue Jun 15 14:52:53 2021 +0100 net: pcs: xpcs: Fix a less than zero u16 comparison error Currently the check for the u16 variable val being less than zero is always false because val is unsigned. Fix this by using the int variable for the assignment and less than zero check. Addresses-Coverity: ("Unsigned compared against 0") Fixes: f7380bba42fd ("net: pcs: xpcs: add support for NXP SJA1110") Signed-off-by: Colin Ian King Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit f515dcce2d1860c622e982f501d080c7f2fee27e Author: Konrad Dybcio Date: Wed Jun 16 18:15:36 2021 +0200 arm64: dts: qcom: sm8250-edo: Fix up double "pinctrl-1" When bringing the SDC pins back to edo.dtsi I managed to define and overwrite pinctrl-1 instead of defining pinctrl-0 and 1. Fix it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616161536.206044-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit ade74e1433f32e3fb422e3700d5bab34c57f4f47 Author: Sean Christopherson Date: Tue Jun 15 09:29:05 2021 -0700 KVM: x86/mmu: Grab nx_lpage_splits as an unsigned long before division Snapshot kvm->stats.nx_lpage_splits into a local unsigned long to avoid 64-bit division on 32-bit kernels. Casting to an unsigned long is safe because the maximum number of shadow pages, n_max_mmu_pages, is also an unsigned long, i.e. KVM will start recycling shadow pages before the number of splits can exceed a 32-bit value. ERROR: modpost: "__udivdi3" [arch/x86/kvm/kvm.ko] undefined! Fixes: 7ee093d4f3f5 ("KVM: switch per-VM stats to u64") Signed-off-by: Sean Christopherson Message-Id: <20210615162905.2132937-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit bca66dbcd28a41c669921ff7ca066f71e6f3e72e Author: Vitaly Kuznetsov Date: Wed Jun 9 17:09:10 2021 +0200 KVM: x86: Check for pending interrupts when APICv is getting disabled When APICv is active, interrupt injection doesn't raise KVM_REQ_EVENT request (see __apic_accept_irq()) as the required work is done by hardware. In case KVM_REQ_APICV_UPDATE collides with such injection, the interrupt may never get delivered. Currently, the described situation is hardly possible: all kvm_request_apicv_update() calls normally happen upon VM creation when no interrupts are pending. We are, however, going to move unconditional kvm_request_apicv_update() call from kvm_hv_activate_synic() to synic_update_vector() and without this fix 'hyperv_connections' test from kvm-unit-tests gets stuck on IPI delivery attempt right after configuring a SynIC route which triggers APICv disablement. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210609150911.1471882-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit c5ffd408cdc951ba153aea267d96d7cc62c6a97c Author: Sean Christopherson Date: Wed Jun 9 16:42:35 2021 -0700 KVM: nVMX: Drop redundant checks on vmcs12 in EPTP switching emulation Drop the explicit check on EPTP switching being enabled. The EPTP switching check is handled in the generic VMFUNC function check, while the underlying VMFUNC enablement check is done by hardware and redone by generic VMFUNC emulation. The vmcs12 EPT check is handled by KVM at VM-Enter in the form of a consistency check, keep it but add a WARN. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 546e8398bc0c7f75f696a24a997d2befeb632154 Author: Sean Christopherson Date: Wed Jun 9 16:42:34 2021 -0700 KVM: nVMX: WARN if subtly-impossible VMFUNC conditions occur WARN and inject #UD when emulating VMFUNC for L2 if the function is out-of-bounds or if VMFUNC is not enabled in vmcs12. Neither condition should occur in practice, as the CPU is supposed to prioritize the #UD over VM-Exit for out-of-bounds input and KVM is supposed to enable VMFUNC in vmcs02 if and only if it's enabled in vmcs12, but neither of those dependencies is obvious. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c906066288d0da7b8c2b5ac4d0d8e85f10f5d5b8 Author: Sean Christopherson Date: Wed Jun 9 16:42:33 2021 -0700 KVM: x86: Drop pointless @reset_roots from kvm_init_mmu() Remove the @reset_roots param from kvm_init_mmu(), the one user, kvm_mmu_reset_context() has already unloaded the MMU and thus freed and invalidated all roots. This also happens to be why the reset_roots=true paths doesn't leak roots; they're already invalid. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e62f1aa8b9304f4608a6a1517e9041cec555c09d Author: Sean Christopherson Date: Wed Jun 9 16:42:32 2021 -0700 KVM: x86: Defer MMU sync on PCID invalidation Defer the MMU sync on PCID invalidation so that multiple sync requests in a single VM-Exit are batched. This is a very minor optimization as checking for unsync'd children is quite cheap. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 39353ab5790be2802b0de29caeba43015fb90dcf Author: Sean Christopherson Date: Wed Jun 9 16:42:31 2021 -0700 KVM: nVMX: Use fast PGD switch when emulating VMFUNC[EPTP_SWITCH] Use __kvm_mmu_new_pgd() via kvm_init_shadow_ept_mmu() to emulate VMFUNC[EPTP_SWITCH] instead of nuking all MMUs. EPTP_SWITCH is the EPT equivalent of MOV to CR3, i.e. is a perfect fit for the common PGD flow, the only hiccup being that A/D enabling is buried in the EPTP. But, that is easily handled by bouncing through kvm_init_shadow_ept_mmu(). Explicitly request a guest TLB flush if VPID is disabled. Per Intel's SDM, if VPID is disabled, "an EPTP-switching VMFUNC invalidates combined mappings associated with VPID 0000H (for all PCIDs and for all EP4TA values, where EP4TA is the value of bits 51:12 of EPTP)". Note, this technically is a very bizarre bug fix of sorts if L2 is using PAE paging, as avoiding the full MMU reload also avoids incorrectly reloading the PDPTEs, which the SDM explicitly states are not touched: If PAE paging is in use, an EPTP-switching VMFUNC does not load the four page-directory-pointer-table entries (PDPTEs) from the guest-physical address in CR3. The logical processor continues to use the four guest-physical addresses already present in the PDPTEs. The guest-physical address in CR3 is not translated through the new EPT paging structures (until some operation that would load the PDPTEs). In addition to optimizing L2's MMU shenanigans, avoiding the full reload also optimizes L1's MMU as KVM_REQ_MMU_RELOAD wipes out all roots in both root_mmu and guest_mmu. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 28f28d453ffcca4a45c1fd93666d9e77a48cb45b Author: Sean Christopherson Date: Wed Jun 9 16:42:30 2021 -0700 KVM: x86: Use KVM_REQ_TLB_FLUSH_GUEST to handle INVPCID(ALL) emulation Use KVM_REQ_TLB_FLUSH_GUEST instead of KVM_REQ_MMU_RELOAD when emulating INVPCID of all contexts. In the current code, this is a glorified nop as TLB_FLUSH_GUEST becomes kvm_mmu_unload(), same as MMU_RELOAD, when TDP is disabled, which is the only time INVPCID is only intercepted+emulated. In the future, reusing TLB_FLUSH_GUEST will simplify optimizing paths that emulate a guest TLB flush, e.g. by synchronizing as needed instead of completely unloading all MMUs. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 25b62c6274ed466fe2e9f3a681e46d99e6703fd4 Author: Sean Christopherson Date: Wed Jun 9 16:42:29 2021 -0700 KVM: nVMX: Free only guest_mode (L2) roots on INVVPID w/o EPT When emulating INVVPID for L1, free only L2+ roots, using the guest_mode tag in the MMU role to identify L2+ roots. From L1's perspective, its own TLB entries use VPID=0, and INVVPID is not requied to invalidate such entries. Per Intel's SDM, INVVPID _may_ invalidate entries with VPID=0, but it is not required to do so. Cc: Lai Jiangshan Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 50a417962a80525da54fa74105bcf17b479cd4bc Author: Sean Christopherson Date: Wed Jun 9 16:42:28 2021 -0700 KVM: nVMX: Consolidate VM-Enter/VM-Exit TLB flush and MMU sync logic Drop the dedicated nested_vmx_transition_mmu_sync() now that the MMU sync is handled via KVM_REQ_TLB_FLUSH_GUEST, and fold that flush into the all-encompassing nested_vmx_transition_tlb_flush(). Opportunistically add a comment explaning why nested EPT never needs to sync the MMU on VM-Enter. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b5129100398ac3b6364cfa6dbd55abfd36cf7202 Author: Sean Christopherson Date: Wed Jun 9 16:42:27 2021 -0700 KVM: x86: Drop skip MMU sync and TLB flush params from "new PGD" helpers Drop skip_mmu_sync and skip_tlb_flush from __kvm_mmu_new_pgd() now that all call sites unconditionally skip both the sync and flush. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d2e5601907bd294411920a84c0231473557d16b9 Author: Sean Christopherson Date: Wed Jun 9 16:42:26 2021 -0700 KVM: nSVM: Move TLB flushing logic (or lack thereof) to dedicated helper Introduce nested_svm_transition_tlb_flush() and use it force an MMU sync and TLB flush on nSVM VM-Enter and VM-Exit instead of sneaking the logic into the __kvm_mmu_new_pgd() call sites. Add a partial todo list to document issues that need to be addressed before the unconditional sync and flush can be modified to look more like nVMX's logic. In addition to making nSVM's forced flushing more overt (guess who keeps losing track of it), the new helper brings further convergence between nSVM and nVMX, and also sets the stage for dropping the "skip" params from __kvm_mmu_new_pgd(). Cc: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 415b1a0105cd05a428f8b28ac1bf406ca2b4bbd7 Author: Sean Christopherson Date: Wed Jun 9 16:42:25 2021 -0700 KVM: x86: Uncondtionally skip MMU sync/TLB flush in MOV CR3's PGD switch Stop leveraging the MMU sync and TLB flush requested by the fast PGD switch helper now that kvm_set_cr3() manually handles the necessary sync, frees, and TLB flush. This will allow dropping the params from the fast PGD helpers since nested SVM is now the odd blob out. Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 21823fbda552252271c948850f80f15edfdf25b6 Author: Sean Christopherson Date: Wed Jun 9 16:42:24 2021 -0700 KVM: x86: Invalidate all PGDs for the current PCID on MOV CR3 w/ flush Flush and sync all PGDs for the current/target PCID on MOV CR3 with a TLB flush, i.e. without PCID_NOFLUSH set. Paraphrasing Intel's SDM regarding the behavior of MOV to CR3: - If CR4.PCIDE = 0, invalidates all TLB entries associated with PCID 000H and all entries in all paging-structure caches associated with PCID 000H. - If CR4.PCIDE = 1 and NOFLUSH=0, invalidates all TLB entries associated with the PCID specified in bits 11:0, and all entries in all paging-structure caches associated with that PCID. It is not required to invalidate entries in the TLBs and paging-structure caches that are associated with other PCIDs. - If CR4.PCIDE=1 and NOFLUSH=1, is not required to invalidate any TLB entries or entries in paging-structure caches. Extract and reuse the logic for INVPCID(single) which is effectively the same flow and works even if CR4.PCIDE=0, as the current PCID will be '0' in that case, thus honoring the requirement of flushing PCID=0. Continue passing skip_tlb_flush to kvm_mmu_new_pgd() even though it _should_ be redundant; the clean up will be done in a future patch. The overhead of an unnecessary nop sync is minimal (especially compared to the actual sync), and the TLB flush is handled via request. Avoiding the the negligible overhead is not worth the risk of breaking kernels that backport the fix. Fixes: 956bf3531fba ("kvm: x86: Skip shadow page resync on CR3 switch when indicated by guest") Cc: Junaid Shahid Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 272b0a998d084e7667284bdd2d0c675c6a2d11de Author: Sean Christopherson Date: Wed Jun 9 16:42:23 2021 -0700 KVM: nVMX: Don't clobber nested MMU's A/D status on EPTP switch Drop bogus logic that incorrectly clobbers the accessed/dirty enabling status of the nested MMU on an EPTP switch. When nested EPT is enabled, walk_mmu points at L2's _legacy_ page tables, not L1's EPT for L2. This is likely a benign bug, as mmu->ept_ad is never consumed (since the MMU is not a nested EPT MMU), and stuffing mmu_role.base.ad_disabled will never propagate into future shadow pages since the nested MMU isn't used to map anything, just to walk L2's page tables. Note, KVM also does a full MMU reload, i.e. the guest_mmu will be recreated using the new EPTP, and thus any change in A/D enabling will be properly recognized in the relevant MMU. Fixes: 41ab93727467 ("KVM: nVMX: Emulate EPTP switching for the L1 hypervisor") Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0e75225dfa4c5d5d51291f54a3d2d5895bad38da Author: Sean Christopherson Date: Wed Jun 9 16:42:22 2021 -0700 KVM: nVMX: Ensure 64-bit shift when checking VMFUNC bitmap Use BIT_ULL() instead of an open-coded shift to check whether or not a function is enabled in L1's VMFUNC bitmap. This is a benign bug as KVM supports only bit 0, and will fail VM-Enter if any other bits are set, i.e. bits 63:32 are guaranteed to be zero. Note, "function" is bounded by hardware as VMFUNC will #UD before taking a VM-Exit if the function is greater than 63. Before: if ((vmcs12->vm_function_control & (1 << function)) == 0) 0x000000000001a916 <+118>: mov $0x1,%eax 0x000000000001a91b <+123>: shl %cl,%eax 0x000000000001a91d <+125>: cltq 0x000000000001a91f <+127>: and 0x128(%rbx),%rax After: if (!(vmcs12->vm_function_control & BIT_ULL(function & 63))) 0x000000000001a955 <+117>: mov 0x128(%rbx),%rdx 0x000000000001a95c <+124>: bt %rax,%rdx Fixes: 27c42a1bb867 ("KVM: nVMX: Enable VMFUNC for the L1 hypervisor") Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 07ffaf343e34b555c9e7ea39a9c81c439a706f13 Author: Sean Christopherson Date: Wed Jun 9 16:42:21 2021 -0700 KVM: nVMX: Sync all PGDs on nested transition with shadow paging Trigger a full TLB flush on behalf of the guest on nested VM-Enter and VM-Exit when VPID is disabled for L2. kvm_mmu_new_pgd() syncs only the current PGD, which can theoretically leave stale, unsync'd entries in a previous guest PGD, which could be consumed if L2 is allowed to load CR3 with PCID_NOFLUSH=1. Rename KVM_REQ_HV_TLB_FLUSH to KVM_REQ_TLB_FLUSH_GUEST so that it can be utilized for its obvious purpose of emulating a guest TLB flush. Note, there is no change the actual TLB flush executed by KVM, even though the fast PGD switch uses KVM_REQ_TLB_FLUSH_CURRENT. When VPID is disabled for L2, vpid02 is guaranteed to be '0', and thus nested_get_vpid02() will return the VPID that is shared by L1 and L2. Generate the request outside of kvm_mmu_new_pgd(), as getting the common helper to correctly identify which requested is needed is quite painful. E.g. using KVM_REQ_TLB_FLUSH_GUEST when nested EPT is in play is wrong as a TLB flush from the L1 kernel's perspective does not invalidate EPT mappings. And, by using KVM_REQ_TLB_FLUSH_GUEST, nVMX can do future simplification by moving the logic into nested_vmx_transition_tlb_flush(). Fixes: 41fab65e7c44 ("KVM: nVMX: Skip MMU sync on nested VMX transition when possible") Signed-off-by: Sean Christopherson Message-Id: <20210609234235.1244004-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8f7663cea285ef41306fb3ea5b5a48e8e38a681d Author: Vitaly Kuznetsov Date: Wed May 26 15:20:26 2021 +0200 KVM: selftests: evmcs_test: Test that KVM_STATE_NESTED_EVMCS is never lost Do KVM_GET_NESTED_STATE/KVM_SET_NESTED_STATE for a freshly restored VM (before the first KVM_RUN) to check that KVM_STATE_NESTED_EVMCS is not lost. Reviewed-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-12-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 8629b625e0151c0d6b78a938744ffd74da422682 Author: Vitaly Kuznetsov Date: Wed May 26 15:20:25 2021 +0200 KVM: nVMX: Request to sync eVMCS from VMCS12 after migration VMCS12 is used to keep the authoritative state during nested state migration. In case 'need_vmcs12_to_shadow_sync' flag is set, we're in between L2->L1 vmexit and L1 guest run when actual sync to enlightened (or shadow) VMCS happens. Nested state, however, has no flag for 'need_vmcs12_to_shadow_sync' so vmx_set_nested_state()-> set_current_vmptr() always sets it. Enlightened vmptrld path, however, doesn't have the quirk so some VMCS12 changes may not get properly reflected to eVMCS and L1 will see an incorrect state. Note, during L2 execution or when need_vmcs12_to_shadow_sync is not set the change is effectively a nop: in the former case all changes will get reflected during the first L2->L1 vmexit and in the later case VMCS12 and eVMCS are already in sync (thanks to copy_enlightened_to_vmcs12() in vmx_get_nested_state()). Reviewed-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-11-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit dc313385529f1a1fa20b06bb61239a31aca9d40f Author: Vitaly Kuznetsov Date: Wed May 26 15:20:24 2021 +0200 KVM: nVMX: Reset eVMCS clean fields data from prepare_vmcs02() When nested state migration happens during L1's execution, it is incorrect to modify eVMCS as it is L1 who 'owns' it at the moment. At least genuine Hyper-V seems to not be very happy when 'clean fields' data changes underneath it. 'Clean fields' data is used in KVM twice: by copy_enlightened_to_vmcs12() and prepare_vmcs02_rare() so we can reset it from prepare_vmcs02() instead. While at it, update a comment stating why exactly we need to reset 'hv_clean_fields' data from L0. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-10-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b7685cfd5e96456be653b61c405ea65f8de95bd6 Author: Vitaly Kuznetsov Date: Wed May 26 15:20:23 2021 +0200 KVM: nVMX: Force enlightened VMCS sync from nested_vmx_failValid() 'need_vmcs12_to_shadow_sync' is used for both shadow and enlightened VMCS sync when we exit to L1. The comment in nested_vmx_failValid() validly states why shadow vmcs sync can be omitted but this doesn't apply to enlightened VMCS as it 'shadows' all VMCS12 fields. Reviewed-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-9-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d6bf71a18c74de61548ddad44ff95306fe85f829 Author: Vitaly Kuznetsov Date: Wed May 26 15:20:22 2021 +0200 KVM: nVMX: Ignore 'hv_clean_fields' data when eVMCS data is copied in vmx_get_nested_state() 'Clean fields' data from enlightened VMCS is only valid upon vmentry: L1 hypervisor is not obliged to keep it up-to-date while it is mangling L2's state, KVM_GET_NESTED_STATE request may come at a wrong moment when actual eVMCS changes are unsynchronized with 'hv_clean_fields'. As upon migration VMCS12 is used as a source of ultimate truth, we must make sure we pick all the changes to eVMCS and thus 'clean fields' data must be ignored. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-8-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 3b19b81acf300a3d452aa07b21d8db528254cb56 Author: Vitaly Kuznetsov Date: Wed May 26 15:20:21 2021 +0200 KVM: nVMX: Release enlightened VMCS on VMCLEAR Unlike VMREAD/VMWRITE/VMPTRLD, VMCLEAR is a valid instruction when enlightened VMCS is in use. TLFS has the following brief description: "The L1 hypervisor can execute a VMCLEAR instruction to transition an enlightened VMCS from the active to the non-active state". Normally, this change can be ignored as unmapping active eVMCS can be postponed until the next VMLAUNCH instruction but in case nested state is migrated with KVM_GET_NESTED_STATE/KVM_SET_NESTED_STATE, keeping eVMCS mapped may result in its synchronization with VMCS12 and this is incorrect: L1 hypervisor is free to reuse inactive eVMCS memory for something else. Inactive eVMCS after VMCLEAR can just be unmapped. Reviewed-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-7-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 278499686b18e9012ddefbe0ecabc83e6c0264fe Author: Vitaly Kuznetsov Date: Wed May 26 15:20:20 2021 +0200 KVM: nVMX: Introduce 'EVMPTR_MAP_PENDING' post-migration state Unlike regular set_current_vmptr(), nested_vmx_handle_enlightened_vmptrld() can not be called directly from vmx_set_nested_state() as KVM may not have all the information yet (e.g. HV_X64_MSR_VP_ASSIST_PAGE MSR may not be restored yet). Enlightened VMCS is mapped later while getting nested state pages. In the meantime, vmx->nested.hv_evmcs_vmptr remains 'EVMPTR_INVALID' and it's indistinguishable from 'evmcs is not in use' case. This leads to certain issues, in particular, if KVM_GET_NESTED_STATE is called right after KVM_SET_NESTED_STATE, KVM_STATE_NESTED_EVMCS flag in the resulting state will be unset (and such state will later fail to load). Introduce 'EVMPTR_MAP_PENDING' state to detect not-yet-mapped eVMCS after restore. With this, the 'is_guest_mode(vcpu)' hack in vmx_has_valid_vmcs12() is no longer needed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 25641cafabc6dcc0a2d32dbbfd8fc448513b339d Author: Vitaly Kuznetsov Date: Wed May 26 15:20:19 2021 +0200 KVM: nVMX: Make copy_vmcs12_to_enlightened()/copy_enlightened_to_vmcs12() return 'void' copy_vmcs12_to_enlightened()/copy_enlightened_to_vmcs12() don't return any result, make them return 'void'. No functional change intended. Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 02761716801dbc99d977bb281de7c1052405c9f5 Author: Vitaly Kuznetsov Date: Wed May 26 15:20:18 2021 +0200 KVM: nVMX: Release eVMCS when enlightened VMENTRY was disabled In theory, L1 can try to disable enlightened VMENTRY in VP assist page and try to issue VMLAUNCH/VMRESUME. While nested_vmx_handle_enlightened_vmptrld() properly handles this as 'EVMPTRLD_DISABLED', previously mapped eVMCS remains mapped and thus all evmptr_is_valid() checks will still pass and nested_vmx_run() will proceed when it shouldn't. Release eVMCS immediately when we detect that enlightened vmentry was disabled by L1. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 6a789ca5d5038a60f51c374067fd9abab13df596 Author: Vitaly Kuznetsov Date: Wed May 26 15:20:17 2021 +0200 KVM: nVMX: Don't set 'dirty_vmcs12' flag on enlightened VMPTRLD 'dirty_vmcs12' is only checked in prepare_vmcs02_early()/prepare_vmcs02() and both checks look like: 'vmx->nested.dirty_vmcs12 || evmptr_is_valid(vmx->nested.hv_evmcs_vmptr)' so for eVMCS case the flag changes nothing. Drop the assignment to avoid the confusion. No functional change intended. Reported-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 1e9dfbd748f37dfa51fcdc82a7afddde1cf8d0ed Author: Vitaly Kuznetsov Date: Wed May 26 15:20:16 2021 +0200 KVM: nVMX: Use '-1' in 'hv_evmcs_vmptr' to indicate that eVMCS is not in use Instead of checking 'vmx->nested.hv_evmcs' use '-1' in 'vmx->nested.hv_evmcs_vmptr' to indicate 'evmcs is not in use' state. This matches how we check 'vmx->nested.current_vmptr'. Introduce EVMPTR_INVALID and evmptr_is_valid() and use it instead of raw '-1' check as a preparation to adding other 'special' values. No functional change intended. Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210526132026.270394-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 158a48ecf776d0ebc916befcb0dc0862f136a31f Author: Maxim Levitsky Date: Mon Jun 7 12:02:03 2021 +0300 KVM: x86: avoid loading PDPTRs after migration when possible if new KVM_*_SREGS2 ioctls are used, the PDPTRs are a part of the migration state and are correctly restored by those ioctls. Signed-off-by: Maxim Levitsky Message-Id: <20210607090203.133058-9-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 6dba940352038b56db9b591b172fb2ec76a5fd5e Author: Maxim Levitsky Date: Mon Jun 7 12:02:02 2021 +0300 KVM: x86: Introduce KVM_GET_SREGS2 / KVM_SET_SREGS2 This is a new version of KVM_GET_SREGS / KVM_SET_SREGS. It has the following changes: * Has flags for future extensions * Has vcpu's PDPTRs, allowing to save/restore them on migration. * Lacks obsolete interrupt bitmap (done now via KVM_SET_VCPU_EVENTS) New capability, KVM_CAP_SREGS2 is added to signal the userspace of this ioctl. Signed-off-by: Maxim Levitsky Message-Id: <20210607090203.133058-8-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 329675dde93c6f30009dc413197bdf2b971f1e5e Author: Maxim Levitsky Date: Mon Jun 7 12:02:01 2021 +0300 KVM: x86: introduce kvm_register_clear_available Small refactoring that will be used in the next patch. Signed-off-by: Maxim Levitsky Message-Id: <20210607090203.133058-7-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 0f85722341b0e3a67d0f2d2ae943b9193cb3e1b0 Author: Maxim Levitsky Date: Mon Jun 7 12:02:00 2021 +0300 KVM: nVMX: delay loading of PDPTRs to KVM_REQ_GET_NESTED_STATE_PAGES Similar to the rest of guest page accesses after a migration, this access should be delayed to KVM_REQ_GET_NESTED_STATE_PAGES. Signed-off-by: Maxim Levitsky Message-Id: <20210607090203.133058-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit b222b0b88162bdef4eceb12a79d5edbbdb23dbfd Author: Maxim Levitsky Date: Mon Jun 7 12:01:59 2021 +0300 KVM: nSVM: refactor the CR3 reload on migration Document the actual reason why we need to do it on migration and move the call to svm_set_nested_state to be closer to VMX code. To avoid loading the PDPTRs from possibly not up to date memory map, in nested_svm_load_cr3 after the move, move this code to .get_nested_state_pages. Signed-off-by: Maxim Levitsky Message-Id: <20210607090203.133058-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit c7313155bf11906ad75ae0edc4a97bf93d69c275 Author: Sean Christopherson Date: Mon Jun 7 12:01:58 2021 +0300 KVM: x86: Always load PDPTRs on CR3 load for SVM w/o NPT and a PAE guest Kill off pdptrs_changed() and instead go through the full kvm_set_cr3() for PAE guest, even if the new CR3 is the same as the current CR3. For VMX, and SVM with NPT enabled, the PDPTRs are unconditionally marked as unavailable after VM-Exit, i.e. the optimization is dead code except for SVM without NPT. In the unlikely scenario that anyone cares about SVM without NPT _and_ a PAE guest, they've got bigger problems if their guest is loading the same CR3 so frequently that the performance of kvm_set_cr3() is notable, especially since KVM's fast PGD switching means reloading the same CR3 does not require a full rebuild. Given that PAE and PCID are mutually exclusive, i.e. a sync and flush are guaranteed in any case, the actual benefits of the pdptrs_changed() optimization are marginal at best. Signed-off-by: Sean Christopherson Message-Id: <20210607090203.133058-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit a36dbec67e26febc1fc551f4819e3c058b25e79c Author: Sean Christopherson Date: Mon Jun 7 12:01:57 2021 +0300 KVM: nSVM: Drop pointless pdptrs_changed() check on nested transition Remove the "PDPTRs unchanged" check to skip PDPTR loading during nested SVM transitions as it's not at all an optimization. Reading guest memory to get the PDPTRs isn't magically cheaper by doing it in pdptrs_changed(), and if the PDPTRs did change, KVM will end up doing the read twice. Signed-off-by: Sean Christopherson Message-Id: <20210607090203.133058-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit bcb72d0627e8a3e531021c9bd2a14fae8da63ef3 Author: Sean Christopherson Date: Mon Jun 7 12:01:56 2021 +0300 KVM: nVMX: Drop obsolete (and pointless) pdptrs_changed() check Remove the pdptrs_changed() check when loading L2's CR3. The set of available registers is always reset when switching VMCSes (see commit e5d03de5937e, "KVM: nVMX: Reset register cache (available and dirty masks) on VMCS switch"), thus the "are PDPTRs available" check will always fail. And even if it didn't fail, reading guest memory to check the PDPTRs is just as expensive as reading guest memory to load 'em. Signed-off-by: Sean Christopherson Message-Id: <20210607090203.133058-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit e2e1cc1fbe54a9520956a4539a3676d2ebf122dd Author: Vitaly Kuznetsov Date: Fri May 21 11:52:04 2021 +0200 KVM: selftests: Introduce hyperv_features test The initial implementation of the test only tests that access to Hyper-V MSRs and hypercalls is in compliance with guest visible CPUID feature bits. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-31-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d504df3c913bb91dda41fffaebbb5bfd6d8c4b07 Author: Vitaly Kuznetsov Date: Fri May 21 11:52:03 2021 +0200 KVM: selftests: Move evmcs.h to x86_64/ evmcs.h is x86_64 only thing, move it to x86_64/ subdirectory. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-30-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 75a3f4287fdbdca406b5a087cbc67fad313bce7d Author: Vitaly Kuznetsov Date: Fri May 21 11:52:02 2021 +0200 KVM: selftests: move Hyper-V MSR definitions to hyperv.h These defines can be shared by multiple tests, move them to a dedicated header. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-29-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 445caed0213acef29b9d3822b6906f99860ca9ab Author: Vitaly Kuznetsov Date: Fri May 21 11:52:01 2021 +0200 KVM: x86: hyper-v: Honor HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED bit Hypercalls which use extended processor masks are only available when HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED privilege bit is exposed (and 'RECOMMENDED' is rather a misnomer). Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-28-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d264eb3c14d0e5df49ecab3e8b51caadf78abefa Author: Vitaly Kuznetsov Date: Fri May 21 11:52:00 2021 +0200 KVM: x86: hyper-v: Honor HV_X64_CLUSTER_IPI_RECOMMENDED bit Hyper-V partition must possess 'HV_X64_CLUSTER_IPI_RECOMMENDED' privilege ('recommended' is rather a misnomer) to issue HVCALL_SEND_IPI hypercalls. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-27-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit bb53ecb4d6ea453e55a971295e55dbf76adc0f8c Author: Vitaly Kuznetsov Date: Fri May 21 11:51:59 2021 +0200 KVM: x86: hyper-v: Honor HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED bit Hyper-V partition must possess 'HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED' privilege ('recommended' is rather a misnomer) to issue HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST/SPACE hypercalls. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-26-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit a921cf83cc4c927f29eef1e7a17bff176c74b886 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:58 2021 +0200 KVM: x86: hyper-v: Honor HV_DEBUGGING privilege bit Hyper-V partition must possess 'HV_DEBUGGING' privilege to issue HVCALL_POST_DEBUG_DATA/HVCALL_RETRIEVE_DEBUG_DATA/ HVCALL_RESET_DEBUG_SESSION hypercalls. Note, when SynDBG is disabled hv_check_hypercall_access() returns 'true' (like for any other unknown hypercall) so the result will be HV_STATUS_INVALID_HYPERCALL_CODE and not HV_STATUS_ACCESS_DENIED. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-25-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit a60b3c594ef3221275d4fa8aa94e206607ea66f3 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:57 2021 +0200 KVM: x86: hyper-v: Honor HV_SIGNAL_EVENTS privilege bit Hyper-V partition must possess 'HV_SIGNAL_EVENTS' privilege to issue HVCALL_SIGNAL_EVENT hypercalls. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-24-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 4f532b7f969fcba010703fe21e0a85f662373041 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:56 2021 +0200 KVM: x86: hyper-v: Honor HV_POST_MESSAGES privilege bit Hyper-V partition must possess 'HV_POST_MESSAGES' privilege to issue HVCALL_POST_MESSAGE hypercalls. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-23-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 34ef7d7b9c0422316ee2c34c564b222255c91532 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:55 2021 +0200 KVM: x86: hyper-v: Check access to HVCALL_NOTIFY_LONG_SPIN_WAIT hypercall TLFS6.0b states that partition issuing HVCALL_NOTIFY_LONG_SPIN_WAIT must posess 'UseHypercallForLongSpinWait' privilege but there's no corresponding feature bit. Instead, we have "Recommended number of attempts to retry a spinlock failure before notifying the hypervisor about the failures. 0xFFFFFFFF indicates never notify." Use this to check access to the hypercall. Also, check against zero as the corresponding CPUID must be set (and '0' attempts before re-try is weird anyway). Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-22-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 4ad81a91119df7c0e868f9e4c82b9159645bc906 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:54 2021 +0200 KVM: x86: hyper-v: Prepare to check access to Hyper-V hypercalls Introduce hv_check_hypercallr_access() to check if the particular hypercall should be available to guest, this will be used with KVM_CAP_HYPERV_ENFORCE_CPUID mode. No functional change intended. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-21-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 1aa8a4184dbde5f50b70b2c706bcfb6b57da9ea7 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:53 2021 +0200 KVM: x86: hyper-v: Honor HV_STIMER_DIRECT_MODE_AVAILABLE privilege bit Synthetic timers can only be configured in 'direct' mode when HV_STIMER_DIRECT_MODE_AVAILABLE bit was exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-20-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d66bfa36f9edc5ca8c83206ab39d09091623104e Author: Vitaly Kuznetsov Date: Fri May 21 11:51:52 2021 +0200 KVM: x86: hyper-v: Inverse the default in hv_check_msr_access() Access to all MSRs is now properly checked. To avoid 'forgetting' to properly check access to new MSRs in the future change the default to 'false' meaning 'no access'. No functional change intended. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-19-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 17b6d51771a15c7d8552c3e855b5862b3dce0977 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:51 2021 +0200 KVM: x86: hyper-v: Honor HV_FEATURE_DEBUG_MSRS_AVAILABLE privilege bit Synthetic debugging MSRs (HV_X64_MSR_SYNDBG_CONTROL, HV_X64_MSR_SYNDBG_STATUS, HV_X64_MSR_SYNDBG_SEND_BUFFER, HV_X64_MSR_SYNDBG_RECV_BUFFER, HV_X64_MSR_SYNDBG_PENDING_BUFFER, HV_X64_MSR_SYNDBG_OPTIONS) are only available to guest when HV_FEATURE_DEBUG_MSRS_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-18-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 0a19c8992db834c9c9e28c5633720d994629539d Author: Vitaly Kuznetsov Date: Fri May 21 11:51:50 2021 +0200 KVM: x86: hyper-v: Honor HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE privilege bit HV_X64_MSR_CRASH_P0 ... HV_X64_MSR_CRASH_P4, HV_X64_MSR_CRASH_CTL are only available to guest when HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-17-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 234d01baec5b216b60b560672957470f773ecf78 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:49 2021 +0200 KVM: x86: hyper-v: Honor HV_ACCESS_REENLIGHTENMENT privilege bit HV_X64_MSR_REENLIGHTENMENT_CONTROL/HV_X64_MSR_TSC_EMULATION_CONTROL/ HV_X64_MSR_TSC_EMULATION_STATUS are only available to guest when HV_ACCESS_REENLIGHTENMENT bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-16-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 9442f3bd9012f37ba2b4ec3ab2d7c248b137391c Author: Vitaly Kuznetsov Date: Fri May 21 11:51:48 2021 +0200 KVM: x86: hyper-v: Honor HV_ACCESS_FREQUENCY_MSRS privilege bit HV_X64_MSR_TSC_FREQUENCY/HV_X64_MSR_APIC_FREQUENCY are only available to guest when HV_ACCESS_FREQUENCY_MSRS bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-15-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 978b57475c7795824676122acb75a1dea264b6d1 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:47 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_APIC_ACCESS_AVAILABLE privilege bit HV_X64_MSR_EOI, HV_X64_MSR_ICR, HV_X64_MSR_TPR, and HV_X64_MSR_VP_ASSIST_PAGE are only available to guest when HV_MSR_APIC_ACCESS_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-14-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit eba60ddae794bdefb9531cb08e30c19a0bc53c15 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:46 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_SYNTIMER_AVAILABLE privilege bit Synthetic timers MSRs (HV_X64_MSR_STIMER[0-3]_CONFIG, HV_X64_MSR_STIMER[0-3]_COUNT) are only available to guest when HV_MSR_SYNTIMER_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-13-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 9e2715ca20d7b540a271464b3ac862cf387935c1 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:45 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_SYNIC_AVAILABLE privilege bit SynIC MSRs (HV_X64_MSR_SCONTROL, HV_X64_MSR_SVERSION, HV_X64_MSR_SIEFP, HV_X64_MSR_SIMP, HV_X64_MSR_EOM, HV_X64_MSR_SINT0 ... HV_X64_MSR_SINT15) are only available to guest when HV_MSR_SYNIC_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-12-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit a1ec661c3fdc8177a8789a9528d5bcfe0d9fc8a8 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:44 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_REFERENCE_TSC_AVAILABLE privilege bit HV_X64_MSR_REFERENCE_TSC is only available to guest when HV_MSR_REFERENCE_TSC_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-11-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 679008e4bbeb12f4905ee0820cd2d0b9d4a21dbb Author: Vitaly Kuznetsov Date: Fri May 21 11:51:43 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_RESET_AVAILABLE privilege bit HV_X64_MSR_RESET is only available to guest when HV_MSR_RESET_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-10-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d2ac25d4196da2ff404c88bec480c835995ea69c Author: Vitaly Kuznetsov Date: Fri May 21 11:51:42 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_VP_INDEX_AVAILABLE privilege bit HV_X64_MSR_VP_INDEX is only available to guest when HV_MSR_VP_INDEX_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-9-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit c2b32867f2e7bfa7e7521e417ab8bbd586ac6bcc Author: Vitaly Kuznetsov Date: Fri May 21 11:51:41 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_TIME_REF_COUNT_AVAILABLE privilege bit HV_X64_MSR_TIME_REF_COUNT is only available to guest when HV_MSR_TIME_REF_COUNT_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-8-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b80a92ff81587c556da740e9073821b5c3c23b72 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:40 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_VP_RUNTIME_AVAILABLE privilege bit HV_X64_MSR_VP_RUNTIME is only available to guest when HV_MSR_VP_RUNTIME_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-7-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 1561c2cb87ab39400d76998bf7be581c1e57f108 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:39 2021 +0200 KVM: x86: hyper-v: Honor HV_MSR_HYPERCALL_AVAILABLE privilege bit HV_X64_MSR_GUEST_OS_ID/HV_X64_MSR_HYPERCALL are only available to guest when HV_MSR_HYPERCALL_AVAILABLE bit is exposed. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b4128000e2c9b176a449d748dcb083c61d61cc6e Author: Vitaly Kuznetsov Date: Fri May 21 11:51:38 2021 +0200 KVM: x86: hyper-v: Prepare to check access to Hyper-V MSRs Introduce hv_check_msr_access() to check if the particular MSR should be accessible by guest, this will be used with KVM_CAP_HYPERV_ENFORCE_CPUID mode. No functional change intended. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 10d7bf1e46dc19d964f0f67d2a6d20df907742d1 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:37 2021 +0200 KVM: x86: hyper-v: Cache guest CPUID leaves determining features availability Limiting exposed Hyper-V features requires a fast way to check if the particular feature is exposed in guest visible CPUIDs or not. To aboid looping through all CPUID entries on every hypercall/MSR access cache the required leaves on CPUID update. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 644f706719f0297bc5f65c8891de1c32f042eae5 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:36 2021 +0200 KVM: x86: hyper-v: Introduce KVM_CAP_HYPERV_ENFORCE_CPUID Modeled after KVM_CAP_ENFORCE_PV_FEATURE_CPUID, the new capability allows for limiting Hyper-V features to those exposed to the guest in Hyper-V CPUIDs (0x40000003, 0x40000004, ...). Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit f15cdceab543059a9afd9e6277cf15d56d7dfd82 Author: Vitaly Kuznetsov Date: Fri May 21 11:51:35 2021 +0200 asm-generic/hyperv: add HV_STATUS_ACCESS_DENIED definition From TLFSv6.0b, this status means: "The caller did not possess sufficient access rights to perform the requested operation." Signed-off-by: Vitaly Kuznetsov Acked-by: Wei Liu Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 1183646a67d01ef9c46ac87da1c57dea5f7bb153 Author: Vineeth Pillai Date: Thu Jun 3 15:14:40 2021 +0000 KVM: SVM: hyper-v: Direct Virtual Flush support From Hyper-V TLFS: "The hypervisor exposes hypercalls (HvFlushVirtualAddressSpace, HvFlushVirtualAddressSpaceEx, HvFlushVirtualAddressList, and HvFlushVirtualAddressListEx) that allow operating systems to more efficiently manage the virtual TLB. The L1 hypervisor can choose to allow its guest to use those hypercalls and delegate the responsibility to handle them to the L0 hypervisor. This requires the use of a partition assist page." Add the Direct Virtual Flush support for SVM. Related VMX changes: commit 6f6a657c9998 ("KVM/Hyper-V/VMX: Add direct tlb flush support") Signed-off-by: Vineeth Pillai Message-Id: Signed-off-by: Paolo Bonzini commit c4327f15dfc7294b2abde0ea49b3e43eec3cca38 Author: Vineeth Pillai Date: Thu Jun 3 15:14:39 2021 +0000 KVM: SVM: hyper-v: Enlightened MSR-Bitmap support Enlightened MSR-Bitmap as per TLFS: "The L1 hypervisor may collaborate with the L0 hypervisor to make MSR accesses more efficient. It can enable enlightened MSR bitmaps by setting the corresponding field in the enlightened VMCS to 1. When enabled, L0 hypervisor does not monitor the MSR bitmaps for changes. Instead, the L1 hypervisor must invalidate the corresponding clean field after making changes to one of the MSR bitmaps." Enable this for SVM. Related VMX changes: commit ceef7d10dfb6 ("KVM: x86: VMX: hyper-v: Enlightened MSR-Bitmap support") Signed-off-by: Vineeth Pillai Message-Id: <87df0710f95d28b91cc4ea014fc4d71056eebbee.1622730232.git.viremana@linux.microsoft.com> Signed-off-by: Paolo Bonzini commit 1e0c7d40758bcd45b4af936031144e995f87a7f6 Author: Vineeth Pillai Date: Thu Jun 3 15:14:38 2021 +0000 KVM: SVM: hyper-v: Remote TLB flush for SVM Enable remote TLB flush for SVM. Signed-off-by: Vineeth Pillai Message-Id: <1ee364e397e142aed662d2920d198cd03772f1a5.1622730232.git.viremana@linux.microsoft.com> Signed-off-by: Paolo Bonzini commit 59d21d67f37481cfde25551ee6a467fa943812b4 Author: Vineeth Pillai Date: Thu Jun 3 15:14:37 2021 +0000 KVM: SVM: Software reserved fields SVM added support for certain reserved fields to be used by software or hypervisor. Add the following reserved fields: - VMCB offset 0x3e0 - 0x3ff - Clean bit 31 - SVM intercept exit code 0xf0000000 Later patches will make use of this for supporting Hyper-V nested virtualization enhancements. Signed-off-by: Vineeth Pillai Message-Id: Signed-off-by: Paolo Bonzini commit 3c86c0d3dbb98865a60a0c9d5c3a229af15a8a96 Author: Vineeth Pillai Date: Thu Jun 3 15:14:36 2021 +0000 KVM: x86: hyper-v: Move the remote TLB flush logic out of vmx Currently the remote TLB flush logic is specific to VMX. Move it to a common place so that SVM can use it as well. Signed-off-by: Vineeth Pillai Message-Id: <4f4e4ca19778437dae502f44363a38e99e3ef5d1.1622730232.git.viremana@linux.microsoft.com> Signed-off-by: Paolo Bonzini commit 32431fb2538df56693a5852a50013549c827f57c Author: Vineeth Pillai Date: Thu Jun 3 15:14:35 2021 +0000 hyperv: SVM enlightened TLB flush support flag Bit 22 of HYPERV_CPUID_FEATURES.EDX is specific to SVM and specifies support for enlightened TLB flush. With this enlightenment enabled, ASID invalidations flushes only gva->hpa entries. To flush TLB entries derived from NPT, hypercalls should be used (HvFlushGuestPhysicalAddressSpace or HvFlushGuestPhysicalAddressList) Signed-off-by: Vineeth Pillai Reviewed-by: Michael Kelley Message-Id: Signed-off-by: Paolo Bonzini commit a6c776a952175e0fad22110e8d43019f3ac6f9af Author: Vineeth Pillai Date: Thu Jun 3 15:14:34 2021 +0000 hyperv: Detect Nested virtualization support for SVM Previously, to detect nested virtualization enlightenment support, we were using HV_X64_ENLIGHTENED_VMCS_RECOMMENDED feature bit of HYPERV_CPUID_ENLIGHTMENT_INFO.EAX CPUID as docuemented in TLFS: "Bit 14: Recommend a nested hypervisor using the enlightened VMCS interface. Also indicates that additional nested enlightenments may be available (see leaf 0x4000000A)". Enlightened VMCS, however, is an Intel only feature so the above detection method doesn't work for AMD. So, use the HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS.EAX CPUID information ("The maximum input value for hypervisor CPUID information.") and this works for both AMD and Intel. Signed-off-by: Vineeth Pillai Reviewed-by: Michael Kelley Message-Id: <43b25ff21cd2d9a51582033c9bdd895afefac056.1622730232.git.viremana@linux.microsoft.com> Signed-off-by: Paolo Bonzini commit d5a0483f9f3250fe359224327ca1b4a29d106981 Author: Krish Sadhukhan Date: Wed Jun 9 14:03:39 2021 -0400 KVM: nVMX: nSVM: Add a new VCPU statistic to show if VCPU is in guest mode Add the following per-VCPU statistic to KVM debugfs to show if a given VCPU is in guest mode: guest_mode Also add this as a per-VM statistic to KVM debugfs to show the total number of VCPUs that are in guest mode in a given VM. Signed-off-by: Krish Sadhukhan Message-Id: <20210609180340.104248-3-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit b93af02c6722fde384ed2e921b71b61b9addb740 Author: Krish Sadhukhan Date: Wed Jun 9 14:03:38 2021 -0400 KVM: nVMX: nSVM: 'nested_run' should count guest-entry attempts that make it to guest code Currently, the 'nested_run' statistic counts all guest-entry attempts, including those that fail during vmentry checks on Intel and during consistency checks on AMD. Convert this statistic to count only those guest-entries that make it past these state checks and make it to guest code. This will tell us the number of guest-entries that actually executed or tried to execute guest code. Signed-off-by: Krish Sadhukhan Message-Id: <20210609180340.104248-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit ecc513e5bb7ed5d007dcaa533729360e9eb673ba Author: Sean Christopherson Date: Wed Jun 9 11:56:19 2021 -0700 KVM: x86: Drop "pre_" from enter/leave_smm() helpers Now that .post_leave_smm() is gone, drop "pre_" from the remaining helpers. The helpers aren't invoked purely before SMI/RSM processing, e.g. both helpers are invoked after state is snapshotted (from regs or SMRAM), and the RSM helper is invoked after some amount of register state has been stuffed. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0128116550acf52043a0aa5cca3caa85e3853aca Author: Sean Christopherson Date: Wed Jun 9 11:56:18 2021 -0700 KVM: x86: Drop .post_leave_smm(), i.e. the manual post-RSM MMU reset Drop the .post_leave_smm() emulator callback, which at this point is just a wrapper to kvm_mmu_reset_context(). The manual context reset is unnecessary, because unlike enter_smm() which calls vendor MSR/CR helpers directly, em_rsm() bounces through the KVM helpers, e.g. kvm_set_cr4(), which are responsible for processing side effects. em_rsm() is already subtly relying on this behavior as it doesn't manually do kvm_update_cpuid_runtime(), e.g. to recognize CR4.OSXSAVE changes. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1270e647c802b427c8114816b0f35b961600f104 Author: Sean Christopherson Date: Wed Jun 9 11:56:17 2021 -0700 KVM: x86: Rename SMM tracepoint to make it reflect reality Rename the SMM tracepoint, which handles both entering and exiting SMM, from kvm_enter_smm to kvm_smm_transition. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0d7ee6f4b58dc6aca54df285cec027727c976892 Author: Sean Christopherson Date: Wed Jun 9 11:56:16 2021 -0700 KVM: x86: Move "entering SMM" tracepoint into kvm_smm_changed() Invoke the "entering SMM" tracepoint from kvm_smm_changed() instead of enter_smm(), effectively moving it from before reading vCPU state to after reading state (but still before writing it to SMRAM!). The primary motivation is to consolidate code, but calling the tracepoint from kvm_smm_changed() also makes its invocation consistent with respect to SMI and RSM, and with respect to KVM_SET_VCPU_EVENTS (which previously only invoked the tracepoint when forcing the vCPU out of SMM). Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit dc87275f47332be922d4eb299595523cc3a97479 Author: Sean Christopherson Date: Wed Jun 9 11:56:15 2021 -0700 KVM: x86: Move (most) SMM hflags modifications into kvm_smm_changed() Move the core of SMM hflags modifications into kvm_smm_changed() and use kvm_smm_changed() in enter_smm(). Clear HF_SMM_INSIDE_NMI_MASK for leaving SMM but do not set it for entering SMM. If the vCPU is executing outside of SMM, the flag should unequivocally be cleared, e.g. this technically fixes a benign bug where the flag could be left set after KVM_SET_VCPU_EVENTS, but the reverse is not true as NMI blocking depends on pre-SMM state or userspace input. Note, this adds an extra kvm_mmu_reset_context() to enter_smm(). The extra/early reset isn't strictly necessary, and in a way can never be necessary since the vCPU/MMU context is in a half-baked state until the final context reset at the end of the function. But, enter_smm() is not a hot path, and exploding on an invalid root_hpa is probably better than having a stale SMM flag in the MMU role; it's at least no worse. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fa75e08bbe4f8ea609f61bbb6c04b3bb2b38c793 Author: Sean Christopherson Date: Wed Jun 9 11:56:14 2021 -0700 KVM: x86: Invoke kvm_smm_changed() immediately after clearing SMM flag Move RSM emulation's call to kvm_smm_changed() from .post_leave_smm() to .exiting_smm(), leaving behind the MMU context reset. The primary motivation is to allow for future cleanup, but this also fixes a bug of sorts by queueing KVM_REQ_EVENT even if RSM causes shutdown, e.g. to let an INIT wake the vCPU from shutdown. Of course, KVM doesn't properly emulate a shutdown state, e.g. KVM doesn't block SMIs after shutdown, and immediately exits to userspace, so the event request is a moot point in practice. Moving kvm_smm_changed() also moves the RSM tracepoint. This isn't strictly necessary, but will allow consolidating the SMI and RSM tracepoints in a future commit (by also moving the SMI tracepoint). Invoking the tracepoint before loading SMRAM state also means the SMBASE that reported in the tracepoint will point that the state that will be used for RSM, as opposed to the SMBASE _after_ RSM completes, which is arguably a good thing if the tracepoint is being used to debug a RSM/SMM issue. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit edce46548b70b8637694d96122447662ff35af0c Author: Sean Christopherson Date: Wed Jun 9 11:56:13 2021 -0700 KVM: x86: Replace .set_hflags() with dedicated .exiting_smm() helper Replace the .set_hflags() emulator hook with a dedicated .exiting_smm(), moving the SMM and SMM_INSIDE_NMI flag handling out of the emulator in the process. This is a step towards consolidating much of the logic in kvm_smm_changed(), including the SMM hflags updates. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 25b17226cd9a77982fc8c915d4118d7238a0f079 Author: Sean Christopherson Date: Wed Jun 9 11:56:12 2021 -0700 KVM: x86: Emulate triple fault shutdown if RSM emulation fails Use the recently introduced KVM_REQ_TRIPLE_FAULT to properly emulate shutdown if RSM from SMM fails. Note, entering shutdown after clearing the SMM flag and restoring NMI blocking is architecturally correct with respect to AMD's APM, which KVM also uses for SMRAM layout and RSM NMI blocking behavior. The APM says: An RSM causes a processor shutdown if an invalid-state condition is found in the SMRAM state-save area. Only an external reset, external processor-initialization, or non-maskable external interrupt (NMI) can cause the processor to leave the shutdown state. Of note is processor-initialization (INIT) as a valid shutdown wake event, as INIT is blocked by SMM, implying that entering shutdown also forces the CPU out of SMM. For recent Intel CPUs, restoring NMI blocking is technically wrong, but so is restoring NMI blocking in the first place, and Intel's RSM "architecture" is such a mess that just about anything is allowed and can be justified as micro-architectural behavior. Per the SDM: On Pentium 4 and later processors, shutdown will inhibit INTR and A20M but will not change any of the other inhibits. On these processors, NMIs will be inhibited if no action is taken in the SMI handler to uninhibit them (see Section 34.8). where Section 34.8 says: When the processor enters SMM while executing an NMI handler, the processor saves the SMRAM state save map but does not save the attribute to keep NMI interrupts disabled. Potentially, an NMI could be latched (while in SMM or upon exit) and serviced upon exit of SMM even though the previous NMI handler has still not completed. I.e. RSM unconditionally unblocks NMI, but shutdown on RSM does not, which is in direct contradiction of KVM's behavior. But, as mentioned above, KVM follows AMD architecture and restores NMI blocking on RSM, so that micro-architectural detail is already lost. And for Pentium era CPUs, SMI# can break shutdown, meaning that at least some Intel CPUs fully leave SMM when entering shutdown: In the shutdown state, Intel processors stop executing instructions until a RESET#, INIT# or NMI# is asserted. While Pentium family processors recognize the SMI# signal in shutdown state, P6 family and Intel486 processors do not. In other words, the fact that Intel CPUs have implemented the two extremes gives KVM carte blanche when it comes to honoring Intel's architecture for handling shutdown during RSM. Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-3-seanjc@google.com> [Return X86EMUL_CONTINUE after triple fault. - Paolo] Signed-off-by: Paolo Bonzini commit 4651fc56bad01d340844c5fbf1e1f817639208ab Author: Vitaly Kuznetsov Date: Wed Jun 9 17:09:09 2021 +0200 KVM: x86: Drop vendor specific functions for APICv/AVIC enablement Now that APICv/AVIC enablement is kept in common 'enable_apicv' variable, there's no need to call kvm_apicv_init() from vendor specific code. No functional change intended. Reviewed-by: Sean Christopherson Reviewed-by: Maxim Levitsky Signed-off-by: Vitaly Kuznetsov Message-Id: <20210609150911.1471882-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit fdf513e37a3bd9f498179c878cfcd59693bf507c Author: Vitaly Kuznetsov Date: Wed Jun 9 17:09:08 2021 +0200 KVM: x86: Use common 'enable_apicv' variable for both APICv and AVIC Unify VMX and SVM code by moving APICv/AVIC enablement tracking to common 'enable_apicv' variable. Note: unlike APICv, AVIC is disabled by default. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Message-Id: <20210609150911.1471882-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 7d62874f69d7e5c1c1063a5848075bd1adff3998 Author: Sergey Senozhatsky Date: Sun Jun 6 11:10:45 2021 +0900 kvm: x86: implement KVM PM-notifier Implement PM hibernation/suspend prepare notifiers so that KVM can reliably set PVCLOCK_GUEST_STOPPED on VCPUs and properly suspend VMs. Signed-off-by: Sergey Senozhatsky Message-Id: <20210606021045.14159-2-senozhatsky@chromium.org> Signed-off-by: Paolo Bonzini commit 2fdef3a2ae01dfd928c4b42c5a3b76546170a74c Author: Sergey Senozhatsky Date: Sun Jun 6 11:10:44 2021 +0900 kvm: add PM-notifier Add KVM PM-notifier so that architectures can have arch-specific VM suspend/resume routines. Such architectures need to select CONFIG_HAVE_KVM_PM_NOTIFIER and implement kvm_arch_pm_notifier(). Signed-off-by: Sergey Senozhatsky Acked-by: Marc Zyngier Message-Id: <20210606021045.14159-1-senozhatsky@chromium.org> Signed-off-by: Paolo Bonzini commit 768d134d8cb4cb595966d8c509a9329a075a5fa2 Author: Jim Mattson Date: Fri Jun 4 10:26:09 2021 -0700 KVM: selftests: Introduce x2APIC register manipulation functions Standardize reads and writes of the x2APIC MSRs. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Message-Id: <20210604172611.281819-11-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 4c63c923408595eede59ce9fef6f4ab868928549 Author: Jim Mattson Date: Fri Jun 4 10:26:08 2021 -0700 KVM: selftests: Hoist APIC functions out of individual tests Move the APIC functions into the library to encourage code reuse and to avoid unintended deviations. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Message-Id: <20210604172611.281819-10-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 150a282d43b89c054f88ec248cb2a294b3ab0a4d Author: Jim Mattson Date: Fri Jun 4 10:26:07 2021 -0700 KVM: selftests: Move APIC definitions into a separate file Processor.h is a hodgepodge of definitions. Though the local APIC is technically built into the CPU these days, move the APIC definitions into a new header file: apic.h. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Message-Id: <20210604172611.281819-9-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 966eefb8965798478c2a6de3aa35ec180323792d Author: Jim Mattson Date: Fri Jun 4 10:26:06 2021 -0700 KVM: nVMX: Disable vmcs02 posted interrupts if vmcs12 PID isn't mappable Don't allow posted interrupts to modify a stale posted interrupt descriptor (including the initial value of 0). Empirical tests on real hardware reveal that a posted interrupt descriptor referencing an unbacked address has PCI bus error semantics (reads as all 1's; writes are ignored). However, kvm can't distinguish unbacked addresses from device-backed (MMIO) addresses, so it should really ask userspace for an MMIO completion. That's overly complicated, so just punt with KVM_INTERNAL_ERROR. Don't return the error until the posted interrupt descriptor is actually accessed. We don't want to break the existing kvm-unit-tests that assume they can launch an L2 VM with a posted interrupt descriptor that references MMIO space in L1. Fixes: 6beb7bd52e48 ("kvm: nVMX: Refactor nested_get_vmcs12_pages()") Signed-off-by: Jim Mattson Message-Id: <20210604172611.281819-8-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 0fe998b295a37234392072c23e22b8bba4774d0f Author: Jim Mattson Date: Fri Jun 4 10:26:05 2021 -0700 KVM: nVMX: Fail on MMIO completion for nested posted interrupts When the kernel has no mapping for the vmcs02 virtual APIC page, userspace MMIO completion is necessary to process nested posted interrupts. This is not a configuration that KVM supports. Rather than silently ignoring the problem, try to exit to userspace with KVM_INTERNAL_ERROR. Note that the event that triggers this error is consumed as a side-effect of a call to kvm_check_nested_events. On some paths (notably through kvm_vcpu_check_block), the error is dropped. In any case, this is an incremental improvement over always ignoring the error. Signed-off-by: Jim Mattson Message-Id: <20210604172611.281819-7-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 4fe09bcf14a666b8fa4d79ce1b4c87afa753f827 Author: Jim Mattson Date: Fri Jun 4 10:26:04 2021 -0700 KVM: x86: Add a return code to kvm_apic_accept_events No functional change intended. At present, the only negative value returned by kvm_check_nested_events is -EBUSY. Signed-off-by: Jim Mattson Message-Id: <20210604172611.281819-6-jmattson@google.com> Signed-off-by: Paolo Bonzini commit a5f6909a71f9223b7d7da71974bae226f94d9d68 Author: Jim Mattson Date: Fri Jun 4 10:26:03 2021 -0700 KVM: x86: Add a return code to inject_pending_event No functional change intended. At present, 'r' will always be -EBUSY on a control transfer to the 'out' label. Signed-off-by: Jim Mattson Message-Id: <20210604172611.281819-5-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 650293c3de6b042c4a2e87b2bc678efcff3843e8 Author: Jim Mattson Date: Fri Jun 4 10:26:02 2021 -0700 KVM: nVMX: Add a return code to vmx_complete_nested_posted_interrupt No functional change intended. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Message-Id: <20210604172611.281819-4-jmattson@google.com> Signed-off-by: Paolo Bonzini commit d82ee2819517eefd6f42465ccf3e3e621bbf4080 Author: Jim Mattson Date: Fri Jun 4 10:26:00 2021 -0700 KVM: x86: Remove guest mode check from kvm_check_nested_events A survey of the callsites reveals that they all ensure the vCPU is in guest mode before calling kvm_check_nested_events. Remove this dead code so that the only negative value this function returns (at the moment) is -EBUSY. Signed-off-by: Jim Mattson Message-Id: <20210604172611.281819-2-jmattson@google.com> Signed-off-by: Paolo Bonzini commit efe585493f914388de2382fac5ae7bd13c0555a5 Author: Ilias Stamatis Date: Wed May 26 19:44:18 2021 +0100 KVM: selftests: x86: Add vmx_nested_tsc_scaling_test Test that nested TSC scaling works as expected with both L1 and L2 scaled. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-12-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit d041b5ea93352b3d226352a7238a89da2dd7becb Author: Ilias Stamatis Date: Wed May 26 19:44:17 2021 +0100 KVM: nVMX: Enable nested TSC scaling Calculate the TSC offset and multiplier on nested transitions and expose the TSC scaling feature to L1. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-11-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 1ab9287add5e265352d18517551abf6d01d004fd Author: Ilias Stamatis Date: Mon Jun 7 11:54:38 2021 +0100 KVM: X86: Add vendor callbacks for writing the TSC multiplier Currently vmx_vcpu_load_vmcs() writes the TSC_MULTIPLIER field of the VMCS every time the VMCS is loaded. Instead of doing this, set this field from common code on initialization and whenever the scaling ratio changes. Additionally remove vmx->current_tsc_ratio. This field is redundant as vcpu->arch.tsc_scaling_ratio already tracks the current TSC scaling ratio. The vmx->current_tsc_ratio field is only used for avoiding unnecessary writes but it is no longer needed after removing the code from the VMCS load path. Suggested-by: Sean Christopherson Signed-off-by: Ilias Stamatis Message-Id: <20210607105438.16541-1-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit edcfe54058114cb3782cd2e919c224e14420e76e Author: Ilias Stamatis Date: Wed May 26 19:44:15 2021 +0100 KVM: X86: Move write_l1_tsc_offset() logic to common code and rename it The write_l1_tsc_offset() callback has a misleading name. It does not set L1's TSC offset, it rather updates the current TSC offset which might be different if a nested guest is executing. Additionally, both the vmx and svm implementations use the same logic for calculating the current TSC before writing it to hardware. Rename the function and move the common logic to the caller. The vmx/svm specific code now merely sets the given offset to the corresponding hardware structure. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-9-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 83150f2932ec4712e2630009ac4a585d4aba7a9e Author: Ilias Stamatis Date: Wed May 26 19:44:14 2021 +0100 KVM: X86: Add functions that calculate the nested TSC fields When L2 is entered we need to "merge" the TSC multiplier and TSC offset values of 01 and 12 together. The merging is done using the following equations: offset_02 = ((offset_01 * mult_12) >> shift_bits) + offset_12 mult_02 = (mult_01 * mult_12) >> shift_bits Where shift_bits is kvm_tsc_scaling_ratio_frac_bits. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-8-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 307a94c721fed1aaaeee68115df6f7fb8193b23f Author: Ilias Stamatis Date: Wed May 26 19:44:13 2021 +0100 KVM: X86: Add functions for retrieving L2 TSC fields from common code In order to implement as much of the nested TSC scaling logic as possible in common code, we need these vendor callbacks for retrieving the TSC offset and the TSC multiplier that L1 has set for L2. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-7-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 3c0f99366e34c1b45e4908e151089a8bf93fbe71 Author: Ilias Stamatis Date: Wed May 26 19:44:12 2021 +0100 KVM: nVMX: Add a TSC multiplier field in VMCS12 This is required for supporting nested TSC scaling. Signed-off-by: Ilias Stamatis Reviewed-by: Jim Mattson Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-6-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit fe3eb50418174567f6fbfb3d90a95cbd7a0cc17b Author: Ilias Stamatis Date: Wed May 26 19:44:11 2021 +0100 KVM: X86: Add a ratio parameter to kvm_scale_tsc() Sometimes kvm_scale_tsc() needs to use the current scaling ratio and other times (like when reading the TSC from user space) it needs to use L1's scaling ratio. Have the caller specify this by passing the ratio as a parameter. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-5-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 9b399dfd4c60a2249f45f3938b1b9b49394dfe3a Author: Ilias Stamatis Date: Wed May 26 19:44:10 2021 +0100 KVM: X86: Rename kvm_compute_tsc_offset() to kvm_compute_l1_tsc_offset() All existing code uses kvm_compute_tsc_offset() passing L1 TSC values to it. Let's document this by renaming it to kvm_compute_l1_tsc_offset(). Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-4-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 805d705ff8f3a05e63ce350ac0c37a3290ed9bb7 Author: Ilias Stamatis Date: Wed May 26 19:44:09 2021 +0100 KVM: X86: Store L1's TSC scaling ratio in 'struct kvm_vcpu_arch' Store L1's scaling ratio in the kvm_vcpu_arch struct like we already do for L1's TSC offset. This allows for easy save/restore when we enter and then exit the nested guest. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-3-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit 605a140a49099effc069f0fd509db34d91f48496 Author: Ilias Stamatis Date: Wed May 26 19:44:08 2021 +0100 math64.h: Add mul_s64_u64_shr() This function is needed for KVM's nested virtualization. The nested TSC scaling implementation requires multiplying the signed TSC offset with the unsigned TSC multiplier. Signed-off-by: Ilias Stamatis Reviewed-by: Maxim Levitsky Message-Id: <20210526184418.28881-2-ilstam@amazon.com> Signed-off-by: Paolo Bonzini commit d501f747ef5c0ac0c917f9a6781d04ae4ae39d63 Author: Ben Gardon Date: Tue May 18 10:34:14 2021 -0700 KVM: x86/mmu: Lazily allocate memslot rmaps If the TDP MMU is in use, wait to allocate the rmaps until the shadow MMU is actually used. (i.e. a nested VM is launched.) This saves memory equal to 0.2% of guest memory in cases where the TDP MMU is used and there are no nested guests involved. Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-8-bgardon@google.com> Signed-off-by: Paolo Bonzini commit e2209710ccc5d28d8b88c822d2f3e03b269a2856 Author: Ben Gardon Date: Tue May 18 10:34:13 2021 -0700 KVM: x86/mmu: Skip rmap operations if rmaps not allocated If only the TDP MMU is being used to manage the memory mappings for a VM, then many rmap operations can be skipped as they are guaranteed to be no-ops. This saves some time which would be spent on the rmap operation. It also avoids acquiring the MMU lock in write mode for many operations. This makes it safe to run the VM without rmaps allocated, when only using the TDP MMU and sets the stage for waiting to allocate the rmaps until they're needed. Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-7-bgardon@google.com> Signed-off-by: Paolo Bonzini commit a255740876f006eb9041fadcc4750557d26add5f Author: Ben Gardon Date: Tue May 18 10:34:12 2021 -0700 KVM: x86/mmu: Add a field to control memslot rmap allocation Add a field to control whether new memslots should have rmaps allocated for them. As of this change, it's not safe to skip allocating rmaps, so the field is always set to allocate rmaps. Future changes will make it safe to operate without rmaps, using the TDP MMU. Then further changes will allow the rmaps to be allocated lazily when needed for nested oprtation. No functional change expected. Reviewed-by: David Hildenbrand Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-6-bgardon@google.com> Signed-off-by: Paolo Bonzini commit b10a038e84d188e15819058b2978b2daa9853aeb Author: Ben Gardon Date: Tue May 18 10:34:11 2021 -0700 KVM: mmu: Add slots_arch_lock for memslot arch fields Add a new lock to protect the arch-specific fields of memslots if they need to be modified in a kvm->srcu read critical section. A future commit will use this lock to lazily allocate memslot rmaps for x86. Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-5-bgardon@google.com> [Add Documentation/ hunk. - Paolo] Signed-off-by: Paolo Bonzini commit ddc12f2a12917c10b0deb0928f0560bffb7729ec Author: Ben Gardon Date: Tue May 18 10:34:10 2021 -0700 KVM: mmu: Refactor memslot copy Factor out copying kvm_memslots from allocating the memory for new ones in preparation for adding a new lock to protect the arch-specific fields of the memslots. No functional change intended. Reviewed-by: David Hildenbrand Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-4-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 56dd1019c88510e79a820965a2da35907fbab00d Author: Ben Gardon Date: Tue May 18 10:34:09 2021 -0700 KVM: x86/mmu: Factor out allocating memslot rmap Small refactor to facilitate allocating rmaps for all memslots at once. No functional change expected. Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-3-bgardon@google.com> Signed-off-by: Paolo Bonzini commit c9b929b3fadc0504605d29016eb8274358c7d3ed Author: Ben Gardon Date: Tue May 18 10:34:08 2021 -0700 KVM: x86/mmu: Deduplicate rmap freeing Small code deduplication. No functional change expected. Reviewed-by: David Hildenbrand Signed-off-by: Ben Gardon Message-Id: <20210518173414.450044-2-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 8921291980db8184cdeb95987281c663f844b22c Author: Keqian Zhu Date: Thu Apr 29 11:41:15 2021 +0800 KVM: x86: Do not write protect huge page in initially-all-set mode Currently, when dirty logging is started in initially-all-set mode, we write protect huge pages to prepare for splitting them into 4K pages, and leave normal pages untouched as the logging will be enabled lazily as dirty bits are cleared. However, enabling dirty logging lazily is also feasible for huge pages. This not only reduces the time of start dirty logging, but it also greatly reduces side-effect on guest when there is high dirty rate. Signed-off-by: Keqian Zhu Message-Id: <20210429034115.35560-3-zhukeqian1@huawei.com> Signed-off-by: Paolo Bonzini commit 3ad93562093d764bc22d6460e84ba60d0c57f7ab Author: Keqian Zhu Date: Thu Apr 29 11:41:14 2021 +0800 KVM: x86: Support write protecting only large pages Prepare for write protecting large page lazily during dirty log tracking, for which we will only need to write protect gfns at large page granularity. No functional or performance change expected. Signed-off-by: Keqian Zhu Message-Id: <20210429034115.35560-2-zhukeqian1@huawei.com> Signed-off-by: Paolo Bonzini commit d8f5537a8816c8f00ea3103e74b65987963a56c6 Author: Siddharth Chandrasekaran Date: Wed May 26 11:03:56 2021 +0200 KVM: hyper-v: Advertise support for fast XMM hypercalls Now that kvm_hv_flush_tlb() has been patched to support XMM hypercall inputs, we can start advertising this feature to guests. Cc: Alexander Graf Cc: Evgeny Iakovlev Signed-off-by: Siddharth Chandrasekaran Message-Id: Signed-off-by: Paolo Bonzini commit 5974565bc26d6a599189db7c0b1f79eaa9af8eb9 Author: Siddharth Chandrasekaran Date: Wed May 26 10:56:10 2021 +0200 KVM: x86: kvm_hv_flush_tlb use inputs from XMM registers Hyper-V supports the use of XMM registers to perform fast hypercalls. This allows guests to take advantage of the improved performance of the fast hypercall interface even though a hypercall may require more than (the current maximum of) two input registers. The XMM fast hypercall interface uses six additional XMM registers (XMM0 to XMM5) to allow the guest to pass an input parameter block of up to 112 bytes. Add framework to read from XMM registers in kvm_hv_hypercall() and use the additional hypercall inputs from XMM registers in kvm_hv_flush_tlb() when possible. Cc: Alexander Graf Co-developed-by: Evgeny Iakovlev Signed-off-by: Evgeny Iakovlev Signed-off-by: Siddharth Chandrasekaran Message-Id: Signed-off-by: Paolo Bonzini commit bd38b32053eb1c53ddb7030cf0fc6d700f7f1d82 Author: Siddharth Chandrasekaran Date: Wed May 26 10:56:09 2021 +0200 KVM: hyper-v: Collect hypercall params into struct As of now there are 7 parameters (and flags) that are used in various hyper-v hypercall handlers. There are 6 more input/output parameters passed from XMM registers which are to be added in an upcoming patch. To make passing arguments to the handlers more readable, capture all these parameters into a single structure. Cc: Alexander Graf Cc: Evgeny Iakovlev Signed-off-by: Siddharth Chandrasekaran Message-Id: <273f7ed510a1f6ba177e61b73a5c7bfbee4a4a87.1622019133.git.sidcha@amazon.de> Signed-off-by: Paolo Bonzini commit 43e5146436099a98fcd30793598d61e582ec6830 Author: Siddharth Chandrasekaran Date: Wed May 26 10:56:08 2021 +0200 KVM: x86: Move FPU register accessors into fpu.h Hyper-v XMM fast hypercalls use XMM registers to pass input/output parameters. To access these, hyperv.c can reuse some FPU register accessors defined in emulator.c. Move them to a common location so both can access them. While at it, reorder the parameters of these accessor methods to make them more readable. Cc: Alexander Graf Cc: Evgeny Iakovlev Signed-off-by: Siddharth Chandrasekaran Message-Id: <01a85a6560714d4d3637d3d86e5eba65073318fa.1622019133.git.sidcha@amazon.de> Signed-off-by: Paolo Bonzini commit a9d6496d667fdb86713868a402378a0e4db62b50 Author: Shaokun Zhang Date: Thu May 27 15:57:51 2021 +0800 KVM: x86/mmu: Make is_nx_huge_page_enabled an inline function Function 'is_nx_huge_page_enabled' is called only by kvm/mmu, so make it as inline fucntion and remove the unnecessary declaration. Cc: Ben Gardon Cc: Paolo Bonzini Cc: Sean Christopherson Suggested-by: Sean Christopherson Signed-off-by: Shaokun Zhang Message-Id: <1622102271-63107-1-git-send-email-zhangshaokun@hisilicon.com> Signed-off-by: Paolo Bonzini commit 77345ef70445a8f16e0685dade0d68bdf41f19d7 Author: Marc Zyngier Date: Tue Jun 15 12:12:27 2021 +0100 arm64: suspend: Use cpuidle context helpers in cpu_suspend() Use cpuidle context helpers to switch to using DAIF.IF instead of PMR to mask interrupts, ensuring that we suspend with interrupts being able to reach the CPU interface. Signed-off-by: Marc Zyngier Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20210615111227.2454465-5-maz@kernel.org Signed-off-by: Will Deacon commit c9223b616298c3d0e6ff5dd20d14d65c2131c535 Author: Marc Zyngier Date: Tue Jun 15 12:12:26 2021 +0100 PSCI: Use cpuidle context helpers in psci_cpu_suspend_enter() The PSCI CPU suspend code isn't aware of the PMR vs DAIF game, resulting in a system that locks up if entering CPU suspend with GICv3 pNMI enabled. To save the day, teach the suspend code about our new cpuidle context helpers, which will do everything that's required just like the usual WFI cpuidle code. This fixes my Altra system, which would otherwise lock-up at boot time when booted with irqchip.gicv3_pseudo_nmi=1. Tested-by: Valentin Schneider Reviewed-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20210615111227.2454465-4-maz@kernel.org Signed-off-by: Will Deacon commit d4dc10277255afc303de4f00cbee0b9ce74d870f Author: Marc Zyngier Date: Tue Jun 15 12:12:25 2021 +0100 arm64: Convert cpu_do_idle() to using cpuidle context helpers Now that we have helpers that are aware of the pseudo-NMI feature, introduce them to cpu_do_idle(). This allows for some nice cleanup. No functional change intended. Tested-by: Valentin Schneider Reviewed-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210615111227.2454465-3-maz@kernel.org Signed-off-by: Will Deacon commit 8848f0665b3cd4fbb3107b384f5205380c90634d Author: Marc Zyngier Date: Tue Jun 15 12:12:24 2021 +0100 arm64: Add cpuidle context save/restore helpers As we need to start doing some additional work on all idle paths, let's introduce a set of macros that will perform the work related to the GICv3 pseudo-NMI idle entry exit. Stubs are introduced to 32bit ARM for compatibility. As these helpers are currently unused, there is no functional change. Tested-by: Valentin Schneider Reviewed-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210615111227.2454465-2-maz@kernel.org Signed-off-by: Will Deacon commit 3de4cb1756565a22321039eb9ae0193519bed967 Author: Felix Fietkau Date: Fri May 7 15:18:09 2021 +0200 mt76: mt7915: add support for tx status reporting For now, this only reports ACK status Signed-off-by: Felix Fietkau commit 223fd4f843081059bc8f8d8ba6363bfcc2e5848f Author: Felix Fietkau Date: Fri May 7 18:51:41 2021 +0200 mt76: mt7915: rework tx rate reporting Instead of attaching the last reported rate to tx packets, use ieee80211_tx_status_ext to immediately pass the rate to mac80211 after receiving it from the firmware. Preparation for implementing full tx status reporting Signed-off-by: Felix Fietkau commit 94e4f5794627a80ce036c35b32a9900daeb31be3 Author: Felix Fietkau Date: Sun May 9 20:23:01 2021 +0200 mt76: dma: use ieee80211_tx_status_ext to free packets when tx fails Fixes AQL issues on full queues, especially with 802.3 encap offload Signed-off-by: Felix Fietkau commit 0fe88644c06063352b202f82dbead3c0df053c10 Author: Felix Fietkau Date: Fri May 7 17:01:45 2021 +0200 mt76: improve tx status codepath Use ieee80211_tx_status_ext instead of ieee80211_free_skb and ieee80211_tx_status. This makes it compatible with 802.3 encap offload and improves performance by removing a redundant sta lookup Signed-off-by: Felix Fietkau commit 6d51cae28c8de95ac41c64affec2b00ef8bcaf87 Author: Felix Fietkau Date: Sun May 9 22:49:07 2021 +0200 mt76: intialize tx queue entry wcid to 0xffff by default Avoid accidentally mapping them to WCID 0 on completion Signed-off-by: Felix Fietkau commit 1d85dc67c4c720c8332f869965fe8091c757cc0d Author: Felix Fietkau Date: Fri May 7 19:49:00 2021 +0200 mt76: mt7603: avoid use of ieee80211_tx_info_clear_status It overwrites mt76_tx_cb data in the skb Signed-off-by: Felix Fietkau commit 7172534f63c493462f5bb96e3eb7fa03d889560e Author: Felix Fietkau Date: Fri May 7 19:46:23 2021 +0200 mt76: mt7615: avoid use of ieee80211_tx_info_clear_status It overwrites mt76_tx_cb data in the skb Signed-off-by: Felix Fietkau commit ec8f1a90d006f7cedcf86ef19fd034a406a213d6 Author: Felix Fietkau Date: Fri May 7 14:07:53 2021 +0200 mt76: mt7615: fix fixed-rate tx status reporting Rely on the txs fixed-rate bit instead of info->control.rates Signed-off-by: Felix Fietkau commit 338330bd26b1febc7923ce3ebb6b76f6a5d980b8 Author: Felix Fietkau Date: Fri May 7 12:52:42 2021 +0200 mt76: mt7915: move mt7915_queue_rx_skb to mac.c It is not really DMA specific, and moving it makes it possible to make some functions in mac.c static Signed-off-by: Felix Fietkau commit 03b3dedc5de184735bb9b6b3e5871fe4384913f2 Author: Felix Fietkau Date: Thu May 6 19:03:03 2021 +0200 mt76: mt7915: disable ASPM The same is done on the other chips already, so it is very likely needed on MT7915 as well Signed-off-by: Felix Fietkau commit bdac593c981b3b8986a8d37e020946ba1f6dfaa4 Author: Felix Fietkau Date: Mon Feb 8 23:49:39 2021 +0100 mt76: mt7915: add MSI support Move IRQ processing to a tasklet, similar to MT7615/MT7663 Signed-off-by: Felix Fietkau commit fe76421d1da1dcdb3a2cd8428ac40106bff28bc0 Author: Jens Axboe Date: Thu Jun 17 10:19:54 2021 -0600 io_uring: allow user configurable IO thread CPU affinity io-wq defaults to per-node masks for IO workers. This works fine by default, but isn't particularly handy for workloads that prefer more specific affinities, for either performance or isolation reasons. This adds IORING_REGISTER_IOWQ_AFF that allows the user to pass in a CPU mask that is then applied to IO thread workers, and an IORING_UNREGISTER_IOWQ_AFF that simply resets the masks back to the default of per-node. Note that no care is given to existing IO threads, they will need to go through a reschedule before the affinity is correct if they are already running or sleeping. Signed-off-by: Jens Axboe commit 587b839de733a8cdef3cbb805014e05229e7c96b Author: Colin Ian King Date: Tue Jun 15 15:28:47 2021 +0100 ice: remove redundant continue statement in a for-loop The continue statement in the for-loop is redundant. Re-work the hw_lock check to remove it. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Reviewed-by: Jacob Keller Signed-off-by: Tony Nguyen commit 4d7f75fe8006a1345e6a52b3e3a4c82633f20564 Author: Lorenzo Bianconi Date: Tue Jun 15 16:14:12 2021 +0200 net: ice: ptp: fix compilation warning if PTP_1588_CLOCK is disabled Fix the following compilation warning if PTP_1588_CLOCK is not enabled drivers/net/ethernet/intel/ice/ice_ptp.h:149:1: error: return type defaults to ‘int’ [-Werror=return-type] ice_ptp_request_ts(struct ice_ptp_tx *tx, struct sk_buff *skb) Fixes: ea9b847cda647 ("ice: enable transmit timestamps for E810 devices") Signed-off-by: Lorenzo Bianconi Reviewed-by: Jacob Keller Signed-off-by: Tony Nguyen commit 1e00113413a48b6e683244817ea04df95c515d46 Author: Jacob Keller Date: Mon Jun 14 09:59:16 2021 -0700 ice: remove unnecessary NULL checks before ptp_read_system_* The ptp_read_system_prets and ptp_read_system_postts functions already check for the NULL value of the ptp_system_timestamp structure pointer. There is no need to check this manually in the ice driver code. Remove the checks. Reported-by: Jakub Kicinski Signed-off-by: Jacob Keller Signed-off-by: Tony Nguyen commit 8c51c9b59a103fe7f4ab0c81ce9a202af7f1ece1 Merge: d78f4549d35b7 7cd04c863f9e1 Author: Greg Kroah-Hartman Date: Thu Jun 17 18:20:56 2021 +0200 Merge tag 'iio-for-5.14b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of Counter and IIO new device support, cleanups etc for 5.14 Counter ------ First part of general rework of counter subsystem to add a chrdev interface for event drive data capture. Most of it will hopefully land next cycle. * Consolidate documentation to avoid multiple copies of same docs in per device files. * Constify various arrays etc across subsystem. * 104-quad-8: - Annotate the module config parameter to avoid using it when kernel is locked down. - Spelling and trivial comment drops etc * Intel QEP - Follow up cleanups of trivial stuff from initial patch series. IIO --- Includes some cleanups as part of two ongoing audits - runtime pm usage in IIO. - Insufficient alignment on buffers passed to iio_push_to_buffers_with_timstamp() New device support * bosch,bmc150 - Add ID for BMA253 Minor features / cleanups / minor fixes / late breaking fixes * iio_push_to_buffers_with_timestamp() alignment fixes. This set includes those where the best option is to mark the buffer as __aligned(8). Normally this choice was made because there is too high a degree of possible variation in number of channels enabled to be able to guarantee the timestamp was always in the same location. This ruled out the more obvious structure form used in other drivers. Only one small class of related issues have patches under review and we can finally tighten up the explicit rules to reflect the hidden requirement. * dummy - Kconfig build dependency fix. * adi,ad_sigma_delta - General devm related simplifications for these devices. * adi,adf4350 - Fix some missing cleanup on error path. * adi,adis, ADC drivers. - Clean out unneeded spi_set_drvdata() * ams-taos,tcs3472 - Fix a potential free of an irq that was never allocated. * atlas,sensor - Drop unbalanced runtime pm call and use pm_runtime_resume_and_get() to reduce boilerplate. * bosch,bma180 - Fix bandwidth register values used. * bosch,bmc150 - Fix wrong pointer being dereferenced in remove. - Stop device trying unregister itself rather than the second device. - Refactor ACPI second device handing. - Add support for DUAL250E ACPI HID. - Move some stuff into the header to enable following patches to not add additional accessor functions. Drop existing accessors. - Add support for hinge angle setting with DUAL250E ACPI DSM to ensure keyboard and touchpad enabled correctly when in laptop mode and disabled otherwise. - Add label attr for the multiple sensor locations with DUAL250E ACPI HID. - Fix scale units for bma222 - Various reordering of devices supported lists to be alphabetical order. - Drop unnecessary duplicated chip_info_tbl[] entries. - Document that some devices have two interrupts, even if not currently used by the driver. - Move bma254 over to the bma255 driver. - Move to more consistent scale values, based on assumption that some datasheets use lower precision in their calculations in comparison with others. * hid-sensors - Use namespaces for exported symbols. - Update includes using manual inspection of output of the include-what-you-use tool. * invensense,icp10100 - Drop unbalanced runtime pm put. Use pm_runtime_resume_and_get() to cleanly handle potential error. * invensense,mpu6050 - Drop use of %hhx string formatting. - runtime pm boilerplate removal and drop an unbalanced call in remove. * liteon,ltr501 - Fix inaccurate volatile register list. - Fix wrong mode bit. - Add a missing leXX_to_cpu() conversion. - Mark ltr501_chip_info structure as const. * pulsed-light-lidar: - Boilerplate removal using runtime_pm_resume_and_get() * scmi-sensors - Formatting of SPDX fix. * silabs,si1133 - Fix a string format warning. - Drop remaining uses of %hhx string formatting. * silabs,si1145 - Drop use of %hhx string formatting. * ti,ads1015 - Drop unbalanced runtime pm call in remove and reduce boilerplate. * tag 'iio-for-5.14b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (76 commits) iio: light: tcs3472: do not free unallocated IRQ iio: accel: bmc150: Use more consistent and accurate scale values iio: hid-sensors: Update header includes iio: pressure: icp10100: Balance runtime pm + use pm_runtime_resume_and_get() iio: prox: pulsed-light-v2: Use pm_runtime_resume_and_get() iio: chemical: atlas-sensor: Balance runtime pm + pm_runtime_resume_and_get() iio: adc: ads1015: Balance runtime pm + pm_runtime_resume_and_get() iio: imu: mpu6050: Balance runtime pm + use pm_runtime_resume_and_get() iio: hid-sensors: lighten exported symbols by moving to IIO_HID namespace iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: light: vcnl4035: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: light: vcnl4000: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp() iio: adc: at91-sama5d2: Fix buffer alignment in iio_push_to_buffers_with_timestamp() counter: interrupt-cnt: Add const qualifier for actions_list array iio: ltr501: mark ltr501_chip_info as const iio: ltr501: ltr501_read_ps(): add missing endianness conversion ... commit b13ad3e08df7b434db5e675f47c3201051f41b05 Author: Shaokun Zhang Date: Mon May 24 16:39:01 2021 +0800 ice: Remove the repeated declaration Function 'ice_is_vsi_valid' is declared twice, remove the repeated declaration. Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: Shaokun Zhang Signed-off-by: Tony Nguyen commit c73bf3bd83e84a84e19631c552196139a04921e8 Author: Paul M Stillwell Jr Date: Thu May 6 08:40:08 2021 -0700 ice: remove local variable Remove the local variable since it's only used once. Instead, use it directly. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b6b0501d8d9a5ae26b9184164fa0d21052096941 Author: Paul M Stillwell Jr Date: Thu May 6 08:40:07 2021 -0700 ice: reduce scope of variables There are some places where the scope of a variable can be reduced so do that. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 0c526d440f76676733cb470b454db9d5507a3a50 Author: Jacob Keller Date: Thu May 6 08:40:05 2021 -0700 ice: mark PTYPE 2 as reserved The entry for PTYPE 2 in the ice_ptype_lkup table incorrectly states that this is an L2 packet with no payload. According to the datasheet, this PTYPE is actually unused and reserved. Fix the lookup entry to indicate this is an unused entry that is reserved. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 638a0c8c8861cb8a3b54203e632ea5dcc23d8ca5 Author: Jacob Keller Date: Thu May 6 08:40:04 2021 -0700 ice: fix incorrect payload indicator on PTYPE The entry for PTYPE 90 indicates that the payload is layer 3. This does not match the specification in the datasheet which indicates the packet is a MAC, IPv6, UDP packet, with a payload in layer 4. Fix the lookup table to match the data sheet. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 0e03496d1967abf1ebb151a24318c07d07f41f7f Author: Jens Axboe Date: Thu Jun 17 10:08:11 2021 -0600 io-wq: use private CPU mask In preparation for allowing user specific CPU masks for IO thread creation, switch to using a mask embedded in the per-node wqe structure. Signed-off-by: Jens Axboe commit b31d9d6d7abbf6483b871b6370bc31c930d53f54 Author: Zhangjiantao (Kirin, nanjing) Date: Thu Jun 17 18:03:54 2021 +0300 xhci: solve a double free problem while doing s4 when system is doing s4, the process of xhci_resume may be as below: 1、xhci_mem_cleanup 2、xhci_init->xhci_mem_init->xhci_mem_cleanup(when memory is not enough). xhci_mem_cleanup will be executed twice when system is out of memory. xhci->port_caps is freed in xhci_mem_cleanup,but it isn't set to NULL. It will be freed twice when xhci_mem_cleanup is called the second time. We got following bug when system resumes from s4: kernel BUG at mm/slub.c:309! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP CPU: 0 PID: 5929 Tainted: G S W 5.4.96-arm64-desktop #1 pc : __slab_free+0x5c/0x424 lr : kfree+0x30c/0x32c Call trace: __slab_free+0x5c/0x424 kfree+0x30c/0x32c xhci_mem_cleanup+0x394/0x3cc xhci_mem_init+0x9ac/0x1070 xhci_init+0x8c/0x1d0 xhci_resume+0x1cc/0x5fc xhci_plat_resume+0x64/0x70 platform_pm_thaw+0x28/0x60 dpm_run_callback+0x54/0x24c device_resume+0xd0/0x200 async_resume+0x24/0x60 async_run_entry_fn+0x44/0x110 process_one_work+0x1f0/0x490 worker_thread+0x5c/0x450 kthread+0x158/0x160 ret_from_fork+0x10/0x24 Original patch that caused this issue was backported to 4.4 stable, so this should be backported to 4.4 stabe as well. Fixes: cf0ee7c60c89 ("xhci: Fix memory leak when caching protocol extended capability PSI tables - take 2") Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Jiantao Zhang Signed-off-by: Tao Xue Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210617150354.1512157-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 271a21d8b280b186f8cc9ca6f7151902efde9512 Author: Mathias Nyman Date: Thu Jun 17 18:03:53 2021 +0300 xhci: handle failed buffer copy to URB sg list and fix a W=1 copiler warning Set the urb->actual_length to bytes successfully copied in case all bytes weren't copied from a temporary buffer to the URB sg list. Also print a debug message Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210617150354.1512157-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 90d551a5bc73d34c600507a1ef61f3a7c0840783 Author: Mathias Nyman Date: Thu Jun 17 18:03:52 2021 +0300 xhci: Add adaptive interrupt rate for isoch TRBs with XHCI_AVOID_BEI quirk Save a bit of power by not interrupting so often by default if XHCI_AVOID_BEI quirk is set. In normal cases the xhci driver will only generate an interrupt on the last isochronous TRB of an URB. In a common UVC webcam usecase there are 32 TRBs per URB. if AVOID_BEI flag is set then xhci driver will force an interrupt every 8th isoc TRB to make sure the event ring doesn't get too full. This is however way too frequent in common single webcam use cases, causing 1000 interrupts/sec and thus poor powermanagement performance. Instead start with interrupting every 32 isoc TRB, and halve it in case event ring becomes half-full. Stop halving when reaching a rate of every 8th trb. This is a one way solution. If interrupt rate is increased it will stay high until driver is reloaded. The highest rate is the same as the old default rate. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210617150354.1512157-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ebd88cf50729e1891dbd307dec311b8f05ba2462 Author: Mathias Nyman Date: Thu Jun 17 18:03:51 2021 +0300 xhci: Remove unused defines for ERST_SIZE and ERST_ENTRIES We don't want those around confusing people. ERST_NUM_SEGS is used both when allocating event ring segments, and when allocating entries in the event ring segment table (erst). Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210617150354.1512157-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 37d122c5768b4184949bbfea1631c0987be7814e Author: Zhen Lei Date: Thu Jun 17 18:27:45 2021 +0800 ALSA: aoa: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210617102746.1709-1-thunder.leizhen@huawei.com Signed-off-by: Takashi Iwai commit c5ad09a346651c4612668e2da68b8ebf78d66fd4 Author: Zhen Lei Date: Thu Jun 17 18:35:38 2021 +0800 ASoC: Intel: bdw-rt5677: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210617103538.1818-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown commit e8d46b384129acb0c6b240f5da3ca1484cfefcc7 Author: Colin Ian King Date: Thu Jun 17 13:08:37 2021 +0100 isofs: remove redundant continue statement The continue statement in the while-loop has no effect, remove it. Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210617120837.11994-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Jan Kara commit 44497fab681ba4ad439792eea6d118743f3e84d4 Author: Andy Shevchenko Date: Wed Jun 16 20:03:38 2021 +0300 ACPI: sysfs: Sort headers alphabetically For the sake of better maintenance, sort included headers alphabetically. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 0023b28bdbb4cfd000da066d05b0743aa4f8732a Author: Andy Shevchenko Date: Wed Jun 16 20:03:35 2021 +0300 ACPI: sysfs: Refactor param_get_trace_state() to drop dead code The param_get_trace_state() has a few dead code issues: - 'return 0;' is never reachable - a few 'else' keywords are redundant Refactor param_get_trace_state() to drop dead code. Note, leave one 'else' in order to have the best readability. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit b272c05984679c855ff2d08c9d54957bdcfd9b3b Author: Andy Shevchenko Date: Wed Jun 16 20:03:34 2021 +0300 ACPI: sysfs: Unify pattern of memory allocations Use the form of foo = kmalloc(sizeof(*foo)) everywhere in order to unify pattern of memory allocations. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit d3121e64ad78ba944596d43d23914cf5f0131666 Author: Andy Shevchenko Date: Wed Jun 16 20:03:33 2021 +0300 ACPI: sysfs: Allow bitmap list to be supplied to acpi_mask_gpe Currently we need to use as many acpi_mask_gpe options as we want to have GPEs to be masked. Even with two it already becomes inconveniently large the kernel command line. Instead, allow acpi_mask_gpe to represent bitmap list. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit bdd56d7d8931e842775d2e5b93d426a8d1940e33 Author: Andy Shevchenko Date: Wed Jun 16 20:03:32 2021 +0300 ACPI: sysfs: Make sparse happy about address space in use Sparse is not happy about address space in use in acpi_data_show(): drivers/acpi/sysfs.c:428:14: warning: incorrect type in assignment (different address spaces) drivers/acpi/sysfs.c:428:14: expected void [noderef] __iomem *base drivers/acpi/sysfs.c:428:14: got void * drivers/acpi/sysfs.c:431:59: warning: incorrect type in argument 4 (different address spaces) drivers/acpi/sysfs.c:431:59: expected void const *from drivers/acpi/sysfs.c:431:59: got void [noderef] __iomem *base drivers/acpi/sysfs.c:433:30: warning: incorrect type in argument 1 (different address spaces) drivers/acpi/sysfs.c:433:30: expected void *logical_address drivers/acpi/sysfs.c:433:30: got void [noderef] __iomem *base Indeed, acpi_os_map_memory() returns a void pointer with dropped specific address space. Hence, we don't need to carry out __iomem in acpi_data_show(). Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 531353e650db087e61ce84f8e6b7e0982c1dc1b0 Author: Robin Murphy Date: Mon Jun 14 15:57:26 2021 +0100 iommu: Update "iommu.strict" documentation Consolidating the flush queue logic also meant that the "iommu.strict" option started taking effect on x86 as well. Make sure we document that. Fixes: a250c23f15c2 ("iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE") Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu Reviewed-by: John Garry Link: https://lore.kernel.org/r/2c8c06e1b449d6b060c5bf9ad3b403cd142f405d.1623682646.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit e3850467bf8c82de4a052619136839fe8054b774 Author: Konstantin Porotchkin Date: Tue Feb 9 15:46:07 2021 +0200 arch/arm64/boot/dts/marvell: fix NAND partitioning scheme Eliminate 1MB gap between Linux and filesystem partitions. Signed-off-by: Konstantin Porotchkin Signed-off-by: Gregory CLEMENT commit f38601368f4a0c2a9f859511768dc3957e2e1769 Author: Steven Rostedt (VMware) Date: Thu Jun 17 10:51:02 2021 -0400 tracing: Add tp_printk_stop_on_boot option Add a kernel command line option that disables printing of events to console at late_initcall_sync(). This is useful when needing to see specific events written to console on boot up, but not wanting it when user space starts, as user space may make the console so noisy that the system becomes inoperable. Signed-off-by: Steven Rostedt (VMware) commit 3a0dc9fbe2b24a620e41d62cfe852e53b55f0bd8 Author: Grzegorz Jaszczyk Date: Tue Feb 9 15:46:06 2021 +0200 Documentation/bindings: phy: update references to cp11x The cp11x references in dts has changed, reflect it in comphy documentation. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Konstantin Porotchkin Signed-off-by: Gregory CLEMENT commit 1c461ef9c49e654c9173a665f20e47d4bf0d9bfb Merge: 8124c8a6b3538 ddd25670d39b2 Author: Joerg Roedel Date: Thu Jun 17 16:57:28 2021 +0200 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu Arm SMMU updates for 5.14 - SMMUv3: * Support stalling faults for platform devices * Decrease defaults sizes for the event and PRI queues - SMMUv2: * Support for a new '->probe_finalize' hook, needed by Nvidia * Even more Qualcomm compatible strings * Avoid Adreno TTBR1 quirk for DB820C platform - Misc: * Trivial cleanups/refactoring commit 8f6840c4fd1e7bd715e403074fb161c1a04cda73 Author: Yang Yingliang Date: Mon May 10 19:10:51 2021 +0800 ext4: return error code when ext4_fill_flex_info() fails After commit c89128a00838 ("ext4: handle errors on ext4_commit_super"), 'ret' may be set to 0 before calling ext4_fill_flex_info(), if ext4_fill_flex_info() fails ext4_mount() doesn't return error code, it makes 'root' is null which causes crash in legacy_get_tree(). Fixes: c89128a00838 ("ext4: handle errors on ext4_commit_super") Reported-by: Hulk Robot Cc: # v4.18+ Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210510111051.55650-1-yangyingliang@huawei.com Signed-off-by: Theodore Ts'o commit b9a037b7f3c401d3c63e0423e56aef606b1ffaaf Author: Zhang Yi Date: Fri May 7 15:19:04 2021 +0800 ext4: cleanup in-core orphan list if ext4_truncate() failed to get a transaction handle In ext4_orphan_cleanup(), if ext4_truncate() failed to get a transaction handle, it didn't remove the inode from the in-core orphan list, which may probably trigger below error dump in ext4_destroy_inode() during the final iput() and could lead to memory corruption on the later orphan list changes. EXT4-fs (sda): Inode 6291467 (00000000b8247c67): orphan list check failed! 00000000b8247c67: 0001f30a 00000004 00000000 00000023 ............#... 00000000e24cde71: 00000006 014082a3 00000000 00000000 ......@......... 0000000072c6a5ee: 00000000 00000000 00000000 00000000 ................ ... This patch fix this by cleanup in-core orphan list manually if ext4_truncate() return error. Cc: stable@kernel.org Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210507071904.160808-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit ce3aba43599f0b50adbebff133df8d08a3d5fffe Author: Anirudh Rayabharam Date: Fri May 7 00:26:54 2021 +0530 ext4: fix kernel infoleak via ext4_extent_header Initialize eh_generation of struct ext4_extent_header to prevent leaking info to userspace. Fixes KMSAN kernel-infoleak bug reported by syzbot at: http://syzkaller.appspot.com/bug?id=78e9ad0e6952a3ca16e8234724b2fa92d041b9b8 Cc: stable@kernel.org Reported-by: syzbot+2dcfeaf8cb49b05e8f1a@syzkaller.appspotmail.com Fixes: a86c61812637 ("[PATCH] ext3: add extent map support") Signed-off-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/20210506185655.7118-1-mail@anirudhrb.com Signed-off-by: Theodore Ts'o commit 618f003199c6188e01472b03cdbba227f1dc5f24 Author: Pavel Skripkin Date: Fri Apr 30 21:50:46 2021 +0300 ext4: fix memory leak in ext4_fill_super static int kthread(void *_create) will return -ENOMEM or -EINTR in case of internal failure or kthread_stop() call happens before threadfn call. To prevent fancy error checking and make code more straightforward we moved all cleanup code out of kmmpd threadfn. Also, dropped struct mmpd_data at all. Now struct super_block is a threadfn data and struct buffer_head embedded into struct ext4_sb_info. Reported-by: syzbot+d9e482e303930fa4f6ff@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/20210430185046.15742-1-paskripkin@gmail.com Signed-off-by: Theodore Ts'o commit 1fc57ca5a2cd26e0a526e5eb2b0fc0c054117a5b Author: Jiapeng Chong Date: Thu Apr 29 18:16:49 2021 +0800 ext4: remove redundant assignment to error Variable error is set to zero but this value is never read as it's not used later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: fs/ext4/ioctl.c:657:3: warning: Value stored to 'error' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1619691409-83160-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Theodore Ts'o commit 5c680150d7f43484fde6b87271229f2206bfff7c Author: Joseph Qi Date: Mon Apr 26 14:29:47 2021 +0800 ext4: remove redundant check buffer_uptodate() Now set_buffer_uptodate() will test first and then set, so we don't have to check buffer_uptodate() first, remove it to simplify code. Reviewed-by: Ritesh Harjani Signed-off-by: Joseph Qi Link: https://lore.kernel.org/r/1619418587-5580-1-git-send-email-joseph.qi@linux.alibaba.com Signed-off-by: Theodore Ts'o commit d0b040f5f2557b2f507c01e88ad8cff424fdc6a9 Author: Jan Kara Date: Mon Apr 12 12:23:33 2021 +0200 ext4: fix overflow in ext4_iomap_alloc() A code in iomap alloc may overflow block number when converting it to byte offset. Luckily this is mostly harmless as we will just use more expensive method of writing using unwritten extents even though we are writing beyond i_size. Cc: stable@kernel.org Fixes: 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210412102333.2676-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit cfe34bb7a770c5d8af053d53f5b76d5033667a73 Author: Ricardo Cañuelo Date: Tue Jun 15 15:13:33 2021 +0200 dt-bindings: drm: bridge: adi,adv7511.txt: convert to yaml Convert the ADV7511/11w/13/33/35 DT bindings to json-schema. The original binding has been split into two files: adi,adv7511.yaml for ADV7511/11W/13 and adi,adv7533.yaml for ADV7533/35. Signed-off-by: Ricardo Cañuelo Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210615131333.2272473-4-ricardo.canuelo@collabora.com commit 1fc4f5238d9680c7889cbd56c3c6a8ddd1f74d5c Author: Kishon Vijay Abraham I Date: Thu Jun 3 19:04:50 2021 +0530 dt-bindings: PCI: ti,am65: Convert PCIe host/endpoint mode dt-bindings to YAML Convert PCIe host/endpoint mode dt-bindings for TI's AM65/Keystone SoC to YAML binding. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210603133450.24710-1-kishon@ti.com Signed-off-by: Rob Herring commit 4cb9d648f669c4e31bec4447c98553c65079681b Merge: 114bacc75c218 f3babad47e0db Author: Mark Brown Date: Thu Jun 17 15:27:24 2021 +0100 Merge series "ASoC: stm32: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang : Use devm_platform_get_and_ioremap_resource() to simplify code. Yang Yingliang (3): ASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource() ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource() ASoC: stm32: spdifrx: Use devm_platform_get_and_ioremap_resource() sound/soc/stm/stm32_i2s.c | 3 +-- sound/soc/stm/stm32_sai_sub.c | 3 +-- sound/soc/stm/stm32_spdifrx.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) -- 2.25.1 commit c485f7e9863c4483f5d2e9a8da622b52d110d866 Author: Takashi Iwai Date: Thu Jun 17 15:47:42 2021 +0200 ALSA: seq: oss: Fix error check at system port creation The system port creation in ALSA OSS sequencer was wrongly checked against to the port number that can be never negative. The error code should be checked rather against the ioctl call. This patch corrects the error check. Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/20210617134742.6321-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5f4ce26078fde9cd406c008ba35e31bbb26a23a1 Author: Rafael J. Wysocki Date: Thu Jun 17 15:57:07 2021 +0200 ACPI: scan: Fix race related to dropping dependencies If acpi_add_single_object() runs concurrently with respect to acpi_scan_clear_dep() which deletes a dependencies list entry where the device being added is the consumer, the device's dep_unmet counter may not be updated to reflect that change. Namely, if the dependencies list entry is deleted right after calling acpi_scan_dep_init() and before calling acpi_device_add(), acpi_scan_clear_dep() will not find the device object corresponding to the consumer device ACPI handle and it will not update its dep_unmet counter to reflect the deletion of the list entry. Consequently, the dep_unmet counter of the device will never become zero going forward which may prevent it from being completely enumerated. To address this problem, modify acpi_add_single_object() to run acpi_tie_acpi_dev(), to attach the ACPI device object created by it to the corresponding ACPI namespace node, under acpi_dep_list_lock along with acpi_scan_dep_init() whenever the latter is called. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit c6a493a1b603ed216ce69d1faac3f0ddc6a2f8eb Author: Rafael J. Wysocki Date: Wed Jun 16 16:24:30 2021 +0200 ACPI: scan: Reorganize acpi_device_add() Move the invocation of acpi_attach_data() in acpi_device_add() into a separate function. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit dc612486c91983a113adefedac030575ea7a4c4a Author: Rafael J. Wysocki Date: Wed Jun 16 16:23:44 2021 +0200 ACPI: scan: Fix device object rescan in acpi_scan_clear_dep() In general, acpi_bus_attach() can only be run safely under acpi_scan_lock, but that lock cannot be acquired under acpi_dep_list_lock, so make acpi_scan_clear_dep() schedule deferred execution of acpi_bus_attach() under acpi_scan_lock instead of calling it directly. This also fixes a possible race between acpi_scan_clear_dep() and device removal that might cause a device object that went away to be accessed, because acpi_scan_clear_dep() is changed to acquire a reference on the consumer device object. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit aff0dbd03d3b750e2331f7cb93e01fe25ed27086 Author: Rafael J. Wysocki Date: Wed Jun 16 16:22:50 2021 +0200 ACPI: scan: Make acpi_walk_dep_device_list() Because acpi_walk_dep_device_list() is only called by the code in the file in which it is defined, make it static, drop the export of it and drop its header from acpi.h. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit ad4d451e14e58792e9b7c8a4bfc3276f0128e94a Author: Rafael J. Wysocki Date: Wed Jun 16 16:21:51 2021 +0200 ACPI: scan: Rearrange acpi_dev_get_first_consumer_dev_cb() Make acpi_dev_get_first_consumer_dev_cb() a bit more straightforward and rewrite the comment in it. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit 2d0795148a5a7dd33999daf600eb6fdeffabd6ba Author: Rafael J. Wysocki Date: Wed Jun 16 16:06:52 2021 +0200 ACPI: scan: Define acpi_bus_put_acpi_device() as static inline Since acpi_bus_put_acpi_device() is a synonym for acpi_dev_put(), define it as static inline in analogy with the latter. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko commit 8cf486e131b351db4f224078bef8e1efedcf0340 Author: Wesley Sheng Date: Wed Jun 16 13:25:08 2021 +0800 nvme.h: add missing nvme_lba_range_type endianness annotations Signed-off-by: Wesley Sheng Signed-off-by: Christoph Hellwig commit cc72c4426764d1716839e9ec591ee8e161ed5cbc Author: Chaitanya Kulkarni Date: Wed Jun 16 15:15:52 2021 -0700 nvme: remove zeroout memset call for struct Declare and initialize structure variables to zero values so that we can remove zeroout memset calls in the host/core.c. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f66e2804d61aef690bb428d8de6a127f844bb240 Author: Chaitanya Kulkarni Date: Wed Jun 16 15:15:53 2021 -0700 nvme-pci: remove zeroout memset call for struct Declare and initialize structure variables to zero values so that we can remove zeroout memset calls in the host/pci.c. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 8abd7e2a753ad5ae59c3ca918e71f437c0c4b344 Author: Chaitanya Kulkarni Date: Wed Jun 16 15:15:51 2021 -0700 nvmet: remove zeroout memset call for struct Declare and initialize structure variables to zero values so that we can remove zeroout memset calls in the target/rdma.c. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit aaf2e048af2704da5869f27b508b288f36d5c7b7 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:32:52 2021 -0700 nvmet: add ZBD over ZNS backend support NVMe TP 4053 – Zoned Namespaces (ZNS) allows host software to communicate with a non-volatile memory subsystem using zones for NVMe protocol-based controllers. NVMeOF already support the ZNS NVMe Protocol compliant devices on the target in the passthru mode. There are generic zoned block devices like Shingled Magnetic Recording (SMR) HDDs that are not based on the NVMe protocol. This patch adds ZNS backend support for non-ZNS zoned block devices as NVMeOF targets. This support includes implementing the new command set NVME_CSI_ZNS, adding different command handlers for ZNS command set such as NVMe Identify Controller, NVMe Identify Namespace, NVMe Zone Append, NVMe Zone Management Send and NVMe Zone Management Receive. With the new command set identifier, we also update the target command effects logs to reflect the ZNS compliant commands. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit ab5d0b38c0475d6ff59f1a6ccf7c668b9ec2e0a4 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:32:51 2021 -0700 nvmet: add Command Set Identifier support NVMe TP 4056 allows controllers to support different command sets. NVMeoF target currently only supports namespaces that contain traditional logical blocks that may be randomly read and written. In some applications there is a value in exposing namespaces that contain logical blocks that have special access rules (e.g. sequentially write required namespace such as Zoned Namespace (ZNS)). In order to support the Zoned Block Devices (ZBD) backend, controllers need to have support for ZNS Command Set Identifier (CSI). In this preparation patch, we adjust the code such that it can now support the default command set identifier. We update the namespace data structure to store the CSI value which defaults to NVME_CSI_NVM that represents traditional logical blocks namespace type. The CSI support is required to implement the ZBD backend for NVMeOF with host side NVMe ZNS interface, since ZNS commands belong to the different command set than the default one. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 9a01b58c22ccabd00e990e9dc01c2de5865d6e4d Author: Chaitanya Kulkarni Date: Wed Jun 9 18:32:50 2021 -0700 nvmet: add nvmet_req_bio put helper for backends In current code there exists two backends which are using inline bio optimization, that adds a duplicate code for freeing the bio. For Zoned Block Device backend we also use the same optimzation and it will lead to having duplicate code in the three backends: generic bdev, passsthru, and generic zns. Add a helper function to avoid duplicate code and update the respective backends. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit 6e597263f990a2db99e7380debc4044c38867971 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:32:49 2021 -0700 nvmet: add req cns error complete helper We report error and complete the request when identify cns value is not handled in nvmet_execute_identify(). This error reporting is also needed for Zone Block Device backend for NVMeOF target. Add a helper nvmet_req_cns_error_compplete() to report an error and complete the request when idenitfy command cns not handled value. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Signed-off-by: Christoph Hellwig commit c28a61471c5898e832c6e8634b2659249761b833 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:32:48 2021 -0700 block: export blk_next_bio() The block layer provides emulation of zone management operations targeting all zones of a zoned block device only for the zone reset operation (REQ_OP_ZONE_RESET). In order to correctly implement exporting of zoned block devices with NVMeOF, emulating zone management operations targeting all zones of a device is also necessary for the open, close and finish zone operations (REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH). Instead of duplicating the code, export the existing helper from block layer so we can use a bio chaining pattern that is present in the block layer for REQ_OP_ZONE RESET all emulation in the NVMeOF zoned block device backend. Reviewed-by: Damien Le Moal Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 7860569ad47f9fbd7c9f93a5c2b7d2a18e4af831 Author: Chaitanya Kulkarni Date: Sun Jun 13 18:58:51 2021 -0700 nvmet: remove local variable In function errno_to_nvme_status() we store the value of the NVMe status into the local variable and don't do anything useful with that but just return. Remove the local variable and return the value directly from switch. This also removed extra break statements. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 8bb6cb9b97ef0b0ae4a492db5a90f8156d2cbe85 Author: Chaitanya Kulkarni Date: Sun Jun 13 18:58:50 2021 -0700 nvmet: use nvme status value directly There is no point in keeping the status variable that is used only once in the function nvmet_async_events_failall(). Remove the variable and use the value directly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 245067e37d52185a741d269e658afee40d467287 Author: Chaitanya Kulkarni Date: Sun Jun 13 18:58:49 2021 -0700 nvmet: use u32 type for the local variable nsid In function nvmet_max_nsid() we calculate the max nsid by iterating over the XArray and store it in the variable nsid that has type of unsigned long. Since the value of this function is stored into the subsys->max_nsid which is of type u32, change the local variable nsid type and the return type of the same function to u32. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 86693c43bb01c2597b55ec2fac37214ed1094a49 Author: Chaitanya Kulkarni Date: Sun Jun 13 18:58:48 2021 -0700 nvmet: use u32 for nvmet_subsys max_nsid Use u32 type for the nsid_max member of the nvmet_subsys structure. This avoids the type confusion when updating the subsys->nax_nsid from ns->nsid. This also matches the nvmet_ns->nsid member. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f3dce2add3e1a06f4e16616408aa70bf2f7c8431 Author: Chaitanya Kulkarni Date: Sun Jun 13 18:58:47 2021 -0700 nvmet: use req->cmd directly in file-ns fast path The function nvmet_file_parse_io_cmd() is called from the fast path. The local variable to that function cmd is only used once. Remove the local variable and use req->cmd directly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 46eca4702d93dbb8ac1c8fa84e5838fc8a1e82a0 Author: Chaitanya Kulkarni Date: Sun Jun 13 18:58:46 2021 -0700 nvmet: use req->cmd directly in bdev-ns fast path The function nvmet_bdev_parse_io_cmd() is called from the fast path. The local variable to that function cmd is only used once. Remove the local variable and use req->cmd directly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 87fd4cc1c0dda038c9a3617c9d07d5159326e80f Author: Noam Gottlieb Date: Mon Jun 7 12:23:24 2021 +0300 nvmet: make ver stable once connection established Once some host has connected to the nvmf target, make sure that the version number is stable and cannot be changed. Signed-off-by: Max Gurtovoy Signed-off-by: Noam Gottlieb Signed-off-by: Christoph Hellwig commit 0d148efdf0f0414b2ed2dd9c31e71302bb9ce123 Author: Noam Gottlieb Date: Mon Jun 7 12:23:23 2021 +0300 nvmet: allow mn change if subsys not discovered Currently, once the subsystem's model_number is set for the first time there is no way to change it. However, as long as no connection was established to nvmf target, there is no reason for such restriction and we should allow to change the subsystem's model_number as many times as needed. In addition, in order to simplfy the changes and make the model number flow more similar to the rest of the attributes in the Identify Controller data structure, we set a default value for the model number at the initiation of the subsystem. Reviewed-by: Max Gurtovoy Signed-off-by: Noam Gottlieb Signed-off-by: Christoph Hellwig commit 7ae023c5aa644211bde26db11018fe08b8408bd5 Author: Noam Gottlieb Date: Mon Jun 7 12:23:22 2021 +0300 nvmet: make sn stable once connection was established Once some host has connected to the target, make sure that the serial number is stable and cannot be changed. Reviewed-by: Max Gurtovoy Signed-off-by: Noam Gottlieb Signed-off-by: Christoph Hellwig commit e13b061589ace0aee18bdbf86f3ddb2b6b5b5ab8 Author: Noam Gottlieb Date: Mon Jun 7 12:23:21 2021 +0300 nvmet: change sn size and check validity According to the NVM specification, the serial_number should be 20 bytes (bytes 23:04 of the Identify Controller data structure), and should contain only ASCII characters. In accordance, the serial_number size is changed to 20 bytes and before any attempt to store a new value in serial_number we check that the input is valid - i.e. contains only ASCII characters, is not empty and does not exceed 20 bytes. Signed-off-by: Max Gurtovoy Signed-off-by: Noam Gottlieb Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 2a4a910aa4f0acc428dc8d10227c42e14ed21d10 Author: Hannes Reinecke Date: Tue May 25 14:54:14 2021 +0200 nvmet-fc: do not check for invalid target port in nvmet_fc_handle_fcp_rqst() When parsing a request in nvmet_fc_handle_fcp_rqst() we should not check for invalid target ports; if we do the command is aborted from the fcp layer, causing the host to assume a transport error. Rather we should still forward this request to the nvmet layer, which will then correctly fail the command with an appropriate error status. Signed-off-by: Hannes Reinecke Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit eff4423ec0b03fedb8b7b420549ed8e424d246f1 Author: Chaitanya Kulkarni Date: Mon Jun 14 19:45:54 2021 -0700 nvme-fabrics: remove memset in connect io q Declare and initialize structure variable to the zero values so that we can get rid of the zeroout memset call. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit bfa9d1222d6185a4aea603ebc7d74d75c747087c Author: Chaitanya Kulkarni Date: Mon Jun 14 19:45:53 2021 -0700 nvme-fabrics: remove memset in connect admin q Declare and initialize structure variable to the zero values so that we can get rid of the zeroout memset call. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit c22c2720133d51d95da608a77cd703f29d29747e Author: Chaitanya Kulkarni Date: Mon Jun 14 19:45:52 2021 -0700 nvme-fabrics: remove memset in nvmf_reg_write32() Declare and initialize structure variable to the zero values so that we can get rid of the zeroout memset call. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 2796a8e409429a67daeb813ed270eb645f56f817 Author: Chaitanya Kulkarni Date: Mon Jun 14 19:45:51 2021 -0700 nvme-fabrics: remove memset in nvmf_reg_read64() Declare and initialize structure variable to the zero values so that we can get rid of the zeroout memset call. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 3b54064fbce73a4dada6019dd400f0ce28ab5eb9 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:28:26 2021 -0700 nvme-tcp: use ctrl sgl check helper Use the helper to check NVMe controller's SGL support. Reviewed-by: Sagi Grimberg Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 253a0b76a12a4cce14095b3d74004e67a6434d79 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:28:25 2021 -0700 nvme-pci: use ctrl sgl check helper Use the helper to check NVMe controller's SGL support. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit b61678bcd43c6686a6d0cf965934a54b4225821d Author: Chaitanya Kulkarni Date: Wed Jun 9 18:28:24 2021 -0700 nvme-fc: use ctrl sgl check helper Use the helper to check NVMe controller's SGL support. Reviewed-by: James Smart Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 73eefc270afa1f27d82c42fdb34562d07a834b40 Author: Chaitanya Kulkarni Date: Wed Jun 9 18:28:23 2021 -0700 nvme: add a helper to check ctrl sgl support For various transports such as fc/tcp/pci it is common to check if NVMe SGLs are supported or not by the controller. In this preparation patch we add a helper to avoid the open coding of such checks in the various transport. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit cb1b10e7ac6c1438247ee3c7e4a2f2332a77ba07 Author: Chaitanya Kulkarni Date: Mon Jun 7 12:54:54 2021 -0700 nvme-pci: remove trailing lines for helpers Remove the extra white line at the end of the functions. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit a0aac973a26d1ac814b9e131e209eb39472a67ce Author: JK Kim Date: Thu Jun 17 15:02:17 2021 +0900 nvme-pci: fix var. type for increasing cq_head nvmeq->cq_head is compared with nvmeq->q_depth and changed the value and cq_phase for handling the next cq db. but, nvmeq->q_depth's type is u32 and max. value is 0x10000 when CQP.MSQE is 0xffff and io_queue_depth is 0x10000. current temp. variable for comparing with nvmeq->q_depth is overflowed when previous nvmeq->cq_head is 0xffff. in this case, nvmeq->cq_phase is not updated. so, fix data type for temp. variable to u32. Signed-off-by: JK Kim Signed-off-by: Christoph Hellwig commit 03026197bb657d784220b040c6173267a0375741 Author: Jing Xiangfeng Date: Thu Jun 17 15:32:26 2021 +0800 usb: typec: Add the missed altmode_id_remove() in typec_register_altmode() typec_register_altmode() misses to call altmode_id_remove() in an error path. Add the missed function call to fix it. Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes") Cc: stable Acked-by: Heikki Krogerus Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20210617073226.47599-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2b537cf877eae6d2f2f102052290676e40b74a1d Author: Kyle Tso Date: Wed Jun 16 17:01:02 2021 +0800 usb: typec: tcpm: Relax disconnect threshold during power negotiation If the voltage is being decreased in power negotiation, the Source will set the power supply to operate at the new voltage level before sending PS_RDY. Relax the threshold before sending Request Message so that it will not race with Source which begins to adjust the voltage right after it sends Accept Message (PPS) or tSrcTransition (25~35ms) after it sends Accept Message (non-PPS). The real threshold will be set after Sink receives PS_RDY Message. Fixes: f321a02caebd ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support") Cc: stable Cc: Badhri Jagan Sridharan Reviewed-by: Badhri Jagan Sridharan Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210616090102.1897674-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit fed09e0bf9f0622a54f3963f959d914fa817f8a6 Author: Kyle Tso Date: Wed Jun 16 01:32:06 2021 +0800 usb: typec: tcpm: Ignore Vsafe0v in PR_SWAP_SNK_SRC_SOURCE_ON state In PR_SWAP_SNK_SRC_SOURCE_ON state, Vsafe0v is expected as well so do nothing here to avoid state machine going into SNK_UNATTACHED. Fixes: 28b43d3d746b ("usb: typec: tcpm: Introduce vsafe0v for vbus") Cc: stable Reviewed-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210615173206.1646477-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 4288debeaa4e21d8dd5132739ffba2d343892bbf Author: Badhri Jagan Sridharan Date: Tue Jun 15 10:43:23 2021 -0700 usb: typec: tcpci: Fix up sink disconnect thresholds for PD "Table 4-3 VBUS Sink Characteristics" of "Type-C Cable and Connector Specification" defines the disconnect voltage thresholds of various configurations. This change fixes the disconnect threshold voltage calculation based on vSinkPD_min and vSinkDisconnectPD as defined by the table. Fixes: e1a97bf80a022 ("usb: typec: tcpci: Implement Auto discharge disconnect callbacks") Cc: stable Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210615174323.1160132-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 73f3d9453dfda055aff6e5ffde37f7ee625c3f38 Author: Colin Ian King Date: Thu Jun 17 12:26:38 2021 +0100 USB: UDC: net2280: remove redundant continue statement The continue statement at the end of a for-loop has no effect, remove it. Signed-off-by: Colin Ian King Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210617112638.9072-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit d6963f22da2ed9c1778be28e87b4453b51be921f Author: Colin Ian King Date: Thu Jun 17 13:38:26 2021 +0100 usb: host: u132-hcd: remove redundant continue statements There are continue statements at the end of loops that have no effect and are redundant. Remove them. Signed-off-by: Colin Ian King Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210617123826.13764-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 0da518dae87dd18e5f23e406e15575f393e4a97c Author: Colin Ian King Date: Mon Dec 7 15:51:06 2020 +0000 ixp4xx: fix spelling mistake in Kconfig "Devce" -> "Device" There is spelling mistake in the prompt text in the Kconfig. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij commit b80e60eb8ecc77e479ed19a70d1b9e86f0fcc2ca Author: Linus Walleij Date: Tue May 11 15:04:21 2021 +0200 hw_random: ixp4xx: Add OF support This makes the hardware random number generator found in the IXP46x SoCs probe from the device tree. Cc: Deepak Saxena Acked-by: Herbert Xu Signed-off-by: Linus Walleij commit cca061b04c0de4c8a0b2cfcdf534ab0a566178c3 Author: Linus Walleij Date: Tue May 11 15:06:40 2021 +0200 hw_random: ixp4xx: Add DT bindings This adds device tree bindings for the simple random number generator found in the IXP46x SoCs. Cc: Deepak Saxena Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit 854a004305c202d85e2536459187bc7ab5edef31 Author: Linus Walleij Date: Tue May 11 14:15:42 2021 +0200 hw_random: ixp4xx: Turn into a module Instead of just initializing always, which will invariably create problems on multiplatform builds, turn this driver into a module and pass a resource with the memory location. The device only exist on the IXP46x so we only register the device for the IXP46x SoC. Cc: Deepak Saxena Acked-by: Herbert Xu Signed-off-by: Linus Walleij commit 479dfb6d56020548161ecfd3ba0b3770ac5f4bc2 Author: Linus Walleij Date: Tue May 11 12:08:40 2021 +0200 hw_random: ixp4xx: Use SPDX license tag This switches the IXP4xx hardware random driver to use the SPDX type license tag. Cc: Deepak Saxena Acked-by: Herbert Xu Signed-off-by: Linus Walleij commit 478d2dae73309fbc761891b46a110392ab28c922 Author: Arnd Bergmann Date: Sun Aug 25 22:20:54 2019 +0200 hw_random: ixp4xx: enable compile-testing The driver is almost portable already, it just needs to include the new header for the cpu definition. Cc: Deepak Saxena Acked-by: Herbert Xu Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij commit 55712627bffd666c9f25eb23c15c55ec85e5a73f Author: Arnd Bergmann Date: Sun Aug 25 22:14:01 2019 +0200 pata: ixp4xx: split platform data to its own header Portable drivers cannot use mach/platform.h, so move the structure into its own header. With this, compile testing can be enabled. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij commit 09aa9aabdcc4966270b031816a16d4641fb45dfa Author: Arnd Bergmann Date: Sun Aug 25 21:57:25 2019 +0200 soc: ixp4xx: move cpu detection to linux/soc/ixp4xx/cpu.h Generic drivers are unable to use the feature macros from mach/cpu.h or the feature bits from mach/hardware.h, so move these into a global header file along with some dummy helpers that list these features as disabled elsewhere. Cc: David S. Miller Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij commit e56621580755d40551f3fae5766907ae1c24d1fc Author: Yang Yingliang Date: Wed Jun 16 12:45:19 2021 +0800 usb: host: xhci-tegra: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616044519.2183826-3-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit ec03554f980f917e0491aa8532aabedc9c080639 Author: Yang Yingliang Date: Wed Jun 16 12:45:18 2021 +0800 usb: host: xhci-tegra: Add missing of_node_put() in tegra_xusb_probe() This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. Fixes: 971ee247060d ("usb: xhci: tegra: Enable ELPG for runtime/system PM") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616044519.2183826-2-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9ea90e9fadb6cffb383ee23b132c36a88ee69019 Author: Yang Yingliang Date: Wed Jun 16 12:45:17 2021 +0800 usb: host: xhci-tegra: add missing put_device() in tegra_xusb_probe() Goto put_padctl to put refcount of device on error in tegra_xusb_probe() Fixes: 971ee247060d ("usb: xhci: tegra: Enable ELPG for runtime/system PM") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616044519.2183826-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit d143825baf15f204dac60acdf95e428182aa3374 Author: Moritz Fischer Date: Tue Jun 15 08:37:58 2021 -0700 usb: renesas-xhci: Fix handling of unknown ROM state The ROM load sometimes seems to return an unknown status (RENESAS_ROM_STATUS_NO_RESULT) instead of success / fail. If the ROM load indeed failed this leads to failures when trying to communicate with the controller later on. Attempt to load firmware using RAM load in those cases. Fixes: 2478be82de44 ("usb: renesas-xhci: Add ROM loader for uPD720201") Cc: stable@vger.kernel.org Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: Vinod Koul Tested-by: Vinod Koul Reviewed-by: Vinod Koul Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210615153758.253572-1-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit f2c6d6b271e44ccc738a8966cb65ba68b56bde59 Author: Marcin Wojtas Date: Mon Mar 22 01:39:15 2021 +0100 arm64: dts: ensure backward compatibility of the AP807 Xenon A recent switch to a dedicated AP807 compatible string for the Xenon SD/MMC controller result in the driver not being probed when using updated device tree with the older kernel revisions. It may also be problematic for other OSs/firmware that use Linux device tree sources as a reference. Resolve the problem with backward compatibility by restoring a previous compatible string as secondary one. Signed-off-by: Marcin Wojtas Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 3a52a48973b355b3aac5add92ef50650ae37c2bd Author: Pali Rohár Date: Thu May 20 13:38:44 2021 +0200 arm64: dts: marvell: armada-37xx: move firmware node to generic dtsi file Move the turris-mox-rwtm firmware node from Turris MOX' device tree into the generic armada-37xx.dtsi file and use the generic compatible string 'marvell,armada-3700-rwtm-firmware' instead of the current one. Turris MOX DTS file contains also old compatible string for backward compatibility. The Turris MOX rWTM firmware can be used on any Armada 37xx device, giving them access to the rWTM hardware random number generator, which is otherwise unavailable. This change allows Linux to load the turris-mox-rwtm.ko module on these boards. Tested on ESPRESSObin v5 with both default Marvell WTMI firmware and CZ.NIC's firmware. With default WTMI firmware the turris-mox-rwtm fails to probe, while with CZ.NIC's firmware it registers the HW random number generator. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 90ae47215de3fec862aeb1a0f0e28bb505ab1351 Author: Pali Rohár Date: Thu May 20 13:38:43 2021 +0200 firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string Add more generic compatible string 'marvell,armada-3700-rwtm-firmware' for this driver, since it can also be used on other Armada 3720 devices. Current compatible string 'cznic,turris-mox-rwtm' is kept for backward compatibility. Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit fae20160992269431507708fb74c1fd9f3c309c1 Author: Pali Rohár Date: Thu May 20 13:35:20 2021 +0200 firmware: turris-mox-rwtm: show message about HWRNG registration Currently it is hard to determinate if on Armada 3720 device is HWRNG by running kernel accessible or not. So print information message into dmesg when HWRNG is available and registration was successful. Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 2eab59cf0d2036a5a9e264f719b71c21ccf679c2 Author: Pali Rohár Date: Thu May 20 13:35:19 2021 +0200 firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng When Marvell's rWTM firmware, which does not support the GET_RANDOM command, is used, kernel prints an error message hwrng: no data available every 10 seconds. Fail probing of this driver if the rWTM firmware does not support the GET_RANDOM command. Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Pali Rohár Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 476ad3ff8952db3569a77d9ed4a067c5f0f4b733 Author: Nobuhiro Iwamatsu Date: Sat Jun 5 09:29:31 2021 +0900 spi: xilinx: convert to yaml Convert SPI for Xilinx bindings documentation to YAML schemas. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210605002931.858031-1-iwamatsu@nigauri.org Signed-off-by: Mark Brown commit aa7968682a2b8a9cecf1d7d07e1c8ae8c08d211e Author: Nobuhiro Iwamatsu Date: Sat Jun 5 09:38:11 2021 +0900 spi: convert Cadence SPI bindings to YAML Convert spi for Cadence SPI bindings documentation to YAML. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210605003811.858676-1-iwamatsu@nigauri.org Signed-off-by: Mark Brown commit 72f99888944c44de1c899bbe44db1e53bdc9d994 Author: Marek Behún Date: Thu May 20 13:35:18 2021 +0200 firmware: turris-mox-rwtm: report failures better Report a notice level message if a command is not supported by the rWTM firmware. This should not be an error, merely a notice, because the firmware can be used on boards that do not have manufacturing information burned. Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit e34e60253d9272311831daed8a2d967cf80ca3dc Author: Marek Behún Date: Thu May 20 13:35:17 2021 +0200 firmware: turris-mox-rwtm: fix reply status decoding function The status decoding function mox_get_status() currently contains an incorrect check: if the error status is not MBOX_STS_SUCCESS, it always returns -EIO, so the comparison to MBOX_STS_FAIL is never executed and we don't get the actual error code sent by the firmware. Fix this. Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Andrew Lunn Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver") Signed-off-by: Gregory CLEMENT commit 114bacc75c2189a6ed7ee208545e8d6777c94aec Author: Yang Yingliang Date: Thu Jun 17 11:29:00 2021 +0800 ASoC: spear: spdif_out: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617032900.600124-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 19b71456f3684f8dba078619a31afab05ee47c3a Author: Yang Yingliang Date: Thu Jun 17 11:32:37 2021 +0800 ASoC: sprd: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617033237.605808-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 7d3865a10b9ff2669c531d5ddd60bf46b3d48f1e Author: Zhen Lei Date: Thu Jun 17 18:37:29 2021 +0800 ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing() When devm_kcalloc() fails, the error code -ENOMEM should be returned instead of -EINVAL. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210617103729.1918-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown commit 06e6d9044022e1be17757b2db5826115bc634868 Author: Yang Yingliang Date: Thu Jun 17 11:39:03 2021 +0800 ASoC: sti: sti_uniperif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617033903.613727-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit f3babad47e0db3daec301975b46de5bfadc15dd4 Author: Yang Yingliang Date: Thu Jun 17 12:38:47 2021 +0800 ASoC: stm32: spdifrx: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617043847.1113092-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 003ee640abaeeaa7d11f931e5bb86bdc4becb594 Author: Yang Yingliang Date: Thu Jun 17 12:38:46 2021 +0800 ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617043847.1113092-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 2f1776691978dfab30717548ffec0f3fa4ad0981 Author: Yang Yingliang Date: Thu Jun 17 12:38:45 2021 +0800 ASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210617043847.1113092-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d7a188bb87d8da78a1ef0dea53f1639f3daf0790 Author: Wei Yongjun Date: Tue Jun 15 17:21:57 2021 +0000 ACPI: PRM: make symbol 'prm_module_list' static The sparse tool complains as follows: drivers/acpi/prmt.c:53:1: warning: symbol 'prm_module_list' was not declared. Should it be static? This symbol is not used outside of prmt.c, so marks it static. Fixes: cefc7ca46235 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Rafael J. Wysocki commit 120f4aa80b4cac2ae082666114a36c6c363b9df2 Author: Baokun Li Date: Tue Jun 15 15:43:17 2021 +0800 ACPI: NVS: fix doc warnings in nvs.c Fixes the following W=1 kernel build warning(s): drivers/acpi/nvs.c:94: warning: Function parameter or member 'start' not described in 'suspend_nvs_register' drivers/acpi/nvs.c:94: warning: Function parameter or member 'size' not described in 'suspend_nvs_register' Signed-off-by: Baokun Li [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 6f2f92c6ae4261c6c3dc00a0397f70fa0ac267fb Author: Baokun Li Date: Tue Jun 15 15:19:14 2021 +0800 ACPI: sysfs: fix doc warnings in device_sysfs.c Fixes the following W=1 kernel build warning(s): drivers/acpi/device_sysfs.c:278: warning: Function parameter or member 'dev' not described in 'acpi_device_uevent_modalias' drivers/acpi/device_sysfs.c:278: warning: Function parameter or member 'env' not described in 'acpi_device_uevent_modalias' drivers/acpi/device_sysfs.c:323: warning: Function parameter or member 'dev' not described in 'acpi_device_modalias' drivers/acpi/device_sysfs.c:323: warning: Function parameter or member 'buf' not described in 'acpi_device_modalias' drivers/acpi/device_sysfs.c:323: warning: Function parameter or member 'size' not described in 'acpi_device_modalias' Signed-off-by: Baokun Li [ rjw: Fix spelling: acpi -> ACPI ] Signed-off-by: Rafael J. Wysocki commit 795e0e38de2c36561a4f14e6e97b8a82f6f2e03c Author: Wan Jiabing Date: Tue Jun 15 19:49:20 2021 +0800 cpuidle: teo: remove unneeded semicolon in teo_select() Fix following coccicheck warning: drivers/cpuidle/governors/teo.c:315:10-11: Unneeded semicolon Signed-off-by: Wan Jiabing Signed-off-by: Rafael J. Wysocki commit 5471eea5d3bf850316f1064a6f57b34c444bce67 Author: Kan Liang Date: Mon Jun 14 10:59:42 2021 -0700 perf/x86: Reset the dirty counter to prevent the leak for an RDPMC task The counter value of a perf task may leak to another RDPMC task. For example, a perf stat task as below is running on CPU 0. perf stat -e 'branches,cycles' -- taskset -c 0 ./workload In the meantime, an RDPMC task, which is also running on CPU 0, may read the GP counters periodically. (The RDPMC task creates a fixed event, but read four GP counters.) $./rdpmc_read_all_counters index 0x0 value 0x8001e5970f99 index 0x1 value 0x8005d750edb6 index 0x2 value 0x0 index 0x3 value 0x0 index 0x0 value 0x8002358e48a5 index 0x1 value 0x8006bd1e3bc9 index 0x2 value 0x0 index 0x3 value 0x0 It is a potential security issue. Once the attacker knows what the other thread is counting. The PerfMon counter can be used as a side-channel to attack cryptosystems. The counter value of the perf stat task leaks to the RDPMC task because perf never clears the counter when it's stopped. Three methods were considered to address the issue. - Unconditionally reset the counter in x86_pmu_del(). It can bring extra overhead even when there is no RDPMC task running. - Only reset the un-assigned dirty counters when the RDPMC task is scheduled in via sched_task(). It fails for the below case. Thread A Thread B clone(CLONE_THREAD) ---> set_affine(0) set_affine(1) while (!event-enabled) ; event = perf_event_open() mmap(event) ioctl(event, IOC_ENABLE); ---> RDPMC Counters are still leaked to the thread B. - Only reset the un-assigned dirty counters before updating the CR4.PCE bit. The method is implemented here. The dirty counter is a counter, on which the assigned event has been deleted, but the counter is not reset. To track the dirty counters, add a 'dirty' variable in the struct cpu_hw_events. The security issue can only be found with an RDPMC task. To enable the RDMPC, the CR4.PCE bit has to be updated. Add a perf_clear_dirty_counters() right before updating the CR4.PCE bit to clear the existing dirty counters. Only the current un-assigned dirty counters are reset, because the RDPMC assigned dirty counters will be updated soon. After applying the patch, $ ./rdpmc_read_all_counters index 0x0 value 0x0 index 0x1 value 0x0 index 0x2 value 0x0 index 0x3 value 0x0 index 0x0 value 0x0 index 0x1 value 0x0 index 0x2 value 0x0 index 0x3 value 0x0 Performance The performance of a context switch only be impacted when there are two or more perf users and one of the users must be an RDPMC user. In other cases, there is no performance impact. The worst-case occurs when there are two users: the RDPMC user only uses one counter; while the other user uses all available counters. When the RDPMC task is scheduled in, all the counters, other than the RDPMC assigned one, have to be reset. Test results for the worst-case, using a modified lat_ctx as measured on an Ice Lake platform, which has 8 GP and 3 FP counters (ignoring SLOTS). lat_ctx -s 128K -N 1000 processes 2 Without the patch: The context switch time is 4.97 us With the patch: The context switch time is 5.16 us There is ~4% performance drop for the context switching time in the worst-case. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1623693582-187370-1-git-send-email-kan.liang@linux.intel.com commit 94aafc3ee31dc199d1078ffac9edd976b7f47b3d Author: Peter Zijlstra Date: Tue Jun 15 12:16:11 2021 +0100 sched/fair: Age the average idle time This is a partial forward-port of Peter Ziljstra's work first posted at: https://lore.kernel.org/lkml/20180530142236.667774973@infradead.org/ Currently select_idle_cpu()'s proportional scheme uses the average idle time *for when we are idle*, that is temporally challenged. When a CPU is not at all idle, we'll happily continue using whatever value we did see when the CPU goes idle. To fix this, introduce a separate average idle and age it (the existing value still makes sense for things like new-idle balancing, which happens when we do go idle). The overall goal is to not spend more time scanning for idle CPUs than we're idle for. Otherwise we're inhibiting work. This means that we need to consider the cost over all the wake-ups between consecutive idle periods. To track this, the scan cost is subtracted from the estimated average idle time. The impact of this patch is related to workloads that have domains that are fully busy or overloaded. Without the patch, the scan depth may be too high because a CPU is not reaching idle. Due to the nature of the patch, this is a regression magnet. It potentially wins when domains are almost fully busy or overloaded -- at that point searches are likely to fail but idle is not being aged as CPUs are active so search depth is too large and useless. It will potentially show regressions when there are idle CPUs and a deep search is beneficial. This tbench result on a 2-socket broadwell machine partially illustates the problem 5.13.0-rc2 5.13.0-rc2 vanilla sched-avgidle-v1r5 Hmean 1 445.02 ( 0.00%) 451.36 * 1.42%* Hmean 2 830.69 ( 0.00%) 846.03 * 1.85%* Hmean 4 1350.80 ( 0.00%) 1505.56 * 11.46%* Hmean 8 2888.88 ( 0.00%) 2586.40 * -10.47%* Hmean 16 5248.18 ( 0.00%) 5305.26 * 1.09%* Hmean 32 8914.03 ( 0.00%) 9191.35 * 3.11%* Hmean 64 10663.10 ( 0.00%) 10192.65 * -4.41%* Hmean 128 18043.89 ( 0.00%) 18478.92 * 2.41%* Hmean 256 16530.89 ( 0.00%) 17637.16 * 6.69%* Hmean 320 16451.13 ( 0.00%) 17270.97 * 4.98%* Note that 8 was a regression point where a deeper search would have helped but it gains for high thread counts when searches are useless. Hackbench is a more extreme example although not perfect as the tasks idle rapidly hackbench-process-pipes 5.13.0-rc2 5.13.0-rc2 vanilla sched-avgidle-v1r5 Amean 1 0.3950 ( 0.00%) 0.3887 ( 1.60%) Amean 4 0.9450 ( 0.00%) 0.9677 ( -2.40%) Amean 7 1.4737 ( 0.00%) 1.4890 ( -1.04%) Amean 12 2.3507 ( 0.00%) 2.3360 * 0.62%* Amean 21 4.0807 ( 0.00%) 4.0993 * -0.46%* Amean 30 5.6820 ( 0.00%) 5.7510 * -1.21%* Amean 48 8.7913 ( 0.00%) 8.7383 ( 0.60%) Amean 79 14.3880 ( 0.00%) 13.9343 * 3.15%* Amean 110 21.2233 ( 0.00%) 19.4263 * 8.47%* Amean 141 28.2930 ( 0.00%) 25.1003 * 11.28%* Amean 172 34.7570 ( 0.00%) 30.7527 * 11.52%* Amean 203 41.0083 ( 0.00%) 36.4267 * 11.17%* Amean 234 47.7133 ( 0.00%) 42.0623 * 11.84%* Amean 265 53.0353 ( 0.00%) 47.7720 * 9.92%* Amean 296 60.0170 ( 0.00%) 53.4273 * 10.98%* Stddev 1 0.0052 ( 0.00%) 0.0025 ( 51.57%) Stddev 4 0.0357 ( 0.00%) 0.0370 ( -3.75%) Stddev 7 0.0190 ( 0.00%) 0.0298 ( -56.64%) Stddev 12 0.0064 ( 0.00%) 0.0095 ( -48.38%) Stddev 21 0.0065 ( 0.00%) 0.0097 ( -49.28%) Stddev 30 0.0185 ( 0.00%) 0.0295 ( -59.54%) Stddev 48 0.0559 ( 0.00%) 0.0168 ( 69.92%) Stddev 79 0.1559 ( 0.00%) 0.0278 ( 82.17%) Stddev 110 1.1728 ( 0.00%) 0.0532 ( 95.47%) Stddev 141 0.7867 ( 0.00%) 0.0968 ( 87.69%) Stddev 172 1.0255 ( 0.00%) 0.0420 ( 95.91%) Stddev 203 0.8106 ( 0.00%) 0.1384 ( 82.92%) Stddev 234 1.1949 ( 0.00%) 0.1328 ( 88.89%) Stddev 265 0.9231 ( 0.00%) 0.0820 ( 91.11%) Stddev 296 1.0456 ( 0.00%) 0.1327 ( 87.31%) Again, higher thread counts benefit and the standard deviation shows that results are also a lot more stable when the idle time is aged. The patch potentially matters when a socket was multiple LLCs as the maximum search depth is lower. However, some of the test results were suspiciously good (e.g. specjbb2005 gaining 50% on a Zen1 machine) and other results were not dramatically different to other mcahines. Given the nature of the patch, Peter's full series is not being forward ported as each part should stand on its own. Preferably they would be merged at different times to reduce the risk of false bisections. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210615111611.GH30378@techsingularity.net commit 8f1b971b4750e83e8fbd2f91a9efd4a38ad0ae51 Author: Lukasz Luba Date: Mon Jun 14 20:12:38 2021 +0100 sched/cpufreq: Consider reduced CPU capacity in energy calculation Energy Aware Scheduling (EAS) needs to predict the decisions made by SchedUtil. The map_util_freq() exists to do that. There are corner cases where the max allowed frequency might be reduced (due to thermal). SchedUtil as a CPUFreq governor, is aware of that but EAS is not. This patch aims to address it. SchedUtil stores the maximum allowed frequency in 'sugov_policy::next_freq' field. EAS has to predict that value, which is the real used frequency. That value is made after a call to cpufreq_driver_resolve_freq() which clamps to the CPUFreq policy limits. In the existing code EAS is not able to predict that real frequency. This leads to energy estimation errors. To avoid wrong energy estimation in EAS (due to frequency miss prediction) make sure that the step which calculates Performance Domain frequency, is also aware of the allowed CPU capacity. Furthermore, modify map_util_freq() to not extend the frequency value. Instead, use map_util_perf() to extend the util value in both places: SchedUtil and EAS, but for EAS clamp it to max allowed CPU capacity. In the end, we achieve the same desirable behavior for both subsystems and alignment in regards to the real CPU frequency. Signed-off-by: Lukasz Luba Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rafael J. Wysocki (For the schedutil part) Link: https://lore.kernel.org/r/20210614191238.23224-1-lukasz.luba@arm.com commit 489f16459e0008c7a5c4c5af34bd80898aa82c2d Author: Lukasz Luba Date: Mon Jun 14 20:11:28 2021 +0100 sched/fair: Take thermal pressure into account while estimating energy Energy Aware Scheduling (EAS) needs to be able to predict the frequency requests made by the SchedUtil governor to properly estimate energy used in the future. It has to take into account CPUs utilization and forecast Performance Domain (PD) frequency. There is a corner case when the max allowed frequency might be reduced due to thermal. SchedUtil is aware of that reduced frequency, so it should be taken into account also in EAS estimations. SchedUtil, as a CPUFreq governor, knows the maximum allowed frequency of a CPU, thanks to cpufreq_driver_resolve_freq() and internal clamping to 'policy::max'. SchedUtil is responsible to respect that upper limit while setting the frequency through CPUFreq drivers. This effective frequency is stored internally in 'sugov_policy::next_freq' and EAS has to predict that value. In the existing code the raw value of arch_scale_cpu_capacity() is used for clamping the returned CPU utilization from effective_cpu_util(). This patch fixes issue with too big single CPU utilization, by introducing clamping to the allowed CPU capacity. The allowed CPU capacity is a CPU capacity reduced by thermal pressure raw value. Thanks to knowledge about allowed CPU capacity, we don't get too big value for a single CPU utilization, which is then added to the util sum. The util sum is used as a source of information for estimating whole PD energy. To avoid wrong energy estimation in EAS (due to capped frequency), make sure that the calculation of util sum is aware of allowed CPU capacity. This thermal pressure might be visible in scenarios where the CPUs are not heavily loaded, but some other component (like GPU) drastically reduced available power budget and increased the SoC temperature. Thus, we still use EAS for task placement and CPUs are not over-utilized. Signed-off-by: Lukasz Luba Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20210614191128.22735-1-lukasz.luba@arm.com commit 2ad8ccc17d1e4270cf65a3f2a07a7534aa23e3fb Author: Lukasz Luba Date: Mon Jun 14 20:10:30 2021 +0100 thermal/cpufreq_cooling: Update offline CPUs per-cpu thermal_pressure The thermal pressure signal gives information to the scheduler about reduced CPU capacity due to thermal. It is based on a value stored in a per-cpu 'thermal_pressure' variable. The online CPUs will get the new value there, while the offline won't. Unfortunately, when the CPU is back online, the value read from per-cpu variable might be wrong (stale data). This might affect the scheduler decisions, since it sees the CPU capacity differently than what is actually available. Fix it by making sure that all online+offline CPUs would get the proper value in their per-cpu variable when thermal framework sets capping. Fixes: f12e4f66ab6a3 ("thermal/cpu-cooling: Update thermal pressure in case of a maximum frequency capping") Signed-off-by: Lukasz Luba Signed-off-by: Peter Zijlstra (Intel) Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20210614191030.22241-1-lukasz.luba@arm.com commit 83c5e9d573e1f0757f324d01adb6ee77b49c3f0e Author: Dietmar Eggemann Date: Tue Jun 1 10:36:16 2021 +0200 sched/fair: Return early from update_tg_cfs_load() if delta == 0 In case the _avg delta is 0 there is no need to update se's _avg (level n) nor cfs_rq's _avg (level n-1). These values stay the same. Since cfs_rq's _avg isn't changed, i.e. no load is propagated down, cfs_rq's _sum should stay the same as well. So bail out after se's _sum has been updated. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20210601083616.804229-1-dietmar.eggemann@arm.com commit 9e077b52d86ac364a295b05c916c7478a16865b2 Author: Vincent Guittot Date: Tue Jun 1 17:53:28 2021 +0200 sched/pelt: Check that *_avg are null when *_sum are Check that we never break the rule that pelt's avg values are null if pelt's sum are. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Acked-by: Odin Ugedal Link: https://lore.kernel.org/r/20210601155328.19487-1-vincent.guittot@linaro.org commit ccb5ecdc2ddeaff744ee075b54cdff8a689e8fa7 Author: Xiaofei Tan Date: Fri Jun 11 20:37:07 2021 +0800 ACPI: APEI: fix synchronous external aborts in user-mode Before commit 8fcc4ae6faf8 ("arm64: acpi: Make apei_claim_sea() synchronise with APEI's irq work"), do_sea() would unconditionally signal the affected task from the arch code. Since that change, the GHES driver sends the signals. This exposes a problem as errors the GHES driver doesn't understand or doesn't handle effectively are silently ignored. It will cause the errors get taken again, and circulate endlessly. User-space task get stuck in this loop. Existing firmware on Kunpeng9xx systems reports cache errors with the 'ARM Processor Error' CPER records. Do memory failure handling for ARM Processor Error Section just like for Memory Error Section. Fixes: 8fcc4ae6faf8 ("arm64: acpi: Make apei_claim_sea() synchronise with APEI's irq work") Signed-off-by: Xiaofei Tan Reviewed-by: James Morse [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 91812dd0937cc6457e85f7733813c701ee971da5 Author: Lee Jones Date: Thu Jun 17 12:05:00 2021 +0100 bus: fsl-mc: mc-io: Correct misdocumentation of 'dpmcp_dev' param Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/mc-io.c:70: warning: Function parameter or member 'dpmcp_dev' not described in 'fsl_create_mc_io' Cc: Stuart Yoder Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b4fa2e831fd7b4707ad64544a23d4ec48315dc4d Author: Lee Jones Date: Thu Jun 17 12:04:59 2021 +0100 bus: fsl-mc-msi: Fix a little doc-rot pertaining to 'np' to 'fwnode' conversion Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/fsl-mc-msi.c:164: warning: Function parameter or member 'fwnode' not described in 'fsl_mc_msi_create_irq_domain' drivers/bus/fsl-mc/fsl-mc-msi.c:164: warning: Excess function parameter 'np' description in 'fsl_mc_msi_create_irq_domain' Cc: Stuart Yoder Cc: German Rivera Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 07fbbf2ae0a36149d431a9f2a464d769b9f5af8c Author: Lee Jones Date: Thu Jun 17 12:04:58 2021 +0100 bus: fsl-mc: fsl-mc-allocator: Fix misspelling of 'new_mc_adev' and demote non-kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/fsl-mc-allocator.c:271: warning: Function parameter or member 'new_mc_adev' not described in 'fsl_mc_object_allocate' drivers/bus/fsl-mc/fsl-mc-allocator.c:271: warning: Excess function parameter 'new_mc_dev' description in 'fsl_mc_object_allocate' drivers/bus/fsl-mc/fsl-mc-allocator.c:417: warning: Function parameter or member 'mc_bus_dev' not described in 'fsl_mc_cleanup_irq_pool' drivers/bus/fsl-mc/fsl-mc-allocator.c:417: warning: expecting prototype for Teardown the interrupt pool associated with an fsl(). Prototype was for fsl_mc_cleanup_irq_pool() instead drivers/bus/fsl-mc/fsl-mc-allocator.c:443: warning: Function parameter or member 'mc_dev' not described in 'fsl_mc_allocate_irqs' drivers/bus/fsl-mc/fsl-mc-allocator.c:443: warning: expecting prototype for Allocate the IRQs required by a given fsl(). Prototype was for fsl_mc_allocate_irqs() instead drivers/bus/fsl-mc/fsl-mc-allocator.c:586: warning: Function parameter or member 'mc_dev' not described in 'fsl_mc_allocator_probe' drivers/bus/fsl-mc/fsl-mc-allocator.c:618: warning: Function parameter or member 'mc_dev' not described in 'fsl_mc_allocator_remove' Cc: Stuart Yoder Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5907c72c8de0dc11c192074776b7a451ec812254 Author: Lee Jones Date: Thu Jun 17 12:04:57 2021 +0100 bus: fsl-mc: dprc-driver: Fix some missing/incorrect function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/dprc-driver.c:360: warning: Function parameter or member 'alloc_interrupts' not described in 'dprc_scan_container' drivers/bus/fsl-mc/dprc-driver.c:383: warning: Function parameter or member 'irq_num' not described in 'dprc_irq0_handler' drivers/bus/fsl-mc/dprc-driver.c:383: warning: Excess function parameter 'irq' description in 'dprc_irq0_handler' drivers/bus/fsl-mc/dprc-driver.c:394: warning: Function parameter or member 'irq_num' not described in 'dprc_irq0_handler_thread' drivers/bus/fsl-mc/dprc-driver.c:394: warning: Excess function parameter 'irq' description in 'dprc_irq0_handler_thread' Cc: Stuart Yoder Cc: German Rivera Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4c36624711b1f39ccc73a0614a9fc92a39ca2de8 Author: Lee Jones Date: Thu Jun 17 12:04:56 2021 +0100 bus: fsl-mc: dprc: Fix a couple of misspelling and formatting issues Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/dprc.c:345: warning: Function parameter or member 'attr' not described in 'dprc_get_attributes' drivers/bus/fsl-mc/dprc.c:521: warning: Function parameter or member 'obj_type' not described in 'dprc_get_obj_region' Cc: Stuart Yoder Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d71b57dc075f97b798b92ce5f31e986cfa7f5757 Author: Lee Jones Date: Thu Jun 17 12:04:55 2021 +0100 bus: fsl-mc: fsl-mc-bus: Demote a bunch of non-conformant kernel-doc headers and help others Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/fsl-mc-bus.c:30: warning: expecting prototype for Default DMA mask for devices on a fsl(). Prototype was for FSL_MC_DEFAULT_DMA_MASK() instead drivers/bus/fsl-mc/fsl-mc-bus.c:45: warning: Function parameter or member 'fsl_mc_regs' not described in 'fsl_mc' drivers/bus/fsl-mc/fsl-mc-bus.c:124: warning: Function parameter or member 'dev' not described in 'fsl_mc_bus_uevent' drivers/bus/fsl-mc/fsl-mc-bus.c:124: warning: Function parameter or member 'env' not described in 'fsl_mc_bus_uevent' drivers/bus/fsl-mc/fsl-mc-bus.c:480: warning: Function parameter or member 'mc_driver' not described in '__fsl_mc_driver_register' drivers/bus/fsl-mc/fsl-mc-bus.c:480: warning: Function parameter or member 'owner' not described in '__fsl_mc_driver_register' drivers/bus/fsl-mc/fsl-mc-bus.c:511: warning: Function parameter or member 'mc_driver' not described in 'fsl_mc_driver_unregister' drivers/bus/fsl-mc/fsl-mc-bus.c:571: warning: Function parameter or member 'dev' not described in 'fsl_mc_get_root_dprc' drivers/bus/fsl-mc/fsl-mc-bus.c:571: warning: Function parameter or member 'root_dprc_dev' not described in 'fsl_mc_get_root_dprc' drivers/bus/fsl-mc/fsl-mc-bus.c:739: warning: Function parameter or member 'dev' not described in 'fsl_mc_is_root_dprc' drivers/bus/fsl-mc/fsl-mc-bus.c:767: warning: Function parameter or member 'obj_desc' not described in 'fsl_mc_device_add' drivers/bus/fsl-mc/fsl-mc-bus.c:767: warning: Function parameter or member 'mc_io' not described in 'fsl_mc_device_add' drivers/bus/fsl-mc/fsl-mc-bus.c:767: warning: Function parameter or member 'parent_dev' not described in 'fsl_mc_device_add' drivers/bus/fsl-mc/fsl-mc-bus.c:767: warning: Function parameter or member 'new_mc_dev' not described in 'fsl_mc_device_add' drivers/bus/fsl-mc/fsl-mc-bus.c:767: warning: expecting prototype for Add a newly discovered fsl(). Prototype was for fsl_mc_device_add() instead drivers/bus/fsl-mc/fsl-mc-bus.c:1066: warning: Function parameter or member 'pdev' not described in 'fsl_mc_bus_probe' drivers/bus/fsl-mc/fsl-mc-bus.c:1190: warning: Function parameter or member 'pdev' not described in 'fsl_mc_bus_remove' Cc: Stuart Yoder Cc: German Rivera Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 33c6527a07ed881e8f2da829656afe74a34e2fa0 Author: Lee Jones Date: Thu Jun 17 12:04:54 2021 +0100 bus: fsl-mc: mc-sys: Supply missing function names in kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/mc-sys.c:20: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/bus/fsl-mc/mc-sys.c:151: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/bus/fsl-mc/mc-sys.c:197: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/bus/fsl-mc/mc-sys.c:237: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Stuart Yoder Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 337c756345754f8b92b5e12f5ac8fadb7f83e732 Author: Lee Jones Date: Thu Jun 17 12:04:53 2021 +0100 bus: fsl-mc: mc-io: Supply function names for 'fsl_create_mc_io()' and 'fsl_destroy_mc_io()' Fixes the following W=1 kernel build warning(s): drivers/bus/fsl-mc/mc-io.c:53: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/bus/fsl-mc/mc-io.c:126: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Stuart Yoder Reviewed-by: Laurentiu Tudor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210617110500.15907-1-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 87ee8de23c9df3a368504f34cf3d7f9be9207717 Author: Matti Vaittinen Date: Tue Jun 8 13:10:53 2021 +0300 extcon: extcon-max8997: Simplify driver using devm Simplify driver by switching to use the resource managed IRQ requesting and resource managed work-queue initialization. Signed-off-by: Matti Vaittinen Reviewed-by: Hans de Goede Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/61190cc280a63baeb05ec570282bb3677bee8e7b.1623146580.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Hans de Goede commit 610bdc04830a864115e6928fc944f1171dfff6f3 Author: Matti Vaittinen Date: Tue Jun 8 13:10:31 2021 +0300 extcon: extcon-max8997: Fix IRQ freeing at error path If reading MAX8997_MUIC_REG_STATUS1 fails at probe the driver exits without freeing the requested IRQs. Free the IRQs prior returning if reading the status fails. Fixes: 3e34c8198960 ("extcon: max8997: Avoid forcing UART path on drive probe") Signed-off-by: Matti Vaittinen Reviewed-by: Hans de Goede Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/27ee4a48ee775c3f8c9d90459c18b6f2b15edc76.1623146580.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Hans de Goede commit 74047eaa2281982853afa144463ebe18d49022f2 Author: Matti Vaittinen Date: Tue Jun 8 13:10:11 2021 +0300 extcon: extcon-max77693.c: Fix potential work-queue cancellation race The extcon IRQ schedules a work item. IRQ is requested using devm while WQ is cancelld at remove(). This mixing of devm and manual unwinding has potential case where the WQ has been emptied (.remove() was ran) but devm unwinding of IRQ was not yet done. It may be possible the IRQ is triggered at this point scheduling new work item to the already flushed queue. According to the input documentation the input device allocated by devm_input_allocate_device() does not need to be explicitly unregistered. Use the new devm_work_autocancel() and remove the remove() to simplify the code. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Reviewed-by: Hans de Goede Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/cbe8205eed8276f6e6db5003cfe51b8b0d4ac966.1623146580.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Hans de Goede commit f0000797a3862eba99d06e65be846317c1ccbd8e Author: Jonathan Cameron Date: Fri Jun 11 15:22:57 2021 +0100 hwmon: (ntc_thermistor) Drop unused headers. The IIO usage in this driver is purely consumer so it should only be including linux/iio/consumer.h Whilst here drop pm_runtime.h as there is no runtime power management in the driver. Found using include-what-you-use and manual inspection of the suggestions. Signed-off-by: Jonathan Cameron Cc: Guenter Roeck Link: https://lore.kernel.org/r/20210611142257.103094-1-jic23@kernel.org Signed-off-by: Guenter Roeck commit c5679f3e702ce6b7d3d0d95b5a7e2e4b5c780006 Author: Robert Marko Date: Wed Jun 9 11:59:23 2021 -0700 MAINTAINERS: Add Delta DPS920AB PSU driver Add maintainers entry for the Delta DPS920AB PSU driver. Signed-off-by: Robert Marko Signed-off-by: Guenter Roeck commit 8b1d61cd47ccea482a3f68c99d7358e3daea35fa Author: Robert Marko Date: Mon Jun 7 12:34:30 2021 +0200 dt-bindings: trivial-devices: Add Delta DPS920AB Add trivial device entry for Delta DPS920AB PSU. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210607103431.2039073-2-robert.marko@sartura.hr Signed-off-by: Guenter Roeck commit 3efbcee8d4029795fa0a1ef90dc5b9ea763ed207 Author: Robert Marko Date: Mon Jun 7 12:34:29 2021 +0200 hwmon: (pmbus) Add driver for Delta DPS-920AB PSU This adds support for the Delta DPS-920AB PSU. Only missing feature is fan control which the PSU supports. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210607103431.2039073-1-robert.marko@sartura.hr [groeck: Add MODULE_IMPORT_NS(PMBUS);] Signed-off-by: Guenter Roeck commit bf8e0cd8d6b2c9be365ea53d36e9368f07880a2f Author: Erik Rosen Date: Wed Jun 9 11:32:09 2021 +0200 hwmon: (pmbus/pim4328) Add documentation for the pim4328 PMBus driver Add documentation and index link for pim4328 PMBus driver. Signed-off-by: Erik Rosen Signed-off-by: Guenter Roeck commit 317f9d808a7a0dad28eba10d96527f536ff28347 Author: Erik Rosen Date: Wed Jun 9 11:32:08 2021 +0200 hwmon: (pmbus/pim4328) Add PMBus driver for PIM4006, PIM4328 and PIM4820 Add hardware monitoring support for Flex power interface modules PIM4006, PIM4328 and PIM4820. Signed-off-by: Erik Rosen Signed-off-by: Guenter Roeck commit 5e86f128d9eb44b19e311e5a1e50452344fd5628 Author: Erik Rosen Date: Wed Jun 9 11:32:07 2021 +0200 hwmon: (pmbus) Allow phase function even if it's not on page Allow the use of a phase function even if it does not exist on the associated page. Signed-off-by: Erik Rosen Signed-off-by: Guenter Roeck commit e8e00c83a268d5b7d2f5bd490c2269c1ede76a07 Author: Erik Rosen Date: Wed Jun 9 11:32:06 2021 +0200 hwmon: (pmbus) Add support for reading direct mode coefficients Add support for reading and decoding direct format coefficients to the PMBus core driver. If the new flag PMBUS_USE_COEFFICIENTS_CMD is set, the driver will use the COEFFICIENTS register together with the information in the pmbus_sensor_attr structs to initialize relevant coefficients for the direct mode format. Signed-off-by: Erik Rosen [groeck: Initialize ret with -EINVAL in pmbus_init_coefficients()] Signed-off-by: Guenter Roeck commit dbc0860f7a3d43604c380822a456d26ef6f70a06 Author: Erik Rosen Date: Wed Jun 9 11:32:05 2021 +0200 hwmon: (pmbus) Add new pmbus flag NO_WRITE_PROTECT Some PMBus chips respond with invalid data when reading the WRITE_PROTECT register. For such chips, this flag should be set so that the PMBus core driver doesn't use the WRITE_PROTECT command to determine its behavior. Signed-off-by: Erik Rosen Signed-off-by: Guenter Roeck commit ff53b77e1e1bc9fd21e087e37a8444e8559d8d36 Author: Mauro Carvalho Chehab Date: Sat Jun 5 15:18:21 2021 +0200 docs: hwmon: adm1177.rst: avoid using ReSt :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/32b0db7e79a3ed0e817213113c607a1b819e3867.1622898327.git.mchehab+huawei@kernel.org Signed-off-by: Guenter Roeck commit 4e5418f787ec56d7fe3c6efee486b8f508c58baf Author: Madhava Reddy Siddareddygari Date: Sat Jun 5 07:27:02 2021 +0200 hwmon: (pmbus_core) Check adapter PEC support Currently, for Packet Error Checking (PEC) only the controller is checked for support. This causes problems on the cisco-8000 platform where a SMBUS transaction errors are observed. This is because PEC has to be enabled only if both controller and adapter support it. Added code to check PEC capability for adapter and enable it only if both controller and adapter supports PEC. Signed-off-by: Madhava Reddy Siddareddygari [Upstream from SONiC https://github.com/Azure/sonic-linux-kernel/pull/215] Signed-off-by: Paul Menzel Link: https://lore.kernel.org/r/20210605052700.541455-1-pmenzel@molgen.mpg.de [groeck: Dropped unnecessary continuation line] Signed-off-by: Guenter Roeck commit 6b6af85410cf2db95d39ad9aa1d812a35eb1651e Author: Ninad Malwade Date: Fri Jun 4 14:54:43 2021 +0800 hwmon: (ina3221) use CVRF only for single-shot conversion As per current logic the wait time per conversion is arouns 430ms for 512 samples and around 860ms for 1024 samples for 3 channels considering 140us as the bus voltage and shunt voltage sampling conversion time. This waiting time is a lot for the continuous mode and even for the single shot mode. For continuous mode when moving average is considered the waiting for CVRF bit is not required and the data from the previous conversion is sufficuent. As mentioned in the datasheet the conversion ready bit is provided to help coordinate single-shot conversions, we can restrict the use to single-shot mode only. Also, the conversion time is for the averaged samples, the wait time for the polling can omit the number of samples consideration. Signed-off-by: Ninad Malwade Link: https://lore.kernel.org/r/1622789683-30931-1-git-send-email-nmalwade@nvidia.com Signed-off-by: Guenter Roeck commit 1814c4e84de2a89d1c2e1e9bbd241240561075a4 Author: Guenter Roeck Date: Wed May 26 08:40:21 2021 -0700 hwmon: (max31790) Detect and report zero fan speed If a fan is not running or not connected, of if fan monitoring is disabled, the fan count register returns a fixed value of 0xffe0. So far this is then translated to a RPM value larger than 0. Since this is misleading and does not really make much sense, report a fan RPM of 0 in this situation. Cc: Jan Kundrát Cc: Václav Kubernát Signed-off-by: Guenter Roeck Tested-by: Václav Kubernát Link: https://lore.kernel.org/r/20210526154022.3223012-7-linux@roeck-us.net commit 2013607b85f03ff24a5a19933705905a1b324a31 Author: Guenter Roeck Date: Wed May 26 08:40:20 2021 -0700 hwmon: (max31790) Clear fan fault after reporting it Fault bits in MAX31790 are sticky and have to be cleared explicitly. A write operation into either the 'Target Duty Cycle' register or the 'Target Count' register is necessary to clear a fault. At the same time, we can never clear cached fault status values before reading them because the companion fault status for any given fan is cleared as well when clearing a fault. Cc: Jan Kundrát Cc: Václav Kubernát Signed-off-by: Guenter Roeck Tested-by: Václav Kubernát Link: https://lore.kernel.org/r/20210526154022.3223012-6-linux@roeck-us.net commit 148c847c9e5a54b99850617bf9c143af9a344f92 Author: Guenter Roeck Date: Wed May 26 08:40:18 2021 -0700 hwmon: (max31790) Fix pwmX_enable attributes pwmX_enable supports three possible values: 0: Fan control disabled. Duty cycle is fixed to 0% 1: Fan control enabled, pwm mode. Duty cycle is determined by values written into Target Duty Cycle registers. 2: Fan control enabled, rpm mode Duty cycle is adjusted such that fan speed matches the values in Target Count registers The current code does not do this; instead, it mixes pwm control configuration with fan speed monitoring configuration. Worse, it reports that pwm control would be disabled (pwmX_enable==0) when it is in fact enabled in pwm mode. Part of the problem may be that the chip sets the "TACH input enable" bit on its own whenever the mode bit is set to RPM mode, but that doesn't mean that "TACH input enable" accurately reflects the pwm mode. Fix it up and only handle pwm control with the pwmX_enable attributes. In the documentation, clarify that disabling pwm control (pwmX_enable=0) sets the pwm duty cycle to 0%. In the code, explain why TACH_INPUT_EN is set together with RPM_MODE. While at it, only update the configuration register if the configuration has changed, and only update the cached configuration if updating the chip configuration was successful. Cc: Jan Kundrát Cc: Václav Kubernát Signed-off-by: Guenter Roeck Tested-by: Václav Kubernát Reviewed-by: Jan Kundrát Link: https://lore.kernel.org/r/20210526154022.3223012-4-linux@roeck-us.net commit 897f6339893b741a5d68ae8e2475df65946041c2 Author: Guenter Roeck Date: Wed May 26 08:40:17 2021 -0700 hwmon: (max31790) Report correct current pwm duty cycles The MAX31790 has two sets of registers for pwm duty cycles, one to request a duty cycle and one to read the actual current duty cycle. Both do not have to be the same. When reporting the pwm duty cycle to the user, the actual pwm duty cycle from pwm duty cycle registers needs to be reported. When setting it, the pwm target duty cycle needs to be written. Since we don't know the actual pwm duty cycle after a target pwm duty cycle has been written, set the valid flag to false to indicate that actual pwm duty cycle should be read from the chip instead of using cached values. Cc: Jan Kundrát Cc: Václav Kubernát Signed-off-by: Guenter Roeck Tested-by: Václav Kubernát Reviewed-by: Jan Kundrát Link: https://lore.kernel.org/r/20210526154022.3223012-3-linux@roeck-us.net commit cbbf244f0515af3472084f22b6213121b4a63835 Author: Guenter Roeck Date: Wed May 26 08:40:16 2021 -0700 hwmon: (max31790) Fix fan speed reporting for fan7..12 Fans 7..12 do not have their own set of configuration registers. So far the code ignored that and read beyond the end of the configuration register range to get the tachometer period. This resulted in more or less random fan speed values for those fans. The datasheet is quite vague when it comes to defining the tachometer period for fans 7..12. Experiments confirm that the period is the same for both fans associated with a given set of configuration registers. Fixes: 54187ff9d766 ("hwmon: (max31790) Convert to use new hwmon registration API") Fixes: 195a4b4298a7 ("hwmon: Driver for Maxim MAX31790") Cc: Jan Kundrát Reviewed-by: Jan Kundrát Cc: Václav Kubernát Reviewed-by: Jan Kundrát Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210526154022.3223012-2-linux@roeck-us.net commit 07c6621a37352e38b4ad9addaba473ad90fbfe5e Author: Joe Perches Date: Sat May 29 02:13:52 2021 -0700 hwmon: (sht4x) Fix sht4x_read_values return value Kernel doc for sht4x_read_values() shows 0 on success, 1 on failure but the return value on success is actually always positive as it is set to SHT4X_RESPONSE_LENGTH by a successful call to i2c_master_recv(). Miscellanea: o Update the kernel doc for sht4x_read_values to 0 for success or -ERRNO o Remove incorrectly used kernel doc /** header for other _read functions o Typo fix succesfull->successful o Reverse a test to unindent a block and use goto unlock o Declare cmd[SHT4X_CMD_LEN] rather than cmd[] At least for gcc 10.2, object size is reduced a tiny bit. $ size drivers/hwmon/sht4x.o* text data bss dec hex filename 1752 404 256 2412 96c drivers/hwmon/sht4x.o.new 1825 404 256 2485 9b5 drivers/hwmon/sht4x.o.old Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/60eedce497137eb34448c0c77e01ec9d9c972ad7.camel@perches.com Reviewed by: Navin Sankar Velliangiri Signed-off-by: Guenter Roeck commit 505c2549373f3aa9ee16493f872e57876ffb70b1 Author: Navin Sankar Velliangiri Date: Mon May 24 19:50:38 2021 +0530 hwmon: Add sht4x Temperature and Humidity Sensor Driver This patch adds a hwmon driver for the SHT4x Temperature and Humidity sensor. Signed-off-by: Navin Sankar Velliangiri [groeck: dropped unnecessary empty line and continuation lines] Signed-off-by: Guenter Roeck commit f20f7363e7e1d24defc27b1cb814071791a535b0 Author: Fabio Estevam Date: Fri May 21 14:22:18 2021 -0300 docs: hwmon: Add an entry for mp2888 The entry for mp2888 is missing and it causes the following 'make htmldocs' build warning: Documentation/hwmon/mp2888.rst: WARNING: document isn't included in any toctree Add the mp2888 entry. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210521172218.37592-1-festevam@gmail.com Signed-off-by: Guenter Roeck commit 9da9c2dc57b2fa2e65521894cb66df4bf615214d Author: Chu Lin Date: Wed May 12 17:10:43 2021 +0000 hwmon: (adm1275) enable adm1272 temperature reporting adm1272 supports temperature reporting but it is disabled by default. Tested: ls temp1_* temp1_crit temp1_highest temp1_max temp1_crit_alarm temp1_input temp1_max_alarm cat temp1_input 26642 Signed-off-by: Chu Lin Link: https://lore.kernel.org/r/20210512171043.2433694-1-linchuyuan@google.com [groeck: Updated subject to reflect correct driver] Signed-off-by: Guenter Roeck commit 9abfb52b502889f1528316cf0b7d4116d40abebe Author: Vadim Pasternak Date: Tue May 11 08:56:19 2021 +0300 dt-bindings: Add MP2888 voltage regulator device Monolithic Power Systems, Inc. (MPS) dual-loop, digital, multi-phase controller. Signed-off-by: Vadim Pasternak Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210511055619.118104-4-vadimp@nvidia.com Signed-off-by: Guenter Roeck commit e4db7719d037b820024a213f74703ae1abf5b00c Author: Vadim Pasternak Date: Tue May 11 08:56:18 2021 +0300 hwmon: (pmbus) Add support for MPS Multi-phase mp2888 controller Add support for mp2888 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a digital, multi-phase, pulse-width modulation controller. This device supports: - One power rail. - Programmable Multi-Phase up to 10 Phases. - PWM-VID Interface - One pages 0 for telemetry. - Programmable pins for PMBus Address. - Built-In EEPROM to Store Custom Configurations. - Can configured VOUT readout in direct or VID format and allows setting of different formats on rails 1 and 2. For VID the following protocols are available: VR13 mode with 5-mV DAC; VR13 mode with 10-mV DAC, IMVP9 mode with 5-mV DAC. Signed-off-by: Vadim Pasternak Reported-by: kernel test robot Link: https://lore.kernel.org/r/20210511055619.118104-3-vadimp@nvidia.com [groeck: Add MODULE_IMPORT_NS] Signed-off-by: Guenter Roeck commit 0c1acde1d3d0032814be89c838483471582bc32e Author: Vadim Pasternak Date: Tue May 11 08:56:17 2021 +0300 hwmon: (pmbus) Increase maximum number of phases per page Increase maximum number of phases from 8 to 10 to support multi-phase devices allowing up to 10 phases. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20210511055619.118104-2-vadimp@nvidia.com Signed-off-by: Guenter Roeck commit 4943c6039d4ac1ae8535786da7c2a28c376c589c Author: Zhen Lei Date: Tue May 11 17:18:43 2021 +0800 hwmon: (bt1-pvt) Remove redundant error printing in pvt_request_regs() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210511091843.4561-1-thunder.leizhen@huawei.com Signed-off-by: Guenter Roeck commit ea541c185c358f870ccb0d5fce6f726c5146daae Author: Erik Rosen Date: Fri May 7 21:40:23 2021 +0200 hwmon: (pmbus) Add support for additional Flex BMR converters to pmbus Add support for Flex BMR310, BMR456, BMR457, BMR458, BMR480, BMR490, BMR491 and BMR492 to the pmbus driver Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210507194023.61138-4-erik.rosen@metormote.com [groeck: Fixed minor whitespace error] Signed-off-by: Guenter Roeck commit b976760dc4efd1de7965bf020195a22fce4f456c Author: Erik Rosen Date: Fri May 7 21:40:22 2021 +0200 hwmon: (pmbus) Add documentation for new flags Add documentation for the new pmbus flags PMBUS_WRITE_PROTECTED, PMBUS_NO_CAPABILITY and PMBUS_READ_STATUS_AFTER_FAILED_CHECK Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210507194023.61138-3-erik.rosen@metormote.com [groeck: Added newline at end of file] Signed-off-by: Guenter Roeck commit 86c908d90fb17273f5f6d15539ad3d7bf134d892 Author: Erik Rosen Date: Fri May 7 21:40:21 2021 +0200 hwmon: (pmbus) Add new flag PMBUS_READ_STATUS_AFTER_FAILED_CHECK Some PMBus chips end up in an undefined state when trying to read an unsupported register. For such chips, it is necessary to reset the chip pmbus controller to a known state after a failed register check. This can be done by reading a known register. By setting this flag the driver will try to read the STATUS register after each failed register check. This read may fail, but it will put the chip into a known state. Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210507194023.61138-2-erik.rosen@metormote.com Signed-off-by: Guenter Roeck commit 14ad76825f00b1471a7ec2eff30528d21ee2772b Author: Matti Vaittinen Date: Tue Jun 8 13:09:55 2021 +0300 extcon: extcon-max14577: Fix potential work-queue cancellation race The extcon IRQ schedules a work item. IRQ is requested using devm while WQ is cancelld at remove(). This mixing of devm and manual unwinding has potential case where the WQ has been emptied (.remove() was ran) but devm unwinding of IRQ was not yet done. It is possible the IRQ is triggered at this point scheduling new work item to the already flushed queue. Use new devm_work_autocancel() to remove the remove() and to kill the bug. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Reviewed-by: Hans de Goede Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/ee8545f59ae3a93f0a70f640ecbd7e31cfadbcb9.1623146580.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Hans de Goede commit 5c1c78e0a0a2f37de0b05851878af8e02eeae02f Author: Armin Wolf Date: Sat May 8 15:14:57 2021 +0200 hwmon: (sch56xx-common) Simplify sch56xx_device_add Use platform_device_register_simple() instead of manually calling platform_device_alloc()/platform_device_add(). Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20210508131457.12780-5-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Guenter Roeck commit 989c9c675bbbf3264b42b05e8924a9930b500e6c Author: Armin Wolf Date: Sat May 8 15:14:56 2021 +0200 hwmon: (sch56xx-common) Use helper function Use watchdog_set_nowayout() to process param setting and change param type to bool. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20210508131457.12780-4-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Guenter Roeck commit 6df5cba5c9e7bf98c114f15835d20dfd6c7898cf Author: Armin Wolf Date: Sat May 8 15:14:55 2021 +0200 hwmon: (sch56xx-common) Use strscpy strlcpy is considered deprecated. Replace it with strscpy. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20210508131457.12780-3-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Guenter Roeck commit 2be5f0d7532566d41194fe99d35d022ad399460d Author: Armin Wolf Date: Sat May 8 15:14:54 2021 +0200 hwmon: (sch56xx) Use devres functions for watchdog Use devm_kzalloc()/devm_watchdog_register() for watchdog registration since it allows us to remove the sch56xx_watchdog_data struct from the drivers own data structs. Remove sch56xx_watchdog_unregister since devres takes care of that now. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20210508131457.12780-2-W_Armin@gmx.de Reviewed-by: Hans de Goede [groeck: Dropped unnecessary return; at end of void function] Signed-off-by: Guenter Roeck commit ba9c5fc395de5bb642ed973dbf34c1d0c82d185d Author: Andy Shevchenko Date: Mon May 10 17:13:31 2021 +0300 hwmon: (lm70) Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510141331.56736-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck commit 97387c2f06bcfd79d04a848d35517b32ee6dca7c Author: Guenter Roeck Date: Sat May 8 09:50:25 2021 -0700 hwmon: (max31722) Remove non-standard ACPI device IDs Valid Maxim Integrated ACPI device IDs would start with MXIM, not with MAX1. On top of that, ACPI device IDs reflecting chip names are almost always invalid. Remove the invalid ACPI IDs. Fixes: 04e1e70afec6 ("hwmon: (max31722) Add support for MAX31722/MAX31723 temperature sensors") Signed-off-by: Guenter Roeck commit ac61c8aae446b9c0fe18981fe721d4a43e283ad6 Author: Guenter Roeck Date: Sat May 8 09:44:50 2021 -0700 hwmon: (lm70) Revert "hwmon: (lm70) Add support for ACPI" This reverts commit b58bd4c6dfe709646ed9efcbba2a70643f9bc873. None of the ACPI IDs introduced with the reverted patch is a valid ACPI device ID. Any ACPI users of this driver are advised to use PRP0001 and a devicetree-compatible device identification. Fixes: b58bd4c6dfe7 ("hwmon: (lm70) Add support for ACPI") Cc: Andrej Picej Signed-off-by: Guenter Roeck commit b3ea2fe7e2814d17426674eff3d440c4e9c3a107 Author: Mauro Carvalho Chehab Date: Mon May 10 12:26:17 2021 +0200 docs: hwmon: avoid using UTF-8 chars While UTF-8 characters can be used at the Linux documentation, the best is to use them only when ASCII doesn't offer a good replacement. So, replace the occurences of the following UTF-8 characters: - U+2010 ('‐'): HYPHEN - U+2013 ('–'): EN DASH - U+2019 ('’'): RIGHT SINGLE QUOTATION MARK Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ccdd1bf45963a7748188a97c75f667b37bd43d2f.1620641727.git.mchehab+huawei@kernel.org Signed-off-by: Guenter Roeck commit f0635523c8b57aea6b1b75e99ea9c86ccc2a8b45 Author: Mauro Carvalho Chehab Date: Sun May 16 12:18:18 2021 +0200 docs: hwmon: ir36021.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+2010 ('‐'): HYPHEN as ASCII HYPHEN is preferred over U+2010 Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ba8b5122ac9d4918fd966d0eb0a5ca9d89044b04.1621159997.git.mchehab+huawei@kernel.org Signed-off-by: Guenter Roeck commit 42c7fd53aeff8241d64cdcfaffe06bb955852112 Author: Robert Marko Date: Thu Apr 29 14:11:50 2021 +0200 dt-bindings: hwmon: Add Texas Instruments TMP1075 Document the DT compatible for TI TMP1075 which is a LM75 compatible sensor. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210429121150.106804-2-robert.marko@sartura.hr Acked-by: Rob Herring Signed-off-by: Guenter Roeck commit ec081f9154766be98b7be6e4c4483b580c5b12e7 Author: Robert Marko Date: Thu Apr 29 14:11:49 2021 +0200 hwmon: (lm75) Add TI TMP1075 support TI TMP1075 is a LM75 compatible sensor, so lets add support for it. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210429121150.106804-1-robert.marko@sartura.hr Signed-off-by: Guenter Roeck commit 6e954d2e649a373cdebb4d2b0de5197ca3f6b87e Author: Erik Rosen Date: Fri Apr 23 17:33:29 2021 +0200 hwmon: (pmbus/zl6100) Update documentation for zl6100 driver Update documentation for zl6100 driver and fix dead links to technical specifications Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210423153329.33457-3-erik.rosen@metormote.com Signed-off-by: Guenter Roeck commit ab9d85e9d5555c75992dc42bf3b9eebe0955ceb9 Author: Erik Rosen Date: Fri Apr 23 17:33:28 2021 +0200 hwmon: (pmbus/zl6100) Add support for ZLS1003, ZLS4009 and ZL8802 Add support for Renesas ZL8802 Dual Channel/Dual Phase PMBus DC/DC Digital Controller as well as ZLS1003 and ZLS4009 custom DC/DC controller chips. Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210423153329.33457-2-erik.rosen@metormote.com Signed-off-by: Guenter Roeck commit 6e9ef8ca687e69e9d4cc89033d98e06350b0f3e0 Author: Chris Packham Date: Wed Jun 16 15:42:18 2021 +1200 hwmon: (pmbus/bpa-rs600) Handle Vin readings >= 256V The BPA-RS600 doesn't follow the PMBus spec for linear data. Specifically it treats the mantissa as an unsigned 11-bit value instead of a two's complement 11-bit value. At this point it's unclear whether this only affects Vin or if Pin/Pout1 are affected as well. Erring on the side of caution only Vin is dealt with here. Fixes: 15b2703e5e02 ("hwmon: (pmbus) Add driver for BluTek BPA-RS600") Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20210616034218.25821-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 7a2c4cc537fa9f05fe90812e7d789b9faf7eb869 Author: Matti Vaittinen Date: Tue Jun 8 13:09:34 2021 +0300 devm-helpers: Add resource managed version of work init A few drivers which need a work-queue must cancel work at driver detach. Some of those implement remove() solely for this purpose. Help drivers to avoid unnecessary remove and error-branch implementation by adding managed verision of work initialization. This will also help drivers to avoid mixing manual and devm based unwinding when other resources are handled by devm. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/94ff4175e7f2ff134ed2fa7d6e7641005cc9784b.1623146580.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Hans de Goede commit 24700e1f41f0dcbe389b8d9e5830aaca2192093c Author: Daniel Scally Date: Thu Jun 3 23:40:07 2021 +0100 mfd: tps68470: Remove tps68470 MFD driver This driver only covered one scenario in which ACPI devices with _HID INT3472 are found, and its functionality has been taken over by the intel-skl-int3472 module, so remove it. Acked-by: Andy Shevchenko Acked-by: Lee Jones Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20210603224007.120560-7-djrscally@gmail.com Signed-off-by: Hans de Goede commit f20792d425d2efd2680f2855c1e3fec01c2e569e Author: Andrii Nakryiko Date: Wed Jun 16 21:14:46 2021 -0700 selftests/bpf: Fix selftests build with old system-wide headers migrate_reuseport.c selftest relies on having TCP_FASTOPEN_CONNECT defined in system-wide netinet/tcp.h. Selftests can use up-to-date uapi/linux/tcp.h, but that one doesn't have SOL_TCP. So instead of switching everything to uapi header, add #define for TCP_FASTOPEN_CONNECT to fix the build. Fixes: c9d0bdef89a6 ("bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Kuniyuki Iwashima Link: https://lore.kernel.org/bpf/20210617041446.425283-1-andrii@kernel.org commit 198bb646e8553e8abd8d83492a27b601ab97b75d Author: Jacopo Mondi Date: Wed Jun 16 14:46:16 2021 +0200 media: i2c: rdacm20: Re-work ov10635 reset The OV10635 image sensor embedded in the camera module is currently reset after the MAX9271 initialization with two long delays that were most probably not correctly characterized. Re-work the image sensor reset procedure by holding the chip in reset during the MAX9271 configuration, removing the long sleep delays and only wait after the chip exits from reset for 350-500 microseconds interval, which is larger than the minimum (2048 * (1 / XVCLK)) timeout characterized in the chip manual. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc36ef80ca2c68b2c9df06178048f08280e4334f Author: Takashi Sakamoto Date: Mon Jun 14 17:31:33 2021 +0900 ALSA: firewire-motu: fix stream format for MOTU 8pre FireWire My previous refactoring for ALSA firewire-motu driver brought regression to handle MOTU 8pre FireWire. The packet format is not operated correctly. Cc: Fixes: dfbaa4dc11eb ("ALSA: firewire-motu: add model-specific table of chunk count") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210614083133.39753-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 28131e9d933339a92f78e7ab6429f4aaaa07061c Author: Daniel Borkmann Date: Wed Jun 16 11:25:11 2021 +0200 bpf: Fix up register-based shifts in interpreter to silence KUBSAN syzbot reported a shift-out-of-bounds that KUBSAN observed in the interpreter: [...] UBSAN: shift-out-of-bounds in kernel/bpf/core.c:1420:2 shift exponent 255 is too large for 64-bit type 'long long unsigned int' CPU: 1 PID: 11097 Comm: syz-executor.4 Not tainted 5.12.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327 ___bpf_prog_run.cold+0x19/0x56c kernel/bpf/core.c:1420 __bpf_prog_run32+0x8f/0xd0 kernel/bpf/core.c:1735 bpf_dispatcher_nop_func include/linux/bpf.h:644 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:624 [inline] bpf_prog_run_clear_cb include/linux/filter.h:755 [inline] run_filter+0x1a1/0x470 net/packet/af_packet.c:2031 packet_rcv+0x313/0x13e0 net/packet/af_packet.c:2104 dev_queue_xmit_nit+0x7c2/0xa90 net/core/dev.c:2387 xmit_one net/core/dev.c:3588 [inline] dev_hard_start_xmit+0xad/0x920 net/core/dev.c:3609 __dev_queue_xmit+0x2121/0x2e00 net/core/dev.c:4182 __bpf_tx_skb net/core/filter.c:2116 [inline] __bpf_redirect_no_mac net/core/filter.c:2141 [inline] __bpf_redirect+0x548/0xc80 net/core/filter.c:2164 ____bpf_clone_redirect net/core/filter.c:2448 [inline] bpf_clone_redirect+0x2ae/0x420 net/core/filter.c:2420 ___bpf_prog_run+0x34e1/0x77d0 kernel/bpf/core.c:1523 __bpf_prog_run512+0x99/0xe0 kernel/bpf/core.c:1737 bpf_dispatcher_nop_func include/linux/bpf.h:644 [inline] bpf_test_run+0x3ed/0xc50 net/bpf/test_run.c:50 bpf_prog_test_run_skb+0xabc/0x1c50 net/bpf/test_run.c:582 bpf_prog_test_run kernel/bpf/syscall.c:3127 [inline] __do_sys_bpf+0x1ea9/0x4f00 kernel/bpf/syscall.c:4406 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae [...] Generally speaking, KUBSAN reports from the kernel should be fixed. However, in case of BPF, this particular report caused concerns since the large shift is not wrong from BPF point of view, just undefined. In the verifier, K-based shifts that are >= {64,32} (depending on the bitwidth of the instruction) are already rejected. The register-based cases were not given their content might not be known at verification time. Ideas such as verifier instruction rewrite with an additional AND instruction for the source register were brought up, but regularly rejected due to the additional runtime overhead they incur. As Edward Cree rightly put it: Shifts by more than insn bitness are legal in the BPF ISA; they are implementation-defined behaviour [of the underlying architecture], rather than UB, and have been made legal for performance reasons. Each of the JIT backends compiles the BPF shift operations to machine instructions which produce implementation-defined results in such a case; the resulting contents of the register may be arbitrary but program behaviour as a whole remains defined. Guard checks in the fast path (i.e. affecting JITted code) will thus not be accepted. The case of division by zero is not truly analogous here, as division instructions on many of the JIT-targeted architectures will raise a machine exception / fault on division by zero, whereas (to the best of my knowledge) none will do so on an out-of-bounds shift. Given the KUBSAN report only affects the BPF interpreter, but not JITs, one solution is to add the ANDs with 63 or 31 into ___bpf_prog_run(). That would make the shifts defined, and thus shuts up KUBSAN, and the compiler would optimize out the AND on any CPU that interprets the shift amounts modulo the width anyway (e.g., confirmed from disassembly that on x86-64 and arm64 the generated interpreter code is the same before and after this fix). The BPF interpreter is slow path, and most likely compiled out anyway as distros select BPF_JIT_ALWAYS_ON to avoid speculative execution of BPF instructions by the interpreter. Given the main argument was to avoid sacrificing performance, the fact that the AND is optimized away from compiler for mainstream archs helps as well as a solution moving forward. Also add a comment on LSH/RSH/ARSH translation for JIT authors to provide guidance when they see the ___bpf_prog_run() interpreter code and use it as a model for a new JIT backend. Reported-by: syzbot+bed360704c521841c85d@syzkaller.appspotmail.com Reported-by: Kurt Manucredo Signed-off-by: Eric Biggers Co-developed-by: Eric Biggers Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Tested-by: syzbot+bed360704c521841c85d@syzkaller.appspotmail.com Cc: Edward Cree Link: https://lore.kernel.org/bpf/0000000000008f912605bd30d5d7@google.com Link: https://lore.kernel.org/bpf/bac16d8d-c174-bdc4-91bd-bfa62b410190@gmail.com commit 47f8b8a2cfee45f2405527e225a566fe39f9d400 Author: Jacopo Mondi Date: Wed Jun 16 14:46:15 2021 +0200 media: i2c: rdacm20: Check return values The camera module initialization routine does not check the return value of a few functions. Fix that. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59a81c70b0b3563fe8426b0fe4d96263b6fa8823 Author: Jacopo Mondi Date: Wed Jun 16 14:46:14 2021 +0200 media: i2c: rdacm20: Report camera module name When the device is identified the driver currently reports the names of the chips embedded in the camera module. Report the name of the camera module itself instead. Cosmetic change only. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 09741de09bf8a05558c37b2bbd85ca8f516fb753 Author: Jacopo Mondi Date: Wed Jun 16 14:46:12 2021 +0200 media: i2c: rdacm20: Enable noise immunity Enable the noise immunity threshold at the end of the rdacm20 initialization routine. The rdacm20 camera module has been so far tested with a startup delay that allowed the embedded MCU to program the serializer. If the initialization routine is run before the MCU programs the serializer and the image sensor and their addresses gets changed by the rdacm20 driver it is required to manually enable the noise immunity threshold to make the communication on the control channel more reliable. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1524bb765d33a5b999b7af361e1e0fc9068b79d5 Author: Jacopo Mondi Date: Wed Jun 16 14:46:13 2021 +0200 media: i2c: rdacm20: Embed 'serializer' field There's no reason to allocate dynamically the 'serializer' field in the driver structure. Embed the field and adjust all its users in the driver. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7821b49345848246692c6e0aa170c8bc6723f86 Author: Linus Walleij Date: Mon May 3 00:09:20 2021 +0200 PCI: ixp4xx: Add a new driver for IXP4xx This adds a new PCI controller driver for the Intel IXP4xx (IX425, IXP435 etc), based on the XScale microarchitecture. This replaces the old driver in arch/arm/mach-ixp4xx/common-pci.c which utilized the ARM-specific BIOS32 PCI framework, and all parameterization for such things as memory and IO space as well as interrupt swizzling is done from the device tree. The plan is to phase out and delete the old driver piecemal. The __raw_writel() and __raw_readl() are used for accessing the PCI controller for the same reason that these accessors are used in the timer, IRQ and GPIO drivers: the platform will alter its address bus pattern based on whether the system is booted in big- or little-endian mode. For this reason all register on IXP4xx must always be accessed in native (CPU) endianness. This driver supports 64MB of PCI memory space, but not the indirect access of 1GB that is available in the old driver. We can address that later if and only if there are users that need all 1GB of PCI address space. Krzysztof reports having to use indirect MMIO only once for a VGA card. There is work ongoing for general indirect MMIO. (In practice the indirect MMIO is performed by writing address and writing and reading values into/from a controller register.) Tested by booting the NSLU2, attaching a USB stick, mounting and browsing the drive. Link: https://lore.kernel.org/linux-arm-kernel/m37edwuv8m.fsf@t19.piap.pl/ Cc: Arnd Bergmann Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: Zoltan HERPAI Cc: Raylynn Knight Acked-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann Acked-by: Lorenzo Pieralisi Signed-off-by: Linus Walleij commit aecc19ec404bdc745c781058ac97a373731c3089 Author: Daehwan Jung Date: Wed Jun 16 18:34:55 2021 +0900 ALSA: usb-audio: fix rate on Ozone Z90 USB headset It mislabels its 96 kHz altsetting and that's why it causes some noise Signed-off-by: Daehwan Jung Cc: Link: https://lore.kernel.org/r/1623836097-61918-1-git-send-email-dh10.jung@samsung.com Signed-off-by: Takashi Iwai commit b431f16f1685b38d4dda0434f4bae2265ab9e3da Author: Takashi Sakamoto Date: Wed Jun 16 17:28:47 2021 +0900 ALSA: firewire-motu: add support for MOTU 896 MOTU 896 is a second model in MOTU FireWire series, produced in 2001. This model consists of three chips: * Texas Instruments TSB41AB2 (Physical layer for IEEE 1394 bus) * Philips Semiconductors PDI 1394L21BE (Link layer for IEEE 1394 bus and packet processing layer) * QuickLogic QuickRAM QL4016 (Data block processing layer and digital signal processing) This commit adds a support for the model, with its unique protocol as version 1. The features of this protocol are: * no MIDI support. * Rx packets have no data chunks for control and status messages. * Tx packets have 2 bytes for control and status messages in the end of each data block. * The most of settings are represented in bit flag in one quadlet address (0x'ffff'f000'0b14). * It's selectable to use signal on optical interface, however the device has no register specific to it. The state has effect just to whether to exclude differed data chunks. * The internal multiplexer is not configured by software. Just after powering on, the device has a quirk to fail handling transaction. I recommend users to connect the device enough after powering on. $ python3 crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04102814 bus_info_length 4, crc_length 16, crc 10260 404 31333934 bus_name "1394" 408 20001000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4) 40c 0001f200 company_id 0001f2 | 410 0000d645 device_id 000000d645 | EUI-64 0001f2000000d645 root directory ----------------------------------------------------------------- 414 0004c65c directory_length 4, crc 50780 418 030001f2 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 8d000006 --> eui-64 leaf at 438 424 d1000001 --> unit directory at 428 unit directory at 428 ----------------------------------------------------------------- 428 0003ab34 directory_length 3, crc 43828 42c 120001f2 specifier id 430 13000002 version 434 17102801 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 0002057d leaf_length 2, crc 1405 43c 0001f200 company_id 0001f2 | 440 0000d645 device_id 000000d645 | EUI-64 0001f2000000d645 Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210616082847.124688-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d13d6b284d8b80802e3ab1c33f210579884c3060 Author: Takashi Sakamoto Date: Wed Jun 16 17:28:46 2021 +0900 ALSA: firewire-motu: add support for MOTU 828 MOTU 828 is a first model in MOTU FireWire series, produced in 2001. This model consists of three chips: * Texas Instruments TSB41AB1 (Physical layer for IEEE 1394 bus) * Philips Semiconductors 1394L21BE (Link layer for IEEE 1394 bus and packet processing layer) * QuickLogic QuickRAM QL4016 (Data block processing layer and digital signal processing) This commit adds a support for this model, with its unique protocol as version 1. The features of this protocol are: * no MIDI support. * Rx packets have no data chunks for control and status messages. * Tx packets have 2 data chunks for control and status messages in the end of each data block. The chunks consist of data block counter (4 byte) and message (2 byte). * All of settings are represented in bit flag in one quadlet address (0x'ffff'f000'0b00). * When optical interface is configured as S/PDIF, signals of the interface is multiplexed for packets, instead of signals of coaxial interface. * The internal multiplexer is not configured by software. I note that the device has a quirk to mute output voluntarily during receiving batch of packets in the beginning of packet streaming. The operation to unmute should be done by software enough after the device shifts the state, however it's not deterministic. Furthermore, just after switching rate of sampling clock, the device keeps the state longer. This patch manages to sleep 100 msec before unmute operation, but it may fail to release the mute in the case that the rate is changed. As a workaround, users can restart packet streaming at the same rate, or write to specific register from userspace. $ python3 crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04105c54 bus_info_length 4, crc_length 16, crc 23636 404 31333934 bus_name "1394" 408 20001000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4) 40c 0001f200 company_id 0001f2 | 410 00005015 device_id 0000005015 | EUI-64 0001f20000005015 root directory ----------------------------------------------------------------- 414 0004c65c directory_length 4, crc 50780 418 030001f2 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 8d000006 --> eui-64 leaf at 438 424 d1000001 --> unit directory at 428 unit directory at 428 ----------------------------------------------------------------- 428 00035052 directory_length 3, crc 20562 42c 120001f2 specifier id 430 13000001 version 434 17101800 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 0002eeb6 leaf_length 2, crc 61110 43c 0001f200 company_id 0001f2 | 440 00005015 device_id 0000005015 | EUI-64 0001f20000005015 Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210616082847.124688-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2b821698dc73c00719e3dc367db712f727bbda85 Author: Jacopo Mondi Date: Wed Jun 16 14:46:11 2021 +0200 media: i2c: rdacm21: Power up OV10640 before OV490 The current RDACM21 initialization routine powers up the OV10640 image sensor after the OV490 ISP. The ISP is programmed with a firmware loaded from an embedded serial flash that (most probably) tries to interact and program also the image sensor connected to the ISP. As described in commit "media: i2c: rdacm21: Fix OV10640 powerup" the image sensor powerdown signal is kept high by an internal pull up resistor and occasionally fails to startup correctly if the powerdown line is not asserted explicitly. Failures in the OV10640 startup causes the OV490 firmware to fail to boot correctly resulting in the camera module initialization to fail consequentially. Fix this by powering up the OV10640 image sensor before testing the OV490 firmware boot completion, by splitting the ov10640_initialize() function in an ov10640_power_up() one and an ov10640_check_id() one. Also make sure the OV10640 identification procedure gives enough time to the image sensor to resume after the programming phase performed by the OV490 firmware by repeating the ID read procedure. This commit fixes a sporadic start-up error triggered by a failure to detect the OV490 firmware boot completion: rdacm21 8-0054: Timeout waiting for firmware boot [hverkuil: fixed two typos in commit log] Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module") Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff75332b260cd33cc19000fdb5d256d9db4470d1 Author: Jacopo Mondi Date: Wed Jun 16 14:46:10 2021 +0200 media: i2c: rdacm21: Fix OV10640 powerup The OV10640 image sensor powerdown signal is controlled by the first line of the OV490 GPIO pad #1, but the pad #0 identifier OV490_GPIO_OUTPUT_VALUE0 was erroneously used. As a result the image sensor powerdown signal was never asserted but was left floating and kept high by an internal pull-up resistor, causing sporadic failures during the image sensor startup phase. Fix this by using the correct GPIO pad identifier and wait the mandatory 1.5 millisecond delay after the powerup lane is asserted. The reset delay is not characterized in the chip manual if not as "255 XVCLK + initialization". Wait for at least 3 milliseconds to guarantee the SCCB bus is available. While at it also fix the reset sequence, as the reset line was released before the powerdown one, and the line was not cycled. This commit fixes a sporadic start-up error triggered by a failure to read the OV10640 chip ID: rdacm21 8-0054: OV10640 ID mismatch: (0x01) Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module") Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7028772092b7f2fc50de7f00aa0817505b3b11f7 Author: Jacopo Mondi Date: Wed Jun 16 14:46:09 2021 +0200 media: i2c: rdacm21: Add delay after OV490 reset Add a delay after the OV490 chip is put in reset state. The reset signal shall be held low for at least 250 useconds. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9e0bf8393d0602cc7fda749b77cf8ec7f81249cb Author: Jacopo Mondi Date: Wed Jun 16 14:46:08 2021 +0200 media: i2c: max9271: Introduce wake_up() function The MAX9271 chip manual prescribes a delay of 5 milliseconds after the chip exits from low power state. Add a new function to the max9271 library driver that wakes up the chip with a dummy i2c transaction and implements the correct delay of 5 milliseconds after the chip exits from low power state. Use the newly introduced function in the rdacm20 and rdacm21 camera drivers. The former was not respecting the required delay while the latter was waiting for a too-short timeout. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ad01032aaf437c526d7135384bb4f998828d0cfc Author: Jacopo Mondi Date: Wed Jun 16 14:46:07 2021 +0200 media: i2c: max9271: Check max9271_write() return Check the return value of the max9271_write() function in the max9271 library driver. While at it, modify an existing condition to be made identical to other checks. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ff5278dcef900879252556a51b74b33efb06623 Author: Jacopo Mondi Date: Wed Jun 16 14:46:06 2021 +0200 media: i2c: max9286: Rework comments in .bound() Rephrase a comment in .bound() callback to make it clear we register a subdev notifier and remove a redundant comment about disabling i2c auto-ack. No functional changes intended. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 731c24ffa2b1614335987645d8821bf2ceedc841 Author: Jacopo Mondi Date: Wed Jun 16 14:46:05 2021 +0200 media: i2c: max9286: Define high channel amplitude Provide a macro to define the reverse channel amplitude to be used to compensate the remote serializer noise immunity. While at it, update a comment. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 902edc2a1c1ae4b514efd800dc5d5bc5b6d58991 Author: Jacopo Mondi Date: Wed Jun 16 14:46:04 2021 +0200 media: i2c: max9286: Cache channel amplitude Cache the current channel amplitude in a driver variable to skip updating it if the newly requested value is the same as the currently configured one. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f78723eb627554213048918caa02a42cae66884e Author: Jacopo Mondi Date: Wed Jun 16 14:46:03 2021 +0200 media: i2c: max9286: Rename reverse_channel_mv Rename the reverse_channel_mv variable to init_rev_chan_mv as the next patch will cache the reverse channel amplitude in a new driver variable. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3de09c7ae70d544b13b4da74fa3ebd4c25eb9ab9 Author: Jacopo Mondi Date: Wed Jun 16 14:46:02 2021 +0200 media: i2c: max9286: Adjust parameters indent The parameters to max9286_i2c_mux_configure() fits on the previous line. Adjust it. Cosmetic change only. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4f34591568e7a1e4a9d0839b4c8d3155f3047f72 Author: Alex Bee Date: Mon Jun 14 23:32:15 2021 +0200 media: hantro: add support for Rockchip RK3036 RK3036's VPU IP block is the same as RK3288 has, except that it doesn't have an encoder, decoding is supported up to 1920x1088 only and the axi clock can be set to 300 MHz max. Add a new RK3036 variant which reflects these differences. Signed-off-by: Alex Bee Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78bb1ae5472cabfaf474d348437c25ccaddde75e Author: Alex Bee Date: Mon Jun 14 23:32:14 2021 +0200 media: hantro: add support for Rockchip RK3066 RK3066's VPU IP block is the predecessor from what RK3288 has. The hardware differences are: - supports decoding frame sizes up to 1920x1088 only - doesn't have the 'G1_REG_SOFT_RESET' register (requires another .reset callback for hantro_codec_ops, since writing this register will result in non-working IP block) - has one ACLK/HCLK per vdpu/vepu - ACLKs can be clocked up to 300 MHz only - no MMU (no changes required: CMA will be transparently used) Add a new RK3066 variant which reflect this differences. This variant can be used for RK3188 as well. Signed-off-by: Alex Bee Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c9caebd57b3a0e3fc981bfc9e79de5c4086e0c1b Author: Alex Bee Date: Mon Jun 14 23:32:13 2021 +0200 media: hantro: merge Rockchip platform drivers Merge the two Rockchip platform drivers into one as it was suggested at [1] and [2]. This will hopefully make it easier to add new variants (which are surely to come for Rockchip). Also rename from "rk3288" to "v(d/e)pu1" and "rk3399" to "v(d/e)pu2" where applicable, as this is the dicition the vendor uses and will also refelect the variants that get added later in this series. Rename from "rk3288" to "rockchip" if applicable to both hardware versions. [1] https://patchwork.kernel.org/project/linux-rockchip/patch/20210107134101.195426-6-paul.kocialkowski@bootlin.com/ [2] https://patchwork.kernel.org/project/linux-rockchip/patch/20210525152225.154302-5-knaerzche@gmail.com/ Signed-off-by: Alex Bee Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4b898fedeb26c4d09b83a2c5a3246a34ab99e216 Author: Alex Bee Date: Mon Jun 14 23:32:12 2021 +0200 media: hantro: reorder variants Reorder variants in hantro driver alphanumeric. Signed-off-by: Alex Bee Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 502cf736419aba4cfa0a6737cf66d286c699f144 Author: Alex Bee Date: Mon Jun 14 23:32:11 2021 +0200 media: dt-bindings: media: rockchip-vdec: add RK3228 compatible Document the RK3228 compatible for rockchip-vdec. Also add the optional assigned-clocks and assigned-clock-rates properties. Signed-off-by: Alex Bee Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b32178e77d257c148b8ad8c31db36bb0c2d49bab Author: Alex Bee Date: Mon Jun 14 23:32:10 2021 +0200 media: dt-bindings: media: rockchip-vpu: add new compatibles Add compatibles for RK3036, RK3066, RK3188 and RK3228. Also reflect the changes to the additional clocks for RK3066/RK3188. Signed-off-by: Alex Bee Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 493ae3f2ba13a1c0a9d866c6c24a43ebe0d1ba42 Author: Hans Verkuil Date: Thu Jun 10 08:23:10 2021 +0200 media: mtk-vcodec: fix kerneldoc warnings Fix the following kerneldoc warnings: drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_INIT' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_SET_PARAM' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_ENCODE' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_DEINIT' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_INIT_DONE' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_SET_PARAM_DONE' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_ENCODE_DONE' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_DEINIT_DONE' not described in enum 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Excess enum value 'VPU_IPIMSG_ENC_XXX_DONE' description in 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Excess enum value 'AP_IPIMSG_ENC_XXX' description in 'venc_ipi_msg_id' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:120: warning: Enum value 'VENC_IPI_MSG_STATUS_OK' not described in enum 'venc_ipi_msg_status' drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:120: warning: Enum value 'VENC_IPI_MSG_STATUS_FAIL' not described in enum 'venc_ipi_msg_status' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_SYS' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_MISC' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_LD' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_TOP' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_CM' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_AD' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_AV' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_PP' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWD' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWQ' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWB' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWG' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'NUM_MAX_VDEC_REG_BASE' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VENC_SYS' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VENC_LT_SYS' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'NUM_MAX_VCODEC_REG_BASE' not described in enum 'mtk_hw_reg_idx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:58: warning: Enum value 'MTK_INST_DECODER' not described in enum 'mtk_instance_type' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:58: warning: Enum value 'MTK_INST_ENCODER' not described in enum 'mtk_instance_type' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_NONE' not described in enum 'mtk_encode_param' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_BITRATE' not described in enum 'mtk_encode_param' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_FRAMERATE' not described in enum 'mtk_encode_param' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_INTRA_PERIOD' not described in enum 'mtk_encode_param' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_FORCE_INTRA' not described in enum 'mtk_encode_param' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_GOP_SIZE' not described in enum 'mtk_encode_param' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'fourcc' not described in 'mtk_video_fmt' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'type' not described in 'mtk_video_fmt' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'num_planes' not described in 'mtk_video_fmt' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'flags' not described in 'mtk_video_fmt' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:112: warning: Function parameter or member 'fourcc' not described in 'mtk_codec_framesizes' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:112: warning: Function parameter or member 'stepwise' not described in 'mtk_codec_framesizes' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:120: warning: Enum value 'MTK_Q_DATA_SRC' not described in enum 'mtk_q_type' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:120: warning: Enum value 'MTK_Q_DATA_DST' not described in enum 'mtk_q_type' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'visible_width' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'visible_height' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'coded_width' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'coded_height' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'field' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'bytesperline' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'sizeimage' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'fmt' not described in 'mtk_q_data' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:177: warning: Function parameter or member 'clk_name' not described in 'mtk_vcodec_clk_info' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:177: warning: Function parameter or member 'vcodec_clk' not described in 'mtk_vcodec_clk_info' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:185: warning: Function parameter or member 'clk_info' not described in 'mtk_vcodec_clk' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:185: warning: Function parameter or member 'clk_num' not described in 'mtk_vcodec_clk' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'vdec_clk' not described in 'mtk_vcodec_pm' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'larbvdec' not described in 'mtk_vcodec_pm' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'venc_clk' not described in 'mtk_vcodec_pm' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'larbvenc' not described in 'mtk_vcodec_pm' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'dev' not described in 'mtk_vcodec_pm' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'mtkdev' not described in 'mtk_vcodec_pm' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:300: warning: Function parameter or member 'decoded_frame_cnt' not described in 'mtk_vcodec_ctx' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:332: warning: Function parameter or member 'min_bitrate' not described in 'mtk_vcodec_enc_pdata' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:405: warning: Function parameter or member 'venc_pdata' not described in 'mtk_vcodec_dev' drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:405: warning: Function parameter or member 'decode_workqueue' not described in 'mtk_vcodec_dev' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_INIT' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_START' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_END' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_DEINIT' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_RESET' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_INIT_ACK' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_START_ACK' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_END_ACK' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_DEINIT_ACK' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_RESET_ACK' not described in enum 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Excess enum value 'AP_IPIMSG_XXX' description in 'vdec_ipi_msgid' drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Excess enum value 'VPU_IPIMSG_XXX_ACK' description in 'vdec_ipi_msgid' In some cases I just changed /** to /*, in other cases the missing field descriptions were added. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7629cbd6872f6aef0b7f1e20812194f4f4249bb2 Author: Hans Verkuil Date: Thu Jun 10 08:11:40 2021 +0200 media: adv7842: remove spurious & and fix vga_edid size No need to use & to get the start address of an array. Fix the size of vga_edid.edid to a single block (128 bytes) to fix this smatch error: adv7842.c:2538 adv7842_set_edid() error: memcpy() '&state->vga_edid.edid' too small (128 vs 512) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 00ae4ebc2d07db50d8432ebec3158c96b36f1a6d Author: Christophe JAILLET Date: Sun Jun 13 19:36:34 2021 +0200 media: pci: cx88: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. Only 2 functions allocate some memory. They are both in cx88-core.c When memory is allocated in 'cx88_risc_buffer()', GFP_KERNEL can be used because its 2 callers end up to '.buf_prepare' functions in 'vb2_ops' structures. The call chains are: .buf_prepare (cx88-vbi.c) --> buffer_prepare (cx88-vbi.c) --> cx88_risc_buffer .buf_prepare (cx88-video.c) --> buffer_prepare (cx88-video.c) --> cx88_risc_buffer When memory is allocated in 'cx88_risc_databuffer()', GFP_KERNEL can be used because its 2 callers end up to 'snd_cx88_hw_params' which already uses GFP_KERNEL and '.buf_prepare' functions in 'vb2_ops' structures. The call chains are: snd_cx88_hw_params (cx88-alsa.c) --> cx88_risc_databuffer .buf_prepare (cx88-blackbird.c) --> buffer_prepare (cx88-blackbird.c) --> cx8802_buf_prepare (cx88-mpeg.c) --> cx88_risc_databuffer .buf_prepare (cx88-dvb.c) --> buffer_prepare (cx88-dvb.c) --> cx8802_buf_prepare (cx88-mpeg.c) --> cx88_risc_databuffer @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7ec1c4a57c428a2114b81059e8683f8cf348920f Author: Rikard Falkeborn Date: Sat Jun 12 01:42:01 2021 +0200 media: imx-jpeg: Constify static struct mxc_jpeg_fmt It is only read-from, so make it const. In order to be able to do this, constify all places where mxc_jpeg_fmt is used, in function arguments, return values and pointers. On top of that, make the name a pointer to const char. On aarch64, this shrinks object code size with 550 bytes with gcc 11.1.0, and almost 2kB with clang 12.0.0. Signed-off-by: Rikard Falkeborn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 682e69d7a262d8959f8b8cc1a8ed68bc6ec4be61 Author: Rikard Falkeborn Date: Sat Jun 12 01:42:00 2021 +0200 media: imx-jpeg: Constify static struct v4l2_m2m_ops The only usage of mxc_jpeg_m2m_ops is to pass its address to v4l2_m2m_init() which takes a pointer to const struct v4l2_m2m_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e70bc1ea973ddac75119c75fe11b064dd8731051 Author: Niklas Söderlund Date: Fri Jun 11 18:07:34 2021 +0200 media: rcar-csi2: Add support for Y10 and Y8 Add support for two new media bus formats, Y10 and Y8. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40d62da2a1278ea1e58ed8e304142cf09de41232 Author: lijian Date: Thu May 27 04:46:43 2021 +0200 media: v4l2-event: Modified variable type 'unsigned' to 'unsigned int' Prefer 'unsigned int' to bare use of 'unsigned'. So modified variable type 'unsigned' to 'unsigned int' in v4l2-event.c. Signed-off-by: lijian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 584b2373eef9c487620153a758072e295ab28cc1 Author: Piyush Thange Date: Wed May 26 17:26:19 2021 +0200 media: usb: cpia2: Fixed Coding Style issues Fixed all the Coding style issues generated by checkpatch.pl. The changes made considering the --strict option. Signed-off-by: Piyush Thange Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5d11e6aad1811ea293ee2996cec9124f7fccb661 Author: Dillon Min Date: Wed May 26 17:18:32 2021 +0200 media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx The m2m_ctx resources was allocated by v4l2_m2m_ctx_init() in g2d_open() should be freed from g2d_release() when it's not used. Fix it Fixes: 918847341af0 ("[media] v4l: add G2D driver for s5p device family") Signed-off-by: Dillon Min Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2b889a4afcacef4888ac8203a60e68004816e1fd Author: Evgeny Novikov Date: Wed May 26 16:35:06 2021 +0200 media: marvell-ccic: set error code in probe When i2c_new_client_device() fails, cafe_pci_probe() cleans up all resources and returns 0. The patch sets the error code on the corresponding path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e198be37e52551bb863d07d2edc535d0932a3c4f Author: Steve Longerbeam Date: Mon May 17 16:29:23 2021 +0200 media: imx-csi: Skip first few frames from a BT.656 source Some BT.656 sensors (e.g. ADV718x) transmit frames with unstable BT.656 sync codes after initial power on. This confuses the imx CSI,resulting in vertical and/or horizontal sync issues. Skip the first 20 frames to avoid the unstable sync codes. [fabio: fixed checkpatch warning and increased the frame skipping to 20] Signed-off-by: Steve Longerbeam Signed-off-by: Fabio Estevam Reviewed-by: Tim Harvey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca816468bc3712c8ae120a94c19983851a4c6c4a Author: Wolfram Sang Date: Tue May 4 14:26:48 2021 +0200 media: coda: set debugfs blobs to read only Those blobs can only be read. So, don't confuse users with 'writable' flags. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a7790be182d32b9b332a37cb4206e24fe94b728 Author: Arnd Bergmann Date: Mon Jun 14 12:34:09 2021 +0200 media: subdev: disallow ioctl for saa6588/davinci The saa6588_ioctl() function expects to get called from other kernel functions with a 'saa6588_command' pointer, but I found nothing stops it from getting called from user space instead, which seems rather dangerous. The same thing happens in the davinci vpbe driver with its VENC_GET_FLD command. As a quick fix, add a separate .command() callback pointer for this driver and change the two callers over to that. This change can easily get backported to stable kernels if necessary, but since there are only two drivers, we may want to eventually replace this with a set of more specialized callbacks in the long run. Fixes: c3fda7f835b0 ("V4L/DVB (10537): saa6588: convert to v4l2_subdev.") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4c650f1af68251f1970aecfc3c2fceec1552da2 Author: Arnd Bergmann Date: Mon Jun 14 12:34:07 2021 +0200 media: atomisp: remove compat_ioctl32 code This is one of the last remaining users of compat_alloc_user_space() and copy_in_user(), which are in the process of getting removed. As of commit 57e6b6f2303e ("media: atomisp_fops.c: disable atomisp_compat_ioctl32"), nothing in this file is actually getting used as the only reference has been stubbed out. Remove the entire file -- anyone willing to restore the functionality can equally well just look up the contents in the git history if needed. Acked-by: Sakari Ailus Suggested-by: Christoph Hellwig Reviewed-by: Andy Shevchenko Acked-by: Laurent Pinchart Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8162f78d27c61e148a4342c62bddef3c26135bcb Author: Arnd Bergmann Date: Mon Jun 14 12:34:06 2021 +0200 media: v4l2-core: return -ENODEV from ioctl when not registered I spotted a minor difference is handling of unregistered devices between native and compat ioctls: the native handler never tries to call into the driver if a device is not marked as registered. I did not check whether this can cause issues in the kernel, or just a different between return codes, but it clearly makes sense that both should behave the same way. Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 765ba251d2522e2a0daa2f0793fd0f0ce34816ec Author: Arnd Bergmann Date: Mon Jun 14 12:34:05 2021 +0200 media: subdev: remove VIDIOC_DQEVENT_TIME32 handling Converting the VIDIOC_DQEVENT_TIME32/VIDIOC_DQEVENT32/ VIDIOC_DQEVENT32_TIME32 arguments to the canonical form is done in common code, but for some reason I ended up adding another conversion helper to subdev_do_ioctl() as well. I must have concluded that this does not go through the common conversion, but it has done that since the ioctl handler was first added. I assume this one is harmless as there should be no way to arrive here from user space if CONFIG_COMPAT_32BIT_TIME is set, but since it is dead code, it should just get removed. On a 64-bit architecture, as well as a 32-bit architecture without CONFIG_COMPAT_32BIT_TIME, handling this command is a mistake, and the kernel should return an error. Fixes: 1a6c0b36dd19 ("media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e84c8932897e8c59e01c33f4052a72d5b2890884 Author: Arnd Bergmann Date: Mon Jun 14 12:34:04 2021 +0200 media: v4l2-core: fix whitespace damage in video_get_user() The initialization was indented with an extra tab in most lines, remove them to get the normal coding style. Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b53cca764f9b291b7907fcd39d9e66ad728ee0b Author: Arnd Bergmann Date: Mon Jun 14 12:34:03 2021 +0200 media: v4l2-core: explicitly clear ioctl input data As seen from a recent syzbot bug report, mistakes in the compat ioctl implementation can lead to uninitialized kernel stack data getting used as input for driver ioctl handlers. The reported bug is now fixed, but it's possible that other related bugs are still present or get added in the future. As the drivers need to check user input already, the possible impact is fairly low, but it might still cause an information leak. To be on the safe side, always clear the entire ioctl buffer before calling the conversion handler functions that are meant to initialize them. Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c344f07aa1b4ba38ca8fabe407a2afe2f436323c Author: Arnd Bergmann Date: Mon Jun 14 12:34:02 2021 +0200 media: v4l2-core: ignore native time32 ioctls on 64-bit Syzbot found that passing ioctl command 0xc0505609 into a 64-bit kernel from a 32-bit process causes uninitialized kernel memory to get passed to drivers instead of the user space data: BUG: KMSAN: uninit-value in check_array_args drivers/media/v4l2-core/v4l2-ioctl.c:3041 [inline] BUG: KMSAN: uninit-value in video_usercopy+0x1631/0x3d30 drivers/media/v4l2-core/v4l2-ioctl.c:3315 CPU: 0 PID: 19595 Comm: syz-executor.4 Not tainted 5.11.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x21c/0x280 lib/dump_stack.c:120 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197 check_array_args drivers/media/v4l2-core/v4l2-ioctl.c:3041 [inline] video_usercopy+0x1631/0x3d30 drivers/media/v4l2-core/v4l2-ioctl.c:3315 video_ioctl2+0x9f/0xb0 drivers/media/v4l2-core/v4l2-ioctl.c:3391 v4l2_ioctl+0x255/0x290 drivers/media/v4l2-core/v4l2-dev.c:360 v4l2_compat_ioctl32+0x2c6/0x370 drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1248 __do_compat_sys_ioctl fs/ioctl.c:842 [inline] __se_compat_sys_ioctl+0x53d/0x1100 fs/ioctl.c:793 __ia32_compat_sys_ioctl+0x4a/0x70 fs/ioctl.c:793 do_syscall_32_irqs_on arch/x86/entry/common.c:79 [inline] __do_fast_syscall_32+0x102/0x160 arch/x86/entry/common.c:141 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:166 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:209 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The time32 commands are defined but were never meant to be called on 64-bit machines, as those have always used time64 interfaces. I missed this in my patch that introduced the time64 handling on 32-bit platforms. The problem in this case is the mismatch of one function checking for the numeric value of the command and another function checking for the type of process (native vs compat) instead, with the result being that for this combination, nothing gets copied into the buffer at all. Avoid this by only trying to convert the time32 commands when running on a 32-bit kernel where these are defined in a meaningful way. [hverkuil: fix 3 warnings: switch with no cases] Fixes: 577c89b0ce72 ("media: v4l2-core: fix v4l2_buffer handling for time64 ABI") Reported-by: syzbot+142888ffec98ab194028@syzkaller.appspotmail.com Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit caf231ac25bdde69d257366e2f8d13b37af5458e Author: Irui Wang Date: Sat Jun 5 04:29:18 2021 +0200 media: mtk-vcodec: Support MT8192 H264 4K encoding MT8192 H264 support 4k(3840x2176) and Level 5.1 encoding, add related path according to enc_capability. Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 37eeacba7cb6bfbed9596e7b2f8b672e1c957ac7 Author: Irui Wang Date: Sat Jun 5 04:29:17 2021 +0200 media: mtk-vcodec: Add MT8192 H264 venc driver Add MT8192 venc driver's compatible and device private data. Reviewed-by: Tzung-Bi Shih Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aa950d8619694fb1a7d0e68aa556976e2f34476d Author: Irui Wang Date: Sat Jun 5 04:29:16 2021 +0200 media: dt-bindings: media: mtk-vcodec: Add binding for MT8192 VENC Updates binding document for mt8192 encoder driver. Acked-by: Rob Herring Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2c3bde0e1aed4250e7eafb1bc739760c61d10b8 Author: Irui Wang Date: Sat Jun 5 04:29:15 2021 +0200 media: mtk-vcodec: Support 34bits dma address for venc Use the dma_set_mask_and_coherent helper to set venc DMA bit mask to support 34bits iova space(16GB) that the mt8192 iommu HW support. Whole the iova range separate to 0~4G/4G~8G/8G~12G/12G~16G, regarding which iova range VENC actually locate, it depends on the dma-ranges property of venc dtsi node. Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5cd57605771216755bd6f98748d4f11d1e65b780 Author: Irui Wang Date: Sat Jun 5 04:29:14 2021 +0200 media: dt-bindings: media: mtk-vcodec: Add dma-ranges property The mt8192 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. This is optional and only needed in mt8192, the dma ranges should not cross 4G/8G/12G. Here we don't have actual bus/parent concept here. And the iova requirement is for our HW. Thus put the property in our node. Acked-by: Rob Herring Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b6c57d313f5f8d0da150f6e02882f0607443abe7 Author: Alexandre Courbot Date: Sat Jun 5 04:29:13 2021 +0200 media: mtk-vcodec: venc: remove redundant code vidioc_try_fmt() does clamp height and width when called on the OUTPUT queue, so clamping them prior to calling this function is redundant. Set the queue's parameters after calling vidioc_try_fmt() so we can use the values it computed. Signed-off-by: Alexandre Courbot Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6b61f55ecbe693d9d0d7ae14ebce01dabe10ecf1 Author: Dmitry Osipenko Date: Tue Jun 1 05:23:19 2021 +0300 dt-bindings: devfreq: tegra30-actmon: Add cooling-cells The ACTMON watches activity of memory clients. Decisions about a minimum required frequency are made based on the info from ACTMON. We can use ACTMON as a thermal cooling device by limiting the required frequency. Document new cooling-cells property of NVIDIA Tegra ACTMON hardware unit. Reviewed-by: Rob Herring Acked-by: Chanwoo Choi Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 271ca53cb0c8b3a45c73e1140fc3336c2da42315 Author: Dmitry Osipenko Date: Tue Jun 1 05:23:18 2021 +0300 dt-bindings: devfreq: tegra30-actmon: Convert to schema Convert NVIDIA Tegra ACTMON binding to schema. Reviewed-by: Rob Herring Acked-by: Chanwoo Choi Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 1ad4f329fccb5d9eb7b0a38d7fdf0f4688c6b341 Author: YueHaibing Date: Mon May 24 10:11:58 2021 +0800 PM / devfreq: userspace: Use DEVICE_ATTR_RW macro Use DEVICE_ATTR_RW helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Chanwoo Choi commit 0d346d2a6f54f06f36b224fd27cd6eafe8c83be9 Author: Tomi Valkeinen Date: Thu Jun 10 17:55:58 2021 +0300 media: v4l2-subdev: add subdev-wide state struct We have 'struct v4l2_subdev_pad_config' which contains configuration for a single pad used for the TRY functionality, and an array of those structs is passed to various v4l2_subdev_pad_ops. I was working on subdev internal routing between pads, and realized that there's no way to add TRY functionality for routes, which is not pad specific configuration. Adding a separate struct for try-route config wouldn't work either, as e.g. set-fmt needs to know the try-route configuration to propagate the settings. This patch adds a new struct, 'struct v4l2_subdev_state' (which at the moment only contains the v4l2_subdev_pad_config array) and the new struct is used in most of the places where v4l2_subdev_pad_config was used. All v4l2_subdev_pad_ops functions taking v4l2_subdev_pad_config are changed to instead take v4l2_subdev_state. The changes to drivers/media/v4l2-core/v4l2-subdev.c and include/media/v4l2-subdev.h were written by hand, and all the driver changes were done with the semantic patch below. The spatch needs to be applied to a select list of directories. I used the following shell commands to apply the spatch: dirs="drivers/media/i2c drivers/media/platform drivers/media/usb drivers/media/test-drivers/vimc drivers/media/pci drivers/staging/media" for dir in $dirs; do spatch -j8 --dir --include-headers --no-show-diff --in-place --sp-file v4l2-subdev-state.cocci $dir; done Note that Coccinelle chokes on a few drivers (gcc extensions?). With minor changes we can make Coccinelle run fine, and these changes can be reverted after spatch. The diff for these changes is: For drivers/media/i2c/s5k5baf.c: @@ -1481,7 +1481,7 @@ static int s5k5baf_set_selection(struct v4l2_subdev *sd, &s5k5baf_cis_rect, v4l2_subdev_get_try_crop(sd, cfg, PAD_CIS), v4l2_subdev_get_try_compose(sd, cfg, PAD_CIS), - v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT) + v4l2_subdev_get_try_crop(sd, cfg, PAD_OUT), }; s5k5baf_set_rect_and_adjust(rects, rtype, &sel->r); return 0; For drivers/media/platform/s3c-camif/camif-capture.c: @@ -1230,7 +1230,7 @@ static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd, *mf = camif->mbus_fmt; break; - case CAMIF_SD_PAD_SOURCE_C...CAMIF_SD_PAD_SOURCE_P: + case CAMIF_SD_PAD_SOURCE_C: /* crop rectangle at camera interface input */ mf->width = camif->camif_crop.width; mf->height = camif->camif_crop.height; @@ -1332,7 +1332,7 @@ static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd, } break; - case CAMIF_SD_PAD_SOURCE_C...CAMIF_SD_PAD_SOURCE_P: + case CAMIF_SD_PAD_SOURCE_C: /* Pixel format can be only changed on the sink pad. */ mf->code = camif->mbus_fmt.code; mf->width = crop->width; The semantic patch is: // // Change function parameter @@ identifier func; identifier cfg; @@ func(..., - struct v4l2_subdev_pad_config *cfg + struct v4l2_subdev_state *sd_state , ...) { <... - cfg + sd_state ...> } // Change function declaration parameter @@ identifier func; identifier cfg; type T; @@ T func(..., - struct v4l2_subdev_pad_config *cfg + struct v4l2_subdev_state *sd_state , ...); // Change function return value @@ identifier func; @@ - struct v4l2_subdev_pad_config + struct v4l2_subdev_state *func(...) { ... } // Change function declaration return value @@ identifier func; @@ - struct v4l2_subdev_pad_config + struct v4l2_subdev_state *func(...); // Some drivers pass a local pad_cfg for a single pad to a called function. Wrap it // inside a pad_state. @@ identifier func; identifier pad_cfg; @@ func(...) { ... struct v4l2_subdev_pad_config pad_cfg; + struct v4l2_subdev_state pad_state = { .pads = &pad_cfg }; <+... ( v4l2_subdev_call | sensor_call | isi_try_fse | isc_try_fse | saa_call_all ) (..., - &pad_cfg + &pad_state ,...) ...+> } // If the function uses fields from pad_config, access via state->pads @@ identifier func; identifier state; @@ func(..., struct v4l2_subdev_state *state , ...) { <... ( - state->try_fmt + state->pads->try_fmt | - state->try_crop + state->pads->try_crop | - state->try_compose + state->pads->try_compose ) ...> } // If the function accesses the filehandle, use fh->state instead @@ struct v4l2_subdev_fh *fh; @@ - fh->pad + fh->state @@ struct v4l2_subdev_fh fh; @@ - fh.pad + fh.state // Start of vsp1 specific @@ @@ struct vsp1_entity { ... - struct v4l2_subdev_pad_config *config; + struct v4l2_subdev_state *config; ... }; @@ symbol entity; @@ vsp1_entity_init(...) { ... entity->config = - v4l2_subdev_alloc_pad_config + v4l2_subdev_alloc_state (&entity->subdev); ... } @@ symbol entity; @@ vsp1_entity_destroy(...) { ... - v4l2_subdev_free_pad_config + v4l2_subdev_free_state (entity->config); ... } @exists@ identifier func =~ "(^vsp1.*)|(hsit_set_format)|(sru_enum_frame_size)|(sru_set_format)|(uif_get_selection)|(uif_set_selection)|(uds_enum_frame_size)|(uds_set_format)|(brx_set_format)|(brx_get_selection)|(histo_get_selection)|(histo_set_selection)|(brx_set_selection)"; symbol config; @@ func(...) { ... - struct v4l2_subdev_pad_config *config; + struct v4l2_subdev_state *config; ... } // End of vsp1 specific // Start of rcar specific @@ identifier sd; identifier pad_cfg; @@ rvin_try_format(...) { ... - struct v4l2_subdev_pad_config *pad_cfg; + struct v4l2_subdev_state *sd_state; ... - pad_cfg = v4l2_subdev_alloc_pad_config(sd); + sd_state = v4l2_subdev_alloc_state(sd); <... - pad_cfg + sd_state ...> - v4l2_subdev_free_pad_config(pad_cfg); + v4l2_subdev_free_state(sd_state); ... } // End of rcar specific // Start of rockchip specific @@ identifier func =~ "(rkisp1_rsz_get_pad_fmt)|(rkisp1_rsz_get_pad_crop)|(rkisp1_rsz_register)"; symbol rsz; symbol pad_cfg; @@ func(...) { + struct v4l2_subdev_state state = { .pads = rsz->pad_cfg }; ... - rsz->pad_cfg + &state ... } @@ identifier func =~ "(rkisp1_isp_get_pad_fmt)|(rkisp1_isp_get_pad_crop)"; symbol isp; symbol pad_cfg; @@ func(...) { + struct v4l2_subdev_state state = { .pads = isp->pad_cfg }; ... - isp->pad_cfg + &state ... } @@ symbol rkisp1; symbol isp; symbol pad_cfg; @@ rkisp1_isp_register(...) { + struct v4l2_subdev_state state = { .pads = rkisp1->isp.pad_cfg }; ... - rkisp1->isp.pad_cfg + &state ... } // End of rockchip specific // Start of tegra-video specific @@ identifier sd; identifier pad_cfg; @@ __tegra_channel_try_format(...) { ... - struct v4l2_subdev_pad_config *pad_cfg; + struct v4l2_subdev_state *sd_state; ... - pad_cfg = v4l2_subdev_alloc_pad_config(sd); + sd_state = v4l2_subdev_alloc_state(sd); <... - pad_cfg + sd_state ...> - v4l2_subdev_free_pad_config(pad_cfg); + v4l2_subdev_free_state(sd_state); ... } @@ identifier sd_state; @@ __tegra_channel_try_format(...) { ... struct v4l2_subdev_state *sd_state; <... - sd_state->try_crop + sd_state->pads->try_crop ...> } // End of tegra-video specific // Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6f2f49ae4c287fbaaed89b2b262a9b99d27302fb Author: Gustavo A. R. Silva Date: Fri Jun 4 02:43:38 2021 +0200 media: venus: hfi_msgs.h: Replace one-element 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]. Use flexible-array members in struct hfi_msg_sys_property_info_pkt and hfi_msg_session_property_info_pkt instead of one-element arrays, and refactor the code accordingly. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: CC [M] drivers/media/platform/qcom/venus/hfi_msgs.o drivers/media/platform/qcom/venus/hfi_msgs.c: In function ‘hfi_sys_property_info’: drivers/media/platform/qcom/venus/hfi_msgs.c:246:35: warning: array subscript 1 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 246 | if (req_bytes < 128 || !pkt->data[1] || pkt->num_properties > 1) | ~~~~~~~~~^~~ drivers/media/platform/qcom/venus/hfi_msgs.c: In function ‘hfi_session_prop_info’: drivers/media/platform/qcom/venus/hfi_msgs.c:342:62: warning: array subscript 1 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 342 | if (!req_bytes || req_bytes % sizeof(*buf_req) || !pkt->data[1]) | ~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c73c23f347168e315d65fd3b7cffca8439724b26 Author: Gustavo A. R. Silva Date: Thu Jun 3 02:17:08 2021 +0200 media: venus: hfi_cmds: Fix packet size calculation Now that a one-element array was replaced with a flexible-array member in struct hfi_sys_set_property_pkt, use the struct_size() helper to correctly calculate the packet size. Fixes: 701e10b3fd9f ("media: venus: hfi_cmds.h: Replace one-element array with flexible-array member") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 128916984208d8f7ccaed6eda840c603fa112910 Author: Mauro Carvalho Chehab Date: Thu Jun 10 11:53:45 2021 +0200 media: xilinx: simplify get fourcc logic Right now, there are two calls for xvip_get_format_by_fourcc(). If the first one fails, it is called again in order to pick the first available format: V4L2_PIX_FMT_YUYV. This ends by producing a smatch warnings: drivers/media/platform/xilinx/xilinx-dma.c:555 __xvip_dma_try_format() error: 'info' dereferencing possible ERR_PTR() drivers/media/platform/xilinx/xilinx-dma.c: drivers/media/platform/xilinx/xilinx-dma.c:664 xvip_dma_init() error: 'dma->fmtinfo' dereferencing possible ERR_PTR() as it is hard for an static analyzer to ensure that calling xvip_get_format_by_fourcc(XVIP_DMA_DEF_FORMAT) won't return an error. So, better to optimize the logic, ensuring that the function will never return an error. Signed-off-by: Mauro Carvalho Chehab commit 60f0618d157b8c8bf1d09d4a6e10070a0b580160 Author: Mauro Carvalho Chehab Date: Mon Jun 14 10:43:24 2021 +0200 media: dvb-core: frontend: make GET/SET safer The implementation for FE_SET_PROPERTY/FE_GET_PROPERTY has a debug code that might be explored via spectre. Improve the logic in order to mitigate such risk. It should be noticed that, before this patch, the logic which implements FE_GET_PROPERTY doesn't check the length passed by the user, which might lead to expose some information. This is probably not exploitable, though, as the frontend drivers won't rely on the buffer length value set by userspace, but it helps to return a valid value back to userspace. The code was changed to only try to access an array based on userspace values only when DVB debug is turned on, helping to reduce the attack surface, as a speculation attack would work only if DVB dev_dbg() macros are enabled, which is usually enabled only on test Kernels or by the root user. As a side effect, a const array size can now be reduced by ~570 bytes, as it now needs to contain just the name of each DTV command. Signed-off-by: Mauro Carvalho Chehab commit dba328bab4c6fa4ec1ed3be616f7196865f2ce41 Author: Mauro Carvalho Chehab Date: Thu Jun 10 16:00:53 2021 +0200 media: ttusb-dec: cleanup an error handling logic Simplify the logic at ttusb_dec_send_command(). Besides avoiding some code duplication, as a side effect, this could remove this false positive return with spatch: drivers/media/usb/ttusb-dec/ttusb_dec.c:380 ttusb_dec_send_command() warn: inconsistent returns '&dec->usb_mutex'. Locked on : 330 Unlocked on: 354,365,380 Signed-off-by: Mauro Carvalho Chehab commit 5368b1ee2939961a16e74972b69088433fc52195 Author: Mauro Carvalho Chehab Date: Thu Jun 10 08:57:02 2021 +0200 media: siano: fix device register error path As reported by smatch: drivers/media/common/siano/smsdvb-main.c:1231 smsdvb_hotplug() warn: '&client->entry' not removed from list If an error occur at the end of the registration logic, it won't drop the device from the list. Signed-off-by: Mauro Carvalho Chehab commit 235406dca37ecf6f00e0378e965a3dd37590c389 Author: Mauro Carvalho Chehab Date: Thu Jun 10 08:40:58 2021 +0200 media: saa7134: fix saa7134_initdev error handling logic Smatch reported an issue there: drivers/media/pci/saa7134/saa7134-core.c:1302 saa7134_initdev() warn: '&dev->devlist' not removed from list But besides freeing the list, the media controller graph also needs to be cleaned up on errors. Address those issues. Signed-off-by: Mauro Carvalho Chehab commit 7f9197f11888c45d1aab470b7fd2c1f1fc1a2a35 Author: Mauro Carvalho Chehab Date: Thu Jun 10 08:33:12 2021 +0200 media: saa7134: use more meaninful goto labels Instead of just numbering fail0 to fail4, use more meaninful goto labels. Signed-off-by: Mauro Carvalho Chehab commit ba9139116bc053897e6fb16a51c463604c4da371 Author: Mauro Carvalho Chehab Date: Thu Jun 10 08:20:16 2021 +0200 media: sun6i-csi: add a missing return code As pointed by smatch, there's a missing return code: drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:485 sun6i_video_open() warn: missing error code 'ret' Signed-off-by: Mauro Carvalho Chehab commit 1fec2ecc252301110e4149e6183fa70460d29674 Author: Mauro Carvalho Chehab Date: Wed Jun 9 14:32:29 2021 +0200 media: dvbdev: fix error logic at dvb_register_device() As reported by smatch: drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:510 dvb_register_device() warn: '&dvbdev->list_head' not removed from list drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:530 dvb_register_device() warn: '&dvbdev->list_head' not removed from list drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:545 dvb_register_device() warn: '&dvbdev->list_head' not removed from list The error logic inside dvb_register_device() doesn't remove devices from the dvb_adapter_list in case of errors. Signed-off-by: Mauro Carvalho Chehab commit abc0226df64dc137b48b911c1fe4319aec5891bb Author: Mauro Carvalho Chehab Date: Wed Jun 16 13:13:54 2021 +0200 media: dvb_net: avoid speculation from net slot The risk of especulation is actually almost-non-existing here, as there are very few users of TCP/IP using the DVB stack, as, this is mainly used with DVB-S/S2 cards, and only by people that receives TCP/IP from satellite connections, which limits a lot the number of users of such feature(*). (*) In thesis, DVB-C cards could also benefit from it, but I'm yet to see a hardware that supports it. Yet, fixing it is trivial. Signed-off-by: Mauro Carvalho Chehab commit d382c5be4cc24597d5d12800558e537bbc12a71a Author: Mauro Carvalho Chehab Date: Wed Jun 16 13:02:07 2021 +0200 media: dvb_ca_en50221: avoid speculation from CA slot As warned by smatch: drivers/media/dvb-core/dvb_ca_en50221.c:1392 dvb_ca_en50221_io_do_ioctl() warn: potential spectre issue 'ca->slot_info' [r] (local cap) There's a potential of using a CAM ioctl for speculation. The risk here is minimum, as only a small subset of DVB boards have CI, with a CAM module installed. Also, exploiting it would require a user capable of starting a DVB application. There are probably a lot of easier ways to try to exploit. Yet, it doesn't harm addressing it. Signed-off-by: Mauro Carvalho Chehab commit 38a9eb8182a24c7ef2dbe82ab46cafe8f8e9b271 Author: Kai Ye Date: Fri Jun 11 17:06:50 2021 +0800 crypto: hisilicon/zip - adds the max shaper type rate The ZIP driver support configure each function's QoS in the Host for Kunpeng930. The ZIP driver needs to configure the maximum shaper type rate. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit c02f5302e46a2505cb0a6170470759a7db929979 Author: Kai Ye Date: Fri Jun 11 17:06:49 2021 +0800 crypto: hisilicon/hpre - adds the max shaper type rate The HPRE driver support configure each function's QoS in the Host for Kunpeng930. The HPRE driver needs to configure the maximum shaper type rate. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 3d2a429271bb622da48983631625c20de3b5f1e5 Author: Kai Ye Date: Fri Jun 11 17:06:48 2021 +0800 crypto: hisilicon/sec - adds the max shaper type rate The SEC driver support configure each function's QoS in the Host for Kunpeng930. The SEC driver needs to configure the maximum shaper type rate. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 3bbf0783636be8fd672907df25904288f14566f2 Author: Kai Ye Date: Fri Jun 11 17:06:47 2021 +0800 crypto: hisilicon/qm - supports to inquiry each function's QoS 1. The ACC driver supports to inquiry each function's QoS in the Host and VM. The driver supports reading QoS by the device debug SysFS attribute file "alg_qos", like "cat alg_qos". 2. Modify the communication process between pf and vf as needed. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 2966d9d3078c623f48054ef1bfe9a975e5d1fe0c Author: Kai Ye Date: Fri Jun 11 17:06:46 2021 +0800 crypto: hisilicon/qm - add pf ping single vf function According to the function communication, add pf ping single vf function to be used in the vf read QoS. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 362c50bad3a792969f8142372a0813aadee89a61 Author: Kai Ye Date: Fri Jun 11 17:06:45 2021 +0800 crypto: hisilicon/qm - merges the work initialization process into a single function Merges the work initialization process into a single function from qm initialization. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit cc0c40c613d2c7a00f3bce4770a925dc56672f01 Author: Kai Ye Date: Fri Jun 11 17:06:44 2021 +0800 crypto: hisilicon/qm - add the "alg_qos" file node 1. Just move the code as needed. 2. Add the "alg_qos" file node in the qm debug sysfs. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 72b010dc33b9598883bc84d40b0a9d07c16f5e39 Author: Kai Ye Date: Fri Jun 11 17:06:43 2021 +0800 crypto: hisilicon/qm - supports writing QoS int the host Based on the Token bucket algorithm. The HAC driver supports to configure each function's QoS in the host. The driver supports writing QoS by the debugfs node that named "alg_qos". The qos value is 1~1000. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 10ff9976d06fc6a11f512755d500ab2860cbe650 Author: Liu Shixin Date: Fri Jun 11 10:01:00 2021 +0800 crypto: api - remove CRYPTOA_U32 and related functions According to the advice of Eric and Herbert, type CRYPTOA_U32 has been unused for over a decade, so remove the code related to CRYPTOA_U32. After removing CRYPTOA_U32, the type of the variable attrs can be changed from union to struct. Signed-off-by: Liu Shixin Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 22ca9f4aaf431a9413dcc115dd590123307f274f Author: Ard Biesheuvel Date: Thu Jun 10 08:21:50 2021 +0200 crypto: shash - avoid comparing pointers to exported functions under CFI crypto_shash_alg_has_setkey() is implemented by testing whether the .setkey() member of a struct shash_alg points to the default version, called shash_no_setkey(). As crypto_shash_alg_has_setkey() is a static inline, this requires shash_no_setkey() to be exported to modules. Unfortunately, when building with CFI, function pointers are routed via CFI stubs which are private to each module (or to the kernel proper) and so this function pointer comparison may fail spuriously. Let's fix this by turning crypto_shash_alg_has_setkey() into an out of line function. Cc: Sami Tolvanen Cc: Eric Biggers Signed-off-by: Ard Biesheuvel Reviewed-by: Eric Biggers Reviewed-by: Sami Tolvanen Signed-off-by: Herbert Xu commit 87c8ba5cd7f99b1c05589c455703f54e92f43ed0 Author: Baokun Li Date: Wed Jun 9 15:15:26 2021 +0800 crypto: ccp - Use list_move_tail instead of list_del/list_add_tail in ccp-dmaengine.c Using list_move_tail() instead of list_del() + list_add_tail() in ccp-dmaengine.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Herbert Xu commit 3f52c9aef27b0427ff4091f3d08095219e1046af Author: Tom Rix Date: Tue Jun 8 14:23:43 2021 -0700 crypto: marvell/cesa - change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Signed-off-by: Herbert Xu commit 3c53642324f526c0aba411bf8e6cf2ab2471192a Merge: 07d8ad6fd8a3d fae5c9f3664ba Author: Michael Ellerman Date: Thu Jun 17 16:51:38 2021 +1000 Merge branch 'topic/ppc-kvm' into next Merge some powerpc KVM patches from our topic branch. In particular this brings in Nick's big series rewriting parts of the guest entry/exit path in C. Conflicts: arch/powerpc/kernel/security.c arch/powerpc/kvm/book3s_hv_rmhandlers.S commit 07d8ad6fd8a3d47f50595ca4826f41dbf4f3a0c6 Author: Aneesh Kumar K.V Date: Thu Jun 10 14:06:39 2021 +0530 powerpc/mm/book3s64: Fix possible build error Update _tlbiel_pid() such that we can avoid build errors like below when using this function in other places. arch/powerpc/mm/book3s64/radix_tlb.c: In function ‘__radix__flush_tlb_range_psize’: arch/powerpc/mm/book3s64/radix_tlb.c:114:2: warning: ‘asm’ operand 3 probably does not match constraints 114 | asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) | ^~~ arch/powerpc/mm/book3s64/radix_tlb.c:114:2: error: impossible constraint in ‘asm’ make[4]: *** [scripts/Makefile.build:271: arch/powerpc/mm/book3s64/radix_tlb.o] Error 1 m With this fix, we can also drop the __always_inline in __radix_flush_tlb_range_psize which was added by commit e12d6d7d46a6 ("powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline") Signed-off-by: Aneesh Kumar K.V Reviewed-by: Christophe Leroy Acked-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210610083639.387365-1-aneesh.kumar@linux.ibm.com commit a3309226454a7e76d76251579c1183787694f303 Author: Michael Ellerman Date: Thu Jun 10 17:29:49 2021 +1000 powerpc/signal64: Don't read sigaction arguments back from user memory When delivering a signal to a sigaction style handler (SA_SIGINFO), we pass pointers to the siginfo and ucontext via r4 and r5. Currently we populate the values in those registers by reading the pointers out of the sigframe in user memory, even though the values in user memory were written by the kernel just prior: unsafe_put_user(&frame->info, &frame->pinfo, badframe_block); unsafe_put_user(&frame->uc, &frame->puc, badframe_block); ... if (ksig->ka.sa.sa_flags & SA_SIGINFO) { err |= get_user(regs->gpr[4], (unsigned long __user *)&frame->pinfo); err |= get_user(regs->gpr[5], (unsigned long __user *)&frame->puc); ie. we write &frame->info into frame->pinfo, and then read frame->pinfo back into r4, and similarly for &frame->uc. The code has always been like this, since linux-fullhistory commit d4f2d95eca2c ("Forward port of 2.4 ppc64 signal changes."). There's no reason for us to read the values back from user memory, rather than just setting the value in the gpr[4/5] directly. In fact reading the value back from user memory opens up the possibility of another user thread changing the values before we read them back. Although any process doing that would be racing against the kernel delivering the signal, and would risk corrupting the stack, so that would be a userspace bug. Note that this is 64-bit only code, so there's no subtlety with the size of pointers differing between kernel and user. Also the frame variable is not modified to point elsewhere during the function. In the past reading the values back from user memory was not costly, but now that we have KUAP on some CPUs it is, so we'd rather avoid it for that reason too. So change the code to just set the values directly, using the same values we have written to the sigframe previously in the function. Note also that this matches what our 32-bit signal code does. Using a version of will-it-scale's signal1_threads that sets SA_SIGINFO, this results in a ~4% increase in signals per second on a Power9, from 229,777 to 239,766. Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210610072949.3198522-1-mpe@ellerman.id.au commit 1d1f6cc5818c750ac69473e4951e7165913fbf16 Author: Kees Cook Date: Tue Jun 15 10:19:13 2021 -0700 pstore/blk: Include zone in pstore_device_info Information was redundant between struct pstore_zone_info and struct pstore_device_info. Use struct pstore_zone_info, with member name "zone". Additionally untangle the logic for the "best effort" block device instance. Signed-off-by: Kees Cook Fixed-by: Pu Lehui Link: https://lore.kernel.org/lkml/20210617005424.182305-1-pulehui@huawei.com commit 4a638d581a7a3f00f277349903ff419b6790e2ae Author: Lorenz Bauer Date: Wed Jun 16 09:36:35 2021 +0100 libbpf: Fail compilation if target arch is missing bpf2go is the Go equivalent of libbpf skeleton. The convention is that the compiled BPF is checked into the repository to facilitate distributing BPF as part of Go packages. To make this portable, bpf2go by default generates both bpfel and bpfeb variants of the C. Using bpf_tracing.h is inherently non-portable since the fields of struct pt_regs differ between platforms, so CO-RE can't help us here. The only way of working around this is to compile for each target platform independently. bpf2go can't do this by default since there are too many platforms. Define the various PT_... macros when no target can be determined and turn them into compilation failures. This works because bpf2go always compiles for bpf targets, so the compiler fallback doesn't kick in. Conditionally define __BPF_MISSING_TARGET so that we can inject a more appropriate error message at build time. The user can then choose which platform to target explicitly. Signed-off-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210616083635.11434-1-lmb@cloudflare.com commit dfdda1a0f4aad476ae25f2840c9426da3b99506d Author: Wang Hai Date: Tue Jun 15 21:57:24 2021 +0800 samples/bpf: Add missing option to xdp_sample_pkts usage xdp_sample_pkts usage() is missing the introduction of the "-S" option, this patch adds it. Fixes: d50ecc46d18f ("samples/bpf: Attach XDP programs in driver mode by default") Signed-off-by: Wang Hai Signed-off-by: Andrii Nakryiko Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20210615135724.29528-1-wanghai38@huawei.com commit bf067f1c51239ba70be714c513820d2c4a5cd457 Author: Wang Hai Date: Tue Jun 15 21:55:54 2021 +0800 samples/bpf: Add missing option to xdp_fwd usage xdp_fwd usage() is missing the introduction of the "-S" and "-F" options, this patch adds it. Fixes: d50ecc46d18f ("samples/bpf: Attach XDP programs in driver mode by default") Signed-off-by: Wang Hai Signed-off-by: Andrii Nakryiko Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20210615135554.29158-1-wanghai38@huawei.com commit 712b78c697cd75b62b7707b5a20bcd914aedfdaa Author: Shuyi Cheng Date: Wed Jun 16 10:04:36 2021 +0800 bpf: Fix typo in kernel/bpf/bpf_lsm.c Fix s/sleeable/sleepable/ typo in a comment. Signed-off-by: Shuyi Cheng Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1623809076-97907-1-git-send-email-chengshuyi@linux.alibaba.com commit da1eab9e15ef96c10e5cadd73ebe113e7947f8f7 Author: Hao Fang Date: Sat May 22 18:21:57 2021 +0800 ARM: dts: hisilicon: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to the official website https://www.hisilicon.com/en. Signed-off-by: Hao Fang Signed-off-by: Wei Xu commit e3211e414d26cda43f3093fd09e5d8d0a797648f Author: Hao Fang Date: Sat May 22 18:20:32 2021 +0800 arm64: dts: hisilicon: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to the official website https://www.hisilicon.com/en. Signed-off-by: Hao Fang Acked-by: Rob Herring Signed-off-by: Wei Xu commit 836382dc24717af203ce06703530528827086955 Author: Pablo Neira Ayuso Date: Wed Jun 16 22:25:05 2021 +0200 netfilter: nf_tables: add last expression Add a new optional expression that tells you when last matching on a given rule / set element element has happened. Signed-off-by: Pablo Neira Ayuso commit a979522a1a88556e42a22ce61bccc58e304cb361 Author: Matthias Maennich Date: Sat Jun 12 15:18:38 2021 +0100 kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set To avoid unnecessary recompilations, mkcompile_h does not regenerate compile.h if just the timestamp changed. Though, if KBUILD_BUILD_TIMESTAMP is set, an explicit timestamp for the build was requested, in which case we should not ignore it. If a user follows the documentation for reproducible builds [1] and defines KBUILD_BUILD_TIMESTAMP as the git commit timestamp, a clean build will have the correct timestamp. A subsequent cherry-pick (or amend) changes the commit timestamp and if an incremental build is done with a different KBUILD_BUILD_TIMESTAMP now, that new value is not taken into consideration. But it should for reproducibility. Hence, whenever KBUILD_BUILD_TIMESTAMP is explicitly set, do not ignore UTS_VERSION when making a decision about whether the regenerated version of compile.h should be moved into place. [1] https://www.kernel.org/doc/html/latest/kbuild/reproducible-builds.html Signed-off-by: Matthias Maennich Signed-off-by: Masahiro Yamada commit 4a6795933a890d41504c6df04527d1e093a4cbe6 Author: Mark Brown Date: Mon Jun 7 15:02:06 2021 +0100 kbuild: modpost: Explicitly warn about unprototyped symbols One common cause of modpost version generation failures is a failure to prototype exported assembly functions - the tooling requires this for exported functions even if they are not and should not be called from C code in order to do the version mangling for symbols. Unfortunately the error message is currently rather abstruse, simply saying that "version generation failed" and even diving into the code doesn't directly show what's going on since there's several steps between the problem and it being observed. Provide an explicit hint as to the likely cause of a version generation failure to help anyone who runs into this in future more readily diagnose and fix the problem. Signed-off-by: Mark Brown Signed-off-by: Masahiro Yamada commit 74ee585b7eecd98be3650e677625a0ee588d08e0 Author: Masahiro Yamada Date: Wed Jun 2 23:02:13 2021 +0900 kbuild: remove trailing slashes from $(KBUILD_EXTMOD) M= (or KBUILD_EXTMOD) generally expects a directory path without any trailing slashes, like M=a/b/c. If you add a trailing slash, like M=a/b/c/, you will get ugly build logs (two slashes in a series), but it still works fine as long as it is consistent between 'make modules' and 'make modules_install'. The following commands correctly build and install the modules. $ make M=a/b/c/ modules $ sudo make M=a/b/c/ modules_install Since commit ccae4cfa7bfb ("kbuild: refactor scripts/Makefile.modinst"), a problem happens if you add a trailing slash only for modules_install. $ make M=a/b/c modules $ sudo make M=a/b/c/ modules_install No module is installed in this case, Johannes Berg reported. [1] Trim any trailing slashes from $(KBUILD_EXTMOD). I used the 'dirname' command to remove all the trailing slashes in case someone adds more slashes like M=a/b/c/////. The Make's built-in function, $(dir ...) cannot take care of such a case. [1]: https://lore.kernel.org/lkml/10cc8522b27a051e6a9c3e158a4c4b6414fd04a0.camel@sipsolutions.net/ Fixes: ccae4cfa7bfb ("kbuild: refactor scripts/Makefile.modinst") Reported-by: Johannes Berg Signed-off-by: Masahiro Yamada commit 1eb5f83ee936de6a69b2bcee95088a6e0ab7c202 Merge: e73153ba0c7f6 2c1bc37126886 Author: Olof Johansson Date: Wed Jun 16 17:36:17 2021 -0700 Merge tag 'memory-controller-drv-tegra-5.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.14 - Tegra SoC, part two Second set of changes for Tegra SoC memory controller drivers, containing patchset from Thierry Reding: "The goal here is to avoid early identity mappings altogether and instead postpone the need for the identity mappings to when devices are attached to the SMMU. This works by making the SMMU driver coordinate with the memory controller driver on when to start enforcing SMMU translations. This makes Tegra behave in a more standard way and pushes the code to deal with the Tegra-specific programming into the NVIDIA SMMU implementation." This pulls a dependency from Will Deacon (ARM SMMU driver) and contains further ARM SMMU driver patches to resolve complex dependencies between different patchsets. The pull from Will contains only one patch ("Implement ->probe_finalize()"). Further work in Will's tree might depend on this patch, therefore patch was applied there. On the other hand, this ("Implement ->probe_finalize()") patch is also a dependency for ARM SMMU driver changes for Tegra. These changes, bringing seamless transition from the firmware framebuffer to the OS framebuffer, depend on earlier Tegra memory controller driver patches. * tag 'memory-controller-drv-tegra-5.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (37 commits) iommu/arm-smmu: Use Tegra implementation on Tegra186 iommu/arm-smmu: tegra: Implement SID override programming iommu/arm-smmu: tegra: Detect number of instances at runtime dt-bindings: arm-smmu: Add Tegra186 compatible string memory: tegra: Delete dead debugfs checking code iommu/arm-smmu: Implement ->probe_finalize() memory: tegra: Implement SID override programming memory: tegra: Split Tegra194 data into separate file memory: tegra: Add memory client IDs to tables memory: tegra: Unify drivers memory: tegra: Only initialize reset controller if available memory: tegra: Make IRQ support opitonal memory: tegra: Parameterize interrupt handler memory: tegra: Extract setup code into callback memory: tegra: Make per-SoC setup more generic memory: tegra: Push suspend/resume into SoC drivers memory: tegra: Introduce struct tegra_mc_ops memory: tegra: Unify struct tegra_mc across SoC generations memory: tegra: Consolidate register fields memory: tegra30-emc: Use devm_tegra_core_dev_init_opp_table() ... Link: https://lore.kernel.org/r/20210614195200.21657-1-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit 9be389934dc5f0b5fa45b4b766897c9d8259ff41 Merge: 194eb4eab5db5 7db3cde5123e2 Author: Olof Johansson Date: Wed Jun 16 17:33:11 2021 -0700 Merge tag 'amlogic-arm-dt-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM DT changes for v5.14: - Set the fifo-size of uart_A to 128 bytes like the ARM64 counterpart * tag 'amlogic-arm-dt-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson: Set the fifo-size of uart_A to 128 bytes Link: https://lore.kernel.org/r/2f19a5a1-3ed9-dd11-02f1-7d535cb1c25c@baylibre.com Signed-off-by: Olof Johansson commit 194eb4eab5db512dcbd9192db557434af3cd8319 Merge: 8d8538a497df5 303d2af21aede Author: Olof Johansson Date: Wed Jun 16 17:32:50 2021 -0700 Merge tag 'amlogic-arm64-dt-for-v5.14-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM64 DT changes for v5.14 round 2: - various fixes for Odroid C4/HC4 regulators handling, USB and SPI NOR Flash for HC4 * tag 'amlogic-arm64-dt-for-v5.14-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: meson-sm1-odroid-c4: remove invalid hub_5v regulator arm64: dts: meson-sm1-odroid-hc4: add spifc node to ODROID-HC4 arm64: dts: meson-sm1-odroid-hc4: add regulators controlled by GPIOH_8 arm64: dts: meson-sm1-odroid-hc4: disable unused USB PHY0 arm64: dts: meson-sm1-odroid: add 5v regulator gpio arm64: dts: meson-sm1-odroid: set tf_io regulator gpio as open source arm64: dts: meson-sm1-odroid: add missing enable gpio and supply for tf_io regulator Link: https://lore.kernel.org/r/c953e97a-f901-a749-1fb6-b1caa75b4748@baylibre.com Signed-off-by: Olof Johansson commit c8700d80d75e8b5d31ea91e1a825b3cf87f823f4 Merge: 020b31abb7ad6 d1588b22dcbb6 Author: Olof Johansson Date: Wed Jun 16 17:32:27 2021 -0700 Merge tag 'visconti-arm-defconfig-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti into arm/defconfig Visconti defconfig updates for v5.14 - Enable Visconti's PWM in the ARM64 defconfig as a module. - Enable Visconti's GPIO in the ARM64 defconfig. * tag 'visconti-arm-defconfig-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti: arm64: defconfig: Visconti: Enable GPIO arm64: defconfig: Visconti: Enable PWM Link: https://lore.kernel.org/r/20210615231232.pllzlqoamkmnsqq6@toshiba.co.jp Signed-off-by: Olof Johansson commit 3de27ef12ccb50205e602d92f29d082429aa2964 Author: Aswath Govindraju Date: Wed Jun 16 22:42:24 2021 +0530 arm64: dts: ti: k3-am64-main: Update TF-A load address to workaround USB DFU limitation Due to a limitation for USB DFU boot mode, SPL load address has to be less than or equal to 0x70001000. So, load address of SPL and TF-A have been moved to 0x70000000 and 0x701c0000 respectively, in U-Boot version 2021.10. Therefore, update TF-A's location in the device tree node. Signed-off-by: Aswath Govindraju Reviewed-by: Suman Anna Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210616171224.24635-4-a-govindraju@ti.com commit 454a9d4aaacb89daea350d21628992bb83de649f Author: Aswath Govindraju Date: Wed Jun 16 22:42:23 2021 +0530 arm64: dts: ti: k3-am64-main: Reserve OCMRAM for DMSC-lite and secure proxy communication The final 128KB in SRAM is reserved by default for DMSC-lite code and secure proxy communication buffer. The memory region used for DMSC-lite code can be optionally freed up by secure firmware API[1]. However, the buffer for secure proxy communication is not configurable. This default hardware configuration is unique for AM64. Therefore, indicate the area reserved for DMSC-lite code and secure proxy communication buffer in the oc_sram device tree node. [1] - http://downloads.ti.com/tisci/esd/latest/6_topic_user_guides/security_handover.html#triggering-security-handover Signed-off-by: Aswath Govindraju Reviewed-by: Suman Anna Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210616171224.24635-3-a-govindraju@ti.com commit 263820efa3fb08cc606736b68290d9be9c46e2e5 Author: Aswath Govindraju Date: Wed Jun 16 22:42:22 2021 +0530 arm64: dts: ti: k3-am64-main: Update TF-A's maximum size and node name The maximum size of TF-A 2.5 has been increased to 0x1c000 [1]. In order to account for future expansions too, increase the allocated size for TF-A to 0x20000, in the device tree node. Also, update the node name to "tfa-sram". [1] - https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=2fb5312f61a7de8b7a70e1639199c4f14a10b6f9 Signed-off-by: Aswath Govindraju Reviewed-by: Suman Anna Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210616171224.24635-2-a-govindraju@ti.com commit 915e4af59f0b6a9e72dd9ef0fda853b87ae556c5 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:34 2021 +0300 RDMA: Remove rdma_set_device_sysfs_group() The driver's device group can be specified as part of the ops structure like the device's port group. No need for the complicated API. Link: https://lore.kernel.org/r/8964785a34fd3a29ff5b6693493f575b717e594d.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 69d86a66bdf0d5aa7e687751203e5e6a94124fb5 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:33 2021 +0300 RDMA/core: Allow port_groups to be used with namespaces Now that the port_groups data is being destroyed and managed by the core code this restriction is no longer needed. All the ib_port_attrs are compatible with the core's sysfs lifecycle. When the main device is destroyed and moved to another namespace the driver's port sysfs can be created/destroyed as well due to it now being a simple attribute list. Link: https://lore.kernel.org/r/afd8b676eace2821692d44489ff71856277c48d1.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d7407d16699884817f3a93218e77b0801942362b Author: Jason Gunthorpe Date: Fri Jun 11 19:00:32 2021 +0300 RDMA: Change ops->init_port to ops->port_groups init_port was only being used to register sysfs attributes against the port kobject. Now that all users are creating static attribute_group's we can simply set the attribute_group list in the ops and the core code can just handle it directly. This makes all the sysfs management quite straightforward and prevents any driver from abusing the naked port kobject in future because no driver code can access it. Link: https://lore.kernel.org/r/114f68f3d921460eafe14cea5a80ca65d81729c3.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8f1708f19f919135a5d7eddcdccc15b7fd7d524d Author: Jason Gunthorpe Date: Fri Jun 11 19:00:31 2021 +0300 RDMA/hfi1: Use attributes for the port sysfs hfi1 should not be creating a mess of kobjects to attach to the port kobject - this is all attributes. The proper API is to create an attribute_group list and create it against the port's kobject. Link: https://lore.kernel.org/r/cbe0ccb6175dd22274359b6ad803a37435a70e91.1623427137.git.leonro@nvidia.com Tested-by: Mike Marciniszyn Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4a7aaf88c89f12f8048137e274ce0d40fe1056b2 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:30 2021 +0300 RDMA/qib: Use attributes for the port sysfs qib should not be creating a mess of kobjects to attach to the port kobject - this is all attributes. The proper API is to create an attribute_group list and create it against the port's kobject. Link: https://lore.kernel.org/r/911e0031e1ed495b0006e8a6efec7b67a702cd5e.1623427137.git.leonro@nvidia.com Tested-by: Mike Marciniszyn Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 526a12c8c56e80930621cedcf8b5f2fc3a169037 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:29 2021 +0300 RDMA/cm: Use an attribute_group on the ib_port_attribute intead of kobj's This code is trying to attach a list of counters grouped into 4 groups to the ib_port sysfs. Instead of creating a bunch of kobjects simply express everything naturally as an ib_port_attribute and add a single attribute_groups list. Remove all the naked kobject manipulations. Link: https://lore.kernel.org/r/0d5a7241ee0fe66622de04fcbaafaf6a791d5c7c.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 054239f45c6346025afe252fe6f470a4093f61f9 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:28 2021 +0300 RDMA/core: Expose the ib port sysfs attribute machinery Other things outside the core code are creating attributes against the port. This patch exposes the basic machinery to do this. The ib_port_attribute type allows creating groups of attributes attatched to the port and comes with the usual machinery to do this. Link: https://lore.kernel.org/r/5c4aeae57f6fa7c59a1d6d1c5506069516ae9bbf.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d89eb509aaa36a08f983eac58b9fccd61ff3d375 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:27 2021 +0300 RDMA/core: Remove the kobject_uevent() NOP This call does nothing because the ib_port kobj is nested under a struct device kobject and the dev_uevent_filter() function of the struct device blocks uevents for any children kobj's that are not also struct devices. A uevent for the struct device will be triggered after ib_setup_port_attrs() returns which causes udev to pick up all the deep "attributes" which are implemented as kobjects nested under a struct device and assign them to the udev object for the struct device: $ udevadm info -a /sys/class/infiniband/ibp0s9 ATTR{ports/1/counters/excessive_buffer_overrun_errors}=="0" Link: https://lore.kernel.org/r/49231c92c7d4c60686de18f7e20932d0c82160ee.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b7066b32a14fd21480efd93cb0c24807d6b28484 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:26 2021 +0300 RDMA/core: Create the device hw_counters through the normal groups mechanism Instead of calling device_add_groups() add the group to the existing groups array which is managed through device_add(). This requires setting up the hw_counters before device_add(), so it gets split up from the already split port sysfs flow. Move all the memory freeing to the release function. Link: https://lore.kernel.org/r/666250d937b64f6fdf45da9e2dc0b6e5e4f7abd8.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2ca1cca4352ed50a363159aa9b8eeb6182446580 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:25 2021 +0300 RDMA/core: Simplify how the port sysfs is created Use the same technique as gid_attrs now uses to manage the port sysfs. Bundle everything into three allocations and use a single sysfs_create_groups() to build everything in one shot. All the memory is always freed in the kobj release function, removing most of the error unwinding. The gid_attr technique and the hw_counters are very similar, merge the two together and combine the sysfs_create_group() call for hw_counters with the single sysfs group setup. Link: https://lore.kernel.org/r/b688f3340694c59f7b44b1bde40e25559ef43cf3.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a4676388e2e21215b32f33b42ac5725e315a6680 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:24 2021 +0300 RDMA/core: Simplify how the gid_attrs sysfs is created Instead of having an whole bunch of different allocations to create the gid_attr kobjects reduce it to three, one for the kobj struct plus the attributes, and one for the attribute list for each of the two groups. Move the freeing of all allocations to the release function. Reorder the operations so all the allocations happen first then the kobject & sysfs operations are last. This removes the majority of the complicated error unwind since the release function will always undo all the memory allocations. Freeing the memory is also much simpler since there is a lot less of it. Consolidate creating the "group of array indexes" pattern into one helper function. Ensure kobject_del is used. Link: https://lore.kernel.org/r/f4149d379db7178d37d11d75e3026bf550f818a1.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a32f433522c97d2f07c060517f1f0f4058aa211b Author: Jason Gunthorpe Date: Fri Jun 11 19:00:23 2021 +0300 RDMA/core: Split gid_attrs related sysfs from add_port() The gid_attrs directory is a dedicated kobj nested under the port, construct/destruct it with its own pair of functions for understandability. This is much more readable than having it weirdly inlined out of order into the add_port() function. Link: https://lore.kernel.org/r/1c9434111b6770a7aef0e644a88a16eee7e325b8.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 467f432a521a284c418e3d521ee51840a5e23424 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:22 2021 +0300 RDMA/core: Split port and device counter sysfs attributes This code creates a 'struct hw_stats_attribute' for each sysfs entry that contains a naked 'struct attribute' inside. It then proceeds to attach this same structure to a 'struct device' kobj and a 'struct ib_port' kobj. However, this violates the typing requirements. 'struct device' requires the attribute to be a 'struct device_attribute' and 'struct ib_port' requires the attribute to be 'struct port_attribute'. This happens to work because the show/store function pointers in all three structures happen to be at the same offset and happen to be nearly the same signature. This means when container_of() was used to go between the wrong two types it still managed to work. However clang CFI detection notices that the function pointers have a slightly different signature. As with show/store this was only working because the device and port struct layouts happened to have the kobj at the front. Correct this by have two independent sets of data structures for the port and device case. The two different attributes correctly include the port/device_attribute struct and everything from there up is kept split. The show/store function call chains start with device/port unique functions that invoke a common show/store function pointer. Link: https://lore.kernel.org/r/a8b3864b4e722aed3657512af6aa47dc3c5033be.1623427137.git.leonro@nvidia.com Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Cc: Kees Cook Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d8a5883814b9f7c08d7ff291070687d925b4f859 Author: Jason Gunthorpe Date: Fri Jun 11 19:00:21 2021 +0300 RDMA/core: Replace the ib_port_data hw_stats pointers with a ib_port pointer It is much saner to store a pointer to the kobject structure that contains the cannonical stats pointer than to copy the stats pointers into a public structure. Future patches will require the sysfs pointer for other purposes. Link: https://lore.kernel.org/r/f90551dfd296cde1cb507bbef27cca9891d19871.1623427137.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4b5f4d3fb40898a9f2ccf58030e69ea11fbd6eed Author: Jason Gunthorpe Date: Fri Jun 11 19:00:20 2021 +0300 RDMA: Split the alloc_hw_stats() ops to port and device variants This is being used to implement both the port and device global stats, which is causing some confusion in the drivers. For instance EFA and i40iw both seem to be misusing the device stats. Split it into two ops so drivers that don't support one or the other can leave the op NULL'd, making the calling code a little simpler to understand. Link: https://lore.kernel.org/r/1955c154197b2a159adc2dc97266ddc74afe420c.1623427137.git.leonro@nvidia.com Tested-by: Gal Pressman Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 570d2b99d00d9e023328c0a0b8000ab485113384 Author: Bob Pearson Date: Mon Jun 7 23:25:53 2021 -0500 RDMA/rxe: Disallow MR dereg and invalidate when bound Check that an MR has no bound MWs before allowing a dereg or invalidate operation. Link: https://lore.kernel.org/r/20210608042552.33275-11-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit cdd0b85675aecc77eba8c38d55070a014a49ab98 Author: Bob Pearson Date: Mon Jun 7 23:25:52 2021 -0500 RDMA/rxe: Implement memory access through MWs Add code to implement memory access through memory windows. Link: https://lore.kernel.org/r/20210608042552.33275-10-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 3902b429ca14f325123057f3e5cafe8d45d00263 Author: Bob Pearson Date: Mon Jun 7 23:25:51 2021 -0500 RDMA/rxe: Implement invalidate MW operations Implement invalidate MW and cleaned up invalidate MR operations. Added code to perform remote invalidate for send with invalidate. Added code to perform local invalidation. Deleted some blank lines in rxe_loc.h. Link: https://lore.kernel.org/r/20210608042552.33275-9-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 32a577b4c3a9d0b5d3e47ac47ffd50774a04f82a Author: Bob Pearson Date: Mon Jun 7 23:25:50 2021 -0500 RDMA/rxe: Add support for bind MW work requests Add support for bind MW work requests from user space. Since rdma/core does not support bind mw in ib_send_wr there is no way to support bind mw in kernel space. Added bind_mw local operation in rxe_req.c. Added bind_mw WR operation in rxe_opcode.c. Added bind_mw WC in rxe_comp.c. Added additional fields to rxe_mw in rxe_verbs.h. Added rxe_do_dealloc_mw() subroutine to cleanup an mw when rxe_dealloc_mw is called. Added code to implement bind_mw operation in rxe_mw.c Link: https://lore.kernel.org/r/20210608042552.33275-8-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit c1a411268a4b17ecdf271f0cefed53e10e9fa166 Author: Bob Pearson Date: Mon Jun 7 23:25:49 2021 -0500 RDMA/rxe: Move local ops to subroutine Simplify rxe_requester() by moving the local operations to a subroutine. Add an error return for illegal send WR opcode. Moved next_index ahead of rxe_run_task which fixed a small bug where work completions were delayed until after the next wqe which was not the intended behavior. Let errors return their own WC status. Previously all errors were reported as protection errors which was incorrect. Changed the return of errors from rxe_do_local_ops() to err: which causes an immediate completion. Without this an error on a last WR may get lost. Changed fill_packet() to finish_packet() which is more accurate. Fixes: 8700e2e7c485 ("The software RoCE driver") Link: https://lore.kernel.org/r/20210608042552.33275-7-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 886441fb2e658e601e22705c1a9c856ac2e8a464 Author: Bob Pearson Date: Mon Jun 7 23:25:48 2021 -0500 RDMA/rxe: Replace WR_REG_MASK by WR_LOCAL_OP_MASK Rxe has two mask bits WR_LOCAL_MASK and WR_REG_MASK with WR_REG_MASK used to indicate any local operation and WR_LOCAL_MASK unused. This patch replaces both of these with one mask bit WR_LOCAL_OP_MASK which is clearer. Link: https://lore.kernel.org/r/20210608042552.33275-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit beec0239c3fae5828cc2f4b8869d75d8b3e82ee7 Author: Bob Pearson Date: Mon Jun 7 23:25:47 2021 -0500 RDMA/rxe: Add ib_alloc_mw and ib_dealloc_mw verbs Add ib_alloc_mw and ib_dealloc_mw verbs APIs. Added new file rxe_mw.c focused on MWs. Changed the 8 bit random key generator. Added a cleanup routine for MWs. Added verbs routines to ib_device_ops. Link: https://lore.kernel.org/r/20210608042552.33275-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit af732adfacb2c6d886713624af2ff8e555c32aa4 Author: Bob Pearson Date: Mon Jun 7 23:25:46 2021 -0500 RDMA/rxe: Enable MW object pool Currently the rxe driver has a rxe_mw struct object but nothing about memory windows is enabled. This patch turns on memory windows and some minor cleanup. Set device attribute in rxe.c so max_mw = MAX_MW. Change parameters in rxe_param.h so that MAX_MW is the same as MAX_MR. Reduce the number of MRs and MWs to 4K from 256K. Add device capability bits for 2a and 2b memory windows. Removed RXE_MR_TYPE_MW from the rxe_mr_type enum. Link: https://lore.kernel.org/r/20210608042552.33275-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 08224016abde5ddca25bb976a66c974b2e2bdbed Author: Bob Pearson Date: Mon Jun 7 23:25:45 2021 -0500 RDMA/rxe: Return errors for add index and key Modify rxe_add_index() and rxe_add_key() to return an error if the index or key is aleady present in the pool. Currently they print a warning and silently fail with bad consequences to the caller. Link: https://lore.kernel.org/r/20210608042552.33275-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 660a59369e1ed96dd0ff1d9d73bad5b48aa50884 Author: Bob Pearson Date: Mon Jun 7 23:25:44 2021 -0500 RDMA/rxe: Add bind MW fields to rxe_send_wr Add fields to struct rxe_send_wr in rdma_user_rxe.h to support bind MW work requests Link: https://lore.kernel.org/r/20210608042552.33275-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 809ed84de8b3f2fd7b1d06efb94bf98fd318a7d7 Author: Daniel Xu Date: Wed Jun 16 14:52:11 2021 -0700 selftests/bpf: Whitelist test_progs.h from .gitignore Somehow test_progs.h was being included by the existing rule: /test_progs* This is bad because: 1) test_progs.h is a checked in file 2) grep-like tools like ripgrep[0] respect gitignore and test_progs.h was being hidden from searches [0]: https://github.com/BurntSushi/ripgrep Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule") Signed-off-by: Daniel Xu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/a46f64944bf678bc652410ca6028d3450f4f7f4b.1623880296.git.dxu@dxuuu.xyz commit 15ae1375ea91ae2dee6f12d71a79d8c0a10a30bf Author: Bob Pearson Date: Fri Jun 4 18:05:59 2021 -0500 RDMA/rxe: Fix qp reference counting for atomic ops Currently the rdma_rxe driver attempts to protect atomic responder resources by taking a reference to the qp which is only freed when the resource is recycled for a new read or atomic operation. This means that in normal circumstances there is almost always an extra qp reference once an atomic operation has been executed which prevents cleaning up the qp and associated pd and cqs when the qp is destroyed. This patch removes the call to rxe_add_ref() in send_atomic_ack() and the call to rxe_drop_ref() in free_rd_atomic_resource(). If the qp is destroyed while a peer is retrying an atomic op it will cause the operation to fail which is acceptable. Link: https://lore.kernel.org/r/20210604230558.4812-1-rpearsonhpe@gmail.com Reported-by: Zhu Yanjun Fixes: 86af61764151 ("IB/rxe: remove unnecessary skb_clone") Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 8fe55ef23387ce3c7488375b1fd539420d7654bb Author: Russell King Date: Thu May 13 15:18:27 2021 +0100 PCI: Dynamically map ECAM regions Attempting to boot 32-bit ARM kernels under QEMU's 3.x virt models fails when we have more than 512M of RAM in the model as we run out of vmalloc space for the PCI ECAM regions. This failure will be silent when running libvirt, as the console in that situation is a PCI device. In this configuration, the kernel maps the whole ECAM, which QEMU sets up for 256 buses, even when maybe only seven buses are in use. Each bus uses 1M of ECAM space, and ioremap() adds an additional guard page between allocations. The kernel vmap allocator will align these regions to 512K, resulting in each mapping eating 1.5M of vmalloc space. This means we need 384M of vmalloc space just to map all of these, which is very wasteful of resources. Fix this by only mapping the ECAM for buses we are going to be using. In my setups, this is around seven buses in most guests, which is 10.5M of vmalloc space - way smaller than the 384M that would otherwise be required. This also means that the kernel can boot without forcing extra RAM into highmem with the vmalloc= argument, or decreasing the virtual RAM available to the guest. Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/r/E1lhCAV-0002yb-50@rmk-PC.armlinux.org.uk Signed-off-by: Russell King Signed-off-by: Bjorn Helgaas Reviewed-by: Arnd Bergmann commit a97396c6eb13f65bea894dbe7739b2e883d40a3e Author: Lukas Wunner Date: Sat May 1 10:29:00 2021 +0200 PCI: pciehp: Ignore Link Down/Up caused by DPC Downstream Port Containment (PCIe r5.0, sec. 6.2.10) disables the link upon an error and attempts to re-enable it when instructed by the DPC driver. A slot which is both DPC- and hotplug-capable is currently powered off by pciehp once DPC is triggered (due to the link change) and powered back up on successful recovery. That's undesirable, the slot should remain powered so the hotplugged device remains bound to its driver. DPC notifies the driver of the error and of successful recovery in pcie_do_recovery() and the driver may then restore the device to working state. Moreover, Sinan points out that turning off slot power by pciehp may foil recovery by DPC: Power off/on is a cold reset concurrently to DPC's warm reset. Sathyanarayanan reports extended delays or failure in link retraining by DPC if pciehp brings down the slot. Fix by detecting whether a Link Down event is caused by DPC and awaiting recovery if so. On successful recovery, ignore both the Link Down and the subsequent Link Up event. Afterwards, check whether the link is down to detect surprise-removal or another DPC event immediately after DPC recovery. Ensure that the corresponding DLLSC event is not ignored by synthesizing it and invoking irq_wake_thread() to trigger a re-run of pciehp_ist(). The IRQ threads of the hotplug and DPC drivers, pciehp_ist() and dpc_handler(), race against each other. If pciehp is faster than DPC, it will wait until DPC recovery completes. Recovery consists of two steps: The first step (waiting for link disablement) is recognizable by pciehp through a set DPC Trigger Status bit. The second step (waiting for link retraining) is recognizable through a newly introduced PCI_DPC_RECOVERING flag. If DPC is faster than pciehp, neither of the two flags will be set and pciehp may glean the recovery status from the new PCI_DPC_RECOVERED flag. The flag is zero if DPC didn't occur at all, hence DLLSC events are not ignored by default. pciehp waits up to 4 seconds before assuming that DPC recovery failed and bringing down the slot. This timeout is not taken from the spec (it doesn't mandate one) but based on a report from Yicong Yang that DPC may take a bit more than 3 seconds on HiSilicon's Kunpeng platform. The timeout is necessary because the DPC Trigger Status bit may never clear: On Root Ports which support RP Extensions for DPC, the DPC driver polls the DPC RP Busy bit for up to 1 second before giving up on DPC recovery. Without the timeout, pciehp would then wait indefinitely for DPC to complete. This commit draws inspiration from previous attempts to synchronize DPC with pciehp: By Sinan Kaya, August 2018: https://lore.kernel.org/linux-pci/20180818065126.77912-1-okaya@kernel.org/ By Ethan Zhao, October 2020: https://lore.kernel.org/linux-pci/20201007113158.48933-1-haifeng.zhao@intel.com/ By Kuppuswamy Sathyanarayanan, March 2021: https://lore.kernel.org/linux-pci/59cb30f5e5ac6d65427ceaadf1012b2ba8dbf66c.1615606143.git.sathyanarayanan.kuppuswamy@linux.intel.com/ Link: https://lore.kernel.org/r/0be565d97438fe2a6d57354b3aa4e8626952a00b.1619857124.git.lukas@wunner.de Reported-by: Sinan Kaya Reported-by: Ethan Zhao Reported-by: Kuppuswamy Sathyanarayanan Tested-by: Kuppuswamy Sathyanarayanan Tested-by: Yicong Yang Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Cc: Dan Williams Cc: Ashok Raj Cc: Keith Busch commit b5415c8f9755069640aad184293198bcf794f66d Author: Alexander Gordeev Date: Mon Jun 7 12:01:49 2021 +0200 s390/entry.S: factor out OUTSIDE macro Introduce OUTSIDE macro that checks whether an instruction address is inside or outside of a block of instructions. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit df6f508c68dbc65def0098cbdf8de7683ae551d2 Author: Harald Freudenberger Date: Tue Apr 13 18:11:09 2021 +0200 s390/ap/zcrypt: notify userspace with online, config and mode info This patch brings 3 reworked/new uevent changes: * All AP uevents caused by an ap card or queue device now carry an additional uevent env value MODE=. Here is an example: KERNEL[1267.301292] add /devices/ap/card0a (ap) ACTION=add DEVPATH=/devices/ap/card0a SUBSYSTEM=ap DEVTYPE=ap_card DEV_TYPE=000D MODALIAS=ap:t0D MODE=ep11 <- this is new SEQNUM=1095 This is true for bind, unbind, add, remove, and change uevents related to ap card or ap queue devices. * On a change of the soft online attribute on a zcrypt queue or card device a new CHANGE uevent is sent with an env value ONLINE=<0|1>. Example uevent: KERNEL[613.067531] change /devices/ap/card09/09.0011 (ap) ACTION=change DEVPATH=/devices/ap/card09/09.0011 SUBSYSTEM=ap ONLINE=0 <- this is new DEVTYPE=ap_queue DRIVER=cex4queue MODE=cca SEQNUM=1070 - On a change of the config state of an zcrypt card device a new CHANGE uevent is sent with an env value CONFIG=<0|1>. Example uevent: KERNEL[876.258680] change /devices/ap/card09 (ap) ACTION=change DEVPATH=/devices/ap/card09 SUBSYSTEM=ap CONFIG=0 <- this is new DEVTYPE=ap_card DRIVER=cex4card DEV_TYPE=000D MODALIAS=ap:t0D MODE=cca SEQNUM=1073 Setting a card config on/off causes the dependent queue devices to follow the config state change and thus uevents informing about the config state change for the queue devices are also emitted. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Signed-off-by: Vasily Gorbik commit d1b8dc09dd71248f5098792af98caa497ec66d19 Author: Christoph Hellwig Date: Mon Jun 14 07:53:10 2021 +0200 PCI/P2PDMA: Simplify distance calculation Merge __calc_map_type_and_dist() and calc_map_type_and_dist_warn() into calc_map_type_and_dist() to simplify the code a bit. This now means we add the devfn strings to the acs_buf unconditionally even if the buffer is not printed, but that is not a lot of overhead and keeps the code much simpler. Link: https://lore.kernel.org/r/20210614055310.3960791-1-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 06e95f0a2aa24d480cbc0c3bd18ca49e1c85f868 Author: Phil Sutter Date: Fri Jun 11 19:08:26 2021 +0200 netfilter: nft_extdhr: Drop pointless check of tprot_set Pablo says, tprot_set is only there to detect if tprot was set to IPPROTO_IP as that evaluates to zero. Therefore, code asserting a different value in tprot does not need to check tprot_set. Fixes: 935b7f6430188 ("netfilter: nft_exthdr: add TCP option matching") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 5acc44f39458f43dac9724cefa4da29847cfe997 Author: Phil Sutter Date: Fri Jun 11 19:06:45 2021 +0200 netfilter: nft_exthdr: Search chunks in SCTP packets only Since user space does not generate a payload dependency, plain sctp chunk matches cause searching in non-SCTP packets, too. Avoid this potential mis-interpretation of packet data by checking pkt->tprot. Fixes: 133dc203d77df ("netfilter: nft_exthdr: Support SCTP chunks") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 0c33795231bff5df410bd405b569c66851e92d4b Merge: 8ac9900a21566 f39c2d1a188de Author: David S. Miller Date: Wed Jun 16 12:59:42 2021 -0700 Merge tag 'wireless-drivers-next-2021-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.14 First set of patches for v5.14. Major new features are here support WCN6855 PCI in ath11k and WoWLAN support for wcn36xx. Also smaller fixes and cleanups all over. ath9k * provide STBC info in the received frames brcmfmac * fix setting of station info chains bitmask * correctly report average RSSI in station info rsi * support for changing beacon interval in AP mode ath11k * support for WCN6855 PCI hardware wcn36xx * WoWLAN support with magic packets and GTK rekeying ==================== Signed-off-by: David S. Miller commit 8ac9900a215664e404f0d87a58d6c8460b8c31c3 Merge: 220e898dd0db9 13defa275eef9 Author: David S. Miller Date: Wed Jun 16 12:58:28 2021 -0700 Merge branch 'marvell-prestera-flower-match-all' Vadym Kochan says: ==================== Marvell Prestera add flower and match all support Add ACL infrastructure for Prestera Switch ASICs family devices to offload cls_flower rules to be processed in the HW. ACL implementation is based on tc filter api. The flower classifier is supported to configure ACL rules/matches/action. Supported actions: - drop - trap - pass Supported dissector keys: - indev - src_mac - dst_mac - src_ip - dst_ip - ip_proto - src_port - dst_port - vlan_id - vlan_ethtype - icmp type/code - Introduce matchall filter support - Add SPAN API to configure port mirroring. - Add tc mirror action. At this moment, only mirror (egress) action is supported. Example: tc filter ... action mirred egress mirror dev DEV v2: Fixed "newline at EOF warnings" from "git am" by re-applying with --whitespace=fix patch #1: 1) Set TC HW Offload always enabled without disable it [suggested by Vladimir Oltean] by user. It reduced the logic by removing feature handling and acl block disable counting. patch #2: 1) Removed extra not needed diff with prestera_port and [suggested by Vladimir Oltean] prestera_switch lines exchanging in prestera_acl.h 2) Fix local variables ordering to reverse chrostmas tree [suggested by Vladimir Oltean] 3) Use tc_cls_can_offload_and_chain0() in [suggested by Vladimir Oltean] prestera_span_replace() 4) Removed TODO about prio check [suggested by Vladimir Oltean] 5) Rephrase error message if prestera_netdev_check() [suggested by Vladimir Oltean] fails in prestera_span_replace() ==================== Signed-off-by: David S. Miller commit 13defa275eef90c07886dbd9e74e3dada8af7348 Author: Serhiy Boiko Date: Wed Jun 16 19:01:45 2021 +0300 net: marvell: prestera: Add matchall support - Introduce matchall filter support - Add SPAN API to configure port mirroring. - Add tc mirror action. At this moment, only mirror (egress) action is supported. Example: tc filter ... action mirred egress mirror dev DEV Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Serhiy Boiko Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 8b474a9f6b3793480392bbdfcc546bb8e21b3735 Author: Serhiy Boiko Date: Wed Jun 16 19:01:44 2021 +0300 net: marvell: Implement TC flower offload Add ACL infrastructure for Prestera Switch ASICs family devices to offload cls_flower rules to be processed in the HW. ACL implementation is based on tc filter api. The flower classifier is supported to configure ACL rules/matches/action. Supported actions: - drop - trap - pass Supported dissector keys: - indev - src_mac - dst_mac - src_ip - dst_ip - ip_proto - src_port - dst_port - vlan_id - vlan_ethtype - icmp type/code Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Serhiy Boiko Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 0e407a9a29ff0471a57e88006897d5e7d5cd9505 Author: Geert Uytterhoeven Date: Wed Jun 16 11:27:45 2021 +0200 of: Remove superfluous casts when printing u64 values "u64" is "unsigned long long" on all architectures now. Hence there is no longer a need to use casts when formatting using the "ll" length modifier. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/ef3f4f78385b43230695ba0855d078290c958192.1623835273.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 2892d8a00d23d511a0591ac4b2ff3f050ae1f004 Author: Geert Uytterhoeven Date: Wed Jun 16 11:27:44 2021 +0200 of: Fix truncation of memory sizes on 32-bit platforms Variable "size" has type "phys_addr_t", which can be either 32-bit or 64-bit on 32-bit systems, while "unsigned long" is always 32-bit on 32-bit systems. Hence the cast in (unsigned long)size / SZ_1M may truncate a 64-bit size to 32-bit, as casts have a higher operator precedence than divisions. Fix this by inverting the order of the cast and division, which should be safe for memory blocks smaller than 4 PiB. Note that the division is actually a shift, as SZ_1M is a power-of-two constant, hence there is no need to use div_u64(). While at it, use "%lu" to format "unsigned long". Fixes: e8d9d1f5485b52ec ("drivers: of: add initialization code for static reserved memory") Fixes: 3f0c8206644836e4 ("drivers: of: add initialization code for dynamic reserved memory") Signed-off-by: Geert Uytterhoeven Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/4a1117e72d13d26126f57be034c20dac02f1e915.1623835273.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 90b8cadfe447d7299c7061b07d50da5a6160bcc5 Author: Geert Uytterhoeven Date: Fri Jun 11 15:01:45 2021 +0200 dt-bindings: rtc: nxp,pcf8563: Absorb pcf85263/pcf85363 bindings The NXP PCF85263/PCF85363 Real Time Clock is very similar to the NXP PCF8563. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/e4f48d97f0e16d78a796f02b77ea3a0018904185.1623416431.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit ca622ed60a46a19a0bd45407439760694dcdaf17 Author: Sudeep Holla Date: Tue Jun 8 22:58:34 2021 +0100 dt-bindings: pwm: Use examples with documented/matching schema 'nvidia,tegra20-pwm' is not yet documented in the YAML schema. Use 'allwinner,sun7i-a20-pwm' instead to get rid of the following warning with 'make DT_CHECKER_FLAGS=-m dt_binding_check': pwm/pwm.example.dt.yaml:0:0: /example-0/pwm@7000a000: failed to match any schema with compatible: ['nvidia,tegra20-pwm'] Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210608215834.2236920-1-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 8676e8e71c04dd3d651bb5db7d04456413d56406 Author: Sudeep Holla Date: Mon Jun 7 19:42:57 2021 +0100 dt-bindings: interrupt-controller: Fix compatible used in ti,pruss-intc As per soc/ti/ti,pruss.yaml schema, only ti,am4376-pruss0 and ti,am4376-pruss1 are valid compatibles. Replace ti,am4376-pruss with ti,am4376-pruss1 based on example in soc/ti/ti,pruss.yaml This fixes the below warning with 'make DT_CHECKER_FLAGS=-m dt_binding_check': interrupt-controller/ti,pruss-intc.example.dt.yaml:0:0: /example-1/pruss@0: failed to match any schema with compatible: ['ti,am4376-pruss'] Cc: Rob Herring Cc: Suman Anna Signed-off-by: Sudeep Holla Acked-by: Suman Anna Link: https://lore.kernel.org/r/20210607184257.2010276-1-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 220e898dd0db995f32fa6e2a6e28aa2d8b5f8dd0 Merge: fb0a1dacf2bef 194730a9beb52 Author: David S. Miller Date: Wed Jun 16 12:54:02 2021 -0700 Merge branch 'net-smc-stats' Karsten Graul says: ==================== net/smc: Add SMC statistic support Please apply the following patch series for smc to netdev's net-next tree. This v2 is a resend of the code contained in v1 but with an updated cover letter to describe why we have chosen to use the generic netlink mechanism to access the smc protocol's statistic data. The patchset adds statistic support to the SMC protocol. Per-cpu variables are used to collect the statistic information for better performance and for reducing concurrency pitfalls. The code that is collecting statistic data is implemented in macros to increase code reuse and readability. The generic netlink mechanism in SMC is extended to provide the collected statistics to userspace. Network namespace awareness is also part of the statistics implementation. SMC is a protocol interacting with PCI devices (like RoCE Cards) and runs on top of the TCP protocol. As SMC is a network protocol and not an ethernet device driver, we decided to use the generic netlink interface. This should be comparable to what other protocols in the net subsystem like tipc, ncsi, ieee802154 or tcp, et al, do. There is already an established internal generic netlink interface mechanism in SMC which is used to collect SMC Protocol internal information. This patchset extends that existing mechanism. ==================== Signed-off-by: David S. Miller commit 194730a9beb52d2b030ea45e12d94868d4a0e6fd Author: Guvenc Gulce Date: Wed Jun 16 16:52:58 2021 +0200 net/smc: Make SMC statistics network namespace aware Make the gathered SMC statistics network namespace aware, for each namespace collect an own set of statistic information. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit f0dd7bf5e33066e554442c509ef6351728b95b51 Author: Guvenc Gulce Date: Wed Jun 16 16:52:57 2021 +0200 net/smc: Add netlink support for SMC fallback statistics Add support to collect more detailed SMC fallback reason statistics and provide these statistics to user space on the netlink interface. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 8c40602b4be17571dfd75102f4f1e690311c5210 Author: Guvenc Gulce Date: Wed Jun 16 16:52:56 2021 +0200 net/smc: Add netlink support for SMC statistics Add the netlink function which collects the statistics information and delivers it to the userspace. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit e0e4b8fa533858532f1b9ea9c6a4660d09beb37a Author: Guvenc Gulce Date: Wed Jun 16 16:52:55 2021 +0200 net/smc: Add SMC statistics support Add the ability to collect SMC statistics information. Per-cpu variables are used to collect the statistic information for better performance and for reducing concurrency pitfalls. The code that is collecting statistic data is implemented in macros to increase code reuse and readability. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 24ff3dc18b99c4b912ab1746e803ddb3be5ced4c Author: José Roberto de Souza Date: Wed Jun 16 12:44:15 2021 -0700 drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms() Commit 3769e4c0af5b ("drm/dp_mst: Avoid to mess up payload table by ports in stale topology") added to calls to drm_dbg_kms() but it missed the first parameter, the drm device breaking the build. Fixes: 3769e4c0af5b ("drm/dp_mst: Avoid to mess up payload table by ports in stale topology") Cc: Wayne Lin Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Cc: stable@vger.kernel.org Signed-off-by: José Roberto de Souza Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210616194415.36926-1-jose.souza@intel.com commit fb0a1dacf2bef929bf047c5434bfb976ac6a93e6 Author: Colin Ian King Date: Wed Jun 16 14:02:58 2021 +0100 mlxsw: spectrum_router: remove redundant continue statement The continue statement at the end of a for-loop has no effect, remove it. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 1d24b6b4b092a510c1ade459ea814902954f404b Merge: 63e96bc4e3281 30c4a9f4fe3f4 Author: David S. Miller Date: Wed Jun 16 12:42:53 2021 -0700 Merge branch 'nfp-ct-part-two' Simon Horman says: ==================== Next set of conntrack patches for the nfp driver Louis Peens says: This follows on from the previous series of a similar nature. Looking at the diagram as explained in the previous series this implements changes up to the point where the merged nft entries are saved. There are still bits of stubbed out code where offloading of the flows will be implemented. +-------------+ +----------+ | pre_ct flow +--------+ | nft flow | +-------------+ v +------+---+ +----------+ | | tc_merge +--------+ | +----------+ v v +--------------+ ^ +-------------+ | post_ct flow +-------+ +---+nft_tc merge | +--------------+ | +-------------+ | | | v Offload to nfp ==================== Signed-off-by: David S. Miller commit 30c4a9f4fe3f47ffa5783329fa5553f8baef3a76 Author: Louis Peens Date: Wed Jun 16 12:02:07 2021 +0200 nfp: flower-ct: implement action_merge check Fill in code stub to check that the flow actions are valid for merge. The actions of the flow X should not conflict with the matches of flow X+1. For now this check is quite strict and set_actions are very limited, will need to update this when NAT support is added. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 5e5f08168db4b7ea5d056cc429781b0cf546ebb1 Author: Louis Peens Date: Wed Jun 16 12:02:06 2021 +0200 nfp: flower-ct: fill ct metadata check function Fill in check_meta stub to check that ct_metadata action fields in the nft flow matches the ct_match data of the post_ct flow. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit c698e2adcc63a99cb0fce08d29cc181807f718a0 Author: Louis Peens Date: Wed Jun 16 12:02:05 2021 +0200 nfp: flower-ct: fill in ct merge check function Replace merge check stub code with the actual implementation. This checks that the match parts of two tc flows does not conflict. Only overlapping keys needs to be checked, and only the narrowest masked parts needs to be checked, so each key is masked with the AND'd result of both masks before comparing. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit a6ffdd3a0e47fb8da9b6f3a8fae9f473644b94e0 Author: Louis Peens Date: Wed Jun 16 12:02:04 2021 +0200 nfp: flower-ct: implement code to save merge of tc and nft flows Add in the code to merge the tc_merge objects with the flows received from nft. At the moment flows are just merged blindly as the validity check functions are stubbed out, this will be populated in follow-up patches. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit b5e30c61d8cbd1002ac3456e29952b8c78bc542f Author: Louis Peens Date: Wed Jun 16 12:02:03 2021 +0200 nfp: flower-ct: add nft_merge table Add table and struct to save the result of the three-way merge between pre_ct,post_ct, and nft flows. Merging code is to be added in follow-up patches. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 4772ad3f58d2423ab4a6587e422eeac3ab8be369 Author: Yinjun Zhang Date: Wed Jun 16 12:02:02 2021 +0200 nfp: flower-ct: make a full copy of the rule when it is a NFT flow The nft flow will be destroyed after offload cb returns. This means we need save a full copy of it since it can be referenced through other paths other than just the offload cb, for example when a new pre_ct or post_ct entry is added, and it needs to be merged with an existing nft entry. Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 95255017e0a84692faa33fdc0746433987b5aff0 Author: Louis Peens Date: Wed Jun 16 12:02:01 2021 +0200 nfp: flower-ct: add nft flows to nft list Implement code to add and remove nft flows to the relevant list. Registering and deregistering the callback function for the nft table is quite complicated. The safest is to delete the callback on the removal of the last pre_ct flow. This is because if this is also the latest pre_ct flow in software it means that this specific nft table will be freed, so there will not be a later opportunity to do this. Another place where it looks possible to delete the callback is when the last nft_flow is deleted, but this happens under the flow_table lock, which is also taken when deregistering the callback, leading to a deadlock situation. This means the final solution here is to delete the callback when removing the last pre_ct flow, and then clean up any remaining nft_flow entries which may still be present, since there will never be a callback now to do this, leaving them orphaned if not cleaned up here as well. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 62268e78145f633af07e832bfecc960c4b6dda90 Author: Louis Peens Date: Wed Jun 16 12:02:00 2021 +0200 nfp: flower-ct: add nft callback stubs Add register/unregister of the nft callback. For now just add stub code to accept the flows, but don't do anything with it. Decided to accept the flows since netfilter will keep on trying to offload a flow if it was rejected, which is quite noisy. Follow-up patches will start implementing the functions to add nft flows to the relevant tables. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit d33d24a7b45039f92d0da492a967f8ee803e5872 Author: Louis Peens Date: Wed Jun 16 12:01:59 2021 +0200 nfp: flower-ct: add delete flow handling for ct Add functions to handle delete flow callbacks for ct flows. Also accept the flows for offloading by returning 0 instead of -EOPNOTSUPP. Flows will still not actually be offloaded to hw, but at this point it's difficult to not accept the flows and also exercise the cleanup paths properly. Traffic will still be handled safely through the fallback path. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 63e96bc4e32811a2bc1e9172691e263e074a32ae Merge: 56a967c4f7e5f 16d4d650966d9 Author: David S. Miller Date: Wed Jun 16 12:34:08 2021 -0700 Merge branch 'net-phy-cleanups' Weihang Li says: ==================== net: phy: fix some coding-style issues Make some cleanups according to the coding style of kernel. Changes since v1: - Update commit description of #1 and #3. - Avoid changing the indentation in #2. - Change a group of if-else statement into switch from #4 and put it into a single patch. - Put '|' at the end of line in #5 and #7. - Avoid deleting spaces in definition of 'settings' in #5. - Drop #8 from the series which needs more discussion with David. ==================== Signed-off-by: David S. Miller commit 16d4d650966d9a607b32ceb709248f7833d88ed0 Author: Weihang Li Date: Wed Jun 16 18:01:26 2021 +0800 net: phy: replace if-else statements with switch Switch statement is clearer than a group of 'if-else'. Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 33ab463220e59a74e803e4fc1c589c28b241b0ab Author: Wenpeng Liang Date: Wed Jun 16 18:01:25 2021 +0800 net: phy: remove unnecessary line continuation Avoid unnecessary line continuations, and put '|' at the end of line. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 450bf1f0c60e818d3da927f8a2d272559ef1915b Author: Wenpeng Liang Date: Wed Jun 16 18:01:24 2021 +0800 net: phy: print the function name by __func__ instead of an fixed string It's better to use __func__ than a fixed string to print a function's name. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 169d7a402dfae45e916e9c847f089482d65ddc4f Author: Wenpeng Liang Date: Wed Jun 16 18:01:23 2021 +0800 net: phy: fix formatting issues with braces Fix following format issues: 1. open brace '{' following function definitions should go to the next line. 2. braces {} are not necessary for single line statements. 3. else should follow close brace '}'. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3bdee6a8e92e9f3403d3e290f4a16189ecc713c5 Author: Wenpeng Liang Date: Wed Jun 16 18:01:22 2021 +0800 net: phy: fix space alignment issues There are some space related issues, including spaces at the start of the line, before tabs, after open parenthesis and before close parenthesis. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e1f82127d67f53a11443d5ce76c7fe52d89ee588 Author: Wenpeng Liang Date: Wed Jun 16 18:01:21 2021 +0800 net: phy: delete repeated words of comments There are some repeated words in some comments, they should be deleted. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1953feb022154e19c5953988fd3dd65ebc769dc9 Author: Wenpeng Liang Date: Wed Jun 16 18:01:20 2021 +0800 net: phy: correct format of block comments Block comments should not use a trailing */ on a separate line and every line of a block comment should start with an '*'. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 775f25479df924611fc482a602d147a43ac93702 Author: Wenpeng Liang Date: Wed Jun 16 18:01:19 2021 +0800 net: phy: change format of some declarations Add a blank line after declarations, change the order of them and put the assignments and declarations together. Cc: Richard Cochran Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6d49b3a0f351925b5ea5047166c112b7590b918a Author: Peter Robinson Date: Sun Jun 13 23:03:26 2021 +0100 gpio: pca953x: Add support for the On Semi pca9655 The On Semi pca9655 is a 16 bit variant of the On Semi pca9654 GPIO expander, with 16 GPIOs and interrupt functionality. Signed-off-by: Peter Robinson [Bartosz: fixed indentation as noted by Andy] Signed-off-by: Bartosz Golaszewski commit 56a967c4f7e5fed2e66d90906ff5956abf69364a Author: Subash Abhinov Kasiviswanathan Date: Wed Jun 16 01:59:13 2021 -0600 net: qualcomm: rmnet: Remove some unneeded casts Remove the explicit casts in the checksum complement functions and pass the actual protocol specific headers instead. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit f7246bdb3d7d85941efdc828802e9a48012f24f5 Author: Shaokun Zhang Date: Wed Jun 16 15:25:40 2021 +0800 net: iosm: remove the repeated declaration and comment Function 'ipc_mmio_get_cp_version' is declared twice, so remove the repeated declaration and wrong comments. Cc: M Chetan Kumar Cc: Intel Corporation Cc: David S. Miller Cc: Jakub Kicinski Signed-off-by: Shaokun Zhang Reviewed-by: M Chetan Kumar Signed-off-by: David S. Miller commit a4fc566543c0dede64b85ca907f34a5d19636292 Author: George McCollister Date: Tue Jun 15 20:39:03 2021 -0500 net: dsa: xrs700x: forward HSR supervision frames Forward supervision frames between redunant HSR ports. This was broken in the last commit. Fixes: 1a42624aecba ("net: dsa: xrs700x: allow HSR/PRP supervision dupes for node_table") Signed-off-by: George McCollister Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d917c35a451e4ebba5c12a51c92cbddce958c91e Author: Bjorn Andersson Date: Tue Jun 15 18:27:07 2021 -0500 net: qualcomm: rmnet: Allow partial updates of IFLA_FLAGS The idiomatic way to handle the changelink flags/mask pair seems to be allow partial updates of the driver's link flags. In contrast the rmnet driver masks the incoming flags and then use that as the new flags. Change the rmnet driver to follow the common scheme, before the introduction of IFLA_RMNET_FLAGS handling in iproute2 et al. Signed-off-by: Bjorn Andersson Reviewed-by: Alex Elder Reviewed-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit c2ae34a7deaff463ecafb7db627b77faaca8e159 Author: George McCollister Date: Tue Jun 15 12:50:37 2021 -0500 net: hsr: don't check sequence number if tag removal is offloaded Don't check the sequence number when deciding when to update time_in in the node table if tag removal is offloaded since the sequence number is part of the tag. This fixes a problem where the times in the node table wouldn't update when 0 appeared to be before or equal to seq_out when tag removal was offloaded. Signed-off-by: George McCollister Signed-off-by: David S. Miller commit 61273f9d83148a38cf9b78d43016c29fc80f48e5 Author: Wei Yongjun Date: Tue Jun 15 17:21:55 2021 +0000 net: stmmac: Fix error return code in ingenic_mac_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 2bb4b98b60d7 ("net: stmmac: Add Ingenic SoCs MAC support.") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 52f0f4e178c757b3d356087376aad8bd77271828 Author: Pablo Neira Ayuso Date: Fri Jun 11 19:26:56 2021 +0200 netfilter: nft_tproxy: restrict support to TCP and UDP transport protocols Add unfront check for TCP and UDP packets before performing further processing. Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support") Signed-off-by: Pablo Neira Ayuso commit 8f518d43f89ae00b9cf5460e10b91694944ca1a8 Author: Pablo Neira Ayuso Date: Thu Jun 10 20:20:31 2021 +0200 netfilter: nft_osf: check for TCP packet before further processing The osf expression only supports for TCP packets, add a upfront sanity check to skip packet parsing if this is not a TCP packet. Fixes: b96af92d6eaf ("netfilter: nf_tables: implement Passive OS fingerprint module in nft_osf") Signed-off-by: Pablo Neira Ayuso Reported-by: kernel test robot Signed-off-by: Pablo Neira Ayuso commit cdd73cc545c0fb9b1a1f7b209f4f536e7990cff4 Author: Pablo Neira Ayuso Date: Thu Jun 10 20:20:30 2021 +0200 netfilter: nft_exthdr: check for IPv6 packet before further processing ipv6_find_hdr() does not validate that this is an IPv6 packet. Add a sanity check for calling ipv6_find_hdr() to make sure an IPv6 packet is passed for parsing. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso commit 8744365e258459775bd9b49b705a82d66a21c2b4 Author: Nicolas Dichtel Date: Fri May 28 10:48:49 2021 +0200 MAINTAINERS: netfilter: add irc channel The community #netfilter IRC channel is now live on the libera.chat network (https://libera.chat/). CC: Arturo Borrero Gonzalez Link: https://marc.info/?l=netfilter&m=162210948632717 Signed-off-by: Nicolas Dichtel Signed-off-by: Pablo Neira Ayuso commit 61b460d10094f5d8e243276f72ece12fc8324dcf Author: Xi Wang Date: Tue Jun 1 17:57:07 2021 +0800 RDMA/hns: Support getting max QP number from firmware All functions of HIP09's ROCEE share on-chip resources for all QPs, the driver needs configure the resource index and number for each function during the init stage. Link: https://lore.kernel.org/r/1622541427-42193-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 7ce6095e3bff8e20ce018b050960b527e298f7df Author: Leon Romanovsky Date: Mon May 31 19:04:44 2021 +0300 RDMA/mlx5: Don't add slave port to unaffiliated list The mlx5_ib_bind_slave_port() doesn't remove multiport device from the unaffiliated list, but mlx5_ib_unbind_slave_port() did it. This unbalanced flow caused to the situation where mlx5_ib_unaffiliated_port_list was changed during iteration. Fixes: 32f69e4be269 ("{net, IB}/mlx5: Manage port association for multiport RoCE") Link: https://lore.kernel.org/r/2726e6603b1e6ecfe76aa5a12a063af72173bcf7.1622477058.git.leonro@nvidia.com Reported-by: Dan Carpenter Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4bcbe438b3baaeb532dd50a5f002aed56c197e2a Author: Yang Jihong Date: Tue Jun 15 17:17:04 2021 +0800 perf annotate: Add itrace options support The "auxtrace_info" and "auxtrace" functions are not set in "tool" member of "annotate". As a result, perf annotate does not support parsing itrace data. Before: # perf record -e arm_spe_0/branch_filter=1/ -a sleep 1 [ perf record: Woken up 9 times to write data ] [ perf record: Captured and wrote 20.874 MB perf.data ] # perf annotate --stdio Error: The perf.data data has no samples! Solution: 1. Add itrace options in help, 2. Set hook functions of "id_index", "auxtrace_info" and "auxtrace" in perf_tool. After: # perf record --all-user -e arm_spe_0/branch_filter=1/ ls Couldn't synthesize bpf events. perf.data [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.010 MB perf.data ] # perf annotate --stdio Percent | Source code & Disassembly of libc-2.28.so for branch-miss (1 samples, percent: local period) ------------------------------------------------------------------------------------------------------------ : : : : Disassembly of section .text: : : 0000000000066180 <__getdelim@@GLIBC_2.17>: 0.00 : 66180: stp x29, x30, [sp, #-96]! 0.00 : 66184: cmp x0, #0x0 0.00 : 66188: ccmp x1, #0x0, #0x4, ne // ne = any 0.00 : 6618c: mov x29, sp 0.00 : 66190: stp x24, x25, [sp, #56] 0.00 : 66194: stp x26, x27, [sp, #72] 0.00 : 66198: str x28, [sp, #88] 0.00 : 6619c: b.eq 66450 <__getdelim@@GLIBC_2.17+0x2d0> // b.none 0.00 : 661a0: stp x22, x23, [x29, #40] 0.00 : 661a4: mov x22, x1 0.00 : 661a8: ldr w1, [x3] 0.00 : 661ac: mov w23, w2 0.00 : 661b0: stp x20, x21, [x29, #24] 0.00 : 661b4: mov x20, x3 0.00 : 661b8: mov x21, x0 0.00 : 661bc: tbnz w1, #15, 66360 <__getdelim@@GLIBC_2.17+0x1e0> 0.00 : 661c0: ldr x0, [x3, #136] 0.00 : 661c4: ldr x2, [x0, #8] 0.00 : 661c8: str x19, [x29, #16] 0.00 : 661cc: mrs x19, tpidr_el0 0.00 : 661d0: sub x19, x19, #0x700 0.00 : 661d4: cmp x2, x19 0.00 : 661d8: b.eq 663f0 <__getdelim@@GLIBC_2.17+0x270> // b.none 0.00 : 661dc: mov w1, #0x1 // #1 0.00 : 661e0: ldaxr w2, [x0] 0.00 : 661e4: cmp w2, #0x0 0.00 : 661e8: b.ne 661f4 <__getdelim@@GLIBC_2.17+0x74> // b.any 0.00 : 661ec: stxr w3, w1, [x0] 0.00 : 661f0: cbnz w3, 661e0 <__getdelim@@GLIBC_2.17+0x60> 0.00 : 661f4: b.ne 66448 <__getdelim@@GLIBC_2.17+0x2c8> // b.any 0.00 : 661f8: ldr x0, [x20, #136] 0.00 : 661fc: ldr w1, [x20] 0.00 : 66200: ldr w2, [x0, #4] 0.00 : 66204: str x19, [x0, #8] 0.00 : 66208: add w2, w2, #0x1 0.00 : 6620c: str w2, [x0, #4] 0.00 : 66210: tbnz w1, #5, 66388 <__getdelim@@GLIBC_2.17+0x208> 0.00 : 66214: ldr x19, [x29, #16] 0.00 : 66218: ldr x0, [x21] 0.00 : 6621c: cbz x0, 66228 <__getdelim@@GLIBC_2.17+0xa8> 0.00 : 66220: ldr x0, [x22] 0.00 : 66224: cbnz x0, 6623c <__getdelim@@GLIBC_2.17+0xbc> 0.00 : 66228: mov x0, #0x78 // #120 0.00 : 6622c: str x0, [x22] 0.00 : 66230: bl 20710 0.00 : 66234: str x0, [x21] 0.00 : 66238: cbz x0, 66428 <__getdelim@@GLIBC_2.17+0x2a8> 0.00 : 6623c: ldr x27, [x20, #8] 0.00 : 66240: str x19, [x29, #16] 0.00 : 66244: ldr x19, [x20, #16] 0.00 : 66248: sub x19, x19, x27 0.00 : 6624c: cmp x19, #0x0 0.00 : 66250: b.le 66398 <__getdelim@@GLIBC_2.17+0x218> 0.00 : 66254: mov x25, #0x0 // #0 0.00 : 66258: b 662d8 <__getdelim@@GLIBC_2.17+0x158> 0.00 : 6625c: nop 0.00 : 66260: add x24, x19, x25 0.00 : 66264: ldr x3, [x22] 0.00 : 66268: add x26, x24, #0x1 0.00 : 6626c: ldr x0, [x21] 0.00 : 66270: cmp x3, x26 0.00 : 66274: b.cs 6629c <__getdelim@@GLIBC_2.17+0x11c> // b.hs, b.nlast 0.00 : 66278: lsl x3, x3, #1 0.00 : 6627c: cmp x3, x26 0.00 : 66280: csel x26, x3, x26, cs // cs = hs, nlast 0.00 : 66284: mov x1, x26 0.00 : 66288: bl 206f0 0.00 : 6628c: cbz x0, 66438 <__getdelim@@GLIBC_2.17+0x2b8> 0.00 : 66290: str x0, [x21] 0.00 : 66294: ldr x27, [x20, #8] 0.00 : 66298: str x26, [x22] 0.00 : 6629c: mov x2, x19 0.00 : 662a0: mov x1, x27 0.00 : 662a4: add x0, x0, x25 0.00 : 662a8: bl 87390 0.00 : 662ac: ldr x0, [x20, #8] 0.00 : 662b0: add x19, x0, x19 0.00 : 662b4: str x19, [x20, #8] 0.00 : 662b8: cbnz x28, 66410 <__getdelim@@GLIBC_2.17+0x290> 0.00 : 662bc: mov x0, x20 0.00 : 662c0: bl 73b80 <__underflow@@GLIBC_2.17> 0.00 : 662c4: cmn w0, #0x1 0.00 : 662c8: b.eq 66410 <__getdelim@@GLIBC_2.17+0x290> // b.none 0.00 : 662cc: ldp x27, x19, [x20, #8] 0.00 : 662d0: mov x25, x24 0.00 : 662d4: sub x19, x19, x27 0.00 : 662d8: mov x2, x19 0.00 : 662dc: mov w1, w23 0.00 : 662e0: mov x0, x27 0.00 : 662e4: bl 807b0 0.00 : 662e8: cmp x0, #0x0 0.00 : 662ec: mov x28, x0 0.00 : 662f0: sub x0, x0, x27 0.00 : 662f4: csinc x19, x19, x0, eq // eq = none 0.00 : 662f8: mov x0, #0x7fffffffffffffff // #9223372036854775807 0.00 : 662fc: sub x0, x0, x25 0.00 : 66300: cmp x19, x0 0.00 : 66304: b.lt 66260 <__getdelim@@GLIBC_2.17+0xe0> // b.tstop 0.00 : 66308: adrp x0, 17f000 0.00 : 6630c: ldr x0, [x0, #3624] 0.00 : 66310: mrs x2, tpidr_el0 0.00 : 66314: ldr x19, [x29, #16] 0.00 : 66318: mov w3, #0x4b // #75 0.00 : 6631c: ldr w1, [x20] 0.00 : 66320: mov x24, #0xffffffffffffffff // #-1 0.00 : 66324: str w3, [x2, x0] 0.00 : 66328: tbnz w1, #15, 66340 <__getdelim@@GLIBC_2.17+0x1c0> 0.00 : 6632c: ldr x0, [x20, #136] 0.00 : 66330: ldr w1, [x0, #4] 0.00 : 66334: sub w1, w1, #0x1 0.00 : 66338: str w1, [x0, #4] 0.00 : 6633c: cbz w1, 663b8 <__getdelim@@GLIBC_2.17+0x238> 0.00 : 66340: mov x0, x24 0.00 : 66344: ldr x28, [sp, #88] 0.00 : 66348: ldp x20, x21, [x29, #24] 0.00 : 6634c: ldp x22, x23, [x29, #40] 0.00 : 66350: ldp x24, x25, [sp, #56] 0.00 : 66354: ldp x26, x27, [sp, #72] 0.00 : 66358: ldp x29, x30, [sp], #96 0.00 : 6635c: ret 100.00 : 66360: tbz w1, #5, 66218 <__getdelim@@GLIBC_2.17+0x98> 0.00 : 66364: ldp x20, x21, [x29, #24] 0.00 : 66368: mov x24, #0xffffffffffffffff // #-1 0.00 : 6636c: ldp x22, x23, [x29, #40] 0.00 : 66370: mov x0, x24 0.00 : 66374: ldp x24, x25, [sp, #56] 0.00 : 66378: ldp x26, x27, [sp, #72] 0.00 : 6637c: ldr x28, [sp, #88] 0.00 : 66380: ldp x29, x30, [sp], #96 0.00 : 66384: ret 0.00 : 66388: mov x24, #0xffffffffffffffff // #-1 0.00 : 6638c: ldr x19, [x29, #16] 0.00 : 66390: b 66328 <__getdelim@@GLIBC_2.17+0x1a8> 0.00 : 66394: nop 0.00 : 66398: mov x0, x20 0.00 : 6639c: bl 73b80 <__underflow@@GLIBC_2.17> 0.00 : 663a0: cmn w0, #0x1 0.00 : 663a4: b.eq 66438 <__getdelim@@GLIBC_2.17+0x2b8> // b.none 0.00 : 663a8: ldp x27, x19, [x20, #8] 0.00 : 663ac: sub x19, x19, x27 0.00 : 663b0: b 66254 <__getdelim@@GLIBC_2.17+0xd4> 0.00 : 663b4: nop 0.00 : 663b8: str xzr, [x0, #8] 0.00 : 663bc: ldxr w2, [x0] 0.00 : 663c0: stlxr w3, w1, [x0] 0.00 : 663c4: cbnz w3, 663bc <__getdelim@@GLIBC_2.17+0x23c> 0.00 : 663c8: cmp w2, #0x1 0.00 : 663cc: b.le 66340 <__getdelim@@GLIBC_2.17+0x1c0> 0.00 : 663d0: mov x1, #0x81 // #129 0.00 : 663d4: mov x2, #0x1 // #1 0.00 : 663d8: mov x3, #0x0 // #0 0.00 : 663dc: mov x8, #0x62 // #98 0.00 : 663e0: svc #0x0 0.00 : 663e4: ldp x20, x21, [x29, #24] 0.00 : 663e8: ldp x22, x23, [x29, #40] 0.00 : 663ec: b 66370 <__getdelim@@GLIBC_2.17+0x1f0> 0.00 : 663f0: ldr w2, [x0, #4] 0.00 : 663f4: add w2, w2, #0x1 0.00 : 663f8: str w2, [x0, #4] 0.00 : 663fc: tbz w1, #5, 66214 <__getdelim@@GLIBC_2.17+0x94> 0.00 : 66400: mov x24, #0xffffffffffffffff // #-1 0.00 : 66404: ldr x19, [x29, #16] 0.00 : 66408: b 66330 <__getdelim@@GLIBC_2.17+0x1b0> 0.00 : 6640c: nop 0.00 : 66410: ldr x0, [x21] 0.00 : 66414: strb wzr, [x0, x24] 0.00 : 66418: ldr w1, [x20] 0.00 : 6641c: ldr x19, [x29, #16] 0.00 : 66420: b 66328 <__getdelim@@GLIBC_2.17+0x1a8> 0.00 : 66424: nop 0.00 : 66428: mov x24, #0xffffffffffffffff // #-1 0.00 : 6642c: ldr w1, [x20] 0.00 : 66430: b 66328 <__getdelim@@GLIBC_2.17+0x1a8> 0.00 : 66434: nop 0.00 : 66438: mov x24, #0xffffffffffffffff // #-1 0.00 : 6643c: ldr w1, [x20] 0.00 : 66440: ldr x19, [x29, #16] 0.00 : 66444: b 66328 <__getdelim@@GLIBC_2.17+0x1a8> 0.00 : 66448: bl e3ba0 0.00 : 6644c: b 661f8 <__getdelim@@GLIBC_2.17+0x78> 0.00 : 66450: adrp x0, 17f000 0.00 : 66454: ldr x0, [x0, #3624] 0.00 : 66458: mrs x1, tpidr_el0 0.00 : 6645c: mov w2, #0x16 // #22 0.00 : 66460: mov x24, #0xffffffffffffffff // #-1 0.00 : 66464: str w2, [x1, x0] 0.00 : 66468: b 66370 <__getdelim@@GLIBC_2.17+0x1f0> 0.00 : 6646c: ldr w1, [x20] 0.00 : 66470: mov x4, x0 0.00 : 66474: tbnz w1, #15, 6648c <__getdelim@@GLIBC_2.17+0x30c> 0.00 : 66478: ldr x0, [x20, #136] 0.00 : 6647c: ldr w1, [x0, #4] 0.00 : 66480: sub w1, w1, #0x1 0.00 : 66484: str w1, [x0, #4] 0.00 : 66488: cbz w1, 66494 <__getdelim@@GLIBC_2.17+0x314> 0.00 : 6648c: mov x0, x4 0.00 : 66490: bl 20e40 0.00 : 66494: str xzr, [x0, #8] 0.00 : 66498: ldxr w2, [x0] 0.00 : 6649c: stlxr w3, w1, [x0] 0.00 : 664a0: cbnz w3, 66498 <__getdelim@@GLIBC_2.17+0x318> 0.00 : 664a4: cmp w2, #0x1 0.00 : 664a8: b.le 6648c <__getdelim@@GLIBC_2.17+0x30c> 0.00 : 664ac: mov x1, #0x81 // #129 0.00 : 664b0: mov x2, #0x1 // #1 0.00 : 664b4: mov x3, #0x0 // #0 0.00 : 664b8: mov x8, #0x62 // #98 0.00 : 664bc: svc #0x0 0.00 : 664c0: b 6648c <__getdelim@@GLIBC_2.17+0x30c> Signed-off-by: Yang Jihong Tested-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210615091704.259202-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 28b8e87abfb0308878b869af282dc8efbdab0f73 Author: Li Huafei Date: Wed Jun 16 20:03:39 2021 +0800 perf mem-events: Remove duplicate #undef Remove duplicate '#undef E'. Signed-off-by: Li Huafei Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zhang Jinhao Link: http://lore.kernel.org/lkml/20210616120339.219807-1-lihuafei1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 0f0ac1e4eef2753d4f9cd0117019da9501921fef Author: Bartosz Dudziak Date: Sat Jun 12 22:53:35 2021 +0200 cpuidle: qcom: Add SPM register data for MSM8226 Add MSM8226 register data to SPM AVS Wrapper 2 (SAW2) power controller driver. Reviewed-by: Stephan Gerhold Signed-off-by: Bartosz Dudziak Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210612205335.9730-3-bartosz.dudziak@snejp.pl commit 797920a8498e420532ca6a63f9ac30fea477b3ff Author: Bartosz Dudziak Date: Sat Jun 12 22:53:34 2021 +0200 dt-bindings: arm: msm: Add SAW2 for MSM8226 Add the dt-binding compatible in the SPM AVS Wrapper 2 (SAW2) for the MSM8226 SoC platform. Acked-by: Rob Herring Signed-off-by: Bartosz Dudziak Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210612205335.9730-2-bartosz.dudziak@snejp.pl commit db9b6d87a8d4552c691c9f008a233985f41a9e4d Author: Rafael J. Wysocki Date: Fri Jun 11 18:58:48 2021 +0200 ACPI: power: Use dev_dbg() to print some messages The messages printed by acpi_resume_power_resources() and acpi_turn_off_unused_power_resources() are not important enough to be printed with pr_info(), so use dev_dbg() instead of it to get rid of some noise in the kernel log. Signed-off-by: Rafael J. Wysocki Acked-by: Borislav Petkov commit 828615950b5876e75587fdd5e9d1185be9cabba7 Author: Kir Kolyshkin Date: Thu Jun 10 20:07:37 2021 -0700 docs/cgroup-v1/blkio: update for 5.x kernels Commit bf382fb0bcef4 ("block: remove legacy IO schedulers", Oct 12 2018) removes the CFQ scheduler, together with blkio.weight and blkio.weight_device described in cgroup v1 documentation. Users are supposed to use the BFQ scheduler, which cgroup file for setting weight is blkio.bfq.weight, but there is no way to set per-device weight. Later, commit 795fe54c2a8 per-device weights for BFQ, meaning that blkio.bfq.weight and blkio.bfq.weight_device can be used in a way similar to the old CFQ cgroup interface. Yet, the cgroup v1 docs were never updated. Fix this: - use the new file names; - fix the range for weight (used to be 10..1000, now 1..1000); - link to BFQ scheduler docs. Acked-by: Tejun Heo Signed-off-by: Kir Kolyshkin Signed-off-by: Jens Axboe commit 37fe403898b2fa5fc9d3616fcda2ee6629318aab Author: Kir Kolyshkin Date: Thu Jun 10 20:07:36 2021 -0700 docs/cgroup-v1/blkio: stop abusing itemized list Fix many formatting issues by stop (ab)using itemized lists for everything (mostly replaced by definition lists). Acked-by: Tejun Heo Signed-off-by: Kir Kolyshkin Signed-off-by: Jens Axboe commit fda0b5ba9d5a9f6bfab9bc195f7a8fce13aedf61 Author: Kir Kolyshkin Date: Mon Jun 14 14:41:09 2021 -0700 docs: block/bfq: describe per-device weight The functionality of setting per-device weight for BFQ was added in v5.4 (commit 795fe54c2a828099), but the documentation was never updated. While at it, improve formatting a bit. Signed-off-by: Kir Kolyshkin Link: https://lore.kernel.org/r/20210614214109.207430-1-kolyshkin@gmail.com Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 3769e4c0af5b82c8ea21d037013cb9564dfaa51f Author: Wayne Lin Date: Wed Jun 16 11:55:01 2021 +0800 drm/dp_mst: Avoid to mess up payload table by ports in stale topology [Why] After unplug/hotplug hub from the system, userspace might start to clear stale payloads gradually. If we call drm_dp_mst_deallocate_vcpi() to release stale VCPI of those ports which are not relating to current topology, we have chane to wrongly clear active payload table entry for current topology. E.g. We have allocated VCPI 1 in current payload table and we call drm_dp_mst_deallocate_vcpi() to clean VCPI 1 in stale topology. In drm_dp_mst_deallocate_vcpi(), it will call drm_dp_mst_put_payload_id() tp put VCPI 1 and which means ID 1 is available again. Thereafter, if we want to allocate a new payload stream, it will find ID 1 is available by drm_dp_mst_assign_payload_id(). However, ID 1 is being used [How] Check target sink is relating to current topology or not before doing any payload table update. Searching upward to find the target sink's relevant root branch device. If the found root branch device is not the same root of current topology, don't update payload table. Changes since v1: * Change debug macro to use drm_dbg_kms() instead * Amend the commit message to add Cc tag. Signed-off-by: Wayne Lin Cc: stable@vger.kernel.org Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210616035501.3776-3-Wayne.Lin@amd.com Reviewed-by: Lyude Paul commit 35d3e8cb35e75450f87f87e3d314e2d418b6954b Author: Wayne Lin Date: Wed Jun 16 11:55:00 2021 +0800 drm/dp_mst: Do not set proposed vcpi directly [Why] When we receive CSN message to notify one port is disconnected, we will implicitly set its corresponding num_slots to 0. Later on, we will eventually call drm_dp_update_payload_part1() to arrange down streams. In drm_dp_update_payload_part1(), we iterate over all proposed_vcpis[] to do the update. Not specific to a target sink only. For example, if we light up 2 monitors, Monitor_A and Monitor_B, and then we unplug Monitor_B. Later on, when we call drm_dp_update_payload_part1() to try to update payload for Monitor_A, we'll also implicitly clean payload for Monitor_B at the same time. And finally, when we try to call drm_dp_update_payload_part1() to clean payload for Monitor_B, we will do nothing at this time since payload for Monitor_B has been cleaned up previously. For StarTech 1to3 DP hub, it seems like if we didn't update DPCD payload ID table then polling for "ACT Handled"(BIT_1 of DPCD 002C0h) will fail and this polling will last for 3 seconds. Therefore, guess the best way is we don't set the proposed_vcpi[] diretly. Let user of these herlper functions to set the proposed_vcpi directly. [How] 1. Revert commit 7617e9621bf2 ("drm/dp_mst: clear time slots for ports invalid") 2. Tackle the issue in previous commit by skipping those trasient proposed VCPIs. These stale VCPIs shoulde be explicitly cleared by user later on. Changes since v1: * Change debug macro to use drm_dbg_kms() instead * Amend the commit message to add Fixed & Cc tags Signed-off-by: Wayne Lin Fixes: 7617e9621bf2 ("drm/dp_mst: clear time slots for ports invalid") Cc: Lyude Paul Cc: Wayne Lin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: # v5.5+ Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210616035501.3776-2-Wayne.Lin@amd.com Reviewed-by: Lyude Paul commit ee55b92a7391bf871939330f662651b54be51b73 Author: Mikulas Patocka Date: Tue Jun 15 13:45:55 2021 -0400 dm writecache: flush origin device when writing and cache is full Commit d53f1fafec9d086f1c5166436abefdaef30e0363 ("dm writecache: do direct write if the cache is full") changed dm-writecache, so that it writes directly to the origin device if the cache is full. Unfortunately, it doesn't forward flush requests to the origin device, so that there is a bug where flushes are being ignored. Fix this by adding missing flush forwarding. For PMEM mode, we fix this bug by disabling direct writes to the origin device, because it performs better. Signed-off-by: Mikulas Patocka Fixes: d53f1fafec9d ("dm writecache: do direct write if the cache is full") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Mike Snitzer commit c811659bb9a09b319842bf61602ce858b1d1920a Author: Kees Cook Date: Tue Jun 15 10:33:00 2021 -0700 pstore/blk: Fix kerndoc and redundancy on blkdev param Remove redundant details of blkdev and fix up resulting kerndoc. Reviewed-by: Christoph Hellwig Signed-off-by: Kees Cook commit 7bb9557b48fcabaa12750a8775352740def381a8 Author: Kees Cook Date: Mon Jun 14 12:39:51 2021 -0700 pstore/blk: Use the normal block device I/O path Stop poking into block layer internals and just open the block device file an use kernel_read and kernel_write on it. Note that this means the transformation from name_to_dev_t can't be used anymore when pstore_blk is loaded as a module: a full filesystem device path name must be used instead. Additionally removes ":internal:" kerndoc link, since no such documentation remains. Co-developed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Kees Cook commit 5de691bffe57fd0fc2b4dcdcf13815c56d11db10 Author: Daniel Scally Date: Thu Jun 3 23:40:06 2021 +0100 platform/x86: Add intel_skl_int3472 driver ACPI devices with _HID INT3472 are currently matched to the tps68470 driver, however this does not cover all situations in which that _HID occurs. We've encountered three possibilities: 1. On Chrome OS devices, an ACPI device with _HID INT3472 (representing a physical TPS68470 device) that requires a GPIO and OpRegion driver 2. On devices designed for Windows, an ACPI device with _HID INT3472 (again representing a physical TPS68470 device) which requires GPIO, Clock and Regulator drivers. 3. On other devices designed for Windows, an ACPI device with _HID INT3472 which does **not** represent a physical TPS68470, and is instead used as a dummy device to group some system GPIO lines which are meant to be consumed by the sensor that is dependent on this entry. This commit adds a new module, registering a platform driver to deal with the 3rd scenario plus an i2c driver to deal with #1 and #2, by querying the CLDB buffer found against INT3472 entries to determine which is most appropriate. Suggested-by: Laurent Pinchart Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20210603224007.120560-6-djrscally@gmail.com [hdegoede@redhat.com Make skl_int3472_tps68470_calc_type() static] Signed-off-by: Hans de Goede commit c8d9c3674cba2e420f31e64e4f1ec52db5cc0bb5 Merge: 6c8f2df3b5064 23db673d7e519 Author: Hans de Goede Date: Wed Jun 16 17:48:22 2021 +0200 Merge remote-tracking branch 'linux-pm/acpi-scan' into review-hans commit 6c8f2df3b5064fa848f365fe6a51861b90b5ce7f Merge: cf80294e1ec60 043d7f09bf614 Author: Hans de Goede Date: Wed Jun 16 17:48:18 2021 +0200 Merge tag 'intel-gpio-v5.14-1' into review-hans intel-gpio for v5.14-1 * Export two functions from GPIO ACPI for wider use * Clean up Whiskey Cove and Crystal Cove GPIO drivers The following is an automated git shortlog grouped by driver: crystalcove: - remove platform_set_drvdata() + cleanup probe gpiolib: - acpi: Add acpi_gpio_get_io_resource() - acpi: Introduce acpi_get_and_request_gpiod() helper wcove: - Split error handling for CTRL and IRQ registers - Unify style of to_reg() with to_ireg() - Use IRQ hardware number getter instead of direct access commit cf80294e1ec602857a6bbef9623972ab4e0af666 Merge: 33ec58bd640a6 fcd8cf0e3e48f Author: Hans de Goede Date: Wed Jun 16 17:48:11 2021 +0200 Merge tag 'platform-drivers-x86-goodix-v5.14-1' into review-hans Signed tag for the immutable platform-drivers-x86-goodix branch for merging into the input subsystem. commit 33ec58bd640a62a242d2e3e5f98ff7c478f1466c Author: Maximilian Luz Date: Mon Jun 14 21:46:35 2021 +0200 MAINTAINERS: Update IRC link for Surface System Aggregator subsystem We have moved to libera.chat. Update the link accordingly. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210614194635.1681519-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 039e6a3117b0f4c4c4884a560f68cb13d55ad0c4 Author: Zou Wei Date: Wed Jun 16 10:50:09 2021 +0800 platform/x86: think-lmi: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1623811809-65099-1-git-send-email-zou_wei@huawei.com Signed-off-by: Hans de Goede commit 0ddcf3a6b44209e73fb21b3c53e258884ea90cef Author: Hans de Goede Date: Wed Jun 9 17:17:52 2021 +0200 platform/x86: think-lmi: Avoid potential read before start of the buffer If length equals 0 then reading buf[length-1] will read before the start of the buffer. Avoid this by moving the length == 0 check up. Cc: Mark Pearson Reported-by: Dan Carpenter Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210609151752.156902-2-hdegoede@redhat.com commit 86bb2e3daf5d84c02ef40da8bf26f7b851aaa8a7 Author: Hans de Goede Date: Wed Jun 9 17:17:51 2021 +0200 platform/x86: think-lmi: Fix check for admin password being set tlmi_priv.pwd_admin->password is an array (not a pointer), so the correct way to check for the password being set is to check for tlmi_priv.pwd_admin->password[0] != 0. For the second check, replace the check with checking that auth_str is set instead. Cc: Mark Pearson Reported-by: Dan Carpenter Reported-by: coverity-bot Addresses-Coverity-ID: 1505158 ("NO_EFFECT") Fixes: a7314b3b1d8a ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210609151752.156902-1-hdegoede@redhat.com commit cb58c277ff1a35432cd84a6cc9768c60ce4c2cad Author: Hans de Goede Date: Wed Jun 9 16:59:52 2021 +0200 platform/x86: dell-wmi-sysman/think-lmi: Make fw_attr_class global static The dell-wmi-sysman and think-lmi kernel modules both have a global struct class *fw_attr_class variable, leading to the following compile errors when both are builtin: ld: drivers/platform/x86/think-lmi.o:(.bss+0x0): multiple definition of `fw_attr_class'; drivers/platform/x86/dell/dell-wmi-sysman/sysman.o:(.bss+0x0): first defined here In both cases the variable is only used in the file where it is declared. Make both declarations static to avoid the linker error. Cc: Mark Pearson Cc: Dell.Client.Kernel@dell.com Reported-by: Nathan Chancellor Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210609145952.113393-1-hdegoede@redhat.com commit 8f44f316d1da2ad521e62028a812284bb72ef3d4 Author: yangerkun Date: Mon Jun 7 09:47:02 2021 +0800 platform/x86: intel_ips: fix set but unused warning in read_mgtv drivers/platform/x86/intel_ips.c:832:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 832 | u16 ret; | ^~~ Fix it by mark ret as '__maybe_unused'. Reported-by: Hulk Robot Signed-off-by: yangerkun Link: https://lore.kernel.org/r/20210607014702.2981097-1-yangerkun@huawei.com Signed-off-by: Hans de Goede commit 77d06ec65a281c5382f4ea2398a267dc3bd7bfe3 Author: Rikard Falkeborn Date: Sat Jun 5 22:38:07 2021 +0200 x86/platform/uv: Constify static attribute_group struct The only use of base_attr_group and hubless_base_attr_group is to pass their addresses to sysfs_create_group() and sysfs_remove_group(), both which takes pointers to const attribute_group structs. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Justin Ernst Link: https://lore.kernel.org/r/20210605203807.60547-5-rikard.falkeborn@gmail.com Signed-off-by: Hans de Goede commit 62ef96919720b30d5e84a193e64490da1d30d776 Author: Rikard Falkeborn Date: Sat Jun 5 22:38:06 2021 +0200 platform/x86: tc1100-wmi: Constify static attribute_group struct The only use of tc1100_attribute_group is to pass its address to sysfs_create_group() and sysfs_remove_group(), both which takes pointer to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210605203807.60547-4-rikard.falkeborn@gmail.com Signed-off-by: Hans de Goede commit d24023e375704860c6c8b91c3af3034669aa1bc5 Author: Rikard Falkeborn Date: Sat Jun 5 22:38:05 2021 +0200 platform/x86: intel_pmt_crashlog: Constify static attribute_group struct The only use of pmt_crashlog_group is to assign its address to the attr_grp field in the intel_pmt_namespace struct, which is a pointer to const attribute_group. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210605203807.60547-3-rikard.falkeborn@gmail.com Signed-off-by: Hans de Goede commit c297937fbb50edd6c5ebc80fa4aa1d59246fb0ed Author: Rikard Falkeborn Date: Sat Jun 5 22:38:04 2021 +0200 platform/x86: hdaps: Constify static attribute_group struct The only use of hdaps_attribute_group is to pass its address to sysfs_create_group() and sysfs_remove_group(), both which takes pointers to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Frank Seidel Link: https://lore.kernel.org/r/20210605203807.60547-2-rikard.falkeborn@gmail.com Signed-off-by: Hans de Goede commit be9c4fa236e24af5cc3271a16e209eab098566c4 Author: Baokun Li Date: Wed Jun 9 15:24:48 2021 +0800 platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_packet_layer.c Using list_move_tail() instead of list_del() + list_add_tail() in ssh_packet_layer.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20210609072448.1357524-1-libaokun1@huawei.com Signed-off-by: Hans de Goede commit a8aedd45d7dd7d3b6136c90bd755cb68743d930e Author: Baokun Li Date: Wed Jun 9 15:26:38 2021 +0800 platform/surface: aggregator: Use list_move_tail instead of list_del/list_add_tail in ssh_request_layer.c Using list_move_tail() instead of list_del() + list_add_tail() in ssh_request_layer.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20210609072638.1358174-1-libaokun1@huawei.com Signed-off-by: Hans de Goede commit f9e7f9a2b2a0d76c03ebdbb8ffc7940017b326b9 Author: Maximilian Luz Date: Fri Jun 4 23:09:07 2021 +0200 platform/surface: aggregator: Drop unnecessary variable initialization The status variable in ssam_controller_event_disable() is always set, no need to initialize it. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210604210907.25738-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 37ed76a745b099565b4ae7915f0441b1316bf108 Author: Maximilian Luz Date: Fri Jun 4 23:09:06 2021 +0200 platform/surface: aggregator: Do not return uninitialized value The status variable in ssam_nf_refcount_disable_free() is only set when the reference count equals zero. Otherwise, it is returned uninitialized. Fix this by always initializing status to zero. Reported-by: kernel test robot Fixes: 640ee17199e4 ("platform/surface: aggregator: Allow enabling of events without notifiers") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210604210907.25738-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 8ae200547aa9dbb1001c22325d251b825113bdb3 Author: Maximilian Luz Date: Fri Jun 4 15:47:55 2021 +0200 docs: driver-api: Update Surface Aggregator user-space interface documentation Update the controller-device user-space interface (cdev) documentation for the newly introduced IOCTLs and event interface. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210604134755.535590-8-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit cbd224e0ddfe59eb1eb92e436825f3eca4de3c10 Author: Maximilian Luz Date: Fri Jun 4 15:47:54 2021 +0200 platform/surface: aggregator_cdev: Add lockdep support Mark functions with locking requirements via the corresponding lockdep calls for debugging and documentary purposes. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210604134755.535590-7-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit e8e298a653856b1f3a2bb7b1fe31d3faa93cc7dc Author: Maximilian Luz Date: Fri Jun 4 15:47:53 2021 +0200 platform/surface: aggregator_cdev: Allow enabling of events from user-space While events can already be enabled and disabled via the generic request IOCTL, this bypasses the internal reference counting mechanism of the controller. Due to that, disabling an event will turn it off regardless of any other client having requested said event, which may break functionality of that client. To solve this, add IOCTLs wrapping the ssam_controller_event_enable() and ssam_controller_event_disable() functions, which have been previously introduced for this specific purpose. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210604134755.535590-6-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 776c53c6a448905d8b9b161805b67f82301bfe91 Author: Maximilian Luz Date: Fri Jun 4 15:47:52 2021 +0200 platform/surface: aggregator_cdev: Add support for forwarding events to user-space Currently, debugging unknown events requires writing a custom driver. This is somewhat difficult, slow to adapt, and not entirely user-friendly for quickly trying to figure out things on devices of some third-party user. We can do better. We already have a user-space interface intended for debugging SAM EC requests, so let's add support for receiving events to that. This commit provides support for receiving events by reading from the controller file. It additionally introduces two new IOCTLs to control which event categories will be forwarded. Specifically, a user-space client can specify which target categories it wants to receive events from by registering the corresponding notifier(s) via the IOCTLs and after that, read the received events by reading from the controller device. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210604134755.535590-5-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit b2763358feb28590f6b52a4c95c94a645dadfb26 Author: Maximilian Luz Date: Fri Jun 4 15:47:51 2021 +0200 platform/surface: aggregator: Update copyright It's 2021, update the copyright accordingly. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210604134755.535590-4-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 4b38a1dcf378f5075884b54dc5afeb9d0dfe7681 Author: Maximilian Luz Date: Fri Jun 4 15:47:50 2021 +0200 platform/surface: aggregator: Allow enabling of events without notifiers We can already enable and disable SAM events via one of two ways: either via a (non-observer) notifier tied to a specific event group, or a generic event enable/disable request. In some instances, however, neither method may be desirable. The first method will tie the event enable request to a specific notifier, however, when we want to receive notifications for multiple event groups of the same target category and forward this to the same notifier callback, we may receive duplicate events, i.e. one event per registered notifier. The second method will bypass the internal reference counting mechanism, meaning that a disable request will disable the event regardless of any other client driver using it, which may break the functionality of that driver. To address this problem, add new functions that allow enabling and disabling of events via the event reference counting mechanism built into the controller, without needing to register a notifier. This can then be used in combination with observer notifiers to process multiple events of the same target category without duplication in the same callback function. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210604134755.535590-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 0e8512fab9fd6d78e88931c02a43b04d15566d6b Author: Maximilian Luz Date: Fri Jun 4 15:47:49 2021 +0200 platform/surface: aggregator: Allow registering notifiers without enabling events Currently, each SSAM event notifier is directly tied to one group of events. This makes sense as registering a notifier will automatically take care of enabling the corresponding event group and normally drivers only need notifications for a very limited number of events, associated with different callbacks for each group. However, there are rare cases, especially for debugging, when we want to get notifications for a whole event target category instead of just a single group of events in that category. Registering multiple notifiers, i.e. one per group, may be infeasible due to two issues: a) we might not know every event enable/disable specification as some events are auto-enabled by the EC and b) forwarding this to the same callback will lead to duplicate events as we might not know the full event specification to perform the appropriate filtering. This commit introduces observer-notifiers, which are notifiers that are not tied to a specific event group and do not attempt to manage any events. In other words, they can be registered without enabling any event group or incrementing the corresponding reference count and just act as silent observers, listening to all currently/previously enabled events based on their match-specification. Essentially, this allows us to register one single notifier for a full event target category, meaning that we can process all events of that target category in a single callback without duplication. Specifically, this will be used in the cdev debug interface to forward events to user-space via a device file from which the events can be read. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210604134755.535590-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 3d9907e181de05a32420db46b068b2557173a9f7 Author: Mykola Kostenok Date: Thu Jun 3 20:28:27 2021 +0300 platform/mellanox: mlxreg-hotplug: Revert "move to use request_irq by IRQF_NO_AUTOEN flag" It causes mlxreg-hotplug probing failure: request_threaded_irq() returns -EINVAL due to true value of condition: ((irqflags & IRQF_SHARED) && (irqflags & IRQF_NO_AUTOEN)) after flag "IRQF_NO_AUTOEN" has been added to: err = devm_request_irq(&pdev->dev, priv->irq, mlxreg_hotplug_irq_handler, IRQF_TRIGGER_FALLING | IRQF_SHARED | IRQF_NO_AUTOEN, "mlxreg-hotplug", priv); This reverts commit bee3ecfed0fc ("platform/mellanox: mlxreg-hotplug: move to use request_irq by IRQF_NO_AUTOEN flag"). Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/20210603172827.2599908-1-c_mykolak@nvidia.com Signed-off-by: Hans de Goede commit a32348b743eec51ac01334735a0b6c979157b132 Author: Maximilian Luz Date: Fri Jun 4 15:25:40 2021 +0200 platform/surface: dtx: Add missing mutex_destroy() call in failure path When we fail to open the device file due to DTX being shut down, the mutex is initialized but never destroyed. We are destroying it when releasing the file, so add the missing call in the failure path as well. Fixes: 1d609992832e ("platform/surface: Add DTX driver") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210604132540.533036-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit ae8ee4c1e43af131088bb2da1163fdb864f6f6a2 Author: kernel test robot Date: Thu Jun 3 23:39:36 2021 +0800 platform/x86: dell-wmi-sysman: fw_attr_inuse can be static drivers/platform/x86/firmware_attributes_class.c:11:5: warning: symbol 'fw_attr_inuse' was not declared. Should it be static? Reported-by: kernel test robot Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20210603153936.GA65404@7832cb195c0b Signed-off-by: Hans de Goede commit 14227ce92a402f7a3d51d05dae14d9d22211e501 Author: Hans de Goede Date: Mon May 31 15:59:11 2021 +0200 platform/x86: thinkpad-lmi: Remove unused display_name member from struct tlmi_pwd_setting The struct tlmi_pwd_setting display_name member is initialized, but never read. Remove it and the TLMI_PWDTYPE_MAXLEN define. While at it also remove some other unused [MAX]LEN defines. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210531135911.82582-1-hdegoede@redhat.com commit a40cd7ef22fbb11229cf982920f4ec96c1f49282 Author: Mark Pearson Date: Sun May 30 18:31:11 2021 -0400 platform/x86: think-lmi: Add WMI interface support on Lenovo platforms For Lenovo platforms that support a WMI interface to the BIOS add support, using the firmware-attributes class, to allow users to access and modify various BIOS related settings. Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210530223111.25929-3-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8a1c379c5a03281295c436faf21b0e4716e5b8a8 Author: Mark Pearson Date: Sun May 30 18:31:10 2021 -0400 platform/x86: dell-wmi-sysman: Use firmware_attributes_class helper Update Dell WMI sysman driver to use newly implemented helper module. Reviewed-by: Hans de Goede Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210530223111.25929-2-markpearson@lenovo.com Signed-off-by: Hans de Goede commit 17b707fe5fbd3c019691873c1c11bddb0e0f7225 Author: Mark Pearson Date: Sun May 30 18:31:09 2021 -0400 platform/x86: firmware_attributes_class: Create helper file for handling firmware-attributes class registration events This offers shared code for registering the firmware_attributes_class, which is used by the Dell and Lenovo WMI management drivers. Reported-by: kernel test robot Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210530223111.25929-1-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6cbaee2e109ed0f7327a2d3cbb412f36fd8873e0 Author: Maximilian Luz Date: Thu Jun 3 02:06:36 2021 +0200 platform/surface: aggregator: Fix event disable function Disabling events silently fails due to the wrong command ID being used. Instead of the command ID for the disable call, the command ID for the enable call was being used. This causes the disable call to enable the event instead. As the event is already enabled when we call this function, the EC silently drops this command and does nothing. Use the correct command ID for disabling the event to fix this. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210603000636.568846-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 28e367127718a9cb85d615a71e152f7acee41bfc Author: Jiapeng Chong Date: Wed Jun 2 18:05:48 2021 +0800 platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'error'. Eliminate the follow smatch warning: drivers/platform/x86/toshiba_acpi.c:2834 toshiba_acpi_setup_keyboard() warn: missing error code 'error'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1622628348-87035-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Hans de Goede commit f7b056b48029d9f31628a21c5630263775e25793 Author: Hans de Goede Date: Sun May 30 12:47:44 2021 +0200 platform/x86: touchscreen_dmi: Fix Chuwi Hi10 Pro comment Fix the comment on the entry for the Chuwi Hi10 Pro tablet: 1. Replace "Prus" type with "Pro". 2. Fix the model number, the Chuwi Hi10 Pro is the CWI529, not the CWI597. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210530104744.6720-1-hdegoede@redhat.com commit 8af9fa37b8a3637832cbf8fdd9bd828bd5f0de66 Author: Perry Yuan Date: Thu May 6 19:56:05 2021 +0800 platform/x86: dell-privacy: Add support for Dell hardware privacy add support for Dell privacy driver for the Dell units equipped hardware privacy design, which protect users privacy of audio and camera from hardware level. Once the audio or camera privacy mode activated, any applications will not get any audio or video stream when user pressed ctrl+F4 hotkey, audio privacy mode will be enabled, micmute led will be also changed accordingly The micmute led is fully controlled by hardware & EC(embedded controller) and camera mute hotkey is Ctrl+F9. Currently design only emits SW_CAMERA_LENS_COVER event while the camera lens shutter will be changed by EC & HW(hardware) control *The flow is like this: 1) User presses key. HW does stuff with this key (timeout timer is started) 2) WMI event is emitted from BIOS to kernel 3) WMI event is received by dell-privacy 4) KEY_MICMUTE emitted from dell-privacy 5) Userland picks up key and modifies kcontrol for SW mute 6) Codec kernel driver catches and calls ledtrig_audio_set 7) dell-privacy notifies EC, the timeout is cancelled and the HW mute is activated. If the EC is not notified then the HW mic mute will activate when the timeout triggers, just a bit later than with the active ack. Signed-off-by: Perry Yuan Link: https://lore.kernel.org/r/20210506115605.1504-1-Perry_Yuan@Dell.com [hdegoede@redhat.com: Rework Kconfig/Makefile bits + other small fixups] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8bf388a0a0fe257dd7be9db0352b5b71b4e9138a Author: Hans de Goede Date: Tue May 18 11:47:43 2021 +0200 platform/x86: dell-wmi: Rename dell-wmi.c to dell-wmi-base.c Rename dell-wmi.c to dell-wmi-base.c, so that we can have other dell-wmi-foo.c files which can be added to dell-wmi.ko as "plugins" controlled by separate boolean Kconfig options. Signed-off-by: Hans de Goede commit 25acf21f3a78a1d2815e605e45924393e039b210 Author: Til Jasper Ullrich Date: Tue May 25 17:09:52 2021 +0200 platform/x86: thinkpad_acpi: Add X1 Carbon Gen 9 second fan support The X1 Carbon Gen 9 uses two fans instead of one like the previous generation. This adds support for the second fan. It has been tested on my X1 Carbon Gen 9 (20XXS00100) and works fine. Signed-off-by: Til Jasper Ullrich Link: https://lore.kernel.org/r/20210525150950.14805-1-tju@tju.me Signed-off-by: Hans de Goede commit 3fca4b143e49252934d01ee034227c708da5120e Author: Jiapeng Chong Date: Mon May 24 14:23:58 2021 +0800 platform/x86: thinkpad_acpi: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/platform/x86/thinkpad_acpi.c:7942 volume_write() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1621837438-70790-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Hans de Goede commit ab66724a230937982d58711302f51aa9b569a5c0 Author: Hans de Goede Date: Sun May 23 19:23:31 2021 +0200 platform/x86: ideapad-laptop: Ignore VPC event bit 10 VPC event bit 10 gets set on a Yoga 300-11IBR when the EC believes that the device has changed between laptop/tent/stand/tablet mode. The EC relies on getting angle info from 2 accelerometers through a special windows service calling a DSM on the DUAL250E ACPI-device. Linux does not do this, making the laptop/tent/stand/tablet mode info unreliable. Ignore VPC event bit 10 to avoid the warnings triggered by the default case in ideapad_acpi_notify(). Note that the plan for Linux is to have iio-sensor-proxy read the 2 accelerometers and have it provide info about which mode 360° hinges 2-in-1s to the rest of userspace: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210523172331.177834-1-hdegoede@redhat.com commit b6c3c6ff2043c6519b5be38ac259752d19f4a5f9 Author: Maximilian Luz Date: Sun May 23 15:45:28 2021 +0200 platform/surface: aggregator_registry: Consolidate node groups for 5th- and 6th-gen devices 5th- and 6th-generation Surface devices have all SAM clients defined in ACPI, except for the platform profile/performance mode which his handled via the WSID (Windows Surface Integration Device). Thus, the node groups for those devices are the same and we can just use a single one instead of re-defining the same one over and over again. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210523134528.798887-4-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 460d740839a6e786bb61263d47f4daf23b104f55 Author: Maximilian Luz Date: Sun May 23 15:45:27 2021 +0200 platform/surface: aggregator_registry: Add support for 13" Intel Surface Laptop 4 Add support for the 13" Intel version of the Surface Laptop 4. Use the existing node group for the Surface Laptop 3 since the 15" AMD version already shares its WSID HID with its predecessor and there don't seem to be any significant differences with regards to SAM. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210523134528.798887-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit e978858b4214b1abde9fa650e3112a438d61791c Author: Maximilian Luz Date: Sun May 23 15:45:26 2021 +0200 platform/surface: aggregator_registry: Update comments for 15" AMD Surface Laptop 4 The 15" AMD version of the Surface Laptop 4 shares its WSID HID with the 15" AMD version of the Surface Laptop 3. Update the comments accordingly. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210523134528.798887-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 28117f3a5c3c8375a3304af76357d5bf9cf30f0b Author: Luke D. Jones Date: Mon Apr 19 19:49:15 2021 +1200 platform/x86: asus-nb-wmi: Revert "add support for ASUS ROG Zephyrus G14 and G15" The quirks added to asus-nb-wmi for the ASUS ROG Zephyrus G14 and G15 are wrong, they tell the asus-wmi code to use the vendor specific WMI backlight interface. But there is no such interface on these laptops. As a side effect, these quirks stop the acpi_video driver to register since they make acpi_video_get_backlight_type() return acpi_backlight_vendor, leaving only the native AMD backlight driver in place, which is the one we want. This happy coincidence is being replaced with a new quirk in drivers/acpi/video_detect.c which actually sets the backlight_type to acpi_backlight_native fixinf this properly. This reverts commit 13bceda68fb9 ("platform/x86: asus-nb-wmi: add support for ASUS ROG Zephyrus G14 and G15"). Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20210419074915.393433-3-luke@ljones.dev Signed-off-by: Hans de Goede commit 98c0c85b1040db24f0d04d3e1d315c6c7b05cc07 Author: Luke D. Jones Date: Mon Apr 19 19:49:14 2021 +1200 platform/x86: asus-nb-wmi: Revert "Drop duplicate DMI quirk structures" This is a preparation revert for reverting the "add support for ASUS ROG Zephyrus G14 and G15" change. This reverts commit 67186653c903 ("platform/x86: asus-nb-wmi: Drop duplicate DMI quirk structures") Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20210419074915.393433-2-luke@ljones.dev Signed-off-by: Hans de Goede commit a558ea42c0decd088df1950bb232ac2257929281 Author: Mario Limonciello Date: Wed May 19 12:44:05 2021 -0500 platform/x86: Rename hp-wireless to wireless-hotkey This driver was originally intended to support some HP laptops, but later support was added for Xioami and AMD laptops. Rename it to make it clear that it supports a larger variety of systems. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210519174405.30155-1-mario.limonciello@amd.com Signed-off-by: Hans de Goede commit 7dc4a18d017ca26abd1cea197e486fb3e5cd7632 Author: Hans de Goede Date: Wed May 19 15:56:18 2021 +0200 platform/x86: toshiba_haps: Fix missing newline in pr_debug call in toshiba_haps_notify The pr_debug() call in toshiba_haps_notify() is missing a newline at the end of the string, add this. BugLink: https://bugs.debian.org/799193 Reported-by: Salvatore Bonaccorso Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210519135618.139701-1-hdegoede@redhat.com commit 1351f1d1e2f7d91d0b1963f7b5bf829a4982c778 Author: Wolfram Sang Date: Mon May 17 12:07:45 2021 +0200 platform/x86: samsung-laptop: set debugfs blobs to read only Those blobs can only be read. So, don't confuse users with 'writable' flags. Also, remove S_IFREG because debugfs takes care of that. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210517100746.29663-2-wsa+renesas@sang-engineering.com Signed-off-by: Hans de Goede commit 5b6a9a2f839c7e1863606a00f505ac50b8887287 Author: Wolfram Sang Date: Mon May 17 12:07:44 2021 +0200 platform/x86: samsung-laptop: use octal numbers for rwx file permissions Andy asked me to do it before working further on the code. Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210517100746.29663-1-wsa+renesas@sang-engineering.com Signed-off-by: Hans de Goede commit 4aebcceb332c74c4a3cca60ca292cf73ce3b100c Author: Rajneesh Bhardwaj Date: Thu May 13 11:38:25 2021 -0400 MAINTAINERS: Update info for telemetry - My linux.intel.com email is no longer valid, update it to my gmail id. Signed-off-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210513153825.77214-1-irenic.rajneesh@gmail.com Signed-off-by: Hans de Goede commit e48af75dc7f3059c5a18d7176913457eef5765ad Author: Yang Li Date: Wed May 12 16:57:05 2021 +0800 platform/x86: dcdbas: drop unneeded assignment in host_control_smi() Making '==' operation with ESM_STATUS_CMD_UNSUCCESSFUL directly after calling the function inb() is more efficient, so assignment to 'cmd_status' is redundant. Eliminate the following clang_analyzer warning: drivers/platform/x86/dell/dcdbas.c:397:11: warning: Although the value stored to 'cmd_status' is used in the enclosing expression, the value is never actually read from 'cmd_status' No functional change. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1620809825-84105-1-git-send-email-yang.lee@linux.alibaba.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 842631928afff953d78a71fa762c92db1ab77571 Author: Hans de Goede Date: Mon May 3 17:46:47 2021 +0200 platform/x86: intel_cht_int33fe: Correct "displayport" fwnode reference The Type-C connector on these devices is connected to DP-2 not DP-1, so the reference must be to the DD04 child-node of the GPU, rather then the DD02 child-node. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210503154647.142551-10-hdegoede@redhat.com commit 97be86e3fef01736e7a58b4d59a587e471cb1481 Author: Prasanth KSR Date: Wed May 12 15:55:30 2021 +0530 platform/x86: dell-wmi-sysman: Make populate_foo_data functions more robust 1. Check acpi type before assignment of each property value 2. Add boundary check for properties count Co-developed-by: Divya Bharathi Signed-off-by: Divya Bharathi Signed-off-by: Prasanth KSR Link: https://lore.kernel.org/r/20210512102530.9704-1-prasanth.ksr@dell.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8051334e901f2f7ab9fa30a15b74cdc8e58dfde2 Author: Pho Tran Date: Thu Jun 10 15:28:44 2021 +0200 USB: serial: cp210x: add support for GPIOs on CP2108 Similar to some other CP210x device types, CP2108 has a number of GPIO pins that can be exposed through gpiolib. CP2108 has four serial interfaces but only one set of GPIO pins, which is modelled as a single gpio chip and registered as a child of the first interface. CP2108 has 16 GPIOs so the width of the state variables needs to be extended to 16 bits and this is also reflected in the control requests. Like CP2104, CP2108 have GPIO pins with configurable alternate functions and pins unavailable for GPIO use are determined and reported to gpiolib at probe. Signed-off-by: Pho Tran Co-developed-by: Tung Pham Signed-off-by: Tung Pham [ johan: rewrite gpio get() and set(); misc cleanups; amend commit message ] Link: https://lore.kernel.org/r/20210610132844.25495-1-johan@kernel.org Signed-off-by: Johan Hovold commit 3d41fff3ae3980c055f3c7861264c46c924f3e4c Author: Tony Lindgren Date: Tue May 18 10:53:06 2021 +0300 clocksource/drivers/timer-ti-dm: Drop unnecessary restore The device is not losing context on CPU_CLUSTER_PM_ERROR. As we are only saving and restoring context with cpu_pm, there is no need to restore the context in case of an error. Note that the unnecessary restoring of context does not cause issues, it's just not needed. Cc: Lokesh Vutla Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210518075306.35532-1-tony@atomide.com commit 8b33dfe0ba1c84c1aab2456590b38195837f1e6e Author: Samuel Holland Date: Fri May 14 21:14:39 2021 -0500 clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround Bad counter reads are experienced sometimes when bit 10 or greater rolls over. Originally, testing showed that at least 10 lower bits would be set to the same value during these bad reads. However, some users still reported time skips. Wider testing revealed that on some chips, occasionally only the lowest 9 bits would read as the anomalous value. During these reads (which still happen only when bit 10), bit 9 would read as the correct value. Reduce the mask by one bit to cover these cases as well. Cc: stable@vger.kernel.org Fixes: c950ca8c35ee ("clocksource/drivers/arch_timer: Workaround for Allwinner A64 timer instability") Reported-by: Roman Stratiienko Signed-off-by: Samuel Holland Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210515021439.55316-1-samuel@sholland.org commit f94bc2667fb204d7c131ac39d9ea342bd16116dc Author: Wan Jiabing Date: Tue Jun 15 19:54:40 2021 +0800 clocksource/drivers/arm_global_timer: Remove duplicated argument in arm_global_timer Fix the following coccicheck warning: drivers/clocksource/arm_global_timer.c:107:4-23: duplicated argument to & or | Signed-off-by: Wan Jiabing Reviewed-by: Patrice Chotard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210615115440.8881-1-wanjiabing@vivo.com commit be534f8ee137b95046d7c53c8200ffdcf05781a7 Author: Zou Wei Date: Sat Jun 12 17:27:26 2021 +0800 clocksource/drivers/arm_global_timer: Make symbol 'gt_clk_rate_change_nb' static The sparse tool complains as follows: drivers/clocksource/arm_global_timer.c:54:23: warning: symbol 'gt_clk_rate_change_nb' was not declared. Should it be static? This symbol is not used outside of arm_global_timer.c, so mark it static. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1623490046-37972-1-git-send-email-zou_wei@huawei.com commit 68e2215e9d5f5ec8e5ba0158683742932519cad9 Author: Andrea Merello Date: Tue Apr 6 15:00:45 2021 +0200 arm: zynq: don't disable CONFIG_ARM_GLOBAL_TIMER due to CONFIG_CPU_FREQ anymore Now ARM global timer driver could work even if it's source clock rate changes, so we don't need to disable that driver when cpu frequency scaling is in use. This cause Zynq arch to get support for timer delay and get_cycles(). Signed-off-by: Andrea Merello Cc: Patrice Chotard Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: Michal Simek Cc: Sören Brinkmann Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210406130045.15491-3-andrea.merello@gmail.com commit 171b45a4a70eef2fd36bb794ce4f5a48c440361e Author: Andrea Merello Date: Tue Apr 6 15:00:44 2021 +0200 clocksource/drivers/arm_global_timer: Implement rate compensation whenever source clock changes This patch adds rate change notification support for the parent clock; should that clock change, then we try to adjust the our prescaler in order to compensate (i.e. we adjust to still get the same timer frequency). This is loosely based on what it's done in timer-cadence-ttc. timer-sun51, mips-gic-timer and smp_twd.c also seem to look at their parent clock rate and to perform some kind of adjustment whenever needed. In this particular case we have only one single counter and prescaler for all clocksource, clockevent and timer_delay, and we just update it for all (i.e. we don't let it go and call clockevents_update_freq() to notify to the kernel that our rate has changed). Note that, there is apparently no other way to fixup things, because once we call register_current_timer_delay(), specifying the timer rate, it seems that that rate is not supposed to change ever. In order for this mechanism to work, we have to make assumptions about how much the initial clock is supposed to eventually decrease from the initial one, and set our initial prescaler to a value that we can eventually decrease enough to compensate. We provide an option in KConfig for this. In case we end up in a situation in which we are not able to compensate the parent clock change, we fail returning NOTIFY_BAD. This fixes a real-world problem with Zynq arch not being able to use this driver and CPU_FREQ at the same time (because ARM global timer is fed by the CPU clock, which may keep changing when CPU_FREQ is enabled). Signed-off-by: Andrea Merello Cc: Patrice Chotard Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: Michal Simek Cc: Sören Brinkmann Reviewed-by: Patrice Chotard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210406130045.15491-2-andrea.merello@gmail.com commit 2a03ddbde1e1268f15de6f15b09f305a33bff4ba Author: Kees Cook Date: Wed Jun 16 07:51:28 2021 -0700 pstore/blk: Move verify_size() macro out of function There's no good reason for the verify_size macro to live inside the function. Move it up with the check_size() macro and fix indenting. Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Kees Cook commit 6eed261f48d5a53f369c88d4296621f2d8647493 Author: Kees Cook Date: Tue Jun 15 08:40:04 2021 -0700 pstore/blk: Improve failure reporting There was no feedback on bad registration attempts. Add details on the failure cause. Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Kees Cook commit b7fb14d3ac63117e0e8beabe75f4ea52051fbe3a Author: Christoph Hellwig Date: Wed Jun 16 15:46:58 2021 +0200 ide: remove the legacy ide driver The legay ide driver has been replace with libata starting in 2003 and has been scheduled for removal for a while. Finally kill it off so that we can start cleaning up various bits of cruft it forced on the block layer. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b90257bfddbd01f3686d99c256ae6dd24a6a1deb Author: Christoph Hellwig Date: Wed Jun 16 15:46:57 2021 +0200 m68k: use libata instead of the legacy ide driver Switch the m68 defconfigs from the deprecated ide subsystem to use libata instead. Signed-off-by: Christoph Hellwig Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210616134658.1471835-6-hch@lst.de Signed-off-by: Jens Axboe commit 468c736b5eb34c712636279eb49251a6f7156f40 Author: Christoph Hellwig Date: Wed Jun 16 15:46:56 2021 +0200 ARM: disable CONFIG_IDE in pxa_defconfig pxa_defconfig already enables libata including the pata_pcmcia driver, so drop the legacy ide driver and idecs host driver. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210616134658.1471835-5-hch@lst.de Signed-off-by: Jens Axboe commit cdc429452596ea9e0c76c8b10b5e93feab522906 Author: Christoph Hellwig Date: Wed Jun 16 15:46:55 2021 +0200 ARM: disable CONFIG_IDE in footbridge_defconfig footbridge_defconfig enables CONFIG_IDE but no actual host controller driver, so just drop it. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210616134658.1471835-4-hch@lst.de Signed-off-by: Jens Axboe commit 492b1389005c71e0ce81e24d5be6271546aa8c34 Author: Christoph Hellwig Date: Wed Jun 16 15:46:54 2021 +0200 alpha: use libata instead of the legacy ide driver Switch the alpha defconfig from the legacy ide driver to libata. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210616134658.1471835-3-hch@lst.de Signed-off-by: Jens Axboe commit ea8b16303f2b42d8ea15c7d762e546e4bc793b1f Author: Christoph Hellwig Date: Wed Jun 16 15:46:53 2021 +0200 pata_cypress: add a module option to disable BM-DMA Multiple users report that they need to disable DMA on this driver, so provide an option to do so without affecting all of libata. Signed-off-by: Christoph Hellwig Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20210616134658.1471835-2-hch@lst.de Signed-off-by: Jens Axboe commit a72c374f97a4c7b2f9dde5144c867fec4bdcd798 Author: Ming Lei Date: Wed Jun 9 09:58:22 2021 +0800 block: mark queue init done at the end of blk_register_queue Mark queue init done when everything is done well in blk_register_queue(), so that wbt_enable_default() can be run quickly without any RCU period involved since adding rq qos requires to freeze queue. Also no any side effect by delaying to mark queue init done. Reported-by: Yi Zhang Cc: Bart Van Assche Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Tested-by: Yi Zhang Link: https://lore.kernel.org/r/20210609015822.103433-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 2cafe29a8d03f02a3d16193bdaae2f3e82a423f9 Author: Ming Lei Date: Wed Jun 9 09:58:21 2021 +0800 block: fix race between adding/removing rq qos and normal IO Yi reported several kernel panics on: [16687.001777] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 ... [16687.163549] pc : __rq_qos_track+0x38/0x60 or [ 997.690455] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 ... [ 997.850347] pc : __rq_qos_done+0x2c/0x50 Turns out it is caused by race between adding rq qos(wbt) and normal IO because rq_qos_add can be run when IO is being submitted, fix this issue by freezing queue before adding/deleting rq qos to queue. rq_qos_exit() needn't to freeze queue because it is called after queue has been frozen. iolatency calls rq_qos_add() during allocating queue, so freezing won't add delay because queue usage refcount works at atomic mode at that time. iocost calls rq_qos_add() when writing cgroup attribute file, that is fine to freeze queue at that time since we usually freeze queue when storing to queue sysfs attribute, meantime iocost only exists on the root cgroup. wbt_init calls it in blk_register_queue() and queue sysfs attribute store(queue_wb_lat_store() when write it 1st time in case of !BLK_WBT_MQ), the following patch will speedup the queue freezing in wbt_init. Reported-by: Yi Zhang Cc: Bart Van Assche Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Tested-by: Yi Zhang Link: https://lore.kernel.org/r/20210609015822.103433-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 7740ab84c13e32002742106afd443a4ca7fe3918 Author: Rouven Czerwinski Date: Wed Jun 16 14:53:31 2021 +0200 regulator: fixed: use dev_err_probe for gpio Instead of returning the the PTR_ERR directly, use dev_err_probe which will also correctly set the deferred probe reason in /sys/kernel/debug/deferred_devices, making it easier to debug missing devices on the system. Signed-off-by: Rouven Czerwinski Link: https://lore.kernel.org/r/20210616125331.153414-1-r.czerwinski@pengutronix.de Signed-off-by: Mark Brown commit 830c364f4a2299e8215c40f0a2ba9229c0fdeede Author: Axel Lin Date: Wed Jun 16 11:44:58 2021 +0800 regulator: sy7636a: Use rdev_get_drvdata at proper place At the context with *rdev, use rdev_get_drvdata() is more intuitive. Signed-off-by: Axel Lin Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20210616034458.3499522-3-axel.lin@ingics.com Signed-off-by: Mark Brown commit 31a89d297e196472875dc7d4a8f5dd0aaefcc0b4 Author: Axel Lin Date: Wed Jun 16 11:44:57 2021 +0800 regulator: sy7636a: Make regulator_desc static const It's only used in this file and never changed, make it static const. Signed-off-by: Axel Lin Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20210616034458.3499522-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 686f6b31bf6cea71ca941b6dbf9e1388d54222b6 Author: Axel Lin Date: Wed Jun 16 11:44:56 2021 +0800 regulator: sy7636a: Add terminating entry for platform_device_id table The platform_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20210616034458.3499522-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 512d895664a318d57de0ca3655d2bf1c280767a0 Author: Axel Lin Date: Wed Jun 16 09:18:16 2021 +0800 regulator: rt6160: Fix setting suspend voltage The vsel active level is for the normal voltage, the opposite level is the suspend voltage. Signed-off-by: Axel Lin Reviewed-by: ChiYuan Huang Link: https://lore.kernel.org/r/20210616011816.3479406-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit e99d7c69fd4c18e7319f8aab8e252b12130796bf Author: Jiapeng Chong Date: Wed Jun 16 13:55:41 2021 +0800 ASoC: hdmi-codec: make hdmi_codec_controls static This symbol is not used outside of hdmi-codec.c, so marks it static. Fix the following sparse warning: sound/soc/codecs/hdmi-codec.c:750:25: warning: symbol 'hdmi_codec_controls' was not declared. Should it be static? Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1623822941-3077-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 83bd5c53ebf6f2f7b8b0b7db4c038ad7a5a5448a Author: Yang Li Date: Wed Jun 16 10:45:35 2021 +0800 ASoC: codecs: wcd938x: fix boolreturn.cocci warning Return statements in functions returning bool should use true/false instead of 1/0. Fix the following coccicheck warning: ./sound/soc/codecs/wcd938x.c:1190:9-10: WARNING: return of 0/1 in function 'wcd938x_volatile_register' with return type bool. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1623811535-15841-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 3325b1515a92fc07ec16b4d33c8bccc0a83f12ca Author: Yang Yingliang Date: Tue Jun 15 22:15:02 2021 +0800 ASoC: rockchip: spdif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615141502.1683686-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit db4d6d2e6472a5a49801bb5f2c1bd96ed6ffa3d1 Author: Yang Yingliang Date: Tue Jun 15 22:15:01 2021 +0800 ASoC: rockchip: pdm: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615141502.1683686-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 4ffbcd4ab0b6f77d29acde69dc25bd95318fae5e Author: Yang Yingliang Date: Tue Jun 15 22:15:00 2021 +0800 ASoC: rockchip: i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615141502.1683686-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 06cc52329cb098ba0858032998e382311dcd9743 Author: Jiapeng Chong Date: Wed Jun 16 13:51:07 2021 +0800 ASoC: codecs: Fix duplicate included sound/soc.h Clean up the following includecheck warnings: ./sound/soc/codecs/wcd938x.c: sound/soc.h is included more than once. ./sound/soc/codecs/wcd938x-sdw.c: sound/soc.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1623822667-130511-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit fac165f22ac947b55407cd3a60a2a9824f905235 Author: Richard Fitzgerald Date: Wed Jun 16 14:56:04 2021 +0100 ASoC: cs42l42: Correct definition of CS42L42_ADC_PDN_MASK The definition of CS42L42_ADC_PDN_MASK was incorrectly defined as the HP_PDN bit. Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20210616135604.19363-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 2400c13c437debc99d3399a7100d4e8c3fe20a08 Author: Sudeep Holla Date: Fri Jun 11 19:10:58 2021 +0000 powerpc/watchdog: include linux/processor.h for spin_until_cond This implementation uses spin_until_cond in wd_smp_lock including neither linux/processor.h nor asm/processor.h This patch includes linux/processor.h here for spin_until_cond usage. Signed-off-by: Sudeep Holla Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5e8d2d50f301a346040362028c2ecba40685de9e.1623438544.git.christophe.leroy@csgroup.eu commit db8f7066dc498acf9074ed3c11a7a24f318d8d4f Author: Sudeep Holla Date: Fri Jun 11 19:10:57 2021 +0000 powerpc/64: drop redundant defination of spin_until_cond linux/processor.h has exactly same defination for spin_until_cond. Drop the redundant defination in asm/processor.h Signed-off-by: Sudeep Holla Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1fff2054e5dfc00329804dbd3f2a91667c9a8aff.1623438544.git.christophe.leroy@csgroup.eu commit ac3d085368b3abf19b24d8505b897454c7372855 Author: Christophe Leroy Date: Thu Jun 10 15:58:34 2021 +0000 powerpc/signal32: Remove impossible #ifdef combinations PPC_TRANSACTIONAL_MEM is only on book3s/64 SPE is only on booke PPC_TRANSACTIONAL_MEM selects ALTIVEC and VSX Therefore, within PPC_TRANSACTIONAL_MEM sections, ALTIVEC and VSX are always defined while SPE never is. Remove all SPE code and all #ifdef ALTIVEC and VSX in tm functions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a069a348ee3c2fe3123a5a93695c2b35dc42cb40.1623340691.git.christophe.leroy@csgroup.eu commit baf24d23be7d2357a2aa9c5ffb6a2d680ac2a68c Author: Christophe Leroy Date: Fri Jun 11 19:08:54 2021 +0000 powerpc/32: Display modules range in virtual memory layout book3s/32 and 8xx don't use vmalloc for modules. Print the modules area at startup as part of the virtual memory layout: [ 0.000000] Kernel virtual memory layout: [ 0.000000] * 0xffafc000..0xffffc000 : fixmap [ 0.000000] * 0xc9000000..0xffafc000 : vmalloc & ioremap [ 0.000000] * 0xb0000000..0xc0000000 : modules [ 0.000000] Memory: 118480K/131072K available (7152K kernel code, 2320K rwdata, 1328K rodata, 368K init, 854K bss, 12592K reserved, 0K cma-reserved) Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/98394503e92d6fd6d8f657e0b263b32f21cf2790.1623438478.git.christophe.leroy@csgroup.eu commit b112fb913b5b5705db22efa90ec60f42518934af Author: Daniel Axtens Date: Mon Jun 14 22:09:07 2021 +1000 powerpc: make stack walking KASAN-safe Make our stack-walking code KASAN-safe by using __no_sanitize_address. Generic code, arm64, s390 and x86 all make accesses unchecked for similar sorts of reasons: when unwinding a stack, we might touch memory that KASAN has marked as being out-of-bounds. In ppc64 KASAN development, I hit this sometimes when checking for an exception frame - because we're checking an arbitrary offset into the stack frame. See commit 20955746320e ("s390/kasan: avoid false positives during stack unwind"), commit bcaf669b4bdb ("arm64: disable kasan when accessing frame->fp in unwind_frame"), commit 91e08ab0c851 ("x86/dumpstack: Prevent KASAN false positive warnings") and commit 6e22c8366416 ("tracing, kasan: Silence Kasan warning in check_stack of stack_tracer"). Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210614120907.1952321-1-dja@axtens.net commit d81090ed44c0d15abf2b07663d5f0b9e5ba51525 Author: Athira Rajeev Date: Tue May 25 09:51:43 2021 -0400 selftests/powerpc: EBB selftest for MMCR0 control for PMU SPRs in ISA v3.1 With the MMCR0 control bit (PMCCEXT) in ISA v3.1, read access to group B registers is restricted when MMCR0 PMCC=0b00. In other platforms (like power9), the older behaviour works where group B PMU SPRs are readable. Patch creates a selftest which verifies that the test takes a SIGILL when attempting to read PMU registers via helper function "dump_ebb_state" for ISA v3.1. Signed-off-by: Athira Rajeev Tested-by: Nageswara R Sastry > Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1621950703-1532-3-git-send-email-atrajeev@linux.vnet.ibm.com commit 45677c9aebe926192e59475b35a1ff35ff2d4217 Author: Athira Rajeev Date: Tue May 25 09:51:42 2021 -0400 selftests/powerpc: Fix "no_handler" EBB selftest The "no_handler_test" in ebb selftests attempts to read the PMU registers twice via helper function "dump_ebb_state". First dump is just before closing of event and the second invocation is done after closing of the event. The original intention of second dump_ebb_state was to dump the state of registers at the end of the test when the counters are frozen. But this will be achieved with the first call itself since sample period is set to low value and PMU will be frozen by then. Hence patch removes the dump which was done before closing of the event. Reported-by: Shirisha Ganta Signed-off-by: Athira Rajeev Tested-by: Nageswara R Sastry > Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1621950703-1532-2-git-send-email-atrajeev@linux.vnet.ibm.com commit ab3aab292cb2f417f63b8f4887c1dd01c2a831cd Author: Christophe Leroy Date: Wed Jun 9 06:10:29 2021 +0000 powerpc: Move update_power8_hid0() into its only user update_power8_hid0() is used only by powernv platform subcore.c Move it there. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/37f41d74faa0c66f90b373e243e8b1ee37a1f6fa.1623219019.git.christophe.leroy@csgroup.eu commit 77b0bed74232c480b94bae188b6c7cd0ddee92e8 Author: Christophe Leroy Date: Wed Jun 9 05:52:50 2021 +0000 powerpc: Remove proc_trap() proc_trap() has never been used, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/827944ea12d470c2f862635f48b5ee6c1520351f.1623217909.git.christophe.leroy@csgroup.eu commit 4696cfdb1380238dca2bda6199428d7e50c4ea38 Author: Christophe Leroy Date: Tue Jun 8 17:22:51 2021 +0000 powerpc/32: Remove __main() Comment says that __main() is there to make GCC happy. It's been there since the implementation of ppc arch in Linux 1.3.45. ppc32 is the only architecture having that. Even ppc64 doesn't have it. Seems like GCC is still happy without it. Drop it for good. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d01028f8166b98584eec536b52f14c5e3f98ff6b.1623172922.git.christophe.leroy@csgroup.eu commit 91e9ee7e949bff08cc3845a4811185e826b6e2f1 Author: Christophe Leroy Date: Mon Jun 7 10:56:06 2021 +0000 powerpc/32s: Rename PTE_SIZE to PTE_T_SIZE PTE_SIZE means PTE page table size in most placed, whereas in hash_low.S in means size of one entry in the table. Rename it PTE_T_SIZE, and define it directly in hash_low.S instead of going through asm-offsets. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/83a008a9fd6cc3f2bbcb470f592555d260ed7a3d.1623063174.git.christophe.leroy@csgroup.eu commit e72421a085a8dc81c71b0daeb89612279c2c621c Author: Christophe Leroy Date: Mon Jun 7 10:56:05 2021 +0000 powerpc: Define swapper_pg_dir[] in C Don't duplicate swapper_pg_dir[] in each platform's head.S Define it in mm/pgtable.c Define MAX_PTRS_PER_PGD because on book3s/64 PTRS_PER_PGD is not a constant. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5e3f1b8a4695c33ccc80aa3870e016bef32b85e1.1623063174.git.christophe.leroy@csgroup.eu commit 45b30fafe528601f1a4449c9d68d8ebe7bbc39ad Author: Christophe Leroy Date: Mon Jun 7 10:56:04 2021 +0000 powerpc: Define empty_zero_page[] in C At the time being, empty_zero_page[] is defined in each platform head.S. Define it in mm/mem.c instead, and put it in BSS section instead of the DATA section. Commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss") explains why it is interesting to have it in BSS. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5838caffa269e0957c5a50cc85477876220298b0.1623063174.git.christophe.leroy@csgroup.eu commit a1ea0ca8a6f17d7b79bbc4d05dd4e6ca162d8f15 Author: Christophe Leroy Date: Fri Jun 4 12:31:09 2021 +0000 powerpc/selftests: Use gettid() instead of getppid() for null_syscall gettid() is 10% lighter than getppid(), use it for null_syscall selftest. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0ad62673d3e063f848e7c99d719bb966efd433e8.1622809833.git.christophe.leroy@csgroup.eu commit e2c043163d44f7b3a9e65d9161af72b647b18451 Author: Christophe Leroy Date: Thu Jun 3 09:29:07 2021 +0000 powerpc/nohash: Remove DEBUG_HARDER DEBUG_HARDER is not user selectable. Remove it together with related messages. Also remove two pr_devel() messages that should likely have been pr_hard(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0f25109b0e12fdd1e6541dedbb2212cc53526a57.1622712515.git.christophe.leroy@csgroup.eu commit a36c0faf3dbc429d5ddcb941afe38dd6fe6c5901 Author: Christophe Leroy Date: Thu Jun 3 09:29:06 2021 +0000 powerpc/nohash: Remove DEBUG_CLAMP_LAST_CONTEXT DEBUG_CLAMP_LAST_CONTEXT was there in the old days to reduce number of contexts in order to ease debugging implementation of context switching, but that's been quite stable during years now. As it is not user selectable, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/da81837b452e8b9f1657b529b9c3050dc10b9770.1622712515.git.christophe.leroy@csgroup.eu commit dac3db1edf8b4c75859f07789f577322f2a51e3a Author: Christophe Leroy Date: Thu Jun 3 09:29:05 2021 +0000 powerpc/nohash: Remove DEBUG_MAP_CONSISTENCY mmu_context handling has been there for years, so we would know if there was problems with maps. DEBUG_MAP_CONSISTENCY is not user selectable, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6fe2b88956db53f8d6ee221525b2c5dc6aec82c6.1622712515.git.christophe.leroy@csgroup.eu commit c13066e53aabd8f268f051d267270765e10343aa Author: Christophe Leroy Date: Thu Jun 3 09:29:04 2021 +0000 powerpc/nohash: Remove CONFIG_SMP #ifdefery in mmu_context.h Everything can be done even when CONFIG_SMP is not selected. Just use IS_ENABLED() where relevant and rely on GCC to opt out unneeded code and variables when CONFIG_SMP is not set. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cc13b87b0f750a538621876ecc24c22a07e7c8be.1622712515.git.christophe.leroy@csgroup.eu commit a56ab7c7290f5922363d1ee11bbafc4da2b9bf51 Author: Christophe Leroy Date: Thu Jun 3 09:29:03 2021 +0000 powerpc/nohash: Convert set_context() to C ppc8xx already has set_context() in C. Other ones have it in assembly. The only thing it does is to write the context id into SPRN_PID. Do it in C. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a5d0759064f3831c6b88af49ef5d3b05ba1c4dad.1622712515.git.christophe.leroy@csgroup.eu commit 25910260ff69fa0c37e26541aac4e8f978e1f17f Author: Christophe Leroy Date: Thu Jun 3 09:29:02 2021 +0000 powerpc/nohash: Refactor update of BDI2000 pointers in switch_mmu_context() Instead of duplicating the update of BDI2000 pointers in set_context(), do it directly from switch_mmu_context(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4c54997edd3548fa54717915e7c6ebaf60f208c0.1622712515.git.christophe.leroy@csgroup.eu commit 240efd717c415e69511780044f44416bdf161523 Author: Christophe Leroy Date: Thu Jun 3 09:13:54 2021 +0000 powerpc/kuap: Force inlining of all first level KUAP helpers. All KUAP helpers defined in asm/kup.h are single line functions that should be inlined. But on book3s/32 build, we get many instances of . Force inlining of those helpers. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8479a862e165a57a855292d47e24c259a578f5a0.1622711627.git.christophe.leroy@csgroup.eu commit cb2f1fb205cc20695fcaef84baf80d9d3e54c88b Author: Christophe Leroy Date: Thu Jun 3 08:41:48 2021 +0000 powerpc/kuap: Remove to/from/size parameters of prevent_user_access() prevent_user_access() doesn't use anymore to/from/size parameters. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b7113662fd2c26e4c33e9d705de324bd3860822e.1622708530.git.christophe.leroy@csgroup.eu commit d008f8f8a0c3efe4fe1008a797f9497ea5965e27 Author: Christophe Leroy Date: Thu Jun 3 08:41:46 2021 +0000 powerpc/kuap: Remove KUAP_CURRENT_XXX book3s/32 was the only user of KUAP_CURRENT_XXX. After rework of book3s/32 KUAP, it is not used anymore. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/549214ecf6887d965645e664520d4886663c5ffb.1622708530.git.christophe.leroy@csgroup.eu commit 9f5bd8f1471d7498c934c0a686fd0997cf872653 Author: Christophe Leroy Date: Thu Jun 3 08:41:45 2021 +0000 powerpc/32s: Activate KUAP and KUEP by default Now that KUAP and KUEP have been significantly optimised and can be disabled at boot time using 'nosmap' and 'nosmep' kernel parameters, them can be active by default like in other powerpc platforms. It is still possible to disable them completely in the configuration. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/86c7c74a3ba5312daea7e9658b096e2bcc6f4b64.1622708530.git.christophe.leroy@csgroup.eu commit 16132529cee586ee9a058bb33cfbdcb5d884f6b3 Author: Christophe Leroy Date: Thu Jun 3 08:41:44 2021 +0000 powerpc/32s: Rework Kernel Userspace Access Protection On book3s/32, KUAP is provided by toggling Ks bit in segment registers. One segment register addresses 256M of virtual memory. At the time being, KUAP implements a complex logic to apply the unlock/lock on the exact number of segments covering the user range to access, with saving the boundaries of the range of segments in a member of thread struct. But most if not all user accesses are within a single segment. Rework KUAP with a different approach: - Open only one segment, the one corresponding to the starting address of the range to be accessed. - If a second segment is involved, it will generate a page fault. The segment will then be open by the page fault handler. The kuap member of thread struct will now contain: - The start address of the current on going user access, that will be used to know which segment to lock at the end of the user access. - ~0 when no user access is open - ~1 when additionnal segments are opened by a page fault. Then, at lock time - When only one segment is open, close it. - When several segments are open, close all user segments. Almost 100% of the time, only one segment will be involved. In interrupts, inline the function that unlock/lock all segments, because not inlining them implies a lot of register save/restore. With the patch, writing value 128 in userspace in perf_copy_attr() is done with 16 instructions: 3890: 93 82 04 dc stw r28,1244(r2) 3894: 7d 20 e5 26 mfsrin r9,r28 3898: 55 29 00 80 rlwinm r9,r9,0,2,0 389c: 7d 20 e1 e4 mtsrin r9,r28 38a0: 4c 00 01 2c isync 38a4: 39 20 00 80 li r9,128 38a8: 91 3c 00 00 stw r9,0(r28) 38ac: 81 42 04 dc lwz r10,1244(r2) 38b0: 39 00 ff ff li r8,-1 38b4: 91 02 04 dc stw r8,1244(r2) 38b8: 2c 0a ff fe cmpwi r10,-2 38bc: 41 82 00 88 beq 3944 38c0: 7d 20 55 26 mfsrin r9,r10 38c4: 65 29 40 00 oris r9,r9,16384 38c8: 7d 20 51 e4 mtsrin r9,r10 38cc: 4c 00 01 2c isync ... 3944: 48 00 00 01 bl 3944 3944: R_PPC_REL24 kuap_lock_all_ool Before the patch it was 118 instructions. In reality only 42 are executed in most cases, but GCC is not able to see that a properly aligned user access cannot involve more than one segment. 5060: 39 1d 00 04 addi r8,r29,4 5064: 3d 20 b0 00 lis r9,-20480 5068: 7c 08 48 40 cmplw r8,r9 506c: 40 81 00 08 ble 5074 5070: 3d 00 b0 00 lis r8,-20480 5074: 39 28 ff ff addi r9,r8,-1 5078: 57 aa 00 06 rlwinm r10,r29,0,0,3 507c: 55 29 27 3e rlwinm r9,r9,4,28,31 5080: 39 29 00 01 addi r9,r9,1 5084: 7d 29 53 78 or r9,r9,r10 5088: 91 22 04 dc stw r9,1244(r2) 508c: 7d 20 ed 26 mfsrin r9,r29 5090: 55 29 00 80 rlwinm r9,r9,0,2,0 5094: 7c 08 50 40 cmplw r8,r10 5098: 40 81 00 c0 ble 5158 509c: 7d 46 50 f8 not r6,r10 50a0: 7c c6 42 14 add r6,r6,r8 50a4: 54 c6 27 be rlwinm r6,r6,4,30,31 50a8: 7d 20 51 e4 mtsrin r9,r10 50ac: 3c ea 10 00 addis r7,r10,4096 50b0: 39 29 01 11 addi r9,r9,273 50b4: 7f 88 38 40 cmplw cr7,r8,r7 50b8: 55 29 02 06 rlwinm r9,r9,0,8,3 50bc: 40 9d 00 9c ble cr7,5158 50c0: 2f 86 00 00 cmpwi cr7,r6,0 50c4: 41 9e 00 4c beq cr7,5110 50c8: 2f 86 00 01 cmpwi cr7,r6,1 50cc: 41 9e 00 2c beq cr7,50f8 50d0: 2f 86 00 02 cmpwi cr7,r6,2 50d4: 41 9e 00 14 beq cr7,50e8 50d8: 7d 20 39 e4 mtsrin r9,r7 50dc: 39 29 01 11 addi r9,r9,273 50e0: 3c e7 10 00 addis r7,r7,4096 50e4: 55 29 02 06 rlwinm r9,r9,0,8,3 50e8: 7d 20 39 e4 mtsrin r9,r7 50ec: 39 29 01 11 addi r9,r9,273 50f0: 3c e7 10 00 addis r7,r7,4096 50f4: 55 29 02 06 rlwinm r9,r9,0,8,3 50f8: 7d 20 39 e4 mtsrin r9,r7 50fc: 3c e7 10 00 addis r7,r7,4096 5100: 39 29 01 11 addi r9,r9,273 5104: 7f 88 38 40 cmplw cr7,r8,r7 5108: 55 29 02 06 rlwinm r9,r9,0,8,3 510c: 40 9d 00 4c ble cr7,5158 5110: 7d 20 39 e4 mtsrin r9,r7 5114: 39 29 01 11 addi r9,r9,273 5118: 3c c7 10 00 addis r6,r7,4096 511c: 55 29 02 06 rlwinm r9,r9,0,8,3 5120: 7d 20 31 e4 mtsrin r9,r6 5124: 39 29 01 11 addi r9,r9,273 5128: 3c c6 10 00 addis r6,r6,4096 512c: 55 29 02 06 rlwinm r9,r9,0,8,3 5130: 7d 20 31 e4 mtsrin r9,r6 5134: 39 29 01 11 addi r9,r9,273 5138: 3c c7 30 00 addis r6,r7,12288 513c: 55 29 02 06 rlwinm r9,r9,0,8,3 5140: 7d 20 31 e4 mtsrin r9,r6 5144: 3c e7 40 00 addis r7,r7,16384 5148: 39 29 01 11 addi r9,r9,273 514c: 7f 88 38 40 cmplw cr7,r8,r7 5150: 55 29 02 06 rlwinm r9,r9,0,8,3 5154: 41 9d ff bc bgt cr7,5110 5158: 4c 00 01 2c isync 515c: 39 20 00 80 li r9,128 5160: 91 3d 00 00 stw r9,0(r29) 5164: 38 e0 00 00 li r7,0 5168: 90 e2 04 dc stw r7,1244(r2) 516c: 7d 20 ed 26 mfsrin r9,r29 5170: 65 29 40 00 oris r9,r9,16384 5174: 40 81 00 c0 ble 5234 5178: 7d 47 50 f8 not r7,r10 517c: 7c e7 42 14 add r7,r7,r8 5180: 54 e7 27 be rlwinm r7,r7,4,30,31 5184: 7d 20 51 e4 mtsrin r9,r10 5188: 3d 4a 10 00 addis r10,r10,4096 518c: 39 29 01 11 addi r9,r9,273 5190: 7c 08 50 40 cmplw r8,r10 5194: 55 29 02 06 rlwinm r9,r9,0,8,3 5198: 40 81 00 9c ble 5234 519c: 2c 07 00 00 cmpwi r7,0 51a0: 41 82 00 4c beq 51ec 51a4: 2c 07 00 01 cmpwi r7,1 51a8: 41 82 00 2c beq 51d4 51ac: 2c 07 00 02 cmpwi r7,2 51b0: 41 82 00 14 beq 51c4 51b4: 7d 20 51 e4 mtsrin r9,r10 51b8: 39 29 01 11 addi r9,r9,273 51bc: 3d 4a 10 00 addis r10,r10,4096 51c0: 55 29 02 06 rlwinm r9,r9,0,8,3 51c4: 7d 20 51 e4 mtsrin r9,r10 51c8: 39 29 01 11 addi r9,r9,273 51cc: 3d 4a 10 00 addis r10,r10,4096 51d0: 55 29 02 06 rlwinm r9,r9,0,8,3 51d4: 7d 20 51 e4 mtsrin r9,r10 51d8: 3d 4a 10 00 addis r10,r10,4096 51dc: 39 29 01 11 addi r9,r9,273 51e0: 7c 08 50 40 cmplw r8,r10 51e4: 55 29 02 06 rlwinm r9,r9,0,8,3 51e8: 40 81 00 4c ble 5234 51ec: 7d 20 51 e4 mtsrin r9,r10 51f0: 39 29 01 11 addi r9,r9,273 51f4: 3c ea 10 00 addis r7,r10,4096 51f8: 55 29 02 06 rlwinm r9,r9,0,8,3 51fc: 7d 20 39 e4 mtsrin r9,r7 5200: 39 29 01 11 addi r9,r9,273 5204: 3c e7 10 00 addis r7,r7,4096 5208: 55 29 02 06 rlwinm r9,r9,0,8,3 520c: 7d 20 39 e4 mtsrin r9,r7 5210: 39 29 01 11 addi r9,r9,273 5214: 3c ea 30 00 addis r7,r10,12288 5218: 55 29 02 06 rlwinm r9,r9,0,8,3 521c: 7d 20 39 e4 mtsrin r9,r7 5220: 3d 4a 40 00 addis r10,r10,16384 5224: 39 29 01 11 addi r9,r9,273 5228: 7c 08 50 40 cmplw r8,r10 522c: 55 29 02 06 rlwinm r9,r9,0,8,3 5230: 41 81 ff bc bgt 51ec 5234: 4c 00 01 2c isync Signed-off-by: Christophe Leroy [mpe: Export the ool handlers to fix build errors] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d9121f96a7c4302946839a0771f5d1daeeb6968c.1622708530.git.christophe.leroy@csgroup.eu commit 6b4d630068b0c5cdd6d8e599182b131448e0cb06 Author: Christophe Leroy Date: Thu Jun 3 08:41:43 2021 +0000 powerpc/32s: Allow disabling KUAP at boot time PPC64 uses MMU features to enable/disable KUAP at boot time. But feature fixups are applied way too early on PPC32. Now that all KUAP related actions are in C following the conversion of KUAP initial setup and context switch in C, static branches can be used to enable/disable KUAP. Signed-off-by: Christophe Leroy [mpe: Export disable_kuap_key to fix build errors] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cd79e8008455fba5395d099f9bb1305c039b931c.1622708530.git.christophe.leroy@csgroup.eu commit 50d2f104cd9572af476579eae9aa1b38de602ec7 Author: Christophe Leroy Date: Thu Jun 3 08:41:42 2021 +0000 powerpc/32s: Allow disabling KUEP at boot time PPC64 uses MMU features to enable/disable KUEP at boot time. But feature fixups are applied way too early on PPC32. Now that all KUEP related actions are in C following the conversion of KUEP initial setup and context switch in C, static branches can be used to enable/disable KUEP. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7745a2c3a08ec46302920a3f48d1cb9b5469dbbb.1622708530.git.christophe.leroy@csgroup.eu commit 86f46f3432727933be82f64b739712a6edb9d704 Author: Christophe Leroy Date: Thu Jun 3 08:41:41 2021 +0000 powerpc/32s: Initialise KUAP and KUEP in C In order to selectively activate KUAP and KUEP in a following patch, perform KUAP and KUEP initialisation in C. Unlike PPC64, PPC32 doesn't have an early_setup_secondary(), so do it in start_secondary(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/87be72023448dd4e476744ed279b8c04b8d08a1c.1622708530.git.christophe.leroy@csgroup.eu commit 882136fb2f5208a35ddad9205b20e5791edd4782 Author: Christophe Leroy Date: Thu Jun 3 08:41:40 2021 +0000 powerpc/32s: Simplify calculation of segment register content segment register has VSID on bits 8-31. Bits 4-7 are reserved, there is no requirement to set them to 0. VSIDs are calculated from VSID of SR0 by adding 0x111. Even with highest possible VSID which would be 0xFFFFF0, adding 16 times 0x111 results in 0x1001100. So, the reserved bits are never overflowed, no need to clear the reserved bits after each calculation. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ddc1cfd2ec8f3b2395c6a4d7f2b0c1aa1b1e64fb.1622708530.git.christophe.leroy@csgroup.eu commit 863771a28e27dc9eaeaa88cea300370d032f0e0f Author: Christophe Leroy Date: Thu Jun 3 08:41:39 2021 +0000 powerpc/32s: Convert switch_mmu_context() to C switch_mmu_context() does things that can easily be done in C. For updating user segments, we have update_user_segments(). As mentionned in commit b5efec00b671 ("powerpc/32s: Move KUEP locking/unlocking in C"), update_user_segments() has the loop unrolled which is a significant performance gain. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/05c0875ad8220c03452c3a334946e207c6ca04d6.1622708530.git.christophe.leroy@csgroup.eu commit 7235bb3593781ed022d0714a73c2c0d8eb8a835f Author: Christophe Leroy Date: Thu Jun 3 08:41:38 2021 +0000 powerpc/32s: move CTX_TO_VSID() into mmu-hash.h In order to reuse it in switch_mmu_context(), this patch moves CTX_TO_VSID() macro into asm/book3s/32/mmu-hash.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/26b36ef2939234a04b37baf6ffe50cba81f5d1b7.1622708530.git.christophe.leroy@csgroup.eu commit 91bb30822a2e1d7900f9f42e9e92647a9015f979 Author: Christophe Leroy Date: Thu Jun 3 08:41:37 2021 +0000 powerpc/32s: Refactor update of user segment registers KUEP implements the update of user segment registers. Move it into mmu-hash.h in order to use it from other places. And inline kuep_lock() and kuep_unlock(). Inlining kuep_lock() is important for system_call_exception(), otherwise system_call_exception() has to save into stack the system call parameters that are used just after, and doing that takes more instructions than kuep_lock() itself. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/24591ca480d14a62ef910e38a5273d551262c4a2.1622708530.git.christophe.leroy@csgroup.eu commit 91ec66719d4c5c0e7b4e32585b01881660d1bc53 Author: Christophe Leroy Date: Thu Jun 3 08:41:36 2021 +0000 powerpc/32s: Move setup_{kuep/kuap}() into {kuep/kuap}.c Avoids the #ifdef in mmu.c Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0b7a13d414837e58264edc336b89c2fe9f35f9bc.1622708530.git.christophe.leroy@csgroup.eu commit f6025a140ba8dcabdfb8a1e27ddaf44821700dce Author: Christophe Leroy Date: Fri Jun 4 04:49:25 2021 +0000 powerpc/8xx: Allow disabling KUAP at boot time PPC64 uses MMU features to enable/disable KUAP at boot time. But feature fixups are applied way too early on PPC32. But since commit c16728835eec ("powerpc/32: Manage KUAP in C"), all KUAP is in C so it is now possible to use static branches. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3dca510ce555335261a47c4799167da698f569c0.1622782111.git.christophe.leroy@csgroup.eu commit 10248dcba1205042a3a0ea65eb441030702d97cd Author: Christophe Leroy Date: Wed Jun 2 06:42:10 2021 +0000 powerpc/44x: Implement Kernel Userspace Exec Protection (KUEP) Powerpc 44x has two bits for exec protection in TLBs: one for user (UX) and one for superviser (SX). Clear SX on user pages in TLB miss handlers to provide KUEP. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/169310e08152aa1d96c979770291d165ec6896ae.1622616032.git.christophe.leroy@csgroup.eu commit c0ca0fe08c9213a5187e4513b5506667f249030f Author: Christophe Leroy Date: Thu Jun 3 07:53:49 2021 +0000 powerpc: Remove CONFIG_PPC_MMU_NOHASH_32 Since commit Fixes: 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore"), CONFIG_PPC_MMU_NOHASH_32 has not been used. Remove it. Reported-by: Tom Rix Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bf1e074f6fb213a1c4cc4964370bdce4b648d647.1622706812.git.christophe.leroy@csgroup.eu commit 0e628ad2d60896de31148fba00cc73623b8c0aa1 Author: Christophe Leroy Date: Thu May 20 13:50:49 2021 +0000 powerpc/optprobes: use PPC_RAW_ macros Use PPC_RAW_ macros to simplify the code. And use PPC_LO/PPC_HI instead of IMM_L/IMM_H which are for internal use inside ppc-opcode.h Those macros are self explanatory, comments can go as well. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5a167b8ba4d33a5c09cd504f0c862e25ffe85459.1621516826.git.christophe.leroy@csgroup.eu commit f38adf86ce4fdae84904f420e175ce5806509c4c Author: Christophe Leroy Date: Thu May 20 13:50:48 2021 +0000 powerpc/optprobes: Compact code source a bit. Now that lines can be up to 100 chars long, minimise the amount of split lines to increase readability. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8ebbd977ea8cf8d706d82458f2a21acd44562a99.1621516826.git.christophe.leroy@csgroup.eu commit afd3287c8872142ec4298a2b77bd9077e2209c9c Author: Christophe Leroy Date: Thu May 20 13:50:47 2021 +0000 powerpc/optprobes: Minimise casts nip is already an unsigned long, no cast needed. op_callback_addr and emulate_step_addr are kprobe_opcode_t *. There value is obtained with ppc_kallsyms_lookup_name() which returns 'unsigned long', and there values are used create_branch() which expects 'unsigned long'. So change them to 'unsigned long' to avoid casting them back and forth. can_optimize() used p->addr several times as 'unsigned long'. Use a local 'unsigned long' variable and avoid casting multiple times. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e03192a6d4123242a275e71ce2ba0bb4d90700c1.1621516826.git.christophe.leroy@csgroup.eu commit 077c4dedef09796ade917459a5330e3940fb5860 Author: Christophe Leroy Date: Thu May 20 13:50:46 2021 +0000 powerpc/inst: Refactor PPC32 and PPC64 versions ppc_inst() ppc_inst_prefixed() ppc_inst_swab() can easily be made common to both PPC32 and PPC64. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d54c63dcac6d190e1cc0d2fe3259d6e621928cdf.1621516826.git.christophe.leroy@csgroup.eu commit 69d4d6e5fd9f4e805280ad831932c3df7b9d7cc7 Author: Christophe Leroy Date: Thu May 20 13:50:45 2021 +0000 powerpc: Don't use 'struct ppc_inst' to reference instruction location 'struct ppc_inst' is an internal representation of an instruction, but in-memory instructions are and will remain a table of 'u32' forever. Replace all 'struct ppc_inst *' used for locating an instruction in memory by 'u32 *'. This removes a lot of undue casts to 'struct ppc_inst *'. It also helps locating ab-use of 'struct ppc_inst' dereference. Signed-off-by: Christophe Leroy [mpe: Fix ppc_inst_next(), use u32 instead of unsigned int] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7062722b087228e42cbd896e39bfdf526d6a340a.1621516826.git.christophe.leroy@csgroup.eu commit e90a21ea801d1776d9a786ad02354fd3fe23ce09 Author: Christophe Leroy Date: Thu May 20 13:50:44 2021 +0000 powerpc/lib/code-patching: Don't use struct 'ppc_inst' for runnable code in tests. 'struct ppc_inst' is meant to represent an instruction internally, it is not meant to dereference code in memory. For testing code patching, use patch_instruction() to properly write into memory the code to be tested. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d8425fb42a4adebc35b7509f121817eeb02fac31.1621516826.git.christophe.leroy@csgroup.eu commit 7cd04c863f9e1655d607705455e7714f24451984 Author: frank zago Date: Mon Apr 26 21:20:17 2021 -0500 iio: light: tcs3472: do not free unallocated IRQ Allocating an IRQ is conditional to the IRQ existence, but freeing it was not. If no IRQ was allocate, the driver would still try to free IRQ 0. Add the missing checks. This fixes the following trace when the driver is removed: [ 100.667788] Trying to free already-free IRQ 0 [ 100.667793] WARNING: CPU: 0 PID: 2315 at kernel/irq/manage.c:1826 free_irq+0x1fd/0x370 ... [ 100.667914] Call Trace: [ 100.667920] tcs3472_remove+0x3a/0x90 [tcs3472] [ 100.667927] i2c_device_remove+0x2b/0xa0 Signed-off-by: frank zago Link: https://lore.kernel.org/r/20210427022017.19314-2-frank@zago.net Fixes: 9d2f715d592e ("iio: light: tcs3472: support out-of-threshold events") Cc: Signed-off-by: Jonathan Cameron commit e2a73c4e78fc42ca65cc65abb66d527469bb3a4c Author: Stephan Gerhold Date: Fri Jun 11 20:24:42 2021 +0200 iio: accel: bmc150: Use more consistent and accurate scale values It is quite strange that BMA222 and BMA222E have very close, yet subtly different values in their scale tables. Comparing the datasheets this is simply because the "Resolution" for the different measurement ranges are documented with different precision. For example, for +-2g the BMA222 datasheet [1] suggests a resolution of 15.6 mg/LSB, while the BMA222E datasheet [2] suggests 15.63 mg/LSB. Actually, there is no need to rely on the resolution given by the Bosch datasheets. The resolution and scale can be calculated more consistently and accurately using the range (e.g. +-2g) and the channel size (e.g. 8 bits). Distributing 4g (-2g to 2g) over 8 bits results in an exact resolution of (4g / 2^8) = 15.625 mg/LSB which is the same value as in both datasheets, just slightly more accurate. Multiplying g = 9.80665 m/s^2 we get a more accurate value for the IIO scale table. Generalizing this we can calculate the scale tables more accurately using (range / 2^bits) * g * 10^6 (because of IIO_VAL_INT_PLUS_MICRO). Document this and make the scale tables more consistent and accurate for all the variants using that formula. Now the scale tables for BMA222 and BMA222E are consistent and probably slightly more accurate. [1]: https://media.digikey.com/pdf/Data%20Sheets/Bosch/BMA222.pdf [2]: https://www.mouser.com/datasheet/2/783/BST-BMA222E-DS004-06-1021076.pdf Reviewed-by: Linus Walleij Signed-off-by: Stephan Gerhold Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210611182442.1971-1-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit fb226ae750ea09020dbde0ac8769c86820bcb6c0 Author: Jonathan Cameron Date: Tue Jun 8 21:55:10 2021 +0100 iio: hid-sensors: Update header includes General driver churn doesn't always include updates of header includes. Manual review of the output of the include-what-you-use checker lead to the following cleanup. Hopefuly this brings things back to a good state for the hid-sensor drivers. Signed-off-by: Jonathan Cameron Cc: Jiri Kosina Cc: Srinivas Pandruvada Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20210608205510.4033887-1-jic23@kernel.org commit 64f9dc6a68002fc3f1890cb90312a2ace19df99e Author: Jonathan Cameron Date: Sun May 16 17:21:03 2021 +0100 iio: pressure: icp10100: Balance runtime pm + use pm_runtime_resume_and_get() The devm_ handled runtime pm disable calls pm_runtime_put_sync_suspend() which isn't balancing a matching get call. It isn't a bug as such, because the runtime pm core doesn't decrement the reference count below zero, but it is missleading so let's drop it. Using pm_runtime_resume_and_get() new call makes it easy to handle failures in resume as it doesn't hold a reference count if it exits with an error. Signed-off-by: Jonathan Cameron Cc: Jean-Baptiste Maneyrol Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210516162103.1332291-7-jic23@kernel.org commit c2f89f4ccd7a155af2739300de712b8f96aa76a3 Author: Jonathan Cameron Date: Sun May 16 17:21:02 2021 +0100 iio: prox: pulsed-light-v2: Use pm_runtime_resume_and_get() Using this new call makes it easy to handle any errors as a result of runtime resume as it exits without leaving the reference count elevated. Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210516162103.1332291-6-jic23@kernel.org commit 0e4f336f50debeacd0f81e931e8451f2ae03f685 Author: Jonathan Cameron Date: Sun May 16 17:21:00 2021 +0100 iio: chemical: atlas-sensor: Balance runtime pm + pm_runtime_resume_and_get() The pm_runtime_put_noidle() call in remove isn't balanced with any get, so drop it. Note this isn't a bug as the runtime pm core will not allow the reference count to go negative, making this a noop. However, it is confusing to the reader so let's drop it. pm_runtime_resume_and_get() replacement found using the coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ As pm_runtime_resume_and_get() returns <= 0 take advantage of that to change the error checking to if (ret) which is more in keeping with the rest of this driver. This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210516162103.1332291-4-jic23@kernel.org commit 17181d4dc33094cb0c51369e4b5172086a14812b Author: Jonathan Cameron Date: Sun May 16 17:20:59 2021 +0100 iio: adc: ads1015: Balance runtime pm + pm_runtime_resume_and_get() The call to pm_runtime_put_noidle() in remove() is not balancing a counter increment. Note this doesn't matter as the runtime pm core will not allow the counter to go negative. However, it is confusing to the reader so let's remove it. The pm_runtime_resume_and_get() replacement was found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210516162103.1332291-3-jic23@kernel.org commit 40b54cbebf16c4b2275dabe1569d2a3f89d3cc59 Author: Jonathan Cameron Date: Sun May 16 17:20:58 2021 +0100 iio: imu: mpu6050: Balance runtime pm + use pm_runtime_resume_and_get() Remove an unblanced pm_runtime_put_sync_suspend() call in inv_pu_pm_disable(). Not this call is not a bug, because the runtime pm core will not allow the reference counter to go negative. It is however confusing and serves no purpose. pm_runtime_resume_and_get() case found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ pm_runtime_resume_and_get() returns <= 0 only so simplify related checks to bring this more inline with nearby calls. This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Jean-Baptiste Maneyrol Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210516162103.1332291-2-jic23@kernel.org commit 12f13d1faead80884f41781e8792ab397812c0c7 Author: Andy Shevchenko Date: Mon Jun 14 19:24:47 2021 +0300 iio: hid-sensors: lighten exported symbols by moving to IIO_HID namespace A namespace for exported symbols makes clear who is a provider and who is a consumer of the certain resources. Besides that, it doesn't pollute the common namespace. Signed-off-by: Andy Shevchenko Acked-by: Alexandre Belloni Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20210614162447.5392-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 92babc9938ebbf4050f2fba774836f7edc16a570 Author: Jonathan Cameron Date: Sun Jun 13 16:23:01 2021 +0100 iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here an explicit structure is not used, because the holes would necessitate the addition of an explict memset(), to avoid a kernel data leak, making for a less minimal fix. Fixes: 1c28799257bc ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.") Signed-off-by: Jonathan Cameron Cc: Mathieu Othacehe Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-9-jic23@kernel.org commit ec90b52c07c0403a6db60d752484ec08d605ead0 Author: Jonathan Cameron Date: Sun Jun 13 16:23:00 2021 +0100 iio: light: vcnl4035: Fix buffer alignment in iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here an explicit structure is not used, because the holes would necessitate the addition of an explict memset(), to avoid a potential kernel data leak, making for a less minimal fix. Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035") Signed-off-by: Jonathan Cameron Cc: Parthiban Nallathambi Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-8-jic23@kernel.org commit 6c0d181daabcba286db9711eef8800b566fb1cce Author: Christophe Leroy Date: Thu May 20 13:50:43 2021 +0000 powerpc/lib/code-patching: Make instr_is_branch_to_addr() static instr_is_branch_to_addr() is only used in code-patching.c Make it static. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5f6b9c8c83170ed310953eac2f5b14539bfc964a.1621516826.git.christophe.leroy@csgroup.eu commit 18c85964b10b7b78a5cb59a4959a5f82fdc77e4c Author: Christophe Leroy Date: Thu May 20 13:50:42 2021 +0000 powerpc: Do not dereference code as 'struct ppc_inst' (uprobe, code-patching, feature-fixups) 'struct ppc_inst' is an internal structure to represent an instruction, it is not directly the representation of that instruction in text code. It is not meant to map and dereference code. Dereferencing code directly through 'struct ppc_inst' has two main issues: - On powerpc, structs are expected to be 8 bytes aligned while code is spread every 4 byte. - Should a non prefixed instruction lie at the end of the page and the following page not be mapped, it would generate a page fault. In-memory code must be accessed with ppc_inst_read(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c9a1201dd0a66b4a0f91f0fb46d9385cbf030feb.1621516826.git.christophe.leroy@csgroup.eu commit 036b5560bebc72c61d955ae0b115e8e69da8a563 Author: Christophe Leroy Date: Thu May 20 13:50:41 2021 +0000 powerpc/inst: Avoid pointer dereferencing in ppc_inst_equal() Avoid casting/dereferencing ppc_inst() as u64* , check each member of the struct when relevant. And remove the 0xff initialisation of the suffix for non prefixed instruction. An instruction with 0xff as a suffix might be invalid, but still is a prefixed instruction and has to be considered as this. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d8b155e930b7a9708ca110e8ff0ace6713a7af75.1621516826.git.christophe.leroy@csgroup.eu commit 042e0860e1c1d60a0ab1ff3f16b7f420573133e0 Author: Christophe Leroy Date: Thu May 20 13:50:40 2021 +0000 powerpc/inst: Improve readability of get_user_instr() and friends Remove unneeded line splits. And remove unneeded local variable initialisation. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fb097fda78cc6852905ef00f8f7bf371b6cc66f7.1621516826.git.christophe.leroy@csgroup.eu commit 9134806e149ebb214f122f0f84254096d3768bb2 Author: Christophe Leroy Date: Thu May 20 13:50:39 2021 +0000 powerpc/inst: Reduce casts in get_user_instr() Declare __gui_ptr as 'u32 *' instead of casting it at each use to 'unsigned int *' (which is an equivalent type). Signed-off-by: Christophe Leroy [mpe: Use u32 * instead of unsigned int *] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2c2123998e05535d08ba03a96ea1eea921d06a86.1621516826.git.christophe.leroy@csgroup.eu commit ace5219f81f169ce7a02c7a6fc53b87c68f2b070 Author: Linus Walleij Date: Mon May 3 16:43:40 2021 +0200 PCI: ixp4xx: Add device tree bindings for IXP4xx This adds device tree bindings for the Intel IXP4xx PCI controller which can be used as both host and option. Cc: devicetree@vger.kernel.org Cc: Arnd Bergmann Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: Zoltan HERPAI Cc: Raylynn Knight Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit d5d9f7ac58ea1041375a028f143ca5784693ea86 Author: Linus Walleij Date: Thu Apr 29 23:34:10 2021 +0200 ARM/ixp4xx: Make NEED_MACH_IO_H optional In order to create a proper PCI driver for the IXP4xx we need to make the old PCI driver and its reliance on optional. Create a new Kconfig symbol for the legacy PCI driver IXP4XX_PCI_LEGACY and only activate NEED_MACH_IO_H for this driver. A few files need to be adjusted to explicitly include the and headers that they previously obtained implicitly using that would include and in turn include these two headers. This breaks our reliance on the old PCI and indirect PCI support so we can reimplement a proper purely DT-based driver in the PCI subsystem. Cc: Arnd Bergmann Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij commit 713ce38d46eb5caef20aeb8f9794ce4521cb58bf Author: Linus Walleij Date: Thu Apr 29 23:25:11 2021 +0200 ARM/ixp4xx: Move the virtual IObases UART1, UART2 and the expansion bus config registers are the only registers mapped in a fixed location when using device tree. For device tree we also want to get rid of the custom for IXP4xx. So we need to undefine CONFIG_NEED_MACH_IO_H. Doing that activates the fixed mapping of the PCI IO space to PCI_IO_VIRT_BASE which is hardcoded to 0xFEE00000 and this would collide with the old fixed mappings. Move the fixed virtual IO base address from 0xFEF00000 to 0xFEC00000 in order to avoid the collision. For the OF-only boot path let's even cut the reliance on and just hardcode the one single virtbase we need apart from the UART, which is hardcoded in Kconfig.debug. Cc: Arnd Bergmann Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij commit 6a03cd9843fa4dcf827dc3ad60fa9b4217f3057c Author: Christoph Hellwig Date: Wed Jun 16 09:15:47 2021 +0200 loop: fix order of cleaning up the queue and freeing the tagset We must release the queue before freeing the tagset. Fixes: 1c99502fae35 ("loop: use blk_mq_alloc_disk and blk_cleanup_disk") Reported-by: Bruno Goncalves Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 07a719f8fdbe4ae0f825fa1a6d2755a63deb265e Author: Christoph Hellwig Date: Wed Jun 16 09:15:46 2021 +0200 mtd_blkdevs: initialze new->rq in add_mtd_blktrans_dev Various places expect the request_queue in ->rq. Initialize it to avoid NULL pointer derefences. Fixes: 6966bb921def ("mtd_blkdevs: use blk_mq_alloc_disk") Reported-by: Marek Szyprowski Signed-off-by: Christoph Hellwig Tested-by: Marek Szyprowski Signed-off-by: Jens Axboe commit 827b3e84fd1d2c43b7c85786d366bc53b02cd8da Author: Lee Jones Date: Fri May 28 10:05:02 2021 +0100 ata: pata_macio: Avoid overwriting initialised field in 'pata_macio_sht' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_macio.c:925:21: warning: initialized field overwritten [-Woverride-init] drivers/ata/pata_macio.c:925:21: note: (near initialization for ‘pata_macio_sht.slave_configure’) Cc: Jens Axboe Cc: benh@kernel.crashing.org Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-12-lee.jones@linaro.org Signed-off-by: Jens Axboe commit ec3d95182b491b1e8cdd470748f133d4c7934f4c Author: Lee Jones Date: Fri May 28 10:05:01 2021 +0100 ata: pata_serverworks: Avoid overwriting initialised field in 'serverworks_osb4_sht Fixes the following W=1 kernel build warning(s): drivers/ata/pata_serverworks.c:257:18: warning: initialized field overwritten [-Woverride-init] drivers/ata/pata_serverworks.c:257:18: note: (near initialization for ‘serverworks_osb4_sht.sg_tablesize’) Cc: Jens Axboe Cc: Andre Hedrick Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-11-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 160be1bc0bc3c42db845f8f0c334a05577bfe369 Author: Lee Jones Date: Fri May 28 10:05:00 2021 +0100 ata: pata_sc1200: sc1200_sht'Avoid overwriting initialised field in ' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_sc1200.c:197:18: warning: initialized field overwritten [-Woverride-init] drivers/ata/pata_sc1200.c:197:18: note: (near initialization for ‘sc1200_sht.sg_tablesize’) Cc: Jens Axboe Cc: Alan Cox Cc: Mark Lord Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-10-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 52ebd7124e0d5593b6032743bf3cb46d49b0343d Author: Lee Jones Date: Fri May 28 10:04:59 2021 +0100 ata: pata_cs5530: Avoid overwriting initialised field in 'cs5530_sht' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_cs5530.c:151:18: warning: initialized field overwritten [-Woverride-init] drivers/ata/pata_cs5530.c:151:18: note: (near initialization for ‘cs5530_sht.sg_tablesize’) Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-9-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 98eb8a6ba491d8a4288d2de572721eca6354f86e Author: Lee Jones Date: Fri May 28 10:04:58 2021 +0100 ata: pata_cs5520: Avoid overwriting initialised field in 'cs5520_sht' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_cs5520.c:99:19: warning: initialized field overwritten [-Woverride-init] drivers/ata/pata_cs5520.c:99:19: note: (near initialization for ‘cs5520_sht.sg_tablesize’) Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-8-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 76115de698d8d090bdd6463e27e0fa0b40fda033 Author: Lee Jones Date: Fri May 28 10:04:57 2021 +0100 ata: pata_atiixp: Avoid overwriting initialised field in 'atiixp_sht' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_atiixp.c:256:19: warning: initialized field overwritten [-Woverride-init] drivers/ata/pata_atiixp.c:256:19: note: (near initialization for ‘atiixp_sht.sg_tablesize’) Cc: Jens Axboe Cc: ATI Inc Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-7-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 7d43b8283eb23d7c042d2376c86d2d27365c3ed0 Author: Lee Jones Date: Fri May 28 10:04:56 2021 +0100 ata: sata_nv: Do not over-write initialise fields in 'nv_adma_sht' and 'nv_swncq_sht' Fixes the following W=1 kernel build warning(s): drivers/ata/sata_nv.c:379:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/sata_nv.c:379:16: note: (near initialization for ‘nv_adma_sht.can_queue’) drivers/ata/sata_nv.c:382:21: warning: initialized field overwritten [-Woverride-init] drivers/ata/sata_nv.c:382:21: note: (near initialization for ‘nv_adma_sht.slave_configure’) drivers/ata/sata_nv.c:387:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/sata_nv.c:387:16: note: (near initialization for ‘nv_swncq_sht.can_queue’) drivers/ata/sata_nv.c:390:21: warning: initialized field overwritten [-Woverride-init] drivers/ata/sata_nv.c:390:21: note: (near initialization for ‘nv_swncq_sht.slave_configure’) Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-6-lee.jones@linaro.org Signed-off-by: Jens Axboe commit e75f41a983e75ffff8b102665580fdb3816b289e Author: Lee Jones Date: Fri May 28 10:04:55 2021 +0100 ata: sata_mv: Do not over-write initialise fields in 'mv6_sht' Fixes the following W=1 kernel build warning(s): drivers/ata/sata_mv.c:670:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/sata_mv.c:670:16: note: (near initialization for ‘mv6_sht.can_queue’) Cc: Jens Axboe Cc: Mark Lord Cc: ALWAYS copy Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-5-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 945a0e2875f4d5d0030617f16f48a781d4523f48 Author: Lee Jones Date: Fri May 28 10:04:54 2021 +0100 ata: sata_sil24: Do not over-write initialise fields in 'sil24_sht' Fixes the following W=1 kernel build warning(s): In file included from drivers/ata/sata_sil24.c:14: drivers/ata/sata_sil24.c:378:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/sata_sil24.c:378:16: note: (near initialization for ‘sil24_sht.can_queue’) Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-4-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 071e86fe2872e7442e42ad26f71cd6bde55344f8 Author: Lee Jones Date: Fri May 28 10:04:53 2021 +0100 ata: ahci: Ensure initialised fields are not overwritten in AHCI_SHT() Fixes the following W=1 kernel build warning(s): In file included from drivers/ata/ahci_platform.c:21: drivers/ata/ahci.h:388:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:388:16: note: (near initialization for ‘ahci_platform_sht.can_queue’) drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:392:17: warning: initialized field overwritten [-Woverride-init] drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:392:17: note: (near initialization for ‘ahci_platform_sht.sdev_attrs’) drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’ In file included from drivers/ata/ahci_mtk.c:18: drivers/ata/ahci.h:388:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:388:16: note: (near initialization for ‘ahci_platform_sht.can_queue’) drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:392:17: warning: initialized field overwritten [-Woverride-init] drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:392:17: note: (near initialization for ‘ahci_platform_sht.sdev_attrs’) drivers/ata/ahci_mtk.c:41:2: note: in expansion of macro ‘AHCI_SHT’ In file included from drivers/ata/ahci_dm816.c:16: drivers/ata/ahci.h:388:16: warning: initialized field overwritten [-Woverride-init] drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:388:16: note: (near initialization for ‘ahci_dm816_platform_sht.can_queue’) drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:392:17: warning: initialized field overwritten [-Woverride-init] drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’ drivers/ata/ahci.h:392:17: note: (near initialization for ‘ahci_dm816_platform_sht.sdev_attrs’) drivers/ata/ahci_dm816.c:138:2: note: in expansion of macro ‘AHCI_SHT’ NB: Snipped 150 lines of this for brevity! Cc: Jens Axboe Cc: Philipp Zabel Cc: Tejun Heo Cc: ALWAYS copy Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-3-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 4e7dba070b1f44da9bef4a61fd633f6b73a2e853 Author: Lee Jones Date: Fri May 28 10:04:52 2021 +0100 ata: include: libata: Move fields commonly over-written to separate MACRO This is a pre-cursor to some upcoming W=1 fix-ups. Fixes the following W=1 kernel build warning(s): Cc: Jens Axboe Cc: Mark Lord Cc: Philipp Zabel Cc: Tejun Heo Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210528090502.1799866-2-lee.jones@linaro.org Signed-off-by: Jens Axboe commit ec16d35b6c9d8c89b3b7327a52c4972a7e4281d3 Author: Olivier Langlois Date: Mon May 31 02:54:59 2021 -0400 io-wq: remove header files not needed anymore mm related header files are not needed for io-wq module. remove them for a small clean-up. Reviewed-by: Pavel Begunkov Signed-off-by: Olivier Langlois Signed-off-by: Jens Axboe commit 3d7b7b5285f0a8e73e332f3d7c7b2ca1e46309d7 Author: Olivier Langlois Date: Mon May 31 02:54:15 2021 -0400 io_uring: minor clean up in trace events definition Fix tabulation to make nice columns Reviewed-by: Pavel Begunkov Signed-off-by: Olivier Langlois Signed-off-by: Jens Axboe commit 236daeae3616b1c62ce1a9f8a348d576ec9e22d9 Author: Olivier Langlois Date: Mon May 31 02:36:37 2021 -0400 io_uring: Add to traces the req pointer when available The req pointer uniquely identify a specific request. Having it in traces can provide valuable insights that is not possible to have if the calling process is reusing the same user_data value. Reviewed-by: Pavel Begunkov Signed-off-by: Olivier Langlois Signed-off-by: Jens Axboe commit 656758425f98693bd61a08f6b51c4c5aa26c9d50 Author: Olivier Dautricourt Date: Wed Jun 9 17:21:46 2021 +0200 dmaengine: altera-msgdma: add OF support This driver had no device tree support. - add compatible field "altr,socfpga-msgdma" - register dma controller with of_dma_controller_register Reviewed-by: Stefan Roese Signed-off-by: Olivier Dautricourt Link: https://lore.kernel.org/r/7459635ba093d87b6bf12413cf7cfe09f6e3019b.1623251990.git.olivier.dautricourt@orolia.com Signed-off-by: Vinod Koul commit ce91c6220947e4efa0db564cc50baa0151d8872b Author: Olivier Dautricourt Date: Wed Jun 9 17:20:55 2021 +0200 MAINTAINERS: add entry for Altera mSGDMA This entry is for the standalone driver in drivers/dma/altera-msgdma.c Add myself as 'Odd fixes' maintainer for this driver as i am currently writing new code and have access to the hardware. Add Stefan Roese as reviewer. Signed-off-by: Olivier Dautricourt Acked-by: Stefan Roese Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de Link: https://lore.kernel.org/r/4258cb93e0f7ff57c4e116c3e8cd9a1a3159cec6.1623251990.git.olivier.dautricourt@orolia.com Signed-off-by: Vinod Koul commit 90ad30310a352bf029169d6805eb69a2551c73e8 Author: Olivier Dautricourt Date: Wed Jun 9 17:20:13 2021 +0200 dt-bindings: dma: add schema for altera-msgdma add yaml schema for Altera mSGDMA bindings in devicetree. Reviewed-by: Stefan Roese Reviewed-by: Rob Herring Signed-off-by: Olivier Dautricourt Link: https://lore.kernel.org/r/7487a25cdb240d1be4a8593aa602c3c73d8f5acb.1623251990.git.olivier.dautricourt@orolia.com Signed-off-by: Vinod Koul commit ce939833b828dd472b278a9173361c7beaeb5b11 Author: Yang Li Date: Wed Jun 9 15:14:53 2021 +0800 dmaengine: xilinx: dpdma: fix kernel-doc Fix function name in xilinx/xilinx_dpdma.c comment to remove a warning found by kernel-doc. drivers/dma/xilinx/xilinx_dpdma.c:935: warning: expecting prototype for xilinx_dpdma_chan_no_ostand(). Prototype was for xilinx_dpdma_chan_notify_no_ostand() instead. Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Nathan Chancellor Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1623222893-123227-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul commit 94b4cd7c5fc0dd6858a046b00ca729fb0512b9ba Author: Austin Kim Date: Fri Jun 11 07:53:36 2021 +0100 dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy() The second parameter of spinlock_irq[save/restore] function is flags, which is the last input parameter of sf_pdma_prep_dma_memcpy(). So declare local variable 'iflags' to be used as the second parameter of spinlock_irq[save/restore] function. Signed-off-by: Austin Kim Link: https://lore.kernel.org/r/20210611065336.GA1121@raspberrypi Signed-off-by: Vinod Koul commit c1fc3745e7b07f3bfecf16adb6c49544393094f2 Author: Geert Uytterhoeven Date: Fri Jun 11 12:18:40 2021 +0200 dmaengine: sh: Remove unused shdma-of driver Remove the DT-based Renesas SHDMA DMA multiplexer driver, as it is unused. The DMA multiplexer node and one DMA controller instance were added to the R-Mobile APE6 .dtsi file, but DMA support was never fully enabled, cfr. commit a19788612f51b787 ("dmaengine: sh: Remove R-Mobile APE6 support"). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/e9445a5f4ac15fc4d3b376b5e675e39f8c95b967.1623406640.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 2451eeb4ebc051ad1f753580066f20dbf4c5174e Author: Geert Uytterhoeven Date: Fri Jun 11 12:18:39 2021 +0200 dt-bindings: dmaengine: Remove SHDMA Device Tree bindings Remove the Renesas SHDMA Device Tree bindings, as they are unused. The DMA multiplexer node and one DMA controller instance were added to the R-Mobile APE6 .dtsi file, but DMA support was never fully enabled, cfr. commit a19788612f51b787 ("dmaengine: sh: Remove R-Mobile APE6 support"). Note that the mux idea was dropped when implementing support for DMA on R-Car Gen2, cfr. renesas,rcar-dmac.yaml. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/ba56b7199fcf3516f202389d2c8f836c9ec51e7a.1623406640.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 23e51f110f914ab9eb2eb4ddd83f3fc8ffda99b5 Author: Konrad Dybcio Date: Tue Jun 15 01:53:57 2021 +0200 dmaengine: qcom: gpi: Add SM8250 compatible SM8250 seems to work just fine, so add a shiny new compatible for it. Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210614235358.444834-2-konrad.dybcio@somainline.org Signed-off-by: Vinod Koul commit 14f259c8be0168f11333bad30b2d716002cfdcbc Author: Konrad Dybcio Date: Tue Jun 15 01:53:56 2021 +0200 dt-bindings: dmaengine: qcom: gpi: add compatible for sm8250 No functional changes, just adding a new compatible for a different SoC. Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210614235358.444834-1-konrad.dybcio@somainline.org Signed-off-by: Vinod Koul commit ddd25670d39b2181c7bec33301f2d24cdcf25dde Merge: affa909571b00 b472191f0a0ce Author: Will Deacon Date: Wed Jun 16 11:30:55 2021 +0100 Merge branch 'for-thierry/arm-smmu' into for-joerg/arm-smmu/updates Merge in support for the Arm SMMU '->probe_finalize()' implementation callback, which is required to prevent early faults in conjunction with Nvidia's memory controller. * for-thierry/arm-smmu: iommu/arm-smmu: Check smmu->impl pointer before dereferencing iommu/arm-smmu: Implement ->probe_finalize() commit c7654495916e109f76a67fd3ae68f8fa70ab4faa Author: Yang Yingliang Date: Wed Jun 16 14:43:18 2021 +0800 net: chelsio: cxgb4: use eth_zero_addr() to assign zero address Using eth_zero_addr() to assign zero address insetad of inefficient copy from an array. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 1f5c3cc1dd96b459d07ed7ec45d90167e68866b1 Merge: 95d359ed5a0c4 b8773205277e3 Author: David S. Miller Date: Wed Jun 16 00:52:34 2021 -0700 Merge branch 'cosa-cleanups' Peng Li says: ==================== net: cosa: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit b8773205277e3a27dcf3d06cbdc19c23d9ee9f42 Author: Peng Li Date: Wed Jun 16 15:23:41 2021 +0800 net: cosa: remove redundant spaces According to the chackpatch.pl, no spaces is necessary at the start of a line, no space is necessary after a cast. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 6619e2b63b416516abf6e4dd1c2c52d2a641c559 Author: Peng Li Date: Wed Jun 16 15:23:40 2021 +0800 net: cosa: remove trailing whitespaces This patch removes trailing whitespaces. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e84c3e1436dc2124242ca70d14cb5805c8c36c93 Author: Peng Li Date: Wed Jun 16 15:23:39 2021 +0800 net: cosa: add some required spaces Add space required before the open parenthesis '(' and '{'. Add space required after that close brace '}' and ',' Add spaces required around that '=' , '&', '*', '|', '+', '/' and '-'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 573747254f220f367dd3d59c7a535c08cb2ff4d2 Author: Peng Li Date: Wed Jun 16 15:23:38 2021 +0800 net: cosa: fix the code style issue about trailing statements Trailing statements should be on next line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 9edc7d68b021c8ec9d59e0cf2d5fa8a56e7f2777 Author: Peng Li Date: Wed Jun 16 15:23:37 2021 +0800 net: cosa: fix the alignment issue Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 3fac4b941c06acaf35f578396eee3e28b1f7351e Author: Peng Li Date: Wed Jun 16 15:23:36 2021 +0800 net: cosa: use BIT macro This patch uses the BIT macro for setting individual bits, to fix the following checkpatch.pl issue: CHECK: Prefer using the BIT macro. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit acc3edf0054eb44221b2a6629bfa575c85c6e901 Author: Peng Li Date: Wed Jun 16 15:23:35 2021 +0800 net: cosa: add necessary () to macro argument Macro argument 'cosa' may be better as '(cosa)' to avoid precedence issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 70d063b9a6219a6fd6c88e9e318ea36889348a36 Author: Peng Li Date: Wed Jun 16 15:23:34 2021 +0800 net: cosa: remove redundant braces {} This patch removes redundant braces {}, to fix the checkpatch.pl warning: "braces {} are not necessary for single statement blocks". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c8f4b11727af9a8e7074c6def7e36ec679878001 Author: Peng Li Date: Wed Jun 16 15:23:33 2021 +0800 net: cosa: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c0a963e25df9bce8e0b9dbe4b0d27b78338b6e1d Author: Peng Li Date: Wed Jun 16 15:23:32 2021 +0800 net: cosa: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit b4d5f1e2cdebb436eea2137833f5cd267674875d Author: Peng Li Date: Wed Jun 16 15:23:31 2021 +0800 net: cosa: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 2076b3e61a323e38256be44289aa32ae12ecf79a Author: Peng Li Date: Wed Jun 16 15:23:30 2021 +0800 net: cosa: replace comparison to NULL with "!chan->rx_skb" According to the chackpatch.pl, comparison to NULL could be written "!chan->rx_skb". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 77282db510d9fe4d77c1d79fb4563d5368e1d2b2 Author: Peng Li Date: Wed Jun 16 15:23:29 2021 +0800 net: cosa: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 0569a3d41667d8f3ec7764639c51b15d0e736488 Author: Peng Li Date: Wed Jun 16 15:23:28 2021 +0800 net: cosa: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 786f0dc627e6bc50dd57a7d4a421912224b0a061 Author: Peng Li Date: Wed Jun 16 15:23:27 2021 +0800 net: cosa: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 95d359ed5a0c4b4c10b9d9986bc203c83d6c8a8c Author: Zou Wei Date: Wed Jun 16 12:07:27 2021 +0800 net: iosm: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: David S. Miller commit 56b57b809f9ce05ba34ba5089a54eef8b06b8a92 Author: Wang Hai Date: Wed Jun 16 12:21:06 2021 +0800 qlcnic: Use list_for_each_entry() to simplify code in qlcnic_main.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 4d1fb7cde0ccc6000cafb72d9079de1504e3cb2a Author: Jakub Kicinski Date: Tue Jun 15 20:33:38 2021 -0700 ethtool: add a stricter length check There has been a few errors in the ethtool reply size calculations, most of those are hard to trigger during basic testing because of skb size rounding up and netdev names being shorter than max. Add a more precise check. This change will affect the value of payload length displayed in case of -EMSGSIZE but that should be okay, "payload length" isn't a well defined term here. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1b3fc771769c9f9418b23dd5676ab25a215d247d Author: Maciej Żenczykowski Date: Tue Jun 15 23:06:04 2021 -0700 inet_diag: add support for tw_mark Timewait sockets have included mark since approx 4.18. Cc: Eric Dumazet Cc: Jon Maxwell Fixes: 00483690552c ("tcp: Add mark for TIMEWAIT sockets") Signed-off-by: Maciej Żenczykowski Reviewed-by: Eric Dumazet Reviewed-by: Jon Maxwell Signed-off-by: David S. Miller commit 1d0bbbf22b744153044a5e98c19df866dfbd18ea Author: Jiapeng Chong Date: Wed Jun 16 13:53:09 2021 +0800 net: mhi_net: make mhi_wwan_ops static This symbol is not used outside of net.c, so marks it static. Fix the following sparse warning: drivers/net/mhi/net.c:385:23: warning: symbol 'mhi_wwan_ops' was not declared. Should it be static? Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 66aeec855ac5f7b03c586c6f38a1a06b59bf6a01 Merge: a078d981f8632 99f6b5fb5f63c Author: David S. Miller Date: Wed Jun 16 00:36:07 2021 -0700 Merge branch 'hns3-next' Guangbin Huang says: ==================== net: hns3: updates for -next This series includes some optimization in IO path for the HNS3 ethernet driver. ==================== Cc: Loic Poulain Cc: Bjorn Andersson Signed-off-by: Stephan Gerhold Signed-off-by: David S. Miller commit 99f6b5fb5f63cf69c6e56bba8e5492c98c521a63 Author: Yunsheng Lin Date: Wed Jun 16 14:36:17 2021 +0800 net: hns3: use bounce buffer when rx page can not be reused Currently rx page will be reused to receive future packet when the stack releases the previous skb quickly. If the old page can not be reused, a new page will be allocated and mapped, which comsumes a lot of cpu when IOMMU is in the strict mode, especially when the application and irq/NAPI happens to run on the same cpu. So allocate a new frag to memcpy the data to avoid the costly IOMMU unmapping/mapping operation, and add "frag_alloc_err" and "frag_alloc" stats in "ethtool -S ethX" cmd. The throughput improves above 50% when running single thread of iperf using TCP when IOMMU is in strict mode and iperf shares the same cpu with irq/NAPI(rx_copybreak = 2048 and mtu = 1500). Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit fa7711b888f24ee9291d90f8fbdaccfc80ed72c7 Author: Yunsheng Lin Date: Wed Jun 16 14:36:16 2021 +0800 net: hns3: optimize the rx page reuse handling process Current rx page offset only reset to zero when all the below conditions are satisfied: 1. rx page is only owned by driver. 2. rx page is reusable. 3. the page offset that is above to be given to the stack has reached the end of the page. If the page offset is over the hns3_buf_size(), it means the buffer below the offset of the page is usable when the above condition 1 & 2 are satisfied, so page offset can be reset to zero instead of increasing the offset. We may be able to always reuse the first 4K buffer of a 64K page, which means we can limit the hot buffer size as much as possible. The above optimization is a side effect when refacting the rx page reuse handling in order to support the rx copybreak. Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 7459775e9f658a2d5f3ff9d4d087e86f4d4e5b83 Author: Yunsheng Lin Date: Wed Jun 16 14:36:15 2021 +0800 net: hns3: support dma_map_sg() for multi frags skb Using the queue based tx buffer, it is also possible to allocate a sgl buffer, and use skb_to_sgvec() to convert the skb to the sgvec in order to support the dma_map_sg() to decreases the overhead of IOMMU mapping and unmapping. Firstly, it reduces the number of buffers. For example, a tcp skb may have a 66-byte header and 3 fragments of 4328, 32768, and 28064 bytes. With this patch, dma_map_sg() will combine them into two buffers, 66-bytes header and one 65160-bytes fragment by using IOMMU. Secondly, it reduces the number of dma mapping and unmapping. All the original 4 buffers are mapped only once rather than 4 times. The throughput improves above 10% when running single thread of iperf using TCP when IOMMU is in strict mode. Suggested-by: Barry Song Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 1a00197b7d2fe57f0be93037d5090e19a9b178c8 Author: Huazhong Tan Date: Wed Jun 16 14:36:14 2021 +0800 net: hns3: add support to query tx spare buffer size for pf Add support to query tx spare buffer size from configuration file, and use this info to do spare buffer initialization when the module parameter 'tx_spare_buf_size' is not specified. Signed-off-by: Huazhong Tan Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 907676b130711fd1f627824559e92259db2061d1 Author: Yunsheng Lin Date: Wed Jun 16 14:36:13 2021 +0800 net: hns3: use tx bounce buffer for small packets when the packet or frag size is small, it causes both security and performance issue. As dma can't map sub-page, this means some extra kernel data is visible to devices. On the other hand, the overhead of dma map and unmap is huge when IOMMU is on. So add a queue based tx shared bounce buffer to memcpy the small packet when the len of the xmitted skb is below tx_copybreak. Add tx_spare_buf_size module param to set the size of tx spare buffer, and add set/get_tunable to set or query the tx_copybreak. The throughtput improves from 30 Gbps to 90+ Gbps when running 16 netperf threads with 32KB UDP message size when IOMMU is in the strict mode(tx_copybreak = 2000 and mtu = 1500). Suggested-by: Barry Song Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 8677d78c3d860c156ccd335e2b97728298c2cbb1 Author: Yunsheng Lin Date: Wed Jun 16 14:36:12 2021 +0800 net: hns3: refactor for hns3_fill_desc() function Factor out hns3_fill_desc() so that it can be reused in the tx bounce supporting. Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 26f1ccdf609a9fb087f49a3782fdc2ade23cde82 Author: Yunsheng Lin Date: Wed Jun 16 14:36:11 2021 +0800 net: hns3: minor refactor related to desc_cb handling desc_cb is used to store mapping and freeing info for the corresponding desc, which is used in the cleaning process. There will be more desc_cb type coming up when supporting the tx bounce buffer, change desc_cb type to bit-wise value in order to reduce the desc_cb type checking operation in the data path. Also move the desc_cb type definition to hns3_enet.h because it is only used in hns3_enet.c, and declare a local variable desc_cb in hns3_clear_desc() to reduce lines of code. Signed-off-by: Yunsheng Lin Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d78f4549d35b770ef353b5bb40cb681f13c051ea Author: Phillip Potter Date: Tue Jun 15 23:36:07 2021 +0100 staging: rtl8188eu: remove _dbg_dump_tx_info function Remove the _dbg_dump_tx_info function from hal/rtl8188e_xmit.c, as it doesn't actually do anything and is only called from one place. It used to have some redundant debugging statements in it, but these have now been removed anyway, so all it does is read information from the adapter to set a variable 'dump_txdesc' which is then never used. This fixes a kernel test robot warning. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-8-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit daadab03824acf1b7e2701fd98ac99f1ec75e6e7 Author: Phillip Potter Date: Tue Jun 15 23:36:06 2021 +0100 staging: rtl8188eu: remove unused variables from hal/rtl8188e_cmd.c Remove set but unused variables from within the file hal/rtl8188e_cmd.c in the function rtl8188e_set_FwMediaStatus_cmd, as they are triggering kernel test robot warnings. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit b16605f9b959c822f931d17ddada562aa4ae6471 Author: Phillip Potter Date: Tue Jun 15 23:36:05 2021 +0100 staging: rtl8188eu: remove unused variable from os_dep/ioctl_linux.c Remove set but unused variable 'reason' from within the file os_dep/ioctl_linux.c in the function rtw_wx_set_mlme, as it is triggering a kernel test robot warning. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 950c3525341b54513cc51f591619b943452626b9 Author: Phillip Potter Date: Tue Jun 15 23:36:04 2021 +0100 staging: rtl8188eu: remove unused variables from core/rtw_mlme_ext.c Remove set but unused variables from within the file core/rtw_mlme_ext.c, as they are triggering kernel test robot warnings. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit ee82be77be24f6ea2508e5ad2d5ae559c08e7a6d Author: Phillip Potter Date: Tue Jun 15 23:36:03 2021 +0100 staging: rtl8188eu: remove unused variables from core/rtw_efuse.c Remove set but unused variables from within the file core/rtw_efuse.c in the function efuse_read_phymap_from_txpktbuf, as they are triggering kernel test robot warnings. Also, remove the local 'lenc' array as well, as nothing is done with its values. Keep the two usb_read8 calls however, as this patch is purely for warnings, not to change behaviour of the code. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 65df1d15d0734eea98f9084802a43d4f923ad65e Author: Phillip Potter Date: Tue Jun 15 23:36:02 2021 +0100 staging: rtl8188eu: use prefix decrement operator on trycnt variable Modify trycnt condition in the do/while loop of rtw_hal_set_hwreg to use a prefix decrement operator instead of postfix. As an unsigned 8-bit integer, this value would actually be 255 after the end of the do/while loop, which is almost certainly not what was intended. It is more reasonable to assume a loop counter should be zero at the end of all loop iterations. Indeed, the line following the loop previously contained an if statement which assumed trycnt was 0, and therefore was never triggered. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 0ef5dec44aea0083a77fb0120a9a7a86f203e61d Author: Phillip Potter Date: Tue Jun 15 23:36:01 2021 +0100 staging: rtl8188eu: remove empty label from mlmeext_joinbss_event_callback Remove empty label at end of mlmeext_joinbss_event_callback function, as it only contained a return in my last patch to make the code build. It is better removed, and the corresponding goto converted to a return. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615223607.13863-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit d495dd743d5ecd47288156e25c4d9163294a0992 Author: Ondrej Zary Date: Fri Jun 11 22:19:40 2021 +0200 serial_cs: Add Option International GSM-Ready 56K/ISDN modem Add support for Option International GSM-Ready 56K/ISDN PCMCIA modem card. Signed-off-by: Ondrej Zary Cc: stable Link: https://lore.kernel.org/r/20210611201940.23898-2-linux@zary.sk Signed-off-by: Greg Kroah-Hartman commit 11b1d881a90fc184cc7d06e9804eb288c24a2a0d Author: Ondrej Zary Date: Fri Jun 11 22:19:39 2021 +0200 serial_cs: remove wrong GLOBETROTTER.cis entry The GLOBETROTTER.cis entry in serial_cs matches more devices than intended and breaks them. Remove it. Example: # pccardctl info PRODID_1="Option International " PRODID_2="GSM-Ready 56K/ISDN " PRODID_3="021 " PRODID_4="A " MANFID=0013,0000 FUNCID=0 result: pcmcia 0.0: Direct firmware load for cis/GLOBETROTTER.cis failed with error -2 The GLOBETROTTER.cis is nowhere to be found. There's GLOBETROTTER.cis.ihex at https://netdev.vger.kernel.narkive.com/h4inqdxM/patch-axnet-cs-fix-phy-id-detection-for-bogus-asix-chip#post41 It's from completely diffetent card: vers_1 4.1, "Option International", "GSM/GPRS GlobeTrotter", "001", "A" Signed-off-by: Ondrej Zary Cc: stable Link: https://lore.kernel.org/r/20210611201940.23898-1-linux@zary.sk Signed-off-by: Greg Kroah-Hartman commit 788847839873ebe9fdf107f86e7e9928515ffbee Author: Maciej W. Rozycki Date: Thu Jun 10 20:38:48 2021 +0200 MIPS: Malta: Enable magic multipliers for Super I/O UARTs The SMSC FDC37M817 Super I/O chip has a configuration feature that lets it support special UART divisor values of 32770 and 32769 for bit rates of 230400 and 460800 bits per second respectively. Our 8250 driver core provides support for these special divisors via the UPF_MAGIC_MULTIPLIER flag, and YAMON firmware unconditionally configures the Super I/O chip with these divisors enabled as well, so all we need to do in platform setup for these bit rates to work is to set the flag. Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2105182249380.3032@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit f7adc73878187be895e8790033cea1fb59ffbc16 Author: Maciej W. Rozycki Date: Thu Jun 10 20:38:39 2021 +0200 serial: 8250: Handle custom baud rates in UPF_MAGIC_MULTIPLIER range Handle custom baud rates requested in the UPF_MAGIC_MULTIPLIER range with BOTHER. Currently matching is exact, that is if a baud rate that is not either of clk/4 or clk/8 is requested, then we fall through to the default case, which will just divide the clock rate by 16 times the rate requested, round it to closest integer, and possibly yield even worse results then if clamping to the extra baud rates was chosen. So for example if we have the usual base rate of 115200 and request a rate of 230399, then the fall-through divisor calculation will yield 1, and consequently the baud rate of 115200 will be programmed even though obviously the magic rate of 230400 would be more appropriate. Make the selection of the magic rates range-qualified then and use clk/4 for rates from clk/6 up (assuming `serial8250_get_baud_rate' has already rejected any rates too far beyond clk/4), and otherwise use clk/8 for rates from clk/12 up, and finally fall through to the standard divisor calculation. Explicitly void using the undocumented rate of 153600bps and stick to documented divisor values only. Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2105200232090.29169@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit 78bcae8616ac277d6cb7f38e211493948ed73e30 Author: Maciej W. Rozycki Date: Thu Jun 10 20:38:34 2021 +0200 serial: 8250: Actually allow UPF_MAGIC_MULTIPLIER baud rates Support for magic baud rate divisors of 32770 and 32769 used with SMSC Super I/O chips for extra baud rates of 230400 and 460800 respectively where base rate is 115200[1] has been added around Linux 2.5.64, which predates our repo history, but the origin could be identified as commit 2a717aad772f ("Merge with Linux 2.5.64.") with the old MIPS/Linux repo also at: . Code that is now in `serial8250_do_get_divisor' was added back then to `serial8250_get_divisor', but that code would only ever trigger if one of the higher baud rates was actually requested, and that cannot ever happen, because the earlier call to `serial8250_get_baud_rate' never returns them. This is because it calls `uart_get_baud_rate' with the maximum requested being the base rate, that is clk/16 or 115200 for SMSC chips at their nominal clock rate. Fix it then and allow UPF_MAGIC_MULTIPLIER baud rates to be selected, by requesting the maximum baud rate of clk/4 rather than clk/16 if the flag has been set. Also correct the minimum baud rate, observing that these ports only support actual (non-magic) divisors of up to 32767 only. References: [1] "FDC37M81x, PC98/99 Compliant Enhanced Super I/O Controller with Keyboard/Mouse Wake-Up", Standard Microsystems Corporation, Rev. 03/27/2000, Table 31 - "Baud Rates", p. 77 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2105190412280.29169@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit b1691bd04952bc6cbb7d75b1758c73942133c8ba Author: Maciej W. Rozycki Date: Thu Jun 10 20:38:28 2021 +0200 serial: 8250: Document SMSC Super I/O UART peculiarities Contrary to what SMSC documentation says and unlike NS16C550A UARTs the SMSC Super I/O IC claims compatibility with the SMSC UART implementation does not support dividing the internal PLL clock by any divisor from 1 to 65535[1], with the exception of two magic divisors of 32769 and 32770 used respectively to select the high-speed data rates of 460800bps and 230400bps[2] if enabled on a port-by-port basis in with the Serial Port Mode Register in the Device Configuration Space[3][4]. Instead empirical evidence indicates that the divisor, as stored in the DLL and DLM register pair, has the range of 1 to 32767 only, and bit 7 of the DLM register (bit 15 of the divisor) effectively serves as a selection bit for the prescaler from the base frequency of 7.3728MHz, either 4 if the bit is 0, or 1 if the bit is 1 and high-speed operation has been enabled with the Serial Port Mode Register. So if high-speed operation has not been enabled, then say the values of 1 and 32769 (0x8001) written into the combined DLL and DLM register pair both select the divisor of 1 and the baud rate of 115200bps. [1] "FDC37M81x, PC98/99 Compliant Enhanced Super I/O Controller with Keyboard/Mouse Wake-Up", Standard Microsystems Corporation, Rev. 03/27/2000, Section "Programmable Baud Rate Generator (and Divisor Latches DLH, DLL)", p. 75 [2] same, Table 31 - "Baud Rates", p. 77 [3] same, Table 60 - "Serial Port 1, Logical Device 4 [Logical Device Number = 0x04]", p. 153 [4] same, Table 61 - "Serial Port 2, Logical Device 5 [Logical Device Number = 0x05]", p. 153 Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2106092330530.5469@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit 1882441cd788a496b378f4d2684fa66cec195051 Author: Vignesh Raghavendra Date: Thu Jun 10 23:52:27 2021 +0530 dt-bindings: serial: Move omap-serial.txt to YAML schema Convert serial-omap.txt to YAML schema for better checks and documentation. Acked-by: Tony Lindgren Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210610182227.2480-1-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit 6cbe45d8ac9316ceedd0749759bd54caf03f7012 Author: Maciej W. Rozycki Date: Thu Jun 10 20:39:03 2021 +0200 serial: 8250: Correct the clock for OxSemi PCIe devices Oxford Semiconductor PCIe (Tornado) serial port devices are driven by a fixed 62.5MHz clock input derived from the 100MHz PCI Express clock. In the enhanced (650) mode, which we select in `autoconfig_has_efr' by setting the ECB bit in the EFR register, and in the absence of clock reconfiguration, which we currently don't do, the clock rate is divided only by the oversampling rate of 16 as it is supplied to the baud rate generator, yielding the baud base of 3906250. This comes from the reset values of the TCR and MCR[7] registers which are both zero[1][2][3][4], choosing the oversampling rate of 16 and the normal (divide by 1) baud rate generator prescaler respectively. This is the rate that is divided by the value held in the divisor latch to determine the baud rate used. Replace the incorrect baud base of 4000000 with the right value of 3906250 then. References: [1] "OXPCIe200 PCI Express Multi-Port Bridge", Oxford Semiconductor, Inc., DS-0045, 10 Nov 2008, Section "Reset Configuration", p. 72 [2] "OXPCIe952 PCI Express Bridge to Dual Serial & Parallel Port", Oxford Semiconductor, Inc., DS-0046, Mar 06 08, Section "Reset Configuration", p. 27 [3] "OXPCIe954 PCI Express Bridge to Quad Serial Port", Oxford Semiconductor, Inc., DS-0047, Feb 08, Section "Reset Configuration", p. 28 [4] "OXPCIe958 PCI Express Bridge to Octal Serial Port", Oxford Semiconductor, Inc., DS-0048, Feb 08, Section "Reset Configuration", p. 28 Fixes: 7106b4e333bae ("8250: Oxford Semiconductor Devices") Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2106100203510.5469@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit f771a34b141124a68265f91acae34cdb08aeb9e0 Author: Maciej W. Rozycki Date: Thu Jun 10 20:38:59 2021 +0200 serial: 8250: Dissociate 4MHz Titan ports from Oxford ports Oxford Semiconductor PCIe (Tornado) serial port devices have their baud base set incorrectly, however their `pciserial_board' entries have been reused for Titan serial port devices. Define own entries for the latter devices then, carrying over the settings, so that Oxford entries can be fixed. Signed-off-by: Maciej W. Rozycki Link: https://lore.kernel.org/r/alpine.DEB.2.21.2106100142310.5469@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman commit 36d1a6729be5b0d784f632aa1fd1fd11511e11c0 Author: Colin Ian King Date: Tue Jun 15 15:20:48 2021 +0100 ALSA: bebob: Fix bit flag quirk constants The quirking bit-flags are currently set as contiguous integer enum values and so currently SND_BEBOB_QUIRK_INITIAL_DISCONTINUOUS_DBC is zero and so he quirking never getting set or tested correctly for this quirk. Fix this by setting the quirking constants as shifted bit values. Addresses-Coverity: ("Bitwise-and with zero") Fixes: 93cd12d6e88a ("ALSA: bebob: code refactoring for model-dependent quirks") Signed-off-by: Colin Ian King Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210615142048.59900-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit 80b9c1be567c3c6bbe0d4b290af578e630485b5d Author: Yang Yingliang Date: Wed Jun 16 10:11:21 2021 +0800 ALSA: ppc: fix error return code in snd_pmac_probe() If snd_pmac_tumbler_init() or snd_pmac_tumbler_post_init() fails, snd_pmac_probe() need return error code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210616021121.1991502-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai commit 30ad6a84f60bdaa32ef5091125299d0d96a330fe Author: Florian Westphal Date: Tue Jun 15 16:27:20 2021 +0200 xfrm: avoid compiler warning when ipv6 is disabled with CONFIG_IPV6=n: xfrm_output.c:140:12: warning: 'xfrm6_hdr_offset' defined but not used Fixes: 9acf4d3b9ec1 ("xfrm: ipv6: add xfrm6_hdr_offset helper") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 1b50dd478f495c2112d1dd5655b2317d53a0723b Author: Antony Antony Date: Tue Jun 15 09:20:08 2021 +0200 xfrm: delete xfrm4_output_finish xfrm6_output_finish declarations These function declarations are not needed any more. The definitions were deleted. Fixes: 2ab6096db2f1 ("xfrm: remove output_finish indirection from xfrm_state_afinfo") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert commit 6ef43d273e8562366035d8086008e4000a270fd8 Author: Mauro Carvalho Chehab Date: Sat Jun 5 14:40:12 2021 +0200 media: admin-guide: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab commit a169c44e58190bbdaf9c8d345cd445eec2c2b010 Author: Mauro Carvalho Chehab Date: Sat Jun 5 14:40:12 2021 +0200 media: driver-api: drivers: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab commit d759cd46b9f15180321b6f246a6e0964d4510aef Author: Mauro Carvalho Chehab Date: Sat Jun 5 14:40:12 2021 +0200 media: userspace-api: avoid using ReST :doc:`foo` markup The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab commit 703ac06a88f07f1fdde795d00c0296750e2b8e4c Author: Mauro Carvalho Chehab Date: Sat Jun 5 14:00:54 2021 +0200 media: docs: */media/index.rst: don't use ReST doc:`foo` The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab commit ebc076b3eddc807729bd81f7bc48e798a3ddc477 Author: James Smart Date: Tue Jun 1 16:55:12 2021 -0700 scsi: elx: efct: Tie into kernel Kconfig and build process This final patch ties the efct driver into the kernel Kconfig and build linkages in the drivers/scsi directory. Link: https://lore.kernel.org/r/20210601235512.20104-32-jsmart2021@gmail.com Reported-by: kernel test robot Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6f84c11ecc62fc7175a37733f7391e0a81fee996 Author: James Smart Date: Tue Jun 1 16:55:11 2021 -0700 scsi: elx: efct: Add Makefile and Kconfig for efct driver Add efct driver Kconfig and Makefiles. Link: https://lore.kernel.org/r/20210601235512.20104-31-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 32ddbad5b61e9a3b3dd59076b9242069fd2b675a Author: James Smart Date: Tue Jun 1 16:55:10 2021 -0700 scsi: elx: efct: Transport class host interface support Integration with the scsi_fc_transport host interfaces. Link: https://lore.kernel.org/r/20210601235512.20104-30-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ab332fcbcd81b1ed2a1eb02c8a0b951f94dd265d Author: James Smart Date: Tue Jun 1 16:55:09 2021 -0700 scsi: elx: efct: Transport and hardware teardown routines Implement routines to detach transport and hardware objects. Link: https://lore.kernel.org/r/20210601235512.20104-29-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6ae7147bfe337823e0479ca43d3264f9776588ff Author: James Smart Date: Tue Jun 1 16:55:08 2021 -0700 scsi: elx: efct: Link and host statistics Add routines to retrieve link stats and host stats, add firmware update helper routines. Link: https://lore.kernel.org/r/20210601235512.20104-28-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit dd53d333aadb980944021d076c825d5736a13db5 Author: James Smart Date: Tue Jun 1 16:55:07 2021 -0700 scsi: elx: efct: Hardware I/O submission routines Routines that write I/O to work queue, send SRRs and raw frames. Link: https://lore.kernel.org/r/20210601235512.20104-27-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 692e5d73a8118e1ff6759705eee9cacd9c14605c Author: James Smart Date: Tue Jun 1 16:55:06 2021 -0700 scsi: elx: efct: LIO backend interface routines Add LIO backend template registration and template functions. Link: https://lore.kernel.org/r/20210601235512.20104-26-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3e6414003bf9acd3b7e20474f950779fafb658d5 Author: James Smart Date: Tue Jun 1 16:55:05 2021 -0700 scsi: elx: efct: SCSI I/O handling routines Routines for SCSI transport IO alloc, build and send I/O. Link: https://lore.kernel.org/r/20210601235512.20104-25-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f45ae6aac0a077ca15a6e7baae0a62eef099ea7d Author: James Smart Date: Tue Jun 1 16:55:04 2021 -0700 scsi: elx: efct: Unsolicited FC frame processing routines Add routines to handle unsolicited FC frames. Link: https://lore.kernel.org/r/20210601235512.20104-24-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e2cf422ba833658c79681ba86b7c09988f3a0f28 Author: James Smart Date: Tue Jun 1 16:55:03 2021 -0700 scsi: elx: efct: Hardware queues processing Add driver definitions for: - Routines for EQ, CQ, WQ and RQ processing. - Routines for I/O object pool allocation and deallocation. Link: https://lore.kernel.org/r/20210601235512.20104-23-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 63de51327a64c74e85611a0161eaae71256a3b6d Author: James Smart Date: Tue Jun 1 16:55:02 2021 -0700 scsi: elx: efct: Hardware I/O and SGL initialization Add driver definitions for: - Routines to create I/O interfaces (wqs, etc), SGL initialization, and configure hardware features. Link: https://lore.kernel.org/r/20210601235512.20104-22-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 580c0255e4effe49b9974044e78a03e76d977618 Author: James Smart Date: Tue Jun 1 16:55:01 2021 -0700 scsi: elx: efct: RQ buffer, memory pool allocation and deallocation APIs Add driver definitions for: - RQ data buffer allocation and deallocate. - Memory pool allocation and deallocation APIs. - Mailbox command submission and completion routines. Link: https://lore.kernel.org/r/20210601235512.20104-21-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e10fc23359805bf688e005446e054d541b24728e Author: James Smart Date: Tue Jun 1 16:55:00 2021 -0700 scsi: elx: efct: Hardware queue creation and deletion Add routines for queue creation, deletion, and configuration. Link: https://lore.kernel.org/r/20210601235512.20104-20-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 4df84e8466242de835416a4ec0c856c0e2ed26eb Author: James Smart Date: Tue Jun 1 16:54:59 2021 -0700 scsi: elx: efct: Driver initialization routines Add driver definitions for: - Emulex FC Target driver init, attach and hardware setup routines. Link: https://lore.kernel.org/r/20210601235512.20104-19-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 75a10a7a913362ff5a7b52de69c456295ed151c2 Author: James Smart Date: Tue Jun 1 16:54:58 2021 -0700 scsi: elx: efct: Data structures and defines for hw operations Start the population of the efct target mode driver. The driver is contained in the drivers/scsi/elx/efct subdirectory. Create the efct directory and start population of the driver by adding SLI-4 configuration parameters, data structures for configuring SLI-4 queues, converting from OS to SLI-4 IO requests, and handling async events. Link: https://lore.kernel.org/r/20210601235512.20104-18-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit cdaf39bad54623df45979f036eab1353106cf17d Author: James Smart Date: Tue Jun 1 16:54:57 2021 -0700 scsi: elx: libefc: Register discovery objects with hardware Add library interface definitions for: - Registrations for VFI, VPI and RPI. Link: https://lore.kernel.org/r/20210601235512.20104-17-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8f406ef728597da39c935ab9c12f4940139775f9 Author: James Smart Date: Tue Jun 1 16:54:56 2021 -0700 scsi: elx: libefc: Extended link Service I/O handling Add library interface definitions for: - Functions to build and send ELS/CT/BLS commands and responses. Link: https://lore.kernel.org/r/20210601235512.20104-16-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 202bfdffae27a50d6fae0a259cde1333d9833127 Author: James Smart Date: Tue Jun 1 16:54:55 2021 -0700 scsi: elx: libefc: FC node ELS and state handling Add library interface definitions for: - FC node PRLI handling and state management. Link: https://lore.kernel.org/r/20210601235512.20104-15-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ffc3d500930fa7966c86aa66128d5e20711bf9a8 Author: James Smart Date: Tue Jun 1 16:54:54 2021 -0700 scsi: elx: libefc: Fabric node state machine interfaces Add library interface definitions for: - Fabric node initialization and logins. - Name/Directory Services node. - Fabric Controller node to process rscn events. These are all interactions with remote ports that correspond to well-known fabric entities Link: https://lore.kernel.org/r/20210601235512.20104-14-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6bc6180d7b5c972c10a2f5392621921de32ce5bc Author: James Smart Date: Tue Jun 1 16:54:53 2021 -0700 scsi: elx: libefc: Remote node state machine interfaces Add library interface definitions for: - Remote node (aka remote port) allocation, initializaion and destroy routines. Link: https://lore.kernel.org/r/20210601235512.20104-13-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit fcd427303eb90aa3cb08e7e0b68e0e67a6d47346 Author: James Smart Date: Tue Jun 1 16:54:52 2021 -0700 scsi: elx: libefc: SLI and FC PORT state machine interfaces Add library interface definitions for: - SLI and FC port (aka n_port_id) registration, allocation and deallocation. Link: https://lore.kernel.org/r/20210601235512.20104-12-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3146240f19bfd13eb75a7846ccd556067df78722 Author: James Smart Date: Tue Jun 1 16:54:51 2021 -0700 scsi: elx: libefc: FC Domain state machine interfaces Add library interface definitions for: - FC Domain registration, allocation and deallocation sequence Link: https://lore.kernel.org/r/20210601235512.20104-11-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d7b71fd2195e6d1bfb3e47a44a543631cfc85db6 Author: James Smart Date: Tue Jun 1 16:54:50 2021 -0700 scsi: elx: libefc: Emulex FC discovery library APIs and definitions Add library interface definitions for: - SLI/Local FC port objects - efc_domain_s: FC domain (aka fabric) objects - efc_node_s: FC node (aka remote ports) objects Link: https://lore.kernel.org/r/20210601235512.20104-10-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5aa09c48688fde15402931a4aa7e3cf31cac7a4a Author: James Smart Date: Tue Jun 1 16:54:49 2021 -0700 scsi: elx: libefc: Generic state machine framework Start the population of the libefc library. The library will contain common tasks usable by a target or initiator driver. The library will also contain a FC discovery state machine interface. Creates the library directory and add definitions for the discovery state machine interface. Link: https://lore.kernel.org/r/20210601235512.20104-9-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 388f36edec42094837569391b6b4ca91d4bb4c1e Author: James Smart Date: Tue Jun 1 16:54:48 2021 -0700 scsi: elx: libefc_sli: APIs to setup SLI library Add APIs to initialize the library, initialize the SLI Port, reset firmware, terminate the SLI Port, and terminate the library. Link: https://lore.kernel.org/r/20210601235512.20104-8-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9bd267093b8cf7e007c46252bc8cd1ce3bae2b8f Author: James Smart Date: Tue Jun 1 16:54:47 2021 -0700 scsi: elx: libefc_sli: BMBX routines and SLI config commands Add routines to create mailbox commands used during adapter initialization and add APIs to issue mailbox commands to the adapter through the bootstrap mailbox register. Link: https://lore.kernel.org/r/20210601235512.20104-7-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1628f5b4976fd8bf965c8d78e930d01f47092e79 Author: James Smart Date: Tue Jun 1 16:54:46 2021 -0700 scsi: elx: libefc_sli: Populate and post different WQEs Add service routines to create different WQEs and add APIs to issue iread, iwrite, treceive, tsend and other work queue entries. Link: https://lore.kernel.org/r/20210601235512.20104-6-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7c5b76831ec45dba58d89ed7bd5f8c5373443e12 Author: James Smart Date: Tue Jun 1 16:54:45 2021 -0700 scsi: elx: libefc_sli: Queue create/destroy/parse routines Add service routines to create mailbox commands and add APIs to create/destroy/parse SLI-4 EQ, CQ, RQ and MQ queues. Link: https://lore.kernel.org/r/20210601235512.20104-5-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 18be69fa34863e737130db78e6474ad44d85aaf6 Author: James Smart Date: Tue Jun 1 16:54:44 2021 -0700 scsi: elx: libefc_sli: Data structures and defines for mbox commands Add definitions for SLI-4 mailbox commands and responses. Link: https://lore.kernel.org/r/20210601235512.20104-4-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 216fc0b4b2e162c08d51736d95dc6a7f4c094883 Author: James Smart Date: Tue Jun 1 16:54:43 2021 -0700 scsi: elx: libefc_sli: SLI Descriptors and Queue entries Continue the libefc_sli SLI-4 library population. Add SLI-4 Data structures and defines for: - Buffer Descriptors (BDEs) - Scatter/Gather List elements (SGEs) - Queues and their Entry Descriptions for: Event Queues (EQs), Completion Queues (CQs), Receive Queues (RQs), and the Mailbox Queue (MQ). Link: https://lore.kernel.org/r/20210601235512.20104-3-jsmart2021@gmail.com Reviewed-by: Daniel Wagner Reviewed-by: Hannes Reinecke Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit edba59f3cdc1cc6f6d3c2dcceccfc0b1a26d75d9 Author: James Smart Date: Tue Jun 1 16:54:42 2021 -0700 scsi: elx: libefc_sli: SLI-4 register offsets and field definitions This is the initial patch for the new Emulex target mode SCSI driver. - Create the new Emulex source level directory drivers/scsi/elx and add the directory to the MAINTAINERS file. - Create the first library subdirectory drivers/scsi/elx/libefc_sli. This library is a SLI-4 interface library. - Start the population of the libefc_sli library with definitions of SLI-4 hardware register offsets and definitions. Link: https://lore.kernel.org/r/20210601235512.20104-2-jsmart2021@gmail.com Reviewed-by: Hannes Reinecke Reviewed-by: Daniel Wagner Co-developed-by: Ram Vegesna Signed-off-by: Ram Vegesna Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 522af60cb2f8e3658bda1902fb7f200dcf888a5c Author: Dan Carpenter Date: Sat Jun 5 15:48:16 2021 +0300 nvme-tcp: fix error codes in nvme_tcp_setup_ctrl() These error paths currently return success but they should return -EOPNOTSUPP. Fixes: 73ffcefcfca0 ("nvme-tcp: check sgl supported by target") Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Dan Carpenter Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit e7d4b5493a2d5a6225fc572e01167e12f89c6a42 Author: Chaitanya Kulkarni Date: Mon Jun 7 12:54:50 2021 -0700 nvme: factor out a nvme_validate_passthru_nsid helper Add a helper nvme_validate_passthru_nsid() to validate the nsid that removes the nsid validation and error message print code from nvme_user_cmd() and nvme_user_cmd64(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit d399742cd02dca6d1ed17ae7db7a366192516591 Author: Geert Uytterhoeven Date: Mon Jun 14 16:16:07 2021 +0200 nvme: fix grammar in the CONFIG_NVME_MULTIPATH kconfig help text Fix a singular/plural mismatch in the CONFIG_NVME_MULTIPATH help text. Signed-off-by: Geert Uytterhoeven Signed-off-by: Christoph Hellwig commit 2411424143bdfad3027e82fe6a66c5aadce271ee Author: Daniel Wagner Date: Mon Jun 7 10:46:51 2021 +0200 nvme: remove superfluous bio_set_dev in nvme_requeue_work Commit ce86dad222e9 ("nvme-multipath: reset bdev to ns head when failover") moved the reset code where the bio is added to the requeue_list for the failover path. But it left the original bio_set_dev in nvme_requeue_work. There is a second path to nvme_requee_work. It is via nvme_ns_head_submit_bio. Though we don't have to set bio->bi_bdev for this path either, as it points to the correct bdev already. Let's remove the bio_set_dev. It's updating the bio->bi_bdev with the same pointer and thus it's unnecessary. Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 120bb3624d55d65145f7c1bf12a839fd323cde29 Author: Daniel Wagner Date: Mon Jun 7 10:56:56 2021 +0200 nvme: verify MNAN value if ANA is enabled The controller is required to have a non-zero MNAN value if it supports ANA: If the controller supports Asymmetric Namespace Access Reporting, then this field shall be set to a non-zero value that is less than or equal to the NN value. Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 6485fc18faa01e8845b1e5bb55118e633f84d1f2 Author: Mario Limonciello Date: Wed Jun 9 13:40:18 2021 -0500 ACPI: Add quirks for AMD Renoir/Lucienne CPUs to force the D3 hint AMD systems from Renoir and Lucienne require that the NVME controller is put into D3 over a Modern Standby / suspend-to-idle cycle. This is "typically" accomplished using the `StorageD3Enable` property in the _DSD, but this property was introduced after many of these systems launched and most OEM systems don't have it in their BIOS. On AMD Renoir without these drives going into D3 over suspend-to-idle the resume will fail with the NVME controller being reset and a trace like this in the kernel logs: ``` [ 83.556118] nvme nvme0: I/O 161 QID 2 timeout, aborting [ 83.556178] nvme nvme0: I/O 162 QID 2 timeout, aborting [ 83.556187] nvme nvme0: I/O 163 QID 2 timeout, aborting [ 83.556196] nvme nvme0: I/O 164 QID 2 timeout, aborting [ 95.332114] nvme nvme0: I/O 25 QID 0 timeout, reset controller [ 95.332843] nvme nvme0: Abort status: 0x371 [ 95.332852] nvme nvme0: Abort status: 0x371 [ 95.332856] nvme nvme0: Abort status: 0x371 [ 95.332859] nvme nvme0: Abort status: 0x371 [ 95.332909] PM: dpm_run_callback(): pci_pm_resume+0x0/0xe0 returns -16 [ 95.332936] nvme 0000:03:00.0: PM: failed to resume async: error -16 ``` The Microsoft documentation for StorageD3Enable mentioned that Windows has a hardcoded allowlist for D3 support, which was used for these platforms. Introduce quirks to hardcode them for Linux as well. As this property is now "standardized", OEM systems using AMD Cezanne and newer APU's have adopted this property, and quirks like this should not be necessary. CC: Shyam-sundar S-k CC: Alexander Deucher CC: Prike Liang Link: https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro Signed-off-by: Mario Limonciello Acked-by: Rafael J. Wysocki Tested-by: Julian Sikorski Signed-off-by: Christoph Hellwig commit 2744d7a0733503931b71c00d156119ced002f22c Author: Mario Limonciello Date: Wed Jun 9 13:40:17 2021 -0500 ACPI: Check StorageD3Enable _DSD property in ACPI code Although first implemented for NVME, this check may be usable by other drivers as well. Microsoft's specification explicitly mentions that is may be usable by SATA and AHCI devices. Google also indicates that they have used this with SDHCI in a downstream kernel tree that a user can plug a storage device into. Link: https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro Suggested-by: Keith Busch CC: Shyam-sundar S-k CC: Alexander Deucher CC: Rafael J. Wysocki CC: Prike Liang Signed-off-by: Mario Limonciello Reviewed-by: Rafael J. Wysocki Signed-off-by: Christoph Hellwig commit 4ee8c40b1e1e1bb7db805bc11e376f547fb24ec2 Author: Zhen Lei Date: Thu Jun 10 17:46:05 2021 +0800 scsi: pm8001: Remove unnecessary OOM message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Also change the return error code from "-1" to "-ENOMEM". Link: https://lore.kernel.org/r/20210610094605.16672-2-thunder.leizhen@huawei.com Acked-by: Jack Wang Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit b6e7fba0c9ccba96198762b1b51559543466de03 Author: Baokun Li Date: Wed Jun 9 15:23:21 2021 +0800 scsi: qla2xxx: Use list_move_tail() instead of list_del()/list_add_tail() Using list_move_tail() instead of list_del() + list_add_tail(). Link: https://lore.kernel.org/r/20210609072321.1356896-1-libaokun1@huawei.com Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Signed-off-by: Baokun Li Signed-off-by: Martin K. Petersen commit de48898d0cb6a3750558f35e14af799eafc3e6db Author: Peter Wang Date: Wed Jun 2 10:42:00 2021 +0800 scsi: ufs-mediatek: Create reset control device_link Mediatek UFS reset function relies on Reset Control provided by reset-ti-syscon. To make Mediatek Reset Control work properly, select reset-ti-syscon to ensure it is being built. In addition, establish device_link to wait until reset-ti-syscon initialization is complete during UFS probing. Link: https://lore.kernel.org/r/1622601720-22466-1-git-send-email-peter.wang@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Peter Wang Signed-off-by: Martin K. Petersen commit b135d097eb1a2586ee2c0ebcc0d0aa4a9b641b68 Author: Konrad Dybcio Date: Sun Jun 13 14:48:22 2021 +0200 arm64: dts: qcom: sm8[12]50-pm8150: Move RESIN to pm8150 dtsi It's not worth duplicating the same node over and over and over and over again, so let's keep the common bits in the pm8150 DTSI, making only changing the status and keycode necessary. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210613124822.124039-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 9dda74f3436449e1a4087e05fef583ccfd689bdd Author: Shaokun Zhang Date: Mon May 24 16:03:22 2021 +0800 scsi: qla2xxx: Remove duplicate declarations qla2x00_post_uevent_work(), qla2x00_free_fcport() and ql2xexlogins are declared multiple times. Remove the duplicates. Link: https://lore.kernel.org/r/1621843402-34828-1-git-send-email-zhangshaokun@hisilicon.com Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Reviewed-by: Himanshu Madhani Signed-off-by: Shaokun Zhang Signed-off-by: Martin K. Petersen commit 47018083602326462f2a254d1935a8fd3b758c6b Author: Zou Wei Date: Tue Jun 8 08:51:33 2021 +0800 scsi: lpfc: Use list_move_tail() instead of list_del()/list_add_tail() Using list_move_tail() instead of list_del() + list_add_tail(). Link: https://lore.kernel.org/r/1623113493-49384-1-git-send-email-zou_wei@huawei.com Reported-by: Hulk Robot Reviewed-by: James Smart Signed-off-by: Zou Wei Signed-off-by: Martin K. Petersen commit 52e1b3b3daa9d53f0204bf474ee1d4b1beb38234 Author: Michael Kelley Date: Fri Jun 4 10:21:03 2021 -0700 scsi: storvsc: Correctly handle multiple flags in srb_status Hyper-V is observed to sometimes set multiple flags in the srb_status, such as ABORTED and ERROR. Current code in storvsc_handle_error() handles only a single flag being set, and does nothing when multiple flags are set. Fix this by changing the case statement into a series of "if" statements testing individual flags. The functionality for handling each flag is unchanged. Link: https://lore.kernel.org/r/1622827263-12516-3-git-send-email-mikelley@microsoft.com Signed-off-by: Michael Kelley Signed-off-by: Martin K. Petersen commit 08f76547f08d94f079c13c8031c46a69cd01edd6 Author: Michael Kelley Date: Fri Jun 4 10:21:02 2021 -0700 scsi: storvsc: Update error logging When an I/O error is reported by the underlying Hyper-V host, current code provides details only when the logging level is set to WARN, making it more difficult to diagnose problems in live customer situations. Fix this by reporting details at ERROR level, which is the default. Also add more information, including the Hyper-V error code, and the tag # so that the message can be matched with messages at the SCSI and blk-mq levels. Also, sense information logging is inconsistent and duplicative. The existence of sense info is first logged at WARN level, and then full sense info is logged at ERROR level. Fix this by removing the logging of the existence of sense info, and change the logging of full sense info to WARN level in favor of letting the generic SCSI layer handle such logging. With the change to WARN level, it's no longer necessary to filter out as noise any NOT READY sense info generated by the virtual DVD device. Link: https://lore.kernel.org/r/1622827263-12516-2-git-send-email-mikelley@microsoft.com Signed-off-by: Michael Kelley Signed-off-by: Martin K. Petersen commit d46748590a8538aeaf2349d9539f571708500a54 Author: Michael Kelley Date: Fri Jun 4 10:21:01 2021 -0700 scsi: storvsc: Miscellaneous code cleanups As general cleanup and in preparation for subsequent patches: - Use min() instead of open coding. - Use set_host_byte() instead of open coding access to scsi_status field. - Collapse nested "if" statements to reduce indentation. - Fix other indentation. - Remove extra blank lines. No functional changes. [mkp: dropped status_byte() which no longer exists] Link: https://lore.kernel.org/r/1622827263-12516-1-git-send-email-mikelley@microsoft.com Signed-off-by: Michael Kelley Signed-off-by: Martin K. Petersen commit 69cdb97ef6529b6b23c81da37bab7b183af7b8ee Author: Konrad Dybcio Date: Wed Jun 16 02:23:21 2021 +0200 arm64: dts: qcom: sm8250: Add support for SONY Xperia 1 II / 5 II (Edo platform) Add support for SONY Xperia 1 II and 5 II smartphones (read one/five mark two). They are based on the Qualcomm SM8250 chipset and both feature 5G modems. There also exists a third Edo board, namely the Xperia PRO (PDX204), but it's $2500 and no developers have obtained it so far (to my knowledge). The devices are affected by a scary UFS behaviour where sending a certain UFS command (which is worked around on downstream) renders the device unbootable, by effectively erasing the bootloader. Therefore UFS AND UFSPHY are strictly disabled for now. Downstream workaround: https://github.com/kholk/kernel/commit/2e7a9ee1c91a016baa0b826a7752ec45663a0561 Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616002321.74155-4-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 759488004ffb7f3b3190677bc7ddc1d8137974aa Author: Konrad Dybcio Date: Wed Jun 16 02:23:20 2021 +0200 arm64: dts: qcom: sm8250: Move gpio.h inclusion to SoC DTSI Almost any board that boots and has a way to interact with it (say for the rare cases of just-pstore or let's-rely-on-bootloader-setup) needs to set some GPIOs, so it makes no sense to include gpio.h separately each time. Hence move it to SoC DTSI. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616002321.74155-3-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 8eaa6501ef2671daba3a595852ec453fe5a7d34c Author: Konrad Dybcio Date: Wed Jun 16 02:23:19 2021 +0200 arm64: dts: qcom: sm8250: Add SDHCI2 sleep mode pinctrl Add required pins for SDHCI2, so that the interface can work reliably. This commit adds sleep_state setup to the SoC DTSI, as it is common for all boards. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210616002321.74155-2-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 8ae030c34dce4f5764e945b325e8dc4d2adef044 Author: Vinod Koul Date: Tue Jun 15 13:47:49 2021 +0530 arm64: defconfig: Enable renesas usb xhci pci host controller 96Boards RB3 has a USB XHCI PCI Renesas host controller. This controller requires firmware to be loaded on its ROM/RAM, so enable the module CONFIG_USB_XHCI_PCI_RENESAS. This depends on CONFIG_USB_XHCI_PCI so enable that as well. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210615081749.3210344-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit d0a6ce59ea4e529e30df950e3f0f61533be5301c Author: Konrad Dybcio Date: Fri Jun 11 22:33:01 2021 +0200 arm64: dts: qcom: sm8150: Add support for SONY Xperia 1 / 5 (Kumano platform) Add support for SONY Xperia 1 and 5 smartphones, both based on the Qualcomm SM8150 chipset. There also exist 5G-capable versions of these devices, but they weren't sold much (if at all) outside Japan. The devices are affected by a scary UFS behaviour where sending a certain UFS command (which is worked around on downstream) renders the device unbootable, by effectively erasing the bootloader. Therefore UFS AND UFSPHY are strictly disabled for now. Downstream workaround: https://github.com/kholk/kernel/commit/2e7a9ee1c91a016baa0b826a7752ec45663a0561 Reviewed-by: AngeloGioacchino Del Regno Tested-by: Marijn Suijten (On Bahamut) Tested-by: AngeloGioacchino Del Regno Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210611203301.101067-2-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit b1dc3c6b3dabbedaf896a3c1a998da191c311c70 Author: Konrad Dybcio Date: Fri Jun 11 22:33:00 2021 +0200 arm64: dts: qcom: sm8150: Disable Adreno and modem by default Components that rely on proprietary (not to mention signed!) firmware should not be enabled by default, as lack of the aforementioned firmware could cause various issues, from random errors to straight-up failing to boot. Not enabling modem back on the HDK, as it uses a sa8150. Also fixed a sorting mistake in both boards' dt while at it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210611203301.101067-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 21083f51521fb0f60dbac591f175c3ed48435af4 Author: Dan Williams Date: Tue Jun 15 16:36:31 2021 -0700 cxl/pmem: Register 'pmem' / cxl_nvdimm devices While a memX device on /sys/bus/cxl represents a CXL memory expander control interface, a pmemX device represents the persistent memory sub-functionality. It bridges the CXL subystem to the libnvdimm nmemX control interface. With this skeleton ndctl can now see persistent memory devices on a "CXL" bus. Later patches add support for translating libnvdimm native commands to CXL commands. # ndctl list -BDiu -b CXL { "provider":"CXL", "dev":"ndbus1", "dimms":[ { "dev":"nmem1", "state":"disabled" }, { "dev":"nmem0", "state":"disabled" } ] } Given nvdimm_bus_unregister() removes all devices on an ndbus0 the cxl_pmem infrastructure needs to arrange ->remove() to be triggered on cxl_nvdimm devices to keep their enabled state synchronized with the registration state of their corresponding device on the nvdimm_bus. In other words, always arrange for cxl_nvdimm_driver.remove() to unregister nvdimms from an nvdimm_bus ahead of the bus being unregistered. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162380012696.3039556.4293801691038740850.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 2bbafda405c04cfed1b57b761d13ada3154c0f89 Author: Dan Williams Date: Tue Jun 15 16:18:28 2021 -0700 libnvdimm: Drop unused device power management support LIBNVDIMM device objects register sysfs power attributes despite nothing requiring that support. Clean up sysfs remove the power/ attribute group. This requires a device_create() and a device_register() usage to be converted to the device_initialize() + device_add() pattern. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162379910795.2993820.10130417680551632288.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit fd14602d05229671be81018fa226f9afdafdba88 Author: Dan Williams Date: Tue Jun 15 16:18:22 2021 -0700 libnvdimm: Export nvdimm shutdown helper, nvdimm_delete() CXL is a hotplug bus and arranges for nvdimm devices to be dynamically discovered and removed. The libnvdimm core manages shutdown of nvdimm security operations when the device is unregistered. That functionality is moved to nvdimm_delete() and invoked by the CXL-to-nvdimm glue code. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162379910271.2993820.2955889139842401250.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 8fdcb1704f61a8fd9be0f3849a174d084def0666 Author: Dan Williams Date: Tue Jun 15 16:18:17 2021 -0700 cxl/pmem: Add initial infrastructure for pmem support Register an 'nvdimm-bridge' device to act as an anchor for a libnvdimm bus hierarchy. Also, flesh out the cxl_bus definition to allow a cxl_nvdimm_bridge_driver to attach to the bridge and trigger the nvdimm-bus registration. The creation of the bridge is gated on the detection of a PMEM capable address space registered to the root. The bridge indirection allows the libnvdimm module to remain unloaded on platforms without PMEM support. Given that the probing of ACPI0017 is asynchronous to CXL endpoint devices, and the expectation that CXL endpoint devices register other PMEM resources on the 'CXL' nvdimm bus, a workqueue is added. The workqueue is needed to run bus_rescan_devices() outside of the device_lock() of the nvdimm-bridge device to rendezvous nvdimm resources as they arrive. For now only the bus is taken online/offline in the workqueue. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162379909706.2993820.14051258608641140169.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 6af7139c979474a29a6ad642c9bf32d92e24c5bc Author: Dan Williams Date: Tue Jun 15 16:18:11 2021 -0700 cxl/core: Add cxl-bus driver infrastructure Enable devices on the 'cxl' bus to be attached to drivers. The initial user of this functionality is a driver for an 'nvdimm-bridge' device that anchors a libnvdimm hierarchy attached to CXL persistent memory resources. Other device types that will leverage this include: cxl_port: map and use component register functionality (HDM Decoders) cxl_nvdimm: translate CXL memory expander endpoints to libnvdimm 'nvdimm' objects cxl_region: translate CXL interleave sets to libnvdimm 'region' objects The pairing of devices to drivers is handled through the cxl_device_id() matching to cxl_driver.id values. A cxl_device_id() of '0' indicates no driver support. In addition to ->match(), ->probe(), and ->remove() support for the 'cxl' bus introduce MODULE_ALIAS_CXL() to autoload modules containing cxl-drivers. Drivers are added in follow-on changes. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162379909190.2993820.6134168109678004186.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit ece28cb5ed729c66ed8bfff79f4fff4302d3d8b8 Author: Konrad Dybcio Date: Sat Jun 12 21:23:56 2021 +0200 arm64: dts: qcom: sm8250: Disable Adreno and Venus by default Components that rely on proprietary (not to mention signed!) firmware should not be enabled by default, as lack of the aforementioned firmware could cause various issues, from random errors to straight-up failing to boot. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210612192358.62602-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 15049bb59732e530ca92767d051e38714174c0a2 Author: Konrad Dybcio Date: Tue Jun 15 01:56:30 2021 +0200 arm64: dts: qcom: sm8250: Add GPI DMA nodes Add and configure GPI DMA nodes to enable the way for peripherals to make DMA transfers. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210614235630.445501-3-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit dc2f86369b157dfe4dccd31497d2e3c541e7239d Author: Konrad Dybcio Date: Sun Jun 13 20:53:34 2021 +0200 arm64: dts: qcom: sm8250: Fix pcie2_lane unit address The previous one was likely a mistaken copy from pcie1_lane. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210613185334.306225-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 40f7d36db8fdad23561f9e587595a5be99e2aa5d Author: Konrad Dybcio Date: Sun Jun 13 13:43:56 2021 +0200 arm64: dts: qcom: sm8250: Add size/address-cells to dsi[01] Add the aforementioned properties in the SoC DTSI so that everybody doesn't have to copy that into their device DTs, effectively reducing code duplication. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210613114356.82358-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 0c25dad9f2a74f63986edcca9001a1269f744916 Author: Konrad Dybcio Date: Sun Jun 13 13:06:35 2021 +0200 arm64: dts: qcom: sm8250: Don't disable MDP explicitly DPU/MDSS is borderline useless without MDP, so disabling both of them makes little sense. With this change, enabling mdss will be enough. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210613110635.46537-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 22118ce17eb8dcf2a6ba2f6fb250816ddb59685a Author: Jarkko Sakkinen Date: Thu Jun 10 11:30:21 2021 +0300 selftests/sgx: Refine the test enclave to have storage Extend the enclave to have two operations: ENCL_OP_PUT and ENCL_OP_GET. ENCL_OP_PUT stores value inside the enclave address space and ENCL_OP_GET reads it. The internal buffer can be later extended to be variable size, and allow reclaimer tests. Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit b334fb6fa7f38b4ad188d38307aea45e827b56ce Author: Jarkko Sakkinen Date: Thu Jun 10 11:30:20 2021 +0300 selftests/sgx: Add EXPECT_EEXIT() macro Add EXPECT_EEXIT() macro, which will conditionally print the exception information, in addition to EXPECT_EQ(self->run.function, EEXIT); Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit 040efd1c35f93787cbd26be6fc6493592571f424 Author: Jarkko Sakkinen Date: Thu Jun 10 11:30:19 2021 +0300 selftests/sgx: Dump enclave memory map Often, it's useful to check whether /proc/self/maps looks sane when dealing with memory mapped objects, especially when they are JIT'ish dynamically constructed objects. Therefore, dump "/dev/sgx_enclave" matching lines from the memory map in FIXTURE_SETUP(). Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit 235d1c9c63088c33d746a1e7e92e15153b8d1192 Author: Jarkko Sakkinen Date: Thu Jun 10 11:30:18 2021 +0300 selftests/sgx: Migrate to kselftest harness Migrate to kselftest harness. Use a fixture test with enclave initialized and de-initialized for each of the existing three tests, in other words: 1. One FIXTURE() for managing the enclave life-cycle. 2. Three TEST_F()'s, one for each test case. Dump lines of /proc/self/maps matching "sgx" in FIXTURE_SETUP() as this can be very useful debugging information later on. Amended commit log: This migration changes the output of this test. Instead of skipping the tests if open /dev/sgx_enclave fails, it will run all the tests and report failures on all of them. Shuah Khan Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit 6a7171b8a0f8e961744d0c46fb7547662a3fca36 Author: Jarkko Sakkinen Date: Thu Jun 10 11:30:17 2021 +0300 selftests/sgx: Rename 'eenter' and 'sgx_call_vdso' Rename symbols for better clarity: * 'eenter' might be confused for directly calling ENCLU[EENTER]. It does not. It calls into the VDSO, which actually has the EENTER instruction. * 'sgx_call_vdso' is *only* used for entering the enclave. It's not some generic SGX call into the VDSO. Signed-off-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit 2335f6f5ddf2f4621395fac5fa4b53d075828cc1 Author: Pavel Begunkov Date: Tue Jun 15 16:47:58 2021 +0100 io_uring: optimise io_commit_cqring() In most cases io_commit_cqring() is just an smp_store_release(), and it's hot enough, especially for IRQ rw, to want it to save on a function call. Mark it inline and extract a non-inlined slow path doing drain and timeout flushing. The inlined part is pretty slim to not cause binary bloating. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7350f8b6b92caa50a48a80be39909f0d83eddd93.1623772051.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3c19966d3710dbe5a44658c532052f11d797aecb Author: Pavel Begunkov Date: Tue Jun 15 16:47:57 2021 +0100 io_uring: shove more drain bits out of hot path Place all drain_next logic into io_drain_req(), so it's never executed if there was no drained requests before. The only thing we need is to set ->drain_active if we see a request with IOSQE_IO_DRAIN, do that in io_init_req() where flags are definitely in registers. Also, all drain-related code is encapsulated in io_drain_req(), makes it cleaner. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/68bf4f7395ddaafbf1a26bd97b57d57d45a9f900.1623772051.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 10c669040e9b3538e1732c8d40729636b17ce9dd Author: Pavel Begunkov Date: Tue Jun 15 16:47:56 2021 +0100 io_uring: switch !DRAIN fast path when possible ->drain_used is one way, which is not optimal if users use DRAIN but very rarely. However, we can just clear it in io_drain_req() when all drained before requests are gone. Also rename the flag to reflect the change and be more clear about it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7f37a240857546a94df6348507edddacab150460.1623772051.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9c54cd10e43947caa64920aaa7a30858193f8ef5 Author: Charles Rose Date: Tue Jun 15 14:08:01 2021 -0500 ahci: Add support for Dell S140 and later controllers This patch enables support for Dell S140 and later controllers that use Intel's PCHs configured as PCI_CLASS_STORAGE_RAID. Reviewed-by: Mika Westerberg Signed-off-by: Charles Rose Link: https://lore.kernel.org/r/20210615190801.1744466-1-charles.rose@dell.com Signed-off-by: Jens Axboe commit e0d245e2230998e66dfda10fb8c413f29196eb1c Merge: 491e5b170ef8b 97ae27252f496 Author: Jens Axboe Date: Tue Jun 15 15:42:56 2021 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.14/drivers Pull MD changes from Song: "1) iostats rewrite by Guoqing Jiang; 2) raid5 lock contention optimization by Gal Ofri." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: avoid device_lock in read_one_chunk() md: add comments in md_integrity_register md: check level before create and exit io_acct_set md: Constify attribute_group structs md: mark some personalities as deprecated md/raid10: enable io accounting md/raid1: enable io accounting md/raid1: rename print_msg with r1bio_existed md/raid5: avoid redundant bio clone in raid5_read_one_chunk md/raid5: move checking badblock before clone bio in raid5_read_one_chunk md: add io accounting for raid0 and raid5 md: revert io stats accounting commit 491e5b170ef8bf951d9337b1a7ee9f9c1465ffe8 Merge: d07f3b081ee63 2c9bdf6e4771a Author: Jens Axboe Date: Tue Jun 15 15:41:17 2021 -0600 Merge tag 'floppy-for-5.14' of https://github.com/evdenis/linux-floppy into for-5.14/drivers Pull floppy fixes from Denis: "Floppy patches for 5.14 Two oneliners to fix clang warnings: - -Wimplicit-fallthrough warning fix from Gustavo A. R. Silva. - Redundant assignment warning fix from Jiapeng Chong. No semantic and behavioural changes." * tag 'floppy-for-5.14' of https://github.com/evdenis/linux-floppy: floppy: Fix fall-through warning for Clang floppy: cleanup: remove redundant assignment to nr_sectors commit 27f6b318dea2d7ccccc9dca416e59431838c2929 Author: Pavel Begunkov Date: Tue Jun 15 13:20:13 2021 +0100 io_uring: fix min types mismatch in table alloc fs/io_uring.c: In function 'io_alloc_page_table': include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast Cast everything to size_t using min_t. Reported-by: Stephen Rothwell Fixes: 9123c8ffce16 ("io_uring: add helpers for 2 level table alloc") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/50f420a956bca070a43810d4a805293ed54f39d8.1623759527.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit dd9ae8a0b2985ead64dfcfa2f9a0ce5efa1480aa Author: Fam Zheng Date: Fri Jun 4 17:42:56 2021 +0100 io_uring: Fix comment of io_get_sqe The sqe_ptr argument has been gone since 709b302faddf (io_uring: simplify io_get_sqring, 2020-04-08), made the return value of the function. Update the comment accordingly. Signed-off-by: Fam Zheng Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20210604164256.12242-1-fam.zheng@bytedance.com Signed-off-by: Jens Axboe commit 441b8a7803bfa11af2355beea9a07720d4b5c03a Author: Pavel Begunkov Date: Mon Jun 14 23:37:31 2021 +0100 io_uring: optimise non-drain path Replace drain checks with one-way flag set upon seeing the first IOSQE_IO_DRAIN request. There are several places where it cuts cycles well: 1) It's much faster than the fast check with two conditions in io_drain_req() including pretty complex list_empty_careful(). 2) We can mark io_queue_sqe() inline now, that's a huge win. 3) It replaces timeout and drain checks in io_commit_cqring() with a single flags test. Also great not touching ->defer_list there without a reason so limiting cache bouncing. It adds a small amount of overhead to drain path, but it's negligible. The main nuisance is that once it meets any DRAIN request in io_uring instance lifetime it will _always_ go through a slower path, so drain-less and offset-mode timeout less applications are preferable. The overhead in that case would be not big, but it's worth to bear in mind. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/98d2fff8c4da5144bb0d08499f591d4768128ea3.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 76cc33d79175a1b224bf02d3ff6c7be53fc684d5 Author: Pavel Begunkov Date: Mon Jun 14 23:37:30 2021 +0100 io_uring: refactor io_req_defer() Rename io_req_defer() into io_drain_req() and refactor it uncoupling it from io_queue_sqe() error handling and preparing for coming optimisations. Also, prioritise non IOSQE_ASYNC path. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4f17dd56e7fbe52d1866f8acd8efe3284d2bebcb.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0499e582aaff4e4072a760d1f31434acb50c7813 Author: Pavel Begunkov Date: Mon Jun 14 23:37:29 2021 +0100 io_uring: move uring_lock location ->uring_lock is prevalently used for submission, even though it protects many other things like iopoll, registeration, selected bufs, and more. And it's placed together with ->cq_wait poked on completion and CQ waiting sides. Move them apart, ->uring_lock goes to the submission data, and cq_wait to completion related chunk. The last one requires some reshuffling so everything needed by io_cqring_ev_posted*() is in one cacheline. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dea5e845caee4c98aa0922b46d713154d81f7bd8.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 311997b3fcddc2f169fff844bf6b48dbff0bb816 Author: Pavel Begunkov Date: Mon Jun 14 23:37:28 2021 +0100 io_uring: wait heads renaming We use several wait_queue_head's for different purposes, but namings are confusing. First rename ctx->cq_wait into ctx->poll_wait, because this one is used for polling an io_uring instance. Then rename ctx->wait into ctx->cq_wait, which is responsible for CQE waiting. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/47b97a097780c86c67b20b6ccc4e077523dce682.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5ed7a37d21b369d03114dea12a1f16ae2e21baa8 Author: Pavel Begunkov Date: Mon Jun 14 23:37:27 2021 +0100 io_uring: clean up check_overflow flag There are no users of ->sq_check_overflow, only ->cq_check_overflow is used. Combine it and move out of completion related part of struct io_ring_ctx. A not so obvious benefit of it is fitting all completion side fields into a single cacheline. It was taking 2 lines before with 56B padding, and io_cqring_ev_posted*() were still touching both of them. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/25927394964df31d113e3c729416af573afff5f5.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5e159204d7edd5bd329e8cdb419dbd81d25751e0 Author: Pavel Begunkov Date: Mon Jun 14 23:37:26 2021 +0100 io_uring: small io_submit_sqe() optimisation submit_state.link is used only to assemble a link and not used for actual submission, so clear it before io_queue_sqe() in io_submit_sqe(), awhile it's hot and in caches and queueing doesn't spoil it. May also potentially help compiler with spilling or to do other optimisations. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1579939426f3ad6b55af3005b1389bbbed7d780d.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f18ee4cf0a277a0e3d043755046d5817d4ddd618 Author: Pavel Begunkov Date: Mon Jun 14 23:37:25 2021 +0100 io_uring: optimise completion timeout flushing io_commit_cqring() might be very hot and we definitely don't want to touch ->timeout_list there, because 1) it's shared with the submission side so might lead to cache bouncing and 2) may need to load an extra cache line, especially for IRQ completions. We're interested in it at the completion side only when there are offset-mode timeouts, which are not so popular. Replace list_empty(->timeout_list) hot path check with a new one-way flag, which is set when we prepare the first offset-mode timeout. note: the flag sits in the same line as briefly used after ->rings Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e4892ec68b71a69f92ffbea4a1499be3ec0d463b.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 15641e427070f05fad2e9d74d191146d6514d30f Author: Pavel Begunkov Date: Mon Jun 14 23:37:24 2021 +0100 io_uring: don't cache number of dropped SQEs Kill ->cached_sq_dropped and wire DRAIN sequence number correction via ->cq_extra, which is there exactly for that purpose. User visible dropped counter will be populated by incrementing it instead of keeping a copy, similarly as it was done not so long ago with cq_overflow. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/088aceb2707a534d531e2770267c4498e0507cc1.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 17d3aeb33cdae8c87a8ad97c4358a623a630e19a Author: Pavel Begunkov Date: Mon Jun 14 23:37:23 2021 +0100 io_uring: refactor io_get_sqe() The line of io_get_sqe() evaluating @head consists of too many operations including READ_ONCE(), it's not convenient for probing. Refactor it also improving readability. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/866ad6e4ef4851c7c61f6b0e08dbd0a8d1abce84.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 7f1129d227ea54526380d0f37eb7b33ab9f200c1 Author: Pavel Begunkov Date: Mon Jun 14 23:37:22 2021 +0100 io_uring: shuffle more fields into SQ ctx section Since moving locked_free_* out of struct io_submit_state ctx->submit_state is accessed on submission side only, so move it into the submission section. Same goes for rsrc table pointers/nodes/etc., they must be taken and checked during submission because sync'ed by uring_lock, so move them there as well. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8a5899a50afc6ccca63249e716f580b246f3dec6.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b52ecf8cb5b5ccb8069adbdb82a68d3fa0f423db Author: Pavel Begunkov Date: Mon Jun 14 23:37:21 2021 +0100 io_uring: move ctx->flags from SQ cacheline ctx->flags are heavily used by both, completion and submission sides, so move it out from the ctx fields related to submissions. Instead, place it together with ctx->refs, because it's already cacheline-aligned and so pads lots of space, and both almost never change. Also, in most occasions they are accessed together as refs are taken at submission time and put back during completion. Do same with ctx->rings, where the pointer itself is never modified apart from ring init/free. Note: in percpu mode, struct percpu_ref doesn't modify the struct itself but takes indirection with ref->percpu_count_ptr. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4c48c173e63d35591383ba2b87e8b8e8dfdbd23d.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c7af47cf0fab5bad1fb8b250dfab8efc1f991559 Author: Pavel Begunkov Date: Mon Jun 14 23:37:20 2021 +0100 io_uring: keep SQ pointers in a single cacheline sq_array and sq_sqes are always used together, however they are in different cachelines, where the borderline is right before cq_overflow_list is rather rarely touched. Move the fields together so it loads only one cacheline. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3ef2411a94874da06492506a8897eff679244f49.1623709150.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b1b2fc3574a6a94a1ab90271a7620345c39dc01f Author: Colin Ian King Date: Tue Jun 15 15:34:24 2021 +0100 io-wq: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210615143424.60449-1-colin.king@canonical.com Signed-off-by: Jens Axboe commit fdd1dc316e8959b6730d733fba025a39dac7938f Author: Colin Ian King Date: Tue Jun 15 14:00:11 2021 +0100 io_uring: Fix incorrect sizeof operator for copy_from_user call Static analysis is warning that the sizeof being used is should be of *data->tags[i] and not data->tags[i]. Although these are the same size on 64 bit systems it is not a portable assumption to assume this is true for all cases. Fix this by using a temporary pointer tag_slot to make the code a clearer. Addresses-Coverity: ("Sizeof not portable") Fixes: d878c81610e1 ("io_uring: hide rsrc tag copy into generic helpers") Signed-off-by: Colin Ian King Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20210615130011.57387-1-colin.king@canonical.com Signed-off-by: Jens Axboe commit a4b0b97aace09716a635e1a64c7e54e51f4a0f51 Author: Wan Jiabing Date: Tue Jun 15 19:44:01 2021 +0800 drm: display: Fix duplicate field initialization in dcn31 Fix the following coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c:917:56-57: pstate_enabled: first occurrence line 935, second occurrence line 937 Reviewed-by: Rodrigo Siqueira Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit a7b2451d31cfa2e8aeccf3b35612ce33f02371fc Author: Amber Lin Date: Mon Jun 7 14:46:21 2021 -0400 drm/amdkfd: Fix circular lock in nocpsch path Calling free_mqd inside of destroy_queue_nocpsch_locked can cause a circular lock. destroy_queue_nocpsch_locked is called under a DQM lock, which is taken in MMU notifiers, potentially in FS reclaim context. Taking another lock, which is BO reservation lock from free_mqd, while causing an FS reclaim inside the DQM lock creates a problematic circular lock dependency. Therefore move free_mqd out of destroy_queue_nocpsch_locked and call it after unlocking DQM. Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit d760895d55cd7a2d3814fbd581b7ca29f1f73205 Author: Felix Kuehling Date: Mon Jun 14 17:59:34 2021 -0400 drm/amdgpu: Use spinlock_irqsave for pasid_lock This should fix a kernel LOCKDEP warning on Vega10: [ 149.416604] ================================ [ 149.420877] WARNING: inconsistent lock state [ 149.425152] 5.11.0-kfd-fkuehlin #517 Not tainted [ 149.429770] -------------------------------- [ 149.434053] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. [ 149.440059] swapper/3/0 [HC1[1]:SC0[0]:HE0:SE1] takes: [ 149.445198] ffff9ac80e005d68 (&adev->vm_manager.pasid_lock){?.+.}-{2:2}, at: amdgpu_vm_get_task_info+0x25/0x90 [amdgpu] [ 149.456252] {HARDIRQ-ON-W} state was registered at: [ 149.461136] lock_acquire+0x242/0x390 [ 149.464895] _raw_spin_lock+0x2c/0x40 [ 149.468647] amdgpu_vm_handle_fault+0x44/0x380 [amdgpu] [ 149.474187] gmc_v9_0_process_interrupt+0xa8/0x410 [amdgpu] ... Signed-off-by: Felix Kuehling Reviewed-by: Christian König Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 1ba7b24ba68e7c04b1e67d986d02b966b4eaaaa0 Author: Yifan Zhang Date: Thu Jun 10 10:10:07 2021 +0800 drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell. If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 631003101c516ea29a74aee59666708857b9a805 Author: Yifan Zhang Date: Thu Jun 10 09:55:01 2021 +0800 drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue. If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e18aaea733da9c8cb43b21336610ec9796036d3e Author: Nirmoy Das Date: Tue Jun 15 11:05:08 2021 +0200 drm/amdgpu: move shadow_list to amdgpu_bo_vm Move shadow_list to struct amdgpu_bo_vm as shadow BOs are part of PT/PD BOs. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 23e24fbb7695d42fa90afefe08c06f29b47548ee Author: Nirmoy Das Date: Mon Jun 14 19:49:50 2021 +0200 drm/amdgpu: parameterize ttm BO destroy callback Make provision to pass different ttm BO destroy callback while creating a amdgpu_bo. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 391629bdfcb9014e8bcd1be216b59854877e70ed Author: Nirmoy Das Date: Tue Jun 15 17:23:11 2021 -0400 drm/amdgpu: remove amdgpu_vm_pt Page table entries are now in embedded in VM BO, so we do not need struct amdgpu_vm_pt. This patch replaces struct amdgpu_vm_pt with struct amdgpu_vm_bo_base. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ed4454c3844b06f00b89102cf3fba40fc73139bd Author: Hawking Zhang Date: Sat Jun 12 00:51:22 2021 +0800 drm/amdgpu: correct psp ucode arrary start address For ASICs that need to load sys_drv_aux and sos_aux, the sys_start_addr is not the start address of psp ucode array because the sys_drv_aux and sos_aux actaully located at the end of the ucode array, instead, the psp ucode arrary start address should be sos_hdr + sos_hdr_offset. Signed-off-by: Hawking Zhang Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 5a75ea56e36937d7d01545c53fae91e234ea0de6 Author: Felix Kuehling Date: Thu Jun 10 18:39:56 2021 -0400 drm/amdkfd: Disable SVM per GPU, not per process When some GPUs don't support SVM, don't disabe it for the entire process. That would be inconsistent with the information the process got from the topology, which indicates SVM support per GPU. Instead disable SVM support only for the unsupported GPUs. This is done by checking any per-device attributes against the bitmap of supported GPUs. Also use the supported GPU bitmap to initialize access bitmaps for new SVM address ranges. Don't handle recoverable page faults from unsupported GPUs. (I don't think there will be unsupported GPUs that can generate recoverable page faults. But better safe than sorry.) Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit d0414a834c0d6c92c9a6db504e196831d118ab54 Author: Wesley Chalmers Date: Tue Jun 8 14:11:10 2021 -0400 drm/amd/display: Extend AUX timeout for DP initial reads [WHY] DP LL Compliance tests require that the first DPCD transactions after a hotplug have a timeout interval of 3.2 ms. In cases where LTTPR is disabled, this means that the first reads from DP_SET_POWER and DP_DPCD_REV must have an extended timeout. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 78ebca321999699f30ea19029726d1a3908b395f Author: Wesley Chalmers Date: Thu May 6 17:43:42 2021 -0400 drm/amd/display: Cover edge-case when changing DISPCLK WDIVIDER [WHY] When changing the DISPCLK_WDIVIDER value from 126 to 127, the change in clock rate is too great for the FIFOs to handle. This can cause visible corruption during clock change. HW has handed down this register sequence to fix the issue. [HOW] The sequence, from HW: a. 127 -> 126 Read DIG_FIFO_CAL_AVERAGE_LEVEL FIFO level N = DIG_FIFO_CAL_AVERAGE_LEVEL / 4 Set DCCG_FIFO_ERRDET_OVR_EN = 1 Write 1 to OTGx_DROP_PIXEL for (N-4) times Set DCCG_FIFO_ERRDET_OVR_EN = 0 Write DENTIST_DISPCLK_RDIVIDER = 126 Because of frequency stepping, sequence a can be executed to change the divider from 127 to any other divider value. b. 126 -> 127 Read DIG_FIFO_CAL_AVERAGE_LEVEL FIFO level N = DIG_FIFO_CAL_AVERAGE_LEVEL / 4 Set DCCG_FIFO_ERRDET_OVR_EN = 1 Write 1 to OTGx_ADD_PIXEL for (12-N) times Set DCCG_FIFO_ERRDET_OVR_EN = 0 Write DENTIST_DISPCLK_RDIVIDER = 127 Because of frequency stepping, divider must first be set from any other divider value to 126 before executing sequence b. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a659f2fdf8b9b186c9324e05baa9e2835d47c7d2 Author: Wesley Chalmers Date: Thu May 6 13:22:19 2021 -0400 drm/amd/display: Add interface to get Calibrated Avg Level from FIFO [WHY] Hardware has handed down a new sequence requiring the value of this register be read from clk_mgr. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9cf9498f668d4c78616ebd2fe2e5f3850b189c5b Author: Wesley Chalmers Date: Thu Apr 8 15:51:11 2021 -0400 drm/amd/display: Partition DPCD address space and break up transactions [WHY] SCR for DP 2.0 spec says that multiple LTTPRs must not be accessed in a single AUX transaction. There may be other places in future where breaking up AUX accesses is necessary. [HOW] Partition the entire DPCD address space into blocks. When an incoming AUX request spans multiple blocks, break up the request into multiple requests. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 95ad72f4ade3db645279dae3bf4ed456ac806a1c Author: Wesley Chalmers Date: Mon Mar 29 13:36:35 2021 -0400 drm/amd/display: Do not count I2C DEFERs with AUX DEFERs [WHY] DP 2.0 SCR specifies that "A DPTX shall distinguish I2C_DEFER|AUX_ACK from AUX_DEFER. AUX retries due to I2C_DEFER are not counted as part of minimum 7 retires (sic) upon AUX_DEFER’s" Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1d5b15f77e3567d2497dad69c99a307dd6379c8f Author: Wesley Chalmers Date: Mon Mar 29 13:27:47 2021 -0400 drm/amd/display: 7 retries + 50 ms timeout on AUX DEFER [WHY] DP 2.0 SCR specifies that TX devices must retry at least 7 times when receiving an AUX DEFER reply from RX. In addition, the specification states that the TX shall not retry indefinitely, and gives a suggestive timeout interval of 50ms. [HOW] Keep retrying until both 7 or more retries have been made, and the 50ms interval has passed. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d307ce4b6c8fdc0fecf9f316d87c7f82fc82d83e Author: Wesley Chalmers Date: Tue Mar 30 12:56:13 2021 -0400 drm/amd/display: Rename constant [WHY] 7 is the minimum number of retries TX must attempt on an AUX DEFER, not the maximum. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 30adeee52d1ebadd8e4e594a54c7cf77250b91db Author: Wesley Chalmers Date: Thu Apr 1 12:23:06 2021 -0400 drm/amd/display: Enforce DPCD Address ranges [WHY] Some DPCD addresses, notably LTTPR Capability registers, are expected to be read all together in a single DPCD transaction. Rather than force callers to read registers they don't need, we want to quietly extend the addresses read, and only return back the values the caller asked for. This does not affect DPCD writes. [HOW] Create an additional layer above AUX to perform 'checked' DPCD transactions. Iterate through an array of DPCD address ranges that are marked as being contiguous. If a requested read falls within one of those ranges, extend the read to include the entire range. After DPCD has been queried, copy the requested bytes into the caller's data buffer, and deallocate all resources used. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 788797c793788415426ef7249ca81c66bbfb9f14 Author: Wesley Chalmers Date: Wed May 5 15:17:48 2021 -0400 drm/amd/display: Improve logic for is_lttpr_present [WHY] DP specifies that an LTTPR device is only present if PHY_REPEATER_CNT is 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, or 0x01. All other values should be considered no LTTPRs present. [HOW] Function dp_convert_to_count already does this check. Use it to determine if PHY_REPEATER_CNT is a valid LTTPR count. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2b7605d73b97e2fa28e0817242e66ca968d2a7cb Author: Wesley Chalmers Date: Tue Mar 30 18:30:13 2021 -0400 drm/amd/display: Always write repeater mode regardless of LTTPR [WHY] SCR for DP2.0 requires that LT be performed with PHY_REPEATER_MODE programmed to 0x55 (Transparent) whenever PHY_REPEATER_CNT is any value other than 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, or 0x01. [HOW] Write Non-Transparent (0xAA) to PHY_REPEATER_MODE when LTTPRs detected and Non-Transparent is requested. Write Transparent in all other cases. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ac62875e9b6bfd3c8be91501dbb71ee8cbe1ce84 Author: Wesley Chalmers Date: Wed Mar 24 15:03:21 2021 -0400 drm/amd/display: Set LTTPR Transparent Mode after read link cap [WHY] SCR for DP 2.0 Spec states that a DPTX shall put LTTPRs into Transparent mode after reading LTTPR Capability registers on HPD. The wording of the SCR is somewhat ambiguous as to whether Transparent mode must be set explicity, or is implicitly set on LTTPR capability read. Explicitly setting Transparent mode after LTTPR capability read should cover all cases. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c5bc8c1bd4c72dcbc7c4e4698b41ff839f219280 Author: Wesley Chalmers Date: Fri Apr 16 17:21:28 2021 -0400 drm/amd/display: Read LTTPR caps first on bootup [WHY] SCR for DP 2.0 requires that LTTPR caps be read first on hotplug. For the sake of consistency, this should also be the case on bootup. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ee9b1992f1fdf3726af010cd771b12205e0ce346 Author: Wesley Chalmers Date: Fri May 14 15:06:30 2021 -0400 drm/amd/display: Move LTTPR cap read into its own function [WHY] We want LTTPR capabilities to be readable from more places than just retrieve_link_cap Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0abda67419f76d5af4423ab15ee24cff0e911abd Author: Wesley Chalmers Date: Wed Mar 24 13:28:32 2021 -0400 drm/amd/display: Read LTTPR caps first on hotplug [WHY] A new SCR for the DP2.0 spec requires that LTTPR caps be the first thing read from DPCD upon hotplug. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f4594cd1fa556609450e0ed5664a0adf69ab0b35 Author: Roman Li Date: Fri Jun 4 14:34:24 2021 -0400 drm/amd/display: move psr dm interface to separate files [Why] Improve the maintain/read abilities of dm code. [How] Create amdgpu_dm_psr.c/h files. Move psr function from amdgpu_dm.c Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b99c27e6aa3d280768b1dcc21445d6bbabe2f381 Author: Aric Cyr Date: Sun Jun 6 15:45:32 2021 -0400 drm/amd/display: 3.2.140 This version brings along following fixed: - LTTPR improvements - Backlight improvements - eDP hotplug detection Signed-off-by: Aric Cyr Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f00394023cb32f622de24f20f890391ef3dac66c Author: Anthony Koo Date: Sat Jun 5 15:13:18 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.70 Signed-off-by: Anthony Koo Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f7115198aa09e70b9dd98bec8fae643034b82576 Author: David Galiffi Date: Wed Apr 28 22:53:37 2021 -0400 drm/amd/display: Updated variable name. [Why] Fixed spelling error. [How] Changed "currnet_setting" to "current_setting". Signed-off-by: David Galiffi Reviewed-by: Wesley Chalmers Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 231f1625d9d75d017cd3c81c2c23a9aed336a22d Author: Po-Ting Chen Date: Thu Jun 3 18:01:02 2021 +0800 drm/amd/display: Change swizzle visual confirm reference pipe [Why] To change the swizzle visual confirm reference pipe from top pipe to bottom pipe due to bottom pipe information would be more important for multiple overlay case. Signed-off-by: Po-Ting Chen Reviewed-by: Anthony Koo Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8a58e25b8b6572927ac2b3333c071560fbf7386c Author: Wenjing Liu Date: Fri May 14 14:39:55 2021 -0400 drm/amd/display: dp mst detection code refactor [why] Move mst start top mgr in dc_link_detect layer. Remove unused same_dpcd variable. Move PEAK_FACTOR_X1000 and LINK_TRAINING_MAX_VERIFY_RETRY to the proper header for defining dc link internal constant. Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a161f8cb677f21dda3beaf2eb07e93a3ea878c6b Author: Josip Pavic Date: Mon May 31 10:30:58 2021 -0400 drm/amd/display: tune backlight ramping profiles [Why & How] Tune backlight ramping profiles for each Vari-Bright level to suit customer preferences Signed-off-by: Josip Pavic Reviewed-by: Anthony Koo Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5ab991ba3429a1f59268f6d54ecdaf0fc3446649 Author: Yi-Ling Chen Date: Tue Jun 1 03:21:47 2021 +0800 drm/amd/display: add config option for eDP hotplug detection [Why] Some custom platforms use eDP hotplug events to notify panel capability changes that should be reported [How] Add a DC config option that unblocks eDP hotplug events Signed-off-by: Yi-Ling Chen Reviewed-by: Aric Cyr Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2631ac1ac328189031d1aefbbd4929050f72fb23 Author: Ashley Thomas Date: Mon May 17 18:34:45 2021 -0700 drm/amd/display: add DMUB registers to crash dump diagnostic data. [WHY] Ability to triage DMCUB is improved with availability of certain dmub registers not currently captured in crash dump diagnostic data. [HOW] Add dmub registers to diagnostic data collection. Thanks Nicholas Kazlauskas for awesome input on this! Signed-off-by: Ashley Thomas Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit eb945257fc6e48da1d744b493ad6e974a18c2405 Author: Dmytro Laktyushkin Date: Tue Jun 1 09:20:35 2021 -0400 drm/amd/display: Remove unnecessary blank lines cleanup Signed-off-by: Dmytro Laktyushkin Reviewed-by: Aric Cyr Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 63f6e01237257e7226efc5087f3f0b525d320f54 Author: Jonathan Kim Date: Fri Jun 11 13:36:34 2021 -0400 drm/amdkfd: fix circular locking on get_wave_state get_wave_state acquires the mmap_lock on copy_to_user but so do mmu_notifiers. mmu_notifiers allows dqm locking so do get_wave_state outside the dqm_lock to prevent circular locking. v2: squash in unused variable removal. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0bc14d4ad3a7646052b98e9e332a514167a7052f Author: Bhupesh Sharma Date: Tue Jun 15 13:15:37 2021 +0530 dt-bindings: arm: qcom: Add compatible for SA8155p-adp board SA8155p-adp board is based on Qualcomm Snapdragon sa8155p SoC which is similar to the sm8150 SoC. Add support for the same in dt-bindings. Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210615074543.26700-5-bhupesh.sharma@linaro.org Signed-off-by: Bjorn Andersson commit 1534fac32fc6a4320c54b2007e2f5b6f9a8ff336 Author: Bhupesh Sharma Date: Tue Jun 15 13:15:36 2021 +0530 dt-bindings: arm: qcom: Add compatible for sm8150-mtp board sm8150-mtp board is based on Qualcomm Snapdragon sm8150 SoC. Add support for the same in dt-bindings. Signed-off-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210615074543.26700-4-bhupesh.sharma@linaro.org Signed-off-by: Bjorn Andersson commit 3b62a62429b26709895846180c93f0c21547f7ac Author: Max Gurtovoy Date: Tue May 18 22:21:33 2021 +0300 vfio/platform: remove unneeded parent_module attribute The vfio core driver is now taking refcount on the provider drivers, remove redundant parent_module attribute from vfio_platform_device structure. Signed-off-by: Max Gurtovoy Acked-by: Eric Auger Link: https://lore.kernel.org/r/20210518192133.59195-3-mgurtovoy@nvidia.com Signed-off-by: Alex Williamson commit 9dcf01d95721261844d8c07c142efc143f7d38e3 Author: Max Gurtovoy Date: Tue May 18 22:21:32 2021 +0300 vfio: centralize module refcount in subsystem layer Remove code duplication and move module refcounting to the subsystem module. Signed-off-by: Max Gurtovoy Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20210518192133.59195-2-mgurtovoy@nvidia.com Signed-off-by: Alex Williamson commit 293128b1ef5ae2cfa7403d54e183fe689ed5d303 Author: Mikulas Patocka Date: Tue Jun 15 14:17:35 2021 -0400 dm writecache: have ssd writeback wait if the kcopyd workqueue is busy Make dm-writecache wait if the kcopyd workqueue is busy (as will happen if waiting for page allocation or inside submit_bio). This change improves performance of "mkfs.ext2" by approximately 20% on one testbed. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit a078d981f8632f7a919094c000b061593287e056 Author: Lorenzo Bianconi Date: Tue Jun 15 15:27:41 2021 +0200 net: ti: add pp skb recycling support As already done for mvneta and mvpp2, enable skb recycling for ti ethernet drivers ti driver on net-next: ---------------------- [perf top] 47.15% [kernel] [k] _raw_spin_unlock_irqrestore 11.77% [kernel] [k] __cpdma_chan_free 3.16% [kernel] [k] ___bpf_prog_run 2.52% [kernel] [k] cpsw_rx_vlan_encap 2.34% [kernel] [k] __netif_receive_skb_core 2.27% [kernel] [k] free_unref_page 2.26% [kernel] [k] kmem_cache_free 2.24% [kernel] [k] kmem_cache_alloc 1.69% [kernel] [k] __softirqentry_text_start 1.61% [kernel] [k] cpsw_rx_handler 1.19% [kernel] [k] page_pool_release_page 1.19% [kernel] [k] clear_bits_ll 1.15% [kernel] [k] page_frag_free 1.06% [kernel] [k] __dma_page_dev_to_cpu 0.99% [kernel] [k] memset 0.94% [kernel] [k] __alloc_pages_bulk 0.92% [kernel] [k] kfree_skb 0.85% [kernel] [k] packet_rcv 0.78% [kernel] [k] page_address 0.75% [kernel] [k] v7_dma_inv_range 0.71% [kernel] [k] __lock_text_start [iperf3 tcp] [ 5] 0.00-10.00 sec 873 MBytes 732 Mbits/sec 0 sender [ 5] 0.00-10.01 sec 866 MBytes 726 Mbits/sec receiver ti + skb recycling: ------------------- [perf top] 40.58% [kernel] [k] _raw_spin_unlock_irqrestore 16.18% [kernel] [k] __softirqentry_text_start 10.33% [kernel] [k] __cpdma_chan_free 2.62% [kernel] [k] ___bpf_prog_run 2.05% [kernel] [k] cpsw_rx_vlan_encap 2.00% [kernel] [k] kmem_cache_alloc 1.86% [kernel] [k] __netif_receive_skb_core 1.80% [kernel] [k] kmem_cache_free 1.63% [kernel] [k] cpsw_rx_handler 1.12% [kernel] [k] cpsw_rx_mq_poll 1.11% [kernel] [k] page_pool_put_page 1.04% [kernel] [k] _raw_spin_unlock 0.97% [kernel] [k] clear_bits_ll 0.90% [kernel] [k] packet_rcv 0.88% [kernel] [k] __dma_page_dev_to_cpu 0.85% [kernel] [k] kfree_skb 0.80% [kernel] [k] memset 0.71% [kernel] [k] __lock_text_start 0.66% [kernel] [k] v7_dma_inv_range 0.64% [kernel] [k] gen_pool_free_owner [iperf3 tcp] [ 5] 0.00-10.00 sec 884 MBytes 742 Mbits/sec 0 sender [ 5] 0.00-10.01 sec 878 MBytes 735 Mbits/sec receiver Tested-by: Grygorii Strashko Reviewed-by: Grygorii Strashko Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 925a56b2c085a7c6f5c741c8516e21c3aa6134b4 Author: M Chetan Kumar Date: Tue Jun 15 18:38:22 2021 +0530 net: wwan: iosm: Fix htmldocs warnings Fixes .rst file warnings seen on linux-next build. Fixes: f7af616c632e ("net: iosm: infrastructure") Reported-by: Stephen Rothwell Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit b472191f0a0ce6d98d61e939118cfd6ad0ff91e7 Author: Will Deacon Date: Tue Jun 15 19:35:46 2021 +0100 iommu/arm-smmu: Check smmu->impl pointer before dereferencing Commit 0d97174aeadf ("iommu/arm-smmu: Implement ->probe_finalize()") added a new optional ->probe_finalize callback to 'struct arm_smmu_impl' but neglected to check that 'smmu->impl' is present prior to checking if the new callback is present. Add the missing check, which avoids dereferencing NULL when probing an SMMU which doesn't require any implementation-specific callbacks: | Unable to handle kernel NULL pointer dereference at virtual address | 0000000000000070 | | Call trace: | arm_smmu_probe_finalize+0x14/0x48 | of_iommu_configure+0xe4/0x1b8 | of_dma_configure_id+0xf8/0x2d8 | pci_dma_configure+0x44/0x88 | really_probe+0xc0/0x3c0 Fixes: 0d97174aeadf ("iommu/arm-smmu: Implement ->probe_finalize()") Reported-by: Marek Szyprowski Signed-off-by: Will Deacon commit affa909571b0036b5d46aeff940ad4358f4abe1d Author: Zhen Lei Date: Wed Jun 9 20:54:38 2021 +0800 iommu/arm-smmu-v3: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210609125438.14369-1-thunder.leizhen@huawei.com Signed-off-by: Will Deacon commit f25dcde974396a504af7ed795a3106dcf3ee7144 Author: Colin Ian King Date: Tue Jun 15 11:14:57 2021 +0100 octeontx2-pf: Fix spelling mistake "morethan" -> "more than" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 11b57faf951cd3a570e3d9e463fc7c41023bc8c6 Author: Colin Ian King Date: Tue Jun 15 10:05:16 2021 +0100 net: dsa: b53: remove redundant null check on dev The pointer dev can never be null, the null check is redundant and can be removed. Cleans up a static analysis warning that pointer priv is dereferencing dev before dev is being null checked. Addresses-Coverity: ("Dereference before null check") Signed-off-by: Colin Ian King Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 848ca9182a7d25bb54955c3aab9a3a2742bf9678 Author: Jussi Maki Date: Tue Jun 15 08:54:15 2021 +0000 net: bonding: Use per-cpu rr_tx_counter The round-robin rr_tx_counter was shared across CPUs leading to significant cache thrashing at high packet rates. This patch switches the round-robin packet counter to use a per-cpu variable to decide the destination slave. On a test with 2x100Gbit ICE nic with pktgen_sample_04_many_flows.sh (-s 64 -t 32) the tx rate was 19.6Mpps before and 22.3Mpps after this patch. "perf top -e cache_misses" before: 12.31% [bonding] [k] bond_xmit_roundrobin_slave_get 10.59% [sch_fq_codel] [k] fq_codel_dequeue 9.34% [kernel] [k] skb_release_data after: 15.42% [sch_fq_codel] [k] fq_codel_dequeue 10.06% [kernel] [k] __memset 9.12% [kernel] [k] skb_release_data Signed-off-by: Jussi Maki Signed-off-by: David S. Miller commit b8f6b0522c298ae9267bd6584e19b942a0636910 Author: Liu Shixin Date: Tue Jun 15 10:14:44 2021 +0800 netlabel: Fix memory leak in netlbl_mgmt_add_common Hulk Robot reported memory leak in netlbl_mgmt_add_common. The problem is non-freed map in case of netlbl_domhsh_add() failed. BUG: memory leak unreferenced object 0xffff888100ab7080 (size 96): comm "syz-executor537", pid 360, jiffies 4294862456 (age 22.678s) hex dump (first 32 bytes): 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................ backtrace: [<0000000008b40026>] netlbl_mgmt_add_common.isra.0+0xb2a/0x1b40 [<000000003be10950>] netlbl_mgmt_add+0x271/0x3c0 [<00000000c70487ed>] genl_family_rcv_msg_doit.isra.0+0x20e/0x320 [<000000001f2ff614>] genl_rcv_msg+0x2bf/0x4f0 [<0000000089045792>] netlink_rcv_skb+0x134/0x3d0 [<0000000020e96fdd>] genl_rcv+0x24/0x40 [<0000000042810c66>] netlink_unicast+0x4a0/0x6a0 [<000000002e1659f0>] netlink_sendmsg+0x789/0xc70 [<000000006e43415f>] sock_sendmsg+0x139/0x170 [<00000000680a73d7>] ____sys_sendmsg+0x658/0x7d0 [<0000000065cbb8af>] ___sys_sendmsg+0xf8/0x170 [<0000000019932b6c>] __sys_sendmsg+0xd3/0x190 [<00000000643ac172>] do_syscall_64+0x37/0x90 [<000000009b79d6dc>] entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 63c416887437 ("netlabel: Add network address selectors to the NetLabel/LSM domain mapping") Reported-by: Hulk Robot Signed-off-by: Liu Shixin Signed-off-by: David S. Miller commit f0c227c7df657a3470cd3ea03d51a71941d1e98f Merge: 08ab4d7441458 c36326d38d933 Author: David S. Miller Date: Tue Jun 15 11:14:21 2021 -0700 Merge tag 'mlx5-updates-2021-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-06-14 1) Trivial Lag refactroing in preparation for upcomming Single FDB lag feature - First 3 patches 2) Scalable IRQ distriburion for Sub-functions A subfunction (SF) is a lightweight function that has a parent PCI function (PF) on which it is deployed. Currently, mlx5 subfunction is sharing the IRQs (MSI-X) with their parent PCI function. Before this series the PF allocates enough IRQs to cover all the cores in a system, Newly created SFs will re-use all the IRQs that the PF has allocated for itself. Hence, the more SFs are created, there are more EQs per IRQs. Therefore, whenever we handle an interrupt, we need to pull all SFs EQs and PF EQs instead of PF EQs without SFs on the system. This leads to a hard impact on the performance of SFs and PF. For example, on machine with: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz with 56 cores. PCI Express 3 with BW of 126 Gb/s. ConnectX-5 Ex; EDR IB (100Gb/s) and 100GbE; dual-port QSFP28; PCIe4.0 x16. test case: iperf TX BW single CPU, affinity of app and IRQ are the same. PF only: no SFs on the system, 56 IRQs. SF (before), 250 SFs Sharing the same 56 IRQs . SF (now), 250 SFs + 255 avaiable IRQs for the NIC. (please see IRQ spread scheme below). application SF-IRQ channel BW(Gb/sec) interrupts/sec iperf TX affinity PF only cpu={0} cpu={0} cpu={0} 79 8200 SF (before) cpu={0} cpu={0} cpu={0} 51.3 (-35%) 9500 SF (now) cpu={0} cpu={0} cpu={0} 78 (-2%) 8200 command: $ taskset -c 0 iperf -c 11.1.1.1 -P 3 -i 6 -t 30 | grep SUM The different between the SF examples is that before this series we allocate num_cpus (56) IRQs, and all of them were shared among the PF and the SFs. And after this series, we allocate 255 IRQs, and we spread the SFs among the above IRQs. This have significantly decreased the load on each IRQ and the number of EQs per IRQ is down by 95% (251->11). In this patchset the solution proposed is to have a dedicated IRQ pool for SFs to use. the pool will allocate a large number of IRQs for SFs to grab from in order to minimize irq sharing between the different SFs. IRQs will not be requested from the OS until they are 1st requested by an SF consumer, and will be eventually released when the last SF consumer releases them. For the detailed IRQ spread and allocation scheme please see last patch: ("net/mlx5: Round-Robin EQs over IRQs") ==================== Signed-off-by: David S. Miller commit 08ab4d74414585bddb451d934b2eeddec9460909 Merge: ad5645d7b9d59 68fbff68dbea3 Author: David S. Miller Date: Tue Jun 15 11:11:05 2021 -0700 Merge branch 'occteontx2-rate-limit-offload' Subbaraya Sundeep says: ==================== octeontx2: Add ingress ratelimit offload This patchset adds ingress rate limiting hardware offload support for CN10K silicons. Police actions are added for TC matchall and flower filters. CN10K has ingress rate limiting feature where a receive queue is mapped to bandwidth profile and the profile is configured with rate and burst parameters by software. CN10K hardware supports three levels of ingress policing or ratelimiting. Multiple leaf profiles can point to a single mid level profile and multiple mid level profile can point to a single top level one. Only leaf level profiles are used for configuring rate limiting. Patch 1 adds the new bandwidth profile contexts in AF driver similar to other hardware contexts Patch 2 adds the debugfs changes to dump bandwidth profile contexts Patch 3 adds support for police action with TC matchall filter Patch 4 uses NL_SET_ERR_MSG_MOD for tc code Patch 5 adds support for police action with TC flower filter ==================== Signed-off-by: David S. Miller commit 68fbff68dbea35f9e6f7649dd22fce492a5aedac Author: Subbaraya Sundeep Date: Tue Jun 15 17:04:31 2021 +0530 octeontx2-pf: Add police action for TC flower Added police action for ingress TC flower hardware offload. With this rate limiting can be done per flow. Since rate limiting is tied to RQs in hardware the number of TC flower filters with action as police is limited to number of receive queues of the interface. Both bps and pps modes are supported. Examples to rate limit a flow: $ ethtool -K eth0 hw-tc-offload on $ tc qdisc add dev eth0 ingress $ tc filter add dev eth0 parent ffff: protocol ip \ flower ip_proto udp dst_port 80 action \ police rate 100Mbit burst 32Kbit $ tc filter add dev eth0 parent ffff: \ protocol ip flower dst_mac 5e:b2:34:ee:29:49 \ action police pkts_rate 5000 pkts_burst 2048 Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 5d2fdd86d517350c4fc903a5a69a562a4b0084e4 Author: Subbaraya Sundeep Date: Tue Jun 15 17:04:30 2021 +0530 octeontx2-pf: Use NL_SET_ERR_MSG_MOD for TC This patch modifies all netdev_err messages in tc code to NL_SET_ERR_MSG_MOD. NL_SET_ERR_MSG_MOD does not support format specifiers yet hence netdev_err messages with only strings are modified. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 2ca89a2c37527221edc549ffd3b65c6f8d9d4088 Author: Sunil Goutham Date: Tue Jun 15 17:04:29 2021 +0530 octeontx2-pf: TC_MATCHALL ingress ratelimiting offload Add TC_MATCHALL ingress ratelimiting offload support with POLICE action for entire traffic coming into the interface. Eg: To ratelimit ingress traffic to 100Mbps $ ethtool -K eth0 hw-tc-offload on $ tc qdisc add dev eth0 clsact $ tc filter add dev eth0 ingress matchall skip_sw \ action police rate 100Mbit burst 32Kbit To support this, a leaf level bandwidth profile is allocated and all RQs' contexts used by this interface are updated to point to it. And the leaf level bandwidth profile is configured with user specified rate and burst sizes. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit e7d8971763f3e7f12d9f9933faf6bd4912538d85 Author: Sunil Goutham Date: Tue Jun 15 17:04:28 2021 +0530 octeontx2-af: cn10k: Debugfs support for bandwidth profiles Added support for dumping current resource status of bandwidth profiles and contexts of allocated profiles via debugfs. Signed-off-by: Sunil Goutham Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit e8e095b3b37004a4048af69de60c9af2d2268a1d Author: Sunil Goutham Date: Tue Jun 15 17:04:27 2021 +0530 octeontx2-af: cn10k: Bandwidth profiles config support CN10K silicons supports hierarchial ingress packet ratelimiting. There are 3 levels of profilers supported leaf, mid and top. Ratelimiting is done after packet forwarding decision is taken and a NIXLF's RQ is identified to DMA the packet. RQ's context points to a leaf bandwidth profile which can be configured to achieve desired ratelimit. This patch adds logic for management of these bandwidth profiles ie profile alloc, free, context update etc. Signed-off-by: Sunil Goutham Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit 7957a3db01bf533a235a9ae9333150abbe6bde32 Author: Dong Aisheng Date: Tue May 18 18:14:05 2021 +0800 arm64: head: fix code comments in set_cpu_boot_mode_flag Up to here, the CPU boot mode can either be EL1 or EL2. Correct the code comments a bit. Signed-off-by: Dong Aisheng Acked-by: Catalin Marinas Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518101405.1048860-5-aisheng.dong@nxp.com Signed-off-by: Will Deacon commit f91671b5418bde81a7ce6bb2e9f3f4d41184b77c Author: Dong Aisheng Date: Tue May 18 18:14:04 2021 +0800 arm64: mm: drop unused __pa(__idmap_text_start) x5 is not used in the following map_memory. Instead, __pa(__idmap_text_start) is stored in x3 which is used later. Signed-off-by: Dong Aisheng Acked-by: Catalin Marinas Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518101405.1048860-4-aisheng.dong@nxp.com Signed-off-by: Will Deacon commit c70fe14f83ae0793a1119fa5741b19ab9ba411b2 Author: Dong Aisheng Date: Tue May 18 18:14:03 2021 +0800 arm64: mm: fix the count comments in compute_indices 'count - 1' is confusing and not comply with the real code running. 'count' actually represents the extra entries required, no need minus 1. Signed-off-by: Dong Aisheng Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210518101405.1048860-3-aisheng.dong@nxp.com Signed-off-by: Will Deacon commit 9163f01130304fab1f74683d7d44632da7bda637 Author: Anshuman Khandual Date: Tue Jun 15 15:02:58 2021 +0530 arm64/mm: Fix ttbr0 values stored in struct thread_info for software-pan When using CONFIG_ARM64_SW_TTBR0_PAN, a task's thread_info::ttbr0 must be the TTBR0_EL1 value used to run userspace. With 52-bit PAs, the PA must be packed into the TTBR using phys_to_ttbr(), but we forget to do this in some of the SW PAN code. Thus, if the value is installed into TTBR0_EL1 (as may happen in the uaccess routines), this could result in UNPREDICTABLE behaviour. Since hardware with 52-bit PA support almost certainly has HW PAN, which will be used in preference, this shouldn't be a practical issue, but let's fix this for consistency. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Fixes: 529c4b05a3cb ("arm64: handle 52-bit addresses in TTBR") Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/1623749578-11231-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit ad5645d7b9d59afde465859650bc4537f2506360 Merge: 5938b227caac7 6855d301e9d3d Author: David S. Miller Date: Tue Jun 15 11:03:17 2021 -0700 Merge branch 'pci200syn-cleanups' Peng Li says: ==================== net: pci200syn: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 6855d301e9d3da81d5f206dd2ddbaf9fb82f3736 Author: Peng Li Date: Tue Jun 15 21:54:23 2021 +0800 net: pci200syn: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 8e7680c10284e75e0b4122e05a6969a53f95c1cb Author: Peng Li Date: Tue Jun 15 21:54:22 2021 +0800 net: pci200syn: add necessary () to macro argument Macro argument 'card' may be better as '(card)' to avoid precedence issues. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 2b637446685f35b51b090fc3e5bc21e4fe8a21c1 Author: Peng Li Date: Tue Jun 15 21:54:21 2021 +0800 net: pci200syn: add some required spaces Add spaces required after that close brace '}'. Add spaces required before the open parenthesis '('. Add spaces required after that ','. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit b9282333efff96c19bc58a36f4929471de02b4f3 Author: Peng Li Date: Tue Jun 15 21:54:20 2021 +0800 net: pci200syn: replace comparison to NULL with "!card" According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: David S. Miller commit f9a03eae28507c07709c49ac283194be760e9511 Author: Peng Li Date: Tue Jun 15 21:54:19 2021 +0800 net: pci200syn: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit bbcb2840b00710d53d14947917e850c29f01812c Author: Peng Li Date: Tue Jun 15 21:54:18 2021 +0800 net: pci200syn: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 5938b227caac7ec036a63f6db499b7e22bea70b5 Merge: 0dca2c7404a93 2b28b711ac5d5 Author: David S. Miller Date: Tue Jun 15 10:55:18 2021 -0700 Merge branch 'z85230-cleanups' Peng Li says: ==================== net: z85230: clean up some code style issues This patchset clean up some code style issues. --- Change Log: V1 -> V2: 1, fix the comments from Andrew, add commit message to [patch 04/11] about remove volatile. ==================== Signed-off-by: David S. Miller commit 2b28b711ac5d58ed828e137ac53013f5008b0d47 Author: Peng Li Date: Tue Jun 15 10:43:45 2021 +0800 net: z85230: remove unnecessary out of memory message This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 00a580db9e2a0968e212a89a9db0b89dc4a97280 Author: Peng Li Date: Tue Jun 15 10:43:44 2021 +0800 net: z85230: fix the code style issue about open brace { This patch fixes the code style issue according to checkpatch.pl error: "ERROR: that open brace { should be on the previous line". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit b87a5cf65655d5ea078e21dfe6ca711badca251c Author: Peng Li Date: Tue Jun 15 10:43:43 2021 +0800 net: z85230: add some required spaces Add space required before the open parenthesis '(' and '{'. Add space required after that close brace '}' and ',' Add spaces required around that '=' , '&', '*', '|', '+', '/' and '-'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit a04544ffe889105ecb2c98c48ee593d7af1014ff Author: Peng Li Date: Tue Jun 15 10:43:42 2021 +0800 net: z85230: remove trailing whitespaces This patch removes trailing whitespaces. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 57b6de35cf327fd1ef95fdd42162e5d6555cd024 Author: Peng Li Date: Tue Jun 15 10:43:41 2021 +0800 net: z85230: fix the code style issue about "if..else.." According to the chackpatch.pl, else should follow close brace '}', braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c6c3ba4578e84367eda6aecd60e8a47d6d839d31 Author: Peng Li Date: Tue Jun 15 10:43:40 2021 +0800 net: z85230: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit b55932bcfabd6d9ec2835513668638dc45e7d3fb Author: Peng Li Date: Tue Jun 15 10:43:39 2021 +0800 net: z85230: replace comparison to NULL with "!skb" According to the chackpatch.pl, comparison to NULL could be written "!skb". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e07a1f9cbd4d660320ea437ad442c5b5ecbaf315 Author: Peng Li Date: Tue Jun 15 10:43:38 2021 +0800 net: z85230: fix the code style issue about EXPORT_SYMBOL(foo) According to the chackpatch.pl, EXPORT_SYMBOL(foo); should immediately follow its function/variable. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 61312d78e1d4286360427aeffbc0ea464fdb5299 Author: Peng Li Date: Tue Jun 15 10:43:37 2021 +0800 net: z85230: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 336bac5edaa731b20fd7e2a1551f27977a2284e9 Author: Peng Li Date: Tue Jun 15 10:43:36 2021 +0800 net: z85230: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 36ac0228626585ba718186b9db2e5986a198152c Author: Michael Walle Date: Mon May 3 17:56:51 2021 +0200 mtd: spi-nor: add initial sysfs support Add support to show the manufacturer, the partname and JEDEC identifier as well as to dump the SFDP table. Not all flashes list their SFDP table contents in their datasheet. So having that is useful. It might also be helpful in bug reports from users. Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Acked-by: Pratyush Yadav commit 65b6d89d45a77256b743f421d109d469baefa688 Author: Michael Walle Date: Mon May 3 17:56:50 2021 +0200 mtd: spi-nor: sfdp: save a copy of the SFDP data Due to possible mode switching to 8D-8D-8D, it might not be possible to read the SFDP after the initial probe. To be able to dump the SFDP via sysfs afterwards, make a complete copy of it. Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Tested-by: Heiko Thiery Reviewed-by: Pratyush Yadav commit 0dca2c7404a938cb10c85d0515cee40ed5348788 Author: Boris Sukholitko Date: Mon Jun 14 14:13:22 2021 +0300 net/sched: cls_flower: Remove match on n_proto The following flower filters fail to match packets: tc filter add dev eth0 ingress protocol 0x8864 flower \ action simple sdata hi64 tc filter add dev eth0 ingress protocol 802.1q flower \ vlan_ethtype 0x8864 action simple sdata "hi vlan" The protocol 0x8864 (ETH_P_PPP_SES) is a tunnel protocol. As such, it is being dissected by __skb_flow_dissect and it's internal protocol is being set as key->basic.n_proto. IOW, the existence of ETH_P_PPP_SES tunnel is transparent to the callers of __skb_flow_dissect. OTOH, in the filters above, cls_flower configures its key->basic.n_proto to the ETH_P_PPP_SES value configured by the user. Matching on this key fails because of __skb_flow_dissect "transparency" mentioned above. In the following, I would argue that the problem lies with cls_flower, unnessary attempting key->basic.n_proto match. There are 3 close places in fl_set_key in cls_flower setting up mask->basic.n_proto. They are (in reverse order of appearance in the code) due to: (a) No vlan is given: use TCA_FLOWER_KEY_ETH_TYPE parameter (b) One vlan tag is given: use TCA_FLOWER_KEY_VLAN_ETH_TYPE (c) Two vlans are given: use TCA_FLOWER_KEY_CVLAN_ETH_TYPE The match in case (a) is unneeded because flower has no its own eth_type parameter. It was removed by Jamal Hadi Salim in commit 488b41d020fb06428b90289f70a41210718f52b7 in iproute2. For TCA_FLOWER_KEY_ETH_TYPE the userspace uses the generic tc filter protocol field. Therefore the match for the case (a) is done by tc itself. The matches in cases (b), (c) are unneeded because the protocol will appear in and will be matched by flow_dissector_key_vlan.vlan_tpid. Therefore in the best case, key->basic.n_proto will try to repeat vlan key match again. The below patch removes mask->basic.n_proto setting and resets it to 0 in case (c). Signed-off-by: Boris Sukholitko Signed-off-by: David S. Miller commit a955318fe67ec0d962760b5ee58e74bffaf649b8 Author: Matteo Croce Date: Mon Jun 14 04:25:04 2021 +0200 stmmac: align RX buffers On RX an SKB is allocated and the received buffer is copied into it. But on some architectures, the memcpy() needs the source and destination buffers to have the same alignment to be efficient. This is not our case, because SKB data pointer is misaligned by two bytes to compensate the ethernet header. Align the RX buffer the same way as the SKB one, so the copy is faster. An iperf3 RX test gives a decent improvement on a RISC-V machine: before: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 733 MBytes 615 Mbits/sec 88 sender [ 5] 0.00-10.01 sec 730 MBytes 612 Mbits/sec receiver after: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 1.10 GBytes 942 Mbits/sec 0 sender [ 5] 0.00-10.00 sec 1.09 GBytes 940 Mbits/sec receiver And the memcpy() overhead during the RX drops dramatically. before: Overhead Shared O Symbol 43.35% [kernel] [k] memcpy 33.77% [kernel] [k] __asm_copy_to_user 3.64% [kernel] [k] sifive_l2_flush64_range after: Overhead Shared O Symbol 45.40% [kernel] [k] __asm_copy_to_user 28.09% [kernel] [k] memcpy 4.27% [kernel] [k] sifive_l2_flush64_range Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 6fac124455598fd39421577e51ebd5bb32693a9a Merge: afc3a0b4c408b 35f78d0277fc5 Author: Mark Brown Date: Tue Jun 15 18:16:31 2021 +0100 Merge series "ASoC: qdsp6: Add Quinary MI2S ports support" from Gabriel David : Various devices(such as the Motorola Moto G7 Power, codename ocean) use the Quinary MI2S ports for reproducing audio. Add support to them in kernel. Signed-off-by: Gabriel David Gabriel David (4): ASoC: q6afe: dt-bindings: Add QUIN_MI2S_RX/TX ASoC: qdsp6: q6afe: Add Quinary MI2S ports ASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports ASoC: qdsp6: q6routing: Add Quinary MI2S ports include/dt-bindings/sound/qcom,q6afe.h | 2 ++ sound/soc/qcom/qdsp6/q6afe-dai.c | 41 ++++++++++++++++++++++++++ sound/soc/qcom/qdsp6/q6afe.c | 8 +++++ sound/soc/qcom/qdsp6/q6afe.h | 2 +- sound/soc/qcom/qdsp6/q6routing.c | 11 +++++++ 5 files changed, 63 insertions(+), 1 deletion(-) --- As a warning, I'm currently the only tester of these patches. If that's gonna be a problem then I understand. -- 2.31.1 commit e73153ba0c7f6f392d6306ffeed733f9b39851ce Merge: 5dad6db1c45c2 cc2195fe536c2 Author: Olof Johansson Date: Tue Jun 15 09:55:17 2021 -0700 Merge tag 'arm-ffa-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers Arm Firmware Framework for ARMv8-A(FFA) interface driver The Arm FFA specification describes a software architecture to leverages the virtualization extension to isolate software images provided by an ecosystem of vendors from each other and describes interfaces that standardize communication between the various software images including communication between images in the Secure world and Normal world. Any Hypervisor could use the FFA interfaces to enable communication between VMs it manages. The Hypervisor a.k.a Partition managers in FFA terminology can assign system resources(Memory regions, Devices, CPU cycles) to the partitions and manage isolation amongst them. This is the initial and minimal support for the FFA interface to enable communication between secure partitions and the normal world OS. * tag 'arm-ffa-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Add support for MEM_* interfaces firmware: arm_ffa: Setup in-kernel users of FFA partitions firmware: arm_ffa: Add support for SMCCC as transport to FFA driver firmware: arm_ffa: Add initial Arm FFA driver support firmware: arm_ffa: Add initial FFA bus support for device enumeration arm64: smccc: Add support for SMCCCv1.2 extended input/output registers Link: https://lore.kernel.org/r/20210601095838.GA838783@bogus Signed-off-by: Olof Johansson commit 8d8538a497df552e359134ba7fee42df6e3c172f Merge: d7fe0d42b5f98 8f610169a2865 Author: Olof Johansson Date: Tue Jun 15 09:48:08 2021 -0700 Merge tag 'mstar-dt-5.14' of git://github.com/linux-chenxing/linux into arm/dt * tag 'mstar-dt-5.14' of git://github.com/linux-chenxing/linux: ARM: dts: mstar: Add watchdog device node Link: https://lore.kernel.org/r/CAFr9PXknSfSso6Uq0Fn_qJM5ZnJ4QK=YjJ32kKt4XYPrHK5x6w@mail.gmail.com Signed-off-by: Olof Johansson commit 8f610169a2865f6c6383d966ebbd6814c79d0116 Author: Romain Perier Date: Fri Jun 11 22:08:01 2021 +0200 ARM: dts: mstar: Add watchdog device node This adds the definition of both an oscillator at 12Mhz required by the the watchdog and the watchdog device node. Signed-off-by: Romain Perier Signed-off-by: Daniel Palmer commit 1f26622b791b6a1b346d1dfd9d04450e20af0f41 Merge: bbf29d3a2e49e c9d0bdef89a6c Author: Daniel Borkmann Date: Tue Jun 15 18:01:06 2021 +0200 Merge branch 'bpf-sock-migration' Kuniyuki Iwashima says: ==================== The SO_REUSEPORT option allows sockets to listen on the same port and to accept connections evenly. However, there is a defect in the current implementation [1]. When a SYN packet is received, the connection is tied to a listening socket. Accordingly, when the listener is closed, in-flight requests during the three-way handshake and child sockets in the accept queue are dropped even if other listeners on the same port could accept such connections. This situation can happen when various server management tools restart server (such as nginx) processes. For instance, when we change nginx configurations and restart it, it spins up new workers that respect the new configuration and closes all listeners on the old workers, resulting in the in-flight ACK of 3WHS is responded by RST. To avoid such a situation, users have to know deeply how the kernel handles SYN packets and implement connection draining by eBPF [2]: 1. Stop routing SYN packets to the listener by eBPF. 2. Wait for all timers to expire to complete requests 3. Accept connections until EAGAIN, then close the listener. or 1. Start counting SYN packets and accept syscalls using the eBPF map. 2. Stop routing SYN packets. 3. Accept connections up to the count, then close the listener. In either way, we cannot close a listener immediately. However, ideally, the application need not drain the not yet accepted sockets because 3WHS and tying a connection to a listener are just the kernel behaviour. The root cause is within the kernel, so the issue should be addressed in kernel space and should not be visible to user space. This patchset fixes it so that users need not take care of kernel implementation and connection draining. With this patchset, the kernel redistributes requests and connections from a listener to the others in the same reuseport group at/after close or shutdown syscalls. Although some software does connection draining, there are still merits in migration. For some security reasons, such as replacing TLS certificates, we may want to apply new settings as soon as possible and/or we may not be able to wait for connection draining. The sockets in the accept queue have not started application sessions yet. So, if we do not drain such sockets, they can be handled by the newer listeners and could have a longer lifetime. It is difficult to drain all connections in every case, but we can decrease such aborted connections by migration. In that sense, migration is always better than draining. Moreover, auto-migration simplifies user space logic and also works well in a case where we cannot modify and build a server program to implement the workaround. Note that the source and destination listeners MUST have the same settings at the socket API level; otherwise, applications may face inconsistency and cause errors. In such a case, we have to use the eBPF program to select a specific listener or to cancel migration. Special thanks to Martin KaFai Lau for bouncing ideas and exchanging code snippets along the way. Link: [1] The SO_REUSEPORT socket option https://lwn.net/Articles/542629/ [2] Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode https://lore.kernel.org/netdev/1458828813.10868.65.camel@edumazet-glaptop3.roam.corp.google.com/ Changelog: v8: * Make reuse const in reuseport_sock_index() * Don't use __reuseport_add_sock() in reuseport_alloc() * Change the arg of the second memcpy() in reuseport_grow() * Fix coding style to use goto in reuseport_alloc() * Keep sk_refcnt uninitialized in inet_reqsk_clone() * Initialize ireq_opt and ipv6_opt separately in reqsk_migrate_reset() [ This series does not include a stats patch suggested by Yuchung Cheng not to drop Acked-by/Reviewed-by tags and save reviewer's time. I will post the patch as a follow up after this series is merged. ] v7: https://lore.kernel.org/bpf/20210521182104.18273-1-kuniyu@amazon.co.jp/ * Prevent attaching/detaching a bpf prog via shutdowned socket * Fix typo in commit messages * Split selftest into subtests v6: https://lore.kernel.org/bpf/20210517002258.75019-1-kuniyu@amazon.co.jp/ * Change description in ip-sysctl.rst * Test IPPROTO_TCP before reading tfo_listener * Move reqsk_clone() to inet_connection_sock.c and rename to inet_reqsk_clone() * Pass req->rsk_listener to inet_csk_reqsk_queue_drop() and reqsk_queue_removed() in the migration path of receiving ACK * s/ARG_PTR_TO_SOCKET/PTR_TO_SOCKET/ in sk_reuseport_is_valid_access() * In selftest, use atomic ops to increment global vars, drop ACK by XDP, enable force fastopen, use "skel->bss" instead of "skel->data" v5: https://lore.kernel.org/bpf/20210510034433.52818-1-kuniyu@amazon.co.jp/ * Move initializtion of sk_node from 6th to 5th patch * Initialize sk_refcnt in reqsk_clone() * Modify some definitions in reqsk_timer_handler() * Validate in which path/state migration happens in selftest v4: https://lore.kernel.org/bpf/20210427034623.46528-1-kuniyu@amazon.co.jp/ * Make some functions and variables 'static' in selftest * Remove 'scalability' from the cover letter v3: https://lore.kernel.org/bpf/20210420154140.80034-1-kuniyu@amazon.co.jp/ * Add sysctl back for reuseport_grow() * Add helper functions to manage socks[] * Separate migration related logic into functions: reuseport_resurrect(), reuseport_stop_listen_sock(), reuseport_migrate_sock() * Clone request_sock to be migrated * Migrate request one by one * Pass child socket to eBPF prog v2: https://lore.kernel.org/netdev/20201207132456.65472-1-kuniyu@amazon.co.jp/ * Do not save closed sockets in socks[] * Revert 607904c357c61adf20b8fd18af765e501d61a385 * Extract inet_csk_reqsk_queue_migrate() into a single patch * Change the spin_lock order to avoid lockdep warning * Add static to __reuseport_select_sock * Use refcount_inc_not_zero() in reuseport_select_migrated_sock() * Set the default attach type in bpf_prog_load_check_attach() * Define new proto of BPF_FUNC_get_socket_cookie * Fix test to be compiled successfully * Update commit messages v1: https://lore.kernel.org/netdev/20201201144418.35045-1-kuniyu@amazon.co.jp/ * Remove the sysctl option * Enable migration if eBPF progam is not attached * Add expected_attach_type to check if eBPF program can migrate sockets * Add a field to tell migration type to eBPF program * Support BPF_FUNC_get_socket_cookie to get the cookie of sk * Allocate an empty skb if skb is NULL * Pass req_to_sk(req)->sk_hash because listener's hash is zero * Update commit messages and coverletter RFC: https://lore.kernel.org/netdev/20201117094023.3685-1-kuniyu@amazon.co.jp/ ==================== Signed-off-by: Daniel Borkmann commit c9d0bdef89a6c943e98c851e8cc10c9c534329e6 Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:24 2021 +0900 bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE. This patch adds a test for BPF_SK_REUSEPORT_SELECT_OR_MIGRATE and removes 'static' from settimeo() in network_helpers.c. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210612123224.12525-12-kuniyu@amazon.co.jp commit 50501271e773c51afe602918915c6beb62ac369f Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:23 2021 +0900 libbpf: Set expected_attach_type for BPF_PROG_TYPE_SK_REUSEPORT. This commit introduces a new section (sk_reuseport/migrate) and sets expected_attach_type to two each section in BPF_PROG_TYPE_SK_REUSEPORT program. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210612123224.12525-11-kuniyu@amazon.co.jp commit d5e4ddaeb6ab2c3c7fbb7b247a6d34bb0b18d87e Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:22 2021 +0900 bpf: Support socket migration by eBPF. This patch introduces a new bpf_attach_type for BPF_PROG_TYPE_SK_REUSEPORT to check if the attached eBPF program is capable of migrating sockets. When the eBPF program is attached, we run it for socket migration if the expected_attach_type is BPF_SK_REUSEPORT_SELECT_OR_MIGRATE or net.ipv4.tcp_migrate_req is enabled. Currently, the expected_attach_type is not enforced for the BPF_PROG_TYPE_SK_REUSEPORT type of program. Thus, this commit follows the earlier idea in the commit aac3fc320d94 ("bpf: Post-hooks for sys_bind") to fix up the zero expected_attach_type in bpf_prog_load_fixup_attach_type(). Moreover, this patch adds a new field (migrating_sk) to sk_reuseport_md to select a new listener based on the child socket. migrating_sk varies depending on if it is migrating a request in the accept queue or during 3WHS. - accept_queue : sock (ESTABLISHED/SYN_RECV) - 3WHS : request_sock (NEW_SYN_RECV) In the eBPF program, we can select a new listener by BPF_FUNC_sk_select_reuseport(). Also, we can cancel migration by returning SK_DROP. This feature is useful when listeners have different settings at the socket API level or when we want to free resources as soon as possible. - SK_PASS with selected_sk, select it as a new listener - SK_PASS with selected_sk NULL, fallbacks to the random selection - SK_DROP, cancel the migration. There is a noteworthy point. We select a listening socket in three places, but we do not have struct skb at closing a listener or retransmitting a SYN+ACK. On the other hand, some helper functions do not expect skb is NULL (e.g. skb_header_pointer() in BPF_FUNC_skb_load_bytes(), skb_tail_pointer() in BPF_FUNC_skb_load_bytes_relative()). So we allocate an empty skb temporarily before running the eBPF program. Suggested-by: Martin KaFai Lau Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/netdev/20201123003828.xjpjdtk4ygl6tg6h@kafai-mbp.dhcp.thefacebook.com/ Link: https://lore.kernel.org/netdev/20201203042402.6cskdlit5f3mw4ru@kafai-mbp.dhcp.thefacebook.com/ Link: https://lore.kernel.org/netdev/20201209030903.hhow5r53l6fmozjn@kafai-mbp.dhcp.thefacebook.com/ Link: https://lore.kernel.org/bpf/20210612123224.12525-10-kuniyu@amazon.co.jp commit e061047684af63f2d4f1338ec73140f6e29eb59f Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:21 2021 +0900 bpf: Support BPF_FUNC_get_socket_cookie() for BPF_PROG_TYPE_SK_REUSEPORT. We will call sock_reuseport.prog for socket migration in the next commit, so the eBPF program has to know which listener is closing to select a new listener. We can currently get a unique ID of each listener in the userspace by calling bpf_map_lookup_elem() for BPF_MAP_TYPE_REUSEPORT_SOCKARRAY map. This patch makes the pointer of sk available in sk_reuseport_md so that we can get the ID by BPF_FUNC_get_socket_cookie() in the eBPF program. Suggested-by: Martin KaFai Lau Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/netdev/20201119001154.kapwihc2plp4f7zc@kafai-mbp.dhcp.thefacebook.com/ Link: https://lore.kernel.org/bpf/20210612123224.12525-9-kuniyu@amazon.co.jp commit d4f2c86b2b7e2e606e0868b38c8c6c49cc193a8e Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:20 2021 +0900 tcp: Migrate TCP_NEW_SYN_RECV requests at receiving the final ACK. This patch also changes the code to call reuseport_migrate_sock() and inet_reqsk_clone(), but unlike the other cases, we do not call inet_reqsk_clone() right after reuseport_migrate_sock(). Currently, in the receive path for TCP_NEW_SYN_RECV sockets, its listener has three kinds of refcnt: (A) for listener itself (B) carried by reuqest_sock (C) sock_hold() in tcp_v[46]_rcv() While processing the req, (A) may disappear by close(listener). Also, (B) can disappear by accept(listener) once we put the req into the accept queue. So, we have to hold another refcnt (C) for the listener to prevent use-after-free. For socket migration, we call reuseport_migrate_sock() to select a listener with (A) and to increment the new listener's refcnt in tcp_v[46]_rcv(). This refcnt corresponds to (C) and is cleaned up later in tcp_v[46]_rcv(). Thus we have to take another refcnt (B) for the newly cloned request_sock. In inet_csk_complete_hashdance(), we hold the count (B), clone the req, and try to put the new req into the accept queue. By migrating req after winning the "own_req" race, we can avoid such a worst situation: CPU 1 looks up req1 CPU 2 looks up req1, unhashes it, then CPU 1 loses the race CPU 3 looks up req2, unhashes it, then CPU 2 loses the race ... Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210612123224.12525-8-kuniyu@amazon.co.jp commit c905dee62232db583b50fe214080b98db623151e Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:19 2021 +0900 tcp: Migrate TCP_NEW_SYN_RECV requests at retransmitting SYN+ACKs. As with the preceding patch, this patch changes reqsk_timer_handler() to call reuseport_migrate_sock() and inet_reqsk_clone() to migrate in-flight requests at retransmitting SYN+ACKs. If we can select a new listener and clone the request, we resume setting the SYN+ACK timer for the new req. If we can set the timer, we call inet_ehash_insert() to unhash the old req and put the new req into ehash. The noteworthy point here is that by unhashing the old req, another CPU processing it may lose the "own_req" race in tcp_v[46]_syn_recv_sock() and drop the final ACK packet. However, the new timer will recover this situation. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210612123224.12525-7-kuniyu@amazon.co.jp commit 54b92e84193749c9968aff2dd46e3b0f42643e18 Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:18 2021 +0900 tcp: Migrate TCP_ESTABLISHED/TCP_SYN_RECV sockets in accept queues. When we call close() or shutdown() for listening sockets, each child socket in the accept queue are freed at inet_csk_listen_stop(). If we can get a new listener by reuseport_migrate_sock() and clone the request by inet_reqsk_clone(), we try to add it into the new listener's accept queue by inet_csk_reqsk_queue_add(). If it fails, we have to call __reqsk_free() to call sock_put() for its listener and free the cloned request. After putting the full socket into ehash, tcp_v[46]_syn_recv_sock() sets NULL to ireq_opt/pktopts in struct inet_request_sock, but ipv6_opt can be non-NULL. So, we have to set NULL to ipv6_opt of the old request to avoid double free. Note that we do not update req->rsk_listener and instead clone the req to migrate because another path may reference the original request. If we protected it by RCU, we would need to add rcu_read_lock() in many places. Suggested-by: Martin KaFai Lau Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/netdev/20201209030903.hhow5r53l6fmozjn@kafai-mbp.dhcp.thefacebook.com/ Link: https://lore.kernel.org/bpf/20210612123224.12525-6-kuniyu@amazon.co.jp commit 1cd62c21572c1df6e7090ea4cabf4cf509616dbb Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:17 2021 +0900 tcp: Add reuseport_migrate_sock() to select a new listener. reuseport_migrate_sock() does the same check done in reuseport_listen_stop_sock(). If the reuseport group is capable of migration, reuseport_migrate_sock() selects a new listener by the child socket hash and increments the listener's sk_refcnt beforehand. Thus, if we fail in the migration, we have to decrement it later. We will support migration by eBPF in the later commits. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/bpf/20210612123224.12525-5-kuniyu@amazon.co.jp commit 333bb73f620e1a5f2e0b8df2c0d25300fab36d89 Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:16 2021 +0900 tcp: Keep TCP_CLOSE sockets in the reuseport group. When we close a listening socket, to migrate its connections to another listener in the same reuseport group, we have to handle two kinds of child sockets. One is that a listening socket has a reference to, and the other is not. The former is the TCP_ESTABLISHED/TCP_SYN_RECV sockets, and they are in the accept queue of their listening socket. So we can pop them out and push them into another listener's queue at close() or shutdown() syscalls. On the other hand, the latter, the TCP_NEW_SYN_RECV socket is during the three-way handshake and not in the accept queue. Thus, we cannot access such sockets at close() or shutdown() syscalls. Accordingly, we have to migrate immature sockets after their listening socket has been closed. Currently, if their listening socket has been closed, TCP_NEW_SYN_RECV sockets are freed at receiving the final ACK or retransmitting SYN+ACKs. At that time, if we could select a new listener from the same reuseport group, no connection would be aborted. However, we cannot do that because reuseport_detach_sock() sets NULL to sk_reuseport_cb and forbids access to the reuseport group from closed sockets. This patch allows TCP_CLOSE sockets to remain in the reuseport group and access it while any child socket references them. The point is that reuseport_detach_sock() was called twice from inet_unhash() and sk_destruct(). This patch replaces the first reuseport_detach_sock() with reuseport_stop_listen_sock(), which checks if the reuseport group is capable of migration. If capable, it decrements num_socks, moves the socket backwards in socks[] and increments num_closed_socks. When all connections are migrated, sk_destruct() calls reuseport_detach_sock() to remove the socket from socks[], decrement num_closed_socks, and set NULL to sk_reuseport_cb. By this change, closed or shutdowned sockets can keep sk_reuseport_cb. Consequently, calling listen() after shutdown() can cause EADDRINUSE or EBUSY in inet_csk_bind_conflict() or reuseport_add_sock() which expects such sockets not to have the reuseport group. Therefore, this patch also loosens such validation rules so that a socket can listen again if it has a reuseport group with num_closed_socks more than 0. When such sockets listen again, we handle them in reuseport_resurrect(). If there is an existing reuseport group (reuseport_add_sock() path), we move the socket from the old group to the new one and free the old one if necessary. If there is no existing group (reuseport_alloc() path), we allocate a new reuseport group, detach sk from the old one, and free it if necessary, not to break the current shutdown behaviour: - we cannot carry over the eBPF prog of shutdowned sockets - we cannot attach/detach an eBPF prog to/from listening sockets via shutdowned sockets Note that when the number of sockets gets over U16_MAX, we try to detach a closed socket randomly to make room for the new listening socket in reuseport_grow(). Signed-off-by: Kuniyuki Iwashima Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/bpf/20210612123224.12525-4-kuniyu@amazon.co.jp commit 5c040eaf5d1753aafe12989ca712175df0b9c436 Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:15 2021 +0900 tcp: Add num_closed_socks to struct sock_reuseport. As noted in the following commit, a closed listener has to hold the reference to the reuseport group for socket migration. This patch adds a field (num_closed_socks) to struct sock_reuseport to manage closed sockets within the same reuseport group. Moreover, this and the following commits introduce some helper functions to split socks[] into two sections and keep TCP_LISTEN and TCP_CLOSE sockets in each section. Like a double-ended queue, we will place TCP_LISTEN sockets from the front and TCP_CLOSE sockets from the end. TCP_LISTEN----------> <-------TCP_CLOSE +---+---+ --- +---+ --- +---+ --- +---+ | 0 | 1 | ... | i | ... | j | ... | k | +---+---+ --- +---+ --- +---+ --- +---+ i = num_socks - 1 j = max_socks - num_closed_socks k = max_socks - 1 This patch also extends reuseport_add_sock() and reuseport_grow() to support num_closed_socks. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210612123224.12525-3-kuniyu@amazon.co.jp commit f9ac779f881c2ec3d1cdcd7fa9d4f9442bf60e80 Author: Kuniyuki Iwashima Date: Sat Jun 12 21:32:14 2021 +0900 net: Introduce net.ipv4.tcp_migrate_req. This commit adds a new sysctl option: net.ipv4.tcp_migrate_req. If this option is enabled or eBPF program is attached, we will be able to migrate child sockets from a listener to another in the same reuseport group after close() or shutdown() syscalls. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Daniel Borkmann Reviewed-by: Benjamin Herrenschmidt Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210612123224.12525-2-kuniyu@amazon.co.jp commit c9811e379b211c67ba29fb09d6f644dd44cfcff2 Author: Kefeng Wang Date: Wed Jun 2 16:55:17 2021 +0800 riscv: Add mem kernel parameter support The memblock_enforce_memory_limit() could change the memblock range, so move the dram_end assignment after it in bootmem_init(), then support mem= cmdline. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit f39c2d1a188de8884d93229bbf1378ea1947a9c8 Merge: 314538041b563 8f78caa2264ec Author: Kalle Valo Date: Tue Jun 15 18:47:30 2021 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.14. Major changes: ath11k * support for WCN6855 PCI hardware wcn36xx * WoWLAN support with magic packets and GTK rekeying commit 60f86b9a1c0d81507133173ba3dcfc3edd4d89a5 Author: Huilong Deng Date: Tue Jun 15 23:55:30 2021 +0900 mcb: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Huilong Deng Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/fe520620eeddaa2ed8c669125f9b673c89d6b5a5.1623768541.git.johannes.thumshirn@wdc.com Signed-off-by: Greg Kroah-Hartman commit 293649307ef9abcd4f83f6dac4d4400dfd97c936 Author: Pawan Gupta Date: Mon Jun 14 14:14:25 2021 -0700 x86/tsx: Clear CPUID bits when TSX always force aborts As a result of TSX deprecation, some processors always abort TSX transactions by default after a microcode update. When TSX feature cannot be used it is better to hide it. Clear CPUID.RTM and CPUID.HLE bits when TSX transactions always abort. [ bp: Massage commit message and comments. ] Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Reviewed-by: Andi Kleen Reviewed-by: Tony Luck Tested-by: Neelima Krishnan Link: https://lkml.kernel.org/r/5209b3d72ffe5bd3cafdcc803f5b883f785329c3.1623704845.git-series.pawan.kumar.gupta@linux.intel.com commit 70d654ea3de937d7754c107bb8eeb20e30262c89 Author: Axel Lin Date: Tue Jun 15 21:29:34 2021 +0800 regulator: mt6315: Fix checking return value of devm_regmap_init_spmi_ext devm_regmap_init_spmi_ext() returns ERR_PTR() on error. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210615132934.3453965-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 8c485bedfb7852fa4de2a34aac2a6fd911f539f4 Author: Alistair Francis Date: Tue Jun 15 20:33:58 2021 +1000 regulator: sy7636a: Initial commit Initial support for the Silergy SY7636A-regulator Power Management chip. Signed-off-by: Alistair Francis Link: https://lore.kernel.org/r/20210615103400.946-3-alistair@alistair23.me Signed-off-by: Mark Brown commit afc3a0b4c408b00787d60225e6d667e1e6f93b6a Author: Yang Yingliang Date: Tue Jun 15 21:35:15 2021 +0800 ASoC: hisilicon: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615133515.1376290-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 50484d14ac3c9d93de0da5b8c546b1cb86df3d31 Author: Yang Yingliang Date: Tue Jun 15 21:56:27 2021 +0800 ASoC: jz4740-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615135627.1665168-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 942f2671c573904066ddbc699ff8812b3df70a9c Author: Yang Yingliang Date: Tue Jun 15 21:52:00 2021 +0800 ASoC: img-spdif-out: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615135200.1661695-5-yangyingliang@huawei.com Signed-off-by: Mark Brown commit c481f3838acc3e1b28fc228f9fbb2f569e3d8d0c Author: Yang Yingliang Date: Tue Jun 15 21:51:59 2021 +0800 ASoC: img-spdif-in: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615135200.1661695-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit a444a902b06a361d646e608136efb35119922445 Author: Yang Yingliang Date: Tue Jun 15 21:51:58 2021 +0800 ASoC: img-parallel-out: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615135200.1661695-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit ef43f463ddb3dc0acaf1447db22db85df5100380 Author: Yang Yingliang Date: Tue Jun 15 21:51:57 2021 +0800 ASoC: img-i2s-out: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615135200.1661695-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit e43805c28df6394254d1f49a388a1c70cae208a1 Author: Yang Yingliang Date: Tue Jun 15 21:51:56 2021 +0800 ASoC: img-i2s-in: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615135200.1661695-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 1f65c9bdd6dd7bd292cfadfb135f660aeaa928f1 Author: Yang Yingliang Date: Tue Jun 15 21:29:33 2021 +0800 ASoC: dwc: dwc-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210615132933.1372463-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit b90d9398d6ff6f518f352c39176450dbaf99e276 Author: Srinivas Kandagatla Date: Tue Jun 15 14:28:29 2021 +0100 ASoC: codecs: wcd938x: remove incorrect module interdependency For some reason we ended up with cyclic dependency between snd_soc_wcd938x and snd_soc_wcd938x_sdw modules. Remove this cyclic dependency by handling them in respective modules. Without this below error is reported during make modules_install depmod: ERROR: Cycle detected: snd_soc_wcd938x -> snd_soc_wcd938x_sdw -> snd_soc_wcd938x depmod: ERROR: Found 2 modules in dependency cycles! Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig") Reported-by: Stephen Rothwell Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210615132829.23067-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 35f78d0277fc522028e9504454c555d9b0f53bec Author: Gabriel David Date: Fri Jun 4 22:22:06 2021 -0400 ASoC: qdsp6: q6routing: Add Quinary MI2S ports This patch adds MI2S mixers to Quinary ports Signed-off-by: Gabriel David Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210605022206.13226-5-ultracoolguy@disroot.org Signed-off-by: Mark Brown commit 98e80779ff9a03b913e59850d55ac00f3eec9cdd Author: Gabriel David Date: Fri Jun 4 22:22:05 2021 -0400 ASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports This patch adds support to Quinary MI2S ports supported in AFE. Signed-off-by: Gabriel David Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210605022206.13226-4-ultracoolguy@disroot.org Signed-off-by: Mark Brown commit d0293e2aa6c1cfc29c7e571721036650b4f656eb Author: Gabriel David Date: Fri Jun 4 22:22:04 2021 -0400 ASoC: qdsp6: q6afe: Add Quinary MI2S ports This patch adds support for the Quinary MI2S ports on LPASS. Signed-off-by: Gabriel David Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210605022206.13226-3-ultracoolguy@disroot.org Signed-off-by: Mark Brown commit 099ab4fcf3752a1bc721138632d28aa6685b1cee Author: Gabriel David Date: Fri Jun 4 22:22:03 2021 -0400 ASoC: q6afe: dt-bindings: Add QUIN_MI2S_RX/TX This patch adds bindings required for Quinary MI2S ports on AFE. Signed-off-by: Gabriel David Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210605022206.13226-2-ultracoolguy@disroot.org Signed-off-by: Mark Brown commit d7fe0d42b5f983fe4d72fcb636fb3a2d7ffd6774 Merge: 8fb202c77fc68 c7289b1c8a4e1 Author: Olof Johansson Date: Tue Jun 15 08:37:29 2021 -0700 Merge tag 'tegra-for-5.14-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.14-rc1 Contains changes to consolidate audio card names, adds audio support on Jetson Xavier NX and enables SMMU on Tegra194. * tag 'tegra-for-5.14-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Enable SMMU support on Tegra194 arm64: tegra: Hook up memory controller to SMMU on Tegra186 arm64: tegra: Use correct compatible string for Tegra186 SMMU arm64: tegra: Audio graph sound card for Jetson Xavier NX arm64: tegra: Consolidate audio card names arm64: tegra: Add PMU node for Tegra194 Link: https://lore.kernel.org/r/20210611164437.3568059-6-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 020b31abb7ad6cd5f5ed808bb9b82e1d6a9fcfe8 Merge: 3e7e3b97484b5 4302331fdf444 Author: Olof Johansson Date: Tue Jun 15 08:36:55 2021 -0700 Merge tag 'tegra-for-5.14-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig ARM: tegra: Default configuration changes for v5.14-rc1 Enables the devfreq thermal support to allow using the devfreq device as cooling device for the system. * tag 'tegra-for-5.14-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra_defconfig: Enable CONFIG_DEVFREQ_THERMAL Link: https://lore.kernel.org/r/20210611164437.3568059-5-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 8fb202c77fc68c9686b657a62a814687f2761f01 Merge: 479011d4f22a7 4c101a4466983 Author: Olof Johansson Date: Tue Jun 15 08:36:25 2021 -0700 Merge tag 'tegra-for-5.14-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.14-rc1 This contains various improvements (such as microphone detection and thermal zones) for some older Tegra devices (such as the Nexus 7 or the Acer A500). * tag 'tegra-for-5.14-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: ouya: Enable memory frequency thermal throttling using ACTMON ARM: tegra: nexus7: Enable memory frequency thermal throttling using ACTMON ARM: tegra: Add cooling cells to ACTMON device-tree node ARM: tegra: nexus7: Correct 3v3 regulator GPIO of PM269 variant ARM: tegra: nexus7: Remove monitored-battery property ARM: tegra: nexus7: Improve thermal zones ARM: tegra: nexus7: Add i2c-thermtrip node ARM: tegra: paz00: Add CPU thermal zone ARM: tegra: wm8903: Fix polarity of headphones-detection GPIO in device-trees ARM: tegra: Add reg property to Tegra20 EMC table device-tree nodes ARM: tegra: acer-a500: Bump thermal trips by 10C ARM: tegra: acer-a500: Specify proper voltage for WiFi SDIO bus ARM: tegra: acer-a500: Improve microphone detection Link: https://lore.kernel.org/r/20210611164437.3568059-4-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit ad3c2e174938d72fded674acead42e2464a3b460 Author: Pawan Gupta Date: Mon Jun 14 14:13:23 2021 -0700 x86/events/intel: Do not deploy TSX force abort workaround when TSX is deprecated Earlier workaround added by 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort") for perf counter interactions [1] are not required on some client systems which received a microcode update that deprecates TSX. Bypass the perf workaround when such microcode is enumerated. [1] [ bp: Look for document ID 604224, "Performance Monitoring Impact of Intel Transactional Synchronization Extension Memory". Since there's no way for us to have stable links to documents... ] [ bp: Massage comment. ] Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Reviewed-by: Andi Kleen Reviewed-by: Tony Luck Tested-by: Neelima Krishnan Link: https://lkml.kernel.org/r/e4d410f786946280ced02dd07c74e0a74f1d10cb.1623704845.git-series.pawan.kumar.gupta@linux.intel.com commit 5dad6db1c45c2ad460cb50a7d0e90371bf7f5b5b Merge: cda1138fcc743 bd778b893963d Author: Olof Johansson Date: Tue Jun 15 08:36:01 2021 -0700 Merge tag 'tegra-for-5.14-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.14-rc1 These changes contain two minor fixes for the Tegra BPMP driver. * tag 'tegra-for-5.14-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: bpmp: Fix Tegra234-only builds firmware: tegra: Fix error return code in tegra210_bpmp_init() Link: https://lore.kernel.org/r/20210611164437.3568059-3-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 777cf27fb22669a50196c023676ec60de36c91b7 Merge: 805be5c9e6ca6 e2d0ee225e49a Author: Olof Johansson Date: Tue Jun 15 08:35:27 2021 -0700 Merge tag 'tegra-for-5.14-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc soc/tegra: Changes for v5.14-rc1 These changes implement the core power domain for the PMC, and fix a couple of minor issues as well as add stubs to help some drivers be compile tested more easily. * tag 'tegra-for-5.14-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Fix Tegra234-only builds soc/tegra: fuse: Don't return -ENOMEM when allocate lookups failed soc/tegra: regulators: Support core domain state syncing soc/tegra: pmc: Add driver state syncing soc/tegra: pmc: Add core power domain soc/tegra: fuse: Add stubs needed for compile-testing soc/tegra: Add devm_tegra_core_dev_init_opp_table() soc/tegra: Add stub for soc_is_tegra() soc/tegra: regulators: Bump voltages on system reboot regulator: core: Add regulator_sync_voltage_rdev() Link: https://lore.kernel.org/r/20210611164437.3568059-2-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 479011d4f22a7f75430532db97a4a895bdae5e42 Merge: e6640fa697f3b 5f459cb0d67d6 Author: Olof Johansson Date: Tue Jun 15 08:33:45 2021 -0700 Merge tag 'tegra-for-5.14-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.14-rc1 This contains a conversion of the Tegra clock and reset controller device tree bindings to the new json-schema format and adds the core power domain to the PMC device tree bindings. * tag 'tegra-for-5.14-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: soc: tegra-pmc: Document core power domain dt-bindings: clock: tegra: Convert to schema Link: https://lore.kernel.org/r/20210611164437.3568059-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 805be5c9e6ca6d9bb7c6d620f8b84b44ed3fcc3c Author: Daniel Palmer Date: Sat May 22 12:20:15 2021 +0900 MAINTAINERS: ARM/MStar/Sigmastar SoCs: Add a link to the MStar tree Add a link to the MStar tree on github. Signed-off-by: Daniel Palmer Reviewed-by: Romain Perier Signed-off-by: Olof Johansson commit 624b9d83624beb31d558840f824f12710191fd3d Author: Romain Perier Date: Tue May 4 19:03:16 2021 +0200 ARM: debug: add UART early console support for MSTAR SoCs This adds the debug_ll uart for the PM UART found on armv7-based MStar SoCs. Signed-off-by: Romain Perier Acked-by: Daniel Palmer Reviewed-by: Linus Walleij Tested-by: Mohammed Billoo Signed-off-by: Daniel Palmer Signed-off-by: Olof Johansson commit 98b5ce4c08ca85727888fdbd362d574bcfa18e3c Author: Al Cooper Date: Wed Jun 2 15:27:58 2021 -0400 mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211 Add support for the legacy Arasan sdhci controller on the BCM7211 and related SoC's. This includes adding a .shutdown callback to increase the power savings during S5. Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20210602192758.38735-2-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 09a8ec9a2d03efa2813d9d306424eb6802146b57 Author: Al Cooper Date: Wed Jun 2 15:27:57 2021 -0400 dt-bindings: mmc: sdhci-iproc: Add brcm,bcm7211a0-sdhci Add new compatible string for the legacy sdhci controller on the BCM7211 family of SoC's. Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20210602192758.38735-1-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 2c49912f1d66076caf5b8cf2d636e2e35f350cf2 Merge: d1c777ee5c5e0 103a5348c22c3 Author: Ulf Hansson Date: Tue Jun 15 17:27:38 2021 +0200 Merge branch 'fixes' into next commit 1348924ba8169f35cedfd0a0087872b81a632b8e Author: Pawan Gupta Date: Mon Jun 14 14:12:22 2021 -0700 x86/msr: Define new bits in TSX_FORCE_ABORT MSR Intel client processors that support the IA32_TSX_FORCE_ABORT MSR related to perf counter interaction [1] received a microcode update that deprecates the Transactional Synchronization Extension (TSX) feature. The bit FORCE_ABORT_RTM now defaults to 1, writes to this bit are ignored. A new bit TSX_CPUID_CLEAR clears the TSX related CPUID bits. The summary of changes to the IA32_TSX_FORCE_ABORT MSR are: Bit 0: FORCE_ABORT_RTM (legacy bit, new default=1) Status bit that indicates if RTM transactions are always aborted. This bit is essentially !SDV_ENABLE_RTM(Bit 2). Writes to this bit are ignored. Bit 1: TSX_CPUID_CLEAR (new bit, default=0) When set, CPUID.HLE = 0 and CPUID.RTM = 0. Bit 2: SDV_ENABLE_RTM (new bit, default=0) When clear, XBEGIN will always abort with EAX code 0. When set, XBEGIN will not be forced to abort (but will always abort in SGX enclaves). This bit is intended to be used on developer systems. If this bit is set, transactional atomicity correctness is not certain. SDV = Software Development Vehicle (SDV), i.e. developer systems. Performance monitoring counter 3 is usable in all cases, regardless of the value of above bits. Add support for a new CPUID bit - CPUID.RTM_ALWAYS_ABORT (CPUID 7.EDX[11]) - to indicate the status of always abort behavior. [1] [ bp: Look for document ID 604224, "Performance Monitoring Impact of Intel Transactional Synchronization Extension Memory". Since there's no way for us to have stable links to documents... ] [ bp: Massage and extend commit message. ] Signed-off-by: Pawan Gupta Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Reviewed-by: Andi Kleen Reviewed-by: Tony Luck Tested-by: Neelima Krishnan Link: https://lkml.kernel.org/r/9add61915b4a4eedad74fbd869107863a28b428e.1623704845.git-series.pawan.kumar.gupta@linux.intel.com commit e6640fa697f3b1d95b109278b144d6d92d236293 Merge: ab9c2a754664d 172cdcaefea5c Author: Olof Johansson Date: Tue Jun 15 08:18:09 2021 -0700 Merge tag 'visconti-arm-dt-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti into arm/dt Visconti device tree updates for 5.14 - Add DT support for Toshiba Visconti5 PWM driver * tag 'visconti-arm-dt-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti: arm64: dts: visconti: Add PWM support for TMPV7708 SoC Link: https://lore.kernel.org/r/20210614234654.2u3xetnn5rwhymwz@toshiba.co.jp Signed-off-by: Olof Johansson commit ab9c2a754664d57deb5f0541f5e48d16a43377b9 Merge: 2e2ec371a421b 2011fc7a8b5b7 Author: Olof Johansson Date: Tue Jun 15 08:17:30 2021 -0700 Merge tag 'qcom-dts-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm DTS updates for v5.14 This adds DMA, NAND controllers, USB controller and PHY, RPM, L2CC, thermal sensors and defines thermal zones. It them enables these for the RB3011. * tag 'qcom-dts-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: Enable NAND + USB for RB3011 ARM: dts: qcom: add L2CC and RPM for IPQ8064 ARM: dts: qcom: Add USB port definitions to ipq806x ARM: dts: qcom: Add tsens details to ipq806x ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Link: https://lore.kernel.org/r/20210614223840.393224-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit cda1138fcc74394efa8e774ec182b93427de122f Merge: ec3171d7beaff 82a6cbf007648 Author: Olof Johansson Date: Tue Jun 15 08:17:10 2021 -0700 Merge tag 'qcom-drivers-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for v5.14 In addition to fixing a kerneldoc issue in the qcom-ebi2 driver this populates socinfo with a range of platforms and PMICs and extends a few of the Qualcomm drivers bits of support for MSM8226, MDM9607, SM6125 and SC8180X. * tag 'qcom-drivers-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: firmware: qcom_scm: Add MDM9607 compatible soc: qcom: rpmpd: Add MDM9607 RPM Power Domains soc: qcom: smd-rpm: Add MSM8226 compatible dt-bindings: soc: qcom: smd-rpm: Add MSM8226 compatible soc: qcom: socinfo: import PMIC IDs from pmic-spmi bus: qcom-ebi2: Fix incorrect documentation for '{slow,fast}_cfg' soc: qcom: socinfo: Add more IDs soc: qcom: rpmhpd: Add SC8180X dt-bindings: power: rpmpd: Add SC8180X to rpmpd binding dt-bindings: soc: qcom: smd-rpm: Document SM6125 compatible soc: qcom: smd-rpm: Add SM6125 compatible soc: qcom: socinfo: Add remaining IPQ6018 family ID-s soc: qcom: socinfo: Add missing SoC ID for SM6125 Link: https://lore.kernel.org/r/20210614223727.393159-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 2e2ec371a421b85ff86a0b922059bc0f460281dc Merge: c2d0501cdc6c5 81cfa462e4584 Author: Olof Johansson Date: Tue Jun 15 08:14:57 2021 -0700 Merge tag 'qcom-arm64-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT updates for v5.14 MSM8916 gains new support for Huawei Ascend G7, with NFC, sensors and touchscreen. The Samsung Galaxy A3/A5 gains battery support, touch keys, NFC. MSM8996 received more cleanup and refactoring, preparing for upcoming new devices. Note worthy is the long pending enablement of CPUfreq. SC7180 continues to stabilize, with a range of small fixes for various bits and pieces, and new revisions for the CoachZ and pompom devices. SC7280 continues to grow, with more clock controllers, thermal sensors, thermal zones, CPUfreq and interconnect providers. Xiaomi Poco F1 gaines audio support and the OnePlus 6/6T gaines IPA support. SM8350 gains some cleanups and the IPA device is enabled. Initial support for the Microsoft Surface Duo, based on SM8150, is added. IPQ8074 gained support for the HK10 board. * tag 'qcom-arm64-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (85 commits) arm64: dts: qcom: sc7180: Add xo clock for eMMC and Sd card arm64: dts: sc7280: Add interconnect provider DT nodes arm64: dts: qcom: msm8916-huawei-g7: Add NFC arm64: dts: qcom: msm8916-huawei-g7: Add display regulator arm64: dts: qcom: msm8916-huawei-g7: Add sensors arm64: dts: qcom: msm8916-huawei-g7: Add touchscreen arm64: dts: qcom: msm8916: Add device tree for Huawei Ascend G7 arm64: dts: qcom: sc7180-trogdor: Update flash freq to match reality arm64: dts: qcom: sc7180: Add wakeup delay for adau codec arm64: dts: qcom: sdm845: Remove cros-pd-update on Cheza arm64: dts: qcom: sc7180: Remove cros-pd-update on Trogdor arm64: dts: qcom: sc7180: Disable PON on Trogdor arm64: dts: qcom: sc7180: Modify SPI_CLK voltage level for trogdor arm64: dts: qcom: add initial device-tree for Microsoft Surface Duo arm64: dts: qcom: sdm845-mtp: enable IPA arm64: dts: qcom: sc7180: SD-card GPIO pin set bias-pull up arm64: dts: qcom: sc7180: Move sdc pinconf to board specific DT files arm64: dts: qcom: msm8916-samsung-a2015: Add NFC arm64: dts: qcom: msm8916-samsung-a2015: Add rt5033 battery arm64: dts: qcom: msm8916-samsung-a5u: Add touch key regulator ... Link: https://lore.kernel.org/r/20210614223712.393096-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 09705dcb63d269000595284b5dd7f5c938d647b9 Author: Andy Shevchenko Date: Mon May 17 15:29:46 2021 +0300 devres: Enable trace events In some cases the printf() mechanism is too heavy and can't be used. For example, when debugging a race condition involving devres API. When CONFIG_DEBUG_DEVRES is enabled I can't reproduce an issue, and otherwise it's quite visible with a useful information being collected. Enable trace events for devres part of the driver core. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517122946.53161-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a7f1d03b6046cf44f1dd702aeaad3b5e4d7b33a5 Author: Andy Shevchenko Date: Mon May 17 15:29:45 2021 +0300 devres: No need to call remove_nodes() when there none present If a list of devres nodes is empty, no need to call remove_nodes(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517122946.53161-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c3cd0ff7aa18a60229134fb8e467d5e1d92abec3 Author: Andy Shevchenko Date: Mon May 17 15:29:44 2021 +0300 devres: Use list_for_each_safe_from() in remove_nodes() The remove_nodes() open codes the list_for_each_safe_from(). Replace it by a generic macro. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517122946.53161-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bbc8f3e79e9e35469ac87b0b3329729afc715885 Author: Andy Shevchenko Date: Mon May 17 15:29:43 2021 +0300 devres: Make locking straight forward in release_nodes() It seems for the sake of saving stack memory of couple of pointers, the locking in release_nodes() callers becomes interesting. Replace this logic with a straight forward locking and unlocking scheme. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517122946.53161-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3e7e3b97484b5dc1e9b895d1409f6493cd05bbc0 Merge: a996c70e4d7e0 e9cd414c1136a Author: Olof Johansson Date: Tue Jun 15 08:13:52 2021 -0700 Merge tag 'qcom-arm64-defconfig-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig udpates for v5.14 This enables VADC, audio codecs and Venus (video decoder) found on MSM8916 among others and the SM8350 interconnect provider driver. * tag 'qcom-arm64-defconfig-for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: add drivers needed for DragonBoard410c arm64: defconfig: qcom: enable interconnect for SM8350 Link: https://lore.kernel.org/r/20210614223704.393042-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit f2a4ba9ec23b79285f7e260abffdedefadc73302 Merge: 7749510c459c1 0fa1baeedf067 Author: Olof Johansson Date: Tue Jun 15 08:13:30 2021 -0700 Merge tag 'qcom-dts-fixes-for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm DTS fixes for v5.13 Failure to properly define "secure-regions" as 64-bit ranges prevents the two SDX55 boards from booting, so correct this. * tag 'qcom-dts-fixes-for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: sdx55-telit: Represent secure-regions as 64-bit elements ARM: dts: qcom: sdx55-t55: Represent secure-regions as 64-bit elements Link: https://lore.kernel.org/r/20210614215552.391887-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit a996c70e4d7e08904674d2a65e25303400ac02e5 Merge: dfde897bb1d5f 38f61ef1a0cef Author: Olof Johansson Date: Tue Jun 15 08:13:04 2021 -0700 Merge tag 'samsung-defconfig-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/defconfig Samsung defconfig changes for v5.14 1. Enable Exynos Universal Flash Storage (UFS) driver for Exynos7 arm64 boards. 2. Restore framebuffer support in exynos_defconfig. * tag 'samsung-defconfig-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos_defconfig: restore framebuffer support arm64: defconfig: Enable Exynos UFS driver Link: https://lore.kernel.org/r/20210614193309.20248-3-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit c7e9967668d98f868fb577fd95d84fdb1ba0446c Author: Tom Rix Date: Thu Jun 10 14:44:33 2021 -0700 mei: hdcp: SPDX tag should be the first line checkpatch looks for the tag on the first line. So delete empty first line Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210610214438.3161140-4-trix@redhat.com Acked-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit c2d0501cdc6c54d3711f230572935a492317a232 Author: Krzysztof Kozlowski Date: Mon Jun 14 21:33:08 2021 +0200 arm64: dts: exynos: enable PMIC wakeup from suspend on TM2 The RTC on S2MPS13 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Link: https://lore.kernel.org/r/20210614193309.20248-2-krzysztof.kozlowski@canonical.com Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-11-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit 7749510c459c10c431d746a4749e7c9cf2899156 Author: Linus Walleij Date: Sun Jun 13 14:33:56 2021 +0200 ARM: dts: ux500: Fix LED probing The Ux500 HREF LEDs have not been probing properly for a while as this was introduce: ret = of_property_read_u32(np, "color", &led_color); if (ret) return ret; Since the device tree did not define the new invented color attribute, probe was failing. Define color attributes for the LEDs so they work again. Link: https://lore.kernel.org/r/20210613123356.880933-1-linus.walleij@linaro.org Fixes: 92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx") Cc: stable@vger.kernel.org Cc: Dan Murphy Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit dfde897bb1d5fe91824ace4aa3ed21c52081fdbe Merge: ad9f81281ebe8 6252a42b0fd70 Author: Olof Johansson Date: Tue Jun 15 08:12:13 2021 -0700 Merge tag 'imx-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.14: - Enable LT8912B DRM bridge and Layerscape EDAC driver support in arm64 defconfig. - Enable WiFi ath10k SDIO driver in imx_v6_v7_defconfig. * tag 'imx-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Select the Wifi ath10k sdio driver arm64: defconfig: enable Layerscape EDAC driver arm64: defconfig: Enable LT8912B DRM bridge driver Link: https://lore.kernel.org/r/20210613082544.16067-6-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 989e7e357c88cb264464320057ca8da7554b8d22 Merge: 970d180b8b7ea 21cc1f222e890 Author: Olof Johansson Date: Tue Jun 15 08:11:54 2021 -0700 Merge tag 'imx-dt64-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree chagnes for 5.14: - New board support: i.MX8MM Gateworks GW7901 board. - Add SPBA bus description for i.MX8MN and i.MX8MM. - A series of update on imx8mq-nitrogen board to add USB OTG/Host and LT8912 MIPI-DSI to HDMI support. - Correct enet clock description for i.MX8 Connection Subsystem. - A couple of patches from Heiko Schocher to add FlexSPI device for i.MX8MP SoC and enable SPI NOR Flash support on imx8mp-phycore-som. - Remove the reference to audio IPG clock on i.MX8MP. - Enable EQOS Ethernet and PMIC device support for imx8mp-evk. - Disable USB over-current on imx8mm-evk and imx8mn-evk. - Add dma-ranges description for i.MX8MM and i.MX8MN SoC. - Add PCIe clock description for i.MX8MQ SoC. - Enable PCIe support on freeway board. - Enable OPTEE support on ls1028a-rdb board. * tag 'imx-dt64-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (24 commits) arm64: dts: imx8mn-evk: disable over current for usb arm64: dts: imx8mm-evk: disable over current for usb1 arm64: dts: freescale: Separate each group of data in the property 'reg' arm64: dts: imx8: conn: fix enet clock setting arm64: dts: imx8mq: assign PCIe clocks arm64: dts: imx8mn: specify dma-ranges arm64: dts: imx8mm: specify dma-ranges arm64: dts: fsl-ls1028a: Correct ECAM PCIE window ranges arm64: dts: imx8mn-beacon-som: Assign PMIC clock arm64: dts: ls208xa: remove bus-num from dspi node arm64: dts: ls1012a: enable PCIe on freeway board arm64: dts: imx8mp-evk: enable EQOS ethernet arm64: dts: imx8mp: Remove the reference to audio ipg clock on imx8mp arm64: dts: imx8mq-evk: add one regulator used to power up pcie phy arm64: dts: imx8mm: Add spba1 and spba2 buses arm64: dts: imx8mn: Add spba1 bus arm64: dts: imx8mq-nitrogen: add lt8912 MIPI-DSI to HDMI arm64: dts: imx8mq-nitrogen: add USB HOST support arm64: dts: imx8mq-nitrogen: add USB OTG support arm64: dts: imx8mp-phycore-som: enable spi nor ... Link: https://lore.kernel.org/r/20210613082544.16067-5-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 970d180b8b7ea01964e38cc8d674fd14d969ffdb Merge: bb1a7fcec17ee 1fac5db35ee91 Author: Olof Johansson Date: Tue Jun 15 08:11:30 2021 -0700 Merge tag 'imx-dt-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree changes for 5.14: - New board support: i.MX6Q DaSheng COM-9XX SBC board, i.MX28 based XEA board, GE B1x5v2 boards. - A series from Christoph Niedermaier to correct imx6q-dhcom descriptions, add device aliases and ethernet VIO regulator. - Correct Ethernet node name for imx51-digi-connectcore-som and imx53-ard board to comply DT schema. - A couple of update on imx6dl-yapp4 board, configuring OLED display segment offset, and using aliases to set custom MMC device indexes. - A series from Oleksij Rempel and Robin van der Gracht to update Protonic boards: imx6dl-prtvt7, imx6dl-plym2m and imx6qdl-vicut1. - A series from Shengjiu Wang to improve various audio support on NXP reference boards. - Rename pinfunc for i.MX25 GPIO_[A-F] pads for consistency. * tag 'imx-dt-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (30 commits) ARM: dts: imx6: Add GE B1x5v2 ARM: dts: imx6q-dhcom: Add ethernet VIO regulator ARM: dts: imx6q-dhcom: Add aliases for i2c, serial and rtc ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems ARM: dts: imx6q-dhcom: Fix ethernet reset time properties ARM: dts: imx6dl-prtvt7: Remove unused 'sound-dai-cells' from ssi1 node ARM: dts: imx6dl-prtvt7: The sgtl5000 uses i2s not ac97 ARM: dts: imx6qdl-vicut1: add interrupt-counter nodes ARM: dts: imx6dl-prtvt7: Enable the VPU ARM: dts: imx6dl: enable touchscreen debounce filter on PLYM2M and PRTVT7 boards ARM: dts: imx6dl-plym2m: remove touchscreen-size-* properties ARM: dts: imx6dl-prtvt7: fix PWM cell count for the backlight node. ARM: dts: imx6dl-prtvt7: Remove backlight enable gpio ARM: dts: imx6dl-prtvt7: add TSC2046 touchscreen node ARM: dts: imx53-ard: Correct Ethernet node name ARM: dts: i.MX51: digi-connectcore-som: Correct Ethernet node name ARM: dts: imx6dl-riotboard: configure PHY clock and set proper EEE value ARM: dts: imx6: edmqmx6: set phy-mode to RGMII-ID ARM: dts: imx6qdl-sabresd: Configure the gpio for hp detect ... Link: https://lore.kernel.org/r/20210613082544.16067-4-shawnguo@kernel.org Signed-off-by: Olof Johansson commit bb1a7fcec17eea1d60678f1540aa2226eef9d70a Merge: 406b968552c6b cd044eafd7105 Author: Olof Johansson Date: Tue Jun 15 08:10:12 2021 -0700 Merge tag 'imx-bindings-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX dt-bindings update for 5.14: - Add vendor prefixes for congatec GmbH and DaSheng, Inc. - Add compatibles for i.MX6Q DaSheng COM-9XX SBC, GE B1x5pv2 and i.MX8MM GW7901 boards. - Add an optional 'resets' property for i.MX GPCv2 bindings. * tag 'imx-bindings-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: add GE B1x5pv2 boards dt-bindings: vendor-prefixes: add congatec dt-bindings: imx: gpcv2: add support for optional resets dt-bindings: arm: imx: Add i.mx6q DaSheng COM-9XX SBC dt-bindings: add dasheng vendor prefix dt-bindings: arm: imx: add imx8mm gw7901 support Link: https://lore.kernel.org/r/20210613082544.16067-3-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 57d459e2192eae59adfb7eb84888020bc52318d7 Merge: 2f80e8b45cda3 e34645f45805d Author: Olof Johansson Date: Tue Jun 15 08:09:51 2021 -0700 Merge tag 'imx-soc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC changes for 5.14: - Add SMP support for i.MX7D, as there are i.MX7D devices running in field with U-Boot that doesn't support PSCI. - Fix imx5_cpu_suspend_info reference in i.MX5 PM code comments. - Add SoC ID initialization for i.MX50. - Drop unnecessary of_platform_default_populate() call from i.MX6Q .init_machine hook. - A series from Oleksij Rempel to remove most of the i.MX6/7 board specific PHY fixups. * tag 'imx-soc-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: add smp support for imx7d ARM: imx6q: drop of_platform_default_populate() from init_machine ARM: imx7d: remove Atheros AR8031 PHY fixup ARM: imx6sx: remove Atheros AR8031 PHY fixup ARM: imx6q: remove Atheros AR8035 SmartEEE fixup ARM: imx6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs ARM: imx6q: remove BMCR_PDOWN handler in ar8035_phy_fixup() ARM: imx6q: remove part of ar8031_phy_fixup() ARM: imx6q: remove PHY fixup for KSZ9031 ARM: imx: Initialize SoC ID on i.MX50 ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info Link: https://lore.kernel.org/r/20210613082544.16067-2-shawnguo@kernel.org Signed-off-by: Olof Johansson commit ec3171d7beaff469fa48def08f8d0bc028d158ea Merge: eac7b3b75880a 2a53b9d47b13a Author: Olof Johansson Date: Tue Jun 15 08:09:19 2021 -0700 Merge tag 'imx-drivers-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers update for 5.14: - A patch series from Lucas Stach and Peng Fan adding i.MX8MM power domains support into i.MX GPCv2 driver. - A couple of patches from Adam Ford adding i.MX8MN power domains on top of i.MX8MM power domain support. * tag 'imx-drivers-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: gpcv2: add support for i.MX8MN power domains dt-bindings: add defines for i.MX8MN power domains soc: imx: gpcv2: move reset assert after requesting domain power up soc: imx: gpcv2: Add support for missing i.MX8MM VPU/DISPMIX power domains soc: imx: gpcv2: add support for i.MX8MM power domains dt-bindings: power: add defines for i.MX8MM power domains soc: imx: gpcv2: add support for optional resets soc: imx: gpcv2: allow domains without power-sequence control soc: imx: gpcv2: add runtime PM support for power-domains soc: imx: gpcv2: wait for ADB400 handshake soc: imx: gpcv2: split power up and power down sequence control soc: imx: gpcv2: switch to clk_bulk_* API soc: imx: gpcv2: move domain mapping to domain driver probe soc: imx: gpcv2: move to more ideomatic error handling in probe Link: https://lore.kernel.org/r/20210613082544.16067-1-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 01d12a6656f7fa239cddbd713656be83cdbdc9b3 Author: Christophe JAILLET Date: Sun Jun 13 15:27:43 2021 +0200 firewire: nosy: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'add_card()', GFP_KERNEL can be used because this flag is already used a few lines above and no lock is taken in the between. While at it, also remove some useless casting. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e1d7fa558f31abf294659a9d4edcc1e4fc065fab.1623590706.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 36b1fefe36c77963c4cc305a4b7a09ed5fccef06 Author: Clayton Casciato Date: Sun Jun 13 14:30:32 2021 -0600 accessibility: braille: braille_console: fix whitespace style issues Fixed a coding style issue. Reviewed-by: Jiri Slaby Signed-off-by: Clayton Casciato Link: https://lore.kernel.org/r/20210613203031.23721-1-majortomtosourcecontrol@gmail.com Signed-off-by: Greg Kroah-Hartman commit eac7b3b75880a7f2e250d8abecf33d9d5764e772 Merge: 361aa4be70954 536e23c607edf Author: Olof Johansson Date: Tue Jun 15 08:08:46 2021 -0700 Merge tag 'drivers_soc_for_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers SOC: Keystone driver update for v5.13 Couple of cleanup fixes in PM AVS and WKUP M3 drivers * tag 'drivers_soc_for_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: soc: ti: wkup_m3_ipc: Remove redundant error printing in wkup_m3_ipc_probe() PM: AVS: remove redundant dev_err call in omap_sr_probe() Link: https://lore.kernel.org/r/1623564105-10273-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Olof Johansson commit 406b968552c6bad8d8c8488e910459652732cc07 Merge: 83107b24c3513 0b5194dec85b9 Author: Olof Johansson Date: Tue Jun 15 08:08:14 2021 -0700 Merge tag 'keystone_dts_for_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/dt ARM: DTS: Keystone K2G cleanup for v5.13 - Rename message manager node - Rename the TI-SCI node and clock - assign clock to McAsp * tag 'keystone_dts_for_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone: k2g-evm: Move audio oscillator assigned clock to mcasp ARM: dts: keystone: k2g: Rename the TI-SCI clocks node name ARM: dts: keystone: k2g: Rename the TI-SCI node ARM: dts: keystone: k2g: Rename message-manager node Link: https://lore.kernel.org/r/1623564020-9958-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Olof Johansson commit 5b5140bf5182c24f1e37d61337a952e53f6aeb05 Author: Samuel Thibault Date: Sun Jun 13 21:59:09 2021 +0200 speakup: Separate out translations for bright colors names The existing code was assuming that bright color names can be forged by just prepending the "bright" word to the color name. But some langages may rather append it, or require completely different names ("grey" is actually already an example). From: Trevor Astrope Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20210613195909.n7ssor6iqeo3pcno@begin Signed-off-by: Greg Kroah-Hartman commit d826e0365199ccc084d6b757c966f4c8ca83d20b Author: Ian Kent Date: Tue Jun 15 18:25:53 2021 +0800 kernfs: move revalidate to be near lookup While the dentry operation kernfs_dop_revalidate() is grouped with dentry type functions it also has a strong affinity to the inode operation ->lookup(). It makes sense to locate this function near to kernfs_iop_lookup() because we will be adding VFS negative dentry caching to reduce path lookup overhead for non-existent paths. There's no functional change from this patch. Signed-off-by: Ian Kent Reviewed-by: Miklos Szeredi Link: https://lore.kernel.org/r/162375275365.232295.8995526416263659926.stgit@web.messagingengine.com Signed-off-by: Greg Kroah-Hartman commit 98eaa63e96273de075f3ce4eac0f18b33d28b84c Author: ChenXiaoSong Date: Thu Jun 10 15:49:00 2021 +0800 tomoyo: fix doc warnings Fix gcc W=1 warnings: security/tomoyo/audit.c:331: warning: Function parameter or member 'matched_acl' not described in 'tomoyo_get_audit' security/tomoyo/securityfs_if.c:146: warning: Function parameter or member 'inode' not described in 'tomoyo_release' security/tomoyo/tomoyo.c:122: warning: Function parameter or member 'path' not described in 'tomoyo_inode_getattr' security/tomoyo/tomoyo.c:497: warning: Function parameter or member 'clone_flags' not described in 'tomoyo_task_alloc' security/tomoyo/util.c:92: warning: Function parameter or member 'time64' not described in 'tomoyo_convert_time' Signed-off-by: ChenXiaoSong [ penguin-kernel: Also adjust spaces and similar warnings ] Signed-off-by: Tetsuo Handa commit b3a9e523237013477bea914b7fbfbe420428b988 Author: Christophe Leroy Date: Thu May 20 13:50:38 2021 +0000 powerpc/inst: Fix sparse detection on get_user_instr() get_user_instr() lacks sparse detection for the __user tag. This is because __gui_ptr is assigned with a cast. Fix that by adding a __chk_user_ptr() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0320e5b41a794fd456ab8c5993bbfadcf9e1d8b4.1621516826.git.christophe.leroy@csgroup.eu commit f30becb5e9ec086257162f78be491c0920c616b7 Author: Christophe Leroy Date: Thu May 20 10:23:11 2021 +0000 powerpc: Replace PPC_INST_NOP by PPC_RAW_NOP() On the road to removing all PPC_INST_xx defines in asm/ppc-opcodes.h, change PPC_INST_NOP to PPC_RAW_NOP(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ad46c195ca1b8572629ef07ba6bfe247585239a6.1621506159.git.christophe.leroy@csgroup.eu commit deefd0ae990a689089ea1e4f5ad41799d63d4fd9 Author: Christophe Leroy Date: Thu May 20 10:23:10 2021 +0000 powerpc/traps: Start using PPC_RAW_xx() macros Start using PPC_RAW_xx() macros where relevant. PPC_INST_SYNC is used to both represent the 'sync' instruction and the family of synchronisation instructions. Keep it for the later, maybe we'll change the name in the future to avoid confusion. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0945c155d6cb113431185fc1296ac127359fe29b.1621506159.git.christophe.leroy@csgroup.eu commit ef909ba954145e35c9e21352133e5e99c64ab3f4 Author: Christophe Leroy Date: Thu May 20 10:23:09 2021 +0000 powerpc/lib/feature-fixups: Use PPC_RAW_xxx() macros Use PPC_RAW_xxx() macros instead of open coding assembly opcodes. Signed-off-by: Christophe Leroy [mpe: Fix bad converison in do_stf_exit_barrier_fixups()] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e79cd8e111ca13bf8c61a384bac365aa7e207647.1621506159.git.christophe.leroy@csgroup.eu commit e0ea08c0cacf9370e3fd3ee8bb7456c61e79db66 Author: Christophe Leroy Date: Thu May 20 10:23:08 2021 +0000 powerpc/ebpf32: Use _Rx macros instead of __REG_Rx ones To increase readability, use _Rx macros instead of __REG_Rx. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eb7ec6297b5d16f141c5866da3975b418e47431b.1621506159.git.christophe.leroy@csgroup.eu commit e08021f8dbd256f480b7e172aa4e894219c901f2 Author: Christophe Leroy Date: Thu May 20 10:23:07 2021 +0000 powerpc/ebpf64: Use PPC_RAW_MFLR() Use PPC_RAW_MFLR() instead of open coding with PPC_INST_MFLR. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c1887623e91e8b4da36e669e4c74de86320a5092.1621506159.git.christophe.leroy@csgroup.eu commit 5a03e1e9728edce8f87e3e0bad6d4cd66329b129 Author: Christophe Leroy Date: Thu May 20 10:23:06 2021 +0000 powerpc/ftrace: Use PPC_RAW_MFLR() and PPC_RAW_NOP() Use PPC_RAW_MFLR() instead of open coding with PPC_INST_MFLR. Same for PPC_INST_NOP. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/98fd4d717810b7c4032a1edf62dd6fe638e64329.1621506159.git.christophe.leroy@csgroup.eu commit e7304597560176d8755e2ae4abb599d0c4efe4f2 Author: Christophe Leroy Date: Thu May 20 10:23:05 2021 +0000 powerpc/security: Use PPC_RAW_BLR() and PPC_RAW_NOP() On the road to remove all use of PPC_INST_xxx, replace PPC_INST_BLR by PPC_RAW_BLR(). Same for PPC_INST_NOP. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c04f88d0e53d2122fbbe92226892a01ebc668b6a.1621506159.git.christophe.leroy@csgroup.eu commit 47b04699d0709f5ff12a8aa0b3050a6246eb570e Author: Christophe Leroy Date: Thu May 20 10:23:04 2021 +0000 powerpc/modules: Use PPC_RAW_xx() macros To improve readability, use PPC_RAW_xx() macros instead of open coding. Those macros are self-explanatory so the comments can go as well. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/99d9ee8849d3992beeadb310a665aae01c3abfb1.1621506159.git.christophe.leroy@csgroup.eu commit 1c9debbc2eb5391277ae6aa7d95f821e0c28613d Author: Christophe Leroy Date: Thu May 20 10:23:03 2021 +0000 powerpc/signal: Use PPC_RAW_xx() macros To improve readability, use PPC_RAW_xx() macros instead of open coding. Those macros are self-explanatory so the comments can go as well. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4ca2bfdca2f47a293d05f61eb3c4e487ee170f1f.1621506159.git.christophe.leroy@csgroup.eu commit 8804d5beef9189fd2eae5aee14e1628436742e02 Author: Christophe Leroy Date: Thu May 20 10:23:02 2021 +0000 powerpc/lib/code-patching: Use PPC_RAW_() macros Instead of open coding with PPC_INST_ defines, use PPC_RAW_() macros. It improves readability. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8c92f1d9e825ee47c6f88fe43ad42d2a8cc2ab4a.1621506159.git.christophe.leroy@csgroup.eu commit 07cd18320ed816dec8ff6f58a2d8b33294dcceba Author: Christophe Leroy Date: Thu May 20 10:23:01 2021 +0000 powerpc/opcodes: Add shorter macros for registers for use with PPC_RAW_xx() Today we have __REG_Rx macros . They are mainly meant for internal use by macros __PPC_RA() and friends macros which allows uses like __PPC_RA(R12). When used with PPC_RAW_xx() macros, it gives a result which is not very readable. Add shorter macros _Rx in order to improve readability when used with PPC_RAW_xx() macros. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ec34d92b7c2f810622261acfeeed4b0a0f4d01bd.1621506159.git.christophe.leroy@csgroup.eu commit 148a047602462ab04bff20f3529a255b0439d3df Author: Christophe Leroy Date: Thu May 20 10:23:00 2021 +0000 powerpc: Rework PPC_RAW_xxx() macros for prefixed instructions At the time being, we have PPC_RAW_PLXVP() and PPC_RAW_PSTXVP() which provide a 64 bits value, and then it gets split by open coding to format it into a 'struct ppc_inst' instruction. Instead, define a PPC_RAW_xxx_P() and a PPC_RAW_xxx_S() to be used as is. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5d146b31b943e7ad674894421db4feef54804b9b.1621506159.git.christophe.leroy@csgroup.eu commit 359c2ca74d2fede5c571fbf3f5ee16ba1ad98259 Author: Christophe Leroy Date: Fri May 14 13:14:53 2021 +0000 powerpc: Don't handle ALTIVEC/SPE in ASM in _switch(). Do it in C. _switch() saves and restores ALTIVEC and SPE status. For altivec this is redundant with what __switch_to() does with save_sprs() and restore_sprs() and giveup_all() before calling _switch(). Add support for SPI in save_sprs() and restore_sprs() and remove things from _switch(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8ab21fd93d6e0047aa71e6509e5e312f14b2991b.1620998075.git.christophe.leroy@csgroup.eu commit 4423eff71ca6b8f2c5e0fc4cea33d8cdfe3c3740 Author: Christophe Leroy Date: Tue May 11 06:08:06 2021 +0000 powerpc: Force inlining of csum_add() Commit 328e7e487a46 ("powerpc: force inlining of csum_partial() to avoid multiple csum_partial() with GCC10") inlined csum_partial(). Now that csum_partial() is inlined, GCC outlines csum_add() when called by csum_partial(). c064fb28 : c064fb28: 7c 63 20 14 addc r3,r3,r4 c064fb2c: 7c 63 01 94 addze r3,r3 c064fb30: 4e 80 00 20 blr c0665fb8 : c0665fb8: 7c 63 20 14 addc r3,r3,r4 c0665fbc: 7c 63 01 94 addze r3,r3 c0665fc0: 4e 80 00 20 blr c066719c: 7c 9a c0 2e lwzx r4,r26,r24 c06671a0: 38 60 00 00 li r3,0 c06671a4: 7f 1a c2 14 add r24,r26,r24 c06671a8: 4b ff ee 11 bl c0665fb8 c06671ac: 80 98 00 04 lwz r4,4(r24) c06671b0: 4b ff ee 09 bl c0665fb8 c06671b4: 80 98 00 08 lwz r4,8(r24) c06671b8: 4b ff ee 01 bl c0665fb8 c06671bc: a0 98 00 0c lhz r4,12(r24) c06671c0: 4b ff ed f9 bl c0665fb8 c06671c4: 7c 63 18 f8 not r3,r3 c06671c8: 81 3f 00 68 lwz r9,104(r31) c06671cc: 81 5f 00 a0 lwz r10,160(r31) c06671d0: 7d 29 18 14 addc r9,r9,r3 c06671d4: 7d 29 01 94 addze r9,r9 c06671d8: 91 3f 00 68 stw r9,104(r31) c06671dc: 7d 1a 50 50 subf r8,r26,r10 c06671e0: 83 01 00 10 lwz r24,16(r1) c06671e4: 83 41 00 18 lwz r26,24(r1) The sum with 0 is useless, should have been skipped. And there is even one completely unused instance of csum_add(). In file included from ./include/net/checksum.h:22, from ./include/linux/skbuff.h:28, from ./include/linux/icmp.h:16, from net/ipv6/ip6_tunnel.c:23: ./arch/powerpc/include/asm/checksum.h: In function '__ip6_tnl_rcv': ./arch/powerpc/include/asm/checksum.h:94:22: warning: inlining failed in call to 'csum_add': call is unlikely and code size would grow [-Winline] 94 | static inline __wsum csum_add(__wsum csum, __wsum addend) | ^~~~~~~~ ./arch/powerpc/include/asm/checksum.h:172:31: note: called from here 172 | sum = csum_add(sum, (__force __wsum)*(const u32 *)buff); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./arch/powerpc/include/asm/checksum.h:94:22: warning: inlining failed in call to 'csum_add': call is unlikely and code size would grow [-Winline] 94 | static inline __wsum csum_add(__wsum csum, __wsum addend) | ^~~~~~~~ ./arch/powerpc/include/asm/checksum.h:177:31: note: called from here 177 | sum = csum_add(sum, (__force __wsum) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 178 | *(const u32 *)(buff + 4)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ ./arch/powerpc/include/asm/checksum.h:94:22: warning: inlining failed in call to 'csum_add': call is unlikely and code size would grow [-Winline] 94 | static inline __wsum csum_add(__wsum csum, __wsum addend) | ^~~~~~~~ ./arch/powerpc/include/asm/checksum.h:183:31: note: called from here 183 | sum = csum_add(sum, (__force __wsum) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 184 | *(const u32 *)(buff + 8)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ ./arch/powerpc/include/asm/checksum.h:94:22: warning: inlining failed in call to 'csum_add': call is unlikely and code size would grow [-Winline] 94 | static inline __wsum csum_add(__wsum csum, __wsum addend) | ^~~~~~~~ ./arch/powerpc/include/asm/checksum.h:186:31: note: called from here 186 | sum = csum_add(sum, (__force __wsum) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 187 | *(const u16 *)(buff + 12)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ Force inlining of csum_add(). 94c: 80 df 00 a0 lwz r6,160(r31) 950: 7d 28 50 2e lwzx r9,r8,r10 954: 7d 48 52 14 add r10,r8,r10 958: 80 aa 00 04 lwz r5,4(r10) 95c: 80 ff 00 68 lwz r7,104(r31) 960: 7d 29 28 14 addc r9,r9,r5 964: 7d 29 01 94 addze r9,r9 968: 7d 08 30 50 subf r8,r8,r6 96c: 80 aa 00 08 lwz r5,8(r10) 970: a1 4a 00 0c lhz r10,12(r10) 974: 7d 29 28 14 addc r9,r9,r5 978: 7d 29 01 94 addze r9,r9 97c: 7d 29 50 14 addc r9,r9,r10 980: 7d 29 01 94 addze r9,r9 984: 7d 29 48 f8 not r9,r9 988: 7c e7 48 14 addc r7,r7,r9 98c: 7c e7 01 94 addze r7,r7 990: 90 ff 00 68 stw r7,104(r31) In the non-inlined version, the first sum with 0 was performed. Here it is skipped. Signed-off-by: Christophe Leroy Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f7f4d4e364de6e473da874468b903da6e5d97adc.1620713272.git.christophe.leroy@csgroup.eu commit a4785e93aa364b2605ed2f4a6abea02761b3eaf7 Merge: ddf4a7bcd0943 478036c4cd1a1 Author: Michael Ellerman Date: Wed Jun 16 00:14:55 2021 +1000 Merge branch 'fixes' into next Merge our fixes branch which has a number of important fixes, notably the fix for initrd corruption, as well as the fixes for scv vs ptrace. commit 8f78caa2264ece71c2e207cba023f28ab6665138 Author: Johannes Berg Date: Mon Apr 26 21:29:30 2021 +0200 wil6210: remove erroneous wiphy locking We already hold the wiphy lock in all cases when we get here, so this would deadlock, remove the erroneous locking. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210426212929.83f1de07c2cd.I630a2a00eff185ba0452324b3d3f645e01128a95@changeid commit 75596eabd6e46e5afc31568f6f4e4c0c12a8906c Author: Jiapeng Chong Date: Wed May 26 18:52:56 2021 +0800 ath6kl: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/net/wireless/ath/ath6kl/cfg80211.c:3308 ath6kl_cfg80211_sscan_start() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1622026376-68524-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 979ebc54cf13bd1e3eb6e21766d208d5de984fb8 Author: Seevalamuthu Mariappan Date: Tue May 25 15:30:28 2021 +0200 ath11k: send beacon template after vdev_start/restart during csa Firmware has added assert if beacon template is received after vdev_down. Firmware expects beacon template after vdev_start and before vdev_up. This change is needed to support MBSSID EMA cases in firmware. Hence, Change the sequence in ath11k as expected from firmware. This new change is not causing any issues with older firmware. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1.r3-00011-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1.r4-00008-QCAHKSWPL_SILICONZ-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Seevalamuthu Mariappan [sven@narfation.org: added tested-on/fixes information] Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210525133028.2805615-1-sven@narfation.org commit ea1c2023efbc268f3d96b09e945af9648723d393 Author: Yang Yingliang Date: Sat Jun 5 19:02:27 2021 +0800 ath10k: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605110227.2429420-1-yangyingliang@huawei.com commit a8b1de7f4f68d558fb952e765aa25e90b50a2388 Author: Shaokun Zhang Date: Mon May 31 16:07:39 2021 +0800 ath10k: remove the repeated declaration Functions 'ath10k_pci_free_pipes' and 'ath10k_wmi_alloc_skb' are declared twice in their header file, so remove the repeated declaration. Cc: Kalle Valo Signed-off-by: Shaokun Zhang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1622448459-50805-1-git-send-email-zhangshaokun@hisilicon.com commit e9ca70c735ce66fc6a0e02c8b6958434f74ef8de Author: Yang Li Date: Tue May 25 18:46:17 2021 +0800 ath10k: Fix an error code in ath10k_add_interface() When the code execute this if statement, the value of ret is 0. However, we can see from the ath10k_warn() log that the value of ret should be -EINVAL. Clean up smatch warning: drivers/net/wireless/ath/ath10k/mac.c:5596 ath10k_add_interface() warn: missing error code 'ret' Reported-by: Abaci Robot Fixes: ccec9038c721 ("ath10k: enable raw encap mode and software crypto engine") Signed-off-by: Yang Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621939577-62218-1-git-send-email-yang.lee@linux.alibaba.com commit 515bda1d1e51c64edf2a384a58801f85a80a3f2d Author: Christophe JAILLET Date: Sat May 22 11:50:54 2021 +0200 ath11k: Fix an error handling path in ath11k_core_fetch_board_data_api_n() All error paths but this one 'goto err' in order to release some resources. Fix this. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e959eb544f3cb04258507d8e25a6f12eab126bde.1621676864.git.christophe.jaillet@wanadoo.fr commit 9d1bb2289b426c9554eeaf78e52e1dc43671dce7 Author: Yang Shen Date: Mon May 17 13:01:33 2021 +0800 wil6210: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/interrupt.c:28: warning: expecting prototype for Theory of operation(). Prototype was for WIL6210_IRQ_DISABLE() instead drivers/net/wireless/ath/wil6210/wmi.c:227: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ath/wil6210/wmi.c:245: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ath/wil6210/wmi.c:263: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Maya Erez Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-4-shenyang39@huawei.com commit 2d1f8673ad6c38b3e5de646bf7113948a9145e9e Author: Yang Shen Date: Mon May 17 13:01:32 2021 +0800 ath: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/hw.c:119: warning: expecting prototype for ath_hw_set_bssid_mask(). Prototype was for ath_hw_setbssidmask() instead Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-3-shenyang39@huawei.com commit 3b0c7b2415e52c48d47011c393bab7239fb59250 Author: Yang Shen Date: Mon May 17 13:01:31 2021 +0800 ath5k: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath5k/pcu.c:865: warning: expecting prototype for at5k_hw_stop_rx_pcu(). Prototype was for ath5k_hw_stop_rx_pcu() instead Cc: Jiri Slaby Cc: Nick Kossifidis Cc: Luis Chamberlain Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-2-shenyang39@huawei.com commit 1da8116eb0c5dfc05cfb89896239badb18c4daf3 Author: Matthias Kaehlcke Date: Wed Jun 9 15:02:49 2021 -0700 arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Add nodes for the onboard USB hub on trogdor devices. Remove the 'always-on' property from the hub regulator, since the regulator is now managed by the onboard_usb_hub driver. Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210609150159.v12.5.Ie0d2c1214b767bb5551dd4cad38398bd40e4466f@changeid Signed-off-by: Greg Kroah-Hartman commit c950686b382d0ea5234545fcce252c9e63d7b7a9 Author: Matthias Kaehlcke Date: Wed Jun 9 15:02:48 2021 -0700 usb: host: xhci-plat: Create platform device for onboard hubs in probe() Call onboard_hub_create/destroy_pdevs() from _probe()/_remove() to create/destroy platform devices for onboard USB hubs that may be connected to the root hub of the controller. These functions are a NOP unless CONFIG_USB_ONBOARD_HUB=y/m. Also add a field to struct xhci_hcd to keep track of the onboard hub platform devices that are owned by the xHCI. Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210609150159.v12.4.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid Signed-off-by: Greg Kroah-Hartman commit 412981e06294dac3254d83bbf71d4184ea911d05 Author: Matthias Kaehlcke Date: Wed Jun 9 15:02:47 2021 -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. Acked-by: Rob Herring Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210609150159.v12.3.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid Signed-off-by: Greg Kroah-Hartman commit b4e326165e21d6a11483f6a4de2174b933413554 Author: Matthias Kaehlcke Date: Wed Jun 9 15:02:46 2021 -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). Note: the current series only supports hubs connected directly to a root hub (through xhci-plat), support for other configurations could be added if needed. Co-developed-by: Ravi Chandra Sadineni Acked-by: Alan Stern Signed-off-by: Ravi Chandra Sadineni Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210609150159.v12.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid Signed-off-by: Greg Kroah-Hartman commit 80ee6fc281b7f7b63db46b0eb0c95c0f9500767b Author: Matthias Kaehlcke Date: Wed Jun 9 15:02:45 2021 -0700 dt-bindings: usb: Add binding for Realtek RTS5411 hub controller The Realtek RTS5411 is a USB 3.0 hub controller with 4 ports. This initial version of the binding only describes USB related aspects of the RTS5411, it does not cover the option of connecting the controller as an i2c slave. Reviewed-by: Rob Herring Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210609150159.v12.1.I248292623d3d0f6a4f0c5bc58478ca3c0062b49a@changeid Signed-off-by: Greg Kroah-Hartman commit ddf4a7bcd09439e82c4d6f959f4ff6c53f07466f Author: Finn Thain Date: Fri Jun 11 17:58:27 2021 +1000 powerpc/tau: Remove superfluous parameter in alloc_workqueue() call This avoids an (optional) compiler warning: arch/powerpc/kernel/tau_6xx.c: In function 'TAU_init': arch/powerpc/kernel/tau_6xx.c:204:30: error: too many arguments for format [-Werror=format-extra-args] tau_workq = alloc_workqueue("tau", WQ_UNBOUND, 1, 0); Fixes: b1c6a0a10bfa ("powerpc/tau: Convert from timer to workqueue") Reported-by: Naresh Kamboju Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a1456e8bbd33ef702e3ff6f14b1bf3919241c62b.1623398307.git.fthain@linux-m68k.org commit cd59ea91ea7dd68b31e5d6156078b29123842ed7 Author: Chunfeng Yun Date: Tue Jun 8 15:57:49 2021 +0800 usb: mtu3: use clock bulk to get clocks Use clock bulk helpers to get/enable/disable clocks, meanwhile make sys_ck optional, then will be easier to handle clocks. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-24-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit bfce43c43e2f1925ea3df928a984c001b148f9b9 Author: Chunfeng Yun Date: Tue Jun 8 15:57:39 2021 +0800 usb: mtu3: rebuild role switch get/set hooks Use common helper ssusb_set_mode() to do role switch instead of manual switch helper; Remove unnecessary local variable when get role status Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-14-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 13862176a3124e8d6f192e056dd0586e84b7d777 Author: Chunfeng Yun Date: Tue Jun 8 15:57:38 2021 +0800 usb: mtu3: use force mode for dual role switch Force IDDIG status for all three ways of dual role switch, this is needed when use Type-C to switch mode. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-13-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 6c7b9497622bd825c77fba776f5958a7aced7da2 Author: Chunfeng Yun Date: Tue Jun 8 15:57:37 2021 +0800 usb: mtu3: add helper to get pointer of ssusb_mtk struct Add a helper to get pointer of ssusb_mtk struct from the pointer of otg_switch_mtk struct. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-12-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 18cfd7b85cedfe51af8f19eef2768daa7648c798 Author: Chunfeng Yun Date: Tue Jun 8 15:57:36 2021 +0800 usb: mtu3: rebuild role switch flow of extcon This is a preparation patch to plan to use the same work to handle role switch for all three supported ways. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit a04c9f2d5dba6debe9897ab01f56549961c58fbb Author: Chunfeng Yun Date: Tue Jun 8 15:57:35 2021 +0800 usb: mtu3: use enum usb_role instead of private defined ones Now we mainly use usb-role-switch to set dual role mode, and all three ways supported use the same function to switch mode, use usb_role enum will make code clear Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ae634f93212902c03f487649b4ffe07ac00c7fa0 Author: Chunfeng Yun Date: Tue Jun 8 15:57:34 2021 +0800 usb: mtu3: drop support vbus detection Until now it's never used on any platform, and will not used later. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-9-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 3abf562723d20fef53260464969645e0106f4a93 Author: Chunfeng Yun Date: Tue Jun 8 15:57:33 2021 +0800 usb: mtu3: remove wakelock Prefer to use /sys/power/wake_lock instead. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-8-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 960d3557d20377bb984cdcb5758a2f9fd2eeb850 Author: Chunfeng Yun Date: Tue Jun 8 15:57:32 2021 +0800 usb: mtu3: power down port when power down device IP When power down device IP, we can also power down device port, then power on the port again when power on device ip, it's helpful to make device ip enter ip sleep mode. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit b057da6d549103268a1fcb54046b209309447ae8 Author: Chunfeng Yun Date: Tue Jun 8 15:57:31 2021 +0800 usb: mtu3: power down device IP by default Power down device IP by default until @udc_start is called. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1623139069-8173-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 314538041b5632ffaf64798faaeabaf2793fe029 Author: Martin Fuzzey Date: Tue Jun 1 18:19:53 2021 +0200 rsi: fix AP mode with WPA failure due to encrypted EAPOL In AP mode WPA2-PSK connections were not established. The reason was that the AP was sending the first message of the 4 way handshake encrypted, even though no pairwise key had (correctly) yet been set. Encryption was enabled if the "security_enable" driver flag was set and encryption was not explicitly disabled by IEEE80211_TX_INTFL_DONT_ENCRYPT. However security_enable was set when *any* key, including the AP GTK key, had been set which was causing unwanted encryption even if no key was avaialble for the unicast packet to be sent. Fix this by adding a check that we have a key and drop the old security_enable driver flag which is insufficient and redundant. The Redpine downstream out of tree driver does it this way too. Regarding the Fixes tag the actual code being modified was introduced earlier, with the original driver submission, in dad0d04fa7ba ("rsi: Add RS9113 wireless driver"), however at that time AP mode was not yet supported so there was no bug at that point. So I have tagged the introduction of AP support instead which was part of the patch set "rsi: support for AP mode" [1] It is not clear whether AP WPA has ever worked, I can see nothing on the kernel side that broke it afterwards yet the AP support patch series says "Tests are performed to confirm aggregation, connections in WEP and WPA/WPA2 security." One possibility is that the initial tests were done with a modified userspace (hostapd). [1] https://www.spinics.net/lists/linux-wireless/msg165302.html Signed-off-by: Martin Fuzzey Fixes: 38ef62353acb ("rsi: security enhancements for AP mode") CC: stable@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1622564459-24430-1-git-send-email-martin.fuzzey@flowbird.group commit 8667ab49a6e0942d64b0dafd30cbf4e0c8b08a8f Author: YueHaibing Date: Sun May 23 12:03:39 2021 +0800 libertas: use DEVICE_ATTR_RW macro Use DEVICE_ATTR_RW helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210523040339.2724-1-yuehaibing@huawei.com commit 3f60f4685699aa6006e58e424637e8e413e0a94d Author: Hang Zhang Date: Fri May 21 15:32:38 2021 -0700 cw1200: Revert unnecessary patches that fix unreal use-after-free bugs A previous commit 4f68ef64cd7f ("cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan()") tried to fix a seemingly use-after-free bug between cw1200_bss_info_changed() and cw1200_hw_scan(), where the former frees a sk_buff pointed to by frame.skb, and the latter accesses the sk_buff pointed to by frame.skb. However, this issue should be a false alarm because: (1) "frame.skb" is not a shared variable between the above two functions, because "frame" is a local function variable, each of the two functions has its own local "frame" - they just happen to have the same variable name. (2) the sk_buff(s) pointed to by these two "frame.skb" are also two different object instances, they are individually allocated by different dev_alloc_skb() within the two above functions. To free one object instance will not invalidate the access of another different one. Based on these facts, the previous commit should be unnecessary. Moreover, it also introduced a missing unlock which was addressed in a subsequent commit 51c8d24101c7 ("cw1200: fix missing unlock on error in cw1200_hw_scan()"). Now that the original use-after-free is unreal, these two commits should be reverted. This patch performs the reversion. Fixes: 4f68ef64cd7f ("cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan()") Fixes: 51c8d24101c7 ("cw1200: fix missing unlock on error in cw1200_hw_scan()") Signed-off-by: Hang Zhang Acked-by: Jia-Ju Bai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210521223238.25020-1-zh.nvgt@gmail.com commit 5f4dee73a4bc25a7781a5406b49439bc640981c2 Author: Tong Tiangen Date: Fri Jun 11 09:40:55 2021 +0800 usb: isp1760: Fix meaningless check in isp1763_run() Remove attribution to retval before check, which make it completely meaningless, and does't check what it was supposed: the return value of the timed function to set up configuration flag. Fixes: 60d789f3bfbb ("usb: isp1760: add support for isp1763") Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/r/20210611014055.68551-1-tongtiangen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 03611cc526f9d4854dcd7cf3b7d17f5544d967e8 Author: Ding Senjie Date: Fri May 21 14:27:34 2021 +0800 rtlwifi: Fix spelling of 'download' downlaod -> download Signed-off-by: Ding Senjie Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210521062734.21284-1-dingsenjie@163.com commit a99086057e031a88474a7432c7ed0800a3943e84 Author: Yang Li Date: Tue May 18 09:59:59 2021 +0800 rtlwifi: Remove redundant assignments to ul_enc_algo Variable ul_enc_algo is being initialized with a value that is never read, it is being set again in the following switch statements in all of the case and default paths. Hence the unitialization is redundant and can be removed. Clean up clang warning: drivers/net/wireless/realtek/rtlwifi/cam.c:170:6: warning: Value stored to 'ul_enc_algo' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621303199-1542-1-git-send-email-yang.lee@linux.alibaba.com commit 03a1b938cf39469da4f27b48cb47fa7b3a2f440c Author: Colin Ian King Date: Thu May 13 13:24:09 2021 +0100 rtlwifi: rtl8723ae: remove redundant initialization of variable rtstatus The variable rtstatus is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210513122410.59204-1-colin.king@canonical.com commit c362dd84013e53ce354a8069d0795280c683450c Author: Yang Shen Date: Mon May 17 13:01:40 2021 +0800 wl1251: Fix missing function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ti/wl1251/cmd.c:15: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ti/wl1251/cmd.c:62: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ti/wl1251/cmd.c:103: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ti/wl1251/cmd.c:141: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-11-shenyang39@huawei.com commit e90f9ceb7059518de333bf8b41c06d3dff432d3b Author: Moritz Fischer Date: Mon Jun 14 14:56:14 2021 -0700 usb: renesas-xhci: Replace BIT(15) with macro Replace BIT(15) with RENESAS_ROM_STATUS_ROM_EXISTS. Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210614215614.240489-1-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit dd778f89225cd258e8f0fed2b7256124982c8bb5 Author: Zou Wei Date: Wed May 12 11:05:14 2021 +0800 cw1200: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1620788714-14300-1-git-send-email-zou_wei@huawei.com commit d56b69c4fbc7fc85d1a232967ff72c99c3ea2b95 Author: Zhen Lei Date: Mon May 10 16:22:37 2021 +0800 rtlwifi: btcoex: 21a 2ant: Delete several duplicate condition branch codes The statements of the "if (max_interval == 3)" branch are the same as those of the "else" branch. Delete them to simplify the code. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210510082237.3315-1-thunder.leizhen@huawei.com commit 29ca9e6ca5a5f850829c53557bf18912e56da6c9 Author: Marek Vasut Date: Fri May 7 23:31:49 2021 +0200 rsi: Add support for changing beacon interval Pick code for changing the beacon interval (e.g. using beacon_int in hostap config) from the downstream RSI driver. Signed-off-by: Marek Vasut Cc: Amitkumar Karwar Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Karun Eagalapati Cc: Martin Kepplinger Cc: Prameela Rani Garnepudi Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: netdev@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210507213149.140192-1-marex@denx.de commit b1c3a24897bd528f2f4fda9fea7da08a84ae25b6 Author: Marek Vasut Date: Fri May 7 23:31:05 2021 +0200 rsi: Assign beacon rate settings to the correct rate_info descriptor field The RSI_RATE_x bits must be assigned to struct rsi_data_desc rate_info field. The rest of the driver does it correctly, except this one place, so fix it. This is also aligned with the RSI downstream vendor driver. Without this patch, an AP operating at 5 GHz does not transmit any beacons at all, this patch fixes that. Fixes: d26a9559403c ("rsi: add beacon changes for AP mode") Signed-off-by: Marek Vasut Cc: Amitkumar Karwar Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Karun Eagalapati Cc: Martin Kepplinger Cc: Prameela Rani Garnepudi Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: netdev@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210507213105.140138-1-marex@denx.de commit 29d97219f4035185f229769313021e350972768b Author: Saurav Girepunje Date: Thu May 6 10:18:38 2021 +0530 zd1211rw: Prefer pr_err over printk error msg In zd_usb.c usb_init we can prefer pr_err() over printk KERN_ERR log level. Signed-off-by: Saurav Girepunje Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210506044838.GA7260@user commit 924599d407928b91cb22d9274a347bb90f6f6129 Author: Ping-Ke Shih Date: Thu May 6 09:37:38 2021 +0800 rtlwifi: 8821a: btcoexist: add comments to explain why if-else branches are identical The coexistence programmers preserve the same code of branches intentionally to fine tune performance easier, because bandwidth and RSSI strength are highly related to coexistence performance. The basic rule of performance tuning is to assign most time slot to BT for realtime application, and WiFi uses remaining time slot but don't lower than low bound. Reported-by: Inigo Huguet Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210506013738.5943-1-pkshih@realtek.com commit 7917e90667bc8dce02daa3c2e6df47f6fc9481f7 Author: Dmitry Osipenko Date: Sun Jun 13 17:59:36 2021 +0300 usb: phy: tegra: Correct definition of B_SESS_VLD_WAKEUP_EN bit The B_SESS_VLD_WAKEUP_EN bit 6 was added by a mistake in a previous commit. This bit corresponds to B_SESS_END_WAKEUP_EN, which we don't use. The B_VBUS_VLD_WAKEUP_EN doesn't exist at all and B_SESS_VLD_WAKEUP_EN needs to be in place of it. We don't utilize B-sensors in the driver, so it never was a problem, nevertheless let's correct the definition of the bits. Fixes: 35192007d28d ("usb: phy: tegra: Support waking up from a low power mode") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210613145936.9902-2-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6f8d39a8ef55efde414b6e574384acbce70c3119 Author: Dmitry Osipenko Date: Sun Jun 13 17:59:35 2021 +0300 usb: phy: tegra: Wait for VBUS wakeup status deassertion on suspend Some devices need an extra delay after losing VBUS, otherwise VBUS may be detected as active at suspend time, preventing the PHY's suspension by the VBUS detection sensor. This problem was found on Asus Transformer TF700T (Tegra30) tablet device, where the USB PHY wakes up immediately from suspend because VBUS sensor continues to detect VBUS as active after disconnection. We need to poll the PHY's VBUS wakeup status until it's deasserted before suspending PHY in order to fix this minor trouble. Fixes: 35192007d28d ("usb: phy: tegra: Support waking up from a low power mode") Reported-by: Maxim Schwalm # Asus TF700T Tested-by: Maxim Schwalm # Asus TF700T Reviewed-by: Peter Chen Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210613145936.9902-1-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7af305a1245a7ceff2d8577e011d0a0f7cc33e4c Author: Stanislaw Gruszka Date: Tue May 4 10:12:20 2021 +0200 rt2x00: do not set timestamp for injected frames We setup hardware to insert TSF timestamp for beacon and probe response frames. This is undesired for injected frames, which might want to set their own timestamp values, so disable this setting for injected frames. Tested-by: ZeroBeat Tested-by: n0w1re Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210504081220.666939-1-stf_xl@wp.pl commit d10a87a3535cce2b890897914f5d0d83df669c63 Author: Lee Gibson Date: Wed Apr 28 12:55:08 2021 +0100 wl1251: Fix possible buffer overflow in wl1251_cmd_scan Function wl1251_cmd_scan calls memcpy without checking the length. Harden by checking the length is within the maximum allowed size. Signed-off-by: Lee Gibson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210428115508.25624-1-leegib@gmail.com commit d4f23164cff08de41abfd95ad8610b94137cdf9c Author: Tudor Ambarus Date: Wed Apr 28 05:54:45 2021 +0300 wilc1000: Fix clock name binding Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml requires an "rtc" clock name. drivers/net/wireless/microchip/wilc1000/sdio.c is using "rtc" clock name as well. Comply with the binding in wilc1000/spi.c too. Fixes: 854d66df74ae ("staging: wilc1000: look for rtc_clk clock in spi mode") Signed-off-by: Tudor Ambarus Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210428025445.81953-1-tudor.ambarus@microchip.com commit ad4d74cd81779e8f33e7365ae98280835604e905 Author: zuoqilin Date: Fri Apr 23 17:49:40 2021 +0800 rndis_wlan: simplify is_associated() It is not necessary to define the variable ret to receive the return value of the get_bssid() method. Signed-off-by: zuoqilin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210423094940.1593-1-zuoqilin1@163.com commit 5b4f167ef3555ec4c334a8dc89c1b44bb2c6bff5 Author: Sergio Paracuellos Date: Mon Jun 14 12:06:17 2021 +0200 staging: mt7621-dts: fix pci address for PCI memory range Driver code call 'devm_of_pci_get_host_bridge_resources' to get resources and properly fill 'bridge->windows' and 'bridge->dma_ranges'. After parsing the ranges and store as resources, at the end it makes a call to pci function 'pci_add_resource_offset' to set the offset for the memory resource. To calculate offset, resource start address subtracts pci address of the range. MT7621 does not need any offset for the memory resource. Moreover, setting an offset got into 'WARN_ON' calls from pci devices driver code. Until now memory range pci_addr was being '0x00000000' and res->start is '0x60000000' but becase pci controller driver was manually setting resources and adding them using pci function 'pci_add_resource' where a zero is passed as offset, things was properly working. Since PCI_IOBASE is defined now for ralink we don't set nothing manually anymore so we have to properly fix PCI address for this range to make things work and the new pci address must be set to '0x60000000'. Doing in this way the subtract result obtain zero as offset and pci device driver code properly works. Fixes: d59578da2bb8 ("staging: mt7621-dts: add dts files") Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210614100617.28753-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit b15606e63ea90ced5044bd2007fd7b54298ce293 Author: Sergio Paracuellos Date: Mon Jun 14 12:06:16 2021 +0200 staging: mt7621-pci: remove 'mt7621_pci_parse_request_of_pci_ranges' After 'PCI_IOBASE' is defined for ralink, ranges are properly parsed using pci generic APIS and there is no need to parse anything manually. So function 'mt7621_pci_parse_request_of_pci_ranges' used for this can be enterely removed. Since we have to configure iocu memory regions and pci io windows resources must be retrieved accordly from 'bridge->windows' but there is no need to store anything as driver private data. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210614100617.28753-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 222b27713d7f7e189cca30ccdcee8e1f953d2c9f Author: Sergio Paracuellos Date: Mon Jun 14 12:06:15 2021 +0200 MIPS: ralink: Define PCI_IOBASE PCI_IOBASE is used to create VM maps for PCI I/O ports, it is required by generic PCI drivers to make memory mapped I/O range work. Hence define it for ralink architectures to be able to avoid parsing manually IO ranges in PCI generic driver code. Function 'plat_mem_setup' for ralink is using 'set_io_port_base' call using '0xa0000000' as address, so use the same address in the definition to align things. Acked-by: Thomas Bogendoerfer Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210614100617.28753-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit e0878ad49938cf74260b95fbe6026631b8e754f8 Author: Fabio Aiuto Date: Tue Jun 15 13:45:38 2021 +0200 staging: rtl8723bs: remove two unused files from tree remove unused files from tree, for they are excluded by the build process. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ef7c21270ccaa2ee3d48b93d0a16fa55911c6cce.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 56addfb0893c02d2b046d682a5cef1d8a76b574a Author: Fabio Aiuto Date: Tue Jun 15 13:45:37 2021 +0200 staging: rtl8723bs: remove include/autoconf.h header file from tree remove include/autoconf.h header file from tree. It just contains a compiler configuration check which is not needed. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9317fa8fd41da4668a41775207b5e6dad33e7447.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 414ce135c4223d59bca4f0e92d27cce64bff8309 Author: Fabio Aiuto Date: Tue Jun 15 13:45:36 2021 +0200 staging: rtl8723bs: move LPS_RPWM_WAIT_MS macro move LPS_RPWM_WAIT_MS macro from include/autoconf.h to include/hal_btcoex.h in order to empty unneeded autoconf.h. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5756b958b5d279f1cc8cea7887f50d003b17b94e.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b4e1882d750facd317ac2572d6bf36a05b0b0c36 Author: Fabio Aiuto Date: Tue Jun 15 13:45:35 2021 +0200 staging: rtl8723bs: remove HAL_{BB,MAC,RF,FW}_ENABLE macros remove HAL_{BB,MAC,RF,FW}_ENABLE macros. They are used to turn on/off by hand some core capabilities we want to be always 'on'. So remove usages and definitions. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/04248acbd22f9be30d21891926e134490b34036a.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit bb1c456d7f88b60b28b9f51e28031fc67cdb8d7b Author: Fabio Aiuto Date: Tue Jun 15 13:45:34 2021 +0200 staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro remove unneeded DISABLE_BB_RF macro. This is just a symbolic constant used to disable by hand-edit some core hardware capabilities which we want to be always enabled. So just remove it. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1a56a6b2f9f846197e8e25769ad86ad23e530047.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 298a52a37ab7e48ce2804841073c34bba576ccf5 Author: Fabio Aiuto Date: Tue Jun 15 13:45:33 2021 +0200 staging: rtl8723bs: remove unused WAKEUP_GPIO_IDX macro definition remove unused WAKEUP_GPIO_IDX macro definition. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6bf5ddf3e4465840cdfcca79a524645cdaf0104d.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6f8b3e04bfa671d6f3818f449cb581efbfd0a732 Author: Fabio Aiuto Date: Tue Jun 15 13:45:32 2021 +0200 staging: rtl8723bs: remove unneeded comments remove unneeded comments in include/autoconf.h Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4c1ea0e7ddceebba1afe1485662c204db5dfa9c7.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a22bda6df28ce1fd197598a9e2613c7693dc5df1 Author: Fabio Aiuto Date: Tue Jun 15 13:45:31 2021 +0200 staging: rtl8723bs: remove unused debug macro remove unused debug macro definition in include/autoconf.h Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4d1e9ad759fc4b66fa3309637b3b4c8eb81d2ea9.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7b7362ba27a23a9042e2423407e6ce16d388aba0 Author: Hui Tang Date: Wed May 19 14:55:45 2021 +0800 wlcore: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Tony Lindgren Signed-off-by: Hui Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621407345-10625-4-git-send-email-tanghui20@huawei.com commit 084eb606dbcfe363f228d27d211cfcdd69bc0f2f Author: Hui Tang Date: Wed May 19 14:55:44 2021 +0800 rt2x00: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Stanislaw Gruszka Signed-off-by: Hui Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621407345-10625-3-git-send-email-tanghui20@huawei.com commit bd65fe550973b8fafea9b06aa7435931ad13ae27 Author: Hui Tang Date: Wed May 19 14:55:43 2021 +0800 libertas: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Ganapathi Bhat Signed-off-by: Hui Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621407345-10625-2-git-send-email-tanghui20@huawei.com commit c3b67ea3d97a5e08f7ccb0e2c90b0913b92c01cc Author: Yang Shen Date: Mon May 17 13:01:41 2021 +0800 wlcore: Fix missing function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ti/wlcore/cmd.c:824: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ti/wlcore/cmd.c:853: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/ti/wlcore/cmd.c:882: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-12-shenyang39@huawei.com commit c707db1b2e7ba62e78998544a257fc68a3c4edd7 Author: Yang Shen Date: Mon May 17 13:01:39 2021 +0800 rsi: Fix missing function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_mgmt.c:1550: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Amitkumar Karwar Cc: Siva Rebbagondla Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-10-shenyang39@huawei.com commit 9a0fb9502f0dd4c41e59d6c3390794a81fca2bc3 Author: Yang Shen Date: Mon May 17 13:01:38 2021 +0800 rtlwifi: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:124: warning: expecting prototype for writeLLT(). Prototype was for rtl92c_llt_write() instead drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:154: warning: expecting prototype for rtl92c_init_LLT_table(). Prototype was for rtl92c_init_llt_table() instead Cc: Ping-Ke Shih Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-9-shenyang39@huawei.com commit 30657b8ee459f3878647d29799bd13b7cf2c95f9 Author: Yang Shen Date: Mon May 17 13:01:37 2021 +0800 libertas_tf: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/libertas_tf/if_usb.c:56: warning: expecting prototype for if_usb_wrike_bulk_callback(). Prototype was for if_usb_write_bulk_callback() instead Signed-off-by: Yang Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-8-shenyang39@huawei.com commit 184b69c5d3a7ec778b370ba00c05174d365bcc18 Author: Sergey Larin Date: Tue Jun 15 01:24:20 2021 +0300 mfd: max8907: Remove IRQF_NO_AUTOEN flag IRQF_NO_AUTOEN flag doesn't go well with IRQF_SHARED flag - the check in request_threaded_irq fails and exits with EINVAL. So we ignore the flag and enable it on the first IRQ request. No interrupt should arrive from the chip as all interrupts are masked by default. Signed-off-by: Sergey Larin Signed-off-by: Lee Jones commit afb349c09601fbf1b0f4d9fc6360d1181ba2ed4f Author: Zhen Lei Date: Wed Jun 2 19:43:39 2021 +0800 mfd: ab8500-core: Use DEVICE_ATTR_RO/RW macro Use DEVICE_ATTR_RO/RW macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 5089e34f7bba84871f39e8a8989b0c7b88b715b4 Author: Zhen Lei Date: Wed Jun 2 19:43:38 2021 +0800 mfd: intel_soc_pmic_bxtwc: Use DEVICE_ATTR_ADMIN_RW macro Use DEVICE_ATTR_ADMIN_RW macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 24676b3ef8c4621964d71b10678b87414417cc7f Author: Zhen Lei Date: Wed Jun 2 19:43:37 2021 +0800 mfd: janz-cmodio: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 870a6e1539829356baf70b57c933d0b309cfac21 Author: 周琰杰 (Zhou Yanjie) Date: Sat Jun 5 00:31:45 2021 +0800 clocksource/drivers/ingenic: Rename unreasonable array names 1.Rename the "ingenic_ost_clk_info[]" to "x1000_ost_clk_info[]" to facilitate the addition of OST support for X2000 SoC in a later commit 2.When the OST support for X2000 SoC is added, there will be two compatible strings, so renaming "ingenic_ost_of_match[]" to "ingenic_ost_of_matches[]" is more reasonable 3.Remove the unnecessary comma in "ingenic_ost_of_matches[]" to reduce code size as much as possible. Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1622824306-30987-2-git-send-email-zhouyanjie@wanyeetech.com commit 9517c577f9f722270584cfb1a7b4e1354e408658 Author: Tony Lindgren Date: Thu Apr 15 11:55:06 2021 +0300 clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFG As we are using cpu_pm to save and restore context, we must also save and restore the timer sysconfig register TIOCP_CFG. This is needed because we are not calling PM runtime functions at all with cpu_pm. Fixes: b34677b0999a ("clocksource/drivers/timer-ti-dm: Implement cpu_pm notifier for context save and restore") Cc: Aaro Koskinen Cc: Adam Ford Cc: Andreas Kemnade Cc: Lokesh Vutla Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210415085506.56828-1-tony@atomide.com commit 75ac5cc2ee6b499bc0225ad67302271772929f19 Author: Evan Benn Date: Wed May 12 12:25:44 2021 +1000 clocksource/drivers/mediatek: Ack and disable interrupts on suspend Interrupts are disabled during suspend before this driver disables its timers. ARM trusted firmware will abort suspend if the timer irq is pending, so ack and disable the timer interrupt during suspend. Signed-off-by: Evan Benn Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210512122528.v4.1.I1d9917047de06715da16e1620759f703fcfdcbcb@changeid commit cd5bde2ce8cc869e0a4698f87dcccad6f0aac70f Author: Zhen Lei Date: Wed Jun 2 19:43:36 2021 +0800 mfd: kempld-core: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 3ec2ff37230e1c961d4b0d0118dd23c46b5bcdbb Author: Jiri Slaby Date: Thu Jun 10 11:02:47 2021 +0200 tty: make use of tty_get_{char,frame}_size In the previous patch, we introduced tty_get_char_size() and tty_get_frame_size() for computing character and frame sizes, respectively. Here, we make use of them in various tty drivers where applicable. The stats look nice: 12 insertions, 169 deletions. Cc: Arnd Bergmann Cc: David Lin Cc: Johan Hovold Cc: Alex Elder Cc: Shawn Guo Cc: Sascha Hauer Cc: Andy Gross Cc: Bjorn Andersson Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Oliver Neukum Acked-by: Alex Elder Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210610090247.2593-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d8f0209bfedb801d06a81a74b003a882dee3ea3f Author: Jiri Slaby Date: Thu Jun 10 11:02:46 2021 +0200 cypress_m8: switch data_bits to real character bits Make data_bits what it really is. Assign proper bit counts to data_bits instead of magic 0..3. There are two reasons: 1) it's clear what we store there, and 2) it will make the transition to tty_tty_get_char_size() in the next patch easier. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210610090247.2593-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 8ea43acc690ca2fe88500356f25c431d25f8a0bb Author: Jiri Slaby Date: Thu Jun 10 11:02:45 2021 +0200 mxs-auart: redefine AUART_LINECTRL_WLEN to accept bits count It's a bit illogical to take magic constants in AUART_LINECTRL_WLEN. Like in auart_console_get_options(), 2 means 7 bits. Switch AUART_LINECTRL_WLEN to accept bit length, i.e. let it subtract 5 from the parameter before doing the logic. This will ease conversion from CSIZE to bits in mxs_auart_settermios() in the next patch. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210610090247.2593-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 654ee49b7e0883e660be6e6e20876fc4cbdaadd1 Author: Jiri Slaby Date: Thu Jun 10 11:02:44 2021 +0200 tty: make tty_get_{char,frame}_size available Many tty drivers contain code to compute bits count depending on termios cflags. So extract this code from serial core to two separate tty helper functions: * tty_get_char_size -- only size of a character, without flags, * tty_get_frame_size -- complete size of a frame including flags. In the next patch, calls to these new functions replace many copies of this code. Note that we accept only cflag as a parameter. That's because some callers like pch_uart_startup or sunsab_console_setup don't have at hand termios which we could pass around. Cc: Joe Perches Cc: Johan Hovold Reviewed-by: Andy Shevchenko Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210610090247.2593-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 426d94a91456e9009296823f023de502d7bc28e4 Author: Zhen Lei Date: Wed Jun 2 19:43:35 2021 +0800 mfd: pcf50633: Use DEVICE_ATTR_ADMIN_RO macro Use DEVICE_ATTR_ADMIN_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit a2cb660b2fefbe5f8b2375bca2da21e67fbf5573 Author: Zhen Lei Date: Wed Jun 2 19:43:34 2021 +0800 mfd: sm501: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit fb524360f52228201b56149a138369da505141a2 Author: Jiri Slaby Date: Thu Jun 10 11:03:07 2021 +0200 ipwireless: remove unused ipw_tty::closing It's only set, but never read because commit 01261cb94318 ("tty: ipwireless: Remove tty->closing abort from ipw_open()") removed last use of tty::closing. Cc: Jiri Kosina Cc: David Sterba Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210610090307.2689-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a7770a4bfcf4e6dea406304c2386c6a9505e9999 Author: Erwan Le Ray Date: Thu Jun 10 12:00:20 2021 +0200 serial: stm32: defer probe for dma devices Defer device probe operation when a DMA channel request probe deferral. With this change both DMA channels are acquired before DMA channels are configured. Once no probe deferral is expected, DMAs are configured and any failure in their configuration will make the driver to fallback to interrupt mode as prior this change. Signed-off-by: Erwan Le Ray Signed-off-by: Etienne Carriere Link: https://lore.kernel.org/r/20210610100020.2318-1-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit ae7955f7250efedb959391e73018b607a51e78b2 Author: Zhen Lei Date: Wed Jun 2 19:43:33 2021 +0800 mfd: timberdale: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit af9a1f61ac331c2f910d9186767d02f8e982c38e Author: Mikko Perttunen Date: Wed Jun 9 18:56:55 2021 +0300 serial: tegra-tcu: Reorder channel initialization Request the RX mailbox only after initializing the UART data structures. Otherwise it can rarely happen that the receive callback is called before the UART is ready. Fixes: 2d908b38d409 ("serial: Add Tegra Combined UART driver") Signed-off-by: Mikko Perttunen Link: https://lore.kernel.org/r/20210609155655.3567545-1-mperttunen@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 47ed390bac52c5814c03253d15a6ffe85ef69ba5 Author: Zhen Lei Date: Wed Jun 2 19:43:32 2021 +0800 mfd: ucb1x00-assabet: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 08a84410a04f05c7c1b8e833f552416d8eb9f6fe Author: Yoshihiro Shimoda Date: Thu Jun 10 20:08:06 2021 +0900 serial: sh-sci: Stop dmaengine transfer in sci_stop_tx() Stop dmaengine transfer in sci_stop_tx(). Otherwise, the following message is possible output when system enters suspend and while transferring data, because clearing TIE bit in SCSCR is not able to stop any dmaengine transfer. sh-sci e6550000.serial: ttySC1: Unable to drain transmitter Note that this driver has already used some #ifdef in the .c file so that this patch also uses #ifdef to fix the issue. Otherwise, build errors happens if the CONFIG_SERIAL_SH_SCI_DMA is disabled. Fixes: 73a19e4c0301 ("serial: sh-sci: Add DMA support.") Cc: # v4.9+ Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210610110806.277932-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman commit 981ce06ab8dd642aff90ce91726da1c5e73eb25b Author: Zhen Lei Date: Wed Jun 2 19:43:31 2021 +0800 mfd: wm831x: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Acked-by: Charles Keepax Signed-off-by: Lee Jones commit bbf29d3a2e49e482d5267311798aec42f00e88f3 Author: Kumar Kartikeya Dwivedi Date: Sat Jun 12 08:05:01 2021 +0530 libbpf: Set NLM_F_EXCL when creating qdisc This got lost during the refactoring across versions. We always use NLM_F_EXCL when creating some TC object, so reflect what the function says and set the flag. Fixes: 715c5ce454a6 ("libbpf: Add low level TC-BPF management API") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210612023502.1283837-3-memxor@gmail.com commit 4e164f8716853b879e2b1a21a12d54c57f11372e Author: Kumar Kartikeya Dwivedi Date: Sat Jun 12 08:05:00 2021 +0530 libbpf: Remove unneeded check for flags during tc detach Coverity complained about this being unreachable code. It is right because we already enforce flags to be unset, so a check validating the flag value is redundant. Fixes: 715c5ce454a6 ("libbpf: Add low level TC-BPF management API") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210612023502.1283837-2-memxor@gmail.com commit d3cfc3dd40b4bb2e44ca3dbce35e813608b1b601 Author: Phillip Potter Date: Tue Jun 15 01:15:07 2021 +0100 staging: rtl8188eu: remove DBG_88E macro definition As all callers have now been removed, remove the definition of the DBG_88E macro itself. It is no longer required and is dead code. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-29-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 2b1b85f0dae0228f1f677ac62723b2331988e5cc Author: Phillip Potter Date: Tue Jun 15 01:15:06 2021 +0100 staging: rtl8188eu: remove core/rtw_debug.c Remove core/rtw_debug.c as all the functions contained within it are entirely unused, and modify the Makefile to remove it as a build requirement. Also remove the function declarations from include/rtw_debug.h - this is part of an ongoing effort to purge dead/unused code and cleanup this driver. This has the helpful side effect of removing all DBG_88E macro calls within this file as well. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-28-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit cfdff814cdbd9f3c620faf11f18d171ede16978f Author: Phillip Potter Date: Tue Jun 15 01:15:05 2021 +0100 staging: rtl8188eu: remove converted netdev_dbg calls from core/rtw_sta_mgt.c Remove all previously converted netdev_dbg calls from core/rtw_sta_mgt.c, as these were originally DBG_88E macro calls, and therefore of dubious necessity to begin with. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-27-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 7e5bcf11e329d526fba77cb797ebb210987ae6c5 Author: Phillip Potter Date: Tue Jun 15 01:15:04 2021 +0100 staging: rtl8188eu: remove converted netdev_dbg calls from core/rtw_recv.c Remove all previously converted netdev_dbg calls from core/rtw_recv.c, as these were originally DBG_88E macro calls, and therefore of dubious necessity to begin with. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-26-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit e04bd12f265ba63a7149981eb87674978a506cfd Author: Phillip Potter Date: Tue Jun 15 01:15:03 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188eu_xmit.c Remove all DBG_88E calls from hal/rtl8188eu_xmit.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-25-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 8e2b258baabb1826d475275dec4d62afb117cc78 Author: Phillip Potter Date: Tue Jun 15 01:15:02 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188eu_recv.c Remove all DBG_88E calls from hal/rtl8188eu_recv.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-24-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit b3ccfe3f22011faf456b563a329d67f9d6265472 Author: Phillip Potter Date: Tue Jun 15 01:15:01 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/usb_halinit.c Remove all DBG_88E calls from hal/usb_halinit.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove unused jiffies variable from the start of rtl8188eu_hal_init. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-23-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 574e725d7330261f0d81afc613d5b890c466b76f Author: Phillip Potter Date: Tue Jun 15 01:15:00 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_xmit.c Remove all DBG_88E calls from hal/rtl8188e_xmit.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-22-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 325eabd92d46700e0be571435bb713b16921c246 Author: Phillip Potter Date: Tue Jun 15 01:14:59 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_hal_init.c Remove all DBG_88E calls from hal/rtl8188e_hal_init.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-21-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 90da970c55c1e766e53f58eea3275cd385144744 Author: Phillip Potter Date: Tue Jun 15 01:14:58 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/pwrseqcmd.c Remove all DBG_88E calls from hal/pwrseqcmd.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-20-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 9a5ad3a2a4e6f948efbc5f4ddde8190dc25d2058 Author: Phillip Potter Date: Tue Jun 15 01:14:57 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_cmd.c Remove all DBG_88E calls from hal/rtl8188e_cmd.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-19-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f8b15397b14d210a66ee0529d939761f1e730bb0 Author: Phillip Potter Date: Tue Jun 15 01:14:56 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from hal/hal_intf.c Remove all DBG_88E calls from hal/hal_intf.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-18-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f7d851054ac9b4e92652ae1212b8cf55376f6614 Author: Phillip Potter Date: Tue Jun 15 01:14:55 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from os_dep/rtw_android.c Remove all DBG_88E calls from os_dep/rtw_android.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-17-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit de7711881eb45463f01e467b21256c5e5417b39d Author: Phillip Potter Date: Tue Jun 15 01:14:54 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from os_dep/xmit_linux.c Remove all DBG_88E calls from os_dep/xmit_linux.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-16-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit d3a5c77af7ec0eb98ae9fd09356035cba79092ac Author: Phillip Potter Date: Tue Jun 15 01:14:53 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from os_dep/mlme_linux.c Remove all DBG_88E calls from os_dep/mlme_linux.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-15-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 8379df4f375514b8cb8dacbe983a5cab54239dd4 Author: Phillip Potter Date: Tue Jun 15 01:14:52 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from os_dep/os_intfs.c Remove all DBG_88E calls from os_dep/os_intfs.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove variable declarations for variables which now go unused as a result of this change with os_dep/os_intfs.c Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-14-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 4a9b797466903e627ee2d431f77b2fc3e0746d6e Author: Phillip Potter Date: Tue Jun 15 01:14:51 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from os_dep/usb_intf.c Remove all DBG_88E calls from os_dep/usb_intf.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-13-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f4a0ab46339c8cab92c38c652e387c0afa1cd435 Author: Phillip Potter Date: Tue Jun 15 01:14:50 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from os_dep/ioctl_linux.c Remove all DBG_88E calls from os_dep/ioctl_linux.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-12-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 2bcb099dcc64a243d415f0c065a87ad0be227fa9 Author: Phillip Potter Date: Tue Jun 15 01:14:49 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_mlme.c Remove all DBG_88E calls from core/rtw_mlme.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-11-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 089b7e431538cea0789302d074bc4ee383f5ae48 Author: Phillip Potter Date: Tue Jun 15 01:14:48 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ioctl_set.c Remove all DBG_88E calls from core/rtw_ioctl_set.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-10-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 847b23462b719e48d518f7b8d104a2e6222c5af5 Author: Phillip Potter Date: Tue Jun 15 01:14:47 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_security.c Remove all DBG_88E calls from core/rtw_security.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-9-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 000d5887ae4b3f35ec80434e71525e54e8c95165 Author: Phillip Potter Date: Tue Jun 15 01:14:46 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ieee80211.c Remove all DBG_88E calls from core/rtw_ieee80211.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-8-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 77555d49a37ba27ed020e9729a6233e508081cdb Author: Phillip Potter Date: Tue Jun 15 01:14:45 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_pwrctrl.c Remove all DBG_88E calls from core/rtw_pwrctrl.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove pmlmepriv declaration from within rtw_ps_processor as it is now no longer used. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 31a0e87fbff2adf7e66beeb98dcd8f6af156f1bc Author: Phillip Potter Date: Tue Jun 15 01:14:44 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ap.c Remove all DBG_88E calls from core/rtw_ap.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 857c3a9e690f6aa6e8e56a3e0edd531a10ff2953 Author: Phillip Potter Date: Tue Jun 15 01:14:43 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_wlan_util.c Remove all DBG_88E calls from core/rtw_wlan_util.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit e83e5dbbf4b79255cbda59522f8bcbda50d26f56 Author: Phillip Potter Date: Tue Jun 15 01:14:42 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_mlme_ext.c Remove all DBG_88E calls from core/rtw_mlme_ext.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove variable declarations for variables which now go unused as a result of this change with core/rtw_mlme_ext.c Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit ba82ad78925b84c91aa618d74e5c4493418f6658 Author: Phillip Potter Date: Tue Jun 15 01:14:41 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_xmit.c Remove all DBG_88E calls from core/rtw_xmit.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove static rtw_sctx_chk_warning_status function, as it no longer has any callers. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 9a6780227ece18b6ad1ae6514a46a6850dfa9971 Author: Phillip Potter Date: Tue Jun 15 01:14:40 2021 +0100 staging: rtl8188eu: remove all DBG_88E calls from core/rtw_efuse.c Remove all DBG_88E calls from core/rtw_efuse.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210615001507.1171-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 6d400d7cee386adba1c9428865cf1c59f6f92aed Author: Fabio M. De Francesco Date: Fri May 14 10:11:11 2021 +0200 staging: unisys: visorhba: Convert module from IDR to XArray Converted visorhba from IDR to XArray. The abstract data type XArray is more memory-efficient, parallelizable, and cache friendly. It takes advantage of RCU to perform lookups without locking. Furthermore, IDR is deprecated because XArray has a better (cleaner and more consistent) API. Reviewed-by: Dan Carpenter Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210514081112.19542-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3da286aa4a8c1fe807ac082edc043c1d2d538d28 Author: Zhen Lei Date: Tue Jun 1 15:00:09 2021 +0800 mfd: wm831x: Use DEFINE_RES_IRQ_NAMED() and DEFINE_RES_IRQ() to simplify code No functional change. Signed-off-by: Zhen Lei Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 6a5976f23dc38749afcb62cc3acf5e3e2b53d5ba Author: Patrice Chotard Date: Tue Jun 15 11:01:15 2021 +0200 spi: stm32-qspi: Remove unused qspi field of struct stm32_qspi_flash Remove struct stm32_qspi_flash's field qspi which is not used. Fixes: c530cd1d9d5e ("spi: spi-mem: add stm32 qspi controller") Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210615090115.30702-1-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit f3f4f37d53be578c65dd32a1ffad432b33aef236 Author: Axel Lin Date: Tue Jun 15 18:39:47 2021 +0800 regulator: rt6160: Remove vsel_active_low from struct rt6160_priv Use a local variable instead is enough, this simplifies the code. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210615103947.3387994-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 355af6c0c09d4dd0d97fa1aca0ff797b64cd6187 Author: Pu Lehui Date: Tue Jun 15 19:33:24 2021 +0800 ASoC: codecs: wcd938x: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Signed-off-by: Pu Lehui Link: https://lore.kernel.org/r/20210615113324.238837-1-pulehui@huawei.com Signed-off-by: Mark Brown commit f35550386041d07668ec6206de8e85763f0ebd98 Merge: 6f73de7da10b9 8c1b3b159300c Author: Mark Brown Date: Tue Jun 15 12:51:46 2021 +0100 Merge series "Unify NVIDIA Tegra ASoC machine drivers" from Dmitry Osipenko : This series squashes all the ASoC machine drivers into a single one, this change was suggested by Jon Hunter. It also sets driver_name and components string of each card, allowing userspace alsa-lib to find UCMs at predictable path. Changelog: v6: - Fixed missed configuration of AC97 clock rate for the WM9712 codec in the unified driver. - Added new patch that removes now obsolete "utils" helpers and moves code into the unified driver. ASoC: tegra: Squash utils into common machine driver v5: - The v4 removed the customization of components string for Nexus 7, but I missed to remove the "components" hook which is unused now, it's removed in v5 for consistency. - Slightly improved naming of the common 12MHz MCLK rate function to make it more consistent with the rest of the driver functions. v4: - Moved out mclk_rate callback that is currently used only by WM8903 machine driver from the common driver. This was suggested by Jon Hunter. - Dropped patch which was setting custom components string for Nexus 7. Jaroslav Kysela wants it to be specified in a device-tree, but the components string doesn't have a firm specification for today. It's better to drop this change for now since it's optional anyways. - Fixed compilation error that was reported by kernel robot for v3. - Jaroslav Kysela merged alsa-ucm-conf PR [1] which added UCMs for Nexus 7 and Acer A500. The UCMs are fully working using a combination of updated kernel + alsa-ucm-conf master + alsa-lib master, meaning that they will work with the next releases of kernel and ALSA userspace upstream packages. - Added ack from Jaroslav Kysela to the "Specify components string for each card" patch that he gave to v3. v3: - Added components string as was suggested by Jaroslav Kysela to v2. - Renamed MCLK rate function that is used by max98090 and other codecs to make it look more generic. Added option for specifying CLK ID per device. This all was suggested by Jon Hunter to v2. v2: - Dropped use of of_device_compatible_match(), like it was suggested by Rob Herring in a review comment to v1. - Added patch that sets card's driver_name of as Tegra ASoC drivers. In a comment to v1 Jaroslav Kysela suggested that the Tegra drivers don't set the card name properly and he was right. I opened pull request with the new Tegra UCMs and updated lookup paths for older UCMs [1]. [1] https://github.com/alsa-project/alsa-ucm-conf/pull/92 Dmitry Osipenko (4): ASoC: tegra: Set driver_name=tegra for all machine drivers ASoC: tegra: Unify ASoC machine drivers ASoC: tegra: Specify components string for each card ASoC: tegra: Squash utils into common machine driver sound/soc/tegra/Kconfig | 12 + sound/soc/tegra/Makefile | 19 +- sound/soc/tegra/tegra_alc5632.c | 259 -------- sound/soc/tegra/tegra_asoc_machine.c | 854 +++++++++++++++++++++++++++ sound/soc/tegra/tegra_asoc_machine.h | 49 ++ sound/soc/tegra/tegra_asoc_utils.c | 225 ------- sound/soc/tegra/tegra_asoc_utils.h | 38 -- sound/soc/tegra/tegra_max98090.c | 276 --------- sound/soc/tegra/tegra_rt5640.c | 222 ------- sound/soc/tegra/tegra_rt5677.c | 324 ---------- sound/soc/tegra/tegra_sgtl5000.c | 211 ------- sound/soc/tegra/tegra_wm8753.c | 185 ------ sound/soc/tegra/tegra_wm8903.c | 351 +++-------- sound/soc/tegra/tegra_wm9712.c | 166 ------ sound/soc/tegra/trimslice.c | 172 ------ 15 files changed, 996 insertions(+), 2367 deletions(-) delete mode 100644 sound/soc/tegra/tegra_alc5632.c create mode 100644 sound/soc/tegra/tegra_asoc_machine.c create mode 100644 sound/soc/tegra/tegra_asoc_machine.h delete mode 100644 sound/soc/tegra/tegra_asoc_utils.c delete mode 100644 sound/soc/tegra/tegra_asoc_utils.h delete mode 100644 sound/soc/tegra/tegra_max98090.c delete mode 100644 sound/soc/tegra/tegra_rt5640.c delete mode 100644 sound/soc/tegra/tegra_rt5677.c delete mode 100644 sound/soc/tegra/tegra_sgtl5000.c delete mode 100644 sound/soc/tegra/tegra_wm8753.c delete mode 100644 sound/soc/tegra/tegra_wm9712.c delete mode 100644 sound/soc/tegra/trimslice.c -- 2.30.2 commit 84c5e23edecd7013ceaed8460deed5c33842cb8d Author: Gavin Shan Date: Mon Jun 14 20:27:01 2021 +0800 arm64: mm: Pass original fault address to handle_mm_fault() Currently, the lower bits of fault address is cleared before it's passed to handle_mm_fault(). It's unnecessary since generic code does same thing since the commit 1a29d85eb0f19 ("mm: use vmf->address instead of of vmf->virtual_address"). This passes the original fault address to handle_mm_fault() in case the generic code needs to know the exact fault address. Signed-off-by: Gavin Shan Acked-by: Catalin Marinas Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20210614122701.100515-1-gshan@redhat.com Signed-off-by: Will Deacon commit 4aaa87ab3d2de485d8aae7a88cc9cb02dcd2c450 Author: Anshuman Khandual Date: Mon Jun 14 13:48:26 2021 +0530 arm64/mm: Drop SECTION_[SHIFT|SIZE|MASK] SECTION_[SHIFT|SIZE|MASK] are essentially PMD_[SHIFT|SIZE|MASK]. But these create confusion being similar to generic sparsemem memory sections, which are derived from SECTION_SIZE_BITS. Section references have always implied PMD level block mapping. Instead just use all PMD level macros which would make it explicit and also remove confusion with sparsmem memory sections. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Gavin Shan Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/1623658706-7182-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit ca6ece6a76a8b5d8b428429c2803df48a69ee88b Author: Anshuman Khandual Date: Mon Jun 14 15:12:35 2021 +0530 arm64/mm: Use CONT_PMD_SHIFT for ARM64_MEMSTART_SHIFT ARM64_MEMSTART_SIZE needs to be aligned with CONT_PMD_SIZE on 16K page size config. Hence just directly use CONT_PMD_SHIFT. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Gavin Shan Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/1623663755-8949-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 0f473ac746a992b3afd994ccd1ac73052ea256f2 Author: Anshuman Khandual Date: Mon Jun 14 15:40:11 2021 +0530 arm64/mm: Drop SWAPPER_INIT_MAP_SIZE The commit cdef5f6e9e0e ("arm64: mm: allocate pagetables anywhere") had dropped the last reference to SWAPPER_INIT_MAP_SIZE. Hence just clean up. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Reviewed-by: Gavin Shan Link: https://lore.kernel.org/r/1623665411-20055-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit b18f901382fdb74a138a0bf30458c54a023a1d86 Author: Gil Fine Date: Mon Jun 14 16:52:10 2021 +0300 thunderbolt: Fix DROM handling for USB4 DROM DROM for USB4 host/device has a shorter header than Thunderbolt DROM header. This patch addresses host/device with USB4 DROM (According to spec: Universal Serial Bus 4 (USB4) Device ROM Specification, Rev 1.0, Feb-2021). While there correct the data_len field to be 12 bits and rename __unknown1 to reserved following the spec. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 5a8e5dae2a22d1580f6d72be54bb57ab29305cc6 Author: Shaokun Zhang Date: Mon May 24 16:20:43 2021 +0800 brcmsmac: Remove the repeated declaration Function 'brcms_c_stf_phy_txant_upd' are declared twice, remove the repeated declaration. Cc: Kalle Valo Signed-off-by: Shaokun Zhang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621844443-38290-1-git-send-email-zhangshaokun@hisilicon.com commit 3ce6c9e2617ebc09b2d55cc88134b90c19ff6d31 Author: Marco Felsch Date: Tue May 25 11:10:03 2021 +0200 spi: add of_device_uevent_modalias support Add OF support as already done for ACPI to take driver MODULE_DEVICE_TABLE(of, ..) into account. For example with this change a spi nor device MODALIAS changes from: MODALIAS=spi:spi-nor to MODALIAS=of:Nspi-flashT(null)Cjedec,spi-nor Signed-off-by: Marco Felsch Link: https://lore.kernel.org/r/20210525091003.18228-1-m.felsch@pengutronix.de Signed-off-by: Mark Brown commit 6f73de7da10b9476232820558fb7b3eb6bb9afe4 Author: Shengjiu Wang Date: Wed Jun 2 14:02:50 2021 +0800 ASoC: dt-bindings: fsl-sai: Add compatible string for imx8mm/8mn/8mp/8ulp Add compatible string for imx8mm/8mn/8mp/8ulp, these platforms all support SAI IP. Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1622613770-10220-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit cb7d734ea9b85f49f26d04d8de09ece363cbd6fc Author: Shengjiu Wang Date: Wed Jun 2 14:04:09 2021 +0800 ASoC: dt-bindings: fsl,spdif: Add compatible string for imx8ulp Add compatible string for imx8ulp, which supports spdif module Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1622613849-10271-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 8c1b3b159300cc5ef6ba0d4b039ef68e766d46e3 Author: Dmitry Osipenko Date: Sat May 29 18:46:49 2021 +0300 ASoC: tegra: Squash utils into common machine driver There no users left of the utils other than the new common machine driver. Squash the utils into the common machine driver in order to simplify code. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210529154649.25936-5-digetx@gmail.com Signed-off-by: Mark Brown commit c16aab8ddc645f129880a266c1626b07b41f7c55 Author: Dmitry Osipenko Date: Sat May 29 18:46:48 2021 +0300 ASoC: tegra: Specify components string for each card Specify components string for each card of each supported device. It's a free form string that describes audio hardware configuration. This information is useful for ALSA UCM rules. It allows to generalize UCM rules, potentially removing a need to add new UCM rule for each device. Acked-by: Jaroslav Kysela Suggested-by: Jaroslav Kysela Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210529154649.25936-4-digetx@gmail.com Signed-off-by: Mark Brown commit cc8f70f5603986a99e7775f3cc4a10d337b82a4d Author: Dmitry Osipenko Date: Sat May 29 18:46:47 2021 +0300 ASoC: tegra: Unify ASoC machine drivers Squash all machine drivers into a single-universal one. This reduces code duplication, eases addition of a new drivers and upgrades older code to a modern Linux kernel APIs. Suggested-by: Jonathan Hunter Co-developed-by: Ion Agorria Signed-off-by: Ion Agorria Co-developed-by: Svyatoslav Ryhel Signed-off-by: Svyatoslav Ryhel Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210529154649.25936-3-digetx@gmail.com Signed-off-by: Mark Brown commit f6eb84fa596abf28959fc7e0b626f925eb1196c7 Author: Dmitry Osipenko Date: Sat May 29 18:46:46 2021 +0300 ASoC: tegra: Set driver_name=tegra for all machine drivers The driver_name="tegra" is now required by the newer ALSA UCMs, otherwise Tegra UCMs don't match by the path/name. All Tegra machine drivers are specifying the card's name, but it has no effect if model name is specified in the device-tree since it overrides the card's name. We need to set the driver_name to "tegra" in order to get a usable lookup path for the updated ALSA UCMs. The new UCM lookup path has a form of driver_name/card_name. The old lookup paths that are based on driver module name continue to work as before. Note that UCM matching never worked for Tegra ASoC drivers if they were compiled as built-in, this is fixed by supporting the new naming scheme. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210529154649.25936-2-digetx@gmail.com Signed-off-by: Mark Brown commit 9a25344d5177c2b9285532236dc3d10a091f39a8 Author: Christophe JAILLET Date: Wed May 12 22:58:30 2021 +0200 brcmsmac: mac80211_if: Fix a resource leak in an error handling path If 'brcms_attach()' fails, we must undo the previous 'ieee80211_alloc_hw()' as already done in the remove function. Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers") Signed-off-by: Christophe JAILLET Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/8fbc171a1a493b38db5a6f0873c6021fca026a6c.1620852921.git.christophe.jaillet@wanadoo.fr commit 34fe7038a3b33b4b50b1e948e005bf3db20b7a54 Author: Guenter Roeck Date: Tue May 11 16:56:29 2021 -0700 brcmsmac: Drop unnecessary NULL check after container_of The parameter passed to ai_detach() is guaranteed to never be NULL because it is checked by the caller. Consequently, the result of container_of() on it is also never NULL, and a NULL check on it is unnecessary. Even without that, the NULL check would still be unnecessary because the subsequent kfree() can handle NULL arguments. On top of all that, it is misleading to check the result of container_of() against NULL because the position of the contained element could change, which would make the check invalid. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511235629.1686038-1-linux@roeck-us.net commit c0277e25d28fc534c09e140c19d5b85f9e7f86fd Author: Íñigo Huguet Date: Tue May 11 09:02:58 2021 +0200 brcmsmac: improve readability on addresses copy A static analyzer identified as a potential bug the copy of 12 bytes from a 6 bytes array to a 6 bytes array. Both arrays are 6 bytes addresses. Although not being a real bug, it is not immediately clear why is done this way: next 6 bytes address, contiguous to the first one, must also be copied to next contiguous 6 bytes address of the destination. Copying each one separately will make both static analyzers and reviewers happier. Signed-off-by: Íñigo Huguet Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511070257.7843-1-ihuguet@redhat.com commit 885f256f61f958d494ffdf5084a292808f08daee Author: Matthias Brugger Date: Mon Jun 7 12:34:33 2021 +0200 brcmfmac: Add clm_blob firmware files to modinfo Cypress Wi-Fi chipsets include information regarding regulatory constraints. These are provided to the driver through "Country Local Matrix" (CLM) blobs. Files present in Linux firmware repository are on a generic world-wide safe version with conservative power settings which is designed to comply with regulatory but may not provide best performance on all boards. Never the less, a better functionality can be expected with the file present, so add it to the modinfo of the driver. Signed-off-by: Matthias Brugger Reviewed-by: Hans de Goede Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210607103433.21022-1-matthias.bgg@kernel.org commit 4a26aafe4886a4ec9965171c280ce16df30dc362 Author: Matthias Brugger Date: Wed Jun 2 16:43:05 2021 +0200 brcmfmac: Delete second brcm folder hierarchy BRCMF_FW_DEFAULT_PATH already defines the brcm folder, delete the second folder to match with Linux firmware repository layout. Fixes: 75729e110e68 ("brcmfmac: expose firmware config files through modinfo") Signed-off-by: Matthias Brugger Reviewed-by: Hans de Goede Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210602144305.4481-1-matthias.bgg@kernel.org commit 7ea7a1e05c7ff5ffc9f9ec1f0849f6ceb7fcd57c Author: Tong Tiangen Date: Tue Jun 1 18:01:28 2021 +0800 brcmfmac: Fix a double-free in brcmf_sdio_bus_reset brcmf_sdiod_remove has been called inside brcmf_sdiod_probe when fails, so there's no need to call another one. Otherwise, sdiodev->freezer would be double freed. Fixes: 7836102a750a ("brcmfmac: reset SDIO bus on a firmware crash") Signed-off-by: Tong Tiangen Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210601100128.69561-1-tongtiangen@huawei.com commit ea3f903caea08bbda8a5d4e86d1d24f50af40b5e Author: Yang Shen Date: Mon May 17 13:01:34 2021 +0800 brcmfmac: Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2040: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1295: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Franky Lin Cc: Hante Meuleman Signed-off-by: Yang Shen Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517050141.61488-5-shenyang39@huawei.com commit 9a1590934d9a02e570636432b93052c0c035f31f Author: Alvin Šipraga Date: Thu May 6 13:20:12 2021 +0000 brcmfmac: correctly report average RSSI in station info The rx_lastpkt_rssi field provided by the firmware is suitable for NL80211_STA_INFO_{SIGNAL,CHAIN_SIGNAL}, while the rssi field is an average. Fix up the assignments and set the correct STA_INFO bits. This lets userspace know that the average RSSI is part of the station info. Fixes: cae355dc90db ("brcmfmac: Add RSSI information to get_station.") Signed-off-by: Alvin Šipraga Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210506132010.3964484-2-alsi@bang-olufsen.dk commit feb45643762172110cb3a44f99dd54304f33b711 Author: Alvin Šipraga Date: Thu May 6 13:20:12 2021 +0000 brcmfmac: fix setting of station info chains bitmask The sinfo->chains field is a bitmask for filled values in chain_signal and chain_signal_avg, not a count. Treat it as such so that the driver can properly report per-chain RSSI information. Before (MIMO mode): $ iw dev wlan0 station dump ... signal: -51 [-51] dBm After (MIMO mode): $ iw dev wlan0 station dump ... signal: -53 [-53, -54] dBm Fixes: cae355dc90db ("brcmfmac: Add RSSI information to get_station.") Signed-off-by: Alvin Šipraga Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210506132010.3964484-1-alsi@bang-olufsen.dk commit b0b524f079a23e440dd22b04e369368dde847533 Author: Shawn Guo Date: Sun Apr 25 19:02:00 2021 +0800 brcmfmac: use ISO3166 country code and 0 rev as fallback Instead of aborting country code setup in firmware, use ISO3166 country code and 0 rev as fallback, when country_codes mapping table is not configured. This fallback saves the country_codes table setup for recent brcmfmac chipsets/firmwares, which just use ISO3166 code and require no revision number. Signed-off-by: Shawn Guo Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210425110200.3050-1-shawn.guo@linaro.org commit d053e71ac8442d4fd24fb85591489813cdb56365 Author: Daniel Kiss Date: Sun Jun 13 11:26:32 2021 +0200 arm64: Conditionally configure PTR_AUTH key of the kernel. If the kernel is not compiled with CONFIG_ARM64_PTR_AUTH_KERNEL=y, then no PACI/AUTI instructions are expected while the kernel is running so the kernel's key will not be used. Write of a system registers is expensive therefore avoid if not required. Signed-off-by: Daniel Kiss Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210613092632.93591-3-daniel.kiss@arm.com Signed-off-by: Will Deacon commit b27a9f4119afa460289cd327f403e2ec9c8e0511 Author: Daniel Kiss Date: Sun Jun 13 11:26:31 2021 +0200 arm64: Add ARM64_PTR_AUTH_KERNEL config option This patch add the ARM64_PTR_AUTH_KERNEL config and deals with the build aspect of it. Userspace support has no dependency on the toolchain therefore all toolchain checks and build flags are controlled the new config option. The default config behavior will not be changed. Signed-off-by: Daniel Kiss Acked-by: Will Deacon Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210613092632.93591-2-daniel.kiss@arm.com Signed-off-by: Will Deacon commit 573f1af86891d4ecda9f7f1073dccec28c469387 Author: Zhen Lei Date: Thu Jun 3 16:22:18 2021 +0800 ssb: use DEVICE_ATTR_ADMIN_RW() helper macro Use DEVICE_ATTR_ADMIN_RW() helper macro instead of DEVICE_ATTR(), making it simpler and easier to read. Because the read and write function names of the sysfs attribute have been normalized, there is a natural association. Signed-off-by: Zhen Lei Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210603082218.11718-2-thunder.leizhen@huawei.com commit 233bc283728241aa522fd2889649261b742cee5a Author: Tian Tao Date: Tue May 18 10:52:32 2021 +0800 ssb: remove unreachable code The return value of ssb_bus_unregister can only be 0 or -1, so this condition if (err == -EBUSY) will not hold, so delete it. Signed-off-by: Tian Tao Acked-by: Michael Büsch Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1621306352-3632-1-git-send-email-tiantao6@hisilicon.com commit 47ec636f7a25aa2549e198c48ecb6b1c25d05456 Author: Michael Buesch Date: Sat May 15 21:02:52 2021 +0200 ssb: sdio: Don't overwrite const buffer if block_write fails It doesn't make sense to clobber the const driver-side buffer, if a write-to-device attempt failed. All other SSB variants (PCI, PCMCIA and SoC) also don't corrupt the buffer on any failure in block_write. Therefore, remove this memset from the SDIO variant. Signed-off-by: Michael Büsch Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210515210252.318be2ba@wiggum commit 77a0989baa427dbd242c5784d05a53ca3d197d43 Author: Zhen Lei Date: Sat May 15 15:29:49 2021 +0800 ssb: Fix error return code in ssb_bus_scan() Fix to return -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 61e115a56d1a ("[SSB]: add Sonics Silicon Backplane bus support") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-by: Michael Büsch Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210515072949.7151-1-thunder.leizhen@huawei.com commit 7557dfde1bd1251793fade20a52014f1105c1012 Author: Yang Li Date: Thu Apr 29 18:47:10 2021 +0800 ssb: Remove redundant assignment to err Variable 'err' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/ssb/main.c:1306:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] drivers/ssb/main.c:1312:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Michael Büsch Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1619693230-108804-1-git-send-email-yang.lee@linux.alibaba.com commit f30282129a4d47bf44805c712be1ac4f89eb8783 Author: Shubhankar Kuranagatti Date: Wed Apr 28 21:59:07 2021 +0530 ssb: Fix indentation of comment Shifted the closing */ to the next line This is done to maintain code uniformity. Acked-by: Michael Büsch Signed-off-by: Shubhankar Kuranagatti Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210428162907.bn5q3oh3sji6wlh4@kewl-virtual-machine commit 2a3d830fa8f9a6148473367085a9eafd665fb20f Author: Shubhankar Kuranagatti Date: Wed Apr 28 21:48:36 2021 +0530 ssb: pcicore: Fix indentation of comment Shifted the closing */ to the next line This is done to maintain code uniformity. Acked-by: Michael Büsch Signed-off-by: Shubhankar Kuranagatti Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210428161836.sdrxzcrfiekloucz@kewl-virtual-machine commit 5615eb58b2384bc1d6461c75b8bf77ad96f7842d Author: Shubhankar Kuranagatti Date: Wed Apr 28 21:37:47 2021 +0530 ssb: gpio: Fix alignment of comment The closing */ has been shifted to a new line This is done to maintain code uniformity. Acked-by: Michael Büsch Signed-off-by: Shubhankar Kuranagatti Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210428160747.qy23g6zpmheiacpl@kewl-virtual-machine commit 07570cef5e5c3fcec40f82a9075abb4c1da63319 Author: Joerg Roedel Date: Mon Jun 14 15:53:27 2021 +0200 x86/sev: Propagate #GP if getting linear instruction address failed When an instruction is fetched from user-space, segmentation needs to be taken into account. This means that getting the linear address of an instruction can fail. Hardware would raise a #GP exception in that case, but the #VC exception handler would emulate it as a page-fault. The insn_fetch_from_user*() functions now provide the relevant information in case of a failure. Use that and propagate a #GP when the linear address of an instruction to fetch could not be calculated. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210614135327.9921-7-joro@8bytes.org commit 4aaa7eacd7cc7c10f269c7f2a01d044b375bed8e Author: Joerg Roedel Date: Mon Jun 14 15:53:26 2021 +0200 x86/insn: Extend error reporting from insn_fetch_from_user[_inatomic]() The error reporting from the insn_fetch_from_user*() functions is not very verbose. Extend it to include information on whether the linear RIP could not be calculated or whether the memory access faulted. This will be used in the SEV-ES code to propagate the correct exception depending on what went wrong during instruction fetch. [ bp: Massage comments. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210614135327.9921-6-joro@8bytes.org commit f2df15639e44d23bf82a86a03092472c7278cd39 Author: Joerg Roedel Date: Wed May 19 15:52:49 2021 +0200 x86/insn-eval: Make 0 a valid RIP for insn_get_effective_ip() In theory, 0 is a valid value for the instruction pointer so don't use it as the error return value from insn_get_effective_ip(). Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210614135327.9921-5-joro@8bytes.org commit 4aca2d99fd27698cf82d55aed4859fde859082ac Author: Joerg Roedel Date: Wed May 19 15:52:47 2021 +0200 x86/sev: Fix error message in runtime #VC handler The runtime #VC handler is not "early" anymore. Fix the copy&paste error and remove that word from the error message. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210614135327.9921-2-joro@8bytes.org commit 2b2bcc76e2ffbaff7e6ec1c62cb9c10881dc70cd Author: Maximilian Luz Date: Tue Jun 8 15:29:51 2021 +0200 HID: surface-hid: Fix get-report request Getting a report (e.g. feature report) from a device requires us to send a request indicating which report we want to retrieve and then waiting for the corresponding response containing that report. We already provide the response structure to the request call, but the request isn't marked as a request that expects a response. Thus the request returns before we receive the response and the response buffer indicates a zero length response due to that. This essentially means that the get-report calls are broken and will always indicate that a report of length zero has been read. Fix this by appropriately marking the request. Fixes: b05ff1002a5c ("HID: Add support for Surface Aggregator Module HID transport") Signed-off-by: Maximilian Luz Signed-off-by: Jiri Kosina commit fb1a79a6b6e1223ddb18f12aa35e36f832da2290 Author: Pascal Giard Date: Fri Jun 4 12:10:23 2021 -0400 HID: sony: fix freeze when inserting ghlive ps3/wii dongles This commit fixes a freeze on insertion of a Guitar Hero Live PS3/WiiU USB dongle. Indeed, with the current implementation, inserting one of those USB dongles will lead to a hard freeze. I apologize for not catching this earlier, it didn't occur on my old laptop. While the issue was isolated to memory alloc/free, I could not figure out why it causes a freeze. So this patch fixes this issue by simplifying memory allocation and usage. We remind that for the dongle to work properly, a control URB needs to be sent periodically. We used to alloc/free the URB each time this URB needed to be sent. With this patch, the memory for the URB is allocated on the probe, reused for as long as the dongle is plugged in, and freed once the dongle is unplugged. Signed-off-by: Pascal Giard Signed-off-by: Jiri Kosina commit a3af901c89685acb590b49ce054ea7e3015a770a Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Sat May 29 19:03:57 2021 +0900 HID: usbkbd: Avoid GFP_ATOMIC when GFP_KERNEL is possible usb_kbd_alloc_mem is called in usb_kbd_probe, which is not in atomic context. So constraints can be relaxed here. Use GFP_KERNEL instead of GFP_ATOMIC. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Jiri Kosina commit d29b4295c325a0214d51b82fdc929d330e20979c Author: Pu Lehui Date: Tue Jun 15 11:14:01 2021 +0800 drm/hyperv: Fix unused const variable 'hyperv_modifiers' There is a gcc '-Wunused-const-variable' warning: drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:152:23: warning: 'hyperv_modifiers' defined but not used [-Wunused-const-variable=] while the variable should be used in drm_simple_display_pipe_init() as suggested by Thomas, let's fix it. Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device") Signed-off-by: Pu Lehui Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210615031401.231751-1-pulehui@huawei.com commit 04c22eeaf6323c51ac3d429dc03de91a82f811cb Author: Basavaraj Natikar Date: Wed May 26 22:24:31 2021 +0530 HID: amd_sfh: change in maintainer I would like to take the maintainer-ship of AMD SENSOR FUSION HUB DRIVER Signed-off-by: Basavaraj Natikar Acked-by: Nehal Shah Signed-off-by: Jiri Kosina commit 2328e1b35ac2bb003236c3268aabe456ffab8b56 Author: Chris Wilson Date: Fri Jun 11 08:08:38 2021 +0200 drm/i915/selftests: Reorder tasklet_disable vs local_bh_disable Due to a change in requirements that disallows tasklet_disable() being called from atomic context, rearrange the selftest to avoid doing so. <3> [324.942939] BUG: sleeping function called from invalid context at kernel/softirq.c:888 <3> [324.942952] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5601, name: i915_selftest <4> [324.942960] 1 lock held by i915_selftest/5601: <4> [324.942963] #0: ffff888101d19240 (&dev->mutex){....}-{3:3}, at: device_driver_attach+0x18/0x50 <3> [324.942987] Preemption disabled at: <3> [324.942990] [] live_hold_reset.part.65+0xc2/0x2f0 [i915] <4> [324.943255] CPU: 0 PID: 5601 Comm: i915_selftest Tainted: G U 5.13.0-rc5-CI-CI_DRM_10197+ #1 <4> [324.943259] Hardware name: Intel Corp. Geminilake/GLK RVP2 LP4SD (07), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017 <4> [324.943263] Call Trace: <4> [324.943267] dump_stack+0x7f/0xad <4> [324.943276] ___might_sleep.cold.123+0xf2/0x106 <4> [324.943286] tasklet_unlock_wait+0x2e/0xb0 <4> [324.943291] ? ktime_get_raw+0x81/0x120 <4> [324.943305] live_hold_reset.part.65+0x1ab/0x2f0 [i915] <4> [324.943500] __i915_subtests.cold.7+0x42/0x92 [i915] <4> [324.943723] ? __i915_live_teardown+0x50/0x50 [i915] <4> [324.943922] ? __intel_gt_live_setup+0x30/0x30 [i915] Fixes: da044747401fc ("tasklets: Replace spin wait in tasklet_unlock_wait()") Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210611060838.647973-1-thomas.hellstrom@linux.intel.com (cherry picked from commit 35c6367f516090a3086d37e7023b08608d555aba) Signed-off-by: Rodrigo Vivi commit 51dd19a7e9f8fbbb7cd92b8a357091911eae7f78 Author: Jeremy Linton Date: Mon Jun 14 11:59:01 2021 -0600 coresight: Propagate symlink failure If the symlink is unable to be created, the driver goes ahead and continues device creation. Instead lets propagate the failure, and fail the probe. Link: https://lore.kernel.org/r/20210526204042.2681700-1-jeremy.linton@arm.com Fixes: 8a7365c2d418 ("coresight: Expose device connections via sysfs") Cc: stable@vger.kernel.org Signed-off-by: Jeremy Linton Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210614175901.532683-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5fae8a946ac2df879caf3f79a193d4766d00239b Author: Sai Prakash Ranjan Date: Mon Jun 14 11:59:00 2021 -0600 coresight: tmc-etf: Fix global-out-of-bounds in tmc_update_etf_buffer() commit 6f755e85c332 ("coresight: Add helper for inserting synchronization packets") removed trailing '\0' from barrier_pkt array and updated the call sites like etb_update_buffer() to have proper checks for barrier_pkt size before read but missed updating tmc_update_etf_buffer() which still reads barrier_pkt past the array size resulting in KASAN out-of-bounds bug. Fix this by adding a check for barrier_pkt size before accessing like it is done in etb_update_buffer(). BUG: KASAN: global-out-of-bounds in tmc_update_etf_buffer+0x4b8/0x698 Read of size 4 at addr ffffffd05b7d1030 by task perf/2629 Call trace: dump_backtrace+0x0/0x27c show_stack+0x20/0x2c dump_stack+0x11c/0x188 print_address_description+0x3c/0x4a4 __kasan_report+0x140/0x164 kasan_report+0x10/0x18 __asan_report_load4_noabort+0x1c/0x24 tmc_update_etf_buffer+0x4b8/0x698 etm_event_stop+0x248/0x2d8 etm_event_del+0x20/0x2c event_sched_out+0x214/0x6f0 group_sched_out+0xd0/0x270 ctx_sched_out+0x2ec/0x518 __perf_event_task_sched_out+0x4fc/0xe6c __schedule+0x1094/0x16a0 preempt_schedule_irq+0x88/0x170 arm64_preempt_schedule_irq+0xf0/0x18c el1_irq+0xe8/0x180 perf_event_exec+0x4d8/0x56c setup_new_exec+0x204/0x400 load_elf_binary+0x72c/0x18c0 search_binary_handler+0x13c/0x420 load_script+0x500/0x6c4 search_binary_handler+0x13c/0x420 exec_binprm+0x118/0x654 __do_execve_file+0x77c/0xba4 __arm64_compat_sys_execve+0x98/0xac el0_svc_common+0x1f8/0x5e0 el0_svc_compat_handler+0x84/0xb0 el0_svc_compat+0x10/0x50 The buggy address belongs to the variable: barrier_pkt+0x10/0x40 Memory state around the buggy address: ffffffd05b7d0f00: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00 ffffffd05b7d0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffd05b7d1000: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 03 ^ ffffffd05b7d1080: fa fa fa fa 00 02 fa fa fa fa fa fa 03 fa fa fa ffffffd05b7d1100: fa fa fa fa 00 00 00 00 05 fa fa fa fa fa fa fa ================================================================== Link: https://lore.kernel.org/r/20210505093430.18445-1-saiprakash.ranjan@codeaurora.org Fixes: 0c3fc4d5fa26 ("coresight: Add barrier packet for synchronisation") Cc: stable@vger.kernel.org Signed-off-by: Sai Prakash Ranjan Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210614175901.532683-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit af36b6859a2ef0af516c5b9118580d1598070942 Author: Junhao He Date: Mon Jun 14 11:58:59 2021 -0600 coresight: etm4x: core: Remove redundant check of attr "attr" is checked by perf framework, so remove the redundant check in etm4_parse_event_config(). Link: https://lore.kernel.org/r/1620912469-52222-4-git-send-email-liuqi115@huawei.com Signed-off-by: Junhao He Signed-off-by: Qi Liu Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210614175901.532683-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit e12f6b5593e48065347a4213ad8ec3981c248fba Author: Junhao He Date: Mon Jun 14 11:58:58 2021 -0600 coresight: core: Remove unnecessary assignment Remove unnecessary assignment of "path" in coresight_release_path(). Link: https://lore.kernel.org/r/1620912469-52222-3-git-send-email-liuqi115@huawei.com Signed-off-by: Junhao He Signed-off-by: Qi Liu Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210614175901.532683-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit d777a8991847729ec4e2a13fcad58c2b00bb19dc Author: Junhao He Date: Mon Jun 14 11:58:57 2021 -0600 coresight: core: Fix use of uninitialized pointer Currently the pointer "sink" might be checked before initialized. Fix this by initializing this pointer. Link: https://lore.kernel.org/r/1620912469-52222-2-git-send-email-liuqi115@huawei.com Fixes: 6d578258b955 ("coresight: Make sysfs functional on topologies with per core sink") Signed-off-by: Junhao He Signed-off-by: Qi Liu Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210614175901.532683-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0ae8d798c82777c30aa48ab310fe21cbb8f2be4c Author: Andy Shevchenko Date: Mon Jun 14 11:58:56 2021 -0600 coresight: core: Switch to krealloc_array() Let the krealloc_array() check for multiplication overflow. Link: https://lore.kernel.org/r/20210520135041.56163-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210614175901.532683-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5e77886d0aa9a882424f6a4ccb3eca4dca43b4a0 Author: Russ Weight Date: Mon Jun 14 10:09:06 2021 -0700 fpga: region: Rename dev to parent for parent device Rename variable "dev" to "parent" in cases where it represents the parent device. Signed-off-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210614170909.232415-6-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit ceb8ab3c07db02d6a9bee68414e5f69a1c991182 Author: Russ Weight Date: Mon Jun 14 10:09:05 2021 -0700 fpga: bridge: Rename dev to parent for parent device Rename variable "dev" to "parent" in cases where it represents the parent device. Signed-off-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210614170909.232415-5-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 59ef362234dd9c2e9c25f0d1caafa43474961c18 Author: Russ Weight Date: Mon Jun 14 10:09:04 2021 -0700 fpga: mgr: Rename dev to parent for parent device Rename variable "dev" to "parent" in cases where it represents the parent device. Signed-off-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210614170909.232415-4-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit d9ec9daa20eb8de1efe6abae78c9835ec8ed86f9 Author: Russ Weight Date: Mon Jun 14 10:09:03 2021 -0700 fpga: stratix10-soc: Add missing fpga_mgr_free() call The stratix10-soc driver uses fpga_mgr_create() function and is therefore responsible to call fpga_mgr_free() to release the class driver resources. Add a missing call to fpga_mgr_free in the s10_remove() function. Signed-off-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Moritz Fischer Fixes: e7eef1d7633a ("fpga: add intel stratix10 soc fpga manager driver") Cc: stable Link: https://lore.kernel.org/r/20210614170909.232415-3-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 341466b64f301dabaed791c5862d2ae5a9e72849 Author: Russ Weight Date: Mon Jun 14 10:09:02 2021 -0700 fpga: altera-pr-ip: Remove function alt_pr_unregister Remove the alt_pr_unregister() function; it is no longer used. Signed-off-by: Russ Weight Reviewed-by: Xu Yilun Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20210614170909.232415-2-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit 87f19ea10100892637d4eee9069fad4ed61cb6a5 Author: Christophe Leroy Date: Fri May 7 14:01:09 2021 +0000 powerpc/perf: Simplify Makefile arch/powerpc/Kbuild decend into arch/powerpc/perf/ only when CONFIG_PERF_EVENTS is selected, so there is not need to take CONFIG_PERF_EVENTS into account in arch/powerpc/perf/Makefile. Signed-off-by: Christophe Leroy Reviewed-by: Michal Suchánek Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d37f61afca55b5b33787b643890e061ae1c18f5f.1620396045.git.christophe.leroy@csgroup.eu commit 4cfdd9201cfb85538975f5c8fb83941c3d463ed2 Author: Andy Shevchenko Date: Mon May 10 17:49:25 2021 +0300 powerpc/prom_init: Move custom isspace() to its own namespace If by some reason any of the headers will include ctype.h we will have a name collision. Avoid this by moving isspace() to the dedicate namespace. First appearance of the code is in the commit cf68787b68a2 ("powerpc/prom_init: Evaluate mem kernel parameter for early allocation"). Reported-by: kernel test robot Signed-off-by: Andy Shevchenko [mpe: Reformat prom_isxdigit() now that we allow longer lines] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210510144925.58195-1-andriy.shevchenko@linux.intel.com commit 8f6a54bcaf62a791a7bceccc093497f7f53e2e26 Author: Shaokun Zhang Date: Tue Jun 1 14:36:25 2021 +0800 selftests/powerpc: Remove the repeated declaration Function 'event_ebb_init' and 'event_leader_ebb_init' are declared twice in the header file, so remove the repeated declaration. Signed-off-by: Shaokun Zhang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1622529385-5938-1-git-send-email-zhangshaokun@hisilicon.com commit f377f7da26d2af87e2ddc39190546f62ecdb2bd8 Author: Baokun Li Date: Tue Jun 1 16:53:19 2021 +0800 powerpc/spider-pci: Remove set but not used variable 'val' Fixes gcc '-Wunused-but-set-variable' warning: # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush': arch/powerpc/platforms/cell/spider-pci.c:28:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] It never used since introduction. Signed-off-by: Baokun Li Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210601085319.140461-1-libaokun1@huawei.com commit 911bacda4658129bee039dc90fc0c3f193ee2695 Author: Baokun Li Date: Tue Jun 1 16:51:27 2021 +0800 powerpc/spufs: Remove set but not used variable 'dummy' Fixes gcc '-Wunused-but-set-variable' warning: # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format # WARNING: Fixes tag on line 3 doesn't match correct format arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppu_mb_stat': arch/powerpc/platforms/cell/spufs/switch.c:1660:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppuint_mb_stat': arch/powerpc/platforms/cell/spufs/switch.c:1675:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] It never used since introduction. Signed-off-by: Baokun Li Acked-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210601085127.139598-1-libaokun1@huawei.com commit b629f6c0ab8668a186fda2627296d0cbcc45a368 Author: Tom Rix Date: Tue Jun 1 12:02:00 2021 -0700 powerpc/52xx: Add fallthrough in mpc52xx_wdt_ioctl() With gcc 10.3, there is this compiler error: compiler.h:56:26: error: this statement may fall through mpc52xx_gpt.c:586:2: note: here 586 | case WDIOC_GETTIMEOUT: | ^~~~ So add the fallthrough pseudo keyword. Signed-off-by: Tom Rix Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210601190200.2637776-1-trix@redhat.com commit 87815ee9d0060a91bdf18266e42837a9adb5972e Author: Ben Widawsky Date: Tue Apr 13 07:09:07 2021 -0700 cxl/pci: Add media provisioning required commands Some of the commands have already been defined for the support of RAW commands (to be blocked). Unlike their usage in the RAW interface, when used through the supported interface, they will be coordinated and marshalled along with other commands being issued by userspace and the driver itself. That coordination will be added later. The list of commands was determined based on the learnings from libnvdimm and this list is provided directly from Dan. Recommended-by: Dan Williams Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210413140907.534404-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 2c9bdf6e4771a5966a4f0d6bea45a1c7f38312d7 Author: Gustavo A. R. Silva Date: Fri May 28 15:03:35 2021 -0500 floppy: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/linux-hardening/47bcd36a-6524-348b-e802-0691d1b3c429@kernel.dk/ Suggested-by: Jens Axboe Signed-off-by: Gustavo A. R. Silva Signed-off-by: Denis Efremov commit 30ab5db7ee787c88236376ce6c88b53d613fcae2 Author: Jiapeng Chong Date: Fri Apr 30 17:26:45 2021 +0800 floppy: cleanup: remove redundant assignment to nr_sectors Variable nr_sectors is set to zero but this value is never read as it is overwritten later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/block/floppy.c:2333:2: warning: Value stored to 'nr_sectors' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1619774805-121562-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Denis Efremov commit 97ae27252f4962d0fcc38ee1d9f913d817a2024e Author: Gal Ofri Date: Mon Jun 7 14:07:03 2021 +0300 md/raid5: avoid device_lock in read_one_chunk() There is a lock contention on device_lock in read_one_chunk(). device_lock is taken to sync conf->active_aligned_reads and conf->quiesce. read_one_chunk() takes the lock, then waits for quiesce=0 (resumed) before incrementing active_aligned_reads. raid5_quiesce() takes the lock, sets quiesce=2 (in-progress), then waits for active_aligned_reads to be zero before setting quiesce=1 (suspended). Introduce a fast (lockless) path in read_one_chunk(): activate aligned read without taking device_lock. In case quiesce starts while activating the aligned-read in fast path, deactivate it and revert to old behavior (take device_lock and wait for quiesce to finish). Add smp store/load in raid5_quiesce()/read_one_chunk() respectively to gaurantee that read_one_chunk() does not miss an ongoing quiesce. My setups: 1. 8 local nvme drives (each up to 250k iops). 2. 8 ram disks (brd). Each setup with raid6 (6+2), 1024 io threads on a 96 cpu-cores (48 per socket) system. Record both iops and cpu spent on this contention with rand-read-4k. Record bw with sequential-read-128k. Note: in most cases cpu is still busy but due to "new" bottlenecks. nvme: | iops | cpu | bw ----------------------------------------------- without patch | 1.6M | ~50% | 5.5GB/s with patch | 2M (throttled) | 0% | 16GB/s (throttled) ram (brd): | iops | cpu | bw ----------------------------------------------- without patch | 2M | ~80% | 24GB/s with patch | 4M | 0% | 55GB/s CC: Song Liu CC: Neil Brown Reviewed-by: NeilBrown Signed-off-by: Gal Ofri Signed-off-by: Song Liu commit de3ea66e9d23a34eef5e17f960d6473f78a1c54b Author: Guoqing Jiang Date: Thu Jun 3 17:21:07 2021 +0800 md: add comments in md_integrity_register Given it is not obvious for the error handling, let's try to add some comments here to make it clear. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit daee2024715ddf430a069c0c4eab8417146934cf Author: Guoqing Jiang Date: Thu Jun 3 17:21:06 2021 +0800 md: check level before create and exit io_acct_set The bio_set (io_acct_set) is used by personalities to clone bio and trace the timestamp of bio. Some personalities such as raid1/10 don't need the bio_set, so add check to not create it unconditionally. Also update the comment for md_account_bio to make it more clear. Suggested-by: Christoph Hellwig Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit c32dc04059c79ddb4f7cff94ad5de6e92ea2218d Author: Rikard Falkeborn Date: Sat May 29 12:30:49 2021 +0200 md: Constify attribute_group structs The attribute_group structs are never modified, they're only passed to sysfs_create_group() and sysfs_remove_group(). Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Song Liu commit 608f52e30aae7dc8da836e5b7b112d50a2d00e43 Author: Guoqing Jiang Date: Tue May 25 17:46:23 2021 +0800 md: mark some personalities as deprecated Mark the three personalities (linear, fault and multipath) as deprecated because: 1. people can use dm multipath or nvme multipath. 2. linear is already deprecated in MODULE_ALIAS. 3. no one actively using fault. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 528bc2cf2fccef2c2c17263f9932094bf81fee5a Author: Guoqing Jiang Date: Tue May 25 17:46:22 2021 +0800 md/raid10: enable io accounting For raid10, we record the start time between split bio and clone bio, and finish the accounting in the final endio. Also introduce start_time in r10bio accordingly. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit a0159832e51e3af03b89ecc5d6b9db451e529b5f Author: Guoqing Jiang Date: Tue May 25 17:46:21 2021 +0800 md/raid1: enable io accounting For raid1, we record the start time between split bio and clone bio, and finish the accounting in the final endio. Also introduce start_time in r1bio accordingly. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 9b8ae7b938235229ccb112c4e887ff1bcc232836 Author: Guoqing Jiang Date: Tue May 25 17:46:20 2021 +0800 md/raid1: rename print_msg with r1bio_existed The caller of raid1_read_request could pass NULL or a valid pointer for "struct r1bio *r1_bio", so it actually means whether r1_bio is existed or not. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 1147f58e1010b8688bac1fd3bbab753b1379291d Author: Guoqing Jiang Date: Tue May 25 17:46:19 2021 +0800 md/raid5: avoid redundant bio clone in raid5_read_one_chunk After enable io accounting, chunk read bio could be cloned twice which is not good. To avoid such inefficiency, let's clone align_bio from io_acct_set too, then we need only call md_account_bio in make_request unconditionally. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit c82aa1b76787c34fd02374e519b6f52cdeb2f54b Author: Guoqing Jiang Date: Tue May 25 17:46:18 2021 +0800 md/raid5: move checking badblock before clone bio in raid5_read_one_chunk We don't need to clone bio if the relevant region has badblock. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 10764815ff4728d2c57da677cd5d3dd6f446cf5f Author: Guoqing Jiang Date: Tue May 25 17:46:17 2021 +0800 md: add io accounting for raid0 and raid5 We introduce a new bioset (io_acct_set) for raid0 and raid5 since they don't own clone infrastructure to accounting io. And the bioset is added to mddev instead of to raid0 and raid5 layer, because with this way, we can put common functions to md.h and reuse them in raid0 and raid5. Also struct md_io_acct is added accordingly which includes io start_time, the origin bio and cloned bio. Then we can call bio_{start,end}_io_acct to get related io status. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit ad3fc798800fb7ca04c1dfc439dba946818048d8 Author: Guoqing Jiang Date: Tue May 25 17:46:16 2021 +0800 md: revert io stats accounting The commit 41d2d848e5c0 ("md: improve io stats accounting") could cause double fault problem per the report [1], and also it is not correct to change ->bi_end_io if md don't own it, so let's revert it. And io stats accounting will be replemented in later commits. [1]. https://lore.kernel.org/linux-raid/3bf04253-3fad-434a-63a7-20214e38cf26@gmail.com/T/#t Fixes: 41d2d848e5c0 ("md: improve io stats accounting") Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit c36326d38d933199014aba5a17d384cf52e4b558 Author: Shay Drory Date: Tue Feb 23 11:57:32 2021 +0200 net/mlx5: Round-Robin EQs over IRQs Whenever users provided affinity for an EQ creation request, map the EQ to a matching IRQ. Matching IRQ=IRQ with the same affinity and type (completion/control) of the EQ created. This mapping is being done in agressive dedicated IRQ allocation scheme, which described bellow. First, we check whether there is a matching IRQ that his min threshold is not exhausted. - min_eqs_threshold = 3 for control EQ. - min_eqs_threshold = 1 for completion EQ. In case no matching IRQ was found, try to request a new IRQ. In case we can't request a new IRQ, reuse least-used matching IRQ. Signed-off-by: Shay Drory Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c8ea212bfdff5152f1ca78400f297bfba75691e0 Author: Shay Drory Date: Tue May 11 18:48:30 2021 +0300 net/mlx5: Separate between public and private API of sf.h Move mlx5_sf_max_functions() and friends from the privete sf/sf.h to the public lib/sf.h. This is done in order to have one direction include paths. Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed commit 3af26495a2473c95ada3674c6b4dfc658be0a6ec Author: Shay Drory Date: Mon May 10 09:10:43 2021 +0300 net/mlx5: Enlarge interrupt field in CREATE_EQ FW is now supporting more than 256 MSI-X per PF (up to 2K). Hence, enlarge interrupt field in CREATE_EQ to make use of the new MSI-X's. Signed-off-by: Shay Drory Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit 71e084e26414b0f27d8befa1c30b74d39d9cb2a1 Author: Shay Drory Date: Tue Feb 23 11:48:17 2021 +0200 net/mlx5: Allocating a pool of MSI-X vectors for SFs SFs (Sub Functions) currently use IRQs from the global IRQ table their parent Physical Function have. In order to better scale, we need to allocate more IRQs and share them between different SFs. Driver will maintain 3 separated irq pools: 1. A pool that serve the PF consumer (PF's netdev, rdma stacks), similar to what the driver had before this patch. i.e, this pool will share irqs between rdma and netev, and will keep the irq indexes and allocation order. The last is important for PF netdev rmap (aRFS). 2. A pool of control IRQs for SFs. The size of this pool is the number of SFs that can be created divided by SFS_PER_IRQ. This pool will serve the control path EQs of the SFs. 3. A pool of completion data path IRQs for SFs transport queues. The size of this pool is: num_irqs_allocated - pf_pool_size - sf_ctrl_pool_size. This pool will served netdev and rdma stacks. Moreover, rmap is not supported on SFs. Sharing methodology of the SFs pools is explained in the next patch. Important note: rmap is not supported on SFs because rmap mapping cannot function correctly for IRQs that are shared for different core/netdev RX rings. Signed-off-by: Shay Drory Reviewed-by: Leon Romanovsky Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit fc63dd2a85be1f37fb822594101e9219b7be7460 Author: Shay Drory Date: Tue Feb 23 11:38:52 2021 +0200 net/mlx5: Change IRQ storage logic from static to dynamic Store newly created IRQs in the xarray DB instead of a static array, so we will be able to store only IRQs which are being used. Signed-off-by: Shay Drory Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 2d74524c0106abe2025228111466f2f4b63d420a Author: Shay Drory Date: Tue Feb 23 11:24:47 2021 +0200 net/mlx5: Moving rmap logic to EQs IRQs are being simplified in order to ease their sharing and any feature specific object will be moved to upper layer. Hence we move rmap object into eq_table. Signed-off-by: Shay Drory Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit e8abebb3a48e867179dc6c61c0579e2c6f6cac7b Author: Shay Drory Date: Tue Feb 23 11:15:43 2021 +0200 net/mlx5: Extend mlx5_irq_request to request IRQ from the kernel Extend mlx5_irq_request so that IRQs will be requested upon EQ creation, and not on driver boot. Signed-off-by: Shay Drory Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 2de61538377c6d417c5c18e12309fe7bf098f2c9 Author: Shay Drory Date: Tue Feb 23 11:08:26 2021 +0200 net/mlx5: Removing rmap per IRQ In next patches, IRQs will be requested according to demand, instead of statically on driver boot. Also, currently, rmap is managed by the IRQ layer. rmap management will move out from the IRQ layer in future patches. Therefore, we want to remove the IRQ from the rmap, when IRQ is destroyed, instead of removing all the IRQs from the rmap when irq_table is destroyed. Signed-off-by: Shay Drory Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 652e3581f2483a4965ea79a4dbce153fe0f39d1f Author: Leon Romanovsky Date: Thu Jan 14 15:19:40 2021 +0200 net/mlx5: Clean license text in eq.[c|h] files The eq.[c|h] files are under major rewrite. so use this opportunity and update their copyright and license texts. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit e4e3f24b822f9dc9ae2427a8d686e8c1d80d6bd2 Author: Leon Romanovsky Date: Tue Feb 23 10:37:05 2021 +0200 net/mlx5: Provide cpumask at EQ creation phase The users of EQ are running their code on different CPUs and with various affinity patterns. Move the cpumask setting close to their actual usage. Signed-off-by: Leon Romanovsky Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed commit 3b43190b2f25e8e477c9bb32afd01e61161c60f7 Author: Shay Drory Date: Tue Apr 6 21:42:17 2021 +0300 net/mlx5: Introduce API for request and release IRQs Introduce new API that will allow IRQs users to hold a pointer to mlx5_irq. In the end of this series, IRQs will be allocated on demand. Hence, this will allow us to properly manage and use IRQs. Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed commit c38421abcf21d477691277218106780233abc2d8 Author: Leon Romanovsky Date: Tue Feb 23 09:32:21 2021 +0200 net/mlx5: Delay IRQ destruction till all users are gone Shared IRQ are consumed by multiple EQ users and in order to properly initialize and later release such IRQs, we add kref counting of IRQ structure. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 8a66e45859797e5dd77ff17dd37781f99d5f5b9b Author: Mark Bloch Date: Wed Apr 14 08:18:09 2021 +0000 net/mlx5: Change ownership model for lag Lag is used to combine two PCI functions of the same HCA into a single logical unit. This is a core functionality and as such should be managed by the core driver. Currently this isn't the case. While we store the lag software structure inside the lower device, its lifetime (creation / destruction) is dictated by the mlx5e part. Change the ownership model so lag is tied to the lifetime of the lower level driver instead to the mlx5e part. Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 8ed19471fdaad266225aa15f8e2626a7a3265504 Author: Mark Bloch Date: Wed Apr 14 07:28:19 2021 +0000 net/mlx5: Lag, Don't rescan if the device is going down If MLX5_PRIV_FLAGS_DISABLE_ALL_ADEV is set it means the device is going down and mlx5_rescan_drivers_locked() shouldn't be called. With this patch and the previous one in the series, unbinding a PCI function when its netdev is part of a bond works and leaves the system in a working state. Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 8c22ad36eefa5e1c4af0d653d385041527d7b7b9 Author: Mark Bloch Date: Wed Apr 14 07:16:40 2021 +0000 net/mlx5: Lag, refactor disable flow When a net device is removed (can happen if the PCI function is unbound from the system) it's not enough to destroy the hardware lag. The system should recreate the original devices that were present before the lag. As the same flow is done when a net device is removed from the bond refactor and reuse the code. Signed-off-by: Mark Bloch Signed-off-by: Saeed Mahameed commit d1588b22dcbb662d94740489713b8fcfe3c13023 Author: Nobuhiro Iwamatsu Date: Tue Jun 15 08:55:01 2021 +0900 arm64: defconfig: Visconti: Enable GPIO Enable Visconti's GPIO in the ARM64 defconfig. Signed-off-by: Nobuhiro Iwamatsu commit 1ba39c2b8b72f29c914a0315161e21bd7444baf6 Author: Nobuhiro Iwamatsu Date: Tue Jun 15 08:52:48 2021 +0900 arm64: defconfig: Visconti: Enable PWM Enable Visconti's PWM in the ARM64 defconfig as a module. Signed-off-by: Nobuhiro Iwamatsu commit 172cdcaefea5c297fdb3d20b7d5aff60ae4fbce6 Author: Nobuhiro Iwamatsu Date: Tue Jun 8 09:52:06 2021 +0900 arm64: dts: visconti: Add PWM support for TMPV7708 SoC Add PWM node in TMPV7708's dtsi, and tmpv7708-rm-mbrc boards's dts. Signed-off-by: Nobuhiro Iwamatsu commit 05a463ec1bd4fd564312d6dbc0ea1e3a4701e4a4 Author: Tian Tao Date: Fri Jun 11 17:22:49 2021 +1200 docs: cputopology: move the sysfs ABI description to right place Documentation/admin-guide/cputopology.rst is the wrong place to describe sysfs ABI. So move the cputopology ABI things to Documentation/ABI/stable/sysfs-devices-system-cpu and add a reference to ABI doc in Documentation/admin-guide/cputopology.rst. Link: https://lkml.kernel.org/r/20210319041618.14316-1-song.bao.hua@hisilicon.com Cc: Greg Kroah-Hartman Signed-off-by: Tian Tao Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20210611052249.25776-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet commit e9cd414c1136aa31d34acc04c175bfaca4662f89 Author: Marek Szyprowski Date: Fri May 28 16:06:25 2021 +0200 arm64: defconfig: add drivers needed for DragonBoard410c Add modules with drivers needed for DragonBoard410c board (arch/arm64/boot/dts/qcom/apq8016-sbc.dts). Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20210528140625.6972-1-m.szyprowski@samsung.com Signed-off-by: Bjorn Andersson commit 005747526d4f3c2ec995891e95cb7625161022f9 Author: Wolfram Sang Date: Thu Jun 3 14:58:41 2021 +0200 docs: fault-injection: fix non-working usage of negative values Fault injection uses debugfs in a way that the provided values via sysfs are interpreted as u64. Providing negative numbers results in an error: /sys/kernel/debug/fail_function# echo -1 > times sh: write error: Invalid argument Update the docs and examples to use "printf %#x " in these cases. For "retval", reword the paragraph a little and fix a typo. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210603125841.27436-1-wsa+renesas@sang-engineering.com Signed-off-by: Jonathan Corbet commit 91a1265cacdd96229304adddf18dcf64a4b8c040 Author: Dwaipayan Ray Date: Mon Jun 14 19:41:32 2021 +0530 docs: checkpatch: Document and segregate more checkpatch message types Add and document more checkpatch message types. About 50% of all message types are documented now. In addition to this: - Create a new subsection 'Indentation and Line Breaks'. - Rename subsection 'Comment style' to simply 'Comments'. - Refactor some of the existing types to appropriate subsections. Reviewed-by: Lukas Bulwahn Tested-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray Link: https://lore.kernel.org/r/20210614141132.6881-1-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet commit 30da589dba53d2a0b64efe0bb93919833bc43366 Author: Suman Anna Date: Thu Jun 3 09:26:39 2021 -0500 dt-bindings: remoteproc: qcom: pas: Fix indentation warnings The list indentation should always be 2 spaces more than the preceding keyword. A few of the items are only using 1 space, and resulting in warnings with dt_binding_check. Fix these. Fixes: cf107e98d024 ("dt-bindings: remoteproc: qcom: pas: Convert binding to YAML") Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210603142639.8335-1-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 234462bc7f2303afce4b61125d2107ecd7611bff Author: Suman Anna Date: Thu Jun 3 09:42:16 2021 -0500 dt-bindings: hwlock: sun6i: Fix various warnings in binding The allwinner,sun6i-a31-hwspinlock.yaml binding has a mismatched $id and fails to compile the example due to undefined args specifier values for clocks and resets. Fix both of these issues. Acked-by: Rob Herring Fixes: f9e784dcb63f ("dt-bindings: hwlock: add sun6i_hwspinlock") Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210603144216.10327-1-s-anna@ti.com Signed-off-by: Bjorn Andersson commit d8ac5bb4ae653e092d7429a7587b73f1662d6ad7 Author: Krzysztof Kozlowski Date: Mon Jun 14 21:22:30 2021 +0200 thermal/drivers/sprd: Add missing of_node_put for loop iteration Early exits from for_each_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: drivers/thermal/sprd_thermal.c:387:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before goto around lines 391. Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210614192230.19248-2-krzysztof.kozlowski@canonical.com commit 3da97620e8d60da4a7eaae46e03e0a494780642d Author: Krzysztof Kozlowski Date: Mon Jun 14 21:22:29 2021 +0200 thermal/drivers/imx_sc: Add missing of_node_put for loop iteration Early exits from for_each_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: drivers/thermal/imx_sc_thermal.c:93:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 97. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jacky Bai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210614192230.19248-1-krzysztof.kozlowski@canonical.com commit 89212e160b81e778f829b89743570665810e3b13 Author: Loic Poulain Date: Mon Jun 14 18:56:36 2021 +0200 net: wwan: Fix WWAN config symbols There is not strong reason to have both WWAN and WWAN_CORE symbols, Let's build the WWAN core framework when WWAN is selected, in the same way as for other subsystems. This fixes issue with mhi_net selecting WWAN_CORE without WWAN and reported by kernel test robot: Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for WWAN_CORE Depends on NETDEVICES && WWAN Selected by - MHI_NET && NETDEVICES && NET_CORE && MHI_BUS Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem") Reported-by: kernel test robot Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit ec13357263fb672390250fcfaa4c86b6dce66062 Author: Vladimir Oltean Date: Mon Jun 14 16:58:19 2021 +0300 net: flow_dissector: fix RPS on DSA masters After the blamed patch, __skb_flow_dissect() on the DSA master stopped adjusting for the length of the DSA headers. This is because it was told to adjust only if the needed_headroom is zero, aka if there is no DSA header. Of course, the adjustment should be done only if there _is_ a DSA header. Modify the comment too so it is clearer. Fixes: 4e50025129ef ("net: dsa: generalize overhead for taggers that use both headers and trailers") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3009e8aa85af080b3e03c803b86fe496b7713e69 Author: Vladimir Oltean Date: Mon Jun 14 16:50:50 2021 +0300 net: dsa: sja1105: constify the sja1105_regs structures The struct sja1105_regs tables are not modified during the runtime of the driver, so they can be made constant. In fact, struct sja1105_info already holds a const pointer to these. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit be4dc321a55cfee3099a1bd9399d0cd4ac080c23 Author: Srinivas Neeli Date: Thu Jun 3 22:19:00 2021 +0530 gpio: gpio-xilinx: update on suspend and resume calls Current AXI GPIO driver checking for interrupt data in suspend and resume path and reporting as error in case of no interrupt connection. As per AXI GPIO IP specification interrupt connection is optional, driver logic is updated in suspend and resume calls by reporting debug message and enable/disable clock in case of no connection. Signed-off-by: Srinivas Neeli Signed-off-by: Bartosz Golaszewski commit 0b703008b5d954624c62017207505ff607817e5c Merge: ed0141d113c53 0b5f0f29b1189 Author: David S. Miller Date: Mon Jun 14 13:12:59 2021 -0700 Merge branch 'tja1103-improvewmentsa' Vladimir Oltean says: ==================== Fixes and improvements to TJA1103 PHY driver This series contains: - an erratum workaround for the TJA1103 PHY integrated in SJA1110 - an adaptation of the driver so it prints less unnecessary information when probing on SJA1110 - a PTP RX timestamping bug fix and a clarification patch Targeting net-next since the PHY support is currently in net-next only. Changes in v3: Added one more patch which improves the readability of nxp_c45_reconstruct_ts. Changes in v2: Added a comment to the hardware workaround procedure. ==================== Signed-off-by: David S. Miller commit 0b5f0f29b118910c89fe249cdfbc11b400a86a18 Author: Vladimir Oltean Date: Mon Jun 14 16:44:41 2021 +0300 net: phy: nxp-c45-tja11xx: enable MDIO write access to the master/slave registers The SJA1110 switch integrates TJA1103 PHYs, but in SJA1110 switch rev B silicon, there is a bug in that the registers for selecting the 100base-T1 autoneg master/slave roles are not writable. To enable write access to the master/slave registers, these additional PHY writes are necessary during initialization. The issue has been corrected in later SJA1110 silicon versions and is not present in the standalone PHY variants, but applying the workaround unconditionally in the driver should not do any harm. Suggested-by: Radu Pirea (NXP OSS) Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 109258ed6262e3fedfa241dd309161cb31018016 Author: Vladimir Oltean Date: Mon Jun 14 16:44:40 2021 +0300 net: phy: nxp-c45-tja11xx: fix potential RX timestamp wraparound The reconstruction procedure for partial timestamps reads the current PTP time and fills in the low 2 bits of the second portion, as well as the nanoseconds portion, from the actual hardware packet timestamp. Critically, the reconstruction procedure works because it assumes that the current PTP time is strictly larger than the hardware timestamp was: it detects a 2-bit wraparound of the 'seconds' portion by checking whether the 'seconds' portion of the partial hardware timestamp is larger than the 'seconds' portion of the current time. That can only happen if the hardware timestamp was captured by the PHY during the last phase of a 'modulo 4 seconds' interval, and the current PTP time was read by the driver during the initial phase of the next 'modulo 4 seconds' interval. The partial RX timestamps are added to priv->rx_queue in nxp_c45_rxtstamp() and they are processed potentially in parallel by the aux worker thread in nxp_c45_do_aux_work(). This means that it is possible for nxp_c45_do_aux_work() to process more than one RX timestamp during the same schedule. There is one premature optimization that will cause issues: for RX timestamping, the driver reads the current time only once, and it uses that to reconstruct all PTP RX timestamps in the queue. For the second and later timestamps, this will be an issue if we are processing two RX timestamps which are to the left and to the right, respectively, of a 4-bit wraparound of the 'seconds' portion of the PTP time, and the current PTP time is also pre-wraparound. 0.000000000 4.000000000 8.000000000 12.000000000 |..................|..................|..................|............> ^ ^ ^ ^ time | | | | | | | process hwts 1 and hwts 2 | | | | | hwts 2 | | | read current PTP time | hwts 1 What will happen in that case is that hwts 2 (post-wraparound) will use a stale current PTP time that is pre-wraparound. But nxp_c45_reconstruct_ts will not detect this condition, because it is not coded up for it, so it will reconstruct hwts 2 with a current time from the previous 4 second interval (i.e. 0.something instead of 4.something). This is solvable by making sure that the full 64-bit current time is always read after the PHY has taken the partial RX timestamp. We do this by reading the current PTP time for every timestamp in the RX queue. Fixes: 514def5dd339 ("phy: nxp-c45-tja11xx: add timestamping support") Cc: Richard Cochran Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 661fef5698bc44c9cc4844140ce055e69d57e1b7 Author: Vladimir Oltean Date: Mon Jun 14 16:44:39 2021 +0300 net: phy: nxp-c45-tja11xx: express timestamp wraparound interval in terms of TS_SEC_MASK nxp_c45_reconstruct_ts() takes a partial hardware timestamp in @hwts, with 2 bits of the 'seconds' portion, and a full PTP time in @ts. It patches in the lower bits of @hwts into @ts, and to ensure that the reconstructed timestamp is correct, it checks whether the lower 2 bits of @hwts are not in fact higher than the lower 2 bits of @ts. This is not logically possible because, according to the calling convention, @ts was collected later in time than @hwts, but due to two's complement arithmetic it can actually happen, because the current PTP time might have wrapped around between when @hwts was collected and when @ts was, yielding the lower 2 bits of @ts smaller than those of @hwts. To correct for that situation which is expected to happen under normal conditions, the driver subtracts exactly one wraparound interval from the reconstructed timestamp, since the upper bits of that need to correspond to what the upper bits of @hwts were, not to what the upper bits of @ts were. Readers might be confused because the driver denotes the amount of bits that the partial hardware timestamp has to offer as TS_SEC_MASK (timestamp mask for seconds). But it subtracts a seemingly unrelated BIT(2), which is in fact more subtle: if the hardware timestamp provides 2 bits of partial 'seconds' timestamp, then the wraparound interval is 2^2 == BIT(2). But nonetheless, it is better to express the wraparound interval in terms of a definition we already have, so replace BIT(2) with 1 + GENMASK(1, 0) which produces the same result but is clearer. Suggested-by: Russell King (Oracle) Cc: Richard Cochran Signed-off-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 565c6d8cff6a982e0e6b5f0dbf32b4342d0d3dc9 Author: Vladimir Oltean Date: Mon Jun 14 16:44:38 2021 +0300 net: phy: nxp-c45-tja11xx: demote the "no PTP support" message to debug The SJA1110 switch integrates these PHYs, and they do not have support for timestamping. This message becomes quite overwhelming: [ 10.056596] NXP C45 TJA1103 spi1.0-base-t1:01: the phy does not support PTP [ 10.112625] NXP C45 TJA1103 spi1.0-base-t1:02: the phy does not support PTP [ 10.167461] NXP C45 TJA1103 spi1.0-base-t1:03: the phy does not support PTP [ 10.223510] NXP C45 TJA1103 spi1.0-base-t1:04: the phy does not support PTP [ 10.278239] NXP C45 TJA1103 spi1.0-base-t1:05: the phy does not support PTP [ 10.332663] NXP C45 TJA1103 spi1.0-base-t1:06: the phy does not support PTP [ 15.390828] NXP C45 TJA1103 spi1.2-base-t1:01: the phy does not support PTP [ 15.445224] NXP C45 TJA1103 spi1.2-base-t1:02: the phy does not support PTP [ 15.499673] NXP C45 TJA1103 spi1.2-base-t1:03: the phy does not support PTP [ 15.554074] NXP C45 TJA1103 spi1.2-base-t1:04: the phy does not support PTP [ 15.608516] NXP C45 TJA1103 spi1.2-base-t1:05: the phy does not support PTP [ 15.662996] NXP C45 TJA1103 spi1.2-base-t1:06: the phy does not support PTP So reduce its log level to debug. Cc: Richard Cochran Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit ed0141d113c537a24df2f617f11c9bc50d673c90 Merge: 0a84a828d7caf 2bb4b98b60d7d Author: David S. Miller Date: Mon Jun 14 13:06:53 2021 -0700 Merge branch 'Ingenic-SOC-mac-support' Zhou Yanjie says: ==================== Add Ingenic SoCs MAC support. v2->v3: 1.Add "ingenic,mac.yaml" for Ingenic SoCs. 2.Change tx clk delay and rx clk delay from hardware value to ps. 3.return -EINVAL when a unsupported value is encountered when parsing the binding. 4.Simplify the code of the RGMII part of X2000 SoC according to Andrew Lunn’s suggestion. 5.Follow the example of "dwmac-mediatek.c" to improve the code that handles delays according to Andrew Lunn’s suggestion. ==================== Signed-off-by: David S. Miller commit 2bb4b98b60d7dc89fc0a5bb64534be348ab654df Author: 周琰杰 (Zhou Yanjie) Date: Tue Jun 15 01:15:37 2021 +0800 net: stmmac: Add Ingenic SoCs MAC support. Add support for Ingenic SoC MAC glue layer support for the stmmac device driver. This driver is used on for the MAC ethernet controller found in the JZ4775 SoC, the X1000 SoC, the X1600 SoC, the X1830 SoC, and the X2000 SoC. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3b8401066e5a8ee465891cc8bad614c797701348 Author: 周琰杰 (Zhou Yanjie) Date: Tue Jun 15 01:15:36 2021 +0800 dt-bindings: dwmac: Add bindings for new Ingenic SoCs. Add the dwmac bindings for the JZ4775 SoC, the X1000 SoC, the X1600 SoC, the X1830 SoC and the X2000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0a84a828d7cafe4e6a0efe7b0e5a8343263031c8 Merge: ea99750e40197 66826c43e63d5 Author: David S. Miller Date: Mon Jun 14 13:04:26 2021 -0700 Merge branch 'marvell-prestera-devlink' Oleksandr Mazur says: ==================== Marvell Prestera driver implementation of devlink functionality. This patch series implement Prestera Switchdev driver devlink traps, that are registered within the driver, as well as extend current devlink functionality by adding new hard drop statistics counter, that could be retrieved on-demand: the counter shows number of packets that have been dropped by the underlying device and haven't been passed to the devlink subsystem. The core prestera-devlink functionality is implemented in the prestera_devlink.c. The patch series also extends the existing devlink kernel API: - devlink: add trap_drop_counter_get callback for driver to register - make it possible to keep track of how many packets have been dropped (hard) by the switch device, before the packets even made it to the devlink subsystem (e.g. dropped due to RXDMA buffer overflow). The core features that extend current functionality of prestera Switchdev driver: - add logic for driver traps and drops registration (also traps with DROP action). - add documentation for prestera driver traps and drops group. PATCH v2: 1) Rebase whole series on top of latest mater; 2) Remove storm control-related patches, as they're out of devlink scope; ==================== Signed-off-by: David S. Miller commit 66826c43e63d5c5e8307bd36862d6334db9d98b7 Author: Oleksandr Mazur Date: Mon Jun 14 16:01:18 2021 +0300 documentation: networking: devlink: add prestera switched driver Documentation Add documentation for the devlink feature prestera switchdev driver supports: add description for the support of the driver-specific devlink traps (include both traps with action TRAP and action DROP); Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit a80cf955c9e51d137fc772510b213c8d2c96c1d3 Author: Oleksandr Mazur Date: Mon Jun 14 16:01:17 2021 +0300 net: marvell: prestera: devlink: add traps with DROP action Add traps that have init_action being set to DROP. Add 'trap_drop_counter_get' (devlink API) callback implementation, that is used to get number of packets that have been dropped by the HW (traps with action 'DROP'). Add new FW command CPU_CODE_COUNTERS_GET. Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit 0a9003f45e9105628a2437ae1d8877e695cb34b8 Author: Oleksandr Mazur Date: Mon Jun 14 16:01:16 2021 +0300 net: marvell: prestera: devlink: add traps/groups implementation Add devlink traps registration (with corresponding groups) for all the traffic types that driver traps to the CPU; prestera_rxtx: report each packet trapped to the CPU (RX) to the prestera_devlink; Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit 7a4f54798a53db5f94d6e0bd1b0bfe53900fc058 Author: Oleksandr Mazur Date: Mon Jun 14 16:01:15 2021 +0300 testing: selftests: drivers: net: netdevsim: devlink: add test case for hard drop statistics Add hard drop counter check testcase, to make sure netdevsim driver properly handles the devlink hard drop counters get/set callbacks. Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit a7b3527a43feb017f48c699d859aef787c8af031 Author: Oleksandr Mazur Date: Mon Jun 14 16:01:14 2021 +0300 drivers: net: netdevsim: add devlink trap_drop_counter_get implementation Whenever query statistics is issued for trap with DROP action, devlink subsystem would also fill-in statistics 'dropped' field. In case if device driver did't register callback for hard drop statistics querying, 'dropped' field will be omitted and not filled. Add trap_drop_counter_get callback implementation to the netdevsim. Add new test cases for netdevsim, to test both the callback functionality, as well as drop statistics alteration check. Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit 53f1bd6b281945f82b48ec44be34488ee9765cb8 Author: Oleksandr Mazur Date: Mon Jun 14 16:01:13 2021 +0300 testing: selftests: net: forwarding: add devlink-required functionality to test (hard) dropped stats field Add devlink_trap_drop_packets_get function, as well as test that are used to verify devlink (hard) dropped stats functionality works. Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit ddee9dbc3d7aec1cd9fdcc671db2dd0016fd0f3d Author: Oleksandr Mazur Date: Mon Jun 14 16:01:12 2021 +0300 net: core: devlink: add dropped stats traps field Whenever query statistics is issued for trap, devlink subsystem would also fill-in statistics 'dropped' field. This field indicates the number of packets HW dropped and failed to report to the device driver, and thus - to the devlink subsystem itself. In case if device driver didn't register callback for hard drop statistics querying, 'dropped' field will be omitted and not filled. Signed-off-by: Oleksandr Mazur Signed-off-by: David S. Miller commit ea99750e401972c896d2212ea9244d903b8fbf73 Author: Loic Poulain Date: Mon Jun 14 10:16:40 2021 +0200 net: wwan: iosm: Remove DEBUG flag Author forgot to remove that flag. Fixes: f7af616c632e ("net: iosm: infrastructure") Reported-by: Leon Romanovsky Signed-off-by: Loic Poulain Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 673ead2431e205ba9e9ccd6059532564ab83eb0a Author: Lijun Pan Date: Mon Jun 14 00:20:45 2021 -0500 ibmvnic: fix send_request_map incompatible argument The 3rd argument is u32 by function definition while it is __be32 by function declaration. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 645a7fe13c8b7b66a8898b58b38405e26913527c Merge: ffa85b73c3c41 49011e0c1555d Author: David S. Miller Date: Mon Jun 14 12:54:43 2021 -0700 Merge branch 'ksz886x-cable-test' Oleksij Rempel says: ==================== provide cable test support for the ksz886x switch changes v5: - drop resume() patch - add Reviewed-by tags. - rework dsa_slave_phy_connect() patch changes v4: - use fallthrough; - use EOPNOTSUPP instead of ENOTSUPP - drop flags variable in dsa_slave_phy_connect patch - extend description for the "net: phy: micrel: apply resume errat" patch - fix "use consistent alignments" patch changes v3: - remove RFC tag changes v2: - use generic MII_* defines where possible - rework phylink validate - remove phylink get state function - reorder cabletest patches to make PHY flag patch in the right order - fix MDI-X detection This patches provide support for cable testing on the ksz886x switches. Since it has one special port, we needed to add phylink with validation and extra quirk for the PHY to signal, that one port will not provide valid cable testing reports. ==================== Signed-off-by: David S. Miller commit 49011e0c1555dd7a689d0f32fd78c1ecd43e59cd Author: Oleksij Rempel Date: Mon Jun 14 06:31:25 2021 +0200 net: phy: micrel: ksz886x/ksz8081: add cabletest support This patch support for cable test for the ksz886x switches and the ksz8081 PHY. The patch was tested on a KSZ8873RLL switch with following results: - port 1: - provides invalid values, thus return -ENOTSUPP (Errata: DS80000830A: "LinkMD does not work on Port 1", http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ8873-Errata-DS80000830A.pdf) - port 2: - can detect distance - can detect open on each wire of pair A (wire 1 and 2) - can detect open only on one wire of pair B (only wire 3) - can detect short between wires of a pair (wires 1 + 2 or 3 + 6) - short between pairs is detected as open. For example short between wires 2 + 3 is detected as open. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit c916e8e1ea724db0f7bae36c11aaadc631226321 Author: Oleksij Rempel Date: Mon Jun 14 06:31:24 2021 +0200 net: dsa: dsa_slave_phy_connect(): extend phy's flags with port specific phy flags The current get_phy_flags() is only processed when we connect to a PHY via a designed phy-handle property via phylink_of_phy_connect(), but if we fallback on the internal MDIO bus created by a switch and take the dsa_slave_phy_connect() path then we would not be processing that flag and using it at PHY connection time. Suggested-by: Florian Fainelli Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 36838050c453e591ff2ee744d1149630bc5c3310 Author: Oleksij Rempel Date: Mon Jun 14 06:31:23 2021 +0200 net: dsa: microchip: ksz8795: add LINK_MD register support Add mapping for LINK_MD register to enable cable testing functionality. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f873f112553b520e86be3992a38b19e3747b31af Author: Oleksij Rempel Date: Mon Jun 14 06:31:22 2021 +0200 net: phy: micrel: ksz8081 add MDI-X support Add support for MDI-X status and configuration Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 52939393bd682248a415de4c0439280aafaccd66 Author: Oleksij Rempel Date: Mon Jun 14 06:31:21 2021 +0200 net: phy/dsa micrel/ksz886x add MDI-X support Add support for MDI-X status and configuration Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0033f890f95ba52dd7bf154d62aa9a5317456401 Author: Oleksij Rempel Date: Mon Jun 14 06:31:20 2021 +0200 net: phy: micrel: use consistent alignments This patch changes the alignments to one space between "#define" and the macro. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2c709e0bdad4d996ec8925b9ee6d5b97458708f1 Author: Michael Grzeschik Date: Mon Jun 14 06:31:19 2021 +0200 net: dsa: microchip: ksz8795: add phylink support This patch adds the phylink support to the ksz8795 driver to provide configuration exceptions on quirky KSZ8863 and KSZ8873 ports. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ec4b94f9b37bf028cb9b9c39cd1c1cb5dd1ab40c Author: Michael Grzeschik Date: Mon Jun 14 06:31:18 2021 +0200 net: phy: micrel: move phy reg offsets to common header Some micrel devices share the same PHY register defines. This patch moves them to one common header so other drivers can reuse them. And reuse generic MII_* defines where possible. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ffa85b73c3c4143a8e8087c0930f6c5a6ead8e9f Author: Taehee Yoo Date: Sun Jun 13 14:43:44 2021 +0000 mld: avoid unnecessary high order page allocation in mld_newpack() If link mtu is too big, mld_newpack() allocates high-order page. But most mld packets don't need high-order page. So, it might waste unnecessary pages. To avoid this, it makes mld_newpack() try to allocate order-0 page. Suggested-by: Eric Dumazet Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit b84b53ee8337ca69512d25295961571fa08a219d Author: Alex Elder Date: Sun Jun 13 09:25:22 2021 -0500 net: qualcomm: rmnet: always expose a few functions A recent change tidied up some conditional code, avoiding the use of some #ifdefs. Unfortunately, if CONFIG_IPV6 was not enabled, it meant that two functions were referenced but never defined. The easiest fix is to just define stubs for these functions if CONFIG_IPV6 is not defined. This will soon be simplified further by some other development in the works... Reported-by: kernel test robot Fixes: 75db5b07f8c39 ("net: qualcomm: rmnet: eliminate some ifdefs") Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b5ec0705ffe891910e8e615b2efb1c2b292e917c Author: Colin Ian King Date: Sun Jun 13 14:46:36 2021 +0100 ipv6: fib6: remove redundant initialization of variable err The variable err is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit d17032f2befaceef2c8c6b761ae657bc700b0be3 Merge: 614124bea77e4 0df0240946b1f Author: Mark Brown Date: Mon Jun 14 20:41:59 2021 +0100 Merge remote-tracking branch 'regmap/for-5.14' into regmap-next commit ce4f8afd85d6871e3ad76ce737fbbfc0521fa3e4 Author: Colin Ian King Date: Sun Jun 13 14:27:40 2021 +0100 net: phy: micrel: remove redundant assignment to pointer of_node The pointer of_node is being initialized with a value that is never read and it is being updated later with a new value inside a do-while loop. The initialization is redundant and can be removed and the pointer dev is no longer required and can be removed too. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9917060fc30a40f1ef899dc8c61ae964a9a4407c Author: Sunil Goutham Date: Sun Jun 13 16:23:05 2021 +0530 octeontx2-pf: Cleanup flow rule management Current MCAM allocation scheme allocates a single lot of MCAM entries for ntuple filters, unicast filters and VF VLAN rules. This patch attempts to cleanup this logic by segregating MCAM rule allocation and management for Ntuple rules and unicast, VF VLAN rules. This segregation will result in reusing most of the logic for supporting ntuple filters for VF devices. Also added debug messages for MCAM entry allocation failures. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 2d7ff2d83cac1ca8742aa02cac0516e58e8c65c8 Author: David Ahern Date: Sat Jun 12 10:32:15 2021 -0600 nexthops: Add selftests for cleanup of known bad route add Test cleanup path for routes usinig nexthop objects before the reference is taken on the nexthop. Specifically, bad metric for ipv4 and ipv6 and source routing for ipv6. Selftests that correspond to the recent bug fix: 821bbf79fe46 ("ipv6: Fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions") Signed-off-by: David Ahern Cc: Coco Li Signed-off-by: David S. Miller commit 35d7b72a632bc7afb15356f44005554af8697904 Author: Srinivas Neeli Date: Fri Apr 9 19:38:06 2021 +0530 gpio: zynq: Check return value of irq_get_irq_data In two different instances the return value of "irq_get_irq_data" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any error. Addresses-Coverity: "returned_null" Signed-off-by: Srinivas Neeli Signed-off-by: Bartosz Golaszewski commit a51b2fb94b04ab71e53a71b9fad03fa826941254 Author: Srinivas Neeli Date: Fri Apr 9 19:38:05 2021 +0530 gpio: zynq: Check return value of pm_runtime_get_sync Return value of "pm_runtime_get_sync" API was neither captured nor checked. Fixed it by capturing the return value and then checking for any warning. Addresses-Coverity: "check_return" Signed-off-by: Srinivas Neeli Signed-off-by: Bartosz Golaszewski commit c43ce4740249b485846093f8a66220b25fb86290 Author: Srinivas Neeli Date: Fri Apr 9 19:38:04 2021 +0530 gpio: zynq: use module_platform_driver to simplify the code module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Srinivas Neeli Signed-off-by: Bartosz Golaszewski commit 3ae5950db617d1cc3eb4eb55750fa9d138529b49 Author: Geert Uytterhoeven Date: Mon Jun 7 16:41:20 2021 +0200 thermal/drivers/rcar_gen3_thermal: Do not shadow rcar_gen3_ths_tj_1 With -Wshadow: drivers/thermal/rcar_gen3_thermal.c: In function ‘rcar_gen3_thermal_probe’: drivers/thermal/rcar_gen3_thermal.c:310:13: warning: declaration of ‘rcar_gen3_ths_tj_1’ shadows a global declaration [-Wshadow] 310 | const int *rcar_gen3_ths_tj_1 = of_device_get_match_data(dev); | ^~~~~~~~~~~~~~~~~~ drivers/thermal/rcar_gen3_thermal.c:246:18: note: shadowed declaration is here 246 | static const int rcar_gen3_ths_tj_1 = 126; | ^~~~~~~~~~~~~~~~~~ To add to the confusion, the local variable has a different type. Fix the shadowing by renaming the local variable to ths_tj_1. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/9ea7e65d0331daba96f9a7925cb3d12d2170efb1.1623076804.git.geert+renesas@glider.be commit 8946187ab57ffd02088e50256c73dd31f49db06d Author: Niklas Söderlund Date: Sat Jun 5 10:52:11 2021 +0200 thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations The fixed value of 157 used in the calculations are only correct for M3-W, on other Gen3 SoC it should be 167. The constant can be derived correctly from the static TJ_3 constant and the SoC specific TJ_1 value. Update the calculation be correct on all Gen3 SoCs. Fixes: 4eb39f79ef44 ("thermal: rcar_gen3_thermal: Update value of Tj_1") Reported-by: Yoshihiro Shimoda Signed-off-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210605085211.564909-1-niklas.soderlund+renesas@ragnatech.se commit d7539260cd9ad9c18eaf2a1ff71401abdbdfb5cb Author: Yang Yingliang Date: Sat Jun 5 20:02:05 2021 +0800 thermal/drivers/st: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code and remove error message which within devm_platform_get_and_ioremap_resource() already. Signed-off-by: Yang Yingliang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210605120205.2459578-1-yangyingliang@huawei.com commit 81cfa462e458405f58b23f45ddd9439c70bf5347 Author: Shaik Sajida Bhanu Date: Thu Jun 10 12:41:47 2021 +0530 arm64: dts: qcom: sc7180: Add xo clock for eMMC and Sd card The calculations for the DLL register values are based on the clock rate of the reference clock. Provide the reference clock in the definition of the two SDHCI controllers to not rely on the default values. Reviewed-by: Konrad Dybcio Signed-off-by: Shaik Sajida Bhanu Link: https://lore.kernel.org/r/1623309107-27833-1-git-send-email-sbhanu@codeaurora.org [bjorn: Rewrote commit message] Signed-off-by: Bjorn Andersson commit 583bfd484bcc85e9371e7205fa9e827c18ae34fb Author: Nathan Chancellor Date: Thu Apr 29 16:26:12 2021 -0700 x86, lto: Enable Clang LTO for 32-bit as well Commit b33fff07e3e3 ("x86, build: allow LTO to be selected") enabled support for LTO for x86_64 but 32-bit works fine as well. I tested the following config combinations: * i386_defconfig + CONFIG_LTO_CLANG_FULL=y * i386_defconfig + CONFIG_LTO_CLANG_THIN=y * ARCH=i386 allmodconfig + CONFIG_LTO_CLANG_THIN=y with LLVM 11.1.0, 12.0.0, and 13.0.0 from git without any build failures. The defconfigs boot in QEMU with no new warnings. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210429232611.3966964-1-nathan@kernel.org commit 590e8a082a5772071d7bcfea2b8e5a2453cecad2 Author: Mark Rutland Date: Wed Jun 2 16:37:01 2021 +0100 CFI: Move function_nocfi() into compiler.h Currently the common definition of function_nocfi() is provided by , and architectures are expected to provide a definition in . Due to header dependencies, this can make it hard to use function_nocfi() in low-level headers. As function_nocfi() has no dependency on any mm code, nor on any memory definitions, it doesn't need to live in or . Generally, it would make more sense for it to live in , where an architecture can override it in . Move the definitions accordingly. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Kees Cook Cc: Nathan Chancellor Cc: Sami Tolvanen Cc: Will Deacon Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210602153701.35957-1-mark.rutland@arm.com commit 3f1639f8f96c4c60ccf737b02c61eb7c59355a5b Author: Nathan Chancellor Date: Mon May 31 14:06:30 2021 -0700 MAINTAINERS: Add Clang CFI section Sami is the primary developer and Kees has been chauffeuring the patches to Linus so ensure they are always kept in the loop about proposed changes to these files. Add Nick and I as reviewers so we are CC'd as well. Fixes: cf68fffb66d6 ("add support for Clang CFI") Signed-off-by: Nathan Chancellor Acked-by: Nick Desaulniers Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210531210629.864888-1-nathan@kernel.org commit 01de6fe49ca406d4e44c6e4327a7f49d240113c1 Author: Russell King Date: Thu Jun 3 12:54:30 2021 +0100 wlcore: fix read pointer update When reading the fw_log structure from the device's memory, we could race with the firmware updating the actual_buff_size and buff_write_ptr members of this structure. This would lead to bytes being dropped from the log. Fix this by writing back the actual - now fixed - clear_ptr which reflects where we read up to in the buffer. This also means that we must not check that the clear_ptr matches the current write pointer, so remove that check. Signed-off-by: Russell King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/E1lolvi-0003Ri-39@rmk-PC.armlinux.org.uk commit 87ab9cbaee7c11dd12587d60fb16f3ec22c1a5b3 Author: Russell King Date: Thu Jun 3 12:54:24 2021 +0100 wlcore: fix bug reading fwlog With logging enabled, it has been observed that the driver spews messages such as: wlcore: ERROR Calculate of clear addr Clear = 204025b0, write = 204015b0 The problem occurs because 204025b0 is the end of the buffer, and 204015b0 is the beginning, and the calculation for "clear"ing the buffer does not take into account that if we read to the very end of the ring buffer, we are actually at the beginning of the buffer. Fix this. Signed-off-by: Russell King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/E1lolvc-0003RM-VE@rmk-PC.armlinux.org.uk commit 98e94771cadcef2952d3aa64e72b2b8fecef465b Author: Russell King Date: Thu Jun 3 12:54:19 2021 +0100 wlcore: make some of the fwlog calculations more obvious Make some of the fwlog calculations more obvious by calculating bits that get used and documenting what they are. Validate the read pointer while we're at it to ensure we do not overflow the data block we have allocated and read. Signed-off-by: Russell King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/E1lolvX-0003R3-RE@rmk-PC.armlinux.org.uk commit 913112398d5e3e64eb3a45b8a0f1c196daed8f0b Author: Russell King Date: Thu Jun 3 12:54:14 2021 +0100 wlcore: tidy up use of fw_log.actual_buff_size Tidy up the use of fw_log.actual_buff_size - rather than reading it multiple times and applying the endian conversion, read it once into actual_len and use that instead. Signed-off-by: Russell King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/E1lolvS-0003Ql-NJ@rmk-PC.armlinux.org.uk commit 8c77f1cb84585efba108df5e67ecc5cbbceef0d9 Author: Baokun Li Date: Wed Jun 9 15:04:33 2021 +0800 dm writecache: use list_move instead of list_del/list_add in writecache_writeback() Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: Mike Snitzer commit 11ef6bc846dcdce838f0b00c5f6a562c57e5d43b Author: Tony Lindgren Date: Thu Jun 3 09:28:14 2021 +0300 wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP At least on wl12xx, reading the MAC after boot can fail with a warning at drivers/net/wireless/ti/wlcore/sdio.c:78 wl12xx_sdio_raw_read. The failed call comes from wl12xx_get_mac() that wlcore_nvs_cb() calls after request_firmware_work_func(). After the error, no wireless interface is created. Reloading the wl12xx module makes the interface work. Turns out the wlan controller can be in a low-power ELP state after the boot from the bootloader or kexec, and needs to be woken up first. Let's wake the hardware and add a sleep after that similar to wl12xx_pre_boot() is already doing. Note that a similar issue could exist for wl18xx, but I have not seen it so far. And a search for wl18xx_get_mac and wl12xx_sdio_raw_read did not produce similar errors. Cc: Carl Philipp Klemm Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210603062814.19464-1-tony@atomide.com commit 86f1ea9d645edb16358e4a3e1602e1cec81e5048 Author: YueHaibing Date: Sun May 23 11:35:38 2021 +0800 wlcore: use DEVICE_ATTR_ macro Use DEVICE_ATTR_ helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210523033538.25568-1-yuehaibing@huawei.com commit 991bd8d7bc78966b4dc427b53a144f276bffcd52 Author: Mikulas Patocka Date: Sun Jun 6 16:13:16 2021 -0400 dm writecache: commit just one block, not a full page Some architectures have pages larger than 4k and committing a full page causes needless overhead. Fix this by writing a single block when committing the superblock. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 620cbe40ed10aebf596767e934ab42057c34ab04 Author: Mikulas Patocka Date: Sun Jun 6 16:09:10 2021 -0400 dm writecache: remove unused gfp_t argument from wc_add_block() Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 2ef53bf7147778e5784d14bcfedb6d83ba20b9b0 Author: Clayton Casciato Date: Sat Jun 12 19:53:53 2021 -0600 ACPI: processor_throttling: Fix several coding style issues Drop one redundant return statement and fix a few white space issues. Signed-off-by: Clayton Casciato [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 85c1ad47d2c7b9df335511b72b0fb6fdb230811d Author: Clayton Casciato Date: Sat Jun 12 14:09:11 2021 -0600 ACPI: sysfs: Drop four redundant return statements Signed-off-by: Clayton Casciato [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 49b9441a258175a6941a29ed23dfc39f1b632723 Author: Clayton Casciato Date: Sat Jun 12 13:38:01 2021 -0600 ACPI: video: Drop three redundant return statements Signed-off-by: Clayton Casciato [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit ef48667557c53d4b51a1ee3090eab7699324c9de Author: Bryan O'Donoghue Date: Sat Jun 5 18:33:47 2021 +0100 wcn36xx: Move hal_buf allocation to devm_kmalloc in probe Right now wcn->hal_buf is allocated in wcn36xx_start(). This is a problem since we should have setup all of the buffers we required by the time ieee80211_register_hw() is called. struct ieee80211_ops callbacks may run prior to mac_start() and therefore wcn->hal_buf must be initialized. This is easily remediated by moving the allocation to probe() taking the opportunity to tidy up freeing memory by using devm_kmalloc(). Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605173347.2266003-1-bryan.odonoghue@linaro.org commit aa3a522c4f41537909b2ab4da660cb0deee136e8 Author: Yang Li Date: Thu Jun 10 17:40:39 2021 +0800 ACPI: sleep: Fix acpi_pm_pre_suspend() kernel-doc Fix function name in sleep.c kernel-doc comment to remove a warning found by running make W=1 LLVM=1. drivers/acpi/sleep.c:413: warning: expecting prototype for acpi_pre_suspend(). Prototype was for acpi_pm_pre_suspend() instead. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Rafael J. Wysocki commit 743b575af18ddfdb45bd7d1c338d3d9e730728b3 Author: Jiapeng Chong Date: Wed May 26 18:22:48 2021 +0800 wcn36xx: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/net/wireless/ath/wcn36xx/dxe.c:803 wcn36xx_dxe_tx_frame() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1622024568-32130-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 69530b434780217053a5a98462d76129ac776451 Author: Yang Li Date: Thu Jun 10 17:40:38 2021 +0800 ACPI: processor_throttling: Remove redundant initialization of 'obj' 'obj' is being initialized, however this value is never read as 'obj' is assigned an updated value later. Remove the redundant initialization. Clean up clang warning: drivers/acpi/processor_throttling.c:409:20: warning: Value stored to 'obj' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Rafael J. Wysocki commit 1e2e8ee957343575be7b370367b8312f7c489ac0 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:40 2021 +0100 wcn36xx: Enable WOWLAN flags Enable flags for - Magic packet - GTK rekey Previous patches implemented the necessary code to switch these two on. Standalone magic packet absent GTK rekey is pretty useless, so it makes sense to flag both at once. Once done it is possible for wcn36xx firmware to 1. Respond to ipv4 and ipv6 ARP/NS lookup requests 2. Bring the system out of suspend when a magic packet is received. Magic in our case is a simple ipv4 or ipv6 unicast. 3. GTK rekey whilst in suspend Once we wake from suspend the GTK will be updated as necessary Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-13-bryan.odonoghue@linaro.org commit ebe7c1a6635f19c61c14b78ba05a287e3022f4f8 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:39 2021 +0100 wcn36xx: Add host resume request support This commit is the corresponding resume() path request to the firmware when resuming. Unlike the suspend() version which is a unidirectional indication, the resume version is a standard request/response. Once the resume() request completes ipv4 ARP, ipv6 NS and GTK rekey offload stop working and can subsequently be rolled back. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-12-bryan.odonoghue@linaro.org commit 60f0078b1ebd51b5cde01f0001c8402a9ef0cec5 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:38 2021 +0100 wcn36xx: Add Host suspend indication support In order to activate ipv4 ARP offload, ipv6 NS offload and firmware GTK offload we need to send a unidirectional indication from host to wcn indicating a transition to suspend. Once done, firmware will respond to ARP broadcasts, ipv6 NS lookups and perform GTK rekeys without waking the host. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-11-bryan.odonoghue@linaro.org commit bedf1169bcae2f762b37d40dc9db648fe7ad1952 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:37 2021 +0100 wcn36xx: Add GTK offload info to WoWLAN resume Having enabled GTK rekey in suspend, we need to extract the replay counter from the firmware on resume and perform a ieee80211_gtk_rekey_notify() so that the STA remains verified from the perspective of the AP. In order to enable the SMD command and response we need to pack the existing command/response structures. Given these structures are currently unused, there's no need to backport this as a fix. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-10-bryan.odonoghue@linaro.org commit 6693f7675c9b055ee3428844ee8999bfe22d3cd2 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:36 2021 +0100 wcn36xx: Add GTK offload to WoWLAN path Using previously set GTK KCK and KEK material this commit adds GTK rekeying to the WoWLAN suspend/resume path. A small error in the packing of the up to now unused command structure is fixed as we go. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-9-bryan.odonoghue@linaro.org commit 8974e5917b31c30ab30af1e992cfb35eec839a5f Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:35 2021 +0100 wcn36xx: Add set_rekey_data callback Add a callback for Group Temporal Key tracking as provided by the standard WiFi ops structure. We track the key to integrate GTK offloading into the WoWLAN suspend path later on. Code comes from the Intel iwlwifi driver with minimal name changes. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-8-bryan.odonoghue@linaro.org commit 1456223c468447b1c5d2c1d8748748eea379a501 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:34 2021 +0100 wcn36xx: Add ipv6 namespace offload in suspend We need to respond to ipv6 namespace lookups when in suspend. This patch adds the necessary changes to issue the appropriate firmware command on suspend and resume to enter/exit firmware offloaded ns lookup. Signed-off-by: Bryan O'Donoghue Reported-by: kernel test robot Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-7-bryan.odonoghue@linaro.org commit c7a61af55976dbd11b176d2badda869a7537dca4 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:33 2021 +0100 wcn36xx: Add ipv6 address tracking Taking code from iwlwifi this commit adds a standard callback for ipv6_addr_change(). This callback allows wcn36xx to know the set of ipv6 addresses. Something we need to know in order to get wowlan working with ipv6. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-6-bryan.odonoghue@linaro.org commit 6feb634f4d9fceb0241612ad46ad55b54fd78df5 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:32 2021 +0100 wcn36xx: Do not flush indication queue on suspend/resume Testing on Android reveals that the flush on both suspend and resume of the firmware indication work-queue can stall indefinitely. Given this code path doesn't appear to have been exercised up until now, removing this flush to unblock this situation. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-5-bryan.odonoghue@linaro.org commit 5478c41fce5dd6b751075856666a0f9a101c3dd2 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:31 2021 +0100 wcn36xx: Add ipv4 ARP offload support in suspend Add ARP offload support. Firmware is capable of responding to ARP requests for a single ipv4 address only. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-4-bryan.odonoghue@linaro.org commit f2f49601067bd7b7f3392a50a3738335fe9d0cb8 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:30 2021 +0100 wcn36xx: Run suspend for the first ieee80211_vif A subsequent set of patches will extend out suspend/resume support in this driver, we cannot set the firmware up for multiple ipv4/ipv6 addresses and as such we can't iterate through a list of ieee80211_vif. Constrain the interaction with the firmware to the first ieee80211_vif on the suspend/resume/wowlan path. Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-3-bryan.odonoghue@linaro.org commit ba4e967379f0a2c2a72fb572c69761218a2468a6 Author: Bryan O'Donoghue Date: Sat Jun 5 02:11:29 2021 +0100 wcn36xx: Return result of set_power_params in suspend wcn36xx_smd_set_power_params() can return an error. For the purposes of entering into suspend we need the suspend() function to trap and report errors up the stack. First step in this process is reporting the existing result code for wcn36xx_smd_set_power_params(). Signed-off-by: Bryan O'Donoghue Tested-by: Benjamin Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210605011140.2004643-2-bryan.odonoghue@linaro.org commit e02a3b945816a77702a2769a70ef5f9b06e49d54 Author: Pavel Skripkin Date: Mon Jun 14 01:00:19 2021 +0300 staging: rtl8712: fix memory leak in rtl871x_load_fw_cb There is a leak in rtl8712 driver. The problem was in non-freed adapter data if firmware load failed. This leak can be reproduced with this code: https://syzkaller.appspot.com/text?tag=ReproC&x=16612f02d00000, Autoload must fail (to not hit memory leak reported by syzkaller) There are 2 possible ways how rtl871x_load_fw_cb() and r871xu_dev_remove() can be called (in case of fw load error). 1st case: r871xu_dev_remove() then rtl871x_load_fw_cb() In this case r871xu_dev_remove() will wait for completion and then will jump to the end, because rtl871x_load_fw_cb() set intfdata to NULL: if (pnetdev) { struct _adapter *padapter = netdev_priv(pnetdev); /* never exit with a firmware callback pending */ wait_for_completion(&padapter->rtl8712_fw_ready); pnetdev = usb_get_intfdata(pusb_intf); usb_set_intfdata(pusb_intf, NULL); if (!pnetdev) goto firmware_load_fail; ... clean up code here ... } 2nd case: rtl871x_load_fw_cb() then r871xu_dev_remove() In this case pnetdev (from code snippet above) will be zero (because rtl871x_load_fw_cb() set it to NULL) And clean up code won't be executed again. So, in all cases we need to free adapted data in rtl871x_load_fw_cb(), because disconnect function cannot take care of it. And there won't be any race conditions, because complete() call happens after setting intfdata to NULL. In previous patch I moved out free_netdev() from r8712_free_drv_sw() and that's why now it's possible to free adapter data and then call complete. Fixes: 8c213fa59199 ("staging: r8712u: Use asynchronous firmware loading") Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/81e68fe0194499cc2e7692d35bc4dcf167827d8f.1623620630.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman commit d1d3e3cdfda8eb91f0e24be7ec8be1e6e01b3a1c Author: Pavel Skripkin Date: Mon Jun 14 01:00:13 2021 +0300 staging: rtl8712: fix error handling in r871xu_drv_init Previous error handling path was unique for all possible errors and there was unnecessary branching. Also, one step for freeing drv_sw was missing. All these problems was fixed by restructuring error handling path. Also, moved out free_netdev() from r8712_free_drv_sw() for correct error handling. Fixes: 2865d42c78a9 ("staging: r8712u: Add the new driver to the mainline kernel") Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/febb00f72354449bb4d305f373d6d2f47e539ab4.1623620630.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69d998f1e552f6e2e7b55f5058ce1ac7a72903f9 Author: Pavel Skripkin Date: Mon Jun 14 01:00:07 2021 +0300 staging: rtl8712: remove redundant check in r871xu_drv_init padapter->dvobj_init is initialized rigth before initialization check. There is no need for any branching here. Signed-off-by: Pavel Skripkin Link: https://lore.kernel.org/r/d367e5f39f22af44c545f8710cc18fb00f10e66c.1623620630.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 64ed82a5493e4f255b0023b430b6dfbf5084abb1 Author: Martin Kaiser Date: Sat Jun 12 20:00:18 2021 +0200 staging: rtl8188eu: remove another write-only member bAPKThermalMeterIgnore in struct hal_data_8188e is never read and can be removed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210612180019.20387-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit d1d900c6657114b914e11d635a2d6c96be52792c Author: Martin Kaiser Date: Sat Jun 12 20:00:17 2021 +0200 staging: rtl8188eu: remove a write-only power-index members Remove power index members of struct hal_data_8188e that are written to but never read. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210612180019.20387-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 33bbc15d5a7134304f8e74e9e1e30d3a4727104c Author: Martin Kaiser Date: Sat Jun 12 20:00:16 2021 +0200 staging: rtl8188eu: remove a write-only struct member FwRsvdPageStartOffset in struct hal_data_8188e is never read. Remove it. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210612180019.20387-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ebdc8d8cf6b5f07ed60c22e87b6e7e7fd302f147 Author: Martin Kaiser Date: Sat Jun 12 20:00:14 2021 +0200 staging: rtl8188eu: remove unused hal_data_8188e members Remove some members of struct hal_data_8188e which are not used in this driver. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210612180019.20387-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 4829c791b22f98f95339248a428caf08b5f1e3e5 Author: Dennis Zhou Date: Mon Jun 14 14:42:05 2021 +0000 percpu: initialize best_upa variable Tom reported this finding from clang 10's static analysis [1]. Due to the way the code is written, it will always see a successful loop iteration. Instead of setting an initial value, check that it was set instead with BUG_ON() because 0 units per allocation is bogus. [1] https://lore.kernel.org/lkml/20210515180817.1751084-1-trix@redhat.com/ Reported-by: Tom Rix Signed-off-by: Dennis Zhou commit 7c0ae9e01d90a3636ba2e43e8d41329833980edf Author: Tobias Alam Date: Sun Jun 13 22:11:30 2021 -0400 staging: qlge: change msleep to usleep_range This patch changes msleep() to usleep_range() based on Documentation/timers/timers-howto.txt. It suggests using usleep_range() for small msec(1ms - 20ms) because msleep() will often sleep longer than the desired value. Issue found by checkpatch. Signed-off-by: Tobias Alam Link: https://lore.kernel.org/r/YMa60p5dl0LMV/9D@tobias-VirtualBox Signed-off-by: Greg Kroah-Hartman commit 9866b3133b70cf7799a121cebdf4cf744c30e103 Author: Phillip Potter Date: Sun Jun 13 11:24:59 2021 +0100 staging: rtl8188eu: convert DBG_88E calls in core/rtw_recv.c Convert all calls to the DBG_88E macro in core/rtw_recv.c into netdev_dbg calls. The DBG_88E macro is unnecessary, as visibility of debug messages can be controlled more precisely by just using debugfs. It is important to keep these messages still, as they are displayable via a kernel module parameter when using DBG_88E. One such converted call is after a failed skb allocation, but as it prints additional information besides just stating failure, I've left it in despite the checkpatch warning. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210613102459.7532-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 9d056c19c567419003aba4a6b73d51f32620c412 Author: Phillip Potter Date: Sun Jun 13 11:24:54 2021 +0100 staging: rtl8188eu: convert DBG_88E calls in core/rtw_sta_mgt.c Convert both calls to the DBG_88E macro in core/rtw_sta_mgt.c into netdev_dbg calls. The DBG_88E macro is unnecessary, as visibility of debug messages can be controlled more precisely by just using debugfs. It is important to keep these messages still, as they are displayable via a kernel module parameter when using DBG_88E. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210613102454.7480-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 47bbb445748e19a2f241878600c1aabc28518ab5 Author: Phillip Potter Date: Sat Jun 12 19:19:42 2021 +0100 staging: rtl8188eu: remove HW_DEF_ODM_DBG_FLAG enum value Remove HW_DEF_ODM_DBG_FLAG definition from the hal_def_variable enum in include/hal_intf.h, and remove its usage from the switch statement in rtw_hal_get_def_var inside hal/usb_halinit.c - this is dead code and no longer used, now that ODM_RT_TRACE and include/odm_debug.h have been removed. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210612181942.33817-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 7002b526f4ff1f6da34356e67085caafa6be383a Author: Dan Carpenter Date: Mon Jun 14 12:58:36 2021 +0300 staging: gdm724x: check for overflow in gdm_lte_netif_rx() This code assumes that "len" is at least 62 bytes, but we need a check to prevent a read overflow. Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YMcoTPsCYlhh2TQo@mwanda Signed-off-by: Greg Kroah-Hartman commit 4a36e160856db8a8ddd6a3d2e5db5a850ab87f82 Author: Dan Carpenter Date: Mon Jun 14 12:55:35 2021 +0300 staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt() There needs to be a check to verify that we don't read beyond the end of "buf". This function is called from do_rx(). The "buf" is the USB transfer_buffer and "len" is "urb->actual_length". Fixes: 61e121047645 ("staging: gdm7240: adding LTE USB driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YMcnl4zCwGWGDVMG@mwanda Signed-off-by: Greg Kroah-Hartman commit d65f069e50a3f69c3196251bb770b1308c7686e6 Author: Vignesh Raghavendra Date: Mon Jun 7 19:15:58 2021 +0530 arm64: dts: ti: Drop reg-io-width/reg-shift from UART nodes 8250_omap compatible UART IPs on all SoCs have registers aligned at 4 byte address boundary and constant byte addressability. Thus there is no need for reg-io-width or reg-shift DT properties. These properties are not used by 8250_omap driver nor documented as part of binding document. Therefore drop them. This is in preparation to move omap-serial.txt to YAML format. Signed-off-by: Vignesh Raghavendra Reviewed-by: Lokesh Vutla Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210607134558.23704-1-vigneshr@ti.com commit d3f1b155c04d949c843e6028034766aba1e0f8bf Author: Aswath Govindraju Date: Tue Jun 8 10:44:14 2021 +0530 arm64: dts: ti: k3-am642-evm: align ti,pindir-d0-out-d1-in property with dt-shema ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly. Fixes: 4fb6c04683aa ("arm64: dts: ti: k3-am642-evm: Add support for SPI EEPROM") Signed-off-by: Aswath Govindraju Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210608051414.14873-3-a-govindraju@ti.com commit 4f76ea7b4da1cce9a9bda1fa678ef8036584c66b Author: Aswath Govindraju Date: Tue Jun 8 10:44:13 2021 +0530 arm64: dts: ti: am65: align ti,pindir-d0-out-d1-in property with dt-shema ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly. Fixes: e180f76d0641 ("arm64: dts: ti: Add support for Siemens IOT2050 boards") Fixes: 5da94b50475a ("arm64: dts: ti: k3-am654: Enable main domain McSPI0") Signed-off-by: Aswath Govindraju Acked-by: Jan Kiszka Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210608051414.14873-2-a-govindraju@ti.com commit 50c9bfca1bfe9ffd56d8c5deecf9204d14e20bfd Author: Grygorii Strashko Date: Tue Jun 8 21:49:40 2021 +0300 arm64: dts: ti: k3-am642-main: fix ports mac properties The current device tree CPSW3g node adds non-zero "mac-address" property to the ports, which prevents random MAC address assignment to network devices if bootloader failed to update DT. This may cause more then one host to have the same MAC in the network. mac-address = [00 00 de ad be ef]; mac-address = [00 01 de ad be ef]; In addition, there is one MAC address available in eFuse registers which can be used for default port 1. Hence, fix ports MAC properties by: - resetting "mac-address" property to 0 - adding ti,syscon-efuse = <&main_conf 0x200> to Port 1 Fixes: 3753b12877b6 ("arm64: dts: ti: k3-am64-main: Add CPSW DT node") Signed-off-by: Grygorii Strashko Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210608184940.25934-1-grygorii.strashko@ti.com commit f6bca4d91b2ea052e917cca3f9d866b5cc1d500a Author: Timo Sigurdsson Date: Mon Jun 14 09:25:39 2021 +0200 ata: ahci_sunxi: Disable DIPM DIPM is unsupported or broken on sunxi. Trying to enable the power management policy med_power_with_dipm on an Allwinner A20 SoC based board leads to immediate I/O errors and the attached SATA disk disappears from the /dev filesystem. A reset (power cycle) is required to make the SATA controller or disk work again. The A10 and A20 SoC data sheets and manuals don't mention DIPM at all [1], so it's fair to assume that it's simply not supported. But even if it was, it should be considered broken and best be disabled in the ahci_sunxi driver. [1] https://github.com/allwinner-zh/documents/tree/master/ Fixes: c5754b5220f0 ("ARM: sunxi: Add support for Allwinner SUNXi SoCs sata to ahci_platform") Cc: stable@vger.kernel.org Signed-off-by: Timo Sigurdsson Tested-by: Timo Sigurdsson Link: https://lore.kernel.org/r/20210614072539.3307-1-public_timo.s@silentcreek.de Signed-off-by: Jens Axboe commit d07f3b081ee632268786601f55e1334d1f68b997 Author: Christoph Hellwig Date: Tue Jun 8 18:13:27 2021 +0200 mark pstore-blk as broken pstore-blk just pokes directly into the pagecache for the block device without going through the file operations for that by faking up it's own file operations that do not match the block device ones. As this breaks the control of the block layer of it's page cache, and even now just works by accident only the best thing is to just disable this driver. Fixes: 17639f67c1d6 ("pstore/blk: Introduce backend for block devices") Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210608161327.1537919-1-hch@lst.de Signed-off-by: Jens Axboe commit aeab9506ef50d23b350d1822c324023c9e1cb783 Author: Pavel Begunkov Date: Mon Jun 14 02:36:24 2021 +0100 io_uring: inline io_iter_do_read() There are only two calls in source code of io_iter_do_read(), the function is small and pretty hot though is failed to get inlined. Makr it as inline. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/25a26dae7660da73fbc2244b361b397ef43d3caf.1623634182.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 78cc687be9c5420d743346f78bb8af9d59a903f9 Author: Pavel Begunkov Date: Mon Jun 14 02:36:23 2021 +0100 io_uring: unify SQPOLL and user task cancellations Merge io_uring_cancel_sqpoll() and __io_uring_cancel() as it's easier to have a conditional ctx traverse inside than keeping them in sync. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/adfe24d6dad4a3883a40eee54352b8b65ac851bb.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 09899b19155a152f3ff4eb5c203232175d630fbc Author: Pavel Begunkov Date: Mon Jun 14 02:36:22 2021 +0100 io_uring: cache task struct refs tctx in submission part is always synchronised because is executed from the task's context, so we can batch allocate tctx/task references and store them across syscall boundaries. It avoids enough of operations, including an atomic for getting task ref and a percpu_counter_add() function call, which still fallback to spinlock for large batching cases (around >=32). Should be good for SQPOLL submitting in small portions and coming at some moment bpf submissions. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/14b327b973410a3eec1f702ecf650e100513aca9.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2d091d62b1106e90f195599c67bf385ddedfc915 Author: Pavel Begunkov Date: Mon Jun 14 02:36:21 2021 +0100 io_uring: don't vmalloc rsrc tags We don't really need vmalloc for keeping tags, it's not a hot path and is there out of convenience, so replace it with two level tables to not litter kernel virtual memory mappings. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/241a3422747113a8909e7e1030eb585d4a349e0d.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9123c8ffce1610323ec9c0874fa0262353f41fc3 Author: Pavel Begunkov Date: Mon Jun 14 02:36:20 2021 +0100 io_uring: add helpers for 2 level table alloc Some parts like fixed file table use 2 level tables, factor out helpers for allocating/deallocating them as more users are to come. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1709212359cd82eb416d395f86fc78431ccfc0aa.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 157d257f99c15c43668a98f804e3e3e6eb956464 Author: Pavel Begunkov Date: Mon Jun 14 02:36:19 2021 +0100 io_uring: remove rsrc put work irq save/restore io_rsrc_put_work() is executed by workqueue in non-irq context, so no need for irqsave/restore variants of spinlocking. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2a7f77220735f4ad404ac885b4d73bdf42d2f836.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d878c81610e187becff1454f36b63c59ec165566 Author: Pavel Begunkov Date: Mon Jun 14 02:36:18 2021 +0100 io_uring: hide rsrc tag copy into generic helpers Make io_rsrc_data_alloc() taking care of rsrc tags loading on registration, so we don't need to repeat it for each new rsrc type. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5609680697bd09735de10561b75edb95283459da.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e587227b680f798dd74644d047dd52ddb36cb82c Author: Pavel Begunkov Date: Mon Jun 14 02:36:17 2021 +0100 io-wq: simplify worker exiting io_worker_handle_work() already takes care of the empty list case and releases spinlock, so get rid of ugly conditional unlocking and unconditionally call handle_work() Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7521e485677f381036676943e876a0afecc23017.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 769e683715211ad3cbed5908a86b97dd54d60970 Author: Pavel Begunkov Date: Mon Jun 14 02:36:16 2021 +0100 io-wq: don't repeat IO_WQ_BIT_EXIT check by worker io_wqe_worker()'s main loop does check IO_WQ_BIT_EXIT flag, so no need for a second test_bit at the end as it will immediately jump to the first check afterwards. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d6af4a51c86523a527fb5417c9fbc775c4b26497.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit eef51daa72f745b6e771d18f6f37c7e5cd4ccdf1 Author: Pavel Begunkov Date: Mon Jun 14 02:36:15 2021 +0100 io_uring: rename function *task_file What at some moment was references to struct file used to control lifetimes of task/ctx is now just internal tctx structures/nodes, so rename outdated *task_file() routines into something more sensible. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e2fbce42932154c2631ce58ffbffaa232afe18d5.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit cb3d8972c78ab0cdb55a30d6db927a3e0442b3f9 Author: Pavel Begunkov Date: Mon Jun 14 02:36:14 2021 +0100 io_uring: refactor io_iopoll_req_issued A simple refactoring of io_iopoll_req_issued(), move in_async inside so we don't pass it around and save on double checking it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1513bfde4f0c835be25ac69a82737ab0668d7665.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 382cb030469db3d428ada09e7925f684ba9d61cf Author: Pavel Begunkov Date: Mon Jun 14 02:36:13 2021 +0100 io-wq: remove unused io-wq refcounting iowq->refs is initialised to one and killed on exit, so it's not used and we can kill it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/401007393528ea7c102360e69a29b64498e15db2.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c7f405d6fa36f778931881bfb1e12dd401d0bc62 Author: Pavel Begunkov Date: Mon Jun 14 02:36:12 2021 +0100 io-wq: embed wqe ptr array into struct io_wq io-wq keeps an array of pointers to struct io_wqe, allocate this array as a part of struct io-wq, it's easier to code and saves an extra indirection for nearly each io-wq call. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1482c6a001923bbed662dc38a8a580fb08b1ed8c.1623634181.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 976517f162a05f4315b2373fd11585c395506259 Author: Pavel Begunkov Date: Wed Jun 9 12:07:25 2021 +0100 io_uring: fix blocking inline submission There is a complaint against sys_io_uring_enter() blocking if it submits stdin reads. The problem is in __io_file_supports_async(), which sees that it's a cdev and allows it to be processed inline. Punt char devices using generic rules of io_file_supports_async(), including checking for presence of *_iter() versions of rw callbacks. Apparently, it will affect most of cdevs with some exceptions like null and zero devices. Cc: stable@vger.kernel.org Reported-by: Birk Hirdman Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d60270856b8a4560a639ef5f76e55eb563633599.1623236455.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 40dad765c045ab6dbd481cc4f00d04953e77510c Author: Pavel Begunkov Date: Wed Jun 9 15:26:54 2021 +0100 io_uring: enable shmem/memfd memory registration Relax buffer registration restictions, which filters out file backed memory, and allow shmem/memfd as they have normal anonymous pages underneath. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d0acdee296d42e700c16271d9f95085a9c897a53 Author: Pavel Begunkov Date: Sun May 16 22:58:12 2021 +0100 io_uring: don't bounce submit_state cachelines struct io_submit_state contains struct io_comp_state and so locked_free_*, that renders cachelines around ->locked_free* being invalidated on most non-inline completions, that may terrorise caches if submissions and completions are done by different tasks. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/290cb5412b76892e8631978ee8ab9db0c6290dd5.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d068b5068d43353a352b3ec92865f7045fdb213e Author: Pavel Begunkov Date: Sun May 16 22:58:11 2021 +0100 io_uring: rename io_get_cqring Rename io_get_cqring() into io_get_cqe() for consistency with SQ, and just because the old name is not as clear. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a46a53e3f781de372f5632c184e61546b86515ce.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8f6ed49a4443be35a11807695dbae2680f7ca6fc Author: Pavel Begunkov Date: Sun May 16 22:58:10 2021 +0100 io_uring: kill cached_cq_overflow There are two copies of cq_overflow, shared with userspace and internal cached one. It was needed for DRAIN accounting, but now we have yet another knob to tune the accounting, i.e. cq_extra, and we can throw away the internal counter and just increment the one in the shared ring. If user modifies it as so never gets the right overflow value ever again, it's its problem, even though before we would have restored it back by next overflow. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8427965f5175dd051febc63804909861109ce859.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ea5ab3b579836d784357ae9cb5bf9d7242a645b9 Author: Pavel Begunkov Date: Sun May 16 22:58:09 2021 +0100 io_uring: deduce cq_mask from cq_entries No need to cache cq_mask, it's exactly cq_entries - 1, so just deduce it to not carry it around. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d439efad0503c8398451dae075e68a04362fbc8d.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a566c5562d41b99f11c8224b2a3010e60ad93acf Author: Pavel Begunkov Date: Sun May 16 22:58:08 2021 +0100 io_uring: remove dependency on ring->sq/cq_entries We have numbers of {sq,cq} entries cached in ctx, don't look up them in user-shared rings as 1) it may fetch additional cacheline 2) user may change it and so it's always error prone. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/745d31bc2da41283ddd0489ef784af5c8d6310e9.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b13a8918d395554ff9a8cee17d03ed45d805df24 Author: Pavel Begunkov Date: Sun May 16 22:58:07 2021 +0100 io_uring: better locality for rsrc fields ring has two types of resource-related fields: used for request submission, and field needed for update/registration. Reshuffle them into these two groups for better locality and readability. The second group is not in the hot path, so it's natural to place them somewhere in the end. Also update an outdated comment. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/05b34795bb4440f4ec4510f08abd5a31830f8ca0.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b986af7e2df4f0871367c397ba61a542f37c0ab3 Author: Pavel Begunkov Date: Sun May 16 22:58:06 2021 +0100 io_uring: shuffle rarely used ctx fields There is a bunch of scattered around ctx fields that are almost never used, e.g. only on ring exit, plunge them to the end, better locality, better aesthetically. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/782ff94b00355923eae757d58b1a47821b5b46d4.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 93d2bcd2cbfed2c714341f7a7ecd511aaedabd83 Author: Pavel Begunkov Date: Sun May 16 22:58:05 2021 +0100 io_uring: make fail flag not link specific The main difference is in req_set_fail_links() renamed into req_set_fail(), which now sets REQ_F_FAIL_LINK/REQ_F_FAIL flag unconditional on whether it has been a link or not. It only matters in io_disarm_next(), which already handles it well, and all calls to it have a fast path checking REQ_F_LINK/HARDLINK. It looks cleaner, and sheds binary size text data bss dec hex filename 84235 12390 8 96633 17979 ./fs/io_uring.o 84151 12414 8 96573 1793d ./fs/io_uring.o Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e2224154dd6e53b665ac835d29436b177872fa10.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3dd0c97a9e011b11ce6bd245bacf58c57f6f7875 Author: Pavel Begunkov Date: Sun May 16 22:58:04 2021 +0100 io_uring: get rid of files in exit cancel We don't match against files on cancellation anymore, so no need to drag around files_struct anymore, just pass a flag telling whether only inflight or all requests should be killed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7bfc5409a78f8e2d6b27dec3293ec2d248677348.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit acfb381d9d714c657ff540099fa5a6fa98e71f07 Author: Pavel Begunkov Date: Sun May 16 22:58:03 2021 +0100 io_uring: simplify waking sqo_sq_wait Going through submission in __io_sq_thread() and still having a full SQ is rather unexpected, so remove a check for SQ fullness and just wake up whoever wait on sqo_sq_wait. Also skip if it doesn't do submission in the first place, likely may to happen for SQPOLL sharing and/or IOPOLL. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e2e91751e87b1a39f8d63ef884aaff578123f61e.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 21f2fc080f8654ce60b3e9192ba3b596c6a2ead6 Author: Pavel Begunkov Date: Sun May 16 22:58:02 2021 +0100 io_uring: remove unused park_task_work As sqpoll cancel via task_work is killed, remove everything related to park_task_work as it's not used anymore. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/310d8b76a2fbbf3e139373500e04ad9af7ee3dbb.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit aaa9f0f48172b190a835792abe63f8859372eeec Author: Pavel Begunkov Date: Sun May 16 22:58:01 2021 +0100 io_uring: improve sq_thread waiting check If SQPOLL task finds a ring requesting it to continue running, no need to set wake flag to rest of the rings as it will be cleared in a moment anyway, so hide it in a single sqd->ctx_list loop. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1ee5a696d9fd08645994c58ee147d149a8957d94.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e4b6d902a9e38f424ce118106ea4d1665b7951b5 Author: Pavel Begunkov Date: Sun May 16 22:58:00 2021 +0100 io_uring: improve sqpoll event/state handling As sqd->state changes rarely, don't check every event one by one but look them all at once. Add a helper function. Also don't go into event waiting sleeping with STOP flag set. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/645025f95c7eeec97f88ff497785f4f1d6f3966f.1621201931.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b1f4c363666c31f289b26bfc7c38378f0db79b55 Author: Baoquan He Date: Wed Jun 9 16:32:18 2021 +0800 Documentation: kdump: update kdump guide Some parts of the guide are aged, hence need be updated. 1) The backup area of the 1st 640K on X86_64 has been removed by below commits, update the description accordingly. commit 7c321eb2b843 ("x86/kdump: Remove the backup region handling") commit 6f599d84231f ("x86/kdump: Always reserve the low 1M when the crashkernel option is specified") 2) Sort out the descripiton of "crashkernel syntax" part. 3) And some other minor cleanups. Signed-off-by: Baoquan He Acked-by: Dave Young Link: https://lore.kernel.org/r/20210609083218.GB591017@MiWiFi-R3L-srv [jc: added blank line to fix added build warning] Signed-off-by: Jonathan Corbet commit d7c176e9b5329b4a490b3d8ea49564fc9ff11071 Author: Carlos Llamas Date: Wed Jun 9 19:50:58 2021 +0000 docs: printk-formats: update size-casting examples Since commit 72deb455b5ec ("block: remove CONFIG_LBDAF") sector_t and blkcnt_t types are no longer variable in size, making them unsuitable examples for casting to the largest possible type. This patch replaces such examples with cycles_t and blk_status_t types, whose sizes depend on architecture and config options respectively. Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20210609195058.3518943-1-cmllamas@google.com Signed-off-by: Jonathan Corbet commit c586f53ae159c6c1390f093a1ec94baef2df9f3a Author: Lucas Stach Date: Fri May 28 20:01:35 2021 +0200 clk: imx8mq: remove SYS PLL 1/2 clock gates Remove the PLL clock gates as the allowing to gate the sys1_pll_266m breaks the uSDHC module which is sporadically unable to enumerate devices after this change. Also it makes AMP clock management harder with no obvious benefit to Linux, so just revert the change. Link: https://lore.kernel.org/r/20210528180135.1640876-1-l.stach@pengutronix.de Fixes: b04383b6a558 ("clk: imx8mq: Define gates for pll1/2 fixed dividers") Signed-off-by: Lucas Stach Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit b2d501c13470409ee7613855b17e5e5ec4111e1c Author: zpershuai Date: Sun Jun 13 13:29:16 2021 +0800 spi: meson-spicc: fix memory leak in meson_spicc_probe when meson_spicc_clk_init returns failed, it should goto the out_clk label. Signed-off-by: zpershuai Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/1623562156-21995-1-git-send-email-zpershuai@gmail.com Signed-off-by: Mark Brown commit 95730d5eb73170a6d225a9998c478be273598634 Author: zpershuai Date: Sun Jun 13 13:29:32 2021 +0800 spi: meson-spicc: fix a wrong goto jump for avoiding memory leak. In meson_spifc_probe function, when enable the device pclk clock is error, it should use clk_disable_unprepare to release the core clock. Signed-off-by: zpershuai Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/1623562172-22056-1-git-send-email-zpershuai@gmail.com Signed-off-by: Mark Brown commit 3acbacfcb3a78eb53d6fa7bc1599dcdaf043465e Author: Yang Yingliang Date: Tue Jun 1 20:07:21 2021 +0800 spi: spi-mem: fix doc warning in spi-mem.c Fix the following make W=1 warning: drivers/spi/spi-mem.c:819: warning: expecting prototype for spi_mem_driver_unregister_with_owner(). Prototype was for spi_mem_driver_unregister() instead Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210601120721.3198488-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 00430f71b2b18e42ba3d733cbd2d725ec5b2ca80 Author: Axel Lin Date: Thu Jun 10 21:41:28 2021 +0800 regulator: hi6421v600: Use regulator_map_voltage_ascend All the voltage tables have entries in ascendant order, so use regulator_map_voltage_ascend to speed up the mapping. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210610134128.2477821-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 23f95199b6446f828bf879ca316f388893435faa Author: ChiYuan Huang Date: Thu Jun 10 22:38:30 2021 +0800 regulator: rt6160: Remove dummy line and add module description Remove dummy line and add module description. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1623335910-5385-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit 28108d71ee11a7232e1102effab3361049dcd3b8 Author: Shengjiu Wang Date: Fri Jun 11 14:18:38 2021 +0800 ASoC: fsl_spdif: Fix error handler with pm_runtime_enable There is error message when defer probe happens: fsl-spdif-dai 2dab0000.spdif: Unbalanced pm_runtime_enable! Fix the error handler with pm_runtime_enable and add fsl_spdif_remove() for pm_runtime_disable. Fixes: 9cb2b3796e08 ("ASoC: fsl_spdif: Add pm runtime function") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1623392318-26304-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit f1905ab2a8a2103b7fa74a5f96fb50cce0dee6f5 Author: Marek Vasut Date: Thu Jun 10 17:01:35 2021 +0200 ASoC: sgtl5000: Add audio-graph-card port The SGTL5000 codec can be connected via audio-graph-card, add the missing port: entry into the bindings. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20210610150135.29905-1-marex@denx.de Signed-off-by: Mark Brown commit 2e8a8adb96a335a04f1697dd4314f5569521328f Author: Tan Zhongjun Date: Thu Jun 10 12:00:37 2021 +0800 ASoC: fsl_spdif: Remove superfluous error message around platform_get_irq() The platform_get_irq() prints error message telling that interrupt is missing, hence there is no need to duplicated that message. Signed-off-by: Tan Zhongjun Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20210610040037.1064-1-hbut_tan@163.com Signed-off-by: Mark Brown commit 92570939c8b952272f630f807f8ddfac58411869 Author: Yang Yingliang Date: Fri Jun 11 11:53:51 2021 +0800 ASoC: atmel-pdmic: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210611035351.3878091-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 3814c41778f3489ac103c9a045ae26c082d19be3 Author: Yang Yingliang Date: Fri Jun 11 13:02:35 2021 +0800 ASoC: bcm: cygnus_ssp: Use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210611050235.4182746-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit c223f41c1a52bfe10f1d3311679b1d1f9813e500 Author: Srinivasa Rao Mandadapu Date: Wed Jun 9 19:00:39 2021 +0530 ASoC: qcom: Add four speaker support on MI2S secondary Add four speaker support on MI2S secondary block by using I2S SD1 line on gpio52 pin, and add channel map control support in the lpass-cpu audio driver. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609133039.4648-1-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 08c56cab302a059c1f3a95c164def7b21c67ad2e Author: Martin Blumenstingl Date: Sat Jun 12 22:06:50 2021 +0200 ASoC: rt5640: Make codec selectable The Realtek rt5640 codec driver can be used with the generic sound card drivers, so it should be selectable. For example, with the addition of #sound-dai-cells = <0> property in DT, it can be used with simple and graph card drivers. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210612200650.1301661-1-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown commit 39175acd699ae73abd855748e05fb117dcc05a1f Author: Yang Yingliang Date: Fri Jun 11 11:41:22 2021 +0800 ASoC: atmel-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210611034122.3871022-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 1b7f94dd20fc9eb63c8470f9f20544b0f6742440 Author: Yang Yingliang Date: Thu Jun 10 21:27:05 2021 +0800 ASoC: axi-i2s: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210610132705.138706-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 4d5f3a096f3d9e7067c7c2e730d989668e06d552 Author: Tan Zhongjun Date: Thu Jun 10 20:50:52 2021 +0800 ASoC: fsl_easrc: Remove superfluous error message around platform_get_irq() Clean up the check for irq.dev_err is superfluous as platform_get_irq() already prints an error.Remove curly braces to confirm to styling requirements. Signed-off-by: Tan Zhongjun Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20210610125052.1280-1-hbut_tan@163.com Signed-off-by: Mark Brown commit 0df0240946b1ffbe852fa302c04c0d322229c9ce Author: Sander Vanheule Date: Wed Jun 9 15:10:04 2021 +0200 regmap: mdio: Reject invalid addresses When an invalid register offset is provided, the upper bits are silently discarded. Change this to return -ENXIO instead, to help catch potential bugs. Signed-off-by: Sander Vanheule Link: https://lore.kernel.org/r/047007e0e9fb596480829f11f8c7e6281d235c70.1623244066.git.sander@svanheule.net Signed-off-by: Mark Brown commit ce62df2290bb86b39f826a835d6060bc3b43dae7 Author: Sander Vanheule Date: Wed Jun 9 15:10:03 2021 +0200 regmap: mdio: Fix regmap_bus pointer constness A const qualifier was omitted in the declaration of the regmap_bus pointer, resulting in the following errors: drivers/base/regmap/regmap-mdio.c: In function ‘__regmap_init_mdio’: drivers/base/regmap/regmap-mdio.c:87:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 87 | bus = ®map_mdio_c22_bus; | ^ drivers/base/regmap/regmap-mdio.c:89:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 89 | bus = ®map_mdio_c45_bus; | ^ Fix this by ensuring the pointer has the same qualifiers as the assigned values. Fixes: f083be9db060 ("regmap: mdio: Add clause-45 support") Signed-off-by: Sander Vanheule Link: https://lore.kernel.org/r/f304ca638ffdc66d4803a6df1f75436894bd1d5f.1623244066.git.sander@svanheule.net Signed-off-by: Mark Brown commit 12ffd726824a2f52486f72338b6fd3244b512959 Author: Jaroslav Kysela Date: Mon Jun 14 09:17:46 2021 +0200 ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry() In case, where the loops are not executed for a reason, the uninitialized variable 'err' is returned to the caller. Make code fully predictible and assign zero in the declaration. Signed-off-by: Jaroslav Kysela Cc: Mark Brown Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/20210614071746.1787072-1-perex@perex.cz Signed-off-by: Mark Brown commit 68912ebf4d4e50ac4fd41fb9879de9a6b832f7c7 Author: Yang Yingliang Date: Thu Jun 10 21:31:20 2021 +0800 ASoC: axi-spdif: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210610133120.141405-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 9494d059971c5120c60bbe4aae5cba00b20ed774 Author: Yang Yingliang Date: Fri Jun 11 10:21:15 2021 +0800 ASoC: atmel-classd: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210611022115.3583765-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit be374dc0b5062eb8ec3feb5cb1795a24c399f6cc Author: Yang Yingliang Date: Fri Jun 11 12:42:56 2021 +0800 ASoC: mchp-i2s-mcc: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210611044256.3899583-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit a918e2917406e3cb946ac711e5ce77ae9798fa91 Merge: 03c0cbd946958 0454422288688 Author: Mark Brown Date: Mon Jun 14 14:58:52 2021 +0100 Merge series "ASoC: codecs: add wcd938x support" from Srinivas Kandagatla : This patchset adds support for Qualcomm WCD938X codec. Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs and MBHC. Eventhough this device has two SoundWire devices, only tx device has access to main codec Control/Status Registers! For codec driver to be functional it would need both tx and rx Soundwire devices to be up and this is taken care by using device component framework and device-links are used to ensure proper pm dependencies. Ex tx does not enter suspend before rx or codec is suspended. This patchset along with other SoundWire patches on the list have been tested on SM8250 MTP device. Thanks, srini Changes since v8: - moved Kconfig and Makefile changes to last patch as suggested by Mark - removed array of enums and used static entries instead. Suggested by Mark - return true if put succeeds, Suggested by Mark - removed some unneeded semi-colons in switch Srinivas Kandagatla (9): ASoC: dt-bindings: wcd938x: add bindings for wcd938x ASoC: codecs: wcd-clsh: add new version support ASoC: codecs: wcd938x: add basic driver ASoC: dt-bindings: wcd938x-sdw: add bindings for wcd938x-sdw ASoC: codecs: wcd938x-sdw: add SoundWire driver ASoC: codecs: wcd938x: add basic controls ASoC: codecs: wcd938x: add playback dapm widgets ASoC: codecs: wcd938x: add capture dapm widgets ASoC: codecs: wcd938x: add audio routing and Kconfig .../bindings/sound/qcom,wcd938x-sdw.yaml | 70 + .../bindings/sound/qcom,wcd938x.yaml | 146 + sound/soc/codecs/Kconfig | 14 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/wcd-clsh-v2.c | 348 +- sound/soc/codecs/wcd-clsh-v2.h | 16 + sound/soc/codecs/wcd938x-sdw.c | 315 ++ sound/soc/codecs/wcd938x.c | 3753 +++++++++++++++++ sound/soc/codecs/wcd938x.h | 720 ++++ 9 files changed, 5376 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml create mode 100644 sound/soc/codecs/wcd938x-sdw.c create mode 100644 sound/soc/codecs/wcd938x.c create mode 100644 sound/soc/codecs/wcd938x.h -- 2.21.0 commit aa59d6bb5ec88e30802174f9accc5d2dc50209ad Author: Even Xu Date: Thu Jun 10 14:21:54 2021 +0800 HID: intel-ish-hid: ipc: Specify that EHL no cache snooping Specify that EHL doesn't support DMA cache snooping. Acked-by: Pandruvada, Srinivas Signed-off-by: Even Xu Signed-off-by: Jiri Kosina commit 4aae88b9a9749f5b1c74f004ed8bd8efbaa96440 Author: Even Xu Date: Thu Jun 10 14:21:53 2021 +0800 HID: intel-ish-hid: ishtp: Add dma_no_cache_snooping() callback Different platforms have different DMA capability, on most of platforms, DMA support cache snooping. But few platforms, such as ElkhartLake (EHL), don't support cache snooping which requires cache flush from driver. So add a hardware level callback to let ishtp driver know if cache flush is needed. As most of platform support cache snooping, so driver will not do cache flush by default, until platform implements this callback and return true explicitly. Acked-by: Pandruvada, Srinivas Signed-off-by: Even Xu Signed-off-by: Jiri Kosina commit 65e4122d2ea758a1834a5ddf9c555a4d2c1dd66a Author: Even Xu Date: Thu Jun 10 14:21:52 2021 +0800 HID: intel-ish-hid: Set ISH driver depends on x86 During ISH DMA enabling, some platforms (such as EHL) don't support cache snooping, driver needs involve clflush_cache_range API which isn't supported by all archs (such as ARM). Considering ISH only exists on Intel platforms, add the dependence in Kconfig to avoid build warnings or errors on other archs. Acked-by: Pandruvada, Srinivas Signed-off-by: Even Xu Signed-off-by: Jiri Kosina commit 3f491a28b1f96f1bdc7e3808ef06da76de795707 Merge: f1ffa9d4cccc8 6381195ad7d06 Author: Rafael J. Wysocki Date: Mon Jun 14 15:37:49 2021 +0200 Merge back ACPI power management material for v5.14. commit b5539722eb832441f309642fe5102cc3536f92b8 Author: Zoltan Tamas Vajda Date: Thu Jun 3 20:58:14 2021 +0200 HID: hid-input: add Surface Go battery quirk The Elantech touchscreen/digitizer in the Surface Go mistakenly reports having a battery. This results in a low battery message every time you try to use the pen. This patch adds a quirk to ignore the non-existent battery and gets rid of the false low battery messages. Signed-off-by: Zoltan Tamas Vajda Signed-off-by: Jiri Kosina commit f8e5388a9da05708fb6d5a0137b287dbfd32d29c Author: Austin Kim Date: Thu May 27 08:16:37 2021 +0100 HID: intel-ish-hid: Fix minor typos in comments Change "poiner" to "pointer" in comments. Signed-off-by: Austin Kim Signed-off-by: Jiri Kosina commit d33b9035e14a35f6f2a5f067f0b156a93581811d Author: Peter Zijlstra Date: Fri Jun 11 08:33:36 2021 +0200 objtool: Improve reloc hash size guestimate Nathan reported that LLVM ThinLTO builds have a performance regression with commit 25cf0d8aa2a3 ("objtool: Rewrite hashtable sizing"). Sami was quick to note that this is due to their use of -ffunction-sections. As a result the .text section is small and basing the number of relocs off of that no longer works. Instead have read_sections() compute the sum of all SHF_EXECINSTR sections and use that. Fixes: 25cf0d8aa2a3 ("objtool: Rewrite hashtable sizing") Reported-by: Nathan Chancellor Debugged-by: Sami Tolvanen Signed-off-by: Peter Zijlstra (Intel) Tested-by: Nathan Chancellor Link: https://lkml.kernel.org/r/YMJpGLuGNsGtA5JJ@hirez.programming.kicks-ass.net commit d1c777ee5c5e0a08755ee39f6dc4d222bfd9c832 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jun 10 20:58:50 2021 +0800 mmc: JZ4740: Add support for JZ4775 Add support for the variant on the JZ4775 SoC from Ingenic. Let's also clarify that the drive clock selection and sample clock selection have been supported since JZ4775, not X1000. So, support for these two functions has been added for JZ4775 and JZ4780. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/1623329930-14387-3-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Ulf Hansson commit 3160e025361fad1085e527a898c5dcfedf7e796d Author: 周琰杰 (Zhou Yanjie) Date: Thu Jun 10 20:58:49 2021 +0800 dt-bindings: mmc: JZ4740: Add bindings for JZ4775 Add a compatible to the mmc DT bindings for the JZ4775 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/1623329930-14387-2-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Ulf Hansson commit f62f7bcc827fe7f0b02208d4811caec65aad1c8e Author: Haibo Chen Date: Thu Jun 10 20:01:26 2021 +0800 mmc: sdhci-esdhc-imx: Enable support for system wakeup for SDIO Enable support for system wakeup, by setting the wakeup capability for the slot corresponding to the SDIO card. Users need to enable the wakeup through the sysfs interface. Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/1623326486-25275-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit 21adc2e45f4ef32786807375107543797ff68615 Author: Wolfram Sang Date: Tue Jun 8 20:06:20 2021 +0200 mmc: Improve function name when aborting a tuning cmd 'mmc_abort_tuning()' made me think tuning gets completely aborted. However, it sends only a STOP cmd to cancel the current tuning cmd. Tuning process may still continue after that. So, rename the function to 'mmc_send_abort_tuning()' to better reflect all this. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210608180620.40059-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit a7ab186f60785850b5af1be183867000485ad491 Author: Andrew Jeffery Date: Mon Jun 7 11:00:20 2021 +0930 mmc: sdhci-of-aspeed: Turn down a phase correction warning The card timing and the bus frequency are not changed atomically with respect to calls to the set_clock() callback in the driver. The result is the driver sees a transient state where there's a mismatch between the two and thus the inputs to the phase correction calculation formula are garbage. Switch from dev_warn() to dev_dbg() to avoid noise in the normal case, though the change does make bad configurations less likely to be noticed. Reported-by: Joel Stanley Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210607013020.85885-1-andrew@aj.id.au Signed-off-by: Ulf Hansson commit 039259156b3bbe62bff3492f007f0dd247013fa6 Author: Wolfram Sang Date: Fri Jun 4 12:44:59 2021 +0200 mmc: debugfs: add description for module parameter Make it obvious what this is for. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210604104459.7574-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 45c8ddd06c4b729c56a6083ab311bfbd9643f4a6 Author: Zheyu Ma Date: Thu Jun 3 13:33:20 2021 +0000 mmc: via-sdmmc: add a check against NULL pointer dereference Before referencing 'host->data', the driver needs to check whether it is null pointer, otherwise it will cause a null pointer reference. This log reveals it: [ 29.355199] BUG: kernel NULL pointer dereference, address: 0000000000000014 [ 29.357323] #PF: supervisor write access in kernel mode [ 29.357706] #PF: error_code(0x0002) - not-present page [ 29.358088] PGD 0 P4D 0 [ 29.358280] Oops: 0002 [#1] PREEMPT SMP PTI [ 29.358595] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.12.4- g70e7f0549188-dirty #102 [ 29.359164] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 29.359978] RIP: 0010:via_sdc_isr+0x21f/0x410 [ 29.360314] Code: ff ff e8 84 aa d0 fd 66 45 89 7e 28 66 41 f7 c4 00 10 75 56 e8 72 aa d0 fd 66 41 f7 c4 00 c0 74 10 e8 65 aa d0 fd 48 8b 43 18 40 14 ac ff ff ff e8 55 aa d0 fd 48 89 df e8 ad fb ff ff e9 77 [ 29.361661] RSP: 0018:ffffc90000118e98 EFLAGS: 00010046 [ 29.362042] RAX: 0000000000000000 RBX: ffff888107d77880 RCX: 0000000000000000 [ 29.362564] RDX: 0000000000000000 RSI: ffffffff835d20bb RDI: 00000000ffffffff [ 29.363085] RBP: ffffc90000118ed8 R08: 0000000000000001 R09: 0000000000000001 [ 29.363604] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000008600 [ 29.364128] R13: ffff888107d779c8 R14: ffffc90009c00200 R15: 0000000000008000 [ 29.364651] FS: 0000000000000000(0000) GS:ffff88817bc80000(0000) knlGS:0000000000000000 [ 29.365235] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 29.365655] CR2: 0000000000000014 CR3: 0000000005a2e000 CR4: 00000000000006e0 [ 29.366170] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 29.366683] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 29.367197] Call Trace: [ 29.367381] [ 29.367537] __handle_irq_event_percpu+0x53/0x3e0 [ 29.367916] handle_irq_event_percpu+0x35/0x90 [ 29.368247] handle_irq_event+0x39/0x60 [ 29.368632] handle_fasteoi_irq+0xc2/0x1d0 [ 29.368950] __common_interrupt+0x7f/0x150 [ 29.369254] common_interrupt+0xb4/0xd0 [ 29.369547] [ 29.369708] asm_common_interrupt+0x1e/0x40 [ 29.370016] RIP: 0010:native_safe_halt+0x17/0x20 [ 29.370360] Code: 07 0f 00 2d db 80 43 00 f4 5d c3 0f 1f 84 00 00 00 00 00 8b 05 c2 37 e5 01 55 48 89 e5 85 c0 7e 07 0f 00 2d bb 80 43 00 fb f4 <5d> c3 cc cc cc cc cc cc cc 55 48 89 e5 e8 67 53 ff ff 8b 0d f9 91 [ 29.371696] RSP: 0018:ffffc9000008fe90 EFLAGS: 00000246 [ 29.372079] RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 [ 29.372595] RDX: 0000000000000000 RSI: ffffffff854f67a4 RDI: ffffffff85403406 [ 29.373122] RBP: ffffc9000008fe90 R08: 0000000000000001 R09: 0000000000000001 [ 29.373646] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff86009188 [ 29.374160] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888100258000 [ 29.374690] default_idle+0x9/0x10 [ 29.374944] arch_cpu_idle+0xa/0x10 [ 29.375198] default_idle_call+0x6e/0x250 [ 29.375491] do_idle+0x1f0/0x2d0 [ 29.375740] cpu_startup_entry+0x18/0x20 [ 29.376034] start_secondary+0x11f/0x160 [ 29.376328] secondary_startup_64_no_verify+0xb0/0xbb [ 29.376705] Modules linked in: [ 29.376939] Dumping ftrace buffer: [ 29.377187] (ftrace buffer empty) [ 29.377460] CR2: 0000000000000014 [ 29.377712] ---[ end trace 51a473dffb618c47 ]--- [ 29.378056] RIP: 0010:via_sdc_isr+0x21f/0x410 [ 29.378380] Code: ff ff e8 84 aa d0 fd 66 45 89 7e 28 66 41 f7 c4 00 10 75 56 e8 72 aa d0 fd 66 41 f7 c4 00 c0 74 10 e8 65 aa d0 fd 48 8b 43 18 40 14 ac ff ff ff e8 55 aa d0 fd 48 89 df e8 ad fb ff ff e9 77 [ 29.379714] RSP: 0018:ffffc90000118e98 EFLAGS: 00010046 [ 29.380098] RAX: 0000000000000000 RBX: ffff888107d77880 RCX: 0000000000000000 [ 29.380614] RDX: 0000000000000000 RSI: ffffffff835d20bb RDI: 00000000ffffffff [ 29.381134] RBP: ffffc90000118ed8 R08: 0000000000000001 R09: 0000000000000001 [ 29.381653] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000008600 [ 29.382176] R13: ffff888107d779c8 R14: ffffc90009c00200 R15: 0000000000008000 [ 29.382697] FS: 0000000000000000(0000) GS:ffff88817bc80000(0000) knlGS:0000000000000000 [ 29.383277] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 29.383697] CR2: 0000000000000014 CR3: 0000000005a2e000 CR4: 00000000000006e0 [ 29.384223] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 29.384736] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 29.385260] Kernel panic - not syncing: Fatal exception in interrupt [ 29.385882] Dumping ftrace buffer: [ 29.386135] (ftrace buffer empty) [ 29.386401] Kernel Offset: disabled [ 29.386656] Rebooting in 1 seconds.. Signed-off-by: Zheyu Ma Link: https://lore.kernel.org/r/1622727200-15808-1-git-send-email-zheyuma97@gmail.com Signed-off-by: Ulf Hansson commit 961470820021e6f9d74db4837bd6831a1a30341b Author: Krzysztof Kozlowski Date: Tue Jun 1 11:54:03 2021 +0200 mmc: sdhci-sprd: use sdhci_sprd_writew The sdhci_sprd_writew() was defined by never used in sdhci_ops: drivers/mmc/host/sdhci-sprd.c:134:20: warning: unused function 'sdhci_sprd_writew' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210601095403.236007-2-krzysztof.kozlowski@canonical.com Signed-off-by: Ulf Hansson commit 15dd8dc9ffcca7f4f77bffef44dca26678489459 Author: Krzysztof Kozlowski Date: Tue Jun 1 11:54:02 2021 +0200 mmc: sdhci-esdhc-imx: remove unused is_imx6q_usdhc The is_imx6q_usdhc() function is unused: drivers/mmc/host/sdhci-esdhc-imx.c:343:19: warning: unused function 'is_imx6q_usdhc' Reported-by: kernel test robot Fixes: f47c4bbfa283 ("mmc: sdhci-esdhc-imx: create struct esdhc_soc_data") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20210601095403.236007-1-krzysztof.kozlowski@canonical.com Signed-off-by: Ulf Hansson commit 09247e110b2efce3a104e57e887c373e0a57a412 Author: Christian Löhle Date: Wed May 12 16:03:24 2021 +0000 mmc: core: Allow UHS-I voltage switch for SDSC cards if supported While initializing an UHS-I SD card, the mmc core first tries to switch to 1.8V I/O voltage, before it continues to change the settings for the bus speed mode. However, the current behaviour in the mmc core is inconsistent and doesn't conform to the SD spec. More precisely, an SD card that supports UHS-I must set both the SD_OCR_CCS bit and the SD_OCR_S18R bit in the OCR register response. When switching to 1.8V I/O the mmc core correctly checks both of the bits, but only the SD_OCR_S18R bit when changing the settings for bus speed mode. Rather than actually fixing the code to confirm to the SD spec, let's deliberately deviate from it by requiring only the SD_OCR_S18R bit for both parts. This enables us to support UHS-I for SDSC cards (outside spec), which is actually being supported by some existing SDSC cards. Moreover, this fixes the inconsistent behaviour. Signed-off-by: Christian Loehle Link: https://lore.kernel.org/r/CWXP265MB26803AE79E0AD5ED083BF2A6C4529@CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM Cc: stable@vger.kernel.org [Ulf: Rewrote commit message and comments to clarify the changes] Signed-off-by: Ulf Hansson commit 706998e70104d93d7e137b92ff0c216aee66c0dd Author: Andy Shevchenko Date: Fri May 28 14:21:27 2021 +0300 mmc: mmc_spi: Imply container_of() to be no-op Since we don't use structure field layout randomization the manual shuffling can affect some macros, in particular container_of() against struct of_mmc_spi, which becomes a no-op when pdata member is the first one in the structure. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210528112127.71738-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 91445d5eed6b19d6d31506fb7c3f65e9acc175c5 Author: Andy Shevchenko Date: Fri May 28 14:21:26 2021 +0300 mmc: mmc_spi: Drop duplicate 'mmc_spi' in the debug messages dev_dbg() in any case prints the device and driver name, no need to repeat this in (some) messages. Drop duplicates for good. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210528112127.71738-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit de905475bd4bd0805a33ba64b614d837e4bd292a Author: Geert Uytterhoeven Date: Thu May 27 21:42:26 2021 +0200 mmc: dw_mmc-pltfm: Remove unused As of commit 4cdc2ec1da322776 ("mmc: dw_mmc: move rockchip related code to a separate file"), dw_mmc-pltfm.c no longer uses the clock API. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jaehoon Chung Link: https://lore.kernel.org/r/20210527194226.1705607-1-geert@linux-m68k.org Signed-off-by: Ulf Hansson commit dd646d982cf9b3b0c04c6f418bb91c275ce86336 Author: Steven Lee Date: Mon May 24 15:32:56 2021 +0800 mmc: sdhci-of-aspeed: Configure the SDHCIs as specified by the devicetree. The hardware provides capability configuration registers for each SDHCI in the global configuration space for the SD controller. Writes to the global capability registers are mirrored to the capability registers in the associated SDHCI. Configuration of the capabilities must be written through the mirror registers prior to initialisation of the SDHCI. Signed-off-by: Steven Lee Reviewed-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210524073308.9328-5-steven_lee@aspeedtech.com Signed-off-by: Ulf Hansson commit 7c45b2268e515b83772ff9c5d3db5f16ae3ca3bf Author: Aviral Gupta Date: Sun May 23 21:29:15 2021 +0530 mmc: core: Add a missing SPDX license header Add the missing license header to drivers/mmc/core/block.c Signed-off-by: Aviral Gupta Link: https://lore.kernel.org/r/20210523155914.5200-1-shiv14112001@gmail.com Signed-off-by: Ulf Hansson commit 3c0bb3107703d2c58f7a0a7a2060bb57bc120326 Author: Johan Hovold Date: Fri May 21 15:30:26 2021 +0200 mmc: vub3000: fix control-request direction The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the SET_ROM_WAIT_STATES request which erroneously used usb_rcvctrlpipe(). Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Cc: stable@vger.kernel.org # 3.0 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210521133026.17296-1-johan@kernel.org Signed-off-by: Ulf Hansson commit 809ae4e1ca0a719db29ed747fc2febf099a77b9f Author: Tian Tao Date: Fri May 21 09:02:45 2021 +0800 mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding 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. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1621558965-34077-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 07e70346e21eb8f018c8478cc4881ad9026bb12e Author: Tian Tao Date: Fri May 21 08:59:35 2021 +0800 mmc: sdhci_am654: Use pm_runtime_resume_and_get() to replace open coding 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. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1621558775-31185-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 05335af1e82a3ce2a7d410c7b1695a3c4ec37ea9 Author: Tian Tao Date: Thu May 20 20:21:44 2021 +0800 mmc: core: Use pm_runtime_resume_and_get() to replace open coding 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 Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1621513304-27824-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 83c49302566ea7328e6962fb81ceada2c93486b9 Author: Yue Hu Date: Fri May 21 11:44:32 2021 +0800 mmc: cqhci: introduce get_trans_desc_offset() The same calculation to get transfer descriptor offset is already used at 3 different locations. Let's create a new helper to simplify code. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20210521034432.2321-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 47d23c95fe0518b6e4cf7d7f6829987f377bd0d3 Author: Yue Hu Date: Thu May 20 18:13:30 2021 +0800 mmc: cqhci: fix typo 'descritors' -> 'descriptors' Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20210520101330.2255-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 1e9daaf616a2f053eb80e20a84b47ebf2d5e20d3 Author: Rob Herring Date: Wed May 19 10:37:12 2021 -0500 dt-bindings: mmc: Clean-up examples to match documented bindings The "sdhci" compatible is not documented though used as a fallback in a few cases. It is also not supported by a Linux driver. Just remove the example as part of ridding examples of undocumented bindings. The "brcm,bcm43xx-fmac" compatible is also not documented. Update the example to use one of the correct ones, "brcm,bcm4329-fmac", instead and use a device class based nodename. Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210519153712.3146025-1-robh@kernel.org Signed-off-by: Ulf Hansson commit f0ed43edb4cb793f4d9909feef32510ed77ed35a Author: Yue Hu Date: Mon May 17 18:54:32 2021 +0800 mmc: mediatek: remove useless data parameter from msdc_data_xfer_next() We do not use the 'data' in msdc_data_xfer_next(). Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20210517105432.1682-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 151071351bb6f3d1861e99a22c4cebadf81911a0 Author: Yue Hu Date: Mon May 17 18:09:00 2021 +0800 mmc: mediatek: use data instead of mrq parameter from msdc_{un}prepare_data() We already have 'mrq->data' before calling these two functions, no need to find it again via 'mrq->data' internally. Also remove local data variable accordingly. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20210517100900.1620-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 8931acce6b771dfe01d23e6d36e0b09f717c90c2 Author: Andreas Färber Date: Mon May 17 01:05:48 2021 +0200 dt-bindings: mmc: rockchip-dw-mshc: Add Rockchip RK1808 Add a compatible string for Rockchip RK1808 SoC. Signed-off-by: Andreas Färber Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210516230551.12469-7-afaerber@suse.de Signed-off-by: Ulf Hansson commit 42933c8aa14be1caa9eda41f65cde8a3a95d3e39 Author: Tong Zhang Date: Tue May 11 12:39:45 2021 -0400 memstick: rtsx_usb_ms: fix UAF This patch fixes the following issues: 1. memstick_free_host() will free the host, so the use of ms_dev(host) after it will be a problem. To fix this, move memstick_free_host() after when we are done with ms_dev(host). 2. In rtsx_usb_ms_drv_remove(), pm need to be disabled before we remove and free host otherwise memstick_check will be called and UAF will happen. [ 11.351173] BUG: KASAN: use-after-free in rtsx_usb_ms_drv_remove+0x94/0x140 [rtsx_usb_ms] [ 11.357077] rtsx_usb_ms_drv_remove+0x94/0x140 [rtsx_usb_ms] [ 11.357376] platform_remove+0x2a/0x50 [ 11.367531] Freed by task 298: [ 11.368537] kfree+0xa4/0x2a0 [ 11.368711] device_release+0x51/0xe0 [ 11.368905] kobject_put+0xa2/0x120 [ 11.369090] rtsx_usb_ms_drv_remove+0x8c/0x140 [rtsx_usb_ms] [ 11.369386] platform_remove+0x2a/0x50 [ 12.038408] BUG: KASAN: use-after-free in __mutex_lock.isra.0+0x3ec/0x7c0 [ 12.045432] mutex_lock+0xc9/0xd0 [ 12.046080] memstick_check+0x6a/0x578 [memstick] [ 12.046509] process_one_work+0x46d/0x750 [ 12.052107] Freed by task 297: [ 12.053115] kfree+0xa4/0x2a0 [ 12.053272] device_release+0x51/0xe0 [ 12.053463] kobject_put+0xa2/0x120 [ 12.053647] rtsx_usb_ms_drv_remove+0xc4/0x140 [rtsx_usb_ms] [ 12.053939] platform_remove+0x2a/0x50 Signed-off-by: Tong Zhang Co-developed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210511163944.1233295-1-ztong0001@gmail.com Signed-off-by: Ulf Hansson commit f722e650d965307f8c4c24cf4edc166b6abe9dc6 Author: Lucas Stach Date: Mon May 10 21:04:00 2021 +0200 mmc: core: add support for disabling HS400 mode via DT On some boards the data strobe line isn't wired up, rendering HS400 support broken, even if both the controller and the eMMC claim to support it. Allow to disable HS400 mode via DT. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210510190400.105162-3-l.stach@pengutronix.de Signed-off-by: Ulf Hansson commit 2991ad76d2537a4ebe7132d087cdbc76377da302 Author: Lucas Stach Date: Mon May 10 21:03:59 2021 +0200 mmc: sdhci-esdhc-imx: advertise HS400 mode through MMC caps Instead of having an indirection through the SDHCI layer and emulating a capability bit, that isn't there in hardware, do the same same thing as with HS400_ES and advertise the support for HS400 directly through the MMC caps. Signed-off-by: Lucas Stach Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20210510190400.105162-2-l.stach@pengutronix.de Signed-off-by: Ulf Hansson commit 4d895de3505f7eb9734f679a340c976f8949ab43 Author: Lucas Stach Date: Mon May 10 21:03:58 2021 +0200 dt-bindings: mmc: add no-mmc-hs400 flag HS400 requires a data strobe line in addition to the usual MMC signal lines. If a board design neglects to wire up this signal, HS400 mode is not available, even if both the controller and the eMMC are claiming to support this mode. Add a DT flag to allow boards to disable the HS400 support in this case. Signed-off-by: Lucas Stach Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210510190400.105162-1-l.stach@pengutronix.de Signed-off-by: Ulf Hansson commit 130206a615a9831a65e186484a5a332f9f6d29c8 Author: Ulf Hansson Date: Tue May 11 12:13:59 2021 +0200 mmc: core: Add support for cache ctrl for SD cards In SD spec v6.x the SD function extension registers for performance enhancements were introduced. As a part of this an optional internal cache on the SD card, can be used to improve performance. The let the SD card use the cache, the host needs to enable it and manage flushing of the cache, so let's add support for this. Note that for an SD card supporting the cache it's mandatory for it, to also support the poweroff notification feature. According to the SD spec, if the cache has been enabled and a poweroff notification is sent to the card, that implicitly also means that the card should flush its internal cache. Therefore, dealing with cache flushing for REQ_OP_FLUSH block requests is sufficient. Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson Reviewed-by: Avri Altman Link: https://lore.kernel.org/r/20210511101359.83521-1-ulf.hansson@linaro.org commit 34dd3ccccab0b93ebdf7ecde138814d121f72e98 Author: Ben Chuang Date: Tue May 11 14:18:35 2021 +0800 mmc: sdhci-pci-gli: Fine tune GL9763E L1 entry delay Fine tune the value to 21us in order to improve read/write performance. Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20210511061835.5559-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit 110a8688c6cd11e81a1805d5dc24a7a6b5d86a18 Author: Geert Uytterhoeven Date: Mon May 10 14:13:21 2021 +0200 dt-bindings: mmc: renesas,mmcif: Convert to json-schema Convert the Renesas Multi Media Card Interface (MMCIF) Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/04b97315fed0f4f512356b68f9f5bb6ed7adc41f.1620648698.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit d03be8c1c7de2ae9ebdcc34b11f9089e2349709d Author: Zhen Lei Date: Tue May 11 17:33:29 2021 +0800 mmc: jz4740: Remove redundant error printing in jz4740_mmc_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210511093329.4670-1-thunder.leizhen@huawei.com Signed-off-by: Ulf Hansson commit 2f9ae69e5267f53e89e296fccee291975a85f0eb Author: Zhen Lei Date: Sat May 8 10:03:21 2021 +0800 mmc: usdhi6rol0: fix error return code in usdhi6_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 75fa9ea6e3c0 ("mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210508020321.1677-1-thunder.leizhen@huawei.com Signed-off-by: Ulf Hansson commit 3ae613765851cc2a651a42ce9d586078a899d8c8 Author: Shubhankar Kuranagatti Date: Fri May 7 12:05:28 2021 +0530 drivers: memstick: core:ms_block.c: Fix alignment of block comment A * has been added to subsequent lines of block comment The closing */ has been shifted to a new line A new line has been give after declaration This is done to maintain code uniformity. Signed-off-by: Shubhankar Kuranagatti Link: https://lore.kernel.org/r/20210507063528.tvlbu2cwnlczgbga@kewl-virtual-machine Signed-off-by: Ulf Hansson commit 8ae11edeb95682f6ab1983986c1daff3a00e01fc Author: Ulf Hansson Date: Thu May 6 16:58:28 2021 +0200 mmc: core: Move eMMC cache flushing to a new bus_ops callback To prepare to add internal cache management for SD cards, let's start by moving the eMMC specific code into a new ->flush_cache() bus_ops callback. In this way, it becomes straight forward to add the SD specific parts, as subsequent changes are about to show. Signed-off-by: Ulf Hansson Reviewed-by: Avri Altman Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210506145829.198823-2-ulf.hansson@linaro.org commit 70b52f09080565030a530a784f1c9948a7f48ca3 Author: Bean Huo Date: Tue May 4 22:32:09 2021 +0200 mmc: block: Disable CMDQ on the ioctl path According to the eMMC Spec: "When command queuing is enabled (CMDQ Mode En bit in CMDQ_MODE_EN field is set to ‘1’) class 11 commands are the only method through which data transfer tasks can be issued. Existing data transfer commands, namely CMD18/CMD17 and CMD25/CMD24, are not supported when command queuing is enabled." which means if CMDQ is enabled, the FFU commands will not be supported. To fix this issue, just simply disable CMDQ on the ioctl path, and re-enable CMDQ once ioctl request is completed. Tested-by: Michael Brunner Signed-off-by: Bean Huo Acked-by: Adrian Hunter Fixes: 1e8e55b67030 (mmc: block: Add CQE support) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210504203209.361597-1-huobean@gmail.com Signed-off-by: Ulf Hansson commit 2c5d42769038045b92160a849aad43c4b3170e2a Author: Ulf Hansson Date: Tue May 4 18:12:22 2021 +0200 mmc: core: Add support for Power Off Notification for SD cards Rather than only deselecting the SD card via a CMD7, before we cut power to it at system suspend, at runtime suspend or at shutdown, let's add support for a graceful power off sequence via enabling the SD Power Off Notification feature. Note that, the Power Off Notification feature was added in the SD spec v4.x, which is several years ago. However, it's still a bit unclear how often the SD card vendors decides to implement support for it. To validate these changes a Sandisk Extreme PRO A2 64GB has been used, which seems to work nicely. Signed-off-by: Ulf Hansson Acked-by: Avri Altman Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Link: https://lore.kernel.org/r/20210504161222.101536-12-ulf.hansson@linaro.org commit 4e6306e0b83c6251699c2202e859b55ddf7b8c5f Author: Ulf Hansson Date: Tue May 4 18:12:21 2021 +0200 mmc: core: Read performance enhancements registers for SD cards In SD spec v6.x the SD function extension registers for performance enhancements were introduced. These registers let the SD card announce supports for various performance related features, like "self-maintenance", "cache" and "command queuing". Let's extend the parsing of SD function extension registers and store the information in the struct mmc_card. This prepares for subsequent changes to implement the complete support for new the performance enhancement features. Signed-off-by: Ulf Hansson Acked-by: Avri Altman Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Link: https://lore.kernel.org/r/20210504161222.101536-11-ulf.hansson@linaro.org commit c784f92769ae8eafb2eb489408757528ff7525df Author: Ulf Hansson Date: Tue May 4 18:12:20 2021 +0200 mmc: core: Read the SD function extension registers for power management In the SD spec v4.0 the CMD48/49 and CMD58/59 were introduced as optional commands. In the SD spec v4.1 the SD function extension registers were introduced, which requires support for CMD48/49/58/59 to be read/written from/to. Moreover, a specific function extension register were added to let the card announce support for optional features in regards to power management. The features that were added are "Power Off Notification", "Power Down Mode" and "Power Sustenance". As a first step to support this, let's read and parse the register for power management during the SD card initialization and store the information about the supported features in the struct mmc_card. In this way, we prepare for subsequent changes to implement the complete support for the new features. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-10-ulf.hansson@linaro.org commit dbea8ae9febdea11cb74d094e6b730987079679e Author: Ulf Hansson Date: Tue May 4 18:12:19 2021 +0200 mmc: core: Parse the SD SCR register for support of CMD48/49 and CMD58/59 In SD spec v4.x the support for CMD48/49 and CMD58/59 were introduced as optional features. To let the card announce whether it supports the commands, the SCR register has been extended with corresponding support bits. Let's parse and store this information for later use. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-9-ulf.hansson@linaro.org commit 41e84fe1647e0d6ec309882bc247667e304c351f Author: Ulf Hansson Date: Tue May 4 18:12:18 2021 +0200 mmc: core: Drop open coding in mmc_sd_switch() The SD_SWITCH (CMD6) is an ADTC type of command with an R1 response, which can be sent by using the mmc_send_adtc_data(). Let's do that and drop the open coding in mmc_sd_switch(). Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-8-ulf.hansson@linaro.org commit cec18ad93e35a219d2277dbbdbfedb4f83a7a220 Author: Ulf Hansson Date: Tue May 4 18:12:17 2021 +0200 mmc: core: Prepare mmc_send_cxd_data() to be re-used for additional cmds The function mmc_send_cxd_data() sends a data read command of ADTC type and prepares to receive an R1 response. To make it even more re-usable, let's extend it with another in-parameter for the command argument. While at it, let's also rename the function to mmc_send_adtc_data() as it better describes its purpose. Note that, this change doesn't add any new users of the function. Instead that is done from subsequent changes. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-7-ulf.hansson@linaro.org commit 6fa79651cc808f68db6f6f297be5a950ccd5dffb Author: Ulf Hansson Date: Tue May 4 18:12:16 2021 +0200 mmc: core: Enable eMMC sleep commands to use HW busy polling After the eMMC sleep command (CMD5) has been sent, the card start signals busy on the DAT0 line, which can be monitored to understand when it's allowed to proceed to power off the VCC regulator. When MMC_CAP_WAIT_WHILE_BUSY isn't supported by the host the DAT0 line isn't being monitored for busy completion, but instead we are waiting a fixed period of time. The time corresponds to the sleep timeout that is specified in the EXT_CSD register of the eMMC card. This is many cases suboptimal, as the timeout corresponds to the worst case scenario. To improve the situation add support for HW busy polling through the ->card_busy() host ops, when the host supports this. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-6-ulf.hansson@linaro.org commit 04f967ad28c836815f6894b618643dd23670c6e5 Author: Ulf Hansson Date: Tue May 4 18:12:15 2021 +0200 mmc: core: Extend re-use of __mmc_poll_for_busy() Via __mmc_poll_for_busy() we end up polling with the ->card_busy() host ops or by sending the CMD13. To allow polling of different types, which is needed to support a few new SD card features, let's rework the code around __mmc_poll_for_busy() to make it more generic. More precisely, let __mmc_poll_for_busy() take a pointer to a callback function as in-parameter, which it calls to poll for busy state completion. Additionally, let's share __mmc_poll_for_busy() to allow it to be re-used outside of mmc_ops.c. Subsequent changes will make use of it. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-5-ulf.hansson@linaro.org commit 1e0b069bdc583925d6207e091e55ad4d0f30eb4c Author: Ulf Hansson Date: Tue May 4 18:12:14 2021 +0200 mmc: core: Re-structure some code in __mmc_poll_for_busy() To make the code a bit more understandable, let's move the check about whether polling is allowed or not, out to the caller instead. In this way, we can also drop the send_status in-parameter, so let's do that. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-4-ulf.hansson@linaro.org commit c7bedef053cf7fd26efca90551a95c1776dd9e2f Author: Ulf Hansson Date: Tue May 4 18:12:13 2021 +0200 mmc: core: Take into account MMC_CAP_NEED_RSP_BUSY for eMMC HPI commands In mmc_send_hpi_cmd() the host->max_busy_timeout is being validated towards the timeout for the eMMC HPI command, as to decide whether an R1 or R1B response should be used. Although, it has turned out the some host can't cope with that conversion, but needs R1B, which means MMC_CAP_NEED_RSP_BUSY is set for them. Let's take this into account, via using the common mmc_prepare_busy_cmd() when doing the validation, which also avoids some open coding. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-3-ulf.hansson@linaro.org commit e62f1e0b2384e25fe61042da3ecf08b7d8262f8d Author: Ulf Hansson Date: Tue May 4 18:12:12 2021 +0200 mmc: core: Drop open coding when preparing commands with busy signaling Similar code for validating the host->max_busy_timeout towards the current command's busy timeout, exists in mmc_do_erase(), mmc_sleep() and __mmc_switch(). Let's move the common code into a helper function. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Reviewed-by: Shawn Lin Acked-by: Avri Altman Link: https://lore.kernel.org/r/20210504161222.101536-2-ulf.hansson@linaro.org commit 94ee6782e045645abd9180ab9369b01293d862bd Author: Hans de Goede Date: Mon May 3 11:21:57 2021 +0200 mmc: sdhci-acpi: Disable write protect detection on Toshiba Encore 2 WT8-B On the Toshiba Encore 2 WT8-B the microSD slot always reports the card being write-protected even though microSD cards do not have a write-protect switch at all. Add a new DMI_QUIRK_SD_NO_WRITE_PROTECT quirk entry to sdhci-acpi.c's DMI quirk table for this. Signed-off-by: Hans de Goede Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20210503092157.5689-1-hdegoede@redhat.com Signed-off-by: Ulf Hansson Cc: stable@vger.kernel.org commit 873e90883069a4e32bc6ecd150b0107f9aa542b8 Author: Liang Chen Date: Thu Apr 29 16:11:44 2021 +0800 dt-bindings: mmc: rockchip-dw-mshc: add description for rk3568 Add "rockchip,rk3568-dw-mshc", "rockchip,rk3288-dw-mshc" compatibles for mmc nodes on a rk3568 platform to rockchip-dw-mshc.yaml. Let's also take to opportunity to clean up some old redundant comments around previous compatibles. Signed-off-by: Liang Chen Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210429081151.17558-4-cl@rock-chips.com Signed-off-by: Ulf Hansson commit 6a45d70cda6a6e3fa3cffe37d47495fb3c4a4bfa Author: Suman Anna Date: Wed Apr 28 18:05:00 2021 -0500 dt-bindings: mmc: sdhci-am654: Remove duplicate ti,j721e-sdhci-4bit The commit 7c7905df68c5 ("dt-bindings: mmc: sdhci-am654: fix compatible for j7200") switched the compatible property from a regular enum to an more appropriate combinatorial oneOf convention, and in the process has introduced a duplicate ti,j721e-sdhci-4bit. This generated the following warning on J721E boards that use the ti,j721e-sdhci-4bit for two nodes: "mmc@4fb0000: compatible: More than one condition true in oneOf schema" "mmc@4f98000: compatible: More than one condition true in oneOf schema" Remove the duplicate to fix this. Fixes: 7c7905df68c5 ("dt-bindings: mmc: sdhci-am654: fix compatible for j7200") Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210428230500.19214-1-s-anna@ti.com Signed-off-by: Ulf Hansson commit da3b1486d7e398617d09c022c71593462b98d67f Author: Tian Tao Date: Wed Apr 7 11:15:39 2021 +0800 mmc: s3cmci: move to use request_irq by IRQF_NO_AUTOEN flag disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1617765339-28946-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit b113ec2d8562f5f3e0359c547cba53686ee805e9 Author: Axel Lin Date: Thu Jun 3 17:38:09 2021 +0800 regulator: rt6160: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210603093809.1108629-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit dce793c0ab00c35039028fdcd5ce123805a01361 Author: Jonathan Cameron Date: Sun Jun 13 16:22:59 2021 +0100 iio: light: vcnl4000: Fix buffer alignment in iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here an explicit structure is not used, because the holes would necessitate the addition of an explict memset(), to avoid a kernel data leak, making for a less minimal fix. Found during an audit of all callers of iio_push_to_buffers_with_timestamp() Fixes: 8fe78d5261e7 ("iio: vcnl4000: Add buffer support for VCNL4010/20.") Signed-off-by: Jonathan Cameron Cc: Mathieu Othacehe Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-7-jic23@kernel.org commit b8f939fd20690623cb24845a563e7bc1e4a21482 Author: Jonathan Cameron Date: Sun Jun 13 16:22:58 2021 +0100 iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here an explicit structure is not used, because this buffer is used in a non-trivial way for data repacking. Fixes: 121354b2eceb ("iio: magnetometer: Add driver support for PNI RM3100") Signed-off-by: Jonathan Cameron Cc: Song Qiang Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-6-jic23@kernel.org commit 61fa5dfa5f52806f5ce37a0ba5712c271eb22f98 Author: Jonathan Cameron Date: Sun Jun 13 16:22:57 2021 +0100 iio: adc: ti-ads8688: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Fixes: f214ff521fb1 ("iio: ti-ads8688: Update buffer allocation for timestamps") Signed-off-by: Jonathan Cameron Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-5-jic23@kernel.org commit 6a6be221b8bd561b053f0701ec752a5ed9007f69 Author: Jonathan Cameron Date: Sun Jun 13 16:22:56 2021 +0100 iio: adc: mxs-lradc: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Add a comment on why the buffer is the size it is as not immediately obvious. Found during an audit of all calls of this function. Fixes: 6dd112b9f85e ("iio: adc: mxs-lradc: Add support for ADC driver") Signed-off-by: Jonathan Cameron Cc: Andreas Klinger Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-4-jic23@kernel.org commit afe2a789fbf7acd1a05407fc7839cc08d23825e3 Author: Jonathan Cameron Date: Sun Jun 13 16:22:55 2021 +0100 iio: adc: hx711: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: d3bf60450d47 ("iio: hx711: add triggered buffer support") Signed-off-by: Jonathan Cameron Cc: Andreas Klinger Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-3-jic23@kernel.org commit 8f884758966259fa8c50c137ac6d4ce9bb7859db Author: Jonathan Cameron Date: Sun Jun 13 16:22:54 2021 +0100 iio: adc: at91-sama5d2: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: 5e1a1da0f8c9 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Signed-off-by: Jonathan Cameron Cc: Eugen Hristev Reviewed-by: Nuno Sá Link: https://lore.kernel.org/r/20210613152301.571002-2-jic23@kernel.org commit ab372c2293f5d0b279f31c8d768566ea37602dc9 Author: Dongliang Mu Date: Fri Jun 11 09:58:12 2021 +0800 ieee802154: hwsim: Fix possible memory leak in hwsim_subscribe_all_others In hwsim_subscribe_all_others, the error handling code performs incorrectly if the second hwsim_alloc_edge fails. When this issue occurs, it goes to sub_fail, without cleaning the edges allocated before. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Dongliang Mu Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210611015812.1626999-1-mudongliangabcd@gmail.com Signed-off-by: Stefan Schmidt commit 2bce8174f79e5972d880480b83ea19bee9acc5f6 Merge: 2e11737a772b9 380d2b2d5a049 Author: Mark Brown Date: Mon Jun 14 11:40:41 2021 +0100 Merge tag 'for-5.14-regulator' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into regulator-5.14 regulator: Changes for v5.14-rc1 This adds regulator_sync_voltage_rdev(), which is used as a dependency for new Tegra power domain code. commit 04544222886881cb0865040dcdf747fe7e025947 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:43 2021 +0100 ASoC: codecs: wcd938x: add audio routing and Kconfig This patch adds audio routing for both playback and capture and Makefile and Kconfigs changes for wcd938x Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit d5add08fcbce35faeeffa62d7e8f21fd979d8420 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:42 2021 +0100 ASoC: codecs: wcd938x: add capture dapm widgets This patch adds required dapm widgets for capture path. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 8da9db0cd6694c98f64b6ec413337ac834e05bb0 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:41 2021 +0100 ASoC: codecs: wcd938x: add playback dapm widgets This patch adds required dapm widgets for playback. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit e8ba1e05bdc016700c85fad559a812c2e795442f Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:40 2021 +0100 ASoC: codecs: wcd938x: add basic controls This patch adds basic controls found in wcd938x codec. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 16572522aece6a142d303a25f32544643f52c383 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:39 2021 +0100 ASoC: codecs: wcd938x-sdw: add SoundWire driver This patch adds support to SoundWire devices on WCD9380/WCD9385 Codec Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit e02c65f3a7ce11ce522e805c78ed2f1da5d96975 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:38 2021 +0100 ASoC: dt-bindings: wcd938x-sdw: add bindings for wcd938x-sdw Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices RX and TX respectively. This bindings is for those slave devices on WCD9380/WCD9385. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210609090943.7896-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 8d78602aa87a3805902bed83157526fdc5b837d4 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:37 2021 +0100 ASoC: codecs: wcd938x: add basic driver This patch adds basic SoundWire codec driver to support for WCD938X TX and RX devices. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 19c5d1f6a0c39cf910c8d211ea40ff758bcb3f49 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:36 2021 +0100 ASoC: codecs: wcd-clsh: add new version support From WCD937X Class H controller has changed significantly, so add support to this new version for WCD937X and WCD938X Codecs. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609090943.7896-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 10ee3e07d32bede6cd007fb76150a1ccd0628852 Author: Srinivas Kandagatla Date: Wed Jun 9 10:09:35 2021 +0100 ASoC: dt-bindings: wcd938x: add bindings for wcd938x Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire device RX and TX respectively, supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs, MBHC. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210609090943.7896-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 03c0cbd946958af9cc10e55bdb047fd37d30735e Author: Yang Li Date: Wed Jun 9 14:46:11 2021 +0800 ASoC: codecs: wcd: Remove unneeded semicolon Eliminate the following coccicheck warning: ./sound/soc/codecs/wcd-mbhc-v2.c:990:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1623221171-105359-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit da0363f7bfd3c32f8d5918e40bfddb9905c86ee1 Author: Srinivasa Rao Mandadapu Date: Wed Jun 9 12:53:10 2021 +0530 ASoC: qcom: Fix for DMA interrupt clear reg overwriting The DMA interrupt clear register overwritten during simultaneous playback and capture in lpass platform interrupt handler. It's causing playback or capture stuck in similtaneous plaback on speaker and capture on dmic test. Update appropriate reg fields of corresponding channel instead of entire register write. Fixes: commit c5c8635a04711 ("ASoC: qcom: Add LPASS platform driver") Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210609072310.26099-1-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 116b1e12b72f308b28af5b17081fdb9e1942a8ea Merge: 3ea8a7459861d 2fef64eec23a0 Author: Mark Brown Date: Mon Jun 14 11:13:53 2021 +0100 Merge tag 'asoc-hdmi-codec-improvements-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into asoc-5.14 Improvements to the hdmi-codec driver and ALSA infrastructure around it to support the HDMI Channel Mapping and IEC958 controls commit 6fd06963fa74197103cdbb4b494763127b3f2f34 Author: Steffen Klassert Date: Mon Jun 7 15:21:49 2021 +0200 xfrm: Fix error reporting in xfrm_state_construct. When memory allocation for XFRMA_ENCAP or XFRMA_COADDR fails, the error will not be reported because the -ENOMEM assignment to the err variable is overwritten before. Fix this by moving these two in front of the function so that memory allocation failures will be reported. Reported-by: Tobias Brunner Signed-off-by: Steffen Klassert commit 18a50f82cd2ff3e43589d44349e71fdbef0d3fdd Author: Nitin Garg Date: Fri Jun 4 17:09:43 2021 +0800 clk: imx: scu: Do not enable runtime PM for CPU clks Since CPU clocks are managed by CPUFREQ and ATF, do not enable runtime PM otherwise rpm gets out of status as cpufreq also manages clock states. Signed-off-by: Nitin Garg Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit a82327cc5edb2283efe6a63bde7516e67d02f2a2 Author: Dong Aisheng Date: Fri Jun 4 17:09:42 2021 +0800 clk: imx: scu: add parent save and restore Add clock parent save and restore. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 7487986c9a010410b7e7af13072a5c04ea804eda Author: Anson Huang Date: Fri Jun 4 17:09:41 2021 +0800 clk: imx: scu: Only save DC SS clock using non-cached clock rate Display sub-system has special clock settings in SCFW, the bypassed clock is used instead of PLL in Linux kernel clock tree, so when saving clock rate, need to save non-cached clock rate for Display sub-system's bypass clocks, and other clocks still use the cached clock rate which is with runtime PM ON. Signed-off-by: Anson Huang Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit a43f6e8ae429f5ca594ae4463cc31c2a8ad4339c Author: Anson Huang Date: Fri Jun 4 17:09:40 2021 +0800 clk: imx: scu: Add A72 frequency scaling support Add A72 clock to support cpufreq on A72 cluster. Signed-off-by: Anson Huang Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit cd8bd2f3ca64cac701084a5b3fc21e721bb15278 Author: Anson Huang Date: Fri Jun 4 17:09:39 2021 +0800 clk: imx: scu: Add A53 frequency scaling support Add i.MX8QM cpufreq support for A53 cluster. Signed-off-by: Anson Huang Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit a61cea83daafc60618be3ac89dc6c5e2d1367697 Author: Dong Aisheng Date: Fri Jun 4 17:09:38 2021 +0800 clk: imx: scu: bypass pi_pll enable status restore PI PLL does not support enable/disable. So bypass it's enable status restore. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 6618b5aa655a793a5ad3b988cb4e2ff80777f06e Author: Dong Aisheng Date: Fri Jun 4 17:09:37 2021 +0800 clk: imx: scu: detach pd if can't power up detach pd if can't power up as it may be allocated to a differet partition. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit aecf425fa948e0ea9d0f7d86317b2c509108daae Author: Dong Aisheng Date: Fri Jun 4 17:09:36 2021 +0800 clk: imx: scu: bypass cpu clock save and restore CPU clock is managed by ATF. No need save and restore. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit b192d04011ee7dadfa3045beae4a2ef7dd71d027 Author: Guoniu.zhou Date: Fri Jun 4 17:09:35 2021 +0800 clk: imx: scu: add parallel port clock ops Because digital pll for parallel interface is on by default, and not provide enable/disable function by scu, so add the related ops for this kind of clocks. Signed-off-by: Guoniu.zhou Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit babfaa9556d7a9df2784bfcddafdeba29d24c8fd Author: Dong Aisheng Date: Fri Jun 4 17:09:34 2021 +0800 clk: imx: scu: add more scu clocks Add more scu clocks used by i.MX8 platforms. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 2924b0b0c1cde59edeeaf3b709ec7a8a7779e4b8 Author: Dong Aisheng Date: Fri May 21 11:12:47 2021 +0800 clk: imx: scu: add enet rgmii gpr clocks enet tx clk actually is sourced from a gpr divider, not default enet clk. Add enet grp clocks for user to use correctly. Cc: Abel Vesa Cc: Stephen Boyd Cc: Shawn Guo Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit afd0406b4663014ef1f5993454db89c8a0e8bb42 Author: Dong Aisheng Date: Fri Apr 23 11:33:34 2021 +0800 clk: imx8qm: add clock valid resource checking Add imx8qm clock valid resource checking mechanism Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 5964012ce37e66d2588a9bc82f7184a008851cac Author: Dong Aisheng Date: Fri Apr 23 11:33:33 2021 +0800 clk: imx8qxp: add clock valid checking mechnism clk-imx8qxp is a common SCU clock driver used by both QM and QXP platforms. The clock numbers vary a bit between those two platforms. This patch introduces a mechanism to only register the valid clocks for one platform by checking the clk resource id table. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 5392c5de096a1cad7cc06265a8cbf18de2da22c7 Author: Dong Aisheng Date: Fri Apr 23 11:33:32 2021 +0800 clk: imx: scu: add gpr clocks support SCU clock protocol supports a few clocks based on GPR controller registers including mux/divider/gate. Add a generic clock register API to support them all. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 91e916771de0abaf58094aa9375cd0227eca102a Author: Dong Aisheng Date: Fri Apr 23 11:33:31 2021 +0800 clk: imx: scu: remove legacy scu clock binding support Legacy scu clock binding are not maintained anymore, it has a very limited clocks supported during initial upstreaming and obviously unusable by products. So it's meaningless to keep it in kernel which worse the code readability. Remove it to keep code much cleaner. Signed-off-by: Dong Aisheng Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 659c12c7f5ceda8a62c92da1b730307c537247fa Author: Dong Aisheng Date: Fri Apr 23 11:33:30 2021 +0800 dt-bindings: arm: imx: scu: drop deprecated legacy clock binding The legacy clock binding are not maintained anymore. It has only a very preliminary supported clocks during initial upstream and meaningless for users. So drop it from binding doc now. Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng Acked-by: Rob Herring Signed-off-by: Abel Vesa commit e446441a058a39f092cc536402230e852f658c4f Author: Dong Aisheng Date: Fri Apr 23 11:33:29 2021 +0800 dt-bindings: arm: imx: scu: fix naming typo of clk compatible string There is a typo in binding doc that the name of compatible string of scu clock should be "fsl,xxx-clk" rather than "fsl,xxx-clock". In reality, both example and dts using "fsl,xxx-clk", so fixing the doc is enough. Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng Acked-by: Rob Herring Signed-off-by: Abel Vesa commit b24e288d5063356dfcfc5250dc122cc8af73e6ac Author: Jacky Bai Date: Tue Apr 20 13:54:53 2021 +0800 clk: imx: Remove the audio ipg clock from imx8mp There is no audio ipg clock on i.MX8MP, so remove this from the clock driver. Signed-off-by: Jacky Bai Reviewed-by: Abel Vesa Signed-off-by: Abel Vesa commit 1f28f6f091b49040c3e198c982704c3f21cad1e5 Author: Li Yang Date: Fri Jun 11 19:31:28 2021 -0500 usb: gadget: fsl: properly remove remnant of MXC support Commit a390bef7db1f ("usb: gadget: fsl_mxc_udc: Remove the driver") didn't remove all the MXC related stuff which can cause build problem for LS1021 when enabled again in Kconfig. This patch remove all the remnants. Reviewed-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Li Yang Link: https://lore.kernel.org/r/20210612003128.372238-1-leoyang.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 66165dba2929c750082690582ae379d3d595f373 Merge: 318324e6df978 971ee247060d8 Author: Greg Kroah-Hartman Date: Mon Jun 14 10:27:09 2021 +0200 Merge tag 'for-5.14-usb' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into usb-next Thierry writes: usb: tegra: Changes for v5.14-rc1 Implements proper suspend/resume for the XUSB controller found on recent Tegra chips. * tag 'for-5.14-usb' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: usb: xhci: tegra: Enable ELPG for runtime/system PM usb: xhci: tegra: Unlink power domain devices phy: tegra: xusb: Add wake/sleepwalk for Tegra186 phy: tegra: xusb: Tegra210 host mode VBUS control phy: tegra: xusb: Add wake/sleepwalk for Tegra210 phy: tegra: xusb: Add sleepwalk and suspend/resume phy: tegra: xusb: Add Tegra210 lane_iddq operation phy: tegra: xusb: Rearrange UPHY init on Tegra210 phy: tegra: xusb: Move usb3 port init for Tegra210 commit 318324e6df9787f8ec06660224f555471c8f36d1 Author: Tony Lindgren Date: Fri Jun 4 11:05:36 2021 +0300 usb: musb: Implement tracing for state change events The devctl register on musb is the only way to get state information on musb. The hardware can easily get confused because it tries to do things on it's own automagically, and things like slow VBUS rise can make things fail. Let's make it easier to debug the ongoing state change issues that keep popping up on regular basis and add tracing support. With these changes we can easily trace musb state change events with: echo 1 > /sys/kernel/debug/tracing/events/musb/musb_state/enable cat /sys/kernel/debug/tracing/trace_pipe echo 0 > /sys/kernel/debug/tracing/events/musb/musb_state/enable Cc: Alexandre Belloni Cc: Andreas Kemnade Cc: Bhushan Shah Cc: Drew Fustini Cc: Thomas Petazzoni Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210604080536.12185-2-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit e2ff8815f3d4dc082d60e261d3f8c80896ad4078 Author: Tony Lindgren Date: Fri Jun 4 11:05:35 2021 +0300 usb: musb: Simplify cable state handling Simplify cable state handling a bit to leave out duplicated code. We are just scheduling work and showing state info if a recheck is needed. No intended functional changes. Cc: Alexandre Belloni Cc: Andreas Kemnade Cc: Bhushan Shah Cc: Drew Fustini Cc: Thomas Petazzoni Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210604080536.12185-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit fbba7e69b061b9a90271dab127ac0a786527bb9f Merge: 46c886220ae33 4f05223acaeaa Author: Marc Zyngier Date: Mon Jun 14 09:07:45 2021 +0100 Merge branch kvm-arm64/selftest/debug into kvmarm-master/next Guest self-hosted debug tests from Ricardo Koller * kvm-arm64/selftest/debug: KVM: selftests: Add aarch64/debug-exceptions test KVM: selftests: Add exception handling support for aarch64 KVM: selftests: Move GUEST_ASSERT_EQ to utils header KVM: selftests: Introduce UCALL_UNHANDLED for unhandled vector reporting KVM: selftests: Complete x86_64/sync_regs_test ucall KVM: selftests: Rename vm_handle_exception commit 4f05223acaeaabe0a1a188e25fab334735d85c5e Author: Ricardo Koller Date: Thu Jun 10 18:10:20 2021 -0700 KVM: selftests: Add aarch64/debug-exceptions test Covers fundamental tests for debug exceptions. The guest installs and handle its debug exceptions itself, without KVM_SET_GUEST_DEBUG. Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210611011020.3420067-7-ricarkol@google.com commit e3db7579ef355a0b2bfef4448b84d9ac882c8f2c Author: Ricardo Koller Date: Thu Jun 10 18:10:19 2021 -0700 KVM: selftests: Add exception handling support for aarch64 Add the infrastructure needed to enable exception handling in aarch64 selftests. The exception handling defaults to an unhandled-exception handler which aborts the test, just like x86. These handlers can be overridden by calling vm_install_exception_handler(vector) or vm_install_sync_handler(vector, ec). The unhandled exception reporting from the guest is done using the ucall type introduced in a previous commit, UCALL_UNHANDLED. The exception handling code is inspired on kvm-unit-tests. Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210611011020.3420067-6-ricarkol@google.com commit 67f709f52bf0b5c19f24d1234163123cbb6af545 Author: Ricardo Koller Date: Thu Jun 10 18:10:18 2021 -0700 KVM: selftests: Move GUEST_ASSERT_EQ to utils header Move GUEST_ASSERT_EQ to a common header, kvm_util.h, for other architectures and tests to use. Also modify __GUEST_ASSERT so it can be reused to implement GUEST_ASSERT_EQ. Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210611011020.3420067-5-ricarkol@google.com commit 75275d7fbef47805b77e8af81a4d51e2d92db70f Author: Ricardo Koller Date: Thu Jun 10 18:10:17 2021 -0700 KVM: selftests: Introduce UCALL_UNHANDLED for unhandled vector reporting x86, the only arch implementing exception handling, reports unhandled vectors using port IO at a specific port number. This replicates what ucall already does. Introduce a new ucall type, UCALL_UNHANDLED, for guests to report unhandled exceptions. Then replace the x86 unhandled vector exception reporting to use it instead of port IO. This new ucall type will be used in the next commits by arm64 to report unhandled vectors as well. Tested: Forcing a page fault in the ./x86_64/xapic_ipi_test halter_guest_code() shows this: $ ./x86_64/xapic_ipi_test ... Unexpected vectored event in guest (vector:0xe) Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210611011020.3420067-4-ricarkol@google.com commit b7326c01122683b88e273a0cc826cd4c01234470 Author: Ricardo Koller Date: Thu Jun 10 18:10:16 2021 -0700 KVM: selftests: Complete x86_64/sync_regs_test ucall The guest in sync_regs_test does raw ucalls by directly accessing the ucall IO port. It makes these ucalls without setting %rdi to a `struct ucall`, which is what a ucall uses to pass messages. The issue is that if the host did a get_ucall (the receiver side), it would try to access the `struct ucall` at %rdi=0 which would lead to an error ("No mapping for vm virtual address, gva: 0x0"). This issue is currently benign as there is no get_ucall in sync_regs_test; however, that will change in the next commit as it changes the unhandled exception reporting mechanism to use ucalls. In that case, every vcpu_run is followed by a get_ucall to check if the guest is trying to report an unhandled exception. Fix this in advance by setting %rdi to a UCALL_NONE struct ucall for the sync_regs_test guest. Tested with gcc-[8,9,10], and clang-[9,11]. Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210611011020.3420067-3-ricarkol@google.com commit b78f4a596692f6805e796a4c13f2d921b8a95166 Author: Ricardo Koller Date: Thu Jun 10 18:10:15 2021 -0700 KVM: selftests: Rename vm_handle_exception Rename the vm_handle_exception function to a name that indicates more clearly that it installs something: vm_install_exception_handler. Reported-by: kernel test robot Suggested-by: Marc Zyngier Suggested-by: Andrew Jones Signed-off-by: Ricardo Koller Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210611011020.3420067-2-ricarkol@google.com commit 7db3cde5123e2acdd65ff7458628a9835c804b27 Author: Martin Blumenstingl Date: Fri Jun 4 19:08:44 2021 +0200 ARM: dts: meson: Set the fifo-size of uart_A to 128 bytes The first UART controller in the "Everything-Else" power domain is called uart_A. Unlike all other UARTs (which use a 64 byte fifo-size in hardware) uart_A has a fifo-size of 128 bytes. This UART controller is typically used for Bluetooth HCI. The fifo-size of 128 bytes is valid from all SoCs from Meson6 (or possibly even earlier) all the way up to the latest 64-bit ones. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210604170844.2201229-1-martin.blumenstingl@googlemail.com commit 303d2af21aedeaebe824411fbff912dfcdb48de5 Author: Neil Armstrong Date: Mon Jun 7 08:54:35 2021 +0200 arm64: dts: meson-sm1-odroid-c4: remove invalid hub_5v regulator Drop the hub_5v regulator which controls the HUB Reset line with GPIOH_4 which is already controlled by a GPIO HOG. Until we can properly describe how to control USB HUBs reset lines, keeping the GPIO HOG is an acceptable solution we use on multiple boards. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-8-narmstrong@baylibre.com commit 7178f340e9299dc886e6ddf6e938f09967902109 Author: Christian Hewitt Date: Mon Jun 7 08:54:34 2021 +0200 arm64: dts: meson-sm1-odroid-hc4: add spifc node to ODROID-HC4 Add a node for the XT25F128B SPI-NOR flash to make it accessible from Linux. Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-7-narmstrong@baylibre.com commit 164147f094ec5d0fc2c2098a888f4b50cf3096a7 Author: Neil Armstrong Date: Mon Jun 7 08:54:33 2021 +0200 arm64: dts: meson-sm1-odroid-hc4: add regulators controlled by GPIOH_8 As described in the HC4 schematics, GPIOH_8 controls the USB 5V and 12V regulators used to power the SATA drives. And is set as Open Drain since this GPIO doesn't support Push-Pull. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-6-narmstrong@baylibre.com commit 703e84d6615a4a95fb504c8f2e4c9426b86f3930 Author: Neil Armstrong Date: Mon Jun 7 08:54:32 2021 +0200 arm64: dts: meson-sm1-odroid-hc4: disable unused USB PHY0 As described in the HC4 schematics, only the USB port B is used, port A is left unconnected. Thus disable PHY0 and remove it from PHYs list. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-5-narmstrong@baylibre.com commit 45d736ab17b44257e15e75e0dba364139fdb0983 Author: Neil Armstrong Date: Mon Jun 7 08:54:31 2021 +0200 arm64: dts: meson-sm1-odroid: add 5v regulator gpio As described in the Odroid-C4 & Odroid-HC4 schematics, the 5V regulator is controlled by GPIOH_8 and in Open Drain since this GPIO doesn't support Push-Pull. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-4-narmstrong@baylibre.com commit 7881df51368027b2d3fed3dcd43b480f45157d81 Author: Neil Armstrong Date: Mon Jun 7 08:54:30 2021 +0200 arm64: dts: meson-sm1-odroid: set tf_io regulator gpio as open source According to Odroid-C4 & HC4 Schematics, the TF_3V3N_1V8_EN can be in Hi-Z for 3v3, and since it's the default GPIOAO_6 mode at reset, let switch this GPIO as Open-Source to drive for 1, and input for 0. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-3-narmstrong@baylibre.com commit 1f80a5cf74a60997b92d2cde772edec093bec4d9 Author: Neil Armstrong Date: Mon Jun 7 08:54:29 2021 +0200 arm64: dts: meson-sm1-odroid: add missing enable gpio and supply for tf_io regulator As described in the schematics of Odroid-C4 and Odroid-HC4, the TF_IO regulator is enabled by the GPIOE_2 GPIO and gets it's supply from VCC_5V. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210607065435.577334-2-narmstrong@baylibre.com commit e381a14c3e3a4e90e293d4eaa5a3ab8ae98b9973 Author: Jaroslav Kysela Date: Mon Jun 14 09:17:10 2021 +0200 ALSA: control_led - fix initialization in the mode show callback The str variable should be always initialized before use even if the switch covers all cases. This is a minimalistic fix: Assign NULL, the sprintf() may print '(null)' if something is corrupted. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210614071710.1786866-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 37fdb7c90f8cc2f41bdf2190ccc44a37bbf1a295 Merge: 12f7397984702 009c9aa5be652 Author: Greg Kroah-Hartman Date: Mon Jun 14 09:18:07 2021 +0200 Merge tag 'v5.13-rc6' into usb-next We want the usb fixes in here as well, and this resolves some merge issues with: drivers/usb/dwc3/debugfs.c drivers/usb/dwc3/gadget.c Signed-off-by: Greg Kroah-Hartman commit 99289bf1a76c0aea6ac0f77335b8c9bdca16aac7 Merge: a69008475fc56 009c9aa5be652 Author: Greg Kroah-Hartman Date: Mon Jun 14 09:14:43 2021 +0200 Merge tag 'v5.13-rc6' into tty-next We want the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 23f89b12753260463ebe027eed6324be33565010 Merge: edc64e7a03c81 009c9aa5be652 Author: Greg Kroah-Hartman Date: Mon Jun 14 09:12:45 2021 +0200 Merge tag 'v5.13-rc6' into staging-next We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 68afbd8459e9c8a86544b5e884041981b837e162 Merge: 5a576764e4190 009c9aa5be652 Author: Greg Kroah-Hartman Date: Mon Jun 14 09:07:45 2021 +0200 Merge tag 'v5.13-rc6' into driver-core-next We need the driver core fix in here as well. Signed-off-by: Greg Kroah-Hartman commit db4e54aefdfe03f1aea82bb65d61f25c3ea035d7 Merge: eab61fb1cc2ee 009c9aa5be652 Author: Greg Kroah-Hartman Date: Mon Jun 14 08:59:06 2021 +0200 Merge tag 'v5.13-rc6' into char-misc-next We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 12c11ba5be833391ec73d33de0360aacd9473569 Author: Takashi Sakamoto Date: Sun Jun 13 17:26:21 2021 +0900 ALSA: firewire: fill Kconfig with entries for devices based on DICE ASICs Nowadays a lot of devices are supported by ALSA dice driver. This commit fills Kconfig with entries for them. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210613082621.10900-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a4a86d273ff1b6f7551c67908556fd91c9affd22 Author: Aswath Govindraju Date: Mon May 10 10:40:05 2021 +0530 phy: phy-can-transceiver: Add support for generic CAN transceiver driver The driver adds support for generic CAN transceivers. Currently the modes supported by this driver are standby and normal modes for TI TCAN1042 and TCAN1043 CAN transceivers. The transceiver is modelled as a phy with pins controlled by gpios, to put the transceiver in various device functional modes. It also gets the phy attribute max_link_rate for the usage of CAN drivers. Signed-off-by: Aswath Govindraju Acked-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20210510051006.11393-4-a-govindraju@ti.com Signed-off-by: Vinod Koul commit ad92330614b93933088764e9098ebaec042bada6 Author: Aswath Govindraju Date: Mon May 10 10:40:04 2021 +0530 dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers Add binding documentation for TI TCAN104x CAN transceivers. Signed-off-by: Aswath Govindraju Reviewed-by: Rob Herring Acked-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20210510051006.11393-3-a-govindraju@ti.com Signed-off-by: Vinod Koul commit 307773f525eb9217090bd4b11748d880f7f99355 Author: Aswath Govindraju Date: Mon May 10 10:40:03 2021 +0530 phy: core: Reword the comment specifying the units of max_link_rate to be Mbps In some subsystems (eg. CAN, SPI), the max link rate supported can be less than 1 Mbps and if the unit for max_link_rate is Mbps then it can't be used. Therefore, leave the decision of units to be used, to the producer and consumer. Signed-off-by: Aswath Govindraju Acked-by: Marc Kleine-Budde Acked-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210510051006.11393-2-a-govindraju@ti.com Signed-off-by: Vinod Koul commit 10d2dece591be8c465fb07291ae0263400209d11 Author: He Ying Date: Thu Apr 8 07:55:30 2021 -0400 phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: He Ying Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210408115530.15673-1-heying24@huawei.com Signed-off-by: Vinod Koul commit 779fabf2a030875d203821648a978831eb8bae93 Author: He Ying Date: Thu Apr 8 07:48:50 2021 -0400 phy: phy-mtk-mipi-dsi: Remove redundant dev_err call in mtk_mipi_tx_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reviewed-by: Chunfeng Yun Reported-by: Hulk Robot Signed-off-by: He Ying Link: https://lore.kernel.org/r/20210408114850.14422-1-heying24@huawei.com Signed-off-by: Vinod Koul commit 349f98321121eea3a8f556b85fd1cde5147f6d92 Author: He Ying Date: Thu Apr 8 05:08:06 2021 -0400 phy: phy-mmp3-hsic: Remove redundant dev_err call in mmp3_hsic_phy_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: He Ying Link: https://lore.kernel.org/r/20210408090806.247325-1-heying24@huawei.com Signed-off-by: Vinod Koul commit 185ff019f6ffce5d1086961d8061a040d37e609e Author: He Ying Date: Thu Apr 8 05:08:08 2021 -0400 phy: bcm-ns-usb3: Remove redundant dev_err call in bcm_ns_usb3_mdio_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: He Ying Link: https://lore.kernel.org/r/20210408090808.247368-1-heying24@huawei.com Signed-off-by: Vinod Koul commit 29a269c6f54825c643a5c35762a2829ba5be67f6 Author: Pierre-Louis Bossart Date: Tue May 11 13:21:32 2021 +0800 soundwire: intel: move to auxiliary bus Now that the auxiliary_bus exists, there's no reason to use platform devices as children of a PCI device any longer. This patch refactors the code by extending a basic auxiliary device with Intel link-specific structures that need to be passed between controller and link levels. This refactoring is much cleaner with no need for cross-pointers between device and link structures. Note that the auxiliary bus API has separate init and add steps, which requires more attention in the error unwinding paths. The main loop needs to deal with kfree() and auxiliary_device_uninit() for the current iteration before jumping to the common label which releases everything allocated in prior iterations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511052132.28150-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c Author: Anna Schumaker Date: Wed Jun 9 17:07:29 2021 -0400 sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() This seems to happen fairly easily during READ_PLUS testing on NFS v4.2. I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr greater than the number of pages in the array. So let's just return early if we're setting base to a point at the end of the page data and let xdr_set_tail_base() handle setting up the buffer pointers instead. Signed-off-by: Anna Schumaker Fixes: 8d86e373b0ef ("SUNRPC: Clean up helpers xdr_set_iov() and xdr_set_page_base()") Signed-off-by: Trond Myklebust commit 3731d44bba8e0116b052b1b374476c5f6dd9a456 Author: Trond Myklebust Date: Fri Jun 11 13:40:55 2021 -0400 NFSv4: Fix an Oops in pnfs_mark_request_commit() when doing O_DIRECT Fix an Oopsable condition in pnfs_mark_request_commit() when we're putting a set of writes on the commit list to reschedule them after a failed pNFS attempt. Fixes: 9c455a8c1e14 ("NFS/pNFS: Clean up pNFS commit operations") Signed-off-by: Trond Myklebust commit dd99e9f98fbf423ff6d365b37a98e8879170f17c Author: Trond Myklebust Date: Wed Jun 9 10:04:46 2021 -0400 NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Michael Wakabayashi Fixes: 5c6e5b60aae4 ("NFS: Fix an Oops in the pNFS files and flexfiles connection setup to the DS") Signed-off-by: Trond Myklebust commit e93a5e9306a576011f03011b492d4fbaa274477b Author: Trond Myklebust Date: Fri May 7 10:06:13 2021 -0400 NFSv4: Add support for application leases underpinned by a delegation If the NFSv4 client already holds a delegation for a file, then we can support application leases (i.e. fcntl(fd, F_SETLEASE,...)) because the underlying delegation guarantees that the file is not being modified on the server by another client in a way that might conflict with the lease guarantees. Signed-off-by: Trond Myklebust commit 6b4befc0a06bc412f5b5a17fdad473aaed943170 Author: Trond Myklebust Date: Fri May 7 09:14:37 2021 -0400 NFSv4: Add lease breakpoints in case of a delegation recall or return When we add support for application level leases and knfsd delegations to the NFS client, we we want to have them safely underpinned by a "real" delegation to provide the caching guarantees. If that real delegation is recalled, then we need to ensure that the application leases/delegations are recalled too. Signed-off-by: Trond Myklebust commit be20037725d17935ec669044bd2b15bc40c3b5ab Author: Trond Myklebust Date: Sat May 8 10:01:32 2021 -0400 NFSv4: Fix delegation return in cases where we have to retry If we're unable to immediately recover all locks because the server is unable to immediately service our reclaim calls, then we want to retry after we've finished servicing all the other asynchronous delegation returns on our queue. Signed-off-by: Trond Myklebust commit a9edc03f13dbd51095b38ef0371d24e7ec7ae693 Author: Kir Kolyshkin Date: Thu Jun 10 20:00:44 2021 -0700 docs: fix a cross-ref Commit acda97acb2e98c9 changes dax.txt to dax.rst. Fix the references accordingly. Cc: Igor Matheus Andrade Torrente Signed-off-by: Kir Kolyshkin Link: https://lore.kernel.org/r/20210611030044.1982911-4-kolyshkin@gmail.com Signed-off-by: Jonathan Corbet commit c098564d91c55d408ed31e8885b915a5e2006249 Author: Colin Ian King Date: Sun Jun 13 21:20:59 2021 +0100 tools: Fix "the the" in a message in kernel-chktaint There is a double "the" in a message in kernel-chktaint, fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210613202059.80403-1-colin.king@canonical.com Signed-off-by: Jonathan Corbet commit a212d9f33ed0b8399bd9829a779c4024068742a2 Merge: ffbbc5e5c7174 f7af616c632ee Author: David S. Miller Date: Sun Jun 13 13:49:39 2021 -0700 Merge branch 'iosm-driver' M Chetan Kumar says: ==================== net: iosm: PCIe Driver for Intel M.2 Modem The IOSM (IPC over Shared Memory) driver is a PCIe host driver implemented for linux or chrome platform for data exchange over PCIe interface between Host platform & Intel M.2 Modem. The driver exposes interface conforming to the MBIM protocol. Any front end application ( eg: Modem Manager) could easily manage the MBIM interface to enable data communication towards WWAN. Intel M.2 modem uses 2 BAR regions. The first region is dedicated to Doorbell register for IRQs and the second region is used as scratchpad area for book keeping modem execution stage details along with host system shared memory region context details. The upper edge of the driver exposes the control and data channels for user space application interaction. At lower edge these data and control channels are associated to pipes. The pipes are lowest level interfaces used over PCIe as a logical channel for message exchange. A single channel maps to UL and DL pipe and are initialized on device open. On UL path, driver copies application sent data to SKBs associate it with transfer descriptor and puts it on to ring buffer for DMA transfer. Once information has been updated in shared memory region, host gives a Doorbell to modem to perform DMA and modem uses MSI to communicate back to host. For receiving data in DL path, SKBs are pre-allocated during pipe open and transfer descriptors are given to modem for DMA transfer. The driver exposes two types of ports, namely "wwan0mbim0", a char device node which is used for MBIM control operation and "wwan0-x",(x = 0,1,2..7) network interfaces for IP data communication. 1) MBIM Control Interface: This node exposes an interface between modem and application using char device exposed by "IOSM" driver to establish and manage the MBIM data communication with PCIe based Intel M.2 Modems. 2) MBIM Data Interface: The IOSM driver exposes IP link interface "wwan0-x" of type "wwan" for IP traffic. Iproute network utility is used for creating "wwan0-x" network interface and for associating it with MBIM IP session. The Driver supports upto 8 IP sessions for simultaneous IP communication. This applies on top of WWAN core rtnetlink series posted here: https://lore.kernel.org/netdev/1623486057-13075-1-git-send-email-loic.poulain@linaro.org/ Also driver has been compiled and tested on top of netdev net-next tree. https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/ ==================== Signed-off-by: David S. Miller commit f7af616c632ee2ac3af0876fe33bf9e0232e665a Author: M Chetan Kumar Date: Sun Jun 13 18:20:23 2021 +0530 net: iosm: infrastructure 1) Kconfig & Makefile changes for IOSM Driver compilation. 2) Add IOSM Driver documentation. 3) Modified MAINTAINER file for IOSM Driver addition. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 2a54f2c7793409736f2e5ea101e050b3f1997088 Author: M Chetan Kumar Date: Sun Jun 13 18:20:22 2021 +0530 net: iosm: net driver 1) Create net device & implement net operations for data/IP communication. 2) Bind IP Link to mux IP session for simultaneous IP traffic. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 110e6e02eb190ee4a799502d6cfa0f28d4efc294 Author: M Chetan Kumar Date: Sun Jun 13 18:20:21 2021 +0530 net: iosm: uevent support Report modem status via uevent. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 64516f633bfd2f576f3a18fe72184595367d11bf Author: M Chetan Kumar Date: Sun Jun 13 18:20:20 2021 +0530 net: iosm: protocol operations 1) Update UL/DL transfer descriptors in message ring. 2) Define message set for pipe/sleep protocol. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit faed4c6f6f486fbd0bde233dd46beb26ebdb1ab2 Author: M Chetan Kumar Date: Sun Jun 13 18:20:19 2021 +0530 net: iosm: shared memory protocol 1) Defines messaging protocol for handling Transfer Descriptor in both UL/DL direction. 2) Ring buffer management. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit be8c936e540fe6e60d03fa1578205c936e71335b Author: M Chetan Kumar Date: Sun Jun 13 18:20:18 2021 +0530 net: iosm: power management Implements state machine to handle host & device sleep. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 9413491e20e1aba6e471d90c19cc43e523216a4d Author: M Chetan Kumar Date: Sun Jun 13 18:20:17 2021 +0530 net: iosm: encode or decode datagram 1) Encode UL packet into datagram. 2) Decode DL datagram and route it to network layer. 3) Supports credit based flow control. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 51c45fa95435c55f2ae161fb9634671ab0411ead Author: M Chetan Kumar Date: Sun Jun 13 18:20:16 2021 +0530 net: iosm: multiplex IP sessions Establish IP session between host-device & session management. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 3b575260cb863d063669f382458e94ebdae6843d Author: M Chetan Kumar Date: Sun Jun 13 18:20:15 2021 +0530 net: iosm: bottom half 1) Bottom half(tasklet) for IRQ and task processing. 2) Tasks are processed asynchronous and synchronously. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 10685b6e9868cdee3c747a6b6fce53332875ed2f Author: M Chetan Kumar Date: Sun Jun 13 18:20:14 2021 +0530 net: iosm: wwan port control device Implements wwan port for MBIM & AT protocol communication Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 30ebda7a313d1b45ea64311d8dbb12ff3961bb80 Author: M Chetan Kumar Date: Sun Jun 13 18:20:13 2021 +0530 net: iosm: channel configuration Defines pipes & channel configurations like channel type, pipe mappings, No. of transfer descriptors and transfer buffer size etc. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit edf6423c04037040c7e0549fdebc903d68979515 Author: M Chetan Kumar Date: Sun Jun 13 18:20:12 2021 +0530 net: iosm: shared memory I/O operations 1) Binds logical channel between host-device for communication. 2) Implements device specific(Char/Net) IO operations. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 3670970dd8c661c10c10c300d726f59428eaad32 Author: M Chetan Kumar Date: Sun Jun 13 18:20:11 2021 +0530 net: iosm: shared memory IPC interface 1) Initializes shared memory for host-device communication. 2) Allocate resources required for control & data operations. 3) Transfers the Device IRQ to IPC execution thread. 4) Defines the timer cbs for async events. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit dc0514f5d828e8358fdab722cfa9c263bb583fea Author: M Chetan Kumar Date: Sun Jun 13 18:20:10 2021 +0530 net: iosm: mmio scratchpad 1) Initializes the Scratchpad region for Host-Device communication. 2) Exposes device capabilities like chip info and device execution stages. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 7f41ce085de0bada1e8c974cb3edd906ee49cb4c Author: M Chetan Kumar Date: Sun Jun 13 18:20:09 2021 +0530 net: iosm: irq handling 1) Request interrupt vector, frees allocated resource. 2) Registers IRQ handler. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 7e98d785ae6184c7580a33619dae8b651769ff08 Author: M Chetan Kumar Date: Sun Jun 13 18:20:08 2021 +0530 net: iosm: entry point 1) Register IOSM driver with kernel to manage Intel WWAN PCIe device(PCI_VENDOR_ID_INTEL, INTEL_CP_DEVICE_7560_ID). 2) Exposes the EP PCIe device capability to Host PCIe core. 3) Initializes PCIe EP configuration and defines PCIe driver probe, remove and power management OPS. 4) Allocate and map(dma) skb memory for data communication from device to kernel and vice versa. Signed-off-by: M Chetan Kumar Signed-off-by: David S. Miller commit 33f087577ed3a048e65e7b50c92704e2f43bd1f7 Author: Guenter Roeck Date: Fri Jun 4 15:07:37 2021 +0100 ARM: 9096/1: Remove arm_pm_restart() All users of arm_pm_restart() have been converted to use the kernel restart handler. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones Signed-off-by: Russell King commit ab6cef1d14475f1af33da99a6774626f73d278b6 Author: Guenter Roeck Date: Fri Jun 4 15:07:36 2021 +0100 ARM: 9095/1: ARM64: Remove arm_pm_restart() All users of arm_pm_restart() have been converted to use the kernel restart handler. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Acked-by: Catalin Marinas Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones Signed-off-by: Russell King commit ce8f1ccbc027ecc7720e30fa79c6a829c555e1b6 Author: Guenter Roeck Date: Fri Jun 4 15:07:35 2021 +0100 ARM: 9094/1: Register with kernel restart handler By making use of the kernel restart handler, board specific restart handlers can be prioritized amongst available mechanisms for a particular board or system. Select the default priority of 128 to indicate that the restart callback in the machine description is the default restart mechanism. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones Signed-off-by: Russell King commit 2bb565bbdc0358b6042e3076416c4ba32bd56bfc Author: Guenter Roeck Date: Fri Jun 4 15:07:34 2021 +0100 ARM: 9093/1: drivers: firmwapsci: Register with kernel restart handler Register with kernel restart handler instead of setting arm_pm_restart directly. This enables support for replacing the PSCI restart handler with a different handler if necessary for a specific board. Select a priority of 129 to indicate a higher than default priority, but keep it as low as possible since PSCI reset is known to fail on some boards. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Guenter Roeck Acked-by: Lorenzo Pieralisi Signed-off-by: Thierry Reding Signed-off-by: Lee Jones Signed-off-by: Russell King commit cfca563bc1d851a2bd6361ee0710c9b4ac71f44b Author: Guenter Roeck Date: Fri Jun 4 15:07:33 2021 +0100 ARM: 9092/1: xen: Register with kernel restart handler Register with kernel restart handler instead of setting arm_pm_restart directly. Select a high priority of 192 to ensure that default restart handlers are replaced if Xen is running. Acked-by: Arnd Bergmann Reviewed-by: Wolfram Sang Reviewed-by: Stefano Stabellini Signed-off-by: Guenter Roeck Signed-off-by: Thierry Reding Signed-off-by: Lee Jones Signed-off-by: Russell King commit 89a0b011fa7258e44b5e720c4057f47c84c1d0c6 Author: Wang Kefeng Date: Thu Jun 3 13:27:35 2021 +0100 ARM: 9091/1: Revert "mm: qsd8x50: Fix incorrect permission faults" This reverts commit e220ba60223a9d63e70217e5b112160df8c21cea. The VERIFY_PERMISSION_FAULT is introduced since 2009 but no one use it, just revert it and clean unused comment. Signed-off-by: Kefeng Wang Signed-off-by: Russell King commit 6e121df14ccd5ca5142a21759beda7f12db0002b Author: Linus Walleij Date: Thu Jun 3 09:52:02 2021 +0100 ARM: 9090/1: Map the lowmem and kernel separately Using our knowledge of where the physical kernel sections start and end we can split mapping of lowmem and kernel apart. This is helpful when you want to place the kernel independently from lowmem and not be limited to putting it into lowmem only, but also into places such as the VMALLOC area. We extensively rewrite the lowmem mapping code to account for all cases where the kernel image overlaps with the lowmem in different ways. This is helpful to handle situations which occur when the kernel is loaded in different places and makes it possible to place the kernel in a more random manner which is done with e.g. KASLR. We sprinkle some comments with illustrations and pr_debug() over it so it is also very evident to readers what is happening. We now use the kernel_sec_start and kernel_sec_end instead of relying on __pa() (phys_to_virt) to provide this. This is helpful if we want to resolve physical-to-virtual and virtual-to-physical mappings at runtime rather than compiletime, especially if we are not using patch phys to virt. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit a91da54570856e3d3af4ba2884db71fbce06f70b Author: Linus Walleij Date: Thu Jun 3 09:51:21 2021 +0100 ARM: 9089/1: Define kernel physical section start and end When we are mapping the initial sections in head.S we know very well where the start and end of the kernel image in physical memory is placed. Later on it gets hard to determine this. Save the information into two variables named kernel_sec_start and kernel_sec_end for convenience for later work involving the physical start and end of the kernel. These variables are section-aligned corresponding to the early section mappings set up in head.S. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit b78f63f4439bbfd02bfc628114ed0f63460e5570 Author: Linus Walleij Date: Thu Jun 3 09:50:16 2021 +0100 ARM: 9088/1: Split KERNEL_OFFSET from PAGE_OFFSET We want to be able to compile the kernel into an address different from PAGE_OFFSET (start of lowmem) + TEXT_OFFSET, so start to pry apart the address of where the kernel is located from the address where the lowmem is located by defining and using KERNEL_OFFSET in a few key places. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 623ba75a5d6b8e196a21f3ed36d26a5f6db459ce Author: Alex Bee Date: Thu May 27 17:44:52 2021 +0200 ARM: dts: rockchip: add power controller for RK322x Add the power controller node and the correspondending qos nodes for RK322x. Also add the power-domain property to the nodes that are already present. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210527154455.358869-10-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 1a4eb37f3174d3a54e40392abcfbb9b3949948bb Author: Alex Bee Date: Thu May 27 17:44:51 2021 +0200 ARM: dts: rockchip: add power controller for RK3036 Add the power controller node and the correspondending qos nodes for RK3036. Also add the power-domain property to the nodes that are already present. Note: Since the regiser offsets of the axi interconnect QoS are missing in the TRM (RK3036 TRM V1.0), they have been taken from vendor kernel. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210527154455.358869-9-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 51094deb330623a172b80f7f1cb43f2d6e165c4f Author: Uwe Kleine-König Date: Fri Jun 11 10:14:14 2021 +0200 arm64: dts: rockchip: Add support for USB on helios64 This enables the USB hardware needed to access devices on the sockets J1 and J13. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210611081414.1448786-1-uwe@kleine-koenig.org Signed-off-by: Heiko Stuebner commit 3fedcc636e28f6188b6bb126199eda031bc707f3 Author: Johan Jonker Date: Sat Jun 12 20:47:33 2021 +0200 ARM: dts: rockchip: add labels to the timer nodes on rk3066a While the kernel doesn't care so much right now, boot loaders like u-boot need to refine the node on their side, so to make life easier for everyone add the labels to the timer nodes on rk3066a. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210612184733.2331-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit bc84957d3118df7c05724a0c0e693ffe038d5409 Author: William Breathitt Gray Date: Thu Jun 10 10:36:42 2021 +0900 counter: interrupt-cnt: Add const qualifier for actions_list array The struct counter_synapse actions_list member expects a const enum counter_synapse_action array. This patch renames interrupt_cnt_synapse_actionss to interrupt_cnt_synapse_actions and adds a const qualifier to match actions_list. Cc: Oleksij Rempel Signed-off-by: William Breathitt Gray Reviewed-by: Link: https://lore.kernel.org/r/20210610013642.149961-1-vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit afedd992c38af6ae7f513c4e86966d9d62c0dbd1 Author: Marc Kleine-Budde Date: Thu Jun 10 15:46:19 2021 +0200 iio: ltr501: mark ltr501_chip_info as const This patch marks the struct ltr501_chip_info as constant. Reviewed-by: Andy Shevchenko Signed-off-by: Marc Kleine-Budde Tested-by: Nikita Travkin # ltr559 Link: https://lore.kernel.org/r/20210610134619.2101372-5-mkl@pengutronix.de Signed-off-by: Jonathan Cameron commit 71b33f6f93ef9462c84560e2236ed22209d26a58 Author: Oliver Lang Date: Thu Jun 10 15:46:18 2021 +0200 iio: ltr501: ltr501_read_ps(): add missing endianness conversion The PS ADC Channel data is spread over 2 registers in little-endian form. This patch adds the missing endianness conversion. Fixes: 2690be905123 ("iio: Add Lite-On ltr501 ambient light / proximity sensor driver") Signed-off-by: Oliver Lang Reviewed-by: Andy Shevchenko Signed-off-by: Marc Kleine-Budde Tested-by: Nikita Travkin # ltr559 Link: https://lore.kernel.org/r/20210610134619.2101372-4-mkl@pengutronix.de Cc: Signed-off-by: Jonathan Cameron commit 421a26f3d7a7c3ca43f3a9dc0f3cb0f562d5bd95 Author: Oliver Lang Date: Thu Jun 10 15:46:17 2021 +0200 iio: ltr501: ltr559: fix initialization of LTR501_ALS_CONTR The ltr559 chip uses only the lowest bit of the ALS_CONTR register to configure between active and stand-by mode. In the original driver BIT(1) is used, which does a software reset instead. This patch fixes the problem by using BIT(0) as als_mode_active for the ltr559 chip. Fixes: 8592a7eefa54 ("iio: ltr501: Add support for ltr559 chip") Signed-off-by: Oliver Lang Reviewed-by: Andy Shevchenko Signed-off-by: Marc Kleine-Budde Tested-by: Nikita Travkin # ltr559 Link: https://lore.kernel.org/r/20210610134619.2101372-3-mkl@pengutronix.de Cc: Signed-off-by: Jonathan Cameron commit 2ac0b029a04b673ce83b5089368f467c5dca720c Author: Marc Kleine-Budde Date: Thu Jun 10 15:46:16 2021 +0200 iio: ltr501: mark register holding upper 8 bits of ALS_DATA{0,1} and PS_DATA as volatile, too The regmap is configured for 8 bit registers, uses a RB-Tree cache and marks several registers as volatile (i.e. do not cache). The ALS and PS data registers in the chip are 16 bit wide and spans two regmap registers. In the current driver only the base register is marked as volatile, resulting in the upper register only read once. Further the data sheet notes: | When the I2C read operation starts, all four ALS data registers are | locked until the I2C read operation of register 0x8B is completed. Which results in the registers never update after the 2nd read. This patch fixes the problem by marking the upper 8 bits of the ALS and PS registers as volatile, too. Fixes: 2f2c96338afc ("iio: ltr501: Add regmap support.") Reported-by: Oliver Lang Reviewed-by: Andy Shevchenko Signed-off-by: Marc Kleine-Budde Tested-by: Nikita Travkin # ltr559 Link: https://lore.kernel.org/r/20210610134619.2101372-2-mkl@pengutronix.de Cc: Signed-off-by: Jonathan Cameron commit b4c166925d4c6177ca325f0721627c6c2e3f95e6 Author: Tom Rix Date: Thu Jun 10 14:44:36 2021 -0700 iio: scmi: fix spelling of SPDX tag checkpatch looks for SPDX-License-Identifier. Remove the extra spaces. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210610214438.3161140-7-trix@redhat.com Signed-off-by: Jonathan Cameron commit a7ba1c24da7b78f476d8f5523489a721a01c4243 Author: Stephan Gerhold Date: Fri Jun 11 10:09:03 2021 +0200 iio: accel: bma180/bmc150: Move BMA254 to bmc150-accel driver Commit c1d1c4a62db5 ("iio: accel: bma180: BMA254 support") added BMA254 support to the bma180 driver and changed some naming to BMA25x to make it easier to add support for BMA253 and BMA255. Unfortunately, there is quite some overlap between the bma180 driver and the bmc150-accel driver. Back when the commit was made, the bmc150-accel driver actually already had support for BMA255, and adding support for BMA254 would have been as simple as adding a new compatible to bmc150-accel. The bmc150-accel driver is a bit better for BMA254 since it also supports the motion trigger/interrupt functionality. Fortunately, moving BMA254 support over to bmc150-accel is fairly simple because the drivers have compatible device tree bindings. Revert most of the changes for BMA254 support in bma180 and move BMA254 over to bmc150-accel. This has the following advantages: - Support for motion trigger/interrupt - Fix incorrect scale values (BMA254 currently uses the same as BMA250 but actually they're different because of 10 vs 12 bits data size) - Less code than before :) BMA250 could be potentially also moved but it's more complicated because its chip_id conflicts with the one for BMA222 in bmc150-accel. Perhaps there are also other register differences, I did not investigate further yet (and I have no way to test it). Cc: Peter Meerwald Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-11-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 5640fed3035e88c3ce1361e6fc93f4e72468f307 Author: Stephan Gerhold Date: Fri Jun 11 10:09:02 2021 +0200 dt-bindings: iio: accel: bma180/bma255: Move bma254 to bma255 schema BMA254 is very similar to BMA253/BMA255 which are both supported by the bmc150-accel driver. In general, there is quite some overlap between the bma180 and bmc150-accel driver, but the bmc150-accel driver has a few more features (e.g. motion trigger/interrupt). Let's move bma254 over to the bma255 schema (bmc150-accel driver). Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-10-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit d1e7ff89e6f1f883450559cb3cebb632da962b49 Author: Stephan Gerhold Date: Fri Jun 11 10:09:01 2021 +0200 dt-bindings: iio: bma255: Allow multiple interrupts BMA253 has two interrupt pins (INT1 and INT2) that can be configured independently. At the moment the bmc150-accel driver does not make use of them but it might be able to in the future, so it's useful to already specify all available interrupts in the device tree. Set maxItems: 2 for interrupts to allow specifying a second one. This is necessary as preparation to move the bosch,bma254 compatible from bosch,bma180.yaml to bosch,bma255.yaml since bma180 allows two interrupts, but BMA254 is better supported by the bmc150-accel driver. Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-9-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 49e95c689ad8a5f12a8a9aff3a50821969ebe0d7 Author: Stephan Gerhold Date: Fri Jun 11 10:09:00 2021 +0200 iio: accel: bmc150: Add device IDs for BMA253 BMA253 is mostly like BMA255 and has exactly the same register layout as used by the bmc150-accel driver as far I can tell. Making it work is as simple as adding new device IDs for it since it has the same chip_id = 0xFA (250) as BMA255 and others. Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-8-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit c3a16200c72e44d20c3468455182f76f3797dc8f Author: Stephan Gerhold Date: Fri Jun 11 10:08:59 2021 +0200 dt-bindings: iio: accel: bma255: Document bosch,bma253 BMA253 is mostly like BMA255 that is already supported by the bmc150-accel driver. Document an extra bosch,bma253 compatible for it. Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-7-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 88e63ce6ca2834c0581273db55fb9ad2576bbbcc Author: Stephan Gerhold Date: Fri Jun 11 10:08:58 2021 +0200 iio: accel: bmc150: Sort all chip names alphabetically / by chip ID Right now all the device IDs are listed in seemingly random order, make this consistent by ordering those alphabetically. Also, order bmc150_accel_chip_info_tbl by chip ID for the same reason. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-6-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 54b61203e203f7d300cb9355c234fbecf8015c69 Author: Stephan Gerhold Date: Fri Jun 11 10:08:57 2021 +0200 iio: accel: bmc150: Drop duplicated documentation of supported chips The chips supported by the bmc150-accel driver are clearly documented in Kconfig, in the bmc150_accel_chip_info_tbl as well as in all the device ID tables in the I2C/SPI drivers. It's easy to forget to update the lists in the file header. Drop those entirely to reduce the amount of changes required to add new chip variants. Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-5-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit c06a6aba6835946bcccb9909c98ec110949ea630 Author: Stephan Gerhold Date: Fri Jun 11 10:08:56 2021 +0200 iio: accel: bmc150: Drop misleading/duplicate chip identifiers Commit 0ad4bf370176 ("iio:accel:bmc150-accel: Use the chip ID to detect sensor variant") stopped using the I2C/ACPI match data to look up the bmc150_accel_chip_info. However, the bmc150_accel_chip_info_tbl remained as-is, with multiple entries with the same chip_id (e.g. 0xFA for BMC150/BMI055/BMA255). This is redundant now because actually the driver will always select the first entry with a matching chip_id. So even if a device probes e.g. with BMA0255 it will end up using the chip_info for BMC150. And in general that's fine for now, the entries for BMC150/BMI055/BMA255 were exactly the same anyway (except for the name, which is replaced with the more accurate one later). But in this case it's misleading because it suggests that one should add even more entries with the same chip_id when adding support for new variants. Let's make that more clear by removing the enum with the chip identifiers entirely and instead have only one entry per chip_id. Note that we may need to bring back some mechanism to differentiate between different chips with the same chip_id in the future. For example, BMA250 (currently supported by the bma180 driver) has the same chip_id = 0x03 as BMA222 even though they have different channel sizes (8 bits vs 10 bits). But in any case, that mechanism would need to look quite different from what we have right now. Cc: Bastien Nocera Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-4-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 4c17782311bdd5ca56b710aacbb73a1235d78459 Author: Stephan Gerhold Date: Fri Jun 11 10:08:55 2021 +0200 iio: accel: bmc150: Clarify combo modules in Kconfig The Kconfig option currently says that all Bosch accelerometers supported by the bmc150-accel driver are combo chips with both accelerometer and magnetometer. This is wrong: actually only BMC150 is such a combo. The BMA* variants only contain an accelerometer and the BMI055 actually is a accelerometer + gyroscope combo. Clarify this in the help text and also make the list of supported variants complete and sorted for consistency. Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-3-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit 6e2a90af0b8d757e850cc023d761ee9a9492e2fe Author: Stephan Gerhold Date: Fri Jun 11 10:08:54 2021 +0200 iio: accel: bmc150: Fix bma222 scale unit According to sysfs-bus-iio documentation the unit for accelerometer values after applying scale/offset should be m/s^2, not g, which explains why the scale values for the other variants in bmc150-accel do not match exactly the values given in the datasheet. To get the correct values, we need to multiply the BMA222 scale values by g = 9.80665 m/s^2. Fixes: a1a210bf29a1 ("iio: accel: bmc150-accel: Add support for BMA222") Reviewed-by: Linus Walleij Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210611080903.14384-2-stephan@gerhold.net Cc: Signed-off-by: Jonathan Cameron commit 94588c1bf1c8701392e1dc105c670d0d2fc7676a Author: Wei Yongjun Date: Mon May 24 14:05:36 2021 +0000 iio: dummy: Fix build error when CONFIG_IIO_TRIGGERED_BUFFER is not set Gcc reports build error when CONFIG_IIO_TRIGGERED_BUFFER is not set: riscv64-linux-gnu-ld: drivers/iio/dummy/iio_simple_dummy_buffer.o: in function `iio_simple_dummy_configure_buffer': iio_simple_dummy_buffer.c:(.text+0x2b0): undefined reference to `iio_triggered_buffer_setup_ext' riscv64-linux-gnu-ld: drivers/iio/dummy/iio_simple_dummy_buffer.o: in function `.L0 ': iio_simple_dummy_buffer.c:(.text+0x2fc): undefined reference to `iio_triggered_buffer_cleanup' Fix it by select IIO_TRIGGERED_BUFFER for config IIO_SIMPLE_DUMMY_BUFFER. Fixes: 738f6ba11800 ("iio: dummy: iio_simple_dummy_buffer: use triggered buffer core calls") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Jonathan Cameron commit c8cc4cf60b000fb9f4b29bed131fb6cf1fe42d67 Author: Yang Yingliang Date: Tue Jun 1 22:26:05 2021 +0800 iio: frequency: adf4350: disable reg and clk on error in adf4350_probe() Disable reg and clk when devm_gpiod_get_optional() fails in adf4350_probe(). Fixes:4a89d2f47ccd ("iio: adf4350: Convert to use GPIO descriptor") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210601142605.3613605-1-yangyingliang@huawei.com Cc: Signed-off-by: Jonathan Cameron commit 8090d67421ddab0ae932abab5a60200598bf0bbb Author: Stephan Gerhold Date: Wed May 26 11:44:07 2021 +0200 iio: accel: bma180: Fix BMA25x bandwidth register values According to the BMA253 datasheet [1] and BMA250 datasheet [2] the bandwidth value for BMA25x should be set as 01xxx: "Settings 00xxx result in a bandwidth of 7.81 Hz; [...] It is recommended [...] to use the range from ´01000b´ to ´01111b´ only in order to be compatible with future products." However, at the moment the drivers sets bandwidth values from 0 to 6, which is not recommended and always results into 7.81 Hz bandwidth according to the datasheet. Fix this by introducing a bw_offset = 8 = 01000b for BMA25x, so the additional bit is always set for BMA25x. [1]: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bma253-ds000.pdf [2]: https://datasheet.octopart.com/BMA250-Bosch-datasheet-15540103.pdf Cc: Peter Meerwald Fixes: 2017cff24cc0 ("iio:bma180: Add BMA250 chip support") Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210526094408.34298-2-stephan@gerhold.net Cc: Signed-off-by: Jonathan Cameron commit 93466212b9329616af2e4c7e5994d507d72e254d Author: Jarkko Nikula Date: Fri Jun 11 14:55:58 2021 +0300 counter: intel-qep: Use to_pci_dev() helper Use to_pci_dev() helper instead of container_of(d, struct pci_dev, dev); Suggested-by: Jonathan Cameron Signed-off-by: Jarkko Nikula Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/20210611115558.796338-2-jarkko.nikula@linux.intel.com Signed-off-by: Jonathan Cameron commit ac3bd9d6b11f6e7ddea30d3779b9c5d870b4ddfb Author: Jarkko Nikula Date: Fri Jun 11 14:55:57 2021 +0300 counter: intel-qep: Mark PM callbacks with __maybe_unused Remove CONFIG_PM ifdef and mark PM callbacks with __maybe_unused. Suggested-by: Jonathan Cameron Signed-off-by: Jarkko Nikula Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/20210611115558.796338-1-jarkko.nikula@linux.intel.com Signed-off-by: Jonathan Cameron commit 49bd77560f06518ed417f71c14adede16b07c819 Author: Alexandru Ardelean Date: Thu May 13 14:10:35 2021 +0300 iio: adc: remove unused private data assigned with spi_set_drvdata() These were usually used before the conversion to devm_ functions, so that the remove hook would be able to retrieve the pointer and do cleanups on remove. When the conversion happened, they should have been removed, but were omitted. Some drivers were copied from drivers that fit the criteria described above. In any case, in order to prevent more drivers from being used as example (and have spi_set_drvdata() needlessly set), this change removes it from the IIO ADC group. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513111035.77950-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit 21fd77afa113bef69c0982a7203a471a11c76b80 Author: Alexandru Ardelean Date: Thu May 13 15:25:12 2021 +0300 iio: imu: remove unused private data assigned with spi_set_drvdata() These were usually used before the conversion to devm_ functions, so that the remove hook would be able to retrieve the pointer and do cleanups on remove. When the conversion happened, they should have been removed, but were omitted. Some drivers were copied from drivers that fit the criteria described above. In any case, in order to prevent more drivers from being used as example (and have spi_set_drvdata() needlessly set), this change removes it from the IIO IMU group. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513122512.93187-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit 4b36151d7482654ec50ddc831f19a3e76c8ba4dd Author: Alexandru Ardelean Date: Thu May 13 15:07:52 2021 +0300 iio: adc: ad_sigma_delta: remove ad_sd_{setup,cleanup}_buffer_and_trigger() Since all AD Sigma-Delta drivers now use the devm_ad_sd_setup_buffer_and_trigger() function, we can remove the old ad_sd_{setup,cleanup}_buffer_and_trigger() functions. This way we can discourage new drivers that use the ad_sigma_delta lib-driver to use these (older functions). Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-13-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit c066ca1464f3b690d57c2f521d6cbb3e9546afd4 Author: Jonathan Cameron Date: Thu May 13 15:07:51 2021 +0300 iio: adc: ad7124: Use devm_ managed calls for all of probe() + drop remove() As not many steps were not already devm_ managed, use devm_add_action_or_reset() to handle the rest. This also uses the new devm_ad_sd_setup_buffer_and_trigger() function. Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-12-aardelean@deviqon.com commit bd5dcdeb3fd0784e492efe1132c006663e6c74ba Author: Alexandru Ardelean Date: Thu May 13 15:07:50 2021 +0300 iio: adc: ad7192: convert to device-managed functions With the devm_ad_sd_setup_buffer_and_trigger() helper, it's a bit easier now to convert the probe of the AD7192 driver to use device-managed functions. The regulators and the mclk requires devm_add_action_or_reset() callbacks though. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-11-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit c9ec2cb328e3273327efad09f99f3744a778108a Author: Alexandru Ardelean Date: Thu May 13 15:07:49 2021 +0300 iio: adc: ad7192: use devm_clk_get_optional() for mclk The devm_clk_get_optional() helper returns NULL when devm_clk_get() returns -ENOENT. This makes things slightly cleaner. The added benefit is mostly cosmetic. Also, a minor detail with this call, is that the reference for the parent device is taken as `spi->dev` instead of `&st->sd.spi->dev` (which looks a little quirky). Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-10-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit e50aab18dd7fbfb7419d0b9c4b4e45251f36beb8 Author: Alexandru Ardelean Date: Thu May 13 15:07:48 2021 +0300 iio: adc: ad7780: convert to device-managed functions With the devm_ad_sd_setup_buffer_and_trigger() helper, it's a bit easier now to convert the probe of the AD7780 driver to use device-managed functions. Only the regulator disable requires a devm_add_action_or_reset() callback. This change does that, cleaning up the driver a bit. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-9-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit bb560edc19a535b690b81fd30d17462d129483a3 Author: Alexandru Ardelean Date: Thu May 13 15:07:47 2021 +0300 iio: adc: ad7791: convert to device-managed functions With the devm_ad_sd_setup_buffer_and_trigger() helper, it's a bit easier now to convert the probe of the AD7791 driver to use device-managed functions. Only the regulator disable requires a devm_add_action_or_reset() callback. This change does that, cleaning up the driver a bit. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-8-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit 801a80eff4d71081a29ddfb627fe5a0330403c3b Author: Alexandru Ardelean Date: Thu May 13 15:07:46 2021 +0300 iio: adc: ad7793: convert to device-managed functions With the devm_ad_sd_setup_buffer_and_trigger() helper, it's a bit easier now to convert the probe of the AD7793 driver to use device-managed functions. Only the regulator disable requires a devm_add_action_or_reset() callback. This change does that, cleaning up the driver a bit. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-7-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit 718fb2bcf1034232599045fc710644d903c2af4b Author: Alexandru Ardelean Date: Thu May 13 15:07:45 2021 +0300 iio: adc: ad_sigma_delta: introduct devm_ad_sd_setup_buffer_and_trigger() This is a version of ad_sd_setup_buffer_and_trigger() with all underlying functions (that are used) being replaced with their device-managed variants. One thing to take care here is with {devm_}iio_trigger_alloc(), where both functions take a parent-device object as the first parameter. To make sure nothing quirky is happening, the devm_ad_sd_probe_trigger() function is checking that the provided 'dev' reference is the same as the one stored on the 'struct ad_sigma_delta' driver data. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210513120752.90074-6-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit ffbbc5e5c7174dc4732f78b9577a19621079c879 Merge: 73a378601a25d 185a108fe0429 Author: David S. Miller Date: Sat Jun 12 13:18:49 2021 -0700 Merge branch 'rmnet-checksums-part-2' Alex Elder says: ==================== net: qualcomm: rmnet: MAPv4 download checksum cleanup, part 2 This is part 2 of a large series that reworks some code that handles downloaded packets when MAPv4 checksum offload is enabled. The first part, which includes an overview, is here: https://lore.kernel.org/netdev/20210611190529.3085813-1-elder@linaro.org/ This second part of the series completes the simplification of this handling code, removing unnecessary byte swaps and bitwise inversions of checksum values, and along the way avoids the need for almost all of the forced type casts. The checksum field in an RMNet download trailer is given __sum16_t type to accurately reflect the meaning of that field. ==================== Signed-off-by: David S. Miller commit 185a108fe0429ddde6388d5a85d701a39beadfec Author: Alex Elder Date: Sat Jun 12 09:37:36 2021 -0500 net: qualcomm: rmnet: IPv6 payload length is simple We don't support any extension headers for IPv6 packets. Extension headers therefore contribute 0 bytes to the payload length. As a result we can just use the IPv6 payload length as the length used to compute the pseudo header checksum for both UDP and TCP messages. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 411a795e14b1fcbf64bc9ef6869d2bf9a5bf3c9a Author: Alex Elder Date: Sat Jun 12 09:37:35 2021 -0500 net: qualcomm: rmnet: drop some unary NOTs We compare a payload checksum with a pseudo checksum value for equality in rmnet_map_ipv4_dl_csum_trailer(). Both of those values are computed with a unary NOT (~) operation. The result of the comparison is the same if we omit that NOT for both values. Remove these operations in rmnet_map_ipv6_dl_csum_trailer() also. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit be754f6435936e78dafe0ebb9d1e9d52c3bde842 Author: Alex Elder Date: Sat Jun 12 09:37:34 2021 -0500 net: qualcomm: rmnet: trailer value is a checksum The csum_value field in the rmnet_map_dl_csum_trailer structure is a "real" Internet checksum. It is a 16 bit value, in big endian format, which represents an inverted ones' complement sum over pairs of bytes. Make that clear by changing its type to __sum16. This makes a typecast in rmnet_map_ipv4_dl_csum_trailer() and another in rmnet_map_ipv6_dl_csum_trailer() unnecessary. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 698aa6c46bf09070310cd2c8893ea2de5a796644 Author: Alex Elder Date: Sat Jun 12 09:37:33 2021 -0500 net: qualcomm: rmnet: remove unneeded code The previous patch makes rmnet_map_ipv4_dl_csum_trailer() return early with an error if it is determined that the computed checksum for the IP payload does not match what was expected. If the computed checksum *does* match the expected value, the IP payload (i.e., the transport message), can be considered good. There is no need to do any further processing of the message. This means a big block of code is unnecessary for validating the transport checksum value, and can be removed. Make comparable changes in rmnet_map_ipv6_dl_csum_trailer(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fab01a6f3a61748b9c2e038c84498c6624b06236 Author: Alex Elder Date: Sat Jun 12 09:37:32 2021 -0500 net: qualcomm: rmnet: return earlier for bad checksum In rmnet_map_ipv4_dl_csum_trailer(), if the sum of the trailer checksum and the pseudo checksum is non-zero, checksum validation has failed. We can return an error as soon as we know that. We can do the same thing in rmnet_map_ipv6_dl_csum_trailer(). Add some comments that explain where we're headed. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 9d0407bc4c9ca7a2378230dd86f8ce90a2b6ad09 Author: Alex Elder Date: Sat Jun 12 09:37:31 2021 -0500 net: qualcomm: rmnet: show that an intermediate sum is zero This patch simply demonstrates that a checksum value computed when verifying an offloaded transport checksum value for both IPv4 and IPv6 is (normally) 0. It can be squashed into the next patch. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit bbd45f10ed0e032b599973d56d5c221266cf2ccf Author: Alex Elder Date: Sat Jun 12 09:37:30 2021 -0500 net: qualcomm: rmnet: rearrange some NOTs With the ones' complement arithmetic, the sum of two negated values is equal to the negation of the sum of the two original values [1]. Rearrange the calculation ip6_payload_sum using this property. [1] https://tools.ietf.org/html/rfc1071 Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 0e6af897fcd9c154c06f239669401c64da52d84e Author: Alex Elder Date: Sat Jun 12 09:37:29 2021 -0500 net: qualcomm: rmnet: remove some local variables In rmnet_map_ipv4_dl_csum_trailer(), remove the "csum_temp" and "addend" local variables, and simplify a few lines of code. Remove the "csum_temp", "csum_value", "ip6_hdr_csum", and "addend" local variables in rmnet_map_ipv6_dl_csum_trailer(), and simplify a few lines of code there as well. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 73a378601a25dc6312530c33822fde3e177883d4 Merge: 73214a690c50a 13adac032982c Author: David S. Miller Date: Sat Jun 12 13:16:45 2021 -0700 Merge branch 'wwan-link-creation' Loic Poulain says: ==================== net: Add WWAN link creation support Most of the modern WWAN modems are able to support multiple network contexts, allowing user to connect to different APNs (e.g. Internet, MMS, etc...). These contexts are usually dynamically configured via a control channel such as MBIM, QMI or AT. Each context is naturally represented as a network link/device, and the muxing of these links is usually vendor/bus specific (QMAP, MBIM, intel iosm...). Today some drivers create a static collection of netdevs at init time, some relies on VLAN link for associating a context (cdc-mbim), some exposes sysfs attribute for dynamically creating additional netdev (qmi_wwan add_mux attr) or relies on vendor specific link type (rmnet) for performing the muxing... so there is no generic way to handle WWAN links, making user side integration painful. This series introduces a generic WWAN link management interface to the WWAN framework, allowing user to dynamically create and remove WWAN links through rtnetlink ('wwan' type). The underlying 'muxing' vendor implementation is completely abstracted. The idea is to use this interface for upcoming WWAN drivers (intel iosm) and to progressively integrate support into existing ones (qmi_wwan, cdc-mbim, mhi_net, etc...). v2: - Squashed Johannes and Sergey changes - Added IFLA_PARENT_DEV_BUS_NAME attribute - reworded commit message + introduce Sergey's comment v3: - Added basic new interface user to this series (mhi_net) - Moved IFLA_PARENT_DEV_NAME nla_policy introduction to right patch - Added cover letter - moved kdoc to .c file ==================== Signed-off-by: David S. Miller commit 13adac032982c61bb590669e8e87e51558917ca1 Author: Loic Poulain Date: Sat Jun 12 10:20:57 2021 +0200 net: mhi_net: Register wwan_ops for link creation Register wwan_ops for link management via wwan rtnetlink. This is only basic support for now, since we only support creating one single link (link-0), but is useful to validate new wwan rtnetlink interface. For backward compatibity support, we still register a default netdev at probe time, except if 'create_default_iface' module parameter is set to false. This has been tested with iproute2 and mbimcli: $ ip link add dev wwan0-0 parentdev-name wwan0 type wwan linkid 0 $ mbimcli -p -d /dev/wwan0p2MBIM --connect apn=free $ ip link set dev wwan0-0 up $ ip addr add dev wwan0 ${IP} $ ip route replace default via ${IP} $ ping 8.8.8.8 ... Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 88b710532e53de2466d1033fb1d5125aabf3215a Author: Johannes Berg Date: Sat Jun 12 10:20:56 2021 +0200 wwan: add interface creation support Add support to create (and destroy) interfaces via a new rtnetlink kind "wwan". The responsible driver has to use the new wwan_register_ops() to make this possible. Signed-off-by: Johannes Berg Signed-off-by: Sergey Ryazanov Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 00e77ed8e64d5f271c1f015c7153545980d48a76 Author: Johannes Berg Date: Sat Jun 12 10:20:55 2021 +0200 rtnetlink: add IFLA_PARENT_[DEV|DEV_BUS]_NAME In some cases, for example in the upcoming WWAN framework changes, there's no natural "parent netdev", so sometimes dummy netdevs are created or similar. IFLA_PARENT_DEV_NAME is a new attribute intended to contain a device (sysfs, struct device) name that can be used instead when creating a new netdev, if the rtnetlink family implements it. As suggested by Parav Pandit, we also introduce IFLA_PARENT_DEV_BUS_NAME attribute in order to uniquely identify a device on the system (with bus/name pair). ip-link(8) support for the generic parent device attributes will help us avoid code duplication, so no other link type will require a custom code to handle the parent name attribute. E.g. the WWAN interface creation command will looks like this: $ ip link add wwan0-1 parent-dev wwan0 type wwan channel-id 1 So, some future subsystem (or driver) FOO will have an interface creation command that looks like this: $ ip link add foo1-3 parent-dev foo1 type foo bar-id 3 baz-type Y Below is an example of dumping link info of a random device with these new attributes: $ ip --details link show wlp0s20f3 4: wlp0s20f3: mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000 ... parent_bus pci parent_dev 0000:00:14.3 Co-developed-by: Sergey Ryazanov Signed-off-by: Sergey Ryazanov Co-developed-by: Loic Poulain Signed-off-by: Loic Poulain Suggested-by: Sergey Ryazanov Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 8c713dc93ca9a423d6af8849c9254742a1070c37 Author: Johannes Berg Date: Sat Jun 12 10:20:54 2021 +0200 rtnetlink: add alloc() method to rtnl_link_ops In order to make rtnetlink ops that can create different kinds of devices, like what we want to add to the WWAN framework, the priv_size and setup parameters aren't quite sufficient. Make this easier to manage by allowing ops to allocate their own netdev via an @alloc method that gets the tb netlink data. Signed-off-by: Johannes Berg Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit 73214a690c50a134bd364e1a4430e0e7ac81a8d8 Author: Lijun Pan Date: Fri Jun 11 10:43:39 2021 -0500 ibmvnic: fix kernel build warnings in build_hdr_descs_arr Fix the following kernel build warnings: drivers/net/ethernet/ibm/ibmvnic.c:1516: warning: Function parameter or member 'skb' not described in 'build_hdr_descs_arr' drivers/net/ethernet/ibm/ibmvnic.c:1516: warning: Function parameter or member 'indir_arr' not described in 'build_hdr_descs_arr' drivers/net/ethernet/ibm/ibmvnic.c:1516: warning: Excess function parameter 'txbuff' description in 'build_hdr_descs_arr' Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 822ebc2cf50c4f223e859c35393b5cf0d96c56e1 Author: Lijun Pan Date: Fri Jun 11 10:35:37 2021 -0500 ibmvnic: fix kernel build warning drivers/net/ethernet/ibm/ibmvnic.c: In function ‘adapter_state_to_string’: drivers/net/ethernet/ibm/ibmvnic.c:855:2: warning: enumeration value ‘VNIC_DOWN’ not handled in switch [-Wswitch] 855 | switch (state) { | ^~~~~~ drivers/net/ethernet/ibm/ibmvnic.c: In function ‘reset_reason_to_string’: drivers/net/ethernet/ibm/ibmvnic.c:1958:2: warning: enumeration value ‘VNIC_RESET_PASSIVE_INIT’ not handled in switch [-Wswitch] 1958 | switch (reason) { | ^~~~~~ Reported-by: kernel test robot Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 02b0bb51a8da92e76ab69e49de1f289d413a564b Merge: bf75213f2480b 3c3ea630e87c3 Author: David S. Miller Date: Sat Jun 12 13:10:52 2021 -0700 Merge branch 'stmmac-intel-cleanups' Wong Vee Khee says: ==================== stmmac: intel: minor clean-up This patch series include two minor-cleanup patches: 1. Move all the hardcoded DEFINEs to dwmac-intel header file. 2. Fix the wrong kernel-doc on the intel_eth_pci_remove() function. Since the changes are minor, only basic sanity tests are done on a Intel TigerLake with Marvell88E2110 PHY:- - Link is up and able to perform ping. - phc2sys and ptp4l are running without errors. ==================== Signed-off-by: David S. Miller commit 3c3ea630e87c3ab9b91d1800b408dae6fc8ee1aa Author: Wong Vee Khee Date: Fri Jun 11 21:16:09 2021 +0800 stmmac: intel: fix wrong kernel-doc Kernel-doc for intel_eth_pci_remove is incorrect, pdev datatype is struct pci_dev. Changed it to the 'pci device pointer'. Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit fb9349c4163e387db3750a4f2c507c9111ec1ed2 Author: Wong Vee Khee Date: Fri Jun 11 21:16:08 2021 +0800 stmmac: intel: move definitions to dwmac-intel header file Currently some of the dwmac-intel definitions are in the header file, while some are in the driver source file. Cleaning this by moving all the definitions to the header file. Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit bf75213f2480b96f7f2d5dd10bdb463327f9a97a Merge: abf6420edb8d8 21e0c59edc09f Author: David S. Miller Date: Sat Jun 12 13:08:58 2021 -0700 Merge branch 'phy-25G-BASE-R' Steen Hegelund says: ==================== Add 25G BASE-R support This series add the 25G BASE-R mode to the set modes supported. This mode is used by the Sparx5 Switch for its 25G SerDes. ==================== Signed-off-by: David S. Miller commit 21e0c59edc09ff8d50722071ded66574b1cc4e99 Author: Steen Hegelund Date: Fri Jun 11 14:54:53 2021 +0200 net: phylink: Add 25G BASE-R support Add 25gbase-r interface type and speed to phylink. This is needed for the Sparx5 switch. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 452d2c6fbae2c11e3b0c17a3afe7b145db2196e7 Author: Steen Hegelund Date: Fri Jun 11 14:54:52 2021 +0200 net: sfp: add support for 25G BASE-R SFPs Add support for 25gbase-r modules. This is needed for the Sparx5 switch. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit a56c286865692ac12291afe4c66198915c6b08f9 Author: Steen Hegelund Date: Fri Jun 11 14:54:51 2021 +0200 net: phy: Add 25G BASE-R interface mode Add 25gbase-r phy interface mode Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 858252c9c3463abc3f7b13e42aae3b8845f0479d Author: Steen Hegelund Date: Fri Jun 11 14:54:50 2021 +0200 dt-bindings: net: Add 25G BASE-R phy interface Add 25gbase-r PHY interface mode. Signed-off-by: Steen Hegelund Signed-off-by: Bjarni Jonasson Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit abf6420edb8d8f3be031982e897f78c2a7dd56eb Merge: 1f1aa3fe0214a fbf179683655c Author: David S. Miller Date: Sat Jun 12 13:06:34 2021 -0700 Merge branch 's390-net-updates' Julian Wiedmann says: ==================== s390/iucv: updates 2021-06-11 please apply the following iucv patches to netdev's net-next tree. This cleans up a pattern of forward declarations in two iucv drivers, so that they stop causing compile warnings with gcc11. ==================== Signed-off-by: David S. Miller commit fbf179683655ca83b442d5f86e17ad25a462560e Author: Heiko Carstens Date: Fri Jun 11 09:45:02 2021 +0200 s390/netiuvc: get rid of forward declarations Move netiucv_handler to get rid of forward declarations and gcc11 compile warnings: drivers/s390/net/netiucv.c:518:65: warning: argument 2 of type ‘u8[16]’ {aka ‘unsigned char[16]’} with mismatched bound [-Warray-parameter=] 518 | static void netiucv_callback_connack(struct iucv_path *path, u8 ipuser[16]) | ~~~^~~~~~~~~~ drivers/s390/net/netiucv.c:122:58: note: previously declared as ‘u8 *’ {aka ‘unsigned char *’} 122 | static void netiucv_callback_connack(struct iucv_path *, u8 *); Signed-off-by: Heiko Carstens Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 87c272c618c7197b24fd3acf2d337315bd93b4fa Author: Julian Wiedmann Date: Fri Jun 11 09:45:01 2021 +0200 net/af_iucv: clean up some forward declarations The forward declarations for the iucv_handler callbacks are causing various compile warnings with gcc-11. Reshuffle the code to get rid of these prototypes. Reported-by: Sven Schnelle Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit a052b5118f13febac1bd901fe0b7a807b9d6b51c Author: Yang Yingliang Date: Mon May 17 13:10:20 2021 +0800 thermal/core: Correct function name thermal_zone_device_unregister() Fix the following make W=1 kernel build warning: drivers/thermal/thermal_core.c:1376: warning: expecting prototype for thermal_device_unregister(). Prototype was for thermal_zone_device_unregister() instead Signed-off-by: Yang Yingliang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210517051020.3463536-1-yangyingliang@huawei.com commit c6e66f5c21147567f0a09c1d0cbfc32fc894b083 Author: Rajeshwari Ravindra Kamble Date: Fri May 7 11:37:19 2021 +0530 dt-bindings: thermal: tsens: Add compatible string to TSENS binding for SC7280 Adding compatible string in TSENS dt-bindings for SC7280. Signed-off-by: Rajeshwari Ravindra Kamble Reviewed-by: Matthias Kaehlcke Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1620367641-23383-2-git-send-email-rkambl@codeaurora.org commit ba268647368844ed290e2f7b4da7a28cd12ee049 Author: Ben Widawsky Date: Thu Jun 10 22:11:13 2021 -0700 cxl/component_regs: Fix offset The CXL.cache and CXL.mem registers begin after the CXL.io registers which occupy the first 0x1000 bytes. The current code wasn't setting this up properly for future users of the component registers. It was correct for the probing code however. Cc: Jonathan Cameron Cc: Ira Weiny Fixes: 08422378c4ad ("cxl/pci: Add HDM decoder capabilities") Signed-off-by: Ben Widawsky Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210611051113.224328-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 6423035fd26c1ecb72f90ecab909e9afa36942b8 Author: Ben Widawsky Date: Fri Jun 11 12:01:11 2021 -0700 cxl/hdm: Fix decoder count calculation The decoder count in the HDM decoder capability structure is an encoded field. As defined in the spec: Decoder Count: Reports the number of memory address decoders implemented by the component. 0 – 1 Decoder 1 – 2 Decoders 2 – 4 Decoders 3 – 6 Decoders 4 – 8 Decoders 5 – 10 Decoders All other values are reserved Nothing is actually fixed by this as nothing actually used this mapping yet. Cc: Ira Weiny Fixes: 08422378c4ad ("cxl/pci: Add HDM decoder capabilities") Acked-by: Jonathan Cameron Signed-off-by: Ben Widawsky Link: https://lore.kernel.org/r/20210611190111.121295-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit e60cb06cde7e57d73900ed9be448e074ce04707a Merge: 37c2a42930e16 8efe01b4386ab Author: Olof Johansson Date: Sat Jun 12 08:55:15 2021 -0700 Merge tag 'v5.13-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Fix PCIe address ranges that are affected by recent PCI changes. There are 3 additional patches pending that handle the backward compatiblity inside the PCI subsystem, but the address ranges should be fixed anyway. * tag 'v5.13-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Update RK3399 PCI host bridge window to 32-bit address memory Link: https://lore.kernel.org/r/3405741.0S5aU1g85B@diego Signed-off-by: Olof Johansson commit 83107b24c351391dd0a492fc9940d05c14cab0d0 Author: Corentin Labbe Date: Sat Jun 12 00:05:01 2021 +0200 ARM: dts: gemini: add crypto node The SL3516 SoC has a crypto offloader IP. This patch adds it on the gemini SoC Device-tree. Link: https://lore.kernel.org/r/20210611220501.684997-1-linus.walleij@linaro.org Signed-off-by: Corentin Labbe Cc: Herbert Xu Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit b0545d11a975a1cd7fb83ca7aa5550a7d1205ddd Merge: 9495e151f1c7c d42b3e045a34e Author: Olof Johansson Date: Sat Jun 12 08:54:28 2021 -0700 Merge tag 'sunxi-dt-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of patches to improve the Allwinner SoCs support, mainly: - I2S Support for the V3 - Audio Codec Support for the V3s - DMA support for the V3s - PWM support for the V3s - Support for Bluetooth Audio on the pinephone - Add A10-like timers to the A64 and R40 - New boards: Forlinx OKA40i-C, Forlinx OKA40i-C, NanoPi R1S H5 * tag 'sunxi-dt-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (29 commits) ARM: dts: sun8i: v3s: enable emac for zero Dock arm64: dts: allwinner: pinephone: Set audio card name ARM: dts: sun8i: r40: Add timer node ARM: dts: sun8i: V3: add I2S interface to V3 dts dt-bindings: sound: sun4i-i2s: add Allwinner V3 I2S compatible ARM: dts: sun8i: V3: add codec analog frontend to V3 dts ASoC: dt-bindings: sun8i-a23-codec-analog: add compatible for Allwinner V3 ARM: dts: sun8i: v3s: add analog codec and frontend to v3s dts ARM: dts: sun8i: v3s: add DMA properties to peripherals supporting DMA ARM: dts: sun8i: v3s: add DMA controller to v3s dts ARM: dts: sun8i: v3s: add pwm controller to v3s dts dt-bindings: pwm: allwinner: add v3s pwm compatible arm64: dts: allwinner: h5: Add NanoPi R1S H5 support dt-bindings: arm: Add NanoPi R1S H5 arm64: dts: allwinner: pinephone: Add support for Bluetooth audio arm64: dts: allwinner: a64: Allow multiple DAI links arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 arm64: dts: allwinner: a64: Allow using multiple codec DAIs ARM: dts: sun8i-a33: Allow using multiple codec DAIs ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells ... Link: https://lore.kernel.org/r/96cc77ec-139d-4685-8a66-a60964cf39fd.lettre@localhost Signed-off-by: Olof Johansson commit 2f80e8b45cda3d3bbeb2563525f676f8b1bbf0f0 Merge: 05a3a767667ef cbccad664927e Author: Olof Johansson Date: Sat Jun 12 08:54:01 2021 -0700 Merge tag 'sunxi-core-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/soc One patch to select one of our timer in the arm64 Kconfig option. * tag 'sunxi-core-for-5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: sunxi: Build the sun4i timer driver Link: https://lore.kernel.org/r/bf3431f6-2196-425c-9b43-0bf4de0b6d30.lettre@localhost Signed-off-by: Olof Johansson commit 37c2a42930e16d4e8c3b0a1bb67d12aa6f083e56 Merge: b9c112f2c223c bd5431b2f9b30 Author: Olof Johansson Date: Sat Jun 12 08:53:38 2021 -0700 Merge tag 'sunxi-fixes-for-5.13-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Two patches to fix the GMAC PHY mode on some boards. * tag 'sunxi-fixes-for-5.13-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: a64-sopine-baseboard: change RGMII mode to TXID ARM: dts: sun8i: h3: orangepi-plus: Fix ethernet phy-mode Link: https://lore.kernel.org/r/ad7ba352-315c-4201-b922-4bf914a00d98.lettre@localhost Signed-off-by: Olof Johansson commit 361aa4be7095437a8a7e7e77a008f805b1025d76 Merge: 1216037a55893 d3d0e1e857110 Author: Olof Johansson Date: Sat Jun 12 08:53:04 2021 -0700 Merge tag 'memory-controller-drv-pl353-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.14 - PL353 Bigger work around ARM Primecell PL35x SMC memory controller driver by Miquel Raynal built on previous series from Naga Sureshkumar Relli. This includes bindings cleanup and correction, converting these to dtschema and several cleanyps in pl353-smc driver. * tag 'memory-controller-drv-pl353-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: dt-binding: memory: pl353-smc: Convert to yaml MAINTAINERS: Add PL353 SMC entry memory: pl353-smc: Declare variables following a reverse christmas tree order memory: pl353-smc: Avoid useless acronyms in descriptions memory: pl353-smc: Let lower level controller drivers handle inits memory: pl353-smc: Rename goto labels memory: pl353-smc: Fix style dt-binding: memory: pl353-smc: Fix the NAND controller node in the example dt-binding: memory: pl353-smc: Drop unsupported nodes from the example dt-binding: memory: pl353-smc: Fix the example syntax and style dt-binding: memory: pl353-smc: Describe the child reg property dt-binding: memory: pl353-smc: Drop the partitioning section dt-binding: memory: pl353-smc: Document the range property dt-binding: memory: pl353-smc: Rephrase the binding Link: https://lore.kernel.org/r/20210611140659.61980-2-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit 1216037a5589329175c399f946cc5230dec3fa6f Merge: 97a5666768741 729a611e6f53d Author: Olof Johansson Date: Sat Jun 12 08:52:34 2021 -0700 Merge tag 'memory-controller-drv-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.14 Several small fixes and cleanups for stm32, atmel, pl353, renesas-rpc, TI emif and fsl_ifc. * tag 'memory-controller-drv-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: emif: remove unused frequency and voltage notifiers memory: fsl_ifc: fix leak of private memory on probe failure memory: fsl_ifc: fix leak of IO mapping on probe failure MAINTAINERS: memory: cover also header file memory: renesas-rpc-if: correct whitespace memory: pl353: Fix error return code in pl353_smc_probe() memory: atmel-ebi: add missing of_node_put for loop iteration memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration Link: https://lore.kernel.org/r/20210611140659.61980-1-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit ad9f81281ebe840a6cf55302fc058d3e3b7399ff Merge: 65a40301234ea b249d97825ff4 Author: Olof Johansson Date: Sat Jun 12 08:49:28 2021 -0700 Merge tag 'at91-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.14: - Add the use of tickless and HR times to ARM9 defconfig * tag 'at91-defconfig-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91_dt_defconfig: configs for sam9x60 Link: https://lore.kernel.org/r/20210611125659.25590-1-nicolas.ferre@microchip.com Signed-off-by: Olof Johansson commit 9495e151f1c7c1a2711da5fa0e11b94112240e1d Merge: 796f0ae8e74a5 92e669017ff16 Author: Olof Johansson Date: Sat Jun 12 08:49:10 2021 -0700 Merge tag 'at91-dt-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 dt for 5.14: - A fix for sama5d4 gpio mux - A trivial fix for DT documentation * tag 'at91-dt-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: dt-bindings: i2c: at91: fix example for scl-gpios ARM: dts: at91: sama5d4: fix pinctrl muxing Link: https://lore.kernel.org/r/20210611123446.20510-1-nicolas.ferre@microchip.com Signed-off-by: Olof Johansson commit 65a40301234ea88076fceaf64fadafb606868552 Merge: f1b1d76afdc52 6c2cfc947607d Author: Olof Johansson Date: Sat Jun 12 08:48:20 2021 -0700 Merge tag 'v5.13-next-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/defconfig - Delete MTK_PMIC_WRAP added twice. - Set MMC_MTK as built-in to be able to boot from MMC device. * tag 'v5.13-next-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: defconfig: Allow Mediatek boards to boot from the mmc arm64: defconfig: Do not override the MTK_PMIC_WRAP symbol Link: https://lore.kernel.org/r/ad6f7f4e-7e4d-08b9-8781-71bd78444929@gmail.com Signed-off-by: Olof Johansson commit 796f0ae8e74a5be48812000f0d9a9aaa04f6bb71 Merge: a3c52f08ab8f6 a8168cebf1bca Author: Olof Johansson Date: Sat Jun 12 08:47:54 2021 -0700 Merge tag 'v5.13-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt8173: - split hardware encoder block into two devices. mt8167: - add pm domains, multi-media system (mmsys), SMI, local arbiter (larb) and IOMMU nodes. mt8183: - Add new chromebooks: HP Chromebook 11a, Acer Chromebook 311, HP Chromebook x360 11MK G3 EE, Lenovo IdeaPad Flex 3. - add power domain to SMI common node. - add power supplies for EEPROM node. * tag 'v5.13-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (21 commits) arm64: dts: mt8183: Add node for the Mali GPU arm64: dts: mt8183-kukui: Add tboard thermal zones arm64: dts: mt8183: add cbas node under cros_ec arm64: dts: mt8183: add supply name for eeprom arm64: dts: mt8183: remove syscon from smi_common node arm64: dts: mt8183: Add kukui-jacuzzi-fennel board arm64: dts: mt8183: Add kukui-jacuzzi-kenzo board arm64: dts: mt8183: Add kukui-jacuzzi-burnet board arm64: dts: mt8183: Add kukui-jacuzzi-willow board arm64: dts: mt8183: Add kukui-jacuzzi-kappa board dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-fennel dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-kenzo dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-burnet dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-willow dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-kappa arm64: dts: mediatek: mt8167: add iommu node arm64: dts: mediatek: mt8167: add larb nodes arm64: dts: mediatek: mt8167: add smi_common node arm64: dts: mediatek: mt8167: add mmsys node arm64: dts: mediatek: mt8167: add power domains ... Link: https://lore.kernel.org/r/117d5eb5-bc99-70bb-a1a9-d7141fe96527@gmail.com Signed-off-by: Olof Johansson commit 97a5666768741d9230f303ddcd93053e661a4b31 Merge: ec7f5cff6effc e88edc977b00c Author: Olof Johansson Date: Sat Jun 12 08:47:18 2021 -0700 Merge tag 'v5.13-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers devapc: - add missing MODULE_DEVICE_TABLE to fix modalias mkt-pm-domains: - register smi node as regmap and not as syscon - prepare-enable and unprepare-disable dependent clocks pwrap: - add support for MT8195 * tag 'v5.13-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: pwrap: add pwrap driver for MT8195 SoC dt-bindings: mediatek: add compatible for MT8195 pwrap soc: mtk-pm-domains: Fix the clock prepared issue soc: mtk-pm-domains: do not register smi node as syscon soc: mediatek: add missing MODULE_DEVICE_TABLE Link: https://lore.kernel.org/r/479ec9ad-95d3-ce91-8243-63596c4c6676@gmail.com Signed-off-by: Olof Johansson commit a3c52f08ab8f6f833bede1dc7499b114273050fd Merge: d4dd4699366cd 972f67be8929a Author: Olof Johansson Date: Sat Jun 12 08:46:26 2021 -0700 Merge tag 'renesas-dt-bindings-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.14 - Document support for the new RZ/G2L, RZ/G2LC, and RZ/G2UL SoCs, - Document support for the new RZ/G2L SMARC EVK board. * tag 'renesas-dt-bindings-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: power: renesas,rzg2l-sysc: Add DT binding documentation for SYSC controller dt-bindings: arm: renesas: Document SMARC EVK dt-bindings: arm: renesas: Document Renesas RZ/G2{L,LC} SoC variants dt-bindings: arm: renesas: Document Renesas RZ/G2UL SoC Link: https://lore.kernel.org/r/cover.1623403802.git.geert+renesas@glider.be Signed-off-by: Olof Johansson commit ec7f5cff6effcc580a85f91001b8ffbeb21ed81e Merge: 959cd8f125bda 187cd57db0935 Author: Olof Johansson Date: Sat Jun 12 08:45:57 2021 -0700 Merge tag 'renesas-drivers-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.14 - Initial support for the new RZ/G2L SoC variants. * tag 'renesas-drivers-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Add support to read LSI DEVID register of RZ/G2{L,LC} SoC's soc: renesas: Add ARCH_R9A07G044 for the new RZ/G2L SoC's Link: https://lore.kernel.org/r/cover.1623403800.git.geert+renesas@glider.be Signed-off-by: Olof Johansson commit d4dd4699366cdc4978b323fbc8cd2d4045e54bb6 Merge: 9bfa3829358f2 42bbd00391090 Author: Olof Johansson Date: Sat Jun 12 08:45:36 2021 -0700 Merge tag 'renesas-arm-dt-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.14 (take two) - External interrupt (INTC-EX) support for the R-Car M3-W+ SoC, - Initial support for the new RZ/G2L SoC on the RZ/G2L SMARC EVK board, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r9a07g044: Add SYSC node arm64: dts: renesas: Add initial device tree for RZ/G2L SMARC EVK arm64: dts: renesas: Add initial DTSI for RZ/G2{L,LC} SoC's dt-bindings: clock: Add r9a07g044 CPG Clock Definitions arm64: dts: renesas: r8a779a0: Drop power-domains property from GIC node arm64: dts: renesas: r8a77961: Add INTC-EX device node ARM: dts: silk: Configure pull-up for SOFT_SW GPIO keys ARM: dts: gose: Configure pull-up for SOFT_SW GPIO keys ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 GPIO keys ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys arm64: dts: renesas: r8a7796[01]: Fix OPP table entry voltages arm64: dts: renesas: Add missing opp-suspend properties Link: https://lore.kernel.org/r/cover.1623403796.git.geert+renesas@glider.be Signed-off-by: Olof Johansson commit f1b1d76afdc523b94d9ff5801f41151505848832 Merge: c5f05415b9d95 27a79a723d48d Author: Olof Johansson Date: Sat Jun 12 08:43:36 2021 -0700 Merge tag 'renesas-arm-defconfig-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.14 (take two) - Enable support for the new RZ/G2L SoC variants in the arm64 defconfig. * tag 'renesas-arm-defconfig-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable ARCH_R9A07G044 Link: https://lore.kernel.org/r/cover.1623403795.git.geert+renesas@glider.be Signed-off-by: Olof Johansson commit 9bfa3829358f2f91b7776cedccd85a70c320f728 Merge: fb755b075d97d 70010556b158a Author: Olof Johansson Date: Sat Jun 12 08:42:54 2021 -0700 Merge tag 'juno-fix-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt ARMv8 Juno fix for v5.14 Just a single fix to use standard and generic nodes names for SCMI power domain controller and clock controller devicetree nodes. * tag 'juno-fix-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Update SCPI nodes as per the YAML schema Link: https://lore.kernel.org/r/20210611075805.2813712-1-sudeep.holla@arm.com Signed-off-by: Olof Johansson commit 959cd8f125bdafc0af197252554b662b5e18967b Merge: adbb411b97d4b 61832b35b4d95 Author: Olof Johansson Date: Sat Jun 12 08:42:27 2021 -0700 Merge tag 'scmi-updates-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI updates for v5.14 - Support for SCMI clocks from the SCMI power domains - Addition of checks for correct compatibles for shmem devicetree nodes that were found missing in the process of YAML schema conversion - Kconfig and associated build fix found when optee transport are being worked on - Couple of fixes and cleanups found as with work-in-progress virtio transport support The new transports(optee and virtio) themselves are still being worked on with ongoing reviews, they are not part of this yet * tag 'scmi-updates-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Avoid multiple initialisations of hdr->protocol_id firmware: arm_scmi: Move reinit_completion from scmi_xfer_get to do_xfer firmware: arm_scmi: Add delayed response status check firmware: arm_scmi: Add compatibility checks for shmem node firmware: arm_scpi: Add compatibility checks for shmem node firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected firmware: arm_scmi: Reset Rx buffer to max size during async commands firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig firmware: arm_scmi: Add clock management to the SCMI power domain Link: https://lore.kernel.org/r/20210611075722.2813550-1-sudeep.holla@arm.com Signed-off-by: Olof Johansson commit fb755b075d97d685d8f4174cd31b6b751a4bfc6b Merge: 93d84763c1b35 e409c1e1d5cb1 Author: Olof Johansson Date: Sat Jun 12 08:41:04 2021 -0700 Merge tag 'ux500-dts-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Some Ux500 DTS updates for v5.14: - Fix interrupt cells, GPIO controller node names in accordance with new YAML schemas. - Add proper compatible strings for Broadcomm Wifi and BT. - Fix upp and add some mount matrices for accelerometers so e.g. UI:s work as they should. - Drop the DRDY pin assignment for a non-existing pin on a magnetometer. * tag 'ux500-dts-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: ux500: Fix orientation of Janice accelerometer ARM: dts: href: Mount matrices for TVK R2 ARM: dts: ux500: Fix some compatible strings ARM: dts: ux500: Drop drdy pin assignment from magnetometer ARM: dts: ux500: Fix orientation of accelerometer ARM: dts: ux500: Rename gpio-controller node ARM: dts: ux500: Fix interrupt cells Link: https://lore.kernel.org/r/CACRpkdYh9kZJU6PAxghPRGBco_61wRZgUnTZr_3qvySPCo5rBw@mail.gmail.com Signed-off-by: Olof Johansson commit adbb411b97d4b72ef9be48ac9a21823ed43cabfa Merge: bcac3fb57a440 c1f512182c54d Author: Olof Johansson Date: Sat Jun 12 08:40:44 2021 -0700 Merge tag 'arm-soc/for-5.14/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom SoCs drivers changes for 5.14, please pull the following: - Jiapeng removes an unused variable in the Broadcom STB BIU driver causing an unused warning. * tag 'arm-soc/for-5.14/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: brcmstb: remove unused variable 'brcmstb_machine_match' Link: https://lore.kernel.org/r/20210610194836.309869-3-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 93d84763c1b35dda0395c86cbe3df19e2eff09a7 Merge: 010bf7346f13e cd49f71cff8de Author: Olof Johansson Date: Sat Jun 12 08:40:27 2021 -0700 Merge tag 'arm-soc/for-5.14/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SoCs changes for 5.14, please pull the following: - Zhen fixes the Broadcom stingray serial node unit names to fix a DT binding warning * tag 'arm-soc/for-5.14/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: normalize the node name of the UART devices Link: https://lore.kernel.org/r/20210610194836.309869-2-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 010bf7346f13e246e1a0a0e9dba2c35692197ba2 Merge: 52b54b06a49bc 3a3907c4cb66e Author: Olof Johansson Date: Sat Jun 12 08:40:07 2021 -0700 Merge tag 'arm-soc/for-5.14/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 5.14, please pull the following: - Rafal updates the BCM5301x, HR2, BCM63xx, BCM5301x, NSP and Cygnus DTS files to resolve a number of DT binding check warnings pertaining to NAND, pinmux, clocks, SPI - Stefan provides a fix for an increase in the DWC2 controller's RX FIFO causing regressions on the Raspberry Pi 4B - Mateusz adds a BCM2711 specific VEC compatible string to allow keying off that variant properly - Stefan adds support for the Raspberry Pi 400 by doing some DTS/DTSI re-organization work and finally adding the DTS file proper * tag 'arm-soc/for-5.14/devicetree' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: Add reference to RPi 400 ARM: dts: Add Raspberry Pi 400 support ARM: dts: bcm283x: Fix up GPIO LED node names dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema ARM: dts: Move BCM2711 RPi specific into separate dtsi ARM: dts: bcm283x: Fix up MMC node names ARM: boot: dts: bcm2711: Add BCM2711 VEC compatible Revert "ARM: dts: bcm283x: increase dwc2's RX FIFO size" ARM: dts: BCM5301X: Fixup SPI binding dt-bindings: clock: brcm, iproc-clocks: convert to the json-schema ARM: dts: BCM5301X: Fix pinmux subnodes names ARM: dts: Hurricane 2: Fix NAND nodes names ARM: dts: BCM63xx: Fix NAND nodes names ARM: NSP: dts: fix NAND nodes names ARM: Cygnus: dts: fix NAND nodes names ARM: brcmstb: dts: fix NAND nodes names ARM: dts: BCM5301X: Fix NAND nodes names Link: https://lore.kernel.org/r/20210610194836.309869-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 52b54b06a49bc19bbfa77c1c6b9dfa29c6b9228c Merge: 523ad4e3490f4 4bf4abe190892 Author: Olof Johansson Date: Sat Jun 12 08:39:40 2021 -0700 Merge tag 'stm32-dt-for-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.14, round 1 Highlights: ----------- MCU part: - Fixes for Yaml verifications MPU part: - Configure qspi's mdma transfer to block for stm32mp151 - ST boards: - Fixes for yaml verifications - DH boards: - Fixes for yaml verifications - Rework of LAN8710i on DHCOM SoM to fit with requested reset sequence. - Odyssey boards: - fix Sd card detectection (gpio line updated) - fix eMMC VQMMC suuply (use vdd instead of v3v3) * tag 'stm32-dt-for-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: fix stpmic node for stm32mp1 boards ARM: dts: stm32: Rename spi-flash/mx66l51235l@N to flash@N on DHCOM SoM ARM: dts: stm32: Rename eth@N to ethernet@N on DHCOM SoM ARM: dts: stm32: Drop unused linux,wakeup from touchscreen node on DHCOM SoM ARM: dts: stm32: fix the Odyssey SoM eMMC VQMMC supply ARM: dts: stm32: add a new DCMI pins group on stm32mp15 ARM: dts: stm32: fix ltdc pinctrl on microdev2.0-of7 dt-bindings: net: document ptp_ref clk in dwmac ARM: dts: stm32: move stmmac axi config in ethernet node on stm32mp15 ARM: dts: stm32: fix i2c node name on stm32f746 to prevent warnings ARM: dts: stm32: update pinctrl node name on STM32 MCU to prevent warnings ARM: dts: stm32: fix timer nodes on STM32 MCU to prevent warnings ARM: dts: stm32: fix RCC node name on stm32f429 MCU ARM: dts: stm32: fix gpio-keys node on STM32 MCU boards ARM: dts: stm32: fix stm32mp157c-odyssey card detect pin ARM: dts: stm32: Configure qspi's mdma transfer to block for stm32mp151 ARM: dts: stm32: Fix touchscreen node on dhcom-pdk2 ARM: dts: stm32: Remove extra size-cells on dhcom-pdk2 ARM: dts: stm32: Rework LAN8710Ai PHY reset on DHCOM SoM Link: https://lore.kernel.org/r/e4bfb255-63fb-74a8-d591-eb09821c93ee@foss.st.com Signed-off-by: Olof Johansson commit 05a3a767667ef5bfa9ac99b76b57be504f01a7a9 Merge: 8639a12370bab a6419e53c7793 Author: Olof Johansson Date: Sat Jun 12 08:39:06 2021 -0700 Merge tag 'samsung-soc-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.14 1. Fix: add missing of_node_put. 2. Extend Samsung maintainers entry to cover Samsung PWM driver files, because they do not have a dedicated entry. 3. Minor cleanups. * tag 'samsung-soc-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: MAINTAINERS: Include Samsung PWM in Samsung SoC entry soc: samsung: pmu: drop EXYNOS_CENTRAL_SEQ_OPTION defines ARM: exynos: add missing of_node_put for loop iteration ARM: s3c: Remove unnecessary break in RX1950 Link: https://lore.kernel.org/r/20210610074055.12474-2-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit 523ad4e3490f49a5e0c79a9952947161a38e0eff Merge: 131dc51df2afa 135adbbee4c66 Author: Olof Johansson Date: Sat Jun 12 08:38:10 2021 -0700 Merge tag 'samsung-dt-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.14 1. Several cleanups and alignment with dtschema. This includes removal of unused properties and fixing LED brightness property. 2. Enable PMIC RTC interrupt as a wakeup source (intended to wakeup for example from Suspend to RAM where the PMIC RTC's power is still supplied). 3. Disable unused/not implemented camera on GT-I9100. * tag 'samsung-dt-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Disable unused camera input for I9100 ARM: dts: exynos: enable PMIC wakeup from suspend on Odroid XU3/XU4 family ARM: dts: exynos: enable PMIC wakeup from suspend on SMDK5420 ARM: dts: exynos: enable PMIC wakeup from suspend on Arndale Octa ARM: dts: exynos: enable PMIC wakeup from suspend on P4 Note ARM: dts: exynos: enable PMIC wakeup from suspend on Odroid X/U3 ARM: dts: exynos: enable PMIC wakeup from suspend on Midas ARM: dts: exynos: enable PMIC wakeup from suspend on Odroid XU ARM: dts: exynos: enable PMIC wakeup from suspend on Arndale ARM: dts: exynos: enable PMIC wakeup from suspend on Origen4412 ARM: dts: exynos: enable PMIC wakeup from suspend on Itop Core ARM: dts: s5pv210: remove unused Atmel touchscreen properties in Goni ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4 ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1 ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3 ARM: dts: exynos: replace legacy MMS114 touchscreen x/y properties in GT-N7100 ARM: dts: exynos: align Broadcom WiFi with dtschema Link: https://lore.kernel.org/r/20210610074055.12474-1-krzysztof.kozlowski@canonical.com Signed-off-by: Olof Johansson commit c5f05415b9d95f6cec15ed7736df3f34c6fd0415 Author: Joel Stanley Date: Thu Jun 10 14:23:38 2021 +0930 ARM: config: aspeed: Add DEBUG_FS and EXT4 DEBUG_FS was lost way back in v5.5, and EXT4 is used by ast2600 systems that have MMC. Link: https://lore.kernel.org/r/20210610045338.99847-1-joel@jms.id.au Fixes: 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210603040906.125109-1-joel@jms.id.au Signed-off-by: Joel Stanley Signed-off-by: Olof Johansson commit 131dc51df2afa4e1b760d5600a01f04792ecda6d Merge: e6f600e72edc7 dd87684c7c9b8 Author: Olof Johansson Date: Sat Jun 12 08:35:45 2021 -0700 Merge tag 'aspeed-5.14-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/dt ASPEED device tree updates for 5.14 - IBM Rainier and Everest LED descriptions. These systems have a large number of LEDs attached via expanders. - Ampere Mt Jade updates, as OpenBMC bringup continues for this machine. - Updated 64MB flash layout for systems using OpenBMC on NOR root file systems. - Support for HS200 MMC on AST2600 EVB. This is only supported from A2, so a new device tree is added to support A0 and A1. - Update all command lines for early serial output. * tag 'aspeed-5.14-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: aspeed: everest: Add pcie cable card indicator leds ARM: dts: aspeed: everest: Add vrm and other indicator leds ARM: dts: aspeed: everest: Add dimm indicator leds ARM: dts: aspeed: everest: Add pcie slot indicator leds ARM: dts: aspeed: everest: Add nvme and fan indicator leds ARM: dts: aspeed: everest: Add system level indicator leds ARM: dts: aspeed-g5: Add SCU phandle to GFX node ARM: dts: aspeed: Everest: Add directly controlled LEDs ARM: dts: aspeed: Rainier 4U: Remove fan updates ARM: dts: aspeed: Everest: Fix cable card PCA chips ARM: dts: aspeed: Grow u-boot partition 64MiB OpenBMC flash layout ARM: dts: aspeed: mtjade: switch to 64MB flash layout ARM: dts: aspeed: mtjade: Add PSU support ARM: dts: aspeed: mtjade: Enable OCP card support via NC-SI ARM: dts: aspeed: Set earlycon boot argument ARM: dts: aspeed-g6: Add pinctrl settings ARM: dts: aspeed: ast2600evb: Add dts file for A1 and A0 ARM: dts: aspeed: ast2600evb: Add phase correction for emmc controller. ARM: dts: aspeed: ast2600evb: Add sdhci node and gpio regulator for A2 evb. Link: https://lore.kernel.org/r/CACPK8XduV9F=piu1qh56g+YNOZOBYTW7b2Y=XVYafpYDwWmDYA@mail.gmail.com Signed-off-by: Olof Johansson commit e6f600e72edc723e9c34df09d6efea6334181ec0 Author: Linus Walleij Date: Sat Jun 5 18:10:07 2021 +0200 ARM: dts: ixp4xx: Add crypto engine Add the crypto engine as a child of the NPE. Link: https://lore.kernel.org/r/20210605161007.3397216-1-linus.walleij@linaro.org Cc: Corentin Labbe Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit c7259477fec91c32b40fb3291adb7f0c017743f5 Merge: 2d08a11e2d262 a270a2b24de5b Author: Olof Johansson Date: Sat Jun 12 08:34:12 2021 -0700 Merge tag 'amlogic-arm64-dt-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt Amlogic ARM64 DT changed for v5.14: - set 128bytes FIFO size on uart A - add Banana PI BPI-M5 board dts & bindings - meson-sm1: add toacodec node to use internal audio DAC - enable hdmi audio loopback on VIM3 board * tag 'amlogic-arm64-dt-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: meson: set 128bytes FIFO size on uart A arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts dt-bindings: arm: amlogic: add Banana PI M5 bindings arm64: dts: meson-sm1: add toacodec node arm64: dts: meson: vim3: enable hdmi audio loopback Link: https://lore.kernel.org/r/bb207cf8-fc7a-3121-eea8-56618b5952aa@baylibre.com Signed-off-by: Olof Johansson commit bcac3fb57a440b1345286a8565debcde1a92afbb Merge: 6d9b10fd95924 e93e6bef7930c Author: Olof Johansson Date: Sat Jun 12 08:33:45 2021 -0700 Merge tag 'amlogic-drivers-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/drivers Amlogic Drivers updates for v5.14: - soc: amlogic: meson-ee-pwrc: Rename "get_power" to "is_powered_off" * tag 'amlogic-drivers-for-v5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: soc: amlogic: meson-ee-pwrc: Rename "get_power" to "is_powered_off" Link: https://lore.kernel.org/r/58283600-2d9a-c259-4d80-6915e6e6c79e@baylibre.com Signed-off-by: Olof Johansson commit 2d08a11e2d262ba30eb94d72ac902a9e7cb64034 Merge: 09159b8025e0d 9e7f5ee113739 Author: Olof Johansson Date: Sat Jun 12 08:33:21 2021 -0700 Merge tag 'omap-for-v5.14/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for v5.14 merge window Mostly just clean-up for device tree binding checks with few other clean-up patches: - Drop ov5640 sensor for dra76-evm, it's just one of the optional additional sensors and makes hard to use any of the other options, TI is using the devicetree overlay snippets for these - Group the phandles in osd3358-sm-red to make the files more readable - A series of gpio clean-up patches to follow the binding documentation - Move ti,no-reset related properties to the target module level, the ti-sysc driver handles them also in the child but they really belong to the target module - Drop the unnecessary uart compatible entries to make the binding check to work - Mailbox related updates to make the binding check to work * tag 'omap-for-v5.14/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: OMAP2+: Replace underscores in sub-mailbox node names ARM: dts: AM33xx/AM43xx: Rename wkup_m3 sub-mailbox node ARM: dts: OMAP2/OMAP3: Rename processor sub-mailbox nodes ARM: dts: OMAP2420: Drop interrupt-names from mailbox node ARM: dts: am437x-l4: Drop ti,omap2-uart entry from UART nodes ARM: dts: dra7-l4: Drop ti,omap4-uart entry from UART nodes ARM: dts: am335x: fix ti,no-reset-on-init flag for gpios ARM: dts: am437x-gp-evm: fix ti,no-reset-on-init flag for gpios ARM: dts: am57xx-cl-som-am57x: fix ti,no-reset-on-init flag for gpios ARM: dts: dra7x-evm: Align GPIO hog names with dt-schema ARM: dts: omap5-board-common: align gpio hog names with dt-schema ARM: dts: omap3: align gpio hog names with dt-schema ARM: dts: am437x: align gpio hog names with dt-schema ARM: dts: am335x: align GPIO hog names with dt-schema ARM: dts: osd3358-sm-red: group in the same phandle all its properties ARM: dts: dra76-evm: remove ov5640 Link: https://lore.kernel.org/r/pull-1622618286-677305@atomide.com-3 Signed-off-by: Olof Johansson commit 3082a78502f6cc9e599f01e93c9d0f13f33c21e4 Merge: 3f43257e3c06b e7d7b033091af Author: Olof Johansson Date: Sat Jun 12 08:32:56 2021 -0700 Merge tag 'omap-for-v5.14/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/defconfig Defconfig changes for omaps for v5.14 merge window Defconfig changes for omap2plus_defconfig to add WL1251 and LP5523 as loadable modules for n900. * tag 'omap-for-v5.14/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: Add LP5523 LED driver ARM: omap2plus_defconfig: Add WL1251 and WEXT modules Link: https://lore.kernel.org/r/pull-1622618286-677305@atomide.com-2 Signed-off-by: Olof Johansson commit 8639a12370babf10abab002123a1d3cd87552c15 Merge: c4681547bcce7 d61f263495d75 Author: Olof Johansson Date: Sat Jun 12 08:32:34 2021 -0700 Merge tag 'omap-for-v5.14/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Clean up changes for omaps for v5.14 merge window With the recent changes to drop legacy platform data for am3/4, omap4/5, and dra7, we can drop the related unused code. There is also a patch to remove leading spaces from the Kconfig file. * tag 'omap-for-v5.14/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: remove omap2_set_globals_control() ARM: OMAP2+: CM: remove omap2_set_globals_cm() ARM: OMAP1: Remove leading spaces in Kconfig MAINTAINERS: remove obsolete OMAP HWMOD DATA FOR OMAP4-BASED DEVICES Link: https://lore.kernel.org/r/pull-1622618286-677305@atomide.com Signed-off-by: Olof Johansson commit 09159b8025e0d64be4ec6418ed01eaa54f1ef234 Merge: b7c8bde730a8d 1b32fce42bff8 Author: Olof Johansson Date: Sat Jun 12 08:26:56 2021 -0700 Merge tag 'renesas-arm-dt-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.14 - GPIO extender support for the Falcon development board, - Switches support for the ALT development board, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: alt: Add SW2 as GPIO keys ARM: dts: renesas: Move enable-method to CPU nodes arm64: dts: renesas: beacon: Fix USB ref clock references arm64: dts: renesas: beacon: Fix USB extal reference ARM: dts: rcar-gen1: Correct internal delay for i2c[123] arm64: dts: renesas: eagle: Add x1 clock ARM: dts: koelsch: Rename sw2 to keyboard ARM: dts: r8a7779, marzen: Fix DU clock names arm64: dts: renesas: v3msk: Fix memory size arm64: dts: renesas: condor: Switch eMMC bus to 1V8 arm64: dts: renesas: falcon-csi-dsi: Add GPIO extenders arm64: dts: renesas: beacon kit: Setup AVB refclk arm64: dts: renesas: Add fck to etheravb-rcar-gen3 clock-names list ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list Link: https://lore.kernel.org/r/cover.1622188835.git.geert+renesas@glider.be Signed-off-by: Olof Johansson commit 3f43257e3c06ba185055279745f88d4c99801664 Merge: 39f9610ccae93 9558487e7d976 Author: Olof Johansson Date: Sat Jun 12 08:25:57 2021 -0700 Merge tag 'renesas-arm-defconfig-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.14 - Refresh shmobile_defconfig for v5.13-rc1 - Enable R-Car USB2 clock selector support * tag 'renesas-arm-defconfig-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable usb2_clksel for R-Car Gen3 and RZ/G2 ARM: shmobile: defconfig: Refresh for v5.13-rc1 Link: https://lore.kernel.org/r/cover.1622188834.git.geert+renesas@glider.be Signed-off-by: Olof Johansson commit b7c8bde730a8d3561f6a2ea5b9551b36640a10ea Merge: 3b0898f97886a 78924664af92f Author: Olof Johansson Date: Sat Jun 12 08:25:17 2021 -0700 Merge tag 'gemini-dts-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Gemini device tree updates for the v5.14 kernel: - MAINTAINERS fix for the DTS files - Drop a duplicate ethernet node on the RUT1xx DTS - Add device_type to the PCI node - Fix up some DTS syntax so it agrees with the schemas merged for the v5.14 merge window * tag 'gemini-dts-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: gemini: remove xxx-cells from display ARM: dts: gemini-dlink-dir-685: Remove address from display port ARM: dts: gemini-dlink-dir-685: rename gpio-i2c to i2c ARM: dts: gemini-dlink-dns-313: rename gpio-i2c to i2c ARM: dts: gemini: convert obsolete SPI properties ARM: dts: gemini: use the right rtc compatible ARM: dts: gemini: add device_type on pci ARM: dts: gemini-rut1xx: remove duplicate ethernet node ARM: dts: gemini: rename mdio to the right name MAINTAINERS: gemini: add missing dts pattern Link: https://lore.kernel.org/r/CACRpkdZWpLAcAStq8dEyGL_d9Bvp-WNPu-2EuJw1eTL4kyvgig@mail.gmail.com Signed-off-by: Olof Johansson commit 3b0898f97886ad1d731744c00328fecfbab16c3a Merge: 9321a97c8c1cf e33f8fd9fda97 Author: Olof Johansson Date: Sat Jun 12 08:24:49 2021 -0700 Merge tag 'ixp4xx-dts-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt IXP4xx DTS updates for the v5.14 kernel: - Add ethernet to the boards - Add PCI hosts to the boards - Create an expansion bus around the flash memory - Add the beeper to NSLU2 completing the NSLU2 DTS * tag 'ixp4xx-dts-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: Fix up the IXP4xx ethernet nodes ARM: dts: ixp4xx: Add beeper to the NSLU2 ARM: dts: ixp4xx: Create a proper expansion bus ARM: dts: ixp4xx: Add PCI hosts ARM: dts: ixp4xx: Add ethernet Link: https://lore.kernel.org/r/CACRpkdbmRjGW7vpr7hG+jiRTqNMZAyKZNhtvzj=SqhZmb1+F6A@mail.gmail.com Signed-off-by: Olof Johansson commit 6d9b10fd95924188f3be3161194735bd717a8b18 Merge: c4681547bcce7 e207457f90453 Author: Olof Johansson Date: Sat Jun 12 08:23:38 2021 -0700 Merge tag 'reset-for-v5.14' of git://git.pengutronix.de/pza/linux into arm/drivers Reset controller updates for v5.14 This tag adds support for the Microchip Sparx5 Switch Reset controller and contains some small fixes and cleanups in core and various drivers. * tag 'reset-for-v5.14' of git://git.pengutronix.de/pza/linux: reset: brcmstb: Add missing MODULE_DEVICE_TABLE reset: a10sr: add missing of_match_table reference reset: RESET_INTEL_GW should depend on X86 reset: RESET_BRCMSTB_RESCAL should depend on ARCH_BRCMSTB reset: uniphier: enclose UNIPHIER_RESET_ID_END value in parentheses reset: sti/syscfg: replace comma with semicolon reset: ti-syscon: fix to_ti_syscon_reset_data macro reset: berlin: replace unsigned with unsigned int reset: whitespace fixes reset: mchp: sparx5: add switch reset driver dt-bindings: reset: microchip sparx5 reset driver bindings reset: oxnas: replace file name with short description reset: zynqmp: replace spaces with tabs reset: bcm6345: Make reset_control_ops const Link: https://lore.kernel.org/r/418cf3a460cfe1d0f91f87e10baaf478bd41f1d5.camel@pengutronix.de Signed-off-by: Olof Johansson commit 9321a97c8c1cf76ae315cae5fd4c140bc65e2449 Author: Corentin Labbe Date: Tue May 4 19:34:57 2021 +0000 ARM: dts: add intel-ixp42x-welltech-epbx100 This patch adds devicetree for intel-ixp42x-welltech-epbx100. Link: https://lore.kernel.org/r/20210504193457.4008384-6-clabbe@baylibre.com Signed-off-by: Corentin Labbe Signed-off-by: Olof Johansson commit b0a2fbd2a6fcb8dccd88363fc8e2163fd92cd102 Author: Corentin Labbe Date: Tue May 4 19:34:56 2021 +0000 dt-bindings: arm: intel-ixp4xx: add welltech,epbx100 Adds welltech,epbx100 as a valid intel-ixp4xx board. Link: https://lore.kernel.org/r/20210504193457.4008384-5-clabbe@baylibre.com Signed-off-by: Corentin Labbe Acked-by: Rob Herring Signed-off-by: Olof Johansson commit 388b7e223985f64c322619a1c75be4b0a49623d3 Author: Corentin Labbe Date: Tue May 4 19:34:55 2021 +0000 dt-bindings: add vendor prefix for welltech Add vendor prefix for Welltech computer Co Ld. Link: https://lore.kernel.org/r/20210504193457.4008384-4-clabbe@baylibre.com Signed-off-by: Corentin Labbe Acked-by: Rob Herring Signed-off-by: Olof Johansson commit 39f9610ccae938ba65bab5250fa80844e9508c21 Author: Corentin Labbe Date: Tue May 4 19:34:54 2021 +0000 ARM: ixp4xx_defconfig: add MTD_PHYSMAP Without MTD_PHYSMAP/MTD_PHYSMAP_OF the flash partitions of my welltech,epbx100 are not detected. Link: https://lore.kernel.org/r/20210504193457.4008384-3-clabbe@baylibre.com Signed-off-by: Corentin Labbe Signed-off-by: Olof Johansson commit 224bdcbc040734caa63d1d16138c4b720fcae145 Author: Corentin Labbe Date: Tue May 4 19:34:53 2021 +0000 ARM: ixp4xx_defconfig: add CONFIG_SERIAL_OF_PLATFORM My ixp42x-welltech-epbx100 does not print anything on console without CONFIG_SERIAL_OF_PLATFORM. Link: https://lore.kernel.org/r/20210504193457.4008384-2-clabbe@baylibre.com Signed-off-by: Corentin Labbe Signed-off-by: Olof Johansson commit edc64e7a03c81fcddb1c1a0af253705833d704ad Author: Phillip Potter Date: Fri Jun 11 01:24:59 2021 +0100 staging: rtl8188eu: remove ODM_RT_TRACE calls from hal/phy.c Remove all ODM_RT_TRACE calls from hal/phy.c, as this debug code is not optimal and doesn't follow best practices. This in concert with other removals allows for the removal of include/odm_debug.h in its entirety. Tested-by: Martin Kaiser Reviewed-by: Martin Kaiser Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210611002504.166405-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 922a0524f7c46784fadb75aa2ac85405e0a25696 Author: Greg Kroah-Hartman Date: Thu Jun 10 20:31:53 2021 +0200 staging: drop kpc2000 driver It seems that the old developer is no longer with the company producing this device, and the company has no plans on getting this out of the staging directory at all, so let's drop the driver for now as it's pretty much abandonded. If someone want to support this and get it out of staging, we can easily revert this change and bring it back. Cc: Matt Sickler Link: https://lore.kernel.org/r/20210610183153.2397760-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c57f4f002bbd708c02862b37ab417699d657a9cf Author: Philippe Dixon Date: Thu Jun 10 08:51:15 2021 -0700 staging: rtl8723bs: core: add blank line after variable declaration This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Philippe Dixon Link: https://lore.kernel.org/r/c5eedc7a5298b05beb576b7b9e108794ca7bb58c.1623339773.git.philippesdixon@gmail.com Signed-off-by: Greg Kroah-Hartman commit eff810f82e471034bcfa04c9e10cc2c9b4340403 Author: Fabio M. De Francesco Date: Wed Jun 9 15:56:59 2021 +0200 staging: rtl8712: Replace printk() with netdev_dbg() Replaced printk() with netdev_dbg() because the latter is preferred in network devices drivers. Suggested-by: Greg Kroah-Hartman Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210609135659.4054-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 22a9f1c45946780adfa4cb771197d7502403181d Author: Fabio M. De Francesco Date: Wed Jun 9 15:23:46 2021 +0200 staging: rtl8723bs: os_dep: Remove conditions with no effects Removed conditions with no effects. Detected by Coccinelle. Deleted a variable that is no longer used because of the above-mentioned removals. Reviewed-by: Fabio Aiuto Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210609132346.15403-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit eab61fb1cc2eeeffbceb2cf891c1b7272141af82 Author: Jiri Prchal Date: Fri Jun 11 17:24:16 2021 +0200 nvmem: eeprom: at25: fram discovery simplification Changed "is_fram" to bool and set it based on compatible string. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210611152416.68386-1-jiri.prchal@aksignal.cz Signed-off-by: Greg Kroah-Hartman commit e0a6120f6816ddd366530ce7ae5cb001a5e819dd Author: Yang Yingliang Date: Wed May 26 22:22:19 2021 +0800 ath10k: remove unused more_frags variable Fix the following W=1 build warning: drivers/net/wireless/ath/ath10k/htt_rx.c:1790:7: warning: variable ‘more_frags’ set but not used [-Wunused-but-set-variable] 1790 | bool more_frags; | ^~~~~~~~~~ Fixes: a1166b2653db ("ath10k: add CCMP PN replay protection for fragmented frames for PCIe") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210526142219.2542528-1-yangyingliang@huawei.com commit 272fdc0c4542fad173b44965be02a16d6db95499 Author: Randy Dunlap Date: Mon May 31 17:41:28 2021 +0300 wireless: carl9170: fix LEDS build errors & warnings kernel test robot reports over 200 build errors and warnings that are due to this Kconfig problem when CARL9170=m, MAC80211=y, and LEDS_CLASS=m. WARNING: unmet direct dependencies detected for MAC80211_LEDS Depends on [n]: NET [=y] && WIRELESS [=y] && MAC80211 [=y] && (LEDS_CLASS [=m]=y || LEDS_CLASS [=m]=MAC80211 [=y]) Selected by [m]: - CARL9170_LEDS [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_ATH [=y] && CARL9170 [=m] CARL9170_LEDS selects MAC80211_LEDS even though its kconfig dependencies are not met. This happens because 'select' does not follow any Kconfig dependency chains. Fix this by making CARL9170_LEDS depend on MAC80211_LEDS, where the latter supplies any needed dependencies on LEDS_CLASS. Fixes: 1d7e1e6b1b8ed ("carl9170: Makefile, Kconfig files and MAINTAINERS") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Kalle Valo Cc: Christian Lamparter Cc: linux-wireless@vger.kernel.org Cc: Arnd Bergmann Suggested-by: Christian Lamparter Acked-by: Arnd Bergmann Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210530031134.23274-1-rdunlap@infradead.org commit e2783e2f39ba99178dedfc1646d5cc0979d1bab3 Author: Yang Yingliang Date: Mon May 31 17:41:28 2021 +0300 ath10k: add missing error return code in ath10k_pci_probe() When chip_id is not supported, the resources will be freed on path err_unsupported, these resources will also be freed when calling ath10k_pci_remove(), it will cause double free, so return -ENODEV when it doesn't support the device with wrong chip_id. Fixes: c0c378f9907c ("ath10k: remove target soc ps code") Fixes: 7505f7c3ec1d ("ath10k: create a chip revision whitelist") Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210522105822.1091848-3-yangyingliang@huawei.com commit 9e88dd431d2345acdb7a549f3e88aaf4c2a307a1 Author: Yang Yingliang Date: Mon May 31 17:41:28 2021 +0300 ath10k: go to path err_unsupported when chip id is not supported When chip id is not supported, it go to path err_unsupported to print the error message. Fixes: f8914a14623a ("ath10k: restore QCA9880-AR1A (v1) detection") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210522105822.1091848-2-yangyingliang@huawei.com commit 5088df0504fe7d9623bf5789950327bc9e594fed Author: Baochen Qiang Date: Mon May 31 17:41:28 2021 +0300 ath11k: don't call ath11k_pci_set_l1ss for WCN6855 For QCA6390, one PCI related clock drifts sometimes, and it makes PCI link difficult to quit L1ss. Current implementation fixed this by configuring some related regs using ath11k_pci_fix_l1ss. WCN6855 does not have this clock drift problem, so no need to set these regs. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-8-jouni@codeaurora.org commit 0fbf19570099cf1c41e86b3b14a392d46131ed0d Author: Baochen Qiang Date: Mon May 31 17:41:28 2021 +0300 ath11k: add support for WCN6855 This patch is to add support for WCN6855. For station mode, WCN6855 is able to connect to an AP, and ping works well. For AP mode, hostapd is able to bringup an SAP interface with WCN6855, a normal station can connect to this AP and ping works well. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-7-jouni@codeaurora.org commit 8845fed1ad7b2fcd4dde82737c197805255bed0f Author: Baochen Qiang Date: Mon May 31 17:41:27 2021 +0300 ath11k: add support to get peer id for WCN6855 For WCN6855, the layout of hal rx mpdu info is different, so need to handle this target differently when getting peer id. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-6-jouni@codeaurora.org commit ed66849e159ba92a91ccde13ce3aebd90c644e05 Author: Baochen Qiang Date: Mon May 31 17:41:27 2021 +0300 ath11k: setup WBM_IDLE_LINK ring once again For WCN6855, WBM idle link ring needs a reinit. Without this reinit, firmware crash might happen occasionally. This is requested by the hw team. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-5-jouni@codeaurora.org commit 0d55b76fd815f4d685a62afe44e623501186ceb4 Author: Baochen Qiang Date: Mon May 31 17:41:27 2021 +0300 ath11k: setup REO for WCN6855 WCN6855 needs a different reo configuration, so add separate handling for this target in ath11k_hw_ops. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-4-jouni@codeaurora.org commit e4073430ee1dec5402a6158755ac8b84eade83c6 Author: Baochen Qiang Date: Mon May 31 17:41:27 2021 +0300 ath11k: add dp support for WCN6855 hal rx descriptor is different for WCN6855 and there are such a lot of handlers processing this descriptor in data path. So add separate handling for this target. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-3-jouni@codeaurora.org commit 755b1f73173e004e8c89a17fa4e8b329481495d4 Author: Baochen Qiang Date: Mon May 31 17:41:27 2021 +0300 ath11k: add hw reg support for WCN6855 Reg address of WCN6855 is different from other devices, so add separate reg definition for this target. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Govind Singh Signed-off-by: Baochen Qiang Signed-off-by: Jouni Malinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511162214.29475-2-jouni@codeaurora.org commit fb312ac5ccb007e843f982b38d4d6886ba4b32f2 Author: Pali Rohár Date: Mon May 31 17:41:27 2021 +0300 ath9k: Fix kernel NULL pointer dereference during ath_reset_internal() I got this crash more times during debugging of PCIe controller and crash happens somehow at the time when PCIe kernel code started link retraining (as part of ASPM code) when at the same time PCIe link went down and ath9k probably executed hw reset procedure. Currently I'm not able to reproduce this issue as it looks like to be some race condition between link training, ASPM, link down and reset path. And as always, race conditions which depends on more input parameters are hard to reproduce as it depends on precise timings. But it is clear that pointers are zero in this case and should be properly filled as same code pattern is used in ath9k_stop() function. Anyway I was able to reproduce this crash by manually triggering ath reset worker prior putting card up. I created simple patch to export reset functionality via debugfs and use it to "simulate" of triggering reset. s proved that NULL-pointer dereference issue is there. Function ath9k_hw_reset() is dereferencing chan structure pointer, so it needs to be non-NULL pointer. Function ath9k_stop() already contains code which sets ah->curchan to valid non-NULL pointer prior calling ath9k_hw_reset() function. Add same code pattern also into ath_reset_internal() function to prevent kernel NULL pointer dereference in ath9k_hw_reset() function. This change fixes kernel NULL pointer dereference in ath9k_hw_reset() which is caused by calling ath9k_hw_reset() from ath_reset_internal() with NULL chan structure. [ 45.334305] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [ 45.344417] Mem abort info: [ 45.347301] ESR = 0x96000005 [ 45.350448] EC = 0x25: DABT (current EL), IL = 32 bits [ 45.356166] SET = 0, FnV = 0 [ 45.359350] EA = 0, S1PTW = 0 [ 45.362596] Data abort info: [ 45.365756] ISV = 0, ISS = 0x00000005 [ 45.369735] CM = 0, WnR = 0 [ 45.372814] user pgtable: 4k pages, 39-bit VAs, pgdp=000000000685d000 [ 45.379663] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 45.388856] Internal error: Oops: 96000005 [#1] SMP [ 45.393897] Modules linked in: ath9k ath9k_common ath9k_hw [ 45.399574] CPU: 1 PID: 309 Comm: kworker/u4:2 Not tainted 5.12.0-rc2-dirty #785 [ 45.414746] Workqueue: phy0 ath_reset_work [ath9k] [ 45.419713] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--) [ 45.425910] pc : ath9k_hw_reset+0xc4/0x1c48 [ath9k_hw] [ 45.431234] lr : ath9k_hw_reset+0xc0/0x1c48 [ath9k_hw] [ 45.436548] sp : ffffffc0118dbca0 [ 45.439961] x29: ffffffc0118dbca0 x28: 0000000000000000 [ 45.445442] x27: ffffff800dee4080 x26: 0000000000000000 [ 45.450923] x25: ffffff800df9b9d8 x24: 0000000000000000 [ 45.456404] x23: ffffffc0115f6000 x22: ffffffc008d0d408 [ 45.461885] x21: ffffff800dee5080 x20: ffffff800df9b9d8 [ 45.467366] x19: 0000000000000000 x18: 0000000000000000 [ 45.472846] x17: 0000000000000000 x16: 0000000000000000 [ 45.478326] x15: 0000000000000010 x14: ffffffffffffffff [ 45.483807] x13: ffffffc0918db94f x12: ffffffc011498720 [ 45.489289] x11: 0000000000000003 x10: ffffffc0114806e0 [ 45.494770] x9 : ffffffc01014b2ec x8 : 0000000000017fe8 [ 45.500251] x7 : c0000000ffffefff x6 : 0000000000000001 [ 45.505733] x5 : 0000000000000000 x4 : 0000000000000000 [ 45.511213] x3 : 0000000000000000 x2 : ffffff801fece870 [ 45.516693] x1 : ffffffc00eded000 x0 : 000000000000003f [ 45.522174] Call trace: [ 45.524695] ath9k_hw_reset+0xc4/0x1c48 [ath9k_hw] [ 45.529653] ath_reset_internal+0x1a8/0x2b8 [ath9k] [ 45.534696] ath_reset_work+0x2c/0x40 [ath9k] [ 45.539198] process_one_work+0x210/0x480 [ 45.543339] worker_thread+0x5c/0x510 [ 45.547115] kthread+0x12c/0x130 [ 45.550445] ret_from_fork+0x10/0x1c [ 45.554138] Code: 910922c2 9117e021 95ff0398 b4000294 (b9400a61) [ 45.560430] ---[ end trace 566410ba90b50e8b ]--- [ 45.565193] Kernel panic - not syncing: Oops: Fatal exception in interrupt [ 45.572282] SMP: stopping secondary CPUs [ 45.576331] Kernel Offset: disabled [ 45.579924] CPU features: 0x00040002,0000200c [ 45.584416] Memory Limit: none [ 45.587564] Rebooting in 3 seconds.. Signed-off-by: Pali Rohár Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210402122653.24014-1-pali@kernel.org commit 21cc1f222e890fa989d1395e47b16777fea46e5f Author: Li Jun Date: Fri May 28 19:29:59 2021 +0800 arm64: dts: imx8mn-evk: disable over current for usb imx8mn evk board usb port does not support over current detection, so disable it. Signed-off-by: Li Jun Signed-off-by: Shawn Guo commit 4616c395be9d8d66ed63a3569a527ce4a07071fc Author: Li Jun Date: Fri May 28 19:29:58 2021 +0800 arm64: dts: imx8mm-evk: disable over current for usb1 imx8mm evk board usb1 port does not support over current detection, so disable it. Signed-off-by: Li Jun Signed-off-by: Shawn Guo commit cd044eafd7105275220f6b7140a8a8fb64e0e5af Author: Sebastian Reichel Date: Wed May 26 17:22:42 2021 +0200 dt-bindings: arm: fsl: add GE B1x5pv2 boards Document the compatible for GE B1x5pv2 boards. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit 7ef9a86dfc5092d8873b04ce10846110eeb68d0f Author: Sebastian Reichel Date: Wed May 26 17:22:41 2021 +0200 dt-bindings: vendor-prefixes: add congatec Document binding for congatec. Acked-by: Rob Herring Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit ce87d936889bdb183590647b9827bb2ae7f674c7 Author: Zhen Lei Date: Fri May 21 17:20:42 2021 +0800 arm64: dts: freescale: Separate each group of data in the property 'reg' Do not write the 'reg' of multiple groups of data into a uint32 array, use <> to separate them. Otherwise, the errors similar to the following will be reported by reg.yaml. arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dt.yaml: soc: pcie@3400000:reg:0: \ [0, 54525952, 0, 1048576, 64, 0, 0, 8192] is too long Signed-off-by: Zhen Lei Signed-off-by: Shawn Guo commit dfda1fd16aa71c839e4002109b0cd15f61105ebb Author: Dong Aisheng Date: Fri May 21 11:12:48 2021 +0800 arm64: dts: imx8: conn: fix enet clock setting enet_clk_ref actually is sourced from internal gpr clocks which needs a default rate. Also update enet lpcg clock output names to be more straightforward. Cc: Abel Vesa Cc: Stephen Boyd Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 15a5261e4d052bf85c7fba24dbe0e9a7c8c05925 Author: Lucas Stach Date: Sat May 8 00:12:13 2021 +0200 arm64: dts: imx8mq: assign PCIe clocks This fixes multiple issues with the current non-existent PCIe clock setup: The controller can run at up to 250MHz, so use a parent that provides this clock. The PHY needs an exact 100MHz reference clock to function if the PCIe refclock is not fed in via the refclock pads. While this mode is not supported (yet) in the driver it doesn't hurt to make sure we are providing a clock with the right rate. The AUX clock is specified to have a maximum clock rate of 10MHz. So the current setup, which drives it straight from the 25MHz oscillator is actually overclocking the AUX input. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit 8d923cdf2ec40520f2a3f4281001d414345b3e74 Author: Lucas Stach Date: Tue May 4 10:20:52 2021 +0200 arm64: dts: imx8mn: specify dma-ranges DMA addressing capabilities on i.MX8MN are limited by the interconnect, same as on i.MX8MQ. Add dma-ranges to the the peripheral bus to let the kernel know about this. Signed-off-by: Lucas Stach Reviewed-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 4251a3ac4de9625a284a9c046cc915487e9b2a5e Author: Lucas Stach Date: Tue May 4 10:20:51 2021 +0200 arm64: dts: imx8mm: specify dma-ranges DMA addressing capabilities on i.MX8MM are limited by the interconnect, same as on i.MX8MQ. Add dma-ranges to the the peripheral bus to let the kernel know about this. Signed-off-by: Lucas Stach Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Shawn Guo commit 6bee93d93111d7bb39105b39ed57780a097557cc Author: Kornel Duleba Date: Wed Apr 7 14:34:38 2021 +0200 arm64: dts: fsl-ls1028a: Correct ECAM PCIE window ranges Currently all PCIE windows point to bus address 0x0, which does not match the values obtained from hardware during EA. Replace those values with CPU addresses, since in reality we have a 1:1 mapping between the two. Signed-off-by: Kornel Duleba Acked-by: Claudiu Manoil Reviewed-by: Vladimir Oltean Signed-off-by: Shawn Guo commit 1de3aa8611d21d6be546ca1cd13ee05bdd650018 Author: Adam Ford Date: Wed Apr 28 08:00:58 2021 -0500 arm64: dts: imx8mn-beacon-som: Assign PMIC clock The PMIC throws an errors because the clock isn't assigned to it. Fix this by assigning the clocks info. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 8240c972c1798ea013cbb407722295fc826b3584 Author: Mian Yousaf Kaukab Date: Wed Apr 28 14:58:07 2021 +0200 arm64: dts: ls208xa: remove bus-num from dspi node On LS2088A-RDB board, if the spi-fsl-dspi driver is built as module then its probe fails with the following warning: [ 10.471363] couldn't get idr [ 10.471381] WARNING: CPU: 4 PID: 488 at drivers/spi/spi.c:2689 spi_register_controller+0x73c/0x8d0 ... [ 10.471651] fsl-dspi 2100000.spi: Problem registering DSPI ctlr [ 10.471708] fsl-dspi: probe of 2100000.spi failed with error -16 Reason for the failure is that bus-num property is set for dspi node. However, bus-num property is not set for the qspi node. If probe for spi-fsl-qspi happens first then id 0 is dynamically allocated to it. Call to spi_register_controller() from spi-fsl-dspi driver then fails. Since commit 29d2daf2c33c ("spi: spi-fsl-dspi: Make bus-num property optional") bus-num property is optional. Remove bus-num property from dspi node to fix the issue. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Shawn Guo commit 03ce38ca69b18c32fdb58f24184f3218efc33f34 Author: Mian Yousaf Kaukab Date: Mon Apr 26 09:52:11 2021 +0200 arm64: dts: ls1012a: enable PCIe on freeway board ls1012a-freeway board contains a M.2 2230 slot. Update the status of pcei1 node to okay so that the pcie controller can be probed. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Shawn Guo commit dc6d5dc89bad410cc58688f0b73452957bf95020 Author: Joakim Zhang Date: Mon Apr 26 15:06:54 2021 +0800 arm64: dts: imx8mp-evk: enable EQOS ethernet Enable EQOS ethernet on i.MX8MP EVK board. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit 88314aab231361ce8ff34ee7ca6e81c91ee33108 Author: Jacky Bai Date: Tue Apr 20 13:54:52 2021 +0800 arm64: dts: imx8mp: Remove the reference to audio ipg clock on imx8mp On i.MX8MP, there is no audio ipg clock, so remove the wrong reference to this clock in dts file. Signed-off-by: Jacky Bai Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 9b95c44b417662327e1a2602cc6c6af8cba95825 Author: Richard Zhu Date: Wed Apr 14 10:26:14 2021 +0800 arm64: dts: imx8mq-evk: add one regulator used to power up pcie phy Both 1.8v and 3.3v power supplies can be used by i.MX8MQ PCIe PHY. In default, the PCIE_VPH voltage is suggested to be 1.8v refer to data sheet. When PCIE_VPH is supplied by 3.3v in the HW schematic design, the VREG_BYPASS bits of GPR registers should be cleared from default value 1b'1 to 1b'0. Thus, the internal 3v3 to 1v8 translator would be turned on. Signed-off-by: Richard Zhu Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit 7923353b623d518e82ed5f760d38f621e36f3720 Author: Adam Ford Date: Mon Apr 5 20:33:43 2021 -0500 arm64: dts: imx8mm: Add spba1 and spba2 buses The i.MX8MM reference manual shows there are two spba busses. SPBA1 handles much of the serial interfaces, and SPBA2 covers much of the audio. Add both of them. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 292e0f487c0a18d7d35fb5acc0d5a993ed78bd3c Author: Adam Ford Date: Mon Apr 5 20:33:42 2021 -0500 arm64: dts: imx8mn: Add spba1 bus The i.MX8MN has an SPBA bus which covers much of the audio, but there is a second SPBA bus which covers many of the serial interfaces like SPI and UARTs currently missing from the device tree. The reference manual calls the bus handling the audio peripherals SPBA2, and the bus handling the serial peripherals is called SPBA1. Rename the existing spba bus to spba2 and add spba1. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 4b82e1f839a255be128c89a7ee438e7b0e95c81b Author: Adrien Grassein Date: Tue May 11 21:36:00 2021 +0200 arm64: dts: imx8mq-nitrogen: add lt8912 MIPI-DSI to HDMI Add support of the lt8912b in the DTB. This adds the support of the DB_DSIHD daugther board from Boundary Devices. Signed-off-by: Adrien Grassein Signed-off-by: Shawn Guo commit 4a085de205292c1007681e4e077279f77a5ce2ad Author: Adrien Grassein Date: Tue May 11 21:35:59 2021 +0200 arm64: dts: imx8mq-nitrogen: add USB HOST support Add the description for the USB host port. This port is linked to a resettable USB HUB so handle this reset signal with a GPIO hog. Signed-off-by: Adrien Grassein Signed-off-by: Shawn Guo commit 77a1aa039336312d622f66ef7ee18ea1f6bd59bc Author: Adrien Grassein Date: Tue May 11 21:35:58 2021 +0200 arm64: dts: imx8mq-nitrogen: add USB OTG support Add the description for the USB OTG port. The OTG port uses a dedicated regulator for vbus. Signed-off-by: Adrien Grassein Signed-off-by: Shawn Guo commit a4f27c75ac41a40042a50d536052fefb35728b8b Author: Heiko Schocher Date: Tue Mar 9 06:31:16 2021 +0100 arm64: dts: imx8mp-phycore-som: enable spi nor enable the mt25qu256aba spi nor on the imx8mp-phycore-som. Signed-off-by: Heiko Schocher Signed-off-by: Shawn Guo commit 6252a42b0fd70b03aa17c58d218dcabd863cc02a Author: Fabio Estevam Date: Sat Jun 5 11:29:51 2021 -0300 ARM: imx_v6_v7_defconfig: Select the Wifi ath10k sdio driver Select the ath10k sdio driver so that Wifi can work by default on boards like imx6dl-pico-pi with a QCA9377 chip. Signed-off-by: Fabio Estevam Reviewed-by: Otavio Salvador Signed-off-by: Shawn Guo commit 1586d461f641b60040438275e14c7dbcec5907d6 Author: Takashi Sakamoto Date: Fri Jun 11 18:37:30 2021 +0900 ALSA: bebob: correct device entries for Phonic Helix Board and FireFly series Phonic shipped Helix board and FireFly series with IEEE 1394 functionality. Regarding to the parameters in unit directory, these series have two cases below: 1. the same parameters in unit directory * Firefly 202 * Firefly 302 * Firefly 808 Universal * HelixBoard 12 FireWire, 12 Universal * HelixBoard 18 FireWire, 18 Universal * HelixBoard 24 FireWire, 24 Universal 2. Unique parameters in unit directory * FireFly 808 * HelixBoard 12 FireWire MkII * HelixBoard 18 FireWire MkII * HelixBoard 24 FireWire MkII Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611093730.78254-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e6b54fbc18b9536833e2374798088741a9ab7332 Author: Takashi Sakamoto Date: Fri Jun 11 18:37:29 2021 +0900 ALSA: bebob: code refactoring for M-Audio models For M-Audio FireWire 410, the value of immediate entry for vendor in unit directory is the value for BridgeCo. AG OUI. It seems that M-Audio uses initial settings as is for its product. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611093730.78254-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 971514af352efce3fc4d6bab2525a99542d90df6 Author: Takashi Sakamoto Date: Fri Jun 11 18:37:28 2021 +0900 ALSA: bebob: correct device entry for Acoustic Reality eAR Master One, Eroica, Figaro, and Ciaccona The value of vendor OUI is invalid. Furthermore it seems to be Terratec OEM. * http://subversion.ffado.org/wiki/AvcModels/AcousticRealityeARMasterOne Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611093730.78254-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 1b337e8db797acdc75521d429a6c29db8270865c Author: Takashi Sakamoto Date: Fri Jun 11 18:37:27 2021 +0900 ALSA: bebob: correct device entry for Mackie D.2 FireWire option card For Mackie D.2 FireWire option card, 0x00000f is used for the value of immediate entry for vendor in unit directory. The value comes from report by FFADO user in below page: * http://subversion.ffado.org/wiki/AvcModels/MackieD.2. However, it seems to be wrong. There are two causes; vendor's mistake to decide value for GUID field in configuration ROM against standard, as Stefan Richter mentioned in below post: * https://lore.kernel.org/alsa-devel/1443917823-13516-1-git-send-email-o-takashi@sakamocchi.jp/#t Another is implementation of libffado. The library doesn't print out the value from immediate entry for vendor in unit directory. It just print out the first 6 bytes of GUID as vendor ID. This commit replaces with correct vendor OUI. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611093730.78254-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2e6a58959529e99352af88c1604a7d3febd2061c Author: Takashi Sakamoto Date: Fri Jun 11 18:37:26 2021 +0900 ALSA: fireworks: fulfil device entries All of devices with Echo Audio Fireworks board module has the same combination of specifier_id (0x00a02d) and version (0x010000) in unit directory. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611093730.78254-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 270e6012b934952650baf39781c9d8cd5dcef684 Author: Takashi Sakamoto Date: Fri Jun 11 18:37:25 2021 +0900 ALSA: bebob: fulfil device entries Although unit directory in root directory of configuration ROM has the same value (0x00a02d) for its specifier_id entry to express AV/C device, it has two cases for the value (0x010001/0x014001) to version entry. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611093730.78254-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e094b22c8d519e5d5417a57d6f6ddc1b5f0aefaf Author: Colin Ian King Date: Fri Jun 11 17:52:23 2021 +0100 ALSA: i2c: tea6330t: Remove redundant initialization of variable err The variable err is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210611165223.38983-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit 3b86ec63c06147d24a1b48ba0caab5d051cc0d02 Author: Takashi Sakamoto Date: Fri Jun 11 17:34:25 2021 +0900 ALSA: firewire-lib: replace in_interrupt() with in_softirq() Tasklet is used to handle isochronous context of 1394 OHCI. The explicit usage of in_softirq() may be preferable than in_interrupt(). Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611083425.61204-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit be471fe332f7f14aa6828010b220d7e6902b91a0 Author: Yang Yingliang Date: Thu Jun 10 20:49:58 2021 +0800 ALSA: n64: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210610124958.116142-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai commit 01893553e67c768985dc1531fa89fb04aa5134ce Author: Yang Yingliang Date: Thu Jun 10 21:19:22 2021 +0800 ALSA: hda/tegra: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210610131922.134788-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai commit fd498bba7c5194cdfc3f0d726f99f0fa3b7e51de Author: YueHaibing Date: Sat Jun 12 11:34:58 2021 +0800 ALSA: trident: Fix build error sound/pci/trident/trident_memory.c: In function ‘set_tlb_bus’: sound/pci/trident/trident_memory.c:85:35: error: ‘pagetr’ undeclared (first use in this function); did you mean ‘page’? for (i = 0; i < UNIT_PAGES; i++, pagetr++) { ^~~~~~ page Fixes: 74fb98311c4e ("ALSA: trident: Drop shadow TLB pointer table") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210612033458.42928-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit 1fac5db35ee91b88b07f6e062b0c2355fe71b289 Author: Sebastian Reichel Date: Wed May 26 17:22:43 2021 +0200 ARM: dts: imx6: Add GE B1x5v2 This adds device tree files for the General Electric Healthcare (GEHC) B1x5v2 series. All models make use of Congatec's QMX6 system on module, which is described in its own device tree include, so that it can also be used by other boards. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit f4ab3f2848247caea9c760a5a598278413a0a953 Author: Christoph Niedermaier Date: Wed May 26 12:54:02 2021 +0200 ARM: dts: imx6q-dhcom: Add ethernet VIO regulator Add VIO regulator that supplies multiple ethernet magnetics and currently there is no upstream support for that in the networking, so just keep the regulator enabled always to emulate what other boards, which have this hard-wired, do. Until there is support. Signed-off-by: Christoph Niedermaier Cc: Shawn Guo Cc: Fabio Estevam Cc: Marek Vasut Cc: NXP Linux Team Cc: kernel@dh-electronics.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit ab583173144a1f26daedc0caa616f397fe9ae411 Author: Christoph Niedermaier Date: Wed May 26 12:54:01 2021 +0200 ARM: dts: imx6q-dhcom: Add aliases for i2c, serial and rtc Add aliases for i2c and serial to match the order of the DHCOM standard [1]. Also add aliases for the two rtcs. The i2c rtc is the primary one. [1] https://wiki.dh-electronics.com/images/2/2e/DOC_DHCOM-Standard-Specification_R01_2016-11-17.pdf Signed-off-by: Christoph Niedermaier Cc: Shawn Guo Cc: Fabio Estevam Cc: Marek Vasut Cc: NXP Linux Team Cc: kernel@dh-electronics.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit ddc873cd3c0af4faad6a00bffda21c3f775126dd Author: Christoph Niedermaier Date: Wed May 26 12:54:00 2021 +0200 ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery The i2c bus can freeze at the end of transaction so the bus can no longer work. This scenario is improved by adding scl/sda gpios definitions to implement the i2c bus recovery mechanism. Fixes: 52c7a088badd ("ARM: dts: imx6q: Add support for the DHCOM iMX6 SoM and PDK2") Signed-off-by: Christoph Niedermaier Cc: Shawn Guo Cc: Fabio Estevam Cc: Marek Vasut Cc: NXP Linux Team Cc: kernel@dh-electronics.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit e2bdd3484890441b9cc2560413a86e8f2aa04157 Author: Christoph Niedermaier Date: Wed May 26 12:53:59 2021 +0200 ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems To make the ethernet cable plugin detection reliable the power detection of the smsc phy has been disabled. Fixes: 52c7a088badd ("ARM: dts: imx6q: Add support for the DHCOM iMX6 SoM and PDK2") Signed-off-by: Christoph Niedermaier Cc: Shawn Guo Cc: Fabio Estevam Cc: Marek Vasut Cc: NXP Linux Team Cc: kernel@dh-electronics.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit c016c26c1631f539c652b5d82242a3ca402545c1 Author: Christoph Niedermaier Date: Wed May 26 12:53:58 2021 +0200 ARM: dts: imx6q-dhcom: Fix ethernet reset time properties Fix ethernet reset time properties as described in Documentation/devicetree/bindings/net/ethernet-phy.yaml Fixes: 52c7a088badd ("ARM: dts: imx6q: Add support for the DHCOM iMX6 SoM and PDK2") Signed-off-by: Christoph Niedermaier Cc: Shawn Guo Cc: Fabio Estevam Cc: Marek Vasut Cc: NXP Linux Team Cc: kernel@dh-electronics.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo commit e34645f45805d8308866de7b69f117f554605bb6 Author: Anson Huang Date: Tue May 25 21:14:16 2021 -0300 ARM: imx: add smp support for imx7d Add SMP support for i.MX7D, including CPU hotplug support, for systems where TFA is not present. The motivation for bringing up the second i.MX7D core inside the kernel is that legacy vendor bootloaders usually do not implement PSCI support. This is a significant blocker for systems in the field that are running old bootloader versions to upgrade to a modern mainline kernel version, as only one CPU of the i.MX7D would be brought up. Bring up the second i.MX7D core inside the kernel to make the migration path to mainline kernel easier for the existing iMX7D users. Signed-off-by: Anson Huang Signed-off-by: Arulpandiyan Vadivel # Fix merge conflicts Signed-off-by: Leonard Crestez Signed-off-by: Marek Vasut # heavy cleanup Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit cc8870bf4c3ab0af385538460500a9d342ed945f Author: Marco Felsch Date: Tue May 25 12:01:08 2021 +0200 ARM: imx6q: drop of_platform_default_populate() from init_machine Dropping the machine_init specific of_platform_default_populate() can be done safely due to the following two facts: 1) Since commit 44a7185c2ae6 ("of/platform: Add common method to populate default bus") we have a common method to populate the devices. 2) The machine_init code don't need bounded devices<>drivers since the code uses syscon_regmap_lookup_by_compatible() which register a syscon device on demand. Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit 2a53b9d47b13ae8816ce5a7e5adeb77009d2ca4d Author: Adam Ford Date: Mon May 24 20:07:29 2021 -0500 soc: imx: gpcv2: add support for i.MX8MN power domains This adds support for the power domains founds on i.MX8MN. The Nano has fewer domains than the Mini, and the access to some of these domains is different than that of the Mini, the Mini power domains cannot be reused. Signed-off-by: Adam Ford Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 212c1242a9ac3f9e94a6c6edef2c09bf39650a16 Author: Adam Ford Date: Mon May 24 20:07:28 2021 -0500 dt-bindings: add defines for i.MX8MN power domains The i.MX8M Nano has a similar power domain controller to that of the mini, but it isn't fully compatible, so it needs a separate binding and power domain tables. Add the bindings and tables. Signed-off-by: Adam Ford Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 2f792ec782092ae3287351d5d9a2b4f77406e533 Merge: ee9889dfa9695 c3975a73ca941 Author: Linus Walleij Date: Sat Jun 12 02:04:12 2021 +0200 Merge tag 'renesas-pinctrl-for-v5.14-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.14 (take two) - Add bias support for the R-Car H2, V2H, E2, V3M, and V3H, and RZ/G1C, RZ/G1H, and RZ/G1E SoCs. commit ee9889dfa969544ea4bbc3a406f2135a2bcaea69 Author: Andreas Kaessens Date: Thu Jun 10 15:24:38 2021 +0200 dt-bindings: pinctrl: mcp23s08: add documentation for reset-gpios The reset-gpios property is added to the optional dt-bindings and also an example for it's usage. Signed-off-by: Andreas Kaessens Signed-off-by: Darian Biastoch Link: https://lore.kernel.org/r/20210610132438.3085841-2-akaessens@gmail.com Signed-off-by: Linus Walleij commit 4e73bfa3ee37277e3f3e636786fd52d89273bd79 Author: Andreas Kaessens Date: Thu Jun 10 15:24:37 2021 +0200 pinctrl: mcp23s08: Add optional reset GPIO The MCP23x port expander RESET# line can be connected to a host GPIO. The optional reset-gpio must be set to LOW if the reset is asserted at probing time. On page 5 in the datasheet [0] the "Device Active After Reset high" time is specified at 0 µs. Therefore no waiting is needed after the reset transition. [0] https://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf Signed-off-by: Andreas Kaessens Signed-off-by: Darian Biastoch Link: https://lore.kernel.org/r/20210610132438.3085841-1-akaessens@gmail.com Signed-off-by: Linus Walleij commit ca16b429f39b4ce013bfa7e197f25681e65a2a42 Author: Zhihao Cheng Date: Wed Jun 9 19:59:16 2021 +0800 tools/bpftool: Fix error return code in do_batch() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 668da745af3c2 ("tools: bpftool: add support for quotations ...") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20210609115916.2186872-1-chengzhihao1@huawei.com commit 3b3af91cb6893967bbec30f5c14562d0f7f00c2a Author: Wang Hai Date: Wed Jun 9 19:56:51 2021 +0800 libbpf: Simplify the return expression of bpf_object__init_maps function There is no need for special treatment of the 'ret == 0' case. This patch simplifies the return expression. Signed-off-by: Wang Hai Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210609115651.3392580-1-wanghai38@huawei.com commit 87c9c16317882dd6dbbc07e349bc3223e14f3244 Author: Brendan Higgins Date: Wed May 26 14:24:06 2021 -0700 kunit: tool: add support for QEMU Add basic support to run QEMU via kunit_tool. Add support for i386, x86_64, arm, arm64, and a bunch more. Signed-off-by: Brendan Higgins Tested-by: David Gow Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 12ca7a893d543a64130d15c765fc18497b2ea65f Author: Brendan Higgins Date: Wed May 26 14:24:07 2021 -0700 Documentation: kunit: document support for QEMU in kunit_tool Document QEMU support, what it does, and how to use it in kunit_tool. Signed-off-by: Brendan Higgins Reviewed-by: David Gow Signed-off-by: Shuah Khan commit b6d5799b0b5866dc63be7f032473dc536f865b4d Author: David Gow Date: Wed May 26 14:24:04 2021 -0700 kunit: Add 'kunit_shutdown' option Add a new kernel command-line option, 'kunit_shutdown', which allows the user to specify that the kernel poweroff, halt, or reboot after completing all KUnit tests; this is very handy for running KUnit tests on UML or a VM so that the UML/VM process exits cleanly immediately after running all tests without needing a special initramfs. Signed-off-by: David Gow Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Tested-By: Daniel Latypov Reviewed-by: Daniel Latypov Signed-off-by: Shuah Khan commit 384426bd101cb3cd580b18de19d4891ec5ca5bf9 Author: David Gow Date: Thu Jun 10 20:57:25 2021 -0700 kunit: Fix result propagation for parameterised tests When one parameter of a parameterised test failed, its failure would be propagated to the overall test, but not to the suite result (unless it was the last parameter). This is because test_case->success was being reset to the test->success result after each parameter was used, so a failing test's result would be overwritten by a non-failing result. The overall test result was handled in a third variable, test_result, but this was discarded after the status line was printed. Instead, just propagate the result after each parameter run. Signed-off-by: David Gow Fixes: fadb08e7c750 ("kunit: Support for Parameterized Testing") Reviewed-by: Marco Elver Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 8efe01b4386ab38a36b99cfdc1dc02c38a8898c3 Author: Punit Agrawal Date: Mon Jun 7 20:28:56 2021 +0900 arm64: dts: rockchip: Update RK3399 PCI host bridge window to 32-bit address memory The PCIe host bridge on RK3399 advertises a single 64-bit memory address range even though it lies entirely below 4GB. Previously the OF PCI range parser treated 64-bit ranges more leniently (i.e., as 32-bit), but since commit 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses") the code takes a stricter view and treats the ranges as advertised in the device tree (i.e, as 64-bit). The change in behaviour causes failure when allocating bus addresses to devices connected behind a PCI-to-PCI bridge that require non-prefetchable memory ranges. The allocation failure was observed for certain Samsung NVMe drives connected to RockPro64 boards. Update the host bridge window attributes to treat it as 32-bit address memory. This fixes the allocation failure observed since commit 9d57e61bf723. Reported-by: Alexandru Elisei Link: https://lore.kernel.org/r/7a1e2ebc-f7d8-8431-d844-41a9c36a8911@arm.com Suggested-by: Robin Murphy Signed-off-by: Punit Agrawal Tested-by: Alexandru Elisei Link: https://lore.kernel.org/r/20210607112856.3499682-5-punitagrawal@gmail.com Signed-off-by: Heiko Stuebner commit 7094e6acaf7ab869a1f1c34825ba1fe3173fe350 Author: Alexandre Ghiti Date: Fri Jun 4 13:49:48 2021 +0200 riscv: Simplify xip and !xip kernel address conversion macros To simplify the kernel address conversion code, make the same definition of kernel_mapping_pa_to_va and kernel_mapping_va_to_pa compatible for both xip and !xip kernel by defining XIP_OFFSET to 0 in !xip kernel. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 9b79878ced8f7ab85c57623f8b1f6882e484a316 Author: Alexandre Ghiti Date: Fri Jun 4 13:49:47 2021 +0200 riscv: Remove CONFIG_PHYS_RAM_BASE_FIXED Make the physical RAM base address available for all kernels, not only XIP kernels as it will allow to simplify address conversions macros. Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 1f1aa3fe0214a75b45af640ace9684405139e755 Merge: 0b217d3d74623 2e3cf97f4741b Author: David S. Miller Date: Fri Jun 11 14:13:18 2021 -0700 Merge branch 'ipa-sysfs' Alex Elder says: ==================== net: ipa: introduce ipa_syfs.c This series (its last patch, actually) creates a new source file, "ipa_syfs.c", to contain functions and data that expose to user space information known by the IPA driver via device attributes. The directory containing these files on supported systems is: /sys/devices/platform/soc@0/1e40000.ipa And within that direcftory, the following files and directories are added: . |-- feature | |-- rx_offload Type of checksum offload supported | `-- tx_offload | . . . |-- modem | |-- rx_endpoint_id IPA endpoint IDs for the embedded modem | `-- tx_endpoint_id | . . . |-- version IPA hardware version (informational) . . . The first patch just makes endpoint validation unconditional, as suggested by Leon Romanovsky. The second just ensures the version defined in configuration data is valid, so the version attribute doesn't have to handle unrecognized version numbers. ==================== Signed-off-by: David S. Miller commit 2e3cf97f4741b320e8f4639fcca732b17614a55f Author: Alex Elder Date: Fri Jun 11 15:39:40 2021 -0500 net: ipa: introduce sysfs code Add IPA device attributes to expose information known by the IPA driver about the hardware and its configuration. All pointers used to display these attribute values (i.e., IPA pointer and endpoint pointers) will have been initialized by the time IPA probe has completed, so they may be safely dereferenced. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e22e8e2fae61de990e3a815a66f2ffa166669b8e Author: Alex Elder Date: Fri Jun 11 15:39:39 2021 -0500 net: ipa: introduce ipa_version_valid() Define and use a new function that just validates the version defined in configuration data. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 9e8fb7bf9c8033e0617515d9a06c2ae9f58b812f Author: Alex Elder Date: Fri Jun 11 15:39:38 2021 -0500 net: ipa: make endpoint data validation unconditional The cost of validating the endpoint configuration data is not all that high, so just do it unconditionally, rather than doing so only when IPA_VALIDATAION is defined. Suggested-by: Leon Romanovsky Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 0b217d3d746233ace52b5dcb26974e929abf62c5 Author: Lijun Pan Date: Fri Jun 11 13:33:53 2021 -0500 ibmvnic: fix kernel build warning in strncpy drivers/net/ethernet/ibm/ibmvnic.c: In function ‘handle_vpd_rsp’: drivers/net/ethernet/ibm/ibmvnic.c:4393:3: warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation] 4393 | strncpy((char *)adapter->fw_version, "N/A", 3 * sizeof(char)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 2227ec7baab22a6f2a8ee8756847f3c2ccc62e3f Merge: a6e496993344c 56b63466333b2 Author: David S. Miller Date: Fri Jun 11 13:43:56 2021 -0700 Merge branch 'sja1105-xpcs' Vladimir Oltean says: ==================== Port the SJA1105 DSA driver to XPCS As requested when adding support for the NXP SJA1110, the SJA1105 driver could make use of the common XPCS driver, to eliminate some hardware specific code duplication. This series modifies the XPCS driver so that it can accommodate the XPCS instantiation from NXP switches, and the SJA1105 driver so it can expose what the XPCS driver expects. Tested on NXP SJA1105S and SJA1110A. Changes in v3: None. This is a resend of v2 which had "changes requested" even though there was no direct feedback. ==================== Signed-off-by: David S. Miller commit 56b63466333b25f4d6482516070251cb0a757a6c Author: Vladimir Oltean Date: Fri Jun 11 23:05:31 2021 +0300 net: dsa: sja1105: plug in support for 2500base-x The MAC treats 2500base-x same as SGMII (yay for that) except that it must be set to a different speed. Extend all places that check for SGMII to also check for 2500base-x. Also add the missing 2500base-x compatibility matrix entry for SJA1110D. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ece578bc3ea44a39efdb5299ce60c1a54cd2e184 Author: Vladimir Oltean Date: Fri Jun 11 23:05:30 2021 +0300 net: dsa: sja1105: SGMII and 2500base-x on the SJA1110 are 'special' For the xMII Mode Parameters Table to be properly configured for SGMII mode on SJA1110, we need to set the "special" bit, since SGMII is officially bitwise coded as 0b0011 in SJA1105 (decimal 3, equal to XMII_MODE_SGMII), and as 0b1011 in SJA1110 (decimal 11). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 27871359bdf82677c0a854d17eb93c34402321c9 Author: Vladimir Oltean Date: Fri Jun 11 23:05:29 2021 +0300 net: dsa: sja1105: register the PCS MDIO bus for SJA1110 On the SJA1110, the PCS of each SERDES-capable port is accessed through a different memory window which is 0x100 bytes in size, denoted by "pcs_base". In each PCS register access window, the XPCS MMDs are accessed in an indirect way: in pages/banks of up to 0x100 addresses each. Changing the page/bank is done by writing to a special register at the end of the access window. The MDIO register map accessed indirectly through the indirect banked method described above is similar to what SJA1105 has: upper 5 bits are the MMD, lower 16 bits are the MDIO address within that MMD. Since the PHY ID reported by the XPCS inside SJA1110 is also all zeroes (like SJA1105), we need to trap those reads and return a fake PHY ID so that the xpcs driver can apply some specific fixups for our integration. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3ad1d171548e85fd582c8de8c0946875579aebe8 Author: Vladimir Oltean Date: Fri Jun 11 23:05:28 2021 +0300 net: dsa: sja1105: migrate to xpcs for SGMII There is a desire to use the generic driver for the Synopsys XPCS located in drivers/net/pcs, and to achieve that, the sja1105 driver must expose an MDIO bus for the SGMII PCS, because the XPCS probes as an mdio_device. In preparation of the SJA1110 which in fact has a different access procedure for the SJA1105, we register this PCS MDIO bus once in the common code, but we implement function pointers for the read and write methods. In this patch there is a single implementation for them. There is exactly one MDIO bus for the PCS, this will contain all PCSes at MDIO addresses equal to the port number. We delete a bunch of hardware support code because the xpcs driver already does what we need. We need to hack up the MDIO reads for the PHY ID, since our XPCS instantiation returns zeroes and there are some specific fixups which need to be applied by the xpcs driver. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a853c68e29bb974ca0cc0a8eaf88c333217556aa Author: Vladimir Oltean Date: Fri Jun 11 23:05:27 2021 +0300 net: pcs: xpcs: export xpcs_do_config and xpcs_link_up The sja1105 hardware has a quirk in that some changes require a switch reset, which loses all configuration. When the reset is initiated, everything needs to be reprogrammed, including the MACs and the PCS. This is currently done in sja1105_static_config_reload() - we manually call sja1105_adjust_port_config(), sja1105_sgmii_pcs_config() and sja1105_sgmii_pcs_force_speed() which are all internal functions. There is a desire for sja1105 to use the common xpcs driver, and that means that the equivalents of those functions, xpcs_do_config() and xpcs_link_up() respectively, will no longer be local functions. Forcing phylink to retrigger a resolve somehow, say by doing dev_close() followed by dev_open() is not really an option, because the CPU port might have a PCS as well, and there is no net device which we can close and reopen for that. Additionally, the dev_close/dev_open sequence might force a renegotiation of the copper-side link for SGMII ports connected to a PHY, and this is undesirable as well, because the switch reset is much quicker than a PHY autoneg, so we would have a lot more downtime. The only solution I see is for the sja1105 driver to keep doing what it's doing, and that means we need to export the equivalents from xpcs for sja1105_sgmii_pcs_config and sja1105_sgmii_pcs_force_speed, and call them directly in sja1105_static_config_reload(). This will be done during the conversion patch. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f7380bba42fd0654bf8195fb741d5f92b0f46df9 Author: Vladimir Oltean Date: Fri Jun 11 23:05:26 2021 +0300 net: pcs: xpcs: add support for NXP SJA1110 The NXP SJA1110 switch integrates its own, non-Synopsys PMA, but it manages it through the register space of the XPCS itself, in a small register window inside MDIO_MMD_VEND2 from address 0x8030 to 0x806e. This coincides with where the registers for the default Synopsys PMA are, but the register definitions are of course not the same. This situation is an odd hardware quirk, but the simplest way to manage it is to drive the SJA1110's PMA from within the XPCS driver. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit dd0721ea4c7a6c2ec8b309ff57d74d88f08d4c23 Author: Vladimir Oltean Date: Fri Jun 11 23:05:25 2021 +0300 net: pcs: xpcs: add support for NXP SJA1105 The NXP SJA1105 DSA switch integrates a Synopsys SGMII XPCS on port 4. The generic code works fine, except there is an integration issue which needs to be dealt with: in this switch, the XPCS is integrated with a PMA that has the TX lane polarity inverted by default (PLUS is MINUS, MINUS is PLUS). To obtain normal non-inverted behavior, the TX lane polarity must be inverted in the PCS, via the DIGITAL_CONTROL_2 register. We introduce a pma_config() method in xpcs_compat which is called by the phylink_pcs_config() implementation. Also, the NXP SJA1105 returns all zeroes in the PHY ID registers 2 and 3. We need to hack up an ad-hoc PHY ID (OUI is zero, device ID is 1) in order for the XPCS driver to recognize it. This PHY ID is added to the public include/linux/pcs/pcs-xpcs.h for that reason (for the sja1105 driver to be able to use it in a later patch). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 36641b045c839797739f9863e86e4dae2370e24f Author: Vladimir Oltean Date: Fri Jun 11 23:05:24 2021 +0300 net: pcs: xpcs: also ignore phy id if it's all ones xpcs_get_id() searches multiple MMDs for a known PHY ID, starting with MDIO_MMD_PCS (3). However not all integrators might have implemented that MMD on their MDIO bus. For example, the NXP SJA1105 and SJA1110 switches only implement vendor-specific MMD 1 and 2. When there is nothing on an MDIO bus at a certain address, traditionally the bus returns 0xffff, which means that the bus remained in its default pull-up state for the duration of the MDIO transaction. The 0xffff value is widely used in drivers/net/phy/phy_device.c (see get_phy_c22_id for example) to denote a missing device. So it makes sense for the xpcs to ignore this value as well, and continue its search, eventually finding the proper PHY ID in the vendor-specific MMDs. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2031c09e6d5f50d4c337da11efd1deb8279687d6 Author: Vladimir Oltean Date: Fri Jun 11 23:05:23 2021 +0300 net: pcs: xpcs: add support for sgmii with no inband AN In fixed-link use cases, the XPCS can disable the clause 37 in-band autoneg process, disable the "Automatic Speed Mode Change after CL37 AN" setting, and force operation in a speed dictated by management. Add support for this operating mode. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d4433d5b7b34fa316c473769d51c79b2755953e4 Author: Vladimir Oltean Date: Fri Jun 11 23:05:22 2021 +0300 net: pcs: xpcs: move register bit descriptions to a header file Vendors which integrate the Designware XPCS might modify a few things here and there, and to support those, it's best to create separate C files in order to not clutter up the main pcs-xpcs.c. Because the vendor files might want to access the common xpcs registers too, let's move them in a header file which is local to this driver and can be included by vendor files as appropriate. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7413f9a6af00bb4dc0ef01944aceb8e2ee17a8d5 Author: Vladimir Oltean Date: Fri Jun 11 23:05:21 2021 +0300 net: stmmac: reduce indentation when calling stmmac_xpcs_setup There is no reason to embed an if within an if, we can just logically AND the two conditions. Signed-off-by: Vladimir Oltean Reviewed-by: Wong Vee Khee Signed-off-by: David S. Miller commit 47538dbeb70198c6036cfd4a60b292f1398f8f5e Author: Vladimir Oltean Date: Fri Jun 11 23:05:20 2021 +0300 net: stmmac: reverse Christmas tree notation in stmmac_xpcs_setup Reorder the variable declarations in descending line length order, according to the networking coding style. Signed-off-by: Vladimir Oltean Reviewed-by: Wong Vee Khee Signed-off-by: David S. Miller commit 5673ef86380414be1702ba2f1ef92526a14dd1e0 Author: Vladimir Oltean Date: Fri Jun 11 23:05:19 2021 +0300 net: pcs: xpcs: rename mdio_xpcs_args to dw_xpcs The struct mdio_xpcs_args is reminiscent of when a similarly named struct mdio_xpcs_ops existed. Now that that is removed, we can shorten the name to dw_xpcs (dw for DesignWare). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ce3aca0465e31c20ada1270ac6547ba28b610ab2 Author: Kefeng Wang Date: Wed Jun 2 16:55:16 2021 +0800 riscv: Only initialize swiotlb when necessary The SWIOTLB buffer is not needed unless the physical address space is beyond the limit of dma, only initialize swiotlb when swiotlb_force is true or not all system memory is DMA-able. Also move the swiotlb_init() into mem_init(). Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit a6e496993344ccd27163e6c9e7ff9d148fc0af8e Merge: 9e4e1dd4d9726 23a5708d4e78a Author: David S. Miller Date: Fri Jun 11 13:37:50 2021 -0700 Merge branch 'rmnet-checksums-part-1' Alex Elder says: ==================== net: qualcomm: rmnet: MAPv4 download checksum cleanup, part 1 I'm posting a large series an two smaller parts; this is part 1. The RMNet driver handles MAP (or QMAP) protocol traffic. There are several versions of this protocol. Version 1 supports multiplexing, as well as aggregation of packets in a single buffer. Version 4 adds the ability to perform checksum offload. And version 5 implements checksum offload in a different way from version 4. This series involves only MAPv4 protocol checksum offload, and only in the download (RX) direction. It affects handling of checksums computed by hardware for UDP datagrams and TCP segments, carried over both IPv4 and IPv6. MAP packets arriving on an RMNet port implementing MAPv4 checksum offload are passed to rmnet_map_checksum_downlink_packet() for handling. The packet is then passed to rmnet_map_ipv4_dl_csum_trailer() or rmnet_map_ipv6_dl_csum_trailer(), depending contents of the MAP payload. These two functions interpret checksum metadata to determine whether the checksum in the received packet matches that calculated by the hardware. It is these two functions that are the subject of this series (parts 1 and 2). The bulk of these functions are transformed--in a lot of small steps--from an extremely difficult-to-follow block of checksum processing code into a fairly simple, heavily commented equivalent. ==================== Signed-off-by: David S. Miller commit 23a5708d4e78a97a8ee0b3bcbf93c81b43504b84 Author: Alex Elder Date: Fri Jun 11 14:05:29 2021 -0500 net: qualcomm: rmnet: avoid unnecessary IPv6 byte-swapping In the previous patch IPv4 download checksum offload code was updated to avoid unnecessary byte swapping, based on properties of the Internet checksum algorithm. This patch makes comparable changes to the IPv6 download checksum offload handling. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit a2918a169f57f965e4e5949822c2602c90e388ab Author: Alex Elder Date: Fri Jun 11 14:05:28 2021 -0500 net: qualcomm: rmnet: avoid unnecessary byte-swapping Internet checksums are used for IPv4 header checksum, as well as TCP segment and UDP datagram checksums. Such a checksum represents the negated sum of adjacent pairs of bytes, using ones' complement arithmetic. One property of the Internet checkum is byte order independence [1]. Specifically, the sum of byte-swapped pairs is equal to the result of byte swapping the sum of those same pairs when not byte-swapped. So for example if a, b, c, d, y, and z are hexadecimal digits, and PLUS represents ones' complement addition: If: ab PLUS cd = yz Then: ba PLUS dc = zy For this reason, there is no need to swap the order of bytes in the checksum value held in a message header, nor the one in the QMAPv4 trailer, in order to operate on them. In other words, we can determine whether the hardware-computed checksum matches the one in the message header without any byte swaps. (This patch leaves in place all existing type casts.) [1] https://tools.ietf.org/html/rfc1071 Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e5adbbdfa2fb17e3d266011cef816ee492235581 Author: Alex Elder Date: Fri Jun 11 14:05:27 2021 -0500 net: qualcomm: rmnet: clarify a bit of code In rmnet_map_ipv6_dl_csum_trailer() there is an especially involved line of code that determines the ones' complement sum of the IPv6 packet header (in host byte order). Simplify that by storing the result of computing just the header checksum in a local variable, then using that in the original assignment. Use the size of the IPv6 header structure as the number of bytes to checksum, rather than computing the offset to the transport header. And use ip_fast_csum() rather than ipa_compute_csum(), knowing that the size of an IPv6 header (40 bytes) is a multiple of 4 bytes greater than 16. Add some comments to match rmnet_map_ipv4_dl_csum_trailer(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 16bf3d33c6b042c894747b96580db392b7e6c0c0 Author: Alex Elder Date: Fri Jun 11 14:05:26 2021 -0500 net: qualcomm: rmnet: IPv4 header has zero checksum In rmnet_map_ipv4_dl_csum_trailer(), an illegal checksum subtraction is done, subtracting hdr_csum (in host byte order) from csum_value (in network byte order). Despite being illegal, it generally works, because it turns out the value subtracted is (or should be) always 0, which has the same representation in either byte order. Doing illegal operations is not good form though, so fix this by verifying the IP header checksum early in that function. If its checksum is non-zero, the packet will be bad, so just return an error. This will cause the packet to passed to the IP layer where it can be dropped. Thereafter, there is no need subtract the IP header checksum from the checksum value in the trailer because we know it is zero. Add a comment explaining this. This type of packet error is different from other types, so add a new statistics counter to track this condition. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 874a333f7472b2cb57d8528cb26089858ca91005 Author: Alex Elder Date: Fri Jun 11 14:05:25 2021 -0500 net: qualcomm: rmnet: simplify rmnet_map_get_csum_field() The checksum fields of the TCP and UDP header structures already have type __sum16. We don't support any other protocol headers, so we can simplify rmnet_map_get_csum_field(), getting rid of the local variable entirely and just returning the appropriate address. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1d257f45ef66796526425afc7d0a9d4dbf57fbb9 Author: Alex Elder Date: Fri Jun 11 14:05:24 2021 -0500 net: qualcomm: rmnet: get rid of some local variables The value passed as an argument to rmnet_map_ipv4_ul_csum_header() is always an IPv4 header. Rather than using a local variable, just have the type of the argument reflect the proper type. In rmnet_map_ipv6_ul_csum_header() things are defined a little differently, but make the same basic change there. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 75db5b07f8c393c216fd20f7adc9a167fc684c23 Author: Alex Elder Date: Fri Jun 11 14:05:23 2021 -0500 net: qualcomm: rmnet: eliminate some ifdefs If IPV6 is not enabled in the kernel configuration, the RMNet checksum code indicates a buffer containing an IPv6 packet is not supported. The same thing happens if a buffer contains something other than an IPv4 or IPv6 packet. We can rearrange things a bit in two functions so that some #ifdef calls can simply be eliminated. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e4517d8a7f07b18f4f0e68940e2822a1b92b471f Author: Alex Elder Date: Fri Jun 11 14:05:22 2021 -0500 net: qualcomm: rmnet: use ip_is_fragment() In rmnet_map_ipv4_dl_csum_trailer() use ip_is_fragment() to determine whether a socket buffer contains a packet fragment. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 9e4e1dd4d972667f48a36d9e89c828d8f30136f3 Merge: 5aa3bd9bc19e6 ea9b847cda647 Author: David S. Miller Date: Fri Jun 11 13:35:17 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Jake Keller says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-06-11 Extend the ice driver to support basic PTP clock functionality for E810 devices. This includes some tangential work required to setup the sideband queue and driver shared parameters as well. This series only supports E810-based devices. This is because other devices based on the E822 MAC use a different and more complex PHY. The low level device functionality is kept within ice_ptp_hw.c and is designed to be extensible for supporting E822 devices in a future series. This series also only supports very basic functionality including the ptp_clock device and timestamping. Support for configuring periodic outputs and external input timestamps will be implemented in a future series. There are a couple of potential "what? why?" bits in this series I want to point out: 1) the PTP hardware functionality is shared between multiple functions. This means that the same clock registers are shared across multiple PFs. In order to avoid contention or clashing between PFs, firmware assigns "ownership" to one PF, while other PFs are merely "associated" with the timer. Because we share the hardware resource, only the clock owner will allocate and register a PTP clock device. Other PFs determine the appropriate PTP clock index to report by using a firmware interface to read a shared parameter that is set by the owning PF. 2) the ice driver uses its own kthread instead of using do_aux_work. This is because the periodic and asynchronous tasks are necessary for all PFs, but only one PF will allocate the clock. The series is broken up into functional pieces to allow easy review. ==================== Signed-off-by: David S. Miller commit 5aa3bd9bc19e687e884f5da348a0d117b6ed1f04 Merge: 57806b28752b7 184039eefeaea Author: David S. Miller Date: Fri Jun 11 13:32:47 2021 -0700 Merge branch 'virtio-vsock-seqpacket' Arseny Krasnov says: ==================== virtio/vsock: introduce SOCK_SEQPACKET support This patchset implements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees to save record boundaries, so to do it, new bit for field 'flags' was added: SEQ_EOR. This bit is set to 1 in last RW packet of message. Now as packets of one socket are not reordered neither on vsock nor on vhost transport layers, such bit allows to restore original message on receiver's side. If user's buffer is smaller than message length, when all out of size data is dropped. Maximum length of datagram is limited by 'peer_buf_alloc' value. Implementation also supports 'MSG_TRUNC' flags. Tests also implemented. Thanks to stsp2@yandex.ru for encouragements and initial design recommendations. ==================== Signed-off-by: David S. Miller commit 184039eefeaeab02abf7552504d2950dccf8785b Author: Arseny Krasnov Date: Fri Jun 11 14:14:20 2021 +0300 virtio/vsock: update trace event for SEQPACKET Add SEQPACKET socket type to vsock trace event. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit 41b792d7a86dd7fc77d5877e814d322e9f7efa75 Author: Arseny Krasnov Date: Fri Jun 11 14:14:04 2021 +0300 vsock_test: add SOCK_SEQPACKET tests Implement two tests of SOCK_SEQPACKET socket: first sends data by several 'write()'s and checks that number of 'read()' were same. Second test checks MSG_TRUNC flag. Cases for connect(), bind(), etc. are not tested, because it is same as for stream socket. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit 6e90a57795aa6ab2ab65fd6ac76ee0b245e5988a Author: Arseny Krasnov Date: Fri Jun 11 14:13:50 2021 +0300 vsock/loopback: enable SEQPACKET for transport Add SEQPACKET ops for loopback transport and 'seqpacket_allow()' callback. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit ced7b713711fdd8f99d8d04dc53451441d194c60 Author: Arseny Krasnov Date: Fri Jun 11 14:13:37 2021 +0300 vhost/vsock: support SEQPACKET for transport When received packet is copied to guests's rx queue, data buffers of rx queue could be smaller that data buffer of input packet, so data of input packet is copied to each rx buffer, thus each rx buffer will be a packet with dynamically created header. Fields of such header are initialized from header of input packet(except length field which value is depends on number of bytes copied to rx buffer). But in SEQPACKET case, we also need to take care of record delimeter bit: if input packet has this bit set, we don't copy it to header of packet in rx buffer, except case when such rx buffer is last part of input packet. Otherwise, we will get sequence of packets with delimeter bit set, thus braking record bounds. Also remove ignore of non-stream type of packets, handle SEQPACKET feature bit. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit 53efbba12cc7ea2aa47d888532fdc1b3b43afef0 Author: Arseny Krasnov Date: Fri Jun 11 14:13:22 2021 +0300 virtio/vsock: enable SEQPACKET for transport To make transport work with SOCK_SEQPACKET add two things: 1) SOCK_SEQPACKET ops for virtio transport and 'seqpacket_allow()' callback. 2) Handling of SEQPACKET bit: guest tries to negotiate it with vhost, so feature will be enabled only if bit is negotiated with device. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit 9ac841f5e9f261245d9d2841ad123566bd160a6e Author: Arseny Krasnov Date: Fri Jun 11 14:13:06 2021 +0300 virtio/vsock: rest of SOCK_SEQPACKET support Small updates to make SOCK_SEQPACKET work: 1) Send SHUTDOWN on socket close for SEQPACKET type. 2) Set SEQPACKET packet type during send. 3) Set 'VIRTIO_VSOCK_SEQ_EOR' bit in flags for last packet of message. 4) Implement data check function for SEQPACKET. 5) Check for max datagram size. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit e4b1ef152f53d5ea0cae89f12f241f7293657718 Author: Arseny Krasnov Date: Fri Jun 11 14:12:53 2021 +0300 virtio/vsock: add SEQPACKET receive logic Update current receive logic for SEQPACKET support: performs check for packet and socket types on receive(if mismatch, then reset connection). Increment EOR counter on receive. Also if buffer of new packet was appended to buffer of last packet in rx queue, update flags of last packet with flags of new packet. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit 44931195a5412a97c46d299227fbabad4e09010d Author: Arseny Krasnov Date: Fri Jun 11 14:12:38 2021 +0300 virtio/vsock: dequeue callback for SOCK_SEQPACKET Callback fetches RW packets from rx queue of socket until whole record is copied(if user's buffer is full, user is not woken up). This is done to not stall sender, because if we wake up user and it leaves syscall, nobody will send credit update for rest of record, and sender will wait for next enter of read syscall at receiver's side. So if user buffer is full, we just send credit update and drop data. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit f07b2a5b04d4a50d931a0afe4e3e114ce09a2e4b Author: Arseny Krasnov Date: Fri Jun 11 14:12:22 2021 +0300 virtio/vsock: defines and constants for SEQPACKET Add set of defines and constants for SOCK_SEQPACKET support in vsock. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit c10844c5979992fde734f566357059e4a7c815bc Author: Arseny Krasnov Date: Fri Jun 11 14:12:08 2021 +0300 virtio/vsock: simplify credit update function API This function is static and 'hdr' arg was always NULL. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit b93f8877c1f2e3d3dcdec7759c5de3d67777f45d Author: Arseny Krasnov Date: Fri Jun 11 14:11:31 2021 +0300 virtio/vsock: set packet's type in virtio_transport_send_pkt_info() There is no need to set type of packet which differs from type of socket, so move passing type of packet from 'info' structure to 'virtio_transport_send_pkt_info()' function. Since at current time only stream type is supported, set it directly in 'virtio_ transport_send_pkt_info()', so callers don't need to set it. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 8cb48554ad822fb8553380b4781ea65f1e3ca7bb Author: Arseny Krasnov Date: Fri Jun 11 14:11:18 2021 +0300 af_vsock: update comments for stream sockets Replace 'stream' to 'connection oriented' in comments as SEQPACKET is also connection oriented. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 0798e78b102b79ed9fe4b2beeb18cf0db117c79b Author: Arseny Krasnov Date: Fri Jun 11 14:11:04 2021 +0300 af_vsock: rest of SEQPACKET support Add socket ops for SEQPACKET type and .seqpacket_allow() callback to query transports if they support SEQPACKET. Also split path for data check for STREAM and SEQPACKET branches. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit fbe70c480796d9052fcc786c76e6b029acb1c7bc Author: Arseny Krasnov Date: Fri Jun 11 14:10:49 2021 +0300 af_vsock: implement send logic for SEQPACKET Update current stream enqueue function for SEQPACKET support: 1) Call transport's seqpacket enqueue callback. 2) Return value from enqueue function is whole record length or error for SOCK_SEQPACKET. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 9942c192b256bc11cc903f89f4057bc97434dee9 Author: Arseny Krasnov Date: Fri Jun 11 14:10:34 2021 +0300 af_vsock: implement SEQPACKET receive loop Add receive loop for SEQPACKET. It looks like receive loop for STREAM, but there are differences: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because there is no sense for these values in SEQPACKET case. 3) It waits until whole record is received. 4) It processes and sets 'MSG_TRUNC' flag. So to avoid extra conditions for two types of socket inside one loop, two independent functions were created. Signed-off-by: Arseny Krasnov Signed-off-by: David S. Miller commit 19c1b90e1979c3974cd6a3ec0cbb886a84278d84 Author: Arseny Krasnov Date: Fri Jun 11 14:10:21 2021 +0300 af_vsock: separate receive data loop Some code in receive data loop could be shared between SEQPACKET and STREAM sockets, while another part is type specific, so move STREAM specific data receive logic to '__vsock_stream_recvmsg()' dedicated function, while checks, that will be same for both STREAM and SEQPACKET sockets, stays in 'vsock_connectible_recvmsg()'. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit b3f7fd54881bcba5dc529935f38df649167803b1 Author: Arseny Krasnov Date: Fri Jun 11 14:10:07 2021 +0300 af_vsock: separate wait data loop Wait loop for data could be shared between SEQPACKET and STREAM sockets, so move it to dedicated function. While moving the code around, let's update an old comment. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit a9e29e5511b9e68b64e9031edb7b7f8920ad3de1 Author: Arseny Krasnov Date: Fri Jun 11 14:09:47 2021 +0300 af_vsock: update functions for connectible socket Prepare af_vsock.c for SEQPACKET support: rename some functions such as setsockopt(), getsockopt(), connect(), recvmsg(), sendmsg() in general manner, because they are shared with stream sockets. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 57806b28752b778d7daeabcf4719f7522631a778 Merge: 52e597d3e2e6e b1dc20407b592 Author: David S. Miller Date: Fri Jun 11 13:21:11 2021 -0700 Merge branch 'octeontx2-trusted-vf' Naveen Mamindlapalli says: ==================== octeontx2: Add trusted VF support This series adds support for trusted VF. The trusted VF support allows VFs to perform priviliged operations such as setting VF interface in promiscuous mode, all-multicast mode and also changing the VF MAC address even if it was asssigned by PF. Patches #1 and #2 provides the necessary functionality for supporting promiscuous and multicast packets on both the PF and VF. Patches #3 and #4 enable trusted VF configuration support. ==================== Signed-off-by: David S. Miller commit b1dc20407b5920d9058c2d1b021a44c32acbf8fa Author: Hariprasad Kelam Date: Fri Jun 11 15:12:05 2021 +0530 octeontx2-pf: add support for ndo_set_vf_trust Add support for setting a VF as a trusted VF by PF admin. Trusted VF feature allows VFs to perform priviliged operations such as enabling VF promiscuous mode, all-multicast mode and changing the VF MAC address even if it was assigned by PF. Signed-off-by: Hariprasad Kelam Signed-off-by: Naveen Mamindlapalli Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit bd4302b8fd166a8424af9ac2435aeb4514d811f5 Author: Hariprasad Kelam Date: Fri Jun 11 15:12:04 2021 +0530 octeontx2-af: add new mailbox to configure VF trust mode Add new mailbox to enable PF to configure VF as trusted VF. Trusted VF feature allows VFs to perform priviliged operations such as enabling VF promiscuous mode, all-multicast mode and changing the VF MAC address configured by PF. Refactored the VF interface flags maintained by the AF driver such that the flags do not overlap for various configurations. Signed-off-by: Hariprasad Kelam Signed-off-by: Naveen Mamindlapalli Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit cbc100aa220556d056272f07dc735c9758089da9 Author: Naveen Mamindlapalli Date: Fri Jun 11 15:12:03 2021 +0530 octeontx2-nicvf: add ndo_set_rx_mode support for multicast & promisc Add ndo_set_rx_mode callback handler to configure promisc, multicast and allmulti options for VF driver. Also, modified PF driver ndo_set_rx_mode handler to support multicast and promisc mode independently. Signed-off-by: Naveen Mamindlapalli Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 967db3529ecac305d230aa4e60abddf6ab63543a Author: Naveen Mamindlapalli Date: Fri Jun 11 15:12:02 2021 +0530 octeontx2-af: add support for multicast/promisc packet replication feature Currently, multicast packet filtering is accomplished by installing MCAM rule that matches all-multicast MAC address and has its NPC_RX_ACTION set to unicast to PF. Similarly promisc feature is achieved by installing MCAM rule that matches all the traffic received by the channel and unicast the packets to PF. This approach only applies to PF and is not scalable across VFs. This patch adds support for PF/VF multicast and promisc feature by reserving NIX_RX_MCE_S entries from the global MCE list allocated during NIX block initialization. The NIX_RX_MCE_S entries create a linked list with a flag indicating the end of the list, and each entry points to a PF_FUNC (either PF or VF). When a packet NPC_RX_ACTION is set to MCAST, the corresponding NIX_RX_MCE_S list is traversed and the packet is queued to each PF_FUNC available on the list. The PF or VF driver adds the multicast/promisc packet match entry and updates the MCE list with correspondng PF_FUNC. When a PF or VF interface is disabled, the corresponding NIX_RX_MCE_S entry is removed from the MCE list and the MCAM entry will be disabled if the list is empty. Signed-off-by: Naveen Mamindlapalli Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: David S. Miller commit 03fc4cf45d30533d54f0f4ebc02aacfa12f52ce2 Author: Mark Yacoub Date: Fri Jun 4 13:01:07 2021 -0400 drm/amd/display: Verify Gamma & Degamma LUT sizes in amdgpu_dm_atomic_check For each CRTC state, check the size of Gamma and Degamma LUTs so unexpected and larger sizes wouldn't slip through. TEST: IGT:kms_color::pipe-invalid-gamma-lut-sizes v2: fix assignments in if clauses, Mark's email. Reviewed-by: Harry Wentland Signed-off-by: Mark Yacoub Signed-off-by: Alex Deucher commit 52e597d3e2e6e5bfce47559eb22b955ac17b3826 Author: Wong Vee Khee Date: Fri Jun 11 17:02:38 2021 +0800 net: stmmac: Fix potential integer overflow The commit d96febedfde2 ("net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptors") introduced the following coverity warning:- 1. Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) overflow_before_widen: Potentially overflowing expression 'tx_q->cur_tx * desc_size' with type 'unsigned int' (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type dma_addr_t (64 bits, unsigned). Fixed this by assigning tx_tail_addr to dma_addr_t type, as dma_addr_t datatype is decided by CONFIG_ARCH_DMA_ADDR_T_64_BIT. Fixes: d96febedfde2 ("net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptors") Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 8ee1a0eed16a221c7078848ac165d4d57dad8784 Author: Yang Yingliang Date: Fri Jun 11 16:04:09 2021 +0800 net: mdio: mscc-miim: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 975f62626790dca9c085db0f47885bfef558f547 Merge: 3e6dc7b650250 3264f599c1a83 Author: David S. Miller Date: Fri Jun 11 13:08:53 2021 -0700 Merge branch 'dpaa2-ACPI' Ioana Ciornei says: ==================== ACPI support for dpaa2 driver This patch set provides ACPI support to DPAA2 network drivers. It also introduces new fwnode based APIs to support phylink and phy layers Following functions are defined: phylink_fwnode_phy_connect() fwnode_mdiobus_register_phy() fwnode_get_phy_id() fwnode_phy_find_device() device_phy_find_device() fwnode_get_phy_node() fwnode_mdio_find_device() acpi_get_local_address() First one helps in connecting phy to phylink instance. Next three helps in getting phy_id and registering phy to mdiobus Next two help in finding a phy on a mdiobus. Next one helps in getting phy_node from a fwnode. Last one is used to get local address from _ADR object. Corresponding OF functions are refactored. Tested-on: LX2160ARDB Changes in v9: - merged some minimal changes requested in the wording of the commit messages - fixed some build problems in patch 8/15 by moving the removal of of_find_mii_timestamper from patch 8/15 to 9/15. Changes in v8: - fixed some checkpatch warnings/checks - included linux/fwnode_mdio.h in fwnode_mdio.c (fixed the build warnings) - added fwnode_find_mii_timestamper() and fwnode_mdiobus_phy_device_register() in order to get rid of the cycle dependency. - change to 'depends on (ACPI || OF) || COMPILE_TEST (for FWNODE_MDIO) - remove the fwnode_mdiobus_register from fwnode_mdio.c since it introduces a cycle of dependencies. Changes in v7: - correct fwnode_mdio_find_device() description - check NULL in unregister_mii_timestamper() - Call unregister_mii_timestamper() without NULL check - Create fwnode_mdio.c and move fwnode_mdiobus_register_phy() - include fwnode_mdio.h - Include headers directly used in acpi_mdio.c - Move fwnode_mdiobus_register() to fwnode_mdio.c - Include fwnode_mdio.h - Alphabetically sort header inclusions - remove unnecassary checks Changes in v6: - Minor cleanup - fix warning for function parameter of fwnode_mdio_find_device() - Initialize mii_ts to NULL - use GENMASK() and ACPI_COMPANION_SET() - some cleanup - remove unwanted header inclusion - remove OF check for fixed-link - use dev_fwnode() - remove useless else - replace of_device_is_available() to fwnode_device_is_available() Changes in v5: - More cleanup - Replace fwnode_get_id() with acpi_get_local_address() - add missing MODULE_LICENSE() - replace fwnode_get_id() with OF and ACPI function calls - replace fwnode_get_id() with OF and ACPI function calls Changes in v4: - More cleanup - Improve code structure to handle all cases - Remove redundant else from fwnode_mdiobus_register() - Cleanup xgmac_mdio_probe() - call phy_device_free() before returning Changes in v3: - Add more info on legacy DT properties "phy" and "phy-device" - Redefine fwnode_phy_find_device() to follow of_phy_find_device() - Use traditional comparison pattern - Use GENMASK - Modified to retrieve reg property value for ACPI as well - Resolved compilation issue with CONFIG_ACPI = n - Added more info into documentation - Use acpi_mdiobus_register() - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes in v2: - Updated with more description in document - use reverse christmas tree ordering for local variables - Refactor OF functions to use fwnode functions ==================== Signed-off-by: David S. Miller commit 3264f599c1a83a08a172031a647ca5c1f30411b3 Author: Calvin Johnson Date: Fri Jun 11 13:54:01 2021 +0300 net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver Modify dpaa2_mac_get_node() to get the dpmac fwnode from either DT or ACPI. Modify dpaa2_mac_get_if_mode() to get interface mode from dpmac_node which is a fwnode. Modify dpaa2_pcs_create() to create pcs from dpmac_node fwnode. Modify dpaa2_mac_connect() to support ACPI along with DT. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Rafael J. Wysocki # from the ACPI side Acked-by: Grant Likely Signed-off-by: David S. Miller commit 423e6e8946f5bb1f7ec3c0b562ab89becad82629 Author: Calvin Johnson Date: Fri Jun 11 13:54:00 2021 +0300 net: phylink: Refactor phylink_of_phy_connect() Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 25396f680dd6257096c5dc6ceb90ce57caba8de1 Author: Calvin Johnson Date: Fri Jun 11 13:53:59 2021 +0300 net: phylink: introduce phylink_fwnode_phy_connect() Define phylink_fwnode_phy_connect() to connect phy specified by a fwnode to a phylink instance. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 15e7064e8793352a44f65f3c18a4d84a625d95c2 Author: Calvin Johnson Date: Fri Jun 11 13:53:58 2021 +0300 net/fsl: Use [acpi|of]_mdiobus_register Depending on the device node type, call the specific OF or ACPI mdiobus_register function. Note: For both ACPI and DT cases, endianness of MDIO controllers need to be specified using the "little-endian" property. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit 803ca24d2f92e2cf393df4705423f7b09a5eabd9 Author: Calvin Johnson Date: Fri Jun 11 13:53:57 2021 +0300 net: mdio: Add ACPI support code for mdio Define acpi_mdiobus_register() to Register mii_bus and create PHYs for each ACPI child node. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Rafael J. Wysocki Acked-by: Grant Likely Signed-off-by: David S. Miller commit 7ec16433cf1e97cfc823e50e9ee4e2fd3abfc4ee Author: Calvin Johnson Date: Fri Jun 11 13:53:56 2021 +0300 ACPI: utils: Introduce acpi_get_local_address() Introduce a wrapper around the _ADR evaluation. Signed-off-by: Calvin Johnson Reviewed-by: Andy Shevchenko Signed-off-by: Ioana Ciornei Acked-by: Rafael J. Wysocki Acked-by: Grant Likely Signed-off-by: David S. Miller commit 8d2cb3ad31181f050af4d46d6854cf332d1207a9 Author: Calvin Johnson Date: Fri Jun 11 13:53:55 2021 +0300 of: mdio: Refactor of_mdiobus_register_phy() Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Also, remove the of_find_mii_timestamper() since the fwnode variant is used instead. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit bc1bee3b87ee48bd97ef7fd306445132ba2041b0 Author: Calvin Johnson Date: Fri Jun 11 13:53:54 2021 +0300 net: mdiobus: Introduce fwnode_mdiobus_register_phy() Introduce fwnode_mdiobus_register_phy() to register PHYs on the mdiobus. From the compatible string, identify whether the PHY is c45 and based on this create a PHY device instance which is registered on the mdiobus. Along with fwnode_mdiobus_register_phy() also introduce fwnode_find_mii_timestamper() and fwnode_mdiobus_phy_device_register() since they are needed. While at it, also use the newly introduced fwnode operation in of_mdiobus_phy_device_register(). Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit b9926da003cab58594803a2bc5a1d5bd7c670eba Author: Calvin Johnson Date: Fri Jun 11 13:53:53 2021 +0300 net: mii_timestamper: check NULL in unregister_mii_timestamper() Callers of unregister_mii_timestamper() currently check for NULL value of mii_ts before calling it. Place the NULL check inside unregister_mii_timestamper() and update the callers accordingly. Signed-off-by: Calvin Johnson Reviewed-by: Andy Shevchenko Suggested-by: Andy Shevchenko Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit cf99686072a1b7037a1d782b66037b2b722bf2c9 Author: Calvin Johnson Date: Fri Jun 11 13:53:52 2021 +0300 of: mdio: Refactor of_get_phy_id() With the introduction of fwnode_get_phy_id(), refactor of_get_phy_id() to use fwnode equivalent. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit 114dea60043b8f0c82c67dd281719ef8919c2416 Author: Calvin Johnson Date: Fri Jun 11 13:53:51 2021 +0300 net: phy: Introduce fwnode_get_phy_id() Extract phy_id from compatible string. This will be used by fwnode_mdiobus_register_phy() to create phy device using the phy_id. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit 2d7b8bf1fa7afab77f106b67ec6e3d524e3745ca Author: Calvin Johnson Date: Fri Jun 11 13:53:50 2021 +0300 of: mdio: Refactor of_phy_find_device() Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit 425775ed31a6fac8b66ab077f7936fafad895ef6 Author: Calvin Johnson Date: Fri Jun 11 13:53:49 2021 +0300 net: phy: Introduce phy related fwnode functions Define fwnode_phy_find_device() to iterate an mdiobus and find the phy device of the provided phy fwnode. Additionally define device_phy_find_device() to find phy device of provided device. Define fwnode_get_phy_node() to get phy_node using named reference. Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit 0fb16976765143cf0d7d0dd78b3f406ab135c494 Author: Calvin Johnson Date: Fri Jun 11 13:53:48 2021 +0300 net: phy: Introduce fwnode_mdio_find_device() Define fwnode_mdio_find_device() to get a pointer to the mdio_device from fwnode passed to the function. Refactor of_mdio_find_device() to use fwnode_mdio_find_device(). Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Grant Likely Signed-off-by: David S. Miller commit e71305acd81cac222c41849e538c5c661b12c584 Author: Calvin Johnson Date: Fri Jun 11 13:53:47 2021 +0300 Documentation: ACPI: DSD: Document MDIO PHY Introduce a mechanism based on generic ACPI _DSD device properties definition [1] to get PHYs registered on a MDIO bus and provide them to be connected to MAC. [1] http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf Describe properties "phy-handle" and "phy-mode". Signed-off-by: Calvin Johnson Signed-off-by: Ioana Ciornei Acked-by: Rafael J. Wysocki Acked-by: Grant Likely Signed-off-by: David S. Miller commit 3a07101b0405c6137babd5f50ca6bdf2696d91c9 Author: Hawking Zhang Date: Mon Jun 7 13:22:08 2021 +0800 drm/amdgpu: disable DRAM memory training when GECC is enabled GECC and G6 mem training are mutually exclusive functionalities. VBIOS/PSP will set the flag (BOOT_CFG_FEATURE_TWO_STAGE_DRAM_TRAINING) in runtime database to indicate whether dram memory training need to be disabled or not. For Navi1x families, two stage mem training is always enabled. Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 8e6e054da6c72210966c82f7d3e7a3d014bd0b39 Author: Hawking Zhang Date: Mon Jun 7 11:02:13 2021 +0800 drm/amdgpu: cache psp runtime boot_cfg_bitmask in sw_int PSP runtime boot_cfg_bitmask carries various psp bl feature bit mask that can be used by driver. Cache it in sw_init for further usage. Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3d689ae4a9741d60352e947f614079e2d3df8b44 Author: Hawking Zhang Date: Mon Jun 7 20:31:30 2021 +0800 drm/amdgpu: add helper function to query psp runtime db entry (v2) PSP will dump various boot up information into a portion of local frame buffer, called runtime database. The helper function is used for driver to query those shared information. v2: init ret and check !ret to exit loop as soon as found the entry Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 990ec3014deedfed49e610cdc31dc6930ca63d8d Author: Hawking Zhang Date: Wed May 26 16:18:40 2021 +0800 drm/amdgpu: add psp runtime db structures PSP runtime database is used to share various boot up information with driver. Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 6246a416eb870bb9998eb40fcfa116a0fd9bf7e0 Author: Hawking Zhang Date: Mon Jun 7 20:17:02 2021 +0800 drm/amdgpu: enable dynamic GECC support (v2) Dynamic GECC allows user to specify GECC enablement status, which will take effect in next boot cycle. v2: initialize boot_cfg to 0xFF Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit c6642234919c1cc11d2097c0868085ee19912477 Author: Hawking Zhang Date: Tue May 25 23:57:14 2021 +0800 drm/amdgpu: add helper function to query gecc status in boot config Query GECC enablement status in boot config Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 55188d64edd72a33bc8fd0e42703140ce8e80bb0 Author: Hawking Zhang Date: Tue May 25 21:20:44 2021 +0800 drm/amdgpu: allow different boot configs More boot configs need to be supported via BOOTCFG_CMD_SET Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit b08be1209ef27690af4c3581de0ff7ed2136f26e Author: Hawking Zhang Date: Tue May 25 20:16:11 2021 +0800 drm/amdgpu: update psp gfx i/f to support dynamic GECC psp_gfx_uresp_bootcfg is used to inform driver bootcfg settings maintained by tOS Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 7642c56a20b6c3fc8ddeba937f4ee941404b7d17 Author: Alex Sierra Date: Thu Jun 10 21:10:11 2021 -0500 drm/amdkfd: move CoherentHostAccess prop to HSA_CAPABILITY CoherentHostAccess flag support has moved from HSA_MEMORYPROPERTY to HSA_CAPABILITY struct. Proper changes have made also at the thunk to support this change. CoherentHostAccess: whether or not device memory can be coherently accessed by the host CPU. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit fb59a9209cba7d2bc9eaf3e8b54bdde89640b0b4 Author: Aurabindo Pillai Date: Fri Jun 11 10:31:04 2021 -0400 drm/amd/display: add dummy PG callback for beige goby [Why&How] PG registers are absent in beige goby, so programming these registers generate call trace. Fix this by adding a dummy function in dcn303 initialization function which prevents writing to non existant registers. Fixes: cd6d421e3d1ad5 ("drm/amd/display: Initial DC support for Beige Goby") Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ac3fbe3b2cc862b26431476dce8f7758db301789 Author: Sathishkumar S Date: Wed Jun 9 13:49:36 2021 +0530 drm/amd/pm: support ss metrics read on yellow_carp add support to read smart shift apu and dgpu power share on yellow_carp Signed-off-by: Sathishkumar S Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 7b32dd0bfd60e9ab9e4463bf5b2cb514966f82ff Author: Sathishkumar S Date: Tue Jun 1 14:39:36 2021 +0530 drm/amd/pm: support ss metrics read on renoir add support to read smart shift apu and dgpu power share on renoir. Signed-off-by: Sathishkumar S Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3be4dca197010d1328df8b11febc8c40491be498 Author: Eric Huang Date: Thu Jun 10 14:48:28 2021 -0400 drm/amdkfd: Add memory sync before TLB flush on unmap It is to fix a failure for SDMA updating PTEs. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a3fbb0d8102a678486d958c8944400a7d7461090 Author: Guchun Chen Date: Wed Jun 9 17:19:06 2021 +0800 drm/amdgpu: use adev_to_drm macro for consistency (v2) Use adev_to_drm() to get to the drm_device pointer. Signed-off-by: Guchun Chen Reviewed-by: Luben Tuikov Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 29b4ac0ed9130229cf518edab01fd6b20d9f1c92 Author: YuBiao Wang Date: Wed Jun 9 10:41:34 2021 +0800 drm/amdgpu: reset psp ring wptr during ring_create [Why] psp ring wptr is not initialized properly in ring_create, which would lead to psp failure after several gpu reset. [How] Set ring_wptr to zero in psp_ring_create. Signed-off-by: YuBiao Wang Reviewed-by: Horace Chen Signed-off-by: Alex Deucher commit 076f55a45e9e41fcbc377ad064f10f29b26dc298 Author: Lijo Lazar Date: Wed Jun 9 14:38:32 2021 +0800 drm/amd/pm: Only primary die supports power data On aldebaran, only primary die fetches valid power data. Show power/energy values as 0 on secondary die. Also, power limit should not be set through secondary die. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 488f211dab7d2fbd115b412848075c4c545e3471 Author: Evan Quan Date: Wed May 19 12:22:04 2021 +0800 drm/amd/pm: correct the power limits reporting on OOB supported As OOB(out-of-band) interface may be used to update the power limits. Thus to make sure the power limits reporting of our driver always reflects the correct values, the internal cache must be aligned carefully. V2: add support for out-of-band of other ASICs align cached current power limit with OOB imposed Signed-off-by: Evan Quan Reviewed-By: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit c89d2a2fe08656b1db7107a19ac9db8d45fa1f8e Author: Peng Ju Zhou Date: Thu Jun 3 18:32:14 2021 +0800 drm/amd/amdgpu: add instance_number check in amdgpu_discovery_get_ip_version The original code returns IP version of instantce_0 for every IP. This implementation may be correct for most of IPs. However, for certain IP block (VCN for example), it may have 2 instances and both of them have the same hw_id, BUT they have different revision number (0 and 1). In this case, the original amdgpu_discovery_get_ip_version cannot correct reflects the result and returns false information Signed-off-by: Bokun Zhang Signed-off-by: Peng Ju Zhou Signed-off-by: Alex Deucher commit 2f0cf910379863c1e26a5cf52fd6d017b13ce6e8 Author: Evan Quan Date: Tue May 25 10:47:41 2021 +0800 drm/amd/pm: correct the dpm features disablement for Navi1x For BACO scenario, PMFW will handle the dpm features disablement and interaction with RLC properly. Driver involvement is unnecessary and error prone. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 1e75be2b674932b53ed1bdd7df35f89e47585388 Author: Evan Quan Date: Mon Dec 7 15:50:08 2020 +0800 drm/amd/pm: update the cached dpm feature status For some ASICs, the real dpm feature disablement job is handled by PMFW during baco reset and custom pptable loading. Cached dpm feature status need to be updated to pair that. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 415e51bdcfa0e724172f66ce12d8ef7819fdd1c7 Author: Evan Quan Date: Tue May 25 10:28:04 2021 +0800 drm/amdgpu: make audio dev's D-state transition PMFW-aware To correctly kick into BACO state, the audio dev's D-state transition(D0->D3) needs to be PMFW-aware. So, if the audio dev entered D3 state prior to our driver, we need to bring it back to D0 state and make sure there will be a D-state transition on runpm suspend. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3e6dc7b650250f88b8f2a62ed0edac8df951e952 Author: Wong Vee Khee Date: Fri Jun 11 15:11:43 2021 +0800 net: stmmac: Fix unused values warnings The commit 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX") introduced the converity warnings:- 1. Unused value (UNUSED_VALUE) assigned_value: Assigning value REQ_IRQ_ERR_MAC to irq_err here, but that stored value is not used. 2. Unused value (UNUSED_VALUE) assigned_value: Assigning value REQ_IRQ_ERR_NO to irq_err here, but that stored value is overwritten before it can used. 3. Unused value (UNUSED_VALUE) assigned_value: Assigning value REQ_IRQ_ERR_WOL to irq_err here, but that stored value is not used. Fixed these by removing the unnecessary value assignments. Fixes: 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX") Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 13d75eadfa1a57fa2e22ab15ac3d8d18fd6ef462 Author: Evan Quan Date: Fri Mar 26 13:56:32 2021 +0800 drm/amd/pm: correct the runpm handling for BACO supported ASIC Via the fSMC_MSG_ArmD3 message, PMFW can properly act on the Dstate change. Driver involvement for determining the timing for BACO enter/exit is not needed. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 5f0f1727c46ef551acf87c2ce3c616dc8798a15d Author: Evan Quan Date: Tue May 25 11:05:32 2021 +0800 drm/amd/pm: drop the incomplete fix for Navi14 runpm issue As the fix by adding PPSMC_MSG_PrepareMp1ForUnload is proved to be incomplete. Another fix(see link below) has been sent out. Link: https://lore.kernel.org/linux-pci/20210602021255.939090-1-evan.quan@amd.com/ Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 4a2c7217cd5a87e85ceb761e307b030fe6db4805 Author: Oleksij Rempel Date: Fri Jun 11 05:55:59 2021 +0200 net: usb: asix: ax88772: manage PHY PM from MAC Take over PHY power management, otherwise PHY framework will try to access ASIX MDIO bus before MAC resume was completed. Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support") Signed-off-by: Oleksij Rempel Reported-by: Marek Szyprowski Reported-by: Jon Hunter Suggested-by: Heiner Kallweit Tested-by: Jon Hunter Tested-by: Marek Szyprowski Signed-off-by: David S. Miller commit d41783b355d75db055e439a99d8bc47e67a93eb0 Merge: 51a1ebc35b46d ef1806a8b9615 Author: David S. Miller Date: Fri Jun 11 12:58:12 2021 -0700 Merge branch 'pc300too' Peng Li says: ==================== net: pc300too: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit ef1806a8b9615923c0719548b5fc96a9daa037b1 Author: Peng Li Date: Fri Jun 11 11:36:22 2021 +0800 net: pc300too: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit eed00311659fc5aaae7689b46c7740350199477d Author: Peng Li Date: Fri Jun 11 11:36:21 2021 +0800 net: pc300too: add some required spaces Add spaces required before the open parenthesis '('. Add spaces required after that close brace '}'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 0cd2135cf83dd183d3fe05658e17b67b5f6cba86 Author: Peng Li Date: Fri Jun 11 11:36:20 2021 +0800 net: pc300too: replace comparison to NULL with "!card->plxbase" According to the chackpatch.pl, comparison to NULL could be written "!card->plxbase". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit ae6440483b545176b888bfe74971aa40a5749d46 Author: Peng Li Date: Fri Jun 11 11:36:19 2021 +0800 net: pc300too: remove redundant initialization for statics Should not initialise statics to 0. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit d72f78db55d6daa4542668de1b2cb4f974708a99 Author: Peng Li Date: Fri Jun 11 11:36:18 2021 +0800 net: pc300too: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit f8864e26d3118ccf91d6a1ae5cdd18f4b56b7704 Author: Peng Li Date: Fri Jun 11 11:36:17 2021 +0800 net: pc300too: fix the code style issue about "foo * bar" Fix the checkpatch error as "foo * bar" and should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: David S. Miller commit a657c8b4d50d33954a3f766c8876f31d323d32b9 Author: Peng Li Date: Fri Jun 11 11:36:16 2021 +0800 net: pc300too: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 93f764371c45bc3f1d859026f12ef6255c388a85 Author: Peng Li Date: Fri Jun 11 11:36:15 2021 +0800 net: pc300too: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 51a1ebc35b46dc322071cfa7fcd4cdcfde0c1aa4 Author: gushengxian Date: Fri Jun 11 09:33:33 2021 +0800 net: devres: Correct a grammatical error Correct a grammatical error. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 1ee8856de82faec9bc8bd0f2308a7f27e30ba207 Author: Heiner Kallweit Date: Thu Jun 10 22:56:59 2021 +0200 r8169: avoid link-up interrupt issue on RTL8106e if user enables ASPM It has been reported that on RTL8106e the link-up interrupt may be significantly delayed if the user enables ASPM L1. Per default ASPM is disabled. The change leaves L1 enabled on the PCIe link (thus still allowing to reach higher package power saving states), but the NIC won't actively trigger it. Reported-by: Koba Ko Tested-by: Koba Ko Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 43fa32d1cc1b967858ba5786b1b913527f1b10ed Author: wengjianfeng Date: Thu Jun 10 10:46:16 2021 +0800 nfc: fdp: remove unnecessary labels Some labels are meaningless, so we delete them and use the return statement instead of the goto statement. Signed-off-by: wengjianfeng Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 62d3f4af33caa3ecf2a06c064e11080857456377 Merge: e5b0a1b7b77c3 953fb4dc4f4af Author: David S. Miller Date: Fri Jun 11 12:49:15 2021 -0700 Merge branch 's390-qeyj-next' Julian Wiedmann says: ==================== s390/qeth: updates 2021-06-11 please apply the following patch series for qeth to netdev's net-next tree. This enables TX NAPI for those devices that didn't use it previously, so that we can eventually rip out the qdio layer's internal interrupt machinery. Other than that it's just the normal mix of minor improvements and cleanups. ==================== Signed-off-by: David S. Miller commit 953fb4dc4f4af63d9283d2cb386403fc24b15118 Author: Alexandra Winter Date: Fri Jun 11 09:33:41 2021 +0200 s390/qeth: Consider dependency on SWITCHDEV module Without the SWITCHDEV module, the bridgeport attribute LEARNING_SYNC of the physical device (self) does not provide any functionality. Instead of calling the no-op stub version of the switchdev functions, fail the setting of the attribute with an appropriate message. While at it, also add an error message for the 'not supported by HW' case. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit bb7032ddc947ddde42cb695b5602e040167bce18 Author: Julian Wiedmann Date: Fri Jun 11 09:33:40 2021 +0200 s390/qeth: shrink TX buffer struct Convert the large boolean array into a bitmap, this substantially reduces the struct's size. While at it also clarify the naming. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 6b7ec41e574a399ed2165ae13975c531b00e1eb8 Author: Julian Wiedmann Date: Fri Jun 11 09:33:39 2021 +0200 s390/qeth: remove TX buffer's pointer to its queue qeth_tx_complete_buf() is the only remaining user of buf->q, and the callers can easily provide this as a parameter instead. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 838e4cc80814aad973fbfdd836b2b25eb27681f1 Author: Julian Wiedmann Date: Fri Jun 11 09:33:38 2021 +0200 s390/qeth: remove QAOB's pointer to its TX buffer Maintaining a pointer inside the aob's user-definable area is fragile and unnecessary. At this stage we only need it to overload the buffer's state field, and to access the buffer's TX queue. The first part is easily solved by tracking the aob's state within the aob itself. This also feels much cleaner and self-contained. For enabling the access to the associated TX queue, we can store the queue's index in the aob. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f875d880f04970e86039c670cabfc52b0412a1b3 Author: Julian Wiedmann Date: Fri Jun 11 09:33:37 2021 +0200 s390/qeth: consolidate completion of pending TX buffers With commit 396c100472dd ("s390/qdio: let driver manage the QAOB") a pending TX buffer now has access to its associated QAOB during TX completion processing. We can thus reduce the amount of work & state propagation that needs to be done by qeth_qdio_handle_aob(). Move all this logic into the respective TX completion paths. Doing so even allows us to determine more precise TX_NOTIFY_* values via qeth_compute_cq_notification(aob->aorc, ...). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit c0a0186630fb0e9880aa4c3d6ea136146c48db56 Author: Julian Wiedmann Date: Fri Jun 11 09:33:36 2021 +0200 s390/qeth: use ethtool_sprintf() Use a recently introduced helper to fill our ethtool stats strings. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 3518ae76f2bbc465f7a0d7075fe71815e37b21c6 Author: Julian Wiedmann Date: Fri Jun 11 09:33:35 2021 +0200 s390/qeth: unify the tracking of active cmds on ccw device We have one field to track _whether_ a cmd is active on a ccw device ('irq_pending'), and one to track _which_ cmd it is ('active_cmd'). Get rid of the irq_pending field, by testing active_cmd for NULL. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 7a4b92e8e0de9cbbb623310af76b1d60cd344b1d Author: Julian Wiedmann Date: Fri Jun 11 09:33:34 2021 +0200 s390/qeth: also use TX NAPI for non-IQD devices Set scan_threshold = 0 to opt out from the qdio layer's internal tasklet & timer mechanism for TX completions, and replace it with the TX NAPI infrastructure that qeth already uses for IQD devices. This avoids the fragile logic in qdio_check_output_queue(), enables tighter integration and gives us more tuning options via ethtool in the future. For now we continue to apply the same policy as the qdio layer: scan for completions if 32 TX buffers are in use, or after 1 sec. A re-scan is done after 10 sec, but only if no TX interrupt is pending. With scan_threshold = 0 we no longer get TX completion scans from within qdio_get_next_buffers(). So trigger these manually in qeth_poll() and in the RX path switch to the equivalent qdio_inspect_queue(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e872d0c1249be74a65723664a329ef5a9113cc40 Author: Julian Wiedmann Date: Fri Jun 11 09:33:33 2021 +0200 s390/qeth: count TX completion interrupts While the qdio layer already tracks the number of HW interrupts for a device, there's value in understanding how many of them have been raised due to our TX completion logic. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e5b0a1b7b77c3df42927f4244b298fa628c0c925 Merge: f244e256e1ada 566b18c8b752f Author: David S. Miller Date: Fri Jun 11 12:45:38 2021 -0700 Merge branch 'sja1110-dsa-tagging' Vladimir Oltean says: ==================== DSA tagging driver for NXP SJA1110 This series adds support for tagging data and control packets on the new NXP SJA1110 switch (supported by the sja1105 driver). Up to this point it used the sja1105 driver, which allowed it to send data packets, but not PDUs as those required by STP and PTP. To accommodate this new tagger which has both a header and a trailer, we need to refactor the entire DSA tagging scheme, to replace the "overhead" concept with separate "needed_headroom" and "needed_tailroom" concepts, so that SJA1110 can declare its need for both. There is also some consolidation work for the receive path of tag_8021q and its callers (sja1105 and ocelot-8021q). Changes in v3: Rebase in front of the "Port the SJA1105 DSA driver to XPCS" series which seems to have stalled for now. Changes in v2: Export the dsa_8021q_rcv and sja1110_process_meta_tstamp symbols to avoid build errors as modules. ==================== Signed-off-by: David S. Miller commit 566b18c8b752f67c4e82f0eb4563dd71f84a8799 Author: Vladimir Oltean Date: Fri Jun 11 22:01:31 2021 +0300 net: dsa: sja1105: implement TX timestamping for SJA1110 The TX timestamping procedure for SJA1105 is a bit unconventional because the transmit procedure itself is unconventional. Control packets (and therefore PTP as well) are transmitted to a specific port in SJA1105 using "management routes" which must be written over SPI to the switch. These are one-shot rules that match by destination MAC address on traffic coming from the CPU port, and select the precise destination port for that packet. So to transmit a packet from NET_TX softirq context, we actually need to defer to a process context so that we can perform that SPI write before we send the packet. The DSA master dev_queue_xmit() runs in process context, and we poll until the switch confirms it took the TX timestamp, then we annotate the skb clone with that TX timestamp. This is why the sja1105 driver does not need an skb queue for TX timestamping. But the SJA1110 is a bit (not much!) more conventional, and you can request 2-step TX timestamping through the DSA header, as well as give the switch a cookie (timestamp ID) which it will give back to you when it has the timestamp. So now we do need a queue for keeping the skb clones until their TX timestamps become available. The interesting part is that the metadata frames from SJA1105 haven't disappeared completely. On SJA1105 they were used as follow-ups which contained RX timestamps, but on SJA1110 they are actually TX completion packets, which contain a variable (up to 32) array of timestamps. Why an array? Because: - not only is the TX timestamp on the egress port being communicated, but also the RX timestamp on the CPU port. Nice, but we don't care about that, so we ignore it. - because a packet could be multicast to multiple egress ports, each port takes its own timestamp, and the TX completion packet contains the individual timestamps on each port. This is unconventional because switches typically have a timestamping FIFO and raise an interrupt, but this one doesn't. So the tagger needs to detect and parse meta frames, and call into the main switch driver, which pairs the timestamps with the skbs in the TX timestamping queue which are waiting for one. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 30b73242e679fb6cdee9f00aac6e05278fef48ca Author: Vladimir Oltean Date: Fri Jun 11 22:01:30 2021 +0300 net: dsa: sja1105: add the RX timestamping procedure for SJA1110 This is really easy, since the full RX timestamp is in the DSA trailer and the tagger code transfers it to SJA1105_SKB_CB(skb)->tstamp, we just need to move it to the skb shared info region. This is as opposed to SJA1105, where the RX timestamp was received in a meta frame (so there needed to be a state machine to pair the 2 packets) and the timestamp was partial (so the packet, once matched with its timestamp, needed to be added to an RX timestamping queue where the PTP aux worker would reconstruct that timestamp). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4913b8ebf8a9c56ce66466b4daa07d7d4678cdd8 Author: Vladimir Oltean Date: Fri Jun 11 22:01:29 2021 +0300 net: dsa: add support for the SJA1110 native tagging protocol The SJA1110 has improved a few things compared to SJA1105: - To send a control packet from the host port with SJA1105, one needed to program a one-shot "management route" over SPI. This is no longer true with SJA1110, you can actually send "in-band control extensions" in the packets sent by DSA, these are in fact DSA tags which contain the destination port and switch ID. - When receiving a control packet from the switch with SJA1105, the source port and switch ID were written in bytes 3 and 4 of the destination MAC address of the frame (which was a very poor shot at a DSA header). If the control packet also had an RX timestamp, that timestamp was sent in an actual follow-up packet, so there were reordering concerns on multi-core/multi-queue DSA masters, where the metadata frame with the RX timestamp might get processed before the actual packet to which that timestamp belonged (there is no way to pair a packet to its timestamp other than the order in which they were received). On SJA1110, this is no longer true, control packets have the source port, switch ID and timestamp all in the DSA tags. - Timestamps from the switch were partial: to get a 64-bit timestamp as required by PTP stacks, one would need to take the partial 24-bit or 32-bit timestamp from the packet, then read the current PTP time very quickly, and then patch in the high bits of the current PTP time into the captured partial timestamp, to reconstruct what the full 64-bit timestamp must have been. That is awful because packet processing is done in NAPI context, but reading the current PTP time is done over SPI and therefore needs sleepable context. But it also aggravated a few things: - Not only is there a DSA header in SJA1110, but there is a DSA trailer in fact, too. So DSA needs to be extended to support taggers which have both a header and a trailer. Very unconventional - my understanding is that the trailer exists because the timestamps couldn't be prepared in time for putting them in the header area. - Like SJA1105, not all packets sent to the CPU have the DSA tag added to them, only control packets do: * the ones which match the destination MAC filters/traps in MAC_FLTRES1 and MAC_FLTRES0 * the ones which match FDB entries which have TRAP or TAKETS bits set So we could in theory hack something up to request the switch to take timestamps for all packets that reach the CPU, and those would be DSA-tagged and contain the source port / switch ID by virtue of the fact that there needs to be a timestamp trailer provided. BUT: - The SJA1110 does not parse its own DSA tags in a way that is useful for routing in cross-chip topologies, a la Marvell. And the sja1105 driver already supports cross-chip bridging from the SJA1105 days. It does that by automatically setting up the DSA links as VLAN trunks which contain all the necessary tag_8021q RX VLANs that must be communicated between the switches that span the same bridge. So when using tag_8021q on sja1105, it is possible to have 2 switches with ports sw0p0, sw0p1, sw1p0, sw1p1, and 2 VLAN-unaware bridges br0 and br1, and br0 can take sw0p0 and sw1p0, and br1 can take sw0p1 and sw1p1, and forwarding will happen according to the expected rules of the Linux bridge. We like that, and we don't want that to go away, so as a matter of fact, the SJA1110 tagger still needs to support tag_8021q. So the sja1110 tagger is a hybrid between tag_8021q for data packets, and the native hardware support for control packets. On RX, packets have a 13-byte trailer if they contain an RX timestamp. That trailer is padded in such a way that its byte 8 (the start of the "residence time" field - not parsed by Linux because we don't care) is aligned on a 16 byte boundary. So the padding has a variable length between 0 and 15 bytes. The DSA header contains the offset of the beginning of the padding relative to the beginning of the frame (and the end of the padding is obviously the end of the packet minus 13 bytes, the length of the trailer). So we discard it. Packets which don't have a trailer contain the source port and switch ID information in the header (they are "trap-to-host" packets). Packets which have a trailer contain the source port and switch ID in the trailer. On TX, the destination port mask and switch ID is always in the trailer, so we always need to say in the header that a trailer is present. The header needs a custom EtherType and this was chosen as 0xdadc, after 0xdada which is for Marvell and 0xdadb which is for VLANs in VLAN-unaware mode on SJA1105 (and SJA1110 in fact too). Because we use tag_8021q in concert with the native tagging protocol, control packets will have 2 DSA tags. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 617ef8d9377b9aac381c023cd0823da264c2f463 Author: Vladimir Oltean Date: Fri Jun 11 22:01:28 2021 +0300 net: dsa: sja1105: make SJA1105_SKB_CB fit a full timestamp In SJA1105, RX timestamps for packets sent to the CPU are transmitted in separate follow-up packets (metadata frames). These contain partial timestamps (24 or 32 bits) which are kept in SJA1105_SKB_CB(skb)->meta_tstamp. Thankfully, SJA1110 improved that, and the RX timestamps are now transmitted in-band with the actual packet, in the timestamp trailer. The RX timestamps are now full-width 64 bits. Because we process the RX DSA tags in the rcv() method in the tagger, but we would like to preserve the DSA code structure in that we populate the skb timestamp in the port_rxtstamp() call which only happens later, the implication is that we must somehow pass the 64-bit timestamp from the rcv() method all the way to port_rxtstamp(). We can use the skb->cb for that. Rename the meta_tstamp from struct sja1105_skb_cb from "meta_tstamp" to "tstamp", and increase its size to 64 bits. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 233697b3b3f60b17d02ca2a35230aee0ac6f1759 Author: Vladimir Oltean Date: Fri Jun 11 22:01:27 2021 +0300 net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated function The added value of this function is that it can deal with both the case where the VLAN header is in the skb head, as well as in the offload field. This is something I was not able to do using other functions in the network stack. Since both ocelot-8021q and sja1105 need to do the same stuff, let's make it a common service provided by tag_8021q. This is done as refactoring for the new SJA1110 tagger, which partly uses tag_8021q as well (just like SJA1105), and will be the third caller. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ab6a303c5440156dd475b5884cff26a7245630f8 Author: Vladimir Oltean Date: Fri Jun 11 22:01:26 2021 +0300 net: dsa: tag_8021q: remove shim declarations All users of tag_8021q select it in Kconfig, so shim functions are not needed because it is not possible for it to be disabled and its callers enabled. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit baa3ad08de6d44a40b94ef1a65640b5076755f9d Author: Vladimir Oltean Date: Fri Jun 11 22:01:25 2021 +0300 net: dsa: tag_sja1105: stop resetting network and transport headers This makes no sense and is not needed, it is probably a debugging leftover. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4e50025129efabb07714c1f27a80526897da374b Author: Vladimir Oltean Date: Fri Jun 11 22:01:24 2021 +0300 net: dsa: generalize overhead for taggers that use both headers and trailers Some really really weird switches just couldn't decide whether to use a normal or a tail tagger, so they just did both. This creates problems for DSA, because we only have the concept of an 'overhead' which can be applied to the headroom or to the tailroom of the skb (like for example during the central TX reallocation procedure), depending on the value of bool tail_tag, but not to both. We need to generalize DSA to cater for these odd switches by transforming the 'overhead / tail_tag' pair into 'needed_headroom / needed_tailroom'. The DSA master's MTU is increased to account for both. The flow dissector code is modified such that it only calls the DSA adjustment callback if the tagger has a non-zero header length. Taggers are trivially modified to declare either needed_headroom or needed_tailroom, based on the tail_tag value that they currently declare. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6c0de59b3d735f4c8c704dae30db540204b496ec Author: Vladimir Oltean Date: Fri Jun 11 22:01:23 2021 +0300 net: dsa: sja1105: allow RX timestamps to be taken on all ports for SJA1110 On SJA1105, there is support for a cascade port which is presumably connected to a downstream SJA1105 switch. The upstream one does not take PTP timestamps for packets received on this port, presumably because the downstream switch already did (and for PTP, it only makes sense for the leaf nodes in a DSA switch tree to do that). I haven't been able to validate that feature in a fully assembled setup, so I am disabling the feature by setting the cascade port to an unused port value (ds->num_ports). In SJA1110, multiple cascade ports are supported, and CASC_PORT became a bit mask from a port number. So when CASC_PORT is set to ds->num_ports (which is 11 on SJA1110), it is actually set to 0b1011, so ports 3, 1 and 0 are configured as cascade ports and we cannot take RX timestamps on them. So we need to introduce a check for SJA1110 and set things differently (to zero there), so that the cascading feature is properly disabled and RX timestamps can be taken on all ports. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 29305260d29ec4ed9a657af818f2744a6ee09913 Author: Vladimir Oltean Date: Fri Jun 11 22:01:22 2021 +0300 net: dsa: sja1105: enable the TTEthernet engine on SJA1110 As opposed to SJA1105 where there are parts with TTEthernet and parts without, in SJA1110 all parts support it, but it must be enabled in the static config. So enable it unconditionally. We use it for the tc-taprio and tc-gate offload. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f244e256e1adaf366aa18cb900b2ebb78e24f559 Merge: 76cf404c40ae8 b34c157f0cdd0 Author: David S. Miller Date: Fri Jun 11 12:43:16 2021 -0700 Merge branch 'hns3-ptp' Guangbin Huang says: ==================== net: hns3: add support for PTP This series adds PTP support for the HNS3 ethernet driver. change log: V1 -> V2: 1. use spinlock to prevent concurrency 2. add the handling when ptp_clock_register() returns NULL ==================== Signed-off-by: David S. Miller commit b34c157f0cdd0b9e52c002288ff77b1a553dd438 Author: Huazhong Tan Date: Thu Jun 10 21:38:57 2021 +0800 net: hns3: add debugfs support for ptp info Add a debugfs interface for dumping ptp information, which is helpful for debugging. Signed-off-by: Huazhong Tan Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 0bf5eb788512187b744ef7f79de835e6cbe85b9c Author: Huazhong Tan Date: Thu Jun 10 21:38:56 2021 +0800 net: hns3: add support for PTP Adds PTP support for HNS3 ethernet driver. Signed-off-by: Huazhong Tan Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 6aa12138cd9aeb01308a3da8b23451dcf7f00d52 Author: Zou Wei Date: Tue Jun 8 20:34:59 2021 +0800 mtd: Convert list_for_each to entry variant convert list_for_each() to list_for_each_entry() where applicable. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1623155699-61935-1-git-send-email-zou_wei@huawei.com commit 622096fdff79458436b7387a86a5c9f000785e4f Author: Wei Yongjun Date: Tue Jun 8 14:38:53 2021 +0000 gpio: idt3243x: Fix return value check in idt_gpio_probe() In case of error, the function devm_platform_ioremap_resource_byname() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 4195926aedca ("gpio: Add support for IDT 79RC3243x GPIO controller") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 6947ad674944f9e38b229be532a2dddd6a1921ed Author: Vignesh Raghavendra Date: Fri Jun 11 11:05:33 2021 +0530 dt-bindings: mtd: Convert ti, am654-hbmc.txt to YAML schema Convert ti,am654-hbmc.txt to YAML schema for better checks and validations of DT. Signed-off-by: Vignesh Raghavendra Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal commit 828ed786554f3e8d772f859c9c0ea6472558aba1 Author: Zhen Lei Date: Thu Jun 10 10:28:50 2021 +0800 mtd: inftl: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610022850.15397-1-thunder.leizhen@huawei.com commit 3d2fac0eeec2a3699a7747a9322723b911276ec0 Author: Zhen Lei Date: Thu Jun 10 10:26:31 2021 +0800 mtd: amd76xrom: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610022631.15344-1-thunder.leizhen@huawei.com commit 042bf272d5fcb2edef48b5cc44882adef2519d72 Author: Zhen Lei Date: Thu Jun 10 10:24:16 2021 +0800 mtd: ck804xrom: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610022416.15291-1-thunder.leizhen@huawei.com commit bb89d137b2ed2a94df83cd468b0b1d473811c6bb Author: Zhen Lei Date: Thu Jun 10 10:22:39 2021 +0800 mtd: esb2rom: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610022239.15238-1-thunder.leizhen@huawei.com commit 4883307c6d8e59018a661ad1fa1e9c62328d6150 Author: Zhen Lei Date: Thu Jun 10 10:21:00 2021 +0800 mtd: ichxrom: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610022100.15185-1-thunder.leizhen@huawei.com commit 4a7bd5e96627e019891170c725b061d8afe0ae87 Author: Zhen Lei Date: Thu Jun 10 10:14:00 2021 +0800 mtd: sun_uflash: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610021400.15132-1-thunder.leizhen@huawei.com commit 313ea21aee18f5bb49cbfd767547c935f6d5a018 Author: Zhen Lei Date: Thu Jun 10 10:12:01 2021 +0800 mtd: mtdoops: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610021201.15076-1-thunder.leizhen@huawei.com commit 185675232072b38bafc2f6cc7e2904aa3d477620 Author: Zhen Lei Date: Thu Jun 10 10:09:58 2021 +0800 mtd: rawnand: atmel: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610020958.15023-1-thunder.leizhen@huawei.com commit b0821cc5dea98b260ae0f356210d6afdf1eeb8ad Author: Zhen Lei Date: Thu Jun 10 10:06:20 2021 +0800 mtd: rawnand: sunxi: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610020620.14970-1-thunder.leizhen@huawei.com commit 8ef029135c7b4e1ed4c424efe5cbd8d0088fe8ba Author: Zhen Lei Date: Thu Jun 10 10:01:30 2021 +0800 mtd: nftl: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610020130.14917-1-thunder.leizhen@huawei.com commit cba8b3bc4ac210b46cfc13afbbcaabdf17e51de2 Author: Zhen Lei Date: Thu Jun 10 09:50:52 2021 +0800 mtd: rfd_ftl: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210610015052.14864-1-thunder.leizhen@huawei.com commit 88d1250267535b26106ca9582701bbad940cec01 Author: Heiko Schocher Date: Mon Jun 7 05:39:09 2021 +0200 mtd: devices: add support for microchip 48l640 EERAM The Microchip 48l640 is a 8KByte EERAM connected via SPI. Signed-off-by: Heiko Schocher Tested-by: Fabio Estevam Reported-by: kernel test robot Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210607033909.1424605-3-hs@denx.de commit 9fd795eab2dbe90ee21cb3774892ba9a7ec73ff4 Author: Heiko Schocher Date: Mon Jun 7 05:39:08 2021 +0200 mtd: devices: add devicetree documentation for microchip 48l640 The Microchip 48l640 is a 8KByte EERAM connected via SPI. Add devicetree bindings documentation. Reviewed-by: Rob Herring Signed-off-by: Heiko Schocher Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210607033909.1424605-2-hs@denx.de commit a17da115ac042fd560cba2f8e4057722cf0c42cd Author: Zhen Lei Date: Thu Jun 3 20:53:23 2021 +0800 mtd: core: use MTD_DEVICE_ATTR_RO/RW() helper macros Use MTD_DEVICE_ATTR_RO/RW() helper macros instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210603125323.12142-3-thunder.leizhen@huawei.com commit b4e248632c968d985f0ecfd7924423fbefc39d1c Author: Zhen Lei Date: Thu Jun 3 20:53:22 2021 +0800 mtd: core: add MTD_DEVICE_ATTR_RO/RW() helper macros Compared with the definition of DEVICE_ATTR_RO/RW(), the read and write function names of the sysfs attribute have an additional "mtd_" prefix. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210603125323.12142-2-thunder.leizhen@huawei.com commit 97f41002945fd9c55e8b80c654ea34fd434250e7 Author: Zhen Lei Date: Thu Jun 3 20:30:41 2021 +0800 mtd: mtdpart: use DEVICE_ATTR_RO() helper macro Use DEVICE_ATTR_RO() helper macro instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210603123041.12036-1-thunder.leizhen@huawei.com commit c93081b265735db2417f0964718516044d06b1a2 Author: Miquel Raynal Date: Thu May 27 10:43:45 2021 +0200 mtd: spinand: Fix double counting of ECC stats In the raw NAND world, ECC engines increment ecc_stats and the final caller is responsible for returning -EBADMSG if the verification failed. In the SPI-NAND world it was a bit different until now because there was only one possible ECC engine: the on-die one. Indeed, the spinand_mtd_read() call was incrementing the ecc_stats counters depending on the outcome of spinand_check_ecc_status() directly. So now let's split the logic like this: - spinand_check_ecc_status() is specific to the SPI-NAND on-die engine and is kept very simple: it just returns the ECC status (bonus point: the content of this helper can be overloaded). - spinand_ondie_ecc_finish_io_req() is the caller of spinand_check_ecc_status() and will increment the counters and eventually return -EBADMSG. - spinand_mtd_read() is not tied to the on-die ECC implementation and should be able to handle results coming from other ECC engines: it has the responsibility of returning the maximum number of bitflips which happened during the entire operation as this is the only helper that is aware that several pages may be read in a row. Fixes: 945845b54c9c ("mtd: spinand: Instantiate a SPI-NAND on-die ECC engine") Reported-by: YouChing Lin Signed-off-by: Miquel Raynal Tested-by: YouChing Lin Link: https://lore.kernel.org/linux-mtd/20210527084345.208215-1-miquel.raynal@bootlin.com commit 0b34e320a49969d6d2f9357846868af5ece6113b Merge: c374839f9b447 d3d0e1e857110 Author: Miquel Raynal Date: Fri Jun 11 20:29:52 2021 +0200 Merge tag 'memory-controller-drv-pl353-5.14' into nand/next Memory controller drivers for v5.14 - PL353 Bigger work around ARM Primecell PL35x SMC memory controller driver by Miquel Raynal built on previous series from Naga Sureshkumar Relli. This includes bindings cleanup and correction, converting these to dtschema and several cleanyps in pl353-smc driver. commit f1f55c6b77b6e88f8b9a95b7cb491bb619a1e6bc Author: Jan Kiszka Date: Wed Jun 2 08:56:15 2021 +0200 arm64: dts: ti: iot2050: Configure r5f cluster on basic variant in split mode Lockstep mode is not supported here. So turn it off to avoid warnings during startup. Signed-off-by: Jan Kiszka Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/3a241e50-80a3-992a-2445-345c629d7895@siemens.com commit ec06c989bb45acc28c7633703685dd684b1b5d9c Author: Christoph Hellwig Date: Wed Jun 2 09:53:45 2021 +0300 z2ram: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-31-hch@lst.de Signed-off-by: Jens Axboe commit fd71c8a8ac77242661fff4af39593cd606a90a41 Author: Christoph Hellwig Date: Wed Jun 2 09:53:44 2021 +0300 ataflop: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-30-hch@lst.de Signed-off-by: Jens Axboe commit f6d8297412f882a2eabbf026f0d98449ae14e0fe Author: Christoph Hellwig Date: Wed Jun 2 09:53:43 2021 +0300 amiflop: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-29-hch@lst.de Signed-off-by: Jens Axboe commit c06cf063b3e5d590781fec6e88ccc259384dc157 Author: Christoph Hellwig Date: Wed Jun 2 09:53:42 2021 +0300 scm_blk: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Tested-by: Niklas Schnelle Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-28-hch@lst.de Signed-off-by: Jens Axboe commit 77567b25ab9f06c6477a153e58ace6897c6794d1 Author: Christoph Hellwig Date: Wed Jun 2 09:53:41 2021 +0300 ubi: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-27-hch@lst.de Signed-off-by: Jens Axboe commit 3b62c140e93d32c825ed028faca45dee58dbe37f Author: Christoph Hellwig Date: Wed Jun 2 09:53:40 2021 +0300 xen-blkfront: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-26-hch@lst.de Signed-off-by: Jens Axboe commit 693874035e6e54981771eb5f19e6eb0da2437175 Author: Christoph Hellwig Date: Wed Jun 2 09:53:39 2021 +0300 sx8: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-25-hch@lst.de Signed-off-by: Jens Axboe commit 2c6ee0ae5fc7aed7b3309e725104ea60da2cc9c9 Author: Christoph Hellwig Date: Wed Jun 2 09:53:38 2021 +0300 rnbd: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-24-hch@lst.de Signed-off-by: Jens Axboe commit 195b1956b85baefc5049883fdcff249a8ff1911c Author: Christoph Hellwig Date: Wed Jun 2 09:53:37 2021 +0300 rbd: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-23-hch@lst.de Signed-off-by: Jens Axboe commit 262d431f90003b1a7d9585ef5465252317eb6bd7 Author: Christoph Hellwig Date: Wed Jun 2 09:53:36 2021 +0300 pd: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-22-hch@lst.de Signed-off-by: Jens Axboe commit 6759b1a2013ba6f65e97f0b9444fa1cf69654f7c Author: Christoph Hellwig Date: Wed Jun 2 09:53:35 2021 +0300 nullb: use blk_mq_alloc_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-21-hch@lst.de Signed-off-by: Jens Axboe commit 4af5f2e0301311f88c420fcfc5f3c8611ade20ac Author: Christoph Hellwig Date: Wed Jun 2 09:53:34 2021 +0300 nbd: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-20-hch@lst.de Signed-off-by: Jens Axboe commit 1c99502fae359182a93a1c9cf7406edc0e28b6b0 Author: Christoph Hellwig Date: Wed Jun 2 09:53:33 2021 +0300 loop: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-19-hch@lst.de Signed-off-by: Jens Axboe commit 34f84aefe2ba0a77431cc0c0808c5c0239b6ba43 Author: Christoph Hellwig Date: Wed Jun 2 09:53:32 2021 +0300 floppy: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-18-hch@lst.de Signed-off-by: Jens Axboe commit 6560ec961a080944f8d5e1fef17b771bfaf189cb Author: Christoph Hellwig Date: Wed Jun 2 09:53:31 2021 +0300 aoe: use blk_mq_alloc_disk and blk_cleanup_disk Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-17-hch@lst.de Signed-off-by: Jens Axboe commit 08c1d480ed38995690a7d83f2c6a505f6cbbed9f Author: Christoph Hellwig Date: Wed Jun 2 09:53:30 2021 +0300 blk-mq: remove blk_mq_init_sq_queue All users are gone now. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-16-hch@lst.de Signed-off-by: Jens Axboe commit 0592c3d166c967056faa03b944c6c9c9b4e8a0cc Author: Christoph Hellwig Date: Wed Jun 2 09:53:29 2021 +0300 gdrom: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-15-hch@lst.de Signed-off-by: Jens Axboe commit afea05a18d18673750bad33f7aa710ff71a78e91 Author: Christoph Hellwig Date: Wed Jun 2 09:53:28 2021 +0300 sunvdc: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-14-hch@lst.de Signed-off-by: Jens Axboe commit 51fbfedfcc86273eded52f05a2c1aa75e91df8ff Author: Christoph Hellwig Date: Wed Jun 2 09:53:27 2021 +0300 swim: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-13-hch@lst.de Signed-off-by: Jens Axboe commit 9c8463e8e19c442aaf896468ce72c1ed82655781 Author: Christoph Hellwig Date: Wed Jun 2 09:53:26 2021 +0300 swim3: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-12-hch@lst.de Signed-off-by: Jens Axboe commit 89662ac55a204d82f9b0c1497e060d18b51fadc2 Author: Christoph Hellwig Date: Wed Jun 2 09:53:25 2021 +0300 ps3disk: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Tested-by: Geoff Levand Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-11-hch@lst.de Signed-off-by: Jens Axboe commit 6966bb921def0a4ef1e069f806c086efae6782ea Author: Christoph Hellwig Date: Wed Jun 2 09:53:24 2021 +0300 mtd_blkdevs: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-10-hch@lst.de Signed-off-by: Jens Axboe commit 51ed5bd55eb602fd8b3531bb919bcb59849fa569 Author: Christoph Hellwig Date: Wed Jun 2 09:53:23 2021 +0300 mspro: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-9-hch@lst.de Signed-off-by: Jens Axboe commit f368b7d7fa77768026d439ec9c32fe16a2d5eb52 Author: Christoph Hellwig Date: Wed Jun 2 09:53:22 2021 +0300 ms_block: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-8-hch@lst.de Signed-off-by: Jens Axboe commit c684b577968abeef96bf3c75d76d2dc19a1eb080 Author: Christoph Hellwig Date: Wed Jun 2 09:53:21 2021 +0300 pf: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-7-hch@lst.de Signed-off-by: Jens Axboe commit 9c4f8971cc26cd485a39d02706533717eb3430dc Author: Christoph Hellwig Date: Wed Jun 2 09:53:20 2021 +0300 pcd: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-6-hch@lst.de Signed-off-by: Jens Axboe commit 89a5f065653bcf7d8c3e4101e025e6c7b03339e8 Author: Christoph Hellwig Date: Wed Jun 2 09:53:19 2021 +0300 virtio-blk: use blk_mq_alloc_disk Use the blk_mq_alloc_disk API to simplify the gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-5-hch@lst.de Signed-off-by: Jens Axboe commit b461dfc49eb6fbabc60b9dad476e787ada56b7b4 Author: Christoph Hellwig Date: Wed Jun 2 09:53:18 2021 +0300 blk-mq: add the blk_mq_alloc_disk APIs Add a new API to allocate a gendisk including the request_queue for use with blk-mq based drivers. This is to avoid boilerplate code in drivers. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-4-hch@lst.de Signed-off-by: Jens Axboe commit 26a9750aa875126e4b7fc5ee6de652a529c5b7ee Author: Christoph Hellwig Date: Wed Jun 2 09:53:17 2021 +0300 blk-mq: improve the blk_mq_init_allocated_queue interface Don't return the passed in request_queue but a normal error code, and drop the elevator_init argument in favor of just calling elevator_init_mq directly from dm-rq. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-3-hch@lst.de Signed-off-by: Jens Axboe commit cdb14e0f7775e767484843e8ecd736bb21754c58 Author: Christoph Hellwig Date: Wed Jun 2 09:53:16 2021 +0300 blk-mq: factor out a blk_mq_alloc_sq_tag_set helper Factour out a helper to initialize a simple single hw queue tag_set from blk_mq_init_sq_queue. This will allow to phase out blk_mq_init_sq_queue in favor of a more symmetric and general API. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210602065345.355274-2-hch@lst.de Signed-off-by: Jens Axboe commit 957adb68b3f7df8421a05f1647d3027f2acad310 Author: Alexander Aring Date: Fri Jun 11 12:55:41 2021 -0400 fs: dlm: invalid buffer access in lookup error This patch will evaluate the message length if a dlm opts header can fit in before accessing it if a node lookup fails. The invalid sequence error means that the version detection failed and an unexpected message arrived. For debugging such situation the type of arrived message is important to know. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f5fe8d5107ad68279528f39ceae64ab0d68deb3c Author: Alexander Aring Date: Fri Jun 11 12:55:40 2021 -0400 fs: dlm: fix race in mhandle deletion This patch fixes a race between mhandle deletion in case of receiving an acknowledge and flush of all pending mhandle in cases of an timeout or resetting node states. Fixes: 489d8e559c65 ("fs: dlm: add reliable connection if reconnect") Reported-by: Guillaume Nault Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0ecc617858fce305bedcf735eb18a46cb7e9921f Author: Austin Kim Date: Fri Jun 11 03:28:35 2021 +0100 audit: remove unnecessary 'ret' initialization The variable 'ret' is set to 0 when declared. The 'ret' is unused until it is set to 0 again. So it had better remove unnecessary initialization. Signed-off-by: Austin Kim Signed-off-by: Paul Moore commit d99cf13f14200cdb5cbb704345774c9c0698612d Author: Al Viro Date: Sat Jan 16 15:57:49 2021 -0500 selinux: kill 'flags' argument in avc_has_perm_flags() and avc_audit() ... along with avc_has_perm_flags() itself, since now it's identical to avc_has_perm() (as pointed out by Paul Moore) Signed-off-by: Al Viro [PM: add "selinux:" prefix to subj and tweak for length] Signed-off-by: Paul Moore commit b17ec22fb339bfcb1eadd5f5e196dc705dcf3949 Author: Al Viro Date: Sat Jan 16 15:40:54 2021 -0500 selinux: slow_avc_audit has become non-blocking dump_common_audit_data() is safe to use under rcu_read_lock() now; no need for AVC_NONBLOCKING and games around it Signed-off-by: Al Viro Signed-off-by: Paul Moore commit 4ec4f059088b48585c337328e05fa930c64d1ba8 Author: Ulf Hansson Date: Wed Jun 9 12:06:10 2021 +0200 PM: runtime: Clarify documentation when callbacks are unassigned Recent changes to the PM core allows ->runtime_suspend|resume callbacks to be unassigned. In the earlier behaviour the PM core would return -ENOSYS, when trying to runtime resume a device, for example. Let's update the documentation to clarify this. Signed-off-by: Ulf Hansson Acked-by: Alan Stern Signed-off-by: Rafael J. Wysocki commit 63d00be69348fda431ae59aba6af268a5cf5058e Author: Ulf Hansson Date: Tue Jun 8 11:02:49 2021 +0200 PM: runtime: Allow unassigned ->runtime_suspend|resume callbacks We are currently allowing ->runtime_idle() callbacks to be unassigned without returning an error code from rpm_idle(). This has been useful to avoid boilerplate code in drivers. Let's take this approach a step further, by allowing also unassigned ->runtime_suspend|resume() callbacks. In this way, a consumer/supplier device link can be used to let a consumer device be power managed through its supplier device, without requiring assigned ->runtime_suspend|resume() callbacks for the consumer device, for example. Signed-off-by: Ulf Hansson Acked-by: Alan Stern Signed-off-by: Rafael J. Wysocki commit 5a2bd1b1c64e1ac5627db3767ac465f18606315c Author: Ulf Hansson Date: Tue Jun 8 11:02:48 2021 +0200 PM: runtime: Improve path in rpm_idle() when no callback When pm_runtime_no_callbacks() has been called for a struct device to set the dev->power.no_callbacks flag for it, it enables rpm_idle() to take a slightly quicker path by assuming that a ->runtime_idle() callback would have returned 0 to indicate success. A device that does not have the dev->power.no_callbacks flag set for it, may still be missing a corresponding ->runtime_idle() callback, in which case the slower path in rpm_idle() is taken. Let's improve the behaviour for this case, by aligning code to the quicker path. Signed-off-by: Ulf Hansson Acked-by: Alan Stern Signed-off-by: Rafael J. Wysocki commit d0a83314db291fdf2e1c36102212c80e01022d6d Author: Yang Li Date: Fri Jun 11 18:16:07 2021 +0800 selinux: Fix kernel-doc Fix function name and add comment for parameter state in ss/services.c kernel-doc to remove some warnings found by running make W=1 LLVM=1. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Paul Moore commit 52c208397c246f0c31d031eb8c41f9c7e9fdec0e Author: Tushar Sugandhi Date: Mon May 10 12:09:39 2021 -0700 IMA: support for duplicate measurement records IMA measures contents of a given file/buffer/critical-data record, and properly re-measures it on change. However, IMA does not measure the duplicate value for a given record, since TPM extend is a very expensive operation. For example, if the record changes from value 'v#1' to 'v#2', and then back to 'v#1', IMA will not measure and log the last change to 'v#1', since the hash of 'v#1' for that record is already present in the IMA htable. This limits the ability of an external attestation service to accurately determine the current state of the system. The service would incorrectly conclude that the latest value of the given record on the system is 'v#2', and act accordingly. Define and use a new Kconfig option IMA_DISABLE_HTABLE to permit duplicate records in the IMA measurement list. In addition to the duplicate measurement records described above, other duplicate file measurement records may be included in the log, when CONFIG_IMA_DISABLE_HTABLE is enabled. For example, - i_version is not enabled, - i_generation changed, - same file present on different filesystems, - an inode is evicted from dcache Signed-off-by: Tushar Sugandhi Reviewed-by: Petr Vorel [zohar@linux.ibm.com: updated list of duplicate measurement records] Signed-off-by: Mimi Zohar commit 480f0de68caddfe336b8cc0c74a40328779940d3 Author: Zhen Lei Date: Tue Jun 8 16:13:14 2021 +0800 PM: hibernate: remove leading spaces before tabs 1) Run the following command to find and remove the leading spaces before tabs: $ find kernel/power/ -type f | xargs sed -r -i 's/^[ ]+\t/\t/' 2) Manually check and correct if necessary Signed-off-by: Zhen Lei Signed-off-by: Rafael J. Wysocki commit 03466883a0fdb5c38f2907b027565b9f253688a8 Author: Zhen Lei Date: Tue Jun 8 15:44:37 2021 +0800 PM: sleep: remove trailing spaces and tabs Run the following command to find and remove the trailing spaces and tabs: $ find kernel/power/ -type f | xargs sed -r -i 's/[ \t]+$//' Signed-off-by: Zhen Lei Signed-off-by: Rafael J. Wysocki commit 46f99eebda08963e24efdacec5c95fc66b90f600 Author: Mikko Perttunen Date: Thu Jun 10 13:46:09 2021 +0300 drm/tegra: Don't call SET_APPLICATION_ID in VIC boot The application should be programming the application ID, not the kernel, as there can be several options to choose from, and setting the application ID multiple times can cause issues. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit d12919bb5da571ec50588ef97683d37e36dc2de5 Author: Tan Zhongjun Date: Thu Jun 10 14:39:55 2021 +0800 drm/tegra: Remove superfluous error messages around platform_get_irq() The platform_get_irq() prints error message telling that interrupt is missing,hence there is no need to duplicated that message in the drivers. Signed-off-by: Tan Zhongjun Signed-off-by: Thierry Reding commit 5937c3ce21228d33d2eb3287baa7e4cf6978dba9 Author: Ulf Hansson Date: Thu Jun 3 11:34:37 2021 +0200 PM: domains: Drop/restore performance state votes for devices at runtime PM A subsystem/driver that need to manage OPPs for its device, should typically drop its vote for the OPP when the device becomes runtime suspended. In this way, the corresponding aggregation of the performance state votes that is managed in genpd for the attached PM domain, may find that the aggregated vote can be decreased. Hence, it may allow genpd to set the lower performance state for the PM domain, thus avoiding to waste energy. To accomplish this, typically a subsystem/driver would need to call dev_pm_opp_set_rate|opp() for its device from its ->runtime_suspend() callback, to drop the vote for the OPP. Accordingly, it needs another call to dev_pm_opp_set_rate|opp() to restore the vote for the OPP from its ->runtime_resume() callback. To avoid boilerplate code in subsystems/driver to deal with these things, let's instead manage this internally in genpd. Signed-off-by: Ulf Hansson Tested-by: Dmitry Osipenko Signed-off-by: Rafael J. Wysocki commit d97fe100ee0b36c5dd8013ffd70fe8fcdcabff2b Author: Ulf Hansson Date: Thu Jun 3 11:34:36 2021 +0200 PM: domains: Return early if perf state is already set for the device When dev_pm_genpd_set_performance_state() gets called to set a new performance state for the device, let's take a quicker path by doing an early return, if it turns out that the new state is already set for the device. Suggested-by: Viresh Kumar Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 0eef091d2dc447e10607f6dafa173c311ada972b Author: Ulf Hansson Date: Thu Jun 3 11:34:35 2021 +0200 PM: domains: Split code in dev_pm_genpd_set_performance_state() To prepare some of the code in dev_pm_genpd_set_performance_state() to be re-used from subsequent changes, let's split it up into two functions. Reviewed-by: Viresh Kumar Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 154ae8bb3c830f0a568a5194ce7e631aa6bcfe8b Author: Rafael J. Wysocki Date: Wed Jun 2 20:18:02 2021 +0200 cpuidle: teo: Use kerneldoc documentation in admin-guide There are two descriptions of the TEO (Timer Events Oriented) cpuidle governor in the kernel source tree, one in the C file containing its code and one in cpuidle.rst which is part of admin-guide. Instead of trying to keep them both in sync and in order to reduce text duplication, include the governor description from the C file directly into cpuidle.rst. Signed-off-by: Rafael J. Wysocki commit 77577558f25d40b82fba98673cf31ca16ba41d34 Author: Rafael J. Wysocki Date: Wed Jun 2 20:17:18 2021 +0200 cpuidle: teo: Rework most recent idle duration values treatment The TEO (Timer Events Oriented) cpuidle governor uses several most recent idle duration values for a given CPU to refine the idle state selection in case the previous long-term trends have not been followed recently and a new trend appears to be forming. That is done by computing the average of the most recent idle duration values falling below the time till the next timer event ("sleep length"), provided that they are the majority of the most recent idle duration values taken into account, and using it as the new expected idle duration value. However, idle state selection based on that value may not be optimal, because the average does not really indicate which of the idle states with target residencies less than or equal to it is likely to be the best fit. Thus, instead of computing the average, make the governor carry out computations based on the distribution of the most recent idle duration values among the bins corresponding to different idle states. Namely, if the majority of the most recent idle duration values taken into consideration are less than the current sleep length (which means that the CPU is likely to wake up early), find the idle state closest to the "candidate" one "matching" the sleep length whose target residency is less than or equal to the majority of the most recent idle duration values that have fallen below the current sleep length (which means that it is likely to be "shallow enough" this time). Signed-off-by: Rafael J. Wysocki commit c410a9a142f152006c21a858d734a9f868bc90a6 Author: Rafael J. Wysocki Date: Wed Jun 2 20:16:32 2021 +0200 cpuidle: teo: Change the main idle state selection logic Two aspects of the current main idle state selection logic in the TEO (Timer Events Oriented) cpuidle governor are quite questionable. First of all, the "hits" and "misses" metrics used by it are only updated for a given idle state if the time till the next timer event ("sleep length") is between the target residency of that state and the target residency of the next one. Consequently, they are likely to become stale if the sleep length tends to fall outside that interval which increases the likelihood of subomtimal idle state selection. Second, the decision on whether or not to select the idle state "matching" the sleep length is based on the metrics collected for that state alone, whereas in principle the metrics collected for the other idle states should be taken into consideration when that decision is made. For example, if the measured idle duration is less than the target residency of the idle state "matching" the sleep length, then it is also less than the target residency of any deeper idle state and that should be taken into account when considering whether or not to select any of those states, but currently it is not. In order to address the above shortcomings, modify the main idle state selection logic in the TEO governor to take the metrics collected for all of the idle states into account when deciding whether or not to select the one "matching" the sleep length. Moreover, drop the "misses" metric that becomes redundant after the above change and rename the "early_hits" metric to "intercepts" so that its role is better reflected by its name (the idea being that if a CPU wakes up earlier than indicated by the sleep length, then it must be a result of a non-timer interrupt that "intercepts" the CPU). Also rename the states[] array in struct struct teo_cpu to state_bins[] to avoid confusing it with the states[] array in struct cpuidle_driver and update the documentation to match the new code (and make it more comprehensive while at it). Signed-off-by: Rafael J. Wysocki commit b18e0de1cf85eed6e9ced086d6323e867d4b57aa Author: Rafael J. Wysocki Date: Wed Jun 2 20:15:52 2021 +0200 cpuidle: teo: Cosmetic modification of teo_select() Initialize local variables in teo_select() where they are declared. No functional impact. Signed-off-by: Rafael J. Wysocki commit f53cbdab011b200c67c7e5f476046828014501eb Author: Rafael J. Wysocki Date: Wed Jun 2 20:15:10 2021 +0200 cpuidle: teo: Cosmetic modifications of teo_update() Rename a local variable in teo_update() so that its purpose is better reflected by its name and use one more local variable in the loop over the CPU idle states in that function to make the code somewhat easier to read. No functional impact. Signed-off-by: Rafael J. Wysocki commit 971ee247060d88dceb72428b5d203687312884f4 Author: JC Kuo Date: Wed Jan 20 15:34:14 2021 +0800 usb: xhci: tegra: Enable ELPG for runtime/system PM This commit implements the complete programming sequence for ELPG entry and exit. 1. At ELPG entry, invokes tegra_xusb_padctl_enable_phy_sleepwalk() and tegra_xusb_padctl_enable_phy_wake() to configure XUSB PADCTL sleepwalk and wake detection circuits to maintain USB lines level and respond to wake events (wake-on-connect, wake-on-disconnect, device-initiated-wake). 2. At ELPG exit, invokes tegra_xusb_padctl_disable_phy_sleepwalk() and tegra_xusb_padctl_disable_phy_wake() to disarm sleepwalk and wake detection circuits. At runtime suspend, XUSB host controller can enter ELPG to reduce power consumption. When XUSB PADCTL wake detection circuit detects a wake event, an interrupt will be raised. xhci-tegra driver then will invoke pm_runtime_resume() for xhci-tegra. Runtime resume could also be triggered by protocol drivers, this is the host-initiated-wake event. At runtime resume, xhci-tegra driver brings XUSB host controller out of ELPG to handle the wake events. The same ELPG enter/exit procedure will be performed for system suspend/resume path so USB devices can remain connected across SC7. Signed-off-by: JC Kuo Acked-by: Greg Kroah-Hartman Signed-off-by: Thierry Reding commit 41a7426d25fa3f43380560928edb6f815397da20 Author: JC Kuo Date: Wed Jan 20 15:34:13 2021 +0800 usb: xhci: tegra: Unlink power domain devices This commit unlinks xhci-tegra platform device with SS/host power domain devices. Reasons for this change is - at ELPG entry, PHY sleepwalk and wake configuration need to be done before powering down SS/host partitions, and PHY need be powered off after powering down SS/host partitions. Sequence looks like roughly below: tegra_xusb_enter_elpg() -> xhci_suspend() -> enable PHY sleepwalk and wake if needed -> power down SS/host partitions -> power down PHY If SS/host power domains are linked to xhci-tegra platform device, we are not able to perform the sequence like above. This commit introduces: 1. tegra_xusb_unpowergate_partitions() to power up SS and host partitions together. If SS/host power domain devices are available, it invokes pm_runtime_get_sync() to request power driver to power up partitions; If power domain devices are not available, tegra_powergate_sequence_power_up() will be used to power up partitions. 2. tegra_xusb_powergate_partitions() to power down SS and host partitions together. If SS/host power domain devices are available, it invokes pm_runtime_put_sync() to request power driver to power down partitions; If power domain devices are not available, tegra_powergate_power_off() will be used to power down partitions. Signed-off-by: JC Kuo Acked-by: Greg Kroah-Hartman Signed-off-by: Thierry Reding commit 23eca83155c33285fa9adee80fab8b22cb01d4c9 Merge: 6efb943b8616e 1f9cab6cc20c6 Author: Thierry Reding Date: Fri Jun 11 18:15:36 2021 +0200 Merge branch 'for-5.14/phy' into for-5.14/usb commit 84b7355b7a8acc0c4924424e22b86771a6d7287a Merge: 159d8c274fd92 f39de44fbb478 Author: Rafael J. Wysocki Date: Fri Jun 11 18:13:48 2021 +0200 Merge back 'acpi-bus' material for v5.14. commit ea9b847cda647b9849b0b9fa0447e876a1ac62e1 Author: Jacob Keller Date: Wed Jun 9 09:39:53 2021 -0700 ice: enable transmit timestamps for E810 devices Add support for enabling Tx timestamp requests for outgoing packets on E810 devices. The ice hardware can support multiple outstanding Tx timestamp requests. When sending a descriptor to hardware, a Tx timestamp request is made by setting a request bit, and assigning an index that represents which Tx timestamp index to store the timestamp in. Hardware makes no effort to synchronize the index use, so it is up to software to ensure that Tx timestamp indexes are not re-used before the timestamp is reported back. To do this, introduce a Tx timestamp tracker which will keep track of currently in-use indexes. In the hot path, if a packet has a timestamp request, an index will be requested from the tracker. Unfortunately, this does require a lock as the indexes are shared across all queues on a PHY. There are not enough indexes to reliably assign only 1 to each queue. For the E810 devices, the timestamp indexes are not shared across PHYs, so each port can have its own tracking. Once hardware captures a timestamp, an interrupt is fired. In this interrupt, trigger a new work item that will figure out which timestamp was completed, and report the timestamp back to the stack. This function loops through the Tx timestamp indexes and checks whether there is now a valid timestamp. If so, it clears the PHY timestamp indication in the PHY memory, locks and removes the SKB and bit in the tracker, then reports the timestamp to the stack. It is possible in some cases that a timestamp request will be initiated but never completed. This might occur if the packet is dropped by software or hardware before it reaches the PHY. Add a task to the periodic work function that will check whether a timestamp request is more than a few seconds old. If so, the timestamp index is cleared in the PHY, and the SKB is released. Just as with Rx timestamps, the Tx timestamps are only 40 bits wide, and use the same overall logic for extending to 64 bits of nanoseconds. With this change, E810 devices should be able to perform basic PTP functionality. Future changes will extend the support to cover the E822-based devices. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 77a781155a659053f3b7e81a0ab115d27ff151cd Author: Jacob Keller Date: Wed Jun 9 09:39:52 2021 -0700 ice: enable receive hardware timestamping Add SIOCGHWTSTAMP and SIOCSHWTSTAMP ioctl handlers to respond to requests to enable timestamping support. If the request is for enabling Rx timestamps, set a bit in the Rx descriptors to indicate that receive timestamps should be reported. Hardware captures receive timestamps in the PHY which only captures part of the timer, and reports only 40 bits into the Rx descriptor. The upper 32 bits represent the contents of GLTSYN_TIME_L at the point of packet reception, while the lower 8 bits represent the upper 8 bits of GLTSYN_TIME_0. The networking and PTP stack expect 64 bit timestamps in nanoseconds. To support this, implement some logic to extend the timestamps by using the full PHC time. If the Rx timestamp was captured prior to the PHC time, then the real timestamp is PHC - (lower_32_bits(PHC) - timestamp) If the Rx timestamp was captured after the PHC time, then the real timestamp is PHC + (timestamp - lower_32_bits(PHC)) These calculations are correct as long as neither the PHC timestamp nor the Rx timestamps are more than 2^32-1 nanseconds old. Further, we can detect when the Rx timestamp is before or after the PHC as long as the PHC timestamp is no more than 2^31-1 nanoseconds old. In that case, we calculate the delta between the lower 32 bits of the PHC and the Rx timestamp. If it's larger than 2^31-1 then the Rx timestamp must have been captured in the past. If it's smaller, then the Rx timestamp must have been captured after PHC time. Add an ice_ptp_extend_32b_ts function that relies on a cached copy of the PHC time and implements this algorithm to calculate the proper upper 32bits of the Rx timestamps. Cache the PHC time periodically in all of the Rx rings. This enables each Rx ring to simply call the extension function with a recent copy of the PHC time. By ensuring that the PHC time is kept up to date periodically, we ensure this algorithm doesn't use stale data and produce incorrect results. To cache the time, introduce a kworker and a kwork item to periodically store the Rx time. It might seem like we should use the .do_aux_work interface of the PTP clock. This doesn't work because all PFs must cache this time, but only one PF owns the PTP clock device. Thus, the ice driver will manage its own kthread instead of relying on the PTP do_aux_work handler. With this change, the driver can now report Rx timestamps on all incoming packets. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 67569a7f940130fcfe9041e07a614a5263a9944d Author: Jacob Keller Date: Wed Jun 9 09:39:51 2021 -0700 ice: report the PTP clock index in ethtool .get_ts_info Now that the driver registers a PTP clock device that represents the clock hardware, it is important that the clock index is reported via the ethtool .get_ts_info callback. The underlying hardware resource is shared between multiple PF functions. Only one function owns the hardware resources associated with a timer, but multiple functions may be associated with it for the purposes of timestamping. To support this, the owning PF will store the clock index into the driver shared parameters buffer in firmware. Other PFs will look up the clock index by reading the driver shared parameter on demand when requested via the .get_ts_info ethtool function. In this way, all functions which are tied to the same timer are able to report the clock index. Userspace software such as ptp4l performs a look up on the netdev to determine the associated clock, and all commands to control or configure the clock will be handled through the controlling PF. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 06c16d89d2cbe284c2792caa7648c052c1b91042 Author: Jacob Keller Date: Wed Jun 9 09:39:50 2021 -0700 ice: register 1588 PTP clock device object for E810 devices Add a new ice_ptp.c file for holding the basic PTP clock interface functions. If the device supports PTP, call the new ice_ptp_init and ice_ptp_release functions where appropriate. If the function owns the hardware resource associated with the PTP hardware clock, register with the PTP_1588_CLOCK infrastructure to allocate a new clock object that represents the device hardware clock. Implement basic functionality for reading and setting the clock time, performing clock adjustments, and adjusting the clock frequency. Future changes will introduce functionality for handling related features including Tx and Rx timestamps. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c67913492fec317bc53ffdff496b6ba856d2868c Author: Lakshmi Ramasubramanian Date: Thu Jun 10 10:15:52 2021 -0700 ima: Fix warning: no previous prototype for function 'ima_add_kexec_buffer' The function prototype for ima_add_kexec_buffer() is present in 'linux/ima.h'. But this header file is not included in ima_kexec.c where the function is implemented. This results in the following compiler warning when "-Wmissing-prototypes" flag is turned on: security/integrity/ima/ima_kexec.c:81:6: warning: no previous prototype for function 'ima_add_kexec_buffer' [-Wmissing-prototypes] Include the header file 'linux/ima.h' in ima_kexec.c to fix the compiler warning. Fixes: dce92f6b11c3 (arm64: Enable passing IMA log to next kernel on kexec) Reported-by: kernel test robot Signed-off-by: Lakshmi Ramasubramanian Acked-by: Rob Herring Signed-off-by: Mimi Zohar commit 604288bc61965a3acb20e7ff04379a5d3d289bd8 Author: Jiri Prchal Date: Fri Jun 11 16:27:06 2021 +0200 nvmem: eeprom: at25: fix type compiler warnings Fixes: drivers/misc/eeprom/at25.c:181:28: warning: field width should have type 'int', but argument has type 'unsigned long' drivers/misc/eeprom/at25.c:386:13: warning: cast to smaller integer type 'int' from 'const void *' Reported-by: kernel test robot Signed-off-by: Jiri Prchal Fixes: fd307a4ad332 ("nvmem: prepare basics for FRAM support") Link: https://lore.kernel.org/r/20210611142706.27336-1-jiri.prchal@aksignal.cz Signed-off-by: Greg Kroah-Hartman commit 03cb4473be92a4207a3d1df25186dafd1a5add4d Author: Jacob Keller Date: Wed Jun 9 09:39:49 2021 -0700 ice: add low level PTP clock access functions Add the ice_ptp_hw.c file and some associated definitions to the ice driver folder. This file contains basic low level definitions for functions that interact with the device hardware. For now, only E810-based devices are supported. The ice hardware supports 2 major variants which have different PHYs with different procedures necessary for interacting with the device clock. Because the device captures timestamps in the PHY, each PHY has its own internal timer. The timers are synchronized in hardware by first preparing the source timer and the PHY timer shadow registers, and then issuing a synchronization command. This ensures that both the source timer and PHY timers are programmed simultaneously. The timers themselves are all driven from the same oscillator source. The functions in ice_ptp_hw.c abstract over the differences between how the PHYs in E810 are programmed vs how the PHYs in E822 devices are programmed. This series only implements E810 support, but E822 support will be added in a future change. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 7f9ab54d314456884209f088aeaaf24e14d9ddf4 Author: Jacob Keller Date: Wed Jun 9 09:39:48 2021 -0700 ice: add support for set/get of driver-stored firmware parameters Depending on the device configuration, the ice hardware may share the PTP hardware clock timer between multiple PFs. Each PF is informed by firmware during initialization of the PTP timer association. When bringing up PTP, only the PFs which own the timer shall allocate a PTP hardware clock. Other PFs associated with that timer must report the correct PTP clock index in order to allow userspace software the ability to know which ports are connected to the same clock. To support this, the firmware has driver shared parameters. These parameters enable one PF to write the clock index into firmware, and have other PFs read the associated value out. This enables the driver to have only a single PF allocate and control the device timer registers, while other PFs associated with that timer can report the correct clock in the ETHTOOL_GET_TS_INFO report. Add support for the necessary admin queue commands to enable reading and writing of the driver shared parameters. This will be used in a future change to enable sharing the PTP clock index between PF drivers. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 9733cc94c52320a13bf0357d4937e7c9ed759ac9 Author: Jacob Keller Date: Wed Jun 9 09:39:47 2021 -0700 ice: process 1588 PTP capabilities during initialization The device firmware reports PTP clock capabilities to each PF during initialization. This includes various information for both the overall device and the individual function, including For functions: * whether this function has timesync enabled * whether this function owns one of the 2 possible clock timers, and which one * which timer the function is associated with * the clock frequency, if the device supports multiple clock frequencies * The GPIO pin association for the timer owned by this PF, if any For the device: * Which PF owns timer 0, if any * Which PF owns timer 1, if any * whether timer 0 is enabled * whether timer 1 is enabled Extract the bits from the capabilities information reported by firmware and store them in the device and function capability structures.o This information will be used in a future change to have the function driver enable PTP hardware clock support. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 8f5ee3c477a8e416e30ec75caed53a80fdca3462 Author: Jacob Keller Date: Wed Jun 9 09:39:46 2021 -0700 ice: add support for sideband messages In order to support certain device features, including enabling the PTP hardware clock, the ice driver needs to control some registers on the device PHY. These registers are accessed by sending sideband messages. For some hardware, these messages must be sent over the device admin queue, while other hardware has a dedicated control queue for the sideband messages. Add the neighbor device message structure for sending a message to the neighboring device. Where supported, initialize the sideband control queue and handle cleanup. Add a wrapper function for sending sideband control queue messages that read or write a neighboring device register. Because some devices send sideband messages over the AdminQ, also increase the length of the admin queue to allow more messages to be queued up. This is important because the sideband messages add additional pressure on the AQ usage. This support will be used in following patches to enable support for CONFIG_1588_PTP_CLOCK. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c51e96dace68a67f1fcfa49d4ad1577875f50bf1 Merge: c64638d5091a5 c96d6abbec52d Author: Marc Zyngier Date: Fri Jun 11 14:50:03 2021 +0100 Merge branch irq/irqchip-driver-updates into irq/irqchip-next Various minor irqchip driver updates: - QC PDC now compiles as a module - HiSilicon MBIGEN fix for compile-time warning when !ACPI * irq/irqchip-driver-updates: irqchip/mbigen: Fix compile warning when CONFIG_ACPI is disabled irqchip/qcom-pdc: Switch to IRQCHIP_PLATFORM_DRIVER and allow as a module commit c64638d5091a5630d0f5f5ab7001bdee1ad194f2 Merge: cd273da34f407 046a6ee2343bb Author: Marc Zyngier Date: Fri Jun 11 14:32:12 2021 +0100 Merge branch irq/generic_handle_domain_irq-core into irq/irqchip-next Simplify the handling of interrupts that require an IRQ domain resolution: - domains now cache the irqdata instead of the irq number - consistent behaviour wrt RCU - single lookup for architectures using sparse IRQs - reduced boilerplate code in drivers. * irq/generic_handle_domain_irq-core: (26 commits) irqchip: Bulk conversion to generic_handle_domain_irq() genirq: Move non-irqdomain handle_domain_irq() handling into ARM's handle_IRQ() genirq: Add generic_handle_domain_irq() helper irqchip/nvic: Convert from handle_IRQ() to handle_domain_irq() irqdesc: Fix __handle_domain_irq() comment genirq: Use irq_resolve_mapping() to implement __handle_domain_irq() and co irqdomain: Introduce irq_resolve_mapping() irqdomain: Protect the linear revmap with RCU irqdomain: Cache irq_data instead of a virq number in the revmap irqdomain: Use struct_size() helper when allocating irqdomain irqdomain: Make normal and nomap irqdomains exclusive powerpc: Move the use of irq_domain_add_nomap() behind a config option irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping() irqdomain: Kill irq_domain_add_legacy_isa powerpc: Drop dependency between asm/irq.h and linux/irqdomain.h powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy scsi/ibmvscsi: Directly include linux/{of.h,irqdomain.h} powerpc: Add missing linux/{of.h,irqdomain.h} include directives MIPS: Do not include linux/irqdomain.h from asm/irq.h MIPS: Add missing linux/irqdomain.h includes ... commit cd273da34f407c14314af790b0484d6c9b6e1349 Merge: 525ea1bc3b83b 4e08a559a18c1 Author: Marc Zyngier Date: Fri Jun 11 14:31:04 2021 +0100 Merge branch irq/irqchip-dt-updates into irq/irqchip-next DT updates * irq/irqchip-dt-updates: dt-bindings: interrupt-controller: arm,gic-v3: Describe GICv3 optional properties dt-bindings: irqchip: renesas-irqc: Add R-Car M3-W+ support commit 4e08a559a18c1b6424e56859c74adb4b29c17318 Author: Lad Prabhakar Date: Wed Jun 9 16:51:08 2021 +0100 dt-bindings: interrupt-controller: arm,gic-v3: Describe GICv3 optional properties Describe the optional GICv3 properties: - clocks - clock-names - power-domains - resets Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609155108.16590-1-prabhakar.mahadev-lad.rj@bp.renesas.com commit 525ea1bc3b83b67db7d500071f055f7021cdfb7d Merge: 8124c8a6b3538 21a496179c6e3 Author: Marc Zyngier Date: Fri Jun 11 14:24:55 2021 +0100 Merge branch irq/irqchip-spurious-printk into irq/irqchip-next Drop a whole bunch of unnecessary printks on error paths * irq/irqchip-spurious-printk: irqchip: gic-pm: Remove redundant error log of clock bulk irqchip/sun4i: Remove unnecessary oom message irqchip/irq-imx-gpcv2: Remove unnecessary oom message irqchip/imgpdc: Remove unnecessary oom message irqchip/gic-v3-its: Remove unnecessary oom message irqchip/gic-v2m: Remove unnecessary oom message irqchip/exynos-combiner: Remove unnecessary oom message commit 21a496179c6e3a9fc03d1296b36afd14046db88f Author: Chunfeng Yun Date: Fri Apr 9 11:04:34 2021 +0800 irqchip: gic-pm: Remove redundant error log of clock bulk There is error log in clk_bulk_prepare/enable() Signed-off-by: Chunfeng Yun Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1617937474-24630-1-git-send-email-chunfeng.yun@mediatek.com commit 75768e391f8947ea8b2e7997af68dbd68814f00c Author: Zhen Lei Date: Wed Jun 9 22:14:28 2021 +0800 irqchip/sun4i: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609141428.14737-1-thunder.leizhen@huawei.com commit 76fc40ec22b9947351f6f9d37a86d47e72af4e50 Author: Zhen Lei Date: Wed Jun 9 22:11:50 2021 +0800 irqchip/irq-imx-gpcv2: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609141150.14637-1-thunder.leizhen@huawei.com commit e3f389ed3a421f45b46e774b543648ebcab9020a Author: Zhen Lei Date: Wed Jun 9 22:08:28 2021 +0800 irqchip/imgpdc: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609140828.14584-1-thunder.leizhen@huawei.com commit 944a1a17d399b33410af6dfcf2b5a0f74b42b3d0 Author: Zhen Lei Date: Wed Jun 9 22:06:42 2021 +0800 irqchip/gic-v3-its: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609140643.14531-1-thunder.leizhen@huawei.com commit 98ae089e1e6e5bab6f8c89412da5fc447e3580cb Author: Zhen Lei Date: Wed Jun 9 22:05:34 2021 +0800 irqchip/gic-v2m: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609140534.14478-1-thunder.leizhen@huawei.com commit da30e6688dd64fabc3746e00e4a9b6f926efd5ca Author: Zhen Lei Date: Wed Jun 9 22:03:35 2021 +0800 irqchip/exynos-combiner: Remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210609140335.14425-1-thunder.leizhen@huawei.com commit 3ca5ca83e206eab566830e08664eda415f428374 Author: Florian Westphal Date: Fri Jun 11 12:50:14 2021 +0200 xfrm: merge dstopt and routing hdroff functions Both functions are very similar, so merge them into one. The nexthdr is passed as argument to break the loop in the ROUTING case, this is the only header type where slightly different rules apply. While at it, the merged function is realigned with ip6_find_1stfragopt(). That function received bug fixes for an infinite loop, but neither dstopt nor rh parsing functions (copy-pasted from ip6_find_1stfragopt) were changed. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit d1002d2490e3ebc30dd3ba747656cfa90c87e984 Author: Florian Westphal Date: Fri Jun 11 12:50:13 2021 +0200 xfrm: remove hdr_offset indirection After previous patches all remaining users set the function pointer to the same function: xfrm6_find_1stfragopt. So remove this function pointer and call ip6_find_1stfragopt directly. Reduces size of xfrm_type to 64 bytes on 64bit platforms. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 848b18fb7fbd2fa5bc4fc2263bb69956fb86120d Author: Florian Westphal Date: Fri Jun 11 12:50:12 2021 +0200 xfrm: ipv6: move mip6_rthdr_offset into xfrm core Place the call into the xfrm core. After this all remaining users set the hdr_offset function pointer to the same function which opens the possiblity to remove the indirection. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 37b9e7eb55659b270f0e8aebd98308716d935586 Author: Florian Westphal Date: Fri Jun 11 12:50:11 2021 +0200 xfrm: ipv6: move mip6_destopt_offset into xfrm core This helper is relatively small, just move this to the xfrm core and call it directly. Next patch does the same for the ROUTING type. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 9acf4d3b9ec15f27a7d027c4ae4736c2fb967391 Author: Florian Westphal Date: Fri Jun 11 12:50:10 2021 +0200 xfrm: ipv6: add xfrm6_hdr_offset helper This moves the ->hdr_offset indirect call to a new helper. A followup patch can then modify the new function to replace the indirect call by direct calls to the required hdr_offset helper. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 46c886220ae33878efe73a8eb26f7b19c42b783a Merge: 32ab5a5e97daf 6929586d8edda Author: Marc Zyngier Date: Fri Jun 11 13:26:36 2021 +0100 Merge branch kvm-arm64/mmu/reduce-vmemmap-overhead into kvmarm-master/next Host stage-2 optimisations from Quentin Perret * kvm-arm64/mmu/reduce-vmemmap-overhead: KVM: arm64: Use less bits for hyp_page refcount KVM: arm64: Use less bits for hyp_page order KVM: arm64: Remove hyp_pool pointer from struct hyp_page KVM: arm64: Unify MMIO and mem host stage-2 pools KVM: arm64: Remove list_head from hyp_page KVM: arm64: Use refcount at hyp to check page availability KVM: arm64: Move hyp_pool locking out of refcount helpers commit 873c3e89777c8c56f936ae7aceca1a102aac6b9e Author: Will Deacon Date: Tue Jun 8 19:02:57 2021 +0100 arm64: Kill 32-bit applications scheduled on 64-bit-only CPUs Scheduling a 32-bit application on a 64-bit-only CPU is a bad idea. Ensure that 32-bit applications always take the slow-path when returning to userspace on a system with mismatched support at EL0, so that we can avoid trying to run on a 64-bit-only CPU and force a SIGKILL instead. Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210608180313.11502-5-will@kernel.org Signed-off-by: Will Deacon commit 2f6a49bbc01da17867c26f6f650b1142e1d7c69d Author: Will Deacon Date: Tue Jun 8 19:02:56 2021 +0100 KVM: arm64: Kill 32-bit vCPUs on systems with mismatched EL0 support If a vCPU is caught running 32-bit code on a system with mismatched support at EL0, then we should kill it. Acked-by: Marc Zyngier Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210608180313.11502-4-will@kernel.org Signed-off-by: Will Deacon commit 2122a833316f2f3f6ddc78429fa67ef6d3c86636 Author: Will Deacon Date: Tue Jun 8 19:02:55 2021 +0100 arm64: Allow mismatched 32-bit EL0 support When confronted with a mixture of CPUs, some of which support 32-bit applications and others which don't, we quite sensibly treat the system as 64-bit only for userspace and prevent execve() of 32-bit binaries. Unfortunately, some crazy folks have decided to build systems like this with the intention of running 32-bit applications, so relax our sanitisation logic to continue to advertise 32-bit support to userspace on these systems and track the real 32-bit capable cores in a cpumask instead. For now, the default behaviour remains but will be tied to a command-line option in a later patch. Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210608180313.11502-3-will@kernel.org Signed-off-by: Will Deacon commit 930a58b4093ebd2a036a0d448a2047477ef90d26 Author: Will Deacon Date: Tue Jun 8 19:02:54 2021 +0100 arm64: cpuinfo: Split AArch32 registers out into a separate struct In preparation for late initialisation of the "sanitised" AArch32 register state, move the AArch32 registers out of 'struct cpuinfo' and into their own struct definition. Acked-by: Mark Rutland Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210608180313.11502-2-will@kernel.org Signed-off-by: Will Deacon commit 6929586d8eddad184f43526efe7bf0a8be4f18b2 Author: Quentin Perret Date: Tue Jun 8 11:45:18 2021 +0000 KVM: arm64: Use less bits for hyp_page refcount The hyp_page refcount is currently encoded on 4 bytes even though we never need to count that many objects in a page. Make it 2 bytes to save some space in the vmemmap. As overflows are more likely to happen as well, make sure to catch those with a BUG in the increment function. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-8-qperret@google.com commit 87ec0606733e1aa9568f54ddb41f03aa6b5687f2 Author: Quentin Perret Date: Tue Jun 8 11:45:17 2021 +0000 KVM: arm64: Use less bits for hyp_page order The hyp_page order is currently encoded on 4 bytes even though it is guaranteed to be smaller than this. Make it 2 bytes to reduce the hyp vmemmap overhead. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-7-qperret@google.com commit d978b9cfe6fe8008467f8c5d51677f52e7815b39 Author: Quentin Perret Date: Tue Jun 8 11:45:16 2021 +0000 KVM: arm64: Remove hyp_pool pointer from struct hyp_page Each struct hyp_page currently contains a pointer to a hyp_pool struct where the page should be freed if its refcount reaches 0. However, this information can always be inferred from the context in the EL2 code, so drop the pointer to save a few bytes in the vmemmap. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-6-qperret@google.com commit 7c350ea39e53ade33ca7be00b0947f2b9f53dda0 Author: Quentin Perret Date: Tue Jun 8 11:45:15 2021 +0000 KVM: arm64: Unify MMIO and mem host stage-2 pools We currently maintain two separate memory pools for the host stage-2, one for pages used in the page-table when mapping memory regions, and the other to map MMIO regions. The former is large enough to map all of memory with page granularity and the latter can cover an arbitrary portion of IPA space, but allows to 'recycle' pages. However, this split makes accounting difficult to manage as pages at intermediate levels of the page-table may be used to map both memory and MMIO regions. Simplify the scheme by merging both pools into one. This means we can now hit the -ENOMEM case in the memory abort path, but we're still guaranteed forward-progress in the worst case by unmapping MMIO regions. On the plus side this also means we can usually map a lot more MMIO space at once if memory ranges happen to be mapped with block mappings. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-5-qperret@google.com commit 914cde58a03cc5eef858db34687433e17d0e44be Author: Quentin Perret Date: Tue Jun 8 11:45:14 2021 +0000 KVM: arm64: Remove list_head from hyp_page The list_head member of struct hyp_page is only needed when the page is attached to a free-list, which by definition implies the page is free. As such, nothing prevents us from using the page itself to store the list_head, hence reducing the size of the vmemmap. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-4-qperret@google.com commit 581982decc635c93934aaeb88d62c21238c63f11 Author: Quentin Perret Date: Tue Jun 8 11:45:13 2021 +0000 KVM: arm64: Use refcount at hyp to check page availability The hyp buddy allocator currently checks the struct hyp_page list node to see if a page is available for allocation or not when trying to coalesce memory. Now that decrementing the refcount and attaching to the buddy tree is done in the same critical section, we can rely on the refcount of the buddy page to be in sync, which allows to replace the list node check by a refcount check. This will ease removing the list node from struct hyp_page later on. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-3-qperret@google.com commit 6cbf874e51b68e5b2eb0cc50be3676f5d5601dab Author: Quentin Perret Date: Tue Jun 8 11:45:12 2021 +0000 KVM: arm64: Move hyp_pool locking out of refcount helpers The hyp_page refcount helpers currently rely on the hyp_pool lock for serialization. However, this means the refcounts can't be changed from the buddy allocator core as it already holds the lock, which means pages have to go through odd transient states. For example, when a page is freed, its refcount is set to 0, and the lock is transiently released before the page can be attached to a free list in the buddy tree. This is currently harmless as the allocator checks the list node of each page to see if it is available for allocation or not, but it means the page refcount can't be trusted to represent the state of the page even if the pool lock is held. In order to fix this, remove the pool locking from the refcount helpers, and move all the logic to the buddy allocator. This will simplify the removal of the list node from struct hyp_page in a later patch. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210608114518.748712-2-qperret@google.com commit c7289b1c8a4e10bbbdb7097a71a90652beb767a1 Author: Thierry Reding Date: Thu Jun 3 18:46:32 2021 +0200 arm64: tegra: Enable SMMU support on Tegra194 Add the device tree node for the dual-SMMU found on Tegra194 and hook up peripherals such as host1x, BPMP, HDA, SDMMC, EQOS and VIC. Signed-off-by: Thierry Reding commit b966d2db05a70263ddffc795eb544b94427fc327 Author: Thierry Reding Date: Thu Jun 3 18:46:31 2021 +0200 arm64: tegra: Hook up memory controller to SMMU on Tegra186 On Tegra186 and later, the memory controller needs to be programmed in coordination with any of the ARM SMMU instances to configure the stream ID used for each memory client. To support this, add a phandle reference to the memory controller to the SMMU device tree node. Signed-off-by: Thierry Reding commit bb84a31bed146bb5a4dcb9eb7fc63458fdc4d6e2 Author: Thierry Reding Date: Thu Jun 3 18:46:30 2021 +0200 arm64: tegra: Use correct compatible string for Tegra186 SMMU The SMMU found on Tegra186 requires interoperation with the memory controller in order to program stream ID overrides. The generic ARM SMMU 500 compatible is therefore inaccurate. Replace it with a more correct, SoC-specific compatible string. Signed-off-by: Thierry Reding commit bd778b893963d67d7eb01f49d84ffcd3eaf229dd Author: Thierry Reding Date: Tue Apr 13 14:23:35 2021 +0200 firmware: tegra: bpmp: Fix Tegra234-only builds The tegra186_bpmp_ops symbol is used on Tegra234, so make sure it's available. Signed-off-by: Thierry Reding commit e2d0ee225e49a5553986f3138dd2803852a31fd5 Author: Thierry Reding Date: Tue Apr 13 14:20:57 2021 +0200 soc/tegra: fuse: Fix Tegra234-only builds The tegra30_fuse_read() symbol is used on Tegra234, so make sure it's available. Signed-off-by: Thierry Reding commit 38f61ef1a0cefb4e3b37c3e7b16c0f68df34a3dc Author: Marek Szyprowski Date: Fri Jun 11 12:02:04 2021 +0200 ARM: exynos_defconfig: restore framebuffer support Commit f611b1e7624c ("drm: Avoid circular dependencies for CONFIG_FB") changed the Kconfig dependencies, so COFNIG_FB is no longer selected in defconfigs. Restore support for it in exynos_defconfig, because most Exynos platforms had graphical console running on framebuffer device emulated on the Exynos DRM drivers. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20210611100204.6240-1-m.szyprowski@samsung.com Signed-off-by: Krzysztof Kozlowski commit 7c8f176d6a3fa18aa0f8875da6f7c672ed2a8554 Author: Xiyu Yang Date: Thu Jun 10 10:49:20 2021 +0800 iommu/arm-smmu: Fix arm_smmu_device refcount leak in address translation The reference counting issue happens in several exception handling paths of arm_smmu_iova_to_phys_hard(). When those error scenarios occur, the function forgets to decrease the refcount of "smmu" increased by arm_smmu_rpm_get(), causing a refcount leak. Fix this issue by jumping to "out" label when those error scenarios occur. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Reviewed-by: Rob Clark Link: https://lore.kernel.org/r/1623293391-17261-1-git-send-email-xiyuyang19@fudan.edu.cn Signed-off-by: Will Deacon commit 1adf30f198c26539a62d761e45af72cde570413d Author: Xiyu Yang Date: Thu Jun 10 10:54:29 2021 +0800 iommu/arm-smmu: Fix arm_smmu_device refcount leak when arm_smmu_rpm_get fails arm_smmu_rpm_get() invokes pm_runtime_get_sync(), which increases the refcount of the "smmu" even though the return value is less than 0. The reference counting issue happens in some error handling paths of arm_smmu_rpm_get() in its caller functions. When arm_smmu_rpm_get() fails, the caller functions forget to decrease the refcount of "smmu" increased by arm_smmu_rpm_get(), causing a refcount leak. Fix this issue by calling pm_runtime_resume_and_get() instead of pm_runtime_get_sync() in arm_smmu_rpm_get(), which can keep the refcount balanced in case of failure. Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Link: https://lore.kernel.org/r/1623293672-17954-1-git-send-email-xiyuyang19@fudan.edu.cn Signed-off-by: Will Deacon commit 63879e2964bceee2aa5bbe8b99ea58bba28bb64f Author: Christophe JAILLET Date: Fri Jun 11 11:23:21 2021 +0100 nvmem: core: add a missing of_node_put 'for_each_child_of_node' performs an of_node_get on each iteration, so a return from the middle of the loop requires an of_node_put. Fixes: e888d445ac33 ("nvmem: resolve cells from DT at registration time") Cc: Signed-off-by: Christophe JAILLET Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210611102321.11509-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit fd307a4ad332ef50be5569c92490219e7cd84ce5 Author: Jiri Prchal Date: Fri Jun 11 11:45:58 2021 +0200 nvmem: prepare basics for FRAM support Added enum and string for FRAM (ferroelectric RAM) to expose it as file named "fram". Added documentation of sysfs file. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210611094601.95131-2-jiri.prchal@aksignal.cz Signed-off-by: Greg Kroah-Hartman commit 3e00e39d9dad48360ebd518726ebf81da1b84c10 Author: Mark Rutland Date: Wed Jun 9 11:23:01 2021 +0100 arm64: insn: move AARCH64_INSN_SIZE into For histroical reasons, we define AARCH64_INSN_SIZE in , but it would make more sense to do so in . Let's move it into , and add the necessary include directives for this. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20210609102301.17332-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 78b92c7337e10519312e8aab64d7a1651206bd61 Author: Mark Rutland Date: Wed Jun 9 11:23:00 2021 +0100 arm64: insn: decouple patching from insn code Currently, includes . We intend that will be usable from userspace, so it doesn't make sense to include headers for kernel-only features such as the patching routines, and we'd intended to restrict to instruction encoding details. Let's decouple the patching code from , and explicitly include where it is needed. Since isn't included from assembly, we can drop the __ASSEMBLY__ guards. At the same time, sort the kprobes includes so that it's easier to see what is and isn't incldued. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20210609102301.17332-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 64432f09068a0fa76f20918a3c22ee3484a3762d Author: Qi Liu Date: Wed Jun 9 14:41:03 2021 +0800 arm64: perf: Simplify EVENT ATTR macro in perf_event.c Use common macro PMU_EVENT_ATTR_ID to simplify ARMV8_EVENT_ATTR Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Will Deacon Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-8-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 773510f4d2775bda7cec585e8643f4269c4944e5 Author: Qi Liu Date: Wed Jun 9 14:41:02 2021 +0800 drivers/perf: Simplify EVENT ATTR macro in fsl_imx8_ddr_perf.c Use common macro PMU_EVENT_ATTR_ID to simplify IMX8_DDR_PMU_EVENT_ATTR Reviewed by Frank Li Cc: Frank Li Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-7-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit b323dfe02e56627e4eaed7cf59dc609da67a1651 Author: Qi Liu Date: Wed Jun 9 14:41:01 2021 +0800 drivers/perf: Simplify EVENT ATTR macro in xgene_pmu.c Use common macro PMU_EVENT_ATTR_ID to simplify XGENE_PMU_EVENT_ATTR Cc: Khuong Dinh Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-6-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 78b1d3c72070bbc9793e63dd6528c1e67ee0d52a Author: Qi Liu Date: Wed Jun 9 14:41:00 2021 +0800 drivers/perf: Simplify EVENT ATTR macro in qcom_l3_pmu.c Use common macro PMU_EVENT_ATTR_ID to simplify L3CACHE_EVENT_ATTR Cc: Andy Gross Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-5-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 0bf2d7298842afbc28a5413024ebc444a599e980 Author: Qi Liu Date: Wed Jun 9 14:40:59 2021 +0800 drivers/perf: Simplify EVENT ATTR macro in qcom_l2_pmu.c Use common macro PMU_EVENT_ATTR_ID to simplify L2CACHE_EVENT_ATTR Cc: Andy Gross Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-4-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 7ac87a8dfbd9c42fa1920773b09a57586222aad4 Author: Qi Liu Date: Wed Jun 9 14:40:58 2021 +0800 drivers/perf: Simplify EVENT ATTR macro in SMMU PMU driver Use common macro PMU_EVENT_ATTR_ID to simplify SMMU_EVENT_ATTR Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-3-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit f8e6d24144d1bfbb8714faa9044e135c0c00bd89 Author: Qi Liu Date: Wed Jun 9 14:40:57 2021 +0800 perf: Add EVENT_ATTR_ID to simplify event attributes Similar EVENT_ATTR macros are defined in many PMU drivers, like Arm PMU driver, Arm SMMU PMU driver. So add a generic macro to simplify code. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1623220863-58233-2-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 4c1daba15c209b99d192f147fea3dade30f72ed2 Author: Robin Murphy Date: Tue Jun 8 12:55:12 2021 +0100 perf/smmuv3: Don't trample existing events with global filter With global filtering, we only allow an event to be scheduled if its filter settings exactly match those of any existing events, therefore it is pointless to reapply the filter in that case. Much worse, though, is that in doing that we trample the event type of counter 0 if it's already active, and never touch the appropriate PMEVTYPERn so the new event is likely not counting the right thing either. Don't do that. CC: stable@vger.kernel.org Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/32c80c0e46237f49ad8da0c9f8864e13c4a803aa.1623153312.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 1f9482aa8d412b4ba06ce6ab8e333fb8ca29a06e Author: Brian Norris Date: Fri May 14 19:42:27 2021 -0700 mwifiex: bring down link before deleting interface We can deadlock when rmmod'ing the driver or going through firmware reset, because the cfg80211_unregister_wdev() has to bring down the link for us, ... which then grab the same wiphy lock. nl80211_del_interface() already handles a very similar case, with a nice description: /* * We hold RTNL, so this is safe, without RTNL opencount cannot * reach 0, and thus the rdev cannot be deleted. * * We need to do it for the dev_close(), since that will call * the netdev notifiers, and we need to acquire the mutex there * but don't know if we get there from here or from some other * place (e.g. "ip link set ... down"). */ mutex_unlock(&rdev->wiphy.mtx); ... Do similarly for mwifiex teardown, by ensuring we bring the link down first. Sample deadlock trace: [ 247.103516] INFO: task rmmod:2119 blocked for more than 123 seconds. [ 247.110630] Not tainted 5.12.4 #5 [ 247.115796] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 247.124557] task:rmmod state:D stack: 0 pid: 2119 ppid: 2114 flags:0x00400208 [ 247.133905] Call trace: [ 247.136644] __switch_to+0x130/0x170 [ 247.140643] __schedule+0x714/0xa0c [ 247.144548] schedule_preempt_disabled+0x88/0xf4 [ 247.149714] __mutex_lock_common+0x43c/0x750 [ 247.154496] mutex_lock_nested+0x5c/0x68 [ 247.158884] cfg80211_netdev_notifier_call+0x280/0x4e0 [cfg80211] [ 247.165769] raw_notifier_call_chain+0x4c/0x78 [ 247.170742] call_netdevice_notifiers_info+0x68/0xa4 [ 247.176305] __dev_close_many+0x7c/0x138 [ 247.180693] dev_close_many+0x7c/0x10c [ 247.184893] unregister_netdevice_many+0xfc/0x654 [ 247.190158] unregister_netdevice_queue+0xb4/0xe0 [ 247.195424] _cfg80211_unregister_wdev+0xa4/0x204 [cfg80211] [ 247.201816] cfg80211_unregister_wdev+0x20/0x2c [cfg80211] [ 247.208016] mwifiex_del_virtual_intf+0xc8/0x188 [mwifiex] [ 247.214174] mwifiex_uninit_sw+0x158/0x1b0 [mwifiex] [ 247.219747] mwifiex_remove_card+0x38/0xa0 [mwifiex] [ 247.225316] mwifiex_pcie_remove+0xd0/0xe0 [mwifiex_pcie] [ 247.231451] pci_device_remove+0x50/0xe0 [ 247.235849] device_release_driver_internal+0x110/0x1b0 [ 247.241701] driver_detach+0x5c/0x9c [ 247.245704] bus_remove_driver+0x84/0xb8 [ 247.250095] driver_unregister+0x3c/0x60 [ 247.254486] pci_unregister_driver+0x2c/0x90 [ 247.259267] cleanup_module+0x18/0xcdc [mwifiex_pcie] Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-wireless/98392296-40ee-6300-369c-32e16cff3725@gmail.com/ Link: https://lore.kernel.org/linux-wireless/ab4d00ce52f32bd8e45ad0448a44737e@bewaar.me/ Reported-by: Maximilian Luz Reported-by: dave@bewaar.me Cc: Johannes Berg Signed-off-by: Brian Norris Tested-by: Maximilian Luz Tested-by: Dave Olsthoorn Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210515024227.2159311-1-briannorris@chromium.org commit 5d6fbc96bd36cfec7bbc0578ad3986affdeb70de Author: Srinivas Pandruvada Date: Sun May 16 23:14:41 2021 -0700 thermal/drivers/int340x: processor_thermal: Export additional attributes Export additional attributes: ddr_data_rate (RO) : Show current DDR (Double Data Rate) data rate. rfi_restriction (RW) : Show or set current state for RFI (Radio Frequency Interference) protection. These attributes use mailbox commands to get/set information. Here command codes are: 0x0007: Read RFI restriction 0x0107: Read DDR data rate 0x0008: Write RFI restriction Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210517061441.1921901-3-srinivas.pandruvada@linux.intel.com commit fb5a6ec80367bcccb659a421850d757a5a81767a Author: Srinivas Pandruvada Date: Sun May 16 23:14:40 2021 -0700 thermal/drivers/int340x: processor_thermal: Export mailbox interface Export the mailbox interface to be used by other modules. Also change command id and response from u8 to u32 data type. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210517061441.1921901-2-srinivas.pandruvada@linux.intel.com commit 4d57fd9aeaa013a245bf1fade81e2c30a5efd491 Author: Chunyan Zhang Date: Wed May 12 17:37:52 2021 +0800 thermal/drivers/sprd: Add missing MODULE_DEVICE_TABLE MODULE_DEVICE_TABLE is used to extract the device information out of the driver and builds a table when being compiled. If using this macro, kernel can find the driver if available when the device is plugged in, and then loads that driver and initializes the device. Fixes: 554fdbaf19b18 ("thermal: sprd: Add Spreadtrum thermal driver support") Signed-off-by: Chunyan Zhang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210512093752.243168-1-zhang.lyra@gmail.com commit 16bee043fc0a6eb6e9d5306f8e9366a3dcee1fea Author: Finley Xiao Date: Thu May 6 14:55:14 2021 -0300 thermal/drivers/rockchip: Support RK3568 SoCs in the thermal driver The RK3568 SoCs have two Temperature Sensors, channel 0 is for CPU, channel 1 is for GPU. Signed-off-by: Finley Xiao Signed-off-by: Ezequiel Garcia Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506175514.168365-5-ezequiel@collabora.com commit 4c6e0976295add7f0ed94d276c04a3d6f1ea8f83 Author: Benjamin Drung Date: Sat Jun 5 22:15:36 2021 +0200 media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K The Elgato Cam Link 4K HDMI video capture card reports to support three different pixel formats, where the first format depends on the connected HDMI device. ``` $ v4l2-ctl -d /dev/video0 --list-formats-ext ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'NV12' (Y/CbCr 4:2:0) Size: Discrete 3840x2160 Interval: Discrete 0.033s (29.970 fps) [1]: 'NV12' (Y/CbCr 4:2:0) Size: Discrete 3840x2160 Interval: Discrete 0.033s (29.970 fps) [2]: 'YU12' (Planar YUV 4:2:0) Size: Discrete 3840x2160 Interval: Discrete 0.033s (29.970 fps) ``` Changing the pixel format to anything besides the first pixel format does not work: ``` $ v4l2-ctl -d /dev/video0 --try-fmt-video pixelformat=YU12 Format Video Capture: Width/Height : 3840/2160 Pixel Format : 'NV12' (Y/CbCr 4:2:0) Field : None Bytes per Line : 3840 Size Image : 12441600 Colorspace : sRGB Transfer Function : Rec. 709 YCbCr/HSV Encoding: Rec. 709 Quantization : Default (maps to Limited Range) Flags : ``` User space applications like VLC might show an error message on the terminal in that case: ``` libv4l2: error set_fmt gave us a different result than try_fmt! ``` Depending on the error handling of the user space applications, they might display a distorted video, because they use the wrong pixel format for decoding the stream. The Elgato Cam Link 4K responds to the USB video probe VS_PROBE_CONTROL/VS_COMMIT_CONTROL with a malformed data structure: The second byte contains bFormatIndex (instead of being the second byte of bmHint). The first byte is always zero. The third byte is always 1. The firmware bug was reported to Elgato on 2020-12-01 and it was forwarded by the support team to the developers as feature request. There is no firmware update available since then. The latest firmware for Elgato Cam Link 4K as of 2021-03-23 has MCU 20.02.19 and FPGA 67. Therefore correct the malformed data structure for this device. The change was successfully tested with VLC, OBS, and Chromium using different pixel formats (YUYV, NV12, YU12), resolutions (3840x2160, 1920x1080), and frame rates (29.970 and 59.940 fps). Cc: stable@vger.kernel.org Signed-off-by: Benjamin Drung Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 989f77e3fdee2e8f414dd1da9b6397d8763d414e Author: Douglas Anderson Date: Fri Jun 11 09:33:48 2021 +0100 nvmem: qfprom: Improve the comment about regulator setting In review feedback Joe Perches found the existing comment confusing. Let's use something based on the wording proposed by Joe. Suggested-by: Joe Perches Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210611083348.20170-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1f7b4d87874624f4beb25253900a25306a193b8b Author: Douglas Anderson Date: Fri Jun 11 09:33:47 2021 +0100 nvmem: core: constify nvmem_cell_read_variable_common() return value The caller doesn't modify the memory pointed to by the pointer so it can be const. Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210611083348.20170-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c813bb37bd32cb967060a2c573fae4ea518d32eb Author: Rajendra Nayak Date: Fri Jun 11 09:33:46 2021 +0100 nvmem: qfprom: minor nit fixes Fix a missed newline, change an 'if' to 'else if' and update a comment which is stale after the merge of '5a1bea2a: nvmem: qfprom: Add support for fuseblowing on sc7280' Signed-off-by: Rajendra Nayak Reviewed-by: Douglas Anderson Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210611083348.20170-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 78a005a22d5608b266eafa011b093a33284c52ce Author: Samuel Holland Date: Fri Jun 11 09:33:45 2021 +0100 nvmem: sunxi_sid: Set type to OTP This device currently reports an "Unknown" type in sysfs. Since it is an eFuse hardware device, set its type to OTP. Signed-off-by: Samuel Holland Acked-by: Chen-Yu Tsai Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210611083348.20170-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 135794868ad83d0327cdd78df469e118f1fe7cc4 Author: Azhar Shaikh Date: Thu Apr 22 14:46:16 2021 -0700 thunderbolt: Add support for Intel Alder Lake Alder Lake has the same integrated Thunderbolt/USB4 controller as Intel Tiger Lake. By default it is still using firmware based connection manager so we can use most of the Tiger Lake flows. Add the Alder Lake PCI IDs to the driver list of supported devices. Signed-off-by: Azhar Shaikh Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit 2a8b519ece3bd9a9fd4d890df64adafa68d18036 Author: Mika Westerberg Date: Mon Jun 7 13:33:30 2021 +0300 thunderbolt: No need to include in usb4_port.c This include is not needed so drop it. Reported-by: kernel test robot Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit 0172e411450a479d65061014edf48933d4209c93 Author: Gil Fine Date: Tue Jun 1 16:32:29 2021 +0300 thunderbolt: Poll 10ms for REG_FW_STS_NVM_AUTH_DONE to be set In Intel Tiger Lake and beyond it takes some time after the force power is set until the firmware connection manager is ready. So instead of reading it once we poll it for 10ms before giving up. Signed-off-by: Gil Fine Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit 349bfe089d02f18b05ed2c386eeb248a0be49641 Author: Mika Westerberg Date: Mon May 24 17:57:32 2021 +0300 thunderbolt: Add device links only when software connection manager is used We only need to set up the device links when software connection manager path is used. The firmware connection manager does not need them and if they are present they may even cause problems. Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit a0d36fa1065901f939b04587a09c65303a64ac88 Author: Mika Westerberg Date: Mon Jun 7 13:37:46 2021 +0300 thunderbolt: Bond lanes only when dual_link_port != NULL in alloc_dev_default() We should not dereference ->dual_link_port if it is NULL and lane bonding is requested. For this reason move lane bonding configuration happen inside the block where ->dual_link_port != NULL. Fixes: 54509f5005ca ("thunderbolt: Add KUnit tests for path walking") Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Yehezkel Bernat Signed-off-by: Mika Westerberg commit 1d3156396cf6ea0873145092f4e040374ff1d862 Author: ChenXiaoSong Date: Wed Jun 9 11:55:10 2021 +0800 x86/sgx: Correct kernel-doc's arg name in sgx_encl_release() Fix the following kernel-doc warning: arch/x86/kernel/cpu/sgx/encl.c:392: warning: Function parameter \ or member 'ref' not described in 'sgx_encl_release' [ bp: Massage commit message. ] Signed-off-by: ChenXiaoSong Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210609035510.2083694-1-chenxiaosong2@huawei.com commit 93cd12d6e88a4c6f9204633ff07781cde741e89e Author: Takashi Sakamoto Date: Fri Jun 11 12:50:03 2021 +0900 ALSA: bebob: code refactoring for model-dependent quirks This commit adds enumeration and structure member as code refactoring regarding to model-dependent quirks. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611035003.26852-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 82fb3bf92c0fb6cd471295ba9c774a47c7d64c8c Author: Takashi Sakamoto Date: Fri Jun 11 12:50:02 2021 +0900 ALSA: bebob: delete workaround for protocol version 3 In a commit c4d860a0d256 ("ALSA: bebob: loosen up severity of checking continuity for BeBoB v3 quirk"), a workaround was added for the quirk in BeBoB protocol version 3 against the discontinuity of data block counter. As long as seeing with sequence replay for media clock recovery, such quirk disappears. This commit deletes the workaround. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611035003.26852-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c66c63049966a4c23dc429d2e5f4d063c8b78aeb Author: Takashi Sakamoto Date: Fri Jun 11 12:50:01 2021 +0900 ALSA: bebob: dismiss sleep after breaking connections In a commit d3eabe939aee ("ALSA: bebob: expand sleep just after breaking connections for protocol version 1"), a workaround was added for a quirk of freeze in BeBoB protocol version 1. As long as seeing with sequence replay for media clock recovery, the quirk disappears. This commit removes the workaround. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210611035003.26852-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 093a474ce10d8ea3db3ef2922aca5a38f34bab1b Author: Tony Lindgren Date: Tue May 25 12:33:11 2021 +0300 ARM: OMAP2+: Block suspend for am3 and am4 if PM is not configured If the PM related modules are not loaded and PM firmware not configured, the system suspend fails to resume. Let's fix this by adding initial platform_suspend_ops to block suspend and warn about missing modules. When pm33xx and wkup_m3_ipc have been loaded and m3 coprocessor booted with it's firmware, pm33xx sets up working platform_suspend_ops. Note that we need to configure at least PM_SUSPEND_STANDBY to have suspend_set_ops(). Cc: Dave Gerlach Cc: Suman Anna Signed-off-by: Tony Lindgren commit a1e029b7a544897dafdaff404eec42475f60d647 Author: Alejandro Lucero Date: Sun Jun 6 21:04:22 2021 +0000 ARM: OMAP2+: remove duplicated prototype The am33xx_init_early prototype is defined twice. Signed-off-by: Alejandro Lucero Signed-off-by: Tony Lindgren commit 9b11fec7345f21995f4ea4bafb0e108b9a620238 Author: Aswath Govindraju Date: Tue Jun 8 10:39:52 2021 +0530 ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly. Fixes: b0b039515445 ("ARM: dts: am43x-epos-evm: set data pin directions for spi0 and spi1") Signed-off-by: Aswath Govindraju Signed-off-by: Tony Lindgren commit 414bfe1d26b60ef20b58e36efd5363188a694bab Author: Aswath Govindraju Date: Tue Jun 8 10:39:51 2021 +0530 ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly. Fixes: 444d66fafab8 ("ARM: dts: add spi wifi support to cm-t335") Signed-off-by: Aswath Govindraju Signed-off-by: Tony Lindgren commit 794fd4a55ec55b9443c143388a8addee92671157 Author: Geert Uytterhoeven Date: Tue Jun 1 17:25:45 2021 +0200 ARM: dts: dra7x-evm: Drop "ti,pcf8575" The TI part is equivalent to the NXP part and its compatible value is not documented in the DT bindings. All other users of similar I2C GPIO expanders just use the compatible values of the original NXP parts. Signed-off-by: Geert Uytterhoeven Signed-off-by: Tony Lindgren commit 6320b2aee8b46b7a6468a02a38d1815b263ebc38 Author: Lokesh Vutla Date: Tue Jun 1 14:54:57 2021 +0530 ARM: dts: am33xx: Drop interrupt property from ecap nodes Interrupts were never supported by ecap driver and the bindings were never documented.Therefore drop the entries in preparation to moving bindings to YAML schema. Signed-off-by: Lokesh Vutla Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 61edd91c262b4cdc92d95769509434ec24a8fe2a Author: Lokesh Vutla Date: Tue Jun 1 14:54:56 2021 +0530 ARM: dts: ti: Fix node name for all ecap dt nodes dtbs_check produces the following warning for ecap node name: ecap@100: $nodename:0: 'ecap@100' does not match '^pwm(@.*|-[0-9a-f])*$' Fix this by replacing ecap with pwm in node name Signed-off-by: Lokesh Vutla Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit be8c9d7957dda67379f68863f0e9f82600e0f583 Author: Lokesh Vutla Date: Tue Jun 1 14:54:55 2021 +0530 ARM: dts: ti: Drop usage of ti,am33xx-ecap from DT nodes ti,am33xx-ecap is used to represent device nodes using ti,hwmod data. Now that hwmod entries are entirely removed, drop usage of ti,am33xx-ecap compatible from all DT nodes. Signed-off-by: Lokesh Vutla Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 07168bacf81953e0f35bd6c0dc64022fe86b8ad3 Author: Lokesh Vutla Date: Tue Jun 1 11:10:29 2021 +0530 ARM: dts: ti: drop usage of redundant compatible Commit 229110c1aa691 ("ARM: dts: am437x/am33xx/da850: Add new ECAP and EPWM bindings") added ti,am3352-ehrpwm compatible which is similar to ti,am33xx-ehrpwm but without out t,hwmod properties. But with commit 58bfbea5b1c68 ("ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP and EPWM nodes") dropped support for all ti,hwmod for ehrpwm, but missed deprecating ti,am33xx-ehrpwm compatible. So drop ti,am33xx-ehrpwm from DT as it is no longer needed. ti-ehrpwn driver still support ti,am33xx-ehrpwm in order to maintain backward compatibility. Signed-off-by: Lokesh Vutla Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 2dbe13dbc15f8e452595e9d19beb70e08a7839f5 Author: Vignesh Raghavendra Date: Wed May 26 15:14:24 2021 +0530 ARM: dts: omap2/3: Drop dmas property from I2C node DMA was never supported by i2c-omap driver and the bindings were never documented. Therefore drop the entries in preparation to moving bindings to YAML schema. Signed-off-by: Vignesh Raghavendra Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 0dc64297c8ac98503a7c7621b3c78e151deb75b6 Author: Christophe JAILLET Date: Sat Jun 5 14:55:56 2021 +0200 crypto: cavium/nitrox - Fix an error rhandling path in 'nitrox_probe()' If an error occurs after a successful 'ioremap()' call, it must be undone by a corresponding 'iounmap()' call, as already done in the remove function. Add a 'pf_sw_fail' label in the error handling path and add the missing 'iounmap()'. While at it, also add a 'flr_fail' label in the error handling path and use it to avoid some code duplication. Fixes: 14fa93cdcd9b ("crypto: cavium - Add support for CNN55XX adapters.") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 5cd259ca5d466f65ffd21e2e2fa00fb648a8c555 Author: Hongbo Li Date: Fri Jun 4 14:30:35 2021 +0800 crypto: sm2 - fix a memory leak in sm2 SM2 module alloc ec->Q in sm2_set_pub_key(), when doing alg test in test_akcipher_one(), it will set public key for every test vector, and don't free ec->Q. This will cause a memory leak. This patch alloc ec->Q in sm2_ec_ctx_init(). Fixes: ea7ecb66440b ("crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm") Signed-off-by: Hongbo Li Reviewed-by: Tianjia Zhang Signed-off-by: Herbert Xu commit 9039878ade5d7ec6ac8db299ab8e7d0d563e3447 Author: Kai Ye Date: Fri Jun 4 09:31:29 2021 +0800 crypto: hisilicon/sec - modify the SEC request structure Modify the SEC request structure, combines two common parameters of the SEC request into one parameter. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 668f1ab70378d836a9df0cc01abf21c40c4d9348 Author: Kai Ye Date: Fri Jun 4 09:31:28 2021 +0800 crypto: hisilicon/sec - add hardware integrity check value process Use hardware integrity check value process instead of soft verify process when doing aead decryption. Signed-off-by: Kai Ye Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 6c46a3297beae4ae2d22b26da5e091f058381c7c Author: Kai Ye Date: Fri Jun 4 09:31:27 2021 +0800 crypto: hisilicon/sec - add fallback tfm supporting for aeads Add fallback tfm supporting for hisi_sec driver. Due to the Kunpeng920's CCM/GCM algorithm not supports 0 byte src length. So the driver needs to setting the soft fallback aead tfm. Signed-off-by: Kai Ye Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit c16a70c1f253e70f5d49b8e1054769bc8dbc3848 Author: Kai Ye Date: Fri Jun 4 09:31:26 2021 +0800 crypto: hisilicon/sec - add new algorithm mode for AEAD Add new algorithm mode for AEAD: CCM(AES), GCM(AES), CCM(SM4), GCM(SM4). Signed-off-by: Kai Ye Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 1b82435d17774f3eaab35dce239d354548aa9da2 Author: Hangbin Liu Date: Thu Jun 3 01:53:40 2021 -0400 crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit In curve25519_mod_init() the curve25519_alg will be registered only when (X86_FEATURE_BMI2 && X86_FEATURE_ADX). But in curve25519_mod_exit() it still checks (X86_FEATURE_BMI2 || X86_FEATURE_ADX) when do crypto unregister. This will trigger a BUG_ON in crypto_unregister_alg() as alg->cra_refcnt is 0 if the cpu only supports one of X86_FEATURE_BMI2 and X86_FEATURE_ADX. Fixes: 07b586fe0662 ("crypto: x86/curve25519 - replace with formally verified implementation") Signed-off-by: Hangbin Liu Reviewed-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit a8bc4f5e7a72e4067f5afd7e98b61624231713ca Author: Wei Yongjun Date: Wed Jun 2 11:36:45 2021 +0000 crypto: qce - fix error return code in qce_skcipher_async_req_handle() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1339a7c3ba05 ("crypto: qce: skcipher: Fix incorrect sg count for dma transfers") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Thara Gopinath Signed-off-by: Herbert Xu commit 2dcf45622481a22ffe108e2f381a929c9132c605 Author: Corentin Labbe Date: Tue Jun 1 15:11:32 2021 +0000 MAINTAINERS: add gemini crypto sl3516-ce Add myself as maintainer of gemini sl3516-ce crypto driver. Add also the driver to the list of files for gemini SoC. Reviewed-by: Linus Walleij Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 46c5338db7bd45b2cf99570560f00389d60fd6b4 Author: Corentin Labbe Date: Tue Jun 1 15:11:29 2021 +0000 crypto: sl3516 - Add sl3516 crypto engine The cortina/gemini SL3516 SoC has a crypto IP name either (crypto engine/crypto acceleration engine in the datasheet). It support many algorithms like [AES|DES|3DES][ECB|CBC], SHA1, MD5 and some HMAC. This patch adds the core files and support for ecb(aes) and the RNG. Acked-by: Linus Walleij Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 124d77c22c6183c76aa4bb71c29ee0c842562a5f Author: Corentin Labbe Date: Tue Jun 1 15:11:28 2021 +0000 dt-bindings: crypto: Add documentation for sl3516-ce This patch adds documentation for Device-Tree bindings for the SL3516-ce cryptographic offloader driver. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit ca323b2c61ec321eb9f2179a405b9c34cdb4f553 Author: Zhang Qilong Date: Tue Jun 1 22:51:18 2021 +0800 crypto: omap-sham - Fix PM reference leak in omap sham ops pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 604c31039dae4 ("crypto: omap-sham - Check for return value from pm_runtime_get_sync") Signed-off-by: Zhang Qilong Signed-off-by: Herbert Xu commit d950cd1b1c204c4a72e08c7c13862451f9d7d902 Author: Zhang Qilong Date: Tue Jun 1 22:51:17 2021 +0800 crypto: omap-des - using pm_runtime_resume_and_get instead of pm_runtime_get_sync 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. Signed-off-by: Zhang Qilong Signed-off-by: Herbert Xu commit 57c126661f50b884d3812e7db6e00f2e778eccfb Author: Tong Tiangen Date: Tue Jun 1 18:01:55 2021 +0800 crypto: nitrox - fix unchecked variable in nitrox_register_interrupts Function nitrox_register_interrupts leaves variable 'nr_vecs' unchecked, which would be use as kcalloc parameter later. Fixes: 5155e118dda9 ("crypto: cavium/nitrox - use pci_alloc_irq_vectors() while enabling MSI-X.") Signed-off-by: Tong Tiangen Signed-off-by: Herbert Xu commit 2c1bc371268862a991a6498e1dddc8971b9076b8 Author: Thierry Reding Date: Thu Jun 3 18:46:29 2021 +0200 iommu/arm-smmu: Use Tegra implementation on Tegra186 Tegra186 requires the same SID override programming as Tegra194 in order to seamlessly transition from the firmware framebuffer to the Linux framebuffer, so the Tegra implementation needs to be used on Tegra186 devices as well. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210603164632.1000458-7-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 8eb68595475ac5fcaaa3718a173283df48cb4ef1 Author: Thierry Reding Date: Thu Jun 3 18:46:28 2021 +0200 iommu/arm-smmu: tegra: Implement SID override programming The secure firmware keeps some SID override registers set as passthrough in order to allow devices such as the display controller to operate with no knowledge of SMMU translations until an operating system driver takes over. This is needed in order to seamlessly transition from the firmware framebuffer to the OS framebuffer. Upon successfully attaching a device to the SMMU and in the process creating identity mappings for memory regions that are being accessed, the Tegra implementation will call into the memory controller driver to program the override SIDs appropriately. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210603164632.1000458-6-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7ecbf253f8d64c08de28d16a66e3abbe873f6c9f Author: Thierry Reding Date: Thu Jun 3 18:46:27 2021 +0200 iommu/arm-smmu: tegra: Detect number of instances at runtime Parse the reg property in device tree and detect the number of instances represented by a device tree node. This is subsequently needed in order to support single-instance SMMUs with the Tegra implementation because additional programming is needed to properly configure the SID override registers in the memory controller. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210603164632.1000458-5-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4287861dca9d77490ee50de42aa3ada92da86c9d Author: Thierry Reding Date: Thu Jun 3 18:46:25 2021 +0200 dt-bindings: arm-smmu: Add Tegra186 compatible string The ARM SMMU instantiations found on Tegra186 and later need inter- operation with the memory controller in order to correctly program stream ID overrides. Furthermore, on Tegra194 multiple instances of the SMMU can gang up to achieve higher throughput. In order to do this, they have to be programmed identically so that the memory controller can interleave memory accesses between them. Add the Tegra186 compatible string to make sure the interoperation with the memory controller can be enabled on that SoC generation. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210603164632.1000458-3-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit ce7fc8e77bc3bb85ed18a735e558be9aada9e632 Merge: c7c65703260c8 0d97174aeadfc Author: Krzysztof Kozlowski Date: Fri Jun 11 08:35:11 2021 +0200 Merge branch 'for-thierry/arm-smmu' of https://git.kernel.org/pub/scm/linux/kernel/git/will/linux into for-v5.14/tegra-mc Pull ARM SMMU driver change from Will Deacon to resolve dependencies between memory controllers, Tegra ARM SoC and ARM SMMU drivers trees. Further ARM SMMU changes for Tegra depend on the change in Will's tree and on Tegra memory controllers drivers work done before by Thierry Reding. Pulling Will's tree allows to apply the rest of this ARM SMMU Tegra work via memory controllers drivers tree. Signed-off-by: Krzysztof Kozlowski commit 3ff340e24c9dd5cff9fc07d67914c5adf67f80d6 Author: Tony Lindgren Date: Fri Jun 11 08:42:50 2021 +0300 bus: ti-sysc: Fix gpt12 system timer issue with reserved status Jarkko Nikula reported that Beagleboard revision c2 stopped booting. Jarkko bisected the issue down to commit 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4"). Let's fix the issue by tagging system timers as reserved rather than ignoring them. And let's not probe any interconnect target module child devices for reserved modules. This allows PM runtime to keep track of clocks and clockdomains for the interconnect target module, and prevent the system timer from idling as we already have SYSC_QUIRK_NO_IDLE and SYSC_QUIRK_NO_IDLE_ON_INIT flags set for system timers. Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") Reported-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Tony Lindgren commit 7a7ae1eba24a04fdaf84ef6a11760b5b8db3f723 Author: gushengxian Date: Tue Jun 8 19:27:46 2021 -0700 xfrm: policy: fix a spelling mistake Fix a spelling mistake. Signed-off-by: gushengxian Signed-off-by: Steffen Klassert commit 78b4b165280d3d70e7a217599f0c06a4c0bb11f9 Author: Gowtham Tammana Date: Wed Jun 2 17:04:58 2021 -0500 ARM: dts: dra7: Fix duplicate USB4 target module node With [1] USB4 target-module node got defined in dra74x.dtsi file. However, the earlier definition in [2] was not removed, and this duplication of the target module is causing boot failure on dra74 variant boards - dra7-evm, dra76-evm. USB4 is only present in DRA74x variants, so keeping the entry in dra74x.dtsi and removing it from the top level interconnect hierarchy dra7-l4.dtsi file. This change makes the USB4 target module no longer visible to AM5718, DRA71x and DRA72x so removing references to it in their respective dts files. [1]: commit c7b72abca61ec ("ARM: OMAP2+: Drop legacy platform data for dra7 dwc3") [2]: commit 549fce068a311 ("ARM: dts: dra7: Add l4 interconnect hierarchy and ti-sysc data") Fixes: c7b72abca61ec ("ARM: OMAP2+: Drop legacy platform data for dra7 dwc3") Signed-off-by: Gowtham Tammana Reviewed-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 1bd8a7dc28c1c410f1ceefae1f2a97c06d1a67c2 Merge: 2a7005c8a3982 445d3bed75de4 Author: Dave Airlie Date: Fri Jun 11 14:19:06 2021 +1000 Merge tag 'exynos-drm-next-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Two cleanups - These patches make Exynos DRM driver to use pm_runtime_resume_and_get() function instead of m_runtime_get_sync() to deal with usage counter. pm_runtime_get_sync() increases the usage counter even when it failed, which could make callers to forget to decrease the usage counter. pm_runtime_resume_and_get() decreases the usage counter regardless of whether it failed or not. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20210611025939.393282-1-inki.dae@samsung.com commit 2a7005c8a3982ba27fab237d85c27da446484e9c Merge: 0666cba1f5b2b 47c65b3853f88 Author: Dave Airlie Date: Fri Jun 11 13:34:42 2021 +1000 Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Disable mmap ioctl for gen12+ (excl. TGL-LP) - Start enabling HuC loading by default for upcoming Gen12+ platforms (excludes TGL and RKL) Core Changes: - Backmerge of drm-next Driver Changes: - Revert "i915: use io_mapping_map_user" (Eero, Matt A) - Initialize the TTM device and memory managers (Thomas) - Major rework to the GuC submission backend to prepare for enabling on new platforms (Michal Wa., Daniele, Matt B, Rodrigo) - Fix i915_sg_page_sizes to record dma segments rather than physical pages (Thomas) - Locking rework to prep for TTM conversion (Thomas) - Replace IS_GEN and friends with GRAPHICS_VER (Lucas) - Use DEVICE_ATTR_RO macro (Yue) - Static code checker fixes (Zhihao) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/YMHeDxg9VLiFtyn3@jlahtine-mobl.ger.corp.intel.com commit 297e6e38320f325eb6763e48847e7dd06fda694b Author: Odelu Kukatla Date: Tue Apr 27 15:20:58 2021 +0530 arm64: dts: sc7280: Add interconnect provider DT nodes Add the DT nodes for the network-on-chip interconnect buses found on sc7280-based platforms. Signed-off-by: Odelu Kukatla Link: https://lore.kernel.org/r/1619517059-12109-4-git-send-email-okukatla@codeaurora.org [bjorn: Sorted nodes and dropped include] Signed-off-by: Bjorn Andersson commit 0666cba1f5b2bfbf17aab9fb7b0dbbb597213441 Merge: c707b73f0cfb1 989c9dad61315 Author: Dave Airlie Date: Fri Jun 11 12:50:47 2021 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next - remove redundant NULL checks by various people - fix sparse checker warnings from Marc - expose more GPU ID values to userspace from Christian - add HWDB entry for GPU found on i.MX8MP from Sascha - rework of the linear window calculation to better deal with systems with large regions of reserved RAM Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/f27e1ec2c2fea310bfb6fe6c99174a54e9dfba83.camel@pengutronix.de commit 445d3bed75de4082c7c7794030ac9a5b8bfde886 Author: Inki Dae Date: Tue May 25 19:51:39 2021 +0900 drm/exynos: use pm_runtime_resume_and_get() Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() to deal with usage counter. pm_runtime_get_sync() increases the usage counter even when it failed, which makes callers to forget to decrease the usage counter and resulted in reference leak. pm_runtime_resume_and_get() function decreases the usage counter when it failed internally so it can avoid the reference leak. Changelog v1: - Fix an build error reported by kernel test robot of Intel. Signed-off-by: Inki Dae Reported-by: kernel test robot commit a89b6c8f86b9ae245558572b5247dc8ff10f2fe8 Author: Tian Tao Date: Mon May 24 20:07:57 2021 +0800 drm/exynos: Use pm_runtime_resume_and_get() to replace open coding use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle to avoid continuing to increase the refcount when pm_runtime_get_sync fails. Signed-off-by: Tian Tao Reviewed-by: Daniel Vetter Signed-off-by: Inki Dae commit 648f2c6100cfa18e7dfe43bc0b9c3b73560d623c Author: Minchan Kim Date: Wed Jun 9 09:37:17 2021 -0700 selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC In the field, we have seen lots of allocation failure from the call path below. 06-03 13:29:12.999 1010315 31557 31557 W Binder : 31542_2: page allocation failure: order:0, mode:0x800(GFP_NOWAIT), nodemask=(null),cpuset=background,mems_allowed=0 ... ... 06-03 13:29:12.999 1010315 31557 31557 W Call trace: 06-03 13:29:12.999 1010315 31557 31557 W : dump_backtrace.cfi_jt+0x0/0x8 06-03 13:29:12.999 1010315 31557 31557 W : dump_stack+0xc8/0x14c 06-03 13:29:12.999 1010315 31557 31557 W : warn_alloc+0x158/0x1c8 06-03 13:29:12.999 1010315 31557 31557 W : __alloc_pages_slowpath+0x9d8/0xb80 06-03 13:29:12.999 1010315 31557 31557 W : __alloc_pages_nodemask+0x1c4/0x430 06-03 13:29:12.999 1010315 31557 31557 W : allocate_slab+0xb4/0x390 06-03 13:29:12.999 1010315 31557 31557 W : ___slab_alloc+0x12c/0x3a4 06-03 13:29:12.999 1010315 31557 31557 W : kmem_cache_alloc+0x358/0x5e4 06-03 13:29:12.999 1010315 31557 31557 W : avc_alloc_node+0x30/0x184 06-03 13:29:12.999 1010315 31557 31557 W : avc_update_node+0x54/0x4f0 06-03 13:29:12.999 1010315 31557 31557 W : avc_has_extended_perms+0x1a4/0x460 06-03 13:29:12.999 1010315 31557 31557 W : selinux_file_ioctl+0x320/0x3d0 06-03 13:29:12.999 1010315 31557 31557 W : __arm64_sys_ioctl+0xec/0x1fc 06-03 13:29:12.999 1010315 31557 31557 W : el0_svc_common+0xc0/0x24c 06-03 13:29:12.999 1010315 31557 31557 W : el0_svc+0x28/0x88 06-03 13:29:12.999 1010315 31557 31557 W : el0_sync_handler+0x8c/0xf0 06-03 13:29:12.999 1010315 31557 31557 W : el0_sync+0x1a4/0x1c0 .. .. 06-03 13:29:12.999 1010315 31557 31557 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:12.999 1010315 31557 31557 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:12.999 1010315 31557 31557 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:12.999 1010161 10686 10686 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:12.999 1010161 10686 10686 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:12.999 1010161 10686 10686 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:12.999 1010161 10686 10686 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:12.999 1010161 10686 10686 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:12.999 1010161 10686 10686 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:12.999 1010161 10686 10686 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:12.999 1010161 10686 10686 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:12.999 1010161 10686 10686 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:13.000 1010161 10686 10686 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:13.000 1010161 10686 10686 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:13.000 1010161 10686 10686 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:13.000 1010161 10686 10686 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:13.000 1010161 10686 10686 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:13.000 1010161 10686 10686 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:13.000 1010161 10686 10686 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:13.000 1010161 10686 10686 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:13.000 1010161 10686 10686 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:13.000 10230 30892 30892 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:13.000 10230 30892 30892 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 06-03 13:29:13.000 10230 30892 30892 W node 0 : slabs: 57, objs: 2907, free: 0 06-03 13:29:13.000 10230 30892 30892 W SLUB : Unable to allocate memory on node -1, gfp=0x900(GFP_NOWAIT|__GFP_ZERO) 06-03 13:29:13.000 10230 30892 30892 W cache : avc_node, object size: 72, buffer size: 80, default order: 0, min order: 0 Based on [1], selinux is tolerate for failure of memory allocation. Then, use __GFP_NOWARN together. [1] 476accbe2f6e ("selinux: use GFP_NOWAIT in the AVC kmem_caches") Signed-off-by: Minchan Kim [PM: subj fix, line wraps, normalized commit refs] Signed-off-by: Paul Moore commit 6ddb5680085a3eefe0c6267e3514060045a13c95 Author: Zhen Lei Date: Wed Jun 9 10:27:01 2021 +0800 audit: remove trailing spaces and tabs Run the following command to find and remove the trailing spaces and tabs: sed -r -i 's/[ \t]+$//' The files to be checked are as follows: kernel/audit* include/linux/audit.h include/uapi/linux/audit.h Signed-off-by: Zhen Lei Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 3ec0c3ec2d92c09465534a1ff9c6f9d9506ffef6 Author: Logan Gunthorpe Date: Thu Jun 10 10:06:09 2021 -0600 PCI/P2PDMA: Avoid pci_get_slot(), which may sleep In order to use upstream_bridge_distance_warn() from a dma_map function, it must not sleep. However, pci_get_slot() takes the pci_bus_sem so it might sleep. In order to avoid this, try to get the host bridge's device from the first element in the device list. It should be impossible for the host bridge's device to go away while references are held on child devices, so the first element should not be able to change and, thus, this should be safe. Introduce a static function called pci_host_bridge_dev() to obtain the host bridge's root device. Link: https://lore.kernel.org/r/20210610160609.28447-7-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 7e2faa1710c408712185bb6463eaa0ee4776350f Author: Logan Gunthorpe Date: Thu Jun 10 10:06:08 2021 -0600 PCI/P2PDMA: Refactor pci_p2pdma_map_type() All callers of pci_p2pdma_map_type() have a struct dev_pgmap and a struct device (of the client doing the DMA transfer). Thus move the conversion to struct pci_devs for the provider and client into this function. Link: https://lore.kernel.org/r/20210610160609.28447-6-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit cf201bfe8cdc9ba11c4f312945b908ed24c7b7b5 Author: Logan Gunthorpe Date: Thu Jun 10 10:06:07 2021 -0600 PCI/P2PDMA: Warn if host bridge not in whitelist If the host bridge is not in the whitelist print a warning in the calc_map_type_and_dist_warn() path detailing the vendor and device IDs that would need to be added to the whitelist. Suggested-by: Don Dutile Link: https://lore.kernel.org/r/20210610160609.28447-5-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit f9c125b9eb30650356cf582003365b1ecbd7003b Author: Logan Gunthorpe Date: Thu Jun 10 10:06:06 2021 -0600 PCI/P2PDMA: Use correct calc_map_type_and_dist() return type Instead of using an int for the return value of this function, use the correct enum pci_p2pdma_map_type. Link: https://lore.kernel.org/r/20210610160609.28447-4-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit e4ece59abd70d8f54e2163274dc996bb442832a6 Author: Logan Gunthorpe Date: Thu Jun 10 10:06:05 2021 -0600 PCI/P2PDMA: Collect acs list in stack buffer to avoid sleeping In order to call the calc_map_type_and_dist_warn() function from a dma_map operation, the function must not sleep. The only reason it sleeps is to allocate memory for the seq_buf to print a verbose warning telling the user how to disable ACS for that path. Instead of allocating the memory with kmalloc(), allocate a smaller buffer on the stack. A 128 byte buffer is enough to print 10 PCI device names. A system with 10 bridge ports between two devices that have ACS enabled would be unusually large, so this should still be a reasonable limit. This also cleans up the awkward (and broken) return with -ENOMEM which contradicts the return type and the caller was not prepared for. Link: https://lore.kernel.org/r/20210610160609.28447-3-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 6389d43745228de128e7b1a66eb18c0ccf43e6b4 Author: Logan Gunthorpe Date: Thu Jun 10 10:06:04 2021 -0600 PCI/P2PDMA: Rename upstream_bridge_distance() and rework doc The function upstream_bridge_distance() has evolved such that its name is no longer entirely reflective of what the function does. It not only calculates the distance between two peers but also calculates how the DMA addresses for those two peers should be mapped. Rename it to calc_map_type_and_dist() and rework the documentation to better describe the two pieces of information the function returns. [bhelgaas: tweak comment wording] Link: https://lore.kernel.org/r/20210610160609.28447-2-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 44b1fbc0f5f30e66a56d29575349f0b1ebe2b0ee Author: Finn Thain Date: Thu Jun 10 11:15:06 2021 +1000 m68k/q40: Replace q40ide driver with pata_falcon and falconide This allows m68k q40 systems to switch from the deprecated IDE subsystem to libata. Enhance the byte-swapping falconide and pata_falcon platform drivers to accept an irq resource, for use on q40. Atari ST-DMA IRQ arrangements seem to co-exist with q40 IRQ arrangements without too much mess. The new IO resources were added solely for the purpose of making request_region() reservations identical to those made by q40ide: these regions aren't used for actual IO. Cc: Michael Schmitz Cc: Richard Zidlicky Reviewed-and-tested-by: Michael Schmitz Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/eefb7e9c2291e09fb4e065ce06bc105f05bb9e06.1623287706.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe commit cabd10be0b9e4bf043dc828321875b937b2aa7ca Author: Finn Thain Date: Thu Jun 10 11:15:06 2021 +1000 m68k/mac: Replace macide driver with generic platform drivers This allows m68k mac systems to switch from the deprecated IDE subsystem to libata. This was tested on my Quadra 630. I haven't tested it on my PowerBook 150 because I don't have a RAM adapter board for it. It appears that the hardware I tested doesn't need macide_clear_irq() or macide_test_irq(). If it did, the generic driver would not have worked. It's possible that those routines are needed for the PowerBook 150 but we can cross that bridge if and when we come to it. BTW, macide_clear_irq() appears to suffer from a race condition. The write to the interrupt flags register could have unintended side effects as it may alter other flag bits. Fortunately, all of the other bits are unused by Linux. When tested on my Quadra 630, the assignment *ide_ifr &= ~0x20 was observed to have no effect on bit 5, so it may be redundant anyway. Cc: Michael Schmitz Cc: Joshua Thompson Reviewed-by: Michael Schmitz Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/11a56b3317df3bb2ddc15fd29b40b6820e9c7444.1623287706.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe commit 76cf404c40ae8efcf8c6405535a3f6f69e6ba2a5 Merge: 53f8b1b25419a c61cfb941dcd8 Author: David S. Miller Date: Thu Jun 10 14:50:08 2021 -0700 Merge branch 'ipa-mem-2' Alex Elder says: ==================== net: ipa: memory region rework, part 2 This is the second portion of a set of patches updating the IPA memory region code. In this portion (part 2), the focus is on adjusting the code so that it no longer assumes the memory region descriptor array is indexed by the region identifier. This brings with it some related cleanup. Three loops are changed so their loop index variable is an unsigned rather than an enumerated type. A set of functions is changed so a region identifier (rather than a memory region descriptor pointer) is passed as argument, to simplify their call sites. This isn't entirely related or required, but I think it improves the code. A validation function for filter and route table memory regions is changed to take memory region IDs, rather than determining which region to validate based on a set of Boolean flags. Finally, ipa_mem_find() is created to abstract getting a memory descriptor based on its ID, and it is used everywhere rather than indexing the array. With that implemented, all of the memory regions can be defined by arrays of entries defined without providing index designators. ==================== Signed-off-by: David S. Miller commit c61cfb941dcd8c0529a0c0be31bb1722feaa6082 Author: Alex Elder Date: Thu Jun 10 14:23:08 2021 -0500 net: ipa: don't index mem data array by ID Finally the code handles the IPA memory region array in the configuration data without assuming it is indexed by region ID. Get rid of the array index designators where these arrays are initialized. As a result, there's no more need to define an explicitly undefined memory region ID, so get rid of that. Change ipa_mem_find() so it no longer assumes the ipa->mem[] array is indexed by memory region ID. Instead, have it search the array for the entry having the requested memory ID, and return the address of the descriptor if found. Otherwise return NULL. Stop allowing memory regions to be defined with zero size and zero canary value. Check for this condition in ipa_mem_valid_one(). As a result, it is not necessary to check for this case in ipa_mem_config(). Finally, there is no need for IPA_MEM_UNDEFINED to be defined any more, so get rid of it. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 5e3bc1e5d0021c2efcbc8ba7da7b96c6a502d8bf Author: Alex Elder Date: Thu Jun 10 14:23:07 2021 -0500 net: ipa: introduce ipa_mem_find() Introduce a new function that abstracts finding information about a region in IPA-local memory, given its memory region ID. For now it simply uses the region ID as an index into the IPA memory array. If the region is not defined, ipa_mem_find() returns a null pointer. Update all code that accesses the ipa->mem[] array directly to use ipa_mem_find() instead. The return value must be checked for null when optional memory regions are sought. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e9f5b2766e706f3020b3d975fee3b42d056b0849 Author: Alex Elder Date: Thu Jun 10 14:23:06 2021 -0500 net: ipa: pass memory id to ipa_table_valid_one() Stop passing most of the Boolean flags to ipa_table_valid_one(), and just pass a memory region ID to it instead. We still need to indicate whether we're operating on a routing or filter table. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 25116645dbcbd67dc7f1535d395aa3611e31ba88 Author: Alex Elder Date: Thu Jun 10 14:23:05 2021 -0500 net: ipa: pass mem_id to ipa_table_reset_add() Pass a memory region ID rather than the address of a memory region descriptor to ipa_table_reset_add() to simplify callers. Similarly, pass memory region IDs to ipa_table_init_add(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ce928bf8fec070b2239ede568687bd878032b325 Author: Alex Elder Date: Thu Jun 10 14:23:04 2021 -0500 net: ipa: pass mem ID to ipa_mem_zero_region_add() Pass a memory region ID rather than the address of a memory region descriptor to ipa_mem_zero_region_add() to simplify callers. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 07c525a62a4db207e298064b026b8f3f8da192a6 Author: Alex Elder Date: Thu Jun 10 14:23:03 2021 -0500 net: ipa: pass mem_id to ipa_filter_reset_table() Pass a memory region ID rather than the address of a memory region descriptor to ipa_filter_reset_table(), to simplify callers. We can eliminate the check for a zero region size in this function because ipa_table_reset_add() checks that before adding anything to the transaction. Note that here and in subsequent commits there is no need to check whether a memory region exists, because we will have already verified that during initialization. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ce05a9f39607623362aea9147c3dfab7a9f94ccb Author: Alex Elder Date: Thu Jun 10 14:23:02 2021 -0500 net: ipa: clean up header memory validation Do some general cleanup in ipa_cmd_header_valid(): - Delay assigning the mem variable until just before it's used. - Assign the maximum offset and size values together. - Improve comments explaining the single range of memory being made up of a modem portion and an AP portion. - Record the offset of the combined range in a local variable. - Do the initial size assignment right after assigning the offset. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8cc7ebbf5f6e8ca825dba4d0180329857c997c40 Author: Alex Elder Date: Thu Jun 10 14:23:01 2021 -0500 net: ipa: don't assume mem array indexed by ID Change ipa_mem_valid() to iterate over the entries using a u32 index variable rather than using a memory region ID. Use the ID found inside the memory descriptor rather than the loop index. Change ipa_mem_size_valid() to iterate over the entries but without assuming the array index is the memory region ID. "Empty" entries will have zero size; and we'll temporarily assume such entries have zero offset as well (they all do, currently). Similarly, don't assume the mem[] array is indexed by ID in ipa_mem_config(). There, "empty" entries will have a zero canary count, so no special assumptions are needed to handle them correctly. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 810e4441946ca17542db334bbcb579e84177b299 Author: Jamin Lin Date: Thu Jun 3 10:48:19 2021 +0800 dt-bindings: aspeed-i2c: Convert txt to yaml format Convert aspeed i2c to yaml. Signed-off-by: Jamin Lin Link: https://lore.kernel.org/r/20210603024839.27976-2-jamin_lin@aspeedtech.com Signed-off-by: Rob Herring commit 53f8b1b25419a14b784feb6706bfe5bac03c5a75 Author: Cristobal Forno Date: Thu Jun 10 11:08:35 2021 -0600 ibmvnic: Allow device probe if the device is not ready at boot Allow the device to be initialized at a later time if it is not available at boot. The device will be allowed to probe but will be given a "down" state. After completing device probe and registering the net device, the driver will await an interrupt signal from its partner device, indicating that it is ready for boot. The driver will schedule a work event to perform the necessary procedure and begin operation. Co-developed-by: Thomas Falcon Signed-off-by: Thomas Falcon Signed-off-by: Cristobal Forno Acked-by: Lijun Pan Reviewed-by: Dany Madden Signed-off-by: David S. Miller commit 1b6c2151dbff7978198ff02ac2448954becd976f Merge: 950fd045d76c9 255213ca68876 Author: David S. Miller Date: Thu Jun 10 14:20:44 2021 -0700 Merge branch 'marvell-prestera-lag' Vadym Kochan says: ==================== net: marvell: prestera: add LAG support The following features are supported: - LAG basic operations - create/delete LAG - add/remove a member to LAG - enable/disable member in LAG - LAG Bridge support - LAG VLAN support - LAG FDB support Limitations: - Only HASH lag tx type is supported - The Hash parameters are not configurable. They are applied during the LAG creation stage. - Enslaving a port to the LAG device that already has an upper device is not supported. Changes extracted from: https://lkml.org/lkml/2021/2/3/877 and marked with "v2". v2: There are 2 additional preparation patches which simplifies the netdev topology handling. 1) Initialize 'lag' with NULL in prestera_lag_create() [suggested by Vladimir Oltean] 2) Use -ENOSPC in prestera_lag_port_add() if max lag [suggested by Vladimir Oltean] numbers were reached. 3) Do not propagate netdev events to prestera_switchdev [suggested by Vladimir Oltean] but call bridge specific funcs. It simplifies the code. 4) Check on info->link_up in prestera_netdev_port_lower_event() [suggested by Vladimir Oltean] 5) Return -EOPNOTSUPP in prestera_netdev_port_event() in case [suggested by Vladimir Oltean] LAG hashing mode is not supported. 6) Do not pass "lower" netdev to bridge join/leave functions. [suggested by Vladimir Oltean] It is not need as offloading settings applied on particular physical port. It requires to do extra upper dev lookup in case port is in the LAG which is in the bridge on vlans add/del. ==================== Signed-off-by: David S. Miller commit 255213ca688767662a23d14f3fbf099c0e0b755d Author: Serhiy Boiko Date: Thu Jun 10 18:43:11 2021 +0300 net: marvell: prestera: add LAG support The following features are supported: - LAG basic operations - create/delete LAG - add/remove a member to LAG - enable/disable member in LAG - LAG Bridge support - LAG VLAN support - LAG FDB support Limitations: - Only HASH lag tx type is supported - The Hash parameters are not configurable. They are applied during the LAG creation stage. - Enslaving a port to the LAG device that already has an upper device is not supported. Co-developed-by: Andrii Savka Signed-off-by: Andrii Savka Signed-off-by: Serhiy Boiko Co-developed-by: Vadym Kochan Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 82bbaa05bf9062d085b236d4799c494b62c1c7ef Author: Vadym Kochan Date: Thu Jun 10 18:43:10 2021 +0300 net: marvell: prestera: do not propagate netdev events to prestera_switchdev.c Replace prestera_bridge_port_event(...) by prestera_bridge_port_join(...) and prestera_bridge_port_leave(). It simplifies the code by reading netdev event specific handling only once in prestera_main.c Signed-off-by: Vadym Kochan CC: Vladimir Oltean Signed-off-by: David S. Miller commit 3d5048cc54bd250cfbb358c37fcc011135977887 Author: Vadym Kochan Date: Thu Jun 10 18:43:09 2021 +0300 net: marvell: prestera: move netdev topology validation to prestera_main Move handling of PRECHANGEUPPER event from prestera_switchdev to prestera_main which is responsible for basic netdev events handling and routing them to related module. Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 950fd045d76c96ada8c7a6e80f1f4e40de4beb17 Author: Tan Zhongjun Date: Thu Jun 10 22:01:18 2021 +0800 soc: qcom: ipa: Remove superfluous error message around platform_get_irq() The platform_get_irq() prints error message telling that interrupt is missing,hence there is no need to duplicated that message in the drivers. Signed-off-by: Tan Zhongjun Signed-off-by: David S. Miller commit d3d0e1e857110a2f8147b1aa3a045b1fccc1e7c3 Author: Miquel Raynal Date: Thu Jun 10 10:20:30 2021 +0200 dt-binding: memory: pl353-smc: Convert to yaml Convert this binding file to yaml schema. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-10-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit cb8e2e4300fc17e1028cce554ecf72a9e6161742 Author: Baokun Li Date: Thu Jun 10 21:26:03 2021 +0800 dccp: tfrc: fix doc warnings in tfrc_equation.c Add description for `tfrc_invert_loss_event_rate` to fix the W=1 warnings: net/dccp/ccids/lib/tfrc_equation.c:695: warning: Function parameter or member 'loss_event_rate' not described in 'tfrc_invert_loss_event_rate' Signed-off-by: Baokun Li Reviewed-by: Richard Sailer Signed-off-by: David S. Miller commit 73e42909ef2d1fa554b39bf6ae3eb1546dfc97a5 Author: Wang Hai Date: Thu Jun 10 21:03:55 2021 +0800 atm: Use list_for_each_entry() to simplify code in resources.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 3e98ae0014cb882a2989cf4465e2b26688d3608d Author: Wang Hai Date: Thu Jun 10 20:54:17 2021 +0800 ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Lijun Pan Reviewed-by: Dany Madden Signed-off-by: David S. Miller commit bc831facf8a11e4e615dc67ae790325710bc1979 Author: Wang Hai Date: Thu Jun 10 20:48:26 2021 +0800 net: x25: Use list_for_each_entry() to simplify code in x25_route.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 9e2b7b0450cfc6a99ceaa37843cb5d0179e1c2ae Author: Yang Yingliang Date: Thu Jun 10 17:25:35 2021 +0800 mt76: mt7615: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 8a55a73433e763c8aec4a3e8df5c28c821fc44b9 Author: Yang Yingliang Date: Thu Jun 10 17:17:12 2021 +0800 net: mido: mdio-mux-bcm-iproc: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code and avoid a null-ptr-deref by checking 'res' in it. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 1f7096f0fdb2ac5ae6f1e290dfdd2fb7bbb074d3 Author: Wong Vee Khee Date: Thu Jun 10 16:53:54 2021 +0800 net: stmmac: Fix mixed enum type warning The commit 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure") introduced the following coverity warning: "Parse warning (PW.MIXED_ENUM_TYPE)" "1. mixed_enum_type: enumerated type mixed with another type" This is due to both "lo_state" and "lp_sate" which their datatype are enum stmmac_fpe_state type, and being assigned with "FPE_EVENT_UNKNOWN" which is a macro-defined of 0. Fixed this by assigned both these variables with the correct enum value. Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure") Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit f18c11812c949553d2b2481ecaa274dd51bed1e7 Author: Yang Yingliang Date: Thu Jun 10 16:02:43 2021 +0800 fjes: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 47651c51c02fc4937b39b2d2207aa0d9d26a4b58 Author: Yang Yingliang Date: Thu Jun 10 15:36:22 2021 +0800 net: axienet: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 0b462d017caff780f4922872c7098b193feee8b6 Author: Yang Yingliang Date: Thu Jun 10 15:29:33 2021 +0800 net: w5100: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit d2ca24ee9fd83666538c189330a07b90bbcf58b3 Merge: f1dcdc075617a e0bd276463e87 Author: David S. Miller Date: Thu Jun 10 13:50:43 2021 -0700 Merge branch 'ixp4xxx_hss-cleanups' Peng Li says: ==================== net: ixp4xx_hss: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit e0bd276463e874dfa572a9557c62f9a3d5bfcfd4 Author: Peng Li Date: Thu Jun 10 15:20:05 2021 +0800 net: ixp4xx_hss: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 17ce9764bb26f43b40de904f0d4a06be71abb979 Author: Peng Li Date: Thu Jun 10 15:20:04 2021 +0800 net: ixp4xx_hss: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 137d5672f80f8f08612659d6787a1fd196849c76 Author: Peng Li Date: Thu Jun 10 15:20:03 2021 +0800 net: ixp4xx_hss: remove redundant spaces According to the chackpatch.pl, space prohibited after that open parenthesis '('. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit dee014567732c7d16c395777e32952d7c59f01ca Author: Peng Li Date: Thu Jun 10 15:20:02 2021 +0800 net: ixp4xx_hss: add some required spaces Add space required before the open parenthesis '('. Add space required after that close brace '}'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 99ebe65eb9c0ada015931d239d9f2d1dc8897fee Author: Peng Li Date: Thu Jun 10 15:20:01 2021 +0800 net: ixp4xx_hss: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 6487fab04f2734eefaae1c3c32eec364d5e26bf3 Author: Peng Li Date: Thu Jun 10 15:20:00 2021 +0800 net: ixp4xx_hss: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" and should be "foo *bar", and "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 6f2016ed65385223ba8ace9c8897d04e3c2e1f16 Author: Peng Li Date: Thu Jun 10 15:19:59 2021 +0800 net: ixp4xx_hss: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 5c32fdbb899707ffa61a3887f12f57277287d643 Author: Peng Li Date: Thu Jun 10 15:19:58 2021 +0800 net: ixp4xx_hss: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit f1dcdc075617a2a8a866f4f928a780287a553ed0 Author: gushengxian Date: Wed Jun 9 23:29:58 2021 -0700 tipc:subscr.c: fix a spelling mistake Fix a spelling mistake. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 326af505ca1fbad6b9b7ba9f36399ceba0b6aba2 Author: gushengxian Date: Wed Jun 9 23:18:53 2021 -0700 tipc: socket.c: fix the use of copular verb Fix the use of copular verb. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 15139bcbb610f54f4362f099ae6bf9b824b97c82 Author: gushengxian Date: Wed Jun 9 22:50:46 2021 -0700 node.c: fix the use of indefinite article Fix the use of indefinite article. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 4e03d073afc4f6e5b1f34e58cce7d9942d703488 Author: gushengxian Date: Wed Jun 9 20:09:35 2021 -0700 af_unix: remove the repeated word "and" Remove the repeated word "and". Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 268551503d66dc0a266fe6034c84a31ab4f3edf7 Author: gushengxian Date: Wed Jun 9 18:11:59 2021 -0700 vsock/vmci: remove the repeated word "be" Remove the repeated word "be". Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 55748ac6a6d3e35f8fd0f5c9284df7c7f3b1705a Author: Mimi Zohar Date: Wed Jun 2 16:33:39 2021 -0400 ima: differentiate between EVM failures in the audit log Differentiate between an invalid EVM portable signature failure from other EVM HMAC/signature failures. Reviewed-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 2027e13f62702cf77b50bf927e8d04be5987380e Merge: 0699073951e35 9724fd5d9c2a0 Author: David S. Miller Date: Thu Jun 10 13:36:37 2021 -0700 Merge tag 'mlx5-updates-2021-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-06-09 Introduce steering header insert/remove and switchdev bridge offloads 1) From Yevgeny, Steering header insert/remove support ConnectX supports offloading of various encapsulations and decapsulations (e.g. VXLAN), which are performed by 'Packet Reformat' action. Starting with ConnectX-6 DX, a new reformat type is supported - INSERT_HEADER. This reformat allows inserting an arbitrary size buffer at a selected location in the packet on RX flows. The insert/remove header support are needed as a prerequisite for the bridge offloads vlan pop/push supprt, see below. 2) From Vlad, Support for bridge offloads for switchdev mode This change implements bridge offloads with VLAN-support that works on top of mlx5 representors in switchdev mode. HIGH-LEVEL OVERVIEW Hardware supported by mlx5 driver doesn't provide dynamic learning or aging functionality and requires the driver to emulate all switch-like behavior in software. As such, all packets by default go through miss path, appear on representor and get to software bridge, if it is the upper device of the representor. This causes bridge to process packet in software, learn the MAC address to FDB and send SWITCHDEV_FDB_ADD_TO_DEVICE event to all subscribers. Upon reception of SWITCHDEV_FDB_ADD_TO_DEVICE notification mlx5 bridge offloads the FDB to hardware and sends back SWITCHDEV_FDB_ADD_TO_BRIDGE notification to prevent such entries from being aged out by kernel bridge. Leaving aging to kernel bridge would result deletion of offloaded dynamic FDB entries every aging_time period due to packets being processed by hardware and, consecutively, 'used' timestamp for FDB entry not being updated. Hardware aging is emulated in driver by running periodic workqueue task that manually updates the rules according to their hardware counter: - If hardware counter has changed since last update, the handler updates 'used' timestamp in kernel bridge dynamic entry by sending SWITCHDEV_FDB_ADD_TO_BRIDGE notification for the entry. - If FDB entry wasn't updated for user-controllable aging_time period, then the FDB entry is unoffloaded from hardware and corresponding SWITCHDEV_FDB_DEL_TO_BRIDGE notification is sent to kernel bridge. The mlx5 bridge offload implementation fully supports port VLAN objects, including PVID (vlan push) and "Egress Untagged" (vlan pop). SOFTWARE ARCHITECTURE Mlx5_eswitch is extended with pointer to new mlx5_esw_bridge_offloads structure which has a linked list of mlx5_esw_bridge objects. Struct mlx5_esw_bridge is the main switch object in mlx5 that holds all data for offloaded FDB entries and metadata for bridge ports and their vlans. The mlx5_esw_bridge object is created when first representor of eswitch vport is added to bridge and deleted when the last representor is detached from it. Bridge FDB entries are saved in linked list (to iterate over all FDB entries in aging workqueue task) and also in hashtable for quick lookup by MAC+VLAN tuple. Bridge FDB entries are saved in linked list (to iterate over all FDB entries in aging workqueue task) and in hashtable for quick lookup by MAC+VLAN tuple. Port metadata is stored in struct mlx5_esw_bridge_port that is saved in xarray to allow quick lookup by vport number. Part of the port metadata is the set of port vlans that are represented by mlx5_esw_bridge_vlan structure. The vlan structure points to all FDBs on vlan/port via fdb_list linked list. Simplified diagram of mlx5 bridge objects: +------------------+ | mxl5_eswitch | | | | br_offloads | +--------+---------+ | +--------v-------------------+ | mlx5_esw_bridge_offloads | | | +--> bridges | | +-------+--------------------+ | | | | | +---v---------------+ | | mlx5_esw_bridge | | | | | | vports | | | | | | fdb_ht | | +---+---------------+ | | | +---v---------------+ +------+ mlx5_esw_bridge | | | +-------------------------+ vports | | | | | | fdb_ht +------------------------------------------+ | +-------------------+ | | | | | | +----------------------+ +---------------------------+ | +-> mlx5_esw_bridge_port | +--> mlx5_esw_bridge_fdb_entry <-+ | | | +----------------------+ | +--+------------------------+ | | | vlans +--+-> mlx5_esw_bridge_vlan | | | | | | | | | | | +--v------------------------+ | | +----------------------+ | | fdb_list +--+ | mlx5_esw_bridge_fdb_entry <-+ | | +-------^--------------+ +--+------------------------+ | | +----------------------+ | | | | +-> mlx5_esw_bridge_port | | +-----------------------+ | | | | | | vlans | | -----------------------+ | | | +-> mlx5_esw_bridge_vlan | | +----------------------+ | | +---------------------------+ | | fdb_list +-----> mlx5_esw_bridge_fdb_entry <-+ +-------^--------------+ +--+------------------------+ | | +-----------------------+ HARDWARE REPRESENTATION In order to adhere to kernel software datapath model bridge offloads must come after TC and NF FDBs. However, since netfilter offload in mlx5 is implemented with unmanaged tables, its miss path is not automatically connected to next priority and requires the code to manually connect with slow table. To keep bridge offloads encapsulated and not mix it with eswitch offloads new FDB_TC_MISS priority is created between FDB_FT_OFFLOAD and FDB_SLOW_PATH which allows bridge offloads to be created without exposing its internal tables to any other modules since miss path of managed TC-miss table is automatically wired to next priority. The bridge tables are created with new priority FDB_BR_OFFLOAD in FDB namespace. The new priority is between tc-miss and slow path priorities. Priority consist of two levels: the ingress table that is global per eswitch and matches incoming packets by src_mac/vid and redirects them to next level (egress table) that is chosen according to ingress port bridge membership and matches on dst_mac/vid in order to redirect packet to vport according to the following diagram: + | +---------v----------+ | | | FDB_TC_OFFLOAD | | | +---------+----------+ | | +---------v----------+ | | | FDB_FT_OFFLOAD | | | +---------+----------+ | | +---------v----------+ | | | FDB_TC_MISS | | | +---------+----------+ | +--------------------------------------+ | | | | +------+ | | | | | +------v--------+ FDB_BR_OFFLOAD | | | INGRESS_TABLE | | | +------+---+----+ | | | | match | | | +---------+ | | | | | +-------+ | | +-------v-------+ match | | | | | | EGRESS_TABLE +------------> vport | | | +-------+-------+ | | | | | | | +-------+ | | miss | | | +------+------+ | | | | +--------------------------------------+ | | +---------v----------+ | | | FDB_SLOW_PATH | | | +---------+----------+ | v PATCHES OVERVIEW 1-3 - Miscellaneous refactorings and infrastructure changes. 4 - Mlx5 bridge offload infrastructure and dedicated fs_core namespace/tables implementation. 5 - FDB entry offload. 6 - Dynamic FDB entry aging. 7-10 - VLAN filtering offload. 11 - Tracepoints for main mlx5 bridge offload events (FDB entry offload/unoffload, VLAN add/delete, etc.) ==================== Signed-off-by: David S. Miller -- commit e9c3bbd68ec7dc5dd986f7270d9233d27b092816 Author: Moritz Fischer Date: Sat Mar 27 10:51:40 2021 -0700 PCI/IOV: Clarify error message for unbound devices Be more verbose to disambiguate the error case when trying to configure SR-IOV with no driver bound vs. a driver that does not implement the .sriov_configure() callback. Link: https://lore.kernel.org/r/20210327175140.682708-1-mdf@kernel.org Reported-by: Brian Foley Signed-off-by: Moritz Fischer Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 0699073951e354069b4cfec28dbc4c35cef46e97 Author: Yang Yingliang Date: Wed Jun 9 22:17:44 2021 +0800 net: davinci_emac: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code and avoid a null-ptr-deref by checking 'res' in it. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit aced6d37df797db46fa4d3540f657e8e46f2667c Author: Yang Yingliang Date: Wed Jun 9 22:01:52 2021 +0800 net: ethernet: ti: cpsw: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller commit b040aab763236568e198ea193cb8b3e930fd0a37 Author: Wong Vee Khee Date: Mon Jun 7 10:36:45 2021 +0800 net: phy: probe for C45 PHYs that return PHY ID of zero in C22 space PHY devices such as the Marvell Alaska 88E2110 does not return a valid PHY ID when probed using Clause-22. The current implementation treats PHY ID of zero as a non-error and valid PHY ID, and causing the PHY device failed to bind to the Marvell driver. For such devices, we do an additional probe in the Clause-45 space, if a valid PHY ID is returned, we then proceed to attach the PHY device to the matching PHY ID driver. Signed-off-by: Wong Vee Khee Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d409989b59ad0b8d108706db25e17c320a9664eb Author: Chen Li Date: Mon Jun 7 09:44:35 2021 +0800 netlink: simplify NLMSG_DATA with NLMSG_HDRLEN The NLMSG_LENGTH(0) may confuse the API users, NLMSG_HDRLEN is much more clear. Besides, some code style problems are also fixed. Signed-off-by: Chen Li Signed-off-by: David S. Miller commit ad4e600cbf897f47525b342cd4b02e88ed300a83 Author: Gabriel Somlo Date: Wed May 26 06:51:26 2021 -0400 drivers/soc/litex: remove 8-bit subregister option Since upstream LiteX recommends that Linux support be limited to designs configured with 32-bit CSR subregisters (see commit a2b71fde in upstream LiteX, https://github.com/enjoy-digital/litex), remove the option to select 8-bit subregisters, significantly reducing the complexity of LiteX CSR (MMIO register) accessor methods. NOTE: for details on the underlying mechanics of LiteX CSR registers, see https://github.com/enjoy-digital/litex/wiki/CSR-Bus or the original LiteX accessors (litex/soc/software/include/hw/common.h in the upstream repository). Signed-off-by: Gabriel Somlo Cc: Stafford Horne Cc: Florent Kermarrec Cc: Mateusz Holenko Cc: Joel Stanley Reviewed-by: Joel Stanley Signed-off-by: Stafford Horne commit 12f739798470288c8c1053484fe0281fe4cc5ea4 Author: Subbaraman Narayanamurthy Date: Wed Jun 9 14:27:56 2021 -0700 usb: typec: ucsi: Fix a comment in ucsi_init() ucsi_unregister_ppm() got replaced with ucsi_unregister(). Fix the comment in ucsi_init() as well. Reviewed-by: Heikki Krogerus Signed-off-by: Subbaraman Narayanamurthy Link: https://lore.kernel.org/r/1623274076-6287-1-git-send-email-subbaram@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 8562d5bfc0fcdfd3aef32991e17dca585ae5ae7d Author: Greg Kroah-Hartman Date: Wed Jun 9 11:39:24 2021 +0200 USB: dwc3: remove debugfs root dentry storage There is no need to keep around the debugfs "root" directory for the dwc3 device. Instead, look it up anytime we need to find it. This will help when callers get out-of-order and we had the potential to have a "stale" pointer around for the root dentry, as has happened in the past. Tested-by: Jack Pham Reviewed-by: Peter Chen Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/20210609093924.3293230-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 03a674f5d758eee6ae0beb16891eb1183fc87051 Author: Jason Wang Date: Wed Jun 9 17:47:26 2021 +0800 usb: ehci: do not initialise static variables Global static variables dont need to be initialised manully. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210609094726.62459-1-wangborong@cdjrlc.com Signed-off-by: Greg Kroah-Hartman commit 8f0901cda14d3be38cd2196d8cf61cdf3b368e34 Author: Steven Rostedt (VMware) Date: Wed Jun 9 18:04:59 2021 -0400 tracing: Add better comments for the filtering temp buffer use case When filtering is enabled, the event is copied into a temp buffer instead of being written into the ring buffer directly, because the discarding of events from the ring buffer is very expensive, and doing the extra copy is much faster than having to discard most of the time. As that logic is subtle, add comments to explain in more detail to what is going on and how it works. Signed-off-by: Steven Rostedt (VMware) commit faa76a6c289f43c88affcb292bc02870921d93bf Author: Steven Rostedt (VMware) Date: Wed Jun 9 18:04:58 2021 -0400 tracing: Simplify the max length test when using the filtering temp buffer When filtering trace events, a temp buffer is used because the extra copy from the temp buffer into the ring buffer is still faster than the direct write into the ring buffer followed by a discard if the filter does not match. But the data that can be stored in the temp buffer is a PAGE_SIZE minus the ring buffer event header. The calculation of that header size is complex, but using the helper macro "struct_size()" can simplify it. Link: https://lore.kernel.org/stable/CAHk-=whKbJkuVmzb0hD3N6q7veprUrSpiBHRxVY=AffWZPtxmg@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (VMware) commit 99f4f5d62338cab9dcf45735344541574daedd20 Author: Masami Hiramatsu Date: Wed Jun 2 17:19:34 2021 +0900 bootconfig: Share the checksum function with tools Move the checksum calculation function into the header for sharing it with tools/bootconfig. Link: https://lkml.kernel.org/r/162262197470.264090.16325743685807878807.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 0ff2bb7d42c36ee60bbf3e60993666a8e0c06a24 Author: Masami Hiramatsu Date: Wed Jun 2 17:19:25 2021 +0900 docs: bootconfig: Update for mixing value and subkeys Update document for the mixing value and subkeys on a key. Link: https://lkml.kernel.org/r/162262196510.264090.15044943496205914148.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 29e1c1ad3ff7f345d80c7b81b08175f5a8c84122 Author: Masami Hiramatsu Date: Wed Jun 2 17:19:15 2021 +0900 tools/bootconfig: Support mixed value and subkey test cases Update test case to support mixed value and subkey on a key. Link: https://lkml.kernel.org/r/162262195568.264090.12431204030021242896.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e5efaeb8a8f527d6e91289ff1f67fbcae452b2ca Author: Masami Hiramatsu Date: Wed Jun 2 17:19:07 2021 +0900 bootconfig: Support mixing a value and subkeys under a key Support mixing a value and subkeys under a key. Since kernel cmdline options will support "aaa.bbb=value1 aaa.bbb.ccc=value2", it is better that the bootconfig supports such configuration too. Note that this does not change syntax itself but just accepts mixed value and subkeys e.g. key = value1 key.subkey = value2 But this is not accepted; key { value1 subkey = value2 } That will make value1 as a subkey. Also, the order of the value node under a key is fixed. If there are a value and subkeys, the value is always the first child node of the key. Thus if user specifies subkeys first, e.g. key.subkey = value1 key = value2 In the program (and /proc/bootconfig), it will be shown as below key = value2 key.subkey = value1 Link: https://lkml.kernel.org/r/162262194685.264090.7738574774030567419.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit ca24306d83a125df187ad53eddb038fe0cffb8ca Author: Masami Hiramatsu Date: Wed Jun 2 17:18:58 2021 +0900 bootconfig: Change array value to use child node It is not possible to put an array value with subkeys under a key node, because both of subkeys and the array elements are using "next" field of the xbc_node. Thus this changes the array values to use "child" field in the array case. The reason why split this change is to test it easily. Link: https://lkml.kernel.org/r/162262193838.264090.16044473274501498656.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 1b8b719229197b7afa1b1191e083fb41ace095c5 Author: Austin Kim Date: Wed Jun 9 00:09:29 2021 +0100 LSM: SafeSetID: Mark safesetid_initialized as __initdata Mark safesetid_initialized as __initdata since it is only used in initialization routine. Signed-off-by: Austin Kim Signed-off-by: Micah Morton commit 1fcc57b7e51e4366f074c7d186ccc6c99a627a51 Author: Jin Yao Date: Wed Jun 9 12:45:55 2021 +0800 perf evsel: Adjust hybrid event and global event mixed group A group mixed with hybrid event and global event is allowed. For example, group leader is 'intel_pt//' and the group member is 'cpu_atom/cycles/'. e.g.: # perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u' The challenge is that their available cpus are not fully matched. For example, 'intel_pt//' is available on CPU0-CPU23, but 'cpu_atom/cycles/' is available on CPU16-CPU23. When getting the group id for group member, we must be very careful. Because the cpu for 'intel_pt//' is not equal to the cpu for 'cpu_atom/cycles/'. Actually the cpu here is the index of evsel->core.cpus, not the real CPU ID. e.g. cpu0 for 'intel_pt//' is CPU0, but cpu0 for 'cpu_atom/cycles/' is CPU16. Before: # perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u' -vv uname ... ------------------------------------------------------------ perf_event_attr: type 10 size 128 config 0xe601 { sample_period, sample_freq } 1 sample_type IP|TID|TIME|CPU|IDENTIFIER read_format ID disabled 1 inherit 1 exclude_kernel 1 exclude_hv 1 enable_on_exec 1 sample_id_all 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid 4084 cpu 0 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 4084 cpu 1 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid 4084 cpu 2 group_fd -1 flags 0x8 = 7 sys_perf_event_open: pid 4084 cpu 3 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid 4084 cpu 4 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid 4084 cpu 5 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid 4084 cpu 6 group_fd -1 flags 0x8 = 12 sys_perf_event_open: pid 4084 cpu 7 group_fd -1 flags 0x8 = 13 sys_perf_event_open: pid 4084 cpu 8 group_fd -1 flags 0x8 = 14 sys_perf_event_open: pid 4084 cpu 9 group_fd -1 flags 0x8 = 15 sys_perf_event_open: pid 4084 cpu 10 group_fd -1 flags 0x8 = 16 sys_perf_event_open: pid 4084 cpu 11 group_fd -1 flags 0x8 = 17 sys_perf_event_open: pid 4084 cpu 12 group_fd -1 flags 0x8 = 18 sys_perf_event_open: pid 4084 cpu 13 group_fd -1 flags 0x8 = 19 sys_perf_event_open: pid 4084 cpu 14 group_fd -1 flags 0x8 = 20 sys_perf_event_open: pid 4084 cpu 15 group_fd -1 flags 0x8 = 21 sys_perf_event_open: pid 4084 cpu 16 group_fd -1 flags 0x8 = 22 sys_perf_event_open: pid 4084 cpu 17 group_fd -1 flags 0x8 = 23 sys_perf_event_open: pid 4084 cpu 18 group_fd -1 flags 0x8 = 24 sys_perf_event_open: pid 4084 cpu 19 group_fd -1 flags 0x8 = 25 sys_perf_event_open: pid 4084 cpu 20 group_fd -1 flags 0x8 = 26 sys_perf_event_open: pid 4084 cpu 21 group_fd -1 flags 0x8 = 27 sys_perf_event_open: pid 4084 cpu 22 group_fd -1 flags 0x8 = 28 sys_perf_event_open: pid 4084 cpu 23 group_fd -1 flags 0x8 = 29 ------------------------------------------------------------ perf_event_attr: size 128 config 0x800000000 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|PERIOD|IDENTIFIER|AUX read_format ID inherit 1 exclude_kernel 1 exclude_hv 1 freq 1 sample_id_all 1 exclude_guest 1 aux_sample_size 4096 ------------------------------------------------------------ sys_perf_event_open: pid 4084 cpu 16 group_fd 5 flags 0x8 sys_perf_event_open failed, error -22 The group_fd 5 is not correct. It should be 22 (the fd of 'intel_pt' on CPU16). After: # perf record --aux-sample -e '{intel_pt//,cpu_atom/cycles/}:u' -vv uname ... ------------------------------------------------------------ perf_event_attr: type 10 size 128 config 0xe601 { sample_period, sample_freq } 1 sample_type IP|TID|TIME|CPU|IDENTIFIER read_format ID disabled 1 inherit 1 exclude_kernel 1 exclude_hv 1 enable_on_exec 1 sample_id_all 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid 5162 cpu 0 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid 5162 cpu 1 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid 5162 cpu 2 group_fd -1 flags 0x8 = 7 sys_perf_event_open: pid 5162 cpu 3 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid 5162 cpu 4 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid 5162 cpu 5 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid 5162 cpu 6 group_fd -1 flags 0x8 = 12 sys_perf_event_open: pid 5162 cpu 7 group_fd -1 flags 0x8 = 13 sys_perf_event_open: pid 5162 cpu 8 group_fd -1 flags 0x8 = 14 sys_perf_event_open: pid 5162 cpu 9 group_fd -1 flags 0x8 = 15 sys_perf_event_open: pid 5162 cpu 10 group_fd -1 flags 0x8 = 16 sys_perf_event_open: pid 5162 cpu 11 group_fd -1 flags 0x8 = 17 sys_perf_event_open: pid 5162 cpu 12 group_fd -1 flags 0x8 = 18 sys_perf_event_open: pid 5162 cpu 13 group_fd -1 flags 0x8 = 19 sys_perf_event_open: pid 5162 cpu 14 group_fd -1 flags 0x8 = 20 sys_perf_event_open: pid 5162 cpu 15 group_fd -1 flags 0x8 = 21 sys_perf_event_open: pid 5162 cpu 16 group_fd -1 flags 0x8 = 22 sys_perf_event_open: pid 5162 cpu 17 group_fd -1 flags 0x8 = 23 sys_perf_event_open: pid 5162 cpu 18 group_fd -1 flags 0x8 = 24 sys_perf_event_open: pid 5162 cpu 19 group_fd -1 flags 0x8 = 25 sys_perf_event_open: pid 5162 cpu 20 group_fd -1 flags 0x8 = 26 sys_perf_event_open: pid 5162 cpu 21 group_fd -1 flags 0x8 = 27 sys_perf_event_open: pid 5162 cpu 22 group_fd -1 flags 0x8 = 28 sys_perf_event_open: pid 5162 cpu 23 group_fd -1 flags 0x8 = 29 ------------------------------------------------------------ perf_event_attr: size 128 config 0x800000000 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|PERIOD|IDENTIFIER|AUX read_format ID inherit 1 exclude_kernel 1 exclude_hv 1 freq 1 sample_id_all 1 exclude_guest 1 aux_sample_size 4096 ------------------------------------------------------------ sys_perf_event_open: pid 5162 cpu 16 group_fd 22 flags 0x8 = 30 sys_perf_event_open: pid 5162 cpu 17 group_fd 23 flags 0x8 = 31 sys_perf_event_open: pid 5162 cpu 18 group_fd 24 flags 0x8 = 32 sys_perf_event_open: pid 5162 cpu 19 group_fd 25 flags 0x8 = 33 sys_perf_event_open: pid 5162 cpu 20 group_fd 26 flags 0x8 = 34 sys_perf_event_open: pid 5162 cpu 21 group_fd 27 flags 0x8 = 35 sys_perf_event_open: pid 5162 cpu 22 group_fd 28 flags 0x8 = 36 sys_perf_event_open: pid 5162 cpu 23 group_fd 29 flags 0x8 = 37 ------------------------------------------------------------ ... Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210609044555.27180-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1cd6239426a47efb8eab6cdcb1e45ffd5601b12e Author: Peng Fan Date: Thu Jun 10 11:15:30 2021 +0800 remoteproc: imx-rproc: Fix IMX_REMOTEPROC configuration When CONFIG_IMX_REMOTEPROC is y and CONFIG_HAVE_ARM_SMCCC is not set, compiling errors are encountered as follows: drivers/remoteproc/imx_rproc.o: in function `imx_rproc_stop': imx_rproc.c:(.text+0x140): undefined reference to `__arm_smccc_smc' drivers/remoteproc/imx_rproc.o: in function `imx_rproc_detect_mode': imx_rproc.c:(.text+0x272): undefined reference to `__arm_smccc_smc' drivers/remoteproc/imx_rproc.o: in function `imx_rproc_start': imx_rproc.c:(.text+0x5e0): undefined reference to `__arm_smccc_smc' __arm_smccc_smc is defined when HAVE_ARM_SMCCC is y, so add dependency on HAVE_ARM_SMCCC in IMX_REMOTEPROC configuration. Fixes: 79806d32d5aa ("remoteproc: imx_rproc: support i.MX8MN/P") Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20210610031530.26326-1-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 82a6cbf007648e2c07c29a133cce060fc30aa48f Author: Konrad Dybcio Date: Sun Jan 31 02:30:57 2021 +0100 firmware: qcom_scm: Add MDM9607 compatible Add a compatible for MDM9607. It uses the "legacy" calling convention. Acked-by: Rob Herring Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210131013058.54299-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit af32011f76b759d68a6e3005d450ef7b82e1479a Author: Konrad Dybcio Date: Sun Jan 31 02:32:32 2021 +0100 soc: qcom: rpmpd: Add MDM9607 RPM Power Domains This SoC while being from 8916 era, makes use of the newer-style, floor-level management, instead of the older floor-corner. Acked-by: Rob Herring Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210131013233.54666-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 0e5a89dbb49920cea22193044bbbfd76a9b0f458 Author: Hubert Jasudowicz Date: Wed Jun 9 23:51:12 2021 +0200 doc: Remove references to IBM Calgary The Calgary IOMMU driver has been removed in 90dc392fc445 ("x86: Remove the calgary IOMMU driver") Clean up stale docs that refer to it. Signed-off-by: Hubert Jasudowicz Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1bd2b57dd1db53df09e520b8170ff61418805de4.1623274832.git.hubert.jasudowicz@gmail.com commit c4e61e0af4d9f72f77462b9d6759496c6e9f4c29 Author: Stephan Gerhold Date: Fri May 14 12:43:28 2021 +0200 arm64: dts: qcom: msm8916-huawei-g7: Add NFC The Huawei Ascend G7 supports NFC using the NXP PN547, which is supported by the nxp-nci-i2c driver in mainline. It seems to detect NFC tags using "nfctool" just fine, although it seems like there are not really any useful applications making use of the Linux NFC subsystem. :( Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210514104328.18756-5-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 81c3e08f726921f244e11795a415d2acb5bdf071 Author: Stephan Gerhold Date: Fri May 14 12:43:27 2021 +0200 arm64: dts: qcom: msm8916-huawei-g7: Add display regulator The display on the Huawei Ascend G7 is supplied by a TI TPS65132 regulator. The panel needs a driver in mainline first, but the TPS65132 is already supported in mainline by the tps65132 driver. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210514104328.18756-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 3305642dc44bcb85f13129c4214f283f7c3d71a4 Author: Stephan Gerhold Date: Fri May 14 12:43:26 2021 +0200 arm64: dts: qcom: msm8916-huawei-g7: Add sensors The Huawei Ascend G7 has 3 sensors, all supported by existing kernel drivers: 1. Kionix KX023-1025 accelerometer (kxcjk-1023) 2. Asahi Kasei AK09911 magnetometer (ak8975) 3. Avago APDS9930 proximity/light sensor (tsl2772) Add them to the huawei-g7 device tree. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210514104328.18756-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 918f24ae4597d5a5e3cdfca0fe7aa3ebd345a25b Author: Stephan Gerhold Date: Fri May 14 12:43:25 2021 +0200 arm64: dts: qcom: msm8916-huawei-g7: Add touchscreen The Huawei Ascend G7 has a Synaptics "C199HW-006" touchscreen, supplied by pm8916_l17 and pm8916_l16. Add it to the device tree and reduce the maximum allowed voltage for pm8916_l16 to 1.8V since we really should not use more for an I/O supply. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210514104328.18756-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 55056b229189be2b4b8e636f0566a0b5bfd3c8f8 Author: Stephan Gerhold Date: Fri May 14 12:43:24 2021 +0200 arm64: dts: qcom: msm8916: Add device tree for Huawei Ascend G7 The Huawei Ascend G7 is a smartphone from Huawei based on MSM8916. It's fairly similar to the other MSM8916 devices, the only notable exception are the "cd-gpios" for detecting if a SD card was inserted: It looks like Huawei forgot to re-route this to gpio38, so the correct GPIO seems to be gpio56 on this device. Note: The original firmware from Huawei can only boot 32-bit kernels. To boot arm64 kernels it is necessary to flash 64-bit TZ/HYP firmware with EDL, e.g. taken from the DragonBoard 410c. This works because Huawei forgot to set up (firmware) secure boot for some reason. Also note that Huawei no longer provides bootloader unlock codes. This can be bypassed by patching the bootloader from a custom HYP firmware, making it think the bootloader is unlocked. I use a modified version of qhypstub [1], that patches a single instruction in the Huawei bootloader. The device tree contains initial support for the Huawei Ascend G7 with: - UART (untested, probably available via some test points) - eMMC/SD card - Buttons - Notification LED (combination of 3 GPIO LEDs) - Vibrator - WiFi/Bluetooth (WCNSS) - USB [1]: https://github.com/msm8916-mainline/qhypstub Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210514104328.18756-1-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 6852df1266995c35b8621a95dcb7f91ca11ea409 Author: Al Viro Date: Sun May 2 17:24:40 2021 -0400 csum_and_copy_to_pipe_iter(): leave handling of csum_state to caller ... since all the logics is already there for use by iovec/kvec/etc. cases. Signed-off-by: Al Viro commit 2a510a744bebc7f5d9e71ee094b62e28b5b43218 Author: Al Viro Date: Sun May 2 17:16:34 2021 -0400 clean up copy_mc_pipe_to_iter() ... and we don't need kmap_atomic() there - kmap_local_page() is fine. Signed-off-by: Al Viro commit 893839fd57330ce226d4ee1b16fd5221a27fb6ec Author: Al Viro Date: Fri Apr 30 18:39:25 2021 -0400 pipe_zero(): we don't need no stinkin' kmap_atomic()... FWIW, memcpy_to_page() itself almost certainly ought to use kmap_local_page()... Signed-off-by: Al Viro commit 2495bdcc86dc5e6b71b6785e1faa76452496c687 Author: Al Viro Date: Fri Apr 30 13:40:48 2021 -0400 iov_iter: clean csum_and_copy_...() primitives up a bit 1) kmap_atomic() is not needed here, kmap_local_page() is enough. 2) No need to make sum = csum_block_add(sum, next, off); conditional upon next != 0 - adding 0 is a no-op as far as csum_block_add() is concerned. Signed-off-by: Al Viro commit 55ca375c5dcc7aebd89de42f00ff18f5c40d25f3 Author: Al Viro Date: Tue Apr 27 12:33:24 2021 -0400 copy_page_from_iter(): don't need kmap_atomic() for kvec/bvec cases kmap_local_page() is enough. Signed-off-by: Al Viro commit c1d4d6a9ae88b87262fb5426823930bc471f6034 Author: Al Viro Date: Tue Apr 27 12:29:53 2021 -0400 copy_page_to_iter(): don't bother with kmap_atomic() for bvec/kvec cases kmap_local_page() is enough there. Moreover, we can use _copy_to_iter() for actual copying in those cases - no useful extra checks on the address we are copying from in that call. Signed-off-by: Al Viro commit 4b179e9a9c7c98550747b76405626dd59968f078 Author: Al Viro Date: Tue May 4 17:50:07 2021 -0400 iterate_xarray(): only of the first iteration we might get offset != 0 recalculating offset on each iteration is pointless - on all subsequent passes through the loop it will be zero anyway. Signed-off-by: Al Viro commit a6e4ec7bfd32f42ff37577c6b708153d19880b6e Author: Al Viro Date: Sun May 2 13:03:41 2021 -0400 pull handling of ->iov_offset into iterate_{iovec,bvec,xarray} fewer arguments (by one, but still...) for iterate_...() macros Signed-off-by: Al Viro commit 7baa5099002f2f2ea6c026890598ed1708e7cfd4 Author: Al Viro Date: Sun May 2 11:35:03 2021 -0400 iov_iter: make iterator callbacks use base and len instead of iovec Iterator macros used to provide the arguments for step callbacks in a structure matching the flavour - iovec for ITER_IOVEC, kvec for ITER_KVEC and bio_vec for ITER_BVEC. That already broke down for ITER_XARRAY (bio_vec there); now that we are using kvec callback for bvec and xarray cases, we are always passing a pointer + length (void __user * + size_t for ITER_IOVEC callback, void * + size_t for everything else). Note that the original reason for bio_vec (page + offset + len) in case of ITER_BVEC used to be that we did *not* want to kmap a page when all we wanted was e.g. to find the alignment of its subrange. Now all such users are gone and the ones that are left want the page mapped anyway for actually copying the data. So in all cases we have pointer + length, and there's no good reason for keeping those in struct iovec or struct kvec - we can just pass them to callback separately. Again, less boilerplate in callbacks... Signed-off-by: Al Viro commit 622838f3fde2c3671a718dc6196c19087ebe9b11 Author: Al Viro Date: Sun May 2 11:13:09 2021 -0400 iov_iter: make the amount already copied available to iterator callbacks Making iterator macros keep track of the amount of data copied is pretty easy and it has several benefits: 1) we no longer need the mess like (from += v.iov_len) - v.iov_len in the callbacks - initial value + total amount copied so far would do just fine. 2) less obviously, we no longer need to remember the initial amount of data we wanted to copy; the loops in iterator macros are along the lines of wanted = bytes; while (bytes) { copy some bytes -= copied if short copy break } bytes = wanted - bytes; Replacement is offs = 0; while (bytes) { copy some offs += copied bytes -= copied if short copy break } bytes = offs; That wouldn't be a win per se, but unlike the initial value of bytes, the amount copied so far *is* useful in callbacks. 3) in some cases (csum_and_copy_..._iter()) we already had offs manually maintained by the callbacks. With that change we can drop that. Less boilerplate and more readable code... Signed-off-by: Al Viro commit 21b56c84775351ac66354c9b09fb429e5cdeceac Author: Al Viro Date: Mon Apr 26 20:50:05 2021 -0400 iov_iter: get rid of separate bvec and xarray callbacks After the previous commit we have * xarray and bvec callbacks idential in all cases * both equivalent to kvec callback wrapped into kmap_local_page()/kunmap_local() pair. So we can pass only two (iovec and kvec) callbacks to iterate_and_advance() and let iterate_{bvec,xarray} wrap it into kmap_local_page()/kunmap_local_page(). Signed-off-by: Al Viro commit 1b4fb5ffd79bac27a7b9beda63c827c7d7457c45 Author: Al Viro Date: Mon Apr 26 20:33:42 2021 -0400 iov_iter: teach iterate_{bvec,xarray}() about possible short copies ... and now we finally can sort out the mess in _copy_mc_to_iter(). Provide a variant of iterate_and_advance() that does *NOT* ignore the return values of bvec, xarray and kvec callbacks, use that in _copy_mc_to_iter(). That gets rid of magic in those callbacks - we used to need it so we'd get at least the right return value in case of failure halfway through. As a bonus, now iterator is advanced by the amount actually copied for all flavours. That's what the callers expect and it used to do that correctly in iovec and xarray cases. However, in kvec and bvec cases the iterator had not been advanced on such failures, breaking the users. Fixed now... Signed-off-by: Al Viro commit 7491a2bf64e3a4f1699deba97728cd9f8856bdf3 Author: Al Viro Date: Mon Apr 26 20:19:14 2021 -0400 iterate_bvec(): expand bvec.h macro forest, massage a bit ... incidentally, using pointer instead of index in an array (the only change here) trims half-kilobyte of .text... Signed-off-by: Al Viro commit 5c67aa90cd5c59912ee71cff879e8f1ab237ad88 Author: Al Viro Date: Sun Apr 25 23:57:42 2021 -0400 iov_iter: unify iterate_iovec and iterate_kvec The differences between iterate_iovec and iterate_kvec are minor: * kvec callback is treated as if it returned 0 * initialization of __p is with i->iov and i->kvec resp. which is trivially dealt with. No code generation changes - compiler is quite capable of turning left = ((void)(STEP), 0); __v.iov_len -= left; (with no accesses to left downstream) and (void)(STEP); into the same code. Signed-off-by: Al Viro commit 7a1bcb5d255d4fd8b9725c3cf7ee0880a6369d2f Author: Al Viro Date: Sun Apr 25 23:46:09 2021 -0400 iov_iter: massage iterate_iovec and iterate_kvec to logics similar to iterate_bvec Premature optimization is the root of all evil... Trying to unroll the first pass through the loop makes it harder to follow and not just for readers - compiler ends up generating worse code than it would on a "non-optimized" loop. Signed-off-by: Al Viro commit f5da83545f4ed2c1a1648b7d760a6fc358798e52 Author: Al Viro Date: Wed Apr 28 20:59:08 2021 -0400 iterate_and_advance(): get rid of magic in case when n is 0 iov_iter_advance() needs to do some non-trivial work when it's given 0 as argument (skip all empty iovecs, mostly). We used to implement it via iterate_and_advance(); we no longer do so and for all other users of iterate_and_advance() zero length is a no-op. Signed-off-by: Al Viro commit 594e450b3f4435a9d663df3d48d7fa34e685cbd1 Author: Al Viro Date: Sat Jun 5 10:19:30 2021 -0400 csum_and_copy_to_iter(): massage into form closer to csum_and_copy_from_iter() Namely, have off counted starting from 0 rather than from csstate->off. To compensate we need to shift the initial value (csstate->sum) (rotate by 8 bits, as usual for csum) and do the same after we are finished adding the pieces up. What we get out of that is a bit more redundancy in our variables - from is always equal to addr + off, which will be useful several commits down the road. Signed-off-by: Al Viro commit f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454 Author: Al Viro Date: Fri Apr 30 10:26:41 2021 -0400 iov_iter: replace iov_iter_copy_from_user_atomic() with iterator-advancing variant Replacement is called copy_page_from_iter_atomic(); unlike the old primitive the callers do *not* need to do iov_iter_advance() after it. In case when they end up consuming less than they'd been given they need to do iov_iter_revert() on everything they had not consumed. That, however, needs to be done only on slow paths. All in-tree callers converted. And that kills the last user of iterate_all_kinds() Signed-off-by: Al Viro commit e4f8df86798aea60aff6cfff40252b709431f850 Author: Al Viro Date: Mon May 3 11:05:29 2021 -0400 [xarray] iov_iter_npages(): just use DIV_ROUND_UP() Compiler is capable of recognizing division by power of 2 and turning it into shifts. Signed-off-by: Al Viro commit 66531c65aa254e77c935785036beb50985d0fe89 Author: Al Viro Date: Sun Apr 25 16:00:48 2021 -0400 iov_iter_npages(): don't bother with iterate_all_kinds() note that in bvec case pages can be compound ones - we can't just assume that each segment is covered by one (sub)page Signed-off-by: Al Viro commit 3d671ca62a08114810321a2a5e9d3523de5fb1b4 Author: Al Viro Date: Sun Apr 25 09:14:44 2021 -0400 get rid of iterate_all_kinds() in iov_iter_get_pages()/iov_iter_get_pages_alloc() Here iterate_all_kinds() is used just to find the first (non-empty, in case of iovec) segment. Which can be easily done explicitly. Note that in bvec case we now can get more than PAGE_SIZE worth of them, in case when we have a compound page in bvec and a range that crosses a subpage boundary. Older behaviour had been to stop on that boundary; we used to get the right first page (for_each_bvec() took care of that), but that was all we'd got. Signed-off-by: Al Viro commit 610c7a71543df32fcecf64004f974905f5881fb3 Author: Al Viro Date: Sun Apr 25 01:03:16 2021 -0400 iov_iter_gap_alignment(): get rid of iterate_all_kinds() For one thing, it's only used for iovec (and makes sense only for those). For another, here we don't care about iov_offset, since the beginning of the first segment and the end of the last one are ignored. So it makes a lot more sense to just walk through the iovec array... We need to deal with the case of truncated iov_iter, but unlike the situation with iov_iter_alignment() we don't care where the last segment ends - just which segment is the last one. [fixed a braino spotted by Qian Cai ] Signed-off-by: Al Viro commit 9221d2e37b729077797e6d02012289892dbdb859 Author: Al Viro Date: Sun Apr 25 00:44:35 2021 -0400 iov_iter_alignment(): don't bother with iterate_all_kinds() It's easier to go over the array manually. We need to watch out for truncated iov_iter, though - iovec array might cover more than i->count. Signed-off-by: Al Viro commit 8409a0d261e20180361e7afe6d89847d1bad4ce8 Author: Al Viro Date: Sun May 2 11:57:37 2021 -0400 sanitize iov_iter_fault_in_readable() 1) constify iov_iter argument; we are not advancing it in this primitive. 2) cap the amount requested by the amount of data in iov_iter. All existing callers should've been safe, but the check is really cheap and doing it here makes for easier analysis, as well as more consistent semantics among the primitives. 3) don't bother with iterate_iovec(). Explicit loop is not any harder to follow, and we get rid of standalone iterate_iovec() users - it's only used by iterate_and_advance() and (soon to be gone) iterate_all_kinds(). Signed-off-by: Al Viro commit 185ac4d43669314f31c9c27d1ffc5ebcad791351 Author: Al Viro Date: Fri Apr 23 12:58:53 2021 -0400 iov_iter: optimize iov_iter_advance() for iovec and kvec We can do better than generic iterate_and_advance() for this one; inspired by bvec_iter_advance() (and massaged into that form by equivalent transformations). [fixed a braino caught by kernel test robot ] Signed-off-by: Al Viro commit 8cd54c1c848031a87820e58d772166ffdf8c08c0 Author: Al Viro Date: Thu Apr 22 14:50:39 2021 -0400 iov_iter: separate direction from flavour Instead of having them mixed in iter->type, use separate ->iter_type and ->data_source (u8 and bool resp.) And don't bother with (pseudo-) bitmap for the former - microoptimizations from being able to check if the flavour is one of two values are not worth the confusion for optimizer. It can't prove that we never get e.g. ITER_IOVEC | ITER_PIPE, so we end up with extra headache. Signed-off-by: Al Viro commit 556351c1c09ad6511bc2eaa2c214992192f50410 Author: Al Viro Date: Sun May 2 17:01:22 2021 -0400 iov_iter_advance(): don't modify ->iov_offset for ITER_DISCARD the field is not used for that flavour Signed-off-by: Al Viro commit 28f38db7edbfa6d7736cd7a3a7aec76660bfef57 Author: Al Viro Date: Wed Jun 2 17:25:59 2021 -0400 iov_iter: reorder handling of flavours in primitives iovec is the most common one; test it first and test explicitly, rather than "not anything else". Replace all flavour checks with use of iov_iter_is_...() helpers. Signed-off-by: Al Viro commit 28a0a14423b85523d6edd2a42a9fcd9c1d4a848e Author: Wan Jiabing Date: Wed Jun 9 11:01:46 2021 +0800 drm: display: Remove duplicated argument in dcn31 Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c: 3539:12-42: duplicated argument to && or || ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c: 5677:87-123: duplicated argument to && or || Reviewed-by: Rodrigo Siqueira Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit 4d45a22458f52a3daf222287d9e578d3ec418422 Author: Wan Jiabing Date: Tue Jun 8 11:01:24 2021 +0800 drm: display: Remove duplicate include in dce110 Fix the following checkincludes.pl warning: ./drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c 35 #include "dce110_hw_sequencer.h" 69 #include "dce110_hw_sequencer.h" Reviewed-by: Rodrigo Siqueira Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit d0b3bbd32f278fb7125133fda755f9d17cf597ad Author: Jiapeng Chong Date: Wed Jun 9 18:09:26 2021 +0800 drm/amd/display: use ARRAY_SIZE for base60_refresh_rates Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. Clean up the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/core/dc_resource.c:448:47-48: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 5d9f730193557be217680d54fa0be6c985f0f328 Author: Jiapeng Chong Date: Wed Jun 9 18:05:21 2021 +0800 drm/amd/display: Fix duplicate included clk_mgr.h Clean up the following includecheck warning: ./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c: clk_mgr.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 56d9bf62019ea752cbadd31426ef3139cc4b723a Author: Graham Sider Date: Mon Jun 7 09:36:58 2021 -0400 drm/amd/pm: Add aldebaran throttler translation Perform dependent to independent throttle status translation for aldebaran. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit d4c9b03ff6a9914b55e4e23fcac11339a2706cc6 Author: Graham Sider Date: Tue Jun 8 11:02:33 2021 -0400 drm/amd/pm: Add renoir throttler translation Perform dependent to independent throttle status translation for renoir. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 7cab3cff86d120c03141a72def3f76a61dbaa2c7 Author: Graham Sider Date: Tue Jun 8 11:01:16 2021 -0400 drm/amd/pm: Add vangogh throttler translation Perform dependent to independent throttle status translation for vangogh. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f06d9511af0cdc08a762060c2d0d078c458dbf11 Author: Graham Sider Date: Mon Jun 7 09:36:14 2021 -0400 drm/amd/pm: Add sienna cichlid throttler translation Perform dependent to independent throttle status translation for sienna cichlid. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 64cdee43a6a2452cf2b67948483216610670c36a Author: Graham Sider Date: Mon Jun 7 09:35:56 2021 -0400 drm/amd/pm: Add navi1x throttler translation Perform dependent to independent throttle status translation for navi1x. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f6b92e3313d614e62d2a553d07af31b0d55bda25 Author: Graham Sider Date: Mon Jun 7 09:35:37 2021 -0400 drm/amd/pm: Add arcturus throttler translation Perform dependent to independent throttle status translation for arcturus. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit c23083cd373830bf26c195eb55f5df63a389e381 Author: Graham Sider Date: Mon Jun 7 09:35:01 2021 -0400 drm/amd/pm: Add common throttler translation func Defines smu_cmn_get_indep_throttler_status which performs ASIC independent translation given a corresponding lookup table. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 1049de4305ecc281367fc4e614c013b6c21a4d7f Author: Graham Sider Date: Tue Jun 8 10:56:03 2021 -0400 drm/amd/pm: Add ASIC independent throttle bits Add new defines for thermal throttle status bits which are ASIC independent. This bit field will be visible to userspace via gpu_metrics alongside the previous ASIC dependent bit fields. Seperated into four types: power throttlers (16 bits), current throttlers (16 bits), temperature (24 bits), other (8 bits). Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 22a7dcf58059f6d89fb7e2393c0ddc48c7d06266 Author: Graham Sider Date: Thu Jun 3 10:49:35 2021 -0400 drm/amd/pm: Add u64 throttler status field to gpu_metrics This patch set adds support for a new ASIC independant u64 throttler status field (indep_throttle_status). Piggybacks off the gpu_metrics_v1_3 bump and similarly bumps gpu_metrics_v2 version (to v2_2) to add field. Signed-off-by: Graham Sider Reviewed-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 2a9a151fe852c1da39914221dd25238d60b09a93 Author: John Clements Date: Wed Jun 9 13:34:38 2021 +0800 drm/amdgpu: Added support for loading auxiliary PSP FW In the case with xgmi connected to cpu load alternate psp fw Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 79a0f4415c9c6b63c14e90d8810f9e0636df34f6 Author: John Clements Date: Wed Jun 9 13:33:56 2021 +0800 drm/amdgpu: Updated fw header structure source synchronized fw header with latest source Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit bc05716d4fdd065013633602c5960a2bf1511b9c Author: Nirmoy Das Date: Tue Jun 8 13:23:44 2021 +0200 drm/amdkfd: use allowed domain for vmbo validation Fixes handling when page tables are in system memory. v3: remove struct amdgpu_vm_parser. v2: remove unwanted variable. change amdgpu_amdkfd_validate instead of amdgpu_amdkfd_bo_validate. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4b6c132b7da6430cf5dcc96948b04849dea0a32a Author: Al Viro Date: Thu Apr 29 21:16:56 2021 -0400 iov_iter: switch ..._full() variants of primitives to use of iov_iter_revert() Use corresponding plain variants, revert on short copy. That's the way it should've been done from the very beginning, except that we didn't have iov_iter_revert() back then... [fixed another braino caught by Qian Cai ] Signed-off-by: Al Viro commit 813d52799ad28579da3ed5a88c1bacd8069dd172 Author: Miquel Raynal Date: Thu Jun 10 10:20:37 2021 +0200 MAINTAINERS: Add PL353 SMC entry Add Naga from Xilinx and myself responsible of this driver. Signed-off-by: Miquel Raynal Acked-by: Naga Sureshkumar Relli Link: https://lore.kernel.org/r/20210610082040.2075611-16-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit ee0a07017ae34f2dbf5775956d8fc3f6d36be985 Author: Masami Hiramatsu Date: Wed Jun 2 23:33:09 2021 +0900 Documentation: tracing: Add per-group/all events enablement desciption Add ftrace.event..enable and ftrace.event.enable bootconfig description in the boot-time tracing document. Link: https://lkml.kernel.org/r/162264438901.302580.10697703336929432947.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4f99f8489950c03c792f17ca2d55cbb591286174 Author: Masami Hiramatsu Date: Wed Jun 2 23:33:00 2021 +0900 tracing/boot: Add per-group/all events enablement Add ftrace.event..enable and ftrace.event.enable boot-time tracing, which enables all events under given GROUP and all events respectivly. Link: https://lkml.kernel.org/r/162264438005.302580.12019174481201855444.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 6c610dba6e2beb1a16ac309672181d0090fb8d30 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Sat May 29 15:14:23 2021 +0900 tracing: Add WARN_ON_ONCE when returned value is negative ret is assigned return value of event_hist_trigger_func, but the value is unused. It is better to warn when returned value is negative, rather than just ignoring it. Link: https://lkml.kernel.org/r/20210529061423.GA103954@hyeyoo Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Steven Rostedt (VMware) commit 099dcc1801d981260aee9496dbeb55270dca70c1 Author: Qiujun Huang Date: Sat May 15 10:57:35 2021 +0000 tracing: Fix set_named_trigger_data() kernel-doc comment Fix the description of the parameters. Link: https://lkml.kernel.org/r/20210515105735.52785-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 08b0c9b4b922ccd1b7b54589942492cfa686214e Author: Colin Ian King Date: Thu May 13 12:55:17 2021 +0100 tracing: Remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Link: https://lkml.kernel.org/r/20210513115517.58178-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit 3d3d9c072e377a0c5fa0a1f661a95134e787db3a Author: Chunguang Xu Date: Sun May 2 08:12:27 2021 +0800 trace: replace WB_REASON_FOREIGN_FLUSH with a string Now WB_REASON_FOREIGN_FLUSH is displayed as a number, maybe a string is better. v2: replace some space with tab. Link: https://lkml.kernel.org/r/1619914347-21904-1-git-send-email-brookxu.cn@gmail.com Signed-off-by: Chunguang Xu Signed-off-by: Steven Rostedt (VMware) commit 957cdcd9bd7e035dcf0f29e4124b8021ea2ed696 Author: Wei Ming Chen Date: Tue May 11 22:02:46 2021 +0800 ring-buffer: Use fallthrough pseudo-keyword Replace /* fall through */ comment with pseudo-keyword macro fallthrough[1] [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Link: https://lkml.kernel.org/r/20210511140246.18868-1-jj251510319013@gmail.com Signed-off-by: Wei Ming Chen Signed-off-by: Steven Rostedt (VMware) commit 614db49c72db5ecf85ef94fe8bad7ebc88744ba9 Author: Jiapeng Chong Date: Sat May 8 18:37:16 2021 +0800 tracing: Remove redundant assignment to event_var Variable event_var is set to 'ERR_PTR(-EINVAL)', but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: kernel/trace/trace_events_hist.c:2437:21: warning: Value stored to 'event_var' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lkml.kernel.org/r/1620470236-26562-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Steven Rostedt (VMware) commit 58b9987de86cc5f154b5e91923676f952fcf8a93 Author: Ed Tsai Date: Thu Apr 22 20:22:26 2021 +0800 sched/tracing: Remove the redundant 'success' in the sched tracepoint 'success' is left here for a long time and also it is meaningless for the upper user. Just remove it. [ There were some tools expecting this, and this may break them. But hopefully they've been fixed in the mean time. Otherwise this may be likely reverted - SDR ] Link: https://lkml.kernel.org/r/20210422122226.9415-1-ed.tsai@mediatek.com Cc: Peter Zijlstra Signed-off-by: Ed Tsai Signed-off-by: Steven Rostedt (VMware) commit 30d103f2d4602da07313cf43d7b746e89d7d9c1d Author: zuoqilin Date: Wed Apr 14 21:46:47 2021 +0800 tools/bootconfig: Simplify expression It is not necessary to define the variable ret to receive the return value of the xbc_node_compose_key() method. Link: https://lkml.kernel.org/r/20210414134647.1870-1-zuoqilin1@163.com Acked-by: Masami Hiramatsu Signed-off-by: zuoqilin Signed-off-by: Steven Rostedt (VMware) commit df6c2646d0e459ea6aa1d2caff683cc75df63b31 Author: Miquel Raynal Date: Thu Jun 10 10:20:36 2021 +0200 memory: pl353-smc: Declare variables following a reverse christmas tree order This is a purely cosmetic change. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20210610082040.2075611-15-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 9d7bb4493acfb7a131230e7785e7416de50b28b6 Author: Miquel Raynal Date: Thu Jun 10 10:20:35 2021 +0200 memory: pl353-smc: Avoid useless acronyms in descriptions APER does not mean anything, while it seems legitimate to call this clock the AXI peripheral clock. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20210610082040.2075611-14-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 493db2b05d9217da5889840ee31121856627e3c6 Author: Miquel Raynal Date: Thu Jun 10 10:20:34 2021 +0200 memory: pl353-smc: Let lower level controller drivers handle inits There is no point in having all these definitions at the SMC bus level, these are extremely tight to the NAND controller driver implementation, are not particularly generic, imply more boilerplate than needed, do not really follow the device model by receiving no argument and some of them are actually buggy. Let's get rid of these right now as there is no current user and keep this driver at a simple level: only the SMC bare initializations. The NAND controller driver which I am going to introduce will take care of redefining properly all these helpers and using them directly. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20210610082040.2075611-13-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit edd84c4256e2a2c756a241728b8c31e14bbed2f7 Author: Miquel Raynal Date: Thu Jun 10 10:20:33 2021 +0200 memory: pl353-smc: Rename goto labels A goto label is better named do_something: than out_something_to_do: Use the former wording and really describe what the jump involves. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20210610082040.2075611-12-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 62584c870cba9c84f08dadc083c6359dc41df678 Author: Miquel Raynal Date: Thu Jun 10 10:20:32 2021 +0200 memory: pl353-smc: Fix style Use proper spacing. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20210610082040.2075611-11-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 9af22e1169dd6b0f498fa8f9bff7c44f721b1b20 Author: Miquel Raynal Date: Thu Jun 10 10:20:29 2021 +0200 dt-binding: memory: pl353-smc: Fix the NAND controller node in the example To be fully valid, the NAND controller node in the example should be named nand-controller instead of flash, should be at the address @0,0 instead of @e1000000 and should have a couple of: - #address-cells - #size-cells properties. The label is being renamed nfc0 as well which is more usual than nand_0. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-8-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 29c6d09f39591eb3ea5e8e64ed42b28b9ae31f99 Author: Miquel Raynal Date: Thu Jun 10 10:20:28 2021 +0200 dt-binding: memory: pl353-smc: Drop unsupported nodes from the example These nodes are given as examples and are not described nor used anywhere else. There is also no hardware of my knowledge compatible with these yet. If we want to be backward compatible, then we should avoid partially describing nodes and their content while there are no users. Plus, the examples are wrong (the addresses should be updated) so let's drop them before converting this file to yaml (only the NAND node, which will be fixed in the example and described somewhere else is kept). Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-7-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 540148ce3455f0dc4fac9414ac12337ae0ab7cf2 Author: Miquel Raynal Date: Thu Jun 10 10:20:27 2021 +0200 dt-binding: memory: pl353-smc: Fix the example syntax and style Enhance the spacing, the comment style, add { }, remove (...). Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-6-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 6c74a55e1d791be9758d9f23b1c5375854949188 Author: Miquel Raynal Date: Thu Jun 10 10:20:26 2021 +0200 dt-binding: memory: pl353-smc: Describe the child reg property Each chil node should have a reg property, no matter the type of controller (NAND, NOR, SRAM). This should be part of the bindings. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-5-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit f1d19f7400132b45cab4ee60e974150699fe28b5 Author: Miquel Raynal Date: Thu Jun 10 10:20:25 2021 +0200 dt-binding: memory: pl353-smc: Drop the partitioning section This sentence does not belong to this file as this file describes the bus on which various controllers are wired to. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-4-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 386783ea6d9f21374cb11e0e8b8b4bd9770ef485 Author: Miquel Raynal Date: Thu Jun 10 10:20:24 2021 +0200 dt-binding: memory: pl353-smc: Document the range property The ranges property is missing in the description while actually used in the example. This property is actually needed, so mention it. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-3-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit a70eb9165e2a0f2867f0eb78f12665893d135ee1 Author: Miquel Raynal Date: Thu Jun 10 10:20:23 2021 +0200 dt-binding: memory: pl353-smc: Rephrase the binding Reword this document before converting it to yaml. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210610082040.2075611-2-miquel.raynal@bootlin.com Signed-off-by: Krzysztof Kozlowski commit 729046d4f1abf341b94d39036ad33506ea9f2c7a Author: Stephen Boyd Date: Tue May 18 22:40:30 2021 -0700 arm64: dts: qcom: sc7180-trogdor: Update flash freq to match reality This spi flash part is actually being clocked at 37.5MHz, not 25MHz, because of the way the clk driver is rounding up the rate that is requested to the nearest supported frequency. Let's update the frequency here, and remove the TODO because this is the fastest frequency we're going to be able to use here. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210519054030.3217704-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit ba5f9b5d7ff3452e69275080c3d59265bc1db8ea Author: Srinivasa Rao Mandadapu Date: Thu May 13 17:54:29 2021 +0530 arm64: dts: qcom: sc7180: Add wakeup delay for adau codec Add wakeup delay for fixing PoP noise during capture begin. Reviewed-by: Douglas Anderson Signed-off-by: Judy Hsiao Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/20210513122429.25295-1-srivasam@codeaurora.org Signed-off-by: Bjorn Andersson commit 62b837469e995b5981d2842135551935cd32360c Author: Stephen Boyd Date: Tue Jun 1 11:59:59 2021 -0700 arm64: dts: qcom: sdm845: Remove cros-pd-update on Cheza This compatible string isn't present upstream. Let's drop the node as it isn't used. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210601185959.3101132-2-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit f298167092feb1befe68dab4e896abf9d3c64866 Author: Stephen Boyd Date: Tue Jun 1 11:59:58 2021 -0700 arm64: dts: qcom: sc7180: Remove cros-pd-update on Trogdor This compatible string isn't present upstream. Let's drop the node as it isn't used. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210601185959.3101132-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit d141e0524e8e4381a4e05527e012ce798511618c Author: Stephen Boyd Date: Tue Jun 1 11:44:17 2021 -0700 arm64: dts: qcom: sc7180: Disable PON on Trogdor We don't use the PON module on Trogdor devices. Instead the reboot reason is sort of stored in the 'eventlog' and the bootloader figures out if the boot is abnormal and records that there. Disable the PON node and then drop the power key disabling because that's a child node that will no longer be enabled if the PON node is disabled. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210601184417.3020834-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 33e99b65a13495247b4e35ec97ab82696c0fc6e0 Author: Baokun Li Date: Wed Jun 9 15:27:20 2021 +0800 usb: cdns3: cdns3-gadget: Use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20210609072720.1358527-1-libaokun1@huawei.com Signed-off-by: Peter Chen commit abbe13a2ffd99168592fc9d987b2427ac7484d51 Author: Wenchao Han Date: Mon May 10 07:53:12 2021 -0700 arm64: dts: qcom: sc7180: Modify SPI_CLK voltage level for trogdor On coachz it could be observed that SPI_CLK voltage level was only 1.4V during active transfers because the drive strength was too weak. The line hadn't finished slewing up by the time we started driving it down again. Using a drive strength of 8 lets us achieve the correct voltage level of 1.8V. Though the worst problems were observed on coachz hardware, let's do this across the board for trogdor devices. Scoping other boards shows that this makes the clk line look nicer on them too and doesn't introduce any problems. Only the clk line is adjusted, not any data lines. Because SPI isn't a DDR protocol we only sample the data lines on either rising or falling edges, not both. That means the clk line needs to toggle twice as fast as data lines so having the higher drive strength is more important there. Signed-off-by: Wenchao Han [dianders: Adjust author real name; adjust commit message] Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210510075253.1.Ib4c296d6ff9819f26bcaf91e8a08729cc203fed0@changeid Signed-off-by: Bjorn Andersson commit 4bf4abe19089245b7b12f35e5cafb5477b3e2c48 Author: Alexandre Torgue Date: Thu Apr 15 12:10:33 2021 +0200 ARM: dts: stm32: fix stpmic node for stm32mp1 boards On some STM32 MP15 boards, stpmic node is not correct which generates warnings running "make dtbs_check W=1" command. Issues are: -"regulator-active-discharge" is not a boolean but an uint32. -"regulator-over-current-protection" is not a valid entry for vref_ddr. -LDO4 has a fixed voltage (3v3) so min/max entries are not allowed. Signed-off-by: Alexandre Torgue commit 9b8a9b389d8464e1ca5a4e92c6a4422844ad4ef3 Author: Marek Vasut Date: Thu Jun 10 02:25:52 2021 +0200 ARM: dts: stm32: Rename spi-flash/mx66l51235l@N to flash@N on DHCOM SoM Fix the following dtbs_check warning: spi-flash@0: $nodename:0: 'spi-flash@0' does not match '^flash(@.*)?$' Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: kernel@dh-electronics.com Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit b586250df24226f8a257e11e1f5953054c54fd35 Author: Marek Vasut Date: Thu Jun 10 02:25:51 2021 +0200 ARM: dts: stm32: Rename eth@N to ethernet@N on DHCOM SoM Fix the following dtbs_check warning: eth@1,0: $nodename:0: 'eth@1,0' does not match '^ethernet(@.*)?$' Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: kernel@dh-electronics.com Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 5247a50c8b53ca214a488da648e1bb35c35c2597 Author: Marek Vasut Date: Thu Jun 10 02:25:50 2021 +0200 ARM: dts: stm32: Drop unused linux,wakeup from touchscreen node on DHCOM SoM Fix the following dtbs_check warning: touchscreen@38: 'linux,wakeup' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: kernel@dh-electronics.com Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 33c79741deaf09b50d56db4b22879d9557e846df Author: Gaurav Srivastava Date: Tue Jun 8 10:05:56 2021 +0530 scsi: lpfc: vmid: Introduce VMID in I/O path Introduce the VMID in the I/O path. Check if the VMID is enabled and if the I/O belongs to a VM or not. Link: https://lore.kernel.org/r/20210608043556.274139-14-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 0c4792c64f60566e79af7e8bbec9dffb3bbaf14e Author: Gaurav Srivastava Date: Tue Jun 8 10:05:55 2021 +0530 scsi: lpfc: vmid: Add QFPA and VMID timeout check in worker thread Add a periodic check for issuing of QFPA command and VMID timeout in the worker thread. The inactivity timeout check is added via the timer function. Link: https://lore.kernel.org/r/20210608043556.274139-13-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 20397179aab29cc02ded6fb2cc3bd26203c0a7d6 Author: Gaurav Srivastava Date: Tue Jun 8 10:05:54 2021 +0530 scsi: lpfc: vmid: Timeout implementation for VMID Implement timeout functionality for the VMID. After the set time period of inactivity, the VMID is deregistered from the switch. Link: https://lore.kernel.org/r/20210608043556.274139-12-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit f56e86a082b745a645caa64044f16b854331cd9e Author: Gaurav Srivastava Date: Tue Jun 8 10:05:53 2021 +0530 scsi: lpfc: vmid: Append the VMID to the wqe before sending Add the VMID in wqe before sending out the request. The type of VMID depends on the configured type and is checked before being appended. Link: https://lore.kernel.org/r/20210608043556.274139-11-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 742b0cf87a8f9219101d68a7b4c6317db057ac58 Author: Gaurav Srivastava Date: Tue Jun 8 10:05:52 2021 +0530 scsi: lpfc: vmid: Implement CT commands for appid Implement CT commands for registering and deregistering the appid for the application. Also, a small change in decrementing the ndlp ref counter has been added. Link: https://lore.kernel.org/r/20210608043556.274139-10-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit dc50715e5cde66d67ee085d1ee309b1ae64a3044 Author: Gaurav Srivastava Date: Tue Jun 8 10:05:51 2021 +0530 scsi: lpfc: vmid: Functions to manage VMIDs Implement routines to save, retrieve, and remove the VMIDs from the data structure. A hash table is used to save the VMIDs and the corresponding UUIDs associated with the application/VMs. Link: https://lore.kernel.org/r/20210608043556.274139-9-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 7e473de75e1279435d0273acef8c7e1d10e5c54b Author: Gaurav Srivastava Date: Tue Jun 8 10:05:50 2021 +0530 scsi: lpfc: vmid: Implement ELS commands for appid Implement ELS commands QFPA and UVEM for the priority tagging appid support. Link: https://lore.kernel.org/r/20210608043556.274139-8-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 5e633302ace1f61f8ea5a3ce21e19a4d79126cca Author: Gaurav Srivastava Date: Tue Jun 8 10:05:49 2021 +0530 scsi: lpfc: vmid: Add support for VMID in mailbox command Add supporting datastructures for mailbox command which helps in determining if the firmware supports appid. Allocate resources for VMID at initialization time and clean them up on removal. Link: https://lore.kernel.org/r/20210608043556.274139-7-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 7ba2272caaf6065bda0d7707f46af43abddb7536 Author: Gaurav Srivastava Date: Tue Jun 8 10:05:48 2021 +0530 scsi: lpfc: vmid: VMID parameter initialization Initialize parameters such as type of VMID, max number of VMIDs supported and timeout value for the VMID registration based on the user input. Link: https://lore.kernel.org/r/20210608043556.274139-6-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 02169e845da7ca9ae91c7228244bf160ffee8c72 Author: Gaurav Srivastava Date: Tue Jun 8 10:05:47 2021 +0530 scsi: lpfc: vmid: Add datastructure for supporting VMID in lpfc Add the primary datastructures needed to implement VMID in the lpfc driver. Maintain the capability, current state, and hash table for the vmid/appid along with other information. This implementation supports the two versions of vmid implementation (app header and priority tagging). Link: https://lore.kernel.org/r/20210608043556.274139-5-muneendra.kumar@broadcom.com Reviewed-by: Hannes Reinecke Signed-off-by: Gaurav Srivastava Signed-off-by: James Smart Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 3dbbca75ed679d629d0c2895a42b55657873d04f Author: Muneendra Kumar Date: Tue Jun 8 10:05:46 2021 +0530 scsi: nvme: Added a new sysfs attribute appid_store Add a new sysfs attribute, appid_store, which can be used to set the application identifier in the blkcg associated with a cgroup id. Below is the interface provided to set the app_id: echo ":" >> /sys/class/fc/fc_udev_device/appid_store echo "457E:100000109b521d27" >> /sys/class/fc/fc_udev_device/appid_store Link: https://lore.kernel.org/r/20210608043556.274139-4-muneendra.kumar@broadcom.com Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit d2bcbeab4200665b694ec4f92a7a2fd58b70b1e8 Author: Muneendra Kumar Date: Tue Jun 8 10:05:45 2021 +0530 scsi: blkcg: Add app identifier support for blkcg Add a unique application identifier (i.e fc_app_id member) in blkcg. This allows identification of traffic belonging to an specific both on the host and in the fabric infrastructure. As an example, this allows the storage stack to uniquely identify traffic belong to particular virtual machine. Link: https://lore.kernel.org/r/20210608043556.274139-3-muneendra.kumar@broadcom.com Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 6b658c4863c15936872a93c9ee879043bf6393c9 Author: Muneendra Kumar Date: Tue Jun 8 10:05:44 2021 +0530 scsi: cgroup: Add cgroup_get_from_id() Add a new function, cgroup_get_from_id(), to retrieve the cgroup associated with a cgroup id. Also export the function cgroup_get_e_css() as this is needed in blk-cgroup.h. Link: https://lore.kernel.org/r/20210608043556.274139-2-muneendra.kumar@broadcom.com Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Acked-by: Tejun Heo Signed-off-by: Muneendra Kumar Signed-off-by: Martin K. Petersen commit 17f0ff3d49ff1a9d4027f9c2bef4725ab41aa9a5 Author: Lad Prabhakar Date: Wed Jun 9 16:32:28 2021 +0100 clk: renesas: Add support for R9A07G044 SoC Define the clock outputs supported by RZ/G2L (R9A07G044) SoC and bind it with RZ/G2L CPG core. Based on a patch in the BSP by Binh Nguyen . Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-10-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9c094430b9a6478b9a36b747d98331c03e08e623 Merge: ef3c613ccd68a 403921373799a Author: Geert Uytterhoeven Date: Thu Jun 10 15:46:29 2021 +0200 Merge tag 'renesas-r9a07g044-dt-binding-defs-tag' into renesas-clk-for-v5.14 Renesas RZ/G2L DT Binding Definitions Clock definitions for the Renesas RZ/G2L (R9A07G044) SoC, shared by driver and DT source files. commit ef3c613ccd68a78727b817c3dacf4a68d1ffc67f Author: Lad Prabhakar Date: Wed Jun 9 16:32:27 2021 +0100 clk: renesas: Add CPG core wrapper for RZ/G2L SoC Add CPG core wrapper for RZ/G2L family. Based on a patch in the BSP by Binh Nguyen . Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f8ec89126a72b399e63399d8d21fd413f4059f00 Author: Lad Prabhakar Date: Wed Jun 9 16:32:26 2021 +0100 dt-bindings: clock: renesas: Document RZ/G2L SoC CPG driver Document the device tree bindings of the Renesas RZ/G2L SoC clock driver in Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210609153230.6967-8-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f493162319788802b6a49634f7268e691b4c10ec Author: Grzegorz Szymaszek Date: Thu Jun 3 17:40:48 2021 +0200 ARM: dts: stm32: fix the Odyssey SoM eMMC VQMMC supply The Seeed SoM-STM32MP157C device tree had the eMMC’s (SDMMC2) VQMMC supply set to v3v3 (buck4), the same as the VMMC supply. That was incorrect, as on the SoM, the VQMMC supply is provided from vdd (buck3) instead. Signed-off-by: Grzegorz Szymaszek Signed-off-by: Alexandre Torgue commit 42bbd003910906229cb1dc0eaa812d9cc59e4c77 Author: Lad Prabhakar Date: Wed Jun 9 17:37:17 2021 +0100 arm64: dts: renesas: r9a07g044: Add SYSC node Add SYSC node to RZ/G2L (R9A07G044) SoC .dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609163717.3083-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 690ea5d394eb370973ffcb9ecda6a1855fe87d01 Author: Lad Prabhakar Date: Wed Jun 9 16:32:30 2021 +0100 arm64: dts: renesas: Add initial device tree for RZ/G2L SMARC EVK Add basic support for RZ/G2L SMARC EVK (based on R9A07G044L2): - memory - External input clock - SCIF Signed-off-by: Lad Prabhakar Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-12-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 68a45525297b2e9afbd9bba807ddd2c9f69beee6 Author: Lad Prabhakar Date: Wed Jun 9 16:32:29 2021 +0100 arm64: dts: renesas: Add initial DTSI for RZ/G2{L,LC} SoC's Add initial DTSI for RZ/G2{L,LC} SoC's. File structure: r9a07g044.dtsi => RZ/G2L family SoC common parts r9a07g044l1.dtsi => RZ/G2L R9A07G044L1 SoC specific parts r9a07g044l2.dtsi => RZ/G2L R9A07G044L2 SoC specific parts Signed-off-by: Lad Prabhakar Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-11-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c4bcdb3e30ea815e3ccf04a97b7b5373f8606bc8 Merge: 1771a33b34421 403921373799a Author: Geert Uytterhoeven Date: Thu Jun 10 15:34:50 2021 +0200 Merge tag 'renesas-r9a07g044-dt-binding-defs-tag' into renesas-arm-dt-for-v5.14 Renesas RZ/G2L DT Binding Definitions Clock definitions for the Renesas RZ/G2L (R9A07G044) SoC, shared by driver and DT source files. commit 02814a41529a55dbfb9fbb2a3728e78e70646ea6 Author: Grzegorz Szymaszek Date: Thu Jun 3 17:34:18 2021 +0200 ARM: dts: stm32: add a new DCMI pins group on stm32mp15 The Seeed Odyssey-STM32MP157C board has a 20-pin DVP camera output. stm32mp15-pinctrl.dtsi contained one pin state definition for the DCMI interface, dcmi-0, AKA phandle dcmi_pins_a. This definition was incompatible with the pins used on the Odyssey board, where: - there are 8 data pins instead of 12, - DCMI_HSYNC is available at PA4 instead of PH8, - DCMI_D0 is at PC6 instead of PH9, - DCMI_D3 is at PE1 instead of PH12, - DCMI_D4 is at PE11 instead of PH14, - DCMI_D5 is at PD3 instead of PI4, - DCMI_D6 is at PE13 instead of PB8, - DCMI_D7 is at PB9 instead of PE6. Add the DCMI pins used on the Odyssey board as a new DCMI pin state definition, dcmi-1, AKA phandle dcmi_pins_b. Signed-off-by: Grzegorz Szymaszek Signed-off-by: Alexandre Torgue commit 27a79a723d48dbeccb4fe6f7ede47e67642e6a4a Author: Lad Prabhakar Date: Wed Jun 9 16:32:24 2021 +0100 arm64: defconfig: Enable ARCH_R9A07G044 Enable the Renesas RZ/G2L SoC variants in the ARM64 defconfig. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 187cd57db09355fd169c661fa1c44bda06b013e8 Author: Lad Prabhakar Date: Wed Jun 9 17:37:16 2021 +0100 soc: renesas: Add support to read LSI DEVID register of RZ/G2{L,LC} SoC's Add support for reading the LSI DEVID register which is present in SYSC block of RZ/G2{L,LC} SoC's. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609163717.3083-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f3b154529fb89e9feae18d5e9da40559172d8d19 Author: Lad Prabhakar Date: Wed Jun 9 16:32:23 2021 +0100 soc: renesas: Add ARCH_R9A07G044 for the new RZ/G2L SoC's Add ARCH_R9A07G044 as a configuration symbol for the new Renesas RZ/G2L SoC variants. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 972f67be8929ac095df6a8bbce738b4f39e984cb Author: Lad Prabhakar Date: Wed Jun 9 17:37:15 2021 +0100 dt-bindings: power: renesas,rzg2l-sysc: Add DT binding documentation for SYSC controller Add DT binding documentation for SYSC controller found on RZ/G2{L,LC,UL} SoC's. SYSC block contains the LSI_DEVID register which is used to retrieve SoC product information. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609163717.3083-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4affc072e4fef6d1778f957037f255a6acdd44e2 Author: Lad Prabhakar Date: Wed Jun 9 16:32:22 2021 +0100 dt-bindings: arm: renesas: Document SMARC EVK Document Renesas SMARC EVK board which are based on RZ/G2L (R9A07G044) SoC. The SMARC EVK consists of RZ/G2L SoM module and SMARC carrier board, the SoM module sits on top of carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Chris Paterson Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210609153230.6967-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 2cd22416745fe1f0f6b6fa70c09438f85e20c693 Author: Lad Prabhakar Date: Wed Jun 9 16:32:21 2021 +0100 dt-bindings: arm: renesas: Document Renesas RZ/G2{L,LC} SoC variants Add device tree bindings documentation for Renesas RZ/G2{L,LC} SoC variants. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Chris Paterson Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210609153230.6967-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 305b80780879117b3448da42afe95af312393fbd Author: Lad Prabhakar Date: Wed Jun 9 16:32:20 2021 +0100 dt-bindings: arm: renesas: Document Renesas RZ/G2UL SoC Add device tree bindings documentation for Renesas RZ/G2UL SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Chris Paterson Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210609153230.6967-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 403921373799a133e41b59cb730e2c4239663f51 Author: Lad Prabhakar Date: Wed Jun 9 16:32:25 2021 +0100 dt-bindings: clock: Add r9a07g044 CPG Clock Definitions Define RZ/G2L (R9A07G044) Clock Pulse Generator Core Clock and module clock outputs, as listed in Table 8.3 ("Clock List") of the RZ/G2L Hardware User's Manual (Rev.0.42, Feb.2021). Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20210609153230.6967-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 23db673d7e5194c8fbbb8c307e23960767305c09 Author: Colin Ian King Date: Wed Jun 9 18:33:12 2021 +0100 ACPI: scan: initialize local variable to avoid garbage being returned In the unlikely event that there are no callback calls made in acpi_walk_dep_device_list(), local variable ret will be returned as an uninitialized value. Clean up static analysis warnings by ensuring ret is initialized. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: a9e10e587304 ("ACPI: scan: Extend acpi_walk_dep_device_list()") Signed-off-by: Colin Ian King Reviewed-by: Daniel Scally [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit f39de44fbb478ed476f001ca505b2b58d3345a30 Author: Hans de Goede Date: Wed Jun 9 19:51:30 2021 +0200 ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc() context->ret.pointer already gets set to NULL at the beginning of acpi_run_osc() and it only gets assigned a new value in the success path near the end of acpi_run_osc(), so the clearing of context->ret.pointer (when status != AE_OK) at the end of acpi_run_osc() is redundant since it will always already be NULL when status != AE_OK. Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit 989c9dad613155a60f15747e3f1db210a6304ecf Author: Sascha Hauer Date: Fri Mar 19 20:02:02 2021 +0100 drm/etnaviv: add HWDB entry for GC7000 rev 6204 This is the 3D GPU found on the i.MX8MP SoC. The feature bits are taken from the NXP downstream kernel driver 6.4.3.p1.305572. Signed-off-by: Sascha Hauer Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner commit 60faa8f1ac6e0588d53eb9a345adcdbcc96a8f47 Author: Erik Kaneda Date: Wed Jun 9 20:41:53 2021 -0700 ACPI: Add \_SB._OSC bit for PRM Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit cefc7ca46235f01d5233e3abd4b79452af01d9e9 Author: Erik Kaneda Date: Wed Jun 9 20:41:52 2021 -0700 ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype Platform Runtime Mechanism (PRM) is a firmware interface that exposes a set of binary executables that can either be called from the AML interpreter or device drivers by bypassing the AML interpreter. This change implements the AML interpreter path. According to the specification [1], PRM services are listed in an ACPI table called the PRMT. This patch parses module and handler information listed in the PRMT and registers the PlatformRtMechanism OpRegion handler before ACPI tables are loaded. Each service is defined by a 16-byte GUID and called from writing a 26-byte ASL buffer containing the identifier to a FieldUnit object defined inside a PlatformRtMechanism OperationRegion. OperationRegion (PRMR, PlatformRtMechanism, 0, 26) Field (PRMR, BufferAcc, NoLock, Preserve) { PRMF, 208 // Write to this field to invoke the OperationRegion Handler } The 26-byte ASL buffer is defined as the following: Byte Offset Byte Length Description ============================================================= 0 1 PRM OperationRegion handler status 1 8 PRM service status 9 1 PRM command 10 16 PRM handler GUID The ASL caller fills out a 26-byte buffer containing the PRM command and the PRM handler GUID like so: /* Local0 is the PRM data buffer */ Local0 = buffer (26){} /* Create byte fields over the buffer */ CreateByteField (Local0, 0x9, CMD) CreateField (Local0, 0x50, 0x80, GUID) /* Fill in the command and data fields of the data buffer */ CMD = 0 // run command GUID = ToUUID("xxxx-xx-xxx-xxxx") /* * Invoke PRM service with an ID that matches GUID and save the * result. */ Local0 = (\_SB.PRMT.PRMF = Local0) Byte offset 0 - 8 are written by the handler as a status passed back to AML and used by ASL like so: /* Create byte fields over the buffer */ CreateByteField (Local0, 0x0, PSTA) CreateQWordField (Local0, 0x1, USTA) In this ASL code, PSTA contains a status from the OperationRegion and USTA contains a status from the PRM service. The 26-byte buffer is recieved by acpi_platformrt_space_handler. This handler will look at the command value and the handler guid and take the approperiate actions. Command value Action ===================================================================== 0 Run the PRM service indicated by the PRM handler GUID (bytes 10-26) 1 Prevent PRM runtime updates from happening to the service's parent module 2 Allow PRM updates from happening to the service's parent module This patch enables command value 0. Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1] Signed-off-by: Erik Kaneda [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 9f8c7baedabc9693fbd7890f8fda40578bde4f73 Author: Erik Kaneda Date: Wed Jun 9 20:41:51 2021 -0700 ACPICA: Add PRMT module header to facilitate parsing ACPICA commit bd46cb07e614fd85ea69e54c1f6f0ae0a5fb20ab This structure is used in to parse PRMT in other Operating Systems that relies on using subtable headers in order to parse ACPI tables. Although the PRMT doesn't have "subtables" it has a list of module information structures that act as subtables. Link: https://github.com/acpica/acpica/commit/bd46cb07 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit bd5431b2f9b30a70f6ed964dd5ee9a6d1c397c06 Author: Icenowy Zheng Date: Wed Jun 9 16:38:43 2021 +0800 arm64: dts: allwinner: a64-sopine-baseboard: change RGMII mode to TXID Although the schematics of Pine A64-LTS and SoPine Baseboard shows both the RX and TX internal delay are enabled, they're using the same broken RTL8211E chip batch with Pine A64+, so they should use TXID instead, not ID. In addition, by checking the real components soldered on both a SoPine Baseboard and a Pine A64-LTS, RX delay is not enabled (GR69 soldered and GR70 NC) despite the schematics says it's enabled. It's a common situation for Pine64 boards that the NC information on schematics is not the same with the board. So the RGMII delay mode should be TXID on these boards. Fixes: c2b111e59a7b ("arm64: dts: allwinner: A64 Sopine: phy-mode rgmii-id") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210609083843.463750-1-icenowy@aosc.io commit 2db7b2eac7ad55105fe037b3f8f57d8ecac8c3fb Author: Shiraz Saleem Date: Wed Jun 9 18:49:24 2021 -0500 RDMA/irdma: Store PBL info address a pointer type The level1 PBL info address is stored as u64. This requires casting through a uinptr_t before used as a pointer type. And this leads to sparse warning such as this when uinptr_t is missing: drivers/infiniband/hw/irdma/hw.c: In function 'irdma_destroy_virt_aeq': drivers/infiniband/hw/irdma/hw.c:579:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 579 | dma_addr_t *pg_arr = (dma_addr_t *)aeq->palloc.level1.addr; This can be fixed using an intermediate uintptr_t, but rather it is better to fix the structure irdm_pble_info to store the address as u64* and the VA it is assigned in irdma_chunk as a void*. This greatly reduces the casting on this address. Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions") Link: https://lore.kernel.org/r/20210609234924.938-1-shiraz.saleem@intel.com Reported-by: kernel test robot Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit bf0480a2df7597b43a8383191e14580243ecc1f9 Author: Jason Gunthorpe Date: Wed Jun 9 13:59:25 2021 +0300 IB/cm: Remove dgid from the cm_id_priv av It turns out this is only being used to store the LID for SIDR mode to search the RB tree for request de-duplication. Store the LID value directly and don't pretend it is a GID. Link: https://lore.kernel.org/r/2e7c87b6f662c90c642fc1838e363ad3e6ef14a4.1623236345.git.leonro@nvidia.com Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fae5c9f3664ba278137e54a2083b39b90c64093a Author: Nicholas Piggin Date: Fri May 28 19:07:52 2021 +1000 KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path POWER9 and later processors always go via the P9 guest entry path now. Remove the remaining support from the P7/8 path. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-33-npiggin@gmail.com commit 0bf7e1b2e9a496e1ebca9e3e1f53c7e98add4417 Author: Nicholas Piggin Date: Fri May 28 19:07:51 2021 +1000 KVM: PPC: Book3S HV P9: implement hash host / hash guest support Implement support for hash guests under hash host. This has to save and restore the host SLB, and ensure that the MMU is off while switching into the guest SLB. POWER9 and later CPUs now always go via the P9 path. The "fast" guest mode is now renamed to the P9 mode, which is consistent with its functionality and the rest of the naming. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-32-npiggin@gmail.com commit 079a09a500c399f804effcf9bb49214cdfa698e5 Author: Nicholas Piggin Date: Fri May 28 19:07:50 2021 +1000 KVM: PPC: Book3S HV P9: implement hash guest support Implement hash guest support. Guest entry/exit has to restore and save/clear the SLB, plus several other bits to accommodate hash guests in the P9 path. Radix host, hash guest support is removed from the P7/8 path. The HPT hcalls and faults are not handled in real mode, which is a performance regression. A worst-case fork/exit microbenchmark takes 3x longer after this patch. kbuild benchmark performance is in the noise, but the slowdown is likely to be noticed somewhere. For now, accept this penalty for the benefit of simplifying the P7/8 paths and unifying P9 hash with the new code, because hash is a less important configuration than radix on processors that support it. Hash will benefit from future optimisations to this path, including possibly a faster path to handle such hcalls and interrupts without doing a full exit. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-31-npiggin@gmail.com commit ac3c8b41c27ea112daed031f852a4b361c11a03e Author: Nicholas Piggin Date: Fri May 28 19:07:49 2021 +1000 KVM: PPC: Book3S HV P9: Reflect userspace hcalls to hash guests to support PR KVM The reflection of sc 1 interrupts from guest PR=1 to the guest kernel is required to support a hash guest running PR KVM where its guest is making hcalls with sc 1. In preparation for hash guest support, add this hcall reflection to the P9 path. The P7/8 path does this in its realmode hcall handler (sc_1_fast_return). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-30-npiggin@gmail.com commit 6165d5dd99dbaec7a309491c3951bd81fc89978d Author: Nicholas Piggin Date: Fri May 28 19:07:48 2021 +1000 KVM: PPC: Book3S HV: add virtual mode handlers for HPT hcalls and page faults In order to support hash guests in the P9 path (which does not do real mode hcalls or page fault handling), these real-mode hash specific interrupts need to be implemented in virt mode. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-29-npiggin@gmail.com commit a9aa86e08b3a0b2c273cdb772283c872e55f14bf Author: Nicholas Piggin Date: Fri May 28 19:07:47 2021 +1000 KVM: PPC: Book3S HV: small pseries_do_hcall cleanup Functionality should not be changed. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-28-npiggin@gmail.com commit cbcff8b1c53e458ed4e23877048d7268fd13ab8a Author: Nicholas Piggin Date: Fri May 28 19:07:46 2021 +1000 KVM: PPC: Book3S HV P9: Allow all P9 processors to enable nested HV All radix guests go via the P9 path now, so there is no need to limit nested HV to processors that support "mixed mode" MMU. Remove the restriction. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-27-npiggin@gmail.com commit 2ce008c8b25467ceacf45bcf0e183d660edb82f2 Author: Nicholas Piggin Date: Fri May 28 19:07:45 2021 +1000 KVM: PPC: Book3S HV: Remove unused nested HV tests in XICS emulation Commit f3c18e9342a44 ("KVM: PPC: Book3S HV: Use XICS hypercalls when running as a nested hypervisor") added nested HV tests in XICS hypercalls, but not all are required. * icp_eoi is only called by kvmppc_deliver_irq_passthru which is only called by kvmppc_check_passthru which is only caled by kvmppc_read_one_intr. * kvmppc_read_one_intr is only called by kvmppc_read_intr which is only called by the L0 HV rmhandlers code. * kvmhv_rm_send_ipi is called by: - kvmhv_interrupt_vcore which is only called by kvmhv_commence_exit which is only called by the L0 HV rmhandlers code. - icp_send_hcore_msg which is only called by icp_rm_set_vcpu_irq. - icp_rm_set_vcpu_irq which is only called by icp_rm_try_update - icp_rm_set_vcpu_irq is not nested HV safe because it writes to LPCR directly without a kvmhv_on_pseries test. Nested handlers should not in general be using the rm handlers. The important test seems to be in kvmppc_ipi_thread, which sends the virt-mode H_IPI handler kick to use smp_call_function rather than msgsnd. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-26-npiggin@gmail.com commit dcbac73a5b374873bd6dfd8a0ee5d0b7fc844420 Author: Nicholas Piggin Date: Fri May 28 19:07:44 2021 +1000 KVM: PPC: Book3S HV: Remove virt mode checks from real mode handlers Now that the P7/8 path no longer supports radix, real-mode handlers do not need to deal with being called in virt mode. This change effectively reverts commit acde25726bc6 ("KVM: PPC: Book3S HV: Add radix checks in real-mode hypercall handlers"). It removes a few more real-mode tests in rm hcall handlers, which allows the indirect ops for the xive module to be removed from the built-in xics rm handlers. kvmppc_h_random is renamed to kvmppc_rm_h_random to be a bit more descriptive and consistent with other rm handlers. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-25-npiggin@gmail.com commit 9769a7fd79b65a6a6f8362154ab59c36d0defbf3 Author: Nicholas Piggin Date: Fri May 28 19:07:43 2021 +1000 KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path The P9 path now runs all supported radix guest combinations, so remove radix guest support from the P7/8 path. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-24-npiggin@gmail.com commit aaae8c79005846eeafc7a0e5d3eda4e34ea8ca2e Author: Nicholas Piggin Date: Fri May 28 19:07:42 2021 +1000 KVM: PPC: Book3S HV: Remove support for dependent threads mode on P9 Dependent-threads mode is the normal KVM mode for pre-POWER9 SMT processors, where all threads in a core (or subcore) would run the same partition at the same time, or they would run the host. This design was mandated by MMU state that is shared between threads in a processor, so the synchronisation point is in hypervisor real-mode that has essentially no shared state, so it's safe for multiple threads to gather and switch to the correct mode. It is implemented by having the host unplug all secondary threads and always run in SMT1 mode, and host QEMU threads essentially represent virtual cores that wake these secondary threads out of unplug when the ioctl is called to run the guest. This happens via a side-path that is mostly invisible to the rest of the Linux host and the secondary threads still appear to be unplugged. POWER9 / ISA v3.0 has a more flexible MMU design that is independent per-thread and allows a much simpler KVM implementation. Before the new "P9 fast path" was added that began to take advantage of this, POWER9 support was implemented in the existing path which has support to run in the dependent threads mode. So it was not much work to add support to run POWER9 in this dependent threads mode. The mode is not required by the POWER9 MMU (although "mixed-mode" hash / radix MMU limitations of early processors were worked around using this mode). But it is one way to run SMT guests without running different guests or guest and host on different threads of the same core, so it could avoid or reduce some SMT attack surfaces without turning off SMT entirely. This security feature has some real, if indeterminate, value. However the old path is lagging in features (nested HV), and with this series the new P9 path adds remaining missing features (radix prefetch bug and hash support, in later patches), so POWER9 dependent threads mode support would be the only remaining reason to keep that code in and keep supporting POWER9/POWER10 in the old path. So here we make the call to drop this feature. Remove dependent threads mode support for POWER9 and above processors. Systems can still achieve this security by disabling SMT entirely, but that would generally come at a larger performance cost for guests. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-23-npiggin@gmail.com commit 2e1ae9cd56f8616a707185f3c6cb7ee2a20809e1 Author: Nicholas Piggin Date: Fri May 28 19:07:41 2021 +1000 KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU Rather than partition the guest PID space + flush a rogue guest PID to work around this problem, instead fix it by always disabling the MMU when switching in or out of guest MMU context in HV mode. This may be a bit less efficient, but it is a lot less complicated and allows the P9 path to trivally implement the workaround too. Newer CPUs are not subject to this issue. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-22-npiggin@gmail.com commit 41f779917669fcc28a7f5646d1f7a85043c9d152 Author: Nicholas Piggin Date: Fri May 28 19:07:40 2021 +1000 KVM: PPC: Book3S HV P9: Switch to guest MMU context as late as possible Move MMU context switch as late as reasonably possible to minimise code running with guest context switched in. This becomes more important when this code may run in real-mode, with later changes. Move WARN_ON as early as possible so program check interrupts are less likely to tangle everything up. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-21-npiggin@gmail.com commit edba6aff4f2c3893e168df6a2e9a20f3c39b0b30 Author: Nicholas Piggin Date: Fri May 28 19:07:39 2021 +1000 KVM: PPC: Book3S HV P9: Add helpers for OS SPR handling This is a first step to wrapping supervisor and user SPR saving and loading up into helpers, which will then be called independently in bare metal and nested HV cases in order to optimise SPR access. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-20-npiggin@gmail.com commit 68e3baaca8c56bbb336d2215f201f4047ce736e5 Author: Nicholas Piggin Date: Fri May 28 19:07:38 2021 +1000 KVM: PPC: Book3S HV P9: Move SPR loading after expiry time check This is wasted work if the time limit is exceeded. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-19-npiggin@gmail.com commit a32ed1bb70723ec7a6c888b6c7071d516cca0e8f Author: Nicholas Piggin Date: Fri May 28 19:07:37 2021 +1000 KVM: PPC: Book3S HV P9: Improve exit timing accounting coverage The C conversion caused exit timing to become a bit cramped. Expand it to cover more of the entry and exit code. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-18-npiggin@gmail.com commit 6d770e3fe9a120560cda66331ce5faa363400e97 Author: Nicholas Piggin Date: Fri May 28 19:07:36 2021 +1000 KVM: PPC: Book3S HV P9: Read machine check registers while MSR[RI] is 0 SRR0/1, DAR, DSISR must all be protected from machine check which can clobber them. Ensure MSR[RI] is clear while they are live. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-17-npiggin@gmail.com commit c00366e2375408e43370cd7981af3354f7c83ed3 Author: Nicholas Piggin Date: Fri May 28 19:07:35 2021 +1000 KVM: PPC: Book3S HV P9: inline kvmhv_load_hv_regs_and_go into __kvmhv_vcpu_entry_p9 Now the initial C implementation is done, inline more HV code to make rearranging things easier. And rename __kvmhv_vcpu_entry_p9 to drop the leading underscores as it's now C, and is now a more complete vcpu entry. Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-16-npiggin@gmail.com commit 89d35b23910158a9add33a206e973f4227906d3c Author: Nicholas Piggin Date: Fri May 28 19:07:34 2021 +1000 KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C Almost all logic is moved to C, by introducing a new in_guest mode for the P9 path that branches very early in the KVM interrupt handler to P9 exit code. The main P9 entry and exit assembly is now only about 160 lines of low level stack setup and register save/restore, plus a bad-interrupt handler. There are two motivations for this, the first is just make the code more maintainable being in C. The second is to reduce the amount of code running in a special KVM mode, "realmode". In quotes because with radix it is no longer necessarily real-mode in the MMU, but it still has to be treated specially because it may be in real-mode, and has various important registers like PID, DEC, TB, etc set to guest. This is hostile to the rest of Linux and can't use arbitrary kernel functionality or be instrumented well. This initial patch is a reasonably faithful conversion of the asm code, but it does lack any loop to return quickly back into the guest without switching out of realmode in the case of unimportant or easily handled interrupts. As explained in previous changes, handling HV interrupts very quickly in this low level realmode is not so important for P9 performance, and are important to avoid for security, observability, debugability reasons. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-15-npiggin@gmail.com commit 9dc2babc185e0a24fbb48098daafd552cac157fa Author: Nicholas Piggin Date: Fri May 28 19:07:33 2021 +1000 KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path In the interest of minimising the amount of code that is run in "real-mode", don't handle hcalls in real mode in the P9 path. This requires some new handlers for H_CEDE and xics-on-xive to be added before xive is pulled or cede logic is checked. This introduces a change in radix guest behaviour where radix guests that execute 'sc 1' in userspace now get a privilege fault whereas previously the 'sc 1' would be reflected as a syscall interrupt to the guest kernel. That reflection is only required for hash guests that run PR KVM. Background: In POWER8 and earlier processors, it is very expensive to exit from the HV real mode context of a guest hypervisor interrupt, and switch to host virtual mode. On those processors, guest->HV interrupts reach the hypervisor with the MMU off because the MMU is loaded with guest context (LPCR, SDR1, SLB), and the other threads in the sub-core need to be pulled out of the guest too. Then the primary must save off guest state, invalidate SLB and ERAT, and load up host state before the MMU can be enabled to run in host virtual mode (~= regular Linux mode). Hash guests also require a lot of hcalls to run due to the nature of the MMU architecture and paravirtualisation design. The XICS interrupt controller requires hcalls to run. So KVM traditionally tries hard to avoid the full exit, by handling hcalls and other interrupts in real mode as much as possible. By contrast, POWER9 has independent MMU context per-thread, and in radix mode the hypervisor is in host virtual memory mode when the HV interrupt is taken. Radix guests do not require significant hcalls to manage their translations, and xive guests don't need hcalls to handle interrupts. So it's much less important for performance to handle hcalls in real mode on POWER9. One caveat is that the TCE hcalls are performance critical, real-mode variants introduced for POWER8 in order to achieve 10GbE performance. Real mode TCE hcalls were found to be less important on POWER9, which was able to drive 40GBe networking without them (using the virt mode hcalls) but performance is still important. These hcalls will benefit from subsequent guest entry/exit optimisation including possibly a faster "partial exit" that does not entirely switch to host context to handle the hcall. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-14-npiggin@gmail.com commit 48013cbc504e064d2318f24482cfbe3c53e0a812 Author: Nicholas Piggin Date: Fri May 28 19:07:32 2021 +1000 KVM: PPC: Book3S HV P9: Move radix MMU switching instructions together Switching the MMU from radix<->radix mode is tricky particularly as the MMU can remain enabled and requires a certain sequence of SPR updates. Move these together into their own functions. This also includes the radix TLB check / flush because it's tied in to MMU switching due to tlbiel getting LPID from LPIDR. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-13-npiggin@gmail.com commit 09512c29167bd3792820caf83bcca4d4e5ac2266 Author: Nicholas Piggin Date: Fri May 28 19:07:31 2021 +1000 KVM: PPC: Book3S HV P9: Move xive vcpu context management into kvmhv_p9_guest_entry Move the xive management up so the low level register switching can be pushed further down in a later patch. XIVE MMIO CI operations can run in higher level code with machine checks, tracing, etc., available. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-12-npiggin@gmail.com commit 6ffe2c6e6dcefb971e4046f02086c4adadd0b310 Author: Nicholas Piggin Date: Fri May 28 19:07:30 2021 +1000 KVM: PPC: Book3S HV P9: Reduce irq_work vs guest decrementer races irq_work's use of the DEC SPR is racy with guest<->host switch and guest entry which flips the DEC interrupt to guest, which could lose a host work interrupt. This patch closes one race, and attempts to comment another class of races. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-11-npiggin@gmail.com commit 413679e73bdfc2720dc2fa2172b65b7411185fa7 Author: Nicholas Piggin Date: Fri May 28 19:07:29 2021 +1000 KVM: PPC: Book3S HV P9: Move setting HDEC after switching to guest LPCR LPCR[HDICE]=0 suppresses hypervisor decrementer exceptions on some processors, so it must be enabled before HDEC is set. Rather than set it in the host LPCR then setting HDEC, move the HDEC update to after the guest MMU context (including LPCR) is loaded. There shouldn't be much concern with delaying HDEC by some 10s or 100s of nanoseconds by setting it a bit later. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-10-npiggin@gmail.com commit 023c3c96ca4d196c09d554d5a98900406e4d7ecb Author: Nicholas Piggin Date: Fri May 28 19:07:28 2021 +1000 KVM: PPC: Book3S HV P9: implement kvmppc_xive_pull_vcpu in C This is more symmetric with kvmppc_xive_push_vcpu, and has the advantage that it runs with the MMU on. The extra test added to the asm will go away with a future change. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-9-npiggin@gmail.com commit e2762743c6328dde14290cd58ddf2175b068ad80 Author: Nicholas Piggin Date: Fri May 28 19:07:27 2021 +1000 KVM: PPC: Book3S 64: Minimise hcall handler calling convention differences This sets up the same calling convention from interrupt entry to KVM interrupt handler for system calls as exists for other interrupt types. This is a better API, it uses a save area rather than SPR, and it has more registers free to use. Using a single common API helps maintain it, and it becomes easier to use in C in a later patch. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-8-npiggin@gmail.com commit 1b5821c630c219e3c6f643ebbefcf08c9fa714d8 Author: Nicholas Piggin Date: Fri May 28 19:07:26 2021 +1000 KVM: PPC: Book3S 64: move bad_host_intr check to HV handler The bad_host_intr check will never be true with PR KVM, move it to HV code. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-7-npiggin@gmail.com commit 69fdd67499716efca861f7cecabdfeee5e5d7b51 Author: Nicholas Piggin Date: Fri May 28 19:07:25 2021 +1000 KVM: PPC: Book3S 64: Move interrupt early register setup to KVM Like the earlier patch for hcalls, KVM interrupt entry requires a different calling convention than the Linux interrupt handlers set up. Move the code that converts from one to the other into KVM. Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-6-npiggin@gmail.com commit 04ece7b60b689e1de38b9b0f597f8f94951e4367 Author: Nicholas Piggin Date: Fri May 28 19:07:24 2021 +1000 KVM: PPC: Book3S 64: Move hcall early register setup to KVM System calls / hcalls have a different calling convention than other interrupts, so there is code in the KVMTEST to massage these into the same form as other interrupt handlers. Move this work into the KVM hcall handler. This means teaching KVM a little more about the low level interrupt handler setup, PACA save areas, etc., although that's not obviously worse than the current approach of coming up with an entirely different interrupt register / save convention. Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-5-npiggin@gmail.com commit 31c67cfe2a6a5a7364dc1552b877c6b7820dd556 Author: Nicholas Piggin Date: Fri May 28 19:07:23 2021 +1000 KVM: PPC: Book3S 64: add hcall interrupt handler Add a separate hcall entry point. This can be used to deal with the different calling convention. Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-4-npiggin@gmail.com commit f33e0702d98cc5ff21f44833525b07581862eb57 Author: Nicholas Piggin Date: Fri May 28 19:07:22 2021 +1000 KVM: PPC: Book3S 64: Move GUEST_MODE_SKIP test into KVM Move the GUEST_MODE_SKIP logic into KVM code. This is quite a KVM internal detail that has no real need to be in common handlers. Add a comment explaining the what and why of KVM "skip" interrupts. Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-3-npiggin@gmail.com commit f36011569b90b3973f07cea00c5872c4dc0c707f Author: Nicholas Piggin Date: Fri May 28 19:07:21 2021 +1000 KVM: PPC: Book3S 64: move KVM interrupt entry to a common entry point Rather than bifurcate the call depending on whether or not HV is possible, and have the HV entry test for PR, just make a single common point which does the demultiplexing. This makes it simpler to add another type of exit handler. Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210528090752.3542186-2-npiggin@gmail.com commit 11aaf2a0f8f070e87833775965950157bf57e49a Author: Alexandre Torgue Date: Thu Apr 15 12:10:37 2021 +0200 ARM: dts: stm32: fix ltdc pinctrl on microdev2.0-of7 It prevents the following warning: pin-controller@50002000: 'ltdc' does not match any of the regexes: '-[0-9]*$', '^gpio@[0-9a-f]*$', 'pinctrl-[0-9]+' Signed-off-by: Alexandre Torgue commit fea99822914039c690a5322dd33d5abdc7c27ea3 Author: Alexandre Torgue Date: Thu Apr 15 12:10:32 2021 +0200 dt-bindings: net: document ptp_ref clk in dwmac ptp_ref clk has been added in DT but not documented which makes yaml validation failed: ethernet@5800a000: clocks: [[6, 105], [6, 103], [6, 104], [6, 123], [6, 169], [6, 112]] is too long ethernet@5800a000: clock-names: ['stmmaceth', 'mac-clk-tx', 'mac-clk-rx', 'eth-ck', 'ptp_ref', 'ethstp'] is too long Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit fb1406335c067be074eab38206cf9abfdce2fb0b Author: Alexandre Torgue Date: Thu Apr 15 12:10:31 2021 +0200 ARM: dts: stm32: move stmmac axi config in ethernet node on stm32mp15 It fixes the following warning seen running "make dtbs_check W=1" Warning (simple_bus_reg): /soc/stmmac-axi-config: missing or empty reg/ranges property Signed-off-by: Alexandre Torgue commit ad0ed10ba5792064fc3accbf8f0341152a57eecb Author: Alexandre Torgue Date: Thu Apr 15 12:10:30 2021 +0200 ARM: dts: stm32: fix i2c node name on stm32f746 to prevent warnings Replace upper case by lower case in i2c nodes name. Signed-off-by: Alexandre Torgue commit a52c468a9526dfe2f9a5d3c99f5dd362d0b5e3f4 Author: Alexandre Torgue Date: Thu Apr 15 12:10:29 2021 +0200 ARM: dts: stm32: update pinctrl node name on STM32 MCU to prevent warnings Update node name to avoid a DT schema validation issue seen with "make dtbs_check W=1". It also cleans picntrl dtsi files for f429/f469 MCU. Signed-off-by: Alexandre Torgue commit 046a6ee2343bb26d85a9973a39ccdb9764236fa4 Author: Marc Zyngier Date: Tue May 4 17:42:18 2021 +0100 irqchip: Bulk conversion to generic_handle_domain_irq() Wherever possible, replace constructs that match either generic_handle_irq(irq_find_mapping()) or generic_handle_irq(irq_linear_revmap()) to a single call to generic_handle_domain_irq(). Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier commit e1c054918c6c7a30a35d2c183ed86600a071cdab Author: Marc Zyngier Date: Wed May 12 16:18:15 2021 +0100 genirq: Move non-irqdomain handle_domain_irq() handling into ARM's handle_IRQ() Despite the name, handle_domain_irq() deals with non-irqdomain handling for the sake of a handful of legacy ARM platforms. Move such handling into ARM's handle_IRQ(), allowing for better code generation for everyone else. This allows us get rid of some complexity, and to rearrange the guards on the various helpers in a more logical way. Signed-off-by: Marc Zyngier commit 8240ef50d4864325b346e40bb9d30cda9f22102d Author: Marc Zyngier Date: Wed May 12 13:45:52 2021 +0100 genirq: Add generic_handle_domain_irq() helper Provide generic_handle_domain_irq() as a pendent to handle_domain_irq() for non-root interrupt controllers Signed-off-by: Marc Zyngier commit 9e027dd979beca41cd85f4e971d184fe0ffcff3c Author: Marc Zyngier Date: Wed May 12 13:46:05 2021 +0100 irqchip/nvic: Convert from handle_IRQ() to handle_domain_irq() Given that the nvic driver is fully irqdomain aware, there is no reason for it to use the arch-specific handle_IRQ(), and it can be moved over to handle_domain_irq(). Signed-off-by: Marc Zyngier commit 9626d18a20e166a864e8d1f6ed6bbb84a0fa4989 Author: Marc Zyngier Date: Tue May 4 14:33:24 2021 +0100 irqdesc: Fix __handle_domain_irq() comment It appears that the comment about a NULL domain meaning anything has always been wrong. Fix it. Signed-off-by: Marc Zyngier commit a3016b26ee6ee13d5647d701404a7912d4eaea9e Author: Marc Zyngier Date: Tue May 4 14:24:37 2021 +0100 genirq: Use irq_resolve_mapping() to implement __handle_domain_irq() and co In order to start reaping the benefits of irq_resolve_mapping(), start using it in __handle_domain_irq() and handle_domain_nmi(). This involves splitting generic_handle_irq() to be able to directly provide the irq_desc. Signed-off-by: Marc Zyngier commit d22558dd0a6c888b1829f9d3a0a627e330e27585 Author: Marc Zyngier Date: Tue May 4 14:00:13 2021 +0100 irqdomain: Introduce irq_resolve_mapping() Rework irq_find_mapping() to return an both an irq_desc pointer, optionally the virtual irq number, and rename the result to __irq_resolve_mapping(). a new helper called irq_resolve_mapping() is provided for code that doesn't need the virtual irq number. irq_find_mapping() is also rewritten in terms of __irq_resolve_mapping(). Signed-off-by: Marc Zyngier commit d4a45c68dc81f9117ceaff9f058d5fae674181b9 Author: Marc Zyngier Date: Mon Apr 5 12:57:27 2021 +0100 irqdomain: Protect the linear revmap with RCU It is pretty odd that the radix tree uses RCU while the linear portion doesn't, leading to potential surprises for the users, depending on how the irqdomain has been created. Fix this by moving the update of the linear revmap under the mutex, and the lookup under the RCU read-side lock. The mutex name is updated to reflect that it doesn't only cover the radix-tree anymore. Signed-off-by: Marc Zyngier commit 48b15a7921d60680babe59f64e127816585a585c Author: Marc Zyngier Date: Mon Apr 5 11:46:53 2021 +0100 irqdomain: Cache irq_data instead of a virq number in the revmap Caching a virq number in the revmap is pretty inefficient, as it means we will need to convert it back to either an irq_data or irq_desc to do anything with it. It is also a bit odd, as the radix tree does cache irq_data pointers. Change the revmap type to be an irq_data pointer instead of an unsigned int, and preserve the current API for now. Signed-off-by: Marc Zyngier commit 426fa316148bccabf48f9c91a13c387ee911eadc Author: Marc Zyngier Date: Mon Apr 5 11:30:51 2021 +0100 irqdomain: Use struct_size() helper when allocating irqdomain Instead of open-coding the size computation of struct irqdomain, use the struct_size() helper instead. This is going to be handy as we change the type of the revmap array. Signed-off-by: Marc Zyngier commit 4f86a06e2d6ece5316e4c42fbf946ee22acb30f3 Author: Marc Zyngier Date: Mon Sep 10 18:33:46 2018 +0100 irqdomain: Make normal and nomap irqdomains exclusive Direct mappings are completely exclusive of normal mappings, meaning that we can refactor the code slightly so that we can get rid of the revmap_direct_max_irq field and use the revmap_size field instead, reducing the size of the irqdomain structure. Signed-off-by: Marc Zyngier commit e37af8011a9631996e6cd32dd81a152708eee7d4 Author: Marc Zyngier Date: Sun Apr 4 13:06:39 2021 +0100 powerpc: Move the use of irq_domain_add_nomap() behind a config option Only a handful of old PPC systems are still using the old 'nomap' variant of the irqdomain library. Move the associated definitions behind a configuration option, which will allow us to make some more radical changes. Signed-off-by: Marc Zyngier commit 1da027362a7db422243601e895e6f8288389f435 Author: Marc Zyngier Date: Fri Apr 2 12:50:14 2021 +0100 irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping() irq_linear_revmap() is supposed to be a fast path for domain lookups, but it only exposes low-level details of the irqdomain implementation, details which are better kept private. The *overhead* between the two is only a function call and a couple of tests, so it is likely that noone can show any meaningful difference compared to the cost of taking an interrupt. Reimplement irq_linear_revmap() with irq_find_mapping() in order to preserve source code compatibility, and rename the internal field for a measure. Signed-off-by: Marc Zyngier commit 405e94e9aed2a38bdcd22efe53c36c6cd53185a6 Author: Marc Zyngier Date: Thu Sep 13 10:42:25 2018 +0100 irqdomain: Kill irq_domain_add_legacy_isa This helper doesn't have a user anymore, let's remove it. Signed-off-by: Marc Zyngier commit 582f5aa1dbb3bd7bd3dd12de7e87f6dafb3f8258 Author: Marc Zyngier Date: Mon Apr 5 11:15:27 2021 +0100 powerpc: Drop dependency between asm/irq.h and linux/irqdomain.h Directly including linux/irqdomain.h was hiding all sort of sins, which have now been fixed. Drop the spurious include. Signed-off-by: Marc Zyngier commit 7c576f4d3ce43fa0fc1ac258dc4768d0f3b3b992 Author: Marc Zyngier Date: Thu Sep 13 10:42:25 2018 +0100 powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy irq_domain_add_legacy_isa is a pain. It only exists for the benefit of two PPC-specific drivers, and creates an ugly dependency between asm/irq.h and linux/irqdomain.h Instead, let's convert these two drivers to irq_domain_add_legacy(), stop using NUM_ISA_INTERRUPTS by directly setting NR_IRQS_LEGACY. The dependency cannot be broken yet as there is a lot of PPC-related code that depends on it, but that's the first step towards it. A followup patch will remove irq_domain_add_legacy_isa. Signed-off-by: Marc Zyngier commit 5951be4c9c361242c9f0d7c9b9ef03fe82e45c7b Author: Marc Zyngier Date: Fri Sep 14 09:49:11 2018 +0100 scsi/ibmvscsi: Directly include linux/{of.h,irqdomain.h} A couple of ibmvscsi files are missing the inclusion of linux/of.h and linux/irqdomain.h, relying on transitive inclusion from another file. As we are about to break this dependency, make sure these dependencies are explicit. Signed-off-by: Marc Zyngier commit 13a9a5d17d07cec8181ea0843674ce48c191628e Author: Marc Zyngier Date: Thu Sep 13 17:09:06 2018 +0100 powerpc: Add missing linux/{of.h,irqdomain.h} include directives A bunch of PPC files are missing the inclusion of linux/of.h and linux/irqdomain.h, relying on transitive inclusion from another file. As we are about to break this dependency, make sure these dependencies are explicit. Signed-off-by: Marc Zyngier commit a12a9c5c03072ec6b1f4f9bd7a554a718ecf234a Author: Marc Zyngier Date: Wed Sep 12 16:11:20 2018 +0100 MIPS: Do not include linux/irqdomain.h from asm/irq.h Including linux/irqdomain.h from asm/irq.h is going to break as soon as linux/irqdomain.h will include linux/irq.h, so let's fix this. Code relying on linux/irqomain.h should include it directly. Signed-off-by: Marc Zyngier commit 18ca45f5ba1e31704bcca038b8b612e9b1f52b4f Author: Marc Zyngier Date: Wed May 19 09:01:06 2021 +0100 MIPS: Add missing linux/irqdomain.h includes A number of MIPS platforms are failing to directly include irqdomain.h. Fix this so that we can drop unnecessary dependencies Signed-off-by: Marc Zyngier commit 95af1df6f4e2b121ce33166d61c99250143073b5 Author: Marc Zyngier Date: Thu Sep 13 09:31:09 2018 +0100 MIPS: lantiq: Directly include linux/of.h in xway/dma.c This drivers currently obtains linux/of.h by luck and a chain of bizarre inclusions, which we're about to fix. Let's include the required file directly. Signed-off-by: Marc Zyngier commit 1982752f6ba6a9d74a214b008ae9e336339276e8 Author: Marc Zyngier Date: Thu Sep 13 09:30:34 2018 +0100 irqchip/mips-gic: Directly include linux/irqdomain.h This drivers currently obtains linux/irqdomain.h by luck and a chain of bizarre inclusions, which we're about to fix. Let's include the required file directly. Signed-off-by: Marc Zyngier commit bc9a454a9440e2872ecf71256fb962e4bb35e937 Author: Marc Zyngier Date: Thu Sep 13 09:30:34 2018 +0100 watchdog/octeon-wdt: Directly include linux/irqdomain.h This drivers currently obtains linux/irqdomain.h by luck and a chain of bizarre inclusions, which we're about to fix. Let's include the required file directly. Signed-off-by: Marc Zyngier commit c7d49545997eab111aec14be152842f56a0cabc4 Author: Marc Zyngier Date: Sun May 16 17:57:15 2021 +0100 mfd: ioc3: Directly include linux/irqdomain.h This driver include linux/irqdomain.h via a bizarre set of indirection, which we are about to break. Directly include the required file. Signed-off-by: Marc Zyngier commit aa5f6a89700700fe6fe7e8727581a21a7d679630 Author: Marc Zyngier Date: Thu Sep 13 09:31:09 2018 +0100 staging: octeon-hcd: Directly include linux/of.h This drivers currently obtains linux/of.h by luck and a chain of bizarre inclusions, which we're about to fix. Let's include the required file directly. Signed-off-by: Marc Zyngier commit 9bd1cc4148cbea44ca7d8254b50edb6cb660957a Author: Marc Zyngier Date: Thu Sep 13 10:59:03 2018 +0100 nios2: Do not include linux/irqdomain.h from asm/irq.h Including linux/irqdomain.h from asm/irq.h is going to break as soon as linux/irqdomain.h will include linux/irq.h, so let's fix this. Code relying on linux/irqomain.h should include it directly. Signed-off-by: Marc Zyngier commit 9733862e50fdba55e7f1554e4286fcc5302ff28e Author: Geoff Levand Date: Thu Jun 3 19:17:02 2021 +0000 powerpc/ps3: Add dma_mask to ps3_dma_region Commit f959dcd6ddfd29235030e8026471ac1b022ad2b0 (dma-direct: Fix potential NULL pointer dereference) added a null check on the dma_mask pointer of the kernel's device structure. Add a dma_mask variable to the ps3_dma_region structure and set the device structure's dma_mask pointer to point to this new variable. Fixes runtime errors like these: # WARNING: Fixes tag on line 10 doesn't match correct format # WARNING: Fixes tag on line 10 doesn't match correct format ps3_system_bus_match:349: dev=8.0(sb_01), drv=8.0(ps3flash): match WARNING: CPU: 0 PID: 1 at kernel/dma/mapping.c:151 .dma_map_page_attrs+0x34/0x1e0 ps3flash sb_01: ps3stor_setup:193: map DMA region failed Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/562d0c9ea0100a30c3b186bcc7adb34b0bbd2cd7.1622746428.git.geoff@infradead.org commit 472b440fd26822c645befe459172dafdc2d225de Author: Geoff Levand Date: Thu Jun 3 19:17:01 2021 +0000 powerpc/ps3: Warn on PS3 device errors To aid debugging PS3 boot problems change the log level of several PS3 device errors from pr_debug to pr_warn. Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eb5c1c10da0bbdeb27c8b069187b4f58e429e837.1622746428.git.geoff@infradead.org commit 6caebff168235b6102e5dc57cb95a2374301720a Author: Geoff Levand Date: Thu Jun 3 19:17:01 2021 +0000 powerpc/ps3: Add CONFIG_PS3_VERBOSE_RESULT option To aid debugging, add a new PS3 kernel config option PS3_VERBOSE_RESULT that, when enabled, will print more verbose messages for the result of LV1 hypercalls. Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0ce4b6969a08094a747bd382dbfd30b72ebc192d.1622746428.git.geoff@infradead.org commit ff4a825e4a24cdf7f840461ced6283bf865ab7be Author: Geoff Levand Date: Fri Jun 4 15:58:25 2021 +0000 powerpc/ps3: Re-align DTB in image Change the PS3 linker script to align the DTB at 8 bytes, the same alignment as that of the of the 'generic' powerpc linker script. Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/245897ed65e402686a4b114ba618e935cb5c6506.1622822173.git.geoff@infradead.org commit 07e2d6cf91079ca01db7fb989a02edd8009dcacd Author: Geoff Levand Date: Fri Jun 4 15:58:25 2021 +0000 powerpc/ps3: Add firmware version to sysfs Add a new sysfs entry /sys/firmware/ps3/fw-version that exports the PS3's firmware version. The firmware version is available through an LV1 hypercall, and we've been printing it to the boot log, but haven't provided an easy way for user utilities to get it. Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/41509b2da647cd34b1331cc4756c8774b1e284eb.1622822173.git.geoff@infradead.org commit 015d98149b326e0f1f02e44413112ca8b4330543 Author: Nathan Chancellor Date: Fri May 28 11:27:52 2021 -0700 powerpc/barrier: Avoid collision with clang's __lwsync macro A change in clang 13 results in the __lwsync macro being defined as __builtin_ppc_lwsync, which emits 'lwsync' or 'msync' depending on what the target supports. This breaks the build because of -Werror in arch/powerpc, along with thousands of warnings: In file included from arch/powerpc/kernel/pmc.c:12: In file included from include/linux/bug.h:5: In file included from arch/powerpc/include/asm/bug.h:109: In file included from include/asm-generic/bug.h:20: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:32: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: error: '__lwsync' macro redefined [-Werror,-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ :308:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ 1 error generated. Undefine this macro so that the runtime patching introduced by commit 2d1b2027626d ("powerpc: Fixup lwsync at runtime") continues to work properly with clang and the build no longer breaks. Cc: stable@vger.kernel.org Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1386 Link: https://github.com/llvm/llvm-project/commit/62b5df7fe2b3fda1772befeda15598fbef96a614 Link: https://lore.kernel.org/r/20210528182752.1852002-1-nathan@kernel.org commit 83fbcaed24d797528de00c024674fd58e8f1634f Author: Takashi Iwai Date: Thu Jun 10 13:09:35 2021 +0200 ALSA: core: Fix build error due to missing PAGE_SIZE The recent refactoring of memalloc stuff removed the inclusion of asm/page.h for simplicity, but it turned out this caused a compile error due the lack of PAGE_SIZE definition on some architectures. Do a partial revert for recovering from that. Fixes: 37af81c5998f ("ALSA: core: Abstract memory alloc helpers") Reported-by: kernel test robot Link: https://lore.kernel.org/r/202106101858.PfXMMuAa-lkp@intel.com Link: https://lore.kernel.org/r/20210610110935.10393-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2fef64eec23a0840c97977b16dd8919afaffa876 Author: Maxime Ripard Date: Tue May 25 15:23:47 2021 +0200 ASoC: hdmi-codec: Add a prepare hook The IEC958 status bit is usually set by the userspace after hw_params has been called, so in order to use whatever is set by the userspace, we need to implement the prepare hook. Let's add it to the hdmi_codec_ops, and mandate that either prepare or hw_params is implemented. Signed-off-by: Maxime Ripard Acked-by: Mark Brown Link: https://lore.kernel.org/r/20210525132354.297468-6-maxime@cerno.tech commit 7a8e1d44211e16eb394b7b9e0b236ee1503a3ad3 Author: Maxime Ripard Date: Tue May 25 15:23:46 2021 +0200 ASoC: hdmi-codec: Add iec958 controls The IEC958 status bits can be exposed and modified by the userspace through dedicated ALSA controls. This patch implements those controls for the hdmi-codec driver. It relies on a default value being setup at probe time that can later be overridden by the control put. The hw_params callback is then called with a buffer filled with the proper bits for the current parameters being passed on so the underlying driver can just reuse those bits as is. Signed-off-by: Maxime Ripard Acked-by: Mark Brown Link: https://lore.kernel.org/r/20210525132354.297468-5-maxime@cerno.tech commit 7fdabab8f56239466275adea5d2f0a6fff27527b Author: Damien Zammit Date: Thu Jun 10 18:35:28 2021 +1000 ALSA: usb-audio: Add support for Denon DN-X1600 This provides support for Denon DN-X1600 hardware mixer. The device itself supports 44100, 48000 and 96000 (Hz) sample rates, but switching rates via software is currently not working. Therefore, this patch hardcodes the sample rate to 48000Hz which enables all 8 channels to function correctly when the correct sample rate is selected on the hardware itself. MIDI also tested and works. Signed-off-by: Damien Zammit Tested-by: xalmoxis@gmail.com Link: https://lore.kernel.org/r/20210610083528.603942-2-damien@zamaudio.com Signed-off-by: Takashi Iwai commit d6a9642bd673dd0bb2839274fe83eaa979b9207e Author: Joerg Roedel Date: Thu Jun 10 10:31:20 2021 +0200 iommu/vt-d: Fix linker error on 32-bit A recent commit broke the build on 32-bit x86. The linker throws these messages: ld: drivers/iommu/intel/perf.o: in function `dmar_latency_snapshot': perf.c:(.text+0x40c): undefined reference to `__udivdi3' ld: perf.c:(.text+0x458): undefined reference to `__udivdi3' The reason are the 64-bit divides in dmar_latency_snapshot(). Use the div_u64() helper function for those. Fixes: 55ee5e67a59a ("iommu/vt-d: Add common code for dmar latency performance monitors") Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20210610083120.29224-1-joro@8bytes.org commit 30b7ba6972d59cdf3ffce161ab9005a5f7562f9f Author: Takashi Iwai Date: Wed Jun 9 18:25:51 2021 +0200 ALSA: core: Add continuous and vmalloc mmap ops The mmap of continuous pages and vmalloc'ed pages are relatively easily done in a shot with the existing helper functions. Implement the mmap ops for those types, so that the mmap works without relying on the page fault handling. Link: https://lore.kernel.org/r/20210609162551.7842-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit a202bd1ad86d59c07f24f0a201c5ade320b51e30 Author: Takashi Iwai Date: Wed Jun 9 18:25:50 2021 +0200 ALSA: core: Move mmap handler into memalloc ops This patch moves the mmap handling code into the common memalloc handler. It allows us to reduce the memory-type specific code in PCM code gracefully. Link: https://lore.kernel.org/r/20210609162551.7842-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 37af81c5998f4b0f23fb452cffa4b8a1c00ce95b Author: Takashi Iwai Date: Wed Jun 9 18:25:49 2021 +0200 ALSA: core: Abstract memory alloc helpers This patch introduces the ops table to each memory allocation type (SNDRV_DMA_TYPE_XXX) and abstract the handling for the better code management. Then we get separate the page allocation, release and other tasks for each type, especially for the SG buffer. Each buffer type has now callbacks in the struct snd_malloc_ops, and the common helper functions call those ops accordingly. The former inline code that is specific to SG-buffer is moved into the local sgbuf.c, and we can simplify the PCM code without details of memory handling. Link: https://lore.kernel.org/r/20210609162551.7842-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 84a0374051c1582ed9ace6cd63cdbfb15ed4b797 Author: Takashi Iwai Date: Wed Jun 9 18:25:48 2021 +0200 ALSA: core: Drop snd_sgbuf_get_ptr() snd_sgbuf_get_ptr() and its sibling snd_pcm_sgbuf_get_ptr() are no longer used by any drivers. Let's drop them. Link: https://lore.kernel.org/r/20210609162551.7842-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 74fb98311c4e36632b40b2a16931028c77a7c5de Author: Takashi Iwai Date: Wed Jun 9 18:25:47 2021 +0200 ALSA: trident: Drop shadow TLB pointer table The shadow TLB pointer table is allocated and set up, but never really used any longer by the driver. Let's drop it. Since this is the only user of snd_pcm_sgbuf_get_ptr(), we can clean up the API after this change. Link: https://lore.kernel.org/r/20210609162551.7842-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 25c794cd440737c5e6d96c78ff9a7660a36e909f Author: huangjianghui Date: Thu Jun 10 14:20:36 2021 +0800 ALSA: doc: Fix spelling mistakes correct Reatek to Realtek Signed-off-by: huangjianghui Link: https://lore.kernel.org/r/20210610062036.30300-1-huangjianghui@uniontech.com Signed-off-by: Takashi Iwai commit 0159bb020ca9a43b17aa9149f1199643c1d49426 Author: Joel Fernandes (Google) Date: Wed Jun 2 21:31:36 2021 -0400 Documentation: Add usecases, design and interface for core scheduling Now that core scheduling is merged, update the documentation. Co-developed-by: Chris Hyser Signed-off-by: Chris Hyser Co-developed-by: Josh Don Signed-off-by: Josh Don Signed-off-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210603013136.370918-1-joel@joelfernandes.org commit f4a85e00b2a809dabccbfa793f979e5a25f9a650 Author: zuoqilin Date: Thu Jun 10 10:40:53 2021 +0800 ALSA: arm: Remove unnecessary variables There is no need to define the variable "ret" to receive. Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210610024053.1217-1-zuoqilin1@163.com Signed-off-by: Takashi Iwai commit b5b519965c4c364ae65c49fe9f11d222dd70a9c2 Author: Takashi Sakamoto Date: Thu Jun 10 12:17:33 2021 +0900 ALSA: firewire-lib: obsolete workqueue for period update The workqueue to notify PCM period elapse is not used anymore. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210610031733.56297-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 7ba5ca32fe6e8d2e153fb5602997336517b34743 Author: Takashi Sakamoto Date: Thu Jun 10 12:17:32 2021 +0900 ALSA: firewire-lib: operate for period elapse event in process context All of drivers in ALSA firewire stack processes two chances to process isochronous packets in any isochronous context; in software IRQ context for 1394 OHCI, and in process context of ALSA PCM application. In the process context, callbacks of .pointer and .ack are utilized. The callbacks are done by ALSA PCM core under acquiring lock of PCM substream, In design of ALSA PCM core, call of snd_pcm_period_elapsed() is used for drivers to awaken user processes from waiting for available frames. The function voluntarily acquires lock of PCM substream, therefore it is not called in the process context since it causes dead lock. As a workaround to avoid the dead lock, all of drivers in ALSA firewire stack uses workqueue to delegate the call. A variant of snd_pcm_period_elapsed() without lock acquisition can obsolete the workqueue. An extra care is needed for the callback of .pointer since it's called from snd_pcm_period_elapsed(). The isochronous context in Linux FireWire subsystem is safe mostly for nested call except in software IRQ context. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210610031733.56297-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 47271b1b98c980e915c0332eb5e8b2f273b2cd78 Author: Takashi Sakamoto Date: Thu Jun 10 12:17:31 2021 +0900 ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock of PCM substream Current implementation of ALSA PCM core has a kernel API, snd_pcm_period_elapsed(), for drivers to queue event to awaken processes from waiting for available frames. The function voluntarily acquires lock of PCM substream, therefore it is not called in process context for any PCM operation since the lock is already acquired. It is convenient for packet-oriented driver, at least for drivers to audio and music unit in IEEE 1394 bus. The drivers are allowed by Linux FireWire subsystem to process isochronous packets queued till recent isochronous cycle in process context in any time. This commit adds snd_pcm_period_elapsed() variant, snd_pcm_period_elapsed_without_lock(), for drivers to queue the event in the process context. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210610031733.56297-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit f07edc41220b14ce057a4e6d7161b30688ddb8a2 Author: Johan Jonker Date: Sun Jun 6 20:16:32 2021 +0200 ARM: dts: rockchip: fix supply properties in io-domains nodes A test with rockchip-io-domain.yaml gives notifications for supply properties in io-domains nodes. Fix them all into ".*-supply$" format. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210606181632.13371-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit fcafd31b5f535573dd045f6151ab93a806e2b05b Author: Heiko Stuebner Date: Mon Jun 7 16:13:34 2021 +0200 dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml The recent yaml conversion of the grf and inno-usb2-phy bindings left the #phy-cells in place in the main usb2phy node inside the example in grf.yaml, causing new warnings. Drop it to make the bindingcheck happy. Fixes: e71ccdff376b ("dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210607141845.3331910-1-heiko@sntech.de commit 729a611e6f53da00ed62a181f2d5d2bcf22d74d1 Author: Krzysztof Kozlowski Date: Thu May 27 11:41:01 2021 -0400 memory: emif: remove unused frequency and voltage notifiers The driver defined several functions related to handling of frequency and voltage changes: - freq_post_notify_handling - freq_pre_notify_handling - volt_notify_handling All these are static, not used inside or outside of driver, and marked as unused with comment: "TODO: voltage notify handling should be hooked up to regulator framework as soon as the necessary support is available in mainline kernel. This function is un-used right now.". These have been added with commit a93de288aad3 ("memory: emif: handle frequency and voltage change events") in 2012 and are unused since then. Additionally mentioned regulator and clock hooking did not happen since then. If it did not happen for nine years, let's assume it will not happen suddenly now. Remove all unused functions which also allows removal of "t_ck" static variable "t_ck" and "addressing" member of private structure. No functionality is lost. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210527154101.80556-1-krzysztof.kozlowski@canonical.com commit 8e0d09b1232d0538066c40ed4c13086faccbdff6 Author: Krzysztof Kozlowski Date: Thu May 27 11:43:22 2021 -0400 memory: fsl_ifc: fix leak of private memory on probe failure On probe error the driver should free the memory allocated for private structure. Fix this by using resource-managed allocation. Fixes: a20cbdeffce2 ("powerpc/fsl: Add support for Integrated Flash Controller") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210527154322.81253-2-krzysztof.kozlowski@canonical.com commit 3b132ab67fc7a358fff35e808fa65d4bea452521 Author: Krzysztof Kozlowski Date: Thu May 27 11:43:21 2021 -0400 memory: fsl_ifc: fix leak of IO mapping on probe failure On probe error the driver should unmap the IO memory. Smatch reports: drivers/memory/fsl_ifc.c:298 fsl_ifc_ctrl_probe() warn: 'fsl_ifc_ctrl_dev->gregs' not released on lines: 298. Fixes: a20cbdeffce2 ("powerpc/fsl: Add support for Integrated Flash Controller") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210527154322.81253-1-krzysztof.kozlowski@canonical.com commit c7c65703260c88a3e4d7387b2d03023c3625c6d4 Author: Dan Carpenter Date: Wed Jun 9 12:55:25 2021 +0300 memory: tegra: Delete dead debugfs checking code The debugfs_create_dir() function does not return NULL, it returns error pointers. But in normal situations like this where the caller is not dereferencing "emc->debugfs.root" then we are not supposed to check the return. So instead of fixing these checks, we should delete them. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YMCQDTSyG8UuQoh0@mwanda Signed-off-by: Krzysztof Kozlowski commit 7a0f06c197cb5e2106da8507b5610c1bb9c7daac Author: Parav Pandit Date: Thu Jun 10 10:01:15 2021 +0800 iommu/vt-d: No need to typecast Page directory assignment by alloc_pgtable_page() or phys_to_virt() doesn't need typecasting as both routines return void*. Hence, remove typecasting from both the calls. Signed-off-by: Parav Pandit Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210530075053.264218-1-parav@nvidia.com Link: https://lore.kernel.org/r/20210610020115.1637656-24-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 9739ba327c01e26f672661ea751132c29a54d3d9 Author: Parav Pandit Date: Thu Jun 10 10:01:14 2021 +0800 iommu/vt-d: Define counter explicitly as unsigned int Avoid below checkpatch warning. WARNING: Prefer 'unsigned int' to bare use of 'unsigned' + unsigned iommu_refcnt[DMAR_UNITS_SUPPORTED]; Fixes: 29a27719abaa ("iommu/vt-d: Replace iommu_bmp with a refcount") Signed-off-by: Parav Pandit Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210530075053.264218-1-parav@nvidia.com Link: https://lore.kernel.org/r/20210610020115.1637656-23-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit cee57d4fe74e82e784f6566bad3e3bb1ca51a211 Author: Parav Pandit Date: Thu Jun 10 10:01:13 2021 +0800 iommu/vt-d: Remove unnecessary braces No need for braces for single line statement under if() block. Signed-off-by: Parav Pandit Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210530075053.264218-1-parav@nvidia.com Link: https://lore.kernel.org/r/20210610020115.1637656-22-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 74f6d776ae0b8498cfdb574ab24992bd50a2a2f1 Author: Parav Pandit Date: Thu Jun 10 10:01:12 2021 +0800 iommu/vt-d: Removed unused iommu_count in dmar domain DMAR domain uses per DMAR refcount. It is indexed by iommu seq_id. Older iommu_count is only incremented and decremented but no decisions are taken based on this refcount. This is not of much use. Hence, remove iommu_count and further simplify domain_detach_iommu() by returning void. Signed-off-by: Parav Pandit Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210530075053.264218-1-parav@nvidia.com Link: https://lore.kernel.org/r/20210610020115.1637656-21-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1f106ff0ea2782a6bc49bb927e4789681a2ec507 Author: Parav Pandit Date: Thu Jun 10 10:01:11 2021 +0800 iommu/vt-d: Use bitfields for DMAR capabilities IOTLB device presence, iommu coherency and snooping are boolean capabilities. Use them as bits and keep them adjacent. Structure layout before the reorg. $ pahole -C dmar_domain drivers/iommu/intel/dmar.o struct dmar_domain { int nid; /* 0 4 */ unsigned int iommu_refcnt[128]; /* 4 512 */ /* --- cacheline 8 boundary (512 bytes) was 4 bytes ago --- */ u16 iommu_did[128]; /* 516 256 */ /* --- cacheline 12 boundary (768 bytes) was 4 bytes ago --- */ bool has_iotlb_device; /* 772 1 */ /* XXX 3 bytes hole, try to pack */ struct list_head devices; /* 776 16 */ struct list_head subdevices; /* 792 16 */ struct iova_domain iovad __attribute__((__aligned__(8))); /* 808 2320 */ /* --- cacheline 48 boundary (3072 bytes) was 56 bytes ago --- */ struct dma_pte * pgd; /* 3128 8 */ /* --- cacheline 49 boundary (3136 bytes) --- */ int gaw; /* 3136 4 */ int agaw; /* 3140 4 */ int flags; /* 3144 4 */ int iommu_coherency; /* 3148 4 */ int iommu_snooping; /* 3152 4 */ int iommu_count; /* 3156 4 */ int iommu_superpage; /* 3160 4 */ /* XXX 4 bytes hole, try to pack */ u64 max_addr; /* 3168 8 */ u32 default_pasid; /* 3176 4 */ /* XXX 4 bytes hole, try to pack */ struct iommu_domain domain; /* 3184 72 */ /* size: 3256, cachelines: 51, members: 18 */ /* sum members: 3245, holes: 3, sum holes: 11 */ /* forced alignments: 1 */ /* last cacheline: 56 bytes */ } __attribute__((__aligned__(8))); After arranging it for natural padding and to make flags as u8 bits, it saves 8 bytes for the struct. struct dmar_domain { int nid; /* 0 4 */ unsigned int iommu_refcnt[128]; /* 4 512 */ /* --- cacheline 8 boundary (512 bytes) was 4 bytes ago --- */ u16 iommu_did[128]; /* 516 256 */ /* --- cacheline 12 boundary (768 bytes) was 4 bytes ago --- */ u8 has_iotlb_device:1; /* 772: 0 1 */ u8 iommu_coherency:1; /* 772: 1 1 */ u8 iommu_snooping:1; /* 772: 2 1 */ /* XXX 5 bits hole, try to pack */ /* XXX 3 bytes hole, try to pack */ struct list_head devices; /* 776 16 */ struct list_head subdevices; /* 792 16 */ struct iova_domain iovad __attribute__((__aligned__(8))); /* 808 2320 */ /* --- cacheline 48 boundary (3072 bytes) was 56 bytes ago --- */ struct dma_pte * pgd; /* 3128 8 */ /* --- cacheline 49 boundary (3136 bytes) --- */ int gaw; /* 3136 4 */ int agaw; /* 3140 4 */ int flags; /* 3144 4 */ int iommu_count; /* 3148 4 */ int iommu_superpage; /* 3152 4 */ /* XXX 4 bytes hole, try to pack */ u64 max_addr; /* 3160 8 */ u32 default_pasid; /* 3168 4 */ /* XXX 4 bytes hole, try to pack */ struct iommu_domain domain; /* 3176 72 */ /* size: 3248, cachelines: 51, members: 18 */ /* sum members: 3236, holes: 3, sum holes: 11 */ /* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 5 bits */ /* forced alignments: 1 */ /* last cacheline: 48 bytes */ } __attribute__((__aligned__(8))); Signed-off-by: Parav Pandit Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210530075053.264218-1-parav@nvidia.com Link: https://lore.kernel.org/r/20210610020115.1637656-20-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 3bc770b0e998a69c7085ec36405eda246b5b10d8 Author: YueHaibing Date: Thu Jun 10 10:01:10 2021 +0800 iommu/vt-d: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210528130229.22108-1-yuehaibing@huawei.com Link: https://lore.kernel.org/r/20210610020115.1637656-19-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 606636dcbdbb73b1a4ed61be77c76ea1087f042d Author: Gustavo A. R. Silva Date: Thu Jun 10 10:01:09 2021 +0800 iommu/vt-d: Fix out-bounds-warning in intel/svm.c Replace a couple of calls to memcpy() with simple assignments in order to fix the following out-of-bounds warning: drivers/iommu/intel/svm.c:1198:4: warning: 'memcpy' offset [25, 32] from the object at 'desc' is out of the bounds of referenced subobject 'qw2' with type 'long long unsigned int' at offset 16 [-Warray-bounds] The problem is that the original code is trying to copy data into a couple of struct members adjacent to each other in a single call to memcpy(). This causes a legitimate compiler warning because memcpy() overruns the length of &desc.qw2 and &resp.qw2, respectively. This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210414201403.GA392764@embeddedor Link: https://lore.kernel.org/r/20210610020115.1637656-18-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 0f4834ab255bf488f20544e120713decfa77843e Author: Lu Baolu Date: Thu Jun 10 10:01:08 2021 +0800 iommu/vt-d: Add PRQ handling latency sampling The execution time for page fault request handling is performance critical and needs to be monitored. This adds code to sample the execution time of page fault request handling. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-17-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 74eb87a0f9eb8c81264f2eb1b13d578c951b7533 Author: Lu Baolu Date: Thu Jun 10 10:01:07 2021 +0800 iommu/vt-d: Add cache invalidation latency sampling Queued invalidation execution time is performance critical and needs to be monitored. This adds code to sample the execution time of IOTLB/ devTLB/ICE cache invalidation. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-16-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 456bb0b97f00fe8defba155c0a4c48d951635395 Author: Lu Baolu Date: Thu Jun 10 10:01:06 2021 +0800 iommu/vt-d: Expose latency monitor data through debugfs A debugfs interface /sys/kernel/debug/iommu/intel/dmar_perf_latency is created to control and show counts of execution time ranges for various types per DMAR. The interface may help debug any potential performance issue. By default, the interface is disabled. Possible write value of /sys/kernel/debug/iommu/intel/dmar_perf_latency 0 - disable sampling all latency data 1 - enable sampling IOTLB invalidation latency data 2 - enable sampling devTLB invalidation latency data 3 - enable sampling intr entry cache invalidation latency data 4 - enable sampling prq handling latency data Read /sys/kernel/debug/iommu/intel/dmar_perf_latency gives a snapshot of sampling result of all enabled monitors. Signed-off-by: Fenghua Yu Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-15-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 55ee5e67a59a1b6f388d7a1c7b24022145f47a3e Author: Lu Baolu Date: Thu Jun 10 10:01:05 2021 +0800 iommu/vt-d: Add common code for dmar latency performance monitors The execution time of some operations is very performance critical, such as cache invalidation and PRQ processing time. This adds some common code to monitor the execution time range of those operations. The interfaces include enabling/disabling, checking status, updating sampling data and providing a common string format for users. Signed-off-by: Fenghua Yu Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-14-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit e93a67f5a0eef3e9ab5b4649cac5c3b831c6a9db Author: Lu Baolu Date: Thu Jun 10 10:01:04 2021 +0800 iommu/vt-d: Add prq_report trace event This adds a new trace event to track the page fault request report. This event will provide almost all information defined in a page request descriptor. A sample output: | prq_report: dmar0/0000:00:0a.0 seq# 1: rid=0x50 addr=0x559ef6f97 r---- pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 2: rid=0x50 addr=0x559ef6f9c rw--l pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 3: rid=0x50 addr=0x559ef6f98 r---- pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 4: rid=0x50 addr=0x559ef6f9d rw--l pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 5: rid=0x50 addr=0x559ef6f99 r---- pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 6: rid=0x50 addr=0x559ef6f9e rw--l pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 7: rid=0x50 addr=0x559ef6f9a r---- pasid=0x2 index=0x1 | prq_report: dmar0/0000:00:0a.0 seq# 8: rid=0x50 addr=0x559ef6f9f rw--l pasid=0x2 index=0x1 This will be helpful for I/O page fault related debugging. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-13-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit d5b9e4bfe0d8848aaf428bb4bbcc270fecadef35 Author: Lu Baolu Date: Thu Jun 10 10:01:03 2021 +0800 iommu/vt-d: Report prq to io-pgfault framework Let the IO page fault requests get handled through the io-pgfault framework. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-12-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 4c82b88696ac57810ab923b3c5b0734646b9b69f Author: Lu Baolu Date: Thu Jun 10 10:01:02 2021 +0800 iommu/vt-d: Allocate/register iopf queue for sva devices This allocates and registers the iopf queue infrastructure for devices which want to support IO page fault for SVA. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-11-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit ae7f09b14b4ff18f65790a906d7c2fe2561568b5 Author: Lu Baolu Date: Thu Jun 10 10:01:01 2021 +0800 iommu/vt-d: Refactor prq_event_thread() Refactor prq_event_thread() by moving handling single prq event out of the main loop. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-10-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 9e52cc0fedb0fd6187a2bd01b859ea8150b588c2 Author: Lu Baolu Date: Thu Jun 10 10:01:00 2021 +0800 iommu/vt-d: Use common helper to lookup svm devices It's common to iterate the svm device list and find a matched device. Add common helpers to do this and consolidate the code. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-9-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 40483774141625b9685b177fb6e1f36de48d33f8 Author: Lu Baolu Date: Thu Jun 10 10:00:59 2021 +0800 iommu/vt-d: Use iommu_sva_alloc(free)_pasid() helpers Align the pasid alloc/free code with the generic helpers defined in the iommu core. This also refactored the SVA binding code to improve the readability. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 100b8a14a37074796a467d6a9147317538ee70cf Author: Lu Baolu Date: Thu Jun 10 10:00:58 2021 +0800 iommu/vt-d: Add pasid private data helpers We are about to use iommu_sva_alloc/free_pasid() helpers in iommu core. That means the pasid life cycle will be managed by iommu core. Use a local array to save the per pasid private data instead of attaching it the real pasid. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 521f546b4e4cedfbfbb5787f940a592dd20dd1f2 Author: Lu Baolu Date: Thu Jun 10 10:00:57 2021 +0800 iommu/vt-d: Support asynchronous IOMMU nested capabilities Current VT-d implementation supports nested translation only if all underlying IOMMUs support the nested capability. This is unnecessary as the upper layer is allowed to create different containers and set them with different type of iommu backend. The IOMMU driver needs to guarantee that devices attached to a nested mode iommu_domain should support nested capabilility. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210517065701.5078-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 879fcc6bda6956ce9574421c5f68ebbc794bf06b Author: Lu Baolu Date: Thu Jun 10 10:00:56 2021 +0800 iommu/vt-d: Select PCI_ATS explicitly The Intel VT-d implementation supports device TLB management. Select PCI_ATS explicitly so that the pci_ats helpers are always available. Signed-off-by: Lu Baolu Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210512065313.3441309-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 719a19335692083c0f4ebdc6eef65131e7394ac8 Author: Lu Baolu Date: Thu Jun 10 10:00:55 2021 +0800 iommu/vt-d: Tweak the description of a DMA fault The Intel IOMMU driver reports the DMA fault reason in a decimal number while the VT-d specification uses a hexadecimal one. It's inconvenient that users need to covert them everytime before consulting the spec. Let's use hexadecimal number for a DMA fault reason. The fault message uses 0xffffffff as PASID for DMA requests w/o PASID. This is confusing. Tweak this by adding "NO_PASID" explicitly. Reviewed-by: Ashok Raj Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210517065425.4953-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210610020115.1637656-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 367f82de5a9c8ee77058f40bb470b83bfa521e3d Author: Aditya Srivastava Date: Thu Jun 10 10:00:54 2021 +0800 iommu/vt-d: Fix kernel-doc syntax in file header The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/iommu/intel/pasid.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc: warning: Function parameter or member 'fmt' not described in 'pr_fmt' Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210523143245.19040-1-yashsri421@gmail.com Link: https://lore.kernel.org/r/20210610020115.1637656-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 05d2cbf969be465027d645f855419dbe49ded849 Author: Colin Ian King Date: Thu Jun 10 10:00:53 2021 +0800 iommu/vt-d: Remove redundant assignment to variable agaw The variable agaw is initialized with a value that is never read and it is being updated later with a new value as a counter in a for-loop. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210416171826.64091-1-colin.king@canonical.com Link: https://lore.kernel.org/r/20210610020115.1637656-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 800370b05b76c5a6111a97d6f41c9986a29e38a3 Merge: 762b296bcbbc7 9ab1428dfe2c6 Author: Greg Kroah-Hartman Date: Thu Jun 10 08:47:18 2021 +0200 Merge tag 'fsi-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi into char-misc-next Joel writes: FSI changes for v5.14 - Bug fixes for the OCC, SCOM and SBEFIFO drivers - Performance fix for aspeed fsi master - Small fixes from the mailing lists * tag 'fsi-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi: fsi/sbefifo: Fix reset timeout fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE fsi: master-ast-cf: Remove redundant error printing in fsi_master_acf_probe() fsi: Aspeed: Reduce poll timeout fsi: aspeed: convert to devm_platform_ioremap_resource hwmon: (occ) Print response status in first poll error message hwmon: (occ) Start sequence number at one fsi: occ: Log error for checksum failure fsi: occ: Don't accept response from un-initialized OCC fsi: scom: Remove retries fsi: scom: Reset the FSI2PIB engine for any error fsi: aspeed: Emit fewer barriers in opb operations fsi: core: Fix return of error values on failures fsi: Add missing MODULE_DEVICE_TABLE commit 49d3e5996155a3067782748b0c4edf0309e951b6 Author: Javed Hasan Date: Thu Jun 3 05:16:23 2021 -0700 scsi: fc: FDMI enhancement Added RHBA and RPA attributes type and length. As per FC_GC_7 document section "Table 400 – Attribute Entry Types and associated Values" ASCII type attributes length can be vary from "4 to 256 byte". If we keep all RHBA ASCII attributes length 256 then total length is going upto 2750, which is far more than 2048 (max frame size). In libfc we do have logic to split FCP commands but not for CT commands. Practically all version/names get covered with in 64 bytes except OS name, for that we need 128 bytes. Hence length of all RBHA ASCII attributes is reduced to 64 bytes and 128 bytes in case of OS name. RPA attributes total length is within frame size. Link: https://lore.kernel.org/r/20210603121623.10084-6-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 974db67a518b4f2ca690c29923abbbd9d5f1abfd Author: Javed Hasan Date: Thu Jun 3 05:16:22 2021 -0700 scsi: libfc: FDMI enhancements Add all the attributes for FDMI. Fall back mechanism is added in between FDMI V2 and FDMI V1 attributes. In case FDMI get fails for V2 attributes we fall back to V1 attributes. Link: https://lore.kernel.org/r/20210603121623.10084-5-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 82897fefab6811d006531cbc3a6aa03d23b8f8e3 Author: Javed Hasan Date: Thu Jun 3 05:16:21 2021 -0700 scsi: libfc: Add FDMI-2 attributes Add all attributes for RHBA and RPA registration. Fallback mechanism is added between RBHA V2 and RHBA V1 attributes. In case RHBA get fails for V2 attributes we fall back to V1 attribute registration. Link: https://lore.kernel.org/r/20210603121623.10084-4-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit adb98ec72b7213f39cf83dae41d6137da33bde5a Author: Javed Hasan Date: Thu Jun 3 05:16:20 2021 -0700 scsi: qedf: Add vendor identifier attribute Link: https://lore.kernel.org/r/20210603121623.10084-3-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 0726af6bfc6b9f82617da1b7002e33b38453a90e Author: Javed Hasan Date: Thu Jun 3 05:16:19 2021 -0700 scsi: libfc: Initialisation of RHBA and RPA attributes Initialize RHBA and RPA attributes. Link: https://lore.kernel.org/r/20210603121623.10084-2-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 8f70328c068f9f5c5db82848724cb276f657b9cd Author: Javed Hasan Date: Thu Jun 3 03:14:04 2021 -0700 scsi: libfc: Correct the condition check and invalid argument passed Incorrect condition check was leading to data corruption. Link: https://lore.kernel.org/r/20210603101404.7841-3-jhasan@marvell.com Fixes: 8fd9efca86d0 ("scsi: libfc: Work around -Warray-bounds warning") CC: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 40445fd2c9fa427297acdfcc2c573ff10493f209 Author: Javed Hasan Date: Thu Jun 3 03:14:03 2021 -0700 scsi: fc: Correct RHBA attributes length As per the FC-GS-5 specification, attribute lengths of node_name and manufacturer should in range of "4 to 64 Bytes" only. Link: https://lore.kernel.org/r/20210603101404.7841-2-jhasan@marvell.com Fixes: e721eb0616f6 ("scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions") CC: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit c707b73f0cfb1acc94a20389aecde65e6385349b Merge: a2098e857b765 2c1b1ac7084ed Author: Dave Airlie Date: Thu Jun 10 13:47:12 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-06-09: amdgpu: - SR-IOV fixes - Smartshift updates - GPUVM TLB flush updates - 16bpc fixed point display fix for DCE11 - BACO cleanups and core refactoring - Aldebaran updates - Initial Yellow Carp support - RAS fixes - PM API cleanup - DC visual confirm updates - DC DP MST fixes - DC DML fixes - Misc code cleanups and bug fixes amdkfd: - Initial Yellow Carp support radeon: - memcpy_to/from_io fixes UAPI: - Add Yellow Carp chip family id Used internally in the kernel driver and by mesa Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210610031649.4006-1-alexander.deucher@amd.com commit a2098e857b765bd39a9c67c81448f60d5c475846 Merge: 691cf8cd7a531 0d6695b112762 Author: Dave Airlie Date: Thu Jun 10 13:37:07 2021 +1000 Merge tag 'drm-intel-next-2021-06-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Cross-subsystem Changes: - x86/gpu: add JasperLake to gen11 early quirks (Although the patch lacks the Ack info, it has been Acked by Borislav) Driver Changes: - General DMC improves (Anusha) - More ADL-P enabling (Vandita, Matt, Jose, Mika, Anusha, Imre, Lucas, Jani, Manasi, Ville, Stanislav) - Introduce MBUS relative dbuf offset (Ville) - PSR fixes and improvements (Gwan, Jose, Ville) - Re-enable LTTPR non-transparent LT mode for DPCD_REV < 1.4 (Ville) - Remove duplicated declarations (Shaokun, Wan) - Check HDMI sink deep color capabilities during .mode_valid (Ville) - Fix display flicker screan related to console and FBC (Chris) - Remaining conversions of GRAPHICS_VER (Lucas) - Drop invalid FIXME (Jose) - Fix bigjoiner check in dsc_disable (Vandita) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YMEy2Ew82BeL/hDK@intel.com commit 691cf8cd7a531dbfcc29d09a23c509a86fd9b24f Author: Dave Airlie Date: Thu Jun 10 12:59:00 2021 +1000 drm/amdgpu: use correct rounding macro for 64-bit This fixes 32-bit arm build due to lack of 64-bit divides. Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated resources v2") Link: https://patchwork.freedesktop.org/patch/438442/ Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit e8a4d0daaef6fc8f965ca0b8e9585aa9698a0f24 Author: Luo Jiaxing Date: Mon Jun 7 17:29:39 2021 +0800 scsi: hisi_sas: Speed up error handling when internal abort timeout occurs If an internal task abort timeout occurs, the controller has developed a fault, and needs to be reset to be recovered. When this occurs during error handling, the current policy is to allow error handling to continue, and the inevitable nexus ha reset will handle the required reset. However various steps of error handling need to taken before this happens. These also involve some level of HW interaction, which will also fail with various timeouts. Speed up this process by recording a HW fault bit for an internal abort timeout - when this is set, just automatically error any HW interaction, and essentially go straight to clear nexus ha (to reset the controller). Link: https://lore.kernel.org/r/1623058179-80434-6-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 63ece9eb350312ee33327269480482dfac8555db Author: Luo Jiaxing Date: Mon Jun 7 17:29:38 2021 +0800 scsi: hisi_sas: Reset controller for internal abort timeout If an internal task abort timeout occurs, the controller has developed a fault, and needs to be reset to be recovered. However if a timeout occurs during SCSI error handling, issuing a controller reset immediately may conflict with the error handling. To handle internal abort in these two scenarios, only queue the reset when not in an error handling function. In the case of a timeout during error handling, do nothing and rely on the inevitable ha nexus reset to reset the controller. Link: https://lore.kernel.org/r/1623058179-80434-5-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2f12a499511f40c268d6dfa4bf7fbe2344d2e6d3 Author: Luo Jiaxing Date: Mon Jun 7 17:29:37 2021 +0800 scsi: hisi_sas: Include HZ in timer macros Include HZ in timer macros to make the code more concise. Link: https://lore.kernel.org/r/1623058179-80434-4-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 0f757339919d31533aeadbbfd62f2dd4a49e851f Author: Luo Jiaxing Date: Mon Jun 7 17:29:36 2021 +0800 scsi: hisi_sas: Run I_T nexus resets in parallel for clear nexus reset For a clear nexus reset operation, the I_T nexus resets are executed serially for each device. For devices attached through an expander, this may take 2s per device; so, in total, could take a long time. Reduce the total time by running the I_T nexus resets in parallel through async operations. Link: https://lore.kernel.org/r/1623058179-80434-3-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 366da0da1f5fe4e7e702f5864a557e57f485431f Author: Luo Jiaxing Date: Mon Jun 7 17:29:35 2021 +0800 scsi: hisi_sas: Put a limit of link reset retries If an OOB event is received but the phy still fails to come up, a link reset will be issued repeatedly at an interval of 20s until the phy comes up. Set a limit for link reset issue retries to avoid printing the timeout message endlessly. Link: https://lore.kernel.org/r/1623058179-80434-2-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit d1f2ce77638d681c1e34d597e432a3b28ce15c78 Author: Mike Christie Date: Wed Jun 9 14:27:09 2021 -0500 scsi: qedi: Fix host removal with running sessions qedi_clear_session_ctx() could race with the in-kernel or userspace driven recovery/removal and we could access a NULL conn or do a double free. We should be using iscsi_host_remove() to start the removal process from the driver. It will start the in-kernel recovery and notify userspace that the driver's scsi_hosts are being removed. iscsid will then drive the session removal like is done when the logout command is run. When the sessions are removed, iscsi_host_remove() will return so qedi can finish knowing there are no running sessions and no new sessions will be allowed. This also fixes an issue where we check for a NULL conn after already accessing it introduced in commit 27e986289e73 ("scsi: iscsi: Drop suspend calls from ep_disconnect") by just removing the function completely. Link: https://lore.kernel.org/r/20210609192709.5094-1-michael.christie@oracle.com Fixes: 27e986289e73 ("scsi: iscsi: Drop suspend calls from ep_disconnect") Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2938bedd0efa0964db563999b9b3b866b2d1a090 Author: Dan Carpenter Date: Wed Jun 9 12:27:14 2021 +0300 scsi: mpi3mr: Fix error handling in mpi3mr_setup_isr() The pci_alloc_irq_vectors_affinity() function returns negative error codes or it returns a number between the minimum vectors (1 in this case) and max_vectors. It won't return zero. Because "i" is a u16 then the error handling won't work. And also if it did work the error code was not set. Really "max_vectors" can be an int as well because we're doing a min_t() on int type. The other change is that it's better to remove unnecessary initialization so that static checkers can warn us if there are ever uninitialized variable bugs introduced in the future. I changed the error code from -1 (-EPERM) if the kmalloc() failed to -ENOMEM. And on success path I changed it from "return retval;" to "return 0;" which shouldn't affect the compiled code but makes it more readable. Link: https://lore.kernel.org/r/YMCJcnmSI4kOIyv/@mwanda Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit d46bdecd9f3cdf6c5e1beb5975b5dbf098c1a9f7 Author: Dan Carpenter Date: Wed Jun 9 12:26:02 2021 +0300 scsi: mpi3mr: Delete unnecessary NULL check The "mrioc->intr_info" pointer can't be NULL, but if it could then the second iteration through the loop would Oops. Let's delete the confusing and impossible NULL check. Link: https://lore.kernel.org/r/YMCJKgykDYtyvY44@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit d3d61f9c8c2dbe7e5e6736219afdf9965a7d241a Author: Tomas Henzl Date: Tue Jun 8 16:57:12 2021 +0200 scsi: mpi3mr: Fix a double free Fix a double free, scsi_tgt_priv_data will be freed in mpi3mr_target_destroy() so remove the kfree() from mpi3mr_target_alloc(). I've also removed few unneeded initialisations. Link: https://lore.kernel.org/r/20210608145712.16386-1-thenzl@redhat.com Acked-by: Kashyap Desai Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit eb783bb8bbe72f92947e42f2dbd3ea6185470295 Author: Can Guo Date: Wed Jun 9 01:24:00 2021 -0700 scsi: ufs: core: Fix a possible use before initialization case In ufshcd_exec_dev_cmd(), if error happens before lrpb is initialized, then we should bail out instead of letting trace record the error. Link: https://lore.kernel.org/r/1623227044-22635-1-git-send-email-cang@codeaurora.org Fixes: a45f937110fa ("scsi: ufs: Optimize host lock on transfer requests send/compl paths") Reported-by: kernel test robot Reviewed-by: Stanley Chu Reviewed-by: Nathan Chancellor Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 2c1b1ac7084edf477309d27c02d9da7f79b33cec Author: Alex Deucher Date: Mon Jun 7 16:19:46 2021 -0400 drm/amdgpu/vcn: drop gfxoff control for VCN2+ Drop disabling of gfxoff during VCN use. This allows gfxoff to kick in and potentially save power if the user is not using gfx for color space conversion or scaling. VCN1.0 had a bug which prevented it from working properly with gfxoff, so we disabled it while using VCN. That said, most apps today use gfx for scaling and color space conversion rather than overlay planes so it was generally in use anyway. This was fixed on VCN2+, but since we mostly use gfx for color space conversion and scaling and rapidly powering up/down gfx can negate the advantages of gfxoff, we left gfxoff disabled. As more applications use overlay planes for color space conversion and scaling, this starts to be a win, so go ahead and leave gfxoff enabled. Note that VCN1.0 uses vcn_v1_0_idle_work_handler() and vcn_v1_0_ring_begin_use() so they are not affected by this patch. Reviewed-by: James Zhu Acked-by: Christian König Reviewed-by: Boyuan Zhang Signed-off-by: Alex Deucher commit 9724fd5d9c2a0d3686b799ed5ca90cb9378ca4f2 Author: Vlad Buslov Date: Fri Apr 2 21:16:13 2021 +0300 net/mlx5: Bridge, add tracepoints Move private bridge structures to dedicated headers that is accessible to bridge tracepoint header. Implemented following tracepoints: - Initialize FDB entry. - Refresh FDB entry. - Cleanup FDB entry. - Create VLAN. - Cleanup VLAN. - Attach port to bridge. - Detach port from bridge. Usage example: ># cd /sys/kernel/debug/tracing ># echo mlx5:mlx5_esw_bridge_fdb_entry_init >> set_event ># cat trace ... kworker/u20:1-96 [001] .... 231.892503: mlx5_esw_bridge_fdb_entry_init: net_device=enp8s0f0_0 addr=e4:fd:05:08:00:02 vid=3 flags=0 lastuse=4294895695 Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit cc2987c44be5d188b0fdf5c07b65a5c952457ef9 Author: Vlad Buslov Date: Thu Mar 18 21:05:20 2021 +0200 net/mlx5: Bridge, filter tagged packets that didn't match tagged fg With support for pvid vlans in mlx5 bridge it is possible to have rules in untagged flow group when vlan filtering is enabled. However, such rules can also match tagged packets that didn't match anything in tagged flow group. Filter such packets by introducing additional flow group between tagged and untagged groups. When filtering is enabled on the bridge create additional flow in vlan filtering flow group and matches tagged packets with specified source MAC address and redirects them to new "skip" table. The skip table is new lowest-level empty table that is used to skip all further processing on packet in bridge priority. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 36e55079e54955a70b2c340eedd6125f794a911d Author: Vlad Buslov Date: Fri Apr 2 15:09:06 2021 +0300 net/mlx5: Bridge, support pvid and untagged vlan configurations Implement support for pushing vlan header into untagged packet on ingress of port that has pvid configured and support for popping vlan on egress of port that has the matching vlan configured as untagged. To support such configurations packet reformat contexts of {INSERT|REMOVE}_HEADER types are created per such vlan and saved to struct mlx5_esw_bridge_vlan which allows all FDB entries on particular vlan to share single packet reformat instance. When initializing FDB entries with pvid or untagged vlan type set its mlx5_flow_act->pkt_reformat action accordingly. Flush all flows when removing vlan from port. This is necessary because even though software bridge removes all FDB entries before removing their vlan, mlx5 bridge implementation deletes their corresponding flow entries from hardware in asynchronous workqueue task, which will cause firmware error if vlan packet reformat context is deleted before all flows that point to it. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit ffc89ee5e5e88aa5924034c28d5e5aae75229e0f Author: Vlad Buslov Date: Fri Mar 12 13:37:46 2021 +0200 net/mlx5: Bridge, match FDB entry vlan tag Add support for FDB vlan-tagged entries. Extend ingress and egress flow tables with flow groups to match packet vlan tag. Modify the flow creation code to include vlan tag, if vlan is configured on port and vlan configuration is supported for offload. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit d75b9e804858c8eee5549b821fd48e780d3bb871 Author: Vlad Buslov Date: Tue Mar 30 18:46:31 2021 +0300 net/mlx5: Bridge, implement infrastructure for vlans Establish all the necessary infrastructure for implementing vlan matching and vlan push/pop in following patches: - Add new per-vport struct mlx5_esw_bridge_port that is used to store metadata for all port vlans. Initialize and cleanup the instance of the structure when port representor is linked/unliked to bridge. Use xarray to allow quick vport metadata lookup by vport number. - Add new per-port-vlan struct mlx5_esw_bridge_vlan that is used to store vlan-specific data (vid, flags). Handle SWITCHDEV_PORT_OBJ_{ADD|DEL} switchdev blocking event for SWITCHDEV_OBJ_ID_PORT_VLAN object by creating/deleting the vlan structure and saving it in per-vport xarray for quick lookup. - Implement support for SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING object attribute that is used to toggle vlan filtering. Remove all FDB entries from hardware when vlan filtering state is changed. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit c636a0f0f3f0c6ef715d86118273aa6d62ccc69a Author: Vlad Buslov Date: Tue Mar 30 20:08:57 2021 +0300 net/mlx5: Bridge, dynamic entry ageing Dynamic FDB entries require capability to age out unused entries. Such entries are either aged out by kernel software bridge implementation or by hardware switch that offloaded them (and notified the kernel to mark them as SWITCHDEV_FDB_ADD_TO_BRIDGE). Leaving ageing to kernel bridge would result it deleting offloaded dynamic FDB entries every ageing_time period due to packets being processed by hardware and, consecutively, 'used' timestamp for FDB entry not being updated. However, since hardware doesn't support ageing, software solution inside the driver is required. In order to emulate hardware ageing in driver, extend bridge FDB ingress flows with counter and create delayed br_offloads->update_work task on bridge offloads workqueue. Run the task every second, update 'used' timestamp in software bridge dynamic entry by sending SWITCHDEV_FDB_ADD_TO_BRIDGE for the entry, if it flow hardware counter lastuse field was changed since last update. If lastuse wasn't changed for ageing_time period, then delete the FDB entry and notify kernel bridge by sending SWITCHDEV_FDB_DEL_TO_BRIDGE notification. Register blocking switchdev notifier callback and handle attribute set SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME event to allow user to dynamically configure bridge FDB entry ageing timeout. Save the value per-bridge in struct mlx5_esw_bridge. Silently ignore SWITCHDEV_ATTR_ID_PORT_{PRE_}BRIDGE_FLAGS switchdev event since mlx5 bridge implementation relies on software bridge for implementing necessary behavior for all of these flags. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 7cd6a54a828558c02ee2117eeba43593de54c448 Author: Vlad Buslov Date: Mon Jun 7 17:42:49 2021 +0300 net/mlx5: Bridge, handle FDB events Hardware supported by mlx5 driver doesn't provide learning and requires the driver to emulate all switch-like behavior in software. As such, all packets by default go through miss path, appear on representor and get to software bridge, if it is the upper device of the representor. This causes bridge to process packet in software, learn the MAC address to FDB and send SWITCHDEV_FDB_ADD_TO_DEVICE event to all subscribers. In order to offload FDB entries in mlx5, register switchdev notifier callback and implement support for both 'added_by_user' and dynamic FDB entry SWITCHDEV_FDB_ADD_TO_DEVICE events asynchronously using new mlx5_esw_bridge_offloads->wq ordered workqueue. In workqueue callback offload the ingress rule (matching FDB entry MAC as packet source MAC) and egress table rule (matching FDB entry MAC as destination MAC). For ingress table rule also match source vport to ensure that only traffic coming from expected bridge port is matched by offloaded rule. Save all the relevant FDB entry data in struct mlx5_esw_bridge_fdb_entry instance and insert the instance in new mlx5_esw_bridge->fdb_list list (for traversing all entries by software ageing implementation in following patch) and in new mlx5_esw_bridge->fdb_ht hash table for fast retrieval. Notify the bridge that FDB entry has been offloaded by sending SWITCHDEV_FDB_OFFLOADED notification. Delete FDB entry on reception of SWITCHDEV_FDB_DEL_TO_DEVICE event. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 19e9bfa044f32655f1c14e95784be93da34e103e Author: Vlad Buslov Date: Fri Apr 2 15:57:02 2021 +0300 net/mlx5: Bridge, add offload infrastructure Create new files bridge.{c|h} in en/rep directory that implement bridge interaction with representor netdevices and handle required events/notifications, bridge.{c|h} in esw directory that implement all necessary eswitch offloading infrastructure and works on vport/eswitch level. Provide new kconfig MLX5_BRIDGE which is automatically selected when both kernel bridge and mlx5 eswitch configs are enabled. Provide basic infrastructure for bridge offloads: - struct mlx5_esw_bridge_offloads - per-eswitch bridge offload structure that encapsulates generic bridge-offloads data (notifier blocks, ingress flow table/group, etc.) that is created/deleted on enable/disable eswitch offloads. - struct mlx5_esw_bridge - per-bridge structure that encapsulates per-bridge data (reference counter, FDB, egress flow table/group, etc.) that is created when first eswitch represetor is attached to new bridge and deleted when last representor is removed from the bridge as a result of NETDEV_CHANGEUPPER event. The bridge tables are created with new priority FDB_BR_OFFLOAD in FDB namespace. The new priority is between tc-miss and slow path priorities. Priority consist of two levels: the ingress table that is global per eswitch and matches incoming packets by src_mac/vid and redirects them to next level (egress table) that is chosen according to ingress port bridge membership and matches on dst_mac/vid in order to redirect packet to vport according to the following diagram: + | +---------v----------+ | | | FDB_TC_OFFLOAD | | | +---------+----------+ | | +---------v----------+ | | | FDB_FT_OFFLOAD | | | +---------+----------+ | | +---------v----------+ | | | FDB_TC_MISS | | | +---------+----------+ | +--------------------------------------+ | | | | +------+ | | | | | +------v--------+ FDB_BR_OFFLOAD | | | INGRESS_TABLE | | | +------+---+----+ | | | | match | | | +---------+ | | | | | +-------+ | | +-------v-------+ match | | | | | | EGRESS_TABLE +------------> vport | | | +-------+-------+ | | | | | | | +-------+ | | miss | | | +------+------+ | | | | +--------------------------------------+ | | +---------v----------+ | | | FDB_SLOW_PATH | | | +---------+----------+ | v Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 0781015288ec7c7b734f3b69bbf1816729481f13 Author: Vlad Buslov Date: Wed Apr 21 21:52:43 2021 +0300 net/mlx5e: Refactor mlx5e_eswitch_{*}rep() helpers Change the helper to functions to accept constant pointer to struct net_device. This is necessary for following patches in series that pass mlx5e_eswitch_rep() as a callback to kernel bridge infrastructure code. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit ec3be8873df3bf467ead27f7cedc896cbb2bd819 Author: Vlad Buslov Date: Thu Mar 4 13:09:53 2021 +0200 net/mlx5: Create TC-miss priority and table In order to adhere to kernel software datapath model bridge offloads must come after TC and NF FDBs. Following patches in this series add new FDB priority for bridge after FDB_FT_OFFLOAD. However, since netfilter offload is implemented with unmanaged tables, its miss path is not automatically connected to next priority and requires the code to manually connect with slow table. To keep bridge offloads encapsulated and not mix it with eswitch offloads, create a new FDB_TC_MISS priority between FDB_FT_OFFLOAD and FDB_SLOW_PATH: + | +---------v----------+ | | | FDB_TC_OFFLOAD | | | +---------+----------+ | | | +---------v----------+ | | | FDB_FT_OFFLOAD | | | +---------+----------+ | | | +---------v----------+ | | | FDB_TC_MISS | | | +---------+----------+ | | | +---------v----------+ | | | FDB_SLOW_PATH | | | +---------+----------+ | v Initialize the new priority with single default empty managed table and use the table as TC/NF miss patch instead of slow table. This approach allows bridge offloads to be created as new FDB namespace priority between FDB_TC_MISS and FDB_SLOW_PATH without exposing its internal tables to any other modules since miss path of managed TC-miss table is automatically wired to next priority. Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit ded6a877a3fcbafcbe32c69cfec13f2d86a8576b Author: Yevgeny Kliteynik Date: Sun Mar 14 03:08:28 2021 +0200 net/mlx5: DR, Support EMD tag in modify header for STEv1 Add support for EMD tag in modify header set/copy actions on device that supports STEv1. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 7ea9b39852fa5990fd8d0a981ca8d4457a14cdd3 Author: Yevgeny Kliteynik Date: Thu Jan 28 22:12:07 2021 +0200 net/mlx5: DR, Added support for INSERT_HEADER reformat type Add support for INSERT_HEADER packet reformat context type Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 3f3f05ab88722224fef5b0b78a0969f6b54f2cba Author: Yevgeny Kliteynik Date: Tue Mar 9 03:30:44 2021 +0200 net/mlx5: Added new parameters to reformat context Adding new reformat context type (INSERT_HEADER) requires adding two new parameters to reformat context - reformat_param_0 and reformat_param_1. As defined by HW spec, these parameters have different meaning for different reformat context type. The first parameter (reformat_param_0) is not new to HW spec, but it wasn't used by any of the supported reformats. The second parameter (reformat_param_1) is new to the HW spec - it was added to allow supporting INSERT_HEADER. For NSERT_HEADER, reformat_param_0 indicates the header used to reference the location of the inserted header, and reformat_param_1 indicates the offset of the inserted header from the reference point defined by reformat_param_0. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit d7418b4efa3bb1aff70d20f02455685c832c8ccb Author: Yevgeny Kliteynik Date: Wed Mar 10 04:38:06 2021 +0200 net/mlx5: DR, Allow encap action for RX for supporting devices Encap actions on RX flow were not supported on older devices. However, this is no longer the case in devices that support STEv1. This patch adds support for encap l3/l2 on RX flow for supported devices: update actions state machine by adding the newely supported transitions and add the required support in STEv0/1 files. The new transitions that are supported are: - from decap/modify-header/pop-vlan to encap - from encap to termination table Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 28de41a4ba7b5937b2338d8d8b58f5fda3641188 Author: Yevgeny Kliteynik Date: Wed Mar 10 04:12:28 2021 +0200 net/mlx5: DR, Split reformat state to Encap and Decap Split single reformat state into two separate states for encap and decap. This will allow adding actions to the specific domain, such as encap on RX. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 67133eaa93e810f5c510cd0ec6e2e7ca76fc1340 Author: Yevgeny Kliteynik Date: Tue Mar 9 03:29:16 2021 +0200 net/mlx5: mlx5_ifc support for header insert/remove Add support for HCA caps 2 that contains capabilities for the new insert/remove header actions. Added the required definitions for supporting the new reformat type: added packet reformat parameters, reformat anchors and definitions to allow copy/set into the inserted EMD (Embedded MetaData) tag. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Vlad Buslov Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 09b020bb05a514f560979438fa40406bc63d5353 Merge: 5745d647d5563 5b7a2c92b6102 Author: Dave Airlie Date: Thu Jun 10 11:03:50 2021 +1000 Merge tag 'drm-misc-next-2021-06-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.14: UAPI Changes: * drm/panfrost: Export AFBC_FEATURES register to userspace Cross-subsystem Changes: * dma-buf: Fix debug printing; Rename dma_resv_*() functions + changes in callers; Cleanups Core Changes: * Add prefetching memcpy for WC * Avoid circular dependency on CONFIG_FB * Cleanups * Documentation fixes throughout DRM * ttm: Make struct ttm_resource the base of all managers + changes in all users of TTM; Add a generic memcpy for page-based iomem; Remove use of VM_MIXEDMAP; Cleanups Driver Changes: * drm/bridge: Add TI SN65DSI83 and SN65DSI84 + DT bindings * drm/hyperv: Add DRM driver for HyperV graphics output * drm/msm: Fix module dependencies * drm/panel: KD53T133: Support rotation * drm/pl111: Fix module dependencies * drm/qxl: Fixes * drm/stm: Cleanups * drm/sun4i: Be explicit about format modifiers * drm/vc4: Use struct gpio_desc; Cleanups * drm/vgem: Cleanups * drm/vmwgfx: Use ttm_bo_move_null() if there's nothing to copy * fbdev/mach64: Cleanups * fbdev/mb862xx: Use DEVICE_ATTR_RO Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YMBw3DF2b9udByfT@linux-uq9g commit 40ba17afdfabb01688c61565dbe02a916241bc05 Author: Dan Williams Date: Wed Jun 9 09:43:29 2021 -0700 cxl/acpi: Introduce cxl_decoder objects A cxl_decoder is a child of a cxl_port. It represents a hardware decoder configuration of an upstream port to one or more of its downstream ports. The decoder is either represented in CXL standard HDM decoder registers (see CXL 2.0 section 8.2.5.12 CXL HDM Decoder Capability Structure), or it is a static decode configuration communicated by platform firmware (see the CXL Early Discovery Table: Fixed Memory Window Structure). The firmware described and hardware described decoders differ slightly leading to 2 different sub-types of decoders, cxl_decoder_root and cxl_decoder_switch. At the root level the decode capabilities restrict what can be mapped beneath them. Mid-level switch decoders are configured for either acclerator (type-2) or memory-expander (type-3) operation, but they are otherwise agnostic to the type of memory (volatile vs persistent) being mapped. Here is an example topology from a single-ported host-bridge environment without CFMWS decodes enumerated. /sys/bus/cxl/devices/root0 ├── devtype ├── dport0 -> ../../../LNXSYSTM:00/LNXSYBUS:00/ACPI0016:00 ├── port1 │   ├── decoder1.0 │   │   ├── devtype │   │   ├── locked │   │   ├── size │   │   ├── start │   │   ├── subsystem -> ../../../../../../bus/cxl │   │   ├── target_list │   │   ├── target_type │   │   └── uevent │   ├── devtype │   ├── dport0 -> ../../../../pci0000:34/0000:34:00.0 │   ├── subsystem -> ../../../../../bus/cxl │   ├── uevent │   └── uport -> ../../../../LNXSYSTM:00/LNXSYBUS:00/ACPI0016:00 ├── subsystem -> ../../../../bus/cxl ├── uevent └── uport -> ../../ACPI0017:00 Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162325695128.2293823.17519927266014762694.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 3b94ce7b7bc1b436465a93f19a50e0b495b429a1 Author: Dan Williams Date: Wed Jun 9 09:01:51 2021 -0700 cxl/acpi: Enumerate host bridge root ports While the resources enumerated by the CEDT.CFMWS identify a cxl_port with host bridges as downstream ports, host bridges themselves are upstream ports that decode to downstream ports represented by PCIe Root Ports. Walk the PCIe Root Ports connected to a CXL Host Bridge, identified by the ACPI0016 _HID, and add each one as a cxl_dport of the host bridge cxl_port. For now, component registers are not enumerated, only the first order uport / dport relationships. Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162325451145.2293126.10149150938788969381.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 7d4b5ca2e2cb5d28db628ec79c706bcfa832feea Author: Dan Williams Date: Wed Jun 9 09:01:46 2021 -0700 cxl/acpi: Add downstream port data to cxl_port instances In preparation for infrastructure that enumerates and configures the CXL decode mechanism of an upstream port to its downstream ports, add a representation of a CXL downstream port. On ACPI systems the top-most logical downstream ports in the hierarchy are the host bridges (ACPI0016 devices) that decode the memory windows described by the CXL Early Discovery Table Fixed Memory Window Structures (CEDT.CFMWS). Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/162325450624.2293126.3533006409920271718.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 3feaa2d35880de935fc0d02acf808f355564f4e6 Author: Dan Williams Date: Wed Jun 9 09:01:41 2021 -0700 cxl/Kconfig: Default drivers to CONFIG_CXL_BUS CONFIG_CXL_BUS is default 'n' as expected for new functionality. When that is enabled do not make the end user hunt for all the expected sub-options to enable. For example CONFIG_CXL_BUS without CONFIG_CXL_MEM is an odd/expert configuration, so is CONFIG_CXL_MEM without CONFIG_CXL_ACPI (on ACPI capable platforms). Default CONFIG_CXL_MEM and CONFIG_CXL_ACPI to CONFIG_CXL_BUS. Acked-by: Ben Widawsky Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/162325450105.2293126.17046356425194082921.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 4812be97c015bddf12c70155858df43acc35a4eb Author: Dan Williams Date: Wed Jun 9 09:01:35 2021 -0700 cxl/acpi: Introduce the root of a cxl_port topology While CXL builds upon the PCI software model for enumeration and endpoint control, a static platform component is required to bootstrap the CXL memory layout. Similar to how ACPI identifies root-level PCI memory resources, ACPI data enumerates the address space and interleave configuration for CXL Memory. In addition to identifying host bridges, ACPI is responsible for enumerating the CXL memory space that can be addressed by downstream decoders. This is similar to the requirement for ACPI to publish resources via the _CRS method for PCI host bridges. Specifically, ACPI publishes a table, CXL Early Discovery Table (CEDT), which includes a list of CXL Memory resources, CXL Fixed Memory Window Structures (CFMWS). For now, introduce the core infrastructure for a cxl_port hierarchy starting with a root level anchor represented by the ACPI0017 device. Follow on changes model support for the configurable decode capabilities of cxl_port instances, i.e. CXL switch support. Co-developed-by: Alison Schofield Signed-off-by: Alison Schofield Acked-by: Rafael J. Wysocki Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162325449515.2293126.15303270193010154608.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 0d155170d6eebbd6c50e16bc928c31b3f5473025 Merge: ab324d8dfddad 6857b02392ab8 Author: David S. Miller Date: Wed Jun 9 15:59:34 2021 -0700 Merge branch 'ipa-mem-1' Alex Elder says: ==================== net: ipa: memory region rework, part 1 This is the first portion of a very long series of patches that has been split in two. Once these patches are accepted, I'll post the remaining patches. The combined series reworks the way memory regions are defined in the configuration data, and in the process solidifies code that ensures configurations are valid. In this portion (part 1), most of the focus is on improving validation of code. This validation is now done unconditionally (something I promised Leon Romanovsky I would work on). Validation will occur earlier than before, catching configuration problems as early as possible and permitting the rest of the driver to avoid needing to do some error checking. There will now be checks to ensure all defined regions are supported by the hardware, that required regions are all defined, and that there are no duplicate regions. The second portion (part 2) is mainly a set of small but pervasive changes whose result is to have the memory region array not be indexed by region ID. I'll provide further explanation when I post that series. ==================== Signed-off-by: David S. Miller commit 6857b02392ab89ffc4235de991b544ef22375e6e Author: Alex Elder Date: Wed Jun 9 17:35:03 2021 -0500 net: ipa: use bitmap to check for missing regions In ipa_mem_valid(), wait until regions have been marked in the memory region bitmap, and check all that are not found there to ensure they are not required. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit eadf7f9376145a2827010f1775570cfe009afc70 Author: Alex Elder Date: Wed Jun 9 17:35:02 2021 -0500 net: ipa: flag duplicate memory regions Add a test in ipa_mem_valid() to ensure no memory region is defined more than once, using a bitmap to record each defined memory region. Skip over undefined regions when checking (we can have any number of those). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 75bcfde6c1131371adc2388b9226db7b2465e4c1 Author: Alex Elder Date: Wed Jun 9 17:35:01 2021 -0500 net: ipa: validate memory regions based on version Introduce ipa_mem_id_valid(), and use it to check defined memory regions to ensure they are valid for a given version of IPA. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d39ffb97079b3f97f4f9d7cc633c78a1f69d3264 Author: Alex Elder Date: Wed Jun 9 17:35:00 2021 -0500 net: ipa: introduce ipa_mem_id_optional() Introduce a new function that indicates whether a given memory region is required for a given version of IPA hardware. Use it to verify that all required regions are present during initialization. Reorder the definitions of the memory region IDs to be based on the version in which they're first defined. Use "+" rather than "and above" where defining the IPA versions in which memory IDs are used, and indicate which regions are optional (many are not). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1eec767746e5fe4e4376ad511558de3c77f49d82 Author: Alex Elder Date: Wed Jun 9 17:34:59 2021 -0500 net: ipa: pass memory configuration data to ipa_mem_valid() Pass the memory configuration data array to ipa_mem_valid() for validation, and use that rather than assuming it's already been recorded in the IPA structure. Move the memory data array size check into ipa_mem_valid(). Call ipa_mem_valid() early in ipa_mem_init(), and only proceed with assigning the memory array pointer and size if it is found to be valid. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 2f9be1e90860e8acb43dc164e25c0d0be60f6a7b Author: Alex Elder Date: Wed Jun 9 17:34:58 2021 -0500 net: ipa: validate memory regions at init time Move the memory region validation check so it happens earlier when initializing the driver, at init time rather than config time (i.e., before access to hardware is required). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 5e57c6c5a349ed8026e63c9ef70e4655fe171b09 Author: Alex Elder Date: Wed Jun 9 17:34:57 2021 -0500 net: ipa: separate region range check from other validation The only thing done by ipa_mem_valid_one() that requires hardware access is the check for whether all regions fit within the size of IPA local memory specified by an IPA register. Introduce ipa_mem_size_valid() to implement this verification and stop doing so in ipa_mem_valid_one(). Call the new function from ipa_mem_config() (which is also the caller of ipa_mem_valid()). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 98334d2a3ba4c79947650710ac06434e25824a35 Author: Alex Elder Date: Wed Jun 9 17:34:56 2021 -0500 net: ipa: separate memory validation from initialization Currently, memory regions are validated in the loop that initializes them. Instead, validate them separately. Rename ipa_mem_valid() to be ipa_mem_valid_one(). Define a *new* function named ipa_mem_valid() that performs validation of the array of memory regions provided. This function calls ipa_mem_valid_one() for each region in turn. Skip validation for any "empty" region descriptors, which have zero size and are not preceded by any canary values. Issue a warning for such descriptors if the offset is non-zero. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 0300df2d9d249c3dd8e0ad1b7dd5b7da1b8d0e37 Author: Alex Elder Date: Wed Jun 9 17:34:55 2021 -0500 net: ipa: validate memory regions unconditionally Do memory region descriptor validation unconditionally, rather than having it depend on IPA_VALIDATION being defined. Pass the address of a memory region descriptor rather than a memory ID to ipa_mem_valid(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 14ab6a208c11dcb7b91fda3e0866c7e6188dc553 Author: Alex Elder Date: Wed Jun 9 17:34:54 2021 -0500 net: ipa: store memory region id in descriptor Store the memory region ID in the memory descriptor structure. This is a move toward *not* indexing the array by the ID, but for now we must still specify those index values. Define an explicitly undefined region ID, value 0, so uninitialized entries in the array won't use an otherwise valid ID. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit f636a83662ffdc3e05526770e73628485f4a53de Author: Alex Elder Date: Wed Jun 9 17:34:53 2021 -0500 net: ipa: define IPA_MEM_END_MARKER Define a new pseudo memory region identifer that specifies the offset at the end of IPA resident memory. Use it instead of IPA_MEM_UC_EVENT_RING in places where the size of that region was defined to be 0. The size of the IPA_MEM_END_MARKER pseudo region must be zero. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ab324d8dfddad04bec0e8421242716504e31e204 Author: Colin Ian King Date: Wed Jun 9 18:43:53 2021 +0100 net: dsa: sja1105: Fix assigned yet unused return code rc The return code variable rc is being set to return error values in two places in sja1105_mdiobus_base_tx_register and yet it is not being returned, the function always returns 0 instead. Fix this by replacing the return 0 with the return code rc. Addresses-Coverity: ("Unused value") Fixes: 5a8f09748ee7 ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX") Signed-off-by: Colin Ian King Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4744bf072b4640c5e2ea65c2361ad6c832f28fa8 Author: Matteo Croce Date: Wed Jun 9 19:23:03 2021 +0200 stmmac: prefetch right address To support XDP, a headroom is prepended to the packet data. Consider this offset when doing a prefetch. Fixes: da5ec7f22a0f ("net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit f3b5a8907543e2c539d09d01a1732826e070d351 Author: Colin Ian King Date: Wed Jun 9 18:56:57 2021 +0100 mlxsw: thermal: Fix null dereference of NULL temperature parameter The call to mlxsw_thermal_module_temp_and_thresholds_get passes a NULL pointer for the temperature and this can be dereferenced in this function if the mlxsw_reg_query call fails. The simplist fix is to pass the address of dummy temperature variable instead of a NULL pointer. Addresses-Coverity: ("Explicit null dereferenced") Fixes: 72a64c2fe9d8 ("mlxsw: thermal: Read module temperature thresholds using MTMP register") Signed-off-by: Colin Ian King Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 8b8701d0b4925807a6d4dc4699cb80a1e16218ad Author: Kristian Evensen Date: Wed Jun 9 16:32:49 2021 +0200 net: ethernet: rmnet: Always subtract MAP header Commit e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5 checksum offload") broke ingress handling for devices where RMNET_FLAGS_INGRESS_MAP_CKSUMV5 or RMNET_FLAGS_INGRESS_MAP_CKSUMV4 are not set. Unless either of these flags are set, the MAP header is not removed. This commit restores the original logic by ensuring that the MAP header is removed for all MAP packets. Fixes: e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5 checksum offload") Signed-off-by: Kristian Evensen Signed-off-by: David S. Miller commit 6fb566c9278a2ea65a12fdff665bead392f4c0d2 Author: Wei Yongjun Date: Wed Jun 9 14:25:06 2021 +0000 net: ena: make symbol 'ena_alloc_map_page' static The sparse tool complains as follows: drivers/net/ethernet/amazon/ena/ena_netdev.c:978:13: warning: symbol 'ena_alloc_map_page' was not declared. Should it be static? This symbol is not used outside of ena_netdev.c, so marks it static. Fixes: 947c54c395cb ("net: ena: Use dev_alloc() in RX buffer allocation") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit f25247d88708ff0666573541923a7339845403de Author: Colin Ian King Date: Wed Jun 9 18:17:48 2021 +0100 net: phy: realtek: net: Fix less than zero comparison of a u16 The comparisons of the u16 values priv->phycr1 and priv->phycr2 to less than zero always false because they are unsigned. Fix this by using an int for the assignment and less than zero check. Addresses-Coverity: ("Unsigned compared against 0") Fixes: 0a4355c2b7f8 ("net: phy: realtek: add dt property to disable CLKOUT clock") Fixes: d90db36a9e74 ("net: phy: realtek: add dt property to enable ALDPS mode") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 345502af4e42cef57782118520c3c326b55f1071 Author: Colin Ian King Date: Wed Jun 9 18:05:12 2021 +0100 net: stmmac: Fix missing { } around two statements in an if statement There are missing { } around a block of code on an if statement. Fix this by adding them in. Addresses-Coverity: ("Nesting level does not match indentation") Fixes: 46682cb86a37 ("net: stmmac: enable Intel mGbE 2.5Gbps link speed") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit ba539319cce68e670bfc16571da89066046719e2 Author: Yang Yingliang Date: Wed Jun 9 21:51:38 2021 +0800 net: ethernet: ti: cpsw-phy-sel: Use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 0f00658d737813ec1edba9e580fa905035e7c710 Merge: e77e2cf4a198a 2f128eb3308a7 Author: David S. Miller Date: Wed Jun 9 15:26:50 2021 -0700 Merge branch 'mvpp2-prefetch' Matteo Croce says: ==================== mvpp2: prefetch data early These two patches prefetch some data from RAM so to reduce stall and speedup the packet processing. ==================== Signed-off-by: David S. Miller commit 2f128eb3308a74ef478286b75e26aa6d0ed3c6a6 Author: Matteo Croce Date: Wed Jun 9 15:47:14 2021 +0200 mvpp2: prefetch page Most of the time during the RX is caused by the compound_head() call done at the end of the RX loop: │ build_skb(): [...] │ static inline struct page *compound_head(struct page *page) │ { │ unsigned long head = READ_ONCE(page->compound_head); 65.23 │ ldr x2, [x1, #8] Prefetch the page struct as soon as possible, to speedup the RX path noticeabily by a ~3-4% packet rate in a drop test. │ build_skb(): [...] │ static inline struct page *compound_head(struct page *page) │ { │ unsigned long head = READ_ONCE(page->compound_head); 17.92 │ ldr x2, [x1, #8] Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit d8ea89fe8a49bfa18b009b16b66c137dba263f87 Author: Matteo Croce Date: Wed Jun 9 15:47:13 2021 +0200 mvpp2: prefetch right address In the RX buffer, the received data starts after a headroom used to align the IP header and to allow prepending headers efficiently. The prefetch() should take this into account, and prefetch from the very start of the received data. We can see that ether_addr_equal_64bits(), which is the first function to access the data, drops from the top of the perf top output. prefetch(data): Overhead Shared Object Symbol 11.64% [kernel] [k] eth_type_trans prefetch(data + MVPP2_MH_SIZE + MVPP2_SKB_HEADROOM): Overhead Shared Object Symbol 13.42% [kernel] [k] build_skb 10.35% [mvpp2] [k] mvpp2_rx 9.35% [kernel] [k] __netif_receive_skb_core 8.24% [kernel] [k] kmem_cache_free 7.97% [kernel] [k] dev_gro_receive 7.68% [kernel] [k] page_pool_put_page 7.32% [kernel] [k] kmem_cache_alloc 7.09% [mvpp2] [k] mvpp2_bm_pool_put 3.36% [kernel] [k] eth_type_trans Also, move the eth_type_trans() call a bit down, to give the RAM more time to prefetch the data. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit e77e2cf4a198a3eb0fc25c13bbbbe07afb74079f Author: Yang Yingliang Date: Wed Jun 9 21:45:37 2021 +0800 net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 3a5a32b5f2c1c7a1657a44bb9bc571f0df1d5a81 Author: Yang Yingliang Date: Wed Jun 9 21:36:55 2021 +0800 net: stmmac: Use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit db8f7be1e1d64fbf113a456ef94534fbf5e9a9af Author: Yang Yingliang Date: Wed Jun 9 21:25:15 2021 +0800 net: sgi: ioc3-eth: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit daf6e8c9caa0955e8d190a606b1bacf9a903d3c1 Author: Shai Malin Date: Wed Jun 9 13:49:18 2021 +0300 Revert "nvme-tcp-offload: ULP Series" This reverts commits: - 762411542050dbe27c7c96f13c57f93da5d9b89a nvme: NVME_TCP_OFFLOAD should not default to m - 5ff5622ea1f16d535f1be4e478e712ef48fe183b: Merge branch 'NVMeTCP-Offload-ULP' As requested on the mailing-list: https://lore.kernel.org/netdev/SJ0PR18MB3882C20793EA35A3E8DAE300CC379@SJ0PR18MB3882.namprd18.prod.outlook.com/ This patch will revert the nvme-tcp-offload ULP from net-next. The nvme-tcp-offload ULP series will continue to be considered only on linux-nvme@lists.infradead.org. Signed-off-by: Prabhakar Kushwaha Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Signed-off-by: David S. Miller commit c6be5a22fde5f5cbcef3e1473efbeb312aed1f0e Author: Colin Ian King Date: Wed Jun 9 11:24:48 2021 +0100 net: usb: asix: ax88772: Fix less than zero comparison of a u16 The comparison of the u16 priv->phy_addr < 0 is always false because phy_addr is unsigned. Fix this by assigning the return from the call to function asix_read_phy_addr to int ret and using this for the less than zero error check comparison. Fixes: 7e88b11a862a ("net: usb: asix: refactor asix_read_phy_addr() and handle errors on return") Addresses-Coverity: ("Unsigned compared against 0") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit e67665946599abe0ae8d454ceb6bad4b1d1d6189 Author: Colin Ian King Date: Wed Jun 9 11:24:47 2021 +0100 net: usb: asix: Fix less than zero comparison of a u16 The comparison of the u16 priv->phy_addr < 0 is always false because phy_addr is unsigned. Fix this by assigning the return from the call to function asix_read_phy_addr to int ret and using this for the less than zero error check comparison. Addresses-Coverity: ("Unsigned compared against 0") Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 7f3579e1893f66edef95a0436a4e10073d085fda Merge: 4e744cb8126de c5c6accd7b7e1 Author: David S. Miller Date: Wed Jun 9 14:50:35 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Add nfgenmsg field to nfnetlink's struct nfnl_info and use it. 2) Remove nft_ctx_init_from_elemattr() and nft_ctx_init_from_setattr() helper functions. 3) Add the nf_ct_pernet() helper function to fetch the conntrack pernetns data area. 4) Expose TCP and UDP flowtable offload timeouts through sysctl, from Oz Shlomo. 5) Add nfnetlink_hook subsystem to fetch the netfilter hook pipeline configuration, from Florian Westphal. This also includes a new field to annotate the hook type as metadata. 6) Fix unsafe memory access to non-linear skbuff in the new SCTP chunk support for nft_exthdr, from Phil Sutter. ==================== Signed-off-by: David S. Miller commit 4e744cb8126deac52257219fad754614a61989da Author: Dan Carpenter Date: Wed Jun 9 12:56:45 2021 +0300 netdevsim: delete unnecessary debugfs checking In normal situations where the driver doesn't dereference "nsim_node->ddir" or "nsim_node->rate_parent" itself then we are not supposed to check the return from debugfs functions. In the case of debugfs_create_dir() the check was wrong as well because it doesn't return NULL, it returns error pointers. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 711d1dee1c86294b43e33202fb1eabd7e524ed9a Author: Dan Carpenter Date: Wed Jun 9 12:54:31 2021 +0300 devlink: Fix error message in devlink_rate_set_ops_supported() The WARN_ON() macro takes a condition, it doesn't take a message. Use WARN() instead. Fixes: 1897db2ec310 ("devlink: Allow setting tx rate for devlink rate leaf objects") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 3d0167f2a627528032821cdeb78b4eab0510460f Author: Dan Carpenter Date: Wed Jun 9 12:53:03 2021 +0300 net: dsa: qca8k: check the correct variable in qca8k_set_mac_eee() This code check "reg" but "ret" was intended so the error handling will never trigger. Fixes: 7c9896e37807 ("net: dsa: qca8k: check return value of read functions correctly") Signed-off-by: Dan Carpenter Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit aa3d020b22cb844ab7bdbb9e5d861a64666e2b74 Author: Dan Carpenter Date: Wed Jun 9 12:52:12 2021 +0300 net: dsa: qca8k: fix an endian bug in qca8k_get_ethtool_stats() The "hi" variable is a u64 but the qca8k_read() writes to the top 32 bits of it. That will work on little endian systems but it's a bit subtle. It's cleaner to make declare "hi" as a u32. We will still need to cast it when we shift it later on in the function but that's fine. Fixes: 7c9896e37807 ("net: dsa: qca8k: check return value of read functions correctly") Signed-off-by: Dan Carpenter Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit dac8115290fe3787c1ce3502d46ee4f5e33036b8 Merge: 4724acc47c944 63a2bb15fe594 Author: David S. Miller Date: Wed Jun 9 14:02:58 2021 -0700 Merge branch 'lapbther-cleanups' Peng Li says: ==================== net: lapbether: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 63a2bb15fe594f328ee1535f3f13e10f863c4c8e Author: Peng Li Date: Wed Jun 9 17:39:55 2021 +0800 net: lapbether: fix the code style issue about line length According to the chackpatch.pl, line length of 123 exceeds 100 columns, so fix it. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit c564c049a34f94b1a4dbe02332b529a6bcb25496 Author: Peng Li Date: Wed Jun 9 17:39:54 2021 +0800 net: lapbether: fix the alignment issue Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit d49859601d72baef143703c6944a4e41921f7e6e Author: Peng Li Date: Wed Jun 9 17:39:53 2021 +0800 net: lapbether: replace comparison to NULL with "lapbeth_get_x25_dev" According to the chackpatch.pl, comparison to NULL could be written "lapbeth_get_x25_dev". Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 4f9893c762f8a22df77ed2e4c149ad943c1eaf08 Author: Peng Li Date: Wed Jun 9 17:39:52 2021 +0800 net: lapbether: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d5e686e8b66d513833e350ab776a8052b0f2ba9e Author: Peng Li Date: Wed Jun 9 17:39:51 2021 +0800 net: lapbether: remove unnecessary out of memory message This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 2e350780ae4f2be8a2525929b6c69c2dd9591a20 Author: Peng Li Date: Wed Jun 9 17:39:50 2021 +0800 net: lapbether: remove trailing whitespaces This patch removes trailing whitespaces. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit a61bebc774cbc6595ca32a8ef69e6fe3289ebb33 Author: Peng Li Date: Wed Jun 9 17:39:49 2021 +0800 net: lapbether: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 5bc5f5f27b89fd029515a305caaaf40b77c63c76 Author: Peng Li Date: Wed Jun 9 17:39:48 2021 +0800 net: lapbether: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit eff57ab52cc4bcdca095a5a129bc0912a402af11 Author: Peng Li Date: Wed Jun 9 17:39:47 2021 +0800 net: lapbether: remove redundant blank line This patch the redundant blank line. Signed-off-by: Peng Li Signed-off-by: David S. Miller commit 4724acc47c9441ec1e131299853d1a9e8c3fb2cd Author: Baokun Li Date: Wed Jun 9 15:20:56 2021 +0800 net: hns3: use list_move_tail instead of list_del/list_add_tail in hclge_main.c Using list_move_tail() instead of list_del() + list_add_tail() in hclge_main.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: David S. Miller commit 49768ce98c2c1766619dfd6d157dd87826738fa7 Author: Baokun Li Date: Wed Jun 9 15:17:20 2021 +0800 net: hns3: use list_move_tail instead of list_del/list_add_tail in hclgevf_main.c Using list_move_tail() instead of list_del() + list_add_tail() in hclgevf_main.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Signed-off-by: David S. Miller commit 39c3783ec062231b6befc193742161af33e17d88 Author: Baokun Li Date: Wed Jun 9 15:09:21 2021 +0800 nfp: use list_move instead of list_del/list_add in nfp_cppcore.c Using list_move() instead of list_del() + list_add() in nfp_cppcore.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit db67f2493431c32935e5b239175df4b0b9cf0171 Author: gushengxian Date: Tue Jun 8 20:03:17 2021 -0700 net/x25: fix a mistake in grammar Fix a mistake in grammar. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit e89a2cdb1cca513a3f431c9f404fe220dfbf949c Author: Yang Yingliang Date: Wed Jun 9 09:24:44 2021 +0800 net: ethernet: ravb: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 2c32a3d3c233b855943677609fe388f82b1f0975 Author: Florian Fainelli Date: Tue Jun 8 14:22:04 2021 -0700 net: dsa: b53: Do not force CPU to be always tagged Commit ca8931948344 ("net: dsa: b53: Keep CPU port as tagged in all VLANs") forced the CPU port to be always tagged in any VLAN membership. This was necessary back then because we did not support Broadcom tags for all configurations so the only way to differentiate tagged and untagged traffic while DSA_TAG_PROTO_NONE was used was to force the CPU port into being always tagged. With most configurations enabling Broadcom tags, especially after 8fab459e69ab ("net: dsa: b53: Enable Broadcom tags for 531x5/539x families") we do not need to apply this unconditional force tagging of the CPU port in all VLANs. A helper function is introduced to faciliate the encapsulation of the specific condition requiring the CPU port to be tagged in all VLANs and the dsa_switch_ops::untag_bridge_pvid boolean is moved to when dsa_switch_ops::setup is called when we have already determined the tagging protocol we will be using. Reported-by: Matthew Hagan Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Matthew Hagan Signed-off-by: David S. Miller commit e6148fe791071a091fe7fd8bc1d99ccc4958c70e Author: Hans de Goede Date: Sun May 23 19:01:03 2021 +0200 iio: accel: bmc150: Set label based on accel-location for ACPI DUAL250E fwnodes Some Yoga laptops with 1 accelerometer in the display and 1 in the base, use an ACPI HID of DUAL250E instead of BOSC0200. Set the iio-device's label for DUAL250E devices to a value indicating which sensor is which, mirroring how we do this for BOSC0200 dual sensor devices. Note the DUAL250E fwnode unfortunately does not include a mount-matrix. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-10-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 61ddd0a75d14311b0c4d5de06bec7afeb8b21612 Author: Hans de Goede Date: Sun May 23 19:01:02 2021 +0200 iio: accel: bmc150: Refactor bmc150_apply_acpi_orientation() Factor the BOSC0200 ACPI HID handling out into a new bmc150_apply_bosc0200_acpi_orientation() function and make bmc150_apply_acpi_orientation() call that when dealing with a BOSC0200 ACPI device (and make it return false otherwise). This is a preparation patch for adding special handling for other ACPI HIDs (the "DUAL250E" HID). Suggested-by: Andy Shevchenko Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-9-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit addab6febc42ed94e4eee1abbe486150e4f8b9e9 Author: Hans de Goede Date: Sun May 23 19:01:01 2021 +0200 iio: accel: bmc150: Add support for DUAL250E ACPI DSM for setting the hinge angle Some 360 degree hinges (yoga) style 2-in-1 devices use 2 bmc150 accels to allow the OS to determine the angle between the display and the base of the device, so that the OS can determine if the 2-in-1 is in laptop or in tablet-mode. On Windows both accelerometers are read (polled) by a special service and this service calls the DSM (Device Specific Method), which in turn translates the angles to one of laptop/tablet/tent/stand mode and then notifies the EC about the new mode and the EC then enables or disables the builtin keyboard and touchpad based in the mode. When the 2-in-1 is powered-on or resumed folded in tablet mode the EC senses this independent of the DSM by using a HALL effect sensor which senses that the keyboard has been folded away behind the display. At power-on or resume the EC disables the keyboard based on this and the only way to get the keyboard to work after this is to call the DSM to re-enable it. Call the DSM on probe() and resume() to fix the keyboard not working when powered-on / resumed in tablet-mode. This patch was developed and tested on a Lenovo Yoga 300-IBR. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-8-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 35157f443b6f4537b03ea1752bd96fbb28ec7a4f Author: Hans de Goede Date: Sun May 23 19:01:00 2021 +0200 iio: accel: bmc150: Remove bmc150_set/get_second_device() accessor functions Now that the definition of the bmc150_accel_data struct is no longer private to bmc150-accel-core.c, bmc150-accel-i2c.c can simply directly access the second_dev member and the accessor functions are no longer necessary. Note if the i2c_acpi_new_device() for the second-client now fails, an ERR_PTR gets stored in data->second_dev this is fine since it is only ever passed to i2c_unregister_device() which has an IS_ERR_OR_NULL() check. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-7-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit ba8bd0b33b7bd4f250ff538dce67292ee2db1434 Author: Hans de Goede Date: Sun May 23 19:00:59 2021 +0200 iio: accel: bmc150: Move struct bmc150_accel_data definition to bmc150-accel.h Further patches to bmc150-accel-i2c.c need to store some extra info (on top of the second_dev pointer) in the bmc150_accel_data struct, rather then adding yet more accessor functions for this lets just move the struct bmc150_accel_data definition to bmc150-accel.h. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-6-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 3aac11a7c2d1c6b165945893bdee43ea359d3e4f Author: Hans de Goede Date: Sun May 23 19:00:58 2021 +0200 iio: accel: bmc150: Add support for dual-accelerometers with a DUAL250E HID The Lenovo Yoga 300-11IBR has a ACPI fwnode with a HID of DUAL250E which contains I2C and IRQ resources for 2 accelerometers, 1 in the display and one in the base of the device. Add support for this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-5-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 42d1c1dc0f91cae51781b4c5ccdb26989d7521dc Author: Hans de Goede Date: Sun May 23 19:00:57 2021 +0200 iio: accel: bmc150: Move check for second ACPI device into a separate function Move the check for a second ACPI device for BOSC0200 ACPI fwnodes into a new bmc150_acpi_dual_accel_probe() helper function. This is a preparation patch for adding support for a new "DUAL250E" ACPI Hardware-ID (HID) used on some devices. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210523170103.176958-4-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit f407e2dca0f559621114eeaf657880d83f237fbd Author: Hans de Goede Date: Sun May 23 19:00:56 2021 +0200 iio: accel: bmc150: Don't make the remove function of the second accelerometer unregister itself On machines with dual accelerometers described in a single ACPI fwnode, the bmc150_accel_probe() instantiates a second i2c-client for the second accelerometer. A pointer to this manually instantiated second i2c-client is stored inside the iio_dev's private-data through bmc150_set_second_device(), so that the i2c-client can be unregistered from bmc150_accel_remove(). Before this commit bmc150_set_second_device() took only 1 argument so it would store the pointer in private-data of the iio_dev belonging to the manually instantiated i2c-client, leading to the bmc150_accel_remove() call for the second_dev trying to unregister *itself* while it was being removed, leading to a deadlock and rmmod hanging. Change bmc150_set_second_device() to take 2 arguments: 1. The i2c-client which is instantiating the second i2c-client for the 2nd accelerometer and 2. The second-device pointer itself (which also is an i2c-client). This will store the second_device pointer in the private data of the iio_dev belonging to the (ACPI instantiated) i2c-client for the first accelerometer and will make bmc150_accel_remove() unregister the second_device i2c-client when called for the first client, avoiding the deadlock. Fixes: 5bfb3a4bd8f6 ("iio: accel: bmc150: Check for a second ACPI device for BOSC0200") Cc: Jeremy Cline Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Cc: Signed-off-by: Jonathan Cameron commit f2bf22dc9ea8ead180fc0221874bd556bf1d2685 Author: Hans de Goede Date: Sun May 23 19:00:55 2021 +0200 iio: accel: bmc150: Fix dereferencing the wrong pointer in bmc150_get/set_second_device The drvdata for iio-parent devices points to the struct iio_dev for the iio-device. So by directly casting the return from i2c_get_clientdata() to struct bmc150_accel_data * the code was ending up storing the second_dev pointer in (and retrieving it from) some semi-random offset inside struct iio_dev, rather then storing it in the second_dev member of the bmc150_accel_data struct. Fix the code to get the struct bmc150_accel_data * pointer to call iio_priv() on the struct iio_dev * returned by i2c_get_clientdata(), so that the correct pointer gets dereferenced. This fixes the following oops on rmmod, caused by trying to dereference the wrong return of bmc150_get_second_device(): [ 238.980737] BUG: unable to handle page fault for address: 0000000000004710 [ 238.980755] #PF: supervisor read access in kernel mode [ 238.980760] #PF: error_code(0x0000) - not-present page ... [ 238.980841] i2c_unregister_device.part.0+0x19/0x60 [ 238.980856] 0xffffffffc0815016 [ 238.980863] i2c_device_remove+0x25/0xb0 [ 238.980869] __device_release_driver+0x180/0x240 [ 238.980876] driver_detach+0xd4/0x120 [ 238.980882] bus_remove_driver+0x5b/0xd0 [ 238.980888] i2c_del_driver+0x44/0x70 While at it also remove the now no longer sensible checks for data being NULL, iio_priv never returns NULL for an iio_dev with non 0 sized private-data. Fixes: 5bfb3a4bd8f6 ("iio: accel: bmc150: Check for a second ACPI device for BOSC0200") Cc: Jeremy Cline Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Cc: Signed-off-by: Jonathan Cameron commit 000fe96707b4cbffadc884ca750c525f0839695e Author: Rob Herring Date: Mon Jun 7 14:40:22 2021 -0500 dt-bindings: watchdog: Convert arm,sbsa-gwdt to DT schema Convert the arm,sbsa-gwdt binding to DT schema format. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Fu Wei Cc: linux-watchdog@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210607194022.3095736-1-robh@kernel.org commit 63f8e9e0ac655fb31f4e69aebd80acbafa2056ab Author: Rob Herring Date: Mon Jun 7 14:35:00 2021 -0500 dt-bindings: mtd: Convert mtd-physmap to DT schema Convert the mtd-physmap binding to DT schema format. The arm-versatile, cypress,hyperflash and intel,ixp4xx-flash are all just an additional compatible string, so they are all merged into the main schema. There doesn't appear to be any users nor support for 'vendor-id' and 'device-id', so these have been dropped. Cc: Linus Walleij Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20210607193500.3085920-1-robh@kernel.org commit 8271813e404cd0620f99fbccffd2746f85a17259 Author: Nick Xie Date: Fri Jun 4 11:29:57 2021 +0800 clk: meson: g12a: Add missing NNA source clocks for g12b This adds the Neural Network Accelerator source clocks for g12b. Initial support for sm1 already exist in commit 2f1efa5340ef ("clk: meson: g12a: Add support for NNA CLK source clocks") The sm1 and g12b share the same NNA source clocks. This patch add missing NNA clocks for A311D (g12b). Signed-off-by: Nick Xie Acked-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210604032957.224496-1-xieqinick@gmail.com commit c5c6accd7b7e10434d6afda4f6a5107c480bb4fb Author: Florian Westphal Date: Tue Jun 8 23:06:07 2021 +0200 netfilter: nf_tables: move base hook annotation to init helper coverity scanner says: 2187 if (nft_is_base_chain(chain)) { vvv CID 1505166: Memory - corruptions (UNINIT) vvv Using uninitialized value "basechain". 2188 basechain->ops.hook_ops_type = NF_HOOK_OP_NF_TABLES; ... I don't see how nft_is_base_chain() can evaluate to true while basechain pointer is garbage. However, it seems better to place the NF_HOOK_OP_NF_TABLES annotation in nft_basechain_hook_init() instead. Reported-by: coverity-bot Addresses-Coverity-ID: 1505166 ("Memory - corruptions") Fixes: 65b8b7bfc5284f ("netfilter: annotate nf_tables base hook ops") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d4fb1f954fc7e2044b64b7d690400b99a6d5775c Author: Florian Westphal Date: Tue Jun 8 22:53:22 2021 +0200 netfilter: nfnetlink_hook: add depends-on nftables nfnetlink_hook.c: In function 'nfnl_hook_put_nft_chain_info': nfnetlink_hook.c:76:7: error: implicit declaration of 'nft_is_active' This macro is only defined when NF_TABLES is enabled. While its possible to also add an ifdef-guard, the infrastructure is currently not useful without nf_tables. Reported-by: kernel test robot Fixes: 252956528caa ("netfilter: add new hook nfnl subsystem") Suggested-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 5302560bb49d38bf6e62a47c44e19ef04bd5344d Author: Colin Ian King Date: Tue Jun 8 16:34:08 2021 +0100 netfilter: nfnetlink_hook: fix array index out-of-bounds error Currently the array net->nf.hooks_ipv6 is accessed by index hook before hook is sanity checked. Fix this by moving the sanity check to before the array access. Addresses-Coverity: ("Out-of-bounds access") Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso commit 3a3907c4cb66e08dba11766b806b3a974385ed30 Merge: d5aede3e6dd1b 21c6bf8304f01 Author: Florian Fainelli Date: Wed Jun 9 12:04:28 2021 -0700 Merge tag 'tags/bcm2835-dt-next-2021-06-08-v2' into devicetree/next - Fixup MMC node names - Fixup led node names - Introduce new devicetree file for Raspberry Pi 400 - Introduce devicetree bindings for Raspberry Pi 400 - Fix issue with dwc2's FIFO's size - Add VEC compatible for bcm2711 Signed-off-by: Florian Fainelli commit c6ec3e1e3a853f9469c7d07b0fde0be4da8c3ba1 Author: Michael Walle Date: Mon Jun 7 13:27:44 2021 +0200 mtd: spi-nor: otp: implement erase for Winbond and similar flashes Winbond flashes with OTP support provide a command to erase the OTP data. This might come in handy during development. This was tested with a Winbond W25Q32JW on a LS1028A SoC with the NXP FSPI controller. Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Pratyush Yadav Reviewed-by: Tudor Ambarus commit 388161ca45c911f566b71716bce5ff0119fb5522 Author: Michael Walle Date: Mon Jun 7 13:27:43 2021 +0200 mtd: spi-nor: otp: return -EROFS if region is read-only SPI NOR flashes will just ignore program commands if the OTP region is locked. Thus, a user might not notice that the intended write didn't end up in the flash. Return -EROFS to the user in this case. From what I can tell, chips/cfi_cmdset_0001.c also return this error code. One could optimize spi_nor_mtd_otp_range_is_locked() to read the status register only once and not for every OTP region, but for that we would need some more invasive changes. Given that this is one-time-programmable memory and the normal access mode is reading, we just live with the small overhead. By moving the code around a bit, we can just check the length before calling spi_nor_mtd_otp_range_is_locked() and avoid an underflow there if a len is 0. This way we don't need to take the lock either. We also skip the "*retlen = 0" assignment, mtdcore already takes care of that for us. Fixes: 069089acf88b ("mtd: spi-nor: add OTP support") Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Pratyush Yadav Reviewed-by: Tudor Ambarus commit d5b813e484721dfcb84410ec6883c7b05156d9d3 Author: Michael Walle Date: Mon Jun 7 13:27:42 2021 +0200 mtd: spi-nor: otp: use more consistent wording Use the wording as used in the datasheet to describe the access methods of the security registers (aka OTP storage). This will also match the function names. Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Pratyush Yadav Reviewed-by: Tudor Ambarus commit b97b1a769849beb6b40b740817b06f1a50e1c589 Author: Michael Walle Date: Mon Jun 7 13:27:41 2021 +0200 mtd: spi-nor: otp: fix access to security registers in 4 byte mode The security registers either take a 3 byte or a 4 byte address offset, depending on the address mode of the flash. Thus just leave the nor->addr_width as is. Fixes: cad3193fe9d1 ("mtd: spi-nor: implement OTP support for Winbond and similar flashes") Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Pratyush Yadav commit 47c65b3853f88d105017ef512a521794db51bfeb Author: John Harrison Date: Thu Jun 3 09:48:12 2021 -0700 drm/i915/uc: Use platform specific defaults for GuC/HuC enabling The meaning of 'default' for the enable_guc module parameter has been updated to accurately reflect what is supported on current platforms. So start using the defaults instead of forcing everything off. Although, note that right now, the default is for everything to be off anyway. So this is not a change for current platforms. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20210603164812.19045-2-matthew.brost@intel.com commit c9d52c89e7384656c8492b82782707d539fbb509 Author: Jonathan Cameron Date: Thu Jun 3 19:06:12 2021 +0100 iio: light: si1145: Drop use of %hhx format specifier. Since: commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") use of these format strings has been discouraged. As there are only a few such instances in IIO, this is part of a series clearing them out so they don't get copied into new drivers. Use the 0x02x form as the length specifier when used with # includes the 0x prefix and is very unlikely to be what was intended by the author. Signed-off-by: Jonathan Cameron Cc: Nathan Chancellor Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210603180612.3635250-5-jic23@kernel.org commit e8951f087899c44524f9812d17c38d01bc637a1d Author: Jonathan Cameron Date: Thu Jun 3 19:06:11 2021 +0100 iio: imu: inv_mpu6050: Drop use of %hhx format string. Since: commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") use of these format strings has been discouraged. Use the 0x02x form as the length specifier when used with # includes the 0x prefix and is very unlikely to be what was intended by the author. Part of a series removing all uses from IIO in the interestings of avoiding providing bad examples for people to copy. Signed-off-by: Jonathan Cameron Cc: Nathan Chancellor Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210603180612.3635250-4-jic23@kernel.org commit d4f2a1c6c1f2c71dc602968f537e0536f3be0b25 Author: Jonathan Cameron Date: Thu Jun 3 19:06:10 2021 +0100 iio: light: si1133: Drop remaining uses of %hhx format string. Since: commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") use of these format strings has been discouraged. Use the 0x02x form as the length specifier when used with # includes the 0x prefix and is very unlikely to be what was intended by the author. As there are not that many in IIO, this is part of an effort to clear them out so we don't have any instances that might get copied into new drivers. Signed-off-by: Jonathan Cameron Cc: Maxime Roussin-Bélanger Cc: Nathan Chancellor Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210603180612.3635250-3-jic23@kernel.org commit 770494a785a521452a5605606b5a156340d50c9d Author: Arnd Bergmann Date: Thu Jun 3 19:06:09 2021 +0100 iio: si1133: fix format string warnings clang complains about multiple instances of printing an integer using the %hhx format string: drivers/iio/light/si1133.c:982:4: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat] part_id, rev_id, mfr_id); ^~~~~~~ Print them as a normal integer instead, leaving the "#02" length modifier. Use the 0x02x form as the length specifier when used with # includes the 0x prefix and is very unlikely to be what was intended by the author. Fixes: e01e7eaf37d8 ("iio: light: introduce si1133") Signed-off-by: Arnd Bergmann Cc: Nathan Chancellor Signed-off-by: Jonathan Cameron Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210603180612.3635250-2-jic23@kernel.org commit 762b296bcbbc7344752ebf3a25583cf38f8adbdc Author: Kai Ye Date: Wed Jun 9 18:09:05 2021 +0800 uacce: add print information if not enable sva Add print information necessary if user not enable sva. Signed-off-by: Kai Ye Link: https://lore.kernel.org/r/1623233345-8765-1-git-send-email-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 75041120657408ada98514617d3c118419f002c4 Author: Andy Shevchenko Date: Tue Jun 8 01:17:57 2021 +0300 eeprom: idt_89hpesx: use SPDX-License-Identifier Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210607221757.81465-3-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit e0db3deea73ba418bf5dc21f5a4e32ca87d16dde Author: Andy Shevchenko Date: Tue Jun 8 01:17:56 2021 +0300 eeprom: idt_89hpesx: Restore printing the unsupported fwnode name When iterating over child firmware nodes restore printing the name of ones that are not supported. While at it, refactor loop body to clearly show that we stop at the first match. Fixes: db15d73e5f0e ("eeprom: idt_89hpesx: Support both ACPI and OF probing") Cc: Huy Duong Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210607221757.81465-2-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3f6ee1c095156a74ab2df605af13020f1ce3e600 Author: Andy Shevchenko Date: Tue Jun 8 01:17:55 2021 +0300 eeprom: idt_89hpesx: Put fwnode in matching case during ->probe() device_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: db15d73e5f0e ("eeprom: idt_89hpesx: Support both ACPI and OF probing") Cc: Huy Duong Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210607221757.81465-1-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit 816c8e39b7ea0875640312c9ed3be0d5a68d7183 Author: Allison Henderson Date: Fri May 28 15:15:05 2021 -0700 xfs: Make attr name schemes consistent This patch renames the following functions to make the nameing scheme more consistent: xfs_attr_shortform_remove -> xfs_attr_sf_removename xfs_attr_node_remove_name -> xfs_attr_node_removename xfs_attr_set_fmt -> xfs_attr_sf_addname Suggested-by: Darrick J. Wong Signed-off-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong commit 4a4957c16dc674d1306a3b43d6b07ed93a7b7a14 Author: Allison Henderson Date: Fri May 21 00:57:15 2021 -0700 xfs: Fix default ASSERT in xfs_attr_set_iter This ASSERT checks for the state value of RM_SHRINK in the set path which should never happen. Change to ASSERT(0); Suggested-by: Darrick J. Wong Signed-off-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong commit 64233338499126c5c31e07165735ab5441c7e45a Author: Chen Yu Date: Fri May 28 11:20:54 2021 +0800 intel_idle: Adjust the SKX C6 parameters if PC6 is disabled Because cpuidle assumes worst-case C-state parameters, PC6 parameters are used for describing C6, which is worst-case for requesting CC6. When PC6 is enabled, this is appropriate. But if PC6 is disabled in the BIOS, the exit latency and target residency should be adjusted accordingly. Exit latency: Previously the C6 exit latency was measured as the PC6 exit latency. With PC6 disabled, the C6 exit latency should be the one of CC6. Target residency: With PC6 disabled, the idle duration within [CC6, PC6) would make the idle governor choose C1E over C6. This would cause low energy-efficiency. We should lower the bar to request C6 when PC6 is disabled. To fill this gap, check if PC6 is disabled in the BIOS in the MSR_PKG_CST_CONFIG_CONTROL(0xe2) register. If so, use the CC6 exit latency for C6 and set target_residency to 3 times of the new exit latency. [This is consistent with how intel_idle driver uses _CST to calculate the target_residency.] As a result, the OS would be more likely to choose C6 over C1E when PC6 is disabled, which is reasonable, because if C6 is enabled, it implies that the user cares about energy, so choosing C6 more frequently makes sense. The new CC6 exit latency of 92us was measured with wult[1] on SKX via NIC wakeup as the 99.99th percentile. Also CLX and CPX both have the same CPU model number as SkX, but their CC6 exit latencies are similar to the SKX one, 96us and 89us respectively, so reuse the SKX value for them. There is a concern that it might be better to use a more generic approach instead of optimizing every platform. However, if the required code complexity and different PC6 bit interpretation on different platforms are taken into account, tuning the code per platform seems to be an acceptable tradeoff. Link: https://intel.github.io/wult/ # [1] Suggested-by: Len Brown Signed-off-by: Chen Yu Reviewed-by: Artem Bityutskiy [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit ec1e7e8853b62cb971828d66a1f298a280182831 Author: Zhen Lei Date: Wed Jun 9 20:27:39 2021 +0800 z2ram: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Jens Axboe commit c744b06254a3a163c6bcf70bb21f0241107271fc Author: Zhen Lei Date: Wed Jun 9 20:24:50 2021 +0800 sx8: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Jens Axboe commit 6597efa6c58fa9f02f624e3e99bb00e73c32bcb2 Author: Zhen Lei Date: Wed Jun 9 20:23:27 2021 +0800 sunvdc: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Jens Axboe commit ce9a8ca68aec3fe2b817e38d169b792214e5fda0 Author: Zhen Lei Date: Wed Jun 9 20:19:58 2021 +0800 mtip32xx: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Jens Axboe commit 8404e19194813d850e89fb3504223c09aa9776f3 Author: Zhen Lei Date: Wed Jun 9 20:14:26 2021 +0800 drbd: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Jens Axboe commit 76cdb09b38afb4ffb031b56ebc41cb33ddcd85fb Author: Zhen Lei Date: Wed Jun 9 20:11:25 2021 +0800 aoe: remove unnecessary oom message Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Signed-off-by: Jens Axboe commit d0ce3d5cf77d3866436e86cabe06dd9710c9cc77 Author: William Breathitt Gray Date: Wed Jun 9 10:31:20 2021 +0900 counter: stm32-timer-cnt: Add const qualifier for actions_list array The struct counter_synapse actions_list member expects a const enum counter_synapse_action array. This patch adds the const qualifier to the stm32_synapse_actions to match actions_list. Cc: Benjamin Gaignard Reviewed-by: Fabrice Gasnier Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/9675edda958ee2ca371d271f46445d3e1934ba82.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit f83e6e59366bc26310269a140f7dffd15c4850f7 Author: William Breathitt Gray Date: Wed Jun 9 10:31:19 2021 +0900 counter: stm32-lptimer-cnt: Add const qualifier for actions_list array The struct counter_synapse actions_list member expects a const enum counter_synapse_action array. This patch adds the const qualifier to the stm32_lptim_cnt_synapse_actions to match actions_list. Reviewed-by: Fabrice Gasnier Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/785e0daa3633923ede42394f423fcf94c4469154.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 6ea9a2b84cc354ffd028195edb4e3d60d47f7bcb Author: Takashi Iwai Date: Tue Jun 8 16:05:40 2021 +0200 ALSA: parisc: Fix assignment in if condition PARISC harmony driver code contains an assignment in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-67-tiwai@suse.de Signed-off-by: Takashi Iwai commit dd1431e53515e5760c03975a0a35aef75924a66d Author: Takashi Iwai Date: Tue Jun 8 16:05:39 2021 +0200 ALSA: i2c: Fix assignment in if condition ALSA I2C helper drivers contain a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-66-tiwai@suse.de Signed-off-by: Takashi Iwai commit e73ad38871cb20bbe1a74306f3798828b4c40175 Author: Takashi Iwai Date: Tue Jun 8 16:05:38 2021 +0200 ALSA: poewrmac: Fix assignment in if condition PPC powermac driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-65-tiwai@suse.de Signed-off-by: Takashi Iwai commit dd1fc3c585dddf0f8d1baaa941395aa4afdfa724 Author: Takashi Iwai Date: Tue Jun 8 16:05:37 2021 +0200 ALSA: synth: Fix assignment in if condition EMUx synth driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-64-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0056a405c7ada3e974d4956be67167f1c88aa975 Author: William Breathitt Gray Date: Wed Jun 9 10:31:18 2021 +0900 counter: microchip-tcb-capture: Add const qualifier for actions_list array The struct counter_synapse actions_list member expects a const enum counter_synapse_action array. This patch adds the const qualifier to the mchp_tc_synapse_actions to match actions_list. Cc: Kamel Bouhara Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/165f9682ce308a60a477aaa56fdae7bc949dc218.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit d0ad13ef704164cf41b5f38d3c9e87dd8f67b5bb Author: Takashi Iwai Date: Tue Jun 8 16:05:36 2021 +0200 ALSA: serial: Fix assignment in if condition A few ALSA serial drivers contain assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-63-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9c78e803192a5ecf98b1a5e664c40d8223084e43 Author: Takashi Iwai Date: Tue Jun 8 16:05:35 2021 +0200 ALSA: opl3: Fix assignment in if condition OPL3 helper code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-62-tiwai@suse.de Signed-off-by: Takashi Iwai commit ed1567c106726d0629c461053e2bc2e9365de9aa Author: Takashi Iwai Date: Tue Jun 8 16:05:34 2021 +0200 ALSA: vx: Fix assignment in if condition VX driver helper code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-61-tiwai@suse.de Signed-off-by: Takashi Iwai commit d2bc4d9ab154f911e99802347a9661dca15b2afe Author: Takashi Iwai Date: Tue Jun 8 16:05:33 2021 +0200 ALSA: mpu401: Fix assignment in if condition MPU401 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-60-tiwai@suse.de Signed-off-by: Takashi Iwai commit bdab9e5c3eb3a633903ae423587fa9bf67555b69 Author: Takashi Iwai Date: Tue Jun 8 16:05:32 2021 +0200 ALSA: sparc: Fix assignment in if condition SPARC drivers contain a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-59-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2073fa449d6d2ac52d511fad4bce121fd284a7f3 Author: Takashi Iwai Date: Tue Jun 8 16:05:31 2021 +0200 ALSA: pcmcia: Fix assignment in if condition PCMCIA VX222 and PDAudioCF drivers contain a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-58-tiwai@suse.de Signed-off-by: Takashi Iwai commit f9a6bb841f737015aface3ba4ac845e66542850e Author: Takashi Iwai Date: Tue Jun 8 16:05:30 2021 +0200 ALSA: seq: Fix assignment in if condition There are lots of places doing assignments in if condition in ALSA sequencer core, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-57-tiwai@suse.de Signed-off-by: Takashi Iwai commit 51c816fdd17c63352b04e67c6c5ccaa3417f39aa Author: Takashi Iwai Date: Tue Jun 8 16:05:29 2021 +0200 ALSA: oss: Fix assignment in if condition There are a few places doing assignments in if condition in ALSA PCM and OSS emulation layers, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-56-tiwai@suse.de Signed-off-by: Takashi Iwai commit 137c171cf7ecf624e067d800dca6cbeffb8cc73d Author: Takashi Iwai Date: Tue Jun 8 16:05:28 2021 +0200 ALSA: pcm: Fix assignment in if condition There are a few places doing assignments in if condition in ALSA PCM core code, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-55-tiwai@suse.de Signed-off-by: Takashi Iwai commit e3ded899667731b7b590016adeb7b5948fdcd658 Author: Takashi Iwai Date: Tue Jun 8 16:05:27 2021 +0200 ALSA: core: Fix assignment in if condition There are a few places doing assignments in if condition in ALSA core code, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-54-tiwai@suse.de Signed-off-by: Takashi Iwai commit e7daaeedb4f270126792ae216f406c1ba2b8f4d9 Author: Takashi Iwai Date: Tue Jun 8 16:05:26 2021 +0200 ALSA: ymfpci: Fix assignment in if condition PCI YMFPCI driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-53-tiwai@suse.de Signed-off-by: Takashi Iwai commit 029fd1eae7e1e1fd5307b4f32b756584752186d5 Author: Takashi Iwai Date: Tue Jun 8 16:05:25 2021 +0200 ALSA: vx222: Fix assignment in if condition PCI VX222 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-52-tiwai@suse.de Signed-off-by: Takashi Iwai commit 34b946ee28699b0d80e3a4fe667e31ea7b95fb85 Author: Takashi Iwai Date: Tue Jun 8 16:05:24 2021 +0200 ALSA: trident: Fix assignment in if condition PCI Trident driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-51-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9ebb3697c8efaa6bf7ea9559f2637acd8eb3b45c Author: Takashi Iwai Date: Tue Jun 8 16:05:23 2021 +0200 ALSA: rme9652: Fix assignment in if condition PCI RME9652 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-50-tiwai@suse.de Signed-off-by: Takashi Iwai commit 66c8f75919dd8561046a24430297c546c487cad9 Author: Takashi Iwai Date: Tue Jun 8 16:05:22 2021 +0200 ALSA: hdsp: Fix assignment in if condition PCI HDSP driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-49-tiwai@suse.de Signed-off-by: Takashi Iwai commit 28c0709921fe1339bf80525b0c9021a5bde42e61 Author: Takashi Iwai Date: Tue Jun 8 16:05:21 2021 +0200 ALSA: riptide: Fix assignment in if condition PCI riptide driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-48-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4327ad25e6be2e322d8068e19b186af619130c10 Author: Takashi Iwai Date: Tue Jun 8 16:05:20 2021 +0200 ALSA: pcxhr: Fix assignment in if condition PCI PCXHR driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-47-tiwai@suse.de Signed-off-by: Takashi Iwai commit 36f74c7ff9e6de366fc49f90bec36aea6199d702 Author: Takashi Iwai Date: Tue Jun 8 16:05:19 2021 +0200 ALSA: nm256: Fix assignment in if condition PCI NM256 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-46-tiwai@suse.de Signed-off-by: Takashi Iwai commit 73debecf8fe0b313c4b8d51bef3a043c6705b5d0 Author: Takashi Iwai Date: Tue Jun 8 16:05:18 2021 +0200 ALSA: mixart: Fix assignment in if condition PCI miXart driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-45-tiwai@suse.de Signed-off-by: Takashi Iwai commit 234e928067ced2c8021b71a1d5c08f9d8df49644 Author: Takashi Iwai Date: Tue Jun 8 16:05:17 2021 +0200 ALSA: korg1212: Fix assignment in if condition PCI Korg1212 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-44-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3635f862b509ea6275e8e5ebb8ab22b4872c28a0 Author: Takashi Iwai Date: Tue Jun 8 16:05:16 2021 +0200 ALSA: ice1712: Fix assignment in if condition PCI ICE1712 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-43-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9031f93851bc47bf34546b8f2b2ca2556d0573f2 Author: Takashi Iwai Date: Tue Jun 8 16:05:15 2021 +0200 ALSA: emu10k1x: Fix assignment in if condition PCI EMU10k1X driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-42-tiwai@suse.de Signed-off-by: Takashi Iwai commit 12bda1076c76c87d40fbd9d5dfa5ddf6f60a1772 Author: Takashi Iwai Date: Tue Jun 8 16:05:14 2021 +0200 ALSA: emu10k1: Fix assignment in if condition PCI EMU10k1 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-41-tiwai@suse.de Signed-off-by: Takashi Iwai commit 549717fc5b4cf5a791d46e23c607c03afc8c94d3 Author: Takashi Iwai Date: Tue Jun 8 16:05:13 2021 +0200 ALSA: echoaudio: Fix assignment in if condition PCI echoaudio drivers contain a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-40-tiwai@suse.de Signed-off-by: Takashi Iwai commit 164b3ddeb026bf86df1829577674ed506ff4cbde Author: Takashi Iwai Date: Tue Jun 8 16:05:12 2021 +0200 ALSA: cs5535audio: Fix assignment in if condition PCI CS5535 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-39-tiwai@suse.de Signed-off-by: Takashi Iwai commit cbc2d9970e9524cb5934ad48247a87160fa92c67 Author: Takashi Iwai Date: Tue Jun 8 16:05:11 2021 +0200 ALSA: cs46xx: Fix assignment in if condition PCI CS46xx driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-38-tiwai@suse.de Signed-off-by: Takashi Iwai commit 59c39cd300ffb61f97188d0d75ca24a94775bade Author: Takashi Iwai Date: Tue Jun 8 16:05:10 2021 +0200 ALSA: ca0106: Fix assignment in if condition PCI CA0106 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-37-tiwai@suse.de Signed-off-by: Takashi Iwai commit c2b0718f7836b340277eff6f908dbd559ee1a36e Author: Takashi Iwai Date: Tue Jun 8 16:05:09 2021 +0200 ALSA: au88x0: Fix assignment in if condition PCI AU88x0 driver code contains a lot of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes. A potential real fix is about the PCI AGP bridge management refcount in addition while spotted out during conversions. Link: https://lore.kernel.org/r/20210608140540.17885-36-tiwai@suse.de Signed-off-by: Takashi Iwai commit e66fd36264bdffd54a4dc25e42c8f81a4cebb3aa Author: Takashi Iwai Date: Tue Jun 8 16:05:08 2021 +0200 ALSA: ac97: Fix assignment in if condition AC97 codec driver code contains a lot of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-35-tiwai@suse.de Signed-off-by: Takashi Iwai commit afb342f02241a9877479bae47fd9d2df9682bd76 Author: Takashi Iwai Date: Tue Jun 8 16:05:07 2021 +0200 ALSA: via82xx: Fix assignment in if condition PCI VIA82xx driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-34-tiwai@suse.de Signed-off-by: Takashi Iwai commit 055e20c3be3f2847fbe9af37c63bceb6fae58791 Author: Takashi Iwai Date: Tue Jun 8 16:05:06 2021 +0200 ALSA: sonicvibes: Fix assignment in if condition PCI sonicvibes driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-33-tiwai@suse.de Signed-off-by: Takashi Iwai commit da8eedb169712c82ebf69b09aedbb4da1406be41 Author: Takashi Iwai Date: Tue Jun 8 16:05:05 2021 +0200 ALSA: rme96: Fix assignment in if condition PCI RME96 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes (only systematic conversions except for a few rate handling codes), no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-32-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1c9140b9cae27ef1669244c3aa8a484847453fcb Author: Takashi Iwai Date: Tue Jun 8 16:05:04 2021 +0200 ALSA: rme32: Fix assignment in if condition PCI RME32 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes (except for a slight refactoring about AutoSync rate check, only systematic conversions), no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-31-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5cc16ba623cfa5f279a999c109922eb2d61bb43a Author: Takashi Iwai Date: Tue Jun 8 16:05:03 2021 +0200 ALSA: maestro3: Fix assignment in if condition PCI maestro3 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-30-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3a5f3dd3295288d4f48af91f9fb47b83027cce64 Author: Takashi Iwai Date: Tue Jun 8 16:05:02 2021 +0200 ALSA: intel8x0: Fix assignment in if condition PCI intel8x0 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-29-tiwai@suse.de Signed-off-by: Takashi Iwai commit 68f441abd45265d7708f61230f7dbab603e204fb Author: Takashi Iwai Date: Tue Jun 8 16:05:01 2021 +0200 ALSA: fm801: Fix assignment in if condition PCI FM801 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-28-tiwai@suse.de Signed-off-by: Takashi Iwai commit 48cab474d828568a034acc9281d91b792805a0b8 Author: Takashi Iwai Date: Tue Jun 8 16:05:00 2021 +0200 ALSA: es1968: Fix assignment in if condition PCI ES1968 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-27-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3dc52815408b90ed41948ab65fb1a46ea1fa3170 Author: Takashi Iwai Date: Tue Jun 8 16:04:59 2021 +0200 ALSA: es1938: Fix assignment in if condition PCI ES1938 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-26-tiwai@suse.de Signed-off-by: Takashi Iwai commit 93a3a1004d18b0539b1f648fa2cd2338f5f896cd Author: Takashi Iwai Date: Tue Jun 8 16:04:58 2021 +0200 ALSA: ens137x: Fix assignment in if condition PCI ENS137x driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit 393e95cda08115f1543cf76ccf1c1bf9c8893b03 Author: Takashi Iwai Date: Tue Jun 8 16:04:57 2021 +0200 ALSA: cs4281: Fix assignment in if condition PCI CS4281 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4379588272cec17fc1b5af9a954492bb5b76fce7 Author: Takashi Iwai Date: Tue Jun 8 16:04:56 2021 +0200 ALSA: cmipci: Fix assignment in if condition PCI CMIPCI driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit 429731d3080e13caabaceebc41dac3d759350bbb Author: Takashi Iwai Date: Tue Jun 8 16:04:55 2021 +0200 ALSA: bt87x: Fix assignment in if condition PCI BT87x driver code contains an assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit 13c986607f57222fcc40ad7c21df429c42b4ea02 Author: Takashi Iwai Date: Tue Jun 8 16:04:54 2021 +0200 ALSA: azt3328: Fix assignment in if condition PCI AZT3328 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit b83bea386434208dc4d71df630eaf35b7c64166c Author: Takashi Iwai Date: Tue Jun 8 16:04:53 2021 +0200 ALSA: atiixp: Fix assignment in if condition PCI ATIIXP driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit 61ea06e8a881631a5ba12b723bc01bf05b1b3009 Author: Takashi Iwai Date: Tue Jun 8 16:04:52 2021 +0200 ALSA: als4000: Fix assignment in if condition PCI ALS4000 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5bd11527e31fe473f165757a1f7f3ccf980d81d5 Author: Takashi Iwai Date: Tue Jun 8 16:04:51 2021 +0200 ALSA: als300: Fix assignment in if condition PCI ALS300 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit dadfb986cebd1d9e0558857dd88b6a1dd2d059c3 Author: Takashi Iwai Date: Tue Jun 8 16:04:50 2021 +0200 ALSA: ak4531: Fix assignment in if condition AK4531 codec driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit e2e30a32f34a08507125fbbc82d2589446cf8fe9 Author: Takashi Iwai Date: Tue Jun 8 16:04:49 2021 +0200 ALSA: ad1889: Fix assignment in if condition PCI AD1889 driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit eb767949f709aeca0b21232ecc456d2f4bd9a419 Author: Takashi Iwai Date: Tue Jun 8 16:04:48 2021 +0200 ALSA: isa: Fix assignment in if condition ISA ES1688 and WSS driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit 115c45565385e655ddcf861e631b0b8bba56a988 Author: Takashi Iwai Date: Tue Jun 8 16:04:47 2021 +0200 ALSA: azt2320: Fix assignment in if condition ISA AZT2320 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit ce29edbd26fdde4638ff301927159a9afbac4c6d Author: Takashi Iwai Date: Tue Jun 8 16:04:46 2021 +0200 ALSA: als100: Fix assignment in if condition ISA ALS100 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3e38150bf238bba285c802f074b98921b2878b1e Author: Takashi Iwai Date: Tue Jun 8 16:04:45 2021 +0200 ALSA: cmi8330: Fix assignment in if condition ISA CMI8330 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 45e0471d644024632612100a346e6623fa546340 Author: Takashi Iwai Date: Tue Jun 8 16:04:44 2021 +0200 ALSA: es18xx: Fix assignment in if condition ISA ES18xx driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4b3bd108ab53142fe90e83db3c82b697968548d7 Author: Takashi Iwai Date: Tue Jun 8 16:04:43 2021 +0200 ALSA: opl3sa2: Fix assignment in if condition ISA OPL3SA2 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 913ad3a36d4b498e61be78923c9973a09552c53e Author: Takashi Iwai Date: Tue Jun 8 16:04:42 2021 +0200 ALSA: opti9xx: Fix assignment in if condition ISA Opti9xx driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit 235dc07a35b96ea181dc7ab872ef82197e5fc056 Author: Takashi Iwai Date: Tue Jun 8 16:04:41 2021 +0200 ALSA: cs423x: Fix assignment in if condition ISA CS423x driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 520226e93e2620e027bde67a75025b3d61916a40 Author: Takashi Iwai Date: Tue Jun 8 16:04:40 2021 +0200 ALSA: wavefront: Fix assignment in if condition ISA WaveFront driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5ab6d6601366f298dd787fd78c8b55e4a8af2bc8 Author: Takashi Iwai Date: Tue Jun 8 16:04:39 2021 +0200 ALSA: ad1816a: Fix assignment in if condition ISA AD1816A driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 310efd3aabf2305737b3de2dbdc544d5725e3a52 Author: Takashi Iwai Date: Tue Jun 8 16:04:38 2021 +0200 ALSA: gus: Fix assignment in if condition ISA GUS driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit c305366a37441c2ac90b08711cb6f032b43672f2 Author: Takashi Iwai Date: Tue Jun 8 16:04:37 2021 +0200 ALSA: sb: Fix potential double-free of CSP mixer elements snd_sb_qsound_destroy() contains the calls of removing the previously created mixer controls, but it doesn't clear the pointers. As snd_sb_qsound_destroy() itself may be repeatedly called via ioctl, this could lead to double-free potentially. Fix it by clearing the struct fields properly afterwards. Link: https://lore.kernel.org/r/20210608140540.17885-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 36e7b12b219dc30a4db046756d81745bc9d69167 Author: Takashi Iwai Date: Tue Jun 8 16:04:36 2021 +0200 ALSA: sb: Minor coding style fixes The handling of snd_ctl_new1() and snd_ctl_add() can be sometimes tricky, as snd_ctl_add() automatically removes the passed object at its error path. The recent fix addressed an overlooked issue that is relevant with that in SB driver code, and it can be a bit more simplified by assigning to a temporary variable, i.e. storing to the struct field only after the creation succeeds. Link: https://lore.kernel.org/r/20210608140540.17885-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 10dc8ad5ffe8350d71e244b27900a1939d255fe7 Author: Takashi Iwai Date: Tue Jun 8 16:04:35 2021 +0200 ALSA: sb: Fix assignment in if condition A lot of code for SB drivers is in a legacy style with assignment in if condition. This also made harder to catch some bugs (e.g. the commit 1c98f574403d "ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer"). This patch fixes the coding style. All are rather simple conversions and there should be no functional changes. (The changes in snd_emu8000_new() for hw->res_port1, 2 and 3 are slightly different from the older ones, but this shouldn't matter much in practice.) Link: https://lore.kernel.org/r/20210608140540.17885-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9b2574f61c499e264df69b2e71a5f4319654a00b Author: William Breathitt Gray Date: Wed Jun 9 10:31:16 2021 +0900 counter: ftm-quaddec: Add const qualifier for actions_list array The struct counter_synapse actions_list member expects a const enum counter_synapse_action array. This patch adds the const qualifier to the ftm_quaddec_synapse_actions to match actions_list. Cc: Patrick Havelange Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/db1df2021efb1b98e6d1a50787be5a52a1896574.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 6a9eb0e31044b5d70517a4299c9d27df1e35aab6 Author: William Breathitt Gray Date: Wed Jun 9 10:31:15 2021 +0900 counter: 104-quad-8: Add const qualifier for actions_list array The struct counter_synapse actions_list member expects a const enum counter_synapse_action array. This patch adds the const qualifier to the quad8_index_actions_list and quad8_synapse_actions_list to match actions_list. Acked-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/776ba3ad0a3c609d3600cffe0ed6446baf29fee9.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 45af9ae84c60422db950a14bdb48c00fb03a1416 Author: William Breathitt Gray Date: Wed Jun 9 10:31:14 2021 +0900 counter: stm32-timer-cnt: Add const qualifier for functions_list array The struct counter_count functions_list member expects a const enum counter_count_function array. This patch adds the const qualifier to the stm32_count_functions to match functions_list. Cc: Benjamin Gaignard Reviewed-by: Fabrice Gasnier Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/46a1e7096dd9280d8f241894186b3c903956a55f.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 8a00fed665ad994291a6ed154ce3154a1fe1a357 Author: William Breathitt Gray Date: Wed Jun 9 10:31:13 2021 +0900 counter: stm32-lptimer-cnt: Add const qualifier for functions_list array The struct counter_count functions_list member expects a const enum counter_count_function array. This patch adds the const qualifier to the stm32_lptim_cnt_functions to match functions_list. Reviewed-by: Fabrice Gasnier Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/08830119594acdb3bc9d36ae2e65b2eb26589ade.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 7e0dcfcefecacea33339cfd60facb29cf814a484 Author: William Breathitt Gray Date: Wed Jun 9 10:31:12 2021 +0900 counter: microchip-tcb-capture: Add const qualifier for functions_list array The struct counter_count functions_list member expects a const enum counter_count_function array. This patch adds the const qualifier to the mchp_tc_count_functions to match functions_list. Cc: Kamel Bouhara Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/74cb91ab7b459563762ec28633cd8808093aa2ad.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 891b58b35fd6790d78ffc1ce811ac39dbe26f711 Author: William Breathitt Gray Date: Wed Jun 9 10:31:11 2021 +0900 counter: interrupt-cnt: Add const qualifier for functions_list array The struct counter_count functions_list member expects a const enum counter_count_function array. This patch adds the const qualifier to the interrupt__cnt_functions to match functions_list. Cc: Oleksij Rempel Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/86f7fb77f703cf2508a6b4ee9cf80aa523392976.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit fca2534fddfa06fa07e37a1574ae7748a1572fa7 Author: William Breathitt Gray Date: Wed Jun 9 10:31:10 2021 +0900 counter: 104-quad-8: Add const qualifier for functions_list array The struct counter_count functions_list member expects a const enum counter_count_function array. This patch adds the const qualifier to the quad8_count_functions_list to match functions_list. Acked-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/6847da7553208e7f2554e6c7688e2021f7e19716.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit e612b600253e6d3f2f11315b3e59915403470dd3 Author: William Breathitt Gray Date: Wed Jun 9 10:31:09 2021 +0900 counter: 104-quad-8: Add const qualifiers for quad8_preset_register_set Add some safety by qualifying the quad8_preset_register_set() function parameters as const. Acked-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/050f1b518eeae8e3683f7d6d11f3219a137adf48.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit af383bb1467b9df1d845366579c368b3e66b9b06 Author: William Breathitt Gray Date: Wed Jun 9 10:31:08 2021 +0900 counter: 104-quad-8: Annotate hardware config module parameter When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a device to access or modify the kernel image. To this end, annotate module_param* statements that refer to hardware configuration and indicate for future reference what type of parameter they specify. The parameter parser in the core sees this information and can skip such parameters with an error message if the kernel is locked down. The module initialisation then runs as normal, but just sees whatever the default values for those parameters is. Note that we do still need to do the module initialisation because some drivers have viable defaults set in case parameters aren't specified and some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates the 104-QUAD-8 driver. Acked-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/97ce79878a26809f0b15b2eac9a86ca39e0ecd74.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit a624eb520390cecf644a8906c982fd53b2afcc49 Author: Dan Williams Date: Mon Jun 7 16:52:43 2021 -0700 libnvdimm/pmem: Fix blk_cleanup_disk() usage The queue_to_disk() helper can not be used after del_gendisk() communicate @disk via the pgmap->owner. Otherwise, queue_to_disk() returns NULL resulting in the splat below. Kernel attempted to read user page (330) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on read at 0x00000330 Faulting instruction address: 0xc000000000906344 Oops: Kernel access of bad area, sig: 11 [#1] [..] NIP [c000000000906344] pmem_pagemap_cleanup+0x24/0x40 LR [c0000000004701d4] memunmap_pages+0x1b4/0x4b0 Call Trace: [c000000022cbb9c0] [c0000000009063c8] pmem_pagemap_kill+0x28/0x40 (unreliable) [c000000022cbb9e0] [c0000000004701d4] memunmap_pages+0x1b4/0x4b0 [c000000022cbba90] [c0000000008b28a0] devm_action_release+0x30/0x50 [c000000022cbbab0] [c0000000008b39c8] release_nodes+0x2f8/0x3e0 [c000000022cbbb60] [c0000000008ac440] device_release_driver_internal+0x190/0x2b0 [c000000022cbbba0] [c0000000008a8450] unbind_store+0x130/0x170 Reported-by: Sachin Sant Fixes: 87eb73b2ca7c ("nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk") Link: http://lore.kernel.org/r/DFB75BA8-603F-4A35-880B-C5B23EF8FA7D@linux.vnet.ibm.com Cc: Christoph Hellwig Cc: Ulf Hansson Cc: Jens Axboe Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig Tested-by: Sachin Sant Link: https://lore.kernel.org/r/162310994435.1571616.334551212901820961.stgit@dwillia2-desk3.amr.corp.intel.com [axboe: fold in compile warning fix] Signed-off-by: Jens Axboe commit eb8eaa271f00897cbc109ad1f2bca266f91bdab7 Author: William Breathitt Gray Date: Wed Jun 9 10:31:06 2021 +0900 counter: 104-quad-8: Remove pointless comment It is obvious that devm_counter_register() is used to register a Counter device, so a comment stating such is pointless here. Acked-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/77e9f3daa091d0ad0ee56b8973705dd03db85dd4.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit c316424d9921b36b671a1bcc160e24a1fe9978c0 Author: William Breathitt Gray Date: Wed Jun 9 10:31:05 2021 +0900 docs: counter: Fix spelling "Miscellaneous" is the correct spelling. Reviewed-by: David Lechner Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/880c2fd0e2e91b8962c9d388b37ba582d548db8e.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 769841c966fdb36b41d968d96d3e6fb7f7abd63c Author: William Breathitt Gray Date: Wed Jun 9 10:31:04 2021 +0900 docs: counter: Consolidate Counter sysfs attributes documentation Duplicate ABIs are not valid, so let's consolidate these sysfs attributes into the main sysfs-bus-counter documentation file. Cc: Patrick Havelange Reviewed-by: David Lechner Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/c651ec1c541754ad108160839e2b8425ad089819.1623201081.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 0d6695b112762aa7aad28c46e65561389b6f50d6 Author: Stanislav Lisovskiy Date: Thu May 27 14:01:06 2021 +0300 drm/i915/adl_p: Same slices mask is not same Dbuf state We currently treat same slice mask as a same DBuf state and skip updating the Dbuf slices, if we detect that. This is wrong as if we have a multi to single pipe change or vice versa, that would be treated as a same Dbuf state and thus no changes required, so we don't get Mbus updated, causing issues. Solution: check also mbus_join, in addition to slices mask. Cc: Ville Syrjälä Reviewed-by: Uma Shankar Signed-off-by: Stanislav Lisovskiy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210527110106.21434-1-stanislav.lisovskiy@intel.com commit d62686ba3b54998d6d959dc41f54edd5c3e42589 Author: Stanislav Lisovskiy Date: Thu Jun 3 09:50:38 2021 +0300 drm/i915/adl_p: CDCLK crawl support for ADL CDCLK crawl feature allows to change CDCLK frequency without disabling the actual PLL and doesn't require a full modeset. v2: - Added has_cdclk_crawl as a feature flag to intel_device_info(Matt Roper) - s/gen13_cdclk_pll_crawl/adlp_cdclk_pll_crawl/ (Matt Roper) Cc: Mika Kahola Reviewed-by: Mika Kahola Signed-off-by: Stanislav Lisovskiy Signed-off-by: Gwan-gyeong Mun Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210603065038.7298-1-stanislav.lisovskiy@intel.com commit a8168cebf1bca1b5269e8a7eb2626fb76814d6e2 Author: Nicolas Boichat Date: Fri May 21 20:00:41 2021 +0800 arm64: dts: mt8183: Add node for the Mali GPU Add a basic GPU node for mt8183, as well as OPP table. Note that with the current panfrost driver, devfreq is not actually functional, as the we do not have platform-specific support for >1 supplies. Also, we are missing code to handle frequency change, as the GPU frequency needs to be switched away to a stable 26Mhz clock during the transition. Signed-off-by: Nicolas Boichat Link: https://lore.kernel.org/r/20210521200038.v14.1.I9f45f5c1f975422d58b5904d11546349e9ccdc94@changeid Signed-off-by: Matthias Brugger commit e4a9ccdd1c03b3dc58214874399d24331ea0a3ab Author: Greg Kurz Date: Fri Jun 4 18:11:52 2021 +0200 fuse: Fix infinite loop in sget_fc() We don't set the SB_BORN flag on submounts. This is wrong as these superblocks are then considered as partially constructed or dying in the rest of the code and can break some assumptions. One such case is when you have a virtiofs filesystem with submounts and you try to mount it again : virtio_fs_get_tree() tries to obtain a superblock with sget_fc(). The logic in sget_fc() is to loop until it has either found an existing matching superblock with SB_BORN set or to create a brand new one. It is assumed that a superblock without SB_BORN is transient and the loop is restarted. Forgetting to set SB_BORN on submounts hence causes sget_fc() to retry forever. Setting SB_BORN requires special care, i.e. a write barrier for super_cache_count() which can check SB_BORN without taking any lock. We should call vfs_get_tree() to deal with that but this requires to have a proper ->get_tree() implementation for submounts, which is a bigger piece of work. Go for a simple bug fix in the meatime. Fixes: bf109c64040f ("fuse: implement crossmounts") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Greg Kurz Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit e3a43f2a95393000778f8f302d48795add2fc4a8 Author: Greg Kurz Date: Fri Jun 4 18:11:51 2021 +0200 fuse: Fix crash if superblock of submount gets killed early As soon as fuse_dentry_automount() does up_write(&sb->s_umount), the superblock can theoretically be killed. If this happens before the submount was added to the &fc->mounts list, fuse_mount_remove() later crashes in list_del_init() because it assumes the submount to be already there. Add the submount before dropping sb->s_umount to fix the inconsistency. It is okay to nest fc->killsb under sb->s_umount, we already do this on the ->kill_sb() path. Signed-off-by: Greg Kurz Fixes: bf109c64040f ("fuse: implement crossmounts") Cc: stable@vger.kernel.org # v5.10+ Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit d92d88f0568e97c437eeb79d9c9609bd8277406f Author: Greg Kurz Date: Fri Jun 4 18:11:50 2021 +0200 fuse: Fix crash in fuse_dentry_automount() error path If fuse_fill_super_submount() returns an error, the error path triggers a crash: [ 26.206673] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] [ 26.226362] RIP: 0010:__list_del_entry_valid+0x25/0x90 [...] [ 26.247938] Call Trace: [ 26.248300] fuse_mount_remove+0x2c/0x70 [fuse] [ 26.248892] virtio_kill_sb+0x22/0x160 [virtiofs] [ 26.249487] deactivate_locked_super+0x36/0xa0 [ 26.250077] fuse_dentry_automount+0x178/0x1a0 [fuse] The crash happens because fuse_mount_remove() assumes that the FUSE mount was already added to list under the FUSE connection, but this only done after fuse_fill_super_submount() has returned success. This means that until fuse_fill_super_submount() has returned success, the FUSE mount isn't actually owned by the superblock. We should thus reclaim ownership by clearing sb->s_fs_info, which will skip the call to fuse_mount_remove(), and perform rollback, like virtio_fs_get_tree() already does for the root sb. Fixes: bf109c64040f ("fuse: implement crossmounts") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Greg Kurz Reviewed-by: Max Reitz Signed-off-by: Miklos Szeredi commit ca199e1952cc7cfce9b416547108b52df05f61d4 Merge: 21c423a6511f5 258435a1c8187 Author: Linus Walleij Date: Wed Jun 9 15:31:05 2021 +0200 Merge tag 'intel-pinctrl-v5.14-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.14-1 * Enabling pin controller on Intel Alder Lake-M The following is an automated git shortlog grouped by driver: tigerlake: - Add Alder Lake-M ACPI ID commit 21c423a6511f5a0639501a3100513666c8344372 Author: Matthias Brugger Date: Tue Jun 8 17:06:56 2021 +0200 pinctrl: mediatek: fix mode encoding Pin modes are encoded in the SoC data structure. Use that value to set IES SMT. Cc: Fabien Parent Cc: Sean Wang Cc: Mattijs Korpershoek Cc: linux-mediatek@lists.infradead.org Fixes: 696beef77521 ("pinctrl: mediatek: move bit assignment") Signed-off-by: Matthias Brugger Signed-off-by: Matthias Brugger Link: https://lore.kernel.org/r/20210608150656.29007-1-matthias.bgg@kernel.org Signed-off-by: Linus Walleij commit 884af72c90016cfccd5717439c86b48702cbf184 Author: Zou Wei Date: Tue Jun 8 14:34:08 2021 +0800 pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq() Add the missing unlock before return from function mcp23s08_irq() in the error handling case. v1-->v2: remove the "return IRQ_HANDLED" line Fixes: 897120d41e7a ("pinctrl: mcp23s08: fix race condition in irq handler") Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1623134048-56051-1-git-send-email-zou_wei@huawei.com Signed-off-by: Linus Walleij commit 17aa26c96fb240de92db90ec1bfd616f28b6dc16 Author: Zou Wei Date: Tue Jun 8 20:35:32 2021 +0800 PNP: pnpbios: Use list_for_each_entry() instead of list_for_each() Use list_for_each_entry() instead of list_for_each() where applicable. Reported-by: Hulk Robot Signed-off-by: Zou Wei [ rjw: Subject and changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 20827dddf27d433e45703a4f9bf0a66ab957dd0c Author: Baokun Li Date: Wed Jun 9 15:14:30 2021 +0800 misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c. Reported-by: Hulk Robot Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20210609071430.1337400-1-libaokun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 432b6c56075071c5614beb895e4d9ba9fb378d3d Author: Colin Ian King Date: Thu Jun 3 14:12:10 2021 +0100 habanalabs/gaudi: remove redundant assignment to variable err The variable err is being assigned a value that is never read, the assignment is redundant and can be removed. Also remove some empty lines. Reviewed-by: Oded Gabbay Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210603131210.84763-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 8923557bd579f303088c1a20dc0b93669c7f8695 Author: Tom Rix Date: Tue Jun 8 14:23:49 2021 -0700 fpga: stratix10-soc: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-12-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 25feb31d26a90d5bd6ec335368bc77c8d4b5842f Author: Tom Rix Date: Tue Jun 8 14:23:48 2021 -0700 fpga: of-fpga-region: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-11-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 011c49e3703854e52c0fb88f22cf38aca1d4d514 Author: Tom Rix Date: Tue Jun 8 14:23:47 2021 -0700 fpga: region: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-10-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 895ec9c09aa77e9f0129576995cb21191d3958f1 Author: Tom Rix Date: Tue Jun 8 14:23:46 2021 -0700 fpga-mgr: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-9-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit e7555cf6c263d95d2bb2bddb5bb57c240f0d608a Author: Tom Rix Date: Tue Jun 8 14:23:45 2021 -0700 fpga: bridge: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-8-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit df82d2ecd9e85ef32afead1b7f9451c67b4e9a21 Author: Tom Rix Date: Tue Jun 8 14:23:44 2021 -0700 fpga: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-7-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 987b741c52c7c6c68d46fbaeb95b8d1087f10b7f Author: Tom Rix Date: Tue Jun 8 14:23:42 2021 -0700 Documentation: ocxl.rst: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20210608212350.3029742-5-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit f7c2e792c6fe556c68b7771f1596cab978a43f26 Author: Tom Rix Date: Tue Jun 8 14:23:41 2021 -0700 Documentation: fpga: dfl: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-4-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 0508c477907b970a53153365e01463805238a052 Author: Tom Rix Date: Tue Jun 8 14:23:40 2021 -0700 dt-bindings: fpga: fpga-region: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-3-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 70010556b158a0fefe43415fb0c58347dcce7da0 Author: Sudeep Holla Date: Tue Jun 8 15:51:33 2021 +0100 arm64: dts: juno: Update SCPI nodes as per the YAML schema The SCPI YAML schema expects standard node names for clocks and power domain controllers. Fix those as per the schema for Juno platforms. Link: https://lore.kernel.org/r/20210608145133.2088631-1-sudeep.holla@arm.com Signed-off-by: Sudeep Holla commit b7c11876d24bdd7ae3feeaa771b8f903f6cf05eb Author: Andy Lutomirski Date: Tue Jun 8 16:36:23 2021 +0200 selftests/x86: Test signal frame XSTATE header corruption handling This is very heavily based on some code from Thomas Gleixner. On a system without XSAVES, it triggers the WARN_ON(): Bad FPU state detected at copy_kernel_to_fpregs+0x2f/0x40, reinitializing FPU registers. [ bp: Massage in nitpicks. ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Rik van Riel Link: https://lkml.kernel.org/r/20210608144346.234764986@linutronix.de commit f72a249b0ba85564c6bfa94d609a70567485a061 Author: Andy Lutomirski Date: Tue Jun 8 16:36:22 2021 +0200 x86/fpu: Add address range checks to copy_user_to_xstate() copy_user_to_xstate() uses __copy_from_user(), which provides a negligible speedup. Fortunately, both call sites are at least almost correct. __fpu__restore_sig() checks access_ok() with xstate_sigframe_size() length and ptrace regset access uses fpu_user_xstate_size. These should be valid upper bounds on the length, so, at worst, this would cause spurious failures and not accesses to kernel memory. Nonetheless, this is far more fragile than necessary and none of these callers are in a hotpath. Use copy_from_user() instead. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Rik van Riel Link: https://lkml.kernel.org/r/20210608144346.140254130@linutronix.de commit d208cbb0024ec0a5878bfd6c757c7f01872201ea Author: Christophe JAILLET Date: Sat Jun 5 18:53:47 2021 +0200 misc/pvpanic: Remove some dead-code 'pvpanic_remove()' is referenced only by a 'devm_add_action_or_reset()' call in 'devm_pvpanic_probe()'. So, we know that its parameter is non-NULL. Axe the unneeded check to save a few lines of code. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/8e425618f4042a8ab8366be4d34026972e77bd40.1622911768.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 3d42c93e5fc9e67e0023b7242097f1c1c2cead01 Author: Mauro Carvalho Chehab Date: Wed Jun 9 14:43:16 2021 +0200 media: dmxdev: change the check for problems allocing secfeed While the logic there is right, it tricks static check analyzers, like smatch: drivers/media/dvb-core/dmxdev.c:729 dvb_dmxdev_filter_start() error: we previously assumed '*secfeed' could be null (see line 719) Because the implementation of the filter itself is made via a callback, with its real implementation at the dvbdmx_allocate_section_feed() inside dvb_demux.c. So, change the check logic to make it clear that the function will not try to use *secfeed == NULL. Signed-off-by: Mauro Carvalho Chehab commit a69008475fc565cec5a760f1997f326773c84aac Author: Shaokun Zhang Date: Mon Jun 7 18:48:53 2021 +0800 vt: vt_kern.h, remove the repeated declaration Function 'vt_set_led_state' is declared twice, so remove the repeated declaration. Cc: Jiri Slaby Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1623062933-52943-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit e2129550de99a7654f323eb332c337314bd6b592 Author: Baokun Li Date: Tue Jun 8 10:48:43 2021 +0800 tty: tty_ldisc: fix doc warnings in tty_ldisc.c Fixes the following W=1 kernel build warning(s): drivers/tty/tty_ldisc.c:63: warning: Excess function parameter 'disc' description in 'tty_register_ldisc' drivers/tty/tty_ldisc.c:90: warning: Function parameter or member 'ldisc' not described in 'tty_unregister_ldisc' drivers/tty/tty_ldisc.c:90: warning: Excess function parameter 'disc' description in 'tty_unregister_ldisc' Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20210608024843.2756746-1-libaokun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7d356a438b2466a3a9ca1b916aaf198d05f2b3e4 Author: Andy Shevchenko Date: Tue Jun 8 17:42:38 2021 +0300 serial: 8250_exar: Extract exar_get_platform() helper We would like to use DMI matching in other functions as well. Hence, extract it as exar_get_platform() helper function. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210608144239.12697-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e901000aa6d0b0d428839aa142c698825d76da7f Author: Geert Uytterhoeven Date: Mon Jun 7 16:43:45 2021 +0200 serial: sh-sci: Remove unused STEPFN() macro The last user of the STEPFN() macro was removed in commit d5cb1319a91d4f13 ("serial: sh-sci: Remove manual break debouncing"). Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/970387d104dea5bb7ea674bb89229641467e629b.1623076891.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 0ec4e55e9f571f08970ed115ec0addc691eda613 Author: Hui Wang Date: Wed Jun 9 10:14:42 2021 +0800 ACPI: resources: Add checks for ACPI IRQ override The laptop keyboard doesn't work on many MEDION notebooks, but the keyboard works well under Windows and Unix. Through debugging, we found this log in the dmesg: ACPI: IRQ 1 override to edge, high pnp 00:03: Plug and Play ACPI device, IDs PNP0303 (active) And we checked the IRQ definition in the DSDT, it is: IRQ (Level, ActiveLow, Exclusive, ) {1} So the BIOS defines the keyboard IRQ to Level_Low, but the Linux kernel override it to Edge_High. If the Linux kernel is modified to skip the IRQ override, the keyboard will work normally. From the existing comment in acpi_dev_get_irqresource(), the override function only needs to be called when IRQ() or IRQNoFlags() is used to populate the resource descriptor, and according to Section 6.4.2.1 of ACPI 6.4 [1], if IRQ() is empty or IRQNoFlags() is used, the IRQ is High true, edge sensitive and non-shareable. ACPICA also assumes that to be the case (see acpi_rs_set_irq[] in rsirq.c). In accordance with the above, check 3 additional conditions (EdgeSensitive, ActiveHigh and Exclusive) when deciding whether or not to treat an ACPI_RESOURCE_TYPE_IRQ resource as "legacy", in which case the IRQ override is applicable to it. Link: https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#irq-descriptor # [1] BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213031 BugLink: http://bugs.launchpad.net/bugs/1909814 Suggested-by: Rafael J. Wysocki Reported-by: Manuel Krause Tested-by: Manuel Krause Signed-off-by: Hui Wang [ rjw: Subject rewrite, changelog edits ] Signed-off-by: Rafael J. Wysocki commit 3cac092a05d80ef2eb63e788329bd72b6e764069 Author: Colin Ian King Date: Wed Jun 9 13:06:17 2021 +0100 staging: gdm724x: emove redundant initialization of variable hci_len The variable hci_len is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210609120617.185975-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 5bd9e94a11ab76b656c897609b7e0e2bf1e87d09 Author: Dan Carpenter Date: Mon Jun 7 21:19:00 2021 +0300 staging: rtl8188eu: delete some dead code Calling rtw_free_xmitframe() with a NULL "pxmitframe" parameter is a no-op. It appears that originally this code was part of a loop but it was already dead code by the time that the driver was merged into the kernel. Fixes: 7bc88639ad36 ("staging: r8188eu: Add files for new driver - part 17") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5jFF9ldj0W9P1f@mwanda Signed-off-by: Greg Kroah-Hartman commit a56d78b5d00db51676cf211e41ec42285fb4a573 Author: Dan Carpenter Date: Mon Jun 7 21:18:25 2021 +0300 staging: rtl8188eu: use safe iterator in rtl8188eu_xmitframe_complete() This loop calls rtw_free_xmitframe(pxmitpriv, pxmitframe) which removes "pxmitframe" (our list iterator) from the list. So to prevent a forever loop we need to use a safe list iterator. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5i8W7BNla2DlrW@mwanda Signed-off-by: Greg Kroah-Hartman commit 629132b3d523bef7b32657e17c0edc1cdaae7e0a Author: Dan Carpenter Date: Mon Jun 7 21:18:13 2021 +0300 staging: rtl8188eu: use safe iterator in xmit_delivery_enabled_frames() This loop calls list_del_init(&pxmitframe->list) and "pxmitframe" is the list iterator so it leads to a forever loop. We need to use a _safe() iterator to fix this. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5i5aVMQ3CZ5wuQ@mwanda Signed-off-by: Greg Kroah-Hartman commit c47bcff9ae42c1cb24c828401f2681003b601564 Author: Dan Carpenter Date: Mon Jun 7 21:17:57 2021 +0300 staging: rtl8188eu: use safe iterator in wakeup_sta_to_xmit() These two loops call list_del_init() on the list iterator so they need to use the _safe() iterator to prevent a forever loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5i1ZAAAB4vSWef@mwanda Signed-off-by: Greg Kroah-Hartman commit e0f489a25a9928da72dbf697ec52e987041c8dd1 Author: Dan Carpenter Date: Mon Jun 7 21:17:43 2021 +0300 staging: rtl8188eu: use safe iterator in dequeue_xmitframes_to_sleeping_queue() On some code paths the xmitframe_enqueue_for_sleeping_sta() function can call list_del_init(&pxmitframe->list) which would lead to a forever loop because "pxmitframe" is the list iterator. Use the _safe version of the iterator to prevent this. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5ixzKaYKkpHhky@mwanda Signed-off-by: Greg Kroah-Hartman commit b5e944c50cbd10bc35d08b3093de83df10949f17 Author: Dan Carpenter Date: Mon Jun 7 21:17:30 2021 +0300 staging: rtl8188eu: use safe iterator in tx_beacon_hdl() This loop calls list_del_init() on the list iterator so it has to use the _safe() iterator or it leads to an endless loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5iunD5ilf+mKPR@mwanda Signed-off-by: Greg Kroah-Hartman commit 535ca63b2ae2a2f275033c7113c0c30fab2a6763 Author: Dan Carpenter Date: Mon Jun 7 21:17:11 2021 +0300 staging: rtl8188eu: use safe iterator in stop_ap_mode() This loop calls list_del_init() on the list iterator so it can result in a forever loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Reviewed-by: Guenter Roeck Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YL5ip4yz9NEB9RZO@mwanda Signed-off-by: Greg Kroah-Hartman commit 3c67430b7f5a1be75b7cdb96f3e3769d8114765f Author: Fabio Aiuto Date: Mon Jun 7 15:46:18 2021 +0200 staging: rtl8723bs: use list_for_each_safe in loops deleting iterated items Fix some beautified loops over linked lists. Use list_for_each_safe on loops which could delete objects in the list. Fixes: b3cd518c5abd ("staging: rtl8723bs: Use list iterators and helpers") Suggested-by: Guenter Roeck Tested-by: Fabio Aiuto Reviewed-by: Guenter Roeck Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210607134618.11237-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7973bfefb5ad43fbba72607ed72d916ce5ebb4cc Author: Liu Shixin Date: Wed Jun 9 16:56:50 2021 +0800 staging: rtl8188eu: Use eth_broadcast_addr() to assign broadcast address Simplify the code by using eth_broadcast_addr() to assign broadcast address and removing the unnecessary variable bc_addr. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20210609085650.1269008-2-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit fe5fcefc9130ce80cda024ab44c7353a67df5cb6 Author: Liu Shixin Date: Wed Jun 9 16:56:49 2021 +0800 staging: rtl8188eu: Use is_{zero/broadcast}_ether_addr() instead of memcmp() Simplify the code by using is_{zero/broadcast}_ether_addr() instead of directly using memcmp() to determine if the ethernet address is all zeros or broadcast address. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20210609085650.1269008-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5697686ed4eda64114b50e6e09d5c647d091b873 Author: Tom Rix Date: Tue Jun 8 14:23:50 2021 -0700 staging: fpgaboot: change FPGA indirect article to an Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20210608212350.3029742-13-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 978d7f0978ef74c8910cedecaa93b686b3a91bc0 Author: Fabio M. De Francesco Date: Tue Jun 8 13:21:18 2021 +0200 staging: rtl8723bs: hal: Delete tests with no effects Deleted tests with no effects. Detected by Coccinelle. It seems that these tests have been inadvertently left while removing BTC_PRINT logs in commit 8e30fb99d729. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210608112118.1213-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit f0516d2e8860df8f4ab3a01b8134dd30ef3d5479 Author: Martin Kaiser Date: Sat Jun 5 18:58:58 2021 +0200 staging: rtl8188eu: remove unused function parameter The loadparam function does not need a struct net_device. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 56b02ba0d2ab065d8432c68991dc381330a0421b Author: Martin Kaiser Date: Sat Jun 5 18:58:57 2021 +0200 staging: rtl8188eu: use standard kthread handling The driver defines its own completion to wait until the command thread is stopped. Use kthread_stop instead and check kthread_should_stop in the thread's main loop. (For now, we keep the driver's "emergency exit" via bDriverStopped/bSurpriseRemoved.) To check if the command thread is running, the driver stores the thread's task_struct and a boolean status variable. Remove this status and check the task_struct directly. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0e37b86d1fcaf2a5ed0f8e3b2e55c05818d9fc61 Author: Martin Kaiser Date: Sat Jun 5 18:58:56 2021 +0200 staging: rtl8188eu: use existing define for ethernet header len Replace the driver's internal define with ETH_HLEN. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 4b3201b71b97b8909411d618c80bcc3674c2eb1e Author: Martin Kaiser Date: Sat Jun 5 18:58:55 2021 +0200 staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from usb_ops_linux.c As said elsewhere, these prints are disabled by default. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0acd0c57027f57bf60a43acc73a1294ff3318dd9 Author: Martin Kaiser Date: Sat Jun 5 18:58:54 2021 +0200 staging: rtl8188eu: simplify rtw_get_wireless_stats Remove unnecessary temporary variables. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit cda915c9c2a3feb725b33718c7f8166e2598a389 Author: Martin Kaiser Date: Sat Jun 5 18:58:53 2021 +0200 staging: rtl8188eu: make rtw_free_recvframe return void None of the callers checks the return value of rtw_free_recvframe. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit d3f3fb9810ac51b18088201c72583cd07cce0db6 Author: Martin Kaiser Date: Sat Jun 5 18:58:52 2021 +0200 staging: rtl8188eu: refactor rtw_lps_ctrl_wk_cmd Allocate memory only if we're asked to enqueue the command for later processing. Handle memory allocation failures in one place. There's no need to "goto exit" if we're not doing any cleanup there. kzalloc already set all of pdrvextra_cmd_parm to 0. We don't have to set pdrvextra_cmd_parm->pbuf = NULL manually. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b17aad8b567f47c029430486ba0c54a3abdbd4e3 Author: Martin Kaiser Date: Sat Jun 5 18:58:51 2021 +0200 staging: rtl8188eu: remove RT_TRACE and DBG_88E prints from rtw_cmd.c The rtl8188eu driver implements driver-specific debug prints which use their own definitions for debug levels. By default, these prints are disabled. You'd have to modify the code or set a module parameter to enable them. The rtl8723bs staging driver has already removed those prints. We should do the same. Let's start with removing RT_TRACE and DBG_88E prints from rtw_cmd.c. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0a48e46c80c06743cdc438cf9e8b07115fb68f76 Author: Martin Kaiser Date: Sat Jun 5 18:58:50 2021 +0200 staging: rtl8188eu: remove unused RT_PRINT_DATA macro The RT_PRINT_DATA macro is not used. Remove it. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210605165858.3175-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 25203e32ce3ef9bfa363cfed7813c4fd7270ce45 Author: Sergio Paracuellos Date: Mon Jun 7 14:01:53 2021 +0200 staging: mt7621-pci: make use of 'pcie_port_write' Function 'mt7621_pcie_enable_port' is calculating an offset to write some port related registers. Instead of doing that just make use of already existent 'pcie_write_port' function and use virtualy mapped base address with registers. This increase readability and allow us to remove also two defitions not used else where. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210607120153.24989-7-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2d3d288f0eaf102c3739ad811fa9727c742a49e0 Author: Sergio Paracuellos Date: Mon Jun 7 14:01:52 2021 +0200 staging: mt7621-pci: parse some dt properties from root port child nodes Properties 'clocks', 'resets' and 'phys' have been moved from parent node to the root port children. Hence we have to adapt the way device tree is parsed in driver code to properly align things and make all the stuff work. Note that we moved from using 'devm_reset_control_get_exclusive() to 'of_reset_control_get_exclusive()' so we need to properly call the 'reset_control_put()' function manually in error and remove paths. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210607120153.24989-6-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf37f42997a10da6e07d5404fbf4b537d9be32ec Author: Sergio Paracuellos Date: Mon Jun 7 14:01:51 2021 +0200 staging: mt7621-dts: move some properties into root port child nodes After a review of the bindings 'clocks', 'resets' and 'phys' must be moved into root port child nodes. Hence, move all of them. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210607120153.24989-5-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 860bce4565b665adb889e61fb6d8227d99753a00 Author: Sergio Paracuellos Date: Mon Jun 7 14:01:50 2021 +0200 staging: mt7621-pci: use {readl|writel}_relaxed instead of readl/writel The driver does not perform DMA, so it's safe to use the relaxed version for both readl and writel operations. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210607120153.24989-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit aa6c32f9fe0de12f685d441faf9a73dd277af209 Author: Sergio Paracuellos Date: Mon Jun 7 14:01:49 2021 +0200 staging: mt7621-pci: remove 'RALINK_PCI_BAR0SETUP_ADDR' definition Instead of define RALINK_PCI_BAR0SETUP_ADDR just use standard pci defnition for this which is 'PCI_BASE_ADDRESS_0'. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210607120153.24989-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit a3bb1d050e436e5ad301491315ea42c9ac0821c5 Author: Sergio Paracuellos Date: Mon Jun 7 14:01:48 2021 +0200 staging: mt7621-pci: make cleaner 'mt7621_pcie_enable_ports' Function 'mt7621_pcie_enable_ports' call 'mt7621_pcie_enable_port' for each available pcie port. Instead of having two for loops there just move needed initialization. There is one setting that can be removed which is the set for 'PCI_COMMAND_MASTER' bit. Pci drivers are in charge of set that bit if is really needed and should be not a mission of the controller to do that. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210607120153.24989-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 48a74b1147f7db4623eaed591cc01eb740b871c0 Author: Thierry Reding Date: Wed Jun 9 13:28:06 2021 +0200 reset: Add compile-test stubs Add stubs for the reset controller registration functions to allow building reset controller provider drivers with the COMPILE_TEST Kconfig option enabled. Reported-by: Krzysztof Kozlowski Suggested-by: Dmitry Osipenko Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210609112806.3565057-3-thierry.reding@gmail.com Signed-off-by: Philipp Zabel commit 4ccf359849ce709f4bf0214b4b5b8b6891d38770 Author: Greg Kroah-Hartman Date: Wed Jun 9 09:19:18 2021 +0200 spi: remove spi_set_cs_timing() No one seems to be using this global and exported function, so remove it as it is no longer needed. Cc: Mark Brown Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210609071918.2852069-1-gregkh@linuxfoundation.org Signed-off-by: Mark Brown commit 916cccb5078eee57fce131c5fe18e417545083e2 Author: Mark Brown Date: Tue Jun 8 17:07:13 2021 +0100 ASoC: rt5645: Avoid upgrading static warnings to errors One of the fixes reverted as part of the UMN fallout was actually fine, however rather than undoing the revert the process that handled all this stuff resulted in a patch which attempted to add extra error checks instead. Unfortunately this new change wasn't really based on a good understanding of the subsystem APIs and bypassed the usual patch flow without ensuring it was reviewed by people with subsystem knowledge and was merged as a fix rather than during the merge window. The effect of the new fix is to upgrade what were previously warnings on static data in the code to hard errors on that data. If this actually happens then it would break existing systems, if it doesn't happen then the change has no effect so this was not a safe change to apply as a fix to the release candidates. Since the new code has not been tested and doesn't in practice improve error handling revert it instead, and also drop the original revert since the original fix was fine. This takes the driver back to what it was in -rc1. Fixes: 5e70b8e22b64e ("ASoC: rt5645: add error checking to rt5645_probe function") Fixes: 1e0ce84215dbf ("Revert "ASoC: rt5645: fix a NULL pointer dereference") Signed-off-by: Mark Brown Cc: Greg Kroah-Hartman Cc: Phillip Potter Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210608160713.21040-1-broonie@kernel.org Signed-off-by: Mark Brown commit c441bfb5f2866de71e092c1b9d866a65978dfe1a Merge: bcc0f0c078771 c4681547bcce7 Author: Mark Brown Date: Wed Jun 9 11:52:35 2021 +0100 Merge tag 'v5.13-rc3' into asoc-5.13 Linux 5.13-rc3 commit 22c2d71891558170ed6d1a6bfe08caba254eafc6 Author: Shawn Guo Date: Wed Jun 9 09:55:11 2021 +0800 iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI The struct acpi_platform_list and function acpi_match_platform_list() defined in include/linux/acpi.h are available only when CONFIG_ACPI is enabled. Add protection to fix the build issues with !CONFIG_ACPI. Reported-by: kernel test robot Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210609015511.3955-1-shawn.guo@linaro.org Signed-off-by: Will Deacon commit 6771fb0b940eb74f1a68fe3f180a7668103397d3 Merge: 54fd727f83a4d 41340965b4f80 Author: Greg Kroah-Hartman Date: Wed Jun 9 12:11:49 2021 +0200 Merge tag 'iio-for-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 1st set of new IIO/counter device support, features and cleanup for 5.14 There are a couple of large cleanup sets in here alongside a number of new drivers. Note an immutable branch merged to add a stub for i2c_verify_client() as needed to avoid a build issue in the fxls8962af driver as a result of a workaround for a device errata that only applies when i2c interface is used. Counters ======== New device support * intel,quadrature encoder peripheral found on Elkhart Lake platforms. - New driver. IIO === New device support * amstaos,tsl2591 ambient light sensor. - New driver + bindings - Follow up fix to ensure some local variables are suitable for error handling. * fsl,fxls8962af + fsl,fxls8964af accelerometers - New driver + bindings - Includes an errata work around that cause a build bot failure fixed by adding a stub to i2c. * kionix,kxcjk-1013 - Add support for KX023-1025 device. Mostly a different register map that needed to be supported. * murata,sca3300 accelerometer - New driver + bindings * st,lsm9ds0 IMU - Rework of st,sensors driver to cleanly support this new glue driver that enables the two parts of the LSM9DS0. * ti,tsc2046 touchscreen controller ADC. - New driver. Intent here is to use this with existing IIO consumer drivers such as resistive-adc-touch. - Follow up fix to avoid an issue with unsigned subtraction in error check. * ti,tmp117 digital temperature sensor - New driver + bindings Features * adi,ad5755 - Add missing dt-binding doc * adi,ad7298 - Add ACPI ID used on Intel Galileo Gen 1 boards. - Add missing dt-binding doc * adi,ad7476 - Add missing dt-binding doc * adi,ad7746 - Add missing dt-binding doc for this driver that will hopefully move out of staging shortly. Update staging driver to use the binding instead of platform data. * adi,adis16201 + adis16209 - Add missing dt-binding doc * adi,adis16480 - Support burst mode for adis16495 and adis16497 parts. * bosch,bma220 - Add missing dt-binding doc * fsl,mma7455 - Add missing dt-binding doc * iio-rescale - Support handling of processed channels from provider. Some ADCs require (typically non linear) calibration functions to be applied, and so provide only IIO_CHAN_INFO_PROCESSED read back. They can be used as providers to the iio-rescale driver which needs to handle them somewhat differently from IIO_CHAN_INFO_RAW * sensiron,sps30 - Support the serial interface. Note this required significant refactoring of existing driver. * st,st-sensors - Add mount matrix support for normal dt-binding whilst continuing to support the odd ACPI approach for accelerometers. * ti,dac082s085 + similar - Add missing dt-binding doc * trivial-devices - add entries for - memsic,mx4005, memsic,mx6255 and memsic,mxc6655 - sensortek,stk8312 and sensortek,stk8ba50 Cleanup / minor fixes * core - Use devm_add_action_or_reset() to replace boilerplate in several driver and core IIO devm_* functions. - Fix an error path issue introduced by above, that could return an error pointer rather than the expected null from dev_iio_device_alloc() - Move more IIO internals related fields from struct iio_dev to struct iio_dev_opaque. - Drop unused final update of in_loc in demux setup. * Docs - Move some docs from driver specific to core dos to avoid replication of names which the documentation builder does not allow. Note this means adding a few device specific notes to the general docs to cover the more unusual uses of the ABI. - ABI: Move old buffer/* and scan_elements/* docs to obsolete as now we have the bufferX/* variant. Not we are not getting rid of these interfaces, just encouraging new code to use the new interface. * IIO wide: - Tidy up new cases of dev.parent etc being set in drivers as the core now does it. - Fix more cases of possible miss-aligned buffers when passed to iio_push_to_buffers_with_timestamp(). Note we only have one known instance of anyone seeing this bug actually happening, so this has been a low priority cleanup effort for several cycles. - sysfs_emit() used in more drivers. - Runtime pm tidy up and use of pm_runtime_resume_and_get() - Buffer alignment fixes as iio_push_to_buffers_with_timestamp requires that the timestamp when inserted by naturally aligned + consumers can assume that all fields are naturally aligned. Part of a long running effort, with at least 2 more series to come tackling additional variants. - Stop specifying "mount-matrix" property name in every lookup of the mount matrix from firmware by hard coding it in the core. * adi,ad7476 - Handle the variety of different regulators used by the parts supported by this driver (came up in dt-binding review) * adi,ad7746 - Trivial drop of if (ret) return ret; return 0; pattern - Tidy up comments - Pull capdac setup out to own function. * adi,ad7766 - Trivial drop of if (ret) return ret; return 0; pattern * adi,adis - Avoid returning error codes in interrupt handlers. - Handle a failure in spi_write in the trigger handler. - Rework to add updating of device page after changing it. - Don't push data to IIO buffers when read failed. - Add configuration of burst max speed to core avoid handling this in each driver. - Use the adis_dev_lock() helper in adis16260 and adis16136 drivers. - Excessive includes cleanup via include-what-you-use static checker after zero day highlighted that these needed updating. * afe - Amend binding to add #io-channel-cells, thus allowing this IIO consumer to also be an IIO provider. * aosong,am2315 - Drop ACPI id. Unlikely this one is in the wild and it isn't valid ACPI naming. * bosch,bma180 - Adding missing bandwidth settings (500, 1000 Hz) * bosch,bme680 - Drop ACPI id. Unlikely this one is in the wild and it isn't valid ACPI naming. * ep93xx_adc, - Drop a redundant error print. * maxim,max118 - Convert remainder of probe() to devm_ managed functions. - Avoid some repeated jumping back and forth between iio_dev and spi structures. * maxim,max11100 - Use get_unaligned_be16() instead of open coding. - Convert remainder of probe() to devm_ managed functions. * samsung,exynos_adc - Unused error value dropped. * sensiron,sgp30 - Drop use of %hx in favor of %x and letting the normal type conversion work. * sensortek,stk8312 - Add lowercase device id and note uppercase version deprecated. - Drop ACPI id. Unlikely this one is in the wild and it isn't valid ACPI naming. * sprx,sc72xx_adc - add MODULE_DEVICE_TABLE * st,lsm6dsx - Fix docs of valid ODRs * st,sensors - dt-binding rework. Two efforts on this crossed in a previous cycle so this update cherry picks the best of the two yaml conversions. - Don't copy the channel spec array as now ext_info is no longer modified. * st,stm32-adc - tidy up some docs that were marked as kernel-doc but aren't. * ti,adc081c, ti,adc0832, ti,adc108s102 and ti,adc161s626 - Convert remainder of probe() functions to devm_ managed functions to simplify error handing and remove paths. * tag 'iio-for-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (171 commits) i2c: core: Add stub for i2c_verify_client() if !CONFIG_I2C iio: adis: Cleanout unused headers iio: accel: bma180: Add missing 500 Hz / 1000 Hz bandwidth counter: Add support for Intel Quadrature Encoder Peripheral staging: iio: cdc: ad7746: extract capac setup to own function staging: iio: cdc: ad7746: clean up probe return staging: iio: cdc: ad7746: remove ordinary comments iio: adc: ti-adc161s626: Use devm managed functions for all of probe. iio: adc: ti-adc108s102: Use devm managed functions for all of probe() iio: adc: ti-adc0832: Use devm managed functions for all of probe() iio: adc: ti-adc081c: Use devm managed functions for all of probe() iio: adc: max1118: Avoid jumping back and forth between spi and iio structures iio: adc: max1118: Use devm_ managed functions for all of probe iio: adc: max11100: Use devm_ functions for rest of probe() iio: adc: max11100: Use get_unaligned_be16() rather than opencoding. iio: chemical: sgp30: Drop use of %hx in format string. iio: gyro: st_gyro: Support mount matrix iio: magnetometer: st_magn: Support mount matrix iio: accel: st_sensors: Stop copying channels iio: accel: st_sensors: Support generic mounting matrix ... commit 54fd727f83a4d2f9c6e85cb1fad88325a56b555f Author: Fabio M. De Francesco Date: Sun Jun 6 05:40:38 2021 +0200 staging: rtl8712: Remove unnecessary alias of printk() This module defines four alias for printk(). Removed them all, because they are not used anywhere else in the driver. Converted the only exception to the explicit use of printk(). Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210606034038.9657-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit e89bb4288378b85c82212b60dc98ecda6b3d3a70 Author: Ruslan Bilovol Date: Fri Jun 4 00:01:04 2021 +0200 usb: gadget: u_audio: add real feedback implementation This adds interface between userspace and feedback endpoint to report real feedback frequency to the Host. Current implementation adds new userspace interface ALSA mixer control "Capture Pitch 1000000" (similar to aloop driver's "PCM Rate Shift 100000" mixer control) Value in PPM is chosen to have correction value agnostic of the actual HW rate, which the application is not necessarily dealing with, while still retaining a good enough precision to allow smooth clock correction on the playback side, if necessary. Similar to sound/usb/endpoint.c, a slow down is allowed up to 25%. This has no impact on the required bandwidth. Speedup correction has an impact on the bandwidth reserved for the isochronous endpoint. The default allowed speedup is 500ppm. This seems to be more than enough but, if necessary, this is configurable through a module parameter. The reserved bandwidth is rounded up to the next packet size. Usage of this new control is easy to implement in existing userspace tools like alsaloop from alsa-utils. Signed-off-by: Ruslan Bilovol Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210603220104.1216001-4-jbrunet@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 40c73b30546e759bedcec607fedc2d4be954508f Author: Ruslan Bilovol Date: Fri Jun 4 00:01:03 2021 +0200 usb: gadget: f_uac2: add adaptive sync support for capture Current f_uac2 USB OUT (aka 'capture') synchronization implements 'ASYNC' scenario which means USB Gadget has it's own freerunning clock and can update Host about real clock frequency through feedback endpoint so Host can align number of samples sent to the USB gadget to prevent overruns/underruns In case if Gadget can has no it's internal clock and can consume audio samples at any rate (for example, on the Gadget side someone records audio directly to a file, or audio samples are played through an external DAC as soon as they arrive), UAC2 spec suggests 'ADAPTIVE' synchronization type. Change UAC2 driver to make it configurable through additional 'c_sync' configfs file. Default remains 'asynchronous' with possibility to switch it to 'adaptive' Signed-off-by: Ruslan Bilovol Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210603220104.1216001-3-jbrunet@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 24f779dac8f3efb9629adc0e486914d93dc45517 Author: Ruslan Bilovol Date: Fri Jun 4 00:01:02 2021 +0200 usb: gadget: f_uac2/u_audio: add feedback endpoint support As per USB and UAC2 specs, asynchronous audio sink endpoint requires explicit synchronization mechanism (Isochronous Feedback Endpoint) Implement feedback companion endpoint for ISO OUT endpoint This patch adds all required infrastructure and USB requests handling for feedback endpoint. Syncrhonization itself is still dummy (feedback ep always reports 'nomimal frequency' e.g. no adjustement is needed). This satisfies hosts that require feedback endpoint (like Win10) and poll it periodically Actual synchronization mechanism should be implemented separately Signed-off-by: Ruslan Bilovol Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210603220104.1216001-2-jbrunet@baylibre.com Signed-off-by: Greg Kroah-Hartman commit aafe93516b8567ab5864e1f4cd3eeabc54fb0e5a Author: Clément Lassieur Date: Thu Jun 3 17:59:21 2021 +0200 usb: dwc2: Don't reset the core after setting turnaround time Every time the hub signals a reset while we (device) are hsotg->connected, dwc2_hsotg_core_init_disconnected() is called, which in turn calls dwc2_hs_phy_init(). GUSBCFG.USBTrdTim is cleared upon Core Soft Reset, so if hsotg->params.phy_utmi_width is 8-bit, the value of GUSBCFG.USBTrdTim (the default one: 0x5, corresponding to 16-bit) is always different from hsotg->params.phy_utmi_width, thus dwc2_core_reset() is called every time (usbcfg != usbcfg_old), which causes 2 issues: 1) The call to dwc2_core_reset() does another reset 300us after the initial Chirp K of the first reset (which should last at least Tuch = 1ms), and messes up the High-speed Detection Handshake: both hub and device drive current into the D+ and D- lines at the same time. 2) GUSBCFG.USBTrdTim is cleared by the second reset, so its value is always the default one (0x5). Setting GUSBCFG.USBTrdTim after the potential call to dwc2_core_reset() fixes both issues. It is now set even when select_phy is false because the cost of the Core Soft Reset is removed. Fixes: 1e868545f2bb ("usb: dwc2: gadget: Move gadget phy init into core phy init") Signed-off-by: Clément Lassieur Link: https://lore.kernel.org/r/20210603155921.940651-1-clement@lassieur.org Signed-off-by: Greg Kroah-Hartman commit ecfbd7b9054bddb12cea07fda41bb3a79a7b0149 Author: Andrew Gabbasov Date: Thu Jun 3 12:15:07 2021 -0500 usb: gadget: f_fs: Fix setting of device and driver data cross-references FunctionFS device structure 'struct ffs_dev' and driver data structure 'struct ffs_data' are bound to each other with cross-reference pointers 'ffs_data->private_data' and 'ffs_dev->ffs_data'. While the first one is supposed to be valid through the whole life of 'struct ffs_data' (and while 'struct ffs_dev' exists non-freed), the second one is cleared in 'ffs_closed()' (called from 'ffs_data_reset()' or the last 'ffs_data_put()'). This can be called several times, alternating in different order with 'ffs_free_inst()', that, if possible, clears the other cross-reference. As a result, different cases of these calls order may leave stale cross-reference pointers, used when the pointed structure is already freed. Even if it occasionally doesn't cause kernel crash, this error is reported by KASAN-enabled kernel configuration. For example, the case [last 'ffs_data_put()' - 'ffs_free_inst()'] was fixed by commit cdafb6d8b8da ("usb: gadget: f_fs: Fix use-after-free in ffs_free_inst"). The other case ['ffs_data_reset()' - 'ffs_free_inst()' - 'ffs_data_put()'] now causes KASAN reported error [1], when 'ffs_data_reset()' clears 'ffs_dev->ffs_data', then 'ffs_free_inst()' frees the 'struct ffs_dev', but can't clear 'ffs_data->private_data', which is then accessed in 'ffs_closed()' called from 'ffs_data_put()'. This happens since 'ffs_dev->ffs_data' reference is cleared too early. Moreover, one more use case, when 'ffs_free_inst()' is called immediately after mounting FunctionFS device (that is before the descriptors are written and 'ffs_ready()' is called), and then 'ffs_data_reset()' or 'ffs_data_put()' is called from accessing "ep0" file or unmounting the device. This causes KASAN error report like [2], since 'ffs_dev->ffs_data' is not yet set when 'ffs_free_inst()' can't properly clear 'ffs_data->private_data', that is later accessed to freed structure. Fix these (and may be other) cases of stale pointers access by moving setting and clearing of the mentioned cross-references to the single places, setting both of them when 'struct ffs_data' is created and bound to 'struct ffs_dev', and clearing both of them when one of the structures is destroyed. It seems convenient to make this pointer initialization and structures binding in 'ffs_acquire_dev()' and make pointers clearing in 'ffs_release_dev()'. This required some changes in these functions parameters and return types. Also, 'ffs_release_dev()' calling requires some cleanup, fixing minor issues, like (1) 'ffs_release_dev()' is not called if 'ffs_free_inst()' is called without unmounting the device, and "release_dev" callback is not called at all, or (2) "release_dev" callback is called before "ffs_closed" callback on unmounting, which seems to be not correctly nested with "acquire_dev" and "ffs_ready" callbacks. Make this cleanup togther with other mentioned 'ffs_release_dev()' changes. [1] ================================================================== root@rcar-gen3:~# mkdir /dev/cfs root@rcar-gen3:~# mkdir /dev/ffs root@rcar-gen3:~# modprobe libcomposite root@rcar-gen3:~# mount -t configfs none /dev/cfs root@rcar-gen3:~# mkdir /dev/cfs/usb_gadget/g1 root@rcar-gen3:~# mkdir /dev/cfs/usb_gadget/g1/functions/ffs.ffs [ 64.340664] file system registered root@rcar-gen3:~# mount -t functionfs ffs /dev/ffs root@rcar-gen3:~# cd /dev/ffs root@rcar-gen3:/dev/ffs# /home/root/ffs-test ffs-test: info: ep0: writing descriptors (in v2 format) [ 83.181442] read descriptors [ 83.186085] read strings ffs-test: info: ep0: writing strings ffs-test: dbg: ep1: starting ffs-test: dbg: ep2: starting ffs-test: info: ep1: starts ffs-test: info: ep2: starts ffs-test: info: ep0: starts ^C root@rcar-gen3:/dev/ffs# cd /home/root/ root@rcar-gen3:~# rmdir /dev/cfs/usb_gadget/g1/functions/ffs.ffs [ 98.935061] unloading root@rcar-gen3:~# umount /dev/ffs [ 102.734301] ================================================================== [ 102.742059] BUG: KASAN: use-after-free in ffs_release_dev+0x64/0xa8 [usb_f_fs] [ 102.749683] Write of size 1 at addr ffff0004d46ff549 by task umount/2997 [ 102.756709] [ 102.758311] CPU: 0 PID: 2997 Comm: umount Not tainted 5.13.0-rc4+ #8 [ 102.764971] Hardware name: Renesas Salvator-X board based on r8a77951 (DT) [ 102.772179] Call trace: [ 102.774779] dump_backtrace+0x0/0x330 [ 102.778653] show_stack+0x20/0x2c [ 102.782152] dump_stack+0x11c/0x1ac [ 102.785833] print_address_description.constprop.0+0x30/0x274 [ 102.791862] kasan_report+0x14c/0x1c8 [ 102.795719] __asan_report_store1_noabort+0x34/0x58 [ 102.800840] ffs_release_dev+0x64/0xa8 [usb_f_fs] [ 102.805801] ffs_fs_kill_sb+0x50/0x84 [usb_f_fs] [ 102.810663] deactivate_locked_super+0xa0/0xf0 [ 102.815339] deactivate_super+0x98/0xac [ 102.819378] cleanup_mnt+0xd0/0x1b0 [ 102.823057] __cleanup_mnt+0x1c/0x28 [ 102.826823] task_work_run+0x104/0x180 [ 102.830774] do_notify_resume+0x458/0x14e0 [ 102.835083] work_pending+0xc/0x5f8 [ 102.838762] [ 102.840357] Allocated by task 2988: [ 102.844032] kasan_save_stack+0x28/0x58 [ 102.848071] kasan_set_track+0x28/0x3c [ 102.852016] ____kasan_kmalloc+0x84/0x9c [ 102.856142] __kasan_kmalloc+0x10/0x1c [ 102.860088] __kmalloc+0x214/0x2f8 [ 102.863678] kzalloc.constprop.0+0x14/0x20 [usb_f_fs] [ 102.868990] ffs_alloc_inst+0x8c/0x208 [usb_f_fs] [ 102.873942] try_get_usb_function_instance+0xf0/0x164 [libcomposite] [ 102.880629] usb_get_function_instance+0x64/0x68 [libcomposite] [ 102.886858] function_make+0x128/0x1ec [libcomposite] [ 102.892185] configfs_mkdir+0x330/0x590 [configfs] [ 102.897245] vfs_mkdir+0x12c/0x1bc [ 102.900835] do_mkdirat+0x180/0x1d0 [ 102.904513] __arm64_sys_mkdirat+0x80/0x94 [ 102.908822] invoke_syscall+0xf8/0x25c [ 102.912772] el0_svc_common.constprop.0+0x150/0x1a0 [ 102.917891] do_el0_svc+0xa0/0xd4 [ 102.921386] el0_svc+0x24/0x34 [ 102.924613] el0_sync_handler+0xcc/0x154 [ 102.928743] el0_sync+0x198/0x1c0 [ 102.932238] [ 102.933832] Freed by task 2996: [ 102.937144] kasan_save_stack+0x28/0x58 [ 102.941181] kasan_set_track+0x28/0x3c [ 102.945128] kasan_set_free_info+0x28/0x4c [ 102.949435] ____kasan_slab_free+0x104/0x118 [ 102.953921] __kasan_slab_free+0x18/0x24 [ 102.958047] slab_free_freelist_hook+0x148/0x1f0 [ 102.962897] kfree+0x318/0x440 [ 102.966123] ffs_free_inst+0x164/0x2d8 [usb_f_fs] [ 102.971075] usb_put_function_instance+0x84/0xa4 [libcomposite] [ 102.977302] ffs_attr_release+0x18/0x24 [usb_f_fs] [ 102.982344] config_item_put+0x140/0x1a4 [configfs] [ 102.987486] configfs_rmdir+0x3fc/0x518 [configfs] [ 102.992535] vfs_rmdir+0x114/0x234 [ 102.996122] do_rmdir+0x274/0x2b0 [ 102.999617] __arm64_sys_unlinkat+0x94/0xc8 [ 103.004015] invoke_syscall+0xf8/0x25c [ 103.007961] el0_svc_common.constprop.0+0x150/0x1a0 [ 103.013080] do_el0_svc+0xa0/0xd4 [ 103.016575] el0_svc+0x24/0x34 [ 103.019801] el0_sync_handler+0xcc/0x154 [ 103.023930] el0_sync+0x198/0x1c0 [ 103.027426] [ 103.029020] The buggy address belongs to the object at ffff0004d46ff500 [ 103.029020] which belongs to the cache kmalloc-128 of size 128 [ 103.042079] The buggy address is located 73 bytes inside of [ 103.042079] 128-byte region [ffff0004d46ff500, ffff0004d46ff580) [ 103.054236] The buggy address belongs to the page: [ 103.059262] page:0000000021aa849b refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0004d46fee00 pfn:0x5146fe [ 103.070437] head:0000000021aa849b order:1 compound_mapcount:0 [ 103.076456] flags: 0x8000000000010200(slab|head|zone=2) [ 103.081948] raw: 8000000000010200 fffffc0013521a80 0000000d0000000d ffff0004c0002300 [ 103.090052] raw: ffff0004d46fee00 000000008020001e 00000001ffffffff 0000000000000000 [ 103.098150] page dumped because: kasan: bad access detected [ 103.103985] [ 103.105578] Memory state around the buggy address: [ 103.110602] ffff0004d46ff400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 103.118161] ffff0004d46ff480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 103.125726] >ffff0004d46ff500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 103.133284] ^ [ 103.139120] ffff0004d46ff580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 103.146679] ffff0004d46ff600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 103.154238] ================================================================== [ 103.161792] Disabling lock debugging due to kernel taint [ 103.167319] Unable to handle kernel paging request at virtual address 0037801d6000018e [ 103.175406] Mem abort info: [ 103.178457] ESR = 0x96000004 [ 103.181609] EC = 0x25: DABT (current EL), IL = 32 bits [ 103.187020] SET = 0, FnV = 0 [ 103.190185] EA = 0, S1PTW = 0 [ 103.193417] Data abort info: [ 103.196385] ISV = 0, ISS = 0x00000004 [ 103.200315] CM = 0, WnR = 0 [ 103.203366] [0037801d6000018e] address between user and kernel address ranges [ 103.210611] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 103.216231] Modules linked in: usb_f_fs libcomposite configfs ath9k_htc led_class mac80211 libarc4 ath9k_common ath9k_hw ath cfg80211 aes_ce_blk sata_rc4 [ 103.259233] CPU: 0 PID: 2997 Comm: umount Tainted: G B 5.13.0-rc4+ #8 [ 103.267031] Hardware name: Renesas Salvator-X board based on r8a77951 (DT) [ 103.273951] pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--) [ 103.280001] pc : ffs_data_clear+0x138/0x370 [usb_f_fs] [ 103.285197] lr : ffs_data_clear+0x124/0x370 [usb_f_fs] [ 103.290385] sp : ffff800014777a80 [ 103.293725] x29: ffff800014777a80 x28: ffff0004d7649c80 x27: 0000000000000000 [ 103.300931] x26: ffff800014777fb0 x25: ffff60009aec9394 x24: ffff0004d7649ca4 [ 103.308136] x23: 1fffe0009a3d063a x22: dfff800000000000 x21: ffff0004d1e831d0 [ 103.315340] x20: e1c000eb00000bb4 x19: ffff0004d1e83000 x18: 0000000000000000 [ 103.322545] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 103.329748] x14: 0720072007200720 x13: 0720072007200720 x12: 1ffff000012ef658 [ 103.336952] x11: ffff7000012ef658 x10: 0720072007200720 x9 : ffff800011322648 [ 103.344157] x8 : ffff800014777818 x7 : ffff80000977b2c7 x6 : 0000000000000000 [ 103.351359] x5 : 0000000000000001 x4 : ffff7000012ef659 x3 : 0000000000000001 [ 103.358562] x2 : 0000000000000000 x1 : 1c38001d6000018e x0 : e1c000eb00000c70 [ 103.365766] Call trace: [ 103.368235] ffs_data_clear+0x138/0x370 [usb_f_fs] [ 103.373076] ffs_data_reset+0x20/0x304 [usb_f_fs] [ 103.377829] ffs_data_closed+0x1ec/0x244 [usb_f_fs] [ 103.382755] ffs_fs_kill_sb+0x70/0x84 [usb_f_fs] [ 103.387420] deactivate_locked_super+0xa0/0xf0 [ 103.391905] deactivate_super+0x98/0xac [ 103.395776] cleanup_mnt+0xd0/0x1b0 [ 103.399299] __cleanup_mnt+0x1c/0x28 [ 103.402906] task_work_run+0x104/0x180 [ 103.406691] do_notify_resume+0x458/0x14e0 [ 103.410823] work_pending+0xc/0x5f8 [ 103.414351] Code: b4000a54 9102f280 12000802 d343fc01 (38f66821) [ 103.420490] ---[ end trace 57b43a50e8244f57 ]--- Segmentation fault root@rcar-gen3:~# ================================================================== [2] ================================================================== root@rcar-gen3:~# mkdir /dev/ffs root@rcar-gen3:~# modprobe libcomposite root@rcar-gen3:~# root@rcar-gen3:~# mount -t configfs none /dev/cfs root@rcar-gen3:~# mkdir /dev/cfs/usb_gadget/g1 root@rcar-gen3:~# mkdir /dev/cfs/usb_gadget/g1/functions/ffs.ffs [ 54.766480] file system registered root@rcar-gen3:~# mount -t functionfs ffs /dev/ffs root@rcar-gen3:~# rmdir /dev/cfs/usb_gadget/g1/functions/ffs.ffs [ 63.197597] unloading root@rcar-gen3:~# cat /dev/ffs/ep0 cat: read error:[ 67.213506] ================================================================== [ 67.222095] BUG: KASAN: use-after-free in ffs_data_clear+0x70/0x370 [usb_f_fs] [ 67.229699] Write of size 1 at addr ffff0004c26e974a by task cat/2994 [ 67.236446] [ 67.238045] CPU: 0 PID: 2994 Comm: cat Not tainted 5.13.0-rc4+ #8 [ 67.244431] Hardware name: Renesas Salvator-X board based on r8a77951 (DT) [ 67.251624] Call trace: [ 67.254212] dump_backtrace+0x0/0x330 [ 67.258081] show_stack+0x20/0x2c [ 67.261579] dump_stack+0x11c/0x1ac [ 67.265260] print_address_description.constprop.0+0x30/0x274 [ 67.271286] kasan_report+0x14c/0x1c8 [ 67.275143] __asan_report_store1_noabort+0x34/0x58 [ 67.280265] ffs_data_clear+0x70/0x370 [usb_f_fs] [ 67.285220] ffs_data_reset+0x20/0x304 [usb_f_fs] [ 67.290172] ffs_data_closed+0x240/0x244 [usb_f_fs] [ 67.295305] ffs_ep0_release+0x40/0x54 [usb_f_fs] [ 67.300256] __fput+0x304/0x580 [ 67.303576] ____fput+0x18/0x24 [ 67.306893] task_work_run+0x104/0x180 [ 67.310846] do_notify_resume+0x458/0x14e0 [ 67.315154] work_pending+0xc/0x5f8 [ 67.318834] [ 67.320429] Allocated by task 2988: [ 67.324105] kasan_save_stack+0x28/0x58 [ 67.328144] kasan_set_track+0x28/0x3c [ 67.332090] ____kasan_kmalloc+0x84/0x9c [ 67.336217] __kasan_kmalloc+0x10/0x1c [ 67.340163] __kmalloc+0x214/0x2f8 [ 67.343754] kzalloc.constprop.0+0x14/0x20 [usb_f_fs] [ 67.349066] ffs_alloc_inst+0x8c/0x208 [usb_f_fs] [ 67.354017] try_get_usb_function_instance+0xf0/0x164 [libcomposite] [ 67.360705] usb_get_function_instance+0x64/0x68 [libcomposite] [ 67.366934] function_make+0x128/0x1ec [libcomposite] [ 67.372260] configfs_mkdir+0x330/0x590 [configfs] [ 67.377320] vfs_mkdir+0x12c/0x1bc [ 67.380911] do_mkdirat+0x180/0x1d0 [ 67.384589] __arm64_sys_mkdirat+0x80/0x94 [ 67.388899] invoke_syscall+0xf8/0x25c [ 67.392850] el0_svc_common.constprop.0+0x150/0x1a0 [ 67.397969] do_el0_svc+0xa0/0xd4 [ 67.401464] el0_svc+0x24/0x34 [ 67.404691] el0_sync_handler+0xcc/0x154 [ 67.408819] el0_sync+0x198/0x1c0 [ 67.412315] [ 67.413909] Freed by task 2993: [ 67.417220] kasan_save_stack+0x28/0x58 [ 67.421257] kasan_set_track+0x28/0x3c [ 67.425204] kasan_set_free_info+0x28/0x4c [ 67.429513] ____kasan_slab_free+0x104/0x118 [ 67.434001] __kasan_slab_free+0x18/0x24 [ 67.438128] slab_free_freelist_hook+0x148/0x1f0 [ 67.442978] kfree+0x318/0x440 [ 67.446205] ffs_free_inst+0x164/0x2d8 [usb_f_fs] [ 67.451156] usb_put_function_instance+0x84/0xa4 [libcomposite] [ 67.457385] ffs_attr_release+0x18/0x24 [usb_f_fs] [ 67.462428] config_item_put+0x140/0x1a4 [configfs] [ 67.467570] configfs_rmdir+0x3fc/0x518 [configfs] [ 67.472626] vfs_rmdir+0x114/0x234 [ 67.476215] do_rmdir+0x274/0x2b0 [ 67.479710] __arm64_sys_unlinkat+0x94/0xc8 [ 67.484108] invoke_syscall+0xf8/0x25c [ 67.488055] el0_svc_common.constprop.0+0x150/0x1a0 [ 67.493175] do_el0_svc+0xa0/0xd4 [ 67.496671] el0_svc+0x24/0x34 [ 67.499896] el0_sync_handler+0xcc/0x154 [ 67.504024] el0_sync+0x198/0x1c0 [ 67.507520] [ 67.509114] The buggy address belongs to the object at ffff0004c26e9700 [ 67.509114] which belongs to the cache kmalloc-128 of size 128 [ 67.522171] The buggy address is located 74 bytes inside of [ 67.522171] 128-byte region [ffff0004c26e9700, ffff0004c26e9780) [ 67.534328] The buggy address belongs to the page: [ 67.539355] page:000000003177a217 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5026e8 [ 67.549175] head:000000003177a217 order:1 compound_mapcount:0 [ 67.555195] flags: 0x8000000000010200(slab|head|zone=2) [ 67.560687] raw: 8000000000010200 fffffc0013037100 0000000c00000002 ffff0004c0002300 [ 67.568791] raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 [ 67.576890] page dumped because: kasan: bad access detected [ 67.582725] [ 67.584318] Memory state around the buggy address: [ 67.589343] ffff0004c26e9600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 67.596903] ffff0004c26e9680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 67.604463] >ffff0004c26e9700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 67.612022] ^ [ 67.617860] ffff0004c26e9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 67.625421] ffff0004c26e9800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 67.632981] ================================================================== [ 67.640535] Disabling lock debugging due to kernel taint File descriptor[ 67.646100] Unable to handle kernel paging request at virtual address fabb801d4000018d in bad state [ 67.655456] Mem abort info: [ 67.659619] ESR = 0x96000004 [ 67.662801] EC = 0x25: DABT (current EL), IL = 32 bits [ 67.668225] SET = 0, FnV = 0 [ 67.671375] EA = 0, S1PTW = 0 [ 67.674613] Data abort info: [ 67.677587] ISV = 0, ISS = 0x00000004 [ 67.681522] CM = 0, WnR = 0 [ 67.684588] [fabb801d4000018d] address between user and kernel address ranges [ 67.691849] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 67.697470] Modules linked in: usb_f_fs libcomposite configfs ath9k_htc led_class mac80211 libarc4 ath9k_common ath9k_hw ath cfg80211 aes_ce_blk crypto_simd cryptd aes_ce_cipher ghash_ce gf128mul sha2_ce sha1_ce evdev sata_rcar libata xhci_plat_hcd scsi_mod xhci_hcd rene4 [ 67.740467] CPU: 0 PID: 2994 Comm: cat Tainted: G B 5.13.0-rc4+ #8 [ 67.748005] Hardware name: Renesas Salvator-X board based on r8a77951 (DT) [ 67.754924] pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--) [ 67.760974] pc : ffs_data_clear+0x138/0x370 [usb_f_fs] [ 67.766178] lr : ffs_data_clear+0x124/0x370 [usb_f_fs] [ 67.771365] sp : ffff800014767ad0 [ 67.774706] x29: ffff800014767ad0 x28: ffff800009cf91c0 x27: ffff0004c54861a0 [ 67.781913] x26: ffff0004dc90b288 x25: 1fffe00099ec10f5 x24: 00000000000a801d [ 67.789118] x23: 1fffe00099f6953a x22: dfff800000000000 x21: ffff0004cfb4a9d0 [ 67.796322] x20: d5e000ea00000bb1 x19: ffff0004cfb4a800 x18: 0000000000000000 [ 67.803526] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 67.810730] x14: 0720072007200720 x13: 0720072007200720 x12: 1ffff000028ecefa [ 67.817934] x11: ffff7000028ecefa x10: 0720072007200720 x9 : ffff80001132c014 [ 67.825137] x8 : ffff8000147677d8 x7 : ffff8000147677d7 x6 : 0000000000000000 [ 67.832341] x5 : 0000000000000001 x4 : ffff7000028ecefb x3 : 0000000000000001 [ 67.839544] x2 : 0000000000000005 x1 : 1abc001d4000018d x0 : d5e000ea00000c6d [ 67.846748] Call trace: [ 67.849218] ffs_data_clear+0x138/0x370 [usb_f_fs] [ 67.854058] ffs_data_reset+0x20/0x304 [usb_f_fs] [ 67.858810] ffs_data_closed+0x240/0x244 [usb_f_fs] [ 67.863736] ffs_ep0_release+0x40/0x54 [usb_f_fs] [ 67.868488] __fput+0x304/0x580 [ 67.871665] ____fput+0x18/0x24 [ 67.874837] task_work_run+0x104/0x180 [ 67.878622] do_notify_resume+0x458/0x14e0 [ 67.882754] work_pending+0xc/0x5f8 [ 67.886282] Code: b4000a54 9102f280 12000802 d343fc01 (38f66821) [ 67.892422] ---[ end trace 6d7cedf53d7abbea ]--- Segmentation fault root@rcar-gen3:~# ================================================================== Fixes: 4b187fceec3c ("usb: gadget: FunctionFS: add devices management code") Fixes: 3262ad824307 ("usb: gadget: f_fs: Stop ffs_closed NULL pointer dereference") Fixes: cdafb6d8b8da ("usb: gadget: f_fs: Fix use-after-free in ffs_free_inst") Reported-by: Bhuvanesh Surachari Tested-by: Eugeniu Rosca Reviewed-by: Eugeniu Rosca Signed-off-by: Andrew Gabbasov Link: https://lore.kernel.org/r/20210603171507.22514-1-andrew_gabbasov@mentor.com Signed-off-by: Greg Kroah-Hartman commit 45d39448b4d0260743f25d88fd929451ec8296f2 Author: Sven Peter Date: Mon Jun 7 08:17:51 2021 +0200 usb: dwc3: support 64 bit DMA in platform driver Currently, the dwc3 platform driver does not explicitly ask for a DMA mask. This makes it fall back to the default 32-bit mask which breaks the driver on systems that only have RAM starting above the first 4G like the Apple M1 SoC. Fix this by calling dma_set_mask_and_coherent with a 64bit mask. Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20210607061751.89752-1-sven@svenpeter.dev Signed-off-by: Greg Kroah-Hartman commit 0c6838767236c9348e05b3f54361a89ec03adc84 Author: Rikard Falkeborn Date: Sat Jun 5 20:59:08 2021 +0200 pinctrl: bcm: Constify static pinmux_ops These are only assigned, either directly or via the bcm63xx_pinctrl_soc struct, to the pmxops field in the pinctrl_desc struct and never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210605185908.39982-3-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit d9779093676bd8743ba2e1cd971f4eabb15c060d Author: Rikard Falkeborn Date: Sat Jun 5 20:59:07 2021 +0200 pinctrl: bcm: Constify static pinctrl_ops These are only assigned, either directly or via the bcm63xx_pinctrl_soc struct, to the pctlops field in the pinctrl_desc struct and never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210605185908.39982-2-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit 60dfe484cef45293e631b3a6e8995f1689818172 Author: Alan Stern Date: Mon Jun 7 11:23:07 2021 -0400 USB: core: Avoid WARNings for 0-length descriptor requests The USB core has utility routines to retrieve various types of descriptors. These routines will now provoke a WARN if they are asked to retrieve 0 bytes (USB "receive" requests must not have zero length), so avert this by checking the size argument at the start. CC: Johan Hovold Reported-and-tested-by: syzbot+7dbcd9ff34dc4ed45240@syzkaller.appspotmail.com Reviewed-by: Johan Hovold Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210607152307.GD1768031@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 307462a6f5c5a563ec084bb315f4e0279dfb2026 Author: Baokun Li Date: Wed Jun 9 15:06:12 2021 +0800 usb: gadget: function: printer: use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Reported-by: Hulk Robot Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20210609070612.1325044-1-libaokun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2a042767814bd0edf2619f06fecd374e266ea068 Author: Peter Chen Date: Tue Jun 8 18:56:56 2021 +0800 usb: dwc3: core: fix kernel panic when do reboot When do system reboot, it calls dwc3_shutdown and the whole debugfs for dwc3 has removed first, when the gadget tries to do deinit, and remove debugfs for its endpoints, it meets NULL pointer dereference issue when call debugfs_lookup. Fix it by removing the whole dwc3 debugfs later than dwc3_drd_exit. [ 2924.958838] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000002 .... [ 2925.030994] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) [ 2925.037005] pc : inode_permission+0x2c/0x198 [ 2925.041281] lr : lookup_one_len_common+0xb0/0xf8 [ 2925.045903] sp : ffff80001276ba70 [ 2925.049218] x29: ffff80001276ba70 x28: ffff0000c01f0000 x27: 0000000000000000 [ 2925.056364] x26: ffff800011791e70 x25: 0000000000000008 x24: dead000000000100 [ 2925.063510] x23: dead000000000122 x22: 0000000000000000 x21: 0000000000000001 [ 2925.070652] x20: ffff8000122c6188 x19: 0000000000000000 x18: 0000000000000000 [ 2925.077797] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000004 [ 2925.084943] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000030 [ 2925.092087] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : ffff8000102b2420 [ 2925.099232] x8 : 7f7f7f7f7f7f7f7f x7 : feff73746e2f6f64 x6 : 0000000000008080 [ 2925.106378] x5 : 61c8864680b583eb x4 : 209e6ec2d263dbb7 x3 : 000074756f307065 [ 2925.113523] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff8000122c6188 [ 2925.120671] Call trace: [ 2925.123119] inode_permission+0x2c/0x198 [ 2925.127042] lookup_one_len_common+0xb0/0xf8 [ 2925.131315] lookup_one_len_unlocked+0x34/0xb0 [ 2925.135764] lookup_positive_unlocked+0x14/0x50 [ 2925.140296] debugfs_lookup+0x68/0xa0 [ 2925.143964] dwc3_gadget_free_endpoints+0x84/0xb0 [ 2925.148675] dwc3_gadget_exit+0x28/0x78 [ 2925.152518] dwc3_drd_exit+0x100/0x1f8 [ 2925.156267] dwc3_remove+0x11c/0x120 [ 2925.159851] dwc3_shutdown+0x14/0x20 [ 2925.163432] platform_shutdown+0x28/0x38 [ 2925.167360] device_shutdown+0x15c/0x378 [ 2925.171291] kernel_restart_prepare+0x3c/0x48 [ 2925.175650] kernel_restart+0x1c/0x68 [ 2925.179316] __do_sys_reboot+0x218/0x240 [ 2925.183247] __arm64_sys_reboot+0x28/0x30 [ 2925.187262] invoke_syscall+0x48/0x100 [ 2925.191017] el0_svc_common.constprop.0+0x48/0xc8 [ 2925.195726] do_el0_svc+0x28/0x88 [ 2925.199045] el0_svc+0x20/0x30 [ 2925.202104] el0_sync_handler+0xa8/0xb0 [ 2925.205942] el0_sync+0x148/0x180 [ 2925.209270] Code: a9025bf5 2a0203f5 121f0056 370802b5 (79400660) [ 2925.215372] ---[ end trace 124254d8e485a58b ]--- [ 2925.220012] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 2925.227676] Kernel Offset: disabled [ 2925.231164] CPU features: 0x00001001,20000846 [ 2925.235521] Memory Limit: none [ 2925.238580] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- Fixes: 5ff90af9da8f ("usb: dwc3: debugfs: Add and remove endpoint dirs dynamically") Cc: Jack Pham Tested-by: Jack Pham Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20210608105656.10795-1-peter.chen@kernel.org Signed-off-by: Greg Kroah-Hartman commit 507b1b28129974691b95d623f78d0604fbaeea09 Author: Michael Kao Date: Fri Jun 4 17:37:55 2021 +0800 arm64: dts: mt8183-kukui: Add tboard thermal zones Add tboard thermal zones. The tboard thermal sensors are a kind of NTC sensors which are located on PCB board to correlate the temperature of the case (Tskin). pull-up voltage: 1800 mv pull-up resistor: 75K Vsense = pull-up voltage * Rntc / ( pull-up resistor + Rntc ) AuxIn = Vsense * 4096 / 1500 Signed-off-by: Michael Kao Signed-off-by: Ben Tseng Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210604093755.13288-1-ben.tseng@mediatek.com Signed-off-by: Matthias Brugger commit 51317434e19788e1c6acce9e108c3da77c4be1f5 Author: Vandita Kulkarni Date: Wed Jun 9 12:29:14 2021 +0530 drm/i915/dsc: Fix bigjoiner check in dsc_disable This change takes care of resetting the dss_ctl registers in case of dsc_disable, bigjoiner disable and also uncompressed joiner disable. v2: Fix formatting v3: Fix the typo (Mansi) Suggested-by: Jani Nikula Fixes: d961eb20adb6 ("drm/i915/bigjoiner: atomic commit changes for uncompressed joiner") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3537 Signed-off-by: Vandita Kulkarni Reviewed-by: Manasi Navare Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210609065914.4454-1-vandita.kulkarni@intel.com commit 4fa8492d1e5b11fd810bd746c301fca39c18025d Author: Ikjoon Jang Date: Wed Jun 9 11:25:54 2021 +0800 arm64: dts: mt8183: add cbas node under cros_ec Add a 'cbas' device node for supporting tablet mode switch in kukui devices. Kukui platforms with detacheable base have an additional input device under cros-ec, which reports SW_TABLET_MODE regarding its base state (e.g. base flipped or detached). Signed-off-by: Ikjoon Jang Reviewed-by: Enric Balletbo i Serra Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210609032554.2443675-1-ikjn@chromium.org Signed-off-by: Matthias Brugger commit c55356c534aa651ccc3053ef2d5d8d810adacf5f Author: Benjamin Gaignard Date: Fri Jun 4 18:44:41 2021 +0200 iommu: rockchip: Add support for iommu v2 This second version of the hardware block has a different bits mapping for page table entries. Add the ops matching to this new mapping. Define a new compatible to distinguish it from the first version. Signed-off-by: Benjamin Gaignard Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210604164441.798362-5-benjamin.gaignard@collabora.com Signed-off-by: Joerg Roedel commit 227014b33f62f93a462f8125038ef6609d7a1572 Author: Benjamin Gaignard Date: Fri Jun 4 18:44:40 2021 +0200 iommu: rockchip: Add internal ops to handle variants Add internal ops to be able to handle incoming variant v2. The goal is to keep the overall structure of the framework but to allow to add the evolution of this hardware block. The ops are global for a SoC because iommu domains are not attached to a specific devices if they are for a virtuel device like drm. Use a global variable shouldn't be since SoC usually doesn't embedded different versions of the iommu hardware block. If that happen one day a WARN_ON will be displayed at probe time. Signed-off-by: Benjamin Gaignard Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210604164441.798362-4-benjamin.gaignard@collabora.com Signed-off-by: Joerg Roedel commit 9e6f3cd589cb711b5949cfbeb84e5440906195bd Author: Benjamin Gaignard Date: Fri Jun 4 18:44:39 2021 +0200 dt-bindings: iommu: rockchip: Add compatible for v2 Add compatible for the second version of IOMMU hardware block. RK356x IOMMU can also be link to a power domain. Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210604164441.798362-3-benjamin.gaignard@collabora.com Signed-off-by: Joerg Roedel commit 7e0fc5072e0b7a3e4dfbc39ad54aefa494bdf3da Author: Benjamin Gaignard Date: Fri Jun 4 18:44:38 2021 +0200 dt-bindings: iommu: rockchip: Convert IOMMU to DT schema Convert Rockchip IOMMU to DT schema Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210604164441.798362-2-benjamin.gaignard@collabora.com Signed-off-by: Joerg Roedel commit e86b041ffeff554c9458882ebabc2aba5c864186 Author: Zhen Lei Date: Thu May 13 15:58:15 2021 +0800 iommu: Delete a duplicate check in iommu_change_dev_def_domain() Function iommu_group_store_type() is the only caller of the static function iommu_change_dev_def_domain() and has performed "if (WARN_ON(!group))" detection before calling it. So the one here is redundant. Signed-off-by: Zhen Lei Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210513075815.6382-1-thunder.leizhen@huawei.com Signed-off-by: Joerg Roedel commit 152bca090243f2aebbf4c0a2aa723ab610e6f3c4 Author: Florian Westphal Date: Sat Jun 5 12:54:43 2021 +0200 xfrm: remove description from xfrm_type struct Its set but never read. Reduces size of xfrm_type to 64 bytes on 64bit. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 5b7a2c92b6102447a973f2f1ef19d660ec329881 Author: Nirmoy Das Date: Tue Jun 8 20:13:06 2021 +0200 drm/vmwgfx: use ttm_bo_move_null() when there is nothing to move Use ttm_bo_move_null() instead of ttm_bo_assign_mem(). Signed-off-by: Nirmoy Das Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210608181306.90008-1-nirmoy.das@amd.com Signed-off-by: Christian König commit fbbf23ddb2a1cc0c12c9f78237d1561c24006f50 Author: Colin Ian King Date: Tue Jun 8 17:13:13 2021 +0100 drm: qxl: ensure surf.data is ininitialized The object surf is not fully initialized and the uninitialized field surf.data is being copied by the call to qxl_bo_create via the call to qxl_gem_object_create. Set surf.data to zero to ensure garbage data from the stack is not being copied. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: f64122c1f6ad ("drm: add new QXL driver. (v1.4)") Signed-off-by: Colin Ian King Link: http://patchwork.freedesktop.org/patch/msgid/20210608161313.161922-1-colin.king@canonical.com Signed-off-by: Gerd Hoffmann commit 7d2201d46218df951004fc48897f89c6eb510b69 Author: Gustavo A. R. Silva Date: Mon Jun 7 15:49:34 2021 -0500 ima: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Mimi Zohar commit 2aa8eca6cbb5912aa0c07ebecb846b3d6182415c Author: gushengxian Date: Tue Jun 8 18:52:57 2021 -0700 net: appletalk: fix some mistakes in grammar Fix some mistakes in grammar. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit dd8b865cc40832d32bbf912a65c657483533fdd4 Author: Baokun Li Date: Tue Jun 8 11:11:50 2021 +0800 audit: Use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Reported-by: Hulk Robot Signed-off-by: Baokun Li Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 619ed58ac4e2fbed71ac05f664a4a17e32537176 Author: Sergey Nazarov Date: Tue Jun 8 09:32:06 2021 +0300 audit: Rename enum audit_state constants to avoid AUDIT_DISABLED redefinition AUDIT_DISABLED defined in kernel/audit.h as element of enum audit_state and redefined in kernel/audit.c. This produces a warning when kernel builds with syscalls audit disabled and brokes kernel build if -Werror used. enum audit_state used in syscall audit code only. This patch changes enum audit_state constants prefix AUDIT to AUDIT_STATE to avoid AUDIT_DISABLED redefinition. Signed-off-by: Sergey Nazarov Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 13542a69b918db0118b75d9825bcc775c9c36ed3 Author: Rob Herring Date: Mon Jun 7 09:48:11 2021 -0500 dt-bindings: virtio: Convert virtio-mmio to DT schema Convert the virtio-mmio binding to DT schema format. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Jean-Philippe Brucker Cc: virtualization@lists.linux-foundation.org Acked-by: Jean-Philippe Brucker Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210607193928.3092186-1-robh@kernel.org/ commit bb718cad0a62717cab1fd847c94623d599e05c86 Author: Rob Herring Date: Mon Jun 7 08:49:17 2021 -0500 dt-bindings: rtc: Add Arm PL031 schema The PL031 RTC binding has been in use for a long time, but never got documented. Fortunately, it's simple and existing users are consistent. Cc: Alessandro Zummo Cc: linux-rtc@vger.kernel.org Acked-by: Alexandre Belloni Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210607193718.3090202-1-robh@kernel.org/ commit fc336ae622df0ec114dbe5551a4d2760c535ecd0 Author: Luca Ceresoli Date: Thu May 27 23:16:47 2021 +0200 clk: vc5: fix output disabling when enabling a FOD On 5P49V6965, when an output is enabled we enable the corresponding FOD. When this happens for the first time, and specifically when writing register VC5_OUT_DIV_CONTROL in vc5_clk_out_prepare(), all other outputs are stopped for a short time and then restarted. According to Renesas support this is intended: "The reason for that is VC6E has synced up all output function". This behaviour can be disabled at least on VersaClock 6E devices, of which only the 5P49V6965 is currently implemented by this driver. This requires writing bit 7 (bypass_sync{1..4}) in register 0x20..0x50. Those registers are named "Unused Factory Reserved Register", and the bits are documented as "Skip VDDO verification", which does not clearly explain the relation to FOD sync. However according to Renesas support as well as my testing setting this bit does prevent disabling of all clock outputs when enabling a FOD. See "VersaClock ® 6E Family Register Descriptions and Programming Guide" (August 30, 2018), Table 116 "Power Up VDD check", page 58: https://www.renesas.com/us/en/document/mau/versaclock-6e-family-register-descriptions-and-programming-guide Signed-off-by: Luca Ceresoli Reviewed-by: Adam Ford Link: https://lore.kernel.org/r/20210527211647.1520720-1-luca@lucaceresoli.net Fixes: 2bda748e6ad8 ("clk: vc5: Add support for IDT VersaClock 5P49V6965") Signed-off-by: Stephen Boyd commit 0899431f95a7a695f342527548b24ffd902c68ab Author: Dario Binacchi Date: Sun Jun 6 22:22:53 2021 +0200 clk: ti: add am33xx/am43xx spread spectrum clock support The patch enables spread spectrum clocking (SSC) for MPU and LCD PLLs. As reported by the TI spruh73x/spruhl7x RM, SSC is only supported for the DISP/LCD and MPU PLLs on am33xx/am43xx. SSC is not supported for DDR, PER, and CORE PLLs. Calculating the required values and setting the registers accordingly was taken from the set_mpu_spreadspectrum routine contained in the arch/arm/mach-omap2/am33xx/clock_am33xx.c file of the u-boot project. In locked condition, DPLL output clock = CLKINP *[M/N]. In case of SSC enabled, the reference manual explains that there is a restriction of range of M values. Since the omap2_dpll_round_rate routine attempts to select the minimum possible N, the value of M obtained is not guaranteed to be within the range required. With the new "ti,min-div" parameter it is possible to increase N and consequently M to satisfy the constraint imposed by SSC. Signed-off-by: Dario Binacchi Reviewed-by: Tero Kristo Link: https://lore.kernel.org/r/20210606202253.31649-6-dariobin@libero.it Signed-off-by: Stephen Boyd commit 2fdf0b888eba99c244b5ddde69243088951f1976 Author: Dario Binacchi Date: Sun Jun 6 22:22:52 2021 +0200 ARM: dts: am43xx-clocks: add spread spectrum support Registers for adjusting the spread spectrum clocking (SSC) have been added. As reported by the TI spruhl7x RM, SSC is supported only for LCD and MPU PLLs, but the PRCM_CM_SSC_DELTAMSTEP_DPLL_XXX and PRCM_CM_SSC_MODFREQDIV_DPLL_XXX registers, as well as the enable field in the PRCM_CM_CLKMODE_DPLL_XXX registers are mapped for all PLLs (CORE, MPU, DDR, PER, DISP, EXTDEV). Signed-off-by: Dario Binacchi Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20210606202253.31649-5-dariobin@libero.it Signed-off-by: Stephen Boyd commit a543293391ad9711948c6a255716e375c6c060e6 Author: Dario Binacchi Date: Sun Jun 6 22:22:51 2021 +0200 ARM: dts: am33xx-clocks: add spread spectrum support Registers for adjusting the spread spectrum clocking (SSC) have been added. As reported by the TI spruh73x RM, SSC is supported only for LCD and MPU PLLs, but the CM_SSC_DELTAMSTEP_DPLL_XXX and CM_SSC_MODFREQDIV_DPLL_XXX registers, as well as the enable field in the CM_CLKMODE_DPLL_XXX registers are mapped for all PLLs (CORE, MPU, DDR, PER, DISP). Signed-off-by: Dario Binacchi Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20210606202253.31649-4-dariobin@libero.it Signed-off-by: Stephen Boyd commit 4a8bc2644ef0cbf8ebe46da3887eafd309b0f187 Author: Dario Binacchi Date: Sun Jun 6 22:22:50 2021 +0200 dt-bindings: ti: dpll: add spread spectrum support DT bindings for enabling and adjusting spread spectrum clocking have been added. Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210606202253.31649-3-dariobin@libero.it Signed-off-by: Stephen Boyd commit c255f15105bad60741a71d03cb9e84de79a8380c Author: Dario Binacchi Date: Sun Jun 6 22:22:49 2021 +0200 clk: ti: fix typo in routine description Replace _omap3_noncore_dpll_program with omap3_noncore_dpll_program. Signed-off-by: Dario Binacchi Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210606202253.31649-2-dariobin@libero.it Signed-off-by: Stephen Boyd commit 2d32cd3315f37a20cd4753a2bad7e28be183e748 Author: Konrad Dybcio Date: Sun Jun 6 21:26:57 2021 +0200 clk: qcom: smd-rpm: Fix wrongly assigned RPM_SMD_PNOC_CLK During my big cleanup I managed to assign an AO clock to its non-AO binding. Fix this. Reported-by: Bartosz Dudziak Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210606192657.51037-1-konrad.dybcio@somainline.org Fixes: a0384ecfe2aa ("clk: qcom: smd-rpm: De-duplicate identical entries") Signed-off-by: Stephen Boyd commit cf6b5ffdce5a78b2fcb0e53b3a2487c490bcbf7f Author: Phil Sutter Date: Tue Jun 8 11:40:57 2021 +0200 netfilter: nft_exthdr: Fix for unsafe packet data read While iterating through an SCTP packet's chunks, skb_header_pointer() is called for the minimum expected chunk header size. If (that part of) the skbuff is non-linear, the following memcpy() may read data past temporary buffer '_sch'. Use skb_copy_bits() instead which does the right thing in this situation. Fixes: 133dc203d77df ("netfilter: nft_exthdr: Support SCTP chunks") Suggested-by: Florian Westphal Signed-off-by: Phil Sutter Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ae3d69bcc455905bac1d08d3563e4e576028e896 Author: Vitaly Wool Date: Tue Jun 8 10:21:27 2021 +0200 riscv: fix typo in init.c Commit 010623568222 introduced a typo in "__initdata" spelling which led to build breakage for XIP. Fix that. Fixes: 010623568222 ("riscv: mm: init: Consolidate vars, functions") Signed-off-by: Vitaly Wool Signed-off-by: Palmer Dabbelt commit efcec32fe84ab4ee886d3cba48839945fc0a9b35 Author: Guo Ren Date: Sun May 30 04:53:27 2021 +0000 riscv: Cleanup unused functions These functions haven't been used, so just remove them. The patch has been tested with riscv. Signed-off-by: Guo Ren Reviewed-by: Christoph Hellwig Reviewed-by: Anup Patel Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 54ada34b4dfdb864ac602e13ff87581abe517ce9 Merge: 605a5e41db7d8 4a2c1dcfaf59b Author: Dan Williams Date: Tue Jun 8 17:16:11 2021 -0700 Merge branch 'rafael/acpica/cfmws' into for-5.14/cxl Pick up the definition of the CXL Fixed Memory Window Structure from Rafael's ACPICA development branch. commit 5def4429aefe65b494816d9ba8ae7f971d522251 Author: Kefeng Wang Date: Sat May 29 19:15:34 2021 +0800 riscv: mm: Use better bitmap_zalloc() Use better bitmap_zalloc() to allocate bitmap. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit ff76e3d7c3c958b51f095dfdb7d451177312896b Author: Bixuan Cui Date: Sat May 29 16:06:57 2021 +0800 riscv: fix build error when CONFIG_SMP is disabled Fix build error when disable CONFIG_SMP: mm/pgtable-generic.o: In function `.L19': pgtable-generic.c:(.text+0x42): undefined reference to `flush_pmd_tlb_range' mm/pgtable-generic.o: In function `pmdp_huge_clear_flush': pgtable-generic.c:(.text+0x6c): undefined reference to `flush_pmd_tlb_range' mm/pgtable-generic.o: In function `pmdp_invalidate': pgtable-generic.c:(.text+0x162): undefined reference to `flush_pmd_tlb_range' Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit") Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Acked-by: Nanyong Sun Signed-off-by: Palmer Dabbelt commit 3e5feb11a82945c88a1518fd2682ca8de66c37d3 Author: Yang Yingliang Date: Wed Jun 2 16:55:44 2021 +0800 i3c: master: svc: fix doc warning in svc-i3c-master.c Fix the following make W=1 warning: drivers/i3c/master/svc-i3c-master.c:207: warning: expecting prototype for struct svc_i3c_i3c_dev_data. Prototype was for struct svc_i3c_i2c_dev_data instead Signed-off-by: Yang Yingliang Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210602085544.4101980-1-yangyingliang@huawei.com commit 59a61e69c4252b4e8ecd15e752b0d2337f0121b7 Author: Yang Yingliang Date: Wed Jun 2 16:49:35 2021 +0800 i3c: master: svc: drop free_irq of devm_request_irq allocated irq irq allocated with devm_request_irq() will be freed in devm_irq_release(), using free_irq() in ->remove() will causes a dangling pointer, and a subsequent double free. So remove the free_irq() in svc_i3c_master_remove(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210602084935.3977636-1-yangyingliang@huawei.com commit e67f325e9cd67562b761e884680c0fec03a6f404 Author: Matthew Hagan Date: Tue Jun 8 19:59:06 2021 +0100 net: stmmac: explicitly deassert GMAC_AHB_RESET We are currently assuming that GMAC_AHB_RESET will already be deasserted by the bootloader. However if this has not been done, probing of the GMAC will fail. To remedy this we must ensure GMAC_AHB_RESET has been deasserted prior to probing. v2 changes: - remove NULL condition check for stmmac_ahb_rst in stmmac_main.c - unwrap dev_err() message in stmmac_main.c - add PTR_ERR() around plat->stmmac_ahb_rst in stmmac_platform.c v3 changes: - add error pointer to dev_err() output - add reset_control_assert(stmmac_ahb_rst) in stmmac_dvr_remove - revert PTR_ERR() around plat->stmmac_ahb_rst since this is performed on the returned value of ret by the calling function Signed-off-by: Matthew Hagan Signed-off-by: David S. Miller commit 52481e585951f4a199678cd6e61f85db52548a01 Author: Yang Yingliang Date: Tue Jun 8 21:57:18 2021 +0800 sh_eth: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 5b38b97f40a7bd8295260c59b997bf47b79c3675 Author: Yang Yingliang Date: Tue Jun 8 21:56:22 2021 +0800 net: nixge: simplify code with devm platform functions Use devm_platform_get_and_ioremap_resource() and devm_platform_ioremap_resource_byname to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit de274be32cb288d96b91494aeaafccc34cf4e00f Author: Vladimir Oltean Date: Tue Jun 8 14:16:51 2021 +0300 net: dsa: felix: set TX flow control according to the phylink_mac_link_up resolution Instead of relying on the static initialization done by ocelot_init_port() which enables flow control unconditionally, set SYS_PAUSE_CFG_PAUSE_ENA according to the parameters negotiated by the PHY. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 96bffe70231c871d1b39ecc44288c96bed66422b Author: Wang Hai Date: Tue Jun 8 13:30:07 2021 +0000 net: x25: Use list_for_each_entry() to simplify code in x25_forward.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 78595dfcb29b7426410b93c1400dca507e6e899e Author: Wang Hai Date: Tue Jun 8 13:29:08 2021 +0000 ethernet/qlogic: Use list_for_each_entry() to simplify code in qlcnic_hw.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit b55b1d50b08ce3b79329f62da8104b25c607bf38 Author: Vladimir Oltean Date: Tue Jun 8 16:10:37 2021 +0300 net: stmmac: fix NPD with phylink_set_pcs if there is no MDIO bus priv->plat->mdio_bus_data is optional, some platforms may not set it, however we proceed to look straight at priv->plat->mdio_bus_data->has_xpcs. Since the xpcs is instantiated based on the has_xpcs property, we can avoid looking at the priv->plat->mdio_bus_data structure altogether and just check for the presence of the xpcs pointer. Fixes: 11059740e616 ("net: pcs: xpcs: convert to phylink_pcs_ops") Reported-by: Dan Carpenter Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e83332842a46c091992ad06145b5c1b65a08ab05 Author: Wang Hai Date: Tue Jun 8 08:13:01 2021 +0000 net: lapb: Use list_for_each_entry() to simplify code in lapb_iface.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 3835a6614ae7ee4840459bf47528a97b1dfc5439 Author: Wang Hai Date: Tue Jun 8 08:05:05 2021 +0000 net: x25: Use list_for_each_entry() to simplify code in x25_link.c Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 36861d1f0408a431ede4184d90f7bf1598d639ca Author: Wang Hai Date: Tue Jun 8 07:57:37 2021 +0000 net: qede: Use list_for_each_entry() to simplify code Convert list_for_each() to list_for_each_entry() where applicable. This simplifies the code. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 6246f1ccb9c3aa748cd5622dd6b0ddd432eadd5d Author: Shiraz Saleem Date: Tue Jun 8 16:14:16 2021 -0500 RDMA/irdma: Use list_last_entry/list_first_entry Use list_last_entry and list_first_entry instead of using prev and next pointers. Link: https://lore.kernel.org/r/20210608211415.680-1-shiraz.saleem@intel.com Reported-by: Dan Carpenter Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 4c5519facf3785d0e11e9ef705f104490319a9e3 Merge: 6efb943b8616e 5617c9125bb66 Author: Stephen Boyd Date: Tue Jun 8 15:30:18 2021 -0700 Merge tag 'clkdev-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic into clk-legacy Pull "clean up legacy clock interfaces" series from Arnd Bergmann: A recent discussion about legacy clk interface users revealed that there are only two platforms remaining that provide their own clk_get()/clk_put() implementations, MIPS ar7 and and m68k coldfire. I managed to rework both of these to just use the normal clkdev code, and fold CONFIG_CLKDEV_LOOKUP into CONFIG_HAVE_CLK as it is now shared among all users. As I noticed that the ar7 clock implementation and the ralink version are rather trivial, I ended up converting those to use the common-clk interfaces as well, though this is unrelated to the other changes. Link: https://lore.kernel.org/linux-clk/20210531184749.2475868-1-arnd@kernel.org/ Link: https://lore.kernel.org/lkml/CAK8P3a2XsrfUJQQAfnGknh8HiA-D9L_wmEoAgXU89KqagE31NQ@mail.gmail.com/ Signed-off-by: Arnd Bergmann * tag 'clkdev-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: clkdev: remove unused clkdev_alloc() interfaces clkdev: remove CONFIG_CLKDEV_LOOKUP m68k: coldfire: remove private clk_get/clk_put m68k: coldfire: use clkdev_lookup on most coldfire mips: ralink: convert to CONFIG_COMMON_CLK mips: ar7: convert to CONFIG_COMMON_CLK mips: ar7: convert to clkdev_lookup commit 1c7536528cae7a2ac0f7eb75745a8558c50105ab Merge: e0eb625a7da28 1c360a4a077fc Author: David S. Miller Date: Tue Jun 8 14:43:31 2021 -0700 Merge branch 'hns3-RAS' Guangbin Huang says: ==================== net: hns3: add RAS compatibility adaptation solution This patchset adds RAS compatibility adaptation solution for new devices. ==================== Signed-off-by: David S. Miller commit 1c360a4a077fc0f74a350fe2ef267cbe8a9388e3 Author: Jiaran Zhang Date: Tue Jun 8 21:08:31 2021 +0800 net: hns3: add error handling compatibility during initialization During initialization, the driver logs and clears the hw errors that already occurred. For device supports imp-handle ras capability, it needs handle different error status, otherwise it may cause wrong reset. So fix it by adding a new processing branch. Signed-off-by: Jiaran Zhang Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 8a95e360fd512f1cb55239645879b15d26bc7e21 Author: Jiaran Zhang Date: Tue Jun 8 21:08:30 2021 +0800 net: hns3: update error recovery module and type Update error recovery module and type for RoCE. The enumeration values of module names and error types are not sorted in sequence. If use the current printing mode, they cannot be correctly printed. Use the index mode, If mod_id and type_id match the enumerated value, display the corresponding information. Signed-off-by: Jiaran Zhang Signed-off-by: Weihang Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e65e9f5c2e4efc17657d016d767eb7010d9dd598 Author: Jiaran Zhang Date: Tue Jun 8 21:08:29 2021 +0800 net: hns3: add support for imp-handle ras capability IMP(Intelligent Management Processor) firmware add a new feature to handle and consolidate RAS information for new devices, NIC driver only needs to query the reported RAS information. NIC driver adds support for this feature. Driver queries device capability to check whether IMP support this feature, If yes, execute the new RAS processing branch. In order to add a method to check whether PF supports imp-handle RAS feature, add dumping this info in debugfs. Signed-off-by: Jiaran Zhang Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 2e2deee7618b062efe3aba9fcb017dadcf148819 Author: Jiaran Zhang Date: Tue Jun 8 21:08:28 2021 +0800 net: hns3: add the RAS compatibility adaptation solution To adapt to hardware modification and ensure that the driver is compatible with the original error handling content, we need to add the RAS compatibility adaptation solution. Add a processing branch to the driver during error handling. In the new processing branch, NIC fault information is integrated by the IMP. An interaction command is added between the driver and IMP to query and clear the fault source and interrupt source. The IMP integrates error information and reports the highest reset level to the driver. Signed-off-by: Jiaran Zhang Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 17f59244029bf9c0673725efdd0386ed95e127a7 Author: Yufeng Mo Date: Tue Jun 8 21:08:27 2021 +0800 net: hns3: add support for handling all errors through MSI-X Currently, hardware errors can be reported through AER or MSI-X mode. However, the AER mode is intended to handle only bus errors, but not hardware errors. On the other hand, virtual machines cannot handle AER errors. When an AER error is reported, virtual machines will be suspended. So add support for handling all these hardware errors through MSI-X mode which depends on a newer version of firmware, and reserve the handler of the AER mode for compatibility. Signed-off-by: Yufeng Mo Signed-off-by: Jiaran Zhang Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e0eb625a7da28410507140787bda4a63a5ba5d3e Merge: fa6d61e9c7d65 a01f2cd0ccf47 Author: David S. Miller Date: Tue Jun 8 14:41:10 2021 -0700 Merge branch 'ena-updates' Shay Agroskin says: ==================== se build_skb and reorganize some code in ENA this patchset introduces several changes: - Use build_skb() on RX side. This allows to ensure that the headers are in the linear part - Batch some code into functions and remove some of the code to make it more readable and less error prone - Fix RST format and outdated description in ENA documentation - Improve cache alignment in the code ==================== Signed-off-by: David S. Miller commit a01f2cd0ccf473f7af32afc9b74ac5f2caff3c18 Author: Shay Agroskin Date: Tue Jun 8 19:01:18 2021 +0300 net: ena: re-organize code to improve readability Restructure some ethtool to a switch-case blocks to make it more uniform with other similar functions. Also restructure variable declaration to create reversed x-mas tree. Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 947c54c395cb8368abebf3bec1413123d5dd4339 Author: Shay Agroskin Date: Tue Jun 8 19:01:17 2021 +0300 net: ena: Use dev_alloc() in RX buffer allocation Use dev_alloc() when allocating RX buffers instead of specifying the allocation flags explicitly. This result in same behaviour with less code. Also move the page allocation and its DMA mapping into a function. This creates a logical block, which may help understanding the code. Signed-off-by: Shay Agroskin Reported-by: kernel test robot Signed-off-by: David S. Miller commit 9e8afb05961147509181baf4de5cbd644757e850 Author: Shay Agroskin Date: Tue Jun 8 19:01:16 2021 +0300 net: ena: aggregate doorbell common operations into a function The ena_ring_tx_doorbell() is introduced to call the doorbell and increase the driver's corresponding stat. Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 511c537bb5647662ff7df7a41180a1721c078720 Author: Shay Agroskin Date: Tue Jun 8 19:01:15 2021 +0300 net: ena: fix RST format in ENA documentation file The documentation file used to be written in markdown format but was converted to reStructuredText (rst). The converted file doesn't keep up with rst format requirements which results in hard-to-read text. This patch fixes the formatting of the file. The patch also * Highlights and emphasizes some lines to improve readability * Rephrases some hard-to-understand text * Updates outdated function descriptions. * Removes TSO description which falsely claims the driver supports it Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 15efff76491edd31f57eb3358d80868747d1397e Author: Shay Agroskin Date: Tue Jun 8 19:01:14 2021 +0300 net: ena: Remove module param and change message severity Remove the module param 'debug' which allows to specify the message level of the driver. This value can be specified using ethtool command. Also reduce the message level of LLQ support to be a warning since it is not an indication of an error. Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 0ee251cd9a6398a07cc8cfc849c0efa3f28ece98 Author: Shay Agroskin Date: Tue Jun 8 19:01:13 2021 +0300 net: ena: add jiffies of last napi call to stats There are instances when we want to know when the last napi was called for debugging. On stuck / heavy loaded CPUs, the ena napi handler might not be called for a long period of time. This stat can help us to determine how much time passed since the last execution of napi. Signed-off-by: Sameeh Jubran Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 9e5269a915a8e3d6f4bae5641451737e9cca70c0 Author: Shay Agroskin Date: Tue Jun 8 19:01:12 2021 +0300 net: ena: use build_skb() in RX path This patch converts the RX path to use build_skb() for packets larger than copybreak (set to 256 by default). This function makes the first descriptor's page to be the linear part of the sk_buff struct buffer. Also remove the SKB description from the README since most of it no longer relevant and the parts that are left don't add information. Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 091d0e85a0d4051b286767b05d3a18c87b6c4a14 Author: Shay Agroskin Date: Tue Jun 8 19:01:11 2021 +0300 net: ena: Improve error logging in driver Add prints to improve logging of driver's errors. Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 9912c72edd8c1e1d5432ed4ad350125833c42f6c Author: Shay Agroskin Date: Tue Jun 8 19:01:10 2021 +0300 net: ena: Remove unused code The ENA_DEFAULT_MIN_RX_BUFF_ALLOC_SIZE macro, ena_xdp_queues_present() function and SUSPEND_RESUME enums aren't used in the driver, and so not needed. Signed-off-by: Arthur Kiyanovski Signed-off-by: Gal Pressman Signed-off-by: Sameeh Jubran Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit e4ac382ebfb4e40dbf01db9ab4a42b10b298946a Author: Shay Agroskin Date: Tue Jun 8 19:01:09 2021 +0300 net: ena: optimize data access in fast-path code This tweaks several small places to improve the data access in fast path: * Remove duplicates of first_interrupt flag and surround it with WRITE/READ_ONCE macros: The flag is used to detect HW disorders in its interrupt communication with the driver. The flag is set when an interrupt is received and used in the health check function (ena_timer_service()) to help it find irregularities. * Reorder some fields in ena_napi struct to take better advantage of cache access pattern. * Move XDP TX queue number to a variable to save its calculation for every packet. * Use likely in a condition to improve branch prediction The 'first_interrupt' and 'interrupt_masked' flags were moved to reside in the same cache line as the first fields of 'napi' struct. This placement ensures that all memory accessed during upper-half handler reside in the same cacheline (napi_schedule_irqoff() only accesses 'state' and 'poll_list' fields which are at the beginning of napi struct). Signed-off-by: Sameeh Jubran Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit fa6d61e9c7d65e25d8b79e9e85dbfb15545d138c Merge: fd5f5ab0c1c05 72a64c2fe9d8a Author: David S. Miller Date: Tue Jun 8 14:39:07 2021 -0700 Merge branch 'mlxsw-various-updates' Ido Schimmel says: ==================== mlxsw: Various updates This patchset contains various updates for mlxsw. The most significant change is the long overdue removal of the abort mechanism in the first two patches. Patches #1-#2 remove the route abort mechanism. This change is long overdue and explained in detail in the commit message. Patch #3 sets ports down in a few selftests that forgot to do so. Discovered using a BPF tool (WIP) that monitors ASIC resources. Patch #4 fixes an issue introduced by commit 557c4d2f780c ("selftests: devlink_lib: add check for devlink device existence"). Patches #5-#8 modify the driver to read transceiver module's temperature thresholds using MTMP register (when supported) instead of directly from the module's EEPROM using MCIA register. This is both more reliable and more efficient as now the module's temperature and thresholds are read using one transaction instead of three. ==================== Signed-off-by: David S. Miller commit 72a64c2fe9d8a08c9c57fc22adc1b44d13f97cac Author: Mykola Kostenok Date: Tue Jun 8 15:44:14 2021 +0300 mlxsw: thermal: Read module temperature thresholds using MTMP register mlxsw_thermal_module_trips_update() is used to update the trip points of the module's thermal zone. Currently, this is done by querying the thresholds from the module's EEPROM via MCIA register. This data does not pass validation and in some cases can be unreliable. For example, due to some problem with transceiver module. Previous patch made it possible to read module's temperature and thresholds via MTMP register. Therefore, extend mlxsw_thermal_module_trips_update() to use the thresholds queried from MTMP, if valid. This is both more reliable and more efficient than current method, as temperature and thresholds are queried in one transaction instead of three. This is significant when working over a slow bus such as I2C. Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e57977b34ab5d52d73bc0b8b2ff941ac21d7166f Author: Mykola Kostenok Date: Tue Jun 8 15:44:13 2021 +0300 mlxsw: thermal: Add function for reading module temperature and thresholds Provide new function mlxsw_thermal_module_temp_and_thresholds_get() for reading temperature and temperature thresholds by a single operation. The motivation is to reduce the number of transactions with the device which is important when operating over a slow bus such as I2C. Currently, the sole caller of the function is only using it to read the module's temperature. The next patch will also use it to query the module's temperature thresholds. Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit befc2048088aefbcd88b18225ba33231887137dc Author: Mykola Kostenok Date: Tue Jun 8 15:44:12 2021 +0300 mlxsw: core_env: Read module temperature thresholds using MTMP register Currently, module temperature thresholds are obtained from Management Cable Info Access (MCIA) register by specifying the thresholds offsets within module EEPROM layout. This data does not pass validation and in some cases can be unreliable. For example, due to some problem with the module. Add support for a new feature provided by Management Temperature (MTMP) register for sanitization of temperature thresholds values. Extend mlxsw_env_module_temp_thresholds_get() to get temperature thresholds through MTMP field 'max_operational_temperature' - if it is not zero, feature is supported. Otherwise fallback to old method and get the thresholds through MCIA. Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 314dbb19f95b67456cb042e4a7a36b777a029bea Author: Mykola Kostenok Date: Tue Jun 8 15:44:11 2021 +0300 mlxsw: reg: Extend MTMP register with new threshold field Extend Management Temperature (MTMP) register with new field specifying the maximum temperature threshold. Extend mlxsw_reg_mtmp_unpack() function with two extra arguments, providing high and maximum temperature thresholds. For modules, these thresholds correspond to critical and emergency thresholds that are read from the module's EEPROM. Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0521a262f043ea521790ed2976141086c75d2f74 Author: Petr Machata Date: Tue Jun 8 15:44:10 2021 +0300 selftests: devlink_lib: Fix bouncing of netdevsim DEVLINK_DEV In the commit referenced below, a check was added to devlink_lib that asserts the existence of a devlink device referenced by $DEVLINK_DEV. Unfortunately, several netdevsim tests point DEVLINK_DEV at a device that does not exist at the time that devlink_lib is sourced. Thus these tests spuriously fail. Fix this by introducing an override. By setting DEVLINK_DEV to an empty string, the user declares their intention to handle DEVLINK_DEV management on their own. In all netdevsim tests that use devlink_lib and set DEVLINK_DEV, set instead an empty DEVLINK_DEV just before sourcing devlink_lib, and set it to the correct value right afterwards. Fixes: 557c4d2f780c ("selftests: devlink_lib: add check for devlink device existence") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e67dfb8d15deb33c425d0b0ee22f2e5eef54c162 Author: Amit Cohen Date: Tue Jun 8 15:44:09 2021 +0300 selftests: Clean forgotten resources as part of cleanup() Several tests do not set some ports down as part of their cleanup(), resulting in IPv6 link-local addresses and associated routes not being deleted. These leaks were found using a BPF tool that monitors ASIC resources. Solve this by setting the ports down at the end of the tests. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 00190c2b19eb33969befb68bbbc6d00edc11bda5 Author: Amit Cohen Date: Tue Jun 8 15:44:08 2021 +0300 selftests: router_scale: Do not count failed routes To check how many routes are installed in hardware, the test runs "ip route" and greps for "offload", which includes routes with state "offload_failed". Till now, this wrong check was not found because after one failure in route insertion, the driver moved to "abort" mode, which means that user cannot try to add more routes. The previous patch removed the abort mechanism and now failed routes are counted as offloaded. Fix this by not considering routes with "offload_failed" flag as offloaded. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a08a61934cfad0506f8ed39d605ee7cd77c2381f Author: Amit Cohen Date: Tue Jun 8 15:44:07 2021 +0300 mlxsw: spectrum_router: Remove abort mechanism The abort mechanism was introduced in commit 8e05fd7166c6 ("fib: hook IPv4 fib for hardware offload") with the purpose of falling back to software-based routing in case of a route programming error in hardware. The process is irreversible and requires users to reload the offloading driver or reboot the machine. While this approach might make sense in theory, it makes very little sense in practice. In the case of high speed ASICs such as the Spectrum ASIC, the abort mechanism effectively kills the machine upon a non-fatal error such as a route programming error. Such an extreme policy does not belong in the kernel, especially when user space can simply try to reprogram the route following the RTM_NEWROUTE failure notification. Therefore, remove the abort mechanism. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fd5f5ab0c1c055eb01c959c7f71080debe2dd15c Merge: 173dbbfe139d3 5a8f09748ee79 Author: David S. Miller Date: Tue Jun 8 14:37:16 2021 -0700 Merge branch 'dsa-sja1110' Vladimir Oltean says: ==================== Add NXP SJA1110 support to the sja1105 DSA driver The NXP SJA1110 is an automotive Ethernet switch with an embedded Arm Cortex-M7 microcontroller. The switch has 11 ports (10 external + one for the DSA-style connection to the microcontroller). The microcontroller can be disabled and the switch can be controlled over SPI, a la SJA1105 - this is how this driver handles things. There are some integrated NXP PHYs (100base-T1 and 100base-TX). Their initialization is handled by their own PHY drivers, the switch is only concerned with enabling register accesses to them, by registering two MDIO buses. Changes in v3: - Make sure the VLAN retagging port is enabled and functional - Dropped SGMII PCS from this series Changes in v2: - converted nxp,sja1105 DT bindings to YAML - registered the PCS MDIO bus and forced auto-probing off for all PHY addresses for this bus - changed the container node name for the 2 MDIO buses from "mdio" to "mdios" to avoid matching on the mdio.yaml schema (it's just a container node, not an MDIO bus) - fixed an uninitialized "offset" variable usage in sja1110_pcs_mdio_{read,write} - using the mdiobus_c45_addr macro instead of open-coding that operation ==================== Signed-off-by: David S. Miller commit 5a8f09748ee79f2ef28e560bd095587a0e204b3d Author: Vladimir Oltean Date: Tue Jun 8 12:25:38 2021 +0300 net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX The SJA1110 contains two types of integrated PHYs: one 100base-TX PHY and multiple 100base-T1 PHYs. The access procedure for the 100base-T1 PHYs is also different than it is for the 100base-TX one. So we register 2 MDIO buses, one for the base-TX and the other for the base-T1. Each bus has an OF node which is a child of the "mdio" subnode of the switch, and they are recognized by compatible string. Cc: Russell King Cc: Heiner Kallweit Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ceec8bc0988dca7bdbf7421f01f8d46949bdbdeb Author: Vladimir Oltean Date: Tue Jun 8 12:25:37 2021 +0300 net: dsa: sja1105: make sure the retagging port is enabled for SJA1110 The SJA1110 has an extra configuration in the General Parameters Table through which the user can select the buffer reservation config. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3e77e59bf8cf105d64f70133e41c38daf482acc3 Author: Vladimir Oltean Date: Tue Jun 8 12:25:36 2021 +0300 net: dsa: sja1105: add support for the SJA1110 switch family The SJA1110 is basically an SJA1105 with more ports, some integrated PHYs (100base-T1 and 100base-TX) and an embedded microcontroller which can be disabled, and the switch core can be controlled by a host running Linux, over SPI. This patch contains: - the static and dynamic config packing functions, for the tables that are common with SJA1105 - one more static config tables which is "unique" to the SJA1110 (actually it is a rehash of stuff that was placed somewhere else in SJA1105): the PCP Remapping Table - a reset and clock configuration procedure for the SJA1110 switch. This resets just the switch subsystem, and gates off the clock which powers on the embedded microcontroller. - an RGMII delay configuration procedure for SJA1110, which is very similar to SJA1105, but different enough for us to be unable to reuse it (this is a pattern that repeats itself) - some adaptations to dynamic config table entries which are no longer programmed in the same way. For example, to delete a VLAN, you used to write an entry through the dynamic reconfiguration interface with the desired VLAN ID, and with the VALIDENT bit set to false. Now, the VLAN table entries contain a TYPE_ENTRY field, which must be set to zero (in a backwards-incompatible way) in order for the entry to be deleted, or to some other entry for the VLAN to match "inner tagged" or "outer tagged" packets. - a similar thing for the static config: the xMII Mode Parameters Table encoding for SGMII and MII (the latter just when attached to a 100base-TX PHY) just isn't what it used to be in SJA1105. They are identical, except there is an extra "special" bit which needs to be set. Set it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 070f5b701d559ae139b348fb19145269b58b68c3 Author: Vladimir Oltean Date: Tue Jun 8 12:25:35 2021 +0300 dt-bindings: net: dsa: sja1105: add SJA1110 bindings There are 4 variations of the SJA1110 switch which have a different set of MII protocols supported per port. Document the compatible strings. Also, the SJA1110 optionally supports 2 internal MDIO buses for 2 different types of Ethernet PHYs. Document a container node called "mdios" which has 2 subnodes "mdio@0" and "mdio@1", identifiable via compatible string, under which the driver finds the internal PHYs. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 173dbbfe139d36af6d34f1998cf64c82529c1d12 Merge: 95848099a3dfa 504672038b17b Author: David S. Miller Date: Tue Jun 8 14:33:44 2021 -0700 Merge branch 'wwan-improvements' Sergey Ryazanov says: ==================== net: WWAN subsystem improvements While working on WWAN netdev creation support, I notice a few things that could be done to make the wwan subsystem more developer and user friendly. This series implements them. The series begins with a WWAN HW simulator designed simplify testing and make the WWAN subsystem available for a wider audience. The next two patches are intended to make the code a bit more clearer. This is followed by a few patches to make the port device naming more user-friendly. The series is finishes with a set of changes that allow the WWAN AT port to be used with terminal emulation software. All changes were tested with the HW simulator that was introduced in this series, as well as with a Huawei E3372 LTE modem (a CDC-NCM device), which I finally found on my desk. ==================== Signed-off-by: David S. Miller commit 504672038b17b76466724dda017618b0c072a922 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:41 2021 +0300 net: wwan: core: purge rx queue on port close Purge the rx queue as soon as a user closes the port, just after the port stop callback invocation. This is to prevent feeding a user that will open the port next time with outdated and possibly unrelated data. While at it also remove the odd skb_queue_purge() call in the port device destroy callback. The queue will be purged just before the callback is ivoncated in the wwan_remove_port() function. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit c230035c2f2f6371739f29e56eeb2611172225c8 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:40 2021 +0300 net: wwan: core: implement terminal ioctls for AT port It is not unreasonable to assume that users will use terminal emulation software to communicate directly with a WWAN device over the AT port. But terminal emulators will refuse to work with a device that does not support terminal IOCTLs (e.g. TCGETS, TCSETS, TIOCMSET, etc.). To make it possible to interact with the WWAN AT port using a terminal emulator, implement a minimal set of terminal IOCTLs. The implementation is rather stub, no passed data are actually used to control a port behaviour. An obtained configuration is kept inside the port structure and returned back by a request. The latter is done to fool a program that will test the configuration status by comparing the readed back data from the device with earlier configured ones. Tested with fresh versions of minicom and picocom terminal apps. MBIM, QMI and other ports for binary protocols can hardly be considered a terminal device, so terminal IOCTLs are only implemented for the AT port. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit e263c5b2e8912149b49d757511d85a16c5fb432f Author: Sergey Ryazanov Date: Tue Jun 8 07:02:39 2021 +0300 net: wwan: core: implement TIOCINQ ioctl It is quite common for a userpace program to fetch the buffered amount of data in the rx queue to avoid the read block. Implement the TIOCINQ ioctl to make the migration to the WWAN port usage smooth. Despite the fact that the read call will return no more data than the size of a first skb in the queue, TIOCINQ returns the entire amount of buffered data (sum of all queued skbs). This is done to prevent the breaking of programs that optimize reading, avoiding it if the buffered amount of data is too small. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 72eedfc4bbc7480ea8fb38d5aebb57eafc03c8d5 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:38 2021 +0300 net: wwan: core: expand ports number limit Currently, we limit the total ports number to 256. It is quite common for PBX or SMS gateway to be equipped with a lot of modems. In now days, a modem could have 2-4 control ports or even more, what only accelerates the ports exhausing rate. To avoid facing the port number limitation issue reports, increase the limit up the maximum number of minors (i.e. up to 1 << MINORBITS). Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit f458709ff40b0d992fec496952f79c7820dd3fde Author: Sergey Ryazanov Date: Tue Jun 8 07:02:37 2021 +0300 net: wwan: core: make port names more user-friendly At the moment, the port name is allocated based on the parent device name, port id and the port type. Where the port id specifies nothing but the ports registration order and is only used to make the port name unique. Most likely, to configure a WWAN device, the user will look for a port of a specific type (e.g. AT port or MBIM port, etc.). The current naming scheme can make it difficult to find a port of a specific type. Consider a WWAN device that has 3 ports: AT port, MBIM port, and another one AT port. With the global port index, the port names will be: * wwan0p1at * wwan0p2mbim * wwan0p3at To find the MBIM port, user should know in advance the device ports composition (i.e. the user should know that the MBIM port is the 2nd one) or carefully examine the whole ports list. It is not unusual for USB modems to have a different composition, even if they are build on a same chipset. Moreover, some modems able to change the ports composition based on the user's configuration. All this makes port names fully unpredictable. To make naming more user-friendly, remove the global port id and enumerate ports by its type. E.g.: * wwan0p1at -> wwan0at0 * wwan0p2mbim -> wwan0mbim0 * wwan0p3at -> wwan0at1 With this naming scheme, the first AT port name will always be wwanXat0, the first MBIM port name will always be wwanXmbim0, etc. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit 392c26f7f133b9f09e5f58db1ce6ef4b3b4df49f Author: Sergey Ryazanov Date: Tue Jun 8 07:02:36 2021 +0300 net: wwan: core: spell port device name in lowercase Usually a device name is spelled in lowercase, let us follow this practice in the WWAN subsystem as well. The bottom line is that such name is easier to type. To keep the device type attribute contents more natural (i.e., spell abbreviations in uppercase), while making the device name lowercase, turn the port type strings array to an array of structure that contains both the port type name and the device name suffix. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 64cc80c0ff2eca6a99232fd57d33c8095dfdd878 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:35 2021 +0300 net: wwan: core: init port type string array using enum values This array is indexed by port type. Make it self-descriptive by using the port type enum values as indices in the array initializer. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit b64d76b782264aa91c236c11c72646459b04c301 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:34 2021 +0300 net: wwan: make WWAN_PORT_MAX meaning less surprised It is quite unusual when some value can not be equal to a defined range max value. Also most subsystems defines FOO_TYPE_MAX as a maximum valid value. So turn the WAN_PORT_MAX meaning from the number of supported port types to the maximum valid port type. Signed-off-by: Sergey Ryazanov Reviewed-by: Loic Poulain Signed-off-by: David S. Miller commit 9ee23f48f6705fff6c23e02c4ab1e6d99369cd05 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:33 2021 +0300 wwan_hwsim: add debugfs management interface wwan_hwsim creates and removes simulated control ports on module loading and unloading. It would be helpful to be able to create/remove devices and ports at run-time to trigger wwan port (un-)register actions without module reloading. Some simulator objects (e.g. ports) do not have the underling device and it is not possible to fully manage the simulator via sysfs. wwan_hsim intend for developers, so implement it as a self-contained debugfs based management interface. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit f36a111a74e71edbba27d4c0cf3d7bbccc172108 Author: Sergey Ryazanov Date: Tue Jun 8 07:02:32 2021 +0300 wwan_hwsim: WWAN device simulator This driver simulates a set of WWAN device with a set of AT control ports. It can be used to test WWAN kernel framework as well as user space tools. Signed-off-by: Sergey Ryazanov Signed-off-by: David S. Miller commit 95848099a3dfaff20b3622ee2040b24bf40b2b21 Merge: 303597e49b835 46682cb86a37d Author: David S. Miller Date: Tue Jun 8 14:31:43 2021 -0700 Merge branch 'stmmac-25gbps' Michael Sit Wei Hong says: ==================== Enable 2.5Gbps speed for stmmac Intel mGbE supports 2.5Gbps link speed by overclocking the clock rate by 2.5 times to support 2.5Gbps link speed. In this mode, the serdes/PHY operates at a serial baud rate of 3.125 Gbps and the PCS data path and GMII interface of the MAC operate at 312.5 MHz instead of 125 MHz. This is configured in the BIOS during boot up. The kernel driver is not able access to modify the clock rate for 1Gbps/2.5G mode on the fly. The way to determine the current 1G/2.5G mode is by reading a dedicated adhoc register through mdio bus. Changes: v5 -> v6 patch 1/3 - Check if mdio_bus_data is populated to prevent NULL pointer dereferencing when accesing mdio_bus_data member v4 -> v5 patch 1/3 - Rebase to latest code changes after Vladimir's code is merged and fix build warnings v3 -> v4 patch 1/3 - Rebase to latest code and Initialize 'found' to 0 to avoid build warning patch 2/3 - Fix indentation issue from v3 v2 -> v3 patch 1/3 -New patch added to restructure the code. enabling reading the dedicated adhoc register to determine link speed mode. patch 2/3 -Restructure for 2.5G speed to use 2500BaseX configuration as the PHY interface. patch 3/3 -Restructure to read serdes registers to set max_speed and configure to use 2500BaseX in 2.5G speeds. v1 -> v2 patch 1/2 -Remove MAC supported link speed masking patch 2/2 -Add supported link speed masking in the PCS iperf3 and ping for 2.5Gbps and regression test on 10M/100M/1000Mbps is done to prevent regresson issues. ==================== Signed-off-by: David S. Miller commit 46682cb86a37da435e5668db98555a1de0f0448b Author: Voon Weifeng Date: Tue Jun 8 11:51:58 2021 +0800 net: stmmac: enable Intel mGbE 2.5Gbps link speed The Intel mGbE supports 2.5Gbps link speed by increasing the clock rate by 2.5 times of the original rate. In this mode, the serdes/PHY operates at a serial baud rate of 3.125 Gbps and the PCS data path and GMII interface of the MAC operate at 312.5 MHz instead of 125 MHz. For Intel mGbE, the overclocking of 2.5 times clock rate to support 2.5G is only able to be configured in the BIOS during boot time. Kernel driver has no access to modify the clock rate for 1Gbps/2.5G mode. The way to determined the current 1G/2.5G mode is by reading a dedicated adhoc register through mdio bus. In short, after the system boot up, it is either in 1G mode or 2.5G mode which not able to be changed on the fly. Compared to 1G mode, the 2.5G mode selects the 2500BASEX as PHY interface and disables the xpcs_an_inband. This is to cater for some PHYs that only supports 2500BASEX PHY interface with no autonegotiation. v2: remove MAC supported link speed masking v3: Restructure to introduce intel_speed_mode_2500() to read serdes registers for max speed supported and select the appropritate configuration. Use max_speed to determine the supported link speed mask. Signed-off-by: Voon Weifeng Signed-off-by: Michael Sit Wei Hong Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit f27abde3042ab4d30d0003eaf5e6641baef94a56 Author: Voon Weifeng Date: Tue Jun 8 11:51:57 2021 +0800 net: pcs: add 2500BASEX support for Intel mGbE controller XPCS IP supports 2500BASEX as PHY interface. It is configured as autonegotiation disable to cater for PHYs that does not supports 2500BASEX autonegotiation. v2: Add supported link speed masking. v3: Restructure to introduce xpcs_config_2500basex() used to configure the xpcs for 2.5G speeds. Added 2500BASEX specific information for configuration. v4: Fix indentation error Signed-off-by: Voon Weifeng Signed-off-by: Michael Sit Wei Hong Signed-off-by: David S. Miller commit 597a68ce32167e7d07bf40648e1501f786f60f99 Author: Voon Weifeng Date: Tue Jun 8 11:51:56 2021 +0800 net: stmmac: split xPCS setup from mdio register This patch is a preparation patch for the enabling of Intel mGbE 2.5Gbps link speed. The Intel mGbR link speed configuration (1G/2.5G) is depends on a mdio ADHOC register which can be configured in the bios menu. As PHY interface might be different for 1G and 2.5G, the mdio bus need be ready to check the link speed and select the PHY interface before probing the xPCS. Signed-off-by: Voon Weifeng Signed-off-by: Michael Sit Wei Hong Signed-off-by: David S. Miller commit 11c7aa0ddea8611007768d3e6b58d45dc60a19e1 Author: Jan Kara Date: Mon Jun 7 13:26:13 2021 +0200 rq-qos: fix missed wake-ups in rq_qos_throttle try two Commit 545fbd0775ba ("rq-qos: fix missed wake-ups in rq_qos_throttle") tried to fix a problem that a process could be sleeping in rq_qos_wait() without anyone to wake it up. However the fix is not complete and the following can still happen: CPU1 (waiter1) CPU2 (waiter2) CPU3 (waker) rq_qos_wait() rq_qos_wait() acquire_inflight_cb() -> fails acquire_inflight_cb() -> fails completes IOs, inflight decreased prepare_to_wait_exclusive() prepare_to_wait_exclusive() has_sleeper = !wq_has_single_sleeper() -> true as there are two sleepers has_sleeper = !wq_has_single_sleeper() -> true io_schedule() io_schedule() Deadlock as now there's nobody to wakeup the two waiters. The logic automatically blocking when there are already sleepers is really subtle and the only way to make it work reliably is that we check whether there are some waiters in the queue when adding ourselves there. That way, we are guaranteed that at least the first process to enter the wait queue will recheck the waiting condition before going to sleep and thus guarantee forward progress. Fixes: 545fbd0775ba ("rq-qos: fix missed wake-ups in rq_qos_throttle") CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210607112613.25344-1-jack@suse.cz Signed-off-by: Jens Axboe commit c9c9762d4d44dcb1b2ba90cfb4122dc11ceebf31 Author: Long Li Date: Mon Jun 7 12:34:05 2021 -0700 block: return the correct bvec when checking for gaps After commit 07173c3ec276 ("block: enable multipage bvecs"), a bvec can have multiple pages. But bio_will_gap() still assumes one page bvec while checking for merging. If the pages in the bvec go across the seg_boundary_mask, this check for merging can potentially succeed if only the 1st page is tested, and can fail if all the pages are tested. Later, when SCSI builds the SG list the same check for merging is done in __blk_segment_map_sg_merge() with all the pages in the bvec tested. This time the check may fail if the pages in bvec go across the seg_boundary_mask (but tested okay in bio_will_gap() earlier, so those BIOs were merged). If this check fails, we end up with a broken SG list for drivers assuming the SG list not having offsets in intermediate pages. This results in incorrect pages written to the disk. Fix this by returning the multi-page bvec when testing gaps for merging. Cc: Jens Axboe Cc: Johannes Thumshirn Cc: Pavel Begunkov Cc: Ming Lei Cc: Tejun Heo Cc: "Matthew Wilcox (Oracle)" Cc: Jeffle Xu Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Fixes: 07173c3ec276 ("block: enable multipage bvecs") Signed-off-by: Long Li Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/1623094445-22332-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Jens Axboe commit 21c6bf8304f0141af6460cfe404dbbdeb96bdd62 Author: Stefan Wahren Date: Sun Jun 6 14:16:17 2021 +0200 arm64: dts: broadcom: Add reference to RPi 400 This adds a reference to the dts of the Raspberry Pi 400, so we don't need to maintain the content in arm64. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/1622981777-5023-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit 1c701accecf21932ebcbd8acacb4557af3797e77 Author: Stefan Wahren Date: Sun Jun 6 14:16:16 2021 +0200 ARM: dts: Add Raspberry Pi 400 support The Raspberry Pi 400 is like a Pi 4 B designed into a keyboard. But there are some minor differences: - higher CPU clock rate (1.8 GHz) - different Wifi chip (BCM43456) - power off is now handled via GPIO - no ACT LED Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622981777-5023-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit 5f30dacf37bc93308e91e4d0fc94681ca73f0f91 Author: Stefan Wahren Date: Sun Jun 6 14:16:15 2021 +0200 ARM: dts: bcm283x: Fix up GPIO LED node names Fix the node names for the GPIO LEDs to conform to the standard node name led-.. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622981777-5023-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit 224bd597a4f37a918c492be35aac1ccf4b8507f4 Author: Stefan Wahren Date: Sun Jun 6 14:16:14 2021 +0200 dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema Add new Raspberry Pi 400 to DT schema. Signed-off-by: Stefan Wahren Acked-by: Rob Herring Link: https://lore.kernel.org/r/1622981777-5023-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit 600abd340190b089fd9daac2cb29a089d072a285 Merge: 8184035805dc8 346ac785badf6 Author: Jens Axboe Date: Tue Jun 8 15:02:21 2021 -0600 Merge tag 'nvme-5.14-2021-06-08' of git://git.infradead.org/nvme into for-5.14/drivers Pull NVMe updates from Christoph: "nvme updates for Linux 5.14 - improve the APST configuration algorithm (Alexey Bogoslavsky) - look for StorageD3Enable on companion ACPI device (Mario Limonciello) - allow selecting the network interface for TCP connections (Martin Belanger) - misc cleanups (Amit Engel, Chaitanya Kulkarni, Colin Ian King, me)" * tag 'nvme-5.14-2021-06-08' of git://git.infradead.org/nvme: nvmet: remove a superfluous variable nvmet: move ka_work initialization to nvmet_alloc_ctrl nvme: remove nvme_{get,put}_ns_from_disk nvme: split nvme_report_zones nvme: move the CSI sanity check into nvme_ns_report_zones nvme: add a sparse annotation to nvme_ns_head_ctrl_ioctl nvme: open code nvme_put_ns_from_disk in nvme_ns_head_ctrl_ioctl nvme: open code nvme_{get,put}_ns_from_disk in nvme_ns_head_ioctl nvme: open code nvme_put_ns_from_disk in nvme_ns_head_chr_ioctl nvme-fabrics: remove extra braces nvme-fabrics: remove an extra comment nvme-fabrics: remove extra new lines in the switch nvme-fabrics: fix the kerneldco comment for nvmf_log_connect_error() nvme-tcp: allow selecting the network interface for connections nvme-pci: look for StorageD3Enable on companion ACPI device instead nvme: extend and modify the APST configuration algorithm nvme: remove redundant initialization of variable ret commit 531bf6a88d9bd6c13d4fc3f05d2de799d627de3b Author: Roberto Sassu Date: Tue Jun 8 14:31:24 2021 +0200 ima: Pass NULL instead of 0 to ima_get_action() in ima_file_mprotect() This patch fixes the sparse warning: sparse: warning: Using plain integer as NULL pointer Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 8c559415f66a42721fcfdf321cb7a58df01a4c74 Author: Roberto Sassu Date: Tue Jun 8 14:31:23 2021 +0200 ima: Include header defining ima_post_key_create_or_update() This patch fixes the sparse warning for ima_post_key_create_or_update() by adding the header file that defines the prototype (linux/ima.h). Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 6b26285f44c9306747c609cb304f787f1933594c Author: Roberto Sassu Date: Tue Jun 8 14:31:22 2021 +0200 ima/evm: Fix type mismatch The endianness of a variable written to the measurement list cannot be determined at compile time, as it depends on the value of the ima_canonical_fmt global variable (set through a kernel option with the same name if the machine is big endian). If ima_canonical_fmt is false, the endianness of a variable is the same as the machine; if ima_canonical_fmt is true, the endianness is little endian. The warning arises due to this type of instruction: var = cpu_to_leXX(var) which tries to assign a value in little endian to a variable with native endianness (little or big endian). Given that the variables set with this instruction are not used in any operation but just written to a buffer, it is safe to force the type of the value being set to be the same of the type of the variable with: var = (__force )cpu_to_leXX(var) Reported-by: kernel test robot Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 24c9ae23bdfa0642228e747849dd052fd4295c6c Author: Roberto Sassu Date: Tue Jun 8 14:31:21 2021 +0200 ima: Set correct casting types The code expects that the values being parsed from a buffer when the ima_canonical_fmt global variable is true are in little endian. Thus, this patch sets the casting types accordingly. Reported-by: kernel test robot Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 22a558f567ab40b6ea779d0f535d3e32c35c099a Author: Roberto Sassu Date: Tue Jun 8 14:31:20 2021 +0200 doc: Fix warning in Documentation/security/IMA-templates.rst This patch fixes the warning: Documentation/security/IMA-templates.rst:81: WARNING: Inline substitution_reference start-string without end-string. Reported-by: Stephen Rothwell Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit ec35d1d93bf8976f0668cb1026ea8c7d7bcad3c1 Author: Borislav Petkov Date: Tue Jun 8 22:17:10 2021 +0200 x86/setup: Document that Windows reserves the first MiB It does so unconditionally too, on Intel and AMD machines, to work around BIOS bugs, as confirmed by Microsoft folks (see Link for full details). Reflow the paragraph, while at it. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/MWHPR21MB159330952629D36EEDE706B3D7379@MWHPR21MB1593.namprd21.prod.outlook.com commit 380afe7208966ab59e5215c9daab3f6b06193d8c Author: Joe Stringer Date: Mon Jun 7 18:57:56 2021 -0700 selftests, bpf: Make docs tests fail more reliably Previously, if rst2man caught errors, then these would be ignored and the output file would be written anyway. This would allow developers to introduce regressions in the docs comments in the BPF headers. Additionally, even if you instruct rst2man to fail out, it will still write out to the destination target file, so if you ran the tests twice in a row it would always pass. Use a temporary file for the initial run to ensure that if rst2man fails out under "--strict" mode, subsequent runs will not automatically pass. Tested via ./tools/testing/selftests/bpf/test_doc_build.sh Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20210608015756.340385-1-joe@cilium.io commit edc0571c5f67c7e24958149a8ec6a904ca84840b Author: Michal Suchanek Date: Fri Jun 4 13:24:48 2021 +0200 libbpf: Fix pr_warn type warnings on 32bit The printed value is ptrdiff_t and is formatted wiht %ld. This works on 64bit but produces a warning on 32bit. Fix the format specifier to %td. Fixes: 67234743736a ("libbpf: Generate loader program out of BPF ELF file.") Signed-off-by: Michal Suchanek Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210604112448.32297-1-msuchanek@suse.de commit 0779890fed7817725f399d6ec85730e08ebfdeee Author: Jean-Philippe Brucker Date: Thu Jun 3 19:05:16 2021 +0200 tools/bpftool: Fix cross-build When the bootstrap and final bpftool have different architectures, we need to build two distinct disasm.o objects. Add a recipe for the bootstrap disasm.o. After commit d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.") cross-building bpftool didn't work anymore, because the bootstrap bpftool was linked using objects from different architectures: $ make O=/tmp/bpftool ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C tools/bpf/bpftool/ V=1 [...] aarch64-linux-gnu-gcc ... -c -MMD -o /tmp/bpftool/disasm.o /home/z/src/linux/kernel/bpf/disasm.c gcc ... -c -MMD -o /tmp/bpftool//bootstrap/main.o main.c gcc ... -o /tmp/bpftool//bootstrap/bpftool /tmp/bpftool//bootstrap/main.o ... /tmp/bpftool/disasm.o /usr/bin/ld: /tmp/bpftool/disasm.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: /tmp/bpftool/disasm.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: /tmp/bpftool/disasm.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: /tmp/bpftool/disasm.o: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status [...] The final bpftool was built for e.g. arm64, while the bootstrap bpftool, executed on the host, was built for x86. The problem here was that disasm.o linked into the bootstrap bpftool was arm64 rather than x86. With the fix we build two disasm.o, one for the target bpftool in arm64, and one for the bootstrap bpftool in x86. Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210603170515.1854642-1-jean-philippe@linaro.org commit ac477efcf0998c16a5be70f786b968cc1f973268 Author: Baokun Li Date: Tue Jun 8 11:10:41 2021 +0800 RDMA/irdma: Use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Link: https://lore.kernel.org/r/20210608031041.2820429-1-libaokun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Baokun Li Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 303597e49b835471dc571849af02a99fa74ba3ae Merge: 762411542050d 020577f879be7 Author: David S. Miller Date: Tue Jun 8 12:10:26 2021 -0700 Merge tag 'batadv-next-pullrequest-20210608' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== pull request for net-next: batman-adv 2021-06-08 here is a feature/cleanup pull request of batman-adv to go into net-next. Please pull or let me know of any problem! This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - consistently send iface index/name in genlmsg, by Sven Eckelmann - improve broadcast queueing, by Linus Lüssing (2 patches) - add support for routable IPv4 multicast with bridged setups, by Linus Lüssing - remove repeated declarations, by Shaokun Zhang - fix spelling mistakes, by Zheng Yongjun - clean up hard interface handling after dropping sysfs support, by Sven Eckelmann (4 patches) ==================== Signed-off-by: David S. Miller commit 762411542050dbe27c7c96f13c57f93da5d9b89a Author: Geert Uytterhoeven Date: Tue Jun 8 12:56:09 2021 +0200 nvme: NVME_TCP_OFFLOAD should not default to m The help text for the symbol controlling support for the NVM Express over Fabrics TCP offload common layer suggests to not enable this support when unsure. Hence drop the "default m", which actually means "default y" if CONFIG_MODULES is not enabled. Fixes: f0e8cb6106da2703 ("nvme-tcp-offload: Add nvme-tcp-offload - NVMeTCP HW offload ULP") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 1a61fed9f797c237050640b131fa77edd1229e58 Merge: 5552571c657d5 f23a3da78a31d Author: David S. Miller Date: Tue Jun 8 12:04:05 2021 -0700 Merge branch 'farsync-cleanups' Peng Li says: ==================== net: farsync: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit f23a3da78a31d2ec7029c9637bf57ec892ada40c Author: Peng Li Date: Tue Jun 8 16:12:42 2021 +0800 net: farsync: replace comparison to NULL with "fst_card_array[i]" According to the chackpatch.pl, comparison to NULL could be written "fst_card_array[i]". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit f01f906ffefc71e5d370e7542884820d1318358b Author: Peng Li Date: Tue Jun 8 16:12:41 2021 +0800 net: farsync: remove redundant return Void function return statements are not generally useful. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d2a1054b8b02afdaae8119fdd7bf1171fd2fce2b Author: Peng Li Date: Tue Jun 8 16:12:40 2021 +0800 net: farsync: fix the alignment issue Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit ae1be3fad5695fcb5ad1053b4847f89431f7b922 Author: Peng Li Date: Tue Jun 8 16:12:39 2021 +0800 net: farsync: remove redundant parentheses Unnecessary parentheses around 'port->hwif == X21'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit b64b5aee73580ec223a95d28b359117b52436ff9 Author: Peng Li Date: Tue Jun 8 16:12:38 2021 +0800 net: farsync: remove redundant spaces According to the chackpatch.pl, space prohibited between function name and open parenthesis '(', no space is necessary after a cast. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit fa8d10b54760c4869e7d3d6b57e4e5a694f0d112 Author: Peng Li Date: Tue Jun 8 16:12:37 2021 +0800 net: farsync: remove redundant braces {} This patch removes redundant braces {}, to fix the checkpatch.pl warning: "braces {} are not necessary for single statement blocks". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 37947a9be3d1a5d551e34f56653c5ccf86814cc3 Author: Peng Li Date: Tue Jun 8 16:12:36 2021 +0800 net: farsync: add some required spaces Add spaces required around that '=' and '*'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 7619ab161892edb6826504f8549ee78e568cf793 Author: Peng Li Date: Tue Jun 8 16:12:35 2021 +0800 net: farsync: fix the code style issue about macros Macros with complex values should be enclosed in parentheses. space required after that ',' . Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 3a950181f6f58b13ee4475cafe45170ed738c2af Author: Peng Li Date: Tue Jun 8 16:12:34 2021 +0800 net: farsync: code indent use tabs where possible Code indent should use tabs where possible. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d70711da30f0bec1286aab6f01f4a0ac6da1db79 Author: Peng Li Date: Tue Jun 8 16:12:33 2021 +0800 net: farsync: remove trailing whitespaces This patch removes trailing whitespaces. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 14b9764ccfeb3ca59ae74b17a521cdf54929831d Author: Peng Li Date: Tue Jun 8 16:12:32 2021 +0800 net: farsync: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 8ccac4a58aa8cd2fc14cee2671996cb1ec78c71f Author: Peng Li Date: Tue Jun 8 16:12:31 2021 +0800 net: farsync: remove redundant initialization for statics Should not initialise statics to 0. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 40996bcfe965f70a4f8304cfdd0fb9cd495b9385 Author: Peng Li Date: Tue Jun 8 16:12:30 2021 +0800 net: farsync: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 8ea4bfb30abc5ef2688f014ffab70b5e704f0c83 Author: Peng Li Date: Tue Jun 8 16:12:29 2021 +0800 net: farsync: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo * bar" should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 50d4c363366a09706073595f8e2d3b1683c3bbcc Author: Peng Li Date: Tue Jun 8 16:12:28 2021 +0800 net: farsync: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 34de4c85f3936a1d806a81e66f3a19dc758a8c4d Author: Peng Li Date: Tue Jun 8 16:12:27 2021 +0800 net: farsync: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 3958e2d0c34e18c41b60dc01832bd670a59ef70f Author: Suren Baghdasaryan Date: Mon May 24 12:53:39 2021 -0700 cgroup: make per-cgroup pressure stall tracking configurable PSI accounts stalls for each cgroup separately and aggregates it at each level of the hierarchy. This causes additional overhead with psi_avgs_work being called for each cgroup in the hierarchy. psi_avgs_work has been highly optimized, however on systems with large number of cgroups the overhead becomes noticeable. Systems which use PSI only at the system level could avoid this overhead if PSI can be configured to skip per-cgroup stall accounting. Add "cgroup_disable=pressure" kernel command-line option to allow requesting system-wide only pressure stall accounting. When set, it keeps system-wide accounting under /proc/pressure/ but skips accounting for individual cgroups and does not expose PSI nodes in cgroup hierarchy. Signed-off-by: Suren Baghdasaryan Acked-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Signed-off-by: Tejun Heo commit 5552571c657d57e532b321c902bddc73c7807f07 Merge: d6dd33ffa33b7 6813cc8cfdaf4 Author: David S. Miller Date: Tue Jun 8 11:41:24 2021 -0700 Merge branch 'realtek-dt' Joakim Zhang says: ==================== net: phy: add dt property for realtek phy Add dt property for realtek phy. --- ChangeLogs: V1->V2: * store the desired PHYCR1/2 register value in "priv" rather than using "quirks", per Russell King suggestion, as well as can cover the bootloader setting. * change the behavior of ALDPS mode, default is disabled, add dt property for users to enable it. * fix dt binding yaml build issues. ==================== Signed-off-by: David S. Miller commit 6813cc8cfdaf401476e1a007cec8ae338cefa573 Author: Joakim Zhang Date: Tue Jun 8 11:15:35 2021 +0800 net: phy: realtek: add delay to fix RXC generation issue PHY will delay about 11.5ms to generate RXC clock when switching from power down to normal operation. Read/write registers would also cause RXC become unstable and stop for a while during this process. Realtek engineer suggests 15ms or more delay can workaround this issue. Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit d90db36a9e748c9d886df15f5e17b341f0e5bcd5 Author: Joakim Zhang Date: Tue Jun 8 11:15:34 2021 +0800 net: phy: realtek: add dt property to enable ALDPS mode If enable Advance Link Down Power Saving (ALDPS) mode, it will change crystal/clock behavior, which cause RXC clock stop for dozens to hundreds of miliseconds. This is comfirmed by Realtek engineer. For some MACs, it needs RXC clock to support RX logic, after this patch, PHY can generate continuous RXC clock during auto-negotiation. ALDPS default is disabled after hardware reset, it's more reasonable to add a property to enable this feature, since ALDPS would introduce side effect. This patch adds dt property "realtek,aldps-enable" to enable ALDPS mode per users' requirement. Jisheng Zhang enables this feature, changes the default behavior. Since mine patch breaks the rule that new implementation should not break existing design, so Cc'ed let him know to see if it can be accepted. Cc: Jisheng Zhang Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 0a4355c2b7f8ecd5e61cc262ecdbd4a2cce1ea7e Author: Joakim Zhang Date: Tue Jun 8 11:15:33 2021 +0800 net: phy: realtek: add dt property to disable CLKOUT clock CLKOUT is enabled by default after PHY hardware reset, this patch adds "realtek,clkout-disable" property for user to disable CLKOUT clock to save PHY power. Per RTL8211F guide, a PHY reset should be issued after setting these bits in PHYCR2 register. After this patch, CLKOUT clock output to be disabled. Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit a9f15dc2b9733cb5870e655e6b77a4ec2cc51b8b Author: Joakim Zhang Date: Tue Jun 8 11:15:32 2021 +0800 dt-bindings: net: add dt binding for realtek rtl82xx phy Add binding for realtek rtl82xx phy. Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit d6dd33ffa33b7a6a05e98f8f0cb2f256640fa5d5 Author: Marek Behún Date: Tue Jun 8 03:26:48 2021 +0200 net: Kconfig: indent with tabs instead of spaces The BAREUDP config option uses spaces instead of tabs for indentation. The rest of this file uses tabs. Fix this. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit ec9bf373f2458f4b5f1ece8b93a07e6204081667 Author: Weihang Li Date: Fri May 28 17:37:38 2021 +0800 RDMA/core: Use refcount_t instead of atomic_t on refcount of ib_uverbs_device The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-8-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 149876d96877eedce0ae3ffbd64edb56360b8926 Author: Huilong Deng Date: Sat Jun 5 12:53:02 2021 +0800 seqlock: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Huilong Deng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210605045302.37154-1-denghuilong@cdjrlc.com commit a5e27fb68fcce3885cfc02a1ecd7d02fe3f02a34 Author: Weihang Li Date: Fri May 28 17:37:43 2021 +0800 RDMA/ipoib: Use refcount_t instead of atomic_t for reference counting The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-13-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 7183451f846d22e9fee665756824c9c2cc9cf377 Author: Weihang Li Date: Fri May 28 17:37:42 2021 +0800 RDMA/cxgb4: Use refcount_t instead of atomic_t for reference counting The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-12-git-send-email-liweihang@huawei.com Cc: Potnuri Bharat Teja Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 8f9513d89f0417d3ca0a99b5f63c84b4cf2ed5fa Author: Weihang Li Date: Fri May 28 17:37:41 2021 +0800 RDMA/hns: Use refcount_t instead of atomic_t for QP reference counting The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-11-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 33649cd3f9497523c7110337b9c6f08ab43746c6 Author: Weihang Li Date: Fri May 28 17:37:40 2021 +0800 RDMA/hns: Use refcount_t instead of atomic_t for SRQ reference counting The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-10-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit cc9e5a844ab8139085d28efdda9ae1d5625a5319 Author: Weihang Li Date: Fri May 28 17:37:39 2021 +0800 RDMA/hns: Use refcount_t instead of atomic_t for CQ reference counting The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-9-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 58d33b4fa9d7926535c0f2d30bdb21d2e06e6047 Author: Weihang Li Date: Fri May 28 17:37:36 2021 +0800 RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_port The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-6-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit cd74db6cbb1e5a9d9103ccb41aca777d0e4298cd Author: Weihang Li Date: Fri May 28 17:37:35 2021 +0800 RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_member The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-5-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 6448508076bf1e2b9133b34e51c7170b335b9abf Author: Jason Gunthorpe Date: Fri May 28 17:37:34 2021 +0800 RDMA/core: Remove refcount from struct ib_mad_snoop_private The member is never used, delete it. Signed-off-by: Jason Gunthorpe commit fcc57a7b2bba3374da1b7df3f65aec35dac37917 Author: Weihang Li Date: Fri May 28 17:37:33 2021 +0800 RDMA/core: Use refcount_t instead of atomic_t on refcount of iwpm_admin_data The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Increase refcount_t from 0 to 1 is regarded as there is a risk about use-after-free. So it should be set to 1 directly during initialization. Link: https://lore.kernel.org/r/1622194663-2383-3-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 60dff56d77292062789232f68354f567e1ccf1d2 Author: Weihang Li Date: Fri May 28 17:37:32 2021 +0800 RDMA/core: Use refcount_t instead of atomic_t on refcount of iwcm_id_private The refcount_t API will WARN on underflow and overflow of a reference counter, and avoid use-after-free risks. Link: https://lore.kernel.org/r/1622194663-2383-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit fe6bde732be8c4711a878b11491d9a2749b03909 Author: ChenXiaoSong Date: Mon Jun 7 11:52:01 2021 +0800 Smack: fix doc warning Fix gcc W=1 warning: security/smack/smack_access.c:342: warning: Function parameter or member 'ad' not described in 'smack_log' security/smack/smack_access.c:403: warning: Function parameter or member 'skp' not described in 'smk_insert_entry' security/smack/smack_access.c:487: warning: Function parameter or member 'level' not described in 'smk_netlbl_mls' security/smack/smack_access.c:487: warning: Function parameter or member 'len' not described in 'smk_netlbl_mls' Signed-off-by: ChenXiaoSong Signed-off-by: Casey Schaufler commit 17c1a4b7ac6ffcebcc97442b9af4a34a95d4a1f8 Author: Ville Syrjälä Date: Tue Jun 8 11:54:15 2021 +0300 drm/i915: Disable PSR around cdclk changes AUX logic is often clocked from cdclk. Disable PSR to make sure there are no hw initiated AUX transactions in flight while we change the cdclk frequency. Cc: Mika Kahola Signed-off-by: Ville Syrjälä Signed-off-by: Gwan-gyeong Mun Reviewed-by: Mika Kahola Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210608085415.515342-2-gwan-gyeong.mun@intel.com commit 234b40282efba8c6a8824dee2c580f3c3964be34 Author: Gwan-gyeong Mun Date: Tue Jun 8 11:54:14 2021 +0300 drm/i915/display: Introduce new intel_psr_pause/resume function This introduces the following function that can exit and activate a psr source when intel_psr is already enabled. - intel_psr_pause(): Pause current PSR. It deactivates current psr state. - intel_psr_resume(): Resume paused PSR. It activates paused psr state. v2: Address Jose's review comment. - Remove unneeded changes around the intel_psr_enable(). - Add intel_psr_post_exit() which processes waiting until PSR is idle and WA for SelectiveFetch. v3: Address Jose's review comment. - Rename intel_psr_post_exit() to intel_psr_wait_exit_locked(). - Move WA_1408330847 to intel_psr_disable_locked() - If the PSR is paused by an explicit intel_psr_paused() call, make the intel_psr_flush() not to activate PSR. v4: Address Jose's review comment. - In order to avoid the scenario of PSR is not active but there is a scheduled psr->work, it changes the check routine of intel_psr_pause() for PSR's enablement from "psr->active" to "psr->enable". Cc: José Roberto de Souza Cc: Stanislav Lisovskiy Cc: Ville Syrjälä Signed-off-by: Gwan-gyeong Mun Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210608085415.515342-1-gwan-gyeong.mun@intel.com commit 0808b3d5b7514dc856178dbc509929329bbf301d Author: Masami Hiramatsu Date: Mon Jun 7 00:49:28 2021 +0900 perf probe: Provide clearer message permission error for tracefs access Report permission error for the tracefs open and rewrite whole the error message code around it. You'll see a hint according to what you want to do with perf probe as below. $ perf probe -l No permission to read tracefs. Please try 'sudo mount -o remount,mode=755 /sys/kernel/tracing/' Error: Failed to show event list. $ perf probe -d \* No permission to write tracefs. Please run this command again with sudo. Error: Failed to delete events. This also fixes -ENOTSUP checking for mounting tracefs/debugfs. Actually open returns -ENOENT in that case and we have to check it with current mount point list. If we unmount debugfs and tracefs perf probe shows correct message as below. $ perf probe -l Debugfs or tracefs is not mounted Please try 'sudo mount -t tracefs nodev /sys/kernel/tracing/' Error: Failed to show event list. Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Aneesh Kumar K.V Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/162299456839.503471.13863002017089255222.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 249c9dc6aa0db74a0f7908efd04acf774e19b155 Author: Amey Narkhede Date: Tue Jun 8 22:15:59 2021 +0530 iommu/arm: Cleanup resources in case of probe error path If device registration fails, remove sysfs attribute and if setting bus callbacks fails, unregister the device and cleanup the sysfs attribute. Signed-off-by: Amey Narkhede Link: https://lore.kernel.org/r/20210608164559.204023-1-ameynarkhede03@gmail.com Signed-off-by: Will Deacon commit ab9a77a141cc14ed607b4bf7a83ab6b0057ae084 Author: Sai Prakash Ranjan Date: Tue Jun 8 18:00:07 2021 +0530 iommu/arm-smmu-qcom: Move the adreno smmu specific impl Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU both implement "arm,mmu-500" in some QTI SoCs and to run through adreno smmu specific implementation such as enabling split pagetables support, we need to match the "qcom,adreno-smmu" compatible first before apss smmu or else we will be running apps smmu implementation for adreno smmu and the additional features for adreno smmu is never set. For ex: we have "qcom,sc7280-smmu-500" compatible for both apps and adreno smmu implementing "arm,mmu-500", so the adreno smmu implementation is never reached because the current sequence checks for apps smmu compatible(qcom,sc7280-smmu-500) first and runs that specific impl and we never reach adreno smmu specific implementation. Suggested-by: Akhil P Oommen Signed-off-by: Sai Prakash Ranjan Reviewed-by: Bjorn Andersson Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/c42181d313fdd440011541a28cde8cd10fffb9d3.1623155117.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit 0b779f562b1473db3d96a751f38b185e92fd6426 Author: Sai Prakash Ranjan Date: Tue Jun 8 18:00:06 2021 +0530 iommu/arm-smmu-qcom: Add SC7280 SMMU compatible Add compatible for SC7280 SMMU to use the Qualcomm Technologies, Inc. specific implementation. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/53a50cd91c97b5b598a73941985b79b51acefa14.1623155117.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Will Deacon commit e99168f9f08644217d052808dd611dfe43e839cb Author: Marek Vasut Date: Mon Jun 7 19:24:57 2021 +0200 drm/stm: Remove usage of drm_display_mode_to_videomode() There is not much value in the extra conversion step, the calculations required for the LTDC IP are different than what is used in the drm_display_mode_to_videomode(), so just do the right ones in the LTDC driver right away. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Antonio Borneo Cc: Benjamin Gaignard Cc: Maxime Coquelin Cc: Philippe Cornu Cc: Sam Ravnborg Cc: Vincent Abriou Cc: Yannick Fertre Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com To: dri-devel@lists.freedesktop.org Tested-by: Yannick Fertré Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20210607172457.14471-1-marex@denx.de commit bde1e7d934565c353626c39353b0cdae9274180f Author: Leo Yan Date: Wed Jun 2 18:30:04 2021 +0800 perf auxtrace: Change to use SMP memory barriers The kernel and the userspace tool can access the AUX ring buffer head and tail from different CPUs, thus SMP class of barriers are required on SMP system. This patch changes to use SMP barriers to replace mb() and rmb() barriers. Signed-off-by: Leo Yan Acked-by: Adrian Hunter Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Andi Kleen Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20210602103007.184993-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 68b2c8bcdb813cd7e520e8cf54912a3280deb74d Merge: 295abff2fb940 b26b2bf14f823 Author: Darrick J. Wong Date: Tue Jun 8 09:38:36 2021 -0700 Merge tag 'rename-eofblocks-5.14_2021-06-08' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.14-merge2 xfs: rename struct xfs_eofblocks In the old days, struct xfs_eofblocks was an optional parameter to the speculative post-EOF allocation garbage collector to narrow the scope of a scan to files fitting specific criteria. Nowadays it is used for all other kinds of inode cache walks (reclaim, quotaoff, inactivation), so the name is no longer fitting. Change the flag namespace and rename the structure to something more appropriate for what it does. v2: separate the inode cache walk flag namespace from eofblocks * tag 'rename-eofblocks-5.14_2021-06-08' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: rename struct xfs_eofblocks to xfs_icwalk xfs: change the prefix of XFS_EOF_FLAGS_* to XFS_ICWALK_FLAG_ commit 295abff2fb940362814d12d513d8c443485183db Merge: ffc18582ed18f 9492750a8b18f Author: Darrick J. Wong Date: Tue Jun 8 09:38:24 2021 -0700 Merge tag 'fix-inode-health-reports-5.14_2021-06-08' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.14-merge2 xfs: preserve inode health reports for longer This is a quick series to make sure that inode sickness reports stick around in memory for some amount of time. v2: rebase to 5.13-rc4 v3: require explicit request to reclaim sick inodes, drop weird icache miss interaction with DONTCACHE * tag 'fix-inode-health-reports-5.14_2021-06-08' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: selectively keep sick inodes in memory xfs: drop IDONTCACHE on inodes when we mark them sick xfs: only reset incore inode health state flags when reclaiming an inode commit e0e3903f83d5e41ab7e7737ebe41ef36f578dc0a Author: Mark Rutland Date: Tue Jun 8 13:37:42 2021 +0100 arm64: mm: decode xFSC in mem_abort_decode() It would be helpful if mem_abort_decode() could decode the DFSC/IFSC, as this can make it easier to identify common bugs (e.g. accesses which trigger alignment faults) without having to manually decode the xFSC value. Decode the xFSC in mem_abort_decode(). Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Robin Murphy Cc: Will Deacon Link: https://lore.kernel.org/r/20210608123742.11921-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit b26b2bf14f823e9597118c01993aeba9aeb9a701 Author: Darrick J. Wong Date: Mon Jun 7 09:34:51 2021 -0700 xfs: rename struct xfs_eofblocks to xfs_icwalk The xfs_eofblocks structure is no longer well-named -- nowadays it provides optional filtering criteria to any walk of the incore inode cache. Only one of the cache walk goals has anything to do with clearing of speculative post-EOF preallocations, so change the name to be more appropriate. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9492750a8b18f02a8dec2aab594c59aabe2e4d0d Author: Darrick J. Wong Date: Mon Jun 7 09:34:50 2021 -0700 xfs: selectively keep sick inodes in memory It's important that the filesystem retain its memory of sick inodes for a little while after problems are found so that reports can be collected about what was wrong. Don't let inode reclamation free sick inodes unless we're unmounting or the fs already went down. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit 2d53f66baffde66fe72c360e3b9b0c8a2d7ce7c6 Author: Darrick J. Wong Date: Mon Jun 7 09:34:51 2021 -0700 xfs: change the prefix of XFS_EOF_FLAGS_* to XFS_ICWALK_FLAG_ In preparation for renaming struct xfs_eofblocks to struct xfs_icwalk, change the prefix of the existing XFS_EOF_FLAGS_* flags to XFS_ICWALK_FLAG_ and convert all the existing users. This adds a degree of interface separation between the ioctl definitions and the incore parameters. Since FLAGS_UNION is only used in xfs_icache.c, move it there as a private flag. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit 7975e465af6b46e9d0eaf94f764922dc92b28d9c Author: Darrick J. Wong Date: Mon Jun 7 09:34:50 2021 -0700 xfs: drop IDONTCACHE on inodes when we mark them sick When we decide to mark an inode sick, clear the DONTCACHE flag so that the incore inode will be kept around until memory pressure forces it out of memory. This increases the chances that the sick status will be caught by someone compiling a health report later on. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit 255794c7ed7adb914e831f5e4905d783d31378d2 Author: Darrick J. Wong Date: Mon Jun 7 09:34:49 2021 -0700 xfs: only reset incore inode health state flags when reclaiming an inode While running some fuzz tests on inode metadata, I noticed that the filesystem health report (as provided by xfs_spaceman) failed to report the file corruption even when spaceman was run immediately after running xfs_scrub to detect the corruption. That isn't the intended behavior; one ought to be able to run scrub to detect errors in the ondisk metadata and be able to access to those reports for some time after the scrub. After running the same sequence through an instrumented kernel, I discovered the reason why -- scrub igets the file, scans it, marks it sick, and ireleases the inode. When the VFS lets go of the incore inode, it moves to RECLAIMABLE state. If spaceman igets the incore inode before it moves to RECLAIM state, iget reinitializes the VFS state, clears the sick and checked masks, and hands back the inode. At this point, the caller has the exact same incore inode, but with all the health state erased. In other words, we're erasing the incore inode's health state flags when we've decided NOT to sever the link between the incore inode and the ondisk inode. This is wrong, so we need to remove the lines that zero the fields from xfs_iget_cache_hit. As a precaution, we add the same lines into xfs_reclaim_inode just after we sever the link between incore and ondisk inode. Strictly speaking this isn't necessary because once an inode has gone through reclaim it must go through xfs_inode_alloc (which also zeroes the state) and xfs_iget is careful to check for mismatches between the inode it pulls out of the radix tree and the one it wants. Fixes: 6772c1f11206 ("xfs: track metadata health status") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit ffc18582ed18f1bb16da9ec38a792c7cbc3714a1 Merge: 8b943d21d40d5 c076ae7a9361b Author: Darrick J. Wong Date: Tue Jun 8 09:26:44 2021 -0700 Merge tag 'inode-walk-cleanups-5.14_2021-06-03' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.14-merge2 xfs: clean up incore inode walk functions This ambitious series aims to cleans up redundant inode walk code in xfs_icache.c, hide implementation details of the quotaoff dquot release code, and eliminates indirect function calls from incore inode walks. The first thing it does is to move all the code that quotaoff calls to release dquots from all incore inodes into xfs_icache.c. Next, it separates the goal of an inode walk from the actual radix tree tags that may or may not be involved and drops the kludgy XFS_ICI_NO_TAG thing. Finally, we split the speculative preallocation (blockgc) and quotaoff dquot release code paths into separate functions so that we can keep the implementations cohesive. Christoph suggested last cycle that we 'simply' change quotaoff not to allow deactivating quota entirely, but as these cleanups are to enable one major change in behavior (deferred inode inactivation) I do not want to add a second behavior change (quotaoff) as a dependency. To be blunt: Additional cleanups are not in scope for this series. Next, I made two observations about incore inode radix tree walks -- since there's a 1:1 mapping between the walk goal and the per-inode processing function passed in, we can use the goal to make a direct call to the processing function. Furthermore, the only caller to supply a nonzero iter_flags argument is quotaoff, and there's only one INEW flag. From that observation, I concluded that it's quite possible to remove two parameters from the xfs_inode_walk* function signatures -- the iter_flags, and the execute function pointer. The middle of the series moves the INEW functionality into the one piece (quotaoff) that wants it, and removes the indirect calls. The final observation is that the inode reclaim walk loop is now almost the same as xfs_inode_walk, so it's silly to maintain two copies. Merge the reclaim loop code into xfs_inode_walk. Lastly, refactor the per-ag radix tagging functions since there's duplicated code that can be consolidated. This series is a prerequisite for the next two patchsets, since deferred inode inactivation will add another inode radix tree tag and iterator function to xfs_inode_walk. v2: walk the vfs inode list when running quotaoff instead of the radix tree, then rework the (now completely internal) inode walk function to take the tag as the main parameter. v3: merge the reclaim loop into xfs_inode_walk, then consolidate the radix tree tagging functions v4: rebase to 5.13-rc4 v5: combine with the quotaoff patchset, reorder functions to minimize forward declarations, split inode walk goals from radix tree tags to reduce conceptual confusion v6: start moving the inode cache code towards the xfs_icwalk prefix * tag 'inode-walk-cleanups-5.14_2021-06-03' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: refactor per-AG inode tagging functions xfs: merge xfs_reclaim_inodes_ag into xfs_inode_walk_ag xfs: pass struct xfs_eofblocks to the inode scan callback xfs: fix radix tree tag signs xfs: make the icwalk processing functions clean up the grab state xfs: clean up inode state flag tests in xfs_blockgc_igrab xfs: remove indirect calls from xfs_inode_walk{,_ag} xfs: remove iter_flags parameter from xfs_inode_walk_* xfs: move xfs_inew_wait call into xfs_dqrele_inode xfs: separate the dqrele_all inode grab logic from xfs_inode_walk_ag_grab xfs: pass the goal of the incore inode walk to xfs_inode_walk() xfs: rename xfs_inode_walk functions to xfs_icwalk xfs: move the inode walk functions further down xfs: detach inode dquots at the end of inactivation xfs: move the quotaoff dqrele inode walk into xfs_icache.c [djwong: added variable names to function declarations while fixing merge conflicts] Signed-off-by: Darrick J. Wong commit 2b9ced5a964fc6c36a3d893c428d5c3c9ccf6dd9 Author: Rohit Khaire Date: Tue Jun 8 10:19:18 2021 -0400 drm/amdgpu: Use PSP to program IH_RB_CNTL_RING1/2 on SRIOV This is similar to IH_RB_CNTL programming in navi10_ih_toggle_ring_interrupts Signed-off-by: Rohit Khaire Acked-by: Christian König Reviewed-by: Horace Chen Signed-off-by: Alex Deucher commit ea5267994e9e280d48a9089202bf5740b658717b Author: Aric Cyr Date: Mon May 31 18:33:12 2021 -0400 drm/amd/display: 3.2.139 Signed-off-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b91ab86311c6acd14599944e7456af21218b5493 Author: Wyatt Wood Date: Mon May 31 09:47:59 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.69 Signed-off-by: Wyatt Wood Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 793c82eebb0dc7345d207689b2d20326db68cb2c Author: Po-Ting Chen Date: Wed May 5 20:46:36 2021 +0800 drm/amd/display: Add swizzle visual confirm mode [Why] To support a new visual confirm mode: swizzle to show the specific color at the screen border according to different surface swizzle mode. Currently we only support the Linear mode with red color. Signed-off-by: Po-Ting Chen Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit caa18dd6dd9305d52943a6b59f410cbc960ad0a0 Author: Dingchen (David) Zhang Date: Mon May 31 10:24:53 2021 -0400 drm/amd/display: force CP to DESIRED when removing display [WHY] - Commit from userspace could cause link stream to disable and hdcp auth to reset when the HDCP has already been enabled at the moment. CP should fall back to DESIRED from ENABLED in such cases. - This change was previously reverted due to a regression caused, which has now been cleared. [HOW] In hdcp display removal, change CP to DESIRED if at the moment CP is ENABLED before the auth reset and removal of linked list element. Signed-off-by: Dingchen (David) Zhang Signed-off-by: Qingqing Zhuo Reviewed-by: Rodrigo Siqueira Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c6323a2c5e46530882c49000747f3b869f7451a1 Author: Eric Bernstein Date: Wed May 26 15:22:51 2021 -0400 drm/amd/display: Updates for ODM Transition Test [Why] There is an assert in cases where transition from ODM 2:1 to ODM 1:1 (bypass) [How] Remove assert since this case is now valid. Update diags tests for ODM transitions. Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f2700d0bb7218efea30f56e18b8b713781989f0a Author: Roy Chan Date: Thu May 20 16:20:39 2021 -0400 drm/amd/display: Revert "Disconnect non-DP with no EDID" [Why] Found a use case (IPKVM) that DP-VGA active dongle does not return any EDID and the mentioned commit broke it. [How] This reverts "Disconnect non-DP with no EDID" Signed-off-by: Roy Chan Reviewed-by: Chris Park Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fcd1e484c8aedb0c125d4a22f7f20b418c4a9e6d Author: Fangzhi Zuo Date: Tue May 25 20:39:12 2021 -0400 drm/amd/display: Add debugfs entry for dsc passthrough [Why & How] Add debugfs entry to force dsc decoding at PCON when DSC capable external RX is connected. In such case, it is free to test DSC decoding at external RX or at PCON. Signed-off-by: Fangzhi Zuo Reviewed-by: Hersen Wu Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 665f28507a2a3d8d72ed9afa9a2b9b17fd43add1 Author: Aric Cyr Date: Tue May 25 15:33:51 2021 -0400 drm/amd/display: Fix crash during MPO + ODM combine mode recalculation [Why] When calculating recout width for an MPO plane on a mode that's using ODM combine, driver can calculate a negative value, resulting in a crash. [How] For negative widths, use zero such that validation will prune the configuration correctly and disallow MPO. Signed-off-by: Aric Cyr Reviewed-by: Krunoslav Kovac Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e4e3678260e9734f6f41b4325aac0b171833a618 Author: Wesley Chalmers Date: Wed Apr 28 18:38:54 2021 -0400 drm/amd/display: Fix off-by-one error in DML [WHY] For DCN30 and later, there is no data in DML arrays indexed by state at index num_states. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3577e1678772ce3ede92af3a75b44a4b76f9b4ad Author: Wesley Chalmers Date: Thu May 20 12:12:48 2021 -0400 drm/amd/display: Set DISPCLK_MAX_ERRDET_CYCLES to 7 [WHY] DISPCLK_MAX_ERRDET_CYCLES must be 7 to prevent connection loss when changing DENTIST_DISPCLK_WDIVIDER from 126 to 127 and back. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 39a1355feff934d967240f2212f5a25f9f6b1357 Author: Wesley Chalmers Date: Thu May 6 17:16:00 2021 -0400 drm/amd/display: Add interface for ADD & DROP PIXEL Registers [WHY] HW has handed down a new sequence that requires access to these registers. v2: squash in DCN3.1 fixes (Alex) Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8b943d21d40d5d7f8306e833b156f8d11094470f Merge: f52edf6c54d94 977ec4ddf0b75 Author: Darrick J. Wong Date: Tue Jun 8 09:22:34 2021 -0700 Merge tag 'assorted-fixes-5.14-1_2021-06-03' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.14-merge2 xfs: assorted fixes for 5.14, part 1 This branch contains the first round of various small fixes for 5.14. * tag 'assorted-fixes-5.14-1_2021-06-03' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: don't take a spinlock unconditionally in the DIO fastpath xfs: mark xfs_bmap_set_attrforkoff static xfs: Remove redundant assignment to busy xfs: sort variable alphabetically to avoid repeated declaration commit f52edf6c54d94987e6bc1541d0fdea2f12e68064 Merge: 9ba0889e22722 20bd8e63f30be Author: Darrick J. Wong Date: Tue Jun 8 09:21:24 2021 -0700 Merge tag 'unit-conversion-cleanups-5.14_2021-06-03' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-5.14-merge2 xfs: various unit conversions Crafting the realtime file extent size hint fixes revealed various opportunities to clean up unit conversions, so now that gets its own series. * tag 'unit-conversion-cleanups-5.14_2021-06-03' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: remove unnecessary shifts xfs: clean up open-coded fs block unit conversions commit b4d56e0c508b2ad847aeff5691f67bd2a40034ec Author: Wesley Chalmers Date: Thu May 6 14:51:20 2021 -0400 drm/amd/display: Add Interface to set FIFO ERRDET SW Override [WHY] HW has handed down a new sequence which requires access to the FIFO ERRDET SW Override register. Signed-off-by: Wesley Chalmers Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bd4fd2510e20241a2ddce192eda2c5c3980c3575 Author: Aric Cyr Date: Mon May 24 18:13:31 2021 -0400 drm/amd/display: 3.2.138 Signed-off-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7fcb910cfa848bd2c91a48e487c8183c1cb95b11 Author: Anthony Koo Date: Sat May 22 19:45:46 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.68 Signed-off-by: Anthony Koo Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 136e55e7a92726be4a858f9ad69bd53a9c5d07ec Author: Aric Cyr Date: Fri May 21 18:06:36 2021 -0400 drm/amd/display: Change default policy for MPO with multidisplay [Why] Rearranging pipes with multiple displays and multiple planes cannot be done atomically and requires a much improved sequence to deal with it. [How] To workaround such issues, prefer avoid pipe-split policy for multidisplay scenarios. Signed-off-by: Aric Cyr Reviewed-by: Krunoslav Kovac Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3f8518b60c10aa96f3efa38a967a0b4eb9211ac0 Author: Vladimir Stempen Date: Wed May 19 13:55:46 2021 -0400 drm/amd/display: Release MST resources on switch from MST to SST [why] When OS overrides training link training parameters for MST device to SST mode, MST resources are not released and leak of the resource may result crash and incorrect MST discovery during following hot plugs. [how] Retaining sink object to be reused by SST link and releasing MST resources. Signed-off-by: Vladimir Stempen Reviewed-by: Wenjing Liu Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 74b4afad00dd70ee77ce2f3d31d6700f4dfb15ef Author: Mikita Lipski Date: Wed May 19 17:32:16 2021 -0400 drm/amd/display: Enable PSR Residency for multiple panels [why] Allow specifying which panel to take PSR Residency measurements from. [how] Pass panel instance to DMUB through GPINT in the upper 8 bits of the parameter. Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5c69cc559afb76b729478c7abae8e27bfc401442 Author: Jayendran Ramani Date: Tue May 4 13:41:18 2021 -0400 drm/amd/display: Return last used DRR VTOTAL from DC [How] Add call to get the last used VTOTAL from DC Signed-off-by: Jayendran Ramani Reviewed-by: Anthony Koo Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 593397a18cb63849850f8909e42a67b06ea4c860 Author: Meenakshikumar Somasundaram Date: Fri Apr 30 19:02:33 2021 -0400 drm/amd/display: Remove unused definition of DMUB SET_CONFIG [Why & How] SET_CONFIG transactions with DMUB is not used and removed. Signed-off-by: Meenakshikumar Somasundaram Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c521fc316d12fb9ea7b7680e301d673bceda922e Author: Roman Li Date: Fri May 21 10:20:25 2021 -0400 drm/amd/display: Update scaling settings on modeset [Why] We update scaling settings when scaling mode has been changed. However when changing mode from native resolution the scaling mode previously set gets ignored. [How] Perform scaling settings update on modeset. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1be2a90288b4a4e281a5c5c420965117c23b1f97 Author: Jimmy Kizito Date: Wed Apr 21 10:34:34 2021 -0400 drm/amd/display: Support mappable encoders when transmitting training patterns. [Why & How] Add support for transmitting training pattern sequences for links whose encoders have been dynamically assigned. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0cb1588571a7ba42108f913d0938a3a03a698027 Author: Jimmy Kizito Date: Mon Apr 19 15:12:01 2021 -0400 drm/amd/display: Expand DP module equalization API. [Why & How] Add functionality useful for DP equalization phase of link training to public interface. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ae88357c7966ec2a52cb1e70fd42f74a40c9dfcb Author: Ilya Bakoulin Date: Tue May 18 17:55:17 2021 -0400 drm/amd/display: Revert "Fix clock table filling logic" [Why] This change was found to break some high-refresh modes. Reverting to unblock mainline. Signed-off-by: Ilya Bakoulin Reviewed-by: Sung Lee Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9ba0889e2272294bfbb5589b1b180ad2e782b2a4 Author: Dave Chinner Date: Tue Jun 8 09:19:22 2021 -0700 xfs: drop the AGI being passed to xfs_check_agi_freecount From: Dave Chinner Stephen Rothwell reported this compiler warning from linux-next: fs/xfs/libxfs/xfs_ialloc.c: In function 'xfs_difree_finobt': fs/xfs/libxfs/xfs_ialloc.c:2032:20: warning: unused variable 'agi' [-Wunused-variable] 2032 | struct xfs_agi *agi = agbp->b_addr; Which is fallout from agno -> perag conversions that were done in this function. xfs_check_agi_freecount() is the only user of "agi" in xfs_difree_finobt() now, and it only uses the agi to get the current free inode count. We hold that in the perag structure, so there's not need to directly reference the raw AGI to get this information. The btree cursor being passed to xfs_check_agi_freecount() has a reference to the perag being operated on, so use that directly in xfs_check_agi_freecount() rather than passing an AGI. Fixes: 7b13c5155182 ("xfs: use perag for ialloc btree cursors") Reported-by: Stephen Rothwell Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 24cc4f8d7be6adc25c9aa5260cac8483bdb0f12e Author: Evgenii Krasnikov Date: Fri Apr 30 11:00:59 2021 -0400 drm/amd/display: add visual confirm colors to differentiate layer_index > 0 [WHY] Currently there is no way to visually identify if there is one or more layers presented fullscreen on the display [HOW] Add new visual confirm colors in get_surface_visual_confirm_color for planes with layer_index > 0 Signed-off-by: Evgenii Krasnikov Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 60df84418c0a9dc1a40c1de8bb1be3676ee96f14 Author: Wyatt Wood Date: Thu May 6 16:11:16 2021 -0400 drm/amd/display: Refactor visual confirm [Why + How] Visual confirm has no asic-specific logic, so we can refactor and unify these functions that are currently spread out across multiple dcn files. Add a new hw sequencer interface update_visual_confirm_color, and a new mpc function pointer set_bg_color. This will allow visual confirm to updated independently of MPCC blending updates. v2: squash in DCN3.1 fixes Signed-off-by: Wyatt Wood Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2259918e087d9967e6c8f9b621d67d5968019724 Author: JinZe.Xu Date: Tue May 18 14:36:37 2021 +0800 drm/amd/display: Control power gating by driver. [Why] This disablement would be specific for Nav10 and shouldn’t be propagated to the other programs. [How] Power gating is controlled by driver. Signed-off-by: JinZe.Xu Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 346cf627fb27c0fea63a041cedbaa4f31784e504 Author: Nikola Cornij Date: Tue May 18 12:33:12 2021 -0400 drm/amd/display: Fix DCN 3.01 DSCCLK validation [why] DSCCLK validation is not necessary because DSCCLK is derrived from DISPCLK, therefore if DISPCLK validation passes, DSCCLK is valid, too. Doing DSCLK validation in addition to DISPCLK leads to modes being wrongly rejected when DSCCLK was incorrectly set outside of DML. [how] Remove DSCCLK validation because it's implicitly validated under DISPCLK Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 416b4e7596fa8cbe47f94f53009e252acfd36ece Author: Wenjing Liu Date: Mon May 17 15:54:19 2021 -0400 drm/amd/display: delay 100ms before restart after failing to read CP_IRQ [why] Some DPRX will issue CP_IRQ when user disconnects a display that has been authenticated. Since display is being disconnecting dpcd read will fail. This will cause us to attempt HDCP retry on disconnection. We are adding a 100ms delay before retry. So we will only start retry if within 100ms there is no disconnection call to HDCP module. Signed-off-by: Wenjing Liu Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Signed-off-by: Alex Deucher commit f56c837afce45ec904b23bfd4d7df3e304624972 Author: Mikita Lipski Date: Mon May 17 18:18:25 2021 -0400 drm/amd/display: Enabling PSR support for multiple panels [why] Updating PSR interfaces to allow PSR enablement per eDP panel. [how] - Copying PSR command structures to DC - Changing function interfaces to pass panel instance - Communicating with DMUB per link instead of assuming to use a single one -Iterating through all PSR capable panels when enabling/disabling all Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6c475bdbece0df896bb4db9553073a48503269c8 Author: Jake Wang Date: Fri May 14 15:41:39 2021 -0400 drm/amd/display: Trigger full update after DCC on/off [Why] During DCC on/off, stutter period is calculated before DCC has fully transitioned. This results in incorrect stutter period calculation. [How] Trigger a full update when DCC changes between on/off. Signed-off-by: Jake Wang Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e1944deba131db59b393d509a164e59708c52e4a Author: Zhigang Luo Date: Wed Jun 2 10:04:59 2021 -0400 drm/amdgpu: allocate psp fw private buffer from VRAM for sriov vf psp added new feature to check fw buffer address for sriov vf. the address range must be in vf fb. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Reviewed-By : Shaoyun.liu Signed-off-by: Alex Deucher commit 93cdc1759bcbbe3ed78acfbd1f511f2da5010225 Author: Zhigang Luo Date: Wed Jun 2 09:56:40 2021 -0400 drm/amdgpu: add psp ta microcode init for aldebaran sriov vf need to load xgmi ta for aldebaran sriov vf. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Reviewed-By : Shaoyun.liu Signed-off-by: Alex Deucher commit 488b83f4d514c1efa4c0edaa8a79c506a32ad11a Author: Zhigang Luo Date: Wed Jun 2 09:49:34 2021 -0400 drm/amdgpu: remove sriov vf mmhub system aperture and fb location programming host driver programmed mmhub system aperture and fb location for vf, no need to program in guest side. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Reviewed-By : Shaoyun.liu Signed-off-by: Alex Deucher commit 95066fd5d27fc0d789e29a301d8a0f53f5bd5e32 Author: Zhigang Luo Date: Wed Jun 2 09:43:49 2021 -0400 drm/amdgpu: remove sriov vf gfxhub fb location programming host driver programmed the gfxhub fb location for vf, no need to program in guest side. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Reviewed-By : Shaoyun.liu Signed-off-by: Alex Deucher commit adbe2e3d34bff9755356f04a840cde969a347916 Author: Zhigang Luo Date: Wed Jun 2 09:30:52 2021 -0400 drm/amdgpu: remove sriov vf checking from getting fb location host driver programmed fb location registers for vf, no need to check anymore. Signed-off-by: Zhigang Luo Reviewed-by: Hawking Zhang Reviewed-By : Shaoyun.liu Signed-off-by: Alex Deucher commit 2b517bd183d22f7861df0cfa44488b9c2d8b693e Author: Xiaomeng Hou Date: Mon Jun 7 16:36:41 2021 +0800 drm/amd/pm: fix warning reported by kernel test robot Kernel test robot throws warning -> >> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:483:2: warning: variable 'member_type' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:487:47: note: uninitialized use occurs here return yellow_carp_get_smu_metrics_data(smu, member_type, value); ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/yellow_carp_ppt.c:465:2: note: variable 'member_type' is declared here MetricsMember_t member_type; ^ 1 warning generated. Fix this warning by return errno when the clk type is unsupported. Reported-by: kernel test robot Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6ceba306c05a4b33034a303ed8a97c9f2e9af3eb Author: Nirmoy Das Date: Tue Jun 8 11:58:48 2021 +0200 drm/amdgpu: fix shadow bo skip condition Create shadow BOs only for no-compute VM context and only for dGPU. The existing if-condition would create shadow bo for compute context on dGPU which not what we wanted. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 90a681c5e43e86fb4b16a3c4b9aa2c2d680f5168 Author: Darren Powell Date: Wed May 26 23:27:01 2021 -0400 amdgpu/pm: add kernel documentation for smu_get_power_limit added doc tag "amdgpu_pp_power" with description added tags for enums pp_power_limit_level, pp_power_type added tag for function smu_get_power_limit Test: * Temporary insertion into Documentation/gpu/amdgpu.rst ------------START------------ Power Limit ----------- .. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h :doc: amdgpu_pp_power .. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h :identifiers: pp_power_limit_level .. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h :identifiers: pp_power_type .. kernel-doc:: drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c :identifiers: smu_get_power_limit -------------END------------- Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit dc2a8240b2ae8cc2edef3a6e978d249ea2bb8955 Author: Darren Powell Date: Wed May 26 18:47:10 2021 -0400 amdgpu/pm: handle return value for get_power_limit Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 4f9cbeb317bd4684129b5190f452607ea85aa9d0 Author: Darren Powell Date: Wed May 26 17:31:16 2021 -0400 amdgpu/pm: modify and add smu_get_power_limit to Powerplay API modify args of smu_get_power_limit to match Powerplay API .get_power_limit add smu_get_power_limit to Powerplay API swsmu_pm_funcs remove special handling of smu in amdgpu_hwmon_show_power_cap* * Test AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 11` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} lspci -nn | grep "VGA\|Display" ; \ echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ; \ echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ; \ echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 04bec52127b131b828e0305e02366e64969c5efc Author: Darren Powell Date: Sat May 22 00:13:53 2021 -0400 amdgpu/pm: modify Powerplay API get_power_limit to use new pp_power enums updated {amd_pm_funcs}->get_power_limit() signature rewrote pp_get_power_limit to use new enums pp_get_power_limit now returns -EOPNOTSUPP for unknown power limit update calls to {amd_pm_funcs}->get_power_limit() * Test Notes * testing hardware was NAVI10 (tests SMU path) ** needs testing on VANGOGH ** needs testing on SMU < 11 ** ie, one of TOPAZ, FIJI, TONGA, POLARIS10, POLARIS11, POLARIS12, VEGAM, CARRIZO, STONEY, VEGA10, VEGA12,VEGA20, RAVEN, BONAIRE, HAWAII * Test AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 11` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} lspci -nn | grep "VGA\|Display" ; \ echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ; \ echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ; \ echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit a40a020de27401828692e94e717777bd7112452e Author: Darren Powell Date: Fri May 21 22:37:24 2021 -0400 amdgpu/pm: clean up smu_get_power_limit function signature add two new powerplay enums (limit_level, type) add enums to smu_get_power_limit signature remove input bitfield stuffing of output variable limit update calls to smu_get_power_limit * Test AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 11` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} lspci -nn | grep "VGA\|Display" ; \ echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ; \ echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ; \ echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit cef85a40be6a00d45c5132be5354a55dc9438465 Author: Darren Powell Date: Thu Apr 29 21:29:05 2021 -0400 amdgpu/pm: reorder definition of swsmu_pm_funcs for readability Match the order of definition to the structure's declaration to help with locating included and missing functions of the API Signed-off-by: Darren Powell Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit c3eabd365034185840fdd26df21cdb03523f7e2b Merge: ebf2e33723322 509201163fca3 Author: Darrick J. Wong Date: Tue Jun 8 09:13:13 2021 -0700 Merge tag 'xfs-perag-conv-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-5.14-merge2 xfs: initial agnumber -> perag conversions for shrink If we want to use active references to the perag to be able to gate shrink removing AGs and hence perags safely, we've got a fair bit of work to do actually use perags in all the places we need to. There's a lot of code that iterates ag numbers and then looks up perags from that, often multiple times for the same perag in the one operation. If we want to use reference counted perags for access control, then we need to convert all these uses to perag iterators, not agno iterators. [Patches 1-4] The first step of this is consolidating all the perag management - init, free, get, put, etc into a common location. THis is spread all over the place right now, so move it all into libxfs/xfs_ag.[ch]. This does expose kernel only bits of the perag to libxfs and hence userspace, so the structures and code is rearranged to minimise the number of ifdefs that need to be added to the userspace codebase. The perag iterator in xfs_icache.c is promoted to a first class API and expanded to the needs of the code as required. [Patches 5-10] These are the first basic perag iterator conversions and changes to pass the perag down the stack from those iterators where appropriate. A lot of this is obvious, simple changes, though in some places we stop passing the perag down the stack because the code enters into an as yet unconverted subsystem that still uses raw AGs. [Patches 11-16] These replace the agno passed in the btree cursor for per-ag btree operations with a perag that is passed to the cursor init function. The cursor takes it's own reference to the perag, and the reference is dropped when the cursor is deleted. Hence we get reference coverage for the entire time the cursor is active, even if the code that initialised the cursor drops it's reference before the cursor or any of it's children (duplicates) have been deleted. The first patch adds the perag infrastructure for the cursor, the next four patches convert a btree cursor at a time, and the last removes the agno from the cursor once it is unused. [Patches 17-21] These patches are a demonstration of the simplifications and cleanups that come from plumbing the perag through interfaces that select and then operate on a specific AG. In this case the inode allocation algorithm does up to three walks across all AGs before it either allocates an inode or fails. Two of these walks are purely just to select the AG, and even then it doesn't guarantee inode allocation success so there's a third walk if the selected AG allocation fails. These patches collapse the selection and allocation into a single loop, simplifies the error handling because xfs_dir_ialloc() always returns ENOSPC if no AG was selected for inode allocation or we fail to allocate an inode in any AG, gets rid of xfs_dir_ialloc() wrapper, converts inode allocation to run entirely from a single perag instance, and then factors xfs_dialloc() into a much, much simpler loop which is easy to understand. Hence we end up with the same inode allocation logic, but it only needs two complete iterations at worst, makes AG selection and allocation atomic w.r.t. shrink and chops out out over 100 lines of code from this hot code path. [Patch 22] Converts the unlink path to pass perags through it. There's more conversion work to be done, but this patchset gets through a large chunk of it in one hit. Most of the iterators are converted, so once this is solidified we can move on to converting these to active references for being able to free perags while the fs is still active. * tag 'xfs-perag-conv-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (23 commits) xfs: remove xfs_perag_t xfs: use perag through unlink processing xfs: clean up and simplify xfs_dialloc() xfs: inode allocation can use a single perag instance xfs: get rid of xfs_dir_ialloc() xfs: collapse AG selection for inode allocation xfs: simplify xfs_dialloc_select_ag() return values xfs: remove agno from btree cursor xfs: use perag for ialloc btree cursors xfs: convert allocbt cursors to use perags xfs: convert refcount btree cursor to use perags xfs: convert rmap btree cursor to using a perag xfs: add a perag to the btree cursor xfs: pass perags around in fsmap data dev functions xfs: push perags through the ag reservation callouts xfs: pass perags through to the busy extent code xfs: convert secondary superblock walk to use perags xfs: convert xfs_iwalk to use perag references xfs: convert raw ag walks to use for_each_perag xfs: make for_each_perag... a first class citizen ... commit ebf2e3372332267419527574c25e7820018272c1 Merge: 8124c8a6b3538 8bcac7448a942 Author: Darrick J. Wong Date: Tue Jun 8 09:10:01 2021 -0700 Merge tag 'xfs-buf-bulk-alloc-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs into xfs-5.14-merge2 xfs: buffer cache bulk page allocation This patchset makes use of the new bulk page allocation interface to reduce the overhead of allocating large numbers of pages in a loop. The first two patches are refactoring buffer memory allocation and converting the uncached buffer path to use the same page allocation path, followed by converting the page allocation path to use bulk allocation. The rest of the patches are then consolidation of the page allocation and freeing code to simplify the code and remove a chunk of unnecessary abstraction. This is largely based on a series of changes made by Christoph Hellwig. * tag 'xfs-buf-bulk-alloc-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: merge xfs_buf_allocate_memory xfs: cleanup error handling in xfs_buf_get_map xfs: get rid of xb_to_gfp() xfs: simplify the b_page_count calculation xfs: remove ->b_offset handling for page backed buffers xfs: move page freeing into _xfs_buf_free_pages() xfs: merge _xfs_buf_get_pages() xfs: use alloc_pages_bulk_array() for buffers xfs: use xfs_buf_alloc_pages for uncached buffers xfs: split up xfs_buf_allocate_memory commit 61832b35b4d953b2b4f6c668a3ad2a3013f40532 Author: Sudeep Holla Date: Tue Jun 8 15:01:40 2021 +0100 firmware: arm_scmi: Avoid multiple initialisations of hdr->protocol_id Since the hdr->protocol_id is set from the scmi_protocol_instance handle just before the transfer, there is no need to initialise the same in scmi_xfer_get_init. Remove the unnecessary initialisations. Link: https://lore.kernel.org/r/20210608140140.2042257-1-sudeep.holla@arm.com Tested-by: Cristian Marussi Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 366b45b974481bea9603843d308aded519aab7dc Author: Maxime Ripard Date: Tue May 25 15:23:45 2021 +0200 ASoC: hdmi-codec: Rework to support more controls We're going to add more controls to support the IEC958 output, so let's rework the control registration a bit to support more of them. Signed-off-by: Maxime Ripard Acked-by: Mark Brown Link: https://lore.kernel.org/r/20210525132354.297468-4-maxime@cerno.tech commit 9eafc11f921b8cb7d7e28ab1fdcf6b92fcbcb0be Author: Maxime Ripard Date: Tue May 25 15:23:44 2021 +0200 ALSA: iec958: Split status creation and fill In some situations, like a codec probe, we need to provide an IEC status default but don't have access to the sampling rate and width yet since no stream has been configured yet. Each and every driver has its own default, whereas the core iec958 code also has some buried in the snd_pcm_create_iec958_consumer functions. Let's split these functions in two to provide a default that doesn't rely on the sampling rate and width, and another function to fill them when available. Signed-off-by: Maxime Ripard Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210525132354.297468-3-maxime@cerno.tech commit aa7899537a4ec63ac3d58c9ece945c2750d22168 Author: Maxime Ripard Date: Tue May 25 15:23:43 2021 +0200 ALSA: doc: Clarify IEC958 controls iface The doc currently mentions that the IEC958 Playback Default should be exposed on the PCM iface, and the Playback Mask on the mixer iface. It's a bit confusing to advise to have two related controls on two separate ifaces, and it looks like the drivers that currently expose those controls use any combination of the mixer and PCM ifaces. Let's try to clarify the situation a bit, and encourage to at least have the controls on the same iface. Signed-off-by: Maxime Ripard Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210525132354.297468-2-maxime@cerno.tech commit e30d91d4ffda0b30839bb5e7d2a123654de95045 Author: Cristian Marussi Date: Sun Jun 6 23:12:24 2021 +0100 firmware: arm_scmi: Move reinit_completion from scmi_xfer_get to do_xfer Re-using timed out xfers in a loop can lead to issue if completion was not properly reinitialized. Move reinit_completion from scmi_xfer_get to do_xfer to avoid the issue. Link: https://lore.kernel.org/r/20210606221232.33768-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi [sudeep.holla: moved reinit_completion instead of adding another one] Signed-off-by: Sudeep Holla commit 5617c9125bb66a923f3560d5739eb7f3a21c00b5 Author: Arnd Bergmann Date: Sat May 29 16:52:32 2021 +0200 clkdev: remove unused clkdev_alloc() interfaces The last user of clkdev_alloc() and clkdev_hw_alloc() was removed last year, so everything now calls clkdev_create() and clkdev_hw_create() instead. Removing the unused functions lets the compiler optimize the remaining ones slightly better. Fixes: e5006671acc7 ("clk: versatile: Drop the legacy IM-PD1 clock code") Reviewed-by: Stephen Boyd Signed-off-by: Arnd Bergmann commit 2f4574dd6dd19eb3e8ab0415a3ae960d04be3a65 Author: Arnd Bergmann Date: Mon May 31 11:48:49 2021 +0200 clkdev: remove CONFIG_CLKDEV_LOOKUP This option is now synonymous with CONFIG_HAVE_CLK, so use the latter globally. Any out-of-tree platform ports that still use a private clk_get()/clk_put() implementation should move to CONFIG_COMMON_CLK. Signed-off-by: Arnd Bergmann commit 007f84ede6e3ea893b1a68724e8796c45fa98d85 Author: Arnd Bergmann Date: Mon May 31 11:43:22 2021 +0200 m68k: coldfire: remove private clk_get/clk_put Only three SoCs remain that use the custom clk_get/clk_put. Move these over to clkdev_lookup tables as well. As before, treat the "sys.0" and "pll.0" clocks as system-wide clocks, and all the other ones as device specific. The "name" field in 'struct clock' is now unused, so rename that as well as a cleanup and to reduce the object code size. The DEFINE_CLK macro could be changed the same way, but it is less churn to just leave those in place, that can be done as a follow-up later if someone is interested. Acked-by: Greg Ungerer Tested-by: Greg Ungerer Signed-off-by: Arnd Bergmann commit 63aadb77669a6856b26d73da85b4f788731524a3 Author: Arnd Bergmann Date: Mon May 31 11:12:55 2021 +0200 m68k: coldfire: use clkdev_lookup on most coldfire Coldfire is now the only target that implements the clk_get()/clk_put() helpers itself rather than using the common implementation. Most coldfire variants only have two distinct clocks and use the clk code purely for lookup. Change those over to use clkdev_lookup instead but leave the custom clk interface for those two clocks. Also leave the four SoCs that have gated clocks. Acked-by: Greg Ungerer Tested-by: Greg Ungerer Signed-off-by: Arnd Bergmann commit 35f752be4f412a1a58f4c15fa9282c53b956e067 Author: Arnd Bergmann Date: Mon May 31 13:51:18 2021 +0200 mips: ralink: convert to CONFIG_COMMON_CLK ralink only has a very trivial clock implementation, with everything being fixed clocks. Convert it to CONFIG_COMMON_CLK to reduce the number of platforms that rely on legacy clocks. Of course, the clocks really should be read from the device tree instead, but this is a step into that direction. This adds about 50KB to the kernel image size, which is an unfortunate increase, but not as bad as I had feared: text data bss dec hex filename 3778560 1582216 92256 5453032 5334e8 vmlinux-vocore-before 3822148 1601192 92304 5515644 54297c vmlinux-vocore-after 3870226 1644468 200192 5714886 5733c6 vmlinux-rt305x-before 3916727 1668404 200240 5785371 58471b vmlinux-rt305x-after Signed-off-by: Arnd Bergmann commit b408b611eb951594691abfee8ca687b405d27757 Author: Arnd Bergmann Date: Mon May 31 15:22:37 2021 +0200 mips: ar7: convert to CONFIG_COMMON_CLK Perform a minimal conversion of the ar7 clock implementation to the common clock framework. While the hardware can control the rates, this is left unchanged, and all clocks are registered as fixed-rate or fixed-divider clocks. Similarly, the clkdev lookup information is left unchanged but moved from the table format into individual allocations. There is a small increase in code size: text data bss dec hex filename 4757116 596640 91328 5445084 5315dc vmlinux-before 4806159 602360 91344 5499863 53ebd7 vmlinux-after Signed-off-by: Arnd Bergmann commit 4410c4236e6de337f35d4d88e503f414a8d5d10f Author: Arnd Bergmann Date: Sat May 29 17:04:37 2021 +0200 mips: ar7: convert to clkdev_lookup ar7 is one of only two platforms that provide the clock interface but implement a custom version of the clkdev_lookup code. Change this to use the generic version instead. Signed-off-by: Arnd Bergmann commit c90ec93d94f2bddf3873f2dfbc7b4859e09c01ef Author: Kishon Vijay Abraham I Date: Thu Jun 3 19:52:51 2021 +0530 arm64: dts: ti: k3-am642-sk: Disable PCIe AM642-SK has no PCIe slot. Disable it here. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603142251.14563-6-kishon@ti.com commit 4e8aa4e3559a7f71e333b0fb8661f302aec64c5c Author: Kishon Vijay Abraham I Date: Thu Jun 3 19:52:50 2021 +0530 arm64: dts: ti: k3-am642-sk: Enable USB Super-Speed HOST port Enable USB Super-Speed HOST port. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Aswath Govindraju Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603142251.14563-5-kishon@ti.com commit 354065bed2d15f6ff7796c8105133ccdf3a84917 Author: Kishon Vijay Abraham I Date: Thu Jun 3 19:52:49 2021 +0530 arm64: dts: ti: k3-am642-evm: Enable PCIe and SERDES AM642 EVM has a x4 lane PCIe connector. Enable PCIe in RC mode here. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603142251.14563-4-kishon@ti.com commit 4a868bffd876086d9017753a2d5c88a118fe6d5a Author: Kishon Vijay Abraham I Date: Thu Jun 3 19:52:48 2021 +0530 arm64: dts: ti: k3-am64-main: Add PCIe DT node AM64 has one PCIe instance which can be configured in either host mode (RC) or device mode (EP). Add PCIe DT node for host mode and device mode here. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603142251.14563-3-kishon@ti.com commit 68fefbfed8ba67957b4ab18be4dfb8051b625321 Author: Kishon Vijay Abraham I Date: Thu Jun 3 19:52:47 2021 +0530 arm64: dts: ti: k3-am64-main: Add SERDES DT node AM64 has one SERDES 10G instance. Add SERDES DT node for it. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603142251.14563-2-kishon@ti.com commit 02b4d9186121d842a53e347f53a86ec7f2c6b0c7 Author: Kishon Vijay Abraham I Date: Thu Jun 3 20:04:27 2021 +0530 arm64: dts: ti: k3-j721e-common-proc-board: Re-name "link" name as "phy" Commit 66db854b1f62d ("arm64: dts: ti: k3-j721e-common-proc-board: Configure the PCIe instances") and commit 02c35dca2b488 ("arm64: dts: ti: k3-j721e: Enable Super-Speed support for USB0") added PHY DT nodes with node name as "link" However nodes with #phy-cells should be named 'phy' as discussed in [1]. Re-name subnodes of serdes in J721E to 'phy'. [1] -> http://lore.kernel.org/r/20200909203631.GA3026331@bogus Fixes: 66db854b1f62d ("arm64: dts: ti: k3-j721e-common-proc-board: Configure the PCIe instances") Fixes: 02c35dca2b488 ("arm64: dts: ti: k3-j721e: Enable Super-Speed support for USB0") Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603143427.28735-5-kishon@ti.com commit f2a7657ad7a821de9cc77d071a5587b243144cd5 Author: Kishon Vijay Abraham I Date: Thu Jun 3 20:04:26 2021 +0530 arm64: dts: ti: k3-j721e-common-proc-board: Use external clock for SERDES Use external clock for all the SERDES used by PCIe controller. This will make the same clock used by the local SERDES as well as the clock provided to the PCIe connector. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603143427.28735-4-kishon@ti.com commit 2427bfb335eb5f291a821e91c4c520351ce933df Author: Kishon Vijay Abraham I Date: Thu Jun 3 20:04:25 2021 +0530 arm64: dts: ti: k3-j721e-main: Add #clock-cells property to serdes DT node Add #clock-cells property to serdes DT node since the serdes is also now modeled as a clock provider and include the input clocks "pll0_refclk" and "pll1_refclk" which are parents to the clocks modeled by serdes. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603143427.28735-3-kishon@ti.com commit 5c6d0b55b46aeb91355e6a9616decf50a3778c91 Author: Kishon Vijay Abraham I Date: Thu Jun 3 20:04:24 2021 +0530 arm64: dts: ti: k3-j721e-main: Fix external refclk input to SERDES Rename the external refclk inputs to the SERDES from dummy_cmn_refclk/dummy_cmn_refclk1 to cmn_refclk/cmn_refclk1 respectively. Also move the external refclk DT nodes outside the cbass_main DT node. Since in j721e common processor board, only the cmn_refclk1 is connected to 100MHz clock, fix the clock frequency. Fixes: afd094ebe69f ("arm64: dts: ti: k3-j721e-main: Add WIZ and SERDES PHY nodes") Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Aswath Govindraju Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210603143427.28735-2-kishon@ti.com commit 45040f675041956ad763f9ef139ecee3647aa8bb Author: Benjamin Gaignard Date: Thu Jun 3 13:50:04 2021 +0200 media: hantro: IMX8M: add variant for G2/HEVC codec Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have a postprocessor, uses the same clocks and has it own interrupt. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cb5dd5a0fa518dff14ff2b90837c3c8f98f4dd5c Author: Benjamin Gaignard Date: Thu Jun 3 13:50:03 2021 +0200 media: hantro: Introduce G2/HEVC decoder Implement all the logic to get G2 hardware decoding HEVC frames. It supports up level 5.1 HEVC stream. It doesn't support yet 10 bits formats or the scaling feature. Add HANTRO HEVC dedicated control to skip some bits at the beginning of the slice header. That is very specific to this hardware so can't go into uapi structures. Computing the needed value is complex and requires information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Co-developed-by: Adrian Ratiu Signed-off-by: Adrian Ratiu Co-developed-by: Ezequiel Garcia Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f1748b1ee1fa0fd1a074504045b530b62f949188 Author: Cristian Marussi Date: Tue Jun 8 11:30:56 2021 +0100 firmware: arm_scmi: Add delayed response status check A successfully received delayed response could anyway report a failure at the protocol layer in the message status field. Add a check also for this error condition. Link: https://lore.kernel.org/r/20210608103056.3388-1-cristian.marussi@arm.com Fixes: 58ecdf03dbb9 ("firmware: arm_scmi: Add support for asynchronous commands and delayed response") Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit b7782b34a76615f8199daf1bce544aa73e35f44d Author: Benjamin Gaignard Date: Thu Jun 3 13:50:02 2021 +0200 media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handled by the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35f51f6091bcf2cb90d9ac2f41465c415a34632e Author: Benjamin Gaignard Date: Thu Jun 3 13:50:01 2021 +0200 media: uapi: Add a control for HANTRO driver The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control for this purpose. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 507cd4d2c5eb2d647d27b1047e1a8c73c4890cf3 Author: Sudeep Holla Date: Wed Jun 2 08:38:51 2021 +0100 firmware: arm_scmi: Add compatibility checks for shmem node The shared memory node used for communication between the firmware and the OS should be compatible with "arm,scmi-shmem". Add the check for the same while parsing the node before fetching the memory regions. Link: https://lore.kernel.org/r/20210602073851.1005607-2-sudeep.holla@arm.com Cc: Rob Herring Cc: Cristian Marussi Cc: Florian Fainelli Cc: Jim Quinlan Cc: Etienne Carriere Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 31ad15e688e58a94779971f428c414b7a3f882d1 Author: Benjamin Gaignard Date: Thu Jun 3 13:50:00 2021 +0200 media: hantro: Only use postproc when post processed formats are defined If the variant doesn't support postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8968cfc282955c3f853b34d9ceaaa1ba33943e94 Author: Benjamin Gaignard Date: Thu Jun 3 13:49:59 2021 +0200 media: hantro: Define HEVC codec profiles and supported features Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42cb2a8f27d284b6c73dfc23bed4d6991f3bc1a3 Author: Benjamin Gaignard Date: Thu Jun 3 13:49:58 2021 +0200 media: hantro: change hantro_codec_ops run prototype to return errors Change hantro_codec_ops run prototype from 'void' to 'int'. This allows the driver to cancel the job if an error occurs while configuring the hardware. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d395a78db9eabd12633b39e05c80e803543b6590 Author: Benjamin Gaignard Date: Thu Jun 3 13:49:57 2021 +0200 media: hevc: Add decode params control Add decode params control and the associated structure to group all the information that are needed to decode a reference frame as is described in ITU-T Rec. H.265 section "8.3.2 Decoding process for reference picture set". Adapt Cedrus driver to these changes. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4dd0f63b51c24afd2f34afbae2e728cf00c390e6 Author: Benjamin Gaignard Date: Thu Jun 3 13:49:56 2021 +0200 media: hevc: Add fields and flags for hevc PPS Add fields and flags as they are defined in 7.4.3.3.1 "General picture parameter set RBSP semantics of the H.265 ITU specification. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f1d9f315924f02ed8aabada04a04b20a0c6cc9be Author: Zhen Lei Date: Thu Jun 3 09:02:30 2021 +0200 media: imon: use DEVICE_ATTR_RW() helper macro Use DEVICE_ATTR_RW() helper macro instead of DEVICE_ATTR(), which is simpler and more readable. Due to the names of the read and write functions of the sysfs attribute is normalized, there is a natural association. Signed-off-by: Zhen Lei Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 53a370f621a04a06bd2402c13580d7e4eb172c98 Author: Alexander Voronov Date: Tue Jun 1 22:28:12 2021 +0200 media: rc: add keymap for Toshiba CT-90405 remote This is an NEC remote control device shipped with some Toshiba TVs. Signed-off-by: Alexander Voronov Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 04297b00dfb45277b8b661d48a7a5e29876fc6ae Author: Evgeny Novikov Date: Tue Jun 1 14:56:43 2021 +0200 media: st_rc: Handle errors of clk_prepare_enable() Hadle errors of clk_prepare_enable() in st_rc_hardware_init() and its callers. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit da9a805b1249be685c2bee110eb1260d610bd5d0 Author: Sean Young Date: Tue Jun 1 13:07:46 2021 +0200 media: cinergyt2: make properties const The dvb_usb_device_properties can be const. This makes it clear that the static can be shared across threads. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9ad1efee086e0e913914fa2b2173efb830bad68c Author: Dongliang Mu Date: Tue May 25 15:06:52 2021 +0200 media: dvd_usb: memory leak in cinergyt2_fe_attach When the driver fails to talk with the hardware with dvb_usb_generic_rw, it will return an error to dvb_usb_adapter_frontend_init. However, the driver forgets to free the resource (e.g., struct cinergyt2_fe_state), which leads to a memory leak. Fix this by freeing struct cinergyt2_fe_state when dvb_usb_generic_rw fails in cinergyt2_frontend_attach. backtrace: [<0000000056e17b1a>] kmalloc include/linux/slab.h:552 [inline] [<0000000056e17b1a>] kzalloc include/linux/slab.h:682 [inline] [<0000000056e17b1a>] cinergyt2_fe_attach+0x21/0x80 drivers/media/usb/dvb-usb/cinergyT2-fe.c:271 [<00000000ae0b1711>] cinergyt2_frontend_attach+0x21/0x70 drivers/media/usb/dvb-usb/cinergyT2-core.c:74 [<00000000d0254861>] dvb_usb_adapter_frontend_init+0x11b/0x1b0 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:290 [<0000000002e08ac6>] dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:84 [inline] [<0000000002e08ac6>] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:173 [inline] [<0000000002e08ac6>] dvb_usb_device_init.cold+0x4d0/0x6ae drivers/media/usb/dvb-usb/dvb-usb-init.c:287 Reported-by: syzbot+e1de8986786b3722050e@syzkaller.appspotmail.com Signed-off-by: Dongliang Mu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 321c0d383dc3aa1b00a1a1e0957f1543fc84a028 Author: Christophe JAILLET Date: Fri May 21 14:18:27 2021 +0200 media: cxd2880-spi: Fix some error messages Fix some erroneous function names in some error messages. Remove some spurious or useless trailing and leading character in some messages. Signed-off-by: Christophe JAILLET Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit bc4f21fcc03ddd816dac1db00918680bf7bf9d86 Author: Colin Ian King Date: Wed May 5 21:06:18 2021 +0200 media: mxl692: make a const array static, makes object smaller Don't populate the const array fw_hdr on the stack but instead it static. Makes the object code smaller by 5 bytes: Before: text data bss dec hex filename 31948 12072 64 44084 ac34 drivers/media/dvb-frontends/mxl692.o After: text data bss dec hex filename 31879 12136 64 44079 ac2f drivers/media/dvb-frontends/mxl692.o (gcc version 10.3.0) Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 038cc978777378884a40d1517c88eace13ddc49d Author: Eugen Hristev Date: Tue Apr 13 12:57:31 2021 +0200 media: MAINTAINERS: add xisc files to isc driver entry Add XISC driver and binding files to the ISC driver entry. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 671d07658531422eaba9ef0a399532b39361abf3 Author: Eugen Hristev Date: Tue Apr 13 12:57:30 2021 +0200 media: MAINTAINERS: update ISC driver bindings file ISC driver was converted to yaml. Update maintainers file. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c9aa973884a163ecb6d5d4d3be9137058adcaf8c Author: Eugen Hristev Date: Tue Apr 13 12:57:29 2021 +0200 media: atmel: atmel-isc: add microchip-xisc driver Add driver for the extended variant of the isc, the microchip XISC present on sama7g5 product. [hverkuil: drop MODULE_SUPPORTED_DEVICE, no longer exists] [hverkuil: made isc_sama7g5_config_csc et al static] [hverkuil: made sama7g5_controller_formats et al static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b8d3d03df83aae74519b34022e95dec577af1df Author: Eugen Hristev Date: Thu Apr 15 20:45:00 2021 +0200 media: dt-bindings: media: add microchip,xisc device bindings Add bindings for the Microchip eXtended Image Sensor Controller. Based on the atmel,isc.yaml binding. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 54203301d02a3afff13a002f3c2cffb30f59a2fb Author: Eugen Hristev Date: Thu Apr 15 10:55:30 2021 +0200 media: dt-bindings: media: atmel-isc: convert to yaml Convert the Atmel ISC to yaml binding format. Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2672a9397221d6ded067a205211897f3e3d712dc Author: Eugen Hristev Date: Tue Apr 13 12:57:26 2021 +0200 media: atmel: atmel-isc-sama5d2: remove duplicate define Remove a duplicate definition of clock max divider Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit debfa496871c181b658def0f2b200302bd9b1216 Author: Eugen Hristev Date: Tue Apr 13 12:57:25 2021 +0200 media: atmel: atmel-isc-base: add support for more formats and additional pipeline modules Add support for additional formats supported by newer pipelines, and for additional pipeline modules. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0baf7a3241ac5d41de833f3b3df0961f40802b44 Author: Eugen Hristev Date: Tue Apr 13 12:57:24 2021 +0200 media: atmel: atmel-isc-regs: add additional fields for sama7g5 type pipeline Add additional fields for registers present in sama7g5 type pipeline. Extend register masks for additional bits in sama7g5 type pipeline registers. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 049a38fc9681b3c6103496104b22d49b60660a64 Author: Eugen Hristev Date: Tue Apr 13 12:57:23 2021 +0200 media: atmel: atmel-isc: create an adapt pipeline callback for product specific Once the pipeline is set in the base code, create a callback that will adapt the ISC pipeline to each product. Create the adapt_pipeline callback that will be used in this fashion. [hverkuil: made isc_sama5d2_adapt_pipeline static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 415dbe4efafa29896a9567c3054dd25a749b8857 Author: Eugen Hristev Date: Tue Apr 13 12:57:22 2021 +0200 media: atmel: atmel-isc: move the formats list into product specific code The list of input and output formats has to be product specific. Move this list into the product specific code. Have pointers to these arrays inside the device struct. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef9b7779688b2d4a772a5089aba2eacbe336779e Author: Eugen Hristev Date: Tue Apr 13 12:57:21 2021 +0200 media: atmel: atmel-isc: create callback for RLP submodule product specific The RLP submodule is a part of the atmel-isc pipeline, and stands for Rounding,Limiting and Packaging. It used to extract specific data from the ISC pipeline. For example if we want to output greyscale 8 bit, we would use limiting to 8 bits, and packaging to Luma component only. Create a product specific callback for initializing the RLP submodule of the pipeline [hverkuil: made isc_sama5d2_config_rlp static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cfa7ff959a789a953eac40c8ac793e2cfc2db931 Author: Mark Brown Date: Thu Jun 3 19:41:18 2021 +0100 arm64: smccc: Support SMCCC v1.3 SVE register saving hint SMCCC v1.2 requires that all SVE state be preserved over SMC calls which introduces substantial overhead in the common case where there is no SVE state in the registers. To avoid this SMCCC v1.3 introduces a flag which allows the caller to say that there is no state that needs to be preserved in the registers. Make use of this flag, setting it if the SMCCC version indicates support for it and the TIF_ flags indicate that there is no live SVE state in the registers, this avoids placing any constraints on when SMCCC calls can be done or triggering extra saving and reloading of SVE register state in the kernel. This would be straightforward enough except for the rather entertaining inline assembly we use to do SMCCC v1.1 calls to allow us to take advantage of the limited number of registers it clobbers. Deal with this by having a function which we call immediately before issuing the SMCCC call to make our checks and set the flag. Using alternatives the overhead if SVE is supported but not detected at runtime can be reduced to a single NOP. Signed-off-by: Mark Brown Reviewed-by: Ard Biesheuvel Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20210603184118.15090-1-broonie@kernel.org Signed-off-by: Will Deacon commit 763663c9715f5f1cc0d065d2b020f12cd37417d2 Author: Yang Yingliang Date: Wed May 12 15:25:15 2021 +0800 PM: domains: fix some kernel-doc issues Fix the following make W=1 kernel build warnings: drivers/base/power/domain_governor.c:259: warning: Function parameter or member 'now' not described in '_default_power_down_ok' drivers/base/power/domain.c:581: warning: Function parameter or member 'depth' not described in 'genpd_power_off' drivers/base/power/domain.c:2520: warning: Function parameter or member 'np' not described in 'of_genpd_remove_last' drivers/base/power/domain.c:2520: warning: Excess function parameter 'provider' description in 'of_genpd_remove_last' Signed-off-by: Yang Yingliang Signed-off-by: Rafael J. Wysocki commit 2e11737a772b95c6587df73f216eec1762431432 Author: Axel Lin Date: Mon Jun 7 22:29:07 2021 +0800 regulator: fan53880: Fix vsel_mask setting for FAN53880_BUCK According to the datasheet: REGISTER DETAILS − 0x02 BUCK, BUCK_OUT is BIT0 ~ BIT7. So vsel_mask for FAN53880_BUCK should be 0xFF. Fixes: e6dea51e2d41 ("regulator: fan53880: Add initial support") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210607142907.1599905-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 0ea461b4f229739345870a086aa4647a16ff42ff Author: Axel Lin Date: Mon Jun 7 22:30:02 2021 +0800 regulator: bd71815: Get rid of struct bd71815_pmic The content of bd71815_regulators is never changed, no need to duplicate it, thus remove descs[BD71815_REGULATOR_CNT]. The *regmap, *dev and *rdev[BD71815_REGULATOR_CNT] are not really needed. The *gps is unused. Thus the struct bd71815_pmic can be removed. Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210607143002.1600017-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit ba6622c43381e7045f8bc5438089ae53054fdf83 Author: Axel Lin Date: Fri Jun 4 19:58:03 2021 +0800 regulator: ltc3589: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded LTC3589_LINEAR_REG() no longer call LTC3589_REG() now. Only LTC3589_LINEAR_REG() needs to set go_bit, thus remove go_bit parameter from LTC3589_REG() macro. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210604115803.1260976-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit f083be9db060fbac09123d80bdffb2c001ac0e2b Author: Sander Vanheule Date: Thu Jun 3 20:25:10 2021 +0200 regmap: mdio: Add clause-45 support Modern ethernet phys support the so-called clause-45 register access mode, which allows for register address widths of 16 bit. Also allow for 16-bit register address widths, and return a regmap for clause-45 access in that case. Signed-off-by: Sander Vanheule Link: https://lore.kernel.org/r/9cc263e3e7d5865edd90453b4183f1cf363cb636.1622743333.git.sander@svanheule.net Signed-off-by: Mark Brown commit dff404deb8493e6154ad75a62ce7c4e37ff8fccd Author: Sander Vanheule Date: Thu Jun 3 20:25:09 2021 +0200 regmap: mdio: Clean up invalid clause-22 addresses Currently a regmap configuration for regmap-mdio must have a register address width of 5 bits (cf. clause-22 register access). This is not enforced on the provided register addresses, which would enable clause-45 MDIO bus access, if the right bit packing is used. Prevent clause-45 access, and other invalid addresses, by masking the provided register address. Signed-off-by: Sander Vanheule Link: https://lore.kernel.org/r/f7013f67e6d6ff56ec98660f18320f6ffcc1a777.1622743333.git.sander@svanheule.net Signed-off-by: Mark Brown commit 3ea8a7459861def90bbb184396651d47a4cf4f20 Author: Wan Jiabing Date: Tue Jun 8 11:06:55 2021 +0800 ASoC: remove unneeded semicolons in wcd934x.c Fix following coccicheck warning: ./sound/soc/codecs/wcd934x.c:5136:2-3: Unneeded semicolon ./sound/soc/codecs/wcd934x.c:2466:2-3: Unneeded semicolon ./sound/soc/codecs/wcd934x.c:2527:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210608030656.24052-1-wanjiabing@vivo.com Signed-off-by: Mark Brown commit 640eac4c849d6390f272862ba8db14f28d423670 Author: Kuninori Morimoto Date: Tue Jun 8 09:11:50 2021 +0900 ASoC: soc-core: don't use discriminatory terms on snd_soc_runtime_get_dai_fmt() snd_soc_runtime_get_dai_fmt() is using discriminatory terms. This patch fixup it. Fixes: ba9e82a1c891 ("ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874ke9dxkp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b6052c3c7a78f5e2b9756c92ef77c0b56435f107 Author: Christophe JAILLET Date: Sun Jun 6 16:31:09 2021 +0200 ASoC: mediatek: mtk-btcvsd: Fix an error handling path in 'mtk_btcvsd_snd_probe()' If an error occurs after a successful 'of_iomap()' call, it must be undone by a corresponding 'iounmap()' call, as already done in the remove function. While at it, remove the useless initialization of 'ret' at the beginning of the function. Fixes: 4bd8597dc36c ("ASoC: mediatek: add btcvsd driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0c2ba562c3364e61bfbd5b3013a99dfa0d9045d7.1622989685.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit bcc0f0c078771e983a7e602eb14efa02f811445f Author: Bard Liao Date: Mon Jun 7 17:22:39 2021 -0500 ASoC: rt711-sdca: handle mbq_regmap in rt711_sdca_io_init We currently only hangle rt711->regmap in rt711_sdca_io_init(), and rt711->mbq_regmap is missing. Fixes: 7ad4d237e7c4a ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210607222239.582139-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ad1ba99e4784929588c79e9810f5610825f0411 Author: Bard Liao Date: Mon Jun 7 17:22:38 2021 -0500 ASoC: rt711-sdca-sdw: add readable for SDW_SDCA_CTL() registers SDW_SDCA_CTL() registers are used but are not set to readable. Fixes: 7ad4d237e7c4a ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210607222239.582139-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c0372bc873dd29f325ee908351e0bd5b08d4d608 Author: Bard Liao Date: Mon Jun 7 17:22:37 2021 -0500 ASoC: rt5682-sdw: set regcache_cache_only false before reading RT5682_DEVICE_ID RT5682_DEVICE_ID is a volatile register, we can not read it in cache only mode. Fixes: 03f6fc6de919 ("ASoC: rt5682: Add the soundwire support") Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210607222239.582139-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9266d95405ae0c078f188ec8bca3a004631be429 Author: Oder Chiou Date: Mon Jun 7 17:22:36 2021 -0500 ASoC: rt5682: Fix a problem with error handling in the io init function of the soundwire The device checking error should be a jump to pm_runtime_put_autosuspend() as done before returning value. Fixes: 867f8d18df4f ('ASoC: rt5682: fix getting the wrong device id when the suspend_stress_test') Reviewed-by: Bard Liao Signed-off-by: Oder Chiou Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210607222239.582139-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e343d34a9c912fc5c321e2a9fbc02e9dc9534ade Author: Jack Yu Date: Mon Jun 7 17:22:35 2021 -0500 ASoC: rt715-sdca: fix clock stop prepare timeout issue Fix clock stop prepare timeout issue (#2853). The trigger of internal circuit which belong to “SDCA preset stuffs” was not set correctly in previous driver, which could block clock_stop_preparation state. Add the correct register setting to fix it. Fixes: 20d17057f0a8c ('ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver') Signed-off-by: Jack Yu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210607222239.582139-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f54cad25a1fe4ca227c28f539ed285314016a768 Author: Zou Wei Date: Tue Jun 8 08:52:46 2021 +0800 perf srccode: Use list_move() instead of equivalent list_del() + list_add() sequence Using list_move() instead of list_del() + list_add(), shorter, equivalent. Reported-by: Hulk Robot Signed-off-by: Zou Wei Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1623113566-49455-1-git-send-email-zou_wei@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit dbc07517ab173688ef11234d1099bc1e24e4f14b Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:34 2021 -0500 ASoC: rt715-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: d1ede0641b05e ('ASoC: rt715: add RT715 codec driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d34d0897a753f42c8a7a6af3866781dd57344a45 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:33 2021 -0500 ASoC: rt715-sdca-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. This patch renames the status flag to 'first_hw_init' for consistency with other drivers (was 'first_init') BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 20d17057f0a8c ('ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a0897ebca669f09a2e02206a9c48a738af655329 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:32 2021 -0500 ASoC: rt711-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 320b8b0d13b81 ('ASoC: rt711: add rt711 codec driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b32cab09707bb7fd851128633157c92716df6781 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:31 2021 -0500 ASoC: rt711-sdca-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 7ad4d237e7c4a ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a9e54e5fbe396b546771cf77b43ce7c75e212278 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:30 2021 -0500 ASoC: rt700-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 7d2a5f9ae41e3 ('ASoC: rt700: add rt700 codec driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5361a42114689f875a9748299cadb4b1adbee6f4 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:29 2021 -0500 ASoC: rt5682-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 03f6fc6de9192 ('ASoC: rt5682: Add the soundwire support') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ebe2ef60ed76c1afd8ec84e1bfd1868e3456e96b Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:28 2021 -0500 ASoC: rt1316-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 2b719fd20f327 ('ASoC: rt1316: Add RT1316 SDCA vendor-specific driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 30e102dab5fad1db71684f8ac5e1ac74e49da06d Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:27 2021 -0500 ASoC: rt1308-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: a87a6653a28c0 ('ASoC: rt1308-sdw: add rt1308 SdW amplifier driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bf881170311ea74ff30c3be0be8fb097132ce696 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:26 2021 -0500 ASoC: max98373-sdw: use first_hw_init flag on resume The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. This patch renames the status flag to 'first_hw_init' for consistency with other drivers. BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 56a5b7910e96 ('ASoC: codecs: max98373: add SoundWire support') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 468a272ca49cc4e2f58f3c360643c3f6d313c146 Author: Pierre-Louis Bossart Date: Mon Jun 7 17:22:25 2021 -0500 ASoC: max98373-sdw: add missing memory allocation check We forgot to test that devm_kcalloc doesn't return NULL. Fixes: 349dd23931d1 ('ASoC: max98373: don't access volatile registers in bias level off') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b65412c25fa600d8a4085e820bdfadb9d9bab6b9 Author: Joerg Roedel Date: Tue Jun 8 14:28:43 2021 +0200 iommu/amd: Fix section mismatch warning for detect_ivrs() A recent commit introduced this section mismatch warning: WARNING: modpost: vmlinux.o(.text.unlikely+0x22a1f): Section mismatch in reference from the function detect_ivrs() to the variable .init.data:amd_iommu_force_enable The reason is that detect_ivrs() is not marked __init while it should be, because it is only called from another __init function. Mark detect_ivrs() __init to get rid of the warning. Fixes: b1e650db2cc4 ("iommu/amd: Add amd_iommu=force_enable option") Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20210608122843.8413-1-joro@8bytes.org commit e48848a6af150ed09d9761167aad2a7cd023470b Author: Eugen Hristev Date: Tue Apr 13 12:57:20 2021 +0200 media: atmel: atmel-isc: create callback for GAM submodule product specific The GAM submodule is a part of the atmel-isc pipeline, and stands for Gamma Correction. It is used to apply the gamma curve to the incoming pixels. Create a product specific callback for initializing the GAM submodule of the pipeline. For sama5d2 product, there is no special configuration at this moment, thus this function is a noop. [hverkuil: made isc_sama5d2_config_gam static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 883285556388affe1273a50d1af8772c30aa6d89 Author: Eugen Hristev Date: Tue Apr 13 12:57:19 2021 +0200 media: atmel: atmel-isc: create callback for DPC submodule product specific The DPC submodule is a part of the atmel-isc pipeline, and stands for Defective Pixel Correction. Its purpose is to detect defective pixels and correct them if possible with the help of adjacent pixels. Create a product specific callback for initializing the DPC submodule of the pipeline. For sama5d2 product, this module does not exist, thus this function is a noop. [hverkuil: made isc_sama5d2_config_dpc static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f1b451c87ee054f3f5238ac00593e7adaf96152 Author: Eugen Hristev Date: Tue Apr 13 12:57:18 2021 +0200 media: atmel: atmel-isc: create product specific v4l2 controls config Create product specific callback for initializing v4l2 controls. Call this from v4l2 controls init function. [hverkuil: made isc_sama5d2_config_ctrls static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7154cbd31c2069726cf730b0ed94e2e79a221602 Author: Joerg Roedel Date: Mon Jun 7 14:49:05 2021 +0200 iommu/dma: Fix compile warning in 32-bit builds Compiling the recent dma-iommu changes under 32-bit x86 triggers this compile warning: drivers/iommu/dma-iommu.c:249:5: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] The reason is that %llx is used to print a variable of type phys_addr_t. Fix it by using the correct %pa format specifier for phys_addr_t. Cc: Srinath Mannam Cc: Robin Murphy Cc: Oza Pawandeep Fixes: 571f316074a20 ("iommu/dma: Fix IOVA reserve dma ranges") Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20210607124905.27525-1-joro@8bytes.org commit a4099d47535fa588e663a29cb1a725a24edae463 Author: Rob Herring Date: Thu May 27 14:37:10 2021 -0500 iommu: Drop unnecessary of_iommu.h includes The only place of_iommu.h is needed is in drivers/of/device.c. Remove it from everywhere else. Cc: Will Deacon Cc: Robin Murphy Cc: Joerg Roedel Cc: Rob Clark Cc: Marek Szyprowski Cc: Krzysztof Kozlowski Cc: Bjorn Andersson Cc: Yong Wu Cc: Matthias Brugger Cc: Heiko Stuebner Cc: Jean-Philippe Brucker Cc: Frank Rowand Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring Reviewed-by: Robin Murphy Acked-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210527193710.1281746-2-robh@kernel.org Signed-off-by: Joerg Roedel commit bb6bfd79d9bc69f0808a4156ec3ca9fb78694039 Author: Rob Herring Date: Thu May 27 14:37:09 2021 -0500 iommu: Remove unused of_get_dma_window() of_get_dma_window() was added in 2012 and removed in 2014 in commit 891846516317 ("memory: Add NVIDIA Tegra memory controller support"). Remove it and simplify the header to use forward declarations for structs rather than includes. Cc: Joerg Roedel Cc: Will Deacon Cc: Frank Rowand Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527193710.1281746-1-robh@kernel.org Signed-off-by: Joerg Roedel commit 7978724f399ae7eba5b6d36ae5a7224d5bf3859a Author: Xiang Chen Date: Mon May 10 19:53:02 2021 +0800 iommu/iova: Put free_iova_mem() outside of spinlock iova_rbtree_lock It is not necessary to put free_iova_mem() inside of spinlock/unlock iova_rbtree_lock which only leads to more completion for the spinlock. It has a small promote on the performance after the change. And also rename private_free_iova() as remove_iova() because the function will not free iova after that change. Signed-off-by: Xiang Chen Reviewed-by: John Garry Acked-by: Robin Murphy Link: https://lore.kernel.org/r/1620647582-194621-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Joerg Roedel commit 2873f85bd318bfc3f453fa78facb2b77632b36d8 Author: Eugen Hristev Date: Tue Apr 13 12:57:17 2021 +0200 media: atmel: atmel-isc: add CC initialization function The CC submodule is a part of the atmel-isc pipeline, and stands for Color Correction. It is used to apply gains and offsets to the chroma (U, V) components of the YUV elements. Implement the CC submodule initialization, as a product specific function, which currently configures the neutral point in color correction. [hverkuil: made isc_sama5d2_config_cc static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 571f316074a203e979ea90211d9acf423dfe5f46 Author: Srinath Mannam Date: Mon Sep 14 12:53:19 2020 +0530 iommu/dma: Fix IOVA reserve dma ranges Fix IOVA reserve failure in the case when address of first memory region listed in dma-ranges is equal to 0x0. Fixes: aadad097cd46f ("iommu/dma: Reserve IOVA for PCIe inaccessible DMA address") Signed-off-by: Srinath Mannam Reviewed-by: Robin Murphy Tested-by: Sven Peter Link: https://lore.kernel.org/r/20200914072319.6091-1-srinath.mannam@broadcom.com Signed-off-by: Joerg Roedel commit 5507b10109253a19765880fffff6e9fff3810868 Author: Eugen Hristev Date: Tue Apr 13 12:57:16 2021 +0200 media: atmel: atmel-isc: extend pipeline with extra modules Newer ISC pipelines have the additional modules of Defective Pixel Correction -> DPC itself, Defective Pixel Correction -> Green Disparity Correction (DPC_GDC) Defective Pixel Correction -> Black Level Correction (DPC_BLC) Vertical and Horizontal Scaler -> VHXS Some products have this full pipeline (sama7g5), other products do not (sama5d2) Add the modules to the isc base, and also extend the register range to include the modules. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff62b09d46cffc8c43649539c304050578371de9 Author: Sameer Pujar Date: Tue Jun 8 16:19:48 2021 +0530 arm64: tegra: Audio graph sound card for Jetson Xavier NX Enable support for audio-graph based sound card on Jetson Xavier NX. Following I/O interfaces are enabled. - I2S3 and I2S5 - DMIC1, DMIC2 and DMIC4 - DSPK1 and DSPK2 Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding commit a911e927443477d67f4c577bfb68b0d41680f4a0 Author: Eugen Hristev Date: Tue Apr 13 12:57:15 2021 +0200 media: atmel: atmel-isc: add register description for additional modules Add register description for additional pipeline modules: the Defective Pixel Correction (DPC) and the Vertical and Horizontal Scaler(VHXS) Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 27f2a4db76e8d8a8b601fc1c6a7a17f88bd907ab Author: Nick Desaulniers Date: Fri May 21 18:26:24 2021 -0700 Makefile: fix GDB warning with CONFIG_RELR GDB produces the following warning when debugging kernels built with CONFIG_RELR: BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn' when loading a kernel built with CONFIG_RELR into GDB. It can also prevent debugging symbols using such relocations. Peter sugguests: [That flag] means that lld will use dynamic tags and section type numbers in the OS-specific range rather than the generic range. The kernel itself doesn't care about these numbers; it determines the location of the RELR section using symbols defined by a linker script. Link: https://github.com/ClangBuiltLinux/linux/issues/1057 Suggested-by: Peter Collingbourne Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Link: https://lore.kernel.org/r/20210522012626.2811297-1-ndesaulniers@google.com Signed-off-by: Will Deacon commit d6f9afe9475fdb0b79e3baf58dabfaf547e5d1a7 Author: Geoffrey D. Bennett Date: Tue Jun 8 04:43:51 2021 +0930 ALSA: usb-audio: scarlett2: Read mux at init time Add support for retrieving the mux configuration from the hardware when the driver is initialising. Previously the ALSA controls were initialised to a default hard-coded state instead of being initialised to match the hardware state. Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Suggested-by: Vladimir Sadovnikov Tested-by: Markus Schroetter Tested-by: Alex Fellows Tested-by: Daniel Sales Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/15b17c60a2bca174bcddcec41c9419b746f21c1d.1623091570.git.g@b4.vu Signed-off-by: Takashi Iwai commit 2661f033c40236aa9d470eccdee35e7a04fc8d1a Author: Geoffrey D. Bennett Date: Tue Jun 8 04:43:25 2021 +0930 ALSA: usb-audio: scarlett2: Read mixer volumes at init time Add support for reading the mixer volumes from the hardware when the driver is initialising. Previously these ALSA volume controls were initialised to zero instead of being initialised to match the hardware state. Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Suggested-by: Vladimir Sadovnikov Tested-by: Markus Schroetter Tested-by: Alex Fellows Tested-by: Daniel Sales Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/bb33fa9b79efc6f7a0f0e6fb7018cc8d4d59b3ba.1623091570.git.g@b4.vu Signed-off-by: Takashi Iwai commit 0280e07bbd6efa691daa7356b6bb05514cdcab68 Merge: 5fe8f0a0a83ab 600dd2a7e8b62 Author: Takashi Iwai Date: Tue Jun 8 14:02:06 2021 +0200 Merge branch 'for-linus' into for-next commit 59d697a99daa4723b62f9b07f41191cca1e44f3f Author: Rikard Falkeborn Date: Sun Jun 6 00:15:14 2021 +0200 perf/hisi: Constify static attribute_group structs These are only put in an array of pointers to const attribute_group structs. Make them const like the other static attribute_group structs to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210605221514.73449-1-rikard.falkeborn@gmail.com Signed-off-by: Will Deacon commit 015511e2b69dc3060d0a92fdc762f1754743ffe8 Author: Robin van der Gracht Date: Tue May 18 10:28:50 2021 +0200 ARM: dts: imx6dl-prtvt7: Remove unused 'sound-dai-cells' from ssi1 node The 'fsl,ssi' documentation doesn't say anything about specifying this. Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit a616f385a1ef02870f99bffc286ceb75f33a73ff Author: Robin van der Gracht Date: Tue May 18 10:28:49 2021 +0200 ARM: dts: imx6dl-prtvt7: The sgtl5000 uses i2s not ac97 According to Documentation/devicetree/bindings/sound/fsl,ssi.txt 'fsl,mode' should be specified for AC97 mode only. Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 913dca88a15ff30ab710505d806771501bbb977e Author: Oleksij Rempel Date: Tue May 18 10:28:48 2021 +0200 ARM: dts: imx6qdl-vicut1: add interrupt-counter nodes interrupt-counter is mainline now, so we can add missing counter nodes. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 65ce746ec1dce43511209b808ba124c01fa0a84b Author: Robin van der Gracht Date: Tue May 18 10:28:47 2021 +0200 ARM: dts: imx6dl-prtvt7: Enable the VPU Enable Video Processing Unit to make accelerated video decoding work. Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 6f64e703ce8c49b52c0149df2c0ebac8ec298f9f Author: Oleksij Rempel Date: Tue May 18 10:28:46 2021 +0200 ARM: dts: imx6dl: enable touchscreen debounce filter on PLYM2M and PRTVT7 boards Activate low-pass/debounce filter on the touchscreen. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit e6d762b0a6aad7af6db436cd3932ae9b79c569ca Author: Oleksij Rempel Date: Tue May 18 10:28:45 2021 +0200 ARM: dts: imx6dl-plym2m: remove touchscreen-size-* properties Remove touchscreen-size-* properties. This values are not correct, event if it works with ts_test tool, it fails to work properly with weston. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 76c32fc24f7d68d0dbcfd02607f20779127c4222 Author: Oleksij Rempel Date: Tue May 18 10:28:44 2021 +0200 ARM: dts: imx6dl-prtvt7: fix PWM cell count for the backlight node. At some point PWM cell count was changed, but it didn't triggered any error, since this DT was overwriting "#pwm-cells". To make sure, we are in sync with the kernel driver, remove this property and fix the pwm consumer. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 40610b8134888685708e135edcdbc1601afdd0cf Author: Oleksij Rempel Date: Tue May 18 10:28:43 2021 +0200 ARM: dts: imx6dl-prtvt7: Remove backlight enable gpio The backlight power is controlled through the reg_bl_12v0 regulator. Co-Developed-by: Robin van der Gracht Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 5ca54404e68de8560ca15e8d0e6b625fd05ceeaf Author: ChenXiaoSong Date: Tue Jun 8 16:48:16 2021 +0800 perf: qcom: Remove redundant dev_err call in qcom_l3_cache_pmu_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: ChenXiaoSong Link: https://lore.kernel.org/r/20210608084816.1046485-1-chenxiaosong2@huawei.com Signed-off-by: Will Deacon commit e1428350340d426a61df927432c8bcc2812425ac Author: Oleksij Rempel Date: Tue May 18 10:28:42 2021 +0200 ARM: dts: imx6dl-prtvt7: add TSC2046 touchscreen node Add touchscreen support to the Protonic VT7 board. Co-Developed-by: Robin van der Gracht Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit f115f3c0d5d846f69b2bc2d86653117f305b6066 Author: Zhen Lei Date: Mon May 31 20:35:53 2021 +0800 iommu/arm-smmu-v3: Decrease the queue size of evtq and priq Commit d25f6ead162e ("iommu/arm-smmu-v3: Increase maximum size of queues") expands the cmdq queue size to improve the success rate of concurrent command queue space allocation by multiple cores. However, this extension does not apply to evtq and priq, because for both of them, the SMMU driver is the consumer. Instead, memory resources are wasted. Therefore, the queue size of evtq and priq is restored to the original setting, one page. Fixes: d25f6ead162e ("iommu/arm-smmu-v3: Increase maximum size of queues") Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210531123553.9602-1-thunder.leizhen@huawei.com Signed-off-by: Will Deacon commit 9cff922bba429b310507eac3b6cb5eb1b57e9ad1 Author: Jean-Philippe Brucker Date: Mon May 31 11:56:50 2021 +0200 iommu/arm-smmu-v3: Ratelimit event dump When a device or driver misbehaves, it is possible to receive DMA fault events much faster than we can print them out, causing a lock up of the system and inability to cancel the source of the problem. Ratelimit printing of events to help recovery. Tested-by: Aaro Koskinen Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210531095648.118282-1-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 395ad89d11fd93f79a6b942e91fc409807a63c4b Author: Jean-Philippe Brucker Date: Wed May 26 18:19:28 2021 +0200 iommu/arm-smmu-v3: Add stall support for platform devices The SMMU provides a Stall model for handling page faults in platform devices. It is similar to PCIe PRI, but doesn't require devices to have their own translation cache. Instead, faulting transactions are parked and the OS is given a chance to fix the page tables and retry the transaction. Enable stall for devices that support it (opt-in by firmware). When an event corresponds to a translation error, call the IOMMU fault handler. If the fault is recoverable, it will call us back to terminate or continue the stall. To use stall device drivers need to enable IOMMU_DEV_FEAT_IOPF, which initializes the fault queue for the device. Tested-by: Zhangfei Gao Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210526161927.24268-4-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 6522b1e0c78fc6947b58178446ca851690374f0d Author: Jean-Philippe Brucker Date: Wed May 26 18:19:27 2021 +0200 ACPI/IORT: Enable stall support for platform devices Copy the "Stall supported" bit, that tells whether a named component supports stall, into the dma-can-stall device property. Acked-by: Hanjun Guo Acked-by: Jonathan Cameron Acked-by: Lorenzo Pieralisi Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210526161927.24268-3-jean-philippe@linaro.org Signed-off-by: Will Deacon commit ed1d08b9d0c9baed54a74073eae6c28d1e5422e8 Author: Jean-Philippe Brucker Date: Wed May 26 18:19:26 2021 +0200 dt-bindings: Document stall property for IOMMU masters On ARM systems, some platform devices behind an IOMMU may support stall, which is the ability to recover from page faults. Let the firmware tell us when a device supports stall. Reviewed-by: Eric Auger Reviewed-by: Rob Herring Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210526161927.24268-2-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 19c07b91f85dfcf058ce304374988c9f83b5066c Author: Eric Anholt Date: Fri Mar 26 16:13:03 2021 -0700 arm64: dts: msm8996: Mark the GPU's SMMU as an adreno one. This enables the adreno-specific SMMU path that sets HUPCF so (user-managed) page faults don't wedge the GPU. Signed-off-by: Eric Anholt Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210326231303.3071950-2-eric@anholt.net Signed-off-by: Will Deacon commit a242f4297cfe3f4589a7620dcd42cc503607fc6b Author: Eric Anholt Date: Fri Mar 26 16:13:02 2021 -0700 iommu/arm-smmu-qcom: Skip the TTBR1 quirk for db820c. db820c wants to use the qcom smmu path to get HUPCF set (which keeps the GPU from wedging and then sometimes wedging the kernel after a page fault), but it doesn't have separate pagetables support yet in drm/msm so we can't go all the way to the TTBR1 path. Signed-off-by: Eric Anholt Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210326231303.3071950-1-eric@anholt.net Signed-off-by: Will Deacon commit 6321484d1c2416ce08f4ffc47b9f3d2bacc6819e Author: Martin Botka Date: Sun May 23 23:25:33 2021 +0200 iommu/arm-smmu-qcom: Add sm6125 compatible Add compatible for SM6125 SoC Signed-off-by: Martin Botka Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210523212535.740979-1-martin.botka@somainline.org Signed-off-by: Will Deacon commit 629de518e6f3b81bc1d7486a9b2e0a8fb100e18e Author: Eugen Hristev Date: Tue Apr 13 12:57:14 2021 +0200 media: atmel: atmel-isc: add his_entry to register offsets Add his_entry to the reg offsets struct. This will allow different products to have a different reg offset for this particular module. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d51470069eb169d54f2b14d07d613b69f62615b8 Author: Eugen Hristev Date: Tue Apr 13 12:57:13 2021 +0200 media: atmel: atmel-isc: add support for version register Add support for version register and print it at probe time. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e891009857716e17129899fe6345e7968010917f Author: Eugen Hristev Date: Tue Apr 13 12:57:12 2021 +0200 media: atmel: atmel-isc: add DMA to register offsets The DMA submodule is a part of the atmel-isc pipeline, and stands for Direct Memory Access. It acts like a master on the AXI bus of the SoC, and can directly write the RAM area with the pixel data from the ISC internal sram. Add dma to the reg offsets struct. This will allow different products to have a different reg offset for this particular module. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1a3ac5d51541b6a816380bafd7c3e240ff9542d9 Author: Eugen Hristev Date: Tue Apr 13 12:57:11 2021 +0200 media: atmel: atmel-isc: add HIS to register offsets The HIS submodule is a part of the atmel-isc pipeline, and stands for Histogram. This module performs a color histogram that can be read and used by the main processor. Add his to the reg offsets struct. This will allow different products to have a different reg offset for this particular module. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40ee17d1b41ccc8c65f831d37008e25d3ae03646 Author: Eugen Hristev Date: Tue Apr 13 12:57:10 2021 +0200 media: atmel: atmel-isc: add RLP to register offsets The RLP submodule is a part of the atmel-isc pipeline, and stands for Rounding,Limiting and Packaging. It used to extract specific data from the ISC pipeline. For example if we want to output greyscale 8 bit, we would use limiting to 8 bits, and packaging to Luma component only. Add rlp to the reg offsets struct. This will allow different products to have a different reg offset for this particular module. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87b62b6d55dd78597b95f3df8111e3d533357b89 Author: Eugen Hristev Date: Tue Apr 13 12:57:09 2021 +0200 media: atmel: atmel-isc: add SUB422 and SUB420 to register offsets The SUB submodules are a part of the atmel-isc pipeline, and stand for Subsampling. They are used to subsample the original YUV 4:4:4 pixel ratio aspect to either 4:2:2 or 4:2:0. Add sub420 and sub422 to the reg offsets struct. This will allow different products to have a different reg offset for these particular modules. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4fc9e8a775d4b3630d1bab6ad58a02dae943787f Author: Eugen Hristev Date: Tue Apr 13 12:57:08 2021 +0200 media: atmel: atmel-isc: add CBC to the reg offsets struct The CBC submodule is a part of the atmel-isc pipeline, and stands for Contrast Brightness Control. It is used to apply gains and offsets to the luma (Y) and chroma (U, V) components of the YUV elements. Add cbc to the reg offsets struct. This will allow different products to have a different reg offset for this particular module. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d3b2ee5478c8569d32c4726c5920b96a9855419c Author: Eugen Hristev Date: Tue Apr 13 12:57:07 2021 +0200 media: atmel: atmel-isc: extract CBC submodule config into separate function The CBC submodule is a part of the atmel-isc pipeline, and stands for Contrast Brightness Control. It is used to apply gains and offsets to the luma (Y) and chroma (U, V) components of the YUV elements. The CBC submodule should be initialized in the product specific driver as it's product specific. Other products can implement it differently [hverkuil: made isc_sama5d2_config_cbc static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ffeeb01d11397bdeac0f5a1e1462eba440c23dc3 Author: Eugen Hristev Date: Tue Apr 13 12:57:06 2021 +0200 media: atmel: atmel-isc: create register offsets struct Create a struct that holds register offsets that are product specific. Add initially the CSC register. This allows each product that contains a variant of the ISC to add their own register offset. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c59744de8a536130eba7916a010bba00bccee74b Author: Eugen Hristev Date: Tue Apr 13 12:57:05 2021 +0200 media: atmel: atmel-isc-base: add id to clock debug message Add the clock id to the debug message regarding clock setup Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2ede3975c0a8530663de38b485abbaa18ede0bad Author: Eugen Hristev Date: Tue Apr 13 12:57:04 2021 +0200 media: atmel: atmel-isc: extract CSC submodule config into separate function The CSC submodule is a part of the atmel-isc pipeline, and stands for Color Space Conversion. It is used to apply a matrix transformation to RGB pixels to convert them to the YUV components. The CSC submodule should be initialized in the product specific driver as it's product specific. Other products can implement it differently. [hverkuil: made isc_sama5d2_config_csc static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd5af39467bdc768387d841186a71bb2d947b29c Author: Eugen Hristev Date: Tue Apr 13 12:57:03 2021 +0200 media: atmel: atmel-isc: specialize dma cfg The dma configuration (DCFG) is specific to the product. Move this configuration in the product specific driver, and add the field inside the driver struct. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0d97174aeadfc49ad8d281bbcd69fdfeb5fd2fcb Author: Thierry Reding Date: Thu Jun 3 18:46:26 2021 +0200 iommu/arm-smmu: Implement ->probe_finalize() Implement a ->probe_finalize() callback that can be used by vendor implementations to perform extra programming necessary after devices have been attached to the SMMU. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210603164632.1000458-4-thierry.reding@gmail.com Signed-off-by: Will Deacon commit 96b7182d8c4ea2837df28dba6fe431b5c568ea58 Author: Marek Vasut Date: Tue Jun 8 11:53:22 2021 +0200 drm/bridge: ti-sn65dsi83: Fix syntax formatting issues Fix checkpatch.pl --strict -f drivers/gpu/drm/bridge/ti-sn65dsi83.c CHECKs, no functional change. This is the same modification done to V7 of the original patch. Signed-off-by: Marek Vasut Cc: Adam Ford Cc: Douglas Anderson Cc: Frieder Schrempf Cc: Jagan Teki Cc: Laurent Pinchart Cc: Linus Walleij Cc: Loic Poulain Cc: Marek Vasut Cc: Philippe Schenker Cc: Sam Ravnborg Cc: Stephen Boyd Cc: Valentin Raevsky To: dri-devel@lists.freedesktop.org Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210608095322.23644-1-marex@denx.de commit 31b77c70d9bc04d3b024ea56c129523f9edc1328 Author: Tejas Upadhyay Date: Tue Jun 8 11:04:11 2021 +0530 x86/gpu: add JasperLake to gen11 early quirks Let's reserve JSL stolen memory for graphics. JasperLake is a gen11 platform which is compatible with ICL/EHL changes. This was missed in commit 24ea098b7c0d ("drm/i915/jsl: Split EHL/JSL platform info and PCI ids") V2: - Added maintainer list in cc - Added patch ref in commit message V1: - Added Cc: x86@kernel.org Fixes: 24ea098b7c0d ("drm/i915/jsl: Split EHL/JSL platform info and PCI ids") Cc: # v5.11+ Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: José Roberto de Souza Signed-off-by: Tejas Upadhyay Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20210608053411.394166-1-tejaskumarx.surendrakumar.upadhyay@intel.com commit f794bc16a52da70e015dca0093bba9afba7d1b6c Author: Eugen Hristev Date: Tue Apr 13 12:57:02 2021 +0200 media: atmel: atmel-isc: specialize max width and max height Move the max width and max height constants to the product specific driver and have them in the device struct. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5122e8d15a0703b6d8bf6cb703536d29f8aa74cf Author: Eugen Hristev Date: Tue Apr 13 12:57:01 2021 +0200 media: atmel: atmel-isc: add checks for limiting frame sizes When calling the subdev, certain subdev drivers will overwrite the frame size and adding sizes which are beyond the ISC's capabilities. Thus we need to ensure the frame size is cropped to the maximum caps. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d5475b3c901a007e74544e7704a1c2107dbcc115 Author: Eugen Hristev Date: Tue Apr 13 12:57:00 2021 +0200 media: atmel: atmel-isc: specialize driver name constant The driver name constant must defined based on product driver, thus moving the constant directly where it's required. This will allow each ISC based product to define it's own name. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f84bc784fa614ae9dba9fb79af2b8f143248c112 Author: Eugen Hristev Date: Tue Apr 13 12:56:59 2021 +0200 media: atmel: atmel-isc: specialize gamma table into product specific Separate the gamma table from the isc base file into the specific sama5d2 product file. Add a pointer to the gamma table and entries count inside the platform driver specific struct. [hverkuil: made isc_sama5d2_gamma_table static] Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 269b4dd3e8b34edec44c5bb0016ee96353638618 Author: John Cox Date: Fri Apr 30 18:48:13 2021 +0200 media: hevc: Add sps_max_sub_layers_minus1 to v4l2_ctrl_hevc_sps sps_max_sub_layers_minus1 is needed if the driver wishes to determine whether or not a frame might be used for reference. Signed-off-by: John Cox Reviewed-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c9cbf021c82c3fa5b0beaa7d6e7f3f5706aeabfa Author: Tomi Valkeinen Date: Mon Apr 12 13:02:11 2021 +0200 media: vivid: use vb2_queue_change_type Use the new vb2_queue_change_type() function in .vidioc_reqbufs and .vidioc_create_bufs instead of changing the queue type manually in vidioc_s_fmt_vbi_cap() and vidioc_s_fmt_sliced_vbi_cap(). This allows for a more consistent behavior, as .vidioc_reqbufs and .vidioc_create_bufs are when the queue will become "busy". Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2d8b2a6431b38f4cb4046636117940b0cb0b3ecf Author: Tomi Valkeinen Date: Mon Apr 12 13:02:10 2021 +0200 media: vivid: remove stream_sliced_vbi_cap field Vivid tracks the VBI capture mode in vivid_dev->stream_sliced_vbi_cap field. We can just look at the buffer type instead, and drop the field. Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a810ed0b3370e0b3f448233d526d085effd1f829 Author: Tomi Valkeinen Date: Mon Apr 12 13:02:09 2021 +0200 media: videobuf2-v4l2.c: add vb2_queue_change_type() helper On some platforms a video device can capture either video data or metadata. The driver can implement vidioc functions for both video and metadata, and use a single vb2_queue for the buffers. However, vb2_queue requires choosing a single buffer type, which conflicts with the idea of capturing either video or metadata. The buffer type of vb2_queue can be changed, but it's not obvious how this should be done in the drivers. To help this, add a new helper function vb2_queue_change_type() which ensures the correct checks and documents how it can be used. Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d56d5162e31760ab5b6ffe592aea8494d5567220 Author: Bixuan Cui Date: Thu May 20 16:42:19 2021 +0800 iommu/arm-smmu-v3: Change *array into *const array Fix checkpatch warning in arm-smmu-v3.c: static const char * array should probably be static const char * const Signed-off-by: Bixuan Cui Signed-off-by: Will Deacon commit a51627c5df58480543b0feefbde27d622a49361f Author: Shawn Guo Date: Sun May 9 10:26:07 2021 +0800 iommu/arm-smmu-qcom: hook up qcom_smmu_impl for ACPI boot The hookup with qcom_smmu_impl is required to do ACPI boot on SC8180X based devices like Lenovo Flex 5G laptop and Microsoft Surface Pro X. Define acpi_platform_list for these platforms and match them using acpi_match_platform_list() call, and create qcom_smmu_impl accordingly. (np == NULL) is used to check ACPI boot, because fwnode of SMMU device is a static allocation and thus helpers like has_acpi_companion() don't work here. Signed-off-by: Shawn Guo Reviewed-by: Robin Murphy Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210509022607.17534-1-shawn.guo@linaro.org Signed-off-by: Will Deacon commit f91142c62161aecb6570d1d0a01aefcb6130b12b Author: Christian König Date: Tue Jun 1 19:47:50 2021 +0200 drm/ttm: nuke VM_MIXEDMAP on BO mappings v3 We discussed if that is really the right approach for quite a while now, but digging deeper into a bug report on arm turned out that this is actually horrible broken right now. The reason for this is that vmf_insert_mixed_prot() always tries to grab a reference to the underlaying page on architectures without ARCH_HAS_PTE_SPECIAL and as far as I can see also enabled GUP. So nuke using VM_MIXEDMAP here and use VM_PFNMAP instead. Also make sure to reject mappings without VM_SHARED. v2: reject COW mappings, merge function with only caller v3: adjust comment as suggested by Thomas Signed-off-by: Christian König Bugs: https://gitlab.freedesktop.org/drm/amd/-/issues/1606#note_936174 Link: https://patchwork.freedesktop.org/patch/msgid/20210607135830.8574-1-christian.koenig@amd.com Reviewed-by: Thomas Hellström commit ceb515ba29ba6b798a579d7c62c5f71a766f7aa6 Author: Marek Vasut Date: Mon Jun 7 19:42:58 2021 +0200 drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver Add driver for TI SN65DSI83 Single-link DSI to Single-link LVDS bridge and TI SN65DSI84 Single-link DSI to Dual-link or 2x Single-link LVDS bridge. TI SN65DSI85 is unsupported due to lack of hardware to test on, but easy to add. The driver operates the chip via I2C bus. Currently the LVDS clock are always derived from DSI clock lane, which is the usual mode of operation. Support for clock from external oscillator is not implemented, but it is easy to add if ever needed. Only RGB888 pixel format is implemented, the LVDS666 is not supported, but could be added if needed. Reviewed-by: Linus Walleij Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Tested-by: Adam Ford Signed-off-by: Marek Vasut Cc: Douglas Anderson Cc: Jagan Teki Cc: Laurent Pinchart Cc: Linus Walleij Cc: Loic Poulain Cc: Philippe Schenker Cc: Sam Ravnborg Cc: Stephen Boyd Cc: Valentin Raevsky To: dri-devel@lists.freedesktop.org Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210607174258.16300-2-marex@denx.de commit db2aad0ffa7dfec31ddf715017a6ae57aa162045 Author: Marek Vasut Date: Mon Jun 7 19:42:57 2021 +0200 dt-bindings: drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 bindings Add DT binding document for TI SN65DSI83 and SN65DSI84 DSI to LVDS bridge. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Marek Vasut Cc: Douglas Anderson Cc: Jagan Teki Cc: Laurent Pinchart Cc: Linus Walleij Cc: Rob Herring Cc: Sam Ravnborg Cc: Stephen Boyd Cc: devicetree@vger.kernel.org To: dri-devel@lists.freedesktop.org Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210607174258.16300-1-marex@denx.de commit 9dda8d9aa86abd1d1e3128d298022c11ceab6abe Author: Stefan Wahren Date: Sun Jun 6 14:16:13 2021 +0200 ARM: dts: Move BCM2711 RPi specific into separate dtsi There is a lot of Raspberry Pi specific stuff (neither SoC or board specific) for the BCM2711 which is currently in the RPi 4 B dts. In order to avoid copy & paste for every new BCM2711 based Raspberry Pi, move it into a separate dtsi. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622981777-5023-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit f230c32349eb0a43a012a81c08a7f13859b86cbb Author: Stefan Wahren Date: Sun Jun 6 14:16:11 2021 +0200 ARM: dts: bcm283x: Fix up MMC node names Fix the node names for the MMC/SD card controller to conform to the standard node name mmc@.. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622981777-5023-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit 7894bdc6228fa8f9d4762e54dd8ac6b888e122c6 Author: Mateusz Kwiatkowski Date: Thu May 20 17:03:44 2021 +0200 ARM: boot: dts: bcm2711: Add BCM2711 VEC compatible The BCM2711 has a slightly different VEC than the one found in the older SoCs. Now that we support the new variant, add its compatible to the device tree. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210520150344.273900-5-maxime@cerno.tech Signed-off-by: Nicolas Saenz Julienne commit fc357bc8ebac978631b5f2572c9065771c78a631 Author: Christian König Date: Tue Jun 8 09:19:30 2021 +0200 drm/ttm: fix pipelined gutting v2 We need to make sure to allocate the sys_mem resource before the point of no return. v2: add missing return value checking, also handle idle case Signed-off-by: Christian König Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20210608081931.11339-1-christian.koenig@amd.com commit 77daceabedb42482bb6200fa26047c5591716e45 Author: Stefan Wahren Date: Sat May 29 15:02:51 2021 +0200 Revert "ARM: dts: bcm283x: increase dwc2's RX FIFO size" This reverts commit 278407a53c3b33fb820332c4d39eb39316c3879a. The original change breaks USB config on Raspberry Pi Zero and Pi 4 B, because it exceeds the total fifo size of 4080. A naive attempt to reduce g-tx-fifo-size doesn't help on Raspberry Pi Zero. So better go back. Fixes: 278407a53c3b ("ARM: dts: bcm283x: increase dwc2's RX FIFO size") Signed-off-by: Stefan Wahren Cc: Pavel Hofman Link: https://lore.kernel.org/r/1622293371-5997-1-git-send-email-stefan.wahren@i2se.com Signed-off-by: Nicolas Saenz Julienne commit 105424895c02858922e1bf27ef01127e12caca9a Author: Bean Huo Date: Mon May 31 12:43:08 2021 +0200 scsi: ufs: core: Use UPIU query trace in devman_upiu_cmd() Since devman_upiu_cmd() is not COMMAND UPIU, and doesn't have CDB, it is better to use UPIU query trace, which provides more helpful information for issue troubleshooting. Link: https://lore.kernel.org/r/20210531104308.391842-5-huobean@gmail.com Reviewed-by: Can Guo Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 44b5de363524a1b9b0c9a42502f3a9e1dca9c6c3 Author: Bean Huo Date: Mon May 31 12:43:07 2021 +0200 scsi: ufs: core: Capture command trace only for the cmd != NULL case For the query request, we already have query_trace, but in ufshcd_send_command(), there will add two more redundant traces. Since lrbp->cmd is NULL in the query request, the two trace events below provide nothing except the tag and DB. Instead of letting them take up the limited trace ring buffer, it’s better not to print these traces in case of cmd == NULL. ufshcd_command: send_req: ff3b0000.ufs: tag: 28, DB: 0x0, size: -1, IS: 0, LBA: 18446744073709551615, opcode: 0x0 (0x0), group_id: 0x0 ufshcd_command: dev_complete: ff3b0000.ufs: tag: 28, DB: 0x0, size: -1, IS: 0, LBA: 18446744073709551615, opcode: 0x0 (0x0), group_id: 0x0 Link: https://lore.kernel.org/r/20210531104308.391842-4-huobean@gmail.com Reviewed-by: Can Guo Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 89ac2c3b283508744de9bc2fba2b57a523990db7 Author: Bean Huo Date: Mon May 31 12:43:06 2021 +0200 scsi: ufs: core: Let UPIU completion trace print RSP UPIU header The current UPIU completion event trace still prints the COMMAND UPIU header, rather than the RSP UPIU header. This makes UPIU command trace useless in problem shooting in case we receive a trace log from the customer/field. There are two important fields in RSP UPIU: 1. The response field, which indicates the UFS defined overall success or failure of the series of Command, Data and RESPONSE UPIU’s that make up the execution of a task. 2. The Status field, which contains the command set specific status for a specific command issued by the initiator device. Before this commit, the UPIU paired trace events: ufshcd_upiu: send_req: fe3b0000.ufs: HDR:01 20 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00 ufshcd_upiu: complete_rsp: fe3b0000.ufs: HDR:01 20 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00 After this commit: ufshcd_upiu: send_req: fe3b0000.ufs: HDR:01 20 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00 ufshcd_upiu: complete_rsp: fe3b0000.ufs: HDR:21 00 00 1c 00 00 00 00 00 00 00 00, CDB:3b e1 00 00 00 00 00 00 30 00 00 00 00 00 00 00 Link: https://lore.kernel.org/r/20210531104308.391842-3-huobean@gmail.com Reviewed-by: Can Guo Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 04c073feb1d7b396992b3c725101872d5fc104b6 Author: Bean Huo Date: Mon May 31 12:43:05 2021 +0200 scsi: ufs: core: Clean up ufshcd_add_command_trace() To consistent with trace event print, convert the value of the variable 'lba' from a block layer sector address to a logical block adress. Link: https://lore.kernel.org/r/20210531104308.391842-2-huobean@gmail.com Suggested-by: Bart Van Assche Reviewed-by: Can Guo Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 32424902331b35f032fd6152bd4e6e1180329e7d Author: Keoseong Park Date: Fri Jun 4 11:40:38 2021 +0900 scsi: ufs: core: Remove repeated word in comment Remove repeated word "for" in comment. Link: https://lore.kernel.org/r/1891546521.01622777101796.JavaMail.epsvc@epcpadp3 Signed-off-by: Keoseong Park Signed-off-by: Martin K. Petersen commit 7b8a49881b0157022c7deed1b5950a8a4d5dd095 Author: Gustavo A. R. Silva Date: Thu Jun 3 21:35:30 2021 -0500 scsi: mpi3mr: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/20210604023530.GA180997@embeddedor Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 61f4f11b48f9b0cd36e88825d5a59d5fda7ec957 Author: Gustavo A. R. Silva Date: Thu Jun 3 21:27:52 2021 -0500 scsi: NCR5380: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by replacing a /* fallthrough */ comment with the new pseudo-keyword macro fallthrough; Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/20210604022752.GA168289@embeddedor Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 6f7151729647e58ac7c522081255fd0c07b38105 Author: Can Guo Date: Mon May 24 01:36:58 2021 -0700 scsi: ufs: Utilize Transfer Request List Completion Notification Register By reading the UTP Transfer Request List Completion Notification Register, which is added in UFSHCI Ver 3.0, SW can easily get the compeleted transfer requests. Thus, SW can get rid of host lock, which is used to synchronize the tr_doorbell and outstanding_reqs, on transfer requests dispatch and completion paths. This can further benefit random read/write performance. Link: https://lore.kernel.org/r/1621845419-14194-4-git-send-email-cang@codeaurora.org Cc: Stanley Chu Reviewed-by: Stanley Chu Reviewed-by: Bean Huo Co-developed-by: Asutosh Das Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit a45f937110fa6b0c2c06a5d3ef026963a5759050 Author: Can Guo Date: Mon May 24 01:36:57 2021 -0700 scsi: ufs: Optimize host lock on transfer requests send/compl paths Current UFS IRQ handler is completely wrapped by host lock, and because ufshcd_send_command() is also protected by host lock, when IRQ handler fires, not only the CPU running the IRQ handler cannot send new requests, the rest CPUs can neither. Move the host lock wrapping the IRQ handler into specific branches, i.e., ufshcd_uic_cmd_compl(), ufshcd_check_errors(), ufshcd_tmc_handler() and ufshcd_transfer_req_compl(). Meanwhile, to further reduce occpuation of host lock in ufshcd_transfer_req_compl(), host lock is no longer required to call __ufshcd_transfer_req_compl(). As per test, the optimization can bring considerable gain to random read/write performance. Link: https://lore.kernel.org/r/1621845419-14194-3-git-send-email-cang@codeaurora.org Cc: Stanley Chu Reported-by: kernel test robot Reviewed-by: Bean Huo Reviewed-by: Stanley Chu Co-developed-by: Asutosh Das Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 1cca0c3fdc91db15bbcd58c4dc49b7b97d0891fe Author: Can Guo Date: Mon May 24 01:36:56 2021 -0700 scsi: ufs: Remove a redundant command completion logic in error handler ufshcd_host_reset_and_restore() anyways completes all pending requests before starts re-probing, so there is no need to complete the command on the highest bit in tr_doorbell in advance. Link: https://lore.kernel.org/r/1621845419-14194-2-git-send-email-cang@codeaurora.org Reviewed-by: Bart Van Assche Reviewed-by: Stanley Chu Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 80927822e8b6be46f488524cd7d5fe683de97fc4 Author: Dan Carpenter Date: Thu Jun 3 15:33:20 2021 +0300 scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg() The "retval" variable needs to be signed for the error handling to work. Link: https://lore.kernel.org/r/YLjMEAFNxOas1mIp@mwanda Fixes: 7e26e3ea0287 ("scsi: scsi_dh_alua: Check for negative result value") Reviewed-by: Martin Wilck Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 8b1afb7ab0dbbb8f9186e94ecded6660da1161ae Author: Avri Altman Date: Thu Jun 3 15:22:09 2021 +0300 scsi: ufs: core: Remove irrelevant reference to non-existing doc Remove all references to the description of __ufshcd_wl_{suspend,resume} as no such description exist. Fixes: b294ff3e3449 (scsi: ufs: core: Enable power management for wlun) Link: https://lore.kernel.org/r/20210603122209.635799-1-avri.altman@wdc.com Signed-off-by: Avri Altman Signed-off-by: Martin K. Petersen commit ebab8e09a07f7f5e253d0b45aae7cbda0e360ebf Author: Kees Cook Date: Wed Jun 2 11:00:00 2021 -0700 scsi: fcoe: Statically initialize flogi_maddr In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy() avoid using an inline const buffer argument and instead just statically initialize the destination array directly. Link: https://lore.kernel.org/r/20210602180000.3326448-1-keescook@chromium.org Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit 1b67f3d74e45e02e159afed6946c6e4ba11b7df6 Author: Saurav Kashyap Date: Wed Jun 2 03:46:53 2021 -0700 scsi: qedf: Update the max_id value in host structure host->max_id defines the maximum target id that the SCSI midlayer will attempt to manually scan. The default is 8. Update the value to the max sessions the driver supports. [mkp: applied by hand] Link: https://lore.kernel.org/r/20210602104653.17278-1-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 0d3e5a057992bdc66e4dca2ca50b77fa4a7bd90e Author: Po-Hsu Lin Date: Tue May 25 10:36:14 2021 +0800 selftests: timers: rtcpie: skip test if default RTC device does not exist This test will require /dev/rtc0, the default RTC device, or one specified by user to run. Since this default RTC is not guaranteed to exist on all of the devices, so check its existence first, otherwise skip this test with the kselftest skip code 4. Without this patch this test will fail like this on a s390x zVM: $ selftests: timers: rtcpie $ /dev/rtc0: No such file or directory not ok 1 selftests: timers: rtcpie # exit=22 With this patch: $ selftests: timers: rtcpie $ Default RTC /dev/rtc0 does not exist. Test Skipped! not ok 9 selftests: timers: rtcpie # SKIP Fixed up change log so "With this patch" text doesn't get dropped. Shuah Khan Signed-off-by: Po-Hsu Lin Signed-off-by: Shuah Khan commit de53fa9baa701963722e9fa3d0fe34b897104497 Author: Kees Cook Date: Wed May 26 20:17:54 2021 -0700 selftests: lib.mk: Also install "config" and "settings" Installed seccomp tests would time out because the "settings" file was missing. Install both "settings" (needed for proper test execution) and "config" (needed for informational purposes) with the other test targets. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 6daf076b717d189f4d02a303d45edd5732341ec1 Author: Kees Cook Date: Wed May 26 20:25:37 2021 -0700 selftests: splice: Adjust for handler fallback removal Some pseudo-filesystems do not have an explicit splice fops since adding commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"), and now will reject attempts to use splice() in those filesystem paths. Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202009181443.C2179FB@keescook/ Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Cc: Christoph Hellwig Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit f50688b47c5858d2ff315d020332bf4cb6710837 Author: Kees Cook Date: Wed May 26 20:27:19 2021 -0700 selftests/tls: Add {} to avoid static checker warning This silences a static checker warning due to the unusual macro construction of EXPECT_*() by adding explicit {}s around the enclosing while loop. Reported-by: Dan Carpenter Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets") Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 1421ec684a43379b2aa3cfda20b03d38282dc990 Author: Xiaochen Shen Date: Thu May 27 17:31:53 2021 +0800 selftests/resctrl: Fix incorrect parsing of option "-t" Resctrl test suite accepts command line argument "-t" to specify the unit tests to run in the test list (e.g., -t mbm,mba,cmt,cat) as documented in the help. When calling strtok() to parse the option, the incorrect delimiters argument ":\t" is used. As a result, passing "-t mbm,mba,cmt,cat" throws an invalid option error. Fix this by using delimiters argument "," instead of ":\t" for parsing of unit tests list. At the same time, remove the unnecessary "spaces" between the unit tests in help documentation to prevent confusion. Fixes: 790bf585b0ee ("selftests/resctrl: Add Cache Allocation Technology (CAT) selftest") Fixes: 78941183d1b1 ("selftests/resctrl: Add Cache QoS Monitoring (CQM) selftest") Fixes: ecdbb911f22d ("selftests/resctrl: Add MBM test") Fixes: 034c7678dd2c ("selftests/resctrl: Add README for resctrl tests") Cc: stable@vger.kernel.org Signed-off-by: Xiaochen Shen Reviewed-by: Tony Luck Signed-off-by: Shuah Khan commit 61c7d826b81769ea57d094305c900f903768f322 Author: Kamal Heib Date: Tue Jun 8 01:15:43 2021 +0300 RDMA/irdma: Fix return error sign from irdma_modify_qp There is a typo in the returned error code sign from irdma_modify_qp() when the attr_mask is not supported - Fix it. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20210607221543.254144-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 205be5dc9984b67a3b388cbdaa27a2f2644a4bd6 Author: Colin Ian King Date: Mon Jun 7 12:33:45 2021 +0100 RDMA/irdma: Fix spelling mistake "Allocal" -> "Allocate" There is a spelling mistake in a literal string. Fix it. Link: https://lore.kernel.org/r/20210607113345.82206-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit cd16b32c15edf98ea787cab23b37ff0ee17300a9 Author: Colin Ian King Date: Sat Jun 5 14:13:47 2021 +0100 RDMA/irdma: remove redundant initialization of variable val The variable val is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Link: https://lore.kernel.org/r/20210605131347.26293-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 1b01a42c9cc478782f4ab6f3c51ff9c091277b5a Author: Colin Ian King Date: Sat Jun 5 14:04:00 2021 +0100 RDMA/irdma: remove extraneous indentation on a statement A single statement is indented one level too deeply, clean up the code by removing the extraneous tab. Link: https://lore.kernel.org/r/20210605130400.25987-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 7fde2dbe03f41fd9ce0f38ebf9879e02487e5bdc Author: Colin Ian King Date: Sat Jun 5 13:20:59 2021 +0100 RDMA/irdma: Fix issues with u8 left shift operation The shifting of the u8 integer info->map[i] the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of the u8 is set then all then all the upper 32 bits of the u64 end up as also being set because of the sign-extension. Fix this by casting the u8 values to a u64 before the left shift. This Link: https://lore.kernel.org/r/20210605122059.25105-1-colin.king@canonical.com Addresses-Coverity: ("Unitentional integer overflow / bad shift operation") Fixes: 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs") Signed-off-by: Colin Ian King Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 4694ae373dc2114f9a82f6ae15737e65af0c6dea Author: Konstantin Kharlamov Date: Fri May 21 02:55:01 2021 +0300 PCI: Leave Apple Thunderbolt controllers on for s2idle or standby On Macbook 2013, resuming from suspend-to-idle or standby resulted in the external monitor no longer being detected, a stacktrace, and errors like this in dmesg: pcieport 0000:06:00.0: can't change power state from D3hot to D0 (config space inaccessible) The reason is that we know how to turn power to the Thunderbolt controller *off* via the SXIO/SXFP/SXLF methods, but we don't know how to turn power back on. We have to rely on firmware to turn the power back on. When going to the "suspend-to-idle" or "standby" system sleep states, firmware is not involved either on the suspend side or the resume side, so we can't use SXIO/SXFP/SXLF to turn the power off. Skip SXIO/SXFP/SXLF when firmware isn't involved in suspend, e.g., when we're going to the "suspend-to-idle" or "standby" system sleep states. Fixes: 1df5172c5c25 ("PCI: Suspend/resume quirks for Apple thunderbolt") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212767 Link: https://lore.kernel.org/r/20210520235501.917397-1-Hi-Angel@yandex.ru Signed-off-by: Konstantin Kharlamov Signed-off-by: Bjorn Helgaas Reviewed-by: Lukas Wunner Cc: stable@vger.kernel.org commit dc8cf7550a703b8b9c94beed621c6c2474347eff Merge: 35cba15a504bf e4017570daee8 Author: David S. Miller Date: Mon Jun 7 14:11:47 2021 -0700 Merge branch 'page_pool-recycling' Matteo Croce says: ==================== page_pool: recycle buffers This is a respin of [1] This patchset shows the plans for allowing page_pool to handle and maintain DMA map/unmap of the pages it serves to the driver. For this to work a return hook in the network core is introduced. The overall purpose is to simplify drivers, by providing a page allocation API that does recycling, such that each driver doesn't have to reinvent its own recycling scheme. Using page_pool in a driver does not require implementing XDP support, but it makes it trivially easy to do so. Instead of allocating buffers specifically for SKBs we now allocate a generic buffer and either wrap it on an SKB (via build_skb) or create an XDP frame. The recycling code leverages the XDP recycle APIs. The Marvell mvpp2 and mvneta drivers are used in this patchset to demonstrate how to use the API, and tested on a MacchiatoBIN and EspressoBIN boards respectively. Please let this going in on a future -rc1 so to allow enough time to have wider tests. v7 -> v8: - use page->lru.next instead of page->index for pfmemalloc - remove conditional include - rework page_pool_return_skb_page() so to have less conversions between page and addresses, and call compound_head() only once - move some code from skb_free_head() to a new helper skb_pp_recycle() - misc fixes v6 -> v7: - refresh patches against net-next - remove a redundant call to virt_to_head_page() - update mvneta benchmarks v5 -> v6: - preserve pfmemalloc bit when setting signature - fix typo in mvneta - rebase on next-next with the new cache - don't clear the skb->pp_recycle in pskb_expand_head() v4 -> v5: - move the signature so it doesn't alias with page->mapping - use an invalid pointer as magic - incorporate Matthew Wilcox's changes for pfmemalloc pages - move the __skb_frag_unref() changes to a preliminary patch - refactor some cpp directives - only attempt recycling if skb->head_frag - clear skb->pp_recycle in pskb_expand_head() v3 -> v4: - store a pointer to page_pool instead of xdp_mem_info - drop a patch which reduces xdp_mem_info size - do the recycling in the page_pool code instead of xdp_return - remove some unused headers include - remove some useless forward declaration v2 -> v3: - added missing SOBs - CCed the MM people v1 -> v2: - fix a commit message - avoid setting pp_recycle multiple times on mvneta - squash two patches to avoid breaking bisect ==================== Signed-off-by: David S. Miller commit e4017570daee8ce39f7101f4d00e96e5a1b8ea97 Author: Matteo Croce Date: Mon Jun 7 21:02:40 2021 +0200 mvneta: recycle buffers Use the new recycling API for page_pool. In a drop rate test, the packet rate increased by 10%, from 296 Kpps to 326 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 23.66% [kernel] [k] __pi___inval_dcache_area 22.85% [mvneta] [k] mvneta_rx_swbm 7.54% [kernel] [k] kmem_cache_alloc 6.49% [kernel] [k] eth_type_trans 3.94% [kernel] [k] dev_gro_receive 3.91% [kernel] [k] __netif_receive_skb_core 3.91% [kernel] [k] kmem_cache_free 3.76% [kernel] [k] page_pool_release_page 3.56% [kernel] [k] free_unref_page 2.40% [kernel] [k] build_skb 1.49% [kernel] [k] skb_release_data 1.45% [kernel] [k] __alloc_pages_bulk 1.30% [kernel] [k] page_frag_free And this is the same output with recycling enabled: Overhead Shared Object Symbol 26.41% [kernel] [k] __pi___inval_dcache_area 25.00% [mvneta] [k] mvneta_rx_swbm 8.14% [kernel] [k] kmem_cache_alloc 6.84% [kernel] [k] eth_type_trans 4.44% [kernel] [k] __netif_receive_skb_core 4.38% [kernel] [k] kmem_cache_free 4.16% [kernel] [k] dev_gro_receive 3.21% [kernel] [k] page_pool_put_page 2.41% [kernel] [k] build_skb 1.82% [kernel] [k] skb_release_data 1.61% [kernel] [k] napi_gro_receive 1.25% [kernel] [k] page_pool_refill_alloc_cache 1.16% [kernel] [k] __netif_receive_skb_list_core We can see that page_pool_release_page(), free_unref_page() and __alloc_pages_bulk() are no longer on top of the list when receiving traffic. The test was done with mausezahn on the TX side with 64 byte raw ethernet frames. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 133637fcfab24e831239c5f1d7042996efd8d828 Author: Matteo Croce Date: Mon Jun 7 21:02:39 2021 +0200 mvpp2: recycle buffers Use the new recycling API for page_pool. In a drop rate test, the packet rate is almost doubled, from 1110 Kpps to 2128 Kpps. perf top on a stock system shows: Overhead Shared Object Symbol 34.88% [kernel] [k] page_pool_release_page 8.06% [kernel] [k] free_unref_page 6.42% [mvpp2] [k] mvpp2_rx 6.07% [kernel] [k] eth_type_trans 5.18% [kernel] [k] __netif_receive_skb_core 4.95% [kernel] [k] build_skb 4.88% [kernel] [k] kmem_cache_free 3.97% [kernel] [k] kmem_cache_alloc 3.45% [kernel] [k] dev_gro_receive 2.73% [kernel] [k] page_frag_free 2.07% [kernel] [k] __alloc_pages_bulk 1.99% [kernel] [k] arch_local_irq_save 1.84% [kernel] [k] skb_release_data 1.20% [kernel] [k] netif_receive_skb_list_internal With packet rate stable at 1100 Kpps: tx: 0 bps 0 pps rx: 532.7 Mbps 1110 Kpps tx: 0 bps 0 pps rx: 532.6 Mbps 1110 Kpps tx: 0 bps 0 pps rx: 532.4 Mbps 1109 Kpps tx: 0 bps 0 pps rx: 532.1 Mbps 1109 Kpps tx: 0 bps 0 pps rx: 531.9 Mbps 1108 Kpps tx: 0 bps 0 pps rx: 531.9 Mbps 1108 Kpps And this is the same output with recycling enabled: Overhead Shared Object Symbol 12.91% [kernel] [k] eth_type_trans 12.54% [mvpp2] [k] mvpp2_rx 9.67% [kernel] [k] build_skb 9.63% [kernel] [k] __netif_receive_skb_core 8.44% [kernel] [k] page_pool_put_page 8.07% [kernel] [k] kmem_cache_free 7.79% [kernel] [k] kmem_cache_alloc 6.86% [kernel] [k] dev_gro_receive 3.19% [kernel] [k] skb_release_data 2.41% [kernel] [k] netif_receive_skb_list_internal 2.18% [kernel] [k] page_pool_refill_alloc_cache 1.76% [kernel] [k] napi_gro_receive 1.61% [kernel] [k] kfree_skb 1.20% [kernel] [k] dma_sync_single_for_device 1.16% [mvpp2] [k] mvpp2_poll 1.12% [mvpp2] [k] mvpp2_read With packet rate above 2100 Kpps: tx: 0 bps 0 pps rx: 1021 Mbps 2128 Kpps tx: 0 bps 0 pps rx: 1021 Mbps 2127 Kpps tx: 0 bps 0 pps rx: 1021 Mbps 2128 Kpps tx: 0 bps 0 pps rx: 1021 Mbps 2128 Kpps tx: 0 bps 0 pps rx: 1022 Mbps 2128 Kpps tx: 0 bps 0 pps rx: 1022 Mbps 2129 Kpps The major performance increase is explained by the fact that the most CPU consuming functions (page_pool_release_page, page_frag_free and free_unref_page) are no longer called on a per packet basis. The test was done by sending to the macchiatobin 64 byte ethernet frames with an invalid ethertype, so the packets are dropped early in the RX path. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 6a5bcd84e886a9a91982e515c539529c28acdcc2 Author: Ilias Apalodimas Date: Mon Jun 7 21:02:38 2021 +0200 page_pool: Allow drivers to hint on SKB recycling Up to now several high speed NICs have custom mechanisms of recycling the allocated memory they use for their payloads. Our page_pool API already has recycling capabilities that are always used when we are running in 'XDP mode'. So let's tweak the API and the kernel network stack slightly and allow the recycling to happen even during the standard operation. The API doesn't take into account 'split page' policies used by those drivers currently, but can be extended once we have users for that. The idea is to be able to intercept the packet on skb_release_data(). If it's a buffer coming from our page_pool API recycle it back to the pool for further usage or just release the packet entirely. To achieve that we introduce a bit in struct sk_buff (pp_recycle:1) and a field in struct page (page->pp) to store the page_pool pointer. Storing the information in page->pp allows us to recycle both SKBs and their fragments. We could have skipped the skb bit entirely, since identical information can bederived from struct page. However, in an effort to affect the free path as less as possible, reading a single bit in the skb which is already in cache, is better that trying to derive identical information for the page stored data. The driver or page_pool has to take care of the sync operations on it's own during the buffer recycling since the buffer is, after opting-in to the recycling, never unmapped. Since the gain on the drivers depends on the architecture, we are not enabling recycling by default if the page_pool API is used on a driver. In order to enable recycling the driver must call skb_mark_for_recycle() to store the information we need for recycling in page->pp and enabling the recycling bit, or page_pool_store_mem_info() for a fragment. Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Co-developed-by: Matteo Croce Signed-off-by: Matteo Croce Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller commit c420c98982fa9e749c99e022845d5f323d098b72 Author: Matteo Croce Date: Mon Jun 7 21:02:37 2021 +0200 skbuff: add a parameter to __skb_frag_unref This is a prerequisite patch, the next one is enabling recycling of skbs and fragments. Add an extra argument on __skb_frag_unref() to handle recycling, and update the current users of the function with that. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit c07aea3ef4d4076f18f567b98ed01e082e02ed51 Author: Matteo Croce Date: Mon Jun 7 21:02:36 2021 +0200 mm: add a signature in struct page This is needed by the page_pool to avoid recycling a page not allocated via page_pool. The page->signature field is aliased to page->lru.next and page->compound_head, but it can't be set by mistake because the signature value is a bad pointer, and can't trigger a false positive in PageTail() because the last bit is 0. Co-developed-by: Matthew Wilcox (Oracle) Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 35cba15a504bf4f585bb9d78f47b22b28a1a06b2 Author: Yang Yingliang Date: Mon Jun 7 23:02:59 2021 +0800 net: moxa: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code and avoid a null-ptr-deref by checking 'res' in it. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 7f553ff214105f49e973187488ff93ff9c56b0c8 Author: Zheng Yongjun Date: Mon Jun 7 23:01:37 2021 +0800 l2tp: Fix spelling mistakes Fix some spelling mistakes in comments: negociated ==> negotiated dont ==> don't Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 4fb3ebbf7e086a02afb0aecad0d21cf536b5fa05 Author: Zheng Yongjun Date: Mon Jun 7 23:01:18 2021 +0800 net/ncsi: Fix spelling mistakes Fix some spelling mistakes in comments: constuct ==> construct chanels ==> channels Detination ==> Destination Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 974d8f86cd60d85f107f86182fb071cea0345387 Author: Zheng Yongjun Date: Mon Jun 7 23:01:09 2021 +0800 ipv4: Fix spelling mistakes Fix some spelling mistakes in comments: Dont ==> Don't timout ==> timeout incomming ==> incoming necesarry ==> necessary substract ==> subtract Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 84a57ae96b299eaceacc4301db222ee12563cc96 Author: Zheng Yongjun Date: Mon Jun 7 23:01:00 2021 +0800 netlabel: Fix spelling mistakes Fix some spelling mistakes in comments: Interate ==> Iterate sucess ==> success Signed-off-by: Zheng Yongjun Acked-by: Paul Moore Signed-off-by: David S. Miller commit 20f1932e2282c58cb5ac59517585206cf5b385ae Author: Yang Yingliang Date: Mon Jun 7 22:55:21 2021 +0800 net: micrel: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 0bb51a3a385790a4be20085494cf78f70dadf646 Author: Yang Yingliang Date: Mon Jun 7 22:36:02 2021 +0800 net: mvpp2: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 3710e80952cf2dc48257ac9f145b117b5f74e0a5 Author: Yang Yingliang Date: Mon Jun 7 22:21:09 2021 +0800 net: ethernet: bgmac: Use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit b5d64b43f8ccc25428009e5263619e34a6f3d787 Author: Yang Yingliang Date: Mon Jun 7 21:57:14 2021 +0800 net: enetc: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 809660cbc82d1bef9a2da1839d5c26a53760252c Author: Yang Yingliang Date: Mon Jun 7 21:43:54 2021 +0800 net: macb: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 74325bf0104573c6dfce42837139aeef3f34be76 Author: Yang Yingliang Date: Mon Jun 7 21:38:37 2021 +0800 net: bcmgenet: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 90fdd89f6cf99213073dd9623f98519c767630d6 Author: Shaokun Zhang Date: Sat Jun 5 13:42:56 2021 +0800 net: tulip: Remove the repeated declaration Function 'pnic2_lnk_change' is declared twice, so remove the repeated declaration. Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: Shaokun Zhang Signed-off-by: David S. Miller commit f1fe19c2cb3fdc92a614cf330ced1613f8f1a681 Author: Yang Yingliang Date: Sat Jun 5 10:31:48 2021 +0800 net: mscc: ocelot: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7cf6f56d1631b46502005ad3b20db71bb93509d9 Merge: ca4e2b94eb98d e0fe0a38371b6 Author: David S. Miller Date: Mon Jun 7 14:00:37 2021 -0700 Merge branch 'hns3-error-handling' Guangbin Huang says: ==================== net: hns3: refactors and decouples the error handling logic This patchset refactors and decouples the error handling logic from reset logic, it is the preset patch of the RAS feature. It mainly implements the function that reset logic remains independent of the error handling logic, this will ensure that common misellaneous MSI-X interrupt are re-enabled quickly. ==================== Signed-off-by: David S. Miller commit e0fe0a38371b6d2d669e231c1fd68ce620dfa6b2 Author: Yufeng Mo Date: Mon Jun 7 19:18:12 2021 +0800 net: hns3: remove now redundant logic related to HNAE3_UNKNOWN_RESET Earlier patches have decoupled the MSI-X conveyed error handling and recovery logic. This earlier concept code is no longer required. Signed-off-by: Yufeng Mo Signed-off-by: Salil Mehta Signed-off-by: Jiaran Zhang Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit aff399a638da7e56680cdf6fa7544b67e0373a4e Author: Jiaran Zhang Date: Mon Jun 7 19:18:11 2021 +0800 net: hns3: add scheduling logic for error handling task Error handling & recovery is done in context of reset task which gets scheduled from misc interrupt handler in existing code. But since error handling has been moved to new task, it should get scheduled instead of the reset task from the interrupt handler. Signed-off-by: Jiaran Zhang Signed-off-by: Salil Mehta Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d991452dd7900cf152ffb43db3b1d385e1a01579 Author: Jiaran Zhang Date: Mon Jun 7 19:18:10 2021 +0800 net: hns3: add a separate error handling task Error handling and recovery logic are intertwined. Error handling (i.e. error identification, clearing error sources and initiation of recovery) is done in context of reset task. If certain hardware errors get delivered during driver init time, which can cause driver init/loading to fail. Introduce a separate error handling task to ensure below: 1. Reset logic remains independent of the error handling logic. 2. Add the hclge_errhand_task_schedule to schedule error recovery tasks, This will ensure that common misellaneous MSI-X interrupt are re-enabled quickly. Signed-off-by: Jiaran Zhang Signed-off-by: Salil Mehta Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit ca4e2b94eb98db8472a6cb5b47147e079659dc9c Author: Jiapeng Chong Date: Mon Jun 7 18:31:14 2021 +0800 qed: Fix duplicate included linux/kernel.h Clean up the following includecheck warning: ./drivers/net/ethernet/qlogic/qed/qed_nvmetcp_fw_funcs.h: linux/kernel.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit b3ef1550a4e7ab67be9cf1ba611686d1b7744213 Merge: 8c3f3362cded0 7e94090ae13e1 Author: David S. Miller Date: Mon Jun 7 13:24:50 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-06-07 This series contains updates to virtchnl header file and ice driver. Brett adds capability bits to virtchnl to specify whether a primary or secondary MAC address is being requested and adds the implementation to ice. He also adds storing of VF MAC address so that it will be preserved across reboots of VM and refactors VF queue configuration to remove the expectation that configuration be done all at once. Krzysztof refactors ice_setup_rx_ctx() to remove configuration not related to Rx context into a new function, ice_vsi_cfg_rxq(). Liwei Song extends the wait time for the global config timeout. Salil Mehta refactors code in ice_vsi_set_num_qs() to remove an unnecessary call when the user has requested specific number of Rx or Tx queues. Jesse converts define macros to static inlines for NOP configurations. Jake adds messaging when devlink fails to read device capabilities and when pldmfw cannot find the requested firmware. Adds a wait for reset completion when reporting devlink info and reinitializes NVM during rebuild to ensure values are current. Ani adds detection and reporting of modules exceeding supported power levels and changes an error message to a debug message. Paul fixes a clang warning for deadcode.DeadStores. ==================== Signed-off-by: David S. Miller commit 8c3f3362cded07f58fbb0d8e27f3d1b61ca92c6e Merge: ef91f7981036a 2c9d6c2b871d5 Author: David S. Miller Date: Mon Jun 7 13:23:03 2021 -0700 Merge branch 'ax88772-phylib' Oleksij Rempel says: ==================== port asix ax88772 to the PHYlib changes v2: - add Reviewed-by: Andrew Lunn to some patches - refactor asix_read_phy_addr() and add error handling for all callers - refactor asix_mdio_bus_read() Port ax88772 part of asix driver to the phylib to be able to use more advanced external PHY attached to this controller. ==================== Signed-off-by: David S. Miller commit 2c9d6c2b871d5841ce26ede3e81fd37e2e33c42c Author: Oleksij Rempel Date: Mon Jun 7 10:27:27 2021 +0200 usbnet: run unbind() before unregister_netdev() unbind() is the proper place to disconnect PHY, but it will fail if netdev is already unregistered. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 06edf1a940be0633499e2feea31d380375a22bd9 Author: Oleksij Rempel Date: Mon Jun 7 10:27:26 2021 +0200 net: phy: do not print dump stack if device was removed In case phy_state_machine() works on top of USB device, we can get -ENODEV at any point. So, be less noisy if device was removed. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit d275afb663717db99c4749f0ec5e11463642fee6 Author: Oleksij Rempel Date: Mon Jun 7 10:27:25 2021 +0200 net: usb: asix: add error handling for asix_mdio_* functions This usb devices can be removed at any time, so we need to forward correct error value if device was detached. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 34a1dee6bc4458d9e059af510f2addc7a74b4c83 Author: Oleksij Rempel Date: Mon Jun 7 10:27:24 2021 +0200 net: usb: asix: ax88772: add generic selftest support With working phylib support we are able now to use generic selftests. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e532a096be0e5e570b383e71d4560e7f04384e0f Author: Oleksij Rempel Date: Mon Jun 7 10:27:23 2021 +0200 net: usb: asix: ax88772: add phylib support To be able to use ax88772 with external PHYs and use advantage of existing PHY drivers, we need to port at least ax88772 part of asix driver to the phylib framework. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit dde25846925765a88df8964080098174495c1f10 Author: Oleksij Rempel Date: Mon Jun 7 10:27:22 2021 +0200 net: usb/phy: asix: add support for ax88772A/C PHYs Add support for build-in x88772A/C PHYs Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7e88b11a862afe59ee0c365123ea5fb96a26cb3b Author: Oleksij Rempel Date: Mon Jun 7 10:27:21 2021 +0200 net: usb: asix: refactor asix_read_phy_addr() and handle errors on return Refactor asix_read_phy_addr() to return usable error value directly and make sure all callers handle this error. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 218d154f540a58b82394e128e425560181c1662e Author: Oleksij Rempel Date: Mon Jun 7 10:27:20 2021 +0200 net: usb: asix: ax88772_bind: use devm_kzalloc() instead of kzalloc() Make resource management easier, use devm_kzalloc(). Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ef91f7981036a293ee1fa1cd2f670702a3889f4b Author: Yang Yingliang Date: Mon Jun 7 16:11:45 2021 +0800 net: gemini: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Reviewed-by: Linus Walleij Signed-off-by: David S. Miller commit 4fb473fe7325181f87d586685d21f27a9b9e25f8 Author: gushengxian Date: Sun Jun 6 23:33:07 2021 -0700 atm: [br2864] fix spelling mistakes interrupt should be changed to interrupting. Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 3f07ce8e528746d477cfb301f4dc7b197ad1e2a3 Author: Zou Wei Date: Mon Jun 7 10:57:09 2021 +0800 net: dsa: hellcreek: Use is_zero_ether_addr() instead of memcmp() Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit cda9de0b8daf2ebfc07d385ef0039fd7860ddf25 Author: Yejune Deng Date: Mon Jun 7 10:37:41 2021 +0800 pktgen: add pktgen_handle_all_threads() for the same code The pktgen_{run, reset, stop}_all_threads() has the same code, so add pktgen_handle_all_threads() for it. Signed-off-by: Yejune Deng Signed-off-by: David S. Miller commit 85eb1389458d134bdb75dad502cc026c3753a619 Author: Xianting Tian Date: Sat Jun 5 11:31:00 2021 -0400 virtio_net: Remove BUG() to avoid machine dead We should not directly BUG() when there is hdr error, it is better to output a print when such error happens. Currently, the caller of xmit_skb() already did it. Signed-off-by: Xianting Tian Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit ec89c2b55dc798096c5c16af4ee0094ff6c8cb3b Author: Yang Yingliang Date: Sat Jun 5 20:25:15 2021 +0800 net: ethernet: ixp4xx_eth: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit d402af20315c99d85c9310d6f7a00e5aca53e192 Author: Yang Yingliang Date: Sat Jun 5 20:21:27 2021 +0800 net: lantiq: Use devm_platform_get_and_ioremap_resource() Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 126285651b7f95282a0afe3a1b0221419b31d989 Merge: 9977d6f56bacc 3822d0670c9d4 Author: David S. Miller Date: Mon Jun 7 13:01:52 2021 -0700 Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net Bug fixes overlapping feature additions and refactoring, mostly. Signed-off-by: David S. Miller commit 9977d6f56bacc9784654be4d0f4d27b368f57f5b Author: Yu Kuai Date: Sat Jun 5 18:18:45 2021 +0800 sch_htb: fix doc warning in htb_lookup_leaf() Add description for parameters of htb_lookup_leaf() to fix gcc W=1 warnings: net/sched/sch_htb.c:773: warning: Function parameter or member 'hprio' not described in 'htb_lookup_leaf' net/sched/sch_htb.c:773: warning: Function parameter or member 'prio' not described in 'htb_lookup_leaf' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 2c3ee53ea663a7aff97271278efb19d543e0fbe9 Author: Yu Kuai Date: Sat Jun 5 18:18:44 2021 +0800 sch_htb: fix doc warning in htb_do_events() Add description for parameters of htb_do_events() to fix gcc W=1 warnings: net/sched/sch_htb.c:708: warning: Function parameter or member 'q' not described in 'htb_do_events' net/sched/sch_htb.c:708: warning: Function parameter or member 'level' not described in 'htb_do_events' net/sched/sch_htb.c:708: warning: Function parameter or member 'start' not described in 'htb_do_events' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 0e5c90848a28edc726c6badf6875790830c9428c Author: Yu Kuai Date: Sat Jun 5 18:18:43 2021 +0800 sch_htb: fix doc warning in htb_charge_class() Add description for parameters of htb_charge_class() to fix gcc W=1 warnings: net/sched/sch_htb.c:663: warning: Function parameter or member 'q' not described in 'htb_charge_class' net/sched/sch_htb.c:663: warning: Function parameter or member 'cl' not described in 'htb_charge_class' net/sched/sch_htb.c:663: warning: Function parameter or member 'level' not described in 'htb_charge_class' net/sched/sch_htb.c:663: warning: Function parameter or member 'skb' not described in 'htb_charge_class' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 9a034f25e4721c0f021c33ca0788c7dc13bed290 Author: Yu Kuai Date: Sat Jun 5 18:18:42 2021 +0800 sch_htb: fix doc warning in htb_deactivate() Add description for parameters of htb_deactivate() to fix gcc W=1 warnings: net/sched/sch_htb.c:578: warning: Function parameter or member 'q' not described in 'htb_deactivate' net/sched/sch_htb.c:578: warning: Function parameter or member 'cl' not described in 'htb_deactivate' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 8df7e8fff8da0feb3d7d686f7992e323f0cc464a Author: Yu Kuai Date: Sat Jun 5 18:18:41 2021 +0800 sch_htb: fix doc warning in htb_activate() Add description for parameters of htb_activate() to fix gcc W=1 warnings: net/sched/sch_htb.c:562: warning: Function parameter or member 'q' not described in 'htb_activate' net/sched/sch_htb.c:562: warning: Function parameter or member 'cl' not described in 'htb_activate' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 4b479e9883ce4d99ffd4eeffc61b6ef70e06ee4f Author: Yu Kuai Date: Sat Jun 5 18:18:40 2021 +0800 sch_htb: fix doc warning in htb_change_class_mode() Add description for parameters of htb_change_class_mode() to fix gcc W=1 warnings: net/sched/sch_htb.c:533: warning: Function parameter or member 'q' not described in 'htb_change_class_mode' net/sched/sch_htb.c:533: warning: Function parameter or member 'cl' not described in 'htb_change_class_mode' net/sched/sch_htb.c:533: warning: Function parameter or member 'diff' not described in 'htb_change_class_mode' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 1e9559527a9d8cc061e884f6b237754d06711335 Author: Yu Kuai Date: Sat Jun 5 18:18:39 2021 +0800 sch_htb: fix doc warning in htb_class_mode() Add description for parameters of htb_class_mode() to fix gcc W=1 warnings: net/sched/sch_htb.c:507: warning: Function parameter or member 'cl' not described in 'htb_class_mode' net/sched/sch_htb.c:507: warning: Function parameter or member 'diff' not described in 'htb_class_mode' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 4113be2020a82d503a63917d12860766048182eb Author: Yu Kuai Date: Sat Jun 5 18:18:38 2021 +0800 sch_htb: fix doc warning in htb_deactivate_prios() Add description for parameters of htb_deactivate_prios() to fix gcc W=1 warnings: net/sched/sch_htb.c:442: warning: Function parameter or member 'q' not described in 'htb_deactivate_prios' net/sched/sch_htb.c:442: warning: Function parameter or member 'cl' not described in 'htb_deactivate_prios' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 876b5fc0c0fb879d42736a6903af23a9ef6b985a Author: Yu Kuai Date: Sat Jun 5 18:18:37 2021 +0800 sch_htb: fix doc warning in htb_activate_prios() Add description for parameters of htb_activate_prios() to fix gcc W=1 warnings: net/sched/sch_htb.c:407: warning: Function parameter or member 'q' not described in 'htb_activate_prios' net/sched/sch_htb.c:407: warning: Function parameter or member 'cl' not described in 'htb_activate_prios' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 5f8c6d05f3900a586fc3e7947423cd3b8aafcc33 Author: Yu Kuai Date: Sat Jun 5 18:18:36 2021 +0800 sch_htb: fix doc warning in htb_remove_class_from_row() Add description for parameters of htb_remove_class_from_row() to fix gcc W=1 warnings: net/sched/sch_htb.c:380: warning: Function parameter or member 'q' not described in 'htb_remove_class_from_row' net/sched/sch_htb.c:380: warning: Function parameter or member 'cl' not described in 'htb_remove_class_from_row' net/sched/sch_htb.c:380: warning: Function parameter or member 'mask' not described in 'htb_remove_class_from_row' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 996bccc39afba3db1309b8cd845f1f463516050e Author: Yu Kuai Date: Sat Jun 5 18:18:35 2021 +0800 sch_htb: fix doc warning in htb_add_class_to_row() Add description for parameters of htb_add_class_to_row() to fix gcc W=1 warnings: net/sched/sch_htb.c:351: warning: Function parameter or member 'q' not described in 'htb_add_class_to_row' net/sched/sch_htb.c:351: warning: Function parameter or member 'cl' not described in 'htb_add_class_to_row' net/sched/sch_htb.c:351: warning: Function parameter or member 'mask' not described in 'htb_add_class_to_row' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 274e5d0e55aa37f2bcee42f618b1923cab0ceabf Author: Yu Kuai Date: Sat Jun 5 18:18:34 2021 +0800 sch_htb: fix doc warning in htb_next_rb_node() Add description for parameters of htb_next_rb_node() to fix gcc W=1 warnings: net/sched/sch_htb.c:339: warning: Function parameter or member 'n' not described in 'htb_next_rb_node' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 4d7efa73fa268bba3b309988dd2d4c3787a17ddf Author: Yu Kuai Date: Sat Jun 5 18:18:33 2021 +0800 sch_htb: fix doc warning in htb_add_to_wait_tree() Add description for parameters of htb_add_to_wait_tree() to fix gcc W=1 warnings: net/sched/sch_htb.c:308: warning: Function parameter or member 'q' not described in 'htb_add_to_wait_tree' net/sched/sch_htb.c:308: warning: Function parameter or member 'cl' not described in 'htb_add_to_wait_tree' net/sched/sch_htb.c:308: warning: Function parameter or member 'delay' not described in 'htb_add_to_wait_tree' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit ae3554ba03cd176db762fce8b2c992b48b2de8e8 Merge: 06d6211361ee7 0f1e7a34c053f Author: David S. Miller Date: Mon Jun 7 12:25:22 2021 -0700 Merge branch 'hd6470-cleanups' Peng Li says: ==================== net: hd64570: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 0f1e7a34c053fd7b9a5ffa1b45cedf40a855c26e Author: Peng Li Date: Sat Jun 5 15:00:29 2021 +0800 net: hd64570: add some required spaces Add space required before the open parenthesis '('. Add space required after that close brace '}'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit cb625e9c5d48e4a717653febaac6e32bda8a63f5 Author: Peng Li Date: Sat Jun 5 15:00:28 2021 +0800 net: hd64570: remove redundant parentheses Remove redundant parentheses around 'cda >= desc_off'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 53da5342c51a6cfe10e760629cf94ae382a0d02b Author: Peng Li Date: Sat Jun 5 15:00:27 2021 +0800 net: hd64570: fix the comments style issue Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 3f8b8db695fe79aa0ab007fac1f414e74ccd7146 Author: Peng Li Date: Sat Jun 5 15:00:26 2021 +0800 net: hd64570: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit bc94e642e4bd37fa84405d7893e09b2cbf6b9af0 Author: Peng Li Date: Sat Jun 5 15:00:25 2021 +0800 net: hd64570: fix the code style issue about trailing statements Trailing statements should be on next line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 1d1fa598ac198e6f40ffa67c99dbff1cc86a581f Author: Peng Li Date: Sat Jun 5 15:00:24 2021 +0800 net: hd64570: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" and should be "foo *bar", and "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d364c0a93ac66325ad841b6be49e277d7c15af0c Author: Peng Li Date: Sat Jun 5 15:00:23 2021 +0800 net: hd64570: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 725637a802c58ada9f64d586d4b548e04e7e3f32 Author: Peng Li Date: Sat Jun 5 15:00:22 2021 +0800 net: hd64570: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 06d6211361ee7ae64145713ce95fa8697b37cc63 Merge: 1a42624aecba4 62568bdbe6f62 Author: David S. Miller Date: Mon Jun 7 12:20:18 2021 -0700 Merge branch 'sja1105-yaml' Vladimir Oltean says: ==================== Convert NXP SJA1105 DSA driver to YAML This is an attempt to convert the SJA1105 driver to the YAML schema. The SJA1105 driver has some custom device tree properties which caused validation problems in the previous attempt: https://patchwork.kernel.org/project/netdevbpf/patch/20210531234735.1582031-1-olteanv@gmail.com/ So now we are removing them, hoping that this will make the conversion easier to accept. In order to do that, we introduce a new PHY interface type, "reverse RMII", which is like "reverse MII" (aka MII as a PHY) but for the reduced data width version of the protocol. This is a direct replacement for an rmii fixed-link. Now, rmii fixed-link interfaces behave as a MAC, and rev-rmii fixed-link interfaces behave as a PHY. ==================== Signed-off-by: David S. Miller commit 62568bdbe6f6293c955fbd98db15adf7ee6aca1c Author: Vladimir Oltean Date: Fri Jun 4 17:01:51 2021 +0300 dt-bindings: net: dsa: sja1105: convert to YAML schema Since the sja1105 driver no longer has any custom device tree properties, the conversion is trivial. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5d645df99ac60fab5368e01f1ddf4a57fa4f719f Author: Vladimir Oltean Date: Fri Jun 4 17:01:50 2021 +0300 net: dsa: sja1105: determine PHY/MAC role from PHY interface type Now that both RevMII as well as RevRMII exist, we can deprecate the sja1105,role-mac and sja1105,role-phy properties and simply let the user select that a port operates in MII PHY role by using phy-mode = "rev-mii"; or in RMII PHY role by using phy-mode = "rev-rmii"; There are no fixed-link MII or RMII properties in mainline device trees, and the setup itself is fairly uncommon, so there shouldn't be risks of breaking compatibility. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 29afb83ac98e1c1cd9c9bb6e82e7d15354b3ae0b Author: Vladimir Oltean Date: Fri Jun 4 17:01:49 2021 +0300 net: dsa: sja1105: apply RGMII delays based on the fixed-link property The sja1105 driver has an intermediate way of determining whether the RGMII delays should be applied by the PHY or by itself: by looking at the port role (PHY or MAC). The port can be put in the PHY role either explicitly (sja1105,role-phy) or implicitly (fixed-link). We want to deprecate the sja1105,role-phy property, so all that remains is the fixed-link property. Introduce a "fixed_link" array of booleans in the driver, and use that to determine whether RGMII delays must be applied or not. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c858d436be8b949c368de0e079084acaff3d4aaf Author: Vladimir Oltean Date: Fri Jun 4 17:01:48 2021 +0300 net: phy: introduce PHY_INTERFACE_MODE_REVRMII The "reverse RMII" protocol name is a personal invention, derived from "reverse MII". Just like MII, RMII is an asymmetric protocol in that a PHY behaves differently than a MAC. In the case of RMII, for example: - the 50 MHz clock signals are either driven by the MAC or by an external oscillator (but never by the PHY). - the PHY can transmit extra in-band control symbols via RXD[1:0] which the MAC is supposed to understand, but a PHY isn't. The "reverse MII" protocol is not standardized either, except for this web document: https://www.eetimes.com/reverse-media-independent-interface-revmii-block-architecture/# In short, it means that the Ethernet controller speaks the 4-bit data parallel protocol from the perspective of a PHY (it acts like a PHY). This might mean that it implements clause 22 compatible registers, although that is optional - the important bit is that its pins can be connected to an MII MAC and it will 'just work'. In this discussion thread: https://lore.kernel.org/netdev/20210201214515.cx6ivvme2tlquge2@skbuf/ we agreed that it would be an abuse of terms to use the "RevMII" name for anything than the 4-bit parallel MII protocol. But since all the same concepts can be applied to the 2-bit Reduced MII protocol as well, here we are introducing a "Reverse RMII" protocol. This means: "behave like an RMII PHY". Signed-off-by: Vladimir Oltean Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 13dfead49db07225335d4f587a560a2210391a1a Author: Gustavo A. R. Silva Date: Wed Mar 10 19:40:43 2021 -0600 media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2() Rename struct sms_msg_data4 to sms_msg_data5 and increase the size of its msg_data array from 4 to 5 elements. Notice that at some point the 5th element of msg_data is being accessed in function smscore_load_firmware_family2(): 1006 trigger_msg->msg_data[4] = 4; /* Task ID */ Also, there is no need for the object _trigger_msg_ of type struct sms_msg_data *, when _msg_ can be used, directly. Notice that msg_data in struct sms_msg_data is a one-element array, which causes multiple out-of-bounds warnings when accessing beyond its first element in function smscore_load_firmware_family2(): 992 struct sms_msg_data *trigger_msg = 993 (struct sms_msg_data *) msg; 994 995 pr_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ\n"); 996 SMS_INIT_MSG(&msg->x_msg_header, 997 MSG_SMS_SWDOWNLOAD_TRIGGER_REQ, 998 sizeof(struct sms_msg_hdr) + 999 sizeof(u32) * 5); 1000 1001 trigger_msg->msg_data[0] = firmware->start_address; 1002 /* Entry point */ 1003 trigger_msg->msg_data[1] = 6; /* Priority */ 1004 trigger_msg->msg_data[2] = 0x200; /* Stack size */ 1005 trigger_msg->msg_data[3] = 0; /* Parameter */ 1006 trigger_msg->msg_data[4] = 4; /* Task ID */ even when enough dynamic memory is allocated for _msg_: 929 /* PAGE_SIZE buffer shall be enough and dma aligned */ 930 msg = kmalloc(PAGE_SIZE, GFP_KERNEL | coredev->gfp_buf_flags); but as _msg_ is casted to (struct sms_msg_data *): 992 struct sms_msg_data *trigger_msg = 993 (struct sms_msg_data *) msg; the out-of-bounds warnings are actually valid and should be addressed. Fix this by declaring object _msg_ of type struct sms_msg_data5 *, which contains a 5-elements array, instead of just 4. And use _msg_ directly, instead of creating object trigger_msg. This helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: CC [M] drivers/media/common/siano/smscoreapi.o drivers/media/common/siano/smscoreapi.c: In function ‘smscore_load_firmware_family2’: drivers/media/common/siano/smscoreapi.c:1003:24: warning: array subscript 1 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 1003 | trigger_msg->msg_data[1] = 6; /* Priority */ | ~~~~~~~~~~~~~~~~~~~~~^~~ In file included from drivers/media/common/siano/smscoreapi.c:12: drivers/media/common/siano/smscoreapi.h:619:6: note: while referencing ‘msg_data’ 619 | u32 msg_data[1]; | ^~~~~~~~ drivers/media/common/siano/smscoreapi.c:1004:24: warning: array subscript 2 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 1004 | trigger_msg->msg_data[2] = 0x200; /* Stack size */ | ~~~~~~~~~~~~~~~~~~~~~^~~ In file included from drivers/media/common/siano/smscoreapi.c:12: drivers/media/common/siano/smscoreapi.h:619:6: note: while referencing ‘msg_data’ 619 | u32 msg_data[1]; | ^~~~~~~~ drivers/media/common/siano/smscoreapi.c:1005:24: warning: array subscript 3 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 1005 | trigger_msg->msg_data[3] = 0; /* Parameter */ | ~~~~~~~~~~~~~~~~~~~~~^~~ In file included from drivers/media/common/siano/smscoreapi.c:12: drivers/media/common/siano/smscoreapi.h:619:6: note: while referencing ‘msg_data’ 619 | u32 msg_data[1]; | ^~~~~~~~ drivers/media/common/siano/smscoreapi.c:1006:24: warning: array subscript 4 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 1006 | trigger_msg->msg_data[4] = 4; /* Task ID */ | ~~~~~~~~~~~~~~~~~~~~~^~~ In file included from drivers/media/common/siano/smscoreapi.c:12: drivers/media/common/siano/smscoreapi.h:619:6: note: while referencing ‘msg_data’ 619 | u32 msg_data[1]; | ^~~~~~~~ Fixes: 018b0c6f8acb ("[media] siano: make load firmware logic to work with newer firmwares") Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit 70a2e76fc657ba75259ecd0c525ffc34651e49d4 Author: Colin Ian King Date: Mon Jun 7 12:56:15 2021 +0100 drm/amd/display: Fix two spelling mistakes, clean wide lines There are two spelling mistakes in dml_print messages, fix these and clear up checkpatch warning on overly wide line length. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit d5c9096541dca0e136708d88a3e4ed3b49d4a897 Author: Christophe JAILLET Date: Sat Jun 5 11:06:45 2021 +0200 drm/amdgpu: Fix a a typo in a comment s/than/then/ Acked-by: Christian König Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher commit 75a26f84d1ddac3a1d750db3727f3de42054a817 Author: Jiapeng Chong Date: Mon Jun 7 18:27:31 2021 +0800 drm/amd/display: Fix duplicate included dce110_hw_sequencer.h Clean up the following includecheck warning: ./drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: dce110_hw_sequencer.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit d1ba49e7763aa889108da0b9a1ec233abff4bb34 Author: Bernard Zhao Date: Sat Jun 5 05:30:59 2021 -0700 drm/amd/display: remove no need variable remove no need variable, just return the DC_OK Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 7a68d188d1c4a9d947369acaa19040a58baaaeda Author: Eric Huang Date: Sat Jun 5 10:43:00 2021 -0400 drm/amdgpu: Fix warning of Function parameter or member not described Add the parameter table_freed description on function description. Signed-off-by: Eric Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 272d57c3aa13c248554d01cbe4f3f9f9d3f004e0 Author: Wan Jiabing Date: Sat Jun 5 10:54:06 2021 +0800 drm/amdkfd: remove duplicate include of kfd_svm.h kfd_svm.h is included duplicately in commit 42de677f79999 ("drm/amdkfd: register svm range"). After checking possible related header files, remove the former one to make the code format more reasonable. Signed-off-by: Wan Jiabing Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0ac8f5876022f8873677bb9cd29332d6952f2a77 Author: Christian König Date: Sat Jun 5 16:46:10 2021 +0200 drm/amdgpu: fix VM handling for GART allocations For GTT allocations with a GART address the res contains the VMID0 addresses and can't be used for VM handling. So ignore the res when the pages array is given or we fill the page tables with nonsense. Signed-off-by: Christian König Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit 9a3bf287c42593860f29f245d9f782b51930a3d7 Author: Peng Ju Zhou Date: Mon Jun 7 13:40:56 2021 +0800 drm/amdgpu: Fixing "Indirect register access for Navi12 sriov" for vega10 The NV12 and VEGA10 share the same interface W/RREG32_SOC15*, the callback functions in these macros may not be defined, so NULL pointer must be checked but not in macro __WREG32_SOC15_RLC__, fixing the lock of NULL pointer check. Signed-off-by: Peng Ju Zhou Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 312d9253ecac6b293325ff72e6c1d1b171aaf2b3 Author: John Clements Date: Mon Jun 7 13:49:39 2021 +0800 drm/amdgpu: Update psp fw attestation support list Disable support on APU Reviewed-by: Changfeng Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 4a1d4b6d38bdd842427dd525c1d4e1341de36d68 Author: Hawking Zhang Date: Thu Jun 3 16:10:04 2021 +0800 drm/amdkfd: add sdma poison consumption handling Follow the same apporach as GFX to handle SDMA poison consumption. Send SIGBUS to application when receives SDMA_ECC interrupt and issue gpu reset either mode 2 or mode 1 to get the engine back Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 0dc2bafb08c053240e5fd913a041b9885ab947f1 Author: Philip Yang Date: Fri Jun 4 16:22:58 2021 -0400 drm/amdkfd: pages_addr offset must be 0 for system range prange->offset is for VRAM range mm_nodes, if multiple ranges share same mm_nodes, migrate range back to VRAM will reuse the VRAM at offset of the same mm_nodes. For system memory pages_addr array, the offset is always 0, otherwise, update GPU mapping will use incorrect system memory page, and cause system memory corruption. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit cf2a22e4080d8de3693bd11c288d34a6ea9d02fc Author: Rohit Khaire Date: Fri Jun 4 15:34:14 2021 -0400 drm/amdgpu: Modify register access in sdma_v5_2 to use _SOC15 macros In SRIOV environment, KMD should access SDMA registers through RLCG if GC indirect access flag enabled. Using _SOC15 read/write macros ensures that they go through RLC when the flag is enabled. Signed-off-by: Rohit Khaire Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d08c5b76b2706916743ba7a3fa1b4282ee0da27c Merge: d50b86b3f6abc 68d8b7ba360f0 Author: Mark Brown Date: Mon Jun 7 19:53:01 2021 +0100 Merge series "ASoC: adds new .auto_selectable_formats support" from Kuninori Morimoto : Hi Mark These are v3 of "ASoC: adds new .get_fmt support", but renamed Subject. This is a little bit challenging patch-set. The idea/code is almost same as v1 / v2. v3 has "priority" support. We need to set dai_link->dai_fmt to select CPU/Codec settings, and it is selected by Sound Card Driver, today. Because of it, Sound Card user need to know both CPU / Codec available dai_fmt, and needs to select it. For example simple-card / audio-graph case, it is selected by "format" and "bitclock/frame-master/inversion" on DT. But, it can be automatically selected if both CPU and Codec drivers indicate it to ALSA SoC Framework, somehow. By this patch, dai_fmt can be automatically selected from each driver if both CPU / Codec driver had .auto_selectable_formats. Automatically selectable *field* is depends on each drivers. For example, some driver want to select format "automatically", but want to select other fields "manually", because of complex limitation. Or other example, in case of both CPU and Codec are possible to be clock provider, but the quality was different. In these case, user need/want to *manually* select each fields from Sound Card driver. It uses Sound Card specified fields preferentially, and try to select non-specific fields from CPU and Codec driver settings if driver had .auto_selectable_formats. In other words, we can select all dai_fmt via Sound Card driver same as before. Select dai_fmt 100% automatically is very difficult and will be very complex, but select automatically some fields only is very easy, I guess. This patch-set is based on such assumption. v1 -> v2 - Add more detail explanation on git-log, code, comment. - Possible to be Clock/Frame provider is depends on driver's situation. v2 -> v3 - has priority - tidyup function explanation for snd_soc_dai_get_fmt() - Each driver don't try to have SND_SOC_DAIFMT_CBx_CFx to avoid confusion Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (7): ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside ASoC: soc-core: add snd_soc_runtime_get_dai_fmt() ASoC: ak4613: add .auto_selectable_formats support ASoC: pcm3168a: add .auto_selectable_formats support ASoC: rsnd: add .auto_selectable_formats support ASoC: fsi: add .auto_selectable_formats support ASoC: hdmi-codec: add .auto_selectable_formats support include/sound/soc-dai.h | 55 +++++++ sound/soc/codecs/ak4613.c | 11 ++ sound/soc/codecs/hdmi-codec.c | 21 +++ sound/soc/codecs/pcm3168a.c | 26 +++ sound/soc/sh/fsi.c | 15 ++ sound/soc/sh/rcar/core.c | 31 +++- sound/soc/soc-core.c | 288 ++++++++++++++++++++++++++-------- sound/soc/soc-dai.c | 63 ++++++++ sound/soc/soc-utils.c | 29 ++++ 9 files changed, 475 insertions(+), 64 deletions(-) -- 2.25.1 commit 72db41c9336d155d441541e9010c868e3cf62451 Author: Christian König Date: Mon Jun 7 19:56:32 2021 +0200 drm/ttm: fix warning after moving resource to ghost obj After we moved the resource to the ghost the bo->resource pointer needs to be reset since the owner of the resource is now the ghost. Signed-off-by: Christian König Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20210607175737.1405-1-christian.koenig@amd.com commit 3f409e4cd579b287a6c41d017e62c392f7997193 Author: José Roberto de Souza Date: Fri May 14 16:22:47 2021 -0700 drm/i915/display: Drop FIXME about turn off infoframes intel_dp_set_infoframes() call in intel_ddi_post_disable_dp() will take care to disable all enabled infoframes. Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210514232247.144542-4-jose.souza@intel.com commit 6d7a793aabf31d7ba2b16fc13a94ccf0b90e4be0 Author: José Roberto de Souza Date: Fri May 14 16:22:45 2021 -0700 drm/i915/display: Allow fastsets when DP_SDP_VSC infoframe do not match with PSR enabled When PSR is enabled it handles DP_SDP_VSC, changing revision and all the other fields as necessary. It can also enabled and disable this SDP as needed without a full modeset. So here masking DP_SDP_VSC bit when previous and future state PSR enabled, it will still be checked when comparing the asked state to what was programmed to hardware. Cc: Gwan-gyeong Mun Cc: Radhakrishna Sripada Reported-by: Ville Syrjälä Fixes: 78b772e1a01f ("drm/i915/display: Fill PSR state during hardware configuration read out") Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210514232247.144542-2-jose.souza@intel.com commit 9b2e49a14838584b659548565b799e0523659295 Author: José Roberto de Souza Date: Fri May 14 16:22:44 2021 -0700 drm/i915/display: Fix fastsets involving PSR Commit 78b772e1a01f ("drm/i915/display: Fill PSR state during hardware configuration read out") is not allowing fastsets to happen when PSR states changes but PSR is a feature that can be enabled and disabled during fastsets. So here moving the PSR pipe conf checks to a block that is only executed when checking if HW state matches with requested state, not during the phase where it checks if fastset is possible or not. There still a state mismatch not allowing fastsets between states turning off or on PSR because of crtc_state->infoframes.enable BIT(DP_SDP_VSC) but at least for now it will allow a fastset between PSR1 <-> PSR2, that is a case heavilly used by CI due to pipe CRC not work with PSR2, but the remaning issue will be fixed in a future patch. Cc: Gwan-gyeong Mun Cc: Radhakrishna Sripada Reported-by: Ville Syrjälä Fixes: 78b772e1a01f ("drm/i915/display: Fill PSR state during hardware configuration read out") Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210514232247.144542-1-jose.souza@intel.com commit b8be9e19f4658c28f3e4971adbe233f17f8714aa Author: Christian König Date: Mon Jun 7 19:10:45 2021 +0200 drm/ttm: fix access to uninitialized variable. The resource is not allocated yet, so no chance that this will work. Use the placement instead. Signed-off-by: Christian König Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20210607171152.15914-1-christian.koenig@amd.com commit c5fcb51111b85323cafe3f02784f7f0bf6a7cf07 Author: Gao Xiang Date: Thu Jun 3 00:06:34 2021 +0800 erofs: clean up file headers & footers - Remove my outdated misleading email address; - Get rid of all unnecessary trailing newline by accident. Link: https://lore.kernel.org/r/20210602160634.10757-1-xiang@kernel.org Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 7dea3de7d384f4c8156e8bd93112ba6db1eb276c Author: Yue Hu Date: Mon Apr 19 18:26:23 2021 +0800 erofs: remove the occupied parameter from z_erofs_pagevec_enqueue() No any behavior to variable occupied in z_erofs_attach_page() which is only caller to z_erofs_pagevec_enqueue(). Link: https://lore.kernel.org/r/20210419102623.2015-1-zbestahu@gmail.com Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang commit 0508c1ad0f264a24c4643701823a45f6c9bd8146 Author: Wei Yongjun Date: Wed May 19 14:16:57 2021 +0000 erofs: fix error return code in erofs_read_superblock() 'ret' will be overwritten to 0 if erofs_sb_has_sb_chksum() return true, thus 0 will return in some error handling cases. Fix to return negative error code -EINVAL instead of 0. Link: https://lore.kernel.org/r/20210519141657.3062715-1-weiyongjun1@huawei.com Fixes: b858a4844cfb ("erofs: support superblock checksum") Cc: stable # 5.5+ Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 7e94090ae13e1ae5fe8bd3a9cd08136260bb7039 Author: Paul M Stillwell Jr Date: Wed Mar 31 14:17:06 2021 -0700 ice: fix clang warning regarding deadcode.DeadStores clang generates deadcode.DeadStores warnings when a variable is used to read a value, but then that value isn't used later in the code. Fix this warning. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit a69606cde176a29f9261d96528b9a50fee8efadb Author: Anirudh Venkataramanan Date: Thu May 6 08:40:06 2021 -0700 ice: downgrade error print to debug print Failing to add or remove LLDP filter doesn't seem to be a fatal error, so downgrade the dev_err message to a dev_dbg message. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c77849f5460994f8c5b27907af13c60b533add5b Author: Anirudh Venkataramanan Date: Thu May 6 08:40:01 2021 -0700 ice: Detect and report unsupported module power levels Determine whether an unsupported power configuration is preventing link establishment by storing and checking the link_cfg_err_byte. Print error messages when module power levels are unsupported. Also add a new flag bit to prevent spamming said error messages. Co-developed-by: Jeb Cramer Signed-off-by: Jeb Cramer Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 97a4ec0107057a577b63568f31d35e31c39a5b7b Author: Jacob Keller Date: Thu May 6 08:40:00 2021 -0700 ice: (re)initialize NVM fields when rebuilding After performing a flash update, a device EMP reset may occur. This reset will cause the newly downloaded firmware to be initialized. When this happens, the driver still reports the previous NVM version information. This is because the NVM versions are cached within the hw structure. This can be confusing, as the new firmware is in fact running in this case. Handle this by calling ice_init_nvm when rebuilding the driver state. This will update the flash version information and ensures that the current values are displayed when reporting the NVM versions to the stack. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 1c08052ec49e4ef4549ebbc7a43f27694e08935d Author: Jacob Keller Date: Thu May 6 08:39:59 2021 -0700 ice: wait for reset before reporting devlink info Requesting device firmware information while the device is busy cleaning up after a reset can result in an unexpected failure: This occurs because the command is attempting to access the device AdminQ while it is down. Resolve this by having the command wait for a while until the reset is complete. To do this, introduce a reset_wait_queue and associated helper function "ice_wait_for_reset". This helper will use the wait queue to sleep until the driver is done rebuilding. Use of a wait queue is preferred because the potential sleep duration can be several seconds. To ensure that the thread wakes up properly, a new wake_up call is added during all code paths which clear the reset state bits associated with the driver rebuild flow. Using this ensures that tools can request device information without worrying about whether the driver is cleaning up from a reset. Specifically, it is expected that a flash update could result in a device reset, and it is better to delay the response for information until the reset is complete rather than exit with an immediate failure. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit e872b94f9cf0521e93d1b91b8c71ba417d59944e Author: Jacob Keller Date: Thu May 6 08:39:58 2021 -0700 ice: add error message when pldmfw_flash_image fails When flashing a new firmware image onto the device, the pldmfw library parses the image contents looking for a matching record. If no record can be found, the function reports an error of -ENOENT. This can produce a very confusing error message and experience for the user: $devlink dev flash pci/0000:ab:00.0 file image.bin devlink answers: No such file or directory This is because the ENOENT error code is interpreted as a missing file or directory. The pldmfw library does not have direct access to the extack pointer as it is generic and non-netdevice specific. The only way that ENOENT is returned by the pldmfw library is when no record matches. Catch this specific error and report a suitable extended ack message: $devlink dev flash pci/0000:ab:00.0 file image.bin Error: ice: Firmware image has no record matching this device devlink answers: No such file or directory In addition, ensure that we log an error message to the console whenever this function fails. Because our driver specific PLDM operation functions potentially set the extended ACK message, avoid overwriting this with a generic message. This change should result in an improved experience when attempting to flash an image that does not have a compatible record. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit d5f84ae95f1db8e3d3ff3ece8ddbfd6f0a8ceb61 Author: Jacob Keller Date: Thu May 6 08:39:57 2021 -0700 ice: add extack when unable to read device caps When filling out information for the DEVLINK_CMD_INFO_GET, the driver needs to read some device capabilities. Add an extack message to properly inform the caller of the failure, as we do for other failures in this function. Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 96cf4f689bf7e074c8ab8917a82a24114370cbeb Author: Jesse Brandeburg Date: Thu May 6 08:39:56 2021 -0700 ice: use static inline for dummy functions Trivial: The driver had previously attempted to use #define macros to make functions that have no use in certain configs disappear. Using static inlines instead allows for certain static checkers to process the code better, and results in no functional change. Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b38b7f2bb418510397714c7fb3bed64b6fd024e5 Author: Salil Mehta Date: Fri Apr 23 01:00:18 2021 +0100 ice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency If user has explicitly requested the number of {R,T}XQs, then it is unnecessary to get the count of already available {R,T}XQs from the PF avail_{r,t}xqs bitmap. This value will get overridden by user specified value in any case. Re-organize this code for improving the flow, readability and efficiency. This scope of improvement was found during the review of the ICE driver code. Fixes: 87324e747fde ("ice: Implement ethtool ops for channels") Cc: intel-wired-lan@lists.osuosl.org Tested-by: Tony Brelinski Signed-off-by: Salil Mehta Signed-off-by: Tony Nguyen commit fb3612840d4f587a0af9511a11d7989d1fa48206 Author: Liwei Song Date: Mon Apr 19 17:31:06 2021 +0800 ice: set the value of global config lock timeout longer It may need hold Global Config Lock a longer time when download DDP package file, extend the timeout value to 5000ms to ensure that download can be finished before other AQ command got time to run, this will fix the issue below when probe the device, 5000ms is a test value that work with both Backplane and BreakoutCable NVM image: ice 0000:f4:00.0: VSI 12 failed lan queue config, error ICE_ERR_CFG ice 0000:f4:00.0: Failed to delete VSI 12 in FW - error: ICE_ERR_AQ_TIMEOUT ice 0000:f4:00.0: probe failed due to setup PF switch: -12 ice: probe of 0000:f4:00.0 failed with error -12 Signed-off-by: Liwei Song Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 7ad15440acf8b5a889c60216dfc91370b90f455d Author: Brett Creeley Date: Tue Mar 2 10:15:40 2021 -0800 ice: Refactor VIRTCHNL_OP_CONFIG_VSI_QUEUES handling Currently, when a VF requests queue configuration via VIRTCHNL_OP_CONFIG_VSI_QUEUES the PF driver expects that this message will only be called once and we always assume the queues being configured start from 0. This is incorrect and is causing issues when a VF tries to send this message for multiple queue blocks. Fix this by using the queue_id specified in the virtchnl message and allowing for individual Rx and/or Tx queues to be configured. Also, reduce the duplicated for loops for configuring the queues by moving all the logic into a single for loop. Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 43c7f9198deb855b7fee1ecb2c2f98f2bfd757c8 Author: Krzysztof Kazimierczak Date: Fri Nov 20 16:39:32 2020 -0800 ice: Refactor ice_setup_rx_ctx Move AF_XDP logic and buffer allocation out of ice_setup_rx_ctx() to a new function ice_vsi_cfg_rxq(), so the function actually sets up the Rx context. Signed-off-by: Krzysztof Kazimierczak Co-developed-by: Tony Nguyen Signed-off-by: Tony Nguyen Tested-by: Kiran Bhandare commit bcc936c5d5159b4d1891d58f89301f74ff61a67d Author: Hailong Liu Date: Thu Jun 3 21:57:52 2021 +0800 cpufreq: loongson2: Remove unused linux/sched.h headers Since commit 759f534e93ac(CPUFREQ: Loongson2: drop set_cpus_allowed_ptr()), the header is useless in oongson2_cpufreq.c, so remove it. Signed-off-by: Hailong Liu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 019694f5c1b9cc444e6a3fd3005f556d0c5a6b14 Author: Hailong Liu Date: Sun Jun 6 19:58:28 2021 +0800 cpufreq: sh: Remove unused linux/sched.h headers Since commit '205dcc1ecbc5(cpufreq/sh: Replace racy task affinity logic)' the header is useless in sh-cpufreq.c, so remove it. Signed-off-by: Hailong Liu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit f28cd5ce1a60949149f9870292879e0685892a22 Author: Brett Creeley Date: Thu Sep 17 13:13:35 2020 -0700 ice: Save VF's MAC across reboot If a VM reboots and/or VF driver is unloaded, its cached hardware MAC address (hw_lan_addr.addr) is cleared in some cases. If the VF is trusted, then the PF driver allows the VF to clear its old MAC address even if this MAC was configured by a host administrator. If the VF is untrusted, then the PF driver allows the VF to clear its old MAC address only if the host admin did not set it. For the trusted VF case, this is unexpected and will cause issues because the host configured MAC (i.e. via XML) will be cleared on VM reboot. For the untrusted VF case, this is done to be consistent and it will allow the VF to keep the same MAC across VM reboot. Fix this by introducing dev_lan_addr to the VF structure. This will be the VF's MAC address when it's up and running and in most cases will be the same as the hw_lan_addr. However, to address the VM reboot and unload/reload problem, the driver will never allow the hw_lan_addr to be cleared via VIRTCHNL_OP_DEL_ETH_ADDR. When the VF's MAC is changed, the dev_lan_addr and hw_lan_addr will always be updated with the same value. The only ways the VF's MAC can change are the following: - Set the VF's MAC administratively on the host via iproute2. - If the VF is trusted and changes/sets its own MAC. - If the VF is untrusted and the host has not set the MAC via iproute2. Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 51efbbdf1dca3b5a9aa39ff1548abe43eafe0b3c Author: Brett Creeley Date: Thu Sep 17 13:13:34 2020 -0700 ice: Manage VF's MAC address for both legacy and new cases Currently there is no way for a VF driver to specify if it wants to change it's hardware address. New bits are being added to virtchnl.h in struct virtchnl_ether_addr that allow for the VF to correctly communicate this information. However, legacy VF drivers that don't support the new virtchnl.h bits still need to be supported. Make a best effort attempt at saving the VF's primary/device address in the legacy case and depend on the VIRTCHNL_ETHER_ADDR_PRIMARY type for the new case. Legacy case - If a unicast MAC is being added and the hw_lan_addr.addr is empty, then populate it. This assumes that the address is the VF's hardware address. If a unicast MAC is being added and the hw_lan_addr.addr is not empty, then cache it in the legacy_last_added_umac.addr. If a unicast MAC is being deleted and it matches the hw_lan_addr.addr, then zero the hw_lan_addr.addr. Also, if the legacy_last_added_umac.addr has not expired, copy the legacy_last_added_umac.addr into the hw_lan_addr.addr. This is done because we cannot guarantee the order of VIRTCHNL_OP_ADD_ETH_ADDR and VIRTCHNL_OP_DEL_ETH_ADDR. New case - If a unicast MAC is being added and it's specified as VIRTCHNL_ETHER_ADDR_PRIMARY, then replace the current hw_lan_addr.addr. If a unicast MAC is being deleted and it's type is specified as VIRTCHNL_ETHER_ADDR_PRIMARY, then zero the hw_lan_addr.addr. Untrusted VFs - Only allow above legacy/new changes to their hardware address if the PF has not set it administratively via iproute2. Trusted VFs - Always allow above legacy/new changes to their hardware address even if the PF has administratively set it via iproute2. Also, change the variable dflt_lan_addr to hw_lan_addr to clearly represent the purpose of this variable since it's purpose is to act as a hardware programmed MAC address for the VF. Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit eb550f53099bf5ff8dc5de93e275378510c891c9 Author: Brett Creeley Date: Thu Sep 17 13:13:33 2020 -0700 virtchnl: Use pad byte in virtchnl_ether_addr to specify MAC type Currently, there is no way for a VF driver to specify that it wants to change its device/primary unicast MAC address. This makes it difficult/impossible for the PF driver to track the VF's device/primary unicast MAC address, which is used for VM/VF reboot and displaying on the host. Fix this by using 2 bits of a pad byte in the virtchnl_ether_addr structure so the VF can specify what type of MAC it's adding/deleting. Below are the values that should be used by all VF drivers going forward. VIRTCHNL_ETHER_ADDR_LEGACY(0): - The type should only ever be 0 for legacy AVF drivers (i.e. drivers that don't support the new type bits). The PF drivers will track VF's device/primary unicast MAC, but this will only be a best effort. VIRTCHNL_ETHER_ADDR_PRIMARY(1): - This type should only be used when the VF is changing their device/primary unicast MAC. It should be used for both delete and add cases related to the device/primary unicast MAC. VIRTCHNL_ETHER_ADDR_EXTRA(2): - This type should be used when the VF is adding and/or deleting MAC addresses that are not the device/primary unicast MAC. For example, extra unicast addresses and multicast addresses assuming the PF supports "extra" addresses at all. If a PF is parsing the type field of the virtchnl_ether_addr, then it should use the VIRTCHNL_ETHER_ADDR_TYPE_MASK to mask the first two bits of the type field since 0, 1, and 2 are the only valid values. Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen commit 2b2142f247ebeef74aaadc1a646261c19627fd7e Author: Jay Fang Date: Fri Jun 4 14:55:18 2021 +0800 spi: hisi-kunpeng: Add debugfs support This patch uses debugfs_regset32 interface to create the registers dump file. Use it instead of creating a generic debugfs file with manually written read callback function. With these entries, users can check all the SPI controller registers during run time. Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1622789718-13977-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 73d4ae57f82ec1e5fc92b9acd25bb1db2f8cf8e3 Author: Axel Lin Date: Sun Jun 6 14:50:52 2021 +0800 regulator: mt6359: Get rid of linear_range tables The MT6359_BUCK and MT6359_LDO_LINEAR macros setup both linear settings (min_uV, uV_step, linear_min_sel) and linar_range (linear_ranges, n_linear_ranges) settings. All the linear range tables actually only has one entry. Let's simplify it by using linear instead of linear range. The linear_min_sel setting is 0 for all cases, remove it from the macros. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210606065052.1417111-3-axel.lin@ingics.com Signed-off-by: Mark Brown commit 5a5e31150c9ecdb76d3f87ed852f5c650d70c7d2 Author: Axel Lin Date: Sun Jun 6 14:50:51 2021 +0800 regulator: mt6359: Use unsigned int for volt_tables The regulator_desc expects "const unsigned int *volt_table", thus use unsigned int instead of u32. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210606065052.1417111-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 431ea63b647fb35a0ff7f40f19c2bbd22abeb564 Author: Axel Lin Date: Sun Jun 6 14:50:50 2021 +0800 regulator: mt6358: Use unsigned int for volt_tables The regulator_desc expects "const unsigned int *volt_table", thus use unsigned int instead of u32. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210606065052.1417111-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 3c37d899ef8bd9940f9eee551c6c0b16b36aa1e2 Author: Axel Lin Date: Sat Jun 5 09:34:24 2021 +0800 regulator: max77686: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210605013424.1298773-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 4388daa8e2c7ad9db10c424ab416ddf5fa960c47 Merge: 5eee5eced95f1 4cfc965475124 Author: Mark Brown Date: Mon Jun 7 16:23:06 2021 +0100 Merge tag 'tb-mfd-regulator-rtc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-5.14 Immutable branch between MFD, Regulator and RTC due for the v5.14 merge window commit bcd23f93d3984a94d64ce0b6bbfa3789c0e8ebaf Author: Maxim Kochetkov Date: Tue May 25 06:42:03 2021 +0300 regmap-irq: Introduce inverted status registers support Some interrupt controllers have inverted status register: cleared bits is active interrupts and set bits is inactive interrupts, so add inverted status support to the framework. Signed-off-by: Maxim Kochetkov Link: https://lore.kernel.org/r/20210525034204.5272-1-fido_max@inbox.ru Signed-off-by: Mark Brown commit d50b86b3f6abc4ff8a35f706a6b8251a2d4cf58f Author: Colin Ian King Date: Thu Jun 3 12:36:59 2021 +0100 ASoC: rk817: remove redundant assignment to pointer node, add missing of_node_put The pointer node is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. The function is missing a of_node_put on node, fix this by adding the call before returning. Addresses-Coverity: ("Unused value") Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support") Signed-off-by: Colin Ian King Tested-by: Chris Morgan Link: https://lore.kernel.org/r/20210603113659.82031-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 54f6731394520d706c3133aab17aa90434bcf1aa Author: Jiapeng Chong Date: Fri Jun 4 18:23:29 2021 +0800 ASoC: rk817: Remove unneeded semicolon Fix the following coccicheck warnings: ./sound/soc/codecs/rk817_codec.c:49:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1622802209-45031-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit b9de77d0bc518fa08b7d218a4de171edb42f0a79 Merge: ffb2df66ba8c6 ef7570b67541d Author: Mark Brown Date: Mon Jun 7 16:18:18 2021 +0100 Merge tag 'tb-mfd-asoc-v5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into asoc-5.14 Immutable branch between MFD and ASoC due for the v5.14 merge window commit 5fe8f0a0a83ab78c75010e161fa27ae66e36cd64 Author: Takashi Sakamoto Date: Mon Jun 7 17:12:50 2021 +0900 ALSA: firewire-lib: delete unused kernel API No driver use snd_fw_schedule_registration(). Let's delete it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ee5f0b32ce6bd2ddc3caec73391a4b6f687ac2c6 Author: Takashi Sakamoto Date: Mon Jun 7 17:12:49 2021 +0900 ALSA: fireface: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a49c6766dfa029856e6ad6e295f7e6d6c75eb94c Author: Takashi Sakamoto Date: Mon Jun 7 17:12:48 2021 +0900 ALSA: firewire-motu: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 7ae2f179a42d7a15a84e238eb1d177ca2c79f954 Author: Takashi Sakamoto Date: Mon Jun 7 17:12:47 2021 +0900 ALSA: firewire-tascam: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 9067c181c3a528fc5e2da1e9f298c46091eafc3d Author: Takashi Sakamoto Date: Mon Jun 7 17:12:46 2021 +0900 ALSA: firewire-digi00x: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 9536c7512c7403f795d6694dd2191f5d1f807ea9 Author: Takashi Sakamoto Date: Mon Jun 7 17:12:45 2021 +0900 ALSA: dice: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit b566e972f59443adfd9b5d0cea83c2c0cf1e1bdc Author: Takashi Sakamoto Date: Mon Jun 7 17:12:44 2021 +0900 ALSA: oxfw: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d42dca6b469f538c646431772ceda05bacbe5e1e Author: Takashi Sakamoto Date: Mon Jun 7 17:12:43 2021 +0900 ALSA: fireworks: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 81bfb89eed864a42c3cf4fcecde2589a7374ca68 Author: Takashi Sakamoto Date: Mon Jun 7 17:12:42 2021 +0900 ALSA: bebob: cease from delayed card registration The delayed registration of sound card instance brings less benefit than complication of kobject management. This commit ceases from it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210607081250.13397-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 113af8e6f457bedc700bdcfc6848e3451394d74f Author: Rob Landley Date: Mon May 17 23:46:44 2021 -0500 s390/decompressor: replace use of perl with simple sed/tr Use simple sed/tr instead of perl to generate decompressor symbols file with the same result. Signed-off-by: Rob Landley Signed-off-by: Vasily Gorbik [gor: changed commit message] Link: https://lore.kernel.org/r/a48c51f8-5fe4-87e7-284e-c96e2381801a@landley.net Signed-off-by: Vasily Gorbik commit 20232b18e5345385851ae7e2b7ef9a7cf983333a Author: Alexander Gordeev Date: Mon May 17 08:18:13 2021 +0200 s390/mcck: cleanup use of cleanup_sie_mcck cleanup_sie_mcck label is called from a single location only and thus does not need to be a subroutine. Move the labelled code to the caller - by doing that the SIE critical section checks appear next to each other and the SIE cleanup becomes bit more readable. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 3bd695813628816a49cb8d79e3398796c9de79f2 Merge: 21aadf2eb0551 1874cb13d5d7c Author: Vasily Gorbik Date: Mon Jun 7 17:11:10 2021 +0200 Merge branch 's390/fixes' into features This helps to avoid merge conflicts later. * fixes: s390/mcck: fix invalid KVM guest condition check s390/mcck: fix calculation of SIE critical section size Signed-off-by: Vasily Gorbik commit 21aadf2eb055187ae8724997e6aca76e0d548447 Author: Heiko Carstens Date: Tue Jun 1 10:59:09 2021 +0200 s390/lowcore: remove superfluous __packed annotations Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 0a500447b847f87b06ae814253376d983ef98e04 Author: Sven Schnelle Date: Mon May 10 21:10:18 2021 +0200 s390: use struct tpi_info in lowcore.h Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 34bbeed07494cc0d64d0c7a953230883a4d78f6f Author: Sven Schnelle Date: Mon May 10 21:10:16 2021 +0200 s390: add struct tpi_info to struct pt_regs To avoid casting ptrace members, add a union containing both struct tpi_info and explicit int_code/int_parm members. Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c63c473f18a7b72ba5cdc37b9a564dc2a4b625d5 Author: Sven Schnelle Date: Mon May 10 21:10:15 2021 +0200 s390/cio: add tpi.h header file For future work we need the struct tpi_info declaration in asm/ptrace.h. Due to circular dependencies it cannot stay in asm/lowcore.h or asm/cio.h, which would be the preferred location. Therefore add it in its own header file. Also fix a typo in the length of a reserved field that did not have a functional effect beyond an incorrect field value in the s390_cio_tpi tracepoint. Fixes: 2ab59de7c5ce ("s390/cio: Consolidate inline assemblies and related data definitions") Signed-off-by: Sven Schnelle Acked-by: Peter Oberparleiter Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 5d3516b3647621d5a1180672ea9e0817fb718ada Author: Randy Dunlap Date: Thu May 27 17:24:20 2021 -0700 s390: appldata depends on PROC_SYSCTL APPLDATA_BASE should depend on PROC_SYSCTL instead of PROC_FS. Building with PROC_FS but not PROC_SYSCTL causes a build error, since appldata_base.c uses data and APIs from fs/proc/proc_sysctl.c. arch/s390/appldata/appldata_base.o: in function `appldata_generic_handler': appldata_base.c:(.text+0x192): undefined reference to `sysctl_vals' Fixes: c185b783b099 ("[S390] Remove config options.") Signed-off-by: Randy Dunlap Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: linux-s390@vger.kernel.org Signed-off-by: Vasily Gorbik Link: https://lore.kernel.org/r/20210528002420.17634-1-rdunlap@infradead.org Signed-off-by: Vasily Gorbik commit 42e8d652438f5ddf04e5dac299cb5e623d113dc0 Author: Fabrice Fontaine Date: Mon May 10 07:31:33 2021 +0200 s390: disable SSP when needed Though -nostdlib is passed in PURGATORY_LDFLAGS and -ffreestanding in KBUILD_CFLAGS_DECOMPRESSOR, -fno-stack-protector must also be passed to avoid linking errors related to undefined references to '__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces -fstack-protector. Fixes - https://gitlab.com/kubu93/buildroot/-/jobs/1247043361 Signed-off-by: Fabrice Fontaine Signed-off-by: Vasily Gorbik Reviewed-by: Alexander Egorenkov Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/20210510053133.1220167-1-fontaine.fabrice@gmail.com Signed-off-by: Vasily Gorbik commit 17c0b86e5fab71f6f1410ae31545b486e357dbe4 Author: Julian Wiedmann Date: Wed May 5 10:28:21 2021 +0200 s390/ccwgroup: use BUS_NOTIFY_UNBOUND_DRIVER to trigger ungrouping ccwgroup_notifier() currently listens for BUS_NOTIFY_UNBIND_DRIVER events, and triggers an ungrouping for the affected device. Looking at __device_release_driver(), we can wait for a little longer until the driver has been fully unbound and eg. bus->remove() has been called. So listen for BUS_NOTIFY_UNBOUND_DRIVER instead. Due to locking the current code should work just fine, but this clarifies our intent. Signed-off-by: Julian Wiedmann Reviewed-by: Vineeth Vijayan Signed-off-by: Vasily Gorbik commit 428b7f59835d3e62cf5a1920f3f753782ae84e5e Author: Julian Wiedmann Date: Wed May 5 10:25:14 2021 +0200 s390/ccwgroup: simplify ungrouping when driver deregisters driver_unregister() ends up calling __device_release_driver() for each device that is bound to the driver. Thus ccwgroup_notifier() will see a BUS_NOTIFY_UNBIND_DRIVER event for these ccwgroup devices, and trigger the ungrouping. So there's no need to also trigger the ungrouping from within ccwgroup_driver_unregister(), remove it. Signed-off-by: Julian Wiedmann Reviewed-by: Vineeth Vijayan Signed-off-by: Vasily Gorbik commit 31aae32ca1258aa68b3feb2d7d00c1e252b857a1 Author: Julian Wiedmann Date: Fri May 14 10:31:07 2021 +0200 s390/vfio-ap: clean up vfio_ap_drv's definition Define & initialize the driver struct in one go, so that everything is in one place. Signed-off-by: Julian Wiedmann Reviewed-by: Halil Pasic Signed-off-by: Vasily Gorbik commit 0677519ab94d2cf03c13e6e8cd6450d84bb09320 Author: Harald Freudenberger Date: Tue May 11 15:01:18 2021 +0200 s390/ap: extend AP change bindings-complete uevent with counter Userspace udev rules need an indication about the very first AP change BINDINGS=complete uevent. So now this uevent is extend with an additional key-value entry COMPLETECOUNT=. The very first uevent will show counter=1 and the following BINDINGS=complete uevents increase this counter by 1. Here is an example how the very first BINDINGS=complete uevent looks like: KERNEL[106.079510] change /devices/ap (ap) ACTION=change DEVPATH=/devices/ap SUBSYSTEM=ap BINDINGS=complete COMPLETECOUNT=1 SEQNUM=10686 Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit d2e834c62d7fa467a534758f7994e981ce163c80 Author: Alexander Gordeev Date: Thu May 6 16:26:54 2021 +0200 s390/smp: remove redundant pcpu::lowcore member Per-CPU pointer to lowcore is stored in global lowcore_ptr[] array and duplicated in struct pcpu::lowcore member. This update removes the redundancy. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 587704efb3dea5685a2f571b75bd3dc47f73fec1 Author: Alexander Gordeev Date: Thu May 6 16:26:53 2021 +0200 s390/smp: do not preserve boot CPU lowcore on hotplug Once the kernel is running the boot CPU lowcore becomes freeable and does not differ from the secondary CPU ones in any way. Make use of it and do not preserve the boot CPU lowcore on unplugging. That allows returning unused memory when the boot CPU is offline and makes the code more clear. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 5789284710aa121416524acc54ac0d8c27c3c2ef Author: Alexander Gordeev Date: Thu May 6 16:26:52 2021 +0200 s390/smp: reallocate IPL CPU lowcore The lowcore for IPL CPU is special. It is allocated early in the boot process using memblock and never freed since. The reason is pcpu_alloc_lowcore() and pcpu_free_lowcore() routines use page allocator which is not available when the IPL CPU is getting initialized. Similar problem is already addressed for stacks - once the virtual memory is available the early boot stacks get re- allocated. Doing the same for lowcore will allow freeing the IPL CPU lowcore and make no difference between the boot and secondary CPUs. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit bdb8c9353ead1a4176e9ba034ea7ceb210c8a59c Author: Alexander Gordeev Date: Thu May 6 20:06:00 2021 +0200 s390/mm: ensure switch_mm() is executed with interrupts disabled Architecture callback switch_mm() is allowed to be called with enabled interrupts. However, our implementation of switch_mm() does not expect that. Let's follow other architectures and make sure switch_mm() is always executed with interrupts disabled, regardless of what happens with the generic kernel code in the future. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 27c1dac0b6d8c3b640e24a1b762c7244fbb116fd Author: Heiko Carstens Date: Fri May 7 19:12:54 2021 +0200 s390/boot: access kernel command line via parmarea Access the kernel command line via parmarea instead of using the COMMAND_LINE define. With this the following gcc11 warning is removed: arch/s390/boot/ipl_parm.c: In function ‘setup_boot_command_line’: arch/s390/boot/ipl_parm.c:168:50: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f73c632d387a5f1528cca6032c646489610bec13 Author: Heiko Carstens Date: Fri May 7 19:12:39 2021 +0200 s390/ipl: make parameter area accessible via struct parmarea Since commit 9a965ea95135 ("s390/kexec_file: Simplify parmarea access") we have struct parmarea which describes the layout of the kernel parameter area. Make the kernel parameter area available as global variable parmarea of type struct parmarea, which allows to easily access its members. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b7d91d230a119fdcc334d10c9889ce9c5e15118b Author: Valentin Vidic Date: Tue Apr 27 21:40:10 2021 +0200 s390/sclp_vt220: fix console name to match device Console name reported in /proc/consoles: ttyS1 -W- (EC p ) 4:65 does not match the char device name: crw--w---- 1 root root 4, 65 May 17 12:18 /dev/ttysclp0 so debian-installer inside a QEMU s390x instance gets confused and fails to start with the following error: steal-ctty: No such file or directory Signed-off-by: Valentin Vidic Link: https://lore.kernel.org/r/20210427194010.9330-1-vvidic@valentin-vidic.from.hr Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 197cec2853cb112e7a5c2adeccf4d2b09e7a36e2 Author: Julian Wiedmann Date: Sat Apr 24 12:12:38 2021 +0200 s390/ccwgroup: release the cdevs from within dev->release() Wiring up the cdevs is an essential part of the gdev creation. So release them during the gdev destruction, ie. on the last put_device(). This could cause us to hold on to the cdevs a tiny bit longer, but that's not a real concern. As we have much less certainty of what context this put_device() is executed from, switch to irqsave locking. Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik commit 95c09f0344f1dd9206f105b211c36476a7301b07 Author: Julian Wiedmann Date: Fri Apr 16 12:46:27 2021 +0200 s390/ap: wire up bus->probe and bus->remove Hijacking the device_driver's probe/remove callbacks for purely bus-internal logic is a very unconvential construct. Instead just set up our callbacks in the AP bus struct, and really_probe() will call them in the same way as before. Signed-off-by: Julian Wiedmann Reviewed-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 3b4dd96854c423bdf20372bbff384c1852862248 Author: Julian Wiedmann Date: Fri Apr 16 11:58:41 2021 +0200 s390/zcrypt: remove zcrypt_device_count It's evidently unused. Signed-off-by: Julian Wiedmann Reviewed-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit a237283fc40558b01187c1a3371040846199a786 Author: Sven Schnelle Date: Tue May 4 17:07:02 2021 +0200 s390/crypto: fix function/prototype mismatches gcc-11 warns: drivers/s390/crypto/zcrypt_ccamisc.c:298:38: warning: argument 4 of type u8[64] {aka unsigned char[64]} with mismatched bound [-Warray-parameter=] 298 | u32 keybitsize, u8 seckey[SECKEYBLOBSIZE]) | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/s390/crypto/zcrypt_ccamisc.c:24: drivers/s390/crypto/zcrypt_ccamisc.h:162:63: note: previously declared as u8 * {aka unsigned char *} 162 | int cca_genseckey(u16 cardnr, u16 domain, u32 keybitsize, u8 *seckey); | ~~~~^~~~~~ drivers/s390/crypto/zcrypt_ccamisc.c:441:41: warning: argument 5 of type u8[64] {aka unsigned char[64]} with mismatched bound [-Warray-parameter=] 441 | const u8 *clrkey, u8 seckey[SECKEYBLOBSIZE]) | ~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/s390/crypto/zcrypt_ccamisc.c:24: drivers/s390/crypto/zcrypt_ccamisc.h:168:42: note: previously declared as u8 * {aka unsigned char *} 168 | const u8 *clrkey, u8 *seckey); | ~~~~^~~~~~ Fix this by making the prototypes match the functions. Signed-off-by: Sven Schnelle Cc: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 755112b35cdd181dffd704b42ca6a788cc0e3326 Author: Sven Schnelle Date: Wed May 5 22:01:16 2021 +0200 s390/traps: add struct to access transactional diagnostic block gcc-11 warns: arch/s390/kernel/traps.c: In function __do_pgm_check: arch/s390/kernel/traps.c:319:17: warning: memcpy reading 256 bytes from a region of size 0 [-Wstringop-overread] 319 | memcpy(¤t->thread.trap_tdb, &S390_lowcore.pgm_tdb, 256); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by adding a struct pgm_tdb to struct lowcore and copy that. Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8 Author: Sven Schnelle Date: Wed May 5 22:01:11 2021 +0200 s390/irq: add union/struct to access external interrupt parameters gcc-11 warns: arch/s390/kernel/irq.c: In function do_ext_irq: arch/s390/kernel/irq.c:175:9: warning: memcpy reading 4 bytes from a region of size 0 [-Wstringop-overread] 175 | memcpy(®s->int_code, &S390_lowcore.ext_cpu_addr, 4); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by adding a struct for int_code to struct lowcore. Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 17e89e1340a377b2f14a14d7050f609328592793 Author: Sven Schnelle Date: Wed May 5 22:01:10 2021 +0200 s390/facilities: move stfl information from lowcore to global data With gcc-11, there are a lot of warnings because the facility functions are accessing lowcore through a null pointer. Fix this by moving the facility arrays away from lowcore. Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit af9ad82290a58b3f1cc02d12459e3396eee04187 Author: Sven Schnelle Date: Wed May 5 22:01:09 2021 +0200 s390/entry: use assignment to read intcode / asm to copy gprs arch/s390/kernel/syscall.c: In function __do_syscall: arch/s390/kernel/syscall.c:147:9: warning: memcpy reading 64 bytes from a region of size 0 [-Wstringop-overread] 147 | memcpy(®s->gprs[8], S390_lowcore.save_area_sync, 8 * sizeof(unsigned long)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/s390/kernel/syscall.c:148:9: warning: memcpy reading 4 bytes from a region of size 0 [-Wstringop-overread] 148 | memcpy(®s->int_code, &S390_lowcore.svc_ilc, sizeof(regs->int_code)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by moving the gprs restore from C to assembly, and use a assignment for int_code instead of memcpy. Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d460bb6c6417588dd8b0907d34f69b237918812a Author: Niklas Schnelle Date: Fri Feb 19 12:00:52 2021 +0100 s390: enable HAVE_IOREMAP_PROT In commit b02002cc4c0f ("s390/pci: Implement ioremap_wc/prot() with MIO") we implemented both ioremap_wc() and ioremap_prot() however until now we had not set HAVE_IOREMAP_PROT in Kconfig, do so now. This also requires implementing pte_pgprot() as this is used in the generic_access_phys() code enabled by CONFIG_HAVE_IOREMAP_PROT. As with ioremap_wc() we need to take the MMIO Write Back bit index into account. Moreover since the pgprot value returned from pte_pgprot() is to be used for mappings into kernel address space we must make sure that it uses appropriate kernel page table protection bits. In particular a pgprot value originally coming from userspace could have the _PAGE_PROTECT bit set to enable fault based dirty bit accounting which would then make the mapping inaccessible when used in kernel address space. Fixes: b02002cc4c0f ("s390/pci: Implement ioremap_wc/prot() with MIO") Reviewed-by: Gerald Schaefer Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 15e5b53ff4c92c8ea79094871f91d077bfc60526 Author: Thomas Richter Date: Thu Apr 29 15:04:30 2021 +0200 s390/cpumf: remove WARN_ON_ONCE in counter start handler Remove some WARN_ON_ONCE() warnings when a counter is started. Each counter is installed function calls event_sched_in() --> cpumf_pmu_add(..., PERF_EF_START). This is done after the event has been created using perf_pmu_event_init() which verifies the counter is valid. Member hwc->config must be valid at this point. Function cpumf_pmu_start(..., PERF_EF_RELOAD) is called from function cpumf_pmu_add() for counter events. All other invocations of cpumf_pmu_start(..., PERF_EF_RELOAD) are from the performance subsystem for sampling events. Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit d552a58d708020963f6973a8b3b690f19ac81c99 Author: Thomas Richter Date: Wed Apr 28 13:30:56 2021 +0200 s390/cpumf: remove counter transaction call backs The command 'perf stat -e cycles ...' triggers the following function sequence in the CPU Measurement Facility counter device driver: perf_pmu_event_init() __hw_perf_event_init() validate_ctr_auth() validate_ctr_version() During event creation, the counter number is checked in functions validate_ctr_auth() and validate_ctr_version() to verify it is a valid counter and supported by the hardware. If this is not the case, both functions return an error and the event is not created. System call perf_event_open() returns an error in this case. Later on the event is installed in the kernel event subsystem and the driver functions cpumf_pmu_add() and cpumf_pmu_commit_txn() are called to install the counter event by the hardware. Since both events have been verified at event creation, there is no need to re-evaluate the authorization state. This can not change since on * LPARs the authorization change requires a restart of the LPAR (and thus a reboot of the kernel) * DPMs can not take resources away, just add them. Also the sequence of CPU Measurement facility counter device driver calls is cpumf_pmu_start_txn cpumf_pmu_add cpumf_pmu_start cpumf_pmu_commit_txn for every single event. Which means the condition in cpumf_pmu_add() is never met and validate_ctr_auth() is never called. This leaves the counter device driver transaction functions with just one task: start_txn: Verify a transaction is not in flight and call perf_pmu_disable() cancel_txn, commit_txn: Verify a transaction is in flight and call perf_pmu_enable() The same functionality is provided by the default transaction handling functions in kernel/events/core.c. Use those by removing the counter device driver private call back functions. Suggested-by: Sumanth Korikkar Signed-off-by: Thomas Richter Reviewed-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 24994b91ecc57602d1084d243cd89752dda7865c Author: Deepak Rawat Date: Thu May 27 04:22:30 2021 -0700 MAINTAINERS: Add maintainer for hyperv video device Maintainer for hyperv synthetic video device. Signed-off-by: Deepak Rawat Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210527112230.1274-3-drawat.floss@gmail.com commit 25bfa956561fb47141b8cc382e69a1f674a27eb0 Author: Deepak Rawat Date: Thu May 27 04:22:29 2021 -0700 drm/hyperv: Handle feature change message from device Virtual device inform if screen update is needed or not with SYNTHVID_FEATURE_CHANGE message. Handle this message to set dirt_needed flag. Suggested-by: Dexuan Cui Signed-off-by: Deepak Rawat Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210527112230.1274-2-drawat.floss@gmail.com commit 76c56a5affeba1e163b66b9d8cc192e6154466f0 Author: Deepak Rawat Date: Thu May 27 04:22:28 2021 -0700 drm/hyperv: Add DRM driver for hyperv synthetic video device DRM driver for hyperv synthetic video device, based on hyperv_fb framebuffer driver. Also added config option "DRM_HYPERV" to enabled this driver. v2: - Add support for gen2 VM - Fixed review comments v3: - Split into multiple files as suggested by Thomas Zimmermann - Fixed hibernation issue as suggested by Dexuan Cui - Use ioremap_cache as suggested by Dexuan Cui - Incorporated other review comments v4: - Fix bitrotted code - Review comments - Updated the copyright and license to match hyperv_fb v5: - Address review comments and rebased with drm-misc-next v6: - Minor code/comment improvement as suggested by Dexuan Cui Signed-off-by: Deepak Rawat Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210527112230.1274-1-drawat.floss@gmail.com commit 68d8b7ba360f01babe56887f37a679e981833bb7 Author: Kuninori Morimoto Date: Thu May 27 11:28:09 2021 +0900 ASoC: hdmi-codec: add .auto_selectable_formats support By this patch, DAI format might be automatically selected (Depends on paired DAI). Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6ognc5i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit af69f47df1fb494e6d8050e0111dfc7d75079fd6 Author: Kuninori Morimoto Date: Thu May 27 11:27:54 2021 +0900 ASoC: fsi: add .auto_selectable_formats support By this patch, DAI format might be automatically selected (Depends on paired DAI). Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bl8wnc5x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0292176522566fff8db524e38ffd0cb28398b736 Author: Kuninori Morimoto Date: Thu May 27 11:27:31 2021 +0900 ASoC: rsnd: add .auto_selectable_formats support By this patch, DAI format might be automatically selected (Depends on paired DAI). Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87cztcnc6k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bea63e8bbe3326c3e2d5540edc90a7cd2ef1ee9a Author: Kuninori Morimoto Date: Thu May 27 11:27:16 2021 +0900 ASoC: pcm3168a: add .auto_selectable_formats support By this patch, DAI format might be automatically selected (Depends on paired DAI). Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eedsnc6z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c50f381afcab30125e43258bba9316054c4ddfac Author: Kuninori Morimoto Date: Thu May 27 11:26:51 2021 +0900 ASoC: ak4613: add .auto_selectable_formats support By this patch, DAI format might be automatically selected (Depends on paired DAI). Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fsy8nc7o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ba9e82a1c8919340bee0dd7f7cafb8749810aabe Author: Kuninori Morimoto Date: Thu May 27 11:26:12 2021 +0900 ASoC: soc-core: add snd_soc_runtime_get_dai_fmt() ASoC is using dai_link which specify DAI format (= dai_link->dai_fmt), and it is selected by "Sound Card" driver in corrent implementation. In other words, Sound Card *needs* to setup it. But, it should be possible to automatically selected from CPU and Codec driver settings. This patch adds new .auto_selectable_formats support at snd_soc_dai_ops. By this patch, dai_fmt can be automatically selected from each driver if both CPU / Codec driver had it. Automatically selectable *field* is depends on each drivers. For example, some driver want to select format "automatically", but want to select other fields "manually", because of complex limitation. Or other example, in case of both CPU and Codec are possible to be clock provider, but the quality was different. In these case, user need/want to *manually* select each fields from Sound Card driver. This .auto_selectable_formats can set priority. For example, no limitaion format can be HI priority, supported but has picky limitation format can be next priority, etc. It uses Sound Card specified fields preferentially, and try to select non-specific fields from CPU and Codec driver automatically if all drivers have .auto_selectable_formats. In other words, we can select all dai_fmt via Sound Card driver same as before. Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7ionc8s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4d1a98b5f1abaad0ba7177fdb389a9f78584bc3a Author: Kuninori Morimoto Date: Thu May 27 11:25:36 2021 +0900 ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside This patch moves snd_soc_runtime_set_dai_fmt() to upside. This is prepare to support snd_soc_runtime_get_dai_fmt(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87im34nc9r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ce11d4704c080ab890831b8255fbba4d2b0c5ec Author: Suman Anna Date: Tue Jun 1 10:00:32 2021 -0500 arm64: dts: ti: k3-j721e-main: Add ICSSG MDIO nodes The ICSSGs on K3 J721E SoCs contain an MDIO controller that can be used to control external PHYs associated with the Industrial Ethernet peripherals within each ICSSG instance. The MDIO module used within the ICSSG is similar to the MDIO Controller used in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the MDIO operations. The nodes are added and enabled in the common k3-j721e-main.dtsi file by default, and disabled in the existing J721E board dts file. These nodes need pinctrl lines, and so should be enabled only on boards where they are actually wired and pinned out for ICSSG Ethernet. Any new board dts file should disable these if they are not sure. Signed-off-by: Suman Anna Reviewed-by: Grygorii Strashko Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210601150032.11432-3-s-anna@ti.com commit d49a769dcddd4224bd631792a4d2e5bbb160aa20 Author: Roger Quadros Date: Tue Jun 1 10:00:31 2021 -0500 arm64: dts: ti: k3-am65-main: Add ICSSG MDIO nodes The ICSSGs on K3 AM65x SoCs contain an MDIO controller that can be used to control external PHYs associated with the Industrial Ethernet peripherals within each ICSSG instance. The MDIO module used within the ICSSG is similar to the MDIO Controller used in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the MDIO operations. The nodes are added and enabled in the common k3-am65-main.dtsi file by default, and disabled in the existing AM65 board dts files. These nodes need pinctrl lines, and so should be enabled only on boards where they are actually wired and pinned out for ICSSG Ethernet. Any new board dts file should disable these if they are not sure. Signed-off-by: Roger Quadros [s-anna@ti.com: move the disabled status to board dts files] Signed-off-by: Suman Anna Reviewed-by: Grygorii Strashko Acked-by: Jan Kiszka Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210601150032.11432-2-s-anna@ti.com commit 79b08ae7c411840ea5a9fba349025d217e700576 Author: Aswath Govindraju Date: Sat May 29 09:07:49 2021 +0530 arm64: dts: ti: k3-am65: Add support for UHS-I modes in MMCSD1 subsystem UHS-I speed modes are supported in AM65 S.R. 2.0 SoC[1]. Add support by removing the no-1-8-v tag and including the voltage regulator device tree nodes for power cycling. However, the 4 bit interface of AM65 SR 1.0 cannot be supported at 3.3 V or 1.8 V because of erratas i2025 and i2026 [2]. As the SD card is the primary boot mode for development usecases, continue to enable SD card and disable UHS-I modes in it to minimize any ageing issues happening because of erratas. k3-am6528-iot2050-basic and k3-am6548-iot2050-advanced boards use S.R. 1.0 version of AM65 SoC. Therefore, add no-1-8-v in sdhci1 device tree node of the common iot2050 device tree file. [1] - https://www.ti.com/lit/ug/spruid7e/spruid7e.pdf, section 12.3.6.1.1 [2] - https://www.ti.com/lit/er/sprz452e/sprz452e.pdf Signed-off-by: Aswath Govindraju Acked-by: Jan Kiszka Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210529033749.6250-1-a-govindraju@ti.com commit b83e2b306736cb0d108df791fd4ee39f6d52184f Author: Daniel Scally Date: Thu Jun 3 23:40:03 2021 +0100 ACPI: scan: Add function to fetch dependent of ACPI device In some ACPI tables we encounter, devices use the _DEP method to assert a dependence on other ACPI devices as opposed to the OpRegions that the specification intends. We need to be able to find those devices "from" the dependee, so add a callback and a wrapper to walk over the acpi_dep_list and return the dependent ACPI device. Reviewed-by: Andy Shevchenko Signed-off-by: Daniel Scally Signed-off-by: Rafael J. Wysocki commit a9e10e58730432e5de840eb3ddd55c75f29341b3 Author: Daniel Scally Date: Thu Jun 3 23:40:02 2021 +0100 ACPI: scan: Extend acpi_walk_dep_device_list() The acpi_walk_dep_device_list() function is not as generic as its name implies, serving only to decrement the dependency count for each dependent device of the input. Extend it to accept a callback which can be applied to all the dependencies in acpi_dep_list. Replace all existing calls to the function with calls to a wrapper, passing a callback that applies the same dependency reduction. Reviewed-by: Andy Shevchenko Acked-by: Maximilian Luz # for platform/surface parts Signed-off-by: Daniel Scally [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 237a47ebc39de7f3763e2fd11e88774239a88b77 Author: Christophe JAILLET Date: Sat Jun 5 09:30:19 2021 +0200 ACPI: NUMA: fix typo in a comment Fix a typo in comment related to the closing #endif of an include-guard. s/__ACP_NUMA_H/__ACPI_NUMA_H/ Signed-off-by: Christophe JAILLET Signed-off-by: Rafael J. Wysocki commit c1367ee016e3550745315fb9a2dd1e4ce02cdcf6 Author: Randy Dunlap Date: Wed May 26 17:12:51 2021 -0700 m68k: atari: Fix ATARI_KBD_CORE kconfig unmet dependency warning Since the code for ATARI_KBD_CORE does not use drivers/input/keyboard/ code, just move ATARI_KBD_CORE to arch/m68k/Kconfig.machine to remove the dependency on INPUT_KEYBOARD. Removes this kconfig warning: WARNING: unmet direct dependencies detected for ATARI_KBD_CORE Depends on [n]: !UML && INPUT [=y] && INPUT_KEYBOARD [=n] Selected by [y]: - MOUSE_ATARI [=y] && !UML && INPUT [=y] && INPUT_MOUSE [=y] && ATARI [=y] Fixes: c04cb856e20a ("m68k: Atari keyboard and mouse support.") Signed-off-by: Randy Dunlap Suggested-by: Geert Uytterhoeven Suggested-by: Michael Schmitz Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20210527001251.8529-1-rdunlap@infradead.org Signed-off-by: Geert Uytterhoeven commit 888be6067b97132c3992866bbcf647572253ab3f Author: Krzysztof Wilczyński Date: Thu Jun 3 17:12:01 2021 +0000 ACPI: sysfs: Fix a buffer overrun problem with description_show() Currently, a device description can be obtained using ACPI, if the _STR method exists for a particular device, and then exposed to the userspace via a sysfs object as a string value. If the _STR method is available for a given device then the data (usually a Unicode string) is read and stored in a buffer (of the ACPI_TYPE_BUFFER type) with a pointer to said buffer cached in the struct acpi_device_pnp for later access. The description_show() function is responsible for exposing the device description to the userspace via a corresponding sysfs object and internally calls the utf16s_to_utf8s() function with a pointer to the buffer that contains the Unicode string so that it can be converted from UTF16 encoding to UTF8 and thus allowing for the value to be safely stored and later displayed. When invoking the utf16s_to_utf8s() function, the description_show() function also sets a limit of the data that can be saved into a provided buffer as a result of the character conversion to be a total of PAGE_SIZE, and upon completion, the utf16s_to_utf8s() function returns an integer value denoting the number of bytes that have been written into the provided buffer. Following the execution of the utf16s_to_utf8s() a newline character will be added at the end of the resulting buffer so that when the value is read in the userspace through the sysfs object then it would include newline making it more accessible when working with the sysfs file system in the shell, etc. Normally, this wouldn't be a problem, but if the function utf16s_to_utf8s() happens to return the number of bytes written to be precisely PAGE_SIZE, then we would overrun the buffer and write the newline character outside the allotted space which can have undefined consequences or result in a failure. To fix this buffer overrun, ensure that there always is enough space left for the newline character to be safely appended. Fixes: d1efe3c324ea ("ACPI: Add new sysfs interface to export device description") Signed-off-by: Krzysztof Wilczyński Reviewed-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki commit 3935787ebd5f4117d39c6fda6d73ecfdb747349f Author: Zhen Lei Date: Wed Jun 2 16:15:46 2021 +0800 PNP: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Rafael J. Wysocki commit 354cb6465a9b04df1e99a43fdd22881ad5c91843 Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:16 2021 +0200 MAINTAINERS: update ti,omap-gpio.yaml reference Changeset bc3aca5393c4 ("dt-bindings: gpio: omap: Convert to json-schema") renamed: Documentation/devicetree/bindings/gpio/gpio-omap.txt to: Documentation/devicetree/bindings/gpio/ti,omap-gpio.yaml. Update its cross-reference accordingly. Fixes: bc3aca5393c4 ("dt-bindings: gpio: omap: Convert to json-schema") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Bartosz Golaszewski commit 8e3ecc68e33ffe3a168f765a8f07377258615709 Author: Liu Shixin Date: Thu Jun 3 17:12:04 2021 +0800 ACPI: LPSS: Use kstrtol() instead of simple_strtol() The simple_strtol() function is not reliable in some situation, since it does not check for the range overflow. Use kstrtol() instead. While at it, modify the code to avoid evaluating _SEM unnecessarily if uid_str is NULL or kstrtol() fails to convert that string to a nonzero number. Signed-off-by: Liu Shixin [ rjw: Check uid right after calling kstrtol() ] [ rjw: Rewrite subject and changelog ] Signed-off-by: Rafael J. Wysocki commit abb50d67adf3f01f567f365b45ecb49df8289296 Author: Thomas Hellström Date: Wed Jun 2 10:38:14 2021 +0200 drm/ttm, drm/amdgpu: Allow the driver some control over swapping We are calling the eviction_valuable driver callback at eviction time to determine whether we actually can evict a buffer object. The upcoming i915 TTM backend needs the same functionality for swapout, and that might actually be beneficial to other drivers as well. Add an eviction_valuable call also in the swapout path. Try to keep the current behaviour for all drivers by returning true if the buffer object is already in the TTM_PL_SYSTEM placement. We change behaviour for the case where a buffer object is in a TT backed placement when swapped out, in which case the drivers normal eviction_valuable path is run. Reviewed-by: Maarten Lankhorst Cc: Christian König Signed-off-by: Thomas Hellström Acked-by: Christian König Link: https://lore.kernel.org/r/20210602083818.241793-8-thomas.hellstrom@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-8-thomas.hellstrom@linux.intel.com commit a3be8cd70fec2aa8913b59c9026031205c29df28 Author: Thomas Hellström Date: Wed Jun 2 10:38:13 2021 +0200 drm/ttm: Document and optimize ttm_bo_pipeline_gutting() If the bo is idle when calling ttm_bo_pipeline_gutting(), we unnecessarily create a ghost object and push it out to delayed destroy. Fix this by adding a path for idle, and document the function. Also avoid having the bo end up in a bad state vulnerable to user-space triggered kernel BUGs if the call to ttm_tt_create() fails. Finally reuse ttm_bo_pipeline_gutting() in ttm_bo_evict(). Cc: Christian König Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://lore.kernel.org/r/20210602083818.241793-7-thomas.hellstrom@linux.intel.com commit 053c57696cb99c35859e9e9cc58c7d00e434d956 Author: Thomas Hellström Date: Wed Jun 2 10:38:12 2021 +0200 drm/ttm: Use drm_memcpy_from_wc for TTM bo moves Use fast wc memcpy for reading out of wc memory for TTM bo moves. Cc: Dave Airlie Cc: Christian König Cc: Daniel Vetter Signed-off-by: Thomas Hellström Reviewed-by: Christian König #v4 Link: https://lore.kernel.org/r/20210602083818.241793-6-thomas.hellstrom@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-6-thomas.hellstrom@linux.intel.com commit b7e32bef4ae5f9149276203564b7911fac466588 Author: Thomas Hellström Date: Wed Jun 2 10:38:11 2021 +0200 drm: Add a prefetching memcpy_from_wc Reading out of write-combining mapped memory is typically very slow since the CPU doesn't prefetch. However some archs have special instructions to do this. So add a best-effort memcpy_from_wc taking dma-buf-map pointer arguments that attempts to use a fast prefetching memcpy and otherwise falls back to ordinary memcopies, taking the iomem tagging into account. The code is largely copied from i915_memcpy_from_wc. Cc: Daniel Vetter Cc: Christian König Suggested-by: Daniel Vetter Signed-off-by: Thomas Hellström Acked-by: Christian König Acked-by: Daniel Vetter Link: https://lore.kernel.org/r/20210602083818.241793-5-thomas.hellstrom@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-5-thomas.hellstrom@linux.intel.com commit 3bf3710e3718a5aebdf465343bc1125b6e8cca96 Author: Thomas Hellström Date: Wed Jun 2 10:38:10 2021 +0200 drm/ttm: Add a generic TTM memcpy move for page-based iomem The internal ttm_bo_util memcpy uses ioremap functionality, and while it probably might be possible to use it for copying in- and out of sglist represented io memory, using io_mem_reserve() / io_mem_free() callbacks, that would cause problems with fault(). Instead, implement a method mapping page-by-page using kmap_local() semantics. As an additional benefit we then avoid the occasional global TLB flushes of ioremap() and consuming ioremap space, elimination of a critical point of failure and with a slight change of semantics we could also push the memcpy out async for testing and async driver development purposes. A special linear iomem iterator is introduced internally to mimic the old ioremap behaviour for code-paths that can't immediately be ported over. This adds to the code size and should be considered a temporary solution. Looking at the code we have a lot of checks for iomap tagged pointers. Ideally we should extend the core memremap functions to also accept uncached memory and kmap_local functionality. Then we could strip a lot of code. Cc: Christian König Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://lore.kernel.org/r/20210602083818.241793-4-thomas.hellstrom@linux.intel.com commit dd9eaa23e72572d4f1c03f2e5d2e14a5b5793e79 Author: Jing Xiangfeng Date: Wed Jun 2 19:58:12 2021 +0800 ACPI: tables: FPDT: Add missing acpi_put_table() in acpi_init_fpdt() acpi_init_fpdt() forgets to call acpi_put_table() in an error path. Add the missing function call to fix it. Fixes: d1eb86e59be0 ("ACPI: tables: introduce support for FPDT table") Signed-off-by: Jing Xiangfeng Acked-by: Zhang Rui Reviewed-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 03c36034ce19e5ad855bd6b72a3d6fb194ac4df4 Author: Thomas Bogendoerfer Date: Fri May 14 14:33:08 2021 +0200 dt-bindings: gpio: Add devicetree binding for IDT 79RC32434 GPIO controller Add YAML devicetree binding for IDT 79RC32434 GPIO controller Signed-off-by: Thomas Bogendoerfer Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 4195926aedca79e7acd00ec6448726cae97675bc Author: Thomas Bogendoerfer Date: Fri May 14 14:33:07 2021 +0200 gpio: Add support for IDT 79RC3243x GPIO controller IDT 79RC3243x SoCs integrated a gpio controller, which handles up to 32 gpios. All gpios could be used as an interrupt source. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 7ca1a8014d860d23001605f63c1402f1092a58d5 Author: James Morse Date: Tue Jun 1 13:17:35 2021 +0100 ACPI: tables: PPTT: Populate cache-id if provided by firmware ACPI 6.4 adds a 'cache id' to the PPTT Cache Type Structure. Copy this property across into the cacheinfo leaf when it was provided by firmware. This value gets exposed to userspace as: /sys/devices/system/cpu/cpu*/cache/index*/id. See the "Cache IDs" section of Documentation/x86/resctrl.rst. Co-authored-by: Joey Gouly Signed-off-by: James Morse Signed-off-by: Joey Gouly [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 01c3d593be8d3e45fce3644011c60b0645cbdd78 Author: Zhen Lei Date: Tue Jun 1 14:50:32 2021 +0800 ACPI: OSL: Use DEFINE_RES_IO_NAMED() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Rafael J. Wysocki commit 4ac7a817f1992103d4e68e9837304f860b5e7300 Author: Hanjun Guo Date: Wed Jun 2 17:36:50 2021 +0800 ACPI: bus: Call kobject_put() in acpi_init() error path Although the system will not be in a good condition or it will not boot if acpi_bus_init() fails, it is still necessary to put the kobject in the error path before returning to avoid leaking memory. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 9b64560134a0032d2de6bb565a76418ad90386fe Author: Hanjun Guo Date: Wed Jun 2 17:36:49 2021 +0800 ACPI: bus: Remove unneeded assignment When acpi_kobj is NULL already, assigning NULL to it is redundant, so don't do that. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit c43f2f9842347630f2ebfab05c9972e58b7df9d5 Author: Christian König Date: Mon Jun 7 08:40:37 2021 +0200 RDMA/umem: fix missing automated rename This occasions was missed during the recent rename of the function. Signed-off-by: Christian König Reported-by: kernel test robot Reported-by: Stephen Rothwell Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210607070658.11586-1-christian.koenig@amd.com commit 9b3c47f124b60770f7738710e95801284d69d24f Author: Michael Walle Date: Sat Jun 5 00:58:57 2021 +0200 gpio: regmap: move drvdata to config data Drop gpio_regmap_set_drvdata() and instead add it to the configuration data passed to gpio_regmap_register(). gpio_regmap_set_drvdata() can't really be used in a race free way. This is because the gpio_regmap object which is needed by _set_drvdata() is returned by gpio_regmap_register(). On the other hand, the callbacks which use the drvdata might already be called right after the gpiochip_add() call in gpio_regmap_register(). Therefore, we have to provide the drvdata early before we call gpiochip_add(). Signed-off-by: Matti Vaittinen Signed-off-by: Michael Walle Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 0ac2c0e4ff4b41693977ebf624ba5952344cd7ac Author: Hanjun Guo Date: Wed Jun 2 16:54:40 2021 +0800 ACPI: Remove the macro PREFIX "ACPI: " Now the macro PREFIX for ACPI message printing is not used anymore, remove it. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit f5ee87df7a4dabadf7d560e943cbae24ed8be455 Author: Hanjun Guo Date: Wed Jun 2 16:54:39 2021 +0800 ACPI: sleep: Unify the message printing Intoduce pr_fmt() and use pr_*() macros to replace printk(), also remove all the PREFIX for pr_*() calls to generate a unified format string for prefix. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit f7e02c8d2344c9c2f124f71f53a900feb946eb8c Author: Hanjun Guo Date: Wed Jun 2 16:54:38 2021 +0800 ACPI: sbs: Unify the message printing Using pr_fmt() and pr_*() macros to unify the message printing. While at it, fix the obvious coding style issue when scanning the code. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 8acf4108aabb025223d9fda416500c12ec6f6107 Author: Hanjun Guo Date: Wed Jun 2 16:54:37 2021 +0800 ACPI: scan: Unify the log message printing The log messages in scan.c is not in consistency, some pr_*() calls have PREFIX, but some don't. Using pr_fmt() and remove PREFIX, also replace printk() with pr_*() macro to unify the message printing. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit bd10c13b7775d79e5925c66aeaa6ff64c10c3992 Author: Hanjun Guo Date: Wed Jun 2 16:54:36 2021 +0800 ACPI: sbshc: Unify the message printing Using pr_fmt() and pr_*() macros to unify the message printing. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 86ca3b0ab41f7172b963a38074612f8e5f1851e1 Author: Hanjun Guo Date: Wed Jun 2 16:54:35 2021 +0800 ACPI: sysfs: Cleanup message printing We have pr_fmt() in sysfs.c but we still use pr_err(PREFIX ...) which is wrong, remove the duplicated PREFIX and also using pr_* to replace printk to simlify the code. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 6ecfe60a13b1b27c7bc60892fa8116b223ce4a6b Author: Hanjun Guo Date: Wed Jun 2 16:54:34 2021 +0800 ACPI: reboot: Unify the message printing The meesage printing in this file is mixed with pr_*() and printk() but with no prefix and no pr_fmt() defined. Intoduce pr_fmt() and use pr_*() macros to replace printk(), to generate a unified format string for prefix. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 4140054af069be3a7c3fd82dafaccc51fb52b1b6 Author: Hanjun Guo Date: Wed Jun 2 16:54:33 2021 +0800 ACPI: processor_throttling: Cleanup the printing messages The log messages in processor_throttling.c is not in consistency, we have some printk() calls with PREFIX, but some are not; also we use pr_*() functions without prefix. So add pr_fmt() and unify them with pr_*() functions. While at it, fix some obvious coding style issues when going through the functions. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 6183a684377f9340ff9460743f87f01216af3a6b Author: Hanjun Guo Date: Wed Jun 2 16:54:32 2021 +0800 ACPI: processor_perflib: Cleanup print messages The log messages in processor_perflib.c is not in consistency, we have some printk() calls with PREFIX, but some are not; we use pr_*() functions without prefix. So add pr_fmt() and unify them with pr_*() functions. While at it, fix some obvious coding style issues when going through the functions. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 673a0796b1237d1cbe4947e711daa196858a138a Author: Hanjun Guo Date: Wed Jun 2 16:54:31 2021 +0800 ACPI: processor_thermal: Remove unused PREFIX for printing The PREFIX "ACPI: " is not used in this file, remove it. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit ccde83e318a58d89e2d4d3856b5b90ff745bf28d Author: Hanjun Guo Date: Wed Jun 2 16:54:30 2021 +0800 ACPI: pci_root: Unify the message printing In acpi_pci_root_add(), pr_info() is added with PREFIX, but in acpi_pci_root_remap_iospace() the pr_info() with no PREFIX. Introduce pr_fmt() to unify the message printing and remove the PREFIX. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 2e670deddaa5b8b6d98554664ebc2fa723a30e9b Author: Hanjun Guo Date: Wed Jun 2 16:54:29 2021 +0800 ACPI: osl: Remove the duplicated PREFIX for message printing We have pr_fmt() in osl.c, so pr_err(PREFIX ...) is duplicated and wrong, fix it by removing the PREFIX. Also remove the using of PREFIX in WARN() and just add the plain "ACPI: " in message to keep it unchanged. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 4f59927d5de483f99d26bbf0c3e8089adc9f139e Author: Hanjun Guo Date: Wed Jun 2 16:54:28 2021 +0800 ACPI: nvs: Unify the message printing The message printing in nvs.c is mixed with pr_*() and printk(), but with no prefix and also no pr_fmt() defined. Introduce pr_fmt() and use pr_*() macros to replace printk(), to generate a unified format string for prefix. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit e2935abb3a3ae88f5ab832158d6ed10c599a871f Author: Hanjun Guo Date: Wed Jun 2 16:54:27 2021 +0800 ACPI: glue: Clean up the printing messages Remove the in house ACPI_GLUE_DEBUG and its related debug message printing, using pr_debug() instead. While at it, replace printk() with pr_* to simplify the code. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit ad319565d62fa42220439efe29cc5d7b8c248dac Author: Hanjun Guo Date: Wed Jun 2 16:54:26 2021 +0800 ACPI: event: Use pr_*() macros to replace printk() Introduce pr_fmt() and replace direct printk() invocation with the matching pr_*() call to prepare for removing PREFIX. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 8e173cbb6a776cb1a3540be17780a5616b5c815a Author: Hanjun Guo Date: Wed Jun 2 16:54:25 2021 +0800 ACPI: bus: Use pr_*() macros to replace printk() In commit ee98460b2ff9 ("ACPI: bus: Clean up printing messages"), direct printk() invocations was replaced with the matching pr_*() calls, but the left two printk() calls was merged at the same time with the above cleaup commit, so we missed them for cleanup, let's replace them now and we can remove the use of PREFIX later. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 007b3e53f3a47b3cefe6224f89baac300e8d0265 Author: Hanjun Guo Date: Wed Jun 2 16:54:24 2021 +0800 ACPI: blacklist: Unify the message printing Intoduce pr_fmt() and use pr_*() macros to replace printk(), to generate a unified format string for prefix, then remove the PREFIX. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 606e56c6eced3135aecd8144b6d57b4b49e7ef89 Author: Hanjun Guo Date: Wed Jun 2 16:54:23 2021 +0800 ACPI: cmos_rtc: Using pr_fmt() and remove PREFIX Introduce pr_fmt() and remove printk PREFIX to unify the log message printing. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 043a0c9fe7a036ec5e1b85a8894d6f69bf996470 Author: Andy Shevchenko Date: Fri Jun 4 21:50:13 2021 +0300 gpio-dwapb: Drop unused headers and sort the rest Drop unused headers and drop the rest. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Acked-by: Serge Semin Tested-by: Serge Semin Signed-off-by: Bartosz Golaszewski commit 340ec061f76502befea92d9913886991a60cf15e Author: Shaokun Zhang Date: Wed May 19 11:37:27 2021 +0800 iommu/amd: Remove redundant assignment of err 'err' will be initialized and cleanup the redundant initialization. Cc: Joerg Roedel Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1621395447-34738-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Joerg Roedel commit be227f8e99a663d097536e9f9bc935fb26bdbc41 Author: Robin Murphy Date: Thu Jun 3 14:48:21 2021 +0100 iommu/amd: Tidy up DMA ops init Now that DMA ops are part of the core API via iommu-dma, fold the vestigial remains of the IOMMU_DMA_OPS init state into the IOMMU API phase, and clean up a few other leftovers. This should also close the race window wherein bus_set_iommu() effectively makes the DMA ops state visible before its nominal initialisation - it seems this was previously fairly benign, but since commit a250c23f15c2 ("iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE") it can now lead to the strict flush queue policy inadvertently being picked for default domains allocated during that window, with a corresponding unexpected perfomance impact. Reported-by: Jussi Maki Tested-by: Jussi Maki Signed-off-by: Robin Murphy Fixes: a250c23f15c2 ("iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE") Link: https://lore.kernel.org/r/665db61e23ff8d54ac5eb391bef520b3a803fcb9.1622727974.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit fb38f314fbd173e2e9f9f0f2e720a5f4889562da Author: Andy Shevchenko Date: Fri Jun 4 19:50:47 2021 +0300 device property: Unify access to of_node Historically we have a few variants how we access dev->fwnode and dev->of_node. Some of the functions during development gained different versions of the getters. Unify access to of_node and as a side change slightly refactor ACPI specific branches. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 3d7c821c1d8071e517048c8b4afdf33109441c0f Author: Andy Shevchenko Date: Fri Jun 4 19:50:46 2021 +0300 ACPI: scan: Constify acpi_dma_supported() helper function Constify arguments to acpi_dma_supported(). The function doesn't need to change the content of the passed argument and when it's const it allows to supply the result of other functions that may return a pointer to a constant object. Signed-off-by: Andy Shevchenko [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 5c1a72a0fbe1b02c3ce0537f85f92ea935e0beec Author: Andy Shevchenko Date: Fri Jun 4 19:50:45 2021 +0300 ACPI: property: Constify stubs for CONFIG_ACPI=n case There is a few stubs that left untouched during constification of the fwnode related APIs. Constify three more stubs here. Fixes: 8b9d6802583a ("ACPI: Constify acpi_bus helper functions, switch to macros") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit abb9fe438b827d8d7b844958f1acd261c5ad2b46 Author: Wan Jiabing Date: Sat Jun 5 11:22:07 2021 +0800 drm/i915/display: remove duplicated argument Fix the following coccicheck warning: ./drivers/gpu/drm/i915/display/intel_display_power.c:3081:1-28: duplicated argument to & or | This commit fixes duplicate argument. It might be a typo. But what I can do is to remove it now. Signed-off-by: Wan Jiabing Signed-off-by: Imre Deak Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210605032209.16111-1-wanjiabing@vivo.com commit 24fa16924021858ab9a0418363a2a0ee4cf1915d Author: Bob Moore Date: Fri Jun 4 14:26:08 2021 -0700 ACPICA: Update version to 20210604 ACPICA commit ffceba1df23f8dbbc64a1023314ec179b4f5331e Version 20210604. Link: https://github.com/acpica/acpica/commit/ffceba1d Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 4a2c1dcfaf59be4b357400d893c3f5daff6cab6c Author: Alison Schofield Date: Fri Jun 4 14:26:05 2021 -0700 ACPICA: Add the CFMWS structure definition to the CEDT table ACPICA commit 699fc72e56936bebf3b9ba39b6e91bd957b44452 The CXL Fixed Memory Window Structure (CFMWS) is added to the CXL Early Discovery Table (CEDT). This new structure is defined in an ECN to the CXL 2.0 specification. https://www.computeexpresslink.org/spec-landing Link: https://github.com/acpica/acpica/commit/699fc72e Signed-off-by: Alison Schofield Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 04da290dd22c806c401913bcc1ed6356599b09c3 Author: Erik Kaneda Date: Fri Jun 4 14:26:07 2021 -0700 ACPICA: Add support for PlatformRtMechanism OperationRegion handler ACPICA commit cdf48b141d7da38e47fe4020310033ddd1971f9e Writing a buffer to a PlatformRtMechanism FieldUnit invokes a bidirectional transaction. The input buffer contains 26 bytes containing 9 bytes of status, a command byte and a 16-byte UUID. This change will will simply pass this incoming buffer to a handler registered by the OS. Link: https://github.com/acpica/acpica/commit/cdf48b14 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 160c768e1cad405479e40d327e04c312da1b2384 Author: Alison Schofield Date: Fri Jun 4 14:26:04 2021 -0700 ACPICA: Add defines for the CXL Host Bridge Structure (CHBS) ACPICA commit 5ace82441a34f8d45725f12f6bd2677e79c186a6 CXL 2.0 defines length and version field values for the CHBS. Include them in the ACPI CEDT table definition. Link: https://github.com/acpica/acpica/commit/5ace8244 Signed-off-by: Alison Schofield Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit d71df85aacd26fe4ac5fbfd383e01e7552ccfcc3 Author: Erik Kaneda Date: Fri Jun 4 14:26:06 2021 -0700 ACPICA: iASL: add disassembler support for PRMT ACPICA commit f70e7593e37c9e29f19be8ad3ef93f3f34799368 Link: https://github.com/acpica/acpica/commit/f70e7593 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 9401eafaff836c1b828cd5300fb4bd35a548609b Author: Bob Moore Date: Fri Jun 4 14:26:03 2021 -0700 ACPICA: iASL: Add support for the BDAT ACPI table ACPICA commit 81eb9c383e6dee0f1b6620e91e5c3dbb48234831 Includes: Table compiler, disassembler, and template generator. Link: https://github.com/acpica/acpica/commit/81eb9c38 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 6814a524857f2da9624dedbcac9659675406f441 Author: Fabian Wüthrich Date: Fri Jun 4 14:26:02 2021 -0700 ACPICA: Add _PLD panel positions ACPICA commit 1d36b551fa6749e650da1dfd3e809146e6ac6a2e The ACPI specification v6.3 defines the panel positions in chapter 6.1.8 "_PLD (Physical Location of Device)" Link: https://github.com/acpica/acpica/commit/1d36b551 Signed-off-by: Fabian Wüthrich Reviewed-by: Daniel Scally Reviewed-by: Andy Shevchenko Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit b5e774039629d56f6a8a64013a885e284c4b3785 Author: Wei Ming Chen Date: Fri Jun 4 14:26:01 2021 -0700 ACPICA: Use ACPI_FALLTHROUGH ACPICA commit 2296edd39b4ce2d2dd691c1f309c4da00843ecc9 Replace /* FALLTHROUGH */ comment with ACPI_FALLTHROUGH Link: https://github.com/acpica/acpica/commit/2296edd3 Signed-off-by: Wei Ming Chen Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 536e35c938c67941d4279e09dc3a2825119715fd Author: Bob Moore Date: Fri Jun 4 14:26:00 2021 -0700 ACPICA: iASL Table Compiler: Add full support for RGRT ACPI table ACPICA commit 6949e1dd2d92788a994ce657857fe8809159e71e Includes compiler, disassembler, and template generator. Link: https://github.com/acpica/acpica/commit/6949e1dd Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 6496f03e36ce832137733b39f6e670434af3a1c5 Author: Bob Moore Date: Fri Jun 4 14:25:59 2021 -0700 ACPICA: iASL: Add support for the SVKL table Includes the table compiler, the disassembler and the template generator. ACPICA commit 27a434379e3ecafea5340c0c384789ea2062c4fb Link: https://github.com/acpica/acpica/commit/27a43437 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit c160b7d21ae5df7b489f3109f54bad84030cbce3 Author: Bob Moore Date: Fri Jun 4 14:25:58 2021 -0700 ACPICA: iASL: Finish support for the IVRS ACPI table 1) Add compiler support for IVRS. 2) Update disassembler support for IVRS. 3) Add a new utility, ut_is_id_integer to determine if a HID/CID is an integer or a string. ACPICA commit 7eb0b770cb0efcf089cb217b5f8bafc0c6395a3d Link: https://github.com/acpica/acpica/commit/7eb0b770 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit c27bac0314131b11bccd735f7e8415ac6444b667 Author: Erik Kaneda Date: Fri Jun 4 14:25:57 2021 -0700 ACPICA: Fix memory leak caused by _CID repair function ACPICA commit 180cb53963aa876c782a6f52cc155d951b26051a According to the ACPI spec, _CID returns a package containing hardware ID's. Each element of an ASL package contains a reference count from the parent package as well as the element itself. Name (TEST, Package() { "String object" // this package element has a reference count of 2 }) A memory leak was caused in the _CID repair function because it did not decrement the reference count created by the package. Fix the memory leak by calling acpi_ut_remove_reference on _CID package elements that represent a hardware ID (_HID). Link: https://github.com/acpica/acpica/commit/180cb539 Tested-by: Shawn Guo Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 8288f69e47f9780d9b5e0447a3160a1fbeae9c8d Author: Kuppuswamy Sathyanarayanan Date: Fri Jun 4 14:25:56 2021 -0700 ACPICA: Add SVKL table headers ACPICA commit b5e6bcf69dbb9877481992d5ce86008cfb94f5b8 SVKL (Storage Volume Key Location Table) is used by BIOS/Firmware to share storage volume encryption key's with OS. It will be used by userspace to decrypt and mount encrypted drives. So add SVKL table signature and add it to known signatures array support SVKL. You can find details about the SVKL table in TDX specfication titled "Guest-Host-Communication Interface (GHCI) for Intel Trust Domain Extensions (Intel® TDX)", sec 4.4 and in ACPI specification r6.4, sec 5.2.6. Link: https://software.intel.com/content/dam/develop/external/us/en/documents/intel-tdx-guest-hypervisor-communication-interface.pdf Link: https://github.com/acpica/acpica/commit/b5e6bcf6 Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 42d96e169a66151a87f6f2f9a10fdd5e262fa6a9 Author: Kuppuswamy Sathyanarayanan Date: Fri Jun 4 14:25:55 2021 -0700 ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Mailbox Structure ACPICA commit f1ee04207a212f6c519441e7e25397649ebc4cea Add Multiprocessor Wakeup Mailbox Structure definition. It is useful in parsing MADT Wake table. Link: https://github.com/acpica/acpica/commit/f1ee0420 Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 8b95a7d90ce8160ac5cffd5bace6e2eba01a871e Author: Nick Desaulniers Date: Tue Jun 1 20:29:26 2021 +0100 ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1 There's a few instructions that GAS infers operands but Clang doesn't; from what I can tell the Arm ARM doesn't say these are optional. F5.1.257 TBB, TBH T1 Halfword variant F5.1.238 STREXD T1 variant F5.1.84 LDREXD T1 variant Link: https://github.com/ClangBuiltLinux/linux/issues/1309 Signed-off-by: Nick Desaulniers Reviewed-by: Jian Cai Signed-off-by: Russell King commit ad05f676525aefbf3d9123a525c8a58e05b2c88e Author: Masahiro Yamada Date: Fri May 28 05:05:42 2021 +0100 ARM: 9086/1: syscalls: use pattern rules to generate syscall headers Use pattern rules to unify similar build rules between OABI and EABI. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit b34b98204ca44f6a0fdd5edd51d332f7d6c581fd Author: Masahiro Yamada Date: Fri May 28 05:00:14 2021 +0100 ARM: 9085/1: remove unneeded abi parameter to syscallnr.sh You do not need to pass the abi parameter to syscallnr.sh because it parses all the lines of syscall.tbl except comments anyway. Simplify the code. Also, remove unneeded single-quoting. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit 6073882cc1a8a0bcff840d6754f2f8205ba42342 Author: Masahiro Yamada Date: Fri May 28 04:52:09 2021 +0100 ARM: 9084/1: simplify the build rule of mach-types.h The directory of mach-types.h is created a couple of lines above: _dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') \ The 'mkdir -p' command is redundant. scripts/Kbuild.include defines real-prereqs as a shorthand for $(filter-out $(PHONY),$^). Let's use it to simplify the code. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit 4716e2e34a22a8ca840ded659893666a75b25057 Author: Geert Uytterhoeven Date: Wed May 19 14:14:42 2021 +0100 ARM: 9083/1: uncompress: atags_to_fdt: Spelling s/REturn/Return/ Fix a capitalization typo. Signed-off-by: Geert Uytterhoeven Signed-off-by: Russell King commit ae7ba7614601e8ab3a7f9815af522894ae044d65 Author: Arnd Bergmann Date: Fri May 14 11:26:38 2021 +0100 ARM: 9082/1: [v2] mark prepare_page_table as __init In some configurations when building with gcc-11, prepare_page_table does not get inline, which causes a build time warning for a section mismatch: WARNING: modpost: vmlinux.o(.text.unlikely+0xce8): Section mismatch in reference from the function prepare_page_table() to the (unknown reference) .init.data:(unknown) The function prepare_page_table() references the (unknown reference) __initdata (unknown). This is often because prepare_page_table lacks a __initdata annotation or the annotation of (unknown) is wrong. Mark the function as __init to avoid the warning regardless of the inlining, and remove the 'inline' keyword. The compiler is free to ignore the 'inline' here and it doesn't result in better object code or more readable source. Signed-off-by: Arnd Bergmann Acked-by: Ard Biesheuvel Signed-off-by: Russell King commit 79f32b221b18c15a98507b101ef4beb52444cc6f Author: Alex Sverdlin Date: Wed May 5 07:59:04 2021 +0100 ARM: 9079/1: ftrace: Add MODULE_PLTS support Teach ftrace_make_call() and ftrace_make_nop() about PLTs. Teach PLT code about FTRACE and all its callbacks. Otherwise the following might happen: ------------[ cut here ]------------ WARNING: CPU: 14 PID: 2265 at .../arch/arm/kernel/insn.c:14 __arm_gen_branch+0x83/0x8c() ... Hardware name: LSI Axxia AXM55XX [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x81/0xa8) [] (dump_stack) from [] (warn_slowpath_common+0x69/0x90) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c) [] (warn_slowpath_null) from [] (__arm_gen_branch+0x83/0x8c) [] (__arm_gen_branch) from [] (ftrace_make_nop+0xf/0x24) [] (ftrace_make_nop) from [] (ftrace_process_locs+0x27b/0x3e8) [] (ftrace_process_locs) from [] (load_module+0x11e9/0x1a44) [] (load_module) from [] (SyS_finit_module+0x59/0x84) [] (SyS_finit_module) from [] (ret_fast_syscall+0x1/0x18) ---[ end trace e1b64ced7a89adcc ]--- ------------[ cut here ]------------ WARNING: CPU: 14 PID: 2265 at .../kernel/trace/ftrace.c:1979 ftrace_bug+0x1b1/0x234() ... Hardware name: LSI Axxia AXM55XX [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x81/0xa8) [] (dump_stack) from [] (warn_slowpath_common+0x69/0x90) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c) [] (warn_slowpath_null) from [] (ftrace_bug+0x1b1/0x234) [] (ftrace_bug) from [] (ftrace_process_locs+0x285/0x3e8) [] (ftrace_process_locs) from [] (load_module+0x11e9/0x1a44) [] (load_module) from [] (SyS_finit_module+0x59/0x84) [] (SyS_finit_module) from [] (ret_fast_syscall+0x1/0x18) ---[ end trace e1b64ced7a89adcd ]--- ftrace failed to modify [] 0xe9ef7006 actual: 02:f0:3b:fa ftrace record flags: 0 (0) expected tramp: c0314265 Signed-off-by: Alexander Sverdlin Signed-off-by: Russell King commit 890cb057a46d323fd8c77ebecb6485476614cd21 Author: Alex Sverdlin Date: Wed May 5 07:58:01 2021 +0100 ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link() Will be used in the following patch. No functional change. Signed-off-by: Alexander Sverdlin Signed-off-by: Russell King commit 4e271701c17dee70c6e1351c4d7d42e70405c6a9 Author: Alex Sverdlin Date: Wed May 5 07:56:30 2021 +0100 ARM: 9077/1: PLT: Move struct plt_entries definition to header No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin Signed-off-by: Russell King commit 331f5f63c30c725ee3e7109c2e6173d5244b6079 Author: Masahiro Yamada Date: Sat Apr 24 17:00:07 2021 +0100 ARM: 9076/1: boot: remove redundant piggy_data from clean-files Kbuild cleans up files listed in 'targets'. 'piggy_data' is already added to 'targets' a few lines above. Adding it to 'clean-files' is redundant. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit 7411cfc3c91a08a884463bbc7623087ecc2efdd8 Author: Nathan Chancellor Date: Thu Mar 25 21:04:40 2021 +0100 ARM: 9070/1: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+ When linking aspeed_g5_defconfig with ld.lld 10.0.1, the following error occurs: ld.lld: error: .tmp_vmlinux.kallsyms1:(.ARM.exidx+0x34D98): relocation R_ARM_PREL31 out of range: 2135538592 is not in [-1073741824, 1073741823] This was resolved in ld.lld 11.0.0 but the minimum supported version of ld.lld for the kernel is 10.0.1. Prevent CONFIG_UNWINDER_ARM from being selected in this case so that the problematic sections cannot be created. Link: https://github.com/ClangBuiltLinux/linux/issues/732 Link: https://github.com/llvm/llvm-project/commit/48aebfc908ba7b9372aaa478a9c200789491096e Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Russell King commit c01914efeaa9732c0e3dfbb19c8d03826c11431d Author: Russell King (Oracle) Date: Fri May 28 11:03:58 2021 +0100 ARM: use MiB for vmalloc sizes Rather than using "m" (which is the unit of metres, or milli), and "MB" in the printk statements, use MiB to make it clear that we are talking about the power-of-2 megabytes, aka mebibytes. Reviewed-by: Linus Walleij Reviewed-by: Yanfei Xu Signed-off-by: Russell King (Oracle) commit 08b842400ff555d372d9584af13fe0195ef0ac1b Author: Russell King (Oracle) Date: Fri May 28 11:01:40 2021 +0100 ARM: use "* SZ_1M" rather than "<< 20" Make the default vmalloc size clearer by using a more natural multiplication by SZ_1M rather than a shift left by 20 bits. Reviewed-by: Linus Walleij Reviewed-by: Yanfei Xu Signed-off-by: Russell King (Oracle) commit 4c1b7a7616086a95cb6983f7b68b8d85b2f9bcc6 Author: Russell King (Oracle) Date: Tue May 18 12:58:34 2021 +0100 ARM: change vmalloc_start to vmalloc_size Rather than storing the start of vmalloc space, store the size, and move the calculation into adjust_lowmem_limit(). We now have one single place where this calculation takes place. Reviewed-by: Linus Walleij Reviewed-by: Yanfei Xu Signed-off-by: Russell King (Oracle) commit f572f5cb3926fb436cf4f55c84685f2ff7425e57 Author: Russell King (Oracle) Date: Tue May 18 12:53:30 2021 +0100 ARM: change vmalloc_min to vmalloc_start Change the current vmalloc_min, which is supposed to be the lowest address of vmalloc space including the VMALLOC_OFFSET, to vmalloc_start which does not include VMALLOC_OFFSET. Reviewed-by: Linus Walleij Reviewed-by: Yanfei Xu Signed-off-by: Russell King (Oracle) commit 4f706b078fd50a8eed9543a8d3fc64f1e840b7d2 Author: Russell King (Oracle) Date: Tue May 18 12:40:21 2021 +0100 ARM: use a temporary variable to hold maximum vmalloc size We calculate the maximum size of the vmalloc space twice in early_vmalloc(). Use a temporary variable to hold this value. Reviewed-by: Linus Walleij Reviewed-by: Yanfei Xu Signed-off-by: Russell King (Oracle) commit 01bb34852bf3b3e25455340fa3fedf9fc4ba38d6 Author: Russell King (Oracle) Date: Tue May 18 12:37:41 2021 +0100 ARM: change vmalloc_min to be unsigned long vmalloc_min is currently a void pointer, but everywhere its used contains a cast - either to a void pointer when setting or back to an integer type when being used. Eliminate these casts by changing its type to unsigned long. Reviewed-by: Linus Walleij Reviewed-by: Yanfei Xu Signed-off-by: Russell King (Oracle) commit d619f90fae23a31eda3a06e762a17dcdc7fbd4e8 Author: Russell King (Oracle) Date: Thu May 13 11:53:17 2021 +0100 ARM: update __swp_entry_to_pte() to use PTE_TYPE_FAULT Swap entries use a faulting PTE which have the least two significant bits as zero. Due to this, the use of PTE_TYPE_FAULT was overlooked, but really should have been included in __swp_entry_to_pte(). Convert this macro to use PTE_TYPE_FAULT to properly document what is going on here, and use __pte() to convert the swp_entry_t to a pte_t. This results in no change to the resulting kernel image. Reviewed-by: Anshuman Khandual Signed-off-by: Russell King (Oracle) commit 5de1262500708bcf6eef753f5eb9d8adb3d32d33 Author: Shaokun Zhang Date: Mon May 31 15:16:07 2021 +0800 cpufreq: stats: Clean up local variable in cpufreq_stats_create_table() Local variable 'count' will be initialized and 'ret' is also not required, so remove the redundant initialization and get rid of 'ret'. Signed-off-by: Shaokun Zhang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 8df71a7dc5e1e0d8f1bb13145e00bf375fa2082e Author: Rafael J. Wysocki Date: Wed May 26 19:30:58 2021 +0200 cpufreq: intel_pstate: hybrid: Fix build with CONFIG_ACPI unset One of the previous commits introducing hybrid processor support to intel_pstate broke build with CONFIG_ACPI unset. Fix that and while at it make empty stubs of two functions related to ACPI CPPC static inline and fix a spelling mistake in the name of one of them. Fixes: eb3693f0521e ("cpufreq: intel_pstate: hybrid: CPU-specific scaling factor") Signed-off-by: Rafael J. Wysocki Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested commit 2e5c09d19e63726a88ccd7a71256fec8a716551e Author: Zou Wei Date: Mon Jun 7 11:20:35 2021 +0800 dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot Signed-off-by: Zou Wei Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/1623036035-30614-1-git-send-email-zou_wei@huawei.com Signed-off-by: Vinod Koul commit b36a6bb8a151c056e1046e9d5b1192d90d9941c9 Author: Piotr Oniszczuk Date: Sat Jun 5 09:35:34 2021 +0200 drm/sun4i: de3: Be explicit about supported modifiers Currently only linear formats are supported in sun4i-drm driver, but SoCs like H6 supports AFBC variant of some of them in multiple cores (GPU, VPU, DE3). Panfrost already implements AFBC compression and is sometimes confused what should be default choice (linear, AFBC) if DRM driver is not explicit about modifier support (MiniMyth2 distro with MythTV app). After some discussion with Daniel Stone on #panfrost IRC, it was decided to make modifiers in sun4i-drm explicit, to avoid any kind of guessing, not just in panfrost, but everywhere. In fact, long term idea is to make modifier parameter in drm_universal_plane_init() mandatory (non NULL). Signed-off-by: Piotr Oniszczuk Signed-off-by: Jernej Skrabec Acked-by: Daniel Stone Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210605073534.3786194-1-jernej.skrabec@gmail.com commit 6800234ceee01416657b05efcf233f6bdc68272c Author: Maxime Ripard Date: Mon May 24 15:18:52 2021 +0200 drm/vc4: hdmi: Convert to gpiod The new gpiod interface takes care of parsing the GPIO flags and to return the logical value when accessing an active-low GPIO, so switching to it simplifies a lot the driver. Signed-off-by: Maxime Ripard Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210524131852.263883-2-maxime@cerno.tech commit e075a7811977ff51c917a65ed1896e08231d2615 Author: Maxime Ripard Date: Mon May 24 15:18:51 2021 +0200 drm/vc4: hdmi: Fix error path of hpd-gpios If the of_get_named_gpio_flags call fails in vc4_hdmi_bind, we jump to the err_unprepare_hsm label. That label will then call pm_runtime_disable and put_device on the DDC device. We just retrieved the DDC device, so the latter is definitely justified. However at that point we still haven't called pm_runtime_enable, so the call to pm_runtime_disable is not supposed to be there. Fixes: 10ee275cb12f ("drm/vc4: prepare for CEC support") Signed-off-by: Maxime Ripard Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210524131852.263883-1-maxime@cerno.tech commit 8f8e19bd18b41dae7a9192c29cba9298bafcde10 Author: Christian König Date: Mon Jun 7 12:39:10 2021 +0200 drm/ttm: fix missing res assignment in ttm_range_man_alloc That somehow got missing. Signed-off-by: Christian König Reported-by: Thomas Hellström Reviewed-by: Thomas Hellström Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated resources v2") Link: https://patchwork.freedesktop.org/patch/msgid/20210607104040.22017-1-christian.koenig@amd.com commit 5e787cdf0313182d9d9ebefdd261fa161ad365f6 Author: Jisheng Zhang Date: Mon Jun 7 18:10:15 2021 +0800 reset: berlin: support module build Make reset-berlin driver to be tristate module, support to build as a module, this is useful for GKI. Partially reverts commit ed4dba99cae8 ("reset: berlin: make it explicitly non-modular") Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20210607181015.5b8d3711@xhacker.debian Signed-off-by: Philipp Zabel commit e2cf17d3774c323ef6dab6e9f7c0cfc5e742afd9 Author: Florian Westphal Date: Fri Jun 4 12:27:07 2021 +0200 netfilter: add new hook nfnl subsystem This nfnl subsystem allows to dump the list of all active netfiler hooks, e.g. defrag, conntrack, nf/ip/arp/ip6tables and so on. This helps to see what kind of features are currently enabled in the network stack. Sample output from nft tool using this infra: $ nft list hook ip input family ip hook input { +0000000010 nft_do_chain_inet [nf_tables] # nft table firewalld INPUT +0000000100 nf_nat_ipv4_local_in [nf_nat] +2147483647 ipv4_confirm [nf_conntrack] } Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b5df5b8307b1db6d168ffac29eff3974779bb34b Author: Mark Rutland Date: Mon Jun 7 10:46:24 2021 +0100 arm64: idle: don't instrument idle code with KCOV The low-level idle code in arch_cpu_idle() and its callees runs at a time where where portions of the kernel environment aren't available. For example, RCU may not be watching, and lockdep state may be out-of-sync with the hardware. Due to this, it is not sound to instrument this code. We generally avoid instrumentation by marking the entry functions as `noinstr`, but currently this doesn't inhibit KCOV instrumentation. Prevent this by factoring these functions into a new idle.c so that we can disable KCOV for the entire compilation unit, as is done for the core idle code in kernel/sched/idle.c. We'd like to keep instrumentation of the rest of process.c, and for the existing code in cpuidle.c, so a new compilation unit is preferable. The arch_cpu_idle_dead() function in process.c is a cpu hotplug function that is safe to instrument, so it is left as-is in process.c. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-21-mark.rutland@arm.com Signed-off-by: Will Deacon commit bf6fa2c0dda751863c3446aa64d733013bec4a19 Author: Mark Rutland Date: Mon Jun 7 10:46:23 2021 +0100 arm64: entry: don't instrument entry code with KCOV The code in entry-common.c runs at exception entry and return boundaries, where portions of the kernel environment aren't available. For example, RCU may not be watching, and lockdep state may be out-of-sync with the hardware. Due to this, it is not sound to instrument this code. We generally avoid instrumentation by marking the entry functions as `noinstr`, but currently this doesn't inhibit KCOV instrumentation. Prevent this by disabling KCOV for the entire compilation unit. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-20-mark.rutland@arm.com Signed-off-by: Will Deacon commit 6ecbc78c3d06a3e7a4676f348a52f1c533d88464 Author: Mark Rutland Date: Mon Jun 7 10:46:22 2021 +0100 arm64: entry: make NMI entry/exit functions static Now that we only call arm64_enter_nmi() and arm64_exit_nmi() from within entry-common.c, let's make these static to ensure this remains the case. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-19-mark.rutland@arm.com Signed-off-by: Will Deacon commit d60b228fd19985a903b8e8c599be0538a875d505 Author: Mark Rutland Date: Mon Jun 7 10:46:21 2021 +0100 arm64: entry: split SDEI entry We'd like to keep all the entry sequencing in entry-common.c, as this will allow us to ensure this is consistent, and free from any unsound instrumentation. Currently __sdei_handler() performs the NMI entry/exit sequences in sdei.c. Let's split the low-level entry sequence from the event handling, moving the former to entry-common.c and keeping the latter in sdei.c. The event handling function is renamed to do_sdei_event(), matching the do_${FOO}() pattern used for other exception handlers. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-18-mark.rutland@arm.com Signed-off-by: Will Deacon commit 8168f098867f6584295ea408c683f61e945c6ff1 Author: Mark Rutland Date: Mon Jun 7 10:46:20 2021 +0100 arm64: entry: split bad stack entry We'd like to keep all the entry sequencing in entry-common.c, as this will allow us to ensure this is consistent, and free from any unsound instrumentation. Currently handle_bad_stack() performs the NMI entry sequence in traps.c. Let's split the low-level entry sequence from the reporting, moving the former to entry-common.c and keeping the latter in traps.c. To make it clear that reporting function never returns, it is renamed to panic_bad_stack(). Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-17-mark.rutland@arm.com Signed-off-by: Will Deacon commit afd05e28c9115d01f01d934962634789d069d3fe Author: Mark Rutland Date: Mon Jun 7 10:46:19 2021 +0100 arm64: entry: fold el1_inv() into el1h_64_sync_handler() An unexpected synchronous exception from EL1h could happen at any time, and for robustness we should treat this as an NMI, making minimal assumptions about the context the exception was taken from. Currently el1_inv() assumes we can use enter_from_kernel_mode(), and also assumes that we should inherit the original DAIF value. Neither of these are desireable when we take an unexpected exception. Further, after el1_inv() calls __panic_unhandled(), the remainder of the function is unreachable, and therefore superfluous. Let's address this and simplify things by having el1h_64_sync_handler() call __panic_unhandled() directly, without any of the redundant logic. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reported-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-16-mark.rutland@arm.com Signed-off-by: Will Deacon commit ec841aab8d3cdd23decdcf0c47292e14627446c1 Author: Mark Rutland Date: Mon Jun 7 10:46:18 2021 +0100 arm64: entry: handle all vectors with C We have 16 architectural exception vectors, and depending on kernel configuration we handle 8 or 12 of these with C code, with the remaining 8 or 4 of these handled as special cases in the entry assembly. It would be nicer if the entry assembly were uniform for all exceptions, and we deferred any specific handling of the exceptions to C code. This way the entry assembly can be more easily templated without ifdeffery or special cases, and it's easier to modify the handling of these cases in future (e.g. to dump additional registers other context). This patch reworks the entry code so that we always have a C handler for every architectural exception vector, with the entry assembly being completely uniform. We now have to handle exceptions from EL1t and EL1h, and also have to handle exceptions from AArch32 even when the kernel is built without CONFIG_COMPAT. To make this clear and to simplify templating, we rename the top-level exception handlers with a consistent naming scheme: asm: __ c: ___handler .. where: is `el1t`, `el1h`, or `el0t` is `64` or `32` is `sync`, `irq`, `fiq`, or `error` ... e.g. asm: el1h_64_sync c: el1h_64_sync_handler ... with lower-level handlers simply using "el1" and "compat" as today. For unexpected exceptions, this information is passed to __panic_unhandled(), so it can report the specific vector an unexpected exception was taken from, e.g. | Unhandled 64-bit el1t sync exception For vectors we never expect to enter legitimately, the C code is generated using a macro to avoid code duplication. The exceptions are handled via __panic_unhandled(), replacing bad_mode() (which is removed). The `kernel_ventry` and `entry_handler` assembly macros are updated to handle the new naming scheme. In theory it should be possible to generate the entry functions at the same time as the vectors using a single table, but this will require reworking the linker script to split the two into separate sections, so for now we have separate tables. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-15-mark.rutland@arm.com Signed-off-by: Will Deacon commit a5b43a87a7609d49ed4a453a2b99b6d36ab1e5d0 Author: Mark Rutland Date: Mon Jun 7 10:46:17 2021 +0100 arm64: entry: template the entry asm functions Now that the majority of the exception triage logic has been converted to C, the entry assembly functions all have a uniform structure. Let's generate them all with an assembly macro to reduce the amount of code and to ensure they all remain in sync if we make changes in future. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-14-mark.rutland@arm.com Signed-off-by: Will Deacon commit ca0c2647f54c34000b4026c6632268d2dc304c67 Author: Mark Rutland Date: Mon Jun 7 10:46:16 2021 +0100 arm64: entry: improve bad_mode() Our use of bad_mode() has a few rough edges: * AArch64 doesn't use the term "mode", and refers to "Execution states", "Exception levels", and "Selected stack pointer". * We log the exception type (SYNC/IRQ/FIQ/SError), but not the actual "mode" (though this can be decoded from the SPSR value). * We use bad_mode() as a second-level handler for unexpected synchronous exceptions, where the "mode" is legitimate, but the specific exception is not. * We dump the ESR value, but call this "code", and so it's not clear to all readers that this is the ESR. ... and all of this can be somewhat opaque to those who aren't extremely familiar with the code. Let's make this a bit clearer by having bad_mode() log "Unhandled ${TYPE} exception" rather than "Bad mode in ${TYPE} handler", using "ESR" rather than "code", and having the final panic() log "Unhandled exception" rather than "Bad mode". In future we'd like to log the specific architectural vector rather than just the type of exception, so we also split the core of bad_mode() out into a helper called __panic_unhandled(), which takes the vector as a string argument. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-13-mark.rutland@arm.com Signed-off-by: Will Deacon commit cbed5f8d3feb5ecc84c998b81db7e004b3fb2135 Author: Mark Rutland Date: Mon Jun 7 10:46:15 2021 +0100 arm64: entry: move bad_mode() to entry-common.c In subsequent patches we'll rework the way bad_mode() is called by exception entry code. In preparation for this, let's move bad_mode() itself into entry-common.c. Let's also mark it as noinstr (e.g. to prevent it being kprobed), and let's also make the `handler` array a local variable, as this is only use by bad_mode(), and will be removed entirely in a subsequent patch. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-12-mark.rutland@arm.com Signed-off-by: Will Deacon commit af541cbbf9c646d2eaa8b3ee3836d5b16435e848 Author: Mark Rutland Date: Mon Jun 7 10:46:14 2021 +0100 arm64: entry: consolidate EL1 exception returns Following the example of ret_to_user, let's consolidate all the EL1 return paths with a ret_to_kernel helper, rather than each entry point having its own copy of the return code. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-11-mark.rutland@arm.com Signed-off-by: Will Deacon commit e931fa03c6bf525babc9a41b951eb2311b055abb Author: Mark Rutland Date: Mon Jun 7 10:46:13 2021 +0100 arm64: entry: organise entry vectors consistently In subsequent patches we'll rename the entry handlers based on their original EL, register width, and exception class. To do so, we need to make all 3 mandatory arguments to the `kernel_ventry` macro, and distinguish EL1h from EL1t. In preparation for this, let's make the current set of arguments mandatory, and move the `regsize` column before the branch label suffix, making the vectors easier to read column-wise. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Marc Zyngier Acked-by: Catalin Marinas Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-10-mark.rutland@arm.com Signed-off-by: Will Deacon commit 2f2bbaa4eda027d0bf0f3f23d0c206b2b76e2180 Author: Mark Rutland Date: Mon Jun 7 10:46:12 2021 +0100 arm64: entry: organise entry handlers consistently In entry.S we have two comments which distinguish EL0 and EL1 exception handlers, but the code isn't actually laid out to match, and there are a few other inconsistencies that would be good to clear up. This patch organizes the entry handers consistently: * The handlers are laid out in order of the vectors, to make them easier to navigate. * The inconsistently-applied alignment is removed * The handlers are consistently marked with SYM_CODE_START_LOCAL() rather than SYM_CODE_START_LOCAL_NOALIGN(), giving them the same default alignment as other assembly code snippets. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-9-mark.rutland@arm.com Signed-off-by: Will Deacon commit 064dbfb4169141943ec7d9dbfd02974dd008f2ce Author: Mark Rutland Date: Mon Jun 7 10:46:11 2021 +0100 arm64: entry: convert IRQ+FIQ handlers to C For various reasons we'd like to convert the bulk of arm64's exception triage logic to C. As a step towards that, this patch converts the EL1 and EL0 IRQ+FIQ triage logic to C. Separate C functions are added for the native and compat cases so that in subsequent patches we can handle native/compat differences in C. Since the triage functions can now call arm64_apply_bp_hardening() directly, the do_el0_irq_bp_hardening() wrapper function is removed. Since the user_exit_irqoff macro is now unused, it is removed. The user_enter_irqoff macro is still used by the ret_to_user code, and cannot be removed at this time. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-8-mark.rutland@arm.com Signed-off-by: Will Deacon commit f8049488e7d37b0a0e438ee449e83b3e46958743 Author: Mark Rutland Date: Mon Jun 7 10:46:10 2021 +0100 arm64: entry: add a call_on_irq_stack helper When handling IRQ/FIQ exceptions the entry assembly may transition from a task's stack to a CPU's IRQ stack (and IRQ shadow call stack). In subsequent patches we want to migrate the IRQ/FIQ triage logic to C, and as we want to perform some actions on the task stack (e.g. EL1 preemption), we need to switch stacks within the C handler. So that we can do so, this patch adds a helper to call a function on a CPU's IRQ stack (and shadow stack as appropriate). Subsequent patches will make use of the new helper function. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-7-mark.rutland@arm.com Signed-off-by: Will Deacon commit 101a5b665dcdff169ae7ad90556604c483d9027e Author: Mark Rutland Date: Mon Jun 7 10:46:09 2021 +0100 arm64: entry: move NMI preempt logic to C Currently portions of our preempt logic are written in C while other parts are written in assembly. Let's clean this up a little bit by moving the NMI preempt checks to C. For now, the preempt count (and need_resched) checking is left in assembly, and will be converted with the body of the IRQ handler in subsequent patches. Other than the increased lockdep coverage there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-6-mark.rutland@arm.com Signed-off-by: Will Deacon commit 33a3581a76f3a36c7dcc9864120ce681bcfbcff1 Author: Mark Rutland Date: Mon Jun 7 10:46:08 2021 +0100 arm64: entry: move arm64_preempt_schedule_irq to entry-common.c Subsequent patches will pull more of the IRQ entry handling into C. To keep this in one place, let's move arm64_preempt_schedule_irq() into entry-common.c along with the other entry management functions. We no longer need to include in process.c, so the include directive is removed. There should be no functional change as a result of this patch. Reviewed-by Joey Gouly Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-5-mark.rutland@arm.com Signed-off-by: Will Deacon commit bb8e93a287a5f5f10fe7a9d8f612f6105c9622ef Author: Mark Rutland Date: Mon Jun 7 10:46:07 2021 +0100 arm64: entry: convert SError handlers to C For various reasons we'd like to convert the bulk of arm64's exception triage logic to C. As a step towards that, this patch converts the EL1 and EL0 SError triage logic to C. Separate C functions are added for the native and compat cases so that in subsequent patches we can handle native/compat differences in C. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit f7c706f0391d7894d1ae2d28cb2d5446f5ec59ad Author: Mark Rutland Date: Mon Jun 7 10:46:06 2021 +0100 arm64: entry: unmask IRQ+FIQ after EL0 handling For non-fatal exceptions taken from EL0, we expect that at some point during exception handling it is possible to return to a regular process context with all exceptions unmasked (e.g. as we do in do_notify_resume()), and we generally aim to unmask exceptions wherever possible. While handling SError and debug exceptions from EL0, we need to leave some exceptions masked during handling. Handling SError requires us to mask SError (which also requires masking IRQ+FIQ), and handing debug exceptions requires us to mask debug (which also requires masking SError+IRQ+FIQ). Once do_serror() or do_debug_exception() has returned, we no longer need to mask exceptions, and can unmask them all, which is what we did prior to commit: 9034f6251572a474 ("arm64: Do not enable IRQs for ct_user_exit") ... where we had to mask IRQs as for context_tracking_user_exit() expected IRQs to be masked. Since then, we realised that our context tracking wasn't entirely correct, and reworked the entry code to fix this. As of commit: 23529049c6842382 ("arm64: entry: fix non-NMI user<->kernel transitions") ... we replaced the call to context_tracking_user_exit() with a call to user_exit_irqoff() as part of enter_from_user_mode(), which occurs earlier, before we run the body of the handler and unmask exceptions in DAIF. When we return to userspace, we go via ret_to_user(), which masks exceptions in DAIF prior to calling user_enter_irqoff() as part of exit_to_user_mode(). Thus, there's no longer a reason to leave IRQs or FIQs masked at the end of the EL0 debug or error handlers, as neither the user exit context tracking nor the user entry context tracking requires this. Let's bring these into line with other EL0 exception handlers and ensure that IRQ and FIQ are unmasked in DAIF at some point during the handler. Signed-off-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 382dcdd66ce86491ddd390b39224468c82a47892 Author: Mark Rutland Date: Mon Jun 7 10:46:05 2021 +0100 arm64: remove redundant local_daif_mask() in bad_mode() Upon taking an exception, the CPU sets all the DAIF bits. We never clear any of these bits prior to calling bad_mode(), and bad_mode() itself never clears any of these bits, so there's no need to call local_daif_mask(). This patch removes the redundant call. Signed-off-by: Mark Rutland Acked-by: Marc Zyngier Acked-by: Catalin Marinas Reviewed-by: Joey Gouly Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20210607094624.34689-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 7b4b2fa37587394fb89fa51a4bea0820a1b37a5d Author: Florian Westphal Date: Fri Jun 4 12:27:06 2021 +0200 netfilter: annotate nf_tables base hook ops This will allow a followup patch to treat the 'ops->priv' pointer as nft_chain argument without having to first walk the table/chains to check if there is a matching base chain pointer. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1d91d2e1a7f767aa8c11d8507ecf268f787734ec Author: Oz Shlomo Date: Thu Jun 3 15:12:35 2021 +0300 netfilter: flowtable: Set offload timeouts according to proto values Currently the aging period for tcp/udp connections is hard coded to 30 seconds. Aged tcp/udp connections configure a hard coded 120/30 seconds pickup timeout for conntrack. This configuration may be too aggressive or permissive for some users. Dynamically configure the nf flow table GC timeout intervals according to the user defined values. Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit 975c57504da1114551fdb3a91ed61dda7739613e Author: Oz Shlomo Date: Thu Jun 3 15:12:34 2021 +0300 netfilter: conntrack: Introduce udp offload timeout configuration UDP connections may be offloaded from nf conntrack to nf flow table. Offloaded connections are aged after 30 seconds of inactivity. Once aged, ownership is returned to conntrack with a hard coded pickup time of 30 seconds, after which the connection may be deleted. eted. The current aging intervals may be too aggressive for some users. Provide users with the ability to control the nf flow table offload aging and pickup time intervals via sysctl parameter as a pre-step for configuring the nf flow table GC timeout intervals. Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit ef8ed5ea091bf21648d0c4c1fa4a962d079eab2b Author: Oz Shlomo Date: Thu Jun 3 15:12:33 2021 +0300 netfilter: conntrack: Introduce tcp offload timeout configuration TCP connections may be offloaded from nf conntrack to nf flow table. Offloaded connections are aged after 30 seconds of inactivity. Once aged, ownership is returned to conntrack with a hard coded pickup time of 120 seconds, after which the connection may be deleted. eted. The current aging intervals may be too aggressive for some users. Provide users with the ability to control the nf flow table offload aging and pickup time intervals via sysctl parameter as a pre-step for configuring the nf flow table GC timeout intervals. Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit 0418b989a467885292c294923dec66951c1c1398 Author: Pablo Neira Ayuso Date: Wed Jun 2 12:39:07 2021 +0200 netfilter: nftables: add nf_ct_pernet() helper function Consolidate call to net_generic(net, nf_conntrack_net_id) in this wrapper function. Signed-off-by: Pablo Neira Ayuso commit 670866512f971d6fdb9ef2dad19db97d400d1161 Author: Pablo Neira Ayuso Date: Mon May 31 00:08:11 2021 +0200 netfilter: nf_tables: remove nft_ctx_init_from_setattr() Replace nft_ctx_init_from_setattr() by nft_table_lookup(). This patch also disentangles nf_tables_delset() where NFTA_SET_TABLE is required while nft_ctx_init_from_setattr() allows it to be optional. From the nf_tables_delset() path, this also allows to set up the context structure when it is needed. Removing this helper function saves us 14 LoC, so it is not helping to consolidate code. Signed-off-by: Pablo Neira Ayuso commit e2b750d78b55d783f6ff4a1ab1e96f01e3e2ccfb Author: Pablo Neira Ayuso Date: Mon May 31 00:08:10 2021 +0200 netfilter: nf_tables: remove nft_ctx_init_from_elemattr() Replace nft_ctx_init_from_elemattr() by nft_table_lookup() and set up the context structure right before it is really needed. Moreover, nft_ctx_init_from_elemattr() is setting up the context structure for codepaths where this is not really needed at all. This helper function is also not helping to consolidate code, removing it saves us 4 LoC. Signed-off-by: Pablo Neira Ayuso commit ef4b65e53cc77e2b3ca4667b461047ad04fb45fa Author: Pablo Neira Ayuso Date: Mon May 31 00:08:09 2021 +0200 netfilter: nfnetlink: add struct nfgenmsg to struct nfnl_info and use it Update the nfnl_info structure to add a pointer to the nfnetlink header. This simplifies the existing codebase since this header is usually accessed. Update existing clients to use this new field. Signed-off-by: Pablo Neira Ayuso commit 23721c8e92f73f9f89e7362c50c2996a5c9ad483 Author: Mike Rapoport Date: Tue Jun 1 10:53:54 2021 +0300 x86/crash: Remove crash_reserve_low_1M() The entire memory range under 1M is unconditionally reserved in setup_arch(), so there is no need for crash_reserve_low_1M() anymore. Remove this function. Signed-off-by: Mike Rapoport Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210601075354.5149-4-rppt@kernel.org commit 65ffb3d69ed3da28af85b1e4b2aaacd6c13ba28b Author: Jan Kara Date: Mon May 31 18:42:58 2021 +0200 quota: Wire up quotactl_fd syscall Wire up the quotactl_fd syscall. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 64c2c2c62f92339b176ea24403d8db16db36f9e6 Author: Jan Kara Date: Tue May 25 16:07:48 2021 +0200 quota: Change quotactl_path() systcall to an fd-based one Some users have pointed out that path-based syscalls are problematic in some environments and at least directory fd argument and possibly also resolve flags are desirable for such syscalls. Rather than reimplementing all details of pathname lookup and following where it may eventually evolve, let's go for full file descriptor based syscall similar to how ioctl(2) works since the beginning. Managing of quotas isn't performance sensitive so the extra overhead of open does not matter and we are able to consume O_PATH descriptors as well which makes open cheap anyway. Also for frequent operations (such as retrieving usage information for all users) we can reuse single fd and in fact get even better performance as well as avoiding races with possible remounts etc. Tested-by: Sascha Hauer Acked-by: Christian Brauner Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit b249d97825ff461747421a5009794f395e99a032 Author: Claudiu Beznea Date: Tue Apr 6 17:11:52 2021 +0300 ARM: configs: at91_dt_defconfig: configs for sam9x60 Enable CONFIG_NO_HZ_IDLE and CONFIG_HIGH_RES_TIMERS=y to be used in conjunction with PIT64B present on SAM9X60. Signed-off-by: Claudiu Beznea Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20210406141152.10706-1-claudiu.beznea@microchip.com commit 1771a33b34421050c7b830f0a8af703178ba9d36 Author: Geert Uytterhoeven Date: Tue Jun 1 17:12:50 2021 +0200 arm64: dts: renesas: r8a779a0: Drop power-domains property from GIC node "make dtbs_check": arm64/boot/dts/renesas/r8a779a0-falcon.dt.yaml: interrupt-controller@f1000000: 'power-domains' does not match any of the regexes: '^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$', '^gic-its@', '^interrupt-controller@[0-9a-f]+$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml Remove the "power-domains" property, as the GIC on R-Car V3U is always-on, and not part of a clock domain. Fixes: 834c310f541839b6 ("arm64: dts: renesas: Add Renesas R8A779A0 SoC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/a9ae5cbc7c586bf2c6b18ddc665ad7051bd1d206.1622560236.git.geert+renesas@glider.be commit 479c700c6df222056d246e9fc4eeecd8e4ed1744 Author: Geert Uytterhoeven Date: Tue Jun 1 13:36:12 2021 +0200 arm64: dts: renesas: r8a77961: Add INTC-EX device node Populate the device node for the Interrupt Controller for External Devices (INTC-EX) on R-Car M3-W+, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/6f3cc1a1b6d777e743a7a9e66a80aaf9d5232a4f.1622547125.git.geert+renesas@glider.be commit 4fb26fb83f0def3d39c14e268bcd4003aae8fade Author: Philipp Zabel Date: Mon Jun 7 10:26:15 2021 +0200 reset: bail if try_module_get() fails Abort instead of returning a new reset control for a reset controller device that is going to have its module unloaded. Reported-by: Uwe Kleine-König Fixes: 61fc41317666 ("reset: Add reset controller API") Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210607082615.15160-1-p.zabel@pengutronix.de Signed-off-by: Philipp Zabel commit 91105ed604e4ea7075a35a1ef8bc1782d347290e Author: Wei Yongjun Date: Wed May 19 14:16:37 2021 +0000 reset: mchp: sparx5: fix return value check in mchp_sparx5_map_io() In case of error, the function devm_platform_get_and_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 453ed4283beb ("reset: mchp: sparx5: add switch reset driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210519141638.3052456-1-weiyongjun1@huawei.com Signed-off-by: Philipp Zabel commit 747aeec9ac0612fa107a6032d4e475112e8820fb Author: Yang Yingliang Date: Mon May 17 11:26:48 2021 +0800 reset: lantiq: use devm_reset_controller_register() Use devm_reset_controller_register() for the reset controller registration. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210517032648.2969609-1-yangyingliang@huawei.com Signed-off-by: Philipp Zabel commit 1a6a9044b96729abacede172d7591c714a5b81d1 Author: Mike Rapoport Date: Tue Jun 1 10:53:53 2021 +0300 x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options The CONFIG_X86_RESERVE_LOW build time and reservelow= command line option allowed to control the amount of memory under 1M that would be reserved at boot to avoid using memory that can be potentially clobbered by BIOS. Since the entire range under 1M is always reserved there is no need for these options anymore and they can be removed. Signed-off-by: Mike Rapoport Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210601075354.5149-3-rppt@kernel.org commit 0a5f38c81e500976781908e172b4e51ee427b4a9 Merge: 7ee0e638a526b 614124bea77e4 Author: Borislav Petkov Date: Mon Jun 7 11:02:30 2021 +0200 Merge tag 'v5.13-rc5' into x86/cleanups Pick up dependent changes in order to base further cleanups ontop. Signed-off-by: Borislav Petkov commit 6eed6a4bc05ec28f136f222df0a3fb37e57acc0f Author: Hao Fang Date: Tue Mar 30 14:50:44 2021 +0800 reset: hi6220: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Link: https://lore.kernel.org/r/1617087044-19572-1-git-send-email-fanghao11@huawei.com Signed-off-by: Philipp Zabel commit 41340965b4f8055f975f73e1e3d23eff8038f013 Merge: 9654c414bfdca aa5c8b2539280 Author: Jonathan Cameron Date: Mon Jun 7 09:20:02 2021 +0100 Merge branch 'ib-iio-i2c-5.13rc1' into togreg Adds a stub needed to resolve a build conflict for the fxls8962af driver. commit aa5c8b25392800bbefa82dd19eeff8ebbf261ace Author: Jonathan Cameron Date: Thu Jun 3 17:58:35 2021 +0100 i2c: core: Add stub for i2c_verify_client() if !CONFIG_I2C If I2C is not compiled, there is no way we should see a call to i2c_verify_client() on a device that is an i2c client. As such, provide a stub to return NULL to resolve an associated build failure. The build is failing with this link error ld: fxls8962af-core.o: in function `fxls8962af_fifo_transfer': fxls8962af-core.c: undefined reference to `i2c_verify_client' Reported-by: Tom Rix Signed-off-by: Jonathan Cameron Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads") Reviewed-by: Sean Nyekjaer Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20210603165835.3594557-1-jic23@kernel.org commit 161058fb899e83d1ee029311e4bb7b9387508815 Author: Lucas De Marchi Date: Sat Jun 5 21:50:50 2021 -0700 drm/i915: Add remaining conversions to GRAPHICS_VER For some reason coccinelle misses a few cases in header files with calls to INTEL_GEN()/IS_GEN(). Do a manual conversion for those. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210605155356.4183026-6-lucas.demarchi@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210606045050.103862-3-lucas.demarchi@intel.com commit 651e7d48577ae28572b9aa1807a1331d1cd2b61f Author: Lucas De Marchi Date: Sat Jun 5 21:50:49 2021 -0700 drm/i915: replace IS_GEN and friends with GRAPHICS_VER This was done by the following semantic patch: @@ expression i915; @@ - INTEL_GEN(i915) + GRAPHICS_VER(i915) @@ expression i915; expression E; @@ - INTEL_GEN(i915) >= E + GRAPHICS_VER(i915) >= E @@ expression dev_priv; expression E; @@ - !IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) != E @@ expression dev_priv; expression E; @@ - IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) == E @@ expression dev_priv; expression from, until; @@ - IS_GEN_RANGE(dev_priv, from, until) + IS_GRAPHICS_VER(dev_priv, from, until) @def@ expression E; identifier id =~ "^gen$"; @@ - id = GRAPHICS_VER(E) + ver = GRAPHICS_VER(E) @@ identifier def.id; @@ - id + ver It also takes care of renaming the variable we assign to GRAPHICS_VER() so to use "ver" rather than "gen". Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210606045050.103862-2-lucas.demarchi@intel.com commit a49a8717d8693b339fb2b62e5846286d6126de7d Author: Sergio Paracuellos Date: Fri Jun 4 13:51:59 2021 +0200 pinctrl: ralink: move RT288X SoC pinmux config into a new 'pinctrl-rt288x.c' file Move all related code for SoC RT288X into a new driver located in 'pinctrl-rt288x.c' source file. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604115159.8834-7-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 745ec436de7223fbe086be5123fe3014c4220611 Author: Sergio Paracuellos Date: Fri Jun 4 13:51:58 2021 +0200 pinctrl: ralink: move MT7620 SoC pinmux config into a new 'pinctrl-mt7620.c' file Move all related code for SoC MT7620 into a new driver located in 'pinctrl-mt7620.c' source file. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604115159.8834-6-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 3a1b0ca5a83b69f95ab9641ae0e77526a6fee384 Author: Sergio Paracuellos Date: Fri Jun 4 13:51:57 2021 +0200 pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' file Move all related code for SoC RT305X into a new driver located in 'pinctrl-rt305x.c' source file. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604115159.8834-5-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 8b8b0fa21dfa9e0222199b32e9c684d1aa2649af Author: Sergio Paracuellos Date: Fri Jun 4 13:51:56 2021 +0200 pinctrl: ralink: move RT3883 SoC pinmux config into a new 'pinctrl-rt3883.c' file Move all related code for SoC RT3883 into a new driver located in 'pinctrl-rt3883.c' source file Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604115159.8834-4-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit e98dd3db96f710b5545f313c9f364a306bb35c86 Author: Sergio Paracuellos Date: Fri Jun 4 13:51:55 2021 +0200 pinctrl: ralink: move MT7621 SoC pinmux config into a new 'pinctrl-mt7621.c' file Move all related code for SoC MT7621 into a new driver located in 'pinctrl-mt7621.c' source file. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604115159.8834-3-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 276e552e081c2db115319130511b55397d9695bd Author: Sergio Paracuellos Date: Fri Jun 4 13:51:54 2021 +0200 pinctrl: ralink: move ralink architecture pinmux header into the driver Ralink architecture is making use of the header located in 'arch/mips/include/asm/mach-ralink/pinmux.h' to stablish the mechanisms to make derived SoCs to set its pin functions and groups. In order to move all architecture pinmux into a more accurate place which is 'drivers/pinctrl/ralink' we have to first of all move this file also there with a small modification which creates 'rt2880_pinmux_init' function to allow SoCs pinctrl drivers to pass its configuration to the common code located in 'pinctrl-rt2880.c' file. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604115159.8834-2-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 8c987eb15aa6e397e2dba63246c4d8785f5c9f41 Author: Dario Binacchi Date: Wed Jun 2 17:04:20 2021 +0200 pinctrl: single: config: enable the pin's input It enables / disables the input buffer. As explained in the description of 'enum pin_config_param' this does not affect the pin's ability to drive output. Signed-off-by: Dario Binacchi Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20210602150420.18202-1-dariobin@libero.it Signed-off-by: Linus Walleij commit 375eede3e37797667850f10342d8ace6fb327553 Author: Linus Walleij Date: Mon Jun 7 08:56:20 2021 +0200 pinctrl: mtk: Fix mt8365 Kconfig dependency This SoC needs to select PINCTRL_MTK or we can end up in kernel compiles that miss some symbols. Cc: Fabien Parent Reported-by: kernel test robot Fixes: e94d8b6fb83a ("pinctrl: mediatek: add support for mt8365 SoC") Signed-off-by: Linus Walleij commit dd87684c7c9b82ad450cf063c58b4131074ad8f2 Author: Vishwanatha Subbanna Date: Mon Jun 7 12:42:59 2021 +0930 ARM: dts: aspeed: everest: Add pcie cable card indicator leds These are leds on the IBM proprietary PCIE cards called cable cards. Cable cards have 2 ports on them and each port has an indicator led. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210607031259.475020-7-joel@jms.id.au commit 2970264fb8aeb5d4e3bc02eb777c2a0e57cf063b Author: Vishwanatha Subbanna Date: Mon Jun 7 12:42:58 2021 +0930 ARM: dts: aspeed: everest: Add vrm and other indicator leds This commit adds indicator leds for vrms, processors, opencapi connectors, tpm, planar, power distribution card and dasd backplane and are driven by PIC16F882. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210607031259.475020-6-joel@jms.id.au commit 5b4673c847c30f5b266921daf53a9d009fca0685 Author: Vishwanatha Subbanna Date: Mon Jun 7 12:42:57 2021 +0930 ARM: dts: aspeed: everest: Add dimm indicator leds These are dimm indicator leds driven by PIC16F882. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210607031259.475020-5-joel@jms.id.au commit 66d8e7a296beec739a7120d6e01862eaf3660cf4 Author: Vishwanatha Subbanna Date: Mon Jun 7 12:42:56 2021 +0930 ARM: dts: aspeed: everest: Add pcie slot indicator leds These are pcie slot indicator leds driven by PCA9552. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210607031259.475020-4-joel@jms.id.au commit 793de4def91c67bed48b5b17e0ffa2a8e05e6ce2 Author: Vishwanatha Subbanna Date: Mon Jun 7 12:42:55 2021 +0930 ARM: dts: aspeed: everest: Add nvme and fan indicator leds These are the indicator leds for nvme slots and fans and are driven by PCA9552. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210607031259.475020-3-joel@jms.id.au commit c1e9c4a140fce442917106710ac58540f0f19ba8 Author: Vishwanatha Subbanna Date: Mon Jun 7 12:42:54 2021 +0930 ARM: dts: aspeed: everest: Add system level indicator leds These are the system level indicator leds that are driven by PCA9551 connected to the Operator Panel. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210607031259.475020-2-joel@jms.id.au commit 8bcac7448a942fa4662441a310c97d47cec24310 Author: Dave Chinner Date: Mon Jun 7 11:50:48 2021 +1000 xfs: merge xfs_buf_allocate_memory It only has one caller and is now a simple function, so merge it into the caller. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 170041f71596dad3f34dea40ee0ef0c848d3f906 Author: Christoph Hellwig Date: Mon Jun 7 11:50:47 2021 +1000 xfs: cleanup error handling in xfs_buf_get_map Use a single goto label for freeing the buffer and returning an error. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 289ae7b48c2c4d9bec515e720c01146498109dee Author: Dave Chinner Date: Mon Jun 7 11:50:17 2021 +1000 xfs: get rid of xb_to_gfp() Only used in one place, so just open code the logic in the macro. Based on a patch from Christoph Hellwig. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 934d1076bb2c5bbb3d5b0e3892b208d1f537949d Author: Christoph Hellwig Date: Mon Jun 7 11:50:00 2021 +1000 xfs: simplify the b_page_count calculation Ever since we stopped using the Linux page cache to back XFS buffers there is no need to take the start sector into account for calculating the number of pages in a buffer, as the data always start from the beginning of the buffer. Signed-off-by: Christoph Hellwig [dgc: modified to suit this series] Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 54cd3aa6f8102f4648190fc93eb5dd8603de9b52 Author: Christoph Hellwig Date: Mon Jun 7 11:49:50 2021 +1000 xfs: remove ->b_offset handling for page backed buffers ->b_offset can only be non-zero for _XBF_KMEM backed buffers, so remove all code dealing with it for page backed buffers. Signed-off-by: Christoph Hellwig [dgc: modified to fit this patchset] Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 897120d41e7afd9da435cb00041a142aeeb53c07 Author: Radim Pavlik Date: Tue Jun 1 10:48:18 2021 +0000 pinctrl: mcp23s08: fix race condition in irq handler Checking value of MCP_INTF in mcp23s08_irq suggests that the handler may be called even when there is no interrupt pending. But the actual interrupt could happened between reading MCP_INTF and MCP_GPIO. In this situation we got nothing from MCP_INTF, but the event gets acknowledged on the expander by reading MCP_GPIO. This leads to losing events. Fix the problem by not reading any register until we see something in MCP_INTF. The error was reproduced and fix tested on MCP23017. Signed-off-by: Radim Pavlik Link: https://lore.kernel.org/r/AM7PR06MB6769E1183F68DEBB252F665ABA3E9@AM7PR06MB6769.eurprd06.prod.outlook.com Signed-off-by: Linus Walleij commit c96d6abbec52d6723bef6b50846f40f7fb27e93c Author: Yang Yingliang Date: Wed May 19 13:04:55 2021 +0800 irqchip/mbigen: Fix compile warning when CONFIG_ACPI is disabled Fix the following compile warning: drivers/irqchip/irq-mbigen.c:372:36: warning: ‘mbigen_acpi_match’ defined but not used [-Wunused-const-variable=] static const struct acpi_device_id mbigen_acpi_match[] = { Signed-off-by: Yang Yingliang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210519050455.1693953-1-yangyingliang@huawei.com commit 4acd8a4be614a6c191273f2247aff7374a92f318 Author: Saravana Kannan Date: Tue May 18 21:19:21 2021 +0000 irqchip/qcom-pdc: Switch to IRQCHIP_PLATFORM_DRIVER and allow as a module This patch revives changes from Saravana Kannan to switch the qcom-pdc driver to use IRQCHIP_PLATFORM_DRIVER helper macros, and allows qcom-pdc driver to be loaded as a permanent module. Earlier attempts at this ran into trouble with loading dependencies, but with Saravana's fw_devlink=on set by default now we should avoid those. [jstultz: Folded in with my changes to allow the driver to be loadable as a permenent module] Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Saravana Kannan Signed-off-by: John Stultz Acked-by: Greg Kroah-Hartman Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210518211922.3474368-1-john.stultz@linaro.org commit e22808071d4d23596e6cc8f62588225515789031 Author: Geert Uytterhoeven Date: Tue Jun 1 13:31:55 2021 +0200 dt-bindings: irqchip: renesas-irqc: Add R-Car M3-W+ support Document support for the Interrupt Controller for External Devices (INT-EC) in the Renesas R-Car M3-W+ (r8a77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/55d2c30cb14b2e10193a7fd4aa7670c70f360037.1622546880.git.geert+renesas@glider.be commit 32ab5a5e97daf2cfbeeea0ea85484078c34d092c Merge: 32e92b71b32ad 2aa53d68cee66 Author: Marc Zyngier Date: Sun Jun 6 11:15:20 2021 +0100 Merge branch kvm-arm64/mmu/MMIO-block-mapping into kvmarm-master/next MMIO block mapping support from Keqian Zhu, allowing larger (and lazy) mappings for devices assigned to guests. * kvm-arm64/mmu/MMIO-block-mapping: KVM: arm64: Try stage2 block mapping for host device MMIO KVM: arm64: Remove the creation time's mapping of MMIO regions commit 32e92b71b32ad08e8d85aba6e10709b10f32d90a Merge: 8124c8a6b3538 b6ca556c35297 Author: Marc Zyngier Date: Sun Jun 6 11:15:11 2021 +0100 Merge branch kvm-arm64/m1 into kvmarm-master/next Rework the KVM GIC and timer to cope with lesser HW such as the Apple M1 SoC. * kvm-arm64/m1: irqchip/apple-aic: Advertise some level of vGICv3 compatibility KVM: arm64: timer: Add support for SW-based deactivation KVM: arm64: timer: Refactor IRQ configuration KVM: arm64: vgic: Implement SW-driven deactivation KVM: arm64: vgic: move irq->get_input_level into an ops structure KVM: arm64: vgic: Let an interrupt controller advertise lack of HW deactivation KVM: arm64: vgic: Be tolerant to the lack of maintenance interrupt masking KVM: arm64: Handle physical FIQ as an IRQ while running a guest irqchip/gic: Split vGIC probing information from the GIC code commit d3fae3b3daac09961ab871a25093b0ae404282d5 Author: Christian König Date: Wed Jun 2 13:01:15 2021 +0200 dma-buf: drop the _rcu postfix on function names v3 The functions can be called both in _rcu context as well as while holding the lock. v2: add some kerneldoc as suggested by Daniel v3: fix indentation Signed-off-by: Christian König Reviewed-by: Jason Ekstrand Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-7-christian.koenig@amd.com commit 6b41323a265a02b7af906c6d6fd93f6cddd7ac12 Author: Christian König Date: Wed Jun 2 12:44:32 2021 +0200 dma-buf: rename dma_resv_get_excl_rcu to _unlocked That describes much better what the function is doing here. Signed-off-by: Christian König Reviewed-by: Jason Ekstrand Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-6-christian.koenig@amd.com commit fb5ce730f21434d8100942cf1dbe1acda255fbeb Author: Christian König Date: Tue May 11 14:11:41 2021 +0200 dma-buf: rename and cleanup dma_resv_get_list v2 When the comment needs to state explicitly that this is doesn't get a reference to the object then the function is named rather badly. Rename the function and use it in even more places. v2: use dma_resv_shared_list as new name Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-5-christian.koenig@amd.com commit 6edbd6abb783d54f6ac4c3ed5cd9e50cff6c15e9 Author: Christian König Date: Mon May 10 16:14:09 2021 +0200 dma-buf: rename and cleanup dma_resv_get_excl v3 When the comment needs to state explicitly that this doesn't get a reference to the object then the function is named rather badly. Rename the function and use rcu_dereference_check(), this way it can be used from both rcu as well as lock protected critical sections. v2: improve kerneldoc as suggested by Daniel v3: use dma_resv_excl_fence as function name Signed-off-by: Christian König Acked-by: Daniel Vetter Reviewed-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-4-christian.koenig@amd.com commit 64584f329352bb7c6980c7fba608ad6239769642 Author: Takashi Sakamoto Date: Sun Jun 6 13:34:09 2021 +0900 ALSA: firewire-motu: add support for hybrid model of MOTU Ultralite mk3 This commit adds support for the hybrid model of MOTU Ultralite mk3 with alpha connector, which is already discontinued. The hardware specification of the model is the same as the one of FireWire-only model. $ cd linux-firewire-utils $ python3 src/crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04101573 bus_info_length 4, crc_length 16, crc 5491 404 31333934 bus_name "1394" 408 20ff7000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256) 40c 0001f200 company_id 0001f2 | 410 000a059c device_id 00000a059c | EUI-64 0001f200000a059c root directory ----------------------------------------------------------------- 414 0004ef04 directory_length 4, crc 61188 418 030001f2 vendor 41c 0c0083c0 node capabilities per IEEE 1394 420 d1000002 --> unit directory at 428 424 8d000005 --> eui-64 leaf at 438 unit directory at 428 ----------------------------------------------------------------- 428 0003f00b directory_length 3, crc 61451 42c 120001f2 specifier id 430 13000030 version 434 17103800 model eui-64 leaf at 438 ----------------------------------------------------------------- 438 0002d89c leaf_length 2, crc 55452 43c 0001f200 company_id 0001f2 | 440 000a059c device_id 00000a059c | EUI-64 0001f200000a059c Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210606043409.40019-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 987b705bd12cca98d4fbec20704e7a698fcbc068 Author: Takashi Sakamoto Date: Sun Jun 6 11:56:51 2021 +0900 ALSA: firewire-lib: remove useless operations for kernel preemption In all of drivers of ALSA firewire stack, the callback of .pointer and .ack in snd_pcm_ops structure is done in acquired spin_lock of PCM substream, therefore already under disabled kernel preemption. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210606025651.29970-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 8b6e219317480aa8457d9bd91dc2f4d8524bdba1 Author: Dan Carpenter Date: Sat Jun 5 15:46:39 2021 +0300 ALSA: firewire-lib: fix error codes for allocation failure Return -ENOMEM if kcalloc() fails. Currently the code returns success. Fixes: f9e5ecdfc2c2 ("ALSA: firewire-lib: add replay target to cache sequence of packet") Fixes: 6f24bb8a157c ("ALSA: firewire-lib: pool sequence of packet in IT context independently") Signed-off-by: Dan Carpenter Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/YLtyL4VoArwVLor1@mwanda Signed-off-by: Takashi Iwai commit d1f781db47a88c8889ca5c258a8f9448e201e430 Author: Felipe Balbi Date: Thu Jun 3 15:29:23 2021 +0300 arm64: dts: qcom: add initial device-tree for Microsoft Surface Duo Microsoft Surface Duo is based on SM8150 chipset. This new Device Tree is a copy of sm8150-mtp with a the addition of the volume up key and relevant i2c nodes. Signed-off-by: Felipe Balbi Link: https://lore.kernel.org/r/20210603122923.1919624-1-balbi@kernel.org Signed-off-by: Bjorn Andersson commit 636245a6b16d29202a60b8bd32b85809c5e53ab7 Author: Alex Elder Date: Tue May 19 07:32:58 2020 -0500 arm64: dts: qcom: sdm845-mtp: enable IPA Enable IPA on the SDM845 MTP. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20200519123258.29228-1-elder@linaro.org Signed-off-by: Bjorn Andersson commit 71208cd4b1ff7d8275e5154723b8f4e1a514fd9b Author: Sujit Kautkar Date: Wed Jun 2 12:13:41 2021 -0700 arm64: dts: qcom: sc7180: SD-card GPIO pin set bias-pull up Some SC7180 based boards do not have external pull-up for cd-gpio. Set this pin to internal pull-up for sleep config to avoid frequent regulator toggle events. Reviewed-by: Douglas Anderson Signed-off-by: Sujit Kautkar Link: https://lore.kernel.org/r/20210602121313.v3.2.I52f30ddfe62041b7e6c3c362f0ad8f695ac28224@changeid Signed-off-by: Bjorn Andersson commit c8d6f8e5307dd38be995648265086466bab6c397 Author: Sujit Kautkar Date: Wed Jun 2 12:13:39 2021 -0700 arm64: dts: qcom: sc7180: Move sdc pinconf to board specific DT files Move sdc1/sdc2 pinconf from SoC specific DT file to board specific DT files Reviewed-by: Douglas Anderson Signed-off-by: Sujit Kautkar Link: https://lore.kernel.org/r/20210602121313.v3.1.Ia83c80aec3b9535f01441247b6c3fb6f80b0ec7f@changeid Signed-off-by: Bjorn Andersson commit 5e57e5d0d62216502ce603f3399e411368e11a43 Author: Stephan Gerhold Date: Fri Jun 4 19:27:42 2021 +0200 arm64: dts: qcom: msm8916-samsung-a2015: Add NFC The Samsung Galaxy A3/A5 both have a Samsung S3FWRN5 NFC chip that works quite well with the s3fwrn5 driver in the Linux NFC subsystem. The clock setup for the NFC chip is a bit special (although this seems to be a common approach used for Qualcomm devices with NFC): The NFC chip has an output GPIO that is asserted whenever the clock is needed to function properly. On the A3/A5 this is wired up to PM8916 GPIO2, which is then configured with a special function (NFC_CLK_REQ or BB_CLK2_REQ). Enabling the rpmcc RPM_SMD_BB_CLK2_PIN clock will then instruct PM8916 to automatically enable the clock whenever the NFC chip requests it. The advantage is that the clock is only enabled when needed and we don't need to manage it ourselves from the NFC driver. Note that for some reason Samsung decided to connect the I2C pins to GPIOs where no hardware I2C bus is available, so we need to fall back to software bit-banging with i2c-gpio. Cc: Krzysztof Kozlowski Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210604172742.10593-5-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 0c04d16f4123f5eccc9f7e0199ce2e050261fd0f Author: Stephan Gerhold Date: Fri Jun 4 19:27:41 2021 +0200 arm64: dts: qcom: msm8916-samsung-a2015: Add rt5033 battery The Samsung Galaxy A3/A5 use a Richtek RT5033 PMIC as battery fuel gauge, charger, flash LED and for some regulators. For now, only add the fuel gauge/battery device to the device tree, so we can check the remaining battery percentage. The other RT5033 drivers need some more work first before they can be used properly. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210604172742.10593-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 410040777744aecd0b77659f43464f7ed86896a5 Author: Stephan Gerhold Date: Fri Jun 4 19:27:40 2021 +0200 arm64: dts: qcom: msm8916-samsung-a5u: Add touch key regulator On the Samsung Galaxy A5 the touch key is supplied by a single fixed regulator (enabled via GPIO 97) that supplies both MCU and LED. Add it to the device tree. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210604172742.10593-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 92b5c3975b3b582c6d558f74c65e3ff8b58d9dac Author: Michael Srba Date: Fri Jun 4 19:27:39 2021 +0200 arm64: dts: qcom: msm8916-samsung-a3u: Add touch key regulators The touch key MCU and LED is supplied by two separate fixed regulators that can be enabled through GPIO 86 and 60. Add them to the device tree. Signed-off-by: Michael Srba [stephan: extend commit message] Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210604172742.10593-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 61f363a625fcbff93171a271b898fcf37dd367c3 Author: Stephan Gerhold Date: Fri Jun 4 19:27:38 2021 +0200 arm64: dts: qcom: msm8916-samsung-a2015: Add touch key The Samsung Galaxy A3/A5 both have two capacitive touch keys, connected to an ABOV MCU. It implements the same interface as implemented by the tm2-touchkey driver and works just fine with the coreriver,tc360-touchkey compatible. It's probably actually some Samsung-specific interface that they implement with different MCUs. Note that for some reason Samsung decided to connect this to GPIOs where no hardware I2C bus is available, so we need to fall back to software bit-banging using i2c-gpio. The vdd/vcc-supply is board-specific and will be added separately for a3u/a5u. Co-developed-by: Michael Srba Signed-off-by: Michael Srba Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210604172742.10593-1-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit eb59cd3e39835d7a87d1e2cf4f5eb5f8ecd12bba Author: Matthias Kaehlcke Date: Thu Jun 3 08:12:34 2021 -0700 arm64: dts: qcom: pm6150: Add thermal zone for PMIC on-die temperature Add a thermal zone for the pm6150 on-die temperature. The system should try to shut down orderly when the temperature reaches the critical trip point at 115°C, otherwise the PMIC will perform a HW power off at 145°C. Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210603081215.v2.1.Id4510e9e4baaa3f6c9fdd5cdf4d8606e63c262e3@changeid Signed-off-by: Bjorn Andersson commit 83b41248ed04ac64a3aafc47be2b25bc1509e2f9 Author: Dmitry Torokhov Date: Sat Jun 5 17:05:59 2021 -0700 Input: cy8ctmg110_ts - switch to using gpiod API Instead of legacy gpio API let's use newer gpiod API. This also allows us to get rid of platform data. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 4e5220cb8e4bb8f0368e7a123c48ceb6b2f4a56d Author: Dmitry Torokhov Date: Sat Jun 5 17:05:43 2021 -0700 Input: cy8ctmg110_ts - switch to using managed resources This simplifies error handling paths and allows to get rid of cy8ctmg110_remove() method. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 1c68b7cfd1d4902e4e6802d18331b3ab96f124c9 Author: Dmitry Torokhov Date: Sat Jun 5 17:05:29 2021 -0700 Input: cy8ctmg110_ts - use endian helpers when converting data on wire Switch to using be16_to_cpup() instead of shifting and combining data by hand. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 172b07a6ead345b625af7e5f147ec64fbd256f79 Author: Dmitry Torokhov Date: Sat Jun 5 17:05:00 2021 -0700 Input: cy8ctmg110_ts - let I2C core configure wake interrupt I2C core already configures interrupt as wakeup source when device is registered using I2C_CLIENT_WAKE flag, so let's rely on it instead of configuring it ourselves. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 2a15cebb8b40ef55d3a565b9acaec21791cb7e37 Author: Dmitry Torokhov Date: Sat Jun 5 17:04:49 2021 -0700 Input: cy8ctmg110_ts - do not hardcode as wakeup source Let platform specify whether the controller should be a wakeup source by registering as I2C_CLIENT_WAKE. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 9a9b1a7b2b08aa64d2876e48f51c7fbbebd5723c Author: Dmitry Torokhov Date: Sat Jun 5 17:04:39 2021 -0700 Input: cy8ctmg110_ts - do not hard code interrupt trigger Rely on the platform to set up interrupt polarity/type properly instead of hard-coding falling edge. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 6abee582034c123d995cd454a1ccdcf0b8699da0 Author: Dmitry Torokhov Date: Sat Jun 5 17:04:25 2021 -0700 Input: cy8ctmg110_ts - rely on platform code to supply interrupt Instead of using platform data to specify GPIO that is used as interrupt source, rely on the platform and I2C core to set it up properly. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210603043726.3793876-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 605a5e41db7d8c930fb80115686991c4c1d08ee4 Author: Dan Williams Date: Thu May 27 18:39:11 2021 -0700 cxl/pci: Fixup devm_cxl_iomap_block() to take a 'struct device *' The expectation is that devm functions take 'struct device *' and pci functions take 'struct pci_dev *'. Swap out the @pdev argument for @dev and fixup related helpers. Cc: Ira Weiny Reviewed-by: Ira Weiny Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/162216592374.3833641.13281743585064451514.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 08422378c4adacf528d573bb1631d4818f8f9a01 Author: Ben Widawsky Date: Thu May 27 17:49:22 2021 -0700 cxl/pci: Add HDM decoder capabilities An HDM decoder is defined in the CXL 2.0 specification as a mechanism that allow devices and upstream ports to claim memory address ranges and participate in interleave sets. HDM decoder registers are within the component register block defined in CXL 2.0 8.2.3 CXL 2.0 Component Registers as part of the CXL.cache and CXL.mem subregion. The Component Register Block is found via the Register Locator DVSEC in a similar fashion to how the CXL Device Register Block is found. The primary difference is the capability id size of the Component Register Block is a single DWORD instead of 4 DWORDS. It's now possible to configure a CXL type 3 device's HDM decoder. Such programming is expected for CXL devices with persistent memory, and hot plugged CXL devices that participate in CXL.mem with volatile memory. Add probe and mapping functions for the component register blocks. Reviewed-by: Jonathan Cameron Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny Co-developed-by: Vishal Verma Signed-off-by: Vishal Verma Signed-off-by: Ben Widawsky Link: https://lore.kernel.org/r/20210528004922.3980613-6-ira.weiny@intel.com Signed-off-by: Dan Williams commit 9a016527dcb71e2ecadfeacf52122a79b428790c Author: Ira Weiny Date: Thu Jun 3 17:53:16 2021 -0700 cxl/pci: Reserve individual register block regions Some hardware implementations mix component and device registers into the same BAR and the driver stack is going to need independent mapping implementations for those 2 cases. Furthermore, it will be nice to have finer grained mappings should user space want to map some register blocks. Now that individual register blocks are mapped; those blocks regions should be reserved individually to fully separate the register blocks. Release the 'global' memory reservation and create individual register block region reservations through devm. NOTE: pci_release_mem_regions() is still compatible with pcim_enable_device() because it removes the automatic region release when called. So preserve the pcim_enable_device() so that the pcim interface can be called if needed. Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20210604005316.4187340-1-ira.weiny@intel.com Signed-off-by: Dan Williams commit 30af97296f48d84bc4a6abbaabb92c796a84ca57 Author: Ira Weiny Date: Thu Jun 3 17:50:36 2021 -0700 cxl/pci: Map registers based on capabilities The information required to map registers based on capabilities is contained within the bars themselves. This means the bar must be mapped to read the information needed and then unmapped to map the individual parts of the BAR based on capabilities. Change cxl_setup_device_regs() to return a new cxl_register_map, change the name to cxl_probe_device_regs(). Allocate and place cxl_register_maps on a list while processing all of the specified register blocks. After probing all the register blocks go back and map smaller registers blocks based on their capabilities and dispose of the cxl_register_maps. NOTE: pci_iomap() is not managed automatically via pcim_enable_device() so be careful to call pci_iounmap() correctly. Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20210604005036.4187184-1-ira.weiny@intel.com Signed-off-by: Dan Williams commit f8a7e8c29be873b90fcc426e93bdb6184df5970e Author: Ira Weiny Date: Thu May 27 17:49:19 2021 -0700 cxl/pci: Reserve all device regions at once In order to remap individual register sets each bar region must be reserved prior to mapping. Because the details of individual register sets are contained within the BARs themselves, the bar must be mapped 2 times, once to extract this information and a second time for each register set. Rather than attempt to reserve each BAR individually and track if that bar has been reserved. Open code pcim_iomap_regions() by first reserving all memory regions on the device and then mapping the bars individually as needed. NOTE pci_request_mem_regions() does not need a corresponding pci_release_mem_regions() because the pci device is managed via pcim_enable_device(). Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20210528004922.3980613-3-ira.weiny@intel.com Signed-off-by: Dan Williams commit 07d62eac422c5c8aec6ec1dacdc27423334b2d17 Author: Ira Weiny Date: Thu May 27 17:49:18 2021 -0700 cxl/pci: Introduce cxl_decode_register_block() Each register block located in the DVSEC needs to be decoded from 2 words, 'register offset high' and 'register offset low'. Create a function, cxl_decode_register_block() to perform this decode and return the bar, offset, and register type of the register block. Then use the values decoded in cxl_mem_map_regblock() instead of passing the raw registers. Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20210528004922.3980613-2-ira.weiny@intel.com Signed-off-by: Dan Williams commit 6cdc1ef84eacca85642828840f2ec4f84130c9b6 Author: Colin Ian King Date: Sat Jun 5 16:09:36 2021 -0700 Input: resistive-adc-touch - fix uninitialized variable 'press' In the case where st->ch_map[GRTS_CH_PRESSURE] < GRTS_MAX_CHANNELS is false and also st->ch_map[GRTS_CH_Z1] < GRTS_MAX_CHANNELS is false the variable press is not initialized and contains garbage. In this situation st->pressure is also false, so we do not actually use press value, but it is impossible for the compiler to realize this, and it emits "uninitialized variable" warning. Fix this by initializing press to 0 and allows us to also remove an else clause that sets press to 0. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 60b7db914ddd ("Input: resistive-adc-touch - rework mapping of channels") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210603220809.155118-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit 40e1956ec505a1aba96f9d202308a1ece87b6b93 Author: Lucas De Marchi Date: Sat Jun 5 08:53:54 2021 -0700 drm/i915/gem: replace IS_GEN and friends with GRAPHICS_VER This was done by the following semantic patch: @@ expression i915; @@ - INTEL_GEN(i915) + GRAPHICS_VER(i915) @@ expression i915; expression E; @@ - INTEL_GEN(i915) >= E + GRAPHICS_VER(i915) >= E @@ expression dev_priv; expression E; @@ - !IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) != E @@ expression dev_priv; expression E; @@ - IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) == E @@ expression dev_priv; expression from, until; @@ - IS_GEN_RANGE(dev_priv, from, until) + IS_GRAPHICS_VER(dev_priv, from, until) @def@ expression E; identifier id =~ "^gen$"; @@ - id = GRAPHICS_VER(E) + ver = GRAPHICS_VER(E) @@ identifier def.id; @@ - id + ver It also takes care of renaming the variable we assign to GRAPHICS_VER() so to use "ver" rather than "gen". Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210605155356.4183026-4-lucas.demarchi@intel.com commit fa20cbddd3fec22b8225211487b45bfb0ae9af22 Author: Lucas De Marchi Date: Sat Jun 5 08:53:53 2021 -0700 drm/i915/gt: Add remaining conversions to GRAPHICS_VER For some reason coccinelle misses a few cases in gt with calls to INTEL_GEN()/IS_GEN(). Do a manual conversion for those. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210605155356.4183026-3-lucas.demarchi@intel.com commit c816723b6b8a627c2edafc8bcc8062017323d031 Author: Lucas De Marchi Date: Sat Jun 5 08:53:52 2021 -0700 drm/i915/gt: replace IS_GEN and friends with GRAPHICS_VER This was done by the following semantic patch: @@ expression i915; @@ - INTEL_GEN(i915) + GRAPHICS_VER(i915) @@ expression i915; expression E; @@ - INTEL_GEN(i915) >= E + GRAPHICS_VER(i915) >= E @@ expression dev_priv; expression E; @@ - !IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) != E @@ expression dev_priv; expression E; @@ - IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) == E @@ expression dev_priv; expression from, until; @@ - IS_GEN_RANGE(dev_priv, from, until) + IS_GRAPHICS_VER(dev_priv, from, until) @def@ expression E; identifier id =~ "^gen$"; @@ - id = GRAPHICS_VER(E) + ver = GRAPHICS_VER(E) @@ identifier def.id; @@ - id + ver It also takes care of renaming the variable we assign to GRAPHICS_VER() so to use "ver" rather than "gen". Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210605155356.4183026-2-lucas.demarchi@intel.com commit faf65dde844affa9e360ccaa4bd231c2a04b87ea Author: Roman Gushchin Date: Wed Jun 2 18:09:31 2021 -0700 percpu: rework memcg accounting The current implementation of the memcg accounting of the percpu memory is based on the idea of having two separate sets of chunks for accounted and non-accounted memory. This approach has an advantage of not wasting any extra memory for memcg data for non-accounted chunks, however it complicates the code and leads to a higher chunks number due to a lower chunk utilization. Instead of having two chunk types it's possible to declare all* chunks memcg-aware unless the kernel memory accounting is disabled globally by a boot option. The size of objcg_array is usually small in comparison to chunks themselves (it obviously depends on the number of CPUs), so even if some chunk will have no accounted allocations, the memory waste isn't significant and will likely be compensated by a higher chunk utilization. Also, with time more and more percpu allocations will likely become accounted. * The first chunk is initialized before the memory cgroup subsystem, so we don't know for sure whether we need to allocate obj_cgroups. Because it's small, let's make it free for use. Then we don't need to allocate obj_cgroups for it. Signed-off-by: Roman Gushchin Signed-off-by: Dennis Zhou commit 4d5c8aedc8aa6a1f5d1b06eb4f5517dc60dd9440 Author: Roman Gushchin Date: Wed Jun 2 18:09:30 2021 -0700 mm, memcg: introduce mem_cgroup_kmem_disabled() Introduce a new mem_cgroup_kmem_disabled() helper, similar to mem_cgroup_disabled(), to check whether the kernel memory accounting is off. A user could disable it using a boot option to eliminate some associated costs. The helper can be used outside of memcontrol.c to dynamically disable the kmem-related code. The returned value is stable after the kernel initialization is finished. Signed-off-by: Roman Gushchin Signed-off-by: Dennis Zhou commit 0f0cace35fa655d383b64b4fce83a44d530c9aaf Author: Roman Gushchin Date: Wed Jun 2 18:09:29 2021 -0700 mm, memcg: mark cgroup_memory_nosocket, nokmem and noswap as __ro_after_init cgroup_memory_nosocket, cgroup_memory_nokmem and cgroup_memory_noswap are initialized during the kernel initialization and never change their value afterwards. cgroup_memory_nosocket, cgroup_memory_nokmem are written only from cgroup_memory(), which is marked as __init. cgroup_memory_noswap is written from setup_swap_account() and mem_cgroup_swap_init(), both are marked as __init. Mark all three variables as __ro_after_init. Signed-off-by: Roman Gushchin Signed-off-by: Dennis Zhou commit c7c90e121e992eefdf07945e5a6e9cf097b29463 Author: Bjorn Helgaas Date: Tue Jun 1 16:31:43 2021 -0500 kconfig.h: explain IS_MODULE(), IS_ENABLED() Extend IS_MODULE() and IS_ENABLED comments to explain why one might use "#if IS_ENABLED(CONFIG_FOO)" instead of "#ifdef CONFIG_FOO". To wit, "#ifdef CONFIG_FOO" is true only for CONFIG_FOO=y, while "#if IS_ENABLED(CONFIG_FOO)" is true for both CONFIG_FOO=y and CONFIG_FOO=m. This is because "CONFIG_FOO=m" in .config does not result in "CONFIG_FOO" being defined. The actual definitions are in autoconf.h, where: CONFIG_FOO=y results in #define CONFIG_FOO 1 CONFIG_FOO=m results in #define CONFIG_FOO_MODULE 1 Signed-off-by: Bjorn Helgaas Acked-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit 43ac711053fc6d94a3f16141c4efe20059a9d918 Author: Masahiro Yamada Date: Sat May 29 02:13:21 2021 +0900 kconfig: constify long_opts getopt_long() does not modify the long_opts structure. Signed-off-by: Masahiro Yamada commit 745f260b77e5e9de4f756d4a7cda510c616bb279 Author: Werner Sembach Date: Fri Jun 4 16:02:07 2021 +0200 ALSA: hda/realtek: Change device names for quirks to barebone names Change the name string of several devices needing quirks to the Clevo-barebone ones. Also make the names follow the same pattern for multiple Clevo names referring to the same mainboard. Signed-off-by: Werner Sembach Link: https://lore.kernel.org/r/20210604140207.8023-1-wse@tuxedocomputers.com Signed-off-by: Takashi Iwai commit 415f6767d80761997f6dbe8b72864ca5eb3ddf40 Author: Christian König Date: Fri Jun 4 17:47:39 2021 +0200 dma-buf: add missing EXPORT_SYMBOL The newly added dma_resv_reset_shared_max() is used from an inline function, so it can appear in drivers as well. Signed-off-by: Christian König Acked-by: Alex Deucher Reviewed-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20210604155228.616679-1-christian.koenig@amd.com commit a4d7e8ae4a541557d7a2c815835b786c18c3613c Author: Michael Kelley Date: Wed Jun 2 14:36:44 2021 -0700 Drivers: hv: Move Hyper-V extended capability check to arch neutral code The extended capability query code is currently under arch/x86, but it is architecture neutral, and is used by arch neutral code in the Hyper-V balloon driver. Hence the balloon driver fails to build on other architectures. Fix by moving the ext cap code out from arch/x86. Because it is also called from built-in architecture specific code, it can't be in a module, so the Makefile treats as built-in even when CONFIG_HYPERV is "m". Also drivers/Makefile is tweaked because this is the first occurrence of a Hyper-V file that is built-in even when CONFIG_HYPERV is "m". While here, update the hypercall status check to use the new helper function instead of open coding. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Sunil Muthuswamy Link: https://lore.kernel.org/r/1622669804-2016-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 2fc2b430f559fdf32d5d1dd5ceaa40e12fb77bdf Author: Eric Biggers Date: Sat Jun 5 00:50:33 2021 -0700 fscrypt: fix derivation of SipHash keys on big endian CPUs Typically, the cryptographic APIs that fscrypt uses take keys as byte arrays, which avoids endianness issues. However, siphash_key_t is an exception. It is defined as 'u64 key[2];', i.e. the 128-bit key is expected to be given directly as two 64-bit words in CPU endianness. fscrypt_derive_dirhash_key() and fscrypt_setup_iv_ino_lblk_32_key() forgot to take this into account. Therefore, the SipHash keys used to index encrypted+casefolded directories differ on big endian vs. little endian platforms, as do the SipHash keys used to hash inode numbers for IV_INO_LBLK_32-encrypted directories. This makes such directories non-portable between these platforms. Fix this by always using the little endian order. This is a breaking change for big endian platforms, but this should be fine in practice since these features (encrypt+casefold support, and the IV_INO_LBLK_32 flag) aren't known to actually be used on any big endian platforms yet. Fixes: aa408f835d02 ("fscrypt: derive dirhash key for casefolded directories") Fixes: e3b1078bedd3 ("fscrypt: add support for IV_INO_LBLK_32 policies") Cc: # v5.6+ Link: https://lore.kernel.org/r/20210605075033.54424-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 77f30bfcfcf484da7208affd6a9e63406420bf91 Author: Eric Biggers Date: Thu May 27 16:52:36 2021 -0700 fscrypt: don't ignore minor_hash when hash is 0 When initializing a no-key name, fscrypt_fname_disk_to_usr() sets the minor_hash to 0 if the (major) hash is 0. This doesn't make sense because 0 is a valid hash code, so we shouldn't ignore the filesystem-provided minor_hash in that case. Fix this by removing the special case for 'hash == 0'. This is an old bug that appears to have originated when the encryption code in ext4 and f2fs was moved into fs/crypto/. The original ext4 and f2fs code passed the hash by pointer instead of by value. So 'if (hash)' actually made sense then, as it was checking whether a pointer was NULL. But now the hashes are passed by value, and filesystems just pass 0 for any hashes they don't have. There is no need to handle this any differently from the hashes actually being 0. It is difficult to reproduce this bug, as it only made a difference in the case where a filename's 32-bit major hash happened to be 0. However, it probably had the largest chance of causing problems on ubifs, since ubifs uses minor_hash to do lookups of no-key names, in addition to using it as a readdir cookie. ext4 only uses minor_hash as a readdir cookie, and f2fs doesn't use minor_hash at all. Fixes: 0b81d0779072 ("fs crypto: move per-file encryption from f2fs tree to fs/crypto") Cc: # v4.6+ Link: https://lore.kernel.org/r/20210527235236.2376556-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 07960a4cc44ff6f51eacd3a5c2935e73cebbceca Author: Lucas De Marchi Date: Thu Jun 3 09:54:28 2021 -0700 drm/i915/display: replace IS_GEN() in commented code Since we are replacing IS_GEN() with GRAPHICS_VER(), make sure we take care of the comments as well. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210603165428.3625495-8-lucas.demarchi@intel.com commit d8d123128c48721f8bcbd4700951f4cde723a0da Author: Lucas De Marchi Date: Thu Jun 3 09:54:25 2021 -0700 drm/i915/gvt: replace IS_GEN and friends with GRAPHICS_VER This was done by the following semantic patch: @@ expression i915; @@ - INTEL_GEN(i915) + GRAPHICS_VER(i915) @@ expression i915; expression E; @@ - INTEL_GEN(i915) >= E + GRAPHICS_VER(i915) >= E @@ expression dev_priv; expression E; @@ - !IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) != E @@ expression dev_priv; expression E; @@ - IS_GEN(dev_priv, E) + GRAPHICS_VER(dev_priv) == E @@ expression dev_priv; expression from, until; @@ - IS_GEN_RANGE(dev_priv, from, until) + IS_GRAPHICS_VER(dev_priv, from, until) @def@ expression E; identifier id =~ "^gen$"; @@ - id = GRAPHICS_VER(E) + ver = GRAPHICS_VER(E) @@ identifier def.id; @@ - id + ver It also takes care of renaming the variable we assign to GRAPHICS_VER() so to use "ver" rather than "gen". Cc: intel-gvt-dev@lists.freedesktop.org Cc: Zhenyu Wang Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210603165428.3625495-5-lucas.demarchi@intel.com commit 40e67c120093a918037b6ec589bafd5d96b522a3 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:10 2020 -0600 rxrpc: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Jeffrey Altman Signed-off-by: Gustavo A. R. Silva commit 67c54655b6550c8e1d0f3213991257e9145dfb39 Author: Zhen Lei Date: Tue Jun 1 14:22:23 2021 +0800 of: unittest: Use DEFINE_RES_MEM() to simplify code No functional change. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210601062223.9724-1-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 7cb32edb05d5ffa31cbe8f01e11e7b6aaea7ec3c Author: Geert Uytterhoeven Date: Thu May 27 21:39:52 2021 +0200 dt-bindings: usb: cdns,usb3: Fix interrupts order Correct the order of the descriptions for the "interrupts" property to match the order of the "interrupt-names" property. Fixes: 68989fe1c39d9b32 ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema") Signed-off-by: Geert Uytterhoeven Acked-by: Peter Chen Acked-by: Peter Chen Link: https://lore.kernel.org/r/20210527193952.1705127-1-geert@linux-m68k.org Signed-off-by: Rob Herring commit 8acd12dadc20ec7bffc138c510d9e816143d6755 Author: Hao Fang Date: Sat May 22 18:23:17 2021 +0800 dt-bindings: hisilicon: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to the official website https://www.hisilicon.com/en. Signed-off-by: Hao Fang Link: https://lore.kernel.org/r/1621678997-15240-1-git-send-email-fanghao11@huawei.com Signed-off-by: Rob Herring commit 0daa6056476ebe4ede2f4cce906508937193077d Author: Sudeep Holla Date: Fri Jun 4 21:57:10 2021 +0100 dt-bindings: mailbox : arm,mhuv2: Use example with matching schema Currently the example provided in arm,mhuv2 schema complains as below: Documentation/devicetree/bindings/mailbox/arm,mhuv2.example.dt.yaml :0:0: /example-0/soc/scb@2e000000: failed to match any schema with compatible: ['fujitsu,mb86s70-scb-1.0'] Fix it by using an example with a matching schema that makes use of 4 mailboxes that is well suited to demonstrate Rx and Tx channels with both doorbell and data transfer protocols. Cc: Rob Herring Cc: Viresh Kumar Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210604205710.1944363-7-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 3a32f22cc21fd525c786a7f3d78497cd7a703b34 Author: Sudeep Holla Date: Fri Jun 4 21:57:09 2021 +0100 dt-bindings: mailbox : arm,mhu: Use examples with matching schema Currently the example provided in arm,mhu schema complains as below: Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml :0:0: /example-0/soc/scb@2e000000: failed to match any schema with compatible: ['fujitsu,mb86s70-scb-1.0'] Fix the same using examples based on Juno platform. The old SCPI firmware used MHU with standard 32-bit data transfer protocol while the new SCMI firmware uses MHU and expects to be used in doorbell mode. Update example with SCPI and SCMI firmware nodes to demonstrate both 32-bit data transfer and doorbell mode of MHU operations Cc: Rob Herring Cc: Viresh Kumar Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210604205710.1944363-6-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 61b8ac9bf89da2bf730d4b1410592b5b46243034 Author: Sudeep Holla Date: Fri Jun 4 21:57:08 2021 +0100 dt-bindings: firmware: arm,scmi: Convert to json schema Convert the old text format binding for System Control and Management Interface (SCMI) Message Protocol into the new and shiny YAML format. Cc: Cristian Marussi Cc: Florian Fainelli Cc: Jim Quinlan Cc: Etienne Carriere Cc: Peter Hilber Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210604205710.1944363-5-sudeep.holla@arm.com [robh: Rework interrupts schema and if/then] Signed-off-by: Rob Herring commit 01c70dfaa509b085fe7c94f08d24a26297f59281 Author: Sudeep Holla Date: Fri Jun 4 21:57:07 2021 +0100 dt-bindings: firmware: amlogic,scpi: Convert to json schema Convert/merge the existing text format SCPI binding additions for amlogic,scpi into the common arm,scpi json scheme. Couple of things to note: "amlogic,meson-gxbb-scpi" is always used with "arm,scpi-pre-1.0" and "amlogic,meson-gxbb-scpi-sensors" is used always with "arm,scpi-sensors" Cc: Rob Herring Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210604205710.1944363-4-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 1496be7194687a2e1027f6d04fde7b8a1c82137a Author: Sudeep Holla Date: Fri Jun 4 21:57:06 2021 +0100 dt-bindings: firmware: arm,scpi: Convert to json schema Convert the old text format binding for System Control and Power Interface (SCPI) Message Protocol into the new and shiny YAML format. Cc: Rob Herring Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Viresh Kumar Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210604205710.1944363-3-sudeep.holla@arm.com [robh: Move fixed strings to 'properties', drop some literal block notations] Signed-off-by: Rob Herring commit e837220a27befd9c215dee9de1f64696bdc41f74 Author: Sudeep Holla Date: Fri Jun 4 21:57:05 2021 +0100 dt-bindings: mailbox : arm,mhu: Fix arm,scpi example used here Once the arm,scpi binding is converted to YAML format, the following errors will be seen when doing `make DT_CHECKER_FLAGS=-m dt_binding_check` From schema: Documentation/devicetree/bindings/firmware/arm,scpi.yaml Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml: scpi@2f000000: $nodename:0: 'scpi' was expected Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml: scpi@2f000000: reg: [[0, 788529152, 0, 512]] is not of type 'object' Documentation/devicetree/bindings/mailbox/arm,mhu.example.dt.yaml: scpi@2f000000: 'shmem' is a required property Fix those error following the SCPI bindings. Cc: Rob Herring Cc: Viresh Kumar Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210604205710.1944363-2-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 1a42624aecba438f1d114430a14b640cdfa51c87 Author: George McCollister Date: Fri Jun 4 11:29:22 2021 -0500 net: dsa: xrs700x: allow HSR/PRP supervision dupes for node_table Add an inbound policy filter which matches the HSR/PRP supervision MAC range and forwards to the CPU port without discarding duplicates. This is required to correctly populate time_in[A] and time_in[B] in the HSR/PRP node_table. Leave the policy disabled by default and enable/disable it when joining/leaving hsr. Signed-off-by: George McCollister Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit d5a73dcf09010f97ebdff197991f77eb9992f09e Author: Íñigo Huguet Date: Fri Jun 4 13:36:33 2021 +0200 net:cxgb3: fix incorrect work cancellation In my last changes in commit 5e0b8928927f I introduced a copy-paste bug, leading to cancel twice qresume_task work for OFLD queue, and never the one for CTRL queue. This patch cancels correctly both works. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit fcb34635854a5a5814227628867ea914a9805384 Author: Horatiu Vultur Date: Fri Jun 4 12:37:47 2021 +0200 net: bridge: mrp: Update ring transitions. According to the standard IEC 62439-2, the number of transitions needs to be counted for each transition 'between' ring state open and ring state closed and not from open state to closed state. Therefore fix this for both ring and interconnect ring. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit ecb0605810f395961ea70c34e8946198bacd2f2d Author: Michael Walle Date: Fri Jun 4 15:42:12 2021 +0200 net: enetc: use get/put_unaligned helpers for MAC address handling The supplied buffer for the MAC address might not be aligned. Thus doing a 32bit (or 16bit) access could be on an unaligned address. For now, enetc is only used on aarch64 which can do unaligned accesses, thus there is no error. In any case, be correct and use the get/put_unaligned helpers. Signed-off-by: Michael Walle Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit f70663554760bacfcff77e826433ea843b632048 Merge: e663886c9716f 316fe3cc7de36 Author: David S. Miller Date: Fri Jun 4 14:34:17 2021 -0700 Merge branch 'hdlc_x25-cleanups' Peng Li says: ==================== net: hdlc_x25: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 316fe3cc7de365f1c6164bbab8ef724c9ea1c6d3 Author: Peng Li Date: Fri Jun 4 15:32:12 2021 +0800 net: hdlc_x25: fix the alignment issue Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 792b070fca8fc945c2be7f9dd965d79c238d81c7 Author: Peng Li Date: Fri Jun 4 15:32:11 2021 +0800 net: hdlc_x25: fix the code issue about "if..else.." According to the chackpatch.pl, else should follow close brace '}'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 5de446075c8e8c218302f8f819db88ccf0584aed Author: Peng Li Date: Fri Jun 4 15:32:10 2021 +0800 net: hdlc_x25: add some required spaces Add spaces required around that '='. Add space required after that ','. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit ec1f377412444432e3585ff65d3b563d1c148738 Author: Peng Li Date: Fri Jun 4 15:32:09 2021 +0800 net: hdlc_x25: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 579ebffe797368b47b7e677fba2ecfc108ae154b Author: Peng Li Date: Fri Jun 4 15:32:08 2021 +0800 net: hdlc_x25: remove unnecessary out of memory message This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 1c906e369815c9f35628c492a13e33e6ccbe0e4b Author: Peng Li Date: Fri Jun 4 15:32:07 2021 +0800 net: hdlc_x25: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e663886c9716f178e4927a2e91e20322590dc0c2 Merge: 0efea3c649f0a 8d7449630e345 Author: David S. Miller Date: Fri Jun 4 14:28:32 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-06-04 This series contains updates to igc driver only. Sasha utilizes the newly introduced ethtool_sprintf() function, removes unused defines, and fixes indentation. Muhammad adds support for hardware VLAN insertion and stripping. ==================== Signed-off-by: David S. Miller commit 0efea3c649f0a50d473a4afe2d17c2bbcee639e1 Author: Zheng Yongjun Date: Fri Jun 4 09:47:02 2021 +0800 tipc: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit d15fd7359ab18a46c5fefc36be45b36205f1acfc Merge: ebbf5fcb94a7f 5e6af0a729b66 Author: David S. Miller Date: Fri Jun 4 14:08:09 2021 -0700 Merge branch 'mptcp-timestamps' Mat Martineau says: ==================== mptcp: Add timestamp support Enable the SO_TIMESTAMP and SO_TIMESTAMPING socket options for MPTCP sockets and add receive path cmsg support for timestamps. Patches 1, 2, and 5 expose existing sock and tcp helpers for timestamps (no new EXPORT_SYMBOLS()s). Patch 3 propagates timestamp options to subflows. Patch 4 cleans up MPTCP handling of SOL_SOCKET options. Patch 6 adds timestamp csmg data when receiving on sockets that have been configured for timestamps. Patch 7 adds self test coverage for timestamps. ==================== Signed-off-by: David S. Miller commit 5e6af0a729b669b1da6f9600867e2e4910505a6d Author: Florian Westphal Date: Thu Jun 3 16:24:33 2021 -0700 selftests: mptcp_connect: add SO_TIMESTAMPNS cmsg support This extends the existing setsockopt test case to also check for cmsg timestamps. mptcp_connect will abort/fail if the setockopt was passed but the timestamp cmsg isn't present after successful recvmsg(). Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit b7f653b297a4b2ed16a11883044077e6bf3e3481 Author: Florian Westphal Date: Thu Jun 3 16:24:32 2021 -0700 mptcp: receive path cmsg support This adds support for SO_TIMESTAMP(NS). Timestamps are passed to userspace in the same way as for plain tcp sockets. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 892bfd3ded0ef0f895ed6356d0f85e2009421747 Author: Florian Westphal Date: Thu Jun 3 16:24:31 2021 -0700 tcp: export timestamp helpers for mptcp MPTCP is builtin, so no need to add EXPORT_SYMBOL()s. It will be used to support SO_TIMESTAMP(NS) ancillary messages in the mptcp receive path. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 7a009a70ff8adcba3b31dc8922a3671e5a8e1361 Author: Florian Westphal Date: Thu Jun 3 16:24:30 2021 -0700 mptcp: setsockopt: handle SOL_SOCKET in one place only Move the pre-check to the function that handles all SOL_SOCKET values. At this point there is complete coverage for all values that were accepted by the pre-check. BUSYPOLL functions are accepted but will not have any functionality yet until its clear how the expected mptcp behaviour should look like. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 9061f24bf82ec2e92dd1e7c10b98b680db023d31 Author: Florian Westphal Date: Thu Jun 3 16:24:29 2021 -0700 mptcp: sockopt: propagate timestamp request to subflows This adds support for TIMESTAMP(NS) setsockopt. This doesn't make things work yet, because the mptcp receive path doesn't convert the skb timestamps to cmsgs for userspace consumption. receive path cmsg support is added ina followup patch. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ced122d90f52eb6ff37272e32941845d46ac64c6 Author: Florian Westphal Date: Thu Jun 3 16:24:28 2021 -0700 sock: expose so_timestamping options for mptcp Similar to previous patch: expose SO_TIMESTAMPING helper so we do not have to copy & paste this into the mptcp core. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 371087aa476ab0ac0072303ac94a3bba2d7b0a1d Author: Florian Westphal Date: Thu Jun 3 16:24:27 2021 -0700 sock: expose so_timestamp options for mptcp This exports SO_TIMESTAMP_* function for re-use by MPTCP. Without this there is too much copy & paste needed to support this from mptcp setsockopt path. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 93b2e8711fe2ad6d25829574906b09a2339d2c80 Author: Geert Uytterhoeven Date: Fri May 28 13:10:49 2021 +0200 dt-bindings: i2c: i2c-mux: Remove reset-active-low from ssd1307fb examples The "reset-active-low" property was removed from the ssd1307fb bindings in commit 519b4dba586198ee ("fbdev: ssd1307fb: Remove reset-active-low from the DT binding document") and from the ssd1307fb binding examples in commit 7d7e58d30e046d34 ("dt-bindings: display: ssd1307fb: Remove reset-active-low from examples"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 3e88cbb0d02a852369455323df3fa86fdd37eee3 Author: Alex Deucher Date: Fri Jun 4 14:00:07 2021 -0400 drm/amdgpu/dc: fix DCN3.1 FP handling Missing proper DC_FP_START/DC_FP_END. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit df7a1658f257437f5bed9fb6e442c479e2779628 Author: Alex Deucher Date: Fri Jun 4 13:45:51 2021 -0400 drm/amdgpu/dc: fix DCN3.1 Makefile for PPC64 Port the necessary changes from previous DCN versions. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit c8b73f7fdbb117bc839559a8e8f495b700f043af Author: Nicholas Kazlauskas Date: Wed May 19 12:57:17 2021 -0400 drm/amdgpu: Add DC support and display block for Yellow Carp To enable output on real display instead of virtual. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 38ddc4babe032e67a554ef46e398aac1af5f724e Author: Nicholas Kazlauskas Date: Wed May 19 12:58:02 2021 -0400 drm/amd/display: Add DC DCN3.1 support to Kconfig To enable compiling and using DCN3.1 ASICs with physical output. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 1ebcaebdb51514689daddbc306b0943afa5b0130 Author: Nicholas Kazlauskas Date: Wed May 19 12:55:44 2021 -0400 drm/amd/display: Add DCN3.1 Yellow Carp support to DM To detect DCN3.1 ASICs and to enable the appropriate number of CRTCs, pick the right validation paths for display formats and to use the right DC interfaces. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 926d6972efb6c51bae1c47dea2635defdefb2781 Author: Nicholas Kazlauskas Date: Wed May 19 12:54:41 2021 -0400 drm/amd/display: Add DCN3.1 blocks to the DC Makefile Preparation for compiling DCN3.1 support. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 2083640f0d5bf9b3c4432b6dae9885a3bd604ce6 Author: Nicholas Kazlauskas Date: Wed May 19 12:52:22 2021 -0400 drm/amd/display: Add DCN3.1 Resource Container for hardware resources and blocks for DCN3.1, also adds new DC debug flags used with DCN3.1. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit bae1f0b8a5b189e5cdbb89d6995f6117d5bb8126 Author: Nicholas Kazlauskas Date: Wed May 19 12:49:11 2021 -0400 drm/amd/display: Add z10 restore checks for DC interfaces DMCUB has a deferred z10 restore process that needs signalling from driver to occur. This needs to be done on any interface that programs the hardware state or sequences where we expect to have the same hardware state as before. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 64b1d0e8d5002f5b9e898ea543f75e55e3aa28ee Author: Nicholas Kazlauskas Date: Wed May 19 12:40:48 2021 -0400 drm/amd/display: Add DCN3.1 HWSEQ Add DCN3.1 specific hardware sequence programming - extending off of our existing DCN3/DCN2 support. Extend stream hardware sequencing to include new DCCG programming. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit fcffbcf48df325e39e4f50c6264b39d0de60e34a Author: Nicholas Kazlauskas Date: Wed May 19 12:39:25 2021 -0400 drm/amd/display: Add DCN3.1 BIOS parser support Updated interfaces for multiple eDP backlight caps. Added support for interpreting the new BIOS command tables on DCN3.1. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit bf62221e9d0e1e4ba50ab2b331a0008c15de97be Author: Nicholas Kazlauskas Date: Wed May 19 12:37:16 2021 -0400 drm/amd/display: Add DCN3.1 HDCP support New DTM interface is V3 and we need to extend our existing support to enable HDCP on DCN3.1. Version the helpers and fallback to the older versions on failure in the new interfaces. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 809fe88d83434b88899425511e86e7edf354ce6d Author: Nicholas Kazlauskas Date: Wed May 19 12:33:22 2021 -0400 drm/amd/display: Add DCN3.1 PANEL The PANEL block handles embedded panel power and backlight programming. This programming and sequencing is now owned by DMCUB and driver will call into the interface for backlight status and programming. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit b04cb1924cba734f2a3eb7931f8266b3b6c27637 Author: Nicholas Kazlauskas Date: Wed Jun 2 11:28:22 2021 -0400 drm/amd/display: Add DCN3.1 DMCUB DMCU-B (Display Micro-Controller Unit B) is a display microcontroller used for shared display functionality with BIOS and for advanced power saving display features. Extends the command header to include new DCN3.1 functionality. Adds new interfaces to DC dmub interface as well for z-state support. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 56546ffc08fee516a84cbe2cc7f216302a170bb5 Author: Nicholas Kazlauskas Date: Wed May 19 12:28:11 2021 -0400 drm/amd/display: Add DCN3.1 GPIO support Extends off of DCN3. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit ef22ccbcfbc9f474d3448f2d5e53dc6a51f2f62d Author: Nicholas Kazlauskas Date: Wed May 19 12:27:17 2021 -0400 drm/amd/display: Add DCN3.1 IRQ manager Add IRQ services for DCN3.1 to handle hardware generated interrupts. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 74458c081fcfb0423877e630de2746daefdb16e4 Author: Nicholas Kazlauskas Date: Wed May 19 12:22:47 2021 -0400 drm/amd/display: Add DCN3.1 DML calculation support DML (Display mode library) is used for calculating watermarks, bandwidth and for validating display configurations. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit ba5a5371812e1f177414d30a9ce9691017cf30b6 Author: Nicholas Kazlauskas Date: Wed May 19 11:28:27 2021 -0400 drm/amd/display: Add DCN3.1 DCHHUB Adds DCN3.1 DCHHUB programming and modifies DCN20/DCN30 shared hardware sequencer helpers to use these hooks. HW Blocks: +--------++------+ +----------+ |DCHUBBUB|| HUBP | <-- | MMHUBBUB | +--------++------+ +----------+ | ^ v | +--------+ +--------+ | DPP | <---------> | DWB | +--------+ +--------+ | ^ v | +--------+ | | MPC | | +--------+ | | | v | +-------+ | | OPP | | +-------+ | | | v | +--------+ / | OPTC | -------------- +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ No changes to MMHUBBUB or DWB programming, added to diagram for clarity. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 110d3968fe9508142cb76b530d141209efa169a8 Author: Nicholas Kazlauskas Date: Wed May 19 11:01:50 2021 -0400 drm/amd/display: Add DCN3.1 OPTC Add support for programming the DCN3.1 OPTC (Output Timing Controller) HW Blocks: +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ There are no changes to OPP or MPC for DCN3.1, so the diagram will include them in this patch. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit cbaf919f3313af6a8415076f315d63d0cda1635e Author: Nicholas Kazlauskas Date: Wed May 19 10:58:19 2021 -0400 drm/amd/display: Add DCN3.1 DIO Add support for the DIO (Display IO) block of DCN3.1 which controls legacy HDMI/DP stream/link encoding. HW Blocks: +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Includes some updates to core logic for link encoder assignment and future support for new high bandwidth output. v2: squash in unused variable fix (Alex) Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 0b5194dec85b9f3971900129f9a3584a6cb5918d Author: Nishanth Menon Date: Fri Jun 4 13:32:47 2021 -0700 ARM: dts: keystone: k2g-evm: Move audio oscillator assigned clock to mcasp Setting assigned clock with a dependency on itself for k2g_clks creates a circular dependency. Instead, Lets model the audio clock as a assigned-clock configuration for mcasp and set it up as the first clock assigned-clock to be satisfied. Following the standard convention, we use null entries to indicate entries that doesn't need to be programmed. Reviewed-by: Tero Kristo Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit 02fa1189927f69f0f9d617789943fb4ae748012b Author: Vignesh Raghavendra Date: Wed May 26 15:34:12 2021 +0530 dt-bindings: i2c: Move i2c-omap.txt to YAML format Convert i2c-omap.txt to YAML schema for better checks and documentation. Following properties were used in DT but were not documented in txt bindings and has been included in YAML schema: 1. Include ti,am4372-i2c compatible 2. Document clocks property Signed-off-by: Vignesh Raghavendra Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 65db04053efea3f3e412a7e0cc599962999c96b4 Author: Kai-Heng Feng Date: Thu Apr 1 21:12:52 2021 +0800 PCI: Coalesce host bridge contiguous apertures Built-in graphics on HP EliteDesk 805 G6 doesn't work because graphics can't get the BAR it needs: pci_bus 0000:00: root bus resource [mem 0x10020200000-0x100303fffff window] pci_bus 0000:00: root bus resource [mem 0x10030400000-0x100401fffff window] pci 0000:00:08.1: bridge window [mem 0xd2000000-0xd23fffff] pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100401fffff 64bit pref] pci 0000:00:08.1: can't claim BAR 15 [mem 0x10030000000-0x100401fffff 64bit pref]: no compatible bridge window pci 0000:00:08.1: [mem 0x10030000000-0x100401fffff 64bit pref] clipped to [mem 0x10030000000-0x100303fffff 64bit pref] pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100303fffff 64bit pref] pci 0000:07:00.0: can't claim BAR 0 [mem 0x10030000000-0x1003fffffff 64bit pref]: no compatible bridge window pci 0000:07:00.0: can't claim BAR 2 [mem 0x10040000000-0x100401fffff 64bit pref]: no compatible bridge window However, the root bus has two contiguous apertures that can contain the child resource requested. Coalesce contiguous apertures so we can allocate from the entire contiguous region. [bhelgaas: fold in https://lore.kernel.org/r/20210528170242.1564038-1-kai.heng.feng@canonical.com] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212013 Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20210401131252.531935-1-kai.heng.feng@canonical.com Signed-off-by: Kai-Heng Feng Signed-off-by: Bjorn Helgaas commit 5ab9dc38e2cf5c577722e2d959496b4c2503d1d4 Author: Geert Uytterhoeven Date: Tue Jun 1 17:03:54 2021 +0200 MAINTAINERS: Add linux-renesas-soc to the Renesas I2C entries The people on linux-renesas-soc are interested in changes to the Renesas I2C drivers and their DT bindings. Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 39b73baa44e76cc9e0d805f0ee1309454652c2df Author: Nishanth Menon Date: Fri Jun 4 13:12:59 2021 -0700 ARM: dts: keystone: k2g: Rename the TI-SCI clocks node name We currently use clocks as the node name for the node representing TI-SCI clock nodes. This is better renamed to being clock-controller as that is a better representative of the system controller function as a clock controller for the SoC. Reviewed-by: Tero Kristo Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit f594874e36fd440d75e24836615297a827900149 Author: Nishanth Menon Date: Fri Jun 4 13:12:31 2021 -0700 ARM: dts: keystone: k2g: Rename the TI-SCI node Lets rename the node name of TI-SCI node to be system-controller as it is a better standardized name for the function that TI-SCI plays in the SoC. Reviewed-by: Tero Kristo Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit 361a02c1e25f148b910fbfbfd77aeb51401e1ea9 Author: Nishanth Menon Date: Fri Jun 4 13:11:55 2021 -0700 ARM: dts: keystone: k2g: Rename message-manager node Rename message-manager instance node name to be better aligned with current style of device tree nodes for mailboxes. Reviewed-by: Tero Kristo Acked-by: Suman Anna Signed-off-by: Nishanth Menon Signed-off-by: Santosh Shilimkar commit 536e23c607edf0e13092887b92e0d5c7d29462b4 Author: Zhen Lei Date: Fri Jun 4 13:04:13 2021 -0700 soc: ti: wkup_m3_ipc: Remove redundant error printing in wkup_m3_ipc_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Santosh Shilimkar commit a9c7d88d23ad244ba45397d7ba792d4ddf9643bf Author: Qiheng Lin Date: Fri Jun 4 13:04:06 2021 -0700 PM: AVS: remove redundant dev_err call in omap_sr_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Reviewed-by: Nishanth Menon Signed-off-by: Qiheng Lin Signed-off-by: Santosh Shilimkar commit d8a2b4f3a9fc16cd8888e94440e03347a2b1e5e7 Author: Nicholas Kazlauskas Date: Wed May 19 10:51:45 2021 -0400 drm/amd/display: Add DCN3.1 DCCG Add programming of the DCCG (Display Controller Clock Generator) block: HW Blocks: +--------+ | DCCG | +--------+ Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 118a331516581c3acf1279857b0f663a54b7f31b Author: Nicholas Kazlauskas Date: Wed May 19 10:47:22 2021 -0400 drm/amd/display: Add DCN3.1 clock manager support Adds support for clock requests for the various parts of the DCN3.1 IP and the interfaces and definitions for sending messages to SMU/PMFW. Includes new support for z9/10, detecting SMU timeout and p-state support enablement. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit d997ea5c58bb1c05df9e1f6eb030f6647d938eac Author: Nicholas Kazlauskas Date: Wed May 19 10:36:07 2021 -0400 drm/amd/display: Add DCN3.1 yellow carp asic family IDs [Why & How] To determine whether the chip is yellow carp or not and which revision it is. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 753625643e218eb72a6e7b7df87db595a446931a Author: Nicholas Kazlauskas Date: Wed May 19 10:38:47 2021 -0400 drm/amdgpu: Update atomfirmware for DCN3.1 phy tuning and eDP caps [Why & How] We'll need these in driver for phy tuning in DCN3.1. Multiple eDP support also requires understanding which LCD the backlight curve in atombios is for. Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit bdc974cfd78bbb427f6d84d652fe5b74350d9578 Author: James Zhu Date: Wed Apr 28 14:15:02 2021 -0400 drm/amdgpu: add video_codecs query support for yellow carp Add video_codecs query support for yellow carp. Acked-by: Huang Rui Signed-off-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 203ed53f658ac1c1d842648d8acae7f393de7f09 Author: Xiaomeng Hou Date: Wed Apr 14 16:56:28 2021 +0800 drm/amd/pm: disable manually setting MCLK power level on yellow carp PMFW provides specific messages for setting fclk freq range thus adjust the power level. There's misusing of these messages when setting dpm mclk. Since actually mclk could adjust automatically complying with fclk, remove standalone support for mclk dpm level setting. Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 7d38d9dc4ecc44e210a602f6e99d0831589f6dd8 Author: Aaron Liu Date: Wed Apr 14 15:05:00 2021 +0800 drm/amdgpu: add mode2 reset support for yellow carp This patch adds mode2 reset support for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6c83a0151b8f028eedd51f618a17cb838c11d217 Author: Xiaomeng Hou Date: Thu Apr 8 09:44:02 2021 +0800 drm/amd/pm: add set_performance_level function for yellow carp This patch enables editing sysfs file power_dpm_force_performance_level for yellow carp. User could thus adjust the dpm forced level. v2: enable fine grain control of GFXCLK only when in manual performance level mode. In other mode, the min/max range of GFXCLK will be reset to corresponding values. Ex: To enable min 300MHz / max 600MHz gfx clocks 1) echo manual > /sys/bus/pci/devices/.../power_dpm_force_performance_level 2) echo s 0 300 > /sys/bus/pci/devices/.../pp_od_clk_voltage 3) echo s 1 600 > /sys/bus/pci/devices/.../pp_od_clk_voltage 4) echo c > /sys/bus/pci/devices/.../pp_od_clk_voltage Signed-off-by: Xiaomeng Hou Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 0cf6faafc43d46b4b3714159c7a9e8ecd2b11bd6 Author: Xiaomeng Hou Date: Tue Apr 6 09:35:13 2021 +0800 drm/amdgpu: correct the cu and rb info for yellow carp Skip disabled sa to correct the cu_info and active_rbs for yellow carp. Signed-off-by: Xiaomeng Hou Suggested-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b3accd6f6642699cc50bcf9a43d4c5f878f23eee Author: Xiaomeng Hou Date: Tue Apr 6 09:33:16 2021 +0800 drm/amdgpu: add gpu harvest support for yellow carp (v2) Register callback in gfxhub functions to program the bypass groups in gc_utcl2 corresponding to harvested SA. v2: update comments (Alex) Signed-off-by: Xiaomeng Hou Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 9df5b9bd8b69d27c007ed67ca2cf8495e8f848ae Author: Xiaomeng Hou Date: Tue Mar 30 19:06:12 2021 +0800 drm/amd/pm: add the interface to dump smu metrics table for yellow carp This patch is to add the interface to dump smu metrics table for yellow carp. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bd8dcea93a7d45a3366b5f3e6c341a677ff90acf Author: Xiaomeng Hou Date: Mon Mar 29 21:27:49 2021 +0800 drm/amd/pm: add callbacks to read/write sysfs file pp_power_profile_mode Implement the sysfs API for getting/setting pp_power_profile_mode for yellow carp. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 40954754f722db4bebaf2ffc201ab1702a272494 Author: Xiaomeng Hou Date: Sun Mar 28 20:59:34 2021 +0800 drm/amd/pm: add callback get_dpm_ultimate_freq for yellow carp Add callback function to get the hard frequency range of a clock domain for yellow carp. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 3df43e65e7cbf3760b1a4f685ea51a19b2dc988e Author: Xiaomeng Hou Date: Sun Apr 4 11:10:02 2021 +0800 drm/amd/pm: add callback to get bootup values for yellow carp Add get_vbios_bootup_values function to get the bootup values for yellow carp. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 4b161967529c921d14849b3cc493d6234976b7f2 Author: Nicholas Kazlauskas Date: Thu Mar 18 11:03:22 2021 -0400 drm/amdgpu: Load TA firmware for yellow carp Add TA firmware to module firmware list for yellow carp and call psp_init_ta_microcode to parse the TA firmware for HDCP support. Cc: Aaron Liu Acked-by: Huang Rui Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 907b3436f19b2d03f173a46b4efdf605fd7af90b Author: Aaron Liu Date: Wed Mar 17 17:14:11 2021 +0800 drm/amd/pm: add PrepareMp1ForUnload support for yellow carp Driver needs to notify the PMFW when the RLC is disabled. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a06370edff72f2ef9cb1b3c73701f53deaf7756d Author: Xiaomeng Hou Date: Sun Mar 7 17:30:06 2021 +0800 drm/amd/pm: add callback force_clk_levels for yellow carp Implement the sysfs API to set a range of allowed DPM levels for specific clock domain. v2: return error directly if the specified clock type not supported Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 0b8b1c4d1a422b6f89918a15d9586de8d5795f46 Author: Xiaomeng Hou Date: Tue Mar 9 07:19:39 2021 +0800 drm/amd/pm: initialize feature_enabled/feature_support bitmap for yellow carp Initialize the feature_enabled and feature_supported bitmap for yellow carp. Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 2f6888afded8a96cf558067cd5366b0dce8812a3 Author: Xiaomeng Hou Date: Tue Mar 9 07:11:15 2021 +0800 drm/amd/pm: implement is_dpm_running() callback for yellow carp Implement function to check if DPM is running for yellow carp. Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit d70b6842bd649c641d962aebb26a773225eb98e9 Author: Xiaomeng Hou Date: Tue Mar 9 06:58:08 2021 +0800 drm/amd/pm: add feature map for yellow carp Add feature map for yellow carp. Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit a831bafa00c390e99d204bf4eaf45ddc47de7e0d Author: Xiaomeng Hou Date: Fri Mar 5 15:26:24 2021 +0800 drm/amd/pm: add support to get dpm clock value for yellow carp Implement the sysfs API for getting values of pp dpm clocks(pp_dpm_socclk/mclk/fclk/vclk/dclk) for yellow carp. Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d54e9e70f5e86e510eac888a683587136455444e Author: Xiaomeng Hou Date: Mon Feb 22 16:44:30 2021 +0800 drm/amd/pm: add the fine grain tuning function for yellow carp Use the pp_od_clk_voltage sysfs file to configure the min and max value of gfx clock frequency or to restore the default values. Command guide: echo "s level value" > pp_od_clk_voltage "s" - set the sclk frequency "level" - 0 or 1, "0" represents the min value, "1" represents the max value "value" - the target value of sclk frequency, it should be limited in the safe range echo "r" > pp_od_clk_voltage "r" - reset the sclk frequency, restore the default value echo "c" > pp_od_clk_voltage "c" - commit the min and max value of sclk frequency to the system only after the commit command, the setting target values by "s" command will take effect Example: 1) check the default sclk frequency $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 600Mhz OD_RANGE: SCLK: 200MHz 600MHz 2) use "s" -- set command to configure the min or max sclk frequency $ echo "s 0 300" > pp_od_clk_voltage $ echo "s 1 500" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 300Mhz 1: 500Mhz OD_RANGE: SCLK: 200MHz 600MHz 3) use "r" -- reset command to restore the min and max sclk frequency $ echo "r" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 600Mhz OD_RANGE: SCLK: 200MHz 600MHz v2: modify the description of reset command usage - need to do "commit" after set the restore command Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 4cea0fc9816add710cf31d4704ec27d8b59129e4 Author: Xiaomeng Hou Date: Tue Feb 9 16:36:40 2021 +0800 drm/amd/pm: add set_watermarks_table function for yellow carp Add callback function set_watermarks_table for yellow carp. Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 77755dd32efa3896c784ea5069c9b7141446708a Author: Xiaomeng Hou Date: Wed Jan 27 13:22:23 2021 +0800 drm/amd/pm: add read_sensor function for yellow carp Add callback function read_sensor for yellow carp. Acked-by: Huang Rui Signed-off-by: Xiaomeng Hou Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit de8d6375e34be4d2e463ebbab53f6f799678bee6 Author: Aaron Liu Date: Tue Jan 26 10:46:34 2021 +0800 drm/amdgpu: add timestamp counter query support for yellow carp Allows software to query HW counters to timestamp submissions. This patch can address KFDPerfCountersTest. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Reviewed-by: chen gong Signed-off-by: Alex Deucher commit bb763b5f8efda540a35fd4ba5ca7d27aeb5162a9 Author: Aaron Liu Date: Mon Jan 25 16:08:55 2021 +0800 drm/amdgpu: add RLC_PG_DELAY_3 for yellow carp RLC_PG_DELAY_3 is to make RLC in safe mode to prevent any misalignment or conflict in middle of any power feature entry/exit sequence when CGPG feature is enabled. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c16e87d6f43184dc32d3ba1ceca8081d6aab0269 Author: Aaron Liu Date: Mon Jan 25 16:00:00 2021 +0800 drm/amdgpu/pm: support smu_post_init for yellow carp Add smu_post_init support for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 948b1216c9993ca21c474f815f276f572b04fd78 Author: Aaron Liu Date: Wed Jan 20 15:48:47 2021 +0800 drm/amdgpu: enable VCN PG and CG for yellow carp Enable VCN 3.0 PG and CG for Yellow Carp by setting up flags. Acked-by: Huang Rui Signed-off-by: Aaron Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 54f4f6f3591dd322ddf8abaf8acafda6efccee80 Author: James Zhu Date: Wed Jan 13 14:36:36 2021 -0500 drm/amdgpu: enable vcn dpg mode on yellow carp Enable vcn dpg mode on yellow carp. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Aaron Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher commit ee8d893f0fee658327bedef106b63427361d95dd Author: James Zhu Date: Wed Jan 13 14:35:45 2021 -0500 drm/amdgpu: enable vcn/jpeg on yellow carp Enable vcn/jpeg IP on yellow carp. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Aaron Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 737a9f860f9791c83b82860740a05de9d64305db Author: James Zhu Date: Wed Jan 13 14:32:34 2021 -0500 drm/amdgpu/vcn: add vcn support for yellow carp Add vcn firmware support for yellow carp Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Aaron Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 3d417b585792998da570ae75cd505bd70d2c813b Author: James Zhu Date: Wed Jan 13 14:39:13 2021 -0500 drm/amdgpu/jpeg: Remove harvest checking on CHIP_YELLOW_CARP Register CC_UVD_HARVESTING is obsolete on CHIP_YELLOW_CARP. Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Aaron Liu Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 3975cd8f7c257321bbbba5a740db0eb254c93f58 Author: Huang Rui Date: Wed Jan 13 23:52:41 2021 +0800 drm/amd/pm: add vcn/jepg enable functions for yellow carp This patch is to add vcn/jepg enable functions to power up/down them with smu messages. VCN/JEPG are poweroff by default. Signed-off-by: Huang Rui Reviewed-by: James Zhu Tested-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher commit db72c3fac913058b3c6c379a904ceb79c78b9659 Author: Aaron Liu Date: Tue Jan 12 16:51:59 2021 +0800 drm/amdgpu: add IH Clock Gating support for yellow carp IH CG need to be enabled by driver. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b7dd14c730e490cb86c760f4dd44b9c7721390ff Author: Aaron Liu Date: Tue Jan 12 16:48:09 2021 +0800 drm/amdgpu: add ATHUB Clock Gating support for yellow carp ATHUB MGCG/MGLS is enabled by default. Adding ATHUB MGCG/MGLS flag to ensure athub mgcg/ls enabled. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6bd955723eb48315aa736914cf20dc4e74ff6cce Author: Aaron Liu Date: Tue Jan 12 16:42:29 2021 +0800 drm/amdgpu: add HDP Clock Gating support for yellow carp HDP MGCG is enabled by default. Adding AMD_CG_SUPPORT_HDP_MGCG to ensure hdp mgcg enabled. HDP MGLS need to be enabled by driver. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f1e9aa65f8727c26ae0ea792898ffda45b203c67 Author: Aaron Liu Date: Mon Jan 11 13:16:31 2021 +0800 drm/amdgpu: add SDMA Clock Gating support for yellow carp Add AMD_CG_SUPPORT_SDMA_LS support. SDMA MGCG programming is migrated to RLC. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a885bea764f58739a92b0fb20780105795ca5e4e Author: Aaron Liu Date: Mon Jan 25 14:06:01 2021 +0800 drm/amdgpu/pm: enable gfx_off in yellow carp smu post init Enable gfx_off in smu_late_init for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 999dc9c520671b4c2247626c1d44318691896c25 Author: Aaron Liu Date: Thu Jan 7 13:02:48 2021 +0800 drm/amdgpu/pm: add gfx_off_control for yellow carp This patch implements gfx_off_control. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 647f007937a624ed7e213bb89deb0903b1d80799 Author: Aaron Liu Date: Thu Jan 7 11:05:05 2021 +0800 drm/amdgpu/pm: enable smu_hw_init for yellow carp This patch is to enable smu_hw_init for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit fd0a316e21c2eea6e200e570b0d9cb600ad3e748 Author: Aaron Liu Date: Thu Jan 7 09:38:04 2021 +0800 drm/amdgpu: add GFX Power Gating support for yellow carp Add GFX Power Gating support. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 83ae09b52fc1da2d0082708f5561e50417c2e8c8 Author: Aaron Liu Date: Tue Jan 5 17:29:03 2021 +0800 drm/amdgpu: add MMHUB Clock Gating support for yellow carp Add AMD_CG_SUPPORT_MC_MGCG/AMD_CG_SUPPORT_MC_LS support. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 9c6c48e623825727ff98baae016fa02805dd4e03 Author: Aaron Liu Date: Tue Jan 5 17:17:11 2021 +0800 drm/amdgpu: add GFX Clock Gating support for yellow carp Add below supports: GFX Coarse Grain Clock Gating(CGCG) GFX Coarse grain light sleep/deep sleep(CGLS) GFX Medium Grain Clock Gating(MGCG) GFX Medium Grain light sleep/deep sleep(MGLS) GFX Fine Grain Clock Gating(FGCG) RLC MGLS CP MGLS Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e44510e24e12ff3d02be4445d8c5a9e2d7699c17 Author: Aaron Liu Date: Thu Jan 7 09:13:35 2021 +0800 drm/amdgpu/pm: add set_driver_table_location implementation for yellow carp This patch adds set_driver_table_location implementation for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 94adc46fb01c3276d51424d5fd0f68ce4e870abf Author: Aaron Liu Date: Wed Dec 9 10:23:08 2020 +0800 drm/amdgpu/pm: set_pp_feature is unsupport for yellow carp For yellow carp, SMU firmware just only supports get_pp_feature. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 903bb18bcda39fb0929aeea84a93d74a4787cd3c Author: Aaron Liu Date: Thu Mar 25 14:32:58 2021 +0800 drm/amdgpu: enable psp_v13 for yellow carp This patch enables psp_v13 for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 04a69d20a09322b26d2af6bae56ece26e20dbdf7 Author: Aaron Liu Date: Thu Mar 25 14:21:51 2021 +0800 drm/amdgpu: add psp_v13 support for yellow carp This patch adds psp_v13 support for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 1b3869386e57bd3ea4ef47226a0f08f2b9fcfb30 Author: Alex Deucher Date: Wed Dec 16 10:40:30 2020 -0500 drm/amdgpu: add mmhub client support for yellow carp To help debugging GPUVM page faults. Acked-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bea75349945f4a446d29e434dad40ec78ff5fcbc Author: Aaron Liu Date: Wed Jan 13 17:14:02 2021 +0800 drm/amdgpu: reserved buffer is not needed with ip discovery enabled When IP discovery enabled, the reserved buffer has been alloacted. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e15a5fb9b6ac2556a4fe59dba5faa34c695e8b73 Author: Huang Rui Date: Wed Dec 16 17:21:27 2020 +0800 drm/amdgpu: introduce a stolen reserved buffer to protect specific buffer region (v2) Some ASICs such as Yellow Carp needs to reserve a region of video memory to avoid access from driver. So this patch is to introduce a stolen reserved buffer to protect specific buffer region. v2: free this buffer in amdgpu_ttm_fini. Signed-off-by: Huang Rui Acked-and-Tested-by: Aaron Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cba00ce82d348970cf20efaa042e0d4faa821217 Author: Aaron Liu Date: Wed Dec 9 13:00:55 2020 +0800 drm/amdgpu: add gfx golden settings for yellow carp (v3) This patch is to add gfx golden settings for yellow carp post si. v2: squash in updates (Alex) v3: squash in LDS update (Alex) Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 120a6db47296ed56d821c5914f703c5d51bd416b Author: Aaron Liu Date: Thu Dec 3 16:55:00 2020 +0800 drm/amdgpu: add smu ip block for yellow carp(V3) Yellow carp smu ip version: 13_0_1. V2: rename smu_v13_0 to smu_v13_0_1. V3: reuse smu_v13_0 with aldebaran. Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit b4bc9f10c740c8fb3d78e5ac44c1604a5b84cd98 Author: Aaron Liu Date: Thu Dec 3 16:44:46 2020 +0800 drm/amd/pm: partially enable swsmu for yellow carp(V2) This patch is to partially enable swSMU for yellow carp for the moment. V2: rename smu_v13_0 to smu_v13_0_1. Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f50740be5e64d25e3812a315d3ab2369fd6ebebf Author: Aaron Liu Date: Thu Dec 3 16:32:36 2020 +0800 drm/amd/pm: add yellow_carp_ppt implementation(V3) yellow_carp_ppt is swsmu layer 2 code for yellow carp. V2: rename smu_v13_0 to smu_v13_0_1 V3: cleanup code. Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 20761d0a797931356b3adf4240d72fde0be5fdbf Author: Aaron Liu Date: Wed Dec 2 10:01:43 2020 +0800 drm/amd/pm: add smu13 ip support for moment(V3) For supporting yellow carp, we need to add smu13 ip support for the moment. V2: add smu_v13_0_1.c|h dedicated for apu. V3: cleanup code. Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit e1aeab8a211502d44a4c9ba0104e570473de0bd0 Author: Aaron Liu Date: Mon Nov 30 15:43:55 2020 +0800 drm/amdgpu/pm: add smu v13.0.1 smc header for yellow carp (v2) This patch is to add smu v13.0.1 smc header for yellow carp. v2: squash in updates (Alex) Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 52dfd6c47e8e66cb859f5b804b4ee23fa8d07a6b Author: Aaron Liu Date: Mon Nov 30 15:41:04 2020 +0800 drm/amdgpu/pm: add smu v13.0.1 firmware header for yellow carp (V4) This patch is to add smu v13.0.1 firmware header for yellow carp. Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 385bb92fdc5813c5f6a8168d6bba8680f2c1d0de Author: Aaron Liu Date: Mon Nov 30 15:27:45 2020 +0800 drm/admgpu/pm: add smu v13 driver interface header for yellow carp (v3) This patch is to add smu v13 driver interface header for yellow carp. v2: squash in updates (Alex) v3: squash in v69.29.0 update (Alex) Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 011b514fd8e5d19f78e7216587577b51ec5e4373 Author: Aaron Liu Date: Tue Aug 25 10:27:59 2020 +0800 drm/amdgpu: support nbio_7_2_1 for yellow carp This patch adds nbio_7_2_1 support yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bf9d4e88c28b397ec6ec289c592ed41b552b8929 Author: Aaron Liu Date: Wed Nov 4 14:38:24 2020 +0800 drm/amdkfd: add yellow carp KFD support This patch is to add GFX10 based Yellow Carp KFD support. We will bypass IOMMU v2. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 5c462ca9a074ea13a83fcf0a21ed6bb780cc2a71 Author: Aaron Liu Date: Wed Nov 4 14:12:58 2020 +0800 drm/amdgpu: set ip blocks for yellow carp Enable ip blocks for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e88d68e106a7d3ba8d8017c524600fe1d9bd794c Author: Aaron Liu Date: Wed Nov 4 14:10:13 2020 +0800 drm/amdgpu: add sdma support for yellow carp This patch adds the sdma v5.2 support for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit bbbdc9739efa8edc5bf0e34c821f4ea5609de096 Author: Aaron Liu Date: Wed Nov 4 14:06:23 2020 +0800 drm/amdgpu: add gfx support for yellow carp Add yellow carp checks to gfx10 code. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 531d6e5de836335086270a4dd8aa6d201b6b712a Author: Aaron Liu Date: Wed Nov 4 13:54:49 2020 +0800 drm/amdgpu: support fw load type for yellow carp This patch sets fw load type as direct with fw_load_type=0 for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c817cfa31349f2b71a823ff1d5a3d3e8d6e728af Author: Aaron Liu Date: Wed Nov 4 13:53:05 2020 +0800 drm/amdgpu: add gmc v10 supports for yellow carp Add gfx memory controller support for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f82e7e49a6a020e4c0c6032a72e1706df926c309 Author: Aaron Liu Date: Wed Nov 4 13:23:51 2020 +0800 drm/amdgpu: add yellow carp support for ih block This patch adds the support for yellow carp ih block. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e79907216b7466e49db6b525f2de7a69756554f2 Author: Aaron Liu Date: Wed Nov 4 13:21:55 2020 +0800 drm/amdgpu: add nv common ip block support for yellow carp This patch adds common ip support for yellow carp. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit cdf9979be9769f96693a70b037f6e14115e99b68 Author: Alex Deucher Date: Wed May 12 17:13:25 2021 -0400 drm/amdgpu: add yellow_carp_reg_base_init function for yellow carp (v2) This patch adds yellow_carp_reg_base_init function to init the register base for yellow carp. v2: squash in updates (Alex) Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8bf84f60c53e80e26ce798c73d2f46d43d5c0da0 Author: Aaron Liu Date: Wed Nov 4 13:08:26 2020 +0800 drm/amdgpu: add yellow carp support for gpu_info and ip block setting This patch adds yellow carp support for gpu_info firmware and ip block setting. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 90a187d26f526f389525ce98c625c0d88eafe430 Author: Aaron Liu Date: Fri Jun 19 12:26:40 2020 +0800 drm/amdgpu: add uapi to define yellow carp series Add a flag to define yellow carp series. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ee9236b78b2155544ece975c14f424f518d18bc8 Author: Aaron Liu Date: Wed Nov 4 12:49:52 2020 +0800 drm/amdgpu: add yellow carp asic_type enum This patch adds yellow carp to amd_asic_type enum and amdgpu_asic_name[]. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 02680c23d7b3febe45ea3d4f9818c2b2dc89020a Author: Aaron Liu Date: Wed Nov 4 13:00:05 2020 +0800 drm/amdgpu: add yellow carp asic header files (v3) This patch is to add yellow carp asic header files. v2: squash in updates (Alex) v3: squash in DCN updates (Alex) Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 65e06b787303e376fc7b60750e3dc3811eb96e50 Author: Chen Li Date: Fri Jun 4 16:43:02 2021 +0800 radeon: use memcpy_to/fromio for UVD fw upload I met a gpu addr bug recently and the kernel log tells me the pc is memcpy/memset and link register is radeon_uvd_resume. As we know, in some architectures, optimized memcpy/memset may not work well on device memory. Trival memcpy_toio/memset_io can fix this problem. BTW, amdgpu has already done it in: commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"), that's why it has no this issue on the same gpu and platform. Signed-off-by: Chen Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c0f2b640e53bbc8e2dd233b7584f4bb37014aac6 Author: Chen Li Date: Fri Jun 4 16:40:32 2021 +0800 radeon: fix coding issues reported from sparse Also fix some coding issues reported from sparse. Signed-off-by: Chen Li Acked-by: Christian König Signed-off-by: Alex Deucher commit 48b033098e456451899c8cd3ee3f742291b0edfa Author: Wan Jiabing Date: Thu Jun 3 11:28:59 2021 +0800 drm: amdgpu: Remove unneeded semicolon in amdgpu_vm.c Fix following coccicheck warning: ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1726:2-3: Unneeded semicolon Reviewed-by: Christian König Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit fe9bb984b581f75f248b8b4863620bb0ed3272a6 Author: Gustavo A. R. Silva Date: Fri Jun 4 00:06:13 2021 -0500 drm/amd/pm: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 46ed43e67df6648c421504146d5bd020dd0de4eb Author: Rohit Khaire Date: Fri Jun 4 12:45:50 2021 -0400 drm/amdgpu: Modify GC register access to use _SOC15 macros In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Using _SOC15 read/write macros ensures that they go through RLC when flag is enabled. Signed-off-by: Rohit Khaire Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cec7e80fbff58cdfd6595e7d11d7b2a38545c2e4 Author: Rohit Khaire Date: Fri Jun 4 11:32:42 2021 -0400 drm/amdgpu: Enable RLCG read/write interface for Sienna Cichlid Enable this only for Sienna Cichild since only Navi12 and Sienna Cichlid support SRIOV Signed-off-by: Rohit Khaire Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 18703923a66aecf6f7ded0e16d22eb412ddae72f Author: Rohit Khaire Date: Fri Jun 4 11:02:56 2021 -0400 drm/amdgpu: Fix incorrect register offsets for Sienna Cichlid RLC_CP_SCHEDULERS and RLC_SPARE_INT0 have different offsets for Sienna Cichlid Signed-off-by: Rohit Khaire Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 810085ddb7b76c1cc5059a1feb3b1250eceacf23 Author: Eric Huang Date: Wed Jun 2 15:05:20 2021 -0400 drm/amdgpu: Don't flush/invalidate HDP for APUs and A+A Integrate two generic functions to determine if HDP flush is needed for all Asics. Signed-off-by: Eric Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9fd4781b5828f96b9ea1128beb7323923502e553 Author: Lijo Lazar Date: Fri Jun 4 16:05:49 2021 +0800 drm/amd/pm: Use generic BACO function for smu11 ASICs Remove ASIC specific functions for BACO support check. Use generic smu11 function instead. Signed-off-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 52a9fd7bc0c1916fb8fcf7d86c3d06c1ee26a032 Author: Lijo Lazar Date: Fri Jun 4 15:57:50 2021 +0800 drm/amd/pm: Add VF check to BACO support check For smuv11, check for VF also during BACO check. Signed-off-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 458020dd4f7109693d4857ed320398e662e8899a Author: Lijo Lazar Date: Fri Jun 4 15:33:48 2021 +0800 drm/amd/pm: Read BIF STRAP also for BACO check Avoid reading BIF STRAP each time for BACO capability. Read the STRAP value while checking BACO capability in PPTable. Signed-off-by: Lijo Lazar Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ff05bb18e182bd820a29f9f183009ff292c7acfb Author: Lijo Lazar Date: Fri Jun 4 14:34:45 2021 +0800 drm/amd/pm: Remove BACO check for aldebaran BACO/MACO is not applicable for aldebaran. Remove the redundant check. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 51c8b49762e497b6f72185af951b192e7678c61d Author: Stephen Boyd Date: Fri Jun 4 12:20:22 2021 -0700 clk: versatile: Depend on HAS_IOMEM kbuild robot reports that s390 fails to build this driver with COMPILE_TEST. Let's depend on HAS_IOMEM so that s390 doesn't try to build it. Cc: Lee Jones Acked-by: Linus Walleij Reported-by: kernel test robot Fixes: 419b3ab6987f ("clk: versatile: remove dependency on ARCH_*") Link: https://lore.kernel.org/r/20210604192321.2594519-1-sboyd@kernel.org Signed-off-by: Stephen Boyd commit 40e568f9c88db8efe264b3a372faea940fc12a0f Author: Matti Vaittinen Date: Thu Jun 3 13:00:21 2021 +0300 gpio: gpio-regmap: Use devm_add_action_or_reset() Slightly simplify the devm_gpio_regmap_register() by using the devm_add_action_or_reset(). Reviewed-by: Andy Shevchenko Reviewed-by: Michael Walle Signed-off-by: Matti Vaittinen Signed-off-by: Bartosz Golaszewski commit f4f1c42953c7f03a35cd7bc49c16f35911f50a0a Author: Masami Hiramatsu Date: Sat Jun 5 00:30:58 2021 +0900 perf probe: Report possible permission error for map__load() failure Report possible permission error including kptr_restrict setting for map__load() failure. This can happen when non-superuser runs perf probe. With this patch, perf probe shows the following message. $ perf probe vfs_read Failed to load symbols from /proc/kallsyms Please ensure you can read the /proc/kallsyms symbol addresses. If the /proc/sys/kernel/kptr_restrict is '2', you can not read kernel symbol address even if you are a superuser. Please change it to '1'. If kptr_restrict is '1', the superuser can read the symbol addresses. In that case, please run this command again with sudo. Error: Failed to add events. Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Aneesh Kumar K.V Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/162282065877.448336.10047912688119745151.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit c275c5c6d50a0518cdb0584e85905d10e7cefc6e Author: Peter Collingbourne Date: Wed Jun 2 16:52:30 2021 -0700 kasan: disable freed user page poisoning with HW tags Poisoning freed pages protects against kernel use-after-free. The likelihood of such a bug involving kernel pages is significantly higher than that for user pages. At the same time, poisoning freed pages can impose a significant performance cost, which cannot always be justified for user pages given the lower probability of finding a bug. Therefore, disable freed user page poisoning when using HW tags. We identify "user" pages via the flag set GFP_HIGHUSER_MOVABLE, which indicates a strong likelihood of not being directly accessible to the kernel. Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I716846e2de8ef179f44e835770df7e6307be96c9 Link: https://lore.kernel.org/r/20210602235230.3928842-5-pcc@google.com Signed-off-by: Will Deacon commit 013bb59dbb7cf876449df860946458a595a96d51 Author: Peter Collingbourne Date: Wed Jun 2 16:52:29 2021 -0700 arm64: mte: handle tags zeroing at page allocation time Currently, on an anonymous page fault, the kernel allocates a zeroed page and maps it in user space. If the mapping is tagged (PROT_MTE), set_pte_at() additionally clears the tags. It is, however, more efficient to clear the tags at the same time as zeroing the data on allocation. To avoid clearing the tags on any page (which may not be mapped as tagged), only do this if the vma flags contain VM_MTE. This requires introducing a new GFP flag that is used to determine whether to clear the tags. The DC GZVA instruction with a 0 top byte (and 0 tag) requires top-byte-ignore. Set the TCR_EL1.{TBI1,TBID1} bits irrespective of whether KASAN_HW is enabled. Signed-off-by: Peter Collingbourne Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Link: https://linux-review.googlesource.com/id/Id46dc94e30fe11474f7e54f5d65e7658dbdddb26 Reviewed-by: Catalin Marinas Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20210602235230.3928842-4-pcc@google.com Signed-off-by: Will Deacon commit 7a3b835371883558eb63e069d891bd87f562380d Author: Peter Collingbourne Date: Wed Jun 2 16:52:28 2021 -0700 kasan: use separate (un)poison implementation for integrated init Currently with integrated init page_alloc.c needs to know whether kasan_alloc_pages() will zero initialize memory, but this will start becoming more complicated once we start adding tag initialization support for user pages. To avoid page_alloc.c needing to know more details of what integrated init will do, move the unpoisoning logic for integrated init into the HW tags implementation. Currently the logic is identical but it will diverge in subsequent patches. For symmetry do the same for poisoning although this logic will be unaffected by subsequent patches. Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Link: https://linux-review.googlesource.com/id/I2c550234c6c4a893c48c18ff0c6ce658c7c67056 Link: https://lore.kernel.org/r/20210602235230.3928842-3-pcc@google.com Signed-off-by: Will Deacon commit 92638b4e1b47f97d7269e74465dedf73096f777d Author: Peter Collingbourne Date: Wed Jun 2 16:52:27 2021 -0700 mm: arch: remove indirection level in alloc_zeroed_user_highpage_movable() In an upcoming change we would like to add a flag to GFP_HIGHUSER_MOVABLE so that it would no longer be an OR of GFP_HIGHUSER and __GFP_MOVABLE. This poses a problem for alloc_zeroed_user_highpage_movable() which passes __GFP_MOVABLE into an arch-specific __alloc_zeroed_user_highpage() hook which ORs in GFP_HIGHUSER. Since __alloc_zeroed_user_highpage() is only ever called from alloc_zeroed_user_highpage_movable(), we can remove one level of indirection here. Remove __alloc_zeroed_user_highpage(), make alloc_zeroed_user_highpage_movable() the hook, and use GFP_HIGHUSER_MOVABLE in the hook implementations so that they will pick up the new flag that we are going to add. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Ic6361c657b2cdcd896adbe0cf7cb5a7fbb1ed7bf Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210602235230.3928842-2-pcc@google.com Signed-off-by: Will Deacon commit 814be609baae62aaa6c02fa6f3ad66cff32a6d15 Author: Shaokun Zhang Date: Thu Jun 3 16:34:51 2021 +0800 drivers/perf: hisi: Fix data source control 'Data source' is a new function for HHA PMU and config / clear interface was wrong by mistake. 'HHA_DATSRC_CTRL' register is mainly used for data source configuration, if we enable bit0 as driver, it will go on count the event and we didn't check it carefully. So fix the issue and do as the initial purpose. Fixes: 932f6a99f9b0 ("drivers/perf: hisi: Add new functions for HHA PMU") Reported-by: kernel test robot Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622709291-37996-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit d5aede3e6dd1b8ca574600a1ecafe1e580c53f2f Author: Rafał Miłecki Date: Wed May 12 15:07:09 2021 +0200 ARM: dts: BCM5301X: Fixup SPI binding 1. Reorder interrupts 2. Fix typo: s/spi_lr_overhead/spi_lr_overread/ 3. Rename node: s/spi-nor@0/flash@0/ This fixes: arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dt.yaml: spi@18029200: interrupt-names: 'oneOf' conditional failed, one must be fixed: ['spi_lr_fullness_reached', 'spi_lr_session_aborted', 'spi_lr_impatient', 'spi_lr_session_done', 'spi_lr_overhead', 'mspi_done', 'mspi_halted'] is too long Additional items are not allowed ('spi_lr_session_aborted', 'spi_lr_impatient', 'spi_lr_session_done', 'spi_lr_overhead', 'mspi_done', 'mspi_halted' were unexpected) 'mspi_done' was expected 'spi_l1_intr' was expected 'mspi_halted' was expected 'spi_lr_fullness_reached' was expected 'spi_lr_session_aborted' was expected 'spi_lr_impatient' was expected 'spi_lr_session_done' was expected 'spi_lr_overread' was expected From schema: Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dt.yaml: spi-nor@0: $nodename:0: 'spi-nor@0' does not match '^flash(@.*)?$' From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit acda97acb2e98c97895d81d20494bf6a4bc67c6c Author: Igor Matheus Andrade Torrente Date: Mon May 31 10:05:15 2021 -0300 docs: convert dax.txt to rst Change the file extension and add the rst constructs to integrate this doc to the documentation infrastructure and take advantage of rst features. Signed-off-by: Igor Matheus Andrade Torrente Link: https://lore.kernel.org/r/20210531130515.10309-1-igormtorrente@gmail.com Signed-off-by: Jonathan Corbet commit fb7b26a8b1d0b82c79e93deb12d624011c7a4e0e Author: Nobuhiro Iwamatsu Date: Mon May 31 22:42:35 2021 +0900 docs: Fix typo in Documentation/arm/marvell.rst Fix typo in the documentation, changed from 'comatible' to 'compatible. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20210531134235.720351-1-iwamatsu@nigauri.org Signed-off-by: Jonathan Corbet commit e53eeac9a9d78dc550b889897f5315424bb63e10 Author: Gao Mingfei Date: Tue Jun 1 08:51:45 2021 +0000 docs: block: fix stat.rst document error Update the description of the device stat files to include the proper number of fields. Signed-off-by: Gao Mingfei Link: https://lore.kernel.org/r/20210601085145.3273-1-g199209@gmail.com Signed-off-by: Jonathan Corbet commit f9ce26c56d37fa6d32f700dfc77f4ceb445ce215 Author: Kees Cook Date: Wed Jun 2 13:29:14 2021 -0700 docs: networking: Replace strncpy() with strscpy() Replace example code's use of strncpy() with strscpy() functions. Using strncpy() is considered deprecated: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Signed-off-by: Kees Cook Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20210602202914.4079123-1-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 709dedfdf3daa8719240ecff1c0b70b278005386 Author: Rob Herring Date: Wed Jun 2 20:28:06 2021 -0500 documentation-file-ref-check: Make git check work for multiple working directories With multiple git working directories, '.git' may also be a text file linking to the actual git tree instead of a directory. Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Tested-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210603012806.331132-1-robh@kernel.org Signed-off-by: Jonathan Corbet commit c003555a026f56dae1d6b522045a7917150ceabb Author: Wan Jiabing Date: Thu Jun 3 22:11:17 2021 +0800 docs/zh_CN: add translations in zh_CN/dev-tools/kasan Add new zh translations * zh_CN/dev-tools/kasan.rst and link it to zh_CN/dev-tools/index.rst Reviewed-by: Fangrui Song Signed-off-by: Wan Jiabing Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210603141127.101689-1-wanjiabing@vivo.com Signed-off-by: Jonathan Corbet commit b0cbba2e44c629f1b4efb31701b1d3f3ade6926e Author: Hailong Liu Date: Thu Jun 3 22:52:27 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/lockup-watchdogs.rst Add translation zh_CN/admin-guide/lockup-watchdogs.rst and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Reviewed-by: Yanteng Si Signed-off-by: Hailong Liu Link: https://lore.kernel.org/r/20210603145227.30956-1-liuhailongg6@163.com Signed-off-by: Jonathan Corbet commit 52ea62e74ecf3dd60e6df0479320213470e2ae7f Author: Yanteng Si Date: Fri Jun 4 17:06:55 2021 +0800 docs/zh_CN: add core api cachetlb translation Translate Documentation/core-api/cachetlb.rst into Chinese. Reviewed-by: Wu XiangCheng Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210604090655.1971227-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 72a7cf0aec0c450033a79be22646028b7bc1d792 Author: Mario Kleiner Date: Wed Jun 2 22:45:56 2021 +0200 drm/amd/display: Keep linebuffer pixel depth at 30bpp for DCE-11.0. Testing on AMD Carizzo with DCE-11.0 display engine showed that it doesn't like a 36 bpp linebuffer very much. The display just showed a solid green. Testing on RavenRidge DCN-1.0, Polaris11 with DCE-11.2 and Kabini with DCE-8.3 did not expose any problems, so for now only revert to 30 bpp linebuffer depth on asics with DCE-11.0 display engine. Fixes: a316db72096044 ("drm/amd/display: Increase linebuffer pixel depth to 36bpp.") Reported-by: Tom StDenis Reviewed-by: Harry Wentland Signed-off-by: Mario Kleiner Cc: Alex Deucher Signed-off-by: Alex Deucher commit c45d9400a08a4c8e84a3a35adc7533d877e42ffe Author: Yu Kuai Date: Thu Jun 3 19:30:51 2021 +0800 drm: fix doc warnings in drm_atomic.h Add description for parameters for for_each_new_plane_in_state_reverse to fix warnings: include/drm/drm_atomic.h:908: warning: Function parameter or member '__state' not described in 'for_each_new_plane_in_state_reverse' include/drm/drm_atomic.h:908: warning: Function parameter or member 'plane' not described in 'for_each_new_plane_in_state_reverse' include/drm/drm_atomic.h:908: warning: Function parameter or member 'new_plane_state' not described in 'for_each_new_plane_in_state_reverse' include/drm/drm_atomic.h:908: warning: Function parameter or member '__i' not described in 'for_each_new_plane_in_state_reverse' Fixes: a6c3c37b661d ("drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'") Signed-off-by: Yu Kuai Signed-off-by: Alex Deucher commit c385d41604eeeab738281792e65238ee41528f5e Author: Colin Ian King Date: Thu Jun 3 13:42:31 2021 +0100 drm/amd/display: remove variable active_disp The variable active_disp is being initialized with a value that is never read, it is being re-assigned immediately afterwards. Clean up the code by removing the need for variable active_disp. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 7bee75a2ba822c9e573d10c411f6ac233c4c3790 Author: Colin Ian King Date: Thu Jun 3 13:34:40 2021 +0100 drm/amdgpu: remove redundant assignment of variable k The variable k is being assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 31f33243788dcbae8bd2819ed83923a73f7dfd30 Author: Eric Huang Date: Tue Jun 1 18:54:32 2021 -0400 drm/amdkfd: Make TLB flush conditional on mapping It is to optimize memory mapping latency, and also aviod a page fault in a corner case of changing valid PDE into PTE. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 075e8080c1a7571563171a07fa9ce47c4bc80044 Author: Eric Huang Date: Tue Jun 1 18:36:34 2021 -0400 drm/amdgpu: Add table_freed parameter to amdgpu_vm_bo_update It is to pass the flag to KFD, and optimize table_freed in amdgpu_vm_bo_update_mapping. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1098d658bef05e5fee634aab0b6a1fa590cfca24 Author: Eric Huang Date: Tue Jun 1 18:26:07 2021 -0400 drm/amdkfd: Add heavy-weight TLB flush after unmapping It is a part of memory mapping optimization. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3543b055b8c7a910847bc23fab816afbf04197e2 Author: Eric Huang Date: Tue Jun 1 18:19:42 2021 -0400 drm/amdkfd: Add flush-type parameter to kfd_flush_tlb It is to provide more tlb flush types option for different case scenario. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 32d6378cab2df64eea74e8758192d7ad7d0e1515 Author: Michel Dänzer Date: Wed Jun 2 11:53:05 2021 +0200 drm/amdgpu: Use drm_dbg_kms for reporting failure to get a GEM FB drm_err meant broken user space could spam dmesg. Fixes: f258907fdd835e "drm/amdgpu: Verify bo size can fit framebuffer size on init." Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 31c759bbe38351cb46535c48293efe8860e080b4 Author: Changfeng Date: Wed Jun 2 21:25:56 2021 +0800 drm/amdgpu: switch kzalloc to kvzalloc in amdgpu_bo_create It will cause error when alloc memory larger than 128KB in amdgpu_bo_create->kzalloc. So it needs to switch kzalloc to kvzalloc. Call Trace: alloc_pages_current+0x6a/0xe0 kmalloc_order+0x32/0xb0 kmalloc_order_trace+0x1e/0x80 __kmalloc+0x249/0x2d0 amdgpu_bo_create+0x102/0x500 [amdgpu] ? xas_create+0x264/0x3e0 amdgpu_bo_create_vm+0x32/0x60 [amdgpu] amdgpu_vm_pt_create+0xf5/0x260 [amdgpu] amdgpu_vm_init+0x1fd/0x4d0 [amdgpu] Signed-off-by: Changfeng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 23e4aa5179bcfbe322904137c2cbbac9f7aeaacc Author: shaoyunl Date: Tue Jun 1 10:50:14 2021 -0400 drm/amdgpu: soc15 register access through RLC should only apply to sriov runtime On SRIOV, driver should only access register through RLC in runtime Acked-by: Alex Deucher Signed-off-by: shaoyunl Signed-off-by: Alex Deucher commit 30d95a37f46d1be90048c565d3ec380ddecb0541 Author: Sathishkumar S Date: Sun May 30 10:47:16 2021 +0530 drm/amdgpu: attr to control SS2.0 bias level (v2) add sysfs attr to read/write smartshift bias level. document smartshift_bias sysfs attr. V2: add attr to amdgpu_device_attrs and use attr_update (Lijo) Signed-off-by: Sathishkumar S Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit a7673a1c1acdd81aa462997a4c3b8f24464a8eeb Author: Sathishkumar S Date: Sun May 30 09:45:26 2021 +0530 drm/amd/pm: sysfs attrs to read ss powershare (v6) add sysfs attrs to read smartshift APU and DGPU power share. document the sysfs device attributes. V2: change variable/macro name for stapm power limit (Lijo) V3: files to be exposed as sysfs device attributes (Alex) V4: check ret value of sysfs create and remove only if created. V5: add ss attrs in amdgpu_device_attrs and use attr_update (Lijo) V6: all checks for ss support to be in if else if statements. (Lijo) Signed-off-by: Sathishkumar S Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 34667f60cfe2fcd5a3abbadfc06aaaac5178ae78 Author: Leslie Shi Date: Tue Jun 1 10:27:02 2021 +0800 drm/amd/display: Fix uninitialized field when expanding macro MI_DCE12_MASK_SH_LIST Add back. Fixes: 0cadcf7c100161 ("drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT, MASK}") Signed-off-by: Leslie Shi Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit ffb2df66ba8c65700e030fc6eeaa24b044c94e43 Merge: e78f36bc13591 c15d4b72098ca Author: Mark Brown Date: Fri Jun 4 17:26:54 2021 +0100 Merge series "ASoC: codecs: wcd934x: add Headset and button detection support" from Srinivas Kandagatla : This patchset adds support to MBHC(Multi Button Headset Control) block found in Qualcomm WCD codecs. MBHC support headset type detection, both Mechanical and electrical insert/removal detection along with 8 buttons detection, Over current interrupts on HPHL/R, Impedance Measurements on HPHL/R. Eventhough MBHC block supports things like OverCurrent detection, Currently its reported as a kernel debug message. Should this be reported as an uevent to userspace? like the way USB reports? Any suggestions? First patch adds a common mbhc driver and the second one wcd934x specific driver changes along with sdm845 soundcard related changes. Common wcd-mbhc-v2 driver should be reusable across multiple codecs like WCD9335, WCD934x, WCD937x and WCD938x. Most of the work is derived from downstream Qualcomm kernels. Credits to various Qualcomm authors from Patrick Lai's team who have contributed to this code. Changes since v2: - switched to EXPORT_SYMBOL_GPL from EXPORT_SYMBOL - converted one of the if else to switch case. Srinivas Kandagatla (4): ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection ASoC: codecs: wcd: add multi button Headset detection support ASoC: codecs: wcd934x: add mbhc support ASoC: qcom: sdm845: add jack support for WCD934x .../bindings/sound/qcom,wcd934x.yaml | 30 + include/linux/mfd/wcd934x/registers.h | 57 + sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wcd-mbhc-v2.c | 1475 +++++++++++++++++ sound/soc/codecs/wcd-mbhc-v2.h | 340 ++++ sound/soc/codecs/wcd934x.c | 884 +++++++++- sound/soc/qcom/sdm845.c | 8 + 8 files changed, 2785 insertions(+), 15 deletions(-) create mode 100644 sound/soc/codecs/wcd-mbhc-v2.c create mode 100644 sound/soc/codecs/wcd-mbhc-v2.h -- 2.21.0 commit 8d7449630e3450bc0546dc0cb692fbb57d1852c0 Author: Muhammad Husaini Zulkifli Date: Fri Jun 4 01:44:54 2021 +0800 igc: Enable HW VLAN Insertion and HW VLAN Stripping Add HW VLAN acceleration protocol handling. In case of HW VLAN tagging, we need that protocol available in the ndo_start_xmit(), so that it will be stored in a new fields in the skb. HW offloading is set to OFF by default. Users are allow to turn on/off Rx/Tx HW VLAN acceleration via ethtool. Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Dvora Fuxbrumer Acked-by: Sasha Neftin Signed-off-by: Tony Nguyen commit 5cde7beb27affd0ccd96ccb671adb1539866738b Author: Sasha Neftin Date: Mon May 24 09:09:01 2021 +0300 igc: Indentation fixes Minor fix of indentation in igc_defines.h Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 6fdef25db3d48b1c3f735b49125397498b3f7033 Author: Sasha Neftin Date: Sun May 2 13:57:08 2021 +0300 igc: Remove unused MDICNFG register The MDICNFG register from igc registers is not used so remove it. Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit cca2c030b2a7f9107c925bfb506600b924751256 Author: Sasha Neftin Date: Sun Apr 18 14:40:56 2021 +0300 igc: Remove unused asymmetric pause bit from igc defines The CR_1000T_ASYM_PAUSE bit from igc defines is not used so remove it. Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen commit 220ef1f97ec19894b121f40012031c405ffc388c Author: Sasha Neftin Date: Mon Apr 12 17:41:07 2021 +0300 igc: Update driver to use ethtool_sprintf Complete to commit c8d4725e985d ("intel: Update drivers to use ethtool_sprintf") Update the igc driver to make use of ethtool_sprintf. The general idea is to reduce code size and overhead by replacing the repeated pattern of string printf statements and ETH_STRING_LEN counter increments. Suggested-by: Alexander Duyck Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit f34ee1dce642c67104a56d562e6ec71efe901f77 Author: Damien Le Moal Date: Wed May 26 06:25:01 2021 +0900 dm crypt: Fix zoned block device support Zone append BIOs (REQ_OP_ZONE_APPEND) always specify the start sector of the zone to be written instead of the actual sector location to write. The write location is determined by the device and returned to the host upon completion of the operation. This interface, while simple and efficient for writing into sequential zones of a zoned block device, is incompatible with the use of sector values to calculate a cypher block IV. All data written in a zone end up using the same IV values corresponding to the first sectors of the zone, but read operation will specify any sector within the zone resulting in an IV mismatch between encryption and decryption. To solve this problem, report to DM core that zone append operations are not supported. This result in the zone append operations being emulated using regular write operations. Reported-by: Shin'ichiro Kawasaki Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer commit bb37d77239af25cde59693dbe3fac04dd17d7b29 Author: Damien Le Moal Date: Wed May 26 06:25:00 2021 +0900 dm: introduce zone append emulation For zoned targets that cannot support zone append operations, implement an emulation using regular write operations. If the original BIO submitted by the user is a zone append operation, change its clone into a regular write operation directed at the target zone write pointer position. To do so, an array of write pointer offsets (write pointer position relative to the start of a zone) is added to struct mapped_device. All operations that modify a sequential zone write pointer (writes, zone reset, zone finish and zone append) are intersepted in __map_bio() and processed using the new functions dm_zone_map_bio(). Detection of the target ability to natively support zone append operations is done from dm_table_set_restrictions() by calling the function dm_set_zones_restrictions(). A target that does not support zone append operation, either by explicitly declaring it using the new struct dm_target field zone_append_not_supported, or because the device table contains a non-zoned device, has its mapped device marked with the new flag DMF_ZONE_APPEND_EMULATED. The helper function dm_emulate_zone_append() is introduced to test a mapped device for this new flag. Atomicity of the zones write pointer tracking and updates is done using a zone write locking mechanism based on a bitmap. This is similar to the block layer method but based on BIOs rather than struct request. A zone write lock is taken in dm_zone_map_bio() for any clone BIO with an operation type that changes the BIO target zone write pointer position. The zone write lock is released if the clone BIO is failed before submission or when dm_zone_endio() is called when the clone BIO completes. The zone write lock bitmap of the mapped device, together with a bitmap indicating zone types (conv_zones_bitmap) and the write pointer offset array (zwp_offset) are allocated and initialized with a full device zone report in dm_set_zones_restrictions() using the function dm_revalidate_zones(). For failed operations that may have modified a zone write pointer, the zone write pointer offset is marked as invalid in dm_zone_endio(). Zones with an invalid write pointer offset are checked and the write pointer updated using an internal report zone operation when the faulty zone is accessed again by the user. All functions added for this emulation have a minimal overhead for zoned targets natively supporting zone append operations. Regular device targets are also not affected. The added code also does not impact builds with CONFIG_BLK_DEV_ZONED disabled by stubbing out all dm zone related functions. Signed-off-by: Damien Le Moal Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Mike Snitzer commit e2118b3c3d94289852417f70ec128c25f4833aad Author: Damien Le Moal Date: Wed May 26 06:24:59 2021 +0900 dm: rearrange core declarations for extended use from dm-zone.c Move the definitions of struct dm_target_io, struct dm_io and the bits of the flags field of struct mapped_device from dm.c to dm-core.h to make them usable from dm-zone.c. For the same reason, declare dec_pending() in dm-core.h after renaming it to dm_io_dec_pending(). And for symmetry of the function names, introduce the inline helper dm_io_inc_pending() instead of directly using atomic_inc() calls. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer commit 9ffbbb435d8f566a0924ce4b5dc7fc1bceb6dbf8 Author: Damien Le Moal Date: Wed May 26 06:24:53 2021 +0900 block: introduce BIO_ZONE_WRITE_LOCKED bio flag Introduce the BIO flag BIO_ZONE_WRITE_LOCKED to indicate that a BIO owns the write lock of the zone it is targeting. This is the counterpart of the struct request flag RQF_ZONE_WRITE_LOCKED. This new BIO flag is reserved for now for zone write locking control for device mapper targets exposing a zoned block device. Since in this case, the lock flag must not be propagated to the struct request that will be used to process the BIO, a BIO private flag is used rather than changing the RQF_ZONE_WRITE_LOCKED request flag into a common REQ_XXX flag that could be used for both BIO and request. This avoids conflicts down the stack with the block IO scheduler zone write locking (in mq-deadline). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Acked-by: Jens Axboe Signed-off-by: Mike Snitzer commit d0ea6bde141df9311bc36e7b07ad37b449f2c4f5 Author: Damien Le Moal Date: Wed May 26 06:24:52 2021 +0900 block: introduce bio zone helpers Introduce the helper functions bio_zone_no() and bio_zone_is_seq(). Both are the BIO counterparts of the request helpers blk_rq_zone_no() and blk_rq_zone_is_seq(), respectively returning the number of the target zone of a bio and true if the BIO target zone is sequential. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Acked-by: Jens Axboe Signed-off-by: Mike Snitzer commit 1ee533eca70bb8867ad1e6f5ef8a86c8897d67d7 Author: Damien Le Moal Date: Wed May 26 06:24:51 2021 +0900 block: improve handling of all zones reset operation SCSI, ZNS and null_blk zoned devices support resetting all zones using a single command (REQ_OP_ZONE_RESET_ALL), as indicated using the device request queue flag QUEUE_FLAG_ZONE_RESETALL. This flag is not set for device mapper targets creating zoned devices. In this case, a user request for resetting all zones of a device is processed in blkdev_zone_mgmt() by issuing a REQ_OP_ZONE_RESET operation for each zone of the device. This leads to different behaviors of the BLKRESETZONE ioctl() depending on the target device support for the reset all operation. E.g. blkzone reset /dev/sdX will reset all zones of a SCSI device using a single command that will ignore conventional, read-only or offline zones. But a dm-linear device including conventional, read-only or offline zones cannot be reset in the same manner as some of the single zone reset operations issued by blkdev_zone_mgmt() will fail. E.g.: blkzone reset /dev/dm-Y blkzone: /dev/dm-0: BLKRESETZONE ioctl failed: Remote I/O error To simplify applications and tools development, unify the behavior of the all-zone reset operation by modifying blkdev_zone_mgmt() to not issue a zone reset operation for conventional, read-only and offline zones, thus mimicking what an actual reset-all device command does on a device supporting REQ_OP_ZONE_RESET_ALL. This emulation is done using the new function blkdev_zone_reset_all_emulated(). The zones needing a reset are identified using a bitmap that is initialized using a zone report. Since empty zones do not need a reset, also ignore these zones. The function blkdev_zone_reset_all() is introduced for block devices natively supporting reset all operations. blkdev_zone_mgmt() is modified to call either function to execute an all zone reset request. Signed-off-by: Damien Le Moal [hch: split into multiple functions] Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Acked-by: Jens Axboe Signed-off-by: Mike Snitzer commit bf14e2b250e4ff94392bbe87c523effdec687b0b Author: Damien Le Moal Date: Wed May 26 06:24:58 2021 +0900 dm: Forbid requeue of writes to zones A target map method requesting the requeue of a bio with DM_MAPIO_REQUEUE or completing it with DM_ENDIO_REQUEUE can cause unaligned write errors if the bio is a write operation targeting a sequential zone. If a zoned target request such a requeue, warn about it and kill the IO. The function dm_is_zone_write() is introduced to detect write operations to zoned targets. This change does not affect the target drivers supporting zoned devices and exposing a zoned device, namely dm-crypt, dm-linear and dm-flakey as none of these targets ever request a requeue. Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer commit 912e887505a07123917e537b657859723ce5d472 Author: Damien Le Moal Date: Wed May 26 06:24:57 2021 +0900 dm: Introduce dm_report_zones() To simplify the implementation of the report_zones operation of a zoned target, introduce the function dm_report_zones() to set a target mapping start sector in struct dm_report_zones_args and call blkdev_report_zones(). This new function is exported and the report zones callback function dm_report_zones_cb() is not. dm-linear, dm-flakey and dm-crypt are modified to use dm_report_zones(). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer commit 7fc18728482b1a29bd7b8439a0ae7b3f23e097d1 Author: Damien Le Moal Date: Wed May 26 06:24:56 2021 +0900 dm: move zone related code to dm-zone.c Move core and table code used for zoned targets and conditionally defined with #ifdef CONFIG_BLK_DEV_ZONED to the new file dm-zone.c. This file is conditionally compiled depending on CONFIG_BLK_DEV_ZONED. The small helper dm_set_zones_restrictions() is introduced to initialize a mapped device request queue zone attributes in dm_table_set_restrictions(). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer commit dd73c320ec3089149b802a1316321c3e0f6a6aaf Author: Damien Le Moal Date: Wed May 26 06:24:55 2021 +0900 dm: cleanup device_area_is_invalid() In device_area_is_invalid(), use bdev_is_zoned() instead of open coding the test on the zoned model returned by bdev_zoned_model(). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer commit 6842d264aa5205da338b6dcc6acfa2a6732558f1 Author: Damien Le Moal Date: Wed May 26 06:24:54 2021 +0900 dm: Fix dm_accept_partial_bio() relative to zone management commands Fix dm_accept_partial_bio() to actually check that zone management commands are not passed as explained in the function documentation comment. Also, since a zone append operation cannot be split, add REQ_OP_ZONE_APPEND as a forbidden command. White lines are added around the group of BUG_ON() calls to make the code more legible. Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit bab68499428ed934f0493ac74197ed6f36204260 Author: Damien Le Moal Date: Wed May 19 10:26:16 2021 +0900 dm zoned: check zone capacity The dm-zoned target cannot support zoned block devices with zones that have a capacity smaller than the zone size (e.g. NVMe zoned namespaces) due to the current chunk zone mapping implementation as it is assumed that zones and chunks have the same size with all blocks usable. If a zoned drive is found to have zones with a capacity different from the zone size, fail the target initialization. Signed-off-by: Damien Le Moal Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Mike Snitzer commit ccde2cbfa31c4d41818a493c1126df05336f8c5a Author: Rikard Falkeborn Date: Wed May 26 23:06:37 2021 +0200 dm table: Constify static struct blk_ksm_ll_ops The only usage of dm_ksm_ll_ops is to make a copy of it to the ksm_ll_ops field in the blk_keyslot_manager struct. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Mike Snitzer commit af4f6cabcc5a2449e6b7663d45227bfcb6b725ec Author: Mikulas Patocka Date: Wed May 26 15:49:03 2021 -0400 dm writecache: interrupt writeback if suspended If the DM device is suspended, interrupt the writeback sequence so that there is no excessive suspend delay. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit ee50cc19d80e9b9a8283d1fb517a778faf2f6899 Author: Mikulas Patocka Date: Wed May 26 10:29:45 2021 -0400 dm writecache: don't split bios when overwriting contiguous cache content If dm-writecache overwrites existing cached data, it splits the incoming bio into many block-sized bios. The I/O scheduler does merge these bios into one large request but this needless splitting and merging causes performance degradation. Fix this by avoiding bio splitting if the cache target area that is being overwritten is contiguous. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 6bcd658f2a2a13fb63c38fc018e1ab210396aefc Author: Mikulas Patocka Date: Wed May 26 10:18:06 2021 -0400 dm kcopyd: avoid spin_lock_irqsave from process context The functions "pop", "push_head", "do_work" can only be called from process context. Therefore, replace spin_lock_irq{save,restore} with spin_{lock,unlock}_irq. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit db2351eb22e42c5e29ce0caa967a10bb34efabb5 Author: Mikulas Patocka Date: Wed May 26 10:16:01 2021 -0400 dm kcopyd: avoid useless atomic operations The functions set_bit and clear_bit are atomic. We don't need atomicity when making flags for dm-kcopyd. So, change them to direct manipulation of the flags. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 6b06dd5a972288d011a49d63eb9f6a5003d2e932 Author: Joe Thornber Date: Tue Apr 13 13:09:32 2021 +0100 dm space map disk: cache a small number of index entries The disk space map stores it's index entries in a btree, these are accessed very frequently, so having a few cached makes a big difference to performance. With this change provisioning a new block takes roughly 20% less cpu. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit be500ed721a6ec8d49bf0814c277ce7162acee0e Author: Joe Thornber Date: Tue Apr 13 11:03:45 2021 +0100 dm space maps: improve performance with inc/dec on ranges of blocks When we break sharing on btree nodes we typically need to increment the reference counts to every value held in the node. This can cause a lot of repeated calls to the space maps. Fix this by changing the interface to the space map inc/dec methods to take ranges of adjacent blocks to be operated on. For installations that are using a lot of snapshots this will reduce cpu overhead of fundamental operations such as provisioning a new block, or deleting a snapshot, by as much as 10 times. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 5faafc77f7de69147d1e818026b9a0cbf036a7b2 Author: Joe Thornber Date: Tue Apr 13 09:03:49 2021 +0100 dm space maps: don't reset space map allocation cursor when committing Current commit code resets the place where the search for free blocks will begin back to the start of the metadata device. There are a couple of repercussions to this: - The first allocation after the commit is likely to take longer than normal as it searches for a free block in an area that is likely to have very few free blocks (if any). - Any free blocks it finds will have been recently freed. Reusing them means we have fewer old copies of the metadata to aid recovery from hardware error. Fix these issues by leaving the cursor alone, only resetting when the search hits the end of the metadata device. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 4eafdb1515a708d97e4659bd488ddac19f274c4f Author: Joe Thornber Date: Thu Apr 8 13:47:08 2021 +0100 dm btree: improve btree residency This commit improves the residency of btrees built in the metadata for dm-thin and dm-cache. When inserting a new entry into a full btree node the current code splits the node into two. This can result in very many half full nodes, particularly if the insertions are occurring in an ascending order (as happens in dm-thin with large writes). With this commit, when we insert into a full node we first try and move some entries to a neighbouring node that has space, failing that it tries to split two neighbouring nodes into three. Results are given below. 'Residency' is how full nodes are on average as a percentage. Average instruction counts for the operations are given to show the extra processing has little overhead. +--------------------------+--------------------------+ | Before | After | +------------+-----------+-----------+--------------+-----------+--------------+ | Test | Phase | Residency | Instructions | Residency | Instructions | +------------+-----------+-----------+--------------+-----------+--------------+ | Ascending | insert | 50 | 1876 | 96 | 1930 | | | overwrite | 50 | 1789 | 96 | 1746 | | | lookup | 50 | 778 | 96 | 778 | | Descending | insert | 50 | 3024 | 96 | 3181 | | | overwrite | 50 | 1789 | 96 | 1746 | | | lookup | 50 | 778 | 96 | 778 | | Random | insert | 68 | 3800 | 84 | 3736 | | | overwrite | 68 | 4254 | 84 | 3911 | | | lookup | 68 | 779 | 84 | 779 | | Runs | insert | 63 | 2546 | 82 | 2815 | | | overwrite | 63 | 2013 | 82 | 1986 | | | lookup | 63 | 778 | 82 | 779 | +------------+-----------+-----------+--------------+-----------+--------------+ Ascending - keys are inserted in ascending order. Descending - keys are inserted in descending order. Random - keys are inserted in random order. Runs - keys are split into ascending runs of ~20 length. Then the runs are shuffled. Signed-off-by: Joe Thornber Signed-off-by: Colin Ian King # contains_key() fix Signed-off-by: Mike Snitzer commit 3e2926f8753dac1ded56c8ef3e91f56ee763dafd Author: Alyssa Rosenzweig Date: Fri Jun 4 09:00:11 2021 -0400 drm/panfrost: Add AFBC_FEATURES parameter The value of the AFBC_FEATURES register is required by userspace to determine AFBC support on Bifrost. A user on our IRC channel (#panfrost) reported a workload that raised a fault on one system's Mali G31 but worked flawlessly with another system's Mali G31. We determined the cause to be missing AFBC support on one vendor's Mali implementation -- it turns out AFBC is optional on Bifrost! Whether AFBC is supported or not is exposed in the AFBC_FEATURES register on Bifrost, which reads back as 0 on Midgard. A zero value indicates AFBC is fully supported, provided the architecture itself supports AFBC, allowing backwards-compatibility with Midgard. Bits 0 and 15 indicate that AFBC support is absent for texturing and rendering respectively. The user experiencing the fault reports that AFBC_FEATURES reads back 0x10001 on their system, confirming the architectural lack of AFBC. Userspace needs this parameter to know to disable AFBC on that chip, and perhaps others. v2: Fix typo from copy-paste fail. v3: Bump the UABI version. This commit was cherry-picked from another series so chalking this up to a rebase fail. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Steven Price Cc: Rob Herring Cc: Tomeu Vizoso Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210604130011.3203-1-alyssa.rosenzweig@collabora.com commit 9197bc958fc98ce17341636b3368f180a23d9653 Author: Robin Murphy Date: Fri May 21 14:49:39 2021 +0100 iommu/rockchip: Remove redundant DMA syncs When we allocate new pagetable pages, we don't modify them between the initial dma_map_single() call and the dma_sync_single_for_device() call via rk_iommu_flush(), so the latter is entirely pointless. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/5c29a9ff0a20df0167635b1901f94b5195c1fb28.1621604979.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 314a1e1eabea5b86532e90e0d4e217fa88471e3b Author: Dave Hansen Date: Thu Jun 3 16:08:10 2021 -0700 x86/pkeys: Skip 'init_pkru' debugfs file creation when pkeys not supported The PKRU hardware is permissive by default: all reads and writes are allowed. The in-kernel policy is restrictive by default: deny all unnecessary access until explicitly requested. That policy can be modified with a debugfs file: "x86/init_pkru". This file is created unconditionally, regardless of PKRU support in the hardware, which is a little silly. Avoid creating the file when pkeys are not available. This also removes the need to check for pkey support at runtime, which would be required once the new pkey modification infrastructure is put in place later in this series. Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210603230810.113FF3F2@viggo.jf.intel.com commit aeb27bb76ad8197eb47890b1ff470d5faf8ec9a5 Author: Jiapeng Chong Date: Tue Jun 1 19:07:49 2021 +0800 RDMA/cxgb4: Fix missing error code in create_qp() The error code is missing in this code scenario so 0 will be returned. Add the error code '-EINVAL' to the return value 'ret'. Eliminates the follow smatch warning: drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error code 'ret'. Link: https://lore.kernel.org/r/1622545669-20625-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Jason Gunthorpe commit 2ca11b0e043be6f5c2b188897e9a32275eaab046 Author: Yang Li Date: Wed May 26 10:49:09 2021 +0800 cgroup: Fix kernel-doc Fix function name in cgroup.c and rstat.c kernel-doc comment to remove these warnings found by clang_w1. kernel/cgroup/cgroup.c:2401: warning: expecting prototype for cgroup_taskset_migrate(). Prototype was for cgroup_migrate_execute() instead. kernel/cgroup/rstat.c:233: warning: expecting prototype for cgroup_rstat_flush_begin(). Prototype was for cgroup_rstat_flush_hold() instead. Reported-by: Abaci Robot Fixes: 'commit e595cd706982 ("cgroup: track migration context in cgroup_mgctx")' Signed-off-by: Yang Li Signed-off-by: Tejun Heo commit b1e650db2cc4acca6e7c9974f6a2ca232261173a Author: Joerg Roedel Date: Thu Jun 3 15:02:03 2021 +0200 iommu/amd: Add amd_iommu=force_enable option Add this option to enable the IOMMU on platforms like AMD Stoney, where the kernel usually disables it because it may cause problems in some scenarios. Signed-off-by: Joerg Roedel Acked-by: Alex Deucher Link: https://lore.kernel.org/r/20210603130203.29016-1-joro@8bytes.org commit 4b21a503adf597773e4b37db05db0e9b16a81d53 Author: Alexander Monakov Date: Tue May 4 13:22:20 2021 +0300 iommu/amd: Fix extended features logging print_iommu_info prints the EFR register and then the decoded list of features on a separate line: pci 0000:00:00.2: AMD-Vi: Extended features (0x206d73ef22254ade): PPR X2APIC NX GT IA GA PC GA_vAPIC The second line is emitted via 'pr_cont', which causes it to have a different ('warn') loglevel compared to the previous line ('info'). Commit 9a295ff0ffc9 attempted to rectify this by removing the newline from the pci_info format string, but this doesn't work, as pci_info calls implicitly append a newline anyway. Printing the decoded features on the same line would make it quite long. Instead, change pci_info() to pr_info() to omit PCI bus location info, which is also shown in the preceding message. This results in: pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40 AMD-Vi: Extended features (0x206d73ef22254ade): PPR X2APIC NX GT IA GA PC GA_vAPIC AMD-Vi: Interrupt remapping enabled Fixes: 9a295ff0ffc9 ("iommu/amd: Print extended features in one line to fix divergent log levels") Link: https://lore.kernel.org/lkml/alpine.LNX.2.20.13.2104112326460.11104@monopod.intra.ispras.ru Signed-off-by: Alexander Monakov Cc: Paul Menzel Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: iommu@lists.linux-foundation.org Reviewed-by: Paul Menzel Link: https://lore.kernel.org/r/20210504102220.1793-1-amonakov@ispras.ru Signed-off-by: Joerg Roedel commit c15d4b72098ca3055d98ce0d66127fe37a6a6361 Author: Srinivas Kandagatla Date: Fri Jun 4 12:52:30 2021 +0100 ASoC: qcom: sdm845: add jack support for WCD934x Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210604115230.23259-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 9fb9b1690f0ba6b2c9ced91facc1fc44f5a0d5c1 Author: Srinivas Kandagatla Date: Fri Jun 4 12:52:29 2021 +0100 ASoC: codecs: wcd934x: add mbhc support WCD934x has Multi Button Headset Control hardware to support Headset insertion, type detection, 8 headset buttons detection, Over Current detection and Impedence measurements. This patch adds support for this feature via common mbhc layer. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210604115230.23259-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 0e5c9e7ff899808afa4e2b08c2e6ccc469bed681 Author: Srinivas Kandagatla Date: Fri Jun 4 12:52:28 2021 +0100 ASoC: codecs: wcd: add multi button Headset detection support Most new Qualcomm WCD codecs support MBHC(Multi Button Headset Control) via ADC. This patchset adds support to Common parts of this MBHC support so that WCD codecs need not duplicate them. To do that codec exposes set of register fields and callbacks to this common driver to control it. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210604115230.23259-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit c6d25d5786090edc7299b32160644bb2e468c25d Author: Srinivas Kandagatla Date: Fri Jun 4 12:52:27 2021 +0100 ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection Add bindings required for Multi Button Headset detection. WCD934x support Headsets with upto 8 buttons including, impedance measurement on both L/R Headset speakers and cross connection detection. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210604115230.23259-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 6829222b408f5aa5222c18ea3f492cac19fa9405 Author: Patrice Chotard Date: Fri Jun 4 09:50:09 2021 +0200 spi: stm32-qspi: Fix W=1 build warning Fix the following compilation warning using W=1 build: arm-linux-gnueabi-ld: drivers/spi/spi-stm32-qspi.o: in function `stm32_qspi_poll_status': Reported-by: kernel test robot Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210604075009.25914-1-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit 5eee5eced95f1b35c8567688ed52932b7e58deee Author: Rudi Heitbaum Date: Wed Jun 2 11:29:47 2021 +0000 regulator: fan53555: add tcs4526 For rk3399pro boards the tcs4526 regulator supports the vdd_gpu regulator. The tcs4526 regulator has a chip id of <0>. Add the compatibile tcs,tcs4526 without this patch, the dmesg output is: fan53555-regulator 0-0010: Chip ID 0 not supported! fan53555-regulator 0-0010: Failed to setup device! fan53555-regulator: probe of 0-0010 failed with error -22 with this patch, the dmesg output is: vdd_gpu: supplied by vcc5v0_sys The regulators are described as: - Dedicated power management IC TCS4525 - Lithium battery protection chip TCS4526 This has been tested with a Radxa Rock Pi N10. Signed-off-by: Rudi Heitbaum Link: https://lore.kernel.org/r/20210602112943.GA119@5f9be87369f8 Signed-off-by: Mark Brown commit e78f36bc13591e8d23948996ab6d195f1efa8f40 Author: Bertrand Jacquin Date: Thu Jun 3 23:18:16 2021 +0100 ASoC: snd-soc-lpass requires REGMAP_MMIO With CONFIG_SND_SOC_LPASS_RX_MACRO=m and CONFIG_REGMAP_MMIO undefined, build fails with the following error make -f /var/tmp/portage/sys-kernel/stable-sources-5.12.8/work/linux-5.12.8-stable/scripts/Makefile.modpost sed 's/\.ko$/\.o/' modules.order | scripts/mod/modpost -E -o modules-only.symvers -i vmlinux.symvers -T - ERROR: modpost: "__devm_regmap_init_mmio_clk" [sound/soc/codecs/snd-soc-lpass-rx-macro.ko] undefined! This does also apply to other Qualcomm Macro LPASS all making call to devm_regmap_init_mmio() Signed-off-by: Bertrand Jacquin Link: https://lore.kernel.org/r/20210603221816.2642402-1-bertrand@jacquin.bzh Signed-off-by: Mark Brown commit 50d790012a48f0f2f1dc8e4c214054283e529ae9 Author: Gustavo A. R. Silva Date: Fri Jun 4 02:27:14 2021 -0500 ASoC: ti: davinci-mcasp: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210604072714.GA244640@embeddedor Signed-off-by: Mark Brown commit 14c19b2a40b61b609f68d1d6a5518ebb1c30706f Author: Krzysztof Wilczyński Date: Thu Jun 3 00:01:10 2021 +0000 PCI/sysfs: Add 'devspec' newline Previously, when the value of the "devspec" sysfs attribute was read from the user space there was no newline present, and utilities such as "cat" wouldn't display the result of the read correctly. Append a newline character in the show() function to match other "devspec" attributes. Link: https://lore.kernel.org/r/20210603000112.703037-5-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 381bd3fa8306a56b4bb8703966e6372f1b83762e Author: Krzysztof Wilczyński Date: Thu Jun 3 00:01:09 2021 +0000 PCI/sysfs: Fix 'resource_alignment' newline issues The value of the "resource_alignment" can be specified using a kernel command-line argument ("pci=resource_alignment=") or through the corresponding sysfs attribute under the /sys/bus/pci path. Previously, when the value was set via the kernel command-line argument, and then subsequently accessed through sysfs attribute, the value read back was not correct: # grep -oE 'pci=resource_alignment.+' /proc/cmdline pci=resource_alignment=20@00:1f.2 # cat /sys/bus/pci/resource_alignment 20@00:1f. This was also true when the value was set through the sysfs attribute without including a trailing newline: # echo -n 20@00:1f.2 > /sys/bus/pci/resource_alignment # cat /sys/bus/pci/resource_alignment 20@00:1f. When it was set through the sysfs attribute *including* a newline, reading it back worked as intended: # echo 20@00:1f.2 > /sys/bus/pci/resource_alignment # cat /sys/bus/pci/resource_alignment 20@00:1f.2 To fix this inconsistency, append a trailing newline in the show() function and strip the trailing line in the store() function if one is present. Also, allow for the value previously set using either a command-line argument or through the sysfs object to be cleared at run-time. [bhelgaas: fold in kfree fix from https://lore.kernel.org/linux-pci/20210604133230.983956-4-kw@linux.com] Fixes: e499081da1a2 ("PCI: Force trailing new line to resource_alignment_param in sysfs") Link: https://lore.kernel.org/r/20210603000112.703037-4-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 429b2ba70812fc8ce7c591e787ec0f2b48d13319 Author: Colin Ian King Date: Thu Jun 3 11:33:49 2021 +0100 EDAC/mce_amd: Fix typo "FIfo" -> "Fifo" There is an uppercase letter I in one of the MCE error descriptions instead of a lowercase one. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Borislav Petkov Reviewed-by: Yazen Ghannam Link: https://lkml.kernel.org/r/20210603103349.79117-1-colin.king@canonical.com commit 1faa491a49d53f5d1c8c23bdf01763cfc00a2b19 Author: Eric Dumazet Date: Wed Jun 2 04:21:08 2021 -0700 sched/debug: Remove obsolete init_schedstats() Revert commit 4698f88c06b8 ("sched/debug: Fix 'schedstats=enable' cmdline option"). After commit 6041186a3258 ("init: initialize jump labels before command line option parsing") we can rely on jump label infra being ready for use when setup_schedstats() is called. Signed-off-by: Eric Dumazet Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20210602112108.1709635-1-eric.dumazet@gmail.com commit 603e4922f1c81fc2ed3a87b4f91a8d3aafc7e093 Author: Christoph Hellwig Date: Mon May 31 10:25:26 2021 +0300 remove the raw driver The raw driver used to provide direct unbuffered access to block devices before O_DIRECT was invented. It has been obsolete for more than a decade. Acked-by: Greg Kroah-Hartman Acked-by: Arnd Bergmann Link: https://lore.kernel.org/lkml/Pine.LNX.4.64.0703180754060.6605@CPE00045a9c397f-CM001225dbafb6/ Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210531072526.97052-1-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit 39ee156c5ac1b9ca42cb7086c7893b19596c85ab Author: Zhen Lei Date: Thu Jun 3 17:05:06 2021 +0800 EISA: use DEVICE_ATTR_RO() helper macro Use DEVICE_ATTR_RO() helper macro instead of DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210603090506.11771-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2fa7d74ff54e8c99f7cf04e1749bfca8f8e12e98 Author: Heiner Kallweit Date: Tue Jun 1 09:50:30 2021 +0200 eeprom: ee1004: Remove not needed debug message If a user is interested in such transfer statistics he can simply switch on smbus tracing. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/6169f52e-6ede-d7cc-7f8b-cced55b693d0@gmail.com Signed-off-by: Greg Kroah-Hartman commit 23d51b818151273125e35b1a1ce1b294f7d8c073 Author: Matt Hsiao Date: Mon May 31 16:55:51 2021 +0800 misc: hpilo: map iLO shared memory by PCI revision id Starting from iLO ASIC 'Neches' with subsystem device id 0x00E4, bar 5 is used for shared memory region mapping instead of bar 2 because bar 2 is made inaccessible after system POST for security reason. As this holds true for future iLO ASIC generations, it does not make sense to map shared memory region according to the subsystem device id of each following generations. Map iLO shared memory region with PCI revision id that maps to the iLO ASIC generation, starting from Neches (Rev 7). Signed-off-by: Matt Hsiao Link: https://lore.kernel.org/r/20210531085551.26421-1-matt.hsiao@hpe.com Signed-off-by: Greg Kroah-Hartman commit ce52ec5beecc1079c251f60e3973b3758f60eb59 Author: Zhen Lei Date: Fri May 28 16:26:14 2021 +0800 visorbus: fix error return code in visorchipset_init() Commit 1366a3db3dcf ("staging: unisys: visorbus: visorchipset_init clean up gotos") assigns the initial value -ENODEV to the local variable 'err', and the first several error branches will return this value after "goto error". But commit f1f537c2e7f5 ("staging: unisys: visorbus: Consolidate controlvm channel creation.") overwrites 'err' in the middle of the way. As a result, some error branches do not successfully return the initial value -ENODEV of 'err', but return 0. In addition, when kzalloc() fails, -ENOMEM should be returned instead of -ENODEV. Fixes: f1f537c2e7f5 ("staging: unisys: visorbus: Consolidate controlvm channel creation.") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210528082614.9337-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit fe4f3eb1fd5ab4bec5f105ef6e51bacac698af3b Author: Masami Hiramatsu Date: Wed May 26 23:51:29 2021 +0900 perf probe: Add permission and sysctl notice to man page Add a section to notify the permission and sysctl setting for perf probe. And fix some indentations. Reported-by: Ravi Bangoria Signed-off-by: Masami Hiramatsu Reviewed-by: Ravi Bangoria Cc: Aneesh Kumar K.V Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/162204068898.388434.16842705842611255787.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 043d7f09bf614809c10c4acbf0695ef731958300 Author: Daniel Scally Date: Thu Jun 3 23:40:05 2021 +0100 gpiolib: acpi: Add acpi_gpio_get_io_resource() Add a function to verify that a given ACPI resource represents a GpioIo() type of resource, and return it if so. Reviewed-by: Andy Shevchenko Signed-off-by: Daniel Scally Signed-off-by: Andy Shevchenko commit 43582f29b161d820717bc13f562bca27af12e3cf Author: Daniel Scally Date: Thu Jun 3 23:40:04 2021 +0100 gpiolib: acpi: Introduce acpi_get_and_request_gpiod() helper We need to be able to translate GPIO resources in an ACPI device's _CRS into GPIO descriptor array. Those are represented in _CRS as a pathname to a GPIO device plus the pin's index number: the acpi_get_gpiod() function is perfect for that purpose. As it's currently only used internally within the GPIO layer, provide and export a wrapper function that additionally holds a reference to the GPIO device. Reviewed-by: Andy Shevchenko Signed-off-by: Daniel Scally Signed-off-by: Andy Shevchenko commit 2877389f59dc455e4283ae23ad494b410c15b3a3 Author: Zhen Lei Date: Wed Jun 2 09:48:39 2021 +0800 tty: vcc: use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Acked-by: David S. Miller Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210602014839.10587-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 92e669017ff1616ba7d8ba3c65f5193bc2a7acbe Author: Nicolas Ferre Date: Fri Jun 4 15:19:25 2021 +0200 dt-bindings: i2c: at91: fix example for scl-gpios The SCL gpio pin used by I2C bus for recovery needs to be configured as open drain, so fix the binding example accordingly. In relation with fix c5a283802573 ("ARM: dts: at91: Configure I2C SCL gpio as open drain"). Signed-off-by: Nicolas Ferre Fixes: 19e5cef058a0 ("dt-bindings: i2c: at91: document optional bus recovery properties") commit cb1c81467af355829a4a9d8fa3f92ffab355d93c Author: Christian König Date: Fri Apr 30 09:48:27 2021 +0200 drm/ttm: flip the switch for driver allocated resources v2 Instead of both driver and TTM allocating memory finalize embedding the ttm_resource object as base into the driver backends. v2: fix typo in vmwgfx grid mgr and double init in amdgpu_vram_mgr.c Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-10-christian.koenig@amd.com commit d3bcb4b02fe977d6b7a82dbb6288e9223b5b6732 Author: Christian König Date: Mon Apr 26 17:03:34 2021 +0200 drm/vmwgfx: switch the TTM backends to self alloc Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-9-christian.koenig@amd.com commit beb4c86521bcc2620078137a6495371bb63ee501 Author: Christian König Date: Mon Apr 26 15:48:36 2021 +0200 drm/nouveau: switch the TTM backends to self alloc Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-8-christian.koenig@amd.com commit 267501ec2b9cfadcae1056961c99ea0c248a6649 Author: Christian König Date: Mon Apr 26 15:38:33 2021 +0200 drm/amdgpu: switch the VRAM backend to self alloc Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-7-christian.koenig@amd.com commit f700b18c8583fb5d702536e537947cba3d136519 Author: Christian König Date: Fri Apr 23 18:51:46 2021 +0200 drm/amdgpu: switch the GTT backend to self alloc Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-6-christian.koenig@amd.com commit 2fdcb55dfc86835e4845e3f422180b5596d23cb4 Author: Christian König Date: Fri May 21 15:50:19 2021 +0200 drm/amdkfd: use resource cursor in svm_migrate_copy_to_vram v2 Access to the mm_node is now forbidden. So instead of hand wiring that use the cursor functionality. v2: fix handling as pointed out by Philip. Signed-off-by: Christian König Reviewed-by: Matthew Auld Reviewed-by and Tested-by: Philip Yang Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-5-christian.koenig@amd.com commit d624e1bfa579d3918634fccb0775452d68c14270 Author: Christian König Date: Fri Feb 12 16:29:49 2021 +0100 drm/amdgpu: revert "drm/amdgpu: stop allocating dummy GTT nodes" TTM is going to need this again since we are moving the resource allocation into the backend. Signed-off-by: Christian König Acked-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-4-christian.koenig@amd.com commit db7349534275620016805123311a979a46364769 Author: Christian König Date: Tue Apr 27 09:35:17 2021 +0200 drm/ttm: flip over the sys manager to self allocated nodes Make sure to allocate a resource object here. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-3-christian.koenig@amd.com commit 3eb7d96e94150304011d214750b45766cf62d9c9 Author: Christian König Date: Sat Apr 17 18:48:36 2021 +0200 drm/ttm: flip over the range manager to self allocated nodes Start with the range manager to make the resource object the base class for the allocated nodes. While at it cleanup a lot of the code around that. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-2-christian.koenig@amd.com commit bfa3357ef9abc9d56a2910222d2deeb9f15c91ff Author: Christian König Date: Thu Apr 15 09:52:58 2021 +0200 drm/ttm: allocate resource object instead of embedding it v2 To improve the handling we want the establish the resource object as base class for the backend allocations. v2: add missing error handling Signed-off-by: Christian König Acked-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20210602100914.46246-1-christian.koenig@amd.com commit 3b2cd60689fa439481f535ee4463fb223a276f43 Author: Biju Das Date: Thu Jun 3 23:17:56 2021 +0100 serial: sh-sci: Add support for RZ/G2L SoC Add serial support for RZ/G2L SoC with earlycon and extended mode register support. Signed-off-by: Biju Das Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210603221758.10305-11-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit d157fca711ad42e75efef3444c83d2e1a17be27a Author: Daniel Mack Date: Fri May 28 15:33:20 2021 +0200 serial: tty: uartlite: fix console setup Remove the hack to assign the global console_port variable at probe time. This assumption that cons->index is -1 is wrong for systems that specify 'console=' in the cmdline (or 'stdout-path' in dts). Hence, on such system the actual console assignment is ignored, and the first UART that happens to be probed is used as console instead. Move the logic to console_setup() and map the console to the correct port through the array of available ports instead. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20210528133321.1859346-1-daniel@zonque.org Signed-off-by: Greg Kroah-Hartman commit 236b26f18814669c6311c067ff4ed0491992e6f2 Author: Fabien Lahoudere Date: Fri Apr 30 19:50:38 2021 +0200 ARM: dts: imx53-ppd: add dma-info nodes GEHC CS ONE (codename is PPD), has multiple microcontrollers connected via UART controlling. UART2 is connected to an on-board microcontroller at 19200 baud, which constantly pushes critical data (so aging character detect interrupt will never trigger). This data must be processed at 50-200 Hz, so UART should return data in less than 5-20ms. With 1024 byte DMA buffer (and a constant data stream) the read operation instead needs 1024 byte / 19200 baud = 53.333ms, which is way too long (note: Worst case would be remote processor sending data with short pauses <= 7 characters, which would further increase this number). The current downstream kernel instead configures 24 bytes resulting in 1.25ms, but that is obviously not sensible for normal UART use cases and cannot be used as new default. The same device also has another microcontroller with a 4M baud connected to UART5 exchanging lots of data. For this the same mechanism can be used to increase the buffer size (downstream uses 4K instead of the default 1K) with potentially slightly reduced buffer count. At this baud rate latency is not an issue (4096 byte / 4M baud = 0.977 ms). Before increasing the default buffer count from 4 to 16 in 76c38d30fee7, this was required to avoid data loss. With the changed default it's a performance optimization. Signed-off-by: Fabien Lahoudere [replace commit message] Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20210430175038.103226-3-sebastian.reichel@collabora.com Signed-off-by: Greg Kroah-Hartman commit db0a196bd8ad1d6bb4b1a9e54f54c09f8dc2cc25 Author: Fabien Lahoudere Date: Fri Apr 30 19:50:37 2021 +0200 serial: imx: Add DMA buffer configuration via DT In order to optimize serial communication (performance/throughput VS latency), we may need to tweak DMA period number and size. This adds DT properties to configure those values before initialising DMA. The defaults will stay the same as before. [update documentation and commit message, rebase to current master, switch back to DT instead of sysfs] Signed-off-by: Fabien Lahoudere Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20210430175038.103226-2-sebastian.reichel@collabora.com Signed-off-by: Greg Kroah-Hartman commit 33e82ff2a05517c1380f7d765dee9a18b867cea0 Author: Stefan Wahren Date: Thu Jun 3 17:50:05 2021 +0200 staging: vchiq_core: introduce handle_poll The function slot_handler_func() has very deep indentations. Moving the poll handling into separate function could improve the readability. Use the return value to keep the poll_needed handling at the same place. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-17-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 826818f88bc2f4186427214d59612090beabeb39 Author: Stefan Wahren Date: Thu Jun 3 17:50:04 2021 +0200 staging: vchiq_connected: move EXPORT_SYMBOL below the right function It's more intuitive to have the EXPORT_SYMBOL() call below the matching definition. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-16-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit bc60b0f834a332a07431147e8c1e9acb8d64de91 Author: Stefan Wahren Date: Thu Jun 3 17:50:03 2021 +0200 staging: vchiq_core: store message id in local variable Some queue_message() calls are still rather complex to read. So store the message ids in a local variable in those cases. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-15-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 60f394b50fa07cf27ffcb2f73f56682a40a68540 Author: Stefan Wahren Date: Thu Jun 3 17:50:02 2021 +0200 staging: vchiq_core: reduce indentation in parse_open The function parse_open() already has bail out sections like fail_open. So use a goto for the other error cases like payload size is too small and listening service cannot be found. This avoids two indentation levels. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-14-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 88a6ab1d0ab1374bdd6216044f9033b25d4cde5c Author: Stefan Wahren Date: Thu Jun 3 17:50:01 2021 +0200 staging: vchiq_core: introduce process_free_data_message This moves the special handling for data messages from process_free_queue() into a new function. After this process_free_queue() has less extreme indentation and should be easier to read. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-13-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 68a485965abad7c50b60ab70624582b940cca259 Author: Stefan Wahren Date: Thu Jun 3 17:50:00 2021 +0200 staging: vchiq_arm: tidy up service function naming During a recent review Dan Carpenter reported that the function naming of (un)lock_service is misleading. They are like wrapper around kref_get / kref_put and don't have anything to do with locking. So use a name which represent more the actual behavior. Btw add the vchiq prefix to avoid possible name conflicts. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-12-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 75f0a4f2c1f7c59c921756210914419232e7684d Author: Stefan Wahren Date: Thu Jun 3 17:49:59 2021 +0200 staging: vchiq_core: simplify WARN_ON conditions During a recent review Dan Carpenter noticed a double negation in a WARN_ON. But a quick search revealed more unnecessary complex WARN_ON conditions. This change should simplify them. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-11-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 86aee79ed49c8513faefe3b5a0d1324663e640cf Author: Stefan Wahren Date: Thu Jun 3 17:49:58 2021 +0200 staging: vchiq_core: introduce message specific make macros VCHIQ_MAKE_MSG isn't optimal because a lot of message types doesn't need a parameter. So better define a macro for every message type which is used. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-10-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit a6dd3f26175298ff1a3283bee7273905563f28bc Author: Stefan Wahren Date: Thu Jun 3 17:49:57 2021 +0200 staging: vchiq_core: use define for message type shift Make it clear and use a define for shifting the message type. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-9-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 525dd8a36c3323ebfca54ccbf3aa79f19901f554 Author: Stefan Wahren Date: Thu Jun 3 17:49:56 2021 +0200 staging: vchiq_core: avoid precedence issues Add () around macro argument to avoid precedence issues Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 9d5f721f8c60bc07acfbad7821cf54db56c362e1 Author: Stefan Wahren Date: Thu Jun 3 17:49:55 2021 +0200 staging: vchiq_core: put spaces around operators This fixes the checkpatch issues regarding missing spaces around operators. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 15618b35bdbfe9b355f1deee61a54d3d65583e13 Author: Stefan Wahren Date: Thu Jun 3 17:49:54 2021 +0200 staging: vchiq_core: get the rid of vchiq_static_assert Use static_assert from the kernel instead of opencode it. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit e63becb7f30830ed142f889bb0894d76df56d3b4 Author: Stefan Wahren Date: Thu Jun 3 17:49:53 2021 +0200 staging: vchiq_core: get the rid of IS_POW2 The macro IS_POW2 is only used to ensure some size are powers of 2. Better use BUILD_BUG_ON_NOT_POWER_OF_2 for this. Since this must be done in a function, merge all these checks in a new function. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit b9fab6798a96b0c6af54803e3d7d520813d53975 Author: Stefan Wahren Date: Thu Jun 3 17:49:52 2021 +0200 staging: vchiq_core: move internals to C source There is no need to export those definitions, so keep them in the source file. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit eb928dad1604d0762d5bd677940cbb9dc0e74cc5 Author: Stefan Wahren Date: Thu Jun 3 17:49:51 2021 +0200 staging: vchiq_arm: introduce free_bulk_waiter Avoid the copy & paste of freeing the bulk waiter and move it into a separate function. Found by CPD. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 447fbc14f4166c70a088ad2fc858fe7ca23aee88 Author: Stefan Wahren Date: Thu Jun 3 17:49:50 2021 +0200 staging: vchiq_core: fix logic in poll_services_of_group Commit "staging: vchiq_core: avoid indention in poll_services_of_group" tries to reduce the indention, but the parts regarding the third if statement breaks the logic. So restore them and prevent vchiq_test from hanging during the ping test. Fixes: 2f440843a7d4 ("staging: vchiq_core: avoid indention in poll_services_of_group") Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1622735405-9980-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit bdf696a019871398600d038c6bc7f4abe4e73a97 Author: Sergio Paracuellos Date: Fri Jun 4 08:30:31 2021 +0200 staging: mt7621-dts: review pcie overlay in 'gbpc1' dts file pcie node is being overlayed in 'gbpc1.dts' file requesting three gpio reset pins for each pcie port. Gnubee only needs general gpio 19 to properly reset and make all of them work. This pin is already requested in the general 'mt7621.dtsi' file as well as is the pinctrl pins. So we only need to enable the node in the overlay and all the other stuff can be safely deleted. Also, pin 8 is being requested for gpio-leds node and there was an error on boot before this changes because of pin was already assigned (EBUSY): leds-gpio: probe of gpio-leds failed with error -16 With this changes this error has disappear and the board is properly booting without any other regression. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604063031.13599-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a576764e4190f7b48cf3cf40f4294f001918605 Author: Rikard Falkeborn Date: Fri May 28 23:34:08 2021 +0200 drivers/base: Constify static attribute_group structs These are only used by putting their address in an array of pointers to const struct attribute_group (either directly or via the __ATTRIBUTE_GROUP macro). Make them const to allow the compiler to place them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210528213408.20067-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7f787701b2981d1a22f3951612fbb5a97ee658d3 Author: Masahiro Yamada Date: Sat May 29 02:34:03 2021 +0900 firmware_loader: remove unneeded 'comma' macro Commit 553671b76859 ("firmware_loader: Fix labels with comma for builtin firmware") added this line, which was unneeded. The macro 'comma' is defined in scripts/Kbuild.include. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210528173404.169764-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4e0c02431a71d4e9bd368320b389371df48d2e66 Author: Johannes Berg Date: Fri May 28 10:03:14 2021 +0200 devcoredump: remove contact information That email address hasn't existed for a long time, and the mailing address is pretty useless; remove all of this. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20210528100314.d419f6e8e2d2.Ica8076036c755d6f782becd62d04c41361323130@changeid Signed-off-by: Greg Kroah-Hartman commit 4e566003571244f508408f59ce78f6ac2ccdba8e Author: Kees Cook Date: Thu Jun 3 18:40:55 2021 -0700 drm/pl111: Actually fix CONFIG_VEXPRESS_CONFIG depends VEXPRESS_CONFIG needs to either be missing, built-in, or modular when pl111 is modular. Update the Kconfig to reflect the need. Fixes: 4dc7c97d04dc ("drm/pl111: depend on CONFIG_VEXPRESS_CONFIG") Signed-off-by: Kees Cook Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210604014055.4060521-1-keescook@chromium.org commit eab4e6d953c1059a30ac0f15826abc7dd2374d3c Author: Carl Philipp Klemm Date: Fri Apr 23 15:00:57 2021 +0200 power: supply: cpcap-charger: get the battery inserted infomation from cpcap-battery This avoids reimplementing the detection logic twice and removes the possibility of activating charging with 500mA even if a battery is not detected. Signed-off-by: Carl Philipp Klemm Signed-off-by: Sebastian Reichel commit aecd127b45eac8ce0ff667a4a855ff66905fb88c Author: Carl Philipp Klemm Date: Fri Apr 23 14:58:31 2021 +0200 power: supply: cpcap-battery: invalidate config when incompatible measurements are read This invalidates empty->counter_uah and charge_full when charge_now indicates that they are grossly wrong and adds some tolerance to POWER_SUPPLY_PROP_CHARGE_FULL to allow for inaccuracies in the charge counter and manufacturing tolerances in the battery. Signed-off-by: Carl Philipp Klemm Signed-off-by: Sebastian Reichel commit 6a0fcc87c9e35191d37a8819fdab9d30e523515b Author: Hermann Lauer Date: Wed May 12 12:58:56 2021 +0200 power: supply: axp20x_battery: allow disabling battery charging Allow disabling and re-enabling battery charging of an axp209 PMIC through a writable status property. With the current driver code charging is always on. This works on the axp209 of Banana {Pi M1+,Pro} and should work on all AXP chips. Signed-off-by: Hermann.Lauer@uni-heidelberg.de Signed-off-by: Sebastian Reichel commit 0c6b522abc2a592468992780babd3c3629c7ceac Author: Christian König Date: Thu May 6 14:16:01 2021 +0200 dma-buf: cleanup dma-resv shared fence debugging a bit v2 Make that a function instead of inline. v2: improve the kerneldoc wording as suggested by Daniel Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-3-christian.koenig@amd.com commit 6ba53317d497dec029bfb040b1daf38328fa00ab Author: Nicholas Piggin Date: Wed May 26 22:58:51 2021 +1000 KVM: PPC: Book3S HV: Save host FSCR in the P7/8 path Similar to commit 25edcc50d76c ("KVM: PPC: Book3S HV: Save and restore FSCR in the P9 path"), ensure the P7/8 path saves and restores the host FSCR. The logic explained in that patch actually applies there to the old path well: a context switch can be made before kvmppc_vcpu_run_hv restores the host FSCR and returns. Now both the p9 and the p7/8 paths now save and restore their FSCR, it no longer needs to be restored at the end of kvmppc_vcpu_run_hv Fixes: b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs") Cc: stable@vger.kernel.org # v3.14+ Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210526125851.3436735-1-npiggin@gmail.com commit 87191ca9f90244d4e003fbe5c77390b5e585a5ef Author: Alan Stern Date: Thu May 20 16:22:06 2021 -0400 USB: UDC: Implement udc_async_callbacks in net2272 This patch adds a udc_async_callbacks handler to the net2272 UDC driver, which will prevent a theoretical race during gadget unbinding. The net2272 driver is sufficiently complicated that I didn't want to mess around with IRQ settings. Instead, the patch simply adds a new flag to control async callbacks, and checks the flag before issuing any of them. Acked-by: Felipe Balbi Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210520202206.GF1216852@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit b42e8090ba93526d6063108b25e5fc0f11f58770 Author: Alan Stern Date: Thu May 20 16:22:00 2021 -0400 USB: UDC: Implement udc_async_callbacks in net2280 This patch adds a udc_async_callbacks handler to the net2280 UDC driver, which will prevent a theoretical race during gadget unbinding. The net2280 driver is sufficiently complicated that I didn't want to mess around with IRQ settings. Instead, the patch simply adds a new flag to control async callbacks, and checks the flag before issuing any of them. Acked-by: Felipe Balbi Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210520202200.GE1216852@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 04145a03db9d78469e0817ab3a767c76c0fb0947 Author: Alan Stern Date: Thu May 20 16:21:52 2021 -0400 USB: UDC: Implement udc_async_callbacks in dummy-hcd This patch adds a udc_async_callbacks handler to the dummy-hcd UDC driver, which will prevent a theoretical race during gadget unbinding. The implementation is simple, since dummy-hcd already has a flag to keep track of whether emulated IRQs are enabled. All the handler has to do is store the enable value in the flag, and avoid setting the flag prematurely. Acked-by: Felipe Balbi Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210520202152.GD1216852@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 7dc0c55e9f302e7048e040ee4437437bbea1e2cd Author: Alan Stern Date: Thu May 20 16:21:44 2021 -0400 USB: UDC core: Add udc_async_callbacks gadget op The Gadget API has a theoretical race when a gadget driver is unbound. Although the pull-up is turned off before the driver's ->unbind callback runs, if the USB cable were to be unplugged at just the wrong moment there would be nothing to prevent the UDC driver from invoking the ->disconnect callback after the unbind has finished. In theory, other asynchronous callbacks could also happen during the time before the UDC driver's udc_stop routine is called, and the gadget driver would not be prepared to handle any of them. We need a way to tell UDC drivers to stop issuing asynchronous (that is, ->suspend, ->resume, ->disconnect, ->reset, or ->setup) callbacks at some point after the pull-up has been turned off and before the ->unbind callback runs. This patch adds a new ->udc_async_callbacks callback to the usb_gadget_ops structure for precisely this purpose, and it adds the corresponding support to the UDC core. Later patches in this series add support for udc_async_callbacks to several UDC drivers. Acked-by: Felipe Balbi Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210520202144.GC1216852@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit ab1150e9576f5889107568329ebc62902ed83682 Author: Aswath Govindraju Date: Fri May 28 11:36:57 2021 +0530 doc: dt-binding: cdns,usb3: Add interrupt-names property under required In the driver the interrupts are fetched by name. Therefore, add interrupt names in the list of required properties Fixes: 68989fe1c39d ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema") Signed-off-by: Aswath Govindraju Link: https://lore.kernel.org/r/20210528060657.29100-1-a-govindraju@ti.com Signed-off-by: Greg Kroah-Hartman commit 068d9d754bc15f30ff2f73b9f50aba85420a08b2 Author: Christian König Date: Tue May 11 10:42:52 2021 +0200 dma-buf: add SPDX header and fix style in dma-resv.c dma_resv_lockdep() seems to have some space/tab mixups. Fix that and move the function to the end of the file. Also fix some minor things checkpatch.pl pointed out while at it. No functional change. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602140359.272601-2-christian.koenig@amd.com commit 680753dd9d7d9e4a64515f41cc882471869963a6 Author: Christian König Date: Thu May 6 15:00:31 2021 +0200 dma-buf: fix inconsistent debug print v2 Drop the whole rcu handling since we are holding the resv lock anyway. v2: drop all rcu handling instead. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602140359.272601-1-christian.koenig@amd.com commit cd70c85c5752f060b09b0cf5b7694717471ce998 Author: Krzysztof Kozlowski Date: Fri May 7 12:19:27 2021 -0400 power: supply: max17040: drop unused platform data support There are no platforms using the driver with platform data (no board files with the driver), so the dead code can be dropped. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit ce0ae8324e0953292a9a745ec074497ba9c1c7d3 Author: Krzysztof Kozlowski Date: Fri May 7 12:19:26 2021 -0400 power: supply: max17040: simplify POWER_SUPPLY_PROP_ONLINE The driver was reporting POWER_SUPPLY_PROP_ONLINE via platform data functions or '1' if no platform data was provided. Since there are no platforms using the driver with platform data (no board files with the driver), the online property can be simplified to always return '1'. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit c603bec359aece14c5e74a4aa174822692fba7d6 Author: Krzysztof Kozlowski Date: Fri May 7 12:19:25 2021 -0400 power: supply: max17040: remove non-working POWER_SUPPLY_PROP_STATUS The driver was reporting POWER_SUPPLY_PROP_STATUS via platform data functions. Without platform data, the max17040_get_status() functions returns early with POWER_SUPPLY_STATUS_UNKNOWN. Since there are no platforms using the driver with platform data (no board files with the driver), the status property was always unknown. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 8ef9f687abff3b8e44578b810a74fdcf753478f3 Author: Zhen Lei Date: Tue May 11 17:49:19 2021 +0800 power: reset: at91-sama5d2_shdwc: Remove redundant error printing in at91_shdwc_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Sebastian Reichel commit ed3443fb4df4e140a22f65144546c8a8e1e27f4e Author: Bixuan Cui Date: Sat May 8 11:14:59 2021 +0800 power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Sebastian Reichel commit f3076cd8d1d5fa64b5e1fa5affc045c2fc123baa Author: Stephan Gerhold Date: Mon May 17 12:51:12 2021 +0200 power: supply: rt5033_battery: Fix device tree enumeration The fuel gauge in the RT5033 PMIC has its own I2C bus and interrupt line. Therefore, it is not actually part of the RT5033 MFD and needs its own of_match_table to probe properly. Also, given that it's independent of the MFD, there is actually no need to make the Kconfig depend on MFD_RT5033. Although the driver uses the shared header, there is no compile or runtime dependency on the RT5033 MFD driver. Cc: Beomho Seo Cc: Chanwoo Choi Fixes: b847dd96e659 ("power: rt5033_battery: Add RT5033 Fuel gauge device driver") Signed-off-by: Stephan Gerhold Signed-off-by: Sebastian Reichel commit 4a8fd33517daa6020f10c31f609f9ec8a07775f8 Author: Stephan Gerhold Date: Mon May 17 12:51:11 2021 +0200 dt-bindings: power: supply: Add DT schema for richtek,rt5033-battery The RT5033 PMIC provides a simple fuel gauge via I2C. Add a DT schema to describe how to set it up in the device tree. Note that although RT5033 is a MFD with lots of functionality (also charger, regulator, LEDs, ...) the fuel gauge has a separate I2C bus and is not part of the MFD. Cc: Beomho Seo Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 4b53bdd53a90cd660918766f445c0ee16fe57cf1 Author: Matti Vaittinen Date: Tue May 25 13:15:47 2021 +0300 power: supply: Drop BD70528 support The only known BD70528 use-cases are such that the PMIC is controlled from separate MCU which is not running Linux. I am not aware of any Linux driver users. Furthermore, it seems there is no demand for this IC. Let's ease the maintenance burden and drop the driver. We can always add it back if there is sudden need for it. Signed-off-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 8bb2314fc22628333d89df83d695ff9a8d2a6eac Author: Krzysztof Kozlowski Date: Wed May 26 13:20:36 2021 -0400 power: supply: max17040: Do not enforce (incorrect) 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 falling - but instead rely on Devicetree to configure it. The Maxim 14577/77836 datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. Signed-off-by: Krzysztof Kozlowski Acked-by: Iskren Chernev Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit 7fbf6b731bca347700e460d94b130f9d734b33e9 Author: Krzysztof Kozlowski Date: Wed May 26 13:20:35 2021 -0400 power: supply: max17042: Do not enforce (incorrect) 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 falling - but instead rely on Devicetree to configure it. The Maxim 17047/77693 datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU therefore the edge falling is not correct. The interrupt line is shared between PMIC and RTC driver, so using level sensitive interrupt is here especially important to avoid races. With an edge configuration in case if first PMIC signals interrupt followed shortly after by the RTC, the interrupt might not be yet cleared/acked thus the second one would not be noticed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit d233504af7db9f4ddbbc4b04513d5ca657e7ae1f Author: Lokesh Vutla Date: Tue Jun 1 11:14:02 2021 +0530 dt-bindings: pwm: pwm-tiehrpwm: Add compatible string for AM64 SoC Add compatible string for AM64 SoC in device tree binding. EPWM IP in AM64 does not support High resolution, so named epwm instead of ehrpwm in compatible. However IP is till compatible with features supported by driver with ti,am3352-ehrpwm compatible. Signed-off-by: Lokesh Vutla Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 2ba4597d932b45b25bc2e6604c1dbbb08e444cb7 Author: Lokesh Vutla Date: Tue Jun 1 11:14:01 2021 +0530 dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Convert the tiehrpwm binding to DT schema format using json-schema. Along with this conversion the following changes are included: - 'clock' and 'clock-names' properties are marked as required as driver fails to probe without these properties - Dropped ti,am33xx-ehrpwm as it is no longer applicable. - 'power-domains' property is introduced and marked as optional. Signed-off-by: Lokesh Vutla Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit 79dd354fe1769ebec695dacfee007eafb1538d0c Author: Clemens Gruber Date: Fri May 7 15:18:45 2021 +0200 pwm: pca9685: Add error messages for failed regmap calls Regmap operations can fail if the underlying subsystem is not working properly (e.g. hogged I2C bus, etc.) As this is useful information for the user, print an error message if it happens. Let probe fail if the first regmap_read or the first regmap_write fails. Signed-off-by: Clemens Gruber Signed-off-by: Thierry Reding commit 6d6e7050276d40b5de97aa950d5d71057f2e2a25 Author: Clemens Gruber Date: Fri May 7 15:18:44 2021 +0200 pwm: pca9685: Restrict period change for enabled PWMs Previously, the last used PWM channel could change the global prescale setting, even if other channels are already in use. Fix it by only allowing the first enabled PWM to change the global chip-wide prescale setting. If there is more than one channel in use, the prescale settings resulting from the chosen periods must match. GPIOs do not count as enabled PWMs as they are not using the prescaler and can't change it. Signed-off-by: Clemens Gruber Signed-off-by: Thierry Reding commit ae16db1fd3a1b8d1713ba6af5cf27be32918d2b8 Author: Clemens Gruber Date: Fri May 7 15:18:43 2021 +0200 pwm: pca9685: Support new usage_power setting in PWM state If usage_power is set, the pca9685 driver will phase shift the individual channels relative to their channel number. This improves EMI because the enabled channels no longer turn on at the same time, while still maintaining the configured duty cycle / power output. Signed-off-by: Clemens Gruber Signed-off-by: Thierry Reding commit 9e40ee18a1dc1623a5368d6232aaed52fd29dada Author: Clemens Gruber Date: Fri May 7 15:18:42 2021 +0200 pwm: core: Support new usage_power setting in PWM state If usage_power is set, the PWM driver is only required to maintain the power output but has more freedom regarding signal form. If supported, the signal can be optimized, for example to improve EMI by phase shifting individual channels. Signed-off-by: Clemens Gruber Signed-off-by: Thierry Reding commit 84bdf4571d4dc36207bbc4b0fb2711723ee313d4 Author: Daniele Ceraolo Spurio Date: Wed Jun 2 22:16:30 2021 -0700 drm/i915/guc: Use guc_class instead of engine_class in fw interface GuC has its own defines for the engine classes. They're currently mapping 1:1 to the defines used by the driver, but there is no guarantee this will continue in the future. Given that we've been caught off-guard in the past by similar divergences, we can prepare for the changes by introducing helper functions to convert from engine class to GuC class and back again. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: John Harrison Cc: Michal Wajdeczko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-21-matthew.brost@intel.com commit e09be87af54f703a67f6b573f6a12b8349c5c8f5 Author: Michal Wajdeczko Date: Wed Jun 2 22:16:29 2021 -0700 drm/i915/guc: Early initialization of GuC send registers Base offset and count of the GuC scratch registers, used for sending MMIO messages to GuC, can be initialized earlier with other GuC members that also depends on platform. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Daniele Ceraolo Spurio Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-20-matthew.brost@intel.com commit 8d99e09c5d1c20a3763e84d5f09619fa33e33186 Author: Michal Wajdeczko Date: Wed Jun 2 22:16:28 2021 -0700 drm/i915/guc: Always copy CT message to new allocation Since most of future CT traffic will be based on G2H requests, instead of copying incoming CT message to static buffer and then create new allocation for such request, always copy incoming CT message to new allocation. Also by doing it while reading CT header, we can safely fallback if that atomic allocation fails. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Piotr Piórkowski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-19-matthew.brost@intel.com commit 65dd4ed0f4e1ce2ccf8ddc66a6ee026b20f0c24c Author: Michal Wajdeczko Date: Wed Jun 2 22:16:27 2021 -0700 drm/i915/guc: Don't receive all G2H messages in irq handler In irq handler try to receive just single G2H message, let other messages to be received from tasklet. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-18-matthew.brost@intel.com commit 2e496ac200c13ab1de6dc504a2566c612b493a4e Author: Michal Wajdeczko Date: Wed Jun 2 22:16:26 2021 -0700 drm/i915/guc: Stop using mutex while sending CTB messages We are no longer using descriptor to hold G2H replies and we are protecting access to the descriptor and command buffer by the separate spinlock, so we can stop using mutex. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-17-matthew.brost@intel.com commit d35ca600873eebceb071af81bdc279fb6ec538db Author: Matthew Brost Date: Wed Jun 2 22:16:25 2021 -0700 drm/i915/guc: Ensure H2G buffer updates visible before tail update Ensure H2G buffer updates are visible before descriptor tail updates by inserting a barrier between the H2G buffer update and the tail. The barrier is simple wmb() for SMEM and is register write for LMEM. This is needed if more than 1 H2G can be inflight at once. If this barrier is not inserted it is possible the descriptor tail update is scene by the GuC before H2G buffer update which results in the GuC reading a corrupt H2G value. This can bring down the H2G channel among other bad things. Signed-off-by: Matthew Brost Cc: Michal Wajdeczko Reviewed-by: John Harrison Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-16-matthew.brost@intel.com commit 7c567bbf6f267c7379ddbba7afba7608d6e8e39f Author: Michal Wajdeczko Date: Wed Jun 2 22:16:24 2021 -0700 drm/i915/guc: Start protecting access to CTB descriptors We want to stop using guc.send_mutex while sending CTB messages so we have to start protecting access to CTB send descriptor. For completeness protect also CTB receive descriptor. Add spinlock to struct intel_guc_ct_buffer and start using it. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-15-matthew.brost@intel.com commit 9654c414bfdca1a62d17e8ae1085a5a2703b6a89 Author: Jonathan Cameron Date: Thu Jun 3 20:36:16 2021 +0100 iio: adis: Cleanout unused headers 0-day recently added the include-what-you-use header checker and it gave a warning on an adis patch. As such I decided to run it on all the adis drivers and see if it made sensible suggestions. Note this doesn't represent a complete list of what it suggested changing as I filtered out a few on the basis they are standard headers used to effectively include a bunch of other headers. Could split this into a patch per driver if people prefer. Note to anyone else trying this tool is that it is somewhat of a loose cannon so you will be wanting to carefully check any suggestions before proposing patches! I thought about also reorganising the headers whilst here, but that would make this patch harder to read, or lead to another rather noisy patch across most of the files. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210603193616.3708447-1-jic23@kernel.org commit df12d1c3014f5a2f37e561a5331cf4bb7563b937 Author: Michal Wajdeczko Date: Thu Jun 3 16:04:08 2021 -0700 drm/i915/guc: Update sizes of CTB buffers Future GuC will require CTB buffers sizes to be multiple of 4K. Make these changes now as this shouldn't impact us too much. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: John Harrison Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603230408.54856-2-matthew.brost@intel.com commit b43f0fc8b8c81e3001526c7205f12d8a931a48dd Author: Michal Wajdeczko Date: Thu Jun 3 16:04:07 2021 -0700 drm/i915/guc: Replace CTB array with explicit members Upcoming GuC firmware will always require just two CTBs and we also plan to configure them with different sizes, so definining them as array is no longer suitable. v2: Use %p for ptrdiff print v3: Use %tx for ptrdiff print Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Reported-by: kernel test robot Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603230408.54856-1-matthew.brost@intel.com commit b4318ce203db8f8b7004e7ab82a957f894660c88 Author: Krzysztof Kozlowski Date: Thu May 6 16:27:28 2021 -0400 clocksource/drivers/samsung_pwm: Constify source IO memory The 'source_reg' IO memory is only read, so the pointer can point to const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506202729.157260-4-krzysztof.kozlowski@canonical.com commit 63e83bd8cd848a3d1b4777d90635a309fa9cb2c7 Author: Krzysztof Kozlowski Date: Thu May 6 16:27:27 2021 -0400 clocksource/drivers/samsung_pwm: Cleanup on init error Failure of timer initialization is likely to be fatal for the system, so cleanup in such case is not strictly necessary. However the code might be refactored or reused, so better not to rely on such assumption that system won't continue init failure. Unmap the IO memory and put the clock on initialization failures from devicetree. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506202729.157260-3-krzysztof.kozlowski@canonical.com commit bb08e96575dbbd49acb49999dd0d7ffedb5c1608 Author: Krzysztof Kozlowski Date: Thu May 6 16:27:26 2021 -0400 clocksource/drivers/samsung_pwm: Constify passed structure The 'struct samsung_pwm_variant' argument passed to initialization functions is not modified, so it can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506202729.157260-2-krzysztof.kozlowski@canonical.com commit a0143f5ac0594d73ef91c2336d8172217ff9cd72 Author: Krzysztof Kozlowski Date: Thu May 6 16:27:25 2021 -0400 clocksource/drivers/samsung_pwm: Minor whitespace cleanup Cleanup the code to be slightly more readable and follow coding convention - only whitespace. This fixes checkpatch warnings: WARNING: Block comments should align the * on each line WARNING: please, no space before tabs WARNING: Missing a blank line after declarations CHECK: Alignment should match open parenthesis Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210506202729.157260-1-krzysztof.kozlowski@canonical.com commit ce9f50e7ac807b7651903c44f1b14a4f97725daa Author: Yang Yingliang Date: Thu Jun 3 22:32:03 2021 +0800 ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: e50dfac81f73 ("ALSA: firewire-motu: cache event ticks in source packet header per data block") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210603143203.582017-1-yangyingliang@huawei.com Signed-off-by: Takashi Iwai commit d5dd6fd128c899a2f2e6fff0222221b3ace8c7cb Author: Joel Stanley Date: Thu Jun 3 16:15:36 2021 +0930 ARM: dts: aspeed-g5: Add SCU phandle to GFX node In v5.13 the DRM driver gained support for using a phandle to the SCU, instead of matching on the scu compatible. Link: https://lore.kernel.org/r/20210603064536.165297-1-joel@jms.id.au Signed-off-by: Joel Stanley commit 51b48037238ffb0af7488dd3a122531c6a56e4b4 Author: Vishwanatha Subbanna Date: Fri Apr 30 14:00:00 2021 -0500 ARM: dts: aspeed: Everest: Add directly controlled LEDs These LEDs are directly connected to the BMC's GPIO bank Signed-off-by: Eddie James Signed-off-by: Vishwanatha Subbanna Signed-off-by: Joel Stanley commit 189e847a0f0bcf99df5aea85e634abada5fbfbf4 Author: Eddie James Date: Fri Apr 30 13:59:59 2021 -0500 ARM: dts: aspeed: Rainier 4U: Remove fan updates The 4U fans do not need a different "tach-pulses" property than the 2U machine. In addition, the "maxim,fan-dual-tach" property does not exist upstream yet, so it should also be removed. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 010da3daf9278ed03d38b7dcb0422f1a7df1bdd3 Author: Santosh Puranik Date: Fri Apr 30 13:59:58 2021 -0500 ARM: dts: aspeed: Everest: Fix cable card PCA chips Correct two PCA chips which were placed on the wrong I2C bus and address. Signed-off-by: Eddie James Signed-off-by: Santosh Puranik Signed-off-by: Joel Stanley commit 9ab1428dfe2c66b51e0b41337cd0164da0ab6080 Author: Joachim Fenkes Date: Fri Jul 24 16:45:18 2020 +0930 fsi/sbefifo: Fix reset timeout On BMCs with lower timer resolution than 1ms, msleep(1) will take way longer than 1ms, so looping 10k times won't wait for 10s but significantly longer. Fix this by using jiffies like the rest of the code. Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO") Signed-off-by: Joachim Fenkes Link: https://lore.kernel.org/r/20200724071518.430515-3-joel@jms.id.au Signed-off-by: Joel Stanley commit 5b448065febe1c6bb6693735844f2fb2b7b654dc Author: Mauro Carvalho Chehab Date: Wed Jun 2 16:42:46 2021 +0200 media: pci: tw5864: avoid usage of some characters There are several comments on this driver using those chars: - U+2013 ('–'): EN DASH - U+2018 ('‘'): LEFT SINGLE QUOTATION MARK - U+2019 ('’'): RIGHT SINGLE QUOTATION MARK They probably came from cut-and-pasting some texts found elsewhere. While there's nothing wrong on having those on comments in C, it is better to use ASCII chars for those specific cases, as the current variant doesn't really add any value. Signed-off-by: Mauro Carvalho Chehab commit 730f055666a30b8224d639110eb9b25eaa87883a Author: Mauro Carvalho Chehab Date: Wed Jun 2 16:42:49 2021 +0200 media: rc: ite-cir: replace some an EN DASH Instead of using U+2013 ('–'): EN DASH, let's just use an hyphen there, as this was probably introduced by some cut-and-paste from some other place. Signed-off-by: Mauro Carvalho Chehab commit 35c47f8d9a34cfa4b17109501526411d74341c8b Author: Mauro Carvalho Chehab Date: Wed Jun 2 16:42:45 2021 +0200 media: saa7134: drop a NO-BREAK SPACE There are two spaces on a comment there, being one of them an U+00a0 (' '): NO-BREAK SPACE. Drop it. Signed-off-by: Mauro Carvalho Chehab commit a4c3793e71f3322b910d5ac46882120bd149b08b Author: Mauro Carvalho Chehab Date: Wed Jun 2 16:42:42 2021 +0200 media: allegro-dvt: avoid EN DASH char While there's nothing wrong with EN DASH on C code, this probably came from some cut-and paste from an ITU-T table. It sounds better to just an HYPHEN here. Reviewed-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab commit ffcf1b0ae3fa84f5f3f4bd1ee440e60b72f5c840 Author: Mauro Carvalho Chehab Date: Wed Jun 2 16:42:39 2021 +0200 media: rtl28xxu: replace a NO-BREAK SPACE character Instead of using: - U+00a0 (' '): NO-BREAK SPACE Use a normal white space. This was probably introduced by some cut-and-paste. Signed-off-by: Mauro Carvalho Chehab commit df5ce27d96532844232b16bd0105defc5684e7ce Author: Mauro Carvalho Chehab Date: Wed Jun 2 16:42:39 2021 +0200 media: gspca: ov519: replace RIGHT SINGLE QUOTATION MARK Replace the occurences of the following character: - U+2019 ('’'): RIGHT SINGLE QUOTATION MARK By a normal single comma character. Signed-off-by: Mauro Carvalho Chehab commit 793e52d4e77d49737ad83cb11925c98f4907fcb1 Author: Mauro Carvalho Chehab Date: Tue Jun 1 11:41:39 2021 +0200 media: docs: move DVB audio/video docs to staging The only upstream driver using the API described there is the av7110 driver. As the driver was moved to staging, move the API bits to staging as well. Signed-off-by: Mauro Carvalho Chehab commit 819fbd3d8ef36c09576c2a0ffea503f5c46e9177 Author: Mauro Carvalho Chehab Date: Tue Jun 1 11:31:30 2021 +0200 media: dvb header files: move some headers to staging The audio, video and OSD APIs are used upstream only by the av7110 driver, which was moved to staging. So, move the corresponding header files to it. Signed-off-by: Mauro Carvalho Chehab commit cd40407a8a018d43fdb05c84a76af96f8bce9ac2 Author: Mauro Carvalho Chehab Date: Tue Jun 1 11:27:04 2021 +0200 media: ivtv: get rid of DVB deprecated ioctls The ivtv driver has gained support a long time ago for audio and video settings via V4L2 API. Let's drop support of the duplicated controls implemented abusing the DVB API. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2bebb924d6f4cef14133ed0b198e6efec4a7aec Author: Manasi Navare Date: Thu Jun 3 14:53:38 2021 -0700 drm/i915: Initialize the mbus_offset to fix Klockwork issue Static analysis identified an issue in skl_crtc_allocate_ddb where mbus_offset may be used uninitialized. This patch fixes it. Fixes: 835c176cb1c4 ("drm/i915: Introduce MBUS relative dbuf offsets") Cc: Ville Syrjälä Signed-off-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210603215338.13804-1-manasi.d.navare@intel.com commit 95152433e46fdb36652ebdbea442356a16ae1fa6 Author: Joachim Fenkes Date: Fri Jul 24 16:45:17 2020 +0930 fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE When the SBE requests a reset via the down FIFO, that is also the FIFO we should go and reset ;) Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO") Signed-off-by: Joachim Fenkes Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200724071518.430515-2-joel@jms.id.au Signed-off-by: Joel Stanley commit 56e05c60f2d4e74be45486158fa4d3c5cd2fed33 Author: Zhen Lei Date: Tue May 11 16:57:45 2021 +0800 fsi: master-ast-cf: Remove redundant error printing in fsi_master_acf_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://patchwork.ozlabs.org/project/linux-fsi/patch/20210511085745.4340-1-thunder.leizhen@huawei.com/ Signed-off-by: Joel Stanley commit 1e2233d4f3dfdad501134f685caab9e936675387 Author: Eddie James Date: Thu Feb 11 13:48:46 2021 -0600 fsi: Aspeed: Reduce poll timeout The lengthy timeout previously used sometimes resulted in scheduling problems, detailed below. Therefore reduce the timeout to 500us. This timeout selection is supported by the benchmarks collected below with various clock dividers. This is purely the time spent polling (reported by ktime_get()). div 1: max:150us avg: 2us div 2: max:155us avg: 3us div 4: max:149us avg: 7us div 8: max:153us avg: 13us div 16: max:197us avg: 21us div 32: max:181us avg: 50us div 64: max:262us avg:100us Jan 22 01:27:21 rain27bmc kernel: rcu: INFO: rcu_sched self-detected stall on CPU Jan 22 01:27:21 rain27bmc kernel: rcu: 0-....: (2099 ticks this GP) idle=0ca/1/0x40000002 softirq=349573/349573 fqs=1048 Jan 22 01:27:21 rain27bmc kernel: (t=2100 jiffies g=841149 q=7163) Jan 22 01:27:21 rain27bmc kernel: NMI backtrace for cpu 0 Jan 22 01:27:21 rain27bmc kernel: CPU: 0 PID: 5959 Comm: ibm-read-vpd Not tainted 5.8.17-a9b4ea8 #1 Jan 22 01:27:21 rain27bmc kernel: Hardware name: Generic DT based system Jan 22 01:27:21 rain27bmc kernel: Backtrace: Jan 22 01:27:25 rain27bmc kernel: [<8010d92c>] (dump_backtrace) from [<8010db80>] (show_stack+0x20/0x24) ... Jan 22 01:27:25 rain27bmc kernel: [<8010130c>] (gic_handle_irq) from [<80100b0c>] (__irq_svc+0x6c/0x90) Jan 22 01:27:25 rain27bmc kernel: Exception stack(0xb79159b0 to 0xb79159f8) Jan 22 01:27:25 rain27bmc kernel: 59a0: 9e88e5d5 00000559 00000559 00000018 Jan 22 01:27:25 rain27bmc kernel: 59c0: 00000000 9f217c55 00000003 00000559 a0201c00 bfa4d048 bfa4d000 b7915a44 Jan 22 01:27:25 rain27bmc kernel: 59e0: 40e88f8a b7915a00 3254e553 80734924 80030113 ffffffff Jan 22 01:27:25 rain27bmc kernel: r9:b7914000 r8:a0201c00 r7:b79159e4 r6:ffffffff r5:80030113 r4:80734924 Jan 22 01:27:25 rain27bmc kernel: [<807348b4>] (__opb_read) from [<80734d98>] (aspeed_master_read+0xbc/0xcc) Jan 22 01:27:25 rain27bmc kernel: r10:00000004 r9:00000002 r8:80734cdc r7:bd33fa40 r6:00000004 r5:bd33f840 Jan 22 01:27:25 rain27bmc kernel: r4:00201c00 Jan 22 01:27:25 rain27bmc kernel: [<80734cdc>] (aspeed_master_read) from [<807320f0>] (fsi_master_read+0x6c/0x1bc) ... Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210211194846.35475-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit a3469912f4caeea32ecbe0bf472b14634fecb38e Author: Yangtao Li Date: Sat Dec 28 19:06:31 2019 +0000 fsi: aspeed: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191228190631.26777-1-tiny.windzz@gmail.com Signed-off-by: Joel Stanley commit 38483e8fed80ba21d8736a76043a32b0110a387a Author: Eddie James Date: Tue Feb 9 11:12:35 2021 -0600 hwmon: (occ) Print response status in first poll error message In order to better debug problems starting up the driver, print the response status from the OCC in the error logged when the first poll command fails. Signed-off-by: Eddie James Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210209171235.20624-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 75028ef4583091c355ac78ef03b64fc8f1f87909 Author: Eddie James Date: Tue Feb 9 11:12:34 2021 -0600 hwmon: (occ) Start sequence number at one Initialize the sequence number at one, rather than zero, in order to prevent false matches with the zero-initialized OCC SRAM buffer before the OCC is fully initialized. Signed-off-by: Eddie James Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210209171235.20624-4-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 614f0a50c9df6e56e555b66f2bdd0495d4c4aef1 Author: Eddie James Date: Tue Feb 9 11:12:33 2021 -0600 fsi: occ: Log error for checksum failure Log an error if the response checksum doesn't match the calculated checksum. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210209171235.20624-3-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 8a4659be08576141f47d47d94130eb148cb5f0df Author: Eddie James Date: Tue Feb 9 11:12:32 2021 -0600 fsi: occ: Don't accept response from un-initialized OCC If the OCC is not initialized and responds as such, the driver should continue waiting for a valid response until the timeout expires. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Fixes: 7ed98dddb764 ("fsi: Add On-Chip Controller (OCC) driver") Link: https://lore.kernel.org/r/20210209171235.20624-2-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit f72ddbe1d7b7d0b2a1179a8dded704ed87001351 Author: Joel Stanley Date: Thu May 27 16:31:09 2021 +0930 fsi: scom: Remove retries On a functioning FSI link there is not need to retry a write when doing a scom in the driver. Allow the higher layers (eg. userspace) to attempt a retry if they want, or to accept that the address they are talking to is not accessible. By removing the retries we can separate the error handling from retry logic. In particular -EBUSY was used to force the get/put scom logic to retry. Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210527070109.225198-1-joel@jms.id.au Signed-off-by: Joel Stanley commit a5c317dac5567206ca7b6bc9d008dd6890c8bced Author: Eddie James Date: Mon Mar 29 10:13:44 2021 -0500 fsi: scom: Reset the FSI2PIB engine for any error The error bits in the FSI2PIB status are only cleared by a reset. So the driver needs to perform a reset after seeing any of the FSI2PIB errors, otherwise subsequent operations will also look like failures. Fixes: 6b293258cded ("fsi: scom: Major overhaul") Signed-off-by: Eddie James Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210329151344.14246-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 4134cb9165786761b28eef4c6b945f13bf54d623 Author: Joel Stanley Date: Tue Feb 23 14:47:37 2021 +1030 fsi: aspeed: Emit fewer barriers in opb operations When setting up a read or write to the OPB memory space, we must perform five or six AHB writes. The ordering of these up until the trigger write does not matter, so use writel_relaxed. The generated code goes from (Debian GCC 10.2.1-6): mov r8, r3 mcr 15, 0, sl, cr7, cr10, {4} str sl, [r6, #20] mcr 15, 0, sl, cr7, cr10, {4} str r3, [r6, #24] mcr 15, 0, sl, cr7, cr10, {4} str r1, [r6, #28] mcr 15, 0, sl, cr7, cr10, {4} str r2, [r6, #32] mcr 15, 0, sl, cr7, cr10, {4} mov r1, #1 str r1, [r6, #64] ; 0x40 mcr 15, 0, sl, cr7, cr10, {4} str r1, [r6, #4] to this: str r3, [r7, #20] str r2, [r7, #24] str r1, [r7, #28] str r3, [r7, #64] mov r8, #0 mcr 15, 0, r8, cr7, cr10, {4} str r3, [r7, #4] Signed-off-by: Joel Stanley Acked-by: Jeremy Kerr Reviewed-by: Eddie James Tested-by: Eddie James Link: https://lore.kernel.org/r/20210223041737.171274-1-joel@jms.id.au Signed-off-by: Joel Stanley commit 910810945707fe9877ca86a0dca4e585fd05e37b Author: Colin Ian King Date: Thu Jun 3 13:28:12 2021 +0100 fsi: core: Fix return of error values on failures Currently the cfam_read and cfam_write functions return the provided number of bytes given in the count parameter and not the error return code in variable rc, hence all failures of read/writes are being silently ignored. Fix this by returning the error code in rc. Addresses-Coverity: ("Unused value") Fixes: d1dcd6782576 ("fsi: Add cfam char devices") Signed-off-by: Colin Ian King Reviewed-by: Jeremy Kerr Link: https://lore.kernel.org/r/20210603122812.83587-1-colin.king@canonical.com Signed-off-by: Joel Stanley commit 19a52178125c1e8b84444d85f2ce34c0964b4a91 Author: Zou Wei Date: Thu May 13 16:57:29 2021 +0800 fsi: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620896249-52769-1-git-send-email-zou_wei@huawei.com Signed-off-by: Joel Stanley commit 0850bf2e5ce411f7c1e2879d72d80253cd8db261 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:28 2020 -0600 drm/nouveau/clk: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit e0e6f9b2a329c2672391fab435240c221d04641c Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:38 2020 -0600 drm/nouveau/therm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit f49efb108aa4408feeca51ea4b4486075624017b Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:33 2020 -0600 drm/nouveau: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Karol Herbst Signed-off-by: Gustavo A. R. Silva commit 9821a195d4e263801884b105554e801642c59f2a Author: Seiya Wang Date: Tue Jun 1 15:10:42 2021 +0800 dt-bindings: cpufreq: update cpu type and clock name for MT8173 SoC Update the cpu type of cpu2 and cpu3 since MT8173 used Cortex-a72. Acked-by: Viresh Kumar Acked-by: Rob Herring Reviewed-by: Matthias Brugger Signed-off-by: Seiya Wang Signed-off-by: Viresh Kumar commit eed828895b2426a286717c1ddea8af45fa08bfc3 Author: Seiya Wang Date: Tue Jun 1 15:10:41 2021 +0800 clk: mediatek: remove deprecated CLK_INFRA_CA57SEL for MT8173 SoC Remove CLK_INFRA_CA57SEL for MT8173 since it's no longer used. Acked-by: Rob Herring Reviewed-by: Matthias Brugger Signed-off-by: Seiya Wang Signed-off-by: Viresh Kumar commit f8cf6e513ec4f0e207f56c27d5030da429ac2cae Author: Krzysztof Wilczyński Date: Thu Jun 3 00:01:07 2021 +0000 PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to sysfs_emit() and sysfs_emit_at() accordingly, as the latter is aware of the PAGE_SIZE buffer and correctly returns the number of bytes written into the buffer. No functional change intended. [1] Documentation/filesystems/sysfs.rst Related commit: ad025f8e46f3 ("PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions"). Link: https://lore.kernel.org/r/20210603000112.703037-2-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit ec8747c52434b69cea2b18068e72f051e23d3839 Author: Rex-BC Chen Date: Wed May 26 16:52:19 2021 +0800 drm/mediatek: dpi: Add bus format negotiation Add the atomic_get_output_bus_fmts, atomic_get_input_bus_fmts to negotiate the possible output and input formats for the current mode and monitor, and use the negotiated formats in a basic atomic_check callback. Signed-off-by: Jitao Shi Signed-off-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu commit be63f6e8601ff21139da93623754717e92cbd8db Author: Rex-BC Chen Date: Wed May 26 16:52:18 2021 +0800 drm/mediatek: dpi: Add output bus formats to driver data For each SoC, dpi support different output bus formats, so add these information into driver data. Signed-off-by: Jitao Shi Signed-off-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu commit 6385ed8eaa02190c3a6f9b18790ada785ebf5253 Author: Rex-BC Chen Date: Wed May 26 16:52:17 2021 +0800 drm/mediatek: dpi: Add dual edge sample mode support To support RGB888_2X12_LE and RGB888_2X12_BE, dpi should sample on dual edge which could recude half data io pins. For RGB888_1X24, dpi just sample on single edge (rising or falling edge). Signed-off-by: Jitao Shi Signed-off-by: Rex-BC Chen Signed-off-by: Chun-Kuang Hu commit c076ae7a9361b87624900c722012a837fee0b1b3 Author: Darrick J. Wong Date: Mon May 31 11:32:02 2021 -0700 xfs: refactor per-AG inode tagging functions In preparation for adding another incore inode tree tag, refactor the code that sets and clears tags from the per-AG inode tree and the tree of per-AG structures, and remove the open-coded versions used by the blockgc code. Note: For reclaim, we now rely on the radix tree tags instead of the reclaimable inode count more heavily than we used to. The conversion should be fine, but the logic isn't 100% identical. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit f1bc5c5630f90b83b339e8970dcf6d03abba5bd5 Author: Darrick J. Wong Date: Mon May 31 11:32:02 2021 -0700 xfs: merge xfs_reclaim_inodes_ag into xfs_inode_walk_ag Merge these two inode walk loops together, since they're pretty similar now. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9d5ee837595134f91bb2d66f571f498c3b8ab148 Author: Darrick J. Wong Date: Mon May 31 11:32:01 2021 -0700 xfs: pass struct xfs_eofblocks to the inode scan callback Pass a pointer to the actual eofb structure around the inode scanner functions instead of a void pointer, now that none of the functions is used as a callback. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 919a4ddb68413056ecb7c71d9d5465bb54c8032b Author: Darrick J. Wong Date: Mon May 31 11:32:01 2021 -0700 xfs: fix radix tree tag signs Radix tree tags are supposed to be unsigned ints, so fix the callers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 594ab00b760f1722b800c45d37adc21eecf42dc1 Author: Darrick J. Wong Date: Mon May 31 11:32:00 2021 -0700 xfs: make the icwalk processing functions clean up the grab state Soon we're going to be adding two new callers to the incore inode walk code: reclaim of incore inodes, and (later) inactivation of inodes. Both states operate on inodes that no longer have any VFS state, so we need to move the xfs_irele calls into the processing functions. In other words, icwalk processing functions are responsible for cleaning up whatever state changes are made by the corresponding icwalk igrab function that picked the inode for processing. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit d20d5edcf941e70e03cdbda2f8df93e3969c31a2 Author: Darrick J. Wong Date: Tue Jun 1 23:01:44 2021 -0700 xfs: clean up inode state flag tests in xfs_blockgc_igrab Clean up the definition of which inode states are not eligible for speculative preallocation garbage collecting by creating a private #define. The deferred inactivation patchset will add two new entries to the set of flags-to-ignore, so we want the definition not to end up a cluttered mess. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit f427cf5c6236acdf72b4d8564b2e18937c4cc8d8 Author: Darrick J. Wong Date: Mon May 31 11:32:00 2021 -0700 xfs: remove indirect calls from xfs_inode_walk{,_ag} It turns out that there is a 1:1 mapping between the execute and goal parameters that are passed to xfs_inode_walk_ag: xfs_blockgc_scan_inode <=> XFS_ICWALK_BLOCKGC xfs_dqrele_inode <=> XFS_ICWALK_DQRELE Because of this exact correspondence, we don't need the execute function pointer and can replace it with a direct call. For the price of a forward static declaration, we can eliminate the indirect function call. This likely has a negligible impact on performance (since the execute function runs transactions), but it also simplifies the function signature. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 7fdff52623b4df9c9ae665fe8bb727978c29414e Author: Darrick J. Wong Date: Mon May 31 11:31:59 2021 -0700 xfs: remove iter_flags parameter from xfs_inode_walk_* The sole iter_flags is XFS_INODE_WALK_INEW_WAIT, and there are no users. Remove the flag, and the parameter, and all the code that used it. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9d2793ceecb9fd711f70a860685b71129cac5dc9 Author: Darrick J. Wong Date: Mon May 31 11:31:59 2021 -0700 xfs: move xfs_inew_wait call into xfs_dqrele_inode Move the INEW wait into xfs_dqrele_inode so that we can drop the iter_flags parameter in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit b9baaef42f764db7089a19c82d2b783aef836437 Author: Darrick J. Wong Date: Mon May 31 11:31:58 2021 -0700 xfs: separate the dqrele_all inode grab logic from xfs_inode_walk_ag_grab Disentangle the dqrele_all inode grab code from the "generic" inode walk grabbing code, and and use the opportunity to document why the dqrele grab function does what it does. Since xfs_inode_walk_ag_grab is now only used for blockgc, rename it to reflect that. Ultimately, there will be four reasons to perform a walk of incore inodes: quotaoff dquote releasing (dqrele), garbage collection of speculative preallocations (blockgc), reclamation of incore inodes (reclaim), and deferred inactivation (inodegc). Each of these four have their own slightly different criteria for deciding if they want to handle an inode, so it makes more sense to have four cohesive igrab functions than one confusing parameteric grab function like we do now. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c809d7e948a131cba8fdf9fbd0b50e1f59255f50 Author: Darrick J. Wong Date: Tue Jun 1 13:49:52 2021 -0700 xfs: pass the goal of the incore inode walk to xfs_inode_walk() As part of removing the indirect calls and radix tag implementation details from the incore inode walk loop, create an enum to represent the goal of the inode iteration. More immediately, this separate removes the need for the "ICI_NOTAG" define which makes little sense. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c1115c0cba2b82e71ec77e794c684ac87160fcf6 Author: Darrick J. Wong Date: Tue Jun 1 22:41:25 2021 -0700 xfs: rename xfs_inode_walk functions to xfs_icwalk Shorten the prefix so that all the incore inode cache walk code has "xfs_icwalk" in the name somewhere. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit df60019739d8850b865d313053d30aa93dc38a65 Author: Darrick J. Wong Date: Tue Jun 1 13:29:41 2021 -0700 xfs: move the inode walk functions further down Move the inode walk functions further down in the file to limit the forward declarations to the two walk functions as we add new code that uses the inode walks. We'll clean them out later (i.e. after the deferred inode inactivation series). Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 3ea06d73e3c02ee2952a62bf92abc18f9c98aba1 Author: Darrick J. Wong Date: Mon May 31 11:31:57 2021 -0700 xfs: detach inode dquots at the end of inactivation Once we're done with inactivating an inode, we're finished updating metadata for that inode. This means that we can detach the dquots at the end and not have to wait for reclaim to do it for us. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 1ad2cfe0a57031505df682dc1e26922d9d43737f Author: Darrick J. Wong Date: Mon May 31 11:31:57 2021 -0700 xfs: move the quotaoff dqrele inode walk into xfs_icache.c The only external caller of xfs_inode_walk* happens in quotaoff, when we want to walk all the incore inodes to detach the dquots. Move this code to xfs_icache.c so that we can hide xfs_inode_walk as the starting step in more cleanups of inode walks. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ebbf5fcb94a7f3499747b282420a1c5f7e8d1c6f Author: Colin Ian King Date: Thu Jun 3 22:56:57 2021 +0100 netdevsim: Fix unsigned being compared to less than zero The comparison of len < 0 is always false because len is a size_t. Fix this by making len a ssize_t instead. Addresses-Coverity: ("Unsigned compared against 0") Fixes: d395381909a3 ("netdevsim: Add max_vfs to bus_dev") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit e32ea44c7ae476f4c90e35ab0a29dc8ff082bc11 Author: Andreas Roeseler Date: Thu Jun 3 16:22:11 2021 -0500 icmp: fix lib conflict with trinity Including and in the dependencies breaks compilation of trinity due to multiple definitions. is only used in to provide the definition of the struct in_addr, but this can be substituted out by using the datatype __be32. Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit 118de6106735cfeb04daf9de1d5a9f953ac034ba Author: Nathan Chancellor Date: Thu Jun 3 10:34:10 2021 -0700 net: ethernet: rmnet: Restructure if checks to avoid uninitialized warning Clang warns that proto in rmnet_map_v5_checksum_uplink_packet() might be used uninitialized: drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:14: warning: variable 'proto' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (skb->protocol == htons(ETH_P_IPV6)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:295:36: note: uninitialized use occurs here check = rmnet_map_get_csum_field(proto, trans); ^~~~~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:10: note: remove the 'if' if its condition is always true } else if (skb->protocol == htons(ETH_P_IPV6)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:270:11: note: initialize the variable 'proto' to silence this warning u8 proto; ^ = '\0' 1 warning generated. This is technically a false positive because there is an if statement above this one that checks skb->protocol for not being either ETH_P_IP{,V6}. However, it is more obvious to sink that into the if statement as an else branch, which makes the code clearer and fixes the warning. At the same time, move the "IS_ENABLED(CONFIG_IPV6)" into the else if condition so that the else branch of the preprocessor conditional can be shared, since there is no build failure with CONFIG_IPV6 disabled. Fixes: b6e5d27e32ef ("net: ethernet: rmnet: Add support for MAPv5 egress packets") Link: https://github.com/ClangBuiltLinux/linux/issues/1390 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 819fb78f695527fc015e0c93b23c6492f7257015 Author: Nathan Chancellor Date: Thu Jun 3 09:56:13 2021 -0700 net: ks8851: Make ks8851_read_selftest() return void clang points out that ret in ks8851_read_selftest() is set but unused: drivers/net/ethernet/micrel/ks8851_common.c:1028:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret = 0; ^ 1 warning generated. The return code of this function has never been checked so just remove ret and make the function return void. Fixes: 3ba81f3ece3c ("net: Micrel KS8851 SPI network driver") Suggested-by: Andrew Lunn Signed-off-by: Nathan Chancellor Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a10541f5d9fa2aab5ff54311473b05ba75b84226 Author: Yu Kuai Date: Thu Jun 3 22:07:49 2021 +0800 sch_htb: fix doc warning in htb_add_to_id_tree() Add description for parameters of htb_add_to_id_tree() to fix gcc W=1 warnings: net/sched/sch_htb.c:282: warning: Function parameter or member 'root' not described in 'htb_add_to_id_tree' net/sched/sch_htb.c:282: warning: Function parameter or member 'cl' not described in 'htb_add_to_id_tree' net/sched/sch_htb.c:282: warning: Function parameter or member 'prio' not described in 'htb_add_to_id_tree' Signed-off-by: Yu Kuai Signed-off-by: David S. Miller commit 92e1b57c3865c508e0ecd9824b7a64256329b8fd Author: Colin Ian King Date: Thu Jun 3 14:19:04 2021 +0100 bonding: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit feb938fad63fb6fdd92ab082d0888ed5694af818 Author: Russell King Date: Thu Jun 3 14:01:10 2021 +0100 net: phy: marvell: use phy_modify_changed() for marvell_set_polarity() Rather than open-coding the phy_modify_changed() sequence, use this helper in marvell_set_polarity(). Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Marek Behún Signed-off-by: David S. Miller commit 316ae33051215f92c72fe13bc1bfc4e513a26700 Author: Krzysztof Wilczyński Date: Thu Jun 3 00:01:08 2021 +0000 PCI/sysfs: Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s() scnprintf() returns the number of bytes written into the buffer. Change dsm_label_utf16s_to_utf8s() to do the same. Rely on those values instead of using strlen() to compute the buffer length. No functional change intended. [bhelgaas: reorder patch in series, len++ to include newline added by dsm_label_utf16s_to_utf8s(), commit log] Link: https://lore.kernel.org/r/20210603000112.703037-3-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit e5118f5723ee9c8ed6cddb69b632a11f214e4c89 Merge: fcd1a53064cf4 d15ec1933309a Author: David S. Miller Date: Thu Jun 3 15:09:40 2021 -0700 Merge branch 'ipa-inline-csum' Alex Elder says: ==================== net: ipa: support inline checksum offload Inline offload--required for checksum offload support on IPA version 4.5 and above--is now supported by the RMNet driver: https://lore.kernel.org/netdev/162259440606.2786.10278242816453240434.git-patchwork-notify@kernel.org/ Add support for it in the IPA driver, and revert the commit that disabled it pending acceptance of the RMNet code. ==================== Signed-off-by: David S. Miller commit d15ec1933309a4677d0a667738dc64329ec3fd69 Author: Alex Elder Date: Wed Jun 2 07:41:31 2021 -0500 Revert "net: ipa: disable checksum offload for IPA v4.5+" This reverts commit c88c34fcf8f501d588c0a999aa7e51e18552c5f0. The RMNet driver now supports inline checksum offload. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 5567d4d9e7381230462a564d4f466177f3ba9dd5 Author: Alex Elder Date: Wed Jun 2 07:41:30 2021 -0500 net: ipa: add support for inline checksum offload Starting with IPA v4.5, IP payload checksum offload is implemented differently. Prior to v4.5, the IPA hardware appends an rmnet_map_dl_csum_trailer structure to each packet if checksum offload is enabled in the download direction (modem->AP). In the upload direction (AP->modem) a rmnet_map_ul_csum_header structure is prepended before each sent packet. Starting with IPA v4.5, checksum offload is implemented using a single new rmnet_map_v5_csum_header structure which sits between the QMAP header and the packet data. The same header structure is used in both directions. The new header contains a header type (CSUM_OFFLOAD); a checksum flag; and a flag indicating whether any other headers follow this one. The checksum flag indicates whether the hardware should compute (and insert) the checksum on a sent packet. On a received packet the checksum flag indicates whether the hardware confirms the checksum value in the payload is correct. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fcd1a53064cf44ef912c354859027ef291147848 Merge: 6a8dd8b2fa5b7 f68406ca3b77c Author: David S. Miller Date: Thu Jun 3 15:00:30 2021 -0700 Merge tag 'mlx5-updates-2021-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== This series provides misc updates for mlx5 drivers. For more information please see tag log below. Please pull and let me know if there is any problem. mlx5-updates-2021-06-03 This series contains misc updates for mlx5 driver 1) Alaa disables advanced features when kdump mode to save on memory 2) Jakub counts all link flap events 3) Meir adds support for IPoIB NDR speed 4) Various misc cleanup ==================== Signed-off-by: David S. Miller commit 6a8dd8b2fa5b7cec4b13f5f5b2589d9abbac0fab Author: Íñigo Huguet Date: Thu Jun 3 08:34:30 2021 +0200 net:cxgb3: fix code style issues Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit 5e0b8928927fa0bac688221a4b2636ef593a0599 Author: Íñigo Huguet Date: Thu Jun 3 08:34:29 2021 +0200 net:cxgb3: replace tasklets with works OFLD and CTRL TX queues can be stopped if there is no room in their DMA rings. If this happens, they're tried to be restarted later after having made some room in the corresponding ring. The tasks of restarting these queues were triggered using tasklets, but they can be replaced for workqueue works, getting them out of softirq context. This queues stop/restart probably doesn't happen often and they can be quite lengthy because they try to send all pending skbs. Moreover, given that probably the ring is not empty yet, so the DMA still has work to do, we don't need to be so fast to justify using tasklets/softirq instead of running in a thread. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit bdcdaa13ad96f1a530711c29e6d4b8311eff767c Author: Krzysztof Wilczyński Date: Thu Jun 3 00:01:12 2021 +0000 PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun "utf16s_to_utf8s(..., buf, PAGE_SIZE)" puts up to PAGE_SIZE bytes into "buf" and returns the number of bytes it actually put there. If it wrote PAGE_SIZE bytes, the newline added by dsm_label_utf16s_to_utf8s() would overrun "buf". Reduce the size available for utf16s_to_utf8s() to use so there is always space for the newline. [bhelgaas: reorder patch in series, commit log] Fixes: 6058989bad05 ("PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs") Link: https://lore.kernel.org/r/20210603000112.703037-7-kw@linux.com Reported-by: Joe Perches Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 480c6fe1209a07f5c816b00b4b70f8f9437df708 Author: Michal Wajdeczko Date: Wed Jun 2 22:16:20 2021 -0700 drm/i915/guc: Don't repeat CTB layout calculations We can retrieve offsets to cmds buffers and descriptor from actual pointers that we already keep locally. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-11-matthew.brost@intel.com commit 99b2f5f51c6bcf311df2ee992942b6b1b463225d Author: Michal Wajdeczko Date: Wed Jun 2 22:16:19 2021 -0700 drm/i915/guc: Only rely on own CTB size In upcoming GuC firmware, CTB size will be removed from the CTB descriptor so we must keep it locally for any calculations. While around, improve some debug messages and helpers. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-10-matthew.brost@intel.com commit d6e9c965607c3c51b965b7e804537000332cb666 Author: Michal Wajdeczko Date: Wed Jun 2 22:16:18 2021 -0700 drm/i915: Promote ptrdiff() to i915_utils.h Generic helpers should be placed in i915_utils.h. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-9-matthew.brost@intel.com commit 882be6e0b705681ec210d80e7abc0e7e4c8aad28 Author: Michal Wajdeczko Date: Wed Jun 2 22:16:17 2021 -0700 drm/i915/guc: Stop using fence/status from CTB descriptor Stop using fence/status from CTB descriptor as future GuC ABI will no longer support replies over CTB descriptor. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-8-matthew.brost@intel.com commit ded32d381cbb06e9cc8915dbcb92be941e195cda Author: Matthew Brost Date: Wed Jun 2 22:16:16 2021 -0700 drm/i915/guc: Drop guc->interrupts.enabled Drop the variable guc->interrupts.enabled as this variable is just leading to bugs creeping into the code. e.g. A full GPU reset disables the GuC interrupts but forgot to clear guc->interrupts.enabled, guc->interrupts.enabled being true suppresses interrupts from getting re-enabled and now we are broken. It is harmless to enable interrupt while already enabled so let's just delete this variable to avoid bugs like this going forward. Signed-off-by: Matthew Brost Reviewed-by: John Harrison Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-7-matthew.brost@intel.com commit 0a8e247dc1fa7a4b1e91b41f833f2a5f14c6d3f3 Author: Michal Wajdeczko Date: Wed Jun 2 22:16:15 2021 -0700 drm/i915/guc: Keep strict GuC ABI definitions Our fwif.h file is now mix of strict firmware ABI definitions and set of our helpers. In anticipation of upcoming changes to the GuC interface try to keep them separate in smaller maintainable files. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Michał Winiarski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-6-matthew.brost@intel.com commit 28bef5bc559ab211ef3306a850c201190518c961 Author: Rodrigo Vivi Date: Wed Jun 2 22:16:14 2021 -0700 drm/i915/guc: Remove sample_forcewake h2g action This action is no-op in the GuC side for a few versions already and it is getting entirely removed soon, in an upcoming version. Time to remove before we face communication issues. Cc: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi Signed-off-by: Matthew Brost Acked-by: Michal Wajdeczko Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-5-matthew.brost@intel.com commit 8bb9fbc1bb81b93585af1b798af95df46980e273 Author: Daniele Ceraolo Spurio Date: Wed Jun 2 22:16:13 2021 -0700 drm/i915/guc: enable only the user interrupt when using GuC submission In GuC submission mode the CS is owned by the GuC FW, so all CS status interrupts are handled by it. We only need the user interrupt as that signals request completion. Since we're now starting the engines directly in GuC submission mode when selected, we can stop switching back and forth between the execlists and the GuC programming and select directly the correct interrupt mask. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: John Harrison Cc: Michal Wajdeczko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-4-matthew.brost@intel.com commit 6fb086e5e6ba82df345d3c7f9e60c5b1f4bd6fc7 Author: Daniele Ceraolo Spurio Date: Wed Jun 2 22:16:12 2021 -0700 drm/i915/guc: use probe_error log for CT enablement failure We have a couple of failure injection points in the CT enablement path, so we need to use i915_probe_error() to select the appropriate log level. A new macro (CT_PROBE_ERROR) has been added to the set of CT logging macros to be used in this scenario and upcoming ones. While adding the new macros, fix the underlying logging mechanics used by the existing ones (DRM_DEV_* -> drm_*) and move the inlines to before they're used inside the macros. Signed-off-by: Matthew Brost Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-3-matthew.brost@intel.com commit 1fb12c5871521eab5fa428bf265841b1a3827a97 Author: Daniele Ceraolo Spurio Date: Wed Jun 2 22:16:11 2021 -0700 drm/i915/guc: skip disabling CTBs before sanitizing the GuC If we're about to sanitize the GuC, something might have going wrong beforehand, so we should avoid trying to talk to it. Even if GuC is still running fine, the sanitize will reset its internal state and clear the CTB registration, so there is still no need to explicitly do so. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2469 Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost Cc: Michal Wajdeczko Cc: John Harrison Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-2-matthew.brost@intel.com commit a29cb6914681a55667436a9eb7a42e28da8cf387 Author: Yuchung Cheng Date: Wed Jun 2 17:51:21 2021 -0700 net: tcp better handling of reordering then loss cases This patch aims to improve the situation when reordering and loss are ocurring in the same flight of packets. Previously the reordering would first induce a spurious recovery, then the subsequent ACK may undo the cwnd (based on the timestamps e.g.). However the current loss recovery does not proceed to invoke RACK to install a reordering timer. If some packets are also lost, this may lead to a long RTO-based recovery. An example is https://groups.google.com/g/bbr-dev/c/OFHADvJbTEI The solution is to after reverting the recovery, always invoke RACK to either mount the RACK timer to fast retransmit after the reordering window, or restarts the recovery if new loss is identified. Hence it is possible the sender may go from Recovery to Disorder/Open to Recovery again in one ACK. Reported-by: mingkun bian Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 43902070fb7b73a0148eef63f5ece3a100e821ae Author: Kees Cook Date: Wed Jun 2 13:58:20 2021 -0700 net: bonding: Use strscpy_pad() instead of manually-truncated strncpy() Silence this warning by using strscpy_pad() directly: drivers/net/bonding/bond_main.c:4877:3: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation] 4877 | strncpy(params->primary, primary, IFNAMSIZ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Additionally replace other strncpy() uses, as it is considered deprecated: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202102150705.fdR6obB0-lkp@intel.com Acked-by: Jay Vosburgh Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 9c153d3889767eb347a9b1719cc6f336faccdba9 Author: Kees Cook Date: Wed Jun 2 13:27:41 2021 -0700 net: vlan: Avoid using strncpy() Use strscpy_pad() instead of strncpy() which is considered deprecated: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 5ff5622ea1f16d535f1be4e478e712ef48fe183b Merge: ae1d9cc312444 35155e2626dca Author: David S. Miller Date: Thu Jun 3 14:11:22 2021 -0700 Merge branch 'NVMeTCP-Offload-ULP' Shai Malin says: ==================== NVMeTCP Offload ULP With the goal of enabling a generic infrastructure that allows NVMe/TCP offload devices like NICs to seamlessly plug into the NVMe-oF stack, this patch series introduces the nvme-tcp-offload ULP host layer, which will be a new transport type called "tcp-offload" and will serve as an abstraction layer to work with vendor specific nvme-tcp offload drivers. NVMeTCP offload is a full offload of the NVMeTCP protocol, this includes both the TCP level and the NVMeTCP level. The nvme-tcp-offload transport can co-exist with the existing tcp and other transports. The tcp offload was designed so that stack changes are kept to a bare minimum: only registering new transports. All other APIs, ops etc. are identical to the regular tcp transport. Representing the TCP offload as a new transport allows clear and manageable differentiation between the connections which should use the offload path and those that are not offloaded (even on the same device). The nvme-tcp-offload layers and API compared to nvme-tcp and nvme-rdma: * NVMe layer: * [ nvme/nvme-fabrics/blk-mq ] | (nvme API and blk-mq API) | | * Vendor agnostic transport layer: * [ nvme-rdma ] [ nvme-tcp ] [ nvme-tcp-offload ] | | | (Verbs) | | | | (Socket) | | | | | (nvme-tcp-offload API) | | | | | | * Vendor Specific Driver: * | | | [ qedr ] | | [ qede ] | [ qedn ] Performance: ============ With this implementation on top of the Marvell qedn driver (using the Marvell FastLinQ NIC), we were able to demonstrate the following CPU utilization improvement: On AMD EPYC 7402, 2.80GHz, 28 cores: - For 16K queued read IOs, 16jobs, 4qd (50Gbps line rate): Improved the CPU utilization from 15.1% with NVMeTCP SW to 4.7% with NVMeTCP offload. On Intel(R) Xeon(R) Gold 5122 CPU, 3.60GHz, 16 cores: - For 512K queued read IOs, 16jobs, 4qd (25Gbps line rate): Improved the CPU utilization from 16.3% with NVMeTCP SW to 1.1% with NVMeTCP offload. In addition, we were able to demonstrate the following latency improvement: - For 200K read IOPS (16 jobs, 16 qd, with fio rate limiter): Improved the average latency from 105 usec with NVMeTCP SW to 39 usec with NVMeTCP offload. Improved the 99.99 tail latency from 570 usec with NVMeTCP SW to 91 usec with NVMeTCP offload. The end-to-end offload latency was measured from fio while running against back end of null device. Upstream plan: ============== The RFC series "NVMeTCP Offload ULP and QEDN Device Driver" https://lore.kernel.org/netdev/20210531225222.16992-1-smalin@marvell.com/ was designed in a modular way so that part 1 (nvme-tcp-offload) and part 2 (qed) are independent and part 3 (qedn) depends on both parts 1+2. - Part 1 (RFC patch 1-8): NVMeTCP Offload ULP The nvme-tcp-offload patches, will be sent to 'linux-nvme@lists.infradead.org'. - Part 2 (RFC patches 9-15): QED NVMeTCP Offload The qed infrastructure, will be sent to 'netdev@vger.kernel.org'. Once part 1 and 2 are accepted: - Part 3 (RFC patches 16-27): QEDN NVMeTCP Offload The qedn patches, will be sent to 'linux-nvme@lists.infradead.org'. Marvell is fully committed to maintain, test, and address issues with the new nvme-tcp-offload layer. Usage: ====== With the Marvell NVMeTCP offload design, the network-device (qede) and the offload-device (qedn) are paired on each port - Logically similar to the RDMA model. The user will interact with the network-device in order to configure the ip/vlan. The NVMeTCP configuration is populated as part of the nvme connect command. Example: Assign IP to the net-device (from any existing Linux tool): ip addr add 100.100.0.101/24 dev p1p1 This IP will be used by both net-device (qede) and offload-device (qedn). In order to connect from "sw" nvme-tcp through the net-device (qede): nvme connect -t tcp -s 4420 -a 100.100.0.100 -n testnqn In order to connect from "offload" nvme-tcp through the offload-device (qedn): nvme connect -t tcp_offload -s 4420 -a 100.100.0.100 -n testnqn An alternative approach, and as a future enhancement that will not impact this series will be to modify nvme-cli with a new flag that will determine if "-t tcp" should be the regular nvme-tcp (which will be the default) or nvme-tcp-offload. Exmaple: nvme connect -t tcp -s 4420 -a 100.100.0.100 -n testnqn -[new flag] Queue Initialization Design: ============================ The nvme-tcp-offload ULP module shall register with the existing nvmf_transport_ops (.name = "tcp_offload"), nvme_ctrl_ops and blk_mq_ops. The nvme-tcp-offload vendor driver shall register to nvme-tcp-offload ULP with the following ops: - claim_dev() - in order to resolve the route to the target according to the paired net_dev. - create_queue() - in order to create offloaded nvme-tcp queue. The nvme-tcp-offload ULP module shall manage all the controller level functionalities, call claim_dev and based on the return values shall call the relevant module create_queue in order to create the admin queue and the IO queues. IO-path Design: =============== The nvme-tcp-offload shall work at the IO-level - the nvme-tcp-offload ULP module shall pass the request (the IO) to the nvme-tcp-offload vendor driver and later, the nvme-tcp-offload vendor driver returns the request completion (the IO completion). No additional handling is needed in between; this design will reduce the CPU utilization as we will describe below. The nvme-tcp-offload vendor driver shall register to nvme-tcp-offload ULP with the following IO-path ops: - send_req() - in order to pass the request to the handling of the offload driver that shall pass it to the vendor specific device. - poll_queue() Once the IO completes, the nvme-tcp-offload vendor driver shall call command.done() that will invoke the nvme-tcp-offload ULP layer to complete the request. TCP events: =========== The Marvell FastLinQ NIC HW engine handle all the TCP re-transmissions and OOO events. Teardown and errors: ==================== In case of NVMeTCP queue error the nvme-tcp-offload vendor driver shall call the nvme_tcp_ofld_report_queue_err. The nvme-tcp-offload vendor driver shall register to nvme-tcp-offload ULP with the following teardown ops: - drain_queue() - destroy_queue() The Marvell FastLinQ NIC HW engine: ==================================== The Marvell NIC HW engine is capable of offloading the entire TCP/IP stack and managing up to 64K connections per PF, already implemented and upstream use cases for this include iWARP (by the Marvell qedr driver) and iSCSI (by the Marvell qedi driver). In addition, the Marvell NIC HW engine offloads the NVMeTCP queue layer and is able to manage the IO level also in case of TCP re-transmissions and OOO events. The HW engine enables direct data placement (including the data digest CRC calculation and validation) and direct data transmission (including data digest CRC calculation). The Marvell qedn driver: ======================== The new driver will be added under "drivers/nvme/hw" and will be enabled by the Kconfig "Marvell NVM Express over Fabrics TCP offload". As part of the qedn init, the driver will register as a pci device driver and will work with the Marvell fastlinQ NIC. As part of the probe, the driver will register to the nvme_tcp_offload (ULP) and to the qed module (qed_nvmetcp_ops) - similar to other "qed_*_ops" which are used by the qede, qedr, qedf and qedi device drivers. nvme-tcp-offload Future work: ============================= - NVMF_OPT_HOST_IFACE Support. Changes since RFC v1: ===================== - nvme-tcp-offload: Fix nvme_tcp_ofld_ops return values. - nvme-tcp-offload: Remove NVMF_TRTYPE_TCP_OFFLOAD. - nvme-tcp-offload: Add nvme_tcp_ofld_poll() implementation. - nvme-tcp-offload: Fix nvme_tcp_ofld_queue_rq() to check map_sg() and send_req() return values. Changes since RFC v2: ===================== - nvme-tcp-offload: Fixes in controller and queue level (patches 3-6). - qedn: Add the Marvell's NVMeTCP HW offload vendor driver init and probe (patches 8-11). Changes since RFC v3: ===================== - nvme-tcp-offload: Add the full implementation of the nvme-tcp-offload layer including the new ops: setup_ctrl(), release_ctrl(), commit_rqs() and new flows (ASYNC and timeout). - nvme-tcp-offload: Add device maximums: max_hw_sectors, max_segments. - nvme-tcp-offload: layer design and optimization changes. Changes since RFC v4: ===================== (Many thanks to Hannes Reinecke for his feedback) - nvme_tcp_offload: Add num_hw_vectors in order to limit the number of queues. - nvme_tcp_offload: Add per device private_data. - nvme_tcp_offload: Fix header digest, data digest and tos initialization. Changes since RFC v5: ===================== (Many thanks to Sagi Grimberg for his feedback) - nvme-fabrics: Expose nvmf_check_required_opts() globally (as a new patch). - nvme_tcp_offload: Remove io-queues BLK_MQ_F_BLOCKING. - nvme_tcp_offload: Fix the nvme_tcp_ofld_stop_queue (drain_queue) flow. - nvme_tcp_offload: Fix the nvme_tcp_ofld_free_queue (destroy_queue) flow. - nvme_tcp_offload: Change rwsem to mutex. - nvme_tcp_offload: remove redundant fields. - nvme_tcp_offload: Remove the "new" from setup_ctrl(). - nvme_tcp_offload: Remove the init_req() and commit_rqs() ops. - nvme_tcp_offload: Minor fixes in nvme_tcp_ofld_create_ctrl() ansd nvme_tcp_ofld_free_queue(). - nvme_tcp_offload: Patch 8 (timeout and async) was squeashed into patch 7 (io level). Changes since RFC v6: ===================== - No changes in nvme_tcp_offload (only in qedn). ==================== Signed-off-by: David S. Miller commit 35155e2626dcae187df7071550fbfd94b7113d6c Author: Dean Balandin Date: Wed Jun 2 21:42:46 2021 +0300 nvme-tcp-offload: Add IO level implementation In this patch, we present the IO level functionality. The nvme-tcp-offload shall work on the IO-level, meaning the nvme-tcp-offload ULP module shall pass the request to the nvme-tcp-offload vendor driver and shall expect for the request completion. No additional handling is needed in between, this design will reduce the CPU utilization as we will describe below. The nvme-tcp-offload vendor driver shall register to nvme-tcp-offload ULP with the following IO-path ops: - send_req - in order to pass the request to the handling of the offload driver that shall pass it to the vendor specific device - poll_queue The vendor driver will manage the context from which the request will be executed and the request aggregations. Once the IO completed, the nvme-tcp-offload vendor driver shall call command.done() that shall invoke the nvme-tcp-offload ULP layer for completing the request. This patch also add support for the nvme-tcp-offload timeout and nvme-tcp-offload ASYNC flow. Acked-by: Igor Russkikh Signed-off-by: Dean Balandin Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: David S. Miller commit e4ba452ded39caae59dcecba7412c34750b6e229 Author: Dean Balandin Date: Wed Jun 2 21:42:45 2021 +0300 nvme-tcp-offload: Add queue level implementation In this patch we implement queue level functionality. The implementation is similar to the nvme-tcp module, the main difference being that we call the vendor specific create_queue op which creates the TCP connection, and NVMeTPC connection including icreq+icresp negotiation. Once create_queue returns successfully, we can move on to the fabrics connect. Acked-by: Igor Russkikh Signed-off-by: Dean Balandin Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Himanshu Madhani Signed-off-by: David S. Miller commit 5faf6d68554808ef1b9c8647a7e8fd8a4e8cb0a5 Author: Arie Gershberg Date: Wed Jun 2 21:42:44 2021 +0300 nvme-tcp-offload: Add controller level error recovery implementation In this patch, we implement controller level error handling and recovery. Upon an error discovered by the ULP or reset controller initiated by the nvme-core (using reset_ctrl workqueue), the ULP will initiate a controller recovery which includes teardown and re-connect of all queues. Acked-by: Igor Russkikh Signed-off-by: Arie Gershberg Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: David S. Miller commit 5aadd5f9311e2aa18c3892bf47df7825fee0b457 Author: Arie Gershberg Date: Wed Jun 2 21:42:43 2021 +0300 nvme-tcp-offload: Add controller level implementation In this patch we implement controller level functionality including: - create_ctrl. - delete_ctrl. - free_ctrl. The implementation is similar to other nvme fabrics modules, the main difference being that the nvme-tcp-offload ULP calls the vendor specific claim_dev() op with the given TCP/IP parameters to determine which device will be used for this controller. Once found, the vendor specific device and controller will be paired and kept in a controller list managed by the ULP. Acked-by: Igor Russkikh Signed-off-by: Arie Gershberg Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Himanshu Madhani Signed-off-by: David S. Miller commit 4b8178ec5794f93c71950fdfb1cb5465f6f2e154 Author: Dean Balandin Date: Wed Jun 2 21:42:42 2021 +0300 nvme-tcp-offload: Add device scan implementation As part of create_ctrl(), it scans the registered devices and calls the claim_dev op on each of them, to find the first devices that matches the connection params. Once the correct devices is found (claim_dev returns true), we raise the refcnt of that device and return that device as the device to be used for ctrl currently being created. Acked-by: Igor Russkikh Signed-off-by: Dean Balandin Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit af527935bd5a3eb88af425a2a973211e06df6423 Author: Prabhakar Kushwaha Date: Wed Jun 2 21:42:41 2021 +0300 nvme-fabrics: Expose nvmf_check_required_opts() globally nvmf_check_required_opts() is used to check if user provided opts has the required_opts or not. if not, it will log which options are not provided. It can be leveraged by nvme-tcp-offload to check if provided opts are supported by this specific vendor driver or not. So expose nvmf_check_required_opts() globally. Acked-by: Igor Russkikh Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 98a5097d1e08f473e2af13bd94e5b4533d51cfd5 Author: Prabhakar Kushwaha Date: Wed Jun 2 21:42:40 2021 +0300 nvme-fabrics: Move NVMF_ALLOWED_OPTS and NVMF_REQUIRED_OPTS definitions Move NVMF_ALLOWED_OPTS and NVMF_REQUIRED_OPTS definitions to header file, so it can be used by the different HW devices. NVMeTCP offload devices might have different limitations of the allowed options, for example, a device that does not support all the queue types. With tcp and rdma, only the nvme-tcp and nvme-rdma layers handle those attributes and the HW devices do not create any limitations for the allowed options. An alternative design could be to add separate fields in nvme_tcp_ofld_ops such as max_hw_sectors and max_segments that we already have in this series. Acked-by: Igor Russkikh Signed-off-by: Arie Gershberg Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Acked-by: Sagi Grimberg Signed-off-by: David S. Miller commit f0e8cb6106da27039cdc23ecf5b5a776d7c7e66e Author: Shai Malin Date: Wed Jun 2 21:42:39 2021 +0300 nvme-tcp-offload: Add nvme-tcp-offload - NVMeTCP HW offload ULP This patch will present the structure for the NVMeTCP offload common layer driver. This module is added under "drivers/nvme/host/" and future offload drivers which will register to it will be placed under "drivers/nvme/hw". This new driver will be enabled by the Kconfig "NVM Express over Fabrics TCP offload commmon layer". In order to support the new transport type, for host mode, no change is needed. Each new vendor-specific offload driver will register to this ULP during its probe function, by filling out the nvme_tcp_ofld_dev->ops and nvme_tcp_ofld_dev->private_data and calling nvme_tcp_ofld_register_dev with the initialized struct. The internal implementation: - tcp-offload.h: Includes all common structs and ops to be used and shared by offload drivers. - tcp-offload.c: Includes the init function which registers as a NVMf transport just like any other transport. Acked-by: Igor Russkikh Signed-off-by: Dean Balandin Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: David S. Miller commit ae1d9cc31244407710131b7ca531e7a8be3381c2 Merge: eda1bc65b0dc1 5ef213258ddf3 Author: David S. Miller Date: Thu Jun 3 14:06:39 2021 -0700 Merge branch 'tipc-cleanups' Jon Maloy says: ==================== tipc: some small cleanups We make some minor code cleanups and improvements. v2: Changed value of TIPC_ANY_SCOPE macro in patch #3 to avoid compiler warning ==================== Signed-off-by: David S. Miller commit 5ef213258ddf38fc8b6de5d7aea3d514ff13f71a Author: Jon Maloy Date: Wed Jun 2 13:44:26 2021 -0400 tipc: simplify handling of lookup scope during multicast message reception We introduce a new macro TIPC_ANY_SCOPE to make the handling of the lookup scope value more comprehensible during multicast reception. The (unchanged) rules go as follows: 1) Multicast messages sent from own node are delivered to all matching sockets on the own node, irrespective of their binding scope. 2) Multicast messages sent from other nodes arrive here because they have found TIPC_CLUSTER_SCOPE bindings emanating from this node. Those messages should be delivered to exactly those sockets, but not to local sockets bound with TIPC_NODE_SCOPE, since the latter obviously were not meant to be visible for those senders. 3) Group multicast/broadcast messages are delivered to the sockets with a binding scope matching exactly the lookup scope indicated in the message header, and nobody else. Reviewed-by: Xin Long Tested-by: Hoang Le Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 62633c2f17f1f0e6dd6932f990ade9525204ea24 Author: Jon Maloy Date: Wed Jun 2 13:44:25 2021 -0400 tipc: refactor function tipc_sk_anc_data_recv() We refactor tipc_sk_anc_data_recv() to make it slightly more comprehensible, but also to facilitate application of some additions to the code in a future commit. Reviewed-by: Xin Long Tested-by: Hoang Le Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 14623e005a1e74864afca1261a3aa8e6e8017df9 Author: Jon Maloy Date: Wed Jun 2 13:44:24 2021 -0400 tipc: eliminate redundant fields in struct tipc_sock We eliminate the redundant fields conn_type and conn_instance in struct tipc_sock. On the connecting side, this information is already present in the unused (after the connection is established) part of the pre-allocated header, and on the accepting side, we put it there when the new socket is created. Reviewed-by: Xin Long Tested-by: Hoang Le Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit eda1bc65b0dc1b03006e427430ba23746ec44714 Merge: 2c95e6c7e558f 806ee7f81a2b0 Author: David S. Miller Date: Thu Jun 3 14:04:18 2021 -0700 Merge branch 'QED-NVMeTCP-Offload' Shai Malin says: ==================== QED NVMeTCP Offload Intro: ====== This is the qed part of Marvell’s NVMeTCP offload series, shared as RFC series "NVMeTCP Offload ULP and QEDN Device Drive". This part is a standalone series, and is not dependent on other parts of the RFC. The overall goal is to add qedn as the offload driver for NVMeTCP, alongside the existing offload drivers (qedr, qedi and qedf for rdma, iscsi and fcoe respectively). In this series we are making the necessary changes to qed to enable this by exposing APIs for FW/HW initializations. The qedn series (and required changes to NVMe stack) will be sent to the linux-nvme mailing list. I have included more details on the upstream plan under section with the same name below. The Series Patches: =================== 1. qed: Add TCP_ULP FW resource layout – replacing iSCSI when common with NVMeTCP. 2. qed: Add NVMeTCP Offload PF Level FW and HW HSI. 3. qed: Add NVMeTCP Offload Connection Level FW and HW HSI. 4. qed: Add support of HW filter block – enables redirecting NVMeTCP traffic to the dedicated PF. 5. qed: Add NVMeTCP Offload IO Level FW and HW HSI. 6. qed: Add NVMeTCP Offload IO Level FW Initializations. 7. qed: Add IP services APIs support –VLAN, IP routing and reserving TCP ports for the offload device. The NVMeTCP Offload: ==================== With the goal of enabling a generic infrastructure that allows NVMe/TCP offload devices like NICs to seamlessly plug into the NVMe-oF stack, this patch series introduces the nvme-tcp-offload ULP host layer, which will be a new transport type called "tcp-offload" and will serve as an abstraction layer to work with vendor specific nvme-tcp offload drivers. NVMeTCP offload is a full offload of the NVMeTCP protocol, this includes both the TCP level and the NVMeTCP level. The nvme-tcp-offload transport can co-exist with the existing tcp and other transports. The tcp offload was designed so that stack changes are kept to a bare minimum: only registering new transports. All other APIs, ops etc. are identical to the regular tcp transport. Representing the TCP offload as a new transport allows clear and manageable differentiation between the connections which should use the offload path and those that are not offloaded (even on the same device). The nvme-tcp-offload layers and API compared to nvme-tcp and nvme-rdma: * NVMe layer: * [ nvme/nvme-fabrics/blk-mq ] | (nvme API and blk-mq API) | | * Vendor agnostic transport layer: * [ nvme-rdma ] [ nvme-tcp ] [ nvme-tcp-offload ] | | | (Verbs) | | | | (Socket) | | | | | (nvme-tcp-offload API) | | | | | | * Vendor Specific Driver: * | | | [ qedr ] | | [ qede ] | [ qedn ] Performance: ============ With this implementation on top of the Marvell qedn driver (using the Marvell FastLinQ NIC), we were able to demonstrate the following CPU utilization improvement: On AMD EPYC 7402, 2.80GHz, 28 cores: - For 16K queued read IOs, 16jobs, 4qd (50Gbps line rate): Improved the CPU utilization from 15.1% with NVMeTCP SW to 4.7% with NVMeTCP offload. On Intel(R) Xeon(R) Gold 5122 CPU, 3.60GHz, 16 cores: - For 512K queued read IOs, 16jobs, 4qd (25Gbps line rate): Improved the CPU utilization from 16.3% with NVMeTCP SW to 1.1% with NVMeTCP offload. In addition, we were able to demonstrate the following latency improvement: - For 200K read IOPS (16 jobs, 16 qd, with fio rate limiter): Improved the average latency from 105 usec with NVMeTCP SW to 39 usec with NVMeTCP offload. Improved the 99.99 tail latency from 570 usec with NVMeTCP SW to 91 usec with NVMeTCP offload. The end-to-end offload latency was measured from fio while running against back end of null device. The Marvell FastLinQ NIC HW engine: ==================================== The Marvell NIC HW engine is capable of offloading the entire TCP/IP stack and managing up to 64K connections per PF, already implemented and upstream use cases for this include iWARP (by the Marvell qedr driver) and iSCSI (by the Marvell qedi driver). In addition, the Marvell NIC HW engine offloads the NVMeTCP queue layer and is able to manage the IO level also in case of TCP re-transmissions and OOO events. The HW engine enables direct data placement (including the data digest CRC calculation and validation) and direct data transmission (including data digest CRC calculation). The Marvell qedn driver: ======================== The new driver will be added under "drivers/nvme/hw" and will be enabled by the Kconfig "Marvell NVM Express over Fabrics TCP offload". As part of the qedn init, the driver will register as a pci device driver and will work with the Marvell fastlinQ NIC. As part of the probe, the driver will register to the nvme_tcp_offload (ULP) and to the qed module (qed_nvmetcp_ops) - similar to other "qed_*_ops" which are used by the qede, qedr, qedf and qedi device drivers. Upstream Plan: ============= The RFC series "NVMeTCP Offload ULP and QEDN Device Driver" https://lore.kernel.org/netdev/20210531225222.16992-1-smalin@marvell.com/ was designed in a modular way so that part 1 (nvme-tcp-offload) and part 2 (qed) are independent and part 3 (qedn) depends on both parts 1+2. - Part 1 (RFC patch 1-8): NVMeTCP Offload ULP The nvme-tcp-offload patches, will be sent to 'linux-nvme@lists.infradead.org'. - Part 2 (RFC patches 9-15): QED NVMeTCP Offload The qed infrastructure, will be sent to 'netdev@vger.kernel.org'. Once part 1 and 2 are accepted: - Part 3 (RFC patches 16-27): QEDN NVMeTCP Offload The qedn patches, will be sent to 'linux-nvme@lists.infradead.org'. ==================== Signed-off-by: David S. Miller commit 806ee7f81a2b037e3f57275adcdf974453cc3254 Author: Nikolay Assa Date: Wed Jun 2 20:16:55 2021 +0300 qed: Add IP services APIs support This patch introduces APIs which the NVMeTCP Offload device (qedn) will use through the paired net-device (qede). It includes APIs for: - ipv4/ipv6 routing - get VLAN from net-device - TCP ports reservation Acked-by: Igor Russkikh Signed-off-by: Nikolay Assa Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 826da4861430898495fa49f072335e795e8adfd3 Author: Shai Malin Date: Wed Jun 2 20:16:54 2021 +0300 qed: Add NVMeTCP Offload IO Level FW Initializations This patch introduces the NVMeTCP FW initializations which is used to initialize the IO level configuration into a per IO HW resource ("task") as part of the IO path flow. This includes: - Write IO FW initialization - Read IO FW initialization. - IC-Req and IC-Resp FW exchange. - FW Cleanup flow (Flush IO). Acked-by: Igor Russkikh Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Shai Malin Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit ab47bdfd2e2e9670172a737d12ebfc94bf9d299d Author: Shai Malin Date: Wed Jun 2 20:16:53 2021 +0300 qed: Add NVMeTCP Offload IO Level FW and HW HSI This patch introduces the NVMeTCP Offload FW and HW HSI in order to initialize the IO level configuration into a per IO HW resource ("task") as part of the IO path flow. Acked-by: Igor Russkikh Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Shai Malin Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 203d136e8958a7c65834601f669bdd0fcaa6fcbd Author: Prabhakar Kushwaha Date: Wed Jun 2 20:16:52 2021 +0300 qed: Add support of HW filter block This patch introduces the functionality of HW filter block. It adds and removes filters based on source and target TCP port. It also add functionality to clear all filters at once. Acked-by: Igor Russkikh Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Shai Malin Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 76684ab8f4f95394df6a752cee37b197b4c8732b Author: Shai Malin Date: Wed Jun 2 20:16:51 2021 +0300 qed: Add NVMeTCP Offload Connection Level FW and HW HSI This patch introduces the NVMeTCP HSI and HSI functionality in order to initialize and interact with the HW device as part of the connection level HSI. This includes: - Connection offload: offload a TCP connection to the FW. - Connection update: update the ICReq-ICResp params - Connection clear SQ: outstanding IOs FW flush. - Connection termination: terminate the TCP connection and flush the FW. Acked-by: Igor Russkikh Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Shai Malin Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 897e87a10c35fb37a20886af6f731748d92c1836 Author: Shai Malin Date: Wed Jun 2 20:16:50 2021 +0300 qed: Add NVMeTCP Offload PF Level FW and HW HSI This patch introduces the NVMeTCP device and PF level HSI and HSI functionality in order to initialize and interact with the HW device. The patch also adds qed NVMeTCP personality. This patch is based on the qede, qedr, qedi, qedf drivers HSI. Acked-by: Igor Russkikh Signed-off-by: Dean Balandin Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Shai Malin Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 1bd4f5716fc3bb4882033fbeeb97472503f1c7e2 Author: Omkar Kulkarni Date: Wed Jun 2 20:16:49 2021 +0300 qed: Add TCP_ULP FW resource layout Add TCP_ULP as a storage common TCP offload FW resource layout. This will be used by the core driver (QED) for both the NVMeTCP and iSCSI. Acked-by: Igor Russkikh Signed-off-by: Prabhakar Kushwaha Signed-off-by: Omkar Kulkarni Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Shai Malin Reviewed-by: Hannes Reinecke Signed-off-by: David S. Miller commit 2c95e6c7e558f20d309c1385a8bf3ed9da48491e Author: Krzysztof Kozlowski Date: Wed Jun 2 13:20:11 2021 +0200 nfc: mrvl: reduce the scope of local variables In two places the 'ep_desc' and 'skb' local variables are used only within if() or for() block, so they scope can be reduced which makes the entire code slightly easier to follow. No functional change. Suggested-by: Joe Perches Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit a58224040f2df8381146e7cfba9d657d5683ded1 Author: Krzysztof Kozlowski Date: Wed Jun 2 13:20:10 2021 +0200 nfc: mrvl: remove useless "continue" at end of loop The "continue" statement at the end of a for loop does not have an effect. Entire loop contents can be slightly simplified to increase code readability. No functional change. Suggested-by: Joe Perches Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 81ac670a6772001a44f659b4883b3048a8a9d41c Merge: c356be057432d 5e4a43ceb22a6 Author: David S. Miller Date: Thu Jun 3 13:54:50 2021 -0700 Merge branch 'smc-next' Karsten Graul says: ==================== net/smc: updates 2021-06-02 Please apply the following patch series for smc to netdev's net-next tree. Both patches are cleanups and remove unnecessary code. ==================== Signed-off-by: David S. Miller commit 5e4a43ceb22a6fd2d372fde923a6a95ef6728fd7 Author: Julian Wiedmann Date: Wed Jun 2 10:56:26 2021 +0200 net/smc: no need to flush smcd_dev's event_wq before destroying it destroy_workqueue() already calls drain_workqueue(), which is a stronger variant of flush_workqueue(). Signed-off-by: Julian Wiedmann Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit f8e0a68babae3f612799178c718ec5358eac41cf Author: Karsten Graul Date: Wed Jun 2 10:56:25 2021 +0200 net/smc: avoid possible duplicate dmb unregistration smc_lgr_cleanup() calls smcd_unregister_all_dmbs() as part of the link group termination process. This is a leftover from the times when smc_lgr_cleanup() scheduled a worker to actually free the link group. Nowadays smc_lgr_cleanup() directly calls smc_lgr_free() without any delay so an earlier dmb unregistration is no longer needed. So remove smcd_unregister_all_dmbs() and the call to it. Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 7cc2623d1c84935f06fbdf727f41d70f4c779ef6 Author: Bart Van Assche Date: Wed May 19 10:52:26 2021 -0700 block: Update blk_update_request() documentation Although the original intent was to use blk_update_request() in stacking block drivers only, it is used much more widely today. Reflect this in the documentation block above this function. See also: * commit 32fab448e5e8 ("block: add request update interface"). * commit 2e60e02297cf ("block: clean up request completion API"). * commit ed6565e73424 ("block: handle partial completions for special payload requests"). Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210519175226.8853-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit c356be057432da1720afb5106f4ff102b6a950a7 Merge: b596ce68fd4a5 11059740e616f Author: David S. Miller Date: Thu Jun 3 13:30:44 2021 -0700 Merge branch 'xpcs-phylink_pcs_ops' Vladimir Oltean says: ==================== Convert xpcs to phylink_pcs_ops Background: the sja1105 DSA driver currently drives a Designware XPCS for SGMII and 2500base-X, and it would be nice to reuse some code with the xpcs module. This would also help consolidate the phylink_pcs_ops, since the only other dedicated PCS driver, currently, is the lynx_pcs. Therefore, this series makes the xpcs expose the same kind of API that the lynx_pcs module does. The main changes are getting rid of struct mdio_xpcs_ops, being compatible with struct phylink_pcs_ops and being less reliant on the phy_interface_t passed to xpcs_probe (now renamed to xpcs_create). This patch series is partially tested (some code paths have been covered on the NXP SJA1105 and some others with the help of Vee Khee Wong on Intel Tiger Lake / stmmac) but further testing on 10G setups would be appreciated, if possible. ==================== Signed-off-by: David S. Miller commit 11059740e616f4d83d8d9e3f8a63dafefdc2ae5d Author: Vladimir Oltean Date: Wed Jun 2 19:20:19 2021 +0300 net: pcs: xpcs: convert to phylink_pcs_ops Since all the remaining members of struct mdio_xpcs_ops have direct equivalents in struct phylink_pcs_ops, it is about time we remove it altogether. Since the phylink ops return void, we need to remove the error propagation from the various xpcs methods and simply print an error message where appropriate. Since xpcs_get_state_c73() detects link faults and attempts to reset the link on its own by calling xpcs_config(), but xpcs_config() now has a lot of phylink arguments which are not needed and cannot be simply fabricated by anybody else except phylink, the actual implementation has been moved into a smaller xpcs_do_config(). The const struct mdio_xpcs_ops *priv->hw->xpcs has been removed, so we need to look at the struct mdio_xpcs_args pointer now as an indication whether the port has an XPCS or not. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2cac15dae2f6e2f86bef1acc2a7f78fc97a0a060 Author: Vladimir Oltean Date: Wed Jun 2 19:20:18 2021 +0300 net: pcs: xpcs: convert to mdio_device Unify the 2 existing PCS drivers (lynx and xpcs) by doing a similar thing on probe, which is to have a *_create function that takes a struct mdio_device * given by the caller, and builds a private PCS structure around that. This changes stmmac to hold only a pointer to the xpcs, as opposed to the full structure. This will be used in the next patch when struct mdio_xpcs_ops is removed. Currently a pointer to struct mdio_xpcs_ops is used as a shorthand to determine whether the port has an XPCS or not. We can do the same now with the mdio_xpcs_args pointer. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 679e283ec7d6cfdf997cbb911d6857c115029007 Author: Vladimir Oltean Date: Wed Jun 2 19:20:17 2021 +0300 net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write} Use the dedicated helper for abstracting away how the clause 45 address is packed in reg_addr. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8e2bb9569942f9cb2ef816dbf66fbf3e8d722720 Author: Vladimir Oltean Date: Wed Jun 2 19:20:16 2021 +0300 net: pcs: xpcs: export xpcs_probe Similar to the other recently functions, it is not necessary for xpcs_probe to be a function pointer, so export it so that it can be called directly. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 14b517cb62d6efc8866f176c922de03dfe1564f3 Author: Vladimir Oltean Date: Wed Jun 2 19:20:15 2021 +0300 net: pcs: xpcs: export xpcs_config_eee There is no good reason why we need to go through: stmmac_xpcs_config_eee -> stmmac_do_callback -> mdio_xpcs_ops->config_eee -> xpcs_config_eee when we can simply call xpcs_config_eee. priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is done that way because the mdio_bus_data pointer might or might not be populated in all stmmac instantiations. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a1a753ed1d4ae46c1c1874fb1af899f6579a7547 Author: Vladimir Oltean Date: Wed Jun 2 19:20:14 2021 +0300 net: pcs: xpcs: export xpcs_validate Calling a function pointer with a single implementation through struct mdio_xpcs_ops is clunky, and the stmmac_do_callback system forces this to return int, even though it always returns zero. Simply remove the "validate" function pointer from struct mdio_xpcs_ops and replace it with an exported xpcs_validate symbol which is called directly by stmmac. priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is done that way because the mdio_bus_data pointer might or might not be populated in all stmmac instantiations. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9900074ecccec472c9d89929c3d37c235f45d33a Author: Vladimir Oltean Date: Wed Jun 2 19:20:13 2021 +0300 net: pcs: xpcs: make the checks related to the PHY interface mode stateless The operating mode of the driver is currently to populate its struct mdio_xpcs_args::supported and struct mdio_xpcs_args::an_mode statically in xpcs_probe(), based on the passed phy_interface_t, and work with those. However this is not the operation that phylink expects from a PCS driver, because the port might be attached to an SFP cage that triggers changes of the phy_interface_t dynamically as one SFP module is unpluggged and another is plugged. To migrate towards that model, the struct mdio_xpcs_args should not cache anything related to the phy_interface_t, but just look up the statically defined, const struct xpcs_compat structure corresponding to the detected PCS OUI/model number. So we delete the "supported" and "an_mode" members of struct mdio_xpcs_args, and add the "id" structure there (since the ID is not expected to change at runtime). Since xpcs->supported is used deep in the code in _xpcs_config_aneg_c73(), we need to modify some function headers to pass the xpcs_compat from all callers. In turn, the xpcs_compat is always supplied externally to the xpcs module: - Most of the time by phylink - In xpcs_probe() it is needed because xpcs_soft_reset() writes to MDIO_MMD_PCS or to MDIO_MMD_VEND2 depending on whether an_mode is clause 37 or clause 73. In order to not introduce functional changes related to when the soft reset is issued, we continue to require the initial phy_interface_t argument to be passed to xpcs_probe() so we can pass this on to xpcs_soft_reset(). - stmmac_open() wants to know whether to call stmmac_init_phy() or not, and for that it looks inside xpcs->an_mode, because the clause 73 (backplane) AN modes supposedly do not have a PHY. Because we moved an_mode outside of struct mdio_xpcs_args, this is now no longer directly possible, so we introduce a helper function xpcs_get_an_mode() which protects the data encapsulation of the xpcs module and requires a phy_interface_t to be passed as argument. This function can look up the appropriate compat based on the phy_interface_t. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a54a8b71f6faca9a794c285e2ecde74a0dbec65a Author: Vladimir Oltean Date: Wed Jun 2 19:20:12 2021 +0300 net: pcs: xpcs: there is only one PHY ID The xpcs driver has an apparently inadequate structure for the actual hardware it drives. These defines and the xpcs_probe() function would suggest that there is one PHY ID per supported PHY interface type, and the driver simply validates whether the mode it should operate in (the argument of xpcs_probe) matches what the hardware is capable of: #define SYNOPSYS_XPCS_USXGMII_ID 0x7996ced0 #define SYNOPSYS_XPCS_10GKR_ID 0x7996ced0 #define SYNOPSYS_XPCS_XLGMII_ID 0x7996ced0 #define SYNOPSYS_XPCS_SGMII_ID 0x7996ced0 #define SYNOPSYS_XPCS_MASK 0xffffffff but that is not the case, because upon closer inspection, all the above 4 PHY ID definitions are in fact equal. So it is the same XPCS that is compatible with all 4 sets of PHY interface types. This change introduces an array of struct xpcs_compat which is populated by the single struct xpcs_id instance. It also eliminates the bogus defines for multiple Synopsys XPCS PHY IDs and replaces them with a single XPCS_ID, which better reflects the way in which the hardware operates. Because we are touching this area of the code anyway, the new array of struct xpcs_compat, as well as the array of xpcs_id, have been moved towards the end of the file, since they are variable declarations not definitions. If whichever of struct xpcs_compat or struct xpcs_id need to gain a function pointer member in the future, it is easier to reference functions (no forward declarations needed) if we have the const variable declarations at the end of the file. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b81017aeee4eb9159296cdb68889932649317b9b Author: Vladimir Oltean Date: Wed Jun 2 19:20:11 2021 +0300 net: pcs: xpcs: delete shim definition for mdio_xpcs_get_ops() CONFIG_STMMAC_ETH selects CONFIG_PCS_XPCS, so there should be no situation where the shim should be needed. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b596ce68fd4a51a4b0660d88a13d5b5584aa3e67 Merge: dd0d91b913989 4a20f8ecbf61b Author: David S. Miller Date: Thu Jun 3 13:27:37 2021 -0700 Merge branch 'hdlc_cisco-cleanups' Peng Li says: ==================== net: hdlc_cisco: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 4a20f8ecbf61baae90948480ff521e1f5909c8b8 Author: Peng Li Date: Wed Jun 2 19:01:16 2021 +0800 net: hdlc_cisco: remove redundant space Space prohibited between function name and open parenthesis '('. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 4e38d514788c218306e35a63d147b721132a5466 Author: Peng Li Date: Wed Jun 2 19:01:15 2021 +0800 net: hdlc_cisco: add blank line after declaration This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 05ff5525aa824c433fbd47e790f181055f0127ae Author: Peng Li Date: Wed Jun 2 19:01:14 2021 +0800 net: hdlc_cisco: remove unnecessary out of memory message This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c1300f37ea99c92b1759caf3418afb491b6852ce Author: Peng Li Date: Wed Jun 2 19:01:13 2021 +0800 net: hdlc_cisco: add some required spaces Add spaces required after the close parenthesis '}'. Add spaces required after that ','. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 001aa274300db079fe79a03b84bc07407a9f43e0 Author: Peng Li Date: Wed Jun 2 19:01:12 2021 +0800 net: hdlc_cisco: fix the code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" and should be "foo *bar", and "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 5abaf211c4a56ec5272b49a78adf2e0b21e5fd37 Author: Peng Li Date: Wed Jun 2 19:01:11 2021 +0800 net: hdlc_cisco: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit dd0d91b9139899ba2546290ab282767600e0f358 Author: Zheng Yongjun Date: Wed Jun 2 14:56:35 2021 +0800 libceph: Fix spelling mistakes Fix some spelling mistakes in comments: enconding ==> encoding ambigous ==> ambiguous orignal ==> original encyption ==> encryption Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit d467d0bc7ab8062197158658c456e1f2f6c3fcf1 Author: Zheng Yongjun Date: Wed Jun 2 14:56:23 2021 +0800 rtnetlink: Fix spelling mistakes Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 4f9f4f0f6261e4b162dfcaf91e08824a7c93da07 Author: Jisheng Zhang Date: Tue May 11 15:48:56 2021 +0800 clocksource/drivers/arm_arch_timer: Remove arch_timer_rate1 This variable is added by my mistake, it's not used at all. Fixes: e2bf384d4329 ("clocksource/drivers/arm_arch_timer: Add __ro_after_init and __init") Signed-off-by: Jisheng Zhang Reported-by: Hulk Robot Acked-by: Marc Zyngier Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210511154856.6afbcb65@xhacker.debian commit 5745d647d5563d3e9d32013ad4e5c629acff04d7 Merge: ccd1950c2f7e3 7d9c70d23550e Author: Dave Airlie Date: Fri Jun 4 06:13:56 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-06-02: amdgpu: - GC/MM register access macro clean up for SR-IOV - Beige Goby updates - W=1 Fixes - Aldebaran fixes - Misc display fixes - ACPI ATCS/ATIF handling rework - SR-IOV fixes - RAS fixes - 16bpc fixed point format support - Initial smartshift support - RV/PCO power tuning fixes for suspend/resume - More buffer object subclassing work - Add new INFO query for additional vbios information - Add new placement for preemptable SG buffers amdkfd: - Misc fixes radeon: - W=1 Fixes - Misc cleanups UAPI: - Add new INFO query for additional vbios information Useful for debugging vbios related issues. Proposed umr patch: https://patchwork.freedesktop.org/patch/433297/ - 16bpc fixed point format support IGT test: https://lists.freedesktop.org/archives/igt-dev/2021-May/031507.html Proposed Vulkan patch: https://github.com/kleinerm/pal/commit/a25d4802074b13a8d5f7edc96ae45469ecbac3c4 - Add a new GEM flag which is only used internally in the kernel driver. Userspace is not allowed to set it. drm: - 16bpc fixed point format fourcc Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210602214009.4553-1-alexander.deucher@amd.com commit f68406ca3b77c90d249e7f50e8f3015408d9ad4a Author: Vladyslav Tarasiuk Date: Tue May 11 17:56:26 2021 +0300 net/mlx5e: Remove unreachable code in mlx5e_xmit() After some commits, mlx5e_txwqe_build_eseg() lost its ability to return boolean value and became effectively void. Change its return type to void and remove unreachable branches. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: Saeed Mahameed commit 39e8cc6d757af7ee5edf5826102c95e3f5bb374b Author: Alaa Hleihel Date: Tue Apr 27 12:51:41 2021 +0300 net/mlx5e: Disable TLS device offload in kdump mode Under kdump environment we want to use the smallest possible amount of resources, that includes setting SQ size to minimum. However, when running on a device that supports TLS device offload, then the SQ stop room becomes larger than with non-capable device and requires increasing the SQ size. Since TLS device offload is not necessary in kdump mode, disable it to reduce the memory requirements for capable devices. With this change, the needed SQ stop room size drops by 33. Signed-off-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit 040ee6172e77b2366d0c622f75eba26e4e49481f Author: Alaa Hleihel Date: Mon May 10 14:17:55 2021 +0300 net/mlx5e: Disable TX MPWQE in kdump mode Under kdump environment we want to use the smallest possible amount of resources, that includes setting SQ size to minimum. However, when running on a device that supports TX MPWQE, then the SQ stop room becomes larger than with non-capable device and requires increasing the SQ size. Since TX MPWQE offload is not necessary in kdump mode, disable it to reduce the memory requirements for capable devices. With this change, the needed SQ stop room size drops by 31. Signed-off-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit 8ec5d438a3c24e0ebd5df4e94b41a22e4bc0e028 Author: Tariq Toukan Date: Wed May 19 15:16:52 2021 +0300 net/mlx5e: RX, Re-place page pool numa node change logic Move the logic that updates the page pool upon changes in numa node. Before this patch, logic was placed in the RX polling function, being called also when no RX traffic, wasting cpu cycles. Here we move it to the RX post_wqes function, to be called only when new RX descriptors are going to be allocated. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 771a563ea05b08dee1a1d7c6128e3307c0ba3830 Author: Lama Kayal Date: Wed May 19 17:28:23 2021 +0300 net/mlx5e: Zero-init DIM structures Initialize structs to avoid unexpected behavior. No immediate issue in current code, structs are return values, it's safer to initialize. Signed-off-by: Lama Kayal Signed-off-by: Saeed Mahameed commit ab57a912befe7f824b186f27d251d97f31fd3856 Author: Meir Lichtinger Date: Sat May 1 16:15:24 2021 +0300 net/mlx5e: IPoIB, Add support for NDR speed Add NDR IB PTYS coding and NDR speed 100GHz. Fixes: 235b6ac30695 ("RDMA/ipoib: Add 50Gb and 100Gb link speeds to ethtool") Signed-off-by: Meir Lichtinger Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit c4cf987ebe146ab5a9571f7ebc143cf5cf41bfb9 Author: Shaokun Zhang Date: Mon May 31 16:52:10 2021 +0800 net/mlx5e: Remove the repeated declaration Function 'mlx5e_deactivate_rq' is declared twice, so remove the repeated declaration. Cc: Saeed Mahameed Cc: Leon Romanovsky Signed-off-by: Shaokun Zhang Signed-off-by: Saeed Mahameed commit b74fc1ca6a45897e97f69a12b381bac415b75a5f Author: Dan Carpenter Date: Thu Jun 3 15:39:24 2021 +0300 net/mlx5: check for allocation failure in mlx5_ft_pool_init() Add a check for if the kzalloc() fails. Fixes: 4a98544d1827 ("net/mlx5: Move chains ft pool to be used by all firmware steering") Signed-off-by: Dan Carpenter Acked-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit e6dfa4a54a908d788858be4cef16e82c3bfa75d3 Author: Jiapeng Chong Date: Thu May 13 19:00:14 2021 +0800 net/mlx5: Fix duplicate included vhca_event.h Clean up the following includecheck warning: ./drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c: vhca_event.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Saeed Mahameed commit 490dcecabbf93e705006af498fa6815251404a54 Author: Jakub Kicinski Date: Wed May 19 10:18:25 2021 -0700 mlx5: count all link events mlx5 devices were observed generating MLX5_PORT_CHANGE_SUBTYPE_ACTIVE events without an intervening MLX5_PORT_CHANGE_SUBTYPE_DOWN. This breaks link flap detection based on Linux carrier state transition count as netif_carrier_on() does nothing if carrier is already on. Make sure we count such events. netif_carrier_event() increments the counters and fires the linkwatch events. The latter is not necessary for the use case but seems like the right thing to do. Signed-off-by: Jakub Kicinski Signed-off-by: Saeed Mahameed commit ef2a75c5c88ebcfe518ba9786788e8d0cc684a3f Author: Devesh Sharma Date: Thu Jun 3 18:45:33 2021 +0530 RDMA/bnxt_re: Update maintainers list Updated the maintainers list and removed non-active members. Link: https://lore.kernel.org/r/20210603131534.982257-3-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 35f5ace5dea4816f9a20746935a356132bf235ba Author: Devesh Sharma Date: Thu Jun 3 18:45:32 2021 +0530 RDMA/bnxt_re: Enable global atomic ops if platform supports Enabling Atomic operations for Gen P5 devices if the underlying platform supports global atomic ops. Link: https://lore.kernel.org/r/20210603131534.982257-2-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 393d66fd2cacba3e6aa95d7bb38790bfb7b1cc3a Author: Thierry Reding Date: Thu Jun 3 18:46:24 2021 +0200 memory: tegra: Implement SID override programming Instead of programming all SID overrides during early boot, perform the operation on-demand after the SMMU translations have been set up for a device. This reuses data from device tree to match memory clients for a device and programs the SID specified in device tree, which corresponds to the SID used for the SMMU context banks for the device. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210603164632.1000458-2-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 32a25f2ea690dfaace19f7a3a916f5d7e1ddafe8 Author: Kamal Heib Date: Thu Jun 3 12:01:12 2021 +0300 RDMA/rxe: Fix failure during driver load To avoid the following failure when trying to load the rdma_rxe module while IPv6 is disabled, add a check for EAFNOSUPPORT and ignore the failure, also delete the needless debug print from rxe_setup_udp_tunnel(). $ modprobe rdma_rxe modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted Fixes: dfdd6158ca2c ("IB/rxe: Fix kernel panic in udp_setup_tunnel") Link: https://lore.kernel.org/r/20210603090112.36341-1-kamalheib1@gmail.com Reported-by: Yi Zhang Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 8fd9f632ba93c0291a73be25ddd3f22631cd1052 Author: Thierry Reding Date: Wed Jun 2 18:33:02 2021 +0200 memory: tegra: Split Tegra194 data into separate file Keep the directory structure consistent by splitting the Tegra194 data into a separate file. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-13-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7191b623a238f8859f70defc227b85fa9bce18d4 Author: Thierry Reding Date: Wed Jun 2 18:33:01 2021 +0200 memory: tegra: Add memory client IDs to tables The memory client IDs will subsequently be used to program override SIDs for the given clients depending on the device tree configuration. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-12-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7355c7b9ae0d45923bac088bc1faebd5e9a66164 Author: Thierry Reding Date: Wed Jun 2 18:33:00 2021 +0200 memory: tegra: Unify drivers The Tegra210 (and earlier) driver now supports all the functionality that the Tegra186 (and later) driver does, so they can be unified. Note that previously the Tegra186 (and later) driver could be unloaded, even if that was perhaps not very useful. Older chips don't support that yet, but once they do this code can be reenabled. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-11-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 0de93c698587cfaf1ec36d4c78fb9c6a76544390 Author: Thierry Reding Date: Wed Jun 2 18:32:59 2021 +0200 memory: tegra: Only initialize reset controller if available The memory controller hot resets are implemented in the BPMP on Tegra186 and later, so there's no need to provide an implementation via the memory controller driver. Conditionally register the reset controller only if needed. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-10-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit e474b3a15db6023dca4424fd7ad941fe9de6d6d2 Author: Thierry Reding Date: Wed Jun 2 18:32:58 2021 +0200 memory: tegra: Make IRQ support opitonal Make IRQ support optional to help unify the Tegra186 memory controller driver with this one. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-9-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 1079a66bc32ff04eaab792152a9ed9c7585b5efc Author: Thierry Reding Date: Wed Jun 2 18:32:57 2021 +0200 memory: tegra: Parameterize interrupt handler Tegra20 requires a slightly different interrupt handler than Tegra30 and later, so parameterize the handler, so that each SoC implementation can provide its own. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-8-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit ddeceab0a959d199de776eaf5da977574b7c8f16 Author: Thierry Reding Date: Wed Jun 2 18:32:56 2021 +0200 memory: tegra: Extract setup code into callback Separate the setup code for Tegra30 and later into a ->setup() callback and set it for all applicable chips. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-7-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit c64738e949940bea2bb426b104b4de0aa42a8f48 Author: Thierry Reding Date: Wed Jun 2 18:32:55 2021 +0200 memory: tegra: Make per-SoC setup more generic The current per-SoC setup code runs at a fairly arbitrary point during probe, thereby making it less flexible for other SoC generations. Move the call around slightly (after only the very basic, common setup that applies to all SoC generations has been performed), which will allow it to be used for other implementations. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-6-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 5c9016f0a8a3ba30c6593d2cb0d067164dd41846 Author: Thierry Reding Date: Wed Jun 2 18:32:54 2021 +0200 memory: tegra: Push suspend/resume into SoC drivers Continuing the scheme of unification, push suspend/resume callbacks into per-SoC driver so that they can be properly parameterized. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-5-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 6cc884c1c7fe5ae9362180d4f7d4091774921a0c Author: Thierry Reding Date: Wed Jun 2 18:32:53 2021 +0200 memory: tegra: Introduce struct tegra_mc_ops Subsequent patches will introduce further callbacks, so create a new struct tegra_mc_ops to collect all of them in a single place. Move the existing ->init() callback into the new structure. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-4-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit e899993845e60cc24d8e667a312eaa03a05d21ec Author: Thierry Reding Date: Wed Jun 2 18:32:52 2021 +0200 memory: tegra: Unify struct tegra_mc across SoC generations As another step towards unifying both the Tegra210 (and earlier) and Tegra186 (and later) memory controller drivers, unify the structures that are used to represent them. Note that this comes at a slight space penalty since some fields are not used on all generations, but the benefits of unifying the driver outweigh the downsides. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-3-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4f1ac76e5ed9436ff3cd72e308527fd1e90b193a Author: Thierry Reding Date: Wed Jun 2 18:32:51 2021 +0200 memory: tegra: Consolidate register fields Subsequent patches will add more register fields to the tegra_mc_client structure, so consolidate all register field definitions into a common sub-structure for coherency. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210602163302.120041-2-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit eeafcdea46936d84e2016e7d965f0b79e75ffd9e Merge: 6efb943b8616e b4f74b59b99fa Author: Krzysztof Kozlowski Date: Thu Jun 3 21:43:54 2021 +0200 Merge tag 'tegra-for-5.14-memory' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into for-v5.14/tegra-mc memory: tegra: Changes for v5.14-rc1 This stable tag contains Dmitry's power domain work, including all the necessary dependencies from the regulator, clock and ARM SoC trees. Further work depends on memory controller changes here. commit 601423bc0c06467d019cf2a446962a5bf1b5e330 Author: Maximilian Luz Date: Tue May 11 11:24:21 2021 +0200 power: supply: surface-charger: Fix type of integer variable The ac->state field is __le32, not u32. So change the variable we're temporarily storing it in to __le32 as well. Reported-by: kernel test robot Fixes: e61ffb344591 ("power: supply: Add AC driver for Surface Aggregator Module") Signed-off-by: Maximilian Luz Signed-off-by: Sebastian Reichel commit 5bcf5a59c41e19141783c7305d420a5e36c937b2 Author: Bob Pearson Date: Thu May 27 14:47:48 2021 -0500 RDMA/rxe: Protext kernel index from user space In order to prevent user space from modifying the index that belongs to the kernel for shared queues let the kernel use a local copy of the index and copy any new values of that index to the shared rxe_queue_bus struct. This adds more switch statements which decreases the performance of the queue API. Move the type into the parameter list for these functions so that the compiler can optimize out the switch statements when the explicit type is known. Modify all the calls in the driver on performance paths to pass in the explicit queue type. Link: https://lore.kernel.org/r/20210527194748.662636-4-rpearsonhpe@gmail.com Link: https://lore.kernel.org/linux-rdma/20210526165239.GP1002214@@nvidia.com/ Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 0a67c46d2e9926c8214ed87e57fe51f044203612 Author: Bob Pearson Date: Thu May 27 14:47:47 2021 -0500 RDMA/rxe: Protect user space index loads/stores Modify the queue APIs to protect all user space index loads with smp_load_acquire() and all user space index stores with smp_store_release(). Base this on the types of the queues which can be one of ..KERNEL, ..FROM_USER, ..TO_USER. Kernel space indices are protected by locks which also provide memory barriers. Link: https://lore.kernel.org/r/20210527194748.662636-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 59daff49f25fbb3197c03c879e23a31ddd23d98f Author: Bob Pearson Date: Thu May 27 14:47:46 2021 -0500 RDMA/rxe: Add a type flag to rxe_queue structs To create optimal code only want to use smp_load_acquire() and smp_store_release() for user indices in rxe_queue APIs since kernel indices are protected by locks which also act as memory barriers. By adding a type to the queues we can determine which indices need to be protected. Link: https://lore.kernel.org/r/20210527194748.662636-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 627bad89ce55ae539a16a6cc21edb12468fe82e3 Merge: 4abd641501663 86d1c6bbae321 Author: Mark Brown Date: Thu Jun 3 19:36:07 2021 +0100 Merge series "MTD: spinand: Add spi_mem_poll_status() support" from Patrice Chotard : From: Patrice Chotard This series adds support for the spi_mem_poll_status() spinand interface. Some QSPI controllers allows to poll automatically memory status during operations (erase, read or write). This allows to offload the CPU for this task. STM32 QSPI is supporting this feature, driver update are also part of this series. Changes in v5: - Update spi_mem_read_status() description. - Update poll_status() description API by indicating that data buffer is filled with last status value. - Update timeout parameter by timeout_ms in spi_mem_poll_status() prototype. - Remove parenthesys arount -EINVAL in spi_mem_poll_status(). - Add missing spi_mem_supports_op() call in stm32_qspi_poll_status(). - Add Boris Reviewed-by for patch 1 and 2. Changes in v4: - Remove init_completion() from spi_mem_probe() added in v2. - Add missing static for spi_mem_read_status(). - Check if operation in spi_mem_poll_status() is a READ. - Update patch 2 commit message. - Add comment which explains how delays has been calculated. - Rename SPINAND_STATUS_TIMEOUT_MS to SPINAND_WAITRDY_TIMEOUT_MS. Chnages in v3: - Add spi_mem_read_status() which allows to read 8 or 16 bits status. - Add initial_delay_us and polling_delay_us parameters to spi_mem_poll_status(). and also to poll_status() callback. - Move spi_mem_supports_op() in SW-based polling case. - Add delay before invoquing read_poll_timeout(). - Remove the reinit/wait_for_completion() added in v2. - Add initial_delay_us and polling_delay_us parameters to spinand_wait(). - Add SPINAND_READ/WRITE/ERASE/RESET_INITIAL_DELAY_US and SPINAND_READ/WRITE/ERASE/RESET_POLL_DELAY_US defines. - Remove spi_mem_finalize_op() API added in v2. Changes in v2: - Indicates the spi_mem_poll_status() timeout unit - Use 2-byte wide status register - Add spi_mem_supports_op() call in spi_mem_poll_status() - Add completion management in spi_mem_poll_status() - Add offload/non-offload case management in spi_mem_poll_status() - Optimize the non-offload case by using read_poll_timeout() - mask and match stm32_qspi_poll_status()'s parameters are 2-byte wide - Make usage of new spi_mem_finalize_op() API in stm32_qspi_wait_poll_status() Patrice Chotard (3): spi: spi-mem: add automatic poll status functions mtd: spinand: use the spi-mem poll status APIs spi: stm32-qspi: add automatic poll status feature drivers/mtd/nand/spi/core.c | 45 +++++++++++++------ drivers/spi/spi-mem.c | 86 ++++++++++++++++++++++++++++++++++++ drivers/spi/spi-stm32-qspi.c | 86 ++++++++++++++++++++++++++++++++---- include/linux/mtd/spinand.h | 22 +++++++++ include/linux/spi/spi-mem.h | 16 +++++++ 5 files changed, 234 insertions(+), 21 deletions(-) base-commit: 6efb943b8616ec53a5e444193dccf1af9ad627b5 -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit f3b3bceb859c76a91ddd43c602428e4451598b3d Merge: 81aad47278539 3f4593fb4a9dd Author: Mark Brown Date: Thu Jun 3 19:36:04 2021 +0100 Merge series "ASoC: rsnd: tidyup adg and header" from Kuninori Morimoto : Hi Mark I noticed that adg can be more clean code. And rsnd.h header comment was not so good because patch has been randomly added. This patch tidyup these. Kuninori Morimoto (5): ASoC: rsnd: adg: supply __printf(x, y) formatting for dbg_msg() ASoC: rsnd: adg: tidyup rsnd_adg_get_clkin/out() parameter ASoC: rsnd: adg: use more simple method for null_clk ASoC: rsnd: adg: check return value for rsnd_adg_get_clkin/out() ASoC: rsnd: tidyup __rsnd_mod_xxx macro comments sound/soc/sh/rcar/adg.c | 139 +++++++++++++++++++++++++-------------- sound/soc/sh/rcar/rsnd.h | 21 ++---- 2 files changed, 97 insertions(+), 63 deletions(-) -- 2.25.1 commit a747070e9b629eeb70118651dfbd500bf8bb5ebe Author: ChiYuan Huang Date: Thu Jun 3 13:57:24 2021 +0800 regulator: rt6245: Add support for Richtek RT6245 Richtek RT6245 is a high-performance, synchronous step-down converter that can deliver up to 14A output current with an input supply voltage range of 4.5V to 17V. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1622699844-19203-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit fcf9dc02f83949b3261eefe03e7bb81c59bfaa9c Author: Kefeng Wang Date: Thu Jun 3 20:02:39 2021 +0800 arm64: mm: Add is_el1_data_abort() helper We alread have is_el1_instruction_abort(), add is_el1_data_abort() helper and use it. Signed-off-by: Kefeng Wang Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210603120239.169018-1-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon commit 613471549f366cdf4170b81ce0f99f3867ec4d16 Author: Jan Kara Date: Thu Jun 3 12:47:21 2021 +0200 block: Do not pull requests from the scheduler when we cannot dispatch them Provided the device driver does not implement dispatch budget accounting (which only SCSI does) the loop in __blk_mq_do_dispatch_sched() pulls requests from the IO scheduler as long as it is willing to give out any. That defeats scheduling heuristics inside the scheduler by creating false impression that the device can take more IO when it in fact cannot. For example with BFQ IO scheduler on top of virtio-blk device setting blkio cgroup weight has barely any impact on observed throughput of async IO because __blk_mq_do_dispatch_sched() always sucks out all the IO queued in BFQ. BFQ first submits IO from higher weight cgroups but when that is all dispatched, it will give out IO of lower weight cgroups as well. And then we have to wait for all this IO to be dispatched to the disk (which means lot of it actually has to complete) before the IO scheduler is queried again for dispatching more requests. This completely destroys any service differentiation. So grab request tag for a request pulled out of the IO scheduler already in __blk_mq_do_dispatch_sched() and do not pull any more requests if we cannot get it because we are unlikely to be able to dispatch it. That way only single request is going to wait in the dispatch list for some tag to free. Reviewed-by: Ming Lei Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210603104721.6309-1-jack@suse.cz Signed-off-by: Jens Axboe commit b49a81d0fd021a1f0c8660fa40ad9984d9d1f5b7 Author: Ikjoon Jang Date: Wed May 26 19:16:04 2021 +0800 power: supply: sbs-battery: cache constant string properties Currently sbs-battery supports three string properties - manufacturer, model_name, and chemistry. Buffers for those properties are currently defined as global variables. This patch moves those global variables into struct sbs_info and cache/reuse them as they are all constant values. Signed-off-by: Ikjoon Jang Tested-by: Hsin-Yi Wang Signed-off-by: Sebastian Reichel commit e88edc977b00cc467d598e4ea5091b8bb4a7f78d Author: Henry Chen Date: Wed Jun 2 19:20:50 2021 +0800 soc: mediatek: pwrap: add pwrap driver for MT8195 SoC MT8195 are highly integrated SoC and use PMIC_MT6359 for power management. This patch adds pwrap master driver to access PMIC_MT6359. Signed-off-by: Henry Chen Link: https://lore.kernel.org/r/20210602112050.12338-3-james.lo@mediatek.com Signed-off-by: Matthias Brugger commit ea8806344743816717280fdc8587d55d1c099040 Author: Henry Chen Date: Wed Jun 2 19:20:49 2021 +0800 dt-bindings: mediatek: add compatible for MT8195 pwrap This adds dt-binding documentation of pwrap for Mediatek MT8195 SoCs Platform. Signed-off-by: Henry Chen Link: https://lore.kernel.org/r/20210602112050.12338-2-james.lo@mediatek.com Signed-off-by: Matthias Brugger commit 326dc2e1e59a98c61c3c71616496422af522678c Author: Long Li Date: Wed May 12 01:06:49 2021 -0700 PCI: hv: Remove bus device removal unused refcount/functions With the new method of flushing/stopping the workqueue before doing bus removal, the old mechanism of using refcount and wait for completion is no longer needed. Remove those dead code. Link: https://lore.kernel.org/r/1620806809-31055-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Long Li [lorenzo.pieralisi@arm.com: Reworded subject] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit 20a3c8b57b2bc2b372bba55ce9d9a90d0030892e Author: Andreas Kemnade Date: Fri May 28 23:30:06 2021 +0200 power: supply: rn5t618: Add input current limit Adds properties for setting the maximum current to USB, ADP and Battery supplies. USB and ADP limits are reset to OTP values upon replugging. Signed-off-by: Andreas Kemnade Signed-off-by: Sebastian Reichel commit 7d76367774d716d28bf003defded61a37b4c83ed Author: Andreas Kemnade Date: Fri May 28 23:30:05 2021 +0200 power: supply: rn5t618: Add charger type detection The RC5T619 can detect SDP, CDP and DCP chargers, so let's add support for it. Signed-off-by: Andreas Kemnade Signed-off-by: Sebastian Reichel commit 94d22763207ac6633612b8d8e0ca4fba0f7aa139 Author: Long Li Date: Wed May 12 01:06:40 2021 -0700 PCI: hv: Fix a race condition when removing the device On removing the device, any work item (hv_pci_devices_present() or hv_pci_eject_device()) scheduled on workqueue hbus->wq may still be running and race with hv_pci_remove(). This can happen because the host may send PCI_EJECT or PCI_BUS_RELATIONS(2) and decide to rescind the channel immediately after that. Fix this by flushing/destroying the workqueue of hbus before doing hbus remove. Link: https://lore.kernel.org/r/1620806800-30983-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Long Li Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit eb4e91f42fc9140b7e373675e03a21a7eaec68e3 Author: Stephan Gerhold Date: Wed May 26 11:44:08 2021 +0200 iio: accel: bma180: Add missing 500 Hz / 1000 Hz bandwidth According to the BMA253 datasheet [1] and BMA250 datasheet [2] BMA25x also supports a bandwidth of 500 Hz and 1000 Hz but this was not listed in the driver for some reason. Add it to the bw_table to make the driver match the datasheet. [1]: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bma253-ds000.pdf [2]: https://datasheet.octopart.com/BMA250-Bosch-datasheet-15540103.pdf Cc: Peter Meerwald Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210526094408.34298-3-stephan@gerhold.net Signed-off-by: Jonathan Cameron commit b711f687a1c1c14c2da589e84e4f61b975196951 Author: Jarkko Nikula Date: Wed Jun 2 14:32:59 2021 +0300 counter: Add support for Intel Quadrature Encoder Peripheral Add support for Intel Quadrature Encoder Peripheral found on Intel Elkhart Lake platform. Initial implementation was done by Felipe Balbi while he was working at Intel with later changes from Raymond Tan and me. Co-developed-by: Felipe Balbi (Intel) Signed-off-by: Felipe Balbi (Intel) Co-developed-by: Raymond Tan Signed-off-by: Raymond Tan Signed-off-by: Jarkko Nikula Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/20210602113259.158674-1-jarkko.nikula@linux.intel.com Signed-off-by: Jonathan Cameron commit 6a7e4b04df3f4fb91a1516671a2610a0ac9f0c69 Author: Lucas Stankus Date: Sun May 23 14:12:37 2021 -0300 staging: iio: cdc: ad7746: extract capac setup to own function Refactor the capdac register write logic to own function. Also fixes the following checkpatch warning: CHECK: Alignment should match open parenthesis Signed-off-by: Lucas Stankus Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/b637a5ecde4e5f9f927a5b104332378d4721c91d.1621786036.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 7d3049fbf3c34a253d32ccf12d4da37233b1db2a Author: Lucas Stankus Date: Sun May 23 14:12:16 2021 -0300 staging: iio: cdc: ad7746: clean up probe return Slight simplication of the probe return on device register. Signed-off-by: Lucas Stankus Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/45443b8306893576824effaff57d40231de8e813.1621786036.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 9410685cb1838fd5130a0b5fcf8f9fb30e9c9f11 Author: Lucas Stankus Date: Sun May 23 14:11:57 2021 -0300 staging: iio: cdc: ad7746: remove ordinary comments Remove ordinary comments about typical driver structure. Also align one comment with wrong indentation. Signed-off-by: Lucas Stankus Link: https://lore.kernel.org/r/e93e5efb19cee53546a339c1caf1ab344e9ff282.1621786036.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 09f75a2bab0394bf1bab47a476d1d187abf93c06 Author: Jonathan Cameron Date: Sun May 16 18:25:20 2021 +0100 iio: adc: ti-adc161s626: Use devm managed functions for all of probe. Simplifies error handling and allows us to drop remove entirely. The regulator handling in this driver was unusual as it would try to acquire the regulator, but if that failed with an error would continue. We should get a stub regulator if one isn't provided in DT and an error could indicate an actual problem preventing the device being powered (perhaps a need to defer). So this handling is cleaned up (arguably that might be a fix but given no one has run into it, I haven't broken it out separately. Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-9-jic23@kernel.org commit 9ecc2ebbb6360101fed75baa0cc7c80769d00b56 Author: Jonathan Cameron Date: Sun May 16 18:25:19 2021 +0100 iio: adc: ti-adc108s102: Use devm managed functions for all of probe() Simplifies error handling and lets us drop remove() entirely. Signed-off-by: Jonathan Cameron Cc: Bogdan Pricop Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-8-jic23@kernel.org commit 55364f73a600c92ee012b2dede8d130a26c58a4a Author: Jonathan Cameron Date: Sun May 16 18:25:18 2021 +0100 iio: adc: ti-adc0832: Use devm managed functions for all of probe() Simplifies error handling, plus allows us to drop the remove() function entirely. Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-7-jic23@kernel.org commit 6c100eb960e785fa327b449ba920d3e83936ae7a Author: Jonathan Cameron Date: Sun May 16 18:25:17 2021 +0100 iio: adc: ti-adc081c: Use devm managed functions for all of probe() Simplifies error handling and allows us to drop remove() entirely. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-6-jic23@kernel.org commit 3c43b6e108d5fc94dd38638b561ac55a661c3adf Author: Jonathan Cameron Date: Sun May 16 18:25:16 2021 +0100 iio: adc: max1118: Avoid jumping back and forth between spi and iio structures Changing from passing the spi structure into various functions to passing struct iio_dev avoids use of spi_get_drvdata and lets us stop setting that at all. Previous code was unnecessarily complex. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-5-jic23@kernel.org commit 30b527dd4fc50db0490d8e3e30b37cafd6302cf7 Author: Jonathan Cameron Date: Sun May 16 18:25:15 2021 +0100 iio: adc: max1118: Use devm_ managed functions for all of probe This simplifies error handling and allows us to drop the remove function entirely. Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-4-jic23@kernel.org commit 7169a78e398463df9201939b51935dc17b53f422 Author: Jonathan Cameron Date: Sun May 16 18:25:14 2021 +0100 iio: adc: max11100: Use devm_ functions for rest of probe() By using devm_add_action_or_reset() to manage the regulator disable, it becomes simple to use managed functions for all of remove. This simplifies error handling and allows us to drop the remove() function entirely. Signed-off-by: Jonathan Cameron Cc: Jacopo Mondi Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-3-jic23@kernel.org commit ff9111ab3e1f01cad2318c6bc989c8bf51a570ac Author: Jonathan Cameron Date: Sun May 16 18:25:13 2021 +0100 iio: adc: max11100: Use get_unaligned_be16() rather than opencoding. The function is more explicit in showing the intent + quicker on some platforms. Signed-off-by: Jonathan Cameron Cc: Jacopo Mondi Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210516172520.1398835-2-jic23@kernel.org commit 38e9d5caeedb58b5bfdf66567b534698aeb432bc Author: Jonathan Cameron Date: Mon May 17 13:55:54 2021 +0100 iio: chemical: sgp30: Drop use of %hx in format string. Since: commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") use of these format strings has been discouraged. As there are only a few such uses in IIO, lets clear them all out and avoid chance of them getting copied into new drivers. Signed-off-by: Jonathan Cameron Cc: Nathan Chancellor Cc: Andreas Brauchli Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210517125554.1463156-5-jic23@kernel.org commit e1c5d708bfe0e4bc1a5ce3bded023c1908ec2e19 Author: Linus Walleij Date: Wed May 19 01:07:22 2021 +0200 iio: gyro: st_gyro: Support mount matrix Add support to read and present the mounting matrix on ST gyroscopes. Cc: Denis Ciocca Cc: Daniel Drake Cc: Stephan Gerhold Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210518230722.522446-5-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit d5b920015f506b871073462d70ed432601393546 Author: Linus Walleij Date: Wed May 19 01:07:21 2021 +0200 iio: magnetometer: st_magn: Support mount matrix Add support to read and present the mounting matrix on ST magnetometers. Cc: Denis Ciocca Cc: Daniel Drake Cc: Stephan Gerhold Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210518230722.522446-4-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 8d78d1e171fc9fa49900badff0bdf8dd164ce9ae Author: Linus Walleij Date: Wed May 19 01:07:20 2021 +0200 iio: accel: st_sensors: Stop copying channels The channels were copied only so that the .ext_info member should become assignable. We now have compile-time static assignment so drop this code. Cc: Hans de Goede Cc: Denis Ciocca Cc: Daniel Drake Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Signed-off-by: Linus Walleij Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210518230722.522446-3-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 3d8ad94bb175c2de7200569bb706d67c45903838 Author: Linus Walleij Date: Wed May 19 01:07:19 2021 +0200 iio: accel: st_sensors: Support generic mounting matrix The ST accelerators support a special type of quirky mounting matrix found in ACPI systems, but not a generic mounting matrix such as from the device tree. Augment the ACPI hack to be a bit more generic and accept a mounting matrix from device properties. This makes it possible to fix orientation on the Ux500 HREF device. Cc: Hans de Goede Cc: Denis Ciocca Cc: Daniel Drake Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Signed-off-by: Linus Walleij Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210518230722.522446-2-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 42ef8aa2263b19b06e69a318dbd8f1639013ded3 Author: Linus Walleij Date: Wed May 19 01:07:18 2021 +0200 iio: st_sensors: Create extended attr macro Extend ST_SENSORS_LSM_CHANNELS() to a version that will accept extended attributes named ST_SENSORS_LSM_CHANNELS_EXT() and wrap the former as a specialized version of the former. Cc: Hans de Goede Cc: Denis Ciocca Cc: Daniel Drake Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold Signed-off-by: Linus Walleij Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210518230722.522446-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 5d142d41585f5b1fc4d774c0ac368516cbafc493 Author: Nuno Sá Date: Thu May 20 13:59:09 2021 +0200 iio: adis16136: make use of adis lock helpers Use the adis lib lock helpers to lock the device. This makes things consistent with other users of the library. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20210520115909.466275-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 0990c6e428c81faefc3e6c53291f8ad8080577fd Author: Nuno Sá Date: Thu May 20 13:59:08 2021 +0200 iio: adis16260: make use of adis lock helpers Use the adis lib lock helpers to lock the device. This makes things consistent with other users of the library. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20210520115909.466275-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit bbd125f84fccb29b365606d4c8fb4862d78a078e Author: Lucas Stankus Date: Sat May 1 09:32:53 2021 -0300 staging: iio: cdc: ad7746: use dt for capacitive channel setup. Ditch platform_data fields in favor of device tree properties for configuring EXCA and EXCB output pins and setting the capacitive channel excitation level. As this covers all current use cases for the platform_data struct, remove ad7746.h header file since it's no longer needed. Signed-off-by: Lucas Stankus Link: https://lore.kernel.org/r/3e7f2a0a8960cece185f518ff2b7ceb87891edcd.1619841953.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 13f212e15b843684d4922278b97fcd0e3627e0e0 Author: Lucas Stankus Date: Sat May 1 09:32:31 2021 -0300 dt-bindings: staging: iio: cdc: ad7746: add binding documentation for AD7746 Add device tree binding documentation for AD7746 cdc in YAML format. Signed-off-by: Lucas Stankus Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/2c2f4d486a94e0740e112bfac0d9306bdb7ea69c.1619841953.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 53ebee9499805add3eef630d998c40812e6a1c39 Author: Linus Walleij Date: Tue May 18 11:27:41 2021 +0200 iio: afe: iio-rescale: Support processed channels It happens that an ADC will only provide raw or processed voltage conversion channels. (adc/ab8500-gpadc.c). On the Samsung GT-I9070 this is used for a light sensor and current sense amplifier so we need to think of something. The idea is to allow processed channels and scale them with 1/1 and then the rescaler can modify the result on top. Link: https://lore.kernel.org/linux-iio/20201101232211.1194304-1-linus.walleij@linaro.org/ Cc: Peter Rosin Signed-off-by: Linus Walleij Reviewed-by: Peter Rosin Link: https://lore.kernel.org/r/20210518092741.403080-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 842b17223fcd0574e8875599ad411c0b8ea895f5 Author: Tang Bin Date: Tue May 18 17:56:47 2021 +0800 staging: iio: cdc: ad7746: Remove unnecessary assignment in ad7746_probe() In the function ad7746_probe(), the initialized value of 'ret' is unused, because it will be assigned by the function i2c_smbus_write_byte_data(), thus remove it. Signed-off-by: Tang Bin Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20210518095647.3008-1-tangbin@cmss.chinamobile.com Signed-off-by: Jonathan Cameron commit b892770a2c553fd905ebd3ced55d5a437669b54d Author: Andy Shevchenko Date: Tue May 18 14:25:46 2021 +0300 iio: Drop Duplicated "mount-matrix" parameter All of the users of iio_read_mount_matrix() are using the very same property name. Moreover, the property name is hard coded in the API documentation. Make this clear and avoid duplication now and in the future. Signed-off-by: Andy Shevchenko Reviewed-by: Sean Nyekjaer Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210518112546.44592-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 941f130881fa9073a32944e69c26cdc15a554d96 Author: Nuno Sa Date: Thu Apr 22 12:37:35 2021 +0200 iio: adis16480: support burst read function Some supported devices support burst read function. This provides a method for reading a batch of data (status, temperature, gyroscopes, accelerometers, time stamp/data counter, and CRC code), which does not require a stall time between each 16-bit segment and only requires one command on the DIN line to initiate. Devices supporting this mode are: * adis16495-1 * adis16495-2 * adis16495-3 * adis16497-1 * adis16497-2 * adis16497-3 Reviewed-by: Lars-Peter Clausen Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210422103735.136367-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit e50f8e0495541e827e8c3d13118dc30feaee99fb Author: Jiapeng Chong Date: Mon May 17 18:11:57 2021 +0800 iio: buffer: Remove redundant assignment to in_loc Variable in_loc is being assigned a value from a calculation however the assignment is never read, so this redundant assignment can be removed. Clean up the following clang-analyzer warning: drivers/iio/industrialio-buffer.c:929:3: warning: Value stored to 'in_loc' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1621246317-62725-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Jonathan Cameron commit af51ec8c9213ec502c3f5c9f5860dd98fceb3433 Author: Jonathan Cameron Date: Sun May 9 12:33:34 2021 +0100 iio: hid: trigger: Balance runtime pm + use pm_runtime_resume_and_get() The call to pm_runtime_put_noidle() in remove() callback is not balanced by any gets Note this doesn't cause any problems beyond reader confusion as the runtime pm core protects against the reference counter going negative. Whilst here, use pm_runtiem_resume_and_get() to simplify code a little. Signed-off-by: Jonathan Cameron Cc: Srinivas Pandruvada Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-9-jic23@kernel.org commit 9504db5765e83cc919caf6647725f7d022874c9d Author: Dan Carpenter Date: Sat May 15 12:51:52 2021 +0300 iio: adc: tsc2046: fix a warning message in tsc2046_adc_update_scan_mode() These variables are unsigned so the condition can't be less than zero and the warning message will never be printed. Fixes: 9374e8f5a38d ("iio: adc: add ADC driver for the TI TSC2046 controller") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YJ+ZuO43TnguY5vq@mwanda Signed-off-by: Jonathan Cameron commit 3ee236296a4093a6c9967647ed6f640a81ae9f25 Author: Linus Walleij Date: Sat May 29 02:19:02 2021 +0200 power: supply: smb347-charger: Drop unused include This driver is including the legacy GPIO header but not using any symbols from it. Delete the include. Signed-off-by: Linus Walleij Reviewed-by: Dmitry Osipenko Acked-by: David Heidelberg Signed-off-by: Sebastian Reichel commit aa8c8bf64b6e11f846087301f033b0e5977b1342 Author: Linus Walleij Date: Sat May 29 01:59:52 2021 +0200 power: supply: pm2301_charger: Delete driver The PM2301 was only used in tandem with AB9540, part of U9540, a platform that was cancelled and never deployed in products. Delete it. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit a9e906b71f963f19aabf7af59f73f37c929a5221 Merge: 475ea6c60279e fcf6631f37369 Author: Ingo Molnar Date: Thu Jun 3 19:00:49 2021 +0200 Merge branch 'sched/urgent' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit e2bfc28afabc94ee91f1bee214bb33b41b7811b7 Author: Guenter Roeck Date: Tue May 11 13:37:11 2021 -0700 power: supply: ab8500: Drop unnecessary NULL check after container_of The result of container_of() operations is never NULL unless the element is the first element of the embedded structure, which is not the case here. The NULL check is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: Sebastian Reichel commit 28bba1e220775e41dbddda715892aa0a497fe835 Author: Zhen Lei Date: Tue May 11 20:24:53 2021 +0800 PCI: mediatek: Remove redundant error printing in mtk_pcie_subsys_powerup() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Link: https://lore.kernel.org/r/20210511122453.6052-1-thunder.leizhen@huawei.com Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit 73ddad05b44e885f2791d31ff42d583b17d41f44 Author: Krzysztof Kozlowski Date: Tue Jun 1 15:36:00 2021 +0200 MAINTAINERS: power: supply: cover also header files Only one header (smartreflex.h) in include/linux/power/ is not related to battery or charger drivers. All others should be covered by power supply maintainers entry so patches to them will reach respective people and lists. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 066ebe8ca1e4734471772df734233af5c53d21ae Author: Krzysztof Kozlowski Date: Tue Jun 1 15:35:59 2021 +0200 power: ab8500: remove unused header The ab8500.h header in linux/power is not referenced/included, so can be safely removed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 9c2b682610a25d36d07afcea939823da230b508b Author: Linus Walleij Date: Sun May 23 00:50:43 2021 +0200 power: supply: ab8500: Drop unused member This setting is read directly from the device tree in the ab8500_charger.c code. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit f9184a228d7a60ad56b810d549a7debb355f1be6 Author: Linus Walleij Date: Sun May 23 00:50:42 2021 +0200 power: supply: ab8500: Enable USB and AC The vendor code tree supplies platform data to enable he USB charging for AB8500 and AB8500 and disable the AC charging on the AB8505. This was missed when the driver was submitted to the mainline kernel. Fix this by doing what the vendor kernel does: always register the USB charger, do not register the AC charger on the AB8505. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 5bcb5087c9dd3dca1ff0ebd8002c5313c9332b56 Author: Linus Walleij Date: Sun May 23 00:50:41 2021 +0200 power: supply: ab8500: Avoid NULL pointers Sometimes the code will crash because we haven't enabled AC or USB charging and thus not created the corresponding psy device. Fix it by checking that it is there before notifying. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 7e2bb83c617f8fccc04db7d03f105a06b9d491a9 Author: Linus Walleij Date: Sun May 23 00:50:40 2021 +0200 power: supply: ab8500: Call battery population once The code was calling ab8500_bm_of_probe() in four different spots effectively overwriting the same configuration three times. This was done because probe order was uncertain. Since we now used componentized probe, call it only once while probing the main charging component. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 1c1f13a006ed0d71bb5664c8b7e3e77a28da3beb Author: Linus Walleij Date: Sun May 23 00:50:39 2021 +0200 power: supply: ab8500: Move to componentized binding The driver has problems with the different components of the charging code racing with each other to probe(). This results in all four subdrivers populating battery information to ascertain that it is populated for their own needs for example. Fix this by using component probing and thus expressing to the kernel that these are dependent components. The probes can happen in any order and will only acquire resources such as state container, regulators and interrupts and initialize the data structures, but no execution happens until the .bind() callback is called. The charging driver is the main component and binds first, then bind in order the three subcomponents: ab8500-fg, ab8500-btemp and ab8500-chargalg. Do some housekeeping while we are moving the code around. Like use devm_* for IRQs so as to cut down on some boilerplate. Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 94233f11f8b6be9dd78f66cca162de66b7b66ae6 Author: Jian Xin Date: Thu Jun 3 17:47:18 2021 +0800 power: supply: ab8500: Fix typo fix misspelled 'interrupts' Signed-off-by: Jian Xin Signed-off-by: Sebastian Reichel commit 5be967d5016ac5ffb9c4d0df51b48441ee4d5ed1 Author: Randy Dunlap Date: Mon May 17 16:41:17 2021 -0700 PCI: ftpci100: Rename macro name collision PCI_IOSIZE is defined in mach-loongson64/spaces.h, so change the name of the PCI_* macros in pci-ftpci100.c to use FTPCI_* so that they are more localized and won't conflict with other drivers or arches. ../drivers/pci/controller/pci-ftpci100.c:37: warning: "PCI_IOSIZE" redefined 37 | #define PCI_IOSIZE 0x00 | In file included from ../arch/mips/include/asm/addrspace.h:13, ... from ../drivers/pci/controller/pci-ftpci100.c:15: arch/mips/include/asm/mach-loongson64/spaces.h:11: note: this is the location of the previous definition 11 | #define PCI_IOSIZE SZ_16M Suggested-by: Linus Walleij Link: https://lore.kernel.org/r/20210517234117.3660-1-rdunlap@infradead.org Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Lorenzo Pieralisi Reviewed-by: Linus Walleij Cc: Jiaxun Yang Cc: Linus Walleij Cc: Krzysztof Wilczyński Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org commit 514d83cb673f9e5f30fe494371e06ecc28709ada Author: Imre Deak Date: Wed May 26 17:37:29 2021 +0300 drm/i915/adlp: Fix AUX power well -> PHY mapping On ADL_P the power well->PHY mapping doesn't follow the mapping on previous platforms, fix this up. While at it remove the redundant dev_priv param from icl_tc_phy_aux_ch(). Signed-off-by: Imre Deak Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210526143729.2563672-3-imre.deak@intel.com commit dd839aa857eb045e688c893ac588385c7fecde6a Author: Imre Deak Date: Wed May 26 17:37:28 2021 +0300 drm/i915: Fix incorrect assert about pending power domain async-put work It's possible that an already dequeued put_async_work() will release the reference (*) that was put asynchronously after the dequeue happened. This leaves an async-put work pending, without any reference to release. A subsequent async-put may trigger the drm_WARN_ON(!queue_delayed_work(&power_domains->async_put_work)); warn due to async_put_work() still pending. To avoid the warn, cancel the pending async_put_work() when releasing the reference at (*) above. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3421 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2289 Signed-off-by: Imre Deak Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210526143729.2563672-2-imre.deak@intel.com commit 4a300e65b59b6625a9c258902e6e976054333642 Author: Imre Deak Date: Wed May 26 17:37:27 2021 +0300 drm/i915/ddi: Flush encoder power domain ref puts during driver unload An async-put on an encoder specific power domain (for instance the AUX PW domain) may be pending when removing the encoder. Make sure any such async-puts are complete while the corresponding encoder is still in place since at least AUX power wells require this to do a power well->PHY lookup. Signed-off-by: Imre Deak Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210526143729.2563672-1-imre.deak@intel.com commit 42d7a8dc195f99e2e99d8f38a683e0852a29f6af Author: Krzysztof Wilczyński Date: Mon May 10 02:30:32 2021 +0000 PCI: mobiveil: Remove unused readl and writel functions The PCIe host controller driver for Layerscape 4th generation SoC was added in the commit d29ad70a813b ("PCI: mobiveil: Add PCIe Gen4 RC driver for Layerscape SoCs"). At this time two static functions were introduced that appear to currently have no users. Since nothing is using neither of these functions at the moment they can be safely removed. This resolves the following build time warnings: drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c:45:19: warning: unused function 'ls_pcie_g4_lut_readl' [-Wunused-function] drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c:50:20: warning: unused function 'ls_pcie_g4_lut_writel' [-Wunused-function] Link: https://lore.kernel.org/r/20210510023032.3063932-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi commit 1243106474294ea4ea95d9fc076549817814ce1d Author: Krzysztof Wilczyński Date: Sun May 9 04:19:32 2021 +0000 PCI: microchip: Make the struct event_descs static The struct event_descs does not have any users outside the pcie-microchip-host.c file, and has no previous declaration, thus it can be made static. This resolves the following sparse warning: drivers/pci/controller/pcie-microchip-host.c:352:3: warning: symbol 'event_descs' was not declared. Should it be static? Link: https://lore.kernel.org/r/20210509041932.560340-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi commit 90bf3e28ef51aa3f480d2f2151813be669ba69ce Author: Colin Ian King Date: Wed Jun 2 11:06:59 2021 +0100 null_blk: Fix null pointer dereference on nullb->disk on blk_cleanup_disk call The error handling on a nullb->disk allocation currently jumps to out_cleanup_disk that calls blk_cleanup_disk with a null pointer causing a null pointer dereference issue. Fix this by jumping to out_cleanup_tags instead. Addresses-Coverity: ("Dereference after null check") Fixes: 132226b301b5 ("null_blk: convert to blk_alloc_disk/blk_cleanup_disk") Signed-off-by: Colin Ian King Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210602100659.11058-1-colin.king@canonical.com Signed-off-by: Jens Axboe commit ed7ecb8839010150e3adb41800d218ef3d62e269 Author: Sudeep Holla Date: Wed Jun 2 08:38:50 2021 +0100 firmware: arm_scpi: Add compatibility checks for shmem node The shared memory node used for communication between the firmware and the OS should be compatible with one of the following: - amlogic,meson-gxbb-scp-shmem - amlogic,meson-axg-scp-shmem - arm,juno-scp-shmem - arm,scp-shmem Add the check for the same while parsing the node before fetching the memory regions. Link: https://lore.kernel.org/r/20210602073851.1005607-1-sudeep.holla@arm.com Cc: Rob Herring Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Signed-off-by: Sudeep Holla commit ab7766b72855e6a68109b915d071181b93086e29 Author: Sudeep Holla Date: Thu Jun 3 08:26:31 2021 +0100 firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected 0day CI kernel test robot reported following build error with randconfig aarch64-linux-ld: drivers/firmware/arm_scmi/driver.o:(.rodata+0x1e0): undefined reference to `scmi_mailbox_desc' Fix the error by adding CONFIG_MAILBOX dependency for scmi_mailbox_desc. Link: https://lore.kernel.org/r/20210603072631.1660963-1-sudeep.holla@arm.com Cc: Etienne Carriere Cc: Cristian Marussi Reviewed-by: Etienne Carriere Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Reported-by: kernel test robot Signed-off-by: Sudeep Holla commit 3b3fc051cd2cba42bf736fa62780857d251a1236 Author: Al Viro Date: Fri Apr 23 22:24:08 2021 -0400 iov_iter_advance(): use consistent semantics for move past the end asking to advance by more than we have left in the iov_iter should move to the very end; it should *not* leave negative i->count and it should not spew into syslog, etc. - it's a legitimate operation. Signed-off-by: Al Viro commit 0e8f0d67401589a141950856902c7d0ec8d9c985 Author: Al Viro Date: Wed Jun 2 14:48:21 2021 -0400 [xarray] iov_iter_fault_in_readable() should do nothing in xarray case ... and actually should just check it's given an iovec-backed iterator in the first place. Cc: stable@vger.kernel.org Signed-off-by: Al Viro commit a506abc7b644d71966a75337d5a534f531b3cdc4 Author: Al Viro Date: Tue Apr 27 12:34:04 2021 -0400 copy_page_to_iter(): fix ITER_DISCARD case we need to advance the iterator... Cc: stable@vger.kernel.org Signed-off-by: Al Viro commit 08aa64796016cb47b2ef3d0924653b4d944b0d65 Author: Al Viro Date: Thu Apr 29 20:42:25 2021 -0400 teach copy_page_to_iter() to handle compound pages In situation when copy_page_to_iter() got a compound page the current code would only work on systems with no CONFIG_HIGHMEM. It *is* the majority of real-world setups, or we would've drown in bug reports by now. Still needs fixing. Current variant works for solitary page; rename that to __copy_page_to_iter() and turn the handling of compound pages into a loop over subpages. Cc: stable@vger.kernel.org Signed-off-by: Al Viro commit 66cd071a1f839b4834d45aa7dde622151041b1a0 Author: David Howells Date: Fri Apr 9 19:10:53 2021 +0100 iov_iter: Remove iov_iter_for_each_range() Remove iov_iter_for_each_range() as it's no longer used with the removal of lustre. Signed-off-by: David Howells Signed-off-by: Al Viro commit 8959a239242754054e70391c05c06d8c4eb2bc77 Author: Al Viro Date: Thu Jun 3 10:34:55 2021 -0400 fuse_fill_write_pages(): don't bother with iov_iter_single_seg_count() another rudiment of fault-in originally having been limited to the first segment, same as in generic_perform_write() and friends. Signed-off-by: Al Viro commit dc0983f2f9b6a9a9abe575a7ae15f873da694887 Merge: 5a25d8ceb8611 d721c15fd519c Author: Mimi Zohar Date: Thu Jun 3 10:12:36 2021 -0400 Merge branch 'verify-evm-portable-sig-v2' into next-integrity From the cover letter: The recent patch set 'evm: Improve usability of portable signatures' added the possibility to include EVM portable signatures in the IMA measurement list. However, the information necessary to verify the signature were not included in the IMA measurement list. This patch set introduces new template fields to accomplish this goal: - 'iuid': the inode UID; - 'igid': the inode GID; - 'imode': the inode mode; - 'xattrnames': a list of xattr names (separated by |), only if the xattr is present; - 'xattrlengths': a list of xattr lengths (u32), only if the xattr is present; - 'xattrvalues': a list of xattr values; Patch 1 adds an helper function to show integers in the measurement list. Patches 2, 3 and 5 introduce new template fields. Patch 4 make it possible to verify EVM portable signatures which protect xattrs belonging to LSMs not enabled in the target platform. Patch 6 introduces the new IMA template evm-sig. Patch 7 fixes a small issue in evm_write_xattrs() when audit is not enabled. Link: https://lore.kernel.org/linux-integrity/20210528073812.407936-1-roberto.sassu@huawei.com/ commit d721c15fd519c08819fbc6de39b713e2ed1d9894 Author: Roberto Sassu Date: Fri May 28 09:38:12 2021 +0200 evm: Don't return an error in evm_write_xattrs() if audit is not enabled This patch avoids that evm_write_xattrs() returns an error when audit is not enabled. The ab variable can be NULL and still be passed to the other audit_log_() functions, as those functions do not include any instruction. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 88016de3ab075790e1f1bf047576e9b557c22d19 Author: Roberto Sassu Date: Thu Jun 3 15:17:05 2021 +0200 ima: Define new template evm-sig With the recent introduction of the evmsig template field, remote verifiers can obtain the EVM portable signature instead of the IMA signature, to verify file metadata. After introducing the new fields to include file metadata in the measurement list, this patch finally defines the evm-sig template, whose format is: d-ng|n-ng|evmsig|xattrnames|xattrlengths|xattrvalues|iuid|igid|imode xattrnames, xattrlengths and xattrvalues are populated only from defined EVM protected xattrs, i.e. the ones that EVM considers to verify the portable signature. xattrnames and xattrlengths are populated only if the xattr is present. xattrnames and xattrlengths are not necessary for verifying the EVM portable signature, but they are included for completeness of information, if a remote verifier wants to infer more from file metadata. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit cae6c233a7abb8a1b3dad536baa07c06e751ee93 Author: Manikishan Ghantasala Date: Thu Jun 3 01:03:32 2021 +0530 staging: rtl8192u: fix spaces in r8192U_hw.h Fixed "please, no space before tabs" checkpatch warning. Signed-off-by: Manikishan Ghantasala Link: https://lore.kernel.org/r/20210602193334.11687-4-manikishanghantasala@gmail.com Signed-off-by: Greg Kroah-Hartman commit ad0129fad5140b97d2cb2e7581ef7d756a6ffbe7 Author: Manikishan Ghantasala Date: Thu Jun 3 01:03:31 2021 +0530 staging: rtl8192u: put parentheses on macros with complex values in r8192U_hw.h Fix "Macros with complex values should be enclosed in parentheses" checkpatch error. Signed-off-by: Manikishan Ghantasala Link: https://lore.kernel.org/r/20210602193334.11687-3-manikishanghantasala@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ce74e3b50817eea0c81d97996b7bd624b5e18d3 Author: Manikishan Ghantasala Date: Thu Jun 3 01:03:30 2021 +0530 staging: rtl8192u: r8192U_hw.h: fix spaces preferred around that '|' code style error Fix "spaces preferred around that '|' " checkpatch CHECK. Signed-off-by: Manikishan Ghantasala Link: https://lore.kernel.org/r/20210602193334.11687-2-manikishanghantasala@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0ee817dd58985a26903659fd2633e93f83c63730 Author: Gustavo A. R. Silva Date: Fri May 28 15:06:50 2021 -0500 staging: rtl8188eu: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210528200650.GA39289@embeddedor Signed-off-by: Greg Kroah-Hartman commit 827dffb1caeec6c7802f439452df6b86960617f2 Author: Martin Kaiser Date: Sat May 29 14:13:46 2021 +0200 staging: rtl8188eu: remove dummy setfreq handler The setfreq handler contains only a debug print. It returns success although the frequency wasn't set. Remove this handler and inform callers that this driver does not support setfreq. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210529121346.8422-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 31c809986d8a81cb84134abff1773868376d3a97 Author: Martin Kaiser Date: Sat May 29 14:13:45 2021 +0200 staging: rtl8188eu: remove dummy wext handlers Remove the wext handlers that link to an empty dummy function. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210529121346.8422-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit af249fce390ffe2d4938b56c78fae41a21eed5e2 Author: Martin Kaiser Date: Sat May 29 14:13:44 2021 +0200 staging: rtl8188eu: use IW_HANDLER to declare wext handlers Use the IW_HANDLER macro to declare the handler functions for wext ioctls. We don't have to skip unused ioctl numbers manually. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210529121346.8422-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3efe8c49cc990fc7c665069701ea22f672e291bc Author: Khoa Tran Minh Date: Tue Jun 1 17:59:25 2021 +0000 Staging: rtl8712: Cleanup coding style warning This patch fixes checkpatch warning about multiple line dereference. Signed-off-by: Khoa Tran Minh Link: https://lore.kernel.org/r/YLZ1fc7BsaTo+ixQ@rue.localhost Signed-off-by: Greg Kroah-Hartman commit 6a80a7abb473c342178a80d8bda8ee68997d3d66 Author: Yu Kuai Date: Mon May 31 22:02:34 2021 +0800 staging: rtl8723bs: core: rtw_mlme_ext.c: remove deadcode 'CHECK_EVENT_SEQ' is not defined anywhere, remove the deadcode. Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20210531140234.3352465-1-yukuai3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6184fa23216c44722c9c3f5c29459ef055aee15f Author: Shaokun Zhang Date: Mon May 31 15:37:58 2021 +0800 staging: rtl8192u: remove the repeated declaration Functions 'ieee80211_stop_send_beacons' and 'notify_wx_assoc_event' are declared twice in their header file, so remove the repeated declaration. Cc: Greg Kroah-Hartman Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622446678-52652-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit 487829879f8bae7e055b7d12407108f5915ac8b3 Author: Thomas Bracht Laumann Jespersen Date: Thu May 27 21:21:49 2021 +0200 staging: rtl8192u: Fix shadowed variable name Fixes the following sparse warning: drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:798:32: warning: symbol 'tcb_desc' shadows an earlier one drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:550:24: originally declared here Signed-off-by: Thomas Bracht Laumann Jespersen Link: https://lore.kernel.org/r/20210527192149.29686-1-t@laumann.xyz Signed-off-by: Greg Kroah-Hartman commit 56b8b7f9533b5c40cbc1266b5cc6a3b19dfd2aad Author: Andrii Nakryiko Date: Wed Jun 2 17:40:26 2021 -0700 selftests/bpf: Add xdp_redirect_multi into .gitignore When xdp_redirect_multi test binary was added recently, it wasn't added to .gitignore. Fix that. Fixes: d23292476297 ("selftests/bpf: Add xdp_redirect_multi test") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210603004026.2698513-5-andrii@kernel.org commit 7d8a819dd31672f02ece93b6a9b9491daba4f0f2 Author: Andrii Nakryiko Date: Wed Jun 2 17:40:25 2021 -0700 libbpf: Install skel_internal.h header used from light skeletons Light skeleton code assumes skel_internal.h header to be installed system-wide by libbpf package. Make sure it is actually installed. Fixes: 67234743736a ("libbpf: Generate loader program out of BPF ELF file.") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210603004026.2698513-4-andrii@kernel.org commit 232c9e8bd5ebfb43563b58f31e685fde06d9441f Author: Andrii Nakryiko Date: Wed Jun 2 17:40:24 2021 -0700 libbpf: Refactor header installation portions of Makefile As we gradually get more headers that have to be installed, it's quite annoying to copy/paste long $(call) commands. So extract that logic and do a simple $(foreach) over the list of headers. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210603004026.2698513-3-andrii@kernel.org commit 16cac0060680c11bb82c325c4fe95cb66fc8dfaf Author: Andrii Nakryiko Date: Wed Jun 2 17:40:23 2021 -0700 libbpf: Move few APIs from 0.4 to 0.5 version Official libbpf 0.4 release doesn't include three APIs that were tentatively put into 0.4 section. Fix libbpf.map and move these three APIs: - bpf_map__initial_value; - bpf_map_lookup_and_delete_elem_flags; - bpf_object__gen_loader. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210603004026.2698513-2-andrii@kernel.org commit 2e38eb04c95e5546b71bb86ee699a891c7d212b5 Author: Naveen N. Rao Date: Tue Jun 1 17:31:50 2021 +0530 kprobes: Do not increment probe miss count in the fault handler Kprobes has a counter 'nmissed', that is used to count the number of times a probe handler was not called. This generally happens when we hit a kprobe while handling another kprobe. However, if one of the probe handlers causes a fault, we are currently incrementing 'nmissed'. The comment in fault handler indicates that this can be used to account faults taken by the probe handlers. But, this has never been the intention as is evident from the comment above 'nmissed' in 'struct kprobe': /*count the number of times this probe was temporarily disarmed */ unsigned long nmissed; Signed-off-by: Naveen N. Rao Signed-off-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20210601120150.672652-1-naveen.n.rao@linux.vnet.ibm.com commit 1623d767c7ec563d6e52ab76426377bfdde68f97 Author: ChiYuan Huang Date: Thu Jun 3 13:57:23 2021 +0800 regulator: rt6245: Add the binding document for Richtek RT6245 Add the binding document for Richtek RT6245. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1622699844-19203-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit 610d9c311b1387f8c4ac602fee1f2a1cb0508707 Author: Chris Morgan Date: Fri Apr 2 15:48:47 2021 -0500 drm/panel: add rotation support for Elida KD35T133 panels Update the panel to allow setting the rotation value in device tree. Tested on an Odroid Go Advance, where the panel is by default rotated 270 degrees. Signed-off-by: Chris Morgan Reviewed-by: Lucas Stach Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/SN6PR06MB534253E1CFDEA6917230F57BA57A9@SN6PR06MB5342.namprd06.prod.outlook.com commit 4abd641501663493764949f045ebf9f8c0da0307 Author: Dan Sneddon Date: Wed Jun 2 09:08:15 2021 -0700 spi: atmel: Reduce spin lock usage The current implementation of the driver holds a spin lock for the duration of the transfer, releasing it only to enable interrupts for short periods of time. As this would prevent any interrupt from happening, this could cause system performance issues every time a SPI message is sent. Since the spi core now handles message syncronization we can reduce the amount of time the spin-lock is held to the regions where both the calling thread and the interrupt might interract. Signed-off-by: Dan Sneddon Link: https://lore.kernel.org/r/20210602160816.4890-2-dan.sneddon@microchip.com Signed-off-by: Mark Brown commit 5fa5e6dec762305a783e918a90a05369fc10e346 Author: Dan Sneddon Date: Wed Jun 2 09:08:14 2021 -0700 spi: atmel: Switch to transfer_one transfer method Switch from using our own transfer_one_message routine to using the one provided by the SPI core. Signed-off-by: Dan Sneddon Link: https://lore.kernel.org/r/20210602160816.4890-1-dan.sneddon@microchip.com Signed-off-by: Mark Brown commit 86d1c6bbae32122c5f703b2d8acccf5d4258f2bb Author: Patrice Chotard Date: Tue May 18 18:27:54 2021 +0200 spi: stm32-qspi: add automatic poll status feature STM32 QSPI is able to automatically poll a specified register inside the memory and relieve the CPU from this task. As example, when erasing a large memory area, we got cpu load equal to 50%. This patch allows to perform the same operation with a cpu load around 2%. Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210518162754.15940-4-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit 8941cd8d295e40f8ea1c0a5045d6d068b8e33eec Author: Patrice Chotard Date: Tue May 18 18:27:53 2021 +0200 mtd: spinand: use the spi-mem poll status APIs Make use of spi-mem poll status APIs to let advanced controllers optimize wait operations. This should also fix the high CPU usage for system that don't have a dedicated STATUS poll block logic. Signed-off-by: Patrice Chotard Signed-off-by: Christophe Kerello Reviewed-by: Boris Brezillon Acked-by: Miquel Raynal Link: https://lore.kernel.org/r/20210518162754.15940-3-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit c955a0cc8a286e5da1ebb88c19201e9bab8c2422 Author: Patrice Chotard Date: Tue May 18 18:27:52 2021 +0200 spi: spi-mem: add automatic poll status functions With STM32 QSPI, it is possible to poll the status register of the device. This could be done to offload the CPU during an operation (erase or program a SPI NAND for example). spi_mem_poll_status API has been added to handle this feature. This new function take care of the offload/non-offload cases. For the non-offload case, use read_poll_timeout() to poll the status in order to release CPU during this phase. For example, previously, when erasing large area, in non-offload case, CPU load can reach ~50%, now it decrease to ~35%. Signed-off-by: Patrice Chotard Signed-off-by: Christophe Kerello Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/r/20210518162754.15940-2-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit 6041d5fe512cd6ceaf730cdfa1786f2bc9b5b1b5 Author: Axel Lin Date: Tue May 25 18:04:05 2021 +0800 regulator: bd9576: Constify the voltage tables Also use unsigned int instead of int for the voltage tables. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210525100405.2506483-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit b61ac767db4d62540732cdac9f1820e56b9a5008 Author: Axel Lin Date: Tue May 25 20:40:17 2021 +0800 regulator: fan53555: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210525124017.2550029-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 30b38b805b36c03db3703ef62397111c783b5f3b Author: Axel Lin Date: Tue May 25 20:40:16 2021 +0800 regulator: fan53555: Fix missing slew_reg/mask/shift settings for FAN53526 The di->slew_reg/di->slew_mask/di->slew_shift was not set in current code, fix it. Fixes: f2a9eb975ab2 ("regulator: fan53555: Add support for FAN53526") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210525124017.2550029-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 8cdded982a6cf95d5ed7e3a014fb3d8dde6b3a94 Author: Axel Lin Date: Sun May 23 15:23:20 2021 +0800 regulator: max77802: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210523072320.2174443-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 8f4ef0788c68bf99370a91df5cb83f90d707583e Author: Axel Lin Date: Sun May 23 15:23:19 2021 +0800 regulator: max77802: Remove .set_ramp_delay from max77802_buck_dvs_ops max77802_set_ramp_delay_2bit() returns -EINVAL when id > MAX77802_BUCK4. This was a leftover in commit b0615f1da543 ("regulator: max77802: Split regulator operations for BUCKs"). Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210523072320.2174443-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 81aad47278539f02de808bcc8251fed0ad3d6f55 Author: Yufen Yu Date: Mon May 24 05:35:21 2021 -0400 ASoC: img: Fix PM reference leak in img_i2s_in_probe() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Yufen Yu Link: https://lore.kernel.org/r/20210524093521.612176-1-yuyufen@huawei.com Signed-off-by: Mark Brown commit 28b170110a7683ee12af7e81f1b5868bc7fcb62f Author: Yang Yingliang Date: Wed Jun 2 21:33:59 2021 +0800 ASoC: fsl: imx-es8328: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210602133359.310647-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d66e033910593d99700cd9e2a75698395fcd676f Author: Colin Ian King Date: Thu Jun 3 12:03:15 2021 +0100 ASoC: rsnd: check for zero node count Most callers of_get_child_count() check that "nr" is non-zero so it causes a static checker warning when we don't do that here. This does not cause a problem or a crash, but having zero SSUIes does not make sense either so let's add a check. Addresses-Coverity: ("Unchecked return value") Fixes: c413983eb66a ("ASoC: rsnd: adjust disabled module") Acked-by: Kuninori Morimoto Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210603110315.81146-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 14aa731dbf464f7272bcc2f0c4f32f6de28cbe8c Author: Oleksij Rempel Date: Mon May 31 08:47:52 2021 +0200 ASoC: dt-bindings: Convert imx-audmux binding to json schema Convert the imx-audmux binding to DT schema format using json-schema Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210531064752.8809-1-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit b82d0759a3b1e23d4247523c89bdfb27fffb6089 Author: Yang Yingliang Date: Wed Jun 2 16:26:10 2021 +0800 ASoC: imx-audio-rpmsg: use module_rpmsg_driver to simplify the code module_rpmsg_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210602082610.3828408-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 6522a8486c00d130a32a57c6c8a365572958b4df Author: Yang Yingliang Date: Wed Jun 2 22:16:19 2021 +0800 ASoC: atmel: sam9x5_wm8731: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210602141619.323286-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 3f4593fb4a9ddb53edefcbf7d4c5fd1f04717422 Author: Kuninori Morimoto Date: Wed Jun 2 08:44:39 2021 +0900 ASoC: rsnd: tidyup __rsnd_mod_xxx macro comments status and __rsnd_mod_xxx were updated, but some related comments were not. And it has verbose comments. This patch cleanup/tidyup these. 1) adds missing "D" to status sample 2) remove verbose list for "H" 3) add "needs protect" to __rsnd_mod_call_xxx Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8cpi1zs.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d668a5e2409b2ff9291493b70c961ecbe883bfb2 Author: Kuninori Morimoto Date: Wed Jun 2 08:44:09 2021 +0900 ASoC: rsnd: adg: check return value for rsnd_adg_get_clkin/out() Current rsnd_adg_get_clkin/out() are void function, thus adg->clk/clkout[i] might be NULL. But, for_each_rsnd_clk/clkout() macros are assuming all clks are non NULL. Because of this mismatch, code can be complex and/or buggy. These functions return error by this patch, and make sure all clks are non NULL. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmx5i20m.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cb2f97d89f383dafa822bce66f0c3514dfb135b8 Author: Kuninori Morimoto Date: Wed Jun 2 08:43:50 2021 +0900 ASoC: rsnd: adg: use more simple method for null_clk commit 965386c97616c ("ASoC: rsnd: call unregister for null_hw when removed") tried unregister null_clk, but it has some issues. 1st issue is kernel will indicate below message when unregistering, because of its timing. unregistering should be happen after clk_disable(). clk_unregister: unregistering prepared clock: rsnd_adg_null 2nd issue is, it is using priv->null_clk, but it should be adg->null_clk. 3rd issue is it is using very complex clk registering method. more simple clk_register/unregister_fixed_rate() should be OK. This patch fixes these. Fixes: 965386c97616c ("ASoC: rsnd: call unregister for null_hw when removed") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1hli215.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b48e4aa48931030382d26c624cf4ae1c68d15666 Author: Kuninori Morimoto Date: Wed Jun 2 08:43:36 2021 +0900 ASoC: rsnd: adg: tidyup rsnd_adg_get_clkin/out() parameter set priv->adg before rsnd_adg_get_clkin/out() to be more simple code. Nothing is changed, but is preparation for next "ASoC: rsnd: adg: use more simple method for null_clk" patch Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sg21i21j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2cdfe6520c939aff60bf78be2fc682e7635d0618 Author: Kuninori Morimoto Date: Wed Jun 2 08:43:28 2021 +0900 ASoC: rsnd: adg: supply __printf(x, y) formatting for dbg_msg() Fixes the following W=1 kernel build warning(s): sound/soc/sh/rcar/adg.c: In function 'dbg_msg': sound/soc/sh/rcar/adg.c:594:2: warning: function 'dbg_msg' might \ be a candidate for 'gnu_printf' format attribute\ [-Wsuggest-attribute=format] Fixes: 1f9c82b5ab83 ("ASoC: rsnd: add debugfs support") Reported-by: kernel test robot Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tumhi21r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1f9cab6cc20c6ed35c659aa25e282265275f0732 Author: JC Kuo Date: Wed Jan 20 15:34:12 2021 +0800 phy: tegra: xusb: Add wake/sleepwalk for Tegra186 This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and sleepwalk operations. Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit 0baabcbedd9ef2381636a36f669187a46380de19 Author: JC Kuo Date: Wed Jan 20 15:34:11 2021 +0800 phy: tegra: xusb: Tegra210 host mode VBUS control To support XUSB host controller ELPG, this commit moves VBUS control .phy_power_on()/.phy_power_off() to .phy_init()/.phy_exit(). When XUSB host controller enters ELPG, host driver invokes .phy_power_off(), VBUS should remain ON so that USB devices will not disconnect. VBUS can be turned OFF when host driver invokes .phy_exit() which indicates disabling a USB port. Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit 2d102148727337005ac283a4190c6e56f973e915 Author: JC Kuo Date: Wed Jan 20 15:34:10 2021 +0800 phy: tegra: xusb: Add wake/sleepwalk for Tegra210 This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Sleepwalk logic is in PMC (always-on) hardware block. PMC driver provides managed access to the sleepwalk registers via regmap framework. Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit c545a90567125b874d817509036ec7d6698097ac Author: JC Kuo Date: Wed Jan 20 15:34:06 2021 +0800 phy: tegra: xusb: Add sleepwalk and suspend/resume This commit adds sleepwalk/wake and suspend/resume interfaces to Tegra XUSB PHY driver. Tegra XUSB host controller driver makes use of sleepwalk functions to enable/disable sleepwalk circuit which is in always-on partition and can respond to USB resume signals when controller is not powered. Sleepwalk can be enabled/disabled for any USB UPHY individually. - tegra_xusb_padctl_enable_phy_sleepwalk() - tegra_xusb_padctl_disable_phy_sleepwalk() Tegra XUSB host controller driver makes use of wake functions to enable/disable/query wake circuit which is in always-on partition can wake system up when USB resume happens. Wake circuit can be enabled/disabled for any USB PHY individually. - tegra_xusb_padctl_enable_phy_wake() - tegra_xusb_padctl_disable_phy_wake() - tegra_xusb_padctl_remote_wake_detected() This commit also adds two system suspend stubs that can be used to save and restore XUSB PADCTL context during system suspend and resume. - tegra_xusb_padctl_suspend_noirq() - tegra_xusb_padctl_resume_noirq() Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit c339605cb0f6d33c9dc8ca73033c665573149f29 Author: JC Kuo Date: Wed Jan 20 15:34:05 2021 +0800 phy: tegra: xusb: Add Tegra210 lane_iddq operation As per Tegra210 TRM, before changing lane assignments, driver should keep lanes in IDDQ and sleep state; after changing lane assignments, driver should bring lanes out of IDDQ. This commit implements the required operations. Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit 2352fdb0d35e030089bf473b6e21b3f08895b33b Author: JC Kuo Date: Wed Jan 20 15:34:04 2021 +0800 phy: tegra: xusb: Rearrange UPHY init on Tegra210 This commit is a preparation for enabling XUSB SC7 support. It rearranges Tegra210 XUSB PADCTL UPHY initialization sequence, for the following reasons: 1. PLLE hardware power sequencer has to be enabled only after both PEX UPHY PLL and SATA UPHY PLL are initialized. tegra210_uphy_init() -> tegra210_pex_uphy_enable() -> tegra210_sata_uphy_enable() -> tegra210_plle_hw_sequence_start() -> tegra210_aux_mux_lp0_clamp_disable() 2. At cold boot and SC7 exit, the following bits must be cleared after PEX/SATA lanes are out of IDDQ (IDDQ_DISABLE=1). a. XUSB_PADCTL_ELPG_PROGRAM1_AUX_MUX_LP0_CLAMP_EN, b. XUSB_PADCTL_ELPG_PROGRAM1_AUX_MUX_LP0_CLAMP_EN_EARLY c. XUSB_PADCTL_ELPG_PROGRAM1_AUX_MUX_LP0_VCORE_DOWN tegra210_pex_uphy_enable() and tegra210_sata_uphy_enable() are in charge of bringing lanes out of IDDQ, and then AUX_MUX_LP0_* bits will be cleared by tegra210_aux_mux_lp0_clamp_disable(). 3. Once UPHY PLL hardware power sequencer is enabled, do not assert reset to PEX/SATA PLLs, otherwise UPHY PLL operation will be broken. Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit 23d5ec3f02866be6be3f47eab01771f1cf445a68 Author: JC Kuo Date: Wed Jan 20 15:34:03 2021 +0800 phy: tegra: xusb: Move usb3 port init for Tegra210 The programming sequence in tegra210_usb3_port_enable() is required for both cold boot and SC7 exit, and must be performed only after PEX/SATA UPHY is initialized. Therefore, this commit moves the programming sequence to tegra210_usb3_phy_power_on(). PCIE/SATA phy .power_on() stub will invoke tegra210_usb3_phy_power_on() if the lane is assigned for XUSB super-speed. Signed-off-by: JC Kuo Acked-By: Vinod Koul Signed-off-by: Thierry Reding commit 60fba46d6e7a6e5de4be2ea158aa6134ec7a161e Author: Johan Jonker Date: Thu Jun 3 14:10:10 2021 +0200 ARM: dts: rockchip: remove #phy-cells from usbphy node rk3066/rk3188 The review process of rockchip-usb-phy.yaml was not finished when the patch in the link below was already applied. Remove the unneeded #phy-cells property. https://lore.kernel.org/r/20210512122346.9463-4-jbx6244@gmail.com Fixes: 6e4e4e2a2558 ("ARM: dts: rockchip: move and restyle grf nodes rk3066/rk3188") Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210603121010.4315-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 7ee0e638a526b2d1f09c714f86d82dfd7628f322 Author: Borislav Petkov Date: Tue Jun 1 21:30:56 2021 +0200 x86/alternative: Align insn bytes vertically For easier inspection which bytes have changed. For example: feat: 7*32+12, old: (__x86_indirect_thunk_r10+0x0/0x20 (ffffffff81c02480) len: 17), repl: (ffffffff897813aa, len: 17) ffffffff81c02480: old_insn: 41 ff e2 90 90 90 90 90 90 90 90 90 90 90 90 90 90 ffffffff897813aa: rpl_insn: e8 07 00 00 00 f3 90 0f ae e8 eb f9 4c 89 14 24 c3 ffffffff81c02480: final_insn: e8 07 00 00 00 f3 90 0f ae e8 eb f9 4c 89 14 24 c3 No functional changes. Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210601193713.16190-1-bp@alien8.de commit 760fe22cf5e9f5d0212aa4c9aef555625c167627 Author: Weili Qian Date: Sat May 29 22:15:37 2021 +0800 crypto: hisilicon/qm - update reset flow This patch updates the reset flow based on PF/VF communications. VFs will be stopped after receiving reset message from PF, and wait for reset finish to restart VFs. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 3cd53a27c2fc58da9dcf6f22f4ed5705e398a1b9 Author: Weili Qian Date: Sat May 29 22:15:36 2021 +0800 crypto: hisilicon/qm - add callback to support communication This patch adds 'ping_all_vfs' callback that supports pf send message to all vfs and 'ping_pf' callback that supports vf send message to pf. After receiving the interrupt, the communication destination gets the message by sending mailbox. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit e3ac4d20e93664755ccea87ad1c71f264a6c9d74 Author: Weili Qian Date: Sat May 29 22:15:35 2021 +0800 crypto: hisilicon/qm - enable PF and VFs communication Kunpeng930 hardware supports the communication between PF and VFs. This patch enables communication between PF and VFs by writing hardware registers, and requests an irq for communication. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 38cd3968bf284929162665b002891de5c60d027a Author: Weili Qian Date: Sat May 29 22:15:34 2021 +0800 crypto: hisilicon/qm - adjust reset interface Kunpeng930 hardware supports PF/VF communications. When the device is reset, PF can send message to VF to stop function and restart function. This patch adjusts the reset interface to support sending message through PF/VF communication. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit b981f7990e1ae61d9a48d717868df8f00f52bc08 Author: Hui Tang Date: Sat May 29 16:58:47 2021 +0800 crypto: hisilicon/hpre - register ecdh NIST P384 Register ecdh NIST P384 curve and add the tfm initialization. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 9612581fc10919ef70aae1fa4dcf6e20d85a14a7 Author: Hui Tang Date: Sat May 29 16:58:19 2021 +0800 crypto: hisilicon/hpre - add check before gx modulo p The result of gx modulo p is zero if gx is equal to p, so return error immediately if gx is equal to p. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 1e609f5fb73b6b17af369a031f3a4c2b9b405854 Author: Hui Tang Date: Sat May 29 16:57:37 2021 +0800 crypto: hisilicon/hpre - fix ecdh self test issue When the key length is zero, use stdrng to generate private key to pass the crypto ecdh-nist-p256 self test on vector 2. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 6161f40c630bd7ced5f236cd5fbabec06e47afae Author: Kai Ye Date: Fri May 28 19:42:06 2021 +0800 crypto: hisilicon/sec - fixup 3des minimum key size declaration Fixup the 3des algorithm minimum key size declaration. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 5652d55a76f6f59f0c1cfc7b90050742738cd227 Author: Kai Ye Date: Fri May 28 19:42:05 2021 +0800 crypto: hisilicon/sec - add fallback tfm supporting for XTS mode Add fallback tfm supporting for hisi_sec driver. Due to the hardware not supports 192bit key length when using XTS mode. So the driver needs to setting the soft fallback skcipher tfm for user. Signed-off-by: Kai Ye Signed-off-by: Longfang Liu Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 7b44c0eecd6ade576bfb7a104dcdae5580237420 Author: Kai Ye Date: Fri May 28 19:42:04 2021 +0800 crypto: hisilicon/sec - add new skcipher mode for SEC Add new skcipher algorithms for Kunpeng930 SEC: OFB(AES), CFB(AES), CTR(AES), OFB(SM4), CFB(SM4), CTR(SM4). Signed-off-by: Kai Ye Signed-off-by: Wenkai Lin Signed-off-by: Herbert Xu commit adc3f65a7806dda12894870731509b6778735319 Author: Kai Ye Date: Fri May 28 18:26:14 2021 +0800 crypto: hisilicon/sec - driver adapt to new SQE Due to Kunpeng930 adds new SQE data structure, the SEC driver needs to be upgraded. It mainly includes bd parsing process and bd filling process. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit d5c1477b2f39173a988c01694d9bfafc771fa6ef Author: Kai Ye Date: Fri May 28 18:26:13 2021 +0800 crypto: hisilicon/sec - add new type of SQE Add new type of sqe for Kunpeng930, which is the next generation of SEC accelerator hardware. The hardware adds a new SQE data structure. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 76c1f4e0efd8abeaa3c7789d10ef9c82d950bedd Author: Srujana Challa Date: Tue May 25 16:57:18 2021 +0530 crypto: octeontx2 - enable and handle ME interrupts Adds master enable (ME) interrupt handler in PF. Upon receiving ME interrupt for a VF, PF clears it's transaction pending bit. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 40a645f753b32346f1ab3953e769479561a19b8d Author: Srujana Challa Date: Tue May 25 16:57:17 2021 +0530 crypto: octeontx2 - add support for CPT operations on CN10K CPT result format had changed for CN10K HW to accommodate more fields. This patch adds support to use new result format and new LMTST lines for CPT operations on CN10K platform. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit eb33cd9116b2f1d193352c77bd829b61b1249b00 Author: Srujana Challa Date: Tue May 25 16:57:16 2021 +0530 crypto: octeontx2 - add support to map LMTST region for CN10K On CN10K platform transmit/receive buffer alloc and free from/to hardware had changed to support burst operation. Whereas pervious silicon's only support single buffer free at a time. To Support the same firmware allocates a DRAM region for each PF/VF for storing LMTLINES. These LMTLINES are used to send CPT commands to HW. PF/VF LMTST region is accessed via BAR4. PFs LMTST region is followed by its VFs mbox memory. The size of region varies from 2KB to 256KB based on number of LMTLINES configured. This patch adds support for mapping of PF/VF LMTST region. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 4cd8c3152edeb0a580e0552317606a1f90bc59ab Author: Srujana Challa Date: Tue May 25 16:57:15 2021 +0530 crypto: octeontx2 - Add mailbox support for CN10K Mailbox region configuration has some changes on CN10K platform from OcteonTX2(CN9XX) platform. On CN10K platform: The DRAM region allocated to PF is enumerated as PF BAR4 memory. PF BAR4 contains AF-PF mbox region followed by its VFs mbox region. AF-PF mbox region base address is configured at RVU_AF_PFX_BAR4_ADDR PF-VF mailbox base address is configured at RVU_PF(x)_VF_MBOX_ADDR = RVU_AF_PF()_BAR4_ADDR+64KB. PF access its mbox region via BAR4, whereas VF accesses PF-VF DRAM mailboxes via BAR2 indirect access. On CN9XX platform: Mailbox region in DRAM is divided into two parts AF-PF mbox region and PF-VF mbox region i.e all PFs mbox region is contiguous similarly all VFs. The base address of the AF-PF mbox region is configured at RVU_AF_PF_BAR4_ADDR. AF-PF1 mbox address can be calculated as RVU_AF_PF_BAR4_ADDR * mbox size. This patch changes mbox initialization to support both CN9XX and CN10K platform. This patch also removes platform specific name from the PF/VF driver name to make it appropriate for all supported platforms. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 76f24b4f46b8ca380d6e2c91bd84e0e47a9f4bcd Author: Linus Walleij Date: Tue May 25 10:50:56 2021 +0200 crypto: ixp4xx - Add device tree support This makes the IXP4xx driver probe from the device tree and retrieve the NPE and two queue manager handled used to process crypto from the device tree. As the crypto engine is topologically a part of the NPE hardware, we augment the NPE driver to spawn the crypto engine as a child. The platform data probe path is going away in due time, for now it is an isolated else clause. Cc: Corentin Labbe Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 937264905aa21655cb1142146997f211153e6e27 Author: Linus Walleij Date: Tue May 25 10:48:46 2021 +0200 crypto: ixp4xx - Add DT bindings This adds device tree bindings for the ixp4xx crypto engine. Cc: Corentin Labbe Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit f5a6bf077126a1ac8a5c489022531e72a088603e Author: Arnd Bergmann Date: Tue May 25 10:30:46 2021 +0200 crypto: ixp4xx - convert to platform driver The ixp4xx_crypto driver traditionally registers a bare platform device without attaching it to a driver, and detects the hardware at module init time by reading an SoC specific hardware register. Change this to the conventional method of registering the platform device from the platform code itself when the device is present, turning the module_init/module_exit functions into probe/release driver callbacks. This enables compile-testing as well as potentially having ixp4xx coexist with other ARMv5 platforms in the same kernel in the future. Cc: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu commit 7551a074700a4093f5556a5ae51c1f83ea6b96ba Author: Wu Bo Date: Tue May 25 16:15:19 2021 +0800 crypto: af_alg - use DIV_ROUND_UP helper macro for calculations Replace open coded divisor calculations with the DIV_ROUND_UP kernel macro for better readability. Signed-off-by: Wu Bo Signed-off-by: Herbert Xu commit e9009fb227fa66a66cef02a36fb51c288f411e0d Author: Tian Tao Date: Mon May 24 20:28:38 2021 +0800 hwrng: ks-sa - Use pm_runtime_resume_and_get() to replace open coding 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. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit b21d14d9885ace8587a5b5b36cdcda9d8814f313 Author: Tian Tao Date: Mon May 24 20:20:57 2021 +0800 hwrng: omap - Use pm_runtime_resume_and_get() to replace open coding 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. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 5d0421d65be8c02bdde7a44f153babeaf004db7a Author: Tian Tao Date: Mon May 24 19:53:38 2021 +0800 hwrng: exynos - Use pm_runtime_resume_and_get() to replace open coding 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. Signed-off-by: Tian Tao Reviewed-by: Krzysztof Kozlowski Acked-by: Łukasz Stelmach Signed-off-by: Herbert Xu commit b4f74b59b99fab61ab97fc0e506f349579d8fefc Author: Dmitry Osipenko Date: Tue Jun 1 05:31:15 2021 +0300 memory: tegra30-emc: Use devm_tegra_core_dev_init_opp_table() Use common devm_tegra_core_dev_init_opp_table() helper for the OPP table initialization. Tested-by: Peter Geis # Ouya T30 Tested-by: Matt Merhar # Ouya T30 Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e7662cb9e99ef0fd15b8a0dcb3e5d7b32f9812d4 Author: Zou Wei Date: Mon May 24 17:47:08 2021 +0800 crypto: hisilicon - switch to memdup_user_nul() Use memdup_user_nul() helper instead of open-coding to simplify the code. v1-->v2: fixed patch title error v2-->v3: return the actual error Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Herbert Xu commit f8c9670ffffedd91fb0935d414bb3d2d179ac356 Author: Dmitry Osipenko Date: Tue Jun 1 05:31:14 2021 +0300 memory: tegra20-emc: Use devm_tegra_core_dev_init_opp_table() Use common devm_tegra_core_dev_init_opp_table() helper for the OPP table initialization. Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 56ebc9b0d77e0406aba2d900c82e79204cc7dc32 Author: Dmitry Osipenko Date: Tue Jun 1 05:31:13 2021 +0300 memory: tegra: Enable compile testing for all drivers Enable compile testing for all Tegra memory drivers. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit cc196fed0394aa03ec75e22274edb18c8b03ad00 Author: Colin Ian King Date: Tue Jun 1 11:22:01 2021 +0100 char: xillybus: Fix spelling mistake "overflew" -> "overflowed" There is a spelling mistake in a dev_err message. Fix it. Acked-by: Eli Billauer Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210601102201.8489-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit b71cdf15fcc1b1bbca01fe940bc9da261a99f20f Author: Eli Billauer Date: Fri May 28 12:22:42 2021 +0300 char: xillybus: Remove unneeded MODULE_VERSION() usage MODULE_VERSION is useless for in-kernel drivers, so these are removed from files in drivers/char/xillybus/ Reported-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20210528092242.51104-2-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1b1ee3a91d21fdf7d415c1060db1a7a07ae296b6 Author: Eli Billauer Date: Fri May 28 12:22:41 2021 +0300 char: xillybus: Fix condition for invoking the xillybus/ subdirectory As Xillybus' configuration symbol hierarchy has been reorganized recently, the correct condition for compiling the xillybus/ subdirectory is now CONFIG_XILLYBUS_CLASS, and not CONFIG_XILLYBUS. Reported-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20210528092242.51104-1-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit ca5ce82529104e96ccc5e1888979258e233e1644 Author: Azhar Shaikh Date: Mon May 31 20:58:43 2021 -0700 usb: typec: intel_pmc_mux: Update IOM port status offset for AlderLake Intel AlderLake(ADL) IOM has a different IOM port status offset than Intel TigerLake. Add a new ACPI ID for ADL and use the IOM port status offset as per the platform. Acked-by: Heikki Krogerus Signed-off-by: Azhar Shaikh Link: https://lore.kernel.org/r/20210601035843.71150-1-azhar.shaikh@intel.com Signed-off-by: Greg Kroah-Hartman commit a8534cb092d7c19ab5ce9f2cd3f7fc1385a73664 Author: Grzegorz Jaszczyk Date: Mon May 31 14:22:22 2021 +0200 usb: phy: introduce usb_phy device type with its own uevent handler The USB charger type and status was already propagated to userspace through kobject_uevent_env during charger notify work. Nevertheless the uevent could be lost e.g. because it could be fired at an early kernel boot stage, way before udev daemon or any other user-space app was able to catch it. Registering uevent hook for introduced usb_phy_dev_type will allow to query sysfs 'uevent' file to restore that information at any time. Reviewed-by: Peter Chen Signed-off-by: Grzegorz Jaszczyk Link: https://lore.kernel.org/r/20210531122222.453628-1-grzegorz.jaszczyk@linaro.org Signed-off-by: Greg Kroah-Hartman commit 309f5d7944627bd61550c880833a3e9c543018bb Author: Geert Uytterhoeven Date: Thu May 27 21:39:52 2021 +0200 dt-bindings: usb: cdns,usb3: Fix interrupts order Correct the order of the descriptions for the "interrupts" property to match the order of the "interrupt-names" property. Fixes: 68989fe1c39d9b32 ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema") Acked-by: Peter Chen Acked-by: Peter Chen Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210527193952.1705127-1-geert@linux-m68k.org Signed-off-by: Greg Kroah-Hartman commit 51c236d5e1d13de6a71fab1292bb015df4002515 Author: Chunfeng Yun Date: Fri May 28 14:11:00 2021 +0800 usb: mtu3: skip getting extcon when use manual drd switch When use manual drd switch, extcon is not used in fact, so no need get it even it exists, just skip it like using role switch. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1622182260-23767-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f3ec606efc2015060156729b8533216ae0bacf70 Author: Chunfeng Yun Date: Fri May 28 14:10:59 2021 +0800 usb: mtu3: use dev_err_probe to print error log about extcon Print an error log when the error number is not -EPROBE_DEFER Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1622182260-23767-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 10e93e081416e2c4651f9e0e9e3e5c5a4e6eb2bc Author: Chunfeng Yun Date: Fri May 28 14:10:58 2021 +0800 usb: mtu3: dump a status register of IPPC Add a SSUSB_IP_PW_STS1 register to show ip sleep status Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1622182260-23767-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 2c09bdaa58c982b8339d6476c8957564acd416fb Author: Chunfeng Yun Date: Fri May 28 14:10:57 2021 +0800 usb: mtu3: remove repeated setting of speed mtu3_gadget_start() will set speed, no need set it again in mtu3_gadget_set_speed(), just save the desired speed. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1622182260-23767-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 32ab701df62634cf3fa6bc0f89bded1c6ba4d641 Author: Chunfeng Yun Date: Fri May 28 14:10:56 2021 +0800 usb: mtu3: remove mtu3_ep0_setup() declaration in mtu3.h It's defined and only used in the same file, so remove its declaration in mtu3.h, and make it static Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1622182260-23767-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 8fd54b2c94acea87450d47e1652e1374200e0a49 Author: Lee Jones Date: Wed Jun 2 15:33:00 2021 +0100 drm/vboxvideo/modesetting: Provide function names for prototype headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vboxvideo/modesetting.c:11: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/vboxvideo/modesetting.c:54: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/vboxvideo/modesetting.c:87: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Hans de Goede Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-27-lee.jones@linaro.org commit a3dd6d9093ee888ec1e9b82513c523e5983a163c Author: Lee Jones Date: Wed Jun 2 15:32:59 2021 +0100 drm/vboxvideo/hgsmi_base: Place function names into headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vboxvideo/hgsmi_base.c:12: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/vboxvideo/hgsmi_base.c:42: warning: expecting prototype for Notify the host of HGSMI(). Prototype was for hgsmi_send_caps_info() instead drivers/gpu/drm/vboxvideo/hgsmi_base.c:74: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/vboxvideo/hgsmi_base.c:102: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/vboxvideo/hgsmi_base.c:174: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Hans de Goede Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-26-lee.jones@linaro.org commit 6668da9fb7871b6c6cd433b02b7212db0bcd7cc9 Author: Lee Jones Date: Wed Jun 2 15:32:58 2021 +0100 drm/exynos/exynos_drm_ipp: Fix documentation for 'exynos_drm_ipp_get_{caps,res}_ioctl()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/exynos/exynos_drm_ipp.c:105: warning: expecting prototype for exynos_drm_ipp_ioctl_get_res_ioctl(). Prototype was for exynos_drm_ipp_get_res_ioctl() instead drivers/gpu/drm/exynos/exynos_drm_ipp.c:153: warning: expecting prototype for exynos_drm_ipp_ioctl_get_caps(). Prototype was for exynos_drm_ipp_get_caps_ioctl() instead Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Cc: Marek Szyprowski Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-25-lee.jones@linaro.org commit 73f6f23063ec445c4760aa72d6ebc8a274b93a86 Author: Lee Jones Date: Wed Jun 2 15:32:57 2021 +0100 drm/exynos/exynos7_drm_decon: Fix incorrect naming of 'decon_shadow_protect_win()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/exynos/exynos7_drm_decon.c:355: warning: expecting prototype for shadow_protect_win(). Prototype was for decon_shadow_protect_win() instead Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Krzysztof Kozlowski Cc: Akshu Agarwal Cc: Ajay Kumar Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-24-lee.jones@linaro.org commit c372257758ad8a8614e2324cee650b2af479ef67 Author: Lee Jones Date: Wed Jun 2 15:32:55 2021 +0100 drm/panel/panel-sitronix-st7701: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/panel/panel-sitronix-st7701.c:42: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jagan Teki Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-22-lee.jones@linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-23-lee.jones@linaro.org commit 81f9fedd5cb4ce435f884d2436b9764b0aa20019 Author: Lee Jones Date: Wed Jun 2 15:32:54 2021 +0100 drm/panel/panel-raspberrypi-touchscreen: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c:33: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-21-lee.jones@linaro.org commit c3d670fcc874072c526c050e3c2c1556916852dd Author: Lee Jones Date: Wed Jun 2 15:32:53 2021 +0100 drm/ttm/ttm_tt: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_tt.c:398: warning: Function parameter or member 'num_pages' not described in 'ttm_tt_mgr_init' drivers/gpu/drm/ttm/ttm_tt.c:398: warning: Function parameter or member 'num_dma32_pages' not described in 'ttm_tt_mgr_init' Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-20-lee.jones@linaro.org commit 8c69d0298fb56f603e694cf0188e25b58dfe8b7e Author: Lee Jones Date: Wed Jun 2 15:32:49 2021 +0100 drm/nouveau/nvkm/subdev/mc/tu102: Make functions called by reference static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:50:1: warning: no previous prototype for ‘tu102_mc_intr_unarm’ [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:62:1: warning: no previous prototype for ‘tu102_mc_intr_rearm’ [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/subdev/mc/tu102.c:74:1: warning: no previous prototype for ‘tu102_mc_intr_mask’ [-Wmissing-prototypes] Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Alistair Popple Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-16-lee.jones@linaro.org commit 6c3f953381e526a1623d4575660afae8b19ffa20 Author: Lee Jones Date: Wed Jun 2 15:32:42 2021 +0100 drm/sti/sti_hqvdp: Fix incorrectly named function 'sti_hqvdp_vtg_cb()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/sti/sti_hqvdp.c:796: warning: expecting prototype for sti_vdp_vtg_cb(). Prototype was for sti_hqvdp_vtg_cb() instead Cc: Benjamin Gaignard Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Zabel Cc: Fabien Dessenne Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-9-lee.jones@linaro.org commit 94c38225f3350152c7c40827cbf57dc08b74c833 Author: Lee Jones Date: Wed Jun 2 15:32:41 2021 +0100 drm/sti/sti_tvout: Provide a bunch of missing function names Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/sti/sti_tvout.c:166: warning: expecting prototype for Set the clipping mode of a VIP(). Prototype was for tvout_vip_set_color_order() instead drivers/gpu/drm/sti/sti_tvout.c:187: warning: expecting prototype for Set the clipping mode of a VIP(). Prototype was for tvout_vip_set_clip_mode() instead drivers/gpu/drm/sti/sti_tvout.c:203: warning: expecting prototype for Set the rounded value of a VIP(). Prototype was for tvout_vip_set_rnd() instead drivers/gpu/drm/sti/sti_tvout.c:223: warning: expecting prototype for Select the VIP input(). Prototype was for tvout_vip_set_sel_input() instead drivers/gpu/drm/sti/sti_tvout.c:258: warning: expecting prototype for Select the input video signed or unsigned(). Prototype was for tvout_vip_set_in_vid_fmt() instead drivers/gpu/drm/sti/sti_tvout.c:274: warning: expecting prototype for Set preformatter matrix(). Prototype was for tvout_preformatter_set_matrix() instead drivers/gpu/drm/sti/sti_tvout.c:299: warning: expecting prototype for Start VIP block for DVO output(). Prototype was for tvout_dvo_start() instead drivers/gpu/drm/sti/sti_tvout.c:353: warning: expecting prototype for Start VIP block for HDMI output(). Prototype was for tvout_hdmi_start() instead drivers/gpu/drm/sti/sti_tvout.c:402: warning: expecting prototype for Start HDF VIP and HD DAC(). Prototype was for tvout_hda_start() instead Cc: Benjamin Gaignard Cc: David Airlie Cc: Daniel Vetter Cc: Philipp Zabel Cc: Vincent Abriou Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-8-lee.jones@linaro.org commit 8fb84ac8911e41fa1b6f303b9dab24c3bf87d3b6 Author: Lee Jones Date: Wed Jun 2 15:32:40 2021 +0100 drm/sti/sti_hda: Provide missing function names Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/sti/sti_hda.c:283: warning: expecting prototype for Search for a video mode in the supported modes table(). Prototype was for hda_get_mode_idx() instead drivers/gpu/drm/sti/sti_hda.c:301: warning: expecting prototype for Enable the HD DACS(). Prototype was for hda_enable_hd_dacs() instead drivers/gpu/drm/sti/sti_hda.c:383: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Benjamin Gaignard Cc: David Airlie Cc: Daniel Vetter Cc: Fabien Dessenne Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-7-lee.jones@linaro.org commit 2f921c077069ed6b0671a4bc9431382b91e72c31 Author: Lee Jones Date: Wed Jun 2 15:32:39 2021 +0100 drm/sti/sti_hdmi_tx3g4c28phy: Provide function names for kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c:77: warning: expecting prototype for Start hdmi phy macro cell tx3g4c28(). Prototype was for sti_hdmi_tx3g4c28phy_start() instead drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c:187: warning: expecting prototype for Stop hdmi phy macro cell tx3g4c28(). Prototype was for sti_hdmi_tx3g4c28phy_stop() instead Cc: Benjamin Gaignard Cc: David Airlie Cc: Daniel Vetter Cc: Vincent Abriou Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-6-lee.jones@linaro.org commit f2ab3713d6aba108bb7e620e50b94c7d2cdc2236 Author: Lee Jones Date: Wed Jun 2 15:32:38 2021 +0100 drm/mediatek/mtk_disp_rdma: Strip and demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_rdma.c:72: warning: Function parameter or member 'clk' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:72: warning: Function parameter or member 'regs' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:72: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:72: warning: Function parameter or member 'vblank_cb' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:72: warning: Function parameter or member 'vblank_cb_data' not described in 'mtk_disp_rdma' drivers/gpu/drm/mediatek/mtk_disp_rdma.c:72: warning: Function parameter or member 'fifo_size' not described in 'mtk_disp_rdma' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-5-lee.jones@linaro.org commit ae727f6722dc9ebdf423796ee2a4d705b6943d65 Author: Lee Jones Date: Wed Jun 2 15:32:37 2021 +0100 drm/mediatek/mtk_disp_ovl: Strip and demote non-conformant header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_ovl.c:83: warning: Function parameter or member 'clk' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:83: warning: Function parameter or member 'regs' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:83: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:83: warning: Function parameter or member 'vblank_cb' not described in 'mtk_disp_ovl' drivers/gpu/drm/mediatek/mtk_disp_ovl.c:83: warning: Function parameter or member 'vblank_cb_data' not described in 'mtk_disp_ovl' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-4-lee.jones@linaro.org commit cebecaf18e4e86459310181e67b08631bacf4127 Author: Lee Jones Date: Wed Jun 2 15:32:36 2021 +0100 drm/mediatek/mtk_disp_gamma: Strip and demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_gamma.c:42: warning: Function parameter or member 'clk' not described in 'mtk_disp_gamma' drivers/gpu/drm/mediatek/mtk_disp_gamma.c:42: warning: Function parameter or member 'regs' not described in 'mtk_disp_gamma' drivers/gpu/drm/mediatek/mtk_disp_gamma.c:42: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_gamma' drivers/gpu/drm/mediatek/mtk_disp_gamma.c:42: warning: Function parameter or member 'data' not described in 'mtk_disp_gamma' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-3-lee.jones@linaro.org commit 01b166b23be2a0b2b1283f9a47c24741c1ddd5cb Author: Lee Jones Date: Wed Jun 2 15:32:35 2021 +0100 drm/mediatek/mtk_disp_color: Strip incorrect doc and demote header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/mediatek/mtk_disp_color.c:45: warning: Function parameter or member 'clk' not described in 'mtk_disp_color' drivers/gpu/drm/mediatek/mtk_disp_color.c:45: warning: Function parameter or member 'regs' not described in 'mtk_disp_color' drivers/gpu/drm/mediatek/mtk_disp_color.c:45: warning: Function parameter or member 'cmdq_reg' not described in 'mtk_disp_color' Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602143300.2330146-2-lee.jones@linaro.org commit 717cd731de8983483f6f41611b0d60aa3c267ff9 Author: Krzysztof Kozlowski Date: Tue Jun 1 18:06:08 2021 +0200 MAINTAINERS: memory: cover also header file Add include/memory/ in memory drivers maintainers entry. So far there is only one file there for Renesas Reduced Pin Count Interface driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210601160608.312446-2-krzysztof.kozlowski@canonical.com commit 8c84a7335e71de1f045247eb035d55712e13222a Author: Krzysztof Kozlowski Date: Tue Jun 1 18:06:07 2021 +0200 memory: renesas-rpc-if: correct whitespace Use spaces instead of tabs as word separator. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210601160608.312446-1-krzysztof.kozlowski@canonical.com commit 080f9c10c773df39ccebe8dc414179d9179005a9 Author: Souptick Joarder Date: Sun Apr 25 16:20:42 2021 +0530 ipw2x00: Minor documentation update Kernel test robot throws below warning -> drivers/net/wireless/intel/ipw2x00/ipw2100.c:5359: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Minor update in documentation. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Cc: Randy Dunlap Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1619347842-6638-1-git-send-email-jrdr.linux@gmail.com commit fef1cdbba4d12fb67555364c22cc8d7c500600aa Author: Colin Ian King Date: Tue Jun 1 11:28:55 2021 +0100 b43legacy: Fix spelling mistake "overflew" -> "overflowed" There is a spelling mistake in a comment. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210601102855.8884-1-colin.king@canonical.com commit d1dbaa54191e0014493cb4065aadb6764b404dd1 Author: YueHaibing Date: Sat May 29 19:51:31 2021 +0800 b43legacy: Remove unused inline function txring_to_priority() commit 5d07a3d62f63 ("b43legacy: Avoid packet losses in the dma worker code") left behind this. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210529115131.6028-1-yuehaibing@huawei.com commit da16f5be45d0458e5240737fe90194ee33314bdf Author: Zhen Lei Date: Tue May 11 11:42:03 2021 +0800 b43: phy_n: Delete some useless TODO code These TODO empty code are added by commit 9442e5b58edb ("b43: N-PHY: partly implement SPUR workaround"). It's been more than a decade now. I don't think anyone who wants to perfect this workaround can follow this TODO tip exactly. Instead, it limits them to new thinking. Remove it will be better. No functional change. By the way, this helps reduce some binary code size. Before: text data bss dec hex 74472 9967 0 84439 149d7 After: text data bss dec hex 74408 9919 0 84327 14967 Signed-off-by: Zhen Lei Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210511034203.4122-2-thunder.leizhen@huawei.com commit da76290fa39dc647bf7a1bac6467e66c8e465e54 Author: Tobias Schramm Date: Tue Jun 1 18:47:57 2021 +0200 dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf The RK3308 has a USB GRF. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Signed-off-by: Johan Jonker Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210601164800.7670-3-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit e71ccdff376b0bd1bf4d47642b7ec4d791293b96 Author: Johan Jonker Date: Tue Jun 1 18:47:56 2021 +0200 dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$" in phy-provider.yaml has required "#phy-cells" for phy nodes. The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes. Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent notifications. Remove unneeded "#phy-cells" from parent node. Also sort example. make ARCH=arm dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/ phy/phy-provider.yaml Signed-off-by: Johan Jonker Acked-by: Rob Herring Acked-By: Vinod Koul Link: https://lore.kernel.org/r/20210601164800.7670-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2fd2300a9c17ee1c48b1b7a7fabbb90fd12a64f1 Author: Johan Jonker Date: Tue Jun 1 18:47:58 2021 +0200 ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$" in phy-provider.yaml has required "#phy-cells" for phy nodes. The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes. Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent notifications. make ARCH=arm dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/ phy/phy-provider.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210601164800.7670-4-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 9fcf74b274a1dc5bcda37c34470061ef1e1130dd Author: Tobias Schramm Date: Tue Jun 1 18:48:00 2021 +0200 arm64: dts: rockchip: add USB support to rk3308.dtsi The Rockchip RK3308 features an integrated USB 2.0 phy, an USB OTG controller and OHCI/EHCI interfaces. This patch adds all of those to the RK3308 dtsi and thereby enables USB support on the RK3308. Signed-off-by: Tobias Schramm Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210601164800.7670-6-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 8c3d64251ac5c5a3d10364f6b07d3603ac1e7b4a Author: Johan Jonker Date: Tue Jun 1 18:47:59 2021 +0200 arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$" in phy-provider.yaml has required "#phy-cells" for phy nodes. The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes. Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent notifications. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/ phy/phy-provider.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210601164800.7670-5-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 281e44f5fd4f82d86a2b86f0592c698f7311a674 Author: Shaokun Zhang Date: Thu Jun 3 15:15:02 2021 +0800 arm64: perf: Add more support on caps under sysfs Armv8.7 has introduced BUS_SLOTS and BUS_WIDTH in PMMIR_EL1 register, add two entries in caps for bus_slots and bus_width under sysfs. It will return the true slots and width if the information is available, otherwise it will return 0. Cc: Will Deacon Cc: Mark Rutland Cc: Robin Murphy Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622704502-63951-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 18d5c7bf50c6d820c366c2a23d71d468b14c87d6 Author: Chris Morgan Date: Wed May 19 15:37:54 2021 -0500 arm64: dts: rockchip: add rk817 codec to Odroid Go Add the new rk817 codec driver to the Odroid Go Advance. Signed-off-by: Chris Morgan Tested-by: Maciej Matuszczyk Link: https://lore.kernel.org/r/20210519203754.27184-5-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 4dc7c97d04dcaa9f19482f70dcfdbeb52cc7193f Author: Kees Cook Date: Wed Jun 2 14:52:52 2021 -0700 drm/pl111: depend on CONFIG_VEXPRESS_CONFIG Avoid randconfig build failures by requiring VEXPRESS_CONFIG: aarch64-linux-gnu-ld: drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_vexpress_clcd_init': pl111_versatile.c:(.text+0x220): undefined reference to `devm_regmap_init_vexpress_config' Fixes: 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init") Signed-off-by: Kees Cook Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602215252.695994-4-keescook@chromium.org commit 5ea4dba68305d9648b9dba30036cc36d4e877bca Author: Arnd Bergmann Date: Wed Jun 2 14:52:51 2021 -0700 drm/msm/a6xx: add CONFIG_QCOM_LLCC dependency When LLCC support is in a loadable module, the adreno support cannot be built-in: aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `a6xx_gpu_init': a6xx_gpu.c:(.text+0xe0): undefined reference to `llcc_slice_getd' a6xx_gpu.c:(.text+0xe0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_getd' aarch64-linux-ld: a6xx_gpu.c:(.text+0xec): undefined reference to `llcc_slice_getd' a6xx_gpu.c:(.text+0xec): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_getd' aarch64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gpu.o: in function `a6xx_destroy': a6xx_gpu.c:(.text+0x274): undefined reference to `llcc_slice_putd' a6xx_gpu.c:(.text+0x274): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `llcc_slice_putd' aarch64-linux-ld: a6xx_gpu.c:(.text+0x27c): undefined reference to `llcc_slice_putd' Add a Kconfig dependency that disallows the broken configuration but allows all working ones. Fixes: 474dadb8b0d5 ("drm/msm/a6xx: Add support for using system cache(LLC)") Signed-off-by: Arnd Bergmann Reported-by: kernel test robot Reviewed-by: Sai Prakash Ranjan Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210103140407.3917405-1-arnd@kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602215252.695994-3-keescook@chromium.org commit f611b1e7624ccdbd495c19e9805629e22265aa16 Author: Kees Cook Date: Wed Jun 2 14:52:50 2021 -0700 drm: Avoid circular dependencies for CONFIG_FB When cleaning up other drm config dependencies, it is too easy to create larger problems. Instead, mark CONFIG_FB as a "depends": drivers/gpu/drm/Kconfig:74:error: recursive dependency detected! Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/lkml/CAK8P3a3jUQs6c5tESSNMbqfuymewj9FhqRizyHcfOXf8Rgy-nA@mail.gmail.com/ Signed-off-by: Kees Cook [danvet: Rebase, the symbol has changed.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210602215252.695994-2-keescook@chromium.org commit ff323d6d72e1e4971c8ba9e2f3cf8afc48f22383 Author: Zhen Lei Date: Tue Jun 1 17:08:52 2021 +0800 video: fbdev: mb862xx: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210601090852.10531-1-thunder.leizhen@huawei.com commit c5ef15ae09637fb51ae43e1d1d98329d67dd4fd6 Author: lijian Date: Tue Jun 1 09:27:47 2021 +0800 video: fbdev: atyfb: mach64_cursor.c: deleted the repeated word deleted the repeated word 'be' in the comments. Signed-off-by: lijian Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210601012747.38884-1-lijian_8010a29@163.com commit 95b2151fec3e62ba0033c61bd388ff0111884972 Author: Alyssa Rosenzweig Date: Fri May 28 19:51:52 2021 -0400 drm/sched: Fix inverted comment for hang_limit The hang_limit is the threshold after which the kernel no longer attempts to schedule a job. Its documentation stated the opposite due to a typo. Correct the wording to indicate the actual purpose of the field. Signed-off-by: Alyssa Rosenzweig Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210528235152.38447-1-alyssa.rosenzweig@collabora.com commit 4a888ba03fd97d1cb0253581973533965bf348c4 Author: Lee Jones Date: Wed May 26 09:47:22 2021 +0100 drm/vgem/vgem_drv: Standard comment blocks should not use kernel-doc format Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vgem/vgem_drv.c:47: warning: expecting prototype for This is vgem, a (non-hardware(). Prototype was for DRIVER_NAME() instead Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Adam Jackson Cc: Ben Widawsky Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210526084726.552052-31-lee.jones@linaro.org commit b970b8e9fbb4ab8eb0753ae5d73813e68213a2a6 Author: Daniel Vetter Date: Fri May 21 10:24:57 2021 +0200 drm/doc: Include fence chain api We have this nice kerneldoc, but forgot to include it. Reviewed-by: Christian König Signed-off-by: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20210521082457.1656333-1-daniel.vetter@ffwll.ch commit 346ac785badf66120d8b4c7b48f87b0a536f691e Author: Chaitanya Kulkarni Date: Wed Jun 2 17:37:58 2021 -0700 nvmet: remove a superfluous variable Remove the superfluous variable "bdev" that is only used once in the nvmet_bdev_alloc_bip() and use req->ns->bdev that is used everywhere in the code to access the nvmet request's bdev. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f6e8bd59c4e84820fc5f6c404730ef872439548a Author: Amit Engel Date: Thu Apr 22 15:33:16 2021 +0300 nvmet: move ka_work initialization to nvmet_alloc_ctrl Initialize keep-alive work only once, as part of alloc_ctrl and not each time that nvmet_start_keep_alive_timer is being called Signed-off-by: Amit Engel Reviewed-by: Hou Pu commit f1cf35e17ec308c0e76f55c6bccf84fff1a2d71a Author: Christoph Hellwig Date: Wed May 19 09:22:35 2021 +0200 nvme: remove nvme_{get,put}_ns_from_disk Now that only one caller is left remove the helpers by restructuring nvme_pr_command so that it has two helpers for sending a command of to a given nsid using either the ns_head for multipath, or the namespace stored in the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit 8b4fb0f968ffe73f619c06cb4040ecaa60327098 Author: Christoph Hellwig Date: Wed May 19 09:17:06 2021 +0200 nvme: split nvme_report_zones Split multipath support out of nvme_report_zones into a separate helper and simplify the non-multipath version as a result. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit d8ca66e82191a9a95926f7f129028bd362202d5d Author: Christoph Hellwig Date: Wed May 19 09:11:54 2021 +0200 nvme: move the CSI sanity check into nvme_ns_report_zones Move the CSI check into nvme_ns_report_zones to clean up the code a little bit and prepare for further refactoring. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit 85b790a7ae0518dd745bbb97d532b83840d2db04 Author: Christoph Hellwig Date: Wed May 19 09:09:56 2021 +0200 nvme: add a sparse annotation to nvme_ns_head_ctrl_ioctl Add the __releases annotation to tell sparse that nvme_ns_head_ctrl_ioctl is expected to unlock head->srcu. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit 3e7d1a55165bdce2aaf1139ee8889e68eb29c263 Author: Christoph Hellwig Date: Wed May 19 09:08:41 2021 +0200 nvme: open code nvme_put_ns_from_disk in nvme_ns_head_ctrl_ioctl nvme_ns_head_ctrl_ioctl is always used on multipath nodes, so just call srcu_read_unlock directly. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit 86b4284d98d6a47033b7bfc5b029a4fc45e4d370 Author: Christoph Hellwig Date: Wed May 19 09:04:26 2021 +0200 nvme: open code nvme_{get,put}_ns_from_disk in nvme_ns_head_ioctl nvme_ns_head_ioctl is always used on multipath nodes, no need to deal with the de-multiplexers. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit f423c85cd392241f1521887b1396038cd1e4c68e Author: Christoph Hellwig Date: Wed May 19 09:02:59 2021 +0200 nvme: open code nvme_put_ns_from_disk in nvme_ns_head_chr_ioctl nvme_ns_head_chr_ioctl is always used on multipath nodes, so just call srcu_read_unlock and consolidate the two unlock paths. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg commit 97ba6931ba881ea23f3758bbbde7a07a98bff4f9 Author: Chaitanya Kulkarni Date: Fri May 21 15:42:00 2021 -0700 nvme-fabrics: remove extra braces No need to use the braces around ~ operator. No functionality change in this patch. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 6f860c922532afaae33a968b0d1df3ddf9a8d8a7 Author: Chaitanya Kulkarni Date: Fri May 21 15:41:59 2021 -0700 nvme-fabrics: remove an extra comment Remove the comment at the end of the switch that is not needed as function is small enough. No functionality change in this patch. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 63d20f54a3d0cff17145716caff03a0d161abf44 Author: Chaitanya Kulkarni Date: Thu Jun 3 10:28:03 2021 +0300 nvme-fabrics: remove extra new lines in the switch Remove the extra lines in the switch block that is not common practice in the kernel code. No functionality change in this patch. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 25e1de8c40c57bb6be4ecd601641691cfd8a7923 Author: Chaitanya Kulkarni Date: Fri May 21 15:41:57 2021 -0700 nvme-fabrics: fix the kerneldco comment for nvmf_log_connect_error() Fix the comment style that matches existing code. No functionality change in this patch. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 3ede8f72a9a2825efca23a3552e80a1202ea88fd Author: Martin Belanger Date: Thu May 20 15:09:34 2021 -0400 nvme-tcp: allow selecting the network interface for connections In our application, we need a way to force TCP connections to go out a specific IP interface instead of letting Linux select the interface based on the routing tables. Add the 'host-iface' option to allow specifying the interface to use. When the option host-iface is specified, the driver uses the specified interface to set the option SO_BINDTODEVICE on the TCP socket before connecting. This new option is needed in addtion to the existing host-traddr for the following reasons: Specifying an IP interface by its associated IP address is less intuitive than specifying the actual interface name and, in some cases, simply doesn't work. That's because the association between interfaces and IP addresses is not predictable. IP addresses can be changed or can change by themselves over time (e.g. DHCP). Interface names are predictable [1] and will persist over time. Consider the following configuration. 1: lo: mtu 65536 qdisc noqueue state ... link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 100.0.0.100/24 scope global lo valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc ... link/ether 08:00:27:21:65:ec brd ff:ff:ff:ff:ff:ff inet 100.0.0.100/24 scope global enp0s3 valid_lft forever preferred_lft forever 3: enp0s8: mtu 1500 qdisc ... link/ether 08:00:27:4f:95:5c brd ff:ff:ff:ff:ff:ff inet 100.0.0.100/24 scope global enp0s8 valid_lft forever preferred_lft forever The above is a VM that I configured with the same IP address (100.0.0.100) on all interfaces. Doing a reverse lookup to identify the unique interface associated with 100.0.0.100 does not work here. And this is why the option host_iface is required. I understand that the above config does not represent a standard host system, but I'm using this to prove a point: "We can never know how users will configure their systems". By te way, The above configuration is perfectly fine by Linux. The current TCP implementation for host_traddr performs a bind()-before-connect(). This is a common construct to set the source IP address on a TCP socket before connecting. This has no effect on how Linux selects the interface for the connection. That's because Linux uses the Weak End System model as described in RFC1122 [2]. On the other hand, setting the Source IP Address has benefits and should be supported by linux-nvme. In fact, setting the Source IP Address is a mandatory FedGov requirement (e.g. connection to a RADIUS/TACACS+ server). Consider the following configuration. $ ip addr list dev enp0s8 3: enp0s8: mtu 1500 qdisc ... link/ether 08:00:27:4f:95:5c brd ff:ff:ff:ff:ff:ff inet 192.168.56.101/24 brd 192.168.56.255 scope global enp0s8 valid_lft 426sec preferred_lft 426sec inet 192.168.56.102/24 scope global secondary enp0s8 valid_lft forever preferred_lft forever inet 192.168.56.103/24 scope global secondary enp0s8 valid_lft forever preferred_lft forever inet 192.168.56.104/24 scope global secondary enp0s8 valid_lft forever preferred_lft forever Here we can see that several addresses are associated with interface enp0s8. By default, Linux always selects the default IP address, 192.168.56.101, as the source address when connecting over interface enp0s8. Some users, however, want the ability to specify a different source address (e.g., 192.168.56.102, 192.168.56.103, ...). The option host_traddr can be used as-is to perform this function. In conclusion, I believe that we need 2 options for TCP connections. One that can be used to specify an interface (host-iface). And one that can be used to set the source address (host-traddr). Users should be allowed to use one or the other, or both, or none. Of course, the documentation for host_traddr will need some clarification. It should state that when used for TCP connection, this option only sets the source address. And the documentation for host_iface should say that this option is only available for TCP connections. References: [1] https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ [2] https://tools.ietf.org/html/rfc1122 Tested both IPv4 and IPv6 connections. Signed-off-by: Martin Belanger Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit e21e0243e7b0f1c2a21d21f4d115f7b37175772a Author: Mario Limonciello Date: Fri May 28 11:02:34 2021 -0500 nvme-pci: look for StorageD3Enable on companion ACPI device instead The documentation around the StorageD3Enable property hints that it should be made on the PCI device. This is where newer AMD systems set the property and it's required for S0i3 support. So rather than look for nodes of the root port only present on Intel systems, switch to the companion ACPI device for all systems. David Box from Intel indicated this should work on Intel as well. Link: https://lore.kernel.org/linux-nvme/YK6gmAWqaRmvpJXb@google.com/T/#m900552229fa455867ee29c33b854845fce80ba70 Link: https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro Fixes: df4f9bc4fb9c ("nvme-pci: add support for ACPI StorageD3Enable property") Suggested-by: Liang Prike Acked-by: Raul E Rangel Signed-off-by: Mario Limonciello Reviewed-by: David E. Box Signed-off-by: Christoph Hellwig commit ebd8a93aa4f50e9e013e6aa7fe601b4ce7565c28 Author: Alexey Bogoslavsky Date: Wed Apr 28 09:27:36 2021 +0000 nvme: extend and modify the APST configuration algorithm The algorithm that was used until now for building the APST configuration table has been found to produce entries with excessively long ITPT (idle time prior to transition) for devices declaring relatively long entry and exit latencies for non-operational power states. This leads to unnecessary waste of power and, as a result, failure to pass mandatory power consumption tests on Chromebook platforms. The new algorithm is based on two predefined ITPT values and two predefined latency tolerances. Based on these values, as well as on exit and entry latencies reported by the device, the algorithm looks for up to 2 suitable non-operational power states to use as primary and secondary APST transition targets. The predefined values are supplied to the nvme driver as module parameters: - apst_primary_timeout_ms (default: 100) - apst_secondary_timeout_ms (default: 2000) - apst_primary_latency_tol_us (default: 15000) - apst_secondary_latency_tol_us (default: 100000) The algorithm echoes the approach used by Intel's and Microsoft's drivers on Windows. The specific default parameter values are also based on those drivers. Yet, this patch doesn't introduce the ability to dynamically regenerate the APST table in the event of switching the power source from AC to battery and back. Adding this functionality may be considered in the future. In the meantime, the timeouts and tolerances reflect a compromise between values used by Microsoft for AC and battery scenarios. In most NVMe devices the new algorithm causes them to implement a more aggressive power saving policy. While beneficial in most cases, this sometimes comes at the price of a higher IO processing latency in certain scenarios as well as at the price of a potential impact on the drive's endurance (due to more frequent context saving when entering deep non- operational states). So in order to provide a fallback for systems where these regressions cannot be tolerated, the patch allows to revert to the legacy behavior by setting either apst_primary_timeout_ms or apst_primary_latency_tol_us parameter to 0. Eventually (and possibly after fine tuning the default values of the module parameters) the legacy behavior can be removed. TESTING. The new algorithm has been extensively tested. Initially, simulations were used to compare APST tables generated by old and new algorithms for a wide range of devices. After that, power consumption, performance and latencies were measured under different workloads on devices from multiple vendors (WD, Intel, Samsung, Hynix, Kioxia). Below is the description of the tests and the findings. General observations. The effect the patch has on the APST table varies depending on the entry and exit latencies advertised by the devices. For some devices, the effect is negligible (e.g. Kioxia KBG40ZNS), for some significant, making the transitions to PS3 and PS4 much quicker (e.g. WD SN530, Intel 760P), or making the sleep deeper, PS4 rather than PS3 after a similar amount of time (e.g. SK Hynix BC511). For some devices (e.g. Samsung PM991) the effect is mixed: the initial transition happens after a longer idle time, but takes the device to a lower power state. Workflows. In order to evaluate the patch's effect on the power consumption and latency, 7 workflows were used for each device. The workflows were designed to test the scenarios where significant differences between the old and new behaviors are most likely. Each workflow was tested twice: with the new and with the old APST table generation implementation. Power consumption, performance and latency were measured in the process. The following workflows were used: 1) Consecutive write at the maximum rate with IO depth of 2, with no pauses 2) Repeated pattern of 1000 consecutive writes of 4K packets followed by 50ms idle time 3) Repeated pattern of 1000 consecutive writes of 4K packets followed by 150ms idle time 4) Repeated pattern of 1000 consecutive writes of 4K packets followed by 500ms idle time 5) Repeated pattern of 1000 consecutive writes of 4K packets followed by 1.5s idle time 6) Repeated pattern of 1000 consecutive writes of 4K packets followed by 5s idle time 7) Repeated pattern of a single random read of a 4K packet followed by 150ms idle time Power consumption Actual power consumption measurements produced predictable results in accordance with the APST mechanism's theory of operation. Devices with long entry and exit latencies such as WD SN530 showed huge improvement on scenarios 4,5 and 6 of up to 62%. Devices such as Kioxia KBG40ZNS where the resulting APST table looks virtually identical with both legacy and new algorithms, showed little or no change in the average power consumption on all workflows. Devices with extra short latencies such as Samsung PM991 showed moderate increase in power consumption of up to 18% in worst case scenarios. In addition, on Intel and Samsung devices a more complex impact was observed on scenarios 3, 4 and 7. Our understanding is that due to longer stay in deep non-operational states between the writes the devices start performing background operations leading to an increase of power consumption. With the old APST tables part of these operations are delayed until the scenario is over and a longer idle period begins, but eventually this extra power is consumed anyway. Performance. In terms of performance measured on sustained write or read scenarios, the effect of the patch is minimal as in this case the device doesn't enter low power states. Latency As expected, in devices where the patch causes a more aggressive power saving policy (e.g. WD SN530, Intel 760P), an increase in latency was observed in certain scenarios. Workflow number 7, specifically designed to simulate the worst case scenario as far as latency is concerned, indeed shows a sharp increase in average latency (~2ms -> ~53ms on Intel 760P and 0.6 -> 10ms on WD SN530). The latency increase on other workloads and other devices is much milder or non-existent. Signed-off-by: Alexey Bogoslavsky Signed-off-by: Christoph Hellwig commit 13ce7e625a3383004181217985a70d16c3cbe8be Author: Colin Ian King Date: Thu May 13 12:59:52 2021 +0100 nvme: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Christoph Hellwig commit 8dec60e7b8d0cc1ca0001e64b17e339ff5158703 Author: Troy Lee Date: Tue Mar 16 08:59:32 2021 +0000 ARM: dts: aspeed: Grow u-boot partition 64MiB OpenBMC flash layout Aspeed AST2600 u-boot requires 600KiB+ flash space. Sharing the same openbmc-flash-layout-64.dtsi requires to resize the flash partition. The updated flash layout as follows: - u-boot: 896 KiB - u-boot-env: 128 KiB - kernel: 9MiB - rofs: 32 MiB - rwfs: 22 MiB Signed-off-by: Troy Lee Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210316085932.2601-1-troy_lee@aspeedtech.com Signed-off-by: Joel Stanley commit 959ff7f6f42459cd91d1e8b31828d557fd4ee872 Author: Quan Nguyen Date: Mon May 17 11:00:36 2021 +0700 ARM: dts: aspeed: mtjade: switch to 64MB flash layout As the 32MB flash layout will soon be exhausted, switch to 64MB layout. Signed-off-by: Quan Nguyen Signed-off-by: Phong Vo Signed-off-by: Thang Q. Nguyen Link: https://lore.kernel.org/r/20210517040036.13667-4-quan@os.amperecomputing.com Signed-off-by: Joel Stanley commit 73a89a96f55d70765fa885659e2fda5e0b5db0b0 Author: Quan Nguyen Date: Mon May 17 11:00:35 2021 +0700 ARM: dts: aspeed: mtjade: Add PSU support Enable PSU support on Ampere's Mt. Jade BMC. Signed-off-by: Quan Nguyen Signed-off-by: Phong Vo Signed-off-by: Thang Q. Nguyen Link: https://lore.kernel.org/r/20210517040036.13667-3-quan@os.amperecomputing.com Signed-off-by: Joel Stanley commit 9e8cf4b4f93ff6bab6ff0eefd09c1fe55b17152f Author: Quan Nguyen Date: Mon May 17 11:00:34 2021 +0700 ARM: dts: aspeed: mtjade: Enable OCP card support via NC-SI Enable OCP card support on Ampere's Mt. Jade BMC. Signed-off-by: Quan Nguyen Signed-off-by: Phong Vo Signed-off-by: Thang Q. Nguyen Link: https://lore.kernel.org/r/20210517040036.13667-2-quan@os.amperecomputing.com Signed-off-by: Joel Stanley commit 3ed131e5a43b469afcb1dd6d24399e05ce1f0eb0 Author: Anusha Srivatsa Date: Wed May 26 15:02:56 2021 -0700 drm/i915/dmc: Move struct intel_dmc to intel_dmc.h Move struct intel_dmc from i915_drv.h to intel_dmc.h. v2: Add includes along with moving the struct. Reviewed-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Signed-off-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210526220256.4097-4-anusha.srivatsa@intel.com commit 03256487fee340380afecfba0d3ed2dc9ad57612 Author: Anusha Srivatsa Date: Wed May 26 15:02:55 2021 -0700 drm/i915/dmc: Add intel_dmc_has_payload() helper We check for dmc_payload being there at various points in the driver. Replace it with the helper. v2: rebased. v3: Move intel_dmc to intel_dmc.h in another patch (Lucas) v4: Remove headers not needed from intel_dmc.h 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/20210526220256.4097-3-anusha.srivatsa@intel.com commit ec7dfdfce1a09e8d8fc07fbf6ccc32ce0a39c1f8 Author: Anusha Srivatsa Date: Wed May 26 15:02:54 2021 -0700 drm/i915/dmc: s/DRM_ERROR/drm_err Use new format of debug messages across intel_csr. While at it, change some function definitions which now need dev_priv for drm_err and drm_info etc. v2: use container_of() (Jani) v3: Indentation fixes. (Jani) Cc: Jani Nikula Suggested-by: 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/20210526220256.4097-2-anusha.srivatsa@intel.com commit 1ed9e566f3d7cbe0b363113249e14984d809e262 Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:15 2021 +0200 MAINTAINERS: update marvell,armada-3700-utmi-phy.yaml reference Changeset 6569d8386388 ("dt-bindings: phy: convert phy-mvebu-utmi to YAML schema") renamed: Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt to: Documentation/devicetree/bindings/phy/marvell,armada-3700-utmi-phy.yaml. Update its cross-reference accordingly. Fixes: 6569d8386388 ("dt-bindings: phy: convert phy-mvebu-utmi to YAML schema") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9342a88ed44726a1cc405470c834d746d4d0524c.1622648507.git.mchehab+huawei@kernel.org Signed-off-by: Vinod Koul commit 239566b032f3accb1b39c764697751857ad8bb37 Author: Joel Stanley Date: Wed May 26 14:42:20 2021 +0930 ARM: dts: aspeed: Set earlycon boot argument Most of the aspeed boards have copied the 'earlyprink' string in the bootargs. However, there's no earlyprink driver configured in the defconfigs, so this does nothing. A combination of setting stdout in the chosen node and adding earlycon to bootargs causes early serial output to appear early. This changes all boards to use this option. The console=ttyS4,115200 option is still required, as this is used by the run time uart driver. Signed-off-by: Joel Stanley Acked-by: Andrew Jeffery Acked-by: Alexander Filippov Link: https://lore.kernel.org/r/20210526051220.136432-1-joel@jms.id.au Signed-off-by: Joel Stanley commit d318da52658088cbde66263213dbc7debc1a9f1d Author: Steven Lee Date: Tue May 25 13:53:06 2021 +0800 ARM: dts: aspeed-g6: Add pinctrl settings AST2600 supports 2 SGPIO master interfaces and 2 SGPIO slave interfaces. Currently, only SGPIO master 1 and SGPIO slve 1 in the pinctrl dtsi. SGPIO master 2 and slave 2 should be added in pinctrl dtsi as well. Signed-off-by: Steven Lee Reviewed-by: Andrew Jeffery Reviewed-by: Linus Walleij Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20210525055308.31069-3-steven_lee@aspeedtech.com Signed-off-by: Joel Stanley commit 62af0ee94bfb9e626ed73b5890fc68c6e1651843 Author: Bart Van Assche Date: Sun May 23 19:54:57 2021 -0700 scsi: core: Change the type of the second argument of scsi_host_complete_all_commands() Allow the compiler to verify the type of the second argument passed to scsi_host_complete_all_commands(). Link: https://lore.kernel.org/r/20210524025457.11299-4-bvanassche@acm.org Cc: Hannes Reinecke Cc: John Garry Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 149d0e489e807f1e6dc265f975a793cea11ecbea Author: Bart Van Assche Date: Sun May 23 19:54:56 2021 -0700 scsi: core: Introduce enums for the SAM and host status codes Make it possible for the compiler to verify whether SAM and host status codes are used correctly. [mkp: resolve conflicts with Hannes' SCSI result series] Link: https://lore.kernel.org/r/20210524025457.11299-3-bvanassche@acm.org Cc: Hannes Reinecke Reviewed-by: John Garry Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 67a3156453859ceb40dc4448b7a6a99ea0ad27c7 Author: Rob Herring Date: Thu May 27 14:45:47 2021 -0500 of: Merge of_address_to_resource() and of_pci_address_to_resource() implementations of_address_to_resource() and of_pci_address_to_resource() are almost the same except the former takes an index and the latter takes a BAR number. Now that __of_get_address() can take either one, refactor the functions to use a common implementation. Cc: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527194547.1287934-5-robh@kernel.org commit c3c0dc75774b488770f33598109161040d291367 Author: Rob Herring Date: Thu May 27 14:45:46 2021 -0500 of: address: Use IS_ENABLED() for !CONFIG_PCI Convert address.c to use IS_ENABLED() instead of ifdefs for the public PCI functions. This simplifies the ifdefs in of_address.h. Cc: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527194547.1287934-4-robh@kernel.org commit 050a2c62dfc7d9ef457405f6ab4b715e9a2e32d7 Author: Rob Herring Date: Thu May 27 14:45:45 2021 -0500 of: Merge of_get_address() and of_get_pci_address() implementations of_get_address() and of_get_pci_address() are the same implementation except of_get_pci_address() takes the PCI BAR number rather than an index. Modify the of_get_address() implementation to work on either index or BAR and provide wrapper functions for the existing functions. Cc: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527194547.1287934-3-robh@kernel.org commit 00dcc7cf1a49f93efaa281cc85c88005995ecf63 Author: Rob Herring Date: Thu May 27 14:45:44 2021 -0500 PCI: Add empty stub for pci_register_io_range() Add an empty stub for pci_register_io_range() when !CONFIG_PCI. It's needed to convert of_pci_range_to_resource() to use IS_ENABLED(CONFIG_PCI). Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20210527194547.1287934-2-robh@kernel.org commit 12d55d3b5370448f6568d0031b5e401cc050c29e Author: Rob Herring Date: Thu May 27 14:38:41 2021 -0500 of: Move reserved memory private function declarations fdt_init_reserved_mem() and fdt_reserved_mem_save_node() are private to the DT code, so move there declarations to of_private.h. There's no need for the dummy functions as CONFIG_OF_RESERVED_MEM is always enabled for CONFIG_OF_EARLY_FLATTREE. Cc: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527193841.1284169-1-robh@kernel.org commit 1ee292a66e8199d234c8f8fa5cd3d2fef16fc97d Author: Rob Herring Date: Thu May 27 17:32:17 2021 -0500 of: Drop reserved mem dependency on DMA_DECLARE_COHERENT and DMA_CMA Reserved memory regions can be used for more than just DMA regions, so only enabling on DMA_DECLARE_COHERENT (via HAS_DMA) or DMA_CMA is wrong. This effectively doesn't matter except for the few cases arches select NO_DMA. At least, these users of RESERVEDMEM_OF_DECLARE depend on reserved memory support: arch/riscv/mm/init.c:RESERVEDMEM_OF_DECLARE(elfcorehdr, "linux,elfcorehdr", elfcore_hdr_setup); drivers/memory/tegra/tegra210-emc-table.c:RESERVEDMEM_OF_DECLARE(tegra210_emc_table, "nvidia,tegra210-emc-table", drivers/soc/fsl/qbman/bman_ccsr.c:RESERVEDMEM_OF_DECLARE(bman_fbpr, "fsl,bman-fbpr", bman_fbpr); drivers/soc/fsl/qbman/qman_ccsr.c:RESERVEDMEM_OF_DECLARE(qman_fqd, "fsl,qman-fqd", qman_fqd); drivers/soc/fsl/qbman/qman_ccsr.c:RESERVEDMEM_OF_DECLARE(qman_pfdr, "fsl,qman-pfdr", qman_pfdr); Let's simplify things and enable OF_RESERVED_MEM when OF_EARLY_FLATTREE is enabled. Cc: Christoph Hellwig Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210527223217.1572631-1-robh@kernel.org commit e84881785ea915e9bcff5bf4ed07f6749084ab66 Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:11 2021 +0200 dt-bindings: reset: update ti,sci-reset.yaml references Changeset 9a81b8cbc245 ("dt-bindings: reset: Convert ti,sci-reset to json schema") renamed: Documentation/devicetree/bindings/reset/ti,sci-reset.txt to: Documentation/devicetree/bindings/reset/ti,sci-reset.yaml. Update the cross-references accordingly. Fixes: 9a81b8cbc245 ("dt-bindings: reset: Convert ti,sci-reset to json schema") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e9b505d900d898c0d030deb168ab291206c203ee.1622648507.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit c601eef1e2588df9b8bfe00f6743df4f5f59ca46 Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:10 2021 +0200 dt-bindings: clock: update ti,sci-clk.yaml references Changeset a7dbfa6f3877 ("dt-bindings: clock: Convert ti,sci-clk to json schema") renamed: Documentation/devicetree/bindings/clock/ti,sci-clk.txt to: Documentation/devicetree/bindings/clock/ti,sci-clk.yaml. Update the cross-references accordingly. Fixes: a7dbfa6f3877 ("dt-bindings: clock: Convert ti,sci-clk to json schema") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0fae687366c09dfb510425b3c88316a727b27d6d.1622648507.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit f22145f1532b00f0132ed0fd5db3900c7f6b7944 Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:09 2021 +0200 dt-bindings: soc: ti: update sci-pm-domain.yaml references Changeset fda55c7256fe ("dt-bindings: soc: ti: Convert ti,sci-pm-domain to json schema") renamed: Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt to: Documentation/devicetree/bindings/soc/ti/sci-pm-domain.yaml. Update the cross-references accordingly. Fixes: fda55c7256fe ("dt-bindings: soc: ti: Convert ti,sci-pm-domain to json schema") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c03020ff281054c3bd2527c510659e05fec6f181.1622648507.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit b5205bb4de9e5ebaaaf20a7d0cf3bd1e98b42652 Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:08 2021 +0200 dt-bindings: power: supply: cpcap-charger: update cpcap-charger.yaml reference Changeset ce49e4282200 ("dt-bindings: power: supply: cpcap-charger: Convert to DT schema format") renamed: Documentation/devicetree/bindings/power/supply/cpcap-charger.txt to: Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml. Update its cross-reference accordingly. Fixes: ce49e4282200 ("dt-bindings: power: supply: cpcap-charger: Convert to DT schema format") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e9ce216362b7b9dcf84d707a3854247123440bf7.1622648507.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit 94dac76d4317ec652aa052cbe81db9f7a719da1d Author: Mauro Carvalho Chehab Date: Wed Jun 2 17:43:07 2021 +0200 dt-bindings: power: supply: cpcap-battery: update cpcap-battery.yaml reference Changeset 3c5be0454972 ("dt-bindings: power: supply: cpcap-battery: Convert to DT schema format") renamed: Documentation/devicetree/bindings/power/supply/cpcap-battery.txt to: Documentation/devicetree/bindings/power/supply/cpcap-battery.yaml. Update its cross-reference accordingly. Fixes: 3c5be0454972 ("dt-bindings: power: supply: cpcap-battery: Convert to DT schema format") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1d0c8d50db22d9e5540a42be874fcd39fb7fc2a7.1622648507.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit d6178370995fb4bac531e2e5c18163ce1731a97c Author: Sudeep Holla Date: Tue Jun 1 23:49:00 2021 +0100 dt-bindings: firmware: amlogic,scpi: Move arm,scpi-shmem to json schema "amlogic,meson-gxbb-scp-shmem" is already in the Generic on-chip SRAM binding though "amlogic,meson-gxbb-scpi" is missing which is now added. Also remove the whole old text format binding for the same. Cc: Rob Herring Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210601224904.917990-5-sudeep.holla@arm.com Signed-off-by: Rob Herring commit cba0c95b3b35737ac614c6de232261224c5088aa Author: Sudeep Holla Date: Tue Jun 1 23:48:59 2021 +0100 dt-bindings: firmware: juno,scpi: Move to sram.yaml json schema Commit a90b15e0ad72 ("Documentation: bindings: decouple juno specific details from generic binding") moved the juno specific bindings into separate file. Though there was no need for juno specific binding, it has been used unfortunately for whatever stupid reason I added it for. Let us move the same to the generic sram.yaml schema and remove the old text format binding. Cc: Rob Herring Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210601224904.917990-4-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 4041e842e2a96d12e311f27c6a7f0f446e45f0b5 Author: Sudeep Holla Date: Tue Jun 1 23:48:58 2021 +0100 dt-bindings: firmware: arm,scmi: Move arm,scmi-shmem to json schema Move the SRAM and shared memory binding for SCMI into the existing Generic on-chip SRAM. We just need to update the compatible list and there-by remove the whole old text format binding for the same. Cc: Rob Herring Cc: Cristian Marussi Cc: Florian Fainelli Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210601224904.917990-3-sudeep.holla@arm.com Signed-off-by: Rob Herring commit 7bf063a1cea9841a32507bb291b4539c5247ab45 Author: Sudeep Holla Date: Tue Jun 1 23:48:57 2021 +0100 dt-bindings: firmware: arm,scpi: Move arm,scp-shmem to json schema Move the SRAM and shared memory binding for SCPI into the existing Generic on-chip SRAM. We just need to update the compatible list and there-by remove the whole old text format binding for the same. Cc: Rob Herring Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20210601224904.917990-2-sudeep.holla@arm.com Signed-off-by: Rob Herring commit ed21e4cd291a6dd2fe62978b55b65a7e5d54f3a6 Author: Suman Anna Date: Thu May 20 18:43:48 2021 -0500 dt-bindings: mailbox: Convert omap-mailbox.txt binding to YAML Convert the current OMAP Mailbox binding from text format to YAML format/DT schema, and delete the legacy text binding file. The new YAML binding conversion is an updated version compared to the original. The descriptions for certain properties have been improved to provide more clarity. Constraints are added to the properties 'ti,mbox-num-users', 'ti,mbox-num-fifos' and 'interrupts'. The 'ti,hwmods' is a legacy property and is retained only to reflect the existing usage on some older OMAP2 and OMAP3 platforms. All the existing examples have also been updated to reflect the latest dts nodes (ti,hwmods removed from OMAP4 and AM33xx examples, and interrupts value updated for AM65x SoCs). Signed-off-by: Suman Anna [robh: Update ref in ti,omap-remoteproc.yaml] Link: https://lore.kernel.org/r/20210520234348.4479-1-s-anna@ti.com Signed-off-by: Rob Herring commit 50971e39154de296185b81a61eca25b3e2f55f3e Merge: 76039ac9095f5 f6d2bbdf3d96f Author: Jason Gunthorpe Date: Wed Jun 2 19:59:10 2021 -0300 Merge branch 'irdma' into rdma.git for-next Shiraz Saleem says: ==================== Add Intel Ethernet Protocol Driver for RDMA (irdma) The following patch series introduces a unified Intel Ethernet Protocol Driver for RDMA (irdma) for the X722 iWARP device and a new E810 device which supports iWARP and RoCEv2. The irdma module replaces the legacy i40iw module for X722 and extends the ABI already defined for i40iw. It is backward compatible with legacy X722 rdma-core provider (libi40iw). X722 and E810 are PCI network devices that are RDMA capable. The RDMA block of this parent device is represented via an auxiliary device exported to 'irdma' using the core auxiliary bus infrastructure recently added for 5.11 kernel. The parent PCI netdev drivers 'i40e' and 'ice' register auxiliary RDMA devices with private data/ops encapsulated that bind to auxiliary drivers registered in irdma module. Currently, default is RoCEv2 for E810. Runtime support for protocol switch to iWARP will be made available via devlink in a future patch. ==================== Link: https://lore.kernel.org/r/20210602205138.889-1-shiraz.saleem@intel.com Signed-off-by: Jason Gunthorpe * branch 'irdma': RDMA/irdma: Update MAINTAINERS file RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw RDMA/irdma: Add ABI definitions RDMA/irdma: Add dynamic tracing for CM RDMA/irdma: Add miscellaneous utility definitions RDMA/irdma: Add user/kernel shared libraries RDMA/irdma: Add RoCEv2 UD OP support RDMA/irdma: Implement device supported verb APIs RDMA/irdma: Add PBLE resource manager RDMA/irdma: Add connection manager RDMA/irdma: Add QoS definitions RDMA/irdma: Add privileged UDA queue implementation RDMA/irdma: Add HMC backing store setup functions RDMA/irdma: Implement HW Admin Queue OPs RDMA/irdma: Implement device initialization definitions RDMA/irdma: Register auxiliary driver and implement private channel OPs i40e: Register auxiliary devices to provide RDMA i40e: Prep i40e header for aux bus conversion ice: Register auxiliary device to provide RDMA ice: Implement iidc operations ice: Initialize RDMA support iidc: Introduce iidc.h i40e: Replace one-element array with flexible-array member commit f6d2bbdf3d96fd7cae05fe1f030bdbf352033188 Author: Shiraz Saleem Date: Wed Jun 2 15:51:38 2021 -0500 RDMA/irdma: Update MAINTAINERS file Add maintainer entry for irdma driver. Link: https://lore.kernel.org/r/20210602205138.889-17-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit fa0cf568fd76550c1ddb806c03a65a1a4a1ea909 Author: Shiraz Saleem Date: Wed Jun 2 15:51:37 2021 -0500 RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw Add Kconfig and Makefile to build irdma driver. Remove i40iw driver and add an alias in irdma. Remove legacy exported symbols i40e_register_client and i40e_unregister_client from i40e as they are no longer used. irdma is the replacement driver that supports X722. Link: https://lore.kernel.org/r/20210602205138.889-16-shiraz.saleem@intel.com Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 8314b6732ae4e600bb933e108f96ce0176acb09c Author: Roberto Sassu Date: Tue Jun 1 10:23:38 2021 +0200 ima: Define new template fields xattrnames, xattrlengths and xattrvalues This patch defines the new template fields xattrnames, xattrlengths and xattrvalues, which contain respectively a list of xattr names (strings, separated by |), lengths (u32, hex) and values (hex). If an xattr is not present, the name and length are not displayed in the measurement list. Reported-by: kernel test robot (Missing prototype def) Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 48d6b3336a9fc570b48126c4409abf94dd5c5e8a Author: Mustafa Ismail Date: Wed Jun 2 15:51:36 2021 -0500 RDMA/irdma: Add ABI definitions Add ABI definitions for irdma. Link: https://lore.kernel.org/r/20210602205138.889-15-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit ddae5d62f3db22ac462f5aed5b71fc67cb35e329 Author: Michael J. Ruhl Date: Wed Jun 2 15:51:35 2021 -0500 RDMA/irdma: Add dynamic tracing for CM Add dynamic tracing functionality to debug connection management issues. Link: https://lore.kernel.org/r/20210602205138.889-14-shiraz.saleem@intel.com Signed-off-by: "Michael J. Ruhl" Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 915cc7ac0f8e2a23675ee896e87f17c7d3c47089 Author: Mustafa Ismail Date: Wed Jun 2 15:51:34 2021 -0500 RDMA/irdma: Add miscellaneous utility definitions Add miscellaneous utility functions and headers. Link: https://lore.kernel.org/r/20210602205138.889-13-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 551c46edc7690c1656fbe44ef770ec4e6c004215 Author: Mustafa Ismail Date: Wed Jun 2 15:51:33 2021 -0500 RDMA/irdma: Add user/kernel shared libraries Building the WQE descriptors for different verb operations are similar in kernel and user-space. Add these shared libraries. Link: https://lore.kernel.org/r/20210602205138.889-12-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit dd90451fac23be5adcee8627eb65e7d228cd03f6 Author: Mustafa Ismail Date: Wed Jun 2 15:51:32 2021 -0500 RDMA/irdma: Add RoCEv2 UD OP support Add the header, data structures and functions to populate the WQE descriptors and issue the Control QP commands that support RoCEv2 UD operations. Link: https://lore.kernel.org/r/20210602205138.889-11-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit b48c24c2d710cf34810c555dcef883a3d35a9c08 Author: Mustafa Ismail Date: Wed Jun 2 15:51:31 2021 -0500 RDMA/irdma: Implement device supported verb APIs Implement device supported verb APIs. The supported APIs vary based on the underlying transport the ibdev is registered as (i.e. iWARP or RoCEv2). Link: https://lore.kernel.org/r/20210602205138.889-10-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit e8c4dbc2fcacf5a7468d312168bb120c27c38b32 Author: Mustafa Ismail Date: Wed Jun 2 15:51:30 2021 -0500 RDMA/irdma: Add PBLE resource manager Implement a Physical Buffer List Entry (PBLE) resource manager to manage a pool of PBLE HMC resource objects. Link: https://lore.kernel.org/r/20210602205138.889-9-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 146b9756f14c04894226fb97e2f102f217139c27 Author: Mustafa Ismail Date: Wed Jun 2 15:51:29 2021 -0500 RDMA/irdma: Add connection manager Add connection management (CM) implementation for iWARP including accept, reject, connect, create_listen, destroy_listen and CM utility functions Link: https://lore.kernel.org/r/20210602205138.889-8-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 3ae331c75128fc65abc5a656eeb22d8a7803762d Author: Mustafa Ismail Date: Wed Jun 2 15:51:28 2021 -0500 RDMA/irdma: Add QoS definitions Add definitions for managing the RDMA HW work scheduler (WS) tree. A WS node is created via a control QP operation with the bandwidth allocation, arbitration scheme, and traffic class of the QP specified. The Qset handle returned associates the QoS parameters for the QP. The Qset is registered with the LAN and an equivalent node is created in the LAN packet scheduler tree. Link: https://lore.kernel.org/r/20210602205138.889-7-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit a3a06db504d30d46875eb4ebc89568dde841d64d Author: Mustafa Ismail Date: Wed Jun 2 15:51:27 2021 -0500 RDMA/irdma: Add privileged UDA queue implementation Implement privileged UDA queues to handle iWARP connection packets and receive exceptions. Link: https://lore.kernel.org/r/20210602205138.889-6-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit d1850c005aee2254205301279a67316a649c712a Author: Mustafa Ismail Date: Wed Jun 2 15:51:26 2021 -0500 RDMA/irdma: Add HMC backing store setup functions HW uses host memory as a backing store for a number of protocol context objects and queue state tracking. The Host Memory Cache (HMC) is a component responsible for managing these objects stored in host memory. Add the functions and data structures to manage the allocation of backing pages used by the HMC for the various objects Link: https://lore.kernel.org/r/20210602205138.889-5-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 3f49d684256963d3f27dfb9d9ff228e2255be78d Author: Mustafa Ismail Date: Wed Jun 2 15:51:25 2021 -0500 RDMA/irdma: Implement HW Admin Queue OPs The driver posts privileged commands to the HW Admin Queue (Control QP or CQP) to request administrative actions from the HW. Implement create/destroy of CQP and the supporting functions, data structures and headers to handle the different CQP commands Link: https://lore.kernel.org/r/20210602205138.889-4-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 44d9e52977a1b90b0db1c7f8b197c218e9226520 Author: Mustafa Ismail Date: Wed Jun 2 15:51:24 2021 -0500 RDMA/irdma: Implement device initialization definitions Implement device initialization routines, interrupt set-up, and allocate object bit-map tracking structures. Also, add device specific attributes and register definitions. Link: https://lore.kernel.org/r/20210602205138.889-3-shiraz.saleem@intel.com [flexible array transformation] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 8498a30e1b9484629598cce97d200f517445e26b Author: Mustafa Ismail Date: Wed Jun 2 15:51:23 2021 -0500 RDMA/irdma: Register auxiliary driver and implement private channel OPs Register auxiliary drivers which can attach to auxiliary RDMA devices from Intel PCI netdev drivers i40e and ice. Implement the private channel ops, and register net notifiers. Link: https://lore.kernel.org/r/20210602205138.889-2-shiraz.saleem@intel.com [flexible array transformation] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 977ec4ddf0b75b30afa443cf71ae80e20f501b15 Author: Dave Chinner Date: Wed Jun 2 15:00:38 2021 -0700 xfs: don't take a spinlock unconditionally in the DIO fastpath Because this happens at high thread counts on high IOPS devices doing mixed read/write AIO-DIO to a single file at about a million iops: 64.09% 0.21% [kernel] [k] io_submit_one - 63.87% io_submit_one - 44.33% aio_write - 42.70% xfs_file_write_iter - 41.32% xfs_file_dio_write_aligned - 25.51% xfs_file_write_checks - 21.60% _raw_spin_lock - 21.59% do_raw_spin_lock - 19.70% __pv_queued_spin_lock_slowpath This also happens of the IO completion IO path: 22.89% 0.69% [kernel] [k] xfs_dio_write_end_io - 22.49% xfs_dio_write_end_io - 21.79% _raw_spin_lock - 20.97% do_raw_spin_lock - 20.10% __pv_queued_spin_lock_slowpath IOWs, fio is burning ~14 whole CPUs on this spin lock. So, do an unlocked check against inode size first, then if we are at/beyond EOF, take the spinlock and recheck. This makes the spinlock disappear from the overwrite fastpath. I'd like to report that fixing this makes things go faster. It doesn't - it just exposes the the XFS_ILOCK as the next severe contention point doing extent mapping lookups, and that now burns all the 14 CPUs this spinlock was burning. Signed-off-by: Dave Chinner Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5a981e4ea8ff8062e7c7ea8fc4a1565e4820a08b Author: Christoph Hellwig Date: Wed Jun 2 14:58:59 2021 -0700 xfs: mark xfs_bmap_set_attrforkoff static xfs_bmap_set_attrforkoff is only used inside of xfs_bmap.c, so mark it static. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9673261c32dc2f30863b803374b726a72d16b07c Author: Jiapeng Chong Date: Wed Jun 2 14:56:29 2021 -0700 xfs: Remove redundant assignment to busy Variable busy is set to false, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: fs/xfs/libxfs/xfs_alloc.c:1679:2: warning: Value stored to 'busy' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5f7fd75086203a8a4dd3e518976e52bcf24e8b22 Author: Shaokun Zhang Date: Wed Jun 2 14:54:09 2021 -0700 xfs: sort variable alphabetically to avoid repeated declaration Variable 'xfs_agf_buf_ops', 'xfs_agi_buf_ops', 'xfs_dquot_buf_ops' and 'xfs_symlink_buf_ops' are declared twice, so sort these variables alphabetically and remove the repeated declaration. Cc: "Darrick J. Wong" Signed-off-by: Shaokun Zhang Reviewed-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit bc1bb416bbb9203e250f5c49aaf1d11b5d9c8adb Author: Al Viro Date: Mon May 31 00:32:44 2021 -0400 generic_perform_write()/iomap_write_actor(): saner logics for short copy if we run into a short copy and ->write_end() refuses to advance at all, use the amount we'd managed to copy for the next iteration to handle. Signed-off-by: Al Viro commit 9067931236651c8bde847d17a2f862d052e672b7 Author: Al Viro Date: Sun May 30 22:53:43 2021 -0400 ntfs_copy_from_user_iter(): don't bother with copying iov_iter Advance the original, let the caller revert if it needs to. Don't mess with iov_iter_single_seg_count() in the caller - if we got a (non-zero) short copy, use the amount actually copied for the next pass, limit it to "up to the end of page" if nothing got copied at all. Originally fault-in only read the first iovec; back then it used to make sense to limit to the just one iovec for the pass after short copy. These days it's no long true. Signed-off-by: Al Viro commit 270d47dc1fc4756a0158778084a236bc83c156d2 Merge: 53c7bb553056d b62767e7bab3a Author: David S. Miller Date: Wed Jun 2 14:08:37 2021 -0700 Merge branch 'devlink-rate-objects' Dmytro Linkin says: ==================== devlink: rate objects API Resending without RFC. Currently kernel provides a way to change tx rate of single VF in switchdev mode via tc-police action. When lots of VFs are configured management of theirs rates becomes non-trivial task and some grouping mechanism is required. Implementing such grouping in tc-police will bring flow related limitations and unwanted complications, like: - tc-police is a policer and there is a user request for a traffic shaper, so shared tc-police action is not suitable; - flows requires net device to be placed on, means "groups" wouldn't have net device instance itself. Taking into the account previous point was reviewed a sollution, when representor have a policer and the driver use a shaper if qdisc contains group of VFs - such approach ugly, compilated and misleading; - TC is ingress only, while configuring "other" side of the wire looks more like a "real" picture where shaping is outside of the steering world, similar to "ip link" command; According to that devlink is the most appropriate place. This series introduces devlink API for managing tx rate of single devlink port or of a group by invoking callbacks (see below) of corresponding driver. Also devlink port or a group can be added to the parent group, where driver responsible to handle rates of a group elements. To achieve all of that new rate object is added. It can be one of the two types: - leaf - represents a single devlink port; created/destroyed by the driver and bound to the devlink port. As example, some driver may create leaf rate object for every devlink port associated with VF. Since leaf have 1to1 mapping to it's devlink port, in user space it is referred as pci//; - node - represents a group of rate objects; created/deleted by request from the userspace; initially empty (no rate objects added). In userspace it is referred as pci//, where node name can be any, except decimal number, to avoid collisions with leafs. devlink_ops extended with following callbacks: - rate_{leaf|node}_tx_{share|max}_set - rate_node_{new|del} - rate_{leaf|node}_parent_set KAPI provides: - creation/destruction of the leaf rate object associated with devlink port - destruction of rate nodes to allow a vendor driver to free allocated resources on driver removal or due to the other reasons when nodes destruction required UAPI provides: - dumping all or single rate objects - setting tx_{share|max} of rate object of any type - creating/deleting node rate object - setting/unsetting parent of any rate object Added devlink rate object support for netdevsim driver Issues/open questions: - Does user need DEVLINK_CMD_RATE_DEL_ALL_CHILD command to clean all children of particular parent node? For example: $ devlink port function rate flush netdevsim/netdevsim10/group - priv pointer passed to the callbacks is a source of bugs; in leaf case driver can embed rate object into internal structure and use container_of() on it; in node case it cannot be done since nodes are created from userspace v1->v2: - fixed kernel-doc for devlink_rate_leaf_{create|destroy}() - s/func/function/ for all devlink port command occurences v2->v3: - devlink: - added devlink_rate_nodes_destroy() function - netdevsim: - added call of devlink_rate_nodes_destroy() function ==================== Signed-off-by: David S. Miller commit b62767e7bab3a397166a2fa36b409e5e2859f100 Author: Dmytro Linkin Date: Wed Jun 2 15:17:31 2021 +0300 Documentation: devlink rate objects Add devlink rate objects section at devlink port documentation. Add devlink rate support info at netdevsim devlink documentation. Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 1a9c0482f5557f5906294d3327a981bf842ba436 Author: Dmytro Linkin Date: Wed Jun 2 15:17:30 2021 +0300 selftest: netdevsim: Add devlink rate grouping test Test verifies that netdevsim correctly implements devlink ops callbacks that set node as a parent of devlink leaf or node rate object. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit f3d101b485ca2c831088d72878fe6e7416676cb8 Author: Dmytro Linkin Date: Wed Jun 2 15:17:29 2021 +0300 netdevsim: Allow setting parent node of rate objects Implement new devlink ops that allow setting rate node as a parent for devlink port (leaf) or another devlink node through devlink API. Expose parent names to netdevsim debugfs in read only mode. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d7555984507822458b32a6405881038241d140be Author: Dmytro Linkin Date: Wed Jun 2 15:17:28 2021 +0300 devlink: Allow setting parent node of rate objects Refactor DEVLINK_CMD_RATE_{GET|SET} command handlers to support setting a node as a parent for another rate object (leaf or node) by means of new attribute DEVLINK_ATTR_RATE_PARENT_NODE_NAME. Extend devlink ops with new callbacks rate_{leaf|node}_parent_set() to set node as a parent for rate object to allow supporting drivers to implement rate grouping through devlink. Driver implementations are allowed to support leafs or node children only. Invoking callback with NULL as parent should be threated by the driver as unset parent action. Extend rate object struct with reference counter to disallow deleting a node with any child pointing to it. User should unset parent for the child explicitly. Example: $ devlink port function rate add netdevsim/netdevsim10/group1 $ devlink port function rate add netdevsim/netdevsim10/group2 $ devlink port function rate set netdevsim/netdevsim10/group1 parent group2 $ devlink port function rate show netdevsim/netdevsim10/group1 netdevsim/netdevsim10/group1: type node parent group2 $ devlink port function rate set netdevsim/netdevsim10/group1 noparent Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 413ee943d788610b0675cb343fac5a23d7877613 Author: Dmytro Linkin Date: Wed Jun 2 15:17:27 2021 +0300 selftest: netdevsim: Add devlink rate nodes test Test verifies that it is possible to create, delete and set min/max tx rate of devlink rate node on netdevsim VF. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 885226f5680e099ec54564332ea85412372b4958 Author: Dmytro Linkin Date: Wed Jun 2 15:17:26 2021 +0300 netdevsim: Implement support for devlink rate nodes Implement new devlink ops that allow creation, deletion and setting of shared/max tx rate of devlink rate nodes through devlink API. Expose rate node and it's tx rates to netdevsim debugfs. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit a8ecb93ef03de4c59fb6289f99bc9616a852c917 Author: Dmytro Linkin Date: Wed Jun 2 15:17:25 2021 +0300 devlink: Introduce rate nodes Implement support for DEVLINK_CMD_RATE_{NEW|DEL} commands that are used to create and delete devlink rate nodes. Add new attribute DEVLINK_ATTR_RATE_NODE_NAME that specify node name string. The node name is an alphanumeric identifier. No valid node name can be a devlink port index, eg. decimal number. Extend devlink ops with new callbacks rate_node_{new|del}() and rate_node_tx_{share|max}_set() to allow supporting drivers to implement ports rate grouping and setting tx rate of rate nodes through devlink. Expose devlink_rate_nodes_destroy() function to allow vendor driver do proper cleanup of internally allocated resources for the nodes if the driver goes down or due to any other reasons which requires nodes to be destroyed. Disallow moving device from switchdev to legacy mode if any node exists on that device. User must explicitly delete nodes before switching mode. Example: $ devlink port function rate add netdevsim/netdevsim10/group1 $ devlink port function rate set netdevsim/netdevsim10/group1 \ tx_share 10mbit tx_max 100mbit Add + set command can be combined: $ devlink port function rate add netdevsim/netdevsim10/group1 \ tx_share 10mbit tx_max 100mbit $ devlink port function rate show netdevsim/netdevsim10/group1 netdevsim/netdevsim10/group1: type node tx_share 10mbit tx_max 100mbit $ devlink port function rate del netdevsim/netdevsim10/group1 Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 31f0723336063f20ce81cc16ca4775979ff0a26b Author: Dmytro Linkin Date: Wed Jun 2 15:17:24 2021 +0300 selftest: netdevsim: Add devlink port shared/max tx rate test Test verifies that netdevsim VFs can set and retrieve shared/max tx rate through new devlink API. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 605c4f8f199b8374cf01624822aa0b5f2c09d1c7 Author: Dmytro Linkin Date: Wed Jun 2 15:17:23 2021 +0300 netdevsim: Implement devlink rate leafs tx rate support Implement new devlink ops that allow shared and max tx rate control for devlink port rate objects (leafs) through devlink API. Expose rate values of VF ports to netdevsim debugfs. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 1897db2ec3109eb1dd07b357c95c5e03d54e41b9 Author: Dmytro Linkin Date: Wed Jun 2 15:17:22 2021 +0300 devlink: Allow setting tx rate for devlink rate leaf objects Implement support for DEVLINK_CMD_RATE_SET command with new attributes DEVLINK_ATTR_RATE_TX_{SHARE|MAX} that are used to set devlink rate shared/max tx rate values. Extend devlink ops with new callbacks rate_leaf_tx_{share|max}_set() to allow supporting drivers to implement rate control through devlink. New attributes are optional. Driver implementations are allowed to support either or both of them. Shared rate example: $ devlink port function rate set netdevsim/netdevsim10/0 tx_share 10mbit $ devlink port function rate show netdevsim/netdevsim10/0 netdevsim/netdevsim10/0: type leaf tx_share 10mbit Max rate example: $ devlink port function rate set netdevsim/netdevsim10/0 tx_max 100mbit $ devlink port function rate show netdevsim/netdevsim10/0 netdevsim/netdevsim10/0: type leaf tx_max 100mbit Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit a27d8e352bf252eb44b04c9e628a8d759956bdd2 Author: Dmytro Linkin Date: Wed Jun 2 15:17:21 2021 +0300 selftest: netdevsim: Add devlink rate test Test verifies that all netdevsim VF ports have rate leaf object created by default. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 885dfe121b3862d0cc1de98a69f1ca37d18e3495 Author: Dmytro Linkin Date: Wed Jun 2 15:17:20 2021 +0300 netdevsim: Register devlink rate leaf objects per VF Register devlink rate leaf objects per VF. Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 4677efc486e1872f62d4632c50f7183f82296fa6 Author: Dmytro Linkin Date: Wed Jun 2 15:17:19 2021 +0300 devlink: Introduce rate object Allow registering rate object for devlink ports with dedicated devlink_rate_leaf_{create|destroy}() API. Implement new netlink DEVLINK_CMD_RATE_GET command that is used to retrieve rate object info. Add new DEVLINK_CMD_RATE_{NEW|DEL} commands that are used for notifications when creating/deleting leaf rate object. Rate API is intended to be used for rate limiting of individual devlink ports (leafs) and their aggregates (nodes). Example: $ devlink port show pci/0000:03:00.0/0 pci/0000:03:00.0/1 $ devlink port function rate show pci/0000:03:00.0/0: type leaf pci/0000:03:00.0/1: type leaf Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 160dc373eead2143ea51b7f8e2a6bf1e383f24f8 Author: Dmytro Linkin Date: Wed Jun 2 15:17:18 2021 +0300 netdevsim: Implement legacy/switchdev mode for VFs Implement callbacks to set/get eswitch mode value. Add helpers to check current mode. Instantiate VFs' net devices and devlink ports on switchdev enabling and remove them on legacy enabling. Changing number of VFs while in switchdev mode triggers VFs creation/deletion. Also disable NDO API callback to set VF rate, since it's legacy API. Switchdev API to set VF rate will be implemented in one of the next patches. Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 92ba1f29e6e2f16eb93a0a2c7c01985920b89222 Author: Dmytro Linkin Date: Wed Jun 2 15:17:17 2021 +0300 netdevsim: Implement VFs Allow creation of netdevsim ports for VFs along with allocations of corresponding net devices and devlink ports. Add enums and helpers to distinguish PFs' ports from VFs' ports. Ports creation/deletion debugfs API intended to be used with physical ports only. VFs instantiation will be done in one of the next patches. Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 814b9ce65ec3b53404eeda7a11e1abb4af8d7df3 Author: Dmytro Linkin Date: Wed Jun 2 15:17:16 2021 +0300 netdevsim: Implement port types and indexing Define type of ports, which netdevsim driver currently operates with as PF. Define new port type - VF, which will be implemented in following patches. Add helper functions to distinguish them. Add helper function to get VF index from port index. Add port indexing logic where PFs' indexes starts from 0, VFs' - from NSIM_DEV_VF_PORT_INDEX_BASE. All ports uses same index pool, which means that PF port may be created with index from VFs' indexes range. Maximum number of VFs, which the driver can allocate, is limited by UINT_MAX - BASE. Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 32ac15d8fd804615e79e365d6825da2a371f91f9 Author: Dmytro Linkin Date: Wed Jun 2 15:17:15 2021 +0300 netdevsim: Disable VFs on nsim_dev_reload_destroy() call Move VFs disabling from device release() to nsim_dev_reload_destroy() to make VFs disabling and ports removal simultaneous. This is a requirement for VFs ports implemented in next patches. Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d395381909a32060927e3f90116f938379be0636 Author: Dmytro Linkin Date: Wed Jun 2 15:17:14 2021 +0300 netdevsim: Add max_vfs to bus_dev Currently there is no limit to the number of VFs netdevsim can enable. In a real systems this value exist and used by the driver. Fore example, some features might need to consider this value when allocating memory. Expose max_vfs variable to debugfs as configurable resource. If are VFs configured (num_vfs != 0) then changing of max_vfs not allowed. Co-developed-by: Yuval Avnery Signed-off-by: Yuval Avnery Signed-off-by: Dmytro Linkin Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 4071883fd8f386fa070cf82b30909ea5ddd7dcf9 Author: Drew Fustini Date: Mon May 31 00:04:18 2021 -0700 dt-bindings: add StarFive Technology Co. Ltd. Add vendor prefix for StarFive Technology Co. Ltd [1]. StarFive was formed in 2018 and has now produced their first SoC, the JH7100, which contains 64-bit RISC-V cores [2]. It used in the BeagleV Starlight [3]. [1] https://starfivetech.com/site/company [2] https://github.com/starfive-tech/beaglev_doc [3] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20210531070415.269667-1-drew@beagleboard.org Signed-off-by: Rob Herring commit 1ae5a3d52f95247b5233e0e3c01a198883f7ab3e Author: Krzysztof Kozlowski Date: Wed May 26 12:27:50 2021 -0400 dt-bindings: arm: intel,keembay: limit the dtschema to root node The check for the board compatible should be limited only to the root node. Any other nodes with such compatible are not part of this schema and should not match. Signed-off-by: Krzysztof Kozlowski Acked-by: Daniele Alessandrelli Link: https://lore.kernel.org/r/20210526162750.135139-1-krzysztof.kozlowski@canonical.com Signed-off-by: Rob Herring commit 652f2efa93c446cbf439988e77a5c788c0fb5ff4 Author: Rob Herring Date: Wed May 26 13:14:11 2021 -0500 dt-bindings: net: Convert MDIO mux bindings to DT schema Convert the common MDIO mux bindings to DT schema. Drop the example from mdio-mux.yaml as mdio-mux-gpio.yaml has the same one. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210526181411.2888516-1-robh@kernel.org Signed-off-by: Rob Herring commit e9ab77a4f2aa1de5982a041ffbc1facc96ef0d40 Author: Jonathan Cameron Date: Sat May 22 12:29:08 2021 +0100 dt-bindings: iio: multiplexer: Convert io-channel-mux bindings to DT schema Straight conversion of the txt file using the mux-consumer.yaml binding now that is available. Signed-off-by: Jonathan Cameron Cc: Peter Rosin [robh: Drop quotes and $ref for mux-controls] Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210522112908.1611389-3-jic23@kernel.org commit 53c7bb553056d3a6713ea413576c6d1b0c3f0f61 Merge: 5debe0b30bac2 3c863c300c095 Author: David S. Miller Date: Wed Jun 2 14:04:42 2021 -0700 Merge branch 'nfp-ct-offload' Simon Horman says: ==================== Introduce conntrack offloading to the nfp driver Louis Peens says: This is the first in a series of patches to offload conntrack to the nfp. The approach followed is to flatten out three different flow rules into a single offloaded flow. The three different flows are: 1) The rule sending the packet to conntrack (pre_ct) 2) The rule matching on +trk+est after a packet has been through conntrack. (post_ct) 3) The rule received via callback from the netfilter (nft) In order to offload a flow we need a combination of all three flows, but they could be added/deleted at different times and in different order. To solve this we save potential offloadable CT flows in the driver, and every time we receive a callback we check against these saved flows for valid merges. Once we have a valid combination of all three flows this will be offloaded to the NFP. This is demonstrated in the diagram below. +-------------+ +----------+ | pre_ct flow +--------+ | nft flow | +-------------+ v +------+---+ +----------+ | | tc_merge +--------+ | +----------+ v v +--------------+ ^ +-------------+ | post_ct flow +-------+ +---+nft_tc merge | +--------------+ | +-------------+ | | | v Offload to nfp This series is only up to the point of the pre_ct and post_ct merges into the tc_merge. Follow up series will continue to add the nft flows and merging of these flows with the result of the pre_ct and post_ct merged flows. Changes since v2: - nfp: flower-ct: add zone table entry when handling pre/post_ct flows Fixed another docstring. Should finally have the patch check environment properly configured now to avoid more of these. - nfp: flower-ct: add tc merge functionality Fixed warning found by "kernel test robot " Added code comment explaining chain_index comparison Changes since v1: - nfp: flower-ct: add ct zone table Fixed unused variable compile warning Fixed missing colon in struct description ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3c863c300c0959aeeef13f797c85ea58f6b291c6 Author: Louis Peens Date: Wed Jun 2 13:59:52 2021 +0200 nfp: flower-ct: add tc merge functionality Add merging of pre/post_ct flow rules into the tc_merge table. Pre_ct flows needs to be merge with post_ct flows and vice versa. This needs to be done for all flows in the same zone table, as well as with the wc_zone_table, which is for flows masking out ct_zone info. Cleanup is happening when all the tables are cleared up and prints a warning traceback as this is not expected in the final version. At this point we are not actually returning success for the offload, so we do not get any delete requests for flows, so we can't delete them that way yet. This means that cleanup happens in what would usually be an exception path. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit f7ae12e2f95dc5bed1a0c6cfd73cf6690d465855 Author: Louis Peens Date: Wed Jun 2 13:59:51 2021 +0200 nfp: flower-ct: add tc_merge_tb Add the table required to store the merge result of pre_ct and post_ct flows. This is just the initial setup and teardown of the table, the implementation will be in follow-up patches. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit fa81d6d214a4202b539a815d6c9d6b3c8e70ca95 Author: Louis Peens Date: Wed Jun 2 13:59:50 2021 +0200 nfp: flower-ct: add a table to map flow cookies to ct flows Add a hashtable which contains entries to map flow cookies to ct flow entries. Currently the entries are added and not used, but follow-up patches will use this for stats updates and flow deletes. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 072c089ca536a87591a21741ffa972ae7626c96a Author: Louis Peens Date: Wed Jun 2 13:59:49 2021 +0200 nfp: flower-ct: add nfp_fl_ct_flow_entries This commit starts adding the structures and lists that will be used in follow up commits to enable offloading of conntrack. Some stub functions are also introduced as placeholders by this commit. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit bd0fe7f96a3c44c6ed0ab645abbad8b43a8cc5c1 Author: Louis Peens Date: Wed Jun 2 13:59:48 2021 +0200 nfp: flower-ct: add zone table entry when handling pre/post_ct flows Start populating the pre/post_ct handler functions. Add a zone entry to the zone table, based on the zone information from the flow. In the case of a post_ct flow which has a wildcarded match on the zone create a special entry. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit e236e4849b583d0e77b856417ce2f03b1d6b31db Author: Louis Peens Date: Wed Jun 2 13:59:47 2021 +0200 nfp: flower-ct: add ct zone table Add initial zone table to nfp_flower_priv. This table will be used to store all the information required to offload conntrack. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit c8b034fbeba55847be999595d63ad7d04f06c141 Author: Louis Peens Date: Wed Jun 2 13:59:46 2021 +0200 nfp: flower-ct: add pre and post ct checks Add checks to see if a flow is a conntrack flow we can potentially handle. Just stub out the handling the different conntrack flows. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 2bda0a5e3bf8924cc6dc5955df610defa10d70e7 Author: Louis Peens Date: Wed Jun 2 13:59:45 2021 +0200 nfp: flower: move non-zero chain check This is in preparation for conntrack offload support which makes used of different chains. Add explicit checks for conntrack and non-zero chains in the add_offload path. Signed-off-by: Louis Peens Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 5debe0b30bac2b921722d7419f02acee6f02fa71 Author: Zheng Yongjun Date: Wed Jun 2 14:55:44 2021 +0800 decnet: Fix spelling mistakes Fix some spelling mistakes in comments: thats ==> that's serivce ==> service varience ==> variance Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit fe6c0262bdf96623e4b088d4bd32a9454a37eb3a Author: Zheng Yongjun Date: Wed Jun 2 14:55:08 2021 +0800 rxrpc: Fix a typo targetted ==> targeted Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 91641b79e1e1538eed5dac1a00770c2b94e07a33 Author: Zheng Yongjun Date: Wed Jun 2 14:54:58 2021 +0800 Bluetooth: Fix spelling mistakes Fix some spelling mistakes in comments: udpate ==> update retreive ==> retrieve accidentially ==> accidentally correspondig ==> corresponding adddress ==> address estabilish ==> establish commplete ==> complete Unkown ==> Unknown triggerd ==> triggered transtion ==> transition Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 8ab1784df65176ad24b6d1e1376b8dd53ce2b695 Author: Zheng Yongjun Date: Wed Jun 2 14:54:42 2021 +0800 9p/trans_virtio: Fix spelling mistakes reseting ==> resetting alloced ==> allocated accomodate ==> accommodate Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit b676c7f1c383390bfd940582e493b374541f2dc2 Author: Zheng Yongjun Date: Wed Jun 2 14:54:28 2021 +0800 ethtool: Fix a typo atribute ==> attribute Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 0cb7af474e0dbb2f500c67aa62b6db9fafa74de2 Author: Cristian Marussi Date: Tue Jun 1 11:24:17 2021 +0100 firmware: arm_scmi: Reset Rx buffer to max size during async commands During an async commands execution the Rx buffer length is at first set to max_msg_sz when the synchronous part of the command is first sent. However once the synchronous part completes the transport layer waits for the delayed response which will be processed using the same xfer descriptor initially allocated. Since synchronous response received at the end of the xfer will shrink the Rx buffer length to the effective payload response length, it needs to be reset again. Raise the Rx buffer length again to max_msg_sz before fetching the delayed response to ensure full response is read correctly from the shared memory. Link: https://lore.kernel.org/r/20210601102421.26581-2-cristian.marussi@arm.com Fixes: 58ecdf03dbb9 ("firmware: arm_scmi: Add support for asynchronous commands and delayed response") Signed-off-by: Cristian Marussi [sudeep.holla: moved reset to scmi_handle_response as it could race with do_xfer_with_response] Signed-off-by: Sudeep Holla commit 7f0e869c4e3902abc44ae6a9c9fc4fba6867408e Author: zhang kai Date: Wed Jun 2 09:50:39 2021 +0800 sit: replace 68 with micro IPV4_MIN_MTU Use meaningfull micro IPV4_MIN_MTU Signed-off-by: zhang kai Signed-off-by: David S. Miller commit 020577f879be736bc87e1f48dfad7220923401c0 Author: Sven Eckelmann Date: Wed Jun 2 21:54:30 2021 +0200 batman-adv: Drop reduntant batadv interface check If batadv_hardif_enable_interface is called then its called from its callback ndo_add_slave. It is therefore not necessary to check if it is a batadv interface. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 170258ce1c71dc4e03d5cb92b5f03cfb01941514 Author: Sven Eckelmann Date: Tue Jun 1 23:52:48 2021 +0200 batman-adv: Don't manually reattach hard-interface The batadv_hardif_enable_interface is now only called from the callback ndo_add_slave. This callback is only used by do_set_master in the rtnetlink code which only does two things: 1. remove the net_device from its old master 2. add the net_device to its new batadv master The code to replicate the first step in batman-adv is therefore unused since the sysfs code was dropped. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit fa205602d46e0b66c0c90672bce8b36e5de449df Author: Sven Eckelmann Date: Tue Jun 1 23:50:35 2021 +0200 batman-adv: Avoid name based attaching of hard interfaces The sysfs code for the batman-adv/mesh_iface file was receiving a string of the batadv interface. This interface name was then provided to the code which shared sysfs+rtnetlink code for attaching an hard-interface to an batadv interface. The rtnetlink code was also using the (extracted) interface name from the ndo_add_slave callback to increase the shared code - even when it would have been more efficient to use the provided net_device object directly instead of searching it again (based on its name) in batadv_hardif_enable_interface. But this indirect handling is no longer necessary because the sysfs code was dropped. There is now only a single code path which is using batadv_hardif_enable_interface. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit bf6b260b8a9654db99761cde74c6b16356b9b441 Author: Sven Eckelmann Date: Tue Jun 1 23:40:16 2021 +0200 batman-adv: Drop implicit creation of batadv net_devices The sysfs code in batman-adv was could create a new batadv interfaces on demand when a string (interface name) was written to the batman-adv/mesh_iface file. But the code no longer exists in the current batman-adv codebase. The helper code to implement this behavior must be considered as unused and can be dropped. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d377f415dddc18b33c88dcd41cfe4fe6d9db82fb Author: Bart Van Assche Date: Sun May 23 19:54:55 2021 -0700 scsi: libsas: Introduce more SAM status code aliases in enum exec_status This patch prepares for converting SAM status codes into an enum. Without this patch converting SAM status codes into an enumeration type would trigger complaints about enum type mismatches for the SAS code. Link: https://lore.kernel.org/r/20210524025457.11299-2-bvanassche@acm.org Cc: Hannes Reinecke Cc: Artur Paszkiewicz Cc: Jason Yan Reviewed-by: John Garry Reviewed-by: Himanshu Madhani Acked-by: Jack Wang Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 011ab4dffe965c16c2ba27c0b97d42d41a97b4da Author: Rafał Miłecki Date: Thu May 27 22:28:15 2021 +0200 dt-bindings: net: brcm,iproc-mdio: convert to the json-schema This helps validating DTS files. Introduced changes: 1. Swapped #address-cells and #size-cells values 2. Renamed node: s/enet-gphy/ethernet-phy@/ Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller commit 76039ac9095f5ee5ec7fb95ccb6a5460d5f8c3a2 Author: Mark Zhang Date: Wed Jun 2 13:27:08 2021 +0300 IB/cm: Protect cm_dev, cm_ports and mad_agent with kref and lock During cm_dev deregistration in cm_remove_one(), the cm_device and cm_ports will be freed, after that they should not be accessed. The mad_agent needs to be protected as well. This patch adds a cm_device kref to protect cm_dev and cm_ports, and a mad_agent_lock spinlock to protect mad_agent. Link: https://lore.kernel.org/r/501ba7a2ff203dccd0e6755d3f93329772adce52.1622629024.git.leonro@nvidia.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7345201c39633fc4c82dae7315da7154efaf2459 Author: Mark Zhang Date: Wed Jun 2 13:27:07 2021 +0300 IB/cm: Improve the calling of cm_init_av_for_lap and cm_init_av_by_path The cm_init_av_for_lap() and cm_init_av_by_path() function calls have the following issues: 1. Both of them might sleep and should not be called under spinlock. 2. The access of cm_id_priv->av should be under cm_id_priv->lock, which means it can't be initialized directly. This patch splits the calling of 2 functions into two parts: first one initializes an AV outside of the spinlock, the second one copies AV to cm_id_priv->av under spinlock. Fixes: e1444b5a163e ("IB/cm: Fix automatic path migration support") Link: https://lore.kernel.org/r/038fb8ad932869b4548b0c7708cab7f76af06f18.1622629024.git.leonro@nvidia.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 70076a414efc75894344d2adabf68254e38be71a Author: Mark Zhang Date: Wed Jun 2 13:27:06 2021 +0300 IB/cm: Simplify ib_cancel_mad() and ib_modify_mad() calls The mad_agent parameter is redundant since the struct ib_mad_send_buf already has a pointer of it. Link: https://lore.kernel.org/r/0987c784b25f7bfa72f78691f50cff066de587e1.1622629024.git.leonro@nvidia.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3595c398f6dbab79a38550ff26104c6ec1035cd3 Author: Mark Zhang Date: Wed Jun 2 13:27:05 2021 +0300 Revert "IB/cm: Mark stale CM id's whenever the mad agent was unregistered" This reverts commit 9db0ff53cb9b43ed75bacd42a89c1a0ab048b2b0, which wasn't a full fix and still causes to the following panic: panic @ time 1605623870.843, thread 0xfffffeb63b552000: vm_fault_lookup: fault on nofault entry, addr: 0xfffffe811a94e000 time = 1605623870 cpuid = 9, TSC = 0xb7937acc1b6 Panic occurred in module kernel loaded at 0xffffffff80200000:Stack: -------------------------------------------------- kernel:vm_fault+0x19da kernel:vm_fault_trap+0x6e kernel:trap_pfault+0x1f1 kernel:trap+0x31e kernel:cm_destroy_id+0x38c kernel:rdma_destroy_id+0x127 kernel:sdp_shutdown_task+0x3ae kernel:taskqueue_run_locked+0x10b kernel:taskqueue_thread_loop+0x87 kernel:fork_exit+0x83 Link: https://lore.kernel.org/r/4346449a7cdacc7a4eedc89cb1b42d8434ec9814.1622629024.git.leonro@nvidia.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit efafae671707524608889d904f59b0f7bad87a0e Author: Jason Gunthorpe Date: Wed Jun 2 13:27:04 2021 +0300 IB/cm: Tidy remaining cm_msg free paths Now that all the free paths are explicit cm_free_msg() will only be called for msgs's allocated with cm_alloc_msg(), so we can assume the context is set. Place it after the allocation function it is paired with for clarity. Also remove a bogus NULL assignment in one place after a cancel. This does nothing other than disable completions to become events, but changing the state already did that. Link: https://lore.kernel.org/r/082fd3552be0d1a2c19b1c4cefb5f3f0e3e68e82.1622629024.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c1cf6d9f743aad09b231752c12845ba7083b28f7 Author: Jason Gunthorpe Date: Wed Jun 2 13:27:03 2021 +0300 IB/cm: Call the correct message free functions in cm_send_handler() There are now three destroy functions for the cm_msg, and all places except the general send completion handler use the correct function. Fix cm_send_handler() to detect which kind of message is being completed and destroy it using the correct function with the correct locking. Link: https://lore.kernel.org/r/62a507195b8db85bb11228d0c6e7fa944204bf12.1622629024.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4b4e586ebe37c8c7e2a4bf46dc4b742756fd788d Author: Jason Gunthorpe Date: Wed Jun 2 13:27:02 2021 +0300 IB/cm: Split cm_alloc_msg() This is being used with two quite different flows, one attaches the message to the priv and the other does not. Ensure the message attach is consistently done under the spinlock and ensure that the free on error always detaches the message from the cm_id_priv, also always under lock. This makes read/write to the cm_id_priv->msg consistently locked and consistently NULL'd when the message is freed, even in all error paths. Link: https://lore.kernel.org/r/f692b8c89eecb34fd82244f317e478bea6c97688.1622629024.git.leonro@nvidia.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 96376a40959e32502208210c62e68a6c60acfb48 Author: Jason Gunthorpe Date: Wed Jun 2 13:27:01 2021 +0300 IB/cm: Pair cm_alloc_response_msg() with a cm_free_response_msg() This is not a functional change, but it helps make the purpose of all the cm_free_msg() calls clearer. In this case a response msg has a NULL context[0], and is never placed in cm_id_priv->msg. Link: https://lore.kernel.org/r/5cd53163be7df0a94f0d4ef7294546bc674fb74a.1622629024.git.leonro@nvidia.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f97442887275d11c88c2899e720fe945c1f61488 Author: Leon Romanovsky Date: Wed May 19 11:37:31 2021 +0300 RDMA/core: Sanitize WQ state received from the userspace The mlx4 and mlx5 implemented differently the WQ input checks. Instead of duplicating mlx4 logic in the mlx5, let's prepare the input in the central place. The mlx5 implementation didn't check for validity of state input. It is not real bug because our FW checked that, but still worth to fix. Fixes: f213c0527210 ("IB/uverbs: Add WQ support") Link: https://lore.kernel.org/r/ac41ad6a81b095b1a8ad453dcf62cf8d3c5da779.1621413310.git.leonro@nvidia.com Reported-by: Jiapeng Chong Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6b8f648959e5036695f056a60e3444f4753f643e Author: Mark Rutland Date: Wed Jun 2 16:13:58 2021 +0100 arm64: update string routine copyrights and URLs To make future archaeology easier, let's have the string routine comment blocks encode the specific upstream commit ID they were imported from. These are the same commit IDs as listed in the commits importing the code, expanded to 16 characters. Note that the routines have different commit IDs, each reprsenting the latest upstream commit which changed the particular routine. At the same time, let's consistently include 2021 in the copyright dates. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Robin Murphy Cc: Will Deacon Link: https://lore.kernel.org/r/20210602151358.35571-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit d10a0b88751a0954c14e11fd988da00d3b0d5445 Author: Alexander Aring Date: Wed Jun 2 09:45:20 2021 -0400 fs: dlm: rename socket and app buffer defines This patch renames DEFAULT_BUFFER_SIZE to DLM_MAX_SOCKET_BUFSIZE and LOWCOMMS_MAX_TX_BUFFER_LEN to DLM_MAX_APP_BUFSIZE as they are proper names to define what's behind those values. The DLM_MAX_SOCKET_BUFSIZE defines the maximum size of buffer which can be handled on socket layer, the DLM_MAX_APP_BUFSIZE defines the maximum size of buffer which can be handled by the DLM application layer. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit ac7d5d036dc93710971f532ed57f9a6858a2b262 Author: Alexander Aring Date: Wed Jun 2 09:45:19 2021 -0400 fs: dlm: introduce proto values Currently the dlm protocol values are that TCP is 0 and everything else is SCTP. This makes it difficult to introduce possible other transport layers. The only one user space tool dlm_controld, which I am aware of, handles the protocol value 1 for SCTP. We change it now to handle SCTP as 1, this will break user space API but it will fix it so we can add possible other transport layers. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 9a4139a79403161f190cf30be7d89ac877ae3b12 Author: Alexander Aring Date: Wed Jun 2 09:45:18 2021 -0400 fs: dlm: move dlm allow conn This patch checks if possible allowing new connections is allowed before queueing the listen socket to accept new connections. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 6c6a1cc666956cbb3ac6db79ed401ee027e6f950 Author: Alexander Aring Date: Wed Jun 2 09:45:17 2021 -0400 fs: dlm: use alloc_ordered_workqueue The proper way to allocate ordered workqueues is to use alloc_ordered_workqueue() function. The current way implies an ordered workqueue which is also required by dlm. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 700ab1c363c7b54c9ea3222379b33fc00ab02f7b Author: Alexander Aring Date: Wed Jun 2 09:45:16 2021 -0400 fs: dlm: fix memory leak when fenced I got some kmemleak report when a node was fenced. The user space tool dlm_controld will therefore run some rmdir() in dlm configfs which was triggering some memleaks. This patch stores the sps and cms attributes which stores some handling for subdirectories of the configfs cluster entry and free them if they get released as the parent directory gets freed. unreferenced object 0xffff88810d9e3e00 (size 192): comm "dlm_controld", pid 342, jiffies 4294698126 (age 55438.801s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 73 70 61 63 65 73 00 00 ........spaces.. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000db8b640b>] make_cluster+0x5d/0x360 [<000000006a571db4>] configfs_mkdir+0x274/0x730 [<00000000b094501c>] vfs_mkdir+0x27e/0x340 [<0000000058b0adaf>] do_mkdirat+0xff/0x1b0 [<00000000d1ffd156>] do_syscall_64+0x40/0x80 [<00000000ab1408c8>] entry_SYSCALL_64_after_hwframe+0x44/0xae unreferenced object 0xffff88810d9e3a00 (size 192): comm "dlm_controld", pid 342, jiffies 4294698126 (age 55438.801s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 63 6f 6d 6d 73 00 00 00 ........comms... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000a7ef6ad2>] make_cluster+0x82/0x360 [<000000006a571db4>] configfs_mkdir+0x274/0x730 [<00000000b094501c>] vfs_mkdir+0x27e/0x340 [<0000000058b0adaf>] do_mkdirat+0xff/0x1b0 [<00000000d1ffd156>] do_syscall_64+0x40/0x80 [<00000000ab1408c8>] entry_SYSCALL_64_after_hwframe+0x44/0xae Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit fcef0e6c27ce109d2c617aa12f0bfd9f7ff47d38 Author: Alexander Aring Date: Wed Jun 2 09:45:15 2021 -0400 fs: dlm: fix lowcomms_start error case This patch fixes the error path handling in lowcomms_start(). We need to cleanup some static allocated data structure and cleanup possible workqueue if these have started. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 9de6655cc5a6a1febc514465c87c24a0e96d8dba Author: Jiapeng Chong Date: Tue May 25 18:58:41 2021 +0800 drivers: hv: Fix missing error code in vmbus_connect() Eliminate the follow smatch warning: drivers/hv/connection.c:236 vmbus_connect() warn: missing error code 'ret'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1621940321-72353-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Wei Liu commit 450605c28d571eddca39a65fdbc1338add44c6d9 Author: Praveen Kumar Date: Mon May 31 13:10:46 2021 +0530 x86/hyperv: fix logical processor creation Microsoft Hypervisor expects the logical processor index to be the same as CPU's index during logical processor creation. Using cpu_physical_id confuses hypervisor's scheduler. That causes the root partition not boot when core scheduler is used. This patch removes the call to cpu_physical_id and uses the CPU index directly for bringing up logical processor. This scheme works for both classic scheduler and core scheduler. Fixes: 333abaf5abb3 (x86/hyperv: implement and use hv_smp_prepare_cpus) Signed-off-by: Praveen Kumar Link: https://lore.kernel.org/r/20210531074046.113452-1-kumarpraveen@linux.microsoft.com Signed-off-by: Wei Liu commit 5ff90af9da8f243133e6f21368e5df15e29037bf Author: Jack Pham Date: Sat May 29 12:29:32 2021 -0700 usb: dwc3: debugfs: Add and remove endpoint dirs dynamically The DWC3 DebugFS directory and files are currently created once during probe. This includes creation of subdirectories for each of the gadget's endpoints. This works fine for peripheral-only controllers, as dwc3_core_init_mode() calls dwc3_gadget_init() just prior to calling dwc3_debugfs_init(). However, for dual-role controllers, dwc3_core_init_mode() will instead call dwc3_drd_init() which is problematic in a few ways. First, the initial state must be determined, then dwc3_set_mode() will have to schedule drd_work and by then dwc3_debugfs_init() could have already been invoked. Even if the initial mode is peripheral, dwc3_gadget_init() happens after the DebugFS files are created, and worse so if the initial state is host and the controller switches to peripheral much later. And secondly, even if the gadget endpoints' debug entries were successfully created, if the controller exits peripheral mode, its dwc3_eps are freed so the debug files would now hold stale references. So it is best if the DebugFS endpoint entries are created and removed dynamically at the same time the underlying dwc3_eps are. Do this by calling dwc3_debugfs_create_endpoint_dir() as each endpoint is created, and conversely remove the DebugFS entry when the endpoint is freed. Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Reviewed-by: Peter Chen Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 425de3182c91b467f1fc8a0de841d74d866719ca Author: Greg Kroah-Hartman Date: Thu May 27 12:14:26 2021 +0200 USB: gr_udc: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Felipe Balbi Link: https://lore.kernel.org/r/20210527101426.3283214-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7f7d0afe1d479990b712ecb494257dcd706a8016 Author: Heikki Krogerus Date: Wed Jun 2 14:22:53 2021 +0300 Revert "usb: typec: mux: Remove requirement for the "orientation-switch" device property" This reverts commit acad3e9c7250c5fd20d9778a163f2adc95de38f5. The device property that can be used to identify the device class/type of the remote port parent when device graph is used is always needed after all. Without it there is no real way to know is the requested connection actually described in the device graph or not. If the connection is described in the device graph but the device instance is still missing for what ever reason, the code defers probe for now. Adding a comment to the code to explain this. Reviewed-by: Li Jun Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210602112253.70200-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bd56b051c96b9e0bbfaa7f79d3fad385fae2ac4b Author: Andy Shevchenko Date: Tue Jun 1 19:21:28 2021 +0300 gpio: dwapb: Switch to use fwnode_irq_get() We have open coded variant of fwnode_irq_get() in dwapb_get_irq(). Replace it with a simple call. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 5a5bc826fed1d86212eb78114c86808c29b11b0a Author: Andy Shevchenko Date: Tue Jun 1 19:21:27 2021 +0300 gpio: dwapb: Drop redundant check in dwapb_irq_set_type() For more than 15 years we may not get into ->irq_set_type() without any meaningful type provided. Drop redundant check in dwapb_irq_set_type(). See the commit e76de9f8eb67 ("[PATCH] genirq: add SA_TRIGGER support") out of curiosity. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit cc0f53d2bb422b555d76c1258dbe9aec9b1f416b Author: Navin Sankar Velliangiri Date: Tue May 25 10:27:17 2021 +0530 gpio: 104-idio-16: Fix coding style issues Fixed multiple bare uses of 'unsigned' without int. Reported by checkpatch. Signed-off-by: Navin Sankar Velliangiri Acked-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 5be91fe8d91b3aed5192b763fd6f2d11c7cd354d Author: Alim Akhtar Date: Mon May 31 22:30:57 2021 +0530 arm64: defconfig: Enable Exynos UFS driver Enable the Exynos UFS controller and PHY configs. They need to be buildin to ensure UFS devices gets detected on exynos7 and its variant boards. Signed-off-by: Alim Akhtar Link: https://lore.kernel.org/r/20210531170057.7730-1-alim.akhtar@samsung.com Signed-off-by: Krzysztof Kozlowski commit c11669f738f48c7b3cf3b7ec700af33e1566d9c3 Author: Mauro Carvalho Chehab Date: Wed Jun 2 15:12:18 2021 +0200 docs: userspace-api: media: dvb: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output - U+2019 ('’'): RIGHT SINGLE QUOTATION MARK - U+201c ('“'): LEFT DOUBLE QUOTATION MARK - U+201d ('”'): RIGHT DOUBLE QUOTATION MARK Signed-off-by: Mauro Carvalho Chehab commit eff7d26abc05821fd4ff32f2eef0a37cf977535b Author: Mauro Carvalho Chehab Date: Wed Jun 2 15:12:18 2021 +0200 docs: userspace-api: media: v4l: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+00a0 (' '): NO-BREAK SPACE as it can cause lines being truncated on PDF output - U+2014 ('—'): EM DASH - U+2019 ('’'): RIGHT SINGLE QUOTATION MARK Note that Sphinx auto-translates '---' into EM DASH. Signed-off-by: Mauro Carvalho Chehab commit d4a84f86e9169e07595dd399c42bc7728d077531 Author: Mauro Carvalho Chehab Date: Wed Jun 2 15:12:17 2021 +0200 docs: userspace-api: media: fdl-appendix.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+201c ('“'): LEFT DOUBLE QUOTATION MARK - U+201d ('”'): RIGHT DOUBLE QUOTATION MARK Signed-off-by: Mauro Carvalho Chehab commit 9df4827523bdc4032b1021395e8ee6f880d1e8b1 Author: Mauro Carvalho Chehab Date: Wed Jun 2 15:06:43 2021 +0200 docs: driver-api: media: zoran: replace SOFT HYPHEN character Replace the occurences of the following character: - U+00ad ('­'): SOFT HYPHEN as ASCII HYPHEN is preferred over SOFT HYPHEN At least with some fonts, a SOFT HYPHEN is displayed as a blank space. Signed-off-by: Mauro Carvalho Chehab commit 98b9c7890b2d74d2f5342ef23d12c4bcbbec54bf Author: Mauro Carvalho Chehab Date: Wed Jun 2 15:06:12 2021 +0200 docs: admin-guide: media: ipu3.rst: replace some characters The conversion tools used during DocBook/LaTeX/html/Markdown->ReST conversion and some cut-and-pasted text contain some characters that aren't easily reachable on standard keyboards and/or could cause troubles when parsed by the documentation build system. Replace the occurences of the following characters: - U+201c ('“'): LEFT DOUBLE QUOTATION MARK - U+201d ('”'): RIGHT DOUBLE QUOTATION MARK Signed-off-by: Mauro Carvalho Chehab commit 7e149fd8349034431852fb1f6db0229da935c3fe Author: Hsin-Yi Wang Date: Thu May 27 15:55:56 2021 +0800 arm64: dts: mt8183: add supply name for eeprom Add supplies for eeprom for mt8183 boards. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210527075556.1709140-5-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit f4db23f2c0d18c3a41746326e3eda0402b5c6b93 Author: Thomas Hellström Date: Wed Jun 2 10:38:09 2021 +0200 drm/i915/ttm: Embed a ttm buffer object in the i915 gem object Embed a struct ttm_buffer_object into the i915 gem object, making sure we alias the gem object part. It's a bit unfortunate that the struct ttm_buffer_ojbect embeds a gem object since we otherwise could make the TTM part private to the TTM backend, and use the usual i915 gem object for the other backends. To make this a bit more storage efficient for the other backends, we'd have to use a pointer for the gem object which would require a lot of changes in the driver. We postpone that for later. Signed-off-by: Thomas Hellström Acked-by: Maarten Lankhorst Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-3-thomas.hellstrom@linux.intel.com commit d148738923fdb5077089e48ec15555e6008100d0 Author: Thomas Hellström Date: Wed Jun 2 10:38:08 2021 +0200 drm/i915/ttm Initialize the ttm device and memory managers Temporarily remove the buddy allocator and related selftests and hook up the TTM range manager for i915 regions. Also modify the mock region selftests somewhat to account for a fragmenting manager. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-2-thomas.hellstrom@linux.intel.com commit 2bcfc81147b9266a521e5cfe2d9abbf64a2ceef4 Author: lijian Date: Wed May 26 11:47:12 2021 +0200 media: videobuf-dma-sg: void function return statements are not generally useful void function videobuf_vm_close return statements are not generally useful, so deleted the return in function videobuf_vm_close(). Signed-off-by: lijian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35037eab4acae8c2d01612d906d479f7006a733c Author: lijian Date: Tue May 25 11:41:48 2021 +0200 media: v4l2-dev.c: Modified the macro SET_VALID_IOCTL Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects. So modified the macro SET_VALID_IOCTL with do - while loop. [hverkuil: checkpatch: add parenthesis around 'ops'] Signed-off-by: lijian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 80daed70c6dcc79f5ef36b98157062b0f3522732 Author: Wei Yongjun Date: Mon May 24 15:35:51 2021 +0200 media: imx: imx7_mipi_csis: Fix error return code in mipi_csis_async_register() Fix to return negative error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 88fc81388df9 ("media: imx: imx7_mipi_csis: Reject invalid data-lanes settings") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25d5ce3a606a1eb23a9265d615a92a876ff9cb5f Author: Johan Hovold Date: Mon May 24 13:09:20 2021 +0200 media: rtl28xxu: fix zero-length control request The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning. Fix the zero-length i2c-read request used for type detection by attempting to read a single byte instead. Reported-by: syzbot+faf11bbadc5a372564da@syzkaller.appspotmail.com Fixes: d0f232e823af ("[media] rtl28xxu: add heuristic to detect chip type") Cc: stable@vger.kernel.org # 4.0 Cc: Antti Palosaari Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4bb4d425b7b02424afea2dfdcd77b3b4794175e Author: Johan Hovold Date: Mon May 24 13:09:19 2021 +0200 media: gspca/sunplus: fix zero-length control requests The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning. Fix the single zero-length control request which was using the read-register helper, and update the helper so that zero-length reads fail with an error message instead. Fixes: 6a7eba24e4f0 ("V4L/DVB (8157): gspca: all subdrivers") Cc: stable@vger.kernel.org # 2.6.27 Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 946437cfb0d2eff41352458847e3a01ad0f1b460 Author: Hsin-Yi Wang Date: Tue Jun 1 12:00:14 2021 +0800 arm64: dts: mt8183: remove syscon from smi_common node We don't need to register smi_common as syscon. Also add required property power-domains for this node. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210601040014.2970805-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 8ed339f23d41e21660a389adf2e7b2966d457ff6 Author: Johan Hovold Date: Mon May 24 13:09:18 2021 +0200 media: gspca/gl860: fix zero-length control requests The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning. Fix the gl860_RTx() helper so that zero-length control reads fail with an error message instead. Note that there are no current callers that would trigger this. Fixes: 4f7cb8837cec ("V4L/DVB (12954): gspca - gl860: Addition of GL860 based webcams") Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5eabfbdd7d6a473afbbd4916877ee04801ca2c45 Author: Yang Yingliang Date: Sat May 22 05:19:11 2021 +0200 media: staging: media: tegra-vde: add missing error return code in tegra_vde_probe() Add missing return error code when pm_runtime_resume_and_get() failed. Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 53ae298fde7adcc4b1432bce2dbdf8dac54dfa72 Author: Johan Hovold Date: Fri May 21 15:28:39 2021 +0200 media: gspca/sq905: fix control-request direction The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the USB_REQ_SYNCH_FRAME request which erroneously used usb_sndctrlpipe(). Fixes: 27d35fc3fb06 ("V4L/DVB (10639): gspca - sq905: New subdriver.") Cc: stable@vger.kernel.org # 2.6.30 Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c8b9a9be2afa8bd6a72ad1130532baab9fab89d Author: Johan Hovold Date: Fri May 21 15:28:38 2021 +0200 media: dtv5100: fix control-request directions The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the control requests which erroneously used usb_rcvctrlpipe(). Fixes: 8466028be792 ("V4L/DVB (8734): Initial support for AME DTV-5100 USB2.0 DVB-T") Cc: stable@vger.kernel.org # 2.6.28 Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ce67eaca95f8ab5c6aae41a10adfe9a6e8efa58c Author: Joe Richey Date: Fri May 21 10:58:46 2021 +0200 media: vicodec: Use _BITUL() macro in UAPI headers Replace BIT() in v4l2's UPAI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: 206bc0f6fb94 ("media: vicodec: mark the stateless FWHT API as stable") Signed-off-by: Joe Richey Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d170ebb00472268410dce80ae4834c98e79315da Author: Hans Verkuil Date: Fri May 21 10:45:44 2021 +0200 media: uapi/linux/cec-funcs.h: set delay to 1 if unnused If the audio_out_delay value is unused, then set it to 1, not 0. The value 0 is reserved, and 1 is a much safer value since it translates to a delay of (1 - 1) * 2 = 0 ms. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bf950fdc71fe756ea6407f2cbf6ce051b8f5ea07 Author: Herman Date: Fri May 21 10:36:29 2021 +0200 media: drivers/media/usb/gspca/cpia1.c : fix spelling typo change 'then' into 'than' Signed-off-by: Herman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d0aac74e1e28691e355a7a40bd5961d495982a2 Author: Herman Date: Fri May 21 04:14:57 2021 +0200 media: drivers/media/platform/Rcar_jpu.c : fix typo issues change 'requerment' into 'requirement' change 'quantanization' into 'quantization' change 'qantization' into 'quantization' Signed-off-by: Herman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 66933f4b90ddd8abaa2e123e09c51ecc25331b40 Author: Dan Carpenter Date: Thu May 20 18:02:49 2021 +0200 media: hantro: test the correct variable in probe() This should be testing "vpu->clocks[0].clk" instead of "vpu->clocks". Fixes: eb4cacdfb998 ("media: hantro: add fallback handling for single irq/clk") Signed-off-by: Dan Carpenter Reviewed-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 99c2caa64580f999f4552eaeb3ed6f6c5f172d93 Author: Herman Date: Thu May 20 11:35:53 2021 +0200 media: drivers/media/usb/em28xx/em28xx-cards.c : fix typo issues change 'Configuare' into 'Configure' change 'Configuared' into 'Configured' Signed-off-by: Herman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b7fdd208687ba59ebfb09b2199596471c63b69e3 Author: Evgeny Novikov Date: Wed May 19 14:04:49 2021 +0200 media: st-hva: Fix potential NULL pointer dereferences When ctx_id >= HVA_MAX_INSTANCES in hva_hw_its_irq_thread() it tries to access fields of ctx that is NULL at that point. The patch gets rid of these accesses. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cca65f64045523f923380171bf6d329bfd79970f Author: Evgeny Novikov Date: Tue May 18 20:57:22 2021 +0200 media: v4l: cadence: Handle errors of clk_prepare_enable() Handle errors of clk_prepare_enable() in csi2rx_get_resources(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5ef8a20af18716f97875714a32266256f6aa6f60 Author: Corentin Labbe Date: Tue May 18 14:41:13 2021 +0200 media: staging: media: zoran: change asm header As asked by checkpatch, convert a asm/xxx header to a linux one. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b8c8c4959ce372820575f28981b7a033243363e5 Author: Corentin Labbe Date: Tue May 18 14:41:12 2021 +0200 media: staging: media: zoran: fix kzalloc style Prefer kzalloc(sizeof(*prt)...) over kzalloc(sizeof(struct.../ Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87c5d693f94975a262fa891fbc944957ea041603 Author: Corentin Labbe Date: Tue May 18 14:41:11 2021 +0200 media: staging: media: zoran: remove blank line Minor style fix by removing useless blank line. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4283d387d9cbf5deb464675e050b17f34a9a8c02 Author: Corentin Labbe Date: Tue May 18 14:41:10 2021 +0200 media: staging: media: zoran: multiple assignments should be avoided Remove all multiple assignments. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit efdd0d42e27695ade6eff777bd416973a631b71c Author: Corentin Labbe Date: Tue May 18 14:41:09 2021 +0200 media: staging: media: zoran: remove detect_guest_activity The detect_guest_activity function is no longer used, so lets removed it. [hverkuil: remove dump_guests() as well as that too is now unused] Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f0fce06e345dc4f75c1cdd21840780f5fe2df1f3 Author: Weiyi Lu Date: Tue Jun 1 11:59:03 2021 +0800 soc: mtk-pm-domains: Fix the clock prepared issue In this new power domain driver, when adding one power domain it will prepare the dependent clocks at the same. So we only do clk_bulk_enable/disable control during power ON/OFF. When system suspend, the pm runtime framework will forcely power off power domains. However, the dependent clocks are disabled but kept prepared. In MediaTek clock drivers, PLL would be turned ON when we do clk_bulk_prepare control. Clock hierarchy: PLL --> DIV_CK --> CLK_MUX (may be dependent clocks) --> SUBSYS_CG (may be dependent clocks) It will lead some unexpected clock states during system suspend. This patch will fix by doing prepare_enable/disable_unprepare on dependent clocks at the same time while we are going to power on/off any power domain. Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Weiyi Lu Signed-off-by: Hsin-Yi Wang Reviewed-by: chun-jie.chen Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210601035905.2970384-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit eed6ff1bb2da65067d928f4ab322c7d75f944fa4 Author: Hsin-Yi Wang Date: Tue Jun 1 11:59:04 2021 +0800 soc: mtk-pm-domains: do not register smi node as syscon Mediatek requires mmsys clocks to be unprepared during suspend, otherwise system has chances to hang. syscon_regmap_lookup_by_phandle_optional() will attach and prepare the first clock in smi node, leading to additional prepare to the clock which is not balanced with the prepare/unprepare pair in resume/suspend callbacks. If a power domain node requests an smi node and the smi node's first clock is an mmsys clock, it will results in an unstable suspend resume. Fixes: f414854c8843 ("soc: mediatek: pm-domains: Add SMI block as bus protection block") Signed-off-by: Hsin-Yi Wang Reviewed-by: chun-jie.chen Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210601035905.2970384-2-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 0d0f144a8f5f9815a180d16ef7d08b6269016897 Author: Tian Tao Date: Wed Jun 2 09:00:42 2021 +0800 perf: qcom_l2_pmu: move to use request_irq by IRQF_NO_AUTOEN flag request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can be replaced by request_irq() with IRQF_NO_AUTOEN flag. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1622595642-61678-3-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit 3c1f2eb5475a4031d9555a38de2467d80019c66a Author: Tian Tao Date: Wed Jun 2 09:00:41 2021 +0800 arm_pmu: move to use request_irq by IRQF_NO_AUTOEN flag request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can be replaced by request_irq() with IRQF_NO_AUTOEN flag. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1622595642-61678-2-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit b75a44de44f4921cb84e855f54419e812badc325 Author: Wang Qing Date: Tue May 18 13:49:08 2021 +0200 media: staging: media: zoran: fix some formatting issues fixing WARNING: Possible repeated word: 'in' as "in in a VIDIOCSFBUF ioctl", limit the number of words per line. Signed-off-by: Wang Qing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a045eac8d0427b64577a24d74bb8347c905ac65 Author: Pavel Skripkin Date: Mon May 17 21:18:14 2021 +0200 media: zr364xx: fix memory leak in zr364xx_start_readpipe syzbot reported memory leak in zr364xx driver. The problem was in non-freed urb in case of usb_submit_urb() fail. backtrace: [] kmalloc include/linux/slab.h:561 [inline] [] usb_alloc_urb+0x66/0xe0 drivers/usb/core/urb.c:74 [] zr364xx_start_readpipe+0x78/0x130 drivers/media/usb/zr364xx/zr364xx.c:1022 [] zr364xx_board_init drivers/media/usb/zr364xx/zr364xx.c:1383 [inline] [] zr364xx_probe+0x6a3/0x851 drivers/media/usb/zr364xx/zr364xx.c:1516 [] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396 [] really_probe+0x159/0x500 drivers/base/dd.c:576 Fixes: ccbf035ae5de ("V4L/DVB (12278): zr364xx: implement V4L2_CAP_STREAMING") Cc: stable@vger.kernel.org Reported-by: syzbot+af4fa391ef18efdd5f69@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6001f6922cfda7b76f594595ebb38351c313da2 Author: Evgeny Novikov Date: Mon May 17 14:49:18 2021 +0200 media: v4l: cadence: Handle errors of clk_prepare_enable() Handle errors of clk_prepare_enable() in csi2tx_get_resources(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8610b3a2abfd0a043df91ac2754a406d7d42b207 Author: Jiapeng Chong Date: Mon May 17 12:09:20 2021 +0200 media: st-delta: Remove redundant assignment to ret Variable ret is being assigned a value however the assignment is never read, so this redundant assignment can be removed. Clean up the following clang-analyzer warning: drivers/media/platform/sti/delta/delta-v4l2.c:1010:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c75f11fbe4de0d4ccba14e7125607fd5ca12e294 Author: Jiapeng Chong Date: Mon May 17 12:07:48 2021 +0200 media: atmel: atmel-isc: Remove redundant assignment to i Variable i is being assigned a value however the assignment is never read, so this redundant assignment can be removed. Clean up the following clang-analyzer warning: drivers/media/platform/atmel/atmel-isc-base.c:975:2: warning: Value stored to 'i' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd706623fcab3ba808a2c48855e5e8aa2c6e8fbf Author: Yang Yingliang Date: Mon May 17 05:11:23 2021 +0200 media: bdisp: remove redundant dev_err call in bdisp_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a6b1e7093f0a099571fc8836ab4a589633f956a8 Author: Zhen Lei Date: Sat May 15 08:58:30 2021 +0200 media: tc358743: Fix error return code in tc358743_probe_of() When the CSI bps per lane is not in the valid range, an appropriate error code -EINVAL should be returned. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 256148246852 ("[media] tc358743: support probe from device tree") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d67fa04ce41f7b5d92563734d76c55a676846cc4 Author: Guenter Roeck Date: Fri May 14 17:27:34 2021 +0200 media: media/test_drivers: Drop unnecessary NULL check after container_of The result of container_of() operations is never NULL unless the embedded element is the first element of the structure. This is not the case here. The NULL check is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f2e452730d2bcd59fe05246f0e19a4c52e0012d Author: Dan Carpenter Date: Fri May 14 16:20:38 2021 +0200 media: au0828: fix a NULL vs IS_ERR() check The media_device_usb_allocate() function returns error pointers when it's enabled and something goes wrong. It can return NULL as well, but only if CONFIG_MEDIA_CONTROLLER is disabled so that doesn't apply here. Fixes: 812658d88d26 ("media: change au0828 to use Media Device Allocator API") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fcbeeb506fd785025a37d1a874108756abbef6b Author: Ding Senjie Date: Fri May 14 14:35:21 2021 +0200 media: mtk-vpu: Use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Ding Senjie Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2c1e75f5baac5432749b90174a7a1f50a97327b2 Author: Colin Ian King Date: Fri May 14 00:03:17 2021 +0200 media: meson: vdec: remove redundant initialization of variable reg_cur The variable reg_cur is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Martin Blumenstingl Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c6178f31e7d33c87f9f046e3bcbaa15a1802ff9 Author: Niklas Söderlund Date: Thu May 13 16:09:14 2021 +0200 media: rcar-csi2: Enable support for r8a77961 Enable support for M3-W+ (r8a77961). Signed-off-by: Niklas Söderlund Tested-by: LUU HOAI Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 67e446eb4d063d9f75ef5ebbb4f5083a3f2edc32 Author: Arnaldo Carvalho de Melo Date: Wed Jun 2 08:16:20 2021 -0300 Revert "perf vendor events intel: Add metrics for Icelake Server" It is making 'perf test 10' fail: ⬢[acme@toolbox perf]$ perf test 10 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! ⬢[acme@toolbox perf] This reverts commit d89bf9cab1f613e4496f929d89477b2baaad1ea9. commit 0909f4acb916f4ce0217f01ff31a9e0296b536da Author: Niklas Söderlund Date: Thu May 13 14:47:15 2021 +0200 media: rcar-vin: Enable support for r8a77961 Enable support for M3-W+ (r8a77961). Signed-off-by: Niklas Söderlund Tested-by: LUU HOAI Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6cf16148899fc021dbd352d0177ff015ab12823b Author: Rikard Falkeborn Date: Wed May 12 19:35:14 2021 +0200 media: radio: si4713: constify static struct v4l2_ioctl_ops The only usage of radio_si4713_ioctl_ops is to assign its address to the ioctl_ops field in the video_device struct, which is a pointer to const. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1a4520090681853e6b850cbe54b27247a013e0e5 Author: Zheyu Ma Date: Wed May 12 17:18:36 2021 +0200 media: bt8xx: Fix a missing check bug in bt878_probe In 'bt878_irq', the driver calls 'tasklet_schedule', but this tasklet is set in 'dvb_bt8xx_load_card' of another driver 'dvb-bt8xx'. However, this two drivers are separate. The user may not load the 'dvb-bt8xx' driver when loading the 'bt8xx' driver, that is, the tasklet has not been initialized when 'tasklet_schedule' is called, so it is necessary to check whether the tasklet is initialized in 'bt878_probe'. Fix this by adding a check at the end of bt878_probe. The KASAN's report reveals it: BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 800000006aab2067 P4D 800000006aab2067 PUD 6b2ea067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN PTI CPU: 2 PID: 8724 Comm: syz-executor.0 Not tainted 4.19.177- gdba4159c14ef-dirty #40 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59- gc9ba5276e321-prebuilt.qemu.org 04/01/2014 RIP: 0010: (null) Code: Bad RIP value. RSP: 0018:ffff88806c287ea0 EFLAGS: 00010246 RAX: fffffbfff1b01774 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 1ffffffff1b01775 RDI: 0000000000000000 RBP: ffff88806c287f00 R08: fffffbfff1b01774 R09: fffffbfff1b01774 R10: 0000000000000001 R11: fffffbfff1b01773 R12: 0000000000000000 R13: ffff88806c29f530 R14: ffffffff8d80bb88 R15: ffffffff8d80bb90 FS: 00007f6b550e6700(0000) GS:ffff88806c280000(0000) knlGS: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000005ec98000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tasklet_action_common.isra.17+0x141/0x420 kernel/softirq.c:522 tasklet_action+0x50/0x70 kernel/softirq.c:540 __do_softirq+0x224/0x92c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x15a/0x180 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:535 [inline] do_IRQ+0x123/0x1e0 arch/x86/kernel/irq.c:260 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:__do_sys_interrupt kernel/sys.c:2593 [inline] RIP: 0010:__se_sys_interrupt kernel/sys.c:2584 [inline] RIP: 0010:__x64_sys_interrupt+0x5b/0x80 kernel/sys.c:2584 Code: ba 00 04 00 00 48 c7 c7 c0 99 31 8c e8 ae 76 5e 01 48 85 c0 75 21 e8 14 ae 24 00 48 c7 c3 c0 99 31 8c b8 0c 00 00 00 0f 01 c1 <31> db e8 fe ad 24 00 48 89 d8 5b 5d c3 48 c7 c3 ea ff ff ff eb ec RSP: 0018:ffff888054167f10 EFLAGS: 00000212 ORIG_RAX: ffffffffffffffde RAX: 000000000000000c RBX: ffffffff8c3199c0 RCX: ffffc90001ca6000 RDX: 000000000000001a RSI: ffffffff813478fc RDI: ffffffff8c319dc0 RBP: ffff888054167f18 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000080 R11: fffffbfff18633b7 R12: ffff888054167f58 R13: ffff88805f638000 R14: 0000000000000000 R15: 0000000000000000 do_syscall_64+0xb0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4692a9 Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6b550e5c48 EFLAGS: 00000246 ORIG_RAX: 000000000000014f RAX: ffffffffffffffda RBX: 000000000077bf60 RCX: 00000000004692a9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00000000004cf7eb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000077bf60 R13: 0000000000000000 R14: 000000000077bf60 R15: 00007fff55a1dca0 Modules linked in: Dumping ftrace buffer: (ftrace buffer empty) CR2: 0000000000000000 ---[ end trace 68e5849c3f77cbb6 ]--- RIP: 0010: (null) Code: Bad RIP value. RSP: 0018:ffff88806c287ea0 EFLAGS: 00010246 RAX: fffffbfff1b01774 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 1ffffffff1b01775 RDI: 0000000000000000 RBP: ffff88806c287f00 R08: fffffbfff1b01774 R09: fffffbfff1b01774 R10: 0000000000000001 R11: fffffbfff1b01773 R12: 0000000000000000 R13: ffff88806c29f530 R14: ffffffff8d80bb88 R15: ffffffff8d80bb90 FS: 00007f6b550e6700(0000) GS:ffff88806c280000(0000) knlGS: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000005ec98000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Reported-by: Zheyu Ma Signed-off-by: Zheyu Ma Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d2a0f8d6afdabf5d03a1b2fce73326bf0666ec18 Author: Yang Yingliang Date: Tue May 11 13:55:24 2021 +0200 media: saa7134: Remove unnecessary INIT_LIST_HEAD() The list_head saa7134_devlist is initialized statically. It is unnecessary to initialize by INIT_LIST_HEAD(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7dd0c9e547b6924e18712b6b51aa3cba1896ee2c Author: Lv Yunlong Date: Sun May 9 10:24:02 2021 +0200 media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release A use after free bug caused by the dangling pointer filp->privitate_data in v4l2_fh_release. See https://lore.kernel.org/patchwork/patch/1419058/. My patch sets the dangling pointer to NULL to provide robust. Signed-off-by: Lv Yunlong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 01fe904c9afd26e79c1f73aa0ca2e3d785e5e319 Author: Lv Yunlong Date: Sun May 9 10:12:31 2021 +0200 media: exynos4-is: Fix a use after free in isp_video_release In isp_video_release, file->private_data is freed via _vb2_fop_release()->v4l2_fh_release(). But the freed file->private_data is still used in v4l2_fh_is_singular_file() ->v4l2_fh_is_singular(file->private_data), which is a use after free bug. My patch uses a variable 'is_singular_file' to avoid the uaf. v3: https://lore.kernel.org/patchwork/patch/1419058/ Fixes: 34947b8aebe3f ("[media] exynos4-is: Add the FIMC-IS ISP capture DMA driver") Signed-off-by: Lv Yunlong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9c2fd3bb85768f35e1d2bb6b357a214db3b7817 Author: Christophe JAILLET Date: Thu May 6 23:06:34 2021 +0200 media: ttpci: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ace_allocate_descriptors()' and 'ace_init()' GFP_KERNEL can be used because both functions are called from the probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef677df92e450b90688828a5e44b94c8dc156e62 Author: Hans Verkuil Date: Thu May 6 14:06:57 2021 +0200 media: adv7842: support EDIDs up to 4 blocks The adv7842 driver didn't support EDIDs of 3 or 4 blocks, even though the hardware supports this. It is a bit more complicated due to the fact that the adv7842 can expose two EDIDs: one digital, one analog, for DVI-I connectors. In that case the VGA_EDID_ENABLE bit is set and blocks 0 and 1 of the EDID eeprom are used for the DVI-D part and block 2 is used for the DVI-A part of the DVI-I connector. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d84b9202d712309840f8b5abee0ed272506563bd Author: Andrzej Pietrasiewicz Date: Wed May 5 14:23:47 2021 +0200 media: cedrus: Fix .buf_prepare The driver should only set the payload on .buf_prepare if the buffer is CAPTURE type. If an OUTPUT buffer has a zero bytesused set by userspace then v4l2-core will set it to buffer length. If we overwrite bytesused for OUTPUT buffers, too, then vb2_get_plane_payload() will return incorrect value which might be then written to hw registers by the driver in cedrus_h264.c or cedrus_vp8.c. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 082aaecff35fbe1937531057911b1dd1fc6b496e Author: Andrzej Pietrasiewicz Date: Wed May 5 14:23:46 2021 +0200 media: hantro: Fix .buf_prepare The driver should only set the payload on .buf_prepare if the buffer is CAPTURE type. If an OUTPUT buffer has a zero bytesused set by userspace then v4l2-core will set it to buffer length. If we overwrite bytesused for OUTPUT buffers, too, then vb2_get_plane_payload() will return incorrect value which might be then written to hw registers by the driver in hantro_g1_h264_dec.c. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba1ed4ae760a81caf39f54232e089d95157a0dba Author: Ezequiel Garcia Date: Wed May 5 14:23:45 2021 +0200 media: rkvdec: Fix .buf_prepare The driver should only set the payload on .buf_prepare if the buffer is CAPTURE type. If an OUTPUT buffer has a zero bytesused set by userspace then v4l2-core will set it to buffer length. If we overwrite bytesused for OUTPUT buffers, too, then vb2_get_plane_payload() will return incorrect value which might be then written to hw registers by the driver in rkvdec-h264.c. [Changed the comment and used V4L2_TYPE_IS_CAPTURE macro] Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Ezequiel Garcia Signed-off-by: Adrian Ratiu Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac5688637144644f06ed1f3c6d4dd8bb7db96020 Author: Igor Matheus Andrade Torrente Date: Tue May 4 20:32:49 2021 +0200 media: em28xx: Fix possible memory leak of em28xx struct The em28xx struct kref isn't being decreased after an error in the em28xx_ir_init, leading to a possible memory leak. A kref_put and em28xx_shutdown_buttons is added to the error handler code. Signed-off-by: Igor Matheus Andrade Torrente Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ec679bda639fe84b78d473526ae27c74dea383fb Author: Lukas Wunner Date: Thu May 27 23:32:00 2021 +0200 spi: bcm2835: Allow arbitrary number of slaves Since commit 571e31fa60b3 ("spi: bcm2835: Cache CS register value for ->prepare_message()"), the number of slaves has been limited by a compile-time constant. This was necessitated by statically-sized arrays in the driver private data which contain per-slave register values. As suggested by Mark, move those register values to a per-slave controller_state which is allocated on ->setup and freed on ->cleanup. The limitation on the number of slaves is thus lifted. Signed-off-by: Lukas Wunner Cc: Joe Burmeister Cc: Phil Elwell Link: https://lore.kernel.org/r/a847c01f09400801e74e0630bf5a0197591554da.1622150204.git.lukas@wunner.de Signed-off-by: Mark Brown commit ba499a50ce5846dd6f7a6df92c1f01d4201b5cce Author: Zhen Lei Date: Wed Jun 2 16:05:26 2021 +0800 regulator: userspace-consumer: use DEVICE_ATTR_RO/RW macro Use DEVICE_ATTR_RO/RW macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210602080526.11117-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown commit de20b747c5836ffc6768914b95d7617139fac4f4 Author: ChiYuan Huang Date: Wed Jun 2 13:31:46 2021 +0800 regulator: rt6160: Add support for Richtek RT6160 Add support for Richtek RT6160 voltage regulator. It can provide up to 3A output current within the adjustable voltage from 2025mV to 5200mV. It integrate a buckboost converter to support wide input voltage range from 2200mV to 5500mV. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1622611906-2403-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit bce18e52c866ff6ded13ac8ac37e9271f786c005 Author: ChiYuan Huang Date: Wed Jun 2 13:31:45 2021 +0800 regulator: rt6160: Add DT binding document for Richtek RT6160 Add DT binding document for Richtek RT6160 voltage regulator. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1622611906-2403-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit a277a2622ca9609de09c18f660f0d10f1ddbb379 Author: YueHaibing Date: Sat May 29 19:52:26 2021 +0800 regulator: core: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210529115226.25376-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit ae624a38be37e1a3127d5fa32c996e09974bb88d Author: YueHaibing Date: Mon May 24 19:55:06 2021 +0800 ASoC: Intel: Skylake: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20210524115506.35724-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 8e5607e9941ce915187785bd09805bf7df9f7349 Author: Vincent Knecht Date: Fri May 28 12:51:01 2021 +0200 ASoC: codecs: tfa989x: Add support for optional vddd-supply Allow specifying Vddd regulator/supply to be enabled on I2C probing. Signed-off-by: Vincent Knecht Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210528105101.508254-4-vincent.knecht@mailoo.org Signed-off-by: Mark Brown commit 9cf1a98e2b0171e2586a13197a9a1ad605336166 Author: Vincent Knecht Date: Fri May 28 12:51:00 2021 +0200 ASoC: dt-bindings: nxp, tfa989x: Add vddd-supply property Add optional vddd-supply property to allow regulator control. Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20210528105101.508254-3-vincent.knecht@mailoo.org Signed-off-by: Mark Brown commit 1ba1d69d8aa938f64cb07604b320a5074c3bb107 Author: Vincent Knecht Date: Fri May 28 12:50:59 2021 +0200 ASoC: codecs: tfa989x: Add support for tfa9897 Add specific init function to poke needed registers & values for this IC Signed-off-by: Vincent Knecht Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210528105101.508254-2-vincent.knecht@mailoo.org Signed-off-by: Mark Brown commit 513df99993857863e42bf3d7d65d87c191ce9493 Author: Vincent Knecht Date: Fri May 28 12:50:58 2021 +0200 ASoC: dt-bindings: nxp,tfa989x: Add tfa9897 support Document TFA9897 bindings. Signed-off-by: Vincent Knecht Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210528105101.508254-1-vincent.knecht@mailoo.org Signed-off-by: Mark Brown commit f34cd5eb2c57c93bdd7659522da9f7f97e863a0d Author: Shaokun Zhang Date: Sat May 29 17:14:50 2021 +0800 ASoC: sigmadsp: Remove the repeated declaration Function 'sigmadsp_reset' is declared twice, so remove the repeated declaration. Cc: Mark Brown Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622279690-3740-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Mark Brown commit a3a54bf4bddaecda8b5767209cfc703f0be2841d Author: Tong Zhang Date: Thu Apr 29 00:12:26 2021 +0200 media: bt878: do not schedule tasklet when it is not setup There is a problem with the tasklet in bt878. bt->tasklet is set by dvb-bt8xx.ko, and bt878.ko can be loaded independently. In this case if interrupt comes it may cause null-ptr-dereference. To solve this issue, we check if the tasklet is actually set before calling tasklet_schedule. [ 1.750438] bt878(0): irq FDSR FBUS risc_pc= [ 1.750728] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 1.752969] RIP: 0010:0x0 [ 1.757526] Call Trace: [ 1.757659] [ 1.757770] tasklet_action_common.isra.0+0x107/0x110 [ 1.758041] tasklet_action+0x22/0x30 [ 1.758237] __do_softirq+0xe0/0x29b [ 1.758430] irq_exit_rcu+0xa4/0xb0 [ 1.758618] common_interrupt+0x8d/0xa0 [ 1.758824] Signed-off-by: Tong Zhang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 14480e8df8b511bb904ad79b61bc0b6c29f989a2 Author: Tian Tao Date: Wed Apr 7 08:24:39 2021 +0200 media: camss: move to use request_irq by IRQF_NO_AUTOEN flag disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be6cdcf2c9c97c5a702adb95520d0268c8ecc1ae Author: Niklas Söderlund Date: Fri Mar 12 14:04:21 2021 +0100 media: dt-bindings: media: renesas,csi2: Add r8a77961 support Add the compatible string for M3-W+ (r8a77961) to the list of supported SoCs. Signed-off-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 90c3493e4d9e2e1450b5d3ffd314ff350f5132a0 Author: Niklas Söderlund Date: Fri Mar 12 14:03:30 2021 +0100 media: dt-bindings: media: renesas,vin: Add r8a77961 support Add the compatible string for M3-W+ (r8a77961) to the list of supported SoCs. Signed-off-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 83df8dfd57be041669e6dc365caf1d5f1b2791b8 Author: Paul Cercueil Date: Tue Mar 2 15:42:35 2021 +0100 media: dt-bindings: media: Document RDA5807 FM radio bindings Add documentation for the devicetree bindings of the RDA5807 FM radio I2C chip from Unisoc. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6fc46680520f38af8425a447de5e0f84106512eb Author: Zhen Lei Date: Mon May 10 13:57:52 2021 +0200 media: venus: helpers: Delete an unneeded bool conversion The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Mauro Carvalho Chehab commit 3cfe5815ce0ee87f4979787cc7af23404a02edc1 Author: Dikshita Agarwal Date: Mon Apr 12 08:58:43 2021 +0200 media: venus: Enable low power setting for encoder Set the FW to run in low power for encoder to accommodate more session without losing much on quality. Signed-off-by: Dikshita Agarwal Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c05b07963e965ae34e75ee8c33af1095350cd87e Author: Etienne Carriere Date: Fri May 21 15:40:51 2021 +0200 firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig ARM_SCMI_PROTOCOL depends on either MAILBOX or HAVE_ARM_SMCCC_DISCOVERY, not MAILBOX alone. Fix the depedency in Kconfig file and driver to reflect the same. Link: https://lore.kernel.org/r/20210521134055.24271-1-etienne.carriere@linaro.org Reviewed-by: Cristian Marussi Signed-off-by: Etienne Carriere [sudeep.holla: Minor tweaks to subject and change log] Signed-off-by: Sudeep Holla commit 51bb3989c2a1c49b8cebdb753a0ab28d5a546b52 Author: Gustavo A. R. Silva Date: Wed Feb 10 23:57:20 2021 +0100 media: venus: hfi_cmds.h: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Use flexible-array member in struct hfi_sys_set_property_pkt instead of one-element array. Also, this helps with the ongoing efforts to enable -Warray-bounds and fix the following warnings: drivers/media/platform/qcom/venus/hfi_cmds.c: In function ‘pkt_sys_coverage_config’: drivers/media/platform/qcom/venus/hfi_cmds.c:57:11: warning: array subscript 1 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 57 | pkt->data[1] = mode; | ~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/602416da.iZqae7Dbk7nyl6OY%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 0394360eafa08766424c194d9096c535e6f2833f Author: Yangtao Li Date: Sun Mar 14 17:34:07 2021 +0100 media: venus: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 6e2202ca1ee034920b029124151754aec67b61ba Author: Stanimir Varbanov Date: Wed Apr 28 23:50:20 2021 +0200 media: venus: hfi_cmds: Fix conceal color property The conceal color property used for Venus v4 and v6 has the same payload structure. But currently v4 follow down to payload structure for v1. Correct this by moving set_property to v4. Fixes: 4ef6039fad8f ("media: venus: vdec: Add support for conceal control") Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 8f6a0eabb1f21a23a570b0986c8abe9fded3ad6f Author: Niklas Söderlund Date: Tue May 11 16:33:32 2021 +0200 media: dt-bindings: media: renesas,vin: Add r8a779a0 support Document support for the VIN module in the Renesas V3U (r8a779a0) SoC. The V3U is different from other SoCs as it have 32 instead of 8 (most of Gen3) or 16 (V3H) VIN instances. The VIN instances are also connected to a new IP the R-Car ISP Channel Selector. Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d443d838f6d76c8e1acbd4e27583cb2948066f0e Author: Niklas Söderlund Date: Tue May 11 16:23:20 2021 +0200 media: dt-bindings: media: renesas,isp: Add bindings for ISP Channel Selector Add bindings for Renesas R-Car ISP Channel Selector IP. The ISP is responsible for filtering the MIPI CSI-2 bus and directing the different CSI-2 virtual channels to different R-Car VIN instances (DMA engines) for capture. Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 92fbe0323d1b6f596643bb5c91b886789bb90228 Author: Christophe JAILLET Date: Wed May 5 22:20:37 2021 +0200 media: i2c: ov9650: Fix an error message 'ret' is known to be 0 here and printing -ENODEV wouldn't be really helpful. So remove it from the error message. Signed-off-by: Christophe JAILLET Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 47926106af78d5fe6817c8db966213801950eed3 Author: Christophe JAILLET Date: Wed May 5 22:17:17 2021 +0200 media: i2c: ov2659: Fix an error message 'ret' is known to be 0 here and printing -ENODEV wouldn't be really helpful. So remove it from the error message. Signed-off-by: Christophe JAILLET Acked-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d953e3cb4adf66322862d459451435a2eb1b7770 Author: Shawn Tu Date: Fri Apr 30 16:05:49 2021 +0200 media: imx208: Add imx208 camera sensor driver Add a V4L2 sub-device driver for the Sony IMX208 image sensor. This is a camera sensor using the I2C bus for control and the CSI-2 bus for data. [Sakari Ailus: Rename sensor async register function to make it compile, use exposure_max and wrap a few long lines.] Signed-off-by: Ping-Chung Chen Signed-off-by: Yeh, Andy Signed-off-by: Shawn Tu Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 45dbd70c35d6a5fec4b7b45cde75b1341ede52a2 Author: Paul Kocialkowski Date: Mon Apr 12 09:48:31 2021 +0200 media: i2c: ov8865: remove unnecessary NULL check The check on mode_index is sufficient to ensure that we have a valid mode. Remove the explicit mode check similarly to commit 38a50230292f ("media: i2c: ov5648: remove unnecessary NULL check") Signed-off-by: Paul Kocialkowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0e4fe0c9f2f981f26e01b73f3c465ca314c4f9c0 Author: Matthew Auld Date: Thu May 27 19:51:45 2021 +0100 Revert "i915: use io_mapping_map_user" This reverts commit b739f125e4ebd73d10ed30a856574e13649119ed. We are unfortunately seeing more issues like we did in 293837b9ac8d ("Revert "i915: fix remap_io_sg to verify the pgprot""), except this is now for the vm_fault_gtt path, where we are now hitting the same BUG_ON(!pte_none(*pte)): [10887.466150] kernel BUG at mm/memory.c:2183! [10887.466162] invalid opcode: 0000 [#1] PREEMPT SMP PTI [10887.466168] CPU: 0 PID: 7775 Comm: ffmpeg Tainted: G U 5.13.0-rc3-CI-Nightly #1 [10887.466174] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017 [10887.466177] RIP: 0010:remap_pfn_range_notrack+0x30f/0x440 [10887.466188] Code: e8 96 d7 e0 ff 84 c0 0f 84 27 01 00 00 48 ba 00 f0 ff ff ff ff 0f 00 4c 89 e0 48 c1 e0 0c 4d 85 ed 75 96 48 21 d0 31 f6 eb a9 <0f> 0b 48 39 37 0f 85 0e 01 00 00 48 8b 0c 24 48 39 4f 08 0f 85 00 [10887.466193] RSP: 0018:ffffc90006e33c50 EFLAGS: 00010286 [10887.466198] RAX: 800000000000002f RBX: 00007f5e01800000 RCX: 0000000000000028 [10887.466201] RDX: 0000000000000001 RSI: ffffea0000000000 RDI: 0000000000000000 [10887.466204] RBP: ffffea000033fea8 R08: 800000000000002f R09: ffff8881072256e0 [10887.466207] R10: ffffc9000b84fff8 R11: 0000000017dab000 R12: 0000000000089f9f [10887.466210] R13: 800000000000002f R14: 00007f5e017e4000 R15: ffff88800cffaf20 [10887.466213] FS: 00007f5e04849640(0000) GS:ffff888278000000(0000) knlGS:0000000000000000 [10887.466216] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [10887.466220] CR2: 00007fd9b191a2ac CR3: 00000001829ac000 CR4: 00000000003506f0 [10887.466223] Call Trace: [10887.466233] vm_fault_gtt+0x1ca/0x5d0 [i915] [10887.466381] ? ktime_get+0x38/0x90 [10887.466389] __do_fault+0x37/0x90 [10887.466395] __handle_mm_fault+0xc46/0x1200 [10887.466402] handle_mm_fault+0xce/0x2a0 [10887.466407] do_user_addr_fault+0x1c5/0x660 Reverting this commit is reported to fix the issue. Reported-by: Eero Tamminen References: https://gitlab.freedesktop.org/drm/intel/-/issues/3519 Fixes: b739f125e4eb ("i915: use io_mapping_map_user") Cc: Christoph Hellwig Cc: Daniel Vetter Signed-off-by: Matthew Auld Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210527185145.458021-1-matthew.auld@intel.com commit cef944c8f5ae192636f53682797d62bd61859646 Author: Sakari Ailus Date: Thu Apr 29 22:59:19 2021 +0200 media: staging: ipu3-imgu: Document pages field The pages field in struct imgu_css_map was missing. Document it. Reported-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 253adffb0e98eaf6da2e7cf73ae68695e21f2f3c Author: Ludovic Desroches Date: Fri Oct 25 10:42:10 2019 +0200 ARM: dts: at91: sama5d4: fix pinctrl muxing Fix pinctrl muxing, PD28, PD29 and PD31 can be muxed to peripheral A. It allows to use SCK0, SCK1 and SPI0_NPCS2 signals. Signed-off-by: Ludovic Desroches Fixes: 679f8d92bb01 ("ARM: at91/dt: sama5d4: add pioD pin mux mask and enable pioD") Cc: stable@vger.kernel.org # v4.4+ Reviewed-by: Claudiu Beznea Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20191025084210.14726-1-ludovic.desroches@microchip.com commit c19b93a69c8ea6d672b786d1e130e9b4260b4e71 Author: Shawn Tu Date: Fri Apr 16 11:58:59 2021 +0200 media: ov8856: add vflip/hflip control support Add V4L2 controls: horizontal/vertical flip, keep SGRBG10 Bayer order output (via change v/hflip) Signed-off-by: Shawn Tu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c492ec9ae9ede77dd794b14913b0382376da2bff Author: Shawn Tu Date: Fri Apr 16 11:58:58 2021 +0200 media: ov8856: Add support for 2 data lanes The OV8856 sensor can output frames with 2/4 CSI2 data lanes. This commit adds support for 2 lane mode in addition to the 4 lane and also configuring the data lane settings in the driver based on system configuration. - Fix Bayer order output in 1640x1232 binning registers - supported data lanes + 3280x2464 on 2 & 4 lanes + 1640x1232 on 2 & 4 lanes + 3264x2448 on 4 lanes + 1632x1224 on 4 lanes Signed-off-by: Shawn Tu Acked-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 24786ccd9c80fdb05494aa4d90fcb8f34295c193 Author: Dillon Min Date: Tue May 4 07:09:53 2021 +0200 media: i2c: ov2659: Use clk_{prepare_enable,disable_unprepare}() to set xvclk on/off On some platform(imx6q), xvclk might not switch on in advance, also for power save purpose, xvclk should not be always on. so, add clk_prepare_enable(), clk_disable_unprepare() in driver side to set xvclk on/off at proper stage. Add following changes: - add 'struct clk *clk;' in 'struct ov2659 {}' - enable xvclk in ov2659_power_on() - disable xvclk in ov2659_power_off() Signed-off-by: Dillon Min Acked-by: Lad Prabhakar Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2cb2705cf7ffe41dc5bd81290e4241bfb7f031cc Author: Andy Shevchenko Date: Sun Apr 4 20:14:09 2021 +0200 media: ipu3-cio2: Fix reference counting when looping over ACPI devices When we continue, due to device is disabled, loop we have to drop reference count. When we have an array full of devices we have to also drop the reference count. Note, in this case the cio2_bridge_unregister_sensors() is called by the caller. Fixes: 803abec64ef9 ("media: ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver") Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Scally Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 00d5fa42210e23803d20e5e255f6ca80a3304875 Author: Alexandre Torgue Date: Thu Apr 15 12:10:28 2021 +0200 dt-bindings: mfd: stm32-timers: Remove #address/size cells from required properties address-cells and size-cells can't be declared as "required" properties as they are not needed if subnodes don't have a "reg" entry. Signed-off-by: Alexandre Torgue Reviewed-by: Fabrice Gasnier Acked-by: Rob Herring Signed-off-by: Lee Jones commit 0e3e0c9369c822b7f1dd11504eeb98cfd4aabf24 Author: Bernhard Wimmer Date: Wed Apr 21 23:33:20 2021 +0200 media: ccs: Fix the op_pll_multiplier address According to the CCS spec the op_pll_multiplier address is 0x030e, not 0x031e. Signed-off-by: Bernhard Wimmer Signed-off-by: Sakari Ailus Cc: stable@vger.kernel.org Fixes: 6493c4b777c2 ("media: smiapp: Import CCS definitions") Signed-off-by: Mauro Carvalho Chehab commit 223d2158b20edefcbc988cb9fb65d1f21548c8da Author: Zhen Lei Date: Tue Jun 1 14:34:01 2021 +0800 mfd: sun6i-prcm: Use DEFINE_RES_MEM() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit c5db56feccb192bcfb050238ded504d78e582380 Author: Zhen Lei Date: Tue Jun 1 14:36:48 2021 +0800 mfd: asic3: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit ba4672ad10571d785e266cd21bfdb31cc21567c9 Author: Zhen Lei Date: Tue Jun 1 15:04:25 2021 +0800 mfd: 88pm805: Use DEFINE_RES_IRQ_NAMED() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 5c058e92ad35844418991999e46de88501bd52db Author: Zhen Lei Date: Tue Jun 1 15:06:30 2021 +0800 mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit a5b42f66878a0b4b01daa78f0869d42684d88bc7 Author: Zhen Lei Date: Tue Jun 1 15:21:32 2021 +0800 mfd: tps80031: Use DEFINE_RES_IRQ() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 5ac4b8509fdd8131bd2ee0152c9de8aef30e3863 Author: Zhen Lei Date: Tue Jun 1 15:28:30 2021 +0800 mfd: da9055: Use DEFINE_RES_IRQ_NAMED() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit f928fe143599bb3d28c448398cea1b237c2e7e6e Author: Zhen Lei Date: Tue Jun 1 15:31:42 2021 +0800 mfd: as3722: Use DEFINE_RES_IRQ_NAMED() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit 81a22c3378ba3ff744f083a49daad129834201a7 Author: Zhen Lei Date: Tue Jun 1 15:47:06 2021 +0800 mfd: t7l66xb: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: Lee Jones commit a75f4d1f468319d8db755d0ea2b771113356d494 Author: Gwendal Grignou Date: Tue May 25 20:45:00 2021 -0700 mfd: cros_ec_dev: Load lightbar module only present The pixel lightbar is only present on chromebook pixel (link), pixel 2 and pixel C. For the latter two, the EC reports its presence. Instead of always loading the lightbar driver on all chromebook, only load it when reported by the EC or Link device. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Signed-off-by: Lee Jones commit 39cdbe8d2bc61d70efa22b06b14b129ebd9d0bc5 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:11 2021 -0400 mfd: sec: Remove unused platform data members The Samsung PMIC drivers for early chipsets like S5M8767 stored quite a lot in platform data (struct sec_platform_data). The s5m8767 regulator driver currently references only some of its fields. Newer regulator drivers (e.g. s2mps11) use even less platform data fields. Clean up the structure to reduce memory footprint and source code size. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 2056f024c89cf2c7cd5eeab47592e3c397efb468 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:10 2021 -0400 mfd: sec: Enable wakeup from suspend via devicetree property Set device wakeup capability from devicetree property (done by drivers core), instead of always setting it to 0 (because value in platform data is not assigned). This should not have visible effect on actual resuming from suspend because the child device - S5M RTC driver - is responsible for waking up and sets device wakeup unconditionally. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit c1d3ab31e7356cb54de35991ac70176379d4caed Author: Krzysztof Kozlowski Date: Wed May 26 08:47:09 2021 -0400 mfd: sec: Remove unused irq_base in platform data The 'irq_base' field of platform data structure is not assigned, therefore its default value of 0 has no impact and can be safely dropped. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 294fb2ce2de246e126f9f3a4568bfd8e568a2b5b Author: Krzysztof Kozlowski Date: Wed May 26 08:47:08 2021 -0400 mfd: sec: Remove unused device_type in platform data The 'device_type' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 12e1a41952c08fda89f6b14188ec6cdf31462907 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:07 2021 -0400 mfd: sec: Remove unused cfg_pmic_irq in platform data The 'cfg_pmic_irq' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 5a7b909c7c9a7069fe01c4b3b1f85cfeba82b669 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:06 2021 -0400 mfd: sec: Drop support for board files and require devicetree The Samsung PMIC drivers since long time are used only on devicetree platforms (Samsung Exynos) and there are no users with board files. Drop the support for board files entirely and depend on OF for matching. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit cdefb765f150174ba9dec5775da07175d6f8c4e7 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:03 2021 -0400 mfd: sec: Simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. There is also no need to wrap it in a check for CONFIG_OF, because dev.of_node will be set only with OF support. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 5783bbe9a434db870891a07cd7826944047368e5 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:02 2021 -0400 mfd: da9062: Simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson Signed-off-by: Lee Jones commit 8b201402ea027e44fbe66933a4912b647fd35e89 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:01 2021 -0400 mfd: da9052: Simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson Signed-off-by: Lee Jones commit fac61e6931d18929d9e69f4e0a48f5529c21f2e7 Author: Krzysztof Kozlowski Date: Wed May 26 08:47:00 2021 -0400 mfd: max8998: Simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. There is also no need to wrap it in a check for CONFIG_OF, because dev.of_node will be set only with OF support. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit b486413dd73ac900c6e3a5cda83f2e3f94cd2b2c Author: Krzysztof Kozlowski Date: Wed May 26 08:46:59 2021 -0400 mfd: max8997: Simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. There is also no need to wrap it in a check for CONFIG_OF, because dev.of_node will be set only with OF support. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit c32d7feba0b5c8a3e2867bb5def86fab986c51d7 Author: satya priya Date: Tue May 25 15:41:06 2021 +0530 mfd: qcom-spmi-pmic: Add support for four variants Add support for pm8350c, pmk8350, pm7325 and pmr735a PMICS. Signed-off-by: satya priya Reviewed-by: Bjorn Andersson Signed-off-by: Lee Jones commit 6b149f3310a4661f70512861b11400ee6b28cdcd Author: Guru Das Srinagesh Date: Tue May 25 11:02:40 2021 -0700 mfd: pm8008: Add driver for QCOM PM8008 PMIC Qualcomm Technologies, Inc. PM8008 is a dedicated camera PMIC that integrates all the necessary power management, housekeeping, and interface support functions into a single IC. Its key features include overtemperature protection, low-dropout linear regulators, GPIOs, and an I2C interface. Add an MFD driver to support it. Signed-off-by: Guru Das Srinagesh Signed-off-by: Lee Jones commit b0572a9b2397117db7d915a16928de35af08ceea Author: Guru Das Srinagesh Date: Tue May 25 11:02:39 2021 -0700 dt-bindings: mfd: pm8008: Add bindings Add bindings for the Qualcomm Technologies, Inc. PM8008 MFD driver. Signed-off-by: Guru Das Srinagesh Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit d10a83bf86f9da7374ea2f1d08ac7797e2c32a2a Author: Guru Das Srinagesh Date: Tue May 25 11:02:38 2021 -0700 dt-bindings: mfd: pm8008: Add IRQ listing Add a header file listing all of the IRQs that Qualcomm Technologies, Inc. PM8008 supports. The constants defined in this file may be used in the client device tree node to specify interrupts. Signed-off-by: Guru Das Srinagesh Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Lee Jones commit 921071a83dc78f5e68a0fa48fc2cfd3a0bb98e1b Author: Wolfram Sang Date: Tue May 25 15:42:43 2021 +0200 mfd: da9063: Propagate errno when I2C mode fails Don't hardocde EIO but use the obtained value. Signed-off-by: Wolfram Sang Reviewed-by: Mark Jonas Signed-off-by: Lee Jones commit 6f1b660731d841aa429a836c4ba04af551628050 Author: Axel Lin Date: Sun May 23 15:10:45 2021 +0800 mfd: bd71828: Fix .n_voltages settings Current .n_voltages settings do not cover the latest 2 valid selectors, so it fails to set voltage for the hightest voltage support. The latest linear range has step_uV = 0, so it does not matter if we count the .n_voltages to maximum selector + 1 or the first selector of latest linear range + 1. To simplify calculating the n_voltages, let's just set the .n_voltages to maximum selector + 1. Fixes: 522498f8cb8c ("regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators") Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Signed-off-by: Lee Jones commit caad79405086151dec128f78274a999f15d947ed Author: Bernhard Wimmer Date: Wed Apr 21 23:33:19 2021 +0200 media: Documentation: ccs: Fix the op_pll_multiplier address According to the CCS spec the op_pll_multiplier address is 0x030e, not 0x031e. Signed-off-by: Bernhard Wimmer Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 07a0b7d6f1543b45068ba427a1f0ee5375a259c9 Author: Hao Fang Date: Sat May 22 18:25:15 2021 +0800 mfd: hisilicon: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/ It should use capital S, according to the official website https://www.hisilicon.com/en. Signed-off-by: Hao Fang Signed-off-by: Lee Jones commit 0b7cbe811ca524295ea43d9a4d73d3427e419c54 Author: Tony Lindgren Date: Sat May 22 08:10:01 2021 +0300 mfd: cpcap: Fix cpcap dmamask not set warnings We have started to get a bunch of pointless dmamask not set warnings that makes the output of dmesg -l err,warn hard to read with many extra warnings: cpcap-regulator cpcap-regulator.0: DMA mask not set cpcap_adc cpcap_adc.0: DMA mask not set cpcap_battery cpcap_battery.0: DMA mask not set cpcap-charger cpcap-charger.0: DMA mask not set cpcap-pwrbutton cpcap-pwrbutton.0: DMA mask not set cpcap-led cpcap-led.0: DMA mask not set cpcap-led cpcap-led.1: DMA mask not set cpcap-led cpcap-led.2: DMA mask not set cpcap-led cpcap-led.3: DMA mask not set cpcap-led cpcap-led.4: DMA mask not set cpcap-rtc cpcap-rtc.0: DMA mask not set cpcap-usb-phy cpcap-usb-phy.0: DMA mask not set This seems to have started with commit 4d8bde883bfb ("OF: Don't set default coherent DMA mask"). We have the parent SPI controller use DMA, while CPCAP driver and it's children do not. For audio, the DMA is handled over I2S bus with the McBSP driver. Cc: Carl Philipp Klemm Cc: Ivan Jelincic Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Cc: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren Signed-off-by: Lee Jones commit 33d550701b915938bd35ca323ee479e52029adf2 Author: Hans de Goede Date: Fri May 21 15:50:23 2021 +0200 mfd: arizona: Allow building arizona MFD-core as module There is no reason why the arizona core,irq and codec model specific regmap bits cannot be build as a module. All they do is export symbols which are used by the arizona-spi/i2c and arizona-codec modules, which themselves can be built as module. Change the Kconfig and Makefile arizona bits so that the arizona MFD-core can be built as a module. This is especially useful on x86 platforms with a WM5102 codec, this allows the arizona MFD driver necessary for the WM5102 codec to be enabled in generic distro-kernels without growing the base kernel-image size. Note this also adds an explicit "depends on MFD_ARIZONA" to all the arizona codec Kconfig options. The codec drivers use functions from mfd arizona-core. These new depends are necessary to disallow the codec drivers being builtin when the arizona-core is build as a module, otherwise we end up with missing symbol errors when building vmlinuz. Signed-off-by: Hans de Goede Acked-by: Charles Keepax Signed-off-by: Lee Jones commit f94c780172b397756da82c3de98f3965d34a2b94 Author: Linus Walleij Date: Tue May 18 16:51:32 2021 +0200 mfd: db8500-prcmu: Add devicetree bindings This driver was merged in the early days of device tree on Arm in 2012 and somehow we failed to provide bindings for it. Fix it up with some YAML bindings. Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 769b760872629982c80de5cb7b1a7816bdf99afc Author: Lee Jones Date: Wed Mar 31 09:15:36 2021 +0100 mfd: si476x-i2c: Fix incorrectly documented function names Fixes the following W=1 kernel build warning(s): drivers/mfd/si476x-i2c.c:360: warning: expecting prototype for si476x_drain_rds_fifo(). Prototype was for si476x_core_drain_rds_fifo() instead drivers/mfd/si476x-i2c.c:467: warning: expecting prototype for si476x_get_status(). Prototype was for si476x_core_get_status() instead drivers/mfd/si476x-i2c.c:484: warning: expecting prototype for si476x_get_and_signal_status(). Prototype was for si476x_core_get_and_signal_status() instead drivers/mfd/si476x-i2c.c:555: warning: expecting prototype for si476x_firmware_version_to_revision(). Prototype was for si476x_core_fwver_to_revision() instead drivers/mfd/si476x-i2c.c:619: warning: expecting prototype for si476x_get_revision_info(). Prototype was for si476x_core_get_revision_info() instead Cc: Lee Jones Cc: Andrey Smirnov Signed-off-by: Lee Jones commit ac85e26297a336da1716164ec6f56ed6ad59f052 Author: Lee Jones Date: Wed Mar 31 09:14:31 2021 +0100 mfd: si476x-cmd: Fix a bunch of incorrectly documented function names Fixes the following W=1 kernel build warning(s): drivers/mfd/si476x-cmd.c:406: warning: expecting prototype for si476x_cmd_func_info(). Prototype was for si476x_core_cmd_func_info() instead drivers/mfd/si476x-cmd.c:437: warning: expecting prototype for si476x_cmd_set_property(). Prototype was for si476x_core_cmd_set_property() instead drivers/mfd/si476x-cmd.c:463: warning: expecting prototype for si476x_cmd_get_property(). Prototype was for si476x_core_cmd_get_property() instead drivers/mfd/si476x-cmd.c:525: warning: expecting prototype for si476x_cmd_dig_audio_pin_cfg(). Prototype was for si476x_core_cmd_dig_audio_pin_cfg() instead drivers/mfd/si476x-cmd.c:574: warning: expecting prototype for si476x_cmd_zif_pin_cfg(). Prototype was for si476x_core_cmd_zif_pin_cfg() instead drivers/mfd/si476x-cmd.c:631: warning: expecting prototype for si476x_cmd_ic_link_gpo_ctl_pin_cfg(). Prototype was for si476x_core_cmd_ic_link_gpo_ctl_pin_cfg() instead drivers/mfd/si476x-cmd.c:662: warning: expecting prototype for si476x_cmd_ana_audio_pin_cfg(). Prototype was for si476x_core_cmd_ana_audio_pin_cfg() instead drivers/mfd/si476x-cmd.c:697: warning: expecting prototype for si476x_cmd_intb_pin_cfg(). Prototype was for si476x_core_cmd_intb_pin_cfg_a10() instead drivers/mfd/si476x-cmd.c:742: warning: expecting prototype for si476x_cmd_am_rsq_status(). Prototype was for si476x_core_cmd_am_rsq_status() instead drivers/mfd/si476x-cmd.c:874: warning: expecting prototype for si476x_cmd_fm_seek_start(). Prototype was for si476x_core_cmd_fm_seek_start() instead drivers/mfd/si476x-cmd.c:905: warning: expecting prototype for si476x_cmd_fm_rds_status(). Prototype was for si476x_core_cmd_fm_rds_status() instead drivers/mfd/si476x-cmd.c:1050: warning: expecting prototype for si476x_cmd_am_seek_start(). Prototype was for si476x_core_cmd_am_seek_start() instead Cc: Lee Jones Cc: Andrey Smirnov Signed-off-by: Lee Jones commit 140d61bb61ed4e8e647046e8e66ce7b4f4d132f2 Author: Lee Jones Date: Wed Mar 31 09:12:02 2021 +0100 mfd: omap-usb-tll: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/mfd/omap-usb-tll.c:24: warning: expecting prototype for omap(). Prototype was for USBTLL_DRIVER_NAME() instead Cc: Tony Lindgren Cc: Lee Jones Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 4a2833c622ab5a26d3d0c39af00ee0a52f1a620d Author: Lee Jones Date: Wed Mar 31 09:11:21 2021 +0100 mfd: omap-usb-host: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/mfd/omap-usb-host.c:26: warning: expecting prototype for omap(). Prototype was for USBHS_DRIVER_NAME() instead Cc: Tony Lindgren Cc: Lee Jones Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit e00a953b7adcd6a5c596daa228e61cc256901413 Author: Lee Jones Date: Wed Mar 31 09:11:00 2021 +0100 mfd: db8500-prcmu: Fix multiple incorrectly documented function names Fixes the following W=1 kernel build warning(s): drivers/mfd/db8500-prcmu.c:624: warning: expecting prototype for prcmu_get_current_mode(). Prototype was for prcmu_get_xp70_current_state() instead drivers/mfd/db8500-prcmu.c:908: warning: expecting prototype for db8500_set_ape_opp(). Prototype was for db8500_prcmu_set_ape_opp() instead drivers/mfd/db8500-prcmu.c:2303: warning: expecting prototype for db8500_prcmu_reset_modem(). Prototype was for db8500_prcmu_modem_reset() instead Cc: Linus Walleij Cc: Lee Jones Cc: Kumar Sanghvi Cc: Sundar Iyer Cc: Mattias Nilsson Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones commit 9b31ec3de743d8e438a35b048d01530ebb9d12e4 Author: Lee Jones Date: Wed Mar 31 09:10:18 2021 +0100 mfd: twl-core: Fix incorrect function name twl_regcache_bypass() Fixes the following W=1 kernel build warning(s): drivers/mfd/twl-core.c:496: warning: expecting prototype for twl_regcache_bypass(). Prototype was for twl_set_regcache_bypass() instead Cc: Tony Lindgren Cc: Lee Jones Cc: Kai Svahn Cc: syed khasim Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 926337b211d7936be45af9ee09f6d2107a58f998 Author: Lee Jones Date: Wed Mar 31 09:09:46 2021 +0100 mfd: wm831x-core: Fix incorrect function name wm831x_reg_unlock() Fixes the following W=1 kernel build warning(s): drivers/mfd/wm831x-core.c:121: warning: expecting prototype for wm831x_reg_unlock(). Prototype was for wm831x_reg_lock() instead Cc: Lee Jones Cc: Mark Brown Cc: patches@opensource.cirrus.com Signed-off-by: Lee Jones commit 3a7e046acf26b10016e9be688633325f01600e2a Author: Lee Jones Date: Fri May 21 08:14:59 2021 +0100 Revert "MAINTAINERS: Add entry for Intel MAX 10 mfd driver" This reverts commit 58d91f1c1701de9420acc43a2f4f8004af85c363. This is a duplicate. Reported-by: Russ Weight Signed-off-by: Lee Jones commit db39579acf38a92a37cd85e44f9a94e0fa92990f Author: Marc Zyngier Date: Thu May 20 17:37:15 2021 +0100 mfd: ioc3: Directly include linux/irqdomain.h This driver include linux/irqdomain.h via a bizarre set of indirection, which we are about to break. Directly include the required file. Signed-off-by: Marc Zyngier Signed-off-by: Lee Jones commit 3efc465f91107a4c20eaeb386a90360262f1663f Author: Andre Przywara Date: Wed May 19 11:41:37 2021 +0100 mfd: axp20x: Allow AXP 806 chips without interrupt lines Currently the AXP chip requires to have its IRQ line connected to some interrupt controller, and will fail probing when this is not the case. On a new Allwinner SoC (H616) there is no NMI pin anymore, and at least one board does not connect the AXP's IRQ pin to anything else, so the interrupt functionality of the AXP chip is simply not available. Check whether the interrupt line number returned by the platform code is valid, before trying to register the irqchip. If not, we skip this registration, to avoid the driver to bail out completely. Also we need to skip the power key functionality, as this relies on a valid IRQ as well. Signed-off-by: Andre Przywara Signed-off-by: Lee Jones commit 3b0850440a06c54856fbb7afb6a366910462fa0a Author: Gene Chen Date: Tue May 18 01:33:14 2021 +0800 mfd: mt6360: Merge different sub-devices I2C read/write Merge different sub-devices I2C read/write functions into one Regmap, because PMIC and LDO part need CRC bits for access protection. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit b042c085de7aa89eedfe8df8388b19a0e6679a39 Author: Gene Chen Date: Tue May 18 01:33:13 2021 +0800 mfd: mt6360: Merge header file into driver and remove unuse register define Merge header file into driver and remove unuse register define Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit e84702940613accd46e4cee46c287badd59b7628 Author: Gene Chen Date: Tue May 18 01:33:12 2021 +0800 mfd: mt6360: Fix flow which is used to check ic exist Fix flow which is used to check ic exist. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit a75a2d56dc2f1a95a0b481eec74f60ff81a1b291 Author: Gene Chen Date: Tue May 18 01:33:11 2021 +0800 mfd: mt6360: Remove handle_post_irq callback function Remove handle_post_irq which is used to retrigger IRQ. Set IRQ level low trigger in dtsi to keep IRQ always be handled. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit 60a90b3579bea601552e650429d9f35039b83ed2 Author: Gene Chen Date: Tue May 18 01:33:10 2021 +0800 mfd: mt6360: Rename mt6360_pmu by mt6360 Rename mt6360_pmu by mt6360, because of including not only PMU part, but also entire MT6360 IC Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit e63ce9a5b3edad84e5f1b3ffb081da7c9847c641 Author: Gene Chen Date: Tue May 18 01:33:09 2021 +0800 mfd: mt6360: Rename mt6360_pmu_data by mt6360_ddata Rename mt6360_pmu_data by mt6360_ddata because of including not only PMU part, but also entire MT6360 IC. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit 4ee06e10dd26e81371f7da25a8a7e4c2f348aa4f Author: Gene Chen Date: Tue May 18 01:33:08 2021 +0800 mfd: mt6360: Combine mt6360 pmic/ldo resources into mt6360 regulator resources Combine mt6360 pmic/ldo resources into mt6360 regulator resources to simplify the similar resources object. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit 12f3f131948f62eef07a0dfddbc6e97ebc9d6004 Author: Gene Chen Date: Tue May 18 01:33:07 2021 +0800 mfd: mt6360: Indicate sub-dev compatible name by using "-" Indicate sub-dev compatible name by using "-". Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit 50e89312e39dff9e779e267fc191249a27294f39 Author: Gene Chen Date: Tue May 18 01:33:06 2021 +0800 mfd: mt6360: Remove redundant brackets around raw numbers Remove redundant brackets around raw numbers. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit 137871bce20c9fd2c916ce7f6052b6c185a9ac52 Author: Gene Chen Date: Tue May 18 01:33:05 2021 +0800 mfd: mt6360: Rearrange include file Rearrange include file without sorting by alphabet. Signed-off-by: Gene Chen Signed-off-by: Lee Jones commit 037dd2f023516be217199def5a3079c6b284d4de Author: ChiYuan Huang Date: Mon May 17 22:36:00 2021 +0800 mfd: rt4831: Adds DT binding document for Richtek RT4831 Adds DT binding document for Richtek RT4831. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 3367ac3ea0dc0d8b7a9471fe75d0f1ce3e1922a4 Author: ChiYuan Huang Date: Mon May 17 22:35:58 2021 +0800 mfd: rt4831: Adds support for Richtek RT4831 This adds support Richtek RT4831 core. It includes four channel WLED driver and Display Bias Voltage outputs. Signed-off-by: ChiYuan Huang Signed-off-by: Lee Jones commit 4f10f31e72582bb68ebd39505e2f2f5ce906eb47 Author: ChiYuan Huang Date: Mon May 17 22:35:59 2021 +0800 backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit a1649a5260631979c68e5b2012f60f90300e646f Author: Andreas Kemnade Date: Sat May 15 22:55:18 2021 +0200 mfd: rn5t618: Fix IRQ trigger by changing it to level mode During more massive generation of interrupts, the IRQ got stuck, and the subdevices did not see any new interrupts. That happens especially at wonky USB supply in combination with ADC reads. To fix that trigger the IRQ at level low instead of falling edge. Fixes: 0c81604516af ("mfd: rn5t618: Add IRQ support") Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit bd8a0974430638f2c79cb411303d176230c89e6e Author: Tian Tao Date: Thu May 13 20:32:25 2021 +0800 mfd: max8907: Move to use request_irq by IRQF_NO_AUTOEN flag This change is just to simplify the code, no actual functional changes. Signed-off-by: Tian Tao Signed-off-by: Lee Jones commit 80cf16de33a29b45a0bbfd74b0cf65fdb458f7bf Author: Ikjoon Jang Date: Wed May 12 18:08:31 2021 +0800 mfd: google,cros-ec: add DT bindings for a baseboard's switch device This is for ChromeOS tablets which have a 'cros_cbas' switch device in the "Whiskers" base board. This device can be instantiated only by device tree on ARM platforms. ChromeOS EC doesn't provide a way to probe the device. Signed-off-by: Ikjoon Jang Reviewed-by: Rob Herring Acked-by: Enric Balletbo i Serra Signed-off-by: Lee Jones commit 50e4d7a2a667353321d4315fcc025e76c4fa2a89 Author: Luca Ceresoli Date: Fri Feb 26 15:28:52 2021 +0100 mfd: lp87565: Handle optional reset pin Optionally handle the NRST pin (active low reset) in order to start from a known state during boot and to shut down the chip when rebooting. Signed-off-by: Luca Ceresoli Signed-off-by: Lee Jones commit 4700ef326556ed74aba188f12396740a8c1c21dd Author: Zou Wei Date: Wed May 12 14:33:46 2021 +0800 mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE This patch adds/modifies MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Lee Jones commit 56a1188159cb2b87fbcb5a7a7afb38a4dd9db0c1 Author: Limeng Date: Wed Apr 7 13:25:25 2021 +0800 mfd: syscon: Free the allocated name field of struct regmap_config The commit 529a1101212a("mfd: syscon: Don't free allocated name for regmap_config") doesn't free the allocated name field of struct regmap_config, but introduce a memory leak. There is another commit 94cc89eb8fa5("regmap: debugfs: Fix handling of name string for debugfs init delays") fixing this debugfs init issue from root cause. With this fixing, the name field in struct regmap_debugfs_node is removed. When initialize debugfs for syscon driver, the name field of struct regmap_config is not used anymore. So, the allocated name field of struct regmap_config is need to be freed directly after regmap initialization to avoid memory leak. Cc: stable@vger.kernel.org Fixes: 529a1101212a("mfd: syscon: Don't free allocated name for regmap_config") Signed-off-by: Meng Li Signed-off-by: Lee Jones commit 5a23e8b0fd6010e25ae58362292235cc9213ca57 Author: Andy Shevchenko Date: Mon May 10 17:15:52 2021 +0300 mfd: Remove software node conditionally and locate at right place Currently the software node is removed in error case and at ->remove() stage unconditionally, that ruins the symmetry. Besides, in some cases, when mfd_add_device() fails, the device_remove_software_node() call may lead to NULL pointer dereference: BUG: kernel NULL pointer dereference, address: 00000000 ... EIP: strlen+0x12/0x20 ... kernfs_name_hash+0x13/0x70 kernfs_find_ns+0x32/0xc0 kernfs_remove_by_name_ns+0x2a/0x90 sysfs_remove_link+0x16/0x30 software_node_notify.cold+0x34/0x6b device_remove_software_node+0x5a/0x90 mfd_add_device.cold+0x30a/0x427 Fix all these by guarding device_remove_software_node() with a conditional and locating it at the right place. Fixes: 42e59982917a ("mfd: core: Add support for software nodes") Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit f62da567d8ad76185a5232a4e0250576773a1c0c Author: Srinivas Kandagatla Date: Mon May 10 10:12:39 2021 +0100 mfd: wcd934x: Add additional interrupts required for MBHC support WCD934x supports Multi Button Headset control which enable headset detection along with headset button detection. This patch adds interrupts required for MBHC functionality. Signed-off-by: Srinivas Kandagatla Signed-off-by: Lee Jones commit a7618119c2549378b016252eafa0b7209681229d Author: Srinivas Kandagatla Date: Mon May 10 10:12:38 2021 +0100 mfd: wcd934x: Add macro for adding new interrupts Currently only two interrupts supported is added in wcd934x interrupt controller, however if we are adding more interrupts the file will become too much unreadable. So add a macro to make adding new interrupts easy and also convert existing slim and soundwire interrupts to use it. This is in preparation to enable Multi Button Headset Control support on this codec. WCD934x supports Multi Button Headset control which enable headset detection along with headset button detection. This patch adds interrupts required for MBHC functionality. Signed-off-by: Srinivas Kandagatla Signed-off-by: Lee Jones commit 608b1bf1cd0a6b1ffb572d4fff9353a140174dbb Author: Jian Dong Date: Fri May 7 17:21:35 2021 +0800 mfd: si476x-cmd: Fix two typos of 'returned' Fix two typos retured --> returned Signed-off-by: Jian Dong Signed-off-by: Lee Jones commit 34b6677e067998122a5082691c2a3a7a6a50ea79 Author: Mattijs Korpershoek Date: Thu May 6 11:41:15 2021 +0200 mfd: mt6397: Add PMIC keys for MT6358 Add compatible strings and interrupts for pmic keys which serves as child device of MFD. MT6358 has two interrupts per key: one for press, another one for release (_R) Signed-off-by: Mattijs Korpershoek Signed-off-by: Lee Jones commit 7addf7e705c897d78f5b0f829cb7626a9279ec1e Author: Mattijs Korpershoek Date: Thu May 6 11:41:14 2021 +0200 mfd: mt6397: Use named IRQs instead of index (keys) Some pmics of the mt6397 family (such as MT6358), have two IRQs per physical key: one for press event, another for release event. The mtk-pmic-keys driver assumes that each key only has one IRQ. The key index and the RES_IRQ resource index have a 1/1 mapping. This won't work for MT6358, as we have multiple resources (2) for one key. To prepare mtk-pmic-keys to support MT6358, retrieve IRQs by name instead of by index. Note: The keys_resources are not part of the device-tree bindings so this won't break any DT schemas. Signed-off-by: Mattijs Korpershoek Signed-off-by: Lee Jones commit 9a2601ebc2e909ec2260ca224d886936f56d41e7 Author: Mattijs Korpershoek Date: Thu May 6 11:41:13 2021 +0200 mfd: mt6397: Add MT6358 register definitions for power key To support power/home key detection, add definitions for two more MT6358 PMIC registers: - TOPSTATUS: homekey and powerkey debounce status - TOP_RST_MISC: controls homekey,powerkey long press reset time Signed-off-by: Mattijs Korpershoek Signed-off-by: Lee Jones commit a933272041d852a1ef1c85f0c18b93e9999a41fa Author: Randy Dunlap Date: Mon May 3 19:32:18 2021 -0700 mfd: mp2629: Select MFD_CORE to fix build error MFD_MP2629 should select MFD_CORE to a prevent build error: ERROR: modpost: "devm_mfd_add_devices" [drivers/mfd/mp2629.ko] undefined! Fixes: 06081646450e ("mfd: mp2629: Add support for mps battery charger") Signed-off-by: Randy Dunlap Signed-off-by: Lee Jones commit 9fb3cad02517cd34311c8ba15c5d78027c63db02 Author: Andy Shevchenko Date: Wed Apr 14 17:29:43 2021 +0300 mfd: intel-lpss: Add Intel Alder Lake-M PCI IDs Add Intel Alder Lake-M LPSS PCI IDs. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 1c4565f55b86bdb11ca5ec2b568fb198049c60ef Merge: ef7570b67541d 5258f7eed42f4 4cfc965475124 Author: Lee Jones Date: Wed Jun 2 10:48:48 2021 +0100 Merge tags 'tb-mfd-asoc-v5.14-1', 'tb-mfd-gpio-regulator-v5.14' and 'tb-mfd-regulator-rtc-v5.14' into ibs-for-mfd-merged Immutable branch between MFD and ASoC due for the v5.14 merge window Immutable branch between MFD, GPIO and Regulator due for the v5.14 merge window Immutable branch between MFD, Regulator and RTC due for the v5.14 merge window commit dc794d3d24246588d4db88c9d2c2ad67273027fd Author: Sakari Ailus Date: Mon Apr 12 13:04:33 2021 +0200 media: staging: ipu3-imgu: Move the UAPI header from include under include/uapi The header defines the user space interface but may be mistaken as kernel-only header due to its location. Add "uapi" directory under driver's include directory and move the header there. Suggested-by: Greg KH Signed-off-by: Sakari Ailus Reviewed-by: Bingbu Cao Signed-off-by: Mauro Carvalho Chehab commit ff3cc65cadb5d7333fde557b38cbb60b3a6cf496 Author: Sakari Ailus Date: Fri Mar 5 18:38:39 2021 +0100 media: v4l: async, fwnode: Improve module organisation The V4L2 async framework is generally used with the V4L2 fwnode, which also depends on the former. There are a few exceptions but they are relatively few. At the same time there is a vast number of systems that need videodev module, but have no use for v4l2-async that's now part of videodev. In order to improve, split the v4l2-async into its own module. Selecting V4L2_FWNODE also selects V4L2_ASYNC. This also moves the initialisation of the debufs entries for async subdevs to loading of the v4l2-async module. The directory is named as "v4l2-async". Signed-off-by: Sakari Ailus Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit 1cb13613735a15b994b680ae5ef18aaf79108b95 Author: Hans Verkuil Date: Wed Jun 2 10:42:28 2021 +0200 media: mc-request.c: allow object_bind in QUEUED state If a request was queued without a control handler object, and a control handler object is then created and bound to the request when copying controls on request completion, then a WARN_ON in mc-request.c is triggered since at that time the request is in state QUEUED, and not UPDATING. But this is too strict, and in this case it must also allow binding objects when in state QUEUED. This patch was unfortunately lost when the "always copy the controls on completion" patch was posted, it should have been part of that commit. Signed-off-by: Hans Verkuil Fixes: c3bf5129f339 ("media: v4l2-ctrls: always copy the controls on completion") Signed-off-by: Mauro Carvalho Chehab commit 8f4caef8d5401b42c6367d46c23da5e0e8111516 Author: Zhihao Cheng Date: Tue Jun 1 09:19:35 2021 +0000 drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest() In case of error, the function live_context() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/33c46ef24cd547d0ad21dc106441491a@intel.com [tursulin: Wrap commit text, fix Fixes: tag.] Signed-off-by: Tvrtko Ursulin commit 177f30c6c1b9c016df312decd14b4fc05e7f1f45 Author: YueHaibing Date: Fri May 28 18:04:03 2021 +0800 drm/i915: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210528100403.21548-1-yuehaibing@huawei.com commit b998a59f82f1152605eae4f7617778020549e81a Author: Mauro Carvalho Chehab Date: Mon May 31 22:34:24 2021 +0200 media: sp8870: move it to staging This driver is used only by av7110, which is preparing for its retirement. So, move this ancillary driver to stay together with av7110. Signed-off-by: Mauro Carvalho Chehab commit 989cf18ed08f8b6efd1d1592d1d0108fa09b98f5 Author: Mauro Carvalho Chehab Date: Mon May 31 17:27:09 2021 +0200 media: av7110: move driver to staging This driver is really old, from devices that aren't manufactured anymore for more than a decade. Also, the decoder supports only MPEG2, with is not compatible with several modern DVB streams. It is also the only upstream driver relying on the DVB "full-featured" API. Some changes at the frontend drivers seem to have broken it without anybody noticing. Due to that, it sounds it is time to retire the driver for good. Signed-off-by: Mauro Carvalho Chehab commit de646852cdadf7da2267e06297f7f6fe22dfb899 Author: Mauro Carvalho Chehab Date: Mon May 31 17:05:45 2021 +0200 media: move ttpci-eeprom to common The ttpci-eeprom is actually an independent driver that doesn't depend on the stuff under drivers/media/pci/ttpci/. Also, it is used by an USB driver (pctv452e). So, move it to the common directory. Signed-off-by: Mauro Carvalho Chehab commit f13570e7e830ca4fbf4869015af8492b8918445e Author: Yang Yingliang Date: Tue May 18 12:42:47 2021 +0800 clk: tegra: tegra124-emc: Fix clock imbalance in emc_set_timing() After calling clk_prepare_enable(), clk_disable_unprepare() needs be called when prepare_timing_change() failed. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Thierry Reding commit d3116756a710e3cd51293a9d58b525957ab7e784 Author: Christian König Date: Mon Apr 12 15:11:47 2021 +0200 drm/ttm: rename bo->mem and make it a pointer When we want to decouble resource management from buffer management we need to be able to handle resources separately. Add a resource pointer and rename bo->mem so that all code needs to change to access the pointer instead. No functional change. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210430092508.60710-4-christian.koenig@amd.com commit 80c1c54a2aa3c5177f73fc5d505668df56fb28b6 Merge: 71c689dc2e732 8124c8a6b3538 Author: Mauro Carvalho Chehab Date: Wed Jun 2 10:59:50 2021 +0200 Merge tag 'v5.13-rc4' into media_tree Linux 5.13-rc4 * tag 'v5.13-rc4': (976 commits) Linux 5.13-rc4 seccomp: Refactor notification handler to prepare for new semantics selftests: kvm: fix overlapping addresses in memslot_perf_test KVM: X86: Kill off ctxt->ud KVM: X86: Fix warning caused by stale emulation context KVM: X86: Use kvm_get_linear_rip() in single-step and #DB/#BP interception Documentation: seccomp: Fix user notification documentation MAINTAINERS: adjust to removing i2c designware platform data perf vendor events powerpc: Fix eventcode of power10 JSON events Revert "serial: 8250: 8250_omap: Fix possible interrupt storm" i2c: s3c2410: fix possible NULL pointer deref on read message after write i2c: mediatek: Disable i2c start_en and clear intr_stat brfore reset perf stat: Fix error check for bpf_program__attach cifs: change format of CIFS_FULL_KEY_DUMP ioctl i2c: i801: Don't generate an interrupt on bus reset i2c: mpc: implement erratum A-004447 workaround powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P1010 i2c controllers powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers dt-bindings: i2c: mpc: Add fsl,i2c-erratum-a004447 flag i2c: busses: i2c-stm32f4: Remove incorrectly placed ' ' from function name ... commit 854d128b8c6c4fa47810ac7cf87c16b8085c3199 Author: Yang Yingliang Date: Mon Apr 12 22:05:27 2021 +0800 soc/tegra: fuse: Don't return -ENOMEM when allocate lookups failed fuse->base can not be unmapped if allocate lookups failed in tegra_init_fuse(), because it is an early_initcall, the driver will be loaded anyway and fuse->base will be accessed by other functions later, so remove the return -ENOMEM after allocating lookups failed to make less confusing. Signed-off-by: Yang Yingliang [treding@nvidia.com: drop error message, out-of-memory is noisy anyway] Signed-off-by: Thierry Reding commit 029f7e24a65df641ac843cda8dabe359ff0826eb Author: Dmitry Osipenko Date: Tue Jun 1 05:31:19 2021 +0300 soc/tegra: regulators: Support core domain state syncing The core voltage shall not drop until state of core domain is synced, i.e. all device drivers that use core domain are loaded and ready. Support core domain state syncing. The core domain driver invokes the core-regulator voltage syncing once the state of domain is synced, at this point the core voltage is allowed to go lower than the level left after bootloader. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Reviewed-by: Ulf Hansson Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 41bafa698ddd07533914f34aeb432e762ed0cd30 Author: Dmitry Osipenko Date: Tue Jun 1 05:31:18 2021 +0300 soc/tegra: pmc: Add driver state syncing Add driver state syncing that is invoked once all PMC consumers are attached and ready. The consumers are the power domain clients. The synchronization callback is invoked once all client drivers are probed, the driver core handles this for us. This callback informs PMC driver that all voltage votes are initialized by each PD client and it's safe to begin voltage scaling of the core power domain. Signed-off-by: Dmitry Osipenko Reviewed-by: Ulf Hansson [treding@nvidia.com: squash DT backwards-compatibility patch] Signed-off-by: Thierry Reding commit f880ee9e96887786dc21e9433ede1719bc3b2624 Author: Dmitry Osipenko Date: Tue Jun 1 05:31:17 2021 +0300 soc/tegra: pmc: Add core power domain NVIDIA Tegra SoCs have multiple power domains, each domain corresponds to an external SoC power rail. Core power domain covers vast majority of hardware blocks within a Tegra SoC. The voltage of a power domain should be set to a level which satisfies all devices within the power domain. Add support for the core power domain which controls voltage state of the domain. This allows us to support system-wide DVFS on Tegra20-210 SoCs. The PMC powergate domains now are sub-domains of the core domain, this requires device-tree updating, older DTBs are unaffected and will continue to work as before. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Reviewed-by: Ulf Hansson [treding@nvidia.com: squash lockdep class removal patch] Signed-off-by: Thierry Reding commit 14a832498c23cf480243222189066a8006182b9d Author: Colin Ian King Date: Tue Jun 1 11:37:07 2021 +0100 arch: microblaze: Fix spelling mistake "vesion" -> "version" There is a spelling mistake in the comment. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210601103707.9701-1-colin.king@canonical.com Signed-off-by: Michal Simek commit ec7e22abec97b6bd577027380077ec395864a3c5 Author: Bartosz Dudziak Date: Sun May 2 14:20:26 2021 +0200 dt-bindings: clock: qcom: rpmcc: Document MSM8226 compatible Add the dt-binding for the RPM Clock Controller on the MSM8226 SoC. Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210502122027.9351-4-bartosz.dudziak@snejp.pl Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 2ebdd326d19954c4705bf4417f33e765bff70c8e Author: Bjorn Andersson Date: Mon May 10 23:17:19 2021 -0500 clk: qcom: dispcc-sm8250: Add EDP clocks Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210511041719.591969-2-bjorn.andersson@linaro.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 8ff48c82df66bf8864070922b9d7ddcfd8ab2918 Author: Bjorn Andersson Date: Mon May 10 23:17:18 2021 -0500 clk: qcom: dispcc-sm8250: Add sc8180x support The display clock controller in SC8180x is reused from SM8150, so add the necessary compatible and wire up the driver to enable this. Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210511041719.591969-1-bjorn.andersson@linaro.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit a0384ecfe2aa8f3da7a845dbe9e13c8d38e14ffd Author: Konrad Dybcio Date: Tue May 25 00:54:56 2021 +0200 clk: qcom: smd-rpm: De-duplicate identical entries It makes negative sense to keep repeating the same definitions over and over and over and over again, just with changed names.. De-duplicate to make for a drastically smaller file size. This makes the object file size 55% smaller according to bloat-o-meter: Total: Before=70713, After=31353, chg -55.66% Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210524225456.398817-2-konrad.dybcio@somainline.org Signed-off-by: Stephen Boyd commit 52a436e0b7fe00e3f23fa8a7c757ee7a6fbcf3e9 Author: Konrad Dybcio Date: Tue May 25 00:54:55 2021 +0200 clk: qcom: smd-rpm: Switch to parent_data Switch to parent_data and with that fix the longstanding issue where if there wasn't a clock precisely named "xo_board", rpmcc would not play along well. This started to show lately when "xo_board" was being changed to "xo-board" so as to align with DTS naming spec. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210524225456.398817-1-konrad.dybcio@somainline.org Signed-off-by: Stephen Boyd commit 48b7253264eadc05a3d84db9ea11eef528a0108a Author: Konrad Dybcio Date: Sat Mar 13 03:03:08 2021 +0100 clk: qcom: Add MDM9607 GCC driver Add Global Clock Controller (GCC) support for MDM9607 SoC. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210313020310.386152-2-konrad.dybcio@somainline.org [sboyd@kernel.org: Drop clk.h include] Signed-off-by: Stephen Boyd commit 942baad211336efefb93a8369478888ab845c450 Merge: 35cbd91eb541e ccd1950c2f7e3 Author: Joonas Lahtinen Date: Wed Jun 2 10:18:45 2021 +0300 Merge drm/drm-next into drm-intel-gt-next Pulling in -rc2 fixes and TTM changes that next upcoming patches depend on. Signed-off-by: Joonas Lahtinen commit ef7570b67541d8b938df1e45f56e54be70bf1360 Author: Chris Morgan Date: Tue Jun 1 16:44:24 2021 -0500 ASoC: rk817: fix a warning in rk817_probe() The return value of snd_soc_component_write() is stored but not evaluated and this results in a warning when W=1 is set. Stop storing the return value to be consistent with all other calls of snd_soc_component_write() and to remove the warning. Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support") Signed-off-by: Chris Morgan Signed-off-by: Lee Jones commit 9ce650a75a3b262c90789b42aedee8fc2ee04d53 Author: Takashi Iwai Date: Tue Jun 1 18:24:57 2021 +0200 ALSA: usb-audio: Reduce latency at playback start USB-audio driver behaves a bit strangely for the playback stream -- namely, it starts sending silent packets at PCM prepare state while the actual data is submitted at first when the trigger START is kicked off. This is a workaround for the behavior where URBs are processed too quickly at the beginning. That is, if we start submitting URBs at trigger START, the first few URBs will be immediately completed, and this would result in the immediate period-elapsed calls right after the start, which may confuse applications. OTOH, submitting the data after silent URBs would, of course, result in a certain delay of the actual data processing, and this is rather more serious problem on modern systems, in practice. This patch tries to revert the workaround and lets the URB submission starting at PCM trigger for the playback again. As far as I've tested with various backends (native ALSA, PA, JACK, PW), I haven't seen any problems (famous last words :) Note that the capture stream handling needs no such workaround, since the capture is driven per received URB. Link: https://lore.kernel.org/r/20210601162457.4877-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4f083917994fdde40a86e51c4ee0af5a61182117 Author: Takashi Iwai Date: Tue Jun 1 18:24:56 2021 +0200 ALSA: usb-audio: Factor out DSD bitrev copy function Just minor code refactoring. Like DOP DSD code, it can be better in a separate function for code readability. Link: https://lore.kernel.org/r/20210601162457.4877-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit e8a8f09cb0b3b82dfacd6a7fce5c99bdf239c5dc Author: Takashi Iwai Date: Tue Jun 1 18:24:55 2021 +0200 ALSA: usb-audio: Refactoring delay account code The PCM delay accounting in USB-audio driver is a bit complex to follow, and this is an attempt to improve the readability and provide some potential fix. Basically, the PCM position delay is calculated from two factors: the in-flight data on URBs and the USB frame counter. For the playback stream, we advance the hwptr already at submitting URBs. Those "in-flight" data amount is now tracked, and this is used as the base value for the PCM delay correction. The in-flight data is decreased again at URB completion in return. For the capture stream, OTOH, there is no in-flight data, hence the delay base is zero. The USB frame counter is used in addition for correcting the current position. The reference frame counter is updated at each submission and receiving time, and the difference from the current counter value is taken into account. In this patch, each in-flight data bytes is recorded in the new snd_usb_ctx.queued field, and the total in-flight amount is tracked in snd_usb_substream.inflight_bytes field, as the replacement of last_delay field. Note that updating the hwptr after URB completion doesn't work for PulseAudio who tries to scratch the buffer on the fly; USB-audio is basically a double-buffer implementation, hence the scratching the buffer can't work for the already submitted data. So we always update hwptr beforehand. It's not ideal, but the delay account should give enough correctness. Link: https://lore.kernel.org/r/20210601162457.4877-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit d303c5d38b37eed066c0f704c5a76353bce27284 Author: Takashi Iwai Date: Tue Jun 1 18:24:54 2021 +0200 ALSA: usb-audio: Pre-calculate buffer byte size There are a bunch of lines calculating the buffer size in bytes at each time. Keep the value in subs->buffer_bytes and use it consistently for the code simplicity. Link: https://lore.kernel.org/r/20210601162457.4877-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit cdebd5530360cfd6240b1692a4c60212a2e39c8a Author: Takashi Iwai Date: Tue Jun 1 18:24:53 2021 +0200 ALSA: usb-audio: Make snd_usb_pcm_delay() static It's a local function, let's make it static. Link: https://lore.kernel.org/r/20210601162457.4877-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit f2ac3b839540ec9203debac034003d0663db1e18 Author: Takashi Sakamoto Date: Wed Jun 2 10:34:06 2021 +0900 ALSA: firewire-motu: sequence replay for source packet header This commit takes ALSA firewire-motu driver to perform sequence replay for media clock recovery. Unlike the other types of device, the devices in MOTU FireWire series require two levels of sequence replay; the sequence of the number of data blocks per packet and the sequence of source packet header per data block. The former is already cached by ALSA IEC 61883-1/6 packet streaming engine and ready to be replayed. The latter is also cached by ALSA firewire-motu driver itself with a previous patch. This commit takes the driver to replay both of them from the caches. The sequence replay is tested with below models: * 828 mkII * Traveler * UltraLite * 828 mk3 FireWire * 828 mk3 Hybrid (except for high sampling transfer frequency * UltraLite mk3 FireWire * 4pre * AudioExpress Unfortunately, below models still don't generate better sound, requires more work: * 8pre * 828 mk3 Hybrid at high sampling transfer frequency As long as I know, MOTU protocol version 1 requires extra care of the format of data block, thus below models are not supported yet in this time: * 828 * 896 Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210602013406.26442-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e50dfac81f733ec379f3b0c6025b5720cf6880df Author: Takashi Sakamoto Date: Wed Jun 2 10:34:05 2021 +0900 ALSA: firewire-motu: cache event ticks in source packet header per data block The devices in MOTU FireWire series put source packet header (SPH) into each data block of tx packet for presentation time of event. The format of timestamp is compliant to IEC 61883-1, with cycle and offset fields without sec field of 32 bit cycle time. This commit takes ALSA firewire-motu driver to cache the presentation time as offset from cycle in which the packet is transferred. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210602013406.26442-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 138d1bceee6a3baaf2555725bf5b3e44b02a65e4 Author: Takashi Sakamoto Date: Wed Jun 2 10:34:04 2021 +0900 ALSA: firewire-motu: use macro for magic numbers relevant to IEC 61883-1 ALSA firewire-motu driver has some magic numbers from IEC 61883-1 to operates source packet header (SPH). This commit replaces them with macros. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210602013406.26442-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6faa7e4ddce6ddd5e93b0e521537e0360c7dac2b Author: Konrad Dybcio Date: Sat Mar 13 03:03:07 2021 +0100 dt-bindings: clock: Add MDM9607 GCC clock bindings Add device tree bindings for global clock controller on MDM9607 SoC. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210313020310.386152-1-konrad.dybcio@somainline.org Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 791ad7f5c17ea3d0887b94eed1e7812777f8e496 Author: Zheng Yongjun Date: Wed Jun 2 14:56:03 2021 +0800 batman-adv: Fix spelling mistakes Fix some spelling mistakes in comments: containg ==> containing dont ==> don't datas ==> data brodcast ==> broadcast Signed-off-by: Zheng Yongjun Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 06abc7537686ad013825bef6aa0f03fd484ca5ad Author: Yang Yingliang Date: Tue Jun 1 19:41:54 2021 +0800 clk: analogbits: fix doc warning in wrpll-cln28hpc.c Fix the following make W=1 warning: drivers/clk/analogbits/wrpll-cln28hpc.c:227: warning: expecting prototype for wrpll_configure(). Prototype was for wrpll_configure_for_rate() instead Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210601114154.3163327-1-yangyingliang@huawei.com Signed-off-by: Stephen Boyd commit c37f1cdd1fc9b128f254c9fb3ec81d0df3cc6117 Author: Yang Li Date: Mon May 24 18:22:10 2021 +0800 clk: sifive: Fix kernel-doc Fix function name in sifive-prci.c kernel-doc comment to remove a warning. drivers/clk/sifive/sifive-prci.c:573: warning: expecting prototype for sifive_prci_init(). Prototype was for sifive_prci_probe() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1621851730-32287-1-git-send-email-yang.lee@linux.alibaba.com Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Stephen Boyd commit 1ff28f229bc7fe36735684b25e63b528dbb962a5 Merge: ed1b86ba0fba3 3d45cefc8edd7 Author: Martin K. Petersen Date: Wed Jun 2 01:33:12 2021 -0400 Merge branch '5.14/scsi-result' into 5.14/scsi-staging Include Hannes' SCSI command result rework in the staging branch. [mkp: remove DRIVER_SENSE from mpi3mr] Signed-off-by: Martin K. Petersen commit ed1b86ba0fba3d586cd53057551a95197b0a37ad Author: Mike Christie Date: Tue May 25 13:18:21 2021 -0500 scsi: qedi: Wake up if cmd_cleanup_req is set If we got a response then we should always wake up the conn. For both the cmd_cleanup_req == 0 or cmd_cleanup_req > 0, we shouldn't dig into iscsi_itt_to_task because we don't know what the upper layers are doing. We can also remove the qedi_clear_task_idx call here because once we signal success libiscsi will loop over the affected commands and end up calling the cleanup_task callout which will release it. Link: https://lore.kernel.org/r/20210525181821.7617-29-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit b40f3894e39ee10d519ef2447d7e56e92a1e0863 Author: Mike Christie Date: Tue May 25 13:18:20 2021 -0500 scsi: qedi: Complete TMF works before disconnect We need to make sure that abort and reset completion work has completed before ep_disconnect returns. After ep_disconnect we can't manipulate cmds because libiscsi will call conn_stop and take onwership. We are trying to make sure abort work and reset completion work has completed before we do the cmd clean up in ep_disconnect. The problem is that: 1. the work function sets the QEDI_CONN_FW_CLEANUP bit, so if the work was still pending we would not see the bit set. We need to do this before the work is queued. 2. If we had multiple works queued then we could break from the loop in qedi_ep_disconnect early because when abort work 1 completes it could clear QEDI_CONN_FW_CLEANUP. qedi_ep_disconnect could then see that before work 2 has run. 3. A TMF reset completion work could run after ep_disconnect starts cleaning up cmds via qedi_clearsq. ep_disconnect's call to qedi_clearsq -> qedi_cleanup_all_io would might think it's done cleaning up cmds, but the reset completion work could still be running. We then return from ep_disconnect while still doing cleanup. This replaces the bit with a counter to track the number of queued TMF works, and adds a bool to prevent new works from starting from the completion path once a ep_disconnect starts. Link: https://lore.kernel.org/r/20210525181821.7617-28-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 60a0d379f11bc7449c92d21ca8956abff76be20f Author: Mike Christie Date: Tue May 25 13:18:19 2021 -0500 scsi: qedi: Pass send_iscsi_tmf task to abort qedi_abort_work knows what task to abort so just pass it to send_iscsi_tmf. Link: https://lore.kernel.org/r/20210525181821.7617-27-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 0c72191da68638a479602dd515b587ada913184a Author: Mike Christie Date: Tue May 25 13:18:18 2021 -0500 scsi: qedi: Fix cleanup session block/unblock use Drivers shouldn't be calling block/unblock session for cmd cleanup because the functions can change the session state from under libiscsi. This adds a new a driver level bit so it can block all I/O the host while it drains the card. Link: https://lore.kernel.org/r/20210525181821.7617-26-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2819b4ae2873d50fd55292877b0231ec936c3b2e Author: Mike Christie Date: Tue May 25 13:18:17 2021 -0500 scsi: qedi: Fix TMF session block/unblock use Drivers shouldn't be calling block/unblock session for tmf handling because the functions can change the session state from under libiscsi. iscsi_queuecommand's call to iscsi_prep_scsi_cmd_pdu-> iscsi_check_tmf_restrictions will prevent new cmds from being sent to qedi after we've started handling a TMF. So we don't need to try and block it in the driver, and we can remove these block calls. Link: https://lore.kernel.org/r/20210525181821.7617-25-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 140d63b73f42ea696ce7d34e7765e7c7eb121fdb Author: Mike Christie Date: Tue May 25 13:18:16 2021 -0500 scsi: qedi: Use GFP_NOIO for TMF allocation We run from a workqueue with no locks held so use GFP_NOIO. Link: https://lore.kernel.org/r/20210525181821.7617-24-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit f7eea75262fc8e4f2e329f36ac6daf42da95bbdc Author: Mike Christie Date: Tue May 25 13:18:15 2021 -0500 scsi: qedi: Fix TMF tid allocation qedi_iscsi_abort_work and qedi_tmf_work both allocate a tid then call qedi_send_iscsi_tmf which also allocates a tid. This removes the tid allocation from the callers. Link: https://lore.kernel.org/r/20210525181821.7617-23-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 5b04d050cde44c3c1a9a0342da50d785d075b0f6 Author: Mike Christie Date: Tue May 25 13:18:14 2021 -0500 scsi: qedi: Fix use after free during abort cleanup If qedi_tmf_work's qedi_wait_for_cleanup_request call times out we will also force the clean up of the qedi_work_map but qedi_process_cmd_cleanup_resp could still be accessing the qedi_cmd. To fix this issue we extend where we hold the tmf_work_lock and back_lock so the qedi_process_cmd_cleanup_resp access is serialized with the cleanup done in qedi_tmf_work and any completion handling for the iscsi_task. Link: https://lore.kernel.org/r/20210525181821.7617-22-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2ce002366a3fcc3f9616d4583194f65dde0ad253 Author: Mike Christie Date: Tue May 25 13:18:13 2021 -0500 scsi: qedi: Fix race during abort timeouts If the SCSI cmd completes after qedi_tmf_work calls iscsi_itt_to_task then the qedi qedi_cmd->task_id could be freed and used for another cmd. If we then call qedi_iscsi_cleanup_task with that task_id we will be cleaning up the wrong cmd. Wait to release the task_id until the last put has been done on the iscsi_task. Because libiscsi grabs a ref to the task when sending the abort, we know that for the non-abort timeout case that the task_id we are referencing is for the cmd that was supposed to be aborted. A latter commit will fix the case where the abort times out while we are running qedi_tmf_work. Link: https://lore.kernel.org/r/20210525181821.7617-21-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 5777b7f0f03ce49372203b6521631f62f2810c8f Author: Mike Christie Date: Tue May 25 13:18:12 2021 -0500 scsi: qedi: Fix null ref during abort handling If qedi_process_cmd_cleanup_resp finds the cmd it frees the work and sets list_tmf_work to NULL, so qedi_tmf_work should check if list_tmf_work is non-NULL when it wants to force cleanup. Link: https://lore.kernel.org/r/20210525181821.7617-20-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit a1f3486b3b095ed2259d7a1fc021a8b6e72a5365 Author: Mike Christie Date: Tue May 25 13:18:11 2021 -0500 scsi: iscsi: Move pool freeing This doesn't fix any bugs, but it makes more sense to free the pool after we have removed the session. At that time we know nothing is touching any of the session fields, because all devices have been removed and scans are stopped. Link: https://lore.kernel.org/r/20210525181821.7617-19-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 99b0603313eecb9b0b99fd2e60bae1e03e6b038b Author: Mike Christie Date: Tue May 25 13:18:10 2021 -0500 scsi: iscsi: Hold task ref during TMF timeout handling For aborts, qedi needs to cleanup the FW then send the TMF from a worker thread. While it's doing these the cmd could complete normally and the TMF could time out. libiscsi would then complete the iscsi_task which will call into the driver to cleanup the driver level resources while it still might be accessing them for the cleanup/abort. This has iscsi_eh_abort keep the iscsi_task ref if the TMF times out, so qedi does not have to worry about if the task is being freed while in use and does not need to get its own ref. Link: https://lore.kernel.org/r/20210525181821.7617-18-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 7ce9fc5ecde0d8bd64c29baee6c5e3ce7074ec9a Author: Mike Christie Date: Tue May 25 13:18:09 2021 -0500 scsi: iscsi: Flush block work before unblock We set the max_active iSCSI EH works to 1, so all work is going to execute in order by default. However, userspace can now override this in sysfs. If max_active > 1, we can end up with the block_work on CPU1 and iscsi_unblock_session running the unblock_work on CPU2 and the session and target/device state will end up out of sync with each other. This adds a flush of the block_work in iscsi_unblock_session. Link: https://lore.kernel.org/r/20210525181821.7617-17-michael.christie@oracle.com Fixes: 1d726aa6ef57 ("scsi: iscsi: Optimize work queue flush use") Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit f6f9645744702f4690e884e86523a7ce1895e221 Author: Mike Christie Date: Tue May 25 13:18:08 2021 -0500 scsi: iscsi: Fix completion check during abort races We have a ref to the task being aborted, so SCp.ptr will never be NULL. We need to use iscsi_task_is_completed to check for the completed state. Link: https://lore.kernel.org/r/20210525181821.7617-16-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit bdd4aad7ff92ae39c2e93c415bb6761cb8b584da Author: Mike Christie Date: Tue May 25 13:18:07 2021 -0500 scsi: iscsi: Fix shost->max_id use The iscsi offload drivers are setting the shost->max_id to the max number of sessions they support. The problem is that max_id is not the max number of targets but the highest identifier the targets can have. To use it to limit the number of targets we need to set it to max sessions - 1, or we can end up with a session we might not have preallocated resources for. Link: https://lore.kernel.org/r/20210525181821.7617-15-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit ec29d0ac29be366450a7faffbcf8cba3a6a3b506 Author: Mike Christie Date: Tue May 25 13:18:06 2021 -0500 scsi: iscsi: Fix conn use after free during resets If we haven't done a unbind target call we can race where iscsi_conn_teardown wakes up the EH thread and then frees the conn while those threads are still accessing the conn ehwait. We can only do one TMF per session so this just moves the TMF fields from the conn to the session. We can then rely on the iscsi_session_teardown->iscsi_remove_session->__iscsi_unbind_session call to remove the target and it's devices, and know after that point there is no device or scsi-ml callout trying to access the session. Link: https://lore.kernel.org/r/20210525181821.7617-14-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit fda290c5ae98b591797c96e55a2cfbd30d46a706 Author: Mike Christie Date: Tue May 25 13:18:05 2021 -0500 scsi: iscsi: Get ref to conn during reset handling The comment in iscsi_eh_session_reset is wrong and we don't wait for the EH to complete before tearing down the conn. This has us get a ref to the conn when we are not holding the eh_mutex/frwd_lock so it does not get freed from under us. Link: https://lore.kernel.org/r/20210525181821.7617-13-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit d39df158518ccc3bf24ee18082b5e100c8f014aa Author: Mike Christie Date: Tue May 25 13:18:04 2021 -0500 scsi: iscsi: Have abort handler get ref to conn If SCSI midlayer is aborting a task when we are tearing down the conn we could free the conn while the abort thread is accessing the conn. This has the abort handler get a ref to the conn so it won't be freed from under it. Note: this is not needed for device/target reset because we are holding the eh_mutex when accessing the conn. Link: https://lore.kernel.org/r/20210525181821.7617-12-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit b1d19e8c92cfb0ded180ef3376c20e130414e067 Author: Mike Christie Date: Tue May 25 13:18:03 2021 -0500 scsi: iscsi: Add iscsi_cls_conn refcount helpers There are a couple places where we could free the iscsi_cls_conn while it's still in use. This adds some helpers to get/put a refcount on the struct and converts an exiting user. Subsequent commits will then use the helpers to fix 2 bugs in the eh code. Link: https://lore.kernel.org/r/20210525181821.7617-11-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 788b71c54f21fd994071c77983fdf1a9c264fc95 Author: Mike Christie Date: Tue May 25 13:18:02 2021 -0500 scsi: iscsi: iscsi_tcp: Start socket shutdown during conn stop Make sure the conn socket shutdown starts before we start the timer to fail commands to upper layers. Link: https://lore.kernel.org/r/20210525181821.7617-10-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit c0920cd36f17f0729927b33009ca586be50e3d9b Author: Mike Christie Date: Tue May 25 13:18:01 2021 -0500 scsi: iscsi: iscsi_tcp: Set no linger Userspace (open-iscsi based tools at least) sets no linger on the socket to prevent stale data from being sent. However, with the in-kernel cleanup if userspace is not up the sockfd_put will release the socket without having set that sockopt. iscsid sets that opt at socket close time, but it seems ok to set this at setup time in the kernel for all tools. Link: https://lore.kernel.org/r/20210525181821.7617-9-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 23d6fefbb3f6b1cc29794427588b470ed06ff64e Author: Mike Christie Date: Tue May 25 13:18:00 2021 -0500 scsi: iscsi: Fix in-kernel conn failure handling Commit 0ab710458da1 ("scsi: iscsi: Perform connection failure entirely in kernel space") has the following regressions/bugs that this patch fixes: 1. It can return cmds to upper layers like dm-multipath where that can retry them. After they are successful the fs/app can send new I/O to the same sectors, but we've left the cmds running in FW or in the net layer. We need to be calling ep_disconnect if userspace is not up. This patch only fixes the issue for offload drivers. iscsi_tcp will be fixed in separate commit because it doesn't have a ep_disconnect call. 2. The drivers that implement ep_disconnect expect that it's called before conn_stop. Besides crashes, if the cleanup_task callout is called before ep_disconnect it might free up driver/card resources for session1 then they could be allocated for session2. But because the driver's ep_disconnect is not called it has not cleaned up the firmware so the card is still using the resources for the original cmd. 3. The stop_conn_work_fn can run after userspace has done its recovery and we are happily using the session. We will then end up with various bugs depending on what is going on at the time. We may also run stop_conn_work_fn late after userspace has called stop_conn and ep_disconnect and is now going to call start/bind conn. If stop_conn_work_fn runs after bind but before start, we would leave the conn in a unbound but sort of started state where IO might be allowed even though the drivers have been set in a state where they no longer expect I/O. 4. Returning -EAGAIN in iscsi_if_destroy_conn if we haven't yet run the in kernel stop_conn function is breaking userspace. We should have been doing this for the caller. Link: https://lore.kernel.org/r/20210525181821.7617-8-michael.christie@oracle.com Fixes: 0ab710458da1 ("scsi: iscsi: Perform connection failure entirely in kernel space") Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 9e5fe1700896c85040943fdc0d3fee0dd3e0d36f Author: Mike Christie Date: Tue May 25 13:17:59 2021 -0500 scsi: iscsi: Rel ref after iscsi_lookup_endpoint() Subsequent commits allow the kernel to do ep_disconnect. In that case we will have to get a proper refcount on the ep so one thread does not delete it from under another. Link: https://lore.kernel.org/r/20210525181821.7617-7-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit b25b957d2db1585602c2c70fdf4261a5641fe6b7 Author: Mike Christie Date: Tue May 25 13:17:58 2021 -0500 scsi: iscsi: Use system_unbound_wq for destroy_work Use the system_unbound_wq for async session destruction. We don't need a dedicated workqueue for async session destruction because: 1. perf does not seem to be an issue since we only allow 1 active work. 2. it does not have deps with other system works and we can run them in parallel with each other. Link: https://lore.kernel.org/r/20210525181821.7617-6-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 06c203a5566beecebb1f8838d026de8a61c8df71 Author: Mike Christie Date: Tue May 25 13:17:57 2021 -0500 scsi: iscsi: Force immediate failure during shutdown If the system is not up, we can just fail immediately since iscsid is not going to ever answer our netlink events. We are already setting the recovery_tmo to 0, but by passing stop_conn STOP_CONN_TERM we never will block the session and start the recovery timer, because for that flag userspace will do the unbind and destroy events which would remove the devices and wake up and kill the eh. Since the conn is dead and the system is going dowm this just has us use STOP_CONN_RECOVER with recovery_tmo=0 so we fail immediately. However, if the user has set the recovery_tmo=-1 we let the system hang like they requested since they might have used that setting for specific reasons (one known reason is for buggy cluster software). Link: https://lore.kernel.org/r/20210525181821.7617-5-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 27e986289e739d08c1a4861cc3d3ec9b3a60845e Author: Mike Christie Date: Tue May 25 13:17:56 2021 -0500 scsi: iscsi: Drop suspend calls from ep_disconnect libiscsi will now suspend the send/tx queue for the drivers so we can drop it from the drivers ep_disconnect. Link: https://lore.kernel.org/r/20210525181821.7617-4-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 891e2639deae721dc43764a44fa255890dc34313 Author: Mike Christie Date: Tue May 25 13:17:55 2021 -0500 scsi: iscsi: Stop queueing during ep_disconnect During ep_disconnect we have been doing iscsi_suspend_tx/queue to block new I/O but every driver except cxgbi and iscsi_tcp can still get I/O from __iscsi_conn_send_pdu() if we haven't called iscsi_conn_failure() before ep_disconnect. This could happen if we were terminating the session, and the logout timed out before it was even sent to libiscsi. Fix the issue by adding a helper which reverses the bind_conn call that allows new I/O to be queued. Drivers implementing ep_disconnect can use this to make sure new I/O is not queued to them when handling the disconnect. Link: https://lore.kernel.org/r/20210525181821.7617-3-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 1486a4f5c2f35da5743b56037b8bbfb4eb38fa61 Author: Mike Christie Date: Tue May 25 13:17:54 2021 -0500 scsi: iscsi: Add task completion helper This adds a helper to detect if a cmd has completed but is not yet freed. Link: https://lore.kernel.org/r/20210525181821.7617-2-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6143f6f6205267b7cd741e1d9ff1fec2cbbe4edf Author: Chandrakanth Patil Date: Fri May 28 18:43:07 2021 +0530 scsi: megaraid_sas: Update driver version to 07.717.02.00-rc1 Link: https://lore.kernel.org/r/20210528131307.25683-6-chandrakanth.patil@broadcom.com Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen commit 9bedd36e9146b34dda4d6994e3aa1d72bc6442c1 Author: Chandrakanth Patil Date: Fri May 28 18:43:06 2021 +0530 scsi: megaraid_sas: Handle missing interrupts while re-enabling IRQs While reenabling the IRQ after IRQ poll there may be a small window for the firmware to post the replies with interrupts raised. In that case the driver will not see the interrupts which leads to I/O timeout. This issue only happens when there are many I/O completions on a single reply queue. This forces the driver to switch between the interrupt and IRQ context. Make the driver process the reply queue one more time after enabling the IRQ. Link: https://lore.kernel.org/linux-scsi/20201102072746.27410-1-sreekanth.reddy@broadcom.com/ Link: https://lore.kernel.org/r/20210528131307.25683-5-chandrakanth.patil@broadcom.com Cc: Tomas Henzl Reported-by: kernel test robot Signed-off-by: Chandrakanth Patil Signed-off-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit ae6874ba4b43c5a00065f48599811a09d33b873d Author: Kashyap Desai Date: Fri May 28 18:43:05 2021 +0530 scsi: megaraid_sas: Early detection of VD deletion through RaidMap update Consider the case where a VD is deleted and the targetID of that VD is assigned to a newly created VD. If the sequence of deletion/addition of VD happens very quickly there is a possibility that second event (VD add) occurs even before the driver processes the first event (VD delete). As event processing is done in deferred context the device list remains the same (but targetID is re-used) so driver will not learn the VD deletion/additon. I/Os meant for the older VD will be directed to new VD which may lead to data corruption. Make driver detect the deleted VD as soon as possible based on the RaidMap update and block further I/O to that device. Link: https://lore.kernel.org/r/20210528131307.25683-4-chandrakanth.patil@broadcom.com Reported-by: kernel test robot Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen commit b5438f48fdd8e1c3f130d32637511efd32038152 Author: Chandrakanth Patil Date: Fri May 28 18:43:04 2021 +0530 scsi: megaraid_sas: Fix resource leak in case of probe failure The driver doesn't clean up all the allocated resources properly when scsi_add_host(), megasas_start_aen() function fails during the PCI device probe. Clean up all those resources. Link: https://lore.kernel.org/r/20210528131307.25683-3-chandrakanth.patil@broadcom.com Signed-off-by: Chandrakanth Patil Signed-off-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit 79db830162b733f5f3ee80f0673eeeb0245fe38b Author: Chandrakanth Patil Date: Fri May 28 18:43:03 2021 +0530 scsi: megaraid_sas: Send all non-RW I/Os for TYPE_ENCLOSURE device through firmware The driver issues all non-ReadWrite I/Os for TYPE_ENCLOSURE devices through the fast path with invalid dev handle. Fast path in turn directs all the I/Os to the firmware. As firmware stopped handling those I/Os from SAS3.5 generation of controllers (Ventura generation and onwards) this will lead to I/O failures. Switch the driver to issue all the non-ReadWrite I/Os for TYPE_ENCLOSURE devices directly to firmware for SAS3.5 generation of controllers and later. Link: https://lore.kernel.org/r/20210528131307.25683-2-chandrakanth.patil@broadcom.com Cc: # v5.11+ Signed-off-by: Chandrakanth Patil Signed-off-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit 9fc4abfe5a5fc9fabce41b9d2ba8425ef498b32c Author: Kashyap Desai Date: Thu May 20 20:55:45 2021 +0530 scsi: mpi3mr: Add event handling debug prints Link: https://lore.kernel.org/r/20210520152545.2710479-25-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 74e1f30a28680978fa9ddfb5360d0cc644cd348e Author: Kashyap Desai Date: Thu May 20 20:55:44 2021 +0530 scsi: mpi3mr: Add EEDP DIF DIX support Link: https://lore.kernel.org/r/20210520152545.2710479-24-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 28cbe2f420d338cc4cb8f0cc367b22ea3c41b3b5 Author: Kashyap Desai Date: Thu May 20 20:55:43 2021 +0530 scsi: mpi3mr: Add support for DSN secure firmware check Read PCI_EXT_CAP_ID_DSN to query security status. The driver will throw a warning message when a non-secure type controller is detected. The purpose of this interface is to avoid interacting with any firmware which is not secured/signed by Broadcom. Any tampering on firmware component will be detected by hardware and it will be communicated to the driver to avoid any further interaction with that component. Link: https://lore.kernel.org/r/20210520152545.2710479-23-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 2f9c4d520aa60f1bc65b791ac2a5fa3ed622d095 Author: Kashyap Desai Date: Thu May 20 20:55:42 2021 +0530 scsi: mpi3mr: Add support for PM suspend and resume Link: https://lore.kernel.org/r/20210520152545.2710479-22-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 44dc724f5eecf6ef8ea493e0f0198f297e1c7306 Author: Kashyap Desai Date: Thu May 20 20:55:41 2021 +0530 scsi: mpi3mr: Wait for pending I/O completions upon detection of VD I/O timeout Wait for host I/O completion (default 180 seconds) if I/O timeout is detected on VDs. Link: https://lore.kernel.org/r/20210520152545.2710479-21-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 71e80106d0599171581e81ec4979a3f4906f983b Author: Kashyap Desai Date: Thu May 20 20:55:40 2021 +0530 scsi: mpi3mr: Print pending host I/Os for debugging Link: https://lore.kernel.org/r/20210520152545.2710479-20-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit f061178e076210a549a546f3879ed51a61fcf938 Author: Kashyap Desai Date: Thu May 20 20:55:39 2021 +0530 scsi: mpi3mr: Complete support for soft reset Unlock the host diagnostic register, write the specific reset type to that and wait for reset acknowledgment from the controller. If the reset is not successful retry for the predefined number of times Link: https://lore.kernel.org/r/20210520152545.2710479-19-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 463429f8dd5c94aae4b0948c56e67eb21cb6964e Author: Kashyap Desai Date: Thu May 20 20:55:38 2021 +0530 scsi: mpi3mr: Add support for threaded ISR Register driver for threaded interrupts. By default the driver will attempt I/O completion from interrupt context (primary handler). Since the driver tracks per reply queue outstanding I/Os, it will schedule threaded ISR if there are any outstanding I/Os expected on that particular reply queue. Threaded ISR (secondary handler) will loop for I/O completion as long as there are outstanding I/Os (speculative method using same per reply queue outstanding counter) or it has completed some X amount of commands (something like budget). Link: https://lore.kernel.org/r/20210520152545.2710479-18-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 392bbeb85b2a6f80e3036dfccdf55a1d076bba2c Author: Kashyap Desai Date: Thu May 20 20:55:37 2021 +0530 scsi: mpi3mr: Hardware workaround for UNMAP commands to NVMe drives The controller hardware can not handle certain UNMAP commands for NVMe drives. Add support in the driver for checking those commands and handle them appropriately. Link: https://lore.kernel.org/r/20210520152545.2710479-17-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 82141ddba90a88df8ebde782c5b24c7cc5a9926e Author: Kashyap Desai Date: Thu May 20 20:55:36 2021 +0530 scsi: mpi3mr: Allow certain commands during pci-remove hook Instead of driver returning DID_NO_CONNECT during driver unload allow SSU and Sync Cache commands to be sent to the controller to flush any cached data from the drive. Link: https://lore.kernel.org/r/20210520152545.2710479-16-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 0ea177343f1f8a742d11817bc598ed03a52d04a9 Author: Kashyap Desai Date: Thu May 20 20:55:35 2021 +0530 scsi: mpi3mr: Add change queue depth support Link: https://lore.kernel.org/r/20210520152545.2710479-15-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit e844adb1fbdc41c3e1531a5bdf30f376563945f1 Author: Kashyap Desai Date: Thu May 20 20:55:34 2021 +0530 scsi: mpi3mr: Implement SCSI error handler hooks Link: https://lore.kernel.org/r/20210520152545.2710479-14-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Cc: hare@suse.de Cc: thenzl@redhat.com Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Reviewed-by: Tomas Henzl Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 8f9c6173ca464822b8877f75dc7ca20f645b0179 Author: Kashyap Desai Date: Thu May 20 20:55:33 2021 +0530 scsi: mpi3mr: Add bios_param SCSI host template hook Link: https://lore.kernel.org/r/20210520152545.2710479-13-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit ff9561e910fc590add00d7e0f2792a8ef988ed21 Author: Kashyap Desai Date: Thu May 20 20:55:32 2021 +0530 scsi: mpi3mr: Print IOC info for debugging Link: https://lore.kernel.org/r/20210520152545.2710479-12-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 54dfcffb41915c2120438d4179dcb82da3bfbaa8 Author: Kashyap Desai Date: Thu May 20 20:55:31 2021 +0530 scsi: mpi3mr: Add support for timestamp sync with firmware This operation requests that the IOC update the TimeStamp. When the I/O Unit is powered on it sets the TimeStamp field value to 0x0000_0000_0000_0000 and increments the current value every millisecond. A host driver sets the TimeStamp field to the current time by using an IOCInit request. The TimeStamp field is periodically updated by the host driver. Link: https://lore.kernel.org/r/20210520152545.2710479-11-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit fb9b04574f147831d96b6aead161c8ca26670c97 Author: Kashyap Desai Date: Thu May 20 20:55:30 2021 +0530 scsi: mpi3mr: Add support for recovering controller Detection of firmware fault or any kind of unresponsiveness in the controller (any admin command which times out) results in resetting the controller. The primary reset mechanisms used are either soft reset or diag fault reset. A reset is performed if the host sets the ResetAction field in the HostDiagnostic register to either 001b (soft reset) or 007b (diag fault reset). After successfully resetting the controller the driver reinitializes the controller by going through start of the day initialization procedure. Pending I/Os during the reset are returned back to the SCSI midlayer for retry. Link: https://lore.kernel.org/r/20210520152545.2710479-10-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.co Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit e36710dc06e3994c9abe78b957a07cfd9243a674 Author: Kashyap Desai Date: Thu May 20 20:55:29 2021 +0530 scsi: mpi3mr: Additional event handling Implement support for handling the following MPI events: - MPI3_EVENT_SAS_BROADCAST_PRIMITIVE - MPI3_EVENT_CABLE_MGMT - MPI3_EVENT_ENERGY_PACK_CHANGE Link: https://lore.kernel.org/r/20210520152545.2710479-9-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 8e653455547a471d464cdcfe07f925903cb6f2dd Author: Kashyap Desai Date: Thu May 20 20:55:28 2021 +0530 scsi: mpi3mr: Add support for PCIe device event handling Implement support for the following PCIe-related MPI events: - MPI3_EVENT_PCIE_TOPOLOGY_CHANGE_LIST - MPI3_EVENT_PCIE_ENUMERATION Link: https://lore.kernel.org/r/20210520152545.2710479-8-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 13ef29ea4aa0655feab2462966f83e17df5cdad1 Author: Kashyap Desai Date: Thu May 20 20:55:27 2021 +0530 scsi: mpi3mr: Add support for device add/remove event handling Firmware can report various MPI Events. Enable support for processing the following events related to device addition/removal to the driver: - MPI3_EVENT_DEVICE_ADDED - MPI3_EVENT_DEVICE_INFO_CHANGED - MPI3_EVENT_DEVICE_STATUS_CHANGE - MPI3_EVENT_ENCL_DEVICE_STATUS_CHANGE - MPI3_EVENT_SAS_TOPOLOGY_CHANGE_LIST - MPI3_EVENT_SAS_DISCOVERY - MPI3_EVENT_SAS_DEVICE_DISCOVERY_ERROR Link: https://lore.kernel.org/r/20210520152545.2710479-7-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reported-by: kernel test robot Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 672ae26c82166d63e0352403b7ea16ab4705edc1 Author: Kashyap Desai Date: Thu May 20 20:55:26 2021 +0530 scsi: mpi3mr: Add support for internal watchdog thread The watchdog thread is the driver's internal thread which does a few things such as detecting firmware faults, resetting the controller, performing timestamp sync, etc. Link: https://lore.kernel.org/r/20210520152545.2710479-6-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 023ab2a9b4edd4b1b109d1982cd80e10c327fbb2 Author: Kashyap Desai Date: Thu May 20 20:55:25 2021 +0530 scsi: mpi3mr: Add support for queue command processing Send Port Enable Request to FW for Device Discovery. As part of port enable completion driver calls scan_start and scan_finished hooks. SCSI layer references like sdev, starget, etc. are added but actual device discovery will be supported once driver adds complete event process handling. Link: https://lore.kernel.org/r/20210520152545.2710479-5-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Cc: hare@suse.de Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit c9566231cfaf448dd281cd7c516012a7e1c7e448 Author: Kashyap Desai Date: Thu May 20 20:55:24 2021 +0530 scsi: mpi3mr: Create operational request and reply queue pair Create operational request and reply queue pair. The MPI3 transport interface consists of an Administrative Request Queue, an Administrative Reply Queue, and Operational Messaging Queues. The Operational Messaging Queues are the primary communication mechanism between the host and the I/O Controller (IOC). Request messages, allocated in host memory, identify I/O operations to be performed by the IOC. These operations are queued on an Operational Request Queue by the host driver. Reply descriptors track I/O operations as they complete. The IOC queues these completions in an Operational Reply Queue. To fulfil large contiguous memory requirement, driver creates multiple segments and provide the list of segments. Each segment size should be 4K which is a hardware requirement. An element array is contiguous or segmented. A contiguous element array is located in contiguous physical memory. A contiguous element array must be aligned on an element size boundary. An element's physical address within the array may be directly calculated from the base address, the Producer/Consumer index, and the element size. Expected phased identifier bit is used to find out valid entry on reply queue. Driver sets bit and IOC inverts the value of this bit on each pass. Link: https://lore.kernel.org/r/20210520152545.2710479-4-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 824a156633dfdb0e17979a0d0bb2c757d1bb949c Author: Kashyap Desai Date: Thu May 20 20:55:23 2021 +0530 scsi: mpi3mr: Base driver code Implement basic pci device driver requirements: Device probing, memory allocation, mapping system registers, allocate irq lines, etc. Source is managed in mainly three different files: - mpi3mr_fw.c: Common code which interacts with underlying fw/hw. - mpi3mr_os.c: Common code which interacts with SCSI midlayer. - mpi3mr_app.c: Common code which interacts with application/ioctl. This is currently work in progress. Link: https://lore.kernel.org/r/20210520152545.2710479-3-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Cc: bvanassche@acm.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit c4f7ac64616ee513f9ac4ae6c4d8c3cccb6974df Author: Kashyap Desai Date: Thu May 20 20:55:22 2021 +0530 scsi: mpi3mr: Add mpi30 Rev-R headers and Kconfig This adds the Kconfig and mpi30 headers. Link: https://lore.kernel.org/r/20210520152545.2710479-2-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Cc: bvanassche@acm.org Cc: hch@infradead.org Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit f6b414294224bca523e63c9b3d09a2dabe981f23 Author: Bean Huo Date: Mon May 31 18:31:22 2021 +0200 scsi: ufs: Fix a kernel-doc related formatting issue Fix the following W=1 kernel build warning: drivers/scsi/ufs/ufshcd.c:9773: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst [mkp: upcase abbreviations] Link: https://lore.kernel.org/r/20210531163122.451375-1-huobean@gmail.com Reviewed-by: Alim Akhtar Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 5250db63d14002efce40f4d4fbfee3b81c829d54 Author: Kees Cook Date: Fri May 28 11:13:37 2021 -0700 scsi: isci: Use correctly sized target buffer for memcpy() In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), avoid intentionally writing across neighboring array fields. Switch from rsp_ui to resp_buf, since resp_ui isn't SSP_RESP_IU_MAX_SIZE bytes in length. This avoids future compile-time warnings. Link: https://lore.kernel.org/r/20210528181337.792268-4-keescook@chromium.org Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit 66fc475bd9e1fca7250affe986862e94ae10a8fd Author: Kees Cook Date: Fri May 28 11:13:36 2021 -0700 scsi: esas2r: Switch to flexible array member In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), avoid intentionally writing across neighboring array fields. Remove old-style 1-byte array in favor of a flexible array[1] to avoid future false-positive cross-field memcpy() warning in: esas2r_vda.c: memcpy(vi->cmd.gsv.version_info, esas2r_vdaioctl_versions, ...) The change in struct size doesn't change other structure sizes (it is already maxed out to 256 bytes, for example here: union { struct atto_ioctl_vda_scsi_cmd scsi; struct atto_ioctl_vda_flash_cmd flash; struct atto_ioctl_vda_diag_cmd diag; struct atto_ioctl_vda_cli_cmd cli; struct atto_ioctl_vda_smp_cmd smp; struct atto_ioctl_vda_cfg_cmd cfg; struct atto_ioctl_vda_mgt_cmd mgt; struct atto_ioctl_vda_gsv_cmd gsv; u8 cmd_info[256]; } cmd; No sizes are calculated using the enclosing structure, so no other updates are needed. Link: https://lore.kernel.org/r/20210528181337.792268-3-keescook@chromium.org Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kees Cook Signed-off-by: Martin K. Petersen commit 4d431153e751caa93f3b7e6f6313446974e92253 Author: Randy Dunlap Date: Sat May 29 16:48:57 2021 -0700 scsi: FlashPoint: Rename si_flags field The BusLogic driver has build errors on ia64 due to a name collision (in the #included FlashPoint.c file). Rename the struct field in struct sccb_mgr_info from si_flags to si_mflags (manager flags) to mend the build. This is the first problem. There are 50+ others after this one: In file included from ../include/uapi/linux/signal.h:6, from ../include/linux/signal_types.h:10, from ../include/linux/sched.h:29, from ../include/linux/hardirq.h:9, from ../include/linux/interrupt.h:11, from ../drivers/scsi/BusLogic.c:27: ../arch/ia64/include/uapi/asm/siginfo.h:15:27: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token 15 | #define si_flags _sifields._sigfault._flags | ^ ../drivers/scsi/FlashPoint.c:43:6: note: in expansion of macro 'si_flags' 43 | u16 si_flags; | ^~~~~~~~ In file included from ../drivers/scsi/BusLogic.c:51: ../drivers/scsi/FlashPoint.c: In function 'FlashPoint_ProbeHostAdapter': ../drivers/scsi/FlashPoint.c:1076:11: error: 'struct sccb_mgr_info' has no member named '_sifields' 1076 | pCardInfo->si_flags = 0x0000; | ^~ ../drivers/scsi/FlashPoint.c:1079:12: error: 'struct sccb_mgr_info' has no member named '_sifields' Link: https://lore.kernel.org/r/20210529234857.6870-1-rdunlap@infradead.org Fixes: 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit.") Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Christoph Hellwig Cc: Jens Axboe Cc: Hannes Reinecke Cc: Khalid Aziz Cc: Khalid Aziz Reported-by: kernel test robot Reviewed-by: Hannes Reinecke Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 84a84cc6aff4243c9f28c879b94d0dd55a310b54 Author: Gustavo A. R. Silva Date: Fri May 28 15:08:28 2021 -0500 scsi: mpt3sas: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/20210528200828.GA39349@embeddedor Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 27c707b14659287f793402ad8ca26ada7e3e8c51 Author: Daniel Wagner Date: Mon May 31 14:24:44 2021 +0200 scsi: qla2xxx: Log PCI address in qla_nvme_unregister_remote_port() Pass in fcport->vha to ql_log() in order to add the PCI address to the log. Currently NULL is passed in which gives this confusing log entry: > qla2xxx [0000:00:00.0]-2112: : qla_nvme_unregister_remote_port: unregister remoteport on 0000000009d6a2e9 50000973981648c7 Link: https://lore.kernel.org/r/20210531122444.116655-1-dwagner@suse.de Reviewed-by: Himanshu Madhani Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit f9c602f3bd9c79c06ccd7621744472a64e93fd49 Author: Alice.Chao Date: Fri May 28 11:36:22 2021 +0800 scsi: ufs: ufs-mediatek: Disable HCI before HW reset MediaTek ufshci needs to be disabled before HW reset to avoid potential issues. Link: https://lore.kernel.org/r/20210528033624.12170-3-alice.chao@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Alice.Chao Signed-off-by: Martin K. Petersen commit 3a95f5b392543498c638610a3096bb0f9aa56c7a Author: Alice.Chao Date: Fri May 28 11:36:21 2021 +0800 scsi: ufs: core: Export ufshcd_hba_stop() Export ufshcd_hba_stop() to allow vendors to disable HCI in variant ops. Link: https://lore.kernel.org/r/20210528033624.12170-2-alice.chao@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Alice.Chao Signed-off-by: Martin K. Petersen commit 2fcbda9a822db2ff990fd9f19075843737bc1685 Author: David Collins Date: Tue Jun 1 21:34:16 2021 -0700 Input: pm8941-pwrkey - add support for PMK8350 PON_HLOS PMIC peripheral On Qualcomm Technologies, Inc. PMIC PMK8350, the PON peripheral is split into two peripherals: PON_HLOS and PON_PBS. The application processor only has write access to PON_HLOS which limits it to only receiving PON interrupts. Add support for the PMK8350 PON_HLOS peripheral so that its KPDPWR_N and RESIN_N interrupts can be used to detect key presses. Signed-off-by: David Collins Signed-off-by: satya priya Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1620630064-16354-2-git-send-email-skakit@codeaurora.org Signed-off-by: Dmitry Torokhov commit 595c238a8cd18ea1b0839a55c860d2672d0dd41f Author: David Collins Date: Tue Jun 1 21:34:05 2021 -0700 dt-bindings: input: pm8941-pwrkey: add pmk8350 compatible strings Add power key and resin compatible strings for the PMK8350 PMIC. These are needed to distinguish key PON_HLOS register differences between PMK8350 and previous PMIC PON modules. Signed-off-by: David Collins Signed-off-by: satya priya Acked-by: Rob Herring Link: https://lore.kernel.org/r/1620630064-16354-3-git-send-email-skakit@codeaurora.org Signed-off-by: Dmitry Torokhov commit df4c40f484191362976f46f655c88d4ea0b6d51f Author: Stephan Gerhold Date: Tue Jun 1 21:26:34 2021 -0700 Input: edt-ft5x06 - add support for iovcc-supply At the moment, the edt-ft5x06 driver can control a single regulator ("vcc"). However, some FocalTech touch controllers have an additional IOVCC pin that should be supplied with the digital I/O voltage. The I/O voltage might be provided by another regulator that should also be kept on. Otherwise, the touchscreen can randomly stop functioning if the regulator is turned off because no other components still require it. Implement (optional) support for also enabling an "iovcc-supply". The datasheet specifies a delay of ~ 10us before enabling VDD/VCC after IOVCC is enabled, so make sure to enable IOVCC first. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210510193108.50178-2-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit 77191c8d6ccf2ef6d09a1a931419bd0595d046a1 Author: Stephan Gerhold Date: Tue Jun 1 21:26:22 2021 -0700 dt-bindings: input: touchscreen: edt-ft5x06: add iovcc-supply At the moment, the edt-ft5x06 driver can control a single regulator ("vcc"). However, some FocalTech touch controllers have an additional IOVCC pin that should be supplied with the digital I/O voltage. The I/O voltage might be provided by another regulator that should also be kept on. Otherwise, the touchscreen can randomly stop functioning if the regulator is turned off because no other components still require it. Document (optional) support for controlling the regulator for IOVCC using "iovcc-supply". Acked-by: Rob Herring Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210510193108.50178-1-stephan@gerhold.net Signed-off-by: Dmitry Torokhov commit ccd1950c2f7e38ae45aeefb99a08b39407cd6c63 Merge: 43ed3c6c786d9 5b26d57fdb499 Author: Dave Airlie Date: Wed Jun 2 14:04:29 2021 +1000 Merge tag 'drm-intel-gt-next-2021-05-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Add reworked uAPI for DG1 behind CONFIG_BROKEN (Matt A, Abdiel) Driver Changes: - Fix for Gitlab issues #3293 and #3450: Avoid kernel crash on older L-shape memory machines - Add Wa_14010733141 (VDBox SFC reset) for Gen11+ (Aditya) - Fix crash in auto_retire active retire callback due to misalignment (Stephane) - Fix overlay active retire callback alignment (Tvrtko) - Eliminate need to align active retire callbacks (Matt A, Ville, Daniel) - Program FF_MODE2 tuning value for all Gen12 platforms (Caz) - Add Wa_14011060649 for TGL,RKL,DG1 and ADLS (Swathi) - Create stolen memory region from local memory on DG1 (CQ) - Place PD in LMEM on dGFX (Matt A) - Use WC when default state object is allocated in LMEM (Venkata) - Determine the coherent map type based on object location (Venkata) - Use lmem physical addresses for fb_mmap() on discrete (Mohammed) - Bypass aperture on fbdev when LMEM is available (Anusha) - Return error value when displayable BO not in LMEM for dGFX (Mohammed) - Do release kernel context if breadcrumb measure fails (Janusz) - Hide modparams for compiled-out features (Tvrtko) - Apply Wa_22010271021 for all Gen11 platforms (Caz) - Fix unlikely ref count race in arming the watchdog timer (Tvrtko) - Check actual RC6 enable status in PMU (Tvrtko) - Fix a double free in gen8_preallocate_top_level_pdp (Lv) - Use trylock in shrinker for GGTT on BSW VT-d and BXT (Maarten) - Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNBIND_VM_TRYLOCK (Maarten) - Convert uAPI headers to real kerneldoc (Matt A) - Clean up kerneldoc warnings headers (Matt A, Maarten) - Fail driver if LMEM training failed (Matt R) - Avoid div-by-zero on Gen2 (Ville) - Read C0DRB3/C1DRB3 as 16 bits again and add _BW suffix (Ville) - Remove reference to struct drm_device.pdev (Thomas) - Increase separation between GuC and execlists code (Chris, Matt B) - Use might_alloc() (Bernard) - Split DGFX_FEATURES from GEN12_FEATURES (Lucas) - Deduplicate Wa_22010271021 programming on (Jose) - Drop duplicate WaDisable4x2SubspanOptimization:hsw (Tvrtko) - Selftest improvements (Chris, Hsin-Yi, Tvrtko) - Shuffle around init_memory_region for stolen (Matt) - Typo fixes (wengjianfeng) [airlied: fix conflict with fixes in i915_active.c] Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/YLCbBR22BsQ/dpJB@jlahtine-mobl.ger.corp.intel.com commit d27ac0fba71cfd4da45f1ba6564f32ddd2914cc4 Author: Dmitry Torokhov Date: Tue Jun 1 16:37:54 2021 -0700 Input: cyttsp - remove public header There is nothing in include/linux/input/cyttsp.h that might be of interes to the kernel at large, so let's move this information into the driver code and remove the header. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210531052307.1433979-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 0ff5cd50c48c267c5e52bfbf6ee1683049774ca6 Author: Dmitry Torokhov Date: Tue Jun 1 16:37:41 2021 -0700 Input: cyttsp - change maintainer Ferruh's email has been bouncing for quite some time ans Linus has agreed to look over the driver. Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20210531052307.1433979-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 7d9c70d23550eb86a1bec1954ccaa8d6ec3a3328 Author: Jiansong Chen Date: Thu May 13 10:56:50 2021 +0800 drm/amdgpu: remove unsafe optimization to drop preamble ib Take the situation with gfxoff, the optimization may cause corrupt CE ram contents. In addition emit_cntxcntl callback has similar optimization which firmware can handle properly even for power feature. Signed-off-by: Jiansong Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 29b4c589b43d8dc0c0a5342cd2ac5da6ec1116b5 Author: Jiawei Gu Date: Wed Apr 14 16:44:36 2021 +0800 drm/amdgpu: Add vbios info ioctl interface Add AMDGPU_INFO_VBIOS_INFO subquery id for detailed vbios info. Provides a way for the user application to get the VBIOS information without having to parse the binary. It is useful for the user to be able to display in a simple way the VBIOS version in their system if they happen to encounter an issue. V2: Use numeric serial. Parse and expose vbios version string. V3: Remove redundant data in drm_amdgpu_info_vbios struct. V4: 64 bit alignment in drm_amdgpu_info_vbios. v5: squash together all the reverts, etc. (Alex) Signed-off-by: Jiawei Gu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 915821a744d9320e1722e40ea02254360c7fcbd5 Author: Alex Deucher Date: Tue Jun 1 09:55:13 2021 -0400 drm/amdgpu: bump driver version For 16bpc display support. Reviewed-by: Mario Kleiner Signed-off-by: Alex Deucher Cc: Mario Kleiner commit 3b42ca80730fbdd848d7fc23ee31e81a6e25f3f1 Author: Zheng Yongjun Date: Tue Jun 1 22:20:55 2021 +0800 drm/amdgpu: Remove unneeded semicolon Remove unneeded semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Alex Deucher commit ea2be5c0528654b3b5c72ea6864b79d16bf43937 Author: Baokun Li Date: Tue Jun 1 16:14:00 2021 +0800 drm/amd/display: fix warning: ‘update_dsc_caps’ and ‘apply_dsc_policy_for_stream’ defined but not used Fixes gcc '-Wunused-function' warning: ‘update_dsc_caps’ and ‘apply_dsc_policy_for_stream’ are only used if 'CONFIG_DRM_AMD_DC_DCN' is defined, however, it's defined even if 'CONFIG_DRM_AMD_DC_DCN' is not defined. Thus gcc will report following warning if 'CONFIG_DRM_AMD_DC_DCN' is not defined: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5572:13: warning: ‘apply_dsc_policy_for_stream’ defined but not used [-Wunused-function] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5556:13: warning: ‘update_dsc_caps’ defined but not used [-Wunused-function] Thus move the definition of ‘update_dsc_caps’ and ‘apply_dsc_policy_for_stream’ inside define macro to fix it. Signed-off-by: Baokun Li Signed-off-by: Alex Deucher commit d3892e20d8cc48665672fb2c192118f02ab105a5 Author: Shaokun Zhang Date: Mon May 31 17:30:06 2021 +0800 drm/amd/display: Remove the redundant initialization of local variable Local variable 'i' and 'j' will be initialized in the for loop, so remove the redundant initialization. Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Signed-off-by: Shaokun Zhang Signed-off-by: Alex Deucher commit a6c3c37b661dae8f34cb7ed90aa3f88372cb1c75 Author: Yu Kuai Date: Sat May 29 17:28:16 2021 +0800 drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state' define a new macro for_each_new_plane_in_state_reverse to replace for_each_oldnew_plane_in_state_reverse, so that the unused variable 'old_plane_state' can be removed. Fix gcc warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10066:26: warning: variable ‘old_plane_state’ set but not used [-Wunused-but-set-variable] Signed-off-by: Yu Kuai Signed-off-by: Alex Deucher commit 06888d571b513cbfc0b41949948def6cb81021b2 Author: Kees Cook Date: Fri May 28 10:53:54 2021 -0700 drm/amd/display: Avoid HDCP over-read and corruption Instead of reading the desired 5 bytes of the actual target field, the code was reading 8. This could result in a corrupted value if the trailing 3 bytes were non-zero, so instead use an appropriately sized and zero-initialized bounce buffer, and read only 5 bytes before casting to u64. Signed-off-by: Kees Cook Signed-off-by: Alex Deucher commit 66c46621c812c46bac3baf07007c45046563bfc3 Author: Jiapeng Chong Date: Fri May 28 17:29:18 2021 +0800 amdgpu: remove unreachable code In the function amdgpu_uvd_cs_msg(), every branch in the switch statement will have a return, so the code below the switch statement will not be executed. Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:845 amdgpu_uvd_cs_msg() warn: ignoring unreachable code. Reported-by: Abaci Robot Reviewed-by: Christian König Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 8333388b7513b55be8a0b37166d2129562ce974b Author: Simon Ser Date: Wed May 26 13:55:50 2021 +0000 amd/display: convert DRM_DEBUG_ATOMIC to drm_dbg_atomic This allows to tie the log message to a specific DRM device. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit f0e0687cf6d91aa99787dcefd7214ca782da51a7 Author: Eric Huang Date: Sat May 29 18:34:20 2021 -0400 drm/amdgpu: Fix a bug on flag table_freed table_freed will be always true when mapping a memory with size bigger than 2MB. The problem is page table's entries are always existed, but existing mapping depends on page talbe's bo, so using a check of page table's bo existed will resolve the issue. Signed-off-by: Eric Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ba809007f216ede9b25624d0420b6227b285e497 Author: Kevin Wang Date: Mon May 31 16:44:51 2021 +0800 drm/amdgpu: optimize code about format string in gfx_v10_0_init_microcode() the memset() and snprintf() is not necessary. Signed-off-by: Kevin Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 2b8f731849800e3948763ccaff31cceac526789b Author: Kevin Wang Date: Mon May 31 17:29:11 2021 +0800 drm/amdgpu: fix sdma firmware version error in sriov Re-adjust the function return order to avoid empty sdma version in the sriov environment. (read amdgpu_firmware_info) Signed-off-by: Kevin Wang Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 3fa8f89d72073206cad0a8840ce65afa239911ad Author: Sathishkumar S Date: Wed May 26 16:06:19 2021 +0530 drm/amdgpu: enable smart shift on dGPU (v5) enable smart shift on dGPU if it is part of HG system and the platform supports ATCS method to handle power shift. V2: avoid psc updates in baco enter and exit (Lijo) fix alignment (Shashank) V3: rebased on unified ATCS handling. (Alex) V4: check for return value and warn on failed update (Shashank) return 0 if device does not support smart shift. (Lizo) V5: rebased on ATPX/ATCS structures global (Alex) Signed-off-by: Sathishkumar S Reviewed-by: Lijo Lazar Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 19a1d9350be632ac2d82573c4497318179c22af5 Author: Nirmoy Das Date: Fri May 28 16:35:27 2021 +0200 drm/amdgpu: flush gart changes after all BO recovery Don't flush gart changes after recovering each BO instead do it after recovering all the BOs. Flishing gart also needed for amdgpu_ttm_alloc_gart(). v4: use containerof to retrieve adev struct. v3: rename amdgpu_gart_tlb_flush() -> amdgpu_gart_invalidate_tlb(). v2: abstract out gart tlb flushing logic to amdgpu_gart.c Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c7b9aa7a9220538d1a99c1c6f8d00b9b5e51b0f2 Author: Nirmoy Das Date: Fri May 28 12:32:16 2021 +0200 drm/amdgpu: do not allocate entries separately Allocate PD/PT entries while allocating VM BOs and use that instead of allocating those entries separately. v2: create a new var for num entries. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9c3fec688f4570437fb8b6a290bcf4decc139e7f Author: Nirmoy Das Date: Tue May 25 21:09:48 2021 +0200 drm/amdgpu: remove unused code Remove unused code related to shadow BO. v2: removing shadow bo ptr from base class. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 59276f056fb790ff6e985a7a1f6f0f5a5adacfae Author: Nirmoy Das Date: Thu May 20 14:10:24 2021 +0200 drm/amdgpu: switch to amdgpu_bo_vm for vm code The subclass, amdgpu_bo_vm is intended for PT/PD BOs which are also shadowed, so switch to amdgpu_bo_vm BO for PT/PD BOs. v4: update amdgpu_vm_update_funcs to accept amdgpu_bo_vm. v3: simplify code. check also if shadow bo exist instead of checking bo only type. v2: squash three related patches. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1fdc79f6f9dcb9c8af9f53feb2ff61209b4d8287 Author: Nirmoy Das Date: Wed May 26 18:18:40 2021 +0200 drm/admgpu: add two shadow BO helper functions Add amdgpu_bo_add_to_shadow_list() to handle shadow list additions and amdgpu_bo_shadowed() to check if a BO is shadowed. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2a675640bc2db198866499cdc1cc28709a90d8c5 Author: Nirmoy Das Date: Tue May 25 20:46:08 2021 +0200 drm/amdgpu: move shadow bo validation to VM code Do the shadow bo validation in the VM code as VM code knows/owns shadow BOs. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6fdd6f4aa5c75aba87439cf9f3a9aaa95cd331f6 Author: Nirmoy Das Date: Tue May 4 14:08:29 2021 +0200 drm/amdgpu: add amdgpu_bo_vm bo type Add new BO subclass that will be used by amdgpu vm code. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ae4c0d7674a7be1df7c65fdfbb808b2b6bae6462 Author: Nirmoy Das Date: Fri May 28 16:54:16 2021 +0200 drm/amdgpu: make sure we unpin the UVD BO Releasing pinned BOs is illegal now. UVD 6 was missing from: commit 2f40801dc553 ("drm/amdgpu: make sure we unpin the UVD BO") Fixes: 2f40801dc553 ("drm/amdgpu: make sure we unpin the UVD BO") Cc: stable@vger.kernel.org Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e0172928ae05da1c019ca345621ffea49740b3cd Author: Xiaojian Du Date: Tue May 25 18:29:53 2021 +0800 drm/amd/pm: retain the fine grain tuning parameters after resume This patch is to retain the fine grain tuning parameters after resume for legacy APU, it will cover Raven/Raven2/Picasso. Signed-off-by: Xiaojian Du Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bcd743741f767a41e1f573a8f1a93035fcaa8f8f Author: Nirmoy Das Date: Thu May 27 14:13:04 2021 +0200 drm/amd/display: WARN_ON cleanups Use WARN_ON() inside if-condition when possible. v2: Squash in coding style fix (Alex) Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 43ed3c6c786d996a264fcde68dbb36df6f03b965 Merge: 5522e9f7b0fbe 2e290c8d8d292 Author: Dave Airlie Date: Wed Jun 2 12:06:43 2021 +1000 Merge tag 'drm-misc-next-2021-06-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.14: UAPI Changes: * Use DRM driver names for fbdev Cross-subsystem Changes: Core Changes: * Fix leaked DMA handles * Improve documentation around DRM_CLIENT_CAP_* * Cleanups * dp_mst: Use kHz as link-rate unit during init * fourcc: Remove drm_gem_format_name() and drm_format_name_buf * gem-cma: Fix mmap for buffers with write combining * ttm: Don't override pre-set vm_ops; ttm_bo_mmap() removal and cleanups Driver Changes: * drm/amdgpu: Fix hot unplug during suspend; Implement mmap as GEM object function; Use %p4cc format-string modifier; Cleanups * drm/bridge: Cdns: Fix PM reference leak, Cleanups; Lt8912b: Fix Coccinelle warnings; Fix Kconfig dependencies; Fixes and cleanups * drm/hisilicon/kirin: Cleanups * drm/nouveau: Implement mmap as GEM object function * drm/radeon: Implement mmap as GEM object function * drm/rockchip: Remove generic drivers during init; Add scaling for RK3036 win1; Fix missing registers for RK3066 and 3188; Add alpha support for RK3036, RK3066, RK3126 and RK3188; Fixes and cleanups * drm/simpledrm: Use %p4cc: format-string modifier * drm/vmwgfx: Cleanups * fbdev/matrox: Use modern module_init() Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YLZOKiYE6XFmE/MH@linux-uq9g.fritz.box commit 57738ae40f33c8903e84863acb17cb7c919d69a3 Author: Nirmoy Das Date: Thu May 27 14:03:33 2021 +0200 drm/amd/display: do not dereference on NULL WARN_ON() will not kill the process so the second WARN_ON() will try to dereference NULL pointer. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 16eb48c62bd3ff1a523cd1d59591e694bd60277a Author: Sathishkumar S Date: Mon May 10 19:30:23 2021 +0530 drm/amdgpu: support atcs method powershift (v4) add support to handle ATCS method for power shift control. used to communicate dGPU device state to SBIOS. V2: use defined acpi func for checking psc support (Lijo) fix alignment (Shashank) V3: rebased on unified ATCS handling (Alex) V4: rebased on ATPX/ATCS structures global (Alex) Signed-off-by: Sathishkumar S Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 8a81028b4f7afafd138b8f70d3ce4edc75962d08 Author: Sathishkumar S Date: Wed May 26 20:15:56 2021 +0530 drm/amd/pm: use attr_update if the attr has it use attr_update if its available as part of the attribute. default_attr_update was used even if attr->attr_update is true. Signed-off-by: Sathishkumar S Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 3c609c8b1f2f481b04cca7ddc890a075cec4a6c3 Author: Shiwu Zhang Date: Wed May 26 11:42:14 2021 +0800 drm/amdgpu: free the metadata buffer for sg type BOs as well Since both sg and device type BOs have metadata buffer, free the buffer in both cases when to destroy BOs Signed-off-by: Shiwu Zhang Acked-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit eba98523724be7ad3539f2c975de1527e0c99dd6 Author: Shiwu Zhang Date: Mon May 24 14:30:21 2021 +0800 drm/amdgpu: fix metadata_size for ubo ioctl queries Although the kfd_ioctl_get_dmabuf_info() still fail it will indicate the caller right metadat_size useful for the same kfd ioctl next time. Signed-off-by: Shiwu Zhang Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit 6435c49913949f88590271a025db0bea491f6e96 Merge: 6efb943b8616e 790c06cc5df26 Author: Stephen Boyd Date: Tue Jun 1 19:01:21 2021 -0700 Merge tag 'renesas-clk-for-v5.14-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 support for CPU core clock boost modes on R-Car Gen3 - Add ISPCS (Image Signal Processor) clocks on R-Car V3U - Switch SH/R-Mobile and R-Car "DIV6" clocks to .determine_rate() and improve support for multiple parents - Switch RZ/N1 divider clocks to .determine_rate() - Add ZA2 (Audio Clock Generator) clock on R-Car D3 - Minor fixes and improvements * tag 'renesas-clk-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a77995: Add ZA2 clock clk: renesas: cpg-mssr: Make srstclr[] comment block consistent clk: renesas: cpg-mssr: Remove unused [RM]MSTPCR() definitions clk: renesas: r9a06g032: Switch to .determine_rate() clk: renesas: div6: Implement range checking clk: renesas: div6: Consider all parents for requested rate clk: renesas: div6: Switch to .determine_rate() clk: renesas: div6: Simplify src mask handling clk: renesas: div6: Use clamp() instead of clamp_t() clk: renesas: rcar-usb2-clock-sel: Fix error handling in .probe() clk: renesas: r8a779a0: Add ISPCS clocks clk: renesas: rcar-gen3: Add boost support to Z clocks clk: renesas: rcar-gen3: Add custom clock for PLLs clk: renesas: rcar-gen3: Increase Z clock accuracy clk: renesas: rcar-gen3: Grammar s/dependent of/dependent on/ clk: renesas: rcar-gen3: Remove superfluous masking in cpg_z_clk_set_rate() clk: renesas: rcar-gen3: Make cpg_z_clk.mask u32 clk: renesas: rcar-gen3: Update Z clock rate formula in comments commit 419b3ab6987f2a108cc4710030184365b17467ac Author: Peter Collingbourne Date: Thu May 20 17:17:02 2021 +0100 clk: versatile: remove dependency on ARCH_* It is now possible to build a modular kernel for vexpress by not setting CONFIG_ARCH_VEXPRESS=y and instead setting =m on the drivers that it normally implies. This is with the exception of CLK_VEXPRESS_OSC which is currently hidden behind a dependency on one of several ARCH_* variables. Remove that dependency so that CLK_VEXPRESS_OSC may be enabled without it. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I435a21e2e5f6187db54f4ef2079b60028ab2ea69 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520161702.3746174-1-lee.jones@linaro.org Reviewed-by: Linus Walleij Signed-off-by: Stephen Boyd commit 509201163fca3d4d906bd50a5320115d42818748 Author: Dave Chinner Date: Wed Jun 2 10:48:51 2021 +1000 xfs: remove xfs_perag_t Almost unused, gets rid of another typedef. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit f40aadb2bb64fe0a3d9b59957e70796d629cdee2 Author: Dave Chinner Date: Wed Jun 2 10:48:51 2021 +1000 xfs: use perag through unlink processing Unlinked lists are held in the perag, and freeing of inodes needs to be passed a perag, too, so look up the perag early in the unlink processing and use it throughout. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster commit 8237fbf53d6fd2a3a248fc2a8608e047ef22316c Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: clean up and simplify xfs_dialloc() Because it's a mess. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 309161f6603ce1a53b76a42817cde2a9bcd17e82 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: inode allocation can use a single perag instance Now that we've internalised the two-phase inode allocation, we can now easily make the AG selection and allocation atomic from the perspective of a single perag context. This will ensure AGs going offline/away cannot occur between the selection and allocation steps. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit b652afd937033911944d7f681f2031b006961f1d Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: get rid of xfs_dir_ialloc() This is just a simple wrapper around the per-ag inode allocation that doesn't need to exist. The internal mechanism to select and allocate within an AG does not need to be exposed outside xfs_ialloc.c, and it being exposed simply makes it harder to follow the code and simplify it. This is simplified by internalising xf_dialloc_select_ag() and xfs_dialloc_ag() into a single xfs_dialloc() function and then xfs_dir_ialloc() can go away. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 89b1f55a2951bb89b7ae9f8cb3fd11513ff3f219 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: collapse AG selection for inode allocation xfs_dialloc_select_ag() does a lot of repetitive work. It first calls xfs_ialloc_ag_select() to select the AG to start allocation attempts in, which can do up to two entire loops across the perags that inodes can be allocated in. This is simply checking if there is spce available to allocate inodes in an AG, and it returns when it finds the first candidate AG. xfs_dialloc_select_ag() then does it's own iterative walk across all the perags locking the AGIs and trying to allocate inodes from the locked AG. It also doesn't limit the search to mp->m_maxagi, so it will walk all AGs whether they can allocate inodes or not. Hence if we are really low on inodes, we could do almost 3 entire walks across the whole perag range before we find an allocation group we can allocate inodes in or report ENOSPC. Because xfs_ialloc_ag_select() returns on the first candidate AG it finds, we can simply do these checks directly in xfs_dialloc_select_ag() before we lock and try to allocate inodes. This reduces the inode allocation pass down to 2 perag sweeps at most - one for aligned inode cluster allocation and if we can't allocate full, aligned inode clusters anywhere we'll do another pass trying to do sparse inode cluster allocation. This also removes a big chunk of duplicate code. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 4268547305c91b35ae7871374078de788a822ed1 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: simplify xfs_dialloc_select_ag() return values The only caller of xfs_dialloc_select_ag() will always return -ENOSPC to it's caller if the agbp returned from xfs_dialloc_select_ag() is NULL. IOWs, failure to find a candidate AGI we can allocate inodes from is always an ENOSPC condition, so move this logic up into xfs_dialloc_select_ag() so we can simplify the return logic in this function. xfs_dialloc_select_ag() now only ever returns 0 with a locked agbp, or an error with no agbp. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 50f02fe3338d3fee6b298a1b262a4c562e7d84e0 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: remove agno from btree cursor Now that everything passes a perag, the agno is not needed anymore. Convert all the users to use pag->pag_agno instead and remove the agno from the cursor. This was largely done as an automated search and replace. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 7b13c515518264df0cb90d84fdab907a627c0fa9 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: use perag for ialloc btree cursors Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 289d38d22cd88960cb648dc480c50de5102519bb Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: convert allocbt cursors to use perags Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit a81a06211fb43d80ee746e7a40a32ed812002f8e Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: convert refcount btree cursor to use perags Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit fa9c3c197329fdab0efc48a8944d2c4a21c6a74f Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: convert rmap btree cursor to using a perag Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit be9fb17d88f08af648a89784d30dbac83d893154 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: add a perag to the btree cursor Which will eventually completely replace the agno in it. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster commit 58d43a7e3263766ade4974c86118e6b5737ea259 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: pass perags around in fsmap data dev functions Needs a [from, to] ranged AG walk, and the perag to be stuffed into the info structure for callouts to use. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 30933120ad79f4549d6e364df7eda474cc0d9c65 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: push perags through the ag reservation callouts We currently pass an agno from the AG reservation functions to the individual feature accounting functions, which in future may have to do perag lookups to access per-AG state. Instead, pre-emptively plumb the perag through from the highest AG reservation layer to the feature callouts so they won't have to look it up again. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster commit 45d0662117565e6100f9e0cf356cd873542c95b1 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: pass perags through to the busy extent code All of the callers of the busy extent API either have perag references available to use so we can pass a perag to the busy extent functions rather than having them have to do unnecessary lookups. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 7f8d3b3ca6fe9269b3c5deee0dcea38499288e06 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: convert secondary superblock walk to use perags Clean up the last external manual AG walk. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 6f4118fc6482b1989cdcb19a1a0ab53b2dca7ab9 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: convert xfs_iwalk to use perag references Rather than manually walking the ags and passing agnunbers around, pass the perag for the AG we are currently working on around in the iwalk structure. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 934933c3eec9e4a5826d3d7a47aca0742337fded Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: convert raw ag walks to use for_each_perag Convert the raw walks to an iterator, pulling the current AG out of pag->pag_agno instead of the loop iterator variable. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit f250eedcf7621b9a56d563912b4eeacd524422c7 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: make for_each_perag... a first class citizen for_each_perag_tag() is defined in xfs_icache.c for local use. Promote this to xfs_ag.h and define equivalent iteration functions so that we can use them to iterate AGs instead to replace open coded perag walks and perag lookups. We also convert as many of the straight forward open coded AG walks to use these iterators as possible. Anything that is not a direct conversion to an iterator is ignored and will be updated in future commits. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 07b6403a6873045344b0c18cbb4a4360854f6d76 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: move perag structure and setup to libxfs/xfs_ag.[ch] Move the xfs_perag infrastructure to the libxfs files that contain all the per AG infrastructure. This helps set up for passing perags around all the code instead of bare agnos with minimal extra includes for existing files. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 61aa005a5bd7705e0bdca8b40c694369d40fb93f Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: prepare for moving perag definitions and support to libxfs The perag structures really need to be defined with the rest of the AG support infrastructure. The struct xfs_perag and init/teardown has been placed in xfs_mount.[ch] because there are differences in the structure between kernel and userspace. Mainly that userspace doesn't have a lot of the internal stuff that the kernel has for caches and discard and other such structures. However, it makes more sense to move this to libxfs than to keep this separation because we are now moving to use struct perags everywhere in the code instead of passing raw agnumber_t values about. Hence we shoudl really move the support infrastructure to libxfs/xfs_ag.[ch]. To do this without breaking userspace, first we need to rearrange the structures and code so that all the kernel specific code is located together. This makes it simple for userspace to ifdef out the all the parts it does not need, minimising the code differences between kernel and userspace. The next commit will do the move... Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 9bbafc71919adfdf83fafd2ce909853b493e7d86 Author: Dave Chinner Date: Wed Jun 2 10:48:24 2021 +1000 xfs: move xfs_perag_get/put to xfs_ag.[ch] They are AG functions, not superblock functions, so move them to the appropriate location. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 5fe8e519e44fde639f8f4977561f1b68b2ec4960 Merge: 92c35cfd9366e 8a1c08ad19b6e Author: David S. Miller Date: Tue Jun 1 17:15:14 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Support for SCTP chunks matching on nf_tables, from Phil Sutter. 2) Skip LDMXCSR, we don't need a valid MXCSR state. From Stefano Brivio. 3) CONFIG_RETPOLINE for nf_tables set lookups, from Florian Westphal. 4) A few Kconfig leading spaces removal, from Juerg Haefliger. 5) Remove spinlock from xt_limit, from Jason Baron. 6) Remove useless initialization in xt_CT, oneliner from Yang Li. 7) Tree-wide replacement of netlink_unicast() by nfnetlink_unicast(). 8) Reduce footprint of several structures: xt_action_param, nft_pktinfo and nf_hook_state, from Florian. 10) Add nft_thoff() and nft_sk() helpers and use them, also from Florian. 11) Fix documentation in nf_tables pipapo avx2, from Florian Westphal. 12) Fix clang-12 fmt string warnings, also from Florian. ==================== commit 92c35cfd9366efae8ee420197a8163a8b4284efe Merge: e0ae757c32353 b6e5d27e32ef6 Author: David S. Miller Date: Tue Jun 1 17:11:41 2021 -0700 Merge branch 'qualcomm-rmnet-mapv5' Sharath Chandra Vurukala says: ==================== net: qualcomm: rmnet: Enable Mapv5 This series introduces the MAPv5 packet format. Patch 0 documents the MAPv4/v5. Patch 1 introduces the MAPv5 and the Inline checksum offload for RX/Ingress. Patch 2 introduces the MAPv5 and the Inline checksum offload for TX/Egress. A new checksum header format is used as part of MAPv5.For RX checksum offload, the checksum is verified by the HW and the validity is marked in the checksum header of MAPv5. For TX, the required metadata is filled up so hardware can compute the checksum. v1->v2: - Fixed the compilation errors, warnings reported by kernel test robot. - Checksum header definition is expanded to support big, little endian formats as mentioned by Jakub. v2->v3: - Fixed compilation errors reported by kernel bot for big endian flavor. v3->v4: - Made changes to use masks instead of C bit-fields as suggested by Jakub/Alex. v4->v5: - Corrected checkpatch errors and warnings reported by patchwork. v5->v6: - Corrected the bug identified by Alex and incorporated all his comments. v6->v7: - Removed duplicate inclusion of linux/bitfield.h in rmnet_map_data.c v7->v8: - Have addressed comments given by JAkub on v7 patches. - As suggested by Jakub, skb_cow_head() is used instead of expanding the head directly. This is now done in rmnet_map_egress_handler(). ==================== Signed-off-by: David S. Miller commit b6e5d27e32ef6089d316ce7e1ecaf595584d4b84 Author: Sharath Chandra Vurukala Date: Wed Jun 2 00:58:36 2021 +0530 net: ethernet: rmnet: Add support for MAPv5 egress packets Adding support for MAPv5 egress packets. This involves adding the MAPv5 header and setting the csum_valid_required in the checksum header to request HW compute the checksum. Corresponding stats are incremented based on whether the checksum is computed in software or HW. New stat has been added which represents the count of packets whose checksum is calculated by the HW. Signed-off-by: Sharath Chandra Vurukala Signed-off-by: David S. Miller commit e1d9a90a9bfdb0735062d3adb16b07314b4b7b01 Author: Sharath Chandra Vurukala Date: Wed Jun 2 00:58:35 2021 +0530 net: ethernet: rmnet: Support for ingress MAPv5 checksum offload Adding support for processing of MAPv5 downlink packets. It involves parsing the Mapv5 packet and checking the csum header to know whether the hardware has validated the checksum and is valid or not. Based on the checksum valid bit the corresponding stats are incremented and skb->ip_summed is marked either CHECKSUM_UNNECESSARY or left as CHEKSUM_NONE to let network stack revalidate the checksum and update the respective snmp stats. Current MAPV1 header has been modified, the reserved field in the Mapv1 header is now used for next header indication. Signed-off-by: Sharath Chandra Vurukala Signed-off-by: David S. Miller commit 710b797cf61b318995db6d31767a532162db113d Author: Sharath Chandra Vurukala Date: Wed Jun 2 00:58:34 2021 +0530 docs: networking: Add documentation for MAPv5 Adding documentation explaining the new MAPv4/v5 packet formats and the corresponding checksum offload headers. Signed-off-by: Sharath Chandra Vurukala Signed-off-by: David S. Miller commit e0ae757c32353f7d185779f104e7309af81491e1 Merge: e65c27938d8e3 f4370a85d62e6 Author: David S. Miller Date: Tue Jun 1 17:07:56 2021 -0700 Merge branch 'iwl-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux Tony Nguyen says: ==================== iwl-next Intel Wired LAN Driver Updates 2021-06-01 This pull request is targeting net-next and rdma-next branches. These patches have been reviewed by netdev and rdma mailing lists[1]. This series adds RDMA support to the ice driver for E810 devices and converts the i40e driver to use the auxiliary bus infrastructure for X722 devices. The PCI netdev drivers register auxiliary RDMA devices that will bind to auxiliary drivers registered by the new irdma module. [1] https://lore.kernel.org/netdev/20210520143809.819-1-shiraz.saleem@intel.com/ --- v3: - ice_aq_add_rdma_qsets(), ice_cfg_vsi_rdma(), ice_[ena|dis]_vsi_rdma_qset(), and ice_cfg_rdma_fltr() no longer return ice_status - Remove null check from ice_aq_add_rdma_qsets() v2: - Added patch 'i40e: Replace one-element array with flexible-array member' Changes since linked review (v6): - Removed unnecessary checks in i40e_client_device_register() and i40e_client_device_unregister() - Simplified the i40e_client_device_register() API ==================== Signed-off-by: David S. Miller commit e65c27938d8e3dd67d55049a82f27e56ca31e728 Author: Zheng Yongjun Date: Tue Jun 1 22:18:59 2021 +0800 net: mdio: Fix spelling mistakes informations ==> information typicaly ==> typically derrive ==> derive eventhough ==> even though Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit f62c4f3870d8114029d3ebfc7ec4421728f07f83 Author: Zheng Yongjun Date: Tue Jun 1 22:18:13 2021 +0800 net: usb: Fix spelling mistakes wierdness ==> weirdness multicat ==> multicast limite ==> limit adddress ==> address operater ==> operator intial ==> initial smaler ==> smaller Communcation ==> Communication funcitons ==> functions everytime ==> every time Neigbor ==> Neighbor performace ==> performance Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit e9a0bf6d002f28bae3f3fcca314d4ea79b21fff0 Author: Zheng Yongjun Date: Tue Jun 1 22:16:35 2021 +0800 vrf: Fix a typo possibile ==> possible Signed-off-by: Zheng Yongjun Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ec674565fbc6af6fce8451cfd7f215c577216661 Author: Zheng Yongjun Date: Tue Jun 1 22:16:25 2021 +0800 gtp: Fix a typo Suppport ==> Support Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 26d3f69c500cf950299e9b3d76b6e8e2c6fe00bb Author: Zheng Yongjun Date: Tue Jun 1 22:16:10 2021 +0800 macvlan: Fix a typo underlaying ==> underlying Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit ca746c55a7e6e597cc2d29a094082d345b2c33c9 Author: Zheng Yongjun Date: Tue Jun 1 22:14:07 2021 +0800 net: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit b923cda9638860d6fbb688cfc4c939ff13df31b5 Author: Zheng Yongjun Date: Tue Jun 1 22:13:58 2021 +0800 net: dcb: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 0a206f9d9e23967639b204094c8dc073eb2997a4 Author: YueHaibing Date: Tue Jun 1 22:02:38 2021 +0800 igb: Fix -Wunused-const-variable warning If CONFIG_IGB_HWMON is n, gcc warns: drivers/net/ethernet/intel/igb/e1000_82575.c:2765:17: warning: ‘e1000_emc_therm_limit’ defined but not used [-Wunused-const-variable=] static const u8 e1000_emc_therm_limit[4] = { ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/intel/igb/e1000_82575.c:2759:17: warning: ‘e1000_emc_temp_data’ defined but not used [-Wunused-const-variable=] static const u8 e1000_emc_temp_data[4] = { ^~~~~~~~~~~~~~~~~~~ Move it into #ifdef block to fix this. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 6990c7f44c0dee4de6cf43fee0e5e7680c1a973a Author: YueHaibing Date: Tue Jun 1 22:01:48 2021 +0800 cxgb4: Fix -Wunused-const-variable warning If CONFIG_PCI_IOV is n, make W=1 warns: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:3909:33: warning: ‘cxgb4_mgmt_ethtool_ops’ defined but not used [-Wunused-const-variable=] static const struct ethtool_ops cxgb4_mgmt_ethtool_ops = { ^~~~~~~~~~~~~~~~~~~~~~ Move it into #ifdef block to fix this. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit e516f5be5b17cdae68d14206451b64d36f9588e4 Author: YueHaibing Date: Tue Jun 1 22:00:52 2021 +0800 hamradio: bpqether: Fix -Wunused-const-variable warning If CONFIG_PROC_FS is n, gcc warns: drivers/net/hamradio/bpqether.c:437:36: warning: ‘bpq_seqops’ defined but not used [-Wunused-const-variable=] static const struct seq_operations bpq_seqops = { ^~~~~~~~~~ Use #ifdef macro to gurad this. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 5ac712dcdfefb1a783384db85e0507d161e87812 Author: Wong Vee Khee Date: Tue Jun 1 21:52:35 2021 +0800 net: stmmac: enable platform specific safety features On Intel platforms, not all safety features are enabled on the hardware. The current implementation enable all safety features by default. This will cause mass error and warning printouts after the module is loaded. Introduce platform specific safety features flag to enable or disable each safety features. Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit e5432cc71ab64b10100a290b7bf32804981c9cb4 Author: Nigel Christian Date: Tue Jun 1 09:35:33 2021 -0400 NFC: microread: Remove redundant assignment to variable err In the case MICROREAD_CB_TYPE_READER_ALL clang reports a dead code warning. The error code assigned to variable err is already passed to async_cb(). The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Nigel Christian Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 686e8463ff767f592f785ad00568275ec4c4d841 Merge: 00460eb1ddb0c 1bb5218252655 Author: David S. Miller Date: Tue Jun 1 16:57:47 2021 -0700 Merge branch 'hdlc-cleanups' Peng Li says: ==================== net: hdlc: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 1bb52182526552e31367ea521cf36d37ebb26966 Author: Peng Li Date: Tue Jun 1 21:23:22 2021 +0800 net: hdlc: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e50eb6c3578c6bd7c43c30bfa40a882f0815a2d2 Author: Peng Li Date: Tue Jun 1 21:23:21 2021 +0800 net: hdlc: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 387847f295c86fe72693178ed1eab000154f98ff Author: Peng Li Date: Tue Jun 1 21:23:20 2021 +0800 net: hdlc: replace comparison to NULL with "!param" According to the chackpatch.pl, comparison to NULL could be written "!param". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 01506939cc8466635fb05711a79f8eb2b5df1ff3 Author: Peng Li Date: Tue Jun 1 21:23:19 2021 +0800 net: hdlc: fix an code style issue about EXPORT_SYMBOL(foo) According to the chackpatch.pl, EXPORT_SYMBOL(foo); should immediately follow its function/variable. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 68fd73925bce2d81e7144caf16519e6b7e80b6a1 Author: Peng Li Date: Tue Jun 1 21:23:18 2021 +0800 net: hdlc: fix an code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" and should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 04cc04f07bb25e5555b27f0d6069599f0da23cad Author: Peng Li Date: Tue Jun 1 21:23:17 2021 +0800 net: hdlc: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 30cd458be244a929e929512fa63bbcf45225e752 Author: Peng Li Date: Tue Jun 1 21:23:16 2021 +0800 net: hdlc: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 00460eb1ddb0c278dba199fd420995fb1579f97f Merge: b934b6d1d9332 8fd52b1f923c3 Author: David S. Miller Date: Tue Jun 1 16:54:42 2021 -0700 Merge branch 'act_vlan-allow-modify-zero' Boris Sukholitko says: ==================== net/sched: act_vlan: Fix modify to allow 0 Currently vlan modification action checks existence of vlan priority by comparing it to 0. Therefore it is impossible to modify existing vlan tag to have priority 0. For example, the following tc command will change the vlan id but will not affect vlan priority: tc filter add dev eth1 ingress matchall action vlan modify id 300 \ priority 0 pipe mirred egress redirect dev eth2 The incoming packet on eth1: ethertype 802.1Q (0x8100), vlan 200, p 4, ethertype IPv4 will be changed to: ethertype 802.1Q (0x8100), vlan 300, p 4, ethertype IPv4 although the user has intended to have p == 0. The fix is to add tcfv_push_prio_exists flag to struct tcf_vlan_params and rely on it when deciding to set the priority. The same flag is used to avoid dumping unset vlan priority. Change Log: v3 -> v4: - revert tcf_vlan_get_fill_size change: total size calculation may race vs dump v2 -> v3: - Push assumes that the priority is being set - tcf_vlan_get_fill_size accounts for priority existence v1 -> v2: - Do not dump unset priority and fix tests accordingly - Test for priority 0 modification ==================== Reviewed-by: Davide Caratti Signed-off-by: David S. Miller commit 8fd52b1f923c3ebd41da678b537021b88830494e Author: Boris Sukholitko Date: Tue Jun 1 15:30:52 2021 +0300 net/sched: act_vlan: Test priority 0 modification Because explicitly being set, the priority 0 should appear in the output. Signed-off-by: Boris Sukholitko Signed-off-by: David S. Miller commit 8323b20f1d76b10fb413daae6abf76b7b903c8de Author: Boris Sukholitko Date: Tue Jun 1 15:30:51 2021 +0300 net/sched: act_vlan: No dump for unset priority Dump vlan priority only if it has been previously set. Fix the tests accordingly. Signed-off-by: Boris Sukholitko Signed-off-by: David S. Miller commit 9c5eee0afca09cbde6bd00f77876754aaa552970 Author: Boris Sukholitko Date: Tue Jun 1 15:30:50 2021 +0300 net/sched: act_vlan: Fix modify to allow 0 Currently vlan modification action checks existence of vlan priority by comparing it to 0. Therefore it is impossible to modify existing vlan tag to have priority 0. For example, the following tc command will change the vlan id but will not affect vlan priority: tc filter add dev eth1 ingress matchall action vlan modify id 300 \ priority 0 pipe mirred egress redirect dev eth2 The incoming packet on eth1: ethertype 802.1Q (0x8100), vlan 200, p 4, ethertype IPv4 will be changed to: ethertype 802.1Q (0x8100), vlan 300, p 4, ethertype IPv4 although the user has intended to have p == 0. The fix is to add tcfv_push_prio_exists flag to struct tcf_vlan_params and rely on it when deciding to set the priority. Fixes: 45a497f2d149a4a8061c (net/sched: act_vlan: Introduce TCA_VLAN_ACT_MODIFY vlan action) Signed-off-by: Boris Sukholitko Signed-off-by: David S. Miller commit 15abefda7fde690b7091ac5854135da41c7f759c Author: Dan Carpenter Date: Tue May 11 10:09:08 2021 +0300 clk: qcom: cleanup some dev_err_probe() calls The dev_err_probe() function prints an error message if the error code is not -EPROBE_DEFER. If we know the error code in is -ENODEV then there is no reason to check. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YJotlJBJ1CVAgvMT@mwanda Signed-off-by: Stephen Boyd commit f22107b91ae26f82ec27620ba37f2687ab3fe2b6 Author: Rob Herring Date: Wed May 26 13:48:39 2021 -0500 dt-bindings: i2c: maxim,max9286: Use the i2c-mux.yaml schema Use the i2c-mux.yaml schema in the maxim,max9286 binding schema. With this, several properties can be dropped as they are defined in i2c-mux.yaml already. Cc: Jacopo Mondi Cc: Kieran Bingham Cc: Niklas Söderlund Reviewed-by: Laurent Pinchart Acked-by: Wolfram Sang Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210526184839.2937899-7-robh@kernel.org commit 86335b51e47d9b5065abf0e5fc438234e53ffe86 Author: Rob Herring Date: Wed May 26 13:48:38 2021 -0500 dt-bindings: i2c: i2c-mux-pca954x: Convert to DT schema Convert the i2c-mux-pca954x binding to DT schema format. Add the missing compatible for 'nxp,pca9645' which is already in use. Reviewed-by: Laurent Pinchart Acked-by: Wolfram Sang Acked-by: Peter Rosin Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210526184839.2937899-6-robh@kernel.org commit a404a6367b0e74dee3125fa05811274565a34343 Author: Rob Herring Date: Wed May 26 13:48:37 2021 -0500 dt-bindings: i2c: Convert i2c-mux bindings to DT schema As some of the example I2C devices don't have schemas yet, change them to ones that do. Cc: Peter Rosin Acked-by: Wolfram Sang Acked-by: Peter Rosin Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210526184839.2937899-5-robh@kernel.org commit 9b358af7c8186678677102e8c6cc472e7c00c0c0 Author: Rob Herring Date: Wed May 26 13:48:36 2021 -0500 dt-bindings: mux: Convert mux controller bindings to schema Convert the mux controller bindings to DT schema. Cc: Peter Rosin Reviewed-by: Jonathan Cameron Acked-by: Wolfram Sang Acked-by: Peter Rosin Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210526184839.2937899-4-robh@kernel.org commit f743c41d00bea01bf3e5c79b1ae5dcebca8f8daa Author: Rob Herring Date: Wed May 26 13:48:35 2021 -0500 dt-bindings: rtc: nxp,pcf8563: Convert to DT schema Convert the Philips PCF8563/Epson RTC8564 binding to DT schema format. Add 'interrupts' and 'wakeup-source' as this device has an interrupt which was not documented, but in use. Add 'start-year' as well. Cc: Alexandre Belloni Reviewed-by: Laurent Pinchart Acked-by: Alexandre Belloni Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210526184839.2937899-3-robh@kernel.org commit 9f3849be6f2f4ae368e61321f135c2734ab6dd8a Author: Rob Herring Date: Wed May 26 13:48:34 2021 -0500 dt-bindings: mfd: ti,j721e-system-controller: Fix mux node errors The ti,j721e-system-controller binding does not follow the standard mux controller node name 'mux-controller' and the example is incomplete. Fix these to avoid schema errors before the mux controller binding is converted to schema. Cc: Lee Jones Cc: Kishon Vijay Abraham I Acked-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210526184839.2937899-2-robh@kernel.org commit b934b6d1d9332fb31c4c899ce63d4aac6ee9f1da Author: Colin Ian King Date: Tue Jun 1 11:31:44 2021 +0100 octeontx2-af: Fix spelling mistake "vesion" -> "version" There is a spelling mistake in a dev_warning message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 6ad1800071e80ade38b6287792a6ad678e6085ed Author: Haocheng Xie Date: Mon May 31 16:39:05 2021 +0800 docs: Fix typos in Documentation/trace/ftrace.rst Fix the usage of "a/the" and improve the readability. Signed-off-by: Haocheng Xie Link: https://lore.kernel.org/r/20210531083905.25763-1-xiehaocheng.cn@gmail.com [jc: tweaked wording slightly] Signed-off-by: Jonathan Corbet commit 7cf85f8caa042db0e33d70dbd72d8b92b1051f93 Author: Yang Li Date: Tue Jun 1 17:49:50 2021 +0800 NFC: nci: Remove redundant assignment to len Variable 'len' is set to conn_info->max_pkt_payload_len but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: net/nfc/nci/hci.c:164:3: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 0afd4df0d16a5ae894b087562ffef4e5ec43fe24 Author: Akira Yokosawa Date: Sun May 30 00:19:14 2021 +0900 docs: pdfdocs: Prevent column squeezing by tabulary Setting a reasonable width to \tymin prevents column squeezing by tabulary. Width of 20em works well in almost all the tables still in the ascii-art format. Excerpt from tabulary package documentation at [1]: To stop very narrow columns being too 'squeezed' by this process any columns that are narrower than \tymin are set to their natural width. [1]: https://mirrors.ctan.org/macros/latex/contrib/tabulary/tabulary.pdf Note: Sphinx has its own default value of \tymin set in sphinxlatextables.sty (Sphinx 4.0.2) and sphinxmulticell.sty (Sphinx 2.4.4) as follows: \setlength{\tymin}{3\fontcharwd\font`0 } , which is not sufficient for kernel-doc. Tested against Sphinx versions 2.4.4 and 4.0.2. Signed-off-by: Akira Yokosawa Link: https://lore.kernel.org/r/277d68fa-c96a-0ccb-6ce0-4d314851d9fe@gmail.com Signed-off-by: Jonathan Corbet commit cbae918b2c4b6d1c4577d35659196b4f75b5c376 Author: Yanteng Si Date: Mon May 31 20:41:05 2021 +0800 docs/zh_CN:add core-api padata translation Translate Documentation/core-api/padata.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210531124105.946859-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 51568befea2aba3c75a5a929f41909c50176ca6e Author: Yanteng Si Date: Thu May 27 14:43:47 2021 +0800 docs/zh_CN: add core-api symbol-namespaces.rst translation Translates Documentation/core-api/symbol-namespaces.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210527064347.3936694-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 52aa0b189288c5d44cb5f2500372e474d6623c18 Author: Zheng Yongjun Date: Tue Jun 1 16:23:04 2021 +0800 net: vxge: Declare the function vxge_reset_all_vpaths as void variable 'status' is unneeded and it's noneed to check the return value of function vxge_reset_all_vpaths,so declare it as void. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit a5f785f1021857a889b1f5b7cc1d83efd4404336 Author: Mauro Carvalho Chehab Date: Tue May 25 15:27:28 2021 +0200 scripts: sphinx-pre-install: fix the need of virtenv packages The pip packages are only needed when the distro-provided Sphinx version is not good enough. Don't recommend installing it if not needed. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/04ce53b77b37f1e495c3abc39c2d3dc407895dc0.1621949137.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e50899122f3204946bb3559da23700c2e5b9568b Author: Mauro Carvalho Chehab Date: Tue May 25 15:27:27 2021 +0200 scripts: sphinx-pre-install: rework the sphinx install logic The sphinx-pre-install supports installing sphinx via a virtual environment using pip/pypi or directly from the distribution's package, when --no-virtualenv is used. However, even when --no-virtualenv, the current logic is still recomending to install a virtual env, due to a regression. It turns that the logic there is complex, as it depends on several different conditions. Split the code which recommends Sphinx on two separate functions, in order to clean up the code. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9dedaec201803017b7a7dc24a074f3a4f040b72a.1621949137.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 163d01c56e80fdbd3e386162b969d6cb43af3b5c Author: Hayes Wang Date: Tue Jun 1 15:37:12 2021 +0800 r8152: support pauseparam of ethtool_ops Support get_pauseparam and set_pauseparam of ethtool_ops. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 68b8c55a701e4e7aba254688b483ef79da8338ed Author: Shaokun Zhang Date: Tue Jun 1 14:57:58 2021 +0800 qlcnic: Remove the repeated declaration Function 'qlcnic_82xx_hw_write_wx_2M' is declared twice, so remove the repeated declaration. Cc: Shahed Shaikh Cc: Manish Chopra Cc: GR-Linux-NIC-Dev@marvell.com Signed-off-by: Shaokun Zhang Signed-off-by: David S. Miller commit d153ef5ce7db6d9801d418638d05df92cc63797a Author: Zhen Lei Date: Tue Jun 1 14:27:36 2021 +0800 fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code No functional change. Signed-off-by: Zhen Lei Signed-off-by: David S. Miller commit 60b7db914dddcc94f455b62dbcc05b49d78f4cb6 Author: Dmitry Torokhov Date: Tue Jun 1 15:18:11 2021 -0700 Input: resistive-adc-touch - rework mapping of channels Instead of iterating over channels establish and use channel map to retrieve data. As a side effect this will silence "uninitialized variable" warnings. Tested-by: Oleksij Rempel Link: https://lore.kernel.org/r/YLXR2brkc4H54xtK@google.com Signed-off-by: Dmitry Torokhov commit 86881de4939a4d14d773de006de2292fd86b6a08 Author: Uwe Kleine-König Date: Tue Apr 27 18:45:22 2021 +0200 clk: qcom: Simplify usage of dev_err_probe() dev_err_probe() returns the error code passed as second parameter. Also if the error code is -EPROBE_DEFER dev_err_probe() is silent, so there is no need to check for this value before calling dev_err_probe(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210427164522.2886825-1-uwe@kleine-koenig.org Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 37d4b3fdc55dbeb32e3ed4d76d36d8ea4c1c479d Author: Vladimir Oltean Date: Mon May 31 19:17:07 2021 +0300 net: enetc: catch negative return code from enetc_pf_to_port() After the refactoring introduced in commit 87614b931c24 ("net: enetc: create a common enetc_pf_to_port helper"), enetc_pf_to_port was coded up to return -1 in case the passed PCIe device does not have a recognized BDF. Make sure the -1 value is checked by the callers, to appease static checkers. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b0f6c9ac8088a01cd9b6bfba8ede22f1bd0ff72f Author: Wander Lairson Costa Date: Mon May 31 12:23:23 2021 -0300 netpoll: don't require irqs disabled in rt kernels write_msg(netconsole.c:836) calls netpoll_send_udp after a call to spin_lock_irqsave, which normally disables interrupts; but in PREEMPT_RT this call just locks an rt_mutex without disabling irqs. In this case, netpoll_send_udp is called with interrupts enabled. Signed-off-by: Wander Lairson Costa Signed-off-by: David S. Miller commit a20af95fba7258103ce909acab52ccfb25ae3813 Merge: 0bf4d9af2efe1 47f26018a414f Author: David S. Miller Date: Tue Jun 1 15:11:57 2021 -0700 Merge branch 'marvell-prestera-firmware-3-0' Vadym Kochan says: ==================== Marvell Prestera Switchdev initial updates for firmware version 3.0 This series adds minimal support for firmware version 3.0 which has such changes like: - initial routing support - LAG support - events interrupt handling changes Changes just make able to work with new firmware version but supported features in driver will be added later. New firmware version was recently merged into linux-firmware tree. Added ability of loading previous fw major version if the latest one is missing, also add support for previous FW ABI. PATCH -> RFC: 1) Load previous fw version if the latest one is missing (suggested by Andrew Lunn) 2) Add support for previous FW ABI version (suggested by Andrew Lunn) RFC v2: 1) Get rid of automatic decrementing of major version but hard code it. 2) Print error message with file path if previous FW could not be loaded. ==================== Signed-off-by: David S. Miller commit 47f26018a414ff640527be4ca814168e0b71eaf3 Author: Vadym Kochan Date: Mon May 31 17:32:46 2021 +0300 net: marvell: prestera: try to load previous fw version Lets try to load previous fw version in case the latest one is missing on existing system. Signed-off-by: Vadym Kochan Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f1e1b26301782ef236d17947311e6f02c78eb8f0 Author: Vadym Kochan Date: Mon May 31 17:32:45 2021 +0300 net: marvell: prestera: bump supported firmware version to 3.0 New firmware version has some ABI and feature changes like: - LAG support - initial L3 support - changed events handling logic Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit c00e8a69fe429f164161d85466adb9bcb9ea0809 Author: Vadym Kochan Date: Mon May 31 17:32:44 2021 +0300 net: marvell: prestera: align flood setting according to latest firmware version Latest FW IPC flood message format was changed to configure uc/mc flooding separately, so change code according to this. Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 263805c8840de4f44564b14eb9b94b1ffed2823e Author: Vadym Kochan Date: Mon May 31 17:32:43 2021 +0300 net: marvell: prestera: disable events interrupt while handling There are change in firmware which requires that receiver will disable event interrupts before handling them and enable them after finish with handling. Events still may come into the queue but without receiver interruption. Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 0bf4d9af2efe118263ddb6b80bc5176629f20781 Author: Yang Yingliang Date: Mon May 31 20:48:59 2021 +0800 net: neterion: fix doc warnings in s2io.c Add description for may_sleep to fix the W=1 warnings: drivers/net/ethernet/neterion/s2io.c:1110: warning: Function parameter or member 'may_sleep' not described in 'init_tti' drivers/net/ethernet/neterion/s2io.c:3335: warning: Function parameter or member 'may_sleep' not described in 'wait_for_cmd_complete' drivers/net/ethernet/neterion/s2io.c:4881: warning: Function parameter or member 'may_sleep' not described in 's2io_set_multicast' Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 8a1c08ad19b6ecb7254eca5c7275cb5d6fa1b0cb Author: Florian Westphal Date: Sat May 29 18:53:25 2021 +0200 netfilter: fix clang-12 fmt string warnings nf_conntrack_h323_main.c:198:6: warning: format specifies type 'unsigned short' but xt_AUDIT.c:121:9: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat] Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 89258f8e4148630a7d327d23ce55b6f80b290ff4 Author: Florian Westphal Date: Sat May 29 18:50:45 2021 +0200 netfilter: nft_set_pipapo_avx2: fix up description warnings W=1: net/netfilter/nft_set_pipapo_avx2.c:159: warning: Excess function parameter 'len' description in 'nft_pipapo_avx2_refill' net/netfilter/nft_set_pipapo_avx2.c:1124: warning: Function parameter or member 'key' not described in 'nft_pipapo_avx2_lookup' net/netfilter/nft_set_pipapo_avx2.c:1124: warning: Excess function parameter 'elem' description in 'nft_pipapo_avx2_lookup' Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 20bd8e63f30be23ff544d6bd77fc3b933464100b Author: Darrick J. Wong Date: Mon May 31 11:31:56 2021 -0700 xfs: remove unnecessary shifts The superblock verifier already validates that (1 << blocklog) == blocksize, so use the value directly instead of doing math. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit a7bcb147fef39054fe324a1a988470f5da127196 Author: Darrick J. Wong Date: Mon May 31 11:31:56 2021 -0700 xfs: clean up open-coded fs block unit conversions Replace some open-coded fs block unit conversions with the standard conversion macro. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Carlos Maiolino commit 8c7a703ec9787a1b45b024e9acd253328422dcbd Author: Roberto Sassu Date: Fri May 28 09:38:09 2021 +0200 evm: Verify portable signatures against all protected xattrs Currently, the evm_config_default_xattrnames array contains xattr names only related to LSMs which are enabled in the kernel configuration. However, EVM portable signatures do not depend on local information and a vendor might include in the signature calculation xattrs that are not enabled in the target platform. Just including all xattrs names in evm_config_default_xattrnames is not a safe approach, because a target system might have already calculated signatures or HMACs based only on the enabled xattrs. After applying this patch, EVM would verify those signatures and HMACs with all xattrs instead. The non-enabled ones, which could possibly exist, would cause a verification error. Thus, this patch adds a new field named enabled to the xattr_list structure, which is set to true if the LSM associated to a given xattr name is enabled in the kernel configuration. The non-enabled xattrs are taken into account only in evm_calc_hmac_or_hash(), if the passed security.evm type is EVM_XATTR_PORTABLE_DIGSIG. The new function evm_protected_xattr_if_enabled() has been defined so that IMA can include all protected xattrs and not only the enabled ones in the measurement list, if the new template fields xattrnames, xattrlengths or xattrvalues have been included in the template format. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit f8216f6b957f5657c5f4c97f4b037120c6f236bc Author: Roberto Sassu Date: Fri May 28 09:38:08 2021 +0200 ima: Define new template field imode This patch defines the new template field imode, which includes the inode mode. It can be used by a remote verifier to verify the EVM portable signature, if it was included with the template fields sig or evmsig. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 7dcfeacc5a9d0c130160b86de23279793a8732c8 Author: Roberto Sassu Date: Fri May 28 09:38:07 2021 +0200 ima: Define new template fields iuid and igid This patch defines the new template fields iuid and igid, which include respectively the inode UID and GID. For idmapped mounts, still the original UID and GID are provided. These fields can be used to verify the EVM portable signature, if it was included with the template fields sig or evmsig. Signed-off-by: Roberto Sassu Acked-by: Christian Brauner Signed-off-by: Mimi Zohar commit cde1391a0b4014b0e8fc09cd316272f478b54c0f Author: Roberto Sassu Date: Fri May 28 09:38:06 2021 +0200 ima: Add ima_show_template_uint() template library function This patch introduces the new function ima_show_template_uint(). This can be used for showing integers of different sizes in ASCII format. The function ima_show_template_data_ascii() automatically determines how to print a stored integer by checking the integer size. If integers have been written in canonical format, ima_show_template_data_ascii() calls the appropriate leXX_to_cpu() function to correctly display the value. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit cbcddaa33d7e11a053cb80a4a635c023b4f8b906 Author: Andrew Cooper Date: Fri May 14 14:59:20 2021 +0100 perf/x86/rapl: Use CPUID bit on AMD and Hygon parts AMD and Hygon CPUs have a CPUID bit for RAPL. Drop the fam17h suffix as it is stale already. Make use of this instead of a model check to work more nicely in virtual environments where RAPL typically isn't available. [ bp: drop the ../cpu/powerflags.c hunk which is superfluous as the "rapl" bit name appears already in flags. ] Signed-off-by: Andrew Cooper Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210514135920.16093-1-andrew.cooper3@citrix.com commit 5a25d8ceb8611c06797b74e22d04af2b9fefd130 Merge: 49219d9b8785b ed1b472fc15ae Author: Mimi Zohar Date: Tue Jun 1 15:09:45 2021 -0400 Merge branch 'misc-evm-v7' into next-integrity From cover letter: EVM portable signatures are particularly suitable for the protection of metadata of immutable files where metadata is signed by a software vendor. They can be used for example in conjunction with an IMA policy that appraises only executed and memory mapped files. However, until now portable signatures can be properly installed only if the EVM_ALLOW_METADATA_WRITES initialization flag is also set, which disables metadata verification until an HMAC key is loaded. This will cause metadata writes to be allowed even in the situations where they shouldn't (metadata protected by a portable signature is immutable). The main reason why setting the flag is necessary is that the operations necessary to install portable signatures and protected metadata would be otherwise denied, despite being legitimate, due to the fact that the decision logic has to avoid an unsafe recalculation of the HMAC that would make the unsuccessfully verified metadata valid. However, the decision logic is too coarse, and does not fully take into account all the possible situations where metadata operations could be allowed. For example, if the HMAC key is not loaded and it cannot be loaded in the future due the EVM_SETUP_COMPLETE flag being set, it wouldn't be a problem to allow metadata operations, as they wouldn't result in an HMAC being recalculated. This patch set extends the decision logic and adds the necessary exceptions to use portable signatures without turning off metadata verification and deprecates the EVM_ALLOW_METADATA_WRITES flag. Link: https://lore.kernel.org/linux-integrity/20210514152753.982958-1-roberto.sassu@huawei.com/ commit 0ab8009b3e8dd6baf54751e734b8734bc0fcde5e Merge: 79e157b00853a c2131f7e73c9e Author: Arnaldo Carvalho de Melo Date: Tue Jun 1 14:58:44 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes from perf/urgent to allow perf/core to be used for new development. Signed-off-by: Arnaldo Carvalho de Melo commit 65688d2a05deb9f0671a7e2301eadbfe7e27c9e9 Author: Will Deacon Date: Thu May 27 13:43:56 2021 +0100 arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) Back in 97303480753e ("arm64: Increase the max granular size"), ARCH_DMA_MINALIGN was effectively increased to 128 bytes thanks to an increase in L1_CACHE_BYTES due to an unsubstantiated performance claim on the now obsolete ThunderX-1. Although this was reverted in d93277b9839b, ARCH_DMA_MINALIGN was kept at 128 bytes by ebc7e21e0fa2 ("arm64: Increase ARCH_DMA_MINALIGN to 128"). During discussion of the original patch, it was reported that the change also prevented a warning during boot on (again, now obsolete) Qualcomm server hardware where the cache writeback granule was larger than 64 bytes. The reason for this warning was because non-coherent DMA could lead to data corruption due to unexpected writeback from the CPU where a cacheline is shared with other allocations. Since then, systems have appeared with larger cachelines still, and so commit 8f5c9037a55b ("arm64/mm: Correct the cache line size warning with non coherent device") reworked the warning so that it only appears on systems where non-coherent DMA is actually required and taints the kernel with TAINT_CPU_OUT_OF_SPEC. We are not aware of any systems, even including the aforementioned obsolete machines, which have a CWG larger than 64 bytes and require non-coherent DMA. More recently, it has been reported that a ARCH_DMA_MINALIGN of 128 bytes wastes considerable memory (~6% immediately after boot on one system). Reduce ARCH_DMA_MINALIGN to 64 bytes and allow the warning/taint to indicate if there are machines that unknowingly rely on this. Cc: Catalin Marinas Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Vincent Whitchurch Link: https://lore.kernel.org/linux-arm-kernel/1442944788-17254-1-git-send-email-rric@kernel.org/ Link: https://lore.kernel.org/linux-arm-kernel/CAOZdJXUiRMAguDV+HEJqPg57MyBNqEcTyaH+ya=U93NHb-pdJA@mail.gmail.com/ Link: https://lore.kernel.org/linux-arm-kernel/20190614131141.4428-1-msys.mizuma@gmail.com/ Link: https://lore.kernel.org/r/20210517074332.28280-1-vincent.whitchurch@axis.com Acked-by: Catalin Marinas Acked-by: Mark Rutland Acked-by: Arnd Bergmann Acked-by: Mark Rutland Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210527124356.22367-1-will@kernel.org Signed-off-by: Will Deacon commit 21cfe6edbadb703b674ae2ddf78862d00d24bfc5 Author: Will Deacon Date: Thu May 27 12:03:19 2021 +0100 arm64: mm: Remove unused support for Normal-WT memory type The Normal-WT memory type is unused, so remove it and reclaim a MAIR. Cc: Christoph Hellwig Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210527110319.22157-4-will@kernel.org Signed-off-by: Will Deacon commit ee67c1103a1b50467969cf2cdb182c096c144459 Author: Will Deacon Date: Thu May 27 12:03:18 2021 +0100 arm64: acpi: Map EFI_MEMORY_WT memory as Normal-NC The only user we have of Normal Write-Through memory is in the ACPI code when mapping memory regions advertised as EFI_MEMORY_WT. Since most (all?) CPUs treat write-through as non-cacheable under the hood, don't bother with the extra memory type here and just treat EFI_MEMORY_WT the same way as EFI_MEMORY_WC by mapping it to the Normal-NC memory type instead and emitting a warning if we have failed to find an alternative EFI memory type. Cc: Ard Biesheuvel Cc: Lorenzo Pieralisi Cc: Christoph Hellwig Acked-by: Catalin Marinas Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210527110319.22157-3-will@kernel.org Signed-off-by: Will Deacon commit 58cc6b72a2127475296502fcb4d2b5006b7f4742 Author: Will Deacon Date: Thu May 27 12:03:17 2021 +0100 arm64: mm: Remove unused support for Device-GRE memory type The Device-GRE memory type is unused, so remove it and reclaim a MAIR. Cc: Christoph Hellwig Acked-by: Catalin Marinas Suggested-by: Catalin Marinas Link: https://lore.kernel.org/r/20210505180228.GA3874@arm.com Link: https://lore.kernel.org/r/20210527110319.22157-2-will@kernel.org Signed-off-by: Will Deacon commit 5ae632ed356c2f2e42a3e7ea447e98a9e684539c Author: Kefeng Wang Date: Sat May 29 19:15:10 2021 +0800 arm64: mm: Use better bitmap_zalloc() Use better bitmap_zalloc() to allocate bitmap. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20210529111510.186355-1-wangkefeng.wang@huawei.com Signed-off-by: Will Deacon commit 4fd084dbbd05402bb6e24782b8e9f9ea3e8ab3d6 Author: Allison Henderson Date: Fri May 21 00:53:40 2021 -0700 xfs: Clean up xfs_attr_node_addname_clear_incomplete We can use the helper function xfs_attr_node_remove_name to reduce duplicate code in this function Signed-off-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong commit 0e6acf29db6f463027d1ff7cea86a641da89f0d4 Author: Allison Henderson Date: Thu May 20 23:51:23 2021 -0700 xfs: Remove xfs_attr_rmtval_set This function is no longer used, so it is safe to remove Signed-off-by: Allison Henderson Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 8f502a4009822a6972772ae65b34078645b3ba16 Author: Allison Henderson Date: Fri May 21 15:48:13 2021 -0700 xfs: Add delay ready attr set routines This patch modifies the attr set routines to be delay ready. This means they no longer roll or commit transactions, but instead return -EAGAIN to have the calling routine roll and refresh the transaction. In this series, xfs_attr_set_args has become xfs_attr_set_iter, which uses a state machine like switch to keep track of where it was when EAGAIN was returned. See xfs_attr.h for a more detailed diagram of the states. Two new helper functions have been added: xfs_attr_rmtval_find_space and xfs_attr_rmtval_set_blk. They provide a subset of logic similar to xfs_attr_rmtval_set, but they store the current block in the delay attr context to allow the caller to roll the transaction between allocations. This helps to simplify and consolidate code used by xfs_attr_leaf_addname and xfs_attr_node_addname. xfs_attr_set_args has now become a simple loop to refresh the transaction until the operation is completed. Lastly, xfs_attr_rmtval_remove is no longer used, and is removed. Signed-off-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster commit 2b74b03c13c444cb5af56804cc975534e2058d06 Author: Allison Henderson Date: Mon Apr 26 15:00:33 2021 -0700 xfs: Add delay ready attr remove routines This patch modifies the attr remove routines to be delay ready. This means they no longer roll or commit transactions, but instead return -EAGAIN to have the calling routine roll and refresh the transaction. In this series, xfs_attr_remove_args is merged with xfs_attr_node_removename become a new function, xfs_attr_remove_iter. This new version uses a sort of state machine like switch to keep track of where it was when EAGAIN was returned. A new version of xfs_attr_remove_args consists of a simple loop to refresh the transaction until the operation is completed. A new XFS_DAC_DEFER_FINISH flag is used to finish the transaction where ever the existing code used to. Calls to xfs_attr_rmtval_remove are replaced with the delay ready version __xfs_attr_rmtval_remove. We will rename __xfs_attr_rmtval_remove back to xfs_attr_rmtval_remove when we are done. xfs_attr_rmtval_remove itself is still in use by the set routines (used during a rename). For reasons of preserving existing function, we modify xfs_attr_rmtval_remove to call xfs_defer_finish when the flag is set. Similar to how xfs_attr_remove_args does here. Once we transition the set routines to be delay ready, xfs_attr_rmtval_remove is no longer used and will be removed. This patch also adds a new struct xfs_delattr_context, which we will use to keep track of the current state of an attribute operation. The new xfs_delattr_state enum is used to track various operations that are in progress so that we know not to repeat them, and resume where we left off before EAGAIN was returned to cycle out the transaction. Other members take the place of local variables that need to retain their values across multiple function calls. See xfs_attr.h for a more detailed diagram of the states. Signed-off-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong commit 3f562d092bb1edd39bfc0e6808d7108d47f8aa3a Author: Allison Henderson Date: Fri Feb 12 12:27:14 2021 -0700 xfs: Hoist node transaction handling This patch basically hoists the node transaction handling around the leaf code we just hoisted. This will helps setup this area for the state machine since the goto is easily replaced with a state since it ends with a transaction roll. Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 83c6e70789ff371c4eebc54f2c8d979305a1bae8 Author: Allison Henderson Date: Mon Apr 19 12:55:26 2021 -0700 xfs: Hoist xfs_attr_leaf_addname This patch hoists xfs_attr_leaf_addname into the calling function. The goal being to get all the code that will require state management into the same scope. This isn't particularly aesthetic right away, but it is a preliminary step to merging in the state machine code. Signed-off-by: Allison Henderson Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Brian Foster commit 5d954cc09f6baed80458ea02ec092031608ea3fe Author: Allison Henderson Date: Mon Apr 26 16:50:26 2021 -0700 xfs: Hoist xfs_attr_node_addname This patch hoists the later half of xfs_attr_node_addname into the calling function. We do this because it is this area that will need the most state management, and we want to keep such code in the same scope as much as possible Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 6ca5a4a1f52952790a40099b79b5631d91163ba4 Author: Allison Henderson Date: Mon Apr 12 14:15:31 2021 -0700 xfs: Add helper xfs_attr_node_addname_find_attr This patch separates the first half of xfs_attr_node_addname into a helper function xfs_attr_node_addname_find_attr. It also replaces the restart goto with an EAGAIN return code driven by a loop in the calling function. This looks odd now, but will clean up nicly once we introduce the state machine. It will also enable hoisting the last state out of xfs_attr_node_addname with out having to plumb in a "done" parameter to know if we need to move to the next state or not. Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit f0f7c502c728d0c6947219739631bad101f8737b Author: Allison Henderson Date: Thu Feb 18 01:24:24 2021 -0700 xfs: Separate xfs_attr_node_addname and xfs_attr_node_addname_clear_incomplete This patch separate xfs_attr_node_addname into two functions. This will help to make it easier to hoist parts of xfs_attr_node_addname that need state management Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong commit 6286514b63e12d7bedc67e46aa1aeff9ed8378ce Author: Allison Henderson Date: Thu Feb 18 01:09:18 2021 -0700 xfs: Refactor xfs_attr_set_shortform This patch is actually the combination of patches from the previous version (v18). Initially patch 3 hoisted xfs_attr_set_shortform, and the next added the helper xfs_attr_set_fmt. xfs_attr_set_fmt is similar the old xfs_attr_set_shortform. It returns 0 when the attr has been set and no further action is needed. It returns -EAGAIN when shortform has been transformed to leaf, and the calling function should proceed the set the attr in leaf form. Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit a8490f699f6ec88843879b92cbb21953dab379ee Author: Allison Henderson Date: Thu Mar 18 17:25:59 2021 -0700 xfs: Add xfs_attr_node_remove_name This patch pulls a new helper function xfs_attr_node_remove_name out of xfs_attr_node_remove_step. This helps to modularize xfs_attr_node_remove_step which will help make the delayed attribute code easier to follow Signed-off-by: Allison Henderson Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster commit 4126c06e25b38842a254b2de6ffc3019a7b2f0ca Author: Allison Henderson Date: Thu Mar 18 17:21:18 2021 -0700 xfs: Reverse apply 72b97ea40d Originally we added this patch to help modularize the attr code in preparation for delayed attributes and the state machine it requires. However, later reviews found that this slightly alters the transaction handling as the helper function is ambiguous as to whether the transaction is diry or clean. This may cause a dirty transaction to be included in the next roll, where previously it had not. To preserve the existing code flow, we reverse apply this commit. Signed-off-by: Allison Henderson Reviewed-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong commit 344323e0428b9911406bede6cff23d1482c19eae Author: Robin Murphy Date: Thu May 27 16:34:48 2021 +0100 arm64: Rewrite __arch_clear_user() Now that we're always using STTR variants rather than abstracting two different addressing modes, the user_ldst macro here is frankly more obfuscating than helpful. Rewrite __arch_clear_user() with regular USER() annotations so that it's clearer what's going on, and take the opportunity to minimise the branchiness in the most common paths, while also allowing the exception fixup to return an accurate result. Apparently some folks examine large reads from /dev/zero closely enough to notice the loop being hot, so align it per the other critical loops (presumably around a typical instruction fetch granularity). Reviewed-by: Mark Rutland Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/1cbd78b12c076a8ad4656a345811cfb9425df0b3.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 9e51cafd783b22018fb15bfb06d65f69349223a9 Author: Robin Murphy Date: Thu May 27 16:34:47 2021 +0100 arm64: Better optimised memchr() Although we implement our own assembly version of memchr(), it turns out to be barely any better than what GCC can generate for the generic C version (and would go wrong if the size_t argument were ever large enough to be interpreted as negative). Unfortunately we can't import the tuned implementation from the Arm optimized-routines library, since that has some Advanced SIMD parts which are not really viable for general kernel library code. What we can do, however, is pep things up with some relatively straightforward word-at-a-time logic for larger calls. Adding some timing to optimized-routines' memchr() test for a simple benchmark, overall this version comes in around half as fast as the SIMD code, but still nearly 4x faster than our existing implementation. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/58471b42f9287e039dafa9e5e7035077152438fd.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 285133040e6ce0e6f37db962f2b4dad10ea46da0 Author: Robin Murphy Date: Thu May 27 16:34:46 2021 +0100 arm64: Import latest memcpy()/memmove() implementation Import the latest implementation of memcpy(), based on the upstream code of string/aarch64/memcpy.S at commit afd6244 from https://github.com/ARM-software/optimized-routines, and subsuming memmove() in the process. Note that for simplicity Arm have chosen to contribute this code to Linux under GPLv2 rather than the original MIT license. Note also that the needs of the usercopy routines vs. regular memcpy() have now diverged so far that we abandon the shared template idea and the damage which that incurred to the tuning of LDP/STP loops. We'll be back to tackle those routines separately in future. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/3c953af43506581b2422f61952261e76949ba711.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit b6c4ea48415d26ec08fb67fbbd3eefdb1f96ffa6 Author: Robin Murphy Date: Thu May 27 16:34:45 2021 +0100 arm64: Add assembly annotations for weak-PI-alias madness Add yet another set of assembly symbol annotations, this time for the borderline-absurd situation of a function aliasing to a weak symbol which itself also wants a position-independent alias. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/75545b3c4129b20b887474bb58a9cf302bf2132b.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 020b199bc70d98d92e1bbc6a71358d7293ebc5ea Author: Sam Tebbs Date: Thu May 27 16:34:44 2021 +0100 arm64: Import latest version of Cortex Strings' strncmp Import the latest version of the former Cortex Strings - now Arm Optimized Routines - strncmp function based on the upstream code of string/aarch64/strncmp.S at commit e823e3a from https://github.com/ARM-software/optimized-routines Note that for simplicity Arm have chosen to contribute this code to Linux under GPLv2 rather than the original MIT license. Signed-off-by: Sam Tebbs [ rm: update attribution and commit message ] Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/26110bee02ad360596c9a7536af7eaaf6890d0e8.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 325a1de81287a3d4ea2b8e6528a534c6c3a7c608 Author: Sam Tebbs Date: Thu May 27 16:34:43 2021 +0100 arm64: Import updated version of Cortex Strings' strlen Import an updated version of the former Cortex Strings - now Arm Optimized Routines - strcmp function. The latest version introduces Advanced SIMD usage which rules it out for our purposes, but we can still pick an intermediate improvement from the previous version, namely string/aarch64/strlen.S at commit 98e4d6a from https://github.com/ARM-software/optimized-routines Note that for simplicity Arm have chosen to contribute this code to Linux under GPLv2 rather than the original MIT license. Signed-off-by: Sam Tebbs [ rm: update attribution and commit message ] Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/32e3489398a24b23ae6e996935ac4818f8fd9dfd.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 758602c04409d8c5a092cef570b2de125ce0f2ae Author: Sam Tebbs Date: Thu May 27 16:34:42 2021 +0100 arm64: Import latest version of Cortex Strings' strcmp Import the latest version of the former Cortex Strings - now Arm Optimized Routines - strcmp function based on the upstream code of string/aarch64/strcmp.S at commit afd6244 from https://github.com/ARM-software/optimized-routines Note that for simplicity Arm have chosen to contribute this code to Linux under GPLv2 rather than the original MIT license. Signed-off-by: Sam Tebbs [ rm: update attribution and commit message ] Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/0fe90c90b96b569fbdfd46e47bd1298abb02079e.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 43de30d36742dbbde22f2ad526c3e5a403c271e2 Author: Sam Tebbs Date: Thu May 27 16:34:41 2021 +0100 arm64: Import latest version of Cortex Strings' memcmp Import the latest version of the former Cortex Strings - now Arm Optimized Routines - memcmp function based on the upstream code of string/aarch64/memcmp.S at commit e823e3a from https://github.com/ARM-software/optimized-routines Note that for simplicity Arm have chosen to contribute this code to Linux under GPLv2 rather than the original MIT license. Signed-off-by: Sam Tebbs [ rm: update attribution and commit message ] Signed-off-by: Robin Murphy Acked-by: Mark Rutland Link: https://lore.kernel.org/r/2889de2d41054f3f508fb3addad784a3606ef383.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 1a435466b0d470eb9095da0efefea5f7f69acf9c Merge: 5cb4e1f33e5ee 2ec6f20b33eb4 Author: Mark Brown Date: Tue Jun 1 18:33:33 2021 +0100 Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.14 commit 26bf457b4a39a467522be14fde5202fefd07289d Merge: d86eb3349b400 7db43da8c0990 Author: Mark Brown Date: Tue Jun 1 18:10:41 2021 +0100 Merge series "ASoC: Constify snd_compress_ops" from Rikard Falkeborn : The only use of the static and global snd_compress_ops structs is to assign their address to the compress_ops field in the snd_soc_component_driver struct which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Rikard Falkeborn (5): ASoC: cs47125: Constify static struct snd_compress_ops ASoC: wm5102: Constify static struct snd_compress_ops ASoC: wm5110: Constify static struct snd_compress_ops ASoC: qcom: q6asm-dai: Constify static struct snd_compress_ops ASoC: SOF: Intel: Constify sof_probe_compressed_ops sound/soc/codecs/cs47l24.c | 2 +- sound/soc/codecs/wm5102.c | 2 +- sound/soc/codecs/wm5110.c | 2 +- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- sound/soc/sof/compress.c | 2 +- sound/soc/sof/compress.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- 2.31.1 commit d86eb3349b4000c87dabc3c0d676a3d0bec4a3d9 Merge: 1f763d0388af6 c413983eb66a0 Author: Mark Brown Date: Tue Jun 1 18:10:39 2021 +0100 Merge series "ASoC: rsnd: adjust disabled module for R-Car D3" from Kuninori Morimoto : Hi Mark, Geert Renesas Sound driver is assuming that all SSI/SRC are connected. But some SSI/SRC are not connected on Some Renesas SoC. ex) H2 E2 SRC0 <= SRC1 SRC1 SRC2 SRC2 ... ... We accepted it by using "status = disabled" on DT before. ex) rcar_sound,src { src-0 { => status = "disabled"; }; src1: src-1 { ... }; ... But R-Car D3 have many disabled modules (It has SSI3/SSI4, SRC5/SRC6), and Renesas SoC maintainer don't want above style on DT. ex) rcar_sound,src { => src0: src-0 { status = "disabled"; }; => src1: src-1 { status = "disabled"; }; => src2: src-2 { status = "disabled"; }; => src3: src-3 { status = "disabled"; }; => src4: src-4 { status = "disabled"; }; src5: src-5 { ... }; ... This patch-set adjust to this situation, and enables to intuitive DT settings. rcar_sound,src { src5: src-5 { ... }; src6: src-6 { ... }; }; Kuninori Morimoto (4): ASoC: rsnd: tidyup rsnd_parse_connect_common() ASoC: rsnd: tidyup rsnd_dma_request_channel() ASoC: rsnd: tidyup rsnd_parse_connect_xxx() ASoC: rsnd: adjust disabled module sound/soc/sh/rcar/core.c | 58 ++++++++++++++++++++++++++++++++++++++-- sound/soc/sh/rcar/dma.c | 8 +++--- sound/soc/sh/rcar/dvc.c | 2 +- sound/soc/sh/rcar/rsnd.h | 16 ++++++----- sound/soc/sh/rcar/src.c | 6 +++-- sound/soc/sh/rcar/ssi.c | 12 ++++++--- sound/soc/sh/rcar/ssiu.c | 10 ++++--- 7 files changed, 91 insertions(+), 21 deletions(-) -- 2.25.1 commit 1bd1b3be86550d9df1ca81b8939b42a1b7fd5d68 Author: Takashi Sakamoto Date: Tue Jun 1 17:17:53 2021 +0900 ALSA: bebob: perform sequence replay for media clock recovery This commit takes ALSA bebob driver to perform sequence replay for media clock recovery. Many users have reported discontinuity of data block counter field of CIP header in tx packet from the devices based on BeBoB ASICs. In the worst case, the device corrupts not to respond to any transaction, then generate bus-reset voluntarily for recovery. The sequence replay for media clock recovery is expected to suppress most of the problems. In the beginning of packet streaming, the device transfers NODATA packets for a while, then multiplexes any event and syt information. ALSA IEC 61883-1/6 packet streaming engine has implementation for it to drop the initial NODATA packets. It starts sequence replay when detecting any event multiplexed to tx packets. The sequence replay is tested with below models: * Focusrite Saffire * Focusrite Saffire LE * Focusrite Saffire Pro 10 I/O * Focusrite Saffire Pro 26 I/O * M-Audio FireWire Solo * M-Audio FireWire Audiophile * M-Audio Ozonic * M-Audio FireWire 410 * M-Audio FireWire 1814 * Edirol FA-66 * ESI Quatafire 610 * Apogee Ensemble * Phonic Firefly 202 * Behringer F-Control Audio 610 Unfortunately, below models doesn't generate sound. This seems regression introduced recent few years: * Stanton Final Scratch ScratchAmp at middle sampling transfer frequency * Yamaha GO44 * Yamaha GO46 * Terratec Phase x24 As I reported, below model has quirk of discontinuity: * M-Audio ProFire Lightbridge DM1000/DM1100 ASICs in BeBoB solution are known to have bugs at switch of sampling transfer frequency between low/middle/high rates. The switch generates the similar problems about which I mention in the above. Some vendors customizes firmware so that the switch of frequency is done in vendor-specific registers, then restrict users to switch the frequency. For example of Focusrite Saffire Pro 10 i/o and 26 i/o, users allows to switch the frequency within the three steps; e.g. 44.1/48.0 kHz are available at low step. Between the steps, extra operation is required and it always generates bus-reset. Another example of Edirol FA-66, users are prohibited to switch the frequency by software. It's done by hardware switch and power-off. I note that the sequence replay is not a solution for the ASIC bugs. Users need to disconnect the device corrupted by the bug, then reconnect it to refresh state machine inner the ASIC. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210601081753.9191-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 4121f626d0d83a5c801ad82988a5b4ea36a9336c Author: Takashi Sakamoto Date: Tue Jun 1 17:17:52 2021 +0900 ALSA: dice: perform sequence replay for media clock recovery This commit takes ALSA dice driver to perform sequence replay for media clock recovery. Unlike the other types of device, DICE-based devices interpret the value of syt field of CIP header in rx packets as presentation time for audio playback, thus it's required for driver to compute value for outgoing packet adequate to the device. It's done by media clock recovery by handling tx packets. The device starts packet transmission immediately at operation to GLOBAL_ENABLE thus on-the-fly mode is not required. DICE ASICs supports several pairs of isochronous packet streams. Actually, maximum two pairs of streams are supported by devices. We have three cases regarding to the number of streams: 1. a pair of streams 2. two tx packet streams and one rx packet streams 3. one tx packet streams and two rx packet streams 4. two pair of streams The decision of playback timing is slightly different in the four cases. In the case 1, sequence replay in the pair results in suitable playback timing. In the case 2, sequence replay from the first tx packet stream to rx packet stream results in suitable playback timing. In the case 3, sequence replay from tx packet stream to all of rx packet stream results in suitable playback timing. Furthermore, the cycle to start receiving packets should be the same between all rx packet streams. In the case 4, sequence replay in each pair results in suitable playback timing. Furthermore, the cycle to start receiving packets should be the same between all rx packet streams. The sequence replay is tested with below models: * For case 1: * TC Electronic Konnekt 24d (DiceII) * TC Electronic Konnekt 8 (DiceII) * TC Electronic Konnekt Live (DiceII) * TC Electronic Impact Twin (DiceII) * TC Electronic Digital Konnekt X32 (DiceII) * TC Electronic Desktop Konnekt 6 (TCD2220) * Solid State Logic Duende Classic (DiceII) * Solid State Logic Duende Mini (DiceII) * PreSonus FireStudio Project (TCD2210) * PreSonus FireStudio Mobile (TCD2210) * Lexicon I-ONIX FW810s (TCD2220) * Avid Mbox 3 Pro (TCD2220) * For case 2 (but case 1 depends on sampling transfer frequency): * Alesis iO 26 (DiceII) * Alesis iO 14 (DiceII) * Alesis MultiMix 12 FireWire (DiceII) * Focusrite Saffire Pro 26 (TCD2220) * For case 3 (but case 1 depends on sampling transfer frequency): * M-Audio Profire 610 (TCD2220) * Loud Technology Mackie Onyx Blackbird (TCD2210) * For case 4: * TC Electronic Studio Konnekt 48 (DiceII + TCD2220) * PreSonus FireStudio (DiceII) * M-Audio Profire 2626 (TCD2220) * Focusrite Liquid Saffire 56 (TCD2220) * Focusrite Saffire Pro 40 (TCD2220) Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210601081753.9191-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 41319eb56e1987e7b72973045b890f6b41abf72e Author: Takashi Sakamoto Date: Tue Jun 1 17:17:51 2021 +0900 ALSA: dice: wait just for NOTIFY_CLOCK_ACCEPTED after GLOBAL_CLOCK_SELECT operation NOTIFY_CLOCK_ACCEPTED notification is always generated as a result of GLOBAL_CLOCK_SELECT operation, however NOTIFY_LOCK_CHG notification doesn't, as long as the selected clock is already configured. In the case, ALSA dice driver waits so long. It's inconvenient for some devices to lock to the sequence of value in syt field of CIP header in rx packets. This commit wait just for NOTIFY_CLOCK_ACCEPTED notification by reverting changes partially done by two commits below: * commit fbeac84dbe9e ("ALSA: dice: old firmware optimization for Dice notification") * commit aec045b80d79 ("ALSA: dice: change notification mask to detect lock status change") I note that the successful lock to the sequence of value in syt field of CIP header in rx packets results in NOTIFY_EXT_STATUS notification, then EXT_STATUS_ARX1_LOCKED bit stands in GLOBAL_EXTENDED_STATUS register. The notification can occur enough after receiving the batch of rx packets. When the sequence doesn't include value in syt field of CIP header in rx packets adequate to the device, the notification occurs again and the bit is off. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210601081753.9191-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ed1b472fc15aeaa20ddeeb93fd25190014e50d17 Author: Roberto Sassu Date: Fri May 14 17:27:53 2021 +0200 ima: Don't remove security.ima if file must not be appraised Files might come from a remote source and might have xattrs, including security.ima. It should not be IMA task to decide whether security.ima should be kept or not. This patch removes the removexattr() system call in ima_inode_post_setattr(). Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 026d7fc92a9d629630779c999fe49ecae93f9d63 Author: Roberto Sassu Date: Fri May 14 17:27:52 2021 +0200 ima: Introduce template field evmsig and write to field sig as fallback With the patch to accept EVM portable signatures when the appraise_type=imasig requirement is specified in the policy, appraisal can be successfully done even if the file does not have an IMA signature. However, remote attestation would not see that a different signature type was used, as only IMA signatures can be included in the measurement list. This patch solves the issue by introducing the new template field 'evmsig' to show EVM portable signatures and by including its value in the existing field 'sig' if the IMA signature is not found. Suggested-by: Mimi Zohar Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 7aa5783d95646f924b99d245338d5b7aa7a2b3c0 Author: Roberto Sassu Date: Fri May 14 17:27:51 2021 +0200 ima: Allow imasig requirement to be satisfied by EVM portable signatures System administrators can require that all accessed files have a signature by specifying appraise_type=imasig in a policy rule. Currently, IMA signatures satisfy this requirement. Appended signatures may also satisfy this requirement, but are not applicable as IMA signatures. IMA/appended signatures ensure data source authentication for file content and prevent any change. EVM signatures instead ensure data source authentication for file metadata. Given that the digest or signature of the file content must be included in the metadata, EVM signatures provide the same file data guarantees of IMA signatures, as well as providing file metadata guarantees. This patch lets systems protected with EVM signatures pass appraisal verification if the appraise_type=imasig requirement is specified in the policy. This facilitates deployment in the scenarios where only EVM signatures are available. The patch makes the following changes: file xattr types: security.ima: IMA_XATTR_DIGEST/IMA_XATTR_DIGEST_NG security.evm: EVM_XATTR_PORTABLE_DIGSIG execve(), mmap(), open() behavior (with appraise_type=imasig): before: denied (file without IMA signature, imasig requirement not met) after: allowed (file with EVM portable signature, imasig requirement met) open(O_WRONLY) behavior (without appraise_type=imasig): before: allowed (file without IMA signature, not immutable) after: denied (file with EVM portable signature, immutable) In addition, similarly to IMA signatures, this patch temporarily allows new files without or with incomplete metadata to be opened so that content can be written. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 1434c6a1d32a3a1a77f58a03197b802b1724c740 Author: Roberto Sassu Date: Fri May 14 17:27:50 2021 +0200 evm: Deprecate EVM_ALLOW_METADATA_WRITES This patch deprecates the usage of EVM_ALLOW_METADATA_WRITES, as it is no longer necessary. All the issues that prevent the usage of EVM portable signatures just with a public key loaded have been solved. This flag will remain available for a short time to ensure that users are able to use EVM without it. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 1886ab01a3fb98ee7f7739ae50eb9492f5df3641 Author: Roberto Sassu Date: Fri May 14 17:27:49 2021 +0200 evm: Allow setxattr() and setattr() for unmodified metadata With the patch to allow xattr/attr operations if a portable signature verification fails, cp and tar can copy all xattrs/attrs so that at the end of the process verification succeeds. However, it might happen that the xattrs/attrs are already set to the correct value (taken at signing time) and signature verification succeeds before the copy has completed. For example, an archive might contains files owned by root and the archive is extracted by root. Then, since portable signatures are immutable, all subsequent operations fail (e.g. fchown()), even if the operation is legitimate (does not alter the current value). This patch avoids this problem by reporting successful operation to user space when that operation does not alter the current value of xattrs/attrs. With this patch, the one that introduces evm_hmac_disabled() and the one that allows a metadata operation on the INTEGRITY_FAIL_IMMUTABLE error, EVM portable signatures can be used without disabling metadata verification (by setting EVM_ALLOW_METADATA_WRITES). Due to keeping metadata verification enabled, altering immutable metadata protected with a portable signature that was successfully verified will be denied (existing behavior). Reported-by: kernel test robot [implicit declaration of function] Signed-off-by: Roberto Sassu Reviewed-by: Christian Brauner Cc: Andreas Gruenbacher Signed-off-by: Mimi Zohar commit 9450129ed944b3c31c440f5422147103828c2b99 Author: Paul Cercueil Date: Tue Jun 1 10:54:05 2021 +0100 drm: Fix misleading documentation of drm_gem_cma_create() The backing memory does not necessarily have the writecombine attribute set, since commit cf8ccbc72d61 ("drm: Add support for GEM buffers backed by non-coherent memory"). Fixes: cf8ccbc72d61 ("drm: Add support for GEM buffers backed by non-coherent memory") Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210601095405.8975-1-paul@crapouillou.net commit 8e3237989b0d38176a3603422777ac7da6bfab2b Author: Wesley Sheng Date: Mon May 31 16:12:15 2021 +0800 Documentation: PCI: Fix typo in pci-error-recovery.rst Replace "It" with "If", since it is a conditional statement. Link: https://lore.kernel.org/r/20210531081215.43507-1-wesley.sheng@amd.com Signed-off-by: Wesley Sheng Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit ad7395c7482d34b63b2d8547acafc796e331319a Author: Judy Hsiao Date: Tue Jun 1 10:21:17 2021 +0800 arm64: dts: qcom: sc7180: add label for secondary mi2s Adds label for MI2S secondary block to allow follower projects to override for the four speaker support which uses I2S SD1 line on gpio52 pin. Reviewed-by: Stephen Boyd Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20210601022117.4071117-1-judyhsiao@chromium.org Signed-off-by: Bjorn Andersson commit 79806d32d5aaafbf170e9b0c03b15d1be77f4c64 Author: Peng Fan Date: Thu May 6 12:08:43 2021 +0800 remoteproc: imx_rproc: support i.MX8MN/P Add i.MX8MN/P remote processor(Cortex-M7) support, we are using ARM SMCCC to start/stop M core, not using regmap interface. Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1620274123-1461-9-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit c8a1a56d8729bdad179e6d4c35830ba3b8dfa20e Author: Peng Fan Date: Thu May 6 12:08:42 2021 +0800 remoteproc: imx_rproc: support i.MX7ULP i.MX7ULP A7 core runs under control of M4 core, M4 core starts by ROM and powers most services used by A7 core, so A7 core has no power to start and stop M4 core. And the M4 core's state is default RPROC_DETACHED and remoteproc framework not able to stop the M4 core. Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1620274123-1461-8-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit cc0316c10fb7063022f604fdaee129109723d1ea Author: Peng Fan Date: Thu May 6 12:08:41 2021 +0800 remoteproc: imx_rproc: make clk optional To i.MX7ULP, M4 is the master to control everything, no need to provide clk from Linux side. So make clk optional when method is IMX_RPROC_NONE. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1620274123-1461-7-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 52bda8d375143585c366a7d4e5b5e680cf14100b Author: Peng Fan Date: Thu May 6 12:08:40 2021 +0800 remoteproc: imx_rproc: initial support for mutilple start/stop method Add three methods IMX_RPROC_NONE(no need start/stop), IMX_RPROC_MMIO (start/stop through mmio) and IMX_RPROC_SMC(start/stop through ARM SMCCC). The current SoCs supported are all using IMX_RPROC_MMIO. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1620274123-1461-6-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit e13d1a43aa0f6ef509c9dfda6489fe80b7315620 Author: Peng Fan Date: Thu May 6 12:08:39 2021 +0800 remoteproc: imx_rproc: parse fsl,auto-boot Parse fsl,auto-boot to indicate whether need remoteproc framework auto boot or not. When remote processor is booted before Linux Kernel up, do not parse fsl,auto-boot, so only need to parse the property when rproc state is RPROC_DETACHED. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1620274123-1461-5-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 5dc9e9d1b7582b0b7cba10f22763bcb7b1d33902 Author: Peng Fan Date: Thu May 6 12:08:38 2021 +0800 dt-bindings: remoteproc: imx_rproc: support i.MX8MN/P Add i.MX8MN/P remote processor(Cortex-M7) compatible string Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/r/1620274123-1461-4-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 7a95b19a39c6bc4c107be9f0e8fa6fbee4db777d Author: Peng Fan Date: Thu May 6 12:08:37 2021 +0800 dt-bindings: remoteproc: imx_rproc: add i.MX7ULP support Add i.MX7ULP compatible. We use i.MX7ULP dual mode and in which case i.MX7ULP A7 core runs under control of M4 core, M4 core starts by ROM and powers most services used by A7 core, so A7 core has no power to start and stop M4 core. So clocks and syscon are not required. Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/r/1620274123-1461-3-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit bad70abdfac1e27d9aa7cc07b02caad5c06667ba Author: Peng Fan Date: Thu May 6 12:08:36 2021 +0800 dt-bindings: remoteproc: imx_rproc: add fsl,auto-boot property Add an optional property "fsl,auto-boot" to indicate remote processor auto boot. Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/r/1620274123-1461-2-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 4cfc965475124c4eed2b7b5d8b6fc5048a21ecfd Author: Hsin-Hsiung Wang Date: Wed May 26 14:52:06 2021 +0800 regulator: mt6359: Add support for MT6359P regulator The MT6359P is a eco version for MT6359 regulator. We add support based on MT6359 regulator driver. Signed-off-by: Hsin-Hsiung Wang Acked-by: Mark Brown Signed-off-by: Lee Jones commit d7a58decc7049e8ca9707b63fcc2556cde3d26c5 Author: Wen Su Date: Wed May 26 14:52:05 2021 +0800 regulator: mt6359: Add support for MT6359 regulator The MT6359 is a regulator found on boards based on MediaTek MT6779 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Wen Su Signed-off-by: Hsin-Hsiung Wang Acked-by: Mark Brown Signed-off-by: Lee Jones commit e545b8f380a96174df40db4203d09156e096ee89 Author: Hsin-Hsiung Wang Date: Wed May 26 14:52:04 2021 +0800 mfd: Add support for the MediaTek MT6359 PMIC This adds support for the MediaTek MT6359 PMIC. This is a multifunction device with the following sub modules: - Codec - Interrupt - Regulator - RTC It is interfaced to the host controller using SPI interface by a proprietary hardware called PMIC wrapper or pwrap. MT6359 MFD is a child device of the pwrap. Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Lee Jones commit 8771456635d595707307210d5aa9f8ce41598f94 Author: Hsin-Hsiung Wang Date: Wed May 26 14:52:03 2021 +0800 dt-bindings: regulator: Add document for MT6359 regulator add dt-binding document for MediaTek MT6359 PMIC Signed-off-by: Hsin-Hsiung Wang Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 65c1d05325b71b592688590d85c5ef6b360ca3fe Author: Hsin-Hsiung Wang Date: Wed May 26 14:52:02 2021 +0800 dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC This adds compatible for the MediaTek MT6359 PMIC. Signed-off-by: Hsin-Hsiung Wang Acked-by: Rob Herring Signed-off-by: Lee Jones commit be60652f0260c2f371670ec90f1ac55e2671f793 Author: Hsin-Hsiung Wang Date: Wed May 26 14:52:01 2021 +0800 rtc: mt6397: refine RTC_TC_MTH This patch adds RTC_TC_MTH_MASK to support new chips. Signed-off-by: Yuchen Huang Signed-off-by: Hsin-Hsiung Wang Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit d8570c182f56ca52c98734732fb9a331f7c23f9a Author: Hsin-Hsiung Wang Date: Wed May 26 14:52:00 2021 +0800 mfd: mt6358: Refine interrupt code This patch refines the interrupt related code to support new chips. Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Lee Jones commit 492109333c29e1bb16d8732e1d597b02e8e0bf2e Author: Jiapeng Chong Date: Tue Jun 1 19:07:10 2021 +0800 fs/jfs: Fix missing error code in lmLogInit() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'rc. Eliminate the follow smatch warning: fs/jfs/jfs_logmgr.c:1327 lmLogInit() warn: missing error code 'rc'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Dave Kleikamp commit 7fea67710e9f6a111a2c9440576f2396ccd92d57 Author: Zhen Lei Date: Thu May 13 21:26:46 2021 +0800 firmware: tegra: Fix error return code in tegra210_bpmp_init() When call irq_get_irq_data() to get the IRQ's irq_data failed, an appropriate error code -ENOENT should be returned. However, we directly return 'err', which records the IRQ number instead of the error code. Fixes: 139251fc2208 ("firmware: tegra: add bpmp driver for Tegra210") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Thierry Reding commit 79e157b00853af0e96d76997a93feec476a23bfa Author: Jin Yao Date: Thu May 27 08:16:10 2021 +0800 perf c2c: Support record for hybrid platform Support 'perf c2c record' for hybrid platform. On hybrid platform, such as Alderlake, when executing 'perf c2c record', it actually calls: record -W -d --phys-data --sample-cpu -e {cpu_core/mem-loads-aux/,cpu_core/mem-loads,ldlat=30/}:P -e cpu_atom/mem-loads,ldlat=30/P -e cpu_core/mem-stores/P -e cpu_atom/mem-stores/P Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-9-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d5a8bd0fcd069819aa48f5e38548e07d5eb3e651 Author: Jin Yao Date: Thu May 27 08:16:09 2021 +0800 perf mem: Disable 'mem-loads-aux' group before reporting For some platforms, such as Alderlake, the 'mem-loads' event is required to use together with 'mem-loads-aux' within a group and 'mem-loads-aux' must be the group leader. Now we disable this group before reporting because 'mem-loads-aux' is just an auxiliary event. It doesn't carry any valid memory load result. If we show the 'mem-loads-aux' + 'mem-loads' as a group in report, it needs many of changes but they are totally unnecessary. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-8-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a6d9de8427584553b71492071f6ffd7c92ec8b99 Author: Jin Yao Date: Thu May 27 08:16:08 2021 +0800 perf mem: Fix wrong verbose output for recording events Current code: for (j = 0; j < argc; j++, i++) rec_argv[i] = argv[j]; if (verbose > 0) { pr_debug("calling: record "); while (rec_argv[j]) { pr_debug("%s ", rec_argv[j]); j++; } pr_debug("\n"); } The entries of argv[] are copied to the end of rec_argv[], not copied to the beginning of rec_argv[]. So the index j at rec_argv[] doesn't point to the first event. Now we record the start index and end index for events in rec_argv[], and print them if verbose is enabled. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-7-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4a9086adc329c9460aefc563969b24eed534adba Author: Jin Yao Date: Thu May 27 08:16:07 2021 +0800 perf mem: Support record for hybrid platform Support 'perf mem record' for hybrid platform. On hybrid platform, such as Alderlake, when executing 'perf mem record', it actually calls: record -e {cpu_core/mem-loads-aux/,cpu_core/mem-loads,ldlat=30/}:P -e cpu_atom/mem-loads,ldlat=30/P -e cpu_core/mem-stores/P -e cpu_atom/mem-stores/P Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-6-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e7ce8d11bfb06a06c1e00830c223514086191649 Author: Jin Yao Date: Thu May 27 08:16:06 2021 +0800 perf tools: Check if mem_events is supported for hybrid platform Check if the mem_events ('mem-loads' and 'mem-stores') exist in the sysfs path. For Alderlake, the hybrid cpu pmu are "cpu_core" and "cpu_atom". Check the existing of following paths: /sys/devices/cpu_atom/events/mem-loads /sys/devices/cpu_atom/events/mem-stores /sys/devices/cpu_core/events/mem-loads /sys/devices/cpu_core/events/mem-stores If the patch exists, the mem_event is supported. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-5-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a91ffcf30e0002e6f52d4c2cd9639443e514e88a Author: Jin Yao Date: Thu May 27 08:16:05 2021 +0800 perf tools: Support pmu prefix for mem-store event For enabling mem-store event, it doesn't need an auxiliary event. So just build an event name string with the pmu prefix. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-4-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d2f327acc638312a96d0c0a20c56c7db945d30d7 Author: Jin Yao Date: Thu May 27 08:16:04 2021 +0800 perf tools: Support pmu prefix for mem-load event The perf_mem_events__name() can generate the mem-load event name. It uses a variable 'mem_loads_name__init' to avoid generating the event name every time (because perf_pmu__scan takes some time). The perf_mem_events__name() assumes the pmu is "cpu" but it's not correct for hybrid platform. For Alderlake, the pmu is "cpu_core" or "cpu_atom" Introduce a new parameter 'pmu_name' in perf_mem_events__name to let the caller specify a pmu name. Considering such event name is x86 specific, so move perf_mem_events[] to arch/x86/util/mem-events.c. We still keep the variable 'mem_loads_name__init' but it's only used when pmu_name is NULL (compatible for original behavior). When pmu_name is not NULL (e.g. "cpu_core"), this patch doesn't have optimization. That can be implemented in follow up patch. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-3-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ddc11da5eb37e27a4b66cddcaf11233ef51b3a79 Author: Jin Yao Date: Thu May 27 08:16:03 2021 +0800 perf tools: Check mem-loads auxiliary event For some platforms, an auxiliary event has to be enabled simultaneously with the load latency event. For Alderlake, the auxiliary event is created in "cpu_core" pmu. So first we need to check the existing of "cpu_core" pmu and then check if this pmu has auxiliary event. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210527001610.10553-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 475ea6c60279e9f2ddf7e4cf2648cd8ae0608361 Author: Valentin Schneider Date: Wed May 26 21:57:50 2021 +0100 sched: Don't defer CPU pick to migration_cpu_stop() Will reported that the 'XXX __migrate_task() can fail' in migration_cpu_stop() can happen, and it *is* sort of a big deal. Looking at it some more, one will note there is a glaring hole in the deferred CPU selection: (w/ CONFIG_CPUSET=n, so that the affinity mask passed via taskset doesn't get AND'd with cpu_online_mask) $ taskset -pc 0-2 $PID # offline CPUs 3-4 $ taskset -pc 3-5 $PID `\ $PID may stay on 0-2 due to the cpumask_any_distribute() picking an offline CPU and __migrate_task() refusing to do anything due to cpu_is_allowed(). set_cpus_allowed_ptr() goes to some length to pick a dest_cpu that matches the right constraints vs affinity and the online/active state of the CPUs. Reuse that instead of discarding it in the affine_move_task() case. Fixes: 6d337eab041d ("sched: Fix migrate_disable() vs set_cpus_allowed_ptr()") Reported-by: Will Deacon Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210526205751.842360-2-valentin.schneider@arm.com commit 08f7c2f4d0e9f4283f5796b8168044c034a1bfcb Author: Odin Ugedal Date: Tue May 18 14:52:02 2021 +0200 sched/fair: Fix ascii art by relpacing tabs When using something other than 8 spaces per tab, this ascii art makes not sense, and the reader might end up wondering what this advanced equation "is". Signed-off-by: Odin Ugedal Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210518125202.78658-4-odin@uged.al commit 15faafc6b449777a85c0cf82dd8286c293fed4eb Author: Peter Zijlstra Date: Mon May 31 12:21:13 2021 +0200 sched,init: Fix DEBUG_PREEMPT vs early boot Extend 8fb12156b8db ("init: Pin init task to the boot CPU, initially") to cover the new PF_NO_SETAFFINITY requirement. While there, move wait_for_completion(&kthreadd_done) into kernel_init() to make it absolutely clear it is the very first thing done by the init thread. Fixes: 570a752b7a9b ("lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowed") Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Tested-by: Borislav Petkov Link: https://lkml.kernel.org/r/YLS4mbKUrA3Gnb4t@hirez.programming.kicks-ass.net commit 7b419f47facd286c6723daca6ad69ec355473f78 Author: Peter Zijlstra Date: Tue May 25 08:53:28 2021 +0200 sched: Add CONFIG_SCHED_CORE help text Hugh noted that the SCHED_CORE Kconfig option could do with a help text. Requested-by: Hugh Dickins Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Randy Dunlap Acked-by: Hugh Dickins Link: https://lkml.kernel.org/r/YKyhtwhEgvtUDOyl@hirez.programming.kicks-ass.net commit 00afe83098f59d3091a800d0db188ca495b2bc02 Author: Peter Zijlstra Date: Tue May 25 09:25:20 2021 +0200 x86,kprobes: WARN if kprobes tries to handle a fault With the removal of kprobe::handle_fault there is no reason left that kprobe_page_fault() would ever return true on x86, make sure it doesn't happen by accident. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210525073213.660594073@infradead.org commit ec6aba3d2be1ed75b3f4c894bb64a36d40db1f55 Author: Peter Zijlstra Date: Tue May 25 09:25:19 2021 +0200 kprobes: Remove kprobe::fault_handler The reason for kprobe::fault_handler(), as given by their comment: * We come here because instructions in the pre/post * handler caused the page_fault, this could happen * if handler tries to access user space by * copy_from_user(), get_user() etc. Let the * user-specified handler try to fix it first. Is just plain bad. Those other handlers are ran from non-preemptible context and had better use _nofault() functions. Also, there is no upstream usage of this. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Christoph Hellwig Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210525073213.561116662@infradead.org commit 9ce4d216fe8b581e4da4406461a4cfc9acbfa679 Author: Qiujun Huang Date: Mon May 24 04:14:11 2021 +0000 uprobes: Update uprobe_write_opcode() kernel-doc comment commit 6d43743e9079 ("Uprobe: Additional argument arch_uprobe to uprobe_write_opcode()") added the parameter @auprobe. Signed-off-by: Qiujun Huang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210524041411.157027-1-hqjagain@gmail.com commit 0e0ccdecb3cff95a350b4364e7ebbaa754d0e47d Author: Christoph Hellwig Date: Tue May 25 08:13:01 2021 +0200 block: remove bdget_disk Just opencode the xa_load in the callers, as none of them actually needs a reference to the bdev. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210525061301.2242282-9-hch@lst.de Signed-off-by: Jens Axboe commit c97d93c31e5734a16bfe663085ec91b8c9fb20f9 Author: Christoph Hellwig Date: Tue May 25 08:13:00 2021 +0200 block: factor out a part_devt helper Add a helper to find the dev_t for a disk + partno tuple. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210525061301.2242282-8-hch@lst.de Signed-off-by: Jens Axboe commit ab4b57057d744861f670b47b163209727b26418b Author: Christoph Hellwig Date: Tue May 25 08:12:59 2021 +0200 block: move bd_part_count to struct gendisk The bd_part_count value only makes sense for whole devices, so move it to struct gendisk and give it a more descriptive name. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210525061301.2242282-7-hch@lst.de Signed-off-by: Jens Axboe commit c8276b954d2dacbabe587c0421a9344529af5bad Author: Christoph Hellwig Date: Tue May 25 08:12:58 2021 +0200 block: split __blkdev_put Split __blkdev_put into one helper for the whole device, and one for partitions as well as another shared helper for flushing the block device inode mapping. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210525061301.2242282-6-hch@lst.de Signed-off-by: Jens Axboe commit e54069acac1a302c1adc26694963547f8b73c2b0 Author: Christoph Hellwig Date: Tue May 25 08:12:57 2021 +0200 block: move adjusting bd_part_count out of __blkdev_get Keep in the callers and thus remove the for_part argument. This mirrors what is done on the blkdev_get side and slightly simplifies blkdev_get_part as well. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210525061301.2242282-5-hch@lst.de Signed-off-by: Jens Axboe commit a8698707a1835be3abd12a3b28079a80999f8dee Author: Christoph Hellwig Date: Tue May 25 08:12:56 2021 +0200 block: move bd_mutex to struct gendisk Replace the per-block device bd_mutex with a per-gendisk open_mutex, thus simplifying locking wherever we deal with partitions. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20210525061301.2242282-4-hch@lst.de Signed-off-by: Jens Axboe commit 210a6d756f20f33fc546ec8682a538fbcb84ee8e Author: Christoph Hellwig Date: Tue May 25 08:12:55 2021 +0200 block: move sync_blockdev from __blkdev_put to blkdev_put Do the early unlocked syncing even earlier to move more code out of the recursive path. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210525061301.2242282-3-hch@lst.de Signed-off-by: Jens Axboe commit 362529d9280af4b08d2c25a4b39b8e5ae7658f9a Author: Christoph Hellwig Date: Tue May 25 08:12:54 2021 +0200 block: split __blkdev_get Split __blkdev_get into one helper for the whole device, and one for opening partitions. This removes the (bounded) recursion when opening a partition. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210525061301.2242282-2-hch@lst.de Signed-off-by: Jens Axboe commit da7ba72960ca2a9b968e47fcf414d16f3d4c0c42 Author: Christoph Hellwig Date: Fri May 21 07:51:16 2021 +0200 block: unexport blk_alloc_queue blk_alloc_queue is just an internal helper now, unexport it and remove it from the public header. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-27-hch@lst.de Signed-off-by: Jens Axboe commit 132226b301b545198515fb8c6b7f537c13b71f4d Author: Christoph Hellwig Date: Fri May 21 07:51:15 2021 +0200 null_blk: convert to blk_alloc_disk/blk_cleanup_disk Convert the null_blk driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Note that the blk-mq mode is left with its own allocations scheme, to be handled later. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-26-hch@lst.de Signed-off-by: Jens Axboe commit ef35885400481b46ede9cbdcc1fce902e06002c5 Author: Christoph Hellwig Date: Fri May 21 07:51:14 2021 +0200 xpram: convert to blk_alloc_disk/blk_cleanup_disk Convert the xpram driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-25-hch@lst.de Signed-off-by: Jens Axboe commit 0692ef289f067d1de416cd33c9cf8d7e006293dc Author: Christoph Hellwig Date: Fri May 21 07:51:13 2021 +0200 dcssblk: convert to blk_alloc_disk/blk_cleanup_disk Convert the dcssblk driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-24-hch@lst.de Signed-off-by: Jens Axboe commit 684bf9cd8d29503ee47a6942e34e1d2f0a4774fa Author: Christoph Hellwig Date: Fri May 21 07:51:12 2021 +0200 ps3vram: convert to blk_alloc_disk/blk_cleanup_disk Convert the ps3vram driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-23-hch@lst.de Signed-off-by: Jens Axboe commit f9dc931de80664eb78cbc8c85052bd0856d4aa9c Author: Christoph Hellwig Date: Fri May 21 07:51:11 2021 +0200 n64cart: convert to blk_alloc_disk Convert the n64cart driver to use the blk_alloc_disk helper to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-22-hch@lst.de Signed-off-by: Jens Axboe commit b1833edc4c95d801b249159be361af6d3c3ea44d Author: Christoph Hellwig Date: Fri May 21 07:51:10 2021 +0200 simdisk: convert to blk_alloc_disk/blk_cleanup_disk Convert the simdisk driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-21-hch@lst.de Signed-off-by: Jens Axboe commit c3e235383645de20796efd2821c60bf6a7ab5f2e Author: Christoph Hellwig Date: Fri May 21 07:51:09 2021 +0200 nfblock: convert to blk_alloc_disk/blk_cleanup_disk Convert the nfblock driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Acked-by: Geert Uytterhoeven Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-20-hch@lst.de Signed-off-by: Jens Axboe commit f165fb89b71facbef833c6244abf8b9887b899d1 Author: Christoph Hellwig Date: Fri May 21 07:51:08 2021 +0200 nvme-multipath: convert to blk_alloc_disk/blk_cleanup_disk Convert the nvme-multipath driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-19-hch@lst.de Signed-off-by: Jens Axboe commit 87eb73b2ca7c1b913e84d6efe46810fd301e7a66 Author: Christoph Hellwig Date: Fri May 21 07:51:07 2021 +0200 nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk Convert the nvdimm-pmem driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-18-hch@lst.de Signed-off-by: Jens Axboe commit d4e4e5835f29fa1a1dcdecc5bea125050274d0f6 Author: Christoph Hellwig Date: Fri May 21 07:51:06 2021 +0200 nvdimm-btt: convert to blk_alloc_disk/blk_cleanup_disk Convert the nvdimm-btt driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-17-hch@lst.de Signed-off-by: Jens Axboe commit 6c552ceabf39797fba1d3088af9481511f02393f Author: Christoph Hellwig Date: Fri May 21 07:51:05 2021 +0200 nvdimm-blk: convert to blk_alloc_disk/blk_cleanup_disk Convert the nvdimm-blk driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-16-hch@lst.de Signed-off-by: Jens Axboe commit 0f1d2e0643c544df50dbc436da930201218fa1e2 Author: Christoph Hellwig Date: Fri May 21 07:51:04 2021 +0200 md: convert to blk_alloc_disk/blk_cleanup_disk Convert the md driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-15-hch@lst.de Signed-off-by: Jens Axboe commit 74fe6ba9239497e5fa383a15efa9f5ffc23b11f3 Author: Christoph Hellwig Date: Fri May 21 07:51:03 2021 +0200 dm: convert to blk_alloc_disk/blk_cleanup_disk Convert the dm driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-14-hch@lst.de Signed-off-by: Jens Axboe commit bc70852fd10415cda727577f12ea93e502eb1027 Author: Christoph Hellwig Date: Fri May 21 07:51:02 2021 +0200 bcache: convert to blk_alloc_disk/blk_cleanup_disk Convert the bcache driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Coly Li Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-13-hch@lst.de Signed-off-by: Jens Axboe commit 1aabd53a4b49adaf65319aa622e612b6edb2b663 Author: Christoph Hellwig Date: Fri May 21 07:51:01 2021 +0200 lightnvm: convert to blk_alloc_disk/blk_cleanup_disk Convert the lightnvm driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-12-hch@lst.de Signed-off-by: Jens Axboe commit 7681750bd35fe92dd915f4df177d45265e78a933 Author: Christoph Hellwig Date: Fri May 21 07:51:00 2021 +0200 zram: convert to blk_alloc_disk/blk_cleanup_disk Convert the zram driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-11-hch@lst.de Signed-off-by: Jens Axboe commit 0be7966e7e6e8c57c3f63b16ddeed73e68313a89 Author: Christoph Hellwig Date: Fri May 21 07:50:59 2021 +0200 rsxx: convert to blk_alloc_disk/blk_cleanup_disk Convert the rsxx driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-10-hch@lst.de Signed-off-by: Jens Axboe commit 444134845277ad37c8ca7d1321d3dd57b96b5ae0 Author: Christoph Hellwig Date: Fri May 21 07:50:58 2021 +0200 pktcdvd: convert to blk_alloc_disk/blk_cleanup_disk Convert the pktcdvd driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-9-hch@lst.de Signed-off-by: Jens Axboe commit b647ad024841d02d67e78716f51f355d8d3e9656 Author: Christoph Hellwig Date: Fri May 21 07:50:57 2021 +0200 drbd: convert to blk_alloc_disk/blk_cleanup_disk Convert the drbd driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-8-hch@lst.de Signed-off-by: Jens Axboe commit 7f9b348cb5e94259acdcbafbcaed55d3bb515304 Author: Christoph Hellwig Date: Fri May 21 07:50:56 2021 +0200 brd: convert to blk_alloc_disk/blk_cleanup_disk Convert the brd driver to use the blk_alloc_disk and blk_cleanup_disk helpers to simplify gendisk and request_queue allocation. This also allows to remove the request_queue pointer in struct request_queue, and to simplify the initialization as blk_cleanup_disk can be called on any disk returned from blk_alloc_disk. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-7-hch@lst.de Signed-off-by: Jens Axboe commit f525464a8000f092c20b00eead3eaa9d849c599e Author: Christoph Hellwig Date: Fri May 21 07:50:55 2021 +0200 block: add blk_alloc_disk and blk_cleanup_disk APIs Add two new APIs to allocate and free a gendisk including the request_queue for use with BIO based drivers. This is to avoid boilerplate code in drivers. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-6-hch@lst.de Signed-off-by: Jens Axboe commit 958229a7c55f219b1cff99f939dabbc1b6ba7161 Author: Christoph Hellwig Date: Fri May 21 07:50:54 2021 +0200 block: add a flag to make put_disk on partially initalized disks safer Add a flag to indicate that __device_add_disk did grab a queue reference so that disk_release only drops it if we actually had it. This sort out one of the major pitfals with partially initialized gendisk that a lot of drivers did get wrong or still do. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Luis Chamberlain Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-5-hch@lst.de Signed-off-by: Jens Axboe commit 0d1feb72ffd8578f6f167ca15b2096c276c1f6df Author: Christoph Hellwig Date: Fri May 21 07:50:53 2021 +0200 block: automatically enable GENHD_FL_EXT_DEVT Automatically set the GENHD_FL_EXT_DEVT flag for all disks allocated without an explicit number of minors. This is what all new block drivers should do, so make sure it is the default without boilerplate code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Luis Chamberlain Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-4-hch@lst.de Signed-off-by: Jens Axboe commit 2e3c73fa0c419f62fd588731be30fb0d1bca9ad6 Author: Christoph Hellwig Date: Fri May 21 07:50:52 2021 +0200 block: move the DISK_MAX_PARTS sanity check into __device_add_disk Keep this together with the first place that actually looks at ->minors and prepare for not passing a minors argument to alloc_disk. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Luis Chamberlain Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-3-hch@lst.de Signed-off-by: Jens Axboe commit 7c3f828b522b07adb341b08fde1660685c5ba3eb Author: Christoph Hellwig Date: Fri May 21 07:50:51 2021 +0200 block: refactor device number setup in __device_add_disk Untangle the mess around blk_alloc_devt by moving the check for the used allocation scheme into the callers. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Luis Chamberlain Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210521055116.1053587-2-hch@lst.de Signed-off-by: Jens Axboe commit f9e36b388a325eee74fae3b545f64449c13f090a Author: YueHaibing Date: Fri May 28 14:17:38 2021 +0800 perf: arm_spe: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210528061738.23392-1-yuehaibing@huawei.com Signed-off-by: Will Deacon commit 21ad02e6b4c822d453faead4c96f0a86c4541b62 Author: YueHaibing Date: Fri May 28 09:49:40 2021 +0800 perf: xgene_pmu: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210528014940.4184-1-yuehaibing@huawei.com Signed-off-by: Will Deacon commit ccbe14ce88289ede522318ef3205e46f8455bbf2 Author: YueHaibing Date: Fri May 28 09:47:49 2021 +0800 perf: qcom: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210528014749.24068-1-yuehaibing@huawei.com Signed-off-by: Will Deacon commit 29c043760eea902f170b6485c6e88a5ef33a9908 Author: YueHaibing Date: Fri May 28 09:41:30 2021 +0800 perf: arm_pmu: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210528014130.7708-1-yuehaibing@huawei.com Signed-off-by: Will Deacon commit 2db5223731b79cf5c617dc391ceb21dd5cb93237 Author: Hao Fang Date: Sat May 22 18:23:57 2021 +0800 drivers/perf: hisi: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to the official website https://www.hisilicon.com/en. Signed-off-by: Hao Fang Link: https://lore.kernel.org/r/1621679037-15323-1-git-send-email-fanghao11@huawei.com Signed-off-by: Will Deacon commit a5740e955540181f4ab8f076cc9795c6bbe4d730 Author: Tian Tao Date: Thu May 20 15:59:45 2021 +0800 arm64: perf: Convert snprintf to sysfs_emit Use sysfs_emit instead of snprintf to avoid buf overrun,because in sysfs_emit it strictly checks whether buf is null or buf whether pagesize aligned, otherwise it returns an error. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1621497585-30887-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit fdbef8c4e68ad423416aa6cc93d1616d6f8ac5b3 Author: Yang Jihong Date: Fri Apr 30 09:26:59 2021 +0800 arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode Commit 3a95200d3f89 ("arm_pmu: Change API to support 64bit counter values") changes the input "value" type from 32-bit to 64-bit, which introduces the following problem: ARMv7 PMU counters is 32-bit width, in big-endian mode, write counter uses high 32-bit, which writes an incorrect value. Before: Performance counter stats for 'ls': 2.22 msec task-clock # 0.675 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 49 page-faults # 0.022 M/sec 2150476593 cycles # 966.663 GHz 2148588788 instructions # 1.00 insn per cycle 2147745484 branches # 965435.074 M/sec 2147508540 branch-misses # 99.99% of all branches None of the above hw event counters are correct. Solution: "value" forcibly converted to 32-bit type before being written to PMU register. After: Performance counter stats for 'ls': 2.09 msec task-clock # 0.681 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 46 page-faults # 0.022 M/sec 2807301 cycles # 1.344 GHz 1060159 instructions # 0.38 insn per cycle 250496 branches # 119.914 M/sec 23192 branch-misses # 9.26% of all branches Fixes: 3a95200d3f89 ("arm_pmu: Change API to support 64bit counter values") Cc: Signed-off-by: Yang Jihong Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210430012659.232110-1-yangjihong1@huawei.com Signed-off-by: Will Deacon commit 5990b5d770cbfe2b4254d870240e9863aca421e3 Author: Christian Brauner Date: Tue Jun 1 11:55:04 2021 +0200 tests: test MOUNT_ATTR_NOSYMFOLLOW with mount_setattr() Add tests to verify that MOUNT_ATTR_NOSYMFOLLOW is honored. Cc: Christoph Hellwig Cc: Mattias Nissler Cc: Aleksa Sarai Cc: Al Viro Cc: Ross Zwisler Signed-off-by: Christian Brauner commit 96ec5afeb3001dcb432b9c9e8738aa537c6cdb12 Author: Axel Lin Date: Wed May 26 20:50:26 2021 +0800 regulator: mcp16502: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210526125026.82549-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 1d15b3e6f9d95865450c8856401b3166ed074c83 Author: Axel Lin Date: Wed May 26 20:50:25 2021 +0800 regulator: mcp16502: Convert to use .probe_new Use the new .probe_new for mcp16502. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210526125026.82549-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 71de5d6e63c992abe037c43bc581cff432a5a1c4 Author: Matti Vaittinen Date: Thu May 27 14:59:29 2021 +0300 regulator: bd70528: Drop BD70528 support The only known BD70528 use-cases are such that the PMIC is controlled from separate MCU which is not running Linux. I am not aware of any Linux driver users. Furthermore, it seems there is no demand for this IC. Let's ease the maintenance burden and drop the driver. We can always add it back if there is sudden need for it. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/d7271362129edceebc512b49efed9ee7c3efcb6a.1622116622.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit fbd168cd76e4ea80fc22d361b08267664db4d905 Author: Axel Lin Date: Thu May 27 22:42:48 2021 +0800 regulator: lp8755: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210527144248.247992-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 7f8c8394425fd5e1449bf0a81ab6ec718cd4346b Author: Axel Lin Date: Sun May 30 10:05:43 2021 +0800 regulator: mt6315: Don't ignore devm_regulator_register failure Also use dev_err instead of dev_notice for messages in error conditions. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210530020543.418634-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 4c4fce171c4ca08cd98be7db350e6950630b046a Author: Axel Lin Date: Wed May 26 20:24:08 2021 +0800 regulator: pca9450: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210526122408.78156-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit a483e64c0b62e93a772cbc96f32bad885586fad7 Author: Adrian Hunter Date: Sun May 30 22:23:08 2021 +0300 perf scripting python: intel-pt-events.py: Add --insn-trace and --src-trace Add an instruction trace and a source trace to the intel-pt-events.py script. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1f763d0388af6f6cffcdb1080ce112c63d766809 Author: Kai Vehmanen Date: Fri May 28 21:41:53 2021 +0300 ASoC: SOF: Intel: pci-tgl: add ADL-M support Add PCI DID for Intel AlderLake-M. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210528184153.18251-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit d95eca7e3b9f7c1361fc1e1329247490abec678c Author: Ranjani Sridharan Date: Fri May 28 19:05:51 2021 +0300 ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails cl_dsp_init() dumps the ROM status if it fails after max attempts before powering off the DSP. Remove the duplicate log to print the ROM status and error in hda_dsp_cl_boot_firmware(). These values are invalid anyway as the DSP is already powered off. Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210528160551.10145-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 7ff562fed98043b9e9eafa11db6100feb08412aa Author: Ranjani Sridharan Date: Fri May 28 19:05:50 2021 +0300 ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Clean up the hda_dsp_dump() function to avoid duplicating the ROM status and error. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210528160551.10145-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit b1b384de0a9be2d2913c8a308f381da0b9184e91 Author: YueHaibing Date: Fri May 28 14:30:33 2021 +0800 ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Acked-by: Jarkko Nikula Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210528063033.19904-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 7db43da8c0990bb1276d1b7b185b1b9f9be6dcbb Author: Rikard Falkeborn Date: Thu May 27 01:10:13 2021 +0200 ASoC: SOF: Intel: Constify sof_probe_compressed_ops The only usage of sof_probe_compressed_ops is to assign its address to the compress_ops field in the snd_soc_component_driver struct, which is a pointer to const. The assignment is done in sound/soc/sof/pcm.c. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210526231013.46530-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit a8048051d7ce2349e4cda28954ded733d6c42028 Author: Rikard Falkeborn Date: Thu May 27 01:10:12 2021 +0200 ASoC: qcom: q6asm-dai: Constify static struct snd_compress_ops The snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210526231013.46530-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 4127a3a541ac35360cb45909944747d61c606f0a Author: Rikard Falkeborn Date: Thu May 27 01:10:11 2021 +0200 ASoC: wm5110: Constify static struct snd_compress_ops The snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210526231013.46530-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit b6f5d62e7afc398c375855c0d8105e5561f9fc37 Author: Rikard Falkeborn Date: Thu May 27 01:10:10 2021 +0200 ASoC: wm5102: Constify static struct snd_compress_ops The snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210526231013.46530-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 44b9f90705bb580a9616ecd5498dd30943c1f1ce Author: Rikard Falkeborn Date: Thu May 27 01:10:09 2021 +0200 ASoC: cs47125: Constify static struct snd_compress_ops The snd_compress_ops structs are only stored in the compress_ops field of a snd_soc_component_driver struct, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210526231013.46530-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 2b87386c7a1c0488bf2a27d7f4ac80aa84e22fb5 Author: Adrian Hunter Date: Sun May 30 22:23:07 2021 +0300 perf scripting python: exported-sql-viewer.py: Factor out libxed.py Factor out libxed.py so it can be reused. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1a329b1c8e8ebf4107823146b5426900ab1145fe Author: Adrian Hunter Date: Sun May 30 22:23:06 2021 +0300 perf scripting python: Update documentation for srcline etc Add new fields and functions to the perf-script-python documentation. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e79457a526105c94930a5babbecaeeb794593723 Author: Adrian Hunter Date: Sun May 30 22:23:05 2021 +0300 perf scripting python: Add perf_sample_srcline() and perf_sample_srccode() Add perf_sample_srcline() and perf_sample_srccode() to the perf_trace_context module so that a script can get the srcline or srccode information. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 7d00540d7deb6802cde23b132b0c50347f27cc90 Author: Adrian Hunter Date: Sun May 30 22:23:04 2021 +0300 perf scripting python: Add perf_set_itrace_options() Add perf_set_itrace_options() to the perf_trace_context module so that a script can set the itrace options for a session if they have not been set already. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c413983eb66a0f6de37c13f7da3dd5fa488e5967 Author: Kuninori Morimoto Date: Mon May 31 13:19:32 2021 +0900 ASoC: rsnd: adjust disabled module In general Renesas SoC's SSI/SRC are all enabled, but some SoC is not. H2 E2 SRC0 <= SRC1 SRC1 SRC2 SRC2 ... ... Renesas Sound driver is assuming that *all* modules are enabled, and thus it is using *data array* to access each modules. Because of it, we have been using "status = disabled" at DT, and using *full size* array but avoiding disabled module. ex) rcar_sound,src { src-0 { => status = "disabled"; }; src1: src-1 { ... }; ... But R-Car D3 have many disabled modules (It has SSI3/SSI4, SRC5/SRC6), and Renesas SoC maintainer don't want above style on DT. ex) rcar_sound,src { => src0: src-0 { status = "disabled"; }; => src1: src-1 { status = "disabled"; }; => src2: src-2 { status = "disabled"; }; => src3: src-3 { status = "disabled"; }; => src4: src-4 { status = "disabled"; }; src5: src-5 { ... }; src6: src-6 { ... }; }; rcar_sound,ssi { => ssi0: ssi-0 { status = "disabled"; }; => ssi1: ssi-1 { status = "disabled"; }; => ssi2: ssi-2 { status = "disabled"; }; ssi3: ssi-3 { ... }; ssi4: ssi-4 { ... }; }; To adjust it, it needs to care about related for_each_child_of_node() loop on rsnd driver, and it is used from... > grep -l for_each_child_of_node sound/soc/sh/rcar/* sound/soc/sh/rcar/core.c sound/soc/sh/rcar/ctu.c sound/soc/sh/rcar/dma.c sound/soc/sh/rcar/dvc.c sound/soc/sh/rcar/mix.c sound/soc/sh/rcar/src.c sound/soc/sh/rcar/ssi.c sound/soc/sh/rcar/ssiu.c This patch adjust to this situation. By this patch, we can avoid disabled modules on DT rcar_sound,src { src5: src-5 { ... }; src6: src-6 { ... }; }; rcar_sound,ssi { ssi3: ssi-3 { ... }; ssi4: ssi-4 { ... }; }; Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875yyzk017.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 73919dbe480d0b6cf3eeb54d25cb2538b6d3b024 Author: Kuninori Morimoto Date: Mon May 31 13:19:18 2021 +0900 ASoC: rsnd: tidyup rsnd_parse_connect_xxx() This patch tidyup rsnd_parse_connect_xxx() style. Nothing is changed, but is preparation for next "ASoC: rsnd: adjust disabled module" patch Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877djfk01l.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 039f2ccc64b8a2649f54d654a4d7d92864c6fdb1 Author: Kuninori Morimoto Date: Mon May 31 13:19:13 2021 +0900 ASoC: rsnd: tidyup rsnd_dma_request_channel() This patch adds "char *name" to rsnd_dma_request_channel(). It is not yet used so far, but is preparation for next "ASoC: rsnd: adjust disabled module" patch Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878s3vk01q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ec02b5a1d1c91b1e05b62f8092252137cf9be488 Author: Kuninori Morimoto Date: Mon May 31 13:19:09 2021 +0900 ASoC: rsnd: tidyup rsnd_parse_connect_common() This patch adds "char *name" to rsnd_parse_connect_common(). It is not yet used so far, but is preparation for next "ASoC: rsnd: adjust disabled module" patch Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6obk01v.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e621b8ffec3dc46105eb3d9b90cdd3bc9632f6d8 Author: Adrian Hunter Date: Sun May 30 22:23:03 2021 +0300 perf auxtrace: Factor out itrace_do_parse_synth_opts() Factor out itrace_do_parse_synth_opts() so that it can be reused. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 13c71b92327aaacc7a3c3ca5f003f3f66ba5af65 Author: Adrian Hunter Date: Sun May 30 22:23:02 2021 +0300 perf scripting python: Add perf_sample_insn() Add perf_sample_insn() to the perf_trace_context module so that a script can get the instruction bytes. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d9ae9c9776abc60d4bdf2320c4a8f32340cff527 Author: Adrian Hunter Date: Sun May 30 22:23:01 2021 +0300 perf script: Factor out script_fetch_insn() Factor out script_fetch_insn() so it can be reused. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit cf9bfa6c150f038328f8059a69a6f1598d6702b2 Author: Adrian Hunter Date: Sun May 30 22:23:00 2021 +0300 perf scripting python: Assign perf_script_context The scripting_context pointer itself does not change and nor does it need to. Put it directly into the script as a variable at the start so it does not have to be passed on each call into the script. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 67e50ce0e32580d90f64556a51b7cb2a872697ca Author: Adrian Hunter Date: Sun May 30 22:22:59 2021 +0300 perf scripting: Add perf_session to scripting_context This is preparation for allowing a script to set the itrace options for the session if they have not already been set. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit cac30400a6d8159e2510a4a258db9c4ac6fbbba5 Author: Adrian Hunter Date: Sun May 30 22:22:58 2021 +0300 perf scripting: Add scripting_context__update() Move scripting_context update to a separate function and add the arguments of ->process_event() to it. This prepares the way for adding more methods to the perf_trace_context module, by providing the context information that they will need. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6337bd0c91f66527741e61ecb73b9cff0d7f48f8 Author: Adrian Hunter Date: Sun May 30 22:22:57 2021 +0300 perf scripting python: Simplify perf-trace-context module functions Simplify perf-trace-context module functions by factoring out some common code. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4c62244e035e99a9e43d25a017cbe98f7562b21f Author: Adrian Hunter Date: Sun May 30 22:22:56 2021 +0300 perf scripting python: Remove unnecessary 'static' The variables are always assigned before use, making the 'static' storage class unnecessary. Signed-off-by: Adrian Hunter Cc: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210530192308.7382-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 437faaa6cebadf8ff4c2c28d7cb26ed4e34aeb14 Author: Chris Morgan Date: Wed May 19 15:37:53 2021 -0500 dt-bindings: Add Rockchip rk817 audio CODEC support Create dt-binding documentation to document rk817 codec. New property name of rockchip,mic-in-differential added to control if the microphone is in differential mode or not. Signed-off-by: Chris Morgan Tested-by: Maciej Matuszczyk Acked-by: Rob Herring Signed-off-by: Lee Jones commit 0d6a04da9b25b9a7cf2cac5f5079e3296d3bee0f Author: Chris Morgan Date: Wed May 19 15:37:52 2021 -0500 ASoC: Add Rockchip rk817 audio CODEC support Add support for the Rockchip rk817 audio codec integrated into the rk817 PMIC. This is based on the sources provided by Rockchip from their BSP kernel. Signed-off-by: Chris Morgan Tested-by: Maciej Matuszczyk Reviewed-by: Mark Brown Signed-off-by: Lee Jones commit 4a1c456a57c3366d736548ad4d09eb3aa0b9ddaf Author: Chris Morgan Date: Wed May 19 15:37:51 2021 -0500 mfd: Add Rockchip rk817 audio CODEC support Add rk817 codec support cell to rk808 mfd driver. Signed-off-by: Chris Morgan Tested-by: Maciej Matuszczyk Signed-off-by: Lee Jones commit 2c538940d97cb67b3fde953f1267798e03a9a4ad Author: Juerg Haefliger Date: Wed May 19 13:03:00 2021 +0200 backlight: Kconfig whitespace and indentation cleanups Remove leading whitespaces, replace multi spaces with tabs, and fix help text indentation. Signed-off-by: Juerg Haefliger Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 5f459cb0d67d6df6f74eac253ea10de9e9986812 Author: Dmitry Osipenko Date: Tue Jun 1 05:31:16 2021 +0300 dt-bindings: soc: tegra-pmc: Document core power domain All NVIDIA Tegra SoCs have a core power domain where majority of hardware blocks reside. Document the new core power domain properties. Reviewed-by: Rob Herring Reviewed-by: Ulf Hansson Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e0740fb869730110b36a4afcf05ad1b9d6f5fb6d Author: Dmitry Osipenko Date: Tue Jun 1 05:31:12 2021 +0300 memory: tegra: Fix compilation warnings on 64bit platforms Fix compilation warning on 64bit platforms caused by implicit promotion of 32bit signed integer to a 64bit unsigned value which happens after enabling compile-testing of the EMC drivers. Reported-by: kernel test robot Reviewed-by: Nathan Chancellor Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 87d7426f169e6c88d60743ee24dbd25a945fc84f Merge: dd44ca51640fe 30b44e81772a5 Author: Thierry Reding Date: Tue Jun 1 13:42:41 2021 +0200 Merge branch 'for-5.14/soc' into for-5.14/memory commit dd44ca51640fe9bb23c1455ef7617da53e8fbc60 Merge: 6efb943b8616e e848edae31263 Author: Thierry Reding Date: Tue Jun 1 13:38:23 2021 +0200 Merge branch 'for-5.14/clk' into for-5.14/memory commit e848edae31263d2119e7cde779d754439277fbba Author: Dmitry Osipenko Date: Tue Jun 1 05:31:11 2021 +0300 clk: tegra: Add stubs needed for compile-testing Add stubs needed for compile-testing of Tegra memory drivers. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 05924717ac704a868053652b20036aa3a2273e26 Author: Harishankar Vishwanathan Date: Sun May 30 22:01:57 2021 -0400 bpf, tnums: Provably sound, faster, and more precise algorithm for tnum_mul This patch introduces a new algorithm for multiplication of tristate numbers (tnums) that is provably sound. It is faster and more precise when compared to the existing method. Like the existing method, this new algorithm follows the long multiplication algorithm. The idea is to generate partial products by multiplying each bit in the multiplier (tnum a) with the multiplicand (tnum b), and adding the partial products after appropriately bit-shifting them. The new algorithm, however, uses just a single loop over the bits of the multiplier (tnum a) and accumulates only the uncertain components of the multiplicand (tnum b) into a mask-only tnum. The following paper explains the algorithm in more detail: https://arxiv.org/abs/2105.05398. A natural way to construct the tnum product is by performing a tnum addition on all the partial products. This algorithm presents another method of doing this: decompose each partial product into two tnums, consisting of the values and the masks separately. The mask-sum is accumulated within the loop in acc_m. The value-sum tnum is generated using a.value * b.value. The tnum constructed by tnum addition of the value-sum and the mask-sum contains all possible summations of concrete values drawn from the partial product tnums pairwise. We prove this result in the paper. Our evaluations show that the new algorithm is overall more precise (producing tnums with less uncertain components) than the existing method. As an illustrative example, consider the input tnums A and B. The numbers in the parenthesis correspond to (value;mask). A = 000000x1 (1;2) B = 0010011x (38;1) A * B (existing) = xxxxxxxx (0;255) A * B (new) = 0x1xxxxx (32;95) Importantly, we present a proof of soundness of the new algorithm in the aforementioned paper. Additionally, we show that this new algorithm is empirically faster than the existing method. Co-developed-by: Matan Shachnai Co-developed-by: Srinivas Narayana Co-developed-by: Santosh Nagarakatte Signed-off-by: Matan Shachnai Signed-off-by: Srinivas Narayana Signed-off-by: Santosh Nagarakatte Signed-off-by: Harishankar Vishwanathan Signed-off-by: Daniel Borkmann Reviewed-by: Edward Cree Link: https://arxiv.org/abs/2105.05398 Link: https://lore.kernel.org/bpf/20210531020157.7386-1-harishankar.vishwanathan@rutgers.edu commit 2aa53d68cee6603931f73b28ef6b51ff3fde9397 Author: Keqian Zhu Date: Fri May 7 19:03:22 2021 +0800 KVM: arm64: Try stage2 block mapping for host device MMIO The MMIO region of a device maybe huge (GB level), try to use block mapping in stage2 to speedup both map and unmap. Compared to normal memory mapping, we should consider two more points when try block mapping for MMIO region: 1. For normal memory mapping, the PA(host physical address) and HVA have same alignment within PUD_SIZE or PMD_SIZE when we use the HVA to request hugepage, so we don't need to consider PA alignment when verifing block mapping. But for device memory mapping, the PA and HVA may have different alignment. 2. For normal memory mapping, we are sure hugepage size properly fit into vma, so we don't check whether the mapping size exceeds the boundary of vma. But for device memory mapping, we should pay attention to this. This adds get_vma_page_shift() to get page shift for both normal memory and device MMIO region, and check these two points when selecting block mapping size for MMIO region. Signed-off-by: Keqian Zhu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210507110322.23348-3-zhukeqian1@huawei.com commit fd6f17bade2147b31198ad00b22d3acf5a398aec Author: Keqian Zhu Date: Fri May 7 19:03:21 2021 +0800 KVM: arm64: Remove the creation time's mapping of MMIO regions The MMIO regions may be unmapped for many reasons and can be remapped by stage2 fault path. Map MMIO regions at creation time becomes a minor optimization and makes these two mapping path hard to sync. Remove the mapping code while keep the useful sanity check. Signed-off-by: Keqian Zhu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210507110322.23348-2-zhukeqian1@huawei.com commit 30b44e81772a5caa983000057ce1cd9cb4531647 Author: Dmitry Osipenko Date: Fri May 28 02:54:04 2021 +0300 soc/tegra: fuse: Add stubs needed for compile-testing Add missing stubs that will allow Tegra memory driver to be compile-tested by kernel build bots. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b8818de9c0c107019c2a90a50423c1b929176f3c Author: Dmitry Osipenko Date: Fri May 28 02:54:03 2021 +0300 soc/tegra: Add devm_tegra_core_dev_init_opp_table() Add common helper which initializes OPP table for Tegra SoC core devices. Tested-by: Peter Geis # Ouya T30 Tested-by: Paul Fertser # PAZ00 T20 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 4333e0300023c701d4c7bf0b834179ca19d4ddf8 Author: Dmitry Osipenko Date: Fri May 28 02:54:02 2021 +0300 soc/tegra: Add stub for soc_is_tegra() Add stub required for compile-testing of drivers. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 03978d42ed0d69cb5d38dfb0aeb5216d19507c60 Author: Dmitry Osipenko Date: Fri May 28 02:54:01 2021 +0300 soc/tegra: regulators: Bump voltages on system reboot Ensure that SoC voltages are at a level suitable for a system reboot. This is important for some devices that use CPU reset method for the rebooting. SoC CPU and core voltages now are be restored to a level that is suitable for rebooting. This patch fixes hang on reboot on Asus Transformer TF101, it was also reported as fixing some of reboot issues on Toshiba AC100. Reported-by: Nikola Milosavljević Tested-by: Nikola Milosavljević # TF101 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 241ed23c4df6ab409fba0e965a86719ceb223a1d Merge: 6efb943b8616e 380d2b2d5a049 Author: Thierry Reding Date: Tue Jun 1 12:13:52 2021 +0200 Merge branch 'for-5.14/regulator' into for-5.14/soc commit 380d2b2d5a0491e47dfa250b40e3d849a922871d Author: Dmitry Osipenko Date: Fri May 28 02:54:00 2021 +0300 regulator: core: Add regulator_sync_voltage_rdev() Some NVIDIA Tegra devices use a CPU soft-reset method for the reboot and in this case we need to restore the coupled voltages to the state that is suitable for hardware during boot. Add new regulator_sync_voltage_rdev() helper which is needed by regulator drivers in order to sync voltage of a coupled regulators. Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2388f14d8747f8304e26ee870790e188c9431efd Author: Alexandre Torgue Date: Thu Apr 15 12:10:27 2021 +0200 ARM: dts: stm32: fix timer nodes on STM32 MCU to prevent warnings Prevent warning seen with "make dtbs_check W=1" command: Warning (avoid_unnecessary_addr_size): /soc/timers@40001c00: unnecessary address-cells/size-cells without "ranges" or child "reg" property Reviewed-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit dd8b477f9a3d8edb136207acb3652e1a34a661b7 Author: Christian Brauner Date: Tue Jun 1 11:33:59 2021 +0200 mount: Support "nosymfollow" in new mount api Commit dab741e0e02b ("Add a "nosymfollow" mount option.") added support for the "nosymfollow" mount option allowing to block following symlinks when resolving paths. The mount option so far was only available in the old mount api. Make it available in the new mount api as well. Bonus is that it can be applied to a whole subtree not just a single mount. Cc: Christoph Hellwig Cc: Mattias Nissler Cc: Aleksa Sarai Cc: Al Viro Cc: Ross Zwisler Signed-off-by: Christian Brauner commit e4b948415a89a219d13e454011cdcf9e63ecc529 Author: Alexandre Torgue Date: Thu Apr 15 12:10:26 2021 +0200 ARM: dts: stm32: fix RCC node name on stm32f429 MCU This prevent warning observed with "make dtbs_check W=1" Warning (simple_bus_reg): /soc/rcc@40023810: simple-bus unit address format error, expected "40023800" Signed-off-by: Alexandre Torgue commit bf24b91f4baf7e421c770a1d9c7d381b10206ac9 Author: Alexandre Torgue Date: Thu Apr 15 12:10:25 2021 +0200 ARM: dts: stm32: fix gpio-keys node on STM32 MCU boards Fix following warning observed with "make dtbs_check W=1" command. It concerns f429 eval and disco boards, f769 disco board. Warning (unit_address_vs_reg): /gpio_keys/button@0: node has a unit name, but no reg or ranges property Signed-off-by: Alexandre Torgue commit b6ca556c352979d09659027dc1559fad15b72649 Author: Marc Zyngier Date: Sun Feb 28 11:11:47 2021 +0000 irqchip/apple-aic: Advertise some level of vGICv3 compatibility The CPUs in the Apple M1 SoC partially implement a virtual GICv3 CPU interface, although one that is incapable of HW deactivation of interrupts, nor masking the maintenance interrupt. Advertise the support to KVM. Signed-off-by: Marc Zyngier commit 5f59229680f70078ac4c11db2ae89be087474144 Author: Marc Zyngier Date: Mon Mar 15 14:21:21 2021 +0000 KVM: arm64: timer: Add support for SW-based deactivation In order to deal with the lack of active state, we need to use the mask/unmask primitives (after all, the active state is just an additional mask on top of the normal one). To avoid adding a bunch of ugly conditionals in the timer and vgic code, let's use a timer-specific irqdomain to deal with the state conversion. Yes, this is an unexpected use of irqdomains, but there is no reason not to be just as creative as the designers of the HW... This involves overloading the vcpu_affinity, set_irqchip_state and eoi callbacks so that the rest of the KVM code can continue ignoring the oddities of the underlying platform. Signed-off-by: Marc Zyngier commit 2f2f7e39dbb31aa1db13c490a4e47502497510fe Author: Marc Zyngier Date: Mon Mar 15 14:05:21 2021 +0000 KVM: arm64: timer: Refactor IRQ configuration As we are about to add some more things to the timer IRQ configuration, move this code out of the main timer init code into its own set of functions. No functional changes. Signed-off-by: Marc Zyngier commit 354920e79441c8a53ac73008b06d3b70ed06eb34 Author: Marc Zyngier Date: Mon Mar 15 13:11:58 2021 +0000 KVM: arm64: vgic: Implement SW-driven deactivation In order to deal with these systems that do not offer HW-based deactivation of interrupts, let implement a SW-based approach: - When the irq is queued into a LR, treat it as a pure virtual interrupt and set the EOI flag in the LR. - When the interrupt state is read back from the LR, force a deactivation when the state is invalid (neither active nor pending) Interrupts requiring such treatment get the VGIC_SW_RESAMPLE flag. Signed-off-by: Marc Zyngier commit db75f1a33f82ad332b6e139c5960e01999969d2c Author: Marc Zyngier Date: Mon Mar 1 17:39:39 2021 +0000 KVM: arm64: vgic: move irq->get_input_level into an ops structure We already have the option to attach a callback to an interrupt to retrieve its pending state. As we are planning to expand this facility, move this callback into its own data structure. This will limit the size of individual interrupts as the ops structures can be shared across multiple interrupts. Signed-off-by: Marc Zyngier commit f6c3e24fb721dda247f6691c809d6e6c413f22c7 Author: Marc Zyngier Date: Mon Mar 15 21:56:47 2021 +0000 KVM: arm64: vgic: Let an interrupt controller advertise lack of HW deactivation The vGIC, as architected by ARM, allows a virtual interrupt to trigger the deactivation of a physical interrupt. This allows the following interrupt to be delivered without requiring an exit. However, some implementations have choosen not to implement this, meaning that we will need some unsavoury workarounds to deal with this. On detecting such a case, taint the kernel and spit a nastygram. We'll deal with this in later patches. Signed-off-by: Marc Zyngier commit 669062d2a1aa36661b490683fe17810aa24a9cfb Author: Marc Zyngier Date: Sun Feb 28 11:09:59 2021 +0000 KVM: arm64: vgic: Be tolerant to the lack of maintenance interrupt masking As it turns out, not all the interrupt controllers are able to expose a vGIC maintenance interrupt that can be independently enabled/disabled. And to be fair, it doesn't really matter as all we require is for the interrupt to kick us out of guest mode out way or another. To that effect, add gic_kvm_info.no_maint_irq_mask for an interrupt controller to advertise the lack of masking. Signed-off-by: Marc Zyngier commit 74501499d4e0d4ba59ab2bc6be1873716549169d Author: Marc Zyngier Date: Fri Feb 19 16:39:31 2021 +0000 KVM: arm64: Handle physical FIQ as an IRQ while running a guest As we we now entertain the possibility of FIQ being used on the host, treat the signalling of a FIQ while running a guest as an IRQ, causing an exit instead of a HYP panic. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 0e5cb7770684b4c81bcc63f4675e488f9a0e31eb Author: Marc Zyngier Date: Sat Feb 27 10:23:45 2021 +0000 irqchip/gic: Split vGIC probing information from the GIC code The vGIC advertising code is unsurprisingly very much tied to the GIC implementations. However, we are about to extend the support to lesser implementations. Let's dissociate the vgic registration from the GIC code and move it into KVM, where it makes a bit more sense. This also allows us to mark the gic_kvm_info structures as __initdata. Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 0fe0fbc867115659bbd9a0ab107d1fe9bcc432e8 Author: Paul Cercueil Date: Sun May 30 18:18:02 2021 +0100 MIPS: ingenic: rs90: Add dedicated VRAM memory region Add a 1 MiB memory area dedicated to the video driver. This area will be managed by Linux' CMA, so that the ingenic-drm driver can be sure to always be able to allocate contiguous buffers. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 5e82cf987a1541a8e752f1918fee3659d6dcdb6a Author: Paul Cercueil Date: Sun May 30 18:18:01 2021 +0100 MIPS: ingenic: gcw0: Set codec to cap-less mode for FM radio When using the FM radio, we must not have capacitors on the headphones line, since it is used as the antenna. The "FM Radio" widget is removed so that the cap-less mode can be enabled dynamically through DAPM when the line input is used. This widget was useless anyway. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 318951afb3af26af5526b21896cb3a035c5f8a34 Author: Paul Cercueil Date: Sun May 30 18:18:00 2021 +0100 MIPS: ingenic: jz4780: Fix I2C nodes to match DT doc The "ingenic,jz4780-i2c" should have "ingenic,jz4770-i2c" as a fallback compatible, as per the Device Tree documentation found in Documentation/devicetree/bindings/i2c/ingenic,i2c.yaml. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit eb3849370ae32b571e1f9a63ba52c61adeaf88f7 Author: Paul Cercueil Date: Sun May 30 18:17:59 2021 +0100 MIPS: ingenic: Select CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER The clock driving the XBurst CPUs in Ingenic SoCs is integer divided from the main PLL. As such, it is possible to control the frequency of the CPU, either by changing the divider, or by changing the rate of the main PLL. The XBurst CPUs also lack the CP0 timer; the TCU, a separate piece of hardware in the SoC, provides this functionality. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 63793d14137f81ed8d2b9f5376098325b659c476 Author: Paul Cercueil Date: Sun May 30 18:17:58 2021 +0100 MIPS: Kconfig: ingenic: Ensure MACH_INGENIC_GENERIC selects all SoCs The MACH_INGENIC_GENERIC config option must select all SoCs, in order for all the SoC-specific drivers to become available. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit fc52f92a653215fbd6bc522ac5311857b335e589 Author: Paul Cercueil Date: Sun May 30 18:17:57 2021 +0100 MIPS: cpu-probe: Fix FPU detection on Ingenic JZ4760(B) Ingenic JZ4760 and JZ4760B do have a FPU, but the config registers don't report it. Force the FPU detection in case the processor ID match the JZ4760(B) one. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit f92a05b9c0be58156de8727cc30f74eec00dc74f Author: Paul Cercueil Date: Sun May 30 18:17:56 2021 +0100 MIPS: boot: Support specifying UART port on Ingenic SoCs Allow specifying from the config the UART to use on Ingenic SoCs when compressed kernel debugging is enabled. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 1660710cf5d8d44ec351a5df57c35516f1fbf5e0 Author: Paul Cercueil Date: Sun May 30 18:17:55 2021 +0100 MIPS: mm: XBurst CPU requires sync after DMA I am not sure why this is required, but if this is not enabled, reading from a buffer in which data has been DMA'd may read incorrect values. This used to happen for instance in mmc_app_send_scr() (drivers/mmc/core/sd_ops.c), where data is DMA'd to a buffer then copied by the CPU to a different location. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit c8daba4640ac9619f9cb34ca7c314ff1eaff5f33 Author: Gustavo A. R. Silva Date: Fri May 28 15:02:22 2021 -0500 kgdb: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a goto statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210528200222.GA39201@embeddedor Signed-off-by: Daniel Thompson commit 220a31b091fb77886eb224ce2d7a5d890e43de63 Author: Zhen Lei Date: Sat May 29 19:03:03 2021 +0800 kgdb: Fix spelling mistakes Fix some spelling mistakes in comments: initalization ==> initialization detatch ==> detach represntation ==> representation hexidecimal ==> hexadecimal delimeter ==> delimiter architecure ==> architecture Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210529110305.9446-3-thunder.leizhen@huawei.com Signed-off-by: Daniel Thompson commit 0171b07373cc8c2815ca5fa79a7308fdefa54ca4 Author: Grzegorz Szymaszek Date: Sat Apr 10 21:35:21 2021 +0200 ARM: dts: stm32: fix stm32mp157c-odyssey card detect pin The microSD card detect pin is physically connected to the MPU pin PI3. The Device Tree configuration of the card detect pin was wrong—it was set to pin PB7 instead. If such configuration was used, the kernel would hang on “Waiting for root device” when booting from a microSD card. Signed-off-by: Grzegorz Szymaszek Signed-off-by: Alexandre Torgue commit c8ba52d1b7e317c54d461970e4bdeec10ea1d9c4 Author: Masahiro Yamada Date: Fri May 28 12:46:15 2021 +0900 mips: syscalls: use pattern rules to generate syscall headers Use pattern rules to unify similar build rules among n32, n64, and o32. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Bogendoerfer commit faf243ede96855067fa38f5b1595a4f0c61ed5c7 Author: Masahiro Yamada Date: Fri May 28 12:46:14 2021 +0900 mips: syscalls: define syscall offsets directly in There is no good reason to generate the syscall offset macros by scripting since they are not derived from the syscall tables. Define __NR_*_Linux macros directly in arch/mips/include/asm/unistd.h, and clean up the Makefile and the shell script. Signed-off-by: Masahiro Yamada Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit ab78bb62e936f7ae0b1c501c6c9d88777c894b8e Author: Tiezhu Yang Date: Thu May 27 19:52:53 2021 +0800 MIPS: Loongson64: Make some functions static in smp.c Make some functions static to fix the following sparse warnings: arch/mips/loongson64/smp.c:54:5: sparse: sparse: symbol 'ipi_read_clear' was not declared. Should it be static? arch/mips/loongson64/smp.c:55:6: sparse: sparse: symbol 'ipi_write_action' was not declared. Should it be static? arch/mips/loongson64/smp.c:56:6: sparse: sparse: symbol 'ipi_write_enable' was not declared. Should it be static? arch/mips/loongson64/smp.c:57:6: sparse: sparse: symbol 'ipi_clear_buf' was not declared. Should it be static? arch/mips/loongson64/smp.c:58:6: sparse: sparse: symbol 'ipi_write_buf' was not declared. Should it be static? Fixes: fed4955f304e ("MIPS: Loongson64: Add Mail_Send support for 3A4000+ CPU") Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 35cbd91eb541e001f6e2648c56abb5361e3d6774 Author: Maarten Lankhorst Date: Tue Jun 1 09:46:52 2021 +0200 drm/i915: Disable mmap ioctl for gen12+ The platform should exclusively use mmap_offset, one less path to worry about for discrete. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210601074654.3103-14-thomas.hellstrom@linux.intel.com commit 62445a97c5fa85c4c6966c936155fc6a0dcfac5b Author: Thomas Hellström Date: Tue Jun 1 09:46:42 2021 +0200 drm/i915: Fix i915_sg_page_sizes to record dma segments rather than physical pages All users of this function actually want the dma segment sizes, but that's not what's calculated. Fix that and rename the function to i915_sg_dma_sizes to reflect what's calculated. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210601074654.3103-4-thomas.hellstrom@linux.intel.com commit 4d8151ae5329cf50781a02fd2298a909589a5bab Author: Thomas Hellström Date: Tue Jun 1 09:46:41 2021 +0200 drm/i915: Don't free shared locks while shared We are currently sharing the VM reservation locks across a number of gem objects with page-table memory. Since TTM will individiualize the reservation locks when freeing objects, including accessing the shared locks, make sure that the shared locks are not freed until that is done. For PPGTT we add an additional refcount, for GGTT we take additional measures to make sure objects sharing the GGTT reservation lock are freed at GGTT takedown Signed-off-by: Thomas Hellström Reviewed-by: Maarten Lankhorst Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210601074654.3103-3-thomas.hellstrom@linux.intel.com commit 0f4308d524e2e7ba8670249424bbcb3a4ff185f0 Author: Thomas Hellström Date: Tue Jun 1 09:46:40 2021 +0200 drm/i915: Untangle the vma pages_mutex Any sleeping dma_resv lock taken while the vma pages_mutex is held will cause a lockdep splat. Move the i915_gem_object_pin_pages() call out of the pages_mutex critical section. Signed-off-by: Thomas Hellström Reviewed-by: Maarten Lankhorst Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210601074654.3103-2-thomas.hellstrom@linux.intel.com commit a270a2b24de5be0480136cbbd7805b9134762b97 Author: Neil Armstrong Date: Tue May 18 09:58:33 2021 +0200 arm64: dts: meson: set 128bytes FIFO size on uart A The first UART controller in "Everything-Else" power domain, usually used for Bluetooth HCI has 128bytes FIFO depth. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210518075833.3736038-4-narmstrong@baylibre.com commit 25335b30daf66f4cc03715c2ac9cdc3258fb5531 Author: Mika Westerberg Date: Wed Apr 21 17:14:10 2021 +0300 thunderbolt: Check for NVM authentication status after the operation started If the NVM authentication fails immediately, like if the firmware detects that the image is not valid for some reason, better to read the status once and if set to non-zero fail the operation accordingly. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit faa1c615f0bdd4f3ac5288bf2952f49dfeac916c Author: Rajmohan Mani Date: Mon Apr 12 15:29:16 2021 +0300 thunderbolt: Add WRITE_ONLY and AUTHENTICATE_ONLY NVM operations for retimers The same way we support these two operations for USB4 routers we can extend the retimer NVM operations to support retimers also. Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 1cbf680f7687f55ae5a1405556519bc70d66a616 Author: Mika Westerberg Date: Mon Apr 12 15:25:08 2021 +0300 thunderbolt: Allow router NVM authenticate separately It may be useful if the actual NVM authentication can be delayed to be run later, for instance when the user logs out. For this reason add a new NVM operation (AUHENTICATE_ONLY) that just triggers the authentication procedure over whatever was written to the NVM storage. This is not supported with Thunderbolt 1-3 devices, though. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit ff3a8306456755689babc7bcc29c60e582738c7b Author: Rajmohan Mani Date: Mon Apr 12 14:01:46 2021 +0300 thunderbolt: Move nvm_write_ops to tb.h Currently these write ops are used for updating router firmware images only. Moving to tb.h helps the retimers also to use the same ops. Also add tb_ prefix to the enum while there. Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 3fb10ea4ce86d4d06622be894099c59872e92c57 Author: Rajmohan Mani Date: Thu Apr 1 18:42:38 2021 +0300 thunderbolt: Add support for retimer NVM upgrade when there is no link With help from platform firmware (ACPI) it is possible to power on retimers even when there is no USB4 link (e.g nothing is connected to the USB4 ports). This allows us to bring the USB4 sideband up so that we can access retimers and upgrade their NVM firmware. If the platform has support for this, we expose two additional attributes under USB4 ports: offline and rescan. These can be used to bring the port offline, rescan for the retimers and put the port online again. The retimer NVM upgrade itself works the same way than with cable connected. Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 3406de7cc20f254010f2f17450a58541fb77ffea Author: Rajmohan Mani Date: Thu Apr 1 18:38:05 2021 +0300 thunderbolt: Add additional USB4 port operations for retimer access When accessing retimers when there is no cable connected we are going to need additional USB4 port operations. First the port needs to be put into offline mode, and then the sideband channel transactions must be enabled on the SBTX line. This adds support for these operations. Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit ccc5cb8ad5d18ec0e008d1652711fa1c18e9366c Author: Rajmohan Mani Date: Thu Apr 1 18:20:17 2021 +0300 thunderbolt: Add support for ACPI _DSM to power on/off retimers Typically retimers can be accessed only when the USB4 link is up (e.g there is a cable connected). However, sometimes it is useful to be able to access retimers even if there is nothing connected to the USB4 port. For instance we may still want to be able to upgrade the retimer NVM firmware even if the user does not have any USB4 devices. This is something that USB4 spec leaves to implementers. In case of ACPI based systems, we can support this by providing a special _DSM method under each USB4 port. This _DSM can be used to turn on power to on-board retimers (and cycle it through different modes so that the sideband becomes usable). This patch adds support for this _DSM and makes the functionality available to the rest of the driver through tb_acpi_power_[on|off]_retimers(). Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit cae5f5151d76635f6b5c08133184c48048346e63 Author: Mika Westerberg Date: Thu Apr 1 17:34:20 2021 +0300 thunderbolt: Add USB4 port devices Create devices for each USB4 port. This is needed when we add retimer access when there is no device connected but may be useful for other purposes too following what USB subsystem does. This exports a single attribute "link" that shows the type of the USB4 link (or "none" if there is no cable connected). Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 0f28879cf6836f170773a9456c856e1f08f56764 Author: Mika Westerberg Date: Thu Apr 1 20:16:25 2021 +0300 thunderbolt: Log the link as TBT instead of TBT3 The upstream port can be connected to any previous generation Thunderbolt port so logging as "TBT" is more accurate than "TBT3. No functional changes. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit bfa8f78e06ed0b495a5736380de0e7f833a5efbe Author: Mika Westerberg Date: Wed Apr 28 19:04:02 2021 +0300 thunderbolt: Add KUnit tests for credit allocation This adds a couple of KUnit tests for USB4 credit allocation. Signed-off-by: Mika Westerberg commit 7c37bb304fd6c085f9630d1740ed53781d4d4821 Author: Mika Westerberg Date: Tue Mar 23 19:05:23 2021 +0200 thunderbolt: Add quirk for Intel Goshen Ridge DP credits Intel Goshen Ridge reports wrong DP main credits in NVM 27 and earlier, so add a quirk that fixes it. We also need to expand the quirk table to match on hardware vendor/device IDs too. Signed-off-by: Mika Westerberg commit 6ed541c53edcd5bf3cbd9fd600fd593e95ec79fb Author: Mika Westerberg Date: Mon Mar 22 18:09:35 2021 +0200 thunderbolt: Allocate credits according to router preferences The USB4 Connection Manager guide provides detailed information how the USB4 router buffer (credit) allocation information should be used by the connection manager when it allocates buffers for different paths. This patch implements it for Linux. For USB 3.x and DisplayPort we use directly the router preferences. The rest of the buffer space is then used for PCIe and DMA (peer-to-peer, XDomain) traffic. DMA tunnels require at least one buffer and PCIe six, so if there is not enough buffers we fail the tunnel creation. For the legacy Thunderbolt 1-3 devices we use the existing hard-coded scheme except for DMA where we use the values suggested by the USB4 spec chapter 13. Co-developed-by: Gil Fine Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 69fea377e660dcd2f5ab3097b9bd5ed29cfac1fa Author: Mika Westerberg Date: Mon Mar 22 17:01:59 2021 +0200 thunderbolt: Update port credits after bonding is enabled/disabled Once lane bonding has been enabled (or disabled) both lane adapters may update their total credits accordingly. For this reason re-read the port credits after lane bonding has been enabled or disabled. Signed-off-by: Mika Westerberg commit 56ad3aef5cdac0695944985f7f70209aec0efd4d Author: Mika Westerberg Date: Wed Mar 10 13:34:12 2021 +0200 thunderbolt: Read router preferred credit allocation information USB4 routers must expose their preferred credit (buffer) allocation information through router operation. This information tells the connection manager how the router prefers its buffers to be allocated to get the expected bandwidth for the supported protocols. Read this information and store it as part of struct tb_switch for each USB4 router. Signed-off-by: Mika Westerberg commit e7051beab8393dc614f7ea3969aa03bc490db1d6 Author: Mika Westerberg Date: Mon Mar 22 16:54:54 2021 +0200 thunderbolt: Wait for the lanes to actually bond It may take some time until the two lanes enter bonded state so poll for the link width to match what is expected before going forward. This ensures the link is in expected state before we start establishing paths through it. Signed-off-by: Mika Westerberg commit 02c5e7c2db2bdfe227dd3e7f6febd732ccec5440 Author: Mika Westerberg Date: Thu Dec 10 16:07:59 2020 +0200 thunderbolt: Move nfc_credits field to struct tb_path_hop With the USB4 buffer allocation the number of credits (and non-flow credits) may be different depending on the router buffer allocation preferences. To allow this move the nfc_credits field to struct tb_path_hop. Signed-off-by: Mika Westerberg commit 1c561e4e659d59f1f2825dec42f09338eac1c774 Author: Mika Westerberg Date: Thu Dec 10 16:55:17 2020 +0200 thunderbolt: Make tb_port_type() take const parameter The function does not modify the object in any way so make the parameter const to reflect this. No functional changes intended. Signed-off-by: Mika Westerberg commit c90b2c4fc9c3f5660a359377aabc1998456ae5b1 Author: Patrice Chotard Date: Mon Apr 26 12:45:36 2021 +0200 ARM: dts: stm32: Configure qspi's mdma transfer to block for stm32mp151 Configure qspi's mdma from buffer transfer (max 128 bytes) to block transfer (max 64K bytes). mtd_speedtest shows that write throughtput increases : - from 734 to 782 KiB/s (~6.5%) with s25fl512s SPI-NOR. - from 4848 to 5319 KiB/s (~9.72%) with Micron SPI-NAND. Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit 4b5fadef3fc2ab8863ffdf31eed6a745b1bf6e61 Author: Marek Vasut Date: Mon Apr 26 17:00:13 2021 +0200 ARM: dts: stm32: Fix touchscreen node on dhcom-pdk2 Fix make dtbs_check warning: arch/arm/boot/dts/stm32mp157c-dhcom-pdk2.dt.yaml:0:0: /soc/i2c@40015000/polytouch@38: failed to match any schema with compatible: ['edt,edt-ft5x06'] Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 28b9a4679d8074512f12967497c161b992eb3b75 Author: Marek Vasut Date: Mon Apr 26 17:00:12 2021 +0200 ARM: dts: stm32: Remove extra size-cells on dhcom-pdk2 Fix make dtbs_check warning: arch/arm/boot/dts/stm32mp157c-dhcom-pdk2.dt.yaml: gpio-keys-polled: '#address-cells' is a dependency of '#size-cells' arch/arm/boot/dts/stm32mp157c-dhcom-pdk2.dt.yaml: gpio-keys: '#address-cells' is a dependency of '#size-cells' Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Marek Vasut Signed-off-by: Alexandre Torgue commit eebd49a4ffb420a991c606e54aa3c9f02857a334 Author: Xin Long Date: Sat May 29 16:23:18 2021 -0400 xfrm: remove the fragment check for ipv6 beet mode In commit 68dc022d04eb ("xfrm: BEET mode doesn't support fragments for inner packets"), it tried to fix the issue that in TX side the packet is fragmented before the ESP encapping while in the RX side the fragments always get reassembled before decapping with ESP. This is not true for IPv6. IPv6 is different, and it's using exthdr to save fragment info, as well as the ESP info. Exthdrs are added in TX and processed in RX both in order. So in the above case, the ESP decapping will be done earlier than the fragment reassembling in TX side. Here just remove the fragment check for the IPv6 inner packets to recover the fragments support for BEET mode. Fixes: 68dc022d04eb ("xfrm: BEET mode doesn't support fragments for inner packets") Reported-by: Xiumei Mu Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit dfacca39867b0263fedbd0cccae5574d40c1ddf2 Author: Takashi Sakamoto Date: Mon May 31 11:51:03 2021 +0900 ALSA: fireface: perform sequence replay for media clock recovery This commit takes ALSA fireface driver to perform sequence replay for media clock recovery. The protocol specific to RME Fireface series is not compliant to IEC 61883-1/6 since it has no CIP header, therefore presentation time is not used for media clock recovery. The sequence of the number of data blocks per packet is important. I note that the device skips an isochronous cycle corresponding to an empty packet or a NODATA packet in blocking transmission method of IEC 61883-1/6. For sequence replay, the cycle is handled as receiving an empty packet. Furthermore, it doesn't start packet transmission till receiving any packet. The sequence replay is tested with below models: * Fireface 400 * Fireface 800 * Fireface 802 I note that it is better to initialize Fireface 400 in advance by initialization transaction implemented in snd-fireface-ctl-service of snd-firewire-ctl-services project. You can see whether initialized or not by HOST LED on the device. Unless, the device often stops packet transmission even if session starts. I guess the sequence replay also works well with below models: * Fireface UFX * Fireface UCX Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210531025103.17880-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a9dd8a61b6b1fdf334d0cc63672b3ffac3827f18 Author: Takashi Sakamoto Date: Mon May 31 11:51:02 2021 +0900 ALSA: firewire-tascam: perform sequence replay for media clock recovery This commit takes ALSA firewire-tascam driver to perform sequence replay for media clock recovery. The protocol specific to Tascam FireWire series is not compliant to IEC 61883-1/6 in terms of syt field of CIP. The protocol doesn't use presentation time in received CIP for playback timing. The sequence of the number of data blocks per packet is important for media clock recovery. Although the devices in Tascam FireWire series transfer packets regardless of receiving packets, the tx packets includes no events in the beginning of streaming. It takes so long to multiplex any event into the packet after receiving the sequence of packets. As long as I experienced, it takes several thousands of isochronous cycle. Furthermore, just after changing sampling transmission frequency, it stops multiplexing event at once, then starts multiplexing again. The sequence replay is tested with below models: * FW-1884 * FW-1804 * FW-1082 Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210531025103.17880-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 019af5923c8a46b581fc2f2d670dcc0714a80bf0 Author: Takashi Sakamoto Date: Mon May 31 11:51:01 2021 +0900 ALSA: firewire-digi00x: perform sequence replay for media clock recovery This commit takes ALSA firewire-digi00x driver to perform sequence replay for media clock recovery. All of models in Digidesign digi00x family don't transfer isochronous packets till receiving isochronous packets. The on-the-fly mode is used for the purpose. They don't interpret presentation time expressed in syt field of received CIP, therefore the sequence of the number of data blocks per packet is important for media clock recovery. The sequence replay is tested with below models: * Digidesign Digi 002 * Digidesign Digi 002 Rack * Digidesign Digi 003 * Digidesign Digi 003 Rack Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210531025103.17880-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 029ffc4294401fc7fbc45dd4728f26148ba499e4 Author: Takashi Sakamoto Date: Mon May 31 11:51:00 2021 +0900 ALSA: oxfw: perform sequence replay for media clock recovery This commit takes ALSA oxfw driver to perform sequence replay for media clock recovery. Unfortunately, OXFW970 ASIC and its firmware has a quirk called jumbo payload which skips several isochronous cycles for packet transmission, thus the sequence replay is just adopted to OXFW971 ASIC. As well as Fireworks, OXFW ASICs also ignores presentation time against the way in IEC 61883-1/6. The sequence replay is tested with below models: * Tascam FireOne * Stanton Magnetics SCS.1m * Apogee Duet FireWire For below models, the sequence replay is tested to be disabled: * Griffin FireWave * Behringer F-Control Audio 202 * Loud Technology Tapco Link.FireWire 4x6 * Loud Technology Mackie Onyx Satellite Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210531025103.17880-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a105f642ad621fe060d7153b66099e14603a9eaf Author: Takashi Sakamoto Date: Mon May 31 11:50:59 2021 +0900 ALSA: fireworks: perform sequence replay for media clock recovery Echo Digital Audio Corporation had US patent US7599388B2 titled as 'System and method for high-bandwidth serial bus data transfer'. In the patent, dual-banked shared memory is used to deliver data between serial bus transmission and processor in FIFO way. The patent seems to be used for Fireworks board module. The mechanism is not compliant to synchronization based on presentation time expressed in syt field of CIP header. Fireworks board module takes care of the sequence of the number of data blocks per packet and just ignores the value of syt field. This commit takes fireworks driver to performs sequence replay for media clock recovery. As long as I tested, Audiofire 2 and 4 have a quirk to skip an isochronous cycle several thousands after starting packet transmission. The sequence replay is tested with below models: * Loud Technology Mackie 400f * Echo Audio Audiofire 12 (DSP model) * Echo Audio Audiofire 12 (FPGA model) * Echo Audio Audiofire 8 (DSP model) * Echo Audio Audiofire 8 (FPGA model) * Echo Audio Audiofire Pre8 * Echo Audio Audiofire 4 * Echo Audio Audiofire 2 Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210531025103.17880-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 77f1fd6d28529de4acdbadf8d5b4997dd00a5479 Author: Takashi Sakamoto Date: Mon May 31 11:50:58 2021 +0900 ALSA: fireworks: delete SYTMATCH clock source In the design of Fireworks board module, the device does't adjust its media clock voluntarily by the sequence of presentation time expressed in syt field of CIP header of received packet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210531025103.17880-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6e1e89418a5ccdfb325aed538307c2f9dba6ef51 Author: Shaokun Zhang Date: Sat May 29 15:52:02 2021 +0800 xfrm: Remove the repeated declaration Function 'xfrm_parse_spi' is declared twice, so remove the repeated declaration. Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Signed-off-by: Shaokun Zhang Signed-off-by: Steffen Klassert commit 7fc6d3abc0844a9b8ef67937af465a417af6e9e9 Merge: 0c2c366e0ec55 0ca821da86a5e Author: Jakub Kicinski Date: Mon May 31 22:53:10 2021 -0700 Merge branch 'net-hns3-add-vlan-filter-control-support' Huazhong Tan says: ==================== net: hns3: add VLAN filter control support This patchset add VLAN filter control support for HNS3 driver. ==================== Link: https://lore.kernel.org/r/1622428725-30049-1-git-send-email-tanhuazhong@huawei.com Signed-off-by: Jakub Kicinski commit 0ca821da86a5ec24eb2ece24fe87e5bf518c5939 Author: Jian Shen Date: Mon May 31 10:38:45 2021 +0800 net: hns3: add debugfs support for vlan configuration Add debugfs support for vlan configuraion. create a single file "vlan_config" for it, and query it by command "cat vlan_config", return the result to userspace. The new display style is below: $ cat vlan_config I_PORT_VLAN_FILTER: on E_PORT_VLAN_FILTER: off FUNC_ID I_VF_VLAN_FILTER E_VF_VLAN_FILTER PORT_VLAN_FILTER_BYPASS pf off on off vf0 off on off FUNC_ID PVID ACCEPT_TAG1 ACCEPT_TAG2 ACCEPT_UNTAG1 ACCEPT_UNTAG2 pf 0 on on on on vf0 0 on on on on Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit fa6a262a255003ebb1f514fffd3399f3946d4fc9 Author: Jian Shen Date: Mon May 31 10:38:44 2021 +0800 net: hns3: add support for VF modify VLAN filter state Previously, there is hardware limitation for VF to modify the VLAN filter state, and the VLAN filter state is default enabled. Now the limitation has been removed in some device, so add capability flag to check whether the device supports modify VLAN filter state. If flag on, user will be able to modify the VLAN filter state by ethtool -K. VF needs to send mailbox to request the PF to modify the VLAN filter state for it. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 32e6d104c6fe01713a039a98842e4d2f6bb505ec Author: Jian Shen Date: Mon May 31 10:38:43 2021 +0800 net: hns3: add query basic info support for VF There are some features of VF depend on PF, so it's necessary for VF to know whether PF supports. For compatibility, modify the mailbox HCLGE_MBX_GET_TCINFO, extend its function, use to get the basic information of PF, including mailbox api version and PF capabilities. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 2ba306627f5950c9a7850f3b0499d39e522dc249 Author: Jian Shen Date: Mon May 31 10:38:42 2021 +0800 net: hns3: add support for modify VLAN filter state Previously, with hardware limitation, the port VLAN filter are effective for both PF and its VFs simultaneously, so a single function is not able to enable/disable separately, and the VLAN filter state is default enabled. Now some device supports each function to bypass port VLAN filter, then each function can switch VLAN filter separately. Add capability flag to check whether the device supports modify VLAN filter state. If flag on, user will be able to modify the VLAN filter state by ethtool -K. Furtherly, the default VLAN filter state is also changed according to whether non-zero VLAN used. Then the device can receive packet with any VLAN tag if only VLAN 0 used. The function hclge_need_enable_vport_vlan_filter() is used to help implement above changes. And the VLAN filter handle for promisc mode can also be simplified by this function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 060e9accaa743d701e653213651cf3feee1ae921 Author: Jian Shen Date: Mon May 31 10:38:41 2021 +0800 net: hns3: refine function hclge_set_vf_vlan_cfg() The struct hclge_vf_vlan_cfg is firstly designed for setting VLAN filter tag. And it's reused for enable RX VLAN offload later. It's strange to use member "is_kill" to indicate "enable". So redefine the struct hclge_vf_vlan_cfg to adapt it. For there are already 3 subcodes being used in function hclge_set_vf_vlan_cfg(), use "switch-case" style for each branch, rather than "if-else". Also simplify the assignment for each branch to make it more clearly. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 132023de7149e7dde4b457328cb233dc58561b54 Author: Jian Shen Date: Mon May 31 10:38:40 2021 +0800 net: hns3: remove unnecessary updating port based VLAN For the PF have called hclge_update_port_base_vlan_cfg() already before notify VF, it's unnecessary to update port based VLAN again when received mailbox request from VF. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit f2dbf0ed4e0c1789cc7c74ab3798bd0cdb7a2bf1 Author: Jian Shen Date: Mon May 31 10:38:39 2021 +0800 net: hns3: refine for hclge_push_vf_port_base_vlan_info() Use struct "hclge_vlan_info" instead of separately parameters for function hclge_push_vf_port_base_vlan_info(), to make it more concise. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit b44eb28d44a65370e77d0bcd9a87cee3fa1daaca Author: Jian Shen Date: Mon May 31 10:38:38 2021 +0800 net: hns3: add 'QoS' support for port based VLAN configuration Currently, option "qos" is igored by HNS3 driver for command "ip link set ethx vf vlan qos ". Add support for it. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: Jakub Kicinski commit 08729298c4eea5a9bbc0598d92ff47638a97a1ae Author: Andy Shevchenko Date: Sun May 30 22:25:01 2021 -0700 Input: resistive-adc-touch - replace OF headers with proper ones The driver is actually OF independent and doesn't need anything from OF (*). Replace OF headers with mod_devicetable.h and property.h. *) use of of_match_ptr() is actually wrong here, since it may provoke a compiler to warn about unused variable. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210528151113.85943-2-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov commit 02e28cf7dc2b7acbe660188a87ac0b8007dde3dd Author: Andy Shevchenko Date: Sun May 30 22:24:35 2021 -0700 Input: resistive-adc-touch - describe parameters in kernel doc Validation script is not happy: resistive-adc-touch.c:53: warning: Function parameter or member 'x_plate_ohms' not described in 'grts_state' resistive-adc-touch.c:53: warning: Function parameter or member 'ch' not described in 'grts_state' Describe parameters in kernel doc to make it happy. Fixes: fb082cd59afa ("Input: resistive-adc-touch - add support for z1 and z2 channels") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210528151113.85943-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov commit d7b0408934c749f546b01f2b33d07421a49b6f3e Author: Varad Gautam Date: Fri May 28 18:04:06 2021 +0200 xfrm: policy: Read seqcount outside of rcu-read side in xfrm_policy_lookup_bytype xfrm_policy_lookup_bytype loops on seqcount mutex xfrm_policy_hash_generation within an RCU read side critical section. Although ill advised, this is fine if the loop is bounded. xfrm_policy_hash_generation wraps mutex hash_resize_mutex, which is used to serialize writers (xfrm_hash_resize, xfrm_hash_rebuild). This is fine too. On PREEMPT_RT=y, the read_seqcount_begin call within xfrm_policy_lookup_bytype emits a mutex lock/unlock for hash_resize_mutex. Mutex locking is fine, since RCU read side critical sections are allowed to sleep with PREEMPT_RT. xfrm_hash_resize can, however, block on synchronize_rcu while holding hash_resize_mutex. This leads to the following situation on PREEMPT_RT, where the writer is blocked on RCU grace period expiry, while the reader is blocked on a lock held by the writer: Thead 1 (xfrm_hash_resize) Thread 2 (xfrm_policy_lookup_bytype) rcu_read_lock(); mutex_lock(&hash_resize_mutex); read_seqcount_begin(&xfrm_policy_hash_generation); mutex_lock(&hash_resize_mutex); // block xfrm_bydst_resize(); synchronize_rcu(); // block Move the read_seqcount_begin call outside of the RCU read side critical section, and do an rcu_read_unlock/retry if we got stale data within the critical section. On non-PREEMPT_RT, this shortens the time spent within RCU read side critical section in case the seqcount needs a retry, and avoids unbounded looping. Fixes: 77cc278f7b20 ("xfrm: policy: Use sequence counters with associated lock") Signed-off-by: Varad Gautam Cc: linux-rt-users Cc: netdev@vger.kernel.org Cc: stable@vger.kernel.org # v4.9 Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Florian Westphal Cc: "Ahmed S. Darwish" Signed-off-by: Steffen Klassert Acked-by: Ahmed S. Darwish commit 0c2c366e0ec55533decb00d0f1ea1cbc42247e7b Author: Zheng Yongjun Date: Tue Jun 1 10:08:01 2021 +0800 sctp: sm_statefuns: Fix spelling mistakes Fix some spelling mistakes in comments: genereate ==> generate correclty ==> correctly boundries ==> boundaries failes ==> fails isses ==> issues assocition ==> association signe ==> sign assocaition ==> association managemement ==> management restransmissions ==> retransmission sideffect ==> sideeffect bomming ==> booming chukns ==> chunks SHUDOWN ==> SHUTDOWN violationg ==> violating explcitly ==> explicitly CHunk ==> Chunk Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20210601020801.3625358-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski commit 379aecbce08f7187feab9aa12609d049ce2675b4 Author: Zheng Yongjun Date: Mon May 31 14:36:17 2021 +0800 rds: Fix spelling mistakes Fix some spelling mistakes in comments: alloced ==> allocated Signed-off-by: Zheng Yongjun Reviewed-by: Håkon Bugge Link: https://lore.kernel.org/r/20210531063617.3018637-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski commit 37f2ad2b9018c5e23455536e5c240cac1334f20a Author: Zheng Yongjun Date: Mon May 31 10:00:48 2021 +0800 net: sched: Fix spelling mistakes Fix some spelling mistakes in comments: sevaral ==> several sugestion ==> suggestion unregster ==> unregister suplied ==> supplied cirsumstances ==> circumstances Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20210531020048.2920054-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski commit 01709d0977d464b862968ef063899e576615e5e5 Author: Zheng Yongjun Date: Mon May 31 10:00:19 2021 +0800 nfc: hci: Fix spelling mistakes Fix some spelling mistakes in comments: occured ==> occurred negociate ==> negotiate Signed-off-by: Zheng Yongjun Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531020019.2919799-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski commit e3d8178c6e076f5c4302418880989808db03f692 Merge: 44fdd2edb36f0 96c85f51f1236 Author: Jakub Kicinski Date: Mon May 31 22:40:28 2021 -0700 Merge branch 'part-2-of-sja1105-dsa-driver-preparation-for-new-switch-introduction-sja1110' Vladimir Oltean says: ==================== Part 2 of SJA1105 DSA driver preparation for new switch introduction (SJA1110) This series is a continuation of: https://patchwork.kernel.org/project/netdevbpf/cover/20210524131421.1030789-1-olteanv@gmail.com/ even though it isn't the first time these patches are submitted (they were part of the group previously called "Add NXP SJA1110 support to the sja1105 DSA driver"): https://patchwork.kernel.org/project/netdevbpf/cover/20210526135535.2515123-1-vladimir.oltean@nxp.com/ but I broke that up again since these patches are already reviewed, for the most part. There are no changes compared to v2 and v1. This series of patches contains: - an adaptation of the driver to the new "ethernet-ports" OF node name - an adaptation of the driver to support more than 1 SGMII port - a generalization of the supported phy_interface_t values per port - an adaptation to encode SPEED_10, SPEED_100, SPEED_1000 into the hardware registers differently depending on switch revision - a consolidation of the PHY interface type used for RGMII and another one for the API exposed for sja1105_dynamic_config_read() ==================== Link: https://lore.kernel.org/r/20210530225939.772553-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski commit 96c85f51f1236d0eed3c8cd075ce144faed6a0ca Author: Vladimir Oltean Date: Mon May 31 01:59:39 2021 +0300 net: dsa: sja1105: some table entries are always present when read dynamically The SJA1105 has a static configuration comprised of a number of tables with entries. Some of these can be read and modified at runtime as well, through the dynamic configuration interface. As a careful reader can notice from the comments in this file, the software interface for accessing a table entry through the dynamic reconfiguration is a bit of a no man's land, and varies wildly across switch generations and even from one kind of table to another. I have tried my best to come up with a software representation of a 'common denominator' SPI command to access a table entry through the dynamic configuration interface: struct sja1105_dyn_cmd { bool search; u64 valid; /* must be set to 1 */ u64 rdwrset; /* 0 to read, 1 to write */ u64 errors; u64 valident; /* 0 if entry is invalid, 1 if valid */ u64 index; }; Relevant to this patch is the VALIDENT bit, which for READ commands is populated by the switch and lets us know if we're looking at junk or at a real table entry. In SJA1105, the dynamic reconfiguration interface for management routes has notably not implemented the VALIDENT bit, leading to a workaround to ignore this field in sja1105_dynamic_config_read(), as it will be set to zero, but the data is valid nonetheless. In SJA1110, this pattern has sadly been abused to death, and while there are many more tables which can be read back over the dynamic config interface compared to SJA1105, their handling isn't in any way more uniform. Generally speaking, if there is a single possible entry in a given table, and loading that table in the static config is mandatory as per the documentation, then the VALIDENT bit is deemed as redundant and more than likely not implemented. So it is time to make the workaround more official, and add a bit to the flags implemented by dynamic config tables. It will be used by more tables when SJA1110 support arrives. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit f41fad3cb8b76cc0e5deebd4d535d0c7c7b43b43 Author: Vladimir Oltean Date: Mon May 31 01:59:38 2021 +0300 net: dsa: sja1105: always keep RGMII ports in the MAC role In SJA1105, the xMII Mode Parameters Table field called PHY_MAC denotes the 'role' of the port, be it a PHY or a MAC. This makes a difference in the MII and RMII protocols, but RGMII is symmetric, so either PHY or MAC settings result in the same hardware behavior. The SJA1110 is different, and the RGMII ports only work when configured in MAC mode, so keep the port roles in MAC mode unconditionally. Why we had an RGMII port in the PHY role in the first place was because we wanted to have a way in the driver to denote whether RGMII delays should be applied based on the phy-mode property or not. This is already done in sja1105_parse_rgmii_delays() based on an intermediary struct sja1105_dt_port (which contains the port role). So it is a logical fallacy to use the hardware configuration as a scratchpad for driver data, it isn't necessary. We can also remove the gating condition for applying RGMII delays only for ports in the PHY role. The .setup_rgmii_delay() method looks at the priv->rgmii_rx_delay[port] and priv->rgmii_tx_delay[port] properties which are already populated properly (in the case of a port in the MAC role they are false). Removing this condition generates a few more SPI writes for these ports (clearing the RGMII delays) which are perhaps useless for SJA1105P/Q/R/S, where we know that the delays are disabled by default. But for SJA1110, the firmware on the embedded microcontroller might have done something funny, so it's always a good idea to clear the RGMII delays if that's what Linux expects. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 41fed17fdbe5311b141d39c40f028a594b0a0c72 Author: Vladimir Oltean Date: Mon May 31 01:59:37 2021 +0300 net: dsa: sja1105: add a translation table for port speeds In order to support the new speed of 2500Mbps, the SJA1110 has achieved the great performance of changing the encoding in the MAC Configuration Table for the port speeds of 10, 100, 1000 compared to SJA1105. Because this is a common driver, we need a layer of indirection in order to program the hardware with the right values irrespective of switch generation. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 91a050782cbfc8f81c7c6aa0c5ce396bea51df3b Author: Vladimir Oltean Date: Mon May 31 01:59:36 2021 +0300 net: dsa: sja1105: add a PHY interface type compatibility matrix On the SJA1105, all ports support the parallel "xMII" protocols (MII, RMII, RGMII) except for port 4 on SJA1105R/S which supports only SGMII. This was relatively easy to model, by special-casing the SGMII port. On the SJA1110, certain ports can be pinmuxed between SGMII and xMII, or between SGMII and an internal 100base-TX PHY. This creates problems, because the driver's assumption so far was that if a port supports SGMII, it uses SGMII. We allow the device tree to tell us how the port pinmuxing is done, and check that against a PHY interface type compatibility matrix for plausibility. The other big change is that instead of doing SGMII configuration based on what the port supports, we do it based on what is the configured phy_mode of the port. The 2500base-x support added in this patch is not complete. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit bf4edf4afb87e67bed8678c09a01110148830483 Author: Vladimir Oltean Date: Mon May 31 01:59:35 2021 +0300 net: dsa: sja1105: cache the phy-mode port property So far we've succeeded in operating without keeping a copy of the phy-mode in the driver, since we already have the static config and we can look at the xMII Mode Parameters Table which already holds that information. But with the SJA1110, we cannot make the distinction between sgmii and 2500base-x, because to the hardware's static config, it's all SGMII. So add a phy_mode property per port inside struct sja1105_private. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 4c7ee010cf75e5769037d4f152a8192dcf5eb49c Author: Vladimir Oltean Date: Mon May 31 01:59:34 2021 +0300 net: dsa: sja1105: the 0x1F0000 SGMII "base address" is actually MDIO_MMD_VEND2 Looking at the SGMII PCS from SJA1110, which is accessed indirectly through a different base address as can be seen in the next patch, it appears odd that the address accessed through indirection still references the base address from the SJA1105S register map (first MDIO register is at 0x1f0000), when it could index the SGMII registers starting from zero. Except that the 0x1f0000 is not a base address at all, it seems. It is 0x1f << 16 | 0x0000, and 0x1f is coding for the vendor-specific MMD2. So, it turns out, the Synopsys PCS implements all its registers inside the vendor-specific MMDs 1 and 2 (0x1e and 0x1f). This explains why the PCS has no overlaps (for the other MMDs) with other register regions of the switch (because no other MMDs are implemented). Change the code to remove the SGMII "base address" and explicitly encode the MMD for reads/writes. This will become necessary for SJA1110 support. Cc: Russell King Cc: Heiner Kallweit Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 84db00f2c04338da329e2cc9a055d5a0b82fa159 Author: Vladimir Oltean Date: Mon May 31 01:59:33 2021 +0300 net: dsa: sja1105: allow SGMII PCS configuration to be per port The SJA1105 R and S switches have 1 SGMII port (port 4). Because there is only one such port, there is no "port" parameter in the configuration code for the SGMII PCS. However, the SJA1110 can have up to 4 SGMII ports, each with its own SGMII register map. So we need to generalize the logic. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 15074a361fee151ee4207d20020a2de178cf490f Author: Vladimir Oltean Date: Mon May 31 01:59:32 2021 +0300 net: dsa: sja1105: be compatible with "ethernet-ports" OF node name Since commit f2f3e09396be ("net: dsa: sja1105: be compatible with "ethernet-ports" OF node name"), DSA supports the "ethernet-ports" name for the container node of the ports, but the sja1105 driver doesn't, because it handles some device tree parsing of its own. Add the second node name as a fallback. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 44fdd2edb36f0da66758cd355840d357078110fe Author: Shaokun Zhang Date: Mon May 31 16:29:16 2021 +0800 bnx2x: Remove the repeated declaration Function 'bnx2x_vfpf_release' is declared twice, so remove the repeated declaration. Cc: Ariel Elior Cc: GR-everest-linux-l2@marvell.com Signed-off-by: Shaokun Zhang Acked-by: Sudarsana Reddy Kalluru Link: https://lore.kernel.org/r/1622449756-2627-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Jakub Kicinski commit 12e64b3bb9a8cd376a1a92434302e5aa7f1ab1e5 Author: Rocco Yue Date: Sun May 30 19:38:11 2021 +0800 ipv6: align code with context The Tab key is used three times, causing the code block to be out of alignment with the context. Signed-off-by: Rocco Yue Link: https://lore.kernel.org/r/20210530113811.8817-1-rocco.yue@mediatek.com Signed-off-by: Jakub Kicinski commit 015516d23299c5fecfbb13aea5c8a99c3f3b8913 Merge: 62f20e068ccc5 e24b608519363 Author: Jakub Kicinski Date: Mon May 31 22:14:06 2021 -0700 Merge branch 'net-sealevel-clean-up-some-code-style-issues' Guangbin Huang says: ==================== net: sealevel: clean up some code style issues This patchset clean up some code style issues. ==================== Link: https://lore.kernel.org/r/1622355874-18933-1-git-send-email-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski commit e24b608519363712a00327b0dbb4f12861cb6b55 Author: Peng Li Date: Sun May 30 14:24:34 2021 +0800 net: sealevel: fix the alignment issue Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit b086ebfce34f78de02c1966d21931f681955778d Author: Peng Li Date: Sun May 30 14:24:33 2021 +0800 net: sealevel: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 04d7ad8cca9c33df22b3f5ef964ca9cb86d8ee8e Author: Peng Li Date: Sun May 30 14:24:32 2021 +0800 net: sealevel: remove meaningless comments Remove the meaningless stylistically wrong comment. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit cc51e3f36e6268697cf760dc770dc51154e13a51 Author: Peng Li Date: Sun May 30 14:24:31 2021 +0800 net: sealevel: fix a code style issue about switch and case According to the chackpatch.pl, switch and case should be at the same indent. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 40e8ee9d467dda815b10e9c2eb77ab7cf715ca1a Author: Peng Li Date: Sun May 30 14:24:30 2021 +0800 net: sealevel: remove redundant initialization for statics Should not initialise statics to false. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 52499d202dc6ecb995fb56e9933e503f6d484495 Author: Peng Li Date: Sun May 30 14:24:29 2021 +0800 net: sealevel: add some required spaces Add spaces required around that '='. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit f090d1c38107dd964e933f7be9885baee15325f6 Author: Peng Li Date: Sun May 30 14:24:28 2021 +0800 net: sealevel: open brace '{' following struct go on the same line Fix the checkpatch error as open brace '{' following struct should go on the same line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 8be88e3ccee49716a45972c7451b8033737fc9f0 Author: Peng Li Date: Sun May 30 14:24:27 2021 +0800 net: sealevel: fix the code style issue about "foo* bar" Fix the checkpatch error as "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 58f30eea85a336d4931fa76099f24fa51797666d Author: Peng Li Date: Sun May 30 14:24:26 2021 +0800 net: sealevel: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 801f0a1cf96f314ed88b51a2ceb243952ab37e7c Author: Peng Li Date: Sun May 30 14:24:25 2021 +0800 net: sealevel: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 62f20e068ccc50d6ab66fdb72ba90da2b9418c99 Author: Willy Tarreau Date: Sat May 29 13:07:46 2021 +0200 ipv6: use prandom_u32() for ID generation This is a complement to commit aa6dd211e4b1 ("inet: use bigger hash table for IP ID generation"), but focusing on some specific aspects of IPv6. Contary to IPv4, IPv6 only uses packet IDs with fragments, and with a minimum MTU of 1280, it's much less easy to force a remote peer to produce many fragments to explore its ID sequence. In addition packet IDs are 32-bit in IPv6, which further complicates their analysis. On the other hand, it is often easier to choose among plenty of possible source addresses and partially work around the bigger hash table the commit above permits, which leaves IPv6 partially exposed to some possibilities of remote analysis at the risk of weakening some protocols like DNS if some IDs can be predicted with a good enough probability. Given the wide range of permitted IDs, the risk of collision is extremely low so there's no need to rely on the positive increment algorithm that is shared with the IPv4 code via ip_idents_reserve(). We have a fast PRNG, so let's simply call prandom_u32() and be done with it. Performance measurements at 10 Gbps couldn't show any difference with the previous code, even when using a single core, because due to the large fragments, we're limited to only ~930 kpps at 10 Gbps and the cost of the random generation is completely offset by other operations and by the network transfer time. In addition, this change removes the need to update a shared entry in the idents table so it may even end up being slightly faster on large scale systems where this matters. The risk of at least one collision here is about 1/80 million among 10 IDs, 1/850k among 100 IDs, and still only 1/8.5k among 1000 IDs, which remains very low compared to IPv4 where all IDs are reused every 4 to 80ms on a 10 Gbps flow depending on packet sizes. Reported-by: Amit Klein Signed-off-by: Willy Tarreau Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20210529110746.6796-1-w@1wt.eu Signed-off-by: Jakub Kicinski commit ad993a95c508417acdeb15244109e009e50d8758 Author: Xie Yongji Date: Mon May 31 21:58:52 2021 +0800 virtio-net: Add validation for used length This adds validation for used length (might come from an untrusted device) to avoid data corruption or loss. Signed-off-by: Xie Yongji Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210531135852.113-1-xieyongji@bytedance.com Signed-off-by: Jakub Kicinski commit e099f3e8b71c212779089429a105b16d51ff6d58 Author: Krzysztof Kozlowski Date: Mon May 31 09:39:02 2021 +0200 nfc: st95hf: fix indentation to tabs Use tabs to indent instead of spaces. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-7-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 1952fa424dcbfa75a58bbd4f7a0551a3ad5bb172 Author: Krzysztof Kozlowski Date: Mon May 31 09:39:01 2021 +0200 nfc: st-nci: drop ftrace-like debugging messages Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-6-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit e83a26473a7bc79498c486a542a7b933b2994466 Author: Krzysztof Kozlowski Date: Mon May 31 09:39:00 2021 +0200 nfc: st21nfca: drop ftrace-like debugging messages Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-5-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit aa93b4bcdffab33b23edb71d6e237b0d85b7688a Author: Krzysztof Kozlowski Date: Mon May 31 09:38:59 2021 +0200 nfc: pn544: drop ftrace-like debugging messages Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-4-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit feab6ba21da73a86ed406fe2c7d075147f73eb44 Author: Krzysztof Kozlowski Date: Mon May 31 09:38:58 2021 +0200 nfc: pn533: drop unneeded braces {} in if {} braces are not needed over single if-statement. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-3-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 62f64417afd6babfa3a45800c11b5a8fce447c71 Author: Krzysztof Kozlowski Date: Mon May 31 09:38:57 2021 +0200 nfc: pn533: drop ftrace-like debugging messages Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-2-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit e3bf5531e6e6d5a7a498cb21079a135726fd7fb8 Author: Krzysztof Kozlowski Date: Mon May 31 09:38:56 2021 +0200 nfc: mrvl: simplify with module_driver Remove standard module init/exit boilerplate with module_driver() which also annotates the functions with __init. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073902.7111-1-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 8f99528ef5e2aaee5b17bd97271a4e1dd4ee9b35 Author: Krzysztof Kozlowski Date: Mon May 31 09:35:15 2021 +0200 nfc: mrvl: correct minor coding style violations Correct block comments and usage of tab in function definition. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073522.6720-4-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit be3d162ad02303f7bcb00b99b010fd4babe630b0 Author: Krzysztof Kozlowski Date: Mon May 31 09:35:14 2021 +0200 nfc: mrvl: use SPDX-License-Identifier Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073522.6720-3-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 6a7fdad7021b3eed9c6d68a483dc8f294accd1d5 Author: Krzysztof Kozlowski Date: Mon May 31 09:35:13 2021 +0200 nfc: mei_phy: drop ftrace-like debugging messages Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073522.6720-2-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 9571289ddf71694de0e023afc5e88d90cfd067b5 Author: Krzysztof Kozlowski Date: Mon May 31 09:35:12 2021 +0200 nfc: fdp: drop ftrace-like debugging messages Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. This allows also to remove several local variables and entire fdp_nci_recv_frame() function (whose purpose was only to log). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531073522.6720-1-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 3d45cefc8edd7f560e6c97a8d9928ad571f76dec Author: Hannes Reinecke Date: Tue Apr 27 10:30:46 2021 +0200 scsi: core: Drop obsolete Linux-specific SCSI status codes Originally the SCSI subsystem has been using 'special' SCSI status codes, which were the SAM-specified ones but shifted by 1. As most drivers have now been modified to use the SAM-specified ones, having two nearly identical sets of definitions only causes confusion. The Linux-specifed SCSI status codes have been marked obsolete for several years so drop them and use the SAM-specified status codes throughout. Link: https://lore.kernel.org/r/20210427083046.31620-41-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Douglas Gilbert Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit e7d236a6fe5102092c463112124cf52e4d71885e Author: Dave Chinner Date: Tue Jun 1 13:40:36 2021 +1000 xfs: move page freeing into _xfs_buf_free_pages() Rather than open coding it just before we call _xfs_buf_free_pages(). Also, rename the function to xfs_buf_free_pages() as the leading underscore has no useful meaning. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 02c5117386884e06b6e78b72288f1e0af4320dc1 Author: Dave Chinner Date: Tue Jun 1 13:40:36 2021 +1000 xfs: merge _xfs_buf_get_pages() Only called from one place now, so merge it into xfs_buf_alloc_pages(). Because page array allocation is dependent on bp->b_pages being null, always ensure that when the pages array is freed we always set bp->b_pages to null. Also convert the page array to use kmalloc() rather than kmem_alloc() so we can use the gfp flags we've already calculated for the allocation context instead of hard coding KM_NOFS semantics. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit c9fa563072e13337713a441cf30171feb4e96e6d Author: Dave Chinner Date: Tue Jun 1 13:40:36 2021 +1000 xfs: use alloc_pages_bulk_array() for buffers Because it's more efficient than allocating pages one at a time in a loop. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 07b5c5add42a0afccf79401b12d78043ed6b8240 Author: Dave Chinner Date: Tue Jun 1 13:40:35 2021 +1000 xfs: use xfs_buf_alloc_pages for uncached buffers Use the newly factored out page allocation code. This adds automatic buffer zeroing for non-read uncached buffers. This also allows us to greatly simply the error handling in xfs_buf_get_uncached(). Because xfs_buf_alloc_pages() cleans up partial allocation failure, we can just call xfs_buf_free() in all error cases now to clean up after failures. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 0a683794ace283984ae95ea6796f37b5f3afc446 Author: Dave Chinner Date: Tue Jun 1 13:40:02 2021 +1000 xfs: split up xfs_buf_allocate_memory Based on a patch from Christoph Hellwig. This splits out the heap allocation and page allocation portions of the buffer memory allocation into two separate helper functions. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit 502071489548b984957cc84d41da9aca59d92ea7 Author: Hannes Reinecke Date: Thu May 27 09:22:17 2021 +0200 scsi: pcmcia: nsp_cs: Use SAM_STAT_CHECK_CONDITION The nsp_cs driver stores the SAM status values in SCp.Status, so we need to use the non-shifted version SAM_STAT_CHECK_CONDITION. Link: https://lore.kernel.org/r/20210527072217.117126-1-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 14b40c1e7ccc07e486719362f6f29ec5e3151331 Author: Hannes Reinecke Date: Tue Apr 27 10:30:45 2021 +0200 scsi: target: Use standard SAM status types target_complete_cmd() and friends requires a SAM status type, so passing GOOD here is actually wrong. Link: https://lore.kernel.org/r/20210427083046.31620-40-hare@suse.de Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit a7479a8477e61420df43e1e8964986d90764efca Author: Hannes Reinecke Date: Tue Apr 27 10:30:44 2021 +0200 scsi: core: Kill message byte Remove last vestiges of SCSI status message bytes. Link: https://lore.kernel.org/r/20210427083046.31620-39-hare@suse.de Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 54cf31d07aa859e142c527f04eefa254659e1af2 Author: Hannes Reinecke Date: Tue Apr 27 10:30:43 2021 +0200 scsi: core: Drop message byte helper The message byte is now unused, so we can drop the helper to set the message byte and the check for message bytes during error recovery. Link: https://lore.kernel.org/r/20210427083046.31620-38-hare@suse.de Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 0ee44f900e419efe00a72880256ef9c71cf60225 Author: Hannes Reinecke Date: Tue Apr 27 10:30:42 2021 +0200 scsi: fdomain: Translate message to host byte status Instead of setting the message byte translate it to the appropriate host byte. As error recovery would return DID_ERROR for any non-zero message byte the translation doesn't change the error handling. Link: https://lore.kernel.org/r/20210427083046.31620-37-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit b2e88c97c59186584ae6111246aee215ed6ec666 Author: Hannes Reinecke Date: Tue Apr 27 10:30:41 2021 +0200 scsi: fdomain: Drop last argument to fdomain_finish_cmd() Set the SCSI host status before calling fdomain_finish_cmd() and drop the last argument to that function. Link: https://lore.kernel.org/r/20210427083046.31620-36-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit a87afe2896e49822b7eff0532c8755097fffb38e Author: Hannes Reinecke Date: Tue Apr 27 10:30:40 2021 +0200 scsi: FlashPoint: Use standard SCSI definitions No point in having the driver providing its own definitions. Link: https://lore.kernel.org/r/20210427083046.31620-35-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit df1303147649e4379d4141206d62ac9bec58a270 Author: Hannes Reinecke Date: Tue Apr 27 10:30:39 2021 +0200 scsi: fas216: Use get_status_byte() to avoid using Linux-specific status codes The driver should be using the standard SAM_STAT_ values, and not the Linux-specific ones. Link: https://lore.kernel.org/r/20210427083046.31620-34-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 7f33f56b02ca49d23d3b3014d693a16b0cf6324a Author: Hannes Reinecke Date: Tue Apr 27 10:30:38 2021 +0200 scsi: fas216: Translate message to host byte status Instead of setting the message byte translate it to the appropriate host byte. As error recovery would return DID_ERROR for any non-zero message byte the translation doesn't change the error handling. [mkp: zeroday bug report: s/SCpnt->result/SCpnt/] Link: https://lore.kernel.org/r/20210427083046.31620-33-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit ac87ee0ac120119f52cfc8e5fce696d8fc84dbb4 Author: Hannes Reinecke Date: Tue Apr 27 10:30:37 2021 +0200 scsi: advansys: Do not set message byte in SCSI status The host byte in the SCSI status takes precedence during error recovery, so there is no point in setting the message byte in addition to a host byte which is not DID_OK. Link: https://lore.kernel.org/r/20210427083046.31620-32-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit fdabe57d126954fe4132ef271366dfd75b411224 Author: Hannes Reinecke Date: Tue Apr 27 10:30:36 2021 +0200 scsi: aha152x: Do not set message byte when calling scsi_done() The done() function is called with a host_byte indicating the actual error when the message byte is set. As the host byte takes precedence during error recovery we can drop setting the message byte if the host byte is set, too. The only other case is when the host byte is DID_OK, but in that case the message byte is always COMMAND_COMPLETE (i.e. 0), so we can drop it there, too. Link: https://lore.kernel.org/r/20210427083046.31620-31-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit aec166fde7827643c8e049f20bc30ea61b14ea53 Author: Hannes Reinecke Date: Tue Apr 27 10:30:35 2021 +0200 scsi: aha152x: Modify done() to use separate status bytes Instead of passing in the combined SCSI result values, split them off into separate status, message, and host byte values. Link: https://lore.kernel.org/r/20210427083046.31620-30-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit a9d2d8065821feec2e061ee39988d2f4d27631ea Author: Hannes Reinecke Date: Tue Apr 27 10:30:34 2021 +0200 scsi: acornscsi: Translate message byte to host byte Instead of setting the message byte translate it to the appropriate host byte. As error recovery would return DID_ERROR for any non-zero message byte the translation doesn't change the error handling. And use SCSI result accessors while we're at it. Link: https://lore.kernel.org/r/20210427083046.31620-29-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 3c969131457a8e3be8aa7c6e236b0f16121f5b04 Author: Hannes Reinecke Date: Tue Apr 27 10:30:33 2021 +0200 scsi: acornscsi: Remove acornscsi_reportstatus() Unused. Link: https://lore.kernel.org/r/20210427083046.31620-28-hare@suse.de Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 3ff451e929838b368c1be3939045db080058b3df Author: Hannes Reinecke Date: Tue Apr 27 10:30:32 2021 +0200 scsi: mesh: Translate message to host byte status Instead of setting the message byte translate it to a host byte status. As the error recovery would map it to DID_ERROR anyway the translation doesn't change the SCSI error handling. Link: https://lore.kernel.org/r/20210427083046.31620-27-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 6e39836ebccd6dfd9ee14ec6cf6acbe0ed0da5c7 Author: Hannes Reinecke Date: Tue Apr 27 10:30:31 2021 +0200 scsi: wd33c93: Translate message byte to host byte Instead of setting the message byte translate it to the appropriate host byte. As error recovery would return DID_ERROR for any non-zero message byte the translation doesn't change the error handling. Link: https://lore.kernel.org/r/20210427083046.31620-26-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 0e00ba7338cf07059dec28d1285e2f0af0cfefa3 Author: Hannes Reinecke Date: Tue Apr 27 10:30:30 2021 +0200 scsi: nsp32: Do not set message byte The message byte always devolves to COMMAND_COMPLETE, so there is no point in setting it. Link: https://lore.kernel.org/r/20210427083046.31620-25-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 7e2bc6de92d490aff486d8577a44028e56ca19ad Author: Hannes Reinecke Date: Tue Apr 27 10:30:29 2021 +0200 scsi: nsp32: Whitespace cleanup [mkp: fix kernel test robot warning] Link: https://lore.kernel.org/r/20210427083046.31620-24-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 5751a9eaf1870003c7e4541856c00901cd9206b7 Author: Hannes Reinecke Date: Tue Apr 27 10:30:27 2021 +0200 scsi: qlogicfas408: Whitespace cleanup Link: https://lore.kernel.org/r/20210427083046.31620-22-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 9a588d239f2392fca24aa9e95d2a9174048db8e9 Author: Hannes Reinecke Date: Tue Apr 27 10:30:26 2021 +0200 scsi: qlogicfas408: make ql_pcmd() a void function Make ql_pcmd() a void function and set the SCSI result directly. [mkp: fix zeroday 'result' warning] Link: https://lore.kernel.org/r/20210427083046.31620-21-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen fix commit 5bfaafb652d1659001a68324d47a3a4b149dfd33 Author: Hannes Reinecke Date: Tue Apr 27 10:30:25 2021 +0200 scsi: dc395: Translate message bytes Drop message byte setting if the host byte is already set, and translate message bytes into the related host bytes when evaluating an overrun or underrun. Link: https://lore.kernel.org/r/20210427083046.31620-20-hare@suse.de Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 75dd44395af2b4d4f14d22027411326a07954281 Author: Hannes Reinecke Date: Tue Apr 27 10:30:24 2021 +0200 scsi: dc395: Use standard macros to set SCSI result Use standard macros to set the SCSI result and drop the internal ones. Link: https://lore.kernel.org/r/20210427083046.31620-19-hare@suse.de Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 735b830c6104af6f4ec0e9a22822cd4067ac0bf5 Author: Hannes Reinecke Date: Tue Apr 27 10:30:23 2021 +0200 scsi: core: Add scsi_msg_to_host_byte() Add helper to convert message byte into a host byte code. Link: https://lore.kernel.org/r/20210427083046.31620-18-hare@suse.de Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit f6b5a697064900c207876c12af55e176ec83f49e Author: Hannes Reinecke Date: Tue Apr 27 10:30:22 2021 +0200 scsi: core: Add get_{status,host}_byte() accessor functions Add accessor functions for the host and status byte. Link: https://lore.kernel.org/r/20210427083046.31620-17-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 7b25bdb1c828719a4732600faeaf0ba3f34816e6 Author: Hannes Reinecke Date: Tue Apr 27 10:30:21 2021 +0200 scsi: NCR5380: Fold SCSI message ABORT onto DID_ABORT The message byte can take only two values, COMMAND_COMPLETE and ABORT. So we can easily map ABORT to DID_ABORT and not set the message byte. Link: https://lore.kernel.org/r/20210427083046.31620-16-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 54c29086195fd72b6a290ef367e71f73fa657b1f Author: Hannes Reinecke Date: Tue Apr 27 10:30:20 2021 +0200 scsi: core: Drop the now obsolete driver_byte definitions The driver_byte field in the result is now unused, so we can drop the definitions. Link: https://lore.kernel.org/r/20210427083046.31620-15-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit b840abeffc23c5bf2e4dd53f0448d72bdedf1666 Author: Hannes Reinecke Date: Tue Apr 27 10:30:19 2021 +0200 scsi: xen-scsifront: Compability status handling The Xen guest might run against arbitrary backends, so the driver might receive a status with driver_byte set. Map these errors to DID_ERROR to be consistent with recent changes. Link: https://lore.kernel.org/r/20210427083046.31620-14-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 58bedf351f3eace10447b5e1f70b9079ab4d04d2 Author: Hannes Reinecke Date: Tue Apr 27 10:30:18 2021 +0200 scsi: xen-scsiback: Use DID_ERROR instead of DRIVER_ERROR DRIVER_ERROR was supposed to signal an error generated by the driver, which xen-scsiback arguably isn't. Also the driver bytes don't have a detailed error recovery, so we should rather return DID_ERROR instead of DRIVER_ERROR. Link: https://lore.kernel.org/r/20210427083046.31620-13-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 4bd51e54e16ad0b0dba4feb0fdb70861feb2869d Author: Hannes Reinecke Date: Tue Apr 27 10:30:17 2021 +0200 scsi: core: Use DID_TIME_OUT instead of DRIVER_TIMEOUT Set DID_TIME_OUT instead of DRIVER_TIMEOUT when a command is finally marked as failed after error recovery. Link: https://lore.kernel.org/r/20210427083046.31620-12-hare@suse.de Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 16576ad8a8f0c05f8cd86779e3f2c0ee9f5e5552 Author: Hannes Reinecke Date: Tue Apr 27 10:30:16 2021 +0200 scsi: core: Do not use DRIVER_INVALID There is no point in returning DID_ABORT together with DRIVER_INVALID, as the caller couldn't care less where the abort originated. So drop the use of DRIVER_INVALID. Link: https://lore.kernel.org/r/20210427083046.31620-11-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 464a00c9e0ad45e3f42ff6ea705491a356df818e Author: Hannes Reinecke Date: Tue Apr 27 10:30:15 2021 +0200 scsi: core: Kill DRIVER_SENSE Replace the check for DRIVER_SENSE with a check for scsi_status_is_check_condition(). Audit all callsites to ensure the SAM status is set correctly. For backwards compability move the DRIVER_SENSE definition to sg.h, and update sg, bsg, and scsi_ioctl to set the DRIVER_SENSE driver_status whenever SAM_STAT_CHECK_CONDITION is present. [mkp: fix zeroday srp warning] Link: https://lore.kernel.org/r/20210427083046.31620-10-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen fix commit d0672a03e0af5dd4b07dc9175b38e44290722192 Author: Hannes Reinecke Date: Tue Apr 27 10:30:14 2021 +0200 scsi: core: Introduce scsi_status_is_check_condition() Add a helper function scsi_status_is_check_condition() to encapsulate the frequent checks for SAM_STAT_CHECK_CONDITION. Link: https://lore.kernel.org/r/20210427083046.31620-9-hare@suse.de Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit f2b1e9c6f867ec8f929e96ba4e4010e267587448 Author: Hannes Reinecke Date: Tue Apr 27 10:30:13 2021 +0200 scsi: core: Introduce scsi_build_sense() Introduce scsi_build_sense() as a wrapper around scsi_build_sense_buffer() to format the buffer and set the correct SCSI status. Link: https://lore.kernel.org/r/20210427083046.31620-8-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit ced202f7bd78eb6a79c441a8b217e0f3d38bccfc Author: Hannes Reinecke Date: Tue Apr 27 10:30:12 2021 +0200 scsi: core: Stop using DRIVER_ERROR Return the actual error code in __scsi_execute() (which, according to the documentation, should have happened anyway). And audit all callers to cope with negative return values from __scsi_execute() and friends. [mkp: resolve conflict and return bool] Link: https://lore.kernel.org/r/20210427083046.31620-7-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 7e26e3ea028740f934477ec01ba586ab033c35aa Author: Hannes Reinecke Date: Tue Apr 27 10:30:11 2021 +0200 scsi: scsi_dh_alua: Check for negative result value scsi_execute() will now return a negative error if there was an error prior to command submission; evaluate that instead if checking for DRIVER_ERROR. [mkp: build fix] Link: https://lore.kernel.org/r/20210427083046.31620-6-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 64aaa3dd096a1949ab216cdcc105a10059ab1244 Author: Hannes Reinecke Date: Tue Apr 27 10:30:10 2021 +0200 scsi: core: Reshuffle response handling in scsi_mode_sense() Reshuffle response handling in scsi_mode_sense() to make the code easier to follow. [mkp: fix build] Link: https://lore.kernel.org/r/20210427083046.31620-5-hare@suse.de Suggested-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 40d2fd05ecc2b63d1bd8f6686f09941afe85edfe Author: Bart Van Assche Date: Wed May 19 13:20:57 2021 -0700 scsi: ufs: Suppress false positive unhandled interrupt messages From ufshcd_transfer_req_compl(): Resetting interrupt aggregation counters first and reading the DOOR_BELL afterward allows us to handle all the completed requests. In order to prevent other interrupts starvation the DB is read once after reset. The down side of this solution is the possibility of false interrupt if device completes another request after resetting aggregation and before reading the DB. Prevent that ufshcd_intr() reports a false positive "Unhandled interrupt" message if the above scenario is triggered. Link: https://lore.kernel.org/r/20210519202058.12634-2-bvanassche@acm.org Cc: Stanley Chu Cc: Can Guo Cc: Bean Huo Cc: Jaegeuk Kim Cc: Asutosh Das Suggested-by: Jaegeuk Kim Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 8793613de913e03e7c884f4cc56e350bc716431e Author: Hannes Reinecke Date: Tue Apr 27 10:30:09 2021 +0200 scsi: core: Fixup calling convention for scsi_mode_sense() The description for scsi_mode_sense() claims to return the number of valid bytes on success, which is not what the code does. Additionally there is no gain in returning the SCSI status, as everything the callers do is to check against scsi_result_is_good(), which is what scsi_mode_sense() does already. So change the calling convention to return a standard error code on failure, and 0 on success, and adapt the description and all callers. Link: https://lore.kernel.org/r/20210427083046.31620-4-hare@suse.de Reviewed-by: Bart Van Assche Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit a0815c45c89f544861eae55d85ccee6b1b1451e8 Author: Suganath Prabu S Date: Tue May 18 10:46:25 2021 +0530 scsi: mpt3sas: Handle firmware faults during second half of IOC init If a firmware fault occurs while scanning the devices during IOC initialization then the driver issues the hard reset operation to recover the IOC. However, the driver is not issuing a Port enable request message as part of hard reset operation during IOC initialization. Due to this, the driver will not receive get any device discovery-related events and hence devices will not be accessible. Teach the driver to gracefully handle firmware faults while scanning for target devices during IOC initialization. Make the driver issue a port enable request message as part of hard reset operation. This permits receiving device discovery-related events from the firmware after the hard reset operation completes. Link: https://lore.kernel.org/r/20210518051625.1596742-4-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 21eccf304b3a16c26fc2878faca4665907a318ec Author: Hannes Reinecke Date: Tue Apr 27 10:30:08 2021 +0200 scsi: scsi_ioctl: Return error code when blk_rq_map_kern() fails The callers of sg_scsi_ioctl() already check for negative return values, so we can drop the usage of DRIVER_ERROR and return the error from blk_rq_map_kern() instead. Link: https://lore.kernel.org/r/20210427083046.31620-3-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 19a622c39a9d497d3c06ffe9068ee4c7bbd2bdcc Author: Suganath Prabu S Date: Tue May 18 10:46:24 2021 +0530 scsi: mpt3sas: Handle firmware faults during first half of IOC init During first half of IOC initialization (i.e. before going for device scanning), if any firmware fault occurs then driver is aborting the IOC initialization operation. Modify the driver to issue a diag reset operation to recover IOC from fault state and reinitialize the IOC. Link: https://lore.kernel.org/r/20210518051625.1596742-3-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 00da6a701a69b685ee7cac95b5c276e2d011dbca Author: Hannes Reinecke Date: Tue Apr 27 10:30:07 2021 +0200 scsi: st: Return error code in st_scsi_execute() The callers to st_scsi_execute() already check for negative return values, so we can drop the use of DRIVER_ERROR and return the actual error code. Link: https://lore.kernel.org/r/20210427083046.31620-2-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Acked-by: Kai Mäkisara Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit e2fac6c44ae06e58ac02181b048af31195883c31 Author: Suganath Prabu S Date: Tue May 18 10:46:23 2021 +0530 scsi: mpt3sas: Fix deadlock while cancelling the running firmware event Do not cancel current running firmware event work if the event type is different from MPT3SAS_REMOVE_UNRESPONDING_DEVICES. Otherwise a deadlock can be observed while cancelling the current firmware event work if a hard reset operation is called as part of processing the current event. Link: https://lore.kernel.org/r/20210518051625.1596742-2-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit d8ea59e7e3d166098e6ecb81f84e7f4c5760325c Author: Bartosz Dudziak Date: Sun May 2 14:20:25 2021 +0200 soc: qcom: smd-rpm: Add MSM8226 compatible Add a compatible for the RPM on the Qualcomm MSM8226 platform. Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210502122027.9351-3-bartosz.dudziak@snejp.pl Signed-off-by: Bjorn Andersson commit 193e507067a2fd669c2f78f5c12bd735d0f1ff2c Author: Bartosz Dudziak Date: Sun May 2 14:20:24 2021 +0200 dt-bindings: soc: qcom: smd-rpm: Add MSM8226 compatible Add the dt-binding for the rpm on the Qualcomm MSM8226 SoC platform. Acked-by: Rob Herring Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210502122027.9351-2-bartosz.dudziak@snejp.pl Signed-off-by: Bjorn Andersson commit 9d6e639cbaa1f27fedccb456dd2f70ecc39b5aca Author: Rajendra Nayak Date: Thu Apr 29 11:10:27 2021 +0530 arm64: dts: qcom: sc7280: Add "google,senor" to the compatible The sc7280 IDP board is also called senor in the Chrome OS builds. Add the "google,senor" compatible so coreboot/depthcharge knows what device tree blob to pick Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1619674827-26650-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 17bf8dfa2ac7a49e09e6d1a29bd3ac881e947386 Author: Rajendra Nayak Date: Thu Apr 29 11:10:26 2021 +0530 dt-bindings: arm: qcom: Document google,senor board Document the google,senor board based on sc7280 SoC Acked-by: Rob Herring Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1619674827-26650-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit c3bbe55c942d2a1abc9ec5d8d3a04de303cf75c9 Author: Sibi Sankar Date: Tue Apr 27 13:03:44 2021 +0530 arm64: dts: qcom: sc7280: Add nodes to boot WPSS Add miscellaneous nodes to boot the Wireless Processor Subsystem (WPSS) on SC7280 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1619508824-14413-6-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit a1dff44b354c0e2721aeae075a287d07daf1c76b Author: Sibi Sankar Date: Tue Apr 27 13:03:40 2021 +0530 dt-bindings: mailbox: Add WPSS client index to IPCC Add WPSS remote processor client index to Inter-Processor Communication Controller (IPCC) block. Acked-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1619508824-14413-2-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 0e8558476faf02ec51256cad9c487c93c346198c Author: Jack Wang Date: Mon May 31 14:28:35 2021 +0200 RDMA/rtrs: Avoid Wtautological-constant-out-of-range-compare drivers/infiniband/ulp/rtrs/rtrs-clt.c:1786:19: warning: result of comparison of constant 'MAX_SESS_QUEUE_DEPTH' (65536) with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] To fix it, limit MAX_SESS_QUEUE_DEPTH to u16 max, which is 65535, and drop the check in rtrs-clt, as it's the type u16 max. Link: https://lore.kernel.org/r/20210531122835.58329-1-jinpu.wang@ionos.com Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit d4282fb4f8f9683711ae6c076da16aa8e675fdbd Author: Sujit Kautkar Date: Fri May 14 11:34:34 2021 -0700 arm64: dts: qcom: sc7180: Move rmtfs memory region Move rmtfs memory region so that it does not overlap with system RAM (kernel data) when KAsan is enabled. This puts rmtfs right after mba_mem which is not supposed to increase beyond 0x94600000 Reviewed-by: Sibi Sankar Signed-off-by: Sujit Kautkar Link: https://lore.kernel.org/r/20210514113430.1.Ic2d032cd80424af229bb95e2c67dd4de1a70cb0c@changeid Signed-off-by: Bjorn Andersson commit 422a295221bba81301a87b002b02bb63444edabc Author: Taniya Das Date: Sat Apr 10 07:34:40 2021 +0530 arm64: dts: qcom: sc7280: Add clock controller nodes Add support for the video, gpu, display, lpass clock controller device nodes for SC7280 SoC. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1618020280-5470-3-git-send-email-tdas@codeaurora.org [bjorn: Dropped includes, as they are not present in v5.13-rc1] Signed-off-by: Bjorn Andersson commit 7dbd121a2c587cfbe0a4382e508447292b52cdb1 Author: Taniya Das Date: Sat Apr 10 07:34:39 2021 +0530 arm64: dts: qcom: sc7280: Add cpufreq hw node Add cpufreq HW device node to scale 4-Silver/3-Gold/1-Gold+ cores on SC7280 SoCs. Reviewed-by: Matthias Kaehlcke Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1618020280-5470-2-git-send-email-tdas@codeaurora.org [bjorn: Dropped reg-names] Signed-off-by: Bjorn Andersson commit 822c8f2a2f2c0dccf0cb7edfd9c1f4276c4f4b2a Author: Matthias Kaehlcke Date: Wed Apr 14 11:10:26 2021 -0700 arm64: dts: qcom: sc7180: coachz: Add thermal config for skin temperature Add ADC and thermal monitor configuration for skin temperature, plus a thermal zone that monitors the skin temperature and uses the big cores as cooling devices. CoachZ rev1 is stuffed with an incompatible thermistor for the skin temperature, disable the thermal zone for rev1 to avoid the use of bogus temperature values. Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210414111007.v1.1.I1a438604a79025307f177347d45815987b105cb5@changeid Signed-off-by: Bjorn Andersson commit c1124180eb9883891ad2acef89c9d17d6190eab4 Author: Douglas Anderson Date: Mon Mar 15 10:38:54 2021 -0700 arm64: dts: qcom: sc7180: Fix sc7180-qmp-usb3-dp-phy reg sizes As per Dmitry Baryshkov [1]: a) The 2nd "reg" should be 0x3c because "Offset 0x38 is USB3_DP_COM_REVISION_ID3 (not used by the current driver though)." b) The 3rd "reg" "is a serdes region and qmp_v3_dp_serdes_tbl contains registers 0x148 and 0x154." I think because the 3rd "reg" is a serdes region we should just use the same size as the 1st "reg"? [1] https://lore.kernel.org/r/ee5695bb-a603-0dd5-7a7f-695e919b1af1@linaro.org Reviewed-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Cc: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Rob Clark Fixes: 58fd7ae621e7 ("arm64: dts: qcom: sc7180: Update dts for DP phy inside QMP phy") Reported-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210315103836.1.I9a97120319d43b42353aeac4d348624d60687df7@changeid Signed-off-by: Bjorn Andersson commit dc5d91250ae6b810bc8d599d8d6590a06a4ce84a Author: Jonathan Marek Date: Mon Mar 29 15:00:51 2021 +0300 arm64: dts: qcom: sm8250: fix display nodes Use sm8250 compatibles instead of sdm845 compatibles Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Marek Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210329120051.3401567-5-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit c0dcfe6a784fdf7fcc0fdc74bfbb06e9f77de964 Author: Stephen Boyd Date: Wed Mar 24 16:14:24 2021 -0700 arm64: dts: qcom: c630: Add no-hpd to DSI bridge node We should indicate that we're not using the HPD pin on this device, per the binding document. Otherwise if code in the future wants to enable HPD in the bridge when this property is absent we'll be enabling HPD when it isn't supposed to be used. Presumably this board isn't using hpd on the bridge. Reviewed-by: Douglas Anderson Cc: Laurent Pinchart Cc: Douglas Anderson Cc: Steev Klimaszewski Fixes: 956e9c85f47b ("arm64: dts: qcom: c630: Define eDP bridge and panel") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210324231424.2890039-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit eb9b7bfd5954f5f6ac4d57313541dd0294660aad Author: Serge Semin Date: Wed Mar 24 23:48:36 2021 +0300 arm64: dts: qcom: 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: Bjorn Andersson Link: https://lore.kernel.org/r/20210324204836.29668-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Bjorn Andersson commit 5f551b5ce55575b14c26933fe9b49365ea246b3d Author: Stephen Boyd Date: Tue Mar 23 19:55:34 2021 -0700 arm64: dts: qcom: trogdor: Add no-hpd to DSI bridge node We should indicate that we're not using the HPD pin on this device, per the binding document. Otherwise if code in the future wants to enable HPD in the bridge when this property is absent we'll be wasting power powering hpd when we don't use it on trogdor boards. We didn't notice this before because the kernel driver blindly disables hpd, but that won't be true for much longer. Reviewed-by: Laurent Pinchart Reviewed-by: Douglas Anderson Cc: Laurent Pinchart Cc: Douglas Anderson Fixes: 7ec3e67307f8 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210324025534.1837405-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit f890f89d9a80fffbfa7ca791b78927e5b8aba869 Author: Petr Vorel Date: Thu Apr 15 21:39:13 2021 +0200 arm64: dts: qcom: msm8994-angler: Fix gpio-reserved-ranges 85-88 Reserve GPIO pins 85-88 as these aren't meant to be accessible from the application CPUs (causes reboot). Yet another fix similar to 9134586715e3, 5f8d3ab136d0, which is needed to allow angler to boot after 3edfb7bd76bd ("gpiolib: Show correct direction from the beginning"). Fixes: feeaf56ac78d ("arm64: dts: msm8994 SoC and Huawei Angler (Nexus 6P) support") Signed-off-by: Petr Vorel Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210415193913.1836153-1-petr.vorel@gmail.com Signed-off-by: Bjorn Andersson commit 0a275a35ceab07cb622ff212c54d6866e246ac53 Author: Konrad Dybcio Date: Thu May 27 21:29:58 2021 +0200 arm64: dts: qcom: msm8996: Make CPUCC actually probe (and work) Fix the compatible to make the driver probe and tell the driver where to look for the "xo" clock to make sure everything works. Then we get a happy (eh, happier) 8996: somainline-sdcard:/home/konrad# cat /sys/kernel/debug/clk/pwrcl_pll/clk_rate 1152000000 Don't backport without "arm64: dts: qcom: msm8996: Add CPU opps", as the system fails to boot without consumers for these clocks. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210527192958.775434-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 90173a954a22414b39b566790131c7b8a969d8f8 Author: Loic Poulain Date: Thu May 27 21:44:55 2021 +0200 arm64: dts: qcom: msm8996: Add CPU opps Add the operating points capabilities of the kryo CPUs, that can be used for frequency scaling. There are two differents operating point tables, one for the big cluster and one for the LITTLE cluster. This frequency scaling support can then be used as a passive cooling device (cpufreq cooling device). Only add nominal fmax for now, since there is no dynamic control of VDD APC (s11..) which is statically set at its nominal value. Original patch link: https://patchwork.kernel.org/project/linux-arm-msm/patch/1595253740-29466-6-git-send-email-loic.poulain@linaro.org/ Signed-off-by: Loic Poulain [konrad: drop the thermals part, rebase and remove spaces within <>] Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210527194455.782108-2-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit b502efda6480d7577f9f822fd450d6bc3a4ac2e6 Author: Matthias Kaehlcke Date: Mon Mar 22 09:46:35 2021 -0700 arm64: dts: qcom: sc7180: Add CoachZ rev3 CoachZ rev3 uses a 100k NTC thermistor for the charger temperatures, instead of the 47k NTC that is stuffed in earlier revisions. Add .dts files for rev3. The 47k NTC currently isn't supported by the PM6150 ADC driver. Disable the charger thermal zone for rev1 and rev2 to avoid the use of bogus temperature values. This also gets rid of the explicit DT files for rev2 and handles rev2 in the rev1 .dts instead. There was some back and forth downstream involving the 'dmic_clk_en' pin, after that was sorted out the DT for rev1 and rev2 is the same. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210322094628.v4.3.I95b8a63103b77cab6a7cf9c150f0541db57fda98@changeid Signed-off-by: Bjorn Andersson commit ad6fc14313387d3cddf75d7ff9ae668849006e09 Author: Matthias Kaehlcke Date: Mon Mar 22 09:46:34 2021 -0700 arm64: dts: qcom: sc7180: Add pompom rev3 The only kernel visible change with respect to rev2 is that pompom rev3 changed the charger thermistor from a 47k to a 100k NTC to use a thermistor which is supported by the PM6150 ADC driver. Disable the charger thermal zone for pompom rev1 and rev2 to avoid the use of bogus temperature values from the unsupported thermistor. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210322094628.v4.2.I4138c3edee23d1efa637eef51e841d9d2e266659@changeid Signed-off-by: Bjorn Andersson commit 39441f73d91a1fd7e5594b34ac2999f31a9da246 Author: Matthias Kaehlcke Date: Mon Mar 22 09:46:33 2021 -0700 arm64: dts: qcom: sc7180: lazor: Simplify disabling of charger thermal zone Commit f73558cc83d1 ("arm64: dts: qcom: sc7180: Disable charger thermal zone for lazor") disables the charger thermal zone for specific lazor revisions due to an unsupported thermistor type. The initial idea was to disable the thermal zone for older revisions and leave it enabled for newer ones that use a supported thermistor. Finally the thermistor won't be changed on newer revisions, hence the thermal zone should be disabled for all lazor (and limozeen) revisions. Instead of disabling it per revision do it once in the shared .dtsi for lazor. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210322094628.v4.1.I6d587e7ae72a5a47253bb95dfdc3158f8cc8a157@changeid Signed-off-by: Bjorn Andersson commit caaf1f38d9a7d1abbb52743b76f63a79d4fee27a Author: Roja Rani Yarubandi Date: Wed Mar 24 15:48:36 2021 +0530 arm64: dts: qcom: sc7180: Remove QUP-CORE ICC path We had introduced the QUP-CORE ICC path to put proxy votes from QUP wrapper on behalf of earlycon, if other users of QUP-CORE turn off this clock before the real console is probed, unclocked access to HW was seen from earlycon. With ICC sync state support proxy votes are no longer need as ICC will ensure that the default bootloader votes are not removed until all it's consumer are probed. We can safely remove ICC path for QUP-CORE clock from QUP wrapper device. Signed-off-by: Roja Rani Yarubandi Signed-off-by: Akash Asthana Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210324101836.25272-3-rojay@codeaurora.org Signed-off-by: Bjorn Andersson commit 1dee9e3b0997fef7170f7ea2d8eab47d0cd334d8 Author: Vinod Koul Date: Thu May 13 11:37:33 2021 +0530 arm64: dts: qcom: sm8350: fix the node unit addresses Some node unit addresses were put wrongly in the dts, resulting in below warning when run with W=1 arch/arm64/boot/dts/qcom/sm8350.dtsi:693.34-702.5: Warning (simple_bus_reg): /soc@0/thermal-sensor@c222000: simple-bus unit address format error, expected "c263000" arch/arm64/boot/dts/qcom/sm8350.dtsi:704.34-713.5: Warning (simple_bus_reg): /soc@0/thermal-sensor@c223000: simple-bus unit address format error, expected "c265000" arch/arm64/boot/dts/qcom/sm8350.dtsi:1180.32-1185.5: Warning (simple_bus_reg): /soc@0/interconnect@90e0000: simple-bus unit address format error, expected "90c0000" Fix by correcting to the correct address as given in reg node Reviewed-by: Robert Foss Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210513060733.382420-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 84c856d07d80a3141bad136bb4927746d3cc418a Author: Vinod Koul Date: Thu May 13 11:37:05 2021 +0530 arm64: dts: qcom: sm8350: use interconnect enums Add interconnect enums instead of numbers now that interconnect is in mainline. Reviewed-by: Bhupesh Sharma Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210513060705.382184-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 0500629017380d4e2c1cdfd15bae411cd2a63c06 Author: Felipe Balbi Date: Sat Apr 17 09:19:51 2021 +0300 arm64: dts: qcom: sm8150: Add DMA nodes With this patch, DMA has a chance of probing and doing something useful. Reviewed-by: Konrad Dybcio Reviewed-by: Vinod Koul Signed-off-by: Felipe Balbi Link: https://lore.kernel.org/r/20210417061951.2105530-3-balbi@kernel.org Signed-off-by: Bjorn Andersson commit 15c5a08c8427ded579427908ee32ab946cb51f46 Author: Vincent Knecht Date: Fri May 28 13:43:45 2021 +0200 arm64: dts: qcom: msm8916-alcatel-idol347: enable touchscreen Enable the MStar msg2638 touchscreen. Reviewed-by: Stephan Gerhold Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20210528114345.543761-1-vincent.knecht@mailoo.org Signed-off-by: Bjorn Andersson commit af260f1f7dbd336250685fa67b5d0ebe816e0907 Author: Loic Poulain Date: Thu May 27 21:44:54 2021 +0200 arm64: dts: qcom: msm8996: Rename speedbin node The speedbin value blown in the efuse is used to determine is used to determine the voltage and frequency value for different IPs, including GPU, CPUs... So it's really not a gpu specific information. This patch simply renames 'gpu_speed_bin' node to 'speedbin'. Signed-off-by: Loic Poulain Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210527194455.782108-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 58b2785dda93bba47201334c6a4f95712690bda8 Author: Robert Marko Date: Wed May 26 17:01:25 2021 +0200 arm64: dts: qcom: ipq8074: disable USB phy by default One of the QUSB USB PHY-s has been left enabled by default, this is probably just a mistake as other USB PHY-s are disabled by default. It makes no sense to have it enabled by default as not all board implement USB ports, so disable it. Reviewed-by: Kathiravan T Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210526150125.1816335-1-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit 2e290c8d8d29278b9a20e2765ab8f6df02f2e707 Author: Simon Ser Date: Tue May 18 13:11:31 2021 +0200 drm: document minimum kernel version for DRM_CLIENT_CAP_* The kernel versions including the following commits are referenced: DRM_CLIENT_CAP_STEREO_3D 61d8e3282541 ("drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl") DRM_CLIENT_CAP_UNIVERSAL_PLANES 681e7ec73044 ("drm: Allow userspace to ask for universal plane list (v2)") c7dbc6c9ae5c ("drm: Remove command line guard for universal planes") DRM_CLIENT_CAP_ATOMIC 88a48e297b3a ("drm: add atomic properties") 8b72ce158cf0 ("drm: Always enable atomic API") DRM_CLIENT_CAP_ASPECT_RATIO 7595bda2fb43 ("drm: Add DRM client cap for aspect-ratio") DRM_CLIENT_CAP_WRITEBACK_CONNECTORS d67b6a206507 ("drm: writeback: Add client capability for exposing writeback connectors") Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Acked-by: Daniel Stone Acked-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/434202/ commit bbf4627ba6415711da94f8106a7de993c49372a6 Author: Simon Ser Date: Tue May 18 11:56:54 2021 +0200 drm: clarify and linkify DRM_CLIENT_CAP_WRITEBACK_CONNECTORS docs Make it clear that the client is responsible for enabling ATOMIC prior to enabling WRITEBACK_CONNECTORS. Linkify the reference to ATOMIC. Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Acked-by: Daniel Stone Acked-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/434200/ commit 88938bf343efbc4d31677a91a0ed1d189be1e7cb Author: Simon Ser Date: Tue May 18 11:51:18 2021 +0200 drm: reference mode flags in DRM_CLIENT_CAP_* docs In the docs for DRM_CLIENT_CAP_STEREO_3D and DRM_CLIENT_CAP_ASPECT_RATIO, reference the DRM_MODE_FLAG_* defines that get set when the cap is enabled. Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Acked-by: Daniel Stone Acked-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/434201/ commit 2011fc7a8b5b7415d7cd885fc84ada88d37569d3 Author: Jonathan McDowell Date: Thu May 20 18:30:16 2021 +0100 ARM: dts: qcom: Enable NAND + USB for RB3011 Enable the NAND + USB devices for the MikroTik RB3011 platform now they're in the main IPQ806x DT. Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/1e5c89ba0d2491ca374f10e0446e21d0e42afd34.1621531633.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit 40cf5c884a965554a424797afb424ffbca4c24b3 Author: Jonathan McDowell Date: Thu May 20 18:30:08 2021 +0100 ARM: dts: qcom: add L2CC and RPM for IPQ8064 This adds the L2CC IPC resource and RPM devices to the IPQ8064 device tree. Tested on a Mikrotik RB3011. Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/a99eb2a27214b8f41070d7f1faec591e35666b21.1621531633.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit cf18f424ad7b976af7ae98a52cde668990bbd73d Author: Jonathan McDowell Date: Thu May 20 18:30:00 2021 +0100 ARM: dts: qcom: Add USB port definitions to ipq806x Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/ad2121defc539abdb339b23eef80a8930b5f086e.1621531633.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit 8e3ce01b542b02619b98536889b74600047587b5 Author: Jonathan McDowell Date: Thu May 20 18:29:52 2021 +0100 ARM: dts: qcom: Add tsens details to ipq806x Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/f7ebf47ca9e7e973e696e6b9b4fff3a2ac5da40d.1621531633.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit a927e48338c7513a1688d646a292d8a2718a0a88 Author: Jonathan McDowell Date: Thu May 20 18:29:39 2021 +0100 ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Now the ADM driver is in mainline add the appropriate definitions for it and the NAND controller to get NAND working on IPQ806x platforms, Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/17f88a26860f5976ad08dd3c12ea079ba474b6fd.1621531633.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit 135adbbee4c66f89b57519633cbf8c3c35b6c4da Author: Timon Baetz Date: Sun May 30 10:55:44 2021 +0000 ARM: dts: exynos: Disable unused camera input for I9100 As the back camera is not implemented disable the second pair of fimc child nodes as they are not functional. This prevents creating the associated /dev/videoX devices. Signed-off-by: Timon Baetz Link: https://lore.kernel.org/r/20210530105535.4165-1-timon.baetz@protonmail.com Signed-off-by: Krzysztof Kozlowski commit e353049e12c1eb933b143771b62617a0dabfc7d8 Author: Vinod Koul Date: Mon May 10 12:37:25 2021 +0530 arm64: defconfig: qcom: enable interconnect for SM8350 Enable the interconnect for SM8350 as a module Reviewed-by: Bhupesh Sharma Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210510070725.3839459-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 1cebcf9932ab76102e8cfc555879574693ba8956 Author: Marek Vasut Date: Fri Apr 9 01:00:01 2021 +0200 ARM: dts: stm32: Rework LAN8710Ai PHY reset on DHCOM SoM The Microchip LAN8710Ai PHY requires XTAL1/CLKIN external clock to be enabled when the nRST is toggled according to datasheet Microchip LAN8710A/LAN8710Ai DS00002164B page 35 section 3.8.5.1 Hardware Reset: " A Hardware reset is asserted by driving the nRST input pin low. When driven, nRST should be held low for the minimum time detailed in Section 5.5.3, "Power-On nRST & Configuration Strap Timing," on page 59 to ensure a proper transceiver reset. During a Hardware reset, an external clock must be supplied to the XTAL1/CLKIN signal. " This is accidentally fulfilled in the current setup, where ETHCK_K is used to supply both PHY XTAL1/CLKIN and is also fed back through eth_clk_fb to supply ETHRX clock of the DWMAC. Hence, the DWMAC enables ETHRX clock, that has ETHCK_K as parent, so ETHCK_K clock are also enabled, and then the PHY reset toggles. However, this is not always the case, e.g. in case the PHY XTAL1/CLKIN clock are supplied by some other clock source than ETHCK_K or in case ETHRX clock are not supplied by ETHCK_K. In the later case, ETHCK_K would be kept disabled, while ETHRX clock would be enabled, so the PHY would not be receiving XTAL1/CLKIN clock and the reset would fail. Improve the DT by adding the PHY clock phandle into the PHY node, which then also requires moving the PHY reset GPIO specifier in the same place and that then also requires correct PHY reset GPIO timing, so add that too. A brief note regarding the timing, the datasheet says the reset should stay asserted for at least 100uS and software should wait at least 200nS after deassertion. Set both delays to 500uS which should be plenty. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 245a057fee18be08d6ac12357463579d06bea077 Author: Will Deacon Date: Mon May 24 23:18:18 2021 +0100 timer_list: Print name of per-cpu wakeup device With the introduction of per-cpu wakeup devices that can be used in preference to the broadcast timer, print the name of such devices when they are available. Signed-off-by: Will Deacon Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210524221818.15850-6-will@kernel.org commit ea5c7f1b9aa1a7c9d1bb9440084ac1256789fadb Author: Will Deacon Date: Mon May 24 23:18:17 2021 +0100 tick/broadcast: Program wakeup timer when entering idle if required When configuring the broadcast timer on entry to and exit from deep idle states, prefer a per-CPU wakeup timer if one exists. On entry to idle, stop the tick device and transfer the next event into the oneshot wakeup device, which will serve as the wakeup from idle. To avoid the overhead of additional hardware accesses on exit from idle, leave the timer armed and treat the inevitable interrupt as a (possibly spurious) tick event. Signed-off-by: Will Deacon Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210524221818.15850-5-will@kernel.org commit c94a8537df12708cc03da9120c3c3561ae744ce1 Author: Will Deacon Date: Mon May 24 23:18:16 2021 +0100 tick/broadcast: Prefer per-cpu oneshot wakeup timers to broadcast Some SoCs have two per-cpu timer implementations where the timer with the higher rating stops in deep idle (i.e. suffers from CLOCK_EVT_FEAT_C3STOP) but is otherwise preferable to the timer with the lower rating. In such a design, selecting the higher rated devices relies on a global broadcast timer and IPIs to wake up from deep idle states. To avoid the reliance on a global broadcast timer and also to reduce the overhead associated with the IPI wakeups, extend tick_install_broadcast_device() to manage per-cpu wakeup timers separately from the broadcast device. For now, these timers remain unused. Signed-off-by: Will Deacon Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210524221818.15850-4-will@kernel.org commit e5007c288e7981e0b0cf8ea3dea443f0b8c34345 Author: Will Deacon Date: Mon May 24 23:18:15 2021 +0100 tick/broadcast: Split __tick_broadcast_oneshot_control() into a helper In preparation for adding support for per-cpu wakeup timers, split _tick_broadcast_oneshot_control() into a helper function which deals only with the broadcast timer management across idle transitions. Signed-off-by: Will Deacon Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210524221818.15850-3-will@kernel.org commit c2d4fee3f6d170dee5ee7c337a0ba5e92fad7a64 Author: Will Deacon Date: Mon May 24 23:18:14 2021 +0100 tick/broadcast: Drop unneeded CONFIG_GENERIC_CLOCKEVENTS_BROADCAST guard tick-broadcast.o is only built if CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y so remove the redundant #ifdef guards around the definition of tick_receive_broadcast(). Signed-off-by: Will Deacon Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210524221818.15850-2-will@kernel.org commit 1fa98d96ea0ff6c8770eeba90417aab4b4e07f52 Author: YueHaibing Date: Sun May 23 14:58:25 2021 +0800 clockevents: Use DEVICE_ATTR_[RO|WO] macros Use the DEVICE_ATTR_[RO|WO] helpers instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210523065825.19684-1-yuehaibing@huawei.com commit 1e36f828c4230ce5c4e10d733480e6c7aab05841 Merge: 5ada57a9a6b0b 238ebd8b487b7 Author: Kalle Valo Date: Mon May 31 17:29:39 2021 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.14. Major changes: ath9k * provide STBC info in the received frames commit f674555ee5444c8987dfea0922f1cf6bf0c12847 Author: Yu Kuai Date: Mon May 31 21:56:22 2021 +0800 drm: bridge: cdns-mhdp8546: Fix PM reference leak in pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210531135622.3348252-1-yukuai3@huawei.com commit c4a41429951890d0bf7c1ef49b1fa1c8dfb1a034 Author: Dmitry Osipenko Date: Sun May 16 19:30:41 2021 +0300 dt-bindings: clock: tegra: Convert to schema Convert NVIDIA Tegra clock bindings to schema. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 4782c0a5dd88e3797426e08c5c437e95a3156631 Author: Dmitry Osipenko Date: Sun May 16 19:30:40 2021 +0300 clk: tegra: Don't deassert reset on enabling clocks The Tegra clock driver contains legacy code which deasserts hardware reset when peripheral clocks are enabled. This behaviour comes from a pre-CCF era of the Tegra drivers. This is unacceptable for modern kernel drivers which use generic CCF and reset-control APIs because it breaks assumptions of the drivers about clk/reset sequences and about reset-propagation delays. Hence remove the awkward legacy behaviour from the clk driver. In particular PMC driver assumes that hardware blocks remains in reset while power domain is turning on, but the clk driver deasserts the reset before power clamp is removed, hence breaking the driver's assumption. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5d0f1c8ab10aee9934a418ddd7ec977b01ab2370 Author: Dmitry Osipenko Date: Sun May 16 19:30:39 2021 +0300 clk: tegra: Mark external clocks as not having reset control The external clocks don't have reset bits as they don't belong to any specific hardware unit. Mark them as not having reset control for consistency. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 344d5df34f5abd468267daa98f041abf90b2f660 Author: Dmitry Osipenko Date: Sun May 16 19:30:38 2021 +0300 clk: tegra: cclk: Handle thermal DIV2 CPU frequency throttling Check whether thermal DIV2 throttle is active in order to report the CPU frequency properly. This very useful for userspace tools like cpufreq-info which show actual frequency asserted from hardware. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 78086386b3d1e363e2152066f48efcbdbb158d0f Author: Dmitry Osipenko Date: Sun May 16 19:30:37 2021 +0300 clk: tegra: Don't allow zero clock rate for PLLs Zero clock rate doesn't make sense for PLLs and tegra-clk driver enters into infinite loop on trying to calculate PLL parameters for zero rate. Make code to error out if requested rate is zero. Originally this trouble was found by Robert Yang while he was trying to bring up upstream kernel on Samsung Galaxy Tab, which happened due to a bug in Tegra DRM driver that erroneously sets PLL rate to zero. This issues came over again recently during of kernel bring up on ASUS TF700T. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 18a6a7150a894383e89152a820bd71d664628abd Author: Dmitry Osipenko Date: Sun May 16 19:30:36 2021 +0300 clk: tegra: Halve SCLK rate on Tegra20 Higher SCLK rates on Tegra20 require high core voltage. The higher clock rate may have a positive performance effect only for AHB DMA transfers and AVP CPU, but both aren't used by upstream kernel at all. Halve SCLK rate on Tegra20 in order to remove the high core voltage requirement. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit a7196048cd5168096c2c4f44a3939d7a6dcd06b9 Author: Dmitry Osipenko Date: Sun May 16 19:30:35 2021 +0300 clk: tegra: Ensure that PLLU configuration is applied properly The PLLU (USB) consists of the PLL configuration itself and configuration of the PLLU outputs. The PLLU programming is inconsistent on T30 vs T114, where T114 immediately bails out if PLLU is enabled and T30 re-enables a potentially already enabled PLL (left after bootloader) and then fully reprograms it, which could be unsafe to do. The correct way should be to skip enabling of the PLL if it's already enabled and then apply configuration to the outputs. This patch doesn't fix any known problems, it's a minor improvement. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c592c8a28f5821e880ac6675781cd8a151b0737c Author: Dmitry Osipenko Date: Sun May 16 19:30:34 2021 +0300 clk: tegra: Fix refcounting of gate clocks The refcounting of the gate clocks has a bug causing the enable_refcnt to underflow when unused clocks are disabled. This happens because clk provider erroneously bumps the refcount if clock is enabled at a boot time, which it shouldn't be doing, and it does this only for the gate clocks, while peripheral clocks are using the same gate ops and the peripheral clocks are missing the initial bump. Hence the refcount of the peripheral clocks is 0 when unused clocks are disabled and then the counter is decremented further by the gate ops, causing the integer underflow. Fix this problem by removing the erroneous bump and by implementing the disable_unused() callback, which disables the unused gates properly. The visible effect of the bug is such that the unused clocks are never gated if a loaded kernel module grabs the unused clocks and starts to use them. In practice this shouldn't cause any real problems for the drivers and boards supported by the kernel today. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 56bb7c28ad00e7bcfc851c4e183c42d148d3ad4e Author: Dmitry Osipenko Date: Sun May 16 19:30:33 2021 +0300 clk: tegra30: Use 300MHz for video decoder by default The 600MHz is a too high clock rate for some SoC versions for the video decoder hardware and this may cause stability issues. Use 300MHz for the video decoder by default, which is supported by all hardware versions. Fixes: ed1a2459e20c ("clk: tegra: Add Tegra20/30 EMC clock implementation") Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ecc583e22d4689e38a528a8bf841ba1ce58edd7b Author: Thierry Reding Date: Thu May 27 20:27:21 2021 +0200 drm/tegra: hub: Implement basic scaling support Parameterize code in several places to allow scaling of windows. Note that this currently still relies on static programming of the various metering and memory pool allocation registers. This seems to work for the common cases, but may eventually need to be updated to support use-cases with multiple windows and higher bandwidth and latency requirements. Signed-off-by: Thierry Reding commit e16efff4e5f490ce34a8c60d9ae7297dca5eb616 Author: Thierry Reding Date: Thu May 27 20:15:46 2021 +0200 drm/tegra: hub: Fix YUV support The driver currently exposes several YUV formats but fails to properly program all the registers needed to display such formats. Add the right programming sequences so that overlay windows can be used to accelerate color format conversions in multimedia playback use-cases. Signed-off-by: Thierry Reding commit 695efefb2e31cade92864d736596d3fbcd563b60 Author: Guo Ren Date: Sun May 30 04:53:28 2021 +0000 microblaze: Cleanup unused functions These functions haven't been used, so just remove them. The patch just uses grep to verify. Signed-off-by: Guo Ren Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig Reviewed-by: Palmer Dabbelt Cc: Arnd Bergmann Cc: Michal Simek Link: https://lore.kernel.org/r/1622350408-44875-3-git-send-email-guoren@kernel.org Signed-off-by: Michal Simek commit c58e7ed28b4534ed073371843d03c433d6a9fe34 Author: Krzysztof Kozlowski Date: Wed May 26 12:22:51 2021 -0400 PM: runtime: document common mistake with pm_runtime_get_sync() pm_runtime_get_sync(), contradictory to intuition, does not drop the runtime PM usage counter on errors which lead to several wrong usages in drivers (missing the put). pm_runtime_resume_and_get() was added as a better implementation so document the preference of using it, hoping it will stop bad patterns. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski [ rjw: Documentation change edits ] Signed-off-by: Rafael J. Wysocki commit 6381195ad7d06ef979528c7452f3ff93659f86b1 Author: Rafael J. Wysocki Date: Mon May 24 17:26:16 2021 +0200 ACPI: power: Rework turning off unused power resources Make turning off unused power resources (after the enumeration of devices and during system-wide resume from S3) more straightforward by using the observation that the power resource state stored in struct acpi_power_resource can be used to determine whether or not the give power resource has any users. Namely, when the state of the power resource is unknown, its _STA method has never been evaluated (or the evaluation of it has failed) and its _ON and _OFF methods have never been executed (or they have failed to execute), so for all practical purposes it can be assumed to have no users (or to be unusable). Therefore, instead of checking the number of power resource users, it is sufficient to check if its state is known. Moreover, if the last known state of a given power resource is "off", it is not necessary to turn it off, because it has been used to initialize the power state or the wakeup power resources list of at least one device and either its _STA method has returned 0 ("off"), or its _OFF method has been successfully executed already. Accordingly, modify acpi_turn_off_unused_power_resources() to do the above checks (which are suitable for both uses of it) instead of using the number of power resource users or evaluating its _STA method, drop its argument (which is not useful any more) and update its callers. Also drop the users field from struct acpi_power_resource as it is not useful any more. Tested-by: Dave Olsthoorn Tested-by: Shujun Wang Signed-off-by: Rafael J. Wysocki commit ca84f18798a457e9a92c52882813901e15a3b38b Author: Rafael J. Wysocki Date: Mon May 24 17:25:23 2021 +0200 ACPI: power: Save the last known state of each power resource Currently, there are two ways to check the state of an ACPI power resource and they may not be consistent with each other. The first one is to evaluate the power resource's _STA object and the other one is to check its reference counter value. However, on some systems the value returned by _STA may not be consistent with the value of the power resource's reference counter (for example, on some systems it returns the same value every time for certain power resources). Moreover, evaluating _STA is unnecessary overhead for a power resource for which it has been evaluated already or whose state is otherwise known, because either the _ON or the _OFF method has been executed for it. For this reason, save the state of each power resource in its struct acpi_power_resource object and use the saved value whenever its state needs to be checked, except when its stats is unknown, in which case the _STA method is evaluated for it and the value returned by that method is saved as the last known state of the power resource. Moreover, drop the power resource _STA method evaluation from acpi_add_power_resource(), so as to avoid doing that unnecessarily for power resources that will never be used. Tested-by: Dave Olsthoorn Tested-by: Shujun Wang Signed-off-by: Rafael J. Wysocki commit 587024b8210d4eeeab457323141c92e134cd3dbf Author: Rafael J. Wysocki Date: Mon May 24 17:24:16 2021 +0200 ACPI: power: Use u8 as the power resource state data type Use u8 as the data type for representing the state of an ACPI power resource. It is s not necessary to use int for that and because subsequent changes are going to use ACPI_POWER_RESOURCE_STATE_UNKNOWN, it is better to adjust the data type so that the "unknown" state is represented by the "all ones" value. While at it, clean up acpi_power_get_state() somewhat. No intentional functional impact. Tested-by: Dave Olsthoorn Tested-by: Shujun Wang Signed-off-by: Rafael J. Wysocki commit 3caf88871c6ad0bf7c5fca8a6f7fcada1891a891 Author: Mika Westerberg Date: Thu Jan 14 16:41:31 2021 +0200 thunderbolt: Align USB4 router wakes configuration with the CM guide The USB4 Configuration Manager guide suggests that the USB4 port wakes are configured in a certain way, like that when the port is configured the wake-on-connect should not be set and so forth, so align the driver with this. Signed-off-by: Mika Westerberg commit 6026b703e8f61bf9c395bb286fa3b46956ce0496 Author: Mika Westerberg Date: Thu Jan 14 16:44:17 2021 +0200 thunderbolt: Add wake from DisplayPort Latest USB4 spec added a new wake bit for DisplayPort so add this to the driver when runtime suspending. This way wake up the domain when a new monitor is plugged in to any of the device routers. Also do the same for pre-USB4 devices through the link controller registers as documented in chapter 13 of the USB4 spec. Signed-off-by: Mika Westerberg commit 68977e61ab9e3fbb8ebbb1c7e8c772762d232f7c Author: Mika Westerberg Date: Mon Apr 12 14:12:47 2021 +0300 Documentation / thunderbolt: Clean up entries Align the "What" entries along with the rest and move nvm_authenticate_on_disconnect to correct place. Signed-off-by: Mika Westerberg commit 34163dfad412947c1a413324d0293f1da219231f Author: Mika Westerberg Date: Thu Apr 1 16:57:06 2021 +0300 thunderbolt: Use generic tb_nvm_[read|write]_data() for Thunderbolt 2/3 devices Now that we have generic functionality available in nvm.c make the DMA port code call it instead of duplicating the functionality. Signed-off-by: Mika Westerberg commit 9b383037770fcd6b03dd3793c89055b8490957e0 Author: Mika Westerberg Date: Thu Apr 1 16:54:15 2021 +0300 thunderbolt: Split NVM read/write generic functions out from usb4.c We do this for Thunderbolt 2/3 devices through DMA port, USB4 devices and retimers pretty much the same way. Only the actual block read/write is different. For this reason split out the NVM read/write functions from usb4.c to nvm.c and make USB4 device code call these when needed. Signed-off-by: Mika Westerberg commit fe6f6f95919ccdc8a3e2c5dae9b1740583e16523 Author: Crag Wang Date: Thu May 27 16:45:03 2021 +0800 thunderbolt: Add self-authenticate support for new dock Add new device known to support self-authenticate on disconnect. Signed-off-by: Crag Wang Reviewed-by: Mario Limonciello Signed-off-by: Mika Westerberg commit ef9e57cda5fb290258a060e4f3e712148bc5b421 Author: Linus Walleij Date: Sat May 29 02:27:59 2021 +0200 drm/bridge: lt8912b: Drop unused includes The Lontium bridge is including legacy header files for GPIO but not using them. Delete the includes. Cc: Adrien Grassein Cc: Robert Foss Signed-off-by: Linus Walleij Reviewed-by: Adren Grassein Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210529002759.468964-1-linus.walleij@linaro.org commit 1ec9d2e7936c677a177916dab4b2bf26afbe2bed Author: Shaokun Zhang Date: Thu May 27 19:24:58 2021 +0800 soundwire: cadence: remove the repeated declaration Function 'cdns_reset_page_addr' is declared twice, so remove the repeated declaration. Cc: Vinod Koul Cc: Bard Liao Cc: Pierre-Louis Bossart Cc: Sanyog Kale Signed-off-by: Shaokun Zhang Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1622114698-7943-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Vinod Koul commit b44bf9410a6921a232679124ca48daa2a8a15303 Author: Geert Uytterhoeven Date: Mon May 10 11:53:02 2021 +0200 m68k: defconfig: Update defconfigs for v5.13-rc1 - Drop CONFIG_NF_LOG_NETDEV=m (removed in commit 1510618e45cb9fb7 ("netfilter: nf_log_netdev: merge with nf_log_syslog")), - Enable modular build of IPv4 packet logging (no longer auto-enabled since commit db3187ae21bb0cff ("netfilter: nf_log_ipv4: rename to nf_log_syslog")), - Drop CONFIG_NF_LOG_BRIDGE=m (removed in commit 77ccee96a67422ac ("netfilter: nf_log_bridge: merge with nf_log_syslog")), - Enable modular build of ECDSA crypto algorithm, - Enable modular build of 64bit/32bit division and modulo test. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210510095302.4125561-1-geert@linux-m68k.org commit 9a51ebd7e5b6b8aa826d3c24f2077adf3b5df129 Author: Finn Thain Date: Wed May 26 10:27:27 2021 +1000 MAINTAINERS, .mailmap: Update Finn Thain's email address Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/fc397a7074d627e22974ef8927910ad08744db5c.1621988847.git.fthain@linux-m68k.org Signed-off-by: Geert Uytterhoeven commit 2ed2732ef28aefdc3b495409fbd05cc388a73c62 Author: Johan Jonker Date: Wed May 12 14:23:44 2021 +0200 dt-bindings: soc: rockchip: convert grf.txt to YAML Current dts files with 'grf' nodes are manually verified. In order to automate this process grf.txt has to be converted to YAML. Most compatibility strings are in use with "simple-mfd" added. Changed compatibles: "rockchip,rk3066-grf", "syscon", "simple-mfd" "rockchip,rk3188-grf", "syscon", "simple-mfd" Add description already in use: "rockchip,rv1108-pmugrf", "syscon" Add new descriptions for: "rockchip,rk3568-grf", "syscon", "simple-mfd" "rockchip,rk3568-pmugrf", "syscon", "simple-mfd" Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210512122346.9463-3-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 4302331fdf4440b96dba583384a0e2b759cb13bd Author: Dmitry Osipenko Date: Tue May 11 00:10:03 2021 +0300 ARM: tegra_defconfig: Enable CONFIG_DEVFREQ_THERMAL Memory-related Tegra devfreq devices now could be used as a cooling devices. Enable CONFIG_DEVFREQ_THERMAL by default since this option enables cooling functionality of the devfreq drivers. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit d42b3e045a34ec7c88c818ee057f7c2ecc8f9fdd Author: Andreas Rehn Date: Tue May 25 19:31:59 2021 +0200 ARM: dts: sun8i: v3s: enable emac for zero Dock dwmac-sun8i supports v3s and Licheepi-zero Dock provides an ethernet port furthermore, align nodes in alphabetical order Signed-off-by: Andreas Rehn Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210525173159.183415-1-rehn.andreas86@gmail.com commit 4c101a4466983abe7798493ef17279cc3f8eb028 Author: Dmitry Osipenko Date: Tue May 11 00:10:08 2021 +0300 ARM: tegra: ouya: Enable memory frequency thermal throttling using ACTMON The ACTMON module monitors activity of memory clients and then devfreq driver makes decisions about a required memory frequency based on info from ACTMON. Add ACTMON device to the thermal zone of Ouya in order to use it as a cooling device which throttles memory freq on overheat. Tested-by: Peter Geis Tested-by: Matt Merhar Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit fe7482b88590635939c4bb786e1cd3bbd9ea1682 Author: Dmitry Osipenko Date: Tue May 11 00:10:07 2021 +0300 ARM: tegra: nexus7: Enable memory frequency thermal throttling using ACTMON The ACTMON module monitors activity of memory clients and then devfreq driver makes decisions about a required memory frequency based on info from ACTMON. Add ACTMON device to the thermal zone of Nexus 7 in order to use it as a cooling device which throttles memory freq on overheat. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 592b74b1f0ebfe49d2e66b2b4bd95ff3678c5696 Author: Dmitry Osipenko Date: Tue May 11 00:10:06 2021 +0300 ARM: tegra: Add cooling cells to ACTMON device-tree node The ACTMON module monitors activity of memory clients and decisions about a minimum required memory frequency are made based on info from ACTMON. Add cooling cells to ACTMON device-tree node in order to turn it into a cooling device that will throttle memory freq on overheat. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c4dd6066bc304649e3159f1c7a08ece25d537e00 Author: Dmitry Osipenko Date: Mon May 10 23:26:00 2021 +0300 ARM: tegra: nexus7: Correct 3v3 regulator GPIO of PM269 variant The 3v3 regulator GPIO is GP6 and not GP7, which is the DDR regulator. Both regulators are always-on, nevertheless the DT model needs to be corrected, fix it. Reported-by: Svyatoslav Ryhel Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 4405d933b66c0c9268de3b3d9cab3e3b780c64f1 Author: Dmitry Osipenko Date: Mon May 10 23:25:59 2021 +0300 ARM: tegra: nexus7: Remove monitored-battery property The bq27541 Linux kernel driver will try to reprogram controller based on the values from monitored-battery node, but it fails to do so because controller was locked by manufacturer. Still this is a very undesirable behaviour, hence let's remove the optional battery node. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 7168137532d2d27d34811cd5a073ad5c3215b592 Author: Dmitry Osipenko Date: Mon May 10 23:25:58 2021 +0300 ARM: tegra: nexus7: Improve thermal zones Remove unused thermal zone just to clean up device-tree and set critical temperature further apart from the passive cooling trip point since during or thermal testing of Asus Transformer devices we found that CPU could reach the critical temperature in a certain kernel configurations for a brief moment if critical trip point is set close to the passive trip point and then device will be immediately shut off without getting a chance to cool down using passive cooling. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 8b73d8c3d2c93c6e3db19d8c2641fc74dc9f8bf1 Author: Dmitry Osipenko Date: Mon May 10 23:25:57 2021 +0300 ARM: tegra: nexus7: Add i2c-thermtrip node Add i2c-thermtrip node which enables emergency shutdown by PMC on SoC die overheat detected by TSENSOR. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2e09908f37c34356baae72f047bbb8fc9faac32f Author: Dmitry Osipenko Date: Mon May 10 23:25:56 2021 +0300 ARM: tegra: paz00: Add CPU thermal zone Add thermal zone with a passive cooling trip for CPU. Attach it to the LM90 sensor which monitors CPU temperature. Now CPU frequencies will be throttled once trip point is reached, preventing critical overheat. Tested-by: Agneli Tested-by: Paul Fertser Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5f45da704de425d74abd75feaa928fc8a3df03ba Author: Dmitry Osipenko Date: Mon May 10 23:25:55 2021 +0300 ARM: tegra: wm8903: Fix polarity of headphones-detection GPIO in device-trees All Tegra boards which use WM8903 audio codec are specifying a wrong polarity for the headphones detection GPIO. The kernel driver hardcodes the polarity to active-low, which is the correct polarity, so we can fix the device-trees safely. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b39a16b577cc11c7ab3fb67c8723c7ea057d96d4 Author: Dmitry Osipenko Date: Mon May 10 23:25:54 2021 +0300 ARM: tegra: Add reg property to Tegra20 EMC table device-tree nodes The reg property is now specified for the emc-tables nodes in the Tegra20 device-tree binding. Add reg property to the EMC table device-tree nodes of Tegra20 board device-trees in order to silence dt_binding_check warning about the missing property. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c46240c005ae7fe10c2fe753ead996379cbf73ff Author: Dmitry Osipenko Date: Mon May 10 23:25:53 2021 +0300 ARM: tegra: acer-a500: Bump thermal trips by 10C It's possible to hit the temperature of the thermal zone in a very warm environment under a constant load, like watching a video using software decoding. It's even easier to hit the limit with a slightly overclocked CPU. Bump the temperature limit by 10C in order to improve user experience. Acer A500 has a large board and 10" display panel which are used for the heat dissipation, the SoC is placed far away from battery, hence we can safely bump the temperature limit. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit a99d77c4b2ac9095d9bd5969996905886debbe8b Author: Dmitry Osipenko Date: Mon May 10 23:25:52 2021 +0300 ARM: tegra: acer-a500: Specify proper voltage for WiFi SDIO bus Tegra20 has v2.00 SDMMC controller which doesn't support voltage switching and the WiFi SDIO bus voltage is fixed to 1.8v in accordance to the board's schematics, while MMC core confusingly saying that it's 3.3v because of the v2.00. Let's correct the voltage in the device-tree just for consistency. This is a minor improvement which doesn't fix any problems. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ef3082db434f3f87b83ccaa1ce4ebfd05535b651 Author: Dmitry Osipenko Date: Mon May 10 23:25:51 2021 +0300 ARM: tegra: acer-a500: Improve microphone detection Use edge-triggered interrupt and set delay to 100ms for microphone hook detection. This doesn't fix any known problems, but there is a smaller chance to miss insertion of the microphone now, which previously happened rarely. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c3975a73ca9410519cf62531f640b68d69b0d798 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:10 2021 +0200 pinctrl: renesas: r8a77980: Add bias pinconf support Implement support for pull-up and pull-down handling for the R-Car V3H SoC, using the common R-Car bias handling. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/448f47ccd89d9bc8621c7fda8c81508deb05cb82.1619785375.git.geert+renesas@glider.be commit b764833e36337cb2b574db75c1d31fde7dd6e6e5 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:09 2021 +0200 pinctrl: renesas: r8a77970: Add bias pinconf support Implement support for pull-up (most pins, excl. DU_DOTCLKIN and EXTALR) and pull-down (most pins, excl. JTAG) handling for the R-Car V3M SoC, using the common R-Car bias handling. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/bcfad447624d874258a45a92554574b8fe9f712f.1619785375.git.geert+renesas@glider.be commit 009f502238a8464933595a128f812a3841830710 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:08 2021 +0200 pinctrl: renesas: r8a7794: Add bias pinconf support Implement support for pull-up (most pins) and pull-down (ASEBRK#/ACK) handling for R-Car E2 and RZ/G1E SoCs, using the common R-Car bias handling. Note that on RZ/G1E, the "ASEBRK#/ACK" pin is called "ACK", but the code doesn't handle that naming difference. Hence users should use the R-Car naming in DTS files. Signed-off-by: Geert Uytterhoeven Tested-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/f78da2ba937ce98ae9196f4ee54149a5214fd545.1619785375.git.geert+renesas@glider.be commit 35477d7e90a1aabf863f89c45a1e1fc15dacc305 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:07 2021 +0200 pinctrl: renesas: r8a7792: Add bias pinconf support Implement support for pull-up (most pins) and pull-down (EDBGREQ) handling for the R-Car V2H SoC, using the common R-Car bias handling. Note that the R-Car V2H Hardware User's Manual Rev. 1.00 says that the LSI Pin Pull-Up Control Register 11 (PUPR11) controls pull-ups for the {SCK,WS,SDATA}[01] pins. These are assumed to be typos, as R-Car V2H has only Serial Sound Interface channels 3 and 4. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/48d2abdd63ee43ed99cb32ed4a5f4d76ba563162.1619785375.git.geert+renesas@glider.be commit 2be3d6024234011217273ceb0437a2be312f82fa Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:06 2021 +0200 pinctrl: renesas: r8a7790: Add bias pinconf support Implement support for pull-up (most pins) and pull-down (ASEBRK#/ACK) handling for R-Car H2 and RZ/G1H SoCs, using the common R-Car bias handling. Note that on RZ/G1H, the "ASEBRK#/ACK" pin is called "ACK", but the code doesn't handle that naming difference. Hence users should use the R-Car naming in DTS files. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/dde6e0b36a4e4494039a3466df208b5ec5c594ee.1619785375.git.geert+renesas@glider.be commit fd6850132f61d6a784905f1c35a41b726e639c7b Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:05 2021 +0200 pinctrl: renesas: r8a77470: Add bias pinconf support Implement support for pull-up (most pins) and pull-down (ASEBRK#/ACK) handling for the RZ/G1C SoC, using the common R-Car bias handling. Note that on RZ/G1C, the "ASEBRK#/ACK" pin is called "ACK", but the code doesn't handle that naming difference. Hence users should use the R-Car naming in DTS files. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/18c8ebf9fa9e239253a723857e9dffeec775db7e.1619785375.git.geert+renesas@glider.be commit 280b68a3b3b96b027fcdeb5a3916a8e2aaf84d03 Author: Pu Wen Date: Fri May 28 16:14:17 2021 +0800 x86/cstate: Allow ACPI C1 FFH MWAIT use on Hygon systems Hygon systems support the MONITOR/MWAIT instructions and these can be used for ACPI C1 in the same way as on AMD and Intel systems. The BIOS declares a C1 state in _CST to use FFH and CPUID_Fn00000005_EDX is non-zero on Hygon systems. Allow ffh_cstate_init() to succeed on Hygon systems to default using FFH MWAIT instead of HALT for ACPI C1. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210528081417.31474-1-puwen@hygon.cn commit 0eb17349042f1c5d8294b6b0a58bcda8b5db0e9d Author: Geert Uytterhoeven Date: Fri Apr 30 15:10:55 2021 +0200 ARM: dts: silk: Configure pull-up for SOFT_SW GPIO keys The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW12) do not have external pull-up resistors, but rely on internal pull-ups being enabled. Fortunately this is satisfied by the initial state of these pins. Make this explicit by enabling bias-pull-up, to remove the dependency on initial state and/or boot loader configuration. While at it, rename the surrounding device node from "gpio-keys" to "keyboard", to comply with generic node name recommendations. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/45f38a5333feba9bea80efeb5a41a6c3f60deda2.1619785905.git.geert+renesas@glider.be commit 0003fa76d973e15263d8d03494aeef6a4361efa3 Author: Geert Uytterhoeven Date: Fri Apr 30 15:10:54 2021 +0200 ARM: dts: gose: Configure pull-up for SOFT_SW GPIO keys The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do not have external pull-up resistors, but rely on internal pull-ups being enabled. Fortunately this is satisfied by the initial state of these pins. Make this explicit by enabling bias-pull-up, to remove the dependency on initial state and/or boot loader configuration. While at it, rename the surrounding device node from "gpio-keys" to "keyboard", to comply with generic node name recommendations. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1cdec892b1491309b12bdaf7bc8428b3a19b1ed5.1619785905.git.geert+renesas@glider.be commit 1f27fedead91eb6077c299a98ea3d9fe2f9955db Author: Geert Uytterhoeven Date: Fri Apr 30 15:10:53 2021 +0200 ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 GPIO keys The GPIO pins connected to the 4 Software Switches (SW2) and the second Tact Switch (SW25) do not have external pull-up resistors, but rely on internal pull-ups being enabled. Fortunately this is satisfied by the initial state of these pins. Make this explicit by enabling bias-pull-up, to remove the dependency on initial state and/or boot loader configuration. Note that the GPIO pin connected to the first Tact Switch (SW24) does have an external pull-up resistor. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/011e4c461767f2dd690b655b3dd501eb554184c1.1619785905.git.geert+renesas@glider.be commit 28cce9540b135cf42d6332e5bca8e5b5dd998b38 Author: Geert Uytterhoeven Date: Fri Apr 30 15:10:52 2021 +0200 ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys The GPIO pins connected to the 4 Software Switches (SW2) do not have external pull-up resistors, but rely on internal pull-ups being enabled. Fortunately this is satisfied by the initial state of these pins. Make this explicit by enabling bias-pull-up, to remove the dependency on initial state and/or boot loader configuration. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/9fae3c0c2c0000f6b43c9ce87fe64a594b30a7da.1619785905.git.geert+renesas@glider.be commit 659b38203f04f5c3d1dc60f1a3e54b582ad3841c Author: Geert Uytterhoeven Date: Thu Apr 29 14:39:12 2021 +0200 arm64: dts: renesas: r8a7796[01]: Fix OPP table entry voltages Correct the voltages in the "Power Optimized" (<= 1.5 GHz) Cortex-A57 operating point table entries for the R-Car M3-W and M3-W+ SoCs from 0.82V to 0.83V, as per the R-Car Gen3 EC Manual Errata for Revision 0.53. Based on a patch for R-Car M3-W in the BSP by Takeshi Kihara . Fixes: da7e3113344fda50 ("arm64: dts: renesas: r8a7796: Add OPPs table for cpu devices") Fixes: f51746ad7d1ff6b4 ("arm64: dts: renesas: Add Renesas R8A77961 SoC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b9e9db907514790574429b83d070c823b36085ef.1619699909.git.geert+renesas@glider.be commit 44b615ac9fab16d1552cd8360454077d411e3c35 Author: Geert Uytterhoeven Date: Thu May 27 15:42:42 2021 +0200 arm64: dts: renesas: Add missing opp-suspend properties Tag the highest "Power Optimized" (1.5 GHz) Cortex-A57 operating point table entries for the RZ/G2M, R-Car M3-W and M3-W+ SoCs with the "opp-suspend" property. This makes sure the system will enter suspend in the same performance state as it will be resumed by the firmware later, avoiding state inconsistencies after resume. Based on a patch for R-Car M3-W in the BSP by Takeshi Kihara . Fixes: 800037e815b91d8c ("arm64: dts: renesas: r8a774a1: Add operating points") Fixes: da7e3113344fda50 ("arm64: dts: renesas: r8a7796: Add OPPs table for cpu devices") Fixes: f51746ad7d1ff6b4 ("arm64: dts: renesas: Add Renesas R8A77961 SoC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/45a061c3b0463aac7d10664f47c4afdd999da50d.1619699721.git.geert+renesas@glider.be commit f0afa235685e11fd30e291e4751419c12ba20b84 Author: YueHaibing Date: Thu May 20 21:51:32 2021 +0800 phy: phy-twl4030-usb: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210520135132.37628-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul commit 46923bdb14c2a51fb1e1bb917c5e16781d089d2e Author: Johan Jonker Date: Tue May 18 18:56:55 2021 +0200 dt-bindings: phy: convert rockchip-usb-phy.txt to YAML Current dts files with Rockchip 'usbphy' nodes are manually verified. In order to automate this process rockchip-usb-phy.txt has to be converted to YAML. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210518165658.12764-2-jbx6244@gmail.com Signed-off-by: Vinod Koul commit 31f840e7ff3e515c2b2cc9eaee42f5440805650c Author: Tobias Schramm Date: Fri May 14 17:00:41 2021 +0200 phy: phy-rockchip-inno-usb2: add support for RK3308 USB phy The RK3308 SoC uses a slightly different USB phy than other Rockchip parts. This commit adds support for that phy. Signed-off-by: Tobias Schramm Link: https://lore.kernel.org/r/20210514150044.2099298-3-t.schramm@manjaro.org Signed-off-by: Vinod Koul commit 74478ab503b0554b8a296abc89248f7ee5a45366 Author: Tobias Schramm Date: Fri May 14 17:00:40 2021 +0200 dt-bindings: phy: rockchip-inno-usb2: add compatible for rk3308 USB phy The RK3308 features a slightly different USB phy than other Rockchip SoCs. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210514150044.2099298-2-t.schramm@manjaro.org Signed-off-by: Vinod Koul commit 51770dae60813c90a92cff5617965249e7b04ca4 Author: Amelie Delaunay Date: Mon May 17 14:08:21 2021 +0200 phy: stm32: manage optional vbus regulator on phy_power_on/off This patch adds support for optional vbus regulator. It is managed on phy_power_on/off calls and may be needed for host mode. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20210517120821.26466-3-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 436b6403db532e3d29cff554a95f448f7f11a165 Author: Amelie Delaunay Date: Mon May 17 14:08:20 2021 +0200 dt-bindings: phy: add vbus-supply optional property to phy-stm32-usbphyc This patch adds vbus-supply optional property to phy sub-nodes using connector node. A regulator for USB VBUS may be needed for host mode. Reviewed-by: Rob Herring Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20210517120821.26466-2-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 4bbe33f66d7da985ab985d5092328cb3061b7a97 Author: Chunfeng Yun Date: Mon May 17 13:37:21 2021 +0800 phy: qcom-qmp: remove redundant error of clock bulk There is error log in clk_bulk_prepare/enable() Reviewed-by: Bjorn Andersson Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1621229841-22984-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 3136b3b1d216c0bee448ff6fca99ec252b8493b7 Author: Shubhankar Kuranagatti Date: Wed Apr 28 22:25:15 2021 +0530 phy: phy-xgene.c: Fix alignment of comment A * has been added at the starting of new line The closing */ of multi line comment shifted to new line This is done to maintain code uniformity. Signed-off-by: Shubhankar Kuranagatti Link: https://lore.kernel.org/r/20210428165515.o47o5awzdxirxkqi@kewl-virtual-machine Signed-off-by: Vinod Koul commit b8e00abe7d9fe21dd13609e2e3a707e38902b105 Author: Randy Dunlap Date: Mon May 24 15:41:50 2021 -0700 locking/lockdep: Reduce LOCKDEP dependency list Some arches (um, sparc64, riscv, xtensa) cause a Kconfig warning for LOCKDEP. These arch-es select LOCKDEP_SUPPORT but they are not listed as one of the arch-es that LOCKDEP depends on. Since (16) arch-es define the Kconfig symbol LOCKDEP_SUPPORT if they intend to have LOCKDEP support, replace the awkward list of arch-es that LOCKDEP depends on with the LOCKDEP_SUPPORT symbol. But wait. LOCKDEP_SUPPORT is included in LOCK_DEBUGGING_SUPPORT, which is already a dependency here, so LOCKDEP_SUPPORT is redundant and not needed. That leaves the FRAME_POINTER dependency, but it is part of an expression like this: depends on (A && B) && (FRAME_POINTER || B') where B' is a dependency of B so if B is true then B' is true and the value of FRAME_POINTER does not matter. Thus we can also delete the FRAME_POINTER dependency. Fixes this kconfig warning: (for um, sparc64, riscv, xtensa) WARNING: unmet direct dependencies detected for LOCKDEP Depends on [n]: DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] && (FRAME_POINTER [=n] || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) Selected by [y]: - PROVE_LOCKING [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] - LOCK_STAT [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] - DEBUG_LOCK_ALLOC [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] Fixes: 7d37cb2c912d ("lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS") Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Link: https://lkml.kernel.org/r/20210524224150.8009-1-rdunlap@infradead.org commit fab6216fafdd74cd84de929ffe7b787976d32cff Author: Xiongwei Song Date: Mon May 24 23:05:45 2021 +0800 locking/lockdep,doc: Improve readability of the block matrix The block condition matrix is using 'E' as the writer notation, however, the writer reminder below the matrix is using 'W', to make them consistent and make the matrix more readable, we'd better to use 'W' to represent writer. Suggested-by: Waiman Long Suggested-by: Boqun Feng Signed-off-by: Xiongwei Song Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Boqun Feng Link: https://lkml.kernel.org/r/1621868745-23311-1-git-send-email-sxwjean@me.com commit aa10fab0f859ef86e998ee1cdaa89fc8e542e2c9 Merge: 7652dd2c5cb7b 8124c8a6b3538 Author: Greg Kroah-Hartman Date: Mon May 31 09:50:26 2021 +0200 Merge 5.13-rc4 into usb-next We need the usb/thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 910cc9537302caddc9777cf3ae2f5582730380c9 Merge: fad92b11047a7 8124c8a6b3538 Author: Greg Kroah-Hartman Date: Mon May 31 09:44:28 2021 +0200 Merge 5.13-rc4 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit cb37defbd17a3d5acb34c5c12d9323bf13bcd1c3 Merge: 90c9761899084 8124c8a6b3538 Author: Greg Kroah-Hartman Date: Mon May 31 09:42:06 2021 +0200 Merge 5.13-rc4 into staging-next We need the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 92722bac5fe4dc4582282bad02dd1fb95e892705 Merge: 39b27e89a76f3 8124c8a6b3538 Author: Greg Kroah-Hartman Date: Mon May 31 09:10:03 2021 +0200 Merge 5.13-rc4 into driver-core-next We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit be0ddb5dfd8b6f3f32e493d34f3819182f354d5e Author: Manivannan Sadhasivam Date: Tue Apr 27 12:24:00 2021 +0530 phy: qcom-qmp: Add support for SDX55 QMP PCIe PHY The PCIe PHY version used in SDX55 is v4.20 which has different register offsets compared to the v4.0x PHYs. So separate register defines are used for init sequence and PHY status. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210427065400.18958-4-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 2d06954e23375a8d299131eddede3a1720bf8539 Merge: d99247f9b5425 8124c8a6b3538 Author: Greg Kroah-Hartman Date: Mon May 31 09:03:10 2021 +0200 Merge 5.13-rc4 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 3496993d06ffc77dff596bfbed966621e999b2e1 Author: Aswath Govindraju Date: Fri May 28 11:36:57 2021 +0530 doc: dt-binding: cdns,usb3: Add interrupt-names property under required In the driver the interrupts are fetched by name. Therefore, add interrupt names in the list of required properties Fixes: 68989fe1c39d ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema") Signed-off-by: Aswath Govindraju Link: https://lore.kernel.org/r/20210528060657.29100-1-a-govindraju@ti.com Signed-off-by: Peter Chen commit 952b702bf82f999853a2db5a592a692274f5554e Author: Manivannan Sadhasivam Date: Tue Apr 27 12:23:59 2021 +0530 phy: qcom-qmp: Use phy_status field for the status bit offset In preparation of the support for v4.20 PCIe PHY in SDX55, use a separate "phy_status" field for the status bit offset. This is needed because, the v4.20 PHY uses a different offset for the PHY Status. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210427065400.18958-3-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 04a82a13f12d15b611e7363e6e060a9f130a94c8 Author: Manivannan Sadhasivam Date: Tue Apr 27 12:23:58 2021 +0530 dt-bindings: phy: qcom,qmp: Add binding for SDX55 PCIe PHY Add devicetree binding for PCIe PHY found in Qcom SDX55 platform. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210427065400.18958-2-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit c9d2939dda3ba121834dba053ff8ba5026f8ce37 Author: Dmitry Torokhov Date: Sun May 30 21:53:00 2021 -0700 Input: cyttsp - do not force interrupt trigger Instead of forcing interrupt trigger to be "falling edge" let's rely on the platform to set it up according to how it is set up on a given board based on data in device tree or ACPI tables. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/YK7iO96g+7yIC0l1@google.com Signed-off-by: Dmitry Torokhov commit 45a4b68354ffccbc9ca71027bd34754ca24f5183 Author: Takashi Iwai Date: Sun May 30 21:44:04 2021 -0700 Input: elants_i2c - switch to probe_new Now that we get rid of the usage of id argument at probe again, let's switch to the new i2c probe method; this will avoid for people misusing the possibly unassigned id pointer again. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20210528071024.26450-2-tiwai@suse.de Signed-off-by: Dmitry Torokhov commit b9c0ebb867d67cc4e9e1a7a2abf0ac9a2cc02051 Author: Takashi Iwai Date: Sun May 30 21:43:36 2021 -0700 Input: elants_i2c - fix NULL dereference at probing The recent change in elants_i2c driver to support more chips introduced a regression leading to Oops at probing. The driver reads id->driver_data, but the id may be NULL depending on the device type the driver gets bound. Replace the driver data extraction with the device_get_match_data() helper, and define the driver data in OF table, too. Fixes: 9517b95bdc46 ("Input: elants_i2c - add support for eKTF3624") BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1186454 Signed-off-by: Takashi Iwai Cc: Link: https://lore.kernel.org/r/20210528071024.26450-1-tiwai@suse.de Signed-off-by: Dmitry Torokhov commit 340ad031887b89af4467ee078e22d24aad0d8401 Author: Tony Lindgren Date: Tue May 18 10:43:47 2021 +0300 dmaengine: ti: omap-dma: Skip pointless cpu_pm context restore on errors There's no need to restore DMA context on CPU_CLUSTER_PM_ENTER_FAILED as the DMA context won't be lost on errors. Note that this does not cause invalid context restore as we already check for busy DMA with omap_dma_busy() in CPU_CLUSTER_PM_ENTER, and block any deeper idle states for the SoC by returning NOTIFY_BAD if busy. If other drivers block deeper idle states with cpu_pm, we now just do a pointless restore, but only if dma was not busy on CPU_CLUSTER_PM_ENTER. Let's update the CPU_CLUSTER_PM_ENTER_FAILED handling for correctness, and add a comment. Cc: Aaro Koskinen Cc: Adam Ford Cc: Andreas Kemnade Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210518074347.16908-1-tony@atomide.com Signed-off-by: Vinod Koul commit 66fde1794ffd075c1b2026d8956f667704c76920 Author: Andy Shevchenko Date: Tue May 18 13:43:23 2021 +0300 dmaengine: hsu: Account transferred bytes Bump statistics for transferred bytes at the event of the successful transfer. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210518104323.37632-2-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit acfbb1911dc907f5f2f1096e88feeaff433bba81 Author: Andy Shevchenko Date: Tue May 18 13:43:22 2021 +0300 dmaengine: Move kdoc description of struct dma_chan_percpu closer to it We have split by unknown reason of kdoc and struct dma_chan_percpu definition. Join them back. No functional change. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210518104323.37632-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 4fbf41ce573556a6dc4e684f0d92700cdc883ad3 Author: Laurent Pinchart Date: Thu May 20 18:24:19 2021 +0300 dmaengine: xilinx: dpdma: Print debug message when losing vsync race The hardware retrigger is inherently racy with the vsync interrupt. This isn't an issue as the hardware provides a way to detect a race loss and handle it correctly. When debugging issues related to this, it's useful to get a notification of the race loss. Add a debug message to do so. Signed-off-by: Laurent Pinchart Tested-by: Jianqiang Chen Reviewed-by: Jianqiang Chen Link: https://lore.kernel.org/r/20210520152420.23986-4-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 30211901927a2a504adae2a75f9863962d2d06b0 Author: Laurent Pinchart Date: Thu May 20 18:24:18 2021 +0300 dmaengine: xilinx: dpdma: Print channel number in kernel log messages To ease debugging, add the channel number to all kernel log messages related to a particular channel. Signed-off-by: Laurent Pinchart Tested-by: Jianqiang Chen Reviewed-by: Jianqiang Chen Link: https://lore.kernel.org/r/20210520152420.23986-3-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit a729b8e6ec3d6a92c8eb877af26bb7104c80cb48 Merge: 8b97f36aa5ab1 0cc8bddb5b066 Author: Jakub Kicinski Date: Sun May 30 14:24:40 2021 -0700 Merge branch 'fixes-for-yt8511-phy-driver' Peter Geis says: ==================== fixes for yt8511 phy driver The Intel clang bot caught a few uninitialized variables in the new Motorcomm driver. While investigating the issue, it was found that the driver would have unintended effects when used in an unsupported mode. Fixed the uninitialized ret variable and abort loading the driver in unsupported modes. ==================== Link: https://lore.kernel.org/r/20210529110556.202531-1-pgwipeout@gmail.com Signed-off-by: Jakub Kicinski commit 0cc8bddb5b0665283baba6d89684630663c0ccbd Author: Peter Geis Date: Sat May 29 07:05:56 2021 -0400 net: phy: abort loading yt8511 driver in unsupported modes While investigating the clang `ge` uninitialized variable report, it was discovered the default switch would have unintended consequences. Due to the switch to __phy_modify, the driver would modify the ID values in the default scenario. Fix this by promoting the interface mode switch and aborting when the mode is not a supported RGMII mode. This prevents the `ge` and `fe` variables from ever being used uninitialized. Fixes: 48e8c6f1612b ("net: phy: add driver for Motorcomm yt8511 phy") Reported-by: kernel test robot Reviewed-by: Andrew Lunn Signed-off-by: Peter Geis Signed-off-by: Jakub Kicinski commit 546d6bad18c04926c4d0eba4222654a9a60ea830 Author: Peter Geis Date: Sat May 29 07:05:55 2021 -0400 net: phy: fix yt8511 clang uninitialized variable warning clang doesn't preinitialize variables. If phy_select_page failed and returned an error, phy_restore_page would be called with `ret` being uninitialized. Even though phy_restore_page won't use `ret` in this scenario, initialize `ret` to silence the warning. Fixes: 48e8c6f1612b ("net: phy: add driver for Motorcomm yt8511 phy") Reported-by: kernel test robot Reviewed-by: Andrew Lunn Signed-off-by: Peter Geis Signed-off-by: Jakub Kicinski commit 8b97f36aa5ab1dff6087392c03c28266a466fe79 Merge: 320daffdf249b 9fe99de01440d Author: Jakub Kicinski Date: Sun May 30 14:22:33 2021 -0700 Merge branch 'net-dsa-qca8k-check-return-value-of-read-functions-correctly' Yang Yingliang says: ==================== net: dsa: qca8k: check return value of read functions correctly patch #1 - Change return type and add output parameter to make check return value of read functions correctly. patch #2 - Add missing check return value in qca8k_phylink_mac_config(). ==================== Link: https://lore.kernel.org/r/20210529030439.1723306-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski commit 9fe99de01440d9ede74d447ac76e9c445d8daae9 Author: Yang Yingliang Date: Sat May 29 11:04:39 2021 +0800 net: dsa: qca8k: add missing check return value in qca8k_phylink_mac_config() Now we can check qca8k_read() return value correctly, so if it fails, we need return directly. Signed-off-by: Yang Yingliang Signed-off-by: Jakub Kicinski commit 7c9896e37807862e276064dd9331860f5d27affc Author: Yang Yingliang Date: Sat May 29 11:04:38 2021 +0800 net: dsa: qca8k: check return value of read functions correctly Current return type of qca8k_mii_read32() and qca8k_read() are unsigned, it can't be negative, so the return value check is unuseful. For check the return value correctly, change return type of the read functions and add a output parameter to store the read value. Signed-off-by: Yang Yingliang Signed-off-by: Jakub Kicinski commit e90abb95bc71566e2016964e98181557929f55f5 Author: Andy Shevchenko Date: Sun May 30 23:32:28 2021 +0300 leds: lm36274: Add missed property.h It appears that property.h has been included in some configurations implicitly, but in some it's not and hence build may fail. Add missed property.h explicitly. Fixes: e2e8e4e81875 ("leds: lm36274: Correct headers (of*.h -> mod_devicetable.h)") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 320daffdf249bb41531c01445054443c80440904 Author: Gustavo A. R. Silva Date: Fri May 28 15:22:25 2021 -0500 octeontx2-pf: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210528202225.GA39855@embeddedor Signed-off-by: Jakub Kicinski commit 03a6ef31f2bc3e14522298a9617e240fb0f5954b Author: Gustavo A. R. Silva Date: Fri May 28 14:58:31 2021 -0500 net: axienet: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a fallthrough statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210528195831.GA39131@embeddedor Signed-off-by: Jakub Kicinski commit 1cf1ef60a1a64cb5e00148b35bb35abad0984234 Author: Shaokun Zhang Date: Fri May 28 17:56:25 2021 +0800 batman-adv: Remove the repeated declaration Function 'batadv_bla_claim_dump' is declared twice, so remove the repeated declaration. Signed-off-by: Shaokun Zhang Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 7a68cc16b82c963c096387917ced11a27c352261 Author: Linus Lüssing Date: Sat May 15 17:22:08 2021 +0200 batman-adv: mcast: add MRD + routable IPv4 multicast with bridges support This adds support for routable IPv4 multicast addresses (224.0.0.0/4, excluding 224.0.0.0/24) in bridged setups. This utilizes the Multicast Router Discovery (MRD, RFC4286) support in the Linux bridge. batman-adv will now query the Linux bridge for IPv4 multicast routers, which the bridge has previously learned about via MRD. This allows us to then safely send routable IPv4 multicast packets in bridged setups to multicast listeners and multicast routers only. Before we had to flood such packets to avoid potential multicast packet loss to IPv4 multicast routers, which we were not able to detect before. With the bridge MRD integration, we are now also able to perform more fine-grained detection of IPv6 multicast routers in bridged setups: Before we were "guessing" IPv6 multicast routers by looking up multicast listeners for the link-local All Routers multicast address (ff02::2), which every IPv6 multicast router is listening to. However this would also include more nodes than necessary: For instance nodes which are just a router for unicast, but not multicast would be included, too. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 238ebd8b487b7fc995284e9580257801f2c76aa5 Author: Philipp Borgers Date: Mon May 24 08:52:11 2021 +0300 ath9k: ar9003_mac: read STBC indicator from rx descriptor The rx descriptor contains a STBC indicator. If the indicator is set the frame was received with STBC. Signed-off-by: Philipp Borgers Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210517172426.15919-1-borgers@mi.fu-berlin.de commit 19307193e5dd6edeb2bafa42d9354cd327df0b22 Author: Shaokun Zhang Date: Sat May 29 17:02:06 2021 +0800 ALSA: usb-audio: Remove the repeated declaration Function 'snd_usb_endpoint_suspend' is declared twice, so remove the repeated declaration. Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622278926-63857-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Takashi Iwai commit cba43c31f14b08f193ebb5b4a72751b0947436c1 Author: Guo Ren Date: Wed May 26 05:49:20 2021 +0000 riscv: Use global mappings for kernel pages We map kernel pages into all addresses spages, so they can be marked as global. This allows hardware to avoid flushing the kernel mappings when moving between address spaces. Signed-off-by: Guo Ren Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig [Palmer: commit text] Signed-off-by: Palmer Dabbelt commit 7fa865f5640a46ed9d3655dd19583fe750e85a8a Author: Randy Dunlap Date: Mon May 24 17:13:02 2021 -0700 riscv: TRANSPARENT_HUGEPAGE: depends on MMU Fix a Kconfig warning and many build errors: WARNING: unmet direct dependencies detected for COMPACTION Depends on [n]: MMU [=n] Selected by [y]: - TRANSPARENT_HUGEPAGE [=y] && HAVE_ARCH_TRANSPARENT_HUGEPAGE [=y] and the subseqent thousands of build errors and warnings. Fixes: e88b333142e4 ("riscv: mm: add THP support on 64-bit") Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Signed-off-by: Palmer Dabbelt commit d3f2c48de7b86c17c93d412e08e7214c6e108c8a Merge: 015dbf5662fd6 f9c49be90c053 Author: Jakub Kicinski Date: Sat May 29 14:16:24 2021 -0700 Merge branch 'npc-kpu-updates' George Cherian says: ==================== NPC KPU updates Add support for - Loading Custom KPU profile entries - Add NPC profile Load from System Firmware DB - Add Support fo Coalescing KPU profiles - General Updates/Fixes to default KPU profile ==================== Link: https://lore.kernel.org/r/20210527094439.1910013-1-george.cherian@marvell.com Signed-off-by: Jakub Kicinski commit f9c49be90c0536c7f51dfab788639586e0ccc2a8 Author: George Cherian Date: Thu May 27 15:14:39 2021 +0530 octeontx2-af: Update the default KPU profile and fixes Add support for parsing following 1. NGIO 2. PPPOE 3. 24 byte custom L2 header 4. CPT Header 5. Fragmented CPT packets 6. VLAN EXDSA Fix for 1. EDSA VLAN parsing 2. Enhance FDSA 3. CPT Header parsing Remove ITAG support Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Harman Kalra Signed-off-by: Kiran Kumar K Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit 11c730bfbf5b9eecdf0de1267314ab3e5ea4d896 Author: Harman Kalra Date: Thu May 27 15:14:38 2021 +0530 octeontx2-af: support for coalescing KPU profiles Adding support to load a new type of KPU image, known as coalesced/ consolidated KPU image via firmware database. This image is a consolidation of multiple KPU profiles into a single image. During kernel bootup this coalesced image will be read via firmware database and only the relevant KPU profile will be loaded. Existing functionality of loading single KPU/MKEX profile is intact as the images are differentiated based on the image signature. Signed-off-by: Harman Kalra Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit c87e6b1395792d25697927e2a565547ec7a62681 Author: Harman Kalra Date: Thu May 27 15:14:37 2021 +0530 octeontx2-af: adding new lt def registers support CN10k introduces following new LT DEF registers: 1. APAD (alignment padding) LT DEF registers are enhancement to existing apad calculation algorithm where not just ipv4 and ipv6 but also other protocols can be matched and required alignment can be added by NIX. 2. ET LT DEF register defines layer information in NPC_RESULT_S to identify the Ethertype location in L2 header. Used for Ethertype overwriting in inline IPsec flow. This patch adds required structures and some header changes. Also strict version check (based on minor field) is imposed to highlight version mismatch between the kernel headers and KPU profile. Signed-off-by: Harman Kalra Signed-off-by: Jerin Jacob Kollanukkaran Signed-off-by: Kiran Kumar Kokkilagadda Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit 5d16250b605963b8b45bf824b1889a6b3d64c662 Author: Harman Kalra Date: Thu May 27 15:14:36 2021 +0530 octeontx2-af: load NPC profile via firmware database Currently NPC profile (KPU + MKEX) can be loaded using firmware binary in filesystem scheme. Enhancing the functionality to load NPC profile image from system firmware database. It uses the same technique as used for loading MKEX profile. Firstly firmware binary in kernel is checked for a valid image else tries to load NPC profile from firmware database and at last uses default profile if no proper image found. Signed-off-by: Harman Kalra Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit 3a7244152f9c22f32f37dfba2a9b070a90bf877a Author: Stanislaw Kardach Date: Thu May 27 15:14:35 2021 +0530 octeontx2-af: add support for custom KPU entries Add ability to load a set of custom KPU entries. This allows for flexible support for custom protocol parsing. AF driver will attempt to load the profile and verify if it can fit hardware capabilities. If not, it will revert to the built-in profile. Next it will replace the first KPU_MAX_CST_LT (2) entries in each KPU in default profile with entries read from the profile image. The built-in profile should always contain KPU_MAX_CSR_LT first no-match entries and AF driver will disable those in the KPU unless custom profile is loaded. Profile file contains also a list of default protocol overrides to allow for custom protocols to be used there. Signed-off-by: Stanislaw Kardach Signed-off-by: George Cherian Signed-off-by: Jakub Kicinski commit 010623568222bd144eb73aa9f3b46c79b63d7676 Author: Jisheng Zhang Date: Sun May 16 21:15:56 2021 +0800 riscv: mm: init: Consolidate vars, functions Consolidate the following items in init.c Staticize global vars as much as possible; Add __initdata mark if the global var isn't needed after init Add __init mark if the func isn't needed after init Add __ro_after_init if the global var is read only after init Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 3df952ae2ac81fbc5d44b014e5462b53d1decbb5 Author: Jisheng Zhang Date: Sun May 16 20:59:42 2021 +0800 riscv: Add __init section marker to some functions again These functions are not needed after booting, so mark them as __init to move them to the __init section. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 897389de48283d413728dae7520973872cef8eb2 Author: Florian Westphal Date: Fri May 28 12:30:08 2021 +0200 netfilter: nf_tables: remove xt_action_param from nft_pktinfo Init it on demand in the nft_compat expression. This reduces size of nft_pktinfo from 48 to 24 bytes on x86_64. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8c9f4940c27dd72ee68ca5af2922e4d83ca9121b Author: Jisheng Zhang Date: Mon Apr 19 00:29:19 2021 +0800 riscv: kprobes: Remove redundant kprobe_step_ctx Inspired by commit ba090f9cafd5 ("arm64: kprobes: Remove redundant kprobe_step_ctx"), the ss_pending and match_addr of kprobe_step_ctx are redundant because those can be replaced by KPROBE_HIT_SS and &cur_kprobe->ainsn.api.insn[0] + GET_INSN_LENGTH(cur->opcode) respectively. Remove the kprobe_step_ctx to simplify the code. Signed-off-by: Jisheng Zhang Reviewed-by: Masami Hiramatsu Signed-off-by: Palmer Dabbelt commit 0fa1baeedf06765ec6b441692ba2a2e83b7d17dc Author: Manivannan Sadhasivam Date: Wed May 12 10:31:41 2021 +0530 ARM: dts: qcom: sdx55-telit: Represent secure-regions as 64-bit elements The corresponding MTD code expects the regions to be of 64-bit elements. Hence, prefix "/bits/ 64", otherwise the regions will not be parsed correctly. Fixes: 6a5d3c611930 ("ARM: dts: qcom: sdx55: Add basic devicetree support for Telit FN980 TLB") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210512050141.43338-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 619d3c4bf8f346ac9192d3c266efc9e231ca5d17 Author: Manivannan Sadhasivam Date: Wed May 12 10:31:40 2021 +0530 ARM: dts: qcom: sdx55-t55: Represent secure-regions as 64-bit elements The corresponding MTD code expects the regions to be of 64-bit elements. Hence, prefix "/bits/ 64", otherwise the regions will not be parsed correctly. Fixes: 3263d4be5788 ("ARM: dts: qcom: sdx55: Add basic devicetree support for Thundercomm T55") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210512050141.43338-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit f4370a85d62e645107afc8a35a979be962b19258 Author: Shiraz Saleem Date: Fri May 21 10:11:20 2021 -0700 i40e: Register auxiliary devices to provide RDMA Convert i40e to use the auxiliary bus infrastructure to export the RDMA functionality of the device to the RDMA driver. Register i40e client auxiliary RDMA device on the auxiliary bus per PCIe device function for the new auxiliary rdma driver (irdma) to attach to. The global i40e_register_client and i40e_unregister_client symbols will be obsoleted once irdma replaces i40iw in the kernel for the X722 device. Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit 9ed7533121219cb25408888cf7fbb929cedc033c Author: Shiraz Saleem Date: Fri May 21 10:10:59 2021 -0700 i40e: Prep i40e header for aux bus conversion Add the definitions to the i40e client header file in preparation to convert i40e to use the new auxiliary bus infrastructure. This header is shared between the 'i40e' Intel networking driver providing RDMA support and the 'irdma' driver. Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit f9f5301e7e2d4fa2445aab3ec889dac6b34ea63e Author: Dave Ertman Date: Thu May 20 09:37:51 2021 -0500 ice: Register auxiliary device to provide RDMA Register ice client auxiliary RDMA device on the auxiliary bus per PCIe device function for the auxiliary driver (irdma) to attach to. It allows to realize a single RDMA driver (irdma) capable of working with multiple netdev drivers over multi-generation Intel HW supporting RDMA. There is no load ordering dependencies between ice and irdma. Signed-off-by: Dave Ertman Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit 348048e724a0e8f08b63948d728d27596f6d3769 Author: Dave Ertman Date: Thu May 20 09:37:50 2021 -0500 ice: Implement iidc operations Add implementations for supporting iidc operations for device operation such as allocation of resources and event notifications. Signed-off-by: Dave Ertman Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit d25a0fc41c1f927bb914e72a03c1898052557406 Author: Dave Ertman Date: Thu May 20 09:37:49 2021 -0500 ice: Initialize RDMA support Probe the device's capabilities to see if it supports RDMA. If so, allocate and reserve resources to support its operation; populate structures with initial values. Signed-off-by: Dave Ertman Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit e860fa9b69e1bf077ba4725ee4be7b9443a3682a Author: Dave Ertman Date: Thu May 20 09:37:48 2021 -0500 iidc: Introduce iidc.h Introduce a shared header file used by the 'ice' Intel networking driver providing RDMA support and the 'irdma' driver to provide a private interface. Signed-off-by: Dave Ertman Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit 015dbf5662fd689d581c0bc980711b073ca09a1a Author: Zhen Lei Date: Fri May 28 16:55:55 2021 +0800 ehea: fix error return code in ehea_restart_qps() Fix to return -EFAULT from the error handling case instead of 0, as done elsewhere in this function. By the way, when get_zeroed_page() fails, directly return -ENOMEM to simplify code. Fixes: 2c69448bbced ("ehea: DLPAR memory add fix") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210528085555.9390-1-thunder.leizhen@huawei.com Signed-off-by: Jakub Kicinski commit 7ecd7e290bee0ab9cf75b79a367a4cc113cf8292 Author: Gioh Kim Date: Fri May 28 13:30:18 2021 +0200 RDMA/rtrs-clt: Fix memory leak of not-freed sess->stats and stats->pcpu_stats sess->stats and sess->stats->pcpu_stats objects are freed when sysfs entry is removed. If something wrong happens and session is closed before sysfs entry is created, sess->stats and sess->stats->pcpu_stats objects are not freed. This patch adds freeing of them at three places: 1. When client uses wrong address and session creation fails. 2. When client fails to create a sysfs entry. 3. When client adds wrong address via sysfs add_path. Fixes: 215378b838df0 ("RDMA/rtrs: client: sysfs interface functions") Link: https://lore.kernel.org/r/20210528113018.52290-21-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 5b73b799c25c68a4703cd6c5ac4518006d9865b8 Author: Md Haris Iqbal Date: Fri May 28 13:30:17 2021 +0200 RDMA/rtrs-clt: Check if the queue_depth has changed during a reconnection The queue_depth is a module parameter for rtrs_server. It is used on the client side to determing the queue_depth of the request queue for the RNBD virtual block device. During a reconnection event for an already mapped device, in case the rtrs_server module queue_depth has changed, fail the reconnect attempt. Also stop further auto reconnection attempts. A manual reconnect via sysfs has to be triggerred. Fixes: 6a98d71daea18 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20210528113018.52290-20-jinpu.wang@ionos.com Signed-off-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 6bb97a2c1aa5278a30d49abb6186d50c34c207e2 Author: Jack Wang Date: Fri May 28 13:30:16 2021 +0200 RDMA/rtrs-srv: Fix memory leak when having multiple sessions Gioh notice memory leak below unreferenced object 0xffff8880acda2000 (size 2048): comm "kworker/4:1", pid 77, jiffies 4295062871 (age 1270.730s) hex dump (first 32 bytes): 00 20 da ac 80 88 ff ff 00 20 da ac 80 88 ff ff . ....... ...... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000e85d85b5>] rtrs_srv_rdma_cm_handler+0x8e5/0xa90 [rtrs_server] [<00000000e31a988a>] cma_ib_req_handler+0xdc5/0x2b50 [rdma_cm] [<000000000eb02c5b>] cm_process_work+0x2d/0x100 [ib_cm] [<00000000e1650ca9>] cm_req_handler+0x11bc/0x1c40 [ib_cm] [<000000009c28818b>] cm_work_handler+0xe65/0x3cf2 [ib_cm] [<000000002b53eaa1>] process_one_work+0x4bc/0x980 [<00000000da3499fb>] worker_thread+0x78/0x5c0 [<00000000167127a4>] kthread+0x191/0x1e0 [<0000000060802104>] ret_from_fork+0x3a/0x50 unreferenced object 0xffff88806d595d90 (size 8): comm "kworker/4:1H", pid 131, jiffies 4295062972 (age 1269.720s) hex dump (first 8 bytes): 62 6c 61 00 6b 6b 6b a5 bla.kkk. backtrace: [<000000004447d253>] kstrdup+0x2e/0x60 [<0000000047259793>] kobject_set_name_vargs+0x2f/0xb0 [<00000000c2ee3bc8>] dev_set_name+0xab/0xe0 [<000000002b6bdfb1>] rtrs_srv_create_sess_files+0x260/0x290 [rtrs_server] [<0000000075d87bd7>] rtrs_srv_info_req_done+0x71b/0x960 [rtrs_server] [<00000000ccdf1bb5>] __ib_process_cq+0x94/0x100 [ib_core] [<00000000cbcb60cb>] ib_cq_poll_work+0x32/0xc0 [ib_core] [<000000002b53eaa1>] process_one_work+0x4bc/0x980 [<00000000da3499fb>] worker_thread+0x78/0x5c0 [<00000000167127a4>] kthread+0x191/0x1e0 [<0000000060802104>] ret_from_fork+0x3a/0x50 unreferenced object 0xffff88806d6bb100 (size 256): comm "kworker/4:1H", pid 131, jiffies 4295062972 (age 1269.720s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff 00 59 4d 86 ff ff ff ff .........YM..... backtrace: [<00000000a18a11e4>] device_add+0x74d/0xa00 [<00000000a915b95f>] rtrs_srv_create_sess_files.cold+0x49/0x1fe [rtrs_server] [<0000000075d87bd7>] rtrs_srv_info_req_done+0x71b/0x960 [rtrs_server] [<00000000ccdf1bb5>] __ib_process_cq+0x94/0x100 [ib_core] [<00000000cbcb60cb>] ib_cq_poll_work+0x32/0xc0 [ib_core] [<000000002b53eaa1>] process_one_work+0x4bc/0x980 [<00000000da3499fb>] worker_thread+0x78/0x5c0 [<00000000167127a4>] kthread+0x191/0x1e0 [<0000000060802104>] ret_from_fork+0x3a/0x50 The problem is we increase device refcount by get_device in process_info_req for each path, but only does put_deice for last path, which lead to memory leak. To fix it, it also calls put_device when dev_ref is not 0. Fixes: e2853c49477d1 ("RDMA/rtrs-srv-sysfs: fix missing put_device") Link: https://lore.kernel.org/r/20210528113018.52290-19-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 2371c40354509746e4a4dad09a752e027a30f148 Author: Gioh Kim Date: Fri May 28 13:30:15 2021 +0200 RDMA/rtrs-srv: Fix memory leak of unfreed rtrs_srv_stats object When closing a session, currently the rtrs_srv_stats object in the closing session is freed by kobject release. But if it failed to create a session by various reasons, it must free the rtrs_srv_stats object directly because kobject is not created yet. This problem is found by kmemleak as below: 1. One client machine maps /dev/nullb0 with session name 'bla': root@test1:~# echo "sessname=bla path=ip:192.168.122.190 \ device_path=/dev/nullb0" > /sys/devices/virtual/rnbd-client/ctl/map_device 2. Another machine failed to create a session with the same name 'bla': root@test2:~# echo "sessname=bla path=ip:192.168.122.190 \ device_path=/dev/nullb1" > /sys/devices/virtual/rnbd-client/ctl/map_device -bash: echo: write error: Connection reset by peer 3. The kmemleak on server machine reported an error: unreferenced object 0xffff888033cdc800 (size 128): comm "kworker/2:1", pid 83, jiffies 4295086585 (age 2508.680s) 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: [<00000000a72903b2>] __alloc_sess+0x1d4/0x1250 [rtrs_server] [<00000000d1e5321e>] rtrs_srv_rdma_cm_handler+0xc31/0xde0 [rtrs_server] [<00000000bb2f6e7e>] cma_ib_req_handler+0xdc5/0x2b50 [rdma_cm] [<00000000e896235d>] cm_process_work+0x2d/0x100 [ib_cm] [<00000000b6866c5f>] cm_req_handler+0x11bc/0x1c40 [ib_cm] [<000000005f5dd9aa>] cm_work_handler+0xe65/0x3cf2 [ib_cm] [<00000000610151e7>] process_one_work+0x4bc/0x980 [<00000000541e0f77>] worker_thread+0x78/0x5c0 [<00000000423898ca>] kthread+0x191/0x1e0 [<000000005a24b239>] ret_from_fork+0x3a/0x50 Fixes: 39c2d639ca183 ("RDMA/rtrs-srv: Set .release function for rtrs srv device during device init") Link: https://lore.kernel.org/r/20210528113018.52290-18-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 07c14027295a320cbc38869ed54b7472f155b2a6 Author: Gioh Kim Date: Fri May 28 13:30:14 2021 +0200 RDMA/rtrs-srv: Duplicated session name is not allowed If two clients try to use the same session name, rtrs-server generates a kernel error that it failed to create the sysfs because the filename is duplicated. This patch adds code to check if there already exists the same session name with the different UUID. If a client tries to add more session, it sends the UUID and the session name. Therefore it is ok if there is already same session name with the same UUID. The rtrs-server must fail only-if there is the same session name with the different UUID. Link: https://lore.kernel.org/r/20210528113018.52290-17-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Aleksei Marov Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit 64bce1ee978491a779eb31098b21c57d4e431d6a Author: Gioh Kim Date: Fri May 28 13:30:13 2021 +0200 RDMA/rtrs: Do not reset hb_missed_max after re-connection When re-connecting, it resets hb_missed_max to 0. Before the first re-connecting, client will trigger re-connection when it gets hb-ack more than 5 times. But after the first re-connecting, clients will do re-connection whenever it does not get hb-ack because hb_missed_max is 0. There is no need to reset hb_missed_max when re-connecting. hb_missed_max should be kept until closing the session. Fixes: c0894b3ea69d3 ("RDMA/rtrs: core: lib functions shared between client and server modules") Link: https://lore.kernel.org/r/20210528113018.52290-16-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 78df092c3822fc5400ab5de97f3958acb06ab246 Author: Jack Wang Date: Fri May 28 13:30:12 2021 +0200 RDMA/rtrs-srv: convert scnprintf to sysfs_emit Link: https://lore.kernel.org/r/20210528113018.52290-15-jinpu.wang@ionos.com Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 0cdfb3b20797804ae835d7a325b08d8523794089 Author: Md Haris Iqbal Date: Fri May 28 13:30:11 2021 +0200 RDMA/rtrs-srv: Replace atomic_t with percpu_ref for ids_inflight ids_inflight is used to track the inflight IOs. But the use of atomic_t variable can cause performance drops and can also become a performance bottleneck. This commit replaces the use of atomic_t with a percpu_ref structure. The advantage it offers is, it doesn't check if the reference has fallen to 0, until the user explicitly signals it to; and that is done by the percpu_ref_kill() function call. After that, the percpu_ref structure behaves like an atomic_t and for every put call, checks whether the reference has fallen to 0 or not. rtrs_srv_stats_rdma_to_str shows the count of ids_inflight as 0 for user-mode tools not to be confused. Fixes: 9cb837480424e ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20210528113018.52290-14-jinpu.wang@ionos.com Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 41db63a7efe1c8c2dd282c1849a6ebfbbedbaf67 Author: Md Haris Iqbal Date: Fri May 28 13:30:10 2021 +0200 RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats When get_next_path_min_inflight is called to select the next path, it iterates over the list of available rtrs_clt_sess (paths). It then reads the number of inflight IOs for that path to select one which has the least inflight IO. But it may so happen that rtrs_clt_sess (path) is no longer in the connected state because closing or error recovery paths can change the status of the rtrs_clt_Sess. For example, the client sent the heart-beat and did not get the response, it would change the session status and stop IO processing. The added checking of this patch can prevent accessing the broken path and generating duplicated error messages. It is ok if the status is changed after checking the status because the error recovery path does not free memory and only tries to reconnection. And also it is ok if the session is closed after checking the status because closing the session changes the session status and flush all IO beforing free memory. If the session is being accessed for IO processing, the closing session will wait. Fixes: 6a98d71daea18 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20210528113018.52290-13-jinpu.wang@ionos.com Signed-off-by: Md Haris Iqbal Reviewed-by: Gioh Kim Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 7a2e0888b08cd368acb4df3e107f7f4a9ec6d3e1 Author: Guoqing Jiang Date: Fri May 28 13:30:09 2021 +0200 RDMA/rtrs-clt: Remove redundant 'break' It is duplicated with the very next line Link: https://lore.kernel.org/r/20210528113018.52290-12-jinpu.wang@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 0aedfb695f9b84084b96400f991cc098ec42f211 Author: Guoqing Jiang Date: Fri May 28 13:30:08 2021 +0200 RDMA/rtrs-srv: Kill __rtrs_srv_change_state No need since the only user is rtrs_srv_change_state. Link: https://lore.kernel.org/r/20210528113018.52290-11-jinpu.wang@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit b0c633c48290530df07fa3d8dd726b1ca587e28d Author: Guoqing Jiang Date: Fri May 28 13:30:07 2021 +0200 RDMA/rtrs-clt: Kill rtrs_clt_disconnect_from_sysfs The function is just a wrapper of rtrs_clt_close_conns, let's call rtrs_clt_close_conns directly. Link: https://lore.kernel.org/r/20210528113018.52290-10-jinpu.wang@ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 5e82ac7c009b05d415ef679a5105dd5fffe51987 Author: Guoqing Jiang Date: Fri May 28 13:30:06 2021 +0200 RDMA/rtrs-clt: Kill rtrs_clt_{start,stop}_hb The two wrappers are not needed since we can call rtrs_{start,stop}_hb directly. Link: https://lore.kernel.org/r/20210528113018.52290-9-jinpu.wang@ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 2d612f0d3d4b4cddc37b036771771ecc6d592c4d Author: Dima Stepanov Date: Fri May 28 13:30:05 2021 +0200 RDMA/rtrs: Use strscpy instead of strlcpy During checkpatch analyzing the following warning message was found: WARNING:STRLCPY: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Fix it by using strscpy calls instead of strlcpy. Link: https://lore.kernel.org/r/20210528113018.52290-8-jinpu.wang@ionos.com Signed-off-by: Dima Stepanov Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 3f3d0eabc14b6ea1fcbe85a60ee9d44e2b930b8a Author: Gioh Kim Date: Fri May 28 13:30:04 2021 +0200 RDMA/rtrs: Define MIN_CHUNK_SIZE Define MIN_CHUNK_SIZE to replace the hard-coding number. We need 4k for metadata, so MIN_CHUNK_SIZE should be at least 8k. Link: https://lore.kernel.org/r/20210528113018.52290-7-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 3a98ea7041b7d18ac356da64823c2ba2f8391b3e Author: Gioh Kim Date: Fri May 28 13:30:03 2021 +0200 RDMA/rtrs: Change MAX_SESS_QUEUE_DEPTH Max IB immediate data size is 2^28 (MAX_IMM_PAYL_BITS) and the minimum chunk size is 4096 (2^12). Therefore the maximum sess_queue_depth is 65536 (2^16). Link: https://lore.kernel.org/r/20210528113018.52290-6-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reported-by: kernel test robot Signed-off-by: Jason Gunthorpe commit 485f2fb1a09ed2f3ebad5c321c3df91c8bdc2556 Author: Guoqing Jiang Date: Fri May 28 13:30:02 2021 +0200 RDMA/rtrs-srv: Clean up the code in __rtrs_srv_change_state No need to use double switch to check the change of state everywhere, let's change them to "if" to reduce size. Link: https://lore.kernel.org/r/20210528113018.52290-5-jinpu.wang@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 6564b110313ee429c8a483b6c60a2899d0cd9753 Author: Md Haris Iqbal Date: Fri May 28 13:30:01 2021 +0200 RDMA/rtrs-srv: Add error messages for cases when failing RDMA connection It was difficult to find out why it failed to establish RDMA connection. This patch adds some messages to show which function has failed why. Link: https://lore.kernel.org/r/20210528113018.52290-4-jinpu.wang@ionos.com Signed-off-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 21c6f5674bb870adc3766a6f7de74f093b867c16 Author: Gioh Kim Date: Fri May 28 13:30:00 2021 +0200 RDMA/rtrs-clt: Remove MAX_SESS_QUEUE_DEPTH from rtrs_send_sess_info Client receives queue_depth value from server. There is no need to use MAX_SESS_QUEUE_DEPTH value. Link: https://lore.kernel.org/r/20210528113018.52290-3-jinpu.wang@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit cfbeb0b9bb9657ae929a0fabdf29f793ab91886b Author: Guoqing Jiang Date: Fri May 28 13:29:59 2021 +0200 RDMA/rtrs-srv: Kill reject_w_econnreset label We can goto reject_w_err label after initialize err with -ECONNRESET. Link: https://lore.kernel.org/r/20210528113018.52290-2-jinpu.wang@ionos.com Reviewed-by: Md Haris Iqbal Signed-off-by: Guoqing Jiang Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 33e823460081759119193f2724e8abc16c98b248 Author: YueHaibing Date: Fri May 28 20:57:50 2021 +0800 RDMA/srp: Use DEVICE_ATTR_*() macros Use DEVICE_ATTR_*() helpers instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210528125750.20788-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe commit c5b8eaf8afd8c2711233a344a5e2e8e4aa562301 Author: YueHaibing Date: Wed May 26 21:29:49 2021 +0800 RDMA/core: Use the DEVICE_ATTR_RO macro Use the DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210526132949.20184-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe commit 1f8f60f35f79210fe6af32fc62528bd5c0ace923 Author: YueHaibing Date: Wed May 26 21:27:53 2021 +0800 IB/ipoib: Use DEVICE_ATTR_*() macros Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Link: https://lore.kernel.org/r/20210526132753.3092-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe commit d58c23c9254894d438ce5c516745cf694eac86b7 Author: Håkon Bugge Date: Tue May 25 19:49:09 2021 +0200 IB/core: Only update PKEY and GID caches on respective events Both the PKEY and GID tables in an HCA can hold in the order of hundreds entries. Reading them is expensive. Partly because the API for retrieving them only returns a single entry at a time. Further, on certain implementations, e.g., CX-3, the VFs are paravirtualized in this respect and have to rely on the PF driver to perform the read. This again demands VF to PF communication. IB Core's cache is refreshed on all events. Hence, filter the refresh of the PKEY and GID caches based on the event received being IB_EVENT_PKEY_CHANGE and IB_EVENT_GID_CHANGE respectively. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://lore.kernel.org/r/1621964949-28484-1-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3f0d979efb82ce514ef1c6f135d0f118bf1bcea4 Author: Xi Wang Date: Mon May 24 20:47:08 2021 +0800 RDMA/hns: Refactor capability configuration flow of VF The capbability configurations of PFs and VFs are coupled. Decoupling them by abstracting some functions and reorganizing the configuration process. Link: https://lore.kernel.org/r/1621860428-58009-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 221442ea0f60ae345a33df8b6d22201404f5a987 Author: Max Gurtovoy Date: Mon May 24 11:52:25 2021 +0300 IB/isert: set rdma cm afonly flag This will allow both IPv4 and IPv6 sockets to bind a single port at the same time. Same behaviour is implemented in NVMe/RDMA target. Link: https://lore.kernel.org/r/20210524085225.29064-1-mgurtovoy@nvidia.com Reviewed-by: Alaa Hleihel Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit ad215aaea4f9d637f441566cdbbc610e9849e1fa Author: Bart Van Assche Date: Sun May 23 21:12:11 2021 -0700 RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent Define .init_cmd_priv and .exit_cmd_priv callback functions in struct scsi_host_template. Set .cmd_size such that the SCSI core allocates per-command private data. Use scsi_cmd_priv() to access that private data. Remove the req_ring pointer from struct srp_rdma_ch since it is no longer necessary. Convert srp_alloc_req_data() and srp_free_req_data() into functions that initialize one instance of the SRP-private command data. This is a micro-optimization since this patch removes several pointer dereferences from the hot path. Note: due to commit e73a5e8e8003 ("scsi: core: Only return started requests from scsi_host_find_tag()"), it is no longer necessary to protect the completion path against duplicate responses. Link: https://lore.kernel.org/r/20210524041211.9480-6-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 7ec2e27a3afff64c96bfe7a77685c33619db84be Author: Bart Van Assche Date: Sun May 23 21:12:10 2021 -0700 RDMA/srp: Fix a recently introduced memory leak Only allocate a memory registration list if it will be used and if it will be freed. Link: https://lore.kernel.org/r/20210524041211.9480-5-bvanassche@acm.org Reviewed-by: Max Gurtovoy Fixes: f273ad4f8d90 ("RDMA/srp: Remove support for FMR memory registration") Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 6dc26498e1d3d702b5321f380e24d3368765b351 Author: Bart Van Assche Date: Sun May 23 21:12:09 2021 -0700 RDMA/srp: Apply the __packed attribute to members instead of structures Applying the __packed attribute to an entire data structure results in suboptimal code on architectures that do not support unaligned accesses. Hence apply the __packed attribute only to those data members that are not naturally aligned. Link: https://lore.kernel.org/r/20210524041211.9480-4-bvanassche@acm.org Cc: Nicolas Morey-Chaisemartin Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit c838de1af141ee3bd23ea1781a7033375b54f35a Author: Bart Van Assche Date: Sun May 23 21:12:08 2021 -0700 RDMA/srp: Add more structure size checks Before modifying how the __packed attribute is used, add compile time size checks for the structures that will be modified. Link: https://lore.kernel.org/r/20210524041211.9480-3-bvanassche@acm.org Reviewed-by: Leon Romanovsky Cc: Nicolas Morey-Chaisemartin Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 17bb6b6bb50734a9e9629f08af8e251b5756b460 Author: Bart Van Assche Date: Sun May 23 21:12:07 2021 -0700 IB/hfi1: Move a function from a header file into a .c file Since ib_get_len() only has one caller, move it from a header file into a .c file. Additionally, remove the superfluous u16 cast. That cast was introduced by commit 7dafbab3753f ("IB/hfi1: Add functions to parse BTH/IB headers"). Link: https://lore.kernel.org/r/20210524041211.9480-2-bvanassche@acm.org Cc: Don Hiatt Cc: Dennis Dalessandro Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 68e11a6086b10e1a88d2b2c8432299f595db748d Author: Xi Wang Date: Fri May 21 17:29:55 2021 +0800 RDMA/hns: Clean the hardware related code for HEM Move the HIP06 related code to the hw v1 source file for HEM. Link: https://lore.kernel.org/r/1621589395-2435-6-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 82eb481da64586ccd287b2b2c5a086202c65e7eb Author: Weihang Li Date: Fri May 21 17:29:54 2021 +0800 RDMA/hns: Use refcount_t APIs for HEM refcount_t is better than integer for reference counting, it will WARN on overflow/underflow and avoid use-after-free risks. Link: https://lore.kernel.org/r/1621589395-2435-5-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 5e6370d7cc75134b0eb5b15916aab40b628db9e1 Author: Xi Wang Date: Fri May 21 17:29:53 2021 +0800 RDMA/hns: Fix wrong timer context buffer page size The HEM page size for QPC timer and CQC timer is always 4K and there's no need to calculate a different size by the hns driver, otherwise the ROCEE may access an invalid address. Fixes: 719d13415f59 ("RDMA/hns: Remove duplicated hem page size config code") Link: https://lore.kernel.org/r/1621589395-2435-4-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 1f704d8cc07269f31daf9bdafe84882ad7596a2c Author: Xi Wang Date: Fri May 21 17:29:52 2021 +0800 RDMA/hns: Refactor root BT allocation for MTR Split the hem_list_alloc_root_bt() into serval small functions to make the code flow more clear. Link: https://lore.kernel.org/r/1621589395-2435-3-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 7b0006db6800da4c05883584befa46502d85dede Author: Xi Wang Date: Fri May 21 17:29:51 2021 +0800 RDMA/hns: Optimize the base address table config for MTR The base address table is allocated by dma allocator, and the size is always aligned to PAGE_SIZE. If a fixed size is used to allocate the table, the number of base address entries stored in the table will be smaller than that can actually stored. Link: https://lore.kernel.org/r/1621589395-2435-2-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f06ad944b6a92dd9ce95f2e5f4164a8e70d32af5 Author: Florian Westphal Date: Fri May 28 12:30:07 2021 +0200 netfilter: nf_tables: remove unused arg in nft_set_pktinfo_unspec() The functions pass extra skb arg, but either its not used or the helpers can already access it via pkt->skb. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2d7b4ace0754ebaaf71c6824880178d46aa0ab33 Author: Florian Westphal Date: Fri May 28 12:30:06 2021 +0200 netfilter: nf_tables: add and use nft_thoff helper This allows to change storage placement later on without changing readers. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 85554eb981e5a8b0b8947611193aef1737081ef2 Author: Florian Westphal Date: Fri May 28 12:30:05 2021 +0200 netfilter: nf_tables: add and use nft_sk helper This allows to change storage placement later on without changing readers. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6802db48fc27b8d7f601e96a85771f2205702941 Author: Florian Westphal Date: Fri May 28 12:30:04 2021 +0200 netfilter: reduce size of nf_hook_state on 32bit platforms Reduce size from 28 to 24 bytes on 32bit platforms. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 586d5a8bcede47fda7bebf4b36be917c5010db16 Author: Florian Westphal Date: Fri May 28 12:30:03 2021 +0200 netfilter: x_tables: reduce xt_action_param by 8 byte The fragment offset in ipv4/ipv6 is a 16bit field, so use u16 instead of unsigned int. On 64bit: 40 bytes to 32 bytes. By extension this also reduces nft_pktinfo (56 to 48 byte). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e0241ae6ac59ffa318255640c047f7c90457fbe5 Author: Pablo Neira Ayuso Date: Mon May 17 14:43:08 2021 +0200 netfilter: use nfnetlink_unicast() Replace netlink_unicast() calls by nfnetlink_unicast() which already deals with translating EAGAIN to ENOBUFS as the nfnetlink core expects. nfnetlink_unicast() calls nlmsg_unicast() which returns zero in case of success, otherwise the netlink core function netlink_rcv_skb() turns err > 0 into an acknowlegment. Signed-off-by: Pablo Neira Ayuso commit 02d85142670b6676abcfd95023c8d28288dc5ad9 Author: Yang Li Date: Fri Apr 30 17:25:10 2021 +0800 netfilter: xt_CT: Remove redundant assignment to ret Variable 'ret' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed Clean up the following clang-analyzer warning: net/netfilter/xt_CT.c:175:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Pablo Neira Ayuso commit 07df3fc90a03919b5f1bc3b2fad0046a0aa0e2cb Author: Jason Baron Date: Thu Apr 29 12:26:13 2021 -0400 netfilter: x_tables: improve limit_mt scalability We've seen this spin_lock show up high in profiles. Let's introduce a lockless version. I've tested this using pktgen_sample01_simple.sh. Signed-off-by: Jason Baron Signed-off-by: Pablo Neira Ayuso commit 06f029930264ee8013fb76cfb591c6e1ad2f0dd0 Author: Juerg Haefliger Date: Mon May 17 11:58:50 2021 +0200 netfilter: Remove leading spaces in Kconfig Remove leading spaces before tabs in Kconfig file(s) by running the following command: $ find net/netfilter -name 'Kconfig*' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Juerg Haefliger Signed-off-by: Pablo Neira Ayuso commit f227925e53c3ecc168027e0015ab0a953d1bf013 Author: Florian Westphal Date: Thu May 13 22:29:56 2021 +0200 netfilter: nf_tables: prefer direct calls for set lookups Extend nft_set_do_lookup() to use direct calls when retpoline feature is enabled. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ffb35c679842b471d8bc42c6986daa3b373f57b2 Author: Gustavo A. R. Silva Date: Fri May 28 15:23:27 2021 -0500 r8169: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Heiner Kallweit Link: https://lore.kernel.org/r/20210528202327.GA39994@embeddedor Signed-off-by: Jakub Kicinski commit 4751d2aa321f2828d8c5d2f7ce4ed18a01e47f46 Author: Vladimir Oltean Date: Thu May 27 18:59:59 2021 +0300 net: stmmac: the XPCS obscures a potential "PHY not found" error stmmac_mdio_register() has logic to search for PHYs on the MDIO bus and assign them IRQ lines, as well as to set priv->plat->phy_addr. If no PHY is found, the "found" variable remains set to 0 and the function errors out. After the introduction of commit f213bbe8a9d6 ("net: stmmac: Integrate it with DesignWare XPCS"), the "found" variable was immediately reused for searching for a PCS on the same MDIO bus. This can result in 2 types of potential problems (none of them seems to be seen on the only Intel system that sets has_xpcs = true, otherwise it would have been reported): 1. If a PCS is found but a PHY is not, then the code happily exits with no error. One might say "yes, but this is not possible, because of_mdiobus_register will probe a PHY for all MDIO addresses, including for the XPCS, so if an XPCS exists, then a PHY certainly exists too". Well, that is not true, see intel_mgbe_common_data(): /* Ensure mdio bus scan skips intel serdes and pcs-xpcs */ plat->mdio_bus_data->phy_mask = 1 << INTEL_MGBE_ADHOC_ADDR; plat->mdio_bus_data->phy_mask |= 1 << INTEL_MGBE_XPCS_ADDR; 2. A PHY is found but an MDIO device with the XPCS PHY ID isn't, and in that case, the error message will be "No PHY found". Confusing. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210527155959.3270478-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski commit 1ab4fe09977e9f32a6992072c648865fcd36b750 Author: Krzysztof Kozlowski Date: Fri May 28 08:42:00 2021 -0400 nfc: st95hf: mark ACPI and OF device ID tables as maybe unused The driver can match either via OF or ACPI ID tables. If one configuration is disabled, the table will be unused: drivers/nfc/st95hf/core.c:1059:34: warning: ‘st95hf_spi_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-12-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 80627802349242de2387a768475e2429e40e061c Author: Krzysztof Kozlowski Date: Fri May 28 08:41:59 2021 -0400 nfc: st21nfca: mark ACPI and OF device ID tables as maybe unused The driver can match either via OF or ACPI ID tables. If one configuration is disabled, the table will be unused: drivers/nfc/st21nfca/i2c.c:593:34: warning: ‘of_st21nfca_i2c_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-11-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 255fcc7b71666bd3275ac0a4476e91d175ac9223 Author: Krzysztof Kozlowski Date: Fri May 28 08:41:58 2021 -0400 nfc: st-nci: mark ACPI and OF device ID tables as maybe unused The driver can match either via OF or ACPI ID tables. If one configuration is disabled, the table will be unused: drivers/nfc/st-nci/spi.c:296:34: warning: ‘of_st_nci_spi_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-10-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit aa1405772fe13f4ec74d50610facd3fb7f6d998d Author: Krzysztof Kozlowski Date: Fri May 28 08:41:57 2021 -0400 nfc: pn544: mark ACPI and OF device ID tables as maybe unused The driver can match either via OF or ACPI ID tables. If one configuration is disabled, the table will be unused: drivers/nfc/pn544/i2c.c:53:36: warning: ‘pn544_hci_i2c_acpi_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-9-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 5edc94265e195e7e8cbc19dd4ee09f001a46fb34 Author: Krzysztof Kozlowski Date: Fri May 28 08:41:56 2021 -0400 nfc: s3fwrn5: mark OF device ID tables as maybe unused The driver can match either via OF or I2C ID tables. If OF is disabled, the table will be unused: drivers/nfc/s3fwrn5/i2c.c:265:34: warning: ‘of_s3fwrn5_i2c_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-8-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit b3a790d4374981732202fd13d6634c439bad9cfe Author: Krzysztof Kozlowski Date: Fri May 28 08:41:55 2021 -0400 nfc: pn533: mark OF device ID tables as maybe unused The driver can match either via OF or I2C ID tables. If OF is disabled, the table will be unused: drivers/nfc/pn533/i2c.c:252:34: warning: ‘of_pn533_i2c_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-7-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 41a6bf50ee04a604f84ba8989055781d68061ed6 Author: Krzysztof Kozlowski Date: Fri May 28 08:41:54 2021 -0400 nfc: mrvl: skip impossible NCI_MAX_PAYLOAD_SIZE check The nci_ctrl_hdr.plen field us u8, so checkign if it is bigger than NCI_MAX_PAYLOAD_SIZE does not make any sense. Fix warning reported by Smatch: drivers/nfc/nfcmrvl/i2c.c:52 nfcmrvl_i2c_read() warn: impossible condition '(nci_hdr.plen > 255) => (0-255 > 255)' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-6-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 26f20ff5e207ed87340fc574cb3b360a2581272c Author: Krzysztof Kozlowski Date: Fri May 28 08:41:53 2021 -0400 nfc: mrvl: mark OF device ID tables as maybe unused The driver can match either via OF or I2C ID tables. If OF is disabled, the table will be unused: drivers/nfc/nfcmrvl/spi.c:199:34: warning: ‘of_nfcmrvl_spi_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-5-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit a70bbbe387d0944975d5016f1ba3be1e6b4c3971 Author: Krzysztof Kozlowski Date: Fri May 28 08:41:52 2021 -0400 nfc: pn533: drop of_match_ptr from device ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might be not relevant here). This fixes compile warning (!CONFIG_OF): drivers/nfc/pn533/i2c.c:252:34: warning: ‘of_pn533_i2c_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-4-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit a548bee9ffe89018932886680b09e2eedeefb14e Author: Krzysztof Kozlowski Date: Fri May 28 08:41:51 2021 -0400 nfc: port100: correct kerneldoc for structure The port100_in_rf_setting structure does not contain valid kerneldoc docummentation, unlike the port100_tg_rf_setting structure. Correct the kerneldoc to fix W=1 warnings: warning: This comment starts with '/**', but isn't a kernel-doc comment. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-3-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 466e1c889c7134462aca62c683aab5512fea2f93 Author: Krzysztof Kozlowski Date: Fri May 28 08:41:50 2021 -0400 nfc: fdp: drop ACPI_PTR from device ID table The driver can match only via the ACPI ID table so the table should be always used and the ACPI_PTR does not have any sense. This fixes fixes compile warning (!CONFIG_ACPI): drivers/nfc/fdp/i2c.c:362:36: warning: ‘fdp_nci_i2c_acpi_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-2-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit cd4375d621aa0adda527640b421fad969bf0c9bd Author: Krzysztof Kozlowski Date: Fri May 28 08:41:49 2021 -0400 nfc: fdp: correct kerneldoc for structure Since structure comments are not kerneldoc, remove the double ** to fix W=1 warnings: warning: This comment starts with '/**', but isn't a kernel-doc comment. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210528124200.79655-1-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 460a9aa23de6eda55734411e3301838a9033b8b9 Author: Lorenzo Bianconi Date: Fri May 28 16:06:35 2021 +0200 samples: pktgen: add UDP tx checksum support Introduce k parameter in pktgen samples in order to toggle UDP tx checksum Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/cf16417902062c6ea2fd3c79e00510e36a40c31a.1622210713.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 69db725cdb2b803af67897a08ea54467d11f6020 Author: Grygorii Strashko Date: Wed May 26 16:20:41 2021 +0300 arm64: dts: ti: k3-am654x/j721e/j7200-common-proc-board: Fix MCU_RGMII1_TXC direction The MCU RGMII MCU_RGMII1_TXC pin is defined as input by mistake, although this does not make any difference functionality wise it's better to update to avoid confusion. Hence fix MCU RGMII MCU_RGMII1_TXC pin pinmux definitions to be an output in K3 am654x/j721e/j7200 board files. Signed-off-by: Grygorii Strashko Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210526132041.6104-1-grygorii.strashko@ti.com commit a2894d85f44ba3f2bdf5806c8dc62e2ec40c1c09 Author: Roger Quadros Date: Wed May 12 21:03:08 2021 +0530 arm64: dts: ti: j7200-main: Enable USB2 PHY RX sensitivity workaround Enable work around feature built into the controller to address issue with RX Sensitivity for USB2 PHY. Fixes: 6197d7139d12 ("arm64: dts: ti: k3-j7200-main: Add USB controller") Signed-off-by: Roger Quadros Signed-off-by: Aswath Govindraju Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210512153308.5840-1-a-govindraju@ti.com commit 6ec8ba764165f6ecb6f6f7efbfd2ec7ad76dedcb Author: Aswath Govindraju Date: Fri Apr 23 12:17:57 2021 +0530 arm64: dts: ti: k3-j7200: Remove "#address-cells" property from GPIO DT nodes GPIO device tree nodes do not have child nodes. Therefore, "#address-cells" property should not be added. Fixes: e0b2e6af39ea ("arm64: dts: ti: k3-j7200: Add gpio nodes") Signed-off-by: Aswath Govindraju Reviewed-by: Lokesh Vutla Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210423064758.25520-1-a-govindraju@ti.com commit ec2fb989d03e7f79f7cd901cf9abf40aebba7acf Author: Aswath Govindraju Date: Fri Apr 23 11:31:33 2021 +0530 arm64: dts: ti: k3-am64-mcu: Fix the compatible string in GPIO DT node Fix the compatible string in mcu domain GPIO device tree node. Fixes: 01a91e01b8fd ("arm64: dts: ti: k3-am64: Add GPIO DT nodes") Signed-off-by: Aswath Govindraju Reviewed-by: Lokesh Vutla Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210423060133.16473-1-a-govindraju@ti.com commit 38e9673ce08ff22ede59ecafb2626b7a5c009d30 Merge: f6bb63cd05491 2744fa2dfdcd3 Author: Jakub Kicinski Date: Fri May 28 14:08:13 2021 -0700 Merge branch 'net-hdlc_fr-clean-up-some-code-style-issues' Peng Li says: ==================== net: hdlc_fr: clean up some code style issues V1 -> V2: 1, Use appropriate commit prefix suggested by Jakub Kicinski, replace commit prefix "net: wan" by "net: hdlc_fr". ==================== Link: https://lore.kernel.org/r/1622160769-6678-1-git-send-email-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski commit 2744fa2dfdcd390c03056b50de8563da9d0f1660 Author: Peng Li Date: Fri May 28 08:12:49 2021 +0800 net: hdlc_fr: remove unnecessary out of memory message This patch removes unnecessary out of memory message, to fix the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit c9a2ca5d7e58860d56ce5e7b74f7621cebf819de Author: Peng Li Date: Fri May 28 08:12:48 2021 +0800 net: hdlc_fr: remove redundant braces {} This patch removes redundant braces {}, to fix the checkpatch.pl warning: "braces {} are not necessary for any arm of this statement" Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 5d650a6c7b9cb75c48a75b2593a48a307c8b91f1 Author: Peng Li Date: Fri May 28 08:12:47 2021 +0800 net: hdlc_fr: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 8f032c6535fecb29a90915c566f6851146e9ebb6 Author: Peng Li Date: Fri May 28 08:12:46 2021 +0800 net: hdlc_fr: remove space after '!' According to the chackpatch.pl, space prohibited after that '!'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 683b54bb468fdae45659cbd082267053d32865ba Author: Peng Li Date: Fri May 28 08:12:45 2021 +0800 net: hdlc_fr: code indent use tabs where possible Code indent should use tabs where possible. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 168a196ffcff6aee6834cf73fc60d5cc387a0d85 Author: Peng Li Date: Fri May 28 08:12:44 2021 +0800 net: hdlc_fr: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 30e7720d379ad868ae7a510457ad8f2bf44ef056 Author: Peng Li Date: Fri May 28 08:12:43 2021 +0800 net: hdlc_fr: add some required spaces Add spaces required after that close brace '}'. Add spaces required before the open parenthesis '('. Add spaces required after that ','. Add spaces required around that '='. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 7aad0642599162771653f8433ad473c24f556c83 Author: Peng Li Date: Fri May 28 08:12:42 2021 +0800 net: hdlc_fr: fix an code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" and should be "foo *bar", and "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit 4a9ab454ae9bda262802179cae4f5700736e8bd6 Author: Peng Li Date: Fri May 28 08:12:41 2021 +0800 net: hdlc_fr: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit b11faec368704d5e18e345e67ea3ba0d58628113 Author: Peng Li Date: Fri May 28 08:12:40 2021 +0800 net: hdlc_fr: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: Jakub Kicinski commit f6bb63cd05491283709cd90fcba98a49f0da691c Merge: af9207adb6d99 744ee14054c8c Author: Jakub Kicinski Date: Fri May 28 13:59:18 2021 -0700 Merge branch 'mptcp-miscellaneous-cleanup' Mat Martineau says: ==================== mptcp: Miscellaneous cleanup Here are some cleanup patches we've collected in the MPTCP tree. Patches 1-4 do some general tidying. Patch 5 adds an explicit check at netlink command parsing time to require a port number when the 'signal' flag is set, to catch the error earlier. Patches 6 & 7 fix up the MPTCP 'enabled' sysctl, enforcing it as a boolean value, and ensuring that the !CONFIG_SYSCTL build still works after the boolean change. ==================== Link: https://lore.kernel.org/r/20210527235430.183465-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 744ee14054c8ca5ad0fe3ab9172709c17d8a240a Author: Matthieu Baerts Date: Thu May 27 16:54:30 2021 -0700 mptcp: restrict values of 'enabled' sysctl To avoid confusions, it seems better to parse this sysctl parameter as a boolean. We use it as a boolean, no need to parse an integer and bring confusions if we see a value different from 0 and 1, especially with this parameter name: enabled. It seems fine to do this modification because the default value is 1 (enabled). Then the only other interesting value to set is 0 (disabled). All other values would not have changed the default behaviour. Suggested-by: Florian Westphal Acked-by: Florian Westphal Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 804c72eeecd2cd38567b64f868cc8c63202cf1a2 Author: Matthieu Baerts Date: Thu May 27 16:54:29 2021 -0700 mptcp: support SYSCTL only if enabled Since the introduction of the sysctl support in MPTCP with commit 784325e9f037 ("mptcp: new sysctl to control the activation per NS"), we don't check CONFIG_SYSCTL. Until now, that was not an issue: the register and unregister functions were replaced by NO-OP one if SYSCTL was not enabled in the config. The only thing we could have avoid is not to reserve memory for the table but that's for the moment only a small table per net-ns. But the following commit is going to use SYSCTL_ZERO and SYSCTL_ONE which are not be defined if SYSCTL is not enabled in the config. This causes 'undefined reference' errors from the linker. Reported-by: kernel test robot Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit eb5fb629f56da3f40f496c807da44a7ce7644779 Author: Jianguo Wu Date: Thu May 27 16:54:28 2021 -0700 mptcp: make sure flag signal is set when add addr with port When add address with port, it is mean to create a listening socket, and send an ADD_ADDR to remote, so it must have flag signal set, add this check in mptcp_pm_parse_addr(). Fixes: a77e9179c7651 ("mptcp: deal with MPTCP_PM_ADDR_ATTR_PORT in PM netlink") Acked-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit ae514983f2e416cb1476bdd8e23b6d9be4ce94cd Author: Jianguo Wu Date: Thu May 27 16:54:27 2021 -0700 mptcp: remove redundant initialization in pm_nl_init_net() Memory of struct pm_nl_pernet{} is allocated by kzalloc() in setup_net()->ops_init(), so it's no need to reset counters and zero bitmap in pm_nl_init_net(). Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 0a4d8e96e4fd687af92b961d5cdcea0fdbde05fe Author: Jianguo Wu Date: Thu May 27 16:54:26 2021 -0700 mptcp: generate subflow hmac after mptcp_finish_join() For outgoing subflow join, when recv SYNACK, in subflow_finish_connect(), the mptcp_finish_join() may return false in some cases, and send a RESET to remote, and no local hmac is required. So generate subflow hmac after mptcp_finish_join(). Fixes: ec3edaa7ca6c ("mptcp: Add handling of outgoing MP_JOIN requests") Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit c68a0cd1735fe09fa7c1a7de1f11a5b674f1c549 Author: Jianguo Wu Date: Thu May 27 16:54:25 2021 -0700 mptcp: using TOKEN_MAX_RETRIES instead of magic number We have macro TOKEN_MAX_RETRIES for the number of token generate retries, so using TOKEN_MAX_RETRIES in subflow_check_req(). And rename TOKEN_MAX_RETRIES to MPTCP_TOKEN_MAX_RETRIES as it is now exposed. Fixes: 535fb8152f31 ("mptcp: token: move retry to caller") Reviewed-by: Matthieu Baerts Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 2f1af441fd5dd5caf0807bb19ce9bbf9325ce534 Author: Jianguo Wu Date: Thu May 27 16:54:24 2021 -0700 mptcp: fix pr_debug in mptcp_token_new_connect After commit 2c5ebd001d4f ("mptcp: refactor token container"), pr_debug() is called before mptcp_crypto_key_gen_sha() in mptcp_token_new_connect(), so the output local_key, token and idsn are 0, like: MPTCP: ssk=00000000f6b3c4a2, local_key=0, token=0, idsn=0 Move pr_debug() after mptcp_crypto_key_gen_sha(). Fixes: 2c5ebd001d4f ("mptcp: refactor token container") Acked-by: Paolo Abeni Signed-off-by: Jianguo Wu Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit e8e0f0f484780d7b90a63ea50020ac4bb027178d Author: Hangbin Liu Date: Thu May 27 22:43:56 2021 -0400 bpf, devmap: Remove drops variable from bq_xmit_all() As Colin pointed out, the first drops assignment after declaration will be overwritten by the second drops assignment before using, which makes it useless. Since the drops variable will be used only once. Just remove it and use "cnt - sent" in trace_xdp_devmap_xmit(). Fixes: cb261b594b41 ("bpf: Run devmap xdp_prog on flush instead of bulk enqueue") Reported-by: Colin Ian King Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210528024356.24333-1-liuhangbin@gmail.com commit fc8c262e0eb5aa248af5051377e4ff3348841ac5 Author: Yonghong Song Date: Wed May 26 08:24:57 2021 -0700 bpf, docs: Add llvm_reloc.rst to explain llvm bpf relocations LLVM upstream commit https://reviews.llvm.org/D102712 made some changes to bpf relocations to make them llvm linker lld friendly. The scope of existing relocations R_BPF_64_{64,32} is narrowed and new relocations R_BPF_64_{ABS32,ABS64,NODYLD32} are introduced. Let us add some documentation about llvm bpf relocations so people can understand how to resolve them properly in their respective tools. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210526152457.335210-1-yhs@fb.com commit 0974cff3eb66764cc86b60f1071958acc432a4e8 Author: Florian Westphal Date: Thu May 13 22:29:55 2021 +0200 netfilter: add and use nft_set_do_lookup helper Followup patch will add a CONFIG_RETPOLINE wrapper to avoid the ops->lookup() indirection cost for retpoline builds. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a58db7ad80e89dab014bd2d769c233eeca1bf519 Author: Stefano Brivio Date: Mon May 10 07:58:52 2021 +0200 netfilter: nft_set_pipapo_avx2: Skip LDMXCSR, we don't need a valid MXCSR state We don't need a valid MXCSR state for the lookup routines, none of the instructions we use rely on or affect any bit in the MXCSR register. Instead of calling kernel_fpu_begin(), we can pass 0 as mask to kernel_fpu_begin_mask() and spare one LDMXCSR instruction. Commit 49200d17d27d ("x86/fpu/64: Don't FNINIT in kernel_fpu_begin()") already speeds up lookups considerably, and by dropping the MCXSR initialisation we can now get a much smaller, but measurable, increase in matching rates. The table below reports matching rates and a wild approximation of clock cycles needed for a match in a "port,net" test with 10 entries from selftests/netfilter/nft_concat_range.sh, limited to the first field, i.e. the port (with nft_set_rbtree initialisation skipped), run on a single AMD Epyc 7351 thread (2.9GHz, 512 KiB L1D$, 8 MiB L2$). The (very rough) estimation of clock cycles is obtained by simply dividing frequency by matching rate. The "cycles spared" column refers to the difference in cycles compared to the previous row, and the rate increase also refers to the previous row. Results are averages of six runs. Merely for context, I'm also reporting packet rates obtained by skipping kernel_fpu_begin() and kernel_fpu_end() altogether (which shows a very limited impact now), as well as skipping the whole lookup function, compared to simply counting and dropping all packets using the netdev hook drop (see nft_concat_range.sh for details). This workload also includes packet generation with pktgen and the receive path of veth. |matching| est. | cycles | rate | | rate | cycles | spared |increase| | (Mpps) | | | | --------------------------------------|--------|--------|--------|--------| FNINIT, LDMXCSR (before 49200d17d27d) | 5.245 | 553 | - | - | LDMXCSR only (with 49200d17d27d) | 6.347 | 457 | 96 | 21.0% | Without LDMXCSR (this patch) | 6.461 | 449 | 8 | 1.8% | -------- for reference only: ---------|--------|--------|--------|--------| Without kernel_fpu_begin() | 6.513 | 445 | 4 | 0.8% | Without actual matching (return true) | 7.649 | 379 | 66 | 17.4% | Without lookup operation (netdev drop)| 10.320 | 281 | 98 | 34.9% | The clock cycles spared by avoiding LDMXCSR appear to be in line with CPI and latency indicated in the manuals of comparable architectures: Intel Skylake (CPI: 1, latency: 7) and AMD 12h (latency: 12) -- I couldn't find this information for AMD 17h. Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 133dc203d77dff617d9c4673973ef3859be2c476 Author: Phil Sutter Date: Tue May 4 17:54:06 2021 +0200 netfilter: nft_exthdr: Support SCTP chunks Chunks are SCTP header extensions similar in implementation to IPv6 extension headers or TCP options. Reusing exthdr expression to find and extract field values from them is therefore pretty straightforward. For now, this supports extracting data from chunks at a fixed offset (and length) only - chunks themselves are an extensible data structure; in order to make all fields available, a nested extension search is needed. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 9029b9b2ae1355366530e43890fd6aa5db39e91e Author: Hsin-Yi Wang Date: Thu May 27 15:55:55 2021 +0800 i2c: mediatek: mt65xx: add optional vbus-supply Add vbus-supply which provides power to SCL/SDA. Pass this regulator into core so it can be turned on/off for low power mode support. Signed-off-by: Hsin-Yi Wang Reviewed-by: Matthias Brugger Reviewed-by: Qii Wang Signed-off-by: Wolfram Sang commit c021087c43c8f9b0bb070a85d49f2e3ac450c43e Author: Hsin-Yi Wang Date: Thu May 27 15:55:54 2021 +0800 dt-binding: i2c: mt65xx: add vbus-supply property Add vbus-supply property for mt65xx. The regulator can be passed into core and turned off during suspend/sleep to reduce power consumption. Signed-off-by: Hsin-Yi Wang Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 5a7b95fb993ec399c8a685552aa6a8fc995c40bd Author: Bibby Hsieh Date: Thu May 27 15:55:53 2021 +0800 i2c: core: support bus regulator controlling in adapter Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We can control bulk regulator if it is provided in i2c adapter device. Signed-off-by: Bibby Hsieh Signed-off-by: Marek Szyprowski Signed-off-by: Hsin-Yi Wang Reviewed-by: Matthias Brugger Signed-off-by: Wolfram Sang commit 872b68e9750eddd086b93a6004ebe82c64aef670 Author: Johan Jonker Date: Sun Jan 31 13:50:16 2021 +0100 drm/rockchip: vop: add PX30 version info To reduce memory various Rockchip VOP versions share common reg structures. However more recent added SoCs not always have to same futures as the old ones. Add PX30 missing version info, so all VOP version checks work correct if needed in the future. Signed-off-by: Johan Jonker Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210131125016.10837-1-jbx6244@gmail.com commit ce0cb93a5adb283f577cd4661f511047b5e39028 Author: Colin Ian King Date: Tue Sep 15 17:20:49 2020 +0100 drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result The variable bit_per_pix is a u8 and is promoted in the multiplication to an int type and then sign extended to a u64. If the result of the int multiplication is greater than 0x7fffffff then the upper 32 bits will be set to 1 as a result of the sign extension. Avoid this by casting tu_size_reg to u64 to avoid sign extension and also a potential overflow. Fixes: 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399") Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20200915162049.36434-1-colin.king@canonical.com commit 5e6b8a50a7cec5686ee2c4bda1d49899c79a7eae Author: Yang Yingliang Date: Wed May 26 22:38:05 2021 +0800 cred: add missing return error code when set_cred_ucounts() failed If set_cred_ucounts() failed, we need return the error code. Fixes: 905ae01c4ae2 ("Add a reference to ucounts for each cred") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lkml.kernel.org/r/20210526143805.2549649-1-yangyingliang@huawei.com Reviewed-by: Alexey Gladkov Signed-off-by: Eric W. Biederman commit 3dfa159f6b0c054eb63673fbf643a5f2cc862e63 Author: Christophe JAILLET Date: Sat May 1 17:13:16 2021 +0200 drm/rockchip: lvds: Fix an error handling path 'ret' is know to be 0 a this point. Checking the return value of 'phy_init()' and 'phy_set_mode()' was intended instead. So add the missing assignments. Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support") Signed-off-by: Christophe JAILLET Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/248220d4815dc8c8088cebfab7d6df5f70518438.1619881852.git.christophe.jaillet@wanadoo.fr commit 7455cedf7c4d4d5d808913e14d859705612c54ce Author: Jiapeng Chong Date: Thu Apr 15 16:47:01 2021 +0800 drm/rockchip: remove unused function Fix the following clang warning: drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:320:20: warning: unused function 'dsi_set' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/1618476421-114429-1-git-send-email-jiapeng.chong@linux.alibaba.com commit b354498bbe65c917d521b3b56317ddc9ab217425 Author: Thomas Hebb Date: Sun Apr 18 19:03:04 2021 -0700 drm/rockchip: dsi: remove extra component_del() call commit cf6d100dd238 ("drm/rockchip: dsi: add dual mipi support") added this devcnt field and call to component_del(). However, these both appear to be erroneous changes left over from an earlier version of the patch. In the version merged, nothing ever modifies devcnt, meaning component_del() runs unconditionally and in addition to the component_del() calls in dw_mipi_dsi_rockchip_host_detach(). The second call fails to delete anything and produces a warning in dmesg. If we look at the previous version of the patch[1], however, we see that it had logic to calculate devcnt and call component_add() in certain situations. This was removed in v6, and the fact that the deletion code was not appears to have been an oversight. [1] https://patchwork.kernel.org/project/dri-devel/patch/20180821140515.22246-8-heiko@sntech.de/ Fixes: cf6d100dd238 ("drm/rockchip: dsi: add dual mipi support") Cc: stable@vger.kernel.org Signed-off-by: Thomas Hebb Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/201385acb0eeb5dfb037afdc6a94bfbcdab97f99.1618797778.git.tommyhebb@gmail.com commit 43c2de1002d2b70fb5941fa14e97a34e3dc214d4 Author: Thomas Hebb Date: Sun Apr 18 19:04:10 2021 -0700 drm/rockchip: dsi: move all lane config except LCDC mux to bind() When we first enable the DSI encoder, we currently program some per-chip configuration that we look up in rk3399_chip_data based on the device tree compatible we match. This data configures various parameters of the MIPI lanes, including on RK3399 whether DSI1 is slaved to DSI0 in a dual-mode configuration. It also selects which LCDC (i.e. VOP) to scan out from. This causes a problem in RK3399 dual-mode configurations, though: panel prepare() callbacks run before the encoder gets enabled and expect to be able to write commands to the DSI bus, but the bus isn't fully functional until the lane and master/slave configuration have been programmed. As a result, dual-mode panels (and possibly others too) fail to turn on when the rockchipdrm driver is initially loaded. Because the LCDC mux is the only thing we don't know until enable time (and is the only thing that can ever change), we can actually move most of the initialization to bind() and get it out of the way early. That's what this change does. (Rockchip's 4.4 BSP kernel does it in mode_set(), which also avoids the issue, but bind() seems like the more correct place to me.) Tested on a Google Scarlet board (Acer Chromebook Tab 10), which has a Kingdisplay KD097D04 dual-mode panel. Prior to this change, the panel's backlight would turn on but no image would appear when initially loading rockchipdrm. If I kept rockchipdrm loaded and reloaded the panel driver, it would come on. With this change, the panel successfully turns on during initial rockchipdrm load as expected. Fixes: 2d4f7bdafd70 ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver") Signed-off-by: Thomas Hebb Tested-by: Jonathan Liu Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/55fe7f3454d8c91dc3837ba5aa741d4a0e67378f.1618797813.git.tommyhebb@gmail.com commit c0677e41a47fbb37c4ed7200e5c7f610a2ffbd4b Author: Peter Robinson Date: Thu May 6 10:29:51 2021 +0100 drm/rockchip: cdn-dp-core: add MODULE_FIRMWARE macro The CDP DP component of the rockchip GPU driver requires firmware so define MODULE_FIRMWARE for rockchip/dptx.bin so the details are available in the module info. Signed-off-by: Peter Robinson Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210506092951.515813-1-pbrobinson@gmail.com commit ae41d925c75b53798f289c69ee8d9f7d36432f6d Author: Yang Yingliang Date: Wed May 19 21:49:28 2021 +0800 drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf_write() After calling clk_prepare_enable(), clk_disable_unprepare() need be called when calling regmap_write() failed. Fixes: 1a0f7ed3abe2 ("drm/rockchip: cdn-dp: add cdn DP support for rk3399") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210519134928.2696617-1-yangyingliang@huawei.com commit 046e0db975695540c9d9898cdbf0b60533d28afb Author: Alex Bee Date: Fri May 28 15:05:54 2021 +0200 drm: rockchip: set alpha_en to 0 if it is not used alpha_en should be set to 0 if it is not used, i.e. to disable alpha blending if it was enabled before and should be disabled now. Fixes: 2aae8ed1f390 ("drm/rockchip: Add per-pixel alpha support for the PX30 VOP") Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-6-knaerzche@gmail.com commit d099fa672cbe8766d9182e0fd04c65058200128a Author: Alex Bee Date: Fri May 28 15:05:53 2021 +0200 drm: rockchip: add alpha support for RK3036, RK3066, RK3126 and RK3188 With commit 2aae8ed1f390 ("drm/rockchip: Add per-pixel alpha support for the PX30 VOP") alpha support was introduced for PX30's VOP. RK3036, RK3066, RK3126 and RK3188 VOPs support alpha blending in the same manner. With the exception of RK3066 all of them support pre-multiplied alpha. Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-5-knaerzche@gmail.com commit 742203cd56d150eb7884eb45abb7d9dbc2bdbf04 Author: Alex Bee Date: Fri May 28 15:05:52 2021 +0200 drm: rockchip: add missing registers for RK3066 Add dither_up, dsp_lut_en and data_blank registers to enable their respective functionality for RK3066's VOP. While at that also fix .rb_swap and .format registers for all windows, which have to be set though RK3066_SYS_CTRL1 register. Also remove .scl from win1: Scaling is only supported on the primary plane. Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-4-knaerzche@gmail.com commit ab64b448a175b8a5a4bd323b8f74758c2574482c Author: Alex Bee Date: Fri May 28 15:05:51 2021 +0200 drm: rockchip: add missing registers for RK3188 Add dither_up, dsp_lut_en and data_blank registers to enable their respective functionality for RK3188's VOP. While at that also fix .dsp_blank register which is (only) set with BIT24 (same as RK3066) Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-3-knaerzche@gmail.com commit 53c2710c0d92e615c9fffcc64aa963dfa0e100a7 Author: Alex Bee Date: Fri May 28 15:05:50 2021 +0200 drm: rockchip: add scaling for RK3036 win1 Add the registers needed to make scaling work on RK3036's win1. Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-2-knaerzche@gmail.com commit b8928c2b5dba7484a80077d12be702ff71d8190f Author: Thierry Reding Date: Tue Mar 30 20:18:31 2021 +0200 arm64: tegra: Consolidate audio card names The current scheme for audio card names is suboptimal because it causes the automatically generated names (for ID and driver) to be truncated, which in turn can cause conflicts. Introduce a new scheme which reuses the board model for the names and appends the "HDA" and "APE" suffixes for the HDA and APE, respectively. As a side-effect these suffixes end up being used as the ID of the SoC sound cards which makes it easy for users to select them when using the ALSA command-line utilities, for example. As a separate measure, the driver name for the cards is now set by the corresponding audio driver (either tegra-hda or tegra-ape), making it a more useful identifier than the currently normalized card name. Signed-off-by: Thierry Reding commit d67113c261c196232c96dbed1ff2fbd071c8c457 Author: Johan Jonker Date: Thu May 20 11:18:22 2021 +0200 ARM: dts: rockchip: move mmc aliases to board dts on rk3066/rk3188 As suggested by Arnd Bergmann, the newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Suggested-by: Arnd Bergmann Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210520091822.28491-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2adafc0512625bbd090dc37a353ddda15d525e9d Author: Alex Bee Date: Fri May 28 16:07:36 2021 +0200 clk: rockchip: export ACLK_VCODEC for RK3036 It is required for the series at [1] to let hantro driver aquire the clock and set the rate for RK3036 correctly, but I didn't want to add a patch for yet another subsystem to this series. [1] https://lore.kernel.org/linux-media/20210525152225.154302-1-knaerzche@gmail.com/ Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20210528140736.79686-1-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 9e79e58f330ea4860f2ced65a8a35dfb05fc03c1 Author: Jon Hunter Date: Wed May 19 17:41:35 2021 +0100 arm64: tegra: Add PMU node for Tegra194 Populate the device-tree node for the PMU device on Tegra194. This also fixes the following warning that is observed on booting Tegra194. ERR KERN kvm: pmu event creation failed -2 Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 15845cbcd12a571869c6703892427f9e5839d5fb Author: Christian Brauner Date: Fri May 28 11:24:17 2021 +0200 test: add openat2() test for invalid upper 32 bit flag value Test that openat2() rejects unknown flags in the upper 32 bit range. Link: https://lore.kernel.org/r/20210528092417.3942079-4-brauner@kernel.org Cc: Richard Guy Briggs Cc: Aleksa Sarai Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Richard Guy Briggs Signed-off-by: Christian Brauner commit cfe80306a0dd6d363934913e47c3f30d71b721e5 Author: Christian Brauner Date: Fri May 28 11:24:16 2021 +0200 open: don't silently ignore unknown O-flags in openat2() The new openat2() syscall verifies that no unknown O-flag values are set and returns an error to userspace if they are while the older open syscalls like open() and openat() simply ignore unknown flag values: #define O_FLAG_CURRENTLY_INVALID (1 << 31) struct open_how how = { .flags = O_RDONLY | O_FLAG_CURRENTLY_INVALID, .resolve = 0, }; /* fails */ fd = openat2(-EBADF, "/dev/null", &how, sizeof(how)); /* succeeds */ fd = openat(-EBADF, "/dev/null", O_RDONLY | O_FLAG_CURRENTLY_INVALID); However, openat2() silently truncates the upper 32 bits meaning: #define O_FLAG_CURRENTLY_INVALID_LOWER32 (1 << 31) #define O_FLAG_CURRENTLY_INVALID_UPPER32 (1 << 40) struct open_how how_lowe32 = { .flags = O_RDONLY | O_FLAG_CURRENTLY_INVALID_LOWER32, }; struct open_how how_upper32 = { .flags = O_RDONLY | O_FLAG_CURRENTLY_INVALID_UPPER32, }; /* fails */ fd = openat2(-EBADF, "/dev/null", &how_lower32, sizeof(how_lower32)); /* succeeds */ fd = openat2(-EBADF, "/dev/null", &how_upper32, sizeof(how_upper32)); Fix this by preventing the immediate truncation in build_open_flags(). There's a snafu here though stripping FMODE_* directly from flags would cause the upper 32 bits to be truncated as well due to integer promotion rules since FMODE_* is unsigned int, O_* are signed ints (yuck). In addition, struct open_flags currently defines flags to be 32 bit which is reasonable. If we simply were to bump it to 64 bit we would need to change a lot of code preemptively which doesn't seem worth it. So simply add a compile-time check verifying that all currently known O_* flags are within the 32 bit range and fail to build if they aren't anymore. This change shouldn't regress old open syscalls since they silently truncate any unknown values anyway. It is a tiny semantic change for openat2() but it is very unlikely people pass ing > 32 bit unknown flags and the syscall is relatively new too. Link: https://lore.kernel.org/r/20210528092417.3942079-3-brauner@kernel.org Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Reported-by: Richard Guy Briggs Reviewed-by: Christoph Hellwig Reviewed-by: Aleksa Sarai Reviewed-by: Richard Guy Briggs Signed-off-by: Christian Brauner commit 5c350aa11b441b32baf3bfe4018168cb8d10cef7 Author: Christian Brauner Date: Fri May 28 11:24:15 2021 +0200 fcntl: remove unused VALID_UPGRADE_FLAGS We currently do not maky use of this feature and should we implement something like this in the future it's trivial to add it back. Link: https://lore.kernel.org/r/20210528092417.3942079-2-brauner@kernel.org Cc: Christoph Hellwig Cc: Aleksa Sarai Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Suggested-by: Richard Guy Briggs Reviewed-by: Richard Guy Briggs Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 40cd0aae5957ec175b73dc17dce6079d33fa74f6 Author: Tony Luck Date: Thu May 27 15:28:46 2021 -0700 x86/mce: Include a MCi_MISC value in faked mce logs When BIOS reports memory errors to Linux using the ACPI/APEI error reporting method Linux creates a "struct mce" to pass to the normal reporting code path. The constructed record doesn't include a value for the "misc" field of the structure, and so mce_usable_address() says this record doesn't include a valid address. Net result is that functions like uc_decode_notifier() will just ignore this record instead of taking action to offline a page. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210527222846.931851-1-tony.luck@intel.com commit 873fd81377b82c00f3660c5a37e36f8846ebe3f5 Author: YueHaibing Date: Wed May 26 20:18:28 2021 +0800 ALSA: core: use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210526121828.8460-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit c354c29524eeabba63da51f30a09b85ec9dc853a Author: Andy Shevchenko Date: Tue May 25 21:35:18 2021 +0300 gpiolib: Switch to bitmap_alloc() Switch to bitmap_alloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit c80c44352ddadc257410c89a8e044c1804c4f6d2 Author: Andy Shevchenko Date: Tue May 25 21:35:17 2021 +0300 gpiolib: Split fastpath array to two Split fastpath array to two, i.e. for mask and for bits. At the same time declare them as bitmaps. This makes code better to read and gives a clue about use of bitmap API. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit cb3c66af9585c0301a772332e195ead1fe3b29cf Author: Andy Shevchenko Date: Fri May 28 12:13:50 2021 +0300 i2c: core: Make debug message even more debuggish One may notice that dev_printk(KERN_DEBUG ...) is *not* an equivalent to dev_dbg(). It will be printed whenever loglevel is high enough. And currently it will be the only message in the I²C core in some configurations that got printed under above conditions. Moving to dev_dbg() will hide it in the configurations where Dynamic Debug is enabled and hence align with all other debug messages in the I²C core.. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 3c1ed51a43183ff976bd0ae37a19e038f967966a Author: Javier Martinez Canillas Date: Sun May 16 09:48:33 2021 +0200 drm/rockchip: remove existing generic drivers to take over the device There are drivers that register framebuffer devices very early in the boot process and make use of the existing framebuffer as setup by the firmware. If one of those drivers has registered a fbdev, then the fallback fbdev of the DRM driver won't be bound to the framebuffer console. To avoid that, remove any existing generic driver and take over the graphics device. By doing that, the fb mapped to the console is switched correctly from the early fbdev to the one registered by the rockchip DRM driver: [ 40.752420] fb0: switching to rockchip-drm-fb from EFI VGA Signed-off-by: Javier Martinez Canillas Signed-off-by: Thomas Zimmermann Tested-by: Peter Robinson Acked-by: Thomas Zimmermann Acked-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210516074833.451643-1-javierm@redhat.com commit 92b7716f4c54cb61b30e4680ea436a9e0cc6f4de Author: Geert Uytterhoeven Date: Fri May 28 11:19:48 2021 +0200 dt-bindings: i2c: renesas,riic: Convert to json-schema Convert the Renesas RZ/A I2C Bus Interface (RIIC) Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 50bdc4d44110acb5f45670227b16b9fbbaf08527 Merge: 696beef77521d 904ec4bebc1df Author: Linus Walleij Date: Fri May 28 14:24:41 2021 +0200 Merge tag 'renesas-pinctrl-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.14 - Minor fixes and improvements. commit e1012160bbbca92d67c729f68108734b7d679db9 Author: Andy Shevchenko Date: Mon May 10 12:50:21 2021 +0300 leds: el15203000: Make error handling more robust It's easy to miss necessary clean up, e.g. firmware node reference counting, during error path in ->probe(). Make it more robust by moving to a single point of return. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 95138e01275e1af3f1fc2780fe1d9c6138b29c7a Author: Andy Shevchenko Date: Mon May 10 12:50:43 2021 +0300 leds: pwm: Make error handling more robust It's easy to miss necessary clean up, e.g. firmware node reference counting, during error path in ->probe(). Make it more robust by moving to a single point of return. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit d33e98a1f3ee76f38668304f9ffce49af07da77a Author: Andy Shevchenko Date: Mon May 10 12:50:42 2021 +0300 leds: lt3593: Make use of device properties Device property API allows to gather device resources from different sources, such as ACPI. Convert the driver to unleash the power of device property API. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit f1e1d532da7e6ef355528a22fb97d9a8fbf76c4e Author: Andy Shevchenko Date: Mon May 10 12:50:40 2021 +0300 leds: lp50xx: Put fwnode in error case during ->probe() fwnode_for_each_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. OTOH, the successful iteration will drop reference count under the hood, no need to do it twice. Fixes: 242b81170fb8 ("leds: lp50xx: Add the LP50XX family of the RGB LED driver") Cc: Dan Murphy Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 807553f8bf4afa673750e52905e0f9488179112f Author: Andy Shevchenko Date: Mon May 10 12:50:39 2021 +0300 leds: lm3697: Don't spam logs when probe is deferred When requesting GPIO line the probe can be deferred. In such case don't spam logs with an error message. This can be achieved by switching to dev_err_probe(). Fixes: 5c1d824cda9f ("leds: lm3697: Introduce the lm3697 driver") Cc: Dan Murphy Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit f55db1c7fadc2a29c9fa4ff3aec98dbb111f2206 Author: Andy Shevchenko Date: Mon May 10 12:50:35 2021 +0300 leds: lm3692x: Put fwnode in any case during ->probe() device_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: 9a5c1c64ac0a ("leds: lm3692x: Change DT calls to fwnode calls") Cc: Dan Murphy Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit e2e8e4e8187509a77cb6328d876d9c09c07c2e82 Author: Andy Shevchenko Date: Mon May 10 12:50:34 2021 +0300 leds: lm36274: Correct headers (of*.h -> mod_devicetable.h) There is no user of of*.h headers, but mod_devicetable.h. Update header block accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 3c5f655c44bb65cb7e3c219d08c130ce5fa45d7f Author: Andy Shevchenko Date: Mon May 10 12:50:33 2021 +0300 leds: lm36274: Put fwnode in error case during ->probe() device_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. In the older code the same is implied with device_for_each_child_node(). Fixes: 11e1bbc116a7 ("leds: lm36274: Introduce the TI LM36274 LED driver") Fixes: a448fcf19c9c ("leds: lm36274: don't iterate through children since there is only one") Cc: Dan Murphy Cc: Marek Behún Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 2f39f68cec0a19c0371c1e7cb149159810e87f64 Author: Andy Shevchenko Date: Mon May 10 12:50:32 2021 +0300 leds: lm3532: Make error handling more robust It's easy to miss necessary clean up, e.g. firmware node reference counting, during error path in ->probe(). Make it more robust by moving to a single point of return. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 99be74f61cb0292b518f5e6d7e5c6611555c2ec7 Author: Andy Shevchenko Date: Mon May 10 12:50:31 2021 +0300 leds: lm3532: select regmap I2C API Regmap APIs should be selected, otherwise link can fail ERROR: modpost: "__devm_regmap_init_i2c" [drivers/leds/leds-lm3532.ko] undefined! Fixes: bc1b8492c764 ("leds: lm3532: Introduce the lm3532 LED driver") Cc: Dan Murphy Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit f3e2b3825ffb034b001fbe283d7a32a56e41aca7 Author: Andy Shevchenko Date: Mon May 10 12:50:29 2021 +0300 leds: lgm-sso: Drop duplicate NULL check for GPIO operations Since GPIO operations are NULL-aware, we don't need to duplicate this check. Remove it and fold the rest of the code. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 2cbbe9c50d13b6417e0baf8e8475ed73d4d12c2d Author: Andy Shevchenko Date: Mon May 10 12:50:27 2021 +0300 leds: lgm-sso: Remove unneeded of_match_ptr() LGM SSO is an OF dependent driver, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit fba8a6f2263bc54683cf3fd75df4dbd5d041c195 Author: Andy Shevchenko Date: Mon May 10 12:50:24 2021 +0300 leds: lgm-sso: Fix clock handling The clock handling has a few issues: - when getting second clock fails, the first one left prepared and enabled - on ->remove() clocks are unprepared and disabled twice Fix all these by converting to use bulk clock operations since both clocks are mandatory. Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Cc: Amireddy Mallikarjuna reddy Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit a43a4e588e72bafc81924d61bf1167cd6810ecbb Author: Andy Shevchenko Date: Mon May 10 12:50:23 2021 +0300 leds: el15203000: Introduce to_el15203000_led() helper Introduce a helper to replace open coded container_of() calls. At the same time move ldev member to be first in the struct el15203000_led, that makes container_of() effectivelly a no-op. Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit 0ac40af86077982a5346dbc9655172d2775d6b08 Author: Andy Shevchenko Date: Mon May 10 12:50:18 2021 +0300 leds: class: The -ENOTSUPP should never be seen by user space Drop the bogus error code and let of_led_get() to take care about absent of_node. Fixes: e389240ad992 ("leds: Add managed API to get a LED from a device driver") Cc: Jean-Jacques Hiblot Signed-off-by: Andy Shevchenko Signed-off-by: Pavel Machek commit db30c91add87fb49a63798e204c467e611dc2718 Author: Lee Jones Date: Fri May 28 10:06:29 2021 +0100 leds: leds-mlxcpld: Fix a bunch of kernel-doc formatting issues Fixes the following W=1 kernel build warning(s): drivers/leds/leds-mlxcpld.c:72: warning: cannot understand function prototype: 'struct mlxcpld_param ' drivers/leds/leds-mlxcpld.c:83: warning: cannot understand function prototype: 'struct mlxcpld_led_priv ' drivers/leds/leds-mlxcpld.c:98: warning: cannot understand function prototype: 'struct mlxcpld_led_profile ' drivers/leds/leds-mlxcpld.c:114: warning: cannot understand function prototype: 'struct mlxcpld_led_pdata ' Cc: Vadim Pasternak Cc: Pavel Machek Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 46cc5941a091bd4f5e2c8d89006752710153ef74 Author: Lee Jones Date: Fri May 28 10:06:27 2021 +0100 leds: leds-lp8860: Fix kernel-doc related formatting issues Fixes the following W=1 kernel build warning(s): drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'lock' not described in 'lp8860_led' drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'client' not described in 'lp8860_led' drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'led_dev' not described in 'lp8860_led' drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'regmap' not described in 'lp8860_led' drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'eeprom_regmap' not described in 'lp8860_led' drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'enable_gpio' not described in 'lp8860_led' drivers/leds/leds-lp8860.c:105: warning: Function parameter or member 'regulator' not described in 'lp8860_led' Cc: Pavel Machek Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit aedc13573c537f65424c5ad28ecf7078038d6975 Author: Lee Jones Date: Fri May 28 10:06:26 2021 +0100 leds: leds-mlxreg: Fix incorrect documentation of struct member 'led_cdev' and 'led_cdev_name' Fixes the following W=1 kernel build warning(s): drivers/leds/leds-mlxreg.c:42: warning: Function parameter or member 'led_cdev' not described in 'mlxreg_led_data' drivers/leds/leds-mlxreg.c:42: warning: Function parameter or member 'led_cdev_name' not described in 'mlxreg_led_data' Cc: Vadim Pasternak Cc: Pavel Machek Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 6e174d3911f15807f558e2e37f12b5e142e5b492 Author: Lee Jones Date: Fri May 28 10:06:25 2021 +0100 leds: leds-lm3697: Provide some missing descriptions for struct members Fixes the following W=1 kernel build warning(s): drivers/leds/leds-lm3697.c:60: warning: Function parameter or member 'enabled' not described in 'lm3697_led' drivers/leds/leds-lm3697.c:60: warning: Function parameter or member 'num_leds' not described in 'lm3697_led' drivers/leds/leds-lm3697.c:84: warning: Function parameter or member 'bank_cfg' not described in 'lm3697' drivers/leds/leds-lm3697.c:84: warning: Function parameter or member 'num_banks' not described in 'lm3697' Cc: Pavel Machek Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 406a0c2c546c162f18ca5c435bc3a61ec5e25890 Author: Lee Jones Date: Fri May 28 10:06:24 2021 +0100 leds: leds-lm3692x: Fix some kernel-doc formatting issues Fixes the following W=1 kernel build warning(s): drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'lock' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'client' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'led_dev' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'regmap' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'enable_gpio' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'regulator' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'led_enable' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'model_id' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'boost_ctrl' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'brightness_ctrl' not described in 'lm3692x_led' drivers/leds/leds-lm3692x.c:121: warning: Function parameter or member 'enabled' not described in 'lm3692x_led' Cc: Pavel Machek Cc: Liam Girdwood Cc: Mark Brown Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 2906aecb9aca8e48668da0ad112d0c0e7ff4e4d4 Author: Lee Jones Date: Fri May 28 10:06:23 2021 +0100 leds: leds-lm3530: Fix incorrect spelling of 'brightness' Fixes the following W=1 kernel build warning(s): drivers/leds/leds-lm3530.c:113: warning: Function parameter or member 'brightness' not described in 'lm3530_data' Cc: Pavel Machek Cc: Kumar SAHU Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 9933bde2932cc971db6871d0827b7ad78d962d61 Author: Lee Jones Date: Fri May 28 10:06:22 2021 +0100 leds: leds-lp3944: Provide missing function names in documentation headers Fixes the following W=1 kernel build warning(s): drivers/leds/leds-lp3944.c:95: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/leds/leds-lp3944.c:126: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/leds/leds-lp3944.c:158: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Pavel Machek Cc: Antonio Ospite Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit bf588389939e0f9a73f06bcd533f5b9adc5556cd Author: Lee Jones Date: Fri May 28 10:06:21 2021 +0100 leds: leds-is31fl32xx: Provide missing description for member 'sw_shutdown_func' Fixes the following W=1 kernel build warning(s): drivers/leds/leds-is31fl32xx.c:85: warning: Function parameter or member 'sw_shutdown_func' not described in 'is31fl32xx_chipdef' Cc: Pavel Machek Cc: David Rivshin Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 69f0027e0cb1bf0adb68172896759c94745932a4 Author: Lee Jones Date: Fri May 28 10:06:20 2021 +0100 leds: leds-blinkm: Remove unused variable 'ret' Function returns void anyway. Fixes the following W=1 kernel build warning(s): drivers/leds/leds-blinkm.c: In function ‘blinkm_init_hw’: drivers/leds/leds-blinkm.c:483:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Jan-Simon Moeller Cc: Pavel Machek Cc: "Jan-Simon Möller" Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit da9c6564d5c52c3a946cc54acd0e9460c006f6f4 Author: Lee Jones Date: Fri May 28 10:06:19 2021 +0100 leds: leds-as3645a: Fix function name 'as3645a_set_current()' Fixes the following W=1 kernel build warning(s): drivers/leds/leds-as3645a.c:198: warning: expecting prototype for as3645a_set_config(). Prototype was for as3645a_set_current() instead Cc: Sakari Ailus Cc: Pavel Machek Cc: Laurent Pinchart Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 2c175615cdfb5cc45c1b0903722ca2bc26bf6f79 Author: Lee Jones Date: Fri May 28 10:06:18 2021 +0100 leds: leds-bcm6328: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/leds/leds-bcm6328.c:97: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Pavel Machek Cc: "Fernández Rojas" Cc: Jonas Gorski Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 6a3a871b4baa4fe983038a3a64c05a55ce640797 Author: Lee Jones Date: Fri May 28 10:06:17 2021 +0100 leds: led-class: Fix incorrectly documented param 'dev' Fixes the following W=1 kernel build warning(s): drivers/leds/led-class.c:521: warning: Function parameter or member 'dev' not described in 'devm_led_classdev_unregister' drivers/leds/led-class.c:521: warning: Excess function parameter 'parent' description in 'devm_led_classdev_unregister' Cc: Pavel Machek Cc: John Lenz Cc: Richard Purdie Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit c5a87a4ac2bfecd146d7a2653481e5cea4bf76fe Author: Lee Jones Date: Fri May 28 10:06:16 2021 +0100 leds: leds-gpio-register: Supply description for param 'id' Fixes the following W=1 kernel build warning(s): drivers/leds/leds-gpio-register.c:24: warning: Function parameter or member 'id' not described in 'gpio_led_register_device' Cc: Pavel Machek Cc: Uwe Kleine-Koenig Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit c10074a1e5809ebce7f9cdaadbb820b8b447d5ad Author: Lee Jones Date: Fri May 28 10:06:15 2021 +0100 leds: trigger: ledtrig-cpu: Fix incorrectly documented param 'ledevt' Fixes the following W=1 kernel build warning(s): drivers/leds/trigger/ledtrig-cpu.c:52: warning: Function parameter or member 'ledevt' not described in 'ledtrig_cpu' drivers/leds/trigger/ledtrig-cpu.c:52: warning: Excess function parameter 'evt' description in 'ledtrig_cpu' Cc: Pavel Machek Cc: Linus Walleij Cc: Bryan Wu Cc: linux-leds@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Pavel Machek commit 696beef77521d3e418a2780859d1522c3c39d9b5 Author: Linus Walleij Date: Fri May 28 11:13:11 2021 +0200 pinctrl: mediatek: move bit assignment The bit needs offset to be defined which happens some lines below. Looks like a bug. The kernel test robot complains: drivers/pinctrl/mediatek/pinctrl-mtk-common.c:137:12: warning: variable 'offset' is uninitialized when used here [-Wuninitialized] bit = BIT(offset & pctl->devdata->mode_mask); ^~~~~~ Fix it up by reverting to what was done before. Cc: Fabien Parent Cc: Sean Wang Cc: Matthias Brugger Cc: Mattijs Korpershoek Cc: linux-mediatek@lists.infradead.org Fixes: 9f940d8ecf92 ("pinctrl: mediatek: don't hardcode mode encoding in common code") Reported-by: kernel test robot Signed-off-by: Linus Walleij commit d360870a5bcff79bcb9633bd66bd5a63943c5e9d Author: Takashi Sakamoto Date: Thu May 27 21:32:53 2021 +0900 ALSA: firewire-lib: support NO_PERIOD_WAKEUP in ALSA PCM runtime Drivers of ALSA firewire stack can process packets for IT/IR context in process context when the process operates ALSA PCM character device by calling ioctl(2) with some requests. The ioctl requests are: * SNDRV_PCM_IOCTL_HWSYNC * SNDRV_PCM_IOCTL_SYNC_PTR * SNDRV_PCM_IOCTL_REWIND * SNDRV_PCM_IOCTL_FORWARD * SNDRV_PCM_IOCTL_WRITEI_FRAMES * SNDRV_PCM_IOCTL_READI_FRAMES * SNDRV_PCM_IOCTL_WRITEN_FRAMES * SNDRV_PCM_IOCTL_READN_FRAMES This means that general application can process PCM frames apart from hardware IRQ invocation, even if they are programmed by either IRQ-based scheduling model or Timer-based scheduling model. This commit add support for Timer-based scheduling model by allowing PCM runtime to suppress both process wakeup per period and scheduling hardware IRQ. SNDRV_PCM_INFO_BATCH is obsoleted since ALSA IEC 61883-1/6 packet streaming engine can report the number of transferred PCM frames within PCM period boundary. The granularity equals to SYT_INTERVAL in blocking transmission. In non-blocking transmission, it doesn't equal to SYT_INTERVAL but doesn't exceed. This patch is tested with PulseAudio, and --sched-model option of axfer with fix against the issue reported at: * https://lore.kernel.org/alsa-devel/687f9871-7484-1370-04d1-9c968e86f72b@linux.intel.com/#r Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210527123253.174315-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2f21a177631ae969537cf4ed602293d9aac9f73e Author: Takashi Sakamoto Date: Thu May 27 21:26:11 2021 +0900 ALSA: firewire-lib: transfer rx packets on-the-fly when replaying Models in below series start transmission of packet after receiving the sequence of packets: * Digidesign Digi00x family * RME Fireface series Additionally, models in Tascam FireWire series start multiplexing PCM frames into packets enough after receiving packets. It's required to transfer packets on-the-fly for the above models according to nominal sampling transfer frequency before starting sequence replay. This commit allows drivers to decide whether the engine transfers packet on-the-fly or not. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210527122611.173711-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 39c2649c71d87cda8af6547076ab7abec4b15b23 Author: Takashi Sakamoto Date: Thu May 27 21:26:10 2021 +0900 ALSA: firewire-lib: replay sequence of incoming packets for outgoing packets ALSA IEC 61883-1/6 packet streaming engine uses pre-computed parameters ideal for nominal sampling transfer frequency (STF) to transfer packets to device since it was added 2011. As a result of user experience for a decade, it is clear that the sequence is not suitable to some actual devices. It takes the devices to generate noise, and causes any type of discontinuity in the series of packet transferred from the device. It's required for the engine to transfer packets according to effective STF. The effective STF is given by media clock recovered by the sequence of packet transferred from the target device. In the previous commit, the sequence is already cached. The media clock recovery can be achieved by analyzing the sequence. In technological world, many ideas are proposed for media clock recovery. However, the small part of them could be actually adopted in our case since floating point arithmetic is not mostly available in Linux kernel land. This commit adopts the simple way from them; sequence replay, which means that the sequence of parameters from incoming packet is used as is to transfer outgoing packets. The media clock is not computed internally, but the sequence of outgoing packet superficially looks to be generated by the media clock. The association between source and destination is decided when starting AMDTP domain. When the target device supports a pair of isochronous packet streams, the tx stream is source and the rx stream is destination. When it supports two pair of streams, each of tx stream is associated to corresponding rx stream in its order. When it supports less number of tx streams than rx streams, the fist tx stream is selected for all of rx streams. When it supports more tx streams than rx streams, the first tx packet is associated to the rx stream. As I noted in previous commit, the sequence of parameters from incoming packet is different between devices, time to time. It is worse idea to replay the sequence of parameters from a device for the sequence of packet to the other devices even if they are in the same category of device. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210527122611.173711-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 162ba3bd9dce61889eb739adf2923811dcbeff94 Author: Paul Cercueil Date: Fri May 28 00:03:34 2021 +0100 drm: Fix for GEM buffers with write-combine memory The previous commit wrongly assumed that dma_mmap_wc() could be replaced by pgprot_writecombine() + dma_mmap_pages(). It did work on my setup, but did not work everywhere. Use dma_mmap_wc() when the buffer has the write-combine cache attribute, and dma_mmap_pages() when it has the non-coherent cache attribute. Signed-off-by: Paul Cercueil Reported-by: Tomi Valkeinen Reviewed-by: Tomi Valkeinen Tested-by: Tomi Valkeinen Fixes: cf8ccbc72d61 ("drm: Add support for GEM buffers backed by non-coherent memory") Link: https://patchwork.freedesktop.org/patch/msgid/20210527230334.151947-1-paul@crapouillou.net commit f9e5ecdfc2c2f2a87f4aa8aa3d0216016103d769 Author: Takashi Sakamoto Date: Thu May 27 21:26:09 2021 +0900 ALSA: firewire-lib: add replay target to cache sequence of packet In design of audio and music unit in IEEE 1394 bus, feedback of effective sampling transfer frequency (STF) is delivered by packets transferred from device. The devices supported by ALSA firewire stack are categorized to three groups regarding to it. * Group 1: * Echo Audio Fireworks board module * Oxford Semiconductor OXFW971 ASIC * Digidesign Digi00x family * Tascam FireWire series * RME Fireface series * Group 2: * BridgeCo. DM1000/DM1100/DM1500 ASICs for BeBoB solution * TC Applied Technologies DICE ASICs * Group 3: * Mark of the Unicord FireWire series In group 1, the effective STF is determined by the sequence of the number of events per packet. In group 2, the sequence of presentation timestamp expressed in syt field of CIP header is interpreted as well. In group 3, the presentation timestamp is expressed in source packet header (SPH) of each data block. I note that some models doesn't take care of effective STF with large internal buffer. It's reasonable to name it as group 0: * Group 0 * Oxford Semiconductor OXFW970 ASIC The effective STF is known to be slightly different from nominal STF for all of devices, and to be different between the devices. Furthermore, the effective STF is known to be shifted for long-period transmission. This makes it hard for software to satisfy the effective STF when processing packets to the device. The effective STF is deterministic as a result of analyzing the batch of packet transferred from the device. For the analysis, caching the sequence of parameter in the packet is required. This commit adds an option so that AMDTP domain structure takes AMDTP stream structure to cache the sequence of parameters in packet transferred from the device. The parameters are offset ticks of syt field against the cycle to receive the packet and the number of data blocks per packet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210527122611.173711-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 976e920183e406726637db925efdf8b407a2d03a Author: Neil Armstrong Date: Fri May 14 16:32:55 2021 +0200 arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts Banana Pi BPI-M5 is a credit card format SBC with the following features: - Amlogic S905X3 quad core Cortex-A55 - Mali-G31 GPU - 4GB LPDDR4 - 16GB eMMC flash - 4 USB 3.0 - 1 GbE ethernet - HDMI output - 2x LEDS - SDCard - 2.5mm Jack with Stereo Audio + CVBS - Infrared Received - ADC Button - GPIO Button - 40 pins header + 3pins debug header Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210514143255.3352774-4-narmstrong@baylibre.com commit c53ab8f96af1f1fcaa0c1bc851a7704ae4b413d2 Author: Neil Armstrong Date: Fri May 14 16:32:54 2021 +0200 dt-bindings: arm: amlogic: add Banana PI M5 bindings Add bindings for the Banana PI M5 board. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210514143255.3352774-3-narmstrong@baylibre.com commit ddbdaa4d596396e3aa0d60a0ab023d19822a3682 Author: Neil Armstrong Date: Fri May 14 16:32:53 2021 +0200 arm64: dts: meson-sm1: add toacodec node Add toacodec node for Amlogic SM1 SoCs. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210514143255.3352774-2-narmstrong@baylibre.com commit 6221a93475f35fe7aade9d66211661bb82755da5 Author: Geert Uytterhoeven Date: Tue May 4 16:35:58 2021 +0200 dt-bindings: i2c: renesas,iic-emev2: Convert to json-schema Convert the Renesas EMMA Mobile EV2 IIC Interface (IIC) Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit e93e6bef7930cc23b878b6768f617c479f1a5c50 Author: Martin Blumenstingl Date: Mon May 17 22:21:15 2021 +0200 soc: amlogic: meson-ee-pwrc: Rename "get_power" to "is_powered_off" The name "get_power" is used within the Meson EE power controller driver to indicate whether a power domain is turned on or off. With the original "get_power" naming the result was: - true = powered off - false = powered on Rename "get_power" to "is_powered_off" to make the naming consistent with the third argument to pm_genpd_init. Also this naming is easier to understand when reading the code without looking at the implementation of "get_power". Signed-off-by: Martin Blumenstingl Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20210517202115.1004065-1-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 524f6fdfa6375b75fb910ac80a9aa4a7c6091d9e Author: Geert Uytterhoeven Date: Tue May 4 16:35:55 2021 +0200 dt-bindings: i2c: renesas,i2c: Convert to json-schema Convert the Renesas R-Car I2C Controller Device Tree binding documentation to json-schema. Document missing properties. Make the clocks property required. DMA is supported on R-Car Gen3 and RZ/G2 only. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit cd90e95820d569c7215abb9b7830a83212ed1273 Author: Geert Uytterhoeven Date: Tue May 4 16:35:54 2021 +0200 dt-bindings: i2c: renesas,i2c: Drop "renesas,i2c-rcar" The compatible value "renesas,i2c-rcar" was deprecated in commit ad4a8dc3fec6485b ("i2c: rcar: Add per-Generation fallback bindings"), and never had any users in upstream Linux. Drop its description from the DT bindings. Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 7475d2fbca9c0daf15fcd7d2fd440782af56dad7 Author: Geert Uytterhoeven Date: Tue May 4 16:35:53 2021 +0200 i2c: rcar: Drop "renesas,i2c-rcar" The compatible value "renesas,i2c-rcar" was deprecated in commit ad4a8dc3fec6485b ("i2c: rcar: Add per-Generation fallback bindings"), and never had any users in upstream Linux. Drop its match entry from the driver. Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 43ffb52862c631ebdf7ec8a12fe826f5d531c88e Author: Jerome Brunet Date: Thu Apr 29 10:42:53 2021 +0200 arm64: dts: meson: vim3: enable hdmi audio loopback Enable audio capture frontends and a tdm decoder. This makes it possible to loopback the audio played on the hdmi codec, which is the only output interface at the moment. Of course, one TODDR device would be enough to do that but since the 3 FRDDRs are enabled on the playback side, let's do the same on the capture side. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210429084253.59692-1-jbrunet@baylibre.com commit a5c164b195a89aedc8179d68cedf00e7f8baa58e Author: Longfang Liu Date: Sat May 22 15:30:04 2021 +0800 crypto: hisilicon/qm - support address prefetching Kunpeng930 hardware supports address prefetching to improve performance before doing tasks in SVA scenario. This patch enables this function in device initialization by writing hardware registers. In the process of reset, address prefetching is disabled to avoid the failure of interaction between accelerator device and SMMU. Signed-off-by: Longfang Liu Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 9b75e311acadb978001c81400a6ba64f48bf00e8 Author: Weili Qian Date: Sat May 22 14:49:21 2021 +0800 crypto: hisilicon/qm - add MSI detection steps on Kunpeng930 Compared with Kunpeng920, Kunpeng930 adds MSI configuration steps to wait for the interrupt to be emptied. In order to be compatible with the kunpeng920 driver, 'set_msi' callback is added in 'hisi_qm_hw_ops' to configure hardware register. Call 'set_msi' to disable or enable MSI during reset. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 8e568fc2a71d097a5549043a39984a46262b6035 Author: Hui Tang Date: Sat May 22 10:44:31 2021 +0800 crypto: ecdh - add test suite for NIST P384 Add test vector params for NIST P384, add test vector for NIST P384 on vector of tests. Vector param from: https://datatracker.ietf.org/doc/html/rfc5903#section-3.1 Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 8154132521e9cd6d28a7e9778c4ae23b716994bf Author: Hui Tang Date: Sat May 22 10:44:30 2021 +0800 crypto: ecdh - register NIST P384 tfm Add ecdh_nist_p384_init_tfm and register and unregister P384 tfm. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 8fd28fa5046b377039d5bbc0ab2f625dec703980 Author: Hui Tang Date: Sat May 22 10:44:29 2021 +0800 crypto: ecdh - fix 'ecdh_init' NIST P192 is not unregistered if failed to register NIST P256, actually it need to unregister the algorithms already registered. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 6889fc2104e5d20899b91e61daf07a7524b2010d Author: Hui Tang Date: Sat May 22 10:44:28 2021 +0800 crypto: ecdh - fix ecdh-nist-p192's entry in testmgr Add a comment that p192 will fail to register in FIPS mode. Fix ecdh-nist-p192's entry in testmgr by removing the ifdefs and not setting fips_allowed. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 0dbcf1a24e6875d51c290a174a7f2526498e2836 Author: Kai Ye Date: Fri May 21 18:02:44 2021 +0800 crypto: hisilicon/qm - fix the process of VF's list adding If Kunpeng 920 enabled the sva mode, the "qm alg register" process will return directly. So the list of VF wasn't added to QM list. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit dc11803409fbf8bc5a326ddd9f24cde620b3519d Author: Kai Ye Date: Fri May 21 18:02:43 2021 +0800 crypto: hisilicon/qm - add dfx log if not use hardware crypto algs Add print information necessary if not use hardware crypto algs. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit e5764377aa54b32bfcb651f8188729e7b35e7a7c Author: Jiapeng Chong Date: Fri May 21 17:44:52 2021 +0800 crypto: qce - Fix inconsistent indenting Eliminate the follow smatch warning: drivers/crypto/qce/aead.c:85 qce_aead_done() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Herbert Xu commit 3f4a8567b50e47da075f3ca676a899954d4c3d8d Author: Shaokun Zhang Date: Fri May 21 16:41:47 2021 +0800 crypto: nx - Fix typo in comment Fix typo '@workmem' -> '@wmem'. Cc: Herbert Xu Signed-off-by: Shaokun Zhang Signed-off-by: Herbert Xu commit abf790a9b52d91750a07bfe055aaf0f152f6d4ac Author: Thara Gopinath Date: Thu May 20 22:58:44 2021 -0400 MAINTAINERS: Add maintainer for Qualcomm crypto drivers There is no maintainer for Qualcomm crypto drivers and we are seeing more development in this area. Add myself as the maintainer so that I can help in reviewing the changes submitted to these drivers. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 1339a7c3ba05137a2d2fe75f602311bbfc6fab33 Author: Thara Gopinath Date: Thu May 20 22:20:23 2021 -0400 crypto: qce: skcipher: Fix incorrect sg count for dma transfers Use the sg count returned by dma_map_sg to call into dmaengine_prep_slave_sg rather than using the original sg count. dma_map_sg can merge consecutive sglist entries, thus making the original sg count wrong. This is a fix for memory coruption issues observed while testing encryption/decryption of large messages using libkcapi framework. Patch has been tested further by running full suite of tcrypt.ko tests including fuzz tests. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 9b7b94683a9b9c42a743d591e48b9f51f505dd1f Author: Stephan Müller Date: Thu May 20 21:31:11 2021 +0200 crypto: DRBG - switch to HMAC SHA512 DRBG as default DRBG The default DRBG is the one that has the highest priority. The priority is defined based on the order of the list drbg_cores[] where the highest priority is given to the last entry by drbg_fill_array. With this patch the default DRBG is switched from HMAC SHA256 to HMAC SHA512 to support compliance with SP800-90B and SP800-90C (current draft). The user of the crypto API is completely unaffected by the change. Signed-off-by: Stephan Mueller Acked-by: simo Sorce Signed-off-by: Herbert Xu commit 98f481f22de235b5356f9fa94b0fcffeacc772d8 Author: YueHaibing Date: Thu May 20 21:57:13 2021 +0800 hwrng: core - Use DEVICE_ATTR_ macro Use DEVICE_ATTR_RW()/DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit aa22cd7f67807eb8047221e57f8a327432ab8309 Author: Ard Biesheuvel Date: Thu May 20 12:40:00 2021 +0200 crypto: tcrypt - enable tests for xxhash and blake2 Fill some of the recently freed up slots in tcrypt with xxhash64 and blake2b/blake2s, so we can easily benchmark their kernel implementations from user space. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 01df08b93e400ce45d86ef8dd7dd849f44b0e9d3 Author: Lee Jones Date: Thu May 20 10:27:33 2021 +0100 crypto: ccp: ccp-dev: Fix a little doc-rot Fixes the following W=1 kernel build warning(s): drivers/crypto/ccp/ccp-dev.c:476: warning: Function parameter or member 'sp' not described in 'ccp_alloc_struct' drivers/crypto/ccp/ccp-dev.c:476: warning: Excess function parameter 'dev' description in 'ccp_alloc_struct' drivers/crypto/ccp/ccp-dev.c:476: warning: Function parameter or member 'sp' not described in 'ccp_alloc_struct' drivers/crypto/ccp/ccp-dev.c:476: warning: Excess function parameter 'dev' description in 'ccp_alloc_struct' Cc: Tom Lendacky Cc: John Allen Cc: Herbert Xu Cc: "David S. Miller" Cc: Gary R Hook Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit c215b513513386afd82a099047474c67f5b8f45c Author: Lee Jones Date: Thu May 20 10:27:32 2021 +0100 crypto: nx: nx-aes-gcm: Kernel-doc formatting should not be used for headers Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx-aes-gcm.c:26: warning: Function parameter or member 'tfm' not described in 'gcm_aes_nx_set_key' drivers/crypto/nx/nx-aes-gcm.c:26: warning: Function parameter or member 'in_key' not described in 'gcm_aes_nx_set_key' drivers/crypto/nx/nx-aes-gcm.c:26: warning: Function parameter or member 'key_len' not described in 'gcm_aes_nx_set_key' drivers/crypto/nx/nx-aes-gcm.c:26: warning: expecting prototype for Nest Accelerators driver(). Prototype was for gcm_aes_nx_set_key() instead drivers/crypto/nx/nx-aes-ecb.c:24: warning: Function parameter or member 'tfm' not described in 'ecb_aes_nx_set_key' drivers/crypto/nx/nx-aes-ecb.c:24: warning: Function parameter or member 'in_key' not described in 'ecb_aes_nx_set_key' drivers/crypto/nx/nx-aes-ecb.c:24: warning: Function parameter or member 'key_len' not described in 'ecb_aes_nx_set_key' drivers/crypto/nx/nx-aes-ecb.c:24: warning: expecting prototype for Nest Accelerators driver(). Prototype was for ecb_aes_nx_set_key() instead drivers/crypto/nx/nx-aes-ccm.c:26: warning: Function parameter or member 'tfm' not described in 'ccm_aes_nx_set_key' drivers/crypto/nx/nx-aes-ccm.c:26: warning: Function parameter or member 'in_key' not described in 'ccm_aes_nx_set_key' drivers/crypto/nx/nx-aes-ccm.c:26: warning: Function parameter or member 'key_len' not described in 'ccm_aes_nx_set_key' drivers/crypto/nx/nx-aes-ccm.c:26: warning: expecting prototype for Nest Accelerators driver(). Prototype was for ccm_aes_nx_set_key() instead drivers/crypto/nx/nx-aes-ctr.c:25: warning: Function parameter or member 'tfm' not described in 'ctr_aes_nx_set_key' drivers/crypto/nx/nx-aes-ctr.c:25: warning: Function parameter or member 'in_key' not described in 'ctr_aes_nx_set_key' drivers/crypto/nx/nx-aes-ctr.c:25: warning: Function parameter or member 'key_len' not described in 'ctr_aes_nx_set_key' drivers/crypto/nx/nx-aes-ctr.c:25: warning: expecting prototype for Nest Accelerators driver(). Prototype was for ctr_aes_nx_set_key() instead drivers/crypto/nx/nx-aes-xcbc.c:22: warning: cannot understand function prototype: 'struct xcbc_state ' drivers/crypto/nx/nx-sha256.c:21: warning: Function parameter or member 'tfm' not described in 'nx_crypto_ctx_sha256_init' drivers/crypto/nx/nx-sha256.c:21: warning: expecting prototype for SHA(). Prototype was for nx_crypto_ctx_sha256_init() instead drivers/crypto/nx/nx-sha512.c:20: warning: Function parameter or member 'tfm' not described in 'nx_crypto_ctx_sha512_init' drivers/crypto/nx/nx-sha512.c:20: warning: expecting prototype for SHA(). Prototype was for nx_crypto_ctx_sha512_init() instead drivers/crypto/nx/nx-842-pseries.c:280: warning: Function parameter or member 'wmem' not described in 'nx842_pseries_compress' drivers/crypto/nx/nx-842-pseries.c:280: warning: Excess function parameter 'wrkmem' description in 'nx842_pseries_compress' drivers/crypto/nx/nx-842-pseries.c:410: warning: Function parameter or member 'wmem' not described in 'nx842_pseries_decompress' drivers/crypto/nx/nx-842-pseries.c:410: warning: Excess function parameter 'wrkmem' description in 'nx842_pseries_decompress' drivers/crypto/nx/nx-842-pseries.c:523: warning: Function parameter or member 'devdata' not described in 'nx842_OF_set_defaults' drivers/crypto/nx/nx-842-pseries.c:548: warning: Function parameter or member 'prop' not described in 'nx842_OF_upd_status' drivers/crypto/nx/nx-842-pseries.c:582: warning: Function parameter or member 'devdata' not described in 'nx842_OF_upd_maxsglen' drivers/crypto/nx/nx-842-pseries.c:582: warning: Function parameter or member 'prop' not described in 'nx842_OF_upd_maxsglen' drivers/crypto/nx/nx-842-pseries.c:630: warning: Function parameter or member 'devdata' not described in 'nx842_OF_upd_maxsyncop' drivers/crypto/nx/nx-842-pseries.c:630: warning: Function parameter or member 'prop' not described in 'nx842_OF_upd_maxsyncop' drivers/crypto/nx/nx-842-pseries.c:692: warning: Cannot understand * drivers/crypto/nx/nx-842-pseries.c:825: warning: Function parameter or member 'data' not described in 'nx842_OF_notifier' drivers/crypto/nx/nx-842-pseries.c:825: warning: Excess function parameter 'update' description in 'nx842_OF_notifier' Cc: Haren Myneni Cc: Herbert Xu Cc: "David S. Miller" Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Robert Jennings Cc: Seth Jennings Cc: linux-crypto@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit c4d7d31874a7a8aa804721e082ffe1491f279dd2 Author: Lee Jones Date: Thu May 20 10:27:31 2021 +0100 crypto: cavium: Fix a bunch of kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/crypto/cavium/nitrox/nitrox_main.c:41: warning: cannot understand function prototype: 'const struct pci_device_id nitrox_pci_tbl[] = ' drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'ndev' not described in 'write_to_ucd_unit' drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'ucode_size' not described in 'write_to_ucd_unit' drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'ucode_data' not described in 'write_to_ucd_unit' drivers/crypto/cavium/nitrox/nitrox_main.c:73: warning: Function parameter or member 'block_num' not described in 'write_to_ucd_unit' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: Function parameter or member 'index' not described in 'incr_index' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: Function parameter or member 'count' not described in 'incr_index' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: Function parameter or member 'max' not described in 'incr_index' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:46: warning: expecting prototype for Response codes from SE microcode(). Prototype was for incr_index() instead drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:287: warning: Function parameter or member 'cmdq' not described in 'post_se_instr' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:381: warning: Function parameter or member 'callback' not described in 'nitrox_process_se_request' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:381: warning: Function parameter or member 'cb_arg' not described in 'nitrox_process_se_request' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:381: warning: expecting prototype for nitrox_se_request(). Prototype was for nitrox_process_se_request() instead drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:535: warning: Function parameter or member 'cmdq' not described in 'process_response_list' drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:535: warning: expecting prototype for process_request_list(). Prototype was for process_response_list() instead drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:584: warning: Function parameter or member 'data' not described in 'pkt_slc_resp_tasklet' drivers/crypto/cavium/nitrox/nitrox_mbx.c:14: warning: cannot understand function prototype: 'enum mbx_msg_type ' drivers/crypto/cavium/nitrox/nitrox_mbx.c:24: warning: cannot understand function prototype: 'enum mbx_msg_opcode ' drivers/crypto/cavium/nitrox/nitrox_skcipher.c:26: warning: cannot understand function prototype: 'const struct nitrox_cipher flexi_cipher_table[] = ' drivers/crypto/cavium/cpt/cptpf_main.c:411: warning: Function parameter or member 'cpt' not described in 'cpt_unload_microcode' drivers/crypto/cavium/cpt/cptpf_main.c:411: warning: expecting prototype for Ensure all cores are disengaged from all groups by(). Prototype was for cpt_unload_microcode() instead drivers/crypto/cavium/cpt/cptvf_reqmanager.c:17: warning: Function parameter or member 'q' not described in 'get_free_pending_entry' drivers/crypto/cavium/cpt/cptvf_reqmanager.c:17: warning: Function parameter or member 'qlen' not described in 'get_free_pending_entry' Cc: George Cherian Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit cb028f1662a9910d4b8e3fbe9eb38f7a545540a3 Author: Shaokun Zhang Date: Thu May 20 15:56:11 2021 +0800 hwrng: core - remove redundant initialization of variable err 'err' will be assigned later and cleanup the redundant initialization. Cc: PrasannaKumar Muralidharan Cc: Herbert Xu Signed-off-by: Shaokun Zhang Signed-off-by: Herbert Xu commit 5c0ecc2e81ecfd9eba8a4945d49c401615c167ca Author: Wei Yongjun Date: Wed May 19 14:16:50 2021 +0000 crypto: qce - Fix some error handling path Fix to return negative error code from the error handling cases instead of 0. Fixes: 9363efb4181c ("crypto: qce - Add support for AEAD algorithms") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu commit 308365483351fad2c2c15e173df60c7168c828a5 Author: Hui Tang Date: Wed May 19 13:59:44 2021 +0800 crypto: khazad,wp512 - remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' At the same time, fix two warning by running checkpatch.pl: WARNING: suspect code indent for conditional statements (16, 16) WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 155f7d321f021c084595d33efafa66f197fb2c00 Author: Zhen Lei Date: Mon May 17 19:02:34 2021 +0800 crypto: header - Fix spelling errors Fix some spelling mistakes in comments: cipherntext ==> ciphertext syncronise ==> synchronise feeded ==> fed Signed-off-by: Zhen Lei Signed-off-by: Herbert Xu commit 11e0ca8f028c24cade0022888599e1273ce31694 Author: Juerg Haefliger Date: Mon May 17 11:58:31 2021 +0200 hwrng: Kconfig - Remove leading spaces Remove leading spaces before tabs in Kconfig file(s) by running the following command: $ find drivers/char/hw_random -name 'Kconfig*' | x\ args sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Juerg Haefliger Signed-off-by: Herbert Xu commit 9afe77cf25d9670e61b489fd52cc6f75fd7f6803 Author: Jack Xu Date: Mon May 17 05:13:16 2021 -0400 crypto: qat - remove unused macro in FW loader Remove the unused macro ICP_DH895XCC_PESRAM_BAR_SIZE in the firmware loader. This is to fix the following warning when compiling the driver using the clang compiler with CC=clang W=2: drivers/crypto/qat/qat_common/qat_uclo.c:345:9: warning: macro is not used [-Wunused-macros] Signed-off-by: Jack Xu Co-developed-by: Zhehui Xiang Signed-off-by: Zhehui Xiang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 96b57229209490c8bca4335b01a426a96173dc56 Author: Jack Xu Date: Mon May 17 05:13:15 2021 -0400 crypto: qat - check return code of qat_hal_rd_rel_reg() Check the return code of the function qat_hal_rd_rel_reg() and return it to the caller. This is to fix the following warning when compiling the driver with clang scan-build: drivers/crypto/qat/qat_common/qat_hal.c:1436:2: warning: 6th function call argument is an uninitialized value Signed-off-by: Jack Xu Co-developed-by: Zhehui Xiang Signed-off-by: Zhehui Xiang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 78b4267a1524849202d4ab45d32ca561775e0f23 Author: Jack Xu Date: Mon May 17 05:13:14 2021 -0400 crypto: qat - report an error if MMP file size is too large Change the return status to error if MMP file size is too large so the driver load fails early if a large MMP firmware is loaded. Signed-off-by: Jack Xu Co-developed-by: Zhehui Xiang Signed-off-by: Zhehui Xiang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b9f7c36de97814d13c31aba560d520d61b86be0e Author: Jack Xu Date: Mon May 17 05:13:13 2021 -0400 crypto: qat - check MMP size before writing to the SRAM Change "sram_visible" to "mmp_sram_size" and compare it with the MMP size to prevent an overly large MMP file being written to SRAM. Signed-off-by: Jack Xu Co-developed-by: Zhehui Xiang Signed-off-by: Zhehui Xiang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit fc9818e6c54d19f1189bbda906042af3aaf93d80 Author: Jack Xu Date: Mon May 17 05:13:12 2021 -0400 crypto: qat - return error when failing to map FW Save the return value of qat_uclo_map_auth_fw() function so that the function qat_uclo_wr_mimage() could return the correct value. This way, the procedure of adf_gen2_ae_fw_load() function could stop and exit properly by checking the return value of qat_uclo_wr_mimage(). Signed-off-by: Jack Xu Co-developed-by: Zhehui Xiang Signed-off-by: Zhehui Xiang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit e50f4bda7539c165f3c8d880b670140ce09a50cf Author: Yassine Oudjana Date: Thu May 6 21:18:31 2021 +0000 dt-bindings: remoteproc: qcom: pas: Add power domains for MSM8996 Add MSM8996 compatible strings to CX and SSC-CX power domains. This depends on: "dt-bindings: remoteproc: qcom: pas: Convert binding to YAML" https://lore.kernel.org/linux-arm-msm/20210505082200.32635-1-manivannan.sadhasivam@linaro.org/T/#u Acked-by: Rob Herring Signed-off-by: Yassine Oudjana Link: https://lore.kernel.org/r/lRf8M7F6Qo9s7tlx6vuAWHThg26ls3u6SvQn1PLrAdI@cp4-web-038.plabs.ch Signed-off-by: Bjorn Andersson commit cf107e98d024590fe2d0616862a3cc283da61501 Author: Manivannan Sadhasivam Date: Wed May 5 13:52:00 2021 +0530 dt-bindings: remoteproc: qcom: pas: Convert binding to YAML Convert Qualcomm ADSP Remoteproc devicetree binding to YAML. Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210505082200.32635-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 34c4da6d5dfba48f49f891ebd75bb55999f0c538 Author: Christophe JAILLET Date: Thu May 6 22:46:01 2021 +0200 remoteproc: k3-r5: Fix an error message 'ret' is known to be 0 here. Reorder the code so that the expected error code is printed. Acked-by: Suman Anna Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d6e29d903b48957bf59c67229d54b0fc215e31ae.1620333870.git.christophe.jaillet@wanadoo.fr Signed-off-by: Bjorn Andersson commit 3e25e407a1c93b53a87a7743ea0cd4703d3985b7 Author: Arnd Bergmann Date: Wed Apr 21 16:00:40 2021 +0200 remoteproc: stm32: fix phys_addr_t format string A phys_addr_t may be wider than an int or pointer: drivers/remoteproc/stm32_rproc.c: In function 'stm32_rproc_da_to_pa': drivers/remoteproc/stm32_rproc.c:583:30: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'phys_addr_t' {aka 'long long unsigned int'} [-Werror=format=] 583 | dev_dbg(dev, "da %llx to pa %#x\n", da, *pa); Print it by reference using the special %pap format string. Reviewed-by: Arnaud Pouliquen Fixes: 8a471396d21c ("remoteproc: stm32: Move resource table setup to rproc_ops") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210421140053.3727528-1-arnd@kernel.org Signed-off-by: Bjorn Andersson commit 3c881e05c814c970e4f9577446a9d3461d134607 Author: Wilken Gottwalt Date: Sun Mar 14 10:31:13 2021 +0100 hwspinlock: add sun6i hardware spinlock support Adds the sun6i_hwspinlock driver for the hardware spinlock unit found in most of the sun6i compatible SoCs. This unit provides at least 32 spinlocks in hardware. The implementation supports 32, 64, 128 or 256 32bit registers. A lock can be taken by reading a register and released by writing a 0 to it. This driver supports all 4 spinlock setups, but for now only the first setup (32 locks) seem to exist in available devices. This spinlock unit is shared between all ARM cores and the embedded companion core. All of them can take/release a lock with a single cycle operation. It can be used to sync access to devices shared by the ARM cores and the companion core. There are two ways to check if a lock is taken. The first way is to read a lock. If a 0 is returned, the lock was free and is taken now. If an 1 is returned, the caller has to try again. Which means the lock is taken. The second way is to read a 32bit wide status register where every bit represents one of the 32 first locks. According to the datasheets this status register supports only the 32 first locks. This is the reason the first way (lock read/write) approach is used to be able to cover all 256 locks in future devices. The driver also reports the amount of supported locks via debugfs. Reviewed-by: Samuel Holland Acked-by: Maxime Ripard Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/bfd2b97307c2321b15c09683f4bd5e1fcc792f13.1615713499.git.wilken.gottwalt@posteo.net Signed-off-by: Bjorn Andersson commit f9e784dcb63f56157f7d12abdab584cc393515b1 Author: Wilken Gottwalt Date: Sun Mar 14 10:30:49 2021 +0100 dt-bindings: hwlock: add sun6i_hwspinlock Adds documentation on how to use the sun6i_hwspinlock driver for sun6i compatible series SoCs. Reviewed-by: Samuel Holland Acked-by: Maxime Ripard Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/b7a1f5532e0ae474473858055fd9bbabff9e1449.1615713499.git.wilken.gottwalt@posteo.net Signed-off-by: Bjorn Andersson commit ee99ee7c929c3e7484b663c4b7da91ab1f050d5b Author: Suman Anna Date: Sat Mar 27 09:31:17 2021 -0500 remoteproc: k3-r5: Extend support to R5F clusters on AM64x SoCs The K3 AM64x SoC family has a revised R5F sub-system and contains a subset of the R5F clusters present on J721E SoCs. The K3 AM64x SoCs only have two dual-core Arm R5F clusters/subsystems with 2 R5F cores each present within the MAIN voltage domain (MAIN_R5FSS0 & MAIN_R5FSS1). The revised IP has the following distinct features: 1. The R5FSS IP supports a new "Single-CPU" mode instead of the LockStep mode on existing SoCs (AM65x, J721E or J7200). This mode is similar to LockStep-mode on J7200 SoCs in terms of TCM usage without the fault-tolerant safety feature provided by the LockStep mode. The Core1 TCMs are combined with the Core0 TCMs effectively doubling the amount of TCMs available in Single-CPU mode. The LockStep-mode on previous AM65x and J721E SoCs could only use the Core0 TCMs. These combined TCMs appear contiguous at the respective Core0 TCM addresses. The code though is executed only on a single CPU (on Core0), and as such, requires the halt signal to be programmed only for Core0, while the resets need to be managed for both the cores. 2. TCMs are auto-initialized during module power-up, and the behavior is programmable through a MMR bit. This feature is the same as on the recent J7200 SoCs. Extend the support to these clusters in the K3 R5F remoteproc driver using AM64x specific compatibles. New TI-SCI flags and a unique cluster mode are also needed for the cluster mode detection on these SoCs. The reset assert and deassert sequence of both the cores in Single-CPU mode is agnostic of the order, so the same LockStep reset and release sequences are re-used. The integration of these clusters is very much similar to existing SoCs otherwise. Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210327143117.1840-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit fee613a6fec64b8f7cae5c3a1e374146e1477bbf Merge: f286743400238 c16ced60f3bf4 Author: Bjorn Andersson Date: Thu May 27 22:15:00 2021 -0500 Merge tag '20210327143117.1840-2-s-anna@ti.com' into rproc-next v5.13-rc1 + 20210327143117.1840-2-s-anna@ti.com commit c16ced60f3bf4aeba85e638f2186c468d7892ee0 Author: Suman Anna Date: Sat Mar 27 09:31:16 2021 -0500 dt-bindings: remoteproc: k3-r5f: Update bindings for AM64x SoCs The K3 AM64x SoCs have two dual-core Arm R5F clusters/subsystems, with 2 R5F cores each, both in the MAIN voltage domain. These clusters are a revised IP version compared to those present on J721E and J7200 SoCs, and supports a new "Single-CPU" mode instead of LockStep mode. Update the K3 R5F remoteproc bindings with the compatible info relevant to these R5F clusters/subsystems on K3 AM64x SoCs. Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210327143117.1840-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit f2867434002387c9739494041ac81c17a3808150 Author: Suman Anna Date: Wed May 19 13:03:04 2021 -0500 remoteproc: Fix various kernel-doc warnings Fix all the kernel-doc warnings in various remoteproc core files. Some of them just needed a formatting cleanup change, while others needed the Return statement to be added, or documenting the missed structure elements. Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210519180304.23563-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 95347e734846ac3276f5e1b338c79aec9d9809dd Author: Suman Anna Date: Wed May 19 13:03:03 2021 -0500 remoteproc: Add kernel-doc comment for is_iomem Add a kernel-doc comment for the is_iomem function argument in rproc_da_to_va(). This fixes a warning generated when building the remoteproc_core with W=1, warning: Function parameter or member 'is_iomem' not described in 'rproc_da_to_va' Reviewed-by: Mathieu Poirier Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210519180304.23563-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 07d5136f9bf1fa6abe70a1f88b04c1216fbf87a2 Author: Dario Binacchi Date: Thu May 27 22:13:09 2021 +0200 docs/pinctrl: fix the reference to the u300 platform With commit ce1380c9f4bc ("ARM: remove u300 platform") it is wrong to use arch/arm/mach-u300/Kconfig file as example. Since the u300 platform has been replaced by the u8500, let's use its Kconfig as example. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20210527201309.13308-1-dariobin@libero.it Signed-off-by: Linus Walleij commit 4bc80da53317edd1c31c183203aa7d8809c42667 Author: Phil Elwell Date: Fri May 21 12:01:58 2021 +0300 pinctrl: bcm2835: Accept fewer than expected IRQs The downstream .dts files only request two GPIO IRQs. Truncate the array of parent IRQs when irq_of_parse_and_map returns 0. Signed-off-by: Phil Elwell Signed-off-by: Ivan T. Ivanov Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210521090158.26932-1-iivanov@suse.de Signed-off-by: Linus Walleij commit b9045af9fb26f2d81acb32a6d6f5bbfe6fb6c670 Author: Yang Li Date: Wed May 26 11:07:44 2021 +0800 pinctrl: Fix kernel-doc Fix function name in pinctrl-single.c kernel-doc comment to remove a warning found by clang_w1. drivers/pinctrl/pinctrl-single.c:1523: warning: expecting prototype for pcs_irq_handle(). Prototype was for pcs_irq_chain_handler() instead. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1621998464-10918-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Linus Walleij commit af9207adb6d9986be6ed64e76705cf513087e724 Merge: eefa5311c3f7d 8613641063617 Author: Jakub Kicinski Date: Thu May 27 17:14:22 2021 -0700 Merge tag 'mlx5-updates-2021-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-05-26 Misc update for mlx5 driver, 1) Clean up patches for lag and SF 2) Reserve bit 31 in steering register C1 for IPSec offload usage 3) Move steering tables pool logic into the steering core and increase the maximum table size to 2G entries when software steering is enabled. * tag 'mlx5-updates-2021-05-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Fix lag port remapping logic net/mlx5: Use boolean arithmetic to evaluate roce_lag net/mlx5: Remove unnecessary spin lock protection net/mlx5: Cap the maximum flow group size to 16M entries net/mlx5: DR, Set max table size to 2G entries net/mlx5: Move chains ft pool to be used by all firmware steering net/mlx5: Move table size calculation to steering cmd layer net/mlx5: Add case for FS_FT_NIC_TX FT in MLX5_CAP_FLOWTABLE_TYPE net/mlx5: DR, Remove unused field of send_ring struct net/mlx5e: RX, Remove unnecessary check in RX CQE compression handling net/mlx5e: IPsec/rep_tc: Fix rep_tc_update_skb drops IPsec packet net/mlx5e: TC: Reserved bit 31 of REG_C1 for IPsec offload net/mlx5e: TC: Use bit counts for register mapping net/mlx5: CT: Avoid reusing modify header context for natted entries net/mlx5e: CT, Remove newline from ct_dbg call ==================== Link: https://lore.kernel.org/r/20210527185624.694304-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit ea4aae05974334e9837d86ff1cb716bad36b3ca8 Author: Niklas Schnelle Date: Thu Mar 11 14:23:12 2021 +0100 PCI: Print a debug message on PCI device release Commit 62795041418d ("PCI: enhance physical slot debug information") added a debug print on releasing the PCI slot and another message on destroying it. There is however no debug print on releasing the PCI device structure itself and even with closely looking at the kernel log during hotplug testing, I overlooked several missing pci_dev_put() calls for way too long. Add a debug print in pci_release_dev() making it much easier to spot when the PCI device structure is not released when it is supposed to be. Link: https://lore.kernel.org/r/20210311132312.2882425-1-schnelle@linux.ibm.com Signed-off-by: Niklas Schnelle Signed-off-by: Bjorn Helgaas commit 0a470c843d233c2f6b68ae65357a246d9fb66178 Author: Yang Li Date: Mon Mar 15 15:40:00 2021 +0800 x86/pci: 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: ./arch/x86/pci/mmconfig-shared.c:464:9-10: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool ./arch/x86/pci/mmconfig-shared.c:493:5-6: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool ./arch/x86/pci/mmconfig-shared.c:501:9-10: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool ./arch/x86/pci/mmconfig-shared.c:522:5-6: WARNING: return of 0/1 in function 'is_mmconf_reserved' with return type bool Link: https://lore.kernel.org/r/1615794000-102771-1-git-send-email-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 0b9714845935aeab6dfcfbbb796f484aa33058f9 Author: Steven Lee Date: Tue May 25 13:53:07 2021 +0800 pinctrl: pinctrl-aspeed-g6: Add sgpio pinctrl settings AST2600 supports 2 SGPIO master interfaces and 2 SGPIO slave interfaces. Current pinctrl driver only define the first sgpio master and slave interfaces. The second SGPIO master and slave interfaces should be added in pinctrl driver as well. Signed-off-by: Steven Lee Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210525055308.31069-4-steven_lee@aspeedtech.com Signed-off-by: Linus Walleij commit 89be5957e7ec300cae7af4059db69a0e1f45662d Author: Steven Lee Date: Tue May 25 13:53:05 2021 +0800 dt-bindings: pinctrl: Update enum for adding SGPM2 and SGPS2 AST2600 has 2 SGPIO master interfaces one with 128 pins and another one has 80 pins. It also supports 2 SGPIO slave interfaces. In the current bindings, there are only SGPM1 and SGPS1 defined in enum, SGPM2 and SGPS2 should also be added in the bindings. Signed-off-by: Steven Lee Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210525055308.31069-2-steven_lee@aspeedtech.com Signed-off-by: Linus Walleij commit 95ea95396135f3c44ff6265f29343407b4ccf365 Author: Yicong Yang Date: Mon Mar 29 19:02:01 2021 +0800 PCI/AER: Use consistent format when printing PCI device We use format domain:bus:slot.function when printing PCI device. Use consistent format in AER messages. [bhelgaas: also drop "AER recover:" prefix since we already have an "AER:" prefix from pr_fmt()] Link: https://lore.kernel.org/r/1617015721-51701-1-git-send-email-yangyicong@hisilicon.com Signed-off-by: Yicong Yang Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit eefa5311c3f7d6600306470585cbd8d9ffd28af4 Author: Gustavo A. R. Silva Date: Thu May 27 10:34:24 2021 -0700 ixgbe: Fix out-bounds warning in ixgbe_host_interface_command() Replace union with a couple of pointers in order to fix the following out-of-bounds warning: CC [M] drivers/net/ethernet/intel/ixgbe/ixgbe_common.o drivers/net/ethernet/intel/ixgbe/ixgbe_common.c: In function ‘ixgbe_host_interface_command’: drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:3729:13: warning: array subscript 1 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 3729 | bp->u32arr[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); | ~~~~~~~~~~^~~~ drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:3682:7: note: while referencing ‘u32arr’ 3682 | u32 u32arr[1]; | ^~~~~~ This helps with the ongoing efforts to globally enable -Warray-bounds. Link: https://github.com/KSPP/linux/issues/109 Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Tested-by: Dave Switzer Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20210527173424.362456-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit cf5e1297498168538152a68a85c5fe04d0b37939 Merge: 91b17a436759e 057f4af2b1716 Author: Jakub Kicinski Date: Thu May 27 16:06:48 2021 -0700 Merge branch 'add-4-rx-tx-queue-support-for-mikrotik-10-25g-nic' Gatis Peisenieks says: ==================== add 4 RX/TX queue support for Mikrotik 10/25G NIC More RX/TX queues on a network card help spread the CPU load among cores and achieve higher overall networking performance. This patch set adds support for 4 RX/TX queues available on Mikrotik 10/25G NIC. v4: - addressed comments from Jakub Kicinski: - split up the change in more manageable chunks - changed member order in structs for tighter packing - fixed style issues - reverted to calling napi_alloc_skb only from within poll as before v3: - fix kernel-doc complaints on comments as pointed out by David Miller v2: - rebase on net-next master as requested by David Miller ==================== Link: https://lore.kernel.org/r/20210527144423.3395719-1-gatis@mikrotik.com Signed-off-by: Jakub Kicinski commit 057f4af2b1716f6d6cef285a1c9b7a9bb63d822b Author: Gatis Peisenieks Date: Thu May 27 17:44:23 2021 +0300 atl1c: add 4 RX/TX queue support for Mikrotik 10/25G NIC More RX/TX queues on a network card help spread the CPU load among cores and achieve higher overall networking performance. The new Mikrotik 10/25G NIC supports 4 RX and 4 TX queues. TX queues are treated with equal priority. RX queue balancing is fixed based on L2/L3/L4 hash. This adds support for 4 RX/TX queues while maintaining backwards compatibility with older hardware. Simultaneous TX + RX performance on AMD Threadripper 3960X with Mikrotik 10/25G NIC improved from 1.6Mpps to 3.2Mpps per port. Backwards compatiblitiy was verified with AR8151 and AR8131 based NICs. Signed-off-by: Gatis Peisenieks Signed-off-by: Jakub Kicinski commit 8042824a3c0bcf7fc96c62b932b44b0b54714642 Author: Gatis Peisenieks Date: Thu May 27 17:44:22 2021 +0300 atl1c: prepare for multiple rx queues Move napi and other per queue members into per rx queue struct. Allocate max rx queues that any hw supported by the driver might have. Patch that actually enables multiple rx queues will follow. Signed-off-by: Gatis Peisenieks Signed-off-by: Jakub Kicinski commit 20a1b6bdca15477c95800f50867a4dc1699ab548 Author: Gatis Peisenieks Date: Thu May 27 17:44:21 2021 +0300 atl1c: move tx napi into tpd_ring To get more performance from using multiple tx queues one needs a per tx queue napi. Move tx napi from per adapter struct into per tx queue struct. Patch that actually enables multiple tx queues will follow. Signed-off-by: Gatis Peisenieks Signed-off-by: Jakub Kicinski commit bf3be85dbe59e2a4972caf0163113a1040b73f72 Author: Gatis Peisenieks Date: Thu May 27 17:44:20 2021 +0300 atl1c: detect NIC type early To support NICs that allow for more than one tx queue it is required to detect NIC type early during probe. This is moves NIC type detection before netdev_alloc to prepare for that. Signed-off-by: Gatis Peisenieks Signed-off-by: Jakub Kicinski commit 91b17a436759e9f3a6f9ff090693564c3299cd9a Merge: 557c4d2f780ce 7dafcc4c9dfb4 Author: Jakub Kicinski Date: Thu May 27 14:51:20 2021 -0700 Merge branch 'mlx-devlink-dev-info-versions-adjustments' Jiri Pirko says: ==================== mlx*: devlink dev info versions adjustments Couple of adjustments in Mellanox drivers regarding devlink dev versions fill-up. ==================== Link: https://lore.kernel.org/r/20210526104509.761807-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 7dafcc4c9dfb417fc1ad19881c802af2101d0bfd Author: Jiri Pirko Date: Wed May 26 12:45:09 2021 +0200 mlxsw: core: use PSID string define in devlink info Instead of having the string spelled out in the driver, use the global define with the same value. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit f55c998c274e3b59f8b07234f16521524c564a23 Author: Jiri Pirko Date: Wed May 26 12:45:08 2021 +0200 mlxsw: core: Expose FW version over defined keyword To be aligned with the rest of the drivers, expose FW version under "fw" keyword in devlink dev info, in addition to the existing "fw.version", which is currently Mellanox-specific. devlink output before: running: fw.version 30.2008.2018 after: running: fw.version 30.2008.2018 fw 30.2008.2018 Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit 2754125ebd334268d815277e2909dc9fbb504356 Author: Jiri Pirko Date: Wed May 26 12:45:07 2021 +0200 net/mlx5: Expose FW version over defined keyword To be aligned with the rest of the drivers, expose FW version under "fw" keyword in devlink dev info, in addition to the existing "fw.version", which is currently Mellanox-specific. Signed-off-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 557c4d2f780ce73ffad8dfe4d03a27dc9e13dfde Author: Jiri Pirko Date: Thu May 27 12:55:15 2021 +0200 selftests: devlink_lib: add check for devlink device existence If user passes devlink handle over DEVLINK_DEV variable, check if the device exists. Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20210527105515.790330-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit b14b27fffa2e3dd0b4af052fa19b94e34c33130a Merge: f285f37cb1e6b 50fe7547b637b Author: Jakub Kicinski Date: Thu May 27 14:38:13 2021 -0700 Merge tag 'linux-can-next-for-5.14-20210527' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== can-next 2021-05-27 The first 2 patches are by Geert Uytterhoeven and convert the rcan_can and rcan_canfd device tree bindings to yaml. The next 2 patches are by Oliver Hartkopp and me and update the CAN uapi headers. zuoqilin's patch removes an unnecessary variable from the CAN proc code. Patrick Menschel contributes 3 patches for CAN ISOTP to enhance the error messages. Jiapeng Chong's patch removes two dead stores from the softing driver. The next 4 patches are by me and silence several warnings found by clang compiler. Jimmy Assarsson's patches for the kvaser_usb driver add support for the Kvaser hydra devices. Dario Binacchi provides 2 patches for the c_can driver, first removing an unused variable, then adding basic ethtool support to query driver and ring parameter info. The last 4 patches are by Torin Cooper-Bennun and clean up the m_can driver. * tag 'linux-can-next-for-5.14-20210527' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (21 commits) can: m_can: fix whitespace in a few comments can: m_can: make TXESC, RXESC config more explicit can: m_can: clean up CCCR reg defs, order by revs can: m_can: use bits.h macros for all regmasks can: c_can: add ethtool support can: c_can: remove unused variable struct c_can_priv::rxmasked can: kvaser_usb: Add new Kvaser hydra devices can: kvaser_usb: Rename define USB_HYBRID_{,PRO_}CANLIN_PRODUCT_ID can: at91_can: silence clang warning can: mcp251xfd: silence clang warning can: mcp251x: mcp251x_can_probe(): silence clang warning can: hi311x: hi3110_can_probe(): silence clang warning can: softing: Remove redundant variable ptr can: isotp: Add error message if txqueuelen is too small can: isotp: add symbolic error message to isotp_module_init() can: isotp: change error format from decimal to symbolic error names can: proc: remove unnecessary variables can: uapi: introduce CANFD_FDF flag for mixed content in struct canfd_frame can: uapi: update CAN-FD frame description dt-bindings: can: rcar_canfd: Convert to json-schema ... ==================== Link: https://lore.kernel.org/r/20210527084532.1384031-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit f285f37cb1e6b29e7dc732c81510aa115463730f Author: Jiri Pirko Date: Thu May 27 12:48:19 2021 +0200 devlink: append split port number to the port name Instead of doing sprintf twice in case the port is split or not, append the split port suffix in case the port is split. Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20210527104819.789840-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 7fb9dc8109bf9713ffcda65617249099a1942f0f Author: Qii Wang Date: Thu May 27 19:31:50 2021 +0800 i2c: mediatek: Rename i2c irq name Rename i2c irq name with dev_name() which can provide unique naming in /proc/interrupts for each instance of the I2C IP core. Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 0d3f1e4524bb70f528b7002803fc0737c83ddd5e Author: Heiner Kallweit Date: Sat May 22 23:46:20 2021 +0200 i2c: i801: Use standard PCI constants instead of own ones Layout of these registers is part of the PCI standard. Therefore use the constants defined by the PCI subsystem. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit 1de93d5d521717cbb77cc9796a4df141d800d608 Author: Heiner Kallweit Date: Sat May 22 00:02:43 2021 +0200 i2c: i801: Replace waitqueue with completion API Using the completion API is more intuitive and it allows to simplify the code. Note that we don't have to set priv->status = 0 any longer with the completion API. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Tested-by: Jean Delvare Reviewed-by: Daniel Kurtz Signed-off-by: Wolfram Sang commit 78f420acc4231f7db99291d846bc73d5f8a8df72 Author: Heiner Kallweit Date: Sat May 22 00:00:28 2021 +0200 i2c: i801: Remove unneeded warning after wait_event_timeout timeout When passing -ETIMEDOUT to i801_check_post() it will emit a timeout error message. I don't see much benefit in an additional warning stating more or less the same. Signed-off-by: Heiner Kallweit Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit 3fb2e2aeafb2d28e49d9c069ac392dabe595b1ae Author: Zev Weiss Date: Thu May 6 15:54:19 2021 -0500 i2c: aspeed: disable additional device addresses on ast2[56]xx The ast25xx and ast26xx have, respectively, two and three configurable slave device addresses to the ast24xx's one. We only support using one at a time, but the others may come up in an indeterminate state depending on hardware/bootloader behavior, so we need to make sure we disable them so as to avoid ending up with phantom devices on the bus. Signed-off-by: Zev Weiss Reviewed-by: Brendan Higgins Reviewed-by: Joel Stanley Tested-by: Joel Stanley Signed-off-by: Wolfram Sang commit 71b970c8680732b3dec1f9506087ef56bd6a123d Author: Nikola Cornij Date: Wed May 12 17:00:11 2021 -0400 drm/dp_mst: Use kHz as link rate units when settig source max link caps at init [why] Link rate in kHz is what is eventually required to calculate the link bandwidth, which makes kHz a more generic unit. This should also make forward-compatibility with new DP standards easier. [how] - Replace 'link rate DPCD code' with 'link rate in kHz' when used with drm_dp_mst_topology_mgr_init() - Add/remove related DPCD code conversion from/to kHz where applicable Signed-off-by: Nikola Cornij Acked-by: Jani Nikula Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210512210011.8425-2-nikola.cornij@amd.com commit e4ada4c8de70b3a25fb954bc0d4705b4273778a5 Merge: 9b7ff25d129df b9370dceabb78 Author: Rafael J. Wysocki Date: Thu May 27 21:12:50 2021 +0200 Merge back ACPI power management material for v5.14. commit 5c8121262484d99bffb598f39a0df445cecd8efb Author: Sergey Shtylyov Date: Sat Mar 20 23:32:38 2021 +0300 pata_ep93xx: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Propagate the error code upstream, as it should have been done from the start... Fixes: 2fff27512600 ("PATA host controller driver for ep93xx") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/509fda88-2e0d-2cc7-f411-695d7e94b136@omprussia.ru Signed-off-by: Jens Axboe commit 580204038f5b6f4218dbefb9a0ec89a675b1d45b Author: Mario Kleiner Date: Fri Mar 19 22:03:17 2021 +0100 drm/amd/display: Enable support for 16 bpc fixed-point framebuffers. This is intended to enable direct high-precision scanout and pageflip of Vulkan swapchain images in format VK_FORMAT_R16G16B16A16_UNORM. Expose DRM_FORMAT_XRGB16161616, DRM_FORMAT_ARGB16161616, DRM_FORMAT_XBGR16161616 and DRM_FORMAT_ABGR16161616 as 16 bpc unsigned normalized formats. These allow to take full advantage of the maximum precision of the display hardware, ie. currently up to 12 bpc. Searching through old AMD M56, M76 and RV630 hw programming docs suggests that these 16 bpc formats are supported by all DCE and DCN display engines, so we can expose the formats unconditionally. Successfully tested on AMD Polaris11 DCE-11.2 an RavenRidge DCN-1.0 with a HDR-10 monitor over 10 bpc DP output with spatial dithering enabled by the driver. Picture looks good, and my photometer measurement procedure confirms an effective 12 bpc color reproduction. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit 92e2b820dd6e383501e1c50dea618086d8f1d619 Author: Mario Kleiner Date: Fri Mar 19 22:03:16 2021 +0100 drm/amd/display: Make assert in DCE's program_bit_depth_reduction more lenient. This is needed to avoid warnings with linebuffer depth 36 bpp. Testing on a Polaris11, DCE-11.2 on a 10 bit HDR-10 monitor showed no obvious problems, and this 12 bpc limit is consistent with what other function in the DCE bit depth reduction path use. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit a316db7209604427b1f54e9a9d88f1f1ac0119c0 Author: Mario Kleiner Date: Fri Mar 19 22:03:15 2021 +0100 drm/amd/display: Increase linebuffer pixel depth to 36bpp. Testing with the photometer shows that at least Raven Ridge DCN-1.0 does not achieve more than 10 bpc effective output precision with a 16 bpc unorm surface of type SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616, unless linebuffer depth is increased from LB_PIXEL_DEPTH_30BPP to LB_PIXEL_DEPTH_36BPP. Otherwise precision gets truncated somewhere to 10 bpc effective depth. Strangely this increase was not needed on Polaris11 DCE-11.2 during testing to get 12 bpc effective precision. It also is not needed for fp16 framebuffers. Tested on DCN-1.0 and DCE-11.2. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit 050cd3d616d96c3a04f4877842a391c0a4fdcc7a Author: Mario Kleiner Date: Fri Mar 19 22:03:14 2021 +0100 drm/amd/display: Add support for SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616. Add the necessary format definition, bandwidth and pixel size mappings, prescaler setup, and pixelformat selection, following the logic already present for SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616. The new SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616 is implemented as the old SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 format, but with swapped red <-> green color channel, by use of the hardware xbar. Please note that on the DCN 1/2/3 display engines, the pixelformat in hubp and dpp setup for the old SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 and the new SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616 was changed from format id 22 to id 26. See amd/include/navi10_enum.h for the meaning of the id's. For format 22, the display engine read the framebuffer in 16 bpc format, but truncated to the 12 bpc actually supported by later pipeline stages. However, the engine took the 12 LSB of each color component for truncation, which is incompatible with rendering at least under Vulkan, where content is 16 bit wide, and a 12 MSB alignment would be appropriate, if any. Format 20 for ARGB16161616_12MSB does work, but even better, we can choose format 26 for ARGB16161616_UNORM, keeping all 16 bits around until later stages of the display pipeline. This allows to directly consume what the rendering hw produces under Vulkan for swapchain format VK_FORMAT_R16G16B16A16_UNORM, as tested with a patched version of the current AMD open-source amdvlk driver which maps swapchain format VK_FORMAT_R16G16B16A16_UNORM onto DRM_FORMAT_XBGR16161616. The old id 22 would cause colorful pixeltrash to be displayed instead. Tested under DCN-1.0 and DCE-11.2. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit ff92ecf575a9293afcf189c69e84f68b6595b77a Author: Mario Kleiner Date: Fri Mar 19 22:03:13 2021 +0100 drm/fourcc: Add 16 bpc fixed point framebuffer formats. These are 16 bits per color channel unsigned normalized formats. They are supported by at least AMD display hw, and suitable for direct scanout of Vulkan swapchain images in the format VK_FORMAT_R16G16B16A16_UNORM. Reviewed-by: Ville Syrjälä Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit 8613641063617c1dfc731b403b3ee4935ef15f87 Author: Eli Cohen Date: Mon May 3 14:39:58 2021 +0300 net/mlx5: Fix lag port remapping logic Fix the logic so that if both ports netdevices are enabled or disabled, use the trivial mapping without swapping. If only one of the netdevice's tx is enabled, use it to remap traffic to that port. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed commit 2b1476752521aae142d4c8bc37dfd2be66b2acfa Author: Eli Cohen Date: Mon May 3 12:35:05 2021 +0300 net/mlx5: Use boolean arithmetic to evaluate roce_lag Avoid mixing boolean and bit arithmetic when evaluating validity of roce_lag. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed commit a546432f2f0491d53b3beaffe33813e96a6644c8 Author: Eli Cohen Date: Mon May 3 09:22:43 2021 +0300 net/mlx5: Remove unnecessary spin lock protection Taking lag_lock to access ldev->tracker is meaningless in the context of do_bond() and mlx5_lag_netdev_event(). Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed commit 71513c05a97fa2c930d79661a32759e6875850d4 Author: Paul Blakey Date: Thu Mar 11 11:35:39 2021 +0200 net/mlx5: Cap the maximum flow group size to 16M entries The maximum number of large flow groups applies to both small and large tables. For very large tables (such as the 2G SW steering tables) this may create a small number of flow groups each with an unrealistic entries domain (> 16M). Set the maximum number of large flow groups to at least what user requested, but with a maximum per group size of 16M entries. For software steering, if user requested less than 128 large flow groups, it will gives us about 128 16M groups in a 2G entries tables. Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 9e117998409c740fdf921392acb048360fcb62a9 Author: Paul Blakey Date: Mon Mar 8 14:52:41 2021 +0200 net/mlx5: DR, Set max table size to 2G entries SW steering has no table size limitations. However, fs_core API is size aware. Set SW steering tables to the maximum possible table size (INT_MAX). Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 4a98544d182761873381d46bb1a498703ca85bf0 Author: Paul Blakey Date: Mon Mar 8 14:16:02 2021 +0200 net/mlx5: Move chains ft pool to be used by all firmware steering Firmware FT pool is per device, but the software tracking of this pool only services fs_chains users, and if another layer takes a flow table, the pool will not be updated, and fs_chains will fail creating a flow table, with no recovery till the flow table is returned. Move FT pool to be global per device, and stored at the cmd level, so all layers can use it. Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 04745afb2ae3ee496d339a5511291def2be5c7c1 Author: Paul Blakey Date: Mon Mar 8 14:20:24 2021 +0200 net/mlx5: Move table size calculation to steering cmd layer Currently the table size is calculated by the fs_core layer. However, each steering cmd instance has a different allocation logic. FW steering uses a predefined pools of multiple sizes. SW steering doesn't have a pool, and can allocate any size of tables. Move the table size calculation to the steering cmd layer as a pre-step for moving fs_chains pool logic globally to firmware steering, and increasing table sizes for software steering. In addition, change the size parameter to absolute size to allow the special zero value to mean "get next available maximum size". Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit e01b58e9d5c47d027086f35cdd5fc953c6f66c4f Author: Paul Blakey Date: Tue Mar 30 20:59:50 2021 +0300 net/mlx5: Add case for FS_FT_NIC_TX FT in MLX5_CAP_FLOWTABLE_TYPE Commit 16f1c5bb3ed7 ("net/mlx5: Check device capability for maximum flow counters") added MLX5_CAP_FLOWTABLE_TYPE but forgot to account for FS_FT_NIC_TX case in the expression. Although the expression will return 1 for this case instead of the actual cap, there isn't currently no known side affects of missing this case. Add the FS_FT_NIC_TX case. Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit b72ce870f57ea7ddd1c03b000b31bb20ab52f44b Author: Yevgeny Kliteynik Date: Tue Mar 23 03:08:56 2021 +0200 net/mlx5: DR, Remove unused field of send_ring struct Remove unused field of struct mlx5dr_send_ring Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 2ef9c7c613cfed2bba64dab194a5649b9c1e6685 Author: Tariq Toukan Date: Thu Apr 22 18:34:57 2021 +0300 net/mlx5e: RX, Remove unnecessary check in RX CQE compression handling There are two reasons for exiting mlx5e_decompress_cqes_cont(): 1. The compression session is completed (cqd.left == 0). 2. The budget is exhausted (work_done == budget). If after calling mlx5e_decompress_cqes_cont() we have cqd.left > 0, it necessarily implies that budget is exhausted. The first part of the complex condition is covered by the second, hence we remove it here. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c07274ab1ab2c38fb128e32643c22c89cb319384 Author: Huy Nguyen Date: Tue Dec 15 10:58:54 2020 -0600 net/mlx5e: IPsec/rep_tc: Fix rep_tc_update_skb drops IPsec packet rep_tc copy REG_C1 to REG_B. IPsec crypto utilizes the whole REG_B register with BIT31 as IPsec marker. rep_tc_update_skb drops IPsec because it thought REG_B contains bad value. In previous patch, BIT 31 of REG_C1 is reserved for IPsec. Skip the rep_tc_update_skb if BIT31 of REG_B is set. Signed-off-by: Huy Nguyen Signed-off-by: Raed Salem Signed-off-by: Saeed Mahameed commit b973cf32453f78d8661a640d0a0167d1d41ea331 Author: Huy Nguyen Date: Mon Nov 23 14:48:22 2020 -0600 net/mlx5e: TC: Reserved bit 31 of REG_C1 for IPsec offload Currently ASAP features fully utilize all the bits of the CQE's flow tag and ft_metadata field. The flow tag field cannot be used because the flow table tagging in FTE does not allow partial write. We agree to reserve bit 31 of CQE's ft_metadata for IPsec to avoid ASAP CT from dropping IPsec offloaded packet Here is the new bit layout of REG_C1. Tunnel option id is reduced to 11 bits: < IPSEC MARKER (1) | ESW_TUN_ID(12) | ESW_TUN_OPTS(11) | ESW_ZONE_ID(8) > Signed-off-by: Huy Nguyen Signed-off-by: Raed Salem Reviewed-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Paul Blakey commit ed2fe7ba7b9f550ec03e89e3f423bdd97de248d6 Author: Paul Blakey Date: Wed Mar 10 15:00:05 2021 +0200 net/mlx5e: TC: Use bit counts for register mapping To prepare for next patch where we will use a non-byte aligned mapping, change all byte counts in register mapping to bits. Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 7fac5c2eced36f335ee19ff316bd3182fbeda823 Author: Paul Blakey Date: Mon Apr 19 15:50:58 2021 +0300 net/mlx5: CT: Avoid reusing modify header context for natted entries Currently the driver is designed to reuse header modify context entries. Natted entries will always have a unique modify header, as such the modify header hashtable lookup is introducing an overhead. When the hashtable size exceeded 200k entries the tested insertion rate dropped from ~10k entries/sec to ~300 entries/sec. Don't use the re-use mechanism when creating modify headers for natted tuples. Signed-off-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 74097a0dcd1e47d3ccdd066422f28300ad508eee Author: Roi Dayan Date: Thu Mar 11 09:53:32 2021 +0200 net/mlx5e: CT, Remove newline from ct_dbg call ct_dbg() already adds a newline. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 94a311ce248e0b53c76e110fd00511af47b72ffb Author: Muralidhara M K Date: Wed May 26 22:16:01 2021 +0530 x86/MCE/AMD, EDAC/mce_amd: Add new SMCA bank types Add the (HWID, MCATYPE) tuples and names for new SMCA bank types. Also, add their respective error descriptions to the MCE decoding module edac_mce_amd. Also while at it, optimize the string names for some SMCA banks. [ bp: Drop repeated comments, explain why UMC_V2 is a separate entry. ] Signed-off-by: Muralidhara M K Signed-off-by: Naveen Krishna Chatradhi Signed-off-by: Borislav Petkov Reviewed-by: Yazen Ghannam Link: https://lkml.kernel.org/r/20210526164601.66228-1-nchatrad@amd.com commit 5b26d57fdb499c2363f3d895ef008e73ec02eb9b Author: Aditya Swarup Date: Wed May 26 02:48:52 2021 -0700 drm/i915: Add Wa_14010733141 The WA requires the following procedure for VDBox SFC reset: If (MFX-SFC usage is 1) { 1.Issue a MFX-SFC forced lock 2.Wait for MFX-SFC forced lock ack 3.Check the MFX-SFC usage bit If (MFX-SFC usage bit is 1) Reset VDBOX and SFC else Reset VDBOX Release the force lock MFX-SFC } else if(HCP+SFC usage is 1) { 1.Issue a VE-SFC forced lock 2.Wait for SFC forced lock ack 3.Check the VE-SFC usage bit If (VE-SFC usage bit is 1) Reset VDBOX else Reset VDBOX and SFC Release the force lock VE-SFC. } else Reset VDBOX - Restructure: the changes to the original code flow should stay relatively minimal; we only need to do an extra HCP check after the usual VD-MFX check and, if true, switch the register/bit we're performing the lock on.(MattR) v2: - Assign unlock mask using paired_engine->mask instead of using BIT(paired_vecs->id). (Daniele) Bspec: 52890, 53509 Cc: Tvrtko Ursulin Cc: Matt Roper Cc: Daniele Ceraolo Spurio Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Co-developed-by: Matt Roper Signed-off-by: Matt Roper Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20210526094852.286424-2-aditya.swarup@intel.com commit 16c230b30de8b69ae75d2b98d04a77904da58d15 Author: Will Deacon Date: Thu May 27 11:55:29 2021 +0100 arm64: scs: Drop unused 'tmp' argument to scs_{load, save} asm macros The scs_load and scs_save asm macros don't make use of the mandatory 'tmp' register argument, so drop it and fix up the callers. Cc: Sami Tolvanen Cc: Mark Rutland Acked-by: Mark Rutland Reviewed-by: Sami Tolvanen Link: https://lore.kernel.org/r/20210527105529.21967-1-will@kernel.org Signed-off-by: Will Deacon commit 6ea688382716c2f16b81051b44106229e5bf1fe1 Author: Ian Rogers Date: Wed May 19 08:12:13 2021 -0700 perf test: Test 2 libpfm4 error cases Proposed in: https://lore.kernel.org/lkml/20210517140931.2559364-1-tmricht@linux.ibm.com/ Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20210519151213.2643570-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit da963834fe6975a11f88d7ad9e9280938476c8dc Author: Riccardo Mancini Date: Wed May 26 01:05:17 2021 +0200 perf test: Iterate over shell tests in alphabetical order The for_each_shell_test macro iterated over all shell tests in the directory using readdir, which does not guarantee any ordering, causing problems on certain fs. However, the order in which they are visited determines the id of the test, in case one wants to run a single test. This patch replaces readdir with scandir using alphabetical sorting. This guarantees that, given the same set of tests, all machines will see the tests in the same order, and, thus, that test ids are consistent. Signed-off-by: Riccardo Mancini Reported-by: Ian Rogers Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Fabian Hemmer Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tommi Rantala Link: http://lore.kernel.org/lkml/20210525230521.244553-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 41ca1d1e88d485cb835a21032538e55102982a7a Author: Ravi Bangoria Date: Tue May 25 10:07:44 2021 +0530 perf probe: Provide more detail with relocation warning When run as normal user with default sysctl kernel.kptr_restrict=0 and kernel.perf_event_paranoid=2, perf probe fails with: $ ./perf probe move_page_tables Relocated base symbol is not found! The warning message is not much informative. The reason perf fails is because /proc/kallsyms is restricted by perf_event_paranoid=2 for normal user and thus perf fails to read relocated address of the base symbol. Tweaking kptr_restrict and perf_event_paranoid can change the behavior of perf probe. Also, running as root or privileged user works too. Add these details in the warning message. Plus, kmap->ref_reloc_sym might not be always set even if host_machine is initialized. Above is the example of the same. Remove that comment. Reported-by: Aneesh Kumar K.V Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20210525043744.193297-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 6793672accf380f895b2dc39eff90c7f0cc99fb6 Author: Denys Zagorui Date: Mon May 24 04:15:14 2021 -0700 perf parse-events: Add bison --file-prefix-map option During a perf build with O= bison stores full paths in generated files and those paths are stored in resulting perf binary. Starting from bison v3.7.1 those paths can be remapped by using the --file-prefix-map option. Use this option if possible to make perf binary more reproducible. Signed-off-by: Denys Zagorui Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210524111514.65713-3-dzagorui@cisco.com Signed-off-by: Arnaldo Carvalho de Melo commit 5ada57a9a6b0be0e6dfcbd4afa519b0347fd5649 Merge: 59c56342459a4 d7c5303fbc8ac Author: Jakub Kicinski Date: Thu May 27 09:22:11 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net cdc-wdm: s/kill_urbs/poison_urbs/ to fix build Signed-off-by: Jakub Kicinski commit 71766b81de8204a0fb56de3ad1972516bac99f5b Author: Julien Thierry Date: Wed Mar 3 18:05:36 2021 +0100 arm64: insn: Add load/store decoding helpers Provide some function to group different load/store instructions. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-9-jthierry@redhat.com Signed-off-by: Will Deacon commit 54880044c639f9c59346eabe637f9f8f39a112b8 Author: Julien Thierry Date: Wed Mar 3 18:05:35 2021 +0100 arm64: insn: Add some opcodes to instruction decoder Add decoding capability for some instructions that objtool will need to decode. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-8-jthierry@redhat.com Signed-off-by: Will Deacon commit d4b217330d7e0320084ff04c8491964f1f68980a Author: Julien Thierry Date: Wed Mar 3 18:05:34 2021 +0100 arm64: insn: Add barrier encodings Create necessary functions to encode/decode aarch64 barrier instructions. DSB needs special case handling as it has multiple encodings. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-7-jthierry@redhat.com [will: Don't reject DSB #4] Signed-off-by: Will Deacon commit 427bfc59e2281eaede70f050062dc31257c46652 Author: Julien Thierry Date: Wed Mar 3 18:05:33 2021 +0100 arm64: insn: Add SVE instruction class SVE has been public for some time now. Let the decoder acknowledge its existence. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-6-jthierry@redhat.com Signed-off-by: Will Deacon commit 72fd723694b6f4f1d1f19f673fb93801d7d1a0e8 Author: Julien Thierry Date: Wed Mar 3 18:05:32 2021 +0100 arm64: Move instruction encoder/decoder under lib/ Aarch64 instruction set encoding and decoding logic can prove useful for some features/tools both part of the kernel and outside the kernel. Isolate the function dealing only with encoding/decoding instructions, with minimal dependency on kernel utilities in order to be able to reuse that code. Code was only moved, no code should have been added, removed nor modifier. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-5-jthierry@redhat.com Signed-off-by: Will Deacon commit 633e5e938fea957577e6db33540a78debf0c5cbe Author: Julien Thierry Date: Wed Mar 3 18:05:30 2021 +0100 arm64: Move aarch32 condition check functions The functions to check condition flags for aarch32 execution is only used to emulate aarch32 instructions. Move them from the instruction encoding/decoding code to the trap handling files. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-3-jthierry@redhat.com [will: leave aarch32_opcode_cond_checks where it is] Signed-off-by: Will Deacon Signed-off-by: Will Deacon commit 5f154c4e20d7edd38bddec78f3e0a7628057ef76 Author: Julien Thierry Date: Wed Mar 3 18:05:29 2021 +0100 arm64: Move patching utilities out of instruction encoding/decoding Files insn.[c|h] containt some functions used for instruction patching. In order to reuse the instruction encoder/decoder, move the patching utilities to their own file. Signed-off-by: Julien Thierry Link: https://lore.kernel.org/r/20210303170536.1838032-2-jthierry@redhat.com [will: Include patching.h in insn.h to fix header mess; add __ASSEMBLY__ guards] Signed-off-by: Will Deacon Signed-off-by: Will Deacon commit f9b7f3703ff97768a8dfabd42bdb107681f1da22 Author: Alex Deucher Date: Tue May 25 17:40:58 2021 -0400 drm/amdgpu/acpi: make ATPX/ATCS structures global (v2) They are global ACPI methods, so maybe the structures global in the driver. This simplified a number of things in the handling of these methods. v2: reset the handle if verify interface fails (Lijo) v3: fix compilation when ACPI is not defined. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f1688bd69ec4b07eda1657ff953daebce7cfabf6 Author: Victor Zhao Date: Thu Mar 18 13:44:35 2021 +0800 drm/amd/amdgpu:save psp ring wptr to avoid attack [Why] When some tools performing psp mailbox attack, the readback value of register can be a random value which may break psp. [How] Use a psp wptr cache machanism to aovid the change made by attack. v2: unify change and add detailed reason Signed-off-by: Victor Zhao Signed-off-by: Jingwen Chen Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit dd1d82c04e111b5a864638ede8965db2fe6d8653 Author: Alex Deucher Date: Wed May 26 23:47:02 2021 -0400 drm/amdgpu/swsmu/aldebaran: fix check in is_dpm_running If smu_cmn_get_enabled_mask() fails, return false to be consistent with other asics. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: Lee Jones Reviewed-by: Lee Jones commit c1b63b4bb4bee8ccb9f513c36e7ace55aa09f447 Author: Lee Jones Date: Wed May 26 09:47:16 2021 +0100 drm/amd/display/modules/hdcp/hdcp_psp: Remove unused function 'mod_hdcp_hdcp1_get_link_encryption_status()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:374:22: warning: no previous prototype for ‘mod_hdcp_hdcp1_get_link_encryption_status’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 397d0c46cb3acacb57facf733fef26987ab6ad56 Author: Lee Jones Date: Wed May 26 09:47:15 2021 +0100 drm/amd/display/dmub/src/dmub_srv_stat: Convert function header to kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv_stat.c:38: warning: Cannot understand ***************************************************************************** Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Jun Lei Cc: Meenakshikumar Somasundaram Cc: Rodrigo Siqueira Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c45f6173eee56ac005c428a7311574d78f61ef30 Author: Lee Jones Date: Wed May 26 09:47:14 2021 +0100 drm/amd/display/dc/core/dc: Convert function headers to kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3324: warning: Cannot understand ***************************************************************************** drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3344: warning: Cannot understand ***************************************************************************** drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3417: warning: Cannot understand ***************************************************************************** Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a76eb7d30f700e5bdecc72d88d2226d137b11f74 Author: Lee Jones Date: Wed May 26 09:47:13 2021 +0100 drm/amd/display/dc/dce110/dce110_hw_sequencer: Include header containing our prototypes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:929:6: warning: no previous prototype for ‘dce110_edp_wait_for_T12’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 48e01bf4c18dbb580773eee316ca2e421dc1beb3 Author: Lee Jones Date: Wed May 26 09:47:12 2021 +0100 drm/amd/display/amdgpu_dm/amdgpu_dm: Fix kernel-doc formatting issue Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:608: warning: Function parameter or member 'interrupt_params' not described in 'dm_dcn_vertical_interrupt0_high_irq' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9d8d96bec51b47e3985ea693b9e5352da81615f6 Author: Lee Jones Date: Wed May 26 09:47:11 2021 +0100 drm/amd/amdgpu/amdgpu_device: Make local function static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4624:6: warning: no previous prototype for ‘amdgpu_device_recheck_guilty_jobs’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 913d18d22a46b58de6baf861672512dd60edee8f Author: Lee Jones Date: Wed May 26 09:47:10 2021 +0100 drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT, MASK Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:29: drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: note: (near initialization for ‘mi_shifts.GRPH_NUM_BANKS’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: note: (near initialization for ‘mi_masks.GRPH_NUM_BANKS’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:264:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0cadcf7c1001613bb7d32cde5d89f35b07b00519 Author: Lee Jones Date: Wed May 26 09:47:09 2021 +0100 drm/amd/display/dc/dce/dce_mem_input: Remove duplicate initialisation of GRPH_CONTROL__GRPH_NUM_BANKS_{SHIFT, MASK} Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:29: drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7270:45: note: (near initialization for ‘mi_shifts.GRPH_NUM_BANKS’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:657:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_sh_mask.h:7269:43: note: (near initialization for ‘mi_masks.GRPH_NUM_BANKS’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:155:28: note: in expansion of macro ‘GRPH_CONTROL__GRPH_NUM_BANKS_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:159:2: note: in expansion of macro ‘SFB’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_mem_input.h:265:2: note: in expansion of macro ‘MI_GFX6_TILE_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:662:3: note: in expansion of macro ‘MI_DCE6_MASK_SH_LIST’ Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 6e4a14ccdc866ba118f3e71a92d807405c0eb53e Author: Lee Jones Date: Wed May 26 09:47:07 2021 +0100 drm/amd/display/dc/dce110/dce110_hw_sequencer: Include our own header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:927:6: warning: no previous prototype for ‘dce110_edp_wait_for_T12’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 353f7f3a9dd5fd2833b6462bac89ec1654c9c3aa Author: Lee Jones Date: Wed May 26 09:47:06 2021 +0100 drm/amd/display/dc/gpio/gpio_service: Pass around correct dce_{version, environment} types Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c: In function ‘dal_gpio_service_create’: drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:71:4: warning: implicit conversion from ‘enum dce_version’ to ‘enum dce_environment’ [-Wenum-conversion] drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:77:4: warning: implicit conversion from ‘enum dce_version’ to ‘enum dce_environment’ [-Wenum-conversion] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5ac1dd89df549648b67f4d5e3a01b2d653914c55 Author: Lee Jones Date: Wed May 26 09:47:05 2021 +0100 drm/amd/display/dc/dce/dmub_outbox: Convert over to kernel-doc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_outbox.c:30: warning: Cannot understand ***************************************************************************** Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Rodrigo Siqueira Cc: Meenakshikumar Somasundaram Cc: Jun Lei Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9e1178ef951c4a3dffcd26b12590933623b1e065 Author: Lee Jones Date: Wed May 26 09:47:04 2021 +0100 drm/amd/display/amdgpu_dm/amdgpu_dm: Functions must directly follow their headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:608: warning: Function parameter or member 'interrupt_params' not described in 'dm_dcn_vertical_interrupt0_high_irq' Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 831a489000f63671c891f796bc778123f501cbbd Author: Lee Jones Date: Wed May 26 09:47:02 2021 +0100 drm/amd/display/dc/bios/bios_parser: Fix formatting and misnaming issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:997: warning: expecting prototype for get_ss_info_from_table(). Prototype was for get_ss_info_from_tbl() instead drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1562: warning: expecting prototype for BiosParserObject(). Prototype was for bios_parser_get_ss_entry_number() instead drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:1739: warning: expecting prototype for get_ss_entry_number_from_internal_ss_info_table_V3_1(). Prototype was for get_ss_entry_number_from_internal_ss_info_tbl_V3_1() instead Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0dc4cbbe70f9950a2919ccc65bf2a5da63f8bf11 Author: Lee Jones Date: Wed May 26 09:47:01 2021 +0100 drm/amd/display/dc/bios/command_table_helper2: Fix function name 'dal_cmd_table_helper_transmitter_bp_to_atom2()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper2.c:141: warning: expecting prototype for translate_transmitter_bp_to_atom2(). Prototype was for dal_cmd_table_helper_transmitter_bp_to_atom2() instead Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 920e2f5a080c6f0edacaa5c928629df972ee955e Author: Lee Jones Date: Wed May 26 09:47:00 2021 +0100 drm/amd/display/dc/bios/command_table_helper: Fix function name for 'dal_cmd_table_helper_transmitter_bp_to_atom()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table_helper.c:127: warning: expecting prototype for translate_transmitter_bp_to_atom(). Prototype was for dal_cmd_table_helper_transmitter_bp_to_atom() instead Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c00e89efb9df8d127e8928e7042aff157391b62d Author: Lee Jones Date: Wed May 26 09:46:59 2021 +0100 drm/amd/pm/powerplay/hwmgr/vega20_hwmgr: Provide function name 'vega20_init_smc_table()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_hwmgr.c:781: warning: expecting prototype for Initializes the SMC table and uploads it(). Prototype was for vega20_init_smc_table() instead Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3818cd13dbb817d3ac01972a679548a3a2f2e901 Author: Lee Jones Date: Wed May 26 09:46:58 2021 +0100 drm/amd/pm/powerplay/hwmgr/vega10_hwmgr: Kernel-doc headers must contain function names Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:547: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:603: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:629: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1006: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1155: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1608: warning: expecting prototype for Populates single SMC GFXSCLK structure using the provided engine clock(). Prototype was for vega10_populate_single_gfx_level() instead drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1663: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1713: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:1862: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2546: warning: expecting prototype for Initializes the SMC table and uploads it(). Prototype was for vega10_init_smc_table() instead drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:2922: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0fc955e5c55d6715e8738ebab78c5c10316491ba Author: Lee Jones Date: Wed May 26 09:46:57 2021 +0100 drm/amd/pm/powerplay/hwmgr/vega12_hwmgr: Provide 'vega12_init_smc_table()' function name Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_hwmgr.c:812: warning: expecting prototype for Initializes the SMC table and uploads it(). Prototype was for vega12_init_smc_table() instead Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f9a698fcd572ede2e57ab2492e6ea0aa71e628d1 Author: Lee Jones Date: Wed May 26 09:46:56 2021 +0100 drm/amd/pm/powerplay/hwmgr/vega12_thermal: Provide function name Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega12_thermal.c:171: warning: expecting prototype for Set the requested temperature range for high and low alert signals(). Prototype was for vega12_thermal_set_temperature_range() instead Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 92ee6b1a695e39443a31b9cce73158203e0adda4 Author: Lee Jones Date: Wed May 26 09:46:55 2021 +0100 drm/amd/pm/powerplay/hwmgr/smu7_thermal: Provide function name for 'smu7_fan_ctrl_set_default_mode()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_thermal.c:132: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d26ebc58526b1df7838d5652cec25a0c8191bc48 Author: Lee Jones Date: Wed May 26 09:46:53 2021 +0100 drm/amd/pm/inc/smu_v13_0: Move table into the only source file that uses it Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/inc/smu_v13_0.h:54:43: warning: ‘smu13_thermal_policy’ defined but not used [-Wunused-const-variable=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Kevin Wang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4965257fe6180623c4e5c1598f0704f1b68a6e63 Author: Alex Deucher Date: Tue May 25 23:20:03 2021 -0400 drm/amdgpu/acpi: fix typo in ATCS handling Path should be NULL when we already have the handle to the object. Reviewed-by: Lijo Lazar Tested-by: Sathishkumar S Reviewed-by: Sathishkumar S Signed-off-by: Alex Deucher commit eae902f95e4585a1e18625d5fed19cdf43e2267d Author: Qingqing Zhuo Date: Thu May 20 14:58:41 2021 -0400 Revert "drm/amd/display: Refactor and add visual confirm for HW Flip Queue" This reverts commit 3ca402375a2197579d1029e7fa9d856847fe0e7b. Recent visual confirm changes are regressing the driver, causing a black screen on boot in some green sardine configs, or visual confirm is not updated at all. Signed-off-by: Qingqing Zhuo Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 397239a299121650258ef8ef738563127e3e5592 Author: Aric Cyr Date: Sun May 16 17:33:33 2021 -0400 drm/amd/display: 3.2.137 DC version 3.2.137 brings improvements in multiple areas. In summary, we highlight: - Updates on DP configurations and clock recovery API - Improvements on DSC, link training sequence, etc. - Fixes on memory leak, ODM scaling, etc. Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6566cae7aef30da8833f1fa0eb854baf33b96676 Author: Dmytro Laktyushkin Date: Mon May 10 10:19:18 2021 -0400 drm/amd/display: fix odm scaling There are two issues with scaling calculations, odm recout calculation and matching viewport to actual recout. This change fixes both issues. Odm recout calculation via special casing and viewport matching issue by reworking the viewport calcualtion to use scaling ratios and recout to derrive the required offset and size. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 998b7ad2efd4c54a6317344c59abc64e9a3b3086 Author: Fangzhi Zuo Date: Thu May 13 19:01:55 2021 -0400 drm/amd/display: Refactor SST DSC Determination Policy [Why & How] SST dsc determination policy becomes bigger when more scenarios are introduced. Take it out to make it clean and readable. Signed-off-by: Fangzhi Zuo Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 27fc432865bdbfb0c0bab6d371394e7b5fd420df Author: Fangzhi Zuo Date: Thu May 13 10:07:47 2021 -0400 drm/amd/display: Add Log for SST DSC Determination Policy [Why & How] To facilitate DSC debugging purpose Signed-off-by: Fangzhi Zuo Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cd6a9a1c15c2942c6a3b19a33a2523a18229ec4a Author: Wenjing Liu Date: Tue May 4 15:19:13 2021 -0400 drm/amd/display: isolate 8b 10b link training sequence into its own function [how] 1. move 8b 10 link trianing into its own function 2. make link status check after a link success link as part of dp transition to video idle sequence. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3df212576e8b6fb94f8e4b856d39853557d22005 Author: Wenjing Liu Date: Mon May 3 19:35:54 2021 -0400 drm/amd/display: add exit training mode and update channel coding in LT [why] As recommended by DP specs, source needs to make sure DPRX exits previous LT mode before configuring new LT params Nofity what channel coding mode we will use for current link training. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f2973d2a418db94532a7f69c7ea404637cec1786 Author: Alvin Lee Date: Mon May 10 10:11:46 2021 -0400 drm/amd/display: Implement INBOX0 usage in driver [Why] Start using INBOX0 for HW Lock command [How] - Implement initial interface for INBOX0 HW lock message Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 051b7887189416c6a60e393251f481c151a676bd Author: Roman Li Date: Mon May 10 11:58:54 2021 -0400 drm/amd/display: Fix potential memory leak in DMUB hw_init [Why] On resume we perform DMUB hw_init which allocates memory: dm_resume->dm_dmub_hw_init->dc_dmub_srv_create->kzalloc That results in memory leak in suspend/resume scenarios. [How] Allocate memory for the DC wrapper to DMUB only if it was not allocated before. No need to reallocate it on suspend/resume. Signed-off-by: Lang Yu Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3beac533b8daa18358dabbe5059c417d192b2a93 Author: Roman Li Date: Mon May 10 11:29:29 2021 -0400 drm/amd/display: Remove redundant safeguards for dmub-srv destroy() [Why] dc_dmub_srv_destroy() has internal null-check and null assignment. No need to duplicate them externally. [How] Remove redundant safeguards. Signed-off-by: Lang Yu Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e84ecdc5bd753632a90ec1eba26f9bb198030d08 Author: Jimmy Kizito Date: Tue Apr 27 18:46:11 2021 -0400 drm/amd/display: Expand DP module clock recovery API. [Why & How] Add functionality useful for DP clock recovery phase of link training to public interface. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7211b60514f88e695080ebc4074c6affd880acb8 Author: Jimmy Kizito Date: Mon Apr 12 16:03:11 2021 -0400 drm/amd/display: Update DP link configuration. [Why & How] - Update application of training settings for links whose encoders are assigned dynamically. - Add functionality useful for DP link configuration to public interface. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 68d9821ff4d28eb880a0ebce60819ed8fbb730ca Author: Fangzhi Zuo Date: Mon May 10 12:01:42 2021 -0400 drm/amd/display: Retrieve DSC Branch Decoder Caps DSC extended branch decoder caps 0xA0 ~ 0xA2 is read from dsc_aux. The dsc_aux is returned from drm dsc determination policy with the right DSC capable MST branch device for decoding. The values are all zero if DSC decoding at a MST BU with virtual DPCD; The values are meaningful when DSC decoding at a MST BU without virtual DPCD or at a DSC capable MST endpoint. Signed-off-by: Fangzhi Zuo Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4932d17697f243976286350a272d59a1b7cdb72b Author: hvanzyll Date: Sat May 8 20:50:05 2021 -0400 drm/amd/display: disable desktop VRR when using older flip model [WHY] OS uses older flip model which does not work with desktop VRR causing memory allocations at the wrong IRQ level. [HOW] Checks added to flip model to verify model is 2.2 or greater when doing any of the desktop VRR checks for full updates. This prevents full updates when VRR changes until a mode change. Signed-off-by: Harry VanZyllDeJong Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6e568e438b4d4e9754bdf361a91e0a774ca082ed Author: Jake Wang Date: Fri Apr 23 16:42:35 2021 -0400 drm/amd/display: Added support for individual control for multiple back-light instances. [Why & How] Added support for individual control for multiple back-light instances. Signed-off-by: Jake Wang Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6fc632d3e3e09958f15a4cc8eb37accbb8c60cf0 Author: Konrad Dybcio Date: Sun Feb 28 13:41:05 2021 +0100 video: backlight: qcom-wled: Add PMI8994 compatible Add a compatible for PMI8994 WLED. It uses the V4 of WLED IP. Signed-off-by: Konrad Dybcio Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 05adfd80cc52e0b4581e65bb5418de5dfd24d105 Author: Luben Tuikov Date: Fri May 21 11:53:09 2021 -0400 drm/amdgpu: Use delayed work to collect RAS error counters On Context Query2 IOCTL return the correctable and uncorrectable errors in O(1) fashion, from cached values, and schedule a delayed work function to calculate and cache them for the next such IOCTL. v2: Cancel pending delayed work at ras_fini(). v3: Remove conditionals when dealing with delayed work manipulation as they're inherently racy. Cc: Alexander Deucher Cc: Christian König Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: Alexander Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a46751fbcde505e6aff8622e17995092c8d86ae4 Author: Luben Tuikov Date: Tue May 18 21:07:17 2021 -0400 drm/amdgpu: Fix RAS function interface The correctable and uncorrectable errors are calculated at each invocation of this function. Therefore, it is highly inefficient to return just one of them based on a Boolean input. If the caller wants both, twice the work would be done. (And this work is O(n^3) on Vega20.) Fix this "interface" to simply return what it had calculated--both values. Let the caller choose what it wants to record, inspect, use. Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: Alexander Deucher Signed-off-by: Alex Deucher commit 2871e10199430132c69d81c3c302db05d19db4e1 Author: Luben Tuikov Date: Wed May 12 12:33:23 2021 -0400 drm/amdgpu: Don't query CE and UE errors On QUERY2 IOCTL don't query counts of correctable and uncorrectable errors, since when RAS is enabled and supported on Vega20 server boards, this takes insurmountably long time, in O(n^3), which slows the system down to the point of it being unusable when we have GUI up. Fixes: ae363a212b14 ("drm/amdgpu: Add a new flag to AMDGPU_CTX_OP_QUERY_STATE2") Cc: Alexander Deucher Cc: stable@vger.kernel.org Signed-off-by: Luben Tuikov Reviewed-by: Alexander Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5a645ff5c619856147ddc5d73e9394f6be936299 Author: Mukul Joshi Date: Tue May 25 12:08:20 2021 -0400 drm/amdgpu: Correctly clear GCEA error status While clearing GCEA error status, do not clear the bits set by RAS TA. Signed-off-by: Mukul Joshi Reviewed-by: John Clements Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e8ce3d474fb948d6f22b4cfddc6d5ef8446ab252 Author: Rodrigo Siqueira Date: Fri May 14 07:47:34 2021 -0400 drm/amd/display: Fix overlay validation by considering cursors A few weeks ago, we saw a two cursor issue in a ChromeOS system. We fixed it in the commit: drm/amd/display: Fix two cursor duplication when using overlay (read the commit message for more details) After this change, we noticed that some IGT subtests related to kms_plane and kms_plane_scaling started to fail. After investigating this issue, we noticed that all subtests that fail have a primary plane covering the overlay plane, which is currently rejected by amdgpu dm. Fail those IGT tests highlight that our verification was too broad and compromises the overlay usage in our drive. This patch fixes this issue by ensuring that we only reject commits where the primary plane is not fully covered by the overlay when the cursor hardware is enabled. With this fix, all IGT tests start to pass again, which means our overlay support works as expected. Cc: Tianci.Yin Cc: Harry Wentland Cc: Nicholas Choi Cc: Bhawanpreet Lakha Cc: Nicholas Kazlauskas Cc: Mark Yacoub Cc: Daniel Wheeler Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c8237760cc56c79e04a6a47696ef8bb0aab8c77a Author: Yanteng Si Date: Mon May 24 10:23:08 2021 +0800 docs: zh_CN: update Chinese translations Two new commits were added to the original document: commit ddba35031db2ea89facc91c745e5ad55ba2e0e7f commit 20bc8c1e972f29afcac85e524e430c11a6df5f58 translate them into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210524022308.1216098-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 8de8fe4f5db6b6bdaf23977f4d165f8c4e94f4ce Author: Yanteng Si Date: Mon May 24 10:40:17 2021 +0800 docs/zh_CN: add core api local_ops.rst translation Translate Documentation/core-api/local_ops.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/11da5738679fbab9e875f434745d16db1f167f90.1621823299.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 811c3c4723cc2309654c58e8615c775d41ac53ef Author: Yanteng Si Date: Mon May 24 10:40:16 2021 +0800 docs/zh_CN:add core-api refcount-vs-atomic.rst translation. Translate Documentation/core-api/refcount-vs-atomic.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/cbdd1d8b23b8ce6dff0a98a0d89b78673365aa28.1621823299.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 544ef682c60484151292eb04183e44a9dd6bb0de Author: Barry Song Date: Mon May 24 17:17:15 2021 +1200 docs: kernel-parameters: mark numa=off is supported by a bundle of architectures risc-v and arm64 support numa=off by common arch_numa_init() in drivers/base/arch_numa.c. x86, ppc, mips, sparc support it by arch-level early_param. numa=off is widely used in linux distributions. it is better to document it. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20210524051715.13604-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet commit 1e03fe240512621605ec47f93dc29994026a2984 Author: Mauro Carvalho Chehab Date: Tue May 25 14:23:53 2021 +0200 iio: ABI: sysfs-bus-iio: avoid a warning when doc is built The description of those vars produce this warning: Documentation/ABI/testing/sysfs-bus-iio:799: WARNING: Inline emphasis start-string without end-string. Due to an asterisk, which is the markup for emphasis. One possible fix would be to use ``*_timeout`` to avoid it, but looking at the descriptions of other fields in this file, a common pattern is to refer to "these" when talking about the API calls that are described. So, change the text in order to preserve the meaning while avoiding the need of using an asterisk there. Reported-by: Jonathan Corbet Reported-by: Matthew Wilcox Signed-off-by: Mauro Carvalho Chehab Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/dbf0d94f85217f103d77dc8389c8db272f5702d2.1621944866.git.mchehab+huawei@kernel.org [jc fixed specifiy->specify] Signed-off-by: Jonathan Corbet commit b77e4c4e655b455c4aba196838d1102c0e3414a4 Author: Mauro Carvalho Chehab Date: Tue May 25 14:23:52 2021 +0200 iio: ABI: sysfs-bus-iio: fix a typo Descrption -> Description This causes some errors when parsed via scripts/get_abi.pl. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/fa90a2deebac80da42b1ad4cf570c4ace436577d.1621944866.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit a6419e53c779302f8d5dd409eccf5b41ffa184a4 Author: Krzysztof Kozlowski Date: Thu May 6 16:27:29 2021 -0400 MAINTAINERS: Include Samsung PWM in Samsung SoC entry The Samsung PWM and PWM-based timer/clocksource drivers lacked dedicated maintainers entry. They are used on all Samsung SoC designs (although timer/clocksource driver only on older platforms), so include them in Samsung SoC entry maintained by Krzysztof Kozlowski. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210506202729.157260-5-krzysztof.kozlowski@canonical.com commit f7ebe6b76940f873645ff110192b08e64334a112 Author: Akira Yokosawa Date: Wed May 26 00:25:39 2021 +0900 docs: Activate exCJK only in CJK chapters Activating xeCJK in English and Italian-translation documents results in sub-optimal typesetting with wide-looking apostrophes and quotation marks. The xeCJK package provides macros for enabling and disabling its effect in the middle of a document, namely \makexeCJKactive and \makexeCJKinactive. So the goal of this change is to activate xeCJK in the relevant chapters in translations. To do this: o Define custom macros in the preamble depending on the availability of the "Noto Sans CJK" font so that those macros can be used regardless of the use of xeCJK package. o Patch \sphinxtableofcontents so that xeCJK is inactivated after table of contents. o Embed those custom macros in each language's index.rst file as a ".. raw:: latex" construct. Note: A CJK chapter needs \kerneldocCJKon in front of its chapter heading, while a non-CJK chapter should have \kerneldocCJKoff below its chapter heading. This is to make sure the CJK font is available to CJK chapter's heading and ending page's footer. Tested against Sphinx versions 2.4.4 and 4.0.2. Signed-off-by: Akira Yokosawa Tested-by: Wu XiangCheng Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/lkml/2061da0a-6ab1-35f3-99c1-dbc415444f37@gmail.com Link: https://lore.kernel.org/r/83208ddc-5de9-b283-3fd6-92c635348ca0@gmail.com Signed-off-by: Jonathan Corbet commit 16b79a1e083371a38f72872345866e81abb7ca18 Author: Krzysztof Kozlowski Date: Tue May 25 14:47:16 2021 -0400 soc: samsung: pmu: drop EXYNOS_CENTRAL_SEQ_OPTION defines The defines for Exynos5 CENTRAL_SEQ_OPTION (e.g. EXYNOS5_USE_STANDBYWFI_ARM_CORE1) are not used. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20210525184716.119663-1-krzysztof.kozlowski@canonical.com commit 47c0d825b926856d86685a48c82f693f56ca3f6f Author: Zou Wei Date: Thu May 27 19:07:32 2021 +0800 ASoC: imx-rpmsg: fix platform_no_drv_owner.cocci warnings ./sound/soc/fsl/imx-rpmsg.c:140:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Reported-by: Hulk Robot Signed-off-by: Zou Wei Message-Id: <1622113652-56646-1-git-send-email-zou_wei@huawei.com> Signed-off-by: Mark Brown commit 0b86952d15ceae275f685f9bb571fea30904147f Author: Ville Syrjälä Date: Wed May 26 20:36:00 2021 +0300 drm/i915/adl_p: Implement Wa_22012358565 Implement Wa_22012358565 to avoid underrun with 32bpp cursor in some high bandwidth scenarios. The implementation calls for overriding the arbitration slots for the planes. v2: Fix adlp_plane_ctl_arb_slots() return type Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210526173600.27708-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit d091fc53eb77f8a2a205b41806cfee5674c6a6ae Author: Ville Syrjälä Date: Wed May 26 20:35:59 2021 +0300 drm/i915/adl_p: Disable FIFO underrun recovery The FIFO underrun recovery mechanism has a boatload of cases where it can't be used. The description is also a bit ambiguous as it doesn't specify whether plane downscaling needs to be considered or just pipe downscaling. We may not even have sufficient state tracking to decide this on demand, so for now just disable the whole thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210526173600.27708-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 71c320206a599fa08d5c6b217d930b4c62056c48 Author: Imre Deak Date: Wed May 26 23:34:56 2021 +0300 drm/i915/adlp: Add missing TBT AUX -> PW#2 power domain dependencies On ADL_P the TBT AUX power wells depend on the PW#2 power well, add the corresponding power domain dependencies. Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210526203456.2733040-1-imre.deak@intel.com commit e94d8b6fb83a81fa8c6595fadcada7b349e7694a Author: Fabien Parent Date: Wed May 19 18:24:08 2021 +0200 pinctrl: mediatek: add support for mt8365 SoC Add pinctrl driver for MT8365 SoC. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210519162409.3755679-3-fparent@baylibre.com Signed-off-by: Linus Walleij commit 9f940d8ecf921d2638b05da60eec0d25459be170 Author: Fabien Parent Date: Wed May 19 18:24:07 2021 +0200 pinctrl: mediatek: don't hardcode mode encoding in common code MT8365 encode the pins mode differently than other MTK pinctrl drivers that use the PINCTRL_MTK common code. Add 3 new fields in mtk_pinctrl_devdata in order to store how pin modes are encoded into the register. At the same time update all the pinctrl driver that depends on CONFIG_PINCTRL_MTK. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210519162409.3755679-2-fparent@baylibre.com Signed-off-by: Linus Walleij commit 8b4c397d88d97d4fd9c3f3527aa66688b1a3387a Author: Fabien Parent Date: Wed May 19 18:24:06 2021 +0200 dt-bindings: pinctrl: mt65xx: add mt8365 SoC binding Add binding documentation for MT8365 Pin controller. Signed-off-by: Fabien Parent Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210519162409.3755679-1-fparent@baylibre.com Signed-off-by: Linus Walleij commit 7ea40b54e83baed17d85567cfae56175def39a55 Author: David Bauer Date: Mon May 10 15:33:40 2021 +0200 mtd: spi-nor: enable locking support for MX25L12805D Macronix MX25L12805D supports locking with 4 block protection bits in its status register. Add the corresponding flag in order to clear these bits when unloking the flash. Otherwise, the flash might not be writable depending on the state left by the bootloader. Tested-on: Ubiquiti UniFi AC Lite (ath79) Signed-off-by: David Bauer Signed-off-by: Vignesh Raghavendra Reviewed-by: Michael Walle commit 39b27e89a76f3827ad93aed9213a6daf2b91f819 Author: Uwe Kleine-König Date: Tue May 25 12:37:11 2021 +0200 driver core: Drop helper devm_platform_ioremap_resource_wc() Since the macro was introduced in 2019 (commit bb6243b4f73d ("drivers: platform: provide devm_platform_ioremap_resource_wc()") there is only a single user which hardly justifies the function for the small task it provides. So drop the helper and open-code it in the only user. Adapt the non-wc case accordingly. For a all-mod-config build on amd64 this change introduces the following changes according to bloat-o-meter: add/remove: 0/1 grow/shrink: 1/0 up/down: 20/-252 (-232) Function old new delta devm_platform_ioremap_resource_wc 252 - -252 sram_probe 796 816 +20 Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210525103711.956438-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d52ff34ee952b68c6d08eb56f2e99b926188f9e6 Author: Stephen Boyd Date: Wed May 19 17:25:14 2021 -0700 component: Rename 'dev' to 'parent' Let's rename this struct member to 'parent' to better reflect the reality that it's the parent device of this psuedo-device. In the next patch we'll put a 'struct device' inside of this struct so moving this away simplifies that patch by reducing the number of places that 'dev' is modified. Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210520002519.3538432-3-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman commit 82769cc671b6ddfc87654ff8169efdb3925a621b Author: Stephen Boyd Date: Wed May 19 17:25:13 2021 -0700 component: Drop 'dev' argument to component_match_realloc() This argument isn't used. Drop it. Cc: Daniel Vetter Cc: "Rafael J. Wysocki" Cc: Rob Clark Cc: Russell King Cc: Saravana Kannan Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210520002519.3538432-2-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman commit 7e7ba9b3d46d47e9f75cbf9d5392583a958a9807 Author: Andy Shevchenko Date: Tue May 18 09:48:43 2021 +0300 device property: Don't check for NULL twice in the loops In fwnode_get_next_available_child_node() we check next_child for NULL twice. All the same in fwnode_get_next_parent_dev() we may avoid checking fwnode for NULL twice. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210518064843.3524015-1-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1b32fce42bff899dfb9b72962f46ca5542c7647c Author: Wolfram Sang Date: Tue May 25 11:15:12 2021 +0200 ARM: dts: alt: Add SW2 as GPIO keys SW2 on Alt is connected as on Lager board. So, use the same GPIO settings. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210525091512.29119-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 0d71f80b1898311420b4d07183a1e693c9b20c9e Author: Uwe Kleine-König Date: Tue May 25 12:00:42 2021 +0200 driver core: auxiliary bus: Fix typo in the docs My editor's spell checker noticed that one while I read through the document. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210525100042.951717-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d327ea15a305024ef0085252fa3657bbb1ce25f5 Author: Richard Fitzgerald Date: Tue May 25 13:20:12 2021 +0100 random32: Fix implicit truncation warning in prandom_seed_state() sparse generates the following warning: include/linux/prandom.h:114:45: sparse: sparse: cast truncates bits from constant value This is because the 64-bit seed value is manipulated and then placed in a u32, causing an implicit cast and truncation. A forced cast to u32 doesn't prevent this warning, which is reasonable because a typecast doesn't prove that truncation was expected. Logical-AND the value with 0xffffffff to make explicit that truncation to 32-bit is intended. Reported-by: kernel test robot Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210525122012.6336-3-rf@opensource.cirrus.com commit 1b932689c77766b68e2ead51ca0fb84ec5bb8965 Author: Richard Fitzgerald Date: Tue May 25 13:20:11 2021 +0100 lib: test_scanf: Remove pointless use of type_min() with unsigned types sparse was producing warnings of the form: sparse: cast truncates bits from constant value (ffff0001 becomes 1) There is no actual problem here. Using type_min() on an unsigned type results in an (expected) truncation. However, there is no need to test an unsigned value against type_min(). The minimum value of an unsigned is obviously 0, and any value cast to an unsigned type is >= 0, so for unsigneds only type_max() need be tested. This patch also takes the opportunity to clean up the implementation of simple_numbers_loop() to use a common pattern for the positive and negative test. Reported-by: kernel test robot Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210525122012.6336-2-rf@opensource.cirrus.com commit 790c06cc5df263cdaff748670cc65958c81b0951 Author: Kuninori Morimoto Date: Thu May 27 13:36:38 2021 +0900 clk: renesas: r8a77995: Add ZA2 clock R-Car D3 ZA2 clock is from PLL0D3 or S0, and it can be controlled by ZA2CKCR. It is needed for R-Car Sound, but is not used so far. Using default settings is very enough at this point. This patch adds it by DEF_FIXED(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmxclrmy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 3f6ecaf1cad98b266ba3eea4691a71c9ccac8076 Author: Geert Uytterhoeven Date: Tue May 4 11:17:22 2021 +0200 clk: renesas: cpg-mssr: Make srstclr[] comment block consistent Make the style of the comment block for the Software Reset Clearing Register offsets consistent with the comment blocks for the other register offsets. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/97dde75fe3ff27b9639c59a43cddbd9d5c405d0c.1620119700.git.geert+renesas@glider.be commit 682b108ba598e36d8232c9df14d41b3e9993784f Author: Geert Uytterhoeven Date: Tue May 4 11:17:21 2021 +0200 clk: renesas: cpg-mssr: Remove unused [RM]MSTPCR() definitions The Realtime Module Stop Control Register definitions (RMSTPCR(i)) are incorrect for i >= 8 on R-Car Gen2 and Gen3. As these are unused, and not planned to be used, just like the corresponding Modem Module Stop Control Register definitions (MMSTPCR()) on R-Mobile APE6 (they are intended for the software running on the Real-Time and Modem CPU cores), they can just be removed. Reported-by: Hai Nguyen Pham Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/2d8bc4d9806b419ebb06030d2f31b2ea1e59b1d6.1620119700.git.geert+renesas@glider.be commit fad92b11047a748c996ebd6cfb164a63814eeb2e Author: Christophe JAILLET Date: Tue May 25 21:44:04 2021 +0200 tty: serial: 8250: serial_cs: Fix a memory leak in error handling path In the probe function, if the final 'serial_config()' fails, 'info' is leaking. Add a resource handling path to free this memory. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/dc25f96b7faebf42e60fe8d02963c941cf4d8124.1621971720.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 6ae7d0f5a92b9619f6e3c307ce56b2cefff3f0e9 Author: Christophe JAILLET Date: Tue May 25 20:51:57 2021 +0200 tty: nozomi: Fix the error handling path of 'nozomi_card_init()' The error handling path is broken and we may un-register things that have never been registered. Update the loops index accordingly. Fixes: 9842c38e9176 ("kfifo: fix warn_unused_result") Suggested-by: Dan Carpenter Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e28c2e92c7475da25b03d022ea2d6dcf1ba807a2.1621968629.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit f2b0fe4b121e25bacdcfebd8a9dfd307b87142e7 Author: Zhen Lei Date: Thu May 20 19:54:39 2021 +0800 dt-bindings: serial: pl011: Delete an incorrect compatible string The compatible strings "zte,zx296702-uart" and "arm,primecell" are a combination, but commit 89d4f98ae90d ("ARM: remove zte zx platform") removes only the former. It is incorrect to match driver pl011 based only on the remaining "arm,primecell". Delete it. Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Documentation/devicetree/bindings/serial/pl011.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) Link: https://lore.kernel.org/r/20210520115440.8259-2-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit d99247f9b542533ddbf87a3481a05473b8e48194 Author: Christophe JAILLET Date: Fri May 21 20:22:15 2021 +0200 firmware: stratix10-svc: Fix a resource leak in an error handling path If an error occurs after a successful 'kfifo_alloc()' call, it must be undone by a corresponding 'kfifo_free()' call, as already done in the remove function. While at it, move the 'platform_device_put()' call to this new error handling path and explicitly return 0 in the success path. Fixes: b5dc75c915cd ("firmware: stratix10-svc: extend svc to support new RSU features") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0ca3f3ab139c53e846804455a1e7599ee8ae896a.1621621271.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 5fe3cba0bf5c2c1331cbf21baea6a99daa0a6f78 Author: Heiner Kallweit Date: Mon May 24 22:18:23 2021 +0200 eeprom: ee1004: Add helper ee1004_cleanup Factor out the cleanup code to a new helper ee1004_cleanup(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/9738cbc7-458d-276f-4012-66551f105d90@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8700a7328e89371493c267edb4c8812645f6e38b Author: Heiner Kallweit Date: Mon May 24 22:17:28 2021 +0200 eeprom: ee1004: Add constant EE1004_NUM_PAGES Add a constant for the number of pages. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/6167f9c5-995a-03c3-c324-e93e2a6c969b@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8aeacb7a2de36e429213faa3b0d092a8e9019b3c Author: Heiner Kallweit Date: Mon May 24 22:16:51 2021 +0200 eeprom: ee1004: Move call to ee1004_set_current_page to ee1004_eeprom_read Moving the call to ee1004_set_current_page() to ee1004_eeprom_read() allows to simplify the code. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/2829a131-51e3-8865-462a-564080158b0b@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6f68dbd6cc7b440c91aea894e214a7065f5fbbb6 Author: Heiner Kallweit Date: Mon May 24 22:16:05 2021 +0200 eeprom: ee1004: Improve error handling in ee1004_read Simplify the error handling and make it better readable. No functional change intended. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/13ad7b39-e722-d70a-e25b-03d1fb1734a7@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6601017e2a4936a93c7d9527cd25a4a2c16cc5ef Author: Heiner Kallweit Date: Mon May 24 22:15:26 2021 +0200 eeprom: ee1004: Factor out setting page to ee1004_set_current_page Factor out setting the page, this makes the code better readable. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/21e0966f-e6c9-045f-b130-bd9fb071f0d7@gmail.com Signed-off-by: Greg Kroah-Hartman commit b2cd8a2f8eb148366fb974e265f1799e93062ea7 Author: Heiner Kallweit Date: Mon May 24 22:14:43 2021 +0200 eeprom: ee1004: Cache current page at initialization of first device only The value of ee1004_current_page applies to all SPD eeproms connected to the adapter. Therefore it's sufficient if we set ee1004_current_page when the first device is added. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/b9240e58-08bb-3d71-7a9c-9a323b470ab6@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ac99039c568467ea2e593221aa2a741fa63f0b1 Author: Heiner Kallweit Date: Mon May 24 22:13:52 2021 +0200 eeprom: ee1004: Switch to i2c probe_new callback Switch to the new i2c_driver probe callback version. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/eb5be659-7427-46c5-66c2-b39650e08ea3@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c03dad7652ee2b30728a263905de93a79205477 Author: Heiner Kallweit Date: Mon May 24 22:13:12 2021 +0200 eeprom: ee1004: Improve creating dummy devices i2c_new_dummy_device() calls i2c_new_client_device() that complains if it fails to create the device. Therefore we don't have to emit an error message in case of failure. In addition ensure that ee1004_set_page is only set if creating the device succeeded. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/d38df5ac-6ecb-7d5f-b5c3-39bfc6a1e8a1@gmail.com Signed-off-by: Greg Kroah-Hartman commit 08e5138aa419350d0a168abeac3ecec4b7e779be Author: Heiner Kallweit Date: Mon May 24 22:12:22 2021 +0200 eeprom: ee1004: Improve check for SMBUS features We have to read 512 bytes only, therefore read performance isn't really a concern. Don't bother the user if i2c block read isn't supported. For i2c_smbus_read_i2c_block_data_or_emulated() to work it's sufficient if I2C_FUNC_SMBUS_READ_I2C_BLOCK or I2C_FUNC_SMBUS_READ_BYTE_DATA is supported. Therefore remove the check for I2C_FUNC_SMBUS_READ_WORD_DATA. In addition check for I2C_FUNC_SMBUS_WRITE_BYTE (included in I2C_FUNC_SMBUS_BYTE) which is needed for setting the page. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/840c668e-6310-e933-e50e-5abeaecfb39c@gmail.com Signed-off-by: Greg Kroah-Hartman commit b97ba92e2962b7ede713bc5b70dcf747083e45f9 Author: Heiner Kallweit Date: Mon May 24 22:11:31 2021 +0200 eeprom: ee1004: Remove usage of i2c_adapter_id in adapter comparison We can compare the adapter pointers directly instead of using i2c_adapter_id(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/99a3f94d-e7ca-e01d-6a78-81e109fde086@gmail.com Signed-off-by: Greg Kroah-Hartman commit 64bf274711c0ba973bb1907fd5119c0d06255e37 Author: Heiner Kallweit Date: Mon May 24 22:10:47 2021 +0200 eeprom: ee1004: Remove not needed check in ee1004_eeprom_read i2c_smbus_read_i2c_block_data_or_emulated() checks its length argument, so we don't have to do it. In addition remove the unlikely hint from the checks, we do i2c reads and therefore are in a slow path. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/eb2a8bff-43ec-c763-a417-9d741e6f0034@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7abdadfcf19a385b6f8ffea75457074240a9536f Author: Heiner Kallweit Date: Mon May 24 22:09:49 2021 +0200 eeprom: ee1004: Remove not needed check in ee1004_read sysfs_kf_bin_read() checks this for us already. In addition the function works correctly also w/o this check. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/33889bff-3614-4b73-5010-701635e1edab@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7adbd54fb23b38fd7bc28f679445ae93d3846c40 Author: Heiner Kallweit Date: Mon May 24 22:08:51 2021 +0200 eeprom: ee1004: Use kobj_to_i2c_client to simplify the code Switch to helper kobj_to_i2c_client() to simplify the code. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/4ae57f09-b803-6ae3-c734-87e733a56eb8@gmail.com Signed-off-by: Greg Kroah-Hartman commit 394febc9d0a607d6310e14d8248af62125feb5d1 Author: Christophe JAILLET Date: Sat May 22 08:55:20 2021 +0200 misc/pvpanic: Make 'pvpanic_probe()' resource managed Simplify code and turn 'pvpanic_probe()' into a managed resource version. This simplify callers that don't need to do some clean-up on error in the probe and on remove. Update pvpanic-mmio.c and pvpanic-pci.c accordingly. 'pvpanic_remove()' don't need to be exported anymore. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/9212cdc8c1e5c187a2f1129a6190085c2a10d28a.1621665058.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit a224db273accc43699598a89895f9215ccfc2f31 Author: Christophe JAILLET Date: Sat May 22 08:55:12 2021 +0200 misc/pvpanic-mmio: Use GFP_KERNEL instead of GFP_ATOMIC There is no need to use GFP_ATOMIC in a probe function. Use GFP_KERNEL instead. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/58cc7f12535a796a0ef1a699bcba61e45ab8a2ad.1621665058.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 9a3c72ee6ffcd461bae1bbdf4e71dca6d5bc160c Author: Christophe JAILLET Date: Sat May 22 08:55:03 2021 +0200 misc/pvpanic-mmio: Fix error handling in 'pvpanic_mmio_probe()' There is no error handling path in the probe function. Switch to managed resource so that errors in the probe are handled easily and simplify the remove function accordingly. Fixes: b3c0f8774668 ("misc/pvpanic: probe multiple instances") Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/2a5dab18f10db783b27e0579ba66cc38d610734a.1621665058.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit b647ceb5a13e0cbe2f47fcc939a87526e1debf10 Author: Christophe JAILLET Date: Sat May 22 08:54:52 2021 +0200 misc/pvpanic-pci: Use GFP_KERNEL instead of GFP_ATOMIC There is no need to use GFP_ATOMIC in a probe function. Use GFP_KERNEL instead. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/5ea4fb9802f7b780cc3e5ae768561a0372a39ebb.1621665058.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 372dae89972594393b57f29ec44e351fa7eedbbe Author: Christophe JAILLET Date: Sat May 22 08:54:33 2021 +0200 misc/pvpanic-pci: Fix error handling in 'pvpanic_pci_probe()' There is no error handling path in the probe function. Switch to managed resource so that errors in the probe are handled easily and simplify the remove function accordingly. Fixes: db3a4f0abefd ("misc/pvpanic: add PCI driver") Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ab071b1f4ed6e1174f9199095fb16a58bb406090.1621665058.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit ee9b9b81ecd744504bbf1c50d86db8251cc7e41e Author: Nijam Haider Date: Tue May 25 03:22:02 2021 +0530 char: pcmcia: scr24x_cs: Fix redundant fops Removed redundant fops assignment, which was already done in cdev_init() Signed-off-by: Nijam Haider Link: https://lore.kernel.org/r/20210524215202.495-2-nizamhaider786@gmail.com Signed-off-by: Greg Kroah-Hartman commit 37188559c610f1b7eec83c8e448936c361c578de Author: Yu Kuai Date: Fri May 21 20:06:17 2021 +0800 char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol() Theoretically, it will cause index out of bounds error if 'num_bytes_read' is greater than 4. As we expect it(and was tested) never to be greater than 4, error out if it happens. Fixes: c1986ee9bea3 ("[PATCH] New Omnikey Cardman 4000 driver") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20210521120617.138396-1-yukuai3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7af5662826f7b1639490c999e6bac14ea6a79a7c Author: Jim Cromie Date: Mon May 24 21:32:40 2021 -0600 dyndbg: display KiB of data memory used. If booted with verbose>=1, dyndbg prints the memory usage in bytes, of builtin modules' prdebugs. KiB reads better. no functional changes. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20210525033240.35260-1-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0419bf0fe6e599ab31ed26aad2db8dfa297cd731 Author: Aditya Srivastava Date: Sat May 22 18:10:51 2021 +0530 ipac: tpci200: fix kernel-doc syntax and remove filename from file header The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/ipack/carriers/tpci200 follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc. For e.g., running scripts/kernel-doc -none on drivers/ipack/carriers/tpci200.c emits: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * tpci200.c Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Also remove the redundant file name from the comment headers. Acked-by: Randy Dunlap Acked-by: Samuel Iglesias Gonsalvez Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210522124051.12540-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit b716f42e876188b85aeca374375bbbcaac602d72 Author: Aditya Srivastava Date: Sat May 22 17:49:44 2021 +0530 ipac: ipoctal: fix kernel-doc syntax and remove filename from file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/ipack/devices/ipoctal follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc. For e.g., running scripts/kernel-doc -none on drivers/ipack/devices/ipoctal.h emits: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * ipoctal.h Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Also remove the redundant file name from the comment headers. Acked-by: Randy Dunlap Acked-by: Samuel Iglesias Gonsalvez Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210522121944.11182-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9272e5d0028d45a3b45b58c9255e6e0df53f7ad9 Author: Lv Yunlong Date: Mon May 24 02:32:05 2021 -0700 ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe In the out_err_bus_register error branch of tpci200_pci_probe, tpci200->info->cfg_regs is freed by tpci200_uninstall()-> tpci200_unregister()->pci_iounmap(..,tpci200->info->cfg_regs) in the first time. But later, iounmap() is called to free tpci200->info->cfg_regs again. My patch sets tpci200->info->cfg_regs to NULL after tpci200_uninstall() to avoid the double free. Fixes: cea2f7cdff2af ("Staging: ipack/bridges/tpci200: Use the TPCI200 in big endian mode") Cc: stable Acked-by: Samuel Iglesias Gonsalvez Signed-off-by: Lv Yunlong Link: https://lore.kernel.org/r/20210524093205.8333-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Greg Kroah-Hartman commit ffa52910faff64f2070af42c22d782c4572d889e Merge: 5ccbb2ee039f0 5522e9f7b0fbe Author: Maxime Ripard Date: Thu May 27 14:32:13 2021 +0200 Merge drm/drm-next into drm-misc-next i915 is broken without -rc3, let's bring that tag in to fix it. Signed-off-by: Maxime Ripard commit 18c092e5c35ece7fa1fe0b2c6f8c4a13da3fc641 Author: Colin Ian King Date: Tue May 18 19:21:26 2021 +0100 ttyprintk: remove redundant initialization of variable i The variable i is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210518182126.140978-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 9e7f5ee1137397def6580461e27e5efcb68183ee Author: Suman Anna Date: Tue May 18 12:36:45 2021 -0500 ARM: dts: OMAP2+: Replace underscores in sub-mailbox node names A number of sub-mailbox node names in various OMAP2+ dts files are currently using underscores. This is not adhering to the node name convention, fix all of these to use hiphens. These nodes are already using the prefix mbox, so they will be in compliance with the sub-mailbox node name convention being added in the OMAP Mailbox YAML binding as well. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 8e880dfefd61fdb80945b45978d6ac821e83d29b Author: Suman Anna Date: Tue May 18 12:36:44 2021 -0500 ARM: dts: AM33xx/AM43xx: Rename wkup_m3 sub-mailbox node The OMAP sub-mailbox used to communicate with the Wakeup M3 remote processor is currently named wkup_m3. This name can be confused with the remote processor node. So, rename this to mbox-wkup-m3 to remove the ambiguity and to also adhere to the sub-mailbox node name convention being added in the OMAP Mailbox YAML binding. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 94a69e06264891fc01098aad794a2b327c248d2f Author: Suman Anna Date: Tue May 18 12:36:43 2021 -0500 ARM: dts: OMAP2/OMAP3: Rename processor sub-mailbox nodes The OMAP sub-mailbox used to communicate with the DSP and IVA remote processors are currently named after the processor name. These can be confused with the remote processors themselves. Rename them to remove the ambiguity and use the prefix mbox to also adhere to the sub-mailbox node name convention being added in the OMAP Mailbox YAML binding. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 71f729ef73ce68de35f15b6ce9c257a4140bec04 Author: Suman Anna Date: Tue May 18 12:36:42 2021 -0500 ARM: dts: OMAP2420: Drop interrupt-names from mailbox node The interrupt-names property is neither defined nor used in either of the OMAP Mailbox binding or the driver. So, drop them. This is in preparation for converting the OMAP Mailbox binding to YAML format. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 40a95e2915e3f08145c82507a0df046793810adb Author: Vignesh Raghavendra Date: Wed May 26 17:29:56 2021 +0530 ARM: dts: am437x-l4: Drop ti,omap2-uart entry from UART nodes ti,omap2-uart was kept around to work with legacy omap-serial driver. Now that we have completed move to 8250-omap.c drop legacy compatible. This will simplify writing YAML schema. Signed-off-by: Vignesh Raghavendra Signed-off-by: Tony Lindgren commit 7260620cd9e31514671ed8770769721c4d39fa19 Author: Vignesh Raghavendra Date: Wed May 26 17:29:55 2021 +0530 ARM: dts: dra7-l4: Drop ti,omap4-uart entry from UART nodes ti,omap4-uart was kept around to work with legacy omap-serial driver. Now that we have completed move to 8250-omap.c drop legacy compatible. This will simplify writing YAML schema. Signed-off-by: Vignesh Raghavendra Signed-off-by: Tony Lindgren commit 5ccbb2ee039f0bd81e2b34b670718186753a4e17 Author: Geert Uytterhoeven Date: Wed May 26 09:50:58 2021 +0200 drm/bridge: DRM_CROS_EC_ANX7688 should depend on I2C_CROS_EC_TUNNEL The ChromeOS EC ANX7688 bridge is connected to a ChromeOS Embedded Controller, and is accessed using I2C tunneling through the Embedded Controller. Hence add a dependency on I2C_CROS_EC_TUNNEL, to prevent asking the user about this driver when configuring a kernel without support for the ChromeOS EC tunnel I2C bus. Fixes: 44602b10d7f2a5f7 ("drm/bridge: Add ChromeOS EC ANX7688 bridge driver support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Enric Balletbo i Serra Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/d107d1840b83607baee8571cc5d88973fc32b519.1622015323.git.geert+renesas@glider.be commit a53d1202aef122894b6e46116a92174a9123db5d Author: Eli Billauer Date: Wed May 26 13:03:11 2021 +0300 char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) The XillyUSB driver is the USB variant for the Xillybus FPGA IP core. Even though it presents a nearly identical API on the FPGA and host, it's almost a complete rewrite of the driver: The framework for exchanging data on a USB bus is fundamentally different from doing the same with a PCIe interface, which leaves very little in common between the existing driver and the new one for XillyUSB. Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20210526100311.56327-3-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8cb5d216ab3365bc85aac65da27f1c2b3dd6f366 Author: Eli Billauer Date: Wed May 26 13:03:10 2021 +0300 char: xillybus: Move class-related functions to new xillybus_class.c This patch is a preparation for adding another related driver, XillyUSB. In order to share some code between the existing Xillybus driver and the one to be added, some functions are moved to xillybus_class.c XILLYBUS_CLASS is added to Kconfig and is common to all drivers in this group. The relation with the existing XILLYBUS symbol is "select" rather than "depends on" XILLYBUS_CLASS, or else "make olddefconfig" will silently turn off XILLYBUS, which is currently enabled in several distributions. XILLYBUS_CLASS doesn't depend on anything else, hence using it with "select" poses no risk for a broken configuration. After the future addition of the XillyUSB module, the tree of symbols will be as follows: XILLYBUS_CLASS --+-- XILLYBUS --+-- XILLYBUS_PCIE | | | +-- XILLYBUS_OF | +-- XILLYUSB XILLYBUS is for drivers based upon memory registers + DMA-based interfaces, and it's combined with XILLYBUS_PCIE and/or XILLYBUS_OF. XILLYUSB is for the USB variant only. Or a more detailed, bottom-up outline: * CONFIG_XILLYBUS_PCIE -> xillybus_pcie.c: Functions related to PCIe. * CONFIG_XILLYBUS_OF -> xillybus_of.c: Functions related to Xillybus as a peripheral on an FPGA / Processor combo chip. * CONFIG_XILLYBUS -> xillybus_core.c: Functions that are common to the two above, mainly access to the peripheral with memory-mapped registers and DMA. * CONFIG_XILLYUSB -> xillyusb.c: The driver for the USB variant, accesses the peripheral through the USB framework. * CONFIG_XILLYBUS_CLASS -> xillybus_class.c: The new module, which contains the class and API parts that would otherwise appear both in xillybus_core.c and xillyusb.c. Contains utility functions for the two latter. And since I'm at it, comments on the module names are added in the Kconfig's help part. The functions are exported with the non-GPL EXPORT_SYMBOL (a matter of taste). Signed-off-by: Eli Billauer Link: https://lore.kernel.org/r/20210526100311.56327-2-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7d30b8fcd111e9feb171023c0e0c8d855582dcb Author: Grygorii Strashko Date: Sat May 22 01:24:11 2021 +0300 ARM: dts: am335x: fix ti,no-reset-on-init flag for gpios The ti,no-reset-on-init flag need to be at the interconnect target module level for the modules that have it defined. The ti-sysc driver handles this case, but produces warning, not a critical issue. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 2566d5b8c1670f7d7a44cc1426d254147ec5c421 Author: Grygorii Strashko Date: Sat May 22 01:24:10 2021 +0300 ARM: dts: am437x-gp-evm: fix ti,no-reset-on-init flag for gpios The ti,no-reset-on-init flag need to be at the interconnect target module level for the modules that have it defined. The ti-sysc driver handles this case, but produces warning, not a critical issue. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit b644c5e01c870056e13a096e14b9a92075c8f682 Author: Grygorii Strashko Date: Sat May 22 01:24:09 2021 +0300 ARM: dts: am57xx-cl-som-am57x: fix ti,no-reset-on-init flag for gpios The ti,no-reset-on-init flag need to be at the interconnect target module level for the modules that have it defined. The ti-sysc driver handles this case, but produces warning, not a critical issue. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 0c149400c2f676e7b4cc68e517db29005a7a38c7 Author: Geert Uytterhoeven Date: Fri May 21 09:54:06 2021 +0200 ARM: dts: dra7x-evm: Align GPIO hog names with dt-schema The dt-schema for nxp,pcf8575 expects GPIO hogs node names to end with a 'hog' suffix. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Tony Lindgren commit 4823117cb80eedf31ddbc126b9bd92e707bd9a26 Author: Grygorii Strashko Date: Tue May 25 20:58:57 2021 +0300 ARM: dts: omap5-board-common: align gpio hog names with dt-schema The GPIO Hog dt-schema node naming convention expect GPIO hogs node names to end with a 'hog' suffix. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit cfb4ab3b5df86c6001127346d8331f5e87012f91 Author: Grygorii Strashko Date: Tue May 25 20:58:56 2021 +0300 ARM: dts: omap3: align gpio hog names with dt-schema The GPIO Hog dt-schema node naming convention expect GPIO hogs node names to end with a 'hog' suffix. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 2986d2763daaaa9280ac499ea17e7031a81ac0b7 Author: Zou Wei Date: Thu May 27 17:50:18 2021 +0800 drm/bridge: lt8912b: fix platform_no_drv_owner.cocci warnings ./drivers/gpu/drm/bridge/lontium-lt8912b.c:758:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1622109018-54648-1-git-send-email-zou_wei@huawei.com commit e821a334b29f40377e8017b8e937d521920e972d Author: Jiapeng Chong Date: Mon May 24 18:42:33 2021 +0800 drm: bridge: cdns-mhdp8546: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:2143 cdns_mhdp_bridge_atomic_reset() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1621852953-51325-1-git-send-email-jiapeng.chong@linux.alibaba.com commit bd551acdde3ad40da1a97391abd6e0db7852bf66 Author: Grygorii Strashko Date: Tue May 25 20:58:55 2021 +0300 ARM: dts: am437x: align gpio hog names with dt-schema The GPIO Hog dt-schema node naming convention expect GPIO hogs node names to end with a 'hog' suffix. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit fb97f63106f3174992a22fe5e42dda96a0810750 Author: Grygorii Strashko Date: Tue May 25 20:58:54 2021 +0300 ARM: dts: am335x: align GPIO hog names with dt-schema The GPIO Hog dt-schema node naming convention expect GPIO hogs node names to end with a 'hog' suffix. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 33f90f27e1c5ccd648d3e78a1c28be9ee8791cf1 Author: Zou Wei Date: Mon May 24 15:21:02 2021 +0800 drm/bridge: cdns: Fix PM reference leak in cdns_dsi_transfer() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1621840862-106024-1-git-send-email-zou_wei@huawei.com commit 7652dd2c5cb7b656471cc801d619fe24120643a3 Author: Alan Stern Date: Wed May 26 11:32:44 2021 -0400 USB: core: Check buffer length matches wLength for control transfers A type of inconsistency that can show up in control URBs is when the setup packet's wLength value does not match the URB's transfer_buffer_length field. The two should always be equal; differences could lead to information leaks or undefined behavior for OUT transfers or overruns for IN transfers. This patch adds a test for such mismatches during URB submission. If the test fails, the submission is rejected with a -EBADR error code (which is not used elsewhere in the USB core), and a debugging message is logged for people interested in tracking down these errors. Reviewed-by: Johan Hovold Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210526153244.GA1400430@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit b35ef2dd1675cfb0406e9a88f095a7539f6a05a2 Author: zhaoxiao Date: Mon May 24 14:08:40 2021 +0800 mips: dts: loongson: fix DTC unit name warnings Fixes the following W=1 kernel build warning(s): arch/mips/boot/dts/loongson/rs780e-pch.dtsi:24.7-41.5: Warning (unit_address_vs_reg): /bus@10000000/isa: node has a reg or ranges property, but no unit name arch/mips/boot/dts/loongson/rs780e-pch.dtsi:24.7-41.5: Warning (simple_bus_reg): /bus@10000000/isa: simple-bus unit address format error, expected "18000000" Signed-off-by: zhaoxiao Signed-off-by: Thomas Bogendoerfer commit 15b32eb21a48e176a5c0a6f53ae55146ad9aca6f Author: zhaoxiao Date: Fri May 21 17:40:27 2021 +0800 mips: dts: loongson: fix DTC unit name warnings Fixes the following W=1 kernel build warning(s): arch/mips/boot/dts/loongson/ls7a-pch.dtsi:410.7-415.5: Warning (unit_address_vs_reg): /bus@10000000/isa: node has a reg or ranges property, but no unit name arch/mips/boot/dts/loongson/ls7a-pch.dtsi:410.7-415.5: Warning (simple_bus_reg): /bus@10000000/isa: simple-bus unit address format error, expected "18000000" Signed-off-by: zhaoxiao Signed-off-by: Thomas Bogendoerfer commit a3da3d3d55a34cd772cf96c8fea313912c45f783 Author: zhaoxiao Date: Fri May 21 17:40:26 2021 +0800 mips: dts: loongson: fix DTC unit name warnings Fixes the following W=1 kernel build warning(s): arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts:91.7-96.5: Warning (unit_address_vs_reg): /bus@10000000/isa: node has a reg or ranges property, but no unit name arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts:91.7-96.5: Warning (simple_bus_reg): /bus@10000000/isa: simple-bus unit address format error, expected "18000000" Signed-off-by: zhaoxiao Signed-off-by: Thomas Bogendoerfer commit dfd6553212c390214cf3c7deb33ca816d17af7b4 Author: zhaoxiao Date: Mon May 24 14:07:35 2021 +0800 mips: dts: loongson: fix DTC unit name warnings Fixes the following W=1 kernel build warning(s): arch/mips/boot/dts/loongson/loongson64g-package.dtsi:42.30-49.5: Warning (simple_bus_reg): /bus@1fe00000/serial@1fe001e0: simple-bus unit address format error, expected "1fe00100" arch/mips/boot/dts/loongson/loongson64g-package.dtsi:51.30-59.5: Warning (simple_bus_reg): /bus@1fe00000/serial@1fe001e8: simple-bus unit address format error, expected "1fe00110" Signed-off-by: zhaoxiao Acked-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 01153887beb55128f5b72aecb3b57419c5603d95 Author: zhaoxiao Date: Fri May 21 17:40:24 2021 +0800 mips: dts: loongson: fix DTC unit name warnings Fixes the following W=1 kernel build warning(s): arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi:26.9-32.4: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: zhaoxiao Signed-off-by: Thomas Bogendoerfer commit 5522e9f7b0fbe2a0cb89c199b574523becc8c3ab Merge: 9a91e5e0af5e0 c4681547bcce7 Author: Daniel Vetter Date: Thu May 27 13:07:47 2021 +0200 Merge v5.13-rc3 into drm-next drm/i915 is extremely on fire without the below revert from -rc3: commit 293837b9ac8d3021657f44c9d7a14948ec01c5d0 Author: Linus Torvalds Date: Wed May 19 05:55:57 2021 -1000 Revert "i915: fix remap_io_sg to verify the pgprot" Backmerge so we don't have a too wide bisect window for anything that's a more involved workload than booting the driver. Signed-off-by: Daniel Vetter commit 90c9761899084212ffd198d42c821ebdb6476037 Author: Shaokun Zhang Date: Thu May 27 08:58:12 2021 +0800 staging: rtl8723bs: remove the repeated declaration Function 'rtw_indicate_wx_disassoc_event' and 'Hal_SetBandwidth' are declared twice in their header file, so remove the repeated declaration. Cc: Dan Carpenter Cc: Hans de Goede Cc: Greg Kroah-Hartman Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1622077092-50618-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit cb293e6b834be516d36febe8ab49495309ccff5a Author: Piyush Thange Date: Wed May 26 22:59:00 2021 +0530 staging: rtl8192u: Fixed warnings of coding style Fixed coding style issues with comments. Signed-off-by: Piyush Thange Link: https://lore.kernel.org/r/20210526172900.56093-1-pthange19@gmail.com Signed-off-by: Greg Kroah-Hartman commit afc023da53e46b88552822f2fe035c7129c505a2 Author: Dave Stevenson Date: Tue May 25 23:57:37 2021 +0200 staging: mmal-vchiq: Fix incorrect static vchiq_instance. For some reason lost in history function vchiq_mmal_init used a static variable for storing the vchiq_instance. This value is retrieved from vchiq per instance, so worked fine until you try to call vchiq_mmal_init multiple times concurrently when things then go wrong. This seemed to happen quite frequently if using the cutdown firmware (no MMAL or VCSM services running) as the vchiq_connect then failed, and one or other vchiq_shutdown was working on an invalid handle. Remove the static so that each caller gets a unique vchiq_instance. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621979857-26754-1-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit c43e6b43d937db5c22cf7c7d66a99b98a758130b Author: Tiezhu Yang Date: Sat May 15 19:02:00 2021 +0800 MIPS: Loongson64: Update loongson3_defconfig Some configs in loongson3_defconfig is invalid or needless, use the following steps to update it: make loongson3_defconfig make savedefconfig cp defconfig arch/mips/configs/loongson3_defconfig Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 4f5d31ce099ddc7f40c5537a680b91ea87a6c5d4 Author: Huacai Chen Date: Fri May 14 18:32:17 2021 +0800 MIPS: Loongson64: Remove a "set but not used" variable This fix build warning: arch/mips/loongson64/env.c: In function 'prom_init_env': >> arch/mips/loongson64/env.c:50:14: warning: variable 'device' set but not used [-Wunused-but-set-variable] 50 | u16 vendor, device; | ^~~~~~ {standard input}: Assembler messages: {standard input}:788: Error: found '(', expected: ')' {standard input}:788: Error: found '(', expected: ')' {standard input}:788: Error: non-constant expression in ".if" statement {standard input}:788: Error: junk at end of line, first unrecognized character is `(' {standard input}:801: Error: found '(', expected: ')' {standard input}:801: Error: found '(', expected: ')' {standard input}:801: Error: non-constant expression in ".if" statement {standard input}:801: Error: junk at end of line, first unrecognized character is `(' Reported-by: kernel test robot Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 69e22d9ff71bae14a5ccaa04e3d15da333ae87d6 Author: Oleksij Rempel Date: Fri May 14 07:17:43 2021 +0200 MIPS: ath79: ar9331: add pause property for the MAC <> switch link Both, MAC and switch support flow control, so add pause property for the MAC <> switch link. Signed-off-by: Oleksij Rempel Signed-off-by: Thomas Bogendoerfer commit cbafa54aa2ae23939846e150ad4ba98c784f6395 Author: Oleksij Rempel Date: Fri May 14 07:17:42 2021 +0200 MIPS: ath79: ar9331: Add OpeneEmbed SOM9331 Board Add SOM9331 based Board. It has 3 LAN ports, usb to uart controller and USB type A port. Signed-off-by: Oleksij Rempel Signed-off-by: Thomas Bogendoerfer commit ab5891a8350f1a612f2aef225bff0a589bf4a395 Author: Oleksij Rempel Date: Fri May 14 07:17:41 2021 +0200 dt-bindings: vendor-prefixes: Add an entry for OpenEmbed Add "openembed" entry for https://www.openembed.com/ Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 5334d983f38556c29e53884fc80f8bf9dc54412f Author: Geert Uytterhoeven Date: Thu May 20 15:58:38 2021 +0200 MIPS: SEAD3: Correct Ethernet node name make dtbs_check: eth@1f010000: $nodename:0: 'eth@1f010000' does not match '^ethernet(@.*)?$' Signed-off-by: Geert Uytterhoeven Acked-by: Thomas Bogendoerfer Signed-off-by: Thomas Bogendoerfer commit 7f8d698ffb17d7880af6316361f267a6921d218b Author: Phillip Potter Date: Tue May 25 22:48:13 2021 +0100 staging: rtl8188eu: convert pr_info call to dev_err call ODM_RAStateCheck Introduce logic to extract struct device pointer from passed in struct odm_dm_struct pointer argument, and use this to call dev_err instead of pr_info. As this is an error state if this line is reached, this is not just information. Also, this is a driver, so dev_err is more appropriate. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210525214813.6362-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 993b21a0461467b7319c1c25df14cd9beecbed7d Author: Donggyu Kim Date: Tue May 25 23:01:23 2021 +0900 Staging: rtl8723bs: fixed a blank coding style Fixed a coding style issue - add blank after declation Signed-off-by: Dongkyu Kim Link: https://lore.kernel.org/r/20210525140123.15100-1-a29661498@gmail.com Signed-off-by: Greg Kroah-Hartman commit d149b855b955fe92ab16ddd59c1d540f82e6a40f Author: Zou Wei Date: Thu May 27 17:54:04 2021 +0800 regulator: bd71815: fix platform_no_drv_owner.cocci warnings ./drivers/regulator/bd71815-regulator.c:644:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Reported-by: Hulk Robot Signed-off-by: Zou Wei Acked-by: Matti Vaittinen Message-Id: <1622109244-54739-1-git-send-email-zou_wei@huawei.com> Signed-off-by: Mark Brown commit 0ab000e5e57e6dcb34605fbdee92a1b0947606e0 Author: Kuninori Morimoto Date: Thu May 27 11:42:03 2021 +0900 ASoC: rsnd: tidyup rsnd_ssiu_busif_err_irq_ctrl() rsnd_ssiu_busif_err_irq_ctrl() has very similar duplicated code. This patch merge and tidyup the code. Signed-off-by: Kuninori Morimoto Message-Id: <87sg28lwxw.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit cfb7b8bf1e2d660583dd91d870cec2f6728cbdbc Author: Kuninori Morimoto Date: Thu May 27 11:41:56 2021 +0900 ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear() rsnd_ssiu_busif_err_status_clear() has very similar duplicated code. This patch merge and tidyup the code. Signed-off-by: Kuninori Morimoto Message-Id: <87tumolwy3.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 83b220cf8eb2aa9dbe0007bcf43c5e305fe1986d Author: Kuninori Morimoto Date: Thu May 27 11:41:50 2021 +0900 ASoC: rsnd: implement BUSIF related code in ssiu.c BUSIF is SSIU feature, but its related code is implemented at ssi.c today. This patch moves it to ssiu.c Signed-off-by: Kuninori Morimoto Message-Id: <87v974lwy9.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit b43b8ae87c8e0a8b81a26cfc39bd157c5f53ae14 Author: Kuninori Morimoto Date: Thu May 27 11:41:42 2021 +0900 ASoC: rsnd: protect mod->status Renesas Sound uses many modules (SSI/SSIU/SRC/CTU/MIX/DVC/DMA), and supports complex connections/path. Thus each modules needs to save its status to correctly control it. This status is updated when by .trigger, and .hw_params/.hw_free. Renesas Sound is protecting modules by using lock when .trigger, but it was not enough to protecting each modules "status" if it was used from many paths. 1) .hw_params/.hw_free update status 2) another doesn't update status, but overwrites by same value This patch do 1) protects .hw_params/.hw_free by lock 2) do nothing if no status update Without this patch, protected mod->status (= .trigger) might be overwrote by non protected mod->status (= .hw_params / .hw_free), and in such case, CTU/MIX/DVC/SSIU/SSI which are used from many paths might get damage. If above issue happens, Renesas Sound will be hung (= silence) and never be recoverd. I could reproduce this issue by continue playing very short sound with loop very long term (3-4 hours) through 2 inputs (= MIXer). For updating rsnd_status_update(), this patch removes rsnd_dai_call() debug message. Because we already have debugfs support, and is not good match to new code. Reported-by: Linh Phung T. Y Signed-off-by: Kuninori Morimoto Message-Id: <87wnrklwyh.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 1f9c82b5ab83ff24f5c2b62bf9a912e4aef8905e Author: Kuninori Morimoto Date: Thu May 27 11:41:36 2021 +0900 ASoC: rsnd: add debugfs support Current rsnd supports #define DEBUG, but it is not helpful if issue happen after 4-5 hours. This patch adds debugfs support for it. Signed-off-by: Kuninori Morimoto Message-Id: <87y2c0lwyn.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 1788a1520185e69f62e56dd23b33a0992e8187aa Author: Kuninori Morimoto Date: Thu May 27 11:41:28 2021 +0900 ASoC: rsnd: incidate irq error message Current rsnd is using dev_dbg() if irq error happen, but it makes debug very difficult if some strange things happen. This patch uses dev_info() for it, and rename the macro name. Signed-off-by: Kuninori Morimoto Message-Id: <87zgwglwyv.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 9ff07d19fb28ce8544d3ee4755673020b00487e6 Author: Kuninori Morimoto Date: Thu May 27 11:41:21 2021 +0900 ASoC: rsnd: indicate unknown error at rsnd_dai_call() Current rsnd_dai_call() doesn't indicate error message, thus it is very difficult to know the issue when strange things happen. This patch indicates error for it. Signed-off-by: Kuninori Morimoto Message-Id: <871r9snbji.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 54e81e9446377c36fdcb952ca7db43e59857e0d7 Author: Kuninori Morimoto Date: Thu May 27 11:41:12 2021 +0900 ASoC: rsnd: check BUIF error everytime Current ssi.c checks BUSIF when TDM mode, but it should be checked everytime. This patch do it. Signed-off-by: Kuninori Morimoto Message-Id: <8735u8nbjr.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit ab62e8a8bce1cc3b730462a7a462107db634bd5c Author: Kuninori Morimoto Date: Thu May 27 11:40:47 2021 +0900 ASoC: rsnd: attach SSIU when SSI was DMA mode SSIU is not needed if SSI was PIO mode. This patch ignores such case. Signed-off-by: Kuninori Morimoto Message-Id: <874keonbkg.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 6da8f00e7ac277ddfc72e255328dc5ff0378c3ee Author: Kuninori Morimoto Date: Thu May 27 11:40:34 2021 +0900 ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original_with_params() runtime might be NULL. Let's ignore such case. Signed-off-by: Kuninori Morimoto Message-Id: <875yz4nbkt.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 965386c97616c401b34cba4e9e3bfc9c6b215359 Author: Kuninori Morimoto Date: Thu May 27 11:40:22 2021 +0900 ASoC: rsnd: call unregister for null_hw when removed commit d6956a7dde6fb ("ASoC: rsnd: add null CLOCKIN support") added null_clk, but it is using local static valuable. It will be leaked if rsnd driver was removed. This patch moves it to priv, and call unregister when removing. Fixes: d6956a7dde6fb ("ASoC: rsnd: add null CLOCKIN support") Link: https://lore.kernel.org/r/87tumsoe2p.wl-kuninori.morimoto.gx@renesas.com Reported-by: Geert Uytterhoeven Signed-off-by: Kuninori Morimoto Message-Id: <877djknbl5.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown commit 40e40e63f7be028ff8dc2a2dcef4a812539e86cc Author: Chris Wilson Date: Wed May 26 13:49:01 2021 +0100 drm/i915/display: relax 2big checking around initial fb The kernel prefers enabling fbc over the initial fb, since this leads to actual runtime power savings, so if the initial fb is deemed too big using some heuristic, then we simply skip allocating stolen for it. However if the kernel is not configured with fbcon then it should be possible to relax this, since unlike with fbcon the display server shouldn't preserve it when later replacing it, and so we should be able to re-use the stolen memory for fbc and friends. This patch is reported to fix some flicker seen during boot splash on some devices. v2: s/FRAMEBUFFER_CONSOLE/CONFIG_FRAMEBUFFER_CONSOLE Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Lee Shawn C Cc: Ville Syrjälä Cc: Daniel Vetter Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210526124901.245689-1-matthew.auld@intel.com commit d406f49b05e547d1e1ff1e9e0e0133fa2538b2fc Author: Tudor Ambarus Date: Fri Apr 2 11:20:31 2021 +0300 mtd: spi-nor: macronix: Fix name for mx66l51235f According to macronix website, there is no mx66l51235l part number. The chip detected as such is actually mx66l51235f. Rename the flash. Do not update the mx66l51235l name from the spi_nor_dev_ids[], since there are dt that are using this compatible. Signed-off-by: Tudor Ambarus Signed-off-by: Vignesh Raghavendra Reviewed-by: Vignesh Raghavendra commit 854955ae96dbd436ba4719dd1cedb7c1c40bd303 Author: Mika Westerberg Date: Thu Apr 15 13:11:38 2021 +0300 mtd: spi-nor: intel-spi: Add support for Intel Alder Lake-M SPI serial flash Intel Alder Lake-M has the same SPI serial flash controller as Alder Lake-S. Add Alder Lake-M PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Vignesh Raghavendra commit 615160334f3f09d508511aae1297106fb4f49b1e Author: Tvrtko Ursulin Date: Wed May 26 15:19:46 2021 +0100 drm/i915/params: Align visibility of device level and global modparams We have a few modparams which get conditionally exposed based on a Kconfig options and in most cases this also means portions of the driver implementing the respective feature are also left out. Align the visibility of device level and global modparams to make them consistent in this respect. v2: * Fix misplaced parentheses. Signed-off-by: Tvrtko Ursulin Cc: Jani Nikula Cc: Ville Syrjälä Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210526141946.2347085-1-tvrtko.ursulin@linux.intel.com commit 61a140f08ebb2e9f06b7889463f7ee9c162d98c2 Author: Lee Jones Date: Wed May 26 14:00:32 2021 +0100 usb: gadget: udc: udc-xilinx: Place correct function names into the headers Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/udc-xilinx.c:802: warning: expecting prototype for xudc_ep_enable(). Prototype was for __xudc_ep_enable() instead drivers/usb/gadget/udc/udc-xilinx.c:997: warning: expecting prototype for xudc_ep0_queue(). Prototype was for __xudc_ep0_queue() instead Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Michal Simek Cc: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e0fbc1c0ba375c813f9dd06e2924848a775b0930 Author: Lee Jones Date: Wed May 26 14:00:31 2021 +0100 usb: gadget: udc: pxa27x_udc: Fix documentation for 'pxa27x_udc_start()' Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/pxa27x_udc.c:1749: warning: expecting prototype for pxa27x_start(). Prototype was for pxa27x_udc_start() instead Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Acked-by: Daniel Mack Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5aff197ffef12b87180bc34268bc2719a283ed09 Author: Lee Jones Date: Wed May 26 14:00:37 2021 +0100 usb: typec: ucsi: Fix copy/paste issue for 'ucsi_set_drvdata()' Fixes the following W=1 kernel build warning(s): drivers/usb/typec/ucsi/ucsi.c:1287: warning: expecting prototype for ucsi_get_drvdata(). Prototype was for ucsi_set_drvdata() instead Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 58aff959fc841e16f8b45bd01b78b30d23f589f5 Author: Lee Jones Date: Wed May 26 14:00:28 2021 +0100 usb: dwc2: gadget: Repair 'dwc2_hsotg_core_init_disconnected()'s documentation Fixes the following W=1 kernel build warning(s): drivers/usb/dwc2/gadget.c:3349: warning: expecting prototype for dwc2_hsotg_core_init(). Prototype was for dwc2_hsotg_core_init_disconnected() instead Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Cc: Ben Dooks Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 81d708bc13f398f99b7018e744edab24b283102e Author: Lee Jones Date: Wed May 26 14:00:25 2021 +0100 usb: dwc2: pci: Fix possible copy/paste issue Fixes the following W=1 kernel build warning(s): drivers/usb/dwc2/pci.c:73: warning: expecting prototype for dwc2_pci_probe(). Prototype was for dwc2_pci_remove() instead Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a63acbde826439271c71a167cd760e3d400e6488 Author: Lee Jones Date: Wed May 26 14:00:24 2021 +0100 usb: dwc2: hcd_queue: Fix typeo in function name 'dwc2_hs_pmap_unschedule()' Fixes the following W=1 kernel build warning(s): drivers/usb/dwc2/hcd_queue.c:686: warning: expecting prototype for dwc2_ls_pmap_unschedule(). Prototype was for dwc2_hs_pmap_unschedule() instead Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8268acfe1cc967dbe9fbb05b5f07a19675a81cff Author: Lee Jones Date: Wed May 26 14:00:19 2021 +0100 usb: isp1760: isp1760-udc: Provide missing description for 'udc' param Fixes the following W=1 kernel build warning(s): drivers/usb/isp1760/isp1760-udc.c:150: warning: Function parameter or member 'udc' not described in 'isp1760_udc_select_ep' Cc: Greg Kroah-Hartman Cc: Rui Miguel Silva Cc: Laurent Pinchart Cc: linux-usb@vger.kernel.org Reviewed-by: Rui Miguel Silva Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit bd37fbd5f5bb3c4f879c721ba7b8a7ca2cf30c9e Author: Lee Jones Date: Wed May 26 14:00:18 2021 +0100 usb: dwc2: params: Fix naming of 'dwc2_get_hwparams()' in the docs Fixes the following W=1 kernel build warning(s): drivers/usb/dwc2/params.c:787: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 826e9c44978bcfd35c7820c41190e986848278aa Author: Lee Jones Date: Wed May 26 14:00:16 2021 +0100 usb: common: ulpi: Add leading underscores for function name '__ulpi_register_driver()' Fixes the following W=1 kernel build warning(s): drivers/usb/common/ulpi.c:151: warning: expecting prototype for ulpi_register_driver(). Prototype was for __ulpi_register_driver() instead Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Reviewed-by: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c1fb8640e8a3d1dc04195246d0f5fe437c74b6bd Author: Lee Jones Date: Wed May 26 14:00:15 2021 +0100 usb: dwc2: platform: Provide function name for 'dwc2_check_core_version()' Fixes the following W=1 kernel build warning(s): drivers/usb/dwc2/platform.c:411: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Cc: Philipp Zabel Cc: Liam Girdwood Cc: Mark Brown Cc: Matthijs Kooijman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 632d234b0bf89dce7cacbd4ed9b966469bfdc746 Author: Lee Jones Date: Wed May 26 14:00:36 2021 +0100 usb: cdns3: cdnsp-gadget: Provide function name for 'cdnsp_find_next_ext_cap()' Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdnsp-gadget.c:59: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Pawel Laszczak Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 00dfda2db2c1db650ec96501c21d4b0669230979 Author: Lee Jones Date: Wed May 26 14:00:33 2021 +0100 usb: cdns3: cdns3-gadget: Provide correct function naming for '__cdns3_gadget_ep_queue()' Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-gadget.c:2499: warning: expecting prototype for cdns3_gadget_ep_queue(). Prototype was for __cdns3_gadget_ep_queue() instead Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: Pawel Jez Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9b3c1c90d6e76b6ef0412aef893b8afc0b0b8b4c Author: Lee Jones Date: Wed May 26 14:00:29 2021 +0100 usb: chipidea: udc: Fix incorrectly documented function 'hw_port_is_high_speed()' Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/udc.c:247: warning: expecting prototype for hw_is_port_high_speed(). Prototype was for hw_port_is_high_speed() instead Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 953c3a3c310ff4961c4b37f5f4db557cb83eeba7 Author: Lee Jones Date: Wed May 26 14:00:27 2021 +0100 usb: chipidea: otg: Fix formatting and missing documentation issues Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/otg.c:25: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/chipidea/otg.c:78: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/chipidea/otg.c:143: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b1f562f1c40151ae59c7b81ae6e361777ad31989 Author: Lee Jones Date: Wed May 26 14:00:26 2021 +0100 usb: chipidea: core: Fix incorrectly documented function 'ci_usb_phy_exit()' Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/core.c:343: warning: expecting prototype for _ci_usb_phy_exit(). Prototype was for ci_usb_phy_exit() instead Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: Liam Girdwood Cc: Mark Brown Cc: David Lopo Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c23e55e6682f8db9f2ed72506ba5f31fdf74ac01 Author: Lee Jones Date: Wed May 26 14:00:23 2021 +0100 usb: cdns3: cdns3-imx: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-imx.c:21: warning: expecting prototype for cdns3(). Prototype was for USB3_CORE_CTRL1() instead Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e1ecf7582f1b10142cc5fe895c780fbdc273e9ed Author: Lee Jones Date: Wed May 26 14:00:22 2021 +0100 usb: cdns3: cdns3-ep0: Fix a few kernel-doc formatting issues Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-ep0.c:680: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-ep0.c:775: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-ep0.c:868: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: Pawel Jez Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a945fd0a583d72bd81cd8ac5590b92ad660861b3 Author: Lee Jones Date: Wed May 26 14:00:21 2021 +0100 usb: cdns3: cdns3-ti: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-ti.c:20: warning: expecting prototype for cdns3(). Prototype was for USBSS_PID() instead Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 56480a03f17912299c15695f2ca92ba3304a91c8 Author: Lee Jones Date: Wed May 26 14:00:20 2021 +0100 usb: cdns3: cdns3-gadget: Fix a bunch of kernel-doc related formatting issues Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-gadget.c:163: warning: expecting prototype for select_ep(). Prototype was for cdns3_select_ep() instead drivers/usb/cdns3/cdns3-gadget.c:2025: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2224: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2247: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2264: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2399: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2489: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2589: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2656: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2677: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2722: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2768: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2877: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2923: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/usb/cdns3/cdns3-gadget.c:2986: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: Pawel Jez Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6dd1efeb18d258499579bd0c37457c7a1703e7f3 Author: Lee Jones Date: Wed May 26 14:00:17 2021 +0100 usb: cdns3: cdns3-plat: Fix incorrect naming of function 'cdns3_plat_remove()' Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/cdns3-plat.c:179: warning: expecting prototype for cdns3_remove(). Prototype was for cdns3_plat_remove() instead Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 47a4edc7acfd13a50895f783dafbf228b5a5cc8a Author: Lee Jones Date: Wed May 26 14:00:14 2021 +0100 usb: cdns3: core: Fix a couple of incorrectly documented function names Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/core.c:342: warning: expecting prototype for cdsn3_role_get(). Prototype was for cdns_role_get() instead drivers/usb/cdns3/core.c:428: warning: expecting prototype for cdns_probe(). Prototype was for cdns_init() instead Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Aswath Govindraju Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526130037.856068-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 50fe7547b637b3cf51876ce9ec829e79d76e5de0 Author: Torin Cooper-Bennun Date: Tue May 4 13:51:23 2021 +0100 can: m_can: fix whitespace in a few comments Fixes whitespace in comments titling sections of register masks. Link: https://lore.kernel.org/r/20210504125123.500553-5-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 0f31571668914f421dab628c45eeb391aaa127ef Author: Torin Cooper-Bennun Date: Tue May 4 13:51:22 2021 +0100 can: m_can: make TXESC, RXESC config more explicit Introduce masks for the three RXESC fields (RBDS, F1DS, F0DS) and the one TXESC field (TBDS). Update m_can_chip_config() to explicitly set all four fields to the 64-byte option (0x7) (and these defs are renamed to be more concise). This is an improvement in maintainability, and also makes it easier to implement more flexible configuration of the M_CAN buffers in the future. Link: https://lore.kernel.org/r/20210504125123.500553-4-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 38395f302f4d63b8373d2340fddd225f7b644882 Author: Torin Cooper-Bennun Date: Tue May 4 13:51:21 2021 +0100 can: m_can: clean up CCCR reg defs, order by revs Ensures that the different CCCR regmasks for m_can revs 3.0.x, 3.1.x, 3.2.x and 3.3.x are clearly distinguishable. Removes incorrect CCCR_CANFD define. Adds bit fields UTSU and WMM for rev 3.3.x, for completeness. Link: https://lore.kernel.org/r/20210504125123.500553-3-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 20779943a080c5ac9b9e291b76afbac12fdec023 Author: Torin Cooper-Bennun Date: Tue May 4 13:51:20 2021 +0100 can: m_can: use bits.h macros for all regmasks This updates m_can.c to exclusively use GENMASK, FIELD_GET, FIELD_PREP and FIELD_MAX for regmask ops, as is convention in the current kernel (far less error-prone, far more concise). Link: https://lore.kernel.org/r/20210504125123.500553-2-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 2722ac986e93c4cabbefde299d01ed24db40a645 Author: Dario Binacchi Date: Fri May 14 18:55:47 2021 +0200 can: c_can: add ethtool support With commit 132f2d45fb23 ("can: c_can: add support to 64 message objects") the number of message objects used for reception / transmission depends on FIFO size. The ethtools API support allows you to retrieve this info. Driver info has been added too. Link: https://lore.kernel.org/r/20210514165549.14365-2-dariobin@libero.it Signed-off-by: Dario Binacchi Reviewed-by: Andrew Lunn Signed-off-by: Marc Kleine-Budde commit c7b0f6887d90665ac1aefd503c2eba1294f83473 Author: Dario Binacchi Date: Sun May 9 14:43:07 2021 +0200 can: c_can: remove unused variable struct c_can_priv::rxmasked The member rxmasked of struct c_can_priv is initialized by c_can_chip_config(), but's it's never used, so remove it. Link: https://lore.kernel.org/r/20210509124309.30024-2-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit ee6bb641bc70accfedb8d78fc957df73e6770858 Author: Jimmy Assarsson Date: Thu Apr 29 11:37:30 2021 +0200 can: kvaser_usb: Add new Kvaser hydra devices Add new Kvaser hydra devices. Link: https://lore.kernel.org/r/20210429093730.499263-2-extja@kvaser.com Signed-off-by: Jimmy Assarsson Signed-off-by: Marc Kleine-Budde commit 893974d9b5655792f3b8f490f5499d3b8886be18 Author: Jimmy Assarsson Date: Thu Apr 29 11:37:29 2021 +0200 can: kvaser_usb: Rename define USB_HYBRID_{,PRO_}CANLIN_PRODUCT_ID Rename define USB_HYBRID_{,PRO_}CANLIN_PRODUCT_ID to USB_HYBRID_{,PRO_}2CANLIN_PRODUCT_ID, to reflect the channel count. Link: https://lore.kernel.org/r/20210429093730.499263-1-extja@kvaser.com Signed-off-by: Jimmy Assarsson Signed-off-by: Marc Kleine-Budde commit 4318b1aa22b7b44209ec5d079c83e3bae3b9c077 Author: Marc Kleine-Budde Date: Wed May 5 10:06:24 2021 +0200 can: at91_can: silence clang warning This patch fixes the following clang warning, by marking the functions as maybe unused. gcc doesn't complain about unused inline functions. | drivers/net/can/at91_can.c:178:1: warning: unused function 'at91_is_sam9X5' [-Wunused-function] | AT91_IS(9X5); | ^ | drivers/net/can/at91_can.c:172:19: note: expanded from macro 'AT91_IS' | static inline int at91_is_sam##_model(const struct at91_priv *priv) \ | ^ | :66:1: note: expanded from here | at91_is_sam9X5 | ^ Link: https://lore.kernel.org/r/20210514153741.1958041-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit b558e200d626b1761e4642e1acd2268fd30bddc6 Author: Marc Kleine-Budde Date: Wed May 5 10:07:48 2021 +0200 can: mcp251xfd: silence clang warning This patch fixes the following clang warning, by marking the functions as maybe unused. gcc doesn't complain about unused inline functions. | drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:564:1: warning: unused function 'mcp251xfd_chip_set_mode_nowait' [-Wunused-function] | mcp251xfd_chip_set_mode_nowait(const struct mcp251xfd_priv *priv, | ^ | 1 warning generated. Link: https://lore.kernel.org/r/20210514153741.1958041-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 10462b3558d418929dad8312dd8ae5d40116c1eb Author: Marc Kleine-Budde Date: Tue May 4 21:55:10 2021 +0200 can: mcp251x: mcp251x_can_probe(): silence clang warning This patch silences the following clang warning: | drivers/net/can/spi/mcp251x.c:1333:17: warning: cast to smaller integer type | 'enum mcp251x_model' from 'const void *' [-Wvoid-pointer-to-enum-cast] | priv->model = (enum mcp251x_model)match; | ^~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 8de29a5c34a5 ("can: mcp251x: Make use of device property API") Link: https://lore.kernel.org/r/20210504200520.1179635-2-mkl@pengutronix.de Reported-by: kernel test robot Cc: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Marc Kleine-Budde commit 83415669d8d830034c96e1de8ffb09b153a53504 Author: Marc Kleine-Budde Date: Tue May 4 21:55:10 2021 +0200 can: hi311x: hi3110_can_probe(): silence clang warning This patch silences the following clang warning: | drivers/net/can/spi/hi311x.c:874:17: warning: cast to smaller integer type | 'enum hi3110_model' from 'const void *' [-Wvoid-pointer-to-enum-cast] | priv->model = (enum hi3110_model)of_id->data; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/r/20210504200520.1179635-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 9208f7bf053a6fb32f9276a3b78c2b7fb3c0b0cb Author: Jiapeng Chong Date: Tue Apr 27 18:52:47 2021 +0800 can: softing: Remove redundant variable ptr The value stored to ptr in the calculations this patch removes is not used, so the calculation and the assignment can be removed. Cleans up the following clang-analyzer warning: drivers/net/can/softing/softing_main.c:279:3: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/can/softing/softing_main.c:242:3: warning: Value stored to 'ptr' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1619520767-80948-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Marc Kleine-Budde commit c69d190f7bb9a03cf5237d45a457993730d01605 Author: Patrick Menschel Date: Tue Apr 27 05:21:49 2021 +0000 can: isotp: Add error message if txqueuelen is too small This patch adds an additional error message in case that txqueuelen is set too small and advices the user to increase txqueuelen. This is likely to happen even with small transfers if txqueuelen is at default value 10 frames. Link: https://lore.kernel.org/r/20210427052150.2308-4-menschel.p@posteo.de Signed-off-by: Patrick Menschel Signed-off-by: Marc Kleine-Budde commit 6a5ddae578842652719fb926b22f1d510fe50bee Author: Patrick Menschel Date: Tue Apr 27 05:21:48 2021 +0000 can: isotp: add symbolic error message to isotp_module_init() This patch adds the value of err with format %pe to the already existing error message. Link: https://lore.kernel.org/r/20210427052150.2308-3-menschel.p@posteo.de Signed-off-by: Patrick Menschel Signed-off-by: Marc Kleine-Budde commit 46d8657a6b284e32b6b3bf1a6c93ee507fdd3cdb Author: Patrick Menschel Date: Tue Apr 27 05:21:47 2021 +0000 can: isotp: change error format from decimal to symbolic error names This patch changes the format string for errors from decimal %d to symbolic error names %pe to achieve more comprehensive log messages. Link: https://lore.kernel.org/r/20210427052150.2308-2-menschel.p@posteo.de Signed-off-by: Patrick Menschel Signed-off-by: Marc Kleine-Budde commit 24a774a4f9750ecd37d7aaeacfc04a844b9cf20b Author: zuoqilin Date: Fri May 14 18:08:06 2021 +0800 can: proc: remove unnecessary variables There is no need to define the variable "rate" to receive, just return directly. Link: https://lore.kernel.org/r/20210514100806.792-1-zuoqilin1@163.com Signed-off-by: zuoqilin Signed-off-by: Marc Kleine-Budde commit 02546884221279da2725e87e35348290470363d7 Author: Oliver Hartkopp Date: Tue Apr 11 15:43:43 2017 +0200 can: uapi: introduce CANFD_FDF flag for mixed content in struct canfd_frame The struct can_frame and struct canfd_frame intentionally share the same layout to be able to write CAN frame content into a CAN FD frame structure. When this is done the former differentiation via CAN_MTU / CANFD_MTU is lost. CANFD_FDF allows programmers to mark CAN FD frames in the case of using struct canfd_frame for mixed CAN/CAN FD content (dual use). N.B. the Kernel APIs do NOT provide mixed CAN / CAN FD content inside of struct canfd_frame therefore the CANFD_FDF flag is disregarded by Linux. Link: https://lore.kernel.org/r/20170411134343.3089-1-socketcan@hartkopp.net Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit 7e97d274db920df479e222fed10e7b242f90ffb0 Author: Marc Kleine-Budde Date: Mon May 17 13:24:25 2021 +0200 can: uapi: update CAN-FD frame description Since an early version of the CAN-FD specification the bit that defines a CAN-FD frame on the wire, has been renamed from Extended Data Length (EDL) to FD Frame (FDF). To avoid confusion, update the struct canfd_frame description in the UAPI headers accordingly. Link: https://lore.kernel.org/r/20210517113727.77597-1-mkl@pengutronix.de Suggested-by: Ayoub Kaanich Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit 8a5e7d19c8c747e3e7bfa0283a54742b103afcb5 Author: Geert Uytterhoeven Date: Thu May 6 19:55:54 2021 +0200 dt-bindings: can: rcar_canfd: Convert to json-schema Convert the Renesas R-Car CAN FD Controller Device Tree binding documentation to json-schema. Document missing properties. The CANFD clock needs to be configured for the maximum frequency on R-Car V3M and V3H, too. Update the example to match reality. Link: https://lore.kernel.org/r/905134c87f72e2d8e37c309e0ce28ecd7d4f3992.1620323639.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Signed-off-by: Marc Kleine-Budde commit 75a78026ea1307ef6d6924cc22be3ce9bf453c63 Author: Geert Uytterhoeven Date: Thu May 6 19:55:53 2021 +0200 dt-bindings: can: rcar_can: Convert to json-schema Convert the Renesas R-Car CAN Controller Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Link: https://lore.kernel.org/r/561c35648e22a3c1e3b5477ae27fd1a50da7fe98.1620323639.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Reviewed-by: Ulrich Hecht Signed-off-by: Marc Kleine-Budde commit c037b6c818c30b6afa11dc70018fc4a075f26028 Author: Rajat Jain Date: Mon May 24 10:18:12 2021 -0700 PCI: Add sysfs "removable" attribute A PCI device is "external_facing" if it's a Root Port with the ACPI "ExternalFacingPort" property or if it has the DT "external-facing" property. We consider everything downstream from such a device to be removable by user. We're mainly concerned with consumer platforms with user accessible Thunderbolt ports that are vulnerable to DMA attacks, and we expect those ports to be identified by firmware as "ExternalFacingPort". Devices in traditional hotplug slots can technically be removed, but the expectation is that unless the port is marked with "ExternalFacingPort", such devices are less accessible to user / may not be removed by end user, and thus not exposed as "removable" to userspace. This can be used to implement userspace policies tailored for user removable devices. Eg usage: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2591812 https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2795038 (code uses such an attribute to remove external PCI devices or disable features on them as needed by the policy desired) Acked-by: Bjorn Helgaas Signed-off-by: Rajat Jain Link: https://lore.kernel.org/r/20210524171812.18095-2-rajatja@google.com Signed-off-by: Greg Kroah-Hartman commit 70f400d4d957c2453c8689552ff212bc59f88938 Author: Rajat Jain Date: Mon May 24 10:18:11 2021 -0700 driver core: Move the "removable" attribute from USB to core Move the "removable" attribute from USB to core in order to allow it to be supported by other subsystem / buses. Individual buses that want to support this attribute can populate the removable property of the device while enumerating it with the 3 possible values - - "unknown" - "fixed" - "removable" Leaving the field unchanged (i.e. "not supported") would mean that the attribute would not show up in sysfs for that device. The UAPI (location, symantics etc) for the attribute remains unchanged. Move the "removable" attribute from USB to the device core so it can be used by other subsystems / buses. By default, devices do not have a "removable" attribute in sysfs. If a subsystem or bus driver wants to support a "removable" attribute, it should call device_set_removable() before calling device_register() or device_add(), e.g.: device_set_removable(dev, DEVICE_REMOVABLE); device_register(dev); The possible values and the resulting sysfs attribute contents are: DEVICE_REMOVABLE_UNKNOWN -> "unknown" DEVICE_REMOVABLE -> "removable" DEVICE_FIXED -> "fixed" Convert the USB "removable" attribute to use this new device core functionality. There should be no user-visible change in the location or semantics of attribute for USB devices. Reviewed-by: Bjorn Helgaas Signed-off-by: Rajat Jain Link: https://lore.kernel.org/r/20210524171812.18095-1-rajatja@google.com Signed-off-by: Greg Kroah-Hartman commit 875dd7bf548104bc1d2c5784a6af6cf38215a216 Author: Haocheng Xie Date: Thu May 27 11:19:47 2021 +0800 perf/hw_breakpoint: Fix DocBook warnings in perf hw_breakpoint Fix the following W=1 kernel build warning(s): kernel/events/hw_breakpoint.c:461: warning: Function parameter or member 'context' not described in 'register_user_hw_breakpoint' kernel/events/hw_breakpoint.c:560: warning: Function parameter or member 'context' not described in 'register_wide_hw_breakpoint' Signed-off-by: Haocheng Xie Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210527031947.1801-4-xiehaocheng.cn@gmail.com commit a1ddf5249f2c50f2e6e5efe604f01a01d5c23ef5 Author: Haocheng Xie Date: Thu May 27 11:19:46 2021 +0800 perf/core: Fix DocBook warnings Fix the following W=1 kernel build warning(s): kernel/events/core.c:143: warning: Function parameter or member 'cpu' not described in 'cpu_function_call' kernel/events/core.c:11924: warning: Function parameter or member 'flags' not described in 'sys_perf_event_open' kernel/events/core.c:12382: warning: Function parameter or member 'overflow_handler' not described in 'perf_event_create_kernel_counter' kernel/events/core.c:12382: warning: Function parameter or member 'context' not described in 'perf_event_create_kernel_counter' Signed-off-by: Haocheng Xie Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210527031947.1801-3-xiehaocheng.cn@gmail.com commit 32961aecf9da85c9e4c98d91ab8337424e0c8372 Author: Haocheng Xie Date: Thu May 27 11:19:45 2021 +0800 perf/core: Make local function perf_pmu_snapshot_aux() static Fixes the following W=1 kernel build warning: kernel/events/core.c:6670:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes] Signed-off-by: Haocheng Xie Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210527031947.1801-2-xiehaocheng.cn@gmail.com commit 0f60203d2142e759ac3913bb63017645ddf49f94 Author: Greg Kroah-Hartman Date: Tue May 25 19:25:34 2021 +0200 USB: fotg210-hcd: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Link: https://lore.kernel.org/r/20210525172534.848775-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8efd88f946017b69af67931a133b6dce92c27fd0 Author: Greg Kroah-Hartman Date: Tue May 25 19:16:36 2021 +0200 USB: gadget: pxa27x_udc: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Felipe Balbi Link: https://lore.kernel.org/r/20210525171636.758758-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0cac357717168f84d2f75e884a9cff52e6471aaa Author: Greg Kroah-Hartman Date: Tue May 25 19:15:08 2021 +0200 USB: gadget: bcm63xx_udc: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Kevin Cernekee Cc: Felipe Balbi Cc: bcm-kernel-feedback-list@broadcom.com Link: https://lore.kernel.org/r/20210525171508.758365-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8f6c7c5a11ec599be524190122a56dbb730069a3 Author: Greg Kroah-Hartman Date: Tue May 25 19:14:19 2021 +0200 USB: chipidea: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Peter Chen Link: https://lore.kernel.org/r/20210525171419.758146-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ab00a41e73dc06b5a140af8c796d1bf03f6ec4ca Author: Mayank Rana Date: Wed May 26 18:29:24 2021 -0700 usb: dwc3: trace: Remove unused fields in dwc3_log_trb Commit 0bd0f6d201eb ("usb: dwc3: gadget: remove allocated/queued request tracking") removed the allocated & queued fields from struct dwc3_ep but neglected to also remove them from the dwc3_log_trb event class's TP_STRUCT definition which are now unused. Remove them to save eight bytes per trace event entry. Signed-off-by: Mayank Rana Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210527012924.3596-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit acad3e9c7250c5fd20d9778a163f2adc95de38f5 Author: Heikki Krogerus Date: Wed May 26 18:35:48 2021 +0300 usb: typec: mux: Remove requirement for the "orientation-switch" device property The additional boolean device property "orientation-switch" is not needed when the connection is described with device graph, so removing the check and the requirement for it. Reviewed-by: Hans de Goede Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210526153548.61276-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7bf991eab8b21afb7bd130b7065384a6ce2e8789 Author: Heikki Krogerus Date: Wed May 26 18:35:47 2021 +0300 usb: typec: mux: Use device type instead of device name for matching Both the USB Type-C switch and mux have already a device type defined for them. We can use those types instead of the device name to differentiate the two. Reviewed-by: Hans de Goede Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210526153548.61276-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit baabd69492bbd3250467515a5a6f2bf15ade9b62 Author: Chunfeng Yun Date: Tue May 25 16:53:06 2021 +0800 usb: common: usb-conn-gpio: use usb_role_string() to print role status Use usb_role_string() to print role status, make the log readable. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1621932786-9335-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 73e33008e865e5a7b79282331c2d6e920d5d47f8 Author: Chunfeng Yun Date: Tue May 25 16:53:05 2021 +0800 usb: roles: add helper usb_role_string() Introduces usb_role_string() function, which returns a human-readable name of provided usb role, it's useful to make the log readable. Reviewed-by: Heikki Krogerus Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1621932786-9335-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit c4eaba3853ede40965f2ed379223ca2202550c73 Author: Thomas Zimmermann Date: Sun May 16 14:13:15 2021 +0200 drm/fourcc: Remove struct drm_format_buf_name The structure is unused. Remove it. Signed-off-by: Thomas Zimmermann Reviewed-by: Sakari Ailus Link: https://patchwork.freedesktop.org/patch/msgid/20210516121315.30321-5-tzimmermann@suse.de commit b066c72e6a1c2a4876a0ad1032b1fef6fc86e6eb Author: Sakari Ailus Date: Sun May 16 14:13:14 2021 +0200 drm: Remove drm_get_format_name() The %p4cc printk format modifier was recently added to print fourcc codes, replacing drm_get_format_name(). The function is no longer needed, so remove it. Signed-off-by: Sakari Ailus Signed-off-by: Thomas Zimmermann Reviewed-by: Petr Mladek Reviewed-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20210516121315.30321-4-tzimmermann@suse.de commit b2f0101a0689ab03055f7ec2df4a9d76b7a47496 Author: Thomas Zimmermann Date: Sun May 16 14:13:13 2021 +0200 drm/simpledrm: Use %p4cc to print 4CC format Replace use of struct drm_format_name_buf with %p4cc for printing 4CC formats. Signed-off-by: Thomas Zimmermann Reviewed-by: Sakari Ailus Link: https://patchwork.freedesktop.org/patch/msgid/20210516121315.30321-3-tzimmermann@suse.de commit 5a6af54d6e4db5867eb8a0886b5d54a1893c3bf1 Author: Thomas Zimmermann Date: Sun May 16 14:13:12 2021 +0200 drm/amdgpu: Use %p4cc to print 4CC format Replace use of struct drm_format_name_buf with %p4cc for printing 4CC formats. Signed-off-by: Thomas Zimmermann Reviewed-by: Sakari Ailus Acked-by: Christian König Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210516121315.30321-2-tzimmermann@suse.de commit d955782da2901f977ef1ededba8a2764e35c1187 Author: Colin Ian King Date: Wed May 26 17:06:16 2021 +0100 ALSA: hda/ca0132: Make a const array static, makes object smaller Don't populate the const array dsp_dma_stream_ids the stack but instead make it static. Makes the object code smaller by 21 bytes. Before: text data bss dec hex filename 189012 70376 192 259580 3f5fc ./sound/pci/hda/patch_ca0132.o After: text data bss dec hex filename 188927 70440 192 259559 3f5e7 ./sound/pci/hda/patch_ca0132.o (gcc version 10.3.0) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210526160616.3764119-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit b5c2e2c79034eaa4c786e304d094618156eea69b Author: Pierre-Louis Bossart Date: Wed May 26 14:29:57 2021 -0500 ALSA: pci: lx6464es: remove useless self-comparison Sparse throws the following warning: sound/pci/lx6464es/lx_core.c:677:34: error: self-comparison always evaluates to false This comparison and error message make no sense, let's remove them. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210526192957.449515-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 93a5b85c3c53ec99782b5973f6f6559c8f0af12c Author: Pierre-Louis Bossart Date: Wed May 26 14:29:56 2021 -0500 ALSA: drivers: opl3: fix useless self-comparison Sparse throws the following warning: sound/drivers/opl3/opl3_midi.c:183:60: error: self-comparison always evaluates to false This is likely a 16+ year old confusion between vp2 and vp. Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210526192957.449515-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 1519c84c0592f22e6ee9c7a7bce3032a0915e93f Author: zuoqilin Date: Thu May 27 11:04:45 2021 +0800 sound/oss/dmasound: Remove superfluous "break" Remove superfluous "break", as there is a "return" before them. Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210527030445.1201-1-zuoqilin1@163.com Signed-off-by: Takashi Iwai commit 7fda2b0bfbd98e554be9dbbdf930c34674438c85 Author: Luca Weiss Date: Wed May 26 22:08:43 2021 +0200 soc: qcom: socinfo: import PMIC IDs from pmic-spmi The driver in drivers/mfd/qcom-spmi-pmic.c has a more complete and more up-to-date list of PMICs with the respective IDs. Use those names for socinfo. Some IDs seem to have been assigned to multiple PMICs so keep that in the name as well. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20210526200843.127916-1-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit ee704ebfd548a67e521f6f86949facc56ebc59e7 Author: Lee Jones Date: Wed May 26 09:10:35 2021 +0100 bus: qcom-ebi2: Fix incorrect documentation for '{slow,fast}_cfg' Fixes the following W=1 kernel build warning(s): drivers/bus/qcom-ebi2.c:112: warning: Function parameter or member 'slow_cfg' not described in 'cs_data' drivers/bus/qcom-ebi2.c:112: warning: Function parameter or member 'fast_cfg' not described in 'cs_data' Reviewed-by: Linus Walleij Cc: Bjorn Andersson Cc: Linus Walleij Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210526081038.544942-8-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 59c56342459a483d5e563ed8b5fdb77ab7622a73 Merge: 18c8d3044d9c1 205523bc06cec Author: Jakub Kicinski Date: Wed May 26 18:33:01 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-05-26 Jesse Brandeburg says: In this series I address the C=2 (sparse) warnings. The goal is to be completely sparse clean in the drivers/net/ethernet/intel directory. This can help us run this tool for every patch, and helps the kernel code by reducing technical debt. NOTE: there is one warning left in ixgbe XDP code using rcu_assign_pointer(). * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ixgbe: reduce checker warnings ixgbe: use checker safe conversions igbvf: convert to strongly typed descriptors intel: call csum functions with well formatted arguments igb: override two checker warnings igb: fix assignment on big endian machines igb: handle vlan types with checker enabled igb/igc: use strongly typed pointer fm10k: move error check intel: remove checker warning e100: handle eeprom as little endian ==================== Link: https://lore.kernel.org/r/20210526172346.3515587-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit acad945dc22efb867c0a1fa5911361bc746ec05a Author: Peng Fan Date: Mon May 10 12:00:45 2021 +0800 soc: imx: gpcv2: move reset assert after requesting domain power up The i.MX8MM VPU power up sequence is a bit special, it must follow: 1. request power up 2. reset assert 3. reset deassert This change in this patch will not affect other domains, because the power domain default is in asserted state, unless bootloader deassert the reset. It also applies to GPU power domain. Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit a36cc1e512e9b9152a340e34d4d7b6dd7f31de3f Author: Lucas Stach Date: Mon May 10 12:00:44 2021 +0800 soc: imx: gpcv2: Add support for missing i.MX8MM VPU/DISPMIX power domains With the BLK-CTL driver now in place, let's add the missing domains. Tested-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Frieder Schrempf Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 47f87c628055748ad509b2a580fb3135598f7a6d Author: Lucas Stach Date: Mon May 10 12:00:43 2021 +0800 soc: imx: gpcv2: add support for i.MX8MM power domains This adds support for the power domains found on i.MX8MM. The 2D and 3D GPU domains are abstracted as a single domain in the driver, as they can't be powered up/down individually due to a shared reset. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 30af8513bdb59a3e57f58f51c340130b6328b59e Author: Lucas Stach Date: Mon May 10 12:00:42 2021 +0800 dt-bindings: power: add defines for i.MX8MM power domains Adding defines for i.MX8MM GPC power domains. Tested-by: Frieder Schrempf Acked-by: Rob Herring Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 18c8d3044d9c1ad2c3f447f30e4a25fd96ae3603 Author: Jiapeng Chong Date: Wed May 26 18:21:04 2021 +0800 net/appletalk: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/net/appletalk/ltpc.c:588 idle() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1622024464-29896-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 6cf3b3abbf0b3b778138c0f8936aa7820af62cfc Author: Linus Walleij Date: Wed May 26 16:35:11 2021 -0700 Input: cyttsp - obtain regulators The CYTTSP TMA340 chips have two supplies: VCPIN and VDD for analog and digital voltage respectively. Add some minimal code to obtain and enable these regulators if need be. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210526230352.1433537-3-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 007704c99f52e22cd93bcc16c610d7c1a41fd9cd Author: Linus Walleij Date: Wed May 26 16:34:41 2021 -0700 Input: cyttsp - probe from compatibles The driver (both SPI and I2C interface) should probe from the compatible strings, cypress,cy8ctma340 etc when using device tree, not as now, where it is probing implicitly from the I2C/SPI node name "cypress,cyttsp-i2c" etc. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210526230352.1433537-2-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 4b48d935a5e027188d5fd6fd3ce2ee2da1811a0e Author: Linus Walleij Date: Wed May 26 16:34:25 2021 -0700 Input: cyttsp - convert bindings to YAML and extend This converts the CYTTSP "Cypress TrueTouch Standard Product" to YAML bindings and fixes and adds some things in the process: - Rename the bindings file to cypress,cy8ctma340 after the main product in the series. - Add proper compatibles for the two known products: CY8CTMA340 and CY8CTST341. - Deprecate "cypress,cyttsp-spi" and "cypress,cyttsp-i2c" because device compatibles should be named after the hardware and not after which bus they are connected to. The topology implicitly tells us which bus it is and what interface to used. - Add VCPIN and VDD supplies, these are present just like on the CY8CTMA140. Reviewed-by: Rob Herring Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210526230352.1433537-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 125217e0967fc905be35a3b2c9ba4db9a8616b92 Author: Gustavo A. R. Silva Date: Tue May 25 18:00:38 2021 -0500 i40e: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct i40e_qvlist_info instead of one-element array, and use the struct_size() helper. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Gustavo A. R. Silva Acked-by: Shiraz Saleem Signed-off-by: Tony Nguyen commit 1cbdf60bd1b74e397d48aa877367cfc621f45ffe Author: Peter Collingbourne Date: Wed May 26 10:49:27 2021 -0700 kasan: arm64: support specialized outlined tag mismatch checks By using outlined checks we can achieve a significant code size improvement by moving the tag-based ASAN checks into separate functions. Unlike the existing CONFIG_KASAN_OUTLINE mode these functions have a custom calling convention that preserves most registers and is specialized to the register containing the address and the type of access, and as a result we can eliminate the code size and performance overhead of a standard calling convention such as AAPCS for these functions. This change depends on a separate series of changes to Clang [1] to support outlined checks in the kernel, although the change works fine without them (we just don't get outlined checks). This is because the flag -mllvm -hwasan-inline-all-checks=0 has no effect until the Clang changes land. The flag was introduced in the Clang 9.0 timeframe as part of the support for outlined checks in userspace and because our minimum Clang version is 10.0 we can pass it unconditionally. Outlined checks require a new runtime function with a custom calling convention. Add this function to arch/arm64/lib. I measured the code size of defconfig + tag-based KASAN, as well as boot time (i.e. time to init launch) on a DragonBoard 845c with an Android arm64 GKI kernel. The results are below: code size boot time CONFIG_KASAN_INLINE=y before 92824064 6.18s CONFIG_KASAN_INLINE=y after 38822400 6.65s CONFIG_KASAN_OUTLINE=y 39215616 11.48s We can see straight away that specialized outlined checks beat the existing CONFIG_KASAN_OUTLINE=y on both code size and boot time for tag-based ASAN. As for the comparison between CONFIG_KASAN_INLINE=y before and after we saw similar performance numbers in userspace [2] and decided that since the performance overhead is minimal compared to the overhead of tag-based ASAN itself as well as compared to the code size improvements we would just replace the inlined checks with the specialized outlined checks without the option to select between them, and that is what I have implemented in this patch. Signed-off-by: Peter Collingbourne Acked-by: Andrey Konovalov Reviewed-by: Mark Rutland Tested-by: Mark Rutland Link: https://linux-review.googlesource.com/id/I1a30036c70ab3c3ee78d75ed9b87ef7cdc3fdb76 Link: [1] https://reviews.llvm.org/D90426 Link: [2] https://reviews.llvm.org/D56954 Link: https://lore.kernel.org/r/20210526174927.2477847-3-pcc@google.com Signed-off-by: Will Deacon commit 2e21d85336c423a67c882227803bc46233e39bc6 Merge: c4681547bcce7 33c222aeda145 Author: Will Deacon Date: Wed May 26 23:27:42 2021 +0100 Merge branch 'for-next/stacktrace' into for-next/kasan Merge in stack unwinding work to cater for 8-byte aligned stack frames which may be generated following optimisations to CONFIG_KASAN_OUTLINE. * for-next/stacktrace: arm64: stacktrace: Relax frame record alignment requirement to 8 bytes arm64: Change the on_*stack functions to take a size argument arm64: Implement stack trace termination record commit 3d8c1a013d78f32ee266097496cbd89b734b5fcb Author: Mark Rutland Date: Thu May 20 12:50:31 2021 +0100 arm64: smp: initialize cpu offset earlier Now that we have a consistent place to initialize CPU context registers early in the boot path, let's also initialize the per-cpu offset here. This makes the primary and secondary boot paths more consistent, and allows for the use of per-cpu operations earlier, which will be necessary for instrumentation with KCSAN. Note that smp_prepare_boot_cpu() still needs to re-initialize CPU0's offset as immediately prior to this the per-cpu areas may be reallocated, and hence the boot-time offset may be stale. A comment is added to make this clear. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Cc: Marc Zyngier Cc: Suzuki Poulose Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210520115031.18509-7-mark.rutland@arm.com Signed-off-by: Will Deacon commit 8e334d729bc4787f728e9e5abc91649f131124ff Author: Mark Rutland Date: Thu May 20 12:50:30 2021 +0100 arm64: smp: unify task and sp setup Once we enable the MMU, we have to initialize: * SP_EL0 to point at the active task * SP to point at the active task's stack * SCS_SP to point at the active task's shadow stack For all tasks (including init_task), this information can be derived from the task's task_struct. Let's unify __primary_switched and __secondary_switched to consistently acquire this information from the relevant task_struct. At the same time, let's fold this together with initializing a task's final frame. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Cc: Marc Zyngier Cc: Suzuki Poulose Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210520115031.18509-6-mark.rutland@arm.com Signed-off-by: Will Deacon commit 3305e7f74a14cdb19e61af4febb098ad62820d71 Author: Mark Rutland Date: Thu May 20 12:50:29 2021 +0100 arm64: smp: remove stack from secondary_data When we boot a secondary CPU, we pass it a task and a stack to use. As the stack is always the task's stack, which can be derived from the task, let's have the secondary CPU derive this itself and avoid passing redundant information. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Cc: Marc Zyngier Cc: Suzuki Poulose Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210520115031.18509-5-mark.rutland@arm.com Signed-off-by: Will Deacon commit 98c7a1666ee94af59a65f2787a887a05a546d163 Author: Mark Rutland Date: Thu May 20 12:50:28 2021 +0100 arm64: smp: remove pointless secondary_data maintenance All reads and writes of secondary_data occur with the MMU on, using coherent attributes, so there's no need to perform any cache maintenance for this. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Cc: Marc Zyngier Cc: Suzuki Poulose Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210520115031.18509-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit e176e2677cccd458f99c69d16d27f86adcdd02e4 Author: Mark Rutland Date: Thu May 20 12:50:27 2021 +0100 arm64: assembler: add set_this_cpu_offset There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Cc: Marc Zyngier Cc: Suzuki Poulose Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210520115031.18509-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 503555325d495e8857b89be08ba6a6dfbeab4799 Merge: c4681547bcce7 33c222aeda145 Author: Will Deacon Date: Wed May 26 22:42:51 2021 +0100 Merge branch 'for-next/stacktrace' into for-next/boot Merge in stack unwinding work to minimise conflicts in head.S. * for-next/stacktrace: arm64: stacktrace: Relax frame record alignment requirement to 8 bytes arm64: Change the on_*stack functions to take a size argument arm64: Implement stack trace termination record commit cc2195fe536c28e192df5d07e6dd277af36814b4 Author: Sudeep Holla Date: Fri May 21 16:10:33 2021 +0100 firmware: arm_ffa: Add support for MEM_* interfaces Most of the MEM_* APIs share the same parameters, so they can be generalised. Currently only MEM_SHARE is implemented and the user space interface for that is not added yet. Link: https://lore.kernel.org/r/20210521151033.181846-6-sudeep.holla@arm.com Tested-by: Jens Wiklander Signed-off-by: Sudeep Holla commit d0c0bce831223b08e5bade2cefc93c3ddb790796 Author: Sudeep Holla Date: Fri May 21 16:10:32 2021 +0100 firmware: arm_ffa: Setup in-kernel users of FFA partitions Parse the FFA nodes from the device-tree and register all the partitions whose services will be used in the kernel. In order to also enable in-kernel users of FFA interface, let us add simple set of operations for such devices. The in-kernel users are registered without the character device interface. Link: https://lore.kernel.org/r/20210521151033.181846-5-sudeep.holla@arm.com Tested-by: Jens Wiklander Reviewed-by: Jens Wiklander Signed-off-by: Sudeep Holla commit 714be77e976a4b013b935b3223b2ef68856084d0 Author: Sudeep Holla Date: Fri May 21 16:10:31 2021 +0100 firmware: arm_ffa: Add support for SMCCC as transport to FFA driver There are requests to keep the transport separate in order to allow other possible transports like virtio. So let us keep the SMCCC transport specific routines abstracted. It is kept simple for now. Once we add another transport, we can develop better abstraction. Link: https://lore.kernel.org/r/20210521151033.181846-4-sudeep.holla@arm.com Tested-by: Jens Wiklander Reviewed-by: Jens Wiklander Signed-off-by: Sudeep Holla commit 3bbfe9871005f38df2955b2e125933edf1d2feef Author: Sudeep Holla Date: Fri May 21 16:10:30 2021 +0100 firmware: arm_ffa: Add initial Arm FFA driver support This just add a basic driver that sets up the transport(e.g. SMCCC), checks the FFA version implemented, get the partition ID for self and sets up the Tx/Rx buffers for communication. Link: https://lore.kernel.org/r/20210521151033.181846-3-sudeep.holla@arm.com Tested-by: Jens Wiklander Signed-off-by: Sudeep Holla commit e781858488b918e30a6ff28e9eab6058b787e3b3 Author: Sudeep Holla Date: Fri May 21 16:10:29 2021 +0100 firmware: arm_ffa: Add initial FFA bus support for device enumeration The Arm FF for Armv8-A specification has concept of endpoints or partitions. In the Normal world, a partition could be a VM when the Virtualization extension is enabled or the kernel itself. In order to handle multiple partitions, we can create a FFA device for each such partition on a dedicated FFA bus. Similarly, different drivers requiring FFA transport can be registered on the same bus. We can match the device and drivers using UUID. This is mostly for the in-kernel users with FFA drivers. Link: https://lore.kernel.org/r/20210521151033.181846-2-sudeep.holla@arm.com Tested-by: Jens Wiklander Signed-off-by: Sudeep Holla commit 21047e91a5a674b97ebbf2c2c1751f1e9c317f09 Author: Catalin Marinas Date: Wed May 26 20:36:21 2021 +0100 arm64: Check if GMID_EL1.BS is the same on all CPUs The GMID_EL1.BS field determines the number of tags accessed by the LDGM/STGM instructions (EL1 and up), used by the kernel for copying or zeroing page tags. Taint the kernel if GMID_EL1.BS differs between CPUs but only of CONFIG_ARM64_MTE is enabled. Signed-off-by: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Suzuki K Poulose Link: https://lore.kernel.org/r/20210526193621.21559-3-catalin.marinas@arm.com Signed-off-by: Will Deacon commit 7513cc8a1b741bee6fb39cbb94a9842d37ca3ace Author: Catalin Marinas Date: Wed May 26 20:36:20 2021 +0100 arm64: Change the cpuinfo_arm64 member type for some sysregs to u64 The architecture has been updated and the CTR_EL0, CNTFRQ_EL0, DCZID_EL0, MIDR_EL1, REVIDR_EL1 registers are all 64-bit, even if most of them have a RES0 top 32-bit. Change their type to u64 in struct cpuinfo_arm64. Signed-off-by: Catalin Marinas Cc: Will Deacon Acked-by: Mark Rutland Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210526193621.21559-2-catalin.marinas@arm.com Signed-off-by: Will Deacon commit 5cb4e1f33e5eeadbce3814282e010d4dd31816af Author: Andy Shevchenko Date: Wed May 26 22:56:55 2021 +0300 spi: Enable tracing of the SPI setup CS selection It is helpful to see what state of CS signal was during one or another SPI operation. All the same for SPI setup. Enable tracing of the SPI setup and CS selection. Signed-off-by: Andy Shevchenko Message-Id: <20210526195655.75691-1-andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown commit c7a551b2e44a65170b5dceaca0afbd59f3715f11 Author: wengjianfeng Date: Wed May 26 09:16:24 2021 +0800 nfc: st-nci: remove unnecessary labels Some labels are only used once, so we delete them and use the return statement instead of the goto statement. Signed-off-by: wengjianfeng Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210526011624.11204-1-samirweng1979@163.com Signed-off-by: Jakub Kicinski commit 568e7142a15f821867a39797f5b098070df4a9c8 Author: wengjianfeng Date: Wed May 26 08:56:51 2021 +0800 nfc: st95hf: remove unnecessary assignment and label In function st95hf_in_send_cmd, the variable rc is assigned then goto error label, which just returns rc, so we use return to replace it. Since error label only used once in the function, so we remove error label. Signed-off-by: wengjianfeng Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210526005651.12652-1-samirweng1979@163.com Signed-off-by: Jakub Kicinski commit 53004ee78d6273c994534ccf79d993098ac89769 Author: Gustavo A. R. Silva Date: Tue Apr 20 17:54:36 2021 -0500 xfs: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix the following warnings by replacing /* fall through */ comments, and its variants, with the new pseudo-keyword macro fallthrough: fs/xfs/libxfs/xfs_alloc.c:3167:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_da_btree.c:286:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_ag_resv.c:346:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/libxfs/xfs_ag_resv.c:388:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_bmap_util.c:246:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_export.c:88:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_export.c:96:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_file.c:867:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_ioctl.c:562:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_ioctl.c:1548:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_iomap.c:1040:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_inode.c:852:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_log.c:2627:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/xfs_trans_buf.c:298:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/bmap.c:275:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/btree.c:48:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/common.c:85:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/common.c:138:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/common.c:698:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/dabtree.c:51:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/repair.c:951:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] fs/xfs/scrub/agheader.c:89:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings, so in order to globally enable -Wimplicit-fallthrough for Clang, these comments need to be replaced with fallthrough; in the whole codebase. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 9ecf6ac17c321df396df283a771c29663e44871a Author: Maor Gottlieb Date: Wed May 19 11:47:27 2021 +0300 RDMA/mlx5: Take qp type from mlx5_ib_qp Change all the places in the mlx5_ib driver to take the qp type from the mlx5_ib_qp struct, except the QP initialization flow. It will ensure that we check the right QP type also for vendor specific QPs. Link: https://lore.kernel.org/r/b2e16cd65b59cd24fa81c01c7989248da44e58ea.1621413899.git.leonro@nvidia.com Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 39aa91e2af57561716338d6488977d50b9735cfb Author: Arnd Bergmann Date: Fri May 14 23:33:05 2021 +0200 fbdev: matrox: use modern module_init() This is one of the last drivers with a global init_module() function instead of the modern module_init() annotation. Convert it over. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210514213316.635070-1-arnd@kernel.org commit b3484d2b03e4c940a9598aa841a52d69729c582a Author: Javier Martinez Canillas Date: Tue May 25 17:13:13 2021 +0200 drm/fb-helper: improve DRM fbdev emulation device names Framebuffer devices that are registered by DRM drivers for fbdev emulation have a "drmfb" suffix in their name. But makes them to be quite confusing for drivers that already have "drm" in their name: $ cat /proc/fb 0 rockchipdrmdrmfb $ cat /proc/fb 0 simpledrmdrmfb Also, there isn't a lot of value in adding these "drmfb" suffices to their names, since users shouldn't really care if the FB devices were registered by a real fbdev driver or a DRM driver using the fbdev emulation. What programs should be interested about is if there's a DRM device, and there are better ways to query that info than reading this procfs entry. So let's just remove the suffix, which leads to much better device names: $ cat /proc/fb 0 rockchipdrm $ cat /proc/fb 0 simpledrm Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210525151313.3379622-1-javierm@redhat.com commit 6616125bb4dff9694459184d5c72d69237be4760 Author: Hao Fang Date: Sat May 22 18:15:29 2021 +0800 drm/hisilicon/kirin: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to https://www.hisilicon.com/en. Signed-off-by: Hao Fang Acked-by: Tian Tao Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1621678529-14389-1-git-send-email-fanghao11@huawei.com commit 5562f75c49cc059b9b36b03bf0a61f11d2a8648f Author: Joseph Kogut Date: Tue May 18 14:28:59 2021 -0700 drm: fix leaked dma handles after removing drm_pci_free After removing drm_pci_alloc/free, some instances where drm_pci_free() would have kfreed the dma handle were skipped. Ensure these handles are freed properly. Signed-off-by: Joseph Kogut Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210518212859.4148903-1-joseph.kogut@gmail.com commit ad4711f962e08eff8d6e9b03f9670b1af6ea9395 Author: Mark Brown Date: Wed May 12 16:11:31 2021 +0100 arm64/sve: Skip flushing Z registers with 128 bit vectors When the SVE vector length is 128 bits then there are no bits in the Z registers which are not shared with the V registers so we can skip them when zeroing state not shared with FPSIMD, this results in a minor performance improvement. Signed-off-by: Mark Brown Reviewed-by: Dave Martin Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210512151131.27877-4-broonie@kernel.org Signed-off-by: Will Deacon commit c9f6890bca111a879a8af1f2390ac49cf05b11df Author: Mark Brown Date: Wed May 12 16:11:30 2021 +0100 arm64/sve: Use the sve_flush macros in sve_load_from_fpsimd_state() This makes the code a bit clearer and as a result we can also make the indentation more normal, there is no change to the generated code. Signed-off-by: Mark Brown Reviewed-by: Dave Martin Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210512151131.27877-3-broonie@kernel.org Signed-off-by: Will Deacon commit 483dbf6a35907610597fdc304bd32ecba40cdff0 Author: Mark Brown Date: Wed May 12 16:11:29 2021 +0100 arm64/sve: Split _sve_flush macro into separate Z and predicate flushes Trivial refactoring to support further work, no change to generated code. Signed-off-by: Mark Brown Reviewed-by: Dave Martin Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210512151131.27877-2-broonie@kernel.org Signed-off-by: Will Deacon commit 042da426f8ebde012be9429ff705232af7ad7469 Author: Masahiro Yamada Date: Sun May 23 12:14:28 2021 +0900 scripts/setlocalversion: simplify the short version part Reduce the indentation. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Kroah-Hartman Reviewed-by: Nico Schottelius commit 630ff0faf84eac6448c851961d4865471a792160 Author: Masahiro Yamada Date: Sun May 23 12:14:27 2021 +0900 scripts/setlocalversion: factor out 12-chars hash construction Both of if and else parts append exactly 12 hex chars, but in different ways. Factor out the else part because we need to support it without relying on git-describe. Remove the --abbrev=12 option since we do not use the hash from git-describe anyway. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Kroah-Hartman Reviewed-by: Nico Schottelius commit ffaf62a8050b5f7995083ee93526b57d8d79fec4 Author: Masahiro Yamada Date: Sun May 23 12:14:26 2021 +0900 scripts/setlocalversion: add more comments to -dirty flag detection This script stumbled on the read-only source tree over again: - a2bb90a08cb3 ("kbuild: fix delay in setlocalversion on readonly source") - cdf2bc632ebc ("scripts/setlocalversion on write-protected source tree") - 8ef14c2c41d9 ("Revert "scripts/setlocalversion: git: Make -dirty check more robust"") - ff64dd485730 ("scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks") Add comments to clarify that this script should never ever try to write to the source tree. 'git describe --dirty' might look as a simple solution for appending the -dirty string, but we cannot use it because it creates the .git/index.lock file. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Kroah-Hartman Reviewed-by: Nico Schottelius commit a2be76a352f1035a2e5f914a409743d65dc514c5 Author: Masahiro Yamada Date: Sun May 23 12:14:25 2021 +0900 scripts/setlocalversion: remove workaround for old make-kpkg This reverts commit b052ce4c840e ("kbuild: fix false positive -dirty tag caused by make-kpkg"). If I understand correctly, this problem occurred in very old versions of make-kpkg. When I tried a newer version, make-kpkg did not touch scripts/package/Makefile. Anyway, Debian uses 'make deb-pkg' instead of make-kpkg these days. Debian handbook [1] mentions it as "the good old days": "CULTURE The good old days of kernel-package Before the Linux build system gained the ability to build proper Debian packages, the recommended way to build such packages was to use make-kpkg from the kernel-package package." [1]: https://debian-handbook.info/browse/stable/sect.kernel-compilation.html Signed-off-by: Masahiro Yamada Reviewed-by: Greg Kroah-Hartman Reviewed-by: Nico Schottelius commit 2a73cce2dad3b6e0aa705b376bb736358b6b5e8e Author: Masahiro Yamada Date: Sun May 23 12:14:24 2021 +0900 scripts/setlocalversion: remove mercurial, svn and git-svn supports The mercurial, svn, git-svn supports were added by the following commits: - 3dce174cfcba ("kbuild: support mercurial in setlocalversion") - ba3d05fb6369 ("kbuild: add svn revision information to setlocalversion") - ff80aa97c9b4 ("setlocalversion: add git-svn support") They did not explain why they are useful for the kernel source tree. Let's revert all of them, and see if somebody will complain about it. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Kroah-Hartman Reviewed-by: Nico Schottelius commit c39013ee64b5083ec3202aae8a418e9c70baff7a Author: Masahiro Yamada Date: Mon May 17 16:03:14 2021 +0900 kbuild: clean up ${quiet} checks in shell scripts There were efforts to make 'make -s' really silent when it is a warning-free build. The conventional way was to let a shell script check ${quiet}, and if it is 'silent_', suppress the stdout by itself. With the previous commit, the 'cmd' takes care of it now. The 'cmd' is also invoked from if_changed, if_changed_dep, and if_changed_rule. You can omit ${quiet} checks in shell scripts when they are invoked from the 'cmd' macro. Signed-off-by: Masahiro Yamada commit 174a1dcc96429efce4ef7eb2f5c4506480da2182 Author: Masahiro Yamada Date: Mon May 17 16:03:13 2021 +0900 kbuild: sink stdout from cmd for silent build When building with 'make -s', no output to stdout should be printed. As Arnd Bergmann reported [1], mkimage shows the detailed information of the generated images. I think this should be suppressed by the 'cmd' macro instead of by individual scripts. Insert 'exec >/dev/null;' in order to redirect stdout to /dev/null for silent builds. [Note about this implementation] 'exec >/dev/null;' may look somewhat tricky, but this has a reason. Appending '>/dev/null' at the end of command line is a common way for redirection, so I first tried this: cmd = @set -e; $(echo-cmd) $(cmd_$(1)) >/dev/null ... but it would not work if $(cmd_$(1)) itself contains a redirection. For example, cmd_wrap in scripts/Makefile.asm-generic redirects the output from the 'echo' command into the target file. It would be expanded into: echo "#include " > $@ >/dev/null Then, the target file gets empty because the string will go to /dev/null instead of $@. Next, I tried this: cmd = @set -e; $(echo-cmd) { $(cmd_$(1)); } >/dev/null The form above would be expanded into: { echo "#include " > $@; } >/dev/null This works as expected. However, it would be a syntax error if $(cmd_$(1)) is empty. When CONFIG_TRIM_UNUSED_KSYMS is disabled, $(call cmd,gen_ksymdeps) in scripts/Makefile.build would be expanded into: set -e; { ; } >/dev/null ..., which causes an syntax error. I also tried this: cmd = @set -e; $(echo-cmd) ( $(cmd_$(1)) ) >/dev/null ... but this causes a syntax error for the same reason. So, finally I adopted: cmd = @set -e; $(echo-cmd) exec >/dev/null; $(cmd_$(1)) [1]: https://lore.kernel.org/lkml/20210514135752.2910387-1-arnd@kernel.org/ Signed-off-by: Masahiro Yamada commit 41eba23efba38b2bc4c33e3c00441e196ebdac55 Author: Masahiro Yamada Date: Mon May 17 16:03:12 2021 +0900 init: use $(call cmd,) for generating include/generated/compile.h The 'cmd' macro shows the short log only when $(quiet) is quiet_. Do not do it manually. Signed-off-by: Masahiro Yamada commit 33c222aeda14596ca5b9a1a3002858c6c3565ddd Author: Peter Collingbourne Date: Wed May 26 10:49:26 2021 -0700 arm64: stacktrace: Relax frame record alignment requirement to 8 bytes The AAPCS places no requirements on the alignment of the frame record. In theory it could be placed anywhere, although it seems sensible to require it to be aligned to 8 bytes. With an upcoming enhancement to tag-based KASAN Clang will begin creating frame records located at an address that is only aligned to 8 bytes. Accommodate such frame records in the stack unwinding code. As pointed out by Mark Rutland, the userspace stack unwinding code has the same problem, so fix it there as well. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Ia22c375230e67ca055e9e4bb639383567f7ad268 Acked-by: Andrey Konovalov Reviewed-by: Mark Rutland Tested-by: Mark Rutland Link: https://lore.kernel.org/r/20210526174927.2477847-2-pcc@google.com Signed-off-by: Will Deacon commit 76734d26b54192a31440039459eef2612da63ed4 Author: Peter Collingbourne Date: Wed May 26 10:49:25 2021 -0700 arm64: Change the on_*stack functions to take a size argument unwind_frame() was previously implicitly checking that the frame record is in bounds of the stack by enforcing that FP is both aligned to 16 and in bounds of the stack. Once the FP alignment requirement is relaxed to 8 this will not be sufficient because it does not account for the case where FP points to 8 bytes before the end of the stack. Make the check explicit by changing the on_*stack functions to take a size argument and adjusting the callers to pass the appropriate sizes. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Ib7a3eb3eea41b0687ffaba045ceb2012d077d8b4 Reviewed-by: Mark Rutland Tested-by: Mark Rutland Link: https://lore.kernel.org/r/20210526174927.2477847-1-pcc@google.com Signed-off-by: Will Deacon commit 2728fcfa4fcc0c4152629c48d49c3bd5f9008329 Author: Masahiro Yamada Date: Mon May 17 16:03:11 2021 +0900 kbuild: merge scripts/mkmakefile to top Makefile scripts/mkmakefile is simple enough to be merged in the Makefile. Use $(call cmd,...) to show the log instead of doing it in the shell script. Signed-off-by: Masahiro Yamada commit e0283ffaecc22705980abb592521b8440e5bd6be Author: Thomas Zimmermann Date: Wed May 26 12:08:25 2021 +0200 drm/kconfig: Remove unused select of DRM_KMS_FB_HELPER The option DRM_KMS_FB_HELPER has been removed. Also remove the last remaining select statement for it. Signed-off-by: Thomas Zimmermann Fixes: 91185d55b32e ("drm: Remove DRM_KMS_FB_HELPER Kconfig option") Acked-by: Maxime Ripard Reported-by: Geert Uytterhoeven Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210526100825.29450-1-tzimmermann@suse.de commit 031df82514b4a258ceee381fa19aa02a1188c470 Author: Thomas Zimmermann Date: Tue May 25 17:10:55 2021 +0200 drm/ttm: Remove ttm_bo_mmap() and friends The function ttm_bo_mmap is unused. Remove it and it's helpers; including the verify_access callback in struct ttm_device_funcs. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-8-tzimmermann@suse.de commit cbc5caf778bae72e8060dbef9a5c6a96a1e8a18d Author: Thomas Zimmermann Date: Tue May 25 17:10:54 2021 +0200 drm/vmwgfx: Inline vmw_verify_access() Vmwgfx is the only user of the TTM's verify_access callback. Inline the call and avoid the indirection through the function pointer. Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-7-tzimmermann@suse.de commit e65d096f8bd87a8546b8c3085b350094ed8bfa41 Author: Thomas Zimmermann Date: Tue May 25 17:10:53 2021 +0200 drm/vmwgfx: Inline ttm_bo_mmap() into vmwgfx driver The vmwgfx driver is the only remaining user of ttm_bo_mmap(). Inline the code. The internal helper ttm_bo_vm_lookup() is now also part of vmwgfx as vmw_bo_vm_lookup(). v2: * replace pr_err() with drm_err() (Zack) Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-6-tzimmermann@suse.de commit 265ec0dd1a0d18f4114f62c0d4a794bb4e729bc1 Author: Thomas Zimmermann Date: Tue May 25 17:10:52 2021 +0200 drm/nouveau: Implement mmap as GEM object function Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The GEM object function is provided by GEM TTM helpers. Nouveau's implementation of verify_access is unused and has been removed. Access permissions are validated by the DRM helpers. As a side effect, nouveau_ttm_vm_ops and nouveau_ttm_fault() are now implemented in nouveau's GEM code. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-5-tzimmermann@suse.de commit 645e954137f0a522e970ccff72547f57f93c2f72 Author: Thomas Zimmermann Date: Tue May 25 17:10:51 2021 +0200 drm/radeon: Implement mmap as GEM object function Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change also allows to support prime-based mmap via DRM's helper drm_gem_prime_mmap(). Permission checks are implemented by drm_gem_mmap(), with an additional check for radeon_ttm_tt_has_userptr() in the GEM object function. The function radeon_verify_access() is now unused and has thus been removed. As a side effect, radeon_ttm_vm_ops and radeon_ttm_fault() are now implemented in amdgpu's GEM code. v3: * remove unnecessary checks from mmap (Christian) v2: * rename radeon_ttm_vm_ops and radeon_ttm_fault() to radeon_gem_vm_ops and radeon_gem_fault() (Christian) * fix commit description (Alex) Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-4-tzimmermann@suse.de commit 71df0368e9b66afeb1fdb92a88be1a98cc25f310 Author: Thomas Zimmermann Date: Tue May 25 17:10:50 2021 +0200 drm/amdgpu: Implement mmap as GEM object function Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. This change resolves several inconsistencies between regular mmap and prime-based mmap. The vm_ops field in vma is now set for all mmap'ed areas. Previously it way only set for regular mmap calls, prime-based mmap used TTM's default vm_ops. The function amdgpu_verify_access() is no longer being called and therefore removed by this patch. As a side effect, amdgpu_ttm_vm_ops and amdgpu_ttm_fault() are now implemented in amdgpu's GEM code. v4: * rebased v3: * rename mmap function to amdgpu_gem_object_mmap() (Christian) * remove unnecessary checks from mmap (Christian) v2: * rename amdgpu_ttm_vm_ops and amdgpu_ttm_fault() to amdgpu_gem_vm_ops and amdgpu_gem_fault() (Christian) * the check for kfd_bo has meanwhile been removed Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-3-tzimmermann@suse.de commit ccd9fe972c4d083b8716205dc56acf55fd837ea0 Author: Thomas Zimmermann Date: Tue May 25 17:10:49 2021 +0200 drm/ttm: Don't override vm_ops callbacks, if set Drivers may want to set their own callbacks for a VM area. Only set TTM's callbacks if the vm_ops field is clear. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-2-tzimmermann@suse.de commit f85ea4945a268be6b0a6373f8ef1b2450d3f394b Author: Axel Lin Date: Tue May 25 22:12:03 2021 +0800 regulator: rk808: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Message-Id: <20210525141203.2562884-1-axel.lin@ingics.com> Signed-off-by: Mark Brown commit 6630d31c912ed2dfbc035caf0f54709b50ce779e Author: Ben Widawsky Date: Thu May 20 14:29:53 2021 -0700 cxl/mem: Get rid of @cxlm.base @cxlm.base only existed to support holding the base found in the register block mapping code, and pass it along to the register setup code. Now that the register setup function has all logic around managing the registers, from DVSEC to iomapping up to populating our CXL specific information, it is easy to turn the @base values into local variables and remove them from our device driver state. Acked-by: Jonathan Cameron Signed-off-by: Ben Widawsky Link: https://lore.kernel.org/r/20210520212953.1181695-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 1d5a4159074bde1b2d5e4a6f5ed34de70a83a39f Author: Ben Widawsky Date: Wed Apr 7 15:26:21 2021 -0700 cxl/mem: Move register locator logic into reg setup Start moving code around to ultimately get rid of @cxlm.base. The @cxlm.base member serves no purpose other than intermediate storage of the offset found in cxl_mem_map_regblock() later used by cxl_mem_setup_regs(). Aside from wanting to get rid of this useless member, it will help later when adding new register block identifiers. While @cxlm.base still exists, it will become trivial to remove it in a future patch. No functional change is meant to be introduced in this patch. Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210407222625.320177-4-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 1b0a1a2a193400d305931a40ac68e89bcfdad9c5 Author: Ben Widawsky Date: Wed Apr 7 15:26:20 2021 -0700 cxl/mem: Split creation from mapping in probe Add a new function specifically for mapping the register blocks and offsets within. The new function can be used more generically for other register block identifiers. No functional change is meant to be introduced in this patch with the exception of a dev_err printed when the device register block isn't found. Signed-off-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210407222625.320177-3-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 5d0c6f02595310a17762755bb6f015786b8900db Author: Ben Widawsky Date: Wed Apr 7 15:26:19 2021 -0700 cxl/mem: Use dev instead of pdev->dev Trivial cleanup. Signed-off-by: Ben Widawsky Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210407222625.320177-2-ben.widawsky@intel.com Signed-off-by: Dan Williams commit dd2a93a814e7ffbd4d2c3e361f4609c9bd384a96 Author: Ben Widawsky Date: Thu May 20 13:48:52 2021 -0700 cxl/mem: Demarcate vendor specific capability IDs Vendor capabilities occupy 0x8000 to 0xFFFF according to CXL 2.0 spec 8.2.8.2.1 CXL Device Capabilities. While they are not defined by the spec, they are allowed and not "unknown". Call this detail out in the logs to let users easily distinguish the difference. This patch is a squash of two earlier patches and take in some minor suggestions from both Vishal and Dan. Cc: Vishal Verma Cc: Dan Williams Signed-off-by: Ben Widawsky Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/20210520204852.1070780-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit 199cf8c3feec2947015da84643312790b21531cb Author: Vishal Verma Date: Thu May 20 13:47:45 2021 -0600 cxl/pci.c: Add a 'label_storage_size' attribute to the memdev The 'Identify Device' mailbox command returns an 'lsa_size', which is the size of the label storage area on the device. Export it as a sysfs attribute so that userspace tooling to read/write the LSA can determine the size without having to run an 'Identify Device' on their own. Cc: Ben Widawsky Cc: Dan Williams Signed-off-by: Vishal Verma Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/20210520194745.1095517-1-vishal.l.verma@intel.com Signed-off-by: Dan Williams commit 21e9f76733a8c152b794cba5463ff9bf2db919d4 Author: Ben Widawsky Date: Wed May 26 10:44:13 2021 -0700 cxl: Rename mem to pci As the driver has undergone development, it's become clear that the majority [entirety?] of the current functionality in mem.c is actually a layer encapsulating functionality exposed through PCI based interactions. This layer can be used either in isolation or to provide functionality for higher level functionality. CXL capabilities exist in a parallel domain to PCIe. CXL devices are enumerable and controllable via "legacy" PCIe mechanisms; however, their CXL capabilities are a superset of PCIe. For example, a CXL device may be connected to a non-CXL capable PCIe root port, and therefore will not be able to participate in CXL.mem or CXL.cache operations, but can still be accessed through PCIe mechanisms for CXL.io operations. To properly represent the PCI nature of this driver, and in preparation for introducing a new driver for the CXL.mem / HDM decoder (Host-managed Device Memory) capabilities of a CXL memory expander, rename mem.c to pci.c so that mem.c is available for this new driver. The result of the change is that there is a clear layering distinction in the driver, and a systems administrator may load only the cxl_pci module and gain access to such operations as, firmware update, offline provisioning of devices, and error collection. In addition to freeing up the file name for another purpose, there are two primary reasons this is useful, 1. Acting upon devices which don't have full CXL capabilities. This may happen for instance if the CXL device is connected in a CXL unaware part of the platform topology. 2. Userspace-first provisioning for devices without kernel driver interference. This may be useful when provisioning a new device in a specific manner that might otherwise be blocked or prevented by the real CXL mem driver. Reviewed-by: Dan Williams Signed-off-by: Ben Widawsky Link: https://lore.kernel.org/r/20210526174413.802913-1-ben.widawsky@intel.com Signed-off-by: Dan Williams commit d6a6a55518c16040a369360255b355b7a2a261de Author: Florent Revest Date: Wed May 26 18:46:43 2021 +0200 libbpf: Move BPF_SEQ_PRINTF and BPF_SNPRINTF to bpf_helpers.h These macros are convenient wrappers around the bpf_seq_printf and bpf_snprintf helpers. They are currently provided by bpf_tracing.h which targets low level tracing primitives. bpf_helpers.h is a better fit. The __bpf_narg and __bpf_apply are needed in both files and provided twice. __bpf_empty isn't used anywhere and is removed from bpf_tracing.h Reported-by: Andrii Nakryiko Signed-off-by: Florent Revest Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210526164643.2881368-1-revest@chromium.org commit a6e2cd4dd28effab117ddce7a62c5a411b282d2e Author: Michael Walle Date: Wed May 5 22:00:17 2021 +0200 mtd: spi-nor: otp: fix kerneldoc typos Use the correct argument names in the kerneldoc. Fixes: cad3193fe9d1 ("mtd: spi-nor: implement OTP support for Winbond and similar flashes") Reported-by: Pratyush Yadav Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Pratyush Yadav commit ccfb7cf18f9680958e76991c8f15562ff42f4bc9 Author: Pratyush Yadav Date: Tue May 11 15:09:58 2021 +0530 mtd: spi-nor: Add documentation for spi_nor_soft_reset() Document what the function does and that it should only be used when it is known that the device supports it. This will avoid unaware programmers thinking that they can arbitrarily use it to reset the device. Suggested-by: Michael Walle Signed-off-by: Pratyush Yadav Signed-off-by: Vignesh Raghavendra Reviewed-by: Michael Walle commit 5c26d52c9e5c9a22d04b805470e1143716b69789 Author: Andy Shevchenko Date: Mon May 10 17:13:43 2021 +0300 mtd: spi-nor: nxp-spifi: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Signed-off-by: Vignesh Raghavendra Reviewed-by: Michael Walle commit 57ad4fe0859ec6dd15776cae6ee8a139492334fd Merge: c4681547bcce7 3fdc0cb59d97f Author: Will Deacon Date: Wed May 26 17:14:43 2021 +0100 Merge branch 'for-next/ffa' into for-next/smccc Merge in SMCCC update from Sudeep, which is a branch shared with arm-soc for the FF-A driver work. * for-next/ffa: arm64: smccc: Add support for SMCCCv1.2 extended input/output registers commit 3fdc0cb59d97f87e2cc708d424f1538e31744286 Author: Sudeep Holla Date: Tue May 18 17:36:18 2021 +0100 arm64: smccc: Add support for SMCCCv1.2 extended input/output registers SMCCC v1.2 allows x8-x17 to be used as parameter registers and x4—x17 to be used as result registers in SMC64/HVC64. Arm Firmware Framework for Armv8-A specification makes use of x0-x7 as parameter and result registers. There are other users like Hyper-V who intend to use beyond x0-x7 as well. Current SMCCC interface in the kernel just use x0-x7 as parameter and x0-x3 as result registers as required by SMCCCv1.0. Let us add new interface to support this extended set of input/output registers namely x0-x17 as both parameter and result registers. Acked-by: Mark Rutland Tested-by: Michael Kelley Reviewed-by: Michael Kelley Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Sudeep Holla Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210518163618.43950-1-sudeep.holla@arm.com Signed-off-by: Will Deacon commit 205523bc06ceceac2a22a28a4f27b2737e318c92 Author: Jesse Brandeburg Date: Thu Mar 25 17:38:34 2021 -0700 ixgbe: reduce checker warnings Fix the sparse warnings in the ixgbe crypto offload code. These changes were made in the most conservative way (force cast) in order to hopefully not break the code. I suspect that the code might still be broken on big-endian architectures, but no one is complaining, so I'm just leaving it functionally the same. Signed-off-by: Jesse Brandeburg Cc: Shannon Nelson Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit b16dc6c2f1786157a93c7ab560f8da1e69b69256 Author: Jesse Brandeburg Date: Thu Mar 25 17:38:33 2021 -0700 ixgbe: use checker safe conversions The ixgbe hardware needs some very specific programming for certain registers, which led to some misguided usage of ntohs instead of using be16_to_cpu(), as well as a home grown swap followed by an ntohs. Sparse didn't like this at all, and this fixes the C=2 build, with code that uses native kernel interface. Signed-off-by: Jesse Brandeburg Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit b6ce4a1c4ba4fd6fd27fe8d917b3d062ff4ebbdd Author: Jesse Brandeburg Date: Thu Mar 25 17:38:32 2021 -0700 igbvf: convert to strongly typed descriptors The igbvf driver for some reason never strongly typed it's descriptor formats. Make this driver like the rest of the Intel drivers and use __le* for our little endian descriptors. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit de8447131d2b1923a91c4c30bf094422dfcc16bf Author: Jesse Brandeburg Date: Thu Mar 25 17:38:31 2021 -0700 intel: call csum functions with well formatted arguments The sparse build (C=2) found that there were two drivers who had not been convered to call the csum_replace_by_diff() function with sparse clean arguments. Most if not all drivers force the cast like this patch does. So these drivers are now joining the party (a bit late), but with no functional change. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit 9fb8602e565d71e0747ad149690d536d20a70b58 Author: Jesse Brandeburg Date: Thu Mar 25 17:38:30 2021 -0700 igb: override two checker warnings The igb PTP code was using htons() on a constant to try to byte swap the value before writing it to a register. This byte swap has the consequence of triggering sparse conflicts between the register write which expect cpu ordered input, and the code which generated a big endian constant. Just override the cast to make sure code doesn't change but silence the warning. Can't do a __swab16 in this case because big endian systems would then write the wrong value. Signed-off-by: Jesse Brandeburg Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit b514958dd1a3bd57638b0e63b8e5152b1960e6aa Author: Jesse Brandeburg Date: Thu Mar 25 17:38:29 2021 -0700 igb: fix assignment on big endian machines The igb driver was trying hard to be sparse correct, but somehow ended up converting a variable into little endian order and then tries to OR something with it. A much plainer way of doing things is to leave all variables and OR operations in CPU (non-endian) mode, and then convert to little endian only once, which is what this change does. This probably fixes a bug that might have been seen only on big endian systems. Signed-off-by: Jesse Brandeburg Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit c7cbfb028b95360403d579c47aaaeef1ff140964 Author: Jesse Brandeburg Date: Thu Mar 25 17:38:28 2021 -0700 igb: handle vlan types with checker enabled The sparse build (C=2) finds some issues with how the driver dealt with the (very difficult) hardware that in some generations uses little-endian, and in others uses big endian, for the VLAN field. The code as written picks __le16 as a type and for some hardware revisions we override it to __be16 as done in this patch. This impacted the VF driver as well so fix it there too. Also change the vlan_tci assignment to override the sparse warning without changing functionality. Signed-off-by: Jesse Brandeburg Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 88c228b22e001cce1d36112b883bd320c0893ef8 Author: Jesse Brandeburg Date: Thu Mar 25 17:38:27 2021 -0700 igb/igc: use strongly typed pointer The igb and igc driver both use a trick of creating a local type pointer on the stack to ease dealing with a receive descriptor in 64 bit chunks for printing. Sparse however was not taken into account and receive descriptors are always in little endian order, so just make the unions use __le64 instead of u64. No functional change. Signed-off-by: Jesse Brandeburg Tested-by: Dvora Fuxbrumer Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 0a5d8a9d226fe5ef54b08a8c5f42add49d78484e Author: Jesse Brandeburg Date: Thu Mar 25 17:38:26 2021 -0700 fm10k: move error check The error check and set_bit are placed in such a way that sparse (C=2) warns: .../fm10k_pci.c:1395:9: warning: context imbalance in 'fm10k_msix_mbx_pf' - different lock contexts for basic block Which seems a little odd, but the code can obviously be moved to where the variable is being set without changing functionality at all, and it even seems to make a bit more sense with the check closer to the set. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit c40591cc3d48194faa80bda652d86a1ed8e221be Author: Jesse Brandeburg Date: Thu Mar 25 17:38:25 2021 -0700 intel: remove checker warning The sparse checker (C=2) found an assignment where we were mixing types when trying to convert from data read directly from the device NVM, to an array in CPU order in-memory, which unfortunately the driver tries to do in-place. This is easily solved by using the swap operation instead of an assignment, and is already proven in other Intel drivers to be functionally correct and the same code, just without a sparse warning. The change is the same in all three drivers. Signed-off-by: Jesse Brandeburg Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit d4ef55288aa2e1b76033717242728ac98ddc4721 Author: Jesse Brandeburg Date: Thu Mar 25 17:38:24 2021 -0700 e100: handle eeprom as little endian Sparse tool was warning on some implicit conversions from little endian data read from the EEPROM on the e100 cards. Fix these by being explicit about the conversions using le16_to_cpu(). Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit 994a4c3e226a40fb6404ca9999e20d1e43096470 Author: Ville Syrjälä Date: Tue May 11 19:05:32 2021 +0300 drm/i915: Drop redundant has_hdmi_sink check intel_hdmi_bpc_possible() will check has_hdmi_sink for us, so no need to check it in intel_hdmi_mode_clock_valid() anymore. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-7-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit cc3bd64d7cc3fc617916e355dd9169f62e66a089 Author: Ville Syrjälä Date: Tue May 11 19:05:31 2021 +0300 drm/i915: Move the TMDS clock division into intel_hdmi_mode_clock_valid() Now that we have to tell intel_hdmi_mode_clock_valid() whether we're asking about 4:4:4 or 4:2:0 output it can take care of the dotclock->TMDS clock conversion. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-6-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit d21d7a9d1020ec36bf8622b47ac43c8e64cb33f6 Author: Ville Syrjälä Date: Tue May 11 19:05:30 2021 +0300 drm/i915: Check sink deep color capabilitis during HDMI .mode_valid() Currently HDMI .mode_valid() only checks whether the source can do deep color. Let's check whether the sink can do it as well. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-5-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 41828125acd649a2a54393b6534cbb5c1bd7bfa6 Author: Ville Syrjälä Date: Tue May 11 19:05:29 2021 +0300 drm/i915: Move platform checks into intel_hdmi_bpc_possible() Let's put the platform checks into intel_hdmi_bpc_possible() so that it'll confirm both the source and sink capabilities. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit f02e6c859514c86ccb53846042e84e04373f7ac7 Author: Ville Syrjälä Date: Tue May 11 19:05:28 2021 +0300 drm/i915: Move has_hdmi_sink check into intel_hdmi_bpc_possible() We wish intel_hdmi_bpc_possible() to consider whether the sink supports HDMI or just DVI when checking whether it'll support HDMI deep color or not. This also takes care of the "force DVI" property. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 06e0df24fcf1a4be96d5b497036c0bb8ae216542 Author: Ville Syrjälä Date: Tue May 11 19:05:27 2021 +0300 drm/i915: Extract intel_hdmi_bpc_possible() Extract intel_hdmi_bpc_possible() from intel_hdmi_deep_color_possible() so that we can reuse it for mode validation. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210511160532.21446-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 7d3848c03e09ea9cdfde8bb2b82282d252943ee6 Author: Colin Ian King Date: Wed May 26 09:53:39 2021 +0100 fs: dlm: Fix spelling mistake "stucked" -> "stuck" There are spelling mistake in log messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: David Teigland commit f6089981d07e6e1cc053f4c239e458eed122c092 Author: Colin Ian King Date: Wed May 26 15:46:05 2021 +0100 fs: dlm: Fix memory leak of object mh There is an error return path that is not kfree'ing mh after it has been successfully allocates. Fix this by moving the call to create_rcom to after the check on rc_in->rc_id check to avoid this. Thanks to Alexander Ahring Oder Aring for suggesting the correct way to fix this. Addresses-Coverity: ("Resource leak") Fixes: a070a91cf140 ("fs: dlm: add more midcomms hooks") Signed-off-by: Colin Ian King Signed-off-by: David Teigland commit 8eca89a108338e00831371da017826903c472b81 Author: Andrey Grodzovsky Date: Tue May 25 14:44:31 2021 -0400 drm/amdgpu: Fix clang warning: unused label 'exit' Problem: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:332:1: warning: unused label 'exit' [-Wunused-label] exit: ^~~~~ Fix: Put #ifdef CONFIG_64BIT around exit Reported-by: kernel test robot Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210525184431.1170373-1-andrey.grodzovsky@amd.com commit c374839f9b4475173e536d1eaddff45cb481dbdf Author: Jaime Liao Date: Thu May 20 09:45:08 2021 +0800 mtd: spinand: macronix: Add support for serial NAND flash Macronix NAND Flash devices are available in different configurations and densities. MX"35" means SPI NAND MX35"LF"/"UF" , LF means 3V and UF meands 1.8V MX35LF"2G" , 2G means 2Gbits MX35LF2G"E4"/"24"/"14", E4 means internal ECC and Quad I/O(x4) 24 means 8-bit ecc requirement and Quad I/O(x4) 14 means 4-bit ecc requirement and Quad I/O(x4) MX35LF2G14AC is 3V 2Gbit serial NAND flash device (without on-die ECC) https://www.mxic.com.tw/Lists/Datasheet/Attachments/7926/MX35LF2G14AC,%203V,%202Gb,%20v1.1.pdf MX35UF4G24AD is 1.8V 4Gbit serial NAND flash device (without on-die ECC) https://www.mxic.com.tw/Lists/Datasheet/Attachments/7980/MX35UF4G24AD,%201.8V,%204Gb,%20v0.00.pdf MX35UF4GE4AD/MX35UF2GE4AD are 1.8V 4G/2Gbit serial NAND flash device with 8-bit on-die ECC https://www.mxic.com.tw/Lists/Datasheet/Attachments/7983/MX35UF4GE4AD,%201.8V,%204Gb,%20v0.00.pdf MX35UF2GE4AC/MX35UF1GE4AC are 1.8V 2G/1Gbit serial NAND flash device with 8-bit on-die ECC https://www.mxic.com.tw/Lists/Datasheet/Attachments/7974/MX35UF2GE4AC,%201.8V,%202Gb,%20v1.0.pdf MX35UF2G14AC/MX35UF1G14AC are 1.8V 2G/1Gbit serial NAND flash device (without on-die ECC) https://www.mxic.com.tw/Lists/Datasheet/Attachments/7931/MX35UF2G14AC,%201.8V,%202Gb,%20v1.1.pdf Validated via normal(default) and QUAD mode by read, erase, read back, on Xilinx Zynq PicoZed FPGA board which included Macronix SPI Host(drivers/spi/spi-mxic.c). Signed-off-by: Jaime Liao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1621475108-22523-1-git-send-email-jaimeliao@mxic.com.tw commit 902f332e461ae53e04c53bde12be790bf4097240 Author: Zhen Lei Date: Mon May 10 19:49:44 2021 +0800 mtd: rawnand: qcom: Delete an unneeded bool conversion The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210510114944.3527-1-thunder.leizhen@huawei.com commit acbd3d0945f9cca4622f45e477793c5922bd6605 Author: Miquel Raynal Date: Wed May 26 11:32:42 2021 +0200 mtd: rawnand: arasan: Leverage additional GPIO CS Make use of the cs-gpios DT property as well as the core helper to parse it so that the Arasan controller driver can now assert many more chips than natively. The Arasan controller has an internal limitation: RB0 is tied to CS0 and RB1 is tied to CS1. Hence, it is possible to use external GPIOs as long as one or the other native CS is not used (or configured to be driven as a GPIO) and that all additional CS are physically wired on its corresponding RB line. Eg. CS0 is used as a native CS, CS1 is not used as native CS and may be used as a GPIO CS, CS2 is an additional GPIO CS. Then the target asserted by CS0 should also be wired to RB0, while the targets asserted by CS1 and CS2 should be wired to RB1. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210526093242.183847-5-miquel.raynal@bootlin.com commit b5437c7b682c9a505065b4ab4716cdc951dc3c7c Author: Miquel Raynal Date: Wed May 26 11:32:41 2021 +0200 mtd: rawnand: arasan: Ensure proper configuration for the asserted target The controller being always asserting one CS or the other, there is no need to actually select the right target before doing a page read/write. However, the anfc_select_target() helper actually also changes the timing configuration and clock in the case were two different NAND chips with different timing requirements would be used. In this situation, we must ensure proper configuration of the controller by calling it. As a consequence of this change, the anfc_select_target() helper is being moved earlier in the driver. Fixes: 88ffef1b65cf ("mtd: rawnand: arasan: Support the hardware BCH ECC engine") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210526093242.183847-4-miquel.raynal@bootlin.com commit b85c943d181ac58e3a34a5f79c73d421f4da7b00 Author: Miquel Raynal Date: Wed May 26 11:32:40 2021 +0200 mtd: rawnand: Add a helper to parse the gpio-cs DT property New chips may feature a lot of CS because of their extended length. As many controllers have been designed a decade ago, they usually only feature just a couple. This does not mean that the entire range of these chips cannot be accessed: it is just a matter of adding more GPIO CS in the hardware design. A DT property has been added to describe the CS array: cs-gpios. Here is the code parsing it this new property, allocating what needs to be, requesting the GPIOs and returning an array with the additional available CS. The first entries of this array are left empty and are reserved for native CS. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210526093242.183847-3-miquel.raynal@bootlin.com commit 10e96f8b4e7521197a50b370ce0923ab6a8d0ca0 Author: Miquel Raynal Date: Wed May 26 11:32:39 2021 +0200 mtd: rawnand: Move struct gpio_desc declaration to the top The struct gpio_desc is declared in the middle of the rawnand.h header, right before the first function using it (nand_gpio_waitrdy). Before adding a new function and to make it clear: move the declaration to the top of the file. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210526093242.183847-2-miquel.raynal@bootlin.com commit 92f378f19e947eeffc52c427cd734f7b19eb54c4 Author: Masahiro Yamada Date: Wed May 12 16:57:29 2021 +0900 sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild Use obj-y to clean up Makefile. Signed-off-by: Masahiro Yamada commit 3681c854c22eed45e63c164252e5f7e1abeadfb2 Author: Masahiro Yamada Date: Wed May 12 16:57:28 2021 +0900 hexagon: move core-y in arch/hexagon/Makefile to arch/hexagon/Kbuild Use obj-y to clean up Makefile. Signed-off-by: Masahiro Yamada commit 0957878f710e87d6ef2aba01a49d8be659c3ce3d Author: Masahiro Yamada Date: Wed May 12 16:57:27 2021 +0900 h8300: move core-y in arch/h8300/Makefile to arch/h8300/Kbuild Use obj-y to clean up Makefile. Signed-off-by: Masahiro Yamada commit 5519f498d59528dd43f4a3f65d638c1c080aa80b Author: Masahiro Yamada Date: Wed May 12 16:57:26 2021 +0900 alpha: move core-y in arch/alpha/Makefile to arch/alpha/Kbuild Use obj-y to clean up Makefile. Signed-off-by: Masahiro Yamada commit d92cc4d5164398cc6d191084b46e622976c0ba89 Author: Masahiro Yamada Date: Wed May 12 16:57:25 2021 +0900 kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild arch/$(SRCARCH)/Kbuild is useful for Makefile cleanups because you can use the obj-y syntax. Add an empty file if it is missing in arch/$(SRCARCH)/. Signed-off-by: Masahiro Yamada commit 8939a8489ca64b56f49428b0d882709080a928d4 Author: Chao Yu Date: Wed May 12 10:07:19 2021 +0800 f2fs: atgc: export entries for better tunability via sysfs This patch export below sysfs entries for better ATGC tunability. /sys/fs/f2fs//atgc_candidate_ratio /sys/fs/f2fs//atgc_candidate_count /sys/fs/f2fs//atgc_age_weight /sys/fs/f2fs//atgc_age_threshold Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4a67d9b07ac8dce7f1034e0d887f2f4ee00fe118 Author: Chao Yu Date: Tue May 18 17:54:58 2021 +0800 f2fs: compress: fix to disallow temp extension This patch restricts to configure compress extension as format of: [filename + '.' + extension] rather than: [filename + '.' + extension + (optional: '.' + temp extension)] in order to avoid to enable compression incorrectly: 1. compress_extension=so 2. touch file.soa 3. touch file.so.tmp Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e3c548323d32b11d3fba71f993e17b0ccdeca5cb Author: Jaegeuk Kim Date: Tue May 25 11:10:53 2021 -0700 f2fs: let's allow compression for mmap files This patch allows to compress mmap files. E.g., for so files. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0dd571785d61528d62cdd8aa49d76bc6085152fe Author: Chao Yu Date: Tue May 18 09:57:54 2021 +0800 f2fs: add MODULE_SOFTDEP to ensure crc32 is included in the initramfs As marcosfrm reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213089 Initramfs generators rely on "pre" softdeps (and "depends") to include additional required modules. F2FS does not declare "pre: crc32" softdep. Then every generator (dracut, mkinitcpio...) has to maintain a hardcoded list for this purpose. Hence let's use MODULE_SOFTDEP("pre: crc32") in f2fs code. Fixes: 43b6573bac95 ("f2fs: use cryptoapi crc32 functions") Reported-by: marcosfrm Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4f55dc2a988b304d3595887f1161151d1c3b1f33 Author: Tom Rix Date: Sat May 15 11:09:41 2021 -0700 f2fs: return success if there is no work to do Static analysis reports this problem file.c:3206:2: warning: Undefined or garbage value returned to caller return err; ^~~~~~~~~~ err is only set if there is some work to do. Because the loop returns immediately on an error, if all the work was done, a 0 would be returned. Instead of checking the unlikely case that there was no work to do, change the return of err to 0. Signed-off-by: Tom Rix Signed-off-by: Jaegeuk Kim commit 2fdb6a5ef6225a69dd16c13de416d9b7224cbc96 Author: Gwan-gyeong Mun Date: Tue May 25 17:06:56 2021 -0700 drm/i915/display: Remove a redundant function argument from intel_psr_enable_source() It removes intel_crtc_state from function argument of intel_psr_enable_source() in order to use intel_psr_enable_source() without intel_crtc_state on other psr internal functions. And we can get cpu_trancoder from intel_psr, therefore we don't need to pass intel_crtc_state to this function. Cc: José Roberto de Souza Signed-off-by: Gwan-gyeong Mun Signed-off-by: Matt Roper Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210526000656.3060314-4-matthew.d.roper@intel.com commit bb265dbdf38d247064293de03996d7bcab40a68e Author: Manasi Navare Date: Tue May 25 17:06:55 2021 -0700 drm/i915/xelpd: Add VRR guardband for VRR CTL On XE_LPD, VRR CTL register adds a new VRR Guardband bitfield replacing the pipeline full and deprecating the pipeline override bit. This patch adds this corresponding bitfield in the register defs, crtc state vrr structure and populates this in vrr compute config and vrr enable functions. It also adds the corresponding HW state readout for this field. Bspec: 50508 Cc: Aditya Swarup Cc: Ville Syrjala Signed-off-by: Manasi Navare Signed-off-by: Matt Roper Reviewed-by: Aditya Swarup Link: https://patchwork.freedesktop.org/patch/msgid/20210526000656.3060314-3-matthew.d.roper@intel.com commit 8bcc0840cf7ccf40db5e03cafe11c1cb28a0a73c Author: Matt Roper Date: Tue May 25 17:06:54 2021 -0700 drm/i915/xelpd: Enhanced pipe underrun reporting XE_LPD brings enhanced underrun recovery: the hardware can somewhat mitigate underruns by using an interpolated replacement pixel (soft underrun) or the previous pixel (hard underrun). Furthermore, underruns can now be caused downstream by the port, even if the pipe itself is operating properly. The interrupt register and PIPE_STATUS register give us extra bits to recognize hard/soft underruns and determine whether the underrun was caused by the port, so we'll use that information to print some more descriptive errors when underruns occur. v2: - Keep ICL's PIPE_STATUS defined separately from the old GMCH pipe status register. (Ville) - Only read/clear the PIPE_STATUS register on platforms with display ver >= 11. (Lucas) v3: - Actually enable+unmask all the new underrun interrupts, clear stale bits out from PIPE_STATUS before enabling the interrupts, report all FIFO underruns errors at once, rename a bunch of stuff to unconfuse vs. PIPESTAT. (Ville) Bspec: 50335 Bspec: 50366 Cc: Lucas De Marchi Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20210526000656.3060314-2-matthew.d.roper@intel.com commit abfe041de01f16d74df522d92cf5e3f6523971dd Merge: 7bc188cc2c8c7 9a91e5e0af5e0 Author: Rodrigo Vivi Date: Wed May 26 09:40:54 2021 -0400 Merge drm/drm-next into drm-intel-next Getting in sync with -rc2 Signed-off-by: Rodrigo Vivi commit 7bc188cc2c8c7b21bfa0782f0d22bbf245ce1f63 Author: Jani Nikula Date: Wed May 26 11:29:03 2021 +0300 drm/i915/adl_p: enable MSO on pipe B On ADL-P, it's possible to enable the stream splitter on pipe B in addition to pipe A. Bspec: 50174 Cc: Uma Shankar Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210526082903.26395-1-jani.nikula@intel.com commit aa85beeace6eb8c3459c3191a49e3fe9dd687e8c Author: Shaokun Zhang Date: Tue May 25 15:29:53 2021 +0800 drm/i915: Remove the repeated declaration Function 'intel_dbuf_init' is declared twice, remove the repeated declaration. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Shaokun Zhang Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1621927793-44545-1-git-send-email-zhangshaokun@hisilicon.com commit 2c0f0f3639562d6e38ee9705303c6457c4936eac Author: Jon Mediero Date: Thu May 20 14:23:26 2021 +0200 module: correctly exit module_kallsyms_on_each_symbol when fn() != 0 Commit 013c1667cf78 ("kallsyms: refactor {,module_}kallsyms_on_each_symbol") replaced the return inside the nested loop with a break, changing the semantics of the function: the break only exits the innermost loop, so the code continues iterating the symbols of the next module instead of exiting. Fixes: 013c1667cf78 ("kallsyms: refactor {,module_}kallsyms_on_each_symbol") Reviewed-by: Petr Mladek Reviewed-by: Miroslav Benes Signed-off-by: Jon Mediero Signed-off-by: Jessica Yu commit f7fc0d1c915a74ff24acafec31651712f194c19f Author: Namhyung Kim Date: Mon May 24 15:50:51 2021 -0700 perf inject: Do not inject BUILD_ID record if MMAP2 has it When PERF_RECORD_MISC_MMAP_BUILD_ID is set, the event has a build-id of the DSO already so no need to add it again. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210524225051.1190486-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0c3f7b38d72b924741e1f29a38f89bf91158f5b8 Author: Namhyung Kim Date: Mon May 24 15:50:50 2021 -0700 perf inject: Call dso__put() even if dso->hit is set Otherwise it'll leak the refcount for the DSO. As dso__put() can handle a NULL dso pointer, we can just call it unconditionally. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210524225051.1190486-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bc3aca5393c4d61d7f5ab1dd61b7f2b0536efec6 Author: Grygorii Strashko Date: Tue May 25 20:58:58 2021 +0300 dt-bindings: gpio: omap: Convert to json-schema Convert the OMAP GPIO Device Tree binding documentation to json-schema. The GPIO hogs node names defined to end with a 'hog' suffix. Signed-off-by: Grygorii Strashko Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit bccf1ec369ac126b0997d01a6e1deae00e2cf6b3 Author: Mark Rutland Date: Tue May 25 15:02:32 2021 +0100 locking/atomics: atomic-instrumented: simplify ifdeffery Now that all architectures implement ARCH_ATOMIC, the fallbacks are generated before the instrumented wrappers are generated. Due to this, in atomic-instrumented.h we can assume that the whole set of atomic functions has been generated. Likewise, atomic-instrumented.h doesn't need to provide a preprocessor definition for every atomic it wraps. This patch removes the redundant ifdeffery. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-34-mark.rutland@arm.com commit 3c1885187bc1faa0a1c52f7bd34550740a208169 Author: Mark Rutland Date: Tue May 25 15:02:31 2021 +0100 locking/atomic: delete !ARCH_ATOMIC remnants Now that all architectures implement ARCH_ATOMIC, we can make it mandatory, removing the Kconfig symbol and logic for !ARCH_ATOMIC. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Geert Uytterhoeven Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-33-mark.rutland@arm.com commit b9b12978a8e9a4bb77746e74eae37e587f7f8994 Author: Mark Rutland Date: Tue May 25 15:02:30 2021 +0100 locking/atomic: xtensa: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates xtensa to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Acked-by: Max Filippov Cc: Boqun Feng Cc: Chris Zankel Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-32-mark.rutland@arm.com commit ff5b4f1ed580c59d1f26ddddc6b2622347571cec Author: Mark Rutland Date: Tue May 25 15:02:29 2021 +0100 locking/atomic: sparc: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates sparc to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: "David S. Miller" Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-31-mark.rutland@arm.com commit 8c6417551309fe3654b5f761214303aef361d3e8 Author: Mark Rutland Date: Tue May 25 15:02:28 2021 +0100 locking/atomic: sh: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates sh to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Rich Felker Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-30-mark.rutland@arm.com commit 9efbb355831014ca004d241db8ede182c019b9bf Author: Mark Rutland Date: Tue May 25 15:02:27 2021 +0100 locking/atomic: riscv: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates riscv to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Cc: Albert Ou Cc: Boqun Feng Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-29-mark.rutland@arm.com commit 9eaa82935dccb74a22e3da5045bed1dac59ad2b0 Author: Mark Rutland Date: Tue May 25 15:02:26 2021 +0100 locking/atomic: powerpc: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates powerpc to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. While atomic_try_cmpxchg_lock() is not part of the common atomic API, it is given an `arch_` prefix for consistency. Signed-off-by: Mark Rutland Cc: Benjamin Herrenschmidt Cc: Boqun Feng Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-28-mark.rutland@arm.com commit 329c161b8baeff5fff69fe37d3ebb4bcffef91fa Author: Mark Rutland Date: Tue May 25 15:02:25 2021 +0100 locking/atomic: parisc: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates parisc to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: "James E.J. Bottomley" Cc: Boqun Feng Cc: Helge Deller Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-27-mark.rutland@arm.com commit 3f1e931d158124bbdd5c25300333096bfff805db Author: Mark Rutland Date: Tue May 25 15:02:24 2021 +0100 locking/atomic: openrisc: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates openrisc to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Acked-by: Stafford Horne Cc: Boqun Feng Cc: Jonas Bonn Cc: Peter Zijlstra Cc: Stefan Kristiansson Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-26-mark.rutland@arm.com commit 7e517b4c11200be3b0a941b33b26798a5e808dbc Author: Mark Rutland Date: Tue May 25 15:02:23 2021 +0100 locking/atomic: nios2: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates nios2 to ARCH_ATOMIC, using the asm-generic implementations. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Ley Foon Tan Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-25-mark.rutland@arm.com commit 0cc70f54ee4394b49608f0aaee50c2b4109c3be6 Author: Mark Rutland Date: Tue May 25 15:02:22 2021 +0100 locking/atomic: nds32: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates nds32 to ARCH_ATOMIC, using the asm-generic implementations. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Greentime Hu Cc: Nick Hu Cc: Peter Zijlstra Cc: Vincent Chen Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-24-mark.rutland@arm.com commit c7b5fd6faa1dc6cdc721a978d9d122cd31bbd7b1 Author: Mark Rutland Date: Tue May 25 15:02:21 2021 +0100 locking/atomic: mips: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates mips to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Thomas Bogendoerfer Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-23-mark.rutland@arm.com commit f5b1c0f951e7b0d5634b82d57971cae25a0ba435 Author: Mark Rutland Date: Tue May 25 15:02:20 2021 +0100 locking/atomic: microblaze: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates microblaze to ARCH_ATOMIC, using the asm-generic implementations. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Michal Simek Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-22-mark.rutland@arm.com commit e86e793c28e76ab5a0288c468713ab513b79fdd0 Author: Mark Rutland Date: Tue May 25 15:02:19 2021 +0100 locking/atomic: m68k: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates m68k to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. While atomic_dec_and_test_lt() is not part of the common atomic API, it is also given an `arch_` prefix for consistency. Signed-off-by: Mark Rutland Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Acked-by: Greg Ungerer Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-21-mark.rutland@arm.com commit f84f1b9c47a55eb8db4ba5270a504f78c316ce1d Author: Mark Rutland Date: Tue May 25 15:02:18 2021 +0100 locking/atomic: ia64: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates ia64 to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-20-mark.rutland@arm.com commit 94b63eb6e131a7fe94f1c1eb8e10162931506176 Author: Mark Rutland Date: Tue May 25 15:02:17 2021 +0100 locking/atomic: hexagon: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates hexagon to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Brian Cain Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-19-mark.rutland@arm.com commit c879c39ebc3a9bea280675840d623a40b4636c80 Author: Mark Rutland Date: Tue May 25 15:02:16 2021 +0100 locking/atomic: h8300: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates h8300 to ARCH_ATOMIC, using the asm-generic implementations. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-18-mark.rutland@arm.com commit a5fb82d7e2695e667badeac202fb7d113a8ae9a9 Author: Mark Rutland Date: Tue May 25 15:02:15 2021 +0100 locking/atomic: csky: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates csky to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Acked-by: Guo Ren Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-17-mark.rutland@arm.com commit fc63a6e08a8c97a3dc3a6f2e1946b949b9a6c2d3 Author: Mark Rutland Date: Tue May 25 15:02:14 2021 +0100 locking/atomic: arm: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates alpha to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Russell King Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-16-mark.rutland@arm.com commit 6db5d99304dce6d3b9b1251b788f0ff6aaf1c054 Author: Mark Rutland Date: Tue May 25 15:02:13 2021 +0100 locking/atomic: arc: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates alpha to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Signed-off-by: Mark Rutland Acked-by: Vineet Gupta Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-15-mark.rutland@arm.com commit 96d330aff7060f0882a5440ddb281cc3ab232d96 Author: Mark Rutland Date: Tue May 25 15:02:12 2021 +0100 locking/atomic: alpha: move to ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as once all architectures are converted it will be possible to make significant cleanups to the atomics headers, and this will make it much easier to generically enable atomic functionality (e.g. debug logic in the instrumented wrappers). As a step towards that, this patch migrates alpha to ARCH_ATOMIC. The arch code provides arch_{atomic,atomic64,xchg,cmpxchg}*(), and common code wraps these with optional instrumentation to provide the regular functions. Note: xchg_local() is NOT currently part of the generic atomic arch_atomic API, and is not instrumented. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Peter Zijlstra Cc: Richard Henderson Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-14-mark.rutland@arm.com commit 82b993e8249ae3cb29c1b6eb8f6548f5748508b7 Author: Mark Rutland Date: Tue May 25 15:02:11 2021 +0100 locking/atomic: cmpxchg: support ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as this will enable functionality, and once all architectures are converted it will be possible to make significant cleanups to the atomic headers. A number of architectures use asm-generic/cmpxchg.h or asm-generic/cmpxhg-local.h, and it's impractical to convert the headers and all these architectures in one go. To make it possible to convert them one-by-one, let's make the asm-generic implementation function as either cmpxchg*() or arch_cmpxchg*() depending on whether ARCH_ATOMIC is selected. To do this, the generic implementations are prefixed as generic_cmpxchg_*(), and preprocessor definitions map cmpxchg_*()/arch_cmpxchg_*() onto these as appropriate. Once all users are moved over to ARCH_ATOMIC the ifdeffery in the header can be simplified and/or removed entirely. For existing users (none of which select ARCH_ATOMIC), there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-13-mark.rutland@arm.com commit 6988631bdfddcedc1d27f83723ea36a442f00ea1 Author: Mark Rutland Date: Tue May 25 15:02:10 2021 +0100 locking/atomic: cmpxchg: make `generic` a prefix The asm-generic implementations of cmpxchg_local() and cmpxchg64_local() use a `_generic` suffix to distinguish themselves from arch code or wrappers used elsewhere. Subsequent patches will add ARCH_ATOMIC support to these implementations, and will distinguish more functions with a `generic` portion. To align with how ARCH_ATOMIC uses an `arch_` prefix, it would be helpful to use a `generic_` prefix rather than a `_generic` suffix. In preparation for this, this patch renames the existing functions to make `generic` a prefix rather than a suffix. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-12-mark.rutland@arm.com commit 1bdadf46eff6804ace5fa46b6856da4799f12b5c Author: Mark Rutland Date: Tue May 25 15:02:09 2021 +0100 locking/atomic: atomic64: support ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as this will enable functionality, and once all architectures are converted it will be possible to make significant cleanups to the atomic headers. A number of architectures use asm-generic/atomic64.h, and it's impractical to convert the header and all these architectures in one go. To make it possible to convert them one-by-one, let's make the asm-generic implementation function as either atomic64_*() or arch_atomic64_*() depending on whether ARCH_ATOMIC is selected. To do this, the generic implementations are prefixed as generic_atomic64_*(), and preprocessor definitions map atomic64_*()/arch_atomic64_*() onto these as appropriate. Once all users are moved over to ARCH_ATOMIC the ifdeffery in the header can be simplified and/or removed entirely. For existing users (none of which select ARCH_ATOMIC), there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-11-mark.rutland@arm.com commit f8b6455a9d381fc513efbec0be0c312b96e6eb6b Author: Mark Rutland Date: Tue May 25 15:02:08 2021 +0100 locking/atomic: atomic: support ARCH_ATOMIC We'd like all architectures to convert to ARCH_ATOMIC, as this will enable functionality, and once all architectures are converted it will be possible to make significant cleanups to the atomic headers. A number of architectures use asm-generic/atomic.h, and it's impractical to convert the header and all these architectures in one go. To make it possible to convert them one-by-one, let's make the asm-generic implementation function as either atomic_*() or arch_atomic_*() depending on whether ARCH_ATOMIC is selected. To do this, the C implementations are prefixed as generic_atomic_*(), and preprocessor definitions map atomic_*()/arch_atomic_*() onto these as appropriate. Once all users are moved over to ARCH_ATOMIC the ifdeffery in the header can be simplified and/or removed entirely. For existing users (none of which select ARCH_ATOMIC), there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-10-mark.rutland@arm.com commit d0e03218ca3be48c6f7109e4810d58e7b7dd4135 Author: Mark Rutland Date: Tue May 25 15:02:07 2021 +0100 locking/atomic: atomic: simplify ifdeffery Now that asm-generic/atomic.h is only used by architectures without any architecture-specific atomic definitions, we know that there will be no architecture-specific implementations to override, and can remove the ifdeffery this has previously required, bringing it into line with asm-generic/atomic64.h. At the same time, we can implement atomic_add() and atomic_sub() directly using ATOMIC_OP(), since we know architectures won't provide atomic_add_return() or atomic_sub_return(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-9-mark.rutland@arm.com commit 89eb78d542394a8461164009272ea654357795ad Author: Mark Rutland Date: Tue May 25 15:02:06 2021 +0100 locking/atomic: atomic: remove redundant include Since commit: 560cb12a4080a48b ("locking,arch: Rewrite generic atomic support") ... we conditionally include before defining atomics using locking, and hence do not need to do so unconditionally later in the header. This patch removes the redundant include. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-8-mark.rutland@arm.com commit 2609a195fbd58f77d281c013f10b8dbaffca1637 Author: Mark Rutland Date: Tue May 25 15:02:05 2021 +0100 locking/atomic: atomic: remove stale comments The commentary in asm-generic/atomic.h is stale; let's bring it up-to date: * The block comment at the start of the file mentions this is only usable on UP systems, but is immediately followed by an SMP implementation using cmpxchg. Let's delete the misleading statement. * A comment near the end of the file was originally at the top of the file, but over time rework has shuffled it near the end, and it's long been superceded by the block comment at the top of the file. Let's remove it. * Since asm-generic/atomic.h isn't the canonical documentation for the atomic ops, and since the existing comments are not in kerneldoc format, we don't need to document the semantics of each operation here (and this would be better done in a centralised document). Let's remove these comments. Signed-off-by: Mark Rutland Cc: Arnd Bergmann Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-7-mark.rutland@arm.com commit f0c7bf1b77c65c9a273207d228df27009f09ec0b Author: Mark Rutland Date: Tue May 25 15:02:04 2021 +0100 locking/atomic: openrisc: avoid asm-generic/atomic.h OpenRISC is the only architecture which uses asm-generic/atomic.h and also provides its own implementation of some functions, requiring ifdeferry in the asm-generic header. As OpenRISC provides the vast majority of functions itself, it would be simpler overall if it also provided the few functions it cribs from asm-generic. This patch decouples OpenRISC from asm-generic/atomic.h. Subsequent patches will simplify the asm-generic implementation and remove the now unnecessary ifdeferry. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Acked-by: Stafford Horne Cc: Boqun Feng Cc: Jonas Bonn Cc: Peter Zijlstra Cc: Stefan Kristiansson Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-6-mark.rutland@arm.com commit b68622a86c8f30423c0a09204b1db2b74a06b5f0 Author: Mark Rutland Date: Tue May 25 15:02:03 2021 +0100 locking/atomic: microblaze: use asm-generic exclusively Microblaze provides its own implementation of atomic_dec_if_positive(), but nothing else. For a while now, the conditional inc/dec ops have been optional, and the core code will provide generic implementations using the code templates in scripts/atomic/fallbacks/. For simplicity, and for consistency with the other conditional atomic ops, let's drop the microblaze implementation of atomic_dec_if_positive(), and use the generic implementation. With that, we can also drop the local asm/atomic.h and asm/cmpxchg.h headers, as asm-generic/atomic.h is mandatory-y, and we can pull in asm-generic/cmpxchg.h via generic-y. This matches what nios2 and nds32 do today. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Michal Simek Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-5-mark.rutland@arm.com commit c7178cdecdbef8321f418fac55f3afaca3bb4c96 Author: Mark Rutland Date: Tue May 25 15:02:02 2021 +0100 locking/atomic: h8300: use asm-generic exclusively As h8300's implementation of the atomics isn't using any arch-specific functionality, and its implementation of cmpxchg only uses assembly to non-atomically swap two elements in memory, we may as well use the asm-generic atomic.h and cmpxchg.h, and avoid the duplicate code. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-4-mark.rutland@arm.com commit 201e2c1bbe659720913ed5272a2c44e6ab646c8a Author: Mark Rutland Date: Tue May 25 15:02:01 2021 +0100 locking/atomic: net: use linux/atomic.h for xchg & cmpxchg As xchg*() and cmpxchg*() may be instrumented by atomic-instrumented.h, it's necessary to include to use these, rather than , which is effectively an arch-internal header. In a couple of places we include , but get away with this as gets pulled in inidrectly by another include. Before we convert more architectures to use atomic-instrumented.h, let's fix these up to use so that we don't make things more fragile. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-3-mark.rutland@arm.com commit 9be85de97786a75f62080de1c0c13656f65cba84 Author: Mark Rutland Date: Tue May 25 15:02:00 2021 +0100 locking/atomic: make ARCH_ATOMIC a Kconfig symbol Subsequent patches will move architectures over to the ARCH_ATOMIC API, after preparing the asm-generic atomic implementations to function with or without ARCH_ATOMIC. As some architectures use the asm-generic implementations exclusively (and don't have a local atomic.h), and to avoid the risk that ARCH_ATOMIC isn't defined in some cases we expect, let's make the ARCH_ATOMIC macro a Kconfig symbol instead, so that we can guarantee it is consistently available where needed. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210525140232.53872-2-mark.rutland@arm.com commit b24412aff37c58286a0aeafc5678fbdc6a527d54 Author: Antoniu Miclaus Date: Wed May 26 11:52:24 2021 +0300 regmap: add support for 7/17 register formating This patch adds support for 7 bits register, 17 bits value type register formating. This is used, for example, by the Analog Devices ADMV1013/ADMV1014. Signed-off-by: Antoniu Miclaus Signed-off-by: Andrei Drimbarean Message-Id: <20210526085223.14896-1-antoniu.miclaus@analog.com> Signed-off-by: Mark Brown commit b15b253c908235bb10bdbc36f7e33ab40758215f Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Mon May 24 23:57:43 2021 +0900 HID: usbmouse: Avoid GFP_ATOMIC when GFP_KERNEL is possible probe in usb don't need to be atomic. So GFP_KERNEL can be used here, instead of GFP_ATOMIC. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Jiri Kosina commit 058efb40641845432c52777443b3372dbc97c032 Author: YueHaibing Date: Mon May 24 19:42:39 2021 +0800 ASoC: cs42l52: use DEVICE_ATTR_WO macro Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Charles Keepax Message-Id: <20210524114239.7960-1-yuehaibing@huawei.com> Signed-off-by: Mark Brown commit 4e7f0ea0e2e73851cd988f7c334c01d131048abf Author: David Rhodes Date: Tue May 25 14:44:39 2021 -0500 ASoC: cs35l3x: Use neutral language in amp drivers Revise variable names and comments in cs35l35 and cs35l36 amp drivers. Signed-off-by: David Rhodes Reviewed-by: Pierre-Louis Bossart Message-Id: <20210525194439.2232908-1-drhodes@opensource.cirrus.com> Signed-off-by: Mark Brown commit 6405941e6884dac80f836acfc7ec52089ea6aa99 Author: YueHaibing Date: Mon May 24 19:40:17 2021 +0800 ASoC: cs43130: Use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Charles Keepax Message-Id: <20210524114017.18672-1-yuehaibing@huawei.com> Signed-off-by: Mark Brown commit d04260393ea0ded33448c1fae944cf86c14da994 Author: YueHaibing Date: Mon May 24 19:47:53 2021 +0800 ASoC: wm8962: Use DEVICE_ATTR_WO macro Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Acked-by: Charles Keepax Message-Id: <20210524114753.39544-1-yuehaibing@huawei.com> Signed-off-by: Mark Brown commit 3ef6253cd0805d281eacbbd6a21e822ef4c3fef5 Author: YueHaibing Date: Mon May 24 19:45:03 2021 +0800 ASoC: cs42l56: use DEVICE_ATTR_WO macro Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Charles Keepax Message-Id: <20210524114503.26460-1-yuehaibing@huawei.com> Signed-off-by: Mark Brown commit 10f3b4d79958d6f9f71588c6fa862159c83fa80f Author: Ansuel Smith Date: Wed May 26 01:09:31 2021 +0200 mtd: parsers: qcom: Fix leaking of partition name Add cleanup function as the name variable for the partition name was allocaed but never freed after the use as the add mtd function duplicate the name and free the pparts struct as the partition name is assumed to be static. The leak was found using kmemleak. Fixes: 803eb124e1a6 ("mtd: parsers: Add Qcom SMEM parser") Signed-off-by: Ansuel Smith Reviewed-by: Bjorn Andersson Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210525230931.30013-1-ansuelsmth@gmail.com commit eb1765c40530ccc8690b9dad88cec6aaa6bfb498 Author: Corentin Labbe Date: Thu May 20 11:48:51 2021 +0000 mtd: partitions: redboot: fix style issues This patch fixes easy checkpatch issues. Signed-off-by: Corentin Labbe Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210520114851.1274609-2-clabbe@baylibre.com commit 237960880960863fb41888763d635b384cffb104 Author: Corentin Labbe Date: Thu May 20 11:48:50 2021 +0000 mtd: partitions: redboot: seek fis-index-block in the right node fis-index-block is seeked in the master node and not in the partitions node. For following binding and current usage, the driver need to check the partitions subnode. Fixes: c0e118c8a1a3 ("mtd: partitions: Add OF support to RedBoot partitions") Signed-off-by: Corentin Labbe Reviewed-by: Linus Walleij Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210520114851.1274609-1-clabbe@baylibre.com commit 5c1ce1fb8a2d434a485175d6ae38aea40ebd5de4 Author: Ding Senjie Date: Fri May 14 20:44:51 2021 +0800 mtd: devices: Remove superfluous "break" Remove superfluous "break", as there is a "return" before it. Signed-off-by: Ding Senjie Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210514124451.20352-1-dingsenjie@163.com commit 6b562738a22cfdbfedaaac7db5f83c11700ebb15 Author: Miquel Raynal Date: Mon May 10 19:18:00 2021 +0200 dt-binding: mtd: nand: Document the cs-gpios property To reach higher capacities, arrays of chips are now pretty common. Unfortunately, most of the controllers have been designed a decade ago and did not all anticipate the need for several chip-selects. The new cs-gpios property allows to workaround this limitation by adding as many GPIO chip-select as needed. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20210510171800.27225-1-miquel.raynal@bootlin.com commit 4edde60314587382e42141df2f41ca968dc20737 Author: Miquel Raynal Date: Wed May 5 23:37:50 2021 +0200 mtd: rawnand: arasan: Support NV-DDR interface Add support for the NV-DDR interface. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-23-miquel.raynal@bootlin.com commit 10938a08fc4055667da7518685fbd8ea7d09de1b Author: Miquel Raynal Date: Wed May 5 23:37:49 2021 +0200 mtd: rawnand: arasan: Workaround a misbehaving prog type with NV-DDR As explained in the comment introduced above the fix, the Arasan controller driver starts an operation when the prog register is being written with a "type" specific to the action to perform. The prog type used until now to perform a CHANGE READ COLUMN with an SDR interface was the PAGE READ type (CMD + ADDR + CMD + DATA). Unfortunately, for an unknown reason (let's call this a silicon bug) any CHANGE READ COLUMN performed this way in NV-DDR mode will fail: the data ready flag will never be triggered, nor will be the transfer complete flag. Forcefully, this leads to a timeout situation which is not easy to handle. Fortunately, it was spotted that sending the same commands through a different prog register "type", CHANGE READ COLUMN ENHANCED, would work all the time (even though this particular command is not supported by the core and is only available in a limited set of devices - we only care about the controller configuration and not the actual command which is sent to the device). So let's use this type instead when a CHANGE READ COLUMN is requested. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-22-miquel.raynal@bootlin.com commit 698ddeb89e01840dec05ffdb538468782e641a56 Author: Miquel Raynal Date: Wed May 5 23:37:48 2021 +0200 mtd: rawnand: arasan: Fix a macro parameter This macro is not yet being used so the compilers never complained about it. Fix the macro before using it. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-21-miquel.raynal@bootlin.com commit b134ed01d95e195d8fd1c2a1388810496860be5b Author: Miquel Raynal Date: Wed May 5 23:37:47 2021 +0200 MAINTAINERS: Add myself as co-maintainer of the Arasan NAND controller driver When I submitted the driver I added Naga as Maintainer and forgot to add myself. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-20-miquel.raynal@bootlin.com commit a9ecc8c814e9600836e00cb592f1cb5378393126 Author: Miquel Raynal Date: Wed May 5 23:37:46 2021 +0200 mtd: rawnand: Choose the best timings, NV-DDR included Now that the necessary peaces to support the NV-DDR interface type have been contributed, let's add the relevant logic to make use of it. In particular, the core does not choose the best SDR timings anymore but calls a more generic helper instead. This helper checks if NV-DDR is supported by trying to find the best NV-DDR supported mode through a logic very close to what is being done for SDR timings. If no NV-DDR mode in common between the NAND controller and the NAND chip is found, the core will fallback to SDR. Side note: theoretically, the data clock speed in NV-DDR mode 0 is slower than in SDR mode 5. In the situation where we would get a working NV-DDR mode 0, we could also try if SDR mode 5 is supported and eventually fallback to it in order to get the fastest possible throughput. However, in the field, it looks like most of the devices supporting NV-DDR avoid implementing the fastest SDR modes (like 4 and 5 EDO modes, which are a bit more complicated to handle than the other SDR modes). So, we will stick to the simplest logic: try NV-DDR otherwise fallback to SDR. If someone else experiences strong differences because of that we may still implement the logic defined above. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-19-miquel.raynal@bootlin.com commit 9d3194bf2aef81c04177ab6bbe50406aa8d550dc Author: Miquel Raynal Date: Wed May 5 23:37:45 2021 +0200 mtd: rawnand: Allow SDR timings to be nacked This should never happen in theory and is probably a controller driver bug. Anyway it's probably better to bail out at this point if this happens rather than continuing the boot process. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-18-miquel.raynal@bootlin.com commit f3fe156ede6db96a060cc98ff1bce1ee6417a68b Author: Miquel Raynal Date: Wed May 5 23:37:44 2021 +0200 mtd: rawnand: Support enabling NV-DDR through SET_FEATURES Until now the parameter of the ADDR_TIMING_MODE feature was just the ONFI timing mode (from 0 to 5) because we were only supporting the SDR data interface. In the same byte, bits 4 and 5 indicate which data interface is being configured so use them to set the right mode and also read them back to ensure the right timing has been setup on the chip's side. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-17-miquel.raynal@bootlin.com commit e32df79f19c756f072bd517ece65df1efd496f95 Author: Miquel Raynal Date: Wed May 5 23:37:43 2021 +0200 mtd: rawnand: Add a helper to find the closest ONFI NV-DDR mode Introduce a similar helper to onfi_find_closest_sdr_mode(), but for NV-DDR timings. It just takes a timing structure as parameter and returns the closest mode by comparing all minimum timings. This is useful for rigid controllers on which tuning the timings is not possible. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-16-miquel.raynal@bootlin.com commit 09cdb237c3c8773921a7c265ce1cdd23818a3f14 Author: Miquel Raynal Date: Wed May 5 23:37:42 2021 +0200 mtd: rawnand: Handle the double bytes in NV-DDR mode As explained in chapter "NV-DDR / NV-DDR2 / NV-DDR3 and Repeat Bytes" of the ONFI specification, with some commands (mainly the commands which do not transfer actual data) the data bytes are repeated twice and it is the responsibility of the receiver to discard them properly. The concerned commands are: SET_FEATURES, READ_ID, GET_FEATURES, READ_STATUS, READ_STATUS_ENHANCED, ODT_CONFIGURE. Hence, in the NAND core we are only impacted by the implementation of READ_ID, GET_FEATURES and READ_STATUS. The logic is the same for all: 2/ Check if it is relevant to read all data bytes twice. 1/ Allocate a buffer with twice the requested size (may be done statically). 2/ Update the instruction structure to read these extra bytes in the allocated buffer. 3/ Copy the even bytes into the original buffer. The performance hit is negligible on such small data transfers anyway and we don't really care about performances at this stage anyway. 4/ Free the allocated buffer, if any. Note: nand_data_read_op() is also impacted because it is theoretically possible to run the command/address cycles first, and, as another operation, do the data transfers. In this case we can easily identify the impacted commands because the force_8bit flag will be set (due to the same reason: their data does not go through the same pipeline). Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-15-miquel.raynal@bootlin.com commit d7a773e8812bcf7a5412e4baebc6eb1c11242551 Author: Miquel Raynal Date: Wed May 5 23:37:41 2021 +0200 mtd: rawnand: Access SDR and NV-DDR timings through a common macro Most timings related to the bus timings are different between SDR and NV-DDR. However, we identified 9 individual timings which are more related to the NAND chip internals. These are common between the two interface types. Fortunately, only these common timings are being shared through the NAND core and its ->exec_op() interface, which allows the writing of a simple macro checking the interface type and depending on it, returning either the relevant SDR timing or the NV-DDR timing. This is the purpose of the NAND_COMMON_TIMING_PS() macro. As all this is evaluated at build time, one will immediately be notified in case a non common timing is being accessed through this macro. Two handy macros are also inserted at the same time, which use PSEC_TO_NSEC or PSEC_TO_MSEC so that it is very easy to return timings in milli-, nano- or pico-seconds, as usually requested by the internal API. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-14-miquel.raynal@bootlin.com commit fee9c6d8f098f7054f97ec1dbcfb42a2a3238f23 Author: Miquel Raynal Date: Wed May 5 23:37:40 2021 +0200 mtd: rawnand: Avoid accessing NV-DDR timings from legacy code Legacy code should not benefit from newer features, especially in helpers that have been deprecated for a very long time. People who want NV-DDR support must migrate their driver to the ->exec_op() API. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-13-miquel.raynal@bootlin.com commit 45606518f961b9e7adddc017e7813fa9f92b43fb Author: Miquel Raynal Date: Wed May 5 23:37:39 2021 +0200 mtd: rawnand: Add onfi_fill_nvddr_interface_config() helper Same logic as for the SDR path, let's create a onfi_fill_nvddr_interface_config() helper to fill an interface configuration structure with NV-DDR timings, given a specific ONFI mode. There is one additional thing to do compared to SDR mode: tCAD timing can be fast or slow and this depends on an ONFI parameter page bit. By default the slow value is declared in the timings structure definition, but this helper can shrink it down if necessary. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-12-miquel.raynal@bootlin.com commit 94c8ce8e3e96f549ff16381e82974c0af012a7f8 Author: Miquel Raynal Date: Wed May 5 23:37:38 2021 +0200 mtd: rawnand: Add an indirection on onfi_fill_interface_config() This helper actually fills the interface configuration with SDR data. As part of the work to bring NV-DDR support, let's rename this helper onfi_fill_sdr_interface_config() and add a generic indirection to it. There are no functional changes here, but this will simplify a next change which adds onfi_fill_nvddr_interface_config() support. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-11-miquel.raynal@bootlin.com commit 9310668fb60a7ee76c4fdfd6388747a6f2beaf75 Author: Miquel Raynal Date: Wed May 5 23:37:37 2021 +0200 mtd: rawnand: Retrieve NV-DDR timing modes from the ONFI parameter page When parsing the ONFI parameter page, save the available NV-DDR timing modes in the core's dynamic ONFI structure. Once available to the rest of the core out of the ONFI driver, these values will then be used to derive the best timing mode. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-10-miquel.raynal@bootlin.com commit 1666b815ad1a5b6373e950da5002ac46521a9b28 Author: Miquel Raynal Date: Wed May 5 23:37:36 2021 +0200 mtd: rawnand: Add NV-DDR timings Create the relevant ONFI NV-DDR timings structure and fill it with default values from the ONFI specification. Add the relevant structure entries and helpers. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-9-miquel.raynal@bootlin.com commit 7ce872d9f55f46ef54b60ed39c0144b24578d7c3 Author: Miquel Raynal Date: Wed May 5 23:37:35 2021 +0200 mtd: rawnand: Clarify the NV-DDR entries in the ONFI structure Both src_sync_timing_mode and src_ssync_features entries of the ONFI parameter page have been updated and now are named nvddr_timing_modes, nvddr2_timing_modes and nvddr_nvddr2_features, which is much more understandable for someone which do not know the history of the ONFI specification. Update the relevant structure with regard to these changes. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-8-miquel.raynal@bootlin.com commit dbb7b2e07564443c2d357398e83e27c2fa5a89ed Author: Miquel Raynal Date: Wed May 5 23:37:34 2021 +0200 mtd: rawnand: Use more recent ONFI specification wording In particular, first ONFI specifications referred to SDR modes as asynchronous modes, which is not the term we usually have in mind. The spec has then been updated, so do the same here in the NAND subsystem to avoid any possible confusion. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-7-miquel.raynal@bootlin.com commit b16e0d5d7d693fe93e75569ac1ec80b513902a92 Author: Miquel Raynal Date: Wed May 5 23:37:33 2021 +0200 mtd: rawnand: Update dead URL The current link to the ONFI specification is broken, the onfi.org website now points to materials on Micron's website. Update the URL accordingly. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-6-miquel.raynal@bootlin.com commit 64de50e38e6fced70d1cb9ad3112de0691d0ed2d Author: Miquel Raynal Date: Wed May 5 23:37:32 2021 +0200 mtd: rawnand: onfi: Use the BIT() macro when possible Update the onfi.h header to use the BIT() macro. Signed-off-by: Miquel Raynal Acked-by: Alexander Dahl Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-5-miquel.raynal@bootlin.com commit ed2a491037116387f109e851a2b46adcb5feca3b Author: Miquel Raynal Date: Wed May 5 23:37:31 2021 +0200 mtd: rawnand: atmel: Check the proposed data interface is supported Check the data interface is supported in ->setup_interface() before acknowledging the timings. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-4-miquel.raynal@bootlin.com commit 4dd7ef970bee8a93e1817ec028a7e26aef046d0d Author: Miquel Raynal Date: Wed May 5 23:37:30 2021 +0200 mtd: rawnand: arasan: Check the proposed data interface is supported Check the data interface is supported in ->setup_interface() before acknowledging the timings. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-3-miquel.raynal@bootlin.com commit 961965c45c706175b24227868b1c12d72775e446 Author: Miquel Raynal Date: Wed May 5 23:37:29 2021 +0200 mtd: rawnand: Add a helper to clarify the interface configuration Name it nand_interface_is_sdr() which will make even more sense when nand_interface_is_nvddr() will be introduced. Use it when relevant. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210505213750.257417-2-miquel.raynal@bootlin.com commit c3c8c051df3ee5042dd91593593a8b0e008f4c85 Author: Dan Carpenter Date: Fri May 14 17:27:15 2021 +0300 mtd: core: Potential NULL dereference in mtd_otp_size() If kmalloc() fails then it could lead to a NULL dereference. Check and return -ENOMEM on error. Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support") Signed-off-by: Dan Carpenter Reviewed-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/YJ6Iw3iNvGycAWV6@mwanda commit bc8e157fdb466536557b97b6c0df6d7b46a2b91b Author: Jon Hunter Date: Tue May 18 19:55:03 2021 +0100 mtd: core: Fix freeing of otp_info buffer Commit 4b361cfa8624 ("mtd: core: add OTP nvmem provider support") is causing the following panic ... ------------[ cut here ]------------ kernel BUG at /local/workdir/tegra/linux_next/kernel/mm/slab.c:2730! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Modules linked in: CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc2-next-20210518 #1 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) PC is at ___cache_free+0x3f8/0x51c ... [] (___cache_free) from [] (kfree+0xac/0x1bc) [] (kfree) from [] (mtd_otp_size+0xc4/0x108) [] (mtd_otp_size) from [] (mtd_device_parse_register+0xe4/0x2b4) [] (mtd_device_parse_register) from [] (spi_nor_probe+0x210/0x2c0) [] (spi_nor_probe) from [] (spi_probe+0x88/0xac) [] (spi_probe) from [] (really_probe+0x214/0x3a4) [] (really_probe) from [] (driver_probe_device+0x68/0xc0) [] (driver_probe_device) from [] (bus_for_each_drv+0x5c/0xbc) [] (bus_for_each_drv) from [] (__device_attach+0xe4/0x150) [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [] (bus_probe_device) from [] (device_add+0x48c/0x868) [] (device_add) from [] (spi_add_device+0xa0/0x168) [] (spi_add_device) from [] (spi_register_controller+0x8b8/0xb38) [] (spi_register_controller) from [] (devm_spi_register_controller+0x14/0x50) [] (devm_spi_register_controller) from [] (tegra_spi_probe+0x33c/0x450) [] (tegra_spi_probe) from [] (platform_probe+0x5c/0xb8) [] (platform_probe) from [] (really_probe+0x214/0x3a4) [] (really_probe) from [] (driver_probe_device+0x68/0xc0) [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) [] (device_driver_attach) from [] (__driver_attach+0x80/0xc8) [] (__driver_attach) from [] (bus_for_each_dev+0x78/0xb8) [] (bus_for_each_dev) from [] (bus_add_driver+0x164/0x1e8) [] (bus_add_driver) from [] (driver_register+0x7c/0x114) [] (driver_register) from [] (do_one_initcall+0x50/0x2b0) [] (do_one_initcall) from [] (kernel_init_freeable+0x1a8/0x1fc) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x118) [] (kernel_init) from [] (ret_from_fork+0x14/0x24) ... ---[ end trace 0f652dd222de75d7 ]--- In the function mtd_otp_size() a buffer is allocated by calling kmalloc() and a pointer to the buffer is stored in a variable 'info'. The pointer 'info' may then be incremented depending on the length returned from mtd_get_user/fact_prot_info(). If 'info' is incremented, when kfree() is called to free the buffer the above panic occurs because we are no longer passing the original address of the buffer allocated. Fix this by indexing through the buffer allocated to avoid incrementing the pointer. Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support") Signed-off-by: Jon Hunter Reviewed-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210518185503.162787-1-jonathanh@nvidia.com commit aa7f1f03bd998c1ebf412805a40c918537af3d90 Merge: 21703cf790c7a d232924762971 Author: Daniel Borkmann Date: Wed May 26 09:46:17 2021 +0200 Merge branch 'bpf-xdp-bcast' Hangbin Liu says: ==================== This patchset is a new implementation for XDP multicast support based on my previous 2 maps implementation[1]. The reason is that Daniel thinks the exclude map implementation is missing proper bond support in XDP context. And there is a plan to add native XDP bonding support. Adding a exclude map in the helper also increases the complexity of verifier and has drawbacks on performance. The new implementation just add two new flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to extend xdp_redirect_map for broadcast support. With BPF_F_BROADCAST the packet will be broadcasted to all the interfaces in the map. with BPF_F_EXCLUDE_INGRESS the ingress interface will be excluded when do broadcasting. The patchv11 link is here [2]. [1] https://lore.kernel.org/bpf/20210223125809.1376577-1-liuhangbin@gmail.com [2] https://lore.kernel.org/bpf/20210513070447.1878448-1-liuhangbin@gmail.com v12: As Daniel pointed out: a) defined as const u64 for flag_mask and action_mask in __bpf_xdp_redirect_map() b) remove BPF_F_ACTION_MASK in uapi header c) remove EXPORT_SYMBOL_GPL for xdpf_clone() v11: a) Use unlikely() when checking if this is for broadcast redirecting. b) Fix a tracepoint NULL pointer issue Jesper found c) Remove BPF_F_REDIR_MASK and just use OR flags to make the reader more clear about what's flags we are using d) Add the performace number with multi veth interfaces in patch 01 description. e) remove some sleeps to reduce the testing time in patch04. Re-struct the test and make clear what flags we are testing. v10: use READ/WRITE_ONCE when read/write map instead of xchg() v9: Update patch 01 commit description v8: use hlist_for_each_entry_rcu() when looping the devmap hash ojbs v7: No need to free xdpf in dev_map_enqueue_clone() if xdpf_clone failed. v6: Fix a skb leak in the error path for generic XDP v5: Just walk the map directly to get interfaces as get_next_key() of devmap hash may restart looping from the first key if the device get removed. After update the performace has improved 10% compired with v4. v4: Fix flags never cleared issue in patch 02. Update selftest to cover this. v3: Rebase the code based on latest bpf-next v2: fix flag renaming issue in patch 02 ==================== Signed-off-by: Daniel Borkmann commit d232924762971fe2698011bc244e05949e544541 Author: Hangbin Liu Date: Wed May 19 17:07:47 2021 +0800 selftests/bpf: Add xdp_redirect_multi test Add a bpf selftest for new helper xdp_redirect_map_multi(). In this test there are 3 forward groups and 1 exclude group. The test will redirect each interface's packets to all the interfaces in the forward group, and exclude the interface in exclude map. Two maps (DEVMAP, DEVMAP_HASH) and two xdp modes (generic, drive) will be tested. XDP egress program will also be tested by setting pkt src MAC to egress interface's MAC address. For more test details, you can find it in the test script. Here is the test result. ]# time ./test_xdp_redirect_multi.sh Pass: xdpgeneric arp(F_BROADCAST) ns1-1 Pass: xdpgeneric arp(F_BROADCAST) ns1-2 Pass: xdpgeneric arp(F_BROADCAST) ns1-3 Pass: xdpgeneric IPv4 (F_BROADCAST|F_EXCLUDE_INGRESS) ns1-1 Pass: xdpgeneric IPv4 (F_BROADCAST|F_EXCLUDE_INGRESS) ns1-2 Pass: xdpgeneric IPv4 (F_BROADCAST|F_EXCLUDE_INGRESS) ns1-3 Pass: xdpgeneric IPv6 (no flags) ns1-1 Pass: xdpgeneric IPv6 (no flags) ns1-2 Pass: xdpdrv arp(F_BROADCAST) ns1-1 Pass: xdpdrv arp(F_BROADCAST) ns1-2 Pass: xdpdrv arp(F_BROADCAST) ns1-3 Pass: xdpdrv IPv4 (F_BROADCAST|F_EXCLUDE_INGRESS) ns1-1 Pass: xdpdrv IPv4 (F_BROADCAST|F_EXCLUDE_INGRESS) ns1-2 Pass: xdpdrv IPv4 (F_BROADCAST|F_EXCLUDE_INGRESS) ns1-3 Pass: xdpdrv IPv6 (no flags) ns1-1 Pass: xdpdrv IPv6 (no flags) ns1-2 Pass: xdpegress mac ns1-2 Pass: xdpegress mac ns1-3 Summary: PASS 18, FAIL 0 real 1m18.321s user 0m0.123s sys 0m0.350s Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210519090747.1655268-5-liuhangbin@gmail.com commit e48cfe4bbfadd7b88821fe98f625a6b5a6d1cbb4 Author: Hangbin Liu Date: Wed May 19 17:07:46 2021 +0800 sample/bpf: Add xdp_redirect_map_multi for redirect_map broadcast test This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210519090747.1655268-4-liuhangbin@gmail.com commit e624d4ed4aa8cc3c69d1359b0aaea539203ed266 Author: Hangbin Liu Date: Wed May 19 17:07:45 2021 +0800 xdp: Extend xdp_redirect_map with broadcast support This patch adds two flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to extend xdp_redirect_map for broadcast support. With BPF_F_BROADCAST the packet will be broadcasted to all the interfaces in the map. with BPF_F_EXCLUDE_INGRESS the ingress interface will be excluded when do broadcasting. When getting the devices in dev hash map via dev_map_hash_get_next_key(), there is a possibility that we fall back to the first key when a device was removed. This will duplicate packets on some interfaces. So just walk the whole buckets to avoid this issue. For dev array map, we also walk the whole map to find valid interfaces. Function bpf_clear_redirect_map() was removed in commit ee75aef23afe ("bpf, xdp: Restructure redirect actions"). Add it back as we need to use ri->map again. With test topology: +-------------------+ +-------------------+ | Host A (i40e 10G) | ---------- | eno1(i40e 10G) | +-------------------+ | | | Host B | +-------------------+ | | | Host C (i40e 10G) | ---------- | eno2(i40e 10G) | +-------------------+ | | | +------+ | | veth0 -- | Peer | | | veth1 -- | | | | veth2 -- | NS | | | +------+ | +-------------------+ On Host A: # pktgen/pktgen_sample03_burst_single_flow.sh -i eno1 -d $dst_ip -m $dst_mac -s 64 On Host B(Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz, 128G Memory): Use xdp_redirect_map and xdp_redirect_map_multi in samples/bpf for testing. All the veth peers in the NS have a XDP_DROP program loaded. The forward_map max_entries in xdp_redirect_map_multi is modify to 4. Testing the performance impact on the regular xdp_redirect path with and without patch (to check impact of additional check for broadcast mode): 5.12 rc4 | redirect_map i40e->i40e | 2.0M | 9.7M 5.12 rc4 | redirect_map i40e->veth | 1.7M | 11.8M 5.12 rc4 + patch | redirect_map i40e->i40e | 2.0M | 9.6M 5.12 rc4 + patch | redirect_map i40e->veth | 1.7M | 11.7M Testing the performance when cloning packets with the redirect_map_multi test, using a redirect map size of 4, filled with 1-3 devices: 5.12 rc4 + patch | redirect_map multi i40e->veth (x1) | 1.7M | 11.4M 5.12 rc4 + patch | redirect_map multi i40e->veth (x2) | 1.1M | 4.3M 5.12 rc4 + patch | redirect_map multi i40e->veth (x3) | 0.8M | 2.6M Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Acked-by: Martin KaFai Lau Acked-by: John Fastabend Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20210519090747.1655268-3-liuhangbin@gmail.com commit cb261b594b4108668e00f565184c7c221efe0359 Author: Jesper Dangaard Brouer Date: Wed May 19 17:07:44 2021 +0800 bpf: Run devmap xdp_prog on flush instead of bulk enqueue This changes the devmap XDP program support to run the program when the bulk queue is flushed instead of before the frame is enqueued. This has a couple of benefits: - It "sorts" the packets by destination devmap entry, and then runs the same BPF program on all the packets in sequence. This ensures that we keep the XDP program and destination device properties hot in I-cache. - It makes the multicast implementation simpler because it can just enqueue packets using bq_enqueue() without having to deal with the devmap program at all. The drawback is that if the devmap program drops the packet, the enqueue step is redundant. However, arguably this is mostly visible in a micro-benchmark, and with more mixed traffic the I-cache benefit should win out. The performance impact of just this patch is as follows: Using 2 10Gb i40e NIC, redirecting one to another, or into a veth interface, which do XDP_DROP on veth peer. With xdp_redirect_map in sample/bpf, send pkts via pktgen cmd: ./pktgen_sample03_burst_single_flow.sh -i eno1 -d $dst_ip -m $dst_mac -t 10 -s 64 There are about +/- 0.1M deviation for native testing, the performance improved for the base-case, but some drop back with xdp devmap prog attached. Version | Test | Generic | Native | Native + 2nd xdp_prog 5.12 rc4 | xdp_redirect_map i40e->i40e | 1.9M | 9.6M | 8.4M 5.12 rc4 | xdp_redirect_map i40e->veth | 1.7M | 11.7M | 9.8M 5.12 rc4 + patch | xdp_redirect_map i40e->i40e | 1.9M | 9.8M | 8.0M 5.12 rc4 + patch | xdp_redirect_map i40e->veth | 1.7M | 12.0M | 9.4M When bq_xmit_all() is called from bq_enqueue(), another packet will always be enqueued immediately after, so clearing dev_rx, xdp_prog and flush_node in bq_xmit_all() is redundant. Move the clear to __dev_flush(), and only check them once in bq_enqueue() since they are all modified together. This change also has the side effect of extending the lifetime of the RCU-protected xdp_prog that lives inside the devmap entries: Instead of just living for the duration of the XDP program invocation, the reference now lives all the way until the bq is flushed. This is safe because the bq flush happens at the end of the NAPI poll loop, so everything happens between a local_bh_disable()/local_bh_enable() pair. However, this is by no means obvious from looking at the call sites; in particular, some drivers have an additional rcu_read_lock() around only the XDP program invocation, which only confuses matters further. Cleaning this up will be done in a separate patch series. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210519090747.1655268-2-liuhangbin@gmail.com commit 83aacfbcbd42eec3882423bbafcb8b3190376ed8 Author: Greg Kroah-Hartman Date: Mon May 24 10:18:15 2021 +0200 w1: fix build warning in w1_ds2438.rst commit c999fbbdcf77 ("w1: ds2438: support for writing to offset register") added more documentation, but had a one-off line for the header of a section which caused the build warning: Documentation/w1/slaves/w1_ds2438.rst:56: WARNING: Title underline too short. Resolve this by fixing the underline to be long enough. Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/YKthRzCGan9WEcmP@kroah.com Signed-off-by: Greg Kroah-Hartman commit 601a6887999338ec4209b76787e3aaa8fc810d3c Author: Aditya Srivastava Date: Sun May 23 20:31:22 2021 +0530 w1: ds2482: fix kernel-doc syntax in file The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The comments for drivers/w1/masters/ds2482.c follows this syntax, but the content inside does not comply with kernel-doc. Similarly, the syntax for function and arguments declaration as well. Fix all such occurrences appropriately. Tested-by: Randy Dunlap Reviewed-by: Randy Dunlap Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210523150122.21160-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8ea6fc9b089156d9230bfeef964dd9be101a4a9 Author: Frederic Weisbecker Date: Wed May 26 01:58:49 2021 +0200 sched: Stop PF_NO_SETAFFINITY from being inherited by various init system threads Commit: 00b89fe0197f ("sched: Make the idle task quack like a per-CPU kthread") ... added PF_KTHREAD | PF_NO_SETAFFINITY to the idle kernel threads. Unfortunately these properties are inherited to the init/0 children through kernel_thread() calls: init/1 and kthreadd. There are several side effects to that: 1) kthreadd affinity can not be reset anymore from userspace. Also PF_NO_SETAFFINITY propagates to all kthreadd children, including the unbound kthreads Therefore it's not possible anymore to overwrite the affinity of any of them. Here is an example of warning reported by rcutorture: WARNING: CPU: 0 PID: 116 at kernel/rcu/tree_nocb.h:1306 rcu_bind_current_to_nocb+0x31/0x40 Call Trace: rcu_torture_fwd_prog+0x62/0x730 kthread+0x122/0x140 ret_from_fork+0x22/0x30 2) init/1 does an exec() in the end which clears both PF_KTHREAD and PF_NO_SETAFFINITY so we are fine once kernel_init() escapes to userspace. But until then, no initcall or init code can successfully call sched_setaffinity() to init/1. Also PF_KTHREAD looks legit on init/1 before it calls exec() but we better be careful with unknown introduced side effects. One way to solve the PF_NO_SETAFFINITY issue is to not inherit this flag on copy_process() at all. The cases where it matters are: * fork_idle(): explicitly set the flag already. * fork() syscalls: userspace tasks that shouldn't be concerned by that. * create_io_thread(): the callers explicitly attribute the flag to the newly created tasks. * kernel_thread(): - Fix the issues on init/1 and kthreadd - Fix the issues on kthreadd children. - Usermode helper created by an unbound workqueue. This shouldn't matter. In the worst case it gives more control to userspace on setting affinity to these short living tasks although this can be tuned with inherited unbound workqueues affinity already. Fixes: 00b89fe0197f ("sched: Make the idle task quack like a per-CPU kthread") Reported-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Tested-by: Paul E. McKenney Link: https://lore.kernel.org/r/20210525235849.441842-1-frederic@kernel.org commit 37a7a2a10ec525a79d733008bc7fe4ebbca34382 Author: Jisheng Zhang Date: Wed May 12 22:55:45 2021 +0800 riscv: Turn has_fpu into a static key if FPU=y The has_fpu check sits at hot code path: switch_to(). Currently, has_fpu is a bool variable if FPU=y, switch_to() checks it each time, we can optimize out this check by turning the has_fpu into a static key. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 8237c5243a614d33fe339bc844f90aa2b393c2a8 Author: Jisheng Zhang Date: Wed May 12 01:42:31 2021 +0800 riscv: Optimize switch_mm by passing "cpu" to flush_icache_deferred() Directly passing the cpu to flush_icache_deferred() rather than calling smp_processor_id() again. Signed-off-by: Jisheng Zhang [Palmer: drop the QEMU performance numbers, and update the comment] Signed-off-by: Palmer Dabbelt commit 50bae95e17c6dd0b7a2a3a92ad8808067234e9ef Author: Kefeng Wang Date: Fri May 14 17:49:08 2021 +0800 riscv: mm: Drop redundant _sdata and _edata declaration The _sdata/_edata is already in sections.h, drop redundant declaration. Also move _xiprom/_exiprom declarations at the beginning of the file, cleanup one CONFIG_XIP_KERNEL. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit f842f5ff6aafc2752580ed99ee757652c08684e7 Author: Kefeng Wang Date: Mon May 10 19:42:22 2021 +0800 riscv: Move setup_bootmem into paging_init Make setup_bootmem() static. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit db756746807b5cb64bbe2e6ac4ff38d18b7787ed Author: Stanislaw Kardach Date: Mon Apr 12 13:10:12 2021 +0200 riscv: enable generic PCI resource mapping Enable the PCI resource mapping on RISC-V using the generic framework. This allows userspace applications to mmap PCI resources using /sys/devices/pci*/*/resource* interface. The mmap has been tested with Intel x520-DA2 NIC card on a HiFive Unmatched board (SiFive FU740 SoC). Signed-off-by: Stanislaw Kardach Signed-off-by: Palmer Dabbelt commit 8f3e136ff378a2b22dbc0ca2a6e58022e6df36d2 Author: Jisheng Zhang Date: Fri May 7 22:19:59 2021 +0800 riscv: mm: Remove setup_zero_page() The empty_zero_page sits at .bss..page_aligned section, so will be cleared to zero during clearing bss, we don't need to clear it again. Signed-off-by: Jisheng Zhang Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 3332f4190674114e08daaf6859c11a7e464bceff Author: Jisheng Zhang Date: Sat Apr 17 00:37:22 2021 +0800 riscv: mremap speedup - enable HAVE_MOVE_PUD and HAVE_MOVE_PMD HAVE_MOVE_PUD enables remapping pages at the PUD level if both the source and destination addresses are PUD-aligned. HAVE_MOVE_PMD does similar speedup on the PMD level. With HAVE_MOVE_PUD enabled, there is about a 143x improvement on qemu With HAVE_MOVE_PMD enabled, there is about a 5x improvement on qemu Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit a925316af80ae93186f00d80163f5a3c7f5b4782 Author: zuoqilin Date: Fri May 14 15:55:13 2021 +0800 net: Remove unnecessary variables It is not necessary to define variables to receive -ENOMEM, directly return -ENOMEM. Signed-off-by: zuoqilin Signed-off-by: Steffen Klassert commit 9bf8257fefc9d14f589c2a933ba1193cc1912200 Author: Luca Weiss Date: Tue May 4 22:36:13 2021 +0200 soc: qcom: socinfo: Add more IDs Add the IDs for the following families of chips: 8064, 8226, 8610, 8625Q Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20210504203612.95056-1-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 3b1a0582482c81682960aafe69c87660e4fdf3be Author: Bjorn Andersson Date: Wed Jan 20 14:50:37 2021 -0800 soc: qcom: rpmhpd: Add SC8180X Add the power domains exposed by RPMH in the Qualcomm SC8180X platform. Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20210120225037.1611353-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit dfa3d406e2ab1136333d6d0f13723a0467206d1a Author: Bjorn Andersson Date: Wed Jan 20 14:50:36 2021 -0800 dt-bindings: power: rpmpd: Add SC8180X to rpmpd binding Add compatible and constants for the power domains exposed by the RPMH in the Qualcomm SC8180X platform. Reviewed-by: Shawn Guo Reviewed-by: Vinod Koul Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210120225037.1611353-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit c1d4544d0233bbccbc785bf7f45a9c66287b73c6 Author: Martin Botka Date: Sun May 23 23:15:54 2021 +0200 dt-bindings: soc: qcom: smd-rpm: Document SM6125 compatible Add the SM6125 compatible to the documentation Signed-off-by: Martin Botka Link: https://lore.kernel.org/r/20210523211556.731976-3-martin.botka@somainline.org Signed-off-by: Bjorn Andersson commit 055c9aff76b776634b1ee50397d65f8fe1550c1a Author: Martin Botka Date: Sun May 23 23:15:52 2021 +0200 soc: qcom: smd-rpm: Add SM6125 compatible Add a compatible for SM6125 Signed-off-by: Martin Botka Link: https://lore.kernel.org/r/20210523211556.731976-1-martin.botka@somainline.org Signed-off-by: Bjorn Andersson commit e365257547ec789a8b54e7b33bbb9e0f5506de74 Author: Robert Marko Date: Mon May 17 14:00:34 2021 +0200 soc: qcom: socinfo: Add remaining IPQ6018 family ID-s ID for IPQ6018 was previously added, but ID-s for rest of the family are missing. So, lets add those based on downstream driver. Signed-off-by: Robert Marko Reviewed-by: Kathiravan T Link: https://lore.kernel.org/r/20210517120034.3975027-1-robert.marko@sartura.hr Signed-off-by: Bjorn Andersson commit eec220565b7852d017f936fbc18a7864d2179593 Author: Martin Botka Date: Sun May 23 23:20:37 2021 +0200 soc: qcom: socinfo: Add missing SoC ID for SM6125 Add SM6125 SoC ID to the soc_id struct Signed-off-by: Martin Botka Link: https://lore.kernel.org/r/20210523212038.736445-2-martin.botka@somainline.org Signed-off-by: Bjorn Andersson commit 0bba09bc2d174edfac680e86787bffd054ee8705 Author: Shaokun Zhang Date: Tue May 25 15:51:41 2021 +0800 drm/radeon: remove the repeated declaration Function 'r300_mc_wait_for_idle' and 'r600_mc_wait_for_idle' are declared twice, remove the repeated declaration. Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Shaokun Zhang Signed-off-by: Alex Deucher commit 53602f4aeadb078b5a89ed89e62f9f320c6ba0b5 Author: Shaokun Zhang Date: Tue May 25 20:32:24 2021 +0800 drm/radeon/evergreen: Remove the repeated declaration Function 'evergreen_print_gpu_status_regs' is declared twice, remove the repeated declaration. Cc: Alex Deucher Cc: "Christian König" Signed-off-by: Shaokun Zhang Signed-off-by: Alex Deucher commit ee780965cbf53f3e60cf3982554a912139ebb378 Author: Shaokun Zhang Date: Tue May 25 18:51:12 2021 +0800 drm/amd/display: Remove the repeated declaration Function 'dc_power_down_on_boot' is declared twice, remove the repeated declaration. Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Signed-off-by: Shaokun Zhang Signed-off-by: Alex Deucher commit 02b865f88b4e4f72d441c34e5aa4e5eebbd04fbb Author: Jiansong Chen Date: Tue May 25 14:14:58 2021 +0800 drm/amdgpu: refine amdgpu_fru_get_product_info 1. eliminate potential array index out of bounds. 2. return meaningful value for failure. Signed-off-by: Jiansong Chen Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 2a4021ccb8fee543fec96a34bf962a7318779779 Author: Peng Ju Zhou Date: Tue May 25 18:21:38 2021 +0800 drm/amdgpu: Change IP init sequence to support PSP program IH_RB_CNTL on NV12 SRIOV To enable PSP program IH_RB_CNTL, the PSP IP should be initialized before IH IP, otherwise, it will hit psp NULL pointer. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 713305570aebdf049db9660f186a8e406cfc5fcf Author: Dan Carpenter Date: Tue May 25 15:47:38 2021 +0300 drm/amdgpu: Fix an error code in kfd_mem_attach_dmabuf() If amdgpu_gem_prime_export() fails, then this code accidentally returns zero/success instead of a negative error code. Fixes: 5ac3c3e45fb93d ("drm/amdgpu: Add DMA mapping of GTT BOs") Signed-off-by: Dan Carpenter Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3e06db4d62a80932395fea36e4081a4c15116bae Author: Dan Carpenter Date: Tue May 25 15:46:55 2021 +0300 drm/amdgpu: add missing unreserve on error The amdgpu_bo_unreserve() has to be done on the error path as well. Fixes: 9e5d275319e224 ("drm/amdgpu: Move kfd_mem_attach outside reservation") Signed-off-by: Dan Carpenter Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit abaf210c281d8e829324bc49e8b0bf665ea88a7b Author: Asher Song Date: Fri May 21 17:11:33 2021 +0800 drm/amdgpu: add judgement for dc support Drop DC initialization when DCN is harvested in VBIOS. The way doesn't affect virtual display ip initialization. Signed-off-by: Likun Gao Signed-off-by: Asher Song Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 0e9def2108afbb3b91fca1dd985731b327e4c823 Author: tony.huang_cp Date: Mon May 24 15:15:54 2021 +0800 drm/amdgpu: fix typo change 'interupt' to 'interrupt' Signed-off-by: tony.huang_cp Signed-off-by: Alex Deucher commit a4bdd15e799ad335ecf0878d4cd7ea983f484843 Author: Konrad Dybcio Date: Tue May 25 22:02:43 2021 +0200 arm64: dts: qcom: msm8996: Add DMA to QUPs and UARTs Add BAM DMA nodes and add required properties to devices to enable DMA operations. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210525200246.118323-5-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit fbe7be5b23ae6640d14a94d5fb71dddfce324976 Author: Konrad Dybcio Date: Tue May 25 22:02:41 2021 +0200 arm64: dts: qcom: msm8996: Strictly limit USB2 host to USB2 speeds As the name implies, the USB2 controller should only operate at USB2 speeds. Make sure it does just that by pinning it to USB High-Speed (USB2) mode. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210525200246.118323-3-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit fbd5a1d22607f77ea6fb31fbfdb91c08007ed3a1 Author: satya priya Date: Tue May 25 15:41:05 2021 +0530 arm64: dts: qcom: sc7280: Add ADC channel nodes for PMIC temperatures to sc7280-idp Add channel nodes for the on die temperatures of PMICS pmk8350, pm8350, pmr735a and pmr735b. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1621937466-1502-11-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit a1cbfdfdc2b1ca6cdc9f3b57d1776cae6783dd2f Author: satya priya Date: Tue May 25 15:41:04 2021 +0530 arm64: dts: qcom: sc7280: Include PMIC DT files for sc7280-idp The sc7280-idp has four PMICs, include their .dtsi files. Reviewed-by: Matthias Kaehlcke Signed-off-by: satya priya Link: https://lore.kernel.org/r/1621937466-1502-10-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit d0927c2134d9eb75aa8937a8c9e191b13a8f0d56 Author: satya priya Date: Tue May 25 15:41:03 2021 +0530 arm64: dts: qcom: pmk8350: Correct the GPIO node Add gpio ranges and correct the compatible to add "qcom,spmi-gpio" as this pmic is on spmi bus. Reviewed-by: Matthias Kaehlcke Signed-off-by: satya priya Link: https://lore.kernel.org/r/1621937466-1502-9-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit b2de4313605834cb9d50baa3901b2c1956092ca1 Author: satya priya Date: Tue May 25 15:41:02 2021 +0530 arm64: dts: qcom: pmk8350: Add peripherals for pmk8350 Add PON, RTC, VADC and ACD_TM support for PMK8350. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1621937466-1502-8-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit f878e1baa4ae8211982022bde8f2ad06acbd234d Author: satya priya Date: Tue May 25 15:41:01 2021 +0530 arm64: dts: qcom: pmr735a: Correct the GPIO node Add gpio ranges and correct the compatible to add "qcom,spmi-gpio" as this pmic is on spmi bus. Reviewed-by: Matthias Kaehlcke Signed-off-by: satya priya Link: https://lore.kernel.org/r/1621937466-1502-7-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 7a3544e5d4e868ae918e1fb59cd1b0083ed12f59 Author: satya priya Date: Tue May 25 15:41:00 2021 +0530 arm64: dts: qcom: pmr735a: Add temp-alarm support Add temp-alarm support for PMR735A pmic. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1621937466-1502-6-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 6327abef804dbfc4ccb2c9e0991afc601de24997 Author: satya priya Date: Tue May 25 15:40:59 2021 +0530 arm64: dts: qcom: pm8350c: Correct the GPIO node Add gpio ranges and correct the compatible to add "qcom,spmi-gpio" as this pmic is on spmi bus. Reviewed-by: Matthias Kaehlcke Signed-off-by: satya priya Link: https://lore.kernel.org/r/1621937466-1502-5-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 3795fe7d497b897a0d897e23f735e51866440477 Author: satya priya Date: Tue May 25 15:40:58 2021 +0530 arm64: dts: qcom: pm8350c: Add temp-alarm support Add temp-alarm support for PM8350C pmic. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1621937466-1502-4-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 0e17fe8cf8e112599c9812904f9eecdc3e8cde14 Author: satya priya Date: Tue May 25 15:40:57 2021 +0530 arm64: dts: qcom: pm7325: Add pm7325 base dts file Add base DTS file for pm7325 along with GPIOs and temp-alarm nodes. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1621937466-1502-3-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 4dcaa68ee2176344f30dd7e898938c9d46cb6636 Author: satya priya Date: Tue May 25 15:40:56 2021 +0530 arm64: dts: qcom: sm8350: Add label for thermal-zones node Add label "thermal_zones" for thermal-zones node. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1621937466-1502-2-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 9ec1c5867c0269777e4b4bf0d2ef926ac6eac882 Author: Rajeshwari Ravindra Kamble Date: Fri May 7 11:37:21 2021 +0530 arm64: dts: qcom: SC7280: Add thermal zone support Adding thermal zone and cooling maps support in SC7280. Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajeshwari Ravindra Kamble Link: https://lore.kernel.org/r/1620367641-23383-4-git-send-email-rkambl@codeaurora.org Signed-off-by: Bjorn Andersson commit 132f5a8df93430718412e1a1d1fe2f242824af9d Author: Rajeshwari Ravindra Kamble Date: Fri May 7 11:37:20 2021 +0530 arm64: dts: qcom: SC7280: Add device node support for TSENS Adding device node for TSENS controller and critical interrupt support in SC7280. Signed-off-by: Rajeshwari Ravindra Kamble Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1620367641-23383-3-git-send-email-rkambl@codeaurora.org Signed-off-by: Bjorn Andersson commit 4753492de9df1b1728b27e36b17c1c09ef1685b1 Author: Yassine Oudjana Date: Tue Mar 2 03:51:10 2021 +0000 arm64: dts: qcom: msm8996: Add usb3 interrupts Add hs_phy_irq and ss_phy_irq to usb3. Tested-by: Konrad Dybcio Signed-off-by: Yassine Oudjana Link: https://lore.kernel.org/r/dvfyYKA9vnJdunbQ1CL-dgjXtv_1wYpRnezdc3PHoCyrgmfi5KP0Dn4MtaumQEpHIQAHL9tTdqcaCK7YJWyrdWXCrPeGd4uMh-nFeu7xQYw=@protonmail.com Signed-off-by: Bjorn Andersson commit 3343de9af75cef3f45aa27970bd1680d424da05e Author: Konrad Dybcio Date: Sun Feb 28 14:08:29 2021 +0100 arm64: dts: qcom: msm8996: Clean up the SDHCI2 node Fix the indentation, add pinctrl and move status="disabled" down. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-11-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 37aa540cbd30ced7217745378c37259ec460e657 Author: Konrad Dybcio Date: Sun Feb 28 14:08:28 2021 +0100 arm64: dts: qcom: pmi8994: Add WLED node Add and configure WLED node to enable backlight control on WLED-enabled devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-10-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 12d5403757363880fa8c8d408932ecbe98efeeeb Author: Konrad Dybcio Date: Sun Feb 28 14:08:27 2021 +0100 arm64: dts: qcom: msm8996: Add DSI0 nodes Add required nodes to support DSI displays connected to the primary interface. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-9-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit f7342c7d2902b70ef060d84addf5ce3b57182516 Author: Konrad Dybcio Date: Sun Feb 28 14:08:26 2021 +0100 arm64: dts: qcom: pm8994: Add RESIN node Add a RESIN node to support RESIN-connected buttons on some devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-8-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit d774e762b032588a3adb38f8bc949b59e22a7749 Author: Konrad Dybcio Date: Sun Feb 28 14:08:25 2021 +0100 arm64: dts: qcom: msm8996: Disable Venus by default Disable Venus by default to allow booting without closed firmware and enable it on the boards that didn't previously disable it. This commit brings no functional difference. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-7-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 37b05cecfe96d6471ce51b224f35b573c2b79ddc Author: Konrad Dybcio Date: Sun Feb 28 14:08:24 2021 +0100 arm64: dts: qcom: msm8996: Disable MDSS and Adreno by default Disable them by default to allow for booting without a display and proprietary firmware. Then, enable them on boards that didn't previously disable them. Hence, this commit brings no functional difference. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-6-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit c33d9068a7509f5bab6b5d97d5519b629b1944c6 Author: Konrad Dybcio Date: Sun Feb 28 14:08:23 2021 +0100 arm64: dts: qcom: msm8996: Add BLSP2_I2C5 and BLSP2_I2C6 Add the fifth and sixth I2C host on the second BLSP, used for various board-specific peripherals. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-5-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit fbb8a3a8b7317233e577fa42a6efb4e38e6bbc4d Author: Konrad Dybcio Date: Sun Feb 28 14:08:22 2021 +0100 arm64: dts: qcom: msm8996: Add SDHCI1 Add SDHCI1 device to allow for usage of (more often than not) eMMC. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-4-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 76f4d70f617470297a0cd2d97b91c7326314273e Author: Konrad Dybcio Date: Sun Feb 28 14:08:21 2021 +0100 arm64: dts: qcom: msm8996: Enlarge tcsr_mutex_regs size Set the tcsr_mutex_regs size to 0x40000 to allow for accessing all required registers that will be needed to support modem. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-3-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit ff5e2b87a1dfeb00c62c933ad4d5ddd16aac1da3 Author: Konrad Dybcio Date: Sun Feb 28 14:08:20 2021 +0100 arm64: dts: qcom: msm8996-*: Clean up QUP and UART names QUP and UART names start from 1. There are 6 QUPs and 2 UARTs per BLSP. Let's not further confuse programmers by stating otherwise. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-2-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 35a4a8b6e9b133cf3a7d059ad4cf0e24cb4bd029 Author: Konrad Dybcio Date: Sun Feb 28 14:08:19 2021 +0100 arm64: dts: qcom: msm8996: Sanitize pins In order to prepare for feature development, the DTs have to be workable with.. To achieve that: - Rename msmgpio to tlmm (consistency with newer DTs) - Rid msm8996-pins.dtsi and add the contents to msm8996.dtsi - Modernize the pin nodes, make them more concise - Add generic pin configuration for some hardware - Fix up some names in preparation for BLSP/UART name cleaning.. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228130831.203765-1-konrad.dybcio@somainline.org Signed-off-by: Bjorn Andersson commit 1ed34da63a37f773f957174d4b6122f9e08d158c Author: Gokul Sriram Palanisamy Date: Fri Feb 26 13:58:30 2021 +0530 arm64: dts: qcom: Add board support for HK10 Add initial support for IPQ8074 SoC based HK10-C1 and HK10-C2 evaluation boards. Signed-off-by: Gokul Sriram Palanisamy Link: https://lore.kernel.org/r/1614328110-28866-2-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 6215d3f07bd713eec627aa92d0b2bd9d3262da53 Author: Yassine Oudjana Date: Thu May 6 21:18:52 2021 +0000 arm64: dts: qcom: msm8996: Disable ADSP and add power domains Disable ADSP by default and enable it in devices that use it. Also add CX power domain. Signed-off-by: Yassine Oudjana Link: https://lore.kernel.org/r/Epn1vFjJb0oQhqMYxspzL6X1N6MPcDT1f9oVVOjXc@cp3-web-020.plabs.ch Signed-off-by: Bjorn Andersson commit 59312ab139810229fd76603e4e8e49ecb2f3dfc2 Author: Sergey Senozhatsky Date: Tue May 25 22:32:42 2021 +0900 arm64: dts: qcom: remove camera_mem region qcom camera driver allocates the ICP firmware memory dynamically, so the carveout region is unnecessary. Reviewed-by: Stephen Boyd Signed-off-by: Sergey Senozhatsky Link: https://lore.kernel.org/r/20210525133242.188603-1-senozhatsky@chromium.org Signed-off-by: Bjorn Andersson commit ab7f9be0e4f0f211dcb2281fe0fb09f91e26c3c0 Author: Joel Selvaraj Date: Mon May 3 07:47:31 2021 +0530 arm64: dts: qcom: sdm845-xiaomi-beryllium: Add audio support This patch adds audio support for Xiaomi Poco F1 phone. Phone's primary Mic and 3.5mm Headphone jack are handled through the SDM845 sound card and WCD9340 codec. Tested-by: Amit Pundir Reviewed-by: Srinivas Kandagatla Signed-off-by: Joel Selvaraj Link: https://lore.kernel.org/r/BN6PR2001MB17966ED1D787FA3F4B90A1A7D95B9@BN6PR2001MB1796.namprd20.prod.outlook.com Signed-off-by: Bjorn Andersson commit c572729b57b4a635fd655b481fb96c5065ad300b Author: Caleb Connolly Date: Sun May 2 01:43:09 2021 +0000 arm64: dts: qcom: sdm845-oneplus-common: enable ipa Enable the ipa node so that we can bring up mobile data. Signed-off-by: Caleb Connolly Link: https://lore.kernel.org/r/20210502014146.85642-5-caleb@connolly.tech Signed-off-by: Bjorn Andersson commit e60fd5ac1f6851be5b2c042b39584bfcf8a66f57 Author: Caleb Connolly Date: Sun May 2 01:42:57 2021 +0000 arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem The rmtfs_mem region is a weird one, downstream allocates it dynamically, and supports a "qcom,guard-memory" property which when set will reserve 4k above and below the rmtfs memory. A common from qcom 4.9 kernel msm_sharedmem driver: /* * If guard_memory is set, then the shared memory region * will be guarded by SZ_4K at the start and at the end. * This is needed to overcome the XPU limitation on few * MSM HW, so as to make this memory not contiguous with * other allocations that may possibly happen from other * clients in the system. */ When the kernel tries to touch memory that is too close the rmtfs region it may cause an XPU violation. Such is the case on the OnePlus 6 where random crashes would occur usually after boot. Reserve 4k above and below the rmtfs_mem to avoid hitting these XPU Violations. This doesn't entirely solve the random crashes on the OnePlus 6/6T but it does seem to prevent the ones which happen shortly after modem bringup. Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices") Signed-off-by: Caleb Connolly Link: https://lore.kernel.org/r/20210502014146.85642-4-caleb@connolly.tech Signed-off-by: Bjorn Andersson commit 5eabd602d2ff5c9b3fbd250ab09e355336691d8e Author: Harigovindan P Date: Mon Jun 29 19:21:44 2020 +0530 arm64: dts: qcom: sc7180: add nodes for idp display Add nodes for IDP display. The display is Visionox RM69299. Signed-off-by: Harigovindan P Link: https://lore.kernel.org/r/20200629135144.8265-1-harigovi@codeaurora.org Signed-off-by: Bjorn Andersson commit 7f891faf596ede96dd209b2257abf9df636b481f Author: Taniya Das Date: Sun Apr 25 12:38:22 2021 +0530 clk: qcom: clk-rcg2: Add support for duty-cycle for RCG The root clock generators with MND divider has the capability to support change in duty-cycle by updating the 'D'. Add the clock ops which would check all the boundary conditions and enable setting the desired duty-cycle as per the consumer. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1619334502-9880-2-git-send-email-tdas@codeaurora.org [sboyd@kernel.org: Remove _val everywhere] Signed-off-by: Stephen Boyd commit 21703cf790c7aa0fd09e1d38df9a5d945244abf8 Merge: a720a2a0ad6cb 9c6c0449deb41 Author: Alexei Starovoitov Date: Tue May 25 17:32:35 2021 -0700 Merge branch 'libbpf: error reporting changes for v1.0' Andrii Nakryiko says: ==================== Implement error reporting changes discussed in "Libbpf: the road to v1.0" ([0]) document. Libbpf gets a new API, libbpf_set_strict_mode() which accepts a set of flags that turn on a set of libbpf 1.0 changes, that might be potentially breaking. It's possible to opt-in into all current and future 1.0 features by specifying LIBBPF_STRICT_ALL flag. When some of the 1.0 "features" are requested, libbpf APIs might behave differently. In this patch set a first set of changes are implemented, all related to the way libbpf returns errors. See individual patches for details. Patch #1 adds a no-op libbpf_set_strict_mode() functionality to enable updating selftests. Patch #2 gets rid of all the bad code patterns that will break in libbpf 1.0 (exact -1 comparison for low-level APIs, direct IS_ERR() macro usage to check pointer-returning APIs for error, etc). These changes make selftest work in both legacy and 1.0 libbpf modes. Selftests also opt-in into 100% libbpf 1.0 mode to automatically gain all the subsequent changes, which will come in follow up patches. Patch #3 streamlines error reporting for low-level APIs wrapping bpf() syscall. Patch #4 streamlines errors for all the rest APIs. Patch #5 ensures that BPF skeletons propagate errors properly as well, as currently on error some APIs will return NULL with no way of checking exact error code. [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY v1->v2: - move libbpf_set_strict_mode() implementation to patch #1, where it belongs (Alexei); - add acks, slight rewording of commit messages. ==================== Signed-off-by: Alexei Starovoitov commit 9c6c0449deb41dbe3a66ab9adfd08020bba6c43d Author: Andrii Nakryiko Date: Mon May 24 20:59:35 2021 -0700 bpftool: Set errno on skeleton failures and propagate errors Follow libbpf's error handling conventions and pass through errors and errno properly. Skeleton code always returned NULL on errors (not ERR_PTR(err)), so there are no backwards compatibility concerns. But now we also set errno properly, so it's possible to distinguish different reasons for failure, if necessary. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210525035935.1461796-6-andrii@kernel.org commit e9fc3ce99b3485586e7e4803b63df8b4c681f897 Author: Andrii Nakryiko Date: Mon May 24 20:59:34 2021 -0700 libbpf: Streamline error reporting for high-level APIs Implement changes to error reporting for high-level libbpf APIs to make them less surprising and less error-prone to users: - in all the cases when error happens, errno is set to an appropriate error value; - in libbpf 1.0 mode, all pointer-returning APIs return NULL on error and error code is communicated through errno; this applies both to APIs that already returned NULL before (so now they communicate more detailed error codes), as well as for many APIs that used ERR_PTR() macro and encoded error numbers as fake pointers. - in legacy (default) mode, those APIs that were returning ERR_PTR(err), continue doing so, but still set errno. With these changes, errno can be always used to extract actual error, regardless of legacy or libbpf 1.0 modes. This is utilized internally in libbpf in places where libbpf uses it's own high-level APIs. libbpf_get_error() is adapted to handle both cases completely transparently to end-users (and is used by libbpf consistently as well). More context, justification, and discussion can be found in "Libbpf: the road to v1.0" document ([0]). [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210525035935.1461796-5-andrii@kernel.org commit f12b654327283d158de0af170943ec5dd8cd02e5 Author: Andrii Nakryiko Date: Mon May 24 20:59:33 2021 -0700 libbpf: Streamline error reporting for low-level APIs Ensure that low-level APIs behave uniformly across the libbpf as follows: - in case of an error, errno is always set to the correct error code; - when libbpf 1.0 mode is enabled with LIBBPF_STRICT_DIRECT_ERRS option to libbpf_set_strict_mode(), return -Exxx error value directly, instead of -1; - by default, until libbpf 1.0 is released, keep returning -1 directly. More context, justification, and discussion can be found in "Libbpf: the road to v1.0" document ([0]). [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210525035935.1461796-4-andrii@kernel.org commit bad2e478af3b4df9fd84b4db7779ea91bd618c16 Author: Andrii Nakryiko Date: Mon May 24 20:59:32 2021 -0700 selftests/bpf: Turn on libbpf 1.0 mode and fix all IS_ERR checks Turn ony libbpf 1.0 mode. Fix all the explicit IS_ERR checks that now will be broken because libbpf returns NULL on error (and sets errno). Fix ASSERT_OK_PTR and ASSERT_ERR_PTR to work for both old mode and new modes and use them throughout selftests. This is trivial to do by using libbpf_get_error() API that all libbpf users are supposed to use, instead of IS_ERR checks. A bunch of checks also did explicit -1 comparison for various fd-returning APIs. Such checks are replaced with >= 0 or < 0 cases. There were also few misuses of bpf_object__find_map_by_name() in test_maps. Those are fixed in this patch as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210525035935.1461796-3-andrii@kernel.org commit 5981881d21dff612abf8fce484f8efa67f49aae4 Author: Andrii Nakryiko Date: Mon May 24 20:59:31 2021 -0700 libbpf: Add libbpf_set_strict_mode() API to turn on libbpf 1.0 behaviors Add libbpf_set_strict_mode() API that allows application to simulate libbpf 1.0 breaking changes before libbpf 1.0 is released. This will help users migrate gradually and with confidence. For now only ALL or NONE options are available, subsequent patches will add more flags. This patch is preliminary for selftests/bpf changes. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210525035935.1461796-2-andrii@kernel.org commit e4e92ee78702b13ad55118d8b66f06e1aef62586 Author: Loic Poulain Date: Tue May 25 18:31:18 2021 +0200 net: wwan: core: Add WWAN device index sysfs attribute Add index sysfs attribute for WWAN devices. This index is used to uniquely indentify and reference a WWAN device. 'index' is the attribute name that other device classes use (wireless, v4l2-dev, rfkill, etc...). Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 1b19b3f79063b202af3c8e1597320dee2f216756 Merge: 687c87adc11a6 30cbb0107e983 Author: David S. Miller Date: Tue May 25 15:41:54 2021 -0700 Merge branch 'wan-cleanups' Guangbin Huang says: ==================== net: wan: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 30cbb0107e98308a5cb1a27b4c8d4049c07290aa Author: Peng Li Date: Tue May 25 22:07:58 2021 +0800 net: wan: add spaces required around that ':' and '+' This patch adds spaces required around that ':' and '+'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 2aea27bae89b14e624bdc53a5e5af5a004e68058 Author: Peng Li Date: Tue May 25 22:07:57 2021 +0800 net: wan: replace comparison to NULL with "!card" According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 69542276e2b12d2a02af5fb523fe409bd0983f10 Author: Peng Li Date: Tue May 25 22:07:56 2021 +0800 net: wan: add some required spaces Add space required after that close brace '}'. Add space required before the open parenthesis '(' and '{' Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c4fdef99d17bad52d268ffe7a67b9ed2410cbd34 Author: Peng Li Date: Tue May 25 22:07:55 2021 +0800 net: wan: fix an code style issue about "foo* bar Fix the checkpatch error as "foo* bar" and should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 9e7ee10f169f790ee1a7146cf2c0befa970f19a5 Author: Peng Li Date: Tue May 25 22:07:54 2021 +0800 net: wan: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 98d728232c988da7109576a23e6e0295acb5cf2d Author: Peng Li Date: Tue May 25 22:07:53 2021 +0800 net: wan: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 687c87adc11a6b1bfae115ee6e7bcf822e7228b3 Author: Jiapeng Chong Date: Tue May 25 18:55:45 2021 +0800 net/hamradio/6pack: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/net/hamradio/6pack.c:728 sixpack_ioctl() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 307ea4ce3edd3f7d1130d3c35955aa77063296cc Author: Huazhong Tan Date: Tue May 25 17:22:03 2021 +0800 net: hns3: switch to dim algorithm for adaptive interrupt moderation The Linux kernel has support for a dynamic interrupt moderation algorithm known as "dimlib". Replace the custom driver-specific implementation of dynamic interrupt moderation with the kernel's algorithm. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ccc882f0d838cb45a1a78ea4e48c219887f920dc Author: Nigel Christian Date: Mon May 24 23:05:58 2021 -0500 net: bridge: remove redundant assignment The variable br is assigned a value that is not being read after exiting case IFLA_STATS_LINK_XSTATS_SLAVE. The assignment is redundant and can be removed. Addresses-Coverity ("Unused value") Signed-off-by: Nigel Christian Signed-off-by: David S. Miller commit f4e44b393389c77958f7c58bf4415032b4cda15b Author: Dai Ngo Date: Fri May 21 15:09:37 2021 -0400 NFSD: delay unmount source's export after inter-server copy completed. Currently the source's export is mounted and unmounted on every inter-server copy operation. This patch is an enhancement to delay the unmount of the source export for a certain period of time to eliminate the mount and unmount overhead on subsequent copy operations. After a copy operation completes, a work entry is added to the delayed unmount list with an expiration time. This list is serviced by the laundromat thread to unmount the export of the expired entries. Each time the export is being used again, its expiration time is extended and the entry is re-inserted to the tail of the list. The unmount task and the mount operation of the copy request are synced to make sure the export is not unmounted while it's being used. Signed-off-by: Dai Ngo Signed-off-by: J. Bruce Fields commit eac0b17a77fbd763d305a5eaa4fd1119e5a0fe0d Author: Olga Kornievskaia Date: Wed May 19 14:48:27 2021 -0400 NFSD add vfs_fsync after async copy is done Currently, the server does all copies as NFS_UNSTABLE. For synchronous copies linux client will append a COMMIT to the COPY compound but for async copies it does not (because COMMIT needs to be done after all bytes are copied and not as a reply to the COPY operation). However, in order to save the client doing a COMMIT as a separate rpc, the server can reply back with NFS_FILE_SYNC copy. This patch proposed to add vfs_fsync() call at the end of the async copy. Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit eeeadbb9bd5652c47bb9b31aa9ad8b4f1b4aa8b3 Author: J. Bruce Fields Date: Fri May 14 18:21:37 2021 -0400 nfsd: move some commit_metadata()s outside the inode lock The commit may be time-consuming and there's no need to hold the lock for it. More of these are possible, these were just some easy ones. Signed-off-by: J. Bruce Fields commit e5d74a2d0ee67ae00edad43c3d7811016e4d2e21 Author: Yu Hsiang Huang Date: Fri May 14 11:58:29 2021 +0800 nfsd: Prevent truncation of an unlinked inode from blocking access to its directory Truncation of an unlinked inode may take a long time for I/O waiting, and it doesn't have to prevent access to the directory. Thus, let truncation occur outside the directory's mutex, just like do_unlinkat() does. Signed-off-by: Yu Hsiang Huang Signed-off-by: Bing Jing Chang Signed-off-by: Robbie Ko Signed-off-by: J. Bruce Fields commit fb082cd59afa7fbd3a610e9835050675040b1b99 Author: Oleksij Rempel Date: Tue May 25 11:55:57 2021 -0700 Input: resistive-adc-touch - add support for z1 and z2 channels This patch adds support for the z1 and z2 channels. These are used to calculate the applied pressure. As there is no common order of the individual channels of a resistive touch ADC, support for io-channel-names is added (although the DT bindings stated the driver already supports these). Signed-off-by: Oleksij Rempel Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210525054634.9134-5-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit 241a952f90aab8ce1d67ce7194fafbb90085b388 Author: Oleksij Rempel Date: Tue May 25 11:55:41 2021 -0700 dt-bindings: touchscreen: resistive-adc-touch: add support for z1 and z2 channels For pressure calculation based on plates resistance we need some additional properties: - z1 and z2 channels with additional measurements between plates - actual resistance of the touchscreen. Currently we use only X-resistance. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210525054634.9134-4-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit ff7af0fe13b5254ba8467a4344ab53ab0445971e Author: Oleksij Rempel Date: Tue May 25 11:53:29 2021 -0700 dt-bindings: touchscreen: add touchscreen-x/y-plate-ohms property To calculate the pressure on a restrictive touchscreen we need to know resistance at least of X plate. Some calculations need to use both X and Y values. So let's add generic properties which can be used by all drivers. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210525054634.9134-3-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit 71d576d31f85a996ec4b5136553f40b1299fa5c5 Author: Oleksij Rempel Date: Tue May 25 11:53:09 2021 -0700 dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema Convert the resistive-adc-touch binding to DT schema format using json-schema. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210525054634.9134-2-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov commit e8049c4aa5d83e2a853e01f2a5543788d3a49777 Author: Yazen Ghannam Date: Tue May 25 19:48:34 2021 +0000 MAINTAINERS: Make Yazen Ghannam maintainer for EDAC-AMD64 Also, include the mce_amd* files under this section. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210525194834.2710362-1-Yazen.Ghannam@amd.com commit c8062d11e20c218b310145bc918e116423fb1e83 Author: Alain Volmat Date: Wed May 5 15:14:39 2021 +0200 i2c: stm32f7: add SMBus-Alert support Add support for the SMBus-Alert protocol to the STM32F7 that has dedicated control and status logic. If SMBus-Alert is used, the SMBALERT# pin must be configured as alternate function for I2C Alert. Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 168290fb26757d3f9732a466c59a5c45a01974f9 Author: Alain Volmat Date: Wed May 5 15:14:38 2021 +0200 i2c: add binding to mark a bus as supporting SMBus-Alert Since SMBus-Alert is an optional feature of SMBUS which requires an additional pin, the smbus binding cannot be used to indicate its support. Add an additional smbus-alert binding specific for it and update the description text of smbus to avoid mentioning SMBus-Alert Signed-off-by: Alain Volmat Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit e653312b5b77d758796f90bb602068068ca1afa2 Author: Jonathan Marek Date: Thu May 13 13:55:17 2021 -0400 i2c: qcom-cci: add sm8250 compatible SM8250 CCI is the same as SDM845, add an equivalent compatible for SM8250. Signed-off-by: Jonathan Marek Reviewed-by: Loic Poulain Reviewed-by: Vinod Koul Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 469668a58b68933ca48f616325be09685407adcb Author: Liang Chen Date: Thu Apr 29 16:11:42 2021 +0800 dt-bindings: i2c: i2c-rk3x: add description for rk3568 add "rockchip,rk3568-i2c", "rockchip,rk3399-i2c" for i2c nodes on a rk3568 platform to i2c-rk3x.yaml. Signed-off-by: Liang Chen Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit fade9c2c6ee2baea7df8e6059b3f143c681e5ce4 Author: Fuad Tabba Date: Mon May 24 09:30:01 2021 +0100 arm64: Rename arm64-internal cache maintenance functions Although naming across the codebase isn't that consistent, it tends to follow certain patterns. Moreover, the term "flush" isn't defined in the Arm Architecture reference manual, and might be interpreted to mean clean, invalidate, or both for a cache. Rename arm64-internal functions to make the naming internally consistent, as well as making it consistent with the Arm ARM, by specifying whether it applies to the instruction, data, or both caches, whether the operation is a clean, invalidate, or both. Also specify which point the operation applies to, i.e., to the point of unification (PoU), coherency (PoC), or persistence (PoP). This commit applies the following sed transformation to all files under arch/arm64: "s/\b__flush_cache_range\b/caches_clean_inval_pou_macro/g;"\ "s/\b__flush_icache_range\b/caches_clean_inval_pou/g;"\ "s/\binvalidate_icache_range\b/icache_inval_pou/g;"\ "s/\b__flush_dcache_area\b/dcache_clean_inval_poc/g;"\ "s/\b__inval_dcache_area\b/dcache_inval_poc/g;"\ "s/__clean_dcache_area_poc\b/dcache_clean_poc/g;"\ "s/\b__clean_dcache_area_pop\b/dcache_clean_pop/g;"\ "s/\b__clean_dcache_area_pou\b/dcache_clean_pou/g;"\ "s/\b__flush_cache_user_range\b/caches_clean_inval_user_pou/g;"\ "s/\b__flush_icache_all\b/icache_inval_all_pou/g;" Note that __clean_dcache_area_poc is deliberately missing a word boundary check at the beginning in order to match the efistub symbols in image-vars.h. Also note that, despite its name, __flush_icache_range operates on both instruction and data caches. The name change here reflects that. No functional change intended. Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-19-tabba@google.com Signed-off-by: Will Deacon commit 393239be1ba69dcd29be504ffe14938509795821 Author: Fuad Tabba Date: Mon May 24 09:30:00 2021 +0100 arm64: Fix cache maintenance function comments Fix and expand comments for the cache maintenance functions in cacheflush.h. Adds comments to functions that weren't described before. Explains what the functions do using Arm Architecture Reference Manual terminology. No functional change intended. Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-18-tabba@google.com Signed-off-by: Will Deacon commit 8c28d52ccd1d6e3a5aca8a37e465a5f8b77edbc1 Author: Fuad Tabba Date: Mon May 24 09:29:59 2021 +0100 arm64: sync_icache_aliases to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-17-tabba@google.com Signed-off-by: Will Deacon commit 406d7d4e2bc76d38a6dc88733a0f72fabf02d305 Author: Fuad Tabba Date: Mon May 24 09:29:58 2021 +0100 arm64: __clean_dcache_area_pou to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-16-tabba@google.com Signed-off-by: Will Deacon commit f749448edb9c98bece0aeec5536260a8794af24b Author: Fuad Tabba Date: Mon May 24 09:29:57 2021 +0100 arm64: __clean_dcache_area_pop to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-15-tabba@google.com Signed-off-by: Will Deacon commit 1f42faf1d25de2ae239f322fda8af1c92c20e953 Author: Fuad Tabba Date: Mon May 24 09:29:56 2021 +0100 arm64: __clean_dcache_area_poc to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. Because the code is shared with __dma_clean_area, it changes the parameters for that as well. However, __dma_clean_area is local to cache.S, so no other users are affected. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-14-tabba@google.com Signed-off-by: Will Deacon commit 814b186079cd54d3fe3b6b8ab539cbd44705ef9d Author: Fuad Tabba Date: Mon May 24 09:29:55 2021 +0100 arm64: __flush_dcache_area to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-13-tabba@google.com Signed-off-by: Will Deacon commit 163d3f80695e31068c7d32244c9e6d406d5c5c00 Author: Fuad Tabba Date: Mon May 24 09:29:54 2021 +0100 arm64: dcache_by_line_op to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-12-tabba@google.com Signed-off-by: Will Deacon commit e3974adb4ef591e898956083a3dfa6336bb88638 Author: Fuad Tabba Date: Mon May 24 09:29:53 2021 +0100 arm64: __inval_dcache_area to take end parameter instead of size To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. Because the code is shared with __dma_inv_area, it changes the parameters for that as well. However, __dma_inv_area is local to cache.S, so no other users are affected. No functional change intended. Reported-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-11-tabba@google.com Signed-off-by: Will Deacon commit d044f8141847bee542998a6fd8de2c270fe40e48 Author: Fuad Tabba Date: Mon May 24 09:29:52 2021 +0100 arm64: Fix comments to refer to correct function __flush_icache_range Many comments refer to the function flush_icache_range, where the intent is in fact __flush_icache_range. Fix these comments to refer to the intended function. That's probably due to commit 3b8c9f1cdfc506e9 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings"), which renamed flush_icache_range() to __flush_icache_range() and added a wrapper. No functional change intended. Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-10-tabba@google.com Signed-off-by: Will Deacon commit 06b7a568ca5e9cb79a0cc4737f498ea90d8fa89d Author: Fuad Tabba Date: Mon May 24 09:29:51 2021 +0100 arm64: Move documentation of dcache_by_line_op The comment describing the macro dcache_by_line_op is placed right before the previous macro of the one it describes, which is a bit confusing. Move it to the macro it describes (dcache_by_line_op). No functional change intended. Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-9-tabba@google.com Signed-off-by: Will Deacon commit 55272ecc3ada8ec947bb5e94ee2fcde6cf31e166 Author: Fuad Tabba Date: Mon May 24 09:29:50 2021 +0100 arm64: assembler: remove user_alt user_alt isn't being used anymore. It's also simpler and clearer to directly use alternative_insn and _cond_extable in-line when needed. Reported-by: Mark Rutland Link: https://lore.kernel.org/linux-arm-kernel/20210520125735.GF17233@C02TD0UTHF1T.local/ Signed-off-by: Fuad Tabba Acked-by: Mark Rutland Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-8-tabba@google.com Signed-off-by: Will Deacon commit 5e20e3499682c4f1724438d23afcafd473526a54 Author: Fuad Tabba Date: Mon May 24 09:29:49 2021 +0100 arm64: Downgrade flush_icache_range to invalidate Since __flush_dcache_area is called right before, invalidate_icache_range is sufficient in this case. Rewrite the comment to better explain the rationale behind the cache maintenance operations used here. No functional change intended. Possible performance impact due to invalidating only the icache rather than invalidating and cleaning both caches. Reported-by: Catalin Marinas Reported-by: Will Deacon Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/ Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Acked-by: Catalin Marinas Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-7-tabba@google.com Signed-off-by: Will Deacon commit 7908072da535dca52b3a011ed6e1f73534546b59 Author: Fuad Tabba Date: Mon May 24 09:29:48 2021 +0100 arm64: Do not enable uaccess for invalidate_icache_range invalidate_icache_range() works on kernel addresses, and doesn't need uaccess. Remove the code that toggles uaccess_ttbr0_enable, as well as the code that emits an entry into the exception table (via the macro invalidate_icache_by_line). Changes return type of invalidate_icache_range() from int (which used to indicate a fault) to void, since it doesn't need uaccess and won't fault. Note that return value was never checked by any of the callers. No functional change intended. Possible performance impact due to the reduced number of instructions. Reported-by: Catalin Marinas Reported-by: Will Deacon Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/ Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Acked-by: Catalin Marinas Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-6-tabba@google.com Signed-off-by: Will Deacon commit 116b7f559492b719ae4bd22ee773cb7fb046a736 Author: Fuad Tabba Date: Mon May 24 09:29:47 2021 +0100 arm64: Do not enable uaccess for flush_icache_range __flush_icache_range works on kernel addresses, and doesn't need uaccess. The existing code is a side-effect of its current implementation with __flush_cache_user_range fallthrough. Instead of fallthrough to share the code, use a common macro for the two where the caller specifies an optional fixup label if user access is needed. If provided, this label would be used to generate an extable entry. Simplify the code to use dcache_by_line_op, instead of replicating much of its functionality. No functional change intended. Possible performance impact due to the reduced number of instructions. Reported-by: Catalin Marinas Reported-by: Will Deacon Reported-by: Mark Rutland Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/ Link: https://lore.kernel.org/linux-arm-kernel/20210521121846.GB1040@C02TD0UTHF1T.local/ Signed-off-by: Fuad Tabba Acked-by: Mark Rutland Acked-by: Catalin Marinas Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-5-tabba@google.com Signed-off-by: Will Deacon commit 46710cf1fcb6235388e8d80619cdf2c196ad554b Author: Fuad Tabba Date: Mon May 24 09:29:46 2021 +0100 arm64: Apply errata to swsusp_arch_suspend_exit The Arm errata covered by ARM64_WORKAROUND_CLEAN_CACHE require that "dc cvau" instructions get promoted to "dc civac". Reported-by: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Fuad Tabba Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-4-tabba@google.com Signed-off-by: Will Deacon commit d11b187760f52480dd83bda0429ee3c94e542b1d Author: Mark Rutland Date: Mon May 24 09:29:45 2021 +0100 arm64: assembler: add conditional cache fixups It would be helpful if we could use both `dcache_by_line_op` and `invalidate_icache_by_line` for user memory without accidentally fixing up unexpected faults when performing maintenance on kernel addresses. Let's make this possible by having both macros take an optional fixup label, and only generating an extable entry if a label is provided. At the same time, let's clean up the labels used to be globally unique using \@ as we do for other macros. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Fuad Tabba Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Fuad Tabba Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-3-tabba@google.com Signed-off-by: Will Deacon commit e89d6cc51034998607502cd3899173bfa7189571 Author: Mark Rutland Date: Mon May 24 09:29:44 2021 +0100 arm64: assembler: replace `kaddr` with `addr` The `__dcache_op_workaround_clean_cache` and `dcache_by_line_op` macros are only expected to be usedc on kernel memory, without a user fault fixup, and so we named their address variables `kaddr` to make this clear. Subseuqent patches will modify these to also work on user memory with an (optional) user fault fixup, where `kaddr` won't make as much sense. To aid the legibility of patches, this patch (only) replaces `kaddr` with `addr` as a preparatory step. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Fuad Tabba Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Fuad Tabba Cc: Will Deacon Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210524083001.2586635-2-tabba@google.com Signed-off-by: Will Deacon commit cbb245239282870bc6f54d5137dfe0f84b48ea72 Merge: 94a332bd8626f 9f4ad9e425a1d Author: Dmitry Torokhov Date: Tue May 25 11:24:42 2021 -0700 Merge tag 'v5.12' into next Sync up with mainline to get the latest device tree bindings and kernel APIs. commit 40221c737608cf324870c58ef063159c3a6a4c81 Author: Anshuman Khandual Date: Mon May 24 13:10:30 2021 +0530 arm64/mm: Make vmemmap_free() available only with CONFIG_MEMORY_HOTPLUG vmemmap_free() callsites (mm/sparse.c) and declaration (include/linux/mm.h) are protected with CONFIG_MEMORY_HOTPLUG. This function is not required if CONFIG_MEMORY_HOTPLUG is not enabled. Hence move the config wrapper outside the function definition. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/1621842030-23256-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 3d0cca0b02ac98eac9157b26cf3951997db68b37 Author: Evgenii Stepanov Date: Thu May 20 18:00:23 2021 -0700 kasan: speed up mte_set_mem_tag_range Use DC GVA / DC GZVA to speed up KASan memory tagging in HW tags mode. The first cacheline is always tagged using STG/STZG even if the address is cacheline-aligned, as benchmarks show it is faster than a conditional branch. Signed-off-by: Evgenii Stepanov Co-developed-by: Peter Collingbourne Signed-off-by: Peter Collingbourne Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20210521010023.3244784-1-eugenis@google.com Signed-off-by: Will Deacon commit 63ebdb77afa96068ac570e87643eb4cd5b3e31c3 Author: Mark Brown Date: Tue May 18 17:33:31 2021 +0100 kselftest/arm64: Add missing newline to SVE test skipping output The newline is expected to come from the caller but got missed for this test. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210518163331.38268-1-broonie@kernel.org Signed-off-by: Will Deacon commit ca940790d2ddc91e976f1e9e685052a54a1c50cf Author: Mark Brown Date: Wed May 12 17:23:50 2021 +0100 arm64: Document requirement for access to FEAT_HCX v8.7 of the architecture introduced FEAT_HCX which adds an additional hypervisor configuration register HCRX_EL2. Even though Linux does not currently make use of this feature let's document that the EL3 trap for access to the register should be disabled so that we are able to make use of it in future. Signed-off-by: Mark Brown Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210512162350.20349-1-broonie@kernel.org Signed-off-by: Will Deacon commit e377ab82311af95c99648c6424a6b888a0ccb102 Author: Anshuman Khandual Date: Mon May 10 16:37:51 2021 +0530 arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad() Semantics wise, [pud|pmd]_bad() have always implied that a given [PUD|PMD] entry does not have a pointer to the next level page table. This had been made clear in the commit a1c76574f345 ("arm64: mm: use *_sect to check for section maps"). Hence explicitly check for a table entry rather than just testing a single bit. This basically redefines [pud|pmd]_bad() in terms of [pud|pmd]_table() making the semantics clear. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Acked-by: Catalin Marinas Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1620644871-26280-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit eb2b22f024c3615d576cead56f2a7d2c90355716 Author: Junhao He Date: Tue May 11 20:27:34 2021 +0800 drivers/perf: arm-cci: Fix checkpatch spacing error Fix some coding style issues reported by checkpatch.pl, including following types: ERROR: need consistent spacing around '-' (ctx:WxV) ERROR: space required before the open parenthesis '(' Signed-off-by: Junhao He Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620736054-58412-5-git-send-email-f.fangjian@huawei.com Signed-off-by: Will Deacon commit a9f00c9760febb84215bcb489855b5b23e3ab4dc Author: Junhao He Date: Tue May 11 20:27:33 2021 +0800 drivers/perf: arm-cmn: Add space after ',' Fix a warning from checkpatch.pl. ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Junhao He Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620736054-58412-4-git-send-email-f.fangjian@huawei.com Signed-off-by: Will Deacon commit f265fd166bce9837ce1ae6c2a4b56f8bd18d1fe4 Author: Junhao He Date: Tue May 11 20:27:32 2021 +0800 drivers/perf: arm_pmu: Fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including following types: ERROR: spaces required around that '=' (ctx:VxW) WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Junhao He Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620736054-58412-3-git-send-email-f.fangjian@huawei.com Signed-off-by: Will Deacon commit 27e4482075718997b366e19eaa81aeb7e42e1df3 Author: Junhao He Date: Tue May 11 20:27:31 2021 +0800 drivers/perf: arm_spe_pmu: Fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including following types: WARNING: void function return statements are not generally useful WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Junhao He Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620736054-58412-2-git-send-email-f.fangjian@huawei.com Signed-off-by: Will Deacon commit bf2367aaed73f06a43c0be3c61dafdc59f986161 Author: Zou Wei Date: Tue May 11 14:42:44 2021 +0800 drivers/perf: Remove redundant dev_err call in tx2_uncore_pmu_init_dev() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620715364-107460-1-git-send-email-zou_wei@huawei.com Signed-off-by: Will Deacon commit 7e04cc918954f9090952e8d17cb2c3c4a5ad055e Author: Anshuman Khandual Date: Mon May 10 17:52:06 2021 +0530 arm64/mm: Validate CONFIG_PGTABLE_LEVELS CONFIG_PGTABLE_LEVELS has been statically defined in (arch/arm64/Kconfig) depending on the page size and requested virtual address range. In order to validate this page table levels selection this adds a BUILD_BUG_ON() as per the existing formula ARM64_HW_PGTABLE_LEVELS(). This would help protect any inadvertent changes to CONFIG_PGTABLE_LEVELS selection. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/1620649326-24115-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 7d7b720a4b8049446cffce870b1dd3ffa89d4b40 Author: Madhavan T. Venkataraman Date: Mon May 10 12:00:26 2021 +0100 arm64: Implement stack trace termination record Reliable stacktracing requires that we identify when a stacktrace is terminated early. We can do this by ensuring all tasks have a final frame record at a known location on their task stack, and checking that this is the final frame record in the chain. We'd like to use task_pt_regs(task)->stackframe as the final frame record, as this is already setup upon exception entry from EL0. For kernel tasks we need to consistently reserve the pt_regs and point x29 at this, which we can do with small changes to __primary_switched, __secondary_switched, and copy_process(). Since the final frame record must be at a specific location, we must create the final frame record in __primary_switched and __secondary_switched rather than leaving this to start_kernel and secondary_start_kernel. Thus, __primary_switched and __secondary_switched will now show up in stacktraces for the idle tasks. Since the final frame record is now identified by its location rather than by its contents, we identify it at the start of unwind_frame(), before we read any values from it. External debuggers may terminate the stack trace when FP == 0. In the pt_regs->stackframe, the PC is 0 as well. So, stack traces taken in the debugger may print an extra record 0x0 at the end. While this is not pretty, this does not do any harm. This is a small price to pay for having reliable stack trace termination in the kernel. That said, gdb does not show the extra record probably because it uses DWARF and not frame pointers for stack traces. Signed-off-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown [Mark: rebase, use ASM_BUG(), update comments, update commit message] Signed-off-by: Mark Rutland Link: https://lore.kernel.org/r/20210510110026.18061-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit 3cdef2a9f27df8d3b4f356f812732e43597ca293 Author: José Roberto de Souza Date: Mon May 24 14:48:05 2021 -0700 drm/i915/display/adl_p: Disable PSR2 We are missing the implementation of some workarounds to enabled PSR2 in Alderlake P, so to avoid any CI report of issues around PSR2 disabling it until all PSR2 workarounds are implemented. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20210524214805.259692-5-jose.souza@intel.com commit 95f7f7d34b057b6d5b167cddd220504fc57a0d3d Author: José Roberto de Souza Date: Mon May 24 14:48:04 2021 -0700 drm/i915/display/adl_p: Allow DC3CO in pipe and port B DC3CO is allowed in all the combinations between pipe and port A and B on alderlake-P. BSpec: 49196 Cc: Anshuman Gupta Cc: Gwan-gyeong Mun Cc: Matt Atwood Signed-off-by: José Roberto de Souza Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20210524214805.259692-4-jose.souza@intel.com commit b554065cb6fc665bf0dac61cc6e79c73c4e4e21e Author: José Roberto de Souza Date: Mon May 24 14:48:03 2021 -0700 drm/i915: WA for zero memory channel Commit c457d9cf256e ("drm/i915: Make sure we have enough memory bandwidth on ICL") assumes that we always have a non-zero dram_info->channels and uses it as a divisor. We need num memory channels to be at least 1 for sane bw limits checking, even when PCode returns 0 or there is a error reading it, so lets force it to 1 in this case. Cc: Stanislav Lisovskiy Cc: Rodrigo Vivi Cc: Ville Syrjälä Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20210524214805.259692-3-jose.souza@intel.com commit 8c80332d6735a39f87bb1362c54fa6ede5a844d3 Author: José Roberto de Souza Date: Mon May 24 14:48:02 2021 -0700 drm/i915/adl_p: Handle TC cold On ADL-P TC cold is exited and blocked when legacy aux is powered, that is exacly the same of what ICL need for static TC ports. TODO: When a TBT hub or monitor is connected it will cause TBT and legacy aux to be powered at the same time, hopefully this will not cause any issues but if it do, some rework will be needed. v2: - skip icl_tc_port_assert_ref_held() warn on, adl-p uses aux to block TC cold v3: - Drop icl_tc_port_assert_ref_held() earlier return for adl_p, not needed anymore - Set timeout_expected when enabling aux power well as port could be disconnected when tc_cold_block() is called BSpec: 55480 Cc: Imre Deak Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20210524214805.259692-2-jose.souza@intel.com commit 68b87ef252e0af8012afc6b92c727a05f9cde602 Author: José Roberto de Souza Date: Mon May 24 14:48:01 2021 -0700 drm/i915/display/adl_p: Drop earlier return in tc_has_modular_fia() MODULAR_FIA_MASK is set in adl_p so we can drop this ealier return and read registers. Also to avoid warnings from icl_tc_port_assert_ref_held() when calling tc_cold_block() in this functions it is necessary to held the lock. Cc: Imre Deak Signed-off-by: José Roberto de Souza Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20210524214805.259692-1-jose.souza@intel.com commit 98761ce4b91b77e0602b1551d11925e817e8a9a5 Author: Uwe Kleine-König Date: Wed Apr 28 11:05:26 2021 +0200 pwm: spear: Implement .apply() callback Just using the previous callbacks to implment a similar procedure as the legacy handling in the core. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit da0dea8912697f725d5f1386a38cb035222e7468 Author: Uwe Kleine-König Date: Wed Apr 28 11:05:25 2021 +0200 pwm: spear: Free resources only after pwmchip_remove() Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clocks. The check for pwmchip_remove()'s return value is dropped as this function returns effectively always 0 and returning an error in a remove callback is useless anyhow (as the device core ignores it and drops devm allocated resources). Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b601a18f12383001e7a8da238de7ca1559ebc450 Author: Uwe Kleine-König Date: Wed Apr 28 11:05:24 2021 +0200 pwm: spear: Don't modify HW state in .remove callback A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 937efa29e70f7f8424b74631375dcb35d82a4614 Author: Uwe Kleine-König Date: Mon Apr 26 17:03:50 2021 +0200 pwm: visconti: Fix and simplify period calculation With the original code a request for period = 65536000 ns and period = 32768000 ns yields the same register settings (which results in 32768000 ns) because the value for pwmc0 was miscalculated. Also simplify using that fls(0) is 0. Fixes: 721b595744f1 ("pwm: visconti: Add Toshiba Visconti SoC PWM support") Signed-off-by: Uwe Kleine-König Acked-by: Nobuhiro Iwamatsu Signed-off-by: Thierry Reding commit 21e4614b2f6965c839f89dd4bd3092b2ee264d0e Author: Harold Mertzweiller Date: Mon May 24 17:21:26 2021 +0200 staging: emxx_udc: fix alignment issues Three function calls can now be properly formatted inside the 100 characters limit. Signed-off-by: Harold Mertzweiller Link: https://lore.kernel.org/r/20210524152128.20519-1-harold@mrtz.fr Signed-off-by: Greg Kroah-Hartman commit b67decf85fd3acdee900826704d913d4329c910b Author: Bryan Brattlof Date: Mon May 24 19:53:13 2021 +0000 staging: rtl8723bs: remove sd_f0_read8() The sd_f0_read8() function, which is used by the sdio_f0_read8() function, are not used anywhere in the driver and both can be safely removed. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210524195144.1943280-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit a75d6a3279110d8144f7209afa4e1f1680741412 Author: Phillip Potter Date: Mon May 24 23:45:32 2021 +0100 staging: rtl8188eu: remove ASSERT and ODM_RT_ASSERT macros Remove the ASSERT and ODM_RT_ASSERT macros from include/odm_debug.h as they are unnecessary. ASSERT does nothing, compiling to a single empty statement. ODM_RT_ASSERT is used in only one place, in the ODM_RAStateCheck function with hal/odm.c - it seems to have been intended as an assertion of some kind, but given it is always called with false here, there is little point in it not just being a pr_info() call. Also, the lines relating to the file, function and line number are not needed as the pr_info() with the function name and error message is sufficient should anyone wish to track down this error at a source level, within what is currently a relatively small function. Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210524224532.1230-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 85487bd7218793321cfd80c9462f2b6bfb53a39b Author: Shreyansh Chouhan Date: Mon May 24 19:21:05 2021 +0530 staging: rtl8723bs: fix suspect indents Removed extra spaces and indents from core/rtw_wlan_util.c. Signed-off-by: Shreyansh Chouhan Link: https://lore.kernel.org/r/20210524135105.5550-4-chouhan.shreyansh630@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f5193f828feb59e8aeaf162160ceef9bd82ffd2 Author: Shreyansh Chouhan Date: Mon May 24 19:21:04 2021 +0530 staging: rtl8723bs: remove unnecessary braces from conditionals Removed the braces from if else statements in core/rtw_wlan_util.c since the previous commit (6a257dd6de516573) caused all conditional blocks to have a single statement in the function check_assoc_AP. Signed-off-by: Shreyansh Chouhan Link: https://lore.kernel.org/r/20210524135105.5550-3-chouhan.shreyansh630@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c8c577fd2fcf3587f16a2a9e8174c9f849cb7a6 Author: Shreyansh Chouhan Date: Mon May 24 19:21:03 2021 +0530 staging: rtl8723bs: refactor to reduce indents Reduce the number of indents in rtw_wlan_util.c file by refactoring the code. Moved the part of code that rearranged ac paramaters in the function WMMOnAssocResp to a separate function named sort_wmm_ac_params. It takes both the array of ac params and their indexes as arguments and sorts them. Has return type void. Moved the part of code that checked IE for realtek vendor in the function check_assoc_AP to a separate function named get_realtek_assoc_AP_vender. It takes a struct ndis_80211_var_ie * as an argument and returns u32 realtek vendor. Signed-off-by: Shreyansh Chouhan Link: https://lore.kernel.org/r/20210524135105.5550-2-chouhan.shreyansh630@gmail.com Signed-off-by: Greg Kroah-Hartman commit f57e6d91a8735c321ecace865d4619602bf532c8 Author: Fabio M. De Francesco Date: Mon May 24 13:34:33 2021 +0200 staging: rtl8723bs: core: rtw_mlme_ext.c: Remove set but unused variable Removed set but unused 'reason_code' variable. Issue detected by GCC running with the warning option -Wunused-but-set-variable. Suggested-by: Dan Carpenter Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210524113433.25923-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit db52e8f48067ba355ebf69a90117791b78ea77ab Author: Fabio M. De Francesco Date: Sun May 23 19:45:47 2021 +0200 staging: rtl8723bs: hal: Remove set but unused variables Removed set but unused variables. Issue detected by GCC running with the warning option -Wunused-but-set-variable. Removed the storage of the values returned but left the reads because it is possible that removing them can prevent the hardware from working properly. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210523174547.20646-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6ec070e872a1b2af4d12016d2d404115d9de5c25 Author: Thomas Bracht Laumann Jespersen Date: Fri May 21 21:37:12 2021 +0200 staging: rtl8192e: Fix shadowed variable name Fixes the following sparse warning: drivers/staging/rtl8192e/rtllib_tx.c:884:32: warning: symbol 'tcb_desc' shadows an earlier one drivers/staging/rtl8192e/rtllib_tx.c:569:24: originally declared here Signed-off-by: Thomas Bracht Laumann Jespersen Link: https://lore.kernel.org/r/20210521193711.5457-1-t@laumann.xyz Signed-off-by: Greg Kroah-Hartman commit 939ef16943a85904933466f0f934229dde27715e Author: Hriday Hegde Date: Fri May 21 08:39:16 2021 -0700 staging: rtl8712: Removed unnecessary blank lines Following lines were fixed as dictated by running checkpatch CHECK: Please don't use multiple blank lines 65: FILE: drivers/staging/rtl8712/xmit_linux.c:65: + CHECK: Blank lines aren't necessary after an open brace '{' 39: FILE: drivers/staging/rtl8712/usb_intf.c:39: +static const struct usb_device_id rtl871x_usb_id_tbl[] = { CHECK: Blank lines aren't necessary after an open brace '{' 849: FILE: drivers/staging/rtl8712/rtl871x_xmit.c:849: +{ CHECK: Please don't use multiple blank lines 260: FILE: drivers/staging/rtl8712/rtl871x_sta_mgt.c:260: + Signed-off-by: Hriday Hegde Link: https://lore.kernel.org/r/20210521153924.22843-1-hridayhegde1999@gmail.com Signed-off-by: Greg Kroah-Hartman commit a1b8a9bbce45ab3107473476b294ff45b5ceb146 Author: Fabio Aiuto Date: Fri May 21 16:41:58 2021 +0200 staging: rtl8723bs: moved contexts for arc4 encryption in struct security_priv moved struct arc4_ctx in struct security_priv to avoid stack allocation inside encryption routines. this has been done to fix the following 0-DAY issues: >> drivers/staging/rtl8723bs/core/rtw_security.c:89:6: warning: stack frame size of 1120 bytes in function 'rtw_wep_encrypt' [-Wframe-$ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) ^ >> drivers/staging/rtl8723bs/core/rtw_security.c:145:6: warning: stack frame size of 1088 bytes in function 'rtw_wep_decrypt' [-Wframe$ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe) ^ >> drivers/staging/rtl8723bs/core/rtw_security.c:514:5: warning: stack frame size of 1136 bytes in function 'rtw_tkip_encrypt' [-Wfram$ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) ^ >> drivers/staging/rtl8723bs/core/rtw_security.c:586:5: warning: stack frame size of 1104 bytes in function 'rtw_tkip_decrypt' [-Wfram$ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) ^ Reported-by: kernel test robot Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210521144158.2440-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e9fdf122cf3442573d811c0cb664d6b5c30b7780 Author: Uwe Kleine-König Date: Mon May 10 16:06:40 2021 +0200 pwm: Simplify all drivers with explicit of_pwm_n_cells = 3 With the previous commit there is no need for the lowlevel driver any more to specify it it uses two or three cells. So simplify accordingly. The only non-trival change affects the pwm-rockchip driver: It used to only support three cells if the hardware supports polarity. Now the default number depends on the device tree which has to match hardware anyhow (and if it doesn't the error is just a bit delayed as a PWM handle with an inverted setting is catched when pwm_apply_state() is called). Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 69230cfac3d02c1b8d78aa7bdb29a1710147d49b Author: Uwe Kleine-König Date: Mon May 10 16:06:39 2021 +0200 pwm: Autodetect default value for of_pwm_n_cells from device tree This allows to simplify all drivers that use three pwm-cells. The only ugly side effect is that if a driver specified of_pwm_n_cells = 2 it suddenly supports device trees that use #pwm-cells = <3>. This however isn't a bad thing because the driver doesn't need explicit support for three cells as the core handles all the details. Also there is no such in-tree driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 5447e7833629ee4208b7d41862ab0249d6b50077 Author: Uwe Kleine-König Date: Mon May 10 16:06:38 2021 +0200 pwm: Drop of_pwm_simple_xlate() in favour of of_pwm_xlate_with_flags() Since the previous commit the latter function can do everything that the former does. So simplify accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit cf38c978cf1d2a28deaf34842aef692a959fa9e6 Author: Uwe Kleine-König Date: Mon May 10 16:06:37 2021 +0200 pwm: Make of_pwm_xlate_with_flags() work with #pwm-cells = <2> The two functions of_pwm_simple_xlate() and of_pwm_xlate_with_flags() are quite similar. of_pwm_simple_xlate() only supports two-cell PWM specifiers while of_pwm_xlate_with_flags() only supports PWM specifiers with 3 or more cells. The latter can easily be modified to behave identically to of_pwm_simple_xlate() for two-cell PWM specifiers. This is implemented here and allows to drop of_pwm_simple_xlate() in the next commit. There is a small detail that is different now in the two-cell specifier case in of_pwm_xlate_with_flags(): pwm->args.polarity is unconditionally initialized to PWM_POLARITY_NORMAL in the latter. I didn't find a case where this matters and doing that explicitly is the more robust approach. Signed-off-by: Uwe Kleine-König [thierry.reding@gmail.com: fix up checkpatch warnings] Signed-off-by: Thierry Reding commit e1543d83ed55120a860cbaad9e5421afc44c36ff Author: Andrey Grodzovsky Date: Fri May 21 16:41:22 2021 -0400 drm/amdgpu: Fix crash when hot unplug in BACO Problem: When device goes into runtime suspend due to prolonged inactivity (e.g. BACO sleep) and then hot unplugged, PCI core will try to wake up the device as part of unplug process. Since the device is gone all HW programming during rpm resume fails leading to a bad SW state later during pci remove handling. Fix: Use a flag we use for PCIe error recovery to avoid accessing registres. This allows to successfully complete rpm resume sequence and finish pci remove. v2: Renamed HW access block flag Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1081 Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-2-andrey.grodzovsky@amd.com commit adfea97e49297f376b7481041e7ec022b358fa66 Author: Alex Elder Date: Tue Apr 13 12:05:53 2021 -0500 arm64: dts: qcom: sm8350-mtp: enable IPA Enable IPA for the SM8350 MTP. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210413170553.1778792-3-elder@linaro.org Signed-off-by: Bjorn Andersson commit f11d3e7da32e5f3f063f0ee0ed83295c303462c2 Author: Alex Elder Date: Tue Apr 13 12:05:52 2021 -0500 arm64: dts: qcom: sm8350: add IPA information Add IPA-related nodes and definitions to "sm8350.dtsi", which uses IPA v4.9. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210413170553.1778792-2-elder@linaro.org Signed-off-by: Bjorn Andersson commit 7afefb81b72cbc35aea44ed741bc1e9ee915e4c9 Author: Andrey Grodzovsky Date: Fri May 21 16:41:21 2021 -0400 drm/amdgpu: Rename flag which prevents HW access Make it's name not feature but function descriptive. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-1-andrey.grodzovsky@amd.com commit 710071479cf8c6127791427561a6ba4ee916c07f Author: Mark Kettenis Date: Thu May 20 19:13:06 2021 +0200 dt-bindings: pinctrl: Add DT bindings for apple, pinctrl The Apple GPIO controller is a simple combined pin and GPIO conroller present on Apple ARM SoC platforms, including various iPhone and iPad devices and the "Apple Silicon" Macs. Signed-off-by: Mark Kettenis Link: https://lore.kernel.org/r/20210520171310.772-2-mark.kettenis@xs4all.nl Signed-off-by: Linus Walleij commit 5c42903e144b8e914ea22098f872669188680d9b Author: Axel Lin Date: Mon May 24 20:37:35 2021 +0800 regulator: rt4831: Add missing .owner field in regulator_desc Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin Message-Id: <20210524123735.2363676-1-axel.lin@ingics.com> Signed-off-by: Mark Brown commit 15413ce566c248967c96f71f824b79aa8d328e03 Author: Axel Lin Date: Sat May 22 10:30:18 2021 +0800 regulator: mp5416: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Message-Id: <20210522023018.2025188-1-axel.lin@ingics.com> Signed-off-by: Mark Brown commit e1e8d55bb90c9a07aa66a0c9fa17bd5a67d2689c Author: Axel Lin Date: Tue May 25 18:27:08 2021 +0800 regulator: mp886x: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Message-Id: <20210525102708.2519323-1-axel.lin@ingics.com> Signed-off-by: Mark Brown commit e0f339213c3bf1b2a8790bd6b5783e383818526b Author: Axel Lin Date: Thu May 20 19:27:19 2021 +0800 regulator: qcom_smd: Make pm8953_lnldo linear_ranges entries properly sorted For better readability, make linear_ranges entries sort by selector. Signed-off-by: Axel Lin Message-Id: <20210520112719.1814396-1-axel.lin@ingics.com> Signed-off-by: Mark Brown commit d5bd87e3a39e2f696583357899fefe1f4c6987c1 Author: Wei Yongjun Date: Mon May 24 13:35:53 2021 +0000 ASoC: imx-card: Make some symbols static The sparse tool complains as follows: sound/soc/fsl/imx-card.c:121:27: warning: symbol 'ak4458_fs_mul' was not declared. Should it be static? sound/soc/fsl/imx-card.c:138:31: warning: symbol 'ak4458_tdm_fs_mul' was not declared. Should it be static? sound/soc/fsl/imx-card.c:149:27: warning: symbol 'ak4497_fs_mul' was not declared. Should it be static? sound/soc/fsl/imx-card.c:166:27: warning: symbol 'ak5558_fs_mul' was not declared. Should it be static? sound/soc/fsl/imx-card.c:180:31: warning: symbol 'ak5558_tdm_fs_mul' was not declared. Should it be static? Those symbols are not used outside of imx-card.c, so marks them static. Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Message-Id: <20210524133553.2366502-1-weiyongjun1@huawei.com> Signed-off-by: Mark Brown commit 2eadc04d83f6c791784190208fd77dac3a2c052b Author: YueHaibing Date: Mon May 24 19:51:31 2021 +0800 ASoC: tlv320aic26: use DEVICE_ATTR_RW macro Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Message-Id: <20210524115131.46288-1-yuehaibing@huawei.com> Signed-off-by: Mark Brown commit 0e91438ff7045d89b3e82bcef90fadd002eb1c74 Author: Lucas Tanure Date: Tue May 25 10:08:22 2021 +0100 ASoC: cs42l42: Check jack status before reporting button events Jack must be connected before reporting button events and if the jack is disconnected button release must be reported Signed-off-by: Lucas Tanure Reviewed-by: Richard Fitzgerald Message-Id: <20210525090822.64577-4-tanureal@opensource.cirrus.com> Signed-off-by: Mark Brown commit 4b38da6ffd6227c930be5c246f6f0f8ef3a80f16 Author: Lucas Tanure Date: Tue May 25 10:08:21 2021 +0100 ASoC: cs42l42: Add support for 2400000 Bit clock Add support for 2.4MHz clock source Signed-off-by: Lucas Tanure Reviewed-by: Richard Fitzgerald Message-Id: <20210525090822.64577-3-tanureal@opensource.cirrus.com> Signed-off-by: Mark Brown commit f5b49d98516c12aff40896782aa37be77d3c616e Author: Lucas Tanure Date: Tue May 25 10:08:20 2021 +0100 ASoC: cs42l42: Add support for 2304000 Bit clock Add support for 24bits, 2 channels, 48k Sample rate bit clock Signed-off-by: Lucas Tanure Reviewed-by: Richard Fitzgerald Message-Id: <20210525090822.64577-2-tanureal@opensource.cirrus.com> Signed-off-by: Mark Brown commit 1c52825c38fc4e44c61ed75a8ae32f5fa580383b Author: Lucas Tanure Date: Tue May 25 10:08:19 2021 +0100 ASoC: cs42l42: Fix 1536000 Bit Clock instability The 16 Bits, 2 channels, 48K sample rate use case needs to configure a safer pll_divout during the start of PLL After 800us from the start of PLL the correct pll_divout can be set Signed-off-by: Lucas Tanure Reviewed-by: Richard Fitzgerald Message-Id: <20210525090822.64577-1-tanureal@opensource.cirrus.com> Signed-off-by: Mark Brown commit d4e9889b02014a07c8dba3fbbae7205ea4084350 Merge: eb37ca9c98ae1 41daf6ba594d5 Author: Mark Brown Date: Tue May 25 16:44:26 2021 +0100 Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.14 commit a82adc7650044b5555d65078bda07866efa4a73d Author: Pavel Begunkov Date: Mon May 17 14:30:12 2021 +0100 futex: Deduplicate cond_resched() invocation in futex_wake_op() After pagefaulting in futex_wake_op() both branches do cond_resched() before retry. Deduplicate it as compilers cannot figure it out themself. Signed-off-by: Pavel Begunkov Signed-off-by: Thomas Gleixner Reviewed-by: Davidlohr Bueso Link: https://lore.kernel.org/r/9b2588c1fd33c91fb01c4e348a3b647ab2c8baab.1621258128.git.asml.silence@gmail.com commit 130708331bc6b03a3c3a78599333faddfebbd0f3 Author: Yuan ZhaoXiong Date: Sun May 23 21:31:30 2021 +0800 cpu/hotplug: Simplify access to percpu cpuhp_state It is unnecessary to invoke per_cpu_ptr() everytime to access cpuhp_state. Use the available pointer instead. Signed-off-by: Yuan ZhaoXiong Signed-off-by: Thomas Gleixner Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/1621776690-13264-1-git-send-email-yuanzhaoxiong@baidu.com commit f56b273cd845a1139f8e37437367bca314e67b1c Author: Rikard Falkeborn Date: Wed May 12 20:01:40 2021 +0200 pinctrl: at91: Constify struct at91_pinctrl_mux_ops The at91_pinctrl_mux_ops struct is never modified by the driver. Make it const wherever it is possible to allow the compiler to put the static variables in read-only memory. Note that sam9x60_ops was already const, but the const was cast away when the return value of of_match_device() was cast to a pointer to a non-const struct at91_pinctrl_mux_ops. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210512180140.33293-1-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit 9b882b73d37932a5ba20d7fdcbe6e3191d9582cd Author: Jonathan Neuschäfer Date: Thu May 13 18:09:47 2021 +0200 pinctrl: npcm: Align a few entries in the pin function table The entries for GPIO 33 and 34 are not properly aligned. Fix the alignment. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210513160947.1716185-1-j.neuschaefer@gmx.net Signed-off-by: Linus Walleij commit 1ca46d3e43569186bd1decfb02a6b4c4ddb4304b Author: Maximilian Luz Date: Wed May 12 23:03:16 2021 +0200 pinctrl/amd: Add device HID for new AMD GPIO controller Add device HID AMDI0031 to the AMD GPIO controller driver match table. This controller can be found on Microsoft Surface Laptop 4 devices and seems similar enough that we can just copy the existing AMDI0030 entry. Cc: # 5.10+ Tested-by: Sachi King Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210512210316.1982416-1-luzmaximilian@gmail.com Signed-off-by: Linus Walleij commit 71c689dc2e732d4cb190aaf0edea73116b1611bd Author: Hans Verkuil Date: Tue Apr 27 14:07:03 2021 +0200 media: v4l2-ctrls: split up into four source files The v4l2-ctrls.c source has become much too big, so split it up into four separate parts: v4l2-ctrls-core.c: contains the core framework code v4l2-ctrls-api.c: contains the uAPI interface to the framework v4l2-ctrls-defs.c: contains the control definitions v4l2-ctrls-request.c: contains the Request API helpers And it adds a new v4l2-ctrls-priv.h. No code was changed, but a number of checkpatch.pl warnings were fixed (alignment, f == NULL -> !f, long comment block coding style, unsigned -> unsigned int). The copyright statements were updated as well since they were quite out of date. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3bf5129f33923c92bf3bddaf4359b7b25ecb4ba Author: Hans Verkuil Date: Tue Apr 27 10:38:33 2021 +0200 media: v4l2-ctrls: always copy the controls on completion When v4l2_ctrl_request_complete() is called and there is no control handler object found in the request, then create such an object so that all controls at completion state can be stored and are available to userspace. Otherwise any attempt by userspace to read the completed request data will fail. If allocating the control handler object failed, then indicate that by returning ENOMEM when attempting to get the controls from the completed request instead of returning ENOENT. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 48f7eee81cd53a94699d28959566b41a9dcac1d9 Author: Brian Gerst Date: Mon May 24 14:17:07 2021 -0400 x86/syscalls: Don't adjust CFLAGS for syscall tables The syscall_*.c files only contain data (the syscall tables). There is no need to adjust CFLAGS for tracing and stack protector since they contain no code. Signed-off-by: Brian Gerst Signed-off-by: Thomas Gleixner Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210524181707.132844-4-brgerst@gmail.com commit fd9e8691f38712892fa2ac73132dcc8b85b07a8f Author: Brian Gerst Date: Mon May 24 14:17:06 2021 -0400 x86/syscalls: Remove -Wno-override-init for syscall tables Commit 44fe4895f47c ("Stop filling syscall arrays with *_sys_ni_syscall") removes the need for -Wno-override-init, since the table is now filled sequentially instead of overriding a default value. Signed-off-by: Brian Gerst Signed-off-by: Thomas Gleixner Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210524181707.132844-3-brgerst@gmail.com commit d48ca5b98fa5d21444e04bb17373d339200b679a Author: Brian Gerst Date: Mon May 24 14:17:05 2021 -0400 x86/uml/syscalls: Remove array index from syscall initializers The recent syscall table generator rework removed the index from the initializers for native x86 syscall tables, but missed the UML syscall tables. Fixes: 44fe4895f47c ("Stop filling syscall arrays with *_sys_ni_syscall") Signed-off-by: Brian Gerst Signed-off-by: Thomas Gleixner Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210524181707.132844-2-brgerst@gmail.com commit 1eb8a49836949a77c4f7d738786719e7fde0c333 Author: Masahiro Yamada Date: Tue May 25 20:54:20 2021 +0900 x86/syscalls: Clear 'offset' and 'prefix' in case they are set in env If the environment variable 'prefix' is set on the build host, it is wrongly used as syscall macro prefixes. $ export prefix=/usr $ make -s defconfig all In file included from ./arch/x86/include/asm/unistd.h:20, from :2: ./arch/x86/include/generated/uapi/asm/unistd_64.h:4:9: warning: missing whitespace after the macro name 4 | #define __NR_/usrread 0 | ^~~~~ arch/x86/entry/syscalls/Makefile should clear 'offset' and 'prefix'. Fixes: 3cba325b358f ("x86/syscalls: Switch to generic syscallhdr.sh") Reported-by: Naresh Kamboju Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210525115420.679416-1-masahiroy@kernel.org commit 706474fbc5fedd7799b488962aad3541b235165b Author: Alexander Aring Date: Fri May 21 15:08:48 2021 -0400 fs: dlm: don't allow half transmitted messages This patch will clean a dirty page buffer if a reconnect occurs. If a page buffer was half transmitted we cannot start inside the middle of a dlm message if a node connects again. I observed invalid length receptions errors and was guessing that this behaviour occurs, after this patch I never saw an invalid message length again. This patch might drops more messages for dlm version 3.1 but 3.1 can't deal with half messages as well, for 3.2 it might trigger more re-transmissions but will not leave dlm in a broken state. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 5b2f981fde8b0dbf0bfa117bb4322342fcfb7174 Author: Alexander Aring Date: Fri May 21 15:08:47 2021 -0400 fs: dlm: add midcomms debugfs functionality This patch adds functionality to debug midcomms per connection state inside a comms directory which is similar like dlm configfs. Currently there exists the possibility to read out two attributes which is the send queue counter and the version of each midcomms node state. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 489d8e559c6596eb08e16447d9830bc39afbe54e Author: Alexander Aring Date: Fri May 21 15:08:46 2021 -0400 fs: dlm: add reliable connection if reconnect This patch introduce to make a tcp lowcomms connection reliable even if reconnects occurs. This is done by an application layer re-transmission handling and sequence numbers in dlm protocols. There are three new dlm commands: DLM_OPTS: This will encapsulate an existing dlm message (and rcom message if they don't have an own application side re-transmission handling). As optional handling additional tlv's (type length fields) can be appended. This can be for example a sequence number field. However because in DLM_OPTS the lockspace field is unused and a sequence number is a mandatory field it isn't made as a tlv and we put the sequence number inside the lockspace id. The possibility to add optional options are still there for future purposes. DLM_ACK: Just a dlm header to acknowledge the receive of a DLM_OPTS message to it's sender. DLM_FIN: This provides a 4 way handshake for connection termination inclusive support for half-closed connections. It's provided on application layer because SCTP doesn't support half-closed sockets, the shutdown() call can interrupted by e.g. TCP resets itself and a hard logic to implement it because the othercon paradigm in lowcomms. The 4-way termination handshake also solve problems to synchronize peer EOF arrival and that the cluster manager removes the peer in the node membership handling of DLM. In some cases messages can be still transmitted in this time and we need to wait for the node membership event. To provide a reliable connection the node will retransmit all unacknowledges message to it's peer on reconnect. The receiver will then filtering out the next received message and drop all messages which are duplicates. As RCOM_STATUS and RCOM_NAMES messages are the first messages which are exchanged and they have they own re-transmission handling, there exists logic that these messages must be first. If these messages arrives we store the dlm version field. This handling is on DLM 3.1 and after this patch 3.2 the same. A backwards compatibility handling has been added which seems to work on tests without tcpkill, however it's not recommended to use DLM 3.1 and 3.2 at the same time, because DLM 3.2 tries to fix long term bugs in the DLM protocol. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8e2e40860c7f67c0b19b13d92cfea03a19232ce2 Author: Alexander Aring Date: Fri May 21 15:08:45 2021 -0400 fs: dlm: add union in dlm header for lockspace id This patch adds union inside the lockspace id to handle it also for another use case for a different dlm command. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 37a247da517f4315eed21585be8aa516e0b9cec9 Author: Alexander Aring Date: Fri May 21 15:08:44 2021 -0400 fs: dlm: move out some hash functionality This patch moves out some lowcomms hash functionality into lowcomms header to provide them to other layers like midcomms as well. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 2874d1a68c4ec5623a05c8118f5dbaefb30b37ff Author: Alexander Aring Date: Fri May 21 15:08:43 2021 -0400 fs: dlm: add functionality to re-transmit a message This patch introduces a retransmit functionality for a lowcomms message handle. It's just allocates a new buffer and transmit it again, no special handling about prioritize it because keeping bytestream in order. To avoid another connection look some refactor was done to make a new buffer allocation with a preexisting connection pointer. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8f2dc78dbc2010b497bb58e0460cb44c678a3c5b Author: Alexander Aring Date: Fri May 21 15:08:42 2021 -0400 fs: dlm: make buffer handling per msg This patch makes the void pointer handle for lowcomms functionality per message and not per page allocation entry. A refcount handling for the handle was added to keep the message alive until the user doesn't need it anymore. There exists now a per message callback which will be called when allocating a new buffer. This callback will be guaranteed to be called according the order of the sending buffer, which can be used that the caller increments a sequence number for the dlm message handle. For transition process we cast the dlm_mhandle to dlm_msg and vice versa until the midcomms layer will implement a specific dlm_mhandle structure. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a070a91cf1402b5328d3517d1fccbdeec58d3f2d Author: Alexander Aring Date: Fri May 21 15:08:41 2021 -0400 fs: dlm: add more midcomms hooks This patch prepares hooks to redirect to the midcomms layer which will be used by the midcomms re-transmit handling. There exists the new concept of stateless buffers allocation and commits. This can be used to bypass the midcomms re-transmit handling. It is used by RCOM_STATUS and RCOM_NAMES messages, because they have their own ping-like re-transmit handling. As well these two messages will be used to determine the DLM version per node, because these two messages are per observation the first messages which are exchanged. Cluster manager events for node membership are added to add support for half-closed connections in cases that the peer connection get to an end of file but DLM still holds membership of the node. In this time DLM can still trigger new message which we should allow. After the cluster manager node removal event occurs it safe to close the connection. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 6fb5cf9d4206f2cdccb05be1bf2307dab4e5babe Author: Alexander Aring Date: Fri May 21 15:08:40 2021 -0400 fs: dlm: public header in out utility This patch allows to use header_out() and header_in() outside of dlm util functionality. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8aa31cbf20ad168c35dd83476629402aacbf5a44 Author: Alexander Aring Date: Fri May 21 15:08:39 2021 -0400 fs: dlm: fix connection tcp EOF handling This patch fixes the EOF handling for TCP that if and EOF is received we will close the socket next time the writequeue runs empty. This is a half-closed socket functionality which doesn't exists in SCTP. The midcomms layer will do a half closed socket functionality on DLM side to solve this problem for the SCTP case. However there is still the last ack flying around but other reset functionality will take care of it if it got lost. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit c6aa00e3d20c2767ba3f57b64eb862572b9744b3 Author: Alexander Aring Date: Fri May 21 15:08:38 2021 -0400 fs: dlm: cancel work sync othercon These rx tx flags arguments are for signaling close_connection() from which worker they are called. Obviously the receive worker cannot cancel itself and vice versa for swork. For the othercon the receive worker should only be used, however to avoid deadlocks we should pass the same flags as the original close_connection() was called. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit ba868d9deaab2bb1c09e50650127823925154802 Author: Alexander Aring Date: Fri May 21 15:08:37 2021 -0400 fs: dlm: reconnect if socket error report occurs This patch will change the reconnect handling that if an error occurs if a socket error callback is occurred. This will also handle reconnects in a non blocking connecting case which is currently missing. If error ECONNREFUSED is reported we delay the reconnect by one second. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 7443bc962509912c70c587db71449daff26b9678 Author: Alexander Aring Date: Fri May 21 15:08:36 2021 -0400 fs: dlm: set is othercon flag There is a is othercon flag which is never used, this patch will set it and printout a warning if the othercon ever sends a dlm message which should never be the case. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit b38bc9c2b3171f4411d80015ecb876bc6f9bcd26 Author: Alexander Aring Date: Fri May 21 15:08:35 2021 -0400 fs: dlm: fix srcu read lock usage This patch holds the srcu connection read lock in cases where we lookup the connections and accessing it. We don't hold the srcu lock in workers function where the scheduled worker is part of the connection itself. The connection should not be freed if any worker is scheduled or pending. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 2df6b7627a81b1407378125246eacdb1d8c90036 Author: Alexander Aring Date: Fri May 21 15:08:34 2021 -0400 fs: dlm: add dlm macros for ratelimit log This patch add ratelimit macro to dlm subsystem and will set the connecting log message to ratelimit. In non blocking connecting cases it will print out this message a lot. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit c937aabbd7f46fa3b283744169a6b48dafbd6cc7 Author: Alexander Aring Date: Fri May 21 15:08:33 2021 -0400 fs: dlm: always run complete for possible waiters This patch changes the ping_members() result that we always run complete() for possible waiters. We handle the -EINTR error code as successful. This error code is returned if the recovery is stopped which is likely that a new recovery is triggered with a new members configuration and ping_members() runs again. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0533260687a76c48e6655f7d9eb0bd1811bd9353 Author: Alexandru Ardelean Date: Mon May 17 14:35:39 2021 +0300 gpio: wm8350: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit e076aeda467d83dba43f8e3a9d43997aaaf970fe Author: Alexandru Ardelean Date: Mon May 17 14:35:40 2021 +0300 gpio: wm8994: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 14ebdaec6d004a7d0727a0713c30b89166179e41 Author: Alexandru Ardelean Date: Mon May 17 14:35:38 2021 +0300 gpio: wm831x: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 96a03e867c70c738eececcef343a40e60206e51f Author: Alexandru Ardelean Date: Fri May 21 21:17:08 2021 +0300 gpio: tps65910: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit f716f1fb84a48cc80c1dc486f52ebc092d8d834b Author: Alexandru Ardelean Date: Sun May 16 09:23:15 2021 +0300 gpio: sta2x11: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 52f39cfee66d1878d91a3fdb97d47557af4da0f8 Author: Alexandru Ardelean Date: Sun May 16 09:26:29 2021 +0300 gpio: sprd: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 81933d3e485094fee38519e779d8e8f315f513c5 Author: Alexandru Ardelean Date: Sun May 16 10:43:11 2021 +0300 gpio: spear-spics: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. This change isn't removing the 'DT probe failed' message, as some may find it useful as a reason for the failed probe. But that can be part of another change if needed. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit cd440753dc9e8803c945f67e4d45f6ea834c00ed Author: Alexandru Ardelean Date: Mon May 17 14:37:07 2021 +0300 gpio: ath79: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 258435a1c8187f559549e515d2f77fa0b57bcd27 Author: Andy Shevchenko Date: Tue May 25 11:50:50 2021 +0300 pinctrl: tigerlake: Add Alder Lake-M ACPI ID Intel Alder Lake-M PCH has the same GPIO hardware than Tiger Lake-LP PCH but the ACPI ID is different. Add this new ACPI ID to the list of supported devices. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 0669a6e1f11500ba9e6ddebe67c449c0444daa3a Author: Chris Wilson Date: Fri May 21 11:32:15 2021 -0700 drm/i915/gt: Move CS interrupt handler to the backend The different submission backends each have their own preferred behaviour and interrupt setup. Let each handle their own interrupts. This becomes more useful later as we to extract the use of auxiliary state in the interrupt handler that is backend specific. Signed-off-by: Matthew Brost Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210521183215.65451-4-matthew.brost@intel.com commit c92c36ed8d92b0bad1cbd482a8b2e9871a8cb28b Author: Chris Wilson Date: Fri May 21 11:32:14 2021 -0700 drm/i915/gt: Move submission_method into intel_gt Since we setup the submission method for the engines once, it is easy to assign an enum and use that instead of probing into the backends. Signed-off-by: Matthew Brost Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210521183215.65451-3-matthew.brost@intel.com commit 0db3633f615944a8106f48a4945aa0770a71304d Author: Chris Wilson Date: Fri May 21 11:32:13 2021 -0700 drm/i915/gt: Move engine setup out of set_default_submission Now that we no longer switch back and forth between guc and execlists, we no longer need to restore the backend's vfunc and can leave them set after initialisation. The only catch is that we lose the submission on wedging and still need to reset the submit_request vfunc on unwedging. Signed-off-by: Matthew Brost Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Matthew Brost Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210521183215.65451-2-matthew.brost@intel.com commit a92bf335fd82eeee0e95705bfd25014ee0c8262e Author: Adrian Hunter Date: Tue May 25 12:51:12 2021 +0300 perf scripts python: intel-pt-events.py: Add branches to script As an example, add branch information to intel-pt-events.py script. This shows how a simple python script can be used to customize perf script output for Intel PT branch traces or power event traces. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2ede92173faa14ed6a5272b3e7a6dd6daae3b161 Author: Adrian Hunter Date: Tue May 25 12:51:11 2021 +0300 perf scripting python: Add auxtrace error Add auxtrace_error to general python scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0db2134069275d1177c2dd531cbc73578b7ec8ac Author: Adrian Hunter Date: Tue May 25 12:51:10 2021 +0300 perf scripting python: Add context switch Add context_switch to general python scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 22cc2f74bbe2174b54d3041ed41424f7d500026d Author: Adrian Hunter Date: Tue May 25 12:51:09 2021 +0300 perf scripting python: Add cpumode Add cpumode to python scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 142b05182eaa449bacd419d31d0dbbf24e048dbf Author: Adrian Hunter Date: Tue May 25 12:51:08 2021 +0300 perf scripting python: Add IPC Add IPC to python scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit bee272af78525b91c0276f9878d3273dba59948a Author: Adrian Hunter Date: Tue May 25 12:51:07 2021 +0300 perf scripting python: Add sample flags Add sample flags to python scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 54cd8b03245291c8509f96ed12a55eb1cb7dddf8 Author: Adrian Hunter Date: Tue May 25 12:51:06 2021 +0300 perf script: Factor out perf_sample__sprintf_flags() Factor out perf_sample__sprintf_flags() so it can be reused. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3f8e009e01c4ed9f75c10f33936990f3a3d39fcd Author: Adrian Hunter Date: Tue May 25 12:51:05 2021 +0300 perf scripting python: Add 'addr_location' for 'addr' If sample addr correlates to a symbol, add "addr_dso", "addr_symbol", and "addr_symoff" to python scripting. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8271b5095811dd75843715a462a981fd5dfe704c Author: Adrian Hunter Date: Tue May 25 12:51:04 2021 +0300 perf scripting python: Factor out set_sym_in_dict() Factor out set_sym_in_dict() so it can be reused. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210525095112.1399-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d04c1ff0b3ddd5c0fbbe640996c8eaad279ed1c5 Author: Adrian Hunter Date: Tue May 25 12:51:03 2021 +0300 perf scripting python: Fix tuple_set_u64() tuple_set_u64() produces a signed value instead of an unsigned value. That works for database export but not other cases. Rename to tuple_set_d64() for database export and fix tuple_set_u64(). Fixes: df919b400ad3f ("perf scripting python: Extend interface to export data in a database-friendly way") Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20210525095112.1399-2-adrian.hunter@intel.com commit 04612968783f6892c1eb710b444fc5bbe8f5c673 Author: Arnaldo Carvalho de Melo Date: Tue May 25 10:04:58 2021 -0300 perf auxtrace: Make perf_event__process_auxtrace*() callable As we'll use it in the upcoming python interfaces and when built with: make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1 +NO_LIBZSTD=1 NO_LIBCAP=1 NO_SYSCALL_TABLE=1 make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1 NO_LIBCAP=1 +NO_SYSCALL_TABLE=1 BUILD: Doing 'make -j24' parallel build CC /tmp/tmp.rGrdpQlTCr/builtin-daemon.o In file included from util/events_stats.h:8, from util/evlist.h:12, from builtin-script.c:18: builtin-script.c: In function ‘process_auxtrace_error’: util/auxtrace.h:708:57: error: called object is not a function or function pointer 708 | #define perf_event__process_auxtrace_error 0 | ^ builtin-script.c:2443:16: note: in expansion of macro ‘perf_event__process_auxtrace_error’ 2443 | return perf_event__process_auxtrace_error(session, event); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MKDIR /tmp/tmp.rGrdpQlTCr/tests/ MKDIR /tmp/tmp.rGrdpQlTCr/bench/ CC /tmp/tmp.rGrdpQlTCr/tests/builtin-test.o CC /tmp/tmp.rGrdpQlTCr/bench/sched-messaging.o builtin-script.c:2444:1: error: control reaches end of non-void function [-Werror=return-type] 2444 | } | ^ To: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit 6ea4b5dbe0c40bbafacdb78405a3bcbe88593ba1 Author: Adrian Hunter Date: Mon May 24 09:57:18 2021 +0300 perf script: Find script file relative to exec path Allow perf script to find a script in the exec path. Example: Before: $ perf record -a -e intel_pt/branch=0/ sleep 0.1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.954 MB perf.data ] $ perf script intel-pt-events.py 2>&1 | head -3 Error: Couldn't find script `intel-pt-events.py' See perf script -l for available scripts. $ perf script -s intel-pt-events.py 2>&1 | head -3 Can't open python script "intel-pt-events.py": No such file or directory $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3 Error: Couldn't find script `/home/ahunter/libexec/perf-core/scripts/python/intel-pt-events.py' See perf script -l for available scripts. $ After: $ perf script intel-pt-events.py 2>&1 | head -3 Intel PT Power Events and PTWRITE perf 8123/8123 [000] 551.230753986 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) perf 8123/8123 [001] 551.230808216 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) $ perf script -s intel-pt-events.py 2>&1 | head -3 Intel PT Power Events and PTWRITE perf 8123/8123 [000] 551.230753986 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) perf 8123/8123 [001] 551.230808216 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3 Intel PT Power Events and PTWRITE perf 8123/8123 [000] 551.230753986 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) perf 8123/8123 [001] 551.230808216 cbr: 42 freq: 4219 MHz (156%) 0 [unknown] ([unknown]) $ Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20210524065718.11421-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit afe360a8c35eb2a9e9ea6314886b5fe465f81fe4 Author: Leo Yan Date: Wed May 19 12:15:46 2021 +0800 perf arm-spe: Remove redundant checking for "full_auxtrace" The option "opts->full_auxtrace" is checked at the earlier place, if it is false the function will directly bail out. So remove the redundant checking for "opts->full_auxtrace". Suggested-by: James Clark Signed-off-by: Leo Yan Reviewed-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519041546.1574961-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit f99237e46432c4581a30b3afc053cef8d3df3ce5 Author: Leo Yan Date: Wed May 19 12:15:45 2021 +0800 perf arm-spe: Enable timestamp for per-cpu mode For per-cpu mmap, it should enable timestamp tracing for Arm SPE; this is helpful for samples correlation. To automatically enable the timestamp, a helper arm_spe_set_timestamp() is introduced for setting "ts_enable" format bit. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20210519041546.1574961-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e582badf1706a005359ef3e184fa97384e93f83a Author: Leo Yan Date: Wed May 19 12:15:44 2021 +0800 perf arm-spe: Correct sample flags for dummy event The dummy event is mainly used for mmap, the TIME sample is only needed for per-cpu case so that the perf tool can rely on the correct timing for parsing symbols. And the CPU sample is useless for mmap. The BRANCH_STACK sample bit will be always reset for the dummy event in the function evsel__config(), so don't need to repeatedly reset it for Arm SPE specific. So this patch only enables TIME sample for per-cpu mmap. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519041546.1574961-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 2f021954952f105e32383103cac06a095d9a1db6 Author: Leo Yan Date: Wed May 19 12:15:43 2021 +0800 perf arm-spe: Correct sample flags for SPE event Now it's hard code to set sample flags for CPU, TIME and TID for SPE event, which is pointless. The CPU is useful for sampling only for per-mmap case, it is used to indicate the AUX trace is associated to which CPU. The TIME sample is not needed for AUX event, since the time for AUX event is not really used and this time is a different thing from the timestamp in Arm SPE trace, the timestamp tracing which is controlled by Arm SPE's config bit. The TID sample is not useful for AUX event. This patch corrects the sample flags for SPE event, it only set CPU sample bit for per-cpu mmap case. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Alexander Shishkin Cc: Al Grant Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20210519041546.1574961-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 71fbc431c19c2306fedf934fa9f267a5bdcdc44b Author: Jin Yao Date: Sat May 8 14:00:54 2021 +0800 perf vendor events intel: Update event list for Icelake Client - Update core and uncore events for Icelake client to perf. - Add ICL metrics. Based on ICL event list v1.10: https://download.01.org/perfmon/ICL/ Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d89bf9cab1f613e4496f929d89477b2baaad1ea9 Author: Jin Yao Date: Sat May 8 13:06:20 2021 +0800 perf vendor events intel: Add metrics for Icelake Server Add JSON metrics for Icelake Server to perf. Based on TMA metrics 4.21 at 01.org.: https://download.01.org/perfmon/ Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c58972ef285676ec6739bf0713e2fc30df3b4fa6 Author: Jin Yao Date: Thu Apr 29 09:42:57 2021 +0800 perf vendor events intel: Add uncore event list for Icelake Server Add JSON uncore events for Icelake Server to perf. Based on JSON list v1.04: https://download.01.org/perfmon/ICX/ Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit cdb29a8fd0c9fff693cd7b7e14a8f4e9e7cf00ed Author: Jin Yao Date: Sat May 8 10:34:56 2021 +0800 perf vendor events intel: Add core event list for Icelake Server Add JSON core events for Icelake Server to perf. Based on JSON list v1.04: https://download.01.org/perfmon/ICX/ Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/c0f27643-bebb-2912-56ed-f7abec7dbde3@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 100475f83b9d2fbdb6f34a9b5fca9318e039b2d6 Merge: 19d71c2cbe060 a050a6d2b7e80 Author: Arnaldo Carvalho de Melo Date: Tue May 25 09:13:52 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes from perf/urgent. Signed-off-by: Arnaldo Carvalho de Melo commit a720a2a0ad6cb6f769b6c7cbc3c54287a7d54ff8 Author: Magnus Karlsson Date: Fri May 21 10:33:01 2021 +0200 xsk: Use kvcalloc to support large umems Use kvcalloc() instead of kcalloc() to support large umems with, on my server, one million pages or more in the umem. Reported-by: Dan Siemon Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210521083301.26921-1-magnus.karlsson@gmail.com commit 4a791cb6d34f42ef9aa7a65f2ba5aa19644c53a7 Author: Paul Cercueil Date: Sun May 23 18:04:15 2021 +0100 drm/ingenic: Add option to alloc cached GEM buffers Alloc GEM buffers backed by noncoherent memory on SoCs where it is actually faster than write-combine. This dramatically speeds up software rendering on these SoCs, even for tasks where write-combine memory should in theory be faster (e.g. simple blits). v3: The option is now selected per-SoC instead of being a module parameter. v5: - Fix drm_atomic_get_new_plane_state() used to retrieve the old state - Use custom drm_gem_fb_create() - Only check damage clips and sync DMA buffers if non-coherent buffers are used Signed-off-by: Paul Cercueil Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-4-paul@crapouillou.net commit b09069046d6b7df1deea02cc14dc893e5e96630a Author: Paul Cercueil Date: Sun May 23 18:04:14 2021 +0100 drm: Add and export function drm_fb_cma_sync_non_coherent This function can be used by drivers that use damage clips and have CMA GEM objects backed by non-coherent memory. Calling this function in a plane's .atomic_update ensures that all the data in the backing memory have been written to RAM. v3: - Only sync data if using GEM objects backed by non-coherent memory. - Use a drm_device pointer instead of device pointer in prototype v5: - Rename to drm_fb_cma_sync_non_coherent - Invert loops for better cache locality - Only sync BOs that have the non-coherent flag - Move to drm_fb_cma_helper.c to avoid circular dependency Signed-off-by: Paul Cercueil Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-3-paul@crapouillou.net commit cf8ccbc72d6109eddf6ae04196addf62cf716639 Author: Paul Cercueil Date: Sun May 23 18:04:13 2021 +0100 drm: Add support for GEM buffers backed by non-coherent memory Having GEM buffers backed by non-coherent memory is interesting in the particular case where it is faster to render to a non-coherent buffer then sync the data cache, than to render to a write-combine buffer, and (by extension) much faster than using a shadow buffer. This is true for instance on some Ingenic SoCs, where even simple blits (e.g. memcpy) are about three times faster using this method. Add a 'map_noncoherent' flag to the drm_gem_cma_object structure, which can be set by the drivers when they create the dumb buffer. Since this really only applies to software rendering, disable this flag as soon as the CMA objects are exported via PRIME. v3: New patch. Now uses a simple 'map_noncoherent' flag to control how the objects are mapped, and use the new dma_mmap_pages function. v4: Make sure map_noncoherent is always disabled when creating GEM objects meant to be used with dma-buf. Signed-off-by: Paul Cercueil Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-2-paul@crapouillou.net commit 0f926e5cc8c0050bbcebce887be0b6b9780a0b50 Author: Imre Deak Date: Mon May 24 20:27:03 2021 +0300 drm/i915/debugfs: Print remap info for DPT VMAs as well Similarly to GGTT VMAs, DPT VMAs can be also a remapped or rotated view of the mapped object, so make sure we debug print the details for these views as well besides the normal view. While at it also fix the debug print for the VMA type of DPT VMAs. Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210524172703.2113058-3-imre.deak@intel.com commit 74862d4ccd6d09684b993672d5ffb5368463e6e3 Author: Imre Deak Date: Mon May 24 20:27:02 2021 +0300 drm/i915/adlp: Fix GEM VM asserts for DPT VMs An object mapped via DPT can have remapped and rotated VMA instances besides the normal VMA instance, similarly to GGTT VMA instances. Adjust the corresponding VMA lookup asserts. While at it also check if a DPT VM is passed incorrectly to i915_vm_to_ppgtt(). Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210524172703.2113058-2-imre.deak@intel.com commit b3de1d0789197935da054e47952694adc8219203 Author: Imre Deak Date: Mon May 24 20:27:01 2021 +0300 drm/i915/adlp: Require DPT FB CCS color planes to be 2MB aligned All DPT FB color plane surface base addresses must be 2MB aligned. On ADL_P this means that the offsets in CCS FB object must be also 2MB aligned. Adjusting unaligned offsets for these FBs during commit time (compensating with the x/y offsets) doesn't work, since the big alignment would most probably lead to an x/y offset mismatch error between the main and CCS planes. We can overcome this limitation by remapping CCS FBs, so that each color plane is at an aligned offset, leaving x/y for each plane unadjusted during commit and so not causing an x/y mismatch error. However remapping for CCS FBs will be done as a follow-up, so for now require that user space allocates the FB obj with properly aligned planes. v2: s/SZ_2M/512*4k/ for clarity. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210524172703.2113058-1-imre.deak@intel.com commit 5e4322a8b266bc9f5ee7ea4895f661c01dbd7cb3 Author: Zou Wei Date: Mon May 24 15:20:54 2021 +0800 drm/vc4: hdmi: Fix PM reference leak in vc4_hdmi_encoder_pre_crtc_co() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1621840854-105978-1-git-send-email-zou_wei@huawei.com commit 08e767cd9e8b6682cfc4fba630ec2e46f13e99e0 Author: YueHaibing Date: Sun May 23 15:11:09 2021 +0800 ALSA: control_led - use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Reviewed-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210523071109.28940-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit 7fe1e79b59ba02fb6bdc45d324f88f1ba97d3ab4 Author: Bart Van Assche Date: Tue May 25 10:30:21 2021 +0200 configfs: implement the .read_iter and .write_iter methods Configfs is one of the few filesystems that does not yet support the .read_iter and .write_iter callbacks. This patch adds support for these methods in configfs. Signed-off-by: Bart Van Assche [hch: split out a separate fix] Signed-off-by: Christoph Hellwig commit 44b9a000df5cc144c262a0da0d092dc04b93abca Author: Christoph Hellwig Date: Tue May 25 10:28:54 2021 +0200 configfs: drop pointless kerneldoc comments file.c has a bunch of kerneldoc comments for static functions that do not document any API but just list what is done. Drop them. Signed-off-by: Christoph Hellwig commit dd33f1f7aaf0ce4d0b5ca139019ffbe3510238eb Author: Bart Van Assche Date: Tue May 25 10:24:23 2021 +0200 configfs: fix the kerneldoc comment for configfs_create_bin_file Mention the correct argument name. Signed-off-by: Bart Van Assche [hch: split from a larger patch] Signed-off-by: Christoph Hellwig commit 2978996f620001f4e748c79af0fe89be729ef58d Author: H. Peter Anvin (Intel) Date: Tue May 18 12:13:03 2021 -0700 x86/entry: Use int everywhere for system call numbers System call numbers are defined as int, so use int everywhere for system call numbers. This is strictly a cleanup; it should not change anything user visible; all ABI changes have been done in the preceeding patches. [ tglx: Replaced the unsigned long cast ] Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210518191303.4135296-7-hpa@zytor.com commit 9558487e7d976c1b92b2bc66fb4d901b1d35437f Author: Adam Ford Date: Thu May 13 06:46:17 2021 -0500 arm64: defconfig: Enable usb2_clksel for R-Car Gen3 and RZ/G2 There is a clock driver that's needed when using an external USB reference clock called usb2_clksel. Enable it in the defconfig. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20210513114617.30191-3-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit a499e40a397c17a40af8a5f8ef408fe63be4c257 Author: Geert Uytterhoeven Date: Wed May 19 14:31:37 2021 +0200 ARM: dts: renesas: Move enable-method to CPU nodes According to Documentation/devicetree/bindings/arm/cpus.yaml, the "enable-method" property should be a property of the individual CPU nodes, and not of the parent "cpus" container node. However, on R-Car Gen2 and RZ/G1 SoCs, the property is tied to the "cpus" node instead. Secondary CPU bringup and CPU hot (un)plug work regardless, as arm_dt_init_cpu_maps() falls back to looking in the "cpus" node. The cpuidle code does not have such a fallback, so it does not detect the enable-method. Note that cpuidle does not support the "renesas,apmu" enable-method yet, so for now this does not make any difference. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/35fcfedf9de9269185c48ca5a6dfcba7cdd3484b.1621427319.git.geert+renesas@glider.be commit ebc666f39ff67a01e748c34d670ddf05a9e45220 Author: Adam Ford Date: Thu May 13 06:46:16 2021 -0500 arm64: dts: renesas: beacon: Fix USB ref clock references The RZ/G2 boards expect there to be an external clock reference for USB2 EHCI controllers. For the Beacon boards, this reference clock is controlled by a programmable versaclock. Because the RZ/G2 family has a special clock driver when using an external clock, the third clock reference in the EHCI node needs to point to this special clock, called usb2_clksel. Since the usb2_clksel does not keep the usb_extal clock enabled, the 4th clock entry for the EHCI nodes needs to reference it to keep the clock running and make USB functional. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20210513114617.30191-2-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit 56bc54496f5d6bc638127bfc9df3742cbf0039e7 Author: Adam Ford Date: Thu May 13 06:46:15 2021 -0500 arm64: dts: renesas: beacon: Fix USB extal reference The USB extal clock reference isn't associated to a crystal, it's associated to a programmable clock, so remove the extal reference, add the usb2_clksel. Since usb_extal is referenced by the versaclock, reference it here so the usb2_clksel can get the proper clock speed of 50MHz. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20210513114617.30191-1-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit d4ea5c61e15adb3995a9944b96e842ce7faaa450 Author: Geert Uytterhoeven Date: Tue May 4 16:41:24 2021 +0200 ARM: dts: rcar-gen1: Correct internal delay for i2c[123] According to the R-Car M1A and H1 Hardware User's Manuals Rev. 1.00, the LSI internal delay for I2C instances 1 to 3 is 5 ns (typ.), which differs from the default 50 ns as specified for instance 0. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1eac63f15a776e492ff8a2d8447c5e1019982dd1.1620138979.git.geert+renesas@glider.be Link: https://lore.kernel.org/r/73c96fd455df82ef04fd1db6d7dd79b4679f6c56.1620138979.git.geert+renesas@glider.be commit e9550a536e3edd23b88926a6fb27fa200b56dfa9 Author: Valentine Barshak Date: Tue May 4 11:14:34 2021 +0200 arm64: dts: renesas: eagle: Add x1 clock This adds X1 clock which supplies a frequency of 148.5 MHz. This clock is connected to the external dot clock input signal. Signed-off-by: Valentine Barshak [geert: Verified schematics] Signed-off-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Tested-by: Kieran Bingham Link: https://lore.kernel.org/r/75a66bae21937da1c69e8024ce61b35aad4ac9b8.1620119570.git.geert+renesas@glider.be commit 8c10e004dfb94e93f1ac76da47c27b96c9de94ef Author: Geert Uytterhoeven Date: Fri Apr 30 15:10:51 2021 +0200 ARM: dts: koelsch: Rename sw2 to keyboard Rename "sw2_pins" and "sw2" to "keyboard_pins" resp. "keyboard", to comply with generic name recommendations. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/3d718cf69e21b1ceea0c29c0e841b9bdda44533d.1619785905.git.geert+renesas@glider.be commit 6ab8c23096a29b69044209a5925758a6f88bd450 Author: Geert Uytterhoeven Date: Thu Apr 29 14:41:15 2021 +0200 ARM: dts: r8a7779, marzen: Fix DU clock names "make dtbs_check" complains: arch/arm/boot/dts/r8a7779-marzen.dt.yaml: display@fff80000: clock-names:0: 'du.0' was expected Change the first clock name to match the DT bindings. This has no effect on actual operation, as the Display Unit driver in Linux does not use the first clock name on R-Car H1, but just grabs the first clock. Fixes: 665d79aa47cb3983 ("ARM: shmobile: marzen: Add DU external pixel clock to DT") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/9d5e1b371121883b3b3e10a3df43802a29c6a9da.1619699965.git.geert+renesas@glider.be commit a422ec20caef6a50cf3c1efa93538888ebd576a6 Author: Valentine Barshak Date: Fri Mar 26 13:10:50 2021 +0100 arm64: dts: renesas: v3msk: Fix memory size The V3MSK board has 2 GiB RAM according to the datasheet and schematics. Signed-off-by: Valentine Barshak [geert: Verified schematics] Fixes: cc3e267e9bb0ce7f ("arm64: dts: renesas: initial V3MSK board device tree") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210326121050.1578460-1-geert+renesas@glider.be commit b6810bafc34f9c91e1404cee87ed69a911f1e428 Author: Wolfram Sang Date: Mon Apr 19 16:38:58 2021 +0200 arm64: dts: renesas: condor: Switch eMMC bus to 1V8 The eMMC card has two supplies, VCC and VCCQ. The VCC supplies the NAND array and the VCCQ supplies the bus. On Condor, the VCC is connected to 3.3V rail, while the VCCQ is connected to 1.8V rail. Adjust the pinmux to match the bus, which is always operating in 1.8V mode. While at it, deduplicate the pinmux entries, which are now the same for both default and UHS modes. We still need the two pinctrl entries to match the bindings though. Thanks to Marek Vasut for this description from commit 5f65328df3f5cd25 ("arm64: dts: renesas: Switch eMMC bus to 1V8 on Salvator-X and ULCB"). Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210419143858.39401-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 706f5cb338ff9d7ce68deb1d5a349e5797affa8c Author: Niklas Söderlund Date: Tue Apr 13 20:14:47 2021 +0200 arm64: dts: renesas: falcon-csi-dsi: Add GPIO extenders We need to configure their GPIOs to power on the MAX96712s. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210413181447.2588084-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 0decd50b6b2ef085f3f6c018b5e7eb8ba627b11e Author: Adam Ford Date: Wed Feb 24 05:51:45 2021 -0600 arm64: dts: renesas: beacon kit: Setup AVB refclk The AVB reference clock assumes an external clock that runs automatically. Because the Versaclock is wired to provide the AVB refclock, the device tree needs to reference it in order for the driver to start the clock. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20210224115146.9131-5-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit 56ed0b3b10fd2814cb8225c420000a51bb202e31 Author: Adam Ford Date: Wed Feb 24 05:51:43 2021 -0600 arm64: dts: renesas: Add fck to etheravb-rcar-gen3 clock-names list The bindings have been updated to support two clocks. Add a clock-names list in the device tree with fck in it. Signed-off-by: Adam Ford Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210224115146.9131-3-aford173@gmail.com [geert: Update new r8a779a0.dtsi] Signed-off-by: Geert Uytterhoeven commit ab2711b3afdb04e0257cd7f1c8cd2c186348bdef Author: Adam Ford Date: Wed Feb 24 05:51:42 2021 -0600 ARM: dts: renesas: Add fck to etheravb-rcar-gen2 clock-names list The bindings have been updated to support two clocks. Add a clock-names list in the device tree with fck in it. Signed-off-by: Adam Ford Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210224115146.9131-2-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit a7295518037289cb3e6a8aba85e38720e040b6c3 Author: Steven Lee Date: Mon May 24 15:32:55 2021 +0800 ARM: dts: aspeed: ast2600evb: Add dts file for A1 and A0 aspeed-ast2600-evb.dts was modified for supporting A2 evb. Since A1/A0 evbs don't have GPIO regulators and SD clock frequency (SCU210) is different to A2 as well. Adding a new dts that removes new nodes created in aspeed-ast2600-evb.dts is necessary. Signed-off-by: Steven Lee Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210524073308.9328-4-steven_lee@aspeedtech.com Signed-off-by: Joel Stanley commit 2c042ff716f11996a11935cdb7744a4290d726cd Author: Steven Lee Date: Mon May 24 15:32:54 2021 +0800 ARM: dts: aspeed: ast2600evb: Add phase correction for emmc controller. Set MMC timing-phase register by adding the phase correction binding in the device tree. Signed-off-by: Steven Lee Acked-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210524073308.9328-3-steven_lee@aspeedtech.com Signed-off-by: Joel Stanley commit 47b99d02bd8705a93671723a957b50d3875afb56 Author: Steven Lee Date: Mon May 24 15:32:53 2021 +0800 ARM: dts: aspeed: ast2600evb: Add sdhci node and gpio regulator for A2 evb. AST2600 A2 (or newer) EVB has gpio regulators for toggling signal voltage between 3.3v and 1.8v, the patch adds sdhci node and gpio regulator in the dts file and adds comment for describing the reference design. Signed-off-by: Steven Lee Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210524073308.9328-2-steven_lee@aspeedtech.com Signed-off-by: Joel Stanley commit e1dc219af7ebc600486482c6d06242a1a11a2e33 Author: YueHaibing Date: Mon May 24 20:00:07 2021 +0800 ALSA: pcm: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210524120007.39728-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit a38e93302ee25b2ca6f4ee76c6c974cf3637985e Author: Yufen Yu Date: Mon May 24 05:38:11 2021 -0400 ALSA: ac97: fix PM reference leak in ac97_bus_remove() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Yufen Yu Link: https://lore.kernel.org/r/20210524093811.612302-1-yuyufen@huawei.com Signed-off-by: Takashi Iwai commit 877013bc9cbdd37dfc12d87feca4e368d38ebc6f Author: zuoqilin Date: Mon May 24 15:00:28 2021 +0800 sound/oss/dmasound: Remove superfluous "break" Remove superfluous "break", as there is a "return" before them. Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210524070028.45-1-zuoqilin1@163.com Signed-off-by: Takashi Iwai commit 5ec85c198eff077e99bc5ff615eb9618004962e2 Author: Takashi Sakamoto Date: Mon May 24 12:13:46 2021 +0900 ALSA: bebob: distinguish M-Audio ProFire Lightbridge quirk In former commit, ALSA IEC 61883-1/6 packet streaming engine drops initial tx packets till the packet includes any event. This allows ALSA bebob driver not to give option to skip initial packet since the engine does drop the initial packet. However, M-Audio ProFire Lightbridge has a quirk to stop packet transmission after start multiplexing event to the packet. After several thousands cycles, it restart packet transmission again. This commit specializes the usage of initial skip option for the model. Additionally, this commit expands timeout enough to wait processing content of tx packet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210524031346.50539-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 266807f94e401fcf0631c0f52d49495ff448b8ab Author: Takashi Sakamoto Date: Mon May 24 12:13:45 2021 +0900 ALSA: bebob: cancel switching connection order The order to establish connection seems to be meaningless. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210524031346.50539-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit b7c7699b4f42cc93340db3ac5c1797af7b7f70f4 Author: Takashi Sakamoto Date: Mon May 24 12:13:44 2021 +0900 ALSA: firewire-lib: obsolete callbacked member The member of callbacked in AMDTP stream structure is not used anymore. Instead, ready_processing member is used to wake up yielding task of user process. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210524031346.50539-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit fb25dcc885fa377d07586dd1f8f0bec32b4b547c Author: Takashi Sakamoto Date: Mon May 24 12:13:43 2021 +0900 ALSA: firewire-lib: drop initial NODATA or empty packet The devices based on BeBoB ASICs or the devices in Tascam FireWire series transfer a batch of NODATA packet or empty packet in the beginning of packet streaming. To avoid processing them, current implementation uses an option to skip processing content of tx packet during some initial cycles. However, the hard-coded number is not enough useful. This commit drops content of packets till the packet includes any event firstly. The function of option is to skip processing content of tx packet with any event after dropping. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210524031346.50539-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit f20fdd4362e31a02c24048af2eca735b59dacf78 Merge: 13d11f14ae40e 534a427bface7 Author: Takashi Iwai Date: Tue May 25 08:50:03 2021 +0200 Merge branch 'topic/pci-rescan-prep-v2' into for-next Pull PCI rescan prep work. Link: https://lore.kernel.org/r/20210523090920.15345-1-tiwai@suse.de commit 534a427bface78d682482ad66ce1a517522acc1d Author: Takashi Iwai Date: Sun May 23 11:09:20 2021 +0200 ALSA: pcm: Block the release until the system resume finishes The normal PCM operations are already blocked during the card power off state in the PCM common ioctl handler, but the release isn't covered. As the PCM stream release may also access the hardware, let's block the release until the card power turns on. Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210523090920.15345-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit b6cc78da367cf9aac7ae77bbea73ecca43a70461 Author: Takashi Iwai Date: Sun May 23 11:09:19 2021 +0200 ALSA: Drop superfluous argument from snd_power_wait() The power_state argument of snd_power_wait() is superfluous, receiving only SNDRV_POWER_STATE_D0. Let's drop it in all callers for simplicity. Reviewed-by: Jaroslav Kysela Acked-by: Mark Brown Link: https://lore.kernel.org/r/20210523090920.15345-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 968bb2baec60757ae86b4ee937561f5815488044 Author: Takashi Iwai Date: Sun May 23 11:09:18 2021 +0200 ALSA: control: Minor optimization for SNDRV_CTL_IOCTL_POWER_STATE Long long time ago, before the proper PM framework was introduced, it was still possible to reach SNDRV_CTL_IOCTL_POWER ioctl during the power off state. This ioctl existed as a main control for the suspend resume state in the past, but the feature was already dropped along with the standard PM framework. Now the read part, SNDRV_IOCTL_POWER_STATE ioctl, returns practically always D0, and we can do some minor optimization there. Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210523090920.15345-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 73063cd3236e8b17e530c491b1d265ff56f1fa79 Author: Takashi Iwai Date: Sun May 23 11:09:17 2021 +0200 ALSA: control: Drop superfluous snd_power_wait() calls Now we have more fine-grained power controls in each kcontrol ops, the coarse checks of snd_power_wait() in a few control ioctls became superfluous. Let's drop them. Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210523090920.15345-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit e94fdbd7b25d87e64688bb109e2c550217a4c879 Author: Takashi Iwai Date: Sun May 23 11:09:16 2021 +0200 ALSA: control: Track in-flight control read/write/tlv accesses Although the power state check is performed in various places (e.g. at the entrance of quite a few ioctls), there can be still some pending tasks that already went into the ioctl handler or other ops, and those may access the hardware even after the power state check. For example, kcontrol access ioctl paths that call info/get/put callbacks may update the hardware registers. If a system wants to assure the free from such hw access (like the case of PCI rescan feature we're going to implement in future), this situation must be avoided, and we have to sync such in-flight tasks finishing beforehand. For that purpose, this patch introduces a few new things in core code: - A refcount, power_ref, and a wait queue, power_ref_sleep, to the card object - A few new helpers, snd_power_ref(), snd_power_unref(), snd_power_ref_and_wait(), and snd_power_sync_ref() In the code paths that call kctl info/read/write/tlv ops, we check the power state with the newly introduced snd_power_ref_and_wait(). This function also takes the card.power_ref refcount for tracking this in-flight task. Once after the access finishes, snd_power_unref() is called to released the refcount in return. So the driver can sync via snd_power_sync_ref() assuring that all in-flight tasks have been finished. As of this patch, snd_power_sync_ref() is called only at snd_card_disconnect(), but it'll be used in other places in future. Note that atomic_t is used for power_ref intentionally instead of refcount_t. It's because of the design of refcount_t type; refcount_t cannot be zero-based, and it cannot do dec_and_test() call for multiple times, hence it's not suitable for our purpose. Also, this patch changes snd_power_wait() to accept only SNDRV_CTL_POWER_D0, which is the only value that makes sense. In later patch, the snd_power_wait() calls will be cleaned up. Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210523090920.15345-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 533a7ed9d541674e815c7f31c933015e257df3e5 Author: Takashi Iwai Date: Sun May 23 11:09:15 2021 +0200 ALSA: core: Use READ_ONCE() / WRITE_ONCE() for power state change We need proper barriers to handle the power state change of the card from different CPUs. Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210523090920.15345-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6f20785b760119dfc9e5ad569110a9b0e6b3fe35 Author: Lucas De Marchi Date: Thu May 20 17:52:09 2021 -0700 drm/i915/display: fix typo when returning table Fix table returned when port_clock > 270000: drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:752:47: error: variable 'adlp_dkl_phy_dp_ddi_trans_hbr2_hbr3' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] Initial version of the patch had it in a single table, but on second version the table got split, but we continued to reference just one of them. Fixes: ca962882268a ("drm/i915/adl_p: Define and use ADL-P specific DP translation tables") Reported-by: kernel test robot Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210521005209.4058702-1-lucas.demarchi@intel.com commit 8fb33b6055300a23f26868680c22a5726834785e Author: Zhen Lei Date: Tue May 25 10:56:59 2021 +0800 bpf: Fix spelling mistakes Fix some spelling mistakes in comments: aother ==> another Netiher ==> Neither desribe ==> describe intializing ==> initializing funciton ==> function wont ==> won't and move the word 'the' at the end to the next line accross ==> across pathes ==> paths triggerred ==> triggered excute ==> execute ether ==> either conervative ==> conservative convetion ==> convention markes ==> marks interpeter ==> interpreter Signed-off-by: Zhen Lei Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210525025659.8898-2-thunder.leizhen@huawei.com commit 94a332bd8626f6c32e7ba5835dd17eeddbb76e89 Author: Shubhankar Kuranagatti Date: Wed Apr 28 12:28:09 2021 -0700 Input: ims-pcu - replace some spaces with tabs Unnecessary spaces have been replaced with tab space. This is done to maintain code uniformity. Signed-off-by: Shubhankar Kuranagatti Link: https://lore.kernel.org/r/20210428091050.ryr7kxlxre7uhye4@kewl-virtual-machine Signed-off-by: Dmitry Torokhov commit 204db365077df99a487bcd41aa8c6135f783be18 Author: Christophe JAILLET Date: Sat Apr 24 22:26:19 2021 -0700 Input: evbug - remove an empty comment block This is a left-over from commit 1a59d1b8e05e ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156") Axe an empty and useless comment block. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/fda981546203427a0ac86ef47f231239ad18ecfe.1618520227.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov commit 4ce7d68beb9e63d0a0a427cc2b89ec0c68f24b3d Author: Aditya Srivastava Date: Sun May 23 20:44:08 2021 +0530 samples: bpf: Ix kernel-doc syntax in file header The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for samples/bpf/ibumad_kern.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * ibumad BPF sample kernel side Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Signed-off-by: Andrii Nakryiko Acked-by: Randy Dunlap Link: https://lore.kernel.org/bpf/20210523151408.22280-1-yashsri421@gmail.com commit 9f0c317f6aa12b160103ee3946d79276c14b95e2 Author: Yonghong Song Date: Sat May 22 09:23:41 2021 -0700 libbpf: Add support for new llvm bpf relocations LLVM patch https://reviews.llvm.org/D102712 narrowed the scope of existing R_BPF_64_64 and R_BPF_64_32 relocations, and added three new relocations, R_BPF_64_ABS64, R_BPF_64_ABS32 and R_BPF_64_NODYLD32. The main motivation is to make relocations linker friendly. This change, unfortunately, breaks libbpf build, and we will see errors like below: libbpf: ELF relo #0 in section #6 has unexpected type 2 in /home/yhs/work/bpf-next/tools/testing/selftests/bpf/bpf_tcp_nogpl.o Error: failed to link '/home/yhs/work/bpf-next/tools/testing/selftests/bpf/bpf_tcp_nogpl.o': Unknown error -22 (-22) The new relocation R_BPF_64_ABS64 is generated and libbpf linker sanity check doesn't understand it. Relocation section '.rel.struct_ops' at offset 0x1410 contains 1 entries: Offset Info Type Symbol's Value Symbol's Name 0000000000000018 0000000700000002 R_BPF_64_ABS64 0000000000000000 nogpltcp_init Look at the selftests/bpf/bpf_tcp_nogpl.c, void BPF_STRUCT_OPS(nogpltcp_init, struct sock *sk) { } SEC(".struct_ops") struct tcp_congestion_ops bpf_nogpltcp = { .init = (void *)nogpltcp_init, .name = "bpf_nogpltcp", }; The new llvm relocation scheme categorizes 'nogpltcp_init' reference as R_BPF_64_ABS64 instead of R_BPF_64_64 which is used to specify ld_imm64 relocation in the new scheme. Let us fix the linker sanity checking by including R_BPF_64_ABS64 and R_BPF_64_ABS32. There is no need to check R_BPF_64_NODYLD32 which is used for .BTF and .BTF.ext. Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210522162341.3687617-1-yhs@fb.com commit ba5b93d56c8d63f5ab8d30b6f59e0afbd7a1c3ae Author: Corentin Labbe Date: Mon May 24 20:38:46 2021 -0700 dt-bindings: input: remove fsl-mma8450 which is handled by trivial-devices trivial-devices.yaml already provide bindings for fsl-mma8450. Since input/fsl-mma8450.txt provides no extra value, lets remove it. Signed-off-by: Corentin Labbe Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210521192210.12839-1-clabbe@baylibre.com Signed-off-by: Dmitry Torokhov commit d9b576917a1d0efa293801a264150a1b37691617 Author: Zhen Lei Date: Mon May 24 11:52:42 2021 -0700 Input: hil_kbd - fix error return code in hil_dev_connect() Return error code -EINVAL rather than '0' when the combo devices are not supported. Fixes: fa71c605c2bb ("Input: combine hil_kbd and hil_ptr drivers") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210515030053.6824-1-thunder.leizhen@huawei.com Signed-off-by: Dmitry Torokhov commit 0b1d6c8c00157cbfcf343925c4de81af0187a7b7 Author: Chris Ye Date: Mon May 24 20:53:11 2021 -0700 Input: xpad - map "Select" button on Microsoft Xbox One controller Add "Select" button input capability and input event mapping for Microsoft Xbox One controller. From product site this is also referred as "Share" button. Signed-off-by: Chris Ye Reviewed-by: Bastien Nocera Link: https://lore.kernel.org/r/20210414021201.2462114-1-lzye@google.com Signed-off-by: Dmitry Torokhov commit 41e81022a04a0294c55cfa7e366bc14b9634c66e Author: Johan Hovold Date: Mon May 24 10:02:59 2021 -0700 Input: usbtouchscreen - fix control-request directions The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the four control requests which erroneously used usb_rcvctrlpipe(). Fixes: 1d3e20236d7a ("[PATCH] USB: usbtouchscreen: unified USB touchscreen driver") Fixes: 24ced062a296 ("usbtouchscreen: add support for DMC TSC-10/25 devices") Fixes: 9e3b25837a20 ("Input: usbtouchscreen - add support for e2i touchscreen controller") Signed-off-by: Johan Hovold Cc: stable@vger.kernel.org # 2.6.17 Link: https://lore.kernel.org/r/20210524092048.4443-1-johan@kernel.org Signed-off-by: Dmitry Torokhov commit 411e2a43d210e98730713acf6d01dcf823ee35e3 Author: Chiqijun Date: Mon May 24 17:44:07 2021 -0500 PCI: Work around Huawei Intelligent NIC VF FLR erratum pcie_flr() starts a Function Level Reset (FLR), waits 100ms (the maximum time allowed for FLR completion by PCIe r5.0, sec 6.6.2), and waits for the FLR to complete. It assumes the FLR is complete when a config read returns valid data. When we do an FLR on several Huawei Intelligent NIC VFs at the same time, firmware on the NIC processes them serially. The VF may respond to config reads before the firmware has completed its reset processing. If we bind a driver to the VF (e.g., by assigning the VF to a virtual machine) in the interval between the successful config read and completion of the firmware reset processing, the NIC VF driver may fail to load. Prevent this driver failure by waiting for the NIC firmware to complete its reset processing. Not all NIC firmware supports this feature. [bhelgaas: commit log] Link: https://support.huawei.com/enterprise/en/doc/EDOC1100063073/87950645/vm-oss-occasionally-fail-to-load-the-in200-driver-when-the-vf-performs-flr Link: https://lore.kernel.org/r/20210414132301.1793-1-chiqijun@huawei.com Signed-off-by: Chiqijun Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson commit 665a69611a73656343049f4e6f21d0ca5ca08526 Author: Krishna Manikandan Date: Mon May 24 17:14:13 2021 +0530 dt-bindings: msm/dp: Add bindings of MSM DisplayPort controller Add bindings for Snapdragon DisplayPort controller driver. Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Signed-off-by: Tanmay Shah Signed-off-by: Kuogee Hsieh Signed-off-by: Krishna Manikandan Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1621856653-10649-4-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 8fc939e72ff80116c090aaf03952253a124d2a8e Author: Krishna Manikandan Date: Mon May 24 17:14:12 2021 +0530 dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings Add YAML schema for the device tree bindings for DSI PHY. Signed-off-by: Krishna Manikandan Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1621856653-10649-3-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 4dbe55c9774179da9630498e647c718d1c910bca Author: Krishna Manikandan Date: Mon May 24 17:14:11 2021 +0530 dt-bindings: msm: dsi: add yaml schemas for DSI bindings Add YAML schema for the device tree bindings for DSI Signed-off-by: Krishna Manikandan Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1621856653-10649-2-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 3d7a0dd8f39bcc9b17700dafb5f40b17e92109ee Author: Krishna Manikandan Date: Mon May 24 17:14:10 2021 +0530 dt-bindings: msm: disp: add yaml schemas for DPU bindings MSM Mobile Display Subsystem (MDSS) encapsulates sub-blocks like DPU display controller, DSI etc. Add YAML schema for DPU device tree bindings. Signed-off-by: Krishna Manikandan Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1621856653-10649-1-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit bcae59d0d45b866d5b9525ea8ece6d671e6767c8 Author: Martin Kaiser Date: Tue May 11 18:12:44 2021 +0200 rtc: imxdi: add wakeup support The DryIce-based RTC supports alarms that trigger an interrupt. Configure this interrupt as a wakeup source that wakes the system up from standby mode. Signed-off-by: Martin Kaiser Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210511161244.16111-1-martin@kaiser.cx commit 37401019fe32b37c78b50163e4b4ffc2dbce4830 Author: Shaokun Zhang Date: Mon May 24 17:33:54 2021 +0800 rtc: efi: Remove the repeated module alias 'MODULE_ALIAS' is declared twice, cleanup one. Cc: Alessandro Zummo Cc: Alexandre Belloni Signed-off-by: Shaokun Zhang Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1621848834-20857-1-git-send-email-zhangshaokun@hisilicon.com commit 54b909436ede47e0ee07f1765da27ec2efa41e84 Author: Dan Carpenter Date: Tue May 11 10:19:26 2021 +0300 rtc: fix snprintf() checking in is_rtc_hctosys() The scnprintf() function silently truncates the printf() and returns the number bytes that it was able to copy (not counting the NUL terminator). Thus, the highest value it can return here is "NAME_SIZE - 1" and the overflow check is dead code. Fix this by using the snprintf() function which returns the number of bytes that would have been copied if there was enough space and changing the condition from "> NAME_SIZE" to ">= NAME_SIZE". Fixes: 92589c986b33 ("rtc-proc: permit the /proc/driver/rtc device to use other devices") Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/YJov/pcGmhLi2pEl@mwanda commit 8df65d4adca654180a5c05ecb853c15d1d74e410 Author: Corentin Labbe Date: Mon May 10 18:25:05 2021 +0000 dt-bindings: convert rtc/faraday,ftrtc01 to yaml Converts rtc/faraday,ftrtc01.txt to yaml. This permits to detect some missing properties: reg, resets, interrupts Reviewed-by: Linus Walleij Signed-off-by: Corentin Labbe Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210510182505.3968936-1-clabbe@baylibre.com commit 206e04ec7539e7bfdde9aa79a7cde656c9eb308e Author: Bixuan Cui Date: Sat May 8 11:15:09 2021 +0800 rtc: mxc_v2: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210508031509.53735-1-cuibixuan@huawei.com commit 0dad3ce523c2917b1912fbde047207533e9f1eeb Author: Raphael Norwitz Date: Thu Apr 8 18:23:40 2021 +0000 PCI: Add pci_reset_bus_function() Secondary Bus Reset interface pci_parent_bus_reset() resets a device by performing a Secondary Bus Reset on a PCI-to-PCI bridge leading to the device. pci_dev_reset_slot_function() does the same, except that it uses a hotplug driver to keep the reset from looking like a hot-remove followed by a hot-add. Add a pci_reset_bus_function() wrapper, which attempts the hotplug driver slot reset and falls back to the parent bus reset if that fails. This provides a single interface for performing a Secondary Bus Reset. [bhelgaas: commit log, don't expose yet] Suggested-by: Alex Williamson Link: https://lore.kernel.org/r/20210323100625.0021a943@omen.home.shazbot.org/ Link: https://lore.kernel.org/r/20210408182328.12323-1-raphael.norwitz@nutanix.com Signed-off-by: Amey Narkhede Signed-off-by: Raphael Norwitz Signed-off-by: Bjorn Helgaas Reviewed-by: Leon Romanovsky commit f765e349c3e1f2e676ad4bd61197216b26976022 Author: Sebastian Reichel Date: Thu Apr 29 00:29:49 2021 +0200 rtc: m41t80: add support for fixed clock Congatec's QMX6 system on module (SoM) uses a m41t62 as RTC. The modules SQW clock output defaults to 32768 Hz. This behaviour is used to provide the i.MX6 CKIL clock. Once the RTC driver is probed, the clock is disabled and all i.MX6 functionality depending on the 32 KHz clock has undefined behaviour. For example when using the hardware watchdog the system will likely do arbitrary reboots. Referencing the m41t62 directly results in a deadlock. The kernel will see, that i.MX6 system clock needs the RTC clock and do probe deferral. But the i.MX6 I2C module never becomes usable without the i.MX6 CKIL clock and thus the RTC's clock will not be probed. So from the kernel's perspective this is a chicken-and-egg problem. Technically everything is fine by not touching anything, since the RTC clock correctly enables the clock on reset (i.e. on battery backup power loss) and also the bootloader enables it in case an something (e.g. an unpatched kernel) disabled this incorrectly. A workaround for this issue is describing the square wave pin as fixed-clock, which is registered early and basically how this pin is used on the i.MX6. Suggested-by: Saravana Kannan Signed-off-by: Sebastian Reichel Reviewed-by: Saravana Kannan Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210428222953.235280-2-sebastian.reichel@collabora.com commit b0ddc5b170058a9ed3c9f031501d735a4eb8ee89 Author: Arnd Bergmann Date: Thu Apr 22 17:15:21 2021 +0200 rtc: bd70528: fix BD71815 watchdog dependency The added Kconfig dependency is slightly incorrect, which can lead to a link failure when the watchdog is a loadable module: arm-linux-gnueabi-ld: drivers/rtc/rtc-bd70528.o: in function `bd70528_set_rtc_based_timers': rtc-bd70528.c:(.text+0x6cc): undefined reference to `bd70528_wdt_set' arm-linux-gnueabi-ld: drivers/rtc/rtc-bd70528.o: in function `bd70528_set_time': rtc-bd70528.c:(.text+0xaa0): undefined reference to `bd70528_wdt_lock' arm-linux-gnueabi-ld: rtc-bd70528.c:(.text+0xab8): undefined reference to `bd70528_wdt_unlock' arm-linux-gnueabi-ld: drivers/rtc/rtc-bd70528.o: in function `bd70528_alm_enable': rtc-bd70528.c:(.text+0xfc0): undefined reference to `bd70528_wdt_lock' arm-linux-gnueabi-ld: rtc-bd70528.c:(.text+0x1030): undefined reference to `bd70528_wdt_unlock' The problem is that it allows to be built-in if MFD_ROHM_BD71828 is built-in, even when the watchdog is a loadable module. Rework this so that having the watchdog as a loadable module always forces the rtc to be a module as well instead of built-in, regardless of bd71828. Fixes: c56dc069f268 ("rtc: bd70528: Support RTC on ROHM BD71815") Signed-off-by: Arnd Bergmann Reviewed-by: Guenter Roeck Reviewed-by: Matti Vaittinen Acked-by: Randy Dunlap # build-tested Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210422151545.2403356-1-arnd@kernel.org commit c1eaf3c09c54bdc0886f8ecd6532803ab9d82454 Merge: d9d15a662cffe d1406175f9686 Author: David S. Miller Date: Mon May 24 14:07:39 2021 -0700 Merge branch 'wan-cleanups' Guangbin Huang says: ==================== net: wan: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit d1406175f96869b653ee1071266a78cb8c70ab80 Author: Peng Li Date: Mon May 24 22:47:17 2021 +0800 net: wan: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 80d67b95d1fe3aa629efb453f57dea935e304421 Author: Peng Li Date: Mon May 24 22:47:16 2021 +0800 net: wan: fix the comments style issue Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 336d781bd952beb1a043b786ced65883d67c34bd Author: Peng Li Date: Mon May 24 22:47:15 2021 +0800 net: wan: replace comparison to NULL with "!card" According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 87feef1cfbbe9233c53d5c4ff03277b70b58c458 Author: Peng Li Date: Mon May 24 22:47:14 2021 +0800 net: wan: move out assignment in if condition Should not use assignment in if condition. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c3b6b5c64f394ce381ae7ce12060dd61768d9dd7 Author: Peng Li Date: Mon May 24 22:47:13 2021 +0800 net: wan: add some required spaces Add space required after that close brace '}'. Add space required before the open parenthesis '('. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e5877104b5ec315167e0234110725f6a7c8351ab Author: Peng Li Date: Mon May 24 22:47:12 2021 +0800 net: wan: fix the code style issue about trailing statements Trailing statements should be on next line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 261795f4113bba9b26e76b27c0522c403d90bfe7 Author: Peng Li Date: Mon May 24 22:47:11 2021 +0800 net: wan: code indent use tabs where possible Code indent should use tabs where possible. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit f0328a1922906be3540611e344914b9682fff350 Author: Peng Li Date: Mon May 24 22:47:10 2021 +0800 net: wan: add blank line after declarations This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit b32db030b96e380a86b0d8827a902bdf41f7035a Author: Peng Li Date: Mon May 24 22:47:09 2021 +0800 net: wan: fix an code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" and should be "foo *bar", and "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 8890d0a1891aea989e23e357eac4c8a206152d58 Author: Peng Li Date: Mon May 24 22:47:08 2021 +0800 net: wan: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit a596fcd9cbc78110b150d41829be54e56f5aae7c Author: Douglas Anderson Date: Mon May 17 13:08:58 2021 -0700 drm/panel: panel-simple: Add missing pm_runtime_dont_use_autosuspend() calls The PM Runtime docs specifically call out the need to call pm_runtime_dont_use_autosuspend() in the remove() callback if pm_runtime_use_autosuspend() was called in probe(): > Drivers in ->remove() callback should undo the runtime PM changes done > in ->probe(). Usually this means calling pm_runtime_disable(), > pm_runtime_dont_use_autosuspend() etc. We should do this. This fixes a warning splat that I saw when I was testing out the panel-simple's remove(). Fixes: 3235b0f20a0a ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") Signed-off-by: Douglas Anderson Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210517130450.v7.1.I9e947183e95c9bd067c9c1d51208ac6a96385139@changeid commit d9d15a662cffe5ce66918606a94bbc8385fbfff0 Merge: feeb371272feb 1bf658eefe38c Author: David S. Miller Date: Mon May 24 13:59:04 2021 -0700 Merge branch 'sja1105-sja1110-prep' Vladimir Oltean says: ==================== SJA1105 DSA driver preparation for new switch introduction (SJA1110) This series contains refactoring patches which are necessary before the support for the new NXP SJA1110 switch can be introduced in this driver. As far as this series is concerned, here is the list of major changes introduced with the SJA1110: - 11 ports vs 5 - port 0 goes to the internal microcontroller, so it is unused as far as DSA is concerned - the Clock Generation Unit does not need any configuration for setting up the PLLs for MII/RMII/RGMII - the L2 Policing Table contains multicast policers too, not just broadcast and per-traffic class. These must be minimally initialized. - more frame buffers ==================== Signed-off-by: David S. Miller commit 1bf658eefe38cc26801b5861bbb6dbf3259ba8c1 Author: Vladimir Oltean Date: Mon May 24 16:14:21 2021 +0300 net: dsa: sja1105: allow the frame buffer size to be customized The shared frame buffer of the SJA1110 is larger than that of SJA1105, which is natural due to the fact that there are more ports. Introduce yet another property in struct sja1105_info which encodes the maximum number of 128 byte blocks that can be used for frame buffers. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 38fbe91f2287c696f290d9115901aa435f7166a8 Author: Vladimir Oltean Date: Mon May 24 16:14:20 2021 +0300 net: dsa: sja1105: configure the multicast policers, if present The SJA1110 policer array is similar in layout with SJA1105, except it contains one multicast policer per port at the end. Detect the presence of multicast policers based on the maximum number of supported L2 Policing Table entries, and make those policers have a shared index equal to the port's default policer. Letting the user configure these policers is not supported at the moment. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f78a2517cf73fb0de68012ba2f42c9ad65d2aa14 Author: Vladimir Oltean Date: Mon May 24 16:14:19 2021 +0300 net: dsa: sja1105: use sja1105_xfer_u32 for the reset procedure Using sja1105_xfer_buf results in a higher overhead and is harder to read. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit fd6f2c257b0bc0c656e88dcc2c6fc7ce180fb2de Author: Vladimir Oltean Date: Mon May 24 16:14:18 2021 +0300 net: dsa: sja1105: dynamically choose the number of static config table entries Due to the fact that the port count is different, some static config tables have a different number of elements in SJA1105 compared to SJA1110. Such an example is the L2 Policing table, which has 45 entries in SJA1105 (one per port x traffic class, and one broadcast policer per port) and 110 entries in SJA1110 (one per port x traffic class, one broadcast and one multicast policer per port). Similarly, the MAC Configuration Table, the L2 Forwarding table, all have a different number of elements simply because the port count is different, and although this can be accounted for by looking at ds->ports, the policing table can't because of the presence of the extra multicast policers. The common denominator for the static config initializers for these tables is that they must set up all the entries within that table. So the simplest way to account for these differences in a uniform manner is to look at struct sja1105_table_ops::max_entry_count. For the sake of uniformity, this patch makes that change also for tables whose number of elements did not change in SJA1110, like the xMII Mode Parameters, the L2 Lookup Parameters, General Parameters, AVB Parameters (all of these are singleton tables with a single entry). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c50376783f23ffd2dd8833c2069e52ba08e82917 Author: Vladimir Oltean Date: Mon May 24 16:14:17 2021 +0300 net: dsa: sja1105: skip CGU configuration if it's unnecessary There are two distinct code paths which enter sja1105_clocking.c, one through sja1105_clocking_setup() and the other through sja1105_clocking_setup_port(): sja1105_static_config_reload sja1105_setup | | | +------------------+ | | v v sja1105_clocking_setup sja1105_adjust_port_config | | v | sja1105_clocking_setup_port <------------------+ As opposed to SJA1105, the SJA1110 does not need any configuration of the Clock Generation Unit in order for xMII ports to work. Just RGMII internal delays need to be configured, and that is done inside sja1105_clocking_setup_port for the RGMII ports. So this patch introduces the concept of a "reserved address", which the CGU configuration functions from sja1105_clocking.c must check before proceeding to do anything. The SJA1110 will have reserved addresses for the CGU PLLs for MII/RMII/RGMII. Additionally, make sja1105_clocking_setup() a function pointer so it can be overridden by the SJA1110. Even though nothing port-related needs to be done in the CGU, there are some operations such as disabling the watchdog clock which are unique to the SJA1110. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit df2a81a35ebb507d8d614d993d3b55425d73ffee Author: Vladimir Oltean Date: Mon May 24 16:14:16 2021 +0300 net: dsa: sja1105: don't assign the host port using dsa_upstream_port() If @port is unused, then dsa_upstream_port(ds, port) returns @port, which means we cannot assume the CPU port can be retrieved this way. The sja1105 switches support a single CPU port, so just iterate over the switch ports and stop at the first CPU port we see. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 82760d7f2ea63829d6ab0f3de7ec98b93132c8ee Author: Vladimir Oltean Date: Mon May 24 16:14:15 2021 +0300 net: dsa: sja1105: dimension the data structures for a larger port count Introduce a SJA1105_MAX_NUM_PORTS macro which at the moment is equal to SJA1105_NUM_PORTS (5). With the introduction of SJA1110, these structures will need to hold information for up to 11 ports. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f238fef1b3de2fac2d09d925ebc75aacf5e27fd1 Author: Vladimir Oltean Date: Mon May 24 16:14:14 2021 +0300 net: dsa: sja1105: avoid some work for unused ports Do not put unused ports in the forwarding domain, and do not allocate FDB entries for dynamic address learning for them. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 542043e91df452ed09f382d8c41cdf3788f31b5e Author: Vladimir Oltean Date: Mon May 24 16:14:13 2021 +0300 net: dsa: sja1105: parameterize the number of ports The sja1105 driver will gain support for the next-gen SJA1110 switch, which is very similar except for the fact it has more than 5 ports. So we need to replace the hardcoded SJA1105_NUM_PORTS in this driver with ds->num_ports. This patch is as mechanical as possible (save for the fact that ds->num_ports is not an integer constant expression). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5556bacaa561aee818148d75e2a7d460343f5468 Merge: f9bceaa59c5c4 49c299b69444d Author: Andrii Nakryiko Date: Mon May 24 13:30:53 2021 -0700 Merge branch 'Add lookup_and_delete_elem support to BPF hash map types' Denis Salopek says: ==================== This patch series extends the existing bpf_map_lookup_and_delete_elem() functionality with 4 more map types: - BPF_MAP_TYPE_HASH, - BPF_MAP_TYPE_PERCPU_HASH, - BPF_MAP_TYPE_LRU_HASH and - BPF_MAP_TYPE_LRU_PERCPU_HASH. Patch 1 adds most of its functionality and logic as well as documentation. As it was previously limited to only stacks and queues which do not support the BPF_F_LOCK flag, patch 2 enables its usage by adding a new libbpf API bpf_map_lookup_and_delete_elem_flags() based on the existing bpf_map_lookup_elem_flags(). Patch 3 adds selftests for lookup_and_delete_elem(). Changes in patch 1: v7: Minor formating nits, add Acked-by. v6: Remove unneeded flag check, minor code/format fixes. v5: Split patch to 3 patches. Extend BPF_MAP_LOOKUP_AND_DELETE_ELEM documentation with this changes. v4: Fix the return value for unsupported map types. v3: Add bpf_map_lookup_and_delete_elem_flags() and enable BPF_F_LOCK flag, change CHECKs to ASSERT_OKs, initialize variables to 0. v2: Add functionality for LRU/per-CPU, add test_progs tests. Changes in patch 2: v7: No change. v6: Add Acked-by. v5: Move to the newest libbpf version (0.4.0). Changes in patch 3: v7: Remove ASSERT_GE macro which is already added in some other commit, change ASSERT_OK to ASSERT_OK_PTR, add Acked-by. v6: Remove PERCPU macros, add ASSERT_GE macro to test_progs.h, remove leftover code. v5: Use more appropriate macros. Better check for changed value. ==================== Signed-off-by: Andrii Nakryiko commit 49c299b69444d58a1d234769a13a3697841deb54 Author: Denis Salopek Date: Tue May 11 23:00:06 2021 +0200 selftests/bpf: Add bpf_lookup_and_delete_elem tests Add bpf selftests and extend existing ones for a new function bpf_lookup_and_delete_elem() for (percpu) hash and (percpu) LRU hash map types. In test_lru_map and test_maps we add an element, lookup_and_delete it, then check whether it's deleted. The newly added lookup_and_delete prog tests practically do the same thing but additionally use a BPF program to change the value of the element for LRU maps. Signed-off-by: Denis Salopek Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/d30d3e0060c1f750e133579623cf1c60ff58f3d9.1620763117.git.denis.salopek@sartura.hr commit d59b9f2d1b2211e948044a099fd0a65941d06570 Author: Denis Salopek Date: Tue May 11 23:00:05 2021 +0200 bpf: Extend libbpf with bpf_map_lookup_and_delete_elem_flags Add bpf_map_lookup_and_delete_elem_flags() libbpf API in order to use the BPF_F_LOCK flag with the map_lookup_and_delete_elem() function. Signed-off-by: Denis Salopek Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/15b05dafe46c7e0750d110f233977372029d1f62.1620763117.git.denis.salopek@sartura.hr commit 3e87f192b405960c0fe83e0925bd0dadf4f8cf43 Author: Denis Salopek Date: Tue May 11 23:00:04 2021 +0200 bpf: Add lookup_and_delete_elem support to hashtab Extend the existing bpf_map_lookup_and_delete_elem() functionality to hashtab map types, in addition to stacks and queues. Create a new hashtab bpf_map_ops function that does lookup and deletion of the element under the same bucket lock and add the created map_ops to bpf.h. Signed-off-by: Denis Salopek Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/4d18480a3e990ffbf14751ddef0325eed3be2966.1620763117.git.denis.salopek@sartura.hr commit feeb371272febb2a4fd01bc84b0bfbf8acd07048 Merge: 62f148d8dde62 4e2471f7b6ef5 Author: David S. Miller Date: Mon May 24 13:24:09 2021 -0700 Merge branch 'hns3-promisc-updates' Huazhong Tan says: ==================== net: hns3: add two promisc mode updates This series includes two updates related to promisc mode for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit 4e2471f7b6ef5a564cd05bc5fb9f3ce71b7b7942 Author: Jian Shen Date: Mon May 24 17:30:43 2021 +0800 net: hns3: use HCLGE_VPORT_STATE_PROMISC_CHANGE to replace HCLGE_STATE_PROMISC_CHANGED Currently, PF is using HCLGE_STATE_PROMISC_CHANGED to indicate need synchronize the promisc mode for itself, and using flag HCLGE_VPORT_STATE_PROMISC_CHANGE for its VF. To keep consistent, remove flag HCLGE_STATE_PROMISC_CHANGED, and use flag HCLGE_VPORT_STATE_PROMISC_CHANGE instead. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1e6e76101fd9f51319a742991778bdc3b2d992d9 Author: Jian Shen Date: Mon May 24 17:30:42 2021 +0800 net: hns3: configure promisc mode for VF asynchronously Currently, when host set VF untrusted, the driver will disable the promisc mode of VF. It may be conflicted when the VF requests the host to set promisc mode. So refactor it by changing promisc mode for VF asynchronously. With this change, the promisc mode of VF can be restored when the VF being trusted again. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 62f148d8dde6239199af49e52ae43d0820765a65 Author: wengjianfeng Date: Mon May 24 10:11:23 2021 +0800 nfc: st-nci: remove unnecessary assignment and label In function st_nci_hci_network_init, the variable r is assigned then goto exit label, which just return r, so we use return to replace it. and exit label only used once at here, so we remove exit label. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit f9bceaa59c5c47a8a08f48e19cbe887e500a1978 Author: Stanislav Fomichev Date: Thu May 20 20:06:53 2021 -0700 libbpf: Skip bpf_object__probe_loading for light skeleton I'm getting the following error when running 'gen skeleton -L' as regular user: libbpf: Error in bpf_object__probe_loading():Operation not permitted(1). Couldn't load trivial BPF program. Make sure your kernel supports BPF (CONFIG_BPF_SYSCALL=y) and/or that RLIMIT_MEMLOCK is set to big enough value. Fixes: 67234743736a ("libbpf: Generate loader program out of BPF ELF file.") Signed-off-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210521030653.2626513-1-sdf@google.com commit effe3781b6cc8144d6b55b5159ec5bafd73639f7 Author: Alexandru Ardelean Date: Sat May 15 10:52:57 2021 +0300 gpio: tps65912: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 0cef30b8beafb2be1adf0e9b7487e5084eec2376 Author: Alexandru Ardelean Date: Sat May 15 10:54:44 2021 +0300 gpio: tps65218: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 3660660a8e864922613d6c798a0c99ff36092f45 Author: Alexandru Ardelean Date: Sat May 15 13:58:31 2021 +0300 gpio: tc3589x: emove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit cc7af0bfa0d953fc9aaf278f11ea6f9b17ac228b Author: Alexandru Ardelean Date: Sat May 15 10:52:33 2021 +0300 gpio: tps6586x: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit c2a11971549b16a24cce81250d84b63d53499fd0 Merge: f4f809f66b754 08b2b6fdf6b26 Author: Tejun Heo Date: Mon May 24 13:43:56 2021 -0400 Merge branch 'for-5.13-fixes' into for-5.14 commit be7ae56809bf6d3e6ee80cc92f4096207640a2fb Author: Hanjun Guo Date: Mon May 24 17:41:05 2021 +0800 ACPI: configfs: Replace ACPI_INFO() with pr_debug() The ACPI_INFO() macro is used for message printing in the ACPICA code. ACPI_INFO() will be empty if the ACPICA debug is not enabled, so replace it with pr_debug(). Also remove the not needed ACPICA header file inclusions to decouple from ACPICA. Signed-off-by: Hanjun Guo [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 64887bbddae56cb808089a7b3d5247d1a71a1e7e Author: Hanjun Guo Date: Mon May 24 16:35:08 2021 +0800 ACPI: ipmi: Remove address space handler in error path The acpi_install_address_space_handler() is coupled with acpi_remove_address_space_handler() in ipmi module init/exit, but it forgets to remove the handler in acpi_ipmi_init() if the ipmi_smi_watcher_register() call fails, so add the removal of the address space handler in error path. Signed-off-by: Hanjun Guo [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 6be2408a1ef632a48149044d1757c80ab1096213 Author: Zhen Lei Date: Mon May 24 17:30:10 2021 +0800 PM: hibernate: fix spelling mistakes Fix some spelling mistakes in comments: corresonds ==> corresponds alocated ==> allocated unitialized ==> uninitialized Deompression ==> Decompression Signed-off-by: Zhen Lei Signed-off-by: Rafael J. Wysocki commit 558642bccede3d0e6ffebe4106b0719e29b9e4a8 Author: Tian Tao Date: Thu May 20 15:34:58 2021 +0800 PM: wakeirq: Set IRQF_NO_AUTOEN when requesting the IRQ request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can be replaced by request_irq() with IRQF_NO_AUTOEN flag. This change is just to simplify the code, no actual functional changes. Signed-off-by: Tian Tao Reviewed-by: Tony Lindgren [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki commit a0765597c986ad52c9bc93319987d41bc17f59ef Author: Wei Yongjun Date: Mon May 24 13:37:04 2021 +0000 usb: typec: tcpci: Make symbol 'tcpci_apply_rc' static The sparse tool complains as follows: drivers/usb/typec/tcpm/tcpci.c:118:5: warning: symbol 'tcpci_apply_rc' was not declared. Should it be static? This symbol is not used outside of tcpci.c, so marks it static. Fixes: 7257fbc7c598 ("usb: typec: tcpci: Implement callback for apply_rc") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210524133704.2432555-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit ca82c06788422f7bff38e1282bf5057aefd70903 Author: Andy Shevchenko Date: Fri May 21 17:52:43 2021 +0300 usb: phy: isp1301: Deduplicate of_find_i2c_device_by_node() The driver is using open-coded variant of of_find_i2c_device_by_node(). Replace it by the actual call to the above mentioned API. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210521145243.87911-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 08377263a932db95e01c70a1b2fe597a605d645a Author: Geoffrey D. Bennett Date: Sat May 22 03:10:27 2021 +0930 USB: usbfs: remove double evaluation of usb_sndctrlpipe() usb_sndctrlpipe() is evaluated in do_proc_control(), saved in a variable, then evaluated again. Use the saved variable instead, to match the use of usb_rcvctrlpipe(). Acked-by: Alan Stern Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/20210521174027.GA116484@m.b4.vu Signed-off-by: Greg Kroah-Hartman commit 1eef7953129c3c1d0ebe5f668f781157acb3fb84 Author: Aditya Srivastava Date: Sat May 22 17:22:27 2021 +0530 USB: gadget: udc: fix kernel-doc syntax in file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/usb/gadget/udc/trace files follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc. For e.g., running scripts/kernel-doc -none drivers/usb/gadget/udc/trace.h emits: warning: expecting prototype for udc.c(). Prototype was for TRACE_SYSTEM() instead Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Acked-by: Randy Dunlap Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210522115227.9977-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8184035805dc87dd826101b930d3dce97758f7b1 Author: Gustavo A. R. Silva Date: Thu May 13 15:37:30 2021 -0500 rsxx: Use struct_size() in vmalloc() Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210513203730.GA212128@embeddedor Signed-off-by: Jens Axboe commit d97e594c51660bea510a387731637b894651e4b5 Author: John Garry Date: Thu May 13 20:00:58 2021 +0800 blk-mq: Use request queue-wide tags for tagset-wide sbitmap The tags used for an IO scheduler are currently per hctx. As such, when q->nr_hw_queues grows, so does the request queue total IO scheduler tag depth. This may cause problems for SCSI MQ HBAs whose total driver depth is fixed. Ming and Yanhui report higher CPU usage and lower throughput in scenarios where the fixed total driver tag depth is appreciably lower than the total scheduler tag depth: https://lore.kernel.org/linux-block/440dfcfc-1a2c-bd98-1161-cec4d78c6dfc@huawei.com/T/#mc0d6d4f95275a2743d1c8c3e4dc9ff6c9aa3a76b In that scenario, since the scheduler tag is got first, much contention is introduced since a driver tag may not be available after we have got the sched tag. Improve this scenario by introducing request queue-wide tags for when a tagset-wide sbitmap is used. The static sched requests are still allocated per hctx, as requests are initialised per hctx, as in blk_mq_init_request(..., hctx_idx, ...) -> set->ops->init_request(.., hctx_idx, ...). For simplicity of resizing the request queue sbitmap when updating the request queue depth, just init at the max possible size, so we don't need to deal with the possibly with swapping out a new sbitmap for old if we need to grow. Signed-off-by: John Garry Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/1620907258-30910-3-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe commit 56b68085e536eff2676108f2f8356889a7dbbf55 Author: John Garry Date: Thu May 13 20:00:57 2021 +0800 blk-mq: Some tag allocation code refactoring The tag allocation code to alloc the sbitmap pairs is common for regular bitmaps tags and shared sbitmap, so refactor into a common function. Also remove superfluous "flags" argument from blk_mq_init_shared_sbitmap(). Signed-off-by: John Garry Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/1620907258-30910-2-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe commit 364b61818f65045479e42e76ed8dd6f051778280 Author: Ming Lei Date: Tue May 11 23:22:36 2021 +0800 blk-mq: clearing flush request reference in tags->rqs[] Before we free request queue, clearing flush request reference in tags->rqs[], so that potential UAF can be avoided. Based on one patch written by David Jeffery. Tested-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: David Jeffery Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210511152236.763464-5-ming.lei@redhat.com Signed-off-by: Jens Axboe commit bd63141d585bef14f4caf111f6d0e27fe2300ec6 Author: Ming Lei Date: Tue May 11 23:22:35 2021 +0800 blk-mq: clear stale request in tags->rq[] before freeing one request pool refcount_inc_not_zero() in bt_tags_iter() still may read one freed request. Fix the issue by the following approach: 1) hold a per-tags spinlock when reading ->rqs[tag] and calling refcount_inc_not_zero in bt_tags_iter() 2) clearing stale request referred via ->rqs[tag] before freeing request pool, the per-tags spinlock is held for clearing stale ->rq[tag] So after we cleared stale requests, bt_tags_iter() won't observe freed request any more, also the clearing will wait for pending request reference. The idea of clearing ->rqs[] is borrowed from John Garry's previous patch and one recent David's patch. Tested-by: John Garry Reviewed-by: David Jeffery Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210511152236.763464-4-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 2e315dc07df009c3e29d6926871f62a30cfae394 Author: Ming Lei Date: Tue May 11 23:22:34 2021 +0800 blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter Grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter(), and this way will prevent the request from being re-used when ->fn is running. The approach is same as what we do during handling timeout. Fix request use-after-free(UAF) related with completion race or queue releasing: - If one rq is referred before rq->q is frozen, then queue won't be frozen before the request is released during iteration. - If one rq is referred after rq->q is frozen, refcount_inc_not_zero() will return false, and we won't iterate over this request. However, still one request UAF not covered: refcount_inc_not_zero() may read one freed request, and it will be handled in next patch. Tested-by: John Garry Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210511152236.763464-3-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 84da7acc3ba53af26f15c4b0ada446127b7a7836 Author: Ming Lei Date: Tue May 11 23:22:33 2021 +0800 block: avoid double io accounting for flush request For flush request, rq->end_io() may be called two times, one is from timeout handling(blk_mq_check_expired()), another is from normal completion(__blk_mq_end_request()). Move blk_account_io_flush() after flush_rq->ref drops to zero, so io accounting can be done just once for flush request. Fixes: b68663186577 ("block: add iostat counters for flush requests") Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Tested-by: John Garry Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210511152236.763464-2-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 8c390ff910c5500fc16cca6f90ac2a60c7c84979 Author: Max Gurtovoy Date: Tue May 11 15:53:19 2021 +0000 block: remove unneeded parenthesis from blk-sysfs Align to common code conventions. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20210511155319.1885277-1-mgurtovoy@nvidia.com Signed-off-by: Jens Axboe commit b5f3352e0868611b555e1dcb2e1ffb8e346c519c Author: Tejun Heo Date: Tue May 11 14:58:04 2021 -0400 blkcg: drop CLONE_IO check in blkcg_can_attach() blkcg has always rejected to attach if any of the member tasks has shared io_context. The rationale was that io_contexts can be shared across different cgroups making it impossible to define what the appropriate control behavior should be. However, this check causes more problems than it solves: * The check prevents controller enable and migrations but not CLONE_IO itself, which can lead to surprises as the outcome changes depending on the order of operations. * Sharing within a cgroup is fine but the check can't distinguish that. This leads to unnecessary conflicts with the recent CLONE_IO usage in io_uring. io_context sharing doesn't make any difference for rq_qos based controllers and the way it's used is safe as long as tasks aren't migrated dynamically which is the vast majority of use cases. While we can try to make the check more precise to avoid false positives, the added complexity doesn't seem worthwhile. Let's just drop blkcg_can_attach(). Signed-off-by: Tejun Heo Link: https://lore.kernel.org/r/YJrTvHbrRDbJjw+S@slm.duckdns.org Signed-off-by: Jens Axboe commit 65a8db393a8e49ee98432cf3e641d2bd2fa88606 Author: Yang Yingliang Date: Tue May 11 19:34:40 2021 +0800 aoe: remove unnecessary mutex_init() The mutex ktio_spawn_lock is initialized statically. It is unnecessary to initialize by mutex_init(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210511113440.3772053-1-yangyingliang@huawei.com Signed-off-by: Jens Axboe commit 51fd43e2801054b1321b1d81b91dc37efdff5127 Author: zhangyi (F) Date: Sat Mar 13 11:01:46 2021 +0800 block_dump: remove comments in docs Now block_dump feature is gone, remove all comments in docs. Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210313030146.2882027-4-yi.zhang@huawei.com Signed-off-by: Jens Axboe commit 3af3d772f7216cf23081bb4176e86f1219d32ebc Author: zhangyi (F) Date: Sat Mar 13 11:01:45 2021 +0800 block_dump: remove block_dump feature We have already delete block_dump feature in mark_inode_dirty() because it can be replaced by tracepoints, now we also remove the part in submit_bio() for the same reason. The part of block dump feature in submit_bio() dump the write process, write region and sectors on the target disk into kernel message. it can be replaced by block_bio_queue tracepoint in submit_bio_checks(), so we do not need block_dump anymore, remove the whole block_dump feature. Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210313030146.2882027-3-yi.zhang@huawei.com Signed-off-by: Jens Axboe commit 12e0613715e1cf305fffafaf0e89d810d9a85cc0 Author: zhangyi (F) Date: Sat Mar 13 11:01:44 2021 +0800 block_dump: remove block_dump feature in mark_inode_dirty() block_dump is an old debugging interface, one of it's functions is used to print the information about who write which file on disk. If we enable block_dump through /proc/sys/vm/block_dump and turn on debug log level, we can gather information about write process name, target file name and disk from kernel message. This feature is realized in block_dump___mark_inode_dirty(), it print above information into kernel message directly when marking inode dirty, so it is noisy and can easily trigger log storm. At the same time, get the dentry refcount is also not safe, we found it will lead to deadlock on ext4 file system with data=journal mode. After tracepoints has been introduced into the kernel, we got a tracepoint in __mark_inode_dirty(), which is a better replacement of block_dump___mark_inode_dirty(). The only downside is that it only trace the inode number and not a file name, but it probably doesn't matter because the original printed file name in block_dump is not accurate in some cases, and we can still find it through the inode number and device id. So this patch delete the dirting inode part of block_dump feature. Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210313030146.2882027-2-yi.zhang@huawei.com Signed-off-by: Jens Axboe commit 257d36d493e94e70cdc941e66f81ad3c30c80008 Author: Maxime Ripard Date: Fri May 7 17:05:14 2021 +0200 drm/vc4: hdmi: Add a workqueue to set scrambling It looks like some displays (like the LG 27UL850-W) don't enable the scrambling when the HDMI driver enables it. However, if we set later the scrambler enable bit, the display will work as expected. Let's create delayed work queue to periodically look at the display scrambling status, and if it's not set yet try to enable it again. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-12-maxime@cerno.tech commit c85695a2016e2ed0f3641f9f5917642e7d3c3721 Author: Maxime Ripard Date: Fri May 7 17:05:13 2021 +0200 drm/vc4: hdmi: Enable the scrambler The HDMI controller on the BCM2711 includes a scrambler in order to reach the HDMI 2.0 modes that require it. Let's add the support for it. Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-11-maxime@cerno.tech commit 86e3a65fdb63ec3351e5368794e7d5c808be5bc3 Author: Maxime Ripard Date: Fri May 7 17:05:12 2021 +0200 drm/vc4: hdmi: Check and warn if we can't reach 4kp60 frequencies In order to reach the frequencies needed to output at 594MHz, the firmware needs to be configured with the appropriate parameters in the config.txt file (enable_hdmi_4kp60 and force_turbo). Let's detect it at bind time, warn the user if we can't, and filter out the relevant modes. Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-10-maxime@cerno.tech commit 7d9061e097e859dc33ad5d5f889385875f726808 Author: Maxime Ripard Date: Fri May 7 17:05:11 2021 +0200 drm/vc4: hdmi: Properly compute the BVB clock rate The BVB clock rate computation doesn't take into account a mode clock of 594MHz that we're going to need to support 4k60. Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-9-maxime@cerno.tech commit 7c9005703ff5de70faa9a0c5d571279382674372 Author: Maxime Ripard Date: Fri May 7 17:05:10 2021 +0200 drm/vc4: hvs: Make the HVS bind first We'll need to have the HVS binding before the HDMI controllers so that we can check whether the firmware allows to run in 4kp60. Reorder a bit the component list, and document the current constraints we're aware of. Acked-by: Dave Stevenson Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-8-maxime@cerno.tech commit 5b006000423667ef0f55721fc93e477b31f22d28 Author: Maxime Ripard Date: Fri May 7 17:05:09 2021 +0200 drm/vc4: hdmi: Prevent clock unbalance Since we fixed the hooks to disable the encoder at boot, we now have an unbalanced clk_disable call at boot since we never enabled them in the first place. Let's mimic the state of the hardware and enable the clocks at boot if the controller is enabled to get the use-count right. Cc: # v5.10+ Fixes: 09c438139b8f ("drm/vc4: hdmi: Implement finer-grained hooks") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-7-maxime@cerno.tech commit b601c16b7ba8f3bb7a7e773b238da6b63657fa1d Author: Maxime Ripard Date: Fri May 7 17:05:08 2021 +0200 drm/vc4: crtc: Lookup the encoder from the register at boot At boot, we can't rely on the vc4_get_crtc_encoder since we don't have a state yet and thus will not be able to figure out which connector is attached to our CRTC. However, we have a muxing bit in the CRTC register we can use to get the encoder currently connected to the pixelvalve. We can thus read that register, lookup the associated register through the vc4_pv_data structure, and then pass it to vc4_crtc_disable so that we can perform the proper operations. Fixes: 875a4d536842 ("drm/vc4: drv: Disable the CRTC at boot time") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-6-maxime@cerno.tech commit 5a184d959d5a5a66b377cb5cd4c95a80388e0c88 Author: Maxime Ripard Date: Fri May 7 17:05:07 2021 +0200 drm/vc4: crtc: Fix vc4_get_crtc_encoder logic The vc4_get_crtc_encoder function currently only works when the connector->state->crtc pointer is set, which is only true when the connector is currently enabled. However, we use it as part of the disable path as well, and our lookup will fail in that case, resulting in it returning a null pointer we can't act on. We can access the connector that used to be connected to that crtc though using the old connector state in the disable path. Since we want to support both the enable and disable path, we can support it by passing the state accessor variant as a function pointer, together with the atomic state. Fixes: 792c3132bc1b ("drm/vc4: encoder: Add finer-grained encoder callbacks") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-5-maxime@cerno.tech commit c6883985d46319e0d4f159de8932b09ff93e877d Author: Maxime Ripard Date: Fri May 7 17:05:06 2021 +0200 drm/vc4: crtc: Pass the drm_atomic_state to config_pv The vc4_crtc_config_pv will need to access the drm_atomic_state structure and its only parent function, vc4_crtc_atomic_enable already has access to it. Let's pass it as a parameter. Fixes: 792c3132bc1b ("drm/vc4: encoder: Add finer-grained encoder callbacks") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-4-maxime@cerno.tech commit 47a50743031ad4138050ae6d266ddd3dfe845ead Author: Maxime Ripard Date: Fri May 7 17:05:05 2021 +0200 drm/vc4: crtc: Skip the TXP The vc4_set_crtc_possible_masks is meant to run over all the encoders and then set their possible_crtcs mask to their associated pixelvalve. However, since the commit 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own"), the TXP has been turned to a CRTC and encoder of its own, and while it does indeed register an encoder, it no longer has an associated pixelvalve. The code will thus run over the TXP encoder and set a bogus possible_crtcs mask, overriding the one set in the TXP bind function. In order to fix this, let's skip any virtual encoder. Cc: # v5.9+ Fixes: 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own") Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-3-maxime@cerno.tech commit bf6de8e61509f3c957d7f75f017b18d40a18a950 Author: Maxime Ripard Date: Fri May 7 17:05:04 2021 +0200 drm/vc4: txp: Properly set the possible_crtcs mask The current code does a binary OR on the possible_crtcs variable of the TXP encoder, while we want to set it to that value instead. Cc: # v5.9+ Fixes: 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own") Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-2-maxime@cerno.tech commit b19d3479f25e8a0ff24df0b46c82e50ef0f900dd Author: Salvatore Bonaccorso Date: Mon May 24 14:21:11 2021 +0200 ARM: dts: sun8i: h3: orangepi-plus: Fix ethernet phy-mode Commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") sets the RX/TX delay according to the phy-mode property in the device tree. For the Orange Pi Plus board this is "rgmii", which is the wrong setting. Following the example of a900cac3750b ("ARM: dts: sun7i: a20: bananapro: Fix ethernet phy-mode") the phy-mode is changed to "rgmii-id" which gets the Ethernet working again on this board. Fixes: bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") Reported-by: "B.R. Oake" Reported-by: Vagrant Cascadian Link: https://bugs.debian.org/988574 Signed-off-by: Salvatore Bonaccorso Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210524122111.416885-1-carnil@debian.org commit 091d5db0abd6d2530c6c942067ac5c78e64d4d08 Author: Arnaud Ferraris Date: Thu Apr 29 22:58:59 2021 -0500 arm64: dts: allwinner: pinephone: Set audio card name Add the "PinePhone" name to the sound card: this will make upstreaming an ALSA UCM config easier as we can use a unique name. It also avoids an issue where the default card name is truncated. Signed-off-by: Arnaud Ferraris [Samuel: Split out change, updated commit message] Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-8-samuel@sholland.org commit 47e4dc4e63e1dcb8eec01c4214bcefc248eb72ed Author: Tobias Schramm Date: Thu May 13 15:13:15 2021 +0200 clk: sunxi-ng: v3s: fix incorrect postdivider on pll-audio Commit 46060be6d840 ("clk: sunxi-ng: v3s: use sigma-delta modulation for audio-pll") changed the audio pll on the Allwinner V3s and V3 SoCs to use sigma-delta modulation. In the process the declaration of fixed postdivider providing "pll-audio" was adjusted to provide the desired clock rates from the now sigma-delta modulated pll. However, while the divider used for calculations by the clock framework was adjusted the actual divider programmed into the hardware in sun8i_v3_v3s_ccu_init was left at "divide by four". This broke the "pll-audio" clock, now only providing quater the expected clock rate. It would in general be desirable to program the postdivider for "pll-audio" to four, such that a broader range of frequencies were available on the pll outputs. But the clock for the integrated codec "ac-dig" does not feature a mux that allows to select from all pll outputs as it is just a simple clock gate connected to "pll-audio". Thus we need to set the postdivider to one to be able to provide the 22.5792MHz and 24.576MHz rates required by the internal sun4i codec. This patches fixes the incorrect clock rate by forcing the postdivider to one in sun8i_v3_v3s_ccu_init. Fixes: 46060be6d840 ("clk: sunxi-ng: v3s: use sigma-delta modulation for audio-pll") Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210513131315.2059451-1-t.schramm@manjaro.org commit eb37ca9c98ae1a61eb9bbe157d320bbe858adbf4 Merge: af00978a0a06b d6956a7dde6fb Author: Mark Brown Date: Mon May 24 12:54:49 2021 +0100 Merge series "ASoC: rsnd: add D3 support" from Kuninori Morimoto : Hi Mark, Rob These adds R-Car D3 support for rsnd driver. [1/3] is tidyup patch for dt-bindings (not only for D3). [2/3], [3/3] are for R-Car D3. Kuninori Morimoto (3): ASoC: dt-bindings: renesas: rsnd: tidyup properties ASoC: rsnd: tidyup loop on rsnd_adg_clk_query() ASoC: rsnd: add null CLOCKIN support .../bindings/sound/renesas,rsnd.yaml | 10 ++++- sound/soc/sh/rcar/adg.c | 37 ++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) -- 2.25.1 commit a122d70bb81f1429e2ce472907c358adfa3ebe5f Author: Mateusz Kwiatkowski Date: Thu May 20 17:03:43 2021 +0200 drm/vc4: Separate VEC compatible variants The VEC's DAC on BCM2711 is slightly different compared to the one on BCM283x and needs different configuration. In particular, bit 3 (mask 0x8) switches the BCM2711 DAC input to "self-test input data", which makes the output unusable. Separating two compatible variants in devicetrees and the DRM driver was therefore necessary. The configurations used for both variants have been borrowed from Raspberry Pi (model 3B for BCM283x, 4B for BCM2711) firmware defaults. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210520150344.273900-4-maxime@cerno.tech commit 082152aacd04069fe050be4706e57263fee64336 Author: Mateusz Kwiatkowski Date: Thu May 20 17:03:42 2021 +0200 dt-bindings: display: bcm2835-vec: Add BCM2711 compatible The BCM2711 VEC uses a slightly different, incompatible, setup than the one used for the earlier SoC. Add a new compatible for it. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard Acked-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210520150344.273900-3-maxime@cerno.tech commit fc7a8abcee2225d6279ff785d33e24d70c738c6e Author: Mateusz Kwiatkowski Date: Thu May 20 17:03:41 2021 +0200 drm/vc4: Fix clock source for VEC PixelValve on BCM2711 On the BCM2711 (Raspberry Pi 4), the VEC is actually connected to output 2 of pixelvalve3. NOTE: This contradicts the Broadcom docs, but has been empirically tested and confirmed by Raspberry Pi firmware devs. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210520150344.273900-2-maxime@cerno.tech commit 77b06ddc04354293f746d0434f00700110d3392d Author: Thomas Gleixner Date: Tue May 18 11:17:33 2021 +0200 perf/hisi: Use irq_set_affinity() These drivers use irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Shaokun Zhang Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.813375875@linutronix.de Signed-off-by: Will Deacon commit ba4489fb949cbd9c9b877dceae361129ed6280f1 Author: Thomas Gleixner Date: Tue May 18 11:17:32 2021 +0200 perf/imx_ddr: Use irq_set_affinity() The driver uses irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Frank Li Cc: Will Deacon Cc: Mark Rutland Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.699566062@linutronix.de Signed-off-by: Will Deacon commit 2621054535955fb78ea96b76b279eb481f40fcef Author: Thomas Gleixner Date: Tue May 18 11:17:31 2021 +0200 perf/arm-smmuv3: Use irq_set_affinity() The driver uses irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.603636289@linutronix.de Signed-off-by: Will Deacon commit 41ea281724c097e15aca1a8522abbfa54a60acde Author: Thomas Gleixner Date: Tue May 18 11:17:30 2021 +0200 perf/arm-dsu: Use irq_set_affinity() The driver uses irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.505110632@linutronix.de Signed-off-by: Will Deacon commit 1ceeb8d430f5ea780b8f7d02466a7454cc845528 Author: Thomas Gleixner Date: Tue May 18 11:17:29 2021 +0200 perf/arm-dmc620: Use irq_set_affinity() The driver uses irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.395086573@linutronix.de Signed-off-by: Will Deacon commit 8ec25d34012da3bf417a4d16c057a54064626058 Author: Thomas Gleixner Date: Tue May 18 11:17:28 2021 +0200 perf/arm-cmn: Use irq_set_affinity() The driver uses irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.277228577@linutronix.de Signed-off-by: Will Deacon commit 84fca8ba620581067c16f2b578f277b1c72fb74b Author: Thomas Gleixner Date: Tue May 18 11:17:27 2021 +0200 perf/arm-ccn: Use irq_set_affinity() The driver uses irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093118.128250213@linutronix.de Signed-off-by: Will Deacon commit da3862e7277bdb0d2cb4fd9511a186b0462448bf Merge: c4681547bcce7 4d80d6ca5d77f Author: Will Deacon Date: Mon May 24 10:58:14 2021 +0100 Merge tag 'irq-export-set-affinity' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-next/perf Export irq_set_affinity() for cleaning up drivers/perf Pull export of irq_set_affinity() from Thomas Gleixner, so we can convert all new and exiting Arm PMU drivers to the new interface. * tag 'irq-export-set-affinity' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Export affinity setter for modules commit 273895109a04521eb6f2e3ab872d7d95a54c2c6b Author: Anusha Srivatsa Date: Fri May 21 10:40:47 2021 -0700 drm/i915/gvt: Add missing macro name changes Propogate changes to macros name containing CSR_* to DMC_* from display side. Fixes: 0633cdcbaa77 ("drm/i915/dmc: Rename macro names containing csr") Cc: intel-gvt-dev@lists.freedesktop.org Cc: Jani Nikula Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: Anusha Srivatsa Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210521174047.3861-1-anusha.srivatsa@intel.com commit 21e4e15a846f86643a43c291cbed5dca3639fc2b Author: YueHaibing Date: Sun May 23 17:02:58 2021 +0800 reiserfs: Remove unneed check in reiserfs_write_full_page() Condition !A || A && B is equivalent to !A || B. Generated by: scripts/coccinelle/misc/excluded_middle.cocci Link: https://lore.kernel.org/r/20210523090258.27696-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Jan Kara commit ab053f48f9264ed5c714d0427b3115f121d4c476 Author: David Bauer Date: Sat May 22 09:44:53 2021 +0200 spi: ath79: set number of chipselect lines All chipsets from AR7100 up to QCA9563 have three dedicated chipselect lines for the integrated SPI controller. Set the number of chipselect lines available on the controller to this value. Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20210522074453.39299-2-mail@david-bauer.net Signed-off-by: Mark Brown commit 42a7dfa26fc6df1624d7c2955200e5053dd0b818 Author: David Bauer Date: Sat May 22 09:44:52 2021 +0200 spi: ath79: drop platform data The ath79 platform has been converted to pure OF. The platform data is not needed anymore because of this. Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20210522074453.39299-1-mail@david-bauer.net Signed-off-by: Mark Brown commit 7c556aec14099c87c95bb7011c74fafe45d93679 Author: Axel Lin Date: Sat May 22 20:42:50 2021 +0800 regulator: bd70528: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210522124250.2121076-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 8590ccd4dfd207d89c3312cf8a8b25990acaa079 Author: Axel Lin Date: Sat May 22 12:08:14 2021 +0800 regulator: max8973: Convert to use regulator_set_ramp_delay_regmap Use regulator_set_ramp_delay_regmap instead of open-coded. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210522040814.2042397-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 5ba3747dbc9ade2d22a8f5bff3c928cb41d35030 Author: Randy Dunlap Date: Sat May 22 17:14:27 2021 -0700 regulator: bd71815: add select to fix build Mend the Kconfig for REGULATOR_BD71815 to prevent build errors: riscv32-linux-ld: drivers/regulator/bd71815-regulator.o: in function `.L0 ': regulator.c:289: undefined reference to `rohm_regulator_set_dvs_levels' riscv32-linux-ld: drivers/regulator/bd71815-regulator.c:370: undefined reference to `rohm_regulator_set_dvs_levels' Fixes: 1aad39001e85 ("regulator: Support ROHM BD71815 regulators") Signed-off-by: Randy Dunlap Cc: Matti Vaittinen Cc: Lee Jones Cc: Mark Brown Cc: Liam Girdwood Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210523001427.13500-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit af00978a0a06bab60bd5adf54a65ea69d19ce35d Author: Stephan Gerhold Date: Thu May 13 12:41:29 2021 +0200 ASoC: codecs: Add driver for NXP/Goodix TFA989x (TFA1) amplifiers NXP's TFA98xx (now part of Goodix) are fairly popular speaker amplifiers used in many smartphones and tablets. Most of them are sold as "smart amplifiers" with built-in "CoolFlux DSP" that is used for volume control, plus a "sophisticated speaker-boost and protection algorithm". Unfortunately, they are also almost entirely undocumented. The short datasheets (e.g. [1] for TFA9897) describe the available features, but do not provide any information about the registers or how to use the "CoolFlux DSP". The amplifiers are most often configured through proprietary userspace libraries. There are also some (rather complex) kernel drivers (e.g. [2]) but even those rely on obscure firmware blobs for configuration (so-called "containers"). They seem to contain different "profiles" with tuned speaker settings, sample rates and volume steps (which would be better exposed as separate ALSA mixers). The format of the firmware files seems to have changed a lot over the time, so it's not even possible to simply re-use the firmware originally provided by the vendor. Overall, it seems close to impossible to develop a proper mainline driver for these amplifiers that could make proper use of the built-in DSP. This commit implements a compromise: At least the TFA1 family of the TFA98xx amplifiers (usually called TFA989x) provide a way to *bypass* the DSP using a special register sequence. The register sequence can be found in similar variations in the kernel drivers from lots of vendors e.g. in [3] and was probably mainly used for factory testing. With the DSP bypassed, the amplifier acts mostly like a dumb standard speaker amplifier, without (hardware) volume control. However, the setup is much simpler and it works without any obscure firmware. This driver implements the DSP bypass combined with chip-specific initialization sequences adapted from [2]. Only TFA9895 is supported in this initial commit. Except for the lack of volume control I can not hear any difference with or without the DSP, it works just fine. This driver allows the speaker to work on mainline Linux running on the Samsung Galaxy A3/A5 (2015) [TFA9895] and Alcatel Idol 3 [TFA9897]. TFA9897 support will be added in separate patch set later. [1]: https://product.goodix.com/en/docview/TFA9897%20SDS_Rev.3.1?objectId=47&objectType=document&version=78 [2]: https://source.codeaurora.org/external/mas/tfa98xx [3]: https://github.com/sonyxperiadev/kernel/blob/57b5050e340f40a88e1ddb8d16fd9adb44418923/sound/soc/codecs/tfa98xx.c#L1422-L1462 Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210513104129.36583-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 17ba36b704692a433d38cb230e99ec333ecd14a2 Author: Stephan Gerhold Date: Thu May 13 12:41:28 2021 +0200 ASoC: dt-bindings: codecs: Add bindings for nxp, tfa989x NXP/Goodix TFA989X (TFA1) amplifiers are controlled via an I2C bus. Add simple device tree bindings that describe how to set them up in the device tree. Right now only nxp,tfa9895 is supported but this will be extended to at least nxp,tfa9897 in the near future. Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210513104129.36583-1-stephan@gerhold.net Signed-off-by: Mark Brown commit d6956a7dde6fbf843da117f8b69cc512101fdea2 Author: Kuninori Morimoto Date: Mon May 24 15:12:14 2021 +0900 ASoC: rsnd: add null CLOCKIN support Some Renesas SoC doesn't have full CLOCKIN. This patch add null_clk, and accepts it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tumsoe2p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cf9d5c6619fadfc41cf8f5154cb990cc38e3da85 Author: Kuninori Morimoto Date: Mon May 24 15:12:09 2021 +0900 ASoC: rsnd: tidyup loop on rsnd_adg_clk_query() commit 06e8f5c842f2d ("ASoC: rsnd: don't call clk_get_rate() under atomic context") used saved clk_rate, thus for_each_rsnd_clk() is no longer needed. This patch fixes it. Fixes: 06e8f5c842f2d ("ASoC: rsnd: don't call clk_get_rate() under atomic context") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v978oe2u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 17c2d247ddd231199e682b0a7fda42fe46c2c07b Author: Kuninori Morimoto Date: Mon May 24 15:12:04 2021 +0900 ASoC: dt-bindings: renesas: rsnd: tidyup properties 1) resets/reset-names needs minItems 2) It can use ports, not only port 3) It is not using audio-graph properties Without this patch, we will get warnings Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wnrooe2z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 50cb321f16f6665873071792d89ab8563be1658d Author: Jerome Brunet Date: Thu May 20 09:31:36 2021 +0200 clk: meson: axg-audio: improve deferral handling Use dev_err_probe() for clock and reset resources to indicate the deferral reason through sysfs when waiting for the resource to come up. Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210520073136.272925-1-jbrunet@baylibre.com commit 4814d9c5d3b956c5a8f47acbb6b98fdd4dfe334f Author: Viresh Kumar Date: Thu May 20 09:56:18 2021 +0530 cpufreq: dt: Rename black/white-lists Rename them in accordance with the coding guidelines. Reviewed-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar commit 17818dfa8f2e90a6f40e047a3ea9c39af1a8a87d Author: Colin Ian King Date: Fri Apr 23 14:41:33 2021 +0100 ath10k/ath11k: fix spelling mistake "requed" -> "requeued" There are multiple occurrances of the misspelling of requeued in the drivers with symbol names and debug text. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210423134133.339751-1-colin.king@canonical.com commit 0d989ac2c90b5f51fe12102d3cddf54b959f2014 Author: Masahiro Yamada Date: Wed May 12 15:52:01 2021 +0900 kbuild: remove libelf checks from top Makefile I do not see a good reason why only the libelf development package must be so carefully checked. Kbuild generally does not check host tools or libraries. For example, x86_64 defconfig fails to build with no libssl development package installed. scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory 21 | #include | ^~~~~~~~~~~~~~~ To solve the build error, you need to install libssl-dev or openssl-devel package, depending on your distribution. 'apt-file search', 'dnf provides', etc. is your frined to find a proper package to install. This commit removes all the libelf checks from the top Makefile. If libelf is missing, objtool will fail to build in a similar pattern: .../linux/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory 10 | #include You need to install libelf-dev, libelf-devel, or elfutils-libelf-devel to proceed. Another remarkable change is, CONFIG_STACK_VALIDATION (without CONFIG_UNWINDER_ORC) previously continued to build with a warning, but now it will treat missing libelf as an error. This is just a one-time installation, so it should not hurt to break a build and make a user install the package. BTW, the traditional way to handle such checks is autotool, but according to [1], I do not expect the kernel build would have similar scripting like './configure' does. [1]: https://lore.kernel.org/lkml/CA+55aFzr2HTZVOuzpHYDwmtRJLsVzE-yqg2DHpHi_9ePsYp5ug@mail.gmail.com/ Signed-off-by: Masahiro Yamada Acked-by: Andrii Nakryiko commit 1bb0b18a06dceee1fdc32161a72e28eab6f011c4 Author: Masahiro Yamada Date: Wed May 12 15:52:00 2021 +0900 kbuild: hide tools/ build targets from external module builds The tools/ directory only exists in the kernel source tree, not in external modules. Do not expose the meaningless targets to external modules. Signed-off-by: Masahiro Yamada commit cf536e185869d4815d506e777bcca6edd9966a6e Author: Feng Tang Date: Thu May 6 15:34:59 2021 +0800 Makefile: extend 32B aligned debug option to 64B aligned Commit 09c60546f04f ("./Makefile: add debug option to enable function aligned on 32 bytes") was introduced to help debugging strange kernel performance changes caused by code alignment change. Recently we found 2 similar cases [1][2] caused by code-alignment changes, which can only be identified by forcing 64 bytes aligned for all functions. Originally, 32 bytes was used mainly for not wasting too much text space, but this option is only for debug anyway where text space is not a big concern. So extend the alignment to 64 bytes to cover more similar cases. [1].https://lore.kernel.org/lkml/20210427090013.GG32408@xsang-OptiPlex-9020/ [2].https://lore.kernel.org/lkml/20210420030837.GB31773@xsang-OptiPlex-9020/ Signed-off-by: Feng Tang Signed-off-by: Masahiro Yamada commit ec7d6dd870d421a853ffa692d4bce5783a519342 Author: YueHaibing Date: Mon May 24 09:07:01 2021 +0800 ethernet: ucc_geth: Use kmemdup() rather than kmalloc+memcpy Issue identified with Coccinelle. Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5d6c3d91ad722bad16346bcd3e839c7649e5dca4 Author: Florian Fainelli Date: Sun May 23 08:58:42 2021 -0700 net: r6040: Allow restarting auto-negotiation Use phy_ethtool_nway_reset() since the driver makes use of the PHY library. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 2ae83ed289c0b9add3d5d4d045d5907c1fafc4e6 Merge: 0056982f093d6 06666907a38ac Author: David S. Miller Date: Sun May 23 17:20:53 2021 -0700 Merge branch 'r6040-cleanups' Florian Fainelli says: ==================== net: r6040: Non-functional changes These two patches clean up the r6040 driver a little bit in preparation for adding additional features such as dumping MAC counters and properly dealing with DMA-API mapping. ==================== Signed-off-by: David S. Miller commit 06666907a38acdd07058014944d041856a11ebe7 Author: Florian Fainelli Date: Sun May 23 08:54:11 2021 -0700 net: r6040: Use ETH_FCS_LEN Instead of the open coded constant 4. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 190e6e291a4c5b9602817cffeacfd577f805e563 Author: Florian Fainelli Date: Sun May 23 08:54:10 2021 -0700 net: r6040: Use logical or for MDIO operations This is not a functional change, but we should be using a logical or to assign the bits we will be writing to the MDIO read and write registers. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 0056982f093d6d5f12c43855754a0933b654778d Author: YueHaibing Date: Sun May 23 14:02:23 2021 +0800 ehea: Use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 4934fb7dc409c2b14dc49a1f6d9024bec87431a4 Author: YueHaibing Date: Sun May 23 11:24:09 2021 +0800 sfc: falcon: use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 3880fc37beba5d6878ef4c8d57f21683974a211b Author: YueHaibing Date: Sun May 23 11:20:30 2021 +0800 sfc: use DEVICE_ATTR_*() macro Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 2f3877d609e7951ef96d24979eb9d163f1f004f8 Author: Peter Geis Date: Wed May 19 13:41:49 2021 -0400 clk: rockchip: fix rk3568 cpll clk gate bits The cpll clk gate bits had an ordering issue. This led to the loss of the boot sdmmc controller when the gmac was shut down with: `ip link set eth0 down` as the cpll_100m was shut off instead of the cpll_62p5. cpll_62p5, cpll_50m, cpll_25m were all off by one with cpll_100m misplaced. Fixes: cf911d89c4c5 ("clk: rockchip: add clock controller for rk3568") Signed-off-by: Peter Geis Reviewed-by: Elaine Zhang Link: https://lore.kernel.org/r/20210519174149.3691335-1-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner commit e409c1e1d5cb164361229e3a3f084e4a32544fb6 Author: Linus Walleij Date: Mon May 24 01:14:29 2021 +0200 ARM: dts: ux500: Fix orientation of Janice accelerometer This fixes up the axis on the Janice accelerometer to give the right orientation according to tests. Signed-off-by: Linus Walleij commit 52af13a41489d7bbc1932d17583eff6e5fffc820 Author: Yang Yingliang Date: Sat May 22 20:02:46 2021 +0800 net: ftgmac100: add missing error return code in ftgmac100_probe() The variables will be free on path err_phy_connect, it should return error code, or it will cause double free when calling ftgmac100_remove(). Fixes: bd466c3fb5a4 ("net/faraday: Support NCSI mode") Fixes: 39bfab8844a0 ("net: ftgmac100: Add support for DT phy-handle property") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 6e153938b7f005fde4dd025e3998d94cb27e4148 Author: Alexandru Ardelean Date: Sat May 15 10:59:05 2021 +0300 gpio: gpio-tegra186: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 10a476164b08067f2094020f812af52c347542de Author: Alexandru Ardelean Date: Sat May 15 10:59:04 2021 +0300 gpio: gpio-tegra186: remove empty remove hook The tegra186_gpio_remove hook simply does a return 0. Not defining it yields pretty much the same result. So, this can be removed. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 4d2a72635b5552502f61ff8d3f6e7c78eadffc2b Author: Alexandru Ardelean Date: Fri May 21 21:13:55 2021 +0300 gpio: da9052: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 94a7b66910ea6e4583addd8212aa8cd3f7a8c9c1 Author: Alexandru Ardelean Date: Fri May 21 21:10:42 2021 +0300 gpio: xgene: simplify probe, return devm_gpiochip_add_data() directly The handling of the return value from devm_gpiochip_add_data() is a bit redundant. It prints messages on error and success cases. While the success message may be useful, it is more in the area of log spam, and these can be printed with other forms of kernel logging. This change does a direct return with devm_gpiochip_add_data() in the probe function. The platform_set_drvdata() is needed, as this driver uses the stored private date in the PM suspend/resume routines. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 2fb27551ba4053ae503ce6c3b7b5d87cd206b1fd Author: Laurent Pinchart Date: Sun Apr 18 22:14:06 2021 +0200 media: imx: imx7_mipi_csis: Update MAINTAINERS Given my recent contributions to the imx7-mipi-csis driver, I can as well be listed as a maintainer. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit f0e7cfbb43f1961f12b9903f602b6e6ddf1ada02 Author: Laurent Pinchart Date: Tue Apr 13 04:30:14 2021 +0200 media: imx: imx7_mipi_csis: Add i.MX8MM support The CSI-2 receiver in the i.MX8MM is a newer version of the one found in the i.MX7. Differences are minimal, support it in the imx7_mipi_csis driver. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 85b62ff2cb971c53a9a0cfafd31b07a92bb0fa19 Author: Laurent Pinchart Date: Sun Apr 18 22:15:56 2021 +0200 media: dt-bindings: media: nxp,imx7-mipi-csi2: Add i.MX8MM support The i.MX8MM integrates a newer version of the CSIS CSI-2 receiver as the i.MX7 family. Differences in integration are are: - An additional clock is required - Up to 4 data lanes are supported - No reset or PHY supply is present Support it in the DT binding. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit acdff8e14ae9e992526d050f8cee2264710de33e Author: Laurent Pinchart Date: Sun May 16 00:32:26 2021 +0200 media: imx: imx7_mipi_csis: Move PHY control to dedicated functions Move the PHY regulator and reset handling to dedicated functions. This groups all related code together, and prepares for i.MX8 support that doesn't require control of the PHY regulator and reset. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 88fc81388df942e580b65afa197c97c490b5b855 Author: Laurent Pinchart Date: Tue Apr 13 04:30:12 2021 +0200 media: imx: imx7_mipi_csis: Reject invalid data-lanes settings The CSIS doesn't support data lanes reordering. Reject invalid settings. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 7479454cfef039f208cfd1e5b6cead38dc0caa05 Author: Laurent Pinchart Date: Tue Apr 13 04:30:11 2021 +0200 media: imx: imx7_mipi_csis: Reorganize mipi_csis_probe() Group the operations performed in mipi_csis_probe() logically to improve readability. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 0092d4a8ea7f7414a2ca64d455e2fdb0306d8d56 Author: Laurent Pinchart Date: Tue Apr 13 04:30:10 2021 +0200 media: imx: imx7_mipi_csis: Reorganize csi_state structure Group the fiels of the csi_state structure logically to improve readability. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit b4eb02656d0944e03eb991f3feda52f653693653 Author: Laurent Pinchart Date: Tue Apr 13 04:30:09 2021 +0200 media: imx: imx7_mipi_csis: Make csi_state num_clocks field unsigned The num_clocks field of the csi_state only stores positive values, make it unsigned. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 62bd05a4f9fffe17f9bddb9f5d28fe229c200abd Author: Laurent Pinchart Date: Tue Apr 13 04:30:08 2021 +0200 media: imx: imx7_mipi_csis: Drop csi_state pdev field The pdev field of the csi_state structure is only used to access the device pointer, which is stored in a separate field. Drop the pdev field, as well as a few local dev variables. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 96703073ecb36376579c7b8e2a34dbaf025909cb Author: Laurent Pinchart Date: Tue Apr 13 04:30:07 2021 +0200 media: imx: imx7_mipi_csis: Pass csi_state to mipi_csis_subdev_init() Pass the csi_state pointer to the mipi_csis_subdev_init() function, instead of miscellaneous information scattered in different arguments. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit deb1c97283a4065ae99bbb67b9b373dd02826d13 Author: Laurent Pinchart Date: Tue Apr 13 04:30:06 2021 +0200 media: imx: imx7_mipi_csis: Don't pass pdev to mipi_csis_parse_dt() The mipi_csis_parse_dt() function is called with a pointer to the csi_state, which contains all the information necessary. Don't pass the platform device pointer as well. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit e71bcbe65f67abdcc144729c9bad957424043b81 Author: Laurent Pinchart Date: Tue Apr 13 04:30:05 2021 +0200 media: imx: imx7_mipi_csis: Turn csi_state irq field into local variable The irq field of the csi_state structure is only used in mipi_csis_probe(). Turn it into a local variable. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit f65ffcd8abf976d90c6fbcb1c1045c22974dfd81 Author: Laurent Pinchart Date: Tue Apr 13 04:30:04 2021 +0200 media: imx: imx7_mipi_csis: Rename csi_state flag field to state The flag field of the csi_state structure contains the device state. Rename it accordingly. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit b0db06bb98b55ce5040aab5133f6fcd7c0631e29 Author: Laurent Pinchart Date: Tue Apr 13 04:30:03 2021 +0200 media: imx: imx7_mipi_csis: Rename mipi_sd to sd The CSIS is modelled as a single subdev, there's thus no ambiguity regarding which subdev the code refers to. Rename mipi_sd to sd. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit cbf15686dd8b10f1c3c0ce29d09fc88fc3db4b9e Author: Laurent Pinchart Date: Tue Apr 13 04:30:02 2021 +0200 media: imx: imx7_mipi_csis: Drop csi_state phy field The phy field of the csi_state structure is unused. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 3acb88893a799d5bd612213ea3fc67f2f3280f29 Author: Laurent Pinchart Date: Tue Apr 13 04:30:01 2021 +0200 media: imx: imx7_mipi_csis: Store CSI-2 data type in format structure Replace the register value stored in the csis_pix_format structure with the CSI-2 data type. The register value is simply computed from the data type using a shift. This prepares for i.MX8MP support that needs the same data type in a different hardware register. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 492d418c082c10c97ad1ca3d35ac8c2438b4fc17 Author: Laurent Pinchart Date: Tue Apr 13 04:30:00 2021 +0200 media: imx: imx7_mipi_csis: Drop unused csis_hw_reset structure The csis_hw_reset structure is instantiated as a member of csi_state, but that member is never used. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 996f6f517dc79f337faf29d9db54ceb9a3169787 Author: Laurent Pinchart Date: Tue Apr 13 04:29:59 2021 +0200 media: imx: imx7_mipi_csis: Set the CLKSETTLE register field Set the CLKSETTLE field explicitly, with a value hardcoded to 0. This brings no functional change, but prepares for calculation of the CLKSETTLE value. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit b329650e3f2d4369ec66e2fae2227beb7de37bca Author: Laurent Pinchart Date: Tue Apr 13 04:29:58 2021 +0200 media: imx: imx7_mipi_csis: Reorganize code in sections Improve readability by reorganizing the code in sections. No functional change intended. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 90ce0472182f5dffc67155601ea0a927dfb3e9d6 Author: Laurent Pinchart Date: Tue Apr 13 04:29:57 2021 +0200 media: imx: imx7_mipi_csis: Don't set subdev data The driver doesn't need to store subdev data, as the subdev is embedded in csi_state and is thus accessed using container_of. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 2cb7c5c08cf25b0d2d375732a76b1185c92a1853 Author: Laurent Pinchart Date: Tue Apr 13 04:29:56 2021 +0200 media: imx: imx7_mipi_csis: Minimize locking in get/set format Reduce the code sections that are run with the lock held in the get/set format handlers: - mipi_csis_get_format() retrieves a pointer to the format, and thus doesn't need locking as long as the arguments passed to the function don't require locking either. - sdformat is a structure passed by the caller, not an internal state, and thus doesn't require locking. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit eed6a93044e38a63e397f7aef8dbc7ee667459fb Author: Laurent Pinchart Date: Tue Apr 13 04:29:55 2021 +0200 media: imx: imx7_mipi_csis: Move static data to top of mipi_csis_dump_regs() It's customary to declare static variables at the top of the function, with a blank line separating them from the non-static variables. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit ca403b37cd9548115e2aeed61f6d147cc6f0d507 Author: Laurent Pinchart Date: Tue Apr 13 04:29:54 2021 +0200 media: imx: imx7_mipi_csis: Update ISP_CONFIG macros for quad pixel mode The i.MX8MM expands the DOUBLE_CMPNT bit in the ISP_CONFIG register into a two bits field that support quad pixel mode in addition to the single and double modes. Update the ISP_CONFIG register macros to support this. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit 7fe1de81ddda28f584e55b847bc4f036e95c8ed2 Author: Laurent Pinchart Date: Tue Apr 13 04:29:53 2021 +0200 media: imx: imx7_mipi_csis: Count the CSI-2 debug interrupts In addition to the main interrupts that flag errors and other events, the CSI-2 receiver has debug interrupt sources that flag various events useful for debugging. Add those sources to the event counter mechanism and print them when debugging is enabled. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit d2fcc9c2de1191ea80366e3658711753738dd10a Author: Laurent Pinchart Date: Tue Apr 13 04:29:52 2021 +0200 media: imx: imx7_mipi_csis: Fix logging of only error event counters The mipi_csis_events array ends with 6 non-error events, not 4. Update mipi_csis_log_counters() accordingly. While at it, log event counters in forward order, as there's no reason to log them backward. Signed-off-by: Laurent Pinchart Acked-by: Rui Miguel Silva Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf Signed-off-by: Mauro Carvalho Chehab commit f4815b399111d992c1118c708f464a847dfd29e2 Author: Ezequiel Garcia Date: Thu Apr 29 16:48:18 2021 +0200 media: uapi: move MPEG-2 stateless controls out of staging Until now, the MPEG-2 V4L2 API was not exported as a public API, and only defined in a private media header (media/mpeg2-ctrls.h). After reviewing the MPEG-2 specification in detail, and reworking the controls so they match the MPEG-2 semantics properly, we can consider it ready. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c994c6d21db2269518648f0dab21f10fd46e4ee Author: Ezequiel Garcia Date: Thu Apr 29 16:48:17 2021 +0200 media: controls: Log MPEG-2 stateless control in .std_log Simply print the type of the control. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f0968827a48a3b01a0cc9185abd41978d5ce918 Author: Ezequiel Garcia Date: Thu Apr 29 16:48:16 2021 +0200 media: uapi: Move the MPEG-2 stateless control type out of staging Move the MPEG-2 stateless control types out of staging, and re-number it to avoid any confusion. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 45f97ba1ce8059632c6f1518fda1faedd7db55fb Author: Ezequiel Garcia Date: Thu Apr 29 16:48:15 2021 +0200 media: uapi: mpeg2: Remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS The Hantro and Cedrus drivers work in frame-mode, meaning they expect all the slices in a picture (either frame or field structure) to be passed in each OUTPUT buffer. These two are the only V4L2 MPEG-2 stateless decoders currently supported. Given the VA-API drivers also work per-frame, coalescing all the MPEG-2 slices in a buffer before the decoding operation, it makes sense to not expect slice-mode drivers and therefore remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS. This is done to avoid carrying an unused interface. If needed, this control can be added without breaking backwards compatibility. Note that this would mean introducing a enumerator control to specify the decoding mode (see V4L2_CID_STATELESS_H264_DECODE_MODE). Signed-off-by: Ezequiel Garcia Co-developed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 701a6a410c319729c86bfb696860f21adbff1bfa Author: Ezequiel Garcia Date: Thu Apr 29 16:48:14 2021 +0200 media: hantro/cedrus: Remove unneeded slice size and slice offset The MPEG2_SLICE_PARAMS control is designed to refer to a single slice. However, the Hantro and Cedrus drivers operate in per-frame mode, and so does the current Ffmpeg and GStreamer implementations that are tested with these two drivers. In other words, the drivers are expecting all the slices in a picture (with either frame or field structure) to be contained in the OUTPUT buffer, which means the slice size and offset shouldn't be used. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b6d7e8031c9c17462935329ca8b37f0da2f99da0 Author: Ezequiel Garcia Date: Thu Apr 29 16:48:13 2021 +0200 media: uapi: mpeg2: Move reference buffer fields The forward and backwards references are specified per-picture and not per-slice. Move it to V4L2_CID_MPEG_VIDEO_MPEG2_PICTURE. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f329e21e9dadc5c8ee37c781b30fe63bf7217201 Author: Ezequiel Garcia Date: Thu Apr 29 16:48:12 2021 +0200 media: uapi: mpeg2: Split sequence and picture parameters Typically, bitstreams are composed of a sequence header, followed by a number of picture header and picture coding extension headers. Each picture can be composed of a number of slices. Let's split the MPEG-2 uAPI to follow these semantics more closely, allowing more usage flexibility. Having these controls split up allows applications to set a sequence control at the beginning of a sequence, and then set a picture control for each frame. While here add padding fields where needed, and document the uAPI header thoroughly. Note that the V4L2_CTRL_TYPE_{} defines had to be moved because it clashes with existing ones. This is not really an issue since they will be re-defined when the controls are moved out of staging. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 88e78409a83a579fde7f150be7ebeefab0e1f774 Author: Ezequiel Garcia Date: Thu Apr 29 16:48:11 2021 +0200 media: uapi: mpeg2: Cleanup flags Our current MPEG-2 uAPI uses 1-byte fields for MPEG-2 boolean syntax elements. Clean these by adding a 'flags' field and flag macro for each boolean syntax element. A follow-up change will refactor this uAPI so we don't need to add padding fields just yet. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 81bbb65f19819440b42270e1f033d9b14279540c Author: Ezequiel Garcia Date: Thu Apr 29 16:48:10 2021 +0200 media: uapi: mpeg2: rework quantisation matrices semantics As stated in the MPEG-2 specification, section 6.3.7 "Quant matrix extension": Each quantisation matrix has a default set of values. When a sequence_header_code is decoded all matrices shall be reset to their default values. User defined matrices may be downloaded and this can occur in a sequence_header() or in a quant_matrix_extension(). The load_intra_quantiser_matrix syntax elements are transmitted in the bitstream headers, signalling that a quantisation matrix needs to be loaded and used for pictures transmitted afterwards (until the matrices are reset). This "load" semantics are implemented in the V4L2 interface without the need of any "load" flags: passing the control is effectively a load. Therefore, rework the V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION semantics to match the MPEG-2 semantics. Quantisation matrices values are now initialized by the V4L2 control core to their reset default value, and applications are expected to reset their values as specified. The quantisation control is therefore optional, and used to load bitstream-defined values in the quantisation matrices. Signed-off-by: Ezequiel Garcia Co-developed-by: Nicolas Dufresne Signed-off-by: Nicolas Dufresne Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 118f3e1562f2b15e30ed65a2718cd9ed710054b1 Author: Ezequiel Garcia Date: Thu Apr 29 16:48:09 2021 +0200 media: uapi: mpeg2: Rename "quantization" to "quantisation" The MPEG-2 specification refers to the quantisation matrices using the word "quantisation". Make the V4L2 interface more ergonomic by matching the MPEG-2 spec. Signed-off-by: Ezequiel Garcia Tested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Tested-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c680ed46e418e9c785d76cf44eb33bfd1e8cf3f6 Author: Pavel Skripkin Date: Fri May 7 14:50:43 2021 +0200 media: dvb-usb: fix wrong definition syzbot reported WARNING in vmalloc. The problem was in zero size passed to vmalloc. The root case was in wrong cxusb_bluebird_lgz201_properties definition. adapter array has only 1 entry, but num_adapters was 2. Call Trace: __vmalloc_node mm/vmalloc.c:2963 [inline] vmalloc+0x67/0x80 mm/vmalloc.c:2996 dvb_dmx_init+0xe4/0xb90 drivers/media/dvb-core/dvb_demux.c:1251 dvb_usb_adapter_dvb_init+0x564/0x860 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:184 dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:86 [inline] dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:184 [inline] dvb_usb_device_init.cold+0xc94/0x146e drivers/media/usb/dvb-usb/dvb-usb-init.c:308 cxusb_probe+0x159/0x5e0 drivers/media/usb/dvb-usb/cxusb.c:1634 Fixes: 4d43e13f723e ("V4L/DVB (4643): Multi-input patch for DVB-USB device") Cc: stable@vger.kernel.org Reported-by: syzbot+7336195c02c1bd2f64e1@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 37d9d42f9e78bfe8ec04fd5e049111beb5f59e01 Author: Dan Carpenter Date: Tue May 11 09:22:19 2021 +0200 media: lmedm04: delete lme2510_get_adapter_count() The adapter count is fixed at compile time so we can delete the lme2510_get_adapter_count() function and set ".num_adapters = 1" instead. There is also no need to create a zeroed adapter element at the end of the array. Remove that as well. Signed-off-by: Dan Carpenter Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9c87ae1a0dbeb5794957421157fd266d38a869b4 Author: Christophe JAILLET Date: Thu May 6 07:38:56 2021 +0200 media: rc: i2c: Fix an error message 'ret' is known to be 1 here. In fact 'i' is expected instead. Store the return value of 'i2c_master_recv()' in 'ret' so that the error message print the correct error code. Fixes: acaa34bf06e9 ("media: rc: implement zilog transmitter") Signed-off-by: Christophe JAILLET Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 027f55e87c3094270a3223f7331d033fe15a2b3f Author: Nathan Lynch Date: Fri May 14 16:44:22 2021 -0500 tty: hvc: udbg_hvc: retry putc on -EAGAIN hvterm_raw_put_chars() calls hvc_put_chars(), which may return -EAGAIN when the underlying hcall returns a "busy" status, but udbg_hvc_putc() doesn't handle this. When using xmon on a PowerVM guest, this can result in incomplete or garbled output when printing relatively large amounts of data quickly, such as when dumping the kernel log buffer. Call again on -EAGAIN. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210514214422.3019105-1-nathanl@linux.ibm.com commit 2cec178e35baf57d307c0982fd2e53055bd1e9bb Author: Nathan Lynch Date: Fri May 14 11:24:20 2021 -0500 powerpc/xmon: make dumping log buffer contents more reliable Log buffer entries that are too long for dump_log_buf()'s small local buffer are: * silently discarded when a single-line entry is too long; kmsg_dump_get_line() returns true but sets &len to 0. * silently truncated to the last fitting new line when a multi-line entry is too long, e.g. register dumps from __show_regs(); this seems undetectable via the kmsg_dump API. xmon_printf()'s internal buffer is already 1KB; enlarge dump_log_buf()'s own buffer to match and make it statically allocated. Verified that this allows complete printing of register dumps on ppc64le with both CONFIG_PRINTK_TIME=y and CONFIG_PRINTK_CALLER=y. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210514162420.2911458-1-nathanl@linux.ibm.com commit b73c8cccd72ac28beaf262fd6ef4b91411fc8335 Author: Christophe Leroy Date: Thu May 13 09:07:53 2021 +0000 powerpc/kprobes: Replace ppc_optinsn by common optinsn Commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes") implemented a powerpc specific version of optinsn in order to workaround the 32Mb limitation for direct branches. Instead of implementing a dedicated powerpc version, use the common optinsn and override the allocation and freeing functions. This also indirectly remove the CLANG warning about is_kprobe_ppc_optinsn_slot() not being use, and the powerpc will now benefit from commit 5b485629ba0d ("kprobes, extable: Identify kprobes trampolines as kernel text area") Suggested-by: Masami Hiramatsu Signed-off-by: Christophe Leroy Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ec5e85f9f9abcfecc959a03495f4a7858eb4d203.1620896780.git.christophe.leroy@csgroup.eu commit 7ee3e97e00a3893e354c3993c3f7d9dc127e9c5e Author: Christophe Leroy Date: Thu May 13 09:07:51 2021 +0000 kprobes: Allow architectures to override optinsn page allocation Some architectures like powerpc require a non standard allocation of optinsn page, because module pages are too far from the kernel for direct branches. Define weak alloc_optinsn_page() and free_optinsn_page(), that fall back on alloc_insn_page() and free_insn_page() when not overridden by the architecture. Suggested-by: Masami Hiramatsu Signed-off-by: Christophe Leroy Reviewed-by: Naveen N. Rao Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/40a43d6df1fdf41ade36e9a46e60a4df774ca9f6.1620896780.git.christophe.leroy@csgroup.eu commit 6fcb574125e673f33ff058caa54b4e65629f3a08 Author: Nick Desaulniers Date: Tue May 18 13:58:57 2021 -0700 powerpc: Kconfig: disable CONFIG_COMPAT for clang < 12 Until clang-12, clang would attempt to assemble 32b powerpc assembler in 64b emulation mode when using a 64b target triple with -m32, leading to errors during the build of the compat VDSO. Simply disable all of CONFIG_COMPAT; users should upgrade to the latest release of clang for proper support. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1160 Link: https://github.com/llvm/llvm-project/commits/2288319733cd5f525bf7e24dece08bfcf9d0ff9e Link: https://groups.google.com/g/clang-built-linux/c/ayNmi3HoNdY/m/XJAGj_G2AgAJ Link: https://lore.kernel.org/r/20210518205858.2440344-1-ndesaulniers@google.com commit 73e6e4e01134c9ee97433ad1f470c71b0748b08f Author: Nick Desaulniers Date: Tue May 18 13:40:41 2021 -0700 powerpc/powernv/pci: fix header guard While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a possible candidate to convert to #ifdef CONFIG_EEH. It seems that based on Kconfig dependencies it's not possible to build this file without CONFIG_EEH enabled, but based on upstream discussion, it's not clear yet that CONFIG_EEH should be enabled by default. For now, simply fix the -Wundef warning. Suggested-by: Nathan Chancellor Suggested-by: Joe Perches Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/570 Link: https://lore.kernel.org/lkml/67f6cd269684c9aa8463ff4812c3b4605e6739c3.camel@perches.com/ Link: https://lore.kernel.org/lkml/CAOSf1CGoN5R0LUrU=Y=UWho1Z_9SLgCX8s3SbFJXwJXc5BYz4A@mail.gmail.com/ Link: https://lore.kernel.org/r/20210518204044.2390064-1-ndesaulniers@google.com commit 60060d704c55a9450208b8f0bc5026df9d4ab1d6 Author: Sathvika Vasireddy Date: Tue May 11 07:18:33 2021 -0500 powerpc/sstep: Add tests for setb instruction This adds selftests for setb instruction. Signed-off-by: Sathvika Vasireddy Tested-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b05b61ccb5f10279d46fed490796f32ea2ccc270.1620727160.git.sathvika@linux.vnet.ibm.com commit 5b75bd763d369e43e6d09e85eaea22fde37c0e89 Author: Sathvika Vasireddy Date: Tue May 11 07:18:32 2021 -0500 powerpc/sstep: Add emulation support for ‘setb’ instruction This adds emulation support for the following instruction: * Set Boolean (setb) Signed-off-by: Sathvika Vasireddy Tested-by: Naveen N. Rao Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7b735b0c898da0db2af8628a64df2f5114596f22.1620727160.git.sathvika@linux.vnet.ibm.com commit f259fb893c69d60ac1c7192f1974635c554fd716 Author: Michael Ellerman Date: Wed Apr 28 23:27:00 2021 +1000 powerpc/Makefile: Add ppc32/ppc64_randconfig targets Make it easier to generate a 32 or 64-bit specific randconfig. Signed-off-by: Michael Ellerman Tested-by: Randy Dunlap Reviewed-by: Randy Dunlap Requested-by: Randy Dunlap Link: https://lore.kernel.org/r/20210428132700.3426100-1-mpe@ellerman.id.au commit 40999b041e03b32434b2f4a951668e9865a3cb6b Author: Daniel Henrique Barboza Date: Wed May 12 17:28:09 2021 -0300 powerpc/pseries: minor enhancements in dlpar_memory_remove_by_ic() We don't need the 'lmbs_available' variable to count the valid LMBs and to check if we have less than 'lmbs_to_remove'. We must ensure that the entire LMB range must be removed, so we can error out immediately if any LMB in the range is marked as reserved. Add a couple of comments explaining the reasoning behind the differences we have in this function in contrast to what it is done in its sister function, dlpar_memory_remove_by_count(). Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210512202809.95363-5-danielhb413@gmail.com commit 163e7921750f6cd965666f472c21de056c63dcbc Author: Daniel Henrique Barboza Date: Wed May 12 17:28:08 2021 -0300 powerpc/pseries: break early in dlpar_memory_remove_by_count() loops After marking the LMBs as reserved depending on dlpar_remove_lmb() rc, we evaluate whether we need to add the LMBs back or if we can release the LMB DRCs. In both cases, a for_each_drmem_lmb() loop without a break condition is used. This means that we're going to cycle through all LMBs of the partition even after we're done with what we were going to do. This patch adds break conditions in both loops to avoid this. The 'lmbs_removed' variable was renamed to 'lmbs_reserved', and it's now being decremented each time a lmb reservation is removed, indicating that the operation we're doing (adding back LMBs or releasing DRCs) is completed. Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210512202809.95363-4-danielhb413@gmail.com commit 2ad216b4d6ff0f92fc645c1bd8838f04fbf09b9d Author: Daniel Henrique Barboza Date: Wed May 12 17:28:07 2021 -0300 powerpc/pseries: check DRCONF_MEM_RESERVED in lmb_is_removable() DRCONF_MEM_RESERVED is a flag that represents the "Reserved Memory" status in LOPAR v2.10, section 4.2.8. If a LMB is marked as reserved, quoting LOPAR, "is not to be used or altered by the base OS". This flag is read only in the kernel, being set by the firmware/hypervisor in the DT. As an example, QEMU will set this flag in hw/ppc/spapr.c, spapr_dt_dynamic_memory(). lmb_is_removable() does not check for DRCONF_MEM_RESERVED. This function is used in dlpar_remove_lmb() as a guard before the removal logic. Since it is failing to check for !RESERVED, dlpar_remove_lmb() will fail in a later stage instead of failing in the validation when receiving a reserved LMB as input. lmb_is_removable() is also used in dlpar_memory_remove_by_count() to evaluate if we have enough LMBs to complete the request. The missing !RESERVED check in this case is causing dlpar_memory_remove_by_count() to miscalculate the number of elegible LMBs for the removal, and can make it error out later on instead of failing in the validation with the 'not enough LMBs to satisfy request' message. Making a DRCONF_MEM_RESERVED check in lmb_is_removable() fixes all these issues. Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210512202809.95363-3-danielhb413@gmail.com commit feb0e079f43dee055701c1a294785d37341d6f97 Author: Daniel Henrique Barboza Date: Wed May 12 17:28:06 2021 -0300 powerpc/pseries: Set UNISOLATE on dlpar_memory_remove_by_ic() error As previously done in dlpar_cpu_remove() for CPUs, this patch changes dlpar_memory_remove_by_ic() to unisolate the LMB DRC when the LMB is failed to be removed. The hypervisor, seeing a LMB DRC that was supposed to be removed being unisolated instead, can do error recovery on its side. This change is done in dlpar_memory_remove_by_ic() only because, as of today, only QEMU is using this code path for error recovery (via the PSERIES_HP_ELOG_ID_DRC_IC event). phyp treats it as a no-op. Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210512202809.95363-2-danielhb413@gmail.com commit ad06bcfd5b8f989690053e6026cf742886ba9f90 Author: Zhen Lei Date: Mon May 10 21:19:24 2021 +0800 powerpc/pseries/ras: Delete a redundant condition branch The statement of the last "if (xxx)" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210510131924.3907-1-thunder.leizhen@huawei.com commit c67454615cf95160cb806f7a471158a901eb261d Author: Jiapeng Chong Date: Thu May 13 19:03:40 2021 +0800 selftests/powerpc: Fix duplicate included pthread.h Clean up the following includecheck warning: ./tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c: pthread.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1620903820-68213-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 9b373899e9606d252364191ce2b385043a8808bc Author: YueHaibing Date: Fri May 14 15:10:41 2021 +0800 powerpc/pseries/memhotplug: Remove unused inline function dlpar_memory_remove() dlpar_memory_remove() is never used, so can be removed. Signed-off-by: YueHaibing Reviewed-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210514071041.17432-1-yuehaibing@huawei.com commit 267be9dbacf4485f7842a3755eef4bb68dc85fc9 Merge: e169fba4f4647 bb11580f61b6c Author: Ingo Molnar Date: Sun May 23 11:40:55 2021 +0200 Merge tag 'efi-next-for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/core Pull EFI updates for v5.14 from Ard Biesheuvel: "First microbatch of EFI updates - not a lot going on these days." Signed-off-by: Ingo Molnar commit 1c147690231b65a1e56840453cc8e2f92950e076 Author: Geert Uytterhoeven Date: Thu May 20 15:58:36 2021 +0200 ARM: dts: imx53-ard: Correct Ethernet node name make dtbs_check: lan9220@f4000000: $nodename:0: 'lan9220@f4000000' does not match '^ethernet(@.*)?$' Signed-off-by: Geert Uytterhoeven Signed-off-by: Shawn Guo commit 77e6025c2416c3c7d98f8c07befc722ada4429ea Author: Geert Uytterhoeven Date: Thu May 20 15:58:35 2021 +0200 ARM: dts: i.MX51: digi-connectcore-som: Correct Ethernet node name make dtbs_check: lan9221@5,0: $nodename:0: 'lan9221@5,0' does not match '^ethernet(@.*)?$' Signed-off-by: Geert Uytterhoeven Signed-off-by: Shawn Guo commit 7a4e95d68970d5a3e0e3da45de56e91e1c61a07e Author: Oleksij Rempel Date: Tue May 11 06:37:35 2021 +0200 ARM: imx7d: remove Atheros AR8031 PHY fixup This fixup configures the IO voltage and disables the SmartEEE functionality. If this patch breaks your system, enable AT803X_PHY driver and configure the PHY by the device tree: phy-connection-type = "rgmii-id"; ethernet-phy@X { reg = <0xX>; qca,smarteee-tw-us-1g = <24>; vddio-supply = <&vddh>; vddio: vddio-regulator { regulator-name = "VDDIO"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; vddh: vddh-regulator { regulator-name = "VDDH"; }; }; Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit d500c6c42bed524b616d6f99efcb37f6a36ba4be Author: Oleksij Rempel Date: Tue May 11 06:37:34 2021 +0200 ARM: imx6sx: remove Atheros AR8031 PHY fixup If this patch breaks your system, enable AT803X_PHY driver and add a PHY node to the board device tree: phy-connection-type = "rgmii-txid"; (or rgmii-id) ethernet-phy@X { reg = <0xX>; qca,clk-out-frequency = <125000000>; vddio-supply = <&vddh>; vddio: vddio-regulator { regulator-name = "VDDIO"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; vddh: vddh-regulator { regulator-name = "VDDH"; }; }; Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 582368377926be5c31660167f40f21d8d6805fd4 Author: Oleksij Rempel Date: Tue May 11 06:37:33 2021 +0200 ARM: imx6q: remove Atheros AR8035 SmartEEE fixup This fixup removes the Lpi_en bit. If this patch breaks functionality of your board, use following device tree properties: qca,smarteee-tw-us-1g and qca,smarteee-tw-us-100m. For example: ethernet-phy@X { reg = <0xX>; qca,smarteee-tw-us-1g = <24>; .... }; Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit f5d9aa79dfdfed50b9179061b6daeb3971021361 Author: Oleksij Rempel Date: Tue May 11 06:37:32 2021 +0200 ARM: imx6q: remove clk-out fixup for the Atheros AR8031 and AR8035 PHYs This configuration should be set over device tree. If this patch breaks network functionality on your system, enable the AT803X_PHY driver and set following device tree property in the PHY node: qca,clk-out-frequency = <125000000>; Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 4d3b70d980c2f7ab9e58c0a2485f9fe052d768ea Author: Oleksij Rempel Date: Tue May 11 06:37:31 2021 +0200 ARM: imx6q: remove BMCR_PDOWN handler in ar8035_phy_fixup() BMCR_PDOWN is removed by resume handler at803x_resume() in drivers/net/phy/at803x.c Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 5fff104f04dca67eb099026e88234b0ed3f8cb27 Author: Oleksij Rempel Date: Tue May 11 06:37:30 2021 +0200 ARM: imx6q: remove part of ar8031_phy_fixup() This part of this fixup is overwritten by at803x_config_init() in drivers/net/phy/at803x.c. No additional devicetree fixes are needed. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 66e69d8849e9b0d54686ed12556c0e078e16e056 Author: Oleksij Rempel Date: Tue May 11 06:37:29 2021 +0200 ARM: imx6q: remove PHY fixup for KSZ9031 Starting with: bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") the micrel phy driver started respecting phy-mode for the KSZ9031 PHY. At least with kernel v5.8 configuration provided by this fixup was overwritten by the micrel driver. This fixup was providing following configuration: RX path: 2.58ns delay rx -0.42 (left shift) + rx_clk +0.96ns (right shift) = 1,38 + 1,2 internal RX delay = 2.58ns TX path: 0.96ns delay tx (no delay) + tx_clk 0.96ns (right shift) = 0.96ns This configuration is outside of the recommended RGMII clock skew delays and about in the middle of: rgmii-idrx and rgmii-id Since most embedded systems do not have enough place to introduce significant clock skew, rgmii-id is the way to go. In case this patch breaks network functionality on your system, build kernel with enabled MICREL_PHY. If it is still not working then try following device tree options: 1. Set (or change) phy-mode in DT to: phy-mode = "rgmii-id"; This actives internal delay for both RX and TX. 1. Set (or change) phy-mode in DT to: phy-mode = "rgmii-idrx"; This actives internal delay for RX only. 3. Use following DT properties: phy-mode = "rgmii"; txen-skew-psec = <0>; rxdv-skew-psec = <0>; rxd0-skew-psec = <0>; rxd1-skew-psec = <0>; rxd2-skew-psec = <0>; rxd3-skew-psec = <0>; rxc-skew-psec = <1860>; txc-skew-psec = <1860>; This activates the internal delays for RX and TX, with the value as the fixup that is removed in this patch. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 723de6a4126b2474a8106e943749e1554012dad6 Author: Oleksij Rempel Date: Tue May 11 06:30:39 2021 +0200 ARM: dts: imx6dl-riotboard: configure PHY clock and set proper EEE value Without SoC specific PHY fixups the network interface on this board will fail to work. Provide missing DT properties to make it work again. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit d943728fc7f258fb9a9414274d5eb60fdd15e853 Author: Oleksij Rempel Date: Tue May 11 06:30:38 2021 +0200 ARM: dts: imx6: edmqmx6: set phy-mode to RGMII-ID Latest kernel is actually using phy-mode property, so set proper value to make fec interface work again. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit fe58c887fb8ca25adab62fae20632d8423a00a91 Author: Lucas Stach Date: Mon May 10 12:00:41 2021 +0800 soc: imx: gpcv2: add support for optional resets Normally the reset for the devices inside the power domain is triggered automatically from the PGC in the power-up sequencing, however on i.MX8MM this doesn't work for the GPU power domains. Add support for triggering the reset explicitly during the power up sequencing. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit c0ce75395f8d088ba56dcec3218c628ef2bb6d73 Author: Lucas Stach Date: Mon May 10 12:00:39 2021 +0800 soc: imx: gpcv2: allow domains without power-sequence control Some of the PGC domains only control the handshake with the ADB400 and don't have any power sequence controls. Make such domains work by allowing the pxx and map bits to be empty and skip all actions using those controls. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 1382eb1967d74fb40c3c9e8c6f6030c4c0ecc040 Author: Lucas Stach Date: Mon May 10 12:00:38 2021 +0800 soc: imx: gpcv2: add runtime PM support for power-domains This allows to nest domains into other power domains and have the parent domain powered up/down as required by the child domains. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 58d268619aa941c39056f2c7464edb52d6b6b811 Author: Lucas Stach Date: Mon May 10 12:00:37 2021 +0800 soc: imx: gpcv2: wait for ADB400 handshake New reference manuals show that there is actually a status bit for the ADB400 handshake. Add a poll loop to wait for the ADB400 to acknowledge our request. [Peng Fan: i.MX8MM has blk ctl module, the handshake can only finish after setting blk ctl. The blk ctl driver will set the bus clk bit and the handshake will finish there. we just add a delay and suppose the handshake will finish after that.] Tested-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 256f07edbdd27d4eb0088eb895669e04f4012f9c Author: Lucas Stach Date: Mon May 10 12:00:36 2021 +0800 soc: imx: gpcv2: split power up and power down sequence control The current mixed function to control both power up and power down sequences is very hard to follow and already contains some sequence errors like triggering the ADB400 handshake at the wrong time due to this. Split the function into two, which results in slightly more code, but is way easier to get right. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit cbca0b4fd21123fc10fb23101fd4f29f5de88574 Author: Lucas Stach Date: Mon May 10 12:00:35 2021 +0800 soc: imx: gpcv2: switch to clk_bulk_* API Use clk_bulk API to simplify the code a bit. Also add some error checking to the clk_prepare_enable calls. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 4ac6317a3701007df4837dcd8036b21d6a049327 Author: Lucas Stach Date: Mon May 10 12:00:34 2021 +0800 soc: imx: gpcv2: move domain mapping to domain driver probe As long as the power domain driver is active we want power control over the domain (which is what the mapping bit requests), so there is no point in whacking it for every power control action, simply set the bit in driver probe and clear it when the driver is removed. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 4ed57c97b414a2e285ce46e41e8387b51961cd64 Author: Lucas Stach Date: Mon May 10 12:00:33 2021 +0800 soc: imx: gpcv2: move to more ideomatic error handling in probe Switch to "goto out..." error handling in domain driver probe to avoid repeating all the error paths. Tested-by: Frieder Schrempf Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Tested-by: Adam Ford Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 7ba861fff0cd3c34ca3401067a95eb12a6a581a6 Author: Lucas Stach Date: Mon May 10 12:00:40 2021 +0800 dt-bindings: imx: gpcv2: add support for optional resets For some domains the resets of the devices in the domain are not automatically triggered. Add an optional resets property to allow the GPC driver to trigger those resets explicitly. The resets belong to devices located inside the power domain, which need to be held in reset across the power-up sequence. So we have no means to specify what each reset is in a generic power-domain binding. Same situation as with the clocks in this binding actually. Tested-by: Frieder Schrempf Signed-off-by: Lucas Stach Signed-off-by: Peng Fan Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 37f5929012581d113c30b97d2cb0f68b152b73b3 Author: Shengjiu Wang Date: Thu May 6 11:41:19 2021 +0800 ARM: dts: imx6qdl-sabresd: Configure the gpio for hp detect Configure the gpio for hp detect for wm8962 sound card Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 861920974aa5ce0c68899c575bbf1163520204e9 Author: Shengjiu Wang Date: Thu May 6 11:41:18 2021 +0800 ARM: dts: imx6qdl-sabresd: Add asrc support for wm8962 sound card Add asrc support for wm8962 sound card. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 4b7f6f3b251aaf455b45a8d4904bad0b59da0c8f Author: Dillon Min Date: Tue May 4 13:09:52 2021 +0800 ARM: dts: imx: Add i.mx6q DaSheng COM-9XX SBC board support The DaSheng Com-9xx is and ARM based signle board computer (SBC) featuring: - i.MX6Q - 2GiB LPDDR3 DRAM - 8GiB eMMC 5.0 FLASH - 4MiB SPI Flash - USB 2.0 Host/Device - Multiple multi-protocol RS232/RS485 Serial ports - microSD socket - 5V DC power input - HDMI1.4a,1080p@60 - RGMIIx1 Gigabit Ethernet - CSI0x1, connect with ov2659 Signed-off-by: Dillon Min Signed-off-by: Shawn Guo commit db34eb5cc488457a02f74370f128362d34cf7a8b Author: Dillon Min Date: Tue May 4 13:09:51 2021 +0800 dt-bindings: arm: imx: Add i.mx6q DaSheng COM-9XX SBC The DaSheng Com-9xx is and ARM based signle board computer (SBC) featuring: - i.MX6Q - 2GiB LPDDR3 DRAM - 8GiB eMMC 5.0 FLASH - 4MiB SPI Flash - USB 2.0 Host/Device - Multiple multi-protocol RS232/RS485 Serial ports - microSD socket - 5V DC power input - HDMI1.4a,1080p@60 - RGMIIx1 Gigabit Ethernet - CSI0x1, connect with ov2659 Signed-off-by: Dillon Min Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 7486d6df6179a28c0dc7baf74b122e50d95bab61 Author: Dillon Min Date: Tue May 4 13:09:50 2021 +0800 dt-bindings: add dasheng vendor prefix Add vendor prefix for DaSheng, Inc. Signed-off-by: Dillon Min Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit d178918891a1ed09711ac33ff93f7710be137826 Author: Michal Vokáč Date: Fri Apr 30 15:53:15 2021 +0200 ARM: dts: imx6dl-yapp4: Use aliases to set custom MMC device indexes Until commit fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias") was introduced, our usdhc3 and usdhc4 devices were enumerated as mmc0 and mmc1. The mmc1 device is used to boot/update the board and its name must be fixed. With the referenced commit, aliases from imx6qdl.dtsi took effect. Override the aliases to get back the original device indexes. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit a6f8e68e238a15bb15f1726b35c695136c64eaba Author: Christophe JAILLET Date: Sun May 16 08:58:04 2021 +0200 crypto: ccp - Fix a resource leak in an error handling path If an error occurs after calling 'sp_get_irqs()', 'sp_free_irqs()' must be called as already done in the error handling path. Fixes: f4d18d656f88 ("crypto: ccp - Abstract interrupt registeration") Signed-off-by: Christophe JAILLET Acked-by: John Allen Signed-off-by: Herbert Xu commit b7da13d092a4919823c2b260ca7ea6ef1690b80b Author: Weili Qian Date: Sat May 15 18:44:40 2021 +0800 crypto: hisilicon/qm - enable to close master ooo when NFE occurs Kunpeng930 could be able to close master ooo when NFE occurs, which will disable memory accessing from device and execute tasks. This ensures that errors do not spread. This patch enables the hardware to close master ooo when an error occurs by writing hardware registers, and ensures that the driver will not drain qp because the hardware will empty the tasks automatically. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 3b9c24dec891d418e26032709d6f01fe3757a4a6 Author: Weili Qian Date: Sat May 15 18:44:39 2021 +0800 crypto: hisilicon/qm - adjust order of device error configuration In order to avoid reporting an exception but the error type is not configured, the driver needs to configure the error type first, and then enable the error interrupt. Before executing the task, hardware error initialization is needed so that the hardware can detect the error in time. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 3121f021c00aeed599d6f5d1c737b1bc8e6a05d8 Author: Weili Qian Date: Sat May 15 18:44:38 2021 +0800 crypto: hisilicon/qm - modify 'QM_RESETTING' clearing error Before device reset, the driver sets 'QM_RESETTING' flag, but after reset, the wrong flag is cleared. This patch modifies the problem of inconsistent flags. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit dbbc5c06955cb9a56aed51170040a3967b79371d Author: Weili Qian Date: Sat May 15 18:44:37 2021 +0800 crypto: hisilicon/qm - initialize the device before doing tasks The device needs to be initialized first, and then restart the queue to execute tasks after PF reset. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit c858401cb4a884b840fa3214b8999e8feba3a59b Author: Suman Anna Date: Fri May 14 11:12:46 2021 -0500 crypto: sa2ul - Remove child devices in remove The sa_ul_probe creates child devices using of_platform_populate(), but these are not cleaned up in driver remove. Clean these up by removing the child devices using of_platform_depopulate(). Signed-off-by: Suman Anna Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit daeec7388eb2c5dbff17630b76c22786ffa1e55a Author: Suman Anna Date: Fri May 14 11:12:45 2021 -0500 crypto: sa2ul - Use devm_platform_ioremap_resource() Simplify the platform_get_resource() and devm_ioremap_resource() calls with devm_platform_ioremap_resource(). Also add error checking and move up this block to simplify the cleanup in sa_ul_probe(). Signed-off-by: Suman Anna Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit d699c5d0bd811e48de72aeeb8e3872c63e957745 Author: Suman Anna Date: Fri May 14 11:12:44 2021 -0500 crypto: sa2ul - Use of_device_get_match_data() helper Simplify the probe function by using the of_device_get_match_data() helper instead of open coding. The logic is also moved up to fix the missing pm_runtime cleanup in case of a match failure. Fixes: 0bc42311cdff ("crypto: sa2ul - Add support for AM64") Signed-off-by: Suman Anna Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit 5c8552325e013cbdabc443cd1f1b4d03c4a2e64e Author: Suman Anna Date: Fri May 14 11:12:43 2021 -0500 crypto: sa2ul - Fix pm_runtime enable in sa_ul_probe() The pm_runtime APIs added first in commit 7694b6ca649f ("crypto: sa2ul - Add crypto driver") are not unwound properly and was fixed up partially in commit 13343badae09 ("crypto: sa2ul - Fix PM reference leak in sa_ul_probe()"). This fixed up the pm_runtime usage count but not the state. Fix this properly. Fixes: 13343badae09 ("crypto: sa2ul - Fix PM reference leak in sa_ul_probe()") Signed-off-by: Suman Anna Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit 4c0716ee1d973f6504d13f0e8d4d10350c85ad37 Author: Suman Anna Date: Fri May 14 11:12:42 2021 -0500 crypto: sa2ul - Fix leaks on failure paths with sa_dma_init() The sa_dma_init() function doesn't release the requested dma channels on all failure paths. Any failure in this function also ends up leaking the dma pool created in sa_init_mem() in the sa_ul_probe() function. Fix all of these issues. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Signed-off-by: Suman Anna Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit 5c93a2ebc7ad85046fab23f8ac297fc3a86bc903 Author: Suman Anna Date: Fri May 14 11:12:41 2021 -0500 hwrng: omap - Enable driver for TI K3 family The TI K3 family of SoCs have a SA2UL IP that contains a SafeXcel IP-76 RNG block which is supported by the OMAP RNG driver. Allow this driver to be built for TI K3 family as well. Signed-off-by: Suman Anna Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit e88b333142e4aba7410d6d3292ad97b3a8588bfe Author: Nanyong Sun Date: Fri Apr 30 16:28:50 2021 +0800 riscv: mm: add THP support on 64-bit Bring Transparent HugePage support to riscv. A transparent huge page is always represented as a pmd. Signed-off-by: Nanyong Sun Signed-off-by: Palmer Dabbelt commit c3b2d67046d236edb45eed5ca561c62ee7baa788 Author: Nanyong Sun Date: Fri Apr 30 16:28:49 2021 +0800 riscv: mm: add param stride for __sbi_tlb_flush_range Add a parameter: stride for __sbi_tlb_flush_range(), represent the page stride between the address of start and end. Normally, the stride is PAGE_SIZE, and when flush huge page address, the stride can be the huge page size such as:PMD_SIZE, then it only need to flush one tlb entry if the address range within PMD_SIZE. Signed-off-by: Nanyong Sun Signed-off-by: Palmer Dabbelt commit 141682f5b9d658b5fba7c33cf8574329a7840cdc Author: Nanyong Sun Date: Fri Apr 30 16:28:48 2021 +0800 riscv: mm: make pmd_bad() check leaf condition In the definition in Documentation/vm/arch_pgtable_helpers.rst, pmd_bad() means test a non-table mapped PMD, so it should also return true when it is a leaf page. Signed-off-by: Nanyong Sun Signed-off-by: Palmer Dabbelt commit f5397c3ee0a3e2ca0a6d66d079ffcd5386b45b81 Author: Nanyong Sun Date: Fri Apr 30 16:28:47 2021 +0800 riscv: mm: add _PAGE_LEAF macro In riscv, a page table entry is leaf when any bit of read, write, or execute bit is set. So add a macro:_PAGE_LEAF instead of (_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC), which is frequently used to determine if it is a leaf page. This make code easier to read, without any functional change. Signed-off-by: Nanyong Sun Signed-off-by: Palmer Dabbelt commit 034ebde3b8c7897fba4148bb8b59b856d34fcee9 Author: Shengjiu Wang Date: Thu Apr 29 10:52:35 2021 +0800 ARM: dts: imx7d-sdb: Add HDMI audio sound card Add HDMI audio sound card, the interface is sii902x. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 14954ee82262f7a13accd12af18139e2ea8c3dcb Author: Shengjiu Wang Date: Thu Apr 29 10:52:19 2021 +0800 ARM: dts: imx6ul-14x14-evk: Switch to fsl-asoc-card sound card There is issue with simple sound card, the simple sound card can't configure the pll of codec. [ 115.352669] wm8960 1-001a: failed to configure clock [ 115.358843] wm8960 1-001a: ASoC: error at snd_soc_dai_hw_params on wm8960-hifi: -22 So Switch to fsl-asoc-card and the fsl-asoc-card can support asrc module as front-end component. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 445ae16ac1c580a388d0249cac715e83b7c1d5cb Author: Lukasz Majewski Date: Tue May 18 16:28:57 2021 +0200 ARM: dts: imx28: Add DTS description of imx28 based XEA board This patch adds DTS definition of the imx278 based XEA board. Signed-off-by: Lukasz Majewski Signed-off-by: Shawn Guo commit b99f904e504546d5b5f3dcdf3a20afef23c9e658 Author: Michael Walle Date: Thu Apr 8 13:02:19 2021 +0200 arm64: defconfig: enable Layerscape EDAC driver Most Layerscape SoCs support ECC error reporting for the memory controller. Enable the corresponding module. In particular, this will enable EDAC support on the Kontron sl28 board which comes with ECC memory. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit bb11580f61b6c4ba5c35706abd927c8ac8c32852 Author: Paul Menzel Date: Sat May 15 10:14:04 2021 +0200 x86/efi: Log 32/64-bit mismatch with kernel as an error Log the message No EFI runtime due to 32/64-bit mismatch with kernel as an error condition, as several things like efivarfs won’t work without the EFI runtime. Signed-off-by: Paul Menzel Signed-off-by: Ard Biesheuvel commit edbd1bc4951eff8da65732dbe0d381e555054428 Author: Andy Shevchenko Date: Sun Apr 4 21:12:16 2021 +0300 efi/dev-path-parser: Switch to use for_each_acpi_dev_match() Switch to use for_each_acpi_dev_match() instead of home grown analogue. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Ard Biesheuvel commit 55fc610c8cdae353737dbc2d59febd3c1a697095 Author: Heikki Krogerus Date: Thu Mar 4 11:28:37 2021 +0300 efi/apple-properties: Handle device properties with software node API The old device property API is going to be removed. Replacing the device_add_properties() call with the software node API equivalent, device_create_managed_software_node(). Signed-off-by: Heikki Krogerus Acked-by: Lukas Wunner Signed-off-by: Ard Biesheuvel commit 5cc59c418fde9d02859996707b9d5dfd2941c50b Author: Alan Stern Date: Fri May 21 22:16:23 2021 -0400 USB: core: WARN if pipe direction != setup packet direction When a control URB is submitted, the direction indicated by URB's pipe member is supposed to match the direction indicated by the setup packet's bRequestType member. A mismatch could lead to trouble, depending on which field the host controller drivers use for determining the actual direction. This shouldn't ever happen; it would represent a careless bug in a kernel driver somewhere. This patch adds a dev_WARN_ONCE to let people know about the potential problem. Suggested-by: "Geoffrey D. Bennett" Reviewed-by: Johan Hovold Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210522021623.GB1260282@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 281e468446994a7672733af2bf941f4110d4a895 Author: Tong Zhang Date: Sat May 22 00:37:25 2021 -0400 misc: alcor_pci: fix inverted branch condition This patch fixes a trivial mistake that I made in the previous attempt in fixing the null bridge issue. The branch condition is inverted and we should call alcor_pci_find_cap_offset() only if bridge is not null. Reported-by: Colin Ian King Fixes: 3ce3e45cc333 ("misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge") Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210522043725.602179-1-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman commit 13d11f14ae40ecc9001f9ac6287b4c6db52fe48d Author: Takashi Sakamoto Date: Sat May 22 10:33:03 2021 +0900 ALSA: firewire-lib: code refactoring for transfer delay In later commit, transfer delay is used in both IR and IT contexts. This commit refactors regardless of transfer delay. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210522013303.49596-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c9f3ac2aae9fc0e034722e8153291da3f8a265cb Author: Takashi Sakamoto Date: Sat May 22 10:33:02 2021 +0900 ALSA: firewire-lib: code refactoring for generation of data block sequence This commit dissolves sequence generator in terms of the number of data blocks per packet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210522013303.49596-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c79b7158b04a96694a63a6cf9a5d07a95ea2d3a4 Author: Takashi Sakamoto Date: Sat May 22 10:33:01 2021 +0900 ALSA: firewire-lib: code refactoring for generation of syt sequence This commit dissolves sequence generator in terms of syt offsets for packet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210522013303.49596-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 7ca7cddab2ce1893bfd83bd4c698e21325ad546f Author: Takashi Sakamoto Date: Sat May 22 10:33:00 2021 +0900 ALSA: firewire-lib: code refactoring for generation of packet descriptors This commit refactors the arguments of helper function to generate the descriptors of packet. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210522013303.49596-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6f24bb8a157c4af314ea61b29f532e8b4b11b28e Author: Takashi Sakamoto Date: Sat May 22 10:32:59 2021 +0900 ALSA: firewire-lib: pool sequence of packet in IT context independently Current implementation pools the sequence in AMDTP domain. This is convenient regarding to memory usage and computation time, however inconvenient for the devices such that several rx streams are expected to transfer timing information independently. This commit refactors to pool the sequence per rx packet stream. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210522013303.49596-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 8070d2652e735585d31a50ff4f9bbaf2b5a49b10 Author: Takashi Sakamoto Date: Sat May 22 10:32:58 2021 +0900 ALSA: firewire-lib: add flag to unaware of syt in CIP header Many devices are unaware of syt field in rx CIP for playback timing. This commit adds a flag to cancel processing syt field. Actually, syt calculation is required to decide the number of events per rx packet. The flag put 0xffff to CIP header of rx packet. On the other hand, The value of syt field in CIP header of tx packet is unavailable. The sequence of packet descriptor for tx packet includes 0 for the offset of syt field to avoid computation. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210522013303.49596-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 344f0f821a7ee77832f04451e616f313b7d93f1a Author: Takashi Sakamoto Date: Thu May 20 22:04:09 2021 +0900 ALSA: firewire-lib: Fix uninitialized variable err issue The check of error is just done for the case that CIP header is available. This commit moves auto variable into the branch to process CIP header. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: c09010eeb373 ("ALSA: firewire-lib: handle the case that empty isochronous packet payload for CIP") Suggested-by: Colin Ian King Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520130409.GA170303@workstation Signed-off-by: Takashi Iwai commit 304ba5dca49a21e6f4040494c669134787145118 Merge: 9146bc275b7f7 9a91e5e0af5e0 Author: Thomas Zimmermann Date: Sat May 22 07:17:05 2021 +0200 Merge drm/drm-next into drm-misc-next Backmerging from drm/drm-next to the patches for AMD devices for v5.14. Signed-off-by: Thomas Zimmermann commit ea2f0f77538c50739b9fb4de4700cee5535e1f77 Author: John Garry Date: Wed May 19 22:31:02 2021 +0800 scsi: core: Cap scsi_host cmd_per_lun at can_queue The sysfs handling function sdev_store_queue_depth() enforces that the sdev queue depth cannot exceed shost can_queue. The initial sdev queue depth comes from shost cmd_per_lun. However, the LLDD may manually set cmd_per_lun to be larger than can_queue, which leads to an initial sdev queue depth greater than can_queue. Such an issue was reported in [0], which caused a hang. That has since been fixed in commit fc09acb7de31 ("scsi: scsi_debug: Fix cmd_per_lun, set to max_queue"). Stop this possibly happening for other drivers by capping shost cmd_per_lun at shost can_queue. [0] https://lore.kernel.org/linux-scsi/YHaez6iN2HHYxYOh@T590/ Link: https://lore.kernel.org/r/1621434662-173079-1-git-send-email-john.garry@huawei.com Reviewed-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit e5e0280db792953ee7acbdbf01179d53187a6083 Author: James Smart Date: Fri May 14 12:55:59 2021 -0700 scsi: lpfc: Update lpfc version to 12.8.0.10 Update lpfc version to 12.8.0.10 Link: https://lore.kernel.org/r/20210514195559.119853-12-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8eced807077d198fc264629bd2592795d270c9f1 Author: James Smart Date: Fri May 14 12:55:58 2021 -0700 scsi: lpfc: Reregister FPIN types if ELS_RDF is received from fabric controller FC-LS-5 specifies that a received RDF implies a possible change to fabric supported diagnostic functions. Endpoints are to re-perform the RDF exchange with the fabric to enable possible new features or adapt to changes in values. This patch adds the logic to RDF receive to re-perform the RDF exchange with the switch. Link: https://lore.kernel.org/r/20210514195559.119853-11-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3e49af9393c6e59d579de13333514fc9660a0e92 Author: James Smart Date: Fri May 14 12:55:57 2021 -0700 scsi: lpfc: Add a option to enable interlocked ABTS before job completion Default behavior for the driver, when aborting an I/O, is to terminate the I/O with the adapter. The adapter will initiate an ABTS to terminate the exchange on the link and mark the exchange is terminated so that no further use of the sgl or any traffic for the exchange is worked on. Completion on the Abort is then posted to the driver, which as the I/O is terminated can complete the I/O to the OS. This completion may occur prior to the ABTS handshake completing on the wire. The ABTS handshake can take a long time to complete with timeouts and retries reaching 60+ seconds. Note: if retries fail, LOGO occurs. Some devices want to ensure that the ABTS handshake fully completes (this device has fully ack'd it) before the I/O completion is posted back to the OS, where a failed I/O may be retried via a different path. To support this behavior, an option was added to the driver to change I/O completion from the Abort cmd completion to the Exchange termination (aka ABTS) completion. Link: https://lore.kernel.org/r/20210514195559.119853-10-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5aa615d195f1e142c662cb2253f057c9baec7531 Author: James Smart Date: Fri May 14 12:55:56 2021 -0700 scsi: lpfc: Fix crash when lpfc_sli4_hba_setup() fails to initialize the SGLs The driver is encountering a crash in lpfc_free_iocb_list() while performing initial attachment. Code review found this to be an errant failure path that was taken, jumping to a tag that then referenced structures that were uninitialized. Fix the failure path. Link: https://lore.kernel.org/r/20210514195559.119853-9-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 04c1d9c50ae32d6efd0b71024b3829051821c7a2 Author: James Smart Date: Fri May 14 12:55:55 2021 -0700 scsi: lpfc: Ignore GID-FT response that may be received after a link flip When a link bounce happens, there is a possibility that responses to requests posted prior to the link bounce could be received. This is problematic as the counter to track reglogin completion after link up can become out of sync with the real state. As there is no reason to process a request made in a prior link up context, eliminate all the disturbance by tagging the request with the event_tag maintained by the SLI Port for the link. The event_tag will change on every link state transition. As long as the tag matches the current event_tag, the response can be processed. If it doesn't match, just discard the response. Link: https://lore.kernel.org/r/20210514195559.119853-8-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit fe83e3b9b422ac8ece2359c7b7290efe7f0335a2 Author: James Smart Date: Fri May 14 12:55:54 2021 -0700 scsi: lpfc: Fix node handling for Fabric Controller and Domain Controller During link bounce testing, RPI counts were seen to differ from the number of nodes. For fabric and domain controllers, a temporary RPI is assigned, but the code isn't registering it. If the nodes do go away, such as on link down, the temporary RPI isn't being released. Change the way these two fabric services are managed, make them behave like any other remote port. Register the RPI and register with the transport. Never leave the nodes in a NPR or UNUSED state where their RPI is in limbo. This allows them to follow normal dev_loss_tmo handling, RPI refcounting, and normal removal rules. It also allows fabric I/Os to use the RPI for traffic requests. Note: There is some logic that still has a couple of exceptions when the Domain controller (0xfffcXX). There are cases where the fabric won't have a valid login but will send RDP. Other times, it will it send a LOGO then an RDP. It makes for ad-hoc behavior to manage the node. Exceptions are documented in the code. Link: https://lore.kernel.org/r/20210514195559.119853-7-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 4012baeab6ca22b7f7beb121b6d0da0a62942fdd Author: James Smart Date: Fri May 14 12:55:53 2021 -0700 scsi: lpfc: Fix Node recovery when driver is handling simultaneous PLOGIs When lpfc is handling a solicited and unsolicited PLOGI with another initiator, the remote initiator is never recovered. The node for the initiator is erroneouosly removed and all resources released. In lpfc_cmpl_els_plogi(), when lpfc_els_retry() returns a failure code, the driver is calling the state machine with a device remove event because the remote port is not currently registered with the SCSI or NVMe transports. The issue is that on a PLOGI "collision" the driver correctly aborts the solicited PLOGI and allows the unsolicited PLOGI to complete the process, but this process is interrupted with a device_rm event. Introduce logic in the PLOGI completion to capture the PLOGI collision event and jump out of the routine. This will avoid removal of the node. If there is no collision, the normal node removal will occur. Fixes: 52edb2caf675 ("scsi: lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails") Cc: # v5.11+ Link: https://lore.kernel.org/r/20210514195559.119853-6-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1037e4b4f81dc4ddf928e0ca2f1b182efdfdcc9d Author: James Smart Date: Fri May 14 12:55:52 2021 -0700 scsi: lpfc: Add ndlp kref accounting for resume RPI path The driver is crashing due to a bad pointer during driver load due in an adisc acc receive routine. The driver is missing node get/put in the mbx_resume_rpi paths. Fix by adding the proper gets and puts into the resume_rpi path. Link: https://lore.kernel.org/r/20210514195559.119853-5-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e30d55137edef47434c40d7570276a0846fe922c Author: James Smart Date: Fri May 14 12:55:51 2021 -0700 scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology An 'unexpected timeout' message may be seen in a point-2-point topology. The message occurs when a PLOGI is received before the driver is notified of FLOGI completion. The FLOGI completion failure causes discovery to be triggered for a second time. The discovery timer is restarted but no new discovery activity is initiated, thus the timeout message eventually appears. In point-2-point, when discovery has progressed before the FLOGI completion is processed, it is not a failure. Add code to FLOGI completion to detect that discovery has progressed and exit the FLOGI handling (noop'ing it). Link: https://lore.kernel.org/r/20210514195559.119853-4-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit fa21189db9ab022080e056cc6da219975da48fd6 Author: James Smart Date: Fri May 14 12:55:50 2021 -0700 scsi: lpfc: Fix non-optimized ERSP handling When processing an NVMe ERSP IU which didn't match the optimized CQE-only path, the status was being left to the WQE status. WQE status is non-zero as it is indicating a non-optimized completion that needs to be handled by the driver. Fix by clearing the status field when falling into the non-optimized case. Log message added to track optimized vs non-optimized debug. Link: https://lore.kernel.org/r/20210514195559.119853-3-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 01131e7aae5d30e23e3cdd1eebe51bbc5489ae8f Author: James Smart Date: Fri May 14 12:55:49 2021 -0700 scsi: lpfc: Fix unreleased RPIs when NPIV ports are created While testing NPIV and watching logins and used RPI levels, it was seen the used RPI count was much higher than the number of remote ports discovered. Code inspection showed that remote port removals on any NPIV instance are releasing the RPI, but not performing an UNREG_RPI with the adapter thus the reference counting never fully drops and the RPI is never fully released. This was happening on NPIV nodes due to a log of fabric ELS's to fabric addresses. This lack of UNREG_RPI was introduced by a prior node rework patch that performed the UNREG_RPI as part of node cleanup. To resolve the issue, do the following: - Restore the RPI release code, but move the location to so that it is in line with the new node cleanup design. - NPIV ports now release the RPI and drop the node when the caller sets the NLP_RELEASE_RPI flag. - Set the NLP_RELEASE_RPI flag in node cleanup which will trigger a release of RPI to free pool. - Ensure there's an UNREG_RPI at LOGO completion so that RPI release is completed. - Stop offline_prep from skipping nodes that are UNUSED. The RPI may not have been released. - Stop the default RPI handling in lpfc_cmpl_els_rsp() for SLI4. - Fixed up debugfs RPI displays for better debugging. Fixes: a70e63eee1c1 ("scsi: lpfc: Fix NPIV Fabric Node reference counting") Link: https://lore.kernel.org/r/20210514195559.119853-2-jsmart2021@gmail.com Cc: # v5.11+ Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ee8868c5c78f16fb726775741aeab8a233373332 Author: Martin Wilck Date: Fri May 14 17:32:14 2021 +0200 scsi: scsi_dh_alua: Retry RTPG on a different path after failure If an RTPG fails, we can't infer anything wrt. the state of the ports in the port group except that we were unable to reach the one port on which the RTPG had failed. "offline" is just a secondary port state, which means that we can't infer the state of any port in the PG from the failure (in fact, even the failed port might still be in "active/optimized" primary port access state). Therefore, when we encounter an RTPG failure, we should retry the RTPG on a different port. This avoids falsely setting port states to offline for unreachable ports. To do this, ports on which an RTPG has failed are temporarily set to "disabled" to avoid repeating the failed I/O on the same target port. Once the RTPG has either succeeded on one port or failed on all ports of the PG, the ports are enabled again. Link: https://lore.kernel.org/r/20210514153214.5626-1-mwilck@suse.com Signed-off-by: Martin Wilck Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit cb9eb11fd57215020c6649bbe884232fb0f80bdd Author: Jiapeng Chong Date: Mon May 10 18:40:06 2021 +0800 scsi: qla2xxx: Remove redundant assignment to rval Variable rval is set to QLA_SUCCESS but this value is never read as it is overwritten later on. Hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/scsi/qla2xxx/qla_init.c:4359:2: warning: Value stored to 'rval' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1620643206-127930-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 5ac3c649f11cb457dd40f6dde58cb029181c2700 Author: Colin Ian King Date: Wed May 5 20:01:04 2021 +0100 scsi: ufs: ufs-exynos: Make a const array static, makes object smaller Don't populate the const array granularity_tbl on the stack but instead make it static. Makes the object code smaller by 190 bytes: Before: text data bss dec hex filename 25563 6908 0 32471 7ed7 ./drivers/scsi/ufs/ufs-exynos.o After: text data bss dec hex filename 25213 7068 0 32281 7e19 ./drivers/scsi/ufs/ufs-exynos.o (gcc version 10.3.0) Link: https://lore.kernel.org/r/20210505190104.70112-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 86cfe4ad248ddf4ce7e4801374ef7f27f23711cf Author: Wei Ming Chen Date: Tue May 18 21:18:23 2021 +0800 scsi: fas216: Use fallthrough pseudo-keyword Replace /*FALLTHROUGH*/ comment with pseudo-keyword macro 'fallthrough'. Link: https://lore.kernel.org/r/20210518131823.2586-1-jj251510319013@gmail.com Signed-off-by: Wei Ming Chen Signed-off-by: Martin K. Petersen commit ecd7beb37871827c449842ec2c9db106ee5e82f6 Author: Keoseong Park Date: Tue May 18 21:12:17 2021 +0900 scsi: ufs: core: Clean up whitespace checkpatch reports the following errors: ERROR: space prohibited before that ',' (ctx:WxW) #945: FILE: drivers/scsi/ufs/ufshcd.h:945: +int ufshcd_init(struct ufs_hba * , void __iomem * , unsigned int); ^ ERROR: space prohibited before that ',' (ctx:WxW) #945: FILE: drivers/scsi/ufs/ufshcd.h:945: +int ufshcd_init(struct ufs_hba * , void __iomem * , unsigned int); ^ Remove unnecessary whitespace in ufshcd.h. Link: https://lore.kernel.org/r/2038148563.21621340102306.JavaMail.epsvc@epcpadp3 Signed-off-by: Keoseong Park Signed-off-by: Martin K. Petersen commit 547be9a05dc825fbbaeb970ec9e2313a49bf586f Author: Suman Anna Date: Fri May 14 16:20:16 2021 -0500 arm64: dts: ti: k3-am65-iot2050-common: Disable mailbox nodes There are no sub-mailbox devices defined currently for both the IOT2050 boards. These are usually dictated by the firmwares running on the R5F remote processors and the applications they provide. Defining the actual sub-mailboxes will also dictate the interrupts the clusters will use for interrupts on the Cortex-A53 cores. Disable all of the Mailbox clusters until the sub-mailboxes are defined and used. This fixes the warnings around the missing interrupts with the upcoming conversion of the OMAP Mailbox binding to YAML format. Signed-off-by: Suman Anna Acked-by: Jan Kiszka Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210514212016.3153-1-s-anna@ti.com commit 9146bc275b7f73210c00eca3c5cf6897450b8896 Author: Zhen Lei Date: Tue May 11 17:13:44 2021 +0800 drm/mcde: Remove redundant error printing in mcde_dsi_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210511091344.4508-1-thunder.leizhen@huawei.com commit 72667f1cd1640036e7c412df83e3c39d759acc2f Author: Linus Walleij Date: Sun Mar 14 00:09:13 2021 +0100 drm/panel: s6e63m0: Depromote debug prints The dev_info():s in the DSI driver are very talkative, depromote these to dev_dbg(). Signed-off-by: Linus Walleij Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210313230913.4108256-1-linus.walleij@linaro.org commit 78924664af92fabc203a946eac09c69592fa12c4 Author: Corentin Labbe Date: Wed May 19 20:35:47 2021 +0000 ARM: dts: gemini: remove xxx-cells from display dtb_check complains about #address-cells and #size-cells, so lets remove them. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 4bad54aeb6d684fa40403f7d2d782205b785c731 Author: Corentin Labbe Date: Wed May 19 20:35:46 2021 +0000 ARM: dts: gemini-dlink-dir-685: Remove address from display port The address and reg adds no value to the port node, remove them. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 91cdb2b0e6306253fc50d9da5c1dc0636b395a9b Author: Corentin Labbe Date: Wed May 19 20:35:45 2021 +0000 dt-bindings: display: convert faraday,tve200 Converts display/faraday,tve200.txt to yaml. Signed-off-by: Corentin Labbe Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210519203547.837237-1-clabbe@baylibre.com commit 30639b8ed6c8e7bcbeb92c4261819bed68463215 Author: Corentin Labbe Date: Fri May 21 19:35:40 2021 +0000 ARM: dts: gemini-dlink-dir-685: rename gpio-i2c to i2c gemini-dlink-dir-685.dt.yaml: gpio-i2c: $nodename:0: 'gpio-i2c' does not match '^i2c(@.*)?' >From schema: /usr/src/linux-next/Documentation/devicetree/bindings/i2c/i2c-gpio.yaml Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 3b976b541823b4754ccf9ceede2d24efd79ef74b Author: Corentin Labbe Date: Fri May 21 19:35:39 2021 +0000 ARM: dts: gemini-dlink-dns-313: rename gpio-i2c to i2c This fixes dtcheck warning: arch/arm/boot/dts/gemini-dlink-dns-313.dt.yaml: gpio-i2c: $nodename:0: 'gpio-i2c' does not match '^i2c(@.*)?' Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 6a593769c75fe0e1d32dbdb3dbaf4a6e8fa9e460 Author: Guenter Roeck Date: Fri May 21 08:02:12 2021 -0700 drm/amd/amdkfd: Drop unnecessary NULL check after container_of The first parameter passed to container_of() is the pointer to the work structure passed to the worker and never NULL. The NULL check on the result of container_of() is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Reviewed-by: Felix Kuehling Signed-off-by: Guenter Roeck Signed-off-by: Alex Deucher commit f43ae2d1806c2b8a0934cb4acddd3cf3750d10f8 Author: Jiapeng Chong Date: Fri May 21 17:50:28 2021 +0800 drm/amdgpu: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:449 sdma_v5_0_ring_emit_mem_sync() warn: inconsistent indenting. Reviewed-by: Christian König Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit e0fb14c8dcec68a8b0941462afcc67efeb1badf3 Author: Alex Deucher Date: Thu May 20 11:50:51 2021 -0400 drm/amdgpu/apci: switch ATIF/ATCS probe order Try the handle from ATPX first since this is the most common case. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 77bf762f8b3011b2d00eb49098071952956da892 Author: Alex Deucher Date: Wed May 19 15:47:42 2021 -0400 drm/amdgpu/acpi: unify ATCS handling (v3) Treat it like ATIF and check both the dGPU and APU for the method. This is required because ATCS may be hung off of the APU in ACPI on A+A systems. v2: add back accidently removed ACPI handle check. v3: Fix incorrect atif check (Colin) Fix uninitialized variable (Colin) Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit cd11b58ccef87c59918daa7eb0202fb308aa1350 Author: Alex Deucher Date: Fri May 21 00:03:17 2021 -0400 drm/amdgpu/display: make backlight setting failure messages debug Avoid spamming the log. The backlight controller on DCN chips gets powered down when the display is off, so if you attempt to set the backlight level when the display is off, you'll get this message. This isn't a problem as we cache the requested backlight level if it's adjusted when the display is off and set it again during modeset. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: nicholas.choi@amd.com Cc: harry.wentland@amd.com commit b0781603af15425417ff8f63e5f8a329a4f5afd7 Author: Nicholas Kazlauskas Date: Wed May 19 16:12:19 2021 -0400 drm/amd/display: Fix GPU scaling regression by FS video support [Why] FS video support regressed GPU scaling and the scaled buffer ends up stuck in the top left of the screen at native size - full, aspect, center scaling modes do not function. This is because decide_crtc_timing_for_drm_display_mode() does not get called when scaling is enabled. [How] Split recalculate timing and scaling into two different flags. We don't want to call drm_mode_set_crtcinfo() for scaling, but we do want to call it for FS video. Optimize and move preferred_refresh calculation next to decide_crtc_timing_for_drm_display_mode() like it used to be since that's not used for FS video. We don't need to copy over the VIC or polarity in the case of FS video modes because those don't change. Fixes: 6f59f229f8ed7a ("drm/amd/display: Skip modeset for front porch change") Cc: Aurabindo Pillai Signed-off-by: Nicholas Kazlauskas Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 5bb198930a731795c93e650836ec5bd8b6cfae08 Author: Felix Kuehling Date: Tue May 18 21:46:02 2021 -0400 drm/amdgpu: Use preemptible placement for KFD KFD userptr BOs and SG BOs used for DMA mappings can be preempted with CWSR. Therefore we can use preemptible placement and avoid unwanted evictions due to GTT accounting. Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit b453e42a6e8b9fa4580011e923963248c56b9d4d Author: Felix Kuehling Date: Wed May 5 15:18:53 2021 -0400 drm/amdgpu: Add new placement for preemptible SG BOs SG BOs such as dmabuf imports and userptr BOs do not consume system resources directly. Instead they point to resources owned elsewhere. They typically get evicted by DMABuf move notifiers of MMU notifiers. If those notifiers don't need to wait for hardware fences (i.e. the SG BOs are used in a preemptible context), then we don't need to limit them to the GTT size and we don't need TTM to evict them. Create a new placement for such preemptible SG BOs that does not impose artificial size limits and TTM evictions. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6abb3f434c00281b338b5d7a547c57d93e0b9782 Author: Bindu Ramamurthy Date: Thu May 20 10:06:04 2021 -0400 drm/amd/display: Allow bandwidth validation for 0 streams. [Why] Bandwidth calculations are triggered for non zero streams, and in case of 0 streams, these calculations were skipped with pstate status not being updated. [How] As the pstate status is applicable for non zero streams, check added for allowing 0 streams inline with dcn internal bandwidth validations. Signed-off-by: Bindu Ramamurthy Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 5051cb794ac5d92154e186d87cdc12cba613f4f6 Author: Feifei Xu Date: Thu May 20 17:46:03 2021 +0800 drm/amd/pm: fix return value in aldebaran_set_mp1_state() For default cases,we should return 0. Otherwise resume will abort because of the wrong return value. Signed-off-by: Feifei Xu Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit c15e2739b88704a3b001b855b964ea500961154c Author: Chengming Gui Date: Fri May 21 10:54:07 2021 +0800 drm/amd/pm: Correct reserved uint32_t number in beige_goby_PPTable Correct reserved number according to the latest struct in drm-next Signed-off-by: Chengming Gui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit f5120f5998803a973b1d432ed2aa7e592527aa46 Author: Vladimir Oltean Date: Fri May 21 17:12:20 2021 +0300 dpaa2-eth: don't print error from dpaa2_mac_connect if that's EPROBE_DEFER When booting a board with DPAA2 interfaces defined statically via DPL (as opposed to creating them dynamically using restool), the driver will print an unspecific error message. This change adds the error code to the message, and avoids printing altogether if the error code is EPROBE_DEFER, because that is not a cause of alarm. Signed-off-by: Vladimir Oltean Reviewed-by: Ioana Ciornei Signed-off-by: David S. Miller commit 40d6b939e4df950c33554f1439b49df1752b0047 Author: Zhen Lei Date: Mon May 17 17:59:45 2021 +0800 scsi: Fix spelling mistakes in header files Fix some spelling mistakes in comments: pathes ==> paths Resouce ==> Resource retreived ==> retrieved recevied ==> received interruped ==> interrupted [mkp: kept 'keep-alives' and 'busses'] Link: https://lore.kernel.org/r/20210517095945.7363-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit 98f92dff1412d99289f04a8b9a2c107c082313b3 Author: Juerg Haefliger Date: Mon May 17 11:58:35 2021 +0200 scsi: core: Remove leading spaces in Kconfig Remove leading spaces before tabs in Kconfig file(s) by running the following command: $ find drivers/scsi -name 'Kconfig*' | xargs sed -r -i 's/^[ ]+\t/\t/' Link: https://lore.kernel.org/r/20210517095835.81733-1-juergh@canonical.com Signed-off-by: Juerg Haefliger Signed-off-by: Martin K. Petersen commit 824731258b65f58764786f8d776c2007b084e12c Author: kernel test robot Date: Sun May 16 07:03:58 2021 +0800 scsi: target: tcmu: Fix boolreturn.cocci warnings drivers/target/target_core_user.c:1424:9-10: WARNING: return of 0/1 in function 'tcmu_handle_completions' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Link: https://lore.kernel.org/r/20210515230358.GA97544@60d1edce16e0 Fixes: 9814b55cde05 ("scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found") CC: Bodo Stroesser Reported-by: kernel test robot Acked-by: Bodo Stroesser Signed-off-by: kernel test robot Signed-off-by: Martin K. Petersen commit e2ac7ab281c06cd367f6bffc4ba445a311a5f52a Author: Bart Van Assche Date: Wed May 19 13:20:58 2021 -0700 scsi: ufs: Use designated initializers in ufs_pm_lvl_states[] The comments in the enum ufs_pm_level definition are redundant. Remove the comments from the ufs_pm_level enum and use designated initializers in the ufs_pm_lvl_states[] definition instead. Link: https://lore.kernel.org/r/20210519202058.12634-3-bvanassche@acm.org Cc: Stanley Chu Cc: Can Guo Cc: Bean Huo Cc: Jaegeuk Kim Cc: Asutosh Das Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b12a6b7193e1362d297eb30e229ca0392b0583a2 Merge: f07b300c81575 30f43d6f1cab2 Author: David S. Miller Date: Fri May 21 14:05:04 2021 -0700 Merge branch 'dpaa2-eth-of_node' Ioana Ciornei says: ==================== dpaa2-eth: setup the of_node This patch set allows DSA to work with a DPAA2 master device by setting up the of_node to point to the corresponding MAC DTS node, so that of_find_net_device_by_node() can find it. As an added benefit, udev rules can now be used to create a naming scheme based on the physical MAC. The second patch renames the debugfs directory to use the DPNI name instead of the netdev name, since the latter can be changed after probe time. ==================== Signed-off-by: David S. Miller commit 30f43d6f1cab2eae349a27bd8a0faa795673a97f Author: Ioana Ciornei Date: Fri May 21 16:25:30 2021 +0300 dpaa2-eth: name the debugfs directory after the DPNI object Name the debugfs directory after the DPNI object instead of the netdev name since this can be changed after probe by udev rules. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit b193f2ed533f6ddffe947327dcf2e76d8beb72a4 Author: Ioana Ciornei Date: Fri May 21 16:25:29 2021 +0300 dpaa2-eth: setup the of_node field of the device When the DPNI object is connected to a DPMAC, setup the of_node to point to the DTS device node of that specific MAC. This enables other drivers, for example the DSA subsystem, to find the net_device by its device node. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit ab17122e758ef68fb21033e25c041144067975f5 Author: Sergey Shtylyov Date: Wed May 19 22:20:15 2021 +0300 scsi: hisi_sas: Propagate errors in interrupt_init_v1_hw() After commit 6c11dc060427 ("scsi: hisi_sas: Fix IRQ checks") we have the error codes returned by platform_get_irq() ready for the propagation upsream in interrupt_init_v1_hw() -- that will fix still broken deferred probing. Let's propagate the error codes from devm_request_irq() as well since I don't see the reason to override them with -ENOENT... Link: https://lore.kernel.org/r/49ba93a3-d427-7542-d85a-b74fe1a33a73@omp.ru Acked-by: John Garry Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit f07b300c815757b0aabb3a0520249df4a879b416 Merge: 030c8198d744e 039b167d68a3c Author: David S. Miller Date: Fri May 21 14:01:41 2021 -0700 Merge branch 'sja1105-stats' Vladimir Oltean says: ==================== Ethtool statistics counters cleanup for SJA1105 DSA driver This series removes some reported data from ethtool -S which were not counters at all, and reorganizes the code such that counters can be read individually and not just all at once. ==================== Signed-off-by: David S. Miller commit 039b167d68a3ce401114b1a520843db319277895 Author: Vladimir Oltean Date: Fri May 21 16:16:08 2021 +0300 net: dsa: sja1105: don't use burst SPI reads for port statistics The current internal sja1105 driver API is optimized for retrieving many statistics counters at once. But the switch does not do atomic snapshotting for them anyway. In case we start reporting the hardware port counters through ndo_get_stats64 as well, not just ethtool, it would be good to be able to read individual port counters and not all of them. Additionally, since Arnd Bergmann's commit ae1804de93f6 ("dsa: sja1105: dynamically allocate stats structure"), sja1105_get_ethtool_stats allocates memory dynamically, since struct sja1105_port_status was deemed to consume too much stack memory. That is not ideal. The large structure is only needed because of the burst read. If we read statistics one by one, we can consume less memory, and we can avoid dynamic allocation. Additionally, latency-sensitive interfaces such as PTP operations (for phc2sys) might suffer if the SPI mutex is being held for too long, which happens in the case of SPI burst reads. By reading counters one by one, we give a chance for higher priority processes to preempt and take the SPI bus mutex for accessing the PTP clock. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 30a2e9c0f5cf8892255e21153952cd347c81b36b Author: Vladimir Oltean Date: Fri May 21 16:16:07 2021 +0300 net: dsa: sja1105: stop reporting the queue levels in ethtool port counters The queue levels are not counters, but instead they represent the occupancy of the MAC TX queues. Having these in ethtool port counters is not helpful, so remove them. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8f942f9d4b0630e6136803060c481776479e83bf Author: Jiapeng Chong Date: Fri May 21 17:46:08 2021 +0800 scsi: bfa: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/scsi/bfa/bfa_svc.c:3176 bfa_fcport_send_enable() warn: inconsistent indenting. Link: https://lore.kernel.org/r/1621590368-72041-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 1ecc820db0b952f055b1a03c1afe4c2679e2276d Author: zuoqilin Date: Fri May 21 17:21:53 2021 +0800 scsi: bfa: Fix typo Change 'chnage' to 'change'. Link: https://lore.kernel.org/r/20210521092153.379-1-zuoqilin1@163.com Signed-off-by: zuoqilin Signed-off-by: Martin K. Petersen commit 2d535031eb2e789c546e979b4109bf1e60e1cd31 Author: zuoqilin Date: Fri May 21 16:28:08 2021 +0800 scsi: pmcraid: Fix typos Change "avaibale" and "avaible" to "available". Link: https://lore.kernel.org/r/20210521082808.1925-1-zuoqilin1@163.com Signed-off-by: zuoqilin Signed-off-by: Martin K. Petersen commit faa6c1d92cb0d2a377cc4ca68a3f273e3355e4b3 Author: Daniel Wagner Date: Thu May 20 09:31:27 2021 +0200 scsi: scsi_transport_fc: Remove double FC_FPORT_DELETED in mask creation Remove the double listed FC_FPORT_DELETING from the mask creation. Commit 260f4aeddb48 ("scsi: scsi_transport_fc: return -EBUSY for deleted vport") added VC_VPORT_DELETING to the flag masks. This is not necessary as FC_FPORT_DEL is defined as VC_FPORT_DELETED | FC_FPORT_DELETING. Link: https://lore.kernel.org/r/20210520073127.132456-1-dwagner@suse.de Cc: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 030c8198d744e4149da57bd2a73b87aa6a8aa272 Author: Colin Ian King Date: Fri May 21 11:01:46 2021 +0100 net: hns3: Fix return of uninitialized variable ret In the unlikely event that rule_cnt is zero the variable ret is not assigned a value and function hclge_dbg_dump_fd_tcam can end up returning an unitialized value in ret. Fix this by explicitly setting ret to zero before the for-loop. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: b5a0b70d77b9 ("net: hns3: refactor dump fd tcam of debugfs") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 8e060b310f8fe208eb9154e9ab3585b948f0db36 Author: ching Huang Date: Thu May 20 15:13:49 2021 +0800 scsi: arcmsr: Update driver version to v1.50.00.05-20210429 Update driver version to v1.50.00.05-20210429. Link: https://lore.kernel.org/r/d0c6dc6431f0e46db6583dc0d04d7983b420d4da.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 04fdfad68b81cab9de660190ed8c881b1e5bf5fa Author: zuoqilin Date: Fri May 21 17:45:22 2021 +0800 atm: Fix typo Change 'contol' to 'control'. Signed-off-by: zuoqilin Signed-off-by: David S. Miller commit d9a231226f28261a787535e08d0c78669e1ad010 Author: ching Huang Date: Thu May 20 14:55:15 2021 +0800 scsi: arcmsr: Fix doorbell status being updated late on ARC-1886 It is possible for the IOP to be delayed in updating the doorbell status. The doorbell status should not be 0 so loop until the value changes. Link: https://lore.kernel.org/r/afdfdf7eabecf14632492c4987a6b9ac6312a7ad.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit b269875f91c30c8d18cf6a6fbce40b12965e120f Author: Jiapeng Chong Date: Fri May 21 17:40:14 2021 +0800 net: phy: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/net/phy/phy_device.c:2886 phy_probe() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 31d990cb2628448806a94e64f07b90994a716c56 Author: Yang Yingliang Date: Fri May 21 11:57:21 2021 +0800 sfc: farch: fix compile warning in efx_farch_dimension_resources() Fix the following kernel build warning when CONFIG_SFC_SRIOV is disabled: drivers/net/ethernet/sfc/farch.c: In function ‘efx_farch_dimension_resources’: drivers/net/ethernet/sfc/farch.c:1671:21: warning: variable ‘buftbl_min’ set but not used [-Wunused-but-set-variable] unsigned vi_count, buftbl_min, total_tx_channels; Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 2a38d2a8b4a6777d37b7b8b8416b60fe0af73cd2 Author: Yang Yingliang Date: Tue May 18 21:20:18 2021 +0800 scsi: qedf: Use vzalloc() instead of vmalloc()/memset(0) Use vzalloc() instead of vmalloc() and memset(0) to simpify the code. Link: https://lore.kernel.org/r/20210518132018.1312995-1-yangyingliang@huawei.com Reviewed-by: Himanshu Madhani Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit 4057c58da21ceeecb71c0f2d22c50755d53320e0 Author: Wang Hai Date: Fri May 21 11:31:35 2021 +0800 net: bonding: bond_alb: Fix some typos in bond_alb.c s/becase/because/ s/reqeusts/requests/ s/funcions/functions/ s/addreses/addresses/ Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit ae8102b87b9a91f401841513ceab4fc2c0e14787 Author: Wang Hai Date: Fri May 21 11:24:55 2021 +0800 caif_virtio: Fix some typos in caif_virtio.c s/patckets/packets/ s/avilable/available/ s/tbe/the/ Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit faf5954d7f0cdb439da475b21e7a67d51d6fb136 Merge: 44be5c42e3eda 70fe4523c8f6c Author: David S. Miller Date: Fri May 21 13:26:41 2021 -0700 Merge branch 'wan-cleanups' Guangbin Huang says: ==================== net: wan: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit 70fe4523c8f6c310c4e5e2c2de5a018a22a6d928 Author: Peng Li Date: Fri May 21 09:08:17 2021 +0800 net: wan: add necessary () to macro argument Macro argument 'card' and 'port' may be better as '(card)' and '(port)' to avoid precedence issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 1bf705d4f2316ec213ada3119bc6cb352f43de64 Author: Peng Li Date: Fri May 21 09:08:16 2021 +0800 net: wan: add braces {} to all arms of the statement Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 145efe6c279bbfd0795dcded592147278c22d713 Author: Peng Li Date: Fri May 21 09:08:15 2021 +0800 net: wan: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit eab9948140d109fdf42f0477d1b3b85c3a7e3306 Author: Peng Li Date: Fri May 21 09:08:14 2021 +0800 net: wan: fix the code style issue about trailing statements Trailing statements should be on next line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 974221c6cf5441107c82f8c4c0b0694345d6c568 Author: Peng Li Date: Fri May 21 09:08:13 2021 +0800 net: wan: add some required spaces Add space required after that close brace '}'. Add space required before the open parenthesis '('. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 4926257916496909154857d92413027915a30309 Author: Peng Li Date: Fri May 21 09:08:12 2021 +0800 net: wan: fix an code style issue about "foo* bar" Fix the checkpatch error as "foo* bar" should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 44be5c42e3edafac0a8095bf89abd6171c3beb96 Merge: 48e8c6f1612b3 718bad0e4da9a Author: David S. Miller Date: Fri May 21 13:23:29 2021 -0700 Merge branch 'sja1105-spi' Vladimir Oltean says: ==================== Adapt the sja1105 DSA driver to the SPI controller's transfer limits This series changes the SPI transfer procedure in sja1105 to take into consideration the buffer size limitations that the SPI controller driver might have. Changes in v2: Remove the driver's use of cs_change and send multiple, smaller SPI messages instead of a single large one. ==================== Signed-off-by: David S. Miller commit 718bad0e4da9a637a99c13b27dcb030921961bc7 Author: Vladimir Oltean Date: Fri May 21 00:16:57 2021 +0300 net: dsa: sja1105: adapt to a SPI controller with a limited max transfer size The static config of the sja1105 switch is a long stream of bytes which is programmed to the hardware in chunks (portions with the chip select continuously asserted) of max 256 bytes each. Each chunk is a spi_message composed of 2 spi_transfers: the buffer with the data and a preceding buffer with the SPI access header. Only that certain SPI controllers, such as the spi-sc18is602 I2C-to-SPI bridge, cannot keep the chip select asserted for that long. The spi_max_transfer_size() and spi_max_message_size() functions are how the controller can impose its hardware limitations upon the SPI peripheral driver. For the sja1105 driver to work with these controllers, both buffers must be smaller than the transfer limit, and their sum must be smaller than the message limit. Regression-tested on a switch connected to a controller with no limitations (spi-fsl-dspi) as well as with one with caps for both max_transfer_size and max_message_size (spi-sc18is602). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ca021f0dd85140bc96f1381700bbcab753b74658 Author: Vladimir Oltean Date: Fri May 21 00:16:56 2021 +0300 net: dsa: sja1105: send multiple spi_messages instead of using cs_change The sja1105 driver has been described by Mark Brown as "not using the [ SPI ] API at all idiomatically" due to the use of cs_change: https://patchwork.kernel.org/project/netdevbpf/patch/20210520135031.2969183-1-olteanv@gmail.com/ According to include/linux/spi/spi.h, the chip select is supposed to be asserted for the entire length of a SPI message, as long as cs_change is false for all member transfers. The cs_change flag changes the following: (i) When a non-final SPI transfer has cs_change = true, the chip select should temporarily deassert and then reassert starting with the next transfer. (ii) When a final SPI transfer has cs_change = true, the chip select should remain asserted until the following SPI message. The sja1105 driver only uses cs_change for its first property, to form a single SPI message whose layout can be seen below: this is an entire, single spi_message _______________________________________________________________________________________________ / \ +-------------+---------------+-------------+---------------+ ... +-------------+---------------+ | hdr_xfer[0] | chunk_xfer[0] | hdr_xfer[1] | chunk_xfer[1] | | hdr_xfer[n] | chunk_xfer[n] | +-------------+---------------+-------------+---------------+ ... +-------------+---------------+ cs_change false true false true false false ____________________________ _____________________________ _____________________________ CS line __/ \/ \ ... / \__ The fact of the matter is that spi_max_message_size() has an ambiguous meaning if any non-final transfer has cs_change = true. If the SPI master has a limitation in that it cannot keep the chip select asserted for more than, say, 200 bytes (like the spi-sc18is602), the normal thing for it to do is to implement .max_transfer_size and .max_message_size, and limit both to 200: in the "worst case" where cs_change is always false, then the controller can, indeed, not send messages larger than 200 bytes. But the fact that the SPI controller's max_message_size does not necessarily mean that we cannot send messages larger than that. Notably, if the SPI master special-cases the transfers with cs_change and treats every chip select toggling as an entirely new transaction, then a SPI message can easily exceed that limit. So there is a temptation to ignore the controller's reported max_message_size when using cs_change = true in non-final transfers. But that can lead to false conclusions. As Mark points out, the SPI controller might have a different kind of limitation with the max message size, that has nothing at all to do with how long it can keep the chip select asserted. For example, that might be the case if the device is able to offload the chip select changes to the hardware as part of the data stream, and it packs the entire stream of commands+data (corresponding to a SPI message) into a single DMA transfer that is itself limited in size. So the only thing we can do is avoid ambiguity by not using cs_change at all. Instead of sending a single spi_message, we now send multiple SPI messages as follows: spi_message 0 spi_message 1 spi_message n ____________________________ ___________________________ _____________________________ / \ / \ / \ +-------------+---------------+-------------+---------------+ ... +-------------+---------------+ | hdr_xfer[0] | chunk_xfer[0] | hdr_xfer[1] | chunk_xfer[1] | | hdr_xfer[n] | chunk_xfer[n] | +-------------+---------------+-------------+---------------+ ... +-------------+---------------+ cs_change false true false true false false ____________________________ _____________________________ _____________________________ CS line __/ \/ \ ... / \__ which is clearer because the max_message_size limit is now easier to enforce. What is transmitted on the wire stays, of course, the same. Additionally, because we send no more than 2 transfers at a time, we now avoid dynamic memory allocation too, which might be seen as an improvement by some. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 48e8c6f1612b3d2dccaea2285231def830cc5b8e Author: Peter Geis Date: Thu May 20 12:32:30 2021 -0400 net: phy: add driver for Motorcomm yt8511 phy Add a driver for the Motorcomm yt8511 phy that will be used in the production Pine64 rk3566-quartz64 development board. It supports gigabit transfer speeds, rgmii, and 125mhz clk output. Signed-off-by: Peter Geis Signed-off-by: David S. Miller commit d0d62baa7f505bd4c59cd169692ff07ec49dde37 Author: YueHaibing Date: Wed May 19 10:47:04 2021 +0800 net: xilinx_emaclite: Do not print real IOMEM pointer Printing kernel pointers is discouraged because they might leak kernel memory layout. This fixes smatch warning: drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn: argument 4 to %08lX specifier is cast from pointer Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 78429edfeed8da0562243e876be46d700f9ed13c Author: Guenter Roeck Date: Fri May 21 13:04:57 2021 -0700 misc: xilinx-sdfec: Drop unnecessary NULL check after container_of container_of() only returns NULL if the passed pointer is NULL _and_ if the embedded element is the first element of the structure. Even if that is the case, testing against it is misleading and possibly dangerous because the position of the embedded element may change. In this case, the check is unnecessary since it is known that file->private_data is never NULL for an open file, and container_of() will therefore also never be NULL. Drop the check. Acked-by: Dragan Cvetic Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210521200457.2112041-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit b63866efa10ca5e4497f17eb3e3a03dc6929c49e Author: Heiner Kallweit Date: Wed May 19 18:34:27 2021 +0200 eeprom: ee1004: Let device core handle attribute eeprom Instead of creating/removing the attribute ourselves, just declare the attribute and let the device core handle it. This allows to simplify the code. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/8a6c77f2-f84a-311b-c2b9-21798f690e4d@gmail.com Signed-off-by: Greg Kroah-Hartman commit 46ad057245912fc8a49e18f6f8b57f80ab8d4dc1 Author: Heiner Kallweit Date: Wed May 19 18:33:14 2021 +0200 sysfs: Add helper BIN_ATTRIBUTE_GROUPS New helper BIN_ATTRIBUTE_GROUPS() does the same as ATTRIBUTE_GROUPS(), just for binary attributes. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/e20db248-ed30-cf5d-a37c-b538dceaa5b2@gmail.com Signed-off-by: Greg Kroah-Hartman commit b592d66235f5f7c2191cc0348468b343c17c3977 Author: Bart Van Assche Date: Sun May 9 14:38:17 2021 -0700 scsi: ufs: ufs-exynos: Move definitions from .h to .c In the Linux kernel definitions of data structures should occur in .c files. Hence move the exynos7_uic_attr definition from a .h into a .c file. Additionally, declare exynos_ufs_drvs static. This patch fixes the following two sparse warnings: drivers/scsi/ufs/ufs-exynos.h:248:28: warning: symbol 'exynos_ufs_drvs' was not declared. Should it be static? drivers/scsi/ufs/ufs-exynos.h:250:28: warning: symbol 'exynos7_uic_attr' was not declared. Should it be static? Link: https://lore.kernel.org/r/20210509213817.4348-1-bvanassche@acm.org Cc: Alim Akhtar Cc: Kiwoong Kim Reviewed-by: Alim Akhtar Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit fd03c075e362edc2ad637dfb5b945d304f80efe5 Author: Ruiqi Gong Date: Fri May 14 10:05:48 2021 +0800 drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO Mark DEVICE_ATTR_RO(name) in CACHE_ATTR(name, fmt)'s definition as static to fix the following Sparse tool reports: drivers/base/node.c:239:1: warning: symbol 'dev_attr_line_size' was not declared. Should it be static? drivers/base/node.c:240:1: warning: symbol 'dev_attr_indexing' was not declared. Should it be static? Where dev_attr_{line_size,indexing} are generated by CACHE_ATTR's expansion. Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Link: https://lore.kernel.org/r/20210514020548.32483-1-gongruiqi1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 208012f051636d1ab8b7f7f86d6988d4b39758af Author: Gustavo A. R. Silva Date: Fri May 14 18:08:01 2021 -0500 misc: bcm-vk: 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]. Also, make use of the struct_size() helper in kzalloc(). [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Acked-by: Scott Branden Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210514230801.GA35863@embeddedor Signed-off-by: Greg Kroah-Hartman commit 19d71c2cbe060ca8b7da0a43ee549f8352211155 Author: Rob Herring Date: Thu May 13 12:46:14 2021 -0500 perf tests: Drop __maybe_unused on x86 test declarations Function declarations don't need __maybe_unused annotations, only the implementations do. Drop them on the perf x86 tests. Signed-off-by: Rob Herring Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: masayoshi mizuma Link: http://lore.kernel.org/lkml/20210513174614.2242210-2-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4e277d0d83a5b5aadbe033af3ce7bffbcc51a6fd Author: Rob Herring Date: Thu May 13 12:46:13 2021 -0500 perf tests: Consolidate test__arch_unwind_sample declaration There's no reason for making the test__arch_unwind_sample declaration per arch. Currently that's done 2 different ways either with a declaration in arch-tests.h or with an arch define. Unify all this with an unconditional declaration in tests.h. Signed-off-by: Rob Herring Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: masayoshi mizuma Link: http://lore.kernel.org/lkml/20210513174614.2242210-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit efb0b2328196d78706a2d63c13802f45e8b87090 Author: Song Liu Date: Sun May 9 23:49:17 2021 -0700 perf build: Improve error message for old/missing clang clang is required to build perf with BUILD_BPF_SKEL=1. Improve the error message to highlight that: 1) clang could be either missing or too old; 2) clang is only required with BUILD_BPF_SKEL=1. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Song Liu Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit e33f8fd9fda9730f5a0f27d1a56c69e1228ed907 Author: Linus Walleij Date: Fri May 21 11:48:16 2021 +0200 ARM: dts: Fix up the IXP4xx ethernet nodes All of IXP4xx SoCs has an EthA at 0xc800c000 so move this from the IXP[56]x to the IXP4xx DTSI. Then add the second ethernet port on the Cambria GW2358-4 on EthA. Reported-by: Zoltan HERPAI Signed-off-by: Linus Walleij commit d7eab3df8f39b116d934bc17f8070861e18cfb62 Author: David Gow Date: Fri Apr 16 20:45:53 2021 -0700 Documentation: kunit: Update kunit_tool page The kunit_tool documentation page was pretty minimal, and a bit outdated. Update it and flesh it out a bit. In particular, - Mention that .kunitconfig is now in the build directory - Describe the use of --kunitconfig to specify a different config framgent - Mention the split functionality (i.e., commands other than 'run') - Describe --raw_output and kunit.py parse - Mention the globbing support - Provide a quick overview of other options, including --build_dir and --alltests Note that this does overlap a little with the new running_tips page. I don't think it's a problem having both: this page is supposed to be a bit more of a reference, rather than a list of useful tips, so the fact that they both describe the same features isn't a problem. Signed-off-by: David Gow Reviewed-by: Daniel Latypov Signed-off-by: Shuah Khan commit 11dbc62a73a7da9f3697e8ce83d07503c11dcabb Author: Daniel Latypov Date: Wed Apr 14 15:22:56 2021 -0700 Documentation: kunit: add tips for running KUnit This is long overdue. There are several things that aren't nailed down (in-tree .kunitconfig's), or partially broken (GCOV on UML), but having them documented, warts and all, is better than having nothing. This covers a bunch of the more recent features * kunit_filter_glob * kunit.py run --kunitconfig * slightly more detail on building tests as modules * CONFIG_KUNIT_DEBUGFS By my count, the only headline features now not mentioned are the KASAN integration and KernelCI json output support (kunit.py run --json). And then it also discusses how to get code coverage reports under UML and non-UML since this is a question people have repeatedly asked. Non-UML coverage collection is no different from normal, but we should probably explicitly call this out. As for UML, I was able to get it working again with two small hacks.* E.g. with CONFIG_KUNIT=y && CONFIG_KUNIT_ALL_TESTS=y Overall coverage rate: lines......: 15.1% (18294 of 120776 lines) functions..: 16.8% (1860 of 11050 functions) Note: this doesn't document --alltests since this is not stable yet. Hopefully being run more frequently as part of KernelCI will help... *Using gcc/gcov-6 and not using uml_abort() in os_dump_core(). I've documented these hacks in "Notes" but left TODOs for brendanhiggins@google.com who tracked down the runtime issue in GCC. To be clear: these are not issues specific to KUnit, but rather to UML. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 35c32e3095d396c750f5cdfdaa94cba83d9b23c6 Author: Dan Williams Date: Thu May 20 12:52:20 2021 -0700 cxl/docs: Fix "Title underline too short" warning When "Bus" was renamed to "Core" the header underline update was missed. Reported-by: Stephen Rothwell Fixes: 5f653f7590ab ("cxl/core: Rename bus.c to core.c") Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/162154034053.1995075.17047445540000243300.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit fb05b14c5b99a7a462d6e733155e4b2e80e28646 Author: Greg Kroah-Hartman Date: Fri May 21 20:43:40 2021 +0200 debugfs: remove return value of debugfs_create_ulong() No one checks the return value of debugfs_create_ulong(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Link: https://lore.kernel.org/r/20210521184340.1348539-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 393b06383fb77a006a29eb1574474d468e8c868b Author: Greg Kroah-Hartman Date: Fri May 21 20:45:19 2021 +0200 debugfs: remove return value of debugfs_create_bool() No one checks the return value of debugfs_create_bool(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Link: https://lore.kernel.org/r/20210521184519.1356639-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 1be4ec2456a7d110092ad8cc918eef75b878ec4e Author: Greg Kroah-Hartman Date: Tue May 18 18:16:25 2021 +0200 scsi: snic: debugfs: remove local storage of debugfs files There is no need to keep the dentry around for the debugfs trace files, as we can just look it up when we want to remove it later on. Simplify the structure by removing the dentries and relying on debugfs to find the dentry to remove when we want to. By doing this change, we remove the last in-kernel user that was storing the result of debugfs_create_bool(), so that api can be cleaned up. Cc: Karan Tilak Kumar Cc: Sesidhar Baddela Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Link: https://lore.kernel.org/r/20210518161625.3696996-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 77b98d456d60e2923516903ab2ceb478ea22554c Author: Greg Kroah-Hartman Date: Tue May 18 18:33:04 2021 +0200 b43: don't save dentries for debugfs There is no need to keep around the dentry pointers for the debugfs files as they will all be automatically removed when the subdir is removed. So save the space and logic involved in keeping them around by just getting rid of them entirely. By doing this change, we remove one of the last in-kernel user that was storing the result of debugfs_create_bool(), so that api can be cleaned up. Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Kees Cook Cc: Greg Kroah-Hartman Cc: Jason Gunthorpe Cc: Chao Yu Cc: Leon Romanovsky Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Kalle Valo Link: https://lore.kernel.org/r/20210518163304.3702015-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2435628e5611fe20aa7431fc95214ac0fd087d58 Author: Greg Kroah-Hartman Date: Tue May 18 18:33:09 2021 +0200 b43legacy: don't save dentries for debugfs There is no need to keep around the dentry pointers for the debugfs files as they will all be automatically removed when the subdir is removed. So save the space and logic involved in keeping them around by just getting rid of them entirely. By doing this change, we remove one of the last in-kernel user that was storing the result of debugfs_create_bool(), so that api can be cleaned up. Cc: Larry Finger Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Kalle Valo Link: https://lore.kernel.org/r/20210518163309.3702100-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2100c9b06046a971dcccadcd6281fab578350bb2 Author: Greg Kroah-Hartman Date: Tue May 18 18:17:05 2021 +0200 drm/i915/gvt: remove local storage of debugfs file There is no need to keep the dentry around for the debugfs kvmgt cache file, as we can just look it up when we want to remove it later on. Simplify the structure by removing the dentry and relying on debugfs to find the dentry to remove when we want to. By doing this change, we remove the last in-kernel user that was storing the result of debugfs_create_long(), so that api can be cleaned up. Cc: Zhenyu Wang Cc: Zhi Wang Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: intel-gvt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Zhenyu Wang Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210518161705.3697143-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2ac62268a2c0f2ffafc19a7ced6972a9b1330389 Author: Xiaofei Tan Date: Fri May 21 10:52:38 2021 +0800 tty: hvc_console: Remove the repeated words 'no' and 'from' Remove the repeated words 'no' and 'from', reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1621565558-26118-1-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit f421ed33ee2bddac5857862da3a37f0ea3f197d8 Author: Greg Kroah-Hartman Date: Fri May 21 20:29:38 2021 +0200 Revert "serial: sh-sci: Add support for RZ/G2L SoC" This reverts commit 064b6e47b2b2d4a20566ba6f8dc90e46b599b35f as it wasn't quite ready yet :( Cc: Biju Das CC: Geert Uytterhoeven Reported-by: Lad Prabhakar Signed-off-by: Greg Kroah-Hartman commit 7257fbc7c598617ca71605089264c61636d52157 Author: Badhri Jagan Sridharan Date: Mon May 17 12:21:12 2021 -0700 usb: typec: tcpci: Implement callback for apply_rc APPLY RC is defined as ROLE_CONTROL.CC1 != ROLE_CONTROL.CC2 and POWER_CONTROL.AutodischargeDisconnect is 0. When ROLE_CONTROL.CC1 == ROLE_CONTROL.CC2, set the other CC to OPEN. Fixes: f321a02caebd ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support") Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210517192112.40934-4-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 59d4d06c8ab0375dcc4bab329e6ecd44dd46373e Author: Badhri Jagan Sridharan Date: Mon May 17 12:21:11 2021 -0700 usb: typec: tcpm: Move TCPC to APPLY_RC state during PR_SWAP When vbus auto discharge is enabled, TCPCI based TCPC transitions into Attached.SNK/Attached.SRC state. During PR_SWAP, TCPCI based TCPC would disconnect when partner changes power roles. TCPC has to be moved APPLY RC state during PR_SWAP. This is done by ROLE_CONTROL.CC1 != ROLE_CONTROL.CC2 and POWER_CONTROL.AutodischargeDisconnect is 0. Once the swap sequence is done, AutoDischargeDisconnect is re-enabled. Fixes: f321a02caebd ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support") Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210517192112.40934-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit dea6f87e60d193b2b3e21f9c6d657e53617369da Author: Badhri Jagan Sridharan Date: Mon May 17 12:21:10 2021 -0700 usb: typec: tcpm: Refactor logic to enable/disable auto vbus dicharge The logic to enable vbus auto discharge on disconnect is used in more than one place. Since this is repetitive code, moving this into its own method. Fixes: f321a02caebd ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support") Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210517192112.40934-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit d112efbe6dbf7d4c482e2a3f381fa315aabfe63b Author: Badhri Jagan Sridharan Date: Mon May 17 12:21:09 2021 -0700 usb: typec: tcpm: Fix up PR_SWAP when vsafe0v is signalled During PR_SWAP, When TCPM is in PR_SWAP_SNK_SRC_SINK_OFF, vbus is expected to reach VSAFE0V when source turns off vbus. Do not move to SNK_UNATTACHED state when this happens. Fixes: 28b43d3d746b ("usb: typec: tcpm: Introduce vsafe0v for vbus") Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210517192112.40934-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 56d426146cdfa08dc56cda0d0897af4e5090ffcf Author: Tobias Schramm Date: Fri May 14 17:00:42 2021 +0200 dt-bindings: usb: dwc2: add compatible for RK3308 USB controller The USB controller in the RK3308 is compatible with the RK3066 USB controller. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210514150044.2099298-4-t.schramm@manjaro.org Signed-off-by: Greg Kroah-Hartman commit c9c5f057d0d65a5adc1941ca4cecce28438a105d Author: Johan Hovold Date: Wed May 19 11:33:03 2021 +0200 USB: gadget: drop irq-flags initialisations There's no need to initialise irq-flags variables before saving the interrupt state. Drop the redundant initialisations from drivers that got this wrong. Cc: Li Yang Cc: Felipe Balbi Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210519093303.10789-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8879904b1935a1eafa688eb0d86aff0fa7907afb Author: Johan Hovold Date: Wed May 19 11:33:02 2021 +0200 USB: dwc2: drop irq-flags initialisations There's no need to initialise irq-flags variables before saving the interrupt state. While at it drop two redundant return-value initialisations from two of the functions that got it wrong. Cc: Minas Harutyunyan Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210519093303.10789-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 18538a50239b11f07befa18073e00fda3040195c Author: Johan Hovold Date: Wed May 19 11:33:01 2021 +0200 USB: cdnsp: drop irq-flags initialisations There's no need to initialise irq-flags variables before saving the interrupt state. Cc: Pawel Laszczak Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210519093303.10789-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 77b57218ac2f37da4e8b72e78f002944b9f85091 Author: Jon Hunter Date: Wed May 19 17:35:53 2021 +0100 usb: gadget: tegra-xudc: Use dev_err_probe() Rather than testing if the error code is -EPROBE_DEFER before printing an error message, use dev_err_probe() instead to simplify the code. Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20210519163553.212682-2-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 80a3c7f70e9990ed20634ac1a1c55cfe351be0ea Author: Jon Hunter Date: Wed May 19 17:35:52 2021 +0100 usb: gadget: tegra-xudc: Don't print error on probe deferral The Tegra XUDC driver prints the following error when deferring probe if the USB PHY is not found ... ERR KERN tegra-xudc 3550000.usb: failed to get usbphy-0: -517 Deferring probe can be normal and so update to driver to avoid printing this error if probe is being deferred. Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20210519163553.212682-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit b274e2a44e163461a11e5e19e4ad405062cbf3b4 Author: zuoqilin Date: Fri May 21 17:58:04 2021 +0800 usb: atm: cxacru: Fix typo in comment Change 'contol' to 'control'. Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210521095804.773-1-zuoqilin1@163.com Signed-off-by: Greg Kroah-Hartman commit d369c9187c1897ce5339716354ce47b2c2f67352 Author: Rui Miguel Silva Date: Thu May 13 09:47:17 2021 +0100 usb: isp1763: add peripheral mode Besides the already host mode support add peripheral mode support for the isp1763 IP from the isp1760 family. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-10-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit e7a990e00cb13ce66d4008e3b77e8507be0c2e27 Author: Rui Miguel Silva Date: Thu May 13 09:47:16 2021 +0100 dt-bindings: usb: nxp,isp1760: add bindings The nxp,isp1760 driver is old in the tree, but did not had a bindings entry, since I am extend it to support isp1763 in the same family, use this to add a proper yaml bindings file. Reviewed-by: Rob Herring Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-9-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit 60d789f3bfbb7428e6ba2949de70a6db8e12e8fa Author: Rui Miguel Silva Date: Thu May 13 09:47:15 2021 +0100 usb: isp1760: add support for isp1763 isp1763 have some differences from the isp1760, 8 bit address for registers and 16 bit for values, no bulk access to memory addresses, 16 PTD's instead of 32. Following the regmap work done before add the registers, memory access and add the functions to support differences in setup sequences. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-8-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3eb96e04be9918afa54b64fac943de86a9798bda Author: Rui Miguel Silva Date: Thu May 13 09:47:14 2021 +0100 usb: isp1760: use dr_mode binding There is already a binding to describe the dual role mode (dr_mode), use that instead of defining a new one (port1-otg). Update driver code and devicetree files that use that port1-otg binding. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-7-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit a74f639c5b5618e2c9f311c93bc3e7405de8ca85 Author: Rui Miguel Silva Date: Thu May 13 09:47:13 2021 +0100 usb: isp1760: hcd: refactor mempool config and setup In preparation to support other family member IP, which may have different memory layout. Drop macros and setup a configuration struct. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-6-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit f9a88370e6751c68a8f0d1c3f23100ca20596249 Author: Rui Miguel Silva Date: Thu May 13 09:47:12 2021 +0100 usb: isp1760: remove platform data struct and code Since the removal of the Blackfin port with: commit 4ba66a976072 ("arch: remove blackfin port") No one is using or referencing this header and platform data struct. Remove them. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-5-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit 03e28d5233d50fb2a27fa02d032e77974d03eb2b Author: Rui Miguel Silva Date: Thu May 13 09:47:11 2021 +0100 usb: isp1760: use relaxed primitives Use io relaxed access memory primitives to satisfy strict type checking (__force). This will fix some existing sparse warnings: sparse: warning: cast to restricted __le32 Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-4-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1da9e1c06873350c99ba49a052f92de85f2c69f2 Author: Rui Miguel Silva Date: Thu May 13 09:47:10 2021 +0100 usb: isp1760: move to regmap for register access Rework access to registers and memory to use regmap framework. No change in current feature or way of work is intended with this change. This will allow to reuse this driver with other IP of this family, for example isp1763, with little changes and effort. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-3-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit abfabc8ae3bd625f57fa35d25f2435bb6465a3b1 Author: Rui Miguel Silva Date: Thu May 13 09:47:09 2021 +0100 usb: isp1760: fix strict typechecking There are a lot of pre-existing typechecking warnings around the access and assign of elements of ptd structure of __dw type. sparse: warning: invalid assignment: |= sparse: left side has type restricted __dw sparse: right side has type unsigned int or warning: restricted __dw degrades to integer or sparse: warning: incorrect type in assignment (different base types) sparse: expected restricted __dw [usertype] dw4 sparse: got unsigned int [assigned] [usertype] usof To handle this, annotate conversions along the {TO,FROM}_DW* macros and some assignments and function arguments. This clean up completely all sparse warnings for this driver. Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210513084717.2487366-2-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit 24bb0076d7bc0ea4caf0af55bd0273a1c343748a Author: Zhen Lei Date: Mon May 17 17:40:20 2021 +0800 usb: fix spelling mistakes in header files Fix some spelling mistakes in comments: trasfer ==> transfer consumtion ==> consumption endoint ==> endpoint sharable ==> shareable contraints ==> constraints Auxilary ==> Auxiliary correspondig ==> corresponding interupt ==> interrupt inifinite ==> infinite assignement ==> assignment Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210517094020.7310-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 03effde3a2ea1d82c4dd6b634fc6174545d2c34f Author: Vamshi Krishna Gopal Date: Fri May 21 18:56:32 2021 +0300 ASoC: Intel: sof_sdw: add quirk support for Brya and BT-offload Brya is another ADL-P product. AlderLake has support for Bluetooth audio offload capability. Enable the BT-offload quirk for ADL-P Brya and the Intel RVP. Signed-off-by: Vamshi Krishna Gopal Signed-off-by: Yong Zhi Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521155632.3736393-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c0fbe9fd311a07bd8919e61d412db22e4b08dc43 Author: Vamshi Krishna Gopal Date: Fri May 21 18:56:31 2021 +0300 ASoC: Intel: common: Add entries for sdw codecs in ADL match table RT5682 and Max98373 are added with SDW0,SDW2 links respectively. Signed-off-by: Vamshi Krishna Gopal Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521155632.3736393-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 6306f0431914beaf220634ad36c08234006571d5 Author: Chris Chiu Date: Thu May 20 11:09:50 2021 +0800 ACPI: EC: Make more Asus laptops use ECDT _GPE More ASUS laptops have the _GPE define in the DSDT table with a different value than the _GPE number in the ECDT. This is causing media keys not working on ASUS X505BA/BP, X542BA/BP Add model info to the quirks list. Signed-off-by: Chris Chiu Signed-off-by: Jian-Hong Pan Signed-off-by: Rafael J. Wysocki commit f00d2d32cc6766fdc03ccfc865f08cc081df5b5f Author: Shaokun Zhang Date: Thu May 20 10:39:08 2021 +0800 ACPI: event: Remove redundant initialization of local variable 'error' will be initialized, so clean up the redundant initialization. Signed-off-by: Shaokun Zhang [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 45b10e3e0170b925251464f238420c2b9ea9d998 Author: Gustavo A. R. Silva Date: Mon May 17 18:23:12 2021 -0500 ACPI: sbshc: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a fallthrough warning by simply dropping the empty default case at the bottom. This contributes to the ongoing efforts to globally enable -Wimplicit-fallthrough for Clang. Link: https://github.com/KSPP/linux/issues/115 Suggested-by: Rafael J. Wysocki Link: https://lore.kernel.org/lkml/CAJZ5v0hLYWKX__oZdcCY0D20pNqpw8SkiTPOCNOtpqe--QLp4Q@mail.gmail.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Rafael J. Wysocki commit b9370dceabb7841c5e65ce4ee4405b9db5231fc4 Author: Rafael J. Wysocki Date: Fri May 14 21:08:51 2021 +0200 ACPI: PM / fan: Put fan device IDs into separate header file The ACPI fan device IDs are shared between the fan driver and the device power management code. The former is modular, so it needs to include the table of device IDs for module autoloading and the latter needs that list to avoid attaching the generic ACPI PM domain to fan devices (which doesn't make sense) possibly before the fan driver module is loaded. Unfortunately, that requires the list of fan device IDs to be updated in two places which is prone to mistakes, so put it into a symbol definition in a separate header file so there is only one copy of it in case it needs to be updated again in the future. Fixes: b9ea0bae260f ("ACPI: PM: Avoid attaching ACPI PM domain to certain devices") Signed-off-by: Rafael J. Wysocki commit b7a732a73ac54dbccf14d90779d7e6b70ea0d653 Author: Jon Hunter Date: Fri May 14 16:34:14 2021 +0100 ACPI: APEI: Don't warn if ACPI is disabled If ACPI is not enabled but support for ACPI and APEI is enabled in the kernel, then the following warning is seen on boot ... WARNING KERN EINJ: ACPI disabled. For ARM64 platforms, the 'acpi_disabled' variable is true by default and hence, the above is often seen on ARM64. Given that it can be normal for ACPI to be disabled, make this an informational print rather that a warning. Signed-off-by: Jon Hunter Signed-off-by: Rafael J. Wysocki commit 7e135dc725417ecc0629afb4b3b24457d2a4869d Author: Roberto Sassu Date: Fri May 14 17:27:48 2021 +0200 evm: Pass user namespace to set/remove xattr hooks In preparation for 'evm: Allow setxattr() and setattr() for unmodified metadata', this patch passes mnt_userns to the inode set/remove xattr hooks so that the GID of the inode on an idmapped mount is correctly determined by posix_acl_update_mode(). Signed-off-by: Roberto Sassu Reviewed-by: Christian Brauner Cc: Andreas Gruenbacher Signed-off-by: Mimi Zohar commit 9ff6774b9718d1a72d1b7c580fc579f1d9d7071f Author: Randy Dunlap Date: Mon May 3 09:18:40 2021 -0700 cpufreq: sc520_freq: add 'fallthrough' to one case Quieten an implicit-fallthrough warning in sc520_freq.c: ../drivers/cpufreq/sc520_freq.c: In function 'sc520_freq_get_cpu_frequency': ../include/linux/printk.h:343:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ../drivers/cpufreq/sc520_freq.c:43:3: note: in expansion of macro 'pr_err' pr_err("error: cpuctl register has unexpected value %02x\n", ../drivers/cpufreq/sc520_freq.c:45:2: note: here case 0x01: Fixes: bf6fc9fd2d848 ("[CPUFREQ] AMD Elan SC520 cpufreq driver.") Signed-off-by: Randy Dunlap Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit cdef685be5b4ae55c3959289e72d520402839c29 Author: Roberto Sassu Date: Fri May 14 17:27:47 2021 +0200 evm: Allow xattr/attr operations for portable signatures If files with portable signatures are copied from one location to another or are extracted from an archive, verification can temporarily fail until all xattrs/attrs are set in the destination. Only portable signatures may be moved or copied from one file to another, as they don't depend on system-specific information such as the inode generation. Instead portable signatures must include security.ima. Unlike other security.evm types, EVM portable signatures are also immutable. Thus, it wouldn't be a problem to allow xattr/attr operations when verification fails, as portable signatures will never be replaced with the HMAC on possibly corrupted xattrs/attrs. This patch first introduces a new integrity status called INTEGRITY_FAIL_IMMUTABLE, that allows callers of evm_verify_current_integrity() to detect that a portable signature didn't pass verification and then adds an exception in evm_protect_xattr() and evm_inode_setattr() for this status and returns 0 instead of -EPERM. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 4a804b8a4572dfc81c3a59709d49ae206e4370ba Author: Roberto Sassu Date: Thu May 20 10:48:31 2021 +0200 evm: Introduce evm_hmac_disabled() to safely ignore verification errors When a file is being created, LSMs can set the initial label with the inode_init_security hook. If no HMAC key is loaded, the new file will have LSM xattrs but not the HMAC. It is also possible that the file remains without protected xattrs after creation if no active LSM provided it, or because the filesystem does not support them. Unfortunately, EVM will deny any further metadata operation on new files, as evm_protect_xattr() will return the INTEGRITY_NOLABEL error if protected xattrs exist without security.evm, INTEGRITY_NOXATTRS if no protected xattrs exist or INTEGRITY_UNKNOWN if xattrs are not supported. This would limit the usability of EVM when only a public key is loaded, as commands such as cp or tar with the option to preserve xattrs won't work. This patch introduces the evm_hmac_disabled() function to determine whether or not it is safe to ignore verification errors, based on the ability of EVM to calculate HMACs. If the HMAC key is not loaded, and it cannot be loaded in the future due to the EVM_SETUP_COMPLETE initialization flag, allowing an operation despite the attrs/xattrs being found invalid will not make them valid. Since the post hooks can be executed even when the HMAC key is not loaded, this patch also ensures that the EVM_INIT_HMAC initialization flag is set before the post hooks call evm_update_evmxattr(). Signed-off-by: Roberto Sassu Suggested-by: Mimi Zohar (for ensuring EVM_INIT_HMAC is set) Signed-off-by: Mimi Zohar commit 706c5328851d23dec4d9b433cbf864d900a54edf Author: Giovanni Gherdovich Date: Tue May 18 14:34:13 2021 +0200 cpufreq: intel_pstate: Add Cometlake support in no-HWP mode Users may disable HWP in firmware, in which case intel_pstate wouldn't load unless the CPU model is explicitly supported. See also commit d8de7a44e11f ("cpufreq: intel_pstate: Add Skylake servers support"). Suggested-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Giovanni Gherdovich Signed-off-by: Rafael J. Wysocki commit fbdc21e9b038d00d0d56fa4e0f7701d42ae08f00 Author: Giovanni Gherdovich Date: Tue May 18 14:34:12 2021 +0200 cpufreq: intel_pstate: Add Icelake servers support in no-HWP mode Users may disable HWP in firmware, in which case intel_pstate wouldn't load unless the CPU model is explicitly supported. Add ICELAKE_X to the list of CPUs that can register intel_pstate while not advertising the HWP capability. Without this change, an ICELAKE_X in no-HWP mode could only use the acpi_cpufreq frequency scaling driver. See also commit d8de7a44e11f ("cpufreq: intel_pstate: Add Skylake servers support"). Signed-off-by: Giovanni Gherdovich Signed-off-by: Rafael J. Wysocki commit e3ccfe1ad7d895487977ef64eda3441d16c9851a Author: Roberto Sassu Date: Fri May 14 17:27:45 2021 +0200 evm: Introduce evm_revalidate_status() When EVM_ALLOW_METADATA_WRITES is set, EVM allows any operation on metadata. Its main purpose is to allow users to freely set metadata when it is protected by a portable signature, until an HMAC key is loaded. However, callers of evm_verifyxattr() are not notified about metadata changes and continue to rely on the last status returned by the function. For example IMA, since it caches the appraisal result, will not call again evm_verifyxattr() until the appraisal flags are cleared, and will grant access to the file even if there was a metadata operation that made the portable signature invalid. This patch introduces evm_revalidate_status(), which callers of evm_verifyxattr() can use in their xattr hooks to determine whether re-validation is necessary and to do the proper actions. IMA calls it in its xattr hooks to reset the appraisal flags, so that the EVM status is re-evaluated after a metadata operation. Lastly, this patch also adds a call to evm_reset_status() in evm_inode_post_setattr() to invalidate the cached EVM status after a setattr operation. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 9acc89d31f0c94c8e573ed61f3e4340bbd526d0c Author: Roberto Sassu Date: Fri May 14 17:27:44 2021 +0200 evm: Refuse EVM_ALLOW_METADATA_WRITES only if an HMAC key is loaded EVM_ALLOW_METADATA_WRITES is an EVM initialization flag that can be set to temporarily disable metadata verification until all xattrs/attrs necessary to verify an EVM portable signature are copied to the file. This flag is cleared when EVM is initialized with an HMAC key, to avoid that the HMAC is calculated on unverified xattrs/attrs. Currently EVM unnecessarily denies setting this flag if EVM is initialized with a public key, which is not a concern as it cannot be used to trust xattrs/attrs updates. This patch removes this limitation. Fixes: ae1ba1676b88e ("EVM: Allow userland to permit modification of EVM-protected metadata") Signed-off-by: Roberto Sassu Cc: stable@vger.kernel.org # 4.16.x Signed-off-by: Mimi Zohar commit aa2ead71d9daa1b6645e1d25b1f14a6286b114d0 Author: Roberto Sassu Date: Fri May 14 17:27:43 2021 +0200 evm: Load EVM key in ima_load_x509() to avoid appraisal The public builtin keys do not need to be appraised by IMA as the restriction on the IMA/EVM trusted keyrings ensures that a key can be loaded only if it is signed with a key on the builtin or secondary keyrings. However, when evm_load_x509() is called, appraisal is already enabled and a valid IMA signature must be added to the EVM key to pass verification. Since the restriction is applied on both IMA and EVM trusted keyrings, it is safe to disable appraisal also when the EVM key is loaded. This patch calls evm_load_x509() inside ima_load_x509() if CONFIG_IMA_LOAD_X509 is enabled, which crosses the normal IMA and EVM boundary. Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 9eea2904292c2d8fa98df141d3bf7c41ec9dc1b5 Author: Roberto Sassu Date: Fri May 14 17:27:42 2021 +0200 evm: Execute evm_inode_init_security() only when an HMAC key is loaded evm_inode_init_security() requires an HMAC key to calculate the HMAC on initial xattrs provided by LSMs. However, it checks generically whether a key has been loaded, including also public keys, which is not correct as public keys are not suitable to calculate the HMAC. Originally, support for signature verification was introduced to verify a possibly immutable initial ram disk, when no new files are created, and to switch to HMAC for the root filesystem. By that time, an HMAC key should have been loaded and usable to calculate HMACs for new files. More recently support for requiring an HMAC key was removed from the kernel, so that signature verification can be used alone. Since this is a legitimate use case, evm_inode_init_security() should not return an error when no HMAC key has been loaded. This patch fixes this problem by replacing the evm_key_loaded() check with a check of the EVM_INIT_HMAC flag in evm_initialized. Fixes: 26ddabfe96b ("evm: enable EVM when X509 certificate is loaded") Signed-off-by: Roberto Sassu Cc: stable@vger.kernel.org # 4.5.x Signed-off-by: Mimi Zohar commit eb3693f0521e020dd8617c7fa3ddf5c9f0d8dea0 Author: Rafael J. Wysocki Date: Wed May 12 16:19:30 2021 +0200 cpufreq: intel_pstate: hybrid: CPU-specific scaling factor The scaling factor between HWP performance levels and CPU frequency may be different for different types of CPUs in a hybrid processor and in general the HWP performance levels need not correspond to "P-states" representing values that would be written to MSR_IA32_PERF_CTL if HWP was disabled. However, the policy limits control in cpufreq is defined in terms of CPU frequency, so it is necessary to map the frequency limits set through that interface to HWP performance levels with reasonable accuracy and the behavior of that interface on hybrid processors has to be compatible with its behavior on non-hybrid ones. To address this problem, use the observations that (1) on hybrid processors the sysfs interface can operate by mapping frequency to "P-states" and translating those "P-states" to specific HWP performance levels of the given CPU and (2) the scaling factor between the MSR_IA32_PERF_CTL "P-states" and CPU frequency can be regarded as a known value. Moreover, the mapping between the HWP performance levels and CPU frequency can be assumed to be linear and such that HWP performance level 0 correspond to the frequency value of 0, so it is only necessary to know the frequency corresponding to one specific HWP performance level to compute the scaling factor applicable to all of them. One possibility is to take the nominal performance value from CPPC, if available, and use cpu_khz as the corresponding frequency. If the CPPC capabilities interface is not there or the nominal performance value provided by it is out of range, though, something else needs to be done. Namely, the guaranteed performance level either from CPPC or from MSR_HWP_CAPABILITIES can be used instead, but the corresponding frequency needs to be determined. That can be done by computing the product of the (known) scaling factor between the MSR_IA32_PERF_CTL P-states and CPU frequency (the PERF_CTL scaling factor) and the P-state value referred to as the "TDP ratio". If the HWP-to-frequency scaling factor value obtained in one of the ways above turns out to be euqal to the PERF_CTL scaling factor, it can be assumed that the number of HWP performance levels is equal to the number of P-states and the given CPU can be handled as though this was not a hybrid processor. Otherwise, one more adjustment may still need to be made, because the HWP-to-frequency scaling factor computed so far may not be accurate enough (e.g. because the CPPC information does not match the exact behavior of the processor). Specifically, in that case the frequency corresponding to the highest HWP performance value from MSR_HWP_CAPABILITIES (computed as the product of that value and the HWP-to-frequency scaling factor) cannot exceed the frequency that corresponds to the maximum 1-core turbo P-state value from MSR_TURBO_RATIO_LIMIT (computed as the procuct of that value and the PERF_CTL scaling factor) and the HWP-to-frequency scaling factor may need to be adjusted accordingly. Signed-off-by: Rafael J. Wysocki commit c3d175e4852bfdfd1e4021dff8715fc407dedd98 Author: Rafael J. Wysocki Date: Wed May 12 16:15:48 2021 +0200 cpufreq: intel_pstate: hybrid: Avoid exposing two global attributes The turbo_pct and num_pstates sysfs attributes represent CPU properties that may be different for differenty types of CPUs in a hybrid processor, so avoid exposing them in that case. Signed-off-by: Rafael J. Wysocki commit cf1031ed475244ec33ed8c58a072223231871280 Author: Huilong Deng Date: Fri May 21 22:00:08 2021 +0800 jfs: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Huilong Deng Signed-off-by: Dave Kleikamp commit 577ebd195f95648ca7da29263d5237cdc84a7667 Author: zuoqilin Date: Wed Mar 17 15:10:52 2021 +0800 fs: Fix typo issue Change 'inacitve' to 'inactive'. Signed-off-by: zuoqilin Signed-off-by: Dave Kleikamp commit 70c1fc34f3c67ee8abc363a25803f47bfcec889f Author: Fabien Parent Date: Thu May 20 13:16:56 2021 +0200 dt-bindings: rng: mediatek: add mt8365 to mtk rng binding Add RNG binding for MT8365 SoC. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210520111656.66017-2-fparent@baylibre.com Signed-off-by: Rob Herring commit 1a60317bc83f51ac6bca53f9551945971cf4a5d2 Author: Fabien Parent Date: Thu May 20 13:16:55 2021 +0200 dt-bindings: rng: mediatek: convert to yaml schema Convert the RNG binding for MediaTek to use YAML schema. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210520111656.66017-1-fparent@baylibre.com Signed-off-by: Rob Herring commit 91d594b2db51f680ba52862d1bbe14801b4dcd54 Author: Alexandru Ardelean Date: Fri May 14 12:41:08 2021 +0300 gpio: tps68470: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 20a3e534905184263577910c04a3f14af06f68fd Author: Lee Jones Date: Thu May 20 13:02:48 2021 +0100 drm/amd/amdgpu/smuio_v13_0: Realign 'smuio_v13_0_is_host_gpu_xgmi_supported()' header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c:99: warning: expecting prototype for smuio_v13_0_supports_host_gpu_xgmi(). Prototype was for smuio_v13_0_is_host_gpu_xgmi_supported() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f18939021a367e80e06c4ba1390ebc0bdbdd7a20 Author: Lee Jones Date: Thu May 20 13:02:47 2021 +0100 drm/amd/amdgpu/gfx_v10_0: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:51: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 29ec545844a05ece11ffe6157e5c030b35a1d620 Author: Lee Jones Date: Thu May 20 13:02:46 2021 +0100 drm/amd/amdgpu/vcn_v1_0: Fix some function naming disparity Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:775: warning: expecting prototype for vcn_v1_0_start(). Prototype was for vcn_v1_0_start_spg_mode() instead drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1111: warning: expecting prototype for vcn_v1_0_stop(). Prototype was for vcn_v1_0_stop_spg_mode() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit ef6f76407cd7796bdeec31305c435162ab54c030 Author: Lee Jones Date: Thu May 20 13:02:45 2021 +0100 drm/amd/amdgpu/sdma_v5_2: Repair typo in function name Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:501: warning: expecting prototype for sdma_v_0_ctx_switch_enable(). Prototype was for sdma_v5_2_ctx_switch_enable() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1c7f15c7006cb48a80d812a98c34748eaa571aad Author: Lee Jones Date: Thu May 20 13:02:44 2021 +0100 drm/amd/amdgpu/amdgpu_vce: Fix a few incorrectly named functions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:98: warning: expecting prototype for amdgpu_vce_init(). Prototype was for amdgpu_vce_sw_init() instead drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:214: warning: expecting prototype for amdgpu_vce_fini(). Prototype was for amdgpu_vce_sw_fini() instead drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:590: warning: expecting prototype for amdgpu_vce_cs_validate_bo(). Prototype was for amdgpu_vce_validate_bo() instead drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:724: warning: expecting prototype for amdgpu_vce_cs_parse(). Prototype was for amdgpu_vce_ring_parse_cs() instead drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:960: warning: expecting prototype for amdgpu_vce_cs_parse_vm(). Prototype was for amdgpu_vce_ring_parse_cs_vm() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8d55be744b45aea4aa767905486b66978215ca1c Author: Lee Jones Date: Thu May 20 13:02:43 2021 +0100 drm/amd/amdgpu/sdma_v5_0: Fix typo in function name Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:563: warning: expecting prototype for sdma_v_0_ctx_switch_enable(). Prototype was for sdma_v5_0_ctx_switch_enable() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 47a6c67648cb7322b9825423c50f47aaebbfd2b4 Author: Lee Jones Date: Thu May 20 13:02:42 2021 +0100 drm/amd/amdgpu/sdma_v4_0: Realign functions with their headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:764: warning: expecting prototype for sdma_v4_0_page_ring_set_wptr(). Prototype was for sdma_v4_0_ring_set_wptr() instead drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:830: warning: expecting prototype for sdma_v4_0_ring_set_wptr(). Prototype was for sdma_v4_0_page_ring_set_wptr() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9f88be53c8ec4950c9a081d1aef8a5165d9efae6 Author: Lee Jones Date: Thu May 20 13:02:41 2021 +0100 drm/amd/amdgpu/sdma_v2_4: Correct misnamed function 'sdma_v2_4_ring_emit_hdp_flush()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c:281: warning: expecting prototype for sdma_v2_4_hdp_flush_ring_emit(). Prototype was for sdma_v2_4_ring_emit_hdp_flush() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5a2ec861b8ae98bf6e7a9d488ca9adeadc2a57e8 Author: Lee Jones Date: Thu May 20 13:02:40 2021 +0100 drm/amd/amdgpu/gfx_v9_4_2: Mark functions called by reference as static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:1008:5: warning: no previous prototype for ‘gfx_v9_4_2_query_ras_error_count’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:1054:6: warning: no previous prototype for ‘gfx_v9_4_2_reset_ras_error_count’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:1063:5: warning: no previous prototype for ‘gfx_v9_4_2_ras_error_inject’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:1133:6: warning: no previous prototype for ‘gfx_v9_4_2_query_ras_error_status’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:1143:6: warning: no previous prototype for ‘gfx_v9_4_2_reset_ras_error_status’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:1153:6: warning: no previous prototype for ‘gfx_v9_4_2_enable_watchdog_timer’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 463e2989977a123fd3451fb5161c252d49a6a39f Author: Lee Jones Date: Thu May 20 13:02:39 2021 +0100 drm/radeon/r100: Realign doc header with function 'r100_cs_packet_parse_vline()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/r100.c:1423: warning: expecting prototype for r100_cs_packet_next_vline(). Prototype was for r100_cs_packet_parse_vline() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2cce318c3b3b99df5a799a5295ae179a47ee060a Author: Lee Jones Date: Thu May 20 13:02:36 2021 +0100 drm/amd/amdgpu/gmc_v10_0: Fix potential copy/paste issue Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c:955: warning: expecting prototype for gmc_v8_0_gart_fini(). Prototype was for gmc_v10_0_gart_fini() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5f7d8ee71e1fd230c9548859b113dc7c8aac88ac Author: Lee Jones Date: Thu May 20 13:02:34 2021 +0100 drm/amd/amdgpu/mmhub_v9_4: Fix naming disparity with 'mmhub_v9_4_set_fault_enable_default()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c:446: warning: expecting prototype for mmhub_v1_0_set_fault_enable_default(). Prototype was for mmhub_v9_4_set_fault_enable_default() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 9f7724f0888e4f53f7fe0fa17407149412424374 Author: Lee Jones Date: Thu May 20 13:02:33 2021 +0100 drm/amd/amdgpu/gmc_v7_0: Fix potential copy/paste issue Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:526: warning: expecting prototype for gmc_v8_0_set_fault_enable_default(). Prototype was for gmc_v7_0_set_fault_enable_default() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d34c42d442354360dd71a3afc059178c34857be3 Author: Lee Jones Date: Thu May 20 13:02:31 2021 +0100 drm/amd/include/aldebaran_ip_offset: Mark top-level IP_BASE as __maybe_unused Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:259:29: warning: ‘XGMI2_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:252:29: warning: ‘XGMI1_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:245:29: warning: ‘XGMI0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:238:29: warning: ‘WAFL1_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:231:29: warning: ‘WAFL0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:161:29: warning: ‘PCIE0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:119:29: warning: ‘L2IMU0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:112:29: warning: ‘L1IMUPCIE0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:105:29: warning: ‘L1IMUIOAGR0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:98:29: warning: ‘IOHC0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:91:29: warning: ‘IOAPIC0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:84:29: warning: ‘IOAGR0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:63:29: warning: ‘FUSE_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:49:29: warning: ‘DBGU_IO0_BASE’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../include/aldebaran_ip_offset.h:42:29: warning: ‘CLK_BASE’ defined but not used [-Wunused-const-variable=] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 52456b426b6525ff6b8ab3a0b21a257995880272 Author: Lee Jones Date: Thu May 20 13:02:30 2021 +0100 drm/radeon/radeon_vm: Fix function naming disparities Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_vm.c:61: warning: expecting prototype for radeon_vm_num_pde(). Prototype was for radeon_vm_num_pdes() instead drivers/gpu/drm/radeon/radeon_vm.c:642: warning: expecting prototype for radeon_vm_update_pdes(). Prototype was for radeon_vm_update_page_directory() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 5ce27057604168a53ce47bd73c426e3a03b9a1ba Author: Lee Jones Date: Thu May 20 13:02:29 2021 +0100 drm/radeon/cik: Fix incorrectly named function 'cik_irq_suspend()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/cik.c:7450: warning: expecting prototype for cik_irq_disable(). Prototype was for cik_irq_suspend() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f72c26fcc33030ed745b7cbe78096410a2f57416 Author: Lee Jones Date: Thu May 20 13:02:27 2021 +0100 drm/amd/amdgpu/dce_v6_0: Repair function name of 'si_get_number_of_dram_channels()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:468: warning: expecting prototype for cik_get_number_of_dram_channels(). Prototype was for si_get_number_of_dram_channels() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 57f671cd2caf0a8b034d809c46fa2ece9a757482 Author: Lee Jones Date: Thu May 20 13:02:26 2021 +0100 drm/amd/amdgpu/si_dma: Fix some function name disparity Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/si_dma.c:320: warning: expecting prototype for cik_dma_vm_copy_pte(). Prototype was for si_dma_vm_copy_pte() instead drivers/gpu/drm/amd/amdgpu/si_dma.c:412: warning: expecting prototype for si_dma_pad_ib(). Prototype was for si_dma_ring_pad_ib() instead drivers/gpu/drm/amd/amdgpu/si_dma.c:425: warning: expecting prototype for cik_sdma_ring_emit_pipeline_sync(). Prototype was for si_dma_ring_emit_pipeline_sync() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit acf69d930457ca0752a5d2264633123f58946fe8 Author: Lee Jones Date: Thu May 20 13:02:24 2021 +0100 drm/amd/amdgpu/gfx_v7_0: Repair function names in the documentation Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2126: warning: expecting prototype for gfx_v7_0_ring_emit_hdp(). Prototype was for gfx_v7_0_ring_emit_hdp_flush() instead drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:2262: warning: expecting prototype for gfx_v7_0_ring_emit_ib(). Prototype was for gfx_v7_0_ring_emit_ib_gfx() instead drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:3207: warning: expecting prototype for gfx_v7_0_ring_emit_vm_flush(). Prototype was for gfx_v7_0_ring_emit_pipeline_sync() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 094b457bcbe439da19283d8c45acd1874ae2abce Author: Lee Jones Date: Thu May 20 13:02:23 2021 +0100 drm/amd/amdgpu/cik_sdma: Fix a few incorrectly named functions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/cik_sdma.c:735: warning: expecting prototype for cik_sdma_vm_copy_pages(). Prototype was for cik_sdma_vm_copy_pte() instead drivers/gpu/drm/amd/amdgpu/cik_sdma.c:762: warning: expecting prototype for cik_sdma_vm_write_pages(). Prototype was for cik_sdma_vm_write_pte() instead drivers/gpu/drm/amd/amdgpu/cik_sdma.c:792: warning: expecting prototype for cik_sdma_vm_set_pages(). Prototype was for cik_sdma_vm_set_pte_pde() instead drivers/gpu/drm/amd/amdgpu/cik_sdma.c:814: warning: expecting prototype for cik_sdma_vm_pad_ib(). Prototype was for cik_sdma_ring_pad_ib() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Evan Quan Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 590a74c6d183477f67424f72b39142580bd279fc Author: Lee Jones Date: Thu May 20 13:02:22 2021 +0100 drm/amd/amdgpu/amdgpu_gmc: Fix a little naming related doc-rot Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:487: warning: expecting prototype for amdgpu_tmz_set(). Prototype was for amdgpu_gmc_tmz_set() instead drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:533: warning: expecting prototype for amdgpu_noretry_set(). Prototype was for amdgpu_gmc_noretry_set() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit e72d4a8b08f88942b31d0acfb32998464efe3b3b Author: Lee Jones Date: Thu May 20 13:02:21 2021 +0100 drm/amd/amdgpu/amdgpu_debugfs: Fix a couple of misnamed functions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1004: warning: expecting prototype for amdgpu_debugfs_regs_gfxoff_write(). Prototype was for amdgpu_debugfs_gfxoff_write() instead drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1053: warning: expecting prototype for amdgpu_debugfs_regs_gfxoff_status(). Prototype was for amdgpu_debugfs_gfxoff_read() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c4cd63f952f949ec3b3b2527ba98b9ef97bdc855 Author: Lee Jones Date: Thu May 20 13:02:20 2021 +0100 drm/amd/amdgpu/amdgpu_ids: Correct some function name disparity Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:200: warning: expecting prototype for amdgpu_vm_grab_idle(). Prototype was for amdgpu_vmid_grab_idle() instead drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:272: warning: expecting prototype for amdgpu_vm_grab_reserved(). Prototype was for amdgpu_vmid_grab_reserved() instead drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:337: warning: expecting prototype for amdgpu_vm_grab_used(). Prototype was for amdgpu_vmid_grab_used() instead drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:410: warning: expecting prototype for amdgpu_vm_grab_id(). Prototype was for amdgpu_vmid_grab() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3ffa59a01c2676edd8c343cf82f1f2e5cf8d277a Author: Lee Jones Date: Thu May 20 13:02:13 2021 +0100 drm/radeon/radeon_cs: Fix incorrectly documented function 'radeon_cs_parser_fini' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_cs.c:417: warning: expecting prototype for cs_parser_fini(). Prototype was for radeon_cs_parser_fini() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 223ce1d55cf9c311c4a3daa066bb58eff3388a3f Author: James Zhu Date: Wed May 19 12:08:20 2021 -0400 drm/amdgpu/jpeg3: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 4271bf11bd5f833e9f3bb4c7b84628977e0e704f Author: James Zhu Date: Wed May 19 12:04:38 2021 -0400 drm/amdgpu/jpeg2.5: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 210d1637d32c6804dff5766fe6279c430a703ca1 Author: James Zhu Date: Wed May 19 11:42:48 2021 -0400 drm/amdgpu/jpeg2.0: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 41884cdda653d8a20a99b5d6f321c496cb377690 Author: James Zhu Date: Mon May 17 16:39:17 2021 -0400 drm/amdgpu/vcn3: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit aef06d2b1b8c2181c6d5890b56c00ad5b31eb22f Author: James Zhu Date: Wed May 19 11:40:39 2021 -0400 drm/amdgpu/vcn2.5: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 386061cd99c1d5cf268b954065d05db15214d4ff Author: James Zhu Date: Wed May 19 11:26:32 2021 -0400 drm/amdgpu/vcn2.0: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit f55c0d65270a5e809b328f4cf90b52d157f3d1c5 Author: James Zhu Date: Tue May 18 10:58:22 2021 -0400 drm/amdgpu/vcn1: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 9f04eb7acffd125a961cc5f16e4d6f43ae0e6367 Author: Peng Ju Zhou Date: Wed Apr 28 15:41:25 2021 +0800 drm/amdgpu: Skip the program of MMMC_VM_AGP_* in SRIOV KMD should not program these registers, the value were defined in the host, so skip them in the SRIOV environment. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f5e25a83c1e204a19e7288c3474abb5469fa24b0 Author: pengzhou Date: Wed Nov 18 15:56:23 2020 +0800 drm/amdgpu: Modify MMHUB register access from MMIO to RLCG in file mmhub_v2* In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: pengzhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6ba3f59eb4d928b6336112a2c70b4c51600b0f0a Author: Peng Ju Zhou Date: Fri Apr 23 13:42:01 2021 +0800 drm/amdgpu: Modify GC register access from MMIO to RLCG in file amdgpu_gmc.c In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f2958a8b87745d707cc7cebf10ac09aa450bf8b7 Author: Peng Ju Zhou Date: Fri Apr 23 13:13:41 2021 +0800 drm/amdgpu: Modify GC register access from MMIO to RLCG in file nv.c In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7373fc5e2ee4d6e66398ca29ff4264c1ece0007a Author: Peng Ju Zhou Date: Fri Nov 27 17:27:16 2020 +0800 drm/amdgpu: Modify GC register access from MMIO to RLCG in file sdma_v5* In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a9dc23bee25378be306d5b9b83f2e731db89128c Author: Peng Ju Zhou Date: Thu Apr 22 11:25:42 2021 +0800 drm/amdgpu: Modify GC register access from MMIO to RLCG in file soc15.c In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d697f3d8b9f16e640875950ccae3f2979b49eb85 Author: Peng Ju Zhou Date: Thu Apr 22 11:14:51 2021 +0800 drm/amdgpu: Modify GC register access from MMIO to RLCG in file kfd_v10* In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit cda722d2a8b23f7b4cb7fdd408c8a79c86d9b0f9 Author: Peng Ju Zhou Date: Wed Apr 21 18:15:39 2021 +0800 drm/amdgpu: Modify GC register access from MMIO to RLCG in file gfx_v10* In SRIOV environment, KMD should access GC registers with RLCG if GC indirect access flag enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a5504e9ad48ac523afffba417e5a77d5c09af003 Author: Peng Ju Zhou Date: Fri May 14 14:26:46 2021 +0800 drm/amdgpu: Indirect register access for Navi12 sriov This patch series are used for GC/MMHUB(part)/IH_RB_CNTL indirect access in the SRIOV environment. There are 4 bits, controlled by host, to control if GC/MMHUB(part)/IH_RB_CNTL indirect access enabled. (one bit is master bit controls other 3 bits) For GC registers, changing all the register access from MMIO to RLC and use RLC as the default access method in the full access time. For partial MMHUB registers, changing their access from MMIO to RLC in the full access time, the remaining registers keep the original access method. For IH_RB_CNTL register, changing it's access from MMIO to PSP. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9256e54209f520aabc8853e70e05139b6b30bee3 Author: Chengming Gui Date: Fri May 14 15:58:17 2021 +0800 drm/amd/pm: Update PPTable struct for beige_goby Update PPTable structure since SMC#73.9/IFWI-XXX.013 Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Reviewed-by: jiansong Chen Signed-off-by: Alex Deucher commit 8200b1cd85bb3a129a2fa6c21aa78ad9c89be3c7 Author: Kevin Wang Date: Wed May 19 11:03:11 2021 +0800 drm/amdkfd: correct sienna_cichlid SDMA RLC register offset error 1.correct KFD SDMA RLC queue register offset error. (all sdma rlc register offset is base on SDMA0.RLC0_RLC0_RB_CNTL) 2.HQD_N_REGS (19+6+7+12) 12: the 2 more resgisters than navi1x (SDMAx_RLCy_MIDCMD_DATA{9,10}) the patch also can be fixed NULL pointer issue when read /sys/kernel/debug/kfd/hqds on sienna_cichlid chip. Signed-off-by: Kevin Wang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 78842457127d060296c46cbe0ab5062965b0fa24 Author: David M Nieto Date: Mon May 17 20:55:00 2021 -0700 drm/amdgpu/pm: display vcn pp dpm (v4) Enable displaying DPM levels for VCN clocks in swsmu supported ASICs v2: removed set functions for navi, renoir v3: removed set function from arcturus v4: added missing defines in drm_table and remove uneeded goto label in navi10_ppt.c Signed-off-by: David M Nieto Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 61e2d322b8c4a66ef93a00e0bbbdc72270884ba5 Author: David M Nieto Date: Fri May 14 13:50:13 2021 -0700 drm/amdgpu/pm: add new fields for Navi1x (v3) Fill voltage fields in metrics table v2: Removed dpm and freq ranges info v3: Added check to ensure volrage offset is not zero Signed-off-by: David M Nieto Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 0b7db431e352e090bfcd074ec35c8bba0a1cc9a1 Author: David M Nieto Date: Fri May 14 13:36:26 2021 -0700 drm/amdgpu/pm: Update metrics table (v2) v2: removed static dpm and frequency ranges from table expand metrics table with voltages and frequency ranges Signed-off-by: David M Nieto Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit b804a75d22cb283ac1a96c7867b6576d6fca8235 Author: Evan Quan Date: Tue May 18 09:01:47 2021 +0800 drm/amd/pm: correct MGpuFanBoost setting No MGpuFanBoost setting for those ASICs which do not support it. Otherwise, it may breaks their fan control feature. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1580 Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d2aa1356834d845ffdac0d8c01b58aa60d1bdc65 Author: Aurabindo Pillai Date: Wed May 19 16:51:01 2021 -0400 drm/amd/display: take dc_lock in short pulse handler only [Why] Conditions that end up modifying the global dc state must be locked. However, during mst allocate payload sequence, lock is already taken. With StarTech 1.2 DP hub, we get an HPD RX interrupt for a reason other than to indicate down reply availability right after sending payload allocation. The handler again takes dc lock before calling the dc's HPD RX handler. Due to this contention, the DRM thread which waits for MST down reply never gets a chance to finish its waiting successfully and ends up timing out. Once the lock is released, the hpd rx handler fires and goes ahead to read from the MST HUB, but now its too late and the HUB doesnt lightup all displays since DRM lacks error handling when payload allocation fails. [How] Take lock only if there is a change in link status or if automated test pattern bit is set. The latter fixes the null pointer dereference when running certain DP Link Layer Compliance test. Fixes: c8ea79a8a276 ("drm/amd/display: NULL pointer error during compliance test") Signed-off-by: Aurabindo Pillai Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit be22db77dc50be6d9cf2b20ab689706c9031c054 Author: Takashi Iwai Date: Thu May 20 14:37:42 2021 +0200 ALSA: usb-audio: Fix uninitialized variable at __uac_clock_find_source() The cur variable indicating the currently selected clock source can be theoretically used as uninitialized after the recent commit 481f17c41803 ("ALSA: usb-audio: Handle error for the current selector gracefully"). For addressing it, initialize it before use. Also, one place seems setting 0 to a wrong variable ret, instead of cur; otherwise it makes little sense. Since the initialization is done beforehand, we can get rid of this line, too. Fixes: 481f17c41803 ("ALSA: usb-audio: Handle error for the current selector gracefully") Reported-by: Colin Ian King Link: https://lore.kernel.org/r/4b261d68-f53f-240d-2d8a-2f88b337849d@canonical.com Link: https://lore.kernel.org/r/s5hfsyhh97t.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit cb4920cc40f630b5a247f4ed7d3dea66749df588 Author: Imre Deak Date: Thu May 13 00:28:09 2021 +0300 drm/i915: Reenable LTTPR non-transparent LT mode for DPCD_REV<1.4 The driver currently disables the LTTPR non-transparent link training mode for sinks with a DPCD_REV<1.4, based on the following description of the LTTPR DPCD register range in DP standard 2.0 (at the 0xF0000 register description): "" LTTPR-related registers at DPCD Addresses F0000h through F02FFh are valid only for DPCD r1.4 (or higher). """ The transparent link training mode should still work fine, however the implementation for this in some retimer FWs seems to be broken, see the References: link below. After discussions with DP standard authors the above "DPCD r1.4" does not refer to the DPCD revision (stored in the DPCD_REV reg at 0x00000), rather to the "LTTPR field data structure revision" stored in the 0xF0000 reg. An update request has been filed at vesa.org (see wg/Link/documentComment/3746) for the upcoming v2.1 specification to clarify the above description along the following lines: """ LTTPR-related registers at DPCD Addresses F0000h through F02FFh are valid only for LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV 1.4 (or higher) """ Based on my tests Windows uses the non-transparent link training mode for DPCD_REV==1.2 sinks as well (so presumably for all DPCD_REVs), and forcing it to use transparent mode on ICL/TGL platforms leads to the same LT failure as reported at the References: link. Based on the above let's assume that the transparent link training mode is not well tested/supported and align the code to the correct interpretation of what the r1.4 version refers to. Reported-and-tested-by: Casey Harkins Tested-by: Khaled Almahallawy References: https://gitlab.freedesktop.org/drm/intel/-/issues/3415 Fixes: 264613b406eb ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4") Cc: # v5.11+ Signed-off-by: Imre Deak Reviewed-by: Khaled Almahallawy Link: https://patchwork.freedesktop.org/patch/msgid/20210512212809.1234701-1-imre.deak@intel.com commit 17cd3a106e9762cd97883cce884a8bfcf5a476ad Author: Johan Hovold Date: Wed May 19 11:20:06 2021 +0200 USB: serial: drop irq-flags initialisations There's no need to initialise irq-flags variables before saving the interrupt state. Drop the redundant initialisations from the three drivers that got this wrong. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 661867161f63bc5cc22b0d1e8ea59a682779a0ef Author: Johan Hovold Date: Wed May 19 11:20:05 2021 +0200 USB: serial: mos7840: drop buffer-callback return-value comments The driver write_room and chars_in_buffer callbacks used to incorrectly return a negative errno in case they were called with a NULL port driver-data pointer or if some other always-true sanity checks failed. The bogus sanity checks were later removed by commit ce039bd4b21f ("USB: serial: mos7840: drop paranoid port checks") and 7b2faede671a ("USB: serial: mos7840: drop port driver data accessors") but the function-header comments were never updated to match. Drop the outdated return-value comments. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 683c5cfa5d1c050c698654e9bb13b12c8e60e174 Author: Johan Hovold Date: Wed May 19 11:20:04 2021 +0200 USB: serial: mos7720: drop buffer-callback sanity checks The driver write_room and chars_in_buffer callbacks used to incorrectly return a negative errno in case they were ever called with a NULL port driver-data pointer. The return value was later changed to zero by commit 23198fda7182 ("tty: fix chars_in_buffers") but the bogus sanity checks were left in place as were the outdated function-header comments. The port driver data isn't cleared until after the port has been deregistered and all open ttys have been hung up so drop the unnecessary sanity checks and the outdated comments. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 9a8253a7c2da1d78183029a46bf04fb7beb933eb Author: Johan Hovold Date: Wed May 19 11:20:03 2021 +0200 USB: serial: io_edgeport: drop buffer-callback sanity checks The driver write_room and chars_in_buffer callbacks used to incorrectly return a negative errno in case they were called while or after the port had been closed. The return value was later changed to zero by commit d76f2f4462bb ("io_edgeport: Fix various bogus returns to the tty layer") but the bogus sanity checks were left in place as were the outdated function-header comments. These callbacks will never be called for an uninitialised port so drop the unnecessary sanity checks and the outdated comments. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit dcbc0ae4f8fcdd4c873e7a9bac49ab84b0453813 Author: Johan Hovold Date: Wed May 19 11:20:02 2021 +0200 USB: serial: digi_acceleport: add chars_in_buffer locking Both the dp_write_urb_in_use flag and dp_out_buf_len counter should be accessed while holding the driver port lock. Add the missing locking to chars_in_buffer and clean up the implementation somewhat by using a common exit path. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 3aed3af202aa2f8246d07875809b9bc07a02131b Author: Johan Hovold Date: Wed May 19 11:20:01 2021 +0200 USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting Due to an ancient quirk in n_tty poll implementation, the digi_acceleport driver has been reporting that its queue contains 256 (WAKEUP_CHARS) characters whenever its write URB is in use. This has not been necessary since 2003 when the line-discipline started taking the write room into account so let's return the maximum transfer size again in order to over-report a little less and incidentally fix the related debug statement. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 21dde316cac7e603d9b587640155cb7841a820f3 Author: Alexandru Ardelean Date: Fri May 14 12:26:14 2021 +0300 gpio: bd9571mwv: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit aa93b0f39a079cc5582df6a016f08ba14469a19b Author: Alexandru Ardelean Date: Fri May 14 12:20:17 2021 +0300 gpio: altera-a10sr: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit 6681db5ef540bc47a654c8d85d27042626edc6f8 Author: Alexandru Ardelean Date: Fri May 14 11:56:27 2021 +0300 gpio: adp5520: cleanup probe error path + remove platform_set_drvdata() The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. This also means that the 'err' label can be removed and all goto statements replaced with direct returns (with error codes). Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit ec5aa31bbed6ca153b47f60af0d21032296b04ad Author: Alexandru Ardelean Date: Fri May 14 11:55:00 2021 +0300 gpio: visconti: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Bartosz Golaszewski commit afccc0bbab594bf70f950eea19b60737e763b192 Author: wengjianfeng Date: Thu Apr 8 12:07:31 2021 +0200 media: dvb-frontends: remove redundant words and fix several typos change 'purpous' to 'purpose'. change 'frequecy' to 'frequency'. remove redundant words struct and enum. Signed-off-by: wengjianfeng Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ca8519ddc4d7e27d941a50e310a0f6bcfafdc8a9 Author: Ye Bin Date: Fri Apr 9 11:51:44 2021 +0200 media: siano: use DEFINE_MUTEX() for mutex lock and LIST_HEAD for list head mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). list head can be initialized automatically with LIST_HEAD() rather than explicitly calling INIT_LIST_HEAD(). Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 52518e513d6dbb71a9cd8f7a1b83b76fe6f8709c Author: Arnd Bergmann Date: Wed Apr 21 15:58:41 2021 +0200 media: rc: clean up Kconfig dependencies I came across a randconfig build failure from one driver that only depends on CONFIG_USB_ARCH_HAS_HCD but fails when built without CONFIG_USB: ld: drivers/media/rc/ir_toy.o: in function `irtoy_disconnect': ir_toy.c:(.text+0x24): undefined reference to `usb_kill_urb' ld: ir_toy.c:(.text+0x2c): undefined reference to `usb_free_urb' ld: ir_toy.c:(.text+0x34): undefined reference to `usb_kill_urb' ld: ir_toy.c:(.text+0x3c): undefined reference to `usb_free_urb' Upon a closer look, I find that a lot of the other drivers 'select USB' rather than stating 'depends on USB' as is common for most subsystems. I also find that all except one driver have an extra 'depends on RC_CORE' that is already implied by the top-level 'if RC_CORE' check. Clean up both by reducing the dependencies to the required set. Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 58c08df5751d823332ccdb49f1d5795479097119 Author: Arnd Bergmann Date: Wed Apr 21 15:58:40 2021 +0200 media: rc: remove tango ir driver and keymap The tango platform was removed, so the driver is no longer needed. Cc: Marc Gonzalez Acked-by: Rob Herring Acked-by: Mans Rullgard Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 12ccb76280f8c0c07794fa68f83286b934981ca5 Author: Sean Young Date: Tue Apr 13 11:40:17 2021 +0200 media: lirc: remove out of date comment This file has been updated many times since 2010. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9e23bf6b00fd060d9a6fdf8a43f427d09992a21d Author: Andy Shevchenko Date: Tue May 18 15:09:17 2021 +0300 gpiolib: Use sysfs_emit() in "show" functions The sysfs_emit() function was introduced to make it less ambiguous which function is preferred when writing to the output buffer in a "show" callback [1]. Convert the GPIO library sysfs interface from sprintf() to sysfs_emit() accordingly, as the latter is aware of the PAGE_SIZE buffer and correctly returns the number of bytes written into the buffer. No functional change intended. [1] Documentation/filesystems/sysfs.rst Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit fd80b8ba3aa5340a0bbfdc4b72bb6a2111cd54bf Author: Andy Shevchenko Date: Tue May 18 11:46:19 2021 +0300 gpiolib: Make use of assign_bit() API (part 2) We have for some time the assign_bit() API to replace open coded if (foo) set_bit(n, bar); else clear_bit(n, bar); Use this API in GPIO library code. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit d9eb95845dc830365a4a0caeb11c4ea8030eecd2 Author: Juerg Haefliger Date: Mon May 17 11:58:37 2021 +0200 uio: Remove leading spaces in Kconfig Remove leading spaces before tabs in Kconfig file(s) by running the following command: $ find drivers/uio -name 'Kconfig*' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Juerg Haefliger Link: https://lore.kernel.org/r/20210517095837.81783-1-juergh@canonical.com Signed-off-by: Greg Kroah-Hartman commit c999fbbdcf778c2ea77f59e26d7448a1ab8fa8a2 Author: Luiz Sampaio Date: Wed May 19 19:30:46 2021 -0300 w1: ds2438: support for writing to offset register Added a sysfs entry to support writing to the offset register on page1. This register is used to calibrate the chip canceling offset errors in the current ADC. This means that, over time, reading the IAD register will not return the correct current measurement, it will have an offset. Writing to the offset register if the two's complement of the current register while passing zero current to the load will calibrate the measurements. This change was tested on real hardware and it was able to calibrate the chip correctly. Signed-off-by: Luiz Sampaio Link: https://lore.kernel.org/r/20210519223046.13798-7-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman commit fd6ec5d79507f99639c94f107e8a98550c9e1cf6 Author: Luiz Sampaio Date: Wed May 19 19:30:45 2021 -0300 w1: ds2438: adding support for reading page1 Added a sysfs entry to support reading the page1 registers. This registers contain Elapsed Time Meter (ETM) data, which shows for how long the chip is on, as well as an Offset Register data, which can be used to calibrate the current measurement of the chip. Signed-off-by: Luiz Sampaio Link: https://lore.kernel.org/r/20210519223046.13798-6-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1f5e7518f063728aee0679c5086b92d8ea429e11 Author: Luiz Sampaio Date: Wed May 19 19:30:44 2021 -0300 w1: ds2438: fixing bug that would always get page0 The purpose of the w1_ds2438_get_page function is to get the register values at the page passed as the pageno parameter. However, the page0 was hardcoded, such that the function always returned the page0 contents. Fixed so that the function can retrieve any page. Signed-off-by: Luiz Sampaio Link: https://lore.kernel.org/r/20210519223046.13798-5-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman commit 67c6964228b6c0c759893915f0cb47a564c256dc Author: Luiz Sampaio Date: Wed May 19 19:30:43 2021 -0300 w1: ds2438: changed sysfs macro for rw file The iad sysfs file has permissions for read and write. Changed to the recommended macro BIN_ATTR_RW. Signed-off-by: Luiz Sampaio Link: https://lore.kernel.org/r/20210519223046.13798-4-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9f2713531a9ba2018695a3e191e28d84eaeaae6 Author: Luiz Sampaio Date: Wed May 19 19:30:42 2021 -0300 w1: ds2438: fixed if brackets coding style issue Since there is only one statement inside the if clause, no brackets are required. Signed-off-by: Luiz Sampaio Link: https://lore.kernel.org/r/20210519223046.13798-3-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman commit ddb20bcf77382c92389a5b506e5f52e840dc70a4 Author: Luiz Sampaio Date: Wed May 19 19:30:41 2021 -0300 w1: ds2438: fixed a coding style issue There is an if statement and, if the function goes into it, it returns. So, the next else is not required. Signed-off-by: Luiz Sampaio Link: https://lore.kernel.org/r/20210519223046.13798-2-sampaio.ime@gmail.com Signed-off-by: Greg Kroah-Hartman commit c6fa1a96db26b22cdfb2055d8b1a79e8c40b1040 Author: Yang Yingliang Date: Tue May 18 13:04:15 2021 +0800 w1: w1_therm: fix build warning in w1_seq_show() Fix the following build warning: drivers/w1/slaves/w1_therm.c: In function ‘w1_seq_show’: drivers/w1/slaves/w1_therm.c:2059:6: warning: variable ‘rv’ set but not used [-Wunused-but-set-variable] int rv; ^~ Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210518050415.615783-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6a072b2e3722f39c148c2dea35f2485777b3aee5 Author: Yang Yingliang Date: Tue May 18 13:04:01 2021 +0800 w1: w1_therm: correct function name bulk_read_support() Fix the following make W=1 kernel build warning: drivers/w1/slaves/w1_therm.c:843: warning: expecting prototype for support_bulk_read(). Prototype was for bulk_read_support() instead Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210518050401.615648-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8c55a99dc77a76dcda52e5b080f584188b2ce2f0 Author: Andy Shevchenko Date: Tue May 18 16:34:58 2021 +0300 parport: Use string_upper() instead of open coded variant Use string_upper() from string helper module instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210518133458.20403-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1189827a2cf72162e37c16d309c47d941cfd1936 Author: Alexandru Ardelean Date: Fri May 14 12:23:32 2021 +0300 gpio: da9055: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Acked-by: Adam Thomson Signed-off-by: Bartosz Golaszewski commit 2a9a2ccaab99d6f8bbe92f01839dfd1cd4a33ddf Author: Alexandru Ardelean Date: Sun May 16 09:14:25 2021 +0300 gpio: stmpe: fully use convert probe to device-managed The IRQ is registered via devm_request_threaded_irq(), making the driver only partially device-managed. This changeset converts the entire driver to using only devres APIs. This change also removes platform_set_drvdata() since the information is never retrieved to be used in the driver. Signed-off-by: Alexandru Ardelean Reviewed-by: Linus Walleij [Bart: tweaked the commit message] Signed-off-by: Bartosz Golaszewski commit d3a2bfde6b1197a8fe543990090e430b7686be3b Author: Lee Jones Date: Thu May 20 13:25:38 2021 +0100 comedi: drivers: comedi_isadma: Fix misspelling of 'dma_chan1' Fixes the following W=1 kernel build warning(s): drivers/staging/comedi/drivers/comedi_isadma.c:157: warning: Function parameter or member 'dma_chan1' not described in 'comedi_isadma_alloc' drivers/staging/comedi/drivers/comedi_isadma.c:157: warning: Excess function parameter 'dma_chan' description in 'comedi_isadma_alloc' Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520122538.3470259-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 69484d97dd3f266f999540c583f1acccfc4a0d81 Author: Lee Jones Date: Thu May 20 13:25:36 2021 +0100 comedi: drivers: ni_routes: Demote non-conforming kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/staging/comedi/drivers/ni_routes.c:249: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/staging/comedi/drivers/ni_routes.c:398: warning: Function parameter or member 'routes' not described in 'ni_route_set_has_source' drivers/staging/comedi/drivers/ni_routes.c:398: warning: Function parameter or member 'source' not described in 'ni_route_set_has_source' drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or member 'src_sel_reg_value' not described in 'ni_find_route_source' drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or member 'dest' not described in 'ni_find_route_source' drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or member 'tables' not described in 'ni_find_route_source' Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Greg Kroah-Hartman Cc: "Alexander A. Klimov" Cc: "Spencer E. Olson" Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520122538.3470259-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7b89d91c5d7fcfc9710d85c28ef94479c4937d43 Author: Lee Jones Date: Thu May 20 13:25:35 2021 +0100 comedi: drivers: ni_tio: Fix slightly broken kernel-doc and demote others Fixes the following W=1 kernel build warning(s): drivers/staging/comedi/drivers/ni_tio.c:1515: warning: Function parameter or member 'counter_dev' not described in 'ni_tio_get_routing' drivers/staging/comedi/drivers/ni_tio.c:1515: warning: Function parameter or member 'dest' not described in 'ni_tio_get_routing' drivers/staging/comedi/drivers/ni_tio.c:1515: warning: expecting prototype for Retrieves the register value of the current source of the output selector for(). Prototype was for ni_tio_get_routing() instead drivers/staging/comedi/drivers/ni_tio.c:1544: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/staging/comedi/drivers/ni_tio.c:1584: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Greg Kroah-Hartman Cc: Mori Hess Cc: "J.P. Mellor" Cc: Herman.Bruyninckx@mech.kuleuven.ac.be Cc: Wim.Meeussen@mech.kuleuven.ac.be Cc: Klaas.Gadeyne@mech.kuleuven.ac.be Cc: Comedi Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520122538.3470259-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4d070b8b74561e27fb8910c94dabd6263852e077 Author: Lee Jones Date: Thu May 20 13:25:33 2021 +0100 comedi: comedi_8254: Fix descriptions for 'i8254' and 'iobase' Fixes the following W=1 kernel build warning(s): drivers/staging/comedi/drivers/comedi_8254.c:561: warning: Function parameter or member 'i8254' not described in 'comedi_8254_subdevice_init' drivers/staging/comedi/drivers/comedi_8254.c:620: warning: Function parameter or member 'iobase' not described in 'comedi_8254_init' drivers/staging/comedi/drivers/comedi_8254.c:620: warning: Excess function parameter 'mmio' description in 'comedi_8254_init' Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Greg Kroah-Hartman Cc: "David A. Schleef" Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520122538.3470259-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit dbfac814bb73624613f47d6e70391053ab6b8960 Author: Jiapeng Chong Date: Fri May 21 17:47:45 2021 +0800 spi: pxa2xx: Fix inconsistent indenting Eliminate the follow smatch warning: drivers/spi/spi-pxa2xx-pci.c:260 pxa2xx_spi_pci_probe() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1621590465-73594-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 9d5536e0e1ca8409665bdd80d951941d5ce19b8a Author: Peter Ujfalusi Date: Fri May 21 12:28:04 2021 +0300 ASoC: SOF: Intel: hda: Remove conditions against CONFIG_PCI The HDA support can only be compiled when SND_SOC_SOF_PCI is enabled which depends on CONFIG_PCI. This makes the IS_ENABLED(CONFIG_PCI) checks redundant in the code, they will resolve to true all the time. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-8-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 4f50f16e9414ea41d5c142fd880faab060472a6b Author: Pierre-Louis Bossart Date: Fri May 21 12:28:03 2021 +0300 ASoC: SOF: ops: don't return void value Sparse throws the following warning: sound/soc/sof/ops.h:247:17: error: returning void-valued expression Remove the useless returns. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-7-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit ccaea61a8d1b8180cc3c470e383381884e4bc1f2 Author: Jaska Uimonen Date: Fri May 21 12:28:02 2021 +0300 ASoC: SOF: topology: fix assignment to use le32_to_cpu Fix sparse warning by using le32_to_cpu. Signed-off-by: Jaska Uimonen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c03459415c5120fe03dd7d9824880acc8b7f2693 Author: Peter Ujfalusi Date: Fri May 21 12:28:01 2021 +0300 ASoC: SOF: loader: Use snd_sof_dsp_block_read() instead sof_block_read() SOF core should use the IO functions via callbacks and not directly to ensure that it remains platform independent. Fixes: 83ee7ab1627b7 ("ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation") Signed-off-by: Peter Ujfalusi Reviewed-by: Daniel Baluta Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 3b2e93ed12381fa1c33169202f2cdffbb18157c4 Author: Keyon Jie Date: Fri May 21 12:28:00 2021 +0300 ASoC: SOF: ops: print out the polling register Print the register offset out to provide more useful information for the register polling debugging. Signed-off-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e5eaa4e66f538b8ba4928785a62edf8ffcf7c053 Author: Peter Ujfalusi Date: Fri May 21 12:27:59 2021 +0300 ASoC: SOF: pci: No need to cast second time to save the desc At the start of the function we already have the desc, no need to cast it again from pci_id->driver_data to save it to sof_pdata. Signed-off-by: Peter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit fd979ec12eebcfb718f2c7c28b336d891d439f85 Author: Peter Ujfalusi Date: Fri May 21 12:27:58 2021 +0300 ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions We can check for the desc->ops directly in the probe functions, the ops is not used directly in the functions. Signed-off-by: Peter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210521092804.3721324-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit ddaf0d6dc4671e88c72227fad68ecc45e7274559 Author: Chunfeng Yun Date: Wed May 19 14:39:45 2021 +0800 usb: common: usb-conn-gpio: use dev_err_probe() to print log Use dev_err_probe() to print debug or error message depending on whether the error value is -DPROBE_DEFER or not. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1621406386-18838-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 880287910b1892ed2cb38977893b947382a09d21 Author: Chunfeng Yun Date: Wed May 19 14:39:44 2021 +0800 usb: common: usb-conn-gpio: fix NULL pointer dereference of charger When power on system with OTG cable, IDDIG's interrupt arises before the charger registration, it will cause a NULL pointer dereference, fix the issue by registering the power supply before requesting IDDIG/VBUS irq. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1621406386-18838-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit c63fef4c4302f5d41945f5362ff0cf556cb6db19 Author: Andre Przywara Date: Wed May 19 11:41:43 2021 +0100 dt-bindings: usb: Add H616 compatible string The H616 has four PHYs as the H3, along with their respective clock gates and resets, so the property description is identical. However the PHYs itself need some special bits, so we need a new compatible string for it. Signed-off-by: Andre Przywara Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210519104152.21119-9-andre.przywara@arm.com Signed-off-by: Greg Kroah-Hartman commit 3f87443b4ee6710e682a1ef48cc09316e025257d Author: Andre Przywara Date: Wed May 19 11:41:44 2021 +0100 dt-bindings: usb: sunxi-musb: Add H616 compatible string The H616 MUSB peripheral is compatible to the H3 one (8 endpoints). Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210519104152.21119-10-andre.przywara@arm.com Signed-off-by: Greg Kroah-Hartman commit 7d076c2f5590e7a2eaba73ded1dbf553fa15a6af Author: Tony Lindgren Date: Tue May 18 18:06:15 2021 +0300 usb: musb: Check devctl status again for a spurious session request On start-up, we can get a spurious session request interrupt with nothing connected. After that the devctl session bit will silently clear, but the musb hardware is never idled until a cable is plugged in, or the glue layer module is reloaded. Let's just check the session bit again in 3 seconds in peripheral mode to catch the issue. Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210518150615.53464-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit 62d472d8ad886d3e3fe2da20ba0965f8628513db Author: Tony Lindgren Date: Tue May 18 10:44:49 2021 +0300 usb: musb: Add missing PM suspend and resume functions for 2430 glue Looks like we are missing suspend and resume functions for pm_ops that are needed to idle the hardware for system suspend for 2430 glue layer. We can rely on the driver internal PM runtime state, and call driver functions to idle the hardware on suspend if needed. There is no need to add a dependency to PM runtime for system suspend here. Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20210518074449.17070-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit c5c7489dc98296841fdf4fc4bfc52727a2057f24 Author: Chris Chiu Date: Fri May 14 12:54:05 2021 +0800 Revert "USB: Add reset-resume quirk for WD19's Realtek Hub" This reverts commit ca91fd8c7643 ("USB: Add reset-resume quirk for WD19's Realtek Hub"). The previous patch in the series now handles the problematic hubs by checking the port status and handling it accordingly when PORT_SUSPEND timeout occurs. We don't need to use reset-resume all the time. Acked-by: Alan Stern Signed-off-by: Chris Chiu Link: https://lore.kernel.org/r/20210514045405.5261-3-chris.chiu@canonical.com Signed-off-by: Greg Kroah-Hartman commit 7142452387c72207f34683382b04f38499da58f7 Author: Chris Chiu Date: Fri May 14 12:54:04 2021 +0800 USB: Verify the port status when timeout happens during port suspend On the Realtek high-speed Hub(0bda:5487), the port which has wakeup enabled_descendants will sometimes timeout when setting PORT_SUSPEND feature. After checking the PORT_SUSPEND bit in wPortStatus, it is already set which means the port has been suspended. We should treat it suspended to make sure it will be resumed correctly. Acked-by: Alan Stern Signed-off-by: Chris Chiu Link: https://lore.kernel.org/r/20210514045405.5261-2-chris.chiu@canonical.com Signed-off-by: Greg Kroah-Hartman commit 106133dacc001e4e3a7ebcdb96368f523bf44a89 Author: Gustavo A. R. Silva Date: Thu May 13 14:33:53 2021 -0500 usb: gadget: s3c-hsudc: Use struct_size() in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worse scenario, could lead to heap overflows. This code was detected with the help of Coccinelle and, audited and fixed manually. Acked-by: Felipe Balbi Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210513193353.GA196565@embeddedor Signed-off-by: Greg Kroah-Hartman commit 53ad92fdf7c34c3b44566553077176a767612454 Author: Rikard Falkeborn Date: Thu May 13 22:09:08 2021 +0200 usb: gadget: tegra-xudc: Constify static structs Constify a couple of ops-structs that are never modified, to let the compiler put them in read-only memory. Acked-by: Felipe Balbi Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210513200908.448351-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 005775859a3dc4ed3854be5e883ec0716d492135 Author: Gopalakrishnan Santhanam Date: Thu May 13 14:02:25 2021 +0530 fsl-usb: add need_oc_pp_cycle flag for 85xx also Commit e6604a7fd71f9 ("EHCI: Quirk flag for port power handling on overcurrent.") activated the quirks handling (flag need_oc_pp_cycle) for Freescale 83xx based boards. Activate same for 85xx based boards as well. Cc: xe-linux-external@cisco.com Acked-by: Alan Stern Signed-off-by: Gopalakrishnan Santhanam Signed-off-by: Daniel Walker Link: https://lore.kernel.org/r/20210513083225.68912-1-gsanthan@cisco.com Signed-off-by: Greg Kroah-Hartman commit 1d50071b53f26a7b8b7d6a0e027b9e6643bb6075 Author: Greg Kroah-Hartman Date: Tue May 18 18:20:54 2021 +0200 USB: gadget: pxa25x_udc: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Acked-by: Daniel Mack Link: https://lore.kernel.org/r/20210518162054.3697992-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 1531a2bb4494f1960488caeeac3c310c7478f186 Author: Greg Kroah-Hartman Date: Tue May 18 18:21:05 2021 +0200 USB: gadget: s3c2410_udc: remove dentry storage for debugfs file There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20210518162105.3698090-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e3d59eff47b8cc385acae9d7fb1c787857023376 Author: Greg Kroah-Hartman Date: Tue May 18 18:20:35 2021 +0200 USB: gadget: lpc32xx_udc: remove debugfs dentry variable There is no need to store the dentry for a fixed filename that we have the string for. So just have debugfs look it up when we need it to remove the file, no need to store it anywhere locally. Note, this driver is broken in that debugfs will not work for more than one instance of the device it supports. But given that this patch does not change that, and no one has ever seemed to notice, it must not be an issue... Cc: Felipe Balbi Cc: Vladimir Zapolskiy Cc: linux-usb@vger.kernel.org Acked-by: Vladimir Zapolskiy Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/20210518162035.3697860-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 92c6dc0beb684e3421b61313c5e572cd9c93eab4 Author: Andy Shevchenko Date: Wed May 19 11:55:27 2021 +0300 usb: typec: wcove: Fx wrong kernel doc format The top comment in the file wrongly uses kernel doc format: .../typec/tcpm/wcove.c:17: warning: expecting prototype for typec_wcove.c - WhiskeyCove PMIC USB Type(). Prototype was for WCOVE_CHGRIRQ0() instead Fix this by converting it to plain comment. Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together") Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210519085527.48657-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e1327a127703f94b8838d756cf6eaac506b329a7 Author: Quentin Perret Date: Thu Apr 8 18:01:05 2021 +0000 export: Make CRCs robust to symbol trimming The CRC calculation done by genksyms is triggered when the parser hits EXPORT_SYMBOL*() macros. At this point, genksyms recursively expands the types, and uses that as the input for the CRC calculation. In the case of forward-declared structs, the type expands to 'UNKNOWN'. Next, the result of the expansion of each type is cached, and is re-used when/if the same type is seen again for another exported symbol in the file. Unfortunately, this can cause CRC 'stability' issues when a struct definition becomes visible in the middle of a C file. For example, let's assume code with the following pattern: struct foo; int bar(struct foo *arg) { /* Do work ... */ } EXPORT_SYMBOL_GPL(bar); /* This contains struct foo's definition */ #include "foo.h" int baz(struct foo *arg) { /* Do more work ... */ } EXPORT_SYMBOL_GPL(baz); Here, baz's CRC will be computed using the expansion of struct foo that was cached after bar's CRC calculation ('UNKOWN' here). But if EXPORT_SYMBOL_GPL(bar) is removed from the file (because of e.g. symbol trimming using CONFIG_TRIM_UNUSED_KSYMS), struct foo will be expanded late, during baz's CRC calculation, which now has visibility over the full struct definition, hence resulting in a different CRC for baz. This can cause annoying issues for distro kernel (such as the Android Generic Kernel Image) which use CONFIG_UNUSED_KSYMS_WHITELIST. Indeed, as per the above, adding a symbol to the whitelist can change the CRC of symbols that are already kept exported. As such, modules built against a kernel with a trimmed ABI may not load against the same kernel built with an extended whitelist, even though they are still strictly binary compatible. While rebuilding the modules would obviously solve the issue, I believe this classifies as an odd genksyms corner case, and it gets in the way of kernel updates in the GKI context. To work around the issue, make sure to keep issuing the __GENKSYMS_EXPORT_SYMBOL macros for all trimmed symbols, hence making the genksyms parsing insensitive to symbol trimming. Acked-by: Greg Kroah-Hartman Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20210408180105.2496212-1-qperret@google.com Signed-off-by: Greg Kroah-Hartman commit 056c52f5e824c050c58fd27ea6d717cba32239c2 Author: H. Peter Anvin (Intel) Date: Wed May 19 14:21:52 2021 -0700 x86/kexec: Set_[gi]dt() -> native_[gi]dt_invalidate() in machine_kexec_*.c These files contain private set_gdt() functions which are only used to invalid the gdt; machine_kexec_64.c also contains a set_idt() function to invalidate the idt. phys_to_virt(0) *really* doesn't make any sense for creating an invalid GDT. A NULL pointer (virtual 0) makes a lot more sense; although neither will allow any actual memory reference, a NULL pointer stands out more. Replace these calls with native_[gi]dt_invalidate(). Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210519212154.511983-7-hpa@zytor.com commit 283fa3b6483a84aeb62f1b97c2ec7c02eb2f5882 Author: H. Peter Anvin (Intel) Date: Wed May 19 14:21:51 2021 -0700 x86: Add native_[ig]dt_invalidate() In some places, the native forms of descriptor table invalidation is required. Rather than open-coding them, add explicitly native functions to invalidate the GDT and IDT. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210519212154.511983-6-hpa@zytor.com commit 8ec9069a432c873e52e6f4ce1496f282a4299604 Author: H. Peter Anvin (Intel) Date: Wed May 19 14:21:50 2021 -0700 x86/idt: Remove address argument from idt_invalidate() There is no reason to specify any specific address to idt_invalidate(). It looks mostly like an artifact of unifying code done differently by accident. The most "sensible" address to set here is a NULL pointer - virtual address zero, just as a visual marker. This also makes it possible to mark the struct desc_ptr in idt_invalidate() as static const. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210519212154.511983-5-hpa@zytor.com commit ff851003880de9d1111498877551ba16668c38ef Author: H. Peter Anvin (Intel) Date: Wed May 19 14:21:48 2021 -0700 x86/irq: Add and use NR_EXTERNAL_VECTORS and NR_SYSTEM_VECTORS Add defines for the number of external vectors and number of system vectors instead of requiring the use of (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR) and (NR_VECTORS - FIRST_SYSTEM_VECTOR) respectively. Clean up the usage sites. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20210519212154.511983-3-hpa@zytor.com commit f1b7d45d3f8f3e18e190e71cb54d4b1917300d1d Author: H. Peter Anvin (Intel) Date: Wed May 19 14:21:49 2021 -0700 x86/irq: Remove unused vectors defines UV_BAU_MESSAGE is defined but not used anywhere in the kernel. Presumably this is a stale vector number that can be reclaimed. MCE_VECTOR is not an actual vector: #MC is an exception, not an interrupt vector, and as such is correctly described as X86_TRAP_MC. MCE_VECTOR is not used anywhere is the kernel. Note that NMI_VECTOR *is* used; specifically it is the vector number programmed into the APIC LVT when an NMI interrupt is configured. At the moment it is always numerically identical to X86_TRAP_NMI, that is not necessarily going to be the case indefinitely. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Acked-by: Steve Wahl Link: https://lore.kernel.org/r/20210519212154.511983-4-hpa@zytor.com commit 2ade8fc65076095460e3ea1ca65a8f619d7d9a3a Author: David Bartley Date: Thu May 20 10:41:30 2021 -0700 x86/amd_nb: Add AMD family 19h model 50h PCI ids This is required to support Zen3 APUs in k10temp. Signed-off-by: David Bartley Signed-off-by: Borislav Petkov Acked-by: Wei Huang Link: https://lkml.kernel.org/r/20210520174130.94954-1-andareed@gmail.com commit d61f263495d75cd0e45a50a2dc44ebc286db52b7 Merge: 57f2bf41b9e09 185a04b96883d Author: Tony Lindgren Date: Fri May 21 12:42:41 2021 +0300 Merge branch 'omap-for-v5.13/genpd-cleanup' into omap-for-v5.14/cleanup commit 3d7bf58546ba858ea0a15eb10195a397b9704b51 Author: Dario Binacchi Date: Wed Apr 28 18:40:25 2021 +0200 ARM: dts: osd3358-sm-red: group in the same phandle all its properties Having a single phandle reference for rtc0, mmc0 and am335x_pinmux makes the DTS well-ordered and therefore more readable. Signed-off-by: Dario Binacchi Signed-off-by: Tony Lindgren commit 6bb0ad80c52ddf57c54a478cecf94c27c328ca46 Author: Tomi Valkeinen Date: Fri Apr 23 11:37:12 2021 +0300 ARM: dts: dra76-evm: remove ov5640 DRA76 EVM boards are not shipped with OV5640 sensor module, it is a separate purchase. OV5640 module is also just one of the possible sensors or capture boards you can connect. However, for some reason, OV5640 has been added to the board dts file, making it cumbersome to use other sensors. Remove the OV5640 from the dts file so that it is easy to use other sensors via DT overlays. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Tony Lindgren commit e7d7b033091afaee937cd92d71903fbe774d5ff0 Author: Sicelo A. Mhlongo Date: Sat Apr 17 22:28:16 2021 +0200 ARM: omap2plus_defconfig: Add LP5523 LED driver The Nokia N900 has an LP5523 driving the RGB LED and the 6 keyboard LEDS. Enable support for it in omap2plus_defconfig. Signed-off-by: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren commit 80d872f97d83e8fbe70823838204e6e6a322c2be Author: Sicelo A. Mhlongo Date: Sat Apr 17 22:27:00 2021 +0200 ARM: omap2plus_defconfig: Add WL1251 and WEXT modules The Nokia N900 uses a TI WL1251 chip for WiFi. Enable support for it as a loadable module. In order to be usable and connect to networks, it needs wireless extensions, so enable WEXT support in the kernel. Signed-off-by: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren commit 57f2bf41b9e093862e104c6ec3cf4cc32d69fbed Author: Dario Binacchi Date: Sun Apr 25 16:23:30 2021 +0200 ARM: OMAP2+: remove omap2_set_globals_control() The function is no longer used, so let's remove it. Signed-off-by: Dario Binacchi Signed-off-by: Tony Lindgren commit ac189a7a999bf99c798a588e93fc8116773e6c80 Author: Dario Binacchi Date: Sun Apr 25 16:22:08 2021 +0200 ARM: OMAP2+: CM: remove omap2_set_globals_cm() The function is no longer used, so let's remove it. Signed-off-by: Dario Binacchi Signed-off-by: Tony Lindgren commit d06aca989c243dd9e5d3e20aa4e5c2ecfdd07050 Author: Joe Richey Date: Fri May 21 01:58:42 2021 -0700 x86/elf: Use _BITUL() macro in UAPI headers Replace BIT() in x86's UAPI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: 742c45c3ecc9 ("x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2") Signed-off-by: Joe Richey Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210521085849.37676-2-joerichey94@gmail.com commit 68f6941a6aec145c79d4e663eb4411514d83fc5a Author: Juerg Haefliger Date: Mon May 17 11:58:09 2021 +0200 ARM: OMAP1: Remove leading spaces in Kconfig Remove leading spaces before tabs in Kconfig file(s) by running the following command: $ find arch/arm/mach-omap1 -name 'Kconfig*' | \ xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Juerg Haefliger Signed-off-by: Tony Lindgren commit 302e909cb22b5456ae71a9fd54b98ee0e6505613 Author: Hui Tang Date: Wed May 12 14:27:11 2021 +0800 crypto: hisilicon/hpre - add 'default' for switch statement Return error immediately if it goto 'default' path. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 0c176d8d7d970db6fed82db3495a73d10d2251fb Author: Hui Tang Date: Wed May 12 14:27:10 2021 +0800 crypto: hisilicon/hpre - delete rudundant macro definition Delete rudundant macro definition. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 82119db8cacb3921ab95e3f078c08c4bffacef15 Author: Hui Tang Date: Wed May 12 14:27:09 2021 +0800 crypto: hisilicon/hpre - use 'GENMASK' to generate mask value Use 'GENMASK' to generate mask value, just make the code clearer. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 58be5ce3461e3fd623091d0bdc1080d0e4df2859 Author: Hui Tang Date: Wed May 12 14:27:08 2021 +0800 crypto: hisilicon/hpre - delete rudundant initialization Delete rudundant variable initialization. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit b94c910afda050a9e95465ff0c4fe2548ea5ac0a Author: Hui Tang Date: Wed May 12 14:27:07 2021 +0800 crypto: hisilicon/hpre - remove the macro of 'HPRE_DEV' Remove complex macro of 'HPRE_DEV' and replace with the initialized device pointer. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 9201c0774c2203d5620eeb4f7cb872d7e33cbe75 Author: Hui Tang Date: Wed May 12 14:27:06 2021 +0800 crypto: hisilicon/hpre - replace macro with inline function Functional macro lacks type checking, which is not as strict as function call checking. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit c9a753b9733dd229ea736b27bdc55ef04cdc9f01 Author: Hui Tang Date: Wed May 12 14:27:05 2021 +0800 crypto: hisilicon/hpre - init a structure member each line Only init a structure member each line, just to keep the code neat. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit e0a6f390d44b7d4d04fb3f2dbba46824bdbd1b4f Author: Hui Tang Date: Wed May 12 14:27:04 2021 +0800 crypto: hisilicon/hpre - the macro 'HPRE_ADDR' expands The macro 'HPRE_ADDR' is unnecessary, so expanding it. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 0b0553b701f830d820ba9026e5799c24e400a4b5 Author: Hui Tang Date: Mon May 10 17:02:55 2021 +0800 crypto: hisilicon/hpre - fix unmapping invalid dma address Currently, an invalid dma address may be unmapped when calling 'xx_data_clr_all' in error path, so check dma address of sqe in/out if initialized before calling 'dma_free_coherent' or 'dma_unmap_single'. Fixes: a9214b0b6ed2 ("crypto: hisilicon - fix the check on dma address") Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit a225762057d6818e4a75ad5c2c16495662d71495 Author: Hui Tang Date: Mon May 10 16:59:48 2021 +0800 crypto: hisilicon/hpre - extend 'cra_driver_name' with curve name Currently,'cra_driver_name' cannot be used to specify ecdh algorithm with a special curve, so extending it with curve name. Fixes: 6763f5ea2d9a ("crypto: ecdh - move curve_id of ECDH from ...") Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit c5ae16f5c6b91dc78a08885a753489d608de4abd Author: Hui Tang Date: Mon May 10 16:59:47 2021 +0800 crypto: ecdh - extend 'cra_driver_name' with curve name Currently, 'cra_driver_name' cannot be used to specify ecdh algorithm with a special curve, so extending it with curve name. Although using 'cra_name' can also specify a special curve, but ecdh generic driver cannot be specified when vendor hardware accelerator has registered. Fixes: 6763f5ea2d9a ("crypto: ecdh - move curve_id of ECDH from ...") Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 2d016672528a592ada5188e53ac746e1b8b7a978 Author: Hui Tang Date: Mon May 10 16:54:08 2021 +0800 crypto: testmgr - fix initialization of 'secret_size' Actual data length of the 'secret' is not equal to the 'secret_size'. Since the 'curve_id' has removed in the 'secret', the 'secret_size' should subtract the length of the 'curve_id'. Fixes: 6763f5ea2d9a ("crypto: ecdh - move curve_id of ECDH from ...") Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit f40b70d3daf5407fbc9c70db93ccc17bad9882e5 Author: Lee Jones Date: Thu May 20 13:13:46 2021 +0100 char: hw_random: pseries-rng: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/char/hw_random/pseries-rng.c:42: warning: Function parameter or member 'vdev' not described in 'pseries_rng_get_desired_dma' Cc: Matt Mackall Cc: Herbert Xu Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Lijun Pan Cc: "Uwe Kleine-König" Cc: Tyrel Datwyler Cc: Michael Neuling Cc: linux-crypto@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210520121347.3467794-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d80758c02fcf295bbad7c4c73f399f83f0be49d6 Author: Lee Jones Date: Thu May 20 13:13:43 2021 +0100 char: hpet: Remove unused variable 'm' Fixes the following W=1 kernel build warning(s): drivers/char/hpet.c: In function ‘hpet_interrupt’: drivers/char/hpet.c:159:17: warning: variable ‘m’ set but not used [-Wunused-but-set-variable] Cc: Clemens Ladisch Cc: Bob Picco Signed-off-by: Lee Jones Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210520121347.3467794-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a9af9ae814434fe2c562d5dfb4268e7acf8bb0ed Author: Lee Jones Date: Thu May 20 13:13:33 2021 +0100 char: pcmcia: cm4040_cs: Remove unused variable 'uc' Fixes the following W=1 kernel build warning(s): drivers/char/pcmcia/cm4040_cs.c: In function ‘cm4040_read’: drivers/char/pcmcia/cm4040_cs.c:224:16: warning: variable ‘uc’ set but not used [-Wunused-but-set-variable] Cc: Harald Welte Signed-off-by: Lee Jones Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210520121347.3467794-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4e2898164656437f896102b17ec1e86c9953afcb Author: Lee Jones Date: Thu May 20 13:13:32 2021 +0100 char: pcmcia: cm4000_cs: Remove unused variable 'tmp' Fixes the following W=1 kernel build warning(s): drivers/char/pcmcia/cm4000_cs.c: In function ‘cmm_write’: drivers/char/pcmcia/cm4000_cs.c:1053:16: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Cc: Harald Welte Cc: "cs.c" Signed-off-by: Lee Jones Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210520121347.3467794-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 03e3e31ee5c8d45c62c31035578bab5e90133eff Merge: 3ce3e45cc333d 50f09a3dd5877 Author: Greg Kroah-Hartman Date: Fri May 21 09:48:31 2021 +0200 Merge 50f09a3dd587 ("Merge tag 'char-misc-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into char-misc-next We want the char/misc driver fixes in here as well Signed-off-by: Greg Kroah-Hartman commit 9a91e5e0af5e03940d0eec72c36364a1701de240 Merge: c99c4d0ca57c9 81db370c88196 Author: Dave Airlie Date: Fri May 21 15:59:04 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-05-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-05-21: amdgpu: - RAS fixes - SR-IOV fixes - More BO management cleanups - Aldebaran fixes - Display fixes - Support for new GPU, Beige Goby - Backlight fixes amdkfd: - RAS fixes - DMA mapping fixes - HMM SVM fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210521045743.4047-1-alexander.deucher@amd.com commit c99c4d0ca57c978dcc2a2f41ab8449684ea154cc Merge: 2ba047855096f 2bb5b5f688cbb Author: Dave Airlie Date: Fri May 21 15:29:34 2021 +1000 Merge tag 'amd-drm-next-5.14-2021-05-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.14-2021-05-19: amdgpu: - Aldebaran updates - More LTTPR display work - Vangogh updates - SDMA 5.x GCR fixes - RAS fixes - PCIe ASPM support - Modifier fixes - Enable TMZ on Renoir - Buffer object code cleanup - Display overlay fixes - Initial support for multiple eDP panels - Initial SR-IOV support for Aldebaran - DP link training refactor - Misc code cleanups and bug fixes - SMU regression fixes for variable sized arrays - MAINTAINERS fixes for amdgpu amdkfd: - Initial SR-IOV support for Aldebaran - Topology fixes - Initial HMM SVM support - Misc code cleanups and bug fixes radeon: - Misc code cleanups and bug fixes - SMU regression fixes for variable sized arrays - Flickering fix for Oland with multiple 4K displays UAPI: - amdgpu: Drop AMDGPU_GEM_CREATE_SHADOW flag. This was always a kernel internal flag and userspace use of it has always been blocked. It's no longer needed so remove it. - amdkgd: HMM SVM support Overview: https://patchwork.freedesktop.org/series/85562/ Porposed userspace: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/tree/fxkamd/hmm-wip Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210520031258.231896-1-alexander.deucher@amd.com commit a15fc9aa5b384e305ea25f42f744bb301fe39da0 Author: Dong Aisheng Date: Fri May 21 11:16:39 2021 +0800 PM / devfreq: imx8m-ddrc: Remove DEVFREQ_GOV_SIMPLE_ONDEMAND dependency The driver can't support simple ondemand governor due to missing .get_dev_status() capability. Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit 5e480ab94db8102baa73da33534e708a8636c2f9 Author: Dmitry Osipenko Date: Tue May 11 00:10:02 2021 +0300 PM / devfreq: tegra30: Support thermal cooling Expose ACTMON devfreq device as a cooling device in order to throttle memory freq on overheat. Throttling of memory freq has a significant cooling effect on NVIDIA Tegra SoCs since higher memory freqs require higher SoC core voltage which is one of the main causes of the heating. Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 7dbc0d246891acbb8ae5840b3237881b7a0787df Author: Dong Aisheng Date: Wed May 19 15:05:44 2021 +0800 PM / devfreq: imx-bus: Remove imx_bus_get_dev_status Current driver actually does not support simple ondemand governor as it's unable to provide device load information. So removing the unnecessary callback to avoid confusing. Right now the driver is using userspace governor by default. polling_ms was also dropped as it's not needed for non-ondemand governor. Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit 49219d9b8785ba712575c40e48ce0f7461254626 Author: Mimi Zohar Date: Mon Apr 26 18:13:45 2021 -0400 evm: fix writing /evm overflow EVM_SETUP_COMPLETE is defined as 0x80000000, which is larger than INT_MAX. The "-fno-strict-overflow" compiler option properly prevents signaling EVM that the EVM policy setup is complete. Define and read an unsigned int. Fixes: f00d79750712 ("EVM: Allow userspace to signal an RSA key has been loaded") Signed-off-by: Mimi Zohar commit 2ba047855096fff551402a87272b520fe97323f5 Merge: ae25ec2fc6c5a ec279384c6a02 Author: Dave Airlie Date: Fri May 21 08:53:38 2021 +1000 Merge tag 'drm-intel-next-2021-05-19-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Core Changes: - drm: Rename DP_PSR_SELECTIVE_UPDATE to better mach eDP spec (Jose). Driver Changes: - Display plane clock rates fixes and improvements (Ville). - Uninint DMC FW loader state during shutdown (Imre). - Convert snprintf to sysfs_emit (Xuezhi). - Fix invalid access to ACPI _DSM objects (Takashi). - A big refactor around how i915 addresses the graphics and display IP versions. (Matt, Lucas). - Backlight fix (Lyude). - Display watermark and DBUF fixes (Ville). - HDCP fix (Anshuman). - Improve cases where display is not available (Jose). - Defeature PSR2 for RKL and ALD-S (Jose). - VLV DSI panel power fixes and improvements (Hans). - display-12 workaround (Jose). - Fix modesetting (Imre). - Drop redundant address-of op before lttpr_common_caps array (Imre). - Fix compiler checks (Jose, Jason). - GLK display fixes (Ville). - Fix error code returns (Dan). - eDP novel: back again to slow and wide link training everywhere (Kai-Heng). - Abstract DMC FW path (Rodrigo). - Preparation and changes for upcoming XeLPD display IP (Jose, Matt, Ville, Juha-Pekka, Animesh). - Fix comment typo in DSI code (zuoqilin). - Simplify CCS and UV plane alignment handling (Imre). - PSR Fixes on TGL (Gwan-gyeong, Jose). - Add intel_dp_hdcp.h and rename init (Jani). - Move crtc and dpll declarations around (Jani). - Fix pre-skl DP AUX precharge length (Ville). - Remove stray newlines from random files (Ville). - crtc->index and intel_crtc+drm_crtc pointer clean-up (Ville). - Add frontbuffer tracking tracepoints (Ville). - ADL-S PCI ID updates (Anand). - Use unique backlight device names (Jani). - A few clean-ups on i915/audio (Jani). - Use intel_framebuffer instead of drm one on intel_fb functions (Imre). - Add the missing MC CCS/XYUV8888 format support on display >= 12 (Imre). - Nuke display error state (Ville). - ADL-P initial enablement patches starting to land (Clint, Imre, Jose, Umesh, Vandita, Mika). - Display clean-up around VBT and the strap bits (Lucas). - Try YCbCr420 color when RGB fails (Werner). - More PSR fixes and improvements (Jose). - Other generic display code clean-up (Jose, Ville). - Use correct downstream caps for check Src-Ctl mode for PCON (Ankit). - Disable HiZ Raw Stall Optimization on broken gen7 (Simon). Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YKVioeu0JkUAlR7y@intel.com commit 86fe2f8aa14f6b0b76a1ce3897a3ee1433e5203a Author: YueHaibing Date: Thu May 20 21:46:19 2021 +0800 net: cdc_ncm: use DEVICE_ATTR_RW macro Use DEVICE_ATTR_RW helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 7567d603b3f1c5ee799e311d0e48932bfc449028 Author: YueHaibing Date: Thu May 20 21:41:16 2021 +0800 net: usb: hso: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 48afdaea04eb691df3244b6a361f1a0c4540ff45 Author: YueHaibing Date: Thu May 20 21:36:45 2021 +0800 net: atm: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 25173dd4093a24e977e2af9cd5654c205bf13547 Author: Po-Hsu Lin Date: Thu May 20 18:49:54 2021 +0800 selftests: net: devlink_port_split.py: skip the test if no devlink device When there is no devlink device, the following command will return: $ devlink -j dev show {dev:{}} This will cause IndexError when trying to access the first element in dev of this json dataset. Use the kselftest framework skip code to skip this test in this case. Example output with this change: # selftests: net: devlink_port_split.py # no devlink device was found, test skipped ok 7 selftests: net: devlink_port_split.py # SKIP Link: https://bugs.launchpad.net/bugs/1928889 Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller commit 07b5dc1d515a9a9b3973e0bdc716a78adf6db8f8 Author: Michal Suchanek Date: Thu May 20 08:50:34 2021 +0200 ibmvnic: remove default label from to_string switch This way the compiler warns when a new value is added to the enum but not to the string translation like: drivers/net/ethernet/ibm/ibmvnic.c: In function 'adapter_state_to_string': drivers/net/ethernet/ibm/ibmvnic.c:832:2: warning: enumeration value 'VNIC_FOOBAR' not handled in switch [-Wswitch] switch (state) { ^~~~~~ drivers/net/ethernet/ibm/ibmvnic.c: In function 'reset_reason_to_string': drivers/net/ethernet/ibm/ibmvnic.c:1935:2: warning: enumeration value 'VNIC_RESET_FOOBAR' not handled in switch [-Wswitch] switch (reason) { ^~~~~~ Signed-off-by: Michal Suchanek Acked-by: Lijun Pan Link: https://lore.kernel.org/netdev/CAOhMmr701LecfuNM+EozqbiTxFvDiXjFdY2aYeKJYaXq9kqVDg@mail.gmail.com/ Signed-off-by: David S. Miller commit 4b99b74982774b0ba3cc3e2e8e0cbcd7f920dc78 Author: wengjianfeng Date: Thu May 20 09:05:50 2021 +0800 NFC: st21nfca: remove unnecessary variable and labels assign vlue (EIO/EPROTO) to variable r, and goto exit label, but just return r follow exit label, so we delete exit label, and just replace with return sentence. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit ba102914fa4f0e555a534038f3752b78e294de2f Merge: 92b13cabeacd7 97a1111d9ca69 Author: David S. Miller Date: Thu May 20 15:43:25 2021 -0700 Merge branch 'bond-cleanups' Guangbin Huang says: ==================== net: bonding: clean up some code style issues This patchset cleans up some code style issues. ==================== Signed-off-by: David S. Miller commit 97a1111d9ca69efef5a248ae5b89cc264b0b04f4 Author: Yufeng Mo Date: Thu May 20 14:18:35 2021 +0800 net: bonding: use tabs instead of space for code indent Code indent should use tabs where possible, so use tabs instead of space for code indent. Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 52333512701b56464a42f79b82570b37e7b91164 Author: Yufeng Mo Date: Thu May 20 14:18:34 2021 +0800 net: bonding: remove unnecessary braces Braces {} are not necessary for single statement blocks, so remove these braces {}. Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 8ce390bb985939a3bbc9a3616fa4fd046b54333b Author: Yufeng Mo Date: Thu May 20 14:18:33 2021 +0800 net: bonding: fix code indent for conditional statements Fix incorrect code indent for conditional statements. Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 86a5ad0a4608c96055117ae031ceb6ed387f026c Author: Yufeng Mo Date: Thu May 20 14:18:32 2021 +0800 net: bonding: add some required blank lines Add some blank lines after declarations as required. Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 92b13cabeacd7d17d49723420d8efc2eae116f9c Merge: 938263064ea72 9acf59a752d4c Author: David S. Miller Date: Thu May 20 15:13:28 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-05-20 This series contains updates to igc driver only. Andre Guedes says: This series adds AF_XDP zero-copy feature to igc driver. The initial patches do some code refactoring, preparing the code base to land the AF_XDP zero-copy feature, avoiding code duplications. The last patches of the series are the ones implementing the feature. The last patch which indeed implements AF_XDP zero-copy support was originally way too lengthy so, for the sake of code review, I broke it up into two patches: one adding support for the RX functionality and the other one adding TX support. --- v2: Patch 8/9 - "igc: Enable RX via AF_XDP zero-copy" * In XDP_PASS flow, copy metadata too into the skb. * When HW timestamp is added by the NIC, after copying it into a local variable, update xdp_buff->data_meta so that metadata length when XDP program is called 0. * In igc_xdp_enable_pool(), call xsk_pool_dma_unmap() on failure. Known issues: When an XDP application is running in Tx-Only mode with Zero-Copy enabled, it is not expected to add the frames to the fill-queue. I have noticed the following two issues in this scenario: - If XDP_USE_NEED_WAKEUP flag is not set by application, igc_poll() will go into infinite loop because the buffer allocation resulting in igc_clean_rx_irq_zc() indicating that all work is not done and NAPI should keep polling. This does not occur if XDP_USE_NEED_WAKEUP flag is set. - Since there are no buffers allocated by userspace for the fill queue, there is no memory allocated for the NIC to copy the data to. If the packet received is destined to the hardware queue where XDP application is running, no packets are received even on other queues. Both these issues can be mitigated by adding a few frames to the fill queue. The second issue can also be mitigated by making sure no packets are being received on the hardware queue where Rx is running. ==================== Signed-off-by: David S. Miller commit 938263064ea72bcb1d602585ab187453792480b8 Merge: dc185ae6ab879 9e5914cc9571f Author: David S. Miller Date: Thu May 20 15:10:57 2021 -0700 Merge branch 'net-leading-spaces' Hui Tang says: ==================== net: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' ==================== Signed-off-by: David S. Miller commit 9e5914cc9571fca4de2978aaa14e7d8a262a7ca4 Author: Hui Tang Date: Thu May 20 11:47:54 2021 +0800 mii: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit cf9207d77aef758efe884e3edb6bf38baacf24ec Author: Hui Tang Date: Thu May 20 11:47:53 2021 +0800 ifb: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 20a4fc3bc2849068c4119c9ce4d57e8f18a1b329 Author: Hui Tang Date: Thu May 20 11:47:52 2021 +0800 net: appletalk: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Mauro Carvalho Chehab Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit a597111a3ce330f28fca9cc3806cf7a0b3d5e4c2 Author: Hui Tang Date: Thu May 20 11:47:51 2021 +0800 net: fddi: skfp: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Lee Jones Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit d1542f85dfc29f4a012e98730d8b465ea05cd461 Author: Hui Tang Date: Thu May 20 11:47:50 2021 +0800 net: hamradio: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Jiri Slaby Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 63b63138f656d2ab9e1e692b6d1e4112406741a0 Author: Hui Tang Date: Thu May 20 11:47:49 2021 +0800 net: ppp: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Tom Parkin Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 1d314fc1a157f3a39af68518c27a9e98b125053d Author: Hui Tang Date: Thu May 20 11:47:48 2021 +0800 net: slip: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Masahiro Yamada Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 094fefd663adb651833989bb3cef7d8fd56abfb8 Author: Hui Tang Date: Thu May 20 11:47:47 2021 +0800 net: usb: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Hayes Wang Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit c169a93c8176e40f8956ca365ce466537101cd51 Author: Hui Tang Date: Thu May 20 11:47:46 2021 +0800 net: wan: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.[ch]' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Xie He Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit dc185ae6ab879a971d3b5b0cb5c98d4ab14157b7 Merge: 2682ea324b000 b4689aaf18633 Author: David S. Miller Date: Thu May 20 15:01:04 2021 -0700 Merge branch 'hns3-debugfs' Huazhong Tan says: ==================== net: hns3: refactor some debugfs commands This series refactors the debugfs command to the new process and removes the useless debugfs file node cmd for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit b4689aaf18633ff1b9ce37b09e226a7964ce9751 Author: Yufeng Mo Date: Thu May 20 10:21:44 2021 +0800 net: hns3: remove the useless debugfs file node cmd Currently, all debugfs commands have been reconstructed, and the debugfs file node cmd is useless. So remove this debugfs file node. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 058c3be95235a12953d6533ef1486dc3d5879688 Author: Yufeng Mo Date: Thu May 20 10:21:43 2021 +0800 net: hns3: refactor dump serv info of debugfs Currently, the debugfs command for serv info is implemented by "echo xxxx > cmd", and record the inforamtion in dmesg. It's unnecessary and heavy. To improve it, create a single file "serv_info" for it, and query it by command "cat serv_info", return the result to userspace, rather than record in dmesg. The display style is below: $ cat service_task_info local_clock: [ 114.203321] delta: 784(ms) last_service_task_processed: 4294918512(jiffies) last_service_task_cnt: 4 Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7b07ab06e6b00b4421a4dfd732e98b359e0bad91 Author: Jiaran Zhang Date: Thu May 20 10:21:42 2021 +0800 net: hns3: refactor dump mac tnl status of debugfs Currently, the debugfs command for dump mac tnl status is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "mac_tnl_status" for it, and query it by command "cat mac_tnl_status", return the result to userspace, rather than record in dmesg. The display style is below: $ cat mac_tnl_status Recently generated mac tnl interruption: [0111204.175437] status = 0x30 [0154120.329912] status = 0x30 Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 484e1ed1b25a6cd02ab25c871e670760f4b627b6 Author: Guangbin Huang Date: Thu May 20 10:21:41 2021 +0800 net: hns3: refactor dump qs shaper of debugfs Currently, user gets qset shaper parameters by implementing debugfs command "echo dump qs shaper > cmd", this command will dump info in dmesg. It's unnecessary and heavy. As there is "tm_qset" file in tm directory for dump qset info, to optimize these command, merge qset shaper parameters to tm_qset file and use cat command to get them. The display style is below: $ cat tm_qset ID MAP_PRI LINK_VLD MODE DWRR IR_B IR_U IR_S BS_B BS_S FLAG 0000 0 1 dwrr 100 150 7 0 5 20 0 0001 0 0 sp 0 150 7 0 5 20 0 Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 95b195869b7d1eb7a1f837f024db31cd6fc07981 Author: Guangbin Huang Date: Thu May 20 10:21:40 2021 +0800 net: hns3: refactor dump qos buf cfg of debugfs Currently, user gets qos buffer config by implementing debugfs command "echo dump qos buf cfg > cmd", this command will dump info in dmesg. It's unnecessary and heavy. To optimize it, create a single file "qos_buf_cfg" in tm directory and use cat command to get info. It will return info to userspace, rather than record in dmesg. The display style is below: $ cat qos_buf_cfg tx_packet_buf_tc_0: 0x120 tx_packet_buf_tc_1: 0x120 tx_packet_buf_tc_2: 0x120 tx_packet_buf_tc_3: 0x120 tx_packet_buf_tc_4: 0x0 tx_packet_buf_tc_5: 0x0 tx_packet_buf_tc_6: 0x0 tx_packet_buf_tc_7: 0x0 ...... Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 28d3bada7d42e324ee8558e6d22c3d768a87af7b Author: Guangbin Huang Date: Thu May 20 10:21:39 2021 +0800 net: hns3: refactor dump qos pri map of debugfs Currently, user gets priority map by implementing debugfs command "echo dump qos pri map > cmd", this command will dump info in dmesg. It's unnecessary and heavy. To optimize it, create a single file "qos_pri_map" in tm directory and use cat command to get info. It will return info to userspace, rather than record in dmesg. The display style is below: $ cat qos_pri_map vlan_to_pri: 0 PRI TC 0 0 1 1 2 2 3 3 4 0 5 1 6 2 Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6571ec2eda65d4e19244bb3e001ec64a6eef41dc Author: Guangbin Huang Date: Thu May 20 10:21:38 2021 +0800 net: hns3: refactor dump qos pause cfg of debugfs Currently, user gets pause config by implementing debugfs command "echo dump qos pause cfg > cmd", this command will dump info in dmesg. It's unnecessary and heavy. To optimize it, create a single file "qos_pause_cfg" in tm directory and use cat command to get info. It will return info to userspace, rather than record in dmesg. The display style is below: $ cat qos_pause_cfg pause_trans_gap: 0x7f pause_trans_time: 0xffff Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0e32038dc8565e8f1c00129307d56fd336267a56 Author: Guangbin Huang Date: Thu May 20 10:21:37 2021 +0800 net: hns3: refactor dump tc of debugfs Currently, user gets tc schedule info by implementing debugfs command "echo dump tc > cmd", this command will dump info in dmesg. It's unnecessary and heavy. To optimize it, create a single file "tc_sch_info" and use cat command to get info. It will return info to userspace, rather than record in dmesg. The display style is below: $ cat tc_sch_info enabled tc number: 4 weight_offset: 14 TC MODE WEIGHT 0 dwrr 25 1 dwrr 25 2 dwrr 25 3 dwrr 25 4 dwrr 0 5 dwrr 0 6 dwrr 0 7 dwrr 0 Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit cad7c215a4b1bc67920ab0d2673ac08a2cc885f1 Author: Guangbin Huang Date: Thu May 20 10:21:36 2021 +0800 net: hns3: refactor dump tm of debugfs Currently, user gets some tm info by implementing debugfs command "echo dump tm > cmd", this command will dump info in dmesg. It's unnecessary and heavy. In addition, the info of this command mixes info of qset, priority, pg and port. Qset and priority have their own command to get info of themself, so can remove info of qset and priority from this command. To optimize it, create two new files "tm_pg", "tm_port" in tm directory and use cat command to separately get info of pg and port. The display style is below: $ cat tm_pg ID PRI_MAP MODE DWRR C_IR_B C_IR_U C_IR_S C_BS_B C_BS_S ... 00 0x1f dwrr 1 75 9 0 31 20 ... $ cat tm_port IR_B IR_U IR_S BS_B BS_S FLAG RATE(Mbps) 75 9 0 31 20 1 200000 Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7679f28e32a48461be4d4c30c14d7be06300cd5d Author: Guangbin Huang Date: Thu May 20 10:21:35 2021 +0800 net: hns3: refactor dump tm map of debugfs Currently, the debugfs command for tm map is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "tm_map" for it, and query it by command "cat tm_map", return the result to userspace, rather than record in dmesg. As user can't specify queue id in cat command, driver will return info of all queue id. The display style is below: $ cat tm_map queue_id qset_id pri_id tc_id 0000 0000 00 00 INDEX | TM BP QSET MAPPING: 0000 | 00000000:00000000:00000000:00000000:00000000:00000000:00000000 0256 | 00000000:00000000:00000000:00000000:00000000:00000002:00000000 0512 | 00000000:00000000:00000000:00000004:00000000:00000000:00000000 0768 | 00000000:00000008:00000000:00000000:00000000:00000000:00000000 Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b5a0b70d77b9be91b8e6dfa5dd3b39ea9cf6be4c Author: Hao Chen Date: Thu May 20 10:21:34 2021 +0800 net: hns3: refactor dump fd tcam of debugfs Currently, the debugfs command for fd tcam is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "fd_tcam" for it, and query it by command "cat fd_tcam", return the result to userspace, rather than record in dmesg. The display style is below: $ cat fd_tcam read result tcam key x(31): 00000000 00000000 00000000 08000000 00000600 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 read result tcam key y(31): 00000000 00000000 00000000 f7ff0000 0000f900 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000fff8 Signed-off-by: Hao Chen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e44c495d95e0dd3a5513f72a830639a72b4c14f1 Author: Hao Chen Date: Thu May 20 10:21:33 2021 +0800 net: hns3: refactor queue info of debugfs Currently, the debugfs command for queue info is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create two files "rx_queue_info" and "tx_queue_info" for it, and query it by command "cat rx_queue_info" and "cat tx_queue_info", return the result to userspace, rather than record in dmesg. The display style is below: $ cat rx_queue_info QUEUE_ID BD_NUM BD_LEN TAIL HEAD FBDNUM PKTNUM ... 0 0 0 0 0 0 0 ... 1 0 0 0 0 0 0 ... 2 0 0 0 0 0 0 ... $ cat tx_queue_info QUEUE_ID BD_NUM TC TAIL HEAD FBDNUM OFFSET PKTNUM ... 0 0 0 0 0 0 0 0 ... 1 0 0 0 0 0 0 0 ... 2 0 0 0 0 0 0 0 ... Signed-off-by: Hao Chen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d2f737cf21b87d4239987da69a3b14730c6a57ad Author: Hao Chen Date: Thu May 20 10:21:32 2021 +0800 net: hns3: refactor queue map of debugfs Currently, the debugfs command for queue map is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "queue_map" for it, and query it by command "cat queue_map", return the result to userspace, rather than record in dmesg. The display style is below: $ cat queue_map local_queue_id global_queue_id vector_id 0 0 341 Signed-off-by: Hao Chen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 365e860aa7a74afe1ba7157b3bfc547551c5795e Author: Yufeng Mo Date: Thu May 20 10:21:31 2021 +0800 net: hns3: refactor dump reg dcb info of debugfs Currently, the debugfs command for reg dcb info is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "dcb" for it, and query it by command "cat dcb", return the result to userspace, rather than record in dmesg. The display style is below: $ cat dcb qset_id roce_qset_mask nic_qset_mask qset_shaping_pass qset_bp_status 0000 0x1 0x1 0x1 0x0 0001 0x1 0x1 0x1 0x0 0002 0x1 0x1 0x1 0x0 0003 0x1 0x1 0x1 0x0 0004 0x1 0x1 0x1 0x0 0005 0x1 0x1 0x1 0x0 0006 0x1 0x1 0x1 0x0 0007 0x1 0x1 0x1 0x0 pri_id pri_mask pri_cshaping_pass pri_pshaping_pass 000 0x1 0x0 0x1 001 0x1 0x0 0x0 002 0x1 0x0 0x0 003 0x1 0x0 0x0 004 0x1 0x0 0x0 005 0x1 0x0 0x0 006 0x1 0x0 0x0 007 0x1 0x0 0x0 pg_id pg_mask pg_cshaping_pass pg_pshaping_pass 000 0x1 0x0 0x1 Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d96b0e59468dcbd61417b7dd31985a700e58d3b2 Author: Yufeng Mo Date: Thu May 20 10:21:30 2021 +0800 net: hns3: refactor dump reg of debugfs Currently, the debugfs command for reg is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create some files "bios_common/ssu/igu_egu/rpu/ncsi/rtc/ppp/rcb/tqp/mac" for it, and query it by command "cat xxx", return the result to userspace, rather than record in dmesg. The display style is below: $ cat bios_common BP_CPU_STATE: 0x0 DFX_MSIX_INFO_NIC_0: 0xc000 DFX_MSIX_INFO_NIC_1: 0x0 DFX_MSIX_INFO_NIC_2: 0x0 DFX_MSIX_INFO_NIC_3: 0x0 DFX_MSIX_INFO_ROC_0: 0xc000 DFX_MSIX_INFO_ROC_1: 0x0 DFX_MSIX_INFO_ROC_2: 0x0 DFX_MSIX_INFO_ROC_3: 0x0 Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b8b0da8312f5dff043dcc58f8b85432b5d3a4ce3 Merge: 6328caf043208 07c74f844b740 Author: Mark Brown Date: Thu May 20 22:00:22 2021 +0100 Merge series "drivers: spi - add parenthesis for sizeof" from Zhiqi Song : This patchset fixes missing parentheses of sizeof reported by checkpatch.pl under drivers/spi/. Zhiqi Song (7): spi: lm70llp: add parenthesis for sizeof spi: mpc512x-psc: add parenthesis for sizeof spi: mpc52xx: add parenthesis for sizeof spi: mpc52xx-psc: add parenthesis for sizeof spi: omap2-mcspi: add parenthesis for sizeof spi: omap-uwire: add parenthesis for sizeof spi: ppc4xx: add parenthesis for sizeof drivers/spi/spi-lm70llp.c | 2 +- drivers/spi/spi-mpc512x-psc.c | 4 ++-- drivers/spi/spi-mpc52xx-psc.c | 4 ++-- drivers/spi/spi-mpc52xx.c | 2 +- drivers/spi/spi-omap-uwire.c | 2 +- drivers/spi/spi-omap2-mcspi.c | 2 +- drivers/spi/spi-ppc4xx.c | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) -- 2.7.4 commit 6d0a12c734c302eead11366856aecdae54a401e8 Author: Daniel Vetter Date: Wed May 19 10:24:09 2021 +0200 drm/ttm: Explain why ttm_bo_add_move_fence uses a shared slot Motivated because I got confused and Christian confirmed why this works. I think this is non-obvious enough that it merits a slightly longer comment. Acked-by: Huang Rui Reviewed-by: Christian König Cc: Christian König Cc: Christian Koenig Cc: Huang Rui Cc: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210519082409.672016-1-daniel.vetter@ffwll.ch commit 0e7c52da1ab82338fc91021cc34e8f2fdaf73de4 Author: Andrew Jeffery Date: Thu May 20 19:09:49 2021 +0930 Documentation: checkpatch: Tweak BIT() macro include While include/linux/bitops.h brings in the BIT() macro, it was moved to include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from to a new file"). Since that commit BIT() has moved again into include/vdso/bits.h via commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO"). I think the move to the vDSO header can be considered an implementation detail, so for now update the checkpatch documentation to recommend use of include/linux/bits.h. Signed-off-by: Andrew Jeffery Acked-by: Jiri Slaby Acked-by: Lukas Bulwahn Acked-by: Dwaipayan Ray Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210520093949.511471-1-andrew@aj.id.au Signed-off-by: Jonathan Corbet commit 2bc602cb0e0d92afec57967cf2212b66cba42ea5 Author: Yue Hu Date: Thu May 20 15:42:25 2021 +0800 docs: block: blk-mq.rst: correct drive -> driver It is 'driver' to complete the request. Also remove a redundant space. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20210520074225.1989-1-zbestahu@gmail.com Signed-off-by: Jonathan Corbet commit 2e684660e56dffa37fc5b92d76a84291a2f1cc87 Author: Geert Uytterhoeven Date: Thu May 20 17:03:40 2021 +0200 dt-bindings: arm: scu: Convert to json-schema Convert the ARM Snoop Control Unit (SCU) Device Tree binding documentation to json-schema. Document required properties. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c5c36fb952675df4b9c9834d53a21fb58f391e86.1621522979.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 50e02e9a030a9ae3feab54dc1bb8f8926786e994 Author: Geert Uytterhoeven Date: Thu May 20 16:45:23 2021 +0200 dt-bindings: timer: arm,twd: Convert to json-schema Convert the ARM Timer-Watchdog Device Tree binding documentation to json-schema. As the old binding document actually contained two bindings, it is split in two document: one for the timer part, and one for the watchdog part. Document missing properties. Update examples to match reality. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3ccc0cf5319f56e230ee3b8a009f8d63afb114c1.1621521847.git.geert+renesas@glider.be [robh: Fix up node names] Signed-off-by: Rob Herring commit 1d92d5569cca0c2c659afb451f2874d9643dda26 Author: Marek Vasut Date: Tue May 18 00:43:36 2021 +0200 dt-bindings: display: Fix spacing in lvds.yaml Add missing spaces to make the diagrams readable, no functional change. Signed-off-by: Marek Vasut Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org To: dri-devel@lists.freedesktop.org Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210517224336.409301-1-marex@denx.de Signed-off-by: Rob Herring commit 5fb82175a2aeb44d174ec60d264e54cb6e1e55f4 Author: Yanteng Si Date: Wed May 12 16:20:59 2021 +0800 docs/zh_CN: add parisc registers.rst translation This patch translates Documentation/parisc/registers.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/b8375b5cd2c5163691691fe4757511ce984f3b83.1620805100.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit b24247ded3e3616d225769bdeaf8782c244c80ee Author: Yanteng Si Date: Wed May 12 16:20:58 2021 +0800 docs/zh_CN: add parisc debugging.rst translation This patch translates Documentation/parisc/debugging.rst into Chinese. Signed-off-by: Yanteng Si Link: https://lore.kernel.org/r/32661b39374f012442b760444ef149afcc0d22af.1620805100.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit fa5b8fef20b12bc7135e69a1b3689b1d677534de Author: Yanteng Si Date: Wed May 12 16:20:57 2021 +0800 docs/zh_CN: add parisc index translation This patch translates Documentation/parisc/index.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/c13ce34b11a65e1f18c4e37566509ead82f2c15f.1620805100.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 76001b8bbf48517e1cb64f5cddcbc4d1369aab0b Author: Dwaipayan Ray Date: Sat May 15 18:53:48 2021 +0530 docs: Add more message type documentations for checkpatch - Document a couple of more checkpatch message types. - Add a blank line before all `See:` lines to improve the rst output. - Create a new subsection `Permissions` and move a few types to it. Signed-off-by: Dwaipayan Ray Acked-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210515132348.19082-1-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet commit ea8c9ed53f871ac90659fe519c85b8f10a51677d Author: Zou Wei Date: Tue May 18 20:35:02 2021 +0800 drm: Fix missing unlock and free on error in drm_legacy_addbufs_pci() Add the missing unlock and free before return from function drm_legacy_addbufs_pci() in the error handling case. Fixes: 70556e24e18e ("drm: remove usage of drm_pci_alloc/free") Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1621341302-112089-1-git-send-email-zou_wei@huawei.com commit cc3496bf8685a5bd0bdd79b23ef06e85184f8863 Author: Wei Ming Chen Date: Sat May 15 23:51:42 2021 +0800 docs: Use fallthrough pseudo-keyword Replace /* fall through */ comment with fallthrough, make it align with original process/coding-style.rst Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210515155142.2490-1-jj251510319013@gmail.com Signed-off-by: Jonathan Corbet commit db1ea668843e048a544021b9bc0aee5aac0b6424 Author: Tiezhu Yang Date: Mon May 17 10:21:23 2021 +0800 samples/kprobes: Fix typo in handler_post() It should use post_handler instead of pre_handler in handler_post(). As Joe Perches suggested, it would be better to use pr_fmt and remove all the embedded pre/post/fault strings. This would change the style of the output through. Fixes: e16c5dd5157e ("samples/kprobes: Add s390 case in kprobe example module") Suggested-by: Joe Perches Signed-off-by: Tiezhu Yang Acked-by: Marc Koderer Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/1621218083-23519-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet commit 2682ea324b000709dafec7e9210caa5189377c45 Author: Zhen Lei Date: Thu May 20 10:14:11 2021 +0800 mISDN: Remove obsolete PIPELINE_DEBUG debugging information As Leon Romanovsky's tips: The definition of macro PIPELINE_DEBUG is commented more than 10 years ago and can be seen as a dead code that should be removed. Suggested-by: Leon Romanovsky Signed-off-by: Zhen Lei Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 61fa308f23b5b189196e8e5835433cdff99a44b0 Author: Tiezhu Yang Date: Mon May 17 10:21:22 2021 +0800 samples/kprobes: Fix typo in handler_fault() Fix a defective format in handler_fault() ending with an 'n' that should be '\n'. Suggested-by: Joe Perches Signed-off-by: Tiezhu Yang Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/1621218083-23519-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet commit 1ca5d41c371e6abe788439e6eaecfa76baaf6979 Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:46 2021 +0200 docs: ABI: sysfs-class-led-trigger-pattern: remove repeat duplication As reported by scripts/get_abi.pl: Warning: /sys/class/leds//repeat is defined 2 times: Documentation/ABI/testing/sysfs-class-led-driver-el15203000:0 Documentation/ABI/testing/sysfs-class-led-trigger-pattern:28 The definition for the EL15203000 is just a special case of the sysfs led class. So, drop it and mentions the possible exception at the class definition. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/394580bd2e007ffb640f97212973a772ed8f0409.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 13d6f96750c89f7fc282788bd058559381ccec29 Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:45 2021 +0200 docs: ABI: sysfs-class-backlight: unify ambient light zone nodes ./scripts/get_abi.pl is warning about duplicated symbol definition: Warning: /sys/class/backlight//l1_daylight_max is defined 2 times: ./Documentation/ABI/testing/sysfs-class-backlight-driver-adp8870:4 ./Documentation/ABI/testing/sysfs-class-backlight-adp8860:12 What happens is that 3 drivers use the same pattern to report max and dim setting for different ambient light zones. It should be noticed that the adp8870 doc was missing an entry for l1_daylight_dim, which was fixed on this patch. While the ambient light zone is device-specific, the sysfs definition is actually common. So, unify them at: Documentation/ABI/testing/sysfs-class-backlight and use as the contact point, the e-mail reported by get_maintainers.pl for the subsystem. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c13c6ebd03cd04a0d15d89018f8d529918fc0a73.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 5286bd25e2095d71d248fbfd2a55ca4333dfd77e Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:44 2021 +0200 docs: ABI: iommu: remove duplicated definition for sysfs-kernel-iommu_groups ./scripts/get_abi.pl is reporting a duplicated definition for /sys/kernel/iommu_groups/reserved_regions, both at the same file: Warning: /sys/kernel/iommu_groups/reserved_regions is defined 2 times: Documentation/ABI/testing/sysfs-kernel-iommu_groups:15 Documentation/ABI/testing/sysfs-kernel-iommu_groups:27 Fix it by merging those into an unified entry. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ec33e8e9b8f120232ffb3b9fcc99c97b87f242e3.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 0a5fab9f085880dbd7f9b0055c74936ca8b64fc1 Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:43 2021 +0200 docs: virt: api.rst: fix a pointer to SGX documentation The document which describes the SGX kernel architecture was added at commit 3fa97bf00126 ("Documentation/x86: Document SGX kernel architecture") but the reference at virt/kvm/api.rst is pointing to some non-existing document. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/138c24633c6e4edf862a2b4d77033c603fc10406.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4b0c9948a4c2f446a11bd592bd7d23f06ad75d8e Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:42 2021 +0200 docs: update pin-control.rst references Changeset 5513b411ea5b ("Documentation: rename pinctl to pin-control") renamed: Documentation/driver-api/pinctl.rst to: Documentation/driver-api/pin-control.rst. Update the cross-references accordingly. Fixes: 5513b411ea5b ("Documentation: rename pinctl to pin-control") Signed-off-by: Mauro Carvalho Chehab Acked-by: Charles Keepax Acked-by: Lee Jones Link: https://lore.kernel.org/r/46ac2e918c7c4a4b701d54870f167b78466ec578.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 716c9d9403d061d02c419a6f63a4f3fd01278cae Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:41 2021 +0200 docs: sched-bwc.rst: fix a typo on a doc name cgroupv2.rst -> cgroup-v2.rst Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1dc0203bd7df375ef45832f0c88566e22c4138ff.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 50bd52fef16dc806be11ba86f406364366f3f23b Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:40 2021 +0200 docs: translations/zh_CN: fix a typo at 8.Conclusion.rst transaltions -> translations Signed-off-by: Mauro Carvalho Chehab Acked-by: Wu XiangCheng Link: https://lore.kernel.org/r/40b3d5c983fb06d8a58d1f613c175a98e0631677.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e437c1a3e7137c0da035a2804bf6b4cc007d4f5e Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:39 2021 +0200 docs: vcpu-requests.rst: fix reference for atomic ops Changeset f0400a77ebdc ("atomic: Delete obsolete documentation") got rid of atomic_ops.rst, pointing that this was superseded by Documentation/atomic_*.txt. Update its reference accordingly. Fixes: f0400a77ebdc ("atomic: Delete obsolete documentation") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/703af756ac26a06c2185c05dfe6d902253f11161.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ee62c89cd45999ba4e09938bd01ec6d1a83ca6d6 Author: Mauro Carvalho Chehab Date: Wed May 19 10:51:38 2021 +0200 docs: update sysfs-platform_profile.rst reference The file name: Documentation/ABI/testing/sysfs-platform_profile.rst should be, instead: Documentation/userspace-api/sysfs-platform_profile.rst. Update its cross-reference accordingly. Fixes: a2ff95e018f1 ("ACPI: platform: Add platform profile support") Fixes: 8e0cbf356377 ("Documentation: Add documentation for new platform_profile sysfs attribute") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Hans de Goede Reviewed-by: Mark Pearson Link: https://lore.kernel.org/r/295089effd8353578b9725c61c0453d920978d72.1621413933.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 808a4ae5fa7dfba286a274e729e40522500c57fe Author: Kai-Heng Feng Date: Wed May 19 21:57:23 2021 +0800 vgaarb: Use ACPI HID name to find integrated GPU Commit 3d42f1ddc47a ("vgaarb: Keep adding VGA device in queue") assumes the first device is an integrated GPU. However, on AMD platforms an integrated GPU can have higher PCI device number than a discrete GPU. Integrated GPU on ACPI platform generally has _DOD and _DOS method, so use that as predicate to find integrated GPU. If the new strategy doesn't work, fallback to use the first device as boot VGA. Reviewed-by: Alex Deucher Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210519135723.525997-1-kai.heng.feng@canonical.com commit cd49f71cff8de325c7602bb2d072bc6d2807387f Author: Zhen Lei Date: Wed May 19 22:19:12 2021 +0800 arm64: dts: broadcom: normalize the node name of the UART devices Change the node name of the UART devices to match "^serial(@[0-9a-f,]+)*$". Signed-off-by: Zhen Lei Signed-off-by: Florian Fainelli commit 9acf59a752d4c686739117d3b3129e60af1ba5c1 Author: Andre Guedes Date: Thu Apr 22 23:25:55 2021 -0700 igc: Enable TX via AF_XDP zero-copy Add support for transmitting packets via AF_XDP zero-copy mechanism. The packet transmission itself is implemented by igc_xdp_xmit_zc() which is called from igc_clean_tx_irq() when the ring has AF_XDP zero-copy enabled. Likewise i40e and ice drivers, the transmission budget used is the number of descriptors available on the ring. A new tx buffer type is introduced to 'enum igc_tx_buffer_type' to indicate the tx buffer uses memory from xsk pool so it can be properly cleaned after transmission or when the ring is cleaned. The I225 controller has only 4 Tx hardware queues so the main difference between igc and other Intel drivers that support AF_XDP zero-copy is that there is no tx ring dedicated exclusively to XDP. Instead, tx rings are shared between the network stack and XDP, and netdev queue lock is used to ensure mutual exclusion. This is the same approach implemented to support XDP_TX and XDP_REDIRECT actions. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit fc9df2a0b520d7d439ecf464794d53e91be74b93 Author: Andre Guedes Date: Thu Apr 22 23:25:54 2021 -0700 igc: Enable RX via AF_XDP zero-copy Add support for receiving packets via AF_XDP zero-copy mechanism. Add a new flag to 'enum igc_ring_flags_t' to indicate the ring has AF_XDP zero-copy enabled so proper ring setup is carried out during ring configuration in igc_configure_rx_ring(). RX buffers can now be allocated via the shared pages mechanism (default behavior of the driver) or via xsk pool (when AF_XDP zero-copy is enabled) so a union is added to the 'struct igc_rx_buffer' to cover both cases. When AF_XDP zero-copy is enabled, rx buffers are allocated from the xsk pool using the new helper igc_alloc_rx_buffers_zc() which is the counterpart of igc_alloc_rx_buffers(). Likewise other Intel drivers that support AF_XDP zero-copy, in igc we have a dedicated path for cleaning up rx irqs when zero-copy is enabled. This avoids adding too many checks within igc_clean_rx_irq(), resulting in a more readable and efficient code since this function is called from the hot-path of the driver. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 859b4dfa4115d11aa1fda7d0628a93a9d61a7c46 Author: Andre Guedes Date: Thu Apr 22 23:25:53 2021 -0700 igc: Replace IGC_TX_FLAGS_XDP flag by an enum Up to this point, Tx buffers are associated with either a skb or a xdpf, and the IGC_TX_FLAGS_XDP flag was enough to distinguish between these two case. However, with upcoming patches that will add AF_XDP zero-copy support, a third case will be introduced so this flag-based approach won't fit well. In preparation to land AF_XDP zero-copy support, replace the IGC_TX_FLAGS_XDP flag by an enum which will be extended once zero-copy support is introduced to the driver. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 6123429516c7fc6a7ee2f0a9dbef8c0c16ffb7cc Author: Andre Guedes Date: Thu Apr 22 23:25:52 2021 -0700 igc: Introduce igc_unmap_tx_buffer() helper In preparation for AF_XDP zero-copy support, encapsulate the code that unmaps Tx buffers into its own local helper so we can reuse it, avoiding code duplication. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit a27e6e73e5501fd0cb84467d71ddeac9a5855e0b Author: Andre Guedes Date: Thu Apr 22 23:25:51 2021 -0700 igc: Introduce TX/RX stats helpers In preparation for AF_XDP zero-copy support, encapsulate the code that updates the driver RX stats in its own local helper so it can be reused in the zero-copy path. Likewise, encapsulate TX stats code as well. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 4609ffb9f6157880e76c038f8df4fbf4e148a41a Author: Andre Guedes Date: Thu Apr 22 23:25:50 2021 -0700 igc: Refactor XDP rxq info registration Refactor XDP rxq info registration code, preparing the driver for AF_XDP zero-copy support which is added by upcoming patches. Currently, xdp_rxq and memory model are both registered during RX resource setup time by igc_xdp_register_rxq_info() helper. With AF_XDP, we want to register the memory model later on while configuring the ring because we will know which memory model type to register (MEM_TYPE_PAGE_SHARED or MEM_TYPE_XSK_BUFF_POOL). The helpers igc_xdp_register_rxq_info() and igc_xdp_unregister_rxq_ info() are not useful anymore so they are removed. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit f485164867d3b960e811d94fc83e12d5a687ef05 Author: Andre Guedes Date: Thu Apr 22 23:25:49 2021 -0700 igc: Refactor igc_clean_rx_ring() Refactor igc_clean_rx_ring() helper, preparing the code for AF_XDP zero-copy support which is added by upcoming patches. The refactor consists of encapsulating page-shared specific code into its own helper, leaving common code that will be shared by both page-shared and xsk pool in igc_clean_rx_ring(). Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 73a6e3721261524567eb5e319d5dc8e37b5f18dc Author: Andre Guedes Date: Thu Apr 22 23:25:48 2021 -0700 igc: Refactor __igc_xdp_run_prog() Refactor __igc_xdp_run_prog() helper from igc_xdp_run_prog(), preparing the code for AF_XDP zero-copy support which is added by upcoming patches. The existing igc_xdp_run_prog() caters to regular XDP rx path which has to verify if bpf_prog is not NULL. Zero-copy path assumes that bpf_prog is not NULL and hence this check is not required. Therefore it makes sense to refactor the common code into a helper function, to avoid code duplication. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 07c74f844b740a858e40fe6c15dd9a2f3b7f6476 Author: Zhiqi Song Date: Tue May 18 09:38:22 2021 +0800 spi: ppc4xx: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-8-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit 19bae51b0191129fd9a6d163678404b77cab24c9 Author: Zhiqi Song Date: Tue May 18 09:38:21 2021 +0800 spi: omap-uwire: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-7-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit 8267dc6d6889235e6dac21156cc9d6e5d5319d3b Author: Zhiqi Song Date: Tue May 18 09:38:20 2021 +0800 spi: omap2-mcspi: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-6-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit 75d4c2d64b30c8583b82afdcc9dc4db2083dee5b Author: Zhiqi Song Date: Tue May 18 09:38:19 2021 +0800 spi: mpc52xx-psc: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-5-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit ac7357ac769e3b4bd52e691f22d745c89126069f Author: Zhiqi Song Date: Tue May 18 09:38:18 2021 +0800 spi: mpc52xx: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-4-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit 722cb2b197e125d6816aac43ec2d411c7b22daa9 Author: Zhiqi Song Date: Tue May 18 09:38:17 2021 +0800 spi: mpc512x-psc: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-3-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit a2bd5afd59c1dec8e559096c3a5c912360c267ca Author: Zhiqi Song Date: Tue May 18 09:38:16 2021 +0800 spi: lm70llp: add parenthesis for sizeof Fix missing parenthesis of sizeof reported by checkpatch.pl: WARNING: sizeof *pp should be sizeof(*pp). The kernel coding style suggests thinking of sizeof as a function and add parenthesis. Cc: Kaiwan N Billimoria Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1621301902-64158-2-git-send-email-songzhiqi1@huawei.com Signed-off-by: Mark Brown commit 6328caf043208556e782a53a284c9acfcf6be3b0 Author: Mauro Carvalho Chehab Date: Wed May 19 10:15:36 2021 +0200 spi: fix some invalid char occurrences One of the author names got an invalid char, probably due to a bad charset conversion, being replaced by the REPLACEMENT CHARACTER U+fffd ('�'). Use the author's e-mail has the characters without accents, as also used at the .mailmap file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ff8d296e1fdcc4f1c6df94434a5720bcedcd0ecf.1621412009.git.mchehab+huawei@kernel.org Signed-off-by: Mark Brown commit e56360d6a119f531506658ea87238e48ad4c95c2 Author: Andy Shevchenko Date: Thu May 20 15:05:18 2021 +0300 regmap: mdio: Don't modify output if error happened regmap_mdio_read() breaks the principle of "no touch output till it's known that the operation succeeds". Refactor it accordingly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210520120518.30490-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit aa736700f42fa0813e286ca2f9274ffaa25163b9 Author: Shengjiu Wang Date: Mon May 17 18:31:28 2021 +0800 ASoC: imx-card: Add imx-card machine driver Add machine driver for i.MX boards, which supports AK4458/AK5558/AK4497/AK5552 DAC/ADC attached to SAI interface currently, but these DAC/ADCs are not only supported codecs. This machine driver is designed to be a more common machine driver for i.MX platform, it can support widely cpu dai interface and codec dai interface. Signed-off-by: Shengjiu Wang Signed-off-by: Mihai Serban Signed-off-by: Cosmin-Gabriel Samoila Signed-off-by: Viorel Suman Signed-off-by: Daniel Baluta Signed-off-by: Adrian Alonso Link: https://lore.kernel.org/r/1621247488-21412-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 623cd9cfcac522647e3624e48bf0661a39e8502a Author: Shengjiu Wang Date: Mon May 17 18:31:27 2021 +0800 ASoC: dt-bindings: imx-card: Add binding doc for imx sound card Imx-card is a new added machine driver for supporting ak4458/ak5558/ak5552/ak4497 codec on i.MX platforms. But these DAC/ADCs are not only supported codecs. This machine driver is designed to be a more common machine driver for i.MX platform, it can support widely cpu dai interface and codec dai interface. Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1621247488-21412-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit b9c035aa43b8c074b3bcfdaaa8bea2537d85b7c3 Author: Jaska Uimonen Date: Wed May 19 13:07:13 2021 +0300 ASoC: topology: Fix using uninitialized pointer The original patch changed kcontrol_type to a pointer. In some goto cases the pointer is assigned into a struct member as uninitialized and this will cause a runtime error with UBSan even if it isn't a real bug. So initialize the pointer to NULL. Reported-by: Dan Carpenter Fixes: d29d41e28eea ("ASoC: topology: Add support for multiple kcontrol types to a widget") Signed-off-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210519100713.879958-1-jaska.uimonen@linux.intel.com Signed-off-by: Mark Brown commit 0c20f2d29fff7ecd3b2802536d0089ed908304a5 Author: Andre Guedes Date: Thu Apr 22 23:25:47 2021 -0700 igc: Move igc_xdp_is_enabled() Move the helper igc_xdp_is_enabled() to igc_xdp.h so it can be reused in igc_xdp.c by upcoming patches that will introduce AF_XDP zero-copy support to the driver. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit bc794f8c56abddf709f1f84fcb2a3c9e7d9cc9b4 Author: Jerome Brunet Date: Thu Apr 29 11:03:25 2021 +0200 clk: meson: g12a: fix gp0 and hifi ranges While some SoC samples are able to lock with a PLL factor of 55, others samples can't. ATM, a minimum of 60 appears to work on all the samples I have tried. Even with 60, it sometimes takes a long time for the PLL to eventually lock. The documentation says that the minimum rate of these PLLs DCO should be 3GHz, a factor of 125. Let's use that to be on the safe side. With factor range changed, the PLL seems to lock quickly (enough) so far. It is still unclear if the range was the only reason for the delay. Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20210429090325.60970-1-jbrunet@baylibre.com commit 331859d320f568a5ef8912063a2ec56956e519d9 Author: Lang Cheng Date: Thu May 20 11:54:36 2021 +0800 RDMA/hns: Remove unused CMDQ member The hcr_mutex was used to serialize mailbox post. Now that mailbox supports concurrency, this variable is no longer useful. Fixes: a389d016c030 ("RDMA/hns: Enable all CMDQ context") Link: https://lore.kernel.org/r/1621482876-35780-4-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 21090b5d8c98a2b2dd97a5566151082a626c170e Author: Lang Cheng Date: Thu May 20 11:54:35 2021 +0800 RDMA/hns: Remove Receive Queue of CMDQ The CRQ of CMDQ is unused, so remove code about it. Link: https://lore.kernel.org/r/1621482876-35780-3-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4511624a3514e5eb4af7aa4d7fb0b491dd06ae5a Author: Lang Cheng Date: Thu May 20 11:54:34 2021 +0800 RDMA/hns: Rename CMDQ head/tail pointer to PI/CI The same name represents opposite meanings in new/old driver, it is hard to maintain, so rename them to PI/CI. Link: https://lore.kernel.org/r/1621482876-35780-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b6989da85a27568088c91d3c8184050cf073a4fc Author: Xi Wang Date: Thu May 20 11:35:51 2021 +0800 RDMA/hns: Refactor extend link table allocation The timeout link table works in HIP08 ES version and the hns driver only support the CS version for HIP08, so delete the related code. Then simplify the buffer allocation for link table to make the code more readable. Link: https://lore.kernel.org/r/1621481751-27375-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 800de3f55770529ae1e59e175b6bae73bedfa355 Author: Tian Tao Date: Thu May 20 17:39:37 2021 +0800 RDMA/cxgb4: Remove useless assignments If go to the err label, abort will be assigned a value of 1, so there is no need to assign a value of 1 here. Link: https://lore.kernel.org/r/1621503577-18093-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Tian Tao Signed-off-by: Jason Gunthorpe commit 12a7a9966247f893a4f825cbfa776edbffe9b9f5 Author: Shaokun Zhang Date: Wed May 19 17:43:35 2021 +0800 IB/hfi1: Remove the repeated declaration Function 'init_credit_return' and 'sc_return_credits' are declared twice, remove the repeated declaration. Link: https://lore.kernel.org/r/1621417415-3772-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Shaokun Zhang Signed-off-by: Jason Gunthorpe commit b50155c65c579c3ad6e73010e400e9ea7b15860a Author: Lee Jones Date: Thu May 20 13:19:06 2021 +0100 tty: serial: xilinx_uartps: Fix documentation for cdns_uart_clk_notifier_cb() Fixes the following W=1 kernel build warning(s): drivers/tty/serial/xilinx_uartps.c:496: warning: expecting prototype for cdns_uart_clk_notitifer_cb(). Prototype was for cdns_uart_clk_notifier_cb() instead Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Michal Simek Cc: linux-serial@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Michal Simek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 542a121aea6d72114f9050707f69b9265ef1d9c8 Author: Lee Jones Date: Thu May 20 13:19:05 2021 +0100 tty: n_gsm: Fix function naming and provide missing param descriptions Fixes the following W=1 kernel build warning(s): drivers/tty/n_gsm.c:525: warning: expecting prototype for gsm_stuff_packet(). Prototype was for gsm_stuff_frame() instead drivers/tty/n_gsm.c:1608: warning: expecting prototype for gsm_dlci_control(). Prototype was for gsm_dlci_command() instead drivers/tty/n_gsm.c:2561: warning: Function parameter or member 'cookie' not described in 'gsmld_read' drivers/tty/n_gsm.c:2561: warning: Function parameter or member 'offset' not described in 'gsmld_read' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0e4b5597350e4c0fe943a666819aacd31b06d6e8 Author: Lee Jones Date: Thu May 20 13:19:04 2021 +0100 tty: serial: st-asc: Demote a kernel-doc formatting abuse Fixes the following W=1 kernel build warning(s): drivers/tty/serial/st-asc.c:73: warning: expecting prototype for Some of status comes from higher bits of the character and some come from(). Prototype was for ASC_RXBUF_DUMMY_RX() instead Cc: Patrice Chotard Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ef80f77ba29ec824e249d15b63d6a1cddd7eebd2 Author: Lee Jones Date: Thu May 20 13:19:03 2021 +0100 tty: n_hdlc: Fix a little doc-rot in n_hdlc_tty_read() Fixes the following W=1 kernel build warning(s): drivers/tty/n_hdlc.c:421: warning: Function parameter or member 'kbuf' not described in 'n_hdlc_tty_read' drivers/tty/n_hdlc.c:421: warning: Function parameter or member 'cookie' not described in 'n_hdlc_tty_read' drivers/tty/n_hdlc.c:421: warning: Function parameter or member 'offset' not described in 'n_hdlc_tty_read' drivers/tty/n_hdlc.c:421: warning: Excess function parameter 'buf' description in 'n_hdlc_tty_read' Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Paul Fulghum Cc: Michael Callahan Cc: Al Longyear Cc: Paul Mackerras Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6ef6785d781e9cea207cdd9e530878fa7cda8e2a Author: Lee Jones Date: Thu May 20 13:19:01 2021 +0100 tty: tty_jobctrl: Fix 2 incorrectly documented functions Fixes the following W=1 kernel build warning(s): drivers/tty/tty_jobctrl.c:33: warning: expecting prototype for tty_check_change(). Prototype was for __tty_check_change() instead drivers/tty/tty_jobctrl.c:97: warning: expecting prototype for proc_set_tty(). Prototype was for __proc_set_tty() instead Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a1c0da88f1ca3966ec73e0cc579153a784f20ce0 Author: Lee Jones Date: Thu May 20 13:19:00 2021 +0100 tty: tty_buffer: Fix incorrectly documented function __tty_buffer_request_room() Fixes the following W=1 kernel build warning(s): drivers/tty/tty_buffer.c:259: warning: expecting prototype for tty_buffer_request_room(). Prototype was for __tty_buffer_request_room() instead Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1d31d0caa33fdc3d65fdee804771c5ed307eb12c Author: Lee Jones Date: Thu May 20 13:18:57 2021 +0100 tty: serdev: core: Fix misspelled function name __serdev_device_driver_register() Fixes the following W=1 kernel build warning(s): drivers/tty/serdev/core.c:809: warning: expecting prototype for serdev_driver_register(). Prototype was for __serdev_device_driver_register() instead Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 816cea10285d148a0d8bcaeeca6ba84c947f945f Author: Lee Jones Date: Thu May 20 13:18:56 2021 +0100 tty: vt: selection: Correct misspelled function sel_loadlut() Fixes the following W=1 kernel build warning(s): drivers/tty/vt/selection.c:119: warning: expecting prototype for set loadlut(). Prototype was for sel_loadlut() instead Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210520121906.3468725-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6dc760027d29364aab77e3c57f0e04a4e82476e9 Author: Guenter Roeck Date: Fri May 14 08:36:06 2021 -0700 RDMA/bnxt_re: Drop unnecessary NULL checks after container_of The result of container_of() operations is never NULL unless the first element of the embedding structure is extracted. This is either not the case here, or the pointer passed to container_of() is known to be not NULL. The NULL checks are therefore unnecessary and misleading. Remove them. The channges in this patch were made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Link: https://lore.kernel.org/r/20210514153606.1377119-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Jason Gunthorpe commit d06e256f7a4bee97324a0fa316f0326ab7468347 Author: Jiri Slaby Date: Wed May 19 09:21:53 2021 +0200 tty: fix kernel-doc for {start,stop}_tty Commit f9e053dcfc02 (tty: Serialize tty flow control changes with flow_lock) renamed start_tty to __start_tty and stop_tty to __stop_tty and introduced new start_tty and stop_tty. But it left kernel-doc comments on the old locations: tty_io.c:785: warning: expecting prototype for stop_tty(). Prototype was for __stop_tty() instead tty_io.c:816: warning: expecting prototype for start_tty(). Prototype was for __start_tty() instead Fix that by moving the comments to appropriate locations. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210519072153.3859-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 756a4e4a7a4b866f1d834e206cb370988cf394d1 Author: Jiri Slaby Date: Wed May 19 09:21:52 2021 +0200 tty: fix kernel-doc for tty_{read,write} After commits a9cbbb80e3e7 (tty: avoid using vfs_iocb_iter_write() for redirected console writes) and dd78b0c483e3 (tty: implement read_iter), the tty_read and tty_write kernel-doc comments don't match the code: tty_io.c:931: warning: Function parameter or member 'iocb' not described in 'tty_read' tty_io.c:931: warning: Function parameter or member 'to' not described in 'tty_read' tty_io.c:931: warning: Excess function parameter 'file' description in 'tty_read' tty_io.c:931: warning: Excess function parameter 'buf' description in 'tty_read' tty_io.c:931: warning: Excess function parameter 'count' description in 'tty_read' tty_io.c:931: warning: Excess function parameter 'ppos' description in 'tty_read' tty_io.c:1115: warning: Function parameter or member 'iocb' not described in 'file_tty_write' tty_io.c:1115: warning: Function parameter or member 'from' not described in 'file_tty_write' tty_io.c:1115: warning: expecting prototype for tty_write(). Prototype was for file_tty_write() instead Fix them to correspond the reality, i.e. the switch from read/write to read_iter/write_iter. Cc: Linus Torvalds Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210519072153.3859-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit cd256b068f80e8b4a1eccd73527b67b3eb50f7ad Author: Jiri Slaby Date: Wed May 19 09:21:51 2021 +0200 tty/serial: make port of serial8250_register_8250_port const After the previous patch, we can make port passed to serial8250_find_match_or_unused const. And then we can make const also port of serial8250_register_8250_port. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210519072153.3859-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b8be5db573b822920b0f6230498d900752bede17 Author: Jiri Slaby Date: Wed May 19 09:21:50 2021 +0200 tty/serial: clean up uart_match_port * make parameters const (as they are only read) * return bool (as comparison results are returned) * add \n before final return Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210519072153.3859-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit cd5b010ffff2652cf6b153d9e796f4e3b90aebb6 Author: Lang Cheng Date: Wed May 12 16:12:22 2021 +0800 RDMA/rxe: Remove unused parameter udata The old version of ib_umem_get() need these udata as a parameter but now they are unnecessary. Fixes: c320e527e154 ("IB: Allow calls to ib_umem_get from kernel ULPs") Link: https://lore.kernel.org/r/1620807142-39157-5-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Zhu Yanjun Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0bedd3d0050b29fcbf1cf61899618780fe54ecf0 Author: Lang Cheng Date: Wed May 12 16:12:21 2021 +0800 RDMA/mlx5: Remove unused parameter udata The old version of ib_umem_get() need these udata as a parameter but now they are unnecessary. Fixes: c320e527e154 ("IB: Allow calls to ib_umem_get from kernel ULPs") Link: https://lore.kernel.org/r/1620807142-39157-4-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aca496fb61d3a31c29b551edd2d0a7f503d9c411 Author: Lang Cheng Date: Wed May 12 16:12:20 2021 +0800 RDMA/mlx4: Remove unused parameter udata The old version of ib_umem_get() need these udata as a parameter but now they are unnecessary. Fixes: c320e527e154 ("IB: Allow calls to ib_umem_get from kernel ULPs") Link: https://lore.kernel.org/r/1620807142-39157-3-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 69e0a42f3f79b8bcd83b55b3b0eff8d01aa6b57e Author: Lang Cheng Date: Wed May 12 16:12:19 2021 +0800 RDMA/hns: Remove unused parameter udata The old version of ib_umem_get() need these udata as a parameter but now they are unnecessary. Fixes: c320e527e154 ("IB: Allow calls to ib_umem_get from kernel ULPs") Link: https://lore.kernel.org/r/1620807142-39157-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c906b86e9c44946fae505a5996b1f4c24a699fe6 Author: Sergey Gorenko Date: Mon May 10 13:23:33 2021 +0300 RDMA/mlx5: Add SQD2RTS bit to the alloc ucontext response The new bit in the comp_mask is needed to mark that kernel supports SQD2RTS transition for the modify QP command. Link: https://lore.kernel.org/r/7ce705fedac1b2b8e3a2f4013e04244dc5946344.1620641808.git.leonro@nvidia.com Reviewed-by: Evgenii Kochetov Signed-off-by: Sergey Gorenko Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 021c1f24f002e9312ad3516f65f148299f2eb4ee Author: Sergey Gorenko Date: Mon May 10 13:23:32 2021 +0300 RDMA/mlx5: Support SQD2RTS for modify QP The transition of the QP state from SQD to RTS is allowed by the IB specification. The hardware also supports that, but it is not implemented in mlx5_ib. This commit adds SQD2RTS command to the modify QP in mlx5_ib to support the missing feature. The feature is required by the signature pipelining API that will be added to rdma-core. Link: https://lore.kernel.org/r/ab4876360bfba0e9d64a5e8599438e32e0cb351e.1620641808.git.leonro@nvidia.com Reviewed-by: Evgenii Kochetov Signed-off-by: Sergey Gorenko Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4bc2bd5aefd60a2837a20b1e88e89eaaa677d229 Author: Stafford Horne Date: Mon May 17 20:54:52 2021 +0900 serial: liteuart: Add support for earlycon Most litex boards using RISC-V soft cores us the sbi earlycon, however this is not available for non RISC-V litex SoC's. This patch enables earlycon for liteuart which is available on all Litex SoC's making support for earycon debugging more widely available. Cc: Florent Kermarrec Cc: Mateusz Holenko Cc: Joel Stanley Cc: Gabriel L. Somlo Reviewed-and-tested-by: Gabriel Somlo Reviewed-by: Jiri Slaby Reviewed-by: Joel Stanley Signed-off-by: Stafford Horne Link: https://lore.kernel.org/r/20210517115453.24365-1-shorne@gmail.com Signed-off-by: Greg Kroah-Hartman commit 758dfe3ddcae59b337d4109331f9be39da53b0ed Author: Lukas Bulwahn Date: Tue May 18 07:21:17 2021 +0200 MAINTAINERS: TTY LAYER: add some ./include/linux/ header files An early prototypical automated code analysis of headers and the existing MAINTAINERS sections identified some header files in ./include/linux/ to be probably included into the TTY LAYER section. I further checked those suggestions by this analysis and identified a subset of files that I am rather certain to belong to the TTY LAYER. Add these ./include/linux/ header files to TTY LAYER in MAINTAINERS. The patterns include/linux/tty*.h and include/linux/vt_*.h currently cover: include/linux/tty.h include/linux/tty_driver.h include/linux/tty_flip.h include/linux/tty_ldisc.h include/linux/vt_buffer.h include/linux/vt_kern.h Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210518052117.14819-2-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6038cf46e376e21a689605e64ab5152e673ac7e Author: Yang Yingliang Date: Tue May 18 12:53:53 2021 +0800 tty: pty: correct function name pty_resize() Fix the following make W=1 kernel build warning: drivers/tty/pty.c:307: warning: expecting prototype for pty_do_resize(). Prototype was for pty_resize() instead Reviewed-by: Jiri Slaby Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210518045353.611017-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 4503b1c29db414de608e62d7c67753be8926b2fa Author: Colin Ian King Date: Thu May 13 23:18:33 2021 +0100 tty: pty: remove redundant initialization of variable fd The variable fd is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Reviewed-by: Jiri Slaby Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210513221833.137672-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit cb1b206cff461d02ce373f54f1d215532cc5ac7c Author: Andy Shevchenko Date: Mon May 17 20:34:15 2021 +0300 serial: sc16is7xx: Use devm_clk_get_optional() Replace open coded variants of devm_clk_get_optional(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517173415.7483-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d4d6f03c4fb3a91dadfe147b47edd40e4d7e4d36 Author: Andy Shevchenko Date: Mon May 17 20:29:30 2021 +0300 serial: max310x: Try to get crystal clock rate from property In some configurations, mainly ACPI-based, the clock frequency of the device is supplied by very well established 'clock-frequency' property. Hence, try to get it from the property at last if no other providers are available. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517172930.83353-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 18ee37e1382a7c4840e753bc8e9ba5fd5dc663f5 Author: Johan Hovold Date: Wed May 19 11:25:41 2021 +0200 serial: drop irq-flags initialisations There's no need to initialise irq-flags variables before saving the interrupt state. Drop the redundant initialisations from drivers that got this wrong. Acked-by: Uwe Kleine-König Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210519092541.10137-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1d751b04a49dd7c2c7a07388074d262225f4de74 Author: Andreas Färber Date: Mon May 17 01:05:44 2021 +0200 dt-bindings: serial: snps-dw-apb-uart: Add Rockchip RK1808 Add a Rockchip RK1808 compatible. Signed-off-by: Andreas Färber Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210516230551.12469-3-afaerber@suse.de Signed-off-by: Greg Kroah-Hartman commit 1e49b0954c91019f51ce22cd0bce2297dd928f8c Author: Colin Ian King Date: Fri May 14 00:02:24 2021 +0100 serial: kgdb_nmi: remove redundant initialization of variable c The variable c is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Reviewed-by: Jiri Slaby Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210513230224.138859-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 064b6e47b2b2d4a20566ba6f8dc90e46b599b35f Author: Biju Das Date: Fri May 14 20:22:12 2021 +0100 serial: sh-sci: Add support for RZ/G2L SoC Add serial support for RZ/G2L SoC with earlycon and extended mode register support. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210514192218.13022-11-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 92e06e12212abe4b27ff18445a0f88e6b5236331 Author: Lad Prabhakar Date: Fri May 14 20:22:11 2021 +0100 dt-bindings: serial: renesas,scif: Document r9a07g044 bindings Document R9A07G044 SoC variants, common compatiable string "renesas,scif-r9a07g044" is added for RZ/G2L and RZ/G2LC SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210514192218.13022-10-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 27d44e05d7b85d9d4cfe0a3c0663ea49752ece93 Author: Neil Armstrong Date: Tue May 18 09:58:32 2021 +0200 tty: serial: meson: retrieve port FIFO size from DT Now the DT bindings has a property to get the FIFO size for a particular port, retrieve it and use to setup the FIFO interrupts threshold. Reviewed-by: Kevin Hilman Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210518075833.3736038-3-narmstrong@baylibre.com Signed-off-by: Greg Kroah-Hartman commit f985b0b6e1db4d5301379c5207606de915f9c4d0 Author: Neil Armstrong Date: Tue May 18 09:58:31 2021 +0200 dt-bindings: serial: amlogic, meson-uart: add fifo-size property On most of the Amlogic SoCs, the first UART controller in the "Everything-Else" power domain has 128bytes of RX & TX FIFO, so add an optional property to describe a different FIFO size from the other ports (64bytes). Reviewed-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210518075833.3736038-2-narmstrong@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 89cf71e62cd39da12e7a6e36ae6db126391ca9e2 Author: Mauro Carvalho Chehab Date: Thu May 20 16:05:45 2021 +0200 media: davinci: fix two kernel-doc comments A typo there is causing two warnings: drivers/media/platform/davinci/vpif_display.c:114: warning: Function parameter or member 'nplanes' not described in 'vpif_buffer_queue_setup' drivers/media/platform/davinci/vpif_capture.c:112: warning: Function parameter or member 'nplanes' not described in 'vpif_buffer_queue_setup' Signed-off-by: Mauro Carvalho Chehab commit 10f05966c52052c06ec4303ffc2f8185df713784 Author: Mauro Carvalho Chehab Date: Mon Apr 26 14:26:43 2021 +0200 media: hantro: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. While there's nothing wrong with the current usage on this driver, as we're getting rid of the pm_runtime_get_sync() call all over the media subsystem, let's remove the last occurrence on this driver. Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit 334fe327a8b4fdebea14af478f7f6185d45e566b Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:20 2021 +0200 media: rcar-vin: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab commit 71aeaedc968343c644b3c073b715b24b909ef088 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:21 2021 +0200 media: vsp1: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. As a bonus, pm_runtime_resume_and_get() always return 0 on success. So, the code can be simplified. Signed-off-by: Mauro Carvalho Chehab commit 588bc430133c912f0ff39c375eae9baa81978d1e Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:21 2021 +0200 media: ti-vpe: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 79e790ff0bc5192f874cc587c462825556133d1c Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:21 2021 +0200 media: sunxi: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 75c573eb704178051637fdcd980e2850e0932080 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:21 2021 +0200 media: stm32: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 67b92f54186c0bf17038833cc376adaf133a4b6a Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:20 2021 +0200 media: s5p-mfc: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit a8779c2752f27f045f60bb191e257528374dc45c Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:20 2021 +0200 media: s3c-camif: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 8102cf89ecd594572433ffb9103ce104ae57927e Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:20 2021 +0200 media: rkisp1: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit c311f53362b05a82b47d1ed9dcfeb4637063b8d7 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:19 2021 +0200 media: rcar-fcp: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. As a bonus, pm_runtime_resume_and_get() always return 0 on success. So, the code can be simplified. Signed-off-by: Mauro Carvalho Chehab commit 50c3ffb49c953a203b5a16d4e4d55b03c57e8883 Author: wengjianfeng Date: Thu May 20 16:06:46 2021 +0800 drm/i915/gt: fix typo issue Change 'freqency' to 'frequency'. Signed-off-by: wengjianfeng Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210520080646.24132-1-samirweng1979@163.com commit b337b4965e3a3e567f11828a9e3fe3fb3faefa47 Author: H. Peter Anvin (Intel) Date: Tue May 18 12:13:02 2021 -0700 x86/entry: Treat out of range and gap system calls the same The current 64-bit system call entry code treats out-of-range system calls differently than system calls that map to a hole in the system call table. This is visible to the user if system calls are intercepted via ptrace or seccomp and the return value (regs->ax) is modified: in the former case, the return value is preserved, and in the latter case, sys_ni_syscall() is called and the return value is forced to -ENOSYS. The API spec in is very clear that only (int)-1 is the non-system-call sentinel value, so make the system call behavior consistent by calling sys_ni_syscall() for all invalid system call numbers except for -1. Although currently sys_ni_syscall() simply returns -ENOSYS, calling it explicitly is friendly for tracing and future possible extensions, and as this is an error path there is no reason to optimize it. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210518191303.4135296-6-hpa@zytor.com commit 0595494891723a1dcca5eaa8eeca8ab54ad953b9 Author: H. Peter Anvin (Intel) Date: Tue May 18 12:13:01 2021 -0700 x86/entry/64: Sign-extend system calls on entry to int Right now, *some* code will treat e.g. 0x0000000100000001 as a system call and some will not. Some of the code, notably in ptrace, will treat 0x000000018000000 as a system call and some will not. Finally, right now, e.g. 335 for x86-64 will force the exit code to be set to -ENOSYS even if poked by ptrace, but 548 will not, because there is an observable difference between an out of range system call and a system call number that falls outside the range of the table. This is visible to the user: for example, the syscall_numbering_64 test fails if run under strace, because as strace uses ptrace, it ends up clobbering the upper half of the 64-bit system call number. The architecture independent code all assumes that a system call is "int" that the value -1 specifically and not just any negative value is used for a non-system call. This is the case on x86 as well when arch-independent code is involved. The arch-independent API is defined/documented (but not *implemented*!) in . This is an ABI change, but is in fact a revert to the original x86-64 ABI. The original assembly entry code would zero-extend the system call number; Use sign extend to be explicit that this is treated as a signed number (although in practice it makes no difference, of course) and to avoid people getting the idea of "optimizing" it, as has happened on at least two(!) separate occasions. Do not store the extended value into regs->orig_ax, however: on x86-64, the ABI is that the callee is responsible for extending parameters, so only examining the lower 32 bits is fully consistent with any "int" argument to any system call, e.g. regs->di for write(2). The full value of %rax on entry to the kernel is thus still available. [ tglx: Add a comment to the ASM code ] Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210518191303.4135296-5-hpa@zytor.com commit 795e2a023b8080b95442811f26f0762184116caa Author: H. Peter Anvin (Intel) Date: Tue May 18 12:13:00 2021 -0700 selftests/x86/syscall: Add tests under ptrace to syscall_numbering_64 Add tests running under ptrace for syscall_numbering_64. ptrace stopping on syscall entry and possibly modifying the syscall number (regs.orig_rax) or the default return value (regs.rax) can have different results than the normal system call path. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210518191303.4135296-4-hpa@zytor.com commit c5c39488dcb5f818bb07f856a349262d667ef147 Author: H. Peter Anvin (Intel) Date: Tue May 18 12:12:59 2021 -0700 selftests/x86/syscall: Simplify message reporting in syscall_numbering Reduce some boiler plate in printing and indenting messages. This makes it easier to produce clean status output. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210518191303.4135296-3-hpa@zytor.com commit 15c82d98a0f783bd4b2715ea910f7bb526367f54 Author: H. Peter Anvin (Intel) Date: Tue May 18 12:12:58 2021 -0700 selftests/x86/syscall: Update and extend syscall_numbering_64 Update the syscall_numbering_64 selftest to reflect that a system call is to be extended from 32 bits. Add a mix of tests for valid and invalid system calls in 64-bit and x32 space. Use an explicit system call instruction, because the glibc syscall() wrapper might intercept instructions, extend the system call number independently, or anything similar. Use long long instead of long to make it possible to compile this test on x32 as well as 64 bits. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210518191303.4135296-2-hpa@zytor.com commit fcd8cf0e3e48f4c66af82c8e799c37cb0cccffe0 Author: Hans de Goede Date: Tue May 4 20:57:45 2021 +0200 platform/x86: touchscreen_dmi: Add info for the Goodix GT912 panel of TM800A550L tablets The Bay Trail Glavey TM800A550L tablet, which ships with Android installed from the factory, uses a GT912 touchscreen controller which needs to have its firmware uploaded by the OS to work (this is a first for a x86 based device with a Goodix touchscreen controller). Add a touchscreen_dmi entry for this which specifies the filenames to use for the firmware and config files needed for this. Note this matches on a GDIX1001 ACPI HID, while the original DSDT uses a HID of GODX0911. For the touchscreen to work on these devices a DSDT override is necessary to fix a missing IRQ and broken GPIO settings in the ACPI-resources for the touchscreen. This override also changes the HID to the standard GDIX1001 id typically used for Goodix touchscreens. The DSDT override is available here: https://fedorapeople.org/~jwrdegoede/glavey-tm800a550l-dsdt-override/ Reviewed-by: Bastien Nocera Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210504185746.175461-5-hdegoede@redhat.com commit a22e3803f2a4d947ff0083a9448a169269ea0f62 Author: Hans de Goede Date: Tue May 4 20:57:44 2021 +0200 platform/x86: touchscreen_dmi: Add an extra entry for the upside down Goodix touchscreen on Teclast X89 tablets Teclast X89 tablets come in 2 versions, with Windows pre-installed and with Android pre-installed. These 2 versions have different DMI strings. Add a match for the DMI strings used by the Android version BIOS. Note the Android version BIOS has a bug in the DSDT where no IRQ is provided, so for the touchscreen to work a DSDT override fixing this is necessary as well. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210504185746.175461-4-hdegoede@redhat.com commit 5a6f0dbe621a5c20dc912ac474debf9f11129e03 Author: Hans de Goede Date: Tue May 4 20:57:42 2021 +0200 Input: goodix - platform/x86: touchscreen_dmi - Move upside down quirks to touchscreen_dmi.c Move the DMI quirks for upside-down mounted Goodix touchscreens from drivers/input/touchscreen/goodix.c to drivers/platform/x86/touchscreen_dmi.c, where all the other x86 touchscreen quirks live. Note the touchscreen_dmi.c code attaches standard touchscreen device-properties to an i2c-client device based on a combination of a DMI match + a device-name match. I've verified that the: Teclast X98 Pro, WinBook TW100 and WinBook TW700 uses an ACPI devicename of "GDIX1001:00" based on acpidumps and/or dmesg output available on the web. This patch was tested on a Teclast X89 tablet. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210504185746.175461-2-hdegoede@redhat.com commit 3cba325b358f86357b5ce50eb9e6633183927eee Author: Masahiro Yamada Date: Mon May 17 16:38:14 2021 +0900 x86/syscalls: Switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. Converts x86 to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210517073815.97426-7-masahiroy@kernel.org commit 49f731f1972e6e44d8a5c3982a72902b3944bc34 Author: Masahiro Yamada Date: Mon May 17 16:38:13 2021 +0900 x86/syscalls: Use __NR_syscalls instead of __NR_syscall_max __NR_syscall_max is only used by x86 and UML. In contrast, __NR_syscalls is widely used by all the architectures. Convert __NR_syscall_max to __NR_syscalls and adjust the usage sites. This prepares x86 to switch to the generic syscallhdr.sh script. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210517073815.97426-6-masahiroy@kernel.org commit f63815eb1d909a4121806e60928108ff040bf291 Author: Masahiro Yamada Date: Mon May 17 16:38:12 2021 +0900 x86/unistd: Define X32_NR_syscalls only for 64-bit kernel X32_NR_syscalls is needed only when building a 64bit kernel. Move it to proper #ifdef guard. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210517073815.97426-5-masahiroy@kernel.org commit 44fe4895f47cbe9f4692e1d3cdc2ef8352f4d88e Author: Masahiro Yamada Date: Mon May 17 16:38:11 2021 +0900 x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall This is a follow-up cleanup after switching to the generic syscalltbl.sh. The old x86 specific script skipped non-existing syscalls. So, the generated syscalls_64.h, for example, had a big hole in the syscall numbers 335-423 range. That is why there exists [0 ... __NR_*_syscall_max] = &__*_sys_ni_cyscall. The new script, scripts/syscalltbl.sh automatically fills holes with __SYSCALL(, sys_ni_syscall), hence such ugly code can go away. The designated initializers, '[nr] =' are also unneeded. Also, there is no need to give __NR_*_syscall_max+1 because the array size is implied by the number of syscalls in the generated headers. Hence, there is no need to include , either. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210517073815.97426-4-masahiroy@kernel.org commit 6218d0f6b8dece1f2e82f0a47a0e6b8ecb631ef6 Author: Masahiro Yamada Date: Mon May 17 16:38:10 2021 +0900 x86/syscalls: Switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. Convert x86 and UML to use scripts/syscalltbl.sh. The generic script generates seperate headers for x86/64 and x86/x32 syscalls, while the x86 specific script coalesced them into one. Adjust the code accordingly. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210517073815.97426-3-masahiroy@kernel.org commit 2e958a8a510d956ec8528f0bd20e309b5bb5156c Author: Masahiro Yamada Date: Mon May 17 16:38:09 2021 +0900 x86/entry/x32: Rename __x32_compat_sys_* to __x64_compat_sys_* The SYSCALL macros are mapped to symbols as follows: __SYSCALL_COMMON(nr, sym) --> __x64_ __SYSCALL_X32(nr, sym) --> __x32_ Originally, the syscalls in the x32 special range (512-547) were all compat. This assumption is now broken after the following commits: 55db9c0e8534 ("net: remove compat_sys_{get,set}sockopt") 5f764d624a89 ("fs: remove the compat readv/writev syscalls") 598b3cec831f ("fs: remove compat_sys_vmsplice") c3973b401ef2 ("mm: remove compat_process_vm_{readv,writev}") Those commits redefined __x32_sys_* to __x64_sys_* because there is no stub like __x32_sys_*. Defining them as follows is more sensible and cleaner. __SYSCALL_COMMON(nr, sym) --> __x64_ __SYSCALL_X32(nr, sym) --> __x64_ This works because both x86_64 and x32 use the same ABI (RDI, RSI, RDX, R10, R8, R9) The ugly #define __x32_sys_* will go away. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210517073815.97426-2-masahiroy@kernel.org commit 2b71b66ac0415db5e4b9e67b11e3af7b485bb421 Author: Andy Shevchenko Date: Thu May 20 15:17:15 2021 +0300 gpio: wcove: Split error handling for CTRL and IRQ registers The wcove_gpio_dbg_show() uses one message to all possible error reads. Split it to two for CTRL and IRQ registers. While at it, switch to use dev_err() instead of pr_err(). Signed-off-by: Andy Shevchenko commit bdaedca74d6293b6ac643a8ebe8231b52bf1171b Author: Takashi Sakamoto Date: Thu May 20 13:01:54 2021 +0900 ALSA: firewire-lib: change waking up timing to process packets When starting AMDTP domain, tasks in process context yields running CPU till all of isochronous context get callback, with an assumption that it's OK to process content of packet. However several isochronous cycles are skipped to transfer rx packets, or the content of rx packets are dropped, to manage the timing to start processing the packets. This commit changes the timing for tasks in process context to wake up when processing content of packet is actually ready. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 9b1fcd9bf802062c1b6c325b7762f4ecdc59f309 Author: Takashi Sakamoto Date: Thu May 20 13:01:53 2021 +0900 ALSA: firewire-lib: start processing content of packet at the same cycle in several IT contexts DICE ASICs support several pairs of isochronous packet streaming and expect software to queue packets with the same timing information into the same isochronous cycle. This commit adds structure member to manage the cycle to start processing packet in several IT contexts. The cycle is decided when batch of isochronous cycle is skipped in callback to isochronous context for IRQ target. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit bd165079dedb40b8a8334beae304a128a8269831 Author: Takashi Sakamoto Date: Thu May 20 13:01:52 2021 +0900 ALSA: firewire-lib: code refactoring to start several IT/IR contexts It's several hundred cycles from starting isochronous contexts and the actual cycle to start processing content of packet. It's useless to start the context for IRQ target apart from the other contexts. This commit refactors helper function to start AMDTP domain in the point. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 26541cb15a1a237b12b861b42231cc0a304545ed Author: Takashi Sakamoto Date: Thu May 20 13:01:51 2021 +0900 ALSA: firewire-lib: skip initial packets instead of scheduling IR context Current implementation of ALSA IEC 61883-1/6 packet streaming engine allows drivers to decide isochronous cycle to start IR context. This option is mainly used to avoid processing the sequence of packet with some quirks; e.g. discontinuity of counter. However, it's inconvenient to fail to continue packet processing when the target device doesn't start transmission of packet till the decided cycle. This commit changes the behaviour. As an alternative to the start cycle for IR context, the cycle count to drop content of packet in the beginning of IR context. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit da3623abfbef446fc586a49807156d622cf778f6 Author: Takashi Sakamoto Date: Thu May 20 13:01:50 2021 +0900 ALSA: firewire-lib: start processing content of packet at the same cycle in several IR contexts DICE ASICs support several pairs of isochronous packet streaming. It's convenient for drivers to process content of the packet in the same cycle timing. This commit adds structure member to manage the cycle to start processing packet in several IR contexts. The cycle is decided in the first callback of the IR contexts. The content of packet is dropped till the cycle. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 233dbbc7af5d279a5b1cc92ab08f15f7c2d64ad7 Author: Takashi Sakamoto Date: Thu May 20 13:01:49 2021 +0900 ALSA: firewire-lib: code refactoring for selection of IT context header length This commit refactors regarding to the size of CIP header. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c75f36789d3c668048ac757368c8b7b02e7cf953 Author: Takashi Sakamoto Date: Thu May 20 13:01:48 2021 +0900 ALSA: firewire-lib: code refactoring for calculation of context payload It's convenient to calculate the size of context payload apart from the size of isochronous packet payload. This commit adds a helper function for it. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 67d92ee7a50b007b87b113195e73da6ece6b231b Author: Takashi Sakamoto Date: Thu May 20 13:01:47 2021 +0900 ALSA: firewire-lib: code refactoring for size of CIP header Some macros are added to refactor codes related to CIP header. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210520040154.80450-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 5d9936648285b8ccb6b61257dd2ddd76f9cd719a Author: Andy Shevchenko Date: Thu May 20 13:00:01 2021 +0300 gpio: wcove: Unify style of to_reg() with to_ireg() Use ternary and rename parameter to 'type' in to_reg() to be in the same style as to_ireg(). Signed-off-by: Andy Shevchenko commit f3019092eca09f3d093dbc306bf118daff15bfd2 Author: Andy Shevchenko Date: Thu May 20 12:46:05 2021 +0300 gpio: wcove: Use IRQ hardware number getter instead of direct access IRQ framework provides special type and getter to transform Linux IRQ to the hardware pin. Use that type and getter function instead of direct access. No functional changes intended. While at it, remove unneeded check in wcove_update_irq_ctrl() since it is guaranteed that function will be called with valid parameter. Signed-off-by: Andy Shevchenko commit 3203e497eb769cdf3b2f835bdc92083fee2796a9 Author: Pi-Hsun Shih Date: Thu May 20 14:44:52 2021 +0800 drm/bridge: anx7625: Synchronously run runtime suspend. Originally when using pm_runtime_put, there's a chance that the runtime suspend hook will be run after the following anx7625_bridge_mode_set call, resulting in the display_timing_valid field to be cleared, and the following power on fail. Change all pm_runtime_put to pm_runtime_put_sync, so all power off operations are guaranteed to be done after the call returns. Fixes: 60487584a79a ("drm/bridge: anx7625: refactor power control to use runtime PM framework") Signed-off-by: Pi-Hsun Shih Tested-by: Tzung-Bi Shih Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210520064508.3121211-1-pihsun@chromium.org commit fa236c2b2d4436d9f19ee4e5d5924e90ffd7bb43 Author: Arturo Giusti Date: Tue May 18 12:34:57 2021 +0200 udf: Fix NULL pointer dereference in udf_symlink function In function udf_symlink, epos.bh is assigned with the value returned by udf_tgetblk. The function udf_tgetblk is defined in udf/misc.c and returns the value of sb_getblk function that could be NULL. Then, epos.bh is used without any check, causing a possible NULL pointer dereference when sb_getblk fails. This fix adds a check to validate the value of epos.bh. Link: https://bugzilla.kernel.org/show_bug.cgi?id=213083 Signed-off-by: Arturo Giusti Signed-off-by: Jan Kara commit 1b4c0f3bbdbd5e5cc09b67b2977d52350967cdfd Author: Greg Kroah-Hartman Date: Thu May 20 08:48:01 2021 +0200 staging: rtl8723bs: rename get_ra() due to global symbol collision Turns out that powerpc already has a get_ra() function, which conflicts with this staging driver's inlined function (which is just picking a byte out of an array for some odd reason), so rename it to fix the powerpc build as that's the more important thing here. Reported-by: Christophe Leroy Link: https://lore.kernel.org/r/20210520064801.1961972-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7ca8d993d070582a65b01b2fa926ff59fd30635d Author: Greg Kroah-Hartman Date: Thu May 20 08:41:44 2021 +0200 staging: rtl8723bs: rtl8723b_hal_init.c: fix build warnings about unused variables 0-day keeps spitting out annoying messages: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3895:18: warning: variable 'ra_info2' set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3895:8: warning: variable 'ra_info1' set but not used [-Wunused-but-set-variable] Oddly, it's not catching all of the "set but not used" variables in this switch statement. Fix it up just removing the storage of the values read. Leave the read from the hardware as odds are it is required in order to keep it working properly as I do not have the hardware to test with. I bet the whole case can be removed, but that will have to wait until later... Link: https://lore.kernel.org/r/20210520064144.1953251-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d23dc8cd1339a7f95c69c0d63bd57a8ff46c1c10 Author: Greg Kroah-Hartman Date: Thu May 20 08:41:33 2021 +0200 staging: rtl8723bs: HalBtc8723b1Ant.c: fix build warnings about unused variables 0-day keeps spitting out annoying messages: drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2117:6: warning: variable 'u4Tmp' set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:17: warning: variable 'u1Tmpb' set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:5: warning: variable 'u1Tmpa' set but not used [-Wunused-but-set-variable] So fix this up by just removing the storage of the values read. Leave the read from the hardware as odds are it is required in order to keep it working properly as I do not have the hardware to test with. Link: https://lore.kernel.org/r/20210520064133.1953156-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 62d7ecaf56bacf0c4248d640ac11cb632b01361b Author: Philippe Dixon Date: Wed May 19 12:39:38 2021 -0700 staging: greybus: spi: add blank line after variable declaration This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Reviewed-by: Alex Elder Acked-by: Viresh Kumar Signed-off-by: Philippe Dixon Link: https://lore.kernel.org/r/20210519193938.GA7131@ubuntu Signed-off-by: Greg Kroah-Hartman commit 5d4f6b9e207a8fbfa635e59bd182557ef9ecfdd7 Author: F.A.Sulaiman Date: Wed May 19 23:49:38 2021 +0530 Staging: greybus: fix open parenthesis error in gbphy.c This patch fix "Alignment should match open parenthesis" checkpatch error. Acked-by: Alex Elder Signed-off-by: "F.A.Sulaiman" Link: https://lore.kernel.org/r/20210519181938.30813-1-asha.16@itfac.mrt.ac.lk Signed-off-by: Greg Kroah-Hartman commit ede4ac7b67eb27482ae5fe8f8173554eb45ced66 Author: Dan Carpenter Date: Wed May 19 17:16:50 2021 +0300 staging: emxx_udc: fix loop in _nbu2ss_nuke() The _nbu2ss_ep_done() function calls: list_del_init(&req->queue); which means that the loop will never exit. Fixes: ca3d253eb967 ("Staging: emxx_udc: Iterate list using list_for_each_entry") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YKUd0sDyjm/lkJfJ@mwanda Signed-off-by: Greg Kroah-Hartman commit 9a032e3f7e045236ad529b7669257cd57b4f9dc0 Author: Rajat Asthana Date: Wed May 19 19:11:19 2021 +0530 staging: greybus: audio: Fix sparse warning. Sparse complains that: warning: restricted send_ctl_elem_iface_t degrades to integer. I have looked at this code, and the code is fine as-is. Normally we would frown on using the __force directive to silence Sparse warnings but in this case it's fine. Case statements can't be made into __bitwise types. We also can't change the type of "ctl->iface" either because that is part of the user space API. So just add a (__force int) to make the warning go away. Reviewed-by: Dan Carpenter Signed-off-by: Rajat Asthana Link: https://lore.kernel.org/r/20210519134119.848055-1-thisisrast7@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4d32fe2f14a73b47b6f812eca1ab71fcd5a64dcd Author: Anusha Srivatsa Date: Tue May 18 17:06:25 2021 -0700 drm/i915/adl_p: Update memory bandwidth parameters ADL_P has same memory characteristics as ADL_S platform. Bspec: 64631 Cc: José Roberto de Souza Cc: Clint Taylor Signed-off-by: Anusha Srivatsa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-18-lucas.demarchi@intel.com commit e2ca757b6fa415e1aed7bffa240dda918d2301a4 Author: Anusha Srivatsa Date: Tue May 18 17:06:24 2021 -0700 drm/i915/adlp: Add PIPE_MISC2 programming When scalers are enabled, we need to program underrun bubble counter to 0x50 to avoid Soft Pipe A underruns. Make sure other bits dont get overwritten. Cc: Matt Roper Cc: Clint Taylor Cc: José Roberto de Souza Signed-off-by: Anusha Srivatsa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Clint Taylor Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-17-lucas.demarchi@intel.com commit 414002f1bb8e5a7824ed43373d8de9ba7c658301 Author: Imre Deak Date: Tue May 18 17:06:23 2021 -0700 drm/i915/adl_p: Program DP/HDMI link rate to DDI_BUF_CTL On ADL_P besides programming the PLL accordingly the DP/HDMI link rate should be also programmed to the DDI_BUF_CTL register, do that. Cc: José Roberto de Souza Signed-off-by: Imre Deak Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-16-lucas.demarchi@intel.com commit 226c83263b10133c4f68ae6d39b1cf26e3d6b970 Author: Anusha Srivatsa Date: Tue May 18 17:06:22 2021 -0700 drm/i915/adl_p: Add PLL Support The clocks in ALD_P is similar to that of TGL. The combo PLLs use the same DPLL0, DPLL1 and TBT_PLL. This patch adds the helper function intel_mg_pll_enable_reg() which is similar to intel_combo_pll_enable_reg() for being lookup place for PLL_ENABLE register in combo phy cases. Bspec: 55409,55316 Cc: Matt Roper Cc: Clinton Taylor Cc: Lucas De Marchi Cc: José Roberto de Souza Signed-off-by: Anusha Srivatsa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Clint Taylor Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-15-lucas.demarchi@intel.com commit ca962882268ac8d99ffe461c25522c68b1fdc39d Author: Mika Kahola Date: Tue May 18 17:06:21 2021 -0700 drm/i915/adl_p: Define and use ADL-P specific DP translation tables Define and use DP voltage swing and pre-emphasis translation tables for ADL-P. v2: - Update according to recent bspec updates; there are now separate tables for RBR/HBR and HBR2/HBR3. (Anusha) BSpec: 54956 Cc: Imre Deak Signed-off-by: Mika Kahola Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Clint Taylor Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-14-lucas.demarchi@intel.com commit 2d776579728b5d1b04882e1bc7c9b2d10b238003 Author: Gwan-gyeong Mun Date: Tue May 18 17:06:20 2021 -0700 drm/i915/display: Add PSR interrupt error check function In order to reuse code of PSR interrupt error check on other PSR functions, it adds psr_interrupt_error_check() function. Cc: José Roberto de Souza Signed-off-by: Gwan-gyeong Mun Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-13-lucas.demarchi@intel.com commit 8aa2d2ef4641ecb5776bab28706b934ba06ee6bf Author: Gwan-gyeong Mun Date: Tue May 18 17:06:19 2021 -0700 drm/i915/display: Replace dc3co_enabled with dc3co_exitline on intel_psr struct It replaces dc3co_enabled with dc3co_exitline on intel_psr struct. And it saves dc3co_exitline, not dc3co_enabled, so we can use dc3co_exitline without intel_crtc_state on other psr internal function like as intel_psr_enable_source(). Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Anshuman Gupta Signed-off-by: Gwan-gyeong Mun Signed-off-by: Matt Roper Reviewed-by: Anshuman Gupta Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-12-lucas.demarchi@intel.com commit 510b2814889141656ec9aace9058165403894858 Author: Mika Kahola Date: Tue May 18 17:06:18 2021 -0700 drm/i915/adl_p: Tx escape clock with DSI Today when the DSI controller is paired with the Combo-PHY it uses the high-speed (HS) Word clock for its low power (LP) transmit PPI communication to the DPHY. The interface signaling only changes state at an Escape clock frequency (i.e. its effectively running on a virtual Tx Escape clock that is controlled by counters w/in the controller), but all the interface flops are running off the HS clock. This has the following drawbacks: * It is a deviation from the PPI spec which assumes signaling is running on a physical Escape clock * The PV timings are over constrained (HS timed to 312.5MHz vs. an Escape clock of 20MHz max) This feature is proposing to change the LP Tx communication between the controller and the DPHY from a virtual Tx Escape clock to a physical clock. To do this we need to program two "M" divisors. One for the usual DSI_ESC_CLK_DIV and DPHY_ESC_CLK_DIV register and one for MIPIO_DWORD8. For DSI_ESC_CLK_DIV and DPHY_ESC_CLK_DIV registers the "M" is calculated as following Nt = ceil(f_link/160) (theoretical word clock) Nact = max[3, Nt + (Nt + 1)%2] (actual word clock) M = Nact * 8 For MIPIO_DWORD8 register, the divisor "M" is calculated as following M = (Nact - 1)/2 BSpec: 55171 Cc: Vandita Kulkarni Signed-off-by: Mika Kahola Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Vandita Kulkarni Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-11-lucas.demarchi@intel.com commit f4dc008632260d981c2afc6d72a0a31ca4c7191c Author: Vandita Kulkarni Date: Tue May 18 17:06:17 2021 -0700 drm/i915/adl_p: MBUS programming Update MBUS_CTL register if the 2 mbus can be joined as per the current DDB allocation and active pipes, also update hashing mode and pipe select bits as per the sequence mentioned in the bspec. Cc: Stanislav Lisovskiy Cc: José Roberto de Souza Signed-off-by: Vandita Kulkarni Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Stanislav Lisovskiy Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-10-lucas.demarchi@intel.com commit 835c176cb1c4f4bb9dd25ff9cc914914938df70a Author: Ville Syrjälä Date: Tue May 18 17:06:16 2021 -0700 drm/i915: Introduce MBUS relative dbuf offsets The dbuf slices are going to be split across several MBUS units. The actual dbuf programming will use offsets relative to the MBUS unit. To accommodate that we shall store the MBUS relative offsets into the dbuf_state->ddb[] and crtc_state->plane_ddb*[]. For crtc_state->wm.skl.ddb however we want to stick to global offsets as we use this to sanity check that the ddb allocations don't overlap between pipes. Cc: Clint Taylor Signed-off-by: Ville Syrjälä Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Stanislav Lisovskiy Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-9-lucas.demarchi@intel.com commit 247bdac958fced2fd0a9bbcfbfcfd6be67a5345a Author: Vandita Kulkarni Date: Tue May 18 17:06:15 2021 -0700 drm/i915/adl_p: Add ddb allocation support On adlp the two mbuses have two display pipes and two DBUFS, Pipe A and D on Mbus1 and Pipe B and C on Mbus2. The Mbus can be joined and all the DBUFS can be used on Pipe A or B. Bspec: 49255 Cc: Anusha Srivatsa Signed-off-by: Vandita Kulkarni Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Stanislav Lisovskiy Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-8-lucas.demarchi@intel.com commit 14076e464550053527165aed352c7d9f4bf77e34 Author: José Roberto de Souza Date: Tue May 18 17:06:14 2021 -0700 drm/i915/adl_p: Don't config MBUS and DBUF during display initialization Alderlake-P don't have programing sequences for MBUS or DBUF during display initializaiton, instead it requires programing to those registers during modeset because it to depend on the pipes left enabled. Bspec: 49213 Cc: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Stanislav Lisovskiy Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-7-lucas.demarchi@intel.com commit 55ce306c2aa1aa2fd372e089e55a11a5512776cb Author: José Roberto de Souza Date: Tue May 18 17:06:13 2021 -0700 drm/i915/adl_p: Implement TC sequences ADL-P have basically the same TC connection and disconnection sequences as ICL and TGL, the major difference is the new registers. So here adding functions without the icl prefix in the name and making the new functions call the platform specific function to access the correct register. v2: - Retain DDI TC PHY ownership flag during modesetting. BSpec: 55480 Cc: Imre Deak Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Imre Deak Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-6-lucas.demarchi@intel.com commit 93a6497188b88170f28800b9fe1ac879efe295b8 Author: Anusha Srivatsa Date: Tue May 18 17:06:12 2021 -0700 drm/i915/adl_p: Setup ports/phys The SoC has 6 DDI ports(DDI A,DDI B and DDI TC1-4. The first two are connected to combo phys while the rest are connected to TC phys. Cc: Matt Roper Cc: Clinton Taylor Cc: Lucas De Marchi Cc: Swathi Dhanavanthri Signed-off-by: Anusha Srivatsa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Imre Deak Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-5-lucas.demarchi@intel.com commit 7959ffe5768cbd732242cbdaa5ce2f3a2cad8ea2 Author: Matt Roper Date: Tue May 18 17:06:11 2021 -0700 drm/i915/adl_p: Add dedicated SAGV watermarks XE_LPD reduces the number of regular watermark latency levels from 8 to 6 on non-dgfx platforms. However the hardware also adds a special purpose SAGV wateramrk (and an accompanying transition watermark) that will be used by the hardware in place of the level 0 values during SAGV transitions. Bspec: 49325, 49326, 50419 Cc: Matt Atwood Signed-off-by: Matt Roper Signed-off-by: Clinton Taylor Reviewed-by: Stanislav Lisovskiy Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-4-lucas.demarchi@intel.com commit c33ebdb717e9ffa0e5cae3f75c5f5795102bdc3b Author: Vandita Kulkarni Date: Tue May 18 17:06:10 2021 -0700 drm/i915/xelpd: Add rc_qp_table for rcparams calculation Add the qp table for 444 formats, for 8bpc, 10bpc and 12bpc, as given by the VESA C model for DSC 1.1 v2: - Add include guard to header (Jani) - Move the big tables to a .c file (Chris, Jani, Lucas) v3: - Make tables 'static const' and add lookup functions to index into them. (Jani) v3.1: - Include missing .h file. Cc: Manasi Navare Signed-off-by: Vandita Kulkarni Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-3-lucas.demarchi@intel.com commit db514cac08fd4861a3b221bed5f21b441a1242c3 Author: Vandita Kulkarni Date: Tue May 18 17:06:09 2021 -0700 drm/i915/xelpd: Calculate VDSC RC parameters Add methods to calculate rc parameters for all bpps, against the fixed arrays that we already have for 8,10,12 valid o/p bpps, to cover RGB 444 formats. Our hw doesn't support YUV compression yet. The calculations used here are from VESA C model for DSC 1.1 v2: - Checkpatch fixes Cc: Manasi Navare Cc: Juha-Pekka Heikkil Signed-off-by: Vandita Kulkarni Signed-off-by: Mohammed Khajapasha Signed-off-by: Matt Roper Reviewed-by: Manasi Navare Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-2-lucas.demarchi@intel.com commit ac9fd3c8034011cc10a4c161b70a5837d95203f6 Author: Yang Yingliang Date: Tue May 18 12:49:10 2021 +0800 opp: use list_del_init instead of list_del/INIT_LIST_HEAD Using list_del_init() instead of list_del() + INIT_LIST_HEAD() to simpify the code. Signed-off-by: Yang Yingliang Signed-off-by: Viresh Kumar commit b791c7f94680ba9b60b0c0786b1d0eb4393053d6 Author: Christophe JAILLET Date: Thu May 6 21:09:48 2021 +0200 cpufreq: scmi: Fix an error message 'ret' is known to be 0 here. The last error code is stored in 'nr_opp', so use it in the error message. Fixes: 71a37cd6a59d ("scmi-cpufreq: Remove deferred probe") Signed-off-by: Christophe JAILLET Reviewed-by: Sudeep Holla Signed-off-by: Viresh Kumar commit 70d99a8f0442bbc5abfa34ea27ce1fcacff57f90 Author: Fabien Parent Date: Wed May 19 18:25:50 2021 +0200 cpufreq: mediatek: add support for mt8365 Add compatible stirng for MediaTek MT8365 SoC. Add also the compatible in the blacklist of the cpufreq-dt-platdev driver. Signed-off-by: Fabien Parent Signed-off-by: Viresh Kumar commit 88bf5a85fe9840c9b49c5f6c625cdccd11233943 Author: Sudeep Holla Date: Mon May 17 16:54:58 2021 +0100 dt-bindings: dvfs: Add support for generic performance domains The CLKSCREW attack [0] exposed security vulnerabilities in energy management implementations where untrusted software had direct access to clock and voltage hardware controls. In this attack, the malicious software was able to place the platform into unsafe overclocked or undervolted configurations. Such configurations then enabled the injection of predictable faults to reveal secrets. Many Arm-based systems used to or still use voltage regulator and clock frameworks in the kernel. These frameworks allow callers to independently manipulate frequency and voltage settings. Such implementations can render systems susceptible to this form of attack. Attacks such as CLKSCREW are now being mitigated by not having direct and independent control of clock and voltage in the kernel and moving that control to a trusted entity, such as the SCP firmware or secure world firmware/software which are to perform sanity checking on the requested performance levels, thereby preventing any attempted malicious programming. With the advent of such an abstraction, there is a need to replace the generic clock and regulator bindings used by such devices with a generic performance domains bindings. [0] https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/tang Cc: Rob Herring Acked-by: Viresh Kumar Signed-off-by: Sudeep Holla Reviewed-by: Rob Herring Signed-off-by: Viresh Kumar commit 17a8b0b6dde67f8561cf2ccbe945d5089cd70e08 Author: Sibi Sankar Date: Wed May 12 13:41:22 2021 +0530 cpufreq: blacklist SC7280 in cpufreq-dt-platdev Add SC7280 to cpufreq-dt-platdev blacklist since the actual scaling is handled by the 'qcom-cpufreq-hw' driver. Reviewed-by: Douglas Anderson Signed-off-by: Sibi Sankar Signed-off-by: Viresh Kumar commit 07775fc13878cbc2e9cda5ffac7c7289adee91cb Author: Andrey Grodzovsky Date: Mon May 17 15:31:05 2021 -0400 drm/amdgpu: Unmap all MMIO mappings Access to those must be prevented post pci_remove v6: Drop BOs list, unampping VRAM BAR is enough. v8: Add condition of xgmi.connected_to_cpu to MTTR handling and remove MTTR handling from the old place. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210517193105.491461-1-andrey.grodzovsky@amd.com commit 98c6e6a7e2a17f90501f983f2fa7f81d65d71719 Author: Andrey Grodzovsky Date: Wed May 12 10:26:47 2021 -0400 drm/amdgpu: Verify DMA opearations from device are done In case device remove is just simualted by sysfs then verify device doesn't keep doing DMA to the released memory after pci_remove is done. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-16-andrey.grodzovsky@amd.com commit 984f8261bbdf5b9a29ef6b6e55d62ab268cfdc13 Author: Andrey Grodzovsky Date: Wed May 12 10:26:46 2021 -0400 drm/amd/display: Remove superfluous drm_mode_config_cleanup It's already being released by DRM core through devm Signed-off-by: Andrey Grodzovsky Reviewed-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-15-andrey.grodzovsky@amd.com commit 0b10ab80695d61422337ede6ff496552d8ace99d Author: Andrey Grodzovsky Date: Wed May 19 10:14:07 2021 -0400 drm/sched: Avoid data corruptions Wait for all dependencies of a job to complete before killing it to avoid data corruptions. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210519141407.88444-1-andrey.grodzovsky@amd.com commit c61cdbdbffc169dc7f1e6fe94dfffaf574fe672a Author: Andrey Grodzovsky Date: Wed May 12 10:26:45 2021 -0400 drm/scheduler: Fix hang when sched_entity released Problem: If scheduler is already stopped by the time sched_entity is released and entity's job_queue not empty I encountred a hang in drm_sched_entity_flush. This is because drm_sched_entity_is_idle never becomes false. Fix: In drm_sched_fini detach all sched_entities from the scheduler's run queues. This will satisfy drm_sched_entity_is_idle. Also wakeup all those processes stuck in sched_entity flushing as the scheduler main thread which wakes them up is stopped by now. v2: Reverse order of drm_sched_rq_remove_entity and marking s_entity as stopped to prevent reinserion back to rq due to race. v3: Drop drm_sched_rq_remove_entity, only modify entity->stopped and check for it in drm_sched_entity_is_idle Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-14-andrey.grodzovsky@amd.com commit 54a85db8dea486c89467abe7540100a41bcc9b74 Author: Andrey Grodzovsky Date: Wed May 12 10:26:44 2021 -0400 drm/amdgpu: Fix hang on device removal. If removing while commands in flight you cannot wait to flush the HW fences on a ring since the device is gone. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-13-andrey.grodzovsky@amd.com commit ca4e17244bd213ed093927491ddb8eec0c21ada3 Author: Andrey Grodzovsky Date: Wed May 12 10:26:43 2021 -0400 drm/amdgpu: Prevent any job recoveries after device is unplugged. Return DRM_TASK_STATUS_ENODEV back to the scheduler when device is not present so they timeout timer will not be rearmed. v5: Update to match updated return values in enum drm_gpu_sched_stat Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-12-andrey.grodzovsky@amd.com commit 75973e5802afece679d3936328e23a1891a9badc Author: Andrey Grodzovsky Date: Wed May 12 10:26:42 2021 -0400 drm/sched: Make timeout timer rearm conditional. We don't want to rearm the timer if driver hook reports that the device is gone. v5: Update drm_gpu_sched_stat values in code. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-11-andrey.grodzovsky@amd.com commit f89f8c6bafd0692d3afd21488d012ceb1baf6df6 Author: Andrey Grodzovsky Date: Wed May 12 10:26:41 2021 -0400 drm/amdgpu: Guard against write accesses after device removal This should prevent writing to memory or IO ranges possibly already allocated for other uses after our device is removed. v5: Protect more places wher memcopy_to/form_io takes place Protect IB submissions v6: Switch to !drm_dev_enter instead of scoping entire code with brackets. v7: Drop guard of HW ring commands emission protection since they are in GART and not in MMIO. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-10-andrey.grodzovsky@amd.com commit 35bba8313b95a5cd074fc910a9c2670b4a1b105d Author: Andrey Grodzovsky Date: Wed May 12 10:26:40 2021 -0400 drm/amdgpu: Convert driver sysfs attributes to static attributes This allows to remove explicit creation and destruction of those attrs and by this avoids warnings on device finalizing post physical device extraction. v5: Use newly added pci_driver.dev_groups directly Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-9-andrey.grodzovsky@amd.com commit ded13b9cfd595adb478a1e371d2282048bba1df5 Author: Andrey Grodzovsky Date: Wed May 12 10:26:39 2021 -0400 PCI: Add support for dev_groups to struct pci_driver This helps converting PCI drivers sysfs attributes to static. Analogous to' commit b71b283e3d6d ("USB: add support for dev_groups to struct usb_driver")' Signed-off-by: Andrey Grodzovsky Suggested-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-8-andrey.grodzovsky@amd.com commit 03f9016ed8200d2bdf9ffcb7de93642d298e4668 Author: Andrey Grodzovsky Date: Wed May 12 10:26:38 2021 -0400 drm/amdgpu: Remap all page faults to per process dummy page. On device removal reroute all CPU mappings to dummy page per drm_file instance or imported GEM object. v4: Update for modified ttm_bo_vm_dummy_page Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-7-andrey.grodzovsky@amd.com commit d10d0daa207276aff3b740d1ea9b3f58a63256e7 Author: Andrey Grodzovsky Date: Mon May 17 10:38:51 2021 -0400 drm/amdgpu: Handle IOMMU enabled case. Problem: Handle all DMA IOMMU group related dependencies before the group is removed. Those manifest themself in that when IOMMU enabled DMA map/unmap is dependent on the presence of IOMMU group the device belongs to but, this group is released once the device is removed from PCI topology. Fix: Expedite all such unmap operations to pci remove driver callback. v5: Drop IOMMU notifier and switch to lockless call to ttm_tt_unpopulate v6: Drop the BO unamp list v7: Drop amdgpu_gart_fini In amdgpu_ih_ring_fini do uncinditional check (!ih->ring) to avoid freeing uniniitalized rings. Call amdgpu_ih_ring_fini unconditionally. v8: Add deatiled explanation Signed-off-by: Andrey Grodzovsky Reviewed-by: Felix Kuehling Link: https://patchwork.freedesktop.org/patch/msgid/20210517143851.475058-1-andrey.grodzovsky@amd.com commit e9669fb7826270bd73554208b49b6353ab3d856f Author: Andrey Grodzovsky Date: Wed May 19 23:20:57 2021 -0400 drm/amdgpu: Add early fini callback Use it to call disply code dependent on device->drv_data before it's set to NULL on device unplug v5: Move HW finilization into this callback to prevent MMIO accesses post cpi remove. v7: Split kfd suspend from device exit to expdite HW related stuff to amdgpu_pci_remove v8: Squash previous KFD commit into this commit to avoid compile break. Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Reviewed-by: Felix Kuehling Link: https://patchwork.freedesktop.org/patch/msgid/20210520032057.497334-1-andrey.grodzovsky@amd.com commit 72c8c97b1522ce7ed1789a42fc9828784ebb5e23 Author: Andrey Grodzovsky Date: Wed May 12 10:26:34 2021 -0400 drm/amdgpu: Split amdgpu_device_fini into early and late Some of the stuff in amdgpu_device_fini such as HW interrupts disable and pending fences finilization must be done right away on pci_remove while most of the stuff which relates to finilizing and releasing driver data structures can be kept until drm_driver.release hook is called, i.e. when the last device reference is dropped. v4: Change functions prefix early->hw and late->sw Signed-off-by: Andrey Grodzovsky Acked-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-3-andrey.grodzovsky@amd.com commit 267d51d77fdae8708b94e1a24b8e5d961297edb7 Author: Andrey Grodzovsky Date: Wed May 12 10:26:33 2021 -0400 drm/ttm: Remap all page faults to per process dummy page. On device removal reroute all CPU mappings to dummy page. v3: Remove loop to find DRM file and instead access it by vma->vm_file->private_data. Move dummy page installation into a separate function. v4: Map the entire BOs VA space into on demand allocated dummy page on the first fault for that BO. v5: Remove duplicate return. v6: Polish ttm_bo_vm_dummy_page, remove superfluous code. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-2-andrey.grodzovsky@amd.com commit ae25ec2fc6c5a9e5767bf1922cd648501d0f914c Merge: 41ab70e06e13f 30039405ac256 Author: Dave Airlie Date: Thu May 20 13:30:27 2021 +1000 Merge tag 'drm-misc-next-2021-05-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.14: UAPI Changes: Cross-subsystem Changes: Core Changes: * aperture: Fix unlocking on errors * legacy: Fix some doc comments Driver Changes: * drm/amdgpu: Free resource on fence usage query; Fix fence calculation; * drm/bridge: Lt9611: Add missing MODULE_DEVICE_TABLE * drm/i915: Print formats with %p4cc * drm/ingenic: IPU planes are now always of type OVERLAY * drm/nouveau: Remove left-over reference to struct drm_device.pdev * drm/panfrost: Disable devfreq if num_supplies > 1; Add Mediatek MT8183 + DT bindings; Cleanups * drm/simpledrm: Print resources with %pr; Fix use-after-free errors; Fix NULL deref; Fix MAINTAINERS entry * drm/vmwgfx: Fix memory allocation and leak in FIFO allocation; Fix return value in PCI resource setup Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YKJs2IfwSYvuGPU7@linux-uq9g.fritz.box commit 18b380ed61f892ed06838d1f1a5124d966292ed3 Author: YueHaibing Date: Fri May 14 14:48:43 2021 +0800 PM / devfreq: Add missing error code in devfreq_add_device() Set err code in the error path before jumping to the end of the function. Fixes: 4dc3bab8687f ("PM / devfreq: Add support delayed timer for polling mode") Signed-off-by: YueHaibing Signed-off-by: Chanwoo Choi commit 81db370c88196400972acd6ebbaa73a1d1e4145f Author: Christian König Date: Tue May 18 17:48:02 2021 +0200 drm/amdgpu: stop touching sched.ready in the backend This unfortunately comes up in regular intervals and breaks GPU reset for the engine in question. The sched.ready flag controls if an engine can't get working during hw_init, but should never be set to false during hw_fini. v2: squash in unused variable fix (Alex) Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6e8bcdd63a1e6569df114abbc58a5dbc02d7f822 Author: Lang Yu Date: Mon May 17 12:47:20 2021 +0800 drm/amd/amdgpu: fix a potential deadlock in gpu reset When amdgpu_ib_ring_tests failed, the reset logic called amdgpu_device_ip_suspend twice, then deadlock occurred. Deadlock log: [ 805.655192] amdgpu 0000:04:00.0: amdgpu: ib ring test failed (-110). [ 806.290952] [drm] free PSP TMR buffer [ 806.319406] ============================================ [ 806.320315] WARNING: possible recursive locking detected [ 806.321225] 5.11.0-custom #1 Tainted: G W OEL [ 806.322135] -------------------------------------------- [ 806.323043] cat/2593 is trying to acquire lock: [ 806.323825] ffff888136b1cdc8 (&adev->dm.dc_lock){+.+.}-{3:3}, at: dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.325668] but task is already holding lock: [ 806.326664] ffff888136b1cdc8 (&adev->dm.dc_lock){+.+.}-{3:3}, at: dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.328430] other info that might help us debug this: [ 806.329539] Possible unsafe locking scenario: [ 806.330549] CPU0 [ 806.330983] ---- [ 806.331416] lock(&adev->dm.dc_lock); [ 806.332086] lock(&adev->dm.dc_lock); [ 806.332738] *** DEADLOCK *** [ 806.333747] May be due to missing lock nesting notation [ 806.334899] 3 locks held by cat/2593: [ 806.335537] #0: ffff888100d3f1b8 (&attr->mutex){+.+.}-{3:3}, at: simple_attr_read+0x4e/0x110 [ 806.337009] #1: ffff888136b1fd78 (&adev->reset_sem){++++}-{3:3}, at: amdgpu_device_lock_adev+0x42/0x94 [amdgpu] [ 806.339018] #2: ffff888136b1cdc8 (&adev->dm.dc_lock){+.+.}-{3:3}, at: dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.340869] stack backtrace: [ 806.341621] CPU: 6 PID: 2593 Comm: cat Tainted: G W OEL 5.11.0-custom #1 [ 806.342921] Hardware name: AMD Celadon-CZN/Celadon-CZN, BIOS WLD0C23N_Weekly_20_12_2 12/23/2020 [ 806.344413] Call Trace: [ 806.344849] dump_stack+0x93/0xbd [ 806.345435] __lock_acquire.cold+0x18a/0x2cf [ 806.346179] lock_acquire+0xca/0x390 [ 806.346807] ? dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.347813] __mutex_lock+0x9b/0x930 [ 806.348454] ? dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.349434] ? amdgpu_device_indirect_rreg+0x58/0x70 [amdgpu] [ 806.350581] ? _raw_spin_unlock_irqrestore+0x47/0x50 [ 806.351437] ? dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.352437] ? rcu_read_lock_sched_held+0x4f/0x80 [ 806.353252] ? rcu_read_lock_sched_held+0x4f/0x80 [ 806.354064] mutex_lock_nested+0x1b/0x20 [ 806.354747] ? mutex_lock_nested+0x1b/0x20 [ 806.355457] dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.356427] ? soc15_common_set_clockgating_state+0x17d/0x19 [amdgpu] [ 806.357736] amdgpu_device_ip_suspend_phase1+0x78/0xd0 [amdgpu] [ 806.360394] amdgpu_device_ip_suspend+0x21/0x70 [amdgpu] [ 806.362926] amdgpu_device_pre_asic_reset+0xb3/0x270 [amdgpu] [ 806.365560] amdgpu_device_gpu_recover.cold+0x679/0x8eb [amdgpu] Signed-off-by: Lang Yu Acked-by: Christian KÃnig Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 9a530062d57fe4268eb5b561b1a46e826480f324 Author: Aaron Liu Date: Mon May 17 17:45:35 2021 +0800 drm/amdgpu: modify system reference clock source for navi+ (V2) Starting from Navi+, the rlc reference clock is used for system clock from vbios gfx_info table. It is incorrect to use core_refclk_10khz of vbios smu_info table as system clock. Signed-off-by: Aaron Liu Reviewed-by: Alex Deucher Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 87476d12c5cecde5c6d37010cfc12d4896c44cb3 Author: Guchun Chen Date: Mon May 17 16:38:00 2021 +0800 drm/amdgpu: update sdma golden setting for Navi12 Current golden setting is out of date. Signed-off-by: Guchun Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 6c65d8678c5eb97db159c952788e4e1ba6367ec0 Author: Guchun Chen Date: Mon May 17 16:35:40 2021 +0800 drm/amdgpu: update gc golden setting for Navi12 Current golden setting is out of date. Signed-off-by: Guchun Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit a8e56b80df8792f20413cfde4ca49b00cf9448ef Author: xinhui pan Date: Tue May 18 10:56:07 2021 +0800 drm/amdgpu: Fix a use-after-free looks like we forget to set ttm->sg to NULL. Hit panic below [ 1235.844104] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b7b4b: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI [ 1235.989074] Call Trace: [ 1235.991751] sg_free_table+0x17/0x20 [ 1235.995667] amdgpu_ttm_backend_unbind.cold+0x4d/0xf7 [amdgpu] [ 1236.002288] amdgpu_ttm_backend_destroy+0x29/0x130 [amdgpu] [ 1236.008464] ttm_tt_destroy+0x1e/0x30 [ttm] [ 1236.013066] ttm_bo_cleanup_memtype_use+0x51/0xa0 [ttm] [ 1236.018783] ttm_bo_release+0x262/0xa50 [ttm] [ 1236.023547] ttm_bo_put+0x82/0xd0 [ttm] [ 1236.027766] amdgpu_bo_unref+0x26/0x50 [amdgpu] [ 1236.032809] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x7aa/0xd90 [amdgpu] [ 1236.040400] kfd_ioctl_alloc_memory_of_gpu+0xe2/0x330 [amdgpu] [ 1236.046912] kfd_ioctl+0x463/0x690 [amdgpu] Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7230362c78d441020a47d7d5ca81f8a3d07bd9f0 Author: Alex Deucher Date: Thu Dec 10 02:30:39 2020 -0500 drm/amdgpu/display: restore the backlight on modeset (v2) To stay consistent with the user's setting. v2: rebase on multi-eDP support Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1337 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 3d6c91641bc8a883b0c810ac1a919db29ebd5ee7 Author: Alex Deucher Date: Tue May 11 11:37:09 2021 -0400 drm/amdgpu/display: add helper functions to get/set backlight (v2) And cache the value. These can be used by the backlight callbacks and modesetting functions. v2: rebase on latest backlight changes. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1337 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 1f6256590c118475d7c32839cf07178d1ae97f0c Author: Mukul Joshi Date: Tue May 18 10:58:09 2021 -0400 drm/amdgpu: Query correct register for DF hashing on Aldebaran For Aldebaran, driver needs to query DramMegaBaseAddress to check if DF hashing is enabled. Signed-off-by: Mukul Joshi Acked-by: Alex Deucher Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 295c4f513f50602f09788e944b30761a20f9f239 Author: James Zhu Date: Tue May 18 08:44:23 2021 -0400 drm/amdgpu: add video_codecs query support for aldebaran Add video_codecs query support for aldebaran. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 96b62c8aa47bdf063fbeff71460a4d199dd1431f Author: Dennis Li Date: Tue May 18 19:40:59 2021 +0800 drm/amdkfd: fix a resource leakage issue The function kfd_lookup_process_by_pasid will increase the reference count of kfd_process object, its caller should call kfd_unref_process to decrease the reference count. Otherwise resource leakage will happen. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e552ee40b02bb6d30b0278d03fa03fae357ec043 Author: Felix Kuehling Date: Wed Apr 21 19:25:45 2021 -0400 drm/amdgpu: Move dmabuf attach/detach to backend_(un)bind The dmabuf attachment should be updated by moving the SG BO to DOMAIN_CPU and back to DOMAIN_GTT. This does not necessarily invoke the populate/unpopulate callbacks. Do this in backend_bind/unbind instead. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 5ac3c3e45fb93d14102fc7cdc69ad909f6980388 Author: Felix Kuehling Date: Sun Apr 11 18:52:19 2021 -0400 drm/amdgpu: Add DMA mapping of GTT BOs Use DMABufs with dynamic attachment to DMA-map GTT BOs on other GPUs. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 9e5d275319e224e01adb62bfe03943b32f540b7d Author: Felix Kuehling Date: Sun Apr 11 18:50:23 2021 -0400 drm/amdgpu: Move kfd_mem_attach outside reservation This is needed to avoid deadlocks with DMA buf import in the next patch. Also move PT/PD validation out of kfd_mem_attach, that way the caller can bo this unconditionally. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit b72ed8a2de8e9dfbd61217d60a7da868ac2cfbff Author: Felix Kuehling Date: Sat Apr 10 03:48:56 2021 -0400 drm/amdgpu: DMA map/unmap when updating GPU mappings DMA map kfd_mem_attachments in update_gpuvm_pte. This function is called with the BO and page tables reserved, so we can safely update the DMA mapping. DMA unmap when a BO is unmapped from a GPU and before updating mappings in restore workers. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 264fb4d332f5e76743818480e482464437837c52 Author: Felix Kuehling Date: Sat Apr 10 03:43:58 2021 -0400 drm/amdgpu: Add multi-GPU DMA mapping helpers Add BO-type specific helpers functions to DMA-map and unmap kfd_mem_attachments. Implement this functionality for userptrs by creating one SG BO per GPU and filling it with a DMA mapping of the pages from the original mem->bo. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 7141394edc05f439751e4eb2e5aedb4889b48e33 Author: Felix Kuehling Date: Thu Apr 8 23:26:27 2021 -0400 drm/amdgpu: Simplify AQL queue mapping Do AQL queue double-mapping with a single attach call. That will make it easier to create per-GPU BOs later, to be shared between the two BO VA mappings on the same GPU. Freeing the attachments is not necessary if map_to_gpu fails. These will be cleaned up when the kdg_mem object is destroyed in amdgpu_amdkfd_gpuvm_free_memory_of_gpu. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 4e94272f8a99e0235353a024f37be1201acf4c8b Author: Felix Kuehling Date: Thu Apr 8 22:27:34 2021 -0400 drm/amdgpu: Keep a bo-reference per-attachment For now they all reference the same BO. For correct DMA mappings they will refer to different BOs per-GPU. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit c780b2eedbd0ddc9f594379fd39281100693fd3d Author: Felix Kuehling Date: Thu Apr 8 19:56:12 2021 -0400 drm/amdgpu: Rename kfd_bo_va_list to kfd_mem_attachment This name is more fitting, especially for the changes coming next to support multi-GPU systems with proper DMA mappings. Cleaned up the code and renamed some related functions and variables to improve readability. Signed-off-by: Felix Kuehling Acked-by: Oak Zeng Acked-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 0a6fb502866578f1beaeb2d7c8f1f0a54623d2f7 Author: Jingwen Chen Date: Mon May 17 16:16:10 2021 +0800 drm/amd/amdgpu: fix refcount leak [Why] the gem object rfb->base.obj[0] is get according to num_planes in amdgpufb_create, but is not put according to num_planes [How] put rfb->base.obj[0] in amdgpu_fbdev_destroy according to num_planes Signed-off-by: Jingwen Chen Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4aa7e6e07b6baf9834b85dc64bb2c2c20781c300 Author: YuBiao Wang Date: Tue May 11 18:13:02 2021 +0800 drm/amd/amdgpu: psp program IH_RB_CTRL on sienna_cichlid [Why] IH_RB_CNTL is blocked by PSP so we need to ask psp to help config it. [How] Move psp ip block before ih, and use psp to program IH_RB_CNTL under sriov. Reviewed-by: Chen, Horace Signed-off-by: YuBiao Wang Signed-off-by: Alex Deucher commit 49da4c2be53ecc0885d02a80cc1255acb5823057 Author: Joe Perches Date: Sat May 15 10:01:26 2021 -0700 drm/amd/display: Fix typo of format termination newline /n should be \n Signed-off-by: Joe Perches Signed-off-by: Alex Deucher commit 258ec890cc509c468638ce18a6ed48a058d7f49a Author: Aurabindo Pillai Date: Fri May 7 16:39:34 2021 -0400 drm/amd/display: enable idle optimizations for beige goby [Why&How] MALL requires idle optimizations to be enabled. This enables MALL feature on dcn303 Signed-off-by: Aurabindo Pillai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ac87f94294530bae182044a237110676a7f911e7 Author: Aurabindo Pillai Date: Fri May 7 15:52:01 2021 -0400 drm/amd/display: Enable HDCP for Beige Goby [Why&How] Add beige_goby_ta.bin to module firmware table and call psp init for TA Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e5fd073fd463670a7698de429da6b01bf0c2abd9 Author: Joshua Aberback Date: Tue Apr 6 17:21:50 2021 -0400 drm/amd/display: Update DCN303 SR Exit Latency [Why] This update was made for DCN30, but it is needed for DCN303 as well Signed-off-by: Joshua Aberback Signed-off-by: Alex Deucher commit fa5d21edbbc16dd2212d49bb59018d3221c0be3d Author: Aurabindo Pillai Date: Mon May 3 16:15:43 2021 -0400 drm/amd/display: Add callback for update_soc_for_wm_a for dcn303 [Why&How] Absense of this callback causes null pointer dereference. Add the corresponding callback in dcn303 resources. Fixes: 443dfba0248387 ("drm/amd/display: fix dcn3+ bw validation soc param update sequence") Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ddaed58b577da70e01ea6316836abd18b9f2cea3 Author: Aurabindo Pillai Date: Wed Mar 10 15:53:37 2021 -0500 drm/amd/amdgpu: Enable DCN IP init for Beige Goby [Why&How] Adds DCN IP block initialization for Beige Goby Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 656fe9b6566323eefc0fbb3b8b4b2450e0191f12 Author: Aurabindo Pillai Date: Wed Mar 10 15:53:11 2021 -0500 drm/amd/display: Add DM support for Beige Goby [Why&How] Adds the firmware definition and missing cases statement hooks for Beige Goby support in AMDGPU DM. Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 015b448985a43e897d3fe82a691071578cd103d7 Author: Aurabindo Pillai Date: Tue May 11 17:41:16 2021 -0400 drm/amd/display: Edit license info for beige goby DC files [How] * Add MIT license to all new files as SPDX tag. * Fix copyright year Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit cd6d421e3d1ad5926b74091254e345db730e7706 Author: Aurabindo Pillai Date: Mon Mar 15 14:55:24 2021 -0400 drm/amd/display: Initial DC support for Beige Goby [Why&How] Add Beige Goby (DCN303) resource, irq service, & dmub loader. v2: fix nbio include (Alex) Signed-off-by: Chris Park Signed-off-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8198ace7a074de4dfdc10885ccf081476b50d41b Author: Aurabindo Pillai Date: Mon Mar 15 14:56:11 2021 -0400 drm/amd/display: Add register definitions for Beige Goby [Why&How] Adds registers definitions required for Beige Goby initial support. Signed-off-by: Aurabindo Pillai Signed-off-by: Chris Park Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2db8378f098e390057d90cb1b815afcdb17b6979 Author: Jiansong Chen Date: Mon Apr 19 16:53:50 2021 +0800 drm/amdgpu: fix GCR_GENERAL_CNTL offset for beige_goby beige_goby has similar gc_10_3 ip with sienna_cichlid, so follow its registers offset setting. Signed-off-by: Jiansong Chen Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit ece3cbadb4f5580ebc2e612ca822dfa3e24af0e5 Author: Chengming Gui Date: Tue Mar 30 16:26:49 2021 +0800 drm/amd/amdgpu: Enable gfxoff for beige_goby Enable gfxoff in driver side based on SMC#73.3 v2: fix typo 'Eanble' --> 'Enable' Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ac79f42a72175a99f360e78c790cfe3e7148467f Author: Chengming Gui Date: Tue Mar 30 16:22:53 2021 +0800 drm/amd/pm: Use the PPTable from VBIOS for beige_goby Switch from softPPTable to VBIOS PPTable. v2: drop extra parens (Alex) Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit d69d278fc72fb844b60720160a9fe53412afa4a2 Author: Tao Zhou Date: Thu Apr 22 17:57:14 2021 +0800 drm/amdgpu: add cgls for beige_goby Enable cgls to improve the runtime power efficiency. Signed-off-by: Tao Zhou Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit e47e4c0e4f1bde175dff777943c5b42b0c62dcc1 Author: Veerabadhran Gopalakrishnan Date: Thu Apr 1 19:08:39 2021 +0530 drm/amdgpu: enabled VCN3.0 CG for BEIGE GOBY Enable VCN CG for BEIGE GOBY Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit a764bef36de06b45f52550c9c5575eca395dbf48 Author: Tao Zhou Date: Fri Mar 19 14:48:28 2021 +0800 drm/amdgpu: enable ih CG for beige_goby Enable ih clock gating for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 170c193ffd97979080e437eba72f337e403a1ef6 Author: Tao Zhou Date: Fri Mar 19 14:44:55 2021 +0800 drm/amdgpu: enable hdp CG and LS for beige_goby Enable hdp MGCG and LS for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 5d36b865e4f77869468d07387672adf08b351a33 Author: Tao Zhou Date: Fri Mar 19 14:37:57 2021 +0800 drm/amdgpu: enable mc CG and LS for beige_goby Enable mc CG and LS for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 147de218c23186f403922d7ea4cb168076224830 Author: Tao Zhou Date: Fri Mar 19 14:29:28 2021 +0800 drm/amdgpu: enable athub/mmhub PG for beige_goby Enable athub/mmhub power gating for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit d75caec8a4540b66c4521a1e4cd7e0e8e65291fe Author: Tao Zhou Date: Fri Mar 19 14:15:28 2021 +0800 drm/amdgpu: support athub cg setting for beige_goby Enable athub cg for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit bc6bd46bc370a6c05f63afcf8e028bf82d172faa Author: Tao Zhou Date: Fri Mar 19 14:05:34 2021 +0800 drm/amdgpu: enable GFX clock gating for beige_goby Enable GFX MGCG, CGCG and 3DCG for beige_goby. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 7077b19a38240abe4d76d688e52681ad1ec47304 Author: Chengming Gui Date: Wed Mar 17 17:11:53 2021 +0800 drm/amd/pm: use macro to get pptable members Use macro to get the pptable members for different pptable structures. v2: abstract the table operations especially get the table members to simplify cover the two different pptable structures. v3: move pptable operations related structures and functions into ppt.c v4: use macro to simplify the operation to get pptable members v5: fix parameter reference error and add dump pptable support for beige_goby Signed-off-by: Chengming Gui Reviewed-by: Jiansong Chen Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit fbe8115c6ab77eecbabbac23379132ec5e8b273a Author: Chengming Gui Date: Wed Mar 17 17:08:07 2021 +0800 drm/amd/pm: update smu11 driver interface header for beige_goby Use new struct name to identify beige_goby pptable due to extra added fields. v2: squash in updates (Alex) Signed-off-by: Chengming Gui Reviewed-by: Jiansong Chen Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 5ed7715dbb369e3b0e10875040cbb1efe1b16e03 Author: Chengming Gui Date: Fri Mar 12 11:26:58 2021 +0800 drm/amd/pm: add mode1 support for beige_goby Add mode1 reset as the default reset method for beige_goby Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 09c31c778daf3bd66910760d25cb1599affac37b Author: Chengming Gui Date: Tue Mar 16 10:42:34 2021 +0800 drm/amd/amdgpu: update golden_setting_10_3_5 for beige_goby add mmCGTT_SPI_{RA0/RA1}_CLK_CTRL setting Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f703d4b6f206881be6cb4e66a3c7c2aea5b12cd5 Author: Veerabadhran Gopalakrishnan Date: Thu Mar 11 01:09:11 2021 +0530 drm/amdgpu: Enable VCN for Beige Goby Enabled VCN support for Beige Goby chip Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 3df8ecc8a1de88098a75c860504d14317c5f6200 Author: Hawking Zhang Date: Sat Mar 6 22:31:42 2021 +0800 drm/amdgpu: add gc_10_3_5 golden setting for beige_goby execute gc_10_3_5 golden registers one-time initialization Signed-off-by: Hawking Zhang Reviewed-by: Jiansong Chen Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 77a3e25102c335e5c0be5caac538630157bc7083 Author: Alex Deucher Date: Wed Dec 16 10:17:20 2020 -0500 drm/amdgpu: add mmhub client support for beige goby For decoding GPUVM page faults. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c0729819104a166b561019f77c18b8ddb8b4e94f Author: Chengming Gui Date: Tue Nov 10 16:02:22 2020 +0800 drm/amd/amdgpu: add psp support for beige_goby add general PSP support for beige_goby Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4d3526690a4b94dc3eddf8ff51acf4a147198d4f Author: Chengming Gui Date: Tue Nov 3 11:37:23 2020 +0800 drm/amd/amdgpu: add smu support for beige_goby Use soft-pptable for beige_goby v2: fix format Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c86eb51705ae473e5ecbb349b62e064bb870da16 Author: Chengming Gui Date: Wed Oct 21 18:18:40 2020 +0800 drm/amdkfd: add kfd2kgd funcs for beige_goby kfd support Add the function pointer. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5cf607cc357d20c0e03d377eedeb872872291e99 Author: Chengming Gui Date: Wed Oct 21 18:15:36 2020 +0800 drm/amdkfd: support beige_goby KFD Add KFD support for beige_goby v2: fix asic name typo v3: squash in updates (Alex) v4: squash in needs_atomics fix (Alex) Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 0e5f4b098888dc559608d09662e1a32491aa7398 Author: Chengming Gui Date: Wed Oct 14 15:51:23 2020 +0800 drm/amd/amdgpu: Use IP discovery table for beige goby Rather than gpu info firmware. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit afee60e4c54b7d2f4db8d938b0621bfdb486c558 Author: Chengming Gui Date: Tue Oct 27 16:59:42 2020 +0800 drm/amd/amdgpu: support cp_fw_write_wait for beige_goby Same as dimgrey_cavefish to support WAIT_REG_MEM packet. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5663da86c90dc09c654be636ecebc66dbdda42a8 Author: Chengming Gui Date: Tue Oct 13 17:43:07 2020 +0800 drm/amd/amdgpu: add virtual display support for beige_goby Add virtual ip block for beige_goby Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 67b35b08e7a1fb8dc6f6754c7f6e4b3a4bfe4003 Author: Chengming Gui Date: Tue Oct 13 17:35:21 2020 +0800 drm/amd/amdgpu: configure beige_goby gfx according to gfx 10.3's definition The gfx version of beige_goby is 10.3, identical to sienna_cichlid, follow the way of sienna_cichlid Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8760403e1965d324779dee922158bde145b60b2d Author: Chengming Gui Date: Tue Oct 13 17:08:07 2020 +0800 drm/amd/amdgpu: add sdma ip block for beige_goby Enable sdma block for beige_goby, same as sienna_cichlid v2: share the same setting of sdma instance num with vangogh Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Suggested-by: Alexander Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 898319ca1e17232e7e46974969e1cc1b1eadbc2e Author: Chengming Gui Date: Tue Oct 13 17:04:01 2020 +0800 drm/amd/amdgpu: add gfx ip block for beige_goby Enable gfx block for beige_goby, same as dimgrey_cavefish Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a1dede364b998b629df32d10d2ef15844854e14d Author: Chengming Gui Date: Tue Oct 13 16:58:01 2020 +0800 drm/amd/amdgpu: add ih ip block for beige_goby Enable ih block for beige_goby, same as dimgrey_cavefish Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 2d527ea6fd32a8656042d9699c54e302282c0ce3 Author: Chengming Gui Date: Tue Oct 13 16:51:08 2020 +0800 drm/amd/amdgpu: add gmc ip block for beige_goby Enable gmc block for beige_goby, same as sienna_cichlid Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit aa2caa2ad6b88a31ccefa50518d130a99afffba0 Author: Chengming Gui Date: Tue Oct 13 16:46:21 2020 +0800 drm/amd/amdgpu: add common ip block for beige_goby Same as dimgrey_cavefish v2: fix comments typo Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ece6fb068d6952811434c921a7b2a7a7e13a54ac Author: Chengming Gui Date: Tue Oct 13 16:42:02 2020 +0800 drm/amd/amdgpu: add mmhub support for beige_goby Same as dimgrey_cavefish Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fd5b4b44e453c1ba850bedb197c38310f3379299 Author: Chengming Gui Date: Tue Oct 13 16:32:42 2020 +0800 drm/amd/amdgpu: initialize IP offset for beige_goby Add ip offset definition for beige_goby and initialize it v2: squash in fixes (Alex) V3: fix permissions on file (Alex) Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8573035a95f526e88535b3f9ff856e468572989f Author: Chengming Gui Date: Tue Oct 13 16:09:55 2020 +0800 drm/amd/amdgpu: add common support for beige_goby Add external id and set clock gating for beige_goby Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit d2bfc50de286ae69f9184e031a528c8976345e1e Author: Chengming Gui Date: Tue Oct 13 15:46:16 2020 +0800 drm/amd/amdgpu: add gmc support for beige_goby Same as dimgrey_cavefish Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f7b97efef6dc86ca5b82790bee35c0956d9e471d Author: Chengming Gui Date: Tue Oct 13 14:48:37 2020 +0800 drm/amd/amdgpu: add support for beige_goby firmware Add support for beige_goby cp/rlc firmware Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit b41f5b7ab02667780939c533618d76582df605a6 Author: Chengming Gui Date: Tue Oct 13 14:42:25 2020 +0800 drm/amd/amdgpu: set asic family and ip blocks for beige_goby Same as navi series Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 2542e3c654f2e513020df5729d51ac2e2e1ae913 Author: Chengming Gui Date: Tue Oct 13 14:38:49 2020 +0800 drm/amd/amdgpu: set fw load type for beige_goby Use direct load for beige_goby Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 6f1695918c2ad0e1abc9d9450285e6ee3b938c85 Author: Chengming Gui Date: Tue Oct 13 14:30:32 2020 +0800 drm/amd/amdgpu: add beige_goby asic type Add chip type for beige_goby v2: fix enum count (Alex) Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 6b8dd1337a23118e798db1984cacce36c4a7af66 Author: Aric Cyr Date: Sun May 9 15:17:58 2021 -0400 drm/amd/display: 3.2.136 Signed-off-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 41a9e02bb0ab56f48d3c66464ac7081df684e25b Author: Anthony Koo Date: Sat May 8 21:09:49 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.66 Signed-off-by: Anthony Koo Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3ca402375a2197579d1029e7fa9d856847fe0e7b Author: Wyatt Wood Date: Thu May 6 16:11:16 2021 -0400 drm/amd/display: Refactor and add visual confirm for HW Flip Queue [Why] Visual confirm will indicate if driver is programming the surface address. Refactor is required because much of the visual confirm logic is buried deep in the mpcc files. In addition, visual confirm is not updated during fast updates. [How] In order to have visual confirm for driver flips, visual confirm needs to be updated on every frame, including fast updates. Add a new hw sequencer interface update_visual_confirm_color, and a new mpc function pointer set_bg_color. v2: drop unused variable (Alex) Signed-off-by: Wyatt Wood Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 60d177fdf8843602e1eb9dfb4900a0d260d32c1b Author: Nikola Cornij Date: Thu May 6 22:46:52 2021 -0400 drm/amd/display: Use the correct max downscaling value for DCN3.x family [why] As per spec, DCN3.x can do 6:1 downscaling and DCN2.x can do 4:1. The max downscaling limit value for DCN2.x is 250, which means it's calculated as 1000 / 4 = 250. For DCN3.x this then gives 1000 / 6 = 167. [how] Set maximum downscaling limit to 167 for DCN3.x Signed-off-by: Nikola Cornij Reviewed-by: Charlene Liu Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bbc49fc0326be4f1518fa9d81e527ebf989e6d4e Author: Wayne Lin Date: Wed Apr 28 18:04:44 2021 +0800 drm/amd/display: Avoid get/put vblank when stream disabled [Why] amdgpu_dm_crtc_set_crc_source() will call amdgpu_dm_crtc_configure_crc_source() to enable/disable CRC generation. However, configuration will be deferred to stream enabled. If stream is not enabled, current flow will still try to get/put vblank refcount. [How] Return EINVAL to skip actions on vblank refcount when stream is not enabled. Signed-off-by: Wayne Lin Reviewed-by: Chao-kai Wang Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 67c268a50a119ed92f1d0b742a8df6a559fbc93b Author: Zhan Liu Date: Wed May 5 17:44:46 2021 -0400 drm/amd/display: Correct DPCD revision for eDP v1.4 [Why] eDP version and DPCD revision are different. Per VESA spec, "The DPCD revision for eDP v1.4 is 13h". SUPPORTED_LINK_RATES is valid since eDP v1.4 (DPCD_REV_13). [How] Correct DPCD_REV for eDP v1.4. Signed-off-by: Zhan Liu Reviewed-by: Nikola Cornij Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3bb68cec4db82ac9134181557c70c9eeb55ef403 Author: Bhawanpreet Lakha Date: Thu Apr 29 16:32:47 2021 -0400 drm/amd/display: Add Overflow check to skip MALL [Why] In some small modes (<200pixels) the stutter period is really big and will cause overflow. In these cases we shouldnt try to enable MALL as it will exceeds range of hysteresis timer (this can be seen in some IGT tests where the plane size is small) [How] Compare the stutter_period with the frame time and if we will overflow there is no point in trying to enable MALL (and see the ASSERT) so we early exist in this case Signed-off-by: Bhawanpreet Lakha Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d98af2725d42e85efb04a6939939eab31f562e45 Author: Wayne Lin Date: Tue Apr 27 12:00:40 2021 +0800 drm/amd/display: Refactor suspend/resume of Secure display [Why] Once set ROI and do suspend/resume, current flow will not enable OTG_CRC_CTL again due to we'll defer crc configuration when stream is enabled. [How] Remove current suspend/resume function and have logic implemented into amdgpu_dm_atomic_commit_tail() Signed-off-by: Wayne Lin Reviewed-by: Chao-kai Wang Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f1900a9b0f6436153e6b1be398d31f1ead6096f6 Author: Wenjing Liu Date: Mon May 3 18:42:28 2021 -0400 drm/amd/display: consider channel coding in configure lttpr mode [why] Some lttpr configuration steps are exclusive to 8b/10b channel coding mode. We need to take channel conding into account. Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Stylon Wang Acked-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 37f270c6d80505258918ab859e0d3c78be0b3ca5 Author: Wenjing Liu Date: Mon May 3 17:32:05 2021 -0400 drm/amd/display: rename perform_link_training_int function [why] The function's name doesn't represent what it actaully does. The function implements necessary steps for our hardware to transition from link training mode back to video idle mode. Therefore, rename the function as dp_transition_to_video_idle so everyone can understand it. Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4c247f8c57f3bde6cde98f180a2b8b559da47bee Author: Wenjing Liu Date: Mon May 3 17:05:40 2021 -0400 drm/amd/display: decide link training settings based on channel coding [how] Rename initialize_training_settings to decide_training_settings. Call get link encoding format and decide training settings based on current channel coding. Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 55bac4a77a86690402dc9462455438c84783394f Author: Wenjing Liu Date: Mon May 3 14:51:27 2021 -0400 drm/amd/display: determine dp link encoding format from link settings [how] Implement a function that determines link encoding format based on the link settings passed in. Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6cb2ce8e31a3ce32819cd4bbfbdaaa8396d0092e Author: Chris Park Date: Tue May 4 16:20:55 2021 -0400 drm/amd/display: Disconnect non-DP with no EDID [Why] Active DP dongles return no EDID when dongle is connected, but VGA display is taken out. Current driver behavior does not remove the active display when this happens, and this is a gap between dongle DTP and dongle behavior. [How] For active DP dongles and non-DP scenario, disconnect sink on detection when no EDID is read due to timeout. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5e9ff15976c203fc7940cb47ace63c9391100bd6 Author: George Shen Date: Tue May 4 15:31:37 2021 -0400 drm/amd/display: Minor refactor of DP PHY test automation [Why] Improve readability and maintainability of code. [How] Refactor test pattern size calculation out of function call parameter and store value in variable. Signed-off-by: George Shen Reviewed-by: Wenjing Liu Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 194038fd736f8907b5be786092696e5631d5bdf0 Author: Rodrigo Siqueira Date: Tue May 4 10:09:25 2021 -0400 drm/amd/display: Document set RECOUT operation During the investigation on how to add visual confirmation on top of the planes used by DCN, it becomes evident that the lack of information in the code makes this work unnecessarily complicated. This commit introduces a set of documentation related to the RECOUT operation in order to make it easy for developers to navigate this set of functions. Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 568bb205d2a4c8be59e14bcab219e1376335e52d Author: Rodrigo Siqueira Date: Thu Apr 15 10:22:03 2021 -0400 drm/amd/display: Add kernel-doc to some hubp functions Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7969b6ecb356e83538ba27daecbdbea72ff1365a Author: Rodrigo Siqueira Date: Thu Apr 15 09:57:19 2021 -0400 drm/amd/display: Remove legacy comments To improve the code readability, this commit removes a set of commented and not used functions for a long time. Notice that now we have the amdgpu_dm_dtn_log, which prints all the relevant information that we need. Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2334470369f14166497edb6556b0f4ce49c6ae01 Author: Rodrigo Siqueira Date: Thu Apr 15 09:32:57 2021 -0400 drm/amd/display: Add documentation for power gate plane This commit introduces kernel documentation to some essential functions related to power gate control over planes. It also adds a macro to make one part of the code easy to understand. Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 980d6042c1dc0d934eec15f4bca6f55d332b82e8 Author: Wyatt Wood Date: Tue Jan 19 17:05:05 2021 -0500 drm/amd/display: Add get_current_time interface to dmub_srv [Why] Need to get current DMUB time. [How] Add get_current_time interface to dmub_srv. v2: drop whitespace changes (Alex) Signed-off-by: Wyatt Wood Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 132c894e93f18cf3b943753063bb0fd6ca8483ac Author: Hugo Hu Date: Wed Apr 21 14:23:44 2021 +0800 drm/amd/display: treat memory as a single-channel for asymmetric memory V3 Previous patch caused crash and had been reverted. This patch addresses the issue without regression. [Why] 1. Driver use umachannelnumber to calculate watermarks for stutter. In asymmetric memory config, the actual bandwidth is less than dual-channel. The bandwidth should be the same as single-channel. 2. We found single rank dimm need additional delay time for stutter. [How] Get information from each DIMM. Treat memory config as a single-channel for asymmetric memory in bandwidth calculating. Add additional delay time for single rank dimm. Signed-off-by: Hugo Hu Reviewed-by: Sung Lee Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5709121a58a21e0bbde362536ec456f1a64c4ec4 Author: Lijo Lazar Date: Thu May 13 16:21:23 2021 +0800 drm/amd/pm: Reset max GFX clock after disabling determinism When determinism mode is disabled on aldebaran, max GFX clock will be reset to default max frequency value. Signed-off-by: Lijo Lazar Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit e943dd8861f70785fa862ba699c7f3ba22811609 Author: Lijo Lazar Date: Thu May 13 15:51:18 2021 +0800 drm/amd/pm: Fix showing incorrect frequencies on aldebaran v1: Use the current and custom pstate frequencies to track the current and user-set min/max values in manual and determinism mode. Previously, only actual_* value was used to track the currrent and user requested value. The value will get reassigned whenever user requests a new value with pp_od_clk_voltage node. Hence it will show incorrect values when user requests an invalid value or tries a partial request without committing the values. Separating out to custom and current variable fixes such issues. v2: Remove redundant if-else check Signed-off-by: Lijo Lazar Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit eed13b0e374e752d192b1fc62a7ecdb3938d70a7 Author: Lijo Lazar Date: Thu May 13 14:42:17 2021 +0800 drm/amd/pm: Add custom/current freq to pstates Add custom member for user requested custom frequency, level mask or min/max frequencies. Add curr member to keep track of the current active values. Signed-off-by: Lijo Lazar Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 8f6368a9c92645e72fdd55862aa09821cdb81b43 Author: John Clements Date: Mon May 17 16:36:26 2021 +0800 drm/amdgpu: Conditionally reset RAS counters on boot Only clear RAS error counters if perestent EDC harvesting is not supported Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 8ef4f94addd734a6ce2d3f7d2a178b608e2dd8c7 Author: Changfeng Date: Fri May 14 15:28:25 2021 +0800 drm/amdgpu: disable 3DCGCG on picasso/raven1 to avoid compute hang There is problem with 3DCGCG firmware and it will cause compute test hang on picasso/raven1. It needs to disable 3DCGCG in driver to avoid compute hang. Signed-off-by: Changfeng Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d9c7f753b8b4d69294ec990c185d5d5fd0a29336 Author: Peng Ju Zhou Date: Wed Apr 28 16:22:27 2021 +0800 drm/amdgpu: Refine the error report when flush tlb. there are 2 hubs to flush in the gmc, to make it easier to debug when hub flush failed, refine the logs. Signed-off-by: Peng Ju Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e0972f8c21d2f1683329e7dddb45b0ed0a1b2fd9 Author: Peng Ju Zhou Date: Fri Apr 23 13:36:18 2021 +0800 drm/amdgpu: Skip the program of GRBM_CAM* in SRIOV KMD should not the program these registers, so skip them in the SRIOV environment. Signed-off-by: Peng Ju Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ea46eaf26c6ce1232647fe2eab8046a85cc4f05b Author: Yi Li Date: Fri May 14 14:40:39 2021 +0800 drm/amdgpu: Fix GPU TLB update error when PAGE_SIZE > AMDGPU_PAGE_SIZE When PAGE_SIZE is larger than AMDGPU_PAGE_SIZE, the number of GPU TLB entries which need to update in amdgpu_map_buffer() should be multiplied by AMDGPU_GPU_PAGES_IN_CPU_PAGE (PAGE_SIZE / AMDGPU_PAGE_SIZE). Reviewed-by: Christian König Signed-off-by: Yi Li Signed-off-by: Huacai Chen Signed-off-by: Alex Deucher commit 765385ec00a94382b509c75867e2a40fa599a26d Author: Philip Yang Date: Thu May 13 12:30:48 2021 -0400 drm/amdkfd: heavy-weight flush TLB after unmap Need do a heavy-weight TLB flush to make sure we have no more dirty data in the cache for the unmapped pages. Define enum TLB_FLUSH_TYPE, add flush_type parameter to amdgpu_amdkfd_flush_gpu_tlb_pasid. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7a3ae1e249c2241ed520b0dec08b7b877b427a44 Author: Philip Yang Date: Thu May 13 12:16:01 2021 -0400 Revert "drm/amdkfd: flush TLB after updating GPU page table" This reverts commit 1704ac8e439e3dcf97431e268bd64fde1874d807. After "drm/amdgpu: flush TLB if valid PDE turns into PTE" is checked in, this workaround is not needed. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5228cd65742abd2221d7bdb622544ac47e41d87c Author: Jiawei Gu Date: Thu May 13 14:17:58 2021 +0800 drm/amdgpu: Fill adev->unique_id with data from PF2VF msg Initialize unique_id from PF2VF under virtualization. V2: skip smu_get_unique_id() under virtualization Signed-off-by: Jiawei Gu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit bf546940d5aa15852f58d59158965737505edc03 Author: Philip Yang Date: Wed May 12 08:02:46 2021 -0400 drm/amdgpu: flush TLB if valid PDE turns into PTE Mapping huge page, 2MB aligned address with 2MB size, uses PDE0 as PTE. If previously valid PDE0, PDE0.V=1 and PDE0.P=0 turns into PTE, this requires TLB flush, otherwise page table walker will not read updated PDE0. Change page table update mapping to return table_freed flag to indicate the previously valid PDE may have turned into a PTE if page table is freed. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a6ce1e1aab3fafbd97e39c4dc08add725f3abd66 Author: Christian König Date: Wed May 12 10:36:43 2021 +0200 drm/radeon: use the dummy page for GART if needed Imported BOs don't have a pagelist any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Fixes: 0575ff3d33cd ("drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays v2") commit 3b5d86fc23822332b569a69ed694d68af50fd3f9 Author: Christian König Date: Tue Apr 27 11:40:40 2021 +0200 drm/amdgpu: move struct amdgpu_vram_reservation into vram mgr Not used outside of that file. Signed-off-by: Christian König Acked-by: Felix Kuehling Tested-by: Nirmoy Das Signed-off-by: Alex Deucher commit dfffdf5e65975a03aa26836df3bc320d45202450 Author: Christian König Date: Tue Apr 27 11:36:10 2021 +0200 drm/amdgpu: check contiguous flags instead of mm_node Drop the last user of drm_mm_node. Signed-off-by: Christian König Acked-by: Felix Kuehling Tested-by: Nirmoy Das Signed-off-by: Alex Deucher commit abf91e0d33166ba1afcf10e239aec966275da3c1 Author: Christian König Date: Tue Apr 27 11:17:59 2021 +0200 drm/amdgpu: set the contiguous flag if possible This avoids reallocating scanout BOs on first pin in a lot of cases. Signed-off-by: Christian König Acked-by: Felix Kuehling Tested-by: Nirmoy Das Signed-off-by: Alex Deucher commit 2b77ade8b90f292849a5d8fa75c063fdb70bb815 Author: Christian König Date: Tue Apr 27 10:29:10 2021 +0200 drm/amdgpu: use cursor functions in amdgpu_bo_in_cpu_visible_vram One of the last remaining uses of drm_mm_node. Signed-off-by: Christian König Acked-by: Felix Kuehling Tested-by: Nirmoy Das Signed-off-by: Alex Deucher commit 0ccc3ccf5b3af48161d1ddd088dbca12a9837c70 Author: Christian König Date: Mon Mar 22 13:33:05 2021 +0100 drm/amdgpu: re-apply "use the new cursor in the VM code" v2 Now that we found the underlying problem we can re-apply this patch. This reverts commit 6b44b667e24cf89603ebdaa31b939c034d425162. v2: rebase on KFD changes Signed-off-by: Christian König Acked-by: Felix Kuehling Tested-by: Nirmoy Das Signed-off-by: Alex Deucher commit c6a11133337c644d1e63a78217d490e871796d1e Author: Hawking Zhang Date: Thu May 13 23:55:49 2021 +0800 drm/amdgpu: query boot config cap before issue psp cmd Only send boot_config cmd to ASICs that support dynamic boot config. Otherwise, the boot_config cmd will fail. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit cffd6f9d42bd2119edff9efdaaed08cc08178f95 Author: Hawking Zhang Date: Thu May 13 23:06:57 2021 +0800 drm/amdgpu: add helper function to query dynamic boot config cap Check firmware flags to determine whether dynmaic boot config is supported or not. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 82a520301628dd51eb7ca7a60bbde574a4baebd1 Author: Hawking Zhang Date: Thu May 13 22:17:07 2021 +0800 drm/amdgpu: switch to cached fw flags for mem training cap Check cached firmware_flags to determin whether two stage mem training is supported or not. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 698b1010864e4e396762567748724ebadc8184cd Author: Hawking Zhang Date: Thu May 13 22:02:29 2021 +0800 drm/amdgpu: switch to cached fw flags for sram ecc cap Check cached firmware_flags to determine whether sram ecc is supported or not. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 58ff791ad3ef468fe8f00eb8849b435fe52811d3 Author: Hawking Zhang Date: Thu May 13 21:56:50 2021 +0800 drm/amdgpu: switch to cached fw flags for gpu virt cap Check cached firmware_flags to determine if gpu virtualization is supported in vbios Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 5968c6a2ba8f98fcdb64c5ef4c7ebce2a98b0f45 Author: Hawking Zhang Date: Thu May 13 21:46:24 2021 +0800 drm/amdgpu: add atomfirmware helper function to query fw cap Fimware capability was changed from 16 bits to 32 bits for atomfirmware. add helper funciton to query firmware capability and cache the value at early stage. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit ed9d205363c3ec786126e46568e9e9aadaf0cb93 Author: Bokun Zhang Date: Thu May 13 01:17:54 2021 -0400 drm/amdgpu: Complete multimedia bandwidth interface - Update SRIOV PF2VF header with latest revision - Extend existing function in amdgpu_virt.c to read MM bandwidth config from PF2VF message - Add SRIOV Sienna Cichlid codec array and update the bandwidth with PF2VF message v2: squash in removal of unused variable (Alex) Signed-off-by: Bokun Zhang Reviewed-by: Monk liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2b2339eeaff597778b042bf0010b87bac33715e2 Author: Felix Kuehling Date: Mon May 10 18:50:11 2021 -0400 drm/amdgpu: Albebaran: MTYPE_NC for coarse-grain remote memory MTYPE UC was used for a specific use case that ended up not being implemented. Use NC for better performance for coarse-grained memory where cache coherence during shader execution is not required. Signed-off-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 0c6f7777cf37b84839d556a41b9dbeedccfa64d4 Author: Felix Kuehling Date: Mon May 10 18:37:56 2021 -0400 drm/amdgpu: Arcturus: MTYPE_NC for coarse-grain remote memory MTYPE UC was used for a specific use case that ended up not being implemented. Use NC for better performance for coarse-grained memory where cache coherence during shader execution is not required. Signed-off-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 195c41fba46c0830b2c58896d057b2f1a1e7138a Author: Jinzhou Su Date: Wed May 12 09:48:13 2021 +0800 drm/amdgpu: Add compile flag for securedisplay Add compile flag CONFIG_DEBUG_FS to clear the warning: unused variable 'amdgpu_securedisplay_debugfs_ops' Signed-off-by: Jinzhou Su Acked-by: Alex Deucher Acked-by: Huang Rui Reported-by: kernel test robot Signed-off-by: Alex Deucher commit e2b1f9f52bb630a076039064aa4cb7f55f3e5a14 Author: Dennis Li Date: Tue May 11 15:35:49 2021 +0800 drm/amdkfd: refine the poison data consumption handling The user applications maybe register the KFD_EVENT_TYPE_HW_EXCEPTION and KFD_EVENT_TYPE_MEMORY events, driver could notify them when poison data consumed. Beside that, some applications maybe register SIGBUS signal hander. These applications will handle poison data by themselves, exit or re-create context to re-dispatch works. Signed-off-by: Dennis Li Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2bb5b5f688cbbd5030629905d3ed8032ab46e79f Author: Kai-Heng Feng Date: Fri Apr 30 12:56:56 2021 +0800 drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected Screen flickers rapidly when two 4K 60Hz monitors are in use. This issue doesn't happen when one monitor is 4K 60Hz (pixelclock 594MHz) and another one is 4K 30Hz (pixelclock 297MHz). The issue is gone after setting "power_dpm_force_performance_level" to "high". Following the indication, we found that the issue occurs when sclk is too low. So resolve the issue by disabling sclk switching when there are two monitors requires high pixelclock (> 297MHz). v2: - Only apply the fix to Oland. Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher commit a9a76beed265444a18cb10b0cad58aa1f2e99cea Author: Philip Yang Date: Wed May 5 10:32:27 2021 -0400 drm/amdkfd: new range accessible by all GPUs If xnack is on, new range is created to recover retry vm fault or created by SVM API calls, set all GPUs have access to the range. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6e6fe7c9285e96b28f6e297805edbc5eaac23316 Author: Lijo Lazar Date: Tue May 11 20:20:14 2021 +0800 drm/amd/pm: Update aldebaran pmfw interface Update aldebaran driver-PMFW interface to version 0x07 Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0aa0725fa7172658e4f56df1a6e8000bea8c09cd Author: Roy Sun Date: Fri Dec 11 13:00:03 2020 +0800 drm/amd/amdgpu: Cancel the hrtimer in sw_fini Move the process of cancelling hrtimer to sw_fini Signed-off-by: Roy Sun Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 0064b0ce85bb86d8a6fa066323f6318956c2dd59 Author: Kenneth Feng Date: Tue May 11 11:00:41 2021 +0800 drm/amd/pm: enable ASPM by default Since ASPM function has been stable, we don't need to add the modprobe parameter and we can enable ASPM by default. Signed-off-by: Kenneth Feng Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 32358093b66d49f6cb4d6dec8ed948f9ed69e928 Author: Likun Gao Date: Fri May 7 13:56:46 2021 +0800 drm/amdgpu: update the method for harvest IP for specific SKU Update the method of disabling VCN IP for specific SKU for navi1x ASIC, it will judge whether should add the related IP at the function of amdgpu_device_ip_block_add(). Signed-off-by: Likun Gao Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 7bd939d04db9e6c3e92bb3ffb46ba9192cb258fc Author: Likun GAO Date: Thu Apr 29 14:08:13 2021 +0800 drm/amdgpu: add judgement when add ip blocks (v2) Judgement whether to add an sw ip according to the harvest info. v2: fix indentation (Alex) Signed-off-by: Likun Gao Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 1acbb613c445e35037a1ddd416cd697fc76143b5 Author: Dennis Li Date: Sat May 8 17:10:24 2021 +0800 drm/amdgpu: add synchronization among waves in the same threadgroup It is possible that the previous waves have exited before others are created, so the other waves maybe reuse pyhsical resouces left by previous ones. Therefore add barrier instruction to synchronize waves within the same threadgroup. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cbd4945ca5b88ed015ab61e70f788de1a71bf9cc Author: Alex Deucher Date: Fri Apr 23 16:43:18 2021 -0400 drm/amdgpu/display: fix dal_allocation documentation Add missing structure elements. Fixes: 0dd79532340568 ("drm/amdgpu/display: Implement functions to let DC allocate GPU memory") Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 32f9402d56d876055ce0b75f41130de33072d5a7 Author: Anusha Srivatsa Date: Tue May 18 14:34:44 2021 -0700 drm/i915/dmc: s/intel_csr.c/intel_dmc.c and s/intel_csr.h/intel_dmc.h Finally, rename the header and source file from csr to dmc. v2: Add file rename in Documentation. - Place headers in orders. (Jani) Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-6-anusha.srivatsa@intel.com commit 74ff150d9871e825d64a9966f493058ef0de44e9 Author: Anusha Srivatsa Date: Tue May 18 14:34:43 2021 -0700 drm/i915/dmc: Rename functions names having "csr" No functional change. Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-5-anusha.srivatsa@intel.com commit 0633cdcbaa77f775ca2e1a0a56734b407d19b08f Author: Anusha Srivatsa Date: Tue May 18 14:34:42 2021 -0700 drm/i915/dmc: Rename macro names containing csr Rename all occurences of CSR_* with DMC_* Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-4-anusha.srivatsa@intel.com commit ec2b1485a06519308921ce0e67d802bbc920c711 Author: Anusha Srivatsa Date: Tue May 18 14:34:41 2021 -0700 drm/i915/dmc: s/HAS_CSR/HAS_DMC No functional change. Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-3-anusha.srivatsa@intel.com commit c24760cf42c3ccfc242dc1c7d82cf5a55c3cb0ff Author: Anusha Srivatsa Date: Tue May 18 14:34:40 2021 -0700 drm/i915/dmc: s/intel_csr/intel_dmc No functional change. v2: Chchpatch fixes. Cc: Jani Nikula Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-2-anusha.srivatsa@intel.com commit 41ab70e06e13f81f0da76c5e0734c9bd32b5a4d9 Merge: 3a3ca7265316c fc1e985b67f9f Author: Dave Airlie Date: Thu May 20 10:29:13 2021 +1000 Merge tag 'imx-drm-next-2021-05-12' of git://git.pengutronix.de/git/pza/linux into drm-next drm/imx: fixes, dma-fence annotation, and color encoding/range plane properties - Annotate dma-fence critical section in atomic_commit_tail - Fix PRG modifiers after drmm resource conversion to regain tiled scanout capability - Add 8 pixel alignment fix to support 1366x768 resolution - Stop advertising YUV formats on planes that don't support them - Add COLOR_ENCODING and COLOR_RANGE plane properties on planes that support them - Remove unnecessarily exported symbols Signed-off-by: Dave Airlie From: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/858310d193e10fc17221418dee6172af367eb046.camel@pengutronix.de commit f9fb145b27cd7700399075c0897e6918a4d5dabe Author: satya priya Date: Wed May 12 16:43:07 2021 +0530 dt-bindings: pinctrl: qcom-pmic-gpio: Add pm7325 support Add compatible string for PM7325 pmic GPIO support to the Qualcomm PMIC GPIO binding. Signed-off-by: satya priya Acked-by: Rob Herring Link: https://lore.kernel.org/r/1620817988-18809-3-git-send-email-skakit@codeaurora.org Signed-off-by: Linus Walleij commit 676e2d075040990bdfec7500df7fac6887611ed1 Author: satya priya Date: Wed May 12 16:43:06 2021 +0530 pinctrl: qcom: spmi-gpio: Add support for pm7325 Add compatible string for PM7325 pmic GPIO support to the Qualcomm PMIC GPIO driver. Signed-off-by: satya priya Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/1620817988-18809-2-git-send-email-skakit@codeaurora.org Signed-off-by: Linus Walleij commit ef9385fbf30e9484e4291db76e000b8961419782 Author: Zhen Lei Date: Tue May 11 16:51:26 2021 +0800 pinctrl: iproc-gpio: Remove redundant error printing in iproc_gpio_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-by: Ray Jui Link: https://lore.kernel.org/r/20210511085126.4287-1-thunder.leizhen@huawei.com Signed-off-by: Linus Walleij commit 0f9facdbd9d432442e5655425e8702ed8e28f1b8 Author: Zhen Lei Date: Tue May 11 17:09:36 2021 +0800 pinctrl: ocelot: Remove redundant error printing in ocelot_pinctrl_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210511090936.4452-1-thunder.leizhen@huawei.com Signed-off-by: Linus Walleij commit 57b55eeb755201832c2fc2df58818f64fc023fdb Author: Andy Shevchenko Date: Mon May 10 22:47:17 2021 +0300 pinctrl: Keep enum pin_config_param ordered by name (part 2) It seems the ordering is by name. Keep it that way. Here updating the entire list (there were two more options not in order). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510194717.12255-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit d7f444499d6faf9a6ae3b27ec094109528d2b9a7 Author: Bixuan Cui Date: Sat May 8 11:15:02 2021 +0800 pinctrl: equilibrium: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210508031502.53637-1-cuibixuan@huawei.com Signed-off-by: Linus Walleij commit bfc1f378c8953e68ccdbfe0a8c20748427488b80 Author: Sergey Shtylyov Date: Tue May 18 23:38:54 2021 +0300 pata_octeon_cf: avoid WARN_ON() in ata_host_activate() Iff platform_get_irq() fails (or returns IRQ0) and thus the polling mode has to be used, ata_host_activate() hits the WARN_ON() due to 'irq_handler' parameter being non-NULL if the polling mode is selected. Let's only set the pointer to the driver's IRQ handler if platform_get_irq() returns a valid IRQ # -- this should avoid the unnecessary WARN_ON()... Fixes: 43f01da0f279 ("MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree.") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/3a241167-f84d-1d25-5b9b-be910afbe666@omp.ru Signed-off-by: Jens Axboe commit c199f64ff93c48a45add92eee4456ffcabfc838e Author: Vasily Gorbik Date: Wed May 19 15:03:13 2021 +0200 instrumentation.h: Avoid using inline asm operand modifiers The expansion of instrumentation_begin/instrumentation_end on s390 will result in a compiler error if the __COUNTER__ value is high enough. For example with "i" (154) the "%c0" operand of annotate_reachable will be expanded to -102: -102: .pushsection .discard.instr_begin .long -102b - . .popsection This is a quirk of the gcc backend for s390, it interprets the %c0 as a signed byte value. Avoid using operand modifiers in this case by simply converting __COUNTER__ to string, with the same result, but in an arch assembler independent way. Signed-off-by: Vasily Gorbik Signed-off-by: Josh Poimboeuf Link: https://lore.kernel.org/r/patch-2.thread-1a26be.git-1a26be80cb18.your-ad-here.call-01621428935-ext-2104@work.hours Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Miroslav Benes Cc: Borislav Petkov Cc: linux-kernel@vger.kernel.org commit f1069a8756b9e9f6c055e709740d2d66650f0fb0 Author: Vasily Gorbik Date: Wed May 19 15:03:08 2021 +0200 compiler.h: Avoid using inline asm operand modifiers The expansion of annotate_reachable/annotate_unreachable on s390 will result in a compiler error if the __COUNTER__ value is high enough. For example with "i" (154) the "%c0" operand of annotate_reachable will be expanded to -102: -102: .pushsection .discard.reachable .long -102b - . .popsection This is a quirk of the gcc backend for s390, it interprets the %c0 as a signed byte value. Avoid using operand modifiers in this case by simply converting __COUNTER__ to string, with the same result, but in an arch assembler independent way. Signed-off-by: Vasily Gorbik Signed-off-by: Josh Poimboeuf Link: https://lore.kernel.org/r/patch-1.thread-1a26be.git-930d1b44844a.your-ad-here.call-01621428935-ext-2104@work.hours Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Miroslav Benes Cc: Borislav Petkov Cc: linux-kernel@vger.kernel.org commit 0f844e4c993d6bbdce8547deeb99e89a5a797fa2 Merge: a49e72b3bda73 f494f0935ffb6 Author: David S. Miller Date: Wed May 19 13:27:42 2021 -0700 Merge branch 'mt7530-interrupt-support' DENG Qingfang says: ==================== MT7530 interrupt support Add support for MT7530 interrupt controller. ==================== Signed-off-by: David S. Miller commit f494f0935ffb62c1d5463e59dfcd7d89a46c7807 Author: DENG Qingfang Date: Wed May 19 11:32:02 2021 +0800 staging: mt7621-dts: enable MT7530 interrupt controller Enable MT7530 interrupt controller in the MT7621 SoC. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4006f986c091cda1a66067f77b6f5704a9618562 Author: DENG Qingfang Date: Wed May 19 11:32:01 2021 +0800 dt-bindings: net: dsa: add MT7530 interrupt controller binding Add device tree binding to support MT7530 interrupt controller. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: David S. Miller commit ba751e28d44255744a30190faad0ca09b455c44d Author: DENG Qingfang Date: Wed May 19 11:32:00 2021 +0800 net: dsa: mt7530: add interrupt support Add support for MT7530 interrupt controller to handle internal PHYs. In order to assign an IRQ number to each PHY, the registration of MDIO bus is also done in this driver. Signed-off-by: DENG Qingfang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit e40d2cca01893c1941f5959b14bb0cd0d4f4d099 Author: DENG Qingfang Date: Wed May 19 11:31:59 2021 +0800 net: phy: add MediaTek Gigabit Ethernet PHY driver Add support for MediaTek Gigabit Ethernet PHYs found in MT7530 and MT7531 switches. The initialization procedure is from the vendor driver, but due to lack of documentation, the function of some register values remains unknown. Signed-off-by: DENG Qingfang Signed-off-by: David S. Miller commit a49e72b3bda73d36664a084e47da9727a31b8095 Author: Wei Yongjun Date: Wed May 19 15:58:52 2021 +0000 net: qrtr: ns: Fix error return code in qrtr_ns_init() Fix to return a negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: c6e08d6251f3 ("net: qrtr: Allocate workqueue before kernel_bind") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 20e76d3d044d936998617f8acd7e77bebd9ca703 Author: Wei Yongjun Date: Wed May 19 14:16:27 2021 +0000 net: ethernet: ixp4xx: Fix return value check in ixp4xx_eth_probe() In case of error, the function mdiobus_get_phy() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 05ff8435e50569a0a6b95e5ceaea43696e8827ab Author: Davide Caratti Date: Wed May 19 15:17:21 2021 +0200 net/sched: cls_api: increase max_reclassify_loop modern userspace applications, like OVN, can configure the TC datapath to "recirculate" packets several times. If more than 4 "recirculation" rules are configured, packets can be dropped by __tcf_classify(). Changing the maximum number of reclassifications (from 4 to 16) should be sufficient to prevent drops in most use cases, and guard against loops at the same time. Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 8852c552402979508fdc395ae07aa8761aa46045 Author: Josh Poimboeuf Date: Tue May 18 18:59:15 2021 -0500 kbuild: Fix objtool dependency for 'OBJECT_FILES_NON_STANDARD_ := n' "OBJECT_FILES_NON_STANDARD_vma.o := n" has a dependency bug. When objtool source is updated, the affected object doesn't get re-analyzed by objtool. Peter's new variable-sized jump label feature relies on objtool rewriting the object file. Otherwise the system can fail to boot. That effectively upgrades this minor dependency issue to a major bug. The problem is that variables in prerequisites are expanded early, during the read-in phase. The '$(objtool_dep)' variable indirectly uses '$@', which isn't yet available when the target prerequisites are evaluated. Use '.SECONDEXPANSION:' which causes '$(objtool_dep)' to be expanded in a later phase, after the target-specific '$@' variable has been defined. Fixes: b9ab5ebb14ec ("objtool: Add CONFIG_STACK_VALIDATION option") Fixes: ab3257042c26 ("jump_label, x86: Allow short NOPs") Reported-by: Matthew Wilcox Signed-off-by: Josh Poimboeuf commit 7b16509b29e007d15b158aa52bea25b22faf7972 Merge: 9287aa2bfd54a 3a2daa7248647 Author: David S. Miller Date: Wed May 19 12:58:29 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-05-19 The following pull-request contains BPF updates for your *net-next* tree. We've added 43 non-merge commits during the last 11 day(s) which contain a total of 74 files changed, 3717 insertions(+), 578 deletions(-). The main changes are: 1) syscall program type, fd array, and light skeleton, from Alexei. 2) Stop emitting static variables in skeleton, from Andrii. 3) Low level tc-bpf api, from Kumar. 4) Reduce verifier kmalloc/kfree churn, from Lorenz. ==================== commit 9287aa2bfd54a8a81f994defabcd92c737511d85 Merge: 340f42f7ff0b8 daeabf89eb892 Author: David S. Miller Date: Wed May 19 12:47:47 2021 -0700 Merge branch 'mlxsw-mphash-policies' Ido Schimmel says: ==================== mlxsw: Add support for new multipath hash policies This patchset adds support for two new multipath hash policies in mlxsw. Patch #1 emits net events whenever the net.ipv{4,6}.fib_multipath_hash_fields sysctls are changed. This allows listeners to react to changes in the packet fields used for the computation of the multipath hash. Patches #2-#3 refactor the code in mlxsw that is responsible for the configuration of the multipath hash, so that it will be easier to extend for the two new policies. Patch #4 adds the register fields required to support the new policies. Patch #5-#7 add support for inner layer 3 and custom multipath hash policies. Tested using following forwarding selftests: * custom_multipath_hash.sh * gre_custom_multipath_hash.sh * gre_inner_v4_multipath.sh * gre_inner_v6_multipath.sh ==================== commit daeabf89eb892cf827608177ecae7ca9389c195a Author: Ido Schimmel Date: Wed May 19 15:08:24 2021 +0300 mlxsw: spectrum_router: Add support for custom multipath hash policy When this policy is set, only enable the packet fields that were enabled by user space for multipath hash computation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 01848e05f8bbff2d799073b307fe2eb42bee764b Author: Ido Schimmel Date: Wed May 19 15:08:23 2021 +0300 mlxsw: spectrum_router: Add support for inner layer 3 multipath hash policy When this policy is set, the kernel uses the inner layer 3 fields for multipath hash computation and falls back to the outer fields if no encapsulation was encountered. This behavior is most likely influenced by the behavior of the flow dissector, which is used for the packet dissection. The Spectrum ASIC, however, cannot fallback to outer fields if inner fields are not available. This should not result in a discrepancy from the software data path because if several flows have matching inner fields, they will tend to have matching outer fields as well. Therefore, implement this policy by enabling both outer and inner layer 3 fields for the multipath hash computation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit b7b8f435ea3b33ba7067f992c5b85a62f24d19ed Author: Ido Schimmel Date: Wed May 19 15:08:22 2021 +0300 mlxsw: spectrum_outer: Factor out helper for common outer fields Outer IPv4 and IPv6 addresses are used by multiple multipath hash policies. Factor out helpers that set these fields to increase code sharing between different policies. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 28bc824807a5cb95edb46807c210dfff37a3a0b3 Author: Ido Schimmel Date: Wed May 19 15:08:21 2021 +0300 mlxsw: reg: Add inner packet fields to RECRv2 register The RECRv2 register is used for setting up the router's ECMP hash configuration. Extend it with inner packet fields to allow the ECMP hash to be calculated based on inner flow information. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 9d23d3eb6f4134f19947e6319b79ce1e440aba98 Author: Ido Schimmel Date: Wed May 19 15:08:20 2021 +0300 mlxsw: spectrum_router: Move multipath hash configuration to a bitmap Currently, the multipath hash configuration is written directly to the register payload. While this is OK for the two currently supported policies, it is going to be hard to follow when more policies and more packet fields are added. Instead, set the required headers and fields in a bitmap and then dump it to the register payload. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 7725c1c8f73260de2ef0d01ca23b64260fc66ffd Author: Ido Schimmel Date: Wed May 19 15:08:19 2021 +0300 mlxsw: spectrum_router: Replace if statement with a switch statement The code was written when only two multipath hash policies were present, so the if statement was sufficient. The next patch and future patches are going to add support for more policies, so move to a switch statement. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit eb0e4d59b6edbe678ecfc5d5b77608b634057f08 Author: Ido Schimmel Date: Wed May 19 15:08:18 2021 +0300 net: Add notifications when multipath hash field change In-kernel notifications are already sent when the multipath hash policy itself changes, but not when the multipath hash fields change. Add these notifications, so that interested listeners (e.g., switch ASIC drivers) could perform the necessary configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 340f42f7ff0b87a92e69b50706a6c872da756c89 Author: Stephan Gerhold Date: Wed May 19 11:16:13 2021 +0200 nfc: s3fwrn5: i2c: Enable optional clock from device tree S3FWRN5 depends on a clock input ("XI" pin) to function properly. Depending on the hardware configuration this could be an always-on oscillator or some external clock that must be explicitly enabled. So far we assumed that the clock is always-on. Make the driver request an (optional) clock from the device tree and make sure the clock is running before starting S3FWRN5. Note: S3FWRN5 asserts "GPIO2" whenever it needs the clock input to function correctly. On some hardware configurations, GPIO2 is connected directly to an input pin of the external clock provider (e.g. the main PMIC of the SoC). In that case, it can automatically AND the clock enable bit and clock request from S3FWRN5 so that the clock is actually only enabled when needed. It is also conceivable that on some other hardware configuration S3FWRN5's GPIO2 might be connected as a regular GPIO input of the SoC. In that case, follow-up patches could extend the driver to request the GPIO, set up an interrupt and only enable the clock when requested by S3FWRN5. Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 9cc52f5a533a321136b9e447042ad9f8224f738c Author: Stephan Gerhold Date: Wed May 19 11:16:12 2021 +0200 dt-bindings: net: nfc: s3fwrn5: Add optional clock On some systems, S3FWRN5 depends on having an external clock enabled to function correctly. Allow declaring that clock in the device tree. Signed-off-by: Stephan Gerhold Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit f7e0318a314f9271b0f0cdd4bfdc691976976d8c Author: Zheng Yejian Date: Wed May 19 15:34:38 2021 +0800 netlabel: remove unused parameter in netlbl_netlink_auditinfo() loginuid/sessionid/secid have been read from 'current' instead of struct netlink_skb_parms, the parameter 'skb' seems no longer needed. Fixes: c53fa1ed92cd ("netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms") Signed-off-by: Zheng Yejian Signed-off-by: David S. Miller commit 4bebe324079eef6ab00a029a338d3e46d7f299ee Merge: 798c04f64283c 0d27895bcbb4f Author: David S. Miller Date: Wed May 19 12:23:25 2021 -0700 Merge branch 'intel-cleanups' Guangbin Huang says: ==================== net: intel: some cleanups This patchset adds some cleanups for intel e1000/e1000e ethernet driver. ==================== Reviewed-by: Tony Nguyen Signed-off-by: David S. Miller commit 0d27895bcbb4fc04ec2ff37f012d41784e014453 Author: Hao Chen Date: Wed May 19 14:14:45 2021 +0800 net: e1000e: fix misspell word "retreived" There is a misspell word "retreived" in comment, so fix it to "retrieved". Signed-off-by: Hao Chen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 800b74a57363d2239a550972558a6e97af9e5903 Author: Hao Chen Date: Wed May 19 14:14:44 2021 +0800 net: e1000e: remove repeated word "slot" for netdev.c There are double "slot" in comment, so remove the redundant one. Signed-off-by: Hao Chen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 59398afda1761ad849b437e514af54ce9b74acc6 Author: Hao Chen Date: Wed May 19 14:14:43 2021 +0800 net: e1000e: remove repeated word "the" for ich8lan.c There are double "the" in comment, so remove the redundant one. Signed-off-by: Hao Chen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit e77471f1de0ddba226088ec0cea1c5b1bca0a1de Author: Hao Chen Date: Wed May 19 14:14:42 2021 +0800 net: e1000: remove repeated words for e1000_hw.c There are double "in" and "to" in comments, so remove the redundant one. Signed-off-by: Hao Chen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 4b63b27fc59ab9fd4057e2c6efe8cfadbe3d1448 Author: Hao Chen Date: Wed May 19 14:14:41 2021 +0800 net: e1000: remove repeated word "slot" for e1000_main.c There are double "slot" in comment, so remove the redundant one. Signed-off-by: Hao Chen Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 798c04f64283cfb8889b8e0f1ac04560cc3bfd50 Merge: bc6d076daa8c6 2174fbd719148 Author: David S. Miller Date: Wed May 19 12:17:32 2021 -0700 Merge branch 'net-dev-leading-spaces' Hui Tang says: ==================== net: ethernet: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' ==================== Signed-off-by: David S. Miller commit 2174fbd719148f2b88d85c6a4f6195df42978d5f Author: Hui Tang Date: Wed May 19 13:30:53 2021 +0800 net: fujitsu: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Masahiro Yamada Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 59909c1ab71d92f8bec0c69ece2552aaf44bedce Author: Hui Tang Date: Wed May 19 13:30:52 2021 +0800 net: 8390: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Armin Wolf Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 223f02acce1abeda94d41dec3e622a56a29843ac Author: Hui Tang Date: Wed May 19 13:30:51 2021 +0800 net: xircom: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Masahiro Yamada Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit d1e4916fa703d2bd8d1d75979ea61d3b3d22f125 Author: Hui Tang Date: Wed May 19 13:30:50 2021 +0800 net: fealnx: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit b54f440cb87154a78b19f8b624db1985b57b0dd7 Author: Hui Tang Date: Wed May 19 13:30:49 2021 +0800 net: sun: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Vaibhav Gupta Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 996d7ab8badf153b59db5a85da0d65623eb58a2d Author: Hui Tang Date: Wed May 19 13:30:48 2021 +0800 net: smsc: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Andrew Lunn Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit a294ddfccb45531ff8cd992bd8f00e3ab16410d2 Author: Hui Tang Date: Wed May 19 13:30:47 2021 +0800 net: sis: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: "Gustavo A. R. Silva" Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit bf53445d81e3fda4b0d361e8e0c037c91890f6c8 Author: Hui Tang Date: Wed May 19 13:30:46 2021 +0800 net: seeq: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Masahiro Yamada Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit f95a73a8a8a886a7be356ac2934b76aba2d761d3 Author: Hui Tang Date: Wed May 19 13:30:45 2021 +0800 net: realtek: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Heiner Kallweit Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 4a0949778c4e918686cf369ffc86fa8f8e159c56 Author: Hui Tang Date: Wed May 19 13:30:44 2021 +0800 net: natsemi: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Zheng Yongjun Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 717dc24dc5d642b9c805b8f59fd16e21ce721b9a Author: Hui Tang Date: Wed May 19 13:30:43 2021 +0800 net: marvell: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Lorenzo Bianconi Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit c11c900143e44f73628dcaa439561e8f15e2ee20 Author: Hui Tang Date: Wed May 19 13:30:42 2021 +0800 net: ibm: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Sukadev Bhattiprolu Signed-off-by: Hui Tang Acked-by: Lijun Pan Signed-off-by: David S. Miller commit e6f0f977407f1eba63db1e8f143e7667be61a1b8 Author: Hui Tang Date: Wed May 19 13:30:41 2021 +0800 net: dlink: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: "Alexander A. Klimov" Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit cf82f9b165e464bb81b66d0b4fcca70970785564 Author: Hui Tang Date: Wed May 19 13:30:40 2021 +0800 net: dec: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 21b128fde6e092de0749df157304d5896a237f10 Author: Hui Tang Date: Wed May 19 13:30:39 2021 +0800 net: chelsio: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Rohit Maheshwari Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 90e4403a6d374d37fce5e86f38a5e77359b62822 Author: Hui Tang Date: Wed May 19 13:30:38 2021 +0800 net: broadcom: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Michael Chan Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit a22cf81d634c83718c036728a0d119d538947b73 Author: Hui Tang Date: Wed May 19 13:30:37 2021 +0800 net: apple: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 106b4cb597666832b063df9d5e8d2bb102206f8b Author: Hui Tang Date: Wed May 19 13:30:36 2021 +0800 net: amd: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 40b1f92676f2af2bb808db62569156ec15e00c4a Author: Hui Tang Date: Wed May 19 13:30:35 2021 +0800 net: alteon: remove leading spaces before tabs There are a few leading spaces before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Jes Sorensen Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit 959dc069aed8bad75e27eb193f55070b51a5afbc Author: Hui Tang Date: Wed May 19 13:30:34 2021 +0800 net: 3com: remove leading spaces before tabs There are a few leading space before tabs and remove it by running the following commard: $ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/' $ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/' Cc: Steffen Klassert Signed-off-by: Hui Tang Signed-off-by: David S. Miller commit bc6d076daa8c66c79bdceda963fa66273103a276 Author: YueHaibing Date: Wed May 19 10:38:50 2021 +0800 tun: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 1756055de28412b6820b1221b1ab0092f6e780cb Author: YueHaibing Date: Wed May 19 10:28:49 2021 +0800 ibmveth: fix kobj_to_dev.cocci warnings Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing Acked-by: Lijun Pan Signed-off-by: David S. Miller commit 3a2daa7248647c0e5e165140553f9af5006e93a2 Author: Pu Lehui Date: Wed May 19 14:41:16 2021 +0800 bpf: Make some symbols static The sparse tool complains as follows: kernel/bpf/syscall.c:4567:29: warning: symbol 'bpf_sys_bpf_proto' was not declared. Should it be static? kernel/bpf/syscall.c:4592:29: warning: symbol 'bpf_sys_close_proto' was not declared. Should it be static? This symbol is not used outside of syscall.c, so marks it static. Signed-off-by: Pu Lehui Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210519064116.240536-1-pulehui@huawei.com commit e52e4a3132a604c9f04a934bd6c2980f5293dc0a Author: Mauro Carvalho Chehab Date: Wed May 19 10:15:35 2021 +0200 gpu: drm: replace occurrences of invalid character There are some places at drm that ended receiving a REPLACEMENT CHARACTER U+fffd ('�'), probably because of some bad charset conversion. Fix them by using what it seems to be the proper character. Acked-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/e606930c73029f16673849c57acac061dd923866.1621412009.git.mchehab+huawei@kernel.org commit 9dee1f9fc504c48b6b02d8726cc9c868cf41f7be Merge: ea030ca688193 1f89d2fe16072 Author: Mark Brown Date: Wed May 19 17:00:40 2021 +0100 Merge series "RTL8231 GPIO expander support" from Sander Vanheule : The RTL8231 GPIO and LED expander can be configured for use as an MDIO or SMI bus device. Currently only the MDIO mode is supported, although SMI mode support should be fairly straightforward, once an SMI bus driver is available. Provided features by the RTL8231: - Up to 37 GPIOs - Configurable drive strength: 8mA or 4mA (currently unsupported) - Input debouncing on high GPIOs (currently unsupported) - Up to 88 LEDs in multiple scan matrix groups - On, off, or one of six toggling intervals - "single-color mode": 2×36 single color LEDs + 8 bi-color LEDs - "bi-color mode": (12 + 2×6) bi-color LEDs + 24 single color LEDs - Up to one PWM output (currently unsupported) - Fixed duty cycle, 8 selectable frequencies (1.2kHz - 4.8kHz) Register access is provided through a new MDIO regmap provider. The GPIO controller uses gpio-regmap, although a patch is required to support a limitation of the chip. There remain some log warnings when probing the device, possibly due to the way I'm using the MFD subsystem. Would it be possible to avoid these? [ 2.602242] rtl8231-pinctrl: Failed to locate of_node [id: -2] [ 2.609380] rtl8231-pinctrl rtl8231-pinctrl.0.auto: no of_node; not parsing pinctrl DT When no 'leds' sub-node is specified: [ 2.922262] rtl8231-leds: Failed to locate of_node [id: -2] [ 2.967149] rtl8231-leds rtl8231-leds.1.auto: no of_node; not parsing pinctrl DT [ 2.975673] rtl8231-leds rtl8231-leds.1.auto: scan mode missing or invalid [ 2.983531] rtl8231-leds: probe of rtl8231-leds.1.auto failed with error -22 Changes since v1: - Reintroduce MDIO regmap, with fixed Kconfig dependencies - Add configurable dir/value order for gpio-regmap direction_out call - Drop allocations for regmap fields that are used only on init - Move some definitions to MFD header - Add PM ops to replace driver remove for MFD - Change pinctrl driver to (modified) gpio-regmap - Change leds driver to use fwnode Link: https://lore.kernel.org/lkml/cover.1620735871.git.sander@svanheule.net/ Changes since RFC: - Dropped MDIO regmap interface. I was unable to resolve the Kconfig dependency issue, so have reverted to using regmap_config.reg_read/write. - Added pinctrl support - Added LED support - Changed root device to MFD, with pinctrl and leds child devices. Root device is now an mdio_device driver. Link: https://lore.kernel.org/linux-gpio/cover.1617914861.git.sander@svanheule.net/ Sander Vanheule (7): regmap: Add MDIO bus support gpio: regmap: Add configurable dir/value order dt-bindings: leds: Binding for RTL8231 scan matrix dt-bindings: mfd: Binding for RTL8231 mfd: Add RTL8231 core device pinctrl: Add RTL8231 pin control and GPIO support leds: Add support for RTL8231 LED scan matrix .../bindings/leds/realtek,rtl8231-leds.yaml | 159 ++++++++ .../bindings/mfd/realtek,rtl8231.yaml | 202 ++++++++++ drivers/base/regmap/Kconfig | 6 +- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-mdio.c | 57 +++ drivers/gpio/gpio-regmap.c | 20 +- drivers/leds/Kconfig | 10 + drivers/leds/Makefile | 1 + drivers/leds/leds-rtl8231.c | 293 ++++++++++++++ drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile | 1 + drivers/mfd/rtl8231.c | 153 +++++++ drivers/pinctrl/Kconfig | 11 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-rtl8231.c | 377 ++++++++++++++++++ include/linux/gpio/regmap.h | 3 + include/linux/mfd/rtl8231.h | 57 +++ include/linux/regmap.h | 36 ++ 18 files changed, 1393 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/realtek,rtl8231-leds.yaml create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl8231.yaml create mode 100644 drivers/base/regmap/regmap-mdio.c create mode 100644 drivers/leds/leds-rtl8231.c create mode 100644 drivers/mfd/rtl8231.c create mode 100644 drivers/pinctrl/pinctrl-rtl8231.c create mode 100644 include/linux/mfd/rtl8231.h base-commit: 6efb943b8616ec53a5e444193dccf1af9ad627b5 -- 2.31.1 commit 60339074c4e4445312c7b60b16035cfbd8914e58 Merge: 8b4ba1d317711 7487238c5f530 Author: Mark Brown Date: Wed May 19 17:00:39 2021 +0100 Merge series "ASoC: meson: g12a-toacodec: add support for SM1" from Neil Armstrong : This patchset adds Amlogic SM1 support on the TOACODEC driver, first by switching to regmap fields for some bit fields to avoid code duplication, and then by adding the corresponding bits & struct for the SM1 changed bits. Changes since v2 at [2]: - use raw values instead of defines in REG_FIELD() for g12a_toacodec_match_data Changes since v1 at [1]: - switch to regmap field [1] https://lore.kernel.org/r/20210429170147.3615883-1-narmstrong@baylibre.com [2] https://lore.kernel.org/r/20210505072607.3815442-1-narmstrong@baylibre.com Neil Armstrong (2): ASoC: meson: g12a-toacodec: use regmap fields to prepare SM1 support ASoC: meson: g12a-toacodec: add support for SM1 TOACODEC sound/soc/meson/g12a-toacodec.c | 143 +++++++++++++++++++++++++++----- 1 file changed, 124 insertions(+), 19 deletions(-) -- 2.25.1 commit b9f38e913a926b455e5048a95f53a993b515509f Author: Bixuan Cui Date: Fri May 14 16:52:14 2021 +0800 staging: comedi: Remove unused variable ‘min_full_scale’ and function 'get_min_full_scales' The variable ‘min_full_scale’ and function 'get_min_full_scales' are not used, So delete them. Reviewed-by: Ian Abbott Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210514085214.53941-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman commit 403e6946d119fa6d84f8024f5911131735fafa3f Author: Bryan Brattlof Date: Tue May 18 14:45:19 2021 +0000 staging: rtl8723bs: remove if (true) statement 'if (true) { ... }' will always evaluate to true. Remove it and save a few tabs for somewhere else. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210518144335.1677320-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 946c945301db3ca0e48d8ff06aa38d4ff2ba82b2 Author: Wang Qing Date: Wed May 19 11:00:17 2021 +0800 staging: rtl8192e: delete extra blank lines fixing CHECK:Blank lines aren't necessary before a close brace '}' Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1621393219-28665-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman commit 9b0644fc4381f5b8c466a7588196db151a52ec56 Author: Wang Qing Date: Wed May 19 09:52:50 2021 +0800 staging: iio: fix some formatting issues fixing: CHECK: Alignment should match open parenthesis #1351: FILE: drivers/staging/iio/addac/adt7316.c:1351: CHECK: Alignment should match open parenthesis #1378: FILE: drivers/staging/iio/addac/adt7316.c:1378: Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1621389170-5850-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman commit 6f8ef160190d02c9398294b09bd1890a50dee2e1 Author: Jiabing Wan Date: Tue May 18 20:17:33 2021 +0800 staging: vc04_services: fix a whitespace coding style issue Fixing the following checkpatch warning: WARNING: please, no spaces at the start of a line Signed-off-by: Jiabing Wan Link: https://lore.kernel.org/r/20210518121735.88767-1-wanjiabing@vivo.com Signed-off-by: Greg Kroah-Hartman commit 73861d26a5f430116a82c2e77edb9ee16cafae88 Author: Bryan Brattlof Date: Tue May 18 18:30:53 2021 +0000 staging: rtl8723bs: remove _rtw_sd_f0_read8() Both the _rtw_sd_f0_read8() function and the rtw_sd_f0_read8() redefinition are used anywhere in the driver and can be removed. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/5f025724ea7149e6ff11f94352b3321833f9bcaf.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 3bdc1bc67ed392601d5645c99c37a06410e03768 Author: Bryan Brattlof Date: Tue May 18 18:29:47 2021 +0000 staging: rtl8723bs: remove duplicate name for _rtw_write_port() _rtw_write_port() is being redefined as rtw_write_port(). Because rtw_write_port() is the only name used in the driver, remove the duplicate definition and rename the function from _rtw_write_port() to rtw_write_port() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/5b8543127a774ca65595588711c05cce28b17bf6.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 4d6bfc6f62705ec5baee9c572d4ca03bc9e36c00 Author: Bryan Brattlof Date: Tue May 18 18:31:41 2021 +0000 staging: rtl8723bs: remove duplicate names for _rtw_write32() _rtw_write32() is redefined as rtw_write32() and PlatformEFIOWrite4Byte(). Because rtw_write32() is the only name used in the driver, remove the duplicate definitions and rename the function from _rtw_write32() to rtw_write32() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/43917aee34e85139e613578cf6f14938211c8835.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 1c42d72e4747fb546eba53821ae56ecf827202a7 Author: Bryan Brattlof Date: Tue May 18 18:28:18 2021 +0000 staging: rtl8723bs: remove duplicate names for _rtw_write16() _rtw_write16() is redefined as rtw_write16() and PlatformEFIOWrite2Byte(). Because rtw_write16() is the only name used in the driver, remove the duplicate definitions and rename the function from _rtw_write16() to rtw_write16() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/7d53fb295f67f01c72640045afb88150391bce35.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 7f06caf9a40bb3c08fe86c8355ace25b7ce69ba9 Author: Bryan Brattlof Date: Tue May 18 18:27:54 2021 +0000 staging: rtl8723bs: remove duplicate names for _rtw_write8() _rtw_write8() is redefined as rtw_write8() and PlatformEFIOWrite1Byte(). Because rtw_write8() is the only name used in the driver, remove the duplicate definitions and rename the function from _rtw_write8() to rtw_write8() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/35ffc9cd5af7009b317361033a6ca5263307d61a.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 16b1b3c8221a40bf899dfeebdb3d5245ecb65515 Author: Bryan Brattlof Date: Tue May 18 18:28:03 2021 +0000 staging: rtl8723bs: remove duplicate names for _rtw_read32() _rtw_read32() is redefined as rtw_read32() and PlatformEFIORead4Byte(). Because rtw_read32() is the only name used in the driver, remove the duplicate definitions and rename the function from _rtw_read32() to rtw_read32() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/15956707341f76de683245c392063b8121a805ea.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 8ff74e4307b42302c89023faf8fd37dbde4c4666 Author: Bryan Brattlof Date: Tue May 18 18:28:56 2021 +0000 staging: rtl8723bs: remove duplicate names for _rtw_read16() _rtw_read16() is redefined as rtw_read16() and PlatformEFIORead2Byte(). Because rtw_read16() is the only name used in the driver, remove the duplicate definitions and rename the function from _rtw_read16() to rtw_read16() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/11458342572f21d9df58b3969ad1f16fdff157f4.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 51d4aa6d6bf35d85d318831df60a34bad27cdb9e Author: Bryan Brattlof Date: Tue May 18 18:27:43 2021 +0000 staging: rtl8723bs: remove duplicate names for _rtw_read8() _rtw_read8() is redefined as rtw_read8() and PlatformEFIORead1Byte(). Because rtw_read8() is the only name used in the driver, remove the duplicate definitions and rename the function from _rtw_read8() to rtw_read8() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/9880c86c2aad7d95a714d8b03b28b83634f98c1e.1621361919.git-series.hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 286bc9f48cad055a17e89024c68196f5279ea130 Author: Stefan Wahren Date: Sat May 15 21:13:50 2021 +0200 staging: vchiq_core: introduce defines for retry_poll Use descriptive defines instead of a number with a comment. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621106030-30363-1-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 5c56a4485cfc184b877813ed320df878974c1d6e Author: Stefan Wahren Date: Sat May 15 21:10:58 2021 +0200 staging: vchiq_core: introduce defines for close_recvd Use descriptive defines instead of a number with a comment. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-20-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 4c51210461f9a08787fd20ef22f8c8050aec15c8 Author: Stefan Wahren Date: Sat May 15 21:10:57 2021 +0200 staging: vchiq_core: introduce parse_message The function parse_rx_slots is very longer. So move at least the message parsing into a separate function to improve readability. In good case the function returns the message payload length which is necessary to move to the next message. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-19-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 1a64ab341d5fe9a82accb5aa465d182a5740d9f1 Author: Stefan Wahren Date: Sat May 15 21:10:56 2021 +0200 staging: vchiq_arm: Avoid unnecessary line breaks There are a few statements which are unnecessary broken into multiple lines. Let's join them into a single line to improve readability. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-18-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit e39ff0e4eab67d82090906512ee98b7c9a7a76e1 Author: Stefan Wahren Date: Sat May 15 21:10:55 2021 +0200 staging: vchiq_arm: make vchiq_shutdown_internal return void The function vchiq_shutdown_internal always returns VCHIQ_SUCCESS. So change the return type to void and simplify the logic in vchiq_shutdown. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-17-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 1d702f5962f79ebb52b6acf4d972d94e63537da4 Author: Stefan Wahren Date: Sat May 15 21:10:54 2021 +0200 staging: vchiq_core: fix comment in vchiq_shutdown_internal The comment seems to be copied from vchiq_connect_internal(). So change it to match the actual behavior. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-16-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit ed720b2bfad23a59862a755491eccc9c7bcf78f4 Author: Stefan Wahren Date: Sat May 15 21:10:53 2021 +0200 staging: vchiq_core: reduce indention in release_service_messages It's possible to convert the if statement into a continue early and save an indention level. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-15-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 7040e9d7b7c59e4989d18fd75eb07672287afff2 Author: Stefan Wahren Date: Sat May 15 21:10:52 2021 +0200 staging: vchiq_arm: re-arrange function header This makes the function headers look more consistent. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-14-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit f299b34ef27cea62a38265fd877a17e5b3d36f80 Author: Stefan Wahren Date: Sat May 15 21:10:51 2021 +0200 staging: vchiq_arm: add blank line after declarations Improve the readability by add a blank line after declarations. This was found with checkpatch. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-13-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit fd3e03d71f6eb1764d4b12ff9b6db30bdba92f2d Author: Stefan Wahren Date: Sat May 15 21:10:50 2021 +0200 staging: vchiq_arm: drop non-beneficial comments Those comments doesn't provide any benefit, so drop them. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-12-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit a140f3a02a50e6da36d5539a219420684cf3c021 Author: Stefan Wahren Date: Sat May 15 21:10:49 2021 +0200 staging: vchiq_arm: Prefer kzalloc(sizeof(*waiter)...) It's shorter and easier to maintain. This has been found with checkpatch. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-11-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 618150c1252ade0a0a4b7fee60e1f89b97f7d392 Author: Stefan Wahren Date: Sat May 15 21:10:48 2021 +0200 staging: vchiq_arm: drop ftrace-like logging This addresses the warnings reported by checkpatch: WARNING: Unnecessary ftrace-like logging - prefer using ftrace Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-10-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 022b5a3cd8c02502a0892c430a4de5381ab5669f Author: Stefan Wahren Date: Sat May 15 21:10:47 2021 +0200 staging: vchiq_arm: Use define for doorbell irq The interrupt handler uses a magic number to check that the doorbell was rung. Better replace this number with official Broadcom define. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-9-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 2f440843a7d44fc5e7a30a67ea2b83b40b504d77 Author: Stefan Wahren Date: Sat May 15 21:10:46 2021 +0200 staging: vchiq_core: avoid indention in poll_services_of_group By converting the first and the third if statement into continue early the function poll_services_of_group() can avoid 2 indention levels. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 20ebcf0bf1fd4e09db27241ebb368da045503893 Author: Stefan Wahren Date: Sat May 15 21:10:45 2021 +0200 staging: vchiq_core: introduce poll_services_of_group The function poll_services() has too many indention levels. So keep only the group iteration loop and move the rest into a new function poll_services_of_group(). Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 0705a939c2b836062266c81b53453d3b0effab4b Author: Stefan Wahren Date: Sat May 15 21:10:44 2021 +0200 staging: vchiq_arm: balance braces for if-else statements This fixes the following checkpatch notices in vchiq_arm: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 8ba5f91bab630d3c92cf92b7a850ea78ba987dbe Author: Stefan Wahren Date: Sat May 15 21:10:43 2021 +0200 staging: vc04_services: remove __VCCOREVER__ This define isn't used anymore. Let's remove it. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 21711c7ee13e54e69bb63cb082464701934a0f54 Author: Stefan Wahren Date: Sat May 15 21:10:42 2021 +0200 staging: vchiq_core: separate postfix increment Postfix increment within a complexer statement doesn't improve readability. So separate them. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 63e24ae26fd500ba41bc3de05d7f9ab30cd9ee90 Author: Stefan Wahren Date: Sat May 15 21:10:41 2021 +0200 staging: vchiq_core: drop unnecessary release_count There is no benefit of the variable release_count, so drop it. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 1c82975b5f4c4843c139b845ff27337dba48af92 Author: Stefan Wahren Date: Sat May 15 21:10:40 2021 +0200 staging: vchiq_core: fix return type of vchiq_init_state Recent commit "staging: vchiq_core: drop vchiq_status from vchiq_init_state" missed to change the return type in the definition. Let's fix this now. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1621105859-30215-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit af39f935c1faefa7ab34bf5bd71ecce3f5b86df3 Author: Martin Kaiser Date: Mon May 17 22:18:26 2021 +0200 staging: rtl8188eu: use safe iterator in rtw_free_xmitframe_queue Use list_for_each_entry_safe, we may delete list items while iterating over the list. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Signed-off-by: Martin Kaiser Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517201826.25150-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 2253748164d8bbe0831710fcd5d4d2c353b04a70 Author: Martin Kaiser Date: Mon May 17 22:18:25 2021 +0200 staging: rtl8188eu: use safe iterator in rtw_sta_flush Use list_for_each_entry_safe, we may delete list items while iterating over the list. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Signed-off-by: Martin Kaiser Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517201826.25150-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b0f2044c61d9ef309252d25d16d6cce6e8fcae6b Author: Martin Kaiser Date: Mon May 17 22:18:24 2021 +0200 staging: rtl8188eu: use safe iterator in rtw_acl_remove_sta Use list_for_each_entry_safe, we may delete list items while iterating over the list. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Signed-off-by: Martin Kaiser Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517201826.25150-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 39b19c63a39a2de6516383774a529287f04a243e Author: Martin Kaiser Date: Mon May 17 22:18:23 2021 +0200 staging: rtl8188eu: use safe iterator in expire_timeout_chk In the first loop in expire_timeout_chk, we may call rtw_free_stainfo and remove an entry from auth_list. In the second loop, we may call list_del_init on our list. Use list_for_each_entry_safe for both loops. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Signed-off-by: Martin Kaiser Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517201826.25150-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 565a45a1c301908b169eeae56f21b9f306f6346d Author: Martin Kaiser Date: Mon May 17 22:18:22 2021 +0200 staging: rtl8188eu: use safe iterator in rtw_free_all_stainfo This is another case where we may remove list entries while we iterate over the list. Use list_for_each_entry_safe to avoid an endless loop. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Signed-off-by: Martin Kaiser Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517201826.25150-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit d5af74ead205c87c3f4ef479dc937a8e628613a0 Author: Martin Kaiser Date: Mon May 17 22:18:21 2021 +0200 staging: rtl8188eu: use safe iterator in rtw_free_network_queue rtw_free_network_queue iterates over the scanned wireless networks and calls _rtw_free_network for each of them. In some cases, _rtw_free_network removes a network from the list. We have to use list_for_each_entry_safe if we remove list entries while we iterate over a list. Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers") Signed-off-by: Martin Kaiser Reviewed-by: Dan Carpenter Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210517201826.25150-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0c21b72a7f1983346fcb47eec2e0dd7fa0ad4391 Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:19 2021 -0400 Staging: rtl8723bs: remove dead code in HalBtc8723b1Ant.c This commit removes dead code to resolve the following checkpatch.pl warning: WARNING: Block comments use * on subsequent lines + /* + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x ", "Latest error condition(should be 0)", \ Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-8-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit f7d21f444a41e1d2998fe18f940d74395a441ee1 Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:18 2021 -0400 Staging: rtl8723bs: fix line continuations in HalBtc8723b1Ant.c In addition to removing line continuations, the indentation of some lines were fixed. This was done to avoid the introduction of new warnings because removing the line continuations caused checkpatch.pl to emit "CHECK: Alignment should match open parenthesis". This commit fixes the following checkpatch.pl warnings: WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d/ %d", "Ant PG Num/ Ant Mech/ Ant Pos:", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %s / %d", "BT stack/ hci ext ver", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d_%x/ 0x%x/ 0x%x(%d)", "CoexVer/ FwVer/ PatchVer", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d / %d(%d)", "Dot11 channel / HsChnl(HsMode)", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %02x %02x %02x ", "H2C Wifi inform bt chnl Info", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d", "Wifi rssi/ HS rssi", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d/ %d/ %s", "Wifi bLink/ bRoam/ bScan/ bHi-Pri", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %s / %s/ %s/ AP =%d/ %s ", "Wifi status", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d/ %d/ %d/ %d", "sta/vwifi/hs/p2pGo/p2pGc", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = [%s/ %d/ %d/ %d] ", "BT [status/ rssi/ retryCnt/ popCnt]", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d / %d / %d / %d", "SCO/HID/PAN/A2DP", \ WARNING: Avoid unnecessary line continuations + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s", "BT Role", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %s", "BT Info A2DP rate", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %02x %02x %02x %02x %02x %02x %02x(%d)", GLBtInfoSrc8723b1Ant[i], \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %s/%s, (0x%x/0x%x)", "PS state, IPS/LPS, (lps/rpwm)", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d", "SM[LowPenaltyRA]", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %s/ %s/ %d ", "DelBA/ BtCtrlAgg/ AggSize", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x ", "Rate Mask", \ WARNING: Avoid unnecessary line continuations + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x case-%d (auto:%d)", "PS TDMA", \ WARNING: Avoid unnecessary line continuations + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "Coex Table Type", \ WARNING: Avoid unnecessary line continuations + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "IgnWlanAct", \ WARNING: Avoid unnecessary line continuations + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "backup ARFR1/ARFR2/RL/AMaxTime", \ WARNING: Avoid unnecessary line continuations + CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "0x430/0x434/0x42a/0x456", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x778/0x6cc/0x880[29:25]", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x948/ 0x67[5] / 0x764 / 0x76e", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x92c[1:0]/ 0x930[7:0]/0x944[1:0]", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x38[11]/0x40/0x4c[24:23]/0x64[0]", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x", "0x550(bcn ctrl)/0x522", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x", "0xc50(dig)/0x49c(null-drop)", \ WARNING: Avoid unnecessary line continuations + (u4Tmp[1] & 0xffff) + (u4Tmp[2] & 0xffff) + \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "OFDM-CCA/OFDM-FA/CCK-FA", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d/ %d/ %d", "CRC_OK CCK/11g/11n/11n-Agg", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d/ %d/ %d", "CRC_Err CCK/11g/11n/11n-Agg", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x6c0/0x6c4/0x6c8(coexTable)", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d", "0x770(high-pri rx/tx)", \ WARNING: Avoid unnecessary line continuations + "\r\n %-35s = %d/ %d", "0x774(low-pri rx/tx)", \ Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-7-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 557c2325364afb57c447ee144a661c9fda47798b Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:17 2021 -0400 Staging: rtl8723bs: add missing blank line in HalBtc8723b1Ant.c This commit fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations + struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo; + halbtc8723b1ant_BtRssiState(2, 28, 0); Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-6-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit aa62018944a86af6eb51b57aa9593370d604ca3b Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:16 2021 -0400 Staging: rtl8723bs: fix comparison formatting in HalBtc8723b1Ant.c This commit fixes the following checkpatch.pl warnings: WARNING: Comparisons should place the constant on the right side of the test + BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE != pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN == wifiStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN == wifiStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT == wifiStatus) WARNING: Comparisons should place the constant on the right side of the test + if (BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE == wifiStatus) { WARNING: Comparisons should place the constant on the right side of the test + if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) { WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) { WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus && WARNING: Comparisons should place the constant on the right side of the test + if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) { WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) { WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + ((bWifiUnderBMode) ? "11b" : ((BTC_WIFI_BW_LEGACY == wifiBw) ? "11bg" : (((BTC_WIFI_BW_HT40 == wifiBw) ? "HT40" : "HT20")))), WARNING: Comparisons should place the constant on the right side of the test + ((!bWifiBusy) ? "idle" : ((BTC_WIFI_TRAFFIC_TX == wifiTrafficDir) ? "uplink" : "downlink")), WARNING: Comparisons should place the constant on the right side of the test + ((pBtCoexist->btInfo.bBtDisabled) ? ("disabled") : ((pCoexSta->bC2hBtInquiryPage) ? ("inquiry/page scan") : ((BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE == pCoexDm->btStatus) ? "non-connected idle" : WARNING: Comparisons should place the constant on the right side of the test + ((BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE == pCoexDm->btStatus) ? "connected-idle" : "busy")))), WARNING: Comparisons should place the constant on the right side of the test + if (BTC_IPS_ENTER == type) { WARNING: Comparisons should place the constant on the right side of the test + } else if (BTC_IPS_LEAVE == type) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_LPS_ENABLE == type) { WARNING: Comparisons should place the constant on the right side of the test + } else if (BTC_LPS_DISABLE == type) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_SCAN_START == type) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_SCAN_START == type) { WARNING: Comparisons should place the constant on the right side of the test + } else if (BTC_SCAN_FINISH == type) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_ASSOCIATE_START == type) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_ASSOCIATE_START == type) { WARNING: Comparisons should place the constant on the right side of the test + } else if (BTC_ASSOCIATE_FINISH == type) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_MEDIA_CONNECT == type) { WARNING: Comparisons should place the constant on the right side of the test + if ((BTC_MEDIA_CONNECT == type) && (wifiCentralChnl <= 14)) { WARNING: Comparisons should place the constant on the right side of the test + if (BTC_WIFI_BW_HT40 == wifiBw) WARNING: Comparisons should place the constant on the right side of the test + BTC_PACKET_DHCP == type || WARNING: Comparisons should place the constant on the right side of the test + BTC_PACKET_EAPOL == type || WARNING: Comparisons should place the constant on the right side of the test + BTC_PACKET_ARP == type WARNING: Comparisons should place the constant on the right side of the test + if (BTC_PACKET_ARP == type) { WARNING: Comparisons should place the constant on the right side of the test + BTC_PACKET_DHCP == type || WARNING: Comparisons should place the constant on the right side of the test + BTC_PACKET_EAPOL == type || WARNING: Comparisons should place the constant on the right side of the test + ((BTC_PACKET_ARP == type) && (pCoexSta->bWiFiIsHighPriTask)) WARNING: Comparisons should place the constant on the right side of the test + if (BT_INFO_SRC_8723B_1ANT_WIFI_FW != rspSource) { WARNING: Comparisons should place the constant on the right side of the test + if (BT_8723B_1ANT_BT_STATUS_ACL_BUSY != pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_SCO_BUSY == pCoexDm->btStatus) || WARNING: Comparisons should place the constant on the right side of the test + (BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY == pCoexDm->btStatus) WARNING: Comparisons should place the constant on the right side of the test + if (BTC_WIFI_PNP_SLEEP == pnpState) { WARNING: Comparisons should place the constant on the right side of the test + } else if (BTC_WIFI_PNP_WAKE_UP == pnpState) { Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-5-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3750ae9e79b601b47920ca642de96bef96a45388 Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:15 2021 -0400 Staging: rtl8723bs: fix indentation in HalBtc8723b1Ant.c This commit fixes the following checkpatch.pl errors: WARNING: suspect code indent for conditional statements (32, 33) + if (nCCKLockCounter < 5) + nCCKLockCounter++; WARNING: suspect code indent for conditional statements (32, 33) + if (nCCKLockCounter > 0) + nCCKLockCounter--; WARNING: suspect code indent for conditional statements (24, 26) + if (nCCKLockCounter > 0) + nCCKLockCounter--; WARNING: suspect code indent for conditional statements (16, 17) + if (nCCKLockCounter >= 5) + pCoexSta->bCCKLock = true; WARNING: suspect code indent for conditional statements (16, 17) + else + pCoexSta->bCCKLock = false; WARNING: suspect code indent for conditional statements (16, 17) + if (nCCKLockCounter == 0) + pCoexSta->bCCKLock = false; WARNING: suspect code indent for conditional statements (16, 17) + else + pCoexSta->bCCKLock = true; WARNING: suspect code indent for conditional statements (16, 25) + if (bScan || bLink || bRoam) { + if (bScan) WARNING: Statements should start on a tabstop + if (bScan) WARNING: Statements should start on a tabstop + else Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-4-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 426ddc5298771dd3fc2298508ed132ae2b180ee2 Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:14 2021 -0400 Staging: rtl8723bs: fix spaces in HalBtc8723b1Ant.c This commit fixes the following checkpatch.pl errors: WARNING: please, no space before tabs +^I/* ^IRx Aggregation related setting */$ WARNING: please, no space before tabs +^Iu8 ^IH2C_Parameter[1] = {0};$ WARNING: please, no space before tabs +^Iu8 ^IH2C_Parameter[6] = {0};$ WARNING: please, no space before tabs +^I/* u32 ^I^IfwVer = 0; */$ WARNING: please, no space before tabs +/* ^ISoftware Coex Mechanism start */$ WARNING: please, no space before tabs +/* ^INon-Software Coex Mechanism start */$ WARNING: please, no space before tabs +^I/* ^IBIT0: "0" for no antenna inverse; "1" for antenna inverse */$ WARNING: please, no space before tabs +^I/* ^IBIT1: "0" for internal switch; "1" for external switch */$ WARNING: please, no space before tabs +^I/* ^IBIT2: "0" for one antenna; "1" for two antenna */$ Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-3-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 83e9f677a4efee5200ae3deec0a1f582851173d2 Author: Desmond Cheong Zhi Xi Date: Tue May 18 00:41:13 2021 -0400 Staging: rtl8723bs: remove unnecessary braces in HalBtc8723b1Ant.c This commit fixes the following checkpatch.pl warnings: WARNING: braces {} are not necessary for any arm of this statement + if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (btRssi < rssiThresh) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (rssiThresh > rssiThresh1) { + return pCoexSta->preBtRssiState; + } WARNING: braces {} are not necessary for any arm of this statement + if (btRssi >= (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (btRssi >= (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) { [...] + } else if (btRssi < rssiThresh) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (btRssi < rssiThresh1) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (!pBtLinkInfo->bBtLinkExist) { + return algorithm; + } WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (bBtHsOn) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement + if (u1Tmp & BIT0) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (pBtCoexist->bManualControl) { + return; + } WARNING: braces {} are not necessary for single statement blocks + if (pBtCoexist->bStopCoexDm) { + return; + } WARNING: braces {} are not necessary for single statement blocks + if (pCoexSta->bUnderIps) { + return; + } WARNING: braces {} are not necessary for any arm of this statement + if ((pBtLinkInfo->bA2dpExist) && (pCoexSta->bC2hBtInquiryPage)) { [...] + } else [...] WARNING: braces {} are not necessary for any arm of this statement + if (BTC_LPS_ENABLE == type) { [...] + } else if (BTC_LPS_DISABLE == type) { [...] WARNING: braces {} are not necessary for single statement blocks + if (!pBtCoexist->bManualControl && !pBtCoexist->bStopCoexDm) { + halbtc8723b1ant_IgnoreWlanAct(pBtCoexist, FORCE_EXEC, false); + } Reviewed-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Link: https://lore.kernel.org/r/20210518044119.2960494-2-desmondcheongzx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 509af4f98d44f10b7b0be1b4258c82781d6ac341 Author: Michael Straube Date: Sun May 16 12:30:09 2021 +0200 staging: rtl8188eu: rename struct field bLedOn Rename field bLedOn of struct LED_871x to avoid camel case. bLedOn -> led_on Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210516103009.7184-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7f02d57e7c20696d96e78236ff4898bf517730cc Author: Shreyansh Chouhan Date: Sat May 15 13:44:46 2021 +0530 staging: rtl8723bs: fix coding style for if comparisions Placed constants on the right side of the equality tests in rtw_xmit.c Signed-off-by: Shreyansh Chouhan Link: https://lore.kernel.org/r/20210515081446.676500-1-chouhan.shreyansh630@gmail.com Signed-off-by: Greg Kroah-Hartman commit 934de9eef1c535691f003857d21fcd9779f6dc1f Author: Cláudio Maia Date: Sat May 15 00:04:59 2021 +0100 staging: rtl8192u: Fix variable shadowing warning Fixes the following sparse warnings: drivers/staging/rtl8192u/r8192U_core.c:2306:21: warning: symbol 'i' shadows an earlier one drivers/staging/rtl8192u/r8192U_core.c:2254:13: originally declared here drivers/staging/rtl8192u/r8192U_core.c:2371:29: warning: symbol 'i' shadows an earlier one drivers/staging/rtl8192u/r8192U_core.c:2254:13: originally declared here Signed-off-by: Cláudio Maia Link: https://lore.kernel.org/r/20210514230459.15752-1-clrrm@isep.ipp.pt Signed-off-by: Greg Kroah-Hartman commit ae12cf6bf9048f037f61cd8bb85be60edfe254d7 Author: Guenter Roeck Date: Fri May 14 09:55:57 2021 -0700 staging: rtl8188eu: Drop unnecessary NULL check after container_of The result of container_of() operations is never NULL unless the extracted element is the first element of the embedded structure. This is not the case here. The NULL check is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210514165557.1384106-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 190ccab3185eee564c08ec96d9bbf4aff9b764f4 Author: ChiYuan Huang Date: Mon May 17 22:36:01 2021 +0800 backlight: rt4831: Adds support for Richtek RT4831 backlight Adds support for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit f3e6c298e3ede881db473c21e12d49224bbdcf63 Author: ChiYuan Huang Date: Mon May 17 22:35:59 2021 +0800 backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight Adds DT binding document for Richtek RT4831 backlight. Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 6d1c32dbedd7d7e7372aa38033ec8782c39f6379 Author: Andy Shevchenko Date: Mon May 10 12:57:16 2021 +0300 backlight: lm3630a_bl: Put fwnode in error case during ->probe() device_for_each_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Cc: Brian Masney Cc: Dan Murphy Fixes: 8fbce8efe15cd ("backlight: lm3630a: Add firmware node support") Signed-off-by: Andy Shevchenko Reviewed-by: Brian Masney Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit e878e8c53e5babc6497c692f6dbbb89e7aa166a4 Merge: 481f17c418039 73246fc4c990d Author: Takashi Iwai Date: Wed May 19 16:24:37 2021 +0200 Merge branch 'topic/firewire' into for-next commit 481f17c41803985446fd12887b2c042f9c43b0d5 Author: Takashi Iwai Date: Tue May 18 17:21:12 2021 +0200 ALSA: usb-audio: Handle error for the current selector gracefully Currently we bail out when the device returns an error or an invalid value for the current clock selector value via uac_clock_selector_get_val(). But it's possible that the device is really uninitialized and waits for the setup of the proper route at first. For handling such a case, this patch lets the driver dealing with the error or the invalid error more gracefully, choosing the clock source automatically instead. Link: https://lore.kernel.org/r/20210518152112.8016-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9ec730052fa262a9b66993d282a39511e4819e06 Author: Takashi Iwai Date: Tue May 18 17:21:11 2021 +0200 ALSA: usb-audio: Refactoring UAC2/3 clock setup code This patch just does refactoring of the UAC2/3 clock setup code. There should be no functional changes. The major changes are: * Provide union objects for pointing both UAC2 and UAC3 objects * Unify clock source, selector and multiplier helper functions * Unify __uac_clock_find_source() to deal with both UAC2 and UAC3 equally Link: https://lore.kernel.org/r/20210518152112.8016-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit a6de7b32b686a6bda835c7c0f2de98eddbf48321 Author: Colin Ian King Date: Wed May 19 11:54:24 2021 +0100 ALSA: rawmidi: fix incorrect array bounds check on clock_names The array bounds check on clock_names is currently checking the size of the entire array rather than the number of elements in the array leading to a potential array bounds read error. Fix this by using the ARRAY_SIZE macro instead of sizeof. Addresses-Coverity: ("Out-of-bounds read") Fixes: 08fdced60ca0 ("ALSA: rawmidi: Add framing mode") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210519105424.55221-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit e2a027109422ee07f2a17ee200cfee821b36dc3f Author: Dan Carpenter Date: Fri May 14 17:26:53 2021 +0300 staging: rtl8712: fix the bssid in mp_start_test() We recently moved "bssid" off the stack, and allocated it with kmalloc() instead. Unfortunately, this one line was overlooked so it will copy random data into the &tgt_network->network instead of the data we want. Fixes: 0b18e5fe6008 ("staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the heap") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YJ6IrfkbdaTHgpEv@mwanda Signed-off-by: Greg Kroah-Hartman commit 4cbf0cd6bf4c704746b6a6c6d42a8ee327070005 Author: Martin Blumenstingl Date: Mon May 17 22:37:24 2021 +0200 clk: meson: pll: switch to determine_rate for the PLL ops This increases the maxmium supported frequency on 32-bit systems from 2^31 (signed long as used by clk_ops.round_rate, maximum value: approx. 2.14GHz) to 2^32 (unsigned long as used by clk_ops.determine_rate, maximum value: approx. 4.29GHz). On Meson8/8b/8m2 the HDMI PLL and it's OD (post-dividers) are capable of running at up to 2.97GHz. So switch the divider implementation in clk-regmap to clk_ops.determine_rate to support these higher frequencies on 32-bit systems. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210517203724.1006254-4-martin.blumenstingl@googlemail.com commit 5d67f349590ddc94b6d4e25f19085728db9de697 Author: Alexei Starovoitov Date: Tue May 18 18:40:32 2021 -0700 bpf: Add cmd alias BPF_PROG_RUN Add BPF_PROG_RUN command as an alias to BPF_RPOG_TEST_RUN to better indicate the full range of use cases done by the command. Suggested-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210519014032.20908-1-alexei.starovoitov@gmail.com commit 3d431677687652808a9c9cf9e6c59dbeaf4a1f4d Merge: fa7b83bf3b156 1a532eb28df3e Author: Daniel Borkmann Date: Wed May 19 15:27:32 2021 +0200 Merge branch 'bpf-loader-progs' Alexei Starovoitov says: ==================== v5->v6: - fixed issue found by bpf CI. The light skeleton generation was doing a dry-run of loading the program where all actual sys_bpf syscalls were replaced by calls into gen_loader. Turned out that search for valid vmlinux_btf was not stubbed out which was causing light skeleton gen to fail on older kernels. - significantly reduced verbosity of gen_loader.c. - an example trace_printk.lskel.h generated out of progs/trace_printk.c https://gist.github.com/4ast/774ea58f8286abac6aa8e3bf3bf3b903 v4->v5: - addressed a bunch of minor comments from Andrii. - the main difference is that lskel is now more robust in case of errors and a bit cleaner looking. v3->v4: - cleaned up closing of temporary FDs in case intermediate sys_bpf fails during execution of loader program. - added support for rodata in the skeleton. - enforce bpf_prog_type_syscall to be sleepable, since it needs bpf_copy_from_user to populate rodata map. - converted test trace_printk to use lskel to test rodata access. - various small bug fixes. v2->v3: Addressed comments from Andrii and John. - added support for setting max_entries after signature verification and used it in ringbuf test, since ringbuf's max_entries has to be updated after skeleton open() and before load(). See patch 20. - bpf_btf_find_by_name_kind doesn't take btf_fd anymore. Because of that removed attach_prog_fd from bpf_prog_desc in lskel. Both features to be added later. - cleaned up closing of fd==0 during loader gen by resetting fds back to -1. - converted loader gen to use memset(&attr, cmd_specific_attr_size). would love to see this optimization in the rest of libbpf. - fixed memory leak during loader_gen in case of enomem. - support for fd_array kernel feature is added in patch 9 to have exhaustive testing across all selftests and then partially reverted in patch 15 to keep old style map_fd patching tested as well. - since fentry_test/fexit_tests were extended with re-attach had to add support for per-program attach method in lskel and use it in the tests. - cleanup closing of fds in lskel in case of partial failures. - fixed numerous small nits. v1->v2: Addressed comments from Al, Yonghong and Andrii. - documented sys_close fdget/fdput requirement and non-recursion check. - reduced internal api leaks between libbpf and bpftool. Now bpf_object__gen_loader() is the only new libbf api with minimal fields. - fixed light skeleton __destroy() method to munmap and close maps and progs. - refactored bpf_btf_find_by_name_kind to return btf_id | (btf_obj_fd << 32). - refactored use of bpf_btf_find_by_name_kind from loader prog. - moved auto-gen like code into skel_internal.h that is used by *.lskel.h It has minimal static inline bpf_load_and_run() method used by lskel. - added lksel.h example in patch 15. - replaced union bpf_map_prog_desc with struct bpf_map_desc and struct bpf_prog_desc. - removed mark_feat_supported and added a patch to pass 'obj' into kernel_supports. - added proper tracking of temporary FDs in loader prog and their cleanup via bpf_sys_close. - rename gen_trace.c into gen_loader.c to better align the naming throughout. - expanded number of available helpers in new prog type. - added support for raw_tp attaching in lskel. lskel supports tracing and raw_tp progs now. It correctly loads all networking prog types too, but __attach() method is tbd. - converted progs/test_ksyms_module.c to lskel. - minor feedback fixes all over. The description of V1 set is still valid: This is a first step towards signed bpf programs and the third approach of that kind. The first approach was to bring libbpf into the kernel as a user-mode-driver. The second approach was to invent a new file format and let kernel execute that format as a sequence of syscalls that create maps and load programs. This third approach is using new type of bpf program instead of inventing file format. 1st and 2nd approaches had too many downsides comparing to this 3rd and were discarded after months of work. To make it work the following new concepts are introduced: 1. syscall bpf program type A kind of bpf program that can do sys_bpf and sys_close syscalls. It can only execute in user context. 2. FD array or FD index. Traditionally BPF instructions are patched with FDs. What it means that maps has to be created first and then instructions modified which breaks signature verification if the program is signed. Instead of patching each instruction with FD patch it with an index into array of FDs. That makes the program signature stable if it uses maps. 3. loader program that is generated as "strace of libbpf". When libbpf is loading bpf_file.o it does a bunch of sys_bpf() syscalls to load BTF, create maps, populate maps and finally load programs. Instead of actually doing the syscalls generate a trace of what libbpf would have done and represent it as the "loader program". The "loader program" consists of single map and single bpf program that does those syscalls. Executing such "loader program" via bpf_prog_test_run() command will replay the sequence of syscalls that libbpf would have done which will result the same maps created and programs loaded as specified in the elf file. The "loader program" removes libelf and majority of libbpf dependency from program loading process. 4. light skeleton Instead of embedding the whole elf file into skeleton and using libbpf to parse it later generate a loader program and embed it into "light skeleton". Such skeleton can load the same set of elf files, but it doesn't need libbpf and libelf to do that. It only needs few sys_bpf wrappers. Future steps: - support CO-RE in the kernel. This patch set is already too big, so that critical feature is left for the next step. - generate light skeleton in golang to allow such users use BTF and all other features provided by libbpf - generate light skeleton for kernel, so that bpf programs can be embeded in the kernel module. The UMD usage in bpf_preload will be replaced with such skeleton, so bpf_preload would become a standard kernel module without user space dependency. - finally do the signing of the loader program. The patches are work in progress with few rough edges. ==================== Signed-off-by: Daniel Borkmann commit 79c7e1447c1c998e2571191e3cad12f9285ee22e Author: Axel Lin Date: Mon May 17 09:03:18 2021 +0800 regulator: fan53555: Cleanup unused define and redundant assignment TCS_VSEL_NSEL_MASK is not used so remove it. Also remove redundant assignment for di->slew_reg. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210517010318.1027949-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit a7f003147b785d9780ceeac13a8e344927a3b9ea Author: Axel Lin Date: Mon May 17 09:03:17 2021 +0800 regulator: fan53555: Fix slew_shift setting for tcs4525 Fix trivial copy-paste mistake. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210517010318.1027949-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 1f89d2fe16072a74b34bdb895160910091427891 Author: Sander Vanheule Date: Mon May 17 21:28:03 2021 +0200 regmap: Add MDIO bus support Basic support for MDIO bus access. Support only includes clause-22 register access, with 5-bit addresses, and 16-bit wide registers. Signed-off-by: Sander Vanheule Link: https://lore.kernel.org/r/63b99a2fec2c4ea3c461d59d451af8d675ecf312.1621279162.git.sander@svanheule.net Signed-off-by: Mark Brown commit 8b4ba1d31771114ebb717523c2bdb5ea75b4dec8 Author: Gyeongtaek Lee Date: Fri May 14 21:30:51 2021 +0900 ASoC: soc-dai: fix up hw params only if it is needed If fixed hw params won't be used, fixing up isn't needed also. Signed-off-by: Gyeongtaek Lee Link: https://lore.kernel.org/r/000401d748bc$fa466d50$eed347f0$@samsung.com Signed-off-by: Mark Brown commit 11480dbfe1d59eaa6382864acc476e7621b1da4c Author: Rafał Miłecki Date: Wed May 12 22:59:26 2021 +0200 ASoC: wm8750: convert to the json-schema This helps validating DTS files. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210512205926.780-1-zajec5@gmail.com Signed-off-by: Mark Brown commit 7487238c5f530b418745ce134d1b0a7fba3a0d8d Author: Neil Armstrong Date: Tue May 11 09:48:29 2021 +0200 ASoC: meson: g12a-toacodec: add support for SM1 TOACODEC This adds support for the TOACODEC found in Amlogic SM1 SoCs. The bits are shifted for more selection of clock sources, so this only maps the same support for G12A to the SM1 bits. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210511074829.4110036-3-narmstrong@baylibre.com Signed-off-by: Mark Brown commit 172dd9216d2b8a3fa162039d89c4361ef35c85ae Author: Neil Armstrong Date: Tue May 11 09:48:28 2021 +0200 ASoC: meson: g12a-toacodec: use regmap fields to prepare SM1 support Switch usage to regmap field for bits handled by the g12a_toacodec_mux_put_enum() function to avoid uselesss code duplication when adding SM1 variant support. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210511074829.4110036-2-narmstrong@baylibre.com Signed-off-by: Mark Brown commit ef04d4ff4b19628c78abddc768acce097d35d086 Author: Richard Fitzgerald Date: Fri May 14 17:12:06 2021 +0100 selftests: lib: Add wrapper script for test_scanf Adds a wrapper shell script for the test_scanf module. Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210514161206.30821-4-rf@opensource.cirrus.com commit 50f530e176eac808e64416732e54c0686ce2c39b Author: Richard Fitzgerald Date: Fri May 14 17:12:05 2021 +0100 lib: test_scanf: Add tests for sscanf number conversion Adds test_sscanf to test various number conversion cases, as number conversion was previously broken. This also tests the simple_strtoxxx() functions exported from vsprintf.c. Signed-off-by: Richard Fitzgerald Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210514161206.30821-3-rf@opensource.cirrus.com commit 900fdc4573766dd43b847b4f54bd4a1ee2bc7360 Author: Richard Fitzgerald Date: Fri May 14 17:12:04 2021 +0100 lib: vsprintf: Fix handling of number field widths in vsscanf The existing code attempted to handle numbers by doing a strto[u]l(), ignoring the field width, and then repeatedly dividing to extract the field out of the full converted value. If the string contains a run of valid digits longer than will fit in a long or long long, this would overflow and no amount of dividing can recover the correct value. This patch fixes vsscanf() to obey number field widths when parsing the number. A new _parse_integer_limit() is added that takes a limit for the number of characters to parse. The number field conversion in vsscanf is changed to use this new function. If a number starts with a radix prefix, the field width must be long enough for at last one digit after the prefix. If not, it will be handled like this: sscanf("0x4", "%1i", &i): i=0, scanning continues with the 'x' sscanf("0x4", "%2i", &i): i=0, scanning continues with the '4' This is consistent with the observed behaviour of userland sscanf. Note that this patch does NOT fix the problem of a single field value overflowing the target type. So for example: sscanf("123456789abcdef", "%x", &i); Will not produce the correct result because the value obviously overflows INT_MAX. But sscanf will report a successful conversion. Note that where a very large number is used to mean "unlimited", the value INT_MAX is used for consistency with the behaviour of vsnprintf(). Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210514161206.30821-2-rf@opensource.cirrus.com commit 11b3dda5e8b6cde957a6410233f30d6c48582998 Author: Richard Fitzgerald Date: Fri May 14 17:12:03 2021 +0100 lib: vsprintf: scanf: Negative number must have field width > 1 If a signed number field starts with a '-' the field width must be > 1, or unlimited, to allow at least one digit after the '-'. This patch adds a check for this. If a signed field starts with '-' and field_width == 1 the scanf will quit. It is ok for a signed number field to have a field width of 1 if it starts with a digit. In that case the single digit can be converted. Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Acked-by: Andy Shevchenko Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210514161206.30821-1-rf@opensource.cirrus.com commit 5258f7eed42f4565d065726fd82d3430dd618a68 Author: Luca Ceresoli Date: Fri Feb 19 23:39:10 2021 +0100 mfd: lp87565: Move LP87565_regulator_id to .c file This enum is used only internally to the regulator driver for buck indexes. Signed-off-by: Luca Ceresoli Signed-off-by: Lee Jones commit c06a40e9513d246bdeacd290f2357bb99251dc9a Author: Luca Ceresoli Date: Fri Feb 19 23:39:08 2021 +0100 mfd: lp87565: Fix typo in define names "GOIO" should be "GPIO" here. Signed-off-by: Luca Ceresoli Signed-off-by: Lee Jones commit 1699949d3314e5d1956fb082e4cd4798bf6149fc Author: Masahiro Yamada Date: Wed May 19 15:37:09 2021 +0900 sched: Fix a stale comment in pick_next_task() fair_sched_class->next no longer exists since commit: a87e749e8fa1 ("sched: Remove struct sched_class::next field"). Now the sched_class order is specified by the linker script. Rewrite the comment in a more generic way. Signed-off-by: Masahiro Yamada Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210519063709.323162-1-masahiroy@kernel.org commit 8919f07276991c7bf0d0802f0356331c5c62f7a2 Author: Chang S. Bae Date: Tue May 18 13:03:20 2021 -0700 selftest/x86/signal: Include test cases for validating sigaltstack The test measures the kernel's signal delivery with different (enough vs. insufficient) stack sizes. Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Reviewed-by: Len Brown Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20210518200320.17239-7-chang.seok.bae@intel.com commit 2beb4a53fc3f1081cedc1c1a198c7f56cc4fc60c Author: Chang S. Bae Date: Tue May 18 13:03:19 2021 -0700 x86/signal: Detect and prevent an alternate signal stack overflow The kernel pushes context on to the userspace stack to prepare for the user's signal handler. When the user has supplied an alternate signal stack, via sigaltstack(2), it is easy for the kernel to verify that the stack size is sufficient for the current hardware context. Check if writing the hardware context to the alternate stack will exceed it's size. If yes, then instead of corrupting user-data and proceeding with the original signal handler, an immediate SIGSEGV signal is delivered. Refactor the stack pointer check code from on_sig_stack() and use the new helper. While the kernel allows new source code to discover and use a sufficient alternate signal stack size, this check is still necessary to protect binaries with insufficient alternate signal stack size from data corruption. Fixes: c2bc11f10a39 ("x86, AVX-512: Enable AVX-512 States Context Switch") Reported-by: Florian Weimer Suggested-by: Jann Horn Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Reviewed-by: Len Brown Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20210518200320.17239-6-chang.seok.bae@intel.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=153531 commit bdf6c8b84a4fa726c382ef6d3518f3ae123a7ebd Author: Chang S. Bae Date: Tue May 18 13:03:18 2021 -0700 selftest/sigaltstack: Use the AT_MINSIGSTKSZ aux vector if available The SIGSTKSZ constant may not represent enough stack size in some architectures as the hardware state size grows. Use getauxval(AT_MINSIGSTKSZ) to increase the stack size. Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Reviewed-by: Len Brown Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20210518200320.17239-5-chang.seok.bae@intel.com commit 1c33bb0507508af24fd754dd7123bd8e997fab2f Author: Chang S. Bae Date: Tue May 18 13:03:17 2021 -0700 x86/elf: Support a new ELF aux vector AT_MINSIGSTKSZ Historically, signal.h defines MINSIGSTKSZ (2KB) and SIGSTKSZ (8KB), for use by all architectures with sigaltstack(2). Over time, the hardware state size grew, but these constants did not evolve. Today, literal use of these constants on several architectures may result in signal stack overflow, and thus user data corruption. A few years ago, the ARM team addressed this issue by establishing getauxval(AT_MINSIGSTKSZ). This enables the kernel to supply a value at runtime that is an appropriate replacement on current and future hardware. Add getauxval(AT_MINSIGSTKSZ) support to x86, analogous to the support added for ARM in 94b07c1f8c39 ("arm64: signal: Report signal frame size to userspace via auxv"). Also, include a documentation to describe x86-specific auxiliary vectors. Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Reviewed-by: Len Brown Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20210518200320.17239-4-chang.seok.bae@intel.com commit 939ef713297df2cc910592305aa26af0e87f28ac Author: Chang S. Bae Date: Tue May 18 13:03:16 2021 -0700 x86/signal: Introduce helpers to get the maximum signal frame size Signal frames do not have a fixed format and can vary in size when a number of things change: supported XSAVE features, 32 vs. 64-bit apps, etc. Add support for a runtime method for userspace to dynamically discover how large a signal stack needs to be. Introduce a new variable, max_frame_size, and helper functions for the calculation to be used in a new user interface. Set max_frame_size to a system-wide worst-case value, instead of storing multiple app-specific values. Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Reviewed-by: Len Brown Acked-by: Thomas Gleixner Acked-by: H.J. Lu Link: https://lkml.kernel.org/r/20210518200320.17239-3-chang.seok.bae@intel.com commit 7cd60e43a6def40ecb75deb8decc677995970d0b Author: Chang S. Bae Date: Tue May 18 13:03:15 2021 -0700 uapi/auxvec: Define the aux vector AT_MINSIGSTKSZ Define AT_MINSIGSTKSZ in the generic uapi header. It is already used as generic ABI in glibc's generic elf.h, and this define will prevent future namespace conflicts. In particular, x86 is also using this generic definition. Signed-off-by: Chang S. Bae Signed-off-by: Borislav Petkov Reviewed-by: Len Brown Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20210518200320.17239-2-chang.seok.bae@intel.com commit 006ae1970a8cde1d3e92da69b324d12880133a13 Merge: c2b1063e8feb2 4d80d6ca5d77f Author: Thomas Gleixner Date: Wed May 19 11:04:47 2021 +0200 Merge branch 'irq/affinity' into irq/core Merge the export of irq_set_affinity() which is a standalone commit so it can be pulled into other trees. commit 4d80d6ca5d77fde9880da8466e5b64f250e5bf82 Author: Thomas Gleixner Date: Tue May 18 11:17:26 2021 +0200 genirq: Export affinity setter for modules Perf modules abuse irq_set_affinity_hint() to set the affinity of system PMU interrupts just because irq_set_affinity() was not exported. The fact that irq_set_affinity_hint() actually sets the affinity is a non-documented side effect and the name is clearly saying it's a hint. To clean this up, export the real affinity setter. Signed-off-by: Thomas Gleixner Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210518093117.968251441@linutronix.de commit 155591d3ceeec2cd6a50b40278e2014c45f6b5f6 Author: Jiri Slaby Date: Wed May 5 11:19:20 2021 +0200 USB: serial: make usb_serial_driver::chars_in_buffer return uint tty_operations::chars_in_buffer is being switched to return uint. Do the same for usb_serial_driver's chars_in_buffer. Signed-off-by: Jiri Slaby [ johan: amend commit message ] Signed-off-by: Johan Hovold commit 94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560 Author: Jiri Slaby Date: Wed May 5 11:19:16 2021 +0200 USB: serial: make usb_serial_driver::write_room return uint Line disciplines expect a positive value or zero returned from tty->ops->write_room (invoked by tty_write_room). Both of them are being updated to return an unsigned int. Switch also usb_serial_driver::write_room and all its users. Signed-off-by: Jiri Slaby [ johan: amend commit message, drop unrelated comment change ] Signed-off-by: Johan Hovold commit 93b73858701fd01de26a4a874eb95f9b7156fd4b Author: Qais Yousef Date: Mon May 10 15:50:32 2021 +0100 sched/uclamp: Fix locking around cpu_util_update_eff() cpu_cgroup_css_online() calls cpu_util_update_eff() without holding the uclamp_mutex or rcu_read_lock() like other call sites, which is a mistake. The uclamp_mutex is required to protect against concurrent reads and writes that could update the cgroup hierarchy. The rcu_read_lock() is required to traverse the cgroup data structures in cpu_util_update_eff(). Surround the caller with the required locks and add some asserts to better document the dependency in cpu_util_update_eff(). Fixes: 7226017ad37a ("sched/uclamp: Fix a bug in propagating uclamp value in new cgroups") Reported-by: Quentin Perret Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210510145032.1934078-3-qais.yousef@arm.com commit 0c18f2ecfcc274a4bcc1d122f79ebd4001c3b445 Author: Qais Yousef Date: Mon May 10 15:50:31 2021 +0100 sched/uclamp: Fix wrong implementation of cpu.uclamp.min cpu.uclamp.min is a protection as described in cgroup-v2 Resource Distribution Model Documentation/admin-guide/cgroup-v2.rst which means we try our best to preserve the minimum performance point of tasks in this group. See full description of cpu.uclamp.min in the cgroup-v2.rst. But the current implementation makes it a limit, which is not what was intended. For example: tg->cpu.uclamp.min = 20% p0->uclamp[UCLAMP_MIN] = 0 p1->uclamp[UCLAMP_MIN] = 50% Previous Behavior (limit): p0->effective_uclamp = 0 p1->effective_uclamp = 20% New Behavior (Protection): p0->effective_uclamp = 20% p1->effective_uclamp = 50% Which is inline with how protections should work. With this change the cgroup and per-task behaviors are the same, as expected. Additionally, we remove the confusing relationship between cgroup and !user_defined flag. We don't want for example RT tasks that are boosted by default to max to change their boost value when they attach to a cgroup. If a cgroup wants to limit the max performance point of tasks attached to it, then cpu.uclamp.max must be set accordingly. Or if they want to set different boost value based on cgroup, then sysctl_sched_util_clamp_min_rt_default must be used to NOT boost to max and set the right cpu.uclamp.min for each group to let the RT tasks obtain the desired boost value when attached to that group. As it stands the dependency on !user_defined flag adds an extra layer of complexity that is not required now cpu.uclamp.min behaves properly as a protection. The propagation model of effective cpu.uclamp.min in child cgroups as implemented by cpu_util_update_eff() is still correct. The parent protection sets an upper limit of what the child cgroups will effectively get. Fixes: 3eac870a3247 (sched/uclamp: Use TG's clamps to restrict TASK's clamps) Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210510145032.1934078-2-qais.yousef@arm.com commit 570a752b7a9bd03b50ad6420cd7f10092cc11bd3 Author: Yejune Deng Date: Mon May 10 16:10:24 2021 +0100 lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowed is_percpu_thread() more elegantly handles SMP vs UP, and further checks the presence of PF_NO_SETAFFINITY. This lets us catch cases where check_preemption_disabled() can race with a concurrent sched_setaffinity(). Signed-off-by: Yejune Deng [Amended changelog] Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210510151024.2448573-3-valentin.schneider@arm.com commit 09fe880ed7a160ebbffb84a0a9096a075e314d2f Author: Frederic Weisbecker Date: Thu May 13 01:29:24 2021 +0200 MAINTAINERS: Add myself as context tracking maintainer I've been missing a lot of patches touching context tracking for which I wasn't Cc'ed these last months. The code looks like a simple single file but has a lot of subtle tentacles. Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Acked-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210512232924.150322-11-frederic@kernel.org commit 85368a213e2dc0f4956e9d23daa39c4a339861e1 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:19 2021 +0200 media: venus: venc: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 1938ab0d271ffb6f0c9efa2873a53642167fe57c Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:19 2021 +0200 media: venus: vdec: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. As a bonus, there's no need to check if ret == 1, as pm_runtime_resume_and_get() always return 0 on success. Signed-off-by: Mauro Carvalho Chehab commit f6bf35ee3e4d9353c117bcc5cc4616d1ce2d977f Author: Mauro Carvalho Chehab Date: Wed May 5 09:45:19 2021 +0200 media: venus: core: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 09dfb36ce250e76322ac8940c10d75e53a9e48d4 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:18 2021 +0200 media: camss: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Robert Foss Signed-off-by: Mauro Carvalho Chehab commit 97df01fae800ff765dbb247ee30c7a438b2ae07b Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:18 2021 +0200 media: mtk-jpeg: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 7295e537bb2b16b500ff55cd6209b3cefd323948 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:17 2021 +0200 media: coda: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. While here, as noted by Phillip, the labels at the coda_open() function are currently named after what operation failed, instead of what they do in response. So, change the name of the error label that it is called when clk_enable fails, in order to be consistent. Reviewed-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab commit 0ccb25b8279cb6f212434322126b4c512f0b306c Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:17 2021 +0200 media: ipu3: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit bc700a13cd3ffe8bb6ef7274ede74a19639fd6dd Author: Mauro Carvalho Chehab Date: Fri Apr 23 15:35:51 2021 +0200 media: sti/hva: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. While the hva driver does it right, there are lots of errors on other drivers due to its misusage. So, let's change this driver to also use pm_runtime_resume_and_get(), as we're doing similar changes all over the media subsystem. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit 0314339a0a49f4a128b61e5e1a0af1df6e64a186 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:20 2021 +0200 media: rockchip/rga: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit c09ffca53fcd186e140c82ea73e51cb4dd362053 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:23 2021 +0200 staging: media: tegra-video: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit dc8276b789174071ca3fbfe887a95718b3f9b888 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:22 2021 +0200 staging: media: tegra-vde: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit e21e1e94ce10e7ce09f98184526a237125179155 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:22 2021 +0200 staging: media: cedrus_video: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Acked-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit 7af42f3136d8029f84be743a06c96ba024eabb40 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:22 2021 +0200 staging: media: ipu3: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit deb9119f807abd01d4d78a2dc567b10e2501ec79 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:21 2021 +0200 staging: media: atomisp: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Besides that, the de-init order in case of css error was wrong. This change should also fix that. Signed-off-by: Mauro Carvalho Chehab commit 75ecb9c83cf9d29eaa05bbdd0f84356ac22ed972 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:22 2021 +0200 staging: media: imx7-mipi-csis: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Acked-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 2450f59d24166c8af60aa075e9dec4466f905c1f Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:11 2021 +0200 media: i2c: ccs-core: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit a959a7bf3b939494adca95b1c53e98b74fd90702 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:17 2021 +0200 media: i2c: video-i2c: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 81f2fe55d12b3ad26c8203c51967ae531db7ac40 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:17 2021 +0200 media: i2c: tvp5150: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 279a085db8c8bcf7d83b06cfe36cf4b80f4d0566 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:16 2021 +0200 media: i2c: ov9734: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 586ee057ba6b014520e3dac232ac25da987f5ac0 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:16 2021 +0200 media: i2c: ov8865: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 529e78dea6a05750a9ff7bb44bb360546d4a322d Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:16 2021 +0200 media: i2c: ov8856: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 45bbff806cab3bb5b5026386b896d1c6f027556c Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:16 2021 +0200 media: i2c: ov7740: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 1541ac5ffd4c228242ec4f0af3a73e7bd652ab3f Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:16 2021 +0200 media: i2c: ov5695: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit f236bb2490b60eea8e2db0251fc9062181762fe5 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:16 2021 +0200 media: i2c: ov5675: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit f151c230dced061eebeeafae6d6c5958d4a46689 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:15 2021 +0200 media: i2c: ov5670: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 6b19d297008627ba4296448e760624578b199542 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:15 2021 +0200 media: i2c: ov5648: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 5187df40bf3d910d883cfff815812540de951999 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:15 2021 +0200 media: i2c: ov5647: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Acked-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit b9be93aa55b4ee1821b2974995640fa769689d94 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:15 2021 +0200 media: i2c: ov2740: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit c679b2365a9e93f5def3a548bb2917f1968c59a5 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:15 2021 +0200 media: i2c: ov2685: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit c12ede18c38beb4804bfc9995be05a75e0c1a34a Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:14 2021 +0200 media: i2c: ov2659: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Acked-by: Lad Prabhakar Signed-off-by: Mauro Carvalho Chehab commit cc9351ff1055f932e7af637081a411ffeaf82f76 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:14 2021 +0200 media: i2c: ov13858: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 67d44de2f842414d28acc0512311a9dad17ee797 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:14 2021 +0200 media: i2c: ov02a10: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit e7c018a96355fa0d8ce2d4499d300584a92717c2 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:14 2021 +0200 media: i2c: mt9m001: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 5f070f4df4fd71230074d154a6fd99c6abe03abb Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:14 2021 +0200 media: i2c: imx355: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit c0f8f1b6a10110fd70c41114214ba1b209d9a910 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:13 2021 +0200 media: i2c: imx319: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 739d9c64150a73dccfa9a8b792de5179fa06e1f7 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:13 2021 +0200 media: i2c: imx290: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit bb94b8f3a76e76ed24e76fa58892fd8db86c13c2 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:13 2021 +0200 media: i2c: imx274: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 018ef43017113afc24d0a1842b7c7cf66a52cfc9 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:13 2021 +0200 media: i2c: imx258: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 30ad455912651abb79db379a2a2eaad00509ba87 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:12 2021 +0200 media: i2c: imx219: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 3c11dfe3be25940dba2472f4e3114be132a74ba0 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:12 2021 +0200 media: i2c: imx214: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit c36c7d56ad4426ddf6cc598a52562533709a245c Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:12 2021 +0200 media: i2c: hi556: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit d5e75e8b4a24715fddd4adf3a4c0bf90e36546c5 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:12 2021 +0200 media: i2c: dw9807-vcm: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit ed8f47b061250ddaadcfe33a54532241a718b59e Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:12 2021 +0200 media: i2c: dw9768: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 7917f27941c3c1289aad2be27bf329844125d13e Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:11 2021 +0200 media: i2c: dw9714: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Signed-off-by: Mauro Carvalho Chehab commit 401b0e5dcab62196c56aa7c2536b0cacfc506e0e Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:11 2021 +0200 media: i2c: ak7375: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit bb9212fd971035597d264fc6a7cc4df0db9b5fd0 Author: Emil Velikov Date: Thu Apr 1 16:43:36 2021 +0200 media: ARM: dts: sama5d4: enable Hantro G1 VDEC Add the SAMA5D4 VDEC module which comprises Hantro G1 video decoder core. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Acked-by: Nicolas Ferre Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 82ad940c00949965739360f68b90d9a00ccefc81 Author: Emil Velikov Date: Thu Apr 1 16:43:35 2021 +0200 media: hantro: add initial SAMA5D4 support The SoC features a Hantro G1 compatible video decoder, supporting the MPEG-2, VP8 and H264 codecs with resolutions up-to 1280x720. Post-processing core is also available on the SoC. Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0d705395afa4b4fa7d0fae86b9c04cfe50a03ace Author: Emil Velikov Date: Thu Apr 1 16:43:34 2021 +0200 media: dt-bindings: Document SAMA5D4 VDEC bindings Add devicetree binding documentation for the Hantro G1/G2 VDEC on the Microchip SAMAS5D4 SoC. Acked-by: Nicolas Ferre Signed-off-by: Emil Velikov Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18d6c8b7b4c94c5e2e5b5807d9484b4d54b8fa1b Author: Emil Velikov Date: Thu Apr 1 16:43:33 2021 +0200 media: hantro: add fallback handling for single irq/clk Currently the driver expects that each irq/clk will have a name specified. A valid point was raised by the DT maintainers - when there is a single interrupt line or clock - the names are not needed. Keep the names within the drivers themselves, but don't use them when only a single entry exists. Instead use: - num_clk == 1 - devm_clk_get(..., NULL) - num_irq == 1 - platform_get_irq(..., 0) Suggested-by: Ezequiel Garcia Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bbc42ab0da985f538eefe1b470a610624e53829f Author: Emil Velikov Date: Thu Apr 1 16:43:32 2021 +0200 media: hantro: introduce hantro_g1.c for common API The Hantro G1 IRQ and reset handling is pretty standard. I was this close to duplicating it, yet again, before reconsidering and refactoring it to a separate file. Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d72a96b6c053dca29e7b2a94fb700f4960ce9834 Author: Emil Velikov Date: Thu Apr 1 16:43:31 2021 +0200 media: hantro: imx: remove unused include The current imx8 code does not use the jpeg encoder. Remove the unnecessary include. Fixes: 8e4aaa687863 ("media: hantro: add initial i.MX8MQ support") Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c78b22aaaa9055b05a5bd47f6715f0de16487dd4 Author: Emil Velikov Date: Thu Apr 1 16:43:30 2021 +0200 media: hantro: imx: remove duplicate dec_base init The vpu->dec_base is already set by the hantro driver itself. Fixes: 8e4aaa687863 ("media: hantro: add initial i.MX8MQ support") Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b330849512ef7c617f72111fd958daf6febdf40 Author: Emil Velikov Date: Thu Apr 1 16:43:29 2021 +0200 media: hantro: imx: reuse MB_DIM define Swap the hardcoded 16 with MB_DIM define. Fixes: 8e4aaa687863 ("media: hantro: add initial i.MX8MQ support") Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 09f4310c6bfbc0002ce1cf8fc90db50777d75916 Author: Emil Velikov Date: Thu Apr 1 16:43:28 2021 +0200 media: hantro: use G1_REG_INTERRUPT directly for the mpeg2 Use the register directly over the existing SWREG(). Ideally we'll port the driver away from the local registers, but for now this is enough. For context - I was reading through the IRQ register handling across the variants. Acked-by: Nicolas Ferre Reviewed-by: Ezequiel Garcia Signed-off-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f8194e5e63fdcb349e8da9eef9e574d5b1d687cb Author: Anirudh Rayabharam Date: Tue May 4 19:08:58 2021 +0200 media: pvrusb2: fix warning in pvr2_i2c_core_done syzbot has reported the following warning in pvr2_i2c_done: sysfs group 'power' not found for kobject '1-0043' When the device is disconnected (pvr_hdw_disconnect), the i2c adapter is not unregistered along with the USB and v4l2 teardown. As part of the USB device disconnect, the sysfs files of the subdevices are also deleted. So, by the time pvr_i2c_core_done is called by pvr_context_destroy, the sysfs files have been deleted. To fix this, unregister the i2c adapter too in pvr_hdw_disconnect. Make the device deregistration code shared by calling pvr_hdw_disconnect from pvr2_hdw_destroy. Reported-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com Tested-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com Reviewed-by: Greg Kroah-Hartman Signed-off-by: Anirudh Rayabharam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8edcb5049ac29aa3c8acc5ef15dd4036543d747e Author: Randy Dunlap Date: Fri Apr 30 22:19:55 2021 +0200 media: I2C: change 'RST' to "RSET" to fix multiple build errors The use of an enum named 'RST' conflicts with a #define macro named 'RST' in arch/mips/include/asm/mach-rc32434/rb.h. The MIPS use of RST was there first (AFAICT), so change the media/i2c/ uses of RST to be named 'RSET'. 'git grep -w RSET' does not report any naming conflicts with the new name. This fixes multiple build errors: arch/mips/include/asm/mach-rc32434/rb.h:15:14: error: expected identifier before '(' token 15 | #define RST (1 << 15) | ^ drivers/media/i2c/s5c73m3/s5c73m3.h:356:2: note: in expansion of macro 'RST' 356 | RST, | ^~~ ../arch/mips/include/asm/mach-rc32434/rb.h:15:14: error: expected identifier before '(' token 15 | #define RST (1 << 15) | ^ ../drivers/media/i2c/s5k6aa.c:180:2: note: in expansion of macro 'RST' 180 | RST, | ^~~ ../arch/mips/include/asm/mach-rc32434/rb.h:15:14: error: expected identifier before '(' token 15 | #define RST (1 << 15) | ^ ../drivers/media/i2c/s5k5baf.c:238:2: note: in expansion of macro 'RST' 238 | RST, | ^~~ and some others that I have trimmed. Fixes: cac47f1822fc ("[media] V4L: Add S5C73M3 camera driver") Fixes: 8b99312b7214 ("[media] Add v4l2 subdev driver for S5K4ECGX sensor") Fixes: 7d459937dc09 ("[media] Add driver for Samsung S5K5BAF camera sensor") Fixes: bfa8dd3a0524 ("[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) Cc: Andrzej Hajda Cc: Sylwester Nawrocki Cc: Sangwook Lee Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 414e0a6437f96234fe0ba932093b8ff6a187192a Author: dingsenjie Date: Fri Apr 30 08:18:33 2021 +0200 media: qcom/camss: Use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: dingsenjie Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 67a7e53d5b21f3a84efc03a4e62db7caf97841ef Author: Jernej Skrabec Date: Tue Apr 27 09:15:54 2021 +0200 media: hevc: Fix dependent slice segment flags Dependent slice segment flag for PPS control is misnamed. It should have "enabled" at the end. It only tells if this flag is present in slice header or not and not the actual value. Fix this by renaming the PPS flag and introduce another flag for slice control which tells actual value. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3d37ef41bed0854805ab9af22c422267510e1344 Author: Hans Verkuil Date: Fri Apr 23 10:00:49 2021 +0200 media: cobalt: fix race condition in setting HPD The cobalt_s_bit_sysctrl reads the old register value over PCI, then changes a bit and sets writes the new value to the register. This is used among other things for setting the HPD output pin. But if the HPD is changed for multiple inputs at the same time, then this causes a race condition where a stale value is read. Serialize this function with a mutex. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b2cd0b31ed896c1a6a423019ed3633e890a7f997 Author: Hans Verkuil Date: Thu Apr 22 10:21:52 2021 +0200 media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved The V4L2 core already zeroes fmt.sdr.reserved, so there is no need for drivers to do the same. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be8656e62e9e791837b606a027802b504a945c97 Author: Pavel Skripkin Date: Wed Apr 21 21:43:45 2021 +0200 media: cpia2: fix memory leak in cpia2_usb_probe syzbot reported leak in cpia2 usb driver. The problem was in invalid error handling. v4l2_device_register() is called in cpia2_init_camera_struct(), but all error cases after cpia2_init_camera_struct() did not call the v4l2_device_unregister() Reported-by: syzbot+d1e69c888f0d3866ead4@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 27ba44270b5ea3d6ec71e148051becffb51d2324 Author: Sebastian Fricke Date: Tue Apr 20 19:45:22 2021 +0200 media: rkisp1: rkisp1-params.c: Fix typos s/when the camera active/when the camera is active/ s/thus not isr protection/therefore there is no need to acquire a lock/ Signed-off-by: Sebastian Fricke Reviewed-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 71c41518128414ebb1215a074f94ef8f3e2bf0cc Author: Sebastian Fricke Date: Sun Apr 18 12:34:25 2021 +0200 media: rkisp1: rksip1-capture.c: Improve comments and fix typos Improve the wording of the function description to increase readability. Fix three typos: s/during processing a frame/while processing a frame/ s/it also update/it also updates/ s/there's not buf in shadow/there's no buffer in a shadow register/ Replace the abbreviation 'buf' with the full word buffer, the abbreviation 'config' with the verb configure, and 'regs' with registers. The goal of this change is to ease the reading flow of the comment. Signed-off-by: Sebastian Fricke Reviewed-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b07006ff9365ddfc184e1836cd1f75355c6bb740 Author: Sebastian Fricke Date: Sat Apr 17 15:34:38 2021 +0200 media: mc: mc-entity.c: Fix typo s/entity in the other end/entity at the other end/ [hverkuil: also remove the spurious space after 'link'] Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4eb48acac1e9fef09fde3079e4b2e30dc7cf2b35 Author: Colin Ian King Date: Fri Apr 9 11:15:31 2021 +0200 media: s2255drv: remove redundant assignment to variable field The variable 'field' is being assigned a value this is never read, it is being updated in all the following if/else combinations. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 637959f7e273a83934c9d3c6a50af529fb46cbb6 Author: Deepak R Varma Date: Wed Apr 28 20:10:26 2021 +0200 media: staging: media: atomisp: remove unnecessary pr_info calls pr_info() messages to log function entry / exit tracing spams the log. Such basic tracing is not necessary and be removed. Signed-off-by: Deepak R Varma Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2dfc978ac0f3aaa5de4eb604ef7f35bacd077a03 Author: Deepak R Varma Date: Wed Apr 28 20:09:55 2021 +0200 media: staging: media: atomisp: replace raw pr_*() by dev_dbg() It is recommended to use driver model diagnostic macros dev_*() instead of raw printk() or pr_*() since the former ensures that the log messages are always associated with the corresponding device and driver. This also addresses the checkpatch complain for not using KERN_ facility in printk() call. Suggested-by: Fabio Aiuto Signed-off-by: Deepak R Varma Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4c999ae366e13bdf1f961fdf4c4cefe3d772f275 Author: Deepak R Varma Date: Wed Apr 28 20:09:20 2021 +0200 media: staging: media: atomisp: fix CamelCase variable naming Mixed case variable names are discouraged and they result in checkpatch script "Avoid CamelCase" warnings. Replace such CamelCase variable names by lower case strings according to the coding style guidelines. Signed-off-by: Deepak R Varma Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f50559f0c9b43b023476664724e8494fbe9de4fc Author: Deepak R Varma Date: Wed Apr 28 20:08:45 2021 +0200 media: staging: media: atomisp: reformat code comment blocks Reformat code comment blocks according to the coding style guidelines. This resolves different checkpatch script WARNINGs around block comments. [hverkuil: fixed up one missed '/* text' comment as reported by Fabio] Suggested-by: Fabio Aiuto Signed-off-by: Deepak R Varma Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21837c2c27cdc0ab768b64c8f626b6738604e37d Author: Deepak R Varma Date: Wed Apr 28 20:06:50 2021 +0200 media: staging: media: atomisp: remove unnecessary braces According to the coding style guidelines, if...else blocks with single instructions do not need enclosing braces. This resolves checkpatch WARNING / CHECK complaints. Signed-off-by: Deepak R Varma Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 43692e9e1b8b93d0e26e4a752adc41973863ecb2 Author: Deepak R Varma Date: Wed Apr 28 20:05:41 2021 +0200 media: staging: media: atomisp: balance braces around if...else block Balance braces around the if else blocks as per the code style guidelines. Add braces to branches where it is missing. Resolves checkpatch script CHECK / WARNING feedback messages. Signed-off-by: Deepak R Varma Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 684e025c716568496ec63e892f573a26a4db72d9 Author: Martiros Shakhzadyan Date: Fri Apr 23 18:13:12 2021 +0200 media: staging: media: atomisp: Fix line split style issues Fix line split issues and resolve adjacent extra parens. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 58a328830e490c5ee512519c2e8172ecc3073445 Author: Martiros Shakhzadyan Date: Fri Apr 23 18:12:29 2021 +0200 media: staging: media: atomisp: Refactor ia_css_stream_load() Move the support check to the beginning of the function. Change the logic to avoid multiple nesting blocks. Move 'err' variable assignment outside of the if statement. Remove an unnecessary check whether 'j' is zero. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7796e455170efa1823457b17a292b1c65bb8c1e0 Author: Martiros Shakhzadyan Date: Fri Apr 23 18:13:48 2021 +0200 media: staging: media: atomisp: Fix alignment and line length issues Fix alignment style issues and adjacent line length issues in sh_css.c Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d4bc34d18201120b247506b4a6ed17af694dfcf7 Author: Martiros Shakhzadyan Date: Mon Apr 19 21:26:00 2021 +0200 media: staging: media: atomisp: Replace if else clause with a ternary Use the ternary operator for conditional variable assignment in create_host_video_pipeline(). Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9d634547323e7cb7dd11c68075e8128ce68544ae Author: Martiros Shakhzadyan Date: Mon Apr 19 21:25:57 2021 +0200 media: staging: media: atomisp: Remove a superfluous else clause in sh_css.c Remove a superfluous else clause in ia_css_pipe_check_format() Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dfdd8ceb6f748abe4848fe09dedc4e5fc4c5635b Author: Martiros Shakhzadyan Date: Mon Apr 19 21:25:56 2021 +0200 media: staging: media: atomisp: Remove all redundant assertions in sh_css.c Remove the remainder of assert() in places where the condition is already handled. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7394bf6d3c1e8316484fcf3a9d71daaab489f211 Author: Martiros Shakhzadyan Date: Mon Apr 19 21:25:55 2021 +0200 media: staging: media: atomisp: Fix the rest of sh_css.c brace issues Fix the remainder of brace coding style issues. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c0633711b00ae5997925f0b691acb7ec900155c4 Author: Martiros Shakhzadyan Date: Thu Apr 15 23:41:42 2021 +0200 media: staging: media: atomisp: Remove redundant assertions in sh_css.c Remove assert() in places where the condition is already handled. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ceb557604e85c55bce0585216623c21c7a00453 Author: Martiros Shakhzadyan Date: Thu Apr 15 23:41:41 2021 +0200 media: staging: media: atomisp: Fix sh_css.c brace coding style issues Fix brace coding style issues. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 049eda0749faa98d074e7f362c3e2d211da2e5ed Author: Aline Santana Cordeiro Date: Thu Apr 15 19:18:18 2021 +0200 media: staging: media: tegra-video: Align line break to match with the open parenthesis in file vi.c Align line break to match with the open parenthesis. Issue detected by checkpatch.pl. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d1ca04c476d6dccb6a02248187b8aab1400ed176 Author: Aline Santana Cordeiro Date: Thu Apr 15 18:54:38 2021 +0200 media: staging: media: atomisp: pci: Balance braces around conditional statements in file atomisp_v4l2.c Balance braces around conditional statements. Issue detected by checkpatch.pl. It happens in if-else statements where one of the commands uses braces around a block of code and the other command does not since it has just a single line of code. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 41d1f1b03909782aa8f0a05db9a15a762679bc17 Author: Aline Santana Cordeiro Date: Thu Apr 15 18:54:34 2021 +0200 media: staging: media: atomisp: pci: Balance braces around conditional statements in file atomisp_subdev.c Balance braces around conditional statements. Issue detected by checkpatch.pl. It happens in if-else statements where one of the commands uses braces around a block of code and the other command does not since it has just a single line of code. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b6465b1d74b8ce6dd585ae96877bb74bc6f86f5e Author: Aline Santana Cordeiro Date: Thu Apr 15 18:54:27 2021 +0200 media: staging: media: atomisp: pci: Balance braces around conditional statements in file atomisp_compat_css20.c Balance braces around conditional statements. Issue detected by checkpatch.pl. It happens in if-else statements where one of the commands uses braces around a block of code and the other command does not since it has just a single line of code. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a016c35a326c6b2f558ede58ff08da7ef1da1a8 Author: Aline Santana Cordeiro Date: Thu Apr 15 18:54:23 2021 +0200 media: staging: media: atomisp: pci: Balance braces around conditional statements in file atomisp_cmd.c Balance braces around conditional statements. Issue detected by checkpatch.pl. It happens in if-else statements where one of the commands uses braces around a block of code and the other command does not since it has just a single line of code. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 969ef42b1ae094da99b8acbf14864f94d37f6e58 Author: Bjorn Andersson Date: Wed Apr 28 17:37:51 2021 -0700 pinctrl: qcom: spmi-mpp: Add compatible for pmi8994 The PMI8994 has 4 multi-purpose-pins, add a compatible for this hardware block to the MPP driver. Signed-off-by: Bjorn Andersson Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210429003751.224232-1-bjorn.andersson@linaro.org Signed-off-by: Linus Walleij commit d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 Author: Raul E Rangel Date: Thu Apr 29 16:34:24 2021 -0600 pinctrl: amd: Implement irq_set_wake This allows the OS to control which devices produce wake events. $ grep enabled /sys/kernel/irq/*/wakeup /sys/kernel/irq/24/wakeup:enabled Signed-off-by: Raul E Rangel Link: https://lore.kernel.org/r/20210429163341.1.I7631534622233689dd81410525e0dd617b9b2012@changeid Signed-off-by: Linus Walleij commit e4b275531887fef7f7d8a7284bfc32f0fbbd4208 Author: Al Viro Date: Sun May 16 20:24:00 2021 -0400 getcwd(2): clean up error handling Signed-off-by: Al Viro commit cf4febc1adc8e5cd11ca3386e1e3ea356e0792f0 Author: Al Viro Date: Sun May 16 20:19:06 2021 -0400 d_path: prepend_path() is unlikely to return non-zero Signed-off-by: Al Viro commit 008673ff74a513ac2c282db8825b6118151ee660 Author: Al Viro Date: Wed May 12 16:38:11 2021 -0400 d_path: prepend_path(): lift the inner loop into a new helper ... and leave the rename_lock/mount_lock handling in prepend_path() itself Signed-off-by: Al Viro commit 2dac0ad17598d1e54a264ed9286fa7bdbd75a97b Author: Al Viro Date: Wed May 12 16:21:43 2021 -0400 d_path: prepend_path(): lift resetting b in case when we'd return 3 out of loop preparation to extracting the loop into helper (next commit) Signed-off-by: Al Viro commit 7c0d552fd5aa3527ed01290832ebbe072fa5de52 Author: Al Viro Date: Wed May 12 16:24:12 2021 -0400 d_path: prepend_path(): get rid of vfsmnt it's kept equal to &mnt->mnt all along. Signed-off-by: Al Viro commit ad08ae586586ea9e2c0228a3d5a083500ea54202 Author: Al Viro Date: Wed May 12 14:51:03 2021 -0400 d_path: introduce struct prepend_buffer We've a lot of places where we have pairs of form (pointer to end of buffer, amount of space left in front of that). These sit in pairs of variables located next to each other and usually passed by reference. Turn those into instances of new type (struct prepend_buffer) and pass reference to the pair instead of pairs of references to its fields. Declared and initialized by DECLARE_BUFFER(name, buf, buflen). extract_string(prepend_buffer) returns the buffer contents if no overflow has happened, ERR_PTR(ENAMETOOLONG) otherwise. All places where we used to have that boilerplate converted to use of that helper. Signed-off-by: Al Viro commit 95b55c42f65af3fb9e2dceaf4d8dde522c0472d3 Author: Al Viro Date: Mon May 17 22:41:11 2021 -0400 d_path: make prepend_name() boolean It returns only 0 or -ENAMETOOLONG and both callers only check if the result is negative. Might as well return true on success and false on failure... Signed-off-by: Al Viro commit 01a4428ee7068875995ee27e9ba5503874f23e3b Author: Al Viro Date: Mon May 17 22:29:03 2021 -0400 d_path: lift -ENAMETOOLONG handling into callers of prepend_path() The only negative value ever returned by prepend_path() is -ENAMETOOLONG and callers can recognize that situation (overflow) by looking at the sign of buflen. Lift that into the callers; we already have the same logics (buf if buflen is non-negative, ERR_PTR(-ENAMETOOLONG) otherwise) in several places and that'll become a new primitive several commits down the road. Make prepend_path() return 0 instead of -ENAMETOOLONG. That makes for saner calling conventions (0/1/2/3/-ENAMETOOLONG is obnoxious) and callers actually get simpler, especially once the aforementioned primitive gets added. In prepend_path() itself we switch prepending the / (in case of empty path) to use of prepend() - no need to open-code that, compiler will do the right thing. It's exactly the same logics as in __dentry_path(). Signed-off-by: Al Viro commit d8548232ea2858d1d130f3ac835185159d367caa Author: Al Viro Date: Mon May 17 22:05:23 2021 -0400 d_path: don't bother with return value of prepend() Only simple_dname() checks it, and there we can simply do those calls and check for overflow (by looking of negative buflen) in the end. Signed-off-by: Al Viro commit a0378fb9b33308fb4547f098c6281af8ab4b5fb5 Author: Al Viro Date: Mon May 17 21:56:38 2021 -0400 getcwd(2): saner logics around prepend_path() call The only negative value that might get returned by prepend_path() is -ENAMETOOLONG, and that happens only on overflow. The same goes for prepend_unreachable(). Overflow is detectable by observing negative buflen, so we can simplify the control flow around the prepend_path() call. Expand prepend_unreachable(), while we are at it - that's the only caller. Signed-off-by: Al Viro commit 9024348f539f810e83695df486443f45362e947a Author: Al Viro Date: Mon May 17 21:43:01 2021 -0400 d_path: get rid of path_with_deleted() expand in the sole caller; transform the initial prepends similar to what we'd done in dentry_path() (prepend_path() will fail the right way if we call it with negative buflen, same as __dentry_path() does). Signed-off-by: Al Viro commit 3acca043261fa6268961d152ea2505e217eabcba Author: Al Viro Date: Mon May 17 21:19:35 2021 -0400 d_path: regularize handling of root dentry in __dentry_path() All path-forming primitives boil down to sequence of prepend_name() on dentries encountered along the way toward root. Each time we prepend / + dentry name to the buffer. Normally that does exactly what we want, but there's a corner case when we don't call prepend_name() at all (in case of __dentry_path() that happens if we are given root dentry). We obviously want to end up with "/", rather than "", so this corner case needs to be handled. __dentry_path() used to manually put '/' in the end of buffer before doing anything else, to be overwritten by the first call of prepend_name() if one happens and to be left in place if we don't call prepend_name() at all. That required manually checking that we had space in the buffer (prepend_name() and prepend() take care of such checks themselves) and lead to clumsy keeping track of return value. A better approach is to check if the main loop has added anything into the buffer and prepend "/" if it hasn't. A side benefit of using prepend() is that it does the right thing if we'd already run out of buffer, making the overflow-handling logics simpler. Signed-off-by: Al Viro commit ac5f8197d15cf37d7ae37ff5b6438abe6c8509a6 Author: Rafał Miłecki Date: Wed Apr 21 20:20:41 2021 +0200 dt-bindings: pinctrl: convert Broadcom Northstar to the json-schema Important: this change converts the binding as it is. It includes dependency on undocumented CRU that must be refactored. CRU must get documented and offset property has to be reworked. Above can (and will be) be handled once every CRU MFD subdevice gets documented properly (including the pinmux). Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210421182041.22636-1-zajec5@gmail.com Signed-off-by: Linus Walleij commit 3a3ca7265316cc8eafaad1c50804a70a08ad2ef6 Merge: d07f6ca923ea0 6607952288360 Author: Dave Airlie Date: Wed May 19 09:20:49 2021 +1000 Merge tag 'drm-misc-next-2021-05-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.14: UAPI Changes: * drm: Disable connector force-probing for non-master clients * drm: Enforce consistency between IN_FORMATS property and cap + related driver cleanups * drm/amdgpu: Track devices, process info and fence info via /proc//fdinfo * drm/ioctl: Mark AGP-related ioctls as legacy * drm/ttm: Provide tt_shrink file to trigger shrinker via debugfs; Cross-subsystem Changes: * fbdev/efifb: Special handling of non-PCI devices * fbdev/imxfb: Fix error message Core Changes: * drm: Add connector helper to attach HDR-metadata property and convert drivers * drm: Add connector helper to compare HDR-metadata and convert drivers * drm: Add conenctor helper to attach colorspace property * drm: Signal colorimetry in HDMI infoframe * drm: Support pitch for destination buffers; Add blitter function with generic format conversion * drm: Remove struct drm_device.pdev and update legacy drivers * drm: Remove obsolete DRM_KMS_FB_HELPER config option in core and drivers * drm: Remove obsolete drm_pci_alloc/drm_pci_free * drm/aperture: Add helpers for aperture ownership and convert drivers, replaces rsp fbdev helpers * drm/agp: Mark DRM AGP code as legacy and convert legacy drivers * drm/atomic-helpers: Cleanups * drm/dp: Handle downstream port counts of 0 correctly; AUX channel fixes; Use drm_err_*/drm_dbg_*(); Cleanups * drm/dp_dual_mode: Use drm_err_*/drm_dbg_*() * drm/dp_mst: Use drm_err_*/drm_dbg_*(); Use Extended Base Receiver Capability DPCD space * drm/gem-ttm-helper: Provide helper for dumb_map_offset and convert drivers * drm/panel: Use sysfs_emit; panel-simple: Use runtime PM, Power up panel when reading EDID, Cache EDID, Cleanups; Lms397KF04: DT bindings * drm/pci: Mark AGP helpers as legacy * drm/print: Handle NULL for DRM devices gracefully * drm/scheduler: Change scheduled fence track * drm/ttm: Don't count SG BOs against pages_limit; Warn about freeing pinned BOs; Fix error handling if no BO can be swapped out; Move special handling of non-GEM drivers into vmwgfx; Move page_alignment into the BO; Set drm-misc as TTM tree in MAINTAINERS; Cleanup ttm_agp_backend; Add ttm_sys_manager for system domain; Cleanups Driver Changes: * drm: Don't set allow_fb_modifiers explictly in drivers * drm/amdgpu: Pin/unpin fixes wrt to TTM; Use bo->base.size instead of mem->num_pages * drm/ast: Use managed pcim_iomap(); Fix EDID retrieval with DP501 * drm/bridge: MHDP8546: HDCP support + DT bindings, Register DP AUX channel with userspace; Sil8620: Fix module dependencies; dw-hdmi: Add option to not load CEC driver; Fix stopping in drm_bridge_chain_pre_enable(); Ti-sn65dsi86: Fix refclk handling, Break GPIO and MIPI-to-eDP into subdrivers, Use pm_runtime autosuspend, cleanups; It66121: Add driver + DT bindings; Adv7511: Support I2S IEC958 encoding; Anx7625: fix power-on delay; Nwi-dsi: Modesetting fixes; Cleanups * drm/bochs: Support screen blanking * drm/gma500: Cleanups * drm/gud: Cleanups * drm/i915: Use correct max source link rate for MST * drm/kmb: Cleanups * drm/meson: Disable dw-hdmi CEC driver * drm/nouveau: Pin/unpin fixes wrt to TTM; Use bo->base.size instead of mem->num_pages; Register AUX adapters after their connectors * drm/qxl: Fix shadow BO unpin * drm/radeon: Duplicate some DRM AGP code to uncouple from legacy drivers * drm/simpledrm: Add a generic DRM driver for simple-framebuffer devices * drm/tiny: Fix log spam if probe function gets deferred * drm/vc4: Add support for HDR-metadata property; Cleanups * drm/virtio: Create dumb BOs as guest blobs; * drm/vkms: Use managed drmm_universal_plane_alloc(); Add XRGB plane composition; Add overlay support * drm/vmwgfx: Enable console with DRM_FBDEV_EMULATION; Fix CPU updates of coherent multisample surfaces; Remove reservation semaphore; Add initial SVGA3 support; Support amd64; Use 1-based IDR; Use min_t(); Cleanups Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YJvkD523evviED01@linux-uq9g.fritz.box commit 1a532eb28df3e45ae2d403d66c0e98295688ae10 Author: Alexei Starovoitov Date: Thu May 13 17:36:23 2021 -0700 selftests/bpf: Convert test trace_printk to lskel. Convert test trace_printk to light skeleton to check rodata support in lskel. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-22-alexei.starovoitov@gmail.com commit eb0f1e0c7f103e262308d3f12a27a8331af3011a Author: Alexei Starovoitov Date: Thu May 13 17:36:22 2021 -0700 selftests/bpf: Convert test printk to use rodata. Convert test trace_printk to more aggressively validate and use rodata. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-21-alexei.starovoitov@gmail.com commit 0a9306629983d0be384d4f2557c8c7e2ed086164 Author: Alexei Starovoitov Date: Thu May 13 17:36:21 2021 -0700 selftests/bpf: Convert atomics test to light skeleton. Convert prog_tests/atomics.c to lskel.h Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-20-alexei.starovoitov@gmail.com commit 4d1b62986125b6de596c98310543652a7892e097 Author: Alexei Starovoitov Date: Thu May 13 17:36:20 2021 -0700 selftests/bpf: Convert few tests to light skeleton. Convert few tests that don't use CO-RE to light skeleton. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-19-alexei.starovoitov@gmail.com commit d510296d331accd4afaa13498220c93ae690628a Author: Alexei Starovoitov Date: Thu May 13 17:36:19 2021 -0700 bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command. Add -L flag to bpftool to use libbpf gen_trace facility and syscall/loader program for skeleton generation and program loading. "bpftool gen skeleton -L" command will generate a "light skeleton" or "loader skeleton" that is similar to existing skeleton, but has one major difference: $ bpftool gen skeleton lsm.o > lsm.skel.h $ bpftool gen skeleton -L lsm.o > lsm.lskel.h $ diff lsm.skel.h lsm.lskel.h @@ -5,34 +4,34 @@ #define __LSM_SKEL_H__ #include -#include +#include The light skeleton does not use majority of libbpf infrastructure. It doesn't need libelf. It doesn't parse .o file. It only needs few sys_bpf wrappers. All of them are in bpf/bpf.h file. In future libbpf/bpf.c can be inlined into bpf.h, so not even libbpf.a would be needed to work with light skeleton. "bpftool prog load -L file.o" command is introduced for debugging of syscall/loader program generation. Just like the same command without -L it will try to load the programs from file.o into the kernel. It won't even try to pin them. "bpftool prog load -L -d file.o" command will provide additional debug messages on how syscall/loader program was generated. Also the execution of syscall/loader program will use bpf_trace_printk() for each step of loading BTF, creating maps, and loading programs. The user can do "cat /.../trace_pipe" for further debug. An example of fexit_sleep.lskel.h generated from progs/fexit_sleep.c: struct fexit_sleep { struct bpf_loader_ctx ctx; struct { struct bpf_map_desc bss; } maps; struct { struct bpf_prog_desc nanosleep_fentry; struct bpf_prog_desc nanosleep_fexit; } progs; struct { int nanosleep_fentry_fd; int nanosleep_fexit_fd; } links; struct fexit_sleep__bss { int pid; int fentry_cnt; int fexit_cnt; } *bss; }; Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-18-alexei.starovoitov@gmail.com commit 7723256bf2443d6bd7db3e583953d14107955233 Author: Alexei Starovoitov Date: Thu May 13 17:36:18 2021 -0700 libbpf: Introduce bpf_map__initial_value(). Introduce bpf_map__initial_value() to read initial contents of mmaped data/rodata/bss maps. Note that bpf_map__set_initial_value() doesn't allow modifying kconfig map while bpf_map__initial_value() allows reading its values. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-17-alexei.starovoitov@gmail.com commit 30f51aedabda92b74927979b2b3b50169e285f6b Author: Alexei Starovoitov Date: Thu May 13 17:36:17 2021 -0700 libbpf: Cleanup temp FDs when intermediate sys_bpf fails. Fix loader program to close temporary FDs when intermediate sys_bpf command fails. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-16-alexei.starovoitov@gmail.com commit 67234743736a6ac31e3e74f6ec5e6d7bb3073676 Author: Alexei Starovoitov Date: Thu May 13 17:36:16 2021 -0700 libbpf: Generate loader program out of BPF ELF file. The BPF program loading process performed by libbpf is quite complex and consists of the following steps: "open" phase: - parse elf file and remember relocations, sections - collect externs and ksyms including their btf_ids in prog's BTF - patch BTF datasec (since llvm couldn't do it) - init maps (old style map_def, BTF based, global data map, kconfig map) - collect relocations against progs and maps "load" phase: - probe kernel features - load vmlinux BTF - resolve externs (kconfig and ksym) - load program BTF - init struct_ops - create maps - apply CO-RE relocations - patch ld_imm64 insns with src_reg=PSEUDO_MAP, PSEUDO_MAP_VALUE, PSEUDO_BTF_ID - reposition subprograms and adjust call insns - sanitize and load progs During this process libbpf does sys_bpf() calls to load BTF, create maps, populate maps and finally load programs. Instead of actually doing the syscalls generate a trace of what libbpf would have done and represent it as the "loader program". The "loader program" consists of single map with: - union bpf_attr(s) - BTF bytes - map value bytes - insns bytes and single bpf program that passes bpf_attr(s) and data into bpf_sys_bpf() helper. Executing such "loader program" via bpf_prog_test_run() command will replay the sequence of syscalls that libbpf would have done which will result the same maps created and programs loaded as specified in the elf file. The "loader program" removes libelf and majority of libbpf dependency from program loading process. kconfig, typeless ksym, struct_ops and CO-RE are not supported yet. The order of relocate_data and relocate_calls had to change, so that bpf_gen__prog_load() can see all relocations for a given program with correct insn_idx-es. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-15-alexei.starovoitov@gmail.com commit e2fa0156a434c140998aa16ecad329e4bc19f263 Author: Alexei Starovoitov Date: Thu May 13 17:36:15 2021 -0700 libbpf: Preliminary support for fd_idx Prep libbpf to use FD_IDX kernel feature when generating loader program. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-14-alexei.starovoitov@gmail.com commit 9ca1f56ababea5f5c714074845ee1c9e4dd75956 Author: Alexei Starovoitov Date: Thu May 13 17:36:14 2021 -0700 libbpf: Add bpf_object pointer to kernel_supports(). Add a pointer to 'struct bpf_object' to kernel_supports() helper. It will be used in the next patch. No functional changes. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-13-alexei.starovoitov@gmail.com commit b12688267280b223256c8cf912486577d3adce25 Author: Alexei Starovoitov Date: Thu May 13 17:36:13 2021 -0700 libbpf: Change the order of data and text relocations. In order to be able to generate loader program in the later patches change the order of data and text relocations. Also improve the test to include data relos. If the kernel supports "FD array" the map_fd relocations can be processed before text relos since generated loader program won't need to manually patch ld_imm64 insns with map_fd. But ksym and kfunc relocations can only be processed after all calls are relocated, since loader program will consist of a sequence of calls to bpf_btf_find_by_name_kind() followed by patching of btf_id and btf_obj_fd into corresponding ld_imm64 insns. The locations of those ld_imm64 insns are specified in relocations. Hence process all data relocations (maps, ksym, kfunc) together after call relos. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-12-alexei.starovoitov@gmail.com commit 3abea089246f76c1517b054ddb5946f3f1dbd2c0 Author: Alexei Starovoitov Date: Thu May 13 17:36:12 2021 -0700 bpf: Add bpf_sys_close() helper. Add bpf_sys_close() helper to be used by the syscall/loader program to close intermediate FDs and other cleanup. Note this helper must never be allowed inside fdget/fdput bracketing. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-11-alexei.starovoitov@gmail.com commit 3d78417b60fba249cc555468cb72d96f5cde2964 Author: Alexei Starovoitov Date: Thu May 13 17:36:11 2021 -0700 bpf: Add bpf_btf_find_by_name_kind() helper. Add new helper: long bpf_btf_find_by_name_kind(char *name, int name_sz, u32 kind, int flags) Description Find BTF type with given name and kind in vmlinux BTF or in module's BTFs. Return Returns btf_id and btf_obj_fd in lower and upper 32 bits. It will be used by loader program to find btf_id to attach the program to and to find btf_ids of ksyms. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-10-alexei.starovoitov@gmail.com commit 387544bfa291a22383d60b40f887360e2b931ec6 Author: Alexei Starovoitov Date: Thu May 13 17:36:10 2021 -0700 bpf: Introduce fd_idx Typical program loading sequence involves creating bpf maps and applying map FDs into bpf instructions in various places in the bpf program. This job is done by libbpf that is using compiler generated ELF relocations to patch certain instruction after maps are created and BTFs are loaded. The goal of fd_idx is to allow bpf instructions to stay immutable after compilation. At load time the libbpf would still create maps as usual, but it wouldn't need to patch instructions. It would store map_fds into __u32 fd_array[] and would pass that pointer to sys_bpf(BPF_PROG_LOAD). Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-9-alexei.starovoitov@gmail.com commit 2341d6bb133d44caeba9fbdc851f8624739a84a2 Author: Alexei Starovoitov Date: Thu May 13 17:36:09 2021 -0700 selftests/bpf: Test for btf_load command. Improve selftest to check that btf_load is working from bpf program. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-8-alexei.starovoitov@gmail.com commit c571bd752e91602f092823b2f1ee685a74d2726c Author: Alexei Starovoitov Date: Thu May 13 17:36:08 2021 -0700 bpf: Make btf_load command to be bpfptr_t compatible. Similar to prog_load make btf_load command to be availble to bpf_prog_type_syscall program. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-7-alexei.starovoitov@gmail.com commit 00899e7e8d9d30142ccff4cebd80effca58396b7 Author: Alexei Starovoitov Date: Thu May 13 17:36:07 2021 -0700 selftests/bpf: Test for syscall program type bpf_prog_type_syscall is a program that creates a bpf map, updates it, and loads another bpf program using bpf_sys_bpf() helper. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-6-alexei.starovoitov@gmail.com commit 5452fc9a17fc26816a683ab04cf1c29131ca27e4 Author: Alexei Starovoitov Date: Thu May 13 17:36:06 2021 -0700 libbpf: Support for syscall program type Trivial support for syscall program type. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-5-alexei.starovoitov@gmail.com commit af2ac3e13e45752af03c8a933f9b6e18841b128b Author: Alexei Starovoitov Date: Thu May 13 17:36:05 2021 -0700 bpf: Prepare bpf syscall to be used from kernel and user space. With the help from bpfptr_t prepare relevant bpf syscall commands to be used from kernel and user space. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-4-alexei.starovoitov@gmail.com commit cdf7fb0a9f3d36b279590ac41e61c6b655db0d4a Author: Alexei Starovoitov Date: Thu May 13 17:36:04 2021 -0700 bpf: Introduce bpfptr_t user/kernel pointer. Similar to sockptr_t introduce bpfptr_t with few additions: make_bpfptr() creates new user/kernel pointer in the same address space as existing user/kernel pointer. bpfptr_add() advances the user/kernel pointer. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-3-alexei.starovoitov@gmail.com commit 79a7f8bdb159d9914b58740f3d31d602a6e4aca8 Author: Alexei Starovoitov Date: Thu May 13 17:36:03 2021 -0700 bpf: Introduce bpf_sys_bpf() helper and program type. Add placeholders for bpf_sys_bpf() helper and new program type. Make sure to check that expected_attach_type is zero for future extensibility. Allow tracing helper functions to be used in this program type, since they will only execute from user context via bpf_prog_test_run. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210514003623.28033-2-alexei.starovoitov@gmail.com commit 7d6c9ee5e0eff464771678b32867d5244b84920a Author: Corentin Labbe Date: Tue May 18 18:53:53 2021 +0000 ARM: dts: gemini: convert obsolete SPI properties gpio-xxx are obsoletes properties, convert them to xxx-gpios. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 2d3a62fbae8e5badc2342388f65ab2191c209cc0 Author: Sergey Shtylyov Date: Mon Mar 15 14:46:53 2021 +0300 pata_rb532_cf: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENOENT, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Switch to propagating the error code upstream, still checking/overriding IRQ0 as libata regards it as "no IRQ" (thus polling) anyway... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/771ced55-3efb-21f5-f21c-b99920aae611@omprussia.ru Signed-off-by: Jens Axboe commit 4a24efa16e7db02306fb5db84518bb0a7ada5a46 Author: Sergey Shtylyov Date: Sun Mar 14 23:34:27 2021 +0300 sata_highbank: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Switch to propagating the error code upstream, still checking/overriding IRQ0 as libata regards it as "no IRQ" (thus polling) anyway... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/105b456d-1199-f6e9-ceb7-ffc5ba551d1a@omprussia.ru Signed-off-by: Jens Axboe commit 86544c3de6a2185409c5a3d02f674ea223a14217 Author: Vladimir Oltean Date: Tue May 18 20:49:24 2021 +0300 net: mdio: provide shim implementation of devm_of_mdiobus_register Similar to the way in which of_mdiobus_register() has a fallback to the non-DT based mdiobus_register() when CONFIG_OF is not set, we can create a shim for the device-managed devm_of_mdiobus_register() which calls devm_mdiobus_register() and discards the struct device_node *. In particular, this solves a build issue with the qca8k DSA driver which uses devm_of_mdiobus_register and can be compiled without CONFIG_OF. Reported-by: Randy Dunlap Signed-off-by: Vladimir Oltean Acked-by: Randy Dunlap # build-tested Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e2bd6bad9c1e976674de7d714a5c1567281a0843 Author: Yang Yingliang Date: Tue May 18 21:03:58 2021 +0800 net: dcb: Remove unnecessary INIT_LIST_HEAD() The list_head dcb_app_list is initialized statically. It is unnecessary to initialize by INIT_LIST_HEAD(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 44e261c715b6ca0ebe79d7b43afdb2382e1ca92b Author: Yang Yingliang Date: Tue May 18 21:01:35 2021 +0800 cxgb4: clip_tbl: use list_del_init instead of list_del/INIT_LIST_HEAD Using list_del_init() instead of list_del() + INIT_LIST_HEAD() to simpify the code. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 46212b69d4705c122b61bd4315896b905bcbb7d7 Merge: 0d56e5c191b19 a3f3e831dc2a5 Author: David S. Miller Date: Tue May 18 13:42:42 2021 -0700 Merge branch 'wan-cleanups' Guangbin Huang says: ==================== net: wan: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit a3f3e831dc2a5bf1b34c31be38b74bc7e38a2de7 Author: Peng Li Date: Tue May 18 20:29:54 2021 +0800 net: wan: fix variable definition style Fix the checkpatch error: "foo* bar" should be "foo *bar". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit da8e6fddbae36e2cedd7802949d9c92e9fbf13a0 Author: Peng Li Date: Tue May 18 20:29:53 2021 +0800 net: wan: remove redundant space Space prohibited before that close parenthesis ')', so removes the redundant space. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit a4e5914776113192f88b230e9e3503c4bf296567 Author: Peng Li Date: Tue May 18 20:29:52 2021 +0800 net: wan: remove redundant braces {} Braces {} are not necessary for single statement blocks, this patch removes redundant braces {}. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 23c235412411dd6f4d6069a882cb8e09e0d47f7d Author: Peng Li Date: Tue May 18 20:29:51 2021 +0800 net: wan: add some required spaces Add space required before the open parenthesis '(', and add spaces required around that '<', '>' and '!='. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 78524c01edb24022098b4f3b49d6f74e1b3f4aa6 Author: Peng Li Date: Tue May 18 20:29:50 2021 +0800 net: wan: remove redundant blank lines This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 0d56e5c191b197e1d30a0a4c92628836dafced0f Author: Wei Yongjun Date: Tue May 18 11:24:13 2021 +0000 net: dsa: qca8k: fix missing unlock on error in qca8k_vlan_(add|del) Add the missing unlock before return from function qca8k_vlan_add() and qca8k_vlan_del() in the error handling case. Fixes: 028f5f8ef44f ("net: dsa: qca8k: handle error with qca8k_read operation") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4ac9e23cf2ccdad99dbc57d7d1bf264d53d23057 Author: Zheng Yejian Date: Tue May 18 17:11:41 2021 +0800 cipso: correct comments of cipso_v4_cache_invalidate() Since cipso_v4_cache_invalidate() has no return value, so drop related descriptions in its comments. Fixes: 446fda4f2682 ("[NetLabel]: CIPSOv4 engine") Signed-off-by: Zheng Yejian Acked-by: Paul Moore Signed-off-by: David S. Miller commit 22ba9d0d6c0d6fb399dbbedd475c500b65f2fc31 Merge: 06b38e233ce47 b7715acba4d3d Author: David S. Miller Date: Tue May 18 13:27:32 2021 -0700 Merge branch 'custom-multipath-hash' Ido Schimmel says: ==================== Add support for custom multipath hash This patchset adds support for custom multipath hash policy for both IPv4 and IPv6 traffic. The new policy allows user space to control the outer and inner packet fields used for the hash computation. Motivation ========== Linux currently supports different multipath hash policies for IPv4 and IPv6 traffic: * Layer 3 * Layer 4 * Layer 3 or inner layer 3, if present These policies hash on a fixed set of fields, which is inflexible and against operators' requirements to control the hash input: "The ability to control the inputs to the hash function should be a consideration in any load-balancing RFP" [1]. An example of this inflexibility can be seen by the fact that none of the current policies allows operators to use the standard 5-tuple and the flow label for multipath hash computation. Such a policy is useful in the following real-world example of a data center with the following types of traffic: * Anycast IPv6 TCP traffic towards layer 4 load balancers. Flow label is constant (zero) to avoid breaking established connections * Non-encapsulated IPv6 traffic. Flow label is used to re-route flows around problematic (congested / failed) paths [2] * IPv6 encapsulated traffic (IPv4-in-IPv6 or IPv6-in-IPv6). Outer flow label is generated from encapsulated packet * UDP encapsulated traffic. Outer source port is generated from encapsulated packet In the above example, using the inner flow information for hash computation in addition to the outer flow information is useful during failures of the BPF agent that selectively generates the flow label based on the traffic type. In such cases, the self-healing properties of the flow label are lost, but encapsulated flows are still load balanced. Control over the inner fields is even more critical when encapsulation is performed by hardware routers. For example, the Spectrum ASIC can only encode 8 bits of entropy in the outer flow label / outer UDP source port when performing IP / UDP encapsulation. In the case of IPv4 GRE encapsulation there is no outer field to encode the inner hash in. User interface ============== In accordance with existing multipath hash configuration, the new custom policy is added as a new option (3) to the net.ipv{4,6}.fib_multipath_hash_policy sysctls. When the new policy is used, the packet fields used for hash computation are determined by the net.ipv{4,6}.fib_multipath_hash_fields sysctls. These sysctls accept a bitmask according to the following table (from ip-sysctl.rst): ====== ============================ 0x0001 Source IP address 0x0002 Destination IP address 0x0004 IP protocol 0x0008 Flow Label 0x0010 Source port 0x0020 Destination port 0x0040 Inner source IP address 0x0080 Inner destination IP address 0x0100 Inner IP protocol 0x0200 Inner Flow Label 0x0400 Inner source port 0x0800 Inner destination port ====== ============================ For example, to allow IPv6 traffic to be hashed based on standard 5-tuple and flow label: # sysctl -wq net.ipv6.fib_multipath_hash_fields=0x0037 # sysctl -wq net.ipv6.fib_multipath_hash_policy=3 Implementation ============== As with existing policies, the new policy relies on the flow dissector to extract the packet fields for the hash computation. However, unlike existing policies that either use the outer or inner flow, the new policy might require both flows to be dissected. To avoid unnecessary invocations of the flow dissector, the data path skips dissection of the outer or inner flows if none of the outer or inner fields are required. In addition, inner flow dissection is not performed when no encapsulation was encountered (i.e., 'FLOW_DIS_ENCAPSULATION' not set by flow dissector) during dissection of the outer flow. Testing ======= Three new selftests are added with three different topologies that allow testing of following traffic combinations: * Non-encapsulated IPv4 / IPv6 traffic * IPv4 / IPv6 overlay over IPv4 underlay * IPv4 / IPv6 overlay over IPv6 underlay All three tests follow the same pattern. Each time a different packet field is used for hash computation. When the field changes in the packet stream, traffic is expected to be balanced across the two paths. When the field does not change, traffic is expected to be unbalanced across the two paths. Patchset overview ================= Patches #1-#3 add custom multipath hash support for IPv4 traffic Patches #4-#7 do the same for IPv6 Patches #8-#10 add selftests Future work =========== mlxsw support can be found here [3]. Changes since RFC v2 [4]: * Patch #2: Document that 0x0008 is used for Flow Label * Patch #2: Do not allow the bitmask to be zero * Patch #6: Do not allow the bitmask to be zero Changes since RFC v1 [5]: * Use a bitmask instead of a bitmap [1] https://blog.apnic.net/2018/01/11/ipv6-flow-label-misuse-hashing/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3acf3ec3f4b0fd4263989f2e4227bbd1c42b5fe1 [3] https://github.com/idosch/linux/tree/submit/custom_hash_mlxsw_v2 [4] https://lore.kernel.org/netdev/20210509151615.200608-1-idosch@idosch.org/ [5] https://lore.kernel.org/netdev/20210502162257.3472453-1-idosch@idosch.org/ ==================== Signed-off-by: David S. Miller commit b7715acba4d3d6e41ce8accd808b6c7c4febec6c Author: Ido Schimmel Date: Mon May 17 21:15:26 2021 +0300 selftests: forwarding: Add test for custom multipath hash with IPv6 GRE Test that when the hash policy is set to custom, traffic is distributed only according to the inner fields set in the fib_multipath_hash_fields sysctl. Each time set a different field and make sure traffic is only distributed when the field is changed in the packet stream. The test only verifies the behavior of IPv4/IPv6 overlays on top of an IPv6 underlay network. The previous patch verified the same with an IPv4 underlay network. Example output: # ./ip6gre_custom_multipath_hash.sh TEST: ping [ OK ] TEST: ping6 [ OK ] INFO: Running IPv4 overlay custom multipath hash tests TEST: Multipath hash field: Inner source IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6602 / 6002 TEST: Multipath hash field: Inner source IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 1 / 12601 TEST: Multipath hash field: Inner destination IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6802 / 5801 TEST: Multipath hash field: Inner destination IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12602 / 3 TEST: Multipath hash field: Inner source port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16431 / 16344 TEST: Multipath hash field: Inner source port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 32773 TEST: Multipath hash field: Inner destination port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16431 / 16344 TEST: Multipath hash field: Inner destination port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 2 / 32772 INFO: Running IPv6 overlay custom multipath hash tests TEST: Multipath hash field: Inner source IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6704 / 5902 TEST: Multipath hash field: Inner source IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 1 / 12600 TEST: Multipath hash field: Inner destination IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 5751 / 6852 TEST: Multipath hash field: Inner destination IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12602 / 0 TEST: Multipath hash field: Inner flowlabel (balanced) [ OK ] INFO: Packets sent on path1 / path2: 8272 / 8181 TEST: Multipath hash field: Inner flowlabel (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 3 / 12602 TEST: Multipath hash field: Inner source port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16424 / 16351 TEST: Multipath hash field: Inner source port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 3 / 32774 TEST: Multipath hash field: Inner destination port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16425 / 16350 TEST: Multipath hash field: Inner destination port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 2 / 32773 Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: David S. Miller commit 185b0c190bb6d30292783f20b4d85e8dbe8a2687 Author: Ido Schimmel Date: Mon May 17 21:15:25 2021 +0300 selftests: forwarding: Add test for custom multipath hash with IPv4 GRE Test that when the hash policy is set to custom, traffic is distributed only according to the inner fields set in the fib_multipath_hash_fields sysctl. Each time set a different field and make sure traffic is only distributed when the field is changed in the packet stream. The test only verifies the behavior of IPv4/IPv6 overlays on top of an IPv4 underlay network. A subsequent patch will do the same with an IPv6 underlay network. Example output: # ./gre_custom_multipath_hash.sh TEST: ping [ OK ] TEST: ping6 [ OK ] INFO: Running IPv4 overlay custom multipath hash tests TEST: Multipath hash field: Inner source IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6601 / 6001 TEST: Multipath hash field: Inner source IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 12600 TEST: Multipath hash field: Inner destination IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6802 / 5802 TEST: Multipath hash field: Inner destination IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12601 / 1 TEST: Multipath hash field: Inner source port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16430 / 16344 TEST: Multipath hash field: Inner source port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 32772 TEST: Multipath hash field: Inner destination port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16430 / 16343 TEST: Multipath hash field: Inner destination port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 32772 INFO: Running IPv6 overlay custom multipath hash tests TEST: Multipath hash field: Inner source IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6702 / 5900 TEST: Multipath hash field: Inner source IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 12601 TEST: Multipath hash field: Inner destination IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 5751 / 6851 TEST: Multipath hash field: Inner destination IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12602 / 1 TEST: Multipath hash field: Inner flowlabel (balanced) [ OK ] INFO: Packets sent on path1 / path2: 8364 / 8065 TEST: Multipath hash field: Inner flowlabel (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12601 / 0 TEST: Multipath hash field: Inner source port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16425 / 16349 TEST: Multipath hash field: Inner source port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 1 / 32770 TEST: Multipath hash field: Inner destination port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16425 / 16349 TEST: Multipath hash field: Inner destination port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 2 / 32770 Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: David S. Miller commit 511e8db54036c775b84c349167cea2c4cfd24e24 Author: Ido Schimmel Date: Mon May 17 21:15:24 2021 +0300 selftests: forwarding: Add test for custom multipath hash Test that when the hash policy is set to custom, traffic is distributed only according to the outer fields set in the fib_multipath_hash_fields sysctl. Each time set a different field and make sure traffic is only distributed when the field is changed in the packet stream. The test only verifies the behavior with non-encapsulated IPv4 and IPv6 packets. Subsequent patches will add tests for IPv4/IPv6 overlays on top of IPv4/IPv6 underlay networks. Example output: # ./custom_multipath_hash.sh TEST: ping [ OK ] TEST: ping6 [ OK ] INFO: Running IPv4 custom multipath hash tests TEST: Multipath hash field: Source IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6353 / 6254 TEST: Multipath hash field: Source IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 12600 TEST: Multipath hash field: Destination IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6102 / 6502 TEST: Multipath hash field: Destination IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 1 / 12601 TEST: Multipath hash field: Source port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16428 / 16345 TEST: Multipath hash field: Source port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 32770 / 2 TEST: Multipath hash field: Destination port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16428 / 16345 TEST: Multipath hash field: Destination port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 32770 / 2 INFO: Running IPv6 custom multipath hash tests TEST: Multipath hash field: Source IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 6704 / 5903 TEST: Multipath hash field: Source IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12600 / 0 TEST: Multipath hash field: Destination IP (balanced) [ OK ] INFO: Packets sent on path1 / path2: 5551 / 7052 TEST: Multipath hash field: Destination IP (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 12603 / 0 TEST: Multipath hash field: Flowlabel (balanced) [ OK ] INFO: Packets sent on path1 / path2: 8378 / 8080 TEST: Multipath hash field: Flowlabel (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 2 / 12603 TEST: Multipath hash field: Source port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16385 / 16388 TEST: Multipath hash field: Source port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 0 / 32774 TEST: Multipath hash field: Destination port (balanced) [ OK ] INFO: Packets sent on path1 / path2: 16386 / 16390 TEST: Multipath hash field: Destination port (unbalanced) [ OK ] INFO: Packets sent on path1 / path2: 32771 / 2 Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 73c2c5cbb15a8a82d5bea52594b0beb038963bcc Author: Ido Schimmel Date: Mon May 17 21:15:23 2021 +0300 ipv6: Add custom multipath hash policy Add a new multipath hash policy where the packet fields used for hash calculation are determined by user space via the fib_multipath_hash_fields sysctl that was introduced in the previous patch. The current set of available packet fields includes both outer and inner fields, which requires two invocations of the flow dissector. Avoid unnecessary dissection of the outer or inner flows by skipping dissection if none of the outer or inner fields are required. In accordance with the existing policies, when an skb is not available, packet fields are extracted from the provided flow key. In which case, only outer fields are considered. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ed13923f980ef84dde0b9010b9e09052dc31a909 Author: Ido Schimmel Date: Mon May 17 21:15:22 2021 +0300 ipv6: Add a sysctl to control multipath hash fields A subsequent patch will add a new multipath hash policy where the packet fields used for multipath hash calculation are determined by user space. This patch adds a sysctl that allows user space to set these fields. The packet fields are represented using a bitmask and are common between IPv4 and IPv6 to allow user space to use the same numbering across both protocols. For example, to hash based on standard 5-tuple: # sysctl -w net.ipv6.fib_multipath_hash_fields=0x0037 net.ipv6.fib_multipath_hash_fields = 0x0037 To avoid introducing holes in 'struct netns_sysctl_ipv6', move the 'bindv6only' field after the multipath hash fields. The kernel rejects unknown fields, for example: # sysctl -w net.ipv6.fib_multipath_hash_fields=0x1000 sysctl: setting key "net.ipv6.fib_multipath_hash_fields": Invalid argument Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b95b6e072a92042320fad99de658008cc0beb3b0 Author: Ido Schimmel Date: Mon May 17 21:15:21 2021 +0300 ipv6: Calculate multipath hash inside switch statement A subsequent patch will add another multipath hash policy where the multipath hash is calculated directly by the policy specific code and not outside of the switch statement. Prepare for this change by moving the multipath hash calculation inside the switch statement. No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 67db5ca73b1f98584ae9b6ed35c1c670677c9001 Author: Ido Schimmel Date: Mon May 17 21:15:20 2021 +0300 ipv6: Use a more suitable label name The 'out_timer' label was added in commit 63152fc0de4d ("[NETNS][IPV6] ip6_fib - gc timer per namespace") when the timer was allocated on the heap. Commit 417f28bb3407 ("netns: dont alloc ipv6 fib timer list") removed the allocation, but kept the label name. Rename it to a more suitable name. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4253b4986f98da4bfcb6a24d3fc6ff19f28e8420 Author: Ido Schimmel Date: Mon May 17 21:15:19 2021 +0300 ipv4: Add custom multipath hash policy Add a new multipath hash policy where the packet fields used for hash calculation are determined by user space via the fib_multipath_hash_fields sysctl that was introduced in the previous patch. The current set of available packet fields includes both outer and inner fields, which requires two invocations of the flow dissector. Avoid unnecessary dissection of the outer or inner flows by skipping dissection if none of the outer or inner fields are required. In accordance with the existing policies, when an skb is not available, packet fields are extracted from the provided flow key. In which case, only outer fields are considered. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ce5c9c20d364f156c885efed8c71fca2945db00f Author: Ido Schimmel Date: Mon May 17 21:15:18 2021 +0300 ipv4: Add a sysctl to control multipath hash fields A subsequent patch will add a new multipath hash policy where the packet fields used for multipath hash calculation are determined by user space. This patch adds a sysctl that allows user space to set these fields. The packet fields are represented using a bitmask and are common between IPv4 and IPv6 to allow user space to use the same numbering across both protocols. For example, to hash based on standard 5-tuple: # sysctl -w net.ipv4.fib_multipath_hash_fields=0x0037 net.ipv4.fib_multipath_hash_fields = 0x0037 The kernel rejects unknown fields, for example: # sysctl -w net.ipv4.fib_multipath_hash_fields=0x1000 sysctl: setting key "net.ipv4.fib_multipath_hash_fields": Invalid argument More fields can be added in the future, if needed. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 2e68ea92684181412b73979baf1af7d04619c52c Author: Ido Schimmel Date: Mon May 17 21:15:17 2021 +0300 ipv4: Calculate multipath hash inside switch statement A subsequent patch will add another multipath hash policy where the multipath hash is calculated directly by the policy specific code and not outside of the switch statement. Prepare for this change by moving the multipath hash calculation inside the switch statement. No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit fa7b83bf3b156c767f3e4a25bbf3817b08f3ff8e Author: Dongseok Yi Date: Wed May 12 16:27:33 2021 +0900 bpf: Check for BPF_F_ADJ_ROOM_FIXED_GSO when bpf_skb_change_proto In the forwarding path GRO -> BPF 6 to 4 -> GSO for TCP traffic, the coalesced packet payload can be > MSS, but < MSS + 20. bpf_skb_proto_6_to_4() will upgrade the MSS and it can be > the payload length. After then tcp_gso_segment checks for the payload length if it is <= MSS. The condition is causing the packet to be dropped. tcp_gso_segment(): [...] mss = skb_shinfo(skb)->gso_size; if (unlikely(skb->len <= mss)) goto out; [...] Allow to upgrade/downgrade MSS only when BPF_F_ADJ_ROOM_FIXED_GSO is not set. Signed-off-by: Dongseok Yi Signed-off-by: Daniel Borkmann Acked-by: Willem de Bruijn Link: https://lore.kernel.org/bpf/1620804453-57566-1-git-send-email-dseok.yi@samsung.com commit ec279384c6a02cf04a96054e82b1294a7aad6577 Author: José Roberto de Souza Date: Mon May 17 13:21:17 2021 -0700 drm/i915: Initialize err in remap_io_sg() If the do while loop breaks in 'if (!sg_dma_len(sgl))' in the first iteration, err is uninitialized causing a wrong call to zap_vma_ptes(). But that is impossible to happen as a scatterlist must have at least one valid segment. Anyways to avoid more reports from static checkers initializing ret here. Fixes: b12d691ea5e0 ("i915: fix remap_io_sg to verify the pgprot") Reviewed-by: Christoph Hellwig Cc: Christoph Hellwig Signed-off-by: James Ausmus Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210517202117.179303-1-jose.souza@intel.com commit 117232c0b9126e254d84f38ccaf9e576ccfcd990 Author: Akira Yokosawa Date: Thu May 13 10:49:41 2021 -0700 kcsan: Use URL link for pointing access-marking.txt For consistency within kcsan.rst, use a URL link as the same as in section "Data Races". Acked-by: Marco Elver Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit b930226f3db870cfb683c2744aeb0d29deb4cddc Author: Marco Elver Date: Wed Apr 14 13:28:25 2021 +0200 kcsan: Document "value changed" line Update the example reports based on the latest reports generated by kcsan_test module, which now include the "value changed" line. Add a brief description of the "value changed" line. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 7bbe6dc0ade7e394ee1568dc9979fd0e3e155435 Author: Mark Rutland Date: Wed Apr 14 13:28:24 2021 +0200 kcsan: Report observed value changes When a thread detects that a memory location was modified without its watchpoint being hit, the report notes that a change was detected, but does not provide concrete values for the change. Knowing the concrete values can be very helpful in tracking down any racy writers (e.g. as specific values may only be written in some portions of code, or under certain conditions). When we detect a modification, let's report the concrete old/new values, along with the access's mask of relevant bits (and which relevant bits were modified). This can make it easier to identify potential racy writers. As the snapshots are at most 8 bytes, we can only report values for acceses up to this size, but this appears to cater for the common case. When we detect a race via a watchpoint, we may or may not have concrete values for the modification. To be helpful, let's attempt to log them when we do as they can be ignored where irrelevant. The resulting reports appears as follows, with values zero-padded to the access width: | ================================================================== | BUG: KCSAN: data-race in el0_svc_common+0x34/0x25c arch/arm64/kernel/syscall.c:96 | | race at unknown origin, with read to 0xffff00007ae6aa00 of 8 bytes by task 223 on cpu 1: | el0_svc_common+0x34/0x25c arch/arm64/kernel/syscall.c:96 | do_el0_svc+0x48/0xec arch/arm64/kernel/syscall.c:178 | el0_svc arch/arm64/kernel/entry-common.c:226 [inline] | el0_sync_handler+0x1a4/0x390 arch/arm64/kernel/entry-common.c:236 | el0_sync+0x140/0x180 arch/arm64/kernel/entry.S:674 | | value changed: 0x0000000000000000 -> 0x0000000000000002 | | Reported by Kernel Concurrency Sanitizer on: | CPU: 1 PID: 223 Comm: syz-executor.1 Not tainted 5.8.0-rc3-00094-ga73f923ecc8e-dirty #3 | Hardware name: linux,dummy-virt (DT) | ================================================================== If an access mask is set, it is shown underneath the "value changed" line as "bits changed: 0x with mask 0x". Signed-off-by: Mark Rutland [ elver@google.com: align "value changed" and "bits changed" lines, which required massaging the message; do not print bits+mask if no mask set. ] Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 609f809746458522a7a96132acf0ca7ee67c424c Author: Mark Rutland Date: Wed Apr 14 13:28:23 2021 +0200 kcsan: Remove kcsan_report_type Now that the reporting code has been refactored, it's clear by construction that print_report() can only be passed KCSAN_REPORT_RACE_SIGNAL or KCSAN_REPORT_RACE_UNKNOWN_ORIGIN, and these can also be distinguished by the presence of `other_info`. Let's simplify things and remove the report type enum, and instead let's check `other_info` to distinguish these cases. This allows us to remove code for cases which are impossible and generally makes the code simpler. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland [ elver@google.com: add updated comments to kcsan_report_*() functions ] Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 19dfdc05ffed960024e175db21c8e11ef96daeee Author: Mark Rutland Date: Wed Apr 14 13:28:22 2021 +0200 kcsan: Remove reporting indirection Now that we have separate kcsan_report_*() functions, we can factor the distinct logic for each of the report cases out of kcsan_report(). While this means each case has to handle mutual exclusion independently, this minimizes the conditionality of code and makes it easier to read, and will permit passing distinct bits of information to print_report() in future. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland [ elver@google.com: retain comment about lockdep_off() ] Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 39b2e763f2defe326e960daefb7fe6acbb2a95b1 Author: Mark Rutland Date: Wed Apr 14 13:28:21 2021 +0200 kcsan: Refactor access_info initialization In subsequent patches we'll want to split kcsan_report() into distinct handlers for each report type. The largest bit of common work is initializing the `access_info`, so let's factor this out into a helper, and have the kcsan_report_*() functions pass the `aaccess_info` as a parameter to kcsan_report(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 97aa6139e1b506795ab19941b1c3851042199788 Author: Mark Rutland Date: Wed Apr 14 13:28:20 2021 +0200 kcsan: Fold panic() call into print_report() So that we can add more callers of print_report(), lets fold the panic() call into print_report() so the caller doesn't have to handle this explicitly. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 95f7524d7f0c6fddbc24fb623d61b7d508626f41 Author: Mark Rutland Date: Wed Apr 14 13:28:19 2021 +0200 kcsan: Refactor passing watchpoint/other_info The `watchpoint_idx` argument to kcsan_report() isn't meaningful for races which were not detected by a watchpoint, and it would be clearer if callers passed the other_info directly so that a NULL value can be passed in this case. Given that callers manipulate their watchpoints before passing the index into kcsan_report_*(), and given we index the `other_infos` array using this before we sanity-check it, the subsequent sanity check isn't all that useful. Let's remove the `watchpoint_idx` sanity check, and move the job of finding the `other_info` out of kcsan_report(). Other than the removal of the check, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 793c2579beefa95894fc0afbbdc1a80a4e3bf306 Author: Mark Rutland Date: Wed Apr 14 13:28:18 2021 +0200 kcsan: Distinguish kcsan_report() calls Currently kcsan_report() is used to handle three distinct cases: * The caller hit a watchpoint when attempting an access. Some information regarding the caller and access are recorded, but no output is produced. * A caller which previously setup a watchpoint detected that the watchpoint has been hit, and possibly detected a change to the location in memory being watched. This may result in output reporting the interaction between this caller and the caller which hit the watchpoint. * A caller detected a change to a modification to a memory location which wasn't detected by a watchpoint, for which there is no information on the other thread. This may result in output reporting the unexpected change. ... depending on the specific case the caller has distinct pieces of information available, but the prototype of kcsan_report() has to handle all three cases. This means that in some cases we pass redundant information, and in others we don't pass all the information we could pass. This also means that the report code has to demux these three cases. So that we can pass some additional information while also simplifying the callers and report code, add separate kcsan_report_*() functions for the distinct cases, updating callers accordingly. As the watchpoint_idx is unused in the case of kcsan_report_unknown_origin(), this passes a dummy value into kcsan_report(). Subsequent patches will refactor the report code to avoid this. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland [ elver@google.com: try to make kcsan_report_*() names more descriptive ] Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 6f2d98192c3f204592434177ba240564346eed9f Author: Mark Rutland Date: Wed Apr 14 13:28:17 2021 +0200 kcsan: Simplify value change detection In kcsan_setup_watchpoint() we store snapshots of a watched value into a union of u8/u16/u32/u64 sized fields, modify this in place using a consistent field, then later check for any changes via the u64 field. We can achieve the safe effect more simply by always treating the field as a u64, as smaller values will be zero-extended. As the values are zero-extended, we don't need to truncate the access_mask when we apply it, and can always apply the full 64-bit access_mask to the 64-bit value. Finally, we can store the two snapshots and calculated difference separately, which makes the code a little easier to read, and will permit reporting the old/new values in subsequent patches. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit ea0484644e5b8486c8335f677fc1e2a4a5d76d3f Author: Paul E. McKenney Date: Thu Mar 4 16:04:09 2021 -0800 kcsan: Add pointer to access-marking.txt to data_race() bullet This commit references tools/memory-model/Documentation/access-marking.txt in the bullet introducing data_race(). The access-marking.txt file gives advice on when data_race() should and should not be used. Suggested-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit 641faf1b9064c270a476a424e60063bb05df3ee9 Merge: a6814a79f2ca0 e5bd61e82b7a6 c70360c3343f9 a78d4a2a1017d e548eaa116d85 a616aec9aa140 0a580fa65cfa0 474d0997361c0 5390473ec1697 Author: Paul E. McKenney Date: Tue May 18 10:56:19 2021 -0700 Merge branches 'bitmaprange.2021.05.10c', 'doc.2021.05.10c', 'fixes.2021.05.13a', 'kvfree_rcu.2021.05.10c', 'mmdumpobj.2021.05.10c', 'nocb.2021.05.12a', 'srcu.2021.05.12a', 'tasks.2021.05.18a' and 'torture.2021.05.10c' into HEAD bitmaprange.2021.05.10c: Allow "all" for bitmap ranges. doc.2021.05.10c: Documentation updates. fixes.2021.05.13a: Miscellaneous fixes. kvfree_rcu.2021.05.10c: kvfree_rcu() updates. mmdumpobj.2021.05.10c: mem_dump_obj() updates. nocb.2021.05.12a: RCU NOCB CPU updates, including limited deoffloading. srcu.2021.05.12a: SRCU updates. tasks.2021.05.18a: Tasks-RCU updates. torture.2021.05.10c: Torture-test updates. commit 474d0997361c07d163693d0de41e76a2f2899d0a Author: Paul E. McKenney Date: Tue Apr 20 10:58:07 2021 -0700 tasks-rcu: Make show_rcu_tasks_gp_kthreads() be static inline In some architectures, the no-op variant of show_rcu_tasks_gp_kthreads() get "no previous prototype" compiler warnings. These are false positives given that kernel/rcu/tasks.h is included only once. But why put up with the compiler noise? This commit therefore adds "static inline" to this definition to force the compiler to accept this situation, while also moving it to its proper place in kernel/rcu/rcu.h. Reported-by: kernel test robot [ paulmck: Update per Stephen Rothwell feedback. ] Signed-off-by: Paul E. McKenney commit cf868c2af244417ed276ba7f716b980841a71340 Author: Paul E. McKenney Date: Wed Mar 24 17:08:48 2021 -0700 rcu-tasks: Make ksoftirqd provide RCU Tasks quiescent states Heavy networking load can cause a CPU to execute continuously and indefinitely within ksoftirqd, in which case there will be no voluntary task switches and thus no RCU-tasks quiescent states. This commit therefore causes the exiting rcu_softirq_qs() to provide an RCU-tasks quiescent state. This of course means that __do_softirq() and its callers cannot be invoked from within a tracing trampoline. Reported-by: Toke Høiland-Jørgensen Tested-by: Toke Høiland-Jørgensen Reviewed-by: Masami Hiramatsu Signed-off-by: Paul E. McKenney Cc: Steven Rostedt Cc: Masami Hiramatsu commit f7f525030854b1c093d593dfc6edb1f75593a528 Author: Simon Ser Date: Mon May 3 11:39:39 2021 +0000 drm: log errors in drm_gem_fb_init_with_funcs Let the user know what went wrong in drm_gem_fb_init_with_funcs failure paths. v2: use proper format specifier for size_t (kernel test robot) Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Noralf Trønnes Cc: Andrzej Pietrasiewicz Link: https://patchwork.freedesktop.org/patch/msgid/ZS4eX0PtTuNvHezILcTWeWINOkRyMS4krXND3cIE@cp4-web-032.plabs.ch commit d6cbe98ff32aef795462a309ef048cfb89d1a11d Author: Chuck Lever Date: Fri May 14 15:57:39 2021 -0400 NFSD: Update nfsd_cb_args tracepoint Clean-up: Re-order the display of IP address and client ID to be consistent with other _cb_ tracepoints. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 1d2bf65983a137121c165a7e69b2885572954915 Author: Chuck Lever Date: Fri May 14 15:57:32 2021 -0400 NFSD: Remove the nfsd_cb_work and nfsd_cb_done tracepoints Clean up: These are noise in properly working systems. If you really need to observe the operation of the callback mechanism, use the sunrpc:rpc\* tracepoints along with the workqueue tracepoints. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 4ade892ae1c35527584decb7fa026553d53cd03f Author: Chuck Lever Date: Fri May 14 15:57:26 2021 -0400 NFSD: Add an nfsd_cb_probe tracepoint Record a tracepoint event when the server performs a callback probe. This event can be enabled as a group with other nfsd_cb tracepoints. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 17d76ddf76e4972411402743eea7243d9a46f4f9 Author: Chuck Lever Date: Fri May 14 15:57:20 2021 -0400 NFSD: Replace the nfsd_deleg_break tracepoint Renamed so it can be enabled as a set with the other nfsd_cb_ tracepoints. And, consistent with those tracepoints, report the address of the client, the client ID the server has given it, and the state ID being recalled. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 87512386e951ee28ba2e7ef32b843ac97621d371 Author: Chuck Lever Date: Fri May 14 15:57:14 2021 -0400 NFSD: Add an nfsd_cb_offload tracepoint Record the arguments of CB_OFFLOAD callbacks so we can better observe asynchronous copy-offload behavior. For example: nfsd-995 [008] 7721.934222: nfsd_cb_offload: addr=192.168.2.51:0 client 6092a47c:35a43fc1 fh_hash=0x8739113a count=116528 status=0 Signed-off-by: Chuck Lever Cc: Olga Kornievskaia Cc: Dai Ngo Signed-off-by: J. Bruce Fields commit 2cde7f8118f0fea29ad73ddcf28817f95adeffd5 Author: Chuck Lever Date: Fri May 14 15:57:08 2021 -0400 NFSD: Add an nfsd_cb_lm_notify tracepoint When the server kicks off a CB_LM_NOTIFY callback, record its arguments so we can better observe asynchronous locking behavior. For example: nfsd-998 [002] 1471.705873: nfsd_cb_notify_lock: addr=192.168.2.51:0 client 6092a47c:35a43fc1 fh_hash=0x8950b23a Signed-off-by: Chuck Lever Cc: Jeff Layton Signed-off-by: J. Bruce Fields commit 3c92fba557c622a53fc166b76dede92863354da1 Author: Chuck Lever Date: Fri May 14 15:57:02 2021 -0400 NFSD: Enhance the nfsd_cb_setup tracepoint Display the transport protocol and authentication flavor so admins can see what they might be getting wrong. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 9f57c6062bf3ce2c6ab9ba60040b34e8134ef259 Author: Chuck Lever Date: Fri May 14 15:56:56 2021 -0400 NFSD: Remove spurious cb_setup_err tracepoint This path is not really an error path, so the tracepoint I added there is just noise. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit b200f0e35338b052976b6c5759e4f77a3013e6f6 Author: Chuck Lever Date: Fri May 14 15:56:49 2021 -0400 NFSD: Adjust cb_shutdown tracepoint Show when the upper layer requested a shutdown. RPC tracepoints can already show when rpc_shutdown_client() is called. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 806d65b617d89be887fe68bfa051f78143669cd7 Author: Chuck Lever Date: Fri May 14 15:56:43 2021 -0400 NFSD: Add cb_lost tracepoint Provide more clarity about when the callback channel is in trouble. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 167145cc64ce4b4b177e636829909a6b14004f9e Author: Chuck Lever Date: Fri May 14 15:56:37 2021 -0400 NFSD: Drop TRACE_DEFINE_ENUM for NFSD4_CB_ macros TRACE_DEFINE_ENUM() is necessary for enum {} but not for C macros. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 8476c69a7fa0f1f9705ec0caa4e97c08b5045779 Author: Chuck Lever Date: Fri May 14 15:56:31 2021 -0400 NFSD: Capture every CB state transition We were missing one. As a clean-up, add a helper that sets the new CB state and fires a tracepoint. The tracepoint fires only when the state changes, to help reduce trace log noise. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 1736aec82a15cb5d4b3bbe0b2fbae0ede66b1a1a Author: Chuck Lever Date: Fri May 14 15:56:25 2021 -0400 NFSD: Constify @fh argument of knfsd_fh_hash() Enable knfsd_fh_hash() to be invoked in functions where the filehandle pointer is a const. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit e8f80c5545ec5794644b48537449e48b009d608d Author: Chuck Lever Date: Fri May 14 15:56:19 2021 -0400 NFSD: Add tracepoints for EXCHANGEID edge cases Some of the most common cases are traced. Enough infrastructure is now in place that more can be added later, as needed. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 237f91c85acef206a33bc02f3c4e856128fd7994 Author: Chuck Lever Date: Fri May 14 15:56:13 2021 -0400 NFSD: Add tracepoints for SETCLIENTID edge cases Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 2958d2ee71021b6c44212ec6c2a39cc71d9cd4a9 Author: Chuck Lever Date: Fri May 14 15:56:06 2021 -0400 NFSD: Add a couple more nfsd_clid_expired call sites Improve observation of NFSv4 lease expiry. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit c41a9b7a906fb872f8b2b1a34d2a1d5ef7f94adb Author: Chuck Lever Date: Fri May 14 15:56:00 2021 -0400 NFSD: Add nfsd_clid_destroyed tracepoint Record client-requested termination of client IDs. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit cee8aa074281e5269d8404be2b6388bb29ea8efc Author: Chuck Lever Date: Fri May 14 15:55:54 2021 -0400 NFSD: Add nfsd_clid_reclaim_complete tracepoint Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 7e3b32ace6094aadfa2e1e54ca4c6bbfd07646af Author: Chuck Lever Date: Fri May 14 15:55:48 2021 -0400 NFSD: Add nfsd_clid_confirmed tracepoint This replaces a dprintk call site in order to get greater visibility on when client IDs are confirmed or re-used. Simple example: nfsd-995 [000] 126.622975: nfsd_compound: xid=0x3a34e2b1 opcnt=1 nfsd-995 [000] 126.623005: nfsd_cb_args: addr=192.168.2.51:45901 client 60958e3b:9213ef0e prog=1073741824 ident=1 nfsd-995 [000] 126.623007: nfsd_compound_status: op=1/1 OP_SETCLIENTID status=0 nfsd-996 [001] 126.623142: nfsd_compound: xid=0x3b34e2b1 opcnt=1 >>>> nfsd-996 [001] 126.623146: nfsd_clid_confirmed: client 60958e3b:9213ef0e nfsd-996 [001] 126.623148: nfsd_cb_probe: addr=192.168.2.51:45901 client 60958e3b:9213ef0e state=UNKNOWN nfsd-996 [001] 126.623154: nfsd_compound_status: op=1/1 OP_SETCLIENTID_CONFIRM status=0 Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 0bfaacac57e64aa342f865b8ddcab06ca59a6f83 Author: Chuck Lever Date: Fri May 14 15:55:42 2021 -0400 NFSD: Remove trace_nfsd_clid_inuse_err This tracepoint has been replaced by nfsd_clid_cred_mismatch and nfsd_clid_verf_mismatch, and can simply be removed. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 744ea54c869cebe41fbad5f53f8a8ca5d93a5c97 Author: Chuck Lever Date: Fri May 14 15:55:36 2021 -0400 NFSD: Add nfsd_clid_verf_mismatch tracepoint Record when a client presents a different boot verifier than the one we know about. Typically this is a sign the client has rebooted, but sometimes it signals a conflicting client ID, which the client's administrator will need to address. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 27787733ef44332fce749aa853f2749d141982b0 Author: Chuck Lever Date: Fri May 14 15:55:29 2021 -0400 NFSD: Add nfsd_clid_cred_mismatch tracepoint Record when a client tries to establish a lease record but uses an unexpected credential. This is often a sign of a configuration problem. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 87b2394d60c32c158ebb96ace4abee883baf1239 Author: Chuck Lever Date: Fri May 14 15:55:23 2021 -0400 NFSD: Add an RPC authflavor tracepoint display helper To be used in subsequent patches. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit a948b1142cae66785521a389cab2cce74069b547 Author: Chuck Lever Date: Fri May 14 15:55:17 2021 -0400 NFSD: Fix TP_printk() format specifier in nfsd_clid_class Since commit 9a6944fee68e ("tracing: Add a verifier to check string pointers for trace events"), which was merged in v5.13-rc1, TP_printk() no longer tacitly supports the "%.*s" format specifier. These are low value tracepoints, so just remove them. Reported-by: David Wysochanski Fixes: dd5e3fbc1f47 ("NFSD: Add tracepoints to the NFSD state management code") Signed-off-by: Chuck Lever Cc: Steven Rostedt Signed-off-by: J. Bruce Fields commit 0169d8f33ab7a58675a94c18122dba58d8f6a1b8 Author: Jens Axboe Date: Thu Mar 25 18:42:50 2021 -0600 Revert "Smack: Handle io_uring kernel thread privileges" This reverts commit 942cb357ae7d9249088e3687ee6a00ed2745a0c7. The io_uring PF_IO_WORKER threads no longer have PF_KTHREAD set, so no need to special case them for credential checks. Cc: Casey Schaufler Signed-off-by: Jens Axboe Signed-off-by: Casey Schaufler commit 73246fc4c990da6ad6b131f92b8342851cefeb2e Author: Takashi Sakamoto Date: Tue May 18 22:00:47 2021 +0900 ALSA: firewire-lib: insert descriptor for skipped cycle This commit fulfils sequence descriptors for skipped cycle when it's one cycle. This is preparation for future integration. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 705794c53b0080d7d1c98a7425067f5752ea786b Author: Takashi Sakamoto Date: Tue May 18 22:00:46 2021 +0900 ALSA: firewire-lib: check cycle continuity Within devices supported by drivers in ALSA firewire stack, OXFW-based devices and Fireface devices are known to skip isochronous cycle for packet transmission. The former is due to the jumbo payload quirk. The latter is due to vendor protocol in which empty packet is not transferred in blocking mode. Although nothing to do just for handling events of the packet, packet continuity is necessarily for media clock recovery. This commit checks whether any cycle is continue or not. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 4fd1878766a12dc29fe343e1f57177feebb7567a Author: Takashi Sakamoto Date: Tue May 18 22:00:45 2021 +0900 ALSA: firewire-lib: code refactoring for check of CIP header about payload size The size of CIP payload is now passed to helper function to parse CIP header. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ebd2a647e2f6b96ae8d2dec355e780b2e421bcf9 Author: Takashi Sakamoto Date: Tue May 18 22:00:44 2021 +0900 ALSA: firewire-lib: code refactoring for parser of IR context header This commit refactors regarding to function argument for the length of isochronous packet payload. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 3e106f4f690ef0c1e8ce4fb8a01d6e281e6da300 Author: Takashi Sakamoto Date: Tue May 18 22:00:43 2021 +0900 ALSA: firewire-lib: code refactoring for helper function to compute OHCI 1394 cycle Some macros and functions are renamed so that they compute isochronous cycle within maximum count of second in isochronous context of 1394 OHCI. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d32872f30604ce925ead5dcc322369dc4f08ac88 Author: Takashi Sakamoto Date: Tue May 18 22:00:42 2021 +0900 ALSA: firewire-lib: code refactoring for sequence descriptor' A internal structure is used to gather parameters relevant to sequence descriptor. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c09010eeb3736793d315943220bc53b076303ee1 Author: Takashi Sakamoto Date: Tue May 18 22:00:41 2021 +0900 ALSA: firewire-lib: handle the case that empty isochronous packet payload for CIP Two quadlets are at least included in isochronous packet payload for Common Isochronous Packet (CIP) format in IEC 61883-1. However, it's better to equip ALSA IEC 61883-1/6 packet streaming engine for contrary packet. This commit handles isochronous cycle to process such packet so that the cycle is skipped. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6d60b7a3d3349e053e377814569acd2ca3393231 Author: Takashi Sakamoto Date: Tue May 18 22:00:40 2021 +0900 ALSA: firewire-lib: code refactoring to refer the same frame count per period in domain structure The number of PCM frame per period is common between PCM substreams handled in AMDTP stream in AMDTP domain. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518130048.146596-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 086a4302380931ca627b51b4ef5ba3bfeca21276 Author: Jernej Skrabec Date: Mon May 10 18:36:47 2021 +0200 ARM: dts: sun8i: r40: Add timer node Allwinner R40 has a timer. Add a node for it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210510163647.2731675-1-jernej.skrabec@gmail.com commit 65a50bca77177210c2333789ee7cf7191d3b99ae Author: Tobias Schramm Date: Fri May 14 15:44:05 2021 +0200 ARM: dts: sun8i: V3: add I2S interface to V3 dts The Allwinner V3 SoC features an I2S interface. The I2S peripheral is identical to that in the Allwinner H3 SoC. This commit adds it to the Allwinner V3 dts. Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-8-t.schramm@manjaro.org commit ce09d1a6800df7ce0f73ae4d4b3ad4975cb31498 Author: Tobias Schramm Date: Fri May 14 15:44:04 2021 +0200 dt-bindings: sound: sun4i-i2s: add Allwinner V3 I2S compatible The I2S peripheral of the Allwinner V3 SoC is compatible with the one found in the Allwinner H3 SoC. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-7-t.schramm@manjaro.org commit 8575276c1fe3c003c4a31b1c4ec6d47ea50843d0 Author: Tobias Schramm Date: Fri May 14 15:44:03 2021 +0200 ARM: dts: sun8i: V3: add codec analog frontend to V3 dts The Allwinner V3 SoC has a different analog codec frontend than the V3s SoC. The frontend used on the V3 SoC is compatible with the on used in the Allwinner H3 SoC. This patch adds the corresponding node to the Allwinner V3 dtsi. Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-6-t.schramm@manjaro.org commit 78e8db071b684f4b3975653fd31ffabc8c204501 Author: Tobias Schramm Date: Fri May 14 15:44:02 2021 +0200 ASoC: dt-bindings: sun8i-a23-codec-analog: add compatible for Allwinner V3 The analog codec frontend of the Allwinner V3 is compatible with the analog codec frontend used on the Allwinner H3. This patch adds a compatible string for the analog codec frontend on the Allwinner V3 SoC. Signed-off-by: Tobias Schramm Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-5-t.schramm@manjaro.org commit 5348915db9b878084ae67f159063550fe0500847 Author: Tobias Schramm Date: Fri May 14 15:44:01 2021 +0200 ARM: dts: sun8i: v3s: add analog codec and frontend to v3s dts The Allwinner V3s and V3 SoCs feature an integrated analog audio codec. Additionally both have an analog frontend with mixers and amplifiers for the codec. This commit adds both, the analog codec and its frontend to the V3s dtsi. Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-4-t.schramm@manjaro.org commit 93bc32b0397ee94ae0a5db92b6d9dd3ff6f9d4fe Author: Tobias Schramm Date: Fri May 14 15:44:00 2021 +0200 ARM: dts: sun8i: v3s: add DMA properties to peripherals supporting DMA This commit adds DMA properties to all peripherals supporting DMA on the Allwinner V3s, enabling accelerated data transfer to them. Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-3-t.schramm@manjaro.org commit 49b9e240b84d90511f581c3384582c615b1fd586 Author: Tobias Schramm Date: Fri May 14 15:43:59 2021 +0200 ARM: dts: sun8i: v3s: add DMA controller to v3s dts The Allwinner V3s and V3 feature a DMA controller. This commit adds it to the V3s dtsi. Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210514134405.2097464-2-t.schramm@manjaro.org commit 1d34350cdb6ba23b9b627aec09a14dfc6db046ee Author: Tobias Schramm Date: Thu May 13 22:35:27 2021 +0200 ARM: dts: sun8i: v3s: add pwm controller to v3s dts The Allwinner V3s and V3 SoCs feature a pwm controller identical to the one used in the Allwinner A20. This commit adds it to the V3s dtsi. Signed-off-by: Tobias Schramm Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210513203527.2072090-3-t.schramm@manjaro.org commit cd8d60399ac5634513199b76c7dbd43092e29b1b Author: Tobias Schramm Date: Thu May 13 22:35:26 2021 +0200 dt-bindings: pwm: allwinner: add v3s pwm compatible The Allwinner V3s pwm peripheral is compatible with the pwm peripheral inside the Allwinner A20. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Reviewed-by: Andre Przywara Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210513203527.2072090-2-t.schramm@manjaro.org commit 9962cb9be2db877c232aaf00db40125c0d7bf4bc Author: Chukun Pan Date: Mon May 17 00:35:22 2021 +0800 arm64: dts: allwinner: h5: Add NanoPi R1S H5 support The NanoPi R1S H5 is a open source board made by FriendlyElec. It has the following features: - Allwinner H5, Quad-core Cortex-A53 - 512MB DDR3 RAM - 10/100/1000M Ethernet x 2 - RTL8189ETV WiFi 802.11b/g/n - USB 2.0 host port (A) - MicroSD Slot - Serial Debug Port - 5V 2A DC power-supply Signed-off-by: Chukun Pan Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210516163523.9484-2-amadeus@jmu.edu.cn commit 92ed3675574723a963152abbbe527b47f659340f Author: Chukun Pan Date: Mon May 17 00:35:23 2021 +0800 dt-bindings: arm: Add NanoPi R1S H5 Add the bindings for NanoPi R1S H5 board. Signed-off-by: Chukun Pan Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210516163523.9484-3-amadeus@jmu.edu.cn commit c49661aa6f7097047b7e86ad37b1cf308a7a8d4f Author: Cong Wang Date: Sun May 16 19:23:48 2021 -0700 skmsg: Remove unused parameters of sk_msg_wait_data() 'err' and 'flags' are not used, we can just get rid of them. Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210517022348.50555-1-xiyou.wangcong@gmail.com commit 119220d81258c1e79db9aa7b52ef09b945aaf46f Author: Tiezhu Yang Date: Tue May 18 16:56:10 2021 +0800 bpf, arm64: Remove redundant switch case about BPF_DIV and BPF_MOD After commit 96a71005bdcb ("bpf, arm64: remove obsolete exception handling from div/mod"), there is no need to check twice about BPF_DIV and BPF_MOD, remove the redundant switch case. Signed-off-by: Tiezhu Yang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1621328170-17583-1-git-send-email-yangtiezhu@loongson.cn commit 44602b10d7f2a5f7d1314500dde3e6c15a67c5dd Author: Enric Balletbo i Serra Date: Tue May 18 16:19:27 2021 +0200 drm/bridge: Add ChromeOS EC ANX7688 bridge driver support This driver adds support for the ChromeOS EC ANX7688 HDMI to DP converter For our use case, the only reason the Linux kernel driver is necessary is to reject resolutions that require more bandwidth than what is available on the DP side. DP bandwidth and lane count are reported by the bridge via 2 registers and, as far as we know, only chips that have a firmware version greater than 0.85 support these two registers. Signed-off-by: Nicolas Boichat Signed-off-by: Hsin-Yi Wang [The driver is OF only so should depends on CONFIG_OF] Reported-by: kbuild test robot Signed-off-by: Enric Balletbo i Serra [convert to i2c driver, rename to cros_ec_anx7688, add err checks] Signed-off-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210518141927.24795-3-dafna.hirschfeld@collabora.com commit b67f7599c90ae36a5174826132f7690fa13d462c Author: Dafna Hirschfeld Date: Tue May 18 16:19:26 2021 +0200 dt-bindings: display: add google, cros-ec-anx7688.yaml ChromeOS EC ANX7688 is a display bridge that converts HDMI 2.0 to DisplayPort 1.3 Ultra-HDi (4096x2160p60). It is an Analogix ANX7688 chip which is connected to and operated by the ChromeOS Embedded Controller (See google,cros-ec.yaml). It is accessed using I2C tunneling through the EC and therefore its node should be a child of an EC I2C tunnel node (See google,cros-ec-i2c-tunnel.yaml). ChromOS EC ANX7688 is found on Acer Chromebook R13 (elm) Signed-off-by: Dafna Hirschfeld Reviewed-by: Rob Herring Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210518141927.24795-2-dafna.hirschfeld@collabora.com commit d28397eaf4c27947a1ffc720d42e8b3a33ae1e2a Author: Fenghua Yu Date: Mon Apr 19 21:49:58 2021 +0000 Documentation/x86: Add ratelimit in buslock.rst ratelimit is a new command line option for bus lock handling. Add proper documentation. [ tglx: Massaged documentation ] Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20210419214958.4035512-5-fenghua.yu@intel.com commit 9d839c280b64817345c2fa462c0027a9bd742361 Author: Fenghua Yu Date: Mon Apr 19 21:49:57 2021 +0000 Documentation/admin-guide: Add bus lock ratelimit Since bus lock rate limit changes the split_lock_detect parameter, update the documentation for the change. Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20210419214958.4035512-4-fenghua.yu@intel.com commit ef4ae6e4413159d2329a172c12e9274e2cb0a3a8 Author: Fenghua Yu Date: Mon Apr 19 21:49:56 2021 +0000 x86/bus_lock: Set rate limit for bus lock A bus lock can be thousands of cycles slower than atomic operation within one cache line. It also disrupts performance on other cores. Malicious users can generate multiple bus locks to degrade the whole system performance. The current mitigation is to kill the offending process, but for certain scenarios it's desired to identify and throttle the offending application. Add a system wide rate limit for bus locks. When the system detects bus locks at a rate higher than N/sec (where N can be set by the kernel boot argument in the range [1..1000]) any task triggering a bus lock will be forced to sleep for at least 20ms until the overall system rate of bus locks drops below the threshold. Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20210419214958.4035512-3-fenghua.yu@intel.com commit 1897907cca5aa22cdfcdb7fb8f0644a6add0877d Author: Fenghua Yu Date: Mon Apr 19 21:49:55 2021 +0000 Documentation/x86: Add buslock.rst Add buslock.rst to explain bus lock problem and how to detect and handle it. [ tglx: Included it into index.rst and added the missing include ... ] Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20210419214958.4035512-2-fenghua.yu@intel.com commit 2e2f16d5cdb33e5f6fc53b7ad66c9f456d5f2950 Author: Arnd Bergmann Date: Wed Apr 21 15:54:53 2021 +0200 EDAC/aspeed: Use proper format string for printing resource On ARMv7, resource_size_t can be 64-bit, which breaks printing it as %x: drivers/edac/aspeed_edac.c: In function 'init_csrows': drivers/edac/aspeed_edac.c:257:28: error: format '%x' expects argument of \ type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long \ long unsigned int'} [-Werror=format=] 257 | dev_dbg(mci->pdev, "dt: /memory node resources: first page \ r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n", Use the special %pR format string to pretty-print the entire resource instead. Fixes: edfc2d73ca45 ("EDAC/aspeed: Add support for AST2400 and AST2600") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Andrew Jeffery Link: https://lkml.kernel.org/r/20210421135500.3518661-1-arnd@kernel.org commit 4b6847e507c719a5ee89918b23be7ecd702df1d5 Author: Linus Walleij Date: Tue May 18 16:16:57 2021 +0200 ARM: dts: href: Mount matrices for TVK R2 This adds the proper mounting matrices for the TVK R2 board. Signed-off-by: Linus Walleij commit fcb93ec3e87fe2a58b83800edad9c23bc617672b Author: Dan Carpenter Date: Tue May 18 12:19:30 2021 +0300 drm/bridge: ti-sn65dsi86: fix a ternary type promotion bug The ti_sn_aux_transfer() function returns ssize_t (signed long). It's supposed to return negative error codes or the number of bytes transferred. The "ret" variable is int and the "len" variable is unsigned int. The problem is that with a ternary like this, the negative int is first type promoted to unsigned int to match "len" at this point it is a high positive value. Then when it is type promoted to ssize_t (s64) it remains a high positive value instead of sign extending and becoming a negative again. Fix this by removing the ternary. Fixes: b137406d9679 ("drm/bridge: ti-sn65dsi86: If refclk, DP AUX can happen w/out pre-enable") Signed-off-by: Dan Carpenter Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/YKOGogHasIyvF8nj@mwanda commit 70252440b2b6337d03f2b95bc475fedbea79072f Author: Andy Shevchenko Date: Mon May 17 17:03:51 2021 +0300 spi: pxa2xx: Use predefined mask when programming FIFO thresholds The predefined mask for threshold modification can be used in case of Intel Merrifield SPI. Replace open-coded value with predefined mask when programming FIFO thresholds. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-10-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f96e6c0ef63b981d295547ef624f4da7c820e097 Author: Andy Shevchenko Date: Mon May 17 17:03:50 2021 +0300 spi: pxa2xx: Update documentation to point out that it's outdated Update documentation by pointing out that it's applicable mostly for a legacy platform. While at it, add couple of points with regard to ACPI, Device Tree, and automatic DMA enablement. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-9-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 8083d6b812cac5e38db9c707b41cd478beed4a0c Author: Andy Shevchenko Date: Mon May 17 17:03:49 2021 +0300 spi: pxa2xx: Fix style of and typos in the comments and messages Fix style of the comments and messages along with typos in them. While at it, update Intel Copyright year. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-8-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 684a3ac720c3fd4c09ae5aa3d349861bf12dcff6 Author: Andy Shevchenko Date: Mon May 17 17:03:48 2021 +0300 spi: pxa2xx: Fix printf() specifiers Instead of explicit casting use proper specifier in one case, and fix specifier signness in another. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-7-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit eb743ec600be596553bf4e42c85b0bbc65083791 Author: Andy Shevchenko Date: Mon May 17 17:03:47 2021 +0300 spi: pxa2xx: Drop unneeded '!= 0' comparisons In the few places it's redundant to compare against 0. Drop the unneeded comparisons. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit ccd60b2030a04b91977d9fee9e0ec6469ac4cd1b Author: Andy Shevchenko Date: Mon May 17 17:03:46 2021 +0300 spi: pxa2xx: Drop duplicate chip_select in struct chip_data The struct chip_data had been introduced in order to keep the parameters that may be provided on stack during device allocation. There is no need to duplicate parameters there, which are carried on by SPI device itself. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit de6926f307e7ff605f3e37f11a4b3cc20c85c365 Author: Andy Shevchenko Date: Mon May 17 17:03:45 2021 +0300 spi: pxa2xx: Switch to use SPI core GPIO (legacy) CS handling SPI core has been already providing the GPIO CS handling. Use it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 778c12e69481d544e6fcfa45b23ae3c5379b5a02 Author: Andy Shevchenko Date: Mon May 17 17:03:44 2021 +0300 spi: pxa2xx: Switch to use SPI core GPIO (descriptor) CS handling SPI core has been already providing the GPIO CS handling. Use it. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 94acf80755c8d8dd066d4f5a2afbdf393f0e2afd Author: Andy Shevchenko Date: Mon May 17 17:03:43 2021 +0300 spi: pxa2xx: Propagate firmware node to the child SPI controller device SPI core may utilize properties and resources provided by the parent device. Propagate firmware node to the child SPI controller device for that. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210517140351.901-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 7075359c8e0da1b01e34201b09b9ab2fd23b8a7d Author: Axel Lin Date: Mon May 17 18:53:25 2021 +0800 regulator: fan53880: Convert to use .probe_new Use the new .probe_new for fan53880. Signed-off-by: Axel Lin Acked-by: Christoph Fritz Link: https://lore.kernel.org/r/20210517105325.1227393-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 3799fa23afa4cac347739d5290df44a474a82a82 Author: Axel Lin Date: Tue May 18 19:48:43 2021 +0800 regulator: bd71815: Fix missing include files Include linux/of.h and linux/gpio/consumer.h to fix below errors: error: implicit declaration of function ‘of_match_ptr’ error: implicit declaration of function ‘devm_gpiod_get_from_of_node’ Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210518114843.1495152-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 375904e3931955fcf0a847f029b2492a117efc43 Author: Yang Yingliang Date: Tue May 18 12:45:14 2021 +0800 ASoC: hisilicon: fix missing clk_disable_unprepare() on error in hi6210_i2s_startup() After calling clk_prepare_enable(), clk_disable_unprepare() need be called when calling clk_set_rate() failed. Fixes: 0bf750f4cbe1 ("ASoC: hisilicon: Add hi6210 i2s audio driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210518044514.607010-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 5a3f869c5b4d230b60ba0197c10506dd4ae30851 Author: YueHaibing Date: Fri May 14 16:11:00 2021 +0800 ASoC: soc-core: use DEVICE_ATTR_RO macro Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210514081100.16196-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit d14eece945a8068a017995f7512ea2beac21e34b Author: Yang Yingliang Date: Tue May 18 15:58:47 2021 +0800 ASoC: rk3328: fix missing clk_disable_unprepare() on error in rk3328_platform_probe() Fix the missing clk_disable_unprepare() before return from rk3328_platform_probe() in the error handling case. Fixes: c32759035ad2 ("ASoC: rockchip: support ACODEC for rk3328") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210518075847.1116983-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 929b734ad34b717d6a1b8de97f53bb5616040147 Author: Simon Rettberg Date: Mon Apr 26 16:11:24 2021 +0200 drm/i915/gt: Disable HiZ Raw Stall Optimization on broken gen7 When resetting CACHE_MODE registers, don't enable HiZ Raw Stall Optimization on Ivybridge GT1 and Baytrail, as it causes severe glitches when rendering any kind of 3D accelerated content. This optimization is disabled on these platforms by default according to official documentation from 01.org. Fixes: ef99a60ffd9b ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3081 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3404 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3071 Reviewed-By: Manuel Bentele Signed-off-by: Simon Rettberg Reviewed-by: Dave Airlie Signed-off-by: Rodrigo Vivi [Rodrigo removed invalid Fixes line] Link: https://patchwork.freedesktop.org/patch/msgid/20210426161124.2b7fd708@dellnichtsogutkiste commit 409776fa3c42af4b008b491409fd26cd32cb3466 Author: Pi-Hsun Shih Date: Mon May 17 14:35:29 2021 +0800 drm/bridge: anx7625: add suspend / resume hooks Add suspend / resume hooks for anx7625 driver, that power off the device on suspend and power on the device on resume if it was previously powered. Signed-off-by: Pi-Hsun Shih Reviewed-by: Tzung-Bi Shih Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210517063553.554955-2-pihsun@chromium.org commit 60487584a79abd763570b54d59e6aad586d64c7b Author: Pi-Hsun Shih Date: Mon May 17 14:35:28 2021 +0800 drm/bridge: anx7625: refactor power control to use runtime PM framework The driver originally use an atomic_t for keep track of the power status, which makes the driver more complicated than needed, and has some race condition as it's possible to have the power on and power off sequence going at the same time. This patch remove the usage of the atomic_t power_status, and use the kernel runtime power management framework instead. Signed-off-by: Pi-Hsun Shih Reviewed-by: Tzung-Bi Shih Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210517063553.554955-1-pihsun@chromium.org commit 1dcc917a0eed934c522d93bb05a9a7bb3c54f96c Author: Thomas Gleixner Date: Fri May 7 13:02:12 2021 +0200 x86/idt: Rework IDT setup for boot CPU A basic IDT setup for the boot CPU has to be done before invoking cpu_init() because that might trigger #GP when accessing certain MSRs. This setup cannot install the IST variants on 64-bit because the TSS setup which is required for ISTs to work happens in cpu_init(). That leaves a theoretical window where a NMI would invoke the ASM entry point which relies on IST being enabled on the kernel stack which is undefined behaviour. This setup logic has never worked correctly, but on the other hand a NMI hitting the boot CPU before it has fully set up the IDT would be fatal anyway. So the small window between the wrong NMI gate and the IST based NMI gate is not really adding a substantial amount of risk. But the setup logic is nevertheless more convoluted than necessary. The recent separation of the TSS setup into a separate function to ensure that setup so it can setup TSS first, then initialize IDT with the IST variants before invoking cpu_init() and get rid of the post cpu_init() IST setup. Move the invocation of cpu_init_exception_handling() ahead of idt_setup_traps() and merge the IST setup into the default setup table. Reported-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Reviewed-by: Lai Jiangshan Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210507114000.569244755@linutronix.de commit b1efd0ff4bd16e8bb8607ba566b03f2024a830bb Author: Borislav Petkov Date: Mon May 10 23:29:25 2021 +0200 x86/cpu: Init AP exception handling from cpu_init_secondary() SEV-ES guests require properly setup task register with which the TSS descriptor in the GDT can be located so that the IST-type #VC exception handler which they need to function properly, can be executed. This setup needs to happen before attempting to load microcode in ucode_cpu_init() on secondary CPUs which can cause such #VC exceptions. Simplify the machinery by running that exception setup from a new function cpu_init_secondary() and explicitly call cpu_init_exception_handling() for the boot CPU before cpu_init(). The latter prepares for fixing and simplifying the exception/IST setup on the boot CPU. There should be no functional changes resulting from this patch. [ tglx: Reworked it so cpu_init_exception_handling() stays seperate ] Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Reviewed-by: Lai Jiangshan Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/87k0o6gtvu.ffs@nanos.tec.linutronix.de commit 337ed732b35cdd7c8119d9464b40b6b539b75a25 Author: Dan Carpenter Date: Sat May 15 12:50:57 2021 +0300 drm: bridge: it66121: fix a resource leak in probe In the original code if the "ctx = devm_kzalloc()" allocation failed then we should have called of_node_put(ep); before returning. It's actually a bit easier to do the allocation first before assigning ep = of_graph_get_endpoint_by_regs(). Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver") Signed-off-by: Dan Carpenter Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/YJ+ZgXTFa6voZuJG@mwanda commit 69fbffcc305e83c30ae219fdf814fa07a50fa213 Author: Dan Carpenter Date: Sat May 15 12:50:23 2021 +0300 drm: bridge: it66121: fix an error code in it66121_probe() This code is passing the wrong variable to PTR_ERR() so it doesn't return the correct error code. Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver") Signed-off-by: Dan Carpenter Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/YJ+ZX3BdKPAN0pUZ@mwanda commit 10337e95e04c9bcd15d9bf5b26f194c92c13da56 Author: Alexander Antonov Date: Mon Apr 26 16:16:14 2021 +0300 perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on ICX This patch enables I/O stacks to IIO PMON mapping on Icelake server. Mapping of IDs in SAD_CONTROL_CFG notation to IDs in PMON notation for Icelake server: Stack Name | CBDMA/DMI | PCIe_1 | PCIe_2 | PCIe_3 | PCIe_4 | PCIe_5 SAD_CONTROL_CFG ID | 0 | 1 | 2 | 3 | 4 | 5 PMON ID | 5 | 0 | 1 | 2 | 3 | 4 I/O stacks to IIO PMON mapping is exposed through attributes /sys/devices/uncore_iio_/dieX, where dieX is file which holds "Segment:Root Bus" for PCIe root port which can be monitored by that IIO PMON block. Example for 2-S Icelake server: ==> /sys/devices/uncore_iio_0/die0 <== 0000:16 ==> /sys/devices/uncore_iio_0/die1 <== 0000:97 ==> /sys/devices/uncore_iio_1/die0 <== 0000:30 ==> /sys/devices/uncore_iio_1/die1 <== 0000:b0 ==> /sys/devices/uncore_iio_3/die0 <== 0000:4a ==> /sys/devices/uncore_iio_3/die1 <== 0000:c9 ==> /sys/devices/uncore_iio_4/die0 <== 0000:64 ==> /sys/devices/uncore_iio_4/die1 <== 0000:e2 ==> /sys/devices/uncore_iio_5/die0 <== 0000:00 ==> /sys/devices/uncore_iio_5/die1 <== 0000:80 Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lkml.kernel.org/r/20210426131614.16205-4-alexander.antonov@linux.intel.com commit c1777be3646b48f6638d8339ad270a27659adaa4 Author: Alexander Antonov Date: Mon Apr 26 16:16:13 2021 +0300 perf/x86/intel/uncore: Enable I/O stacks to IIO PMON mapping on SNR I/O stacks to PMON mapping on Skylake server relies on topology information from CPU_BUS_NO MSR but this approach is not applicable for SNR and ICX. Mapping on these platforms can be gotten by reading SAD_CONTROL_CFG CSR from Mesh2IIO device with 0x09a2 DID. SAD_CONTROL_CFG CSR contains stack IDs in its own notation which are statically mapped on IDs in PMON notation. The map for Snowridge: Stack Name | CBDMA/DMI | PCIe Gen 3 | DLB | NIS | QAT SAD_CONTROL_CFG ID | 0 | 1 | 2 | 3 | 4 PMON ID | 1 | 4 | 3 | 2 | 0 This patch enables I/O stacks to IIO PMON mapping on Snowridge. Mapping is exposed through attributes /sys/devices/uncore_iio_/dieX, where dieX is file which holds "Segment:Root Bus" for PCIe root port which can be monitored by that IIO PMON block. Example for Snowridge: ==> /sys/devices/uncore_iio_0/die0 <== 0000:f3 ==> /sys/devices/uncore_iio_1/die0 <== 0000:00 ==> /sys/devices/uncore_iio_2/die0 <== 0000:eb ==> /sys/devices/uncore_iio_3/die0 <== 0000:e3 ==> /sys/devices/uncore_iio_4/die0 <== 0000:14 Mapping for Icelake server will be enabled in the follow-up patch. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lkml.kernel.org/r/20210426131614.16205-3-alexander.antonov@linux.intel.com commit f471fac77b41a2573c7b677ef790bf18a0e64195 Author: Alexander Antonov Date: Mon Apr 26 16:16:12 2021 +0300 perf/x86/intel/uncore: Generalize I/O stacks to PMON mapping procedure Currently I/O stacks to IIO PMON mapping is available on Skylake servers only and need to make code more general to easily enable further platforms. So, introduce get_topology() callback in struct intel_uncore_type which allows to move common code to separate function and make mapping procedure more general. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lkml.kernel.org/r/20210426131614.16205-2-alexander.antonov@linux.intel.com commit 00b89fe0197f0c55a045775c11553c0cdb7082fe Author: Valentin Schneider Date: Mon May 10 16:10:23 2021 +0100 sched: Make the idle task quack like a per-CPU kthread For all intents and purposes, the idle task is a per-CPU kthread. It isn't created via the same route as other pcpu kthreads however, and as a result it is missing a few bells and whistles: it fails kthread_is_per_cpu() and it doesn't have PF_NO_SETAFFINITY set. Fix the former by giving the idle task a kthread struct along with the KTHREAD_IS_PER_CPU flag. This requires some extra iffery as init_idle() call be called more than once on the same idle task. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210510151024.2448573-2-valentin.schneider@arm.com commit fcb501704554eebfd27e3220b0540997fd2b24a8 Author: Mel Gorman Date: Wed May 12 12:40:35 2021 +0100 delayacct: Document task_delayacct sysctl Update sysctl/kernel.rst. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210512114035.GH3672@suse.de commit 90a0ff4ec9c65cae3085d23301933172cea3f38a Author: Peter Zijlstra Date: Wed May 12 13:32:37 2021 +0200 sched,stats: Further simplify sched_info There's no point doing delta==0 updates. Suggested-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) commit 59ba546d1662c4beb738725965041f350afe24b4 Author: Linus Walleij Date: Thu Mar 18 09:27:58 2021 +0100 ARM: dts: ux500: Fix some compatible strings The Golden and Skomer phones have BCM4334 WLAN+BT chips, so make the compatible strings reflect the new available bindings for these. Signed-off-by: Linus Walleij commit c6a8625fa4c6b0a97860d053271660ccedc3d1b3 Author: YueHaibing Date: Fri May 14 15:01:16 2021 +0800 hv_utils: Fix passing zero to 'PTR_ERR' warning Sparse warn this: drivers/hv/hv_util.c:753 hv_timesync_init() warn: passing zero to 'PTR_ERR' Use PTR_ERR_OR_ZERO instead of PTR_ERR to fix this. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210514070116.16800-1-yuehaibing@huawei.com [ wei: change %ld to %d ] Signed-off-by: Wei Liu commit 3fda230b3ef8bba9a37f77288551ade5c1ee6533 Merge: e8bfa15fefcd8 07a35edc59d1f Author: Takashi Iwai Date: Tue May 18 12:25:24 2021 +0200 Merge branch 'topic/firewire' into for-next commit 07a35edc59d1f461a02c83235d0fe63b4c313920 Author: Takashi Sakamoto Date: Tue May 18 17:45:57 2021 +0900 ALSA: oxfw: add quirk flag for blocking transmission method Stanton SCS.1m and Apogee Duet FireWire use blocking transmission method unlike the other models. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-12-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a6f9169323f0dc629829c0052e8b6c6833cd5572 Author: Takashi Sakamoto Date: Tue May 18 17:45:56 2021 +0900 ALSA: oxfw: code refactoring for wrong_dbs quirk A new entry is added to the quirk enumeration for wrong_dbs quirk to obsolete structure member. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-11-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 6a3ce97da2ab2bd7ca7a446b62b104488ccd43ef Author: Takashi Sakamoto Date: Tue May 18 17:45:55 2021 +0900 ALSA: firewire-lib: code refactoring for jumbo payload quirk A new macro is added to describe the maximum number of cycles to accept cycle skip by jumbo payload quirk. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-10-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a092f000b9b0ac7d0889a6b0674335affea289d3 Author: Takashi Sakamoto Date: Tue May 18 17:45:54 2021 +0900 ALSA: oxfw: code refactoring for jumbo-payload quirk in OXFW970 This commit adds enumeration to describe quirks of OXFW ASICs. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 95d0c24d39552d38c14d12893271e723611b85ec Author: Takashi Sakamoto Date: Tue May 18 17:45:53 2021 +0900 ALSA: oxfw: add comment for the type of ASICs ALSA OXFW supports two types of ASICS; OXFW970 and OXFW971. The former is known to have a quirk we call 'jumbo payload' that some isochronous cycles are skipped to transfer isochronous packets during handling asynchronous transaction. The quirk seems to correspond to firmware initially delivered by Oxford Semiconductor since the quirk is not confirmed for Mackie Onyx Satellite in which the revised firmware is available. The quirk is not confirmed in the latter. This commit adds code comment to describe the quirk. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c59bc10e7f6a425e8f63ffcf375a9b019476577c Author: Takashi Sakamoto Date: Tue May 18 17:45:52 2021 +0900 ALSA: oxfw: add explicit device entry for Loud Technologies Mackie Onyx Sattelite Loud Technologies Mackie Onyx Satellite is identified as the model with OXFW970 ASIC. This commit adds explicit entry for the model. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2239924be45cccf3106ee6bee2fb5829a1348113 Author: Takashi Sakamoto Date: Tue May 18 17:45:51 2021 +0900 ALSA: oxfw: add explicit device entry for Loud Technologies Tapco Link.FireWire 4x6 Loud Technologies Tapco Link.FireWire 4x6 is identified as the model with OXFW970 ASIC. This commit adds explicit entry for the model. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit bb5d776b6d3034651b03687ba159a77d64f18d1a Author: Takashi Sakamoto Date: Tue May 18 17:45:50 2021 +0900 ALSA: oxfw: code refactoring to detect mackie models This commit changes condition statement to call mackie models detection just for the device entry. Additionally, comment is added for Onyx 1640i. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit c127d5cd350aa3018b5e1637fda50d33545d3876 Author: Takashi Sakamoto Date: Tue May 18 17:45:49 2021 +0900 ALSA: oxfw: code refactoring for existent device entry with specifier_id and version All of the devices known to be based on OXFW ASICs have the same layout of configuration ROM, in which unit directory includes vendor, model, specifier_id and version immediate values. Especially, the pair of specifier_id and version is fixed to represent AV/C general protocol. This commit refactors device entries to fulfil with these 4 elements. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ffe66bbee1526cd7abd4e77eb3ff27527aace8f6 Author: Takashi Sakamoto Date: Tue May 18 17:45:48 2021 +0900 ALSA: firewire-lib/motu: use int type for the value of bitwise OR with enumerator-constant It brings some inconvenience in practice to use enumerated type for variable to which bitwise OR with enumerator constant is assigned. This commit replaces declarations of enumerated type with int type. Suggested-by: Takashi Iwai Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 5d6fb80a142b5994355ce675c517baba6089d199 Author: Takashi Sakamoto Date: Tue May 18 17:45:47 2021 +0900 Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro" This reverts commit 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f. I've explained that optional FireWire card for d.2 is also built-in to d.2 Pro, however it's wrong. The optional card uses DM1000 ASIC and has 'Mackie DJ Mixer' in its model name of configuration ROM. On the other hand, built-in FireWire card for d.2 Pro and d.4 Pro uses OXFW971 ASIC and has 'd.Pro' in its model name according to manuals and user experiences. The former card is not the card for d.2 Pro. They are similar in appearance but different internally. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518084557.102681-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 56c1f0876293888f686e31278d183d4af2cac3c3 Author: Mauro Carvalho Chehab Date: Tue May 18 11:26:31 2021 +0200 media: sti: fix obj-$(config) targets The right thing to do is to add a new object to the building system when a certain config option is selected, and *not* override them. So, fix obj-$(config) logic at sti makefiles, using "+=", instead of ":=". Signed-off-by: Mauro Carvalho Chehab commit f5b3553b5019f22ac668651ea9cddb9fa675ac41 Author: Mauro Carvalho Chehab Date: Tue May 18 11:05:26 2021 +0200 scripts: coccicheck: fix troubles on non-English builds When LANG is not set to English, the logic which checks the number of CPUs fail, as the messages can be localized, and the logic at: THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd "[:digit:]") will not get the number of threads per core. This causes the script to not run properly, as it will produce a warning: $ make coccicheck COCCI=$PWD/scripts/coccinelle/misc/add_namespace.cocci MODE=report drivers/media/ ./scripts/coccicheck: linha 93: [: número excessivo de argumentos Fix it by forcing LANG=C when calling lscpu. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Julia Lawall commit 058acb33d100c5cceab10d2dd388cf9bc0918908 Author: Xie Yongji Date: Mon May 17 16:49:13 2021 +0800 drm/virtio: free virtqueues on probe failure We should call virtio_gpu_deinit() to free virtqueues when drm_dev_register() failed. Signed-off-by: Xie Yongji Link: http://patchwork.freedesktop.org/patch/msgid/20210517084913.403-3-xieyongji@bytedance.com Signed-off-by: Gerd Hoffmann commit cec7f1774605a5ef47c134af62afe7c75c30b0ee Author: Xie Yongji Date: Mon May 17 16:49:12 2021 +0800 drm/virtio: Fix double free on probe failure The virtio_gpu_init() will free vgdev and vgdev->vbufs on failure. But such failure will be caught by virtio_gpu_probe() and then virtio_gpu_release() will be called to do some cleanup which will free vgdev and vgdev->vbufs again. So let's set dev->dev_private to NULL to avoid double free. Signed-off-by: Xie Yongji Link: http://patchwork.freedesktop.org/patch/msgid/20210517084913.403-2-xieyongji@bytedance.com Signed-off-by: Gerd Hoffmann commit 17f46f488a5d82c5568e6e786cd760bba1c2ee09 Author: Xie Yongji Date: Mon May 17 16:49:11 2021 +0800 drm/virtio: Fixes a potential NULL pointer dereference on probe failure The dev->dev_private might not be allocated if virtio_gpu_pci_quirk() or virtio_gpu_init() failed. In this case, we should avoid the cleanup in virtio_gpu_release(). Signed-off-by: Xie Yongji Link: http://patchwork.freedesktop.org/patch/msgid/20210517084913.403-1-xieyongji@bytedance.com Signed-off-by: Gerd Hoffmann commit 3a291c974cf7ffb4fad4df6911b912536e511c9d Author: Al Viro Date: Mon May 17 20:16:51 2021 -0400 d_path: saner calling conventions for __dentry_path() 1) lift NUL-termination into the callers 2) pass pointer to the end of buffer instead of that to beginning. (1) allows to simplify dentry_path() - we don't need to play silly games with restoring the leading / of "//deleted" after __dentry_path() would've overwritten it with NUL. We also do not need to check if (either) prepend() in there fails - if the buffer is not large enough, we'll end with negative buflen after prepend() and __dentry_path() will return the right value (ERR_PTR(-ENAMETOOLONG)) just fine. Signed-off-by: Al Viro commit dfe5087675e66f3cce8d98447bf01602f3cdea24 Author: Al Viro Date: Mon May 17 21:11:45 2021 -0400 d_path: "\0" is {0,0}, not {0} Single-element array consisting of one NUL is spelled ""... Signed-off-by: Al Viro commit 135436a7d2cdd505aacc142f7f57e388b23ba73e Author: Gustavo A. R. Silva Date: Fri Nov 20 12:41:00 2020 -0600 xfrm: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 1c78ba4924107b06de60f887a0d20d9b3e9bc9e2 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:40:08 2020 -0600 tipc: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit bb63744b02e91df8bdc0d3025c7d9f48b77f6c75 Author: Rafał Miłecki Date: Wed May 12 18:02:53 2021 +0200 dt-bindings: pwm: brcm,iproc-pwm: convert to the json-schema This helps validating DTS files. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20210512160253.15000-1-zajec5@gmail.com Signed-off-by: Rob Herring commit 0572b37b27f4f26bfd53f0f10186fa1783b97421 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:39:41 2020 -0600 sctp: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement and replacing a comment with a goto statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit d0413118bbc306070d97c6a218960c39cb92ab5d Author: Luca Ceresoli Date: Wed May 12 17:23:11 2021 +0200 docs: dt: remove stale property-units.txt, link to current schema property-units.txt is not maintained anymore. New suffixes are now supported that have not been added here. To avoid people incorrectly think a given suffix is not in the list remove the file entirely and point to the authoritative place where the recommended suffixes are maintained. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210512152311.7399-1-luca@lucaceresoli.net Signed-off-by: Rob Herring commit 3754fa747dc0fb41cd1fd9a79bcb442dfe6802b3 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:38:47 2020 -0600 rds: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Håkon Bugge Signed-off-by: Gustavo A. R. Silva commit 5af5a020ddd10afc6caff05b4c941c2b1c17bf1d Author: Gustavo A. R. Silva Date: Fri Nov 20 12:38:20 2020 -0600 net/packet: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 6518e3fc972ed54772f81e8b89b17be47f6d55f3 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:38:15 2020 -0600 net: netrom: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 731d5f441e1c6c1c4f012ac43b644f63e9ae8478 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:36:20 2020 -0600 ide: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 58e31cf015e68e2696cbced6f2128ec68162ef17 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:36:09 2020 -0600 hwmon: (max6621) Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva commit 3752445d79ee73fc2cb08c35c82890b2ef5c9757 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:36:04 2020 -0600 hwmon: (corsair-cpro) Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Guenter Roeck Marius Zachmann Signed-off-by: Gustavo A. R. Silva commit 5ef73b6e652107bbdcf65d10a477cfc027ee9090 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:35:59 2020 -0600 firewire: core: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit f5e9724c42d94b9acf061cc8225c4778b22186b7 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:34:35 2020 -0600 braille_console: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 79121184f8e7c41c0ffe483f402b9d7f89256698 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:25:57 2020 -0600 ipv4: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit d66aea44b0ac7b58d9da8269ebd053f164e4aa54 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:00 2020 -0600 qlcnic: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a goto statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit cc9fd18032efada6433712f52de8d98dfbd00fd2 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:27:50 2020 -0600 bnxt_en: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 7153218aef73928dae49c55831cb8b1c12b08ca7 Author: Linus Walleij Date: Mon Apr 12 14:25:34 2021 +0200 ARM: dts: ux500: Drop drdy pin assignment from magnetometer This magnetometer can not select which line provided the outgoing IRQ so drop it, the DT bindings will complain too. Signed-off-by: Linus Walleij commit 4beba4011995a2c44ee27e1d358dc32e6b9211b3 Author: Linus Walleij Date: Sat May 15 02:02:34 2021 +0200 ARM: dts: ux500: Fix orientation of accelerometer This adds a mounting matrix to the accelerometer on the TVK1281618 R3. Signed-off-by: Linus Walleij commit 4917b702818872fdf2a9973705af3aa7d3d1f19e Author: Sebastian Reichel Date: Tue Apr 13 01:03:17 2021 +0200 ARM: dts: ux500: Rename gpio-controller node Rename the AB8500 gpio controller node from ab8500-gpio to ab8500-gpiocontroller, since -gpio is a common suffix for gpio consumers. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij commit e4ff0112a03c2e353c8457cd33c88feb89dfec41 Author: Sebastian Reichel Date: Tue Apr 13 01:03:16 2021 +0200 ARM: dts: ux500: Fix interrupt cells Fix interrupt cells in DT AB8500/AB8505 source files. The compiled DTB files will stay the same. Signed-off-by: Sebastian Reichel Signed-off-by: Linus Walleij commit 9b8b84c168b6c1e033a21b7a6880550a802ad378 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:31:24 2020 -0600 netxen_nic: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a goto statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit ebd0476256bea64fb0146f28a079c9aa9ce670c0 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:31:30 2020 -0600 nfp: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Simon Horman Signed-off-by: Gustavo A. R. Silva commit c3754da3b7391006eaafa41fb28239268655afa5 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:14 2020 -0600 reiserfs: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit fc7980915a8601b9a54c547a74dad0fdffc674a5 Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:46 2020 -0600 vxge: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a return statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 18a0e8d0f103af40c82f751fabb0b4cb0bf2f32a Author: Gustavo A. R. Silva Date: Fri Nov 20 12:32:51 2020 -0600 watchdog: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 47ce0b65bfb337a7bb4958b076ef8d2865d6d07c Author: Gustavo A. R. Silva Date: Fri Nov 20 12:34:24 2020 -0600 atm: fore200e: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva commit 963cdcc37e98b8dd2894a4a5d48c9d5fe0ae903b Author: Gustavo A. R. Silva Date: Fri Nov 20 12:33:19 2020 -0600 tee: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Jens Wiklander Signed-off-by: Gustavo A. R. Silva commit 8df12cbc0f9067f91b3da0f0ecb344c0a4ed4070 Author: Arnaldo Carvalho de Melo Date: Mon May 17 17:47:44 2021 -0300 perf tools: Test build with libbpf/LIBBPF_DYNAMIC=1 Now that libbpf-devel is more generally available (it is in fedora 34, for instance), make sure test building with it is performed. Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit 06b38e233ce4745571106cba4f39fc8c5eda9c29 Author: Juerg Haefliger Date: Mon May 17 11:58:33 2021 +0200 drivers/net: Remove leading spaces in Kconfig Remove leading spaces before tabs in Kconfig file(s) by running the following command: $ find drivers/net -name 'Kconfig*' | xargs sed -r -i 's/^[ ]+\t/\t/' Signed-off-by: Juerg Haefliger Signed-off-by: David S. Miller commit 25c55b38d85b54e49f2c9a3c7d483d1a24173b94 Author: Jiapeng Chong Date: Mon May 17 18:15:25 2021 +0800 net/packet: Remove redundant assignment to ret Variable ret is set to '0' or '-EBUSY', but this value is never read as it is not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: net/packet/af_packet.c:3936:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. net/packet/af_packet.c:3933:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 8ed2e60b7788825d71e70ed26160d327a588dee5 Merge: 9d8a29aed0353 e80fe71b3ffe1 Author: David S. Miller Date: Mon May 17 15:53:59 2021 -0700 Merge branch 'stmmac-xpcs-eee' Michael Sit Wei Hong says: ==================== Introducing support for DWC xpcs Energy Efficient Ethernet The goal of this patch set is to enable EEE in the xpcs so that when EEE is enabled, the MAC-->xpcs-->PHY have all the EEE related configurations enabled. Patch 1 adds the functions to enable EEE in the xpcs and sets it to transparent mode. Patch 2 adds the callbacks to configure the xpcs EEE mode. The results are tested by checking the lpi counters of the tx and rx path of the interface. When EEE is enabled, the lpi counters should increament as it enters and exits lpi states. host@EHL$ ethtool --show-eee enp0s30f4 EEE Settings for enp0s30f4: EEE status: disabled Tx LPI: disabled Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: Not reported Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full host@EHL$ ethtool -S enp0s30f4 | grep lpi irq_tx_path_in_lpi_mode_n: 0 irq_tx_path_exit_lpi_mode_n: 0 irq_rx_path_in_lpi_mode_n: 0 irq_rx_path_exit_lpi_mode_n: 0 host@EHL$ ethtool --set-eee enp0s30f4 eee on host@EHL$ [ 110.265154] intel-eth-pci 0000:00:1e.4 enp0s30f4: Link is Down [ 112.315155] intel-eth-pci 0000:00:1e.4 enp0s30f4: Link is Up - 1Gbps/Full - flow control off [ 112.324612] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s30f4: link becomes ready host@EHL$ ethtool --show-eee enp0s30f4 EEE Settings for enp0s30f4: EEE status: enabled - active Tx LPI: 1000000 (us) Supported EEE link modes: 100baseT/Full 1000baseT/Full Advertised EEE link modes: 100baseT/Full 1000baseT/Full Link partner advertised EEE link modes: 100baseT/Full 1000baseT/Full host@EHL$ ethtool -S enp0s30f4 | grep lpi irq_tx_path_in_lpi_mode_n: 6 irq_tx_path_exit_lpi_mode_n: 5 irq_rx_path_in_lpi_mode_n: 7 irq_rx_path_exit_lpi_mode_n: 6 host@EHL$ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.02 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.510 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.489 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.484 ms 64 bytes from 192.168.1.1: icmp_seq=5 ttl=64 time=0.504 ms 64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=0.466 ms 64 bytes from 192.168.1.1: icmp_seq=7 ttl=64 time=0.529 ms 64 bytes from 192.168.1.1: icmp_seq=8 ttl=64 time=0.519 ms 64 bytes from 192.168.1.1: icmp_seq=9 ttl=64 time=0.518 ms 64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=0.501 ms --- 192.168.1.1 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9216ms rtt min/avg/max/mdev = 0.466/0.553/1.018/0.155 ms host@EHL$ ethtool -S enp0s30f4 | grep lpi irq_tx_path_in_lpi_mode_n: 22 irq_tx_path_exit_lpi_mode_n: 21 irq_rx_path_in_lpi_mode_n: 21 irq_rx_path_exit_lpi_mode_n: 20 ==================== Signed-off-by: David S. Miller commit e80fe71b3ffe1ec31c4a9be60170f897bbdf1b92 Author: Michael Sit Wei Hong Date: Mon May 17 17:43:32 2021 +0800 net: stmmac: Add callbacks for DWC xpcs Energy Efficient Ethernet Link xpcs callback functions for MAC to configure the xpcs EEE feature. The clk_eee frequency is used to calculate the MULT_FACT_100NS. This is to adjust the clock tic closer to 100ns. Signed-off-by: Michael Sit Wei Hong Signed-off-by: David S. Miller commit 7617af3d1a5e0938eb1fd2742f19bcea772c7f8d Author: Michael Sit Wei Hong Date: Mon May 17 17:43:31 2021 +0800 net: pcs: Introducing support for DWC xpcs Energy Efficient Ethernet Add DWC xpcs EEE support callbacks.The callback function is used to set EEE registers on xpcs. xpcs transparent mode is enabled to allow PHY to detect MAC EEE status. Signed-off-by: Michael Sit Wei Hong Signed-off-by: David S. Miller commit 9d8a29aed03539a9012bff1232bacf062b5459cf Author: Dan Carpenter Date: Mon May 17 11:57:56 2021 +0300 alx: fix a double unlock in alx_probe() We're not holding the lock at this point so "goto unlock;" should be "goto unmap;" Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit b3e22e10fdda8e7be3830289a4a63ae8b88d450c Author: Loic Poulain Date: Mon May 17 11:53:34 2021 +0200 net: wwan: Add WWAN port type attribute The port type is by default part of the WWAN port device name. However device name can not be considered as a 'stable' API and may be subject to change in the future. This change adds a proper device attribute that can be used to determine the WWAN protocol/ type. Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 885e4056d56048a2dd38c693b257f1452e1fee68 Merge: 5796254e467bf 3bb3d6b1c1957 Author: David S. Miller Date: Mon May 17 15:34:43 2021 -0700 Merge branch 'stmmac-RK3568' Ezequiel Garcia says: ==================== stmmmac: RK3568 Here's the third version of this patchset, taking the feedback from Heiko and Chen-Yu Tsai. Although this solution is a tad ugly as it hardcodes the register addresses, we believe it's the most robust approach. See: https://lore.kernel.org/netdev/CAGb2v67ZBR=XDFPeXQc429HNu_dbY__-KN50tvBW44fXMs78_w@mail.gmail.com/ This is tested on RK3566 EVB2 and seems to work well. Once the RK3568 devicetree lands upstream, we'll post patches to add network support for RK3566 and RK3568. ==================== Signed-off-by: David S. Miller commit 3bb3d6b1c1957e88bfc5e77a4557f7e6ba761fe3 Author: David Wu Date: Mon May 17 12:40:37 2021 -0300 net: stmmac: Add RK3566/RK3568 SoC support Add constants and callback functions for the dwmac present on RK3566/RK3568 SoCs. RK3568 has two MACs, and RK3566 just one, but it's otherwise the same IP core. Signed-off-by: David Wu [Ezequiel: Separate rk3566-gmac support] Signed-off-by: Ezequiel Garcia Signed-off-by: David S. Miller commit f9da1c9d7fb5e26272a060089c19823f748aab73 Author: Ezequiel Garcia Date: Mon May 17 12:40:36 2021 -0300 dt-bindings: net: rockchip-dwmac: add rk3568 compatible string Add compatible string for RK3568 gmac, and constrain it to be compatible with Synopsys dwmac 4.20a. Signed-off-by: Ezequiel Garcia Signed-off-by: David S. Miller commit 37c80d15ff4bf7526caf5de8b8cab17ac8769d4c Author: David Wu Date: Mon May 17 12:40:35 2021 -0300 net: stmmac: dwmac-rk: Check platform-specific ops Add a check for non-null struct rk_gmac_ops for the configured PHY interface mode, failing if unsupported. Signed-off-by: David Wu [Ezequiel: Refactor so it fails if unsupported] Signed-off-by: Ezequiel Garcia Signed-off-by: David S. Miller commit d6b0625163a8948341d12cac420402a31093b5ed Author: Ezequiel Garcia Date: Mon May 17 12:40:34 2021 -0300 net: stmmac: Don't set has_gmac if has_gmac4 is set Some Rockchip platforms have a GMAC4 core, and therefore 'plat_stmmacenet_data.has_gmac' shouldn't be set if 'plat_stmmacenet_data.has_gmac4' is set. Signed-off-by: Ezequiel Garcia Signed-off-by: David S. Miller commit 5796254e467bf1cff002df65fbb53ecef6a0e060 Author: Yejune Deng Date: Mon May 17 20:22:05 2021 +0800 net: Remove the member netns_ok Every protocol has the 'netns_ok' member and it is euqal to 1. The 'if (!prot->netns_ok)' always false in inet_add_protocol(). Signed-off-by: Yejune Deng Signed-off-by: David S. Miller commit 609c8ae87966b60ace1ea70624b566bf686d43c9 Merge: 16145dbde18a1 b0d80c013b04a Author: David S. Miller Date: Mon May 17 15:15:47 2021 -0700 Merge branch 'mlxsw-next' Ido Schimmel says: ==================== mlxsw: Various updates This patchset contains various updates to the mlxsw driver and related selftests. Patches #1-#5 contain various updates to mlxsw selftests. The most significant change is the conversion of the DCB selftests to use the new iproute2 DCB support. Patches #6-#9 contain mostly trivial changes to the driver itself. No user facing changes. Patches #10-#11 remove support for SwitchX-2 and SwitchIB ASICs that did not see any updates in the last 4-5 years and will not see any in the future. See individual commit messages for detailed explanation as to why it is OK to remove these drivers from the kernel. ==================== Signed-off-by: David S. Miller commit b0d80c013b04a13323f117764c77ef211af28aaf Author: Amit Cohen Date: Mon May 17 20:04:01 2021 +0300 mlxsw: Remove Mellanox SwitchX-2 ASIC support Initial support for the Mellanox SwitchX-2 ASIC was added in July 2015. Since then all development efforts shifted towards the Mellanox Spectrum ASICs and development of this driver stopped beside trivial fixes and refactoring. Therefore, the driver does not support any switch offloads and simply traps all traffic to the CPU, rendering it irrelevant for deployment. In addition, support for this ASIC was dropped by Mellanox a few years ago. Given the driver is not used by any users and that there is no intention of investing in its development, remove it from the kernel. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 9b43fbb8ce243603444780c0bbb962a047a35b7c Author: Amit Cohen Date: Mon May 17 20:04:00 2021 +0300 mlxsw: Remove Mellanox SwitchIB ASIC support Initial support for the Mellanox SwitchIB and SwitchIB-2 ASICs was added in October 2016, but since then development of this driver stopped. Therefore, the driver does not support any offloads and simply registers devlink ports for its front panel ports, rendering it irrelevant for deployment. Given the driver is not used by any users and that there is no intention of investing in its development, remove it from the kernel. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 51746a353b44f9e2635ebbe278c46b2d9303c9d9 Author: Ido Schimmel Date: Mon May 17 20:03:59 2021 +0300 mlxsw: spectrum_router: Avoid missing error code warning Explicitly set the error code to zero before the goto statement to avoid the following smatch warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3598 mlxsw_sp_nexthop_group_refresh() warn: missing error code 'err' The warning is a false positive, but the change both suppresses the warning and makes it clear to future readers that this is not an error path. The original report and discussion can be found here [1]. [1] https://lore.kernel.org/lkml/202105141823.Td2h3Mbi-lkp@intel.com/ Cc: Dan Carpenter Suggested-by: Dan Carpenter Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 8c2b58e65d0186af5f73c7b78e46b798166d7f68 Author: Ido Schimmel Date: Mon May 17 20:03:58 2021 +0300 mlxsw: core: Avoid unnecessary EMAD buffer copy mlxsw_emad_transmit() takes care of sending EMAD transactions to the device. Since these transactions can time out, the driver performs up to 5 retransmissions, each time copying the skb with the original request. The data of the skb does not change throughout the process, so there is no need to copy it each time. Instead, only the skb itself can be copied. Therefore, use skb_clone() instead of skb_copy(). This reduces the latency of the function by about 16%. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 837ec05cfea08284c575e8e834777b107da5ff9d Author: Danielle Ratson Date: Mon May 17 20:03:57 2021 +0300 mlxsw: Verify the accessed index doesn't exceed the array length There are few cases in which an array index queried from a fw register, is accessed without any validation that it doesn't exceed the array length. Add a proper length validation, so accessing memory past the end of an array will be forbidden. Signed-off-by: Danielle Ratson Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ece5df874d3a80fcade92ca3b3877bd78dbb6116 Author: Danielle Ratson Date: Mon May 17 20:03:56 2021 +0300 mlxsw: spectrum_buffers: Switch function arguments In the call path: mlxsw_sp_hdroom_bufs_reset_sizes() mlxsw_sp_hdroom_int_buf_size_get() ->int_buf_size_get() The 'speed' and 'mtu' arguments were mistakenly switched twice. The two bugs thus canceled each other. Clean this up by switching the arguments in both call sites, so that they are passed in the right order. Found during manual code inspection. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b4d786941b585ee0075decd531660852bea81479 Author: Petr Machata Date: Mon May 17 20:03:55 2021 +0300 selftests: mlxsw: qos_lib: Drop __mlnx_qos Now that the two users of this helper have been converted to iproute2 dcb, it is not necessary anymore. Drop it. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b0bab2298ec9b3a837f8ef4a0cae4b42a4d03365 Author: Petr Machata Date: Mon May 17 20:03:54 2021 +0300 selftests: mlxsw: qos_pfc: Convert to iproute2 dcb There is a dedicated tool for configuration of DCB in iproute2 now. Use it in the selftest instead of mlnx_qos. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 9a1cac062d3ee884d66dd4fc61ada224b587d40c Author: Petr Machata Date: Mon May 17 20:03:53 2021 +0300 selftests: mlxsw: qos_headroom: Convert to iproute2 dcb There is a dedicated tool for configuration of DCB in iproute2 now. Use it in the selftest instead of mlnx_qos. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 16355c0b101e783d57c2e155ef543cb9111205a4 Author: Ido Schimmel Date: Mon May 17 20:03:52 2021 +0300 selftests: mlxsw: Make sampling test more robust The test sometimes fails with an error message such as: TEST: tc sample (w/ flower) rate (egress) [FAIL] Expected 100 packets, got 70 packets, which is -30% off. Required accuracy is +-25% Make the test more robust by generating more packets, therefore increasing the number of expected samples. Decrease the transmission delay in order not to needlessly prolong the test. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5d01071e64b6ddca3f4c86154407307e482959b4 Author: Danielle Ratson Date: Mon May 17 20:03:51 2021 +0300 selftests: mlxsw: Make the unsplit array global in port_scale test Currently, the array of the ports that were split in the port_scale test is local, so the port_cleanup() unsplits an empty array. Make the array global so the cleanup will be preformed properly. Suggested-by: Petr Machata Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d22fe808f9a3456f16015e79f1b86a10ce13099f Merge: 1a7910368cba1 6efb943b8616e Author: Rodrigo Vivi Date: Mon May 17 17:48:02 2021 -0400 Merge drm/drm-next into drm-intel-next Time to get back in sync... Signed-off-by: Rodrigo Vivi commit 16145dbde18a114cc95e0811ba4e2a41e3b27314 Merge: 7cb7541a8cc07 5a9594cf1d143 Author: David S. Miller Date: Mon May 17 14:12:39 2021 -0700 Merge branch 'func-names-comment' Yang Shen says: ==================== Rid W=1 warnings in net This is a set to fully clean drivers/net. ==================== Signed-off-by: David S. Miller commit 5a9594cf1d143a713a148aaa62b64e6a6de97fb3 Author: Yang Shen Date: Mon May 17 12:45:35 2021 +0800 net: hisilicon: hns: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:121: warning: expecting prototype for hns_mac_is_adjust_link(). Prototype was for hns_mac_need_adjust_link() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:386: warning: expecting prototype for hns_mac_queue_config_bc_en(). Prototype was for hns_mac_port_config_bc_en() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:607: warning: expecting prototype for hns_mac_set_autoneg(). Prototype was for hns_mac_set_pauseparam() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:236: warning: expecting prototype for hns_ppe_qid_cfg(). Prototype was for hns_dsaf_ppe_qid_cfg() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:623: warning: expecting prototype for dsaf_tbl_tcam_mcast_cfg(). Prototype was for hns_dsaf_tbl_tcam_mcast_cfg() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:1220: warning: expecting prototype for hns_dsaf_tbl_tcam_init(). Prototype was for hns_dsaf_comm_init() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2121: warning: expecting prototype for dsaf_pfc_unit_cnt(). Prototype was for hns_dsaf_pfc_unit_cnt() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2153: warning: expecting prototype for dsaf_port_work_rate_cfg(). Prototype was for hns_dsaf_port_work_rate_cfg() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2745: warning: expecting prototype for hns_dsaf_get_sset_count(). Prototype was for hns_dsaf_get_regs_count() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:2957: warning: expecting prototype for dsaf_probe(). Prototype was for hns_dsaf_probe() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c:3011: warning: expecting prototype for dsaf_remove(). Prototype was for hns_dsaf_remove() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:366: warning: expecting prototype for hns_dsaf_srst_chns(). Prototype was for hns_dsaf_srst_chns_acpi() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:509: warning: expecting prototype for hns_mac_get_sds_mode(). Prototype was for hns_mac_get_phy_if() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:303: warning: expecting prototype for ppe_init_hw(). Prototype was for hns_ppe_init_hw() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:350: warning: expecting prototype for ppe_uninit_hw(). Prototype was for hns_ppe_uninit_hw() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:391: warning: expecting prototype for hns_ppe_reset(). Prototype was for hns_ppe_reset_common() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c:464: warning: expecting prototype for ppe_get_strings(). Prototype was for hns_ppe_get_strings() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:920: warning: expecting prototype for rcb_get_sset_count(). Prototype was for hns_rcb_get_ring_regs_count() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c:112: warning: expecting prototype for hns_xgmac_tx_lf_rf_insert(). Prototype was for hns_xgmac_lf_rf_insert() instead drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c:122: warning: expecting prototype for hns_xgmac__lf_rf_control_init(). Prototype was for hns_xgmac_lf_rf_control_init() instead drivers/net/ethernet/hisilicon/hns/hns_enet.c:777: warning: expecting prototype for hns_nic_adp_coalesce(). Prototype was for hns_nic_adpt_coalesce() instead drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:202: warning: expecting prototype for hns_nic_set_link_settings(). Prototype was for hns_nic_set_link_ksettings() instead drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:837: warning: expecting prototype for get_ethtool_stats(). Prototype was for hns_get_ethtool_stats() instead drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:894: warning: expecting prototype for get_strings(). Prototype was for hns_get_strings() instead Cc: Yisen Zhuang Cc: Salil Mehta Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 1f2d109e8363ef6c6df990fb29afcf44a6e3c5a5 Author: Yang Shen Date: Mon May 17 12:45:34 2021 +0800 net: phy: Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/phy/adin.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/phy/rockchip.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Heiner Kallweit Cc: Russell King Signed-off-by: Yang Shen Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 03055a25213b910d8c74808e728c737638392dff Author: Yang Shen Date: Mon May 17 12:45:33 2021 +0800 net: via: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/via/via-velocity.c:1908: warning: expecting prototype for tx_srv(). Prototype was for velocity_tx_srv() instead drivers/net/ethernet/via/via-velocity.c:2466: warning: expecting prototype for velocity_get_status(). Prototype was for velocity_get_stats() instead drivers/net/ethernet/via/via-velocity.c:3734: warning: expecting prototype for velocity_cleanup(). Prototype was for velocity_cleanup_module() instead Cc: Francois Romieu Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 85ead77dc3d58adcca7b74afa02c1b2083e4c2ac Author: Yang Shen Date: Mon May 17 12:45:32 2021 +0800 net: ti: Fix wrong struct name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/ti/cpsw_ale.c:88: warning: expecting prototype for struct ale_dev_id. Prototype was for struct cpsw_ale_dev_id instead Cc: Cyril Chemparathy Cc: Grygorii Strashko Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 40d9fca8b3fd7c4617c2af064d7ec8124cd79c75 Author: Yang Shen Date: Mon May 17 12:45:31 2021 +0800 net: socionext: Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/socionext/sni_ave.c:28: warning: expecting prototype for sni_ave.c(). Prototype was for AVE_IDR() instead Signed-off-by: Yang Shen Reviewed-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 61633d71a71c4bcc27f43c9020fcb15137de6dd5 Author: Yang Shen Date: Mon May 17 12:45:30 2021 +0800 net: samsung: sxgbe: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:797: warning: expecting prototype for sxgbe_tx_clean(). Prototype was for sxgbe_tx_all_clean() instead drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c:1026: warning: expecting prototype for sxgbe_init_tx_coalesce(). Prototype was for sxgbe_tx_init_coalesce() instead Cc: Byungho An Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 9f2e6fb6341349f1ec4565a055669bf4ac14e321 Author: Yang Shen Date: Mon May 17 12:45:29 2021 +0800 net: calxeda: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c:761: warning: expecting prototype for qlcnic_83xx_idc_cold_state(). Prototype was for qlcnic_83xx_idc_cold_state_handler() instead drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c:192: warning: expecting prototype for qlcnic_83xx_vnic_opmode(). Prototype was for qlcnic_83xx_config_vnic_opmode() instead Cc: Shahed Shaikh Cc: Manish Chopra Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit a507b16445240fc655721debd6beeac43f020bcb Author: Yang Shen Date: Mon May 17 12:45:28 2021 +0800 net: netronome: nfp: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/netronome/nfp/ccm_mbox.c:52: warning: expecting prototype for struct nfp_ccm_mbox_skb_cb. Prototype was for struct nfp_ccm_mbox_cmsg_cb instead drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c:35: warning: expecting prototype for struct nfp_tun_pre_run_rule. Prototype was for struct nfp_tun_pre_tun_rule instead drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c:38: warning: expecting prototype for NFFW_INFO_VERSION history(). Prototype was for NFFW_INFO_VERSION_CURRENT() instead Cc: Simon Horman Cc: Jakub Kicinski Signed-off-by: Yang Shen Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 146c91e2bc9a11e6091dce31caacf004dd9c7443 Author: Yang Shen Date: Mon May 17 12:45:27 2021 +0800 net: neterion: vxge: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/neterion/vxge/vxge-config.c:4895: warning: expecting prototype for vxge_hw_vpath_rx_doorbell_post(). Prototype was for vxge_hw_vpath_rx_doorbell_init() instead drivers/net/ethernet/neterion/vxge/vxge-main.c:1814: warning: expecting prototype for vxge_poll(). Prototype was for vxge_poll_msix() instead drivers/net/ethernet/neterion/vxge/vxge-main.c:4761: warning: expecting prototype for vxge_rem_nic(). Prototype was for vxge_remove() instead Cc: Jon Mason Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit dc432f5acb8692c3e62bd4d9ab513187a56483ff Author: Yang Shen Date: Mon May 17 12:45:26 2021 +0800 net: neterion: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/neterion/s2io.c:2759: warning: expecting prototype for s2io_poll(). Prototype was for s2io_poll_msix() instead drivers/net/ethernet/neterion/s2io.c:5304: warning: expecting prototype for s2io_ethtol_get_link_ksettings(). Prototype was for s2io_ethtool_get_link_ksettings() instead Cc: Jon Mason Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 331a3219d3b6c23988289eb29cf292d3006cd424 Author: Yang Shen Date: Mon May 17 12:45:25 2021 +0800 net: microchip: Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/microchip/encx24j600.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jon Ringle Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 229fd41f64474e3ca739f4128983f989f928bb42 Author: Yang Shen Date: Mon May 17 12:45:24 2021 +0800 net: micrel: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/micrel/ksz884x.c:2163: warning: expecting prototype for sw_get_board_storm(). Prototype was for sw_get_broad_storm() instead drivers/net/ethernet/micrel/ksz884x.c:2985: warning: expecting prototype for port_w_phy(). Prototype was for hw_w_phy() instead drivers/net/ethernet/micrel/ksz884x.c:4792: warning: expecting prototype for transmit_done(). Prototype was for tx_done() instead Cc: Tristram Ha Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit d6174870c0f1f1049bd4ae1971527fd5901fedf9 Author: Yang Shen Date: Mon May 17 12:45:23 2021 +0800 net: huawei: hinic: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c:604: warning: expecting prototype for cmdq_arm_ceq_handler(). Prototype was for cmdq_sync_cmd_handler() instead drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:59: warning: expecting prototype for get_capability(). Prototype was for parse_capability() instead drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:101: warning: expecting prototype for get_cap_from_fw(). Prototype was for get_capability() instead drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:355: warning: expecting prototype for clear_io_resource(). Prototype was for clear_io_resources() instead drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:1100: warning: expecting prototype for hinic_hwdev_get_sq(). Prototype was for hinic_hwdev_get_rq() instead drivers/net/ethernet/huawei/hinic/hinic_hw_if.c:341: warning: expecting prototype for dma_attr_table_init(). Prototype was for dma_attr_init() instead drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c:904: warning: expecting prototype for hinic_put_wqe(). Prototype was for hinic_rq_put_wqe() instead drivers/net/ethernet/huawei/hinic/hinic_main.c:241: warning: expecting prototype for create_txqs(). Prototype was for create_rxqs() instead drivers/net/ethernet/huawei/hinic/hinic_main.c:295: warning: expecting prototype for free_txqs(). Prototype was for free_rxqs() instead drivers/net/ethernet/huawei/hinic/hinic_tx.c:667: warning: expecting prototype for free_all_rx_skbs(). Prototype was for free_all_tx_skbs() instead Cc: Bin Luo Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 1eb00ff517f40c8c170b32532b26f48da575fdb7 Author: Yang Shen Date: Mon May 17 12:45:22 2021 +0800 net: chelsio: cxgb4vf: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/chelsio/cxgb4vf/sge.c:966: warning: expecting prototype for check_ring_tx_db(). Prototype was for ring_tx_db() instead Cc: Raju Rangoju Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit e0333b1bb174e38db03943fb3138866bbec979bc Author: Yang Shen Date: Mon May 17 12:45:21 2021 +0800 net: chelsio: cxgb4: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/chelsio/cxgb3/sge.c:677: warning: expecting prototype for free_qset(). Prototype was for t3_free_qset() instead drivers/net/ethernet/chelsio/cxgb3/sge.c:1266: warning: expecting prototype for eth_xmit(). Prototype was for t3_eth_xmit() instead Cc: Raju Rangoju Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit aeed744a49ba64a53095d6020e5533b9477fc7f4 Author: Yang Shen Date: Mon May 17 12:45:20 2021 +0800 net: chelsio: cxgb3: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/chelsio/cxgb3/sge.c:677: warning: expecting prototype for free_qset(). Prototype was for t3_free_qset() instead drivers/net/ethernet/chelsio/cxgb3/sge.c:1266: warning: expecting prototype for eth_xmit(). Prototype was for t3_eth_xmit() instead Cc: Raju Rangoju Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 2e45d961a6a851897a4db15a4f6b2d9feb123c65 Author: Yang Shen Date: Mon May 17 12:45:19 2021 +0800 net: calxeda: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/calxeda/xgmac.c:720: warning: expecting prototype for init_xgmac_dma_desc_rings(). Prototype was for xgmac_dma_desc_rings_init() instead drivers/net/ethernet/calxeda/xgmac.c:867: warning: expecting prototype for xgmac_tx(). Prototype was for xgmac_tx_complete() instead drivers/net/ethernet/calxeda/xgmac.c:1049: warning: expecting prototype for xgmac_release(). Prototype was for xgmac_stop() instead drivers/net/ethernet/calxeda/xgmac.c:1822: warning: expecting prototype for xgmac_dvr_remove(). Prototype was for xgmac_remove() instead Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit c1167cee462d5a2d446a51189fdd3b0534cf5add Author: Yang Shen Date: Mon May 17 12:45:18 2021 +0800 net: cadence: Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/cadence/macb_pci.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/net/ethernet/cadence/macb_ptp.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Nicolas Ferre Cc: Claudiu Beznea Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 5a02bf4fefd5e6e3588d650ccef79a768621d07b Author: Yang Shen Date: Mon May 17 12:45:17 2021 +0800 net: brocade: bna: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/brocade/bna/bfa_cee.c:91: warning: expecting prototype for bfa_cee_get_attr_isr(). Prototype was for bfa_cee_get_stats_isr() instead Cc: Rasesh Mody Cc: Sudarsana Kalluru Cc: GR-Linux-NIC-Dev@marvell.com Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit 76d85049173ba0138ab61b29c0f1ee35bf7da5fa Author: Yang Shen Date: Mon May 17 12:45:16 2021 +0800 net: broadcom: bnx2x: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:13595: warning: expecting prototype for bnx2x_get_num_none_def_sbs(). Prototype was for bnx2x_get_num_non_def_sbs() instead drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c:4165: warning: expecting prototype for atomic_add_ifless(). Prototype was for __atomic_add_ifless() instead drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c:4193: warning: expecting prototype for atomic_dec_ifmoe(). Prototype was for __atomic_dec_ifmoe() instead Cc: Ariel Elior Cc: Sudarsana Kalluru Cc: GR-everest-linux-l2@marvell.com Signed-off-by: Yang Shen Signed-off-by: David S. Miller commit c706c75aaee20e5ee05a05f6504a5711e473002e Author: Yang Shen Date: Mon May 17 12:45:15 2021 +0800 net: atheros: atl1x: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/atheros/atlx/atl1.c:1020: warning: expecting prototype for atl1_setup_mem_resources(). Prototype was for atl1_setup_ring_resources() instead Cc: Chris Snook Signed-off-by: Yang Shen Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b43e1554a7cf785afdcb91df259bbe8dfe0e729d Author: Yang Shen Date: Mon May 17 12:45:14 2021 +0800 net: atheros: atl1e: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/atheros/atl1e/atl1e_main.c:367: warning: expecting prototype for atl1e_set_mac(). Prototype was for atl1e_set_mac_addr() instead drivers/net/ethernet/atheros/atl1e/atl1e_main.c:796: warning: expecting prototype for atl1e_setup_mem_resources(). Prototype was for atl1e_setup_ring_resources() instead Cc: Chris Snook Signed-off-by: Yang Shen Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8965c1c535b1514b1b5a90b7de49334ba9e3851d Author: Yang Shen Date: Mon May 17 12:45:13 2021 +0800 net: atheros: atl1c: Fix wrong function name in comments Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/atheros/atl1c/atl1c_main.c:442: warning: expecting prototype for atl1c_set_mac(). Prototype was for atl1c_set_mac_addr() instead drivers/net/ethernet/atheros/atl1c/atl1c_main.c:969: warning: expecting prototype for atl1c_setup_mem_resources(). Prototype was for atl1c_setup_ring_resources() instead drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1375: warning: expecting prototype for atl1c_configure(). Prototype was for atl1c_configure_mac() instead Cc: Chris Snook Signed-off-by: Yang Shen Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1d7f7ecadc5ac94aaca15c4dcfc910848d66103f Author: Yang Shen Date: Mon May 17 12:45:12 2021 +0800 net: arc: Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/arc/emac_rockchip.c:18: warning: expecting prototype for emac(). Prototype was for DRV_NAME() instead Signed-off-by: Yang Shen Reviewed-by: Heiko Stuebner Signed-off-by: David S. Miller commit 7cb7541a8cc070e9b2ee66cb0b72b1ceb1feef7d Author: Heiner Kallweit Date: Sat May 15 13:53:21 2021 +0200 r8169: use KBUILD_MODNAME instead of own module name definition Remove own module name definition and use KBUILD_MODNAME instead. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 58fee5fc83658aaacf60246aeab738946a9ba516 Merge: 77091933e453a 6101ca0384e37 Author: David S. Miller Date: Mon May 17 13:47:58 2021 -0700 Merge branch 'ipv4-unicast' Seth David Schoen says: ==================== Treat IPv4 lowest address as ordinary unicast address Treat the lowest address in a subnet (the address within the subnet which contains all 0 bits) as an ordinary unicast address instead of as a potential second broadcast address. For example, in subnet 192.168.17.24/29, which contains 8 addresses, make address 192.168.17.24 usable as a normal unicast address (while continuing to support 192.168.17.31 as a broadcast address). Since EVERY network number or subnet formerly had its host number 0 reserved, this patchset adds 1 more usable host address to every network and subnet (i.e., 2^(32-n)-1 instead of 2^(32-n)-2 addresses available for assignment on each IPv4 /n subnet). For small subnets, this is a significant gain; instead of 6 usable host addresses, a /29 would now contain 7, a 16% increase. The reserving of host number 0 for broadcast came about in RFC 1122 from 1989 (page 31, "IP addresses are not permitted to have the value 0 or -1 for any of the , , or fields (except in the special cases listed above)" and page 66, "There is a class of hosts [4.2BSD Unix and its derivatives, but not 4.3BSD] that use non-standard broadcast address forms, substituting 0 for -1. All hosts SHOULD recognize and accept any of these non-standard broadcast addresses as the destination address of an incoming datagram."). This has been repeated in subsequent RFCs, always with backwards-compatibility rationales. Network troubles (broadcast storms) ensued when some early hosts on a LAN treated the lowest address as unicast and others treated it as broadcast. Multiple 1989 changes to IP successfully prevented these. The key was adding the layering violation rule requiring hosts to ignore all IP datagrams with unicast destination addresses that were received in low-level (Ethernet) broadcasts. That change is still in effect, and this patchset does not alter it. All operating systems since 4.3BSD, including all the current BSD OSes, now use the standard IP broadcast address. 4.2BSD has been obsolete for more than 30 years, and all modern hosts ignore hardware broadcasts containing unicast IP addresses, so there is no modern likelihood of broadcast storms even when hosts disagree on the unicast vs. broadcast status of a given address. Tests with this patchset show that other Linux hosts on the local segment simply ignore a host numbered with the lowest address, both for incoming and outgoing packet purposes. They don't interoperate with it, but they also don't cause broadcast storms or any other malfunction. If patched, they have no trouble interoperating with a host at the lowest address. Unmodified "distant" hosts that are not on the same segment successfully interoperate, as long as the gateway on the local segment, and the local host itself using the lowest address, have this patch. (Distant hosts have no way of knowing whether a given address is the lowest address in a faraway network segment, so they treat it no differently than any other unicast address.) This means that each local site can change this behavior locally, resulting immediately in global interoperability with the newly usable lowest local address. Modern software and documentation continues to use the definition of the directed, or "net-directed", broadcast address as "a host ID of all one bits". The Internet no longer gets any benefit from having two different broadcast addresses usable on every Ethernet segment. I have not been able to find any documentation that suggests that users or software should ever intentionally use the all-zero form, or that justifies it other than as a historic Berkeleyism. RFCs 1112, 1812, and 3021 state that hosts and routers need to maintain compatibility with the old form -- but they give no rationale other than the past existence of the 4.2BSD behavior. We're happy to provide more historical details or information about behavior of other systems in this regard by e-mail or as future patches to kernel documentation files. ==================== Signed-off-by: David S. Miller commit 6101ca0384e3778cf6ad4f938fbc094a0386ec01 Author: Seth David Schoen Date: Wed May 12 21:38:25 2021 -0700 selftests: Lowest IPv4 address in a subnet is valid Expect the lowest IPv4 address in a subnet to be assignable and addressable as a unicast (non-broadcast) address on a local network segment. Signed-off-by: Seth David Schoen Suggested-by: John Gilmore Acked-by: Dave Taht Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 94c821c74bf5fe0c25e09df5334a16f98608db90 Author: Seth David Schoen Date: Wed May 12 21:37:49 2021 -0700 ip: Treat IPv4 segment's lowest address as unicast Treat only the highest, not the lowest, IPv4 address within a local subnet as a broadcast address. Signed-off-by: Seth David Schoen Suggested-by: John Gilmore Acked-by: Dave Taht Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 644adc3d0ff05f49fae9a7549e27dfd7e9a5afe5 Author: Thomas Zimmermann Date: Sun May 16 21:51:35 2021 +0200 drm: Mark IRQ_BUSID ioctl as legacy The functionality is only implemented for legacy drivers. Mark the ioctl as legacy and move the code behind CONFIG_DRM_LEGACY. If legacy drivers are disabled, the ioctl call now returns -EINVAL instead of -EOPNOTSUPP. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210516195135.3755-1-tzimmermann@suse.de commit 614b27402285f9154816ea149c90b9d74de6b4df Author: Thomas Zimmermann Date: Sun May 16 21:19:18 2021 +0200 drm: Remove unused branch in legacy PCI initialization The legacy PCI init code sets the drvdata for drivers with MODESET flag, but none of the old UMS drivers sets the flag. Remove the branch. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210516191918.20974-1-tzimmermann@suse.de commit 7988fdf5f0a3a7625360ede8eb1f2f1196def821 Author: Thomas Zimmermann Date: Sun May 16 20:59:37 2021 +0200 drm: Don't include drm_legacy.h in drm_lease.c DRM leases do not use DRM legacy code. Remove the rsp include statement. Signed-off-by: Thomas Zimmermann Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210516185937.5644-4-tzimmermann@suse.de commit 9475b9638ecacbae373933c9375030248886be58 Author: Thomas Zimmermann Date: Sun May 16 20:59:36 2021 +0200 drm/nouveau: Don't include drm_legacy.h Nouveau does not use DRM legacy code. Remove the rsp. include statement. Signed-off-by: Thomas Zimmermann Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210516185937.5644-3-tzimmermann@suse.de commit f36709216e9b65872e43035dfcf8a5f7d45041f1 Author: Thomas Zimmermann Date: Sun May 16 20:59:35 2021 +0200 drm/i915: Don't include drm_legacy.h i915 does not use DRM legacy code. Remove the rsp include statements. Signed-off-by: Thomas Zimmermann Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210516185937.5644-2-tzimmermann@suse.de commit 35f1fceaa288ee0954ced2d740b95211aef4cc80 Author: Chun-Hung Tseng Date: Sun May 16 18:59:55 2021 +0800 Documentation: scheduler: fixed 2 typos in sched-nice-design.rst This patch fixed 2 spelling errors in the documentation. Signed-off-by: Chun-Hung Tseng Link: https://lore.kernel.org/r/20210516105955.120651-1-henrybear327@gmail.com Signed-off-by: Jonathan Corbet commit 6586f2d8cec186ef0af7cf6a0738293fea048ed8 Author: Yanteng Si Date: Mon May 17 21:37:48 2021 +0800 docs/zh_CN: add core api kobject translation This patch translates Documentation/core-api/kobject.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210517133748.3461357-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit b345b9ab1d0c7811f96d87cfb87a6cda01624b16 Author: Yanteng Si Date: Mon May 17 21:29:27 2021 +0800 docs/zh_CN: add core-api workqueue.rst translation This patch translates Documentation/core-api/workqueue.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210517132927.3461185-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit eb2e708b9727806893e379c091184270c5468a6c Author: Yanteng Si Date: Mon May 17 16:46:15 2021 +0800 docs/zh_CN: add core-api printk-formats.rst translation This patch translates Documentation/core-api/printk-formats.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Reviewed-by: Jiaxun Yang Link: https://lore.kernel.org/r/b9dea1426e43d8848f1a8b7319c002418aebd3df.1621239725.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 7c0066d132d237db6702804aa1fcb18fefcda00b Author: Yanteng Si Date: Mon May 17 16:46:14 2021 +0800 docs/zh_CN: add core-api printk-basics.rst translation This patch translates Documentation/core-api/printk-basics.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Reviewed-by: Jiaxun Yang Link: https://lore.kernel.org/r/1610df76720b69f3f81bff27403e70e86c0875c5.1621239725.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 94c1fbd487b33a28ea7f0da076a2cba6d0f410cf Author: Yanteng Si Date: Mon May 17 16:46:13 2021 +0800 docs/zh_CN: add core-api kernel-api.rst translation This patch translates Documentation/core-api/kernel-api.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/d79e2d1f37bae52ce6fce0efb2fa4a32a89165fb.1621239725.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit c2b1063e8feb2115537addce10f36c0c82d11d9b Author: Thomas Gleixner Date: Fri Apr 2 08:23:25 2021 +0200 genirq: Add a IRQF_NO_DEBUG flag The whole call to note_interrupt() can be avoided or return early when interrupts would be marked accordingly. For IPI handlers which always return HANDLED the whole procedure is pretty pointless to begin with. Add a IRQF_NO_DEBUG flag and mark the interrupt accordingly if supplied when the interrupt is requested. When noirqdebug is set on the kernel commandline, then the interrupt is marked unconditionally so that there is only one condition in the hotpath to evaluate. [ clg: Add changelog ] Signed-off-by: Thomas Gleixner Signed-off-by: Cédric Le Goater Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/7a8ad02f-63a8-c1aa-fdd1-39d973593d02@kaod.org commit 55e0990231a980459393729e253c26759172744a Author: Wu XiangCheng Date: Mon May 17 18:35:47 2021 +0800 docs/zh_CN: Add translation zh_CN/maintainer/modifying-patches.rst Add a new translation Documentation/translations/zh_CN/maintainer/modifying-patches.rst and link it to zh_CN/maintainer/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/35e6878cb634db61c573fc7fdc69ef4c5d8ae31c.1621243426.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 91643aba949347ab46b870524dd9348781fa8b1d Author: Wu XiangCheng Date: Mon May 17 18:35:33 2021 +0800 docs/zh_CN: Add translation zh_CN/maintainer/maintainer-entry-profile.rst Add a new translation Documentation/translations/zh_CN/maintainer/maintainer-entry-profile.rst and link it to zh_CN/maintainer/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/e5b0838317cbc2f8fb3a9480f4604b6f099db975.1621243426.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 989cfaecbd2c06800d13f49206498602b1e769a8 Author: Wu XiangCheng Date: Mon May 17 18:35:05 2021 +0800 docs/zh_CN: Add translation zh_CN/maintainer/pull-requests.rst Add a new translation Documentation/translations/zh_CN/maintainer/pull-requests.rst and link it to zh_CN/maintainer/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/4774d1b7976678ce97c4356bd71509df0cec1ffc.1621243426.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit b7198943af1709790e7a125ff911c529c12ccc3f Author: Wu XiangCheng Date: Mon May 17 18:34:46 2021 +0800 docs/zh_CN: Add translation zh_CN/maintainer/rebasing-and-merging.rst Add a new translation Documentation/translations/zh_CN/maintainer/rebasing-and-merging.rst and link it to zh_CN/maintainer/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/040f93d0f773a0c9c8d6637701ba269d816a6385.1621243426.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 6ba8a96f4dbab7118d4c019bb30a41d74b2bda13 Author: Wu XiangCheng Date: Mon May 17 18:34:32 2021 +0800 docs/zh_CN: Add translation zh_CN/maintainer/configure-git.rst Add a new translation Documentation/translations/zh_CN/maintainer/configure-git.rst and link it to zh_CN/maintainer/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/dcf6addd89eba3777b9b59d8b506fa162fbcd828.1621243426.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 867e6d38f367c5414c076f94c451da2f664b9c7e Author: Wu XiangCheng Date: Mon May 17 18:34:20 2021 +0800 docs/zh_CN: Add translation zh_CN/maintainer/index.rst Add a new translation Documentation/translations/zh_CN/maintainer/index.rst and link it to zh_CN/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/224959c4cdcd4c6554035145d5cedcd244887552.1621243426.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit e86bdb24375a810ea7993d64ed406a803db71225 Author: Aditya Srivastava Date: Fri May 14 20:12:44 2021 +0530 scripts: kernel-doc: reduce repeated regex expressions into variables There are some regex expressions in the kernel-doc script, which are used repeatedly in the script. Reduce such expressions into variables, which can be used everywhere. A quick manual check found that no errors and warnings were added/removed in this process. Suggested-by: Jonathan Corbet Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210514144244.25341-1-yashsri421@gmail.com Signed-off-by: Jonathan Corbet commit f18ba26da88a89db9b50cb4ff47fadb159f2810b Author: Kumar Kartikeya Dwivedi Date: Wed May 12 16:04:51 2021 +0530 libbpf: Add selftests for TC-BPF management API This adds some basic tests for the low level bpf_tc_* API. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210512103451.989420-4-memxor@gmail.com commit 715c5ce454a6a9b94a1a4a3360de6a87eaf0d833 Author: Kumar Kartikeya Dwivedi Date: Thu May 13 01:41:22 2021 +0200 libbpf: Add low level TC-BPF management API This adds functions that wrap the netlink API used for adding, manipulating, and removing traffic control filters. The API summary: A bpf_tc_hook represents a location where a TC-BPF filter can be attached. This means that creating a hook leads to creation of the backing qdisc, while destruction either removes all filters attached to a hook, or destroys qdisc if requested explicitly (as discussed below). The TC-BPF API functions operate on this bpf_tc_hook to attach, replace, query, and detach tc filters. All functions return 0 on success, and a negative error code on failure. bpf_tc_hook_create - Create a hook Parameters: @hook - Cannot be NULL, ifindex > 0, attach_point must be set to proper enum constant. Note that parent must be unset when attach_point is one of BPF_TC_INGRESS or BPF_TC_EGRESS. Note that as an exception BPF_TC_INGRESS|BPF_TC_EGRESS is also a valid value for attach_point. Returns -EOPNOTSUPP when hook has attach_point as BPF_TC_CUSTOM. bpf_tc_hook_destroy - Destroy a hook Parameters: @hook - Cannot be NULL. The behaviour depends on value of attach_point. If BPF_TC_INGRESS, all filters attached to the ingress hook will be detached. If BPF_TC_EGRESS, all filters attached to the egress hook will be detached. If BPF_TC_INGRESS|BPF_TC_EGRESS, the clsact qdisc will be deleted, also detaching all filters. As before, parent must be unset for these attach_points, and set for BPF_TC_CUSTOM. It is advised that if the qdisc is operated on by many programs, then the program at least check that there are no other existing filters before deleting the clsact qdisc. An example is shown below: DECLARE_LIBBPF_OPTS(bpf_tc_hook, .ifindex = if_nametoindex("lo"), .attach_point = BPF_TC_INGRESS); /* set opts as NULL, as we're not really interested in * getting any info for a particular filter, but just * detecting its presence. */ r = bpf_tc_query(&hook, NULL); if (r == -ENOENT) { /* no filters */ hook.attach_point = BPF_TC_INGRESS|BPF_TC_EGREESS; return bpf_tc_hook_destroy(&hook); } else { /* failed or r == 0, the latter means filters do exist */ return r; } Note that there is a small race between checking for no filters and deleting the qdisc. This is currently unavoidable. Returns -EOPNOTSUPP when hook has attach_point as BPF_TC_CUSTOM. bpf_tc_attach - Attach a filter to a hook Parameters: @hook - Cannot be NULL. Represents the hook the filter will be attached to. Requirements for ifindex and attach_point are same as described in bpf_tc_hook_create, but BPF_TC_CUSTOM is also supported. In that case, parent must be set to the handle where the filter will be attached (using BPF_TC_PARENT). E.g. to set parent to 1:16 like in tc command line, the equivalent would be BPF_TC_PARENT(1, 16). @opts - Cannot be NULL. The following opts are optional: * handle - The handle of the filter * priority - The priority of the filter Must be >= 0 and <= UINT16_MAX Note that when left unset, they will be auto-allocated by the kernel. The following opts must be set: * prog_fd - The fd of the loaded SCHED_CLS prog The following opts must be unset: * prog_id - The ID of the BPF prog The following opts are optional: * flags - Currently only BPF_TC_F_REPLACE is allowed. It allows replacing an existing filter instead of failing with -EEXIST. The following opts will be filled by bpf_tc_attach on a successful attach operation if they are unset: * handle - The handle of the attached filter * priority - The priority of the attached filter * prog_id - The ID of the attached SCHED_CLS prog This way, the user can know what the auto allocated values for optional opts like handle and priority are for the newly attached filter, if they were unset. Note that some other attributes are set to fixed default values listed below (this holds for all bpf_tc_* APIs): protocol as ETH_P_ALL, direct action mode, chain index of 0, and class ID of 0 (this can be set by writing to the skb->tc_classid field from the BPF program). bpf_tc_detach Parameters: @hook - Cannot be NULL. Represents the hook the filter will be detached from. Requirements are same as described above in bpf_tc_attach. @opts - Cannot be NULL. The following opts must be set: * handle, priority The following opts must be unset: * prog_fd, prog_id, flags bpf_tc_query Parameters: @hook - Cannot be NULL. Represents the hook where the filter lookup will be performed. Requirements are same as described above in bpf_tc_attach(). @opts - Cannot be NULL. The following opts must be set: * handle, priority The following opts must be unset: * prog_fd, prog_id, flags The following fields will be filled by bpf_tc_query upon a successful lookup: * prog_id Some usage examples (using BPF skeleton infrastructure): BPF program (test_tc_bpf.c): #include #include SEC("classifier") int cls(struct __sk_buff *skb) { return 0; } Userspace loader: struct test_tc_bpf *skel = NULL; int fd, r; skel = test_tc_bpf__open_and_load(); if (!skel) return -ENOMEM; fd = bpf_program__fd(skel->progs.cls); DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = if_nametoindex("lo"), .attach_point = BPF_TC_INGRESS); /* Create clsact qdisc */ r = bpf_tc_hook_create(&hook); if (r < 0) goto end; DECLARE_LIBBPF_OPTS(bpf_tc_opts, opts, .prog_fd = fd); r = bpf_tc_attach(&hook, &opts); if (r < 0) goto end; /* Print the auto allocated handle and priority */ printf("Handle=%u", opts.handle); printf("Priority=%u", opts.priority); opts.prog_fd = opts.prog_id = 0; bpf_tc_detach(&hook, &opts); end: test_tc_bpf__destroy(skel); This is equivalent to doing the following using tc command line: # tc qdisc add dev lo clsact # tc filter add dev lo ingress bpf obj foo.o sec classifier da # tc filter del dev lo ingress handle prio

bpf ... where the handle and priority can be found using: # tc filter show dev lo ingress Another example replacing a filter (extending prior example): /* We can also choose both (or one), let's try replacing an * existing filter. */ DECLARE_LIBBPF_OPTS(bpf_tc_opts, replace_opts, .handle = opts.handle, .priority = opts.priority, .prog_fd = fd); r = bpf_tc_attach(&hook, &replace_opts); if (r == -EEXIST) { /* Expected, now use BPF_TC_F_REPLACE to replace it */ replace_opts.flags = BPF_TC_F_REPLACE; return bpf_tc_attach(&hook, &replace_opts); } else if (r < 0) { return r; } /* There must be no existing filter with these * attributes, so cleanup and return an error. */ replace_opts.prog_fd = replace_opts.prog_id = 0; bpf_tc_detach(&hook, &replace_opts); return -1; To obtain info of a particular filter: /* Find info for filter with handle 1 and priority 50 */ DECLARE_LIBBPF_OPTS(bpf_tc_opts, info_opts, .handle = 1, .priority = 50); r = bpf_tc_query(&hook, &info_opts); if (r == -ENOENT) printf("Filter not found"); else if (r < 0) return r; printf("Prog ID: %u", info_opts.prog_id); return 0; Signed-off-by: Kumar Kartikeya Dwivedi Co-developed-by: Daniel Borkmann # libbpf API design [ Daniel: also did major patch cleanup ] Signed-off-by: Daniel Borkmann Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210512103451.989420-3-memxor@gmail.com commit 8bbb77b7c7a226803270dac3fc8dd564fd2f5756 Author: Kumar Kartikeya Dwivedi Date: Wed May 12 16:04:49 2021 +0530 libbpf: Add various netlink helpers This change introduces a few helpers to wrap open coded attribute preparation in netlink.c. It also adds a libbpf_netlink_send_recv() that is useful to wrap send + recv handling in a generic way. Subsequent patch will also use this function for sending and receiving a netlink response. The libbpf_nl_get_link() helper has been removed instead, moving socket creation into the newly named libbpf_netlink_send_recv(). Every nested attribute's closure must happen using the helper nlattr_end_nested(), which sets its length properly. NLA_F_NESTED is enforced using nlattr_begin_nested() helper. Other simple attributes can be added directly. The maxsz parameter corresponds to the size of the request structure which is being filled in, so for instance with req being: struct { struct nlmsghdr nh; struct tcmsg t; char buf[4096]; } req; Then, maxsz should be sizeof(req). This change also converts the open coded attribute preparation with these helpers. Note that the only failure the internal call to nlattr_add() could result in the nested helper would be -EMSGSIZE, hence that is what we return to our caller. The libbpf_netlink_send_recv() call takes care of opening the socket, sending the netlink message, receiving the response, potentially invoking callbacks, and return errors if any, and then finally close the socket. This allows users to avoid identical socket setup code in different places. The only user of libbpf_nl_get_link() has been converted to make use of it. __bpf_set_link_xdp_fd_replace() has also been refactored to use it. Signed-off-by: Kumar Kartikeya Dwivedi [ Daniel: major patch cleanup ] Signed-off-by: Daniel Borkmann Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210512103451.989420-2-memxor@gmail.com commit 14fad24d0520c65ecfc2eebe8e4cf25ca02f19cf Author: Heiner Kallweit Date: Thu May 13 15:33:41 2021 +0200 x86/acpi: Switch to pr_xxx log functions Switching to pr_debug et al has two benefits: - We don't have to add PREFIX to each log statement - Debug output is suppressed except DEBUG is defined or dynamic debugging is enabled for the respective code piece. In addition ensure that longer messages aren't split to multiple lines in source code, checkpatch complains otherwise. Signed-off-by: Heiner Kallweit Acked-by: Pavel Machek Reviewed-by: Ingo Molnar Signed-off-by: Rafael J. Wysocki commit 14fe1e858ca21cf3298b818cc27cb610dc7dac3e Author: Arnd Bergmann Date: Fri May 14 16:01:01 2021 +0200 sata: nv: fix debug format string mismatch Turning on debugging in this this driver reveals a type mismatch: In file included from include/linux/kernel.h:17, from drivers/ata/sata_nv.c:23: drivers/ata/sata_nv.c: In function 'nv_swncq_sdbfis': drivers/ata/sata_nv.c:2121:10: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=] 2121 | DPRINTK("id 0x%x QC: qc_active 0x%x," | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... 2124 | ap->print_id, ap->qc_active, pp->qc_active, | ~~~~~~~~~~~~~ | | | u64 {aka long long unsigned int} include/linux/printk.h:142:10: note: in definition of macro 'no_printk' 142 | printk(fmt, ##__VA_ARGS__); \ | ^~~ drivers/ata/sata_nv.c:2121:2: note: in expansion of macro 'DPRINTK' 2121 | DPRINTK("id 0x%x QC: qc_active 0x%x," | ^~~~~~~ drivers/ata/sata_nv.c:2121:36: note: format string is defined here 2121 | DPRINTK("id 0x%x QC: qc_active 0x%x," | ~^ | | | unsigned int | %llx Use the correct format string for the u64 type. Fixes: e3ed89396441 ("libata: bump ->qc_active to a 64-bit type") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210514140105.3080580-1-arnd@kernel.org Signed-off-by: Jens Axboe commit c9efa49290ce3aa8692054b5110f8123819d4874 Author: Arnd Bergmann Date: Fri May 14 23:33:57 2021 +0200 sata: fsl: fix DPRINTK format string Printing an __iomem pointer as %x produces a warning: drivers/ata/sata_fsl.c: In function 'fsl_sata_set_irq_coalescing': drivers/ata/sata_fsl.c:316:17: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'void *' [-Werror=format=] 316 | DPRINTK("ICC register status: (hcr base: 0x%x) = 0x%x\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 317 | hcr_base, ioread32(hcr_base + ICC)); | ~~~~~~~~ | | | void * It's not clear why that pointer should be printed here, but if we do, then using %p is the way to avoid the warnings. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210514213402.691436-1-arnd@kernel.org Signed-off-by: Jens Axboe commit dbc557fa5ff866f46c7e29c790f3a9b64e49ef3f Author: Andy Shevchenko Date: Fri Apr 9 18:34:56 2021 +0300 ata: Replace inclusion of kernel.h by bits.h in the header ata.h uses BIT() macro, hence bits.h must be included. Otherwise there is no need to have kernel.h included, I do not see any direct users of it in ata.h. Hence replace inclusion of kernel.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210409153456.87798-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jens Axboe commit 60a6b73dd821e98fe958b2a83393ccd724b306b1 Author: Paul Cercueil Date: Tue Mar 23 14:40:08 2021 +0000 drm/ingenic: Fix pixclock rate for 24-bit serial panels When using a 24-bit panel on a 8-bit serial bus, the pixel clock requested by the panel has to be multiplied by 3, since the subpixels are shifted sequentially. The code (in ingenic_drm_encoder_atomic_check) already computed crtc_state->adjusted_mode->crtc_clock accordingly, but clk_set_rate() used crtc_state->adjusted_mode->clock instead. Fixes: 28ab7d35b6e0 ("drm/ingenic: Properly compute timings when using a 3x8-bit panel") Cc: stable@vger.kernel.org # v5.10 Signed-off-by: Paul Cercueil Tested-by: H. Nikolaus Schaller # CI20/jz4780 (HDMI) and Alpha400/jz4730 (LCD) Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210323144008.166248-1-paul@crapouillou.net commit 65ea8f2c6e230bdf71fed0137cf9e9d1b307db32 Author: Mario Limonciello Date: Wed May 12 17:15:14 2021 -0500 ACPI: processor idle: Fix up C-state latency if not ordered Generally, the C-state latency is provided by the _CST method or FADT, but some OEM platforms using AMD Picasso, Renoir, Van Gogh, and Cezanne set the C2 latency greater than C3's which causes the C2 state to be skipped. That will block the core entering PC6, which prevents S0ix working properly on Linux systems. In other operating systems, the latency values are not validated and this does not cause problems by skipping states. To avoid this issue on Linux, detect when latencies are not an arithmetic progression and sort them. Link: https://gitlab.freedesktop.org/agd5f/linux/-/commit/026d186e4592c1ee9c1cb44295912d0294508725 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1230#note_712174 Suggested-by: Prike Liang Suggested-by: Alex Deucher Signed-off-by: Mario Limonciello [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 5bb5ceac1275cbbe757d9eecbd4b8c8a4f403c32 Author: Heiner Kallweit Date: Wed May 12 22:44:41 2021 +0200 PNP: Switch over to dev_dbg() Debug output in dmesg log may confuse users, so restrict debug output to cases where DEBUG is defined or dynamic debug output is enabled for the respective code piece. Signed-off-by: Heiner Kallweit [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit b15fc7c2c88e7a97fa347446301c37272de20ed5 Author: Heiner Kallweit Date: Wed May 12 22:36:12 2021 +0200 PNP: Remove pnp_alloc() The kernel will complain anyway if it runs out of memory, so it is not necessary to print an extra error message when that happens and kzalloc() can be called directly instead of pnp_alloc() which then becomes redundant and can be dropped. Signed-off-by: Heiner Kallweit [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit daadabfbd36d57a158623fa81585a4e9aa954c53 Author: Anupama K Patil Date: Thu Apr 29 01:09:01 2021 +0530 drivers: pnp: isapnp: proc.c: Remove unnecessary local variables In the PNP code, there are two redundant local variables that can be dropped. This also fixes a coding style issue reported by checkpatch about an assignment made under an if () statement. Reviewed-by: Jaroslav Kysela Signed-off-by: Anupama K Patil [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 0df316b8ec04d849ec7908bc90b61a2dce46f3a9 Author: Heikki Krogerus Date: Tue May 11 15:55:28 2021 +0300 ACPI: IORT: Handle device properties with software node API The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node(). Fixes: 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits") Signed-off-by: Heikki Krogerus Acked-by: Lorenzo Pieralisi Signed-off-by: Rafael J. Wysocki commit 6d27975851b134be8d2a170437210c9719e524aa Author: Rafael J. Wysocki Date: Mon May 10 19:53:18 2021 +0200 ACPI: scan: Rearrange dep_unmet initialization The dep_unmet field in struct acpi_device is used to store the number of unresolved _DEP dependencies (that is, operation region dependencies for which there are no drivers present) for the ACPI device object represented by it. That field is initialized to 1 for all ACPI device objects in acpi_add_single_object(), via acpi_init_device_object(), so as to avoid evaluating _STA prematurely for battery device objects in acpi_scan_init_status(), and it is "fixed up" in acpi_bus_check_add() after the acpi_add_single_object() called by it has returned. This is not particularly straightforward and causes dep_unmet to remain 1 for device objects without dependencies created by invoking acpi_add_single_object() directly, outside acpi_bus_check_add(). For this reason, rearrange acpi_add_single_object() to initialize dep_unmet completely before calling acpi_scan_init_status(), which requires passing one extra bool argument to it, and update all of its callers accordingly. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit f59a905b962c34642e862b5edec35c0eda72d70d Author: Alex Deucher Date: Wed May 5 09:20:32 2021 -0400 ACPI: PM: s2idle: Add missing LPS0 functions for AMD These are supposedly not required for AMD platforms, but at least some HP laptops seem to require it to properly turn off the keyboard backlight. Based on a patch from Marcin Bachry . Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1230 Reviewed-by: Hans de Goede Signed-off-by: Alex Deucher Signed-off-by: Rafael J. Wysocki commit 1ce296a4c968ecd746503fe7dfa91966d53e05e9 Author: Arnaldo Carvalho de Melo Date: Mon May 17 11:15:18 2021 -0300 perf tools: Test build with libopencsd/CORESIGHT=1 Now that opencsd-devel is more generally available (it is in fedora 34, for instance), make sure test building with it is performed. Signed-off-by: Arnaldo Carvalho de Melo commit c1a6165a639c2d85f06be7dd9c29ce1cfd994775 Author: James Clark Date: Mon May 17 16:17:41 2021 +0300 perf cs-etm: Prevent and warn on underflows during timestamp calculation. When a zero timestamp is encountered, warn once. This is to make hardware or configuration issues visible. Also suggest that the issue can be worked around with the --itrace=Z option. When an underflow with a non-zero timestamp occurs, warn every time. This is an unexpected scenario, and with increasing timestamps, it's unlikely that it would occur more than once, therefore it should be ok to warn every time. Only try to calculate the timestamp by subtracting the instruction count if neither of the above cases are true. This makes attempting to decode files with zero timestamps in non-timeless mode more consistent. Currently it can half work if the timestamp wraps around and becomes non-zero, although the behavior is undefined and unpredictable. Signed-off-by: James Clark Reviewed-by: Leo Yan Cc: Al Grant Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210517131741.3027-4-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit c36c1ef6f6912114c7fb0aa8f7c0af2634704de7 Author: James Clark Date: Mon May 17 16:17:40 2021 +0300 perf cs-etm: Start reading 'Z' --itrace option Recently the 'Z' --itrace option was added to override detection of timeless decoding. This is also useful in Coresight to work around issues with invalid timestamps on some hardware. When the 'Z' option is provided, the existing timeless decoding mode will be used, even if timestamps were recorded. Signed-off-by: James Clark Reviewed-by: Leo Yan Cc: Al Grant Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210517131741.3027-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit e8bfa15fefcd863c757240b6df15ca60d9b97997 Author: Takashi Iwai Date: Mon May 17 15:15:45 2021 +0200 ALSA: usx2y: Nuke pcm_list It's nowhere actually used. Link: https://lore.kernel.org/r/20210517131545.27252-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2ac7a12ead2be2e31bd5e796455bef31e8516845 Author: Takashi Iwai Date: Mon May 17 15:15:44 2021 +0200 ALSA: usx2y: Cleanup probe and disconnect callbacks Minor code refactoring by merging the superfluous function calls. The functions were split in the past for covering pre-history USB driver code, but this is utterly useless. Link: https://lore.kernel.org/r/20210517131545.27252-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit cae0cf651adccee2c3f376e78f30fbd788d0829f Author: Takashi Iwai Date: Mon May 17 15:15:43 2021 +0200 ALSA: usx2y: Don't call free_pages_exact() with NULL address Unlike some other functions, we can't pass NULL pointer to free_pages_exact(). Add a proper NULL check for avoiding possible Oops. Link: https://lore.kernel.org/r/20210517131545.27252-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 64a06f195d3b2d65141b32c80d6b7f0db4df6cb5 Author: Takashi Iwai Date: Mon May 17 15:15:42 2021 +0200 ALSA: usx2y: Fix shmem initialization Currently us428ctls_shmem pages are allocated dynamically upon the mmap call, but this is quite racy. Since the shared memory itself is mandatory for the mmap, let's allocate it at the beginning of the card initialization. Also, fix the initialization of the wait queue, too. Link: https://lore.kernel.org/r/20210517131545.27252-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit c1f24841683f5ce902e49d35ba84abc3e3886427 Author: Takashi Iwai Date: Mon May 17 15:15:41 2021 +0200 ALSA: usxy2: Fix potential doubly allocations The PCM shmem pages are allocated in snd_usx2y_usbpcm_prepare(). Theoretically the prepare callback may be called simultaneously for both playback and capture, hence this allocation can be racy. Make sure that the allocation is performed exclusively by extending the pcm_mutex lock to cover the allocation code, too. Link: https://lore.kernel.org/r/20210517131545.27252-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 02d382af1c4e321acbea1c25b97ee13f52b9ac7d Author: Takashi Iwai Date: Mon May 17 15:15:40 2021 +0200 ALSA: usx2y: Fix potential memory leaks Theoretically the initialization functions in usx2y drivers may be called multiple times as the driver gets initialized via hwpdep ioctl. Meanwhile, those functions including memory allocations don't check whether they are called twice, and they forget the old resources, which would lead to memory leaks. This patch adds the sanity checks about the doubly initializations to give kernel WARNING, and returns an error in such a case. Also, each allocation assures to release the resources at its error path properly. Link: https://lore.kernel.org/r/20210517131545.27252-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit a11aa8537e13dd1082c85b102b98afc2a156a815 Author: Takashi Iwai Date: Mon May 17 15:15:39 2021 +0200 ALSA: usx2y: Avoid self-killing The initialization os usx2y driver is multi-staged, and the PCM and other device creations are done after the DSP is loaded and initialized. Upon the initialization, when an error happens, the driver tries to call snd_card_free(). But this is dangerous, and in general, the driver cannot kill itself during its operation. Hence better to drop the snd_card_free() call from there. Link: https://lore.kernel.org/r/20210517131545.27252-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4e268db74770b454b877ab5260f1868a457d212c Author: Takashi Iwai Date: Mon May 17 15:15:38 2021 +0200 ALSA: usx2y: Fix potential leaks of uninitialized memory usx2y drivers may expose the allocated pages via mmap, but it performs zero-clear only for the struct size, not aligned with the page size. This leaves out some uninitialized trailing bytes. This patch fixes the clearance to cover all memory that are exposed to user-space. Link: https://lore.kernel.org/r/20210517131545.27252-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit a829dd5b3840fd9a24608ed73eb21ba239ae5334 Author: Takashi Iwai Date: Mon May 17 15:15:37 2021 +0200 ALSA: usx2y: Coding style fixes This patch fixes various trivial coding-style issues in usx2y code, such as: * the assginments in if condition * comparison order with constants * NULL / zero checks * unsigned -> unsigned int * addition of braces in control blocks * debug print with function names * move local variables in block into function head * reduction of too nested indentations No functional changes. Link: https://lore.kernel.org/r/20210517131545.27252-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4c0a58ef36f3de1be0d1c8565ca854bcabd37e2b Author: Takashi Iwai Date: Mon May 17 15:15:36 2021 +0200 ALSA: usx2y: Fix spaces This patch corrects merely the spaces in the usx2y code, including the superfluous trailing space in the debug prints and a slight reformat of some comment lines. Nothing really touches about the code itself. Link: https://lore.kernel.org/r/20210517131545.27252-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit bae3ce4942980d5f7b2b9855f4a2db0c00f9dfbd Author: Takashi Iwai Date: Mon May 17 15:15:35 2021 +0200 ALSA: usx2y: Avoid camelCase For improving readability, convert camelCase fields, variables and functions to the plain names with underscore. Also align the macros to be capital letters. All done via sed, no functional changes. Note that you'll still see many coding style issues even after this patch; the fixes will follow. Link: https://lore.kernel.org/r/20210517131545.27252-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit cac314186718f16f494b892de4dc67215ee05ef7 Author: James Clark Date: Mon May 17 16:17:39 2021 +0300 perf cs-etm: Move synth_opts initialisation Move initialisation of synth_opts earlier in the function so that synth_opts can be used at an earlier stage in a later commit. Signed-off-by: James Clark Reviewed-by: Leo Yan Cc: Alexander Shishkin Cc: Al Grant Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210517131741.3027-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 08fdced60ca08e34e316a3ab945636fcdfcbc973 Author: David Henningsson Date: Sat May 15 09:15:33 2021 +0200 ALSA: rawmidi: Add framing mode This commit adds a new framing mode that frames all MIDI data into 32-byte frames with a timestamp. The main benefit is that we can get accurate timestamps even if userspace wakeup and processing is not immediate. Testing on a Celeron N3150 with this mode has a max jitter of 2.8 ms, compared to the in-kernel seq implementation which has a max jitter of 5 ms during idle and much worse when running scheduler stress tests in parallel. Signed-off-by: David Henningsson Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210515071533.55332-1-coding@diwic.se Signed-off-by: Takashi Iwai commit e119083bab80c2550065f6c0f10ba225a894595e Author: Jin Yao Date: Fri May 14 20:29:48 2021 +0800 perf header: Support HYBRID_CPU_PMU_CAPS feature Perf has supported the CPU_PMU_CAPS feature to display a list of CPU PMU capabilities. But on a hybrid platform, it may have several CPU PMUs (such as "cpu_core" and "cpu_atom"). The CPU_PMU_CAPS feature is hard to extend to support multiple CPU PMUs well if it needs to be compatible for the case of old perf data file + new perf tool. So for better compatibility we now create a new feature HYBRID_CPU_PMU_CAPS in the header. For the perf.data generated on hybrid platform, root@otcpl-adl-s-2:~# perf report --header-only -I # cpu_core pmu capabilities: branches=32, max_precise=3, pmu_name=alderlake_hybrid # cpu_atom pmu capabilities: branches=32, max_precise=3, pmu_name=alderlake_hybrid # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CPU_PMU_CAPS CLOCK_DATA For the perf.data generated on non-hybrid platform root@kbl-ppc:~# perf report --header-only -I # cpu pmu capabilities: branches=32, max_precise=3, pmu_name=skylake # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CLOCK_DATA HYBRID_TOPOLOGY HYBRID_CPU_PMU_CAPS Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210514122948.9472-3-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f7d74ce32fc1b9b3cbf58c015009d1f616e60c23 Author: Jin Yao Date: Fri May 14 20:29:47 2021 +0800 perf header: Support HYBRID_TOPOLOGY feature It is useful to let the user know about the hybrid topology. Add the HYBRID_TOPOLOGY feature in header to indicate the core CPUs and the atom CPUs. With this patch a perf.data generated on a hybrid platform reports the hybrid CPU list: root@otcpl-adl-s-2:~# perf report --header-only -I ... # hybrid cpu system: # cpu_core cpu list : 0-15 # cpu_atom cpu list : 16-23 For a perf.data generated on a non-hybrid platform, reports a message that HYBRID_TOPOLOGY is missing: root@kbl-ppc:~# perf report --header-only -I ... # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CLOCK_DATA HYBRID_TOPOLOGY Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210514122948.9472-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8777d17b68dcfbfbd4d524f444adefae56f41225 Author: Chris Wilson Date: Mon May 17 09:46:40 2021 +0100 drm/i915/gem: Pin the L-shape quirked object as unshrinkable When instantiating a tiled object on an L-shaped memory machine, we mark the object as unshrinkable to prevent the shrinker from trying to swap out the pages. We have to do this as we do not know the swizzling on the individual pages, and so the data will be scrambled across swap out/in. Not only do we need to move the object off the shrinker list, we need to mark the object with shrink_pin so that the counter is consistent across calls to madvise. v2: in the madvise ioctl we need to check if the object is currently shrinkable/purgeable, not if the object type supports shrinking Fixes: 0175969e489a ("drm/i915/gem: Use shrinkable status for unknown swizzle quirks") References: https://gitlab.freedesktop.org/drm/intel/-/issues/3293 References: https://gitlab.freedesktop.org/drm/intel/-/issues/3450 Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Cc: # v5.12+ Link: https://patchwork.freedesktop.org/patch/msgid/20210517084640.18862-1-matthew.auld@intel.com commit 2989df460cf8d0c7085090d130e1851f94329b85 Author: Dan Carpenter Date: Fri May 14 16:10:55 2021 +0300 iio: light: tsl2591: delete a stray tab This return statement is indented one more tab than it should be. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YJ523y0dhc1IwCOB@mwanda Signed-off-by: Jonathan Cameron commit 7fce54ace336f076c5bac062b80005ef575cd4d9 Author: Dan Carpenter Date: Fri May 14 16:10:07 2021 +0300 iio: light: tsl2591: fix some signedness bugs These variables need to be int for the error handling to work. Fixes: 2335f0d7c790 ("iio: light: Added AMS tsl2591 driver implementation") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YJ52r1XZ44myD9Xx@mwanda Signed-off-by: Jonathan Cameron commit bd1455615f402c63458492875dce4d848cbb2210 Author: Tang Bin Date: Tue May 11 21:47:39 2021 +0800 iio:adc:ad7766: Fix unnecessary check in ad7766_probe() In the function ad7766_probe(), the return value of devm_iio_device_register() can be zero or ret, Thus it is unnecessary to repeated check here. Signed-off-by: Tang Bin Signed-off-by: Zhang Shengju Co-developed-by: Zhang Shengju Link: https://lore.kernel.org/r/20210511134739.948-1-tangbin@cmss.chinamobile.com Signed-off-by: Jonathan Cameron commit 43fa739450492a0b870802d471de923184870a4c Author: Dan Carpenter Date: Sat May 15 12:56:39 2021 +0300 iio: core: Fix an error pointer vs NULL bug in devm_iio_device_alloc() The devm_iio_device_alloc() function is supposed to return NULL and not error pointers. Returning an error pointer will lead to a crash in the callers. Fixes: cf5724e91515 ("iio: core: simplify some devm functions") Signed-off-by: Dan Carpenter Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/YJ+a1yaMu2QNATgt@mwanda Signed-off-by: Jonathan Cameron commit a149127be52fa7eaf5b3681a0317a2bbb772d5a9 Author: Pavel Skripkin Date: Mon May 17 15:15:45 2021 +0300 reiserfs: add check for invalid 1st journal block syzbot reported divide error in reiserfs. The problem was in incorrect journal 1st block. Syzbot's reproducer manualy generated wrong superblock with incorrect 1st block. In journal_init() wasn't any checks about this particular case. For example, if 1st journal block is before superblock 1st block, it can cause zeroing important superblock members in do_journal_end(). Link: https://lore.kernel.org/r/20210517121545.29645-1-paskripkin@gmail.com Reported-by: syzbot+0ba9909df31c6a36974d@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Jan Kara commit 2a1c6a7743d7425afa71f168830f5344240827cd Author: Jonathan Cameron Date: Sun May 9 12:33:45 2021 +0100 iio: light: pa12203001: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-20-jic23@kernel.org commit 8979b67ec61abc232636400ee8c758a16a73c95f Author: Jonathan Cameron Date: Sat May 1 18:13:48 2021 +0100 iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() Add __aligned(8) to ensure the buffer passed to iio_push_to_buffers_with_timestamp() is suitable for the naturally aligned timestamp that will be inserted. Here structure is not used, because this buffer is also used elsewhere in the driver. Fixes: 67e17300dc1d ("iio: potentiostat: add LMP91000 support") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20210501171352.512953-8-jic23@kernel.org commit 8dea228b174ac9637b567e5ef54f4c40db4b3c41 Author: Jonathan Cameron Date: Sat May 1 18:13:47 2021 +0100 iio: cros_ec_sensors: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() The samples buffer is passed to iio_push_to_buffers_with_timestamp() which requires a buffer aligned to 8 bytes as it is assumed that the timestamp will be naturally aligned if present. Fixes tag is inaccurate but prior to that likely manual backporting needed (for anything before 4.18) Earlier than that the include file to fix is drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h: commit 974e6f02e27 ("iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub.") present since kernel stable 4.10. (Thanks to Gwendal for tracking this down) Fixes: 5a0b8cb46624c ("iio: cros_ec: Move cros_ec_sensors_core.h in /include") Signed-off-by: Jonathan Cameron Reviewed-by: Gwendal Grignou Date: Sat May 1 18:13:46 2021 +0100 iio: chemical: atlas: Fix buffer alignment in iio_push_to_buffers_with_timestamp() Variable location for the timestamp, so just use __aligned(8) to ensure it is always possible to naturally align it. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes tag is not accurate, but it will need manual backporting beyond that point if anyone cares. Fixes: 0d15190f53b4 ("iio: chemical: atlas-ph-sensor: rename atlas-ph-sensor to atlas-sensor") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20210501171352.512953-6-jic23@kernel.org commit df2f37cffd6ed486d613e7ee22aadc8e49ae2dd3 Author: Jonathan Cameron Date: Sat May 1 18:01:21 2021 +0100 iio: light: tcs3472: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp(). Fixes tag is not strictly accurate as prior to that patch there was potentially an unaligned write. However, any backport past there will need to be done manually. Fixes: 0624bf847dd0 ("iio:tcs3472: Use iio_push_to_buffers_with_timestamp()") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-20-jic23@kernel.org commit ff08fbc22ab32ccc6690c21b0e5e1d402dcc076f Author: Jonathan Cameron Date: Sat May 1 18:01:20 2021 +0100 iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: a244e7b57f0f ("iio: Add driver for AMS/TAOS tcs3414 digital color sensor") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-19-jic23@kernel.org commit 3d4725194de6935dba2ad7c9cc075c885008f747 Author: Jonathan Cameron Date: Sat May 1 18:01:19 2021 +0100 iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 6c25539cbc46 ("iio: Add Intersil isl29125 digital color light sensor driver") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-18-jic23@kernel.org commit 7692088f72865c41b6b531fd09486ee99a5da930 Author: Jonathan Cameron Date: Sat May 1 18:01:18 2021 +0100 iio: magn: bmc150: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: c91746a2361d ("iio: magn: Add support for BMC150 magnetometer") Signed-off-by: Jonathan Cameron Cc: Stephan Gerhold Cc: Linus Walleij Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-17-jic23@kernel.org commit 1ef2f51e9fe424ccecca5bb0373d71b900c2cd41 Author: Jonathan Cameron Date: Sat May 1 18:01:17 2021 +0100 iio: magn: hmc5843: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 7247645f6865 ("iio: hmc5843: Move hmc5843 out of staging") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-16-jic23@kernel.org commit 37eb8d8c64f2ecb3a5521ba1cc1fad973adfae41 Author: Jonathan Cameron Date: Sat May 1 18:01:16 2021 +0100 iio: prox: as3935: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 37b1ba2c68cf ("iio: proximity: as3935: fix buffer stack trashing") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-15-jic23@kernel.org commit 679cc377a03ff1944491eafc7355c1eb1fad4109 Author: Jonathan Cameron Date: Sat May 1 18:01:15 2021 +0100 iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: cb119d535083 ("iio: proximity: add support for PulsedLight LIDAR") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-14-jic23@kernel.org commit 19f1a254fe4949fff1e67db386409f48cf438bd7 Author: Jonathan Cameron Date: Sat May 1 18:01:14 2021 +0100 iio: prox: srf08: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 78f839029e1d ("iio: distance: srf08: add IIO driver for us ranger") Signed-off-by: Jonathan Cameron Cc: Andreas Klinger Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-13-jic23@kernel.org commit f4ca2e2595d9fee65d5ce0d218b22ce00e5b2915 Author: Jonathan Cameron Date: Sat May 1 18:01:13 2021 +0100 iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 0d96d5ead3f7 ("iio: humidity: Add triggered buffer support for AM2315") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-12-jic23@kernel.org commit 06778d881f3798ce93ffbbbf801234292250b598 Author: Jonathan Cameron Date: Sat May 1 18:01:12 2021 +0100 iio: gyro: bmg160: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 13426454b649 ("iio: bmg160: Separate i2c and core driver") Signed-off-by: Jonathan Cameron Cc: Stephan Gerhold Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-11-jic23@kernel.org commit 7765dfaa22ea08abf0c175e7553826ba2a939632 Author: Jonathan Cameron Date: Sat May 1 18:01:11 2021 +0100 iio: adc: vf610: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of uses of iio_push_to_buffers_with_timestamp() Fixes: 0010d6b44406 ("iio: adc: vf610: Add IIO buffer support for Vybrid ADC") Signed-off-by: Jonathan Cameron Cc: Stefan-Gabriel Mirea Cc: Sanchayan Maity Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-10-jic23@kernel.org commit d85d71dd1ab67eaa7351f69fec512d8f09d164e1 Author: Jonathan Cameron Date: Sat May 1 18:01:10 2021 +0100 iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: ecc24e72f437 ("iio: adc: Add TI ADS1015 ADC driver support") Signed-off-by: Jonathan Cameron Cc: Daniel Baluta Cc: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-9-jic23@kernel.org commit 334883894bc1e145a1e0f5de1b0d1b6a1133f0e6 Author: Jonathan Cameron Date: Sat May 1 18:01:09 2021 +0100 iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: db6a19b8251f ("iio: accel: Add trigger support for STK8BA50") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-8-jic23@kernel.org commit f40a71ffec808e7e51848f63f0c0d3c32d65081b Author: Jonathan Cameron Date: Sat May 1 18:01:08 2021 +0100 iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: 95c12bba51c3 ("iio: accel: Add buffer mode for Sensortek STK8312") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-7-jic23@kernel.org commit f65802284a3a337510d7f8f916c97d66c74f2e71 Author: Jonathan Cameron Date: Sat May 1 18:01:07 2021 +0100 iio: accel: mxc4005: Fix overread of data and alignment issue. The bulk read size is based on the size of an array that also has space for the timestamp alongside the channels. Fix that and also fix alignment of the buffer passed to iio_push_to_buffers_with_timestamp. Found during an audit of all calls to this function. Fixes: 1ce0eda0f757 ("iio: mxc4005: add triggered buffer mode for mxc4005") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-6-jic23@kernel.org commit 3ab3aa2e7bd57497f9a7c6275c00dce237d2c9ba Author: Jonathan Cameron Date: Sat May 1 18:01:06 2021 +0100 iio: accel: kxcjk-1013: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: 1a4fbf6a9286 ("iio: accel: kxcjk1013 3-axis accelerometer driver") Signed-off-by: Jonathan Cameron Cc: Srinivas Pandruvada Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-5-jic23@kernel.org commit c6559bf796ccdb3a0c79db846af96c8f7046880b Author: Jonathan Cameron Date: Sat May 1 18:01:05 2021 +0100 iio: accel: hid: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Note this matches what was done in all the other hid sensor drivers. This one was missed previously due to an extra level of indirection. Found during an audit of all calls of this function. Fixes: a96cd0f901ee ("iio: accel: hid-sensor-accel-3d: Add timestamp") Signed-off-by: Jonathan Cameron Cc: Srinivas Pandruvada Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-4-jic23@kernel.org commit 151dbf0078da98206817ee0b87d499035479ef11 Author: Jonathan Cameron Date: Sat May 1 18:01:04 2021 +0100 iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: 194dc4c71413 ("iio: accel: Add triggered buffer support for BMA220") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-3-jic23@kernel.org commit fc36da3131a747a9367a05caf06de19be1bcc972 Author: Jonathan Cameron Date: Sat May 1 18:01:03 2021 +0100 iio: accel: bma180: Fix buffer alignment in iio_push_to_buffers_with_timestamp() To make code more readable, use a structure to express the channel layout and ensure the timestamp is 8 byte aligned. Found during an audit of all calls of this function. Fixes: b9a6a237ffc9 ("iio:bma180: Drop _update_scan_mode()") Signed-off-by: Jonathan Cameron Cc: Peter Meerwald Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501170121.512209-2-jic23@kernel.org commit 5937b860e9252637681c49ac097b712839213cce Author: Jonathan Cameron Date: Sun May 9 12:33:31 2021 +0100 iio: accel: mma8452: Balance runtime pm + use pm_runtime_resume_and_get() Remove() callback calls pm_runtime_put_noidle() but there it is not balancing a get. No actual affect because the runtime pm core prevents the reference count going negative. Whilst here use pm_runtime_resume_and_get() rather than open coded version. Again, coccinelle script missed this one due to more complex code structure. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-6-jic23@kernel.org commit 934616e8ebe162d93b82aef44d154b6b0d200dc1 Author: Jonathan Cameron Date: Sun May 9 12:33:36 2021 +0100 iio: light: rpr0521: Balance runtime pm + use pm_runtime_resume_and_get() Calls to pm_runtime_put_noidle in probe() error path and remove() are not match to any get() calls. The runtime pm core protects against negative reference counts, so this doesn't have any visible impact beyond confusing the reader. Whilst here use pm_runtime_resume_and_get() to replace boilerplate. Signed-off-by: Jonathan Cameron Cc: Mikko Koivunen Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-11-jic23@kernel.org commit 264da512431495e542fcaf56ffe75e7df0e7db74 Author: Jonathan Cameron Date: Sun May 9 12:33:37 2021 +0100 iio: magn: bmc150: Balance runtime pm + use pm_runtime_resume_and_get() probe() error paths after runtime pm is enabled, should disable it. remove() should not call pm_runtime_put_noidle() as there is no matching get() to have raised the reference count. This case has no affect a the runtime pm core protects against going negative. Whilst here use pm_runtime_resume_and_get() to tidy things up a little. coccicheck script didn't get this one due to complex code structure so found by inspection. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-12-jic23@kernel.org commit 9a20795c60276e66f57ee7ecf88d124b1f769fcf Author: Jonathan Cameron Date: Sun May 9 12:33:38 2021 +0100 iio: accel: bmi088: Balance runtime pm + use pm_runtime_resume_and_get() The call to pm_runtime_put_noidle() in remove() is not balanced by a get so drop it. Using pm_runtime_resume_and_get() allows for simple introduction of error handling to allow for runtime resume failing. Signed-off-by: Jonathan Cameron Cc: Mike Looijmans Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-13-jic23@kernel.org commit f30172723ce270d6d60ac03748a6cbacc35b8f84 Author: Jonathan Cameron Date: Sun May 9 12:33:48 2021 +0100 iio: light: vcnl4035: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Parthiban Nallathambi Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-23-jic23@kernel.org commit db27fdb33d10b582371f2be294d2b6b2ca501043 Author: Jonathan Cameron Date: Sun May 9 12:33:47 2021 +0100 iio: light: vcnl4000: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Mathieu Othacehe Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-22-jic23@kernel.org commit 9009a732a87fd6598a5791e0cc4fd2f7d2d602c5 Author: Jonathan Cameron Date: Sun May 9 12:33:51 2021 +0100 iio: proximity: srf04: Use pm_runtime_resume_and_get() and handle error Previously this driver used pm_runtime_sync_get() and did not handle any errors that occurred. Moving to the new pm_runtime_resume_and_get() + handle errors. Signed-off-by: Jonathan Cameron Cc: Andreas Klinger Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-26-jic23@kernel.org commit db9c6c2ec4a8789e2445d4a861dfce6d66b10df9 Author: Jonathan Cameron Date: Sun May 9 12:33:54 2021 +0100 iio: adc: rcar-gyroadc: Use pm_runtime_resume_and_get() and check in probe() 1 instance found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ The other instance changed did not check for failure of the pm_runtime_get_sync() so that is added. Note the remaining pm_runtime_get_sync() call is left alone because it is not obvious what to do on failure to power up in remove() This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Marek Vasut Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-29-jic23@kernel.org commit 66e748ae7f82301af3b2c2bd0b3bd46d01fd7471 Author: Jonathan Cameron Date: Sun May 9 12:33:50 2021 +0100 iio: temp: mlx90614: Handle failure in pm_runtime_resume_and_get() Converts from using pm_runtime_get_sync() with no error handling over to pm_runtime_resume_and_get() which will ensure we don't end up holding a reference. Ensure this error return is then handled at calls to mlx90614_power_get(). These are all direct returns. Signed-off-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-25-jic23@kernel.org commit 6e4183ec8dfdbce1a48a82d8b8d5648c98d5bfd8 Author: Jonathan Cameron Date: Sun May 9 12:33:46 2021 +0100 iio: light: us5182: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-21-jic23@kernel.org commit 54e81f6818b899ef621b2d513014da004add8845 Author: Jonathan Cameron Date: Sun May 9 12:33:42 2021 +0100 iio: dac: stm32-dac: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general Signed-off-by: Jonathan Cameron Cc: Fabrice Gasnier Reviewed-by: Fabrice Gasnier Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-17-jic23@kernel.org commit 29534eb2e242b4ecac1aa7229bbe92aa7e379945 Author: Jonathan Cameron Date: Sun May 9 12:33:41 2021 +0100 iio: adc: stm32-dfsdm: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Fabrice Gasnier Reviewed-by: Fabrice Gasnier Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-16-jic23@kernel.org commit 265028b8d989a47e9ef996e3dc178eb63127661f Author: Jonathan Cameron Date: Sun May 9 12:33:40 2021 +0100 iio: adc: stm32-adc: Use pm_runtime_resume_and_get() to replace open coding. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ This is a prequel to taking a closer look at the runtime pm in IIO drivers in general. Signed-off-by: Jonathan Cameron Cc: Fabrice Gasnier Reviewed-by: Fabrice Gasnier Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-15-jic23@kernel.org commit 2d082b6ed26472342beb23ec275c8531afb502b2 Author: Jonathan Cameron Date: Sun May 9 12:33:35 2021 +0100 iio: imu: kmx61: Balance runtime pm + use pm_runtime_resume_and_get() No point in calling pm_runtime_put_noidle() that isn't balancing a get. Note no actual impact because the runtime pm core protects against a negative reference counter. For the pm_runtime_resume_and_get() main interest is in clearing out this old pattern to avoid it getting coppied into new submissions. Signed-off-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-10-jic23@kernel.org commit 19611aec50aed607fe161e8a2b8f40df9d97df60 Author: Jonathan Cameron Date: Sun May 9 12:33:33 2021 +0100 iio: accel: kxcjk-1013: Balance runtime pm + use pm_runtime_resume_and_get() This driver alls pm_runtime_put_noidle() in it's remove function, but there is no matching get call. This isn't a bug as runtime pm will not allow the reference counter to go negative, but it is missleading so lets remove it. Whilst here use pm_runtime_resume_and_get() to tidy up some boilerplate. The coccicheck script didn't get this one due to the less obvious structure. Found by inspection. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-8-jic23@kernel.org commit 2d980d7efd5fdac70505a5b82cfaef411fa72393 Author: Jonathan Cameron Date: Sun May 9 12:33:32 2021 +0100 iio: accel: mma9551/3: Balance untime pm + use pm_runtime_resume_and_get() Both these drivers call pm_runtime_put_no_idle() when the reference count should already be zero as there is no matching get() Whilst here use pm_runtime_resume_and_get() rather than open coding. Signed-off-by: Jonathan Cameron Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-7-jic23@kernel.org commit d3a8969dde088fed979d0c7bebc33752c719d30c Author: Jonathan Cameron Date: Sun May 9 12:33:30 2021 +0100 iio: accel: bmc150-accel: Balanced runtime pm + use pm_runtime_resume_and_get() A call to pm_runtime_put_noidle() doesn't match any call that would result in a get(). It is safe because runtime pm core protects against the reference counter going 0, but it makes it harder to understand the code. Whilst here use pm_runtime_resume_and_get() to tidy things up. The Coccinelle script didn't get this one due to more complex code structure. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-5-jic23@kernel.org commit 6fbaebae758dd68c6bda22164e61038eb72ce036 Author: Jonathan Cameron Date: Sun May 9 12:33:29 2021 +0100 iio: light: tsl2583: Balance runtime pm + use pm_runtime_resume_and_get() Error paths in read_raw() and write_raw() callbacks failed to perform and type of runtime pm put(). Remove called pm_runtime_put_noidle() but there is no equivalent get (this is safe because the reference count is protected against going below zero, but it is misleading. Whilst here use pm_runtime_resume_and_get() to replace boilerplate. Signed-off-by: Jonathan Cameron Cc: Brian Masney Reviewed-by: Brian Masney Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-4-jic23@kernel.org commit a2fa3debc12e4a401a4c6febc1804036a62f1e31 Author: Jonathan Cameron Date: Sun May 9 12:33:28 2021 +0100 iio: light: isl29028: Balance runtime pm + use pm_runtime_resume_and_get() In remove this driver called pm_runtime_put_noidle() but there is no matching get operation. This does not cause any problems because the reference counter will not change if already zero, but it does make the code harder to reason about so should be dropped. Whilst we are here, use pm_runtime_resume_and_get() to replace open coded version. Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ Signed-off-by: Jonathan Cameron Cc: Sebastian Reichel Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-3-jic23@kernel.org commit 41120ebbb1eb5e9dec93320e259d5b2c93226073 Author: Jonathan Cameron Date: Sun May 9 12:33:27 2021 +0100 iio: gyro: fxa21002c: Balance runtime pm + use pm_runtime_resume_and_get(). In both the probe() error path and remove() pm_runtime_put_noidle() is called which will decrement the runtime pm reference count. However, there is no matching function to have raised the reference count. Not this isn't a fix as the runtime pm core will stop the reference count going negative anyway. An alternative would have been to raise the count in these paths, but it is not clear why that would be necessary. Whilst we are here replace some boilerplate with pm_runtime_resume_and_get() Found using coccicheck script under review at: https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/ Signed-off-by: Jonathan Cameron Reviewed-by: Rui Miguel Silva Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210509113354.660190-2-jic23@kernel.org commit c630c1768522d5728e51470ea4f292a35919bb6d Author: Stephan Gerhold Date: Tue May 11 16:24:02 2021 +0200 iio: accel: kxcjk-1013: Add support for KX023-1025 The KX023-1025 accelerometer [1] seems to be some mixture of KXCJK and KXTF9. It has the motion interrupt functionality from KXCJK but also the tap detection from KXTF9, and a lot more functionality. The configuration register map seems fairly different at first, but actually all register bits used by the kxcjk-1013 driver are available at the same bit positions on KX023-1025. It's just quite misleading because: 1. The registers have entirely different names and are at different addresses, but the bits are mostly named the same (and mean the same). 2. There are many more registers and bits used that are reserved on KXCJK to enable additional functionality. Ignoring all additionally available functionality for now, the KX023 works just fine after setting up the struct with the correct register addresses. The only difference that needs to be handled additionally is that the KX023 supports two configurable interrupt lines (INT1/2). For now only INT1 is supported so we route all interrupts used by the driver there. [1]: https://kionixfs.azureedge.net/en/datasheet/KX023-1025%20Specifications%20Rev%2012.0.pdf Cc: Srinivas Pandruvada Reviewed-by: Hans de Goede Signed-off-by: Stephan Gerhold Signed-off-by: Jonathan Cameron commit ae4467f6884ea16f6338295e9951eae3544aac87 Author: Stephan Gerhold Date: Tue May 11 16:24:01 2021 +0200 iio: accel: kxcjk-1013: Refactor configuration registers into struct Most Kionix accelerometers seem to use fairly consistent register bits, but the register addresses are not necessarily the same. This is already partially the case for the KXTF9 (added in commit 1540d0106bcb ("iio: accel: kxcjk1013: add support for KXTF9")), which has some registers at different addresses. However, it's even much worse for the KX023-1025. All register bits used by the kxcjk-1013 driver seem to be fully compatible with KX023, but it has most registers at totally different addresses. In preparation to add support for KX023-1025, move the fixed register addresses into a struct so we can change them for KX023 more easily. Cc: Michał Mirosław Cc: Srinivas Pandruvada Reviewed-by: Hans de Goede Signed-off-by: Stephan Gerhold Signed-off-by: Jonathan Cameron commit 52d8e7f864283da43de0996f13f68ff4c187b547 Author: Stephan Gerhold Date: Tue May 11 16:24:00 2021 +0200 dt-bindings: iio: kionix,kxcjk1013: Document kionix,kx023-1025 The KX023-1025 accelerometer uses similar register bits as kxcjk1023, so it can make use of the same driver. Document the new kionix,kx023-1025 compatible that is also supported by the kxcjk-1013 driver now. Reviewed-by: Hans de Goede Signed-off-by: Stephan Gerhold Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit f5abfa40a755f70194af3d227e5f2bad86d5c4fc Author: Chunyan Zhang Date: Wed May 12 17:38:44 2021 +0800 iio: adc: Add missing MODULE_DEVICE_TABLE MODULE_DEVICE_TABLE is used to extract the device information out of the driver and builds a table when being compiled. If using this macro, kernel can find the driver if available when the device is plugged in, and then loads that driver and initializes the device. Signed-off-by: Chunyan Zhang Signed-off-by: Jonathan Cameron commit 347978983b3453bc4d5a917ea34d1cd53b5fea08 Author: Krzysztof Kozlowski Date: Thu May 6 11:06:37 2021 -0400 dt-bindings: iio: afe: current-sense-shunt: add io-channel-cells The current-sense-shunt is an IIO provider thus can be referenced by IIO consumers (via "io-channels" property in consumer device node). Such provider is required to describe number of cells used in phandle lookup with "io-channel-cells" property. This also fixes dtbs_check warnings like: arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: current-sense-shunt: '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit f42590c4cb41353c12cac5b30c5c3c1498b15ee2 Author: Zhen Lei Date: Tue May 11 19:39:12 2021 +0800 iio: ep93xx: Remove redundant error printing in ep93xx_adc_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Jonathan Cameron commit af959b7b96b87aee13ed5b0041fc14ca2e72cc84 Author: Sean Nyekjaer Date: Thu May 6 09:09:40 2021 +0200 iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads When flushing the hw fifo there is a bug in the I2C that prevents burst reads of more than one sample pair. Signed-off-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 79e3a5bdd9efbdf4e1069793d7735b432d641e7c Author: Sean Nyekjaer Date: Thu May 6 09:09:39 2021 +0200 iio: accel: fxls8962af: add hw buffered sampling When buffered sampling is enabled, the accelerometer will dump data into the internal fifo and interrupt at watermark. Then the driver flushes all data to the iio buffer. As the accelerometer doesn't have internal timestamps, they are approximated between the current and last interrupt. Signed-off-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 9ab2c60e6b26034b90d3bd446bca3dc8b157f61a Author: Sean Nyekjaer Date: Thu May 6 09:09:38 2021 +0200 iio: accel: fxls8962af: add interrupt support Preparation commit for the next that adds hw buffered sampling. Adds the interrupt function and reads the devicetree for which interrupt pin that is used. Signed-off-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 90cc5ec5488ed22803a1a004a4be24a807f41dcd Author: Sean Nyekjaer Date: Thu May 6 09:09:37 2021 +0200 iio: accel: fxls8962af: add set/get of samplerate This adds support for setting de accelerometers output data rate. Primarily used for hardware buffered reads. Signed-off-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit 7f36da1455730474b47f47712f37a3060fc2fe50 Author: Sean Nyekjaer Date: Thu May 6 09:09:36 2021 +0200 dt-bindings: iio: accel: fxls8962af: add bindings Add devicetree binding for the NXP FXLS8962AF/FXLS8964AF accelerometer sensor. Signed-off-by: Sean Nyekjaer Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit a3e0b51884ee3a5d890bd5124d9a270f61589e57 Author: Sean Nyekjaer Date: Thu May 6 09:09:35 2021 +0200 iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers Add basic support for NXP FXLS8962AF/FXLS8964AF Automotive accelerometers. It will allow setting up scale/gain and reading x,y,z axis. Datasheet: https://www.nxp.com/docs/en/data-sheet/FXLS8962AF.pdf Datasheet: https://www.nxp.com/docs/en/data-sheet/FXLS8964AF.pdf Signed-off-by: Sean Nyekjaer Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit f7d5c18a8c371c306d73757547c2e0d6cfc764b3 Author: Sean Nyekjaer Date: Fri May 7 12:31:49 2021 +0200 iio: imu: st_lsm6dsx: correct ODR in header Fix wrongly stated 13 Hz ODR for accelerometers, the correct ODR is 12.5 Hz Signed-off-by: Sean Nyekjaer Acked-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit b73d21dccf6826b2768c15da931f982d5812b044 Author: Guenter Roeck Date: Wed May 5 20:43:32 2021 -0700 iio: bme680_i2c: Remove acpi_device_id table With CONFIG_ACPI=n and -Werror, 0-day reports: drivers/iio/chemical/bme680_i2c.c:46:36: error: 'bme680_acpi_match' defined but not used Apparently BME0680 is not a valid ACPI ID. Remove the ID. Note the driver will still work with ACPI bindings that use the PRP0001 mechanism as that uses the of_device_id table instead. Reported-by: kernel test robot Signed-off-by: Guenter Roeck Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit f0e4057e97c1af9a55052f5fb024d69cf961ccf2 Author: Guenter Roeck Date: Thu May 6 06:31:45 2021 -0700 iio: bme680_spi: Remove acpi_device_id table BME0680 is not an official ACPI ID, so let's remove it before someone starts using it. Note that ACPI can still be used with this driver via the PRP0001 method which will use the of_device_id table to match. Signed-off-by: Guenter Roeck Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit aff35afb0190bb02a0fe4bfa0a59a08f9bf538b4 Author: Guenter Roeck Date: Wed May 5 20:56:59 2021 -0700 iio:accel:stk8312: Remove acpi_device_id table With CONFIG_ACPI=n, W=1 and -Werror, 0-day reports: drivers/iio/accel/stk8312.c:644:36: error: 'stk8312_acpi_id' defined but not used Apparently STK8312 is not a valid ACPI ID. Remove the ID table as this is the only entry. If ACPI support is desired an explicit of_device_id table should be added (rather than relying on the fallback to the existing ID table). Reported-by: kernel test robot Signed-off-by: Guenter Roeck Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 3a57abfaa5a67e94624625a6e020874dde883ece Author: Guenter Roeck Date: Tue May 4 08:37:46 2021 -0700 iio: am2315: Remove acpi_device_id table With CONFIG_ACPI=n and -Werror, 0-day reports: drivers/iio/humidity/am2315.c:259:36: error: 'am2315_acpi_id' defined but not used According to Andy Shevchenko, the ACPI ID used in this driver is fake and does not really exist. Remove it and with it ACPI support from the driver. Note that, if an explicit of_device_id table is added to the driver it could support the PRP0001 based ACPI approach. Reported-by: kernel test robot Signed-off-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit ef8512b3b2c8f69d103d8910ea65879ab6bef7d9 Author: Jonathan Cameron Date: Sat Apr 24 18:30:15 2021 +0100 dt-bindings:iio:dac:ad5755: txt to yaml format conversion. Straight forward conversion. Only fiddly bit is the XOR of spi-cpol and spi-cpha. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer Link: https://lore.kernel.org/r/20201031184854.745828-40-jic23@kernel.org Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210424173015.534941-1-jic23@kernel.org commit 8cd401310bc4b95f2e39275370f8550a6d05cd93 Author: Andy Shevchenko Date: Wed Apr 14 22:54:54 2021 +0300 dt-bindings: iio: st,st-sensors: Add LSM9DS0 compatible string Enumerate LSM9DS0 (accelerometer and magnetometer parts) via 'st,lsm9ds0-imu' compatible string. Signed-off-by: Andy Shevchenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210414195454.84183-7-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 6731ca3999ffa4c878a661b980759300dfb0237e Author: Andy Shevchenko Date: Wed Apr 14 22:54:53 2021 +0300 iio: st_sensors: Add lsm9ds0 IMU support We can utilize separate drivers for accelerometer and magnetometer, so here is the glue driver to enable LSM9DS0 IMU support. The idea was suggested by Crestez Dan Leonard in [1]. The proposed change was sent as RFC due to race condition concerns, which are indeed possible. In order to amend the initial change, I went further by providing a specific multi-instantiate probe driver that reuses existing accelerometer and magnetometer. [1]: https://lore.kernel.org/patchwork/patch/670353/ Suggested-by: Crestez Dan Leonard Cc: mr.lahorde@laposte.net Cc: Matija Podravec Cc: Sergey Borishchenko Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414195454.84183-6-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit d61881ef7f08aef02d9bfc8c66f4c89c59cdf112 Author: Andy Shevchenko Date: Wed Apr 14 22:54:52 2021 +0300 iio: st_sensors: Make accel, gyro, magn and pressure probe shared Some IMUs may utilize existing library code for STMicro accelerometer, gyroscope, magnetometer and pressure. Let's share them via st_sensors.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414195454.84183-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 7db4f2cacbede1c6d95552c0d10e77398665a733 Author: Andy Shevchenko Date: Wed Apr 14 22:54:51 2021 +0300 iio: st_sensors: Call st_sensors_power_enable() from bus drivers In case we would initialize two IIO devices from one physical device, we shouldn't have a clash on regulators. That's why move st_sensors_power_enable() call from core to bus drivers. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414195454.84183-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 38934daf7b5c1b35a01748cb7d4272282cc3a890 Author: Andy Shevchenko Date: Wed Apr 14 22:54:50 2021 +0300 iio: magnetometer: st_magn: Provide default platform data Provide default platform data for magnetometer in case it supports DRDY. One case is LSM9DS0 IMU, on which it is the case. Since accelerometer is using INT1, default magnetometer to INT2. While at it, update description of the drdy_int_pin field. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414195454.84183-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit dffdd75678745e9eccf31ad16e4849b663645e3b Author: Andy Shevchenko Date: Wed Apr 14 22:54:49 2021 +0300 iio: gyro: st_gyro: Move platform data from header to C file Platform data is solely used by one file. Don't share it with others. While at it, drop unneeded anymore __maybe_unused and fix kernel doc to avoid warning: st_gyro_core.c:366: error: Cannot parse struct or union! by converting to a simple comment. It is described at the declaration. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414195454.84183-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 3b91452032c4f2df58df014063dc6146b2378b22 Author: Andy Shevchenko Date: Wed Apr 14 22:54:48 2021 +0300 iio: accel: st_accel: Move platform data from header to C file Platform data is solely used by one file. Don't share it with others. While at it, drop unneeded anymore __maybe_unused and fix kernel doc to avoid warning: st_accel_core.c:1079: error: Cannot parse struct or union! by converting to a simple comment. It is described at the declaration. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414195454.84183-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 62a486c46d61bc684967fc3f83eed15dde49cf9b Author: Jonathan Cameron Date: Mon Apr 26 18:49:11 2021 +0100 iio: core: move @clock_id from struct iio_dev to struct iio_dev_opaque There is already an acessor function used to access it, making this move straight forward. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-10-jic23@kernel.org commit 8b1c82cb849f8f7c758891099f2128b8fbc05744 Author: Jonathan Cameron Date: Mon Apr 26 18:49:10 2021 +0100 iio: core: move @flags from struct iio_dev to struct iio_dev_opaque No reason any driver should ever need access to this field, so hide it. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-9-jic23@kernel.org commit 396f7234856956eb29f009da6e5d846f29f87ebd Author: Jonathan Cameron Date: Mon Apr 26 18:49:09 2021 +0100 iio: core: move @chrdev from struct iio_dev to struct iio_dev_opaque No reason for this to be exposed to the drivers, so lets move it to the opaque structure. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-8-jic23@kernel.org commit 30039405ac25665119ff7bc944d33b136ef1c8a9 Author: Lukas Bulwahn Date: Mon May 17 12:16:48 2021 +0200 MAINTAINERS: repair reference in DRM DRIVER FOR SIMPLE FRAMEBUFFERS Commit 11e8f5fd223b ("drm: Add simpledrm driver") adds the file ./drivers/gpu/drm/tiny/simpledrm.c, but refers to the file ./drivers/gpu/drm/tiny/simplekms.c with the new MAINTAINERS section DRM DRIVER FOR SIMPLE FRAMEBUFFERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/gpu/drm/tiny/simplekms.c Repair the file entry by referring to the right location. Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210517101648.29906-1-lukas.bulwahn@gmail.com commit b804e2b76ac6d5559b99588e0190ac97b5597497 Author: Jonathan Cameron Date: Mon Apr 26 18:49:08 2021 +0100 iio: core: move @info_exist_lock to struct iio_dev_opaque This lock is only of interest to the IIO core, so make it only visible there. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-7-jic23@kernel.org commit 62f4f36cdfcdbb961bbbeab15e6595dd391d2205 Author: Jonathan Cameron Date: Mon Apr 26 18:49:07 2021 +0100 iio: core: move @scan_index_timestamp to struct iio_dev_opaque No reason for this cached value to be exposed to drivers so move it to the opaque structure. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-6-jic23@kernel.org commit 3028e0c2af95dd476ccd71f4fc025990385168c2 Author: Jonathan Cameron Date: Mon Apr 26 18:49:06 2021 +0100 iio: core: move @trig_readonly from struct iio_dev to struct iio_dev_opaque This is only set via the iio_trig_set_immutable() call and later used by the IIO core so there is no benefit in drivers being able to access it. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-5-jic23@kernel.org commit 6eaf9f6a2738789dedb1e962096f61aaddd81464 Author: Jonathan Cameron Date: Mon Apr 26 18:49:05 2021 +0100 iio: core: move @driver_module from struct iio_dev to struct iio_dev_opaque Continuing move to hide internal elements from drivers, move this structure element over. It's only accessed from iio core files so this one was straight forward and no accessor functions are needed. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-4-jic23@kernel.org commit e5333ed09e0f8ece3cbb37912c17cf9880ee3fb0 Author: Jonathan Cameron Date: Mon Apr 26 18:49:04 2021 +0100 iio: avoid shadowing of variable name in to_iio_dev_opaque() indio_dev was both the macro input parameter and the field name in this macro. That causes trouble if the instance of struct iio_dev passed in is not called indio_dev. Whilst a fix of sorts, no need to backport as it seems we never hit this previously due to some very consistent naming in IIO. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-3-jic23@kernel.org commit 15ea2878bfb255099092634d28f31177f237ccd7 Author: Jonathan Cameron Date: Mon Apr 26 18:49:03 2021 +0100 iio: core: move @id from struct iio_dev to struct iio_dev_opaque Continuing from Alexandru Ardelean's introduction of the split between driver modifiable fields and those that should only be set by the core. This could have been done in two steps to make the actual move after introducing iio_device_id() but there seemed limited point to that given how mechanical the majority of the patch is. Includes fixup from Alex for missing mxs-lradc-adc conversion. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426174911.397061-2-jic23@kernel.org commit e6cc8f2b7616f9d85e281d903f82d6f99819cd08 Author: Jonathan Cameron Date: Mon Apr 26 18:02:51 2021 +0100 iio: common: scmi_sensors: Drop duplicate setting of iio_dev.dev.parent This is already set to the same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Jyoti Bhayana Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-9-jic23@kernel.org commit 63027b34189a6f4a788c536be6495e93d75fb4c3 Author: Jonathan Cameron Date: Mon Apr 26 18:02:50 2021 +0100 iio: position: hid-sensor-custom-intel-hinge: Drop duplicate parent setting. iio_dev.dev.parent is already set to the same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Ye Xiang Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-8-jic23@kernel.org commit 932bf4710ee19841e660492da581558482034c55 Author: Jonathan Cameron Date: Mon Apr 26 18:02:49 2021 +0100 iio: humidity: hdc2010: Drop duplicate setting of iio_dev.dev.parent Already set to same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Eugene Zaikonnikov Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-7-jic23@kernel.org commit 9eb04878e4af245f0988de7800e32ec958a997a0 Author: Jonathan Cameron Date: Mon Apr 26 18:02:48 2021 +0100 iio: adc: ti-ads131e08: Drop duplicate setting of iio_dev.dev.parent Already set to same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Tomislav Denis Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-6-jic23@kernel.org commit 85493b9ae8188d3eb0083816086411496165c882 Author: Jonathan Cameron Date: Mon Apr 26 18:02:47 2021 +0100 iio: adc: mt6360: Drop duplicate setting of iio_dev.dev.parent Already set to the same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Gene Chen Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-5-jic23@kernel.org commit 806e657b0f7e79473f242a2435e5c4e027c632a6 Author: Jonathan Cameron Date: Mon Apr 26 18:02:46 2021 +0100 iio: adc: mp2629: Drop duplicate setting iio_dev.dev.parent This is already set to the same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Saravanan Sekar Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-4-jic23@kernel.org commit e42523c11f2a182a0969b0e7462337fc190f8ca2 Author: Jonathan Cameron Date: Mon Apr 26 18:02:45 2021 +0100 iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent and of_node This is set to the same value in devm_iio_device_alloc() so no need to do it again. Signed-off-by: Jonathan Cameron Cc: Cristian Pop Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-3-jic23@kernel.org commit cb25d770cf9d3c4071693912bee9a48126072649 Author: Jonathan Cameron Date: Mon Apr 26 18:02:44 2021 +0100 iio: accel: bmi088: Drop manual assignment of iio_dev.dev.parent The core already set this to the same value in devm_iio_device_alloc() Signed-off-by: Jonathan Cameron Cc: Mike Looijmans Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210426170251.351957-2-jic23@kernel.org commit 9374e8f5a38defe90bc65b2decf317c1c62d91dd Author: Oleksij Rempel Date: Wed Apr 28 09:32:08 2021 +0200 iio: adc: add ADC driver for the TI TSC2046 controller Basically the TI TSC2046 touchscreen controller is 8 channel ADC optimized for the touchscreen use case. By implementing it as an IIO ADC device, we can make use of resistive-adc-touch and iio-hwmon drivers. Polled readings are currently not implemented to keep this patch small, so iio-hwmon will not work out of the box for now. So far, this driver was tested with a custom version of resistive-adc-touch driver, since it needs to be extended to make use of Z1 and Z2 channels. The X/Y are working without additional changes. Signed-off-by: Oleksij Rempel Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210428073208.19570-4-o.rempel@pengutronix.de Signed-off-by: Jonathan Cameron commit 03f2193a6bea24c8cd280433f783b417cda4c2e5 Author: Oleksij Rempel Date: Wed Apr 28 09:32:07 2021 +0200 dt-bindings:iio:adc: add documentation for TI TSC2046 controller Add a binding documentation for the TI TSC2046 touchscreen controllers ADC functionality. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210428073208.19570-3-o.rempel@pengutronix.de Signed-off-by: Jonathan Cameron commit f7e196fc0815dea074b861a97503bf0d330f7165 Author: Oleksij Rempel Date: Wed Apr 28 09:32:06 2021 +0200 dt-bindings:iio:adc: add generic settling-time-us and oversampling-ratio channel properties Settling time and over sampling is a typical challenge for different IIO ADC devices. So, introduce channel specific settling-time-us and oversampling-ratio properties to cover this use case. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210428073208.19570-2-o.rempel@pengutronix.de Signed-off-by: Jonathan Cameron commit caf0fb3bb38a7e94beb77d31364b0d1ee42aed37 Author: Mauro Carvalho Chehab Date: Tue Apr 27 16:03:00 2021 +0200 iio: Documentation: move incompatible ABI to obsolete Commit 63cd35f34d2e ("iio: Documentation: update definitions for bufferY and scan_elements") updated iio documentation in order to point to the newly per-buffer API, as it is now possible to support multi buffers. While the previous ABI will be kept forever, the best is for applications to use the 5.11+ ABI. So, move the legacy one ABI/obsolete. This fixes an issue with scripts/get_abi.pl, that doesn't accept two different Kernel version support for the same API set. Fixes: 63cd35f34d2e ("iio: Documentation: update definitions for bufferY and scan_elements") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a2c802049adee6a5710a58082cfdc1132c5e4c11.1619532170.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit fb6da706ff1ef7b81a6cbd6c1cbd3ff3f8267990 Author: Jonathan Cameron Date: Wed Apr 28 20:26:12 2021 +0100 iio: adc: stm32-adc: Fix docs wrongly marked as kernel-doc W=1 highlights these two cases that are obviously not in kernel-doc format. Signed-off-by: Jonathan Cameron Cc: Fabrice Gasnier Reviewed-by: Fabrice Gasnier commit 7dfc4dc385dc851d3247cee6f98afd5ebe580282 Author: Tomasz Duszynski Date: Mon May 3 08:00:14 2021 +0200 dt-bindings: iio: chemical: sps30: update binding with serial example sps30 has gained support for serial communication so add example to the binding file. While at it remove reg property from list of required properties because it's no-op in case of serial communication. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit b2e171f5a5c6003bd2e9a8f7dfd8acf714af429b Author: Tomasz Duszynski Date: Mon May 3 08:00:13 2021 +0200 iio: sps30: add support for serial interface Sensor has support for both i2c and serial communication interfaces. Both offer very similar set of features. Minor differences don't impact overall functionality like doing measurements, etc. Support for i2c have already been added, this patch adds support for the latter ie. serial interface. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 8f3f130852785dac0759843835ca97c3bacc2b10 Author: Tomasz Duszynski Date: Mon May 3 08:00:12 2021 +0200 iio: sps30: separate core and interface specific code Move code responsible for handling i2c communication to a separate file. Rationale for this change is preparation for adding support for serial communication. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 101af4c20c5a2d56b38d80743cc17d5691ef5506 Author: Jonathan Cameron Date: Sun Jan 17 15:38:16 2021 +0000 iio:ABI docs: Move specific description of out_altvoltageX_frequency to main docs. The adf4371 has channels that are very closely coupled, so additional documentation is needed to express these constraints. Unfortunately having the same sysfs filename in multiple documentation does not work well when generating automated documentation. To avoid this issue, we add a new device specific description to the main docs and remove the one in the device specific file. Fixes $ scripts/get_abi.pl validate Warning: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4371:0 ./Documentation/ABI/testing/sysfs-bus-iio:599 Cc: Alexandru Ardelean Reported-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210117153816.696693-8-jic23@kernel.org commit cff8431bf4426831a3083230514f814dc98c03ab Author: Jonathan Cameron Date: Sun Jan 17 15:38:13 2021 +0000 iio:ABI docs: Fix issue around repeated definition of out_currentY_raw This one is challenging as both the places this appears in specific drivers are making 'unusual' uses of what looks like a simple output current channel. As a side note, this was particular bit of ABI occurs in other drivers where the use is much more straight forward e.g. dac/ad5421 This patch attempts to make a best effort of adding it to the main docs but retaining enough information. Both of these drivers probably need specific documents being written to describe their unusual interfaces, but those should be in the main documentation, not under Documentation/ABI. That is a non trivial job so left for another time. Fixes $ scripts/get_abi.pl validate Warning: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-light-lm3533-als:43 ./Documentation/ABI/testing/sysfs-bus-iio-health-afe440x:38 Reported-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210117153816.696693-5-jic23@kernel.org commit 3a879b29916a71e21db2a9ed10977d230fb30452 Author: Jonathan Cameron Date: Sun Jan 17 15:38:12 2021 +0000 iio:ABI docs: Drop device specific docs for _powerdown for the adf4371 The interface is standard and the extra info provided on exactly what is being powered down is not of interest to most users. Hence this doesn't need it's own documentation and can rely on the docs in sysfs-bus-iio Fixes $ scripts/get_abi.pl validate Warning: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4371:36 ./Documentation/ABI/testing/sysfs-bus-iio:588 Cc: Alexandru Ardelean Reported-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210117153816.696693-4-jic23@kernel.org commit 69c93a7df74b2483016466ec4d25d5c3c3b91bdc Author: Jonathan Cameron Date: Sun Jan 17 15:38:10 2021 +0000 iio:ABI docs: Fix up duplicate *_calibbias_* documentation for icm42600 This device has the unusual characteristic that the calibbias values have well defined units (more commonly they are tweaks to a DAC) Unfortunately the previous approach of having more specific documentation in sysfs-bus-iio-icm42600 results in warnings during the documentation build and random ordering in the resulting documentation. To avoid this, add a note to the main documentation on this special characteristic for the icm42600. The _available for calibbias was missing from the main sysfs-bus-iio docs so also add that, allowing us to drop the icm42600 specific file. Fixes $ scripts/get_abi.pl validate warning: Warning: /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibbias is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-icm42600:0 ./Documentation/ABI/testing/sysfs-bus-iio:394 Warning: /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibbias is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-icm42600:1 ./Documentation/ABI/testing/sysfs-bus-iio:395 Warning: /sys/bus/iio/devices/iio:deviceX/in_accel_z_calibbias is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-icm42600:2 ./Documentation/ABI/testing/sysfs-bus-iio:396 Warning: /sys/bus/iio/devices/iio:deviceX/in_anglvel_x_calibbias is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-icm42600:3 ./Documentation/ABI/testing/sysfs-bus-iio:397 Warning: /sys/bus/iio/devices/iio:deviceX/in_anglvel_y_calibbias is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-icm42600:4 ./Documentation/ABI/testing/sysfs-bus-iio:398 Warning: /sys/bus/iio/devices/iio:deviceX/in_anglvel_z_calibbias is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-icm42600:5 ./Documentation/ABI/testing/sysfs-bus-iio:399 Cc: Jean-Baptiste Maneyrol Reported-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210117153816.696693-2-jic23@kernel.org commit b27e1970aa1ed94135cd185d50c3d34b9114d547 Author: Nuno Sa Date: Tue Apr 27 10:54:54 2021 +0200 iio: adis16400: do not directly change spi 'max_speed_hz' With commit 3ba10e37371d ("iio: adis: add burst_max_speed_hz variable"), we just need to define 'burst_max_speed_hz' and the adis core will take care of setting up the spi transfers for burst mode. Hence, we fix a potential race with the spi core where we could be left witn an invalid 'max_speed_hz'. Reviewed-by: Alexandru Ardelean Fixes: 5eda3550a3cc1 ("staging:iio:adis16400: Preallocate transfer message") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210427085454.30616-7-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 256e69ab96934486a9da1c251d276134fdf61e32 Author: Nuno Sa Date: Tue Apr 27 10:54:53 2021 +0200 iio: adis16475: do not directly change spi 'max_speed_hz' With commit 3ba10e37371d ("iio: adis: add burst_max_speed_hz variable"), we just need to define 'burst_max_speed_hz' and the adis core will take care of setting up the spi transfers for burst mode. Hence, we fix a potential race with the spi core where we could be left with an invalid 'max_speed_hz'. Reviewed-by: Alexandru Ardelean Fixes: fff7352bf7a3c ("iio: imu: Add support for adis16475") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210427085454.30616-6-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit dbf20809d6e0072ad189c937761d58bf98a47b43 Author: Nuno Sa Date: Tue Apr 27 10:54:52 2021 +0200 iio: adis: add burst_max_speed_hz variable Typically, in burst mode, the device cannot operate at it's full spi speed. Hence, the spi transfers for burst mode have to take this into account. With this change we avoid a potential race with the spi core as drivers were 'hacking' the device 'max_speed_hz' directly in the trigger handler. Reviewed-by: Alexandru Ardelean Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210427085454.30616-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 669da56a7eafb9b4025261a07f1d27364159cac9 Author: Nuno Sa Date: Tue Apr 27 10:54:51 2021 +0200 iio: adis_buffer: don't push data to buffers on failure There's no point in pushing data to IIO buffers in case 'spi_sync()' fails. Reviewed-by: Alexandru Ardelean Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210427085454.30616-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 0ae157081ca33d4ec5a997b67b8942bd149305b6 Author: Nuno Sa Date: Tue Apr 27 10:54:50 2021 +0200 iio: adis_buffer: update device page after changing it It makes more sense to update the device page as soon as we we successfully changed it. Moreover, a follow up patch will handle 'spi_sync' error path which would leave 'current_page' in a inconsistent state. Signed-off-by: Nuno Sa Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210427085454.30616-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 00a72db718fa198da3946286dcad222399ccd4fb Author: Nuno Sa Date: Tue Apr 27 10:54:49 2021 +0200 iio: adis16475: do not return ints in irq handlers On an IRQ handler we should not return normal error codes as 'irqreturn_t' is expected. This is done by jumping to the 'check_burst32' label where we return 'IRQ_HANDLED'. Note that it is fine to do the burst32 check in this error path. If we have proper settings to apply burst32, we might just do the setup now so that the next sample already uses it. Fixes: fff7352bf7a3c ("iio: imu: Add support for adis16475") Reviewed-by: Alexandru Ardelean Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210427085454.30616-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 9cc9806e22178e5dbeb4e058df23427454d8d287 Author: Tomas Melin Date: Mon Apr 26 11:10:41 2021 +0300 iio: accel: Add driver for Murata SCA3300 accelerometer Add initial support for Murata SCA3300 3-axis industrial accelerometer with digital SPI interface. This device also provides a temperature measurement. Datasheet: https://www.murata.com/en-global/products/sensor/accel/sca3300 Signed-off-by: Tomas Melin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210426081041.59807-3-tomas.melin@vaisala.com Signed-off-by: Jonathan Cameron commit 99422e2a670c517681c0c163f1627c17f69c3bfa Author: Tomas Melin Date: Mon Apr 26 11:10:40 2021 +0300 dt-bindings: iio: accel: Add SCA3300 documentation initial DT bindings for Murata SCA3300 Accelerometer. Signed-off-by: Tomas Melin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210426081041.59807-2-tomas.melin@vaisala.com Signed-off-by: Jonathan Cameron commit 2cd2b093e4447c2cd9287d4ab15363f70393587c Author: Jonathan Cameron Date: Sun Apr 25 17:31:54 2021 +0100 dt-bindings:iio:adc:adi,ad7476: Add missing binding document This binding covers class of simple SPI ADCs which only provide data output - they don't have MOSI pin. The only real variation between them is over how many supplies they use and which one is used for the reference. Michael listed as maintainer for this one as it is his driver and falls under the catch all MAINTAINERS entry for ADI devices. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210425163154.73209-3-jic23@kernel.org commit 7bf50a968a1cd02728e9120ad0216dc80f7a6fb0 Author: Jonathan Cameron Date: Sun Apr 25 17:31:53 2021 +0100 iio:adc:ad7476: Handle the different regulators used by various parts. Not all of the parts supported by this driver use single supply. Hence we add chip_info fields to say what additional supplies exist and in the case of vref, ensure that is used for the reference voltage rather than vcc. One corner case is the ad7091r which has an internal reference that can be over-driven by an external reference connected on the vref pin. To handle that force_ext_vref is introduced and set if an optional vref regulator is present. Tested using really simple QEMU model and some fixed regulators. The devm_add_action_or_reset() callback is changed to take the regulator as it's parameter so we can use one callback for all the different regulators without having to store pointers to them in the iio_priv() structure. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reported-by: kernel test robot Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210425163154.73209-2-jic23@kernel.org commit 7f9ef8ed0f4020348342a5c87b0559aad90a29a9 Author: Jonathan Cameron Date: Thu Apr 1 15:09:56 2021 +0100 dt-bindings:iio:dac:ti,dac082s085 yaml conversion Fairly simple conversion with the exception of the XOR between spi-cpha and spi-cpol. Signed-off-by: Jonathan Cameron Cc: Lukas Wunner Link: https://lore.kernel.org/r/20201031134110.724233-17-jic23@kernel.org Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401140956.224084-3-jic23@kernel.org commit 6e5566e72d2a9c81db1ab0effb5cb67ba94637dc Author: Jonathan Cameron Date: Thu Apr 1 15:42:26 2021 +0100 iio:accel:stk8312: Add lowercase i2c device id These are never upper case. Chances are that all users of this driver were using the ACPI binding but just in case keep the uppercase version but mark it deprecated. Whilst here tidy up some spacing. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210401144226.225928-1-jic23@kernel.org commit c1096dce272ff773b2af12424956d2c2699869cd Author: Jonathan Cameron Date: Thu Apr 1 18:41:12 2021 +0100 dt-bindings:iio:adc:adi,ad7298 document bindings The device has a tsens-busy pin, but it's both fiddly and currently ignored by the Linux driver. Given it's not clear whether the binding should be an interrupt, or a GPIO I have left that out for now. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401174112.320497-7-jic23@kernel.org commit 1ce9da1f61643f84258697891b1a3e3ccdb8e660 Author: Jonathan Cameron Date: Thu Apr 1 18:41:11 2021 +0100 dt-bindings:trivial-devices: Add sensortek,stk8312 and sensortek,s8ba50 Two simple devices. The stk8ba50 datasheet could be found via google, but I only have the driver for the 8312. Given they both seem to be 3 axis devices with a single interrupt line, add them to trivial-devices.yaml Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401174112.320497-6-jic23@kernel.org commit d9bf5d37fd58dc96220270e253116350ec26522b Author: Jonathan Cameron Date: Thu Apr 1 18:41:10 2021 +0100 dt-bindings:trivial-devices: Add memsic,mxc4005/mxc6255/mxc6655 entries Simple devices with I2C interface and single interrupt line so entries in trivial devices are sufficient. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401174112.320497-5-jic23@kernel.org commit 3ed7928d9f1598786908cc8a160df1c9bb55e5b7 Author: Jonathan Cameron Date: Thu Apr 1 18:41:09 2021 +0100 dt-bindings:iio:accel:fsl,mma7455 binding doc Binding documentation for this driver was missing. Note that the binding and some in tree dts files specifiy interrupts etc but the driver is fairly simple and does not yet make use of them. Listed both Joachim and myself as maintainers for this binding on basis it's Joachim's driver but I don't want to volunteer Joachim too strongly to look after this doc. Signed-off-by: Jonathan Cameron Cc: Joachim Eastwood Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401174112.320497-4-jic23@kernel.org commit 7dbd479425d26678b968e363691b8113d3b106af Author: Jonathan Cameron Date: Thu Apr 1 18:41:08 2021 +0100 dt-bindings:iio:accel:bosch,bma220 device tree binding documentation Linux driver currently relies on the driver.name to match to the compatible, but that doesn't mean it isn't a good idea to document it. Only real complexity is the 3 separate power supplies. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401174112.320497-3-jic23@kernel.org commit 2599d5bc910dbcd7f447e4c960efde5550e21852 Author: Jonathan Cameron Date: Thu Apr 1 18:41:07 2021 +0100 dt-bindings:iio:accel:adis16201 and adis16209 bindings These two devices have different internal characteristics, but their external connectivity and as a result device tree descriptions are identical. Note that neither driver in Linux currently has an of_match_table but instead rely on matching via name alone. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210401174112.320497-2-jic23@kernel.org commit 7349e8a36caa11c07e71b05f42c384bc540446c8 Author: Yicong Yang Date: Thu Apr 8 19:38:16 2021 +0800 iio: inkern: simplify some devm functions Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-8-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit 171a70afbde9a3e7499d7d3efde8ca49f7e5f00d Author: Yicong Yang Date: Thu Apr 8 19:38:15 2021 +0800 iio: trigger: simplify __devm_iio_trigger_register Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-7-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit cf5724e91515e8b016019b148c99bdf7c58f3ab7 Author: Yicong Yang Date: Thu Apr 8 19:38:14 2021 +0800 iio: core: simplify some devm functions Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-6-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit 8e39d4723a00cfc7029e61f7bd9ffa357409f9d2 Author: Yicong Yang Date: Thu Apr 8 19:38:13 2021 +0800 iio: triggered-buffer: simplify devm_iio_triggered_buffer_setup_ext() Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-5-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit bfc1807acf85a22a17ea22635d4f546c3c53a73f Author: Yicong Yang Date: Thu Apr 8 19:38:12 2021 +0800 iio: hw_consumer: simplify devm_iio_hw_consumer_alloc() Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-4-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit 2c6a958789f79dedef3d661569f7faa7b375b538 Author: Yicong Yang Date: Thu Apr 8 19:38:11 2021 +0800 iio: buffer-dmaengine: simplify __devm_iio_dmaengine_buffer_free() Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-3-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit 4e023c4dcfc555e9a5f87435cae19412c0684343 Author: Yicong Yang Date: Thu Apr 8 19:38:10 2021 +0800 iio: adc: adi-axi-adc: simplify devm_adi_axi_adc_conv_register() Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Yicong Yang Reviewed-by: Alexandru Ardelean Reviewed-by: Lars-Peter Clausen Reviewed-by: Nuno Sa Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/1617881896-3164-2-git-send-email-yangyicong@hisilicon.com Signed-off-by: Jonathan Cameron commit afa2b78f1e58eaca820f32c124e5655f43583eb1 Author: Joe Sandom Date: Wed Apr 21 23:13:30 2021 +0100 dt-bindings: iio: light: Added AMS tsl2591 device tree binding Device tree binding for AMS/TAOS tsl2591 ambient light sensor. This driver supports configuration via device tree and sysfs. Supported channels for raw infrared light intensity, raw combined light intensity and illuminance in lux. The driver additionally supports iio events on lower and upper thresholds. This is a very-high sensitivity light-to-digital converter that transforms light intensity into a digital signal. Signed-off-by: Joe Sandom Reviewed-by: Rob Herring Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210421221330.17007-2-joe.g.sandom@gmail.com Signed-off-by: Jonathan Cameron commit 2335f0d7c790157bebf76fae963ba41bcba45fdb Author: Joe Sandom Date: Wed Apr 21 23:13:29 2021 +0100 iio: light: Added AMS tsl2591 driver implementation Driver implementation for AMS/TAOS tsl2591 ambient light sensor. This driver supports configuration via device tree and sysfs. Supported channels for raw infrared light intensity, raw combined light intensity and illuminance in lux. The driver additionally supports iio events on lower and upper thresholds. This is a very-high sensitivity light-to-digital converter that transforms light intensity into a digital signal. Datasheet: https://ams.com/tsl25911#tab/documents Signed-off-by: Joe Sandom Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210421221330.17007-1-joe.g.sandom@gmail.com Signed-off-by: Jonathan Cameron commit 00f6742b5ff43b0cbf094e8e7481699f3ae9bcf7 Author: Nuno Sa Date: Thu Apr 22 12:19:06 2021 +0200 iio: adis_buffer: check return value on page change On the trigger handler, we might need to change the device page. Hence, we should check the return value from 'spi_write()' and act accordingly. Signed-off-by: Nuno Sa Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210422101911.135630-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit ab3df79782e7d8a27a58576c9b4e8c6c4879ad79 Author: Nuno Sa Date: Thu Apr 22 12:19:04 2021 +0200 iio: adis16400: do not return ints in irq handlers On an IRQ handler we should not return normal error codes as 'irqreturn_t' is expected. Not necessary to apply to stable as the original check cannot fail and as such the bug cannot actually occur. Fixes: 5eda3550a3cc1 ("staging:iio:adis16400: Preallocate transfer message") Reviewed-by: Alexandru Ardelean Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210422101911.135630-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit d877539ad8e8fdde9af69887055fec6402be1a13 Author: Nuno Sa Date: Thu Apr 22 12:19:03 2021 +0200 iio: adis_buffer: do not return ints in irq handlers On an IRQ handler we should not return normal error codes as 'irqreturn_t' is expected. Not necessarily stable material as the old check cannot fail, so it's a bug we can not hit. Fixes: ccd2b52f4ac69 ("staging:iio: Add common ADIS library") Reviewed-by: Alexandru Ardelean Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210422101911.135630-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 494186662ecf1c6e0c1d68b06b45434f298688d9 Author: Andy Shevchenko Date: Mon Apr 12 16:18:35 2021 +0300 iio: adc: ad7298: Enable on Intel Galileo Gen 1 Enable ADC on Intel Galileo Gen 1 board. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210412131835.70212-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 0cd71145803dc2b87b3afc8e2990ff0d43bf7027 Author: Linus Walleij Date: Mon Apr 12 14:23:31 2021 +0200 iio: st-sensors: Update ST Sensor bindings This adjusts the ST Sensor bindings with the more fine-grained syntax checks that were proposed late in the last kernel cycle and colliding with parallel work. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210412122331.1631643-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 8bad6050654b46ac7ea40c5c5f9ec79396b175a3 Author: Tian Tao Date: Mon Apr 12 16:39:11 2021 +0800 iio: trigger: stm32-timer: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/iio/trigger/stm32-timer-trigger.c:299:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1618216751-1678-4-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Cameron commit c79859bd77debda56fcce011d161c563c4a06451 Author: Tian Tao Date: Mon Apr 12 16:39:10 2021 +0800 iio: light: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/iio/light/veml6030.c:131:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1618216751-1678-3-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Cameron commit 643adb9af72e2af62a532590fad0c767045c1e76 Author: Tian Tao Date: Mon Apr 12 16:39:09 2021 +0800 iio:chemical:sps30: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: ./drivers/iio/chemical/sps30.c:414:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1618216751-1678-2-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Cameron commit df041e737a38a316976273281f66fbce2ec4b397 Author: Puranjay Mohan Date: Wed Apr 7 23:51:47 2021 +0530 iio: temperature: add driver support for ti tmp117 TMP117 is a Digital temperature sensor with integrated Non-Volatile memory. Add support for tmp117 driver in iio subsystem. Datasheet: https://www.ti.com/lit/gpn/tmp117 Signed-off-by: Puranjay Mohan Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210407182147.77221-3-puranjay12@gmail.com Signed-off-by: Jonathan Cameron commit 5e713b25d137d9cfb9bcf4387513b3acf00c4828 Author: Puranjay Mohan Date: Wed Apr 7 23:51:46 2021 +0530 dt-bindings: iio: temperature: Add DT bindings for TMP117 Add devicetree binding document for TMP117, a digital temperature sensor. Signed-off-by: Puranjay Mohan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210407182147.77221-2-puranjay12@gmail.com Signed-off-by: Jonathan Cameron commit 3cdea6e9a838dd04afad146cf9e558fa4ef9f9cb Author: Krzysztof Kozlowski Date: Sat Apr 10 18:47:28 2021 +0200 iio: adc: exynos: drop unneeded variable assignment The initialization of 'ret' variable in probe function is shortly after overwritten. This initialization is simply not used. Addresses-Coverity: Unused value Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20210410164728.8096-1-krzysztof.kozlowski@canonical.com Signed-off-by: Jonathan Cameron commit 803f4e1eab7a8938ba3a3c30dd4eb5e9eeef5e63 Author: Arnd Bergmann Date: Sat May 8 00:07:57 2021 +0200 asm-generic: simplify asm/unaligned.h The get_unaligned()/put_unaligned() implementations are much more complex than necessary, now that all architectures use the same code. Move everything into one file and use a much more compact way to express the same logic. I've compared the binary output using gcc-11 across defconfig builds for all architectures and found this patch to make no difference, except for a single function on powerpc that needs two additional register moves because of random differences in register allocation. There are a handful of callers of the low-level __get_unaligned_cpu32, so leave that in place for the time being even though the common code no longer uses it. This adds a warning for any caller of get_unaligned()/put_unaligned() that passes in a single-byte pointer, but I've sent patches for all instances that show up in x86 and randconfig builds. It would be nice to change the arguments of the endian-specific accessors to take the matching __be16/__be32/__be64/__le16/__le32/__le64 arguments instead of a void pointer, but that requires more changes to the rest of the kernel. This new version does allow aggregate types into get_unaligned(), which was not the original goal but might come in handy. Signed-off-by: Arnd Bergmann commit d40d8179482c330df5b9049797fe94c2e8eb4f6e Author: Arnd Bergmann Date: Sat May 8 14:58:46 2021 +0200 asm-generic: uaccess: 1-byte access is always aligned With the cleaned up version of asm-generic/unaligned.h, there is a warning about the get_user/put_user helpers using unaligned access for single-byte variables: include/asm-generic/uaccess.h: In function ‘__get_user_fn’: include/asm-generic/unaligned.h:13:15: warning: ‘packed’ attribute ignored for field of type ‘u8’ {aka ‘unsigned char’} [-Wattributes] const struct { type x __packed; } *__pptr = (typeof(__pptr))(ptr); \ Change these to use a direct pointer dereference to avoid the warnings. Signed-off-by: Arnd Bergmann commit e3e22076710632250cfaee853499f3de6e9be35d Author: Arnd Bergmann Date: Sat May 8 00:07:56 2021 +0200 netpoll: avoid put_unaligned() on single character With a planned cleanup, using put_unaligned() on a single character results in a harmless warning: In file included from ./arch/x86/include/generated/asm/unaligned.h:1, from include/linux/etherdevice.h:24, from net/core/netpoll.c:18: net/core/netpoll.c: In function 'netpoll_send_udp': include/asm-generic/unaligned.h:23:9: error: 'packed' attribute ignored for field of type 'unsigned char' [-Werror=attributes] net/core/netpoll.c:431:3: note: in expansion of macro 'put_unaligned' 431 | put_unaligned(0x60, (unsigned char *)ip6h); | ^~~~~~~~~~~~~ include/asm-generic/unaligned.h:23:9: error: 'packed' attribute ignored for field of type 'unsigned char' [-Werror=attributes] net/core/netpoll.c:459:3: note: in expansion of macro 'put_unaligned' 459 | put_unaligned(0x45, (unsigned char *)iph); | ^~~~~~~~~~~~~ Replace this with an open-coded pointer dereference. Signed-off-by: Arnd Bergmann commit 8f4e3d48bb50765ab27ae5bebed2595b20de80a1 Author: Arnd Bergmann Date: Sat May 8 00:07:55 2021 +0200 mwifiex: re-fix for unaligned accesses A patch from 2017 changed some accesses to DMA memory to use get_unaligned_le32() and similar interfaces, to avoid problems with doing unaligned accesson uncached memory. However, the change in the mwifiex_pcie_alloc_sleep_cookie_buf() function ended up changing the size of the access instead, as it operates on a pointer to u8. Change this function back to actually access the entire 32 bits. Note that the pointer is aligned by definition because it came from dma_alloc_coherent(). Fixes: 92c70a958b0b ("mwifiex: fix for unaligned reads") Acked-by: Kalle Valo Signed-off-by: Arnd Bergmann commit dd979d7a08adb473744f2e9d4bbaddb039dc39dc Author: Arnd Bergmann Date: Sat May 8 00:07:54 2021 +0200 apparmor: use get_unaligned() only for multi-byte words Using get_unaligned() on a u8 pointer is pointless, and will result in a compiler warning after a planned cleanup: In file included from arch/x86/include/generated/asm/unaligned.h:1, from security/apparmor/policy_unpack.c:16: security/apparmor/policy_unpack.c: In function 'unpack_u8': include/asm-generic/unaligned.h:13:15: error: 'packed' attribute ignored for field of type 'u8' {aka 'unsigned char'} [-Werror=attributes] 13 | const struct { type x __packed; } *__pptr = (typeof(__pptr))(ptr); \ | ^ Simply dereference this pointer directly. Signed-off-by: Arnd Bergmann Acked-by: John Johansen commit 1b1774998b2dec837a57d729d1a22e5eb2d6d206 Author: Arnd Bergmann Date: Sat May 8 00:07:53 2021 +0200 partitions: msdos: fix one-byte get_unaligned() A simplification of get_unaligned() clashes with callers that pass in a character pointer, causing a harmless warning like: block/partitions/msdos.c: In function 'msdos_partition': include/asm-generic/unaligned.h:13:22: warning: 'packed' attribute ignored for field of type 'u8' {aka 'unsigned char'} [-Wattributes] Remove the SYS_IND() macro with the get_unaligned() call and just use the ->ind field directly. Signed-off-by: Arnd Bergmann commit 76e5624f3f9343a621dd3f4006f4e4d9c3f91e33 Author: Zhen Lei Date: Sat May 15 12:00:04 2021 +0800 memory: pl353: Fix error return code in pl353_smc_probe() When no child nodes are matched, an appropriate error code -ENODEV should be returned. However, we currently do not explicitly assign this error code to 'err'. As a result, 0 was incorrectly returned. Fixes: fee10bd22678 ("memory: pl353: Add driver for arm pl353 static memory controller") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210515040004.6983-1-thunder.leizhen@huawei.com Signed-off-by: Krzysztof Kozlowski commit 2f9e0f8c7e173e312e1d98b50fd8dc890245831a Author: Andy Shevchenko Date: Tue May 11 18:39:58 2021 +0300 usb: host: xhci-tegra: Switch to use %ptTs Use %ptTs instead of open coded variant to print contents of time64_t type in human readable form. Cc: Thierry Reding Cc: Jonathan Hunter Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: Greg Kroah-Hartman Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210511153958.34527-4-andriy.shevchenko@linux.intel.com commit 776797f1bd1caef34c4ca6dd362fa6376b880e10 Author: Andy Shevchenko Date: Tue May 11 18:39:57 2021 +0300 nilfs2: Switch to use %ptTs Use %ptTs instead of open coded variant to print contents of time64_t type in human readable form. Use sysfs_emit() at the same time in the changed functions. Cc: Ryusuke Konishi Cc: linux-nilfs@vger.kernel.org Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210511153958.34527-3-andriy.shevchenko@linux.intel.com commit 126ac4d67d97fdeef52b6249702266eb94a05d9e Author: Andy Shevchenko Date: Tue May 11 18:39:56 2021 +0300 kdb: Switch to use %ptTs Use %ptTs instead of open-coded variant to print contents of time64_t type in human readable form. Cc: Jason Wessel Cc: Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Reviewed-by: Douglas Anderson Reviewed-by: Daniel Thompson Acked-by: Daniel Thompson Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210511153958.34527-2-andriy.shevchenko@linux.intel.com commit 20bc8c1e972f29afcac85e524e430c11a6df5f58 Author: Andy Shevchenko Date: Tue May 11 18:39:55 2021 +0300 lib/vsprintf: Allow to override ISO 8601 date and time separator ISO 8601 defines 'T' as a separator between date and time. Though, some ABIs use time and date with ' ' (space) separator instead. Add a flavour to the %pt specifier to override default separator. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210511153958.34527-1-andriy.shevchenko@linux.intel.com commit 4cbf055002c53c364d1b3275792e4487af76dd2d Author: Linus Lüssing Date: Mon May 17 00:33:08 2021 +0200 batman-adv: bcast: avoid skb-copy for (re)queued broadcasts Broadcast packets send via batadv_send_outstanding_bcast_packet() were originally copied in batadv_forw_bcast_packet_to_list() before being queued. And after that only the ethernet header will be pushed through batadv_send_broadcast_skb()->batadv_send_skb_packet() which works safely on skb clones as it uses batadv_skb_head_push()->skb_cow_head(). Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 3f69339068f93e206e581e6ab9927502f8722ac7 Author: Linus Lüssing Date: Mon May 17 00:33:07 2021 +0200 batman-adv: bcast: queue per interface, if needed Currently we schedule a broadcast packet like: 3x: [ [(re-)queue] --> for(hard-if): maybe-transmit ] The intention of queueing a broadcast packet multiple times is to increase robustness for wireless interfaces. However on interfaces which we only broadcast on once the queueing induces an unnecessary penalty. This patch restructures the queueing to be performed on a per interface basis: for(hard-if): - transmit - if wireless: [queue] --> transmit --> [requeue] --> transmit Next to the performance benefits on non-wireless interfaces this should also make it easier to apply alternative strategies for transmissions on wireless interfaces in the future (for instance sending via unicast transmissions on wireless interfaces, without queueing in batman-adv, if appropriate). Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d295345abb3e91e5a16f3293eb12b111e352bd2b Author: Sven Eckelmann Date: Mon May 10 15:05:42 2021 +0200 batman-adv: Always send iface index+name in genlmsg The batman-adv netlink messages often contain the interface index and interface name in the same message. This makes it easy for the receiver to operate on the incoming data when it either needs to print something or needs to operate on the interface index. But one of the attributes was missing for: * neighbor table dumps * originator table dumps * gateway list dumps * query of hardif information * query of vid information The userspace therefore had to implement special workarounds using SIOCGIFNAME or SIOCGIFINDEX depending on what was actually provided. Providing both information simplifies the userspace code massively without adding a lot of extra overhead in the kernel portion. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 9a959cab22194d633b3a1d9d1943b0df3475122c Author: Simon Wunderlich Date: Mon May 17 09:11:48 2021 +0200 batman-adv: Start new development cycle This version will contain all the (major or even only minor) changes for Linux 5.14. The version number isn't a semantic version number with major and minor information. It is just encoding the year of the expected publishing as Linux -rc1 and the number of published versions this year (starting at 0). Signed-off-by: Simon Wunderlich commit 8d0b1fe81e18eb66a2d4406386760795fe0d77d9 Author: Zou Wei Date: Wed May 12 14:45:55 2021 +0800 drm/bridge: lt9611: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1620801955-19188-1-git-send-email-zou_wei@huawei.com commit 5b2d3326cdf83fde3590f45c93507c1c852327e8 Author: Alexandru Ardelean Date: Fri May 14 12:32:26 2021 +0300 gpio: crystalcove: remove platform_set_drvdata() + cleanup probe The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean Signed-off-by: Andy Shevchenko commit d8218b0de51f36f01ed67731ccf174059a33bb1e Merge: 76e78f3df8f5d d07f6ca923ea0 Author: Greg Kroah-Hartman Date: Mon May 17 09:47:44 2021 +0200 Merge 5.13-rc2 into staging-next We need the staging and iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 9fbf82c7641408386ddad162fd70234a574fcd3e Merge: 216e0e563d81f d07f6ca923ea0 Author: Greg Kroah-Hartman Date: Mon May 17 09:45:58 2021 +0200 Merge 5.13-rc2 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 0e9e37d042b1fc506287fceb939a35c35d610bf4 Merge: 5c3e241f52464 d07f6ca923ea0 Author: Greg Kroah-Hartman Date: Mon May 17 09:44:25 2021 +0200 Merge 5.13-rc2 into driver-core-next We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 8d09cdab05e63d8d7fbe5c2e8b82a65646709c57 Author: Geert Uytterhoeven Date: Wed May 12 10:02:45 2021 +0200 ARM: shmobile: defconfig: Refresh for v5.13-rc1 Refresh the defconfig for Renesas ARM systems: - Drop CONFIG_RESET_CONTROLLER=y (auto-enabled since commit b4d86f37eacb7246 ("mmc: renesas_sdhi: do hard reset if possible")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/debe6340e9deb2f13f908238f27b62ed7b6005a0.1620806548.git.geert+renesas@glider.be commit 34f7f79827ec4db30cff9001dfba19f496473e8d Author: Michael Ellerman Date: Fri May 7 16:42:25 2021 +1000 selftests/powerpc: Add test of mitigation patching We recently discovered some of our mitigation patching was not safe against other CPUs running concurrently. Add a test which enable/disables all mitigations in a tight loop while also running some stress load. On an unpatched system this almost always leads to an oops and panic/reboot, but we also check if the kernel becomes tainted in case we have a non-fatal oops. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210507064225.1556312-1-mpe@ellerman.id.au commit ca8cc36901e9bdd01d371f6236faf9f61d1325d1 Author: Christophe Leroy Date: Thu May 6 13:32:18 2021 +0000 powerpc/32s: Remove asm/book3s/32/hash.h Move the PAGE bits into pgtable.h to be more similar to book3s/64. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7f4aaa479569328a1e5b07c96c08fbca0cd7dd88.1620307890.git.christophe.leroy@csgroup.eu commit b09049c516af90d4b6643b5d0d2549cd01539086 Author: Christophe Leroy Date: Thu May 6 13:30:51 2021 +0000 powerpc: Only pad struct pt_regs when needed If neither KUAP nor PPC64 is selected, there is nothing in the second union of struct pt_regs, so the alignment padding is waste of memory. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d536bbc46094f66b24d3017343be25164f232933.1620307840.git.christophe.leroy@csgroup.eu commit 8af8d72dc58e90dc945ca627b24968400e0f21b6 Author: Christophe Leroy Date: Thu May 6 13:27:31 2021 +0000 powerpc/32s: Speed up likely path of kuap_update_sr() In most cases, kuap_update_sr() will update a single segment register. We know that first update will always be done, if there is no segment register to update at all, kuap_update_sr() is not called. Avoid recurring calculations and tests in that case. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/848f18d213b8341939add7302dc4ef80cc7a12e3.1620307636.git.christophe.leroy@csgroup.eu commit 0441729e16379649ea0f393a5be68a19ba384d94 Author: Christophe Leroy Date: Fri May 7 06:00:58 2021 +0000 powerpc/mmu: Remove leftover CONFIG_E200 Commit 39c8bf2b3cc1 ("powerpc: Retire e200 core (mpc555x processor)") removed CONFIG_E200. Commit f9158d58a4e1 ("powerpc/mm: Add mask of always present MMU features") was merged in the same cycle and added a new use of CONFIG_E200. Remove that use. Fixes: f9158d58a4e1 ("powerpc/mm: Add mask of always present MMU features") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/594fa3cc0df11e21644fd6a584851ae4f164b2bf.1620367249.git.christophe.leroy@csgroup.eu commit fe3dc333d2ed50c9764d281869d87bae0d795ce5 Author: Christophe Leroy Date: Fri May 7 05:45:52 2021 +0000 powerpc/mmu: Don't duplicate radix_enabled() mmu_has_feature(MMU_FTR_TYPE_RADIX) can be evaluated regardless of CONFIG_PPC_RADIX_MMU. When CONFIG_PPC_RADIX_MMU is not set, mmu_has_feature(MMU_FTR_TYPE_RADIX) will evaluate to 'false' at build time because MMU_FTR_TYPE_RADIX wont be included in MMU_FTRS_POSSIBLE. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/62743846cbd493e5d9a02e197c2672a1d30df149.1620366342.git.christophe.leroy@csgroup.eu commit 70d6ebf82bd0cfddaebb54e861fc15e9945a5fc6 Author: Christophe Leroy Date: Fri May 7 05:02:02 2021 +0000 powerpc/603: Avoid a pile of NOPs when not using SW LRU in TLB exceptions The SW LRU is in an MMU feature section. When not used, that's a dozen of NOPs to fetch for nothing. Define an ALT section that does the few remaining operations. That also avoids a double read on SRR1 in the SW LRU case. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/603725297466959419628ef7964aaf3417fb647d.1620363691.git.christophe.leroy@csgroup.eu commit c176c3d58a3ed623e8917acaafe240245e700e33 Author: Christophe Leroy Date: Fri May 7 09:24:43 2021 +0000 powerpc: Define NR_CPUS all the time include/linux/threads.h defines a default value for CONFIG_NR_CPUS but suggests the architectures should always define it. So do it, when CONFIG_SMP is not selected set CONFIG_NR_CPUS to 1. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/afef0ec65a8ba8651bf4f6e4f4f08a8b6991dbfb.1620379469.git.christophe.leroy@csgroup.eu commit 930a77c3ad79c30ce9ba8cbad9eded5bc5805343 Author: Zhang Jianhua Date: Mon May 10 15:51:34 2021 +0800 powerpc/boot: Fix a typo in partial_decompress() comment outbuf is the output buffer, output_size is the size of the output buffer. Signed-off-by: Zhang Jianhua Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210510075134.252978-1-chris.zjh@huawei.com commit 9a1762a4a4ff3cc096c605212165f59481e84503 Author: Christophe Leroy Date: Fri May 7 16:37:53 2021 +0000 powerpc/8xx: Update mpc885_ads_defconfig to improve CI mpc885_ads_defconfig is used by several CI robots. A few functionnalities are specific to 8xx and are not covered by other default configuration, so improve build test coverage by adding them to mpc885_ads_defconfig. 8xx is the only platform supporting 16k page size in addition to 4k page size. Considering that 4k page size is widely tested by other configurations, lets make 16k pages the selection for 8xx, as it has demonstrated in the past to be a weakness. CONFIG_PIN_TLB is specific to 8xx, select it as it mainly adds code with removing much. CONFIG_BDI_SWITCH is specific to PPC32 and adds codes. CONFIG_PPC_PTDUMP has specific part for 8xx. CONFIG_MODULES has specific handling for 8xx. CONFIG_SMC_UCODE_PATCH is specific to 8xx for loading microcode. CONFIG_PERF_EVENTS has specific parts for 8xx. CONFIG_MATH_EMULATION is used by 8xx. CONFIG_STRICT_KERNEL_RWX has specificities for 8xx. CONFIG_VIRT_CPU_ACCOUNTING_NATIVE has specific parts for PPC32. CONFIG_IPV6 has specificities for PPC32. CONFIG_BPF_JIT has specificities for PPC32. A few drivers are tightly linked to the 8xx: - CONFIG_SPI_FSL_SPI - CONFIG_CRYPTO_DEV_TALITOS - CONFIG_8xxx_WDT - CONFIG_8xx_GPIO - CONFIG_PPC_EARLY_DEBUG_CPM Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2541e4e415505b27db8ccbb8977035c20e408ef4.1620405461.git.christophe.leroy@csgroup.eu commit f3f6d18417eb44ef393b23570d384d2778ef22dc Author: Vaibhav Jain Date: Sat May 8 10:06:42 2021 +0530 powerpc/papr_scm: Reduce error severity if nvdimm stats inaccessible Currently drc_pmem_qeury_stats() generates a dev_err in case "Enable Performance Information Collection" feature is disabled from HMC or performance stats are not available for an nvdimm. The error is of the form below: papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Failed to query performance stats, Err:-10 This error message confuses users as it implies a possible problem with the nvdimm even though its due to a disabled/unavailable feature. We fix this by explicitly handling the H_AUTHORITY and H_UNSUPPORTED errors from the H_SCM_PERFORMANCE_STATS hcall. In case of H_AUTHORITY error an info message is logged instead of an error, saying that "Permission denied while accessing performance stats" and an EPERM error is returned back. In case of H_UNSUPPORTED error we return a EOPNOTSUPP error back from drc_pmem_query_stats() indicating that performance stats-query operation is not supported on this nvdimm. Fixes: 2d02bf835e57 ("powerpc/papr_scm: Fetch nvdimm performance stats from PHYP") Signed-off-by: Vaibhav Jain Reviewed-by: Ira Weiny Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210508043642.114076-1-vaibhav@linux.ibm.com commit 13c7dad95176d6abaf9608e4d34b2f512689775e Author: Christophe Leroy Date: Wed May 5 14:02:13 2021 +0000 powerpc/paca: Remove mm_ctx_id and mm_ctx_slb_addr_limit mm_ctx_id and mm_ctx_slb_addr_limit are not used anymore. Remove them. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6e1813953da38c452c131fe3e2a2761a0fddb975.1620223303.git.christophe.leroy@csgroup.eu commit 1a3c6ceed2533121e857d9b38559839487d31f33 Author: Christophe Leroy Date: Wed May 5 14:02:12 2021 +0000 powerpc/asm-offset: Remove unused items Following PACA related items are not used anymore by ASM code: PACA_SIZE, PACACONTEXTID, PACALOWSLICESPSIZE, PACAHIGHSLICEPSIZE, PACA_SLB_ADDR_LIMIT, MMUPSIZEDEFSIZE, PACASLBCACHE, PACASLBCACHEPTR, PACASTABRR, PACAVMALLOCSLLP, MMUPSIZESLLP, PACACONTEXTSLLP, PACALPPACAPTR, LPPACA_DTLIDX and PACA_DTL_RIDX. Following items are also not used anymore: SIGSEGV, NMI_MASK, THREAD_DBCR0, KUAP, TI_FLAGS, TI_PREEMPT, DCACHEL1BLOCKSPERPAGE, ICACHEL1BLOCKSIZE, ICACHEL1LOGBLOCKSIZE, ICACHEL1BLOCKSPERPAGE, STACK_REGS_KUAP, KVM_NEED_FLUSH, KVM_FWNMI, VCPU_DEC, VCPU_SPMC, HSTATE_XICS_PHYS, HSTATE_SAVED_XIRR and PPC_DBELL_MSGTYPE. Remove all of them. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1c80981548dc0c4f145109cdd473022c1aad8d2b.1620223302.git.christophe.leroy@csgroup.eu commit 3a5988b884a33cb3e4ab427b08a020ce32f3b3ba Author: Christophe Leroy Date: Thu May 6 09:10:01 2021 +0000 powerpc/32s: Remove m8260_gorom() Last user of m8260_gorom() was removed by Commit 917f0af9e5a9 ("powerpc: Remove arch/ppc and include/asm-ppc") removed last user of m8260_gorom(). In fact m8260_gorom() was ported to arch/powerpc/ but the platform using it died with arch/ppc/ Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/13f7532f21df3196e8c78b4f82a9c8d5487aca35.1620292185.git.christophe.leroy@csgroup.eu commit 76fb351126f1be4f4c339920b84268740d84d2e1 Author: Yang Yingliang Date: Thu May 13 15:19:18 2021 +0800 drm: correct function name drm_legacy_ctxbitmap_flush() Fix the following make W=1 kernel build warning: drivers/gpu/drm/drm_context.c:136: warning: expecting prototype for drm_ctxbitmap_flush(). Prototype was for drm_legacy_ctxbitmap_flush() instead Signed-off-by: Yang Yingliang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210513071918.1728535-1-yangyingliang@huawei.com commit 05f7f1b9ee8273eab805da3d5e2d064872aa75b1 Author: Samuel Holland Date: Tue Apr 27 18:59:15 2021 -0500 scsi: 3w-9xxx: Fix endianness issues in command packets The controller expects all data it sends/receives to be little-endian. Therefore, the packet struct definitions should use the __le16/32/64 types. Once those are correct, sparse reports several issues with the driver code, which are fixed here as well. The main issue observed was at the call to scsi_set_resid(), where the byteswapped parameter would eventually trigger the alignment check at drivers/scsi/sd.c:2009. At that point, the kernel would continuously complain about an "Unaligned partial completion", and no further I/O could occur. This gets the controller working on big endian powerpc64. Link: https://lore.kernel.org/r/20210427235915.39211-4-samuel@sholland.org Signed-off-by: Samuel Holland Signed-off-by: Martin K. Petersen commit d133b441488d30b0ee1848238a1f6e8da643e19c Author: Samuel Holland Date: Tue Apr 27 18:59:14 2021 -0500 scsi: 3w-9xxx: Reduce scope of structure packing Currently, all command packet structs used by this driver are packed. However, only one (TW_SG_Entry) actually needs to be packed, because it uses 64-bit addresses at 32-bit alignment. To improve the quality of generated code, stop packing all of the other command packet structs. This requires adjusting the type of one misaligned "reserved" member. After this change, pahole reports that only one type had its layout change: the tw_compat_info member of TW_Device_Extension is now naturally aligned. Link: https://lore.kernel.org/r/20210427235915.39211-3-samuel@sholland.org Signed-off-by: Samuel Holland Signed-off-by: Martin K. Petersen commit 44c5027bb5c8bbdc2aea2141dc32fe72c3f3988a Author: Samuel Holland Date: Tue Apr 27 18:59:13 2021 -0500 scsi: 3w-9xxx: Use flexible array members to avoid struct padding In preparation for removing the "#pragma pack(1)" from the driver, fix all instances where a trailing array member could be replaced by a flexible array member. Since a flexible array member has zero size, it introduces no padding, whether or not the struct is packed. Link: https://lore.kernel.org/r/20210427235915.39211-2-samuel@sholland.org Signed-off-by: Samuel Holland Signed-off-by: Martin K. Petersen commit 0edca4fc633ce223753c217f135a8036f516357b Author: Nigel Christian Date: Thu May 13 17:20:32 2021 -0500 scsi: be2iscsi: Remove redundant initialization The nested for loop variables i and j in beiscsi_free_mem() are initialized twice. The values outside of the loops are redundant and can be removed. Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/YJ2mMHNqAgTNVVj+@fedora Signed-off-by: Nigel Christian Signed-off-by: Martin K. Petersen commit 7f2b3c8bcb7f414c3f3c0a25c352238cbcdc890d Author: Keoseong Park Date: Thu May 13 17:53:20 2021 +0900 scsi: ufs: core: Remove redundant parenthesis Remove unnecessary parenthesis in ufshcd_is_wb_flags() and ufshcd_is_wbattrs(). Link: https://lore.kernel.org/r/1891546521.01620896402035.JavaMail.epsvc@epcpadp3 Signed-off-by: Keoseong Park Signed-off-by: Martin K. Petersen commit 4c6cb9ed63dfd53002e76e716a31a77854630726 Author: Bart Van Assche Date: Thu May 13 10:12:29 2021 -0700 scsi: ufs: core: Remove usfhcd_is_*_pm() macros Remove these macros to make the UFS driver source code easier to read. These macros were introduced by commit 57d104c153d3 ("ufs: add UFS power management support"). Link: https://lore.kernel.org/r/20210513171229.7439-1-bvanassche@acm.org Cc: Can Guo Cc: Alim Akhtar Cc: Avri Altman Cc: Stanley Chu Cc: Bean Huo Cc: Adrian Hunter Acked-by: Avri Altman Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 6e4e4e2a255849758b8d3240671060d355d71edf Author: Johan Jonker Date: Wed May 12 14:23:45 2021 +0200 ARM: dts: rockchip: move and restyle grf nodes rk3066/rk3188 With grf.txt converted to YAML a lot of compatibles did not have 'simple-mfd' added in the old binding. That implies that if you have child nodes they need to be documented. Make the new layout fit for rk3066/rk3188, move and restyle the grf nodes. Remove rockchip,grf from usbphy node. Add "#phy-cells", because it is a required property by phy-provider.yaml With the conversion of syscon.yaml minItems for compatibles was set to 2. Current Rockchip rk3xxx.dtsi file only uses "syscon" for the grf registers. Add "syscon", "simple-mfd" compatible for rk3066/rk3188 to reduce notifications produced with: make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mfd/syscon.yaml Changed compatibles: "rockchip,rk3066-grf", "syscon", "simple-mfd" "rockchip,rk3188-grf", "syscon", "simple-mfd" Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210512122346.9463-4-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 4803bd066cb9b31ce41104bc65ff596e32d3c373 Author: Christophe JAILLET Date: Tue Apr 20 20:48:41 2021 +0200 scsi: bfa: Remove some unused variables 'lp' is unused, it is just declared and zeroed Remove it. Link: https://lore.kernel.org/r/d10ccee35e35bf33d651f2e0163034d7c451520b.1618944442.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit b790a56d66eaac4a1ac6c558575fd0a694b06159 Author: Konstantin Shelekhin Date: Thu May 13 22:28:04 2021 +0300 scsi: target: core: Add the VERSION DESCRIPTOR fields to the INQUIRY data Extend the standard INQUIRY data to 96 bytes and fill in the VERSION DESCRIPTOR fields. The layout follows SPC-4: - SCSI architecture standard - SCSI transport protocol standard - SCSI primary command set standard - SCSI device type command set standard All version descriptor values are defined as "no version claimed" because some initiators fail to recognize anything else. [mkp: whitespace] Link: https://lore.kernel.org/r/20210513192804.1252142-3-k.shelekhin@yadro.com Reviewed-by: Roman Bolshakov Signed-off-by: Konstantin Shelekhin Signed-off-by: Martin K. Petersen commit 64ae33ef7486d01acb1f1d1ea601923973a3a462 Author: Konstantin Shelekhin Date: Thu May 13 22:28:03 2021 +0300 scsi: target: core: Bump INQUIRY VERSION to SPC-4 Bump the SCSI primary command set standard to SPC-4. The upcoming version descriptors will report newer SCSI standards (like SBC-3) that are not defined in SPC-3. Link: https://lore.kernel.org/r/20210513192804.1252142-2-k.shelekhin@yadro.com Reviewed-by: Roman Bolshakov Signed-off-by: Konstantin Shelekhin Signed-off-by: Martin K. Petersen commit 2469f1e0412cb053e37b7499ce5e48b6be4d7653 Author: Sergey Samoylenko Date: Tue Apr 20 21:59:20 2021 +0300 scsi: target: core: Add configurable IEEE Company ID attribute Implement an attribute which provides a way to set a company specific WWN in configfs via: target/core/$backstore/$name/wwn/company_id The Open Fabrics Alliance ID 001405h remains the default. Link: https://lore.kernel.org/r/20210420185920.42431-3-s.samoylenko@yadro.com Signed-off-by: Sergey Samoylenko Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 17f947b8b06f57615d31e4159dec1d5d7dda775f Author: Sergey Samoylenko Date: Tue Apr 20 21:59:19 2021 +0300 scsi: target: core: Unify NAA identifier generation Both the INQUIRY handling and the XCOPY implementation provide functions to generate an NAA designator. In addition, these functions are poorly named: - spc_parse_naa_6h_vendor_specific() - target_xcopy_gen_naa_ieee() Introduce a common NAA 6 designator generation function, spc_gen_naa_6h_vendor_specific(). Link: https://lore.kernel.org/r/20210420185920.42431-2-s.samoylenko@yadro.com Signed-off-by: Sergey Samoylenko Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 9c6f19421c935db05c414bdbb3645375cd600f8d Author: Dan Carpenter Date: Sat May 15 12:53:15 2021 +0300 drm: simpledrm: fix a potential NULL dereference The drm_format_info() function returns NULL if the format is unsupported, but the simplefb_get_validated_format() is expected to return error pointers. If we propagate the NULL return then it will lead to a NULL dereference in the callers. Swap the NULL and trade it in for an ERR_PTR(-EINVAL). Fixes: 11e8f5fd223b ("drm: Add simpledrm driver") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/YJ+aC47XX58ICXax@mwanda commit f8a78e9118ee6cee7c24113891a0e24b77486f5e Author: Jiapeng Chong Date: Thu May 13 18:49:37 2021 +0800 scsi: target: sbp_target: Remove redundant assignment to pg_size Variable pg_size is set to '0x100 << pg_size', but this value is never read and it is not used later on. Hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/target/sbp/sbp_target.c:1264:3: warning: Value stored to 'pg_size' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1620902977-57076-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 96f3903c4c7ac2c2794a9d5d6bbd2c84b079c682 Author: Jiapeng Chong Date: Wed May 12 18:12:07 2021 +0800 scsi: message: fusion: Remove redundant assignment to rc Variable rc is set to '-1', but this value is never read as it is overwritten later. Hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/message/fusion/mptbase.c:6996:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1620814327-25427-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 2e51f78b5d8717bba243f5e857031b1d104a3577 Author: Brian King Date: Tue May 11 13:12:20 2021 -0500 scsi: ibmvfc: Reinit target retries If rport target discovery commands fail for some reason, they get retried up to a set number of retries. Once the retry limit is exceeded, the target is deleted. In order to delete the target, we either need to do an implicit logout or a move login. In the move login case, if the move login fails, we want to retry it. This ensures the retry counter gets reinitialized so the move login will get retried. Link: https://lore.kernel.org/r/1620756740-7045-4-git-send-email-brking@linux.vnet.ibm.com Signed-off-by: Brian King Signed-off-by: Martin K. Petersen commit 5114975eb2de4e70d9d43b57912e1aee12ec090b Author: Brian King Date: Tue May 11 13:12:19 2021 -0500 scsi: ibmvfc: Avoid move login if fast fail is enabled If fast fail is enabled and we encounter a WWPN moving from one port id to another port id with I/O outstanding, if we use the move login MAD, although it will work, it will leave any outstanding I/O still outstanding to the old port id. Eventually, the SCSI command timers will fire and we will abort these commands, however, this is generally much longer than the fast fail timeout, which can lead to I/O operations being outstanding for a long time. This patch changes the behavior to avoid the move login if fast fail is enabled. Once terminate_rport_io cleans up the rport, then we force the target back through the delete process, which re-drives the implicit logout, then kicks us back into discovery where we will discover the WWPN at the new location and do a PLOGI to it. Link: https://lore.kernel.org/r/1620756740-7045-3-git-send-email-brking@linux.vnet.ibm.com Signed-off-by: Brian King Signed-off-by: Martin K. Petersen commit d5b45dd5ba6c944b17118530843e67bf9c096e49 Author: Brian King Date: Tue May 11 13:12:18 2021 -0500 scsi: ibmvfc: Handle move login failure When service is being performed on an SVC with NPIV enabled, the WWPN of the canister / node being serviced fails over to the another canister / node. This looks to the ibmvfc driver as a WWPN moving from one SCSI ID to another. The driver will first attempt to do an implicit logout of the old SCSI ID. If this works, we simply delete the rport at the old location and add an rport at the new location and the FC transport class handles everything. However, if there is I/O outstanding, this implicit logout will fail, in which case we will send a "move login" request to the VIOS. This will cancel any outstanding I/O to that port, logout the port, and PLOGI the new port. Recently we've encountered a scenario where the move login fails. This was resulting in an attempted plogi to the new scsi id, without the old scsi id getting logged out, which is a VIOS protocol violation. To solve this, we want to keep tracking the old scsi id as the current scsi id. That way, once terminate_rport_io cancels the outstanding i/o, it will send us back through to do an implicit logout of the old scsi id, rather than the new scsi id, and then we can plogi the new scsi id. Link: https://lore.kernel.org/r/1620756740-7045-2-git-send-email-brking@linux.vnet.ibm.com Signed-off-by: Brian King Signed-off-by: Martin K. Petersen commit 3ac0fcb4b1a34d196da926d302635052fd90379e Author: Bodo Stroesser Date: Wed May 12 16:06:54 2021 +0200 scsi: target: tcmu: Rename TCM_DEV_BIT_PLUGGED to TCMU_DEV_BIT_PLUGGED The bit definition TCM_DEV_BIT_PLUGGED should correctly be named TCMU_DEV_BIT_PLUGGED, since all other bits in the same bitfield have prefix TCMU_. Link: https://lore.kernel.org/r/20210512140654.31249-1-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 2dde5c8d912efea43be94d6a83ac9cb74879fa12 Author: Xiang Chen Date: Mon May 10 19:35:26 2021 +0800 scsi: core: Fix a comment in function scsi_host_dev_release() Commit 3be8828fc507 ("scsi: core: Avoid that ATA error handling can trigger a kernel hang or oops") moved rcu to scsi_cmnd instead of shost. Modify "shost->rcu" to "scmd->rcu" in a comment. Link: https://lore.kernel.org/r/1620646526-193154-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen commit 1a7910368cba1e76b992b116fc8ba28503e6dcc1 Author: José Roberto de Souza Date: Fri May 14 08:37:11 2021 -0700 drm/i915/adl_p: Disable CCS on a-step (Wa_22011186057) Buffer compression is not usable in A stepping. Cc: Matt Roper Cc: Anusha Srivatsa Cc: Clinton A Taylor Cc: Juha-Pekka Heikkilä Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-20-matthew.d.roper@intel.com commit 2680bea758f270c11f8a5b78152930b92596f2ef Author: José Roberto de Souza Date: Fri May 14 08:37:10 2021 -0700 drm/i915/display/adl_p: Implement Wa_22011320316 Implementation details are in the HSD 22011320316, requiring CD clock to be at least 307MHz to make DC states to work. Cc: Matt Roper Cc: Anusha Srivatsa Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-19-matthew.d.roper@intel.com commit a8a56da71a13358528446f4903f6c939dd1d6a1d Author: José Roberto de Souza Date: Fri May 14 08:37:09 2021 -0700 drm/i915/adl_p: Implement Wa_22011091694 Adding a new hook to ADL-P just to avoid another platform check in gen12lp_init_clock_gating() but also open to it. BSpec: 54369 Cc: Matt Roper Cc: Anusha Srivatsa Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-18-matthew.d.roper@intel.com commit b2c6eaf27b508ce5f63e59e3cfb6ae0231685eee Author: José Roberto de Souza Date: Fri May 14 08:37:08 2021 -0700 drm/i915/adl_p: Add IPs stepping mapping This will allow us to better implement workarounds. Cc: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Jani Nikula Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-17-matthew.d.roper@intel.com commit d961eb20adb642c62ad588666e84444240ef6288 Author: Animesh Manna Date: Fri May 14 08:37:07 2021 -0700 drm/i915/bigjoiner: atomic commit changes for uncompressed joiner Respective bit for master or slave to be set for uncompressed bigjoiner in dss_ctl1 register. Cc: Manasi Navare Signed-off-by: Animesh Manna Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-16-matthew.d.roper@intel.com commit e6f9bb62fbbf2cf0336c954033e08837bf7aaf8d Author: Animesh Manna Date: Fri May 14 08:37:06 2021 -0700 drm/i915/bigjoiner: Avoid dsc_compute_config for uncompressed bigjoiner For uncompressed big joiner DSC engine will not be used so will avoid compute config of DSC. Cc: Manasi Navare Signed-off-by: Animesh Manna Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-15-matthew.d.roper@intel.com commit ca844ea7e1c98ad65da71623aee67c807c75eaab Author: Animesh Manna Date: Fri May 14 08:37:05 2021 -0700 drm/i915/bigjoiner: Mode validation with uncompressed pipe joiner No need for checking dsc flag for uncompressed pipe joiner mode validation. Cc: Manasi Navare Signed-off-by: Animesh Manna Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-14-matthew.d.roper@intel.com commit 03bca4a8c1f25d743a6f0bc7dfe49028faedf2a6 Author: Mika Kahola Date: Fri May 14 08:37:04 2021 -0700 drm/i915/adl_p: Enable/disable loadgen sharing Disable loadgen sharing for DP link rate 1.62 GHz and HDMI 5.94 GHz. For all other modes, we can enable loadgen sharing feature. BSpec: 55359 Cc: Imre Deak Signed-off-by: Mika Kahola Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-13-matthew.d.roper@intel.com commit de1dc033f63e36fb07e6e77fbdc94b026f498ba5 Author: Ville Syrjälä Date: Fri May 14 08:37:03 2021 -0700 drm/i915: Move intel_modeset_all_pipes() Move intel_modeset_all_pipes() to a central place so that we can use it elsewhere as well. No functional changes. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-12-matthew.d.roper@intel.com commit 57ed0dfb40ca4ab74cb55bd31ae6eaef0a3d11aa Author: José Roberto de Souza Date: Fri May 14 08:37:02 2021 -0700 drm/i915/adl_p: Enable modular fia Alderlake P have modular FIA like TGL but it is always modular in all skus, not like TGL that we had to read a register to check if it is monolithic or modular. BSpec: 55480 BSpec: 50572 Cc: Imre Deak Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-11-matthew.d.roper@intel.com commit f53979d68a7725848b5c4307fb7de2d232b0768e Author: José Roberto de Souza Date: Fri May 14 08:37:01 2021 -0700 drm/i915/display/tc: Rename safe_mode functions ownership When DP_PHY_MODE_STATUS_NOT_SAFE is set, it means that display has the control over the TC phy. The "not safe" naming is confusing using ownership make it easier to read also future platforms will have a new register that does the same job as DP_PHY_MODE_STATUS_NOT_SAFE but with the onwership name. BSpec: 49294 Cc: Imre Deak Signed-off-by: José Roberto de Souza Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-10-matthew.d.roper@intel.com commit 626426ff9ce42fb1446debad544407eae5aa7215 Author: Anusha Srivatsa Date: Fri May 14 08:37:00 2021 -0700 drm/i915/adl_p: Add cdclk support for ADL-P ADL-P has 3 possible refclk frequencies: 19.2MHz, 24MHz and 38.4MHz While we're at it, remove the drm_WARNs. They've never actually helped us catch any problems, but it's very easy to forget to update them properly for new platforms. BSpec: 55409, 49208 Cc: Matt Roper Cc: Clinton Taylor Cc: José Roberto de Souza Signed-off-by: Anusha Srivatsa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-9-matthew.d.roper@intel.com commit 47d263a6d8d8335d612334e7956cdfb674696a46 Author: Matt Roper Date: Fri May 14 08:36:59 2021 -0700 drm/i915/adl_p: Extend PLANE_WM bits for blocks & lines ADL-P further extends the bits in PLANE_WM that represent blocks and lines; we need to extend our masks accordingly. Since these bits are reserved and MBZ on earlier platforms, it's safe to use the larger bitmask on all platforms. Bspec: 50419 Cc: Matt Atwood Signed-off-by: Matt Roper Signed-off-by: Clinton Taylor Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-8-matthew.d.roper@intel.com commit eeb63c5464bdf1871adbb84f1a83a5ecb9b1c91b Author: José Roberto de Souza Date: Fri May 14 08:36:58 2021 -0700 drm/i915/xelpd: Provide port/phy mapping for vbt This will allow proper DDI initialization based on vbt information. Cc: Uma Shankar Signed-off-by: José Roberto de Souza Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-7-matthew.d.roper@intel.com commit 5a6d866f8e1bfe4ff5cc4f7ab217607d483f2209 Author: Vandita Kulkarni Date: Fri May 14 08:36:57 2021 -0700 drm/i915: Get slice height before computing rc params We need slice height to calculate few RC parameters hence assign slice height first. Cc: Manasi Navare Signed-off-by: Vandita Kulkarni Signed-off-by: Matt Roper Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-6-matthew.d.roper@intel.com commit 831d5aa96c97514de44e871f564b563929bb3a57 Author: Vandita Kulkarni Date: Fri May 14 08:36:56 2021 -0700 drm/i915/xelpd: Support DP1.4 compression BPPs Support compression BPPs from bpc to uncompressed BPP -1. So far we have 8,10,12 as valid compressed BPPS now the support is extended. Cc: Manasi Navare Signed-off-by: Vandita Kulkarni Signed-off-by: Matt Roper Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-5-matthew.d.roper@intel.com commit 6ee9dea52a65cdc080599890cc66d9de51a78163 Author: Vandita Kulkarni Date: Fri May 14 08:36:55 2021 -0700 drm/i915/display/dsc: Refactor intel_dp_dsc_compute_bpp Move the platform specific max bpc calculation into intel_dp_dsc_compute_bpp function Cc: Manasi Navare Signed-off-by: Vandita Kulkarni Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-4-matthew.d.roper@intel.com commit 1003cee29fb0bd60c293579bbc4ed50bab39f40f Author: Matt Roper Date: Fri May 14 08:36:54 2021 -0700 drm/i915/xelpd: Increase maximum watermark lines to 255 XE_LPD continues to use the same "skylake-style" watermark programming as other recent platforms. The only change to the watermark calculations compared to Display12 is that XE_LPD now allows a maximum of 255 lines vs the old limit of 31. Due to the larger possible lines value, the corresponding bits representing the value in PLANE_WM are also extended, so make sure we read/write enough bits. Let's also take this opportunity to switch over to the REG_FIELD notation. Bspec: 49325 Bspec: 50419 Cc: Ville Syrjälä Cc: Anshuman Gupta Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-3-matthew.d.roper@intel.com commit ed2615a85556b5c24bd9353b6f611bbb79ae931e Author: Matt Roper Date: Fri May 14 08:36:53 2021 -0700 drm/i915/xelpd: Handle new location of outputs D and E The DDI naming template for display version 12 went A-C, TC1-TC6. With XE_LPD, that naming scheme for DDI's has now changed to A-E, TC1-TC4. The XE_LPD design keeps the register offsets and bitfields relating to the TC outputs in the same location they were previously. The new "D" and "E" outputs now take the locations that were previously used by TC5 and TC6 outputs, or what we would have considered to be outputs "H" and "I" under the legacy lettering scheme. For the most part everything will just work as long as we initialize the output with the proper 'enum port' value. However we do need to take care to pick the correct AUX channel when parsing the VBT (e.g., a reference to 'AUX D' is actually asking us to use the 8th aux channel, not the fourth). We should also make sure that our encoders and aux channels are named appropriately so that it's easier to correlate driver debug messages with the bspec instructions. v2: - Update handling of TGL_TRANS_CLK_SEL_PORT. (Jose) v3: - Add hpd_pin to handle outputs D and E (Jose) - Fixed conversion of BIOS port to aux ch for TC ports (Jose) Cc: José Roberto de Souza Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Signed-off-by: Matt Roper Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-2-matthew.d.roper@intel.com commit 09c65383970e79db0322962efc9e56a0785580f3 Author: Guenter Roeck Date: Sun May 9 21:12:11 2021 -0700 scsi: qedf: Drop unnecessary NULL checks after container_of() The result of container_of() operations is never NULL unless the embedded element is the first element of the structure, which is not the case here. The NULL checks are therefore unnecessary and misleading. Remove them. The changes in this patch were made automatically using the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Link: https://lore.kernel.org/r/20210510041211.2051325-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Martin K. Petersen commit 998da772fd86bd4ba2ba8c0ac2c9bba4815a952d Author: Guenter Roeck Date: Sun May 9 21:08:17 2021 -0700 scsi: target: iscsi: Drop unnecessary container_of() The structure pointer passed to container_of() is never NULL; that was already checked. That means that the result of container_of() operations on it is also never NULL, even though se_node_acl is the first element of the structure embedding it. On top of that, it is misleading to perform a NULL check on the result of container_of() because the position of the contained element could change, which would make the test invalid. Remove the unnecessary NULL check. As it turns out, the container_of operation was only made for the purpose of the NULL check. If the container_of is actually needed, it is repeated later. Remove the container_of operation as well. The NULL check was identified and removed with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Link: https://lore.kernel.org/r/20210510040817.2050266-1-linux@roeck-us.net Cc: "Martin K. Petersen" Cc: Hou Pu Cc: Mike Christie Signed-off-by: Guenter Roeck Signed-off-by: Martin K. Petersen commit 8fb82abccc8a4fc25c75bf209da9b2023d064e05 Author: Uwe Kleine-König Date: Thu May 6 22:32:06 2021 +0200 scsi: scsi_debug: Drop if with an always false condition to_sdebug_host() is a container_of operation, so it never returns NULL. Link: https://lore.kernel.org/r/20210506203206.254258-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Martin K. Petersen commit 9959d45166faaa75d9d4bf2ad8b945dfbe9888f8 Author: Christophe JAILLET Date: Thu May 6 20:38:20 2021 +0200 scsi: snic: Fix an error message 'ret' is known to be 0 here. No error code is available so just remove 'ret' from the error message. While at it, change the word "Queuing" into "Init" which looks more appropriate. Link: https://lore.kernel.org/r/3b9d5d767e09d03a07bede293a6ba32e3735cd1a.1620326191.git.christophe.jaillet@wanadoo.fr Fixes: c8806b6c9e82 ("snic: driver for Cisco SCSI HBA") Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 6ecdafaec79d4b3388a5b017245f23a0ff9d852d Author: Varun Prakash Date: Wed Apr 14 18:09:09 2021 +0530 scsi: target: cxgbit: Unmap DMA buffer before calling target_execute_cmd() Instead of calling dma_unmap_sg() after completing WRITE I/O, call dma_unmap_sg() before calling target_execute_cmd() to sync the DMA buffer. Link: https://lore.kernel.org/r/1618403949-3443-1-git-send-email-varun@chelsio.com Cc: # 5.4+ Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 1d8613a23f3c3b8f0101e453ff150e05a0d1cd4f Author: Can Guo Date: Wed Apr 21 19:28:39 2021 -0700 scsi: ufs: core: Introduce HBA performance monitor sysfs nodes Add a new sysfs group which has nodes to monitor data/request transfer performance. This sysfs group has nodes showing total sectors/requests transferred, total busy time spent and max/min/avg/sum latencies. This group can be enhanced later to show more UFS driver layer performance statistics data during runtime. Link: https://lore.kernel.org/r/1619058521-35307-2-git-send-email-cang@codeaurora.org Reviewed-by: Daejun Park Acked-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 399d34ebc2483c6091a587e5905c6ed34116fb05 Author: Dan Williams Date: Thu May 13 22:22:05 2021 -0700 cxl/core: Refactor CXL register lookup for bridge reuse While CXL Memory Device endpoints locate the CXL MMIO registers in a PCI BAR, CXL root bridges have their MMIO base address described by platform firmware. Refactor the existing register lookup into a generic facility for endpoints and bridges to share. Reviewed-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162096972534.1865304.3218686216153688039.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 5f653f7590ab7db7379f668b2975744585206b0d Author: Dan Williams Date: Thu May 13 22:22:00 2021 -0700 cxl/core: Rename bus.c to core.c In preparation for more generic shared functionality across endpoint consumers of core cxl resources, and platform-firmware producers of those resources, rename bus.c to core.c. In addition to the central rendezvous for interleave coordination, the core will also define common routines like CXL register block mapping. Acked-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162096972018.1865304.11079951161445408423.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 8ac75dd6ab3039ef0656d777a564ea1b65071971 Author: Dan Williams Date: Thu May 13 22:21:54 2021 -0700 cxl/mem: Introduce 'struct cxl_regs' for "composable" CXL devices CXL MMIO register blocks are organized by device type and capabilities. There are Component registers, Device registers (yes, an ambiguous name), and Memory Device registers (a specific extension of Device registers). It is possible for a given device instance (endpoint or port) to implement register sets from multiple of the above categories. The driver code that enumerates and maps the registers is type specific so it is useful to have a dedicated type and helpers for each block type. At the same time, once the registers are mapped the origin type does not matter. It is overly pedantic to reference the register block type in code that is using the registers. In preparation for the endpoint driver to incorporate Component registers into its MMIO operations reorganize the registers to allow typed enumeration + mapping, but anonymous usage. With the end state of 'struct cxl_regs' to be: struct cxl_regs { union { struct { CXL_DEVICE_REGS(); }; struct cxl_device_regs device_regs; }; union { struct { CXL_COMPONENT_REGS(); }; struct cxl_component_regs component_regs; }; }; With this arrangement the driver can share component init code with ports, but when using the registers it can directly reference the component register block type by name without the 'component_regs' prefix. So, map + enumerate can be shared across drivers of different CXL classes e.g.: void cxl_setup_device_regs(struct device *dev, void __iomem *base, struct cxl_device_regs *regs); void cxl_setup_component_regs(struct device *dev, void __iomem *base, struct cxl_component_regs *regs); ...while inline usage in the driver need not indicate where the registers came from: readl(cxlm->regs.mbox + MBOX_OFFSET); readl(cxlm->regs.hdm + HDM_OFFSET); ...instead of: readl(cxlm->regs.device_regs.mbox + MBOX_OFFSET); readl(cxlm->regs.component_regs.hdm + HDM_OFFSET); This complexity of the definition in .h yields improvement in code readability in .c while maintaining type-safety for organization of setup code. It prepares the implementation to maintain organization in the face of CXL devices that compose register interfaces consisting of multiple types. Given that this new container is named 'regs' rename the common register base pointer @base, and fixup the kernel-doc for the missing @cxlmd description. Reviewed-by: Ben Widawsky Reviewed-by: Jonathan Cameron Cc: Christoph Hellwig Link: https://lore.kernel.org/r/162096971451.1865304.13540251513463515153.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 5f50d6b20ca31d91de14cc09be3e5ce67bc99e04 Author: Dan Williams Date: Thu May 13 22:21:49 2021 -0700 cxl/mem: Move some definitions to mem.h In preparation for sharing cxl.h with other generic CXL consumers, move / consolidate some of the memory device specifics to mem.h. The motivation for moving out of cxl.h is to maintain least privilege access to memory-device details since cxl.h is used in multiple files. The motivation for moving definitions into a new mem.h header is for code readability and organization. I.e. minimize implementation details when reading data structures and other definitions. Reviewed-by: Ben Widawsky Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/162096970932.1865304.14510894426562947262.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 513f485ca5163c6cba869602d076a8e2f04d1ca1 Author: Andrii Nakryiko Date: Fri May 14 12:55:34 2021 -0700 libbpf: Reject static entry-point BPF programs Detect use of static entry-point BPF programs (those with SEC() markings) and emit error message. This is similar to c1cccec9c636 ("libbpf: Reject static maps") but for BPF programs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210514195534.1440970-1-andrii@kernel.org commit 77091933e453a258bbe9ff2aeb1c8d6fc1db7ef9 Author: Ansuel Smith Date: Fri May 14 23:03:51 2021 +0200 net: mdio: ipq8064: enlarge sleep after read/write operation With the use of the qca8k dsa driver, some problem arised related to port status detection. With a load on a specific port (for example a simple speed test), the driver starts to behave in a strange way and garbage data is produced. To address this, enlarge the sleep delay and address a bug for the reg offset 31 that require additional delay for this specific reg. Signed-off-by: Ansuel Smith Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b097bea10215315e8ee17f88b4c1bbb521b1878c Author: Ansuel Smith Date: Fri May 14 23:03:50 2021 +0200 net: mdio: ipq8064: add regmap config to disable REGCACHE mdio drivers should not use REGCHACHE. Also disable locking since it's handled by the mdio users and regmap is always accessed atomically. Signed-off-by: Ansuel Smith Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 948640698199c06c8bfbdcc4d602922ad7a6f77d Author: Ansuel Smith Date: Fri May 14 23:03:49 2021 +0200 net: mdio: ipq8064: clean whitespaces in define Fix mixed whitespace and tab for define spacing. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ddd998aff5401dc663e1320568ce2884aeda113c Merge: 709c031423999 272833b9b3b39 Author: David S. Miller Date: Fri May 14 15:30:23 2021 -0700 Merge branch 'qca8k-improvements' Ansuel Smith says: ==================== Multiple improvement to qca8k stability Currently qca8337 switch are widely used on ipq8064 based router. On these particular router it was notice a very unstable switch with port not link detected as link with unknown speed, port dropping randomly and general unreliability. Lots of testing and comparison between this dsa driver and the original qsdk driver showed lack of some additional delay and values. A main difference arised from the original driver and the dsa one. The original driver didn't use MASTER regs to read phy status and the dedicated mdio driver worked correctly. Now that the dsa driver actually use these regs, it was found that these special read/write operation required mutual exclusion to normal qca8k_read/write operation. The add of mutex for these operation fixed the random port dropping and now only the actual linked port randomly dropped. Adding additional delay for set_page operation and fixing a bug in the mdio dedicated driver fixed also this problem. The current driver requires also more time to apply vlan switch. All of these changes and tweak permit a now very stable and reliable dsa driver and 0 port dropping. This series is currently tested by at least 5 user with different routers and all reports positive results and no problems. Changes v6: - Fix spelling mistake - Change ms to ns (confirmed by datasheet) Changes v5: - Removed mdio patch (sent separetly to try to reduce the series) I know it was asked to reduced this series since it big, but rework the new changes to skip and error check looks wrong. Since half of them are actually already reviewed I think it's better to keep this series as is. - Improve rgmii configurable patch - Move qca8k phy dedicated driver to at803x phy driver - Add support for dedicated internal mdio driver for qca8k Changes v4: - Use iopoll for busy_wait function - Better describe and split some confusing commits - Fix bad rgmii delay configurable patch - Drop phy generic patch to pass flags with phylink_connect_phy - Add dsa2 patch to declare mdio node in the switch node - Add dsa patch to permit dsa driver to declare custom get_phys_mii_mask Some background about the last 2 patch. The qca8k switch doesn't have a 1:1 map between port reg and phy reg. Currently it's used a function to convert port to the internal phy reg. I added some patch to fix this. - The dsa driver now check if the mdio node is present and use the of variant of the mdiobus_register - A custom phy_mii_mask is required as currently the mask is generated from the port reg, but in our case the mask would be different as it should be generated from the phy reg. To generalize this I added an extra function that driver can provide to pass custom phy_mii_mask. Changes v3: - Revert mdio writel changes (use regmap with REGCACHE disabled) - Split propagate error patch to 4 different patch Changes v2: - Implemented phy driver for internal PHYs I'm testing cable test functions as I found some documentation that actually declare regs about it. Problem is that it doesn't actually work. It seems that the value set are ignored by the phy. - Made the rgmii delay configurable - Reordered patch - Split mdio patches to more specific ones - Reworked mdio driver to use readl/writel instead of regmap - Reworked the entire driver to make it aware of any read/write error. - Added phy generic patch to pass flags with phylink_connect_phy function ==================== Signed-off-by: David S. Miller commit 272833b9b3b3969be7a91839121d86662c8c4253 Author: Ansuel Smith Date: Fri May 14 23:00:15 2021 +0200 net: phy: add support for qca8k switch internal PHY in at803x Since the at803x share the same regs, it's assumed they are based on the same implementation. Make it part of the at803x PHY driver to skip having redudant code. Add initial support for qca8k internal PHYs. The internal PHYs requires special mmd and debug values to be set based on the switch revision passwd using the dev_flags. Supports output of idle, receive and eee_wake errors stats. Some debug values sets can't be translated as the documentation lacks any reference about them. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit d0e13fd5626c3346dfb43831f8fb42b14764dac3 Author: Ansuel Smith Date: Fri May 14 23:00:14 2021 +0200 net: phy: at803x: clean whitespace errors Clean any whitespace errors and fix not aligned define. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit a46aec02bc06ac2c33f326339e4ef88c735dc30d Author: Ansuel Smith Date: Fri May 14 23:00:13 2021 +0200 net: dsa: qca8k: pass switch_revision info to phy dev_flags Define get_phy_flags to pass switch_Revision needed to tweak the internal PHY with debug values based on the revision. Signed-off-by: Ansuel Smith Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b7ebac354d54f1657bb89b7a7ca149db50203e6a Author: Ansuel Smith Date: Fri May 14 23:00:12 2021 +0200 net: dsa: qca8k: improve internal mdio read/write bus access Improve the internal mdio read/write bus access by caching the value without accessing it for every read/write. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit 0c994a28e7518f098c84a3049cb2915780db873a Author: Ansuel Smith Date: Fri May 14 23:00:11 2021 +0200 devicetree: bindings: dsa: qca8k: Document internal mdio definition Document new way of declare mapping of internal PHY to port. The new implementation directly declare the PHY connected to the port by adding a node in the switch node. The driver detect this and register an internal mdiobus using the mapping defined in the mdio node. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 759bafb8a3226326ca357613bc90acf738f80c32 Author: Ansuel Smith Date: Fri May 14 23:00:10 2021 +0200 net: dsa: qca8k: add support for internal phy and internal mdio Add support to setup_mdio_bus for internal phy declaration. Introduce a flag to use the legacy port phy mapping by default and use the direct mapping if a mdio node is detected in the switch node. Register a dedicated mdio internal mdio bus to address the different mapping between port and phy if the mdio node is detected. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit 617960d72e93de0f3fa52407e2d39e8c43e73b0a Author: Ansuel Smith Date: Fri May 14 23:00:09 2021 +0200 net: dsa: qca8k: enlarge mdio delay and timeout The witch require some extra delay after setting page or the next read/write can use still use the old page. Add a delay after the set_page function to address this as it's done in QSDK legacy driver. Some timeouts were notice with VLAN and phy function, enlarge the mdio busy wait timeout to fix these problems. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit 60df02b6ea4581d72eb7a3ab7204504a54059b72 Author: Ansuel Smith Date: Fri May 14 23:00:08 2021 +0200 net: dsa: qca8k: dsa: qca8k: protect MASTER busy_wait with mdio mutex MDIO_MASTER operation have a dedicated busy wait that is not protected by the mdio mutex. This can cause situation where the MASTER operation is done and a normal operation is executed between the MASTER read/write and the MASTER busy_wait. Rework the qca8k_mdio_read/write function to address this issue by binding the lock for the whole MASTER operation and not only the mdio read/write common operation. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 63c33bbfeb6842a956a0eb12901e28eb335bdb18 Author: Ansuel Smith Date: Fri May 14 23:00:07 2021 +0200 net: dsa: qca8k: clear MASTER_EN after phy read/write Clear MDIO_MASTER_EN bit from MDIO_MASTER_CTRL after read/write operation. The MDIO_MASTER_EN bit is not reset after read/write operation and the next operation can be wrongly interpreted by the switch as a mdio operation. This cause a production of wrong/garbage data from the switch and underfined bheavior. (random port drop, unplugged port flagged with link up, wrong port speed) Also on driver remove the MASTER_CTRL can be left set and cause the malfunction of any next driver using the mdio device. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit e4b9977cee1583da38a6e9118078bb728aaccf7b Author: Ansuel Smith Date: Fri May 14 23:00:06 2021 +0200 net: dsa: qca8k: make rgmii delay configurable The legacy qsdk code used a different delay instead of the max value. Qsdk use 1 ns for rx and 2 ns for tx. Make these values configurable using the standard rx/tx-internal-delay-ps ethernet binding and apply qsdk values by default. The connected gmac doesn't add any delay so no additional delay is added to tx/rx. On this switch the delay is actually in ns so value should be in the 1000 order. Any value converted from ps to ns by dividing it by 1000 as the switch max value for delay is 3ns. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit 1ee0591a1093c2448642c33433483e9260275f7b Author: Ansuel Smith Date: Fri May 14 23:00:05 2021 +0200 net: dsa: qca8k: add ethernet-ports fallback to setup_mdio_bus Dsa now also supports ethernet-ports. Add this new binding as a fallback if the ports node can't be found. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 95ffeaf18b3bb90eeef52cbf7d79ccc9d0345ff5 Author: Ansuel Smith Date: Fri May 14 23:00:04 2021 +0200 net: dsa: qca8k: add support for switch rev qca8k internal phy driver require some special debug value to be set based on the switch revision. Rework the switch id read function to also read the chip revision. Signed-off-by: Ansuel Smith Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0fc57e4b5e39461fc0a54aae0afe4241363a7267 Author: Ansuel Smith Date: Fri May 14 23:00:03 2021 +0200 net: dsa: qca8k: add GLOBAL_FC settings needed for qca8327 Switch qca8327 needs special settings for the GLOBAL_FC_THRES regs. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit 5bf9ff3b9fb5ecb67a1a3517b26db3a00f2a2f11 Author: Ansuel Smith Date: Fri May 14 23:00:02 2021 +0200 net: dsa: qca8k: limit port5 delay to qca8337 Limit port5 rx delay to qca8337. This is taken from the legacy QSDK code that limits the rx delay on port5 to only this particular switch version, on other switch only the tx and rx delay for port0 are needed. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 83a3ceb39b2495171aabe9446271b94c678354f3 Author: Ansuel Smith Date: Fri May 14 23:00:01 2021 +0200 net: dsa: qca8k: add priority tweak to qca8337 switch The port 5 of the qca8337 have some problem in flood condition. The original legacy driver had some specific buffer and priority settings for the different port suggested by the QCA switch team. Add this missing settings to improve switch stability under load condition. The packet priority tweak is only needed for the qca8337 switch and other qca8k switch are not affected. Signed-off-by: Ansuel Smith Signed-off-by: David S. Miller commit 227a9ffc1bc77037339530607fe129af3824620e Author: Ansuel Smith Date: Fri May 14 23:00:00 2021 +0200 devicetree: net: dsa: qca8k: Document new compatible qca8327 Add support for qca8327 in the compatible list. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6e82a457e06252b59102486767539cc9c2aba60b Author: Ansuel Smith Date: Fri May 14 22:59:59 2021 +0200 net: dsa: qca8k: add support for qca8327 switch qca8327 switch is a low tier version of the more recent qca8337. It does share the same regs used by the qca8k driver and can be supported with minimal change. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b7c818d194927bdc60ed15db55bb8654496a36b7 Author: Ansuel Smith Date: Fri May 14 22:59:58 2021 +0200 net: dsa: qca8k: handle error from qca8k_busy_wait Propagate errors from qca8k_busy_wait instead of hardcoding return value. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit aaf421425cbdec4eb6fd75a29e65c2867b0b7bbd Author: Ansuel Smith Date: Fri May 14 22:59:57 2021 +0200 net: dsa: qca8k: handle error with qca8k_rmw operation qca8k_rmw can fail. Rework any user to handle error values and correctly return. Change qca8k_rmw to return the error code or 0 instead of the reg value. The reg returned by qca8k_rmw wasn't used anywhere, so this doesn't cause any functional change. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d7805757c75c76e9518fc1023a29f0c4eed5b581 Author: Ansuel Smith Date: Fri May 14 22:59:56 2021 +0200 net: dsa: qca8k: handle error with qca8k_write operation qca8k_write can fail. Rework any user to handle error values and correctly return. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 028f5f8ef44fcf87a456772cbb9f0d90a0a22884 Author: Ansuel Smith Date: Fri May 14 22:59:55 2021 +0200 net: dsa: qca8k: handle error with qca8k_read operation qca8k_read can fail. Rework any user to handle error values and correctly return. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ba5707ec58cfb6853dff41c2aae72deb6a03d389 Author: Ansuel Smith Date: Fri May 14 22:59:54 2021 +0200 net: dsa: qca8k: handle qca8k_set_page errors With a remote possibility, the set_page function can fail. Since this is a critical part of the write/read qca8k regs, propagate the error and terminate any read/write operation. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 504bf65931824eda83494e5b5d75686e27ace03e Author: Ansuel Smith Date: Fri May 14 22:59:53 2021 +0200 net: dsa: qca8k: improve qca8k read/write/rmw bus access Put bus in local variable to improve faster access to the mdio bus. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2ad255f2faaffb3af786031fba2e7955454b558a Author: Ansuel Smith Date: Fri May 14 22:59:52 2021 +0200 net: dsa: qca8k: use iopoll macro for qca8k_busy_wait Use iopoll macro instead of while loop. Signed-off-by: Ansuel Smith Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5d9e068402dcf7354cc8ee66c2152845306d2ccb Author: Ansuel Smith Date: Fri May 14 22:59:51 2021 +0200 net: dsa: qca8k: change simple print to dev variant Change pr_err and pr_warn to dev variant. Signed-off-by: Ansuel Smith Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 709c0314239992162cba26a860f04319a15860c4 Author: Jakub Kicinski Date: Fri May 14 13:04:25 2021 -0700 tcp: add tracepoint for checksum errors Add a tracepoint for capturing TCP segments with a bad checksum. This makes it easy to identify sources of bad frames in the fleet (e.g. machines with faulty NICs). It should also help tools like IOvisor's tcpdrop.py which are used today to get detailed information about such packets. We don't have a socket in many cases so we must open code the address extraction based just on the skb. v2: add missing export for ipv6=m Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7466b60a3c32a8ad8033b06089e5aae5e8260e86 Merge: 76e3d7fadef65 224bf7db5518d Author: David S. Miller Date: Fri May 14 15:20:11 2021 -0700 Merge branch 'use-xdp-helpers' Matteo Croce says: ==================== net: use XDP helpers The commit 43b5169d8355 ("net, xdp: Introduce xdp_init_buff utility routine") and commit be9df4aff65f ("net, xdp: Introduce xdp_prepare_buff utility routine") introduces two useful helpers to populate xdp_buff. Use it in drivers which still open codes that routines. ==================== Signed-off-by: David S. Miller commit 224bf7db5518d804932c0c78b1206ebb21f43d6a Author: Matteo Croce Date: Fri May 14 20:39:54 2021 +0200 vhost_net: use XDP helpers Make use of the xdp_{init,prepare}_buff() helpers instead of an open-coded version. Also, the field xdp->rxq was never set, so pass NULL to xdp_init_buff() to clear it. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 082294f294f6de4b50be0af354adb83e45816db4 Author: Matteo Croce Date: Fri May 14 20:39:53 2021 +0200 igc: use XDP helpers Make use of the xdp_{init,prepare}_buff() helpers instead of an open-coded version. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit d172268f93cfbead85102c2171c83c9ad558831b Author: Matteo Croce Date: Fri May 14 20:39:52 2021 +0200 stmmac: use XDP helpers Make use of the xdp_{init,prepare}_buff() helpers instead of an open-coded version. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 76e3d7fadef6558cf0528755f386bb45055efabc Merge: 2d1c5f29d27a3 8d1a81f21a9e0 Author: David S. Miller Date: Fri May 14 15:13:52 2021 -0700 Merge branch 'rk3308-gmac' Tobias Schramm says: ==================== Add support for RK3308 gmac The Rockchip RK3308 SoC features an internal gmac. Only the signals required for RMII are exposed so it is limited to 10/100 Mbit/s operation. This patchset adds support for it. I've tested the patchset on a Rock Pi S, works fine. ==================== Signed-off-by: David S. Miller commit 8d1a81f21a9e0c5967bbec1918a777369dc07856 Author: Tobias Schramm Date: Fri May 14 13:38:13 2021 +0200 arm64: dts: rockchip: add gmac to rk3308 dts The RK3308 SoC has a gmac with only the RMII interface exposed. This commit adds it to the RK3308 dtsi. Signed-off-by: Tobias Schramm Signed-off-by: David S. Miller commit b4ac94565c142da9f050e2c2ffd85f7288d556d2 Author: Tobias Schramm Date: Fri May 14 13:38:12 2021 +0200 net: stmmac: dwmac-rk: add support for rk3308 gmac The Rockchip RK3308 SoC has a gmac with only the RMII interface signals exposed. This patch adds support for it. Signed-off-by: Tobias Schramm Signed-off-by: David S. Miller commit 2cc8c910f51594dde79764a52b2974ddc8f70509 Author: Tobias Schramm Date: Fri May 14 13:38:11 2021 +0200 dt-bindings: net: rockchip-dwmac: add rk3308 gmac compatible The Rockchip RK3308 has a gmac that is not fully compatible with any of the other Rockchip gmacs. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Signed-off-by: David S. Miller commit 2d1c5f29d27a338b6ca98f58caf191482105c418 Author: Pu Lehui Date: Fri May 14 16:24:05 2021 +0800 alx: fix missing unlock on error in alx_set_pauseparam() Add the missing unlock before return from function alx_set_pauseparam() in the error handling case. Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL") Signed-off-by: Pu Lehui Signed-off-by: David S. Miller commit 052d601725526efeb433956ef86627a5e34cf2e2 Merge: 0a14fd29ca0cc cb06726976015 Author: David S. Miller Date: Fri May 14 15:09:25 2021 -0700 Merge branch 'hns-coding-style' Guangbin Huang says: ==================== net: hns: clean up some code style issues This patchset clean up some code style issues. ==================== Signed-off-by: David S. Miller commit cb067269760155b569c03ff6a2dcfd09ad824b94 Author: Peng Li Date: Fri May 14 15:31:42 2021 +0800 net: hns: remove redundant return int void function Void function return statements are not generally useful, so remove the redundant return. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 5caab55a29792beade82a05e9e7089611f95bbbf Author: Peng Li Date: Fri May 14 15:31:41 2021 +0800 net: hns: space required before the open brace '{' Add the space required before the open brace '{'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 510fe8e70b0b659d8a7f3fda3fc61390e9cff7f7 Author: Peng Li Date: Fri May 14 15:31:40 2021 +0800 net: hns: fix some code style issue about space Spaces at the start of a line will cause checkpatch warning. This patch replaces the spaces by tab at the start of a line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 699e803e9a4d1c8676c77bfa7b085a1f73083e64 Author: Peng Li Date: Fri May 14 15:31:39 2021 +0800 net: hns: fix the comments style issue Networking block comments don't use an empty /* line, use /* Comment... This patch fix the comments style issue. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 0a14fd29ca0cc2f8a6242460b95e20d34930cd00 Merge: fc25f9f631aca e76e6886646b8 Author: David S. Miller Date: Fri May 14 15:07:35 2021 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: updates for -next This series adds some updates for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit e76e6886646b88b258f9deba92d49080f26028ae Author: Jiaran Zhang Date: Fri May 14 11:25:20 2021 +0800 net: hns3: refactor dump ncl config of debugfs Currently, the debugfs command for ncl config is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "ncl_config" for it, and query it by command "cat ncl_config", return the result to userspace, rather than record in dmesg. The display style is below: $cat ncl_config offset | data 0x0000 | 0x00000028 0x0004 | 0x00000400 0x0008 | 0x08040201 0x000c | 0x00000000 0x0010 | 0x00040004 0x0014 | 0x00040004 0x0018 | 0x00000000 0x001c | 0x00000000 0x0020 | 0x00040004 Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0b198b0d80ea091f2a917536a097adefb2eaa52f Author: Jiaran Zhang Date: Fri May 14 11:25:19 2021 +0800 net: hns3: refactor dump m7 info of debugfs Currently, the debugfs command for m7 info is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "imp_info" for it, and query it by command "cat imp_info", return the result to userspace, rather than record in dmesg. The display style is below: $cat imp_info offset | data 0x0000 | 0x00000000 0x00000000 0x0008 | 0x00000000 0x00000000 0x0010 | 0x00000000 0x00000001 0x0018 | 0x00000000 0x00000000 0x0020 | 0x00000000 0x00000000 0x0028 | 0x00000000 0x00000000 0x0030 | 0x00000000 0x00000000 Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1a7ff8280b16fe8a085e24aca9008724700d6878 Author: Jiaran Zhang Date: Fri May 14 11:25:18 2021 +0800 net: hns3: refactor dump reset info of debugfs Currently, the debugfs command for reset info is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "reset_info" for it, and query it by command "cat reset_info", return the result to userspace, rather than record in dmesg. The display style is below: $cat reset_info PF reset count: 0 FLR reset count: 0 GLOBAL reset count: 0 IMP reset count: 0 reset done count: 0 HW reset done count: 0 reset count: 0 reset fail count: 0 vector0 interrupt enable status: 0x1 reset interrupt source: 0x0 reset interrupt status: 0x0 RAS interrupt status:0x0 hardware reset status: 0x0 handshake status: 0x80 function reset status: 0x0 Change to the "hclge_show_rst_info" in the "hclge_reset_err_handle", when the reset fails, display reset info immediately. Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9149ca0f115acf44f8473c0a1e464e716c4ca83b Author: Jiaran Zhang Date: Fri May 14 11:25:17 2021 +0800 net: hns3: refactor dump intr of debugfs Currently, the debugfs command for intr is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "interrupt_info" for it, and query it by command "cat interrupt_info", return the result to userspace, rather than record in dmesg. The display style is below: $cat interrupt_info num_nic_msi: 65 num_roce_msi: 65 num_msi_used: 2 num_msi_left: 128 Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d658ff34dd7ff9ccf13c59a7c464b55ca122977d Author: Yufeng Mo Date: Fri May 14 11:25:16 2021 +0800 net: hns3: refactor dump loopback of debugfs Currently, the debugfs command for loopback is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "loopback" for it, and query it by command "cat loopback", return the result to userspace, rather than record in dmesg. The display style is below: $ cat loopback mac id: 0 app loopback: off serdes serial loopback: off serdes parallel loopback: off Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8ddfd9c46ef49ed75abc745c1f90532a2abb8f01 Author: Yufeng Mo Date: Fri May 14 11:25:15 2021 +0800 net: hns3: refactor dump mng tbl of debugfs Currently, the debugfs command for mng tbl is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "mng_tbl" for it, and query it by command "cat mng_tbl", return the result to userspace, rather than record in dmesg. The display style is below: $ cat mng_tbl entry mac_addr mask ether mask vlan mask i_map ... 00 00:00:00:00:00:00 0 88cc 0 0000 1 0f ... Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 Author: Huazhong Tan Date: Fri May 14 11:25:14 2021 +0800 net: hns3: refactor dump mac list of debugfs Currently, the debugfs command for mac list info is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create two files "uc" and "mc" under directory "mac_list" for it, and query mac list info by "cat mac_list/uc" and "mac_list/mc", return the result to userspace, rather than record in dmesg. The display style is below: $ cat mac_list/uc UC MAC_LIST: FUNC_ID MAC_ADDR STATE pf 00:18:2d:00:00:71 ACTIVE $ cat mac_list/mc MC MAC_LIST: FUNC_ID MAC_ADDR STATE pf 01:80:c2:00:00:21 ACTIVE Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 77e9184869c9fb00a482357ea8eef3bd7ae3d45a Author: Huazhong Tan Date: Fri May 14 11:25:13 2021 +0800 net: hns3: refactor dump bd info of debugfs Currently, the debugfs command for bd info is implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, add two debugfs directories "tx_bd_info" and "rx_bd_info", and create a file for each queue under these two directories, and query the bd info of specific queue by "cat tx_bd_info/tx_bd_queue*" or "cat rx_bd_info/rx_bd_queue*", return the result to userspace, rather than record in dmesg. The display style is below: $ cat rx_bd_info/rx_bd_queue0 Queue 0 rx bd info: BD_IDX L234_INFO PKT_LEN SIZE... 0 0x0 60 60... 1 0x0 1512 1512... $ cat tx_bd_info/tx_bd_queue0 Queue 0 tx bd info: BD_IDX ADDRESS VLAN_TAG SIZE... 0 0x0 0 0... 1 0x0 0 0... Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit c929bc2ac36efa9344e6c8b8f55f6b8eeebb4393 Author: Jiaran Zhang Date: Fri May 14 11:25:12 2021 +0800 net: hns3: refactor dev capability and dev spec of debugfs Currently, the debugfs command for dev capability and dev spec are implemented by "echo xxxx > cmd", and record the information in dmesg. It's unnecessary and heavy. To improve it, create a single file "dev_info" for them, and query them by command "cat dev_info", return the result to userspace, rather than record in dmesg. The display style is below: $cat dev_info dev capability: support FD: yes support GRO: yes support FEC: yes support UDP GSO: no support PTP: no support INT QL: no support HW TX csum: no support UDP tunnel csum: no support TX push: no support imp-controlled PHY: no support rxd advanced layout: no dev spec: MAC entry num: 0 MNG entry num: 0 MAX non tso bd num: 8 RSS ind tbl size: 512 RSS key size: 40 RSS size: 1 Allocated RSS size: 0 Task queue pairs numbers: 1 RX buffer length: 2048 Desc num per TX queue: 1024 Desc num per RX queue: 1024 Total number of enabled TCs: 1 MAX INT QL: 0 MAX INT GL: 8160 MAX TM RATE: 100000 MAX QSET number: 1024 Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5e69ea7ee2a69f68c4172afcb0cbe29e7162fb6e Author: Yufeng Mo Date: Fri May 14 11:25:11 2021 +0800 net: hns3: refactor the debugfs process Currently, each debugfs command needs to create a file to get the information. To better support more debugfs commands, the debugfs process is reconstructed, including the process of creating dentries and files, and obtaining information. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1ddc028ac84988b6b1c9ceb9d15acbf321735ca3 Author: Huazhong Tan Date: Fri May 14 11:25:10 2021 +0800 net: hns3: refactor out RX completion checksum Only when RXD advanced layout is enabled, in some cases (e.g. ip fragments), the checksum of entire packet will be calculated and filled in the least significant 16 bits of the unused addr field. So refactor out the handling of RX completion checksum: adjust the location of the checksum in RX descriptor, and use ptype table to identify whether this kind of checksum is calculated. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 796640778c26f3d99fde173bb7b1d726b5f0d816 Author: Huazhong Tan Date: Fri May 14 11:25:09 2021 +0800 net: hns3: support RXD advanced layout Currently, the driver gets packet type by parsing the L3_ID/L4_ID/OL3_ID/OL4_ID from RX descriptor, it's time-consuming. Now some new devices support RXD advanced layout, which combines previous OL3_ID/OL4_ID to 8bit ptype field, so the driver gets packet type by looking up only one table, and L3_ID/L4_ID become reserved fields. Considering compatibility, the firmware will report capability of RXD advanced layout, the driver will identify and enable it by default. This patch provides basic function: identify and enable the RXD advanced layout, and refactor out hns3_rx_checksum() by using ptype table to handle RX checksum if supported. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit fc25f9f631acad4f4d0089fc400f2943c989522c Author: Guenter Roeck Date: Thu May 13 16:04:18 2021 -0700 net: thunderx: Drop unnecessary NULL check after container_of The result of container_of() operations is never NULL unless the embedded element is the first element of the structure. This is not the case here. The NULL check is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller commit fa44821a4ddda0101f64908abc56dc25b905475d Author: Heiner Kallweit Date: Thu May 13 23:29:12 2021 +0200 sfc: don't use netif_info et al before net_device is registered Using netif_info() before the net_device is registered results in ugly messages like the following: sfc 0000:01:00.1 (unnamed net_device) (uninitialized): Solarflare NIC detected Therefore use pci_info() et al until net_device is registered. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8d55ba5df39a2eb213da63911c1a75001e0717fc Author: Wei Yongjun Date: Fri May 14 06:39:52 2021 +0000 percpu: make symbol 'pcpu_free_slot' static The sparse tool complains as follows: mm/percpu.c:138:5: warning: symbol 'pcpu_free_slot' was not declared. Should it be static? This symbol is not used outside of percpu.c, so marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Dennis Zhou commit 2b3aa53ebf46031944d0edeab878ab9ba6c415d2 Author: Linus Walleij Date: Wed May 12 00:53:29 2021 +0200 ARM: dts: ixp4xx: Add beeper to the NSLU2 This adds the beeper GPIO to the NSLU2 completing the board support. Signed-off-by: Linus Walleij commit 869cbeef18e5c4370157e733b947d44f37441ea9 Author: Ondrej Mosnacek Date: Wed May 12 16:32:10 2021 +0200 lsm_audit,selinux: pass IB device name by reference While trying to address a Coverity warning that the dev_name string might end up unterminated when strcpy'ing it in selinux_ib_endport_manage_subnet(), I realized that it is possible (and simpler) to just pass the dev_name pointer directly, rather than copying the string to a buffer. The ibendport variable goes out of scope at the end of the function anyway, so the lifetime of the dev_name pointer will never be shorter than that of ibendport, thus we can safely just pass the dev_name pointer and be done with it. Signed-off-by: Ondrej Mosnacek Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 527a9471878e619add51825640a76d9777218445 Author: Qiheng Lin Date: Fri May 14 16:28:12 2021 +0800 drm/vmwgfx: Fix return value check in vmw_setup_pci_resources() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. After that, the error code -ENOMEM should be returned. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210514082812.1697-1-linqiheng@huawei.com commit 2f70cbf79e3ffa65ab2faeec9ba7e6e587e6cad9 Author: Colin Ian King Date: Fri May 14 15:49:30 2021 +0100 drm/vmwgfx: Fix memory allocation check and a leak of object fifo The allocation of fifo is lacking an allocation failure check, so fix this by adding one. In the case where fifo->static_buffer fails to be allocated the error return path neglects to kfree the fifo object. Fix this by adding in the missing kfree. Kudos to Dan Carpenter for spotting the missing kzalloc failure check. Addresses-Coverity: ("Resource leak") Fixes: 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3") Signed-off-by: Colin Ian King Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210514144930.89813-1-colin.king@canonical.com commit 91f0fb6903ed30370135381f10c02a10c7872cdc Author: Chao Yu Date: Wed May 12 17:52:57 2021 +0800 f2fs: compress: clean up parameter of __f2fs_cluster_blocks() Previously, in order to reuse __f2fs_cluster_blocks(), f2fs_is_compressed_cluster() assigned a compress_ctx type variable, which is used to pass few parameters (cc.inode, cc.cluster_size, cc.cluster_idx), it's wasteful to allocate such large space in stack. Let's clean up parameters of __f2fs_cluster_blocks() to avoid that. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fbec3b963ae1d5610602c03336597cf0396cda62 Author: Chao Yu Date: Wed May 12 17:52:56 2021 +0800 f2fs: compress: remove unneeded f2fs_put_dnode() If we don't initialize dn.inode_page for f2fs_get_block(), f2fs_get_block() will call f2fs_put_dnode() itself, so let's remove unneeded f2fs_put_dnode() in f2fs_vm_page_mkwrite(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 89e53ff1651a61cf2abef9356e2f60d0086215be Author: Chao Yu Date: Tue May 11 18:17:34 2021 +0800 f2fs: atgc: fix to set default age threshold Default age threshold value is missed to set, fix it. Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection") Reported-by: Sahitya Tummala Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d927ccfccb009ede24448d69c08b12e7c8a6979b Author: Shin'ichiro Kawasaki Date: Mon May 10 20:24:44 2021 +0900 f2fs: Prevent swap file in LFS mode The kernel writes to swap files on f2fs directly without the assistance of the filesystem. This direct write by kernel can be non-sequential even when the f2fs is in LFS mode. Such non-sequential write conflicts with the LFS semantics. Especially when f2fs is set up on zoned block devices, the non-sequential write causes unaligned write command errors. To avoid the non-sequential writes to swap files, prevent swap file activation when the filesystem is in LFS mode. Fixes: 4969c06a0d83 ("f2fs: support swap file w/ DIO") Signed-off-by: Shin'ichiro Kawasaki Cc: stable@vger.kernel.org # v5.10+ Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cad83c968c2ebe97905f900326988ed37146c347 Author: Chao Yu Date: Fri May 7 18:10:38 2021 +0800 f2fs: fix to avoid racing on fsync_entry_slab by multi filesystem instances As syzbot reported, there is an use-after-free issue during f2fs recovery: Use-after-free write at 0xffff88823bc16040 (in kfence-#10): kmem_cache_destroy+0x1f/0x120 mm/slab_common.c:486 f2fs_recover_fsync_data+0x75b0/0x8380 fs/f2fs/recovery.c:869 f2fs_fill_super+0x9393/0xa420 fs/f2fs/super.c:3945 mount_bdev+0x26c/0x3a0 fs/super.c:1367 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x86/0x270 fs/super.c:1497 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x196f/0x2be0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3433 do_syscall_64+0x3f/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae The root cause is multi f2fs filesystem instances can race on accessing global fsync_entry_slab pointer, result in use-after-free issue of slab cache, fixes to init/destroy this slab cache only once during module init/destroy procedure to avoid this issue. Reported-by: syzbot+9d90dad32dd9727ed084@syzkaller.appspotmail.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b763f3bedc2da2edf81bba550430847f561eae0e Author: Chao Yu Date: Wed Apr 28 17:20:31 2021 +0800 f2fs: restructure f2fs page.private layout Restruct f2fs page private layout for below reasons: There are some cases that f2fs wants to set a flag in a page to indicate a specified status of page: a) page is in transaction list for atomic write b) page contains dummy data for aligned write c) page is migrating for GC d) page contains inline data for inline inode flush e) page belongs to merkle tree, and is verified for fsverity f) page is dirty and has filesystem/inode reference count for writeback g) page is temporary and has decompress io context reference for compression There are existed places in page structure we can use to store f2fs private status/data: - page.flags: PG_checked, PG_private - page.private However it was a mess when we using them, which may cause potential confliction: page.private PG_private PG_checked page._refcount (+1 at most) a) -1 set +1 b) -2 set c), d), e) set f) 0 set +1 g) pointer set The other problem is page.flags has no free slot, if we can avoid set zero to page.private and set PG_private flag, then we use non-zero value to indicate PG_private status, so that we may have chance to reclaim PG_private slot for other usage. [1] The other concern is f2fs has bad scalability in aspect of indicating more page status. So in this patch, let's restructure f2fs' page.private as below to solve above issues: Layout A: lowest bit should be 1 | bit0 = 1 | bit1 | bit2 | ... | bit MAX | private data .... | bit 0 PAGE_PRIVATE_NOT_POINTER bit 1 PAGE_PRIVATE_ATOMIC_WRITE bit 2 PAGE_PRIVATE_DUMMY_WRITE bit 3 PAGE_PRIVATE_ONGOING_MIGRATION bit 4 PAGE_PRIVATE_INLINE_INODE bit 5 PAGE_PRIVATE_REF_RESOURCE bit 6- f2fs private data Layout B: lowest bit should be 0 page.private is a wrapped pointer. After the change: page.private PG_private PG_checked page._refcount (+1 at most) a) 11 set +1 b) 101 set +1 c) 1001 set +1 d) 10001 set +1 e) set f) 100001 set +1 g) pointer set +1 [1] https://lore.kernel.org/linux-f2fs-devel/20210422154705.GO3596236@casper.infradead.org/T/#u Cc: Matthew Wilcox Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ee68d27181f060fab29e60d1d31aab6a42703dd4 Author: Chao Yu Date: Tue Apr 27 11:07:30 2021 +0800 f2fs: add cp_error check in f2fs_write_compressed_pages This patch adds cp_error check in f2fs_write_compressed_pages() like we did in f2fs_write_single_data_page() Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5db479f049c4fd6cb2d61ade28c73f51487c2f45 Author: Chao Yu Date: Tue Apr 27 11:07:30 2021 +0800 f2fs: compress: rename __cluster_may_compress This patch renames __cluster_may_compress() to cluster_has_invalid_data() for better readability. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bf5fd8cae3c8f0d1e6f71a076e0ce2bd17645d0b Author: Andrea Parri (Microsoft) Date: Mon May 10 23:08:41 2021 +0200 scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs Use blk_mq_unique_tag() to generate requestIDs for StorVSC, avoiding all issues with allocating enough entries in the VMbus requestor. Suggested-by: Michael Kelley Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Acked-by: Martin K. Petersen Link: https://lore.kernel.org/r/20210510210841.370472-1-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 30515832e987597eae354f6ffcdb3374bdfde16d Author: Matteo Croce Date: Fri May 14 03:53:48 2021 +0200 net: bridge: fix build when IPv6 is disabled The br_ip6_multicast_add_router() prototype is defined only when CONFIG_IPV6 is enabled, but the function is always referenced, so there is this build error with CONFIG_IPV6 not defined: net/bridge/br_multicast.c: In function ‘__br_multicast_enable_port’: net/bridge/br_multicast.c:1743:3: error: implicit declaration of function ‘br_ip6_multicast_add_router’; did you mean ‘br_ip4_multicast_add_router’? [-Werror=implicit-function-declaration] 1743 | br_ip6_multicast_add_router(br, port); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | br_ip4_multicast_add_router net/bridge/br_multicast.c: At top level: net/bridge/br_multicast.c:2804:13: warning: conflicting types for ‘br_ip6_multicast_add_router’ 2804 | static void br_ip6_multicast_add_router(struct net_bridge *br, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ net/bridge/br_multicast.c:2804:13: error: static declaration of ‘br_ip6_multicast_add_router’ follows non-static declaration net/bridge/br_multicast.c:1743:3: note: previous implicit declaration of ‘br_ip6_multicast_add_router’ was here 1743 | br_ip6_multicast_add_router(br, port); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this build error by moving the definition out of the #ifdef. Fixes: a3c02e769efe ("net: bridge: mcast: split multicast router state for IPv4 and IPv6") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit adae1e931acd8b430d31141a283ea06d4b705417 Author: Andres Beltran Date: Thu Apr 8 18:14:39 2021 +0200 Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer Pointers to ring-buffer packets sent by Hyper-V are used within the guest VM. Hyper-V can send packets with erroneous values or modify packet fields after they are processed by the guest. To defend against these scenarios, return a copy of the incoming VMBus packet after validating its length and offset fields in hv_pkt_iter_first(). In this way, the packet can no longer be modified by the host. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210408161439.341988-1-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 03b30cc38dd3c3521dafb1cb2ac4ecd8470bbf0a Author: Jiapeng Chong Date: Thu Apr 29 18:21:21 2021 +0800 hv_balloon: Remove redundant assignment to region_start Variable region_start is set to pg_start but this value is never read as it is overwritten later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/hv/hv_balloon.c:1013:3: warning: Value stored to 'region_start' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1619691681-86256-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Wei Liu commit bbc6f2cca74e548914a7705f5c39549c28ab8815 Author: Nikolay Aleksandrov Date: Fri May 14 10:32:33 2021 +0300 net: bridge: fix br_multicast_is_router stub when igmp is disabled br_multicast_is_router takes two arguments when bridge IGMP is enabled and just one when it's disabled, fix the stub to take two as well. Fixes: 1a3065a26807 ("net: bridge: mcast: prepare is-router function for mcast router split") Signed-off-by: Nikolay Aleksandrov Acked-by: Linus Lüssing Signed-off-by: David S. Miller commit d29d41e28eea65493395dda0b6d1fff23ca374f4 Author: Jaska Uimonen Date: Fri May 7 10:02:46 2021 +0300 ASoC: topology: Add support for multiple kcontrol types to a widget Current dapm widget has a single variable to describe its kcontrol's type. As there can be many kcontrols in one widget it is inherently presumed that the types are the same. Lately there has been use cases where different types of kcontrols would be needed for a single widget. Thus add pointer to dapm widget to hold an array for different kcontrol types and modify the kcontrol creation to operate in a loop based on individual kcontrol type. Change control creation and deletion to use individual kcontrol types in SOF driver. This is done in the same patch for not breaking bisect. SOF driver is also currently the only one using the dapm widget kcontrol_type. Signed-off-by: Jaska Uimonen Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210507070246.404446-1-jaska.uimonen@linux.intel.com Signed-off-by: Mark Brown commit 1275e41753683f992177d74f450437f1a3be33c0 Author: Nicolas Boichat Date: Wed Apr 21 13:28:55 2021 +0800 drm/panfrost: Add mt8183-mali compatible string Add support for MT8183's G72 Bifrost. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210421132841.v13.4.I5f6b04431828ec9c3e41e65f3337cec6a127480d@changeid commit 09da3191827f2fd326205fb58881838e6ea36fb7 Author: Nicolas Boichat Date: Wed Apr 21 13:28:54 2021 +0800 drm/panfrost: devfreq: Disable devfreq when num_supplies > 1 GPUs with more than a single regulator (e.g. G72 on MT8183) will require platform-specific handling for devfreq, for 2 reasons: 1. The opp core (drivers/opp/core.c:_generic_set_opp_regulator) does not support multiple regulators, so we'll need custom handlers. 2. Generally, platforms with 2 regulators have platform-specific constraints on how the voltages should be set (e.g. minimum/maximum voltage difference between them), so we should not just create generic handlers that simply change the voltages without taking care of those constraints. Disable devfreq for now on those GPUs. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210421132841.v13.3.I3af068abe30c9c85cabc4486385c52e56527a509@changeid commit a7a596cd31151b08ad0273af3665dac8c0b93842 Author: Nicolas Boichat Date: Wed Apr 21 13:28:52 2021 +0800 dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183 Define a compatible string for the Mali Bifrost GPU found in Mediatek's MT8183 SoCs. Signed-off-by: Nicolas Boichat Reviewed-by: Rob Herring Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210421132841.v13.1.Ie74d3355761aab202d4825ac6f66d990bba0130e@changeid commit 19486fe587b8ed17daf87a6419b51e3a65ce565c Author: Johan Jonker Date: Wed May 12 14:23:46 2021 +0200 arm64: dts: rename grf-gpio nodename in rk3328.dtsi A test with the command below gives this error: /arch/arm64/boot/dts/rockchip/rk3328-a1.dt.yaml: syscon@ff100000: grf-gpio: {'compatible': ['rockchip,rk3328-grf-gpio'], 'gpio-controller': True, '#gpio-cells': [[2]], 'phandle': [[68]]} is not of type 'array' Due to the regex "(? Link: https://lore.kernel.org/r/20210512122346.9463-5-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 28188cc461f6cf8b7d28de4f6df52014cc1d5e39 Author: Andi Kleen Date: Thu May 13 09:39:04 2021 -0700 x86/cpu: Fix core name for Sapphire Rapids Sapphire Rapids uses Golden Cove, not Willow Cove. Fixes: 53375a5a218e ("x86/cpu: Resort and comment Intel models") Signed-off-by: Andi Kleen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210513163904.3083274-1-ak@linux.intel.com commit 87cf20ccecb3e3c00605980ef0dba61398499bf6 Author: Johan Jonker Date: Mon May 10 21:20:54 2021 +0200 ARM: dts: rockchip: rename vcc_stdby node name for rk3066a-rayeager.dts A test with the command below gives this error: /arch/arm/boot/dts/rk3066a-rayeager.dt.yaml: /: '5v-stdby-regulator' does not match any of the regexes: '.*-names$', '.*-supply$', '^#.*-cells$', '^#[a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}$', '^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+(,[0-9a-fA-F]+)*$', '^__.*__$', 'pinctrl-[0-9]+' A node name shouldn't start with a number, so change it to 'stdby-regulator'. make ARCH=arm dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema /schemas/dt-core.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210510192054.8876-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit dc71c5ca34f408030b979d894c0459ef059445a1 Author: Johan Jonker Date: Mon May 10 19:29:11 2021 +0200 ARM: dts: rockchip: Remove more clock-names from PWM nodes A test with the command below gives this error: /arch/arm/boot/dts/rk3228-evb.dt.yaml: pwm@110b0020: clock-names: ['pwm'] is too short Devices with only one PWM clock use it to both to derive the functional clock for the device and as the bus clock. The driver does not need "clock-names" to get a handle, so remove them all. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210510172911.6763-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit ea030ca688193462b8d612c1628c37129aa30072 Author: Lucas Tanure Date: Wed May 12 14:52:22 2021 +0100 regmap-i2c: Set regmap max raw r/w from quirks Set regmap raw read/write from i2c quirks max read/write so regmap_raw_read/write can split the access into chunks Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210512135222.223203-1-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit a75e5cdf4dd1307bb1541edbb0c008f40896644c Author: Zou Wei Date: Wed May 12 11:54:07 2021 +0800 ASoC: intel/boards: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620791647-16024-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit 490dbd2380c782653d9246d6ad80da2595e98b30 Author: Sebastian Fricke Date: Wed Apr 21 04:17:41 2021 +0000 phy: phy-core-mipi-dphy.c: Correct reference version The rest of the code refers to version 1.2 of the MIPI D-PHY specification. But this comment refers to 2.1, while a sub comment of the function refers to 1.2 again. Replace 2.1 with 1.2. Signed-off-by: Sebastian Fricke Link: https://lore.kernel.org/r/20210421041740.8451-1-sebastian.fricke@posteo.net Signed-off-by: Vinod Koul commit 8a917813cc74c3e8fa41f16aff90c5931bb49152 Author: Rob Herring Date: Wed Apr 14 08:55:25 2021 -0500 phy: Allow a NULL phy name for devm_phy_get() For a single PHY, there's no reason to have a phy-names entry in DT. The DT specific get functions allow for this already, but devm_phy_get() WARNs in this case. Other subsystems also don't warn in their get functions. Let's drop the WARN for DT case in devm_phy_get(). Cc: Kishon Vijay Abraham I Cc: Vinod Koul Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210414135525.3535787-1-robh@kernel.org Signed-off-by: Vinod Koul commit 5a65adfa2ad1542f856fc7de3999d51f3a35d2e2 Author: Uwe Kleine-König Date: Mon May 10 11:09:32 2021 +0200 arm64: dts: rockchip: Add support for PCIe on helios64 This is enough to make the SATA controller visible: # lspci 00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port 01:00.0 SATA controller: JMicron Technology Corp. JMB58x AHCI SATA controller Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210510090932.970447-1-uwe@kleine-koenig.org Signed-off-by: Heiko Stuebner commit 271b66414df0b172c936b3cfd1894b7939f84165 Author: Uwe Kleine-König Date: Mon May 10 11:06:07 2021 +0200 arm64: dts: rockchip: Add support for two PWM fans on helios64 On the helios64 board the two connectors P6 and P7 are supposed to power two fans. Add the corresponding pwm-fan devices. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210510090607.970145-1-uwe@kleine-koenig.org Signed-off-by: Heiko Stuebner commit b82f8e2992534aab0fa762a37376be30df263701 Author: Johan Jonker Date: Mon May 10 23:58:40 2021 +0200 arm64: dts: rockchip: fix regulator-gpio states array A test with the command below gives this error: /arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dt.yaml: sdmmcio-regulator: states:0: [1800000, 1, 3300000, 0] is too long dtbs_check expects regulator-gpio states in a format of 2 per item, so fix them all. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ regulator/gpio-regulator.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210510215840.16270-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit e3c2f1870af43fc95f6fe141537f5142c5fe4717 Author: Stephen Rothwell Date: Wed Mar 17 14:05:42 2021 +1100 drm/i915: Merge fix for "drm: Switch to %p4cc format modifier" Signed-off-by: Stephen Rothwell Signed-off-by: Thomas Zimmermann Fixes: 92f1d09ca4ed ("drm: Switch to %p4cc format modifier") Cc: Sakari Ailus Cc: Petr Mladek Cc: Andy Shevchenko Cc: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/dri-devel/20210514115307.4364aff9@canb.auug.org.au/T/#macc61d4e0b17ca0da2b26aae8fbbcbf47324da13 commit 76e78f3df8f5d21b1a85f770fa92a1fd211e429b Author: Colin Ian King Date: Thu May 13 23:08:32 2021 +0100 staging: unisys: visorinput: remove redundant assignment of variable led The variable led is being assigned a value that is never used before a return statement. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210513220832.137336-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 09be0d0db530412eae63b8e11cf03d2b93d2426d Author: Fabio M. De Francesco Date: Fri May 14 11:04:01 2021 +0200 staging: rtl8723bs: hal: Remove set but unused variable Removed set but unused variable. Issue reported by kernel test robot building with GCC W=1 for PowerPC target architecture. Reported-by: kernel test robot Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210514090401.16123-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 30e06867478fe2032723cbd52768a84bbba63a8c Author: Fabio M. De Francesco Date: Fri May 14 11:04:00 2021 +0200 staging: rtl8723bs: hal: Remove three set but unused variables Removed three set but unused variables. Issue detected by GCC while building for x86_64. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210514090401.16123-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 519c49678a1311d7ec748660ef1f9d9753970cf1 Author: Sergio Paracuellos Date: Fri May 14 13:28:20 2021 +0200 staging: mt7621-dts: use clock in pci phy nodes MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' Hence we can use the clock in pcie phy nodes to be able to get it from there in driver code. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210514112820.32499-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit fe9f1d8779cb47046e76ea209b6eece7ec56d1b4 Author: Sabrina Dubroca Date: Sun Apr 25 21:47:12 2021 +0200 xfrm: add state hashtable keyed by seq When creating new states with seq set in xfrm_usersa_info, we walk through all the states already installed in that netns to find a matching ACQUIRE state (__xfrm_find_acq_byseq, called from xfrm_state_add). This causes severe slowdowns on systems with a large number of states. This patch introduces a hashtable using x->km.seq as key, so that the corresponding state can be found in a reasonable time. Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit 5c3e241f5246445da29bd03783ca61a18face968 Author: Zhen Lei Date: Wed Apr 28 14:32:03 2021 +0800 lib: devres: Add error information printing for __devm_ioremap_resource() Ensure that all error handling branches print error information. In this way, when this function fails, the upper-layer functions can directly return an error code without missing debugging information. Otherwise, the error message will be printed redundantly or missing. Reviewed-by: Vladimir Oltean Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210428063203.691-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3ce3e45cc333da707d4d6eb433574b990bcc26f5 Author: Tong Zhang Date: Thu May 13 00:07:33 2021 -0400 misc: alcor_pci: fix null-ptr-deref when there is no PCI bridge There is an issue with the ASPM(optional) capability checking function. A device might be attached to root complex directly, in this case, bus->self(bridge) will be NULL, thus priv->parent_pdev is NULL. Since alcor_pci_init_check_aspm(priv->parent_pdev) checks the PCI link's ASPM capability and populate parent_cap_off, which will be used later by alcor_pci_aspm_ctrl() to dynamically turn on/off device, what we can do here is to avoid checking the capability if we are on the root complex. This will make pdev_cap_off 0 and alcor_pci_aspm_ctrl() will simply return when bring called, effectively disable ASPM for the device. [ 1.246492] BUG: kernel NULL pointer dereference, address: 00000000000000c0 [ 1.248731] RIP: 0010:pci_read_config_byte+0x5/0x40 [ 1.253998] Call Trace: [ 1.254131] ? alcor_pci_find_cap_offset.isra.0+0x3a/0x100 [alcor_pci] [ 1.254476] alcor_pci_probe+0x169/0x2d5 [alcor_pci] Co-developed-by: Greg Kroah-Hartman Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210513040732.1310159-1-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7272b591c4cb9327c43443f67b8fbae7657dd9ae Author: Lv Yunlong Date: Mon Apr 26 10:06:20 2021 -0700 misc/libmasm/module: Fix two use after free in ibmasm_init_one In ibmasm_init_one, it calls ibmasm_init_remote_input_dev(). Inside ibmasm_init_remote_input_dev, mouse_dev and keybd_dev are allocated by input_allocate_device(), and assigned to sp->remote.mouse_dev and sp->remote.keybd_dev respectively. In the err_free_devices error branch of ibmasm_init_one, mouse_dev and keybd_dev are freed by input_free_device(), and return error. Then the execution runs into error_send_message error branch of ibmasm_init_one, where ibmasm_free_remote_input_dev(sp) is called to unregister the freed sp->remote.mouse_dev and sp->remote.keybd_dev. My patch add a "error_init_remote" label to handle the error of ibmasm_init_remote_input_dev(), to avoid the uaf bugs. Signed-off-by: Lv Yunlong Link: https://lore.kernel.org/r/20210426170620.10546-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Greg Kroah-Hartman commit 1553573c588e5435b453bf046a2dc9752f1a5d76 Author: Uwe Kleine-König Date: Wed May 5 22:14:49 2021 +0200 sparc/vio: make remove callback return void The driver core ignores the return value of struct bus_type::remove() because there is only little that can be done. To simplify the quest to make this function return void, let struct vio_driver::remove() return void, too. All users already unconditionally return 0, this commit makes it obvious that returning an error code is a bad idea and should prevent that future driver authors consider returning an error code. Note there are two nominally different implementations for a vio bus: one in arch/sparc/kernel/vio.c and the other in arch/powerpc/platforms/pseries/vio.c. This patch only addresses the former. Acked-by: David S. Miller Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210505201449.195627-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit a56dfb6a79ee744d2b4ebdc6be56d7201c6bd22c Author: Emmanuel Gil Peyrot Date: Tue May 11 23:07:26 2021 +0200 dt-bindings: eeprom-93xx46: Add support for 93C46, 93C56 and 93C66 These devices differ by the size of their storage, which is why they have different compatible strings. Acked-by: Rob Herring Signed-off-by: Emmanuel Gil Peyrot Link: https://lore.kernel.org/r/20210511210727.24895-4-linkmauve@linkmauve.fr Signed-off-by: Greg Kroah-Hartman commit 14374fbb3f06ddaba186d608a58c07f3d48d08df Author: Emmanuel Gil Peyrot Date: Tue May 11 23:07:25 2021 +0200 misc: eeprom_93xx46: Add new 93c56 and 93c66 compatible strings These two devices have respectively 2048 and 4096 bits of storage, compared to 1024 for the 93c46. Reviewed-by: Jonathan Neuschäfer Signed-off-by: Emmanuel Gil Peyrot Link: https://lore.kernel.org/r/20210511210727.24895-3-linkmauve@linkmauve.fr Signed-off-by: Greg Kroah-Hartman commit 4a5ff99bbb8fcd4642995ef39bccc7f25e1f90d3 Author: Emmanuel Gil Peyrot Date: Tue May 11 23:07:24 2021 +0200 misc: eeprom_93xx46: Remove hardcoded bit lengths This avoids using magic numbers based on the length of an address or a command, while we only want to differentiate between 8-bit and 16-bit. The driver was previously wrapping around the offset in the write operation, this now returns -EINVAL instead (but should never happen in the first place). If two pointer indirections are too many, we could move the flags to the main struct instead, but I doubt it’s going to make any sensible difference on any hardware. Reviewed-by: Jonathan Neuschäfer Signed-off-by: Emmanuel Gil Peyrot Link: https://lore.kernel.org/r/20210511210727.24895-2-linkmauve@linkmauve.fr Signed-off-by: Greg Kroah-Hartman commit 335a2a1fcefc948927e8c15636d9dc5d983b8f50 Author: Yang Li Date: Sun Apr 25 18:14:32 2021 +0800 esp: drop unneeded assignment in esp4_gro_receive() Making '!=' operation with 0 directly after calling the function xfrm_parse_spi() is more efficient, assignment to err is redundant. Eliminate the following clang_analyzer warning: net/ipv4/esp4_offload.c:41:7: warning: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err' No functional change, only more efficient. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Steffen Klassert commit 9ac78c8a0c938fb31e2336fc5266776c3833a7dc Author: Andy Shevchenko Date: Fri Apr 9 19:41:40 2021 +0300 video: ssd1307fb: Drop OF dependency After the commit 72915994e028 ("video: ssd1307fb: Make use of device properties") driver does not depend on OF, drop unneeded dependency. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210409164140.17337-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit da9db711733067b45ffbcd582387ad86369e2c62 Author: Christophe JAILLET Date: Wed May 5 21:38:49 2021 +0200 cxl: Fix an error message 'rc' is known to be 0 here. Initialize 'rc' with the expected error code before using it. While at it, avoid the affectation of 'rc' in a 'if' to make things more obvious and linux style. Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards for userspace access") Acked-by: Andrew Donnellan Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/fa2b2c9c72335ab4c3d5e6a33415e7f020b1d51b.1620243401.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 520264db3bf9571ef8cca96e30ffcf6fb31999b3 Author: Selvam Sathappan Periakaruppan Date: Wed May 5 12:18:31 2021 +0300 phy: qcom-qmp: add QMP V2 PCIe PHY support for ipq60xx Based on code from downstream Codeaurora tree. The ipq60xx has one gen3 PCIe port. Signed-off-by: Selvam Sathappan Periakaruppan Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/e24f2bedb8a7346018b58136bcb0a4004d8677a0.1620203062.git.baruch@tkos.co.il Signed-off-by: Vinod Koul commit 9f7368ff121042ba7032c754f108cf08bdc11a43 Author: Baruch Siach Date: Wed May 5 12:18:34 2021 +0300 dt-bindings: pci: qcom: Document PCIe bindings for IPQ6018 SoC Document qcom,pcie-ipq6018. This is similar to the ipq8074 with a few different clock sources, and one additional reset. Reviewed-by: Rob Herring Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/fd732635f4ad64263e361ce98af2944bfbd513ef.1620203062.git.baruch@tkos.co.il Signed-off-by: Vinod Koul commit 46eba71a1d1537cc3f7bb5652cc72509504b1b4c Author: Baruch Siach Date: Wed May 5 12:18:33 2021 +0300 dt-bindings: phy: qcom,qmp: Add IPQ60xx PCIe PHY bindings Add ipq6018 qmp phy device for the single PCIe serdes lane on IPQ60xx SoCs. Reviewed-by: Rob Herring Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/be83d8580942ab9d141dffff4e4f33f34a4c9ed9.1620203062.git.baruch@tkos.co.il Signed-off-by: Vinod Koul commit e4e050167fd0faf104933b13aff9a8bb541c5f4a Author: Firas Ashkar Date: Tue Apr 27 16:10:46 2021 -0400 uio: uio_pci_generic: add memory resource mappings import memory resources from underlying pci device, thus allowing userspace applications to memory map those resources. without this change, current implementation, does not populate the memory maps and are not shown under the corresponding sysfs uio entry: root@apalis-imx8:~# echo "ad00 0122" > \ /sys/bus/pci/drivers/uio_pci_generic/new_id [ 55.736433] uio_pci_generic 0000:01:00.0: enabling device (0000 -> 0002) root@apalis-imx8:~# ls -lsrt /sys/class/uio/uio0/ 0 -rw-r--r-- 1 root root 4096 Apr 27 18:52 uevent 0 -r--r--r-- 1 root root 4096 Apr 27 18:52 version 0 -r--r--r-- 1 root root 4096 Apr 27 18:52 suppliers 0 lrwxrwxrwx 1 root root 0 Apr 27 18:52 subsystem -> ../../../../../../../../../class/uio 0 drwxr-xr-x 2 root root 0 Apr 27 18:52 power 0 -r--r--r-- 1 root root 4096 Apr 27 18:52 name 0 -r--r--r-- 1 root root 4096 Apr 27 18:52 event 0 lrwxrwxrwx 1 root root 0 Apr 27 18:52 device -> ../../../0000:01:00.0 0 -r--r--r-- 1 root root 4096 Apr 27 18:52 dev 0 -r--r--r-- 1 root root 4096 Apr 27 18:52 consumers root@apalis-imx8:~# with the proposed changed, have following instead: root@apalis-imx8:~# ls -lsrt /sys/class/uio/uio0/ 0 -rw-r--r-- 1 root root 4096 Apr 27 19:06 uevent 0 -r--r--r-- 1 root root 4096 Apr 27 19:06 version 0 -r--r--r-- 1 root root 4096 Apr 27 19:06 suppliers 0 lrwxrwxrwx 1 root root 0 Apr 27 19:06 subsystem -> ../../../../../../../../../class/uio 0 drwxr-xr-x 2 root root 0 Apr 27 19:06 power 0 -r--r--r-- 1 root root 4096 Apr 27 19:06 name 0 drwxr-xr-x 4 root root 0 Apr 27 19:06 maps 0 -r--r--r-- 1 root root 4096 Apr 27 19:06 event 0 lrwxrwxrwx 1 root root 0 Apr 27 19:06 device -> ../../../0000:01:00.0 0 -r--r--r-- 1 root root 4096 Apr 27 19:06 dev 0 -r--r--r-- 1 root root 4096 Apr 27 19:06 consumers root@apalis-imx8:~# root@apalis-imx8:~# ls -lsrt /sys/class/uio/uio0/maps/ 0 drwxr-xr-x 2 root root 0 Apr 27 19:07 map1 0 drwxr-xr-x 2 root root 0 Apr 27 19:07 map0 root@apalis-imx8:~# root@apalis-imx8:~# cat /sys/class/uio/uio0/maps/map1/addr 0x0000000062000000 root@apalis-imx8:~# root@apalis-imx8:~# cat /sys/class/uio/uio0/maps/map1/size 0x0000000000200000 root@apalis-imx8:~# tested on AltaData ARINC 429 MiniPCIE module on imx8qm-apalis-ixora-v1.2 Signed-off-by: Firas Ashkar Link: https://lore.kernel.org/r/20210427201046.4005820-1-firas.ashkar@savoirfairelinux.com Signed-off-by: Greg Kroah-Hartman commit 20be064ec864086bca7a4eb62c772a397b44afb7 Author: Christophe JAILLET Date: Fri May 7 19:02:48 2021 +0200 nvmem: sprd: Fix an error message 'ret' is known to be 0 here. The expected error status is stored in 'status', so use it instead. Also change %d in %u, because status is an u32, not a int. Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support") Acked-by: Chunyan Zhang Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/5bc44aace2fe7e1c91d8b35c8fe31e7134ceab2c.1620406852.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit dccdb2fcd239d5fe281e7dd371a75e578f535a5b Author: Christophe JAILLET Date: Sun May 9 09:53:21 2021 +0200 uio: uio_aec: Use pci_iounmap instead of iounmap 'pci_iomap()' is used in the probe and 'pci_iounmap()' in the error handling path of the probe. So keep things consistent and use 'pci_iounmap()' also in the remove function. Fixes: 1bafeb378e91 ("uio: add the uio_aec driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f6b2a09a45658e8ef552aa34f0b8615dc1c35838.1620546705.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit a6daf4bb5fcb893f7aa2a97e043ee11816743f81 Author: Yang Yingliang Date: Wed May 12 15:22:33 2021 +0800 driver core: attribute_container: fix W=1 warnings Fix the following make W=1 kernel build warnings: drivers/base/attribute_container.c:304: warning: Function parameter or member 'fn' not described in 'attribute_container_device_trigger_safe' drivers/base/attribute_container.c:304: warning: Function parameter or member 'undo' not described in 'attribute_container_device_trigger_safe' drivers/base/attribute_container.c:357: warning: Function parameter or member 'fn' not described in 'attribute_container_device_trigger' Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210512072233.3817056-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8c60a14104e8e85f08b855e62ee8fe6947da2870 Author: Julian Wiedmann Date: Wed May 12 16:10:54 2021 +0200 driver core: replace open-coded device_lock_assert() Using the right wrapper makes it easier to associate this assert statement with the device_[un]lock() helpers. Signed-off-by: Julian Wiedmann Link: https://lore.kernel.org/r/20210512141054.2180373-1-jwi@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit d616f56d34e2a30a4c9d6574c70b15a6082c0edc Author: Wolfram Sang Date: Tue May 4 15:13:49 2021 +0200 debugfs: only accept read attributes for blobs Blobs can only be read. So, keep only 'read' file attributes because the others will not work and only confuse users. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210504131350.46586-1-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit b01360384009ab066940b45f34880991ea7ccbfb Author: Zhen Lei Date: Sat May 8 15:00:49 2021 +0800 crypto: ux500 - Fix error return code in hash_hw_final() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 8a63b1994c50 ("crypto: ux500 - Add driver for HASH hardware") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Linus Walleij Signed-off-by: Herbert Xu commit 06676aa1f455c74e3ad1624cea3acb9ed2ef71ae Author: Bixuan Cui Date: Sat May 8 11:14:55 2021 +0800 crypto: nx - add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Herbert Xu commit eb9e492f5c06fe197550e68973f88cba6e14274a Author: Yang Li Date: Fri May 7 17:58:07 2021 +0800 crypto: cavium/nitrox - Fix kernel-doc Fix function name in nitrox_reqmgr.c kernel-doc comment to remove a warning. drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:382: warning: expecting prototype for nitrox_se_request(). Prototype was for nitrox_process_se_request() instead Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit 3c995c4c7575b7b248d16e765fe05c01795fcd14 Author: Yang Li Date: Fri May 7 17:56:57 2021 +0800 crypto: cavium/nitrox - Remove redundant initialization of 'sg' Pointer 'sg' is being initialized however this value is never read as 'sg' is assigned a same value in for_each_sg(). Remove the redundant assignment. Cleans up clang warning: drivers/crypto/cavium/nitrox/nitrox_reqmgr.c:161:22: warning: Value stored to 'sg' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit 653fdbbf2d2006322b73dfa50add020625947a60 Author: Corentin Labbe Date: Wed May 5 20:26:18 2021 +0000 MAINTAINERS: add myself as maintainer of ixp4xx_crypto No maintainer exists for ixp4xx_crypto, since I have access to a board with it, I propose to maintain it. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 9ca04a51a7e0b08b0e402ddc65acba00678a91d7 Author: Corentin Labbe Date: Wed May 5 20:26:17 2021 +0000 MAINTAINERS: add ixp4xx_crypto to the right arch list drivers/crypto/ixp4xx_crypto.c is missing in the IXP4XX arch file list. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit c5e070311fab7aa8398f67b97d2a452d9eb1a112 Author: Corentin Labbe Date: Wed May 5 20:26:16 2021 +0000 crypto: ixp4xx - Correct functions alignment This patch fixes all alignment issues reported by checkpatch. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit ffb017e9ac66d3e4f368f556d13da79f80611997 Author: Corentin Labbe Date: Wed May 5 20:26:15 2021 +0000 crypto: ixp4xx - remove brackets from single statement fixes all single statement issues reported by checkpatch Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 87d11a5e9621d2dd9edaee007b339e3afbfcf2ee Author: Corentin Labbe Date: Wed May 5 20:26:14 2021 +0000 crypto: ixp4xx - Do not initialize static to NULL This patch fixes all checkpatch report about static init. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 39e39cfb2dc7325714e8f93b77c4acacd5c1ac2e Author: Corentin Labbe Date: Wed May 5 20:26:13 2021 +0000 crypto: ixp4xx - whitespace fixes Fixes all whitespace issues reported by checkpatch Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit f5b82be62ddd7d9be7dbb624b47aec6240c62a38 Author: Corentin Labbe Date: Wed May 5 20:26:12 2021 +0000 crypto: ixp4xx - convert all printk to dev_xxx Convert all old printk to dev_xxx. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3557084ef47ba79f84325c575cb9a4887c484d36 Author: Corentin Labbe Date: Wed May 5 20:26:11 2021 +0000 crypto: ixp4xx - convert unsigned to unsigned int Fixes all issues reported by checkpatch about "unsigned", lets convert them to unsigned int. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit dfb098d692eac2a11a7051dfe87be98cd90da67d Author: Corentin Labbe Date: Wed May 5 20:26:10 2021 +0000 crypto: ixp4xx - fallback when having more than one SG Testing ixp4xx_crypto lead to: alg: skcipher: ecb(des)-ixp4xx encryption overran dst buffer on test vector 0, cfg="two even aligned splits" The HW overwrites destination always when sg_nents() > 1. The problem seems that the HW always write areq->cryptlen bytes on the last SG. A comment in driver's code seems to give a clue that multiple SG was not planned "This was never tested by Intel for more than one dst buffer, I think". So let's add a fallback for this situation. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit e8acf011f2e7e21a7e2fae47cbaa06598e533d40 Author: Corentin Labbe Date: Wed May 5 20:26:09 2021 +0000 crypto: ixp4xx - update IV after requests Crypto selftests fail on ixp4xx since it do not update IV after skcipher requests. Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx CPUs") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 9395c58fdddd79cdd3882132cdd04e8ac7ad525f Author: Corentin Labbe Date: Wed May 5 20:26:08 2021 +0000 crypto: ixp4xx - dma_unmap the correct address Testing ixp4xx_crypto with CONFIG_DMA_API_DEBUG lead to the following error: DMA-API: platform ixp4xx_crypto.0: device driver tries to free DMA memory it has not allocated [device address=0x0000000000000000] [size=24 bytes] This is due to dma_unmap using the wrong address. Fixes: 0d44dc59b2b4 ("crypto: ixp4xx - Fix handling of chained sg buffers") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 0cdbabf8bb7a6147f5adf37dbc251e92a1bbc2c7 Author: Łukasz Stelmach Date: Wed May 5 20:29:14 2021 +0200 hwrng: exynos - Fix runtime PM imbalance on error pm_runtime_resume_and_get() wraps around pm_runtime_get_sync() and decrements the runtime PM usage counter in case the latter function fails and keeps the counter balanced. Signed-off-by: Łukasz Stelmach Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit b51dcf05c1e96caccda769f3a60042d77f1a3a7d Author: Thara Gopinath Date: Thu Apr 29 11:07:07 2021 -0400 crypto: qce - Schedule fallback aead algorithm Qualcomm crypto engine does not handle the following scenarios and will issue an abort. In such cases, pass on the transformation to a fallback algorithm. - DES3 algorithms with all three keys same. - AES192 algorithms. - 0 length messages. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit db0018a8b615e256c90a63d2d5698f2144dde222 Author: Thara Gopinath Date: Thu Apr 29 11:07:06 2021 -0400 crypto: qce - Add support for AEAD algorithms Add register programming sequence for enabling AEAD algorithms on the Qualcomm crypto engine. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit e5d6181d35b257c13841f774f5ad36b0cb2d82aa Author: Thara Gopinath Date: Thu Apr 29 11:07:05 2021 -0400 crypto: qce - Clean up qce_auth_cfg Remove various redundant checks in qce_auth_cfg. Also allow qce_auth_cfg to take auth_size as a parameter which is a required setting for ccm(aes) algorithms Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 9363efb4181c5e0fbf86bdfa759262aa29f0eb50 Author: Thara Gopinath Date: Thu Apr 29 11:07:04 2021 -0400 crypto: qce - Add support for AEAD algorithms Introduce support to enable following algorithms in Qualcomm Crypto Engine. - authenc(hmac(sha1),cbc(des)) - authenc(hmac(sha1),cbc(des3_ede)) - authenc(hmac(sha256),cbc(des)) - authenc(hmac(sha256),cbc(des3_ede)) - authenc(hmac(sha256),cbc(aes)) - ccm(aes) - rfc4309(ccm(aes)) Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 7ba9cd4e22a0c177a222669fc58ab300903b63e8 Author: Thara Gopinath Date: Thu Apr 29 11:07:03 2021 -0400 crypto: qce - Add mode for rfc4309 rf4309 is the specification that uses aes ccm algorithms with IPsec security packets. Add a submode to identify rfc4309 ccm(aes) algorithm in the crypto driver. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 6c34e446b2e2b7d26e83c4c391e89d7cf6824093 Author: Thara Gopinath Date: Thu Apr 29 11:07:02 2021 -0400 crypto: qce - Make result dump optional Qualcomm crypto engine allows for IV registers and status register to be concatenated to the output. This option is enabled by setting the RESULTS_DUMP field in GOPROC register. This is useful for most of the algorithms to either retrieve status of operation or in case of authentication algorithms to retrieve the mac. But for ccm algorithms, the mac is part of the output stream and not retrieved from the IV registers, thus needing a separate buffer to retrieve it. Make enabling RESULTS_DUMP field optional so that algorithms can choose whether or not to enable the option. Note that in this patch, the enabled algorithms always choose RESULTS_DUMP to be enabled. But later with the introduction of ccm algorithms, this changes. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit a9ca8eacb3204208863b9175baae8ac7ee6b2a64 Author: Thara Gopinath Date: Thu Apr 29 11:07:01 2021 -0400 crypto: qce - Add MAC failed error checking MAC_FAILED gets set in the status register if authenthication fails for ccm algorithms(during decryption). Add support to catch and flag this error. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit b7c3635e56d6561436af59b9876faa7cc8389644 Author: Colin Ian King Date: Thu Apr 29 12:32:53 2021 +0100 hwrng: amd - remove redundant initialization of variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit fa8edbb630ae9ef99d4ab570a16f01c3c39d9a86 Author: Christophe JAILLET Date: Wed Apr 28 09:33:37 2021 +0200 crypto: cpt - Use 'hlist_for_each_entry' to simplify code Use 'hlist_for_each_entry' instead of hand writing it. This saves a few lines of code. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit c8671c7dc7d51125ab9f651697866bf4a9132277 Author: Joerg Roedel Date: Mon Apr 26 10:17:48 2021 +0200 crypto: ccp - Annotate SEV Firmware file names Annotate the firmware files CCP might need using MODULE_FIRMWARE(). This will get them included into an initrd when CCP is also included there. Otherwise the CCP module will not find its firmware when loaded before the root-fs is mounted. This can cause problems when the pre-loaded SEV firmware is too old to support current SEV and SEV-ES virtualization features. Fixes: e93720606efd ("crypto: ccp - Allow SEV firmware to be chosen based on Family and Model") Cc: stable@vger.kernel.org # v4.20+ Acked-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Herbert Xu commit 2063257d4b2472e8f113527c642e467914bb82d3 Author: Masahiro Yamada Date: Mon Apr 26 02:57:34 2021 +0900 crypto: arm64 - use a pattern rule for generating *.S files Unify similar build rules. sha256-core.S opts out it because it is generated from sha512-armv8.pl. Signed-off-by: Masahiro Yamada Signed-off-by: Herbert Xu commit 12dd461ebd1941afe821539419685ff9dea3a31d Author: Masahiro Yamada Date: Mon Apr 26 02:57:33 2021 +0900 crypto: arm64 - generate *.S by Perl at build time instead of shipping them Generate *.S by Perl like arch/{mips,x86}/crypto/Makefile. Signed-off-by: Masahiro Yamada Signed-off-by: Herbert Xu commit 8116138cbfcee80b1bf9b57073278dcd86b44656 Author: Masahiro Yamada Date: Mon Apr 26 02:57:32 2021 +0900 crypto: arm - use a pattern rule for generating *.S files Unify similar build rules. Signed-off-by: Masahiro Yamada Signed-off-by: Herbert Xu commit 7c0303ff7e67b637c47d8afee533ca9e2a02359b Author: Masahiro Yamada Date: Mon Apr 26 02:57:31 2021 +0900 crypto: arm - generate *.S by Perl at build time instead of shipping them Generate *.S by Perl like arch/{mips,x86}/crypto/Makefile. Signed-off-by: Masahiro Yamada Signed-off-by: Herbert Xu commit 652a6a2e3824ce2ebf79a2d5326940d05c4db036 Author: Sergio Paracuellos Date: Sat May 8 09:09:30 2021 +0200 phy: ralink: phy-mt7621-pci: properly print pointer address The way of printing the pointer address for the 'port_base' address got into compile warnings on some architectures [-Wpointer-to-int-cast]. Instead of use '%08x' and cast to an 'unsigned int' just make use of '%px' and avoid the cast. To avoid not really needed driver verbosity on normal behaviour change also from 'dev_info' to 'dev_dbg'. Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY") Reported-by: kernel test robot Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210508070930.5290-7-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 6eded551cefe3ef6e2b3ff76b6a77a2ecd4fa20a Author: Sergio Paracuellos Date: Sat May 8 09:09:29 2021 +0200 phy: ralink: Kconfig: convert mt7621-pci-phy into 'bool' Make dependent on PCI_MT7621 configuration option and mark this pci phy configuration as bool which has more sense. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210508070930.5290-6-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 28dcfba1a0d622b0330ae3f4a9d7c7f2c245de7a Author: Sergio Paracuellos Date: Sat May 8 09:09:28 2021 +0200 phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver After use the clock apis and avoid custom architecture code this driver can properly be enabled for COMPILE_TEST. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210508070930.5290-5-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 60ece833ccd00c4fc9b10bbce2fa6291f61c6230 Author: Sergio Paracuellos Date: Sat May 8 09:09:27 2021 +0200 phy: ralink: phy-mt7621-pci: use kernel clock APIS MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' This allow us to properly use kernel clock apis to get the clock frequency needed for the phy configuration instead of use custom architecture code to do the same. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210508070930.5290-4-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 77945a345acfc32b8c1aadf470b55d6a4aa8e01e Author: Sergio Paracuellos Date: Sat May 8 09:09:26 2021 +0200 dt-bindings: phy: mediatek,mt7621-pci-phy: add clock entries MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' Hence update schema with the add of the entries related to clock. Since until now things were not properly being done we mark also 'clock' as required in the binding since this will be now the only way to properly retrieve frequency to be able to make a correct configuration of the PCIe phy registers. Signed-off-by: Sergio Paracuellos Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210508070930.5290-3-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit 8a981128a81e1cec66c43784f01938953dccac88 Author: Geert Uytterhoeven Date: Mon May 10 14:10:40 2021 +0200 dt-bindings: phy: renesas,rcar-gen3-pcie-phy: Convert to json-schema Convert the Renesas R-Car Gen3 PCIe PHY Device Tree binding documentation to json-schema. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/0301c3a7dae9afde115b6437a11c23ab85cb8b75.1620648490.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 0a37f32ba5272b2d4ec8c8d0f6b212b81b578f7e Author: Bixuan Cui Date: Wed May 12 11:37:27 2021 +0800 EDAC/ti: Add missing MODULE_DEVICE_TABLE The module misses MODULE_DEVICE_TABLE() for of_device_id tables and thus never autoloads on ID matches. Add the missing declaration. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Borislav Petkov Cc: Tero Kristo Link: https://lkml.kernel.org/r/20210512033727.26701-1-cuibixuan@huawei.com commit 02b2fb455b2e80a0a831d067ab7ef950e2991eee Author: zhouchuangao Date: Wed May 12 07:01:57 2021 -0700 kernel/module: Use BUG_ON instead of if condition followed by BUG Fix the following coccinelle report: kernel/module.c:1018:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. BUG_ON uses unlikely in if(). Through disassembly, we can see that brk #0x800 is compiled to the end of the function. As you can see below: ...... ffffff8008660bec: d65f03c0 ret ffffff8008660bf0: d4210000 brk #0x800 Usually, the condition in if () is not satisfied. For the multi-stage pipeline, we do not need to perform fetch decode and excute operation on brk instruction. In my opinion, this can improve the efficiency of the multi-stage pipeline. Signed-off-by: zhouchuangao Signed-off-by: Jessica Yu commit bac59054544ebdb89f05c5b9598ca9cb2dea72ce Author: YueHaibing Date: Fri May 14 15:05:07 2021 +0800 ALSA: gus: Replace unsafe strcpy() with strscpy() Fix smatch warning: sound/isa/gus/gus_main.c:396 snd_gus_check_version() error: strcpy() 'card->longname' too large for 'card->shortname' (80 vs 32) Even if this is not a real bug since the longest length of card->longname now is 31, replace strcpy() with strscpy() in order to avoid possible future mistake. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210514070507.16600-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit e73b4c9e7fa7fc8870d472b73a155e891f1f4022 Author: Jiapeng Chong Date: Thu May 13 19:11:11 2021 +0800 ALSA: hda: generic: Remove redundant assignment to dac Variable dac is set to zero, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: sound/pci/hda/hda_generic.c:1436:4: warning: Value stored to 'dac' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1620904271-76027-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Takashi Iwai commit d0f5137b1a986de80ed71d9fd141976ef239d2ca Author: Huilong Deng Date: Tue May 11 23:47:10 2021 +0800 ALSA: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Huilong Deng Link: https://lore.kernel.org/r/20210511154710.24481-1-denghuilong@cdjrlc.com Signed-off-by: Takashi Iwai commit a06b7ee2330b25ba509412eac2a6c8d0eb14eb8a Merge: 6efb943b8616e 814b43127f4ac Author: Takashi Iwai Date: Fri May 14 09:48:18 2021 +0200 Merge branch 'for-linus' into for-next commit 6c2cfc947607dc8de338377479939893f1288f37 Author: Enric Balletbo i Serra Date: Fri Apr 23 09:52:50 2021 +0200 arm64: defconfig: Allow Mediatek boards to boot from the mmc Enable the MMC_MTK option necessary to boot Mediatek boards from the mmc. Booting from the mmc is the common method used for a bunch of boards, specially Chromebooks, to boot from. Hence this driver is built-in. Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210423075250.2616275-1-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit f0e70d4946332c681ceaba940652f30c7c33473d Author: Enric Balletbo i Serra Date: Fri Apr 23 09:52:01 2021 +0200 arm64: defconfig: Do not override the MTK_PMIC_WRAP symbol Commit 'fbbe38309d56 ("arm64: defconfig: Allow mt8173-based boards to boot from usb")' added the MTK_PMIC_WRAP config built-in. It needs to be built-in in order to be able to boot from USB or the MMC without needing a ramdisk, but that symbol was already defined as a module so now we are getting the following warning: arch/arm64/configs/defconfig:996:warning: override: reassigning to symbol MTK_PMIC_WRAP Remove the MTK_PMIC_WRAP=m from the defconfig to remove the error. Fixes: fbbe38309d56 ("arm64: defconfig: Allow mt8173-based boards to boot from usb") Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210423075201.2616023-1-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 48001d26c19f02c33795829ec9fc71a0d8d42413 Author: Peter Zijlstra Date: Thu May 13 16:15:50 2021 +0200 objtool: Reflow handle_jump_alt() Miroslav figured the code flow in handle_jump_alt() was sub-optimal with that goto. Reflow the code to make it clearer. Reported-by: Miroslav Benes Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/YJ00lgslY+IpA/rL@hirez.programming.kicks-ass.net commit d46f61b20b060f03b58fde170ee618f17dc6f99d Author: Peter Zijlstra Date: Thu May 13 16:16:47 2021 +0200 jump_label/x86: Remove unused JUMP_LABEL_NOP_SIZE JUMP_LABEL_NOP_SIZE is now unused, remove it. Fixes: 001951bea748 ("jump_label, x86: Add variable length patching support") Reported-by: Miroslav Benes Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/YJ00zxsvocDV5vLU@hirez.programming.kicks-ass.net commit 41f45fb045bcc20e71eb705b361356e715682162 Author: Ingo Molnar Date: Thu May 13 13:41:41 2021 +0200 x86/asm: Make valid on cross-builds as well Stephen Rothwell reported that the objtool cross-build breaks on non-x86 hosts: > tools/arch/x86/include/asm/asm.h:185:24: error: invalid register name for 'current_stack_pointer' > 185 | register unsigned long current_stack_pointer asm(_ASM_SP); > | ^~~~~~~~~~~~~~~~~~~~~ The PowerPC host obviously doesn't know much about x86 register names. Protect the kernel-specific bits of , so that it can be included by tooling and cross-built. Reported-by: Stephen Rothwell Reviewed-by: H. Peter Anvin Signed-off-by: Ingo Molnar commit c1cccec9c63637c4c5ee0aa2da2850d983c19e88 Author: Andrii Nakryiko Date: Thu May 13 16:36:43 2021 -0700 libbpf: Reject static maps Static maps never really worked with libbpf, because all such maps were always silently resolved to the very first map. Detect static maps (both legacy and BTF-defined) and report user-friendly error. Tested locally by switching few maps (legacy and BTF-defined) in selftests to static ones and verifying that now libbpf rejects them loudly. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210513233643.194711-2-andrii@kernel.org commit 9e9b451593b161403aedf15eef8ced62dba65f40 Author: Andrii Nakryiko Date: Thu May 13 16:36:42 2021 -0700 selftests/bpf: Validate skeleton gen handles skipped fields Adjust static_linked selftests to test a mix of global and static variables and their handling of bpftool's skeleton generation code. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210513233643.194711-1-andrii@kernel.org commit 69777e6ca396f0a7e1baff40fcad4a9d3d445b7a Author: Wang Li Date: Sat Apr 10 03:48:41 2021 +0000 drm/mediatek: Fix PM reference leak in mtk_crtc_ddp_hw_init() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Wang Li Signed-off-by: Chun-Kuang Hu commit ea89c862f01e02ec459932c7c3113fa37aedd09a Author: Gustavo A. R. Silva Date: Thu May 13 17:49:14 2021 -0500 net: mana: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit fe0bdaec8dea9912b95296d758422d95aa57fac0 Author: Gustavo A. R. Silva Date: Thu May 13 16:50:49 2021 -0500 bpf: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 0f3ee280331e28b81560715356d47351a6016bce Author: Guenter Roeck Date: Thu May 13 09:58:40 2021 -0700 net: caif: Drop unnecessary NULL check after container_of The first parameter passed to chnl_recv_cb() can never be NULL since all callers dereferenced it. Consequently, container_of() on it is also never NULL, even though the reference into the structure points to the first element of the structure. The NULL check is therefore unnecessary. On top of that, it is misleading to perform a NULL check on the result of container_of() because the position of the contained element could change, which would make the test invalid. Remove the unnecessary NULL check. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller commit 5efe2575316f97aa6d004fc0534e48ea85acdff3 Author: Colin Ian King Date: Thu May 13 12:49:10 2021 +0100 net: qed: remove redundant initialization of variable rc The variable rc is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 25e248a2bc43fe4a7a9815addf1f46d26c0d2442 Merge: 33b314265683c 7bf64460e3b2a Author: David S. Miller Date: Thu May 13 15:51:14 2021 -0700 Merge branch 'virtio_net-fixes' Xuan Zhuo says: ==================== virtio-net: fix for build_skb() The logic of this piece is really messy. Fortunately, my refactored patch can be completed with a small amount of testing. ==================== Signed-off-by: David S. Miller commit 7bf64460e3b2af4e6e46d932b2fbd933d662d19f Author: Xuan Zhuo Date: Thu May 13 19:48:08 2021 +0800 virtio-net: get build_skb() buf by data ptr In the case of merge, the page passed into page_to_skb() may be a head page, not the page where the current data is located. So when trying to get the buf where the data is located, you should directly use the pointer(p) to get the address corresponding to the page. At the same time, the offset of the data in the page should also be obtained using offset_in_page(). This patch solves this problem. But if you don’t use this patch, the original code can also run, because if the page is not the page of the current data, the calculated tailroom will be less than 0, and will not enter the logic of build_skb() . The significance of this patch is to modify this logical problem, allowing more situations to use build_skb(). Signed-off-by: Xuan Zhuo Signed-off-by: David S. Miller commit 6c66c147b9a4004f880cbd04bf01b40cf6f98018 Author: Xuan Zhuo Date: Thu May 13 19:48:07 2021 +0800 virtio-net: fix for unable to handle page fault for address In merge mode, when xdp is enabled, if the headroom of buf is smaller than virtnet_get_headroom(), xdp_linearize_page() will be called but the variable of "headroom" is still 0, which leads to wrong logic after entering page_to_skb(). [ 16.600944] BUG: unable to handle page fault for address: ffffecbfff7b43c8[ 16.602175] #PF: supervisor read access in kernel mode [ 16.603350] #PF: error_code(0x0000) - not-present page [ 16.604200] PGD 0 P4D 0 [ 16.604686] Oops: 0000 [#1] SMP PTI [ 16.605306] CPU: 4 PID: 715 Comm: sh Tainted: G B 5.12.0+ #312 [ 16.606429] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/04 [ 16.608217] RIP: 0010:unmap_page_range+0x947/0xde0 [ 16.609014] Code: 00 00 08 00 48 83 f8 01 45 19 e4 41 f7 d4 41 83 e4 03 e9 a4 fd ff ff e8 b7 63 ed ff 4c 89 e0 48 c1 e0 065 [ 16.611863] RSP: 0018:ffffc90002503c58 EFLAGS: 00010286 [ 16.612720] RAX: ffffecbfff7b43c0 RBX: 00007f19f7203000 RCX: ffffffff812ff359 [ 16.613853] RDX: ffff888107778000 RSI: 0000000000000000 RDI: 0000000000000005 [ 16.614976] RBP: ffffea000425e000 R08: 0000000000000000 R09: 3030303030303030 [ 16.616124] R10: ffffffff82ed7d94 R11: 6637303030302052 R12: 7c00000afffded0f [ 16.617276] R13: 0000000000000001 R14: ffff888119ee7010 R15: 00007f19f7202000 [ 16.618423] FS: 0000000000000000(0000) GS:ffff88842fd00000(0000) knlGS:0000000000000000 [ 16.619738] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.620670] CR2: ffffecbfff7b43c8 CR3: 0000000103220005 CR4: 0000000000370ee0 [ 16.621792] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 16.622920] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 16.624047] Call Trace: [ 16.624525] ? release_pages+0x24d/0x730 [ 16.625209] unmap_single_vma+0xa9/0x130 [ 16.625885] unmap_vmas+0x76/0xf0 [ 16.626480] exit_mmap+0xa0/0x210 [ 16.627129] mmput+0x67/0x180 [ 16.627673] do_exit+0x3d1/0xf10 [ 16.628259] ? do_user_addr_fault+0x231/0x840 [ 16.629000] do_group_exit+0x53/0xd0 [ 16.629631] __x64_sys_exit_group+0x1d/0x20 [ 16.630354] do_syscall_64+0x3c/0x80 [ 16.630988] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 16.631828] RIP: 0033:0x7f1a043d0191 [ 16.632464] Code: Unable to access opcode bytes at RIP 0x7f1a043d0167. [ 16.633502] RSP: 002b:00007ffe3d993308 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 16.634737] RAX: ffffffffffffffda RBX: 00007f1a044c9490 RCX: 00007f1a043d0191 [ 16.635857] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 [ 16.636986] RBP: 0000000000000000 R08: ffffffffffffff88 R09: 0000000000000001 [ 16.638120] R10: 0000000000000008 R11: 0000000000000246 R12: 00007f1a044c9490 [ 16.639245] R13: 0000000000000001 R14: 00007f1a044c9968 R15: 0000000000000000 [ 16.640408] Modules linked in: [ 16.640958] CR2: ffffecbfff7b43c8 [ 16.641557] ---[ end trace bc4891c6ce46354c ]--- [ 16.642335] RIP: 0010:unmap_page_range+0x947/0xde0 [ 16.643135] Code: 00 00 08 00 48 83 f8 01 45 19 e4 41 f7 d4 41 83 e4 03 e9 a4 fd ff ff e8 b7 63 ed ff 4c 89 e0 48 c1 e0 065 [ 16.645983] RSP: 0018:ffffc90002503c58 EFLAGS: 00010286 [ 16.646845] RAX: ffffecbfff7b43c0 RBX: 00007f19f7203000 RCX: ffffffff812ff359 [ 16.647970] RDX: ffff888107778000 RSI: 0000000000000000 RDI: 0000000000000005 [ 16.649091] RBP: ffffea000425e000 R08: 0000000000000000 R09: 3030303030303030 [ 16.650250] R10: ffffffff82ed7d94 R11: 6637303030302052 R12: 7c00000afffded0f [ 16.651394] R13: 0000000000000001 R14: ffff888119ee7010 R15: 00007f19f7202000 [ 16.652529] FS: 0000000000000000(0000) GS:ffff88842fd00000(0000) knlGS:0000000000000000 [ 16.653887] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.654841] CR2: ffffecbfff7b43c8 CR3: 0000000103220005 CR4: 0000000000370ee0 [ 16.655992] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 16.657150] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 16.658290] Kernel panic - not syncing: Fatal exception [ 16.659613] Kernel Offset: disabled [ 16.660234] ---[ end Kernel panic - not syncing: Fatal exception ]--- Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom") Signed-off-by: Xuan Zhuo Signed-off-by: David S. Miller commit 33b314265683c9ef09593c3390e57ba85194f635 Merge: 0d59c95ea3d2e ea0fbd05d7bd3 Author: David S. Miller Date: Thu May 13 15:48:11 2021 -0700 Merge branch 'atl1c-support-for-Mikrotik-10-25G-NIC-features' Gatis Peisenieks says: ==================== atl1c: support for Mikrotik 10/25G NIC features The new Mikrotik 10/25G NIC maintains compatibility with existing atl1c driver. However it does have new features. This patch set adds support for reporting cards higher link speed, max-mtu, enables rx csum offload and improves tx performance. v2: - fixed xmit_more handling as pointed out by Eric Dumazet - added a more reliable link detection on Mikrotik 10/25G NIC since MDIO op emulation can occasionally fail Guangbin Huang says: ==================== Signed-off-by: David S. Miller commit ea0fbd05d7bd3298290d3579a837311ee5ceaf18 Author: Gatis Peisenieks Date: Thu May 13 14:43:26 2021 +0300 atl1c: improve link detection reliability on Mikrotik 10/25G NIC Mikrotik 10/25G NIC emulates the MDIO accesses, but the emulation is not 100% reliable - the MDIO ops occasionally can timeout. This adds a reliable way of detecting link on Mikrotik 10/25G NIC. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit b0390009502b0c635f9ddc26a16025268f6c6211 Author: Gatis Peisenieks Date: Thu May 13 14:43:25 2021 +0300 atl1c: enable rx csum offload on Mikrotik 10/25G NIC Mikrotik 10/25G NIC supports hw checksum verification on rx for IP/IPv6 + TCP/UDP packets. HW checksum offload helps reduce host cpu load. This enables the csum offload specifically for Mikrotik 10/25G NIC as other HW supported by the driver is known to have problems with it. TCP iperf3 to Threadripper 3960X with NIC improved 16.5 -> 20.0 Gbps with mtu=1500. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit 545fa3fb1e84855820a5ed25053d6a5afbd30900 Author: Gatis Peisenieks Date: Thu May 13 14:43:24 2021 +0300 atl1c: adjust max mtu according to Mikrotik 10/25G NIC ability The new Mikrotik 10/25G NIC supports jumbo frames. Jumbo frames are supported for TSO as well. This enables the support for mtu up to 9500 bytes. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit d7ab6419bdee50dbc4a53e69c290a1ef05dae7f9 Author: Gatis Peisenieks Date: Thu May 13 14:43:23 2021 +0300 atl1c: improve performance by avoiding unnecessary pcie writes on xmit The kernel has xmit_more facility that hints the networking driver xmit path about whether more packets are coming soon. This information can be used to avoid unnecessary expensive PCIe transaction per tx packet. Max TX pps on Mikrotik 10/25G NIC in a Threadripper 3960X system improved from 1150Kpps to 1700Kpps. Testing L2 forwarding on AR8151 hardware did not reveal a measurable increase in latency. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit f19d4997fd1fb01bed127e1056ce3a5de922d9ee Author: Gatis Peisenieks Date: Thu May 13 14:43:22 2021 +0300 atl1c: show correct link speed on Mikrotik 10/25G NIC The new Mikrotik 10/25G NIC maintains compatibility with existing atl1c driver. However it does have new features. This defines some new register offsets, code for identifying the new type of NIC and correct speed detection for the NIC. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit 0d59c95ea3d2e81b76cfbd2f1ff0adf00c23c8f7 Merge: d38717af2c9e9 5db8c86e8904e Author: David S. Miller Date: Thu May 13 15:39:10 2021 -0700 Merge branch 'hinic-cleanups' Guangbin Huang says: ==================== net: hinic: some cleanups This patchset adds some cleanups for the hinic ethernet driver. ==================== Signed-off-by: David S. Miller commit 5db8c86e8904e2dc9c27a61fc9b77131c8751d67 Author: Guangbin Huang Date: Thu May 13 14:26:53 2021 +0800 net: hinic: fix misspelled "acessing" The word "acessing" is misspelled, so fix it. Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit c8ad5df6151e457ad995fdee6440a45af09b70f6 Author: Guangbin Huang Date: Thu May 13 14:26:52 2021 +0800 net: hinic: remove unnecessary parentheses There are some unnecessary parentheses, this patch deletes them. Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 3402ab54a8e37a48f72b8b3dad543bb839ec4d2d Author: Guangbin Huang Date: Thu May 13 14:26:51 2021 +0800 net: hinic: add blank line after function declaration There should be a blank line after function declaration, so add two missed blank lines. Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit 9afcb59597301c8e8dca8ba855f5ec74f918a479 Author: Guangbin Huang Date: Thu May 13 14:26:50 2021 +0800 net: hinic: remove unnecessary blank line There are two blank lines are unnecessary, this patch removes them. Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller commit d38717af2c9e9159b9ce11a03d820bc2b6d9e5d4 Merge: 8380c81d5c4fc 3b85f9ba3480c Author: David S. Miller Date: Thu May 13 14:04:31 2021 -0700 Merge branch 'bridge-split-ipv4-ipv6-mc-router-state' Linus Lüssing says: ==================== net: bridge: split IPv4/v6 mc router state and export for batman-adv The following patches are splitting the so far combined multicast router state in the Linux bridge into two ones, one for IPv4 and one for IPv6, for a more fine-grained detection of multicast routers. This avoids sending IPv4 multicast packets to an IPv6-only multicast router and avoids sending IPv6 multicast packets to an IPv4-only multicast router. This also allows batman-adv to make use of the now split information in the final patch. The first eight patches prepare the bridge code to avoid duplicate code or IPv6-#ifdef clutter for the multicast router state split. And contain no functional changes yet. The ninth patch then implements the IPv4+IPv6 multicast router state split. Patch number ten adds IPv4+IPv6 specific timers to the mdb netlink router port dump, so that the timers validity can be checked individually from userspace. The final, eleventh patch exports this now per protocol family multicast router state so that batman-adv can then later make full use of the Multicast Router Discovery (MRD) support in the Linux bridge. The batman-adv protocol format currently expects separate multicast router states for IPv4 and IPv6, therefore it depends on the first patch. batman-adv will then make use of this newly exported functions like this[0]. Regards, Linus [0]: https://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/linus/multicast-routeable-mrd -> https://git.open-mesh.org/batman-adv.git/commit/d4bed3a92427445708baeb1f2d1841c5fb816fd4 Changelog v3: * Patch 01/11: * fixed/added missing rename of br->router_list to br->ip4_mc_router_list in br_multicast_flood() * Patch 02/11: * moved inline functions from br_forward.c to br_private.h * Patch 03/11: * removed inline attribute from functions added to br_mdb.c * Patch 04/11: * unchanged * Patch 05/11: * converted if()'s into switch-case in br_multicast_is_router() * Patch 06/11: * removed inline attribute from function added to br_multicast.c * Patch 07/11: * added missing static attribute to function br_ip4_multicast_get_rport_slot() added to br_multicast.c * Patch 08/11: * removed inline attribute from function added to br_multicast.c * Patch 09/11: * added missing static attribute to function br_ip6_multicast_get_rport_slot() added to br_multicast.c * removed inline attribute from function added to br_multicast.c * Patch 10/11: * unchanged * Patch 11/11: * simplified bridge check in br_multicast_has_router_adjacent() by using br_port_get_check_rcu() * added missing declaration for br_multicast_has_router_adjacent() in include/linux/if_bridge.h Changelog v2: * split into multiple patches as suggested by Nikolay * added helper functions to br_multicast_flood(), avoiding IPv6 #ifdef clutter * fixed reverse xmas tree ordering in br_rports_fill_info() and added helper functions to avoid IPv6 #ifdef clutter * Added a common br_multicast_add_router() and a helper function to retrieve the correct slot to avoid duplicate code for an ip4 and ip6 variant * replaced the "1" and "2" constants in br_multicast_is_router() with the appropriate enums * added br_{ip4,ip6}_multicast_rport_del() wrappers to reduce IPv6 #ifdef clutter * added return values to br_*multicast_rport_del() to only notify if the port was actually removed and did not race with a readdition somewhere else * added empty, void br_ip6_multicast_mark_router() if compiled without IPv6, to reduce IPv6 #ifdef clutter ==================== Signed-off-by: David S. Miller commit 3b85f9ba3480c1bcbebb2bb490822bec0e7a1201 Author: Linus Lüssing Date: Thu May 13 15:20:53 2021 +0200 net: bridge: mcast: export multicast router presence adjacent to a port To properly support routable multicast addresses in batman-adv in a group-aware way, a batman-adv node needs to know if it serves multicast routers. This adds a function to the bridge to export this so that batman-adv can then make full use of the Multicast Router Discovery capability of the bridge. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit b7fb0916544de44ce099d9f3b6129c86b484de25 Author: Linus Lüssing Date: Thu May 13 15:20:52 2021 +0200 net: bridge: mcast: add ip4+ip6 mcast router timers to mdb netlink Now that we have split the multicast router state into two, one for IPv4 and one for IPv6, also add individual timers to the mdb netlink router port dump. Leaving the old timer attribute for backwards compatibility. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit a3c02e769efe66dce5e2c716862b60c8d44d191e Author: Linus Lüssing Date: Thu May 13 15:20:51 2021 +0200 net: bridge: mcast: split multicast router state for IPv4 and IPv6 A multicast router for IPv4 does not imply that the same host also is a multicast router for IPv6 and vice versa. To reduce multicast traffic when a host is only a multicast router for one of these two protocol families, keep router state for IPv4 and IPv6 separately. Similar to how querier state is kept separately. For backwards compatibility for netlink and switchdev notifications these two will still only notify if a port switched from either no IPv4/IPv6 multicast router to any IPv4/IPv6 multicast router or the other way round. However a full netlink MDB router dump will now also include a multicast router timeout for both IPv4 and IPv6. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit ed2d35971a8066aa24ce65dd66c113c0506bb206 Author: Linus Lüssing Date: Thu May 13 15:20:50 2021 +0200 net: bridge: mcast: split router port del+notify for mcast router split In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants split router port deletion and notification into two functions. When we disable a port for instance later we want to only send one notification to switchdev and netlink for compatibility and want to avoid sending one for IPv4 and one for IPv6. For that the split is needed. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit d9b8c4d8d937f58e618aa1e756162e80b385c701 Author: Linus Lüssing Date: Thu May 13 15:20:49 2021 +0200 net: bridge: mcast: prepare add-router function for mcast router split In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants move the protocol specific router list and timer access to ip4 wrapper functions. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit ee5fb2223ee581676fe7e4e5a87481c419569454 Author: Linus Lüssing Date: Thu May 13 15:20:48 2021 +0200 net: bridge: mcast: prepare expiry functions for mcast router split In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants move the protocol specific timer access to an ip4 wrapper function. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit 1a3065a26807b4cdd65d3b696ddb18385610f7da Author: Linus Lüssing Date: Thu May 13 15:20:47 2021 +0200 net: bridge: mcast: prepare is-router function for mcast router split In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants make br_multicast_is_router() protocol family aware. Note that for now br_ip6_multicast_is_router() uses the currently still common ip4_mc_router_timer for now. It will be renamed to ip6_mc_router_timer later when the split is performed. While at it also renames the "1" and "2" constants in br_multicast_is_router() to the MDB_RTR_TYPE_TEMP_QUERY and MDB_RTR_TYPE_PERM enums. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit b19232effd09c2cb5e11b1b74547406a3c9adc5a Author: Linus Lüssing Date: Thu May 13 15:20:46 2021 +0200 net: bridge: mcast: prepare query reception for mcast router split In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and as the br_multicast_mark_router() will be split for that remove the select querier wrapper and instead add ip4 and ip6 variants for br_multicast_query_received(). Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit ff391c5d9871894c620f1e6ae2b18d7db572e49d Author: Linus Lüssing Date: Thu May 13 15:20:45 2021 +0200 net: bridge: mcast: prepare mdb netlink for mcast router split In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and to avoid IPv6 #ifdef clutter later add some inline functions for the protocol specific parts in the mdb router netlink code. Also the we need iterate over the port instead of router list to be able put one router port entry with both the IPv4 and IPv6 multicast router info later. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit 44ebb081dc6934e43d3c7444f183d6426adeca21 Author: Linus Lüssing Date: Thu May 13 15:20:44 2021 +0200 net: bridge: mcast: add wrappers for router node retrieval In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants and to avoid IPv6 #ifdef clutter later add two wrapper functions for router node retrieval in the payload forwarding code. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit ce6f709775bdf9bc8dd852a8758e10a98f31f280 Author: Linus Lüssing Date: Thu May 13 15:20:43 2021 +0200 net: bridge: mcast: rename multicast router lists and timers In preparation for the upcoming split of multicast router state into their IPv4 and IPv6 variants, rename the affected variable to the IPv4 version first to avoid some renames in later commits. Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit 8380c81d5c4fced6f4397795a5ae65758272bbfd Author: Sebastian Andrzej Siewior Date: Wed May 12 23:43:24 2021 +0200 net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT __napi_schedule_irqoff() is an optimized version of __napi_schedule() which can be used where it is known that interrupts are disabled, e.g. in interrupt-handlers, spin_lock_irq() sections or hrtimer callbacks. On PREEMPT_RT enabled kernels this assumptions is not true. Force- threaded interrupt handlers and spinlocks are not disabling interrupts and the NAPI hrtimer callback is forced into softirq context which runs with interrupts enabled as well. Chasing all usage sites of __napi_schedule_irqoff() is a whack-a-mole game so make __napi_schedule_irqoff() invoke __napi_schedule() for PREEMPT_RT kernels. The callers of ____napi_schedule() in the networking core have been audited and are correct on PREEMPT_RT kernels as well. Reported-by: Juri Lelli Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Thomas Gleixner Reviewed-by: Juri Lelli Signed-off-by: David S. Miller commit 4a5fe57e775188be96359a1934501be45fe5f705 Author: Johannes Berg Date: Wed May 12 12:19:50 2021 +0200 alx: use fine-grained locking instead of RTNL In the alx driver, all locking depended on the RTNL, but that causes issues with ipconfig ("ip=..." command line) because that waits for the netdev to have a carrier while holding the RTNL, but the alx workers etc. require RTNL, so the carrier won't be set until the RTNL is dropped and can be acquired by alx workers. This causes long delays at boot, as reported by Nikolai Zhubr. Really the only sensible thing to do here is to not use the RTNL for everything, but instead have fine-grained locking for just the driver. Do that, it's not that hard. Reported-by: Nikolai Zhubr Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 13511704f8d7591faf19fdb84f0902dff0535ccb Author: Yannick Vignon Date: Tue May 11 19:18:29 2021 +0200 net: taprio offload: enforce qdisc to netdev queue mapping Even though the taprio qdisc is designed for multiqueue devices, all the queues still point to the same top-level taprio qdisc. This works and is probably required for software taprio, but at least with offload taprio, it has an undesirable side effect: because the whole qdisc is run when a packet has to be sent, it allows packets in a best-effort class to be processed in the context of a task sending higher priority traffic. If there are packets left in the qdisc after that first run, the NET_TX softirq is raised and gets executed immediately in the same process context. As with any other softirq, it runs up to 10 times and for up to 2ms, during which the calling process is waiting for the sendmsg call (or similar) to return. In my use case, that calling process is a real-time task scheduled to send a packet every 2ms, so the long sendmsg calls are leading to missed timeslots. By attaching each netdev queue to its own qdisc, as it is done with the "classic" mq qdisc, each traffic class can be processed independently without touching the other classes. A high-priority process can then send packets without getting stuck in the sendmsg call anymore. Signed-off-by: Yannick Vignon Signed-off-by: David S. Miller commit 17e336db2b8ac5a91036184771655abe2d158273 Author: Anupama K Patil Date: Thu Apr 22 23:33:22 2021 +0530 drivers: pnp: proc.c: Removed unnecessary varibles de, e are two variables of the type 'struct proc_dir_entry' which can be removed to save memory. This also fixes a coding style issue reported by checkpatch where we are suggested to make assignment outside the if statement. Reviewed-by: Jaroslav Kysela Signed-off-by: Anupama K Patil Link: https://lore.kernel.org/r/20210422180322.7wlyg63kv3n2k6id@ubuntu Signed-off-by: Greg Kroah-Hartman commit ca263dd848a26d243dca113469e6cff31a131bb6 Author: Guenter Roeck Date: Mon May 10 21:55:12 2021 -0700 mei: Drop unnecessary NULL check after container_of The result of container_of() operations is never NULL unless the embedded element is the first element of the data structure, which is not the case here. The NULL check is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Acked-by: Tomas Winkler Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210511045512.2376580-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 7912146abf6705c771b28ea5b6d608ee2ea39dcd Author: Guenter Roeck Date: Mon May 10 18:25:19 2021 -0700 tty: hvc_iucv: Drop unnecessary NULL check after container_of The result of container_of() operations is never NULL unless the extracted element is the first element of the embedded structure. This is not the case here. The NULL check is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210511012519.2359074-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 7985723d21a15d4a237efa89e85c938875a3f9c3 Author: Andy Shevchenko Date: Mon May 10 17:49:47 2021 +0300 vt: Move custom isspace() to its own namespace If by some reason any of the headers will include ctype.h we will have a name collision. Avoid this by moving isspace() to the dedicate namespace. First appearance of the code is in the commit 24a1c2a769cf ("Import 1.1.92"). Reported-by: kernel test robot Reviewed-by: Jiri Slaby Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510144947.58270-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7d5b2cbe7a8f918641e9c69f07bc2fe0989221a0 Author: Masahiro Yamada Date: Mon May 10 15:34:50 2021 +0900 comedi: remove editor modelines and cruft (again) Commit fa60ce2cb450 ("treewide: remove editor modelines and cruft") is different from what I submitted. My original patch [1] did treewide cleanups including the comedi driver. Unfortunately, commit 8ffdff6a8cfb ("staging: comedi: move out of staging directory") moved drivers/staging/comedi/ to drivers/comedi/ before my patch landed on Linus' tree from akpm tree. If Andrew Morton had used Git, 'git merge' would have resolved such file moves properly without any manual intervention. Patches in akpm tree often get broken in his quilt workflows, and then people end up with sending fixup patches. [1] https://lkml.kernel.org/r/20210324054457.1477489-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210510063450.412055-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5c439c38f5fb8fd16b65af4d5bc4618d1ec9bca3 Author: David M Nieto Date: Thu May 13 10:45:39 2021 -0700 drm/amdgpu: fix fence calculation (v2) The proper metric for fence utilization over several contexts is an harmonic mean, but such calculation is prohibitive in kernel space, so the code approximates it. Because the approximation diverges when one context has a very small ratio compared with the other context, this change filter out ratios smaller that 0.01% v2: make the fence calculation static and initialize variables within that function v3: Fix warnings (Alex) Reviewed-by: Alex Deucher Signed-off-by: David M Nieto Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210513174539.27409-2-david.nieto@amd.com commit 5f8e9aff1a116c8cc7c58d174d7e2ed172ba8993 Author: Bryan Brattlof Date: Thu May 13 16:10:52 2021 +0000 staging: rtl8723bs: remove unused argument 'msg' After the removal of the DBG_871X macros, the 'msg' argument for rtw_sctx_wait() is no longer used. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210513160848.1057564-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 56a1c5cc8a16839ef7f538e208f23acb38eb2189 Author: Nguyen Dinh Phi Date: Thu May 13 02:44:40 2021 +0800 Staging: vchiq_arm: Using pr_err and pr_notice instead of printk This patch fixes the following checkpatch.pl warning: fix Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Nguyen Dinh Phi Link: https://lore.kernel.org/r/20210512184440.550116-1-phind.uet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76dfbca4757ff5c00ee78d4040c85b814f5b0166 Author: Fabio M. De Francesco Date: Wed May 12 17:32:08 2021 +0200 staging: rtl8723bs: core: Remove unnecessary lines of code Removed unnecessary lines of code inside an "else if" block. That code acquires a spinlock and iterates over each item in a linked list for no purpose. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210512153208.9584-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7ac5ed5095a579ea12cedc30978ffb048b4a0884 Author: Fabio M. De Francesco Date: Wed May 12 09:38:52 2021 +0200 staging: rtl8723bs: hal: Remove set but unused variable Removed "delta_IQK" and its occurrences in comments and code because the variable is set but not used. Issue detected by GCC. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210512073852.14085-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 08df2c3ba11974fd022f7c83a7c76f6c17462ccf Author: Ashish Vara Date: Mon May 10 20:34:32 2021 +0530 staging: qlge: removed unnecessary debug message to fix coding style warning removed unnecessary out of memory message to fix coding style warning. Signed-off-by: Ashish Vara Link: https://lore.kernel.org/r/1997ad6b-ed63-a939-aec8-18636c132f0d@yahoo.com Signed-off-by: Greg Kroah-Hartman commit 1f5adcfe87a08afb228d895a623464ba5113866e Author: Fabio Aiuto Date: Mon May 10 15:19:33 2021 +0200 staging: rtl8723bs: remove unneeded comments to silence 'line too long' warning remove unneeded comments to fix the following post commit hook checkpatch warnings: WARNING: line length of 110 exceeds 100 columns 115: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:510: + *((__le32 *)crc) = ~crc32_le(~0, payload, length);/* modified by Amy*/ WARNING: line length of 110 exceeds 100 columns 124: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:518: + *((__le32 *)crc) = ~crc32_le(~0, payload, length);/* modified by Amy*/ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/bb479715e3603ab78863576783dbbf49c5f6f703.1620652505.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b97fad10de387c09ae46f607955c7237afa96654 Author: Fabio Aiuto Date: Mon May 10 15:19:32 2021 +0200 staging: rtl8723bs: replace private CRC-32 routines with in-kernel ones replace private CRC-32 routines with in-kernel ones. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/cdd9bc521b7119a9c2787b46109eb76f94bd295a.1620652505.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a7f0849682b75b6d50f07c70090443eebd90218c Author: David M Nieto Date: Thu May 13 10:45:38 2021 -0700 drm/amdgpu: free resources on fence usage query Free the resources if the fence needs to be ignored during the ratio calculation Reviewed-by: Alex Deucher Signed-off-by: David M Nieto Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210513174539.27409-1-david.nieto@amd.com commit 1df92640ba7db67c359dc2d53ef43861281f5af6 Author: Xiaofei Tan Date: Wed May 12 17:26:25 2021 +0800 tty: tty_port: Fix coding style issues of block comments Fix coding style issues of block comments, reported by checkpatch.pl. Besides, add a period at the end of the sentenses. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-18-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 54ad59a25ad1e2ec2eb24156a899aaa8e3411376 Author: Xiaofei Tan Date: Wed May 12 17:26:24 2021 +0800 tty: tty_port: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-17-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 16d15f747a099f107f4522547a75a3b9b658131b Author: Xiaofei Tan Date: Wed May 12 17:26:23 2021 +0800 tty: tty_port: Delete a blank line before EXPORT_SYMBOL(foo) Delete a blank line before EXPORT_SYMBOL(foo) so that EXPORT_SYMBOL(foo) immediately follow its function/variable, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-16-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit fab491030cea293692f3a48a2c77a754f79c9ccc Author: Xiaofei Tan Date: Wed May 12 17:26:22 2021 +0800 tty: tty_io: Remove return in void function Remove return in void function, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-15-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 27eab129323bac984a3de4d9585351dc525793bd Author: Xiaofei Tan Date: Wed May 12 17:26:21 2021 +0800 tty: tty_io: Delete a blank line before EXPORT_SYMBOL(foo) Delete a blank line before EXPORT_SYMBOL(foo) so that EXPORT_SYMBOL(foo) immediately follow its function/variable, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-14-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5e4d5ac32ba538f29ff64104e7211486cc805904 Author: Xiaofei Tan Date: Wed May 12 17:26:20 2021 +0800 tty: tty_io: Fix an issue of code indent for conditional statements Fix an issue of code indent for conditional statements,reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-13-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 44969f85402e2f8a9fcfa33520e5ba7f81556f0a Author: Xiaofei Tan Date: Wed May 12 17:26:19 2021 +0800 tty: tty_io: Remove the repeated word 'can' Remove the repeated word 'can' following advice of checkpatch.pl Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-12-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit b426a5b8154c3f3858e8e431ef2e69b73c3ee4a2 Author: Xiaofei Tan Date: Wed May 12 17:26:18 2021 +0800 tty: tty_io: Fix coding style issues of block comments Fix coding style issues of block comments, reported by checkpatch.pl. Besides, add a period at the end of the sentenses. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-11-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit d91c1a3eed06694514a522525510a2aeba351efa Author: Xiaofei Tan Date: Wed May 12 17:26:17 2021 +0800 tty: tty_io: Fix trailing whitespace issues Fix trailing whitespace issues, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-10-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 94bc2eb5fb4337db9ae654e5865f6b368dc1e11e Author: Xiaofei Tan Date: Wed May 12 17:26:16 2021 +0800 tty: tty_io: Fix spaces required around that ':' Fix spaces required around that ':', reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-9-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit e73b240785f284582f95dd778437da7eaa5cddc2 Author: Xiaofei Tan Date: Wed May 12 17:26:15 2021 +0800 tty: tty_io: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-8-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 395e783371de05aad0f1acfe802ba618aa8267e8 Author: Xiaofei Tan Date: Wed May 12 17:26:14 2021 +0800 tty: tty_io: Remove spaces before tabs Remove spaces before tabs following the advice of checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-7-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 80e3fce1034a8b94ad375545b127dcec6d0e4151 Author: Xiaofei Tan Date: Wed May 12 17:26:13 2021 +0800 tty: tty_buffer: Fix coding style issues of block comments Fix coding style issues of block comments, reported by checkpatch.pl. Besides, add a period at the end of the sentenses. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-6-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit dadc104948689a39304cc3cc3782fca1e4f38475 Author: Xiaofei Tan Date: Wed May 12 17:26:12 2021 +0800 tty: tty_buffer: Remove the repeated word 'the' Remove the repeated word 'the' following advice of checkpatch.pl Besides, add a period at the end of comment sentence. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-5-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 993c67b1fe44f340bb2aac970adca48a8c20daa9 Author: Xiaofei Tan Date: Wed May 12 17:26:11 2021 +0800 tty: tty_buffer: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-4-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit ad48749b98c7e2eeb75a2d55041ad7a59ac063e3 Author: Xiaofei Tan Date: Wed May 12 17:26:10 2021 +0800 tty: tty_baudrate: Fix coding style issues of block comments Fix coding style issues of block comments, reported by checkpatch.pl. Besides, add a period at the end of comment sentenses. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-3-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit eb460edb5f831c976144bc298564c14072860134 Author: Xiaofei Tan Date: Wed May 12 17:26:09 2021 +0800 tty: tty_baudrate: Remove unnecessary tab and spaces in comment sentence Remove unnecessary tab and spaces in comment sentence, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1620811585-18582-2-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 31a9a318255960d32ae183e95d0999daf2418608 Author: Christophe JAILLET Date: Sun May 9 19:22:33 2021 +0200 tty: nozomi: Fix a resource leak in an error handling function A 'request_irq()' call is not balanced by a corresponding 'free_irq()' in the error handling path, as already done in the remove function. Add it. Fixes: 9842c38e9176 ("kfifo: fix warn_unused_result") Reviewed-by: Jiri Slaby Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4f0d2b3038e82f081d370ccb0cade3ad88463fe7.1620580838.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 2fee8811219793cb16ed3f09b5629bb5c78e7dbb Author: Samo Pogačnik Date: Tue Apr 27 13:43:26 2021 +0200 ttyprintk: Removed unnecessary TTY ioctl callback It turns-out, that TIOCCONS is completely handled in tty_io.c, so the current local ioctl callback is of no real use. Signed-off-by: Samo Pogačnik Link: https://lore.kernel.org/r/1502946c760b1aae3ad9cffcf4ea3b9f37206585.camel@t-2.net Signed-off-by: Greg Kroah-Hartman commit bf3d6ab9bc1295fdf37cbc363ba9f7dfa14a84b8 Author: Samo Pogačnik Date: Tue Apr 27 13:40:51 2021 +0200 ttyprintk: Add TTY port shutdown callback By adding the TTY port shutdown callback, the final buffer flush has been moved from tpk_close() to tpk_port_shutdown(). This enables buffer flush upon close and hangup as well. The change also removes the specific 'buf == NULL' handling in tpk_printk(), which became useless. Signed-off-by: Samo Pogačnik Link: https://lore.kernel.org/r/f236ea26520fbef176fefec2e06a43548f63fa9c.camel@t-2.net Signed-off-by: Greg Kroah-Hartman commit 27dede097d2062252916c1c55ec0e04b027162b8 Author: Zihao Tang Date: Thu May 13 11:01:44 2021 +0800 tty: serial: sb1250-duart: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-13-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7d5a3ec537d9063bf4f1685a667d13a9e9196b85 Author: Zihao Tang Date: Thu May 13 11:01:43 2021 +0800 tty: serial: vr41xx_siu: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-12-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 933100787d6463e0d4ff634cbcd59b417d9c7e39 Author: Zihao Tang Date: Thu May 13 11:01:42 2021 +0800 tty: serial: sunzilog: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-11-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 4f1c658130728a6089c88d10626805535fdc063b Author: Zihao Tang Date: Thu May 13 11:01:41 2021 +0800 tty: serial: sunsu: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-10-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit d890c508769b05a589a4f197c45f74011679d580 Author: Zihao Tang Date: Thu May 13 11:01:40 2021 +0800 tty: serial: sunsab: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-9-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 10dab44f78dfa45bcd7862a887362355e522639d Author: Zihao Tang Date: Thu May 13 11:01:39 2021 +0800 tty: serial: txx9: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-8-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit ce6ff28069d8bf4141c9763d4edd64f5439f0982 Author: Zihao Tang Date: Thu May 13 11:01:38 2021 +0800 tty: serial: pmac_zilog: include insteiad of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-7-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit b1c92c121b77fc8e05a19f058a0b5ebfd95fee94 Author: Zihao Tang Date: Thu May 13 11:01:37 2021 +0800 tty: serial: mux: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-6-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3dccc357b7da16e5ce1e428bd5ebfa4d00e5a5d4 Author: Zihao Tang Date: Thu May 13 11:01:36 2021 +0800 tty: serial: ip22zilog: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-5-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0ebee1ebbc72c9706e5dc1df4f503e8876fd4ebe Author: Zihao Tang Date: Thu May 13 11:01:35 2021 +0800 tty: serial: icom: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-4-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 27bcf79b8adbdcda0abfa6bcbac59fdaf7ae7568 Author: Zihao Tang Date: Thu May 13 11:01:34 2021 +0800 tty: serial: dz: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-3-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 635b258962da2f0ab6d94f2bf9c31bcedc071adc Author: Zihao Tang Date: Thu May 13 11:01:33 2021 +0800 tty: serial: atmel: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620874904-39285-2-git-send-email-f.fangjian@huawei.com Signed-off-by: Greg Kroah-Hartman commit 76af233d9b0c0b749e97b8f90fd0ff0e417ce3e3 Author: Jiri Slaby Date: Mon May 10 08:59:22 2021 +0200 tty: remove unused tty_throttle The last user was removed in commit e91e52e42814 (n_tty: Fix stuck throttled driver) in 2013. So remove exported tty_throttle completely. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210510065923.5112-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 1bf42296634178b2435e2b313443864467bbb848 Author: Jiri Slaby Date: Wed May 5 11:19:26 2021 +0200 isdn: capi, drop useless pr_debugs capi have many pr_debugs in tty_operations hooks to print only a functions name. We have better debugging aids in the kernel many years now. So remove these useless pr_debugs. Signed-off-by: Jiri Slaby Cc: Karsten Keil Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20210505091928.22010-34-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 3e679e1da5ef01825df87d0ed96bef8cb2e39635 Author: Jiri Slaby Date: Wed May 5 11:19:25 2021 +0200 isdn: capi, remove optional tty ops break_ctl and set_ldisc are optional tty_operations hooks. Given capi does nothing useful in them, just remove these. Signed-off-by: Jiri Slaby Cc: Karsten Keil Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20210505091928.22010-33-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4da872befc83e65b106211272f18ff78a308ec97 Author: Jiri Slaby Date: Wed May 5 11:19:24 2021 +0200 tty: remove empty tty_operations::set_termios tty_operations::set_termios is optional. If it doesn't exist, nothing is called. So remove almost¹ empty set_termios implementations. ¹ capi had an useless pr_debug in it. Signed-off-by: Jiri Slaby Cc: Jeff Dike Cc: Richard Weinberger Cc: Karsten Keil Acked-By: Anton Ivanov Link: https://lore.kernel.org/r/20210505091928.22010-32-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4fb266e1976ed664252d172c4889c639abd53930 Author: Jiri Slaby Date: Wed May 5 11:19:23 2021 +0200 tty: remove empty tty_operations::flush_buffer tty_operations::flush_buffer is optional. If it doesn't exist, nothing is called. So remove almost¹ empty flush_buffer implementations. ¹ capi had an useless pr_debug in it. Signed-off-by: Jiri Slaby Cc: Karsten Keil Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Link: https://lore.kernel.org/r/20210505091928.22010-31-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 3d18354248b14a5ffefaa31a43fd0d45a283e97d Author: Jiri Slaby Date: Wed May 5 11:19:21 2021 +0200 nozomi: simplify ntty_chars_in_buffer ntty_chars_in_buffer is overly complicated. Simplify it by inverting the condition. Side FIXME: how can dc or port be NULL here? Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-29-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fff4ef17a9400fcd276b5c3a00ce5793f6c465e6 Author: Jiri Slaby Date: Wed May 5 11:19:19 2021 +0200 tty: make tty_operations::chars_in_buffer return uint tty_operations::chars_in_buffer is another hook which is expected to return values >= 0. So make it explicit by the return type too -- use unsigned int. Signed-off-by: Jiri Slaby Acked-By: Anton Ivanov Acked-by: David Sterba Cc: Jeff Dike Cc: Richard Weinberger Cc: Arnd Bergmann Cc: Samuel Iglesias Gonsalvez Cc: Jens Taprogge Cc: Karsten Keil Cc: Ulf Hansson Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: David Lin Cc: Johan Hovold Cc: Alex Elder Cc: Jiri Kosina Cc: Shawn Guo Cc: Sascha Hauer Cc: Oliver Neukum Cc: Felipe Balbi Cc: Mathias Nyman Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Link: https://lore.kernel.org/r/20210505091928.22010-27-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fa7501e57e9bf869cb6718a2699f05fc2807cbf1 Author: Jiri Slaby Date: Wed May 5 11:19:18 2021 +0200 tty: remove tty_operations::chars_in_buffer for non-buffering The only user of tty_ops::chars_in_buffer is tty_chars_in_buffer. And it considers tty_ops::chars_in_buffer optional. In case it's NULL, zero is returned. So remove all those chars_in_buffer from tty_ops which return zero. (Zero means such driver doesn't buffer.) Signed-off-by: Jiri Slaby Cc: Richard Henderson Acked-by: Max Filippov # xtensa Cc: Ivan Kokshaysky Cc: Matt Turner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Chris Zankel Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Link: https://lore.kernel.org/r/20210505091928.22010-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9a33fbf9d23034d7e89849c587b0aed0e4cf794d Author: Jiri Slaby Date: Wed May 5 11:19:17 2021 +0200 tty: make tty_buffer_space_avail return uint tty_buffer_space_avail returns values >= 0, so make it clear by the return type. Signed-off-by: Jiri Slaby Cc: Joel Stanley Link: https://lore.kernel.org/r/20210505091928.22010-25-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e633f33d2669cb54db2846f9cde08662d254dbd3 Author: Maximilian Luz Date: Tue May 4 20:48:13 2021 +0200 power: supply: surface_battery: Fix battery event handling The battery subsystem of the Surface Aggregator Module EC requires us to register the battery notifier with instance ID 0. However, battery events are actually sent with the instance ID corresponding to the device, which is nonzero. Thus, the strict-matching approach doesn't work here and will discard events that the driver is expected to handle. To fix this we have to fall back on notifier matching by target-category only and have to manually check the instance ID in the notifier callback. Fixes: 167f77f7d0b3 ("power: supply: Add battery driver for Surface Aggregator Module") Signed-off-by: Maximilian Luz Signed-off-by: Sebastian Reichel commit 2aac79d14d76879c8e307820b31876e315b1b242 Author: Zou Wei Date: Tue May 11 14:17:12 2021 +0800 power: supply: sc2731_charger: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Sebastian Reichel commit 603fcfb9d4ec1cad8d66d3bb37f3613afa8a661a Author: Zou Wei Date: Tue May 11 11:37:45 2021 +0800 power: supply: sc27xx: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Sebastian Reichel commit 5e9ae95736841391459e3d5e2609a2197343b039 Author: Krzysztof Kozlowski Date: Tue May 4 08:14:37 2021 -0400 MAINTAINERS: power: supply: use Krzysztof Kozlowski's Canonical address Switch to Canonical address in S3C power supply driver, just like in other entries. Cc: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 2253042d86f57d90a621ac2513a7a7a13afcf809 Author: Petr Pavlu Date: Thu May 13 14:26:36 2021 +0200 ipmi/watchdog: Stop watchdog timer when the current action is 'none' When an IPMI watchdog timer is being stopped in ipmi_close() or ipmi_ioctl(WDIOS_DISABLECARD), the current watchdog action is updated to WDOG_TIMEOUT_NONE and _ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB) is called to install this action. The latter function ends up invoking __ipmi_set_timeout() which makes the actual 'Set Watchdog Timer' IPMI request. For IPMI 1.0, this operation results in fully stopping the watchdog timer. For IPMI >= 1.5, function __ipmi_set_timeout() always specifies the "don't stop" flag in the prepared 'Set Watchdog Timer' IPMI request. This causes that the watchdog timer has its action correctly updated to 'none' but the timer continues to run. A problem is that IPMI firmware can then still log an expiration event when the configured timeout is reached, which is unexpected because the watchdog timer was requested to be stopped. The patch fixes this problem by not setting the "don't stop" flag in __ipmi_set_timeout() when the current action is WDOG_TIMEOUT_NONE which results in stopping the watchdog timer. This makes the behaviour for IPMI >= 1.5 consistent with IPMI 1.0. It also matches the logic in __ipmi_heartbeat() which does not allow to reset the watchdog if the current action is WDOG_TIMEOUT_NONE as that would start the timer. Signed-off-by: Petr Pavlu Message-Id: <10a41bdc-9c99-089c-8d89-fa98ce5ea080@suse.com> Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit 2c5ff2caa4f8164e93a9bf035af9a2ad87cad9f2 Author: Wei Ming Chen Date: Thu May 6 20:20:20 2021 +0800 docs: usb: function: Modify path name Original path does not exists, so changed to "Documentation/ABI/testing/configfs-usb-gadget" Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210506122020.7117-1-jj251510319013@gmail.com Signed-off-by: Jonathan Corbet commit 1e886090cefe26113122a7d59a36a9aec492fef5 Author: Rasmus Villemoes Date: Tue Apr 20 14:06:38 2021 +0200 docs: admin-guide: update description for kernel.hotplug sysctl It's been a few releases since this defaulted to /sbin/hotplug. Update the text, and include pointers to the two CONFIG_UEVENT_HELPER{,_PATH} config knobs whose help text could provide more info, but also hint that the user probably doesn't need to care at all. Fixes: 7934779a69f1 ("Driver-Core: disable /sbin/hotplug by default") Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210420120638.1104016-1-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Corbet commit c70360c3343f975bd066b6b98159d93f1bd4219f Author: Jules Irenge Date: Thu Apr 29 00:12:19 2021 +0100 rcu: Add missing __releases() annotation Sparse reports a warning at rcu_print_task_stall(): "warning: context imbalance in rcu_print_task_stall - unexpected unlock" The root cause is a missing annotation on rcu_print_task_stall(). This commit therefore adds the missing __releases(rnp->lock) annotation. Signed-off-by: Jules Irenge Signed-off-by: Paul E. McKenney commit 0223846010750e28e4330f1beefb5564ba406ef7 Author: Paul E. McKenney Date: Thu Apr 29 11:30:49 2021 -0700 rcu: Remove obsolete rcu_read_unlock() deadlock commentary The deferred quiescent states resulting from the consolidation of RCU-bh and RCU-sched into RCU means that rcu_read_unlock() will no longer attempt to acquire scheduler locks if interrupts were disabled across that call to rcu_read_unlock(). The cautions in the rcu_read_unlock() header comment are therefore obsolete. This commit therefore removes them. Signed-off-by: Paul E. McKenney commit 1893afd63409111c6edcee9d6e1196fc06cf4fd7 Author: Paul E. McKenney Date: Thu Apr 29 11:18:01 2021 -0700 rcu: Improve comments describing RCU read-side critical sections There are a number of places that call out the fact that preempt-disable regions of code now act as RCU read-side critical sections, where preempt-disable regions of code include irq-disable regions of code, bh-disable regions of code, hardirq handlers, and NMI handlers. However, someone relying solely on (for example) the call_rcu() header comment might well have no idea that preempt-disable regions of code have RCU semantics. This commit therefore updates the header comments for call_rcu(), synchronize_rcu(), rcu_dereference_bh_check(), and rcu_dereference_sched_check() to call out these new(ish) forms of RCU readers. Reported-by: Michel Lespinasse [ paulmck: Apply Matthew Wilcox and Michel Lespinasse feedback. ] Signed-off-by: Paul E. McKenney commit 76c8eaafe4f061f3790112842a2fbb297e4bea88 Author: Paul E. McKenney Date: Wed Apr 21 14:30:54 2021 -0700 rcu: Create an unrcu_pointer() to remove __rcu from a pointer The xchg() and cmpxchg() functions are sometimes used to carry out RCU updates. Unfortunately, this can result in sparse warnings for both the old-value and new-value arguments, as well as for the return value. The arguments can be dealt with using RCU_INITIALIZER(): old_p = xchg(&p, RCU_INITIALIZER(new_p)); But a sparse warning still remains due to assigning the __rcu pointer returned from xchg to the (most likely) non-__rcu pointer old_p. This commit therefore provides an unrcu_pointer() macro that strips the __rcu. This macro can be used as follows: old_p = unrcu_pointer(xchg(&p, RCU_INITIALIZER(new_p))); Reported-by: Toke Høiland-Jørgensen Signed-off-by: Paul E. McKenney commit a5afc7605b2ae7fb95be9b94e85179bc4c8aaee4 Author: Sebastian Reichel Date: Tue Apr 13 01:03:18 2021 +0200 dt-bindings: power: supply: charger-manager: Convert to DT schema format Convert the binding to DT schema format. I slightly modified the binding by allowing regulator-[0-9] and cable-[0-9] instead of regulator@[0-9] and cable@[0-9], so that DT compiler does not complain about missing 'reg' property. The driver actually ignores the nodename and can handle both styles. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 3e42d1de020805ff3f7d854e1cff742d14e158f5 Author: Carlos Bilbao Date: Thu May 13 09:31:10 2021 -0400 docs: typo fixes in Documentation/ABI/ Fix the following typos in the Documentation/ABI/ directory: - In file obsolete/sysfs-cpuidle, change "obselete" for "obsolete". - In file removed/sysfs-kernel-uids, change "propotional" for "proportional". - In directory stable/, fix the following words: "associtated" for "associated", "hexidecimal" for "hexadecimal", "vlue" for "value", "csed" for "caused" and "wrtie" for "write". This updates a total of five files. - In directory testing/, fix the following words: "subystem" for "subsystem", "isochrnous" for "isochronous", "Desctiptors" for "Descriptors", "picutre" for "picture", "capture" for "capture", "occured" for "ocurred", "connnected" for "connected","agressively" for "aggressively","manufacturee" for "manufacturer" and "transaction" for "transaction", "malformatted" for "incorrectly formated" ,"internel" for "internal", "writtento" for "written to", "specificed" for "specified", "beyound" for "beyond", "Symetric" for "Symmetric". This updates a total of eleven files. Signed-off-by: Carlos Bilbao Reviewed-by: Randy Dunlap Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5710038.lOV4Wx5bFT@iron-maiden Signed-off-by: Jonathan Corbet commit 03b3b1a2405ccd71570cd5ec1fe4abd7bb4891cb Author: Jiri Slaby Date: Wed May 5 11:19:15 2021 +0200 tty: make tty_operations::write_room return uint Line disciplines expect a positive value or zero returned from tty->ops->write_room (invoked by tty_write_room). So make this assumption explicit by using unsigned int as a return value. Both of tty->ops->write_room and tty_write_room. Signed-off-by: Jiri Slaby Acked-by: Laurentiu Tudor Acked-by: Alex Elder Acked-by: Max Filippov # xtensa Acked-by: David Sterba Acked-By: Anton Ivanov Acked-by: Geert Uytterhoeven Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Jeff Dike Cc: Richard Weinberger Cc: Chris Zankel Cc: Arnd Bergmann Cc: Samuel Iglesias Gonsalvez Cc: Jens Taprogge Cc: Karsten Keil Cc: Scott Branden Cc: Ulf Hansson Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: David Lin Cc: Johan Hovold Cc: Jiri Kosina Cc: Shawn Guo Cc: Sascha Hauer Cc: Oliver Neukum Cc: Felipe Balbi Cc: Mathias Nyman Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Link: https://lore.kernel.org/r/20210505091928.22010-23-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0f29b503bd0b48ec6f14243f3626ac411c879555 Author: Jiri Slaby Date: Wed May 5 11:19:14 2021 +0200 ti-st: use tty_write_room Don't access tty->ops->write_room directly, use tty_write_room helper instead. Signed-off-by: Jiri Slaby Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20210505091928.22010-22-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 303e8ebf5dcb802b016b2802825dbc7928f9a50a Author: Jiri Slaby Date: Wed May 5 11:19:13 2021 +0200 ti-st: use goto-failpath in st_core_init Use the classic failpath handling using gotos in st_core_init. That way, tty_unregister_ldisc needs not be repeated on two places. Signed-off-by: Jiri Slaby Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20210505091928.22010-21-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f6f19595a7efdaa0c196d7fa2b343b5588f94470 Author: Jiri Slaby Date: Wed May 5 11:19:12 2021 +0200 tty: return void from tty_unregister_ldisc Now that noone checks the return value of tty_unregister_ldisc, make the function return 'void'. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-20-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 357a6a875f1c4772f2102639bf19619780889f31 Author: Jiri Slaby Date: Wed May 5 11:19:11 2021 +0200 tty: no checking of tty_unregister_ldisc tty_unregister_ldisc now returns 0 = success. No need to check the return value. In fact, the users only warned if an error occured and didn't do anything useful anyway -- the ldisc module was unloaded in any case. Signed-off-by: Jiri Slaby Cc: William Hubbs Cc: Chris Brannon Cc: Kirk Reiser Cc: Samuel Thibault Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: Arnd Bergmann Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Andreas Koensgen Cc: Paul Mackerras Cc: Rodolfo Giometti Cc: Peter Ujfalusi Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Link: https://lore.kernel.org/r/20210505091928.22010-19-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 19475209331168cdb8070a011650535f1c54a730 Author: Jiri Slaby Date: Wed May 5 11:19:10 2021 +0200 tty: drop tty_ldisc_ops::refcount The refcount is checked only in tty_unregister_ldisc and EBUSY returned if it is nonzero. But none of the tty_unregister_ldisc callers act anyhow if this (or any other) error is returned. So remove tty_ldisc_ops::refcount completely and make tty_unregister_ldisc return 'void' in the next patches. That means we assume tty_unregister_ldisc is not called while the ldisc might be in use. That relies on try_module_get in get_ldops and module_put in put_ldops. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-18-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f81ee8b8b8421dc06d13f197bb53191559cc51da Author: Jiri Slaby Date: Wed May 5 11:19:09 2021 +0200 tty: make tty_ldisc_ops a param in tty_unregister_ldisc Make tty_unregister_ldisc symmetric to tty_register_ldisc by accepting struct tty_ldisc_ops as a parameter instead of ldisc number. This avoids checking of the ldisc number bounds in tty_unregister_ldisc. Signed-off-by: Jiri Slaby Cc: William Hubbs Cc: Chris Brannon Cc: Kirk Reiser Cc: Samuel Thibault Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: Dmitry Torokhov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: Andreas Koensgen Cc: Paul Mackerras Cc: Rodolfo Giometti Cc: Peter Ujfalusi Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Link: https://lore.kernel.org/r/20210505091928.22010-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 839e0f226d1c1d216ac3841b4710810080392c16 Author: Jiri Slaby Date: Wed May 5 11:19:08 2021 +0200 n_gsm: use goto-failpaths in gsm_init Use the classic failpath handling using gotos in gsm_init. That way, tty_unregister_ldisc needs not be repeated on two places. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fbadf70a8053b3dce78a45997ae55651693a2a81 Author: Jiri Slaby Date: Wed May 5 11:19:07 2021 +0200 tty: set tty_ldisc_ops::num statically There is no reason to pass the ldisc number to tty_register_ldisc separately. Just set it in the already defined tty_ldisc_ops in all the ldiscs. This simplifies tty_register_ldisc a bit too (no need to set the num member there). Signed-off-by: Jiri Slaby Cc: William Hubbs Cc: Chris Brannon Cc: Kirk Reiser Cc: Samuel Thibault Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: Dmitry Torokhov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: Andreas Koensgen Cc: Paul Mackerras Cc: Rodolfo Giometti Cc: Peter Ujfalusi Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Link: https://lore.kernel.org/r/20210505091928.22010-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 64d608db38ffc0c7a25455387096e0aad9410397 Author: Jiri Slaby Date: Wed May 5 11:19:06 2021 +0200 tty: cumulate and document tty_struct::ctrl* members Group the ctrl members under a single struct called ctrl. The new struct contains 'pgrp', 'session', 'pktstatus', and 'packet'. 'pktstatus' and 'packet' used to be bits in a bitfield. The struct also contains the lock protecting them to share the same cache line. Note that commit c545b66c6922b (tty: Serialize tcflow() with other tty flow control changes) added a padding to the original bitfield. It was for the bitfield to occupy a whole 64b word to avoid interferring stores on Alpha (cannot we evaporate this arch with weird implications to C code yet?). But it doesn't work as expected as the padding (tty_struct::ctrl_unused) is aligned to a 8B boundary too and occupies some bytes from the next word. So make it reliable by: 1) setting __aligned of the struct -- that aligns the start, and 2) making 'unsigned long unused[0]' as the last member of the struct -- pads the end. Add a kerneldoc comment for this grouped members. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20210505091928.22010-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6e94dbc7a4e49a028b81302d755bba1a518f973b Author: Jiri Slaby Date: Wed May 5 11:19:05 2021 +0200 tty: cumulate and document tty_struct::flow* members Group the flow flags under a single struct called flow. The new struct contains 'stopped' and 'tco_stopped' bools which used to be bits in a bitfield. The struct also contains the lock protecting them to potentially share the same cache line. Note that commit c545b66c6922b (tty: Serialize tcflow() with other tty flow control changes) added a padding to the original bitfield. It was for the bitfield to occupy a whole 64b word to avoid interferring stores on Alpha (cannot we evaporate this arch with weird implications to C code yet?). But it doesn't work as expected as the padding (tty_struct::unused) is aligned to a 8B boundary too and occupies some bytes from the next word. So make it reliable by: 1) setting __aligned of the struct -- that aligns the start, and 2) making 'unsigned long unused[0]' as the last member of the struct -- pads the end. This is also the perfect time to start the documentation of tty_struct where all this lives. So we start by documenting what these bools actually serve for. And why we do all the alignment dances. Only the few up-to-date information from the Theodore's comment made it into this new Kerneldoc comment. Signed-off-by: Jiri Slaby Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Jonathan Corbet Cc: Arnd Bergmann Cc: Ulf Hansson Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Shawn Guo Cc: Sascha Hauer Cc: Vineet Gupta Cc: "Maciej W. Rozycki" Link: https://lore.kernel.org/r/20210505091928.22010-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0f3dcf3b5d76669123bf99fec812b8b0acd60375 Author: Jiri Slaby Date: Wed May 5 11:19:04 2021 +0200 tty: make fp of tty_ldisc_ops::receive_buf{,2} const Char pointer (cp) passed to tty_ldisc_ops::receive_buf{,2} is const. There is no reason for flag pointer (fp) not to be too. So switch it in the definition and all uses. Signed-off-by: Jiri Slaby Cc: William Hubbs Cc: Chris Brannon Cc: Kirk Reiser Cc: Samuel Thibault Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: Dmitry Torokhov Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: Andreas Koensgen Cc: Paul Mackerras Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Peter Ujfalusi Link: https://lore.kernel.org/r/20210505091928.22010-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fc0df90b781145525c8d4ccaeccb6dcb8f810ce7 Author: Jiri Slaby Date: Wed May 5 11:19:03 2021 +0200 n_tty: remove superfluous return from n_tty_receive_signal_char A return at the end of a void-returning function is superfluous. Get rid of it. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e8f2a139ffb600f47c3ddb286e5bd9a71041c35a Author: Jiri Slaby Date: Wed May 5 11:19:02 2021 +0200 n_tty: invert TTY_NORMAL condition in n_tty_receive_buf_standard Handle !TTY_NORMAL as a short path and 'continue' the loop. Do the rest as a normal code flow. This decreases the indentation level by one and makes the code flow more understandable. IOW, we avoid if (cond) { LONG CODE; } else single_line(); by if (!cond) { single_line(); continue; } LONG CODE; While at it, invert also the 'if (!test_bit) A else B' into 'if (test_bit) B else A'. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 3a7d530a0cf9b82fce3596627259a67c511ec917 Author: Jiri Slaby Date: Wed May 5 11:19:01 2021 +0200 n_tty: do only one cp dereference in n_tty_receive_buf_standard It might be confusing for readers: there are three distinct dereferences and increments of 'cp' in n_tty_receive_buf_standard. Do it on a single place, along with/before the 'fp' dereference. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 16765365a062f6d25d087cdd0fca3e01c9a03403 Author: Jiri Slaby Date: Wed May 5 11:19:00 2021 +0200 n_tty: make n_tty_receive_char_special return void After the previous patch, noone cares about the return value of n_tty_receive_char_special. ldata->lnext is checked instead. So switch return type of n_tty_receive_char_special to void. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 67a620d58b47b6683da7f8152baa4384f74b19f8 Author: Jiri Slaby Date: Wed May 5 11:18:59 2021 +0200 n_tty: move lnext handling Move lnext handling from __receive_buf to n_tty_receive_buf_standard. It simplifies the handling as it needs not fetching 'flag' and decrement 'count' in __receive_buf. Instead, all this is left up to the loop in n_tty_receive_buf_standard which already does that. This way, no need to repeat the action when n_tty_receive_char_special returns true -- ldata->lnext is set there in that case, so the 'if (ldata->lnext)' check is sufficient. The next patch will switch n_tty_receive_char_special to return 'void'. The result is much simplified code flow. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 95aafe3278e7f16910eeef59c0664b1d23dcdda0 Author: Jiri Slaby Date: Wed May 5 11:18:58 2021 +0200 n_tty: drop parmrk_dbl from n_tty_receive_char After the previous cleanup patches, parmrk_dbl parameter is always true -- I_PARMRK is checked only in n_tty_receive_char now. So remove parmrk_dbl completely. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 1ed2dfedd215def180351697f5b4bcde468c5197 Author: Jiri Slaby Date: Wed May 5 11:18:57 2021 +0200 n_tty: drop n_tty_receive_buf_fast After the previous patches, n_tty_receive_buf_standard and n_tty_receive_buf_fast differ only in handling of tty line and input controls. Unlike n_tty_receive_buf_fast, n_tty_receive_buf_standard handles them all (I_ISTRIP, I_IUCLC, L_IEXTEN, L_EXTPROC, and I_PARMRK). So remove n_tty_receive_buf_fast and let n_tty_receive_buf_standard do the handling. Actually most of the tests are only moved from __receive_buf to n_tty_receive_buf_standard. Again, the code duplication is not worth the theoretical speedup. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 89bb4a3622f99ea736eab185db9b46b4fa4c29c0 Author: Jiri Slaby Date: Wed May 5 11:18:56 2021 +0200 n_tty: remove n_tty_receive_char_fast n_tty_receive_char_fast is a copy of n_tty_receive_char with one exception: PARMRK is not doubled in the former. Unify these two and double PARMRK depending on a newly added parameter (bool parmrk_dbl). I don't think the theoretical speedup is worth the code duplication. Which is directly connected with maintenance burden. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7fb8a8affdf1971e89b5977e074e402190dcd6dc Author: Jiri Slaby Date: Wed May 5 11:18:55 2021 +0200 n_tty: remove n_tty_receive_char wrapper The wrapper was meant as an optimization in commits eb3e4668bd9e (n_tty: Un-inline slow-path n_tty_receive_char()) and e60d27c4d8b3 (n_tty: Factor LNEXT processing from per-char i/o path). But the current compiler (gcc 10) inlines it anyway (as expected). Actually, I'm not sure it ever didn't. It would need to be marked with the noinline attribute. So remove this useless wrapper. And if we ever introduce something similar, we need confirming numbers first. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ed5aecd3da2eabd8a6c9f5593df2c4f00985fca2 Author: Jiri Slaby Date: Wed May 5 11:18:54 2021 +0200 tty: remove broken r3964 line discipline Noone stepped up in the past two years since it was marked as BROKEN by commit c7084edc3f6d (tty: mark Siemens R3964 line discipline as BROKEN). Remove the line discipline for good. Three remarks: * we remove also the uapi header (as noone is able to use that interface anyway) * we do *not* remove the N_R3964 constant definition from tty.h, so it remains reserved. * in_interrupt() check is now removed from vt's con_put_char. Noone else calls tty_operations::put_char from interrupt context. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210505091928.22010-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d7e325aaa8c3593b5a572b583ecad79e95f32e7f Author: Dan Carpenter Date: Thu Apr 29 10:19:22 2021 +0300 serial: 8250_omap: fix a timeout loop condition This loop ends on -1 so the error message will never be printed. Fixes: 4bcf59a5dea0 ("serial: 8250: 8250_omap: Account for data in flight during DMA teardown") Reviewed-by: Alexander Sverdlin Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YIpd+kOpXKMpEXPf@mwanda Signed-off-by: Greg Kroah-Hartman commit 26f7591632d74f637f346f5d642d8ebe6b433fc9 Author: Christophe JAILLET Date: Wed Apr 28 09:30:52 2021 +0200 serial: 8250: Add an empty line and remove some useless {} This fixes the following checkpatch.pl warnings: WARNING: Missing a blank line after declarations WARNING: braces {} are not necessary for any arm of this statement Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/257ffd691b4a062ad017333c9430d69da6dbd29a.1619594713.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 89e78001295cb9eb0e86ae15b46cbbc0e45e2c8d Author: Christophe JAILLET Date: Wed Apr 28 09:30:40 2021 +0200 serial: 8250: Use 'hlist_for_each_entry' to simplify code Use 'hlist_for_each_entry' instead of hand writing it. This saves a few lines of code. The comment about warning generated by some gcc version is also removed. The way 'hlist_for_each_entry' is written should prevent such a warning to be emitted. Reviewed-by: Andy Shevchenko Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/14024ddeb2b3a8c5b0138b5ba5083f54d00164a9.1619594713.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 021212f5335229ed12e3d31f9b7d30bd3bb66f7d Author: Colin Ian King Date: Mon Apr 26 11:11:06 2021 +0100 serial: meson: remove redundant initialization of variable id The variable id being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Since id is just being used in a for-loop inside a local scope, move the declaration of id to that scope. Reviewed-by: Kevin Hilman Reviewed-by: Martin Blumenstingl Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210426101106.9122-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit f5b08386dee439c7a9e60ce0a4a4a705f3a60dff Author: Jim Quinlan Date: Fri Apr 23 11:32:04 2021 -0700 serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271 Our SoC's have always had a NS16650A UART core and older SoC's would have a compatible string of: 'compatible = ""ns16550a"' and use the 8250_of driver. Our newer SoC's have added enhancements to the base core to add support for DMA and accurate high speed baud rates and use this newer 8250_bcm7271 driver. The Device Tree node for our enhanced UARTs has a compatible string of: 'compatible = "brcm,bcm7271-uart", "ns16550a"''. With both drivers running and the link order setup so that the 8250_bcm7217 driver is initialized before the 8250_of driver, we should bind the 8250_bcm7271 driver to the enhanced UART, or for upstream kernels that don't have the 8250_bcm7271 driver, we bind to the 8250_of driver. The problem is that when both the 8250_of and 8250_bcm7271 drivers were running, occasionally the 8250_of driver would be bound to the enhanced UART instead of the 8250_bcm7271 driver. This was happening because we use SCMI based clocks which come up late in initialization and cause probe DEFER's when the two drivers get their clocks. Occasionally the SCMI clock would become ready between the 8250_bcm7271 probe and the 8250_of probe and the 8250_of driver would be bound. To fix this we decided to config only our 8250_bcm7271 driver and added "ns16665a0" to the compatible string so the driver would work on our older system. This commit has of_platform_serial_probe() check specifically for the "brcm,bcm7271-uart" and whether its companion driver is enabled. If it is the case, and the clock provider is not ready, we want to make sure that when the 8250_bcm7271.c driver returns EPROBE_DEFER, we are not getting the UART registered via 8250_of.c. Reviewed-by: Andy Shevchenko Signed-off-by: Jim Quinlan Signed-off-by: Al Cooper Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20210423183206.3917725-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71581242164f112520025ad465cba48c52f65bd1 Author: Colin Ian King Date: Fri Apr 23 09:13:17 2021 +0100 serial: qcom_geni_serial: redundant initialization to variable line The variable line being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Reviewed-by: Jiri Slaby Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210423081317.318352-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit e27671f66321f97b62424aebacd6d9b678b0c5be Author: Zhen Lei Date: Thu May 6 21:20:49 2021 +0800 dt-bindings: serial: Add label property in serial.yaml When there is more than one serial port present, the property 'label' allows a custom name to be used for briefly describe the usage or position of each serial port. Without this "label" property, many dtbs_check warnings similar to the following are reported: arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \ serial@ffd74000: Additional properties are not allowed ('label' was unexpected) From schema: Documentation/devicetree/bindings/serial/pl011.yaml Reviewed-by: Rob Herring Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210506132049.1513-3-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8f082dcf2c3dadef0fd118207d47215c917b8a1e Author: Zhen Lei Date: Thu May 6 21:20:48 2021 +0800 dt-bindings: serial: Change to reference the kernel-defined serial.yaml The /schemas/serial.yaml from dt-schema only has the property $nodename, whereas the kernel-defined /schemas/serial/serial.yaml contains more useful properties, support for more complex application scenarios. For example: 1) The property "current-speed" in fsl-lx2160a.dtsi 2) The subnode "bluetooth" in hi3660-hikey960.dts Reviewed-by: Rob Herring Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210506132049.1513-2-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 54da3e381c2b55289b220601f403f17df7b20597 Author: Zev Weiss Date: Sun May 9 20:42:31 2021 -0500 serial: 8250_aspeed_vuart: use UPF_IOREMAP to set up register mapping Previously this driver's use of devm_ioremap_resource() led to duplicated calls to __release_region() when unbinding it (one from serial8250_release_std_resource() and one from devres_release_all()), the second of which resulted in a warning message: # echo 1e787000.serial > /sys/bus/platform/drivers/aspeed-vuart/unbind [33091.774200] Trying to free nonexistent resource <000000001e787000-000000001e78703f> With this change the driver uses the generic serial8250 code's UPF_IOREMAP to take care of the register mapping automatically instead of doing its own devm_ioremap_resource(), thus avoiding the duplicate __release_region() on unbind. In doing this we eliminate vuart->regs, since it merely duplicates vuart->port->port.membase, which we now use for our I/O accesses. Reported-by: Andrew Jeffery Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210510014231.647-4-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit c9805fbf9d89c32c7ea4a6c5c3a66244aab06584 Author: Zev Weiss Date: Sun May 9 20:42:30 2021 -0500 serial: 8250_aspeed_vuart: initialize vuart->port in aspeed_vuart_probe() Previously this had only been initialized if we hit the throttling path in aspeed_vuart_handle_irq(); moving it to the probe function is a slight consistency improvement and avoids redundant reinitialization in the interrupt handler. It also serves as preparation for converting the driver's I/O accesses to use port->port.membase instead of its own vuart->regs. Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210510014231.647-3-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit 991a350dff134d8e23bebc36ec16304bbd16f85f Author: Zev Weiss Date: Sun May 9 20:42:29 2021 -0500 serial: 8250_aspeed_vuart: factor out aspeed_vuart_{read, write}b() helper functions This is a small prepatory step for changing the way this driver does its I/O accesses. Reviewed-by: Andrew Jeffery Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210510014231.647-2-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit 0733d83905326baef3c25d8bd9a96fdc9eb71b86 Author: Shawn Guo Date: Sun Apr 25 10:00:24 2021 +0800 firmware: replace HOTPLUG with UEVENT in FW_ACTION defines With commit 312c004d36ce ("[PATCH] driver core: replace "hotplug" by "uevent"") already in the tree over a decade, update the name of FW_ACTION defines to follow semantics, and reflect what the defines are really meant for, i.e. whether or not generate user space event. Acked-by: Lee Jones Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210425020024.28057-1-shawn.guo@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7a9a2363d7eebb3494653a3aa903198991494cd3 Author: Tian Tao Date: Tue Apr 27 08:49:35 2021 +0800 tty: serial: samsung_tty: remove set but not used variables The value of 'ret' is not used which reported by svace, so just return instead of break. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1619484575-26098-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit 8cac2f6eb8548245e6f8fb893fc7f2a714952654 Author: Michael Walle Date: Wed May 12 16:12:55 2021 +0200 serial: fsl_lpuart: disable DMA for console and fix sysrq SYSRQ doesn't work with DMA. This is because there is no error indication whether a symbol had a framing error or not. Actually, this is not completely correct, there is a bit in the data register which is set in this case, but we'd have to read change the DMA access to 16 bit and we'd need to post process the data, thus make the DMA pointless in the first place. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-10-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit 8a0c810d94f02d7aa2074658ee6d0ec0a39f0555 Author: Michael Walle Date: Wed May 12 16:12:54 2021 +0200 serial: fsl_lpuart: add loopback support The LPUART can loop the RX and TX signal. Add support for it. Please note, this was only tested on the 32 bit version of the LPUART. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-9-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit fa3540735425cb7f95a8d83e74dfdc84170d139b Author: Michael Walle Date: Wed May 12 16:12:53 2021 +0200 serial: fsl_lpuart: remove manual RTSCTS control from 8-bit LPUART The LPUART doesn't have the ability to control the RTS or CTS line manually. Instead it will set it automatically when data is send or handle it when data is received. Thus drop the wrong code in set_mctrl. For the 32 bit version this was already done in the commit 2b30efe2e88a ("tty: serial: lpuart: Remove unnecessary code from set_mctrl"). Keep the 8-bit version in sync and remove it there, too. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-8-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit e60c2991f18bf221fa9908ff10cb24eaedaa9bae Author: Michael Walle Date: Wed May 12 16:12:52 2021 +0200 serial: fsl_lpuart: remove RTSCTS handling from get_mctrl() The wrong code in set_mctrl() was already removed in commit 2b30efe2e88a ("tty: serial: lpuart: Remove unnecessary code from set_mctrl"), but the code in get_mctrl() wasn't removed. It will not return the state of the RTS or CTS line but whether automatic flow control is enabled, which is wrong for the get_mctrl(). Thus remove it. Fixes: 2b30efe2e88a ("tty: serial: lpuart: Remove unnecessary code from set_mctrl") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-7-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit 5541a9bacfe54fb2038531fb276724fcec6c29c4 Author: Michael Walle Date: Wed May 12 16:12:51 2021 +0200 serial: fsl_lpuart: handle break and make sysrq work Although there is already sysrq characters handling, a break condition was never detected. Add support for it. The LPUART can't distinguish between a framing error and a break condition. We assume it is a break if the received data is all zero. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-6-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit 5697df7322fe0a95e56393f63ca8e0f256be92f9 Author: Michael Walle Date: Wed May 12 16:12:50 2021 +0200 serial: fsl_lpuart: split sysrq handling Instead of uart_handle_sysrq_char() use uart_prepare_sysrq_char() and uart_unlock_and_check_sysrq(). This will call handle_sysrq() without holding the port lock, which in turn let us drop the spin_trylock hack. Suggested-by: Johan Hovold Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-5-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit 0d84f62220eda0eb167b01433f5ce8ebf51654a8 Author: Michael Walle Date: Wed May 12 16:12:49 2021 +0200 serial: fsl_lpuart: don't restore interrupt state in ISR >From commit 75f4e830fa9c ("serial: do not restore interrupt state in sysrq helper"): Since commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers") interrupt handlers that are not explicitly requested as threaded are always called with interrupts disabled and there is no need to save the interrupt state when taking the port lock. Apply this also to fsl_lpuart in prepartion for sysrq handling with uart_unlock_and_check_sysrq(). Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-4-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit ec22c3eec5439fb012a41d49b015c13ca9b91b6c Author: Michael Walle Date: Wed May 12 16:12:48 2021 +0200 serial: fsl_lpuart: use UARTDATA_MASK macro Use the corresponding macro instead of the magic number. While at it, drop the useless cast to "unsigned char". Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-3-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit ccf08fd1204bcb5311cc10aea037c71c6e74720a Author: Michael Walle Date: Wed May 12 16:12:47 2021 +0200 serial: fsl_lpuart: don't modify arbitrary data on lpuart32 lpuart_rx_dma_startup() is used for both the 8 bit and the 32 bit version of the LPUART. Modify the UARTCR only for the 8 bit version. Fixes: f4eef224a09f ("serial: fsl_lpuart: add sysrq support when using dma") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-2-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit fcb10ee27fb91b25b68d7745db9817ecea9f1038 Author: Sherry Sun Date: Tue Apr 27 10:12:26 2021 +0800 tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero We should be very careful about the register values that will be used for division or modulo operations, althrough the possibility that the UARTBAUD register value is zero is very low, but we had better to deal with the "bad data" of hardware in advance to avoid division or modulo by zero leading to undefined kernel behavior. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20210427021226.27468-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 52008ebd62adc4f7da2518d638555c765c63388e Author: Liang Chen Date: Thu Apr 29 16:11:43 2021 +0800 dt-bindings: serial: snps-dw-apb-uart: add description for rk3568 add "rockchip,rk3568-uart", "snps,dw-apb-uart" for uart nodes on a rk3568 platform to snps-dw-apb-uart.yaml. Signed-off-by: Liang Chen Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210429081151.17558-3-cl@rock-chips.com Signed-off-by: Greg Kroah-Hartman commit 216e0e563d81ff9a16627b3d95cbfe5fa88153d7 Author: Li Jun Date: Sat May 8 13:33:59 2021 +0800 usb: core: hcd: use map_urb_for_dma for single step set feature urb Use map_urb_for_dma() to improve the dma map code for single step set feature request urb in test mode. Signed-off-by: Li Jun Acked-by: Alan Stern Link: https://lore.kernel.org/r/1620452039-11694-3-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit cbbc07e1e892c373f30f4ba08fedecd49afca247 Author: Peter Chen Date: Sat May 8 13:33:57 2021 +0800 usb: host: move EH SINGLE_STEP_SET_FEATURE implementation to core It is needed at USB Certification test for Embedded Host 2.0, and the detail is at CH6.4.1.1 of On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification. Since other USB 2.0 capable host like XHCI also need it, so move it to HCD core. Acked-by: Alan Stern Signed-off-by: Peter Chen Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1620452039-11694-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 9e8d268f831b87891202e8566a0f9acc7adbbc5c Author: Yang Yingliang Date: Thu May 13 13:05:44 2021 +0800 USB: gadget: udc: s3c2410_udc: s3c2410_udc_set_ep0_ss() can be static s3c2410_udc_set_ep0_ss() only used within this file. It should be static. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210513050544.625824-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 457d22850b27de3aea336108272d08602c55fdf7 Author: Raymond Tan Date: Wed May 12 16:59:01 2021 +0300 usb: dwc3: pci: Fix DEFINE for Intel Elkhart Lake There's no separate low power (LP) version of Elkhart Lake, thus this patch updates the PCI Device ID DEFINE to indicate this. Acked-by: Felipe Balbi Signed-off-by: Raymond Tan Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210512135901.28495-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0ff9bf9f3e0ce212aabea84365575466039e8c46 Author: Colin Ian King Date: Wed May 12 21:30:51 2021 +0100 drm: simpledrm: Fix use after free issues There are two occurrances where objects are being free'd via a put call and yet they are being referenced after this. Fix these by adding in the missing continue statement so that the put on the end of the loop is skipped over. Signed-off-by: Colin Ian King Signed-off-by: Thomas Zimmermann Addresses-Coverity: ("Use after free") Fixes: 11e8f5fd223b ("drm: Add simpledrm driver") Link: https://patchwork.freedesktop.org/patch/msgid/20210512203051.299026-1-colin.king@canonical.com commit 858aa5a4be22368f8d0e8ace7dc0b5ffb62bbdbc Author: Zou Wei Date: Thu May 13 16:46:04 2021 +0800 drm/aperture: Fix missing unlock on error in devm_aperture_acquire() Add the missing unlock before return from function devm_aperture_acquire() in the error handling case. Signed-off-by: Zou Wei Signed-off-by: Thomas Zimmermann Reported-by: Hulk Robot Fixes: 730e7992dc1b ("drm/aperture: Add infrastructure for aperture ownership") Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Maxime Ripard Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/1620895564-52367-1-git-send-email-zou_wei@huawei.com commit d84680d359378a79664fa840cd144ba0f715968d Author: Randy Dunlap Date: Wed May 12 16:34:59 2021 -0700 drm: simpledrm: print resource info using '%pr' struct resource start and end fields are not always long long, so using %llx to print them can cause build warnings (below). Fix these by using the special "%pr" for printing struct resource info. ../drivers/gpu/drm/tiny/simpledrm.c: In function ‘simpledrm_device_init_mm’: ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=] ../drivers/gpu/drm/tiny/simpledrm.c:533:54: note: format string is defined here drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n", ~~~^ %x ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=] ../drivers/gpu/drm/tiny/simpledrm.c:533:61: note: format string is defined here drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n", ~~~^ %x Fixes: 4aae79f77e3a ("drm/simpledrm: Acquire memory aperture for framebuffer") Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210512233459.19534-1-rdunlap@infradead.org commit bfba94162ba7b1ab28bf78ccab8808c4a000fd8f Author: Thomas Zimmermann Date: Wed May 12 20:55:27 2021 +0200 drm/nouveau: Remove invalid reference to struct drm_device.pdev The pdev field got removed from struct drm_device recently. Replace the invalid reference with an upcast from the struct's dev field. Signed-off-by: Thomas Zimmermann Reviewed-by: Dave Airlie Reported-by: Stephen Rothwell Fixes: b347e04452ff ("drm: Remove pdev field from struct drm_device") Cc: Thomas Zimmermann Cc: Maxime Ripard Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210512185527.26050-1-tzimmermann@suse.de commit 68b433fe6937cfa3f8975d18643d5956254edd6a Author: Paul Cercueil Date: Mon Mar 29 18:50:45 2021 +0100 drm/ingenic: Switch IPU plane to type OVERLAY It should have been an OVERLAY from the beginning. The documentation stipulates that there should be an unique PRIMARY plane per CRTC. Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") Cc: # 5.8+ Signed-off-by: Paul Cercueil Acked-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20210329175046.214629-2-paul@crapouillou.net commit 0fdcccfafcffac70b452b3127cc3d981f0117655 Author: Peter Zijlstra Date: Thu May 13 01:29:23 2021 +0200 tick/nohz: Call tick_nohz_task_switch() with interrupts disabled Call tick_nohz_task_switch() slightly earlier after the context switch to benefit from disabled IRQs. This way the function doesn't need to disable them once more. Signed-off-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210512232924.150322-10-frederic@kernel.org commit a1dfb6311c7739e21e160bc4c5575a1b21b48c87 Author: Marcelo Tosatti Date: Thu May 13 01:29:22 2021 +0200 tick/nohz: Kick only _queued_ task whose tick dependency is updated When the tick dependency of a task is updated, we want it to aknowledge the new state and restart the tick if needed. If the task is not running, we don't need to kick it because it will observe the new dependency upon scheduling in. But if the task is running, we may need to send an IPI to it so that it gets notified. Unfortunately we don't have the means to check if a task is running in a race free way. Checking p->on_cpu in a synchronized way against p->tick_dep_mask would imply adding a full barrier between prepare_task_switch() and tick_nohz_task_switch(), which we want to avoid in this fast-path. Therefore we blindly fire an IPI to the task's CPU. Meanwhile we can check if the task is queued on the CPU rq because p->on_rq is always set to TASK_ON_RQ_QUEUED _before_ schedule() and its full barrier that precedes tick_nohz_task_switch(). And if the task is queued on a nohz_full CPU, it also has fair chances to be running as the isolation constraints prescribe running single tasks on full dynticks CPUs. So use this as a trick to check if we can spare an IPI toward a non-running task. NOTE: For the ordering to be correct, it is assumed that we never deactivate a task while it is running, the only exception being the task deactivating itself while scheduling out. Suggested-by: Peter Zijlstra Signed-off-by: Marcelo Tosatti Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-9-frederic@kernel.org commit 1e4ca26d367ae71743e25068e5cd8750ef3f5f7d Author: Marcelo Tosatti Date: Thu May 13 01:29:21 2021 +0200 tick/nohz: Change signal tick dependency to wake up CPUs of member tasks Rather than waking up all nohz_full CPUs on the system, only wake up the target CPUs of member threads of the signal. Reduces interruptions to nohz_full CPUs. Signed-off-by: Marcelo Tosatti Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-8-frederic@kernel.org commit 29721b859217b946bfc001c1644745ed4d7c26cb Author: Frederic Weisbecker Date: Thu May 13 01:29:20 2021 +0200 tick/nohz: Only wake up a single target cpu when kicking a task When adding a tick dependency to a task, its necessary to wake up the CPU where the task resides to reevaluate tick dependencies on that CPU. However the current code wakes up all nohz_full CPUs, which is unnecessary. Switch to waking up a single CPU, by using ordering of writes to task->cpu and task->tick_dep_mask. [ mingo: Minor readability edit. ] Suggested-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Signed-off-by: Marcelo Tosatti Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-7-frederic@kernel.org commit 176b8906c399a170886ea4bad5b24763c6713d61 Author: Frederic Weisbecker Date: Thu May 13 01:29:19 2021 +0200 tick/nohz: Update nohz_full Kconfig help CONFIG_NO_HZ_FULL behaves just like CONFIG_NO_HZ_IDLE by default. Reassure distros about it. Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-6-frederic@kernel.org commit 96c9b90396f9ab6caf13b4ebf00095818ac53b7f Author: Yunfeng Ye Date: Thu May 13 01:29:18 2021 +0200 tick/nohz: Update idle_exittime on actual idle exit The idle_exittime field of tick_sched is used to record the time when the idle state was left. but currently the idle_exittime is updated in the function tick_nohz_restart_sched_tick(), which is not always in idle state when nohz_full is configured: tick_irq_exit tick_nohz_irq_exit tick_nohz_full_update_tick tick_nohz_restart_sched_tick ts->idle_exittime = now; It's thus overwritten by mistake on nohz_full tick restart. Move the update to the appropriate idle exit path instead. Signed-off-by: Yunfeng Ye Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-5-frederic@kernel.org commit 3f624314b3f7c580aa5844a8930befd71e2a287c Author: Frederic Weisbecker Date: Thu May 13 01:29:17 2021 +0200 tick/nohz: Remove superflous check for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE The vtime_accounting_enabled_this_cpu() early check already makes what follows as dead code in the case of CONFIG_VIRT_CPU_ACCOUNTING_NATIVE. No need to keep the ifdeferry around. Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-4-frederic@kernel.org commit a5183862e76fdc25f36b39c2489b816a5c66e2e5 Author: Yunfeng Ye Date: Thu May 13 01:29:16 2021 +0200 tick/nohz: Conditionally restart tick on idle exit In nohz_full mode, switching from idle to a task will unconditionally issue a tick restart. If the task is alone in the runqueue or is the highest priority, the tick will fire once then eventually stop. But that alone is still undesired noise. Therefore, only restart the tick on idle exit when it's strictly necessary. Signed-off-by: Yunfeng Ye Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512232924.150322-3-frederic@kernel.org commit f105dfec0a951cd0d5bfbfe9dc067ea69f71ad5c Author: Peter Zijlstra Date: Thu May 13 01:29:15 2021 +0200 tick/nohz: Evaluate the CPU expression after the static key When tick_nohz_full_cpu() is called with smp_processor_id(), the latter is unconditionally evaluated whether the static key is on or off. It is not necessary in the off-case though, so make sure the cpu expression is executed at the last moment. Illustrate with the following test function: int tick_nohz_test(void) { return tick_nohz_full_cpu(smp_processor_id()); } The resulting code before was: mov %gs:0x7eea92d1(%rip),%eax # smp_processor_id() fetch nopl 0x0(%rax,%rax,1) xor %eax,%eax retq cmpb $0x0,0x29d393a(%rip) # je tick_nohz_test+0x29 # jump to below eax clear mov %eax,%eax bt %rax,0x29d3936(%rip) # setb %al movzbl %al,%eax retq xor %eax,%eax retq Now it becomes: nopl 0x0(%rax,%rax,1) xor %eax,%eax retq cmpb $0x0,0x29d3871(%rip) # je tick_nohz_test+0x29 # jump to below eax clear mov %gs:0x7eea91f0(%rip),%eax # smp_processor_id() fetch, after static key mov %eax,%eax bt %rax,0x29d3866(%rip) # setb %al movzbl %al,%eax retq xor %eax,%eax retq Signed-off-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210512232924.150322-2-frederic@kernel.org commit 915a2bc3c6b71e9802b89c5c981b2d5367e1ae3f Author: Paul Gortmaker Date: Mon Apr 19 00:26:59 2021 -0400 sched/isolation: Reconcile rcu_nocbs= and nohz_full= We have a mismatch between RCU and isolation -- in relation to what is considered the maximum valid CPU number. This matters because nohz_full= and rcu_nocbs= are joined at the hip; in fact the former will enforce the latter. So we don't want a CPU mask to be valid for one and denied for the other. The difference 1st appeared as of v4.15; further details are below. As it is confusing to anyone who isn't looking at the code regularly, a reminder is in order; three values exist here: CONFIG_NR_CPUS - compiled in maximum cap on number of CPUs supported. nr_cpu_ids - possible # of CPUs (typically reflects what ACPI says) cpus_present - actual number of present/detected/installed CPUs. For this example, I'll refer to NR_CPUS=64 from "make defconfig" and nr_cpu_ids=6 for ACPI reporting on a board that could run a six core, and present=4 for a quad that is physically in the socket. From dmesg: smpboot: Allowing 6 CPUs, 2 hotplug CPUs setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:6 nr_node_ids:1 rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=6. smp: Brought up 1 node, 4 CPUs And from userspace, see: paul@trash:/sys/devices/system/cpu$ cat present 0-3 paul@trash:/sys/devices/system/cpu$ cat possible 0-5 paul@trash:/sys/devices/system/cpu$ cat kernel_max 63 Everything is fine if we boot 5x5 for rcu/nohz: Command line: BOOT_IMAGE=/boot/bzImage nohz_full=2-5 rcu_nocbs=2-5 root=/dev/sda1 ro NO_HZ: Full dynticks CPUs: 2-5. rcu: Offload RCU callbacks from CPUs: 2-5. ..even though there is no CPU 4 or 5. Both RCU and nohz_full are OK. Now we push that > 6 but less than NR_CPU and with 15x15 we get: Command line: BOOT_IMAGE=/boot/bzImage rcu_nocbs=2-15 nohz_full=2-15 root=/dev/sda1 ro rcu: Note: kernel parameter 'rcu_nocbs=', 'nohz_full', or 'isolcpus=' contains nonexistent CPUs. rcu: Offload RCU callbacks from CPUs: 2-5. These are both functionally equivalent, as we are only changing flags on phantom CPUs that don't exist, but note the kernel interpretation changes. And worse, it only changes for one of the two - which is the problem. RCU doesn't care if you want to restrict the flags on phantom CPUs but clearly nohz_full does after this change from v4.15. edb9382175c3: ("sched/isolation: Move isolcpus= handling to the housekeeping code") - if (cpulist_parse(str, non_housekeeping_mask) < 0) { - pr_warn("Housekeeping: Incorrect nohz_full cpumask\n"); + err = cpulist_parse(str, non_housekeeping_mask); + if (err < 0 || cpumask_last(non_housekeeping_mask) >= nr_cpu_ids) { + pr_warn("Housekeeping: nohz_full= or isolcpus= incorrect CPU range\n"); To be clear, the sanity check on "possible" (nr_cpu_ids) is new here. The goal was reasonable ; not wanting housekeeping to land on a not-possible CPU, but note two things: 1) this is an exclusion list, not an inclusion list; we are tracking non_housekeeping CPUs; not ones who are explicitly assigned housekeeping 2) we went one further in 9219565aa890 ("sched/isolation: Require a present CPU in housekeeping mask") - ensuring that housekeeping was sanity checking against present and not just possible CPUs. To be clear, this means the check added in v4.15 is doubly redundant. And more importantly, overly strict/restrictive. We care now, because the bitmap boot arg parsing now knows that a value of "N" is NR_CPUS; the size of the bitmap, but the bitmap code doesn't know anything about the subtleties of our max/possible/present CPU specifics as outlined above. So drop the check added in v4.15 (edb9382175c3) and make RCU and nohz_full both in alignment again on NR_CPUS so "N" works for both, and then they can fall back to nr_cpu_ids internally just as before. Command line: BOOT_IMAGE=/boot/bzImage nohz_full=2-N rcu_nocbs=2-N root=/dev/sda1 ro NO_HZ: Full dynticks CPUs: 2-5. rcu: Offload RCU callbacks from CPUs: 2-5. As shown above, with this change, RCU and nohz_full are in sync, even with the use of the "N" placeholder. Same result is achieved with "15". Signed-off-by: Paul Gortmaker Signed-off-by: Ingo Molnar Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20210419042659.1134916-1-paul.gortmaker@windriver.com commit 22b5059b95e4d3b50bdd3e262182864a5ad7ec12 Author: Jonathan Neuschäfer Date: Sat Apr 24 18:21:27 2021 +0200 ARM: imx: Initialize SoC ID on i.MX50 As on i.MX51 and i.MX53, initialize the SoC ID based on the SoC compatible string of the board. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 89b759469d525f4d5f9c29cd3b1f490311c67f85 Author: Jonathan Neuschäfer Date: Sat Apr 24 14:37:28 2021 +0200 ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info The name of the struct, as defined in arch/arm/mach-imx/pm-imx5.c, is imx5_cpu_suspend_info. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 340364b8b10a537644d2beb20e79b7fe9cbb1ebf Author: Michal Vokáč Date: Tue Apr 13 17:01:16 2021 +0200 ARM: dts: imx6dl-yapp4: Configure the OLED display segment offset The imx6dl-yapp4 platform uses a GE-LX012864FWPP3N0000 OLED display. The display consist of a 128x64 OLED panel and a SSD1305 controller. The OLED panel resolution is 128x64 but the built-in controller default resolution is 132x64. To display properly a segment offset needs to be configured. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 14cdc1f243d79e0b46be150502b7dba9c5a6bdfd Author: Primoz Fiser Date: Mon Apr 12 08:24:50 2021 +0200 ARM: dts: imx6: phyFLEX: Fix UART hardware flow control Serial interface uart3 on phyFLEX board is capable of 5-wire connection including signals RTS and CTS for hardware flow control. Fix signals UART3_CTS_B and UART3_RTS_B padmux assignments and add missing property "uart-has-rtscts" to allow serial interface to be configured and used with the hardware flow control. Signed-off-by: Primoz Fiser Signed-off-by: Shawn Guo commit d1dd216738f54c7a29a608c33ac98ce1f41e8fda Author: Geert Uytterhoeven Date: Mon May 10 14:18:35 2021 +0200 dt-bindings: timer: renesas,tpu: Convert to json-schema Convert the Renesas H8/300 Timer Pulse Unit Device Tree binding documentation to json-schema. Correct clock-names, as "peripheral_clk" is the name of the supplier, and all users use "fck". Note that there are two different bindings for the TPU, both using "renesas,tpu": this one for using the TPU as a clock source (used on H8/300), and a second use for using the TPU as a PWM controller (used on ARM). To avoid conflicts, both bindings are marked with the appropriate "select" logic, to check for the absence respectively presence of the "#pwm-cells" property. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Acked-by: Yoshinori Sato Link: https://lore.kernel.org/r/1c33e62c3a74979c3ca9580176e6cf89384caea9.1620648868.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit d91133eddb582a9a6e3c041cfbec4e1aa006b310 Author: Geert Uytterhoeven Date: Mon May 10 14:18:34 2021 +0200 dt-bindings: pwm: renesas,tpu-pwm: Improve json-schema - Include the general PWM controller schema, - Make clocks, power-domains, and resets properties required. Signed-off-by: Geert Uytterhoeven Acked-by: Yoshinori Sato Link: https://lore.kernel.org/r/d36e3690ce8c5a1e53d054552e4fd8b90d6a5478.1620648868.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 2b46d5dafef2e1a62e9e4caf712c8df2b2fcc3b6 Author: Adrien Grassein Date: Tue May 11 21:36:01 2021 +0200 arm64: defconfig: Enable LT8912B DRM bridge driver This driver is used by the Nitrogen8 SBC. Signed-off-by: Adrien Grassein Signed-off-by: Shawn Guo commit 511cf7d1233154df1af043c9fb843821d98ed24a Author: Neil Armstrong Date: Mon Apr 19 09:32:44 2021 +0200 drm/mediatek: hdmi: Add MT8167 configuration The MT8167 SoC have a hard limit on the maximal supported HDMI TMDS clock, and is not validated and supported for HDMI modes out of HDMI CEA modes, so add a configuration entry linked to the MT8167 compatible. Signed-off-by: Fabien Parent Signed-off-by: Neil Armstrong Signed-off-by: Chun-Kuang Hu commit 73c1bf0f3ed88f713022ebe35c34ebc21441bd85 Author: Umesh Nerlige Ramappa Date: Tue May 11 21:21:44 2021 -0700 drm/i915/perf: Enable OA formats for ADL_P Enable relevant OA formats for ADL_P. Cc: Ashutosh Dixit Signed-off-by: Umesh Nerlige Ramappa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-8-matthew.d.roper@intel.com commit 83c81a0a16e54603bc3812e224620d6015b05836 Author: Clinton Taylor Date: Tue May 11 21:21:43 2021 -0700 drm/i915/adl_p: Add PCH support Add ADP-P PCH device ID and assign as ADL PCH if found. Previously we would assign the DDC pin map based on the PCH, but it can also change based on the CPU. From Bspec 20124: "The physical port to pin pair mapping are defined in the Bspec per PCH. Mapping can further change based on CPU Si used as CPU and PCH can be mixed and matched". Bspec: 20124 Cc: Matt Atwood Cc: Matt Roper Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-7-matthew.d.roper@intel.com commit 0e53fb847c6bba5b92fb80060a63d4c23d032822 Author: Matt Roper Date: Tue May 11 21:21:42 2021 -0700 drm/i915/xelpd: Add Wa_14011503030 Cc: Aditya Swarup Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-6-matthew.d.roper@intel.com commit 0788abdef6d1103c3a1d41ddd1fa536ca26479d6 Author: Matt Roper Date: Tue May 11 21:21:41 2021 -0700 drm/i915/xelpd: Required bandwidth increases when VT-d is active If VT-d is active, the memory bandwidth usage of the display is 5% higher. Take this into account when determining whether we can support a display configuration. Bspec: 64631 Cc: Matt Atwood Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-5-matthew.d.roper@intel.com commit a6922f4a01300efa0cccc0f337da4431dedf501c Author: Matt Roper Date: Tue May 11 21:21:40 2021 -0700 drm/i915/xelpd: Add XE_LPD power wells Aside from the hardware-managed PG0, XE_LPD has power wells 1-2 and A-D. These power wells should be enabled/disabled according to the following dependency tree (enable top to bottom, disable bottom to top): PG0 | --PG1-- / \ PGA --PG2-- / | \ PGB PGC PGD PWR_WELL_CTL follows the general ICL/TGL design and places PG A-D in the bits that would have been PG 6-9 under the old scheme. PWR_WELL_CTL_{DDI,AUX}'s bit indexing for DDI's A-C and TC1 is the same as TGL, but DDI-D is placed at index 7 (bits 14 & 15). v2: - Squash in LPSP status patch from Uma since it's also a powerwell-specific change. Bspec: 49233 Bspec: 49503 Bspec: 49504 Bspec: 49505 Bspec: 49296 Bspec: 50090 Bspec: 53920 Cc: Anshuman Gupta Cc: Imre Deak Cc: José Roberto de Souza Signed-off-by: Matt Roper Signed-off-by: Uma Shankar Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-4-matthew.d.roper@intel.com commit 1649a4cc5c311dd9d3cca670d0c9fc7cd1164db7 Author: Matt Roper Date: Tue May 11 21:21:39 2021 -0700 drm/i915/xelpd: Define plane capabilities XE_LPD's plane support is identical to RKL and ADL-S --- 5 universal + 1 cursor with NV12 UV support on planes 1-3 and NV12 Y support on planes 4-5. v2: - Drop the extra 90/270 rotation check in skl_plane_check_fb(); the DRM property code will already prevent userspace from passing us values that weren't advertised. (Lucas) Bspec: 53657 Bspec: 49251 Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-3-matthew.d.roper@intel.com commit 20fe778fde26f16fd3df28dba9fea889054380eb Author: Matt Roper Date: Tue May 11 21:21:38 2021 -0700 drm/i915/xelpd: Handle proper AUX interrupt bits XE_LPD has new AUX interrupt bits for DDI-D and DDI-E that take the spots that were used by TC5/TC6 on Display12 platforms. While we're at it, let's convert the bit definitions for all TGL+ aux bits over to the modern REG_BIT() notation. v2: - Maintain bit order rather than logical order. (Lucas) - Convert surrounding code to REG_BIT() notation. (Lucas) Bspec: 50064 Cc: Anusha Srivatsa Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-2-matthew.d.roper@intel.com commit c91026a938c261c2241c391a12b7f99647cb8a06 Author: Neil Armstrong Date: Mon Apr 19 09:32:43 2021 +0200 drm/mediatek: hdmi: Add optional limit on maximal HDMI mode clock Some SoCs like the MT8167 have a hard limit on the maximal supported HDMI TMDS clock, so add a configuration value to filter out those modes. Signed-off-by: Fabien Parent Signed-off-by: Neil Armstrong Signed-off-by: Chun-Kuang Hu commit 41ca9caaae0bfc959b22dbcd59d88a7107707e17 Author: Neil Armstrong Date: Mon Apr 19 09:32:42 2021 +0200 drm/mediatek: hdmi: Add check for CEA modes only Some SoCs like the MT8167 are not validated and supported for HDMI modes out of HDMI CEA modes, so add a configuration boolean to filter out non-CEA modes. Signed-off-by: Fabien Parent Signed-off-by: Neil Armstrong Signed-off-by: Chun-Kuang Hu commit 15870b97c36ab7fa07d4488b0a2457c2f2da6700 Author: Neil Armstrong Date: Mon Apr 19 09:32:41 2021 +0200 dt-bindings: mediatek: add mt8167 to hdmi, hdmi-ddc and cec bindings Add mt8167 SoC compatible to Mediatek hdmi, hdmi-ddc and cec schema bindings. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit d8654f4f9300e5e7cf8d5e7885978541cf61326b Author: Jim Ma Date: Wed May 12 17:00:11 2021 +0800 tls splice: remove inappropriate flags checking for MSG_PEEK In function tls_sw_splice_read, before call tls_sw_advance_skb it checks likely(!(flags & MSG_PEEK)), while MSG_PEEK is used for recvmsg, splice supports SPLICE_F_NONBLOCK, SPLICE_F_MOVE, SPLICE_F_MORE, should remove this checking. Signed-off-by: Jim Ma Signed-off-by: David S. Miller commit 34e7434ba4e97f4b85c1423a59b2922ba7dff2ea Author: Zou Wei Date: Wed May 12 15:00:24 2021 +0800 atm: nicstar: Fix possible use-after-free in nicstar_cleanup() This module's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: David S. Miller commit 3f2870989f10ddb276063097d8e44e543277694a Author: Tiezhu Yang Date: Mon May 10 20:51:59 2021 +0800 bpf, arm64: Replace STACK_ALIGN() with round_up() to align stack size Use the common function round_up() directly to show the align size explicitly, the function STACK_ALIGN() is needless, remove it. Other JITs also just rely on round_up(). Signed-off-by: Tiezhu Yang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1620651119-5663-1-git-send-email-yangtiezhu@loongson.cn commit e6fe3f422be128b7d65de607f6ae67bedc55f0ca Author: Alexey Dobriyan Date: Thu Apr 22 23:02:28 2021 +0300 sched: Make multiple runqueue task counters 32-bit Make: struct dl_rq::dl_nr_migratory struct dl_rq::dl_nr_running struct rt_rq::rt_nr_boosted struct rt_rq::rt_nr_migratory struct rt_rq::rt_nr_total struct rq::nr_uninterruptible 32-bit. If total number of tasks can't exceed 2**32 (and less due to futex pid limits), then per-runqueue counters can't as well. This patchset has been sponsored by REX Prefix Eradication Society. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210422200228.1423391-4-adobriyan@gmail.com commit 8fc2858e572ce761bffcade81a42ac72005e76f9 Author: Alexey Dobriyan Date: Thu Apr 22 23:02:27 2021 +0300 sched: Make nr_iowait_cpu() return 32-bit value Runqueue ->nr_iowait counters are 32-bit anyway. Propagate 32-bitness into other code, but don't try too hard. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210422200228.1423391-3-adobriyan@gmail.com commit 9745516841a55c77163a5d549bce1374d776df54 Author: Alexey Dobriyan Date: Thu Apr 22 23:02:26 2021 +0300 sched: Make nr_iowait() return 32-bit value Creating 2**32 tasks to wait in D-state is impossible and wasteful. Return "unsigned int" and save on REX prefixes. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210422200228.1423391-2-adobriyan@gmail.com commit 01aee8fd7fb23049e2b52abadbe1f7b5e94a52d2 Author: Alexey Dobriyan Date: Thu Apr 22 23:02:25 2021 +0300 sched: Make nr_running() return 32-bit value Creating 2**32 tasks is impossible due to futex pid limits and wasteful anyway. Nobody has done it. Bring nr_running() into 32-bit world to save on REX prefixes. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210422200228.1423391-1-adobriyan@gmail.com commit 0303ce17347a02863c4ddef9777a42ff0315acb6 Author: Hailong Liu Date: Tue May 11 22:04:29 2021 +0800 samples, bpf: Suppress compiler warning While cross compiling on ARM32 , the casting from pointer to __u64 will cause warnings: samples/bpf/task_fd_query_user.c: In function 'main': samples/bpf/task_fd_query_user.c:399:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 399 | uprobe_file_offset = (__u64)main - (__u64)&__executable_start; | ^ samples/bpf/task_fd_query_user.c:399:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 399 | uprobe_file_offset = (__u64)main - (__u64)&__executable_start; Workaround this by using "unsigned long" to adapt to different ARCHs. Signed-off-by: Hailong Liu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210511140429.89426-1-liuhailongg6@163.com commit 0a580fa65cfa08a40af1a0a2cf73d100863e4981 Author: Frederic Weisbecker Date: Wed Apr 14 15:24:13 2021 +0200 srcu: Early test SRCU polling start Place an early call to start_poll_synchronize_srcu() before the invocation of call_srcu() on the same srcu_struct structure. After the later call to srcu_barrier(), the completion of the first grace period should be visible to a subsequent invocation of poll_state_synchronize_srcu(), and if not, warn. Signed-off-by: Frederic Weisbecker Cc: Boqun Feng Cc: Lai Jiangshan Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Joel Fernandes Cc: Uladzislau Rezki Signed-off-by: Paul E. McKenney commit a616aec9aa140ef1ca61b06cec467391cbef11d7 Author: Ingo Molnar Date: Mon Mar 22 22:29:10 2021 -0700 rcu: Fix various typos in comments Fix ~12 single-word typos in RCU code comments. [ paulmck: Apply feedback from Randy Dunlap. ] Reviewed-by: Randy Dunlap Signed-off-by: Ingo Molnar Signed-off-by: Paul E. McKenney commit e75bcd48e2c4026b1f3feda916a2327b1744d664 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:11 2021 +0100 rcu/nocb: Unify timers Now that ->nocb_timer and ->nocb_bypass_timer have become quite similar, this commit merges them together. A new RCU_NOCB_WAKE_BYPASS wake level is introduced. As a result, timers perform all kinds of deferred wake ups but other deferred wakeup callsites only handle non-bypass wakeups in order not to wake up rcuo too early. The timer also unconditionally executes a full barrier so as to order timer_pending() and callback enqueue although the path performing RCU_NOCB_WAKE_FORCE that makes use of it is debatable. It should also test against the rdp leader instead of the current rdp. This unconditional full barrier shouldn't bring visible overhead since these timers almost never fire. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 870905169da8bfae0570df013efe860d33251b0f Author: Frederic Weisbecker Date: Tue Feb 23 01:10:10 2021 +0100 rcu/nocb: Prepare for fine-grained deferred wakeup Tuning the deferred wakeup level must be done from a safe wakeup point. Currently those sites are: * ->nocb_timer * user/idle/guest entry * CPU down * softirq/rcuc All of these sites perform the wake up for both RCU_NOCB_WAKE and RCU_NOCB_WAKE_FORCE. In order to merge ->nocb_timer and ->nocb_bypass_timer together, we plan to add a new RCU_NOCB_WAKE_BYPASS that really should be deferred until a timer fires so that we don't wake up the NOCB-gp kthread too early. To prepare for that, this commit specifies the per-callsite wakeup level/limit. Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker [ paulmck: Fix non-NOCB rcu_nocb_need_deferred_wakeup() definition. ] Signed-off-by: Paul E. McKenney commit f9fc166b790bd214083035d865653133b8a963d1 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:09 2021 +0100 rcu/nocb: Only cancel nocb timer if not polling This commit refrains deleting the ->nocb_timer if rcu_nocb is polling because it should not ever have been queued in the polling case. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 3b2348e2fdf403b25a317b394db605257f321966 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:08 2021 +0100 rcu/nocb: Delete bypass_timer upon nocb_gp wakeup A NOCB-gp wake p can safely delete the ->nocb_bypass_timer because nocb_gp_wait() will recheck again the bypass state and rearm the bypass timer if necessary. This commit therefore deletes this timer. Reviewed-by: Boqun Feng Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit b6e2c4ed35c33d7e55197aa26d99645a690ca467 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:07 2021 +0100 rcu/nocb: Cancel nocb_timer upon nocb_gp wakeup When waking up in nocb_gp_wait(), there is no need to keep the nocb_timer around because this function will traverse the whole rdp list. Any update performed before the timer was armed will now be visible after the ->nocb_gp_lock acquire. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 552cac80e65f38a0cc9022456c09efed7e88f9d6 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:06 2021 +0100 rcu/nocb: Allow de-offloading rdp leader The only thing that prevented an rdp leader from being de-offloaded was the nocb_bypass_timer that used to lock the nocb_lock of the rdp leader. If an rdp gets de-offloaded, it will subtlely ignore rcu_nocb_lock() calls and do its job in the timer unsafely. Worse yet: If it gets re-offloaded in the middle of the timer, rcu_nocb_unlock() would try to unlock, leaving it imbalanced. Now that the nocb_bypass_timer doesn't use the nocb_lock anymore, de-offloading the rdp leader is now safe. This commit therefore allows the rdp leader to be de-offloaded. Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit c7ef7500a891432a3bb2b036f535bfdf58aa3605 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:05 2021 +0100 rcu/nocb: Directly call __wake_nocb_gp() from bypass timer The bypass timer calls __call_rcu_nocb_wake() instead of directly calling __wake_nocb_gp(). The only difference here is that rdp->qlen_last_fqs_check gets overridden. But resetting the deferred force quiescent state base shouldn't be relevant for that timer. In fact the bypass queue in question can be for any rdp from the group and not necessarily the rdp leader on which the bypass timer is attached. This commit therefore calls __wake_nocb_gp() directly. This way we don't even need to lock the ->nocb_lock. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 1ac9e0b5731ad732ddc045cfcfd6739e4e12f3b5 Author: James Clark Date: Mon May 10 17:32:48 2021 +0300 perf cs-etm: Set time on synthesised samples to preserve ordering The following attribute is set when synthesising samples in timed decoding mode: attr.sample_type |= PERF_SAMPLE_TIME; This results in new samples that appear to have timestamps but because we don't assign any timestamps to the samples, when the resulting inject file is opened again, the synthesised samples will be on the wrong side of the MMAP or COMM events. For example, this results in the samples being associated with the perf binary, rather than the target of the record: perf record -e cs_etm/@tmc_etr0/u top perf inject -i perf.data -o perf.inject --itrace=i100il perf report -i perf.inject Where 'Command' == perf should show as 'top': # Overhead Command Source Shared Object Source Symbol Target Symbol Basic Block Cycles # ........ ....... .................... ...................... ...................... .................. # 31.08% perf [unknown] [.] 0x000000000040c3f8 [.] 0x000000000040c3e8 - If the perf.data file is opened directly with perf, without the inject step, then this already works correctly because the events are synthesised after the COMM and MMAP events and no second sorting happens. Re-sorting only happens when opening the perf.inject file for the second time so timestamps are needed. Using the timestamp from the AUX record mirrors the current behaviour when opening directly with perf, because the events are generated on the call to cs_etm__process_queues(). The ETM trace could optionally contain time stamps, but there is no way to correlate this with the kernel time. So, the best available time value is that of the AUX_RECORD header. This patch uses the timestamp from the header for all the samples. The ordering of the samples are implicit in the trace and thus is fine with respect to relative ordering. Reviewed-by: Leo Yan Reviewed-by: Mathieu Poirier Co-developed-by: Al Grant Signed-off-by: Al Grant Signed-off-by: James Clark Acked-by: Suzuki K Poulos Cc: Alexander Shishkin Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20210510143248.27423-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit aadd6ba409344776fc155451684c728822bf4a24 Author: James Clark Date: Mon May 10 17:32:47 2021 +0300 perf cs-etm: Refactor timestamp variable names Remove ambiguity in variable names relating to timestamps. A later commit will save the sample kernel timestamp in one of the etm structs, so name all elements appropriately to avoid confusion. This is also removes some ambiguity arising from the fact that the --timestamp argument to perf record refers to sample kernel timestamps, and the /timestamp/ event modifier refers to CS timestamps, so the term is overloaded. Signed-off-by: James Clark Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Al Grant Cc: Anshuman Khandual Cc: Branislav Rankov Cc: Denis Nikitin Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20210510143248.27423-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit f4addd54b1617067f735ad194a3580a2db7b8bf5 Author: André Almeida Date: Tue Apr 27 10:53:28 2021 -0300 selftests: futex: Expand timeout test Improve futex timeout testing by checking all the operations that supports timeout and their available modes. Signed-off-by: André Almeida Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210427135328.11013-3-andrealmeid@collabora.com commit c7d84e7ff5a651d186a6ec41361c4f07acc2fb9c Author: André Almeida Date: Tue Apr 27 10:53:27 2021 -0300 selftests: futex: Correctly include headers dirs When building selftests, the build system will install uapi linux headers at usr/include in kernel source's root directory. When building with a different output folder, the headers will be installed at kselftests/usr/include. Add both paths so we can build the tests using up-to-date headers. Currently, this is uncommon to happen since it's rare to find a build system with an outdated futex header, but it happens when testing new futex operations. Signed-off-by: André Almeida Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210427135328.11013-2-andrealmeid@collabora.com commit 93d0955e6cf562d02aae37f5f8d98d9d9d16e0d4 Author: Ingo Molnar Date: Wed May 12 20:04:28 2021 +0200 locking: Fix comment typos A few snuck through. Signed-off-by: Ingo Molnar commit c43426334b3169b6c9e6855483aa7384ff09fd33 Author: Ingo Molnar Date: Wed May 12 19:58:31 2021 +0200 x86: Fix leftover comment typos Signed-off-by: Ingo Molnar commit 6f0d271d21c5dc12b78cc7d8b241a5acbca5589f Merge: 1bc67873d401e 88b06399c9c76 Author: Ingo Molnar Date: Wed May 12 19:59:37 2021 +0200 Merge branch 'linus' into x86/cleanups, to pick up dependent commits Signed-off-by: Ingo Molnar commit cc00c1988801dc71f63bb7bad019e85046865095 Author: Ingo Molnar Date: Wed May 12 19:51:31 2021 +0200 sched: Fix leftover comment typos A few more snuck in. Also capitalize 'CPU' while at it. Signed-off-by: Ingo Molnar commit 9b8756d6ee1b2486e5b2da385de19a23227ada1a Merge: b3cc8ec04f50d adf1471b2f763 Author: Mark Brown Date: Wed May 12 17:55:27 2021 +0100 Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.14 commit 6cd7fdc8c53007b9ccf37c86b031552fff5aaa1d Author: Hsin-Yi Wang Date: Wed Apr 21 17:06:01 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-fennel board Fennel is known as Lenovo IdeaPad Flex 3 Chromebook. Fennel14 is known as Lenovo IdeaPad 3 Chromebook. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210421090601.730744-11-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 0a9cefe21aec60d58cd1bf68a784c7116d76ef97 Author: Hsin-Yi Wang Date: Wed Apr 21 17:06:00 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-kenzo board Kenzo is known as Acer Chromebook 311. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210421090601.730744-10-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit dd6e3b06214f39cce1aae7698e69706cc038a0ed Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:59 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-burnet board Burnet is known as HP Chromebook x360 11MK G3 EE Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210421090601.730744-9-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit f006bcf1c97200a41c1923ae045fbc153bf49ebe Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:58 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-willow board Willow is known as Acer Chromebook 311 (C722/C722T) Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210421090601.730744-8-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit f11f44be2427a601595be1c2f8d6e3a77d3a0f98 Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:57 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-kappa board Kappa is known as HP Chromebook 11a Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210421090601.730744-7-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 009add139c2e1942e49cc576ed1655f5313b5fe4 Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:56 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-fennel Fennel is known as Lenovo IdeaPad Flex 3 Chromebook. Signed-off-by: Hsin-Yi Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210421090601.730744-6-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit ffea8b5b89f1d2ed14d84289aa48cbaef7f31a52 Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:55 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-kenzo Kenzo is known as Acer Chromebook 311. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210421090601.730744-5-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 204c134818498985c1d235a294af5803d5cce1da Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:54 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-burnet Burnet is known as HP Chromebook x360 11MK G3 EE. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210421090601.730744-4-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 82665ef7dd65ce3b0c2e579df08f17708b728f2e Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:53 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-willow Willow is known as Acer Chromebook 311 (C722/C722T). Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210421090601.730744-3-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 4eab77fc8ae77316417b987ad16e67d2bc739cc5 Author: Hsin-Yi Wang Date: Wed Apr 21 17:05:52 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-kappa Kappa is known as HP Chromebook 11a. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210421090601.730744-2-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit ba96de3ae5a7e2121cac80053b277eb2ab51a0ae Author: Zou Wei Date: Tue May 11 11:55:50 2021 +0800 soc: mediatek: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620705350-104687-1-git-send-email-zou_wei@huawei.com Signed-off-by: Matthias Brugger commit 046b243a6afb74d276ca52a81be62aed9a90672b Author: Lei Zhao Date: Thu Apr 15 15:00:01 2021 +0800 perf x86 kvm-stat: Support to analyze kvm MSR usage: - kvm stat run a command and gather performance counter statistics - show the result: perf kvm stat report --event=msr See the msr events: Analyze events for all VMs, all VCPUs: MSR Access Samples Samples% Time% Min Time Max Time Avg time 0x6e0:W 67007 98.17% 98.31% 0.59us 10.69us 0.90us ( +- 0.10% ) 0x830:W 1186 1.74% 1.60% 0.53us 108.34us 0.82us ( +- 11.02% ) 0x3b:R 66 0.10% 0.09% 0.56us 1.26us 0.80us ( +- 3.24% ) Total Samples:68259, Total events handled time:61150.95us. Signed-off-by: Lei Zhao Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1618470001-7239-1-git-send-email-lirongqing@baidu.com Signed-off-by: Li RongQing Signed-off-by: Arnaldo Carvalho de Melo commit 07b747f99ab47a167cfae5f5588ca22f4e0da7fe Author: Namhyung Kim Date: Thu Apr 22 19:38:33 2021 -0700 perf stat: Use aggregated counts directly The ps->res_stats is for repeated runs, so the interval code should not touch it. Actually the aggregated counts are available in the counter->counts->aggr, so we can (and should) use it directly IMHO. No functional change intended. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jin Yao Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210423023833.1430520-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 66286ed3e84f126a24baca3ee62635536a428950 Author: Adrian Hunter Date: Mon May 3 09:42:22 2021 +0300 perf record: Set timestamp boundary for AUX area events AUX area data is not processed by 'perf record' and consequently the --timestamp-boundary option may result in no values for "time of first sample" and "time of last sample". However there are non-sample events that can be used instead, namely 'itrace_start' and 'aux'. 'itrace_start' is issued before tracing starts, and 'aux' is issued every time data is ready. Implement tool callbacks for those two for 'perf record', to update the timestamp boundary. Example: $ perf record -e intel_pt//u --timestamp-boundary uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.022 MB perf.data ] $ perf script --header-only | grep "time of" # time of first sample : 4574.835541 # time of last sample : 4574.835907 $ perf script --itrace=be -F-ip | head -1 uname 13752 [001] 4574.835589: 1 branches:uH: $ perf script --itrace=be -F-ip | tail -1 uname 13752 [001] 4574.835867: 1 branches:uH: $ Signed-off-by: Adrian Hunter Acked-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20210503064222.5319-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e3ff42bdebcfeb5f61fcc7a769d642dfc8b923d1 Author: Adrian Hunter Date: Fri Apr 30 10:03:09 2021 +0300 perf intel-pt: Parse VM Time Correlation options and set up decoding Add parsing and validation of VM Time Correlation options, and pass parameters to the decoder. Also update the Intel PT documentation accordingly. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fa8f949d16c09ce51d3fa9827210d1f71d62ed8f Author: Adrian Hunter Date: Fri Apr 30 10:03:08 2021 +0300 perf intel-pt: Add VM Time Correlation to decoder VM Time Correlation means determining if each TSC packet belongs to a VM Guest or the Host. When the trace is "in context" that is indicated by the NR flag in the PIP packet. However, when tracing kernel-only, userspace only, or using address filters, the trace can be "out of context" in which case timing packets are produced but not PIP packets. Nevertheless, it is very unlikely the VM Guest timestamps will be in the same range as the Host timestamps. Host time ranges are established by a starting side-band event timestamp, and subsequently by the buffer timestamp, written when the buffer is copied to the perf.data file. This patch supports updating the VM Guest timestamp packets, assuming an unchanging (during perf record) VMX TSC Offset and no VMX TSC scaling. Furthermore, it is possible to determine what the VMX TSC Offset is, although not necessarily at the start. The dry-run option lets that information be determined so that the user can pass it to a subsequent run. For more detail, refer to the example in the Intel PT documentation in a subsequent patch. VM Time Correlation is also performed on the TSC value in PEBs-via-PT records. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 31c7e27dae0e15ed466d8acced7e3a536e547b07 Author: Adrian Hunter Date: Fri Apr 30 10:03:07 2021 +0300 perf intel-pt: Better 7-byte timestamp wraparound logic A timestamp should not go backwards. If it does it is assumed that the 7-byte TSC packet value has wrapped. Improve that logic so that it will not allow the timestamp to go past the buffer timestamp (which is recorded when the buffer is copied out) Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5ac35d778a40c9f244a38920247ad41a44c66a02 Author: Adrian Hunter Date: Fri Apr 30 10:03:06 2021 +0300 perf intel-pt: Pass the first timestamp to the decoder VM Time Correlation will use time ranges to determine whether a TSC packet belongs to the Host or Guest. To start, the first non-zero timestamp is needed. Pass that to the decoder. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0fc9d338944254561289e8639ac05ebf72b4b082 Author: Adrian Hunter Date: Fri Apr 30 10:03:05 2021 +0300 perf intel-pt: Add a tree for VMCS information Even when VMX TSC Offset is not changing (during perf record), different virtual machines can have different TSC Offsets. There is a Virtual Machine Control Structure (VMCS) for each virtual CPU, the address of which is reported to Intel PT in the VMCS packet. We do not know which VMCS belongs to which virtual machine, so use a tree to keep track of VMCS information. Then the decoder will be able to use the current VMCS value to look up the current TSC Offset. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 335358cc3090d85793c663a625fa1c9195b8670e Author: Adrian Hunter Date: Fri Apr 30 10:03:04 2021 +0300 perf intel-pt: Let overlap detection handle VM timestamps Intel PT timestamps are affected by virtualization. While TSC packets can still be considered to be unique, the TSC values need not be in order any more. Adjust the algorithm accordingly. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6aa3afc9c8b7bca75640e5aaa67f04dcb158b325 Author: Adrian Hunter Date: Fri Apr 30 10:03:03 2021 +0300 perf auxtrace: Allow buffers to be mapped read / write To support in-place update, allow buffers to be mapped read / write. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 83d7f5f1ad0ec6072bb5b4ca32795f0c199424e2 Author: Adrian Hunter Date: Fri Apr 30 10:03:02 2021 +0300 perf inject: Add --vm-time-correlation option Intel PT timestamps are affected by virtualization. Add a new option that will allow the Intel PT decoder to correlate the timestamps and translate the virtual machine timestamps to host timestamps. The advantages of making this a separate step, rather than a part of normal decoding are that it is simpler to implement, and it needs to be done only once. This patch adds only the option. Later patches add Intel PT support. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2a525f6a5502bfd80568e6befb84053cf650ad25 Author: Adrian Hunter Date: Fri Apr 30 10:03:01 2021 +0300 perf inject: Add facility to do in place update When there is a need to modify only timestamps, it is much simpler and quicker to do it to the existing file rather than re-write all the contents. In preparation for that, add the ability to modify the input file in place. In practice that just means making the file descriptor and mmaps writable. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit e9d64739635f8db204c9fc81f20ed70751b4e0dd Author: Adrian Hunter Date: Fri Apr 30 10:03:00 2021 +0300 perf intel-pt: Support Z itrace option for timeless decoding Correlating virtual machine TSC packets is not supported at present, so instead support the Z itrace option. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 856ecd6ab4944b18fd3647c21ad8737d8e736025 Author: Adrian Hunter Date: Fri Apr 30 10:02:59 2021 +0300 perf intel-pt: Move synth_opts initialization earlier Move synth_opts initialization earlier, so it can be used earlier. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 18f4949427dc80bd9027001d28118cd8d555d890 Author: Adrian Hunter Date: Fri Apr 30 10:02:58 2021 +0300 perf auxtrace: Add Z itrace option for timeless decoding Issues correlating timestamps can be avoided with timeless decoding. Add an option for that, so that timeless decoding can be used even when timestamps are present. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: https://lore.kernel.org/r/20210430070309.17624-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d17685260b8533a599429eaaf682db78a1f6758e Author: Zhen Lei Date: Tue May 11 17:04:33 2021 +0800 drm/panfrost: Remove redundant error printing in panfrost_device_init() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210511090433.4396-1-thunder.leizhen@huawei.com commit d9fb91fdfdda2c30c94f66cd55d39a693505b185 Author: Fabien Parent Date: Tue Apr 6 13:36:29 2021 +0200 arm64: dts: mediatek: mt8167: add iommu node Add node for the MT8167's IOMMU. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210406113631.2675029-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 1a191c97abef9b8afcec95a9ede253df184e84bc Author: Fabien Parent Date: Tue Apr 6 13:36:28 2021 +0200 arm64: dts: mediatek: mt8167: add larb nodes Add larb nodes for MT8167: * larb0 is used for display (dsi and hdmi) * larb1 is used for camera (csi) * larb2 is used for the video hardware decoder Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210406113631.2675029-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit e7ead62e2a1e574bf14b90dfcd2a74ba314a0c4d Author: Fabien Parent Date: Mon Apr 5 22:08:18 2021 +0200 arm64: dts: mediatek: mt8167: add smi_common node Add the smi_common node. Reported-by: kernel test robot Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210405200821.2203458-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 97e37d44d35e14a74f989ec13d8587c37f3f0c75 Author: Fabien Parent Date: Mon Apr 5 22:08:17 2021 +0200 arm64: dts: mediatek: mt8167: add mmsys node Add node for MMSYS. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210405200821.2203458-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 763e13f26894e3693ed9a72fbc796ed1e23c1e5b Author: Fabien Parent Date: Mon Apr 5 19:28:36 2021 +0200 arm64: dts: mediatek: mt8167: add power domains Add support for the MT8167 power domains. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210405172836.2038526-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit e6f73028db511ec6e093e2b79210ca5b19c7e6c5 Author: Irui Wang Date: Thu Mar 25 20:26:24 2021 +0800 arm64: dts: mt8173: Separating mtk-vcodec-enc device node There are two separate hardware encoder blocks inside MT8173. Split the current mtk-vcodec-enc node to match the hardware architecture. Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang Acked-by: Tiffany Lin Link: https://lore.kernel.org/r/20210325122625.15100-2-irui.wang@mediatek.com Signed-off-by: Matthias Brugger commit b3cc8ec04f50d9c860534fe4e3617a8d10ed9ea9 Author: Peter Geis Date: Tue May 11 17:13:35 2021 -0400 regulator: fan53555: fix tcs4525 function names The tcs4525 is based off the fan53526. Rename the tcs4525 functions to align with this. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20210511211335.2935163-4-pgwipeout@gmail.com Signed-off-by: Mark Brown commit f9028dcdf589f4ab528372088623aa4e8d324df2 Author: Peter Geis Date: Tue May 11 17:13:34 2021 -0400 regulator: fan53555: only bind tcs4525 to correct chip id The tcs4525 regulator has a chip id of <12>. Only allow the driver to bind to the correct chip id for safety, in accordance with the other supported devices. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20210511211335.2935163-3-pgwipeout@gmail.com Signed-off-by: Mark Brown commit d4db69eba290732357f03ba0a14350b81f778290 Author: Peter Geis Date: Tue May 11 17:13:33 2021 -0400 regulator: fan53555: fix TCS4525 voltage calulation The TCS4525 has 128 voltage steps. With the calculation set to 127 the most significant bit is disregarded which leads to a miscalculation of the voltage by about 200mv. Fix the calculation to end deadlock on the rk3566-quartz64 which uses this as the cpu regulator. Fixes: 914df8faa7d6 ("regulator: fan53555: Add TCS4525 DCDC support") Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20210511211335.2935163-2-pgwipeout@gmail.com Signed-off-by: Mark Brown commit 98c69fcc9f5902b0c340acdbbfa365464efc52d2 Merge: c9f2e3c3ddab8 24e46fb811e99 Author: Mark Brown Date: Wed May 12 16:22:59 2021 +0100 Merge series "ASoC: SOF/Intel: fix and remove Sparse warnings" from Pierre-Louis Bossart : We updated our SOF CI settings last week (see below) to use more options for Sparse, and sure enough it detected one nasty single-character bug in one of my previous patches, along with more trivial issues with string/integer sizes and signed/unsigned confusions. export ARCH=x86_64 export CF="-Wsparse-error -Wsparse-all -Wno-bitwise-pointer -Wno-pointer-arith -Wno-typesign -Wnoshadow" make -k sound/soc/sof/ C=2 make -k sound/soc/intel/common/ C=2 make -k sound/soc/intel/boards/ C=2 make -k drivers/soundwire/ C=2 Pierre-Louis Bossart (9): ASoC: SOF: Intel: hda: fix index used in inner loop ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters ASoC: Intel: sof_cs42l42: shrink platform id below 20 characters ASoC: Intel: bxt_da7219_max98357a: shrink platform_id below 20 characters ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters ASoC: Intel: sof_sdw: fix signed/unsigned warning ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 +++--- sound/soc/intel/boards/glk_rt5682_max98357a.c | 4 +- sound/soc/intel/boards/kbl_da7219_max98357a.c | 4 +- sound/soc/intel/boards/sof_cs42l42.c | 2 +- sound/soc/intel/boards/sof_da7219_max98373.c | 8 ++-- sound/soc/intel/boards/sof_rt5682.c | 20 +++++----- sound/soc/intel/boards/sof_sdw.c | 2 +- .../intel/common/soc-acpi-intel-adl-match.c | 28 +++++++------- .../intel/common/soc-acpi-intel-bxt-match.c | 2 +- .../intel/common/soc-acpi-intel-cml-match.c | 22 +++++------ .../intel/common/soc-acpi-intel-cnl-match.c | 2 +- .../intel/common/soc-acpi-intel-glk-match.c | 6 +-- .../intel/common/soc-acpi-intel-icl-match.c | 12 +++--- .../intel/common/soc-acpi-intel-jsl-match.c | 6 +-- .../intel/common/soc-acpi-intel-kbl-match.c | 2 +- .../intel/common/soc-acpi-intel-tgl-match.c | 38 +++++++++---------- sound/soc/sof/intel/hda.c | 2 +- 17 files changed, 86 insertions(+), 86 deletions(-) -- 2.25.1 commit 7d966119f7db5b0bbba61ec3376dad48567aecae Author: Sumeet Pawnikar Date: Mon May 10 21:28:19 2021 +0530 ACPI: DPTF: Add battery participant for Intel SoCs Add ACPI Device ID for DPTF battery participant for the Intel Jasper Lake (INT3532) and Tiger Lake (INTC1050) SoC based platforms. Signed-off-by: Sumeet Pawnikar Signed-off-by: Rafael J. Wysocki commit ab3257042c26d0cd44793c741e2f89bf38b21fe8 Author: Peter Zijlstra Date: Thu May 6 21:34:05 2021 +0200 jump_label, x86: Allow short NOPs Now that objtool is able to rewrite jump_label instructions, have the compiler emit a JMP, such that it can decide on the optimal encoding, and set jump_entry::key bit1 to indicate that objtool should rewrite the instruction to a matching NOP. For x86_64-allyesconfig this gives: jl\ NOP JMP short: 22997 124 long: 30874 90 IOW, we save (22997+124) * 3 bytes of kernel text in hotpaths. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194158.216763632@infradead.org commit e2d9494beff21a26438eb611c260b8a6c2dc4dbf Author: Peter Zijlstra Date: Thu May 6 21:34:04 2021 +0200 objtool: Provide stats for jump_labels Add objtool --stats to count the jump_label sites it encounters. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194158.153101906@infradead.org commit 6d37b83c5d79ef5996cc49c3e3ac3d8ecd8c7050 Author: Peter Zijlstra Date: Thu May 6 21:34:03 2021 +0200 objtool: Rewrite jump_label instructions When a jump_entry::key has bit1 set, rewrite the instruction to be a NOP. This allows the compiler/assembler to emit JMP (and thus decide on which encoding to use). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194158.091028792@infradead.org commit cbf82a3dc241aea82b941a872ed5c52f6af527ea Author: Peter Zijlstra Date: Thu May 6 21:34:02 2021 +0200 objtool: Decode jump_entry::key addend Teach objtool about the the low bits in the struct static_key pointer. That is, the low two bits of @key in: struct jump_entry { s32 code; s32 target; long key; } as found in the __jump_table section. Since @key has a relocation to the variable (to be resolved by the linker), the low two bits will be reflected in the relocation's addend. As such, find the reloc and store the addend, such that we can access these bits. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194158.028024143@infradead.org commit e7bf1ba97afdde75b0ef43e4bdb718bf843613f1 Author: Peter Zijlstra Date: Thu May 6 21:34:01 2021 +0200 jump_label, x86: Emit short JMP Now that we can patch short JMP/NOP, allow the compiler/assembler to emit short JMP instructions. There is no way to have the assembler emit short NOPs based on the potential displacement, so leave those long for now. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.967034497@infradead.org commit 5af0ea293d78c8b8f0b87ae2b13f7ac584057bc3 Author: Peter Zijlstra Date: Thu May 6 21:34:00 2021 +0200 jump_label: Free jump_entry::key bit1 for build use Have jump_label_init() set jump_entry::key bit1 to either 0 ot 1 unconditionally. This makes it available for build-time games. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.906893264@infradead.org commit 001951bea748d3f675e1778f42b17290a8c551bf Author: Peter Zijlstra Date: Thu May 6 21:33:59 2021 +0200 jump_label, x86: Add variable length patching support This allows the patching to to emit 2 byte JMP/NOP instruction in addition to the 5 byte JMP/NOP we already did. This allows for more compact code. This code is not yet used, as we don't emit shorter code at compile time yet. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.846870383@infradead.org commit fa5e5dc39669b4427830c546ede8709323b8276c Author: Peter Zijlstra Date: Thu May 6 21:33:58 2021 +0200 jump_label, x86: Introduce jump_entry_size() This allows architectures to have variable sized jumps. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.786777050@infradead.org commit f9510fa9caaf8229381d5f86ba0774bf1a6ca39b Author: Peter Zijlstra Date: Thu May 6 21:33:57 2021 +0200 jump_label, x86: Improve error when we fail expected text There is only a single usage site left, remove the function and extend the print to include more information, like the expected text and the patch type. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.726939027@infradead.org commit e1aa35c4c4bc71e44dabc9d7d167b807edd7b439 Author: Peter Zijlstra Date: Thu May 6 21:33:56 2021 +0200 jump_label, x86: Factor out the __jump_table generation Both arch_static_branch() and arch_static_branch_jump() have the same blurb to generate the __jump_table entry, share it. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.663132781@infradead.org commit 8bfafcdccb52e770695b12530b1f800fe98b16b1 Author: Peter Zijlstra Date: Thu May 6 21:33:55 2021 +0200 jump_label, x86: Strip ASM jump_label support In prepration for variable size jump_label support; remove all ASM bits, which are currently unused. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.599716762@infradead.org commit 80870e6ece78ce67b91398db88fb6b92a178f574 Author: Peter Zijlstra Date: Thu May 6 21:33:54 2021 +0200 x86, objtool: Dont exclude arch/x86/realmode/ Specifically, init.c uses jump_labels. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.516200011@infradead.org commit 25cf0d8aa2a3440ed32bf1f8df1310d6baf3f1e8 Author: Peter Zijlstra Date: Thu May 6 21:33:53 2021 +0200 objtool: Rewrite hashtable sizing Currently objtool has 5 hashtables and sizes them 16 or 20 bits depending on the --vmlinux argument. However, a single side doesn't really work well for the 5 tables, which among them, cover 3 different uses. Also, while vmlinux is larger, there is still a very wide difference between a defconfig and allyesconfig build, which again isn't optimally covered by a single size. Another aspect is the cost of elf_hash_init(), which for large tables dominates the runtime for small input files. It turns out that all it does it assign NULL, something that is required when using malloc(). However, when we allocate memory using mmap(), we're guaranteed to get zero filled pages. Therefore, rewrite the whole thing to: 1) use more dynamic sized tables, depending on the input file, 2) avoid the need for elf_hash_init() entirely by using mmap(). This speeds up a regular kernel build (100s to 98s for x86_64-defconfig), and potentially dramatically speeds up vmlinux processing. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506194157.452881700@infradead.org commit 66079522883603d08a1b7f4153400d8c60705dcf Author: Christian König Date: Wed May 5 12:04:16 2021 +0200 MAINTAINERS: Add Xinhui Pan as another AMDGPU contact Since Chunming Zhou left AMD last year we are down to only two maintainers once more. So add Xinhu Pan as another contact as well. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Xinhui Pan Link: https://patchwork.freedesktop.org/patch/msgid/20210505110146.11689-1-christian.koenig@amd.com commit c9f2e3c3ddab87d93cde99f6da10dd00c1d1edb9 Author: Vitaly Rodionov Date: Tue May 11 15:52:20 2021 +0100 ASoC: cs42l42: make HSBIAS_SENSE_EN optional HSBIAS_SENSE_EN configures HSBIAS output current sense through the external 2.21-k resistor. HSBIAS_SENSE is hardware feature to reduce the potential pop noise during the headset plug out slowly. But on some platforms ESD voltage will affect it causing test to fail, especially with CTIA headset type. For different hardware setups, a designer might want to tweak default behavior. Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210511145220.125760-1-vitalyr@opensource.cirrus.com Signed-off-by: Mark Brown commit 9b7493468fa7eeef2e86b8c646c0535c00eed3e2 Author: Nathan Chancellor Date: Tue May 11 12:03:06 2021 -0700 ASoC: q6dsp: Undo buggy warning fix This reverts commit 5f1b95d08de712327e452d082a50fded435ec884. The warnings that commit 5f1b95d08de7 ("ASoC: q6dsp: q6afe: remove unneeded dead-store initialization") was trying to fix were already fixed in commit 12900bacb4f3 ("ASoC: qcom: q6afe: remove useless assignments"). With both commits in the tree, port_id is uninitialized, as pointed out by clang: sound/soc/qcom/qdsp6/q6afe.c:1213:18: warning: variable 'port_id' is uninitialized when used here [-Wuninitialized] stop->port_id = port_id; ^~~~~~~ sound/soc/qcom/qdsp6/q6afe.c:1186:13: note: initialize the variable 'port_id' to silence this warning int port_id; ^ = 0 1 warning generated. Bring back the initialization so that everything works as intended. Fixes: 5f1b95d08de7 ("ASoC: q6dsp: q6afe: remove unneeded dead-store initialization") Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210511190306.2418917-1-nathan@kernel.org Signed-off-by: Mark Brown commit 7fe0b0981a1764d665877fa5febc5e8e0e64d2ea Author: Simon Trimmer Date: Tue May 11 18:15:14 2021 +0100 ASoC: wm2200: remove include of wmfw.h We want all wm_adsp clients to use the wm_adsp.h header as they shouldn't need to include internal sub-headers. Signed-off-by: Simon Trimmer Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210511171514.270219-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 130dbe04d42817b62577a48346837122a00e794f Author: Simon Trimmer Date: Tue May 11 18:14:59 2021 +0100 ASoC: wm_adsp: mark more data structures with the const qualifier The callback structures and memory region type table can be marked as const as they will not change during use. Fix checkpatch warning against wm_adsp_find_region function by moving const keyword to form the 'static const struct' pattern. Signed-off-by: Simon Trimmer Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210511171459.270169-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown commit 24e46fb811e991f56d5694b10ae7ceb8d2b8c846 Author: Pierre-Louis Bossart Date: Tue May 11 16:37:02 2021 -0500 ASoC: Intel: bxt_da7219_max98357a: shrink platform_id below 20 characters Sparse throwns the following warnings: sound/soc/intel/boards/bxt_da7219_max98357a.c:843:19: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/bxt_da7219_max98357a.c:844:19: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/bxt_da7219_max98357a.c:845:19: error: too long initializer-string for array of char(no space for nul char) Fix by using the 'mx' acronyn for Maxim Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210511213707.32958-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 48a7e6e5b2c90abf06c7c299f2ba94c7415bb8ea Author: Pierre-Louis Bossart Date: Tue May 11 16:37:01 2021 -0500 ASoC: Intel: sof_cs42l42: shrink platform id below 20 characters The platform_id is too long and is flagged by a sparse warning: sound/soc/intel/boards/sof_cs42l42.c:483:25: error: too long initializer-string for array of char(no space for nul char) fix by using the 'mx' acronym for Maxim Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210511213707.32958-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ad839121dd4cece991b995a4bbe83fdeac45ccd0 Author: Pierre-Louis Bossart Date: Tue May 11 16:36:59 2021 -0500 ASoC: SOF: Intel: hda: fix index used in inner loop With more warnings than the default, Sparse throws the following warning: sound/soc/sof/intel/hda.c:1127:49: error: self-comparison always evaluates to true sound/soc/sof/intel/hda.c:1128:49: error: self-comparison always evaluates to true sound/soc/sof/intel/hda.c:1129:48: error: self-comparison always evaluates to true This looks like an obvious error, with a likely copy-pasted line leading to the use of the wrong index in an inner loop. One of the worst single-character bugs in a long time. This problem was not detected in our tests since in practice SoundWire platforms only have identical devices per link and the index mistake did not change the results. Fixes: 6f5d506d7ff1dq ('ASoC: SOF: Intel: SoundWire: refine ACPI match') Reviewed-by: Paul Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210511213707.32958-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6453b9532b5f77d19837b159c4d074f0af9f141b Author: Andy Shevchenko Date: Mon May 10 22:46:33 2021 +0300 gpio: xilinx: No need to disable IRQs in the handler In IRQ handler interrupts are already disabled, hence no need to repeat it. Even in the threaded case, it is not a problem because IRQ framework keeps interrupt disabled there as well. Remove disabling IRQ part in the handler. Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas Signed-off-by: Bartosz Golaszewski commit 02b3f84d9080b0f4297f31258307f626a43faba5 Author: Andy Shevchenko Date: Mon May 10 22:46:32 2021 +0300 gpio: xilinx: Switch to use bitmap APIs It seems that Xilinx GPIO driver operates with bit arrays longer than 32 and thus can leverage bitmap APIs for that. It makes code better to understand. The ->probe() function is modified to try read properties for both channels since is_dual check makes only sense for the amount of pins used for the second channel. On top of that kzalloc() guarantees zero initial values for the fields in the private data structure, hence drop unneeded conditionals and assignments. The change is inspired by Syed Nayyar Waris' ideas about bitmap API extension. Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas Signed-off-by: Bartosz Golaszewski commit 043aa3db1cbb51251849c262c4c549b665ad93de Author: Andy Shevchenko Date: Mon May 10 22:46:31 2021 +0300 gpio: xilinx: Introduce xgpio_read_chan() / xgpio_write_chan() With the new helpers, i.e. xgpio_read_chan() / xgpio_write_chan(), the code is easier to read and maintain. No functional changes intended. Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas Signed-off-by: Bartosz Golaszewski commit cde3d0f81e67f21f1f61fd895255f2e3b86f5bed Author: Andy Shevchenko Date: Mon May 10 22:46:29 2021 +0300 bitmap: Make bitmap_remap() and bitmap_bitremap() available to users Currently the bitmap_remap() and bitmap_bitremap() are available only for CONFIG_NUMA=y case, while some users may benefit out of it and being independent to NUMA code. Make them available to users by moving out of ifdeffery and exporting for modules. Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas Acked-by: Yury Norov Signed-off-by: Bartosz Golaszewski commit f2e03ca3e839e2a2d80c4c764ab07b293ad5a576 Author: Andy Shevchenko Date: Mon May 10 22:52:21 2021 +0300 gpiolib: Drop duplicate offset check in gpiochip_is_requested() gpiochip_get_desc() already does the check, drop a duplicate in gpiochip_is_requested(). Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e7d8fde4ab50bfe354c4a1a55096b408ce0ffcec Author: Andy Shevchenko Date: Mon May 10 22:52:52 2021 +0300 gpio: mockup: Switch to use gpiochip_get_desc() Switch to use gpiochip_get_desc() helper. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit c35fb576652dfa1c9692f0a2701b37d813ea75af Author: Zhen Lei Date: Tue May 11 18:06:46 2021 +0800 gpio: logicvc: Remove redundant error printing in logicvc_gpio_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Bartosz Golaszewski commit 63c4acfb8031fbcd50cf51cb94aaadc816d99c7c Author: Johan Jonker Date: Tue May 11 07:05:08 2021 +0200 dt-bindings: gpio: convert rk3328-grf-gpio.txt to YAML Current dts files with RK3328 GRF 'gpio' nodes are manually verified. In order to automate this process rk3328-grf-gpio.txt has to be converted to YAML. Rename 'grf-gpio' nodename to 'gpio'. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit f1a0a376ca0c4ef1fc3d24e3e502acbb5b795674 Author: Valentin Schneider Date: Wed May 12 10:46:36 2021 +0100 sched/core: Initialize the idle task with preemption disabled As pointed out by commit de9b8f5dcbd9 ("sched: Fix crash trying to dequeue/enqueue the idle thread") init_idle() can and will be invoked more than once on the same idle task. At boot time, it is invoked for the boot CPU thread by sched_init(). Then smp_init() creates the threads for all the secondary CPUs and invokes init_idle() on them. As the hotplug machinery brings the secondaries to life, it will issue calls to idle_thread_get(), which itself invokes init_idle() yet again. In this case it's invoked twice more per secondary: at _cpu_up(), and at bringup_cpu(). Given smp_init() already initializes the idle tasks for all *possible* CPUs, no further initialization should be required. Now, removing init_idle() from idle_thread_get() exposes some interesting expectations with regards to the idle task's preempt_count: the secondary startup always issues a preempt_disable(), requiring some reset of the preempt count to 0 between hot-unplug and hotplug, which is currently served by idle_thread_get() -> idle_init(). Given the idle task is supposed to have preemption disabled once and never see it re-enabled, it seems that what we actually want is to initialize its preempt_count to PREEMPT_DISABLED and leave it there. Do that, and remove init_idle() from idle_thread_get(). Secondary startups were patched via coccinelle: @begone@ @@ -preempt_disable(); ... cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210512094636.2958515-1-valentin.schneider@arm.com commit af4c1a8613389273acef14ba6b481037e949a318 Author: Gerd Hoffmann Date: Tue May 11 12:45:22 2021 +0200 drm/qxl: balance dumb_shadow_bo pin The shadow bo is created in pinned state, so we have to unpin it when dropping the reference. Otherwise ttm is unhappy and throws a WARN() on release. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210511104522.2694803-3-kraxel@redhat.com commit 1d878df018611abdff1e96d275b4bbd86d030223 Author: Gerd Hoffmann Date: Tue May 11 12:45:21 2021 +0200 drm/qxl: drop redundant code Not needed, qxl_io_destroy_primary() does that for us. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210511104522.2694803-2-kraxel@redhat.com commit 1bc67873d401e6c2e6e30be7fef21337db07a042 Author: Borislav Petkov Date: Wed May 12 11:33:10 2021 +0200 x86/asm: Simplify __smp_mb() definition Drop the bitness ifdeffery in favor of using _ASM_SP, which is the helper macro for the rSP register specification for 32 and 64 bit depending on the build. No functional changes. Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210512093310.5635-1-bp@alien8.de commit 64e1f5872a8c3d80bce4686b4ab5dbc6e6bd30c5 Author: Pavel Skripkin Date: Thu May 6 22:07:26 2021 +0300 x86/alternatives: Make the x86nops[] symbol static Sparse says: arch/x86/kernel/alternative.c:78:21: warning: symbol 'x86nops' was not declared. Should it be static? Since x86nops[] is not used outside this file, Sparse is right and it can be made static. Signed-off-by: Pavel Skripkin Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210506190726.15575-1-paskripkin@gmail.com commit 9f26990074931bbf797373e53104216059b300b1 Author: Chris Hyser Date: Wed Mar 24 17:40:16 2021 -0400 kselftest: Add test for core sched prctl interface Provides a selftest and examples of using the interface. [peterz: updated to not use sched_debug] Signed-off-by: Chris Hyser Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123309.100860030@infradead.org commit 7ac592aa35a684ff1858fb9ec282886b9e3575ac Author: Chris Hyser Date: Wed Mar 24 17:40:15 2021 -0400 sched: prctl() core-scheduling interface This patch provides support for setting and copying core scheduling 'task cookies' between threads (PID), processes (TGID), and process groups (PGID). The value of core scheduling isn't that tasks don't share a core, 'nosmt' can do that. The value lies in exploiting all the sharing opportunities that exist to recover possible lost performance and that requires a degree of flexibility in the API. From a security perspective (and there are others), the thread, process and process group distinction is an existent hierarchal categorization of tasks that reflects many of the security concerns about 'data sharing'. For example, protecting against cache-snooping by a thread that can just read the memory directly isn't all that useful. With this in mind, subcommands to CREATE/SHARE (TO/FROM) provide a mechanism to create and share cookies. CREATE/SHARE_TO specify a target pid with enum pidtype used to specify the scope of the targeted tasks. For example, PIDTYPE_TGID will share the cookie with the process and all of it's threads as typically desired in a security scenario. API: prctl(PR_SCHED_CORE, PR_SCHED_CORE_GET, tgtpid, pidtype, &cookie) prctl(PR_SCHED_CORE, PR_SCHED_CORE_CREATE, tgtpid, pidtype, NULL) prctl(PR_SCHED_CORE, PR_SCHED_CORE_SHARE_TO, tgtpid, pidtype, NULL) prctl(PR_SCHED_CORE, PR_SCHED_CORE_SHARE_FROM, srcpid, pidtype, NULL) where 'tgtpid/srcpid == 0' implies the current process and pidtype is kernel enum pid_type {PIDTYPE_PID, PIDTYPE_TGID, PIDTYPE_PGID, ...}. For return values, EINVAL, ENOMEM are what they say. ESRCH means the tgtpid/srcpid was not found. EPERM indicates lack of PTRACE permission access to tgtpid/srcpid. ENODEV indicates your machines lacks SMT. [peterz: complete rewrite] Signed-off-by: Chris Hyser Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123309.039845339@infradead.org commit 85dd3f61203c5cfa72b308ff327b5fbf3fc1ce5e Author: Peter Zijlstra Date: Mon Mar 29 15:18:35 2021 +0200 sched: Inherit task cookie on fork() Note that sched_core_fork() is called from under tasklist_lock, and not from sched_fork() earlier. This avoids a few races later. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.980003687@infradead.org commit 6e33cad0af49336952e5541464bd02f5b5fd433e Author: Peter Zijlstra Date: Fri Mar 26 18:55:06 2021 +0100 sched: Trivial core scheduling cookie management In order to not have to use pid_struct, create a new, smaller, structure to manage task cookies for core scheduling. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.919768100@infradead.org commit 97886d9dcd86820bdbc1fa73b455982809cbc8c2 Author: Aubrey Li Date: Wed Mar 24 17:40:13 2021 -0400 sched: Migration changes for core scheduling - Don't migrate if there is a cookie mismatch Load balance tries to move task from busiest CPU to the destination CPU. When core scheduling is enabled, if the task's cookie does not match with the destination CPU's core cookie, this task may be skipped by this CPU. This mitigates the forced idle time on the destination CPU. - Select cookie matched idle CPU In the fast path of task wakeup, select the first cookie matched idle CPU instead of the first idle CPU. - Find cookie matched idlest CPU In the slow path of task wakeup, find the idlest CPU whose core cookie matches with task's cookie Signed-off-by: Aubrey Li Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.860083871@infradead.org commit d2dfa17bc7de67e99685c4d6557837bf801a102c Author: Peter Zijlstra Date: Tue Nov 17 18:19:43 2020 -0500 sched: Trivial forced-newidle balancer When a sibling is forced-idle to match the core-cookie; search for matching tasks to fill the core. rcu_read_unlock() can incur an infrequent deadlock in sched_core_balance(). Fix this by using the RCU-sched flavor instead. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.800048269@infradead.org commit c6047c2e3af68dae23ad884249e0d42ff28d2d1b Author: Joel Fernandes (Google) Date: Tue Nov 17 18:19:39 2020 -0500 sched/fair: Snapshot the min_vruntime of CPUs on force idle During force-idle, we end up doing cross-cpu comparison of vruntimes during pick_next_task. If we simply compare (vruntime-min_vruntime) across CPUs, and if the CPUs only have 1 task each, we will always end up comparing 0 with 0 and pick just one of the tasks all the time. This starves the task that was not picked. To fix this, take a snapshot of the min_vruntime when entering force idle and use it for comparison. This min_vruntime snapshot will only be used for cross-CPU vruntime comparison, and nothing else. A note about the min_vruntime snapshot and force idling: During selection: When we're not fi, we need to update snapshot. when we're fi and we were not fi, we must update snapshot. When we're fi and we were already fi, we must not update snapshot. Which gives: fib fi update 0 0 1 0 1 1 1 0 1 1 1 0 Where: fi: force-idled now fib: force-idled before So the min_vruntime snapshot needs to be updated when: !(fib && fi). Also, the cfs_prio_less() function needs to be aware of whether the core is in force idle or not, since it will be use this information to know whether to advance a cfs_rq's min_vruntime_fi in the hierarchy. So pass this information along via pick_task() -> prio_less(). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.738542617@infradead.org commit 7afbba119f0da09824d723f8081608ea1f74ff57 Author: Joel Fernandes (Google) Date: Tue Nov 17 18:19:42 2020 -0500 sched: Fix priority inversion of cookied task with sibling The rationale is as follows. In the core-wide pick logic, even if need_sync == false, we need to go look at other CPUs (non-local CPUs) to see if they could be running RT. Say the RQs in a particular core look like this: Let CFS1 and CFS2 be 2 tagged CFS tags. Let RT1 be an untagged RT task. rq0 rq1 CFS1 (tagged) RT1 (no tag) CFS2 (tagged) Say schedule() runs on rq0. Now, it will enter the above loop and pick_task(RT) will return NULL for 'p'. It will enter the above if() block and see that need_sync == false and will skip RT entirely. The end result of the selection will be (say prio(CFS1) > prio(CFS2)): rq0 rq1 CFS1 IDLE When it should have selected: rq0 rq1 IDLE RT Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.678425748@infradead.org commit 8039e96fcc1de30d5bcaf05da9ca2de46a800826 Author: Vineeth Pillai Date: Tue Nov 17 18:19:38 2020 -0500 sched/fair: Fix forced idle sibling starvation corner case If there is only one long running local task and the sibling is forced idle, it might not get a chance to run until a schedule event happens on any cpu in the core. So we check for this condition during a tick to see if a sibling is starved and then give it a chance to schedule. Signed-off-by: Vineeth Pillai Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.617407840@infradead.org commit 539f65125d20aacab54d02d77f10a839f45b09dc Author: Peter Zijlstra Date: Tue Nov 17 18:19:37 2020 -0500 sched: Add core wide task selection and scheduling Instead of only selecting a local task, select a task for all SMT siblings for every reschedule on the core (irrespective which logical CPU does the reschedule). Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.557559654@infradead.org commit 8a311c740b53324ec584e0e3bb7077d56b123c28 Author: Peter Zijlstra Date: Tue Nov 17 18:19:36 2020 -0500 sched: Basic tracking of matching tasks Introduce task_struct::core_cookie as an opaque identifier for core scheduling. When enabled; core scheduling will only allow matching task to be on the core; where idle matches everything. When task_struct::core_cookie is set (and core scheduling is enabled) these tasks are indexed in a second RB-tree, first on cookie value then on scheduling function, such that matching task selection always finds the most elegible match. NOTE: *shudder* at the overhead... NOTE: *sigh*, a 3rd copy of the scheduling function; the alternative is per class tracking of cookies and that just duplicates a lot of stuff for no raisin (the 2nd copy lives in the rt-mutex PI code). [Joel: folded fixes] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.496975854@infradead.org commit 21f56ffe4482e501b9e83737612493eeaac21f5a Author: Peter Zijlstra Date: Tue Nov 17 18:19:32 2020 -0500 sched: Introduce sched_class::pick_task() Because sched_class::pick_next_task() also implies sched_class::set_next_task() (and possibly put_prev_task() and newidle_balance) it is not state invariant. This makes it unsuitable for remote task selection. Signed-off-by: Peter Zijlstra (Intel) [Vineeth: folded fixes] Signed-off-by: Vineeth Remanan Pillai Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.437092775@infradead.org commit 875feb41fd20f6bd6054c9e79a5bcd9da6d8d2b2 Author: Peter Zijlstra Date: Mon Mar 29 10:08:58 2021 +0200 sched: Allow sched_core_put() from atomic context Stuff the meat of sched_core_put() into a work such that we can use sched_core_put() from atomic context. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.377455632@infradead.org commit 9ef7e7e33bcdb57be1afb28884053c28b5f05240 Author: Peter Zijlstra Date: Wed Mar 3 16:45:41 2021 +0100 sched: Optimize rq_lockp() usage rq_lockp() includes a static_branch(), which is asm-goto, which is asm volatile which defeats regular CSE. This means that: if (!static_branch(&foo)) return simple; if (static_branch(&foo) && cond) return complex; Doesn't fold and we get horrible code. Introduce __rq_lockp() without the static_branch() on. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.316696988@infradead.org commit 9edeaea1bc452372718837ed2ba775811baf1ba1 Author: Peter Zijlstra Date: Tue Nov 17 18:19:34 2020 -0500 sched: Core-wide rq->lock Introduce the basic infrastructure to have a core wide rq->lock. This relies on the rq->__lock order being in increasing CPU number (inside a core). It is also constrained to SMT8 per lockdep (and SMT256 per preempt_count). Luckily SMT8 is the max supported SMT count for Linux (Mips, Sparc and Power are known to have this). Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/YJUNfzSgptjX7tG6@hirez.programming.kicks-ass.net commit d66f1b06b5b438cd20ba3664b8eef1f9c79e84bf Author: Peter Zijlstra Date: Tue Mar 2 12:16:48 2021 +0100 sched: Prepare for Core-wide rq->lock When switching on core-sched, CPUs need to agree which lock to use for their RQ. The new rule will be that rq->core_enabled will be toggled while holding all rq->__locks that belong to a core. This means we need to double check the rq->core_enabled value after each lock acquire and retry if it changed. This also has implications for those sites that take multiple RQ locks, they need to be careful that the second lock doesn't end up being the first lock. Verify the lock pointer after acquiring the first lock, because if they're on the same core, holding any of the rq->__lock instances will pin the core state. While there, change the rq->__lock order to CPU number, instead of rq address, this greatly simplifies the next patch. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/YJUNY0dmrJMD/BIm@hirez.programming.kicks-ass.net commit 5cb9eaa3d274f75539077a28cf01e3563195fa53 Author: Peter Zijlstra Date: Tue Nov 17 18:19:31 2020 -0500 sched: Wrap rq::lock access In preparation of playing games with rq->lock, abstract the thing using an accessor. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.136465446@infradead.org commit 39d371b7c0c299d489041884d005aacc4bba8c15 Author: Peter Zijlstra Date: Tue Mar 2 12:13:13 2021 +0100 sched: Provide raw_spin_rq_*lock*() helpers In prepration for playing games with rq->lock, add some rq_lock wrappers. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.075967879@infradead.org commit 9099a14708ce1dfecb6002605594a0daa319b555 Author: Peter Zijlstra Date: Tue Nov 17 18:19:35 2020 -0500 sched/fair: Add a few assertions Signed-off-by: Peter Zijlstra (Intel) Tested-by: Don Hiatt Tested-by: Hongyu Ning Tested-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210422123308.015639083@infradead.org commit 0cd7c741f01de13dc1eecf22557593b3514639bb Author: Peter Zijlstra Date: Mon May 10 14:01:00 2021 +0200 delayacct: Add sysctl to enable at runtime Just like sched_schedstats, allow runtime enabling (and disabling) of delayacct. This is useful if one forgot to add the delayacct boot time option. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/YJkhebGJAywaZowX@hirez.programming.kicks-ass.net commit e4042ad492357fa995921376462b04a025dd53b6 Author: Peter Zijlstra Date: Tue May 4 22:43:32 2021 +0200 delayacct: Default disabled Assuming this stuff isn't actually used much; disable it by default and avoid allocating and tracking the task_delay_info structure. taskstats is changed to still report the regular sched and sched_info and only skip the missing task_delay_info fields instead of not reporting anything. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210505111525.308018373@infradead.org commit eee4d9fee2544389e5ce5697ed92db67c86d7a9f Author: Peter Zijlstra Date: Tue May 4 22:43:36 2021 +0200 delayacct: Add static_branch in scheduler hooks Cheaper when delayacct is disabled. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Balbir Singh Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210505111525.248028369@infradead.org commit 63b3f96e1a989846a5a521d4fbef4bc86406929d Author: Peter Zijlstra Date: Tue May 4 22:43:39 2021 +0200 kvm: Select SCHED_INFO instead of TASK_DELAY_ACCT AFAICT KVM only relies on SCHED_INFO. Nothing uses the p->delays data that belongs to TASK_DELAY_ACCT. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Paolo Bonzini Acked-by: Marc Zyngier Acked-by: Balbir Singh Link: https://lkml.kernel.org/r/20210505111525.187225172@infradead.org commit c5895d3f06cbb80ccb311f1dcb37074651030cb6 Author: Peter Zijlstra Date: Tue May 4 22:43:42 2021 +0200 sched: Simplify sched_info_on() The situation around sched_info is somewhat complicated, it is used by sched_stats and delayacct and, indirectly, kvm. If SCHEDSTATS=Y (but disabled by default) sched_info_on() is unconditionally true -- this is the case for all distro kernel configs I checked. If for some reason SCHEDSTATS=N, but TASK_DELAY_ACCT=Y, then sched_info_on() can return false when delayacct is disabled, presumably because there would be no other users left; except kvm is. Instead of complicating matters further by accurately accounting sched_stat and kvm state, simply unconditionally enable when SCHED_INFO=Y, matching the common distro case. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210505111525.121458839@infradead.org commit 4e29fb709885eda5f0d1fa3418e6ead01a64e46d Author: Peter Zijlstra Date: Tue May 4 22:43:45 2021 +0200 sched: Rename sched_info_{queued,dequeued} For consistency, rename {queued,dequeued} to {enqueue,dequeue}. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rik van Riel Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner Acked-by: Balbir Singh Link: https://lkml.kernel.org/r/20210505111525.061402904@infradead.org commit 4b7a08a0b6e4e910a6feee438d76e426381df0cb Author: Peter Zijlstra Date: Tue May 4 22:43:48 2021 +0200 delayacct: Use sched_clock() Like all scheduler statistics, use sched_clock() based time. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rik van Riel Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner Acked-by: Balbir Singh Link: https://lkml.kernel.org/r/20210505111525.001031466@infradead.org commit 619e090c8e409e09bd3e8edcd5a73d83f689890c Author: Pierre Gondois Date: Tue May 4 10:07:43 2021 +0100 sched/fair: Fix negative energy delta in find_energy_efficient_cpu() find_energy_efficient_cpu() (feec()) searches the best energy CPU to place a task on. To do so, compute_energy() estimates the energy impact of placing the task on a CPU, based on CPU and task utilization signals. Utilization signals can be concurrently updated while evaluating a performance domain (pd). In some cases, this leads to having a 'negative delta', i.e. placing the task in the pd is seen as an energy gain. Thus, any further energy comparison is biased. In case of a 'negative delta', return prev_cpu since: 1. a 'negative delta' happens in less than 0.5% of feec() calls, on a Juno with 6 CPUs (4 little, 2 big) 2. it is unlikely to have two consecutive 'negative delta' for a task, so if the first call fails, feec() will correctly place the task in the next feec() call 3. EAS current behavior tends to select prev_cpu if the task doesn't raise the OPP of its current pd. prev_cpu is EAS's generic decision 4. prev_cpu should be preferred to returning an error code. In the latter case, select_idle_sibling() would do the placement, selecting a big (and not energy efficient) CPU. As 3., the task would potentially reside on the big CPU for a long time Reported-by: Xuewen Yan Suggested-by: Xuewen Yan Signed-off-by: Pierre Gondois Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Lukasz Luba Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Donnefort Link: https://lkml.kernel.org/r/20210504090743.9688-3-Pierre.Gondois@arm.com commit 8d4c97c105ca0735b0d972d1025cb150a7008451 Author: Pierre Gondois Date: Tue May 4 10:07:42 2021 +0100 sched/fair: Only compute base_energy_pd if necessary find_energy_efficient_cpu() searches the best energy CPU to place a task on. To do so, the energy of each performance domain (pd) is computed w/ and w/o the task placed on it. The energy of a pd w/o the task (base_energy_pd) is computed prior knowing whether a CPU is available in the pd. Move the base_energy_pd computation after looping through the CPUs of a pd and only compute it if at least one CPU is available. Suggested-by: Xuewen Yan Signed-off-by: Pierre Gondois Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Lukasz Luba Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Donnefort Link: https://lkml.kernel.org/r/20210504090743.9688-2-Pierre.Gondois@arm.com commit e5e678e4fea26d73444f4427cbbaeab4fa79ecee Author: Rik van Riel Date: Thu Apr 22 13:02:36 2021 -0400 sched,fair: Skip newidle_balance if a wakeup is pending The try_to_wake_up function has an optimization where it can queue a task for wakeup on its previous CPU, if the task is still in the middle of going to sleep inside schedule(). Once schedule() re-enables IRQs, the task will be woken up with an IPI, and placed back on the runqueue. If we have such a wakeup pending, there is no need to search other CPUs for runnable tasks. Just skip (or bail out early from) newidle balancing, and run the just woken up task. For a memcache like workload test, this reduces total CPU use by about 2%, proportionally split between user and system time, and p99 and p95 application response time by 10% on average. The schedstats run_delay number shows a similar improvement. Signed-off-by: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/20210422130236.0bb353df@imladris.surriel.com commit bfebd42d5609848de3c5b5723e56f2e6f08ca8ec Author: Daniel Vetter Date: Thu May 6 15:23:43 2021 +0200 drm/modifiers: Enforce consistency between the cap an IN_FORMATS It's very confusing for userspace to have to deal with inconsistencies here, and some drivers screwed this up a bit. Most just ommitted the format list when they meant to say that only linear modifier is allowed, but some also meant that only implied modifiers are acceptable (because actually none of the planes registered supported modifiers). Now that this is all done consistently across all drivers, document the rules and enforce it in the drm core. v2: - Make the capability a link (Simon) - Note that all is lost before 5.1. v3: - Use drm_WARN_ON (Lyude) Acked-by: Pekka Paalanen Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Acked-by: Maxime Ripard Cc: Simon Ser Reviewed-by: Lucas Stach Cc: Pekka Paalanen Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210506132343.2873699-1-daniel.vetter@ffwll.ch commit dda6024b57c03f2f7708f019ba6511743d5f5630 Author: kernel test robot Date: Wed May 12 00:11:23 2021 +0800 drm: fix semicolon.cocci warnings drivers/gpu/drm/kmb/kmb_dsi.c:284:3-4: Unneeded semicolon drivers/gpu/drm/kmb/kmb_dsi.c:304:3-4: Unneeded semicolon drivers/gpu/drm/kmb/kmb_dsi.c:321:3-4: Unneeded semicolon drivers/gpu/drm/kmb/kmb_dsi.c:340:3-4: Unneeded semicolon drivers/gpu/drm/kmb/kmb_dsi.c:364:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: ade896460e4a ("drm: DRM_KMB_DISPLAY should depend on ARCH_KEEMBAY") CC: Geert Uytterhoeven Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210511161123.GA21597@90a0f0cadc2d commit 727ecd99a4c91cd08cea7301d0e97d81d2d11d20 Author: Matthew Auld Date: Tue May 11 18:03:56 2021 +0100 drm/doc/rfc: drop the i915_gem_lmem.h header The proper headers have now landed in include/uapi/drm/i915_drm.h, so we can drop i915_gem_lmem.h and instead just reference the real headers for pulling in the kernel doc. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210511170356.430284-1-matthew.auld@intel.com commit 2b8ca1a907d5fffc85fb648bbace28ddf3420825 Author: Oleg Nesterov Date: Mon May 10 18:15:22 2021 +0200 sched/core: Remove the pointless BUG_ON(!task) from wake_up_q() container_of() can never return NULL - so don't check for it pointlessly. [ mingo: Twiddled the changelog. ] Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510161522.GA32644@redhat.com commit 9ddcb87b9218dec760e8d8a780bc8ad514c3d36a Author: H. Peter Anvin Date: Mon May 10 11:53:15 2021 -0700 x86/regs: Syscall_get_nr() returns -1 for a non-system call syscall_get_nr() is defined to return -1 for a non-system call or a ptrace/seccomp restart; not just any arbitrary number. See comment in for the official definition of this function. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510185316.3307264-7-hpa@zytor.com commit 29e9758966f47004bd7245e6adadcb708386f36a Author: H. Peter Anvin (Intel) Date: Mon May 10 11:53:14 2021 -0700 x86/entry: Split PUSH_AND_CLEAR_REGS into two submacros PUSH_AND_CLEAR_REGS, as the name implies, performs two functions: pushing registers and clearing registers. They don't necessarily have to be performed in immediate sequence, although all current users do. Split it into two macros for the case where that isn't desired; the FRED enabling patchset will eventually make use of this. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510185316.3307264-6-hpa@zytor.com commit 6de4ac1d03f75248974a398110b15af0bfe65a11 Author: H. Peter Anvin (Intel) Date: Mon May 10 11:53:13 2021 -0700 x86/syscall: Maximize MSR_SYSCALL_MASK It is better to clear as many flags as possible when we do a system call entry, as opposed to the other way around. The fewer flags we keep, the lesser the possible interference between the kernel and user space. The flags changed are: - CF, PF, AF, ZF, SF, OF: these are arithmetic flags which affect branches, possibly speculatively. They should be cleared for the same reasons we now clear all GPRs on entry. - RF: suppresses a code breakpoint on the subsequent instruction. It is probably impossible to enter the kernel with RF set, but if it is somehow not, it would break a kernel debugger setting a breakpoint on the entry point. Either way, user space should not be able to control kernel behavior here. - ID: this flag has no direct effect (it is a scratch bit only.) However, there is no reason to retain the user space value in the kernel, and the standard should be to clear unless needed, not the other way around. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510185316.3307264-5-hpa@zytor.com commit dce0aa3b2ef28900cc4c779c59a870f1b4bdadee Author: H. Peter Anvin (Intel) Date: Mon May 10 11:53:12 2021 -0700 x86/syscall: Unconditionally prototype {ia32,x32}_sys_call_table[] Even if these APIs are disabled, and the arrays therefore do not exist, having the prototypes allows us to use IS_ENABLED() rather than using #ifdefs. If something ends up trying to actually *use* these arrays a linker error will ensue. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510185316.3307264-4-hpa@zytor.com commit 3e5e7f7736b05d5fdf2cc4e0ba4f2d8bc42c630d Author: H. Peter Anvin (Intel) Date: Mon May 10 11:53:11 2021 -0700 x86/entry: Reverse arguments to do_syscall_64() Reverse the order of arguments to do_syscall_64() so that the first argument is the pt_regs pointer. This is not only consistent with *all* other entry points from assembly, but it actually makes the compiled code slightly better. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510185316.3307264-3-hpa@zytor.com commit 6627eb25e40cc8d135d3f8d5391851d18ac497d7 Author: H. Peter Anvin (Intel) Date: Mon May 10 11:53:10 2021 -0700 x86/entry: Unify definitions from and The register offsets in are duplicated in entry/calling.h, but are formatted differently and therefore not compatible. Use the version from consistently. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510185316.3307264-2-hpa@zytor.com commit 440e906702410f59ae5397ec9e3b639edb53f80e Author: Guenter Roeck Date: Mon May 10 15:48:49 2021 -0700 perf/x86/intel/uncore: Drop unnecessary NULL checks after container_of() The parameter passed to the pmu_enable() and pmu_disable() functions can not be NULL because it is dereferenced by the caller. That means the result of container_of() on that parameter can also never be NULL. The existing NULL checks are therefore unnecessary and misleading. Remove them. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510224849.2349861-1-linux@roeck-us.net commit 88a9c5485c48ab60c89612a17fc89f4162bbdb9d Author: Ankit Nautiyal Date: Tue May 11 17:39:30 2021 +0530 drm/i915: Use correct downstream caps for check Src-Ctl mode for PCON Fix the typo in DPCD caps used for checking SRC CTL mode of HDMI2.1 PCON v2: Corrected Fixes tag (Jani Nikula). v3: Rebased. Fixes: 04b6603d13be ("drm/i915/display: Configure HDMI2.1 Pcon for FRL only if Src-Ctl mode is available") Cc: Ankit Nautiyal Cc: Uma Shankar Cc: Jani Nikula Cc: "Ville Syrj_l_" Cc: Imre Deak Cc: Manasi Navare Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: Sean Paul Signed-off-by: Ankit Nautiyal Reviewed-by: Swati Sharma Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210511120930.12218-1-ankit.k.nautiyal@intel.com commit e207457f9045343a24d936fbb67eb4b412f1c6ad Author: Zou Wei Date: Wed May 12 11:14:43 2021 +0800 reset: brcmstb: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Fixes: 77750bc089e4 ("reset: Add Broadcom STB SW_INIT reset controller driver") Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620789283-15048-1-git-send-email-zou_wei@huawei.com Signed-off-by: Philipp Zabel commit 50610b74eea70eafedc47db4ee2ed372aca77c1c Author: Alex Deucher Date: Fri May 7 16:33:28 2021 -0400 drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not defined Fixes: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_initialize_drm_device’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3726:7: error: implicit declaration of function ‘register_outbox_irq_handlers’; did you mean ‘register_hpd_handlers’? [-Werror=implicit-function-declaration] 3726 | if (register_outbox_irq_handlers(dm->adev)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | register_hpd_handlers Fixes: 81927e2808be ("drm/amd/display: Support for DMUB AUX") Reviewed-by: Jude Shih Signed-off-by: Alex Deucher Cc: Jude Shish commit 610e6f7ea5bf50d33f764e330ea517b9cc95d320 Author: Alex Deucher Date: Fri May 7 16:29:33 2021 -0400 drm/amdgpu/display: fix warning when CONFIG_DRM_AMD_DC_DCN is not defined Fixes: At top level: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:633:13: warning: ‘dm_dmub_outbox1_low_irq’ defined but not used [-Wunused-function] 633 | static void dm_dmub_outbox1_low_irq(void *interrupt_params) | ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: 81927e2808be ("drm/amd/display: Support for DMUB AUX") Reviewed-by: Jude Shih Signed-off-by: Alex Deucher Cc: Jude Shih commit faa5f5da809b690542e1108ba66886574ac57d2c Author: Guenter Roeck Date: Tue May 11 13:54:49 2021 -0700 net/sched: taprio: Drop unnecessary NULL check after container_of The rcu_head pointer passed to taprio_free_sched_cb is never NULL. That means that the result of container_of() operations on it is also never NULL, even though rcu_head is the first element of the structure embedding it. On top of that, it is misleading to perform a NULL check on the result of container_of() because the position of the contained element could change, which would make the check invalid. Remove the unnecessary NULL check. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Signed-off-by: Guenter Roeck Signed-off-by: David S. Miller commit cac6fb015f719104e60b1c68c15ca5b734f57b9c Author: Loic Poulain Date: Tue May 11 16:42:23 2021 +0200 usb: class: cdc-wdm: WWAN framework integration The WWAN framework provides a unified way to handle WWAN/modems and its control port(s). It has initially been introduced to support MHI/PCI modems, offering the same control protocols as the USB variants such as MBIM, QMI, AT... The WWAN framework exposes these control protocols as character devices, similarly to cdc-wdm, but in a bus agnostic fashion. This change adds registration of the USB modem cdc-wdm control endpoints to the WWAN framework as standard control ports (wwanXpY...). Exposing cdc-wdm through WWAN framework normally maintains backward compatibility, e.g: $ qmicli --device-open-qmi -d /dev/wwan0p1QMI --dms-get-ids instead of $ qmicli --device-open-qmi -d /dev/cdc-wdm0 --dms-get-ids However, some tools may rely on cdc-wdm driver/device name for device detection. It is then safer to keep the 'legacy' cdc-wdm character device to prevent any breakage. This is handled in this change by API mutual exclusion, only one access method can be used at a time, either cdc-wdm chardev or WWAN API. Note that unknown channel types (other than MBIM, AT or MBIM) are not registered to the WWAN framework. Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit bf30396cdf8132a199af5f8f0e60367876f455df Author: Loic Poulain Date: Tue May 11 16:42:22 2021 +0200 net: wwan: Add unknown port type Some devices may have ports with unknown type/protocol which need to be tagged (though not supported by WWAN core). This will be the case for cdc-wdm based drivers. Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 009fc857c5f6fda81f2f7dd851b2d54193a8e733 Author: Zou Wei Date: Tue May 11 14:58:53 2021 +0800 mISDN: fix possible use-after-free in HFC_cleanup() This module's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: David S. Miller commit 1c72e6ab66b9598cac741ed397438a52065a8f1f Author: Zou Wei Date: Tue May 11 14:53:36 2021 +0800 atm: iphase: fix possible use-after-free in ia_module_exit() This module's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: David S. Miller commit 3babb604a8545a2551772c656cbebd6f40321861 Author: Linus Walleij Date: Tue May 11 09:44:58 2021 +0200 ARM: dts: ixp4xx: Create a proper expansion bus The IXP4xx expansion bus is 24 bits (256 MB) that is memory mapped between 0x50000000-0x5fffffff usin a set of chip selects. The size of the windows is 16 or 32MB defined by the boot loader system configuration at runtime. Create a rudimentary simple-bus and move the flash memories to the expansion bus, inside the SoC. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij commit e5670fa0293b05e8e24dae7d18481aba281cb85d Author: Andrii Nakryiko Date: Thu May 6 22:41:18 2021 -0700 libbpf: Treat STV_INTERNAL same as STV_HIDDEN for functions Do the same global -> static BTF update for global functions with STV_INTERNAL visibility to turn on static BPF verification mode. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210507054119.270888-7-andrii@kernel.org commit 247b8634e6446dbc8024685f803290501cba226f Author: Andrii Nakryiko Date: Thu May 6 22:41:17 2021 -0700 libbpf: Fix ELF symbol visibility update logic Fix silly bug in updating ELF symbol's visibility. Fixes: a46349227cd8 ("libbpf: Add linker extern resolution support for functions and global variables") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210507054119.270888-6-andrii@kernel.org commit 31332ccb756274c185cfd458b68b29a9371dceac Author: Andrii Nakryiko Date: Thu May 6 22:41:16 2021 -0700 bpftool: Stop emitting static variables in BPF skeleton As discussed in [0], stop emitting static variables in BPF skeletons to avoid issues with name-conflicting static variables across multiple statically-linked BPF object files. Users using static variables to pass data between BPF programs and user-space should do a trivial one-time switch according to the following simple rules: - read-only `static volatile const` variables should be converted to `volatile const`; - read/write `static volatile` variables should just drop `static volatile` modifiers to become global variables/symbols. To better handle older Clang versions, such newly converted global variables should be explicitly initialized with a specific value or `= 0`/`= {}`, whichever is appropriate. [0] https://lore.kernel.org/bpf/CAEf4BzZo7_r-hsNvJt3w3kyrmmBJj7ghGY8+k4nvKF0KLjma=w@mail.gmail.com/T/#m664d4b0d6b31ac8b2669360e0fc2d6962e9f5ec1 Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210507054119.270888-5-andrii@kernel.org commit 256eab48e70c0eaf5b1b9af83c0588491986c7de Author: Andrii Nakryiko Date: Thu May 6 22:41:15 2021 -0700 selftests/bpf: Stop using static variables for passing data to/from user-space In preparation of skipping emitting static variables in BPF skeletons, switch all current selftests uses of static variables to pass data between BPF and user-space to use global variables. All non-read-only `static volatile` variables become just plain global variables by dropping `static volatile` part. Read-only `static volatile const` variables, though, still require `volatile` modifier, otherwise compiler will ignore whatever values are set from user-space. Few static linker tests are using name-conflicting static variables to validate that static linker still properly handles static variables and doesn't trip up on name conflicts. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210507054119.270888-4-andrii@kernel.org commit fdbf5ddeb855a80831af2e5bb9db9218926e6789 Author: Andrii Nakryiko Date: Thu May 6 22:41:14 2021 -0700 libbpf: Add per-file linker opts For better future extensibility add per-file linker options. Currently the set of available options is empty. This changes bpf_linker__add_file() API, but it's not a breaking change as bpf_linker APIs hasn't been released yet. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210507054119.270888-3-andrii@kernel.org commit 37f05601eabc29f82c03b461a22d8fafacd736d2 Author: Andrii Nakryiko Date: Thu May 6 22:41:13 2021 -0700 bpftool: Strip const/volatile/restrict modifiers from .bss and .data vars Similarly to .rodata, strip any const/volatile/restrict modifiers when generating BPF skeleton. They are not helpful and actually just get in the way. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210507054119.270888-2-andrii@kernel.org commit 33ae8f801ad8bec48e886d368739feb2816478f2 Author: Bibo Mao Date: Mon Jun 29 21:15:32 2020 +0800 hugetlb: clear huge pte during flush function on mips platform If multiple threads are accessing the same huge page at the same time, hugetlb_cow will be called if one thread write the COW huge page. And function huge_ptep_clear_flush is called to notify other threads to clear the huge pte tlb entry. The other threads clear the huge pte tlb entry and reload it from page table, the reload huge pte entry may be old. This patch fixes this issue on mips platform, and it clears huge pte entry before notifying other threads to flush current huge page entry, it is similar with other architectures. Signed-off-by: Bibo Mao Signed-off-by: Thomas Bogendoerfer commit 9fa996c5f003beae0d8ca323caf06a2b73e471ec Author: Xiaochuan Mao Date: Wed Apr 28 20:06:28 2021 +0800 MIPS:DTS:Correct device id of pcie for Loongnon-2K from Loongson-2K user manual know that Loongson-2K have two pcie controller pcie0 and pcie1, pcie0 have four port named port0~port3 and pcie1 have 2 port named port0~port1. the device id of port0 is 7a19 in each pcie controller and others are 7a09. Signed-off-by: Xiaochuan Mao Reviewed-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 6a73022ee3fdf7e60f2ba0a3a835dd421c05b5b5 Author: Youling Tang Date: Thu May 6 10:02:50 2021 +0800 MIPS: Loongson64: Fix build error 'secondary_kexec_args' undeclared under !SMP On the Loongson64 platform, if CONFIG_SMP is not set, the following build error will occur: arch/mips/loongson64/reset.c:133:2: error:'secondary_kexec_args' undeclared Because the definition and declaration of secondary_kexec_args are in the CONFIG_SMP, the secondary_kexec_args variable should be used in CONFIG_SMP. Reported-by: kernel test robot Signed-off-by: Youling Tang Acked-by: Randy Dunlap Signed-off-by: Thomas Bogendoerfer commit cf5b6a94787315c13fdf6736931071eac7f434c6 Author: Mike Rapoport Date: Sun Apr 18 12:35:12 2021 +0300 MIPS: Octeon: drop dependency on CONFIG_HOLES_IN_ZONE CAVIUM_OCTEON_SOC configuration selects HOLES_IN_ZONE option to cope with memory crashes that were happening in 2011. This option effectively aliases pfn_valid_within() to pfn_valid() when enabled and hardwires it to 1 when disabled. The check for pfn_valid_within() is only relevant in case the memory map may have holes or undefined struct page instances inside MAX_ORDER chunks. Since 2011 memory management initialization in general and memory map initialization particularly became much more robust so the check for pfn_valid_within() is not required on Octeon even despite its, hmm, unusual memory setup. Remove the selection of HOLES_IN_ZONE by CAVIUM_OCTEON_SOC and drop the HOLES_IN_ZONE configuration option entirely as Octeon was the only MIPS platform to use it. Signed-off-by: Mike Rapoport Signed-off-by: Thomas Bogendoerfer commit 620ccaaa46d1fa9e6d15d78deaa37a4228772592 Author: Zhen Lei Date: Mon May 10 20:06:35 2021 +0800 IB/hfi1: Delete an unneeded bool conversion The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Link: https://lore.kernel.org/r/20210510120635.3636-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Signed-off-by: Jason Gunthorpe commit 09df8ba5c181397813068c55fbfddb09f43d3642 Author: José Roberto de Souza Date: Sat Apr 17 17:21:26 2021 -0700 drm/i915/display/xelpd: Implement Wa_14013475917 This workaround requires that VIDEO_DIP_ENABLE_VSC_HSW is never set with PSR. BSpec: 54369 BSpec: 54077 Cc: Matt Atwood Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210418002126.87882-5-jose.souza@intel.com commit a37937cd8e85ee0990bde73a9d67505448a52556 Author: José Roberto de Souza Date: Sat Apr 17 17:21:25 2021 -0700 drm/i915/display: Drop dead code from hsw_read_infoframe() HSW_TVIDEO_DIP_CTL is read but not used. Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210418002126.87882-4-jose.souza@intel.com commit 62e37c44a58e62dc2978352798264683d6b47ff0 Author: José Roberto de Souza Date: Sat Apr 17 17:21:24 2021 -0700 drm/i915/display: Drop duplicated code in intel_dp_set_infoframes() No functional changes in here. Cc: Matt Atwood Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210418002126.87882-3-jose.souza@intel.com commit d54e017e62d806a2b58f63aabd6a428478617913 Author: José Roberto de Souza Date: Sat Apr 17 17:21:23 2021 -0700 drm/i915/display: Replace intel_psr_enabled() calls by intel_crtc_state check All of this places don't need to intel_psr_enabled() that will lock psr mutex, check state and unlock. Instead it can directly check PSR state in intel_crtc_state, the only place that was not possible was intel_read_dp_vsc_sdp() but since "drm/i915/display: Fill PSR state during hardware configuration read out" it is possible. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210418002126.87882-2-jose.souza@intel.com commit 78b772e1a01f699fbbcaa59d7a298aabe66a9b21 Author: José Roberto de Souza Date: Sat Apr 17 17:21:22 2021 -0700 drm/i915/display: Fill PSR state during hardware configuration read out So far if we had a mismatch between the state asked and what was programmed in hardware for PSR, this mismatch would go unnoticed. So here adding the PSR to the hardware configuration readout, EDP_PSR_CTL and EDP_PSR2_CTL can't be directly read because its state flips due to other factors like frontbuffer modifications and CRC. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210418002126.87882-1-jose.souza@intel.com commit 7c6c2f5337b7fc77eed5b14636ef959c5873efdd Author: Wan Jiabing Date: Mon May 10 14:28:42 2021 +0800 RDMA: Remove unnecessary struct declaration The declaration of struct ib_grh is uncessary here, because it is defined at line 766. Link: https://lore.kernel.org/r/20210510062843.15707-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 16149eddd380838fb01ef4bd9a68d89ec044210a Author: Leon Romanovsky Date: Sun May 9 12:36:06 2021 +0300 RDMA/core: Remove never used ib_modify_wq function call The function ib_modify_wq() is not used, so remove it. Link: https://lore.kernel.org/r/c5e48d517b9163fe4f9ffd224050b83fdb3571c6.1620552935.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 523375c943e51a52bacb69fbd2b0d71a4e990878 Author: Zack Rusin Date: Tue May 4 23:57:40 2021 -0400 drm/vmwgfx: Port vmwgfx to arm64 This change fixes all of the arm64 issues we've had in the driver. ARM support is provided in svga version 3, for which support we've added in previous changes. svga version 3 currently lacks many of the advanced features (in particular 3D support is lacking) but that will change in time. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-7-zackr@vmware.com commit 2cd80dbd35518d5900d83cdb3fb3295e5e9d820b Author: Zack Rusin Date: Wed May 5 15:10:07 2021 -0400 drm/vmwgfx: Add basic support for SVGA3 SVGA3 is the next version of our PCI device. Some of the changes include using MMIO for register accesses instead of ioports, deprecating the FIFO MMIO and removing a lot of the old and legacy functionality. SVGA3 doesn't support guest backed objects right now so everything except 3D is working. v2: Fixes all the static analyzer warnings Signed-off-by: Zack Rusin Cc: Martin Krastev Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210505191007.305872-1-zackr@vmware.com commit 8211783f16ead18702978dbafc8487a35387a0be Author: Zack Rusin Date: Tue May 4 23:57:38 2021 -0400 drm/vmwgfx: Remove the reservation semaphore Now since Christian reworked TTM to always keep objects on the LRU list unless they are pinned we shouldn't need the reservation semaphore. It makes the driver code a lot cleaner, especially because it was a little hard to reason when and where the reservation semaphore needed to be held. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-5-zackr@vmware.com commit 88509f698c4e38e287e016e86a0445547824135c Author: Thomas Hellstrom Date: Tue May 4 23:57:37 2021 -0400 drm/vmwgfx: Fix cpu updates of coherent multisample surfaces In cases where the dirty linear memory range spans multiple sample sheets in a surface, the dirty surface region is incorrectly computed. To do this correctly and in an optimized fashion we would have to compute the dirty region of each sample sheet and compute the union of those regions. But assuming that cpu writing to a multisample surface is rather a corner case than a common case, just set the dirty region to the full surface. This fixes OpenGL piglit errors with SVGA_FORCE_COHERENT=1 and the piglit test: fbo-depthstencil blit default_fb -samples=2 -auto Fixes: 9ca7d19ff8ba ("drm/vmwgfx: Add surface dirty-tracking callbacks") Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Roland Scheidegger Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-4-zackr@vmware.com commit 75156a887b6cea6e09d83ec19f4ebfd7c86265f0 Author: Thomas Hellstrom Date: Tue May 4 23:57:36 2021 -0400 drm/vmwgfx: Mark a surface gpu-dirty after the SVGA3dCmdDXGenMips command The SVGA3dCmdDXGenMips command uses a shader-resource view to access the underlying surface. Normally accesses using that view-type are not dirtying the underlying surface, but that particular command is an exception. Mark the surface gpu-dirty after a SVGA3dCmdDXGenMips command has been submitted. This fixes the piglit getteximage-formats test run with SVGA_FORCE_COHERENT=1 Fixes: a9f58c456e9d ("drm/vmwgfx: Be more restrictive when dirtying resources") Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Roland Scheidegger Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-3-zackr@vmware.com commit 2cc8bfeeb7366a24f3ad726c05117984b89a90e1 Author: Zack Rusin Date: Tue May 4 23:57:35 2021 -0400 drm/vmwgfx: Fix incorrect enum usage SVGA_REG_ENABLE is a register name, and SVGA_REG_ENABLE_(ENABLE| DISABLE|HIDE) are its valid values. We were incorrectly setting the register value to itself. This happened to work because the SVGA_REG_ENABLE is happens to to be the same value as SVGA_REG_ENABLE_ENABLE, but is still semantically incorrect. Lets use the correct enum when setting SVGA_REG_ENABLE. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210505035740.286923-2-zackr@vmware.com commit 74ec2424737a9d5ffa6e4f957e57fb1baff19a5c Author: Yang Li Date: Thu May 6 18:15:05 2021 +0800 IB/srpt: Remove redundant assignment to ret Variable 'ret' is set to -ENOMEM but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed In 'commit b79fafac70fc ("target: make queue_tm_rsp() return void")' srpt_queue_response() has been changed to return void, so after "goto out", there is no need to return ret. Clean up the following clang-analyzer warning: drivers/infiniband/ulp/srpt/ib_srpt.c:2860:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Fixes: b99f8e4d7bcd ("IB/srpt: convert to the generic RDMA READ/WRITE API") Link: https://lore.kernel.org/r/1620296105-121964-1-git-send-email-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Leon Romanovsky Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit e6a1f8c696be3ed07b5f4ce81ce7c45f7ff9a483 Author: Yang Li Date: Thu May 6 18:13:21 2021 +0800 RDMA/mlx5: Remove redundant assignment to ret Variable 'ret' is set to the rerurn value of function mlx5_mr_cache_alloc() but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed Clean up the following clang-analyzer warning: drivers/infiniband/hw/mlx5/odp.c:421:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()") Link: https://lore.kernel.org/r/1620296001-120406-1-git-send-email-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit de3d7018372cdb2325ba375872578405cf0554d0 Author: Dmitry Osipenko Date: Tue May 11 00:23:20 2021 +0300 dt-bindings: memory: tegra20: emc: Convert to schema Convert Tegra20 External Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210510212320.3255-1-digetx@gmail.com Signed-off-by: Rob Herring commit e3d65124ce2bf43f2d65f925e590482bd676f2f4 Author: Xiaofei Tan Date: Thu May 6 16:51:46 2021 +0800 RDMA/ucma: Cleanup to reduce duplicate code The lable "err1" does the same thing as the branch of copy_to_user() failed in the function ucma_create_id(). Just jump to the label directly to reduce duplicate code. Link: https://lore.kernel.org/r/1620291106-3675-1-git-send-email-tanxiaofei@huawei.com Signed-off-by: Xiaofei Tan Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 591f762b2750c628df9412d1c795b56e83a34b3e Author: Yixian Liu Date: Wed Apr 28 15:12:30 2021 +0800 RDMA/hns: Remove the condition of light load for posting DWQE Even in the case of heavy load, direct WQE can still be posted. The hardware will decide whether to drop the DWQE or not. Thus, the limit needs to be removed. Fixes: 01584a5edcc4 ("RDMA/hns: Add support of direct wqe") Link: https://lore.kernel.org/r/1619593950-29414-1-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 29dd19e3ac7b2a8671ebeac02859232ce0e34f58 Author: Mauro Carvalho Chehab Date: Tue May 11 17:03:21 2021 +0200 media: exynos4-is: remove a now unused integer The usage of pm_runtime_resume_and_get() removed the need of a temporary integer. So, drop it. Fixes: 59f96244af94 ("media: exynos4-is: fix pm_runtime_get_sync() usage count") Reported-by: Stephen Rothwell Signed-off-by: Mauro Carvalho Chehab commit a3b884cef8730ce1c7ad2276961bce46fbce8fd5 Author: Nicolas Pitre Date: Fri May 7 16:20:36 2021 -0400 firmware: arm_scmi: Add clock management to the SCMI power domain Clocks requiring non-atomic contexts are supported by the generic clock PM layer since commit 0bfa0820c274 ("PM: clk: make PM clock layer compatible with clocks that must sleep"). That means we can have SCMI-based clocks be managed by the SCMI power domain now. Link: https://lore.kernel.org/r/5q88n947-pon-4940-3or6-s54o4r361o5s@onlyvoer.pbz Tested-by: Dien Pham Reviewed-by: Gaku Inami Signed-off-by: Nicolas Pitre Signed-off-by: Sudeep Holla commit 038b9de42269f33aca3e3741214c863a4e9328d0 Author: Andy Shevchenko Date: Mon May 10 16:12:17 2021 +0300 spi: uniphier: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-7-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4ccf05579b9d0f15443a0edc860e2be7472ccfc1 Author: Andy Shevchenko Date: Mon May 10 16:12:16 2021 +0300 spi: ppc4xx: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit fdb217a38808e041f6eca8c550f1b5981e401a45 Author: Andy Shevchenko Date: Mon May 10 16:12:15 2021 +0300 spi: omap-uwire: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit a2f2db6b2a8708f6ac592a362e34fb330f874cea Author: Andy Shevchenko Date: Mon May 10 16:12:14 2021 +0300 spi: oc-tiny: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 56f47edf33fb55ab9381f61d60cf34c7578f3d75 Author: Andy Shevchenko Date: Mon May 10 16:12:13 2021 +0300 spi: npcm-pspi: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit dd507b5ec7ba44ab51e1a8404d04e815a91b472f Author: Andy Shevchenko Date: Mon May 10 16:12:12 2021 +0300 spi: spidev: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 40b82c2d9a78593201a3a62dc9239d6405334561 Author: Andy Shevchenko Date: Mon May 10 16:12:11 2021 +0300 spi: Use SPI_MODE_X_MASK Use SPI_MODE_X_MASK instead of open coded variant. While at it, fix format specifier and drop explicit casting. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131217.49357-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4ac9b48adf4d561d0e33419d548278f205dd70b5 Author: Charles Keepax Date: Tue May 11 11:10:51 2021 +0100 ASoC: cs42l52: Minor tidy up of error paths Fixup a needlessly initialised variable and an unchecked return value. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511101051.17726-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit fd4e6baa6256b9c5cb6d8d6a020093ee9aee0372 Author: Charles Keepax Date: Tue May 11 11:10:50 2021 +0100 ASoC: cs4265: Minor tidy up of error paths Fixup a needlessly initialised variable and an unchecked return value. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511101051.17726-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 634a4be0f9d16428779d60bb40fd852f888f0a34 Author: Charles Keepax Date: Tue May 11 11:10:49 2021 +0100 ASoC: cs35l36: Remove unneeded variable initialisation Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511101051.17726-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit ca0b0c1f4a2aa281bf68668e00400e2bfbdaff0e Author: Zhen Lei Date: Tue May 11 17:29:23 2021 +0800 drm/vc4: Remove redundant error printing in vc4_ioremap_regs() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210511092923.4617-1-thunder.leizhen@huawei.com commit 388b863509f76f6a5ecedd7ffdaf184aa813241e Author: Werner Sembach Date: Mon May 10 15:33:49 2021 +0200 drm/i915/display: Use YCbCr420 as fallback when RGB fails When encoder validation of a display mode fails, retry with less bandwidth heavy YCbCr420 color mode, if available. This enables some HDMI 1.4 setups to support 4k60Hz output, which previously failed silently. AMDGPU had nearly the exact same issue. This problem description is therefore copied from my commit message of the AMDGPU patch. On some setups, while the monitor and the gpu support display modes with pixel clocks of up to 600MHz, the link encoder might not. This prevents YCbCr444 and RGB encoding for 4k60Hz, but YCbCr420 encoding might still be possible. However, which color mode is used is decided before the link encoder capabilities are checked. This patch fixes the problem by retrying to find a display mode with YCbCr420 enforced and using it, if it is valid. Signed-off-by: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210510133349.14491-4-wse@tuxedocomputers.com commit 84d95f77f4aea3f22a486cd04777afd4ab0f0ea5 Author: Werner Sembach Date: Mon May 10 15:33:48 2021 +0200 drm/i915/display: Restructure output format computation for better expandability Couples the decission between RGB and YCbCr420 mode and the check if the port clock can archive the required frequency. Other checks and configuration steps that where previously done in between can also be done before or after. This allows for are cleaner implementation of retrying different color encodings. A slight change in behaviour occurs with this patch: If YCbCr420 is not allowed but display is YCbCr420 only it no longer fails, but just prints an error and tries to fallback on RGB. Signed-off-by: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210510133349.14491-3-wse@tuxedocomputers.com commit eacba74d4d561ea6487d944417526e1b025cbebd Author: Werner Sembach Date: Mon May 10 15:33:47 2021 +0200 drm/i915/display: New function to avoid duplicate code in upcomming commits Moves some checks that later will be performed 2 times to an own function. This avoids duplicate code later on. Signed-off-by: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210510133349.14491-2-wse@tuxedocomputers.com commit fd531024bad7e5799e968ca70c0d3ca7b96b71ef Merge: eb185a3212b5e 6efb943b8616e Author: Thomas Zimmermann Date: Tue May 11 15:59:18 2021 +0200 Merge drm/drm-next into drm-misc-next Backmerging to get v5.12 fixes. Requested for vmwgfx. Signed-off-by: Thomas Zimmermann commit effbf6ca7eafdadbb8a423ce40886d364632bbca Author: Alex Deucher Date: Fri May 7 16:16:49 2021 -0400 drm/amdgpu/display: remove an old DCN3 guard The DCN3 guards were dropped a while ago, this one must have snuck in in a merge or something. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0bb6d3db4f75c960769de128f3bccb320b5d044d Author: Zhen Lei Date: Mon May 10 20:23:38 2021 +0800 drm/amdgpu: Delete two unneeded bool conversions The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Alex Deucher commit ea23ff0241f094aa67d74ea37b2189ac1bf17f6b Author: Zhen Lei Date: Mon May 10 20:16:21 2021 +0800 drm/amd/display: Delete several unneeded bool conversions The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Alex Deucher commit 29b25b7067a4fa92afd379ebd7c16b9cbed5e0c0 Author: David Ward Date: Mon May 10 05:30:39 2021 -0400 drm/amd/display: Initialize attribute for hdcp_srm sysfs file It is stored in dynamically allocated memory, so sysfs_bin_attr_init() must be called to initialize it. (Note: "initialization" only sets the .attr.key member in this struct; it does not change the value of any other members.) Otherwise, when CONFIG_DEBUG_LOCK_ALLOC=y this message appears during boot: BUG: key ffff9248900cd148 has not been registered! Fixes: 9037246bb2da ("drm/amd/display: Add sysfs interface for set/get srm") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1586 Reported-by: Mikhail Gavrilov Signed-off-by: David Ward Signed-off-by: Alex Deucher commit 152b7a599674d27f26bec1a4fdbac63564d0fc93 Author: Linus Walleij Date: Mon May 3 00:09:52 2021 +0200 ARM: dts: ixp4xx: Add PCI hosts This adds a basic PCI host definition to the base device tree for IXP4xx and then further details it in the 42x and 43x device tree include, also the specific target devices NSLU2 and GW2358 get proper PCI swizzling defined. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij commit 00d6dc3da1d76bdd735cd47d026b5a0d673559f7 Author: Matthew Auld Date: Fri May 7 10:59:48 2021 +0100 drm/i915/stolen: shuffle around init_memory_region We generally want to first call i915_gem_object_init_memory_region() before calling into get_pages(), since this sets up various bits of state which might be needed there. Currently for stolen this doesn't matter much, but it might in the future, and at the very least this makes things consistent with the other backends. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210507095948.384230-1-matthew.auld@intel.com commit 907c5bbb514a4676160e79764522fff56ce3448e Author: Krzysztof Kozlowski Date: Fri Apr 23 12:18:15 2021 +0200 memory: atmel-ebi: add missing of_node_put for loop iteration Early exits from for_each_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: drivers/memory/atmel-ebi.c:593:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 604. Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210423101815.119341-2-krzysztof.kozlowski@canonical.com commit 2f9dc6a357ff3b82c1e54d29fb5d52b8d4a0c587 Author: Krzysztof Kozlowski Date: Fri Apr 23 12:18:14 2021 +0200 memory: stm32-fmc2-ebi: add missing of_node_put for loop iteration Early exits from for_each_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: drivers/memory/stm32-fmc2-ebi.c:1046:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1051. Fixes: 66b8173a197f ("memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Christophe Kerello Link: https://lore.kernel.org/r/20210423101815.119341-1-krzysztof.kozlowski@canonical.com commit e4c9b60b271ce428d97577502be9393bdc46dd94 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:42 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Odroid XU3/XU4 family The RTC on S2MPS11 PMIC on Odroid XU3/XU4 family of boards can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-10-krzysztof.kozlowski@canonical.com commit a145cc05cb2ccbdde2621c91c7d56c3435d3a125 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:41 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on SMDK5420 The RTC on S2MPS11 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-9-krzysztof.kozlowski@canonical.com commit 1d4203b1fa02fca97ca97484f2a43da187112ad1 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:40 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Arndale Octa The RTC on S2MPS11 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-8-krzysztof.kozlowski@canonical.com commit 9614ae53753003e7a4ecf800db3da189c0f0acd5 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:39 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on P4 Note The RTC on Maxim max77686 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-7-krzysztof.kozlowski@canonical.com commit 1178f7127a4679db9b70eb16737627f764d7a9c5 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:38 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Odroid X/U3 The RTC on Maxim max77686 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-6-krzysztof.kozlowski@canonical.com commit 7f23ea1265c3dc2cd5824f67498078fa23ede782 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:37 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Midas The RTC on Maxim max77686 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-5-krzysztof.kozlowski@canonical.com commit 760ebb8a2529f92f772424c7ddc385a07a9e90a0 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:36 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Odroid XU The RTC on Maxim max77802 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-4-krzysztof.kozlowski@canonical.com commit 0272619bde229386edf9f1358470e265628d1653 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:35 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Arndale The RTC on S5M8767 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-3-krzysztof.kozlowski@canonical.com commit 765210e19859fcd83dad26441a5c499c0fe27e28 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:34 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Origen4412 The RTC on S5M8767 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-2-krzysztof.kozlowski@canonical.com commit a1972739c01612adee6bb0a0306ea29be0bb4955 Author: Krzysztof Kozlowski Date: Tue Apr 20 18:49:33 2021 +0200 ARM: dts: exynos: enable PMIC wakeup from suspend on Itop Core The RTC on S5M8767 PMIC can wakeup the system from suspend to RAM. Add a generic property for this. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420164943.11152-1-krzysztof.kozlowski@canonical.com commit 8b7e0f72ef7123460b31fbe0652e1871603d2b70 Author: Krzysztof Kozlowski Date: Thu May 6 11:20:44 2021 -0400 ARM: dts: s5pv210: remove unused Atmel touchscreen properties in Goni The Atmel bindings and driver do not use custom properties like x/y-size, burst length, threshold and so on. The driver gets necessary data from the device directly. Remove unused properties to fix dtbs_check warning: arch/arm/boot/dts/s5pv210-goni.dt.yaml: touchscreen@4a: 'atmel,burst-length', 'atmel,orientation', 'atmel,threshold', 'atmel,x-line', 'atmel,x-size', 'atmel,y-line', 'atmel,y-size' do not match any of the regexes Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210506152044.37579-1-krzysztof.kozlowski@canonical.com commit fd2f1717966535b7d0b6fe45cf0d79e94330da5f Author: Krzysztof Kozlowski Date: Wed May 5 09:59:41 2021 -0400 ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4 There is no "max_brightness" property as pointed out by dtschema: arch/arm/boot/dts/exynos5422-odroidxu4.dt.yaml: led-controller: led-1: 'max-brightness' is a required property Fixes: 6658356014cb ("ARM: dts: Add support Odroid XU4 board for exynos5422-odroidxu4") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210505135941.59898-5-krzysztof.kozlowski@canonical.com commit a7e59c84cf2055a1894f45855c8319191f2fa59e Author: Krzysztof Kozlowski Date: Wed May 5 09:59:40 2021 -0400 ARM: dts: exynos: fix PWM LED max brightness on Odroid HC1 There is no "max_brightness" property as pointed out by dtschema: arch/arm/boot/dts/exynos5422-odroidhc1.dt.yaml: led-controller: led-1: 'max-brightness' is a required property Fixes: 1ac49427b566 ("ARM: dts: exynos: Add support for Hardkernel's Odroid HC1 board") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210505135941.59898-4-krzysztof.kozlowski@canonical.com commit 75121e1dc9fe4def41e63d57f6a53749b88006ed Author: Krzysztof Kozlowski Date: Wed May 5 09:59:39 2021 -0400 ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3 There is no "max_brightness" property. This brings the intentional brightness reduce of green LED and dtschema checks as well: arch/arm/boot/dts/exynos5410-odroidxu.dt.yaml: led-controller-1: led-1: 'max-brightness' is a required property Fixes: 719f39fec586 ("ARM: dts: exynos5422-odroidxu3: Hook up PWM and use it for LEDs") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210505135941.59898-3-krzysztof.kozlowski@canonical.com commit 8bceb2a490bb8e1048e9c73520f49a65823108a4 Author: Krzysztof Kozlowski Date: Wed May 5 09:59:38 2021 -0400 ARM: dts: exynos: replace legacy MMS114 touchscreen x/y properties in GT-N7100 Replace legacy MMS114 touchscreen properties to fix dtschema warnings: arch/arm/boot/dts/exynos4412-n710x.dt.yaml: touchscreen@48: 'x-size', 'y-size' do not match any of the regexes: 'pinctrl-[0-9]+' arch/arm/boot/dts/exynos4412-n710x.dt.yaml: touchscreen@48: 'touchscreen-size-x' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210505135941.59898-2-krzysztof.kozlowski@canonical.com commit cc29e39412b9a78b43f7dfa09d739f8ba9fa7984 Author: Krzysztof Kozlowski Date: Wed May 5 09:59:37 2021 -0400 ARM: dts: exynos: align Broadcom WiFi with dtschema The Broadcom BCM4329 family dtschema expects devices to be compatible also with brcm,bcm4329-fmac: arch/arm/boot/dts/exynos3250-rinato.dt.yaml: wifi@1: compatible: 'oneOf' conditional failed, one must be fixed: ['brcm,bcm4334-fmac'] is too short 'brcm,bcm4329-fmac' was expected Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210505135941.59898-1-krzysztof.kozlowski@canonical.com commit 48d551bf20858240f38a0276be3016ff379918ac Author: Krzysztof Kozlowski Date: Sun Apr 25 19:49:45 2021 +0200 ARM: exynos: add missing of_node_put for loop iteration Early exits from for_each_compatible_node() should decrement the node reference counter. Reported by Coccinelle: arch/arm/mach-exynos/exynos.c:52:1-25: WARNING: Function "for_each_compatible_node" should have of_node_put() before break around line 58. Fixes: b3205dea8fbf ("ARM: EXYNOS: Map SYSRAM through generic DT bindings") Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210425174945.164612-1-krzysztof.kozlowski@canonical.com commit 0de0b04c83430ee913c9683369b7059e04e106cb Author: Wan Jiabing Date: Fri Apr 9 14:49:20 2021 +0800 ARM: s3c: Remove unnecessary break in RX1950 There is a return above the break. The break here is unnecessary. Remove it. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210409064920.1096367-1-wanjiabing@vivo.com Signed-off-by: Krzysztof Kozlowski commit 037219925e7a802c1d038af18cec3d0a8c88a368 Author: Pierre-Louis Bossart Date: Tue May 11 10:50:35 2021 +0800 soundwire: dmi-quirks: remove duplicate initialization cppcheck warning: drivers/soundwire/dmi-quirks.c:85:12: style: Redundant initialization for 'map'. The initialized value is overwritten before it is read. [redundantInitialization] for (map = dmi_id->driver_data; map->adr; map++) { ^ drivers/soundwire/dmi-quirks.c:83:25: note: map is initialized struct adr_remap *map = dmi_id->driver_data; ^ drivers/soundwire/dmi-quirks.c:85:12: note: map is overwritten for (map = dmi_id->driver_data; map->adr; map++) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511025035.25233-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 36eee232df7b41dce5a26e4da2d083f6a6b0f476 Author: Pierre-Louis Bossart Date: Tue May 11 10:52:47 2021 +0800 soundwire: cadence_master: always set CMD_ACCEPT The Cadence IP can be configured in two different ways to deal with CMD_IGNORED replies to broadcast commands. The CMD_ACCEPT bitfield controls whether the command is discarded or if the IP proceeds with the change (typically a bank switch or clock stop command). The existing code seems to be inconsistent: a) For some historical reason, we set this CMD_ACCEPT bitfield during the initialization, but we don't during a resume from a clock-stoppped state. b) In addition, the loop used in the clock-stop sequence is quite racy, it's possible that a device has lost sync but it's still tagged as ATTACHED. c) If somehow a Device loses sync and is unable to ack a broadcast command, we do not have an error handling mechanism anyways. The IP should go ahead and let the Device regain sync at a later time. Make sure the CMD_ACCEPT bit is always set. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511025247.25339-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 54a6ca4fa8a316b2ae26fb9ad646bfb1b0b75410 Author: Pierre-Louis Bossart Date: Tue May 11 11:00:48 2021 +0800 soundwire: bus: add missing \n in dynamic debug They were missed in previous contributions. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511030048.25622-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b50bb8ba369cdc8814e82558117711c12ef3af3d Author: Pierre-Louis Bossart Date: Tue May 11 11:00:47 2021 +0800 soundwire: bus: handle -ENODATA errors in clock stop/start sequences If a device lost sync and can no longer ACK a command, it may not be able to enter a lower-power state but it will still be able to resync when the clock restarts. In those cases, we want to continue with the clock stop sequence. This patch modifies the behavior during clock stop sequences to only log errors unrelated to -ENODATA/Command_Ignored. The flow is also modified so that loops continue to prepare/deprepare other devices even when one seems to have lost sync. When resuming the clocks, all issues are logged with a dev_warn(), previously only some of them were checked. This is the only part that now differs between the clock stop entry and clock stop exit sequences: while we don't want to stop the suspend flow, we do want information on potential issues while resuming, as they may have ripple effects. For consistency the log messages are also modified to be unique and self-explanatory. Errors in sdw_slave_clk_stop_callback() were removed, they are now handled in the caller. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511030048.25622-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 448df2d8fcab6cc50e0de4679ce3afe2ece282f2 Author: Pierre-Louis Bossart Date: Tue May 11 11:00:46 2021 +0800 soundwire: add missing kernel-doc description For some reason we never added a description for the clk_stop callback. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511030048.25622-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 345e9f5ca798600e44c0843646621f2804eb99f4 Author: Pierre-Louis Bossart Date: Tue May 11 11:00:45 2021 +0800 soundwire: bus: only use CLOCK_STOP_MODE0 and fix confusions Existing devices and implementations only support the required CLOCK_STOP_MODE0. All the code related to CLOCK_STOP_MODE1 has not been tested and is highly questionable, with a clear confusion between CLOCK_STOP_MODE1 and the simple clock stop state machine. This patch removes all usages of CLOCK_STOP_MODE1 - which has no impact on any solution - and fixes the use of the simple clock stop state machine. The resulting code should be a lot more symmetrical and easier to maintain. Note that CLOCK_STOP_MODE1 is not supported in the SoundWire Device Class specification so it's rather unlikely that we need to re-add this mode later. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511030048.25622-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit eb185a3212b5edca30da0ab4ec21d69a012bcb69 Author: Thomas Zimmermann Date: Mon May 10 16:52:18 2021 +0200 drm: Include iff CONFIG_AGP is set Platforms without AGP don't provide the AGP header. Only include it if CONFIG_AGP is set. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Fixes: 04dfe19a5ed6 ("drm: Mark AGP implementation and ioctls as legacy") Cc: Thomas Zimmermann Cc: Alex Deucher Cc: Christian König Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: "Christian König" Cc: Christophe JAILLET Cc: Jason Yan Cc: Lee Jones Cc: Sam Ravnborg Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210510145218.10322-1-tzimmermann@suse.de commit 0531e6b60569c71a34a9c5eb9bfbb1559b661cd8 Author: Pierre-Louis Bossart Date: Tue May 11 13:49:45 2021 +0800 soundwire: bandwidth allocation: improve error messages In rare corner cases, we see an error with the log: [ 838.297840] soundwire sdw-master-1: Compute bus params failed: -22 That's not very useful, there can be two different error conditions with the same -EINVAL code provided to the caller. Let's add better dev_err() messages to figure out what went wrong. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210511054945.29558-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9c294739cf5bdb6c613f23dff099e44ac9d722a4 Author: Pierre-Louis Bossart Date: Tue May 11 14:01:37 2021 +0800 soundwire/ASoC: add leading zeroes in peripheral device name We recently added leading zeroes in dev_dbg() messages but forgot to do the same for the peripheral device name. Adding leading zeroes makes it easier to read manufacturer ID and part ID, e.g.: sdw:0:025d:0700:00 sdw:0:025d:0711:00 sdw:1:025d:0700:00 sdw:1:025d:1308:00 sdw:2:025d:0700:00 sdw:2:025d:0701:00 sdw:3:025d:0700:00 sdw:3:025d:0715:00 The use of '01x' for link_id and unique_id is intentional to show the value range in the code, it's understood it does not actually change the format. To avoid problems with git bisect, the same change needs to be applied to the Intel SoundWire machine driver, otherwise the components can't be found and the card registration fails. Tested-by: Srinivas Kandagatla Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Acked-by: Mark Brown Link: https://lore.kernel.org/r/20210511060137.29856-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6e5c3ab8959499491f96fdba686eabb50fc6062d Merge: 532259bfd1c12 3fdb59cf10b02 Author: Mark Brown Date: Tue May 11 11:41:59 2021 +0100 Merge series "spi: pxa2xx: Set of cleanups" from Andy Shevchenko : Set of cleanups here and there related to the SPI PXA2xx driver. On top of them, adding the special type for Intel Merrifield. In v3: - rebased on top of v5.13-rc1 and/or spi/for-5,14 In v2: - cover letter (Mark) - drop moving the header in patch 5 (Mark) Andy Shevchenko (14): spi: pxa2xx: Use one point of return when ->probe() fails spi: pxa2xx: Utilize MMIO and physical base from struct ssp_device spi: pxa2xx: Utilize struct device from struct ssp_device spi: pxa2xx: Replace header inclusions by forward declarations spi: pxa2xx: Unify ifdeffery used in the headers spi: pxa2xx: Group Intel Quark specific definitions spi: pxa2xx: Introduce int_stop_and_reset() helper spi: pxa2xx: Reuse int_error_stop() in pxa2xx_spi_slave_abort() spi: pxa2xx: Use pxa_ssp_enable()/pxa_ssp_disable() in the driver spi: pxa2xx: Extract pxa2xx_spi_update() helper spi: pxa2xx: Extract clear_SSCR1_bits() helper spi: pxa2xx: Extract read_SSSR_bits() helper spi: pxa2xx: Constify struct driver_data parameter spi: pxa2xx: Introduce special type for Merrifield SPIs drivers/spi/spi-pxa2xx-dma.c | 37 +++---- drivers/spi/spi-pxa2xx-pci.c | 4 +- drivers/spi/spi-pxa2xx.c | 190 +++++++++++++++++---------------- drivers/spi/spi-pxa2xx.h | 52 ++++----- include/linux/pxa2xx_ssp.h | 42 +++++++- include/linux/spi/pxa2xx_spi.h | 9 +- sound/soc/pxa/pxa-ssp.c | 16 --- 7 files changed, 185 insertions(+), 165 deletions(-) -- 2.30.2 commit 23029150a05b59ebacca6dd76f6c14dc67a95877 Author: Elaine Zhang Date: Tue May 11 17:07:26 2021 +0800 clk: rockchip: Optimize PLL table memory usage Before the change: The sizeof rk3568_pll_rates = 2544 Use union: The sizeof rk3568_pll_rates = 1696 In future Soc, more PLL types will be added, and the rockchip_pll_rate_table will add more members, and the space savings will be even more pronounced by using union. Signed-off-by: Elaine Zhang Link: https://lore.kernel.org/r/20210511090726.15146-1-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 1782c87b44a0b1a527f01a6a184677c58ccbf9c7 Author: Elaine Zhang Date: Sat Apr 17 13:29:52 2021 +0200 soc: rockchip: power-domain: add rk3568 powerdomains Add power-domains found on rk3568 socs. Signed-off-by: Elaine Zhang Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-16-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 66b89b8b5e4cfb1d492c1ac16c0ef07e47c44e84 Author: Elaine Zhang Date: Sat Apr 17 13:29:51 2021 +0200 dt-bindings: power: rockchip: Add bindings for RK3568 Soc Add the compatible string for RK3568 SoC. Signed-off-by: Elaine Zhang Signed-off-by: Johan Jonker Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210417112952.8516-15-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit d74622138a9bfaaaf102280ae8aeee6fae565de0 Author: Enric Balletbo i Serra Date: Sat Apr 17 13:29:50 2021 +0200 dt-bindings: power: rockchip: Convert to json-schema Convert the soc/rockchip/power_domain.txt binding document to json-schema and move to the power bindings directory. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Elaine Zhang Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210417112952.8516-14-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 72ae976363a2169d95eecca07e62ccdf5b1ee4de Author: Johan Jonker Date: Sat Apr 17 13:29:49 2021 +0200 dt-bindings: arm: rockchip: add more compatible strings to pmu.yaml The compatible strings below are already in use in the Rockchip dtsi files, but were somehow never added to a document, so add "rockchip,px30-pmu", "syscon", "simple-mfd" "rockchip,rk3288-pmu", "syscon", "simple-mfd" "rockchip,rk3399-pmu", "syscon", "simple-mfd" for pmu nodes to pmu.yaml. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210417112952.8516-13-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 532259bfd1c12d561215c32b94cd9bb7c997bc6f Author: Zou Wei Date: Tue May 11 15:08:42 2021 +0800 spi: altera: Remove redundant dev_err call in dfl_spi_altera_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620716922-108572-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit 86b8bff7e3ac6775113639d88db7448a8b47f0c1 Author: Andy Shevchenko Date: Mon May 10 16:11:20 2021 +0300 spi: Convert to use predefined time multipliers We have a lot of hard coded values in nanoseconds or other units. Use predefined constants to make it more clear. While at it, add or amend comments in the corresponding functions. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131120.49253-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit d019f38a1af3c6015cde6a47951a3ec43beeed80 Author: Zou Wei Date: Tue May 11 11:53:18 2021 +0800 regulator: uniphier: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620705198-104566-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit 46bdcac533cca06c481524343de7d9cc46d67093 Author: Odelu Kukatla Date: Tue Apr 27 15:20:57 2021 +0530 interconnect: qcom: Add SC7280 interconnect provider driver Add driver for the Qualcomm interconnect buses found in SC7280 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Signed-off-by: Odelu Kukatla Link: https://lore.kernel.org/r/1619517059-12109-3-git-send-email-okukatla@codeaurora.org Signed-off-by: Georgi Djakov commit 0b889618939f28bf447a1618f997243f82c7ff9a Author: Odelu Kukatla Date: Tue Apr 27 15:20:56 2021 +0530 dt-bindings: interconnect: Add Qualcomm SC7280 DT bindings The Qualcomm SC7280 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Signed-off-by: Odelu Kukatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1619517059-12109-2-git-send-email-okukatla@codeaurora.org Signed-off-by: Georgi Djakov commit 3fdb59cf10b020b32b9f1dfc78611320623dcb3e Author: Andy Shevchenko Date: Mon May 10 15:41:34 2021 +0300 spi: pxa2xx: Introduce special type for Merrifield SPIs Intel Merrifield SPI is actually more closer to PXA3xx. It has extended FIFO (32 bytes) and additional registers to get or set FIFO thresholds. Introduce new type for Intel Merrifield SPI host controllers and handle bigger FIFO size. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-15-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit eca32c3974c0664f88fed90b327f473bd18a4809 Author: Andy Shevchenko Date: Mon May 10 15:41:33 2021 +0300 spi: pxa2xx: Constify struct driver_data parameter In a couple of functions the contents of struct driver_data are not altered, hence we may constify the respective function parameter. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-14-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 6d380132eaea536bef641f21847c8a7987e96ad8 Author: Andy Shevchenko Date: Mon May 10 15:41:32 2021 +0300 spi: pxa2xx: Extract read_SSSR_bits() helper There are few places that repeat the logic of "read some bits from SSSR". Extract read_SSSR_bits() helper to deduplicate that. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-13-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 42c80cd439a938569a86f6ae135d38c1cda5569b Author: Andy Shevchenko Date: Mon May 10 15:41:31 2021 +0300 spi: pxa2xx: Extract clear_SSCR1_bits() helper There are few places that repeat the logic of "clear some bits in SSCR1". Extract clear_SSCR1_bits() helper to deduplicate that. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-12-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 1bed378c6b9116c51ae59b970cf3d9b4e9e62ced Author: Andy Shevchenko Date: Mon May 10 15:41:30 2021 +0300 spi: pxa2xx: Extract pxa2xx_spi_update() helper There are few places that repeat the logic of "update if changed". Extract pxa2xx_spi_update() helper to deduplicate that. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-11-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 0c8ccd8b267fc735e4621774ce62728f27d42863 Author: Andy Shevchenko Date: Mon May 10 15:41:29 2021 +0300 spi: pxa2xx: Use pxa_ssp_enable()/pxa_ssp_disable() in the driver There are few places that repeat the logic of pxa_ssp_enable() and pxa_ssp_disable(). Use them instead of open coded variants. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-10-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4761d2e7e51cfbe6fdb4e95903d407927f519f50 Author: Andy Shevchenko Date: Mon May 10 15:41:28 2021 +0300 spi: pxa2xx: Reuse int_error_stop() in pxa2xx_spi_slave_abort() It appears that pxa2xx_spi_slave_abort()almost repeats the functionality of the int_error_stop(). Reuse int_error_stop() in pxa2xx_spi_slave_abort(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-9-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit ab77fe8935c57d1339d3df64957f32e87f0d5ef3 Author: Andy Shevchenko Date: Mon May 10 15:41:27 2021 +0300 spi: pxa2xx: Introduce int_stop_and_reset() helper Currently we have three times the same few lines repeated in the code. Deduplicate them by newly introduced int_stop_and_reset() helper. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510124134.24638-8-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 36777d962082bdfd2f8e45d5cd748b21838d76cc Author: Samuel Holland Date: Thu Apr 29 22:58:58 2021 -0500 arm64: dts: allwinner: pinephone: Add support for Bluetooth audio The PinePhone has a Bluetooth chip with its PCM interface connected to AIF3. Add the DAI link so headeset audio can be routed in hardware. Even though the link is 16 bit PCM, configuring the link a 32-bit slot is required for compatibility with AIF2, which also uses a 32-bit slot, and which shares clock dividers with AIF3. Using equal clock frequencies allows the modem and headset to be used at the same time. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-7-samuel@sholland.org commit 984a51c5308c907ee934e9521cc7a0b3835a1f6e Author: Samuel Holland Date: Thu Apr 29 22:58:57 2021 -0500 arm64: dts: allwinner: a64: Allow multiple DAI links simple-audio-card supports either a single DAI link at the top level, or subnodes with one or more DAI links. To use the secondary AIFs on the codec, we need to add additional DAI links to the same sound card, so we need to use the other binding. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-6-samuel@sholland.org commit 09e0a7ea75e0dcde8db975be52a690663d67c256 Author: Samuel Holland Date: Thu Apr 29 22:58:56 2021 -0500 arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 Now that the sun8i-codec driver supports AIF2 and AIF3, boards can use them in DAI links. Add the necessary pinmux nodes. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-5-samuel@sholland.org commit e0cd8e0118157b0e2ae970dd9141722225fbd9a4 Author: Samuel Holland Date: Thu Apr 29 22:58:55 2021 -0500 arm64: dts: allwinner: a64: Allow using multiple codec DAIs Increase #sound-dai-cells on the digital codec to allow using the other DAIs provided by the codec for AIF2 and AIF3. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-4-samuel@sholland.org commit a691acabac36ea9966c41780d60ee2689c1cead7 Author: Samuel Holland Date: Thu Apr 29 22:58:54 2021 -0500 ARM: dts: sun8i-a33: Allow using multiple codec DAIs Increase #sound-dai-cells on the digital codec to allow using the other DAIs provided by the codec for AIF2 and AIF3. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-3-samuel@sholland.org commit d88834bfefdeb8f2456934b662613dbe3bae58df Author: Samuel Holland Date: Thu Apr 29 22:58:53 2021 -0500 ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Increase sound-dai-cells to 1 to allow using the DAIs in the codec corresponding to AIF2 and AIF3. The generic ASoC OF code supports a #sound-dai-cells value of 0 or 1 with no impact to the driver, so this is a backward-compatible change. Signed-off-by: Samuel Holland Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210430035859.3487-2-samuel@sholland.org commit 12bcaacaff49fc18612a7df21b76235ca8eb5c7f Author: Samuel Holland Date: Sun Mar 21 23:47:06 2021 -0500 arm64: dts: allwinner: Add sun4i MMIO timer nodes For a CPU to enter an idle state, some timer must be available to trigger an IRQ and wake it back up. The local ARM architectural timer is not sufficient, because that timer stops when the CPU is powered down. The ARM architectural timer from some other CPU can be used, but doing so prevents that other CPU from entering an idle state. For all CPUs to power down at the same time, Linux needs a timer which is not tied to any CPU. Hook up the "sun4i" timer so it can be used for this purpose. It runs at 24 MHz, which balances resolution and power consumption. Signed-off-by: Samuel Holland Acked-by: Daniel Lezcano Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210322044707.19479-5-samuel@sholland.org commit af97dd5559c59050f452997a4328b1a794f6fd6a Author: Samuel Holland Date: Sun Mar 21 23:47:05 2021 -0500 arm64: dts: allwinner: a64: Sort watchdog node Nodes should be sorted by unit address. Move the watchdog node to the correct place, so it will be next to the timer node when that is added. Signed-off-by: Samuel Holland Acked-by: Daniel Lezcano Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210322044707.19479-4-samuel@sholland.org commit bffdc0f3c26c7d9b5006326e0f7b7871d4eaaf13 Author: Samuel Holland Date: Sun Mar 21 23:47:04 2021 -0500 dt-bindings: timer: Add compatibles for sun50i timers The sun50i SoCs contain timer blocks which are useful as broadcast clockevent sources. They each have 2 interrupts, matching the A23 variant, so add the new compatible strings with the A23 compatible as a fallback. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Reviewed-by: Rob Herring Acked-by: Daniel Lezcano Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210322044707.19479-3-samuel@sholland.org commit 5bd15031337f544891185361899db40961d9044e Author: Samuel Holland Date: Sun Mar 21 23:47:03 2021 -0500 dt-bindings: timer: Simplify conditional expressions The sun4i timer IP block has a variable number of interrupts based on the compatible. Use enums to combine the two sections for the existing 3-interrupt variants, and to simplify adding new compatible strings. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Reviewed-by: Rob Herring Acked-by: Daniel Lezcano Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210322044707.19479-2-samuel@sholland.org commit d6e58e379610799ea53419eb8b08e061aa27fc4c Merge: bf2509a455349 9e37a3ab06270 Author: Mark Brown Date: Tue May 11 09:06:07 2021 +0100 Merge series "spi: Set of cleanups" from Jay Fang : Some cleanups of SPI drivers. No functional change. Thanks, Jay Jay Fang (4): spi: ppc4xx: include instead of spi: omap-100k: Clean the value of 'status' is not used spi: delete repeated words in comments spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' drivers/spi/spi-bcm2835aux.c | 2 +- drivers/spi/spi-dw-mmio.c | 2 +- drivers/spi/spi-geni-qcom.c | 4 ++-- drivers/spi/spi-loopback-test.c | 2 +- drivers/spi/spi-omap-100k.c | 2 -- drivers/spi/spi-pl022.c | 4 ++-- drivers/spi/spi-ppc4xx.c | 4 ++-- 7 files changed, 9 insertions(+), 11 deletions(-) -- 2.7.4 commit bf2509a455349981527e142f213aae9628862779 Merge: 665a990fdbea6 1beb37b0e3f98 Author: Mark Brown Date: Tue May 11 09:06:06 2021 +0100 Merge series "spi: pxa2xx: Set of cleanups" from Andy Shevchenko : Set of cleanups here and there related to the SPI PXA2xx driver. On top of them, adding the special type for Intel Merrifield. In v2: - cover letter (Mark) - drop moving the header in patch 5 (Mark) Andy Shevchenko (14): spi: pxa2xx: Use one point of return when ->probe() fails spi: pxa2xx: Utilize MMIO and physical base from struct ssp_device spi: pxa2xx: Utilize struct device from struct ssp_device spi: pxa2xx: Replace header inclusions by forward declarations spi: pxa2xx: Unify ifdeffery used in the headers spi: pxa2xx: Group Intel Quark specific definitions spi: pxa2xx: Introduce int_stop_and_reset() helper spi: pxa2xx: Reuse int_error_stop() in pxa2xx_spi_slave_abort() spi: pxa2xx: Use pxa_ssp_enable()/pxa_ssp_disable() in the driver spi: pxa2xx: Extract pxa2xx_spi_update() helper spi: pxa2xx: Extract clear_SSCR1_bits() helper spi: pxa2xx: Extract read_SSSR_bits() helper spi: pxa2xx: Constify struct driver_data parameter spi: pxa2xx: Introduce special type for Merrifield SPIs drivers/spi/spi-pxa2xx-dma.c | 37 +++---- drivers/spi/spi-pxa2xx-pci.c | 4 +- drivers/spi/spi-pxa2xx.c | 190 +++++++++++++++++---------------- drivers/spi/spi-pxa2xx.h | 52 ++++----- include/linux/pxa2xx_ssp.h | 42 +++++++- include/linux/spi/pxa2xx_spi.h | 9 +- sound/soc/pxa/pxa-ssp.c | 16 --- 7 files changed, 185 insertions(+), 165 deletions(-) -- 2.30.2 commit 8c94df1e6fe4a0bb31fd94e96256e49032940b1f Merge: 4446e6f3bd5c9 67823d9dadd4d Author: Mark Brown Date: Tue May 11 09:06:04 2021 +0100 Merge series "Enable VBUS current boost on pm8150b platforms" from Bryan O'Donoghue : V3: - Drop the SoC regulator constraints for regulator-min-microamp regulator-max-microamp These will be applied on a per-board basis - Mark Brown V2: The first version of this patch set the current limit to 3 amps as was done in downstream. Mark indicated a preference to set this on a per-system basis instead of blitzing it, as in downstream. Looking at what was upstream versus what was in my working tree I saw that in fact the VBUS boost driver had been upstreamed minus accompanying DTS in pm8150b. So there's no need for a fixes as this driver doesn't appear to be in use. A subsequent patchset will enable the VBUS boost for the two relevant upstream platforms. First thing though, is the driver + dts change. - Use regulator_set_current_limit_regmap/regulator_get_current_limit_regmap with a relevant current-to-bitmap lookup. - Add a parallel DTS entry to the pm8150b It looks like this was submitted upstream but not followed up on I've add regulator-min-microamp/regulator-max-microamp to Wesley's original work. I've made sure to test that its possible to set the current to anything in the range of 500 mA to 3 A and confirmed the output on a scope. Once these two patches are in, I'll send out board enablement for the sm8150-mtp and qrb5165-rb5. https://lore.kernel.org/linux-arm-msm/8687acdb-75e9-5fc5-dd3e-9a19615676b5@linaro.org/T/#t Bryan O'Donoghue (1): regulator: Add a routine to set the current limit for QCOM PMIC VBUS Wesley Cheng (1): arm64: boot: dts: qcom: pm8150b: Add DTS node for PMIC VBUS booster arch/arm64/boot/dts/qcom/pm8150b.dtsi | 6 ++++++ drivers/regulator/qcom_usb_vbus-regulator.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) -- 2.30.1 commit ae062a711aa2485fc4f6fe48cdb7229c849f2568 Merge: b8ded8af30a9d 880e007f15a31 Author: Mark Brown Date: Tue May 11 09:06:03 2021 +0100 Merge series "PinePhone BT audio bringup" from Samuel Holland : This series uses the additional DAIs added to the sun8i-codec driver to add hardware routing for BT SCO (headset) audio on the PinePhone. The BT audio connection is represented by the "dummy" bt-sco codec. The connection to the Quectel EG-25G modem via AIF2 works as well, but I do not include it here because there is no appropriate codec driver in tree. We have been using an out-of-tree "dummy" codec driver for the modem similar to bt-sco, and I'm not sure if such a driver would be desired upstream. Changes from v2: - Also accept #sound-dai-cells in the binding. Since dt-core.yaml already sets the type of this property, it is not possible to use oneOf, nor make a specific value deprecated. Changes from v1: - Fixed DT binding example to follow new binding Arnaud Ferraris (1): arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland (6): ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells ARM: dts: sun8i-a33: Allow using multiple codec DAIs arm64: dts: allwinner: a64: Allow using multiple codec DAIs arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 arm64: dts: allwinner: a64: Allow multiple DAI links arm64: dts: allwinner: pinephone: Add support for Bluetooth audio .../sound/allwinner,sun8i-a33-codec.yaml | 8 +++- arch/arm/boot/dts/sun8i-a33.dtsi | 4 +- .../dts/allwinner/sun50i-a64-pinephone.dtsi | 25 +++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 ++++++++++++++----- 4 files changed, 60 insertions(+), 14 deletions(-) -- 2.26.3 commit b8ded8af30a9d9d8a26ac69ab15f11d9694bc773 Merge: 3b8fb1f7702be 4fc81bc88ad9d Author: Mark Brown Date: Tue May 11 09:06:01 2021 +0100 Merge series "Tidy up device ID reading on legacy Cirrus parts" from Charles Keepax : Pierre requested I have a look at some cppcheck warnings in the cs42l42 driver, since it is reassigning the ret variable without ever checking the result. Looking a bit more broadly this happens in quite a few legacy Cirrus parts, as they all use the same process to read the ID, factor out a small helper so they can all share the same code. Whilst in there fix up a couple of other trivial error path issues as well. Thanks, Charles Charles Keepax (10): ASoC: cirrus: Add helper function for reading the device ID ASoC: cs35l32: Minor error paths fixups ASoC: cs35l33: Minor error paths fixups ASoC: cs35l34: Minor error paths fixups ASoC: cs35l35: Minor error paths fixups ASoC: cs35l35: Correct errata handling ASoC: cs42l42: Minor error paths fixups ASoC: cs42l73: Minor error paths fixups ASoC: cs43130: Minor error paths fixups ASoC: cs53l30: Minor error paths fixups sound/soc/codecs/cirrus_legacy.h | 21 +++++++++++++++++++++ sound/soc/codecs/cs35l32.c | 34 ++++++++++++++++++---------------- sound/soc/codecs/cs35l33.c | 15 +++++++++------ sound/soc/codecs/cs35l34.c | 39 ++++++++++++++++++++++----------------- sound/soc/codecs/cs35l35.c | 21 ++++++++++----------- sound/soc/codecs/cs35l35.h | 1 + sound/soc/codecs/cs42l42.c | 18 ++++++++---------- sound/soc/codecs/cs42l73.c | 30 +++++++++++++++++------------- sound/soc/codecs/cs43130.c | 31 +++++++++++++++++++------------ sound/soc/codecs/cs53l30.c | 22 +++++++++++----------- 10 files changed, 136 insertions(+), 96 deletions(-) create mode 100644 sound/soc/codecs/cirrus_legacy.h -- 2.11.0 commit 3b8fb1f7702be9dcc50443b5822cb409a31280a3 Merge: b748ad38041a9 cccc16dc175ea Author: Mark Brown Date: Tue May 11 09:06:00 2021 +0100 Merge series "ASoC: cppcheck fixes of the week" from Pierre-Louis Bossart : While running some checks on a rebased branch, I realized I missed a couple of trivial cases on newer code. Pierre-Louis Bossart (4): ASoC: codecs: mt6359-accdet: remove useless initialization ASoc: codecs: mt6359: remove useless initializations ASoC: codecs: rt1019: clarify expression ASoC: fsl: imx-pcm-rpmsg: remove useless initialization sound/soc/codecs/mt6359-accdet.c | 2 +- sound/soc/codecs/mt6359.c | 2 +- sound/soc/codecs/rt1019.c | 4 ++-- sound/soc/fsl/imx-pcm-rpmsg.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- 2.25.1 commit b748ad38041a9a7ab2ab1cb9f8ad24271d1de9c4 Merge: 93c964af77e75 47fad2393b044 Author: Mark Brown Date: Tue May 11 09:05:59 2021 +0100 Merge series "ASoC: SOF: Intel: split Baytrail and Merrifield" from Pierre-Louis Bossart : We've had recurring randconfig issues with the two platforms relying on ACPI and PCI. I think it's time to split the two and introduce a common 'atom' module, so that dependencies are better handled. I chose not to add a Fixes tag since the changes are rather invasive, and the randconfig issues only happen in non-functional cases. There should be no functional changes with this patchset, only code moved and renamed. Pierre-Louis Bossart (2): ASoC: SOF: Intel: byt: prepare split between Baytrail and Merrifield ASoC: SOF: Intel: move common ATOM stuff to module sound/soc/sof/intel/Makefile | 5 +- sound/soc/sof/intel/atom.c | 463 ++++++++++++++++++++ sound/soc/sof/intel/atom.h | 74 ++++ sound/soc/sof/intel/byt.c | 768 ++++------------------------------ sound/soc/sof/intel/pci-tng.c | 171 +++++++- 5 files changed, 783 insertions(+), 698 deletions(-) create mode 100644 sound/soc/sof/intel/atom.c create mode 100644 sound/soc/sof/intel/atom.h -- 2.25.1 commit 93c964af77e75b1d0a2fbc3d445b2bd8f99f8f51 Merge: b63ecaea97aac b70029abfc90e Author: Mark Brown Date: Tue May 11 09:05:58 2021 +0100 Merge series "ASoC: Intel: machine driver updates for 5.14" from Pierre-Louis Bossart : Some of the patches in this series for TigerLake and AlderLake SoundWire/Bluetooth support were missed in a previous submission, resend them as is, and add new patches for the CS42L42 machine driver. Brent Lu (3): ASoC: Intel: maxim-common: support max98357a ASoC: Intel: add sof-cs42l42 machine driver ASoC: Intel: sof_rt5682: code refactor for max98357a Libin Yang (1): ASoC: Intel: sof_sdw: add SOF_RT715_DAI_ID_FIX for AlderLake Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw: add mutual exclusion between PCH DMIC and RT715 ASoC: Intel: boards: handle hda-dsp-common as a module ASoC: Intel: boards: create sof-maxim-common module ASoC: Intel: boards: remove .nonatomic for BE dailinks Vamshi Krishna Gopal (2): ASoC: Intel: soc-acpi: add entries for i2s machines in ADL match table ASoC: Intel: boards: add support for adl boards in sof-rt5682 Yong Zhi (3): ASoC: Intel: Boards: tgl_max98373: Add BT offload support ASoC: Intel: sof_sdw: add support for Bluetooth offload ASoC: Intel: sof_rt5682: Enable Bluetooth offload on tgl and adl sound/soc/intel/boards/Kconfig | 36 +- sound/soc/intel/boards/Makefile | 30 +- sound/soc/intel/boards/bxt_da7219_max98357a.c | 1 + sound/soc/intel/boards/bxt_rt298.c | 1 + sound/soc/intel/boards/bytcht_cx2072x.c | 1 - sound/soc/intel/boards/bytcht_da7213.c | 1 - sound/soc/intel/boards/bytcht_es8316.c | 1 - sound/soc/intel/boards/bytcht_nocodec.c | 1 - sound/soc/intel/boards/bytcr_rt5640.c | 1 - sound/soc/intel/boards/bytcr_rt5651.c | 1 - sound/soc/intel/boards/bytcr_wm5102.c | 1 - sound/soc/intel/boards/cht_bsw_rt5645.c | 1 - sound/soc/intel/boards/cht_bsw_rt5672.c | 1 - sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 + sound/soc/intel/boards/ehl_rt5660.c | 2 +- sound/soc/intel/boards/glk_rt5682_max98357a.c | 1 + sound/soc/intel/boards/hda_dsp_common.c | 5 + sound/soc/intel/boards/skl_hda_dsp_generic.c | 1 + sound/soc/intel/boards/sof_cs42l42.c | 509 ++++++++++++++++++ sound/soc/intel/boards/sof_da7219_max98373.c | 1 + sound/soc/intel/boards/sof_maxim_common.c | 84 ++- sound/soc/intel/boards/sof_maxim_common.h | 14 +- sound/soc/intel/boards/sof_pcm512x.c | 2 +- sound/soc/intel/boards/sof_rt5682.c | 119 +++- sound/soc/intel/boards/sof_sdw.c | 55 +- sound/soc/intel/boards/sof_sdw_common.h | 8 + sound/soc/intel/boards/sof_sdw_max98373.c | 4 +- sound/soc/intel/boards/sof_wm8804.c | 1 - .../intel/common/soc-acpi-intel-adl-match.c | 26 + .../intel/common/soc-acpi-intel-glk-match.c | 10 + 30 files changed, 861 insertions(+), 59 deletions(-) create mode 100644 sound/soc/intel/boards/sof_cs42l42.c -- 2.25.1 commit 904ec4bebc1df908a943bf3178f6c633672ce47b Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:04 2021 +0200 pinctrl: renesas: r8a779{51,6,65}: Reduce non-functional differences Change whitespace in the pin control drivers for R-Car H3 ES2.0+, R-Car M3-W/M3-W+, and R-Car M3-N, to reduce the differences among these very similar drivers. These changes have no functional impact. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/527b45ebfc664a80e41cb0136677db7260e11437.1619785375.git.geert+renesas@glider.be commit cf04bbe5ed29cb7b3205bebfd8f4e747359d2cd9 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:03 2021 +0200 pinctrl: renesas: r8a7778: Remove unused PORT_GP_PUP_1() macro The last user was removed in commit dd1f760bffcee2c5 ("pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/129147ac57f5e931cc7108db0a6483b803a1b8f4.1619785375.git.geert+renesas@glider.be commit d82b92410359e57c16455322fa9baf36cb72bc80 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:02 2021 +0200 pinctrl: renesas: r8a77990: Drop bogus PUEN_ prefixes in comments The "PUEN_" prefixes are part of the bit names of the PUEN registers, while the comments should refer to the actual pin names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/9ea85ae8973f6d9b3d10f02f0d9b4ab6a086ec63.1619785375.git.geert+renesas@glider.be commit 702a5fa2fe4d7e7f28fed92a170b540acfff9d34 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:01 2021 +0200 pinctrl: renesas: r8a77990: JTAG pins do not have pull-down capabilities Hence remove the SH_PFC_PIN_CFG_PULL_DOWN flags from their pin descriptions. Fixes: 83f6941a42a5e773 ("pinctrl: sh-pfc: r8a77990: Add bias pinconf support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/da4b2d69955840a506412f1e8099607a0da97ecc.1619785375.git.geert+renesas@glider.be commit 2cee31cd49733e89dfedf4f68a56839fc2e42040 Author: Geert Uytterhoeven Date: Fri Apr 30 14:31:00 2021 +0200 pinctrl: renesas: r8a7796: Add missing bias for PRESET# pin R-Car Gen3 Hardware Manual Errata for Rev. 0.52 of Nov 30, 2016, added the configuration bit for bias pull-down control for the PRESET# pin on R-Car M3-W. Add driver support for controlling pull-down on this pin. Fixes: 2d40bd24274d2577 ("pinctrl: sh-pfc: r8a7796: Add bias pinconf support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/c479de5b3f235c2f7d5faea9e7e08e6fccb135df.1619785375.git.geert+renesas@glider.be commit 6bd913f54f2f1973e741c6cf36b90175e8963175 Author: Geert Uytterhoeven Date: Thu Apr 1 15:03:24 2021 +0200 clk: renesas: r9a06g032: Switch to .determine_rate() As the .round_rate() callback returns a long clock rate, it cannot return clock rates that do not fit in signed long, but do fit in unsigned long. Hence switch the divider clocks on RZ/N1 from the old .round_rate() callback to the newer .determine_rate() callback, which does not suffer from this limitation. Note that range checking is not yet implemented. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7a384d02b85cdaac4a0e2b357582c8244b9a6f98.1617282116.git.geert+renesas@glider.be commit 02c69593e62d51dd6b29b58724a6947ba72074f0 Author: Geert Uytterhoeven Date: Thu Apr 1 15:01:38 2021 +0200 clk: renesas: div6: Implement range checking Consider the minimum and maximum clock rates imposed by clock users when calculating the most appropriate clock rate in the .determine_rate() callback. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/35ceb262c71f1b2e9864a39bde9dafd78b2981f4.1617281699.git.geert+renesas@glider.be commit 1c924fc679123e6057239693d226c8d8c5780626 Author: Geert Uytterhoeven Date: Thu Apr 1 15:01:37 2021 +0200 clk: renesas: div6: Consider all parents for requested rate Currently the .determine_rate() callback considers only the current parent clock, limiting the range of achievable clock rates on DIV6 clocks with multiple parents, as found on SH/R-Mobile SoCs. Extend the callback to consider all available parent clocks. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/60e639692b462f99e0b6ab868c3675b3d97dbdb0.1617281699.git.geert+renesas@glider.be commit c9d1b58b272e272fc7121929e2d0e0755ea1656e Author: Geert Uytterhoeven Date: Thu Apr 1 15:01:36 2021 +0200 clk: renesas: div6: Switch to .determine_rate() As the .round_rate() callback returns a long clock rate, it cannot return clock rates that do not fit in signed long, but do fit in unsigned long. Hence switch the DIV6 clocks on SH/R-Mobile and R-Car SoCs from the old .round_rate() callback to the newer .determine_rate() callback, which does not suffer from this limitation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7fd8c45cd8bf5c6d928ca69c8b669be35b93de09.1617281699.git.geert+renesas@glider.be commit 23b04c84e201e82c1929144a2ce1442bd64e77f3 Author: Geert Uytterhoeven Date: Thu Apr 1 15:01:35 2021 +0200 clk: renesas: div6: Simplify src mask handling Simplify the handling of the register bits to select the parent clock, by storing a bitmask instead of separate shift and width values. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/5f05a5110d222ce5a113e683fe2aa726f4100b73.1617281699.git.geert+renesas@glider.be commit 6c7bc7dbcc4122745a214134749a0b1ab2658c80 Author: Geert Uytterhoeven Date: Thu Apr 1 15:01:34 2021 +0200 clk: renesas: div6: Use clamp() instead of clamp_t() As "div" is already "unsigned int", adding "U" suffixes to the constants "1" and "64" allows us to replace the call to clamp_t() by a call to clamp(). This removes hidden casts, and thus helps the compiler doing a better job at type-checking. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/2670c1e3c82a245666578cbbd1fb20d37932fd8e.1617281699.git.geert+renesas@glider.be commit a20a40a8bbc2cf4b29d7248ea31e974e9103dd7f Author: Dinghao Liu Date: Thu Apr 15 15:33:38 2021 +0800 clk: renesas: rcar-usb2-clock-sel: Fix error handling in .probe() The error handling paths after pm_runtime_get_sync() have no refcount decrement, which leads to refcount leak. Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20210415073338.22287-1-dinghao.liu@zju.edu.cn [geert: Remove now unused variable priv] Signed-off-by: Geert Uytterhoeven commit 16927401d92401b8f1fe6b57707e08271347ee80 Author: Niklas Söderlund Date: Tue Mar 30 00:32:20 2021 +0200 clk: renesas: r8a779a0: Add ISPCS clocks Add support for the ISPCS clocks on R-Car V3U. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210329223220.1139211-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 3a0e84845891eebccce767b4f8cd5ed1b9bffc14 Author: Geert Uytterhoeven Date: Fri Mar 26 13:01:00 2021 +0100 clk: renesas: rcar-gen3: Add boost support to Z clocks Add support for switching the Z and Z2 clocks between normal and boost modes, by requesting clock rate changes to parent PLLs. Inspired by a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-8-geert+renesas@glider.be commit 3f70795636853214fd941d3ffe0a9701176cb8ba Author: Geert Uytterhoeven Date: Fri Mar 26 13:00:59 2021 +0100 clk: renesas: rcar-gen3: Add custom clock for PLLs Currently the PLLs are modeled as fixed factor clocks, based on initial settings. However, enabling CPU boost clock rates requires increasing the PLL clock rates. Add a custom clock driver to model the PLL clocks. This will allow the Z (CPU) clock driver to request changing the PLL clock rate. Based on a patch in the BSP by Takeshi Kihara . Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-7-geert+renesas@glider.be commit 50086045bd07a9bc55c113f2b19a8f3746c9f9b0 Author: Geert Uytterhoeven Date: Fri Mar 26 13:00:58 2021 +0100 clk: renesas: rcar-gen3: Increase Z clock accuracy Improve accuracy in the .determine_rate() callback for Z and Z2 clocks by using rounded divisions. This is similar to the calculation of rates and multipliers in the .recalc_rate() resp. set_rate() callbacks. Sample impact for a few requested clock rates: - R-Car H3: - Z 500 MHz: 468 MHz => 515 MHz - Z2 1000 MHz: 973 MHz => 1011 MHz - R-Car M3-W: - Z 500 MHz: 422 MHz => 516 MHz - Z2 800 MHz: 750 MHz => 788 MHz Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-6-geert+renesas@glider.be commit 67a1b9b65165bd3204adef13f0d557b5705116b4 Author: Geert Uytterhoeven Date: Fri Mar 26 13:00:57 2021 +0100 clk: renesas: rcar-gen3: Grammar s/dependent of/dependent on/ Fix grammar in comments for cpg_z_clk_set_rate(). Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-5-geert+renesas@glider.be commit c141897caafb4754b6ef862a67c87b8feed4d921 Author: Geert Uytterhoeven Date: Fri Mar 26 13:00:56 2021 +0100 clk: renesas: rcar-gen3: Remove superfluous masking in cpg_z_clk_set_rate() Due to the clamping of mult, "(32 - mult) << __ffs(zclk->mask)" can never exceed the mask. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-4-geert+renesas@glider.be commit 58effcd350c81735154313aa49b1c0801fdb04a2 Author: Geert Uytterhoeven Date: Fri Mar 26 13:00:55 2021 +0100 clk: renesas: rcar-gen3: Make cpg_z_clk.mask u32 cpg_z_clk.mask contains a mask for a 32-bit register. Hence its size can be reduced from unsigned long to u32. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-3-geert+renesas@glider.be commit 192c344e7cd4e19a4260752604ba219ffa41deb1 Author: Geert Uytterhoeven Date: Fri Mar 26 13:00:54 2021 +0100 clk: renesas: rcar-gen3: Update Z clock rate formula in comments The fixed divider in the calculation of the Z and Z2 clock rates was generalized from a hardcoded value of two to a parameterized value, but the comments were not updated accordingly. Fixes: 20cc05ba04a93f05 ("clk: renesas: rcar-gen3: Parameterise Z and Z2 clock fixed divisor") Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210326120100.1577596-2-geert+renesas@glider.be commit 4ae08bc23e1b29894b1af34990409a454cccf242 Author: Pawel Laszczak Date: Wed May 5 07:58:54 2021 +0200 usb: cdnsp: Useless condition has been removed This code generates a Smatch warning: drivers/usb/cdns3/cdnsp-mem.c:1085 cdnsp_mem_cleanup() warn: variable dereferenced before check 'pdev->dcbaa' (see line 1067) The unchecked dereference happens inside the function when we call: cdnsp_free_priv_device(pdev); But fortunately, the "pdev->dcbaa" pointer can never be NULL so it does not lead to a runtime issue. We can just remove the NULL check which silences the warning and makes the code consistent. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210505055854.40240-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen commit 440e547dd0f812c3082f81192e5c965e61c64dfa Author: Souptick Joarder Date: Sun Apr 25 13:46:05 2021 +0530 usb: cdns3: Corrected comment to align with kernel-doc comment Minor update in comment. Signed-off-by: Souptick Joarder Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/1619338565-4574-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Peter Chen commit 39107e8577ad177db4585d99f1fcc5a29a754ee2 Author: Gustavo A. R. Silva Date: Wed Apr 21 13:56:11 2021 -0500 scsi: aacraid: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct aac_raw_io2 instead of one-element array, and use the struct_size() helper. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: drivers/scsi/aacraid/aachba.c: In function ‘aac_build_sgraw2’: drivers/scsi/aacraid/aachba.c:3970:18: warning: array subscript 1 is above array bounds of ‘struct sge_ieee1212[1]’ [-Warray-bounds] 3970 | if (rio2->sge[j].length % (i*PAGE_SIZE)) { | ~~~~~~~~~^~~ drivers/scsi/aacraid/aachba.c:3974:27: warning: array subscript 1 is above array bounds of ‘struct sge_ieee1212[1]’ [-Warray-bounds] 3974 | nseg_new += (rio2->sge[j].length / (i*PAGE_SIZE)); | ~~~~~~~~~^~~ drivers/scsi/aacraid/aachba.c:4011:28: warning: array subscript 1 is above array bounds of ‘struct sge_ieee1212[1]’ [-Warray-bounds] 4011 | for (j = 0; j < rio2->sge[i].length / (pages * PAGE_SIZE); ++j) { | ~~~~~~~~~^~~ drivers/scsi/aacraid/aachba.c:4012:24: warning: array subscript 1 is above array bounds of ‘struct sge_ieee1212[1]’ [-Warray-bounds] 4012 | addr_low = rio2->sge[i].addrLow + j * pages * PAGE_SIZE; | ~~~~~~~~~^~~ drivers/scsi/aacraid/aachba.c:4014:33: warning: array subscript 1 is above array bounds of ‘struct sge_ieee1212[1]’ [-Warray-bounds] 4014 | sge[pos].addrHigh = rio2->sge[i].addrHigh; | ~~~~~~~~~^~~ drivers/scsi/aacraid/aachba.c:4015:28: warning: array subscript 1 is above array bounds of ‘struct sge_ieee1212[1]’ [-Warray-bounds] 4015 | if (addr_low < rio2->sge[i].addrLow) | ~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/lkml/60414244.ur4%2FkI+fBF1ohKZs%25lkp@intel.com/ Link: https://lore.kernel.org/r/20210421185611.GA105224@embeddedor Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen Build-tested-by: kernel test robot commit aef80fd1da322dfc96b227b2d1ee8177d885cc60 Author: Asutosh Das Date: Fri Apr 23 17:20:17 2021 -0700 scsi: ufs: sysfs: Resume the proper SCSI device Resume the SCSI device described by the unit descriptor instead of the HBA. Link: https://lore.kernel.org/r/889bb20c47cc1ae5e40390f533712b704000345b.1619223249.git.asutoshd@codeaurora.org Reviewed-by: Adrian Hunter Reviewed-by: Can Guo Signed-off-by: Asutosh Das Signed-off-by: Martin K. Petersen commit b294ff3e34490f36233230e9ca70503d3924a6f3 Author: Asutosh Das Date: Fri Apr 23 17:20:16 2021 -0700 scsi: ufs: core: Enable power management for wlun During runtime-suspend of ufs host, the SCSI devices are already suspended and so are the queues associated with them. However, the ufs host sends SSU (START_STOP_UNIT) to the wlun during runtime-suspend. During the process blk_queue_enter() checks if the queue is not in suspended state. If so, it waits for the queue to resume, and never comes out of it. Commit 52abca64fd94 ("scsi: block: Do not accept any requests while suspended") adds the check to see if the queue is in suspended state in blk_queue_enter(). Call trace: __switch_to+0x174/0x2c4 __schedule+0x478/0x764 schedule+0x9c/0xe0 blk_queue_enter+0x158/0x228 blk_mq_alloc_request+0x40/0xa4 blk_get_request+0x2c/0x70 __scsi_execute+0x60/0x1c4 ufshcd_set_dev_pwr_mode+0x124/0x1e4 ufshcd_suspend+0x208/0x83c ufshcd_runtime_suspend+0x40/0x154 ufshcd_pltfrm_runtime_suspend+0x14/0x20 pm_generic_runtime_suspend+0x28/0x3c __rpm_callback+0x80/0x2a4 rpm_suspend+0x308/0x614 rpm_idle+0x158/0x228 pm_runtime_work+0x84/0xac process_one_work+0x1f0/0x470 worker_thread+0x26c/0x4c8 kthread+0x13c/0x320 ret_from_fork+0x10/0x18 Fix this by registering ufs device wlun as a SCSI driver and registering it for block runtime-pm. Also make this a supplier for all other LUNs. This way the wlun device suspends after all the consumers and resumes after HBA resumes. This also registers a new SCSI driver for rpmb wlun. This new driver is mostly used to clear rpmb uac. [mkp: resolve merge conflict with 5.13-rc1 and fix doc warning] Fixed smatch warnings: Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/4662c462e79e3e7f541f54f88f8993f421026d83.1619223249.git.asutoshd@codeaurora.org Reviewed-by: Adrian Hunter Co-developed-by: Can Guo Signed-off-by: Can Guo Signed-off-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 6914d1ba4d0acecd012ad4d4047be18434a9ab76 Author: Heiko Schocher Date: Tue Mar 9 06:31:15 2021 +0100 arm64: dts: imx8mp: add flexspi node add node for the flexspi modul on imx8mp. Signed-off-by: Heiko Schocher Signed-off-by: Shawn Guo commit fd781f459b60522f9fbfa1e125f122cf86d4a45b Author: Jiapeng Chong Date: Wed Apr 28 18:00:15 2021 +0800 selinux: Remove redundant assignment to rc Variable rc is set to '-EINVAL' but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: security/selinux/ss/services.c:2103:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. security/selinux/ss/services.c:2079:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. security/selinux/ss/services.c:2071:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. security/selinux/ss/services.c:2062:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. security/selinux/ss/policydb.c:2592:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Paul Moore commit 7cffc377e1633b84a880b21eebf10562eaa47a23 Author: Souptick Joarder Date: Sun Apr 25 14:05:37 2021 +0530 selinux: Corrected comment to match kernel-doc comment Minor documentation update. Signed-off-by: Souptick Joarder Cc: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Paul Moore commit e0cdd26af8eb9001689a4cde4f72c61c1c4b06be Author: Uwe Kleine-König Date: Mon Aug 10 10:47:25 2020 +0200 ARM: dts: imx25-pinfunc: Fix gpio function name for pads GPIO_[A-F] The pinfunc definitions used GPIO_A as function instead of GPIO_1_0 as done for all the other pins with GPIO functionality. Fix for consistency. There are no mainline users that needs adaption. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit 8a922805fb0950187ff037801e337aec010a6ccb Author: Zhongjun Tan Date: Fri Apr 9 13:48:41 2021 +0800 selinux: delete selinux_xfrm_policy_lookup() useless argument seliunx_xfrm_policy_lookup() is hooks of security_xfrm_policy_lookup(). The dir argument is uselss in security_xfrm_policy_lookup(). So remove the dir argument from selinux_xfrm_policy_lookup() and security_xfrm_policy_lookup(). Signed-off-by: Zhongjun Tan [PM: reformat the subject line] Signed-off-by: Paul Moore commit 2b1649a83afc917b66731a4ccaec64eca5f9861d Author: Tim Harvey Date: Tue Mar 30 08:19:44 2021 -0700 arm64: dts: imx: Add i.mx8mm Gateworks gw7901 dts support The Gateworks GW7901 is an ARM based single board computer (SBC) featuring: - i.MX8M Mini SoC - LPDDR4 DRAM - eMMC FLASH - SPI FRAM - Gateworks System Controller (GSC) - Atmel ATECC Crypto Authentication - USB 2.0 - Microchip GbE Switch - Multiple multi-protocol RS232/RS485/RS422 Serial ports - onboard 802.11ac WiFi / BT - microSD socket - miniPCIe socket with PCIe, USB 2.0 and dual SIM sockets - Wide range DC power input - 802.3at PoE Signed-off-by: Tim Harvey Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit c67b761aac6cb4d035ac64e463628a996d98f950 Author: Sahil Malhotra Date: Tue Mar 30 20:20:27 2021 +0530 arm64: dts: ls1028a-rdb: enable optee node optee node was disabled by default, enabling it for ls1028a-rdb. Signed-off-by: Michael Walle Signed-off-by: Sahil Malhotra Acked-by: Li Yang Signed-off-by: Shawn Guo commit 5497bc2a2bff777ce6d176650377362c0269b5eb Author: Uwe Kleine-König Date: Mon Mar 29 14:34:09 2021 +0200 arm64: dts: imx8mp-evk: Add PMIC device The imx8mp-evk uses an PCA9450C as PMIC that supplies various regulators. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit bf3605187530d82ece4f22bb1f2ac53d231f41d4 Author: Tim Harvey Date: Tue Mar 30 08:19:43 2021 -0700 dt-bindings: arm: imx: add imx8mm gw7901 support The Gateworks GW7901 is an ARM based single board computer (SBC) featuring: - i.MX8M Mini SoC - LPDDR4 DRAM - eMMC FLASH - SPI FRAM - Gateworks System Controller (GSC) - Atmel ATECC Crypto Authentication - USB 2.0 - Microchip GbE Switch - Multiple multi-protocol RS232/RS485/RS422 Serial ports - onboard 802.11ac WiFi / BT - microSD socket - miniPCIe socket with PCIe, USB 2.0 and dual SIM sockets - Wide range DC power input - 802.3at PoE Acked-by: Rob Herring Signed-off-by: Tim Harvey Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit fd268e371c5e7b96e20325694ffd1f99baa01118 Author: Fabio Estevam Date: Mon Mar 29 09:09:54 2021 -0300 ARM: dts: imx6qdl-wandboard-revd1: Remove PAD_EIM_D22 from hog group The MX6QDL_PAD_EIM_D22 pad is already handled in the common imx6qdl-wandboard.dtsi file. Remove it from the local hog group to avoid the following runtime error: [ 0.117763] imx6q-pinctrl 20e0000.pinctrl: pin MX6Q_PAD_EIM_D22 already requested by 20e0000.pinctrl; cannot claim for regulator-usbotgvbus [ 0.117785] imx6q-pinctrl 20e0000.pinctrl: pin-42 (regulator-usbotgvbus) status -22 [ 0.117802] imx6q-pinctrl 20e0000.pinctrl: could not request pin 42 (MX6Q_PAD_EIM_D22) from group usbotgvbusgrp on device 20e0000.pinctrl [ 0.117822] reg-fixed-voltage regulator-usbotgvbus: Error applying setting, reverse things back [ 0.117844] reg-fixed-voltage: probe of regulator-usbotgvbus failed with error -22 Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit e1cce3a3cb28ba39d50166a78da91c8b5aae4af1 Author: Ondrej Mosnacek Date: Tue Mar 30 15:16:46 2021 +0200 selinux: constify some avtab function arguments This makes the code a bit easier to reason about. Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit fba472bb38e2d2b9a676364ade4be4e5df665a82 Author: Ondrej Mosnacek Date: Tue Mar 30 15:16:45 2021 +0200 selinux: simplify duplicate_policydb_cond_list() by using kmemdup() We can do the allocation + copying of expr.nodes in one go using kmemdup(). Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit f4f809f66b7545b89bff4b132cdb37adc2d2c157 Author: Roman Gushchin Date: Mon May 10 14:39:46 2021 -0700 cgroup: inline cgroup_task_freeze() After the introduction of the cgroup.kill there is only one call site of cgroup_task_freeze() left: cgroup_exit(). cgroup_task_freeze() is currently taking rcu_read_lock() to read task's cgroup flags, but because it's always called with css_set_lock locked, the rcu protection is excessive. Simplify the code by inlining cgroup_task_freeze(). v2: fix build Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Signed-off-by: Tejun Heo commit 8562e78c0b834e77d96c752974af7586939fcc54 Author: Neil Armstrong Date: Mon Apr 19 09:32:40 2021 +0200 dt-bindings: display: mediatek, hdmi: Convert to use graph schema Update the mediatek,dpi binding to use the graph schema. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit 5390473ec1697b71af0e9d63ef7aaa7ecd27e2c9 Author: Paul E. McKenney Date: Thu Apr 15 16:30:34 2021 -0700 rcu: Don't penalize priority boosting when there is nothing to boost RCU priority boosting cannot do anything unless there is at least one task blocking the current RCU grace period that was preempted within the RCU read-side critical section that it still resides in. However, the current rcu_torture_boost_failed() code will count this as an RCU priority-boosting failure if there were no CPUs blocking the current grace period. This situation can happen (for example) if the last CPU blocking the current grace period was subjected to vCPU preemption, which is always a risk for rcutorture guest OSes. This commit therefore causes rcu_torture_boost_failed() to refrain from reporting failure unless there is at least one task blocking the current RCU grace period that was preempted within the RCU read-side critical section that it still resides in. Signed-off-by: Paul E. McKenney commit d25fba0e34742f19b5ca307c60c4d260ca5a754a Author: Björn Töpel Date: Fri Mar 5 11:28:23 2021 +0100 tools/memory-model: Fix smp_mb__after_spinlock() spelling A misspelled git-grep regex revealed that smp_mb__after_spinlock() was misspelled in explanation.txt. This commit adds the missing "_". Fixes: 1c27b644c0fd ("Automate memory-barriers.txt; provide Linux-kernel memory model") [ paulmck: Apply Alan Stern commit-log feedback. ] Signed-off-by: Björn Töpel Signed-off-by: Paul E. McKenney commit 3d3a0d1b508dcc47e82b0e12cde6585bc088b0cc Author: Paul E. McKenney Date: Fri Apr 16 16:53:16 2021 -0700 rcu: Point to documentation of ordering guarantees Add comments to synchronize_rcu() and friends that point to Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst. Signed-off-by: Paul E. McKenney commit 2f20de99a63b0de9bcceedafc3281e65fbf7d4fd Author: Paul E. McKenney Date: Sun Apr 11 10:49:52 2021 -0700 rcu: Make rcu_gp_cleanup() be noinline for tracing Although there are trace events for RCU grace periods, these are only enabled in CONFIG_RCU_TRACE=y kernels. This commit therefore marks rcu_gp_cleanup() noinline in order to provide a function that can be traced that is invoked near the end of each grace period. Signed-off-by: Paul E. McKenney commit 4d80b8e196fad9852050f3c8624eea09a6bbeada Author: Paul E. McKenney Date: Wed Apr 7 15:21:32 2021 -0700 rcu: Restrict RCU_STRICT_GRACE_PERIOD to at most four CPUs Kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y can experience significant lock contention due to RCU's resulting focus on ending grace periods as soon as possible. This is OK, but only if there are not very many CPUs. This commit therefore puts this Kconfig option off-limits to systems with more than four CPUs. Signed-off-by: Paul E. McKenney commit b15805013b441b13fcf6e402c03421c03edb79c6 Author: Paul E. McKenney Date: Wed Apr 7 15:14:01 2021 -0700 rcu: Make show_rcu_gp_kthreads() dump rcu_node structures blocking GP Currently, show_rcu_gp_kthreads() only dumps rcu_node structures that have outdated ideas of the current grace-period number. This commit also dumps those that are in any way blocking the current grace period. This helps diagnose RCU priority boosting failures. Signed-off-by: Paul E. McKenney commit 3ef5a1c3821ab61da3e9fe0f4561be903ae2bc84 Author: Paul E. McKenney Date: Mon Apr 5 20:42:09 2021 -0700 rcu: Make RCU priority boosting work on single-CPU rcu_node structures When any CPU comes online, it checks to see if an RCU-boost kthread has already been created for that CPU's leaf rcu_node structure, and if not, it creates one. Unfortunately, it also verifies that this leaf rcu_node structure actually has at least one online CPU, and if not, it declines to create the kthread. Although this behavior makes sense during early boot, especially on systems that claim far more CPUs than they actually have, it makes no sense for the first CPU to come online for a given rcu_node structure. There is no point in checking because we know there is a CPU on its way in. The problem is that timing differences can cause this incoming CPU to not yet be reflected in the various bit masks even at rcutree_online_cpu() time, and there is no chance at rcutree_prepare_cpu() time. Plus it would be better to create the RCU-boost kthread at rcutree_prepare_cpu() to handle the case where the CPU is involved in an RCU priority inversion very shortly after it comes online. This commit therefore moves the checking to rcu_prepare_kthreads(), which is called only at early boot, when the check is appropriate. In addition, it makes rcutree_prepare_cpu() invoke rcu_spawn_one_boost_kthread(), which no longer does any checking for online CPUs. With this change, RCU priority boosting tests now pass for short rcutorture runs, even with single-CPU leaf rcu_node structures. Cc: Sebastian Andrzej Siewior Cc: Scott Wood Cc: Thomas Gleixner Signed-off-by: Paul E. McKenney commit 396eba65f62414ee8850ed5f7b5ce844719ebebf Author: Paul E. McKenney Date: Tue Apr 6 16:31:42 2021 -0700 rcu: Add quiescent states and boost states to show_rcu_gp_kthreads() output This commit adds each rcu_node structure's ->qsmask and "bBEG" output indicating whether: (1) There is a boost kthread, (2) A reader needs to be (or is in the process of being) boosted, (3) A reader is blocking an expedited grace period, and (4) A reader is blocking a normal grace period. This helps diagnose RCU priority boosting failures. Signed-off-by: Paul E. McKenney commit 3066820034b5dd4e89bd74a7739c51c2d6f5e554 Author: Paul E. McKenney Date: Mon Apr 5 09:51:05 2021 -0700 rcu: Reject RCU_LOCKDEP_WARN() false positives If another lockdep report runs concurrently with an RCU lockdep report from RCU_LOCKDEP_WARN(), the following sequence of events can occur: 1. debug_lockdep_rcu_enabled() sees that lockdep is enabled when called from (say) synchronize_rcu(). 2. Lockdep is disabled by a concurrent lockdep report. 3. debug_lockdep_rcu_enabled() evaluates its lockdep-expression argument, for example, lock_is_held(&rcu_bh_lock_map). 4. Because lockdep is now disabled, lock_is_held() plays it safe and returns the constant 1. 5. But in this case, the constant 1 is not safe, because invoking synchronize_rcu() under rcu_read_lock_bh() is disallowed. 6. debug_lockdep_rcu_enabled() wrongly invokes lockdep_rcu_suspicious(), resulting in a false-positive splat. This commit therefore changes RCU_LOCKDEP_WARN() to check debug_lockdep_rcu_enabled() after checking the lockdep expression, so that any "safe" returns from lock_is_held() are rejected by debug_lockdep_rcu_enabled(). This requires memory ordering, which is supplied by READ_ONCE(debug_locks). The resulting volatile accesses prevent the compiler from reordering and the fact that only one variable is being accessed prevents the underlying hardware from reordering. The combination works for IA64, which can reorder reads to the same location, but this is defeated by the volatile accesses, which compile to load instructions that provide ordering. Reported-by: syzbot+dde0cc33951735441301@syzkaller.appspotmail.com Reported-by: Matthew Wilcox Reported-by: syzbot+88e4f02896967fe1ab0d@syzkaller.appspotmail.com Reported-by: Thomas Gleixner Suggested-by: Boqun Feng Reviewed-by: Boqun Feng Signed-off-by: Paul E. McKenney commit 1feb2cc8db481b902272559ad7aae3c091762ad0 Author: Paul E. McKenney Date: Mon Apr 5 09:47:59 2021 -0700 lockdep: Explicitly flag likely false-positive report The reason that lockdep_rcu_suspicious() prints the value of debug_locks is because a value of zero indicates a likely false positive. This can work, but is a bit obtuse. This commit therefore explicitly calls out the possibility of a false positive. Reviewed-by: Boqun Feng Signed-off-by: Paul E. McKenney commit 27ba76e164fc83ffe6ceeb0415c427ad1191af6c Author: Paul E. McKenney Date: Sun Apr 4 17:23:36 2021 -0700 rcu: Add ->gp_max to show_rcu_gp_kthreads() output This commit adds ->gp_max to show_rcu_gp_kthreads() output in order to better diagnose RCU priority boosting failures. Signed-off-by: Paul E. McKenney commit e44111ed20d8b2d7b05b20d694358ae77d4e93e2 Author: Paul E. McKenney Date: Fri Apr 2 21:51:50 2021 -0700 rcu: Add ->rt_priority and ->gp_start to show_rcu_gp_kthreads() output This commit adds ->rt_priority and ->gp_start to show_rcu_gp_kthreads() output in order to better diagnose RCU priority boosting failures. Signed-off-by: Paul E. McKenney commit 8e4b1d2bc198e34b48fc7cc3a3c5a2fcb269e271 Author: Paul E. McKenney Date: Wed Mar 31 10:59:05 2021 -0700 rcu: Invoke rcu_spawn_core_kthreads() from rcu_spawn_gp_kthread() Currently, rcu_spawn_core_kthreads() is invoked via an early_initcall(), which works, except that rcu_spawn_gp_kthread() is also invoked via an early_initcall() and rcu_spawn_core_kthreads() relies on adjustments to kthread_prio that are carried out by rcu_spawn_gp_kthread(). There is no guaranttee of ordering among early_initcall() handlers, and thus no guarantee that kthread_prio will be properly checked and range-limited at the time that rcu_spawn_core_kthreads() needs it. In most cases, this bug is harmless. After all, the only reason that rcu_spawn_gp_kthread() adjusts the value of kthread_prio is if the user specified a nonsensical value for this boot parameter, which experience indicates is rare. Nevertheless, a bug is a bug. This commit therefore causes the rcu_spawn_core_kthreads() function to be invoked directly from rcu_spawn_gp_kthread() after any needed adjustments to kthread_prio have been carried out. Fixes: 48d07c04b4cc ("rcu: Enable elimination of Tree-RCU softirq processing") Signed-off-by: Paul E. McKenney commit 277ffe1b709280856391663c2ca5685a28308fc5 Author: Zhouyi Zhou Date: Tue Mar 30 13:47:42 2021 -0700 rcu: Improve tree.c comments and add code cleanups This commit cleans up some comments and code in kernel/rcu/tree.c. Signed-off-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney commit ce7c169dee28866539abb0e603b9a23055d30fdc Author: Paul E. McKenney Date: Tue Mar 30 13:23:49 2021 -0700 rcu: Remove the unused rcu_irq_exit_preempt() function Commit 9ee01e0f69a9 ("x86/entry: Clean up idtentry_enter/exit() leftovers") left the rcu_irq_exit_preempt() in place in order to avoid conflicts with the -rcu tree. Now that this change has long since hit mainline, this commit removes the no-longer-used rcu_irq_exit_preempt() function. Signed-off-by: Paul E. McKenney commit f4cceb783169c9f0639ce7c648a6a5de83c00dc4 Merge: b741596468b01 c9e73e3d2b1eb Author: Alexei Starovoitov Date: Mon May 10 16:13:01 2021 -0700 Merge branch 'Reduce kmalloc / kfree churn in the verifier' Lorenz Bauer says: ==================== github.com/cilium/ebpf runs integration tests with libbpf in a vm on CI. I recently did some work to increase the code coverage from that, and started experiencing OOM-kills in the VM. That led me down a rabbit hole looking at verifier memory allocation patterns. I didn't figure out what triggered the OOM-kills but refactored some often called memory allocation code. The key insight is that often times we don't need to do a full kfree / kmalloc, but can instead just reallocate. The first patch adds two helpers which do just that for the use cases in the verifier, which are sufficiently different that they can't use stock krealloc_array and friends. The series makes bpf_verif_scale about 10% faster in my VM set up, which is especially noticeable when running with KASAN enabled. ==================== Signed-off-by: Alexei Starovoitov commit c9e73e3d2b1eb1ea7ff068e05007eec3bd8ef1c9 Author: Lorenz Bauer Date: Thu Apr 29 14:46:56 2021 +0100 bpf: verifier: Allocate idmap scratch in verifier env func_states_equal makes a very short lived allocation for idmap, probably because it's too large to fit on the stack. However the function is called quite often, leading to a lot of alloc / free churn. Replace the temporary allocation with dedicated scratch space in struct bpf_verifier_env. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Edward Cree Link: https://lore.kernel.org/bpf/20210429134656.122225-4-lmb@cloudflare.com commit 06ab6a505583f9adbf5e1f05d86e7bdd7b02248e Author: Lorenz Bauer Date: Thu Apr 29 14:46:55 2021 +0100 bpf: verifier: Use copy_array for jmp_history Eliminate a couple needless kfree / kmalloc cycles by using copy_array for jmp_history. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210429134656.122225-3-lmb@cloudflare.com commit c69431aab67a912836e5831f03d99a819c14c9c3 Author: Lorenz Bauer Date: Thu Apr 29 14:46:54 2021 +0100 bpf: verifier: Improve function state reallocation Resizing and copying stack and reference tracking state currently does a lot of kfree / kmalloc when the size of the tracked set changes. The logic in copy_*_state and realloc_*_state is also hard to follow. Refactor this into two core functions. copy_array copies from a source into a destination. It avoids reallocation by taking the allocated size of the destination into account via ksize(). The function is essentially krealloc_array, with the difference that the contents of dst are not preserved. realloc_array changes the size of an array and zeroes newly allocated items. Contrary to krealloc both functions don't free the destination if the size is zero. Instead we rely on free_func_state to clean up. realloc_stack_state is renamed to grow_stack_state to better convey that it never shrinks the stack state. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210429134656.122225-2-lmb@cloudflare.com commit 7ab2bd31df871408792eac871c4187e29d039315 Author: Paul E. McKenney Date: Sun May 2 19:56:05 2021 -0700 rcutorture: Move mem_dump_obj() tests into separate function To make the purpose of the code more apparent, this commit moves the tests of mem_dump_obj() to a new rcu_torture_mem_dump_obj() function and calls it from rcu_torture_cleanup(). Signed-off-by: Paul E. McKenney commit 3d78668e5b50f1a28fdfd4293fc61b90eb10ba75 Author: Paul E. McKenney Date: Tue Apr 27 13:51:35 2021 -0700 torture: Don't cap remote runs by build-system number of CPUs Currently, if a torture scenario requires more CPUs than are present on the build system, kvm.sh and friends limit the CPUs available to that scenario. This makes total sense when the build system and the system running the scenarios are one and the same, but not so much when remote systems might well have more CPUs. This commit therefore introduces a --remote flag to kvm.sh that suppresses this CPU-limiting behavior, and causes kvm-remote.sh to use this flag. Signed-off-by: Paul E. McKenney commit c43d3b0083b4f2e9b14174a5857ab06cbca986df Author: Paul E. McKenney Date: Tue Apr 27 09:56:42 2021 -0700 torture: Make kvm-remote.sh account for network failure in pathname checks In a long-duration kvm-remote.sh run, almost all of the remote accesses will be simple file-existence checks. These are thus the most likely to be caught out by network failures, which do happen from time to time. This commit therefore takes a first step towards tolerating temporary network outages by making the file-existence checks repeat in the face of such an outage. They also print a message every minute during a outage, allowing the user to take appropriate action. Signed-off-by: Paul E. McKenney commit 063f5a4df99145ba0a5d4879d171a8175235f37b Author: Paul E. McKenney Date: Wed Apr 14 13:00:10 2021 -0700 rcutorture: Don't count CPU-stalled time against priority boosting It will frequently be the case that rcu_torture_boost() will get a ->start_gp_poll() cookie that needs almost all of the current grace period plus an additional grace period to elapse before ->poll_gp_state() will return true. It is quite possible that the current grace period will have (say) two seconds of stall by a CPU failing to pass through a quiescent state, followed by 300 milliseconds of delay due to a preempted reader. The next grace period might suffer only one second of stall by a CPU, followed by another 300 milliseconds of delay due to a preempted reader. This is an example of RCU priority boosting doing its job, but the full elapsed time of 3.6 seconds exceeds the 3.5-second limit. In addition, there is no CPU stall in force at the 3.5-second mark, so this would nevertheless currently be counted as an RCU priority boosting failure. This commit therefore avoids this sort of false positive by resetting the gp_state_time timestamp any time that the current grace period is being blocked by a CPU. This results in extremely frequent calls to the ->check_boost_failed() function, so this commit provides a lockless fastpath that is selected by supplying a NULL CPU-number pointer. Signed-off-by: Paul E. McKenney commit 0260b92e1c39412b1e345e202355c43169c16274 Author: Paul E. McKenney Date: Thu Apr 8 13:01:14 2021 -0700 rcutorture: Forgive RCU boost failures when CPUs don't pass through QS Currently, rcu_torture_boost() runs CPU-bound at real-time priority to force RCU priority inversions. It then checks that grace periods progress during this CPU-bound time. If grace periods fail to progress, it reports and RCU priority boosting failure. However, it is possible (and sometimes does happen) that the grace period fails to progress due to a CPU failing to pass through a quiescent state for an extended time period (3.5 seconds by default). This can happen due to vCPU preemption, long-running interrupts, and much else besides. There is nothing that RCU priority boosting can do about these situations, and so they should not be counted as RCU priority boosting failures. This commit therefore checks for CPUs (as opposed to preempted tasks) holding up a grace period, and flags the resulting RCU priority boosting failures, but does not splat nor count them as errors. It does rate-limit them to avoid flooding the console log. Signed-off-by: Paul E. McKenney commit d4240d628f989efe32b3ad10a78d6921f8e28bd6 Author: Paul E. McKenney Date: Sun Apr 11 10:44:12 2021 -0700 rcutorture: Add BUSTED-BOOST to test RCU priority boosting tests This commit adds the BUSTED-BOOST rcutorture scenario, which can be used to test rcutorture's ability to test RCU priority boosting. Signed-off-by: Paul E. McKenney commit bcd4af44e2f173074328980b60178fdbb1853e4f Author: Paul E. McKenney Date: Thu Apr 8 10:46:55 2021 -0700 rcutorture: Make rcu_torture_boost_failed() check for GP end It is possible that a delayed grace period that rcu_torture_boost() was polling for ended while rcu_torture_boost_failed() was printing the failure splat. It would be good to know when this happens. This commit therefore has rcu_torture_boost_failed() recheck the grace period after printing the splat, and printing a message indicating whether or not the grace period has ended. Signed-off-by: Paul E. McKenney commit 8c7ec02e2a69807db8024635b48829dca5701c42 Author: Paul E. McKenney Date: Wed Apr 7 20:00:00 2021 -0700 rcutorture: Consolidate rcu_torture_boost() timing and statistics This commit consolidates two loops in rcu_torture_boost(), one of which counts the number of boost-test episodes and the other of which computes the start time of the next episode, into one loop that does both with but a single acquisition of boost_mutex. This means that the count of the number of boost-test episodes is incremented after an episode completes rather than before it starts, but it also avoids the over-counting that was possible previously. Signed-off-by: Paul E. McKenney commit 7b9dad7abad70750c7fbacd5eb5e917f73b42759 Author: Paul E. McKenney Date: Wed Apr 7 17:09:37 2021 -0700 rcutorture: Delay-based false positives for RCU priority boosting tests If an rcu_torture_boost() kthread determines that its grace period has not yet ended, it invokes rcu_torture_boost_failed() which checks whether enough time has elapsed for this to be considered a failure of RCU priority boosting, and, if so, flags the error. Unfortunately, that kthread might be preempted for some seconds between the time that it checks the grace period and the time that it checks the time. This delay can result in a false positive, featuring a complaint that a particular grace period has not ended, followed by a diagnostic dump featuring a much later grace period. This commit avoids these false positives by rechecking for the end of the grace period after the time check. Signed-off-by: Paul E. McKenney commit 00ad25f6019b3bd61bd2ddc128509728b49ac589 Author: Paul E. McKenney Date: Thu Apr 1 15:26:56 2021 -0700 torture: Set kvm.sh language to English Some of the code invoked directly and indirectly from kvm.sh parses the output of commands. This parsing assumes English, which can cause failures if the user has set some other language. In a few cases, there are language-independent commands available, but this is not always the case. Therefore, as an alternative to polyglot parsing, this commit sets the LANG environment variable to en_US.UTF-8. Reported-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit f8c8484dbda78e09912a391a8c87414920bbdfee Author: Frederic Weisbecker Date: Thu Apr 1 15:26:02 2021 +0200 torture: Correctly fetch number of CPUs for non-English languages Grepping for "CPU" on lscpu output isn't always successful, depending on the local language setting. As a result, the build can be aborted early with: "make: the '-j' option requires a positive integer argument" This commit therefore uses the human-language-independent approach available via the getconf command, both in kvm-build.sh and in kvm-remote.sh. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit ea6d962e80b61996aeacb443661cc3adcb605315 Author: Paul E. McKenney Date: Tue Mar 30 16:30:32 2021 -0700 rcutorture: Judge RCU priority boosting on grace periods, not callbacks Currently, rcutorture's testing of RCU priority boosting insists not only that grace periods complete, but also that callbacks be invoked. Although this is in fact what the user would want, ensuring that there is sufficient CPU bandwidth devoted to callback execution is in fact the user's responsibility. One could argue that rcutorture can take on that responsibility, which is true in theory. But in practice, ensuring sufficient CPU bandwidth to ksoftirqd, any rcuc kthreads, and any rcuo kthreads is not particularly consistent with rcutorture's main job, that of stress-testing RCU. In addition, if the system administrator (say) makes very poor choices when pinning rcuo kthreads and then runs rcutorture, there really isn't much rcutorture can do. Besides, RCU priority boosting only boosts lagging readers, not all the machinery required to invoke callbacks in a timely fashion. This commit therefore switches rcutorture's evaluation of RCU priority boosting from callback execution to grace-period completion by using the new start_poll_synchronize_rcu() and poll_state_synchronize_rcu() functions. When rcutorture is built in (as in when there is no innocent workload to inconvenience), the ksoftirqd ktheads are boosted to real-time priority 2 in order to allow timeouts to work properly in the face of rcutorture's testing of RCU priority boosting. Indeed, it is not as easy as it looks to create a reliable test of RCU priority boosting without destroying the rest of the kernel! Signed-off-by: Paul E. McKenney commit 226dd39d23487c01ab5cc1d68eba142a4dc76a08 Author: Paul E. McKenney Date: Thu Mar 25 19:39:14 2021 -0700 torture: Make kvm-find-errors.sh account for kvm-remote.sh Currently, kvm-find-errors.sh assumes that if "--buildonly" appears in the log file, then the run did builds but ran no kernels. This breaks with kvm-remote.sh, which uses kvm.sh to do a build, then kvm-again.sh to run the kernels built on remote systems. This commit therefore adds a check for a kvm-remote.sh run. While in the area, this commit checks for "--build-only" as well as "--build-only". Signed-off-by: Paul E. McKenney commit b09751d752fb0e8dce4062254da9f813dcb00de5 Author: Paul E. McKenney Date: Thu Mar 18 14:00:59 2021 -0700 torture: Make the build machine control N in "make -jN" Given remote rcutorture runs, it is quite possible that the build system will have fewer CPUs than the system(s) running the actual test scenarios. In such cases, using the number of CPUs on the test systems can overload the build system, slowing down the build or, worse, OOMing the build system. This commit therefore uses the build system's CPU count to set N in "make -jN", and by tradition sets "N" to double the CPU count. Signed-off-by: Paul E. McKenney commit f254a0b52787d108879cc8761ee4f6ce33698029 Author: Paul E. McKenney Date: Wed Mar 17 13:21:41 2021 -0700 torture: Make kvm.sh use abstracted kvm-end-run-stats.sh This commit reduces duplicate code by making kvm.sh use the new kvm-end-run-stats.sh script rather than taking its historical approach of open-coding it. Signed-off-by: Paul E. McKenney commit ee8fef9137e9e75a36342077a2414dbd86c703bf Author: Paul E. McKenney Date: Wed Mar 17 12:26:04 2021 -0700 torture: Abstract end-of-run summary This commit abstractst the end-of-run summary from kvm-again.sh, and, while in the area, brings its format into line with that of kvm.sh. Signed-off-by: Paul E. McKenney commit 32dbdaf71ab9b606d0649616039c897df2b03e47 Author: Paul E. McKenney Date: Sun Mar 14 15:19:59 2021 -0700 torture: Fix grace-period rate output The kvm-again.sh script relies on shell comments added to the qemu-cmd file, but this means that code extracting values from the QEMU command in this file must grep out those commment. Which kvm-recheck-rcu.sh failed to do, which destroyed its grace-period-per-second calculation. This commit therefore adds the needed "grep -v '^#'" to kvm-recheck-rcu.sh. Fixes: 315957cad445 ("torture: Prepare for splitting qemu execution from kvm-test-1-run.sh") Signed-off-by: Paul E. McKenney commit a5c095e0e9b6fedcffd0907c84f77751128e2a34 Author: Paul E. McKenney Date: Sat Mar 13 20:05:31 2021 -0800 rcutorture: Abstract read-lock-held checks This commit adds a (*readlock_held)() function pointer to the rcu_torture_ops structure in order to make the rcu_torture_one_read() function's rcu_dereference_check() lockdep expression more appropriate for a given run. Signed-off-by: Paul E. McKenney commit e9b800db96fa40170c5607d8968b2ec6212c2026 Author: Paul E. McKenney Date: Wed Mar 10 18:02:36 2021 -0800 refscale: Add acqrel, lock, and lock-irq This commit adds scale_type of acqrel, lock, and lock-irq to test acquisition and release. Note that the refscale.nreaders=1 module parameter is required if you wish to test uncontended locking. In contrast, acqrel uses a per-CPU variable, so should be just fine with large values of the refscale.nreaders=1 module parameter. Signed-off-by: Paul E. McKenney commit 0092eae4cb4e4a34b728efcf9d5857ab0ac2e6f6 Author: Paul E. McKenney Date: Fri Mar 5 13:59:54 2021 -0800 torture: Add kvm-remote.sh script for distributed rcutorture test runs This commit adds a kvm-remote.sh script that prepares a tarball that is then downloaded to the remote system(s) and executed. The user is responsible for having set up the remote systems to run qemu, but all the kernel builds are done on the system running the kvm-remote.sh script. The user is also responsible for setting up the remote systems so that ssh can be run non-interactively, given that ssh is used to poll the remote systems in order to detect completion of each batch. See the script's header comment for usage information. Signed-off-by: Paul E. McKenney commit 179141865d08d9b9ebdbef8775b2450dc6f98a14 Author: Paul E. McKenney Date: Fri Mar 5 13:15:31 2021 -0800 rcuscale: Allow CPU hotplug to be enabled It is no longer possible to disable CPU hotplug in many configurations, which means that the CONFIG_HOTPLUG_CPU=n lines in rcuscale's Kconfig options are just a source of useless diagnostics. In addition, rcuscale doesn't do CPU-hotplug operations in any case. This commit therefore changes these lines to read CONFIG_HOTPLUG_CPU=y. Signed-off-by: Paul E. McKenney commit 68d415f91ff2284828211e937f12a3f6d9a18cb9 Author: Paul E. McKenney Date: Fri Mar 5 13:12:36 2021 -0800 refscale: Allow CPU hotplug to be enabled It is no longer possible to disable CPU hotplug in many configurations, which means that the CONFIG_HOTPLUG_CPU=n lines in refscale's Kconfig options are just a source of useless diagnostics. In addition, refscale doesn't do CPU-hotplug operations in any case. This commit therefore changes these lines to read CONFIG_HOTPLUG_CPU=y. Signed-off-by: Paul E. McKenney commit fb4855c36249b3609718d2b83f4756b748a83349 Author: Paul E. McKenney Date: Thu Mar 4 17:52:59 2021 -0800 torture: Make kvm-again.sh use "scenarios" rather than "batches" file This commit saves a few lines of code by making kvm-again.sh use the "scenarios" file rather than the "batches" file, both of which are generated by kvm.sh. This results in a break point because new versions of kvm-again.sh cannot handle "res" directories produced by old versions of kvm.sh, which lack the "scenarios" file. In the unlikely event that this becomes a problem, a trivial script suffices to convert the "batches" file to a "scenarios" file, and this script may be easily extracted from kvm.sh. Signed-off-by: Paul E. McKenney commit 3d2cc4fec861a825ecd7d9ce2797df4e5f0f5517 Author: Paul E. McKenney Date: Thu Mar 4 17:21:17 2021 -0800 torture: Add "scenarios" option to kvm.sh --dryrun parameter This commit adds "--dryrun scenarios" to kvm.sh, which prints something like this: 1. TREE03 2. TREE07 3. SRCU-P SRCU-N 4. TREE01 TRACE01 5. TREE02 TRACE02 6. TREE04 RUDE01 TASKS01 7. TREE05 TASKS03 SRCU-T SRCU-U 8. TASKS02 TINY01 TINY02 TREE09 This format is more convenient for scripts that run batches of scenarios. Signed-off-by: Paul E. McKenney commit 98da77199f0c629f0687b92824f1da2010f677e3 Author: Paul E. McKenney Date: Thu Mar 4 14:15:00 2021 -0800 torture: Fix remaining erroneous torture.sh instance of $* Although "eval" was removed from torture.sh, that commit failed to update the KCSAN instance of $* to "$@". This results in failures when (for example) --bootargs is given more than one argument. This commit therefore makes this change. There is one remaining instance of $* in torture.sh, but this is used only in the "echo" command, where quoting doesn't matter so much. Fixes: 197220d4a334 ("torture: Remove use of "eval" in torture.sh") Signed-off-by: Paul E. McKenney commit 9fc98e3143de7b7e8d766aef41b46ec0bc0ae4ca Author: Paul E. McKenney Date: Thu Mar 4 14:46:59 2021 -0800 rcu-tasks: Add block comment laying out RCU Rude design This commit adds a block comment that gives a high-level overview of how RCU Rude grace periods progress. It also gives an overview of the memory ordering. Signed-off-by: Paul E. McKenney commit 06a3ec9205d570526665c2071d1a5492c3091a54 Author: Paul E. McKenney Date: Thu Mar 4 14:41:47 2021 -0800 rcu-tasks: Add block comment laying out RCU Tasks design This commit adds a block comment that gives a high-level overview of how RCU tasks grace periods progress. It also adds a note about how exiting tasks are handled, plus it gives an overview of the memory ordering. Signed-off-by: Paul E. McKenney commit b5befe842e6612cf894cf4a199924ee872d8b7d8 Author: Frederic Weisbecker Date: Sat Apr 17 15:16:49 2021 +0200 srcu: Fix broken node geometry after early ssp init An srcu_struct structure that is initialized before rcu_init_geometry() will have its srcu_node hierarchy based on CONFIG_NR_CPUS. Once rcu_init_geometry() is called, this hierarchy is compressed as needed for the actual maximum number of CPUs for this system. Later on, that srcu_struct structure is confused, sometimes referring to its initial CONFIG_NR_CPUS-based hierarchy, and sometimes instead to the new num_possible_cpus() hierarchy. For example, each of its ->mynode fields continues to reference the original leaf rcu_node structures, some of which might no longer exist. On the other hand, srcu_for_each_node_breadth_first() traverses to the new node hierarchy. There are at least two bad possible outcomes to this: 1) a) A callback enqueued early on an srcu_data structure (call it *sdp) is recorded pending on sdp->mynode->srcu_data_have_cbs in srcu_funnel_gp_start() with sdp->mynode pointing to a deep leaf (say 3 levels). b) The grace period ends after rcu_init_geometry() shrinks the nodes level to a single one. srcu_gp_end() walks through the new srcu_node hierarchy without ever reaching the old leaves so the callback is never executed. This is easily reproduced on an 8 CPUs machine with CONFIG_NR_CPUS >= 32 and "rcupdate.rcu_self_test=1". The srcu_barrier() after early tests verification never completes and the boot hangs: [ 5413.141029] INFO: task swapper/0:1 blocked for more than 4915 seconds. [ 5413.147564] Not tainted 5.12.0-rc4+ #28 [ 5413.151927] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 5413.159753] task:swapper/0 state:D stack: 0 pid: 1 ppid: 0 flags:0x00004000 [ 5413.168099] Call Trace: [ 5413.170555] __schedule+0x36c/0x930 [ 5413.174057] ? wait_for_completion+0x88/0x110 [ 5413.178423] schedule+0x46/0xf0 [ 5413.181575] schedule_timeout+0x284/0x380 [ 5413.185591] ? wait_for_completion+0x88/0x110 [ 5413.189957] ? mark_held_locks+0x61/0x80 [ 5413.193882] ? mark_held_locks+0x61/0x80 [ 5413.197809] ? _raw_spin_unlock_irq+0x24/0x50 [ 5413.202173] ? wait_for_completion+0x88/0x110 [ 5413.206535] wait_for_completion+0xb4/0x110 [ 5413.210724] ? srcu_torture_stats_print+0x110/0x110 [ 5413.215610] srcu_barrier+0x187/0x200 [ 5413.219277] ? rcu_tasks_verify_self_tests+0x50/0x50 [ 5413.224244] ? rdinit_setup+0x2b/0x2b [ 5413.227907] rcu_verify_early_boot_tests+0x2d/0x40 [ 5413.232700] do_one_initcall+0x63/0x310 [ 5413.236541] ? rdinit_setup+0x2b/0x2b [ 5413.240207] ? rcu_read_lock_sched_held+0x52/0x80 [ 5413.244912] kernel_init_freeable+0x253/0x28f [ 5413.249273] ? rest_init+0x250/0x250 [ 5413.252846] kernel_init+0xa/0x110 [ 5413.256257] ret_from_fork+0x22/0x30 2) An srcu_struct structure that is initialized before rcu_init_geometry() and used afterward will always have stale rdp->mynode references, resulting in callbacks to be missed in srcu_gp_end(), just like in the previous scenario. This commit therefore causes init_srcu_struct_nodes to initialize the geometry, if needed. This ensures that the srcu_node hierarchy is properly built and distributed from the get-go. Suggested-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Boqun Feng Cc: Lai Jiangshan Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Joel Fernandes Cc: Uladzislau Rezki Signed-off-by: Paul E. McKenney commit 8e9c01c717df7e05c5bd1ca86aaa3a74b31f37f1 Author: Frederic Weisbecker Date: Fri Apr 9 00:38:59 2021 +0200 srcu: Initialize SRCU after timers Once srcu_init() is called, the SRCU core will make use of delayed workqueues, which rely on timers. However init_timers() is called several steps after rcu_init(). This means that a call_srcu() after rcu_init() but before init_timers() would find itself within a dangerously uninitialized timer core. This commit therefore creates a separate call to srcu_init() after init_timer() completes, which ensures that we stay in early SRCU mode until timers are safe(r). Signed-off-by: Frederic Weisbecker Cc: Uladzislau Rezki Cc: Boqun Feng Cc: Lai Jiangshan Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Joel Fernandes Signed-off-by: Paul E. McKenney commit 7bf0a6141ab9c1d113bd85d6d13d43903a4278ba Author: Frederic Weisbecker Date: Fri Apr 9 00:38:58 2021 +0200 srcu: Unconditionally embed struct lockdep_map Since struct lockdep_map has zero size when CONFIG_DEBUG_LOCK_ALLOC=n, this commit removes the #ifdef from the srcu_struct structure's ->dep_map. This change will simplify further manipulations of this field. Signed-off-by: Frederic Weisbecker Cc: Uladzislau Rezki Cc: Boqun Feng Cc: Lai Jiangshan Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Joel Fernandes Signed-off-by: Paul E. McKenney commit c75e9d29159b94904d10b23ad6aebdf869b61106 Author: Frederic Weisbecker Date: Fri Apr 2 01:47:02 2021 +0200 srcu: Remove superfluous ssp initialization for early callbacks Pre-srcu_init() invocations of call_srcu() initialize the srcu_struct structure in question, so there is no need to check this initialization in srcu_init() when initiating grace periods for srcu_struct structures that had early call_srcu() invocations. This commit therefore drops the calls to check_init_srcu_struct() in srcu_init(). Signed-off-by: Frederic Weisbecker Cc: Boqun Feng Cc: Lai Jiangshan Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Joel Fernandes Cc: Uladzislau Rezki Signed-off-by: Paul E. McKenney commit 94df76a1971d9c61eb2c67ae10cc294b68cbd03b Author: Frederic Weisbecker Date: Fri Apr 2 01:47:03 2021 +0200 srcu: Remove superfluous sdp->srcu_lock_count zero filling Because alloc_percpu() zeroes out the allocated memory, there is no need to zero-fill newly allocated per-CPU memory. This commit therefore removes the loop zeroing the ->srcu_lock_count and ->srcu_unlock_count arrays from init_srcu_struct_nodes(). This is the only use of that function's is_static parameter, which this commit also removes. Signed-off-by: Frederic Weisbecker Cc: Boqun Feng Cc: Lai Jiangshan Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Joel Fernandes Cc: Uladzislau Rezki Signed-off-by: Paul E. McKenney commit 258ca95e2cd9a0fcc4508a1bf1742b1a3e9a7bbb Author: Frederic Weisbecker Date: Tue Feb 23 01:10:04 2021 +0100 timer: Revert "timer: Add timer_curr_running()" This reverts commit dcd42591ebb8a25895b551a5297ea9c24414ba54. The only user was RCU/nocb. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Cc: Thomas Gleixner Signed-off-by: Paul E. McKenney commit d76e0926d8356e330afce1c711e0301132d06a67 Author: Frederic Weisbecker Date: Tue Feb 23 01:10:03 2021 +0100 rcu/nocb: Use the rcuog CPU's ->nocb_timer Currently each CPU has its own ->nocb_timer queued when the nocb_gp wakeup must be deferred. This approach has many drawbacks, compared to a solution based on a single timer per NOCB group: * There are a lot of timers to maintain. * The per-rdp ->nocb_lock must be held to queue and cancel the timer and this lock can already be heavily contended. * One timer firing doesn't cancel the other timers in the same group: - These other timers can thus cause spurious wakeups - Each rdp that queued a timer must lock both ->nocb_lock and then ->nocb_gp_lock upon exit from the kernel to idle/user/guest mode. * We can't cancel all of them if we detect an unflushed bypass in nocb_gp_wait(). In fact currently we only ever cancel the ->nocb_timer of the leader group. * The leader group's nocb_timer is cancelled without locking ->nocb_lock in nocb_gp_wait(). This currently appears to be safe but is an accident waiting to happen. * Since the timer acquires ->nocb_lock, it requires extra care in the NOCB (de-)offloading process, requiring that it be either enabled or disabled and then flushed. This commit instead uses the rcuog kthread's CPU's ->nocb_timer instead. It is protected by nocb_gp_lock, which is _way_ less contended and remains so even after this change. As a matter of fact, the nocb_timer almost never fires and the deferred wakeup is mostly carried out upon idle/user/guest entry. Now the early check performed at this point in do_nocb_deferred_wakeup() is done on rdp_gp->nocb_defer_wakeup, which is of course racy. However, this raciness is harmless because we only need the guarantee that the timer is queued if we were the last one to queue it. Any other situation (another CPU has queued it and we either see it or not) is fine. This solves all the issues listed above. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit e548eaa116d858f07816d41e24835a41f7e7d270 Author: Maninder Singh Date: Tue Mar 16 16:07:11 2021 +0530 mm/slub: Add Support for free path information of an object This commit adds enables a stack dump for the last free of an object: slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 0 size 64 allocated at meminfo_proc_show+0x40/0x4fc [ 20.192078] meminfo_proc_show+0x40/0x4fc [ 20.192263] seq_read_iter+0x18c/0x4c4 [ 20.192430] proc_reg_read_iter+0x84/0xac [ 20.192617] generic_file_splice_read+0xe8/0x17c [ 20.192816] splice_direct_to_actor+0xb8/0x290 [ 20.193008] do_splice_direct+0xa0/0xe0 [ 20.193185] do_sendfile+0x2d0/0x438 [ 20.193345] sys_sendfile64+0x12c/0x140 [ 20.193523] ret_fast_syscall+0x0/0x58 [ 20.193695] 0xbeeacde4 [ 20.193822] Free path: [ 20.193935] meminfo_proc_show+0x5c/0x4fc [ 20.194115] seq_read_iter+0x18c/0x4c4 [ 20.194285] proc_reg_read_iter+0x84/0xac [ 20.194475] generic_file_splice_read+0xe8/0x17c [ 20.194685] splice_direct_to_actor+0xb8/0x290 [ 20.194870] do_splice_direct+0xa0/0xe0 [ 20.195014] do_sendfile+0x2d0/0x438 [ 20.195174] sys_sendfile64+0x12c/0x140 [ 20.195336] ret_fast_syscall+0x0/0x58 [ 20.195491] 0xbeeacde4 Acked-by: Vlastimil Babka Co-developed-by: Vaneet Narang Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh Signed-off-by: Paul E. McKenney commit 0cbc124bce8c527eb14c87f634683c5bcf4299c7 Author: Maninder Singh Date: Tue Mar 16 16:07:10 2021 +0530 mm/slub: Fix backtrace of objects to handle redzone adjustment This commit fixes commit 8e7f37f2aaa5 ("mm: Add mem_dump_obj() to print source of memory block"). With current code, the backtrace of allocated object is incorrect: / # cat /proc/meminfo [ 14.969843] slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 0 size 64 allocated at 0x6b6b6b6b [ 14.970635] 0x6b6b6b6b [ 14.970794] 0x6b6b6b6b [ 14.970932] 0x6b6b6b6b [ 14.971077] 0x6b6b6b6b [ 14.971202] 0x6b6b6b6b [ 14.971317] 0x6b6b6b6b [ 14.971423] 0x6b6b6b6b [ 14.971635] 0x6b6b6b6b [ 14.971740] 0x6b6b6b6b [ 14.971871] 0x6b6b6b6b [ 14.972229] 0x6b6b6b6b [ 14.972363] 0x6b6b6b6b [ 14.972505] 0xa56b6b6b [ 14.972631] 0xbbbbbbbb [ 14.972734] 0xc8ab0400 [ 14.972891] meminfo_proc_show+0x40/0x4fc The reason is that the object address was not adjusted for the red zone. With this fix, the backtrace is correct: / # cat /proc/meminfo [ 14.870782] slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 128 size 64 allocated at meminfo_proc_show+0x40/0x4f4 [ 14.871817] meminfo_proc_show+0x40/0x4f4 [ 14.872035] seq_read_iter+0x18c/0x4c4 [ 14.872229] proc_reg_read_iter+0x84/0xac [ 14.872433] generic_file_splice_read+0xe8/0x17c [ 14.872621] splice_direct_to_actor+0xb8/0x290 [ 14.872747] do_splice_direct+0xa0/0xe0 [ 14.872896] do_sendfile+0x2d0/0x438 [ 14.873044] sys_sendfile64+0x12c/0x140 [ 14.873229] ret_fast_syscall+0x0/0x58 [ 14.873372] 0xbe861de4 Acked-by: Vlastimil Babka Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh Signed-off-by: Paul E. McKenney commit a78d4a2a1017dea67857a1164d73642743e89a0f Author: Uladzislau Rezki (Sony) Date: Wed Apr 21 13:22:52 2021 +0200 kvfree_rcu: Refactor kfree_rcu_monitor() Currently we have three functions which depend on each other. Two of them are quite tiny and the last one where the most work is done. All of them are related to queuing RCU batches to reclaim objects after a GP. 1. kfree_rcu_monitor(). It consist of few lines. It acquires a spin-lock and calls kfree_rcu_drain_unlock(). 2. kfree_rcu_drain_unlock(). It also consists of few lines of code. It calls queue_kfree_rcu_work() to queue the batch. If this fails, it rearms the monitor work to try again later. 3. queue_kfree_rcu_work(). This provides the bulk of the functionality, attempting to start a new batch to free objects after a GP. Since there are no external users of functions [2] and [3], both can eliminated by moving all logic directly into [1], which both shrinks and simplifies the code. Also replace comments which start with "/*" to "//" format to make it unified across the file. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit d8628f35bae0d0b1f06ca32fa57de76a7055e731 Author: Uladzislau Rezki (Sony) Date: Wed Apr 28 15:44:22 2021 +0200 kvfree_rcu: Fix comments according to current code The kvfree_rcu() function now defers allocations in the common case due to the fact that there is no lockless access to the memory-allocator caches/pools. In addition, in CONFIG_PREEMPT_NONE=y and in CONFIG_PREEMPT_VOLUNTARY=y kernels, there is no reliable way to determine if spinlocks are held. As a result, allocation is deferred in the common case, and the two-argument form of kvfree_rcu() thus uses the "channel 3" queue through all the rcu_head structures. This channel is called referred to as the emergency case in comments, and these comments are now obsolete. This commit therefore updates these comments to reflect the new common-case nature of such emergencies. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 7fe1da33f6bad33b79135b1df6c3476f87856928 Author: Uladzislau Rezki (Sony) Date: Thu Apr 15 19:20:00 2021 +0200 kvfree_rcu: Use kfree_rcu_monitor() instead of open-coded variant Replace an open-coded version of the kfree_rcu_monitor() function body with a call to that function. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit dd28c9f057ad099f6221829053e48f331e6f0b7f Author: Uladzislau Rezki (Sony) Date: Thu Apr 15 19:19:59 2021 +0200 kvfree_rcu: Update "monitor_todo" once a batch is started Before attempting to start a new batch the "monitor_todo" variable is set to "false" and set back to "true" when a previous RCU batch is still in progress. This is at best confusing. Thus change this variable to "false" only when a new batch has been successfully queued, otherwise, just leave it be. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit d434c00fa3ac476ca6295b8310d097dd71984624 Author: Uladzislau Rezki (Sony) Date: Thu Apr 15 19:19:58 2021 +0200 kvfree_rcu: Add a bulk-list check when a scheduler is run The rcu_scheduler_active flag is set to RCU_SCHEDULER_RUNNING once the scheduler is up and running. That signal is used in order to check and queue a "monitor work" to reclaim freed objects (if there are any) during early boot. This flag is used by kvfree_rcu() to determine when work can safely be queued, at which point memory passed to earlier invocations of kvfree_rcu() can be processed. However, only "krcp->head" is checked for objects that need to be released, and there are now two more, namely, "krcp->bkvhead[0]" and "krcp->bkvhead[1]". Therefore, check these two additional channels. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit ac7625ebd5f7bad93f821b7397fe50635f58aa4b Author: Uladzislau Rezki (Sony) Date: Thu Apr 15 19:19:57 2021 +0200 kvfree_rcu: Use [READ/WRITE]_ONCE() macros to access to nr_bkv_objs nr_bkv_objs is a count of the objects in the kvfree_rcu page cache. Accessing it requires holding the ->lock. Switch to READ_ONCE() and WRITE_ONCE() macros to provide lockless access to this counter. This lockless access is used for the shrinker. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit d0bfa8b3c411e25e014e4131d2804afe29c440a6 Author: Zhang Qiang Date: Thu Apr 15 19:19:56 2021 +0200 kvfree_rcu: Release a page cache under memory pressure Add a drain_page_cache() function to drain a per-cpu page cache. The reason behind of it is a system can run into a low memory condition, in that case a page shrinker can ask for its users to free their caches in order to get extra memory available for other needs in a system. When a system hits such condition, a page cache is drained for all CPUs in a system. By default a page cache work is delayed with 5 seconds interval until a memory pressure disappears, if needed it can be changed. See a rcu_delay_page_cache_fill_msec module parameter. Co-developed-by: Uladzislau Rezki (Sony) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 4c9c3809ae2ecfcece9acb3f51427e617d21fafb Author: Rolf Eike Beer Date: Wed Mar 17 10:24:51 2021 +0100 rcu: Fix typo in comment: kthead -> kthread Signed-off-by: Rolf Eike Beer Signed-off-by: Paul E. McKenney commit 254c8b96c4af02a09004d605c7f2dfad7f1cb5ca Author: Roni Nevalainen Date: Wed May 5 19:19:58 2021 +0300 audit: add blank line after variable declarations Fix the following checkpatch warning in auditsc.c: WARNING: Missing a blank line after declarations Signed-off-by: Roni Nevalainen Signed-off-by: Paul Moore commit e5bd61e82b7a60c92bc09a618a0d8a612689037b Author: Paul E. McKenney Date: Thu Apr 22 11:55:43 2021 -0700 tools/rcu: Add drgn script to dump number of RCU callbacks This commit adds an rcu-cbs.py drgn script that computes the number of RCU callbacks waiting to be invoked. This information can be helpful when managing systems that are short of memory and that have software components that make heavy use of RCU, for example, by opening and closing files in tight loops. (But please note that there are almost always better ways to get your job done than by opening and closing files in tight loops.) Reported-by: Richard Weinberger Signed-off-by: Paul E. McKenney commit 58d0db869d7ab8ca97b521f167022caa2c42cbe7 Author: Frederic Weisbecker Date: Sun Apr 4 23:58:43 2021 +0200 doc: Fix diagram references in memory-ordering document The three diagrams describing rcu_gp_init() all spuriously refer to the same figure, probably due to a copy/paste issue. This commit fixes these references. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 18389c4570211e10e94f4a2ce907d01397abc335 Author: Paul E. McKenney Date: Fri Mar 19 16:30:15 2021 -0700 doc: Fix statement of RCU's memory-ordering requirements The sentence defining the relationship of accesses before a grace period to read-side accesses following that same grace period was missing a small word: "not". This commit therefore adds it. Reported-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit a6814a79f2ca09a5e15e69324213dad29a5844ad Author: Yury Norov Date: Tue Apr 20 20:13:26 2021 -0700 rcu/tree_plugin: Don't handle the case of 'all' CPU range The 'all' semantics is now supported by the bitmap_parselist() so we can drop supporting it as a special case in RCU code. Since 'all' is properly supported in core bitmap code, also drop legacy comment in RCU for it. This patch does not make any functional changes for existing users. Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov Signed-off-by: Paul E. McKenney commit b18def121f077857ccf92fc620366e19850bc297 Author: Yury Norov Date: Tue Apr 20 20:13:25 2021 -0700 bitmap_parse: Support 'all' semantics RCU code supports an 'all' group as a special case when parsing rcu_nocbs parameter. This patch moves the 'all' support to the core bitmap_parse code, so that all bitmap users can enjoy this extension. Moving 'all' parsing to a bitmap_parse level also allows users to pass patterns together with 'all' in regular group:pattern format, for example, "rcu_nocbs=all:1/2" would offload all the even-numbered CPUs regardless of the number of CPUs on the system. Reviewed-by: Andy Shevchenko Signed-off-by: Yury Norov Signed-off-by: Paul E. McKenney commit 4ce22ad645bc6327aa32a4bfe9c6300f8e7bd745 Author: Linus Walleij Date: Mon May 10 12:49:06 2021 +0200 ARM: dts: ixp4xx: Add ethernet This adds ethernet to the IXP4xx device trees. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij commit 564ac172a39fe1cca937ab6728c7208d5150d8d1 Author: Gustavo A. R. Silva Date: Mon May 10 15:46:18 2021 -0500 drm/amd/pm: Fix out-of-bounds bug Create new structure SISLANDS_SMC_SWSTATE_SINGLE, as initialState.levels and ACPIState.levels are never actually used as flexible arrays. Those arrays can be used as simple objects of type SISLANDS_SMC_HW_PERFORMANCE_LEVEL, instead. Currently, the code fails because flexible array _levels_ in struct SISLANDS_SMC_SWSTATE doesn't allow for code that accesses the first element of initialState.levels and ACPIState.levels arrays: drivers/gpu/drm/amd/pm/powerplay/si_dpm.c: 4820: table->initialState.levels[0].mclk.vDLL_CNTL = 4821: cpu_to_be32(si_pi->clock_registers.dll_cntl); ... 5021: table->ACPIState.levels[0].mclk.vDLL_CNTL = 5022: cpu_to_be32(dll_cntl); because such element cannot be accessed without previously allocating enough dynamic memory for it to exist (which never actually happens). So, there is an out-of-bounds bug in this case. That's why struct SISLANDS_SMC_SWSTATE should only be used as type for object driverState and new struct SISLANDS_SMC_SWSTATE_SINGLE is created as type for objects initialState, ACPIState and ULVState. Also, with the change from one-element array to flexible-array member in commit 0e1aa13ca3ff ("drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE"), the size of dpmLevels in struct SISLANDS_SMC_STATETABLE should be fixed to be SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE instead of SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1. Fixes: 0e1aa13ca3ff ("drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit cc1a54d8f1d07b89e12df14ce0d477b86c562d9e Author: Gustavo A. R. Silva Date: Sun May 9 17:55:25 2021 -0500 drm/radeon/si_dpm: Fix SMU power state load Create new structure SISLANDS_SMC_SWSTATE_SINGLE, as initialState.levels and ACPIState.levels are never actually used as flexible arrays. Those arrays can be used as simple objects of type SISLANDS_SMC_HW_PERFORMANCE_LEVEL, instead. Currently, the code fails because flexible array _levels_ in struct SISLANDS_SMC_SWSTATE doesn't allow for code that access the first element of initialState.levels and ACPIState.levels arrays: 4353 table->initialState.levels[0].mclk.vDLL_CNTL = 4354 cpu_to_be32(si_pi->clock_registers.dll_cntl); ... 4555 table->ACPIState.levels[0].mclk.vDLL_CNTL = 4556 cpu_to_be32(dll_cntl); because such element cannot exist without previously allocating any dynamic memory for it (which never actually happens). That's why struct SISLANDS_SMC_SWSTATE should only be used as type for object driverState and new struct SISLANDS_SMC_SWSTATE_SINGLE is created as type for objects initialState, ACPIState and ULVState. Also, with the change from one-element array to flexible-array member in commit 96e27e8d919e ("drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE"), the size of dpmLevels in struct SISLANDS_SMC_STATETABLE should be fixed to be SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE instead of SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1583 Fixes: 96e27e8d919e ("drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE") Cc: stable@vger.kernel.org Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 293774413a3f519c826d4eb5313ef02e20515700 Author: Gustavo A. R. Silva Date: Sun May 9 17:49:26 2021 -0500 drm/radeon/ni_dpm: Fix booting bug Create new structure NISLANDS_SMC_SWSTATE_SINGLE, as initialState.levels and ACPIState.levels are never actually used as flexible arrays. Those arrays can be used as simple objects of type NISLANDS_SMC_HW_PERFORMANCE_LEVEL, instead. Currently, the code fails because flexible array _levels_ in struct NISLANDS_SMC_SWSTATE doesn't allow for code that access the first element of initialState.levels and ACPIState.levels arrays: drivers/gpu/drm/radeon/ni_dpm.c: 1690 table->initialState.levels[0].mclk.vMPLL_AD_FUNC_CNTL = 1691 cpu_to_be32(ni_pi->clock_registers.mpll_ad_func_cntl); ... 1903: table->ACPIState.levels[0].mclk.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); 1904: table->ACPIState.levels[0].mclk.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); because such element cannot exist without previously allocating any dynamic memory for it (which never actually happens). That's why struct NISLANDS_SMC_SWSTATE should only be used as type for object driverState and new struct SISLANDS_SMC_SWSTATE_SINGLE is created as type for objects initialState, ACPIState and ULVState. Also, with the change from one-element array to flexible-array member in commit 434fb1e7444a ("drm/radeon/nislands_smc.h: Replace one-element array with flexible-array member in struct NISLANDS_SMC_SWSTATE"), the size of dpmLevels in struct NISLANDS_SMC_STATETABLE should be fixed to be NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE instead of NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1. Bug: https://lore.kernel.org/dri-devel/3eedbe78-1fbd-4763-a7f3-ac5665e76a4a@xenosoft.de/ Fixes: 434fb1e7444a ("drm/radeon/nislands_smc.h: Replace one-element array with flexible-array member in struct NISLANDS_SMC_SWSTATE") Cc: stable@vger.kernel.org Reported-by: Christian Zigotzky Tested-by: Christian Zigotzky Link: https://lore.kernel.org/dri-devel/9bb5fcbd-daf5-1669-b3e7-b8624b3c36f9@xenosoft.de/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit c666bbf0e9b56de479a8453fa5713d694db494ac Author: Dwaipayan Ray Date: Sun May 9 20:19:23 2021 +0530 drm/amd/amdgpu: Fix errors in function documentation Fix a couple of syntax errors and removed one excess parameter in the function documentations which lead to kernel docs build warning. Reviewed-by: Christian König Signed-off-by: Dwaipayan Ray Signed-off-by: Alex Deucher commit 28ea8752f6fb4068521f61878b36eed9e25691f5 Author: Rouven Czerwinski Date: Sat May 8 20:19:51 2021 +0200 drm/amd/display: remove unused function dc_link_perform_link_training This function is not used anywhere, remove it. It was added in 40dd6bd376a4 ("drm/amd/display: Linux Set/Read link rate and lane count through debugfs") and moved in fe798de53a7a ("drm/amd/display: Move link functions from dc to dc_link"), but a user is missing. Reviewed-by: Rodrigo Siqueira Signed-off-by: Rouven Czerwinski Signed-off-by: Alex Deucher commit 7780f50358ee386de3b42ec236755fa72d97bb36 Author: Dennis Li Date: Mon May 10 19:08:11 2021 +0800 drm/amdgpu: add function to clear MMEA error status for aldebaran For aldebaran, hardware will not clear error status automatically when reading error status register, insteadly driver should set clear bit of the error status register explicitly to clear error status. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4f64f1c8e1fdc7427819e81504a62e5bd7cab76f Author: Dennis Li Date: Mon May 10 15:57:04 2021 +0800 drm/amdgpu: correct the funtion to clear GCEA error status The bit 11 of GCEA_ERR_STATUS register is used to clear GCEA error status. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9798970bc744e1d643e106e40e83d8a1c0186c2f Author: Aric Cyr Date: Mon May 3 09:57:35 2021 -0400 drm/amd/display: 3.2.135.1 - adding missed FW promotion Signed-off-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0b51e7e8ef69b4e3ceec1477db907a7db67e7e0c Author: Anthony Koo Date: Sat May 1 20:16:03 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.65 - Implement INBOX0 messaging for HW lock Signed-off-by: Anthony Koo Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 14b1f0738e311d5633124f1fcf87e20494c09a99 Author: Aric Cyr Date: Sun May 2 22:04:15 2021 -0400 drm/amd/display: 3.2.135 Signed-off-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8809a7a4afe90ad9ffb42f72154d27e7c47551ae Author: Dmytro Laktyushkin Date: Mon Apr 19 17:50:53 2021 -0400 drm/amd/display: fix use_max_lb flag for 420 pixel formats Right now the flag simply selects memory config 0 when flag is true however 420 modes benefit more from memory config 3. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Aric Cyr Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9119e993cfd16e65b34d626e8e0b51a847bb2a02 Author: Anthony Wang Date: Fri Apr 30 09:09:02 2021 -0400 drm/amd/display: Handle potential dpp_inst mismatch with pipe_idx [Why] In some pipe harvesting configs, we will select the incorrect dpp_inst when programming DTO. This is because when any intermediate pipe is fused, resource instances are no longer in 1:1 correspondence with pipe index. [How] When looping through pipes to program DTO, get the dpp_inst associated with each pipe from res_pool. Signed-off-by: Anthony Wang Reviewed-by: Yongqiang Sun Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 98ad74c6a92e195f8c9577a5b2e4a4057ce5d5a4 Author: Ilya Bakoulin Date: Thu Apr 15 16:02:25 2021 -0400 drm/amd/display: Handle pixel format test request [Why] Some DSC tests fail because stream pixel encoding does not change its value according to the type requested in the DPCD test params. [How] Set stream pixel encoding before updating DSC config and configuring the test pattern. Signed-off-by: Ilya Bakoulin Reviewed-by: Hanghong Ma Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c31bef1cb1203b26f901a511a3246204cfaf8a57 Author: Ilya Bakoulin Date: Mon Apr 26 14:27:38 2021 -0400 drm/amd/display: Fix clock table filling logic [Why] Currently, the code that fills the clock table can miss filling information about some of the higher voltage states advertised by the SMU. This, in turn, may cause some of the higher pixel clock modes (e.g. 8k60) to fail validation. [How] Fill the table with one entry per DCFCLK level instead of one entry per FCLK level. This is needed because the maximum FCLK does not necessarily need maximum voltage, whereas DCFCLK values from SMU cover the full voltage range. Signed-off-by: Ilya Bakoulin Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ebc22cbdc058d474210343ec87955711546183ad Author: Wenjing Liu Date: Tue Apr 13 18:44:40 2021 -0400 drm/amd/display: minor dp link training refactor [how] The change includes some dp link training refactors: 1. break down is_ch_eq_done to checking individual conditions in its own function. 2. update dpcd_set_training_pattern to take in dc_dp_training_pattern as input. 3. moving lttpr mode struct definition into link_service_types.h Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4469201b19354a273076794e2ee9d73eaadcb1f5 Author: Chaitanya Dhere Date: Tue Apr 20 17:21:17 2021 -0400 drm/amd/display: DETBufferSizeInKbyte variable type modifications [Why] DETBufferSizeInKByte is not expected to be sub-dividable, hence unsigned int is a better suited data-type. Change it to an array as well to satisfy current requirements. [How] Change the data-type of DETBufferSizeInKByte to an unsigned int array. Modify the all the variables like DETBufferSizeY, DETBufferSizeC that are involved in DETBufferSizeInKByte calculations to unsigned int in all the display_mode_vba_xx files. Signed-off-by: Chaitanya Dhere Reviewed-by: Dmytro Laktyushkin Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit eda8f7993d0a321fb902e3aad5eb86a8184a143d Author: Fangzhi Zuo Date: Fri Apr 23 17:00:04 2021 -0400 drm/amd/display: Add dc log for DP SST DSC enable/disable Signed-off-by: Fangzhi Zuo Reviewed-by: Mikita Lipski Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 573a0a03af025304342ff80d0653ad7ef11524f0 Author: Jimmy Kizito Date: Fri Apr 9 22:23:53 2021 -0400 drm/amd/display: Expand DP module training API. [Why & How] Add functionality useful for DP link training to public interface. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8225367130666bf2961399a85913af1b4497d9b4 Author: Jimmy Kizito Date: Wed Apr 7 18:56:19 2021 -0400 drm/amd/display: Add fallback and abort paths for DP link training. [Why] When enabling a DisplayPort stream: - Optionally reducing link bandwidth between failed link training attempts should progressively relax training requirements. - Abandoning link training altogether if a sink is unplugged should avoid unnecessary training attempts. [How] - Add fallback parameter to DP link training function and reduce link bandwidth between failed training attempts as long as stream bandwidth requirements are met. - Add training status for sink unplug and abort training when this status is reported. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ede4f6dac99e4b59a7319b9617eff10705045aa2 Author: Jimmy Kizito Date: Mon Apr 5 18:05:09 2021 -0400 drm/amd/display: Update setting of DP training parameters. [Why] Some links are dynamically assigned link encoders on stream enablement. [How] Update DisplayPort training parameter determination stage that assumes link encoder statically assigned to link. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 99732e52e7f8115d505d88f78f27c48281078f66 Author: Jimmy Kizito Date: Thu Apr 1 12:59:54 2021 -0400 drm/amd/display: Update DPRX detection. [Why] Some extra provisions are required during DPRX detection for links which lack physical HPD and AUX/DDC pins. [How] Avoid attempting to access nonexistent physical pins during DPRX detection. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 011907fda3605177f4fc05bf08fcf0fceaabda49 Author: Dennis Li Date: Mon May 10 11:04:59 2021 +0800 drm/amdgpu: covert ras status to kernel errno The original codes use ras status and kernl errno together in the same function, which is a wrong code style. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 509b9a5b4865dee723296f143695a7774fc96c4a Author: Zhan Liu Date: Sun May 9 19:30:36 2021 -0400 drm/amd/display: Avoid HPD IRQ in GPU reset state [Why] If GPU is in reset state, force enabling link will cause unexpected behaviour. [How] Avoid handling HPD IRQ when GPU is in reset state. Signed-off-by: Zhan Liu Reviewed-by: Nikola Cornij Signed-off-by: Alex Deucher commit 7ddd9770857e26e6c284475260afce2fe71b4cb5 Author: Oak Zeng Date: Thu May 6 11:24:17 2021 -0500 drm/amdgpu: Quit RAS initialization earlier if RAS is disabled If RAS is disabled through amdgpu_ras_enable kernel parameter, we should quit the RAS initialization eariler to avoid initialization of some RAS data structure such as sysfs etc. Reviewed-by: Hawking Zhang Signed-off-by: Oak Zeng Signed-off-by: Alex Deucher commit 04fe3fd10e9a2d90de73fc068a102ccaa3603865 Author: Philip Yang Date: Wed Apr 28 18:57:57 2021 -0400 drm/amdkfd: handle errors returned by svm_migrate_copy_to_vram/ram If migration copy failed because process is killed, or out of VRAM or system memory, pass error code back to caller to handle error gracefully. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ef0d7d2001c99eedb5a8ba71e9f7a055bfb029ea Author: Luben Tuikov Date: Tue May 4 02:32:20 2021 -0400 drm/amdgpu: Export ras_*_enabled to debugfs Export the runtime-set "ras_hw_enabled" and "ras_enabled" to debugfs, for debugging. Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Acked-by: Christian König Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 8ab0d6f030bab4d8c7310e9894f6fdb59817d241 Author: Luben Tuikov Date: Tue May 4 02:25:29 2021 -0400 drm/amdgpu: Rename to ras_*_enabled Rename, ras_hw_supported --> ras_hw_enabled, and ras_features --> ras_enabled, to show that ras_enabled is a subset of ras_hw_enabled, which itself is a subset of the ASIC capability. Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Acked-by: Christian König Reviewed-by: John Clements Signed-off-by: Alex Deucher commit e509965e58ab2c96418e1a5e756e25d9a54e0765 Author: Luben Tuikov Date: Mon May 3 20:43:00 2021 -0400 drm/amdgpu: Move up ras_hw_supported Move ras_hw_supported into struct amdgpu_dev. The dependency is: struct amdgpu_ras <== struct amdgpu_dev <== ASIC, read as "struct amdgpu_ras depends on struct amdgpu_dev, which depends on the hardware." This can be loosely understood as, "if RAS is supported, which is property of the ASIC (struct amdgpu_dev), then we can access struct amdgpu_ras." v2: Fix a typo: must binary AND in ternary cond in amdgpu_ras.c Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Acked-by: Christian König Reviewed-by: John Clements Signed-off-by: Alex Deucher commit acdae2169bae6993c61ded36ae0b2301c07c0a9e Author: Luben Tuikov Date: Mon May 3 20:02:22 2021 -0400 drm/amdgpu: Remove redundant ras->supported Remove redundant ras->supported, as this value is also stored in adev->ras_features. Use adev->ras_features, as that supercedes "ras", since the latter is its member. The dependency goes like this: ras <== adev->ras_features <== hw_supported, and is read as "ras depends on ras_features, which depends on hw_supported." The arrows show the flow of information, i.e. the dependency update. "hw_supported" should also live in "adev". Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Acked-by: Christian König Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 71efc8701a47aa9e3de74bab06020da81757893f Author: Sathishkumar S Date: Mon May 3 23:57:31 2021 +0530 drm/amdgpu: update vcn1.0 Non-DPG suspend sequence update suspend register settings in Non-DPG mode. Signed-off-by: Sathishkumar S Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 2a1bf57c0fd1c1c5ddce5aaa75ce67f45fc9e9f1 Author: Dennis Li Date: Thu May 6 13:26:28 2021 +0800 drm/amdgpu: update the shader to clear specific SGPRs Add shader codes to explicitly clear specific SGPRs, such as flat_scratch_lo, flat_scratch_hi and so on. And also correct the allocation size of SGPRs in PGM_RSRC1. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit da6b993717ebc9e3c5c6470d7ca94169acf8be0f Author: Mukul Joshi Date: Tue Mar 9 13:42:33 2021 -0500 drm/amdgpu: Enable TCP channel hashing for Aldebaran Enable TCP channel hashing to match DF hash settings for Aldebaran. Signed-off-by: Mukul Joshi Signed-off-by: Oak Zeng Reviewed-by: Joseph Greathouse Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit ddec8d3be0f8334bf44b0be86f354c835519e458 Author: Eric Huang Date: Fri Apr 23 15:05:17 2021 -0400 drm/amdkfd: add ACPI SRAT parsing for topology In NPS4 BIOS we need to find the closest numa node when creating topology io link between cpu and gpu, if PCI driver doesn't set it. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3dc8077fb00ba769b18d115b08935df388d33d2b Author: Alex Deucher Date: Fri Apr 30 12:40:19 2021 -0400 drm/amdgpu/pm: add documentation for pp_od_clock_voltage for vangogh Vangogh follows other APUs, but also allows core clock adjustments. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 0487bbb44464288194debc1a91e785777f8d1586 Author: Alex Deucher Date: Fri Apr 30 12:21:46 2021 -0400 drm/amdgpu/pm: add documentation for pp_od_clock_voltage for APUs APUs only support adjusting the SCLK domain. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit cfd053be1fa31787830f9e8bcccfbaa174b44e42 Author: Evan Quan Date: Mon Apr 26 15:20:04 2021 +0800 drm/amd/pm: expose pmfw attached timestamp on Aldebaran Available with 68.18.0 and later PMFWs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 403c9674a8983ed57a1fb75d7edae29e80395056 Author: Evan Quan Date: Mon Apr 26 15:14:22 2021 +0800 drm/amd/pm: new gpu_metrics structure for pmfw attached timestamp Supported by some latest ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 37ac3dc00da051fc721246d6f6c0d5a66f8778f8 Author: Bas Nieuwenhuizen Date: Tue May 4 11:43:34 2021 +0200 drm/amdgpu: Use device specific BO size & stride check. The builtin size check isn't really the right thing for AMD modifiers due to a couple of reasons: 1) In the format structs we don't do set any of the tilesize / blocks etc. to avoid having format arrays per modifier/GPU 2) The pitch on the main plane is pixel_pitch * bytes_per_pixel even for tiled ... 3) The pitch for the DCC planes is really the pixel pitch of the main surface that would be covered by it ... Note that we only handle GFX9+ case but we do this after converting the implicit modifier to an explicit modifier, so on GFX9+ all framebuffers should be checked here. There is a TODO about DCC alignment, but it isn't worse than before and I'd need to dig a bunch into the specifics. Getting this out in a reasonable timeframe to make sure it gets the appropriate testing seemed more important. Finally as I've found that debugging addfb2 failures is a pita I was generous adding explicit error messages to every failure case. Fixes: f258907fdd83 ("drm/amdgpu: Verify bo size can fit framebuffer size on init.") Tested-by: Simon Ser Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit bcfbb6016b3d732d71130db3489888583f692386 Author: Bas Nieuwenhuizen Date: Wed May 5 03:27:49 2021 +0200 drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode. Otherwise tiling modes that require the values form this field (In particular _*_X) would be corrupted upon video decode. Copied from the VCN v2 code. Fixes: 99541f392b4d ("drm/amdgpu: add mc resume DPG mode for VCN3.0") Reviewed-and-Tested by: Leo Liu Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 67387dfe0f6630f2d4f412ce77debec23a49db7a Author: Alex Deucher Date: Tue May 4 11:00:42 2021 -0400 drm/amdgpu: change the default timeout for kernel compute queues Change to 60s. This matches what we already do in virtualization. Infinite timeout can lead to deadlocks in the kernel. Reviewed-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Alex Deucher commit a8f768874aaf751738a2e0350bf2e70085f93ace Author: Sathishkumar S Date: Mon May 3 12:34:10 2021 +0530 drm/amdgpu: set vcn mgcg flag for picasso enable vcn mgcg flag for picasso. Signed-off-by: Sathishkumar S Reviewed-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 74abbdedc33e5385be9bcf13918c742d91718fe5 Author: Mike Li Date: Fri Mar 26 15:14:12 2021 -0400 drm/amdkfd: Update L1 and add L2/3 cache information The L1 cache information has been updated and the L2/L3 information has been added. The changes have been made for Vega10 and newer ASICs. There are no changes for the older ASICs before Vega10. Signed-off-by: Mike Li Signed-off-by: Alex Deucher commit fb6372652391bb5b812669d763295ac1929ef42a Author: Fabio M. De Francesco Date: Tue Apr 27 11:44:49 2021 +0200 drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock drm_modeset_lock_all() is not needed here, so it is replaced with drm_modeset_lock(). The crtc list around which we are looping never changes, therefore the only lock we need is to protect access to crtc->state. Suggested-by: Daniel Vetter Suggested-by: Matthew Wilcox Signed-off-by: Fabio M. De Francesco Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Alex Deucher commit 2b24c199388e09afea5ca11c6284b320f2ae8ed6 Author: Tom Rix Date: Fri Apr 30 10:16:54 2021 -0700 drm/amd/pm: initialize variable Static analysis reports this problem amdgpu_pm.c:478:16: warning: The right operand of '<' is a garbage value for (i = 0; i < data.nums; i++) { ^ ~~~~~~~~~ In some cases data is not set. Initialize to 0 and flag not setting data as an error with the existing check. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 642f3ad00f9640a1a74c6e0da538c5f88d2d0117 Author: Kees Cook Date: Sun May 2 22:06:08 2021 -0700 drm/radeon: Avoid power table parsing memory leaks Avoid leaving a hanging pre-allocated clock_info if last mode is invalid, and avoid heap corruption if no valid modes are found. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211537 Fixes: 6991b8f2a319 ("drm/radeon/kms: fix segfault in pm rework") Signed-off-by: Kees Cook Signed-off-by: Alex Deucher commit 359615251034790abaa06b7b0e5635543e01d473 Author: Kees Cook Date: Sun May 2 22:06:07 2021 -0700 drm/radeon: Fix off-by-one power_state index heap overwrite An out of bounds write happens when setting the default power state. KASAN sees this as: [drm] radeon: 512M of GTT memory ready. [drm] GART: num cpu pages 131072, num gpu pages 131072 ================================================================== BUG: KASAN: slab-out-of-bounds in radeon_atombios_parse_power_table_1_3+0x1837/0x1998 [radeon] Write of size 4 at addr ffff88810178d858 by task systemd-udevd/157 CPU: 0 PID: 157 Comm: systemd-udevd Not tainted 5.12.0-E620 #50 Hardware name: eMachines eMachines E620 /Nile , BIOS V1.03 09/30/2008 Call Trace: dump_stack+0xa5/0xe6 print_address_description.constprop.0+0x18/0x239 kasan_report+0x170/0x1a8 radeon_atombios_parse_power_table_1_3+0x1837/0x1998 [radeon] radeon_atombios_get_power_modes+0x144/0x1888 [radeon] radeon_pm_init+0x1019/0x1904 [radeon] rs690_init+0x76e/0x84a [radeon] radeon_device_init+0x1c1a/0x21e5 [radeon] radeon_driver_load_kms+0xf5/0x30b [radeon] drm_dev_register+0x255/0x4a0 [drm] radeon_pci_probe+0x246/0x2f6 [radeon] pci_device_probe+0x1aa/0x294 really_probe+0x30e/0x850 driver_probe_device+0xe6/0x135 device_driver_attach+0xc1/0xf8 __driver_attach+0x13f/0x146 bus_for_each_dev+0xfa/0x146 bus_add_driver+0x2b3/0x447 driver_register+0x242/0x2c1 do_one_initcall+0x149/0x2fd do_init_module+0x1ae/0x573 load_module+0x4dee/0x5cca __do_sys_finit_module+0xf1/0x140 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Without KASAN, this will manifest later when the kernel attempts to allocate memory that was stomped, since it collides with the inline slab freelist pointer: invalid opcode: 0000 [#1] SMP NOPTI CPU: 0 PID: 781 Comm: openrc-run.sh Tainted: G W 5.10.12-gentoo-E620 #2 Hardware name: eMachines eMachines E620 /Nile , BIOS V1.03 09/30/2008 RIP: 0010:kfree+0x115/0x230 Code: 89 c5 e8 75 ea ff ff 48 8b 00 0f ba e0 09 72 63 e8 1f f4 ff ff 41 89 c4 48 8b 45 00 0f ba e0 10 72 0a 48 8b 45 08 a8 01 75 02 <0f> 0b 44 89 e1 48 c7 c2 00 f0 ff ff be 06 00 00 00 48 d3 e2 48 c7 RSP: 0018:ffffb42f40267e10 EFLAGS: 00010246 RAX: ffffd61280ee8d88 RBX: 0000000000000004 RCX: 000000008010000d RDX: 4000000000000000 RSI: ffffffffba1360b0 RDI: ffffd61280ee8d80 RBP: ffffd61280ee8d80 R08: ffffffffb91bebdf R09: 0000000000000000 R10: ffff8fe2c1047ac8 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000100 FS: 00007fe80eff6b68(0000) GS:ffff8fe339c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe80eec7bc0 CR3: 0000000038012000 CR4: 00000000000006f0 Call Trace: __free_fdtable+0x16/0x1f put_files_struct+0x81/0x9b do_exit+0x433/0x94d do_group_exit+0xa6/0xa6 __x64_sys_exit_group+0xf/0xf do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fe80ef64bea Code: Unable to access opcode bytes at RIP 0x7fe80ef64bc0. RSP: 002b:00007ffdb1c47528 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe80ef64bea RDX: 00007fe80ef64f60 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 00007fe80ee2c620 R11: 0000000000000246 R12: 00007fe80eff41e0 R13: 00000000ffffffff R14: 0000000000000024 R15: 00007fe80edf9cd0 Modules linked in: radeon(+) ath5k(+) snd_hda_codec_realtek ... Use a valid power_state index when initializing the "flags" and "misc" and "misc2" fields. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211537 Reported-by: Erhard F. Fixes: a48b9b4edb8b ("drm/radeon/kms/pm: add asic specific callbacks for getting power state (v2)") Fixes: 79daedc94281 ("drm/radeon/kms: minor pm cleanups") Signed-off-by: Kees Cook Signed-off-by: Alex Deucher commit 36f77e12a21eea07901bed8c6f0a170c7c7bf1b1 Author: Alex Deucher Date: Tue May 4 09:58:26 2021 -0400 drm/amdgpu: drop the GCR packet from the emit_ib frame for sdma5.0 It's not needed here and has been added to the proper place in the previous patch. This aligns with what we do for sdma 5.2. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e8d7aa68c8fe68525d04a940ca59c1b5aae16b7e Author: Alex Deucher Date: Tue Apr 20 15:26:46 2021 -0400 drm/amdgpu: Add graphics cache rinse packet for sdma 5.0 Add emit mem sync callback for sdma_v5_0 In amdgpu sync object test, three threads created jobs to send GFX IB and SDMA IB in sequence. After the first GFX thread joined, sometimes the third thread will reuse the same physical page to store the SDMA IB. There will be a risk that SDMA will read GFX IB in the previous physical page. So it's better to flush the cache before commit sdma IB. Acked-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 969aea09316799a60fe44ceedf1bd9bf861c4009 Author: Alex Deucher Date: Mon May 3 09:43:21 2021 -0400 MAINTAINERS: fix a few more amdgpu tree links Switch to gitlab. Fixes: 101c2fae5108d7 ("MAINTAINERS: update radeon/amdgpu/amdkfd git trees") Cc: David Ward Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 27ebf21f9220e5991cf33c34d6b47e8dea4fe905 Author: Lijo Lazar Date: Thu Apr 15 15:29:22 2021 +0800 drm/amd/pm: Add debugfs node to read private buffer Add debugfs interface to read region allocated for FW private buffer Signed-off-by: Lijo Lazar Suggested-by: Alex Deucher Reviewed-by: Hawking Zhang Reviewed-by: Christian König Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b8c78bdb0bc68eb5e681e60b0aa54dd23c5d7d01 Author: Lijo Lazar Date: Thu Apr 15 15:22:28 2021 +0800 drm/amd/pm: Add interface to get FW private buffer v1: Add new interface to get FW private buffer details v2: Drop domain check v3: Use amdgpu_bo_kmap to get cpu address Signed-off-by: Lijo Lazar Suggested-by: Alex Deucher Reviewed-by: Hawking Zhang Reviewed-by: Christian König Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit bdd2465730a3ad62aec8ad47a59a9d36ffdebf37 Author: Jonathan Kim Date: Fri Apr 30 15:31:42 2021 -0400 drm/amdkfd: fix no atomics settings in the kfd topology To account for various PCIe and xGMI setups, check the no atomics settings for a device in relation to every direct peer. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 84a19fa786a9f1d7f6aaf8021d3a46026ad5a7da Author: Aric Cyr Date: Sun Apr 25 04:22:23 2021 -0400 drm/amd/display: 3.2.134 This version brings improvements across DP, eDP, DMUB, DSC, etc Signed-off-by: Aric Cyr Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3375bd91d339bb967daa67f3bb8e3c25255a8b7c Author: Anthony Koo Date: Sat Apr 24 10:42:47 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.64 Signed-off-by: Anthony Koo Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5728d5e58dbe3aa7725873e2a29265b57cfaaa3f Author: Paul Wu Date: Fri Apr 16 13:33:26 2021 +0800 drm/amd/display: Set stream_count to 0 when dc_resource_state_destruct. [Why] When hardware need to be reset, driver need to reset stream objects but dc_resource_state_destruct function omit resetting stream_count. It will lead page fault if some logic will touch stream object. [How] Set stream_count to 0 when dc_resource_state_destruct. Signed-off-by: Paul Wu Reviewed-by: Aric Cyr Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 05e62b6b6433e1159018eb5862e906a3db24dfcd Author: George Shen Date: Fri Apr 16 17:35:07 2021 -0400 drm/amd/display: Filter out YCbCr420 timing if VSC SDP not supported [Why] Per DP specification, YCbCr420 shall use VSC SDP. [How] For YCbCr420 timings, fail DP mode timing validation if DPCD caps do not indicate VSC SDP colorimetry support. Signed-off-by: George Shen Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 70c14a1d7ee4d25d2024967979c8ba618849af54 Author: Calvin Hou Date: Wed Apr 7 15:07:45 2021 -0400 drm/amd/display: remove checking sink in is_timing_changed [Why] Sometimes, such as sleep wake, the link->local sink pointer changed, but the dc_stream_state->sink pointer is not changed. The checking of timing_changed reports wrong result, lead to link tear down unexpected wrongly. [How] SST compare local sink, MST compare proper remote link. Signed-off-by: Calvin Hou Reviewed-by: Aric Cyr Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 36c9137b1a9675733ad1f560eeba0ed00c323a9f Author: Dale Zhao Date: Mon Apr 19 16:38:55 2021 +0800 drm/amd/display: Add audio support for DFP type of active branch is DP case [Why] Per DP spec, for active protocol convertor adaptor, DP source should enable audio for DFP type is DP, HDMI or DP++. Current is_dp_active_dongle() checking is not precise, which treat branch device default as active dongle. As a result, we will mistakenly disable audio for DFP type is DP case. [How] Make is_dp_active_dongle() checking more precise for active dongle types. Rename active diongle type as SST branch device in case confusion. Signed-off-by: Dale Zhao Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 81927e2808be5adace93c2012d45d6938d3a7aa0 Author: Jude Shih Date: Tue Apr 20 10:19:37 2021 +0800 drm/amd/display: Support for DMUB AUX [WHY] To process AUX transactions with DMUB using inbox1 and outbox1 mail boxes. [How] 1) Added inbox1 command DMUB_CMD__DP_AUX_ACCESS to issue AUX commands to DMUB in dc_process_dmub_aux_transfer_async(). DMUB processes AUX cmd with DCN and sends reply back in an outbox1 message triggering an outbox1 interrupt to driver. 2) In existing driver implementation, AUX commands are processed synchronously by configuring DCN reg. But in DMUB AUX, driver sends an inbox1 message and waits for a conditional variable (CV) which will be signaled by outbox1 ISR. 3) DM will retrieve Outbox1 message and send back reply to upper layer and complete the AUX command Signed-off-by: Jude Shih Reviewed-by: Hanghong Ma Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7f63d8a1ad37a481dba7e721c3510025bdb897d4 Author: Paul Hsieh Date: Wed Apr 21 11:01:25 2021 +0800 drm/amd/display: update DCN to use new surface programming [Why] The split pipe config is updated due to antoher stream bandwidth validataion. Driver doesn't reprogram the split pipe config to signle pipe cause SW use signel pipe but HW still use pipe split. [How] track global updates and update any hw that isn't related to current stream being updated. Signed-off-by: Paul Hsieh Reviewed-by: Jun Lei Acked-by: Dmytro Laktyushkin Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4462bca7d1869d774046721035b40b96e064e4bd Author: Eric Yang Date: Fri Apr 16 15:30:04 2021 -0400 drm/amd/display: Extend DMUB HW params to allow DM to specify boot options [Why & How] Add the field to HW params to allow DM dynamically pass down debug and boot options as needed. Signed-off-by: Eric Yang Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bc415a4b1c4a103a381e5f2ee5127abd1436bbd1 Author: Aric Cyr Date: Tue Apr 20 12:28:20 2021 -0400 drm/amdgpu/dc: Revert commit "treat memory as a single-channel" This reverts commit "dc: treat memory as a single-channel for asymmetric memory". Signed-off-by: Aric Cyr Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 118b4627d6777d8d422786ded6a0bd8e2934d11f Author: Mikita Lipski Date: Wed Apr 14 14:51:02 2021 -0400 drm/amd/display: multi-eDP backlight support [why] Currently the assumption is that we are using a single eDP connector so there will only be one backlight object. Need changes to allow brightness update and reading for multiple eDP connectors. [how] - register a single device - turn backlight link from a pointer to an array of pointers - update brightness of all eDP links at the same time when request is registered - read brightness level only of the primary eDP panel - turn current_backlight_pwm and targer_backlight_pwm debugfs enteries into per connector enteries. Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f50160cf0f98b5bc3074c219a46af7305a14ffff Author: Stanley.Yang Date: Thu Apr 29 09:32:12 2021 +0800 drm/amdgpu: force enable gfx ras for vega20 ws Signed-off-by: Stanley.Yang Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b86e7eef91ef11972f3f8971c438c174180a5943 Author: Nikola Cornij Date: Fri Apr 30 19:34:29 2021 -0400 drm/amd/display: Avoid gpio conflict on MST branch [Why] Similar to SST branch, gpio conflict also needs to be avoided on MST. Without doing so, there is a chance that gpio conflict will occur if multiple gpio interrupts arrive simultaneously. [How] By mutex locking/unlocking &aconnector->hpd_lock, we won't get gpio conflict when handling hpd. Signed-off-by: Zhan Liu Signed-off-by: Nikola Cornij Reviewed-by: Bhawanpreet Lakha Acked-by: Zhan Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit df0a271cc794639ef537f21c4c56893e40972523 Author: Wenjing Liu Date: Thu Apr 22 14:01:25 2021 -0400 drm/amd/display: add dsc stream overhead for dp only [why] Based on hardware team recommendation this additional dsc overhead is only required for DP DSC. [how] Add a check for is_dp and only apply the overhead if this flag is set. Signed-off-by: Wenjing Liu Reviewed-by: Chris Park Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cf8b92a75646735136053ce51107bfa8cfc23191 Author: Roman Li Date: Mon Apr 19 11:47:00 2021 -0400 drm/amd/display: fix potential gpu reset deadlock [Why] In gpu reset dc_lock acquired in dm_suspend(). Asynchronously handle_hpd_rx_irq can also be called through amdgpu_dm_irq_suspend->flush_work, which also tries to acquire dc_lock. That causes a deadlock. [How] Check if amdgpu executing reset before acquiring dc_lock. Signed-off-by: Lang Yu Signed-off-by: Roman Li Reviewed-by: Qingqing Zhuo Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2e4ec251628f6d43c1df5351d744b1aed4583ae4 Author: Felix Kuehling Date: Fri Apr 30 05:07:18 2021 -0400 drm/amdkfd: Make svm_migrate_put_sys_page static This function is only used in this source file. Reported-by: kernel test robot Signed-off-by: Felix Kuehling Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b617207e8001094e065f772fb35a45b015f5af4c Author: Nirmoy Das Date: Fri Apr 30 13:35:26 2021 +0200 drm/amdgpu: remove excess function parameter Fix below htmldocs build warning: "warning: Excess function parameter 'vm_context' description in 'amdgpu_vm_init'" Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1704ac8e439e3dcf97431e268bd64fde1874d807 Author: Philip Yang Date: Thu Apr 15 10:08:58 2021 -0400 drm/amdkfd: flush TLB after updating GPU page table To workaround the situation that vm retry fault keep coming after page table update. We are investigating the root cause, but once this issue happens, application will stuck and sometimes have to reboot to recover. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 589bb0ca4767e289aeef7b90efd075a5faa44b6c Author: Peng Ju Zhou Date: Thu Apr 29 14:16:52 2021 +0800 drm/amdgpu: Rename the flags to eliminate ambiguity v2 The flags vf_reg_access_* may cause confusion, rename the flags to make it more clear. Signed-off-by: Peng Ju Zhou Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit a1b6aa49471c2c0863913764eafe7318a3d54a76 Author: Evan Quan Date: Wed Apr 28 12:00:20 2021 +0800 drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC Polaris12 32bit ASIC needs a special MC firmware. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e7de0d844ea803d752e0b41e6b7dcc35d671c186 Author: Zhigang Luo Date: Thu Apr 29 15:37:31 2021 -0400 drm/amdgpu: Add Aldebaran virtualization support 1. add Aldebaran in virtualization detection list. 2. disable Aldebaran virtual display support as there is no GFX engine in Aldebaran. 3. skip TMR loading if Aldebaran is in virtualizatin mode as it shares the one host loaded. Signed-off-by: Zhigang Luo Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cecd91b4f791d52f61a4feca5c3359b1d45a938b Author: Zhigang Luo Date: Thu Apr 29 15:10:15 2021 -0400 drm/amdkfd: Add Aldebaran virtualization support update kfd_supported_devices to enable Aldebaran virtualization support Signed-off-by: Zhigang Luo Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 838eb73c8d5fa9bf3dcc75010b0eb819eb5bb7ed Author: Zhigang Luo Date: Thu Apr 29 14:15:48 2021 -0400 drm/amdgpu: Add a new device ID for Aldebaran It is Aldebaran VF device ID, for virtualization support. Signed-off-by: Zhigang Luo Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 559f418ed663f43071457328b3ff18dfeb5bf2e6 Author: Jonathan Kim Date: Wed Apr 21 15:08:18 2021 -0400 drm/amdkfd: report the numa weight between host and device over xgmi GPUs connected to CPUs over xGMI are bidirectional so set weight by a single hop both ways. Signed-off-by: Jonathan Kim Tested-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit deb689832ff6a88abfe838b6cea779cb9381c59f Author: Jonathan Kim Date: Wed Apr 21 15:05:49 2021 -0400 drm/amdkfd: report atomics support in io_links over xgmi Link atomics support over xGMI should be reported independently of PCIe. Do not set NO_ATOMICS flags on devices that support xGMI but that do not have atomics support over PCIe. Signed-off-by: Jonathan Kim Tested-by: Ramesh Errabolu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit d1dfd370c30af9ab009f0d10dc7f88bd126ae97a Author: Wan Jiabing Date: Thu Apr 29 20:38:36 2021 +0800 drm/amd/display: Remove duplicate declaration of dc_state There are two declarations of struct dc_state here. Remove the later duplicate more secure. Signed-off-by: Wan Jiabing Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4034fba1380184ee534115a6605bbb17c690406b Author: Wan Jiabing Date: Thu Apr 29 11:04:01 2021 +0800 drm/amd/display: Remove duplicate include of hubp.h In commit 482812d56698e ("drm/amd/display: Set max TTU on DPG enable"), "hubp.h" was added which caused the duplicate include. To be on the safe side, remove the later duplicate include. Signed-off-by: Wan Jiabing Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ddab8bd788f5badb38b8e99d63bffc22225ee3e4 Author: Rodrigo Siqueira Date: Tue Apr 13 20:06:04 2021 -0400 drm/amd/display: Fix two cursor duplication when using overlay Our driver supports overlay planes, and as expected, some userspace compositor takes advantage of these features. If the userspace is not enabling the cursor, they can use multiple planes as they please. Nevertheless, we start to have constraints when userspace tries to enable hardware cursor with various planes. Basically, we cannot draw the cursor at the same size and position on two separated pipes since it uses extra bandwidth and DML only run with one cursor. For those reasons, when we enable hardware cursor and multiple planes, our driver should accept variations like the ones described below: +-------------+ +--------------+ | +---------+ | | | | |Primary | | | Primary | | | | | | Overlay | | +---------+ | | | |Overlay | | | +-------------+ +--------------+ In this scenario, we can have the desktop UI in the overlay and some other framebuffer attached to the primary plane (e.g., video). However, userspace needs to obey some rules and avoid scenarios like the ones described below (when enabling hw cursor): +--------+ |Overlay | +-------------+ +-----+-------+ +-| |--+ | +--------+ | +--------+ | | +--------+ | | |Overlay | | |Overlay | | | | | | | | | | | | | | +--------+ | +--------+ | | | | Primary | | Primary | | Primary | +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ | +--------+ | Primary | | |Overlay | | | | | | | | | +--------+ | +--------+ | | Primary | | |Overlay | | +-------------+ +-| |--+ +--------+ If the userspace violates some of the above scenarios, our driver needs to reject the commit; otherwise, we can have unexpected behavior. Since we don't have a proper driver validation for the above case, we can see some problems like a duplicate cursor in applications that use multiple planes. This commit fixes the cursor issue and others by adding adequate verification for multiple planes. Change since V1 (Harry and Sean): - Remove cursor verification from the equation. Cc: Louis Li Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Hersen Wu Cc: Sean Paul Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 1f6e8eb153113c2da2027bea7793d88dc9c299c3 Author: Hawking Zhang Date: Thu Apr 29 14:28:13 2021 +0800 drm/amdgpu: enable gfx ras in aldebran by default gfx ras now can be enabled by default in aldebaran Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 9adaac6eb488ff4e3bd1ef28cbab44956285deaf Author: Hawking Zhang Date: Wed Apr 28 23:10:36 2021 +0800 drm/amdgpu: switch to mmhub ras callback for ras fini invoke callback function for mmhub ras fini Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 8e17ddc2e215c2b01228a900cadf5382a75b9e77 Author: Hawking Zhang Date: Wed Apr 28 16:45:35 2021 +0800 drm/amdgpu: retired reset_ras_error_count from hdp callbacks It was moved to hdp ras callbacks Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 78871b6c8be303a8626bfc85f022b31362495c1b Author: Hawking Zhang Date: Wed Apr 28 22:51:22 2021 +0800 drm/amdgpu: enable ras error count query and reset for HDP add hdp block ras error query and reset support in amdgpu ras error count query and reset interface Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 7c63694eb97f4edcb20829b4fcdf74a3db016dda Author: Hawking Zhang Date: Wed Apr 28 22:20:00 2021 +0800 drm/amdgpu: init/fini hdp v4_0 ras invoke hdp v4_0 ras init in gmc late_init phase while ras fini in gmc sw_fini phase Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 6f12507fad4c2b306a8fbc917bd110d7fe0515bd Author: Hawking Zhang Date: Wed Apr 28 21:21:08 2021 +0800 drm/amdgpu: initialize hdp v4_0 ras functions hdp v4_0 support ras features Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit ca81b26d21b3956062441a3faf5faf6bdcaed6e8 Author: Hawking Zhang Date: Wed Apr 28 22:59:14 2021 +0800 drm/amdgpu: implement hdp v4_0 ras functions implement hdp v4_0 ras functions, including ras init/fini, query/reset_error_counter Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit b11625f56f09f125c2e608893bfceb84e92e52f9 Author: Hawking Zhang Date: Wed Apr 28 21:07:41 2021 +0800 drm/amdgpu: add helpers for hdp ras init/fini hdp ras init/fini are common functions that can be shared among hdp generations Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 8f4a92937b27704a592b396e204c82515da4017a Author: Hawking Zhang Date: Wed Apr 28 21:22:46 2021 +0800 drm/amdgpu: add hdp ras structures centralize all hdp ras operation to ras_funcs Signed-off-by: Hawking Zhang Reviewed-by: John Clements Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit b44cdca7fd792c6b6203fd33a3030bdc43dfaee6 Author: Simon Ser Date: Wed Apr 21 11:16:35 2021 +0200 amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create This error code-path is missing a drm_gem_object_put call. Other error code-paths are fine. Signed-off-by: Simon Ser Fixes: 1769152ac64b ("drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)") Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bas Nieuwenhuizen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5760dcb953ee8fe0706b67498b6ca599d7f49111 Author: Guenter Roeck Date: Wed Apr 21 09:18:02 2021 -0700 drm/amd/display: Fix build warnings Fix the following build warnings. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘dm_update_mst_vcpi_slots_for_dsc’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6242:46: warning: variable ‘old_con_state’ set but not used drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_commit_cursors’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7709:44: warning: variable ‘new_plane_state’ set but not used The variables were introduced to be used in iterators, but not used. Use other iterators which don't require the unused variables. Fixes: 8ad278062de4e ("drm/amd/display: Disable cursors before disabling planes") Fixes: 29b9ba74f6384 ("drm/amd/display: Recalculate VCPI slots for new DSC connectors") Signed-off-by: Guenter Roeck Signed-off-by: Alex Deucher commit 1fdbbc123f55dec0c175e742283950a6ae486ce6 Author: Fabio M. De Francesco Date: Fri Apr 23 13:38:46 2021 +0200 drm/amd/amdgpu: Fix errors in documentation of function parameters In the function documentation, I removed the excess parameters, described the undocumented ones, and fixed the syntax errors. Signed-off-by: Fabio M. De Francesco Signed-off-by: Alex Deucher commit a273f315b949ac55694fedac9ee4ceeb47f537b0 Author: Alex Deucher Date: Fri Apr 23 16:46:19 2021 -0400 drm/amdgpu/display: add documentation for dmcub_trace_event_en Was missing when this structure was updated. Fixes: 46a83eba276cd3 ("drm/amd/display: Add debugfs to control DMUB trace buffer events") Reviewed-by: Leo (Hanghong) Ma Signed-off-by: Alex Deucher commit d477eb1719498cfea27539e6f2a2012251d83f62 Author: Fabio M. De Francesco Date: Sun Apr 25 00:19:00 2021 +0200 drm/amd/pm/powerplay/hwmgr: Fix kernel-doc syntax in documentation Fixed kernel-doc syntax errors in documentation of functions. Signed-off-by: Fabio M. De Francesco Signed-off-by: Alex Deucher commit 440d8774eff130af132c783f8988d348157ab93e Author: Kai-Heng Feng Date: Mon Apr 26 18:50:00 2021 +0800 drm/amdgpu: Register VGA clients after init can no longer fail When an amdgpu device fails to init, it makes another VGA device cause kernel splat: kernel: amdgpu 0000:08:00.0: amdgpu: amdgpu_device_ip_init failed kernel: amdgpu 0000:08:00.0: amdgpu: Fatal error during GPU init kernel: amdgpu: probe of 0000:08:00.0 failed with error -110 ... kernel: amdgpu 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none kernel: BUG: kernel NULL pointer dereference, address: 0000000000000018 kernel: #PF: supervisor read access in kernel mode kernel: #PF: error_code(0x0000) - not-present page kernel: PGD 0 P4D 0 kernel: Oops: 0000 [#1] SMP NOPTI kernel: CPU: 6 PID: 1080 Comm: Xorg Tainted: G W 5.12.0-rc8+ #12 kernel: Hardware name: HP HP EliteDesk 805 G6/872B, BIOS S09 Ver. 02.02.00 12/30/2020 kernel: RIP: 0010:amdgpu_device_vga_set_decode+0x13/0x30 [amdgpu] kernel: Code: 06 31 c0 c3 b8 ea ff ff ff 5d c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 55 48 8b 87 90 06 00 00 48 89 e5 53 89 f3 <48> 8b 40 18 40 0f b6 f6 e8 40 58 39 fd 80 fb 01 5b 5d 19 c0 83 e0 kernel: RSP: 0018:ffffae3c0246bd68 EFLAGS: 00010002 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 kernel: RDX: ffff8dd1af5a8560 RSI: 0000000000000000 RDI: ffff8dce8c160000 kernel: RBP: ffffae3c0246bd70 R08: ffff8dd1af5985c0 R09: ffffae3c0246ba38 kernel: R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000246 kernel: R13: 0000000000000000 R14: 0000000000000003 R15: ffff8dce81490000 kernel: FS: 00007f9303d8fa40(0000) GS:ffff8dd1af580000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000018 CR3: 0000000103cfa000 CR4: 0000000000350ee0 kernel: Call Trace: kernel: vga_arbiter_notify_clients.part.0+0x4a/0x80 kernel: vga_get+0x17f/0x1c0 kernel: vga_arb_write+0x121/0x6a0 kernel: ? apparmor_file_permission+0x1c/0x20 kernel: ? security_file_permission+0x30/0x180 kernel: vfs_write+0xca/0x280 kernel: ksys_write+0x67/0xe0 kernel: __x64_sys_write+0x1a/0x20 kernel: do_syscall_64+0x38/0x90 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae kernel: RIP: 0033:0x7f93041e02f7 kernel: Code: 75 05 48 83 c4 58 c3 e8 f7 33 ff ff 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 kernel: RSP: 002b:00007fff60e49b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 kernel: RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f93041e02f7 kernel: RDX: 000000000000000b RSI: 00007fff60e49b40 RDI: 000000000000000f kernel: RBP: 00007fff60e49b40 R08: 00000000ffffffff R09: 00007fff60e499d0 kernel: R10: 00007f93049350b5 R11: 0000000000000246 R12: 000056111d45e808 kernel: R13: 0000000000000000 R14: 000056111d45e7f8 R15: 000056111d46c980 kernel: Modules linked in: nls_iso8859_1 snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_seq input_leds snd_seq_device snd_timer snd soundcore joydev kvm_amd serio_raw k10temp mac_hid hp_wmi ccp kvm sparse_keymap wmi_bmof ucsi_acpi efi_pstore typec_ucsi rapl typec video wmi sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx libcrc32c xor raid6_pq raid1 raid0 multipath linear dm_mirror dm_region_hash dm_log hid_generic usbhid hid amdgpu drm_ttm_helper ttm iommu_v2 gpu_sched i2c_algo_bit drm_kms_helper syscopyarea sysfillrect crct10dif_pclmul sysimgblt crc32_pclmul fb_sys_fops ghash_clmulni_intel cec rc_core aesni_intel crypto_simd psmouse cryptd r8169 i2c_piix4 drm ahci xhci_pci realtek libahci xhci_pci_renesas gpio_amdpt gpio_generic kernel: CR2: 0000000000000018 kernel: ---[ end trace 76d04313d4214c51 ]--- Commit 4192f7b57689 ("drm/amdgpu: unmap register bar on device init failure") makes amdgpu_driver_unload_kms() skips amdgpu_device_fini(), so the VGA clients remain registered. So when vga_arbiter_notify_clients() iterates over registered clients, it causes NULL pointer dereference. Since there's no reason to register VGA clients that early, so solve the issue by putting them after all the goto cleanups. v2: - Remove redundant vga_switcheroo cleanup in failed: label. Fixes: 4192f7b57689 ("drm/amdgpu: unmap register bar on device init failure") Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher commit 8e4d5d43cc6ceb1e6bb76f4ac37c2cf41965484e Author: Pavan Kumar Ramayanam Date: Tue Apr 27 10:21:18 2021 +0530 drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown The runtime resume PM op disregards the return value from amdgpu_device_resume(), masking errors for failed resumes at the PM layer. Reviewed-by: Alex Deucher Signed-off-by: Pavan Kumar Ramayanam Signed-off-by: Alex Deucher commit db7f1e0140e83be6cb4179fc28074cd3c4f1225f Author: Victor Zhao Date: Tue Apr 27 17:52:56 2021 +0800 drm/amdgpu: fix r initial values Sriov gets suspend of IP block failed as return value was not initialized. v2: return 0 directly to align original code semantic before this was broken out into a separate helper function instead of setting initial values Signed-off-by: Victor Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3913ba732e972d88ebc391323999e780a9295852 Merge: 1f975aba215b9 4c598e5e679c3 Author: David S. Miller Date: Mon May 10 15:00:23 2021 -0700 Merge branch 'mvpp2-warnings' Matteo Croce says: ==================== mvpp2: resolve two warnings Just two small changes to suppress two warnings. ==================== Signed-off-by: David S. Miller commit 4c598e5e679c31106914b63b5e3877994dfbba19 Author: Matteo Croce Date: Mon May 10 18:52:32 2021 +0200 mvpp2: suppress warning Remove some unreachable code, so to suppress this warning: drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c: In function ‘mvpp2_prs_tcam_first_free’: drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c:397:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] 397 | if (end >= MVPP2_PRS_TCAM_SRAM_SIZE) | ^~ Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 376d68929d5bb5edc57be5fb38daaff3f3375f64 Author: Matteo Croce Date: Mon May 10 18:52:31 2021 +0200 mvpp2: remove unused parameter mvpp2_run_xdp() has an unused parameter rxq, remove it. Fixes: 07dd0a7aae7f ("mvpp2: add basic XDP support") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 1f975aba215b97266445f8b93db2d6d7f9ba1e59 Merge: 27d64141949e9 40b161bb16c44 Author: David S. Miller Date: Mon May 10 14:58:20 2021 -0700 Merge branch 'pch_gbe-cleanups' Andy Shevchenko says: ==================== net: pch_gbe: fix and a few cleanups The series provides one fix (patch 1) for GPIO to be able to wait for the GPIO driver to appear. This is separated from the conversion to the GPIO descriptors (patch 2) in order to have a possibility for backporting. Patches 3 and 4 fix minor warnings from Sparse while moving to a new APIs. Patch 5 is MODULE_VERSION() clean up. Tested on Intel Minnowboard (v1). Since v3: - rebased on top of v5.13-rc1 - added Tested-by (Flavio) - added Reported-by to certain changes (LKP) Since v2: - added a few cleanups on top of the fix ==================== Signed-off-by: David S. Miller commit 40b161bb16c4456434b5f8f7fb74e3e3d6257c9a Author: Andy Shevchenko Date: Mon May 10 19:39:31 2021 +0300 net: pch_gbe: remove unneeded MODULE_VERSION() call Remove MODULE_VERSION(), as it doesn't seem to serve any practical purpose. For in-tree drivers, the kernel version matters. The code received lots of changes, but module version remained constant, since the driver landed in mainline. So, this version doesn't seem have any practical meaning anymore. Signed-off-by: Andy Shevchenko Tested-by: Flavio Suligoi Signed-off-by: David S. Miller commit 443ef39b499cc9c6635f83238101f1bb923e9326 Author: Andy Shevchenko Date: Mon May 10 19:39:30 2021 +0300 net: pch_gbe: Use proper accessors to BE data in pch_ptp_match() Sparse is not happy about handling of strict types in pch_ptp_match(): .../pch_gbe_main.c:158:33: warning: incorrect type in argument 2 (different base types) .../pch_gbe_main.c:158:33: expected unsigned short [usertype] uid_hi .../pch_gbe_main.c:158:33: got restricted __be16 [usertype] .../pch_gbe_main.c:158:45: warning: incorrect type in argument 3 (different base types) .../pch_gbe_main.c:158:45: expected unsigned int [usertype] uid_lo .../pch_gbe_main.c:158:45: got restricted __be32 [usertype] .../pch_gbe_main.c:158:56: warning: incorrect type in argument 4 (different base types) .../pch_gbe_main.c:158:56: expected unsigned short [usertype] seqid .../pch_gbe_main.c:158:56: got restricted __be16 [usertype] Fix that by switching to use proper accessors to BE data. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Tested-by: Flavio Suligoi Signed-off-by: David S. Miller commit 6fcfb267cb4936d8427ceb431bb7e170a13c4922 Author: Andy Shevchenko Date: Mon May 10 19:39:29 2021 +0300 net: pch_gbe: use readx_poll_timeout_atomic() variant Use readx_poll_timeout_atomic() instead of open coded variants. While at it, add __iomem attribute to the parameter of pch_gbe_wait_clr_bit(). This in particular will fix a lot of warnings detected by Sparse, e.g. .../pch_gbe_main.c:308:26: warning: incorrect type in argument 1 (different address spaces) .../pch_gbe_main.c:308:26: expected void const [noderef] __iomem * .../pch_gbe_main.c:308:26: got void *reg Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Tested-by: Flavio Suligoi Signed-off-by: David S. Miller commit aca6a8746c36c160517f3216da81196248844d58 Author: Andy Shevchenko Date: Mon May 10 19:39:28 2021 +0300 net: pch_gbe: Convert to use GPIO descriptors This switches the PCH GBE driver to use GPIO descriptors. Signed-off-by: Andy Shevchenko Tested-by: Flavio Suligoi Signed-off-by: David S. Miller commit 9e3617a7b84512bf96c04f9cf82d1a7257d33794 Author: Andy Shevchenko Date: Mon May 10 19:39:27 2021 +0300 net: pch_gbe: Propagate error from devm_gpio_request_one() If GPIO controller is not available yet we need to defer the probe of GBE until provider will become available. While here, drop GPIOF_EXPORT because it's deprecated and may not be available. Fixes: f1a26fdf5944 ("pch_gbe: Add MinnowBoard support") Signed-off-by: Andy Shevchenko Tested-by: Flavio Suligoi Signed-off-by: David S. Miller commit 27d64141949e92c04d95d99f215b7f5b261bd8b1 Merge: 532062b099563 514def5dd3398 Author: David S. Miller Date: Mon May 10 14:54:23 2021 -0700 Merge branch 'ytja1103-ptp' Radu Pirea says: ==================== Add PTP support for TJA1103 This is the PTP support for TJA1103. The RX timestamp is found in the reserved2 field of the PTP package. The TX timestamp has to be read from the phy registers. Reading of the timestamp works with interrupts or with polling(that starts when .nxp_c45_txtstamp is called). The implementation of .adjtime is done by read modify write because there is no way to atomically add/subtract a constant from the clock value. I've moved scaled_ppm_to_ppb function from ptp_clock.c to ptp_clock_kernel.h in order to be able to build the driver without PTP_1588_CLOCK=y. ==================== Signed-off-by: David S. Miller commit 514def5dd33984e986e0a3afd2a369d8b4688d3f Author: Radu Pirea (NXP OSS) Date: Mon May 10 18:34:33 2021 +0300 phy: nxp-c45-tja11xx: add timestamping support Add mii_timestamper interface and register a ptp clock. The package timestamping can work with or without interrupts. RX timestamps are received in the reserved field of the PTP package. TX timestamps are read via MDIO from a set of registers. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit 9d9d415f0048e4f7a6109595e2d1657850569c6c Author: Radu Pirea (NXP OSS) Date: Mon May 10 18:34:32 2021 +0300 ptp: ptp_clock: make scaled_ppm_to_ppb static inline Make scaled_ppm_to_ppb static inline to be able to build drivers that use this function even with PTP_1588_CLOCK disabled. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit 532062b099563cba7a93bd9bd50554948661f013 Author: Andy Shevchenko Date: Mon May 10 17:49:09 2021 +0300 atm: Replace custom isprint() with generic analogue Custom isprint() definition may collide with one form ctype.h. In order to avoid this, replace it with a functional analogue which is isascii() && isprint() in this case. First appearance of the code is in the commit 636b38438001 ("Import 2.3.43"). Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit c1f512182c54dc87efd2f7ac19f16a49ff8bb19e Author: Jiapeng Chong Date: Wed Mar 31 16:39:59 2021 +0800 soc: bcm: brcmstb: remove unused variable 'brcmstb_machine_match' Fix the following clang warning: drivers/soc/bcm/brcmstb/common.c:17:34: warning: unused variable 'brcmstb_machine_match' [-Wunused-const-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Florian Fainelli commit 8f711f68cffdacb86444cf1d86292a776bf17dc1 Author: Rafał Miłecki Date: Sat Apr 24 22:23:41 2021 +0200 dt-bindings: clock: brcm, iproc-clocks: convert to the json-schema This helps validating DTS files. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit bb95d7d440fefd104c593d9cb20da6d34a474e97 Author: Rafał Miłecki Date: Wed Apr 21 11:00:06 2021 +0200 ARM: dts: BCM5301X: Fix pinmux subnodes names This matches pinmux-node.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit a4528d9029e2eda16e4fc9b9da1de1fbec10ab26 Author: Rafał Miłecki Date: Fri Apr 16 15:37:53 2021 +0200 ARM: dts: Hurricane 2: Fix NAND nodes names This matches nand-controller.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 75e2f012f6e34b93124d1d86eaa8f27df48e9ea0 Author: Rafał Miłecki Date: Fri Apr 16 15:37:52 2021 +0200 ARM: dts: BCM63xx: Fix NAND nodes names This matches nand-controller.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 0484594be733d5cdf976f55a2d4e8d887f351b69 Author: Rafał Miłecki Date: Fri Apr 16 15:37:51 2021 +0200 ARM: NSP: dts: fix NAND nodes names This matches nand-controller.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit e256b48a3b07ee1ae4bfa60abbf509ba8e386862 Author: Rafał Miłecki Date: Fri Apr 16 15:37:50 2021 +0200 ARM: Cygnus: dts: fix NAND nodes names This matches nand-controller.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 9a800ce1aada6e0f56b78e4713f4858c8990c1f7 Author: Rafał Miłecki Date: Fri Apr 16 15:37:49 2021 +0200 ARM: brcmstb: dts: fix NAND nodes names This matches nand-controller.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit b660269cba748dfd07eb5551a88ff34d5ea0b86e Author: Rafał Miłecki Date: Fri Apr 16 15:37:48 2021 +0200 ARM: dts: BCM5301X: Fix NAND nodes names This matches nand-controller.yaml requirements. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit aed6864035b1e51ba16323b54aa3e4861c1a0a3e Author: Zhen Lei Date: Mon May 10 22:10:02 2021 +0800 net: stmmac: platform: Delete a redundant condition branch The statement of the last "if (xxx)" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei Signed-off-by: David S. Miller commit 584525554fd61040bbb28cd1280d07884ed148e8 Author: Andy Shevchenko Date: Mon May 10 12:58:08 2021 +0300 net: mvpp2: Unshadow error code of device_property_read_u32() device_property_read_u32() may return different error codes. Propagate it to the caller. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit cf3399b731d36bc780803ff63e4d480a1efa33ac Author: Andy Shevchenko Date: Mon May 10 12:58:07 2021 +0300 net: mvpp2: Use devm_clk_get_optional() Replace open coded variants of devm_clk_get_optional(). Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit 692b82c57f71bc755c879ea4eae7fc0eb92cc00b Author: Andy Shevchenko Date: Mon May 10 12:58:06 2021 +0300 net: mvpp2: Use device_get_match_data() helper Use the device_get_match_data() helper instead of open coding. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit 71f0891c84dfdc448736082ab0a00acd29853896 Author: Andy Shevchenko Date: Mon May 10 12:58:05 2021 +0300 net: mvpp2: Put fwnode in error case during ->probe() In each iteration fwnode_for_each_available_child_node() bumps a reference counting of a loop variable followed by dropping in on a next iteration, Since in error case the loop is broken, we have to drop a reference count by ourselves. Do it for port_fwnode in error case during ->probe(). Fixes: 248122212f68 ("net: mvpp2: use device_*/fwnode_* APIs instead of of_*") Cc: Marcin Wojtas Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit a100243d95a60d74ae9bb9df1f5f2192e9aed6a7 Author: Cong Wang Date: Sat May 8 11:00:33 2021 -0700 rtnetlink: avoid RCU read lock when holding RTNL When we call af_ops->set_link_af() we hold a RCU read lock as we retrieve af_ops from the RCU protected list, but this is unnecessary because we already hold RTNL lock, which is the writer lock for protecting rtnl_af_ops, so it is safer than RCU read lock. Similar for af_ops->validate_link_af(). This was not a problem until we begin to take mutex lock down the path of ->set_link_af() in __ipv6_dev_mc_dec() recently. We can just drop the RCU read lock there and assert RTNL lock. Reported-and-tested-by: syzbot+7d941e89dd48bcf42573@syzkaller.appspotmail.com Fixes: 63ed8de4be81 ("mld: add mc_lock for protecting per-interface mld data") Tested-by: Taehee Yoo Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 3f8fca5d43357ab3ae678d908ac3c74e07503f0d Merge: 48de7c0c1c922 a53935674563f Author: David S. Miller Date: Mon May 10 14:29:18 2021 -0700 Merge branch 'qca_spi-sync' Stefan Wahren says: ==================== net: qca_spi: Improve sync handling This small patch series contains some improvements of the sync handling. This was discovered while the QCA7000 was doing SLAC (Signal Level Attenuation Characterization). ==================== Signed-off-by: David S. Miller commit a53935674563f60d8e22ca88ab607dac89fb353d Author: Stefan Wahren Date: Sat May 8 14:36:35 2021 +0200 net: qca_spi: Introduce stat about bad signature In order to identify significant signature issues add a new stat counter, which increases on bad signature values that causes a sync loss. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit 6e03f3ff29c1b479cd10cab0d1c4530bafad601c Author: Stefan Wahren Date: Sat May 8 14:36:34 2021 +0200 net: qca_spi: Avoid re-sync for single signature error Setting a new network key would cause a reset of the QCA7000. Usually the driver only notice the SPI interrupt and a single signature error. So avoid the whole re-sync process (possible packet loss, transmit queue stop and no carrier for at least 1 second) in this case. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit b76078df15935b54c353eb0461c95a6eaf73c7ca Author: Stefan Wahren Date: Sat May 8 14:36:33 2021 +0200 net: qca_spi: Avoid reading signature three times in a row There is no need to read the signature three times. So bail out in case the second check failed. Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller commit 48de7c0c1c9225b478c602184be8e00b92b35c61 Author: Yang Li Date: Sat May 8 18:03:05 2021 +0800 neighbour: Remove redundant initialization of 'bucket' Integer variable 'bucket' is being initialized however this value is never read as 'bucket' is assigned zero in for statement. Remove the redundant assignment. Cleans up clang warning: net/core/neighbour.c:3144:6: warning: Value stored to 'bucket' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: David S. Miller commit d2792e91de2bedf829828b091720f0f7920719ed Author: Yejune Deng Date: Sat May 8 10:27:07 2021 +0800 net: openvswitch: Remove unnecessary skb_nfct() There is no need add 'if (skb_nfct(skb))' assignment, the nf_conntrack_put() would check it. Signed-off-by: Yejune Deng Signed-off-by: David S. Miller commit 49ec114a6e62d8d320037ce71c1aaf9650b3cafd Author: Tetsuo Handa Date: Mon Apr 12 22:45:50 2021 +0900 smackfs: restrict bytes count in smk_set_cipso() Oops, I failed to update subject line. From 07571157c91b98ce1a4aa70967531e64b78e8346 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa Date: Mon, 12 Apr 2021 22:25:06 +0900 Subject: [PATCH] smackfs: restrict bytes count in smk_set_cipso() Commit 7ef4c19d245f3dc2 ("smackfs: restrict bytes count in smackfs write functions") missed that count > SMK_CIPSOMAX check applies to only format == SMK_FIXED24_FMT case. Reported-by: syzbot Signed-off-by: Tetsuo Handa Signed-off-by: Casey Schaufler commit 2e08fb550a2d1017052685a27691911a633c1771 Author: Xiong Zhenwu Date: Thu Mar 18 04:04:31 2021 -0700 security/smack/: fix misspellings using codespell tool A typo is found out by codespell tool in 383th line of smackfs.c: $ codespell ./security/smack/ ./smackfs.c:383: numer ==> number Fix a typo found by codespell. Signed-off-by: Xiong Zhenwu Signed-off-by: Casey Schaufler commit 208d8b9d26f5fd0f7c0fcaa460873bbd6b5bebfa Author: Lyude Paul Date: Fri May 7 17:42:09 2021 -0400 drm/dp: Fix bogus DPCD version check in drm_dp_read_downstream_info() Ville pointed this out to me when fixing some issues in drm_dp_read_downstream_info() - the DPCD version check here is bogus as there's no DisplayPort versions prior to 1.0. The original code from i915 that this was extracted from actually did: dpcd[DP_DPCD_REV] == DP_DPCD_REV_10 Which is correct, and somehow got missed when extracting this function. So let's fix this. Note that as far as I'm aware, I don't think this fixes any actual issues users are hitting. Signed-off-by: Lyude Paul Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210507214209.554866-1-lyude@redhat.com commit ed26297d14b7fbfd3a5975987b4e73ef26b97fbb Author: Wan Jiabing Date: Wed Apr 14 20:17:26 2021 +0800 scsi: qla4xxx: Simplify conditional Fix the following coccicheck warning: ./drivers/scsi/qla4xxx/ql4_83xx.c:475:23-25: WARNING !A || A && B is equivalent to !A || B Link: https://lore.kernel.org/r/20210414121726.12503-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Martin K. Petersen commit fbdfd5163939eed784001c0920c26e461b4bfb42 Author: ching Huang Date: Fri Apr 16 11:58:02 2021 +0800 scsi: arcmsr: Update driver version to v1.50.00.04-20210414 Update driver version to v1.50.00.04-20210414. Link: https://lore.kernel.org/r/1ca5474a5c6fea59bf13cdf84f7bd17f0b20f562.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 5b8644968d2ca85abb785e83efec36934974b0c2 Author: ching Huang Date: Fri Apr 16 11:44:57 2021 +0800 scsi: arcmsr: Fix the wrong CDB payload report to IOP This patch fixes the wrong CDB payload report to IOP. Link: https://lore.kernel.org/r/d2c97df3c817595c6faf582839316209022f70da.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 311e87b70913e6ac6f3c6d5816efb8a3e81eb7e6 Author: Shixin Liu Date: Mon Mar 29 17:45:32 2021 +0800 scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Link: https://lore.kernel.org/r/20210329094532.4165147-1-liushixin2@huawei.com Acked-by: Sumit Saxena Signed-off-by: Shixin Liu Signed-off-by: Martin K. Petersen commit 807b31d8e0fce2160683746b54d7f3010a2d3cde Author: Colin Ian King Date: Tue Apr 20 11:49:19 2021 +0100 scsi: megaraid_mbox: Remove redundant initialization of pointer mbox The pointer mbox is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Link: https://lore.kernel.org/r/20210420104919.376734-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unused value") commit 52b2599081144d903e8992063985a607c647258e Author: Colin Ian King Date: Tue Apr 20 11:41:23 2021 +0100 scsi: lpfc: Remove redundant assignment to pointer temp_hdr The pointer tmp_hdr is being assigned a value that is never read, the assignment is redundant and can be removed. Link: https://lore.kernel.org/r/20210420104123.376420-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Reviewed-by: James Smart Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 1b3babe200498bfd4426057f07a935b5347077ab Author: Colin Ian King Date: Fri Apr 16 10:47:13 2021 +0100 scsi: 3w-9xxx: Move * operator to clean up code style warning Checkpatch is warning that char* text sould be char *text to match the coding style. Fix this. Link: https://lore.kernel.org/r/20210416094713.2033212-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit cdcda4651d9ffa874689b3eac330be6d8f020960 Author: Randy Dunlap Date: Sun Apr 18 13:32:59 2021 -0700 scsi: message: fusion: Documentation cleanup Fix kernel-doc warnings, spellos, and typos. ../drivers/message/fusion/mptsas.c:432: warning: Function parameter or member 'sas_address' not described in 'mptsas_find_portinfo_by_sas_address' ../drivers/message/fusion/mptsas.c:432: warning: Excess function parameter 'handle' description in 'mptsas_find_portinfo_by_sas_address' ../drivers/message/fusion/mptsas.c:581: warning: Function parameter or member 'slot' not described in 'mptsas_add_device_component' ../drivers/message/fusion/mptsas.c:581: warning: Function parameter or member 'enclosure_logical_id' not described in 'mptsas_add_device_component' ../drivers/message/fusion/mptsas.c:678: warning: Function parameter or member 'starget' not described in 'mptsas_add_device_component_starget_ir' ../drivers/message/fusion/mptsas.c:678: warning: Excess function parameter 'channel' description in 'mptsas_add_device_component_starget_ir' ../drivers/message/fusion/mptsas.c:678: warning: Excess function parameter 'id' description in 'mptsas_add_device_component_starget_ir' ../drivers/message/fusion/mptsas.c:990: warning: Function parameter or member 'ioc' not described in 'mptsas_find_vtarget' ../drivers/message/fusion/mptsas.c:990: warning: Function parameter or member 'channel' not described in 'mptsas_find_vtarget' ../drivers/message/fusion/mptsas.c:990: warning: Function parameter or member 'id' not described in 'mptsas_find_vtarget' ../drivers/message/fusion/mptsas.c:990: warning: expecting prototype for csmisas_find_vtarget(). Prototype was for mptsas_find_vtarget() instead ../drivers/message/fusion/mptsas.c:1064: warning: Function parameter or member 'ioc' not described in 'mptsas_target_reset' ../drivers/message/fusion/mptsas.c:1064: warning: Function parameter or member 'channel' not described in 'mptsas_target_reset' ../drivers/message/fusion/mptsas.c:1064: warning: Function parameter or member 'id' not described in 'mptsas_target_reset' ../drivers/message/fusion/mptsas.c:1135: warning: Function parameter or member 'ioc' not described in 'mptsas_target_reset_queue' ../drivers/message/fusion/mptsas.c:1135: warning: Function parameter or member 'sas_event_data' not described in 'mptsas_target_reset_queue' ../drivers/message/fusion/mptsas.c:1217: warning: Function parameter or member 'mf' not described in 'mptsas_taskmgmt_complete' ../drivers/message/fusion/mptsas.c:1217: warning: Function parameter or member 'mr' not described in 'mptsas_taskmgmt_complete' ../drivers/message/fusion/mptsas.c:1311: warning: Function parameter or member 'ioc' not described in 'mptsas_ioc_reset' ../drivers/message/fusion/mptsas.c:1311: warning: Function parameter or member 'reset_phase' not described in 'mptsas_ioc_reset' ../drivers/message/fusion/mptsas.c:1311: warning: expecting prototype for mptscsih_ioc_reset(). Prototype was for mptsas_ioc_reset() instead ../drivers/message/fusion/mptsas.c:1951: warning: expecting prototype for mptsas_mptsas_eh_timed_out(). Prototype was for mptsas_eh_timed_out() instead ../drivers/message/fusion/mptsas.c:3623: warning: Function parameter or member 'fw_event' not described in 'mptsas_send_expander_event' ../drivers/message/fusion/mptsas.c:3623: warning: Excess function parameter 'ioc' description in 'mptsas_send_expander_event' ../drivers/message/fusion/mptsas.c:3623: warning: Excess function parameter 'expander_data' description in 'mptsas_send_expander_event' ../drivers/message/fusion/mptsas.c:4010: warning: Excess function parameter 'sas_address' description in 'mptsas_scan_sas_topology' ../drivers/message/fusion/mptsas.c:4783: warning: Function parameter or member 'issue_reset' not described in 'mptsas_issue_tm' ../drivers/message/fusion/mptsas.c:4856: warning: Function parameter or member 'fw_event' not described in 'mptsas_broadcast_primitive_work' ../drivers/message/fusion/mptsas.c:4856: warning: Excess function parameter 'work' description in 'mptsas_broadcast_primitive_work' mptsas.c:984: warning: missing initial short description on line: * csmisas_find_vtarget mptsas.c:993: warning: expecting prototype for csmisas_find_vtarget(). Prototype was for mptsas_find_vtarget() instead mptsas.c:1053: warning: missing initial short description on line: * mptsas_target_reset mptsas.c:1057: warning: contents before sections mptsas.c:1125: warning: missing initial short description on line: * mptsas_target_reset_queue mptsas.c:1131: warning: contents before sections mptsas.c:1308: warning: missing initial short description on line: * mptsas_ioc_reset Link: https://lore.kernel.org/r/20210418203259.835-1-rdunlap@infradead.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 2910a4a9e90a5853f38766b2e8d025e3bb26d12b Author: Randy Dunlap Date: Sun Apr 18 13:32:46 2021 -0700 scsi: mpt3sas: Documentation cleanup Fix kernel-doc warnings, spellos, and typos. drivers/scsi/mpt3sas/mpt3sas_base.c:5430: warning: Excess function parameter 'ct' description in '_base_allocate_pcie_sgl_pool' drivers/scsi/mpt3sas/mpt3sas_base.c:5493: warning: Excess function parameter 'ctr' description in '_base_allocate_chain_dma_pool' mpt3sas_base.c:1362: warning: missing initial short description on line: * _base_display_reply_info - mpt3sas_base.c:2151: warning: contents before sections mpt3sas_base.c:2314: warning: missing initial short description on line: * base_make_prp_nvme - Link: https://lore.kernel.org/r/20210418203246.782-1-rdunlap@infradead.org Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 6235bef6f990d31d8ace9c5af337c22b888b81e3 Author: Yang Yingliang Date: Fri Apr 2 17:25:17 2021 +0800 scsi: target: iscsi: Switch to kmemdup_nul() Use kmemdup_nul() helper instead of open-coding to simplify the code. Link: https://lore.kernel.org/r/20210402092517.2445595-1-yangyingliang@huawei.com Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit 1ee2753422349723d27009f2f973d03289d430ab Author: Jason Yan Date: Tue Mar 30 19:47:27 2021 +0800 scsi: core: Treat device offline as a failure When a SCSI device is offline a MODE SENSE command will return a result with only DID_NO_CONNECT set. In sd_read_write_protect_flag() only the status byte of the result is checked. Despite a returned status of DID_NO_CONNECT the command is considered successful and we read sdkp->write_prot from a buffer containing garbage. Modify scsi_status_is_good() to treat DID_NO_CONNECT as a failure case. Link: https://lore.kernel.org/r/20210330114727.234467-1-yanaijie@huawei.com Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit d30e82a6461baf709f8d850ce58cdf71095e0c66 Author: Corentin Labbe Date: Wed May 5 20:28:15 2021 +0000 dt-bindings: net: Convert mdio-gpio to yaml Converts net/mdio-gpio.txt to yaml Reviewed-by: Andrew Lunn Signed-off-by: Corentin Labbe Link: https://lore.kernel.org/r/20210505202815.2665920-1-clabbe@baylibre.com Signed-off-by: Rob Herring commit 2e64ad1ca775b06a5cf87d5b0b83a6e60ecbfb1c Author: Krzysztof Kozlowski Date: Tue May 4 08:07:42 2021 -0400 dt-bindings: add vendor prefix for Insignal Ltd Add vendor prefix for Insignal Ltd (http://www.insignal.co.kr). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210504120742.12922-1-krzysztof.kozlowski@canonical.com Signed-off-by: Rob Herring commit 57d4ef85fc33d40856d0a64d38ccf2b9030805d0 Author: Geert Uytterhoeven Date: Tue May 4 11:12:31 2021 +0200 dt-bindings: clock: renesas,r9a06g032-sysctrl: Convert to json-schema Convert the Renesas RZ/N1D (R9A06G032) System Controller (SYSCTRL) Device Tree binding documentation to json-schema. Drop the consumer example, as it doesn't belong here. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/24d1bd7c4c46747f4e2828974c2e2e48e778bff8.1620119439.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit aef654741de377526d91fb24926348dc2e994822 Author: Geert Uytterhoeven Date: Tue May 4 11:10:20 2021 +0200 dt-bindings: clk: emev2: Convert to json-schema Convert the Renesas EMMA Mobile EV2 System Management Unit (SMU) Device Tree binding documentation to json-schema. Drop the separate provider examples, as they mostly duplicate the global example. Drop the consumer example, as it doesn't belong here. Update the global example to match reality. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/526e1a412145a0fcc5a43dcf6de5c580301017cb.1620119350.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 4d92239b6517e705433d89c23d792c7dcf35235e Author: Geert Uytterhoeven Date: Tue May 4 11:09:00 2021 +0200 dt-bindings: power: sysc-rmobile: Convert to json-schema Convert the Renesas R-Mobile System Controller (SYSC) Device Tree binding documentation to json-schema. Document missing properties. Drop consumer example, as it does not belong here. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/22150cfd2ef9d57e84eb53a5dfed8379627a9423.1620119210.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 4fa9ee2e65ece14f040cc3596525c9e8d6a395eb Author: Geert Uytterhoeven Date: Thu Apr 29 14:46:45 2021 +0200 dt-bindings: pwm: renesas,pwm-rcar: Make power-domains and resets required The "power-domains" property is present on all supported platforms. The "resets" property is present on all but R-Car Gen1. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/16e82b5019b913f9a63e312166a37ef67266d425.1619700364.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit a869742ff51e5eb6aeaa43151ad69281f0d3c98a Author: Geert Uytterhoeven Date: Thu Apr 29 14:45:03 2021 +0200 dt-bindings: ata: renesas,rcar-sata: Make power-domains and resets required The "power-domains" property is present on all supported platforms. The "resets" property is present on all but R-Car H1. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/ca35d7d837b155c69232a1c25060737b4c87720f.1619700260.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit be78329717e47649789fd4604960c6fc1a859eb1 Author: Nishanth Menon Date: Mon Apr 26 11:40:08 2021 -0500 dt-bindings: arm: firmware: Convert linaro,optee-tz to json schema Convert linaro,optee-tz to json schema format for better documentation and error checks. NOTE: This change does introduce a stricter naming convention for optee nodes. Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210426164008.20000-1-nm@ti.com Signed-off-by: Rob Herring commit 5a9652f6994eb7a3424de3e206860dd3bef8b819 Author: Nishanth Menon Date: Mon Apr 26 10:54:57 2021 -0500 dt-bindings: arm: keystone: Convert ti,sci to json schema Convert the ti,sci to json schema for better checks and documentation. NOTE: This change does introduce a stricter naming convention for TI-SCI controller nodes. Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210426155457.21221-5-nm@ti.com Signed-off-by: Rob Herring commit fda55c7256fea589008e62b7a24099ac98f33967 Author: Nishanth Menon Date: Mon Apr 26 10:54:56 2021 -0500 dt-bindings: soc: ti: Convert ti,sci-pm-domain to json schema Convert the ti,sci-pm-domain to json schema for better checks and documentation. Differences being: - Drop consumer example as they are documented in the corresponding bindings themselves. - Drop phandle description for reset consumer or cell definition as it is redundant. Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring Reviewed-by: Tero Kristo Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210426155457.21221-4-nm@ti.com Signed-off-by: Rob Herring commit a7dbfa6f3877183d6d263ff11184d17b161f61cb Author: Nishanth Menon Date: Mon Apr 26 10:54:55 2021 -0500 dt-bindings: clock: Convert ti,sci-clk to json schema Convert the ti,sci-clk to json schema for better checks and documentation. Differences being: - Drop consumer example as they are documented in the corresponding bindings themselves. - Standardize the node name as clock-controller rather than clocks as it is more appropriate. - Drop phandle description for clock-cells as it is redundant. Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210426155457.21221-3-nm@ti.com Signed-off-by: Rob Herring commit 9a81b8cbc24599bcd009b0b9113e440e9658705d Author: Nishanth Menon Date: Mon Apr 26 10:54:54 2021 -0500 dt-bindings: reset: Convert ti,sci-reset to json schema Convert the ti,sci-reset to json schema for better checks and documentation. Differences being: - Drop consumer example as they are documented in the corresponding bindings themselves. - Drop phandle description for reset consumer or cell definition as it is redundant. Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring Reviewed-by: Tero Kristo Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210426155457.21221-2-nm@ti.com Signed-off-by: Rob Herring commit 4fc81bc88ad9d6bac90d169382c6045c47d48648 Author: Charles Keepax Date: Mon May 10 14:13:57 2021 +0100 ASoC: cs53l30: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-11-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit e2bb1077cee4d13dc85d53d76deac73b24d7f845 Author: Charles Keepax Date: Mon May 10 14:13:56 2021 +0100 ASoC: cs43130: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-10-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 26495252fe0d1ebf548c02cb63b51abae5d5e5a3 Author: Charles Keepax Date: Mon May 10 14:13:55 2021 +0100 ASoC: cs42l73: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-9-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 0a0eb567e1d43cb87e9740c8e417d6fcff061582 Author: Charles Keepax Date: Mon May 10 14:13:54 2021 +0100 ASoC: cs42l42: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 1a46b7b82df57b6b6a4e891cdbb2de1cf818a43b Author: Charles Keepax Date: Mon May 10 14:13:53 2021 +0100 ASoC: cs35l35: Correct errata handling Currently the check of errata_chk will always evaluate to false since the values tested don't come under the mask used. A shift of the field is missing, add this. Also there is an error in the values tested, they don't match the comment and the value 0x3 is not a valid value for the field in question. Update the value to match the comment. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 60ba916d87600684a1e127b484e1c407c355caad Author: Charles Keepax Date: Mon May 10 14:13:52 2021 +0100 ASoC: cs35l35: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 8cb9b001635cfa0389ec54eb511cb459968ad1d7 Author: Charles Keepax Date: Mon May 10 14:13:51 2021 +0100 ASoC: cs35l34: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 77908dbecdb6be2e875ced738b5c036bb83e8d78 Author: Charles Keepax Date: Mon May 10 14:13:50 2021 +0100 ASoC: cs35l33: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 283160f1419ddebc8779c3488e800cd30b31289d Author: Charles Keepax Date: Mon May 10 14:13:49 2021 +0100 ASoC: cs35l32: Minor error paths fixups Correct some unchecked re-allocations of ret whilst reading the device ID and ensure the hardware state is returned to off on the error paths. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit c8b198ed31000a48f507bcea3828374b75418a2f Author: Charles Keepax Date: Mon May 10 14:13:48 2021 +0100 ASoC: cirrus: Add helper function for reading the device ID Many of the older Cirrus devices share very similar code for reading the device ID, and frequently this code is generating cppcheck warnings such as: sound/soc/codecs/cs42l42.c:1886:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = regmap_read(cs42l42->regmap, CS42L42_DEVID_CD, ®); Add a small helper function that older Cirrus devices can use to read the device ID, which should help correct these issues. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210510131357.17170-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 6f64aa5746d254f2b9b94b837b7862549f2565a0 Author: Corentin Labbe Date: Fri Apr 30 18:36:51 2021 +0000 dt-bindings: dma: convert arm-pl08x to yaml Converts dma/arm-pl08x.txt to yaml. In the process, I add an example for the faraday variant. Signed-off-by: Corentin Labbe Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210430183651.919317-1-clabbe@baylibre.com Signed-off-by: Vinod Koul commit fd0d8d85f7230052e638a56d1bfea170c488e6bc Author: Doyle, Patrick Date: Tue Apr 6 10:47:08 2021 +0900 mtd: nand: bbt: Fix corner case in bad block table handling In the unlikely event that both blocks 10 and 11 are marked as bad (on a 32 bit machine), then the process of marking block 10 as bad stomps on cached entry for block 11. There are (of course) other examples. Signed-off-by: Patrick Doyle Reviewed-by: Richard Weinberger Signed-off-by: Yoshio Furuyama [: Fixed the title] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/774a92693f311e7de01e5935e720a179fb1b2468.1616635406.git.ytc-mb-yfuruyama7@kioxia.com commit b63ecaea97aac3020be0e5736253e88cefbc950b Author: Derek Fang Date: Mon May 3 11:17:32 2021 +0800 ASoC: rt1019: Add non_legacy_dai_naming config Register the codec dai name as 'rt1019-aif' by adding non_legacy_dai_naming configuration. Signed-off-by: Derek Fang Link: https://lore.kernel.org/r/20210503031732.22035-1-derek.fang@realtek.com Signed-off-by: Mark Brown commit 66df9477bd35dd851e9803e5fdbbf40ee4598af5 Author: Vitaly Rodionov Date: Mon Apr 26 16:53:03 2021 +0100 ASoC: cs42l42: Add support for ACPI table match entry Adding support for ACPI-based systems. Signed-off-by: Vitaly Rodionov Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210426155303.853236-3-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit ab78322a0dc8e5e472ff66ac7e18c94acc17587f Author: Richard Fitzgerald Date: Mon Apr 26 16:53:02 2021 +0100 ASoC: cs42l42: Use device_property API instead of of_property Use the device_property APIs so that the code will work on devicetree and ACPI systems. Signed-off-by: Richard Fitzgerald Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210426155303.853236-2-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit c26a5289e86597e8826ad3093ad71ca0d5d9510a Author: Lucas Tanure Date: Mon Apr 26 16:53:01 2021 +0100 ASoC: cs42l42: Add support for set_jack calls Replace the internal jack creation by set_jack call, so users can map buttons in their machine driver Also only enable jack detection IRQ after set_jack call Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210426155303.853236-1-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 87b42abae99d3d851aec64cd4d0f7def8113950e Author: Stephen Boyd Date: Sat May 8 00:51:51 2021 -0700 ASoC: rt5682: Implement remove callback Let's implement a remove callback for this driver that's similar to the shutdown hook, but also disables the regulators before they're put by devm code. Cc: Jairaj Arava Cc: Sathyanarayana Nujella Cc: Pierre-Louis Bossart Cc: Shuming Fan Cc: Ranjani Sridharan Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210508075151.1626903-2-swboyd@chromium.org Signed-off-by: Mark Brown commit 47bcb1c7108363418cd578283333d72e310dfeaa Author: Stephen Boyd Date: Sat May 8 00:51:50 2021 -0700 ASoC: rt5682: Disable irq on shutdown We cancel the work queues, and reset the device on shutdown, but the irq isn't disabled so the work queues could be queued again. Let's disable the irq during shutdown so that we don't have to worry about this device trying to do anything anymore. This fixes a problem seen where the i2c bus is shutdown at reboot but this device irq still comes in and tries to make another i2c transaction when the bus doesn't work. Cc: Jairaj Arava Cc: Sathyanarayana Nujella Cc: Pierre-Louis Bossart Cc: Shuming Fan Cc: Ranjani Sridharan Fixes: 45a2702ce109 ("ASoC: rt5682: Fix panic in rt5682_jack_detect_handler happening during system shutdown") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210508075151.1626903-1-swboyd@chromium.org Signed-off-by: Mark Brown commit 58f01c7fc81baced84f237554d56847e17b5d730 Author: Tom Rix Date: Fri Apr 30 07:21:17 2021 -0700 ASoC: codecs: lpass-wsa-macro: handle unexpected input Static analysis reports this problem lpass-wsa-macro.c:1732:6: warning: Array subscript is undefined if (wsa->ec_hq[ec_tx]) { ^~~~~~~~~~~~~~~~~ The happens because 'ec_tx' is never initialized and there is no default in switch statement that sets ec_tx. Add a default case that returns an error before the array is accessed. Signed-off-by: Tom Rix Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210430142117.3272772-1-trix@redhat.com Signed-off-by: Mark Brown commit 1d122dd3b168f55e2e29982cff80f1c15f66ef26 Author: Jiapeng Chong Date: Thu May 6 18:58:55 2021 +0800 ASoC: rt286: Remove redundant assignment to d_len_code Variable d_len_code is set to zero, but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: sound/soc/codecs/rt286.c:728:2: warning: Value stored to 'd_len_code' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1620298735-31708-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 16f2a3cdaacaa7c077e238df45e4d38d6bc0a6c5 Author: H. Nikolaus Schaller Date: Sun May 2 15:08:55 2021 +0200 ASoC: jz4740-i2s: fix function name This driver is not related to I2C protocol. s/_i2c_/_i2s_/ Signed-off-by: H. Nikolaus Schaller Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/56f9c8518870263698b00d10de4821d2dc8932be.1619960935.git.hns@goldelico.com Signed-off-by: Mark Brown commit 778aaefb8e864fc61f850539ea479554dd4caea1 Author: Arnd Bergmann Date: Sat May 8 00:07:52 2021 +0200 asm-generic: unaligned always use struct helpers As found by Vineet Gupta and Linus Torvalds, gcc has somewhat unexpected behavior when faced with overlapping unaligned pointers. The kernel's unaligned/access-ok.h header technically invokes undefined behavior that happens to usually work on the architectures using it, but if the compiler optimizes code based on the assumption that undefined behavior doesn't happen, it can create output that actually causes data corruption. A related problem was previously found on 32-bit ARMv7, where most instructions can be used on unaligned data, but 64-bit ldrd/strd causes an exception. The workaround was to always use the unaligned/le_struct.h helper instead of unaligned/access-ok.h, in commit 1cce91dfc8f7 ("ARM: 8715/1: add a private asm/unaligned.h"). The same solution should work on all other architectures as well, so remove the access-ok.h variant and use the other one unconditionally on all architectures, picking either the big-endian or little-endian version. With this, the arm specific header can be removed as well, and the only file including linux/unaligned/access_ok.h gets moved to including the normal file. Fortunately, this made almost no difference to the object code produced by gcc-11. On x86, s390, powerpc, and arc, the resulting binary appears to be identical to the previous version, while on arm64 and m68k there are minimal differences that looks like an optimization pass went into a different direction, usually using fewer stack spills on the new version. Signed-off-by: Arnd Bergmann Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363 commit 0652035a57945e14e611dafae2ec5b46a05bc1d1 Author: Arnd Bergmann Date: Sat May 8 00:07:51 2021 +0200 asm-generic: unaligned: remove byteshift helpers In theory, compilers should be able to work this out themselves so we can use a simpler version based on the swab() helpers. I have verified that this works on all supported compiler versions (gcc-4.9 and up, clang-10 and up). Looking at the object code produced by gcc-11, I found that the impact is mostly a change in inlining decisions that lead to slightly larger code. In other cases, this version produces explicit byte swaps in place of separate byte access, or comparing against pre-swapped constants. While the source code is clearly simpler, I have not seen an indication of the new version actually producing better code on Arm, so maybe we want to skip this after all. From what I can tell, gcc recognizes the byteswap pattern in the byteshift.h header and can turn it into explicit instructions, but it does not turn a __builtin_bswap32() back into individual bytes when that would result in better output, e.g. when storing a byte-reversed constant. Suggested-by: Linus Torvalds Signed-off-by: Arnd Bergmann commit f12d3ff3f41cc92f67cfaf29697685e8834fe4a4 Author: Arnd Bergmann Date: Sat May 8 00:07:50 2021 +0200 powerpc: use linux/unaligned/le_struct.h on LE power7 Little-endian POWER7 kernels disable CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS because that is not supported on the hardware, but the kernel still uses direct load/store for explicti get_unaligned()/put_unaligned(). I assume this is a mistake that leads to power7 having to trap and fix up all these unaligned accesses at a noticeable performance cost. The fix is completely trivial, just remove the file and use the generic version that gets it right. Signed-off-by: Arnd Bergmann commit 3aec1db05d1ba631311beca4715655591a9e17d5 Author: Arnd Bergmann Date: Sat May 8 00:07:49 2021 +0200 m68k: select CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS All supported CPUs other than the old dragonball and in theory other 68000 derivatives use the include/linux/unaligned/access_ok.h implementation for accessing unaligned variables, so presumably this works everywhere. However, m68k never selects CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, so none of the other conditionals in the kernel get the optimized implementation. Select this based on CPU_HAS_NO_UNALIGNED to make the two settings always match, and then use the generic version of the header. Signed-off-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven commit 94528b70781a4c63db9e1309d4cdbcaef2387904 Author: Arnd Bergmann Date: Sat May 8 00:07:48 2021 +0200 sh: remove unaligned access for sh4a Unlike every other architecture, sh4a uses an inline asm implementation for get_unaligned(). I have shown that this produces better object code than the asm-generic version. However, there are very few users of arch/sh/ overall, and most of those seem to use sh4 rather than sh4a CPU cores, so it seems not worth keeping the complexity in the architecture independent code. Change over to the generic version to allow simplifying that in a follow-up patch. If there are sh4a users that want the best performance, it would probably be best to add support for the movua instruction in gcc itself, as this would not just help get_unaligned() callers but any code that accesses a __packed variable in user space or kernel. Signed-off-by: Arnd Bergmann commit 33f9f3c33e9336e5f49501c9632584c3d1f4f3a5 Author: Dave Jiang Date: Sun May 9 17:38:25 2021 -0700 dmaengine: idxd: remove devm allocation for idxd->int_handles Allocation of idxd->int_handles was merged incorrectly for the 5.13 merge window. The devm_kcalloc should've been regular kcalloc due to devm_* removal series for the driver. Fixes: eb15e7154fbf ("dmaengine: idxd: add interrupt handle request and release support") Reported-by: Dan Carpenter Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/162060710518.130816.11349798049329202863.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit bf067edf5d2f5b2948ee7197974a719aae3e526c Author: Arnd Bergmann Date: Sat May 8 00:07:47 2021 +0200 openrisc: always use unaligned-struct header openrisc is the only architecture using the linux/unaligned/*memmove infrastructure. There is a comment saying that this version is more efficient, but this was added in 2011 before the openrisc gcc port was merged upstream. I checked a couple of files to see what the actual difference is with the mainline gcc (9.4 and 11.1), and found that the generic header seems to produce better code now, regardless of the gcc version. Specifically, the be_memmove leads to allocating a stack slot and copying the data one byte at a time, then reading the whole word from the stack: 00000000 : 0: 9c 21 ff f4 l.addi r1,r1,-12 4: d4 01 10 04 l.sw 4(r1),r2 8: 8e 63 00 00 l.lbz r19,0(r3) c: 9c 41 00 0c l.addi r2,r1,12 10: 8e 23 00 01 l.lbz r17,1(r3) 14: db e2 9f f4 l.sb -12(r2),r19 18: db e2 8f f5 l.sb -11(r2),r17 1c: 8e 63 00 02 l.lbz r19,2(r3) 20: 8e 23 00 03 l.lbz r17,3(r3) 24: d4 01 48 08 l.sw 8(r1),r9 28: db e2 9f f6 l.sb -10(r2),r19 2c: db e2 8f f7 l.sb -9(r2),r17 30: 85 62 ff f4 l.lwz r11,-12(r2) 34: 85 21 00 08 l.lwz r9,8(r1) 38: 84 41 00 04 l.lwz r2,4(r1) 3c: 44 00 48 00 l.jr r9 40: 9c 21 00 0c l.addi r1,r1,12 while the be_struct version reads each byte into a register and does a shift to the right position: 00000000 : 0: 9c 21 ff f8 l.addi r1,r1,-8 4: 8e 63 00 00 l.lbz r19,0(r3) 8: aa 20 00 18 l.ori r17,r0,0x18 c: e2 73 88 08 l.sll r19,r19,r17 10: 8d 63 00 01 l.lbz r11,1(r3) 14: aa 20 00 10 l.ori r17,r0,0x10 18: e1 6b 88 08 l.sll r11,r11,r17 1c: e1 6b 98 04 l.or r11,r11,r19 20: 8e 23 00 02 l.lbz r17,2(r3) 24: aa 60 00 08 l.ori r19,r0,0x8 28: e2 31 98 08 l.sll r17,r17,r19 2c: d4 01 10 00 l.sw 0(r1),r2 30: d4 01 48 04 l.sw 4(r1),r9 34: 9c 41 00 08 l.addi r2,r1,8 38: e2 31 58 04 l.or r17,r17,r11 3c: 8d 63 00 03 l.lbz r11,3(r3) 40: e1 6b 88 04 l.or r11,r11,r17 44: 84 41 00 00 l.lwz r2,0(r1) 48: 85 21 00 04 l.lwz r9,4(r1) 4c: 44 00 48 00 l.jr r9 50: 9c 21 00 08 l.addi r1,r1,8 According to Stafford Horne, the new version should in fact perform better. In the trivial example, the struct version is a few instructions longer, but building a whole kernel shows an overall reduction in code size, presumably because it now has to manage fewer stack slots: text data bss dec hex filename 4792010 181480 82324 5055814 4d2546 vmlinux-unaligned-memmove 4790642 181480 82324 5054446 4d1fee vmlinux-unaligned-struct Remove the memmove version completely and let openrisc use the same code as everyone else, as a simplification. Signed-off-by: Arnd Bergmann Acked-by: Stafford Horne commit 637be9183e0475c430fc77162c222bcaab887989 Author: Arnd Bergmann Date: Sat May 8 00:07:46 2021 +0200 asm-generic: use asm-generic/unaligned.h for most architectures There are several architectures that just duplicate the contents of asm-generic/unaligned.h, so change those over to use the file directly, to make future modifications easier. The exceptions are: - arm32 sets HAVE_EFFICIENT_UNALIGNED_ACCESS, but wants the unaligned-struct version - ppc64le disables HAVE_EFFICIENT_UNALIGNED_ACCESS but includes the access-ok version - most m68k also uses the access-ok version without setting HAVE_EFFICIENT_UNALIGNED_ACCESS. - sh4a has a custom inline asm version - openrisc is the only one using the memmove version that generally leads to worse code. Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven commit fc1e985b67f9f318bc5797c9370715f5d020dac3 Author: Philipp Zabel Date: Tue Jul 21 11:20:30 2020 +0200 drm/imx: ipuv3-plane: add color encoding and range properties Add COLOR_ENCODING and COLOR_RANGE plane properties and use them to control the DP CSC matrix. Signed-off-by: Philipp Zabel commit 4618cb7903d6e37690fff85a47126a4917e06495 Author: Philipp Zabel Date: Tue Jul 21 11:52:18 2020 +0200 gpu: ipu-v3: Add Rec.709 limited range support to DP Add YCbCr encoding and quantization range parameters to ipu_dp_setup_channel() and configure the CSC DP matrix accordingly. Signed-off-by: Philipp Zabel commit 17b9a94656fe19aef3647c4f93d93be51697ceb1 Author: Lucas Stach Date: Mon May 10 16:59:27 2021 +0200 drm/imx: ipuv3-plane: fix PRG modifiers after drm managed resource conversion The conversion to drm managed resources introduced two bugs: the plane is now always initialized with the linear-only list, while the list with the Vivante GPU modifiers should have been used when the PRG/PRE engines are present. This masked another issue, as ipu_plane_format_mod_supported() is now called before the private plane data is set up, so if a non-linear modifier is supplied in the plane modifier list, we run into a NULL pointer dereference checking for the PRG presence. To fix this just remove the check from this function, as we know that it will only be called with a non-linear modifier, if the plane init code has already determined that the PRG/PRE is present. Fixes: 699e7e543f1a ("drm/imx: ipuv3-plane: use drm managed resources") Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210510145927.988661-1-l.stach@pengutronix.de Signed-off-by: Philipp Zabel commit 3cd8015040d7537a6b88e26f36768a90d9247829 Author: Andy Shevchenko Date: Mon May 10 12:56:12 2021 +0300 device property: Retrieve fwnode from of_node via accessor OF provides a specific accessor to retrieve fwnode handle. Use it instead of direct dereferencing. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 85e3b86ed0b7e366b6e50da1ff2511c8758616c7 Author: Christian Brauner Date: Sat May 8 14:15:42 2021 +0200 tests/cgroup: test cgroup.kill Test that the new cgroup.kill feature works as intended. Link: https://lore.kernel.org/r/20210503143922.3093755-5-brauner@kernel.org Cc: Shakeel Butt Cc: Tejun Heo Cc: cgroups@vger.kernel.org Acked-by: Roman Gushchin Signed-off-by: Christian Brauner Signed-off-by: Tejun Heo commit 8075e4f6c9904189ea04a853b5480451ec74e67d Author: Christian Brauner Date: Sat May 8 14:15:41 2021 +0200 tests/cgroup: move cg_wait_for(), cg_prepare_for_wait() as they will be used by the tests for cgroup killing. Link: https://lore.kernel.org/r/20210503143922.3093755-4-brauner@kernel.org Cc: Tejun Heo Cc: cgroups@vger.kernel.org Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Signed-off-by: Christian Brauner Signed-off-by: Tejun Heo commit 0de3103fa2cf9ed07cfde3e4fd578ead5de52047 Author: Christian Brauner Date: Sat May 8 14:15:40 2021 +0200 tests/cgroup: use cgroup.kill in cg_killall() If cgroup.kill file is supported make use of it. Link: https://lore.kernel.org/r/20210503143922.3093755-3-brauner@kernel.org Cc: Tejun Heo Cc: cgroups@vger.kernel.org Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Signed-off-by: Christian Brauner Signed-off-by: Tejun Heo commit 340272b04036f2b833a7094eca5c15e5ed8e184c Author: Christian Brauner Date: Sat May 8 14:15:39 2021 +0200 docs/cgroup: add entry for cgroup.kill Give a brief overview of the cgroup.kill functionality. Link: https://lore.kernel.org/r/20210503143922.3093755-2-brauner@kernel.org Cc: Roman Gushchin Cc: Tejun Heo Cc: cgroups@vger.kernel.org Reviewed-by: Shakeel Butt Signed-off-by: Christian Brauner Signed-off-by: Tejun Heo commit 661ee6280931548f7b3b887ad26a157474ae5ac4 Author: Christian Brauner Date: Sat May 8 14:15:38 2021 +0200 cgroup: introduce cgroup.kill Introduce the cgroup.kill file. It does what it says on the tin and allows a caller to kill a cgroup by writing "1" into cgroup.kill. The file is available in non-root cgroups. Killing cgroups is a process directed operation, i.e. the whole thread-group is affected. Consequently trying to write to cgroup.kill in threaded cgroups will be rejected and EOPNOTSUPP returned. This behavior aligns with cgroup.procs where reads in threaded-cgroups are rejected with EOPNOTSUPP. The cgroup.kill file is write-only since killing a cgroup is an event not which makes it different from e.g. freezer where a cgroup transitions between the two states. As with all new cgroup features cgroup.kill is recursive by default. Killing a cgroup is protected against concurrent migrations through the cgroup mutex. To protect against forkbombs and to mitigate the effect of racing forks a new CGRP_KILL css set lock protected flag is introduced that is set prior to killing a cgroup and unset after the cgroup has been killed. We can then check in cgroup_post_fork() where we hold the css set lock already whether the cgroup is currently being killed. If so we send the child a SIGKILL signal immediately taking it down as soon as it returns to userspace. To make the killing of the child semantically clean it is killed after all cgroup attachment operations have been finalized. There are various use-cases of this interface: - Containers usually have a conservative layout where each container usually has a delegated cgroup. For such layouts there is a 1:1 mapping between container and cgroup. If the container in addition uses a separate pid namespace then killing a container usually becomes a simple kill -9 from an ancestor pid namespace. However, there are quite a few scenarios where that isn't true. For example, there are containers that share the cgroup with other processes on purpose that are supposed to be bound to the lifetime of the container but are not in the same pidns of the container. Containers that are in a delegated cgroup but share the pid namespace with the host or other containers. - Service managers such as systemd use cgroups to group and organize processes belonging to a service. They usually rely on a recursive algorithm now to kill a service. With cgroup.kill this becomes a simple write to cgroup.kill. - Userspace OOM implementations can make good use of this feature to efficiently take down whole cgroups quickly. - The kill program can gain a new kill --cgroup /sys/fs/cgroup/delegated flag to take down cgroups. A few observations about the semantics: - If parent and child are in the same cgroup and CLONE_INTO_CGROUP is not specified we are not taking cgroup mutex meaning the cgroup can be killed while a process in that cgroup is forking. If the kill request happens right before cgroup_can_fork() and before the parent grabs its siglock the parent is guaranteed to see the pending SIGKILL. In addition we perform another check in cgroup_post_fork() whether the cgroup is being killed and is so take down the child (see above). This is robust enough and protects gainst forkbombs. If userspace really really wants to have stricter protection the simple solution would be to grab the write side of the cgroup threadgroup rwsem which will force all ongoing forks to complete before killing starts. We concluded that this is not necessary as the semantics for concurrent forking should simply align with freezer where a similar check as cgroup_post_fork() is performed. For all other cases CLONE_INTO_CGROUP is required. In this case we will grab the cgroup mutex so the cgroup can't be killed while we fork. Once we're done with the fork and have dropped cgroup mutex we are visible and will be found by any subsequent kill request. - We obviously don't kill kthreads. This means a cgroup that has a kthread will not become empty after killing and consequently no unpopulated event will be generated. The assumption is that kthreads should be in the root cgroup only anyway so this is not an issue. - We skip killing tasks that already have pending fatal signals. - Freezer doesn't care about tasks in different pid namespaces, i.e. if you have two tasks in different pid namespaces the cgroup would still be frozen. The cgroup.kill mechanism consequently behaves the same way, i.e. we kill all processes and ignore in which pid namespace they exist. - If the caller is located in a cgroup that is killed the caller will obviously be killed as well. Link: https://lore.kernel.org/r/20210503143922.3093755-1-brauner@kernel.org Cc: Shakeel Butt Cc: Roman Gushchin Cc: Tejun Heo Cc: cgroups@vger.kernel.org Reviewed-by: Shakeel Butt Reviewed-by: Serge Hallyn Acked-by: Roman Gushchin Signed-off-by: Christian Brauner Signed-off-by: Tejun Heo commit 11e3c676683c340966b9467da7d09080e522e181 Author: Liu Ying Date: Fri Mar 26 11:15:09 2021 +0800 drm/imx: ipuv3-plane: Remove two unnecessary export symbols The ipu_plane_disable_deferred() and ipu_planes_assign_pre() functions have not been used by any other modules but only imxdrm itself internally since imxdrm and imx-ipuv3-crtc were merged in one module. So, this patch removes export symbols for the two functions. Fixes: 3d1df96ad468 (drm/imx: merge imx-drm-core and ipuv3-crtc in one module) Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel commit 94dfec48fca756cef90263a03e81f24dae24a5c6 Author: Sebastian Reichel Date: Thu Apr 29 00:29:50 2021 +0200 drm/imx: Add 8 pixel alignment fix Some standard resolutions like 1366x768 do not work properly with i.MX6 SoCs, since the horizontal resolution needs to be aligned to 8 pixels (so 1360x768 or 1368x768 would work). This patch allocates framebuffers allocated to 8 pixels. The extra time required to send the extra pixels are removed from the blank time. In order to expose the correct display size to userspace, the stride is increased without increasing the width. Without this patch systems with this display resolution hang indefinitely during boot up. Suggested-by: Boris Brezillon Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20210428222953.235280-3-sebastian.reichel@collabora.com Signed-off-by: Philipp Zabel commit 58cb138e20296dffe3b2be2beb64e5aa22846b84 Author: Jiapeng Chong Date: Thu May 6 19:00:47 2021 +0800 dmaengine: idxd: Remove redundant variable cdev_ctx Variable cdev_ctx is set to '&ictx[wq->idxd->data->type]' but this value is not used, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/dma/idxd/cdev.c:300:2: warning: Value stored to 'cdev_ctx' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Dave Jiang Link: https://lore.kernel.org/r/1620298847-33127-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul commit 4676be28a46e9b1aef9a1fd24ecc207ebc189c9a Author: Chunfeng Yun Date: Fri May 7 10:11:27 2021 +0800 usb: xhci-mtk: use first-fit for LS/FS Use first-fit instead of best-fit for LS/FS devices under TT, we found that best-fit will consume more bandwidth for some cases. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210507021127.54717-4-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit bb8d7ef68e294ab5cc4be54c966245bf24cb843a Author: Ikjoon Jang Date: Fri May 7 10:11:26 2021 +0800 usb: xhci-mtk: remove unnecessary assignments in periodic TT scheduler Remove unnecessary variables in check_sch_bw(). No functional changes, just for better readability. Signed-off-by: Ikjoon Jang Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210507021127.54717-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit e56e60f7a9d675334d1a796ba6ae31ca94ad4312 Author: Chunfeng Yun Date: Fri May 7 10:11:25 2021 +0800 usb: xhci-mtk: remove unnecessary setting of has_ippc Due to @has_ippc's default value is 0, no need set it again if fail to get ippc base address Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210507021127.54717-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 40ddb76ba0baaa7d62ab563be56c5fa38ec649c7 Author: Chunfeng Yun Date: Fri May 7 10:11:24 2021 +0800 usb: xhci-mtk: use bitfield instead of bool Use bitfield instead of bool in struct Refer to coding-style.rst 17) Using bool: "If a structure has many true/false values, consider consolidating them into a bitfield with 1 bit members, or using an appropriate fixed width type, such as u8." Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210507021127.54717-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 3c5e0d0e9da1b6172eca9f38f67263789d938d25 Author: Saurav Girepunje Date: Sat May 8 22:33:17 2021 +0530 usb: musb: Remove unused function argument dma, qh, offset, length Remove unused function argument dma, qh, offset, length from musb_tx_dma_set_mode_cppi_tusb() in musb_host.c Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210508170317.24403-3-saurav.girepunje@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6cfe9036acc53e981eaf04b839cf6bc8c584ce87 Author: Saurav Girepunje Date: Sat May 8 22:33:16 2021 +0530 usb: musb: Remove unused local variable dma, urb, offset Remove unused function argument struct dma_controller *dma, struct urb *urb and u32 offset from musb_tx_dma_set_mode_mentor. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210508170317.24403-2-saurav.girepunje@gmail.com Signed-off-by: Greg Kroah-Hartman commit f0c07993af0acf5545d5c1445798846565f4f147 Author: Robin Gong Date: Mon Apr 26 16:59:09 2021 +0800 dmaengine: fsl-qdma: check dma_set_mask return value For fix below warning reported by static code analysis tool like Coverity from Synopsys: Signed-off-by: Robin Gong Addresses-Coverity-ID: 12285639 ("Unchecked return value") Link: https://lore.kernel.org/r/1619427549-20498-1-git-send-email-yibin.gong@nxp.com Signed-off-by: Vinod Koul commit cd783e5abb60668d72c9d528e020fa4d21e55f84 Author: Saurav Girepunje Date: Sat May 8 15:05:12 2021 +0530 usb: musb: Remove duplicate declaration of functions Remove duplicate declaration of below functions in musb_host.h musb_host_cleanup musb_host_tx musb_host_rx musb_root_disconnect Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210508093512.GA11194@user Signed-off-by: Greg Kroah-Hartman commit 0826dae3d81563ae4d21d5565de9106e1f604fcf Author: Saurav Girepunje Date: Sat May 8 12:51:56 2021 +0530 usb: musb: Fix spelling mistake "tranfer" -> "transfer" Fix spelling mistake "tranfer" -> "transfer" in musb_gadget.c file. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210508072156.GA14656@user Signed-off-by: Greg Kroah-Hartman commit 5a9d38b20a5a7b3ce335d059963a8c3e92b1ba3c Author: Lucas De Marchi Date: Fri Apr 30 15:38:08 2021 -0700 drm/i915/display: hide workaround for broken vbt in intel_bios.c Instead of poluting the normal code path in intel_display.c, make intel_bios.c handle the brokenness of the VBT. Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210430223808.1078010-5-lucas.demarchi@intel.com commit 097d9e902068426e335ba7c0115f2c8ae7f9d08e Author: Lucas De Marchi Date: Fri Apr 30 15:38:07 2021 -0700 drm/i915/display: remove strap checks from gen 9 Direction on gen9+ was to stop reading the straps and only rely on the VBT for marking the port presence. This happened while dealing with WaIgnoreDDIAStrap and instead of using it as a WA, it should now be the normal flow. See commit 885d3e5b6f08 ("drm/i915/display: fix comment on skl straps"). For gen 10 it's hard to say if this will work or not since I can't test it, so leave it with the same behavior as before. For PCH_TGP we should still rely on the VBT to make ports E and F not available. v2 (Ville): - use display ver >= 9 to make it consistent with the rest of the driver instead of checking for == 9 - also handle CNL and only initialize port F if it is IS_CNL_WITH_PORT_F. Eventually CNL may be removed, but while it isn't let's keep it consistent everywhere Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210430223808.1078010-4-lucas.demarchi@intel.com commit ba9c5bf76734e70648bf61d81326b9c44abba643 Author: Lucas De Marchi Date: Fri Apr 30 15:38:06 2021 -0700 drm/i915/display: remove FIXME comment for intended feature Direction on gen >= 9 was to stop using straps and rely on VBT indicating if the port is present or not. Remove FIXME comment since this will never be "fixed". Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210430223808.1078010-3-lucas.demarchi@intel.com commit a5be0c978cc498adb6886a9374644c393b6005a3 Author: Lucas De Marchi Date: Fri Apr 30 15:38:05 2021 -0700 drm/i915/display: move vbt check to intel_ddi_init() Since commit 45c0673aac97 ("drm/i915/bios: start using the intel_bios_encoder_data directly") we lookup the devdata for each port in intel_ddi_init() and just return if the port is not present in VBT (or if we didn't create a fake devdata for it if VBT is not available). So in intel_display.c we don't have to check intel_bios_is_port_present(), just rely on the check in intel_ddi_init(). v2: Rebase on commit 45c0673aac97 ("drm/i915/bios: start using the intel_bios_encoder_data directly") re-using that check in intel_ddi_init() instead of adding a new one. Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210430223808.1078010-2-lucas.demarchi@intel.com commit 04dfe19a5ed683e91d8285df5be1dbde2f2f39af Author: Thomas Zimmermann Date: Fri May 7 20:57:09 2021 +0200 drm: Mark AGP implementation and ioctls as legacy Only UMs drivers use DRM's core AGP code and ioctls. Mark the icotls as legacy. Add the _legacy_ infix to all AGP functions. Move the declarations to the public and internal legacy header files. The agp field in struct drm_device is now located in the structure's legacy section. Adapt drivers to the changes. AGP code now depends on CONFIG_DRM_LEGACY. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210507185709.22797-5-tzimmermann@suse.de commit 6bff2279836ebeb2e8becaf9e30642e4bade0a49 Author: Thomas Zimmermann Date: Fri May 7 20:57:08 2021 +0200 drm: Mark PCI AGP helpers as legacy DRM's AGP helpers for PCI are only required by legacy drivers. Put them behind CONFIG_DRM_LEGACY and add the _legacy_ infix. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210507185709.22797-4-tzimmermann@suse.de commit 43359786a51e7fa7d89a45908de0ecee2d1dafa6 Author: Thomas Zimmermann Date: Fri May 7 20:57:07 2021 +0200 drm/radeon: Move AGP data structures into radeon With the AGP code already duplicated, move over the AGP structures from the legacy code base in to radeon. The AGP data structures that are required by radeon are now declared within the driver. The AGP instance is stored in struct radeon_device.agp. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210507185709.22797-3-tzimmermann@suse.de commit cf241e872fc203b59e8ff4b4eae6a6c2511d3747 Author: Thomas Zimmermann Date: Fri May 7 20:57:06 2021 +0200 drm/radeon: Move AGP helpers into radeon driver Radeon calls DRMs core AGP helpers. These helpers are only required by legacy drivers. Reimplement the code in radeon to uncouple radeon from the legacy code. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210507185709.22797-2-tzimmermann@suse.de commit f6d5d118462de2797f5925e04b826f00c66f6325 Author: Ojaswin Mujoo Date: Mon May 10 17:05:24 2021 +0530 staging: rtl8192e: Fix whitespace around conditional statement This patch fixes the following checkpatch.pl warnings: - WARNING: suspect code indent for conditional statements (8, 17) FILE: ./rtl8192e/rtl8192e/rtl_dm.c:1735: - WARNING: Statements should start on a tabstop FILE: ./rtl8192e/rtl8192e/rtl_dm.c:1736: Signed-off-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/b25f07b14c7e1f0d70d54b8723f786e33ffeb77a.1620642396.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman commit d0cf4e2bd40d75011ce0da0376a301b30838b022 Author: Ojaswin Mujoo Date: Mon May 10 17:04:17 2021 +0530 staging: rtl8192e: Add identifier name to function definition The patch fixes the following checkpatch.pl warnings: - WARNING: function definition argument 'struct net_device *' should also have an identifier name FILE: ./rtl8192e/rtl8192e/rtl_core.h:572: - WARNING: function definition argument 'struct net_device *' should also have an identifier name FILE: ./rtl8192e/rtl8192e/rtl_core.h:573: Signed-off-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/d856d9f22777524f5c10bddb7f7930d97e58c20b.1620642396.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1ba6d8dc50df0b5529e7df0a4a6351620407e9b2 Author: Ojaswin Mujoo Date: Mon May 10 17:01:01 2021 +0530 staging: rtl8192e: Avoid multiple line dereference Avoid multiple line dereference to make the code more readable, as suggested by checkpatch.pl This patch fixes the following checkpatch.pl warning: - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:189 - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:195 - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:204 - WARNING: Avoid multiple line dereference prefer 'priv->rtllib->swcamtable[4].key_buf[0]' FILE: ./rtl8192e/rtl8192e/rtl_cam.c:209 - WARNING: Avoid multiple line dereference prefer 'info_element->data[info_element->len]' FILE: ./rtl8192e/rtllib_rx.c:2287 Signed-off-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/435b60bd8874f8105b4af6e7eb9ee5bdbfe3112f.1620642396.git.ojaswin98@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cd3acd4e9cf7a74ede532eadd71d7d6e9d27987 Author: Zhen Lei Date: Mon May 10 16:49:01 2021 +0800 staging: rtl8723bs: Delete two redundant condition branches The statement of the "if (check_fwstate(pmlmepriv, WIFI_AP_STATE))" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210510084901.3421-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1b11e893eda0907fc9b28696271e2d9c4337e42d Author: Fabio Aiuto Date: Fri May 7 09:36:00 2021 +0200 staging: rtl8723bs: replace private arc4 encryption with in-kernel one replace private arc4 encryption with in-kernel one. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/af960dc728f039d64f4fb28fcece3ca92d24fbe4.1620372584.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8adffa4bf11cbc2593c6bd04d01b0dce898458a4 Author: Fabio Aiuto Date: Fri May 7 09:35:59 2021 +0200 staging: rtl8723bs: remove unused symbolic constant _AES_IV_LEN_ remove unused symbolic constant _AES_IV_LEN_ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ac3f5a400dcb61f46db259cca6979ec41f98feae.1620372584.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d0753d26e2e95a2a485e4126c6524c1315fb4c2 Author: Fabio Aiuto Date: Fri May 7 09:35:58 2021 +0200 staging: rtl8723bs: remove more unused encryption macros remove more unused logical macros used in removed private aes encryption. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c65d2b2dd06c52c3e0418d8a927521d05109849c.1620372584.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c7ac9108796d5f14e9eaf446fefb2ffc40cd7cc Author: Fabio Aiuto Date: Fri May 7 09:35:57 2021 +0200 staging: rtl8723bs: remove unused macros, arrays and an inline function def remove unused macros, arrays and a function definition. Many of these facilities were used in removed private aes encryption. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ada64bfc622dbfe6d4ff03c46dff48b25ebc641e.1620372584.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit aaa27b88a5d7097f87243bcdf418ba8748b884b0 Author: Saurav Girepunje Date: Sun May 9 22:44:27 2021 +0530 staging: rtl8192e: Remove duplicate declartion Remove dupilcate declartion of function rtllib_stop_send_beaconsi() notify_wx_assoc_event() in rtl8192e/rtllib.h file. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210509171427.GA9937@user Signed-off-by: Greg Kroah-Hartman commit 321f1fb48c9814ec7af621a19b2196455ba86a67 Author: Sergio Paracuellos Date: Thu May 6 19:07:42 2021 +0200 staging: mt7621-dts: add missing device_type in pcie root ports According to the YAML schema 'pci-bus.yaml' the 'device_type' property is mandatory for all pcie root ports. Hence add it. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210506170742.28196-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7114e7a298c2a39ba080bdf9315aece78d56b649 Author: Sergio Paracuellos Date: Thu May 6 19:07:41 2021 +0200 staging: mt7621-dts: remove 'bug-range' property Property 'bus-range' when values are the default are not necessary to be defined. Hence, remove all of them. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210506170742.28196-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit edee771a4533002575b74ef18f958c896f3804dd Author: Martin Kaiser Date: Thu May 6 14:14:10 2021 +0200 staging: rtl8188eu: remove nic_hdl from struct mlme_priv struct mlme_priv is an element of struct adapter. Use container_of to get a pointer to the enclosing struct. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210506121410.17613-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 665a990fdbea66a4d2af0287420f8266631be2ab Author: Christophe JAILLET Date: Fri May 7 18:26:39 2021 +0200 spi: tegra210-quad: Fix an error message 'ret' is known to be 0 here. No error code is available, so just remove it from the error message. Fixes: 921fc1838fb0 ("spi: tegra210-quad: Add support for Tegra210 QSPI controller") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b990c1bb5830196142c3d70e3e3c6c0245a7e75f.1620404705.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 86b1d8ecb5f1f271a660ce0b882658447f85904a Author: Christophe JAILLET Date: Fri May 7 17:07:59 2021 +0200 spi: tegra114: Fix an error message 'ret' is known to be 0 here. No error code is available, so just remove it from the error message. Fixes: f333a331ad ("spi/tegra114: add spi driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e2593974c9484b7055177ad0c9237c8e343946be.1620399829.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit e7a1a3abea373e41ba7dfe0fbc93cb79b6a3a529 Author: Tian Tao Date: Thu Apr 29 19:20:48 2021 +0800 spi: omap-100k: Fix the length judgment problem word_len should be checked in the omap1_spi100k_setup_transfer function to see if it exceeds 32. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1619695248-39045-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Mark Brown commit 029d32a892a860017d33ff8d9598259731e776ad Author: Geert Uytterhoeven Date: Thu May 6 13:52:59 2021 +0200 spi: dw-apb-ssi: Integrate Renesas RZ/N1 SPI controller Originally, the Renesas RZ/N1 SPI Controller DT bindings were not integrated in the main DT bindings for the Synopsys DesignWare Synchronous Serial Interface, but in its own file, as the RZ/N1 controller has additional registers for software CS control and DMA. As so far DMA is not supported on RZ/N1, and json-schema can handle any possible differences fine, integrate the RZ/N1 compatible values in the main DT bindings for the Synopsys DW SSI. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/aef15aa119ed02487ded4691141678bc1040c3b4.1620301936.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 026a1dc1af52742c5897e64a3431445371a71871 Author: Jay Fang Date: Thu May 6 15:08:08 2021 +0800 spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages() pch_spi_set_tx() frees data->pkt_tx_buff on failure of kzalloc() for data->pkt_rx_buff, but its caller, pch_spi_process_messages(), will free data->pkt_tx_buff again. Set data->pkt_tx_buff to NULL after kfree() to avoid double free. Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620284888-65215-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 1beb37b0e3f98708bfb37778049764b4500756da Author: Andy Shevchenko Date: Fri Apr 23 21:24:33 2021 +0300 spi: pxa2xx: Group Intel Quark specific definitions DDS_RATE is Intel Quark specific definition. Move it to the rest Intel Quark related. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210423182441.50272-7-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 5edc24901f4d469f8fc943004f73655933e89dbf Author: Andy Shevchenko Date: Fri Apr 23 21:24:32 2021 +0300 spi: pxa2xx: Unify ifdeffery used in the headers The two headers have quite different ifdeffery to prevent multiple inclusion. Unify them with the pattern that in particular reflects their location. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210423182441.50272-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 0e4768713e71dd224633fd7e00ad358bc48f433a Author: Andy Shevchenko Date: Fri Apr 23 21:24:31 2021 +0300 spi: pxa2xx: Replace header inclusions by forward declarations When the data structure is only referred by pointer, compiler may not need to see the contents of the data type. Thus, we may replace header inclusions by respective forward declarations. Due to above add missed headers as well. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210423182441.50272-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit c3dce24c40cc7cd07deca5b81b763eae66f30856 Author: Andy Shevchenko Date: Fri Apr 23 21:24:30 2021 +0300 spi: pxa2xx: Utilize struct device from struct ssp_device We have a duplication of struct device in the struct driver_data, get rid of it and reuse member from struct ssp_device instead. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210423182441.50272-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9e43c9a8d5de4810ea9688519d55b5e46784d84a Author: Andy Shevchenko Date: Fri Apr 23 21:24:29 2021 +0300 spi: pxa2xx: Utilize MMIO and physical base from struct ssp_device We have a duplication of MMIO and physical base addresses in the struct driver_data, get rid of it and reuse members from struct ssp_device instead. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210423182441.50272-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f2eed8caa336e31d672804a8725dadba0415f19d Author: Andy Shevchenko Date: Fri Apr 23 21:24:28 2021 +0300 spi: pxa2xx: Use one point of return when ->probe() fails When we can't allocate SPI controller, jump to the error path rather than return locally. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210423182441.50272-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9e37a3ab0627011fb63875e9a93094b6fc8ddf48 Author: Jay Fang Date: Mon May 10 14:58:23 2021 +0800 spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' In function 'spi_test_run_iter': Value 'tx_buf' might be 'rx_buf'. Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620629903-15493-5-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit db56d03049524114696aa7158560d8f0e064c487 Author: Jay Fang Date: Mon May 10 14:58:22 2021 +0800 spi: delete repeated words in comments Drop repeated words in spi-bcm2835aux.c {are} Drop repeated words in spi-dw-mmio.c {the} Drop repeated words in spi-geni-qcom.c {our} Drop repeated words in spi-pl022.c {on} Drop repeated words in spi-ppc4xx.c {the} Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620629903-15493-4-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 856a9260e17129303102a7d4a5f71b7a8739e5b9 Author: Jay Fang Date: Mon May 10 14:58:21 2021 +0800 spi: omap-100k: Clean the value of 'status' is not used An error code is set to 'status' before exiting list_for_each_entry() loop, but the value of 'status' is not used as below: list_for_each_entry(t, &m->transfers, transfer_list) { if (t->tx_buf == NULL && t->rx_buf == NULL && t->len) { status = -EINVAL; break; } ... } status = omap1_spi100k_setup_transfer(spi, NULL); Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620629903-15493-3-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 66fe740317c82b0caa68ed8d756536d4ff7e910c Author: Jay Fang Date: Mon May 10 14:58:20 2021 +0800 spi: ppc4xx: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620629903-15493-2-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 4446e6f3bd5c97c312833b445d0eb2ea638c7e98 Author: Axel Lin Date: Fri Apr 30 16:55:55 2021 +0800 regulator: hi6421v600: Remove unneeded *pmic from struct hi6421_spmi_reg_info Use rdev->regmap instead of pmic->regmap. With this change, hi6421_spmi_regulator_disable can be removed and use regulator_disable_regmap instead. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210430085555.1127994-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 00c8b0b1e6e1314bb57aab6438fbc2803c637d9d Author: Bartosz Dudziak Date: Sun May 2 13:53:03 2021 +0200 regulator: qcom: Document PM8226 smd regulator Document the PM8226 SMD-RPM regulator entry. Signed-off-by: Bartosz Dudziak Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210502115304.8570-1-bartosz.dudziak@snejp.pl Signed-off-by: Mark Brown commit 8c816d56a2a4e757bb121d1af4c04f47ac0572d3 Author: Bartosz Dudziak Date: Sun May 2 13:53:04 2021 +0200 regulator: qcom_smd: Add PM8226 regulator support Add support for PM8226 regulator which is commonly used with MSM8226 SoCs. Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20210502115304.8570-2-bartosz.dudziak@snejp.pl Signed-off-by: Mark Brown commit 67823d9dadd4dddee4b6bd075f6852b6ade5604a Author: Bryan O'Donoghue Date: Tue Apr 27 14:07:11 2021 +0100 regulator: Add a routine to set the current limit for QCOM PMIC VBUS Add hooks to regulator_get_current_limit_regmap() and regulator_set_current_limit_regmap() with an accompanying map of amperages. This lets us use the existing helper functions to map requested current settings to register bit-map/indicies. This change is required to elevate the default 2 Amps set by the bootloader to 3 Amps or indeed to constrain the value lower as the system design may dictate. The valid range is 500 mA to 3 A in increments of 500 mA. Cc: Mark Brown Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20210427130712.2005456-2-bryan.odonoghue@linaro.org Signed-off-by: Mark Brown commit 223875a6fb8e26bbde3de675552d27b62e3ed0de Author: Wan Jiabing Date: Thu May 6 10:24:52 2021 +0800 ASoC: fsl_xcvr: Remove unneeded semicolon Fix the following coccicheck warning: ./sound/soc/fsl/fsl_xcvr.c:739:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20210506022452.5762-1-wanjiabing@vivo.com Signed-off-by: Mark Brown commit a387040ab401cc114d0b1a7a86431c5ae34b163b Author: Shengjiu Wang Date: Thu May 6 10:30:40 2021 +0800 ASoC: imx-pcm-rpmsg: Fix warning of incorrect type in assignment The format in rpmsg is defained as unsigned char, there is warning when convert snd_pcm_format_t to it. sound/soc/fsl/imx-pcm-rpmsg.c:164:43: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-pcm-rpmsg.c:164:43: sparse: expected unsigned char format sound/soc/fsl/imx-pcm-rpmsg.c:164:43: sparse: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/imx-pcm-rpmsg.c:167:43: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-pcm-rpmsg.c:167:43: sparse: expected unsigned char format sound/soc/fsl/imx-pcm-rpmsg.c:167:43: sparse: got restricted snd_pcm_format_t [usertype] Refine the unused RPMSG_DSD_U16_LE and RPMSG_DSD_U32_LE for these case to fix this sparse warning. Fixes: 3c00eceb2a53 ("ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1620268240-1005-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit f758b9ef9a1abeea37086b8da0073c27eebf74aa Author: Wan Jiabing Date: Thu May 6 10:09:49 2021 +0800 ASoC: codecs: lpass-rx-macro: Remove unneeded semicolon Fix the following coccicheck warning: ./sound/soc/codecs/lpass-rx-macro.c:2631:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210506021005.4897-1-wanjiabing@vivo.com Signed-off-by: Mark Brown commit 37c881cd18f428b08cf46c5a9d67cfd2db2c4a32 Author: Tang Bin Date: Thu May 6 21:18:33 2021 +0800 ASoc: Fix unused define in jz4740-i2s.h Delete unused define of JZ4740_I2S_BIT_CLK, because it is unused in any files. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20210506131833.27420-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit 5f1b95d08de712327e452d082a50fded435ec884 Author: Yang Li Date: Sun Apr 25 18:12:33 2021 +0800 ASoC: q6dsp: q6afe: remove unneeded dead-store initialization Variables 'wait' and 'port_id' are being initialized, however the values are never read and updated later on, hence the redundant initializations can be removed. Cleans up clang warnings: sound/soc/qcom/qdsp6/q6afe.c:933:21: warning: Value stored to 'wait' during its initialization is never read sound/soc/qcom/qdsp6/q6afe.c:1186:6: warning: Value stored to 'port_id' during its initialization is never read Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1619345553-29781-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 85c966dc97d1c46a3079ec4c26714c9f8ec66823 Author: Zhen Lei Date: Mon May 10 16:36:40 2021 +0800 ASoC: mediatek: mt8192: Delete a redundant condition branch The statement of the "if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2)" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210510083640.3368-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown commit 2fa74b31bb8170f34ec4dfa8455ff07d9ee9a7e6 Author: Jiapeng Chong Date: Thu May 6 18:56:30 2021 +0800 ASoC: amd: renoir: Remove redundant assignment to pdm_ctrl and pdm_enable and pdm_dma_enable Variable pdm_ctrl and pdm_enable and pdm_dma_enable are set to '0x00', but they are overwritten later on, so these are redundant assignments that can be removed. Clean up the following clang-analyzer warning: sound/soc/amd/renoir/acp3x-pdm-dma.c:148:2: warning: Value stored to 'pdm_dma_enable' is never read [clang-analyzer-deadcode.DeadStores]. sound/soc/amd/renoir/acp3x-pdm-dma.c:147:2: warning: Value stored to 'pdm_enable' is never read [clang-analyzer-deadcode.DeadStores]. sound/soc/amd/renoir/acp3x-pdm-dma.c:80:2: warning: Value stored to 'pdm_ctrl' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1620298590-29749-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 604e5178444ea1d8053cf073e2c68fbc73a4e142 Author: Viorel Suman Date: Mon Apr 26 16:24:04 2021 +0800 ASoC: fsl_spdif: add support for enabling raw capture mode Since i.MX8MM SPDIF interface is able to capture raw data. Add support in SPDIF driver for this functionality. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1619425444-8666-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit cccc16dc175eafa2dec98002dde35d19ace0a696 Author: Pierre-Louis Bossart Date: Mon Apr 26 16:47:01 2021 -0500 ASoC: fsl: imx-pcm-rpmsg: remove useless initialization cppcheck warning: assigned a value that is never used. [unreadVariable] int written_num = 0; ^ sound/soc/fsl/imx-pcm-rpmsg.c:547:18: style: Variable 'written_num' is Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210426214701.235106-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 16255d4155da9ec8fcafcd7460a334e2e52f934e Author: Pierre-Louis Bossart Date: Mon Apr 26 16:47:00 2021 -0500 ASoC: codecs: rt1019: clarify expression cppcheck warning, add parentheses: sound/soc/codecs/rt1019.c:375:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1019_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210426214701.235106-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d51f6dfb9c9843f82825187baa78f0f4c1ec6ac7 Author: Pierre-Louis Bossart Date: Mon Apr 26 16:46:59 2021 -0500 ASoc: codecs: mt6359: remove useless initializations cppcheck warning: sound/soc/codecs/mt6359.c:274:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210426214701.235106-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b76d1d86a456fa495f8f74c967b5d646f20915c3 Author: Pierre-Louis Bossart Date: Mon Apr 26 16:46:58 2021 -0500 ASoC: codecs: mt6359-accdet: remove useless initialization cppcheck warning sound/soc/codecs/mt6359-accdet.c:417:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ sound/soc/codecs/mt6359-accdet.c:464:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210426214701.235106-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b70029abfc90e9d4a62f5dd7e85a59c465acc7b3 Author: Brent Lu Date: Wed May 5 11:37:05 2021 -0500 ASoC: Intel: sof_rt5682: code refactor for max98357a Refactor the machine driver by using the common code in maxim-common module to support max98357a. Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5a7f27a624d9e33262767b328aa7a4baf7846c14 Author: Brent Lu Date: Wed May 5 11:37:04 2021 -0500 ASoC: Intel: add sof-cs42l42 machine driver The machine driver is a generic machine driver for SOF with cs42l42 I2C codec. It currently supports Maxim MAX98357A speker amp on GLK but is extensible for other apms and platforms. Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a21515b5aaff57bf2f4160380aa7eedcd0113c96 Author: Brent Lu Date: Wed May 5 11:37:03 2021 -0500 ASoC: Intel: maxim-common: support max98357a Move max98357a code to this common module so it could be shared between multiple SOF machine drivers. Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 81cd42e5174ba7918edd3d006406ce21ebaa8507 Author: Libin Yang Date: Wed May 5 11:37:02 2021 -0500 ASoC: Intel: sof_sdw: add SOF_RT715_DAI_ID_FIX for AlderLake AlderLake needs the flag SOF_RT715_DAI_ID_FIX if it is using the rt715 DMIC. Reviewed-by: Bard Liao Signed-off-by: Libin Yang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fd2856929fb47b8921942b17a6dfa2757e76144f Author: Yong Zhi Date: Wed May 5 11:37:01 2021 -0500 ASoC: Intel: sof_rt5682: Enable Bluetooth offload on tgl and adl Enable BT audio offload for TGL/ADL drivers with the following board configs specifically: SSP0 - Headsets SSP1 - Speaker amps SSP2 - Bluetooth audio Reviewed-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3b316e229eb9f1861d14cb788d9b54e9319ff58e Author: Pierre-Louis Bossart Date: Wed May 5 11:37:00 2021 -0500 ASoC: Intel: boards: remove .nonatomic for BE dailinks Somehow with copy/paste and inertia we keep re-adding this field for BE dailinks, when it's only required for hard-coded FE links. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210505163705.305616-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 19f1eace04412a10268532091d5c316a13aab90a Author: Yong Zhi Date: Wed May 5 11:36:59 2021 -0500 ASoC: Intel: sof_sdw: add support for Bluetooth offload This patch enables BT offload feature on TGL Volteer reference design. Reviewed-by: Kai Vehmanen Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9c5046e4b3e736eec5b9a8f1d59c07bb0ed78a7a Author: Pierre-Louis Bossart Date: Wed May 5 11:36:58 2021 -0500 ASoC: Intel: boards: create sof-maxim-common module sof_maxim_common.o is linked twice, move to a dedicated module. Also clean-up interfaces to use a consistent 'max_98373' prefix for all symbols. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210505163705.305616-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f6081af6cf2b4fda929638e8cec4cd2f9487dd9e Author: Pierre-Louis Bossart Date: Wed May 5 11:36:57 2021 -0500 ASoC: Intel: boards: handle hda-dsp-common as a module hda-dsp-common.o is linked multiple times due to copy/paste and inertia. Move to a dedicated module with a namespace. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210505163705.305616-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 35564e2bf94611c3eb51d35362addb3cb394ad54 Author: Pierre-Louis Bossart Date: Wed May 5 11:36:56 2021 -0500 ASoC: Intel: sof_sdw: add mutual exclusion between PCH DMIC and RT715 When external RT714/715 devices are used for capture, we don't want the PCH DMICs to be used. Any information provided by the SOF platform driver or DMI quirks will be overridden. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Libin Yang Link: https://lore.kernel.org/r/20210505163705.305616-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2e4dba57ea56dc04d5c452be37bfb4db7d8229de Author: Vamshi Krishna Gopal Date: Wed May 5 11:36:55 2021 -0500 ASoC: Intel: boards: add support for adl boards in sof-rt5682 ADL customer boards are with below 2 configurations Board 1: RT5682 on SSP0 and MAX98373 on SSP1 Board 2: RT5682 on SSP0 and MAX98357A on SSP2 Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Signed-off-by: Vamshi Krishna Gopal Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2a29ff7ae13c9263e88abc22e372ab57fb3ac21c Author: Vamshi Krishna Gopal Date: Wed May 5 11:36:54 2021 -0500 ASoC: Intel: soc-acpi: add entries for i2s machines in ADL match table There are currently 2 customer boards of ADL Board 1 : RT5682 + MAX98373 Board 2 : RT5682 + MAX98357A Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Signed-off-by: Vamshi Krishna Gopal Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 37897babed2e5ff622d29b61bf27c8567087b516 Author: Yong Zhi Date: Wed May 5 11:36:53 2021 -0500 ASoC: Intel: Boards: tgl_max98373: Add BT offload support BT audio offload is internally configured with virtual GPIOs, the port assignment is fixed on SSP2 for TGL/ADL platforms. Reviewed-by: Kai Vehmanen Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210505163705.305616-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 47fad2393b0446229883f95e373067441794e22f Author: Pierre-Louis Bossart Date: Wed May 5 12:02:35 2021 -0500 ASoC: SOF: Intel: move common ATOM stuff to module Split between ACPI/PCI parts and use common module. Since it's a split of existing code, the same dual-license is used for the new atom.c and atom.h files. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Tested-by: Arnd Bergmann Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210505170235.306797-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1c5ab2dc752fcd02264e8dca8bde55ca479aa684 Author: Pierre-Louis Bossart Date: Wed May 5 12:02:34 2021 -0500 ASoC: SOF: Intel: byt: prepare split between Baytrail and Merrifield Atom devices are split in ACPI (Baytrail/Cherrytrail) and PCI (Merrifield) cases. In preparation for a split between the two parts and the use of a common module, rename functions with the atom_ prefix when appropriate and remove explicit BYT_ prefix for common definitions. This patch should not change any functionality. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210505170235.306797-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 880e007f15a31f446b9e1713720c6ae5a539f3f4 Author: Samuel Holland Date: Thu Apr 29 22:58:53 2021 -0500 ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Increase sound-dai-cells to 1 to allow using the DAIs in the codec corresponding to AIF2 and AIF3. The generic ASoC OF code supports a #sound-dai-cells value of 0 or 1 with no impact to the driver, so this is a backward-compatible change. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20210430035859.3487-2-samuel@sholland.org Signed-off-by: Mark Brown commit ccef8441fb2d352fa982f6607f471cdd17b30741 Merge: 6efb943b8616e 6d5ff8e632a4f Author: Mark Brown Date: Mon May 10 13:01:03 2021 +0100 Merge existing fixes from spi/for-5.13 commit 3f0d23e849b33cb83cbd1f3ce9b7d23ad3863841 Merge: 6efb943b8616e 682ae59ca2876 Author: Mark Brown Date: Mon May 10 13:00:42 2021 +0100 Merge existing fixes from asoc/for-5.13 commit cc9d663a00a00b4a3d54875e024b79142416caf6 Author: Shubhankar Kuranagatti Date: Tue May 4 11:50:59 2021 +0530 drivers: mtd: sm_ftl: Fix alignment of block comment A star has been added to subsequent line of block comment The closing */ has been shifted to new line This is done to maintain code uniformity Signed-off-by: Shubhankar Kuranagatti [: Fixed the title] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210504062059.mywqzwveyjfawreg@kewl-virtual-machine commit feb05fae4df10f6b9bf720662623efc88334c095 Author: Petr Malat Date: Fri Apr 30 08:50:57 2021 +0200 mtd: Create partname and partid debug files for child MTDs Partname and partid are set by the upper driver (spi-nor) on the master MTD. If this MTD is partitioned and CONFIG_MTD_PARTITIONED_MASTER is disabled, the master MTD is not instantiated and partname and partid aren't available to the userspace. Always read the partname and partid from the master MTD, they describe the HW, which can't differ between master and its children. Signed-off-by: Petr Malat Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210430065057.32018-1-oss@malat.biz commit 063deb31ae902b510e57af17a45151baf5057a61 Author: Yang Li Date: Wed Apr 28 18:02:22 2021 +0800 mtd: tests: Remove redundant assignment to err Variable 'err' is set to 0 but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/mtd/tests/torturetest.c:233:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1619604142-119891-1-git-send-email-yang.lee@linux.alibaba.com commit 9c5b19c2eea8cb8d5784dedce8cac07e9a20198e Author: Yang Li Date: Mon Apr 26 17:32:23 2021 +0800 mtd: *nftl: return -ENOMEM when kmalloc failed The driver is using -1 instead of the -ENOMEM defined macro to specify that a buffer allocation failed. Using the correct error code is more intuitive Smatch tool warning: drivers/mtd/inftlmount.c:333 check_free_sectors() warn: returning -1 instead of -ENOMEM is sloppy drivers/mtd/nftlmount.c:272 check_free_sectors() warn: returning -1 instead of -ENOMEM is sloppy No functional change, just more standardized. Reported-by: Abaci Robot Signed-off-by: Yang Li [: Fixed the title] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1619429543-52234-1-git-send-email-yang.lee@linux.alibaba.com commit 6500dc2bde937fb124a399211686e04b8ef9d44e Author: Jiapeng Chong Date: Sun Apr 25 18:28:18 2021 +0800 mtd: mtd_oobtest: Remove redundant assignment to err Variable err is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/mtd/tests/oobtest.c:626:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. drivers/mtd/tests/oobtest.c:603:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. drivers/mtd/tests/oobtest.c:579:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. drivers/mtd/tests/oobtest.c:556:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. drivers/mtd/tests/oobtest.c:532:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. drivers/mtd/tests/oobtest.c:509:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1619346498-43617-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 4b361cfa862479fbb1d14ddf01de4dbc7146dcc5 Author: Michael Walle Date: Sat Apr 24 13:06:08 2021 +0200 mtd: core: add OTP nvmem provider support Flash OTP regions can already be read via user space. Some boards have their serial number or MAC addresses stored in the OTP regions. Add support for them being a (read-only) nvmem provider. The API to read the OTP data is already in place. It distinguishes between factory and user OTP, thus there are up to two different providers. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-6-michael@walle.cc commit 96d3af22f87c81f21bd4c79b257e205240157ae0 Author: Michael Walle Date: Sat Apr 24 13:06:07 2021 +0200 dt-bindings: mtd: spi-nor: add otp property SPI-NOR flashes may have OTP regions and have a nvmem binding. This binding is described in mtd.yaml. Signed-off-by: Michael Walle Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-5-michael@walle.cc commit 74ae3663b110d8d3e5d41dd4b05f4fa6bd79d49d Author: Michael Walle Date: Sat Apr 24 13:06:06 2021 +0200 dt-bindings: mtd: add OTP bindings Flash devices can have one-time-programmable regions. Add a nvmem binding so they can be used as a nvmem provider. Signed-off-by: Michael Walle Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-4-michael@walle.cc commit e6aed6717cd429a48995d2c6533fdde9f88d8cf1 Author: Michael Walle Date: Sat Apr 24 13:06:05 2021 +0200 dt-bindings: mtd: add YAML schema for the generic MTD bindings Convert MTD's common.txt to mtd.yaml. Signed-off-by: Michael Walle Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-3-michael@walle.cc commit 1333a6779501f4cc662ff5c8b36b0a22f3a7ddc6 Author: Michael Walle Date: Sat Apr 24 13:06:04 2021 +0200 nvmem: core: allow specifying of_node Until now, the of_node of the parent device is used. Some devices provide more than just the nvmem provider. To avoid name space clashes, add a way to allow specifying the nvmem cells in subnodes. Consider the following example: flash@0 { compatible = "jedec,spi-nor"; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { reg = <0x000000 0x010000>; }; }; otp { compatible = "user-otp"; #address-cells = <1>; #size-cells = <1>; serial-number@0 { reg = <0x0 0x8>; }; }; }; There the nvmem provider might be the MTD partition or the OTP region of the flash. Add a new config->of_node parameter, which if set, will be used instead of the parent's of_node. Signed-off-by: Michael Walle Acked-by: Srinivas Kandagatla Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-2-michael@walle.cc commit eef23e72b78b36924aea8be5ec7c54e628c442ef Author: H. Peter Anvin (Intel) Date: Mon May 10 02:09:40 2021 -0700 x86/asm: Use _ASM_BYTES() in Use the new generalized _ASM_BYTES() macro from instead of the "home grown" _ASM_MK_NOP() in . Add and update in the tools directory... Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510090940.924953-4-hpa@zytor.com commit d88be187a6e6f3a97dfa7ddc500bb9ca191b3772 Author: H. Peter Anvin (Intel) Date: Mon May 10 02:09:39 2021 -0700 x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence Make it easy to create a sequence of bytes that can be used in either assembly proper on in a C asm() statement. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510090940.924953-3-hpa@zytor.com commit be5bb8021c9731f5593de6419ae35d3f16a3e497 Author: H. Peter Anvin (Intel) Date: Mon May 10 02:09:38 2021 -0700 x86/asm: Have the __ASM_FORM macros handle commas in arguments The __ASM_FORM macros are really useful, but in order to be able to use them to define instructions via .byte directives breaks because of the necessary commas. Change the macros to handle commas correctly. [ mingo: Removed stray whitespaces & aligned the definitions vertically. ] Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510090940.924953-2-hpa@zytor.com commit f279b49f13bd2151bbe402a1d812c1e3646c4bbb Author: H. Peter Anvin (Intel) Date: Mon May 10 01:28:40 2021 -0700 x86/boot: Modernize genimage script; hdimage+EFI support The image generation scripts in arch/x86/boot are pretty out of date, except for the isoimage target. Update and clean up the genimage.sh script, and make it support an arbitrary number of initramfs files in the image. Add a "hdimage" target, which can be booted by either BIOS or EFI (if the kernel is compiled with the EFI stub.) For EFI to be able to pass the command line to the kernel, we need the EFI shell, but the firmware builtin EFI shell, if it even exists, is pretty much always the last resort boot option, so search for OVMF or EDK2 and explicitly include a copy of the EFI shell. To make this all work, use bash features in the script. Furthermore, this version of the script makes use of some mtools features, especially mpartition, that might not exist in very old version of mtools, but given all the other dependencies on this script this doesn't seem such a big deal. Finally, put a volume label ("LINUX_BOOT") on all generated images. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510082840.628372-1-hpa@zytor.com commit 81bb218c829246962a6327c64eec18ddcc049936 Author: Hauke Mehrtens Date: Sun Apr 18 23:46:16 2021 +0200 mtd: parsers: trx: Allow to use TRX parser on Mediatek SoCs Buffalo uses the TRX partition format also on Mediatek MT7622 SoCs. Signed-off-by: Hauke Mehrtens Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-4-hauke@hauke-m.de commit d7f7e04f8b67571a4bf5a0dcd4f9da4214f5262c Author: Hauke Mehrtens Date: Sun Apr 18 23:46:15 2021 +0200 mtd: parsers: trx: Allow to specify brcm, trx-magic in DT Buffalo uses a different TRX magic for every device, to be able to use this trx parser, make it possible to specify the TRX magic in device tree. If no TRX magic is specified in device tree, the standard value will be used. This value should only be specified if a vendor chooses to use a non standard TRX magic. Signed-off-by: Hauke Mehrtens Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-3-hauke@hauke-m.de commit a4d82940ff85a7e307953dfa715f65d5ab487e10 Author: Hauke Mehrtens Date: Sun Apr 18 23:46:14 2021 +0200 dt-bindings: mtd: brcm,trx: Add brcm,trx-magic This adds the description of an additional property which allows to specify a custom partition parser magic to detect a trx partition. Buffalo has multiple device which are using the trx format, but with different magic values. Signed-off-by: Hauke Mehrtens Acked-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210418214616.239574-2-hauke@hauke-m.de commit 16a7af2ecc2217ba8c317fdd2ca177bbc7b0a8d2 Author: Tian Tao Date: Wed Apr 14 09:31:14 2021 +0800 mtd: nftlcore: remove set but rewrite variables The value of lastEUN is not used at line 622, and will rewrite a new value at line 541. so just remote the line at 622. Signed-off-by: Tian Tao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1618363874-25113-1-git-send-email-tiantao6@hisilicon.com commit 27736ddd24cb99b9bef2b36b42381eb41da15958 Author: Rafał Miłecki Date: Fri Apr 23 07:05:36 2021 +0200 dt-bindings: mtd: brcmnand: convert to the json-schema This helps validating DTS files. Changes that require mentioning: 1. Property "clock" was renamed to "clocks" 2. Duplicated properties (defined in nand-controller.yaml) were dropped 3. Compatible "brcm,nand-bcm63168" was added 4. SoC specific "compatible" cases got limited controller versions Examples changes: 1. Nodes "nand" were renamed to "nand-controller" 2. Nodes "nandcs" were renamed to "nand" 3. Dropped partitions as they were using old syntax and are well documented elsewhere anyway This rewritten binding validates cleanly using the "dt_binding_check". Some Linux stored DTS files will require updating to make "dtbs_check" happy. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Reviewed-by: Brian Norris Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210423050536.29504-1-zajec5@gmail.com commit 21020becdf0ce946d3fc2c4bf4da33453affcd5a Author: Baruch Siach Date: Wed Apr 21 21:31:09 2021 +0300 mtd: rawnand: qcom: allow override of partition parser Commit 82bfd11f1b03 ("mtd: rawnand: qcom: Add support for Qcom SMEM parser") made qcomsmem the only parser for qcom_nandc partitions. This might be problematic for systems with both SPI and NAND MTD devices. When booting from SPI flash the partition table should not apply to the NAND flash. Prepend cmdlinepart and ofpart parsers to allow override of the partition parser. Cc: Manivannan Sadhasivam Signed-off-by: Baruch Siach Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/cf470f05af514acd5bd94548804ffa96b966a0a8.1619029869.git.baruch@tkos.co.il commit ee522bcf026ec82ada793979c3a906274430595a Author: Yang Yingliang Date: Tue Apr 6 21:11:59 2021 +0800 leds: tlc591xx: fix return value check in tlc591xx_probe() After device_get_match_data(), tlc591xx is not checked, add check for it and also check np after dev_of_node. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Pavel Machek commit 4d888eceb725216305eee595ff5d068112cf7c15 Author: Dan Carpenter Date: Tue Apr 20 11:44:51 2021 +0300 mtd: rawnand: silence static checker warning in nand_setup_interface() Smatch complains that the error code is not set on this error path: drivers/mtd/nand/raw/nand_base.c:842 nand_setup_interface() warn: missing error code 'ret' But actually returning success is intentional because the NAND chip will still work in mode 0. This patch adds a "ret = 0;" assignment to make the intent more clear and to silence the static checker warning. It doesn't affect the compiled code because GCC optimises the assignment away. Signed-off-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/YH6Ugwz3gcga+q8X@mwanda commit eeff86b6d18ccd7ef1e663dd428b93f5887d02b5 Author: Wan Jiabing Date: Mon May 10 11:08:35 2021 +0800 m68k: dma: Remove unnecessary include of asm/cacheflush.h In commit ca15ca406f660 ("mm: remove unneeded includes of "), asm/cacheflush.h independent on the MACRO was included at line 18. The include here is unnecessary. Remove it. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210510030836.11834-1-wanjiabing@vivo.com Signed-off-by: Geert Uytterhoeven commit bc7c9993a0d836aa88aca2969dcb9b22031924d3 Author: Finn Thain Date: Sun Feb 7 18:02:33 2021 +1100 m68k: Drop -fno-strength-reduce from KBUILD_CFLAGS This workaround became redundant either when the driver in question was removed (in Linux v2.6.23) or when the compiler flag became a no-op (in GCC v4.2). Linux has required GCC v4.6 or later since v4.19. Link: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=efa1cdf01850b28c2f6f7035ebd4420259494615 References: commit 565bae6a4a8f ("[SCSI] 53c7xx: kill driver") References: commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6") Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/baa95d7235921dff23bed6320518f3fa90396603.1612681353.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 73edc4da40635774100d0eb9ca2e6476e3b2b470 Author: Aline Santana Cordeiro Date: Wed Apr 14 23:16:48 2021 +0200 media: staging: media: atomisp: pci: Format comments according to coding-style in file atomisp_cmd.h Format all comments according to the coding-style. Issue detected by checkpatch.pl. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 14bc5eb80bda1a3e3c8c2a0eab3064eaba949f3a Author: Aline Santana Cordeiro Date: Wed Apr 14 23:16:45 2021 +0200 media: staging: media: atomisp: pci: Format comments according to coding-style in file atomisp_acc.c Format all comments according to the coding-style. Issue detected by checkpatch.pl. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 848802da8d0443befd155926ff4184e6ebffb5c0 Author: Aline Santana Cordeiro Date: Wed Apr 14 16:06:06 2021 +0200 media: staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_acc.c Correct identation in block of conditional statements. The conditional statement depends on the results of the macro function "list_for_each_entry()". Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bbbcba0267e2faff32c62905219f1d3b81f75d30 Author: Aline Santana Cordeiro Date: Wed Apr 14 16:06:02 2021 +0200 media: staging: media: atomisp: pci: Correct identation in block of conditional statements in file atomisp_v4l2.c Correct identation in block of conditional statements. The function "v4l2_device_unregister_subdev()" depends on the results of the macro function "list_for_each_entry_safe()". Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d7c89be51d17d629e7c550388a81858af09ad343 Author: Aline Santana Cordeiro Date: Wed Apr 14 15:25:37 2021 +0200 media: staging: media: omap4iss: Remove unused macro function Remove unused macro function "v4l2_dev_to_iss_device(dev)". Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 451c34dd69b80857fa50e33581db22143afa8890 Author: Martiros Shakhzadyan Date: Tue Apr 13 20:03:13 2021 +0200 media: staging: media: atomisp: Minor code style changes Fixed line continuation and parenthesis alignment issues. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7900bdc25a019159911d5ee38f83b78ac6639589 Author: Mitali Borkar Date: Tue Apr 13 21:50:16 2021 +0200 media: staging: media: zoran: add spaces around '<<' operator Added spaces around '<<' operator to improve readability and meet linux kernel coding style. Reported by checkpatch Signed-off-by: Mitali Borkar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 72e03872410842e6c0de27b7243fe90af5254bc0 Author: Mitali Borkar Date: Tue Apr 13 17:29:17 2021 +0200 media: staging: media: intel-ipu3: line should not end with '[' Fixed the issue of line should not end with '[' by moving argument from next line to line ending with '[' and made it under 80 characters. Reported by checkpatch. Signed-off-by: Mitali Borkar Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 17daf473e2a48ca34b434f69c00bd2fd6fa39a4d Author: Mitali Borkar Date: Tue Apr 13 07:16:22 2021 +0200 media: staging: media: intel-ipu3: remove space before tabs Removed unnecessary space before tabs to adhere to linux kernel coding style. Reported by checkpatch. Signed-off-by: Mitali Borkar Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25074ea239ac92321e75009e001049886f91d850 Author: Mitali Borkar Date: Tue Apr 13 07:15:46 2021 +0200 media: staging: media: intel-ipu3: reduce length of line Reduced length of line as it was exceeding 100 characters by removing comments from same line and adding it to previous line. This makes code neater, and meets linux kernel coding style. Reported by checkpatch. Signed-off-by: Mitali Borkar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a21baa418c5b6a011f02d18d2214c28d6f3a4a47 Author: Mitali Borkar Date: Tue Apr 13 07:15:29 2021 +0200 media: staging: media: intel-ipu3: remove unnecessary blank line Removed an unnecessary blank line to meet linux kernel coding style. Reported by checkpatch.pl Signed-off-by: Mitali Borkar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 94dfa800dda45a0849aa493c05800b2a3557a6ee Author: Beatriz Martins de Carvalho Date: Mon Apr 12 15:43:01 2021 +0200 media: staging: media: atomisp: i2c: align line break to match with open parenthesis Aligns line break with the remaining function arguments to the open parenthesis. Issue found by checkpatch in file atomisp-gc2235.c Signed-off-by: Beatriz Martins de Carvalho Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 047d39c4a1bc197ec038008e941fa30d08d1d885 Author: Martiros Shakhzadyan Date: Mon Apr 12 04:35:56 2021 +0200 media: staging: media: atomisp: Removed a superfluous else clause Fixed a coding style issue. Signed-off-by: Martiros Shakhzadyan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d58f75de9b958ff9d996da942ccf79d7526bfde8 Author: Aline Santana Cordeiro Date: Fri Apr 9 21:01:08 2021 +0200 media: staging: media: omap4iss: Align line break to the open parenthesis in file iss_video.c Aligns line break with the remaining function arguments to the open parenthesis. Issue found by checkpatch. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d637c5dbbfee4c0cbd2f507b627e5b29823f49da Author: Aline Santana Cordeiro Date: Fri Apr 9 14:24:25 2021 +0200 media: staging: media: hantro: Align line break to the open parenthesis in file hantro_mpeg2.c Aligns line break with the remaining function arguments to the open parenthesis. Issue found by checkpatch. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9148cded3a0246d55e62187e219466c0c7986925 Author: Aline Santana Cordeiro Date: Fri Apr 9 14:24:21 2021 +0200 media: staging: media: hantro: Align line break to the open parenthesis in file hantro_hw.h Aligns line break with the remaining function arguments to the open parenthesis. Issue found by checkpatch. Signed-off-by: Aline Santana Cordeiro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59087b66ea6730c130c57d23bd9fd139b78c1ba5 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:18 2021 +0200 media: exynos-gsc: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. As a bonus, as pm_runtime_get_sync() always return 0 on success, the logic can be simplified. Reviewed-by: Jonathan Cameron Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 59f96244af9403ddf4810ec5c0fbe8920857634e Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:17 2021 +0200 media: exynos4-is: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. On some places, this is ok, but on others the usage count ended being unbalanced on failures. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. As a bonus, such function always return zero on success. So, some code can be simplified. Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit c44eac5b72e23c31eefc0e10a71d9650036b8341 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:21 2021 +0200 media: sti/bdisp: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. The bdisp_start_streaming() doesn't take it into account, which would unbalance PM usage counter at bdisp_stop_streaming(). The logic at bdisp_probe() is correct, but the best is to use the same call along the driver. So, replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit 9c298f82d8392f799a0595f50076afa1d91e9092 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:10 2021 +0200 media: sunxi: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit baa450f08d691a40fcc29ba8ce40e02613736ac7 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:10 2021 +0200 media: sti/delta: use pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. Use the new API, in order to cleanup the error check logic. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit 10343de268d10cf07b092b8b525e12ad558ead77 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:10 2021 +0200 media: s5p-jpeg: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. As a plus, pm_runtime_resume_and_get() doesn't return positive numbers, so the return code validation can be removed. Reviewed-by: Jonathan Cameron Reviewed-by: Sylwester Nawrocki Acked-by: Andrzej Pietrasiewicz Signed-off-by: Mauro Carvalho Chehab commit 908711f542c17fe61e5d653da1beb8e5ab5c7b50 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:09 2021 +0200 media: mtk-vcodec: fix PM runtime get logic Currently, the driver just assumes that PM runtime logic succeded resuming the device. That may not be the case, as pm_runtime_get_sync() can fail (but keeping the usage count incremented). Replace the code to use pm_runtime_resume_and_get(), and letting it return the error code. This way, if mtk_vcodec_dec_pw_on() fails, the logic under fops_vcodec_open() will do the right thing and return an error, instead of just assuming that the device is ready to be used. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit 6e8b1526db164c9d4b9dacfb9bc48e365d7c4860 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:07:41 2021 +0200 media: sh_vou: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. While here, check if the PM runtime error was caught at open time. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit c41e02493334985cca1a22efd5ca962ce3abb061 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:05:27 2021 +0200 media: am437x: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. While here, ensure that the driver will check if PM runtime resumed at vpfe_initialize_device(). Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit fdc34e82c0f968ac4c157bd3d8c299ebc24c9c63 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:04:23 2021 +0200 media: s5p: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. While here, check if the PM runtime error was caught at s5p_cec_adap_enable(). Reviewed-by: Jonathan Cameron Reviewed-by: Sylwester Nawrocki Acked-by: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab commit 220955ec3c84505ec6a75bea494ec61f5295ef7a Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:03:23 2021 +0200 media: renesas-ceu: Properly check for PM errors Right now, the driver just assumes that PM runtime resume worked, but it may fail. Well, the pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. So, using it is tricky. Let's replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") and return an error if something bad happens. This should ensure that the PM runtime usage_count will be properly decremented if an error happens at open time. Reviewed-by: Jonathan Cameron Acked-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 45e75a8c6fa455a5909ac04db76a4b15d6bb8368 Author: Mauro Carvalho Chehab Date: Fri Apr 23 16:59:34 2021 +0200 media: rcar_fdp1: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. Also, right now, the driver is ignoring any troubles when trying to do PM resume. So, add the proper error handling for the code. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit fa9f443f7c962d072d150472e2bb77de39817a9a Author: Mauro Carvalho Chehab Date: Fri Apr 23 16:59:34 2021 +0200 media: rcar_fdp1: simplify error check logic at fdp_open() Avoid some code duplication by moving the common error path logic at fdp_open(). Signed-off-by: Mauro Carvalho Chehab commit d07bb9702cf5f5ccf3fb661e6cab54bbc33cd23f Author: Mauro Carvalho Chehab Date: Fri Apr 23 16:57:16 2021 +0200 media: mdk-mdp: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. While here, fix the return contition of mtk_mdp_m2m_start_streaming(), as it doesn't make any sense to return 0 if the PM runtime failed to resume. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit e7c617cab7a522fba5b20f9033ee98565b6f3546 Author: Mauro Carvalho Chehab Date: Fri Apr 23 16:54:25 2021 +0200 media: marvel-ccic: fix some issues when getting pm_runtime Calling pm_runtime_get_sync() is bad, since even when it returns an error, pm_runtime_put*() should be called. So, use instead pm_runtime_resume_and_get(). While here, ensure that the error condition will be checked during clock enable an media open() calls. Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit 892bb6ecead9b834ba7ad1d07513e9eba1baa3a4 Author: Mauro Carvalho Chehab Date: Wed Apr 28 08:27:55 2021 +0200 media: hantro: do a PM resume earlier The device_run() first enables the clock and then tries to resume PM runtime, checking for errors. Well, if for some reason the pm_runtime can not resume, it would be better to detect it beforehand. So, change the order inside device_run(). Reviewed-by: Ezequiel Garcia Fixes: 775fec69008d ("media: add Rockchip VPU JPEG encoder driver") Signed-off-by: Mauro Carvalho Chehab commit dd97908ee35096356fb4111bb77d5f94bcfe337d Author: Mauro Carvalho Chehab Date: Fri Apr 23 16:47:42 2021 +0200 media: atmel: properly get pm_runtime There are several issues in the way the atmel driver handles pm_runtime_get_sync(): - it doesn't check return codes; - it doesn't properly decrement the usage_count on all places; - it starts streaming even if pm_runtime_get_sync() fails. - while it tries to get pm_runtime at the clock enable logic, it doesn't check if the operation was suceeded. Replace all occurrences of it to use the new kAPI: pm_runtime_resume_and_get(), which ensures that, if the return code is not negative, the usage_count was incremented. With that, add additional checks when this is called, in order to ensure that errors will be properly addressed. Signed-off-by: Mauro Carvalho Chehab commit e6695c89b3d4595f60c9fe40e0938e085d15dd20 Author: Mauro Carvalho Chehab Date: Tue Apr 27 11:43:54 2021 +0200 media: exynos-gsc: don't resume at remove time Calling pm_runtime_get_sync() at driver's removal time is not needed, as this will resume PM runtime. Also, the PM runtime code at pm_runtime_disable() already calls it, if it detects the need. So, change the logic in order to disable PM runtime earlier. Reviewed-by: Jonathan Cameron Reviewed-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 62c90446868b439929cb04395f04a709a64ae04b Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:13 2021 +0200 media: i2c: imx334: fix the pm runtime get logic The PM runtime get logic is currently broken, as it checks if ret is zero instead of checking if it is an error code, as reported by Dan Carpenter. While here, use the pm_runtime_resume_and_get() as added by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. As a bonus, such function always return zero on success. It should also be noticed that a fail of pm_runtime_get_sync() would potentially result in a spurious runtime_suspend(), instead of using pm_runtime_put_noidle(). Reported-by: Dan Carpenter Reviewed-by: Daniele Alessandrelli Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit da3a1858c3a37c09446e1470c48352897d59d11b Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:11 2021 +0200 media: i2c: ccs-core: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. There is a bug at ccs_pm_get_init(): when this function returns an error, the stream is not started, and RPM usage_count should not be incremented. However, if the calls to v4l2_ctrl_handler_setup() return errors, it will be kept incremented. At ccs_suspend() the best is to replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter automatically, in the case of errors. Fixes: 96e3a6b92f23 ("media: smiapp: Avoid maintaining power state information") Cc: stable@vger.kernel.org Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6005a8e955e4e451e4bf6000affaab566d4cab5e Author: Mauro Carvalho Chehab Date: Tue Apr 27 08:36:00 2021 +0200 media: i2c: ccs-core: return the right error code at suspend If pm_runtime resume logic fails, return the error code provided by it, instead of -EAGAIN, as, depending on what caused it to fail, it may not be something that would be recovered. Fixes: cbba45d43631 ("[media] smiapp: Use runtime PM") Reviewed-by: Jonathan Cameron Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 747bad54a677d8633ec14b39dfbeb859c821d7f2 Author: Mauro Carvalho Chehab Date: Wed Apr 28 09:38:56 2021 +0200 media: s5p_cec: decrement usage count if disabled There's a bug at s5p_cec_adap_enable(): if called to disable the device, it should call pm_runtime_put() instead of pm_runtime_disable(), as the goal here is to decrement the usage_count and not to disable PM runtime. Reported-by: Sylwester Nawrocki Reviewed-by: Jonathan Cameron Fixes: 1bcbf6f4b6b0 ("[media] cec: s5p-cec: Add s5p-cec driver") Signed-off-by: Mauro Carvalho Chehab commit 4cba5473c5ce0f1389d316c5dc6f83a0259df5eb Author: Mauro Carvalho Chehab Date: Tue Apr 27 10:39:47 2021 +0200 media: venus: Rework error fail recover logic The Venus code has a sort of watchdog that attempts to recover from IP errors, implemented as a delayed work job, which calls venus_sys_error_handler(). Right now, it has several issues: 1. It assumes that PM runtime resume never fails 2. It internally runs two while() loops that also assume that PM runtime will never fail to go idle: while (pm_runtime_active(core->dev_dec) || pm_runtime_active(core->dev_enc)) msleep(10); ... while (core->pmdomains[0] && pm_runtime_active(core->pmdomains[0])) usleep_range(1000, 1500); 3. It uses an OR to merge all return codes and then report to the user 4. If the hardware never recovers, it keeps running on every 10ms, flooding the syslog with 2 messages (so, up to 200 messages per second). Rework the code, in order to prevent that, by: 1. check the return code from PM runtime resume; 2. don't let the while() loops run forever; 3. store the failed event; 4. use warn ratelimited when it fails to recover. Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions") Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit e90812c47b958407b54d05780dc483fdc1b57a93 Author: Mauro Carvalho Chehab Date: Fri Apr 23 17:19:11 2021 +0200 staging: media: rkvdec: fix pm_runtime_get_sync() usage count The pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. Replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") in order to properly decrement the usage counter, avoiding a potential PM usage counter leak. Reviewed-by: Ezequiel Garcia Reviewed-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab commit e49a8b2cc8522a836ec2ade3d8e4dc02de6f4d67 Author: Janusz Krzysztofik Date: Fri May 7 16:42:51 2021 +0200 drm/i915/gt: Do release kernel context if breadcrumb measure fails Commit fb5970da1b42 ("drm/i915/gt: Use the kernel_context to measure the breadcrumb size") reordered some operations inside engine_init_common() and added an error unwind path to that function. In that path, a reference to a kernel context candidate supposed to be released on error was put, but the context, pinned when created, was not unpinned first. Fix it by replacing intel_context_put() with destroy_pinned_context() introduced later by commit b436a5f8b6c8 ("drm/i915/gt: Track all timelines created using the HWSP"). Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210507144251.376538-1-janusz.krzysztofik@linux.intel.com commit 706321a53857f99f00fce0bc0ed1fa2102896c46 Author: Martin Kaiser Date: Wed May 5 22:26:22 2021 +0200 staging: rtl8188eu: remove padapter from struct mlme_ext_priv struct mlme_ext_priv is an element of struct adapter. Use container_of to get a pointer to the enclosing struct. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210505202622.11087-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 24aa9caccbe13fde07b92f03e6fc097a8e3fbd34 Author: Martin Kaiser Date: Wed May 5 22:26:20 2021 +0200 staging: rtl8188eu: remove padapter from struct cmd_priv struct cmd_priv is an element of struct adapter. Use container_of to get a pointer to the enclosing struct. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210505202622.11087-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 286d6003391858e6beeaa674d90578bd4aff3010 Author: Martin Kaiser Date: Wed May 5 22:26:19 2021 +0200 staging: rtl8188eu: don't block until cmdthread runs rtw_start_drv_threads starts a cmdthread that runs in a loop. It reads a command from a queue and processes it. There's no need for any synchronization when this thread is started. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210505202622.11087-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 13d68881bf0a9fb9dd5bd2dd975e614946821586 Author: Martin Kaiser Date: Wed May 5 22:26:18 2021 +0200 staging: rtl8188eu: rtw_init_cmd_priv never fails Change the return type to void. Remove unnecessary error handling. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210505202622.11087-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 2752fc4182e2dc148020096b7b2f593523c700f2 Author: Martin Kaiser Date: Wed May 5 22:26:17 2021 +0200 staging: rtl8188eu: make rtw_android_cmdstr_to_num static This function is used only in rtw_android.c. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210505202622.11087-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 0e7babd3c6533a829612dad1c941ca6a2d9ea050 Author: Sergio Paracuellos Date: Wed May 5 15:21:54 2021 +0200 staging: mt7621-dts: use standard 'syscon' string Both 'memc' and 'sysc' nodes are not using 'syscon' as a node string which is the standard one to be used. Update both of them. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505132154.8263-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit b619c322021f934517e54d0d41003bcd4c1bef3c Author: Sergio Paracuellos Date: Wed May 5 15:21:53 2021 +0200 staging: mt7621-dts: remove ethsys node DT 'ethsys' node is being configured as a syscon to get access to reset and other registers in the 'mediateķ,mt7621-eth' driver. Since the 'sysc' is also a syscon, provides the clock and also is virtually mapped from the same physical address 0x1e000000 we can just use 'sysc' as the phandle for the syscon in the ethernet node. Compatible string 'mediatek,mt7621-ethsys' of the node is not being used anywhere inside the kernel so, this node can be safely removed. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505132154.8263-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit a3417158b9321bbaf21d967f85cdd049ff2f5685 Author: Uwe Kleine-König Date: Wed May 5 22:29:23 2021 +0200 staging: fieldbus: anybus: Refuse registering drivers without .probe() A driver without .probe() callback could never bind to a device because anybus_bus_probe() returned an error for such a driver. So refuse to register such a useless driver. Reviewed-by: Sven Van Asbroeck Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210505202923.198607-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 32dcd0724237a435983f9cf60005513c9ae48e44 Author: Uwe Kleine-König Date: Wed May 5 22:29:22 2021 +0200 staging: fieldbus: anybus: Make remove callback return void The driver core ignores the return value of struct bus_type::remove() because there is only little that can be done. To simplify the quest to make this function return void, let struct anybuss_client_driver::remove() return void, too. All users already unconditionally return 0, this commit makes it obvious that returning an error code is a bad idea. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210505202923.198607-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit cc1966a7e0844922c463e06a61d4ef60aa2644b9 Author: Sergio Paracuellos Date: Wed May 5 14:17:36 2021 +0200 staging: mt7621-dts: properly organize pcie node Device tree pcie node for this SoC is using different styles in its different properties. Hence properly unify them to be able to write a a proper yaml schema documentation. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-11-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 706737d2980795b6d619e08e513a682e8c618605 Author: Sergio Paracuellos Date: Wed May 5 14:17:35 2021 +0200 staging: mt7621-dts: use 'interrupt-map' and 'interrupt-map-mask' Custom function for 'map_irq' was introduced in commit fab6710e4c51 ("staging: mt7621-pci: fix PCIe interrupt mapping") This is not really necessary and code has been fixed to avoid custom configuration of the virtual bridges and make possible to properly map the root ports interrupts using this standard properties. Hence properly update device tree accordly. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-10-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7fa708e061b72a2d50b1d7075d9b4759490a3e47 Author: Sergio Paracuellos Date: Wed May 5 14:17:34 2021 +0200 staging: mt7621-pci: remove two blank lines There are useless two blank lines in code that can be removed. Hence, remove them. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-9-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit b99cc3a2b6b62cf994acac5cced03298d9908c9b Author: Sergio Paracuellos Date: Wed May 5 14:17:33 2021 +0200 staging: mt7621-pci: avoid custom 'map_irq' function Custom function for 'map_irq' was introduced in commit fab6710e4c51 ("staging: mt7621-pci: fix PCIe interrupt mapping") After some testing in an adquired device with a similar pci layout that those that was having problems, I got into a better way to solve the issue just using device tree 'interrupt-map' and 'interrupt-map-mask' properties. For this to be possible we must avoid custom configuration of the virtual bridges registers from driver code. Doing in this way buses are not reconfigured so we can properly use bus related bits and mask in device tree to map correctly the interrupts. Hence remove custom configuration of the bridges as well as custom 'map_irq' related stuff. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-8-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 35d96b88e7636da9f2817292de88e5128afd2669 Author: Sergio Paracuellos Date: Wed May 5 14:17:32 2021 +0200 staging: mt7621-pci: directly return 'mt7621_pcie_register_host' Return code after call function 'mt7621_pcie_register_host' is being checked to give an error message. This function internally is calling 'pci_host_probe' which if something fails will complain already. Hence, directly return result of this call making decrease a bit LOC. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-7-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ab4ca2015eaeb16bbc6f2d8bd11384e2e52abd5 Author: Sergio Paracuellos Date: Wed May 5 14:17:31 2021 +0200 staging: mt7621-pci: replace mdelay with msleep There are two mdelay calls in driver code located in 'mt7621_pcie_reset_assert' and 'mt7621_pcie_reset_rc_deassert' functions. Both of them are not called in an interrupt handler nor holding any spinlock. Hence, the function mdelay in them can be replaced with msleep, to reduce busy wait. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-6-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 726eb31628d484b86ecd17eb6404be2f6b7b420a Author: Sergio Paracuellos Date: Wed May 5 14:17:30 2021 +0200 staging: mt7621-pci: group io resource assignments all together To improve a bit readabily group all the IO resource related assignments together. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-5-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit c92454a42b955a25a18a655b9ebeb81c2579f465 Author: Sergio Paracuellos Date: Wed May 5 14:17:29 2021 +0200 staging: mt7621-pci: remove some not needed includes Some includes used here are not really necessary for the code to compile properly. Hence remove them. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-4-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96c310c1a2b69faa958e7400c086631df4d57cc9 Author: Sergio Paracuellos Date: Wed May 5 14:17:28 2021 +0200 staging: mt7621-pci: avoid to set gpio mode in driver Gpio mode for the pcie pins must be request from device tree using pinctrl driver. Pinctrl driver is already setting this pcie pins as GPIO if it is requested. Hence, remove it from here. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-3-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit cc4e864a5ce4c1c18f3df9bcdba06e69b074149f Author: Sergio Paracuellos Date: Wed May 5 14:17:27 2021 +0200 staging: mt7621-pci: make use of kernel clock apis MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' Hence, we can make use of kernel clock apis and avoid to directly set bits in clock gate related registers for pci. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210505121736.6459-2-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3d3a170f6d8011782511eddd5f0acd327beb2679 Author: Fabio Aiuto Date: Tue May 4 16:51:40 2021 +0200 staging: rtl8723bs: use in-kernel aes encryption replace private aes encryption subroutines with public in-kernel ones in data frame encryption. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/bd1f47994d3a1d0f434de5b2095c327f5a25f6ef.1620139727.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d40753d8820811cb08165be553b29f13a5e53b8 Author: Fabio Aiuto Date: Tue May 4 16:51:39 2021 +0200 staging: rtl8723bs: use in-kernel aes encryption in OMAC1 routines replace private aes encryption subroutines with public in-kernel ones in OMAC1 computation routines. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/11ac26487aab92ded28747c1f0cb42a94183130d.1620139727.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41c014b8659daccc4e88988633f12da633a1a7ce Author: Fabio Aiuto Date: Tue May 4 16:51:38 2021 +0200 staging: rtl8723bs: align argument position in a new line align function arguments position on a new line to open parentheses. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f195bc7d72c122e5e16b3857cf99ae1f84734915.1620139727.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 801deaf91add849c5166ea1053080ea385377cd8 Author: Andy Shevchenko Date: Mon May 3 20:21:14 2021 +0300 staging: fbtft: Update TODO Now, after a few fixes we may consider the conversion to the GPIO descriptor API is done. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210503172114.27891-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 982192e2a1b3152d4ccc4483d1967d3ca672ad7d Author: Andy Shevchenko Date: Mon May 3 20:21:13 2021 +0300 staging: fbtft: Replace custom ->reset() with generic one The custom ->reset() repeats the generic one, replace it. Note, in newer kernels the context of the function is a sleeping one, it's fine to switch over to the sleeping functions. Keeping the reset line asserted longer than 20 microseconds is also okay, it's an idling state of the hardware. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210503172114.27891-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fd4c5961d8193a5bc3e7f8d5f94c9b469c037394 Author: Andy Shevchenko Date: Mon May 3 20:21:12 2021 +0300 staging: fbtft: Add support for orientation on Himax HX8347d Himax HX8347d has non-standard register to control orientation. Add support for different orientation values. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210503172114.27891-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 37667f6e57712cef5652fa67f1cbd1299e204d94 Author: Andy Shevchenko Date: Mon May 3 20:21:11 2021 +0300 staging: fbtft: Don't spam logs when probe is deferred When requesting GPIO line the probe can be deferred. In such case don't spam logs with an error message. This can be achieved by switching to dev_err_probe(). Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Cc: Nishad Kamdar Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210503172114.27891-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ec03c2104365ead0a33627c05e685093eed3eaef Author: Andy Shevchenko Date: Mon May 3 20:21:10 2021 +0300 staging: fbtft: Rectify GPIO handling The infamous commit c440eee1a7a1 ("Staging: staging: fbtft: Switch to the GPIO descriptor interface") broke GPIO handling completely. It has already four commits to rectify and it seems not enough. In order to fix the mess here we: 1) Set default to "inactive" for all requested pins 2) Fix CS#, RD#, and WR# pins polarity since it's active low and GPIO descriptor interface takes it into consideration from the Device Tree or ACPI 3) Consolidate chip activation (CS# assertion) under default ->reset() callback To summarize the expectations about polarity for GPIOs: RD# Low WR# Low CS# Low RESET# Low DC or RS High RW High Data 0 .. 15 High See also Adafruit learning course [1] for the example of the schematics. While at it, drop unneeded NULL checks, since GPIO API is tolerant to that. [1]: https://learn.adafruit.com/adafruit-2-8-and-3-2-color-tft-touchscreen-breakout-v2/downloads Fixes: 92e3e884887c ("Staging: fbtft: Fix GPIO handling") Fixes: b918d1c27066 ("Staging: fbtft: Fix reset assertion when using gpio descriptor") Fixes: dbc4f989c878 ("Staging: fbtft: Fix probing of gpio descriptor") Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Cc: Jan Sebastian Götte Cc: Nishad Kamdar Reviewed-by: Phil Reid Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210503172114.27891-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0d59ca5a7ed1195feacc99560f91004d334aa4a9 Author: Fabio Aiuto Date: Fri Apr 30 16:57:05 2021 +0200 staging: rtl8723bs: remove odm_debug.h header file remove obsolete odm_debug.h header file. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/58f3ed0c7706fdb33614d3e38ed802d56d77f0ec.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cad68fc834311bc8db937ec4d9400b141e97b7a Author: Fabio Aiuto Date: Fri Apr 30 16:57:04 2021 +0200 staging: rtl8723bs: remove DebugLevel member in dm_odm_t struct remove DebugLevel in dm_odm_t struct, remove private debug level tracing. remove unused variable as well to suppress compiler warning. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ac4afb00f904511e0cbb23136f8e7a3e204ad7ed.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae75f934658c33772f809bc75e51499183283744 Author: Fabio Aiuto Date: Fri Apr 30 16:57:03 2021 +0200 staging: rtl8723bs: remove member in dm_odm_t struct remove DebugComponent in dm_odm_t struct, remove private debug component tracing. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/313d08514d2105c826ef3c92555fa557def2b9c2.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 83147d899eb8ddbe963fde14efa898b3898b3f80 Author: Fabio Aiuto Date: Fri Apr 30 16:57:02 2021 +0200 staging: rtl8723bs: remove empty hal/odm_debug.c file remove file left empty after function deletion. remove related target in Makefile. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0bd6ce2da09a5e2a671dc4a53f1c2e7ba1a64066.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4f7cffcfe49f4a7c6a6caae133920dcb069e5d8e Author: Fabio Aiuto Date: Fri Apr 30 16:57:01 2021 +0200 staging: rtl8723bs: remove ODM_InitDebugSetting() function remove ODM_InitDebugSetting() function. It was intended to initialize removed private debug system. So remove it. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6a8524b780674d05f33977eb86878d95c7338a1a.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 603693d1cf878eb0b909c4af2897ac4e4aeb875c Author: Fabio Aiuto Date: Fri Apr 30 16:57:00 2021 +0200 staging: rtl8723bs: remove RT_DISP macro definition remove unused RT_DISP macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8983c3077979830aec02427ed895507213b38f95.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3a96d356b9fd264e48decbc4d0ea77d0e8b0ee3d Author: Fabio Aiuto Date: Fri Apr 30 16:56:59 2021 +0200 staging: rtl8723bs: remove commented out *RT_DISP logs remove commented out ODM_RT_DISP and RT_DISP logs. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/23b7764fc40e1b201952be79e94e0782cf33d546.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 367fce0d9e920957530cd5bfb5eb8db66f1f6f6c Author: Fabio Aiuto Date: Fri Apr 30 16:56:58 2021 +0200 staging: rtl8723bs: remove unused DbgPrint macro remove unused DbgPrint macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/00e9b407fa1a7c911295b2fec215d82f5da058f8.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ce75c4f9ecb5ef8eb98fd42124a88269608ceba Author: Fabio Aiuto Date: Fri Apr 30 16:56:57 2021 +0200 staging: rtl8723bs: remove commented out DbgPrint logs remove commented out DbgPrint logs. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/63eb0244a9e25d5633d78b67fd5a0c61cb48d83e.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76c80b8931b02d5daeb0b3793410765e0f23ac88 Author: Fabio Aiuto Date: Fri Apr 30 16:56:56 2021 +0200 staging: rtl8723bs: remove obsolete debug macros remove obsolete debug macros. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a35b084444ca423ba3b8a212c38b974535a7048c.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f71c344766a38af1bce74a1b5317a44a9393d900 Author: Fabio Aiuto Date: Fri Apr 30 16:56:55 2021 +0200 staging: rtl8723bs: remove unused enum remove unused enum. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/029a9639ef046e44defc59854d6bb9a86dd3db4f.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0a21a60afb009bbd1b375418aa47b6ff958403f Author: Fabio Aiuto Date: Fri Apr 30 16:56:54 2021 +0200 staging: rtl8723bs: remove obsolete GLBtcDbgType array declarations remove obsolete GLBtcDbgType declarations for it was intended for private debug facilities. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/000825941048c41cc53a0cc675fae2b45b781aad.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e7f0be6415a02b61585fe79be6e70521308e9ed1 Author: Fabio Aiuto Date: Fri Apr 30 16:56:53 2021 +0200 staging: rtl8723bs: remove unnecessary halbtcoutsrc_DbgInit() function halbtcoutsrc_DbgInit() static function was intended for manual activation of private tracing facilities. So remove it. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f6c4f680b2d0ee8850f97532ca76dd405c1d50c3.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c8fc131b499468c87fd7c6aea4d7514d114aaba5 Author: Fabio Aiuto Date: Fri Apr 30 16:56:52 2021 +0200 staging: rtl8723bs: remove hal_btcoex_GetDBG() function remove unused hal_btcoex_GetDBG() function definition and prototype. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8b06dc12a65ef15f3e67bd32d097dc4db3f78586.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2732143564295b569ee7beeda6fb08c765bad985 Author: Fabio Aiuto Date: Fri Apr 30 16:56:51 2021 +0200 staging: rtl8723bs: remove unsed hal_btcoex_SetDBG() function remove unused hal_btcoex_SetDBG() function definition and prototype. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4f8aa4e4312777aff1aea621d26c00e81754025a.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ad91b3d47b6fb2a78f02f83f93cef66900a4a9a3 Author: Fabio Aiuto Date: Fri Apr 30 16:56:50 2021 +0200 staging: rtl8723bs: remove empty #ifdef block remove empty #ifdef block. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9a2095cfd69647dd304eb9e059a6aa9aa00694e6.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 87c596b03be78aba52c3502b83be0db520213894 Author: Fabio Aiuto Date: Fri Apr 30 16:56:49 2021 +0200 staging: rtl8723bs: remove BTC_PRINT_F macro definition remove unused BTC_PRINT_F macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/503423caee1cc2b7a8fe321e0efb546556f2887f.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2875b3bf04454bd8aa130debf1115519e47a7503 Author: Fabio Aiuto Date: Fri Apr 30 16:56:48 2021 +0200 staging: rtl8723bs: remove BTC_PRINT_DATA definitions remove unused BTC_PRINT_DATA definitions. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0b83b96133af86e73bed64d7fe35ea96b2940208.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1bd9ebfd7d1309125382358c4678f6c7e11a95ac Author: Fabio Aiuto Date: Fri Apr 30 16:56:47 2021 +0200 staging: rtl8723bs: remove BTC_PRINT_ADDR macro definitions remove unused BTC_PRINT_ADDR macro definitions. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/31af3e56cfd52f2797499d3beb38741bddaff65d.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 698a405f08e6adff8815d8bb8876c6c1ca339122 Author: Fabio Aiuto Date: Fri Apr 30 16:56:46 2021 +0200 staging: rtl8723bs: remove BTC_PRINT macro definitions remove unused BTC_PRINT macro definitions. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0f0129063880553001a2c1d8272d10079abc7132.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f003ab00a5a4c57741e1472a613be95343e548ad Author: Fabio Aiuto Date: Fri Apr 30 16:56:45 2021 +0200 staging: rtl8723bs: remove commented out BTC_PRINT logs remove commented out BTC_PRINT logs. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/dd6ea6b65cb7db15254ac6ab3fbdfcabb7e66a1a.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec0e82b45f744424c8921d6351639c2dea710b54 Author: Fabio Aiuto Date: Fri Apr 30 16:56:44 2021 +0200 staging: rtl8723bs: remove braces around single statement in if block fix following post-commit hook checkatch issue: WARNING: braces {} are not necessary for single statement blocks 21: FILE: drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:609: + if (!bBtHsOn) { algorithm = BT_8723B_1ANT_COEX_ALGO_PANEDR_HID; } Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1c95d3d0d4ccd74d4e97ee496f7a04eadd1f8ff0.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit fda6c767fbd975094eda0ca1bd38792d2e408cd0 Author: Fabio Aiuto Date: Fri Apr 30 16:56:43 2021 +0200 staging: rtl8723bs: remove empty if-else blocks after BTC_PRINT removal remove if-else blocks left empty after BTC_PRINT removal. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/102455368fa9535dc78584d7d24cd12ee4160737.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8e30fb99d729cb302f787241686a1d246dab5dfc Author: Fabio Aiuto Date: Fri Apr 30 16:56:42 2021 +0200 staging: rtl8723bs: remove BTC_PRINT logs Remove BTC_PRINT logs. BTC_PRINT macro's default behavoiur is _do nothing_. It's enabled by uncommenting some code in hal/hal_btcoex.c file. So just remove it. Applied following semantic patch: @@ @@ - BTC_PRINT(...); Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9a9a8ce817929f1705b623c470cbafcc75fb3e72.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 292611481c8b019b6a2490dd4fda70b11609bbd1 Author: Fabio Aiuto Date: Fri Apr 30 16:56:41 2021 +0200 staging: rtl8723bs: remove unused RT_PRINTK macro remove unused RT_PRINTK macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/edf86e39fce8a53f52c8c8463d134ea426f58b60.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2172a6576388e63958f47923e435c46af8d006ba Author: Fabio Aiuto Date: Fri Apr 30 16:56:40 2021 +0200 staging: rtl8723bs: remove commented out RT_ASSERT occurrences remove commented out obsoete RT_ASSERT macro occurences. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3ee98d7bf1685af627e625f413de355fce58d52d.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 22a555bb47ba458e57c150c9e483e10b4b11e63b Author: Fabio Aiuto Date: Fri Apr 30 16:56:39 2021 +0200 staging: rtl8723bs: remove empty #ifndef block remove empty ifndef block. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2caae2efcfbe74cafe6aa000ca7b330cc371dca2.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae5351da40fb14d0a0c955595c3ac5711e33963d Author: Fabio Aiuto Date: Fri Apr 30 16:56:38 2021 +0200 staging: rtl8723bs: remove unused ASSERT macro remove unused do nothing ASSERT macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f13bc57cc3a821c40443dddc38258b87962774a7.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2a966470249158654aa1cc0f440fa928e416a7ae Author: Fabio Aiuto Date: Fri Apr 30 16:56:37 2021 +0200 staging: rtl8723bs: remove empty ifdef block remove empty ifdef block Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e30ccbe6cf20069e1a24a7a150d0b6241a7b57f8.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8a21160c2c49f2fc3a4112b5dd61a5a60e4723b Author: Fabio Aiuto Date: Fri Apr 30 16:56:36 2021 +0200 staging: rtl8723bs: remove unused ODM_dbg_exit macro remove unused ODM_dbg_exit macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/84b76bc814f44e3b2da92318b05f101f59cf0889.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 187f0a97333c7949345cce12f37d7862811321f7 Author: Fabio Aiuto Date: Fri Apr 30 16:56:35 2021 +0200 staging: rtl8723bs: remove unused ODM_dbg_enter remove unused ODM_dbg_enter macro definition. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b52f307265b7662bc6a02eac56dec92b3613a58c.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b5edd20dfef03bfdec1b449f4c619fb6abbb1a9e Author: Fabio Aiuto Date: Fri Apr 30 16:56:34 2021 +0200 staging: rtl8723bs: remove unused ODM_dbg_trace macro remove unused ODM_dbg_trace macro definitions. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ed3cc3b2c0df4f3c3f691b353f181f7c22309dbd.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 37066837974ed5a43f6ed4c743cdf98731940e36 Author: Fabio Aiuto Date: Fri Apr 30 16:56:33 2021 +0200 staging: rtl8723bs: remove unused ODM_PRINT_ADDR macro remove unused ODM_PRINT_ADDR macro definitions. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8f04c3b8b841efc4271d4a7ef71a95e04894d64a.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c87fd54d55259dba8cb13d078223ed52c4a288c Author: Fabio Aiuto Date: Fri Apr 30 16:56:32 2021 +0200 staging: rtl8723bs: remove unused ODM_RT_ASSERT macro remove unused ODM_RT_ASSERT macro declarations. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4d9fd27f60d1ef4bf8384d411885d05c6d40768e.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 57c73cb6fdbac1660c77ae1775c0f46276f64170 Author: Fabio Aiuto Date: Fri Apr 30 16:56:31 2021 +0200 staging: rtl8723bs: replace ODM_RT_ASSERT with netdev_dbg() replace ODM_RT_ASSERT with netdev dbg. Marco ODM_RT_ASSERT wraps a raw prink and prints a message everytime second argument is false. This occurrence prints always, so replace it with netdev_dbg() Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3f172aaefb84aaac639f1850c5eb45678578e393.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9e517aca02cf10e9b55b4d785b0cdee21e090125 Author: Fabio Aiuto Date: Fri Apr 30 16:56:30 2021 +0200 staging: rtl8723bs: remove all commented out ODM_RT_TRACE logs remove all commented out ODM_RT_TRACE logs. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a98ce6637bb15de79997325a78672fc81c48cd6a.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 364787f9415057c29e81b8b758d72137cbf44ebb Author: Fabio Aiuto Date: Fri Apr 30 16:56:29 2021 +0200 staging: rtl8723bs: remove ODM_RT_TRACE* unused macro defs remove unused ODM_RT_TRACE* macro defs. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f0feec848702a12594bb67acceb42f4be647088e.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7081d290d32be5db29395c802d5174b72b4182c0 Author: Fabio Aiuto Date: Fri Apr 30 16:56:28 2021 +0200 staging: rtl8723bs: remove empty header file remove empty header file. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5f38543b96f491cf9a11bb8cda17e5be754a3636.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 466bd365857df8aa71551d3e673c1b045507f42d Author: Fabio Aiuto Date: Fri Apr 30 16:56:27 2021 +0200 staging: rtl8723bs: remove undefined function prototypes remove undefined function prototypes. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/77c0c9027448be020a00e7ded9ffeb967341b588.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8b2a605a6e6e8da3b34f9bc6ea6a90b25a92ce1f Author: Fabio Aiuto Date: Fri Apr 30 16:56:26 2021 +0200 staging: rtl8723bs: remove empty hal/odm_PathDiv.c source file remove empty hal/odm_PathDiv.c source file. remove related target in Makefile. Reported-by: kernel test robot Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/90ebcf46a58375ae25d51638ae91fa40521c6c06.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2523c9978e0035e1d905ff7f7ae0831027559646 Author: Fabio Aiuto Date: Fri Apr 30 16:56:25 2021 +0200 staging: rtl8723bs: remove empty functions remove functions left empty after ODM_RT_TRACE deletion. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2a0606394fec2cbb32df6ec0bf4b5974416195f6.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7fa2973a1a6b5b2cec1250f341b02abc7df23f61 Author: Fabio Aiuto Date: Fri Apr 30 16:56:24 2021 +0200 staging: rtl8723bs: remove if-else blocks left empty by ODM_RT_TRACE deletion remove if-else blocks left empty by ODM_RT_TRACE deletion. remove unused variables to suppress compiler warnings. Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0e1196ebf56787f62dcbfbcba1fcbc2ed37a65ce.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a76455587f1d899deb73c1fcd1c271d66759952a Author: Fabio Aiuto Date: Fri Apr 30 16:56:23 2021 +0200 staging: rtl8723bs: remove ODM_RT_TRACE logs remove all ODM_RT_TRACE logs. ODM_RT_TRACE macro default behaviour is _trace nothing_. To enable it a hand code edit is needed in hal/odm_debug.c. So just remove it. Applied the semantic patch: @@ @@ - ODM_RT_TRACE(...); Reviewed-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/23e21c100ba4f0753c6f03a1bb28d9bd7729b64b.1619794331.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b3cd518c5abd42fbc747ef55a5fdc40bf7bf01c0 Author: Guenter Roeck Date: Wed Apr 28 10:33:01 2021 -0700 staging: rtl8723bs: Use list iterators and helpers The rtl8723bs driver manually re-implements list helper functions and macros in various ways. Replace with existing list helpers. The following coccinelle script was used to convert the code. @@ identifier v1, v2, v3, v4; symbol next; expression e; iterator name list_for_each; statement S; @@ <+... ( - e = v1->next; | - e = get_next(v1); ) ... when != e - while ( \( v1 != e \| e != v1 \) ) + list_for_each (e, v1) { ... - v2 = container_of(e, struct v3, v4); + v2 = list_entry(e, struct v3, v4); ?- if (!v2) S ... ( - e = e->next; | - e = get_next(e); ) ... when != e } ...+> @@ identifier v1, v2, v3, v4; symbol next; expression e; iterator name list_for_each; statement S; @@ <+... ( - e = v1->next; | - e = get_next(v1); ) ... when != e - while (1) + list_for_each (e, v1) { - if ( \( e == v1 \| v1 == e \) ) - break; ... - v2 = container_of(e, struct v3, v4); + v2 = list_entry(e, struct v3, v4); ?- if (!v2) S ... ( - e = e->next; | - e = get_next(e); ) ... when != e } ...+> Manually fixed up formatting, and added auto-removed comments back in. Compile tested only. Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210428173301.149619-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 33ed2b7079f6c38abce6abbaf1e6be4edad919d8 Author: Christophe JAILLET Date: Sun May 2 13:30:06 2021 +0200 staging: rtl8188eu: remove enum WIFI_FRAME_SUBTYPE The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define IEEE80211_STYPE_xxx from . Special care must be taken for control and data frame, because the coding of the frame type is not included in the IEEE80211_STYPE_xxx values and must be added explicitly. There is no problem for management frame because the type si coded as (0) (in rtl8188eu) and (0x0000) (in ). Values used for control frame (WIFI_PSPOLL) must be OR'eded with IEEE80211_FTYPE_CTL. Values used for data frame (WIFI_DATA_NULL and WIFI_QOS_DATA_NULL) must be OR'ed with IEEE80211_FTYPE_DATA. Use theses values to avoid code duplication. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/7c1007d5706a42e0ba1fe805089fab523f9db7ea.1619953884.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 116138c3bd34f92e550431d495db515f5ea19f13 Author: Christophe JAILLET Date: Sun May 2 09:21:08 2021 +0200 staging: rtl8712: Fix some tests against some 'data' subtype frames Commit 6e2baa44c6d1 ("staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE") was wrong because: WIFI_DATA_NULL != IEEE80211_STYPE_NULLFUNC WIFI_DATA_CFACK != IEEE80211_STYPE_DATA_CFACK WIFI_DATA_CFPOLL != IEEE80211_STYPE_DATA_CFPOLL WIFI_DATA_CFACKPOLL != IEEE80211_STYPE_DATA_CFACKPOLL the WIFI_DATA_xxx definitions include WIFI_DATA_TYPE, which is 'BIT(3)'. Restore the previous behavior by adding the missing 'IEEE80211_FTYPE_DATA |' (0x0008, that is to say BIT(3)) when these values are used. Hopefully, the wrong commit was small enough and hand review is possible. Fixes: 6e2baa44c6d1 ("staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/44aebfa3c5ce8f45ae05369c73e9ff77c6d271f9.1619939806.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit a616d1212a7a7efb2d62a9433a2fdcfc933d9a83 Author: Saurav Girepunje Date: Wed Apr 28 23:25:20 2021 +0530 staging: rtl8723bs: Change the return type Remove the ret variable in rtw_suspend_common() and change the return type from int to void as rtw_suspend_common() always return zero unconditionally. Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210428175520.GA8921@user Signed-off-by: Greg Kroah-Hartman commit 62409b31dbb54fe0e6facc7644deefd3c5eb373d Author: Alexander Vorwerk Date: Sun May 2 01:45:01 2021 +0200 staging: rtl8712: remove multiple multiple assignments Documentation/process/coding-style.rst says (in line 88) "Don't put multiple assignments on a single line either." This patch fixes the coding style issue reported by checkpatch.pl. Signed-off-by: Alexander Vorwerk Link: https://lore.kernel.org/r/20210501234501.5411-1-alec@vc-celle.de Signed-off-by: Greg Kroah-Hartman commit 84b45d4ff9e00ac37bfd3d64f00ec13ca17c2551 Author: zhaoxiao Date: Fri Apr 30 20:56:57 2021 +0800 staging: rtl8192e: replace comparison to NULL by bool Fixed Comparison to NULL can be written as '!...' by replacing it with simpler form i.e boolean expression. This makes code more readable alternative. Reported by checkpatch. Signed-off-by: zhaoxiao Link: https://lore.kernel.org/r/20210430125657.18264-1-zhaoxiao@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 66d708e655afd89dc3a80e38412b9cf848a3e25a Author: zhaoxiao Date: Fri Apr 30 20:28:25 2021 +0800 staging: rtl8192e: remove unnecesasry ftrace-like logging Fixed Check: Remove unnecessary ftrace-like logging by simply deleting that statement as we have other modes of logging like ftrace. Reported by checkpatch. Signed-off-by: zhaoxiao Link: https://lore.kernel.org/r/20210430122826.9899-1-zhaoxiao@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 5e7106f6c96a9d4d7290e6406c91d70ea5842fa6 Author: Fabio M. De Francesco Date: Fri Apr 30 11:53:19 2021 +0200 staging: rtl8723bs: core: Remove set but unused variable Removed set but unused variable. Issue detected by gcc. Reviewed-by: Dan Carpenter Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210430095319.23226-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit bd8d4ba394c4247d3a719aeae4267d92a6a23516 Author: Fabio M. De Francesco Date: Fri Apr 30 11:53:18 2021 +0200 staging: rtl8723bs: hal: Remove set but unused variables Removed four set but unused variables. Issue detected by gcc. Reviewed-by: Dan Carpenter Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210430095319.23226-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit cab7759088897152559291043f0df604e1725c32 Author: Saurav Girepunje Date: Wed Apr 28 21:10:11 2021 +0530 staging: rtl8723bs: core: remove unneeded variable Below are the changes: Remove unneeded variable "u8 *pbuf" from function start_bss_network argument as this can be get from first argument "padapter" Remove the struct wlan_bssid_ex *network from createbss_hdl function as this is only used to pass as second argument to start_bss_network() Remove the struct mlme_priv *mlmepriv from rtw_ap_restore_network function as this is only used to pass as second argument to start_bss_network() Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210428154011.GA5571@user Signed-off-by: Greg Kroah-Hartman commit ac76b43834059519954d43e72748428b22677e10 Author: Fabio Aiuto Date: Wed Apr 28 09:28:05 2021 +0200 staging: rtl8723bs: remove unused macro DRIVER_PREFIX remove unused macro DRIVER_PREFIX. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2fac5d7f2334f0a9765f2ddfb31502323e49fce1.1619594707.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 89bbf2a5136eff891b222e1bfa7cc20e51127f2c Author: Fabio Aiuto Date: Wed Apr 28 09:28:04 2021 +0200 staging: rtl8723bs: remove unnecessary hex dumps Remove unnecessary hex dumps in kernel log. This deletion has been done with the following semantic patch: @@ @@ - print_hex_dump_debug(...); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8bbf5ce17f2d778a67e86cb948395e9ed27478d9.1619594707.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5660634d8d48e2d5f9b528e057455c9bc657b0b1 Author: Iain Craig Date: Wed Apr 28 07:17:34 2021 -0700 staging: rtl8192u: fix typos in comments correct spelling errors across 8 lines of comments. Signed-off-by: Iain Craig Link: https://lore.kernel.org/r/20210428141734.GA2498@ubuntu Signed-off-by: Greg Kroah-Hartman commit 3580942c864f90d4eedfbcdf08cdd66ca51494d2 Author: Guenter Roeck Date: Wed Apr 28 10:35:23 2021 -0700 staging: rtl8712: Use list iterators and helpers Use existing list iterators and helper functions. The following coccinelle script was used to convert the code. @@ identifier v1, v2, v3, v4; symbol next; expression e; iterator name list_for_each; statement S; @@ <+... ( - e = v1->next; | - e = get_next(v1); ) ... when != e - while ( \( v1 != e \| e != v1 \) ) + list_for_each (e, v1) { ... - v2 = container_of(e, struct v3, v4); + v2 = list_entry(e, struct v3, v4); ?- if (!v2) S ... ( - e = e->next; | - e = get_next(e); ) ... when != e } ...+> Compile tested only. Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210428173523.149958-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 23017c8842d2b067e3d6ff927e10af61cd65f3a0 Author: Guenter Roeck Date: Wed Apr 28 09:35:22 2021 -0700 staging: rtl8188eu: Use list iterators and helpers The rtl8188eu manually re-implements list helper functions and macros in various ways. Replace with existing list helpers. The following coccinelle script was used to convert the code. @@ identifier v1, v2, v3, v4; symbol next; expression e; iterator name list_for_each; statement S; @@ <+... ( - e = v1->next; | - e = get_next(v1); ) ... when != e - while ( \( v1 != e \| e != v1 \) ) + list_for_each (e, v1) { ... - v2 = container_of(e, struct v3, v4); + v2 = list_entry(e, struct v3, v4); ?- if (!v2) S ... ( - e = e->next; | - e = get_next(e); ) ... when != e } ...+> @@ identifier v1, v2, v3, v4; symbol next; expression e; iterator name list_for_each; statement S; @@ <+... ( - e = v1->next; | - e = get_next(v1); ) ... when != e - while (1) + list_for_each (e, v1) { - if ( \( e == v1 \| v1 == e \) ) - break; ... - v2 = container_of(e, struct v3, v4); + v2 = list_entry(e, struct v3, v4); ?- if (!v2) S ... ( - e = e->next; | - e = get_next(e); ) ... when != e } ...+> Manually fixed up formatting, and added autoremoved comments back in. Compile tested only. Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210428163522.129189-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit b1e9109aeff366d7e1934e8b3ef8025684c9f6e8 Author: Ashish Kalra Date: Sat May 1 19:22:41 2021 +0530 staging: wlan-ng: silence incorrect type in argument 1 (different address spaces) Currently p80211knetdev_do_ioctl use type casting to req->data to prevent sparse warning while calling memdup_user, instead of type casting it here, its better to change data type for data inside p80211ioctl_req to include __user. Signed-off-by: Ashish Kalra Link: https://lore.kernel.org/r/YI1dKdfBKaSh3J8v@ashish-NUC8i5BEH Signed-off-by: Greg Kroah-Hartman commit acbc0849bd30c28a35f8404e75c0ac5bc50fef1f Author: Fabio Aiuto Date: Sat Apr 24 11:02:33 2021 +0200 staging: rtl8723bs: macro DRIVER_PREFIX expands to lowercase driver name macro DRIVER_PREFIX expands to lowercase driver name. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c986e9a3c9b2f73cb784bd5dc7c877eb9a669c89.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a155c08c0b71cd6f200d48a34d69dc134da6b45 Author: Fabio Aiuto Date: Sat Apr 24 11:02:32 2021 +0200 staging: rtl8723bs: remove last unused debug macros remove last unused debug macros. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3baf120a9e99d087968e8db55e2b1c33ae5c5e8a.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4a98eb30e4654b47751530b86271648262ba49d6 Author: Fabio Aiuto Date: Sat Apr 24 11:02:31 2021 +0200 staging: rtl8723bs: remove unsed debug macros tied to no particular code debug remove unused debug macros tied to no particular code debug Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a16431ce89e313029c09381f78bb0f58c23fd7e2.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f3103bf4f07f5f8390caf6ce9f1e7861cdc6704 Author: Fabio Aiuto Date: Sat Apr 24 11:02:30 2021 +0200 staging: rtl8723bs: remove unused macros tied to core/rtw_efuse.c debug remove unused macros tied to core/rtw_efuse.c debug. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/13673f9241ca482e6f02cfb16a765dd0c4feaa84.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e5ec9bf4a0f5ea7da802cf0411f00f38646f34df Author: Fabio Aiuto Date: Sat Apr 24 11:02:29 2021 +0200 staging: rtl8723bs: remove unused debug macro definitions remove unused debug macro definitions. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/02f0a7ad7ad00dbafeaee1796f62f8f2e921d772.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9727c55874f1e8caafdbe0c261a22ae69b76019 Author: Fabio Aiuto Date: Sat Apr 24 11:02:28 2021 +0200 staging: rtl8723bs: remove commented out macro definition remove commented out debug macro definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2b56922e8e4c5fde6e594a9bbeb888bf7717015d.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d8fff53cd7a46d1aaaa3f88efaa93851a8cbcb7 Author: Fabio Aiuto Date: Sat Apr 24 11:02:27 2021 +0200 staging: rtl8723bs: remove unused macros tied to _RTL8712_CMD_C_ definition remove unused macros tied to _RTL8712_CMD_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5e4a8015eaca090e8a4df872760c9a1556ff551f.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d0ffbfae136a4b0acaaa1aef883c77b990b9fe60 Author: Fabio Aiuto Date: Sat Apr 24 11:02:26 2021 +0200 staging: rtl8723bs: remove unused macros tied to _RTL871X_IOCTL_LINUX_C definition remove unused macros tied to _RTL871X_IOCTL_LINUX_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6c836355bb4a51a3f9925e0cc75cbce3c0b63df8.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 72b2b0467b4f0856d7d26d5b13a10ff36362be1a Author: Fabio Aiuto Date: Sat Apr 24 11:02:25 2021 +0200 staging: rtl8723bs: remove unused macros tied to _HCI_OPS_OS_C_ definition remove unused macros tied to _HCI_OPS_OS_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8cddae8116da58df3f5a9be48e618418a4c686ef.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3dc3456e0d43b6a68786cb0f6e413002bb870fc6 Author: Fabio Aiuto Date: Sat Apr 24 11:02:24 2021 +0200 staging: rtl8723bs: remove unused _module_mp_ def remove unused _module_mp_ def. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9e8945a3f4f58b32eb2ed3e943f8cc0cd6c26823.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 43a0faffd44d9fba482306e7bf65e012740ba729 Author: Fabio Aiuto Date: Sat Apr 24 11:02:23 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to os_dep/osdep_service.c debug remove unused debug macros tied to os_dep/osdep_service.c debug. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c6e1367c0cc08a06e4eefe60f1aadd25d46675c3.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 57e3a852160a3844710d8a35299dfa7eead9d954 Author: Fabio Aiuto Date: Sat Apr 24 11:02:22 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to hal/sdio_ops.c debug remove unused debug macros tied to hal/sdio_ops.c debug. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8f3acec03ecd9ece6d60404520a9ac188f718a55.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c7432a3c7ab3b9fde85f40dec35a090036fa76a8 Author: Fabio Aiuto Date: Sat Apr 24 11:02:21 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to _HCI_OPS_C_ definition remove unused debug macros tied to _HCI_OPS_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/044b8f9e0ea4f09287b73be0c65a526606c86d89.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 65b00505f1fb2ea7ba8550a231150f4a62901256 Author: Fabio Aiuto Date: Sat Apr 24 11:02:20 2021 +0200 staging: rtl8723bs: remove unused macros tied to os_dep/sdio_intf.c debug remove unused macro definitions tied to os_dep/sdio_intf.c debug. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c6f3a9d8eb1d868c869b0e37753cf7cfe15bad91.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e8bc244c28e128e794af47a22e56fa2877e77240 Author: Fabio Aiuto Date: Sat Apr 24 11:02:19 2021 +0200 staging: rtl8723bs: remove unused macros tied to core/rtw_pwrctrl.c debug remove unused macro definitions tied to core/rtw_pwrctrl.c debug. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0f746668ec65d6c188ba422778d6edc2b6eb7d91.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 74a0738db3fffe1a6d55699f03117cb6625f4781 Author: Fabio Aiuto Date: Sat Apr 24 11:02:18 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_PWRCTRL_C_ definition remove unused debug macros tied to _RTL871X_PWRCTRL_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/97a5e6be392933da40c4c31cebe7ad2d8d21cf33.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0744b91b59e2640ace1b9c5c418288bf97c0d67a Author: Fabio Aiuto Date: Sat Apr 24 11:02:17 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_QUERY_C_ definition remove unused debug macros tied to _RTL871X_IOCTL_QUERY_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9157d4b219072ef48e5e91814718d2b19d0e3b77.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8b63686eab1afabe02b72007051f8994f7bb5728 Author: Fabio Aiuto Date: Sat Apr 24 11:02:16 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_SET_C_ definition remove unused debug macros tied to _RTL871X_IOCTL_SET_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f21423d909f1c2b95cac10a715ea49af76b776b1.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ebb0a22ea4be838a32727cded1f7b23c3e5d256c Author: Fabio Aiuto Date: Sat Apr 24 11:02:15 2021 +0200 staging: rtl8723bs: remove unused debug macros tied to _RTL871X_IOCTL_C_ definition remove unused private debug macros tied to _RTL871X_IOCTL_C_ definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/216def2b5e244490debe86aafdc23cabc32f3c1e.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c529c96139a2e7efc71157f83e435ee31ecc0c52 Author: Fabio Aiuto Date: Sat Apr 24 11:02:14 2021 +0200 staging: rtl8723bs: remove debug macros related to hal/sdio_halinit.c tracing remove debug macro definitions related to hal/sdio_halinit.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0de5a9cd0c70f1a5609320e545206376a7cf4498.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3ddc92d111e4859b1233dc47c873d421088d3bf3 Author: Fabio Aiuto Date: Sat Apr 24 11:02:13 2021 +0200 staging: rtl8723bs: remove debug macros related to hal/hal_intf.c tracing remove debug macro definitions related to hal/hal_intf.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7f64d5d78b42874364f24a2fb11f664ad9988d99.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8edee4306a87e25f476ef6264ead7a1c68aa2e4e Author: Fabio Aiuto Date: Sat Apr 24 11:02:12 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_eeprom.c tracing remove debug macro definitions related to core/rtw_eeprom.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d11884043d17db211793e35e9d07a570951110e8.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5610af57dc499aa02c361c4fe166123795324f3e Author: Fabio Aiuto Date: Sat Apr 24 11:02:11 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_security.c tracing remove debug macro definitions related to core/rtw_security.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/510d1f1223156d1b613c6562aeaf86385734214c.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4c53cdb3b3ac54bf3fa9a9aced7a3e820750ce62 Author: Fabio Aiuto Date: Sat Apr 24 11:02:10 2021 +0200 staging: rtl8723bs: remove debug macros related to os_dep/os_intfs.c tracing remove debug macro definitions related to os_dep/os_intfs.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/53110c205451e641f8e24c07d36fe6cc5d087e60.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c75c38553ba061228474f4aa43ffbc601966241 Author: Fabio Aiuto Date: Sat Apr 24 11:02:09 2021 +0200 staging: rtl8723bs: remove obsolete _IO_OSDEP_C_ debug macro definition remove _IO_OSDEP_C_ debug macro definition untied to any tracing component. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ba3b9ef9a999f6039f204f5b06be45584c267af2.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c479026ce60ffe90b5dd2febcc2a86df8cd0de48 Author: Fabio Aiuto Date: Sat Apr 24 11:02:08 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_io.c tracing remove debug macro definitions related to core/rtw_io.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2c97fc0121e3dfbc97bbc1ce5bb9d4a05e5c88d4.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e45199eaa0a483d6723500455227aa768644349e Author: Fabio Aiuto Date: Sat Apr 24 11:02:07 2021 +0200 staging: rtl8723bs: remove obsolete debug macro definitions remove debug macro definition untied to any tracing component. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5bc9e69d8ba03d2bd8031bcff73b22aeed5c0912.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c747a990438f11478cf5389f91cb1250c8a9d53 Author: Fabio Aiuto Date: Sat Apr 24 11:02:06 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_cmd.c tracing remove debug macro definitions related to core/rtw_cmd.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7b32950581f7584b448ee277627fc57beb113026.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8acdc8db86d55a8a93dac132b995f4513c60f6f1 Author: Fabio Aiuto Date: Sat Apr 24 11:02:05 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_sta_mgt.c tracing remove debug macro definitions related to core/rtw_sta_mgt.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7f82e61bc21e53a6c3e5bdcd2ac0322b6ff75a47.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0b8b55ce1b9951869ec35e331dda1accfccb654 Author: Fabio Aiuto Date: Sat Apr 24 11:02:04 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_mlme_ext.c tracing remove debug macro definitions related to core/rtw_mlme_ext.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1579e958f5aa4584f6477a5b7c9bc3bd8933a5f7.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ffc49b55c97976a0efad5211139332da1e3dd709 Author: Fabio Aiuto Date: Sat Apr 24 11:02:03 2021 +0200 staging: rtl8723bs: move static array definition from header to .c file move static array definition from header to .c file. This prepare removal of a conditional compile block _RTW_MLME_EXT_C_. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/665c9d33a97954508ca9257850a5690afcf0a9a9.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit bc5c27b687302f805f695eb321e56ae90194f592 Author: Fabio Aiuto Date: Sat Apr 24 11:02:02 2021 +0200 staging: rtl8723bs: remove debug macros related to os_dep/mlme_linux.c tracing remove debug macro definitions related to os_dep/mlme_linux.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2528845d21764e95ab03d9245999b79acb2febd8.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c2f04efd30c665e5336f235f474bec6ccd64f3c1 Author: Fabio Aiuto Date: Sat Apr 24 11:02:01 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_mlme.c tracing remove debug macro definitions related to core/rtw_mlme.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5ab63de74186fb9e8f90ffed9d7557b3e2d4caed.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 93026ce6a7bb2aa24869a69a3f9d40f3467648a5 Author: Fabio Aiuto Date: Sat Apr 24 11:02:00 2021 +0200 staging: rtl8723bs: remove debug macros related to os_dep/recv_linux.c tracing remove debug macros definitions related to os_dep/recv_linux.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7461d3589ff726ad3c61bb8c6edb1f177fcb0532.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a596ef1956034340212ee2e33ca55a595a794321 Author: Fabio Aiuto Date: Sat Apr 24 11:01:59 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_recv.c tracing remove debug macros definitions related to core/rtw_recv.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5af86d4dea96caf9c84f9ac302ec060edbc2fb65.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 54f8a6ab76d7b3d45a68c053431e626cc7efc4ed Author: Fabio Aiuto Date: Sat Apr 24 11:01:58 2021 +0200 staging: rtl8723bs: remove debug macros related to os_dep/xmit_linux.c tracing remove debug macros definitions related to os_dep/xmit_linux.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ab5984670fac9e534b08ae043ddb7cd63ce60450.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ce42bc33fd4a93f129822c07a019608f9b1eeda Author: Fabio Aiuto Date: Sat Apr 24 11:01:57 2021 +0200 staging: rtl8723bs: remove debug macros related to core/rtw_xmit.c tracing remove debug macros definitions related to core/rtw_xmit.c obsolete tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/fd7f02bee9b97bf4222931710092a54892825a3a.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 67f3a1c02844012024f7dc4775a5441a070e388b Author: Fabio Aiuto Date: Sat Apr 24 11:01:56 2021 +0200 staging: rtl8723bs: remove unused debug macro definitions remove unused debug macro definitions related to private log level tracing. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/93b7f5af8f5220bd17530f7a907fa4fff4cb87d4.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ee42acab194b42c0a893ee0ed40f6b463086e6d Author: Fabio Aiuto Date: Sat Apr 24 11:01:55 2021 +0200 staging: rtl8723bs: remove unneeded header file include remove unneeded header file include. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b58b5edf820026f08cb7289c1461561ecc95d41f.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 198ffd276ff9ca4768e7174c7611e1f1b0e5e8a8 Author: Fabio Aiuto Date: Sat Apr 24 11:01:54 2021 +0200 staging: rtl8723bs: remove unused debug variables declarations and initialization remove unused debug variables extern declarations and containing #ifndef block. remove initialization as well. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d566a6eb49949c1c80df286056b9df6114c8cc97.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33a5f34c56684ec7f2b247a1ba2051a0e23a7f4c Author: Fabio Aiuto Date: Sat Apr 24 11:01:53 2021 +0200 staging: rtl8723bs: remove all defs related to _dbgdump macro remove obsolete _dbgdump macro definition, undef and empty conditional code block. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d9eaace0a9312dbc9bc5b6775489dbbb64554ed2.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit aeef75e7c4a7c9f1a8e6ee3a72aac038ae3e7305 Author: Fabio Aiuto Date: Sat Apr 24 11:01:52 2021 +0200 staging: rtl8723bs: remove unused RTW_DBGDUMP macro definition remove unused RTW_DBGDUMP macro definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5efe991636b899936f39a7efceaac9edce9da91e.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit eeec59e45cc4f9faeee62c4643fbfd4ab35f04aa Author: Fabio Aiuto Date: Sat Apr 24 11:01:51 2021 +0200 staging: rtl8723bs: remove unused rf_reg_dump() function argument remove unused function argument void *sel from rf_reg_dump. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/32d99e0a094cc59a35788c468dd3e20b486c9e20.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5d047570e0a216a0fcc5d3bebf0bab4f3ee267ee Author: Fabio Aiuto Date: Sat Apr 24 11:01:50 2021 +0200 staging: rtl8723bs: remove unused bb_reg_dump() function argument remove unused function argument void *sel from bb_reg_dump. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/62bfb844bc77818ca0595b369e64eca3b8872470.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8ce8f9f96347456ad12779e9872aec530b64bd3 Author: Fabio Aiuto Date: Sat Apr 24 11:01:49 2021 +0200 staging: rtl8723bs: remove unused mac_reg_dump() function argument remove unused function argument void *sel from mac_reg_dump. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2ae03ee765c861d1fd4237af7b8d11a918be0d76.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 10cf7747638c60cc90585184ccd37ada425858d8 Author: Fabio Aiuto Date: Sat Apr 24 11:01:48 2021 +0200 staging: rtl8723bs: remove unused _DBG_871X_LEVEL macro remove unused _DBG_871X_LEVEL macro, after DBG_871X_SEL deletion. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/83ff6acd438ad2107a9a1c9446cabb22a6c77f0a.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c106cb190cb7608e609b600d55441f97e8eb6344 Author: Fabio Aiuto Date: Sat Apr 24 11:01:47 2021 +0200 staging: rtl8723bs: remove DBG_871X_SEL macro declaration remove DBG_871X_SEL macro declaration. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1a0949adfc352d2560e9a68d340df386d94a79e8.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2867c27bf854bb2e233abbdba75cb0333d7e00ad Author: Fabio Aiuto Date: Sat Apr 24 11:01:46 2021 +0200 staging: rtl8723bs: add two functions to improve register dump in core/rtw_debug.c Beautify register dump by adding two functions printing four register values per line. This is necessary after old macro replacement with netdev_dbg(), the former wrapped a raw printk, the latter prints lots of driver information overhead per line for each call. So avoid this noisy behaviour by dumping four values on each line. Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0f3300e6b07f811c0d3fc9c6dd46e5270dfb7a54.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33fad5b4df5e2d037f17d501cdd90ff8d76fcb57 Author: Fabio Aiuto Date: Sat Apr 24 11:01:45 2021 +0200 staging: rtl8723bs: replace DBG_871X_SEL log macro with netdev_dbg() replace DBG_871X_SEL log macro with the net device driver recommended netdev_dbg(). This macro by default does a raw printk, and the alternative behaviour, never triggered is a seq_print() call. So replace with netdev_dbg(). The operation has been done with the following semantic patch script: @@ expression sel; expression list args; identifier padapter; identifier func; @@ func(..., struct adapter *padapter, ...) { <... - DBG_871X_SEL(sel, args); + netdev_dbg(padapter->pnetdev, args); ...> Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9e6a1e4dc8962bfd58375be98619c76e8e28febe.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9d1d2621248f1442ed43ffb4517db4c565dbc51f Author: Fabio Aiuto Date: Sat Apr 24 11:01:44 2021 +0200 staging: rtl8723bs: remove unused log function remove unused sd_f0_reg_dump() function. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/397a4082fa2a49c67ac7d6869284334d3fa7bea6.1619254603.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6332d14f0043a20e7bb17b4e5b40cb7925e9c32d Author: Amos Gross Date: Mon Apr 26 20:20:24 2021 +0000 Staging: rtl8188eu: rtw_ioctl_set.c: fixed indentation issue Fixed an issue for checkpatch, file was using spaces for indentation. Switched out for tabs. Signed-off-by: Amos Gross Link: https://lore.kernel.org/r/YIcgW0Av26N2Etxf@arch.localdomain Signed-off-by: Greg Kroah-Hartman commit fd11b55da4d58b75e11e8f10b8aa50393922cff9 Author: Stefan Wahren Date: Sun Apr 25 12:51:03 2021 +0200 staging: vchiq_core: drop vchiq_status from vchiq_init_state Replace the custom set of return values with proper Linux error codes for vchiq_init_state(). Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-12-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit abf2836a381a30763e24acd58da56fa615c6581a Author: Stefan Wahren Date: Sun Apr 25 12:51:02 2021 +0200 staging: vchiq_core: drop vchiq_status from vchiq_initialise Replace the custom set of return values with proper Linux error codes for vchiq_initialise(). Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-11-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit a2161d1d5e10c879a192e01b16c85f1832b45c57 Author: Stefan Wahren Date: Sun Apr 25 12:51:01 2021 +0200 staging: vchiq_core: drop vchiq_status from vchiq_set_service_option Replace the custom set of return values with proper Linux error codes for vchiq_set_service_option(). Now we can use the result directly as return value for vchiq_ioctl(). Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-10-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit a9fbd828be7fb7cf5c1af28d8f7fd34aee48c5ae Author: Stefan Wahren Date: Sun Apr 25 12:51:00 2021 +0200 staging: vchiq_arm: drop enum vchiq_status from vchiq_*_internal Replace the custom set of return values with proper Linux error codes for the following functions: vchiq_use_internal() vchiq_release_internal() vchiq_use_service_internal() vchiq_release_service_internal() Now we can use the result directly as return value for vchiq_ioctl(). Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-9-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit ae69402867b6bd4dc61e1d09078cf3eaf772f06a Author: Stefan Wahren Date: Sun Apr 25 12:50:59 2021 +0200 staging: vchiq_2835_arm: drop enum vchiq_status Replace the custom set of return values with proper Linux error codes. As a result we need to initialize vchiq_status in vchiq_init_state. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit c74541f7c7ce10b7600f00ee3bf7354dfec18985 Author: Stefan Wahren Date: Sun Apr 25 12:50:58 2021 +0200 staging: vchiq_arm: drop return value of vchiq_arm_init_state The function vchiq_arm_init_state() cannot fail. So drop the return value and the unnecessary code. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 82aa95ee2d37fdae6cbd1d7d32fd59e295fe3557 Author: Stefan Wahren Date: Sun Apr 25 12:50:57 2021 +0200 staging: vchiq_core: Drop unnecessary check in notify_bulks There is no modification to the vchiq_status before the first if, so drop this unnecessary check. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 08f31d0196cb9387ca9d2fa1720d34ae1e2cf25b Author: Stefan Wahren Date: Sun Apr 25 12:50:56 2021 +0200 staging: vchiq_core: introduce get_bulk_reason Nesting multiple ternary operators over multiple lines isn't easy to read. Move this logic into a separate inline function. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit f7ba60127a3a123c4d3439b5bc527955e8923e3d Author: Stefan Wahren Date: Sun Apr 25 12:50:55 2021 +0200 staging: vchiq_core: return early in do_abort_bulks Avoid the multiline statement for notify_bulks by return early in error case. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit bd18b980a21d9654143e7b5167ab82e82c706798 Author: Stefan Wahren Date: Sun Apr 25 12:50:54 2021 +0200 staging: vchiq_core: break early in vchiq_close_service_internal The logic in VCHIQ_SRVSTATE_OPEN* is unnecessary complex. Handle the error case of queue_message() first makes it easier to read. Btw we get the rid of the checkpatch warning: WARNING: else is not generally useful after a break or return Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit bdf2b26de6124a175d03092e89610f15ebc6a733 Author: Stefan Wahren Date: Sun Apr 25 12:50:53 2021 +0200 staging: vchiq_arm: avoid crashing the kernel Using BUG_ON in a non-essential driver isn't recommend. So better trigger a stacktrace and bailout. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1619347863-16080-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit ad843f3920354871bb26a92a8511426a662c7526 Author: Colin Ian King Date: Thu Apr 22 12:20:46 2021 +0100 staging: wlan-ng: remove redundant initialization of variable txresult The variable txresult is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210422112046.245144-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 1873cb875525b1f1fef166fb56619942401c85dc Author: Lee Jones Date: Wed Apr 14 19:11:29 2021 +0100 staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’: drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’: drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’: drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’: drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’: drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Fabio Aiuto Cc: Stanley@BB.SD3 Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-58-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 705655a2c4cb81b5d26d4d14e8a7511952dbfc48 Author: Lee Jones Date: Wed Apr 14 19:11:25 2021 +0100 staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer onto the heap Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘issue_probersp’: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2543:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-54-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e3a7f78dc096f9354b996aecc526d63dd318800c Author: Lee Jones Date: Wed Apr 14 19:11:24 2021 +0100 staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable 'func_start' Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function ‘odm_InbandNoise_Monitor_NSeries’: drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:18: warning: variable ‘func_start’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Marco Cesati Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-53-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit bbf40b2f6e38d04262cfbb68e2a9435d10e97d14 Author: Lee Jones Date: Wed Apr 14 19:11:23 2021 +0100 staging: axis-fifo: axis-fifo: Fix function naming in the documentation Fixes the following W=1 kernel build warning(s): drivers/staging/axis-fifo/axis-fifo.c:356: warning: expecting prototype for axis_fifo_write(). Prototype was for axis_fifo_read() instead Cc: Greg Kroah-Hartman Cc: Jacob Feder Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-52-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3821526719f13cc7125d21a4a74089654ed35b79 Author: Lee Jones Date: Wed Apr 14 19:11:19 2021 +0100 staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug is enabled Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘_cfg80211_rtw_mgmt_tx’: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2754:7: warning: variable ‘ack’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-48-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 433cb9f05aa9c3dad96981f92f8d117e3443fb8f Author: Lee Jones Date: Wed Apr 14 19:11:18 2021 +0100 staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused and remove another 'err' is only used if debug is enabled. Also remove 4 year old TODO. Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read32’: drivers/staging/rtl8723bs/hal/sdio_ops.c:170:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read_mem’: drivers/staging/rtl8723bs/hal/sdio_ops.c:381:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Fabio Aiuto Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-47-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 904f18483591e64de15d9cd93c2e901728269afe Author: Lee Jones Date: Wed Apr 14 19:11:16 2021 +0100 staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed functions ... and fix a misnamed param. Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:53: warning: expecting prototype for PHY_QueryBBReg(). Prototype was for PHY_QueryBBReg_8723B() instead drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:87: warning: expecting prototype for PHY_SetBBReg(). Prototype was for PHY_SetBBReg_8723B() instead drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: Function parameter or member 'RegAddr' not described in 'PHY_QueryRFReg_8723B' drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: expecting prototype for PHY_QueryRFReg(). Prototype was for PHY_QueryRFReg_8723B() instead drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:285: warning: expecting prototype for PHY_SetRFReg(). Prototype was for PHY_SetRFReg_8723B() instead Cc: Greg Kroah-Hartman Cc: karthik alapati Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-45-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 55016d099acd06ef7ff3b2c8f26cdabe2ce4024b Author: Lee Jones Date: Wed Apr 14 19:11:13 2021 +0100 staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or member 'skb' not described in 'unprotect_frame' drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or member 'iv_len' not described in 'unprotect_frame' drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or member 'icv_len' not described in 'unprotect_frame' drivers/staging/rtl8188eu/os_dep/mon.c:75: warning: Function parameter or member 'dev' not described in 'rtl88eu_mon_recv_hook' drivers/staging/rtl8188eu/os_dep/mon.c:75: warning: Function parameter or member 'frame' not described in 'rtl88eu_mon_recv_hook' drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or member 'dev' not described in 'rtl88eu_mon_xmit_hook' drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or member 'frame' not described in 'rtl88eu_mon_xmit_hook' drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or member 'frag_len' not described in 'rtl88eu_mon_xmit_hook' Cc: Larry Finger Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-42-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ad7e84ef4c213aca251a59928382ddd293486fef Author: Lee Jones Date: Wed Apr 14 19:11:12 2021 +0100 staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and dead code Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function ‘odm_InbandNoise_Monitor_NSeries’: drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:34: warning: variable ‘func_end’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Marco Cesati Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-41-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 50676c55f00e932bc6a462298ed76076d76241d3 Author: Lee Jones Date: Wed Apr 14 19:11:11 2021 +0100 staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named function Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_ieee80211.c:889: warning: expecting prototype for ieee802_11_parse_elems(). Prototype was for rtw_ieee802_11_parse_elems() instead Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-40-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f877899b9a4b48d175187d039e22b63d758b60c4 Author: Lee Jones Date: Wed Apr 14 19:11:10 2021 +0100 staging: fbtft: fb_ili9320: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/staging/fbtft/fb_ili9320.c: In function ‘read_devicecode’: drivers/staging/fbtft/fb_ili9320.c:25:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-39-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7dd8ffdbc00565bd26762f0c56cf851ee1afdc91 Author: Lee Jones Date: Wed Apr 14 19:11:09 2021 +0100 staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function ‘translate_scan’: drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:310:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_wx_set_mlme’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6: warning: variable ‘reason’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: ‘iw_operation_mode’ defined but not used [-Wunused-const-variable=] Cc: Larry Finger Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-38-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c848434c629db5d08350bfb49939f447dc1257eb Author: Lee Jones Date: Wed Apr 14 19:11:08 2021 +0100 staging: axis-fifo: axis-fifo: Fix some formatting issues Fixes the following W=1 kernel build warning(s): drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'f' not described in 'axis_fifo_read' drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'buf' not described in 'axis_fifo_read' drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'len' not described in 'axis_fifo_read' drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'off' not described in 'axis_fifo_read' drivers/staging/axis-fifo/axis-fifo.c:356: warning: expecting prototype for axis_fifo_write(). Prototype was for axis_fifo_read() instead drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'f' not described in 'axis_fifo_write' drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'buf' not described in 'axis_fifo_write' drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'len' not described in 'axis_fifo_write' drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'off' not described in 'axis_fifo_write' Cc: Greg Kroah-Hartman Cc: "John B. Wyatt IV" Cc: Jacob Feder Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-37-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 51ca97af82af8a6aa3558210d040907057451b26 Author: Lee Jones Date: Wed Apr 14 19:11:07 2021 +0100 staging: most: dim2: hal: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'buf_size' not described in 'dim_norm_isoc_buffer_size' drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'packet_length' not described in 'dim_norm_isoc_buffer_size' drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for Retrieves maximal possible correct buffer size for isochronous data type(). Prototype was for dim_norm_isoc_buffer_size() instead drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'buf_size' not described in 'dim_norm_sync_buffer_size' drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'bytes_per_frame' not described in 'dim_norm_sync_buffer_size' drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for Retrieves maximal possible correct buffer size for synchronous data type(). Prototype was for dim_norm_sync_buffer_size() instead Cc: Greg Kroah-Hartman Cc: Lee Jones Cc: Andrey Shvetsov Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-36-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7af9b4444fab2e1579202ea19b3faaf962ef437b Author: Lee Jones Date: Wed Apr 14 19:11:06 2021 +0100 staging: most: dim2: hal: Fix one kernel-doc header and demote two non-conforming ones Fixes the following W=1 kernel build warning(s): drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'buf_size' not described in 'dim_norm_isoc_buffer_size' drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'packet_length' not described in 'dim_norm_isoc_buffer_size' drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for Retrieves maximal possible correct buffer size for isochronous data type(). Prototype was for dim_norm_isoc_buffer_size() instead drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'buf_size' not described in 'dim_norm_sync_buffer_size' drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'bytes_per_frame' not described in 'dim_norm_sync_buffer_size' drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for Retrieves maximal possible correct buffer size for synchronous data type(). Prototype was for dim_norm_sync_buffer_size() instead Cc: Greg Kroah-Hartman Cc: Andrey Shvetsov Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-35-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f74afcfd9438272ad292e040ffc481f227c76da2 Author: Lee Jones Date: Wed Apr 14 19:11:05 2021 +0100 staging: most: i2c: Fix a little doc-rot Fixes the following W=1 kernel build warning(s): drivers/staging/most/i2c/i2c.c:66: warning: Function parameter or member 'most_iface' not described in 'configure_channel' drivers/staging/most/i2c/i2c.c:66: warning: Function parameter or member 'ch_idx' not described in 'configure_channel' drivers/staging/most/i2c/i2c.c:66: warning: Excess function parameter 'iface' description in 'configure_channel' drivers/staging/most/i2c/i2c.c:66: warning: Excess function parameter 'channel' description in 'configure_channel' drivers/staging/most/i2c/i2c.c:121: warning: Function parameter or member 'most_iface' not described in 'enqueue' drivers/staging/most/i2c/i2c.c:121: warning: Function parameter or member 'ch_idx' not described in 'enqueue' drivers/staging/most/i2c/i2c.c:121: warning: Excess function parameter 'iface' description in 'enqueue' drivers/staging/most/i2c/i2c.c:121: warning: Excess function parameter 'channel' description in 'enqueue' drivers/staging/most/i2c/i2c.c:166: warning: Function parameter or member 'most_iface' not described in 'poison_channel' drivers/staging/most/i2c/i2c.c:166: warning: Function parameter or member 'ch_idx' not described in 'poison_channel' drivers/staging/most/i2c/i2c.c:166: warning: Excess function parameter 'iface' description in 'poison_channel' drivers/staging/most/i2c/i2c.c:166: warning: Excess function parameter 'channel_id' description in 'poison_channel' Cc: Greg Kroah-Hartman Cc: Andrey Shvetsov Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-34-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1658384fc3d3caa2632ef90a9789b77c30e2462c Author: Lee Jones Date: Wed Apr 14 19:11:03 2021 +0100 staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is set Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_joinbss_event_prehandle’: drivers/staging/rtl8723bs/core/rtw_mlme.c:1192:12: warning: variable ‘retry’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Fabio Aiuto Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-32-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 80566ab54229c40cf871a37c41fbc19dd3744a05 Author: Lee Jones Date: Wed Apr 14 19:11:02 2021 +0100 staging: rtl8723bs: core: rtw_ieee80211: Remove seemingly pointless copy Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_ieee80211.c: In function ‘rtw_ies_remove_ie’: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:259:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-31-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6f4d367f3356661028f785db9c4f96491da5f18b Author: Lee Jones Date: Wed Apr 14 19:11:01 2021 +0100 staging: most: dim2: Provide missing descriptions and fix doc-rot Also demote merely half-complete header. Fixes the following W=1 kernel build warning(s): drivers/staging/most/dim2/dim2.c:69: warning: Function parameter or member 'name' not described in 'hdm_channel' drivers/staging/most/dim2/dim2.c:69: warning: Function parameter or member 'reset_dbr_size' not described in 'hdm_channel' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'dev' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'name' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'clk_speed' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'clk' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'clk_pll' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'bus' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'on_netinfo' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'disable_platform' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 'most_iface' not described in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 'ch_idx' not described in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 'ccfg' not described in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 'iface' description in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 'channel' description in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 'channel_config' description in 'configure_channel' drivers/staging/most/dim2/dim2.c:558: warning: Function parameter or member 'most_iface' not described in 'enqueue' drivers/staging/most/dim2/dim2.c:558: warning: Function parameter or member 'ch_idx' not described in 'enqueue' drivers/staging/most/dim2/dim2.c:558: warning: Excess function parameter 'iface' description in 'enqueue' drivers/staging/most/dim2/dim2.c:558: warning: Excess function parameter 'channel' description in 'enqueue' drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 'most_iface' not described in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 'ch_idx' not described in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 'on_netinfo' not described in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Excess function parameter 'iface' description in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Excess function parameter 'channel_id' description in 'request_netinfo' drivers/staging/most/dim2/dim2.c:631: warning: Function parameter or member 'most_iface' not described in 'poison_channel' drivers/staging/most/dim2/dim2.c:631: warning: Function parameter or member 'ch_idx' not described in 'poison_channel' drivers/staging/most/dim2/dim2.c:631: warning: Excess function parameter 'iface' description in 'poison_channel' drivers/staging/most/dim2/dim2.c:631: warning: Excess function parameter 'channel_id' description in 'poison_channel' Cc: Greg Kroah-Hartman Cc: "Nícolas F. R. A. Prado" Cc: Andrey Shvetsov Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-30-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 061e390b7c87fa719b95d1dae258dc3f6c3023c3 Author: Lee Jones Date: Wed Apr 14 19:11:00 2021 +0100 staging: rtl8192u: ieee80211_softmac: Move a large data struct onto the heap Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_rx_frame_softmac’: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2009:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman Cc: Romain Perier Cc: Allen Pais Cc: Andrea Merello Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-29-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b259c9b2380a1a4150cd2bdda90076d1e3fbd386 Author: Lee Jones Date: Wed Apr 14 19:10:59 2021 +0100 staging: vt6655: upc: Suppress set but not used warning in macro The variable is used in the function using the macro. Fixes the following W=1 kernel build warning(s): drivers/staging/vt6655/upc.h:45:16: warning: variable ‘byData’ set but not used [-Wunused-but-set-variable] Cc: Forest Bond Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-28-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2f61c6649f470b094f32586872e95648410e38f0 Author: Lee Jones Date: Wed Apr 14 19:10:58 2021 +0100 staging: most: net: Fix some kernel-doc formatting issues Fixes the following W=1 kernel build warning(s): drivers/staging/most/net/net.c:548: warning: Function parameter or member 'iface' not described in 'on_netinfo' drivers/staging/most/net/net.c:548: warning: Function parameter or member 'link_stat' not described in 'on_netinfo' drivers/staging/most/net/net.c:548: warning: Function parameter or member 'mac_addr' not described in 'on_netinfo' Cc: Greg Kroah-Hartman Cc: Andrey Shvetsov Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-27-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d12dd1e0e3b96b1a2c9ffdb0fa9c115aeb82b569 Author: Lee Jones Date: Wed Apr 14 19:10:57 2021 +0100 staging: sm750fb: sm750_accel: Provide description for 'accel' and fix function naming Fixes the following W=1 kernel build warning(s): drivers/staging/sm750fb/sm750_accel.c:155: warning: Function parameter or member 'accel' not described in 'sm750_hw_copyarea' drivers/staging/sm750fb/sm750_accel.c:155: warning: expecting prototype for sm750_hm_copyarea(). Prototype was for sm750_hw_copyarea() instead drivers/staging/sm750fb/sm750_accel.c:321: warning: Function parameter or member 'accel' not described in 'sm750_hw_imageblit' Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 204d839bbe077a672abf591ba98f186872fc21f1 Author: Lee Jones Date: Wed Apr 14 19:10:56 2021 +0100 staging: fwserial: Demote a whole host of kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/staging/fwserial/fwserial.c:52: warning: Function parameter or member 'fwserial_list' not described in 'LIST_HEAD' drivers/staging/fwserial/fwserial.c:52: warning: expecting prototype for fwserial_list(). Prototype was for LIST_HEAD() instead drivers/staging/fwserial/fwserial.c:62: warning: cannot understand function prototype: 'struct fwtty_port *port_table[MAX_TOTAL_PORTS]; ' drivers/staging/fwserial/fwserial.c:295: warning: Function parameter or member 'port' not described in 'fwtty_update_port_status' drivers/staging/fwserial/fwserial.c:295: warning: Function parameter or member 'status' not described in 'fwtty_update_port_status' drivers/staging/fwserial/fwserial.c:388: warning: Function parameter or member 'port' not described in '__fwtty_port_line_status' drivers/staging/fwserial/fwserial.c:412: warning: Function parameter or member 'port' not described in '__fwtty_write_port_status' drivers/staging/fwserial/fwserial.c:433: warning: Function parameter or member 'port' not described in 'fwtty_write_port_status' drivers/staging/fwserial/fwserial.c:486: warning: Function parameter or member 'work' not described in 'fwtty_do_hangup' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'card' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'request' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'tcode' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'destination' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'source' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'generation' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'addr' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'data' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'len' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'callback_data' not described in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:605: warning: Excess function parameter 'parameters' description in 'fwtty_port_handler' drivers/staging/fwserial/fwserial.c:670: warning: Function parameter or member 'card' not described in 'fwtty_tx_complete' drivers/staging/fwserial/fwserial.c:670: warning: Function parameter or member 'rcode' not described in 'fwtty_tx_complete' drivers/staging/fwserial/fwserial.c:670: warning: Function parameter or member 'txn' not described in 'fwtty_tx_complete' drivers/staging/fwserial/fwserial.c:914: warning: Function parameter or member 'tty_port' not described in 'fwtty_port_carrier_raised' drivers/staging/fwserial/fwserial.c:1021: warning: Function parameter or member 'tty_port' not described in 'fwtty_port_shutdown' drivers/staging/fwserial/fwserial.c:1312: warning: Function parameter or member 'tty' not described in 'fwtty_break_ctl' drivers/staging/fwserial/fwserial.c:1312: warning: Function parameter or member 'state' not described in 'fwtty_break_ctl' drivers/staging/fwserial/fwserial.c:1681: warning: Function parameter or member 'peer' not described in 'fwserial_claim_port' drivers/staging/fwserial/fwserial.c:1681: warning: Function parameter or member 'index' not described in 'fwserial_claim_port' drivers/staging/fwserial/fwserial.c:1708: warning: Function parameter or member 'peer' not described in 'fwserial_find_port' drivers/staging/fwserial/fwserial.c:1775: warning: Function parameter or member 'peer' not described in 'fwserial_connect_peer' drivers/staging/fwserial/fwserial.c:1844: warning: Function parameter or member 'driver' not described in 'fwserial_close_port' drivers/staging/fwserial/fwserial.c:1844: warning: Function parameter or member 'port' not described in 'fwserial_close_port' drivers/staging/fwserial/fwserial.c:1911: warning: Function parameter or member 'card' not described in '__fwserial_peer_by_node_id' drivers/staging/fwserial/fwserial.c:1911: warning: Function parameter or member 'generation' not described in '__fwserial_peer_by_node_id' drivers/staging/fwserial/fwserial.c:1911: warning: Function parameter or member 'id' not described in '__fwserial_peer_by_node_id' drivers/staging/fwserial/fwserial.c:2090: warning: Function parameter or member 'peer' not described in 'fwserial_remove_peer' drivers/staging/fwserial/fwserial.c:2321: warning: Function parameter or member 'unit' not described in 'fwserial_probe' drivers/staging/fwserial/fwserial.c:2321: warning: Function parameter or member 'id' not described in 'fwserial_probe' drivers/staging/fwserial/fwserial.c:2344: warning: Function parameter or member 'unit' not described in 'fwserial_remove' drivers/staging/fwserial/fwserial.c:2382: warning: Function parameter or member 'unit' not described in 'fwserial_update' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'card' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'request' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'tcode' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'destination' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'source' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'generation' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'addr' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'data' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'len' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'callback_data' not described in 'fwserial_mgmt_handler' drivers/staging/fwserial/fwserial.c:2717: warning: Excess function parameter 'parameters' description in 'fwserial_mgmt_handler' Cc: Greg Kroah-Hartman Cc: Peter Hurley Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit fbd3996990b6bb2140b4dede897f23e36dc51c4a Author: Lee Jones Date: Wed Apr 14 19:10:55 2021 +0100 staging: ks7010: ks_hostif: Remove a bunch of unused variables Add comments to preserve documentation. Fixes the following W=1 kernel build warning(s): drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_mib_get_confirm’: drivers/staging/ks7010/ks_hostif.c:528:6: warning: variable ‘mib_val_type’ set but not used [-Wunused-but-set-variable] drivers/staging/ks7010/ks_hostif.c:527:6: warning: variable ‘mib_val_size’ set but not used [-Wunused-but-set-variable] drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_infrastructure_set_confirm’: drivers/staging/ks7010/ks_hostif.c:849:6: warning: variable ‘result_code’ set but not used [-Wunused-but-set-variable] drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_phy_information_confirm’: drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e950dd6bb36fe3274d1678391e7372ecaf291147 Author: Lee Jones Date: Wed Apr 14 19:10:54 2021 +0100 staging: nvec: Fix a bunch of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/staging/nvec/nvec.c:109: warning: Function parameter or member 'events' not described in 'nvec_register_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'nb' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'event_type' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'data' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:358: warning: Function parameter or member 'ev' not described in 'nvec_event_mask' drivers/staging/nvec/nvec.c:358: warning: Function parameter or member 'mask' not described in 'nvec_event_mask' Cc: Marc Dietrich Cc: Greg Kroah-Hartman Cc: Philipp Zabel Cc: Kernel Team Cc: Pierre-Hugues Husson Cc: Ilya Petrov Cc: Andres Klode Cc: ac100@lists.launchpad.net Cc: linux-tegra@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d57d7ac576394bd60024cc2354201f921cb498dc Author: Lee Jones Date: Wed Apr 14 19:10:53 2021 +0100 staging: iio: frequency: ad9834: Provide missing description for 'devid' Also demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/staging/iio/frequency/ad9834.c:87: warning: Function parameter or member 'devid' not described in 'ad9834_state' drivers/staging/iio/frequency/ad9834.c:93: warning: cannot understand function prototype: 'enum ad9834_supported_device_ids ' drivers/staging/iio/frequency/ad9834.c:320: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Cc: Greg Kroah-Hartman Cc: linux-iio@vger.kernel.org Cc: linux-staging@lists.linux.dev Acked-by: Jonathan Cameron Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0b18e5fe6008c163f2d245724fc6db88158c3eb3 Author: Lee Jones Date: Wed Apr 14 19:10:52 2021 +0100 staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the heap Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8712/rtl871x_mp_ioctl.c: In function ‘mp_start_test’: drivers/staging/rtl8712/rtl871x_mp_ioctl.c:204:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Larry Finger Cc: Florian Schilhabel Cc: Greg Kroah-Hartman Cc: Zhansaya Bagdauletkyzy Cc: Michael Straube Cc: WLAN FAE Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c337ee00146aa5b1ad5509df796bb00ac51fd90e Author: Lee Jones Date: Wed Apr 14 19:10:51 2021 +0100 staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable 'start_seq' Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_wlan_util.c: In function ‘process_addba_req’: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1774:11: warning: variable ‘start_seq’ set but not used [-Wunused-but-set-variable] from drivers/staging/rtl8188eu/core/rtw_wlan_util.c:12: Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit efda125b79e8f4e907ed465b1d3eccee7c2dc960 Author: Lee Jones Date: Wed Apr 14 19:10:50 2021 +0100 staging: octeon: ethernet-tx: Fix formatting issue in function header Fixes the following W=1 kernel build warning(s): drivers/staging/octeon/ethernet-tx.c:507: warning: bad line: Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: Kees Cook Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 324960df12a08583d4d194cc8c86974da8c4f1d0 Author: Lee Jones Date: Wed Apr 14 19:10:49 2021 +0100 staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘rtw_init_bcmc_stainfo’: drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:512:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Ross Schmidt Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f02eafb7f1b4a1f82ca020c544bab403ed813fdc Author: Lee Jones Date: Wed Apr 14 19:10:48 2021 +0100 staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta' Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘kfree_all_stainfo’: drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:128:19: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Ross Schmidt Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e06ede38f38046d2af2915c0c21939338a2c0596 Author: Lee Jones Date: Wed Apr 14 19:10:47 2021 +0100 staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): from drivers/staging/rtl8188eu/core/rtw_security.c:10: drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1' drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1' drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1' drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2' drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2' drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2' drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9d65023547dc62820fb3cf83a4bc180b5c1c9756 Author: Lee Jones Date: Wed Apr 14 19:10:46 2021 +0100 staging: rtl8188eu: core: rtw_security: Fix some formatting and misdocumentation Fixes the following W=1 kernel build warning(s): from drivers/staging/rtl8188eu/core/rtw_security.c:10: drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1' drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1' drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1' drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2' drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2' drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2' drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Larry Finger Cc: Greg Kroah-Hartman Cc: Michael Straube Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit daa2627c7f2f9c30c4955e8367cdbfb84d149e50 Author: Lee Jones Date: Wed Apr 14 19:10:45 2021 +0100 staging: rtl8723bs: core: rtw_recv: Mark debug variable as __maybe_unused Fixes the following W=1 kernel build warning(s): from drivers/staging/rtl8188eu/core/rtw_recv.c:12: drivers/staging/rtl8723bs/core/rtw_recv.c: In function ‘rtw_signal_stat_timer_hdl’: drivers/staging/rtl8723bs/core/rtw_recv.c:2341:6: warning: variable ‘num_signal_qual’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 02d06dd53463eeeb24333047849f304f59bdf7bd Author: Lee Jones Date: Wed Apr 14 19:10:44 2021 +0100 staging: rtl8712: rtl871x_mp_ioctl: Remove a bunch of unused tables Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8712/rtl871x_mp_ioctl.h:256:34: warning: ‘oid_rtl_seg_81_85’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:249:34: warning: ‘oid_rtl_seg_81_80_80’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:240:34: warning: ‘oid_rtl_seg_81_80_40’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:205:34: warning: ‘oid_rtl_seg_81_80_20’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:138:34: warning: ‘oid_rtl_seg_81_80_00’ defined but not used [-Wunused-const-variable=] Cc: Larry Finger Cc: Florian Schilhabel Cc: Greg Kroah-Hartman Cc: WLAN FAE Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4c98e73f28e28a96c44108cbb05af73f748682c8 Author: Lee Jones Date: Wed Apr 14 19:10:42 2021 +0100 staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_build_wmm_ie_ht’: drivers/staging/rtl8723bs/core/rtw_mlme.c:2482:6: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restructure_ht_ie’: drivers/staging/rtl8723bs/core/rtw_mlme.c:2498:21: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_update_ht_cap’: drivers/staging/rtl8723bs/core/rtw_mlme.c:2647:33: warning: variable ‘pht_addtinfo’ set but not used [-Wunused-but-set-variable] from drivers/staging/rtl8188eu/core/rtw_mlme.c:12: Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 683707c7ed87167768188b729cdee92f0dc545b6 Author: Lee Jones Date: Wed Apr 14 19:10:41 2021 +0100 staging: rtl8188eu: core: rtw_ieee80211: Fix incorrectly documented function Fixes the following W=1 kernel build warning(s): from drivers/staging/rtl8188eu/core/rtw_ieee80211.c:11: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:778: warning: expecting prototype for ieee802_11_parse_elems(). Prototype was for rtw_ieee802_11_parse_elems() instead Cc: Larry Finger Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ea82ff749587807fa48e3277c977ff3cec266f25 Author: Lee Jones Date: Wed Apr 14 19:10:39 2021 +0100 staging: wlan-ng: cfg80211: Move large struct onto the heap Fixes the following W=1 kernel build warning(s): drivers/staging/wlan-ng/cfg80211.c: In function ‘prism2_scan’: drivers/staging/wlan-ng/cfg80211.c:388:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman Cc: Sumera Priyadarsini Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4a29a072b1e5ecc83750b533d87aec5a69c7ce12 Author: Lee Jones Date: Wed Apr 14 19:10:38 2021 +0100 staging: r819xU_cmdpkt: Remove functionless method 'cmpk_handle_query_config_rx' Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/r819xU_cmdpkt.c: In function ‘cmpk_handle_query_config_rx’: drivers/staging/rtl8192u/r819xU_cmdpkt.c:274:24: warning: variable ‘rx_query_cfg’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Michael Straube Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 803c63d960d8878d2ea621c02e883a7d8d2cb7cd Author: Lee Jones Date: Wed Apr 14 19:10:37 2021 +0100 staging: r819xU_phy: Remove some local variables from the stack Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/r819xU_phy.c: In function ‘rtl8192_phy_SwChnlStepByStep’: drivers/staging/rtl8192u/r819xU_phy.c:1328:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman Cc: Michael Straube Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 52ee2c7c825be4e958a0ac57b1769c8d4fad3ad2 Author: Lee Jones Date: Wed Apr 14 19:10:36 2021 +0100 staging: r8192U_core: Do not use kernel-doc formatting for !kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/r8192U_core.c:3714: warning: Function parameter or member 'dev' not described in 'UpdateRxPktTimeStamp8190' drivers/staging/rtl8192u/r8192U_core.c:3714: warning: Function parameter or member 'stats' not described in 'UpdateRxPktTimeStamp8190' drivers/staging/rtl8192u/r8192U_core.c:3714: warning: expecting prototype for Function(). Prototype was for UpdateRxPktTimeStamp8190() instead drivers/staging/rtl8192u/r8192U_core.c:4314: warning: Function parameter or member 'dev' not described in 'UpdateReceivedRateHistogramStatistics8190' drivers/staging/rtl8192u/r8192U_core.c:4314: warning: Function parameter or member 'stats' not described in 'UpdateReceivedRateHistogramStatistics8190' drivers/staging/rtl8192u/r8192U_core.c:4314: warning: expecting prototype for Function(). Prototype was for UpdateReceivedRateHistogramStatistics8190() instead Cc: Greg Kroah-Hartman Cc: Andrea Merello Cc: Jerry chuang Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9a6ce484e88520e5cbdd1970b9fd8d5f5f33db8d Author: Lee Jones Date: Wed Apr 14 19:10:34 2021 +0100 staging: android: ashmem: Supply description for 'new_range' Fixes the following W=1 kernel build warning(s): drivers/staging/android/ashmem.c:189: warning: Function parameter or member 'new_range' not described in 'range_alloc' Cc: Greg Kroah-Hartman Cc: "Arve Hjønnevåg" Cc: Todd Kjos Cc: Martijn Coenen Cc: Joel Fernandes Cc: Christian Brauner Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Robert Love Cc: linux-staging@lists.linux.dev Acked-by: Todd Kjos Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7f201acf475de7109029812aa5079d1448f0d269 Author: Lee Jones Date: Wed Apr 14 19:10:33 2021 +0100 staging: r8192U_core: Remove unused variable 'ret' and demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/r8192U_core.c: In function ‘rtl8192_hard_data_xmit’: drivers/staging/rtl8192u/r8192U_core.c:905:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: Andrea Merello Cc: Jerry chuang Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210414181129.1628598-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f91e5d097f120755060b6abe8249696b405666fd Author: Randy Dunlap Date: Tue Apr 27 21:08:55 2021 -0700 usb: gadget: fsl_qe_udc: fix implicit-fallthrough warnings Quieten implicit-fallthrough warnings in fsl_qe_udc.c: ../drivers/usb/gadget/udc/fsl_qe_udc.c: In function 'qe_ep_init': ../drivers/usb/gadget/udc/fsl_qe_udc.c:542:37: warning: this statement may fall through [-Wimplicit-fallthrough=] 542 | if ((max == 128) || (max == 256) || (max == 512)) ../drivers/usb/gadget/udc/fsl_qe_udc.c:563:8: warning: this statement may fall through [-Wimplicit-fallthrough=] 563 | if (max <= 1024) ../drivers/usb/gadget/udc/fsl_qe_udc.c:566:8: warning: this statement may fall through [-Wimplicit-fallthrough=] 566 | if (max <= 64) ../drivers/usb/gadget/udc/fsl_qe_udc.c:580:8: warning: this statement may fall through [-Wimplicit-fallthrough=] 580 | if (max <= 1024) ../drivers/usb/gadget/udc/fsl_qe_udc.c:596:5: warning: this statement may fall through [-Wimplicit-fallthrough=] 596 | switch (max) { This basically just documents what is currently being done. If any of them need to do something else, just say so or even make the change. Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20210428040855.25907-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit c34030129a26e2f2387f7f21cea4b30080d5ef62 Author: Wei Ming Chen Date: Wed May 5 22:19:36 2021 +0800 usb: phy: Use fallthrough pseudo-keyword Replace /* FALLTHROUGH */ comment with pseudo-keyword macro fallthrough[1] [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Acked-by: Felipe Balbi Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210505141936.4343-1-jj251510319013@gmail.com Signed-off-by: Greg Kroah-Hartman commit 374ac7448caa73d689b50fd3c4fb59e40f1ab0b1 Author: Chunfeng Yun Date: Thu May 6 15:26:08 2021 +0800 usb: dwc3: remove repeated setting of current_dr_role dwc3_set_prtcap() already sets current_dr_role as DWC3_GCTL_PRTCAP_OTG, so remove the repeated one. Acked-by: Felipe Balbi Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210506072608.32320-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f42b333f288593936c99fa85ae5b52f8fa2a745b Author: Wei Ming Chen Date: Tue May 4 00:09:27 2021 +0800 usb: gadget: function: Fix inconsistent indent Remove whitespace before variable Acked-by: Felipe Balbi Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210503160927.6482-1-jj251510319013@gmail.com Signed-off-by: Greg Kroah-Hartman commit d2d9b94164862f06207b60310ae3854f5f0058ad Author: Guenter Roeck Date: Sat Apr 24 07:54:43 2021 -0700 usb: gadget: Drop unnecessary NULL checks after container_of The parameters passed to allow_link and drop_link functions are never NULL. That means the result of container_of() on those parameters is also never NULL, even though the reference into the structure points to the first element of the structure. Remove the unnecessary NULL checks. This change was made automatically with the following Coccinelle script. A now obsolete 'out:' label was removed manually. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Cc: Laurent Pinchart Cc: Felipe Balbi Reviewed-by: Laurent Pinchart Acked-by: Felipe Balbi Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20210424145443.170413-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 29a812e4f3462c7020368a1f5b6cd7814225d983 Author: Wei Ming Chen Date: Fri Apr 23 21:24:17 2021 +0800 usb: gadget: function: fix typo in f_hid.c Replace `me` with `be` Acked-by: Felipe Balbi Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210423132417.4385-1-jj251510319013@gmail.com Signed-off-by: Greg Kroah-Hartman commit ce675043fa12dfc50276e00f31da61e14846b178 Author: Tian Tao Date: Mon Apr 12 17:35:44 2021 +0800 mtd: mtdpart: Convert sysfs sprintf/snprintf family to sysfs_emit Use sysfs_emit instead of snprintf to avoid buf overrun,because in sysfs_emit it strictly checks whether buf is null or buf whether pagesize aligned, otherwise it returns an error. Signed-off-by: Tian Tao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1618220144-33839-3-git-send-email-tiantao6@hisilicon.com commit 5b2fbe0ca0e8a88f8da3c96cd6628561852be655 Author: Tian Tao Date: Mon Apr 12 17:35:43 2021 +0800 mtd: core: Convert sysfs sprintf/snprintf family to sysfs_emit Use sysfs_emit instead of snprintf to avoid buf overrun,because in sysfs_emit it strictly checks whether buf is null or buf whether pagesize aligned, otherwise it returns an error. Signed-off-by: Tian Tao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1618220144-33839-2-git-send-email-tiantao6@hisilicon.com commit e4f3c9118f27b3b400db9993dd8bfd028d3b86ca Author: Zhang Xiaoxu Date: Thu Apr 8 21:07:39 2021 -0400 mtd: mtd_oobtest: fix error return code in mtd_oobtest_init() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210409010739.1021001-1-zhangxiaoxu5@huawei.com commit da1e6fe563e62801fa033255f68c0bb9bf8c2c69 Author: Yu Kuai Date: Thu Apr 8 21:38:12 2021 +0800 mtd: phram: Fix error return code in phram_setup() Return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210408133812.1209798-1-yukuai3@huawei.com commit c054de10ae5d6d8b3f417cb8d29e67a7cd686f36 Author: Yu Kuai Date: Thu Apr 8 19:15:13 2021 +0800 mtd: plat-ram: remove redundant dev_err call in platram_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210408111514.1011020-3-yukuai3@huawei.com commit e101bd30456111d46bf4c54df122314ce96e4180 Author: Yu Kuai Date: Thu Apr 8 19:15:12 2021 +0800 mtd: rawnand: mtk: remove redundant dev_err call in mtk_ecc_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210408111514.1011020-2-yukuai3@huawei.com commit 03299d054047c32d864abe2e640533c55acda6c7 Author: Wei Li Date: Wed Apr 7 18:05:26 2021 +0800 mtd: rawnand: hisi504: Remove redundant dev_err call in probe There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Wei Li Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210407100526.3278741-1-liwei391@huawei.com commit 89f5f8fb5bf4305a5425f70abf3c0d93643c93dc Author: Christophe JAILLET Date: Thu May 6 07:49:34 2021 +0200 EDAC/thunderx: Remove irrelevant variable from error messages 'ret' is irrelevant (it is 0) for both dev_err() calls, so just remove it from the error message. [ bp: Massage commit message. ] Fixes: 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver") Signed-off-by: Christophe JAILLET Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/0c046ef5cfb367a3f707ef4270e21a2bcbf44952.1620280098.git.christophe.jaillet@wanadoo.fr commit f4b34faa08428d813fc3629f882c503487f94a12 Author: Daniel Vetter Date: Thu Jan 21 16:29:55 2021 +0100 drm/imx: Annotate dma-fence critical section in commit path drm_atomic_helper_commit_hw_done() is the last thing (no plane cleanup apparrently), so it's the entire function. And a nice comment explaining why the wait_for_flip_done is ahead, unlike the usual sequence. Aside, I think since the atomic helpers do track plane disabling now separately this might no longer be a real problem since: commit 21a01abbe32a3cbeb903378a24e504bfd9fe0648 Author: Maarten Lankhorst Date: Mon Sep 4 12:48:37 2017 +0200 drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3. Plus the subsequent bugfixes of course, this was tricky to get right. Signed-off-by: Daniel Vetter Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Philipp Zabel commit 06841148c570832d4d247b0f6befc1922a84120b Author: Philipp Zabel Date: Tue Jan 19 14:51:08 2021 +0100 drm/imx: ipuv3-plane: do not advertise YUV formats on planes without CSC Only planes that are displayed via the Display Processor (DP) path support color space conversion. Limit formats on planes that are shown via the direct Display Controller (DC) path to RGB. Reported-by: Fabio Estevam Signed-off-by: Philipp Zabel commit 466ba3c8ff4fae39e455ff8d080b3d5503302765 Author: Krzysztof Kozlowski Date: Fri May 7 07:28:03 2021 -0400 reset: a10sr: add missing of_match_table reference The driver defined of_device_id table but did not use it with of_match_table. This prevents usual matching via devicetree and causes a W=1 warning: drivers/reset/reset-a10sr.c:111:34: warning: ‘a10sr_reset_of_match’ defined but not used [-Wunused-const-variable=] Reported-by: kernel test robot Fixes: 627006820268 ("reset: Add Altera Arria10 SR Reset Controller") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210507112803.20012-1-krzysztof.kozlowski@canonical.com Signed-off-by: Philipp Zabel commit 6ab9d6219f86f0db916105444813aafce626a2f4 Author: Geert Uytterhoeven Date: Wed Mar 31 10:15:19 2021 +0200 reset: RESET_INTEL_GW should depend on X86 The Intel Gateway reset controller is only present on Intel Gateway platforms. Hence add a dependency on X86, to prevent asking the user about this driver when configuring a kernel without Intel Gateway support. Fixes: c9aef213e38cde27 ("reset: intel: Add system reset controller driver") Signed-off-by: Geert Uytterhoeven Signed-off-by: Philipp Zabel commit 42f6a76fbe85e5243f83a3ed76809b1ebbb7087e Author: Geert Uytterhoeven Date: Tue Mar 16 14:37:33 2021 +0100 reset: RESET_BRCMSTB_RESCAL should depend on ARCH_BRCMSTB The Broadcom STB RESCAL reset controller is only present on Broadcom BCM7216 platforms. Hence add a dependency on ARCH_BRCMSTB, to prevent asking the user about this driver when configuring a kernel without BCM7216 support. Also, merely enabling CONFIG_COMPILE_TEST should not enable additional code, and thus should not enable this driver by default. Fixes: 4cf176e52397853e ("reset: Add Broadcom STB RESCAL reset controller") Signed-off-by: Geert Uytterhoeven Acked-by: Florian Fainelli Signed-off-by: Philipp Zabel commit b19a5aec3512b6c34633e208ff9b645a30726999 Author: Philipp Zabel Date: Thu Mar 4 17:03:09 2021 +0100 reset: uniphier: enclose UNIPHIER_RESET_ID_END value in parentheses Fixes a checkpatch error: ERROR: Macros with complex values should be enclosed in parentheses #23: FILE: drivers/reset/reset-uniphier.c:23: +#define UNIPHIER_RESET_ID_END (unsigned int)(-1) Signed-off-by: Philipp Zabel commit 71400c3fc45ee783d2b0b55f1431263debcbd3c8 Author: Philipp Zabel Date: Thu Mar 4 17:02:20 2021 +0100 reset: sti/syscfg: replace comma with semicolon Fixes a checkpatch warning: WARNING: Possible comma where semicolon could be used #156: FILE: drivers/reset/sti/reset-syscfg.c:156: + rc->rst.ops = &syscfg_reset_ops, + rc->rst.of_node = dev->of_node; Signed-off-by: Philipp Zabel commit 05cf8fffcdeb47aef1203c08cbec5224fd3a0e1c Author: Philipp Zabel Date: Thu Mar 4 17:01:39 2021 +0100 reset: ti-syscon: fix to_ti_syscon_reset_data macro The to_ti_syscon_reset_data macro currently only works if the parameter passed into it is called 'rcdev'. Fixes a checkpatch --strict issue: CHECK: Macro argument reuse 'rcdev' - possible side-effects? #53: FILE: drivers/reset/reset-ti-syscon.c:53: +#define to_ti_syscon_reset_data(rcdev) \ + container_of(rcdev, struct ti_syscon_reset_data, rcdev) Signed-off-by: Philipp Zabel commit 534d3fa24e9f45d21f4c4868c78690a32838d3fe Author: Philipp Zabel Date: Thu Mar 4 16:59:48 2021 +0100 reset: berlin: replace unsigned with unsigned int Fixes a checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #55: FILE: drivers/reset/reset-berlin.c:55: + unsigned offset, bit; Signed-off-by: Philipp Zabel commit 1c5e05c23f4a64fa3cee8af1ef904921803fffb1 Author: Philipp Zabel Date: Thu Mar 4 16:56:56 2021 +0100 reset: whitespace fixes Fixes checkpatch issues: CHECK: Alignment should match open parenthesis #87: FILE: drivers/reset/core.c:87: +static int of_reset_simple_xlate(struct reset_controller_dev *rcdev, + const struct of_phandle_args *reset_spec) CHECK: Lines should not end with a '(' #540: FILE: drivers/reset/core.c:540: +static struct reset_control *__reset_control_get_internal( CHECK: Alignment should match open parenthesis #603: FILE: drivers/reset/core.c:603: +struct reset_control *__of_reset_control_get(struct device_node *node, + const char *id, int index, bool shared, CHECK: Alignment should match open parenthesis #781: FILE: drivers/reset/core.c:781: +struct reset_control *__devm_reset_control_get(struct device *dev, + const char *id, int index, bool shared, Signed-off-by: Philipp Zabel commit 453ed4283bebd0776682c5a3227619d92caa9c8c Author: Steen Hegelund Date: Fri Apr 16 10:40:53 2021 +0200 reset: mchp: sparx5: add switch reset driver The Sparx5 Switch SoC has a number of components that can be reset indiviually, but at least the Switch Core needs to be in a well defined state at power on, when any of the Sparx5 drivers starts to access the Switch Core, this reset driver is available. The reset driver is loaded early via the postcore_initcall interface, and will then be available for the other Sparx5 drivers (SGPIO, SwitchDev etc) that are loaded next, and the first of them to be loaded can perform the one-time Switch Core reset that is needed. The driver has protection so that the system busses, DDR controller, PCI-E and ARM A53 CPU and a few other subsystems are not touched by the reset. Signed-off-by: Steen Hegelund Reviewed-by: Alexandre Belloni Signed-off-by: Philipp Zabel commit 9a531e4d5a49925554f99024d164572cbd6a8d9b Author: Steen Hegelund Date: Fri Apr 16 10:40:52 2021 +0200 dt-bindings: reset: microchip sparx5 reset driver bindings Document the Sparx5 reset device driver bindings The driver uses a syscon and an IO range on sparx5 for access to the reset control and the reset status. Sparx5 will no longer use the existing Ocelot chip reset driver, but use this new switch reset driver as it has the reset controller interface that allows the first client to perform the reset on behalf of all the Sparx5 component drivers. Signed-off-by: Steen Hegelund Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit 91b8050c41b3149c1e3833f2258b9c01c76d37e7 Author: Philipp Zabel Date: Fri Dec 4 16:31:09 2020 +0100 reset: oxnas: replace file name with short description Fixes a checkpatch warning: WARNING: It's generally not useful to have the filename in the file #3: FILE: drivers/reset/reset-oxnas.c:3: + * drivers/reset/reset-oxnas.c Signed-off-by: Philipp Zabel Acked-by: Neil Armstrong commit 829cdfe0a3942d524068756b890b0528e5adddb1 Author: Philipp Zabel Date: Fri Oct 16 15:47:01 2020 +0200 reset: zynqmp: replace spaces with tabs Fixes checkpatch issues: ERROR: code indent should use tabs where possible #86: FILE: drivers/reset/reset-zynqmp.c:86: + .reset_id = 0,$ WARNING: please, no spaces at the start of a line #86: FILE: drivers/reset/reset-zynqmp.c:86: + .reset_id = 0,$ ERROR: code indent should use tabs where possible #87: FILE: drivers/reset/reset-zynqmp.c:87: + .num_resets = VERSAL_NR_RESETS,$ WARNING: please, no spaces at the start of a line #87: FILE: drivers/reset/reset-zynqmp.c:87: + .num_resets = VERSAL_NR_RESETS,$ Signed-off-by: Philipp Zabel Reviewed-by: Michal Simek commit e5c73bdb136c6f192eb68c38f0b7843afb53b7dd Author: Philipp Zabel Date: Thu Jan 14 13:54:34 2021 +0100 reset: bcm6345: Make reset_control_ops const The bcm6345_reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel commit 837188d49823230f47afdbbec7556740e89a8557 Author: Johan Jonker Date: Sat Apr 17 13:29:45 2021 +0200 arm64: dts: rockchip: add #power-domain-cells to power domain nodes Add #power-domain-cells to power domain nodes, because they are required by power-domain.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-9-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 148bbe29f9108812c6fedd8a228f9e1ed6b422f7 Author: Elaine Zhang Date: Sat Apr 17 13:29:44 2021 +0200 arm64: dts: rockchip: Fix power-controller node names for rk3399 Use more generic names (as recommended in the device tree specification or the binding documentation) Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-8-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 6e6a282b49c6db408d27231e3c709fbdf25e3c1b Author: Elaine Zhang Date: Sat Apr 17 13:29:43 2021 +0200 arm64: dts: rockchip: Fix power-controller node names for rk3328 Use more generic names (as recommended in the device tree specification or the binding documentation) Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-7-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit d5de0d688ac6e0202674577b05d0726b8a6af401 Author: Elaine Zhang Date: Sat Apr 17 13:29:42 2021 +0200 arm64: dts: rockchip: Fix power-controller node names for px30 Use more generic names (as recommended in the device tree specification or the binding documentation) Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-6-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit a3ec2d38f6dd922007ee4d414cf76d1f55570844 Author: Johan Jonker Date: Sat Apr 17 13:29:41 2021 +0200 ARM: dts: rockchip: add #power-domain-cells to power domain nodes Add #power-domain-cells to power domain nodes, because they are required by power-domain.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-5-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 970cdc53cb1afa73602028c103dbfb6a230080be Author: Elaine Zhang Date: Sat Apr 17 13:29:40 2021 +0200 ARM: dts: rockchip: Fix power-controller node names for rk3288 Use more generic names (as recommended in the device tree specification or the binding documentation) Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-4-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit d3bcbcd396175ac26aa54919c0b31c7d2878fc24 Author: Elaine Zhang Date: Sat Apr 17 13:29:39 2021 +0200 ARM: dts: rockchip: Fix power-controller node names for rk3188 Use more generic names (as recommended in the device tree specification or the binding documentation) Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-3-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit f2948781a72f0d8cf2adf31758c357f2f35e6c79 Author: Elaine Zhang Date: Sat Apr 17 13:29:38 2021 +0200 ARM: dts: rockchip: Fix power-controller node names for rk3066a Use more generic names (as recommended in the device tree specification or the binding documentation) Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 41413a20b08258cc34af06e01236980ac68ae334 Author: Johan Jonker Date: Sat Apr 17 13:29:48 2021 +0200 dt-bindings: arm: rockchip: convert pmu.txt to YAML Current dts files with 'pmu' nodes are manually verified. In order to automate this process pmu.txt has to be converted to yaml. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210417112952.8516-12-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 0a69452e03564c5eaf99f729de398cd94ee90851 Author: Elaine Zhang Date: Sat Apr 17 13:29:46 2021 +0200 soc: rockchip: power-domain: Add a meaningful power domain name Add the power domains names to the power domain info struct so we have meaningful name for every power domain. Signed-off-by: Elaine Zhang Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210417112952.8516-10-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 8b3ceb06225a19db165ff7e7df7f3c7af95eba2b Merge: 6efb943b8616e 8cbc5d2f2fe42 Author: Heiko Stuebner Date: Mon May 10 09:28:36 2021 +0200 Merge branch 'v5.14-shared/powerdomain' into v5.14-armsoc/drivers commit 8cbc5d2f2fe42a1bb1491f25486999d8f4ba9733 Author: Elaine Zhang Date: Sat Apr 17 13:29:47 2021 +0200 dt-bindings: add power-domain header for RK3568 SoCs According to a description from TRM, add all the power domains Signed-off-by: Elaine Zhang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Johan Jonker Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210417112952.8516-11-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit cbccad664927e98db0f12adb7434fdfe51d3073a Author: Samuel Holland Date: Sun Mar 21 23:47:07 2021 -0500 arm64: sunxi: Build the sun4i timer driver While the ARM architectural timer is generatlly the best timer to use, a non-c3stop timer is needed for cpuidle. Build the "sun4i" timer driver so it can be used for this purpose. It is present on all 64-bit sunxi SoCs. Signed-off-by: Samuel Holland Acked-by: Daniel Lezcano Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210322044707.19479-6-samuel@sholland.org commit d0aac8cbbd0ce601ef38317a3f69028b6910bace Author: Ivan Uvarov Date: Wed Apr 7 14:14:28 2021 +0300 ARM: dts: sun8i: r40: add devicetree for Forlinx FETA40i-C & OKA40i-C The FETA40i-C is a SoM by Forlinx based on the Allwinner R40/A40i. SoM specifications: - SoC: R40 or A40i - PMIC: AXP221S - RAM: 1GiB/2GiB DDR3 (dual-rank) - eMMC: 8GB, - Mates with carrier board via four 80-pin connectors (AXK6F80337YG). OKA40i-C is a carrier board by the same manufacturer for this SoM, whose main purpose is as a development board with a wide variety of peripherals: - Power: DC5V barrel or USB OTG or 4.2V Lipo battery - Video out: HDMI, TV out, LVDS - WiFi+Bluetooth: RL-UM02WBS-8723BU-V1.2 (802.11 b/g/n, BT V2.1/3.0/4.0) - Ethernet: 10/100Mbps - Storage: µSD, fullsize SD, eMMC (on SoM), SATA - USB: 3 x USB2.0 Host (2 via hub, 1 native), 1 x USB2.0 OTG (micro-B) - UART: RS232, RS485, 4 3.3v uarts (of which 2 have RTS/CTS) - Other I/O: SPI x2, TWI, SDIO header, GPIO header, JTAG header - Mini PCIe slot with sim holder for WLAN modem - Smart card holder - RTC (RX8010SJ) - Two user LEDs - Three user buttons (via KeyADC). This patch adds a devicetree for the aforementioned SoM and devboard. In order to reflect the modularity of this devboard and simplify adding support for future hardware based on the same SoM, the devicetree is split: Everything pertaining to the SoM itself is described in a separate .dtsi file, which is included by the devboard's .dts. Reviewed-by: Andre Przywara Signed-off-by: Ivan Uvarov 3 files changed, 310 insertions(+) Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210407111428.3755684-6-i.uvarov@cognitivepilot.com commit ed85561fe39c994e9ba1a97614b5269158a98ca9 Author: Ivan Uvarov Date: Wed Apr 7 14:14:27 2021 +0300 dt-bindings: arm: add compatible for Forlinx OKA40i-C and FETA40i-C The FETA40i-C is a SoM by Forlinx based on the Allwinner R40/A40i SoC. The OKA40i-C is a carrier/development board by the same company based on this SoM. This patch adds compatible strings for these two devices in preparation for the next patch containing a devicetree for them. Signed-off-by: Ivan Uvarov 1 file changed, 6 insertions(+) Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210407111428.3755684-5-i.uvarov@cognitivepilot.com commit 157da630c7ff848439f721257f26655b5ae2d856 Author: Ivan Uvarov Date: Wed Apr 7 14:14:26 2021 +0300 dt-bindings: add compatible vendor prefix for Forlinx Baoding Forlinx Embedded Technology Co., Ltd. is the manufacturer of the Allwinner R40/A40i-powered FETA40i-C SoM and the OKA40i-C dev/carrier board based on it. This patch adds the DT vendor prefix for Forlinx in preparation for a further patch, which includes a devicetree for the OKA40i-C board. Signed-off-by: Ivan Uvarov 1 file changed, 2 insertions(+) Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210407111428.3755684-4-i.uvarov@cognitivepilot.com commit 492dd7309aed4d2313a6f9d9a26f88707f51161b Author: Ivan Uvarov Date: Wed Apr 7 14:14:25 2021 +0300 ARM: dts: sun8i: r40: add pinmux settings for MMC3 and UARTs 2, 4, 5&7 The Forlinx OKA40i-C devboard makes use of UARTs 0,2,3,4,5 and 7 of the R40 SoC, of which UART 0 is connected to an RS232 converter, UART 5 routed to an RS485 converter, and the rest broken out directly via labeled headers. The board also contains a micro-SD slot connected to SDC3. This patch adds settings to R40's pinmux node for MMC3 and those UARTs that were not already mapped, which would allow us to make use of all available UARTs and the micro-SD slot on this board in a further patch. Reviewed-by: Andre Przywara Signed-off-by: Ivan Uvarov 1 file changed, 41 insertions(+) Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210407111428.3755684-3-i.uvarov@cognitivepilot.com commit fd5ef505453f995b4ce6ef6e43ddc15967a94a96 Author: Ivan Uvarov Date: Wed Apr 7 14:14:24 2021 +0300 ARM: dts: sun8i: r40: add /omit-if-no-ref/ to pinmux nodes for UARTs 0&3 This patch adds the /omit-if-no-ref/ keyword to the pio nodes for UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on boards which do not use these UARTs. Signed-off-by: Ivan Uvarov 1 file changed, 3 insertions(+) Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210407111428.3755684-2-i.uvarov@cognitivepilot.com commit 2bf375982f4a58a95e8b5184565b23677900012c Author: Benjamin Gaignard Date: Fri May 7 11:02:31 2021 +0200 arm64: dts: rockchip: Remove useless interrupt-names properties from px30 IOMMU nodes Remove useless interrupt-names properties for IOMMU nodes Signed-off-by: Benjamin Gaignard Link: https://lore.kernel.org/r/20210507090232.233049-6-benjamin.gaignard@collabora.com Signed-off-by: Heiko Stuebner commit 304b8fbc950bae102f29ee1e8e8557f2fd08d69a Author: Benjamin Gaignard Date: Fri May 7 11:02:30 2021 +0200 ARM: dts: rockchip: Remove useless interrupt-names on IOMMU node on rk3036 Remove useless interrupt-names property for IOMMU node Signed-off-by: Benjamin Gaignard Link: https://lore.kernel.org/r/20210507090232.233049-5-benjamin.gaignard@collabora.com Signed-off-by: Heiko Stuebner commit 6b023929666f0be5df75f5e0278d1b70effadf42 Author: Benjamin Gaignard Date: Fri May 7 11:02:29 2021 +0200 ARM: dts: rockchip: Fix IOMMU nodes properties on rk322x Add '#" to iommu-cells properties. Remove useless interrupt-names properties Signed-off-by: Benjamin Gaignard Link: https://lore.kernel.org/r/20210507090232.233049-4-benjamin.gaignard@collabora.com Signed-off-by: Heiko Stuebner commit 7b46d674ac000b101fdad92cf16cc11d90b72f86 Author: Ezequiel Garcia Date: Thu May 6 08:11:35 2021 -0300 ARM: dts: rockchip: Fix the timer clocks order Fixed order is the device-tree convention. The timer driver currently gets clocks by name, so no changes are needed there. Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20210506111136.3941-3-ezequiel@collabora.com Signed-off-by: Heiko Stuebner commit a7ecfad495f8af63a5cb332c91f60ab2018897f5 Author: Johan Jonker Date: Tue Jan 26 12:02:21 2021 +0100 arm64: dts: rockchip: fix pinctrl sleep nodename for rk3399.dtsi A test with the command below aimed at powerpc generates notifications in the Rockchip arm64 tree. Fix pinctrl "sleep" nodename by renaming it to "suspend" for rk3399.dtsi make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/powerpc/sleep.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210126110221.10815-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 954d5986afa50c178ea7554e6abdd611d08f5ade Author: Peter Robinson Date: Tue Apr 13 15:17:09 2021 +0100 arm64: dts: rockchip: Use only supported PCIe link speed on rk3399 The max link speed supported by the rk3399 is already set in the rk3399.dtsi file so don't set unsupported link speeds in device specific DTs. This is the same fix as 642fb27. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20210413141709.845592-1-pbrobinson@gmail.com Signed-off-by: Heiko Stuebner commit 642593eec32571ff9288ddf3fa09792d3efb275f Author: Ezequiel Garcia Date: Thu May 6 08:11:34 2021 -0300 arm64: dts: rockchip: add timer0 clocks on rk3368 The timer driver requires pclk and sclk clocks to be present in the device tree node, so add them. Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20210506111136.3941-2-ezequiel@collabora.com Signed-off-by: Heiko Stuebner commit e6526f90696e6a7d722d04b958f15b97d6fd9ce6 Author: Chen-Yu Tsai Date: Mon Apr 26 17:59:16 2021 +0800 arm64: dts: rockchip: Drop fephy pinctrl from gmac2phy on rk3328 rock-pi-e Turns out the fephy pins are already claimed in the phy node, which is rightfully where they should be claimed. Drop the pinctrl properties from the gmac2phy node for the ROCK Pi E. Fixes: b918e81f2145 ("arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20210426095916.14574-1-wens@kernel.org Signed-off-by: Heiko Stuebner commit 6a11ffc2cc54d89719d5b2f3ca44244cebd7ed2e Author: Tianling Shen Date: Mon Apr 26 19:46:52 2021 +0800 arm64: dts: rockchip: rename LED label for NanoPi R4S However "sys" is not a valid function, and it is always on. Let's keep existing functions. Fixes: db792e9adbf85f ("rockchip: rk3399: Add support for FriendlyARM NanoPi R4S") Suggested-by: Pavel Machek Signed-off-by: Tianling Shen Acked-by: Pavel Machek Link: https://lore.kernel.org/r/20210426114652.29542-1-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit d49f120e27dc1689e11a14e9714e63a390dd4520 Author: Chen-Yu Tsai Date: Tue May 4 16:36:16 2021 +0800 arm64: dts: rockchip: Enable USB3 Ethernet on rk3328 NanoPi R2S The NanoPi R2S has a Realtek RTL8153B USB 3.0 Ethernet chip connected to the USB 3.0 pins of the RK3328 SoC. Power to the chip is controlled by a GPIO line toggled transistor switch, which is not a full-blown voltage regulator. At least in Linux, the USB 3.0 XHCI controller has two ports: the first port is for legacy USB 2.0 and slower, while the second port is for USB 3.0. Since the Ethernet chip supports USB 3.0, it should be described as connected to the second port. Add the device nodes for the power switch and Ethernet chip, and enable the USB 3.0 controller. The USB device node follows the standard USB device binding. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20210504083616.9654-5-wens@kernel.org Signed-off-by: Heiko Stuebner commit bf340c8084d2932936f385ebf48c4734b2911457 Author: Chen-Yu Tsai Date: Tue May 4 16:36:15 2021 +0800 arm64: dts: rockchip: Enable USB3 for rk3328 Rock Pi E Enable USB3 nodes for the Rock Pi E board. The VBUS regulator device node was added when the board was first introduced. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20210504083616.9654-4-wens@kernel.org Signed-off-by: Heiko Stuebner commit 75f95927334dea863f16f4ecd29cc709edc3c6ad Author: Chen-Yu Tsai Date: Tue May 4 16:36:14 2021 +0800 arm64: dts: rockchip: Enable USB3 for rk3328 ROC-RK3328-CC Enable USB3 nodes for the ROC-RK3328-CC board. The separate power regulator is not added as it is controlled by the same GPIO line as the existing VBUS regulators, so it is already enabled. Also there is no port representation to tie the regulator to. Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20210504083616.9654-3-wens@kernel.org Signed-off-by: Heiko Stuebner commit bbac8bd65f5402281cb7b0452c1c5f367387b459 Author: Cameron Nemo Date: Tue May 4 16:36:13 2021 +0800 arm64: dts: rockchip: Enable USB3 for rk3328 Rock64 Enable USB3 nodes for the rk3328-based PINE Rock64 board. The separate power regulator is not added as it is controlled by the same GPIO line as the existing VBUS regulators, so it is already enabled. Also there is no port representation to tie the regulator to. [wens@csie.org: Rebased onto v5.12] Signed-off-by: Cameron Nemo [wens@csie.org: Rewrote commit message] Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20210504083616.9654-2-wens@kernel.org Signed-off-by: Heiko Stuebner commit dfbfb86a43f9a5bbd166d88bca9e07ee4e1bff31 Author: Johan Jonker Date: Tue Jan 26 12:02:20 2021 +0100 ARM: dts: rockchip: fix pinctrl sleep nodename for rk3036-kylin and rk3288 A test with the command below aimed at powerpc generates notifications in the Rockchip ARM tree. Fix pinctrl "sleep" nodename by renaming it to "suspend" for rk3036-kylin and rk3288 make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/powerpc/sleep.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210126110221.10815-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit d5c24e20daf09587cbc221d40be1ba92673e8d94 Author: Ezequiel Garcia Date: Thu May 6 14:55:11 2021 -0300 ARM: dts: rockchip: Fix thermal sensor cells o rk322x The number of cells to be used with a thermal sensor specifier must be "1". Fix this. Signed-off-by: Ezequiel Garcia Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210506175514.168365-2-ezequiel@collabora.com commit 0e00c9135b62e9a59f6dfb7e479f1f7abbb1c3d3 Author: Corentin Labbe Date: Mon May 3 19:50:48 2021 +0000 ARM: dts: gemini: use the right rtc compatible The rtc compatible was not following the dt-binding. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 483f3645b3f7acfd1c78a19d51b80c0656161974 Author: Corentin Labbe Date: Mon May 3 18:52:28 2021 +0000 ARM: dts: gemini: add device_type on pci Fixes DT warning on pci node by adding the missing device_type. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 3d3bb3d27cd371d3edb43eeb1beb8ae4e92a356d Author: Corentin Labbe Date: Wed Apr 28 18:54:57 2021 +0000 ARM: dts: gemini-rut1xx: remove duplicate ethernet node Two ethernet node was added by commit 95220046a62c ("ARM: dts: Add ethernet to a bunch of platforms") and commit d6d0cef55e5b ("ARM: dts: Add the FOTG210 USB host to Gemini boards") This patch removes the duplicate one. Fixes: d6d0cef55e5b ("ARM: dts: Add the FOTG210 USB host to Gemini boards") Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit fc5b59b945b546e27977e99a5ca6fe61179ff0d2 Author: Corentin Labbe Date: Wed Apr 28 17:48:30 2021 +0000 ARM: dts: gemini: rename mdio to the right name ethernet-phy is not the right name for mdio, fix it. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 381382d4262dfa72d8450dc69f080a676305187d Author: Corentin Labbe Date: Fri Apr 16 11:42:05 2021 +0000 MAINTAINERS: gemini: add missing dts pattern The MAINTAINERS entry for cortina/gemini miss all dts of this platform. Signed-off-by: Corentin Labbe Signed-off-by: Linus Walleij commit 4fca55de564ae798c859b21201582ac2c82ccd32 Author: Lyude Paul Date: Fri Apr 30 18:34:28 2021 -0400 drm/dp: Drop open-coded drm_dp_is_branch() in drm_dp_read_downstream_info() Noticed this while fixing another issue in drm_dp_read_downstream_info(), the open coded DP_DOWNSTREAMPORT_PRESENT check here just duplicates what we already do in drm_dp_is_branch(), so just get rid of it. Signed-off-by: Lyude Paul Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430223428.10514-2-lyude@redhat.com commit 205bb69a90363541a634a662a599fddb95956524 Author: Lyude Paul Date: Fri Apr 30 18:34:27 2021 -0400 drm/dp: Handle zeroed port counts in drm_dp_read_downstream_info() While the DP specification isn't entirely clear on if this should be allowed or not, some branch devices report having downstream ports present while also reporting a downstream port count of 0. So to avoid breaking those devices, we need to handle this in drm_dp_read_downstream_info(). So, to do this we assume there's no downstream port info when the downstream port count is 0. Signed-off-by: Lyude Paul Tested-by: Jérôme de Bretagne Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/3416 Fixes: 3d3721ccb18a ("drm/i915/dp: Extract drm_dp_read_downstream_info()") Cc: # v5.10+ Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430223428.10514-1-lyude@redhat.com commit 767d724a160eb1cd00c86fb8c2e21fa1ab3c37ac Author: Christophe JAILLET Date: Thu May 6 20:57:05 2021 +0200 video: fbdev: imxfb: Fix an error message 'ret' is known to be 0 here. No error code is available, so just remove it from the error message. Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref") Reviewed-by: Uwe Kleine-König Signed-off-by: Christophe JAILLET Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/d7b25026f82659da3c6f7159eea480faa9d738be.1620327302.git.christophe.jaillet@wanadoo.fr commit ae9faeb9a2c9019953590dcf71312f70ce53c7d0 Author: Tvrtko Ursulin Date: Fri May 7 09:49:26 2021 +0100 drm/i915: Drop duplicate WaDisable4x2SubspanOptimization:hsw Same workaround was listed two times - once under the Gen7 block and once under the Haswell section. Signed-off-by: Tvrtko Ursulin Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210507084926.2423003-1-tvrtko.ursulin@linux.intel.com commit 76a262d274a2f23ac0fee24ff3e4d1a8276b95e2 Author: Maxime Ripard Date: Fri Apr 30 11:44:51 2021 +0200 drm/vc4: hdmi: Signal the proper colorimetry info in the infoframe Our driver while supporting HDR didn't send the proper colorimetry info in the AVI infoframe. Let's add the property needed so that the userspace can let us know what the colorspace is supposed to be. Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210430094451.2145002-5-maxime@cerno.tech commit 21f79128e0a16e10fd0fa43485fdff01008e0296 Author: Maxime Ripard Date: Fri Apr 30 11:44:50 2021 +0200 drm/connector: Add a helper to attach the colorspace property The intel driver uses the same logic to attach the Colorspace property in multiple places and we'll need it in vc4 too. Let's move that common code in a helper. Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210430094451.2145002-4-maxime@cerno.tech commit bccd5c5102a97d62b6339ebbea5b3f805ba13c14 Author: Dave Stevenson Date: Fri Apr 30 11:44:49 2021 +0200 drm/vc4: Add HDR metadata property to the VC5 HDMI connectors Now that we can export deeper colour depths, add in the signalling for HDR metadata. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210430094451.2145002-3-maxime@cerno.tech commit 72921cdf8ac248c904e3883418d2f74f45028222 Author: Maxime Ripard Date: Fri Apr 30 11:44:48 2021 +0200 drm/connector: Add helper to compare HDR metadata All the drivers that support the HDR metadata property have a similar function to compare the metadata from one connector state to the next, and force a mode change if they differ. All these functions run pretty much the same code, so let's turn it into an helper that can be shared across those drivers. Reviewed-by: Harry Wentland Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210430094451.2145002-2-maxime@cerno.tech commit e057b52c1d90e2898fdc01c95d21bd70c81b968a Author: Maxime Ripard Date: Fri Apr 30 11:44:47 2021 +0200 drm/connector: Create a helper to attach the hdr_output_metadata property All the drivers that implement HDR output call pretty much the same function to initialise the hdr_output_metadata property, and while the creation of that property is in a helper, every driver uses the same code to attach it. Provide a helper for it as well Reviewed-by: Harry Wentland Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210430094451.2145002-1-maxime@cerno.tech commit 8a4053738c0584dd1bee45d1878c71265617cb17 Author: Imre Deak Date: Thu May 6 19:19:30 2021 +0300 drm/i915/adl_p: Enable remapping to pad DPT FB strides to POT Enable padding of DPT FB strides to POT, using the FB remapping logic. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-11-imre.deak@intel.com commit f6b044e4d9fb3b2b00681c96a3fc438e9c281ef2 Author: Imre Deak Date: Thu May 6 19:19:29 2021 +0300 drm/i915/adl_p: Require a minimum of 8 tiles stride for DPT FBs The specification only requires DPT FB strides to be POT aligned, but there seems to be also a minimum of 8 stride tile requirement. Scanning out FBs with < 8 stride tiles will result in pipe faults (even though the stride is POT aligned). Signed-off-by: Imre Deak Acked-by: Ville Syrjälä Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-10-imre.deak@intel.com commit d3b4aa43eea3aebea51bfb02ca5ce93df0abc9c4 Author: Imre Deak Date: Thu May 6 19:19:28 2021 +0300 drm/i915/adl_p: Disable support for 90/270 FB rotation The latest specification removed the support for 90/270 FB rotation on ADL_P, even though legacy Y-tiled surfaces are supported. Align the code accordingly. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-9-imre.deak@intel.com commit 2ac5620fbe31d4a2364b82390deaf59892a0d4f4 Author: José Roberto de Souza Date: Thu May 6 19:19:27 2021 +0300 drm/i915/adl_p: Add stride restriction when using DPT Alderlake-P have a new stride restriction when using DPT and it is used by non linear framebuffers. Stride needs to be a power of two to take full DPT rows, but stride is a parameter set by userspace. What we could do is use a fake stride when doing DPT allocation so HW requirements are met and userspace don't need to be changed to met this power of two restrictions but this change will take a while to be implemented so for now adding this restriction in driver to reject atomic commits that would cause visual corruptions. BSpec: 53393 Acked-by: Matt Roper Cc: Matt Roper Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Signed-off-by: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-8-imre.deak@intel.com commit e7367af1ee3df07820de61e9b9896c4979f4132c Author: Juha-Pekka Heikkilä Date: Thu May 6 19:19:26 2021 +0300 drm/i915/xelpd: Support 128k plane stride XE_LPD supports plane strides up to 128KB. Cc: Vandita Kulkarni Signed-off-by: Juha-Pekka Heikkilä Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-7-imre.deak@intel.com commit ad2f92c9f0e4c66e28ac5f3bc9df3bf77f871c51 Author: José Roberto de Souza Date: Thu May 6 19:19:25 2021 +0300 drm/i915/xelpd: Fallback to plane stride limitations when using DPT GTT remapping allow us to have planes with strides larger than HW supports but DPT + GTT remapping is still not properly handled so falling back to plane HW limitations for now. This patch can be dropped when DPT + GTT remapping is correctly handled but until then we need this limitation for all display13 platforms to avoid pipe faults. Cc: Ville Syrjälä Cc: Clint Taylor Cc: Matt Roper Suggested-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-6-imre.deak@intel.com commit 33e7a975103cebb20e7dee743adc8f9335958139 Author: Ville Syrjälä Date: Thu May 6 19:19:24 2021 +0300 drm/i915/xelpd: First stab at DPT support Add support for DPT (display page table). DPT is a slightly peculiar two level page table scheme used for tiled scanout buffers (linear uses direct ggtt mapping still). The plane surface address will point at a page in the DPT which holds the PTEs for 512 actual pages. Thus we require 1/512 of the ggttt address space compared to a direct ggtt mapping. We create a new DPT address space for each framebuffer and track two vmas (one for the DPT, another for the ggtt). TODO: - Is the i915_address_space approaach sane? - Maybe don't map the whole DPT to write the PTEs? - Deal with remapping/rotation? Need to create a separate DPT for each remapped/rotated plane I guess. Or else we'd need to make the per-fb DPT large enough to support potentially several remapped/rotated vmas. How large should that be? Signed-off-by: Ville Syrjälä Signed-off-by: Bommu Krishnaiah Cc: Wilson Chris P Cc: Tang CQ Cc: Auld Matthew Reviewed-by: Uma Shankar Reviewed-by: Wilson Chris P Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-5-imre.deak@intel.com commit bdd27cad22379a665fe246a0f9b37acb502df0fe Author: Clinton Taylor Date: Thu May 6 19:19:23 2021 +0300 drm/i915/adl_p: ADL_P device info enabling Add ADL-P to the device_info table and support MACROS. Bspec: 49185, 55372, 55373 Cc: Matt Atwood Cc: Matt Roper Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-4-imre.deak@intel.com commit 760759f2cf711be86f360e6a7cdd01a9d4252b8e Author: Clinton Taylor Date: Thu May 6 19:19:22 2021 +0300 drm/i915/adl_p: Add PCI Devices IDs Add 18 known PCI device IDs Bspec: 55376 Cc: Caz Yokoyama Cc: Matt Atwood Cc: Matt Roper Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-3-imre.deak@intel.com commit 8398024b6e888518dff688e627328a9db5b48f98 Author: Matt Roper Date: Thu May 6 19:19:21 2021 +0300 drm/i915/xelpd: add XE_LPD display characteristics Let's start preparing for upcoming platforms that will use an XE_LPD design. v2: - Use the now-preferred "XE_LPD" term to refer to this design - Utilize DISPLAY_VER() rather than a feature flag - Drop unused mbus_size field (Lucas) v3: - Adjust for dbuf.{size,slice_mask} (Ville) Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza (v2) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210506161930.309688-2-imre.deak@intel.com commit 7c653e15e2ba4c476ea9aa1f5ddf14ca3ccacc17 Author: Ville Syrjälä Date: Thu May 6 10:38:36 2021 +0300 drm/i915: Reorder skl+ scaler vs. plane updates When scanning out NV12 if we at any time have the plane enabled while the scaler is disabled we get a pretty catastrophic underrun. Let's reorder the operations so that we try to avoid that happening even if our vblank evade fails and the scaler enable/disable and the plane enable/disable get latched during two diffent frames. This takes care of the most common cases. I suppose there is still at least a theoretical possibility of hitting this if one plane takes the scaler away from another plane before the second plane had a chance to set up another scaler for its use. But that is starting to get a bit complicated, especially since the plane commit order already has to be carefully sequenced to avoid any dbuf overlaps. So plugging this 100% may prove somewhat hard... Cc: Cooper Chiou Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210506073836.14848-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit e7c46e43bdd28f16ace4415a0d63c7740671438a Author: Ville Syrjälä Date: Wed May 5 22:11:40 2021 +0300 drm/i915: Nuke display error state I doubt anyone has used the display error state since CS flips went the way of the dodo. Just nuke it. It might be semi interesting to have something like this for FIFO underruns and the like, but as it stands this wouldn't provide a sufficient amount of information. So would need an extensive rewrite anyway. The lockless power well handling is also racy, so this could just be contributing noise to test results if we end up accessing something with the relevant power well already disabled. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210505191140.14215-1-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 9a5b5e1b981309179e030aca0c535a4f037dfa95 Author: José Roberto de Souza Date: Wed May 5 14:38:01 2021 -0700 drm/i915/display: Disable PSR2 sel fetch in TGL pre-production The implementation of two workarounds are missing causing failures in CI with pre-production HW. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210505213801.80772-1-jose.souza@intel.com commit 2a2180a1c7be55de926801128ae5ecb098040f6e Author: Wan Jiabing Date: Thu May 6 19:28:51 2021 +0800 drm/gma500: update comment of psb_spank() In commit 5c209d8056b9 ("drm/gma500: psb_spank() doesn't need it's own file"), accel_2d.c was deleted and psb_spank() was moved into psb_drv.c. Fix the comment here. Signed-off-by: Wan Jiabing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210506112851.20315-1-wanjiabing@vivo.com commit cee93c028288b9af02919f3bd8593ba61d1e610d Author: Daniel Vetter Date: Tue Apr 27 11:20:16 2021 +0200 drm/nouveau: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Note that this fixes an inconsistency: We've set the cap everywhere, but only nv50+ supports modifiers. Hence cc stable, but not further back then the patch from Paul. Reviewed-by: Lyude Paul Cc: stable@vger.kernel.org # v5.1 + Cc: Pekka Paalanen Signed-off-by: Daniel Vetter Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-6-daniel.vetter@ffwll.ch commit 35cbb8c91e9cf310277d3dfb4d046df8edf2df33 Author: Daniel Vetter Date: Tue Apr 27 11:20:15 2021 +0200 drm/msm/mdp4: Fix modifier support enabling Setting the cap without the modifier list is very confusing to userspace. Fix that by listing the ones we support explicitly. Stable backport so that userspace can rely on this working in a reasonable way, i.e. that the cap set implies IN_FORMATS is available. Acked-by: Pekka Paalanen Reviewed-by: Lyude Paul Cc: stable@vger.kernel.org Cc: Pekka Paalanen Cc: Rob Clark Cc: Jordan Crouse Cc: Emil Velikov Cc: Sam Ravnborg Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-5-daniel.vetter@ffwll.ch commit b5f9535ade848274287b2d73161a0e4da90c0010 Author: Daniel Vetter Date: Tue Apr 27 11:20:14 2021 +0200 drm/msm/dpu1: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. v2: Rebase. Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Kalyan Thota Cc: Jordan Crouse Cc: Eric Anholt Cc: Tanmay Shah Cc: Rajendra Nayak Cc: Jeykumar Sankaran Cc: Qinglang Miao Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-4-daniel.vetter@ffwll.ch commit 656eca09989e802ca4a57a200626f49abe204334 Author: Daniel Vetter Date: Tue Apr 27 11:20:13 2021 +0200 drm/i915: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Acked-by: Jani Nikula Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Cc: "Ville Syrjälä" Cc: Manasi Navare Cc: Jani Nikula Cc: "José Roberto de Souza" Cc: Chris Wilson Cc: Imre Deak Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Karthik B S Cc: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-3-daniel.vetter@ffwll.ch commit b397027b8e4536e754b4ec9b332c72ccd905acc0 Author: Daniel Vetter Date: Tue Apr 27 11:20:17 2021 +0200 drm/stm: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Acked-by: Philippe Cornu Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-7-daniel.vetter@ffwll.ch commit 26c3e7fd5a3499e408915dadae5d5360790aae9a Author: Daniel Vetter Date: Tue Apr 27 11:20:12 2021 +0200 drm/arm/malidp: Always list modifiers Even when all we support is linear, make that explicit. Otherwise the uapi is rather confusing. Acked-by: Liviu Dudau Acked-by: Pekka Paalanen Reviewed-by: Lyude Paul Cc: stable@vger.kernel.org Cc: Pekka Paalanen Cc: Liviu Dudau Cc: Brian Starkey Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-2-daniel.vetter@ffwll.ch commit 9d1cbe5fdf04c18346541b741f631e1094e34a74 Author: Daniel Vetter Date: Tue Apr 27 11:20:11 2021 +0200 drm/arm: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here for both komeda and malidp. Acked-by: Liviu Dudau Reviewed-by: Lyude Paul Signed-off-by: Daniel Vetter Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-1-daniel.vetter@ffwll.ch commit 1c4f39b04202595a599d7449fe38a9550001d9d9 Author: Ville Syrjälä Date: Tue May 4 13:27:42 2021 +0300 drm: Use drm_mode_is_420_only() instead of open coding it Replace the open coded drm_mode_is_420_only() with the real thing. No functional changes. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210504102742.7005-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7973cff7be1db3433451258e02dfdaf22ddf6b73 Author: Ville Syrjälä Date: Fri Apr 30 18:34:44 2021 +0300 drm/i915: Use intel_de_wait_for_*() in cnl+ cdclk programming Replace the hand rolled PLL lock bit waits with intel_de_wait_for_*(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430153444.29270-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 468f9e8d048294f2a0a5e3b898e37ad636688295 Author: Ville Syrjälä Date: Fri Apr 30 18:34:43 2021 +0300 drm/i915: Use intel_de_rmw() in bxt/glk/cnl+ cdclk programming Replace the hand rolled rmw sequences with intel_de_rmw(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430153444.29270-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3b71a9b6cffd0aaa0fe2fb0e38ba068cab319c77 Author: Ville Syrjälä Date: Fri Apr 30 18:34:42 2021 +0300 drm/i915: Use intel_de_rmw() in skl cdclk programming Replace the hand rolled rmw sequences with intel_de_rmw(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430153444.29270-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit fb12fbb18f38b1350f04ef0b25684624fc8cca1c Author: Ville Syrjälä Date: Fri Apr 30 18:34:41 2021 +0300 drm/i915: Use intel_de_rmw() in bdw cdclk programming Replace the hand rolled rmw sequences with intel_de_rmw(). Jani pointed out that intel_de_rmw() skips the write if the value does not change. That should be totally fine here, but let's at least acknowledge the change in behaviour in case I'm somehow wrong... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430153444.29270-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b41df85a9834932370806df189d5997a4891fd88 Author: Ville Syrjälä Date: Fri Apr 30 18:34:40 2021 +0300 drm/i915: Extract some helpers to compute cdclk register values Extract a few of the switch statements into helper functions to reduce the pollution in the cdclk programming functions. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430153444.29270-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit fcf83a21141eea91d877c1afb6e15ad9d40ae125 Author: Ville Syrjälä Date: Fri Apr 30 17:39:45 2021 +0300 drm/i915: Include intel_de_{read,write}_fw() in i915_reg_rw traces We lost the i915_reg_rw tracepoint for a lot of display registers when we switched from the heavyweight normal register accessors to the lightweight _fw() variants. See eg. commit dd584fc0711a ("drm/i915: Use I915_READ_FW for plane updates"). Put the tracepoints back so that the register traces might actually be useful. Hopefully these should be close to free when the tracepoint is not enabled and thus not slow down our vblank critical sections significantly. v2: Copy paste the same-cacheline-hang warning from intel_uncore.h (Anshuman) Cc: Cooper Chiou Reviewed-by: Anshuman Gupta Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430143945.6776-2-ville.syrjala@linux.intel.com commit 7785ae0b51a0441ad79fb331472f2d4b7159ab71 Author: Ville Syrjälä Date: Fri Apr 30 17:39:44 2021 +0300 drm/i915: Don't include intel_de.h from intel_display_types.h Hoist the intel_de.h include from intel_display_types.h one level up. I need this in order to untangle the include order so that I can add tracepoints into intel_de.h. This little cocci script did most of the work for me: @find@ @@ ( intel_de_read(...) | intel_de_read_fw(...) | intel_de_write(...) | intel_de_write_fw(...) ) @has_include@ @@ ( #include "intel_de.h" | #include "display/intel_de.h" ) @depends on find && !has_include@ @@ + #include "intel_de.h" #include "intel_display_types.h" @depends on find && !has_include@ @@ + #include "display/intel_de.h" #include "display/intel_display_types.h" Cc: Cooper Chiou Reviewed-by: Anshuman Gupta Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210430143945.6776-1-ville.syrjala@linux.intel.com commit 660729e494b6ee64feb97b41f3092c32a41c7dae Author: Adrien Grassein Date: Wed May 5 00:02:07 2021 +0200 drm/bridge: fix LONTIUM_LT8912B dependencies LONTIUM_LT8912B uses "drm_display_mode_to_videomode" from DRM framework that needs VIDEOMODE_HELPERS to be enabled. Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Reported-by: Michal Suchánek Signed-off-by: Adrien Grassein Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210504220207.4004511-1-adrien.grassein@gmail.com commit 703cd9ae0d674a7a1d5d2713e0ddbad87dc0e7a9 Author: Imre Deak Date: Sat May 1 03:28:52 2021 +0300 drm/i915/tgl+: Add the missing MC CCS/XYUV8888 format support Make sure that the XYUV8888 format is handled correctly when it's used with a MC_CCS modifier framebuffer. Besides this format not working, the driver will also return an incorrect error value when trying to use it, indicating that the second color plane in the framebuffer is set unexpectedly. Signed-off-by: Imre Deak Reviewed-by: Juha-Pekka Heikkila Link: https://patchwork.freedesktop.org/patch/msgid/20210501002853.4132009-1-imre.deak@intel.com commit eb134536cf6fb2e50b5ced653f7c34d306b2d73f Author: Ahelenia Ziemiańska Date: Mon Mar 8 18:42:13 2021 +0100 HID: input: replace outdated HID numbers+comments with macros These were untouched since 2.3.99-pre3, and the explanatory comment for HID_DG_TIPPRESSURE is TipPressure in other places Signed-off-by: Ahelenia Ziemiańska Signed-off-by: Jiri Kosina commit b413c59ead320a21eb72ab7c2e0f0a81911f67ab Author: Hans de Goede Date: Fri Apr 16 15:13:23 2021 +0200 HID: lg-g15 + ite: Add MODULE_AUTHOR I noticed that the 2 HID drivers which I've written and maintain were missing a MODULE_AUTHOR tag, add this so that people can easily figure out who to email with questions. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit cbe5b6b6a77ad262d9f9a56962c9b1ac2f91c0f5 Author: Hans de Goede Date: Fri Apr 16 15:13:22 2021 +0200 HID: lg-g15: Add support for the Logitech Z-10 speakers Add support to hid-lg-g15 for the Logitech Z-10 speakers. This adds support for the LCD menu keys found on these speakers, as well as support for controlling the LCD's brightness through a LED classdev. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 1e5c22983f13fc1ac05fc21772893b2602ddeb66 Author: Hans de Goede Date: Fri Apr 16 15:13:21 2021 +0200 HID: lg-g15: Make the LED-name used by lg_g15_register_led() a parameter Make the LED-name used by lg_g15_register_led() a parameter. This is a preparation patch for adding support for the LCD menu keys + LCD brightness control on the Logitech Z-10 speakers (with LCD) which use the same protocol as the G15 keyboards. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 614d34f8b3dba62ff0d13d0d45e3220c2960b17d Author: Hans de Goede Date: Fri Apr 16 15:13:20 2021 +0200 HID: lg-g15: Add a lg_g15_init_input_dev() helper function Factor the input-device setup + KEY_KBD_LCD_MENU capability setting out of lg_g15_probe() into a new lg_g15_init_input_dev() helper function. This is a preparation patch for adding support for the LCD menu keys + LCD brightness control on the Logitech Z-10 speakers (with LCD) which use the same protocol as the G15 keyboards. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit ba3e054e7a70d447aa95883dab87a4eae641d6bc Author: Hans de Goede Date: Fri Apr 16 15:13:19 2021 +0200 HID: lg-g15: Add a lg_g15_handle_lcd_menu_keys() helper function Factor out the handling of the G15 LCD menu keys out of lg_g15_event() into a new lg_g15_handle_lcd_menu_keys() helper function. This is a preparation patch for adding support for the LCD menu keys on the Logitech Z-10 speakers (with LCD) which use the same funky HID report format. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 042d05b2e30e8a2bb378ecb668a85790dce39355 Author: Hans de Goede Date: Fri Apr 16 15:13:18 2021 +0200 HID: lg-g15: Remove unused size argument from lg_*_event() functions The report-size is already checked in lg_g15_raw_event() before calling the lg_*_event() functions and these functions don't use the passed in size at all, drop the unused parameter. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 8dcaa046bf96353c878ddadda506e2708cb4b8c3 Author: Ikjoon Jang Date: Thu Apr 15 11:29:58 2021 +0800 HID: google: Add of_match table to Whiskers switch device. Add a device tree match table for "cros-cbas" switch device. Signed-off-by: Ikjoon Jang Reviewed-by: Dmitry Torokhov Acked-by: Jiri Kosina Signed-off-by: Jiri Kosina commit 7383354ad59573b42085df3b089ba925a7d1a15a Author: Hans de Goede Date: Sun Apr 4 20:56:09 2021 +0200 HID: logitech-dj/hidpp: Add info/warn/err messages about 27 MHz keyboard encryption By default 27 MHz Logitech keyboards send the keypresses to the receiver in plain text. Logitech's Windows "Keyboard and Mouse settings" tool allows configuring encryption for the keyboard wireless link. Now there also is a Linux tool for setting this up: https://gitlab.freedesktop.org/jwrdegoede/logitech-27mhz-keyboard-encryption-setup Once a keyboard is paired in encrypted mode, it will no longer work with any receiver other then the receiver it was paired with. If a user accidentally tries to pair another keyboard with the receiver with which a keyboard has been paired in encrypted mode, then the receiver looses the encryption key and the originally paired keyboard will no longer work with either that receiver, or another receiver until the keyboard's encryption key is rewritten by another encrypted mode pairing using the tool. Or until it is reset by following a special reset procedure. This commit adds 3 new log messages related to 27 MHz keyboard link encryption to the Logitech dj / hidpp drivers: 1. An info level message when keyboard encryption is being used 2. A warning message when keyboard encryption is not used 3. An error message when the encryption key has been lost and the keyboard will not work because of this Messages 2. and 3. contain a link to the userspace tool to setup the encryption. The linked page also contains instructions to clear the key (without needing the tool) to help a user recover from the keyboard not working in case 3. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit f2145f8dc566c4f3b5a8deb58dcd12bed4e20194 Author: Dmitry Torokhov Date: Fri Mar 19 17:27:16 2021 -0700 HID: do not use down_interruptible() when unbinding devices Action of unbinding driver from a device is not cancellable and should not fail, and driver core does not pay attention to the result of "remove" method, therefore using down_interruptible() in hid_device_remove() does not make sense. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit c3b147604f279051865ebef59d971fde1d2cd457 Author: Matthew Auld Date: Tue May 4 17:41:36 2021 +0100 drm/i915: drop the __i915_active_call pointer packing We use some of the lower bits of the retire function pointer for potential flags, which is quite thorny, since the caller needs to remember to give the function the correct alignment with __i915_active_call, otherwise we might incorrectly unpack the pointer and jump to some garbage address later. Instead of all this let's just pass the flags along as a separate parameter. Suggested-by: Ville Syrjälä Suggested-by: Daniel Vetter References: ca419f407b43 ("drm/i915: Fix crash in auto_retire") References: d8e44e4dd221 ("drm/i915/overlay: Fix active retire callback alignment") References: fd5f262db118 ("drm/i915/selftests: Fix active retire callback alignment") Signed-off-by: Matthew Auld Reviewed-by: Matthew Brost Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210504164136.96456-1-matthew.auld@intel.com commit 874442541133f78c78b6880b8cc495bab5c61704 Author: Roy Sun Date: Mon Apr 26 14:27:01 2021 +0800 drm/amdgpu: Add show_fdinfo() interface Tracking devices, process info and fence info using /proc/pid/fdinfo Signed-off-by: David M Nieto Signed-off-by: Roy Sun Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210426062701.39732-2-Roy.Sun@amd.com commit 1774baa64f9395fa884ea9ed494bcb043f3b83f5 Author: Roy Sun Date: Mon Apr 26 14:27:00 2021 +0800 drm/scheduler: Change scheduled fence track v2 Update the timestamp of scheduled fence on HW completion of the previous fences This allow more accurate tracking of the fence execution in HW v2 (chk): drop the flag check and improve the comment Signed-off-by: David M Nieto Signed-off-by: Roy Sun Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210426062701.39732-1-Roy.Sun@amd.com commit 8f8bb68ebd60fefa6cf5ba56c45d5f707f1a39d4 Author: Alex Deucher Date: Mon May 3 09:47:35 2021 -0400 MAINTAINERS: Fix TTM tree TTM uses drm-misc now. Update the tree. Cc: David Ward Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210503134736.1467003-1-alexander.deucher@amd.com commit 6268b28473c7d947ef4d3e86e959637f93556c06 Author: Douglas Anderson Date: Tue May 4 07:38:54 2021 -0700 drm/bridge: ti-sn65dsi86: Remove __exit from GPIO sub-driver remove helper The ti_sn_gpio_unregister() is not just called from the remove path but also from the error handling of the init path. That means it can't have the __exit annotation. Fixes: bf73537f411b ("drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers") Reported-by: kernel test robot Signed-off-by: Douglas Anderson Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210504073845.1.Ibf4194f4252846edaa0c6a6c7b86588f75ad5529@changeid commit f7dbd8624ec62facbb7968a6b3e0f598b4bbf166 Author: Christian König Date: Mon May 3 16:25:31 2021 +0200 drm/ttm: fix warning in new sys man Include the header for the prototype. Signed-off-by: Christian König Reported-by: kernel test robot Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210503142710.153369-1-christian.koenig@amd.com commit 959086ecd677745f24526426c33a559fc3d2d2c1 Author: Imre Deak Date: Wed Apr 14 18:51:58 2021 +0300 drm/i915: Pass intel_framebuffer instad of drm_framebuffer to intel_fill_fb_info() Make one step to pass intel_framebuffer to all intel_fb functions. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210414155208.3161335-2-imre.deak@intel.com commit 31824c03faac432171032fe9a50567ea7973d68e Author: Jani Nikula Date: Tue May 4 11:14:01 2021 +0300 drm/i915/audio: fix indentation, remove extra braces Cleanup the code. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6c2f6afa4c8866f8c1714b4f8dba9ea2d1509e4a.1620115983.git.jani.nikula@intel.com commit f4c50deecaed632e9f413135fc3c13bacfbe71f5 Author: Jani Nikula Date: Tue May 4 11:14:00 2021 +0300 drm/i915/audio: simplify, don't mask out in all branches Lift the masking outside of the if branches. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a87fd5e66b52c4d52a568888e1b8037841786fd2.1620115982.git.jani.nikula@intel.com commit 0a46be95c282956a9d3229a46e33ba701c26594c Author: Matthew Auld Date: Thu Apr 29 11:30:56 2021 +0100 drm/i915/gem: hide new uAPI behind CONFIG_BROKEN Treat it the same as the fake local-memory stuff, where it is disabled for normal kernels, in case some random UMD is tempted to use this. Once we have all the other bits and pieces in place, like the TTM conversion, we can turn this on for real. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-9-matthew.auld@intel.com commit 0e997a36ecb61b161a22980ec9240ee7537f3f62 Author: Matthew Auld Date: Thu Apr 29 11:30:55 2021 +0100 drm/i915/gem: clear userspace buffers for LMEM All userspace objects must be cleared when allocating the backing store, before they are potentially visible to userspace. For now use simple CPU based clearing to do this for device local-memory objects, note that in the near future this will instead use the blitter engine. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-8-matthew.auld@intel.com commit 4f869f1dbd7eac42f3d4b129b8c941de54de77bf Author: Matthew Auld Date: Thu Apr 29 11:30:54 2021 +0100 drm/i915/lmem: support optional CPU clearing for special internal use For some internal device local-memory objects it would be useful to have an option to CPU clear the pages upon gathering the backing store. Note that this might be before the blitter is useable, which is the case for some internal GuC objects. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Acked-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-7-matthew.auld@intel.com commit 2459e56fd8af0b47fcbfbdff2fdc02e4077680ec Author: Matthew Auld Date: Thu Apr 29 11:30:53 2021 +0100 drm/i915/uapi: implement object placement extension Add new extension to support setting an immutable-priority-list of potential placements, at creation time. If we use the normal gem_create or gem_create_ext without the extensions/placements then we still get the old behaviour with only placing the object in system memory. v2(Daniel & Jason): - Add a bunch of kernel-doc - Simplify design for placements extension Testcase: igt/gem_create/create-ext-placement-sanity-check Testcase: igt/gem_create/create-ext-placement-each Testcase: igt/gem_create/create-ext-placement-all Signed-off-by: Matthew Auld Signed-off-by: CQ Tang Cc: Joonas Lahtinen Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-6-matthew.auld@intel.com commit ebcb40298947bdb0622e53c69734e6b4fb64b348 Author: Matthew Auld Date: Thu Apr 29 11:30:52 2021 +0100 drm/i915/uapi: introduce drm_i915_gem_create_ext Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. v2:(Chris) - Use separate ioctl number for gem_create_ext, instead of hijacking the existing gem_create ioctl, otherwise we run into the issue with being unable to detect if the kernel supports the new extension behaviour. - We now have gem_create_ext.flags, which should be zeroed. - I915_GEM_CREATE_EXT_SETPARAM value is now zero, since this is the index into our array of extensions. - Setup a "vanilla" object which we can directly apply our extensions to. v3:(Daniel & Jason) - drop I915_GEM_CREATE_EXT_SETPARAM. Instead just have each extension do one thing only, instead of generic setparam which can cover various use cases. - add some kernel-doc. Signed-off-by: Matthew Auld Signed-off-by: CQ Tang Cc: Joonas Lahtinen Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-5-matthew.auld@intel.com commit 357814f878f97a82fd7b4146e1a50822847c4ed7 Author: Matthew Auld Date: Thu Apr 29 11:30:51 2021 +0100 drm/i915: rework gem_create flow for upcoming extensions With the upcoming gem_create_ext we want to be able create a "vanilla" object upfront and pass that directly to the extensions, before actually initialising the object. Functionally this should be the same expect we now feed the object into the lower-level region specific init_object. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-4-matthew.auld@intel.com commit 710217292a61110a8ccf010cf6886d25e34bf024 Author: Abdiel Janulgue Date: Thu Apr 29 11:30:50 2021 +0100 drm/i915/query: Expose memory regions through the query uAPI Returns the available memory region areas supported by the HW. v2(Daniel & Jason): - Add some kernel-doc, including example usage. - Drop all the extra rsvd v3(Jason & Tvrtko) - add back rsvd Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-3-matthew.auld@intel.com commit 36150bba44329d7a96e58498bfc91fee9a2de08c Author: Matthew Auld Date: Thu Apr 29 11:30:49 2021 +0100 drm/i915: mark stolen as private In the next patch we want to expose the supported regions to userspace, which can then be fed into the gem_create_ext placement extensions. For now treat stolen memory as private from userspace pov. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-2-matthew.auld@intel.com commit 2bc9c04ea7020df3a98682f12c50e38870d3104a Author: Matthew Auld Date: Thu Apr 29 11:30:48 2021 +0100 drm/doc/rfc: i915 DG1 uAPI Add an entry for the new uAPI needed for DG1. Also add the overall upstream plan, including some notes for the TTM conversion. v2(Daniel): - include the overall upstreaming plan - add a note for mmap, there are differences here for TTM vs i915 - bunch of other suggestions from Daniel v3: (Daniel) - add a note for set/get caching stuff - add some more docs for existing query and extensions stuff - add an actual code example for regions query - bunch of other stuff (Jason) - uAPI change(!): - try a simpler design with the placements extension - rather than have a generic setparam which can cover multiple use cases, have each extension be responsible for one thing only v4: (Daniel) - add some more notes for ttm conversion - bunch of other stuff (Jason) - uAPI change(!): - drop all the extra rsvd members for the region_query and region_info, just keep the bare minimum needed for padding v5: (Jason) - for the upstream plan, add a requirement that we send the uAPI bits again for final sign off before turning it on for real - document how we intend to extend the rsvd bits for the region query (Kenneth) - improve the comment for the smem+lmem mmap mode and caching Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Thomas Hellström Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Acked-by: Daniel Vetter Acked-by: Dave Airlie Acked-by: Kenneth Graunke Acked-by: Jon Bloomfield Link: https://patchwork.freedesktop.org/patch/msgid/20210429103056.407067-1-matthew.auld@intel.com commit 63358e24ee79e8f43dadb755cbe8e955230c03a1 Author: Douglas Anderson Date: Fri Apr 23 09:59:04 2021 -0700 drm/panel: panel-simple: Cache the EDID as long as we retain power It doesn't make sense to go out to the bus and read the EDID over and over again. Let's cache it and throw away the cache when we turn power off from the panel. Autosuspend means that even if there are several calls to read the EDID before we officially turn the power on then we should get good use out of this cache. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Reviewed-by: Sean Paul Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.18.If050957eaa85cf45b10bcf61e6f7fa61c9750ebf@changeid commit 31e25395d8b7d271a1ab92a97239c1e5fb1b792b Author: Douglas Anderson Date: Fri Apr 23 09:59:03 2021 -0700 drm/panel: panel-simple: Power the panel when reading the EDID I don't believe that it ever makes sense to read the EDID when a panel is not powered and the powering on of the panel is the job of prepare(). Let's make sure that this happens before we try to read the EDID. We use the pm_runtime functions directly rather than directly calling the normal prepare() function because the pm_runtime functions are definitely refcounted whereas it's less clear if the prepare() one is. NOTE: I'm not 100% sure how EDID reading was working for folks in the past, but I can only assume that it was failing on the initial attempt and then working only later. This patch, presumably, will fix that. If some panel out there really can read the EDID without powering up and it's a big advantage to preserve the old behavior we can add a per-panel flag. It appears that providing the DDC bus to the panel in the past was somewhat uncommon in any case. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Reviewed-by: Sean Paul Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.17.Ibd31b8f7c73255d68c5c9f5b611b4bfaa036f727@changeid commit 4318ea406e02a7c928e26926bc421b9bcf883fbc Author: Douglas Anderson Date: Fri Apr 23 09:59:02 2021 -0700 drm/panel: panel-simple: Remove extra call: drm_connector_update_edid_property() As of commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") the drm_get_edid() function calls drm_connector_update_edid_property() for us. There's no reason for us to call it again. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Reviewed-by: Sean Paul Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.16.Icb581b0273d95cc33ca38676c61ae6d7d2e75357@changeid commit b137406d9679acbbcde4b915137e4e036dde4841 Author: Douglas Anderson Date: Fri Apr 23 09:58:59 2021 -0700 drm/bridge: ti-sn65dsi86: If refclk, DP AUX can happen w/out pre-enable Let's reorganize how we init and turn on the reference clock in the code to allow us to turn it on early (even before pre_enable()) so that we can read the EDID early. This is handy for eDP because: - We always assume that a panel is there. - Once we report that a panel is there we get asked to read the EDID. - Pre-enable isn't called until we know what pixel clock we want to use and we're ready to turn everything on. That's _after_ we get asked to read the EDID. NOTE: the above only works out OK if we "refclk" is provided. Though I don't have access to any hardware that uses ti-sn65dsi86 and _doesn't_ provide a "refclk", I believe that we'll have trouble reading the EDID at bootup in that case. Specifically I believe that if there's no "refclk" we need the MIPI source clock to be active before we can successfully read the EDID. My evidence here is that, in testing, I couldn't read the EDID until I turned on the DPPLL in the bridge chip and that the DPPLL needs the input clock to be active. Since this is hard to support, let's punt trying to handle this case if there's no "refclk". In that case we'll enable comms in pre_enable() like we always did. I don't believe there are any users of the ti-sn65dsi86 bridge chip that _don't_ use "refclk". The bridge chip is _very_ inflexible in that mode. The only time I've seen that mode used was for some really early prototype hardware that was thrown in the e-waste bin years ago when we realized how inflexible it was. Even if someone is using the bridge chip without the "refclk" they're in no worse shape than they were before the (fairly recent) commit 58074b08c04a ("drm/bridge: ti-sn65dsi86: Read EDID blob over DDC"). Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.13.Ie8cf556114953c6e7634564cc0d3ddbd103cb96c@changeid commit f7a5ee2cd3e23f5bdead48056cd80a6bca4141f3 Author: Douglas Anderson Date: Fri Apr 23 09:58:58 2021 -0700 drm/bridge: ti-sn65dsi86: Code motion of refclk management functions No functional changes--this just makes the diffstat of a future change easier to understand. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.12.I047b8c7c6a3fc60eaca473da7a374f171fb021c2@changeid commit 9bede63127c61023a64b46b28e1f8cab5d31c57c Author: Douglas Anderson Date: Fri Apr 23 09:58:57 2021 -0700 drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend Let's make the bridge use autosuspend with a 500ms delay. This is in preparation for promoting DP AUX transfers to their own sub-driver so that we're not constantly powering up and down the device as we transfer all the chunks. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.11.I4c0b4a87e4dc19e5023b4d0a21bbfa6d9c09ebd8@changeid commit 5c4381eeb70949059e7b160e45c83b485ecca3d2 Author: Douglas Anderson Date: Fri Apr 23 09:58:56 2021 -0700 drm/panel: panel-simple: Get rid of hacky HPD chicken-and-egg code When I added support for the hpd-gpio to simple-panel in commit 48834e6084f1 ("drm/panel-simple: Support hpd-gpios for delaying prepare()"), I added a special case to handle a circular dependency I was running into on the ti-sn65dsi86 bridge chip. On my board the hpd-gpio is actually provided by the bridge chip. That was causing some circular dependency problems that I had to work around by getting the hpd-gpio late. I've now reorganized the ti-sn65dsi86 bridge chip driver to be a collection of sub-drivers. Now the GPIO part can probe separately and that breaks the chain. Let's get rid of the old code to clean things up. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Reviewed-by: Sean Paul Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.10.I40eeedc23459d1e3fc96fa6cdad775d88c6e706c@changeid commit bf73537f411b0d4f546adfb028e915eb633032c5 Author: Douglas Anderson Date: Fri Apr 23 09:58:55 2021 -0700 drm/bridge: ti-sn65dsi86: Break GPIO and MIPI-to-eDP bridge into sub-drivers Let's use the newly minted aux bus to break up the driver into sub drivers. We're not doing a full breakup here: all the code is still in the same file and remains largely untouched. The big goal here of using sub-drivers is to allow part of our code to finish probing even if some other code needs to defer. This can solve some chicken-and-egg problems. Specifically: - In commit 48834e6084f1 ("drm/panel-simple: Support hpd-gpios for delaying prepare()") we had to add a bit of a hack to simpel-panel to support HPD showing up late. We can get rid of that hack now since the GPIO part of our driver can finish probing early. - We have a desire to expose our DDC bus to simple-panel (and perhaps to a backlight driver?). That will end up with the same chicken-and-egg problem. A future patch to move this to a sub-driver will fix it. - If/when we support the PWM functionality present in the bridge chip for a backlight we'll end up with another chicken-and-egg problem. If we allow the PWM to be a sub-driver too then it solves this problem. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.9.I3e68fa38c4ccbdbdf145cad2b01e83a1e5eac302@changeid commit bef236a5206c49572899c999d601ac9100c1a6ba Author: Douglas Anderson Date: Fri Apr 23 09:58:54 2021 -0700 drm/bridge: ti-sn65dsi86: Move all the chip-related init to the start This is just code motion of the probe routine to move all the things that are for the "whole chip" (instead of the GPIO parts or the MIPI-to-eDP parts) together at the start of probe. This is in preparation for breaking the driver into sub-drivers. Since we're using devm for all of the "whole chip" stuff this is actually quite easy now. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.8.Ide8ba40feb2e43bc98a11edbb08d696d62dcd83e@changeid commit f94eb8a328633f2fc6af358d0ad7e9c8af3e26f6 Author: Douglas Anderson Date: Fri Apr 23 09:58:53 2021 -0700 drm/bridge: ti-sn65dsi86: Cleanup managing of drvdata Let's: - Set the drvdata as soon as it's allocated. This just sets up a pointer so there's no downside here. - Remove the useless call to i2c_set_clientdata() which is literally the same thing as dev_set_drvdata(). No functional changes intended. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.7.If5d4d4e22e97bebcd493b76765c1759527705620@changeid commit 3636fc25f7608e974b65b71c5e2328b9710aafae Author: Douglas Anderson Date: Fri Apr 23 09:58:52 2021 -0700 drm/bridge: ti-sn65dsi86: Add local var for "dev" to simplify probe Tiny cleanup for probe so we don't keep having to specify "&client->dev" or "pdata->dev". No functional changes intended. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.6.I83925d8ca228bdc5f55b17854c90754efc6a470e@changeid commit 52d54819c8aedca0dd7354291822999ef83aad3b Author: Douglas Anderson Date: Fri Apr 23 09:58:51 2021 -0700 drm/bridge: ti-sn65dsi86: Clean debugfs code Let's cleanup the debugfs code to: - Check for errors. - Use devm to manage freeing, which also means we don't need to store a pointer in our structure. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.5.I5fe072753290c6a77eda736ebd5778e17b7cb0fb@changeid commit dea2500a820c0005bf0092d77d77eb9ca819ca1f Author: Douglas Anderson Date: Fri Apr 23 09:58:50 2021 -0700 drm/bridge: ti-sn65dsi86: Use devm to do our runtime_disable There's no devm_runtime_enable(), but it's easy to use devm_add_action_or_reset() and means we don't need to worry about the disable in our remove() routine or in error paths. No functional changes intended by this change. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.4.I1e627eb5f316c0cf6595b120e6e262f5bf890300@changeid commit 905d66d08d0f73a3fbd2d16c6756e30272ac81b5 Author: Douglas Anderson Date: Fri Apr 23 09:58:49 2021 -0700 drm/bridge: ti-sn65dsi86: More renames in prep for sub-devices Like the previous patch ("drm/bridge: ti-sn65dsi86: Rename the main driver data structure") this is just a no-op rename in preparation for splitting the driver up a bit. Here I've attempted to rename functions / structures making sure that anything applicable to the whole chip (instead of just the MIPI to eDP bridge part) included "sn65dsi86" somewhere in the name instead of just "ti_sn_bridge". Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.3.I4b28c737933a44548662df42ccd37db89ec739c1@changeid commit db0036db4851df5f3543201fa0e6bf7a1a097018 Author: Douglas Anderson Date: Fri Apr 23 09:58:48 2021 -0700 drm/bridge: ti-sn65dsi86: Rename the main driver data structure In preparation for splitting this driver into sub-drivers, let's rename the main data structure so it's clear that it's holding data for the whole device and not just the MIPI-eDP bridge part. This is a no-op change. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.2.Ib03e88304a9ea1c503f1b9567be5cbf8b7c5761c@changeid commit b347e04452ff6382ace8fba9c81f5bcb63be17a6 Author: Thomas Zimmermann Date: Sun May 2 12:49:53 2021 +0200 drm: Remove pdev field from struct drm_device The field pdev in struct drm_device is unused. Remove it. The value can be obtained by upcasting from the structure's dev field. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-8-tzimmermann@suse.de commit 9a31b3813f91408bbd5e4059f6c6cc6713eef790 Author: Thomas Zimmermann Date: Sun May 2 12:49:52 2021 +0200 drm/via: Remove references to drm_device.pdev Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-7-tzimmermann@suse.de commit e2c5ab5cb8e57249bde217c72a9097d9e84c196e Author: Thomas Zimmermann Date: Sun May 2 12:49:51 2021 +0200 drm/sis: Remove references to struct drm_device.pdev Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-6-tzimmermann@suse.de commit 531cdb9d3a91609fada42a8df6c827fb1d341859 Author: Thomas Zimmermann Date: Sun May 2 12:49:50 2021 +0200 drm/savage: Remove references to struct drm_device.pdev Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-5-tzimmermann@suse.de commit aa96a16ad41e8bf56352ef5f83cc4781ca10560a Author: Thomas Zimmermann Date: Sun May 2 12:49:49 2021 +0200 drm/r128: Remove references to struct drm_device.pdev Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-4-tzimmermann@suse.de commit b420fb8dee00bda3ac3dc43df28fbc9eccf7f723 Author: Thomas Zimmermann Date: Sun May 2 12:49:48 2021 +0200 drm/mga: Remove references to struct drm_device.pdev Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-3-tzimmermann@suse.de commit 1d4f7d88003ae9abfddbec58aa91de281f533213 Author: Thomas Zimmermann Date: Sun May 2 12:49:47 2021 +0200 drm/i810: Remove references to struct drm_device.pdev Replace all references to struct drm_device's pdev field with an upcast from dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210502104953.21768-2-tzimmermann@suse.de commit 4bfdd2aa67fbfba09d7c32a4c7fd4c5eb1052bce Author: Lucas Stach Date: Mon May 3 12:24:22 2021 +0200 drm/etnaviv: rework linear window offset calculation The current calculation based on the required_dma mask can be significantly off, so that the linear window only overlaps a small part of the DRAM address space. This can lead to the command buffer being unmappable, which is obviously bad. Rework the linear window offset calculation to be based on the command buffer physical address, making sure that the command buffer is always mappable. Tested-by: Primoz Fiser Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach commit 0e63302dc1438e6f2846d1cd5f2fc36a28a824df Author: Tian Tao Date: Thu Mar 25 20:33:56 2021 +0800 drm/etnaviv: Remove useless error message Fix the following coccicheck report: drivers/gpu/drm/etnaviv/etnaviv_gpu.c:1775:2-9: line 1775 is redundant because platform_get_irq() already prints an error Remove dev_err() messages after platform_get_irq() failures. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach commit bdf622e0fade2cec72c948c708763378b656c01d Author: Jiapeng Chong Date: Tue Mar 23 10:46:12 2021 +0800 drm/etnaviv: Remove redundant NULL check Fix the following coccicheck warnings: ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:622:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:618:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:616:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach commit 20f85ef89d94e12041bc9b0a335a0e7d6c61daf7 Author: Jani Nikula Date: Wed Apr 28 13:14:29 2021 +0300 drm/i915/backlight: use unique backlight device names Registering multiple backlight devices with intel_backlight name will obviously fail, regardless of whether they're two connectors in the same drm device or two different drm devices. It would be preferrable to switch to completely unique names, and sunset the generic intel_backlight name. However, there are apparently users out there that hardcode the name, so the change would break backward compatibility. As a compromise, register the first device with intel_backlight name. In the common case, this is the only backlight device anyway. From the second device on, use card%d-%s-backlight format, for example card0-eDP-2-backlight, to make the name unique. This approach does not preclude us from registering the first device using the same naming scheme in the future. v2: Keep using intel_backlight name for first backlight device Cc: Ville Syrjälä Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2794 Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7dc3f6974711ce44522189dc9db05d1e6e24e6d8.1619604743.git.jani.nikula@intel.com commit b08a759df332c4152ef75c7e011195c04abfac04 Author: Jani Nikula Date: Wed Apr 28 13:14:28 2021 +0300 drm/i915/backlight: clean up backlight device register Add connector and backlight device name to logging, and propagate error code from backlight_device_register() instead of flattening to -ENODEV. Storing the name in an allocated buffer is unnecessary here, but makes follow-up work on names much cleaner. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/271206461d9c0f42755792236330b588df3b532e.1619604743.git.jani.nikula@intel.com commit 5109d297a3d70a9083a5fb66d487253438f803ea Author: Christian König Date: Tue Apr 13 20:17:51 2021 +0200 drm/ttm: properly allocate sys resource during swapout Drop the special handling here. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210430092508.60710-3-christian.koenig@amd.com commit d79025c7f5e376413780f547e3a31b16575b83d7 Author: Christian König Date: Tue Feb 16 19:03:52 2021 +0100 drm/ttm: always initialize the full ttm_resource v2 Init all fields in ttm_resource_alloc() when we create a new resource. v2: use place->mem_type instead of res->mem_type Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210430092508.60710-2-christian.koenig@amd.com commit b072b9cd54f3dbd9597f2c0c2b8496a43c179806 Author: Christian König Date: Fri Feb 5 15:58:56 2021 +0100 drm/ttm: add ttm_sys_manager v3 Add a separate manager for the system domain and make function tables mandatory. v2: debug is still optional v3: return void during init Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210430092508.60710-1-christian.koenig@amd.com commit dc52e41d26610cb7b8e95c7d45aa7457b5dcc002 Author: Christian König Date: Mon Apr 26 19:20:55 2021 +0200 drm/ttm: cleanup ttm_agp_backend Audit the includes and stop accessing the internal drm_mm_node. The ttm_resource::start is the same value as the drm_mm_node::start. Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/msgid/20210426175824.122557-1-christian.koenig@amd.com commit 8f86c82aba8b13e732cfdd6d0e19a7dd48197e43 Author: Simon Ser Date: Fri Apr 2 13:22:12 2021 +0200 drm/connector: demote connector force-probes for non-master clients Force-probing a connector can be slow and cause flickering. As this affects the global KMS state, let's make it so only the DRM master can force-probe a connector. Non-master DRM clients won't be able to force-probe a connector anymore. Instead, KMS will perform a regular read-only connector query. Signed-off-by: Simon Ser Acked-by: Pekka Paalanen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210402112212.5625-1-contact@emersion.fr commit aeb300c1dbfc77b493728f608dd14d6814676546 Author: Denis Efremov Date: Wed Apr 28 09:03:50 2021 +0300 coccinelle: misc: minmax: suppress patch generation for err returns There is a standard idiom for "if 'ret' holds an error, return it": return ret < 0 ? ret : 0; Developers prefer to keep the things as they are because stylistic change to "return min(ret, 0);" breaks readability. Let's suppress automatic generation for this type of patches. Signed-off-by: Denis Efremov commit 32c465613959248a8db8a1458d65a266411ddccc Author: Julia Lawall Date: Wed Apr 28 09:21:26 2021 +0200 drop unneeded *s Kfree.cocci only supports org and report mode, so the *s (used for context mode) are not useful. Signed-off-by: Julia Lawall commit 5d2db9bb5f8a850d037983f0df72ad59cefa9e3d Author: Krzysztof Kozlowski Date: Fri Apr 23 12:00:33 2021 +0200 coccinelle: irqf_oneshot: reduce the severity due to false positives The IRQF_ONESHOT should be present for threaded IRQ using default primary handler. However intetrupt of many child devices, e.g. children of MFD, is nested thus the IRQF_ONESHOT is not needed. The coccinelle message about error misleads submitters and reviewers about the severity of the issue, so make it a warning and mention possible false positive. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Julia Lawall commit 7845daa8bd72efa8bbc1de122edfce6e058bbe41 Author: Denis Efremov Date: Fri Mar 5 13:09:56 2021 +0300 coccinelle: misc: add swap script Check for opencoded swap() implementation. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit cb62732d3bf0cd4c136d5927b003f002ff658e1c Author: Denis Efremov Date: Mon Mar 8 10:30:18 2021 +0300 coccinelle: misc: update uninitialized_var.cocci documentation Remove the documentation link from the warning message because commit 3942ea7a10c9 ("deprecated.rst: Remove now removed uninitialized_var") removed the section from documentation. Update the rule documentation accordingly. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 3afb532b19df3238dede98b184bc8852517f206a Author: Denis Efremov Date: Mon Mar 8 22:12:15 2021 +0300 coccinelle: misc: restrict patch mode in flexible_array.cocci Skip patches generation for structs with a single field. Changing a zero-length array to a flexible array member in a struct with no named members breaks the compilation. However, reporting such cases is still valuable, e.g. commit 637464c59e0b ("ACPI: NFIT: Fix flexible_array.cocci warnings"). Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 Author: Denis Efremov Date: Tue Mar 9 09:39:03 2021 +0300 coccinelle: misc: add minmax script Check for opencoded min(), max() implementations. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 4aae79f77e3a9c53b225a5b2c35951f568156eee Author: Thomas Zimmermann Date: Fri Apr 30 12:58:40 2021 +0200 drm/simpledrm: Acquire memory aperture for framebuffer We register the simplekms device with the DRM platform helpers. A native driver for the graphics hardware will kick-out the simpledrm driver before taking over the device. The original generic platform device from the simple-framebuffer boot code will be unregistered. The native driver will use whatever native hardware device it received. v4: * convert to drm_aperture_acquire_from_firmware() v3: * use platform_device_unregister() and handle detachment like hot-unplug event (Daniel) v2: * adapt to aperture changes * use drm_dev_unplug() and drm_dev_enter/exit() * don't split error string Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Tested-by: nerdopolis Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-10-tzimmermann@suse.de commit 11e8f5fd223bd4d33fa10527bad3fe48469a15df Author: Thomas Zimmermann Date: Fri Apr 30 12:58:35 2021 +0200 drm: Add simpledrm driver The simpledrm driver is a DRM driver for simple-framebuffer framebuffers as provided by the kernel's boot code. This driver enables basic graphical output on many different graphics devices that are provided by the platform (e.g., EFI, VESA, embedded framebuffers). With the kernel's simple-framebuffer infrastructure, the kernel receives a pre-configured framebuffer from the system (i.e., firmware, boot loader). It creates a platform device to which simpledrm attaches. The system's framebuffer consists of a memory range, size and format. Based on these values, simpledrm creates a DRM devices. No actual modesetting is possible. A firmware framebuffer might also be specified via device-tree files. If no device platform data is given, try the DT device node. Make sure required hardware clocks and regulators are enabled while the firmware framebuffer is in use. The basic code has been taken from the simplefb driver and adapted to DRM. Clocks are released automatically via devres helpers. The drivers displays a console on simpledrm's framebuffer. The default framebuffer format is being used. v4: * disable simplefb if simpledrm has been selected (Maxime) v3: * add disable function that clears screen to black (Daniel) * set shadow buffering only for fbdev emulation * set platform-driver data during device creation v2: * rename driver to simpledrm * add dri-devel to MAINTAINERS entry * put native format first in primary-plane format list (Daniel) * inline simplekms_device_cleanup() (Daniel) * use helpers for shadow-buffered planes * fix whitespace errors * add Device Tree match table * clean-up parser wrappers * use strscpy() Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter # fbdev support Acked-by: Maxime Ripard Tested-by: nerdopolis Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-5-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-6-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-7-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-8-tzimmermann@suse.de Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-9-tzimmermann@suse.de commit 730e7992dc1beedf2c33001cc0d791c3cdf6c842 Author: Thomas Zimmermann Date: Fri Apr 30 12:58:34 2021 +0200 drm/aperture: Add infrastructure for aperture ownership Platform devices might operate on firmware framebuffers, such as VESA or EFI. Before a native driver for the graphics hardware can take over the device, it has to remove any platform driver that operates on the firmware framebuffer. Aperture helpers provide the infrastructure for platform drivers to acquire firmware framebuffers, and for native drivers to remove them later on. It works similar to the related fbdev mechanism. During initialization, the platform driver acquires the firmware framebuffer's I/O memory and provides a callback to be removed. The native driver later uses this information to remove any platform driver for it's framebuffer I/O memory. The aperture removal code is integrated into the existing code for removing conflicting framebuffers, so native drivers use it automatically. v5: * fix build error introduced by rebasing v4 * fix typo in documentation v4: * hide detach callback in implementation (Daniel) * documentation fixes v3: * rebase onto existing aperture infrastructure * release aperture from list during detach; fix dangling apertures * don't export struct drm_aperture * document struct drm_aperture_funcs v2: * rename plaform helpers to aperture helpers * tie to device lifetime with devm_ functions * removed unsued remove() callback * rename kickout to detach * make struct drm_aperture private * rebase onto existing drm_aperture.h header file * use MIT license only for simplicity * documentation Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Maxime Ripard Tested-by: nerdopolis Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-4-tzimmermann@suse.de commit 900d3e4a978928fb6da95637e5dd64e88bae6ce6 Author: Thomas Zimmermann Date: Fri Apr 30 12:58:33 2021 +0200 drm/format-helper: Add blitter functions The blitter functions copy a framebuffer to I/O memory using one of the existing conversion functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Maxime Ripard Tested-by: nerdopolis Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-3-tzimmermann@suse.de commit 5ab7af7151ba14b4f7bec8a9d6ce2c4c0afd457f Author: Thomas Zimmermann Date: Fri Apr 30 12:58:32 2021 +0200 drm/format-helper: Pass destination pitch to drm_fb_memcpy_dstclip() The memcpy's destination buffer might have a different pitch than the source. Support different pitches as function argument. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Maxime Ripard Tested-by: nerdopolis Link: https://patchwork.freedesktop.org/patch/msgid/20210430105840.30515-2-tzimmermann@suse.de commit 4128359666793d9eb733a4a113ada3afa5d0da88 Author: Nikola Cornij Date: Fri Apr 30 17:45:31 2021 -0400 drm/i915: Use the correct max source link rate for MST [why] Previously used value was not safe to provide the correct value, i.e. it could be 0 if not not configured, leading to no MST on this platform. [how] Do not use the value from BIOS, but from the structure populated at encoder initialization time. Fixes: 98025a62cb00 ("drm/dp_mst: Use Extended Base Receiver Capability DPCD space") Signed-off-by: Nikola Cornij Reviewed-by: Lyude Paul Acked-by: Ville Syrjälä [fixed open coded drm_dp_link_rate_to_bw_code()] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210430214531.24565-2-nikola.cornij@amd.com commit 70e12560126685e982ee680e0e40049edbd66cf0 Author: Douglas Anderson Date: Fri Apr 23 09:58:47 2021 -0700 drm/panel: panel-simple: Add missing pm_runtime_disable() calls In commit 3235b0f20a0a ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") we started using pm_runtime, but my patch neglected to add the proper pm_runtime_disable(). Doh! Add them now. Fixes: 3235b0f20a0a ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare") Reported-by: Bjorn Andersson Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.1.I9e6af2529d6c61e5daf86a15a1211121c5223b9a@changeid commit f928ef685db5d9b82c1c1e24e229c167426c5a1f Author: Eric W. Biederman Date: Fri Apr 30 13:00:26 2021 -0500 ucounts: Silence warning in dec_rlimit_ucounts Dan Carpenter wrote: > > url: https://github.com/0day-ci/linux/commits/legion-kernel-org/Count-rlimits-in-each-user-namespace/20210427-162857 > base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next > config: arc-randconfig-m031-20210426 (attached as .config) > compiler: arceb-elf-gcc (GCC) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > Reported-by: Dan Carpenter > > smatch warnings: > kernel/ucount.c:270 dec_rlimit_ucounts() error: uninitialized symbol 'new'. > > vim +/new +270 kernel/ucount.c > > 176ec2b092cc22 Alexey Gladkov 2021-04-22 260 bool dec_rlimit_ucounts(struct ucounts *ucounts, enum ucount_type type, long v) > 176ec2b092cc22 Alexey Gladkov 2021-04-22 261 { > 176ec2b092cc22 Alexey Gladkov 2021-04-22 262 struct ucounts *iter; > 176ec2b092cc22 Alexey Gladkov 2021-04-22 263 long new; > ^^^^^^^^ > > 176ec2b092cc22 Alexey Gladkov 2021-04-22 264 for (iter = ucounts; iter; iter = iter->ns->ucounts) { > 176ec2b092cc22 Alexey Gladkov 2021-04-22 265 long dec = atomic_long_add_return(-v, &iter->ucount[type]); > 176ec2b092cc22 Alexey Gladkov 2021-04-22 266 WARN_ON_ONCE(dec < 0); > 176ec2b092cc22 Alexey Gladkov 2021-04-22 267 if (iter == ucounts) > 176ec2b092cc22 Alexey Gladkov 2021-04-22 268 new = dec; > 176ec2b092cc22 Alexey Gladkov 2021-04-22 269 } > 176ec2b092cc22 Alexey Gladkov 2021-04-22 @270 return (new == 0); > ^^^^^^^^ > I don't know if this is a bug or not, but I can definitely tell why the > static checker complains about it. > > 176ec2b092cc22 Alexey Gladkov 2021-04-22 271 } In the only two cases that care about the return value of dec_rlimit_ucounts the code first tests to see that ucounts is not NULL. In those cases it is guaranteed at least one iteration of the loop will execute guaranteeing the variable new will be initialized. Initialize new to -1 so that the return value is well defined even when the loop does not execute and the static checker is silenced. Link: https://lkml.kernel.org/r/m1tunny77w.fsf@fess.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 9b624988221b7cb259da77dd67ef0ee4d6b56d12 Merge: 9f4ad9e425a1d c1ada3dc7219b Author: Eric W. Biederman Date: Fri Apr 30 14:15:34 2021 -0500 ucounts: Count rlimits in each user namespace Preface ------- These patches are for binding the rlimit counters to a user in user namespace. This patch set can be applied on top of: git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v5.12-rc4 Problem ------- The RLIMIT_NPROC, RLIMIT_MEMLOCK, RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE rlimits implementation places the counters in user_struct [1]. These limits are global between processes and persists for the lifetime of the process, even if processes are in different user namespaces. To illustrate the impact of rlimits, let's say there is a program that does not fork. Some service-A wants to run this program as user X in multiple containers. Since the program never fork the service wants to set RLIMIT_NPROC=1. service-A \- program (uid=1000, container1, rlimit_nproc=1) \- program (uid=1000, container2, rlimit_nproc=1) The service-A sets RLIMIT_NPROC=1 and runs the program in container1. When the service-A tries to run a program with RLIMIT_NPROC=1 in container2 it fails since user X already has one running process. The problem is not that the limit from container1 affects container2. The problem is that limit is verified against the global counter that reflects the number of processes in all containers. This problem can be worked around by using different users for each container but in this case we face a different problem of uid mapping when transferring files from one container to another. Eric W. Biederman mentioned this issue [2][3]. Introduced changes ------------------ To address the problem, we bind rlimit counters to user namespace. Each counter reflects the number of processes in a given uid in a given user namespace. The result is a tree of rlimit counters with the biggest value at the root (aka init_user_ns). The limit is considered exceeded if it's exceeded up in the tree. [1]: https://lore.kernel.org/containers/87imd2incs.fsf@x220.int.ebiederm.org/ [2]: https://lists.linuxfoundation.org/pipermail/containers/2020-August/042096.html [3]: https://lists.linuxfoundation.org/pipermail/containers/2020-October/042524.html Changelog --------- v11: * Revert most of changes in signal.c to fix performance issues and remove unnecessary memory allocations. * Fixed issue found by lkp robot (again). v10: * Fixed memory leak in __sigqueue_alloc. * Handled an unlikely situation when all consumers will return ucounts at once. * Addressed other review comments from Eric W. Biederman. v9: * Used a negative value to check that the ucounts->count is close to overflow. * Rebased onto v5.12-rc4. v8: * Used atomic_t for ucounts reference counting. Also added counter overflow check (thanks to Linus Torvalds for the idea). * Fixed other issues found by lkp-tests project in the patch that Reimplements RLIMIT_MEMLOCK on top of ucounts. v7: * Fixed issues found by lkp-tests project in the patch that Reimplements RLIMIT_MEMLOCK on top of ucounts. v6: * Fixed issues found by lkp-tests project. * Rebased onto v5.11. v5: * Split the first commit into two commits: change ucounts.count type to atomic_long_t and add ucounts to cred. These commits were merged by mistake during the rebase. * The __get_ucounts() renamed to alloc_ucounts(). * The cred.ucounts update has been moved from commit_creds() as it did not allow to handle errors. * Added error handling of set_cred_ucounts(). v4: * Reverted the type change of ucounts.count to refcount_t. * Fixed typo in the kernel/cred.c v3: * Added get_ucounts() function to increase the reference count. The existing get_counts() function renamed to __get_ucounts(). * The type of ucounts.count changed from atomic_t to refcount_t. * Dropped 'const' from set_cred_ucounts() arguments. * Fixed a bug with freeing the cred structure after calling cred_alloc_blank(). * Commit messages have been updated. * Added selftest. v2: * RLIMIT_MEMLOCK, RLIMIT_SIGPENDING and RLIMIT_MSGQUEUE are migrated to ucounts. * Added ucounts for pair uid and user namespace into cred. * Added the ability to increase ucount by more than 1. v1: * After discussion with Eric W. Biederman, I increased the size of ucounts to atomic_long_t. * Added ucount_max to avoid the fork bomb. -- Alexey Gladkov (9): Increase size of ucounts to atomic_long_t Add a reference to ucounts for each cred Use atomic_t for ucounts reference counting Reimplement RLIMIT_NPROC on top of ucounts Reimplement RLIMIT_MSGQUEUE on top of ucounts Reimplement RLIMIT_SIGPENDING on top of ucounts Reimplement RLIMIT_MEMLOCK on top of ucounts kselftests: Add test to check for rlimit changes in different user namespaces ucounts: Set ucount_max to the largest positive value the type can hold fs/exec.c | 6 +- fs/hugetlbfs/inode.c | 16 +- fs/proc/array.c | 2 +- include/linux/cred.h | 4 + include/linux/hugetlb.h | 4 +- include/linux/mm.h | 4 +- include/linux/sched/user.h | 7 - include/linux/shmem_fs.h | 2 +- include/linux/signal_types.h | 4 +- include/linux/user_namespace.h | 31 +++- ipc/mqueue.c | 40 ++--- ipc/shm.c | 26 +-- kernel/cred.c | 50 +++++- kernel/exit.c | 2 +- kernel/fork.c | 18 +- kernel/signal.c | 25 +-- kernel/sys.c | 14 +- kernel/ucount.c | 116 ++++++++++--- kernel/user.c | 3 - kernel/user_namespace.c | 9 +- mm/memfd.c | 4 +- mm/mlock.c | 22 ++- mm/mmap.c | 4 +- mm/shmem.c | 10 +- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/rlimits/.gitignore | 2 + tools/testing/selftests/rlimits/Makefile | 6 + tools/testing/selftests/rlimits/config | 1 + .../selftests/rlimits/rlimits-per-userns.c | 161 ++++++++++++++++++ 29 files changed, 467 insertions(+), 127 deletions(-) create mode 100644 tools/testing/selftests/rlimits/.gitignore create mode 100644 tools/testing/selftests/rlimits/Makefile create mode 100644 tools/testing/selftests/rlimits/config create mode 100644 tools/testing/selftests/rlimits/rlimits-per-userns.c Link: https://lkml.kernel.org/r/cover.1619094428.git.legion@kernel.org commit c1ada3dc7219b02b3467aa906c2f5f8b098578d1 Author: Alexey Gladkov Date: Thu Apr 22 14:27:16 2021 +0200 ucounts: Set ucount_max to the largest positive value the type can hold The ns->ucount_max[] is signed long which is less than the rlimit size. We have to protect ucount_max[] from overflow and only use the largest value that we can hold. On 32bit using "long" instead of "unsigned long" to hold the counts has the downside that RLIMIT_MSGQUEUE and RLIMIT_MEMLOCK are limited to 2GiB instead of 4GiB. I don't think anyone cares but it should be mentioned in case someone does. The RLIMIT_NPROC and RLIMIT_SIGPENDING used atomic_t so their maximum hasn't changed. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/1825a5dfa18bc5a570e79feb05e2bd07fd57e7e3.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit e4aebf06695c32d49f1007f9d252f97b5b2998a7 Author: Alexey Gladkov Date: Thu Apr 22 14:27:15 2021 +0200 kselftests: Add test to check for rlimit changes in different user namespaces The testcase runs few instances of the program with RLIMIT_NPROC=1 from user uid=60000, in different user namespaces. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/28cafdcdd4abd8494b34a27f1970b666b30de8bf.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit d7c9e99aee48e6bc0b427f3e3c658a6aba15001e Author: Alexey Gladkov Date: Thu Apr 22 14:27:14 2021 +0200 Reimplement RLIMIT_MEMLOCK on top of ucounts The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Changelog v11: * Fix issue found by lkp robot. v8: * Fix issues found by lkp-tests project. v7: * Keep only ucounts for RLIMIT_MEMLOCK checks instead of struct cred. v6: * Fix bug in hugetlb_file_setup() detected by trinity. Reported-by: kernel test robot Reported-by: kernel test robot Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/970d50c70c71bfd4496e0e8d2a0a32feebebb350.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit d64696905554e919321e31afc210606653b8f6a4 Author: Alexey Gladkov Date: Thu Apr 22 14:27:13 2021 +0200 Reimplement RLIMIT_SIGPENDING on top of ucounts The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Changelog v11: * Revert most of changes to fix performance issues. v10: * Fix memory leak on get_ucounts failure. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/df9d7764dddd50f28616b7840de74ec0f81711a8.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit 6e52a9f0532f912af37bab4caf18b57d1b9845f4 Author: Alexey Gladkov Date: Thu Apr 22 14:27:12 2021 +0200 Reimplement RLIMIT_MSGQUEUE on top of ucounts The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/2531f42f7884bbfee56a978040b3e0d25cdf6cde.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit 21d1c5e386bc751f1953b371d72cd5b7d9c9e270 Author: Alexey Gladkov Date: Thu Apr 22 14:27:11 2021 +0200 Reimplement RLIMIT_NPROC on top of ucounts The rlimit counter is tied to uid in the user_namespace. This allows rlimit values to be specified in userns even if they are already globally exceeded by the user. However, the value of the previous user_namespaces cannot be exceeded. To illustrate the impact of rlimits, let's say there is a program that does not fork. Some service-A wants to run this program as user X in multiple containers. Since the program never fork the service wants to set RLIMIT_NPROC=1. service-A \- program (uid=1000, container1, rlimit_nproc=1) \- program (uid=1000, container2, rlimit_nproc=1) The service-A sets RLIMIT_NPROC=1 and runs the program in container1. When the service-A tries to run a program with RLIMIT_NPROC=1 in container2 it fails since user X already has one running process. We cannot use existing inc_ucounts / dec_ucounts because they do not allow us to exceed the maximum for the counter. Some rlimits can be overlimited by root or if the user has the appropriate capability. Changelog v11: * Change inc_rlimit_ucounts() which now returns top value of ucounts. * Drop inc_rlimit_ucounts_and_test() because the return code of inc_rlimit_ucounts() can be checked. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/c5286a8aa16d2d698c222f7532f3d735c82bc6bc.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit b6c336528926ef73b0f70260f2636de2c3b94c14 Author: Alexey Gladkov Date: Thu Apr 22 14:27:10 2021 +0200 Use atomic_t for ucounts reference counting The current implementation of the ucounts reference counter requires the use of spin_lock. We're going to use get_ucounts() in more performance critical areas like a handling of RLIMIT_SIGPENDING. Now we need to use spin_lock only if we want to change the hashtable. v10: * Always try to put ucounts in case we cannot increase ucounts->count. This will allow to cover the case when all consumers will return ucounts at once. v9: * Use a negative value to check that the ucounts->count is close to overflow. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/94d1dbecab060a6b116b0a2d1accd8ca1bbb4f5f.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit 905ae01c4ae2ae3df05bb141801b1db4b7d83c61 Author: Alexey Gladkov Date: Thu Apr 22 14:27:09 2021 +0200 Add a reference to ucounts for each cred For RLIMIT_NPROC and some other rlimits the user_struct that holds the global limit is kept alive for the lifetime of a process by keeping it in struct cred. Adding a pointer to ucounts in the struct cred will allow to track RLIMIT_NPROC not only for user in the system, but for user in the user_namespace. Updating ucounts may require memory allocation which may fail. So, we cannot change cred.ucounts in the commit_creds() because this function cannot fail and it should always return 0. For this reason, we modify cred.ucounts before calling the commit_creds(). Changelog v6: * Fix null-ptr-deref in is_ucounts_overlimit() detected by trinity. This error was caused by the fact that cred_alloc_blank() left the ucounts pointer empty. Reported-by: kernel test robot Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/b37aaef28d8b9b0d757e07ba6dd27281bbe39259.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit f9c82a4ea89c384d49ce03768ba88d049ed3f1f0 Author: Alexey Gladkov Date: Thu Apr 22 14:27:08 2021 +0200 Increase size of ucounts to atomic_long_t RLIMIT_MSGQUEUE and RLIMIT_MEMLOCK use unsigned long to store their counters. As a preparation for moving rlimits based on ucounts, we need to increase the size of the variable to long. Signed-off-by: Alexey Gladkov Link: https://lkml.kernel.org/r/257aa5fb1a7d81cf0f4c34f39ada2320c4284771.1619094428.git.legion@kernel.org Signed-off-by: Eric W. Biederman commit 0333ec8806dfe7b8766ad025821bf58dc49dc970 Author: Bernard Zhao Date: Wed Apr 28 19:13:27 2021 -0700 drm/i915: Use might_alloc() This maybe uses lockdep through the fs_reclaim annotations. Signed-off-by: Bernard Zhao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210429021327.57944-1-bernard@vivo.com commit 73552e008a853f38f02bfb151ae7f8298debe5f8 Author: Maarten Lankhorst Date: Thu Apr 29 14:01:58 2021 +0200 drm/i915: Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNBIND_VM_TRYLOCK We changed the locking hierarchy for both ppgtt and ggtt, so both locks should be trylocked inside i915_gem_object_unbind(). Signed-off-by: Maarten Lankhorst Fixes: bc6f80cce9ae ("drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.") Cc: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20210429120158.1105318-1-maarten.lankhorst@linux.intel.com Reviewed-by: Thomas Hellström #irc commit fd5f262db118355590eb123cd5287c461f3ba89c Author: Tvrtko Ursulin Date: Thu Apr 29 09:35:30 2021 +0100 drm/i915/selftests: Fix active retire callback alignment __i915_active_call annotation is required on the retire callback to ensure correct function alignment. Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210429083530.849546-2-tvrtko.ursulin@linux.intel.com Reviewed-by: Ville Syrjälä commit d8e44e4dd221ee283ea60a6fb87bca08807aa0ab Author: Tvrtko Ursulin Date: Thu Apr 29 09:35:29 2021 +0100 drm/i915/overlay: Fix active retire callback alignment __i915_active_call annotation is required on the retire callback to ensure correct function alignment. Signed-off-by: Tvrtko Ursulin Fixes: a21ce8ad12d2 ("drm/i915/overlay: Switch to using i915_active tracking") Cc: Chris Wilson Cc: Matthew Auld Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210429083530.849546-1-tvrtko.ursulin@linux.intel.com commit 885811372fe101c4299c53eecc9fee72cf927a0c Author: Liu Ying Date: Fri Apr 23 17:26:43 2021 +0800 drm/bridge: nwl-dsi: Get MIPI DSI controller and PHY ready in ->mode_set() Some MIPI DSI panel drivers like 'raydium,rm68200' send MIPI_DCS_SET_DISPLAY_ON commands in panel_funcs->prepare(), which requires the MIPI DSI controller and PHY to be ready beforehand. Without this patch, the nwl-dsi driver gets the MIPI DSI controller and PHY ready in bridge_funcs->atomic_pre_enable(), which happens after the panel_funcs->prepare(). So, this patch shifts the bridge operation ealier from bridge_funcs->atomic_pre_enable() to bridge_funcs->mode_set(). This way, more MIPI DSI panels can connect to this nwl-dsi 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: Guido Günther Cc: Robert Chiras Cc: NXP Linux Team Signed-off-by: Liu Ying Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1619170003-4817-4-git-send-email-victor.liu@nxp.com commit 2c5260cdc5066e4970bbf0ad18413d0b1bed3352 Author: Liu Ying Date: Fri Apr 23 17:26:42 2021 +0800 drm/bridge: nwl-dsi: Remove a check on unchanged HS clock rate from ->mode_set() The check on unchanged HS clock rate in ->mode_set() improves the callback's performance a bit by early return. However, the up-coming patch would get MIPI DSI controller and PHY ready in ->mode_set() after that check, thus likely skipped. So, this patch removes that check to make sure MIPI DSI controller and PHY will be brought up and taken down from ->mode_set() and ->atomic_disable() respectively in pairs. 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: Guido Günther Cc: Robert Chiras Cc: NXP Linux Team Signed-off-by: Liu Ying Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1619170003-4817-3-git-send-email-victor.liu@nxp.com commit 3afb2a28fa2404d11cce1956a003f2aaca4da421 Author: Liu Ying Date: Fri Apr 23 17:26:41 2021 +0800 drm/bridge: nwl-dsi: Force a full modeset when crtc_state->active is changed to be true This patch replaces ->mode_fixup() with ->atomic_check() so that a full modeset can be requested from there when crtc_state->active is changed to be true(which implies only connector's DPMS is brought out of "Off" status, though not necessarily). Bridge functions are added or changed to accommodate the ->atomic_check() callback. That full modeset is needed by the up-coming patch which gets MIPI DSI controller and PHY ready in ->mode_set(), because it makes sure ->mode_set() and ->atomic_disable() are called in pairs. 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: Guido Günther Cc: Robert Chiras Cc: NXP Linux Team Signed-off-by: Liu Ying Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1619170003-4817-2-git-send-email-victor.liu@nxp.com commit 6c525b72f985e967f8d171a7d3f9210c4018decd Author: Linus Walleij Date: Tue Apr 6 01:47:12 2021 +0200 drm/panel: Add DT bindings for Samsung LMS397KF04 This adds device tree bindings for the Samsung LMS397KF04 RGB DPI display panel. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20210405234713.3190693-1-linus.walleij@linaro.org commit 98025a62cb00778a467dbc359d647c9515d51b4e Author: Nikola Cornij Date: Thu Apr 29 18:11:51 2021 -0400 drm/dp_mst: Use Extended Base Receiver Capability DPCD space [why] DP 1.4a spec mandates that if DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT is set, Extended Base Receiver Capability DPCD space must be used. Without doing that, the three DPCD values that differ will be wrong, leading to incorrect or limited functionality. MST link rate, for example, could have a lower value. Also, Synaptics quirk wouldn't work out well when Extended DPCD was not read, resulting in no DSC for such hubs. [how] Modify MST topology manager to use the values from Extended DPCD where applicable. To prevent regression on the sources that have a lower maximum link rate capability than MAX_LINK_RATE from Extended DPCD, have the drivers supply maximum lane count and rate at initialization time. This also reverts commit 2dcab875e763 ("Revert drm/dp_mst: Retrieve extended DPCD caps for topology manager"), brining the change back to the original commit ad44c03208e4 ("drm/dp_mst: Retrieve extended DPCD caps for topology manager"). Signed-off-by: Nikola Cornij Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210429221151.22020-2-nikola.cornij@amd.com commit 310e506c06e495b8fbe3502c70d896bc5b8b2502 Author: Melissa Wen Date: Sat Apr 24 05:26:10 2021 -0300 drm/vkms: add overlay support Add support to overlay plane, in addition to primary and cursor planes. In this approach, the plane composition still requires an active primary plane and planes are composed associatively in the order: (primary <- overlay) <- cursor It enables to run the following IGT tests successfully: - kms_plane_cursor: - pipe-A-[overlay, primary, viewport]-size-[64, 128, 256] - kms_atomic: - plane-overlay-legacy and preserves the successful execution of kms_cursor_crc, kms_writeback and kms_flip Signed-off-by: Melissa Wen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/8261bf93d8a0e3ffaf81d8e7c9b3e9c229116be3.1619250933.git.melissa.srw@gmail.com commit 32a1648aca440904e0943b9cf36d5a3318205bb1 Author: Melissa Wen Date: Sat Apr 24 05:25:31 2021 -0300 drm/vkms: add XRGB planes composition Add support for composing XRGB888 planes in addition to the ARGB8888 format. In the case of an XRGB plane at the top, the composition consists of copying the RGB values of a pixel from src to dst and clearing alpha channel, without the need for alpha blending operations for each pixel. Blend equations assume a completely opaque background, i.e., primary plane is not cleared before pixel blending but alpha channel is explicitly opaque (a = 0xff). Also, there is room for performance evaluation in switching pixel blend operation according to the plane format. v4: - clear alpha channel (0xff) after blend color values by pixel - improve comments on blend ops to reflect the current state - describe in the commit message future improvements for plane composition Signed-off-by: Melissa Wen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/07bcf4643d11da9480599fe1b165e478bff58b25.1619250933.git.melissa.srw@gmail.com commit cac80e71cfb0b00202d743c6e90333c45ba77cc5 Author: Melissa Wen Date: Sat Apr 24 05:24:44 2021 -0300 drm/vkms: rename cursor to plane on ops of planes composition Generalize variables and function names used for planes composition (from cursor to plane), since we will reuse the operations for both cursor and overlay types. No functional change. v4: - use better names for functions of plane composition (Daniel) Signed-off-by: Melissa Wen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/ef3249c9ac3a08b7079894f9f1ccf70960194ec7.1619250933.git.melissa.srw@gmail.com commit 2f56dd8c77c8c24420d2791c39816e2cfb08bef5 Author: Melissa Wen Date: Sat Apr 24 05:23:27 2021 -0300 drm/vkms: init plane using drmm_universal_plane_alloc By using drmm_universal_plane_alloc instead of drm_universal_plane_init, we let the DRM infrastructure handles resource allocation and cleanup. We can also get rid of some code repetitions for plane cleanup, improving code maintainability in vkms. Signed-off-by: Melissa Wen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/3bbdabed0274d2d0917d1b829dd16f13d7b495f5.1619250933.git.melissa.srw@gmail.com commit 19d327a31a6965644b7c401aac4cf8a2e606d70f Author: Thomas Zimmermann Date: Thu Apr 29 12:51:01 2021 +0200 drm: Move struct drm_device.pdev to legacy section Struct drm_device.pdev is being moved to legacy status as only legacy DRM drivers use it. A possible follow-up patchset could remove pdev entirely. v4: * rebased Signed-off-by: Thomas Zimmermann Reviewed-by: Chris Wilson Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210429105101.25667-6-tzimmermann@suse.de commit 9d7a0455df0ca167d7ccc1b3e0830bfda2214b2a Author: Thomas Zimmermann Date: Thu Apr 29 12:51:00 2021 +0200 drm/i915: Don't assign to struct drm_device.pdev Using struct drm_device.pdev is deprecated. Don't assign it. Users should upcast from struct drm_device.dev. v6: * also fix the assignment in selftests in this patch (Chris) Signed-off-by: Thomas Zimmermann Reviewed-by: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210429105101.25667-5-tzimmermann@suse.de commit 9dc2524351c25d4480561ac6b74b66072de527fb Author: Thomas Zimmermann Date: Thu Apr 29 12:50:59 2021 +0200 drm/i915: Remove reference to struct drm_device.pdev References to struct drm_device.pdev should not be used any longer as the field will be moved into the struct's legacy section. Fix a rsp comment. v8: * fix commit message (Michael) Signed-off-by: Thomas Zimmermann Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/msgid/20210429105101.25667-4-tzimmermann@suse.de commit 97c463b258edaa67f066913dfb25224c78a8d9b4 Author: Thomas Zimmermann Date: Thu Apr 29 12:50:58 2021 +0200 drm/i915/gt: Remove reference to struct drm_device.pdev References to struct drm_device.pdev should not be used any longer as the field will be moved into the struct's legacy section. Add a fix for the rsp commit. v8: * fix commit message (Michael) Signed-off-by: Thomas Zimmermann Reviewed-by: Michael J. Ruhl Fixes: a50ca39fbd01 ("drm/i915: setup the LMEM region") Cc: Lucas De Marchi Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Matthew Auld Cc: Jani Nikula Cc: Chris Wilson Cc: Daniel Vetter Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Cc: Mika Kuoppala Cc: Maarten Lankhorst Cc: Venkata Sandeep Dhanalakota Cc: "Michał Winiarski" Link: https://patchwork.freedesktop.org/patch/msgid/20210429105101.25667-3-tzimmermann@suse.de commit 0ecb51824e838372e01330752503ddf9c0430ef7 Author: Thomas Zimmermann Date: Thu Apr 29 12:50:57 2021 +0200 drm/ast: Remove reference to struct drm_device.pdev Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev() from struct drm_device.dev to get the PCI device structure. v9: * fix remaining pdev references Signed-off-by: Thomas Zimmermann Reviewed-by: Michael J. Ruhl Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501") Cc: KuoHsiang Chou Cc: kernel test robot Cc: Thomas Zimmermann Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210429105101.25667-2-tzimmermann@suse.de commit 3f50033dd88af5b3acfc164c53925189cad4c677 Author: Anand Moon Date: Wed Feb 3 14:40:29 2021 +0530 drm/i915/adl_s: ADL-S platform Update PCI ids for Mobile BGA As per Bspec: 53655 Update PCI ids for Mobile BGA. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Anand Moon Reviewed-by: Aditya Swarup Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210203091029.2089-1-anandx.ram.moon@intel.com commit aec70c39129de104d4c6fe6ae0e9a49f2f4ccb0d Author: Deepak R Varma Date: Fri Nov 6 00:37:18 2020 +0530 drm/vmwgfx: replace idr_init() by idr_init_base() idr_init() uses base 0 which is an invalid identifier for this driver. The idr_alloc for this driver uses 1 as start value for ID range. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused / available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20201105190718.GA89863@localhost commit cf63561cbae71bc141346aa74783ebf0a7c52fbf Author: Bernard Zhao Date: Wed Nov 18 17:11:46 2020 -0800 drm/vmwgfx: use min_t to replace min Use min_t to replace min, min_t is a bit fast because min use twice typeof. This patch also fix check_patch.pl warning: WARNING: min() should probably be min_t(unsigned long, num_pages, VMW_PPN_PER_REMAP) +unsigned long nr = min(num_pages, (unsigned long) VMW_PPN_PER_REMAP); Signed-off-by: Bernard Zhao Reported-by: kernel test robot Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20201119011146.107587-1-bernard@vivo.com commit ed2684e7051a550f29af9075a55dbb8b1dd6de53 Author: Zheng Yongjun Date: Fri Dec 11 16:57:51 2020 +0800 gpu: drm: vmwgfx: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20201211085751.3089-1-zhengyongjun3@huawei.com commit ae57b2190fd85ec115c0b02ff06e43c41f46f0fc Author: Zou Wei Date: Tue Mar 23 13:02:04 2021 +0000 drm/vmwgfx/vmwgfx_validation: Use flexible-array member instead of zero-length array Suppresses the following coccinelle warning: drivers/gpu/drm/vmwgfx/vmwgfx_validation.c:85:15-22: WARNING use flexible-array member instead Signed-off-by: Zou Wei Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210323130204.45439-1-zou_wei@huawei.com commit 82cc3b070350beecb1c0f65772aaa85c6b248d9e Author: Bhaskar Chowdhury Date: Sun Mar 21 02:46:17 2021 +0530 drm/vmwgfx: Fix a typo s/particuar/particular/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210320211617.30746-1-unixbhaskar@gmail.com commit e590c2b03a6143ba93ddad306bc9eaafa838c020 Author: Dan Carpenter Date: Wed Apr 21 13:18:03 2021 +0300 drm/vc4: fix argument ordering in vc4_crtc_get_margins() Cppcheck complains that the declaration doesn't match the function definition. Obviously "left" should come before "right". The caller and the function implementation are done this way, it's just the declaration which is wrong so this doesn't affect runtime. Reported-by: kernel test robot Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/YH/720FD978TPhHp@mwanda commit bc6f80cce9ae7c83a4a9082c342fd733a4492928 Author: Maarten Lankhorst Date: Mon Apr 26 12:23:51 2021 +0200 drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2. The stop_machine() lock may allocate memory, but is called inside vm->mutex, which is taken in the shrinker. This will cause a lockdep splat, as can be seen below: <4>[ 462.585762] ====================================================== <4>[ 462.585768] WARNING: possible circular locking dependency detected <4>[ 462.585773] 5.12.0-rc5-CI-Trybot_7644+ #1 Tainted: G U <4>[ 462.585779] ------------------------------------------------------ <4>[ 462.585783] i915_selftest/5540 is trying to acquire lock: <4>[ 462.585788] ffffffff826440b0 (cpu_hotplug_lock){++++}-{0:0}, at: stop_machine+0x12/0x30 <4>[ 462.585814] but task is already holding lock: <4>[ 462.585818] ffff888125369c70 (&vm->mutex/1){+.+.}-{3:3}, at: i915_vma_pin_ww+0x38e/0xb40 [i915] <4>[ 462.586301] which lock already depends on the new lock. <4>[ 462.586305] the existing dependency chain (in reverse order) is: <4>[ 462.586309] -> #2 (&vm->mutex/1){+.+.}-{3:3}: <4>[ 462.586323] i915_gem_shrinker_taints_mutex+0x2d/0x50 [i915] <4>[ 462.586719] i915_address_space_init+0x12d/0x130 [i915] <4>[ 462.587092] ppgtt_init+0x4e/0x80 [i915] <4>[ 462.587467] gen8_ppgtt_create+0x3e/0x5c0 [i915] <4>[ 462.587828] i915_ppgtt_create+0x28/0xf0 [i915] <4>[ 462.588203] intel_gt_init+0x123/0x370 [i915] <4>[ 462.588572] i915_gem_init+0x129/0x1f0 [i915] <4>[ 462.588971] i915_driver_probe+0x753/0xd80 [i915] <4>[ 462.589320] i915_pci_probe+0x43/0x1d0 [i915] <4>[ 462.589671] pci_device_probe+0x9e/0x110 <4>[ 462.589680] really_probe+0xea/0x410 <4>[ 462.589690] driver_probe_device+0xd9/0x140 <4>[ 462.589697] device_driver_attach+0x4a/0x50 <4>[ 462.589704] __driver_attach+0x83/0x140 <4>[ 462.589711] bus_for_each_dev+0x75/0xc0 <4>[ 462.589718] bus_add_driver+0x14b/0x1f0 <4>[ 462.589724] driver_register+0x66/0xb0 <4>[ 462.589731] i915_init+0x70/0x87 [i915] <4>[ 462.590053] do_one_initcall+0x56/0x2e0 <4>[ 462.590061] do_init_module+0x55/0x200 <4>[ 462.590068] load_module+0x2703/0x2990 <4>[ 462.590074] __do_sys_finit_module+0xad/0x110 <4>[ 462.590080] do_syscall_64+0x33/0x80 <4>[ 462.590089] entry_SYSCALL_64_after_hwframe+0x44/0xae <4>[ 462.590096] -> #1 (fs_reclaim){+.+.}-{0:0}: <4>[ 462.590109] fs_reclaim_acquire+0x9f/0xd0 <4>[ 462.590118] kmem_cache_alloc_trace+0x3d/0x430 <4>[ 462.590126] intel_cpuc_prepare+0x3b/0x1b0 <4>[ 462.590133] cpuhp_invoke_callback+0x9e/0x890 <4>[ 462.590141] _cpu_up+0xa4/0x130 <4>[ 462.590147] cpu_up+0x82/0x90 <4>[ 462.590153] bringup_nonboot_cpus+0x4a/0x60 <4>[ 462.590159] smp_init+0x21/0x5c <4>[ 462.590167] kernel_init_freeable+0x8a/0x1b7 <4>[ 462.590175] kernel_init+0x5/0xff <4>[ 462.590181] ret_from_fork+0x22/0x30 <4>[ 462.590187] -> #0 (cpu_hotplug_lock){++++}-{0:0}: <4>[ 462.590199] __lock_acquire+0x1520/0x2590 <4>[ 462.590207] lock_acquire+0xd1/0x3d0 <4>[ 462.590213] cpus_read_lock+0x39/0xc0 <4>[ 462.590219] stop_machine+0x12/0x30 <4>[ 462.590226] bxt_vtd_ggtt_insert_entries__BKL+0x36/0x50 [i915] <4>[ 462.590601] ggtt_bind_vma+0x5d/0x80 [i915] <4>[ 462.590970] i915_vma_bind+0xdc/0x1c0 [i915] <4>[ 462.591374] i915_vma_pin_ww+0x435/0xb40 [i915] <4>[ 462.591779] make_obj_busy+0xcb/0x330 [i915] <4>[ 462.592170] igt_mmap_offset_exhaustion+0x45f/0x4c0 [i915] <4>[ 462.592562] __i915_subtests.cold.7+0x42/0x92 [i915] <4>[ 462.592995] __run_selftests.part.3+0x10d/0x172 [i915] <4>[ 462.593428] i915_live_selftests.cold.5+0x1f/0x47 [i915] <4>[ 462.593860] i915_pci_probe+0x93/0x1d0 [i915] <4>[ 462.594210] pci_device_probe+0x9e/0x110 <4>[ 462.594217] really_probe+0xea/0x410 <4>[ 462.594226] driver_probe_device+0xd9/0x140 <4>[ 462.594233] device_driver_attach+0x4a/0x50 <4>[ 462.594240] __driver_attach+0x83/0x140 <4>[ 462.594247] bus_for_each_dev+0x75/0xc0 <4>[ 462.594254] bus_add_driver+0x14b/0x1f0 <4>[ 462.594260] driver_register+0x66/0xb0 <4>[ 462.594267] i915_init+0x70/0x87 [i915] <4>[ 462.594586] do_one_initcall+0x56/0x2e0 <4>[ 462.594592] do_init_module+0x55/0x200 <4>[ 462.594599] load_module+0x2703/0x2990 <4>[ 462.594605] __do_sys_finit_module+0xad/0x110 <4>[ 462.594612] do_syscall_64+0x33/0x80 <4>[ 462.594618] entry_SYSCALL_64_after_hwframe+0x44/0xae <4>[ 462.594625] other info that might help us debug this: <4>[ 462.594629] Chain exists of: cpu_hotplug_lock --> fs_reclaim --> &vm->mutex/1 <4>[ 462.594645] Possible unsafe locking scenario: <4>[ 462.594648] CPU0 CPU1 <4>[ 462.594652] ---- ---- <4>[ 462.594655] lock(&vm->mutex/1); <4>[ 462.594664] lock(fs_reclaim); <4>[ 462.594671] lock(&vm->mutex/1); <4>[ 462.594679] lock(cpu_hotplug_lock); <4>[ 462.594686] *** DEADLOCK *** <4>[ 462.594690] 4 locks held by i915_selftest/5540: <4>[ 462.594696] #0: ffff888100fbc240 (&dev->mutex){....}-{3:3}, at: device_driver_attach+0x18/0x50 <4>[ 462.594715] #1: ffffc900006cb9a0 (reservation_ww_class_acquire){+.+.}-{0:0}, at: make_obj_busy+0x81/0x330 [i915] <4>[ 462.595118] #2: ffff88812a6081e8 (reservation_ww_class_mutex){+.+.}-{3:3}, at: make_obj_busy+0x21f/0x330 [i915] <4>[ 462.595519] #3: ffff888125369c70 (&vm->mutex/1){+.+.}-{3:3}, at: i915_vma_pin_ww+0x38e/0xb40 [i915] <4>[ 462.595934] stack backtrace: <4>[ 462.595939] CPU: 0 PID: 5540 Comm: i915_selftest Tainted: G U 5.12.0-rc5-CI-Trybot_7644+ #1 <4>[ 462.595947] Hardware name: GOOGLE Kefka/Kefka, BIOS MrChromebox 02/04/2018 <4>[ 462.595952] Call Trace: <4>[ 462.595961] dump_stack+0x7f/0xad <4>[ 462.595974] check_noncircular+0x12e/0x150 <4>[ 462.595982] ? save_stack.isra.17+0x3f/0x70 <4>[ 462.595991] ? drm_mm_insert_node_in_range+0x34a/0x5b0 <4>[ 462.596000] ? i915_vma_pin_ww+0x9ec/0xb40 [i915] <4>[ 462.596410] __lock_acquire+0x1520/0x2590 <4>[ 462.596419] ? do_init_module+0x55/0x200 <4>[ 462.596429] lock_acquire+0xd1/0x3d0 <4>[ 462.596435] ? stop_machine+0x12/0x30 <4>[ 462.596445] ? gen8_ggtt_insert_entries+0xf0/0xf0 [i915] <4>[ 462.596816] cpus_read_lock+0x39/0xc0 <4>[ 462.596824] ? stop_machine+0x12/0x30 <4>[ 462.596831] stop_machine+0x12/0x30 <4>[ 462.596839] bxt_vtd_ggtt_insert_entries__BKL+0x36/0x50 [i915] <4>[ 462.597210] ggtt_bind_vma+0x5d/0x80 [i915] <4>[ 462.597580] i915_vma_bind+0xdc/0x1c0 [i915] <4>[ 462.597986] i915_vma_pin_ww+0x435/0xb40 [i915] <4>[ 462.598395] ? make_obj_busy+0xcb/0x330 [i915] <4>[ 462.598786] make_obj_busy+0xcb/0x330 [i915] <4>[ 462.599180] ? 0xffffffff81000000 <4>[ 462.599187] ? debug_mutex_unlock+0x50/0xa0 <4>[ 462.599198] igt_mmap_offset_exhaustion+0x45f/0x4c0 [i915] <4>[ 462.599592] __i915_subtests.cold.7+0x42/0x92 [i915] <4>[ 462.600026] ? i915_perf_selftests+0x20/0x20 [i915] <4>[ 462.600422] ? __i915_nop_setup+0x10/0x10 [i915] <4>[ 462.600820] __run_selftests.part.3+0x10d/0x172 [i915] <4>[ 462.601253] i915_live_selftests.cold.5+0x1f/0x47 [i915] <4>[ 462.601686] i915_pci_probe+0x93/0x1d0 [i915] <4>[ 462.602037] ? _raw_spin_unlock_irqrestore+0x3d/0x60 <4>[ 462.602047] pci_device_probe+0x9e/0x110 <4>[ 462.602057] really_probe+0xea/0x410 <4>[ 462.602067] driver_probe_device+0xd9/0x140 <4>[ 462.602075] device_driver_attach+0x4a/0x50 <4>[ 462.602084] __driver_attach+0x83/0x140 <4>[ 462.602091] ? device_driver_attach+0x50/0x50 <4>[ 462.602099] ? device_driver_attach+0x50/0x50 <4>[ 462.602107] bus_for_each_dev+0x75/0xc0 <4>[ 462.602116] bus_add_driver+0x14b/0x1f0 <4>[ 462.602124] driver_register+0x66/0xb0 <4>[ 462.602133] i915_init+0x70/0x87 [i915] <4>[ 462.602453] ? 0xffffffffa0606000 <4>[ 462.602458] do_one_initcall+0x56/0x2e0 <4>[ 462.602466] ? kmem_cache_alloc_trace+0x374/0x430 <4>[ 462.602476] do_init_module+0x55/0x200 <4>[ 462.602484] load_module+0x2703/0x2990 <4>[ 462.602500] ? __do_sys_finit_module+0xad/0x110 <4>[ 462.602507] __do_sys_finit_module+0xad/0x110 <4>[ 462.602519] do_syscall_64+0x33/0x80 <4>[ 462.602527] entry_SYSCALL_64_after_hwframe+0x44/0xae <4>[ 462.602535] RIP: 0033:0x7fab69d8d89d Changes since v1: - Add lockdep annotations during init, to ensure that lockdep is primed. This also fixes a false positive when reading /proc/lockdep_stats during module reload. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20210426102351.921874-1-maarten.lankhorst@linux.intel.com Reviewed-by: Thomas Hellström commit ff2d0ba25ad68b97e3260f16c56113493bc58656 Author: Thomas Zimmermann Date: Tue Apr 27 19:48:57 2021 +0200 drm/i915/gem: Remove reference to struct drm_device.pdev References to struct drm_device.pdev should not be used any longer as the field will be moved into the struct's legacy section. Add a fix for the rsp commit. v2: * fix an error in the commit description (Michael) Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Fixes: d57d4a1daf5e ("drm/i915: Create stolen memory region from local memory") Cc: CQ Tang Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: Xinyun Liu Cc: Tvrtko Ursulin Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Mika Kuoppala Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: "Thomas Hellström" Cc: "Gustavo A. R. Silva" Cc: Dan Carpenter Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Michael J. Ruhl Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210427174857.7862-1-tzimmermann@suse.de commit ca419f407b43cc89942ebc297c7a63d94abbcae4 Author: Stéphane Marchesin Date: Thu Apr 29 03:10:21 2021 +0000 drm/i915: Fix crash in auto_retire The retire logic uses the 2 lower bits of the pointer to the retire function to store flags. However, the auto_retire function is not guaranteed to be aligned to a multiple of 4, which causes crashes as we jump to the wrong address, for example like this: 2021-04-24T18:03:53.804300Z WARNING kernel: [ 516.876901] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI 2021-04-24T18:03:53.804310Z WARNING kernel: [ 516.876906] CPU: 7 PID: 146 Comm: kworker/u16:6 Tainted: G U 5.4.105-13595-g3cd84167b2df #1 2021-04-24T18:03:53.804311Z WARNING kernel: [ 516.876907] Hardware name: Google Volteer2/Volteer2, BIOS Google_Volteer2.13672.76.0 02/22/2021 2021-04-24T18:03:53.804312Z WARNING kernel: [ 516.876911] Workqueue: events_unbound active_work 2021-04-24T18:03:53.804313Z WARNING kernel: [ 516.876914] RIP: 0010:auto_retire+0x1/0x20 2021-04-24T18:03:53.804314Z WARNING kernel: [ 516.876916] Code: e8 01 f2 ff ff eb 02 31 db 48 89 d8 5b 5d c3 0f 1f 44 00 00 55 48 89 e5 f0 ff 87 c8 00 00 00 0f 88 ab 47 4a 00 31 c0 5d c3 0f <1f> 44 00 00 55 48 89 e5 f0 ff 8f c8 00 00 00 0f 88 9a 47 4a 00 74 2021-04-24T18:03:53.804319Z WARNING kernel: [ 516.876918] RSP: 0018:ffff9b4d809fbe38 EFLAGS: 00010286 2021-04-24T18:03:53.804320Z WARNING kernel: [ 516.876919] RAX: 0000000000000007 RBX: ffff927915079600 RCX: 0000000000000007 2021-04-24T18:03:53.804320Z WARNING kernel: [ 516.876921] RDX: ffff9b4d809fbe40 RSI: 0000000000000286 RDI: ffff927915079600 2021-04-24T18:03:53.804321Z WARNING kernel: [ 516.876922] RBP: ffff9b4d809fbe68 R08: 8080808080808080 R09: fefefefefefefeff 2021-04-24T18:03:53.804321Z WARNING kernel: [ 516.876924] R10: 0000000000000010 R11: ffffffff92e44bd8 R12: ffff9279150796a0 2021-04-24T18:03:53.804322Z WARNING kernel: [ 516.876925] R13: ffff92791c368180 R14: ffff927915079640 R15: 000000001c867605 2021-04-24T18:03:53.804323Z WARNING kernel: [ 516.876926] FS: 0000000000000000(0000) GS:ffff92791ffc0000(0000) knlGS:0000000000000000 2021-04-24T18:03:53.804323Z WARNING kernel: [ 516.876928] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 2021-04-24T18:03:53.804324Z WARNING kernel: [ 516.876929] CR2: 0000239514955000 CR3: 00000007f82da001 CR4: 0000000000760ee0 2021-04-24T18:03:53.804325Z WARNING kernel: [ 516.876930] PKRU: 55555554 2021-04-24T18:03:53.804325Z WARNING kernel: [ 516.876931] Call Trace: 2021-04-24T18:03:53.804326Z WARNING kernel: [ 516.876935] __active_retire+0x77/0xcf 2021-04-24T18:03:53.804326Z WARNING kernel: [ 516.876939] process_one_work+0x1da/0x394 2021-04-24T18:03:53.804327Z WARNING kernel: [ 516.876941] worker_thread+0x216/0x375 2021-04-24T18:03:53.804327Z WARNING kernel: [ 516.876944] kthread+0x147/0x156 2021-04-24T18:03:53.804335Z WARNING kernel: [ 516.876946] ? pr_cont_work+0x58/0x58 2021-04-24T18:03:53.804335Z WARNING kernel: [ 516.876948] ? kthread_blkcg+0x2e/0x2e 2021-04-24T18:03:53.804336Z WARNING kernel: [ 516.876950] ret_from_fork+0x1f/0x40 2021-04-24T18:03:53.804336Z WARNING kernel: [ 516.876952] Modules linked in: cdc_mbim cdc_ncm cdc_wdm xt_cgroup rfcomm cmac algif_hash algif_skcipher af_alg xt_MASQUERADE uinput snd_soc_rt5682_sdw snd_soc_rt5682 snd_soc_max98373_sdw snd_soc_max98373 snd_soc_rl6231 regmap_sdw snd_soc_sof_sdw snd_soc_hdac_hdmi snd_soc_dmic snd_hda_codec_hdmi snd_sof_pci snd_sof_intel_hda_common intel_ipu6_psys snd_sof_xtensa_dsp soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof snd_soc_hdac_hda snd_soc_acpi_intel_match snd_soc_acpi snd_hda_ext_core soundwire_bus snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core intel_ipu6_isys videobuf2_dma_contig videobuf2_v4l2 videobuf2_common videobuf2_memops mei_hdcp intel_ipu6 ov2740 ov8856 at24 sx9310 dw9768 v4l2_fwnode cros_ec_typec intel_pmc_mux roles acpi_als typec fuse iio_trig_sysfs cros_ec_light_prox cros_ec_lid_angle cros_ec_sensors cros_ec_sensors_core industrialio_triggered_buffer cros_ec_sensors_ring kfifo_buf industrialio cros_ec_sensorhub 2021-04-24T18:03:53.804337Z WARNING kernel: [ 516.876972] cdc_ether usbnet iwlmvm lzo_rle lzo_compress iwl7000_mac80211 iwlwifi zram cfg80211 r8152 mii btusb btrtl btintel btbcm bluetooth ecdh_generic ecc joydev 2021-04-24T18:03:53.804337Z EMERG kernel: [ 516.879169] gsmi: Log Shutdown Reason 0x03 This change fixes this by aligning the function. Signed-off-by: Stéphane Marchesin Fixes: 229007e02d69 ("drm/i915: Wrap i915_active in a simple kreffed struct") Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210429031021.1218091-1-marcheu@chromium.org commit 0e0036c7d13b945260ff1ce8377eca7ea877c008 Author: Dennis Li Date: Tue Apr 27 22:21:03 2021 +0800 drm/amdgpu: fix no full coverage issue for gprs initialization The wave's number per simd in aldebaran is changed to 8, so it is impossible to use old algorithm to initiate all sgprs with one threadgroup. The new algorithm firstly use three threadgroups to initiate most sgprs simultaneously and then use another threadgroup with 4 waves to cover other uninitiated sgprs. v2: Add more description about the new algorithm to clear sgprs and add some comment for shader binaries Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8baa6018b750570e43c160874f754083e7bf7eb4 Author: Harish Kasiviswanathan Date: Tue Apr 20 21:09:10 2021 -0400 drm/amdkfd: Add Aldebaran gws support v2: updated MEC FW version after validating gws with debugger Signed-off-by: Harish Kasiviswanathan Reviewed-by: Joseph Greathouse Signed-off-by: Alex Deucher commit b3dc91f973172dd71594076eb20484471d981a89 Author: Philip Yang Date: Tue Apr 20 15:13:59 2021 -0400 drm/amdkfd: enable subsequent retry fault After draining the stale retry fault, or failed to validate the range to recover, have to remove the fault address from fault filter ring, to be able to handle subsequent retry interrupt on same address. Otherwise the retry fault will not be processed to recover until timeout passed. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 36255b5f619594504e9d76de23b58e99c5e08ceb Author: Philip Yang Date: Tue Apr 20 10:05:44 2021 -0400 drm/amdgpu: address remove from fault filter Add interface to remove address from fault filter ring by resetting fault ring entry key, then future vm fault on the address will be processed to recover. Define fault key as atomic64_t type to use atomic read/set/cmpxchg key to protect fault ring access by interrupt handler and interrupt deferred work for vg20. Change fault->timestamp to 48-bit to share same uint64_t with 8-bit fault->next, it is enough for 48bit IH timestamp. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 373e3ccd859b4bc52ccb511e00b0c14e7e57430a Author: Philip Yang Date: Mon Apr 19 21:19:57 2021 -0400 drm/amdkfd: handle stale retry fault Retry fault interrupt maybe pending in IH ring after GPU page table is updated to recover the vm fault, because each page of the range generate retry fault interrupt. There is race if application unmap range to remove and free the range first and then retry fault work restore_pages handle the retry fault interrupt, because range can not be found, this vm fault can not be recovered and report incorrect GPU vm fault to application. Before unmap to remove and free range, drain retry fault interrupt from IH ring1 to ensure no retry fault comes after the range is removed. Drain retry fault interrupt skip the range which is on deferred list to remove, or the range is child range, which is split by unmap, does not add to svms and have interval notifier. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 11dd55d1743881c7c8f62171066292fc034e1c3c Author: Philip Yang Date: Sat Apr 17 22:37:21 2021 -0400 drm/amdgpu: return IH ring drain finished if ring is empty Sometimes IH do not setup ring wptr overflow flag after wptr exceed rptr. As a workaround, if IH rptr equals to wptr, ring is empty, return true to indicate IH ring checkpoint is processed, IH ring drain is finished. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4999e398e281b336c7e08a3bf0da014d9cc2119f Author: Philip Yang Date: Mon Apr 19 21:51:27 2021 -0400 drm/amdkfd: retry validation to recover range GPU vm retry fault recover range need retry validation if 1. range is split in parallel by unmap while recover 2. range migrate to system memory and range is updated in system memory while recover Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c3c5cc9a83dca59b3a883eb0200fcbf467a9115e Author: Jonathan Kim Date: Mon Apr 26 15:38:18 2021 -0400 drm/amdkfd: fix spelling mistake in packet manager The plural of 'process' should be 'processes'. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 95ea3dbc4e9548d35ab6fbf67675cef8c293e2f5 Author: Jack Zhang Date: Tue Apr 27 17:08:47 2021 +0800 drm/amd/amdgpu/sriov disable all ip hw status by default Disable all ip's hw status to false before any hw_init. Only set it to true until its hw_init is executed. The old 5.9 branch has this change but somehow the 5.11 kernrel does not have this fix. Without this change, sriov tdr have gfx IB test fail. Signed-off-by: Jack Zhang Review-by: Emily Deng Signed-off-by: Alex Deucher commit dd03daec0ff170c0622c9545137e8ad9846b967d Author: Christian König Date: Mon Apr 26 10:06:13 2021 +0200 drm/amdgpu: restructure amdgpu_vram_mgr_new Merge the two loops, loosen the restriction for big allocations. This reduces the CPU overhead in the good case, but increases it a bit under memory pressure. Signed-off-by: Christian König Acked-and-Tested-by: Nirmoy Das Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c0f76fc8ad5f3511bdee37efc130555b39d3f711 Author: Philip Yang Date: Mon Apr 26 14:25:37 2021 -0400 drm/amdkfd: fix double free device pgmap resource Use devm_memunmap_pages instead of memunmap_pages to release pgmap and remove pgmap from device action, to avoid double free pgmap when unloading driver module. Release device memory region if failed to create device memory pages structure. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit dd57e65f7c9b1ab4e9b04f2b2bcd28f60abc4b38 Author: Colin Ian King Date: Mon Apr 26 13:13:04 2021 +0100 drm/amdkfd: Fix spelling mistake "unregisterd" -> "unregistered" There is a spelling mistake in a pr_debug message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Nirmoy Das Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5d11699914b9993d7c56ff74450f815c7a54e99f Author: Feifei Xu Date: Sun Apr 25 15:49:23 2021 +0800 drm/amdgpu: Correct and simplify sdma 4.x irq.num_types Correct and init the sdma4.x irq.num_types. v2: squash in fix (Alex) Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3d2bee9188f24211b56874c7753a304d43278fad Author: Feifei Xu Date: Sun Apr 25 15:26:15 2021 +0800 drm/amdgpu: Change the sdma interrupt print level Change the print level into debug. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 041e69160d161f5b4ad77cd915640c5cfe9c9bc3 Author: Victor Zhao Date: Thu Apr 22 17:38:09 2021 +0800 drm/amdgpu/sriov: Remove clear vf fw support PSP clear_vf_fw feature is outdated and has been removed. Remove the related functions. Signed-off-by: Victor Zhao Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 18fa44625c6bf9375734fb9e564bd5911200ddc1 Author: Aric Cyr Date: Mon Apr 19 00:46:28 2021 -0400 drm/amd/display: 3.2.133 Signed-off-by: Aric Cyr Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8167538ffb22b299958ee1ad7873fadd12254c1d Author: Anthony Koo Date: Sat Apr 17 15:13:15 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.63 Signed-off-by: Anthony Koo Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 069a11cca5b649f6e16ea3d97408c4f289d300ed Author: Max.Tseng Date: Fri Apr 16 10:04:51 2021 +0800 drm/amd/display: Add SE_DCN3_REG_LIST for control SDP num [Why] New platform. Need to add corresponding register control Signed-off-by: Max.Tseng Reviewed-by: Anthony Koo Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 088bebc79ee8c5ee9d61fa0381af278d5ff7da45 Author: Yu-ting Shen Date: Wed Apr 14 15:33:33 2021 +0800 drm/amd/display: avoid to authentication when DEVICE_COUNT=0 [why] we don't support authentication with DEVICE_COUNT=0 [how] check value DEVICE_COUNT before doing authentication Signed-off-by: Yu-ting Shen Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 642d3a2bf234578da83ed1fb6ef87dba36d31dea Author: Wenjing Liu Date: Fri Apr 9 14:55:18 2021 -0400 drm/amd/display: take max dsc stream bandwidth overhead into account [why] As hardware team suggested that we need to add a max dsc bw overhead into existing stream bandwidth when DSC is used. The formula as below: max_dsc_bw_overhead = v_addressable * slice_count * 256 bit * pixel clock / v_total / h_total effective stream bandwidth = pixel clock * bpp stream bandwidth = effective stream bandwidth + dsc stream overhead Signed-off-by: Wenjing Liu Reviewed-by: Eric Bernstein Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit abf1f863e08dc23764ce617dd55e1b533e525a3f Author: Mikita Lipski Date: Wed Apr 14 14:15:52 2021 -0400 drm/amd/display: fix wrong statement in mst hpd debugfs [why] Previous statement would always evaluate to true making it meaningless [how] Just check if a connector is MST by checking if its port exists. Reported-by: kernel test robot Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 831c95c966014cabc7ed5dc4a6b87c1b8440f48f Author: Robin Chen Date: Thu Apr 15 10:08:10 2021 +0800 drm/amd/display: Clear MASTER_UPDATE_LOCK_DB_EN when disable doublebuffer lock [Why] It seems there's a typo to set MASTER_UPDATE_LOCK_DB_EN when disable doublebuffer lock. [How] Clear MASTER_UPDATE_LOCK_DB_EN when disable doublebuffer lock Signed-off-by: Robin Chen Reviewed-by: Joshua Aberback Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dd0ef5992b441340991258087b14f29ca84c6f7f Author: Max.Tseng Date: Thu Apr 15 11:35:03 2021 +0800 drm/amd/display: Add new DP_SEC registers for programming SDP Line number [Why] Add register for programming in new platform Signed-off-by: Max.Tseng Reviewed-by: Anthony Koo Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b2d4b9f72fb14c1e6e4f0128964a84539a72d831 Author: Chris Park Date: Tue Apr 13 22:25:23 2021 -0400 drm/amd/display: Fix BSOD with NULL check [Why] CLK mgr is null for server settings. [How] Guard the function with NULL check. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 63de4f0413fe5487ba5a1ed04c92fa10ca6af7c7 Author: Jake Wang Date: Mon Apr 12 17:46:49 2021 -0400 drm/amd/display: Added multi instance support for ABM [WHY & HOW] ABM assumes only 1 eDP is connected. Refactored existing ABM interface to support multiple instances. Signed-off-by: Jake Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 130ac6d8c69bbecf3331a8427ddb743c6cf4a8f1 Author: Yu-ting Shen Date: Tue Apr 13 13:47:23 2021 +0800 drm/amd/display: ddc resource data need to be initialized [WHY] to initial ddc structure before we use them to avoid error checking. [HOW] add 0 as structure initialization value in DCN resource construct Signed-off-by: Yu-ting Shen Reviewed-by: Meenakshikumar Somasundaram Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b7cc1312c110f8760a3d3e8e41a6d84e32f71a61 Author: Stylon Wang Date: Wed Apr 7 18:14:55 2021 +0800 drm/amd/display: Expose internal display flag via debugfs [Why & How] Add a per-connector debugfs entry to expose internal display flag, which is indication that the display is "internally connected" and not hotpluggable. Signed-off-by: Stylon Wang Reviewed-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 47c02af751d168372d6ba3189799671eab606ef1 Author: Lewis Huang Date: Fri Apr 9 18:39:43 2021 +0800 drm/amd/display: skip program clock when allow seamless boot [Why] Driver program dpp clock calculate by pipe split config but hw config is single pipe. [How] Skip programming clock when allow seamless boot. After porgramming pipe config, seamless boot flag will be clear. Signed-off-by: Lewis Huang Reviewed-by: Eric Yang Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d5433a9f692f57c814286f8af2746c567ef79fc8 Author: Lewis Huang Date: Tue Apr 13 07:02:28 2021 +0800 drm/amd/display: Revert wait vblank on update dpp clock [Why] This change only fix dpp clock switch to lower case. New solution later can fix both case, which is "dc: skip program clock when allow seamless boot" [How] This reverts commit "dc: wait vblank when stream enabled and update dpp clock" Signed-off-by: Lewis Huang Reviewed-by: Eric Yang Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 99c248c41c2199bd34232ce8e729d18c4b343b64 Author: Brandon Syu Date: Fri Apr 9 14:47:46 2021 +0800 drm/amd/display: fix HDCP reset sequence on reinitialize [why] When setup is called after hdcp has already setup, it would cause to disable HDCP flow won’t execute. [how] Don't clean up hdcp content to be 0. Signed-off-by: Brandon Syu Reviewed-by: Wenjing Liu Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 760d2d818d2dbf232d2e1df2317381c59b95f86d Author: Michael Strauss Date: Wed Apr 7 11:21:44 2021 -0400 drm/amd/display: Add new case to get spread spectrum info [WHY] New minor revision needs to be handled [HOW] Add switch case and assert to catch missing switch cases in the future Signed-off-by: Michael Strauss Reviewed-by: Eric Yang Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit be9064b7bcaab6b35d6040499af3fd5db8863ba4 Author: Hawking Zhang Date: Sun Apr 25 14:29:25 2021 +0800 drm/amdgpu: remove unnecessary header include amdgpu.h is included in kfd_priv.h Signed-off-by: Hawking Zhang Reviewed-by: John Clements Signed-off-by: Alex Deucher commit a30f128602001c986bb2b3ede074b6193d43905f Author: Hawking Zhang Date: Sun Apr 25 14:34:25 2021 +0800 drm/amdgpu: provide socket/die id info in RAS message Add socket/die information in RAS messages for platforms that support query those information Signed-off-by: Hawking Zhang Reviewed-by: John Clements Signed-off-by: Alex Deucher commit dfdd4b8a95197d3769563e6f504357d98dd63887 Author: Hawking Zhang Date: Fri Apr 23 14:37:10 2021 +0800 drm/amdgpu: implement smuio callback to query socket id get_socket_id is used to query socket id Signed-off-by: Hawking Zhang Reviewed-by: John Clements Signed-off-by: Alex Deucher commit ec0f72cb959d9b8d6ce51457b392945fe1719d46 Author: Jinzhou Su Date: Fri Apr 23 16:29:14 2021 +0800 drm/amdgpu: Enable SDMA LS for Vangogh Add flags AMD_CG_SUPPORT_SDMA_LS for Vangogh. Start to open sdma ls from firmware version 70. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 71ff0b4d965f528214e3dd26b71fdcbd015d19b4 Author: Fabio M. De Francesco Date: Sat Apr 24 18:50:39 2021 +0200 drm/amdkfd: Fix kernel-doc syntax error Fixed a kernel-doc error in the documentation of a function. Signed-off-by: Fabio M. De Francesco Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5f5cb2afd67f5d1b2468b7a195b9c3c4963949af Author: Souptick Joarder Date: Sat Apr 24 15:10:20 2021 +0530 drm/amdgpu: Added missing prototype Kernel test robot throws below warning -> >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:125:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_load' >> [-Wmissing-prototypes] 125 | int kgd_arcturus_hqd_sdma_load(struct kgd_dev *kgd, void *mqd, >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:195:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_dump' >> [-Wmissing-prototypes] 195 | int kgd_arcturus_hqd_sdma_dump(struct kgd_dev *kgd, >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:227:6: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_is_occupied' >> [-Wmissing-prototypes] 227 | bool kgd_arcturus_hqd_sdma_is_occupied(struct kgd_dev *kgd, void *mqd) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:246:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_destroy' >> [-Wmissing-prototypes] 246 | int kgd_arcturus_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Added prototype for these functions. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit ede14a1b32234685e2d6893205ff24c959b3f021 Author: Darren Powell Date: Wed Apr 7 18:40:34 2021 -0400 amdgpu/pm: set pp_dpm_dcefclk to readonly on NAVI10 and newer gpus v2 : change condition to apply to all chips after NAVI10 Writing to dcefclk causes the gpu to become unresponsive, and requires a reboot. Patch prevents user from successfully writing to file pp_dpm_dcefclk on parts NAVI10 and newer, and gives better user feedback that this operation is not allowed. Signed-off-by: Darren Powell Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 51ec699275d91f52d861926f176635ce08b8af11 Author: Darren Powell Date: Wed Apr 7 00:34:35 2021 -0400 amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID Writing to dcefclk causes the gpu to become unresponsive, and requires a reboot. Patch ignores a .force_clk_levels(SMU_DCEFCLK) call and issues an info message. Signed-off-by: Darren Powell Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 1e4a53de01c68d4ec9800b9a0f6efe9f26184a77 Author: Darren Powell Date: Fri Apr 9 18:28:24 2021 -0400 amdgpu/pm: add extra info to SMU msg pre-check failed message Insert the value of the response to error message emitted when the SMU msg pre-check failes Signed-off-by: Darren Powell Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit f876549dd002e8f5788c281096a7310bc53fbe20 Author: Harish Kasiviswanathan Date: Fri Apr 23 14:57:55 2021 -0400 drm/amd/pm: Update energy_accumulator in gpu metrics Now that it is available. v2: squash in typecast fix (Alex) Signed-off-by: Harish Kasiviswanathan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1fcf24fb07e254ca69001ab14adc8cf567127c44 Author: Hsin-Yi Wang Date: Wed Apr 28 19:51:16 2021 +0800 drm/bridge: anx7625: Fix power on delay >From anx7625 spec, the delay between powering on power supplies and gpio should be larger than 10ms. Fixes: 6c744983004e ("drm/bridge: anx7625: disable regulators when power off") Signed-off-by: Hsin-Yi Wang Reviewed-by: Neil Armstrong Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210428115116.931328-1-hsinyi@chromium.org commit cacb5dc1d3efa6a9c768e3f447c78ac28af5c602 Author: Randy Dunlap Date: Fri Apr 23 23:18:17 2021 -0700 drm: bridge: add missing word in Analogix help text Insert a missing word "power" in Kconfig help text. Fixes: 6aa192698089 ("drm/bridge: Add Analogix anx6345 support") Signed-off-by: Randy Dunlap Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Icenowy Zheng Cc: Vasily Khoruzhick Cc: Torsten Duwe Cc: Maxime Ripard Reviewed-by: Neil Armstrong Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210424061817.7339-1-rdunlap@infradead.org commit 1a86ac792f67ebd50cdafb20d4aad6b23c8495f7 Author: Ville Syrjälä Date: Wed Apr 14 05:23:02 2021 +0300 drm/i915: Add frontbuffer tracking tracepoints Add some tracpoints for frontbuffer tracking so we can try to figure out what's going on. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210414022309.30898-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit b109da48e6baceeb7b80e6b3292324f46c7d1255 Author: Ville Syrjälä Date: Mon Apr 26 21:56:12 2021 +0300 drm/i915: Stop using crtc->index as the pipe The pipe crc code slipped theough the net when we tried to eliminate all crtc->index==pipe abuses. Remedy that. And while at it get rid of those nasty intel_crtc+drm_crtc pointer aliases. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210426185612.13223-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Reviewed-by: José Roberto de Souza commit 661af37946f32d9bf28b11a6e0626c1012813190 Author: Ville Syrjälä Date: Thu Mar 18 20:10:39 2021 +0200 drm/i915: Remove stray newlines A bunch of files have a stray newline at the end. Remove it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318181039.17260-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 8ec7d10a54798718f6c166639a79991c8b53ddee Author: Ville Syrjälä Date: Thu Mar 18 20:10:38 2021 +0200 drm/i915: Fix pre-skl DP AUX precharge length DP v1.1+ says: "The DisplayPort transmitter, which is the driving end for a request transaction, pre-charges the AUX-CH+ and AUX-CH- to a common mode voltage by transmitting 10 to 16 consecutive 0’s in Manchester II code. After the active pre-charge, the transmitter sends an AUX Sync pattern. The AUX Sync pattern must be as follows: Start with 16 consecutive 0s in Manchester-II code, which results in a transition from low to high in the middle of each bit period. Including active pre-charge pulses, there shall be 26 to 32 consecutive 0s before the end of the AUX_SYNC pattern." BDW bspec says: "Used to determine the precharge time for the Aux Channel. During this time the Aux Channel will drive the SYNC pattern. Every microsecond gives one additional SYNC pulse beyond the hard coded 26 SYNC pulses. The value is the number of microseconds times 2. Default is 3 decimal which gives 6us of precharge which is 6 extra SYN pulses for a total of 32." CPT bspec says the same thing apart from: "... Default is 5 decimal which gives 10us of precharge which is 10 extra SYNC pulses for a total of 36." So it looks like to match the max of 32 of the DP spec we should just always program this extra precharge time to 3. Unfortunately g4x/ibx bspec doesn't have this clarification, but since the cpt default was still the same 5 as for g4x/ibx let's assume the behaviour was always the same. I also did a bit more archaeology and found the following: commit e3421a189447 ("drm/i915: enable DP/eDP for Sandybridge/Cougarpoint") added the precharge==3 for snb commit 092945e11c5b ("drm/i915/dp: Use auxch precharge value of 5 everywhere") tried to change it to be 5 for snb commit 6b4e0a93ff6e ("Revert "drm/i915/dp: Use auxch precharge value of 5 everywhere"") went back to 3 for snb due to a regression So I think the value of 5 was just always wrong, but I guess very few display actually get upset if we do too many SYNCs. Also DP 1.0 did not specify any max value for this, whereas DP 1.1+ added the max==32 wording. Additionally I hooked up a scope to a few machines with the following findings: - ibx and cpt both give us the expected 32 total sync pulses with precharge==3 - ctg is a bit different, it has the 10 hardcoded precharge sync pulses same as later platforms (so we get at least 26 sync pulses in total). However the additional precharge length (which is what we're changing here) is not done with sync pulses. Instead ctg does this part of the precharge with a steady DC voltage. If we wanted to 100% match DP 1.1+ here we should perhaps set prechange length to 0, but less precharge might make AUX less reliable, and so far we're not aware of any problems due to the DC precharge. Hence I think precharge==3 is probably the best choice here too to make the total length of precharge consistent with the later platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318181039.17260-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 7c53e628344bf17aa9282b795aa7cd9c46958949 Author: Jani Nikula Date: Tue Apr 27 15:03:15 2021 +0300 drm/i915/display: move crtc and dpll declarations where they belong The definitions are in the crtc and dpll files; move the declarations to the corresponding headers. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210427120315.12342-1-jani.nikula@intel.com commit b23109c5b5368ab7512edd78c6fd23ad35a6886b Author: Jani Nikula Date: Tue Apr 27 14:45:20 2021 +0300 drm/i915/hdcp: add intel_dp_hdcp.h and rename init accordingly Add separate intel_dp_hdcp.h to go with intel_dp_hdcp.c, and rename the init function intel_dp_hdcp_init() to follow naming where function prefix matches the file name. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210427114520.4740-1-jani.nikula@intel.com commit 3a08f53dcf17e7cbdc6143e88791b3a10d0fdd48 Author: Lyude Paul Date: Fri Apr 23 14:43:09 2021 -0400 drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*() And finally, convert all of the code in drm_dp_mst_topology.c over to using drm_err() and drm_dbg*(). Note that this refactor would have been a lot more complicated to have tried writing a coccinelle script for, so this whole thing was done by hand. v2: * Fix line-wrapping in drm_dp_mst_atomic_check_mstb_bw_limit() Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-18-lyude@redhat.com Reviewed-by: Dave Airlie commit a4d00750cd91840f67d3b7f471ca40dda60983cf Author: Lyude Paul Date: Fri Apr 23 14:43:08 2021 -0400 drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms() Next step in the conversion, move everything in drm_dp_dual_mode_helper.c over to using drm_err() and drm_dbg_kms(). This was done using the following cocci script: @@ expression list expr; @@ ( - DRM_DEBUG_KMS(expr); + drm_dbg_kms(dev, expr); | - DRM_ERROR(expr); + drm_err(dev, expr); ) And correcting the indentation of the resulting code by hand. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-17-lyude@redhat.com Reviewed-by: Dave Airlie commit b1e7f5fdbac8f03d6d93a2e4c2f69ab6e1b452af Author: Lyude Paul Date: Fri Apr 23 14:43:07 2021 -0400 drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*() Now that we've added a back-pointer to drm_device to drm_dp_aux, made drm_dp_aux available to any functions in drm_dp_helper.c which need to print to the kernel log, and ensured all of our logging uses a consistent format, let's do the final step of the conversion and actually move everything over to using drm_err() and drm_dbg_*(). This was done by using the following cocci script: @@ expression list expr; @@ ( - DRM_DEBUG_KMS(expr); + drm_dbg_kms(aux->drm_dev, expr); | - DRM_DEBUG_DP(expr); + drm_dbg_dp(aux->drm_dev, expr); | - DRM_DEBUG_ATOMIC(expr); + drm_dbg_atomic(aux->drm_dev, expr); | - DRM_DEBUG_KMS_RATELIMITED(expr); + drm_dbg_kms_ratelimited(aux->drm_dev, expr); | - DRM_ERROR(expr); + drm_err(aux->drm_dev, expr); ) Followed by correcting the resulting line-wrapping in the results by hand. v2: * Fix indenting in drm_dp_dump_access Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-16-lyude@redhat.com Reviewed-by: Dave Airlie commit 7911902129a8c4dbc45c3ffb57126d11e042aef4 Author: Lyude Paul Date: Fri Apr 23 14:43:06 2021 -0400 drm/print: Handle potentially NULL drm_devices in drm_dbg_* While this shouldn't really be something that happens all that often, since we're going to be using the drm_dbg_* log helpers in DRM helpers it's technically possible that a driver could use an AUX adapter before it's been associated with it's respective drm_device. While drivers should take care to avoid this, there's likely going to be situations where it's difficult to workaround. And since other logging helpers in the kernel tend to be OK with NULL pointers (for instance, passing a NULL pointer to a "%s" argument for a printk-like function in the kernel doesn't break anything), we should do the same for ours. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-15-lyude@redhat.com Reviewed-by: Dave Airlie commit c869c5f8ceca43d61db2176f88a0321f4ce50961 Author: Lyude Paul Date: Fri Apr 23 14:43:05 2021 -0400 drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw() Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-14-lyude@redhat.com Reviewed-by: Dave Airlie commit 318fbd7dfedd672f1adc2f9896ff84474b6a24cc Author: Lyude Paul Date: Fri Apr 23 14:43:04 2021 -0400 drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode() So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-13-lyude@redhat.com Reviewed-by: Dave Airlie commit 739624d86cb9f4ff794256749de7d9510e9fef67 Author: Lyude Paul Date: Fri Apr 23 14:43:03 2021 -0400 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output() Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-12-lyude@redhat.com Reviewed-by: Dave Airlie commit a117f3de3b3aa4eae272067e0597f9d6c3b85f43 Author: Lyude Paul Date: Fri Apr 23 14:43:02 2021 -0400 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock() Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-11-lyude@redhat.com Reviewed-by: Dave Airlie commit c235509ad740e215319c0dc34e8020dd730c046c Author: Lyude Paul Date: Fri Apr 23 14:43:01 2021 -0400 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output() Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-10-lyude@redhat.com Reviewed-by: Dave Airlie commit 92ea222015f17203b43dd59b9541dcd26811bf4c Author: Lyude Paul Date: Fri Apr 23 14:43:00 2021 -0400 drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect() Since we're about to be using drm_dbg_*() throughout the DP helpers, we'll need to be able to access the DRM device in the dual mode DP helpers as well. Note however that since drm_dp_dual_mode_detect() can be called with DDC adapters that aren't part of a drm_dp_aux struct, we need to pass down the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-9-lyude@redhat.com Reviewed-by: Dave Airlie commit 427e59d3b5d3cbfe75034002ae4580bf51a003c3 Author: Lyude Paul Date: Fri Apr 23 14:42:59 2021 -0400 drm/dp: Always print aux channel name in logs Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-8-lyude@redhat.com Reviewed-by: Dave Airlie commit 0c4fada608c1eb8234fad0f478d8a903f0405094 Author: Lyude Paul Date: Fri Apr 23 14:42:58 2021 -0400 drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay() So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-7-lyude@redhat.com Reviewed-by: Dave Airlie commit 9e98666644569c038ad5cc4fe4e480975879c117 Author: Lyude Paul Date: Fri Apr 23 14:42:57 2021 -0400 drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay() So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-6-lyude@redhat.com Reviewed-by: Dave Airlie commit 3f3a6524f6065fd3d130515e012f63eac74d96da Author: Lyude Paul Date: Fri Apr 23 14:42:56 2021 -0400 drm/dp: Clarify DP AUX registration time The docs we had for drm_dp_aux_init() and drm_dp_aux_register() were mostly correct, except for the fact that they made the assumption that all AUX devices were grandchildren of their respective DRM devices. This is the case for most normal GPUs, but is almost never the case with SoCs and display bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-5-lyude@redhat.com Reviewed-by: Dave Airlie commit 6cba3fe433415b2549c909ce72601902c8254a83 Author: Lyude Paul Date: Fri Apr 23 14:42:55 2021 -0400 drm/dp: Add backpointer to drm_device in drm_dp_aux This is something that we've wanted for a while now: the ability to actually look up the respective drm_device for a given drm_dp_aux struct. This will also allow us to transition over to using the drm_dbg_*() helpers for debug message printing, as we'll finally have a drm_device to reference for doing so. Note that there is one limitation with this - because some DP AUX adapters exist as platform devices which are initialized independently of their respective DRM devices, one cannot rely on drm_dp_aux->drm_dev to always be non-NULL until drm_dp_aux_register() has been called. We make sure to point this out in the documentation for struct drm_dp_aux. v3: * Add WARN_ON_ONCE() to drm_dp_aux_register() if drm_dev isn't filled out Signed-off-by: Lyude Paul Acked-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-4-lyude@redhat.com Reviewed-by: Dave Airlie commit fd43ad9d47e74018d4487dcb3f828ae398fb3530 Author: Lyude Paul Date: Fri Apr 23 14:42:54 2021 -0400 drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-3-lyude@redhat.com Reviewed-by: Dave Airlie commit eaf8974ea2d9c3ccad3af582df9ff74360b3e3d9 Author: Lyude Paul Date: Fri Apr 23 14:42:53 2021 -0400 drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-2-lyude@redhat.com Reviewed-by: Dave Airlie commit 229e22845e81c3d3b4b32bdd69c6a7f345fb0197 Author: Mohammed Khajapasha Date: Tue Apr 27 09:54:17 2021 +0100 drm/i915: Return error value when bo not in LMEM for discrete Return EREMOTE value when frame buffer object is not backed by LMEM for discrete. If Local memory is supported by hardware the framebuffer backing gem objects should be from local memory. Signed-off-by: Mohammed Khajapasha Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-7-matthew.auld@intel.com commit 4bc91dbde0da2f88b1f3660e8d17dacd2e929a62 Author: Anusha Srivatsa Date: Tue Apr 27 09:54:16 2021 +0100 drm/i915/lmem: Bypass aperture when lmem is available In the scenario where local memory is available, we have rely on CPU access via lmem directly instead of aperture. v2: gmch is only relevant for much older hw, therefore we can drop the has_aperture check since it should always be present on such platforms. (Chris) Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Cc: Maarten Lankhorst Cc: Chris P Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: Daniele Ceraolo Spurio Cc: CQ Tang Signed-off-by: Anusha Srivatsa Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-6-matthew.auld@intel.com commit a9cf6ab3e7e4fc9e3720efe15cad3f7ae2322141 Author: Mohammed Khajapasha Date: Tue Apr 27 09:54:15 2021 +0100 drm/i915/fbdev: Use lmem physical addresses for fb_mmap() on discrete Use local memory io BAR address for fbdev's fb_mmap() operation on discrete, fbdev uses the physical address of our framebuffer for its fb_mmap() fn. Signed-off-by: Mohammed Khajapasha Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-5-matthew.auld@intel.com commit 6aed5673f00dcbe86dc40408cab6d85abacd20d4 Author: Matthew Auld Date: Tue Apr 27 09:54:14 2021 +0100 drm/i915/gtt/dgfx: place the PD in LMEM It's a requirement that for dgfx we place all the paging structures in device local-memory. v2: use i915_coherent_map_type() v3: improve the shared dma-resv object comment Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-4-matthew.auld@intel.com commit 529b9ec809a0a073192e5dc757fc383e11926661 Author: Matthew Auld Date: Tue Apr 27 09:54:13 2021 +0100 drm/i915/gtt: map the PD up front We need to generalise our accessor for the page directories and tables from using the simple kmap_atomic to support local memory, and this setup must be done on acquisition of the backing storage prior to entering fence execution contexts. Here we replace the kmap with the object mapping code that for simple single page shmemfs object will return a plain kmap, that is then kept for the lifetime of the page directory. Note that keeping the mapping around is a potential concern here, since while the vma is pinned the mapping remains there for the PDs underneath, or at least until the used_count reaches zero, at which point we can safely destroy the mapping. For 32b this will be even worse since the address space is more limited, but since this change mostly impacts full ppGTT platforms, the justification is that for modern platforms we shouldn't care too much about 32b. Signed-off-by: Matthew Auld Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-3-matthew.auld@intel.com commit fa85bfd19c26739c4cc02afbbab2588332648e9d Author: Venkata Sandeep Dhanalakota Date: Tue Apr 27 09:54:12 2021 +0100 drm/i915: Update the helper to set correct mapping Determine the possible coherent map type based on object location, and if target has llc or if user requires an always coherent mapping. Cc: Matthew Auld Cc: CQ Tang Suggested-by: Michal Wajdeczko Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-2-matthew.auld@intel.com commit c27d642b8edbbb112bdc3ca2f219d7c98cc026e1 Author: Venkata Ramana Nayana Date: Tue Apr 27 09:54:11 2021 +0100 drm/i915/dg1: Fix mapping type for default state object Use I915_MAP_WC when default state object is allocated in LMEM. Signed-off-by: Venkata Ramana Nayana Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210427085417.120246-1-matthew.auld@intel.com commit 64bf1491137db099e8873b6755c7565207f676ea Author: Fabio M. De Francesco Date: Tue Apr 27 12:55:03 2021 +0200 drm/drm_file.c: Define drm_send_event_helper() as 'static' drm_send_event_helper() has not prototype, it has internal linkage and therefore it should be defined with storage class 'static'. Signed-off-by: Fabio M. De Francesco Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210427105503.10765-1-fmdefrancesco@gmail.com commit 250e743915d47163a075e63f282e9818b54651f1 Author: Takashi Iwai Date: Wed Apr 21 10:08:59 2021 +0200 drm/bochs: Add screen blanking support On bochs DRM driver, the execution of "setterm --blank force" results in a frozen screen instead of a blank screen. It's due to the lack of the screen blanking support in its code. Actually, the QEMU bochs vga side can switch to the blanking mode when the bit 0x20 is cleared on VGA_ATT_IW register (0x3c0), which updates ar_index in QEMU side. So, essentially, we'd just need to clear the bit at pipe disable callback; that's what this patch does essentially. However, a tricky part is that the access via VGA_ATT_IW is done in "flip-flop"; the first write is for index and the second write is for the data like palette. Meanwhile, in the current bochs DRM driver, the flip-flop wasn't considered, and it calls only the register update once with the value 0x20. The spec and the actual VGA implementation in QEMU suggests that the flip flop flag is discarded by reading the CRTC index register (VGA_IS1_RC, 0x3da). So, in this patch, we add the helper to read a byte and the call to clear the flip flop flag before changing the blank / unblank setup via VGA_ATT_IW register. v1->v2: * discard ar_flip_flop by reading 0x3da, add bochs_vga_readb() * include video/vga.h for VGA register definitions * move the blank/unblank code to bochs_hw_blank() Signed-off-by: Takashi Iwai Acked-by: Gerd Hoffmann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210421080859.14869-1-tiwai@suse.de commit ba4e0339a6a33e2ba341703ce14ae8ca203cb2f1 Author: KuoHsiang Chou Date: Wed Apr 21 16:58:59 2021 +0800 drm/ast: Fixed CVE for DP501 [Bug][DP501] If ASPEED P2A (PCI to AHB) bridge is disabled and disallowed for CVE_2019_6260 item3, and then the monitor's EDID is unable read through Parade DP501. The reason is the DP501's FW is mapped to BMC addressing space rather than Host addressing space. The resolution is that using "pci_iomap_range()" maps to DP501's FW that stored on the end of FB (Frame Buffer). In this case, FrameBuffer reserves the last 2MB used for the image of DP501. Signed-off-by: KuoHsiang Chou Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210421085859.17761-1-kuohsiang_chou@aspeedtech.com commit 749da85a9a527c78f35cfa3f918a57644eb12908 Author: Andy Shevchenko Date: Wed Apr 21 19:31:57 2021 +0300 drm/hx8357d: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-7-andriy.shevchenko@linux.intel.com commit d39353c7e5c4fab4faa39c71bbef5d0cbde05787 Author: Andy Shevchenko Date: Wed Apr 21 19:31:56 2021 +0300 drm/ili9225: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-6-andriy.shevchenko@linux.intel.com commit 31c7729d2c79fd0ef7f23e5be5fb851537feaad4 Author: Andy Shevchenko Date: Wed Apr 21 19:31:55 2021 +0300 drm/ili9341: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-5-andriy.shevchenko@linux.intel.com commit e276fbcb10798a8d8bced01e832f14ab21466278 Author: Andy Shevchenko Date: Wed Apr 21 19:31:54 2021 +0300 drm/ili9486: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-4-andriy.shevchenko@linux.intel.com commit db695d191e2306676a5deffe894aa6070f7efb29 Author: Andy Shevchenko Date: Wed Apr 21 19:31:53 2021 +0300 drm/mi0283qt: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-3-andriy.shevchenko@linux.intel.com commit 40567e8b64e59a9e47390994a6e3a5b2ad471e37 Author: Andy Shevchenko Date: Wed Apr 21 19:31:52 2021 +0300 drm/st7586: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-2-andriy.shevchenko@linux.intel.com commit a3204e2e16cc683f6152c8a14316c5282fb620e5 Author: Andy Shevchenko Date: Wed Apr 21 19:31:51 2021 +0300 drm/st7735r: Avoid spamming logs if probe is deferred The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210421163157.50949-1-andriy.shevchenko@linux.intel.com commit 6dd7efc437611db16d432e0030f72d0c7e890127 Author: Bernard Zhao Date: Fri Apr 2 01:55:21 2021 -0700 drm/gud: cleanup coding style a bit Fix coccicheck warning: drivers/gpu/drm/gud/gud_internal.h:89:2-3: Unneeded semicolon drivers/gpu/drm/gud/gud_internal.h:107:2-3: Unneeded semicolon Signed-off-by: Bernard Zhao Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210402085523.76928-1-bernard@vivo.com commit ac69496fe65cca0611d5917b7d232730ff605bc7 Author: Lv Yunlong Date: Mon Apr 26 05:43:40 2021 -0700 drm/i915/gt: Fix a double free in gen8_preallocate_top_level_pdp Our code analyzer reported a double free bug. In gen8_preallocate_top_level_pdp, pde and pde->pt.base are allocated via alloc_pd(vm) with one reference. If pin_pt_dma() failed, pde->pt.base is freed by i915_gem_object_put() with a reference dropped. Then free_pd calls free_px() defined in intel_ppgtt.c, which calls i915_gem_object_put() to put pde->pt.base again. As pde->pt.base is protected by refcount, so the second put will not free pde->pt.base actually. But, maybe it is better to remove the first put? Fixes: 82adf901138cc ("drm/i915/gt: Shrink i915_page_directory's slab bucket") Signed-off-by: Lv Yunlong Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210426124340.4238-1-lyl2019@mail.ustc.edu.cn commit 8804325861be242a420d68c0175127a5947ac35a Author: Gwan-gyeong Mun Date: Thu Apr 22 19:05:44 2021 +0300 drm/i915/display: Disable PSR2 if TGL Display stepping is B1 from A0 TGL PSR2 hardware tracking shows momentary flicker and screen shift if TGL Display stepping is B1 from A0. It has been fixed from TGL Display stepping C0. HSDES: 18015970021 HSDES: 2209313811 BSpec: 55378 v2: Add checking of PSR2 manual tracking (Jose) Cc: José Roberto de Souza Signed-off-by: Gwan-gyeong Mun Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210422160544.2427123-1-gwan-gyeong.mun@intel.com commit 924ad0e848b58cc492373d2d5fe9dcc0da0b9c6c Author: Ville Syrjälä Date: Wed Apr 21 18:34:00 2021 +0300 drm/i915: Give C0DRB3/C1DRB3 a _BW suffix These are the 965g/g45/g33 specific DRB registers. Give them a suitable suffix so we can add their counterparts for other platforms. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421153401.13847-4-ville.syrjala@linux.intel.com commit f765a5b48c667bdada5e49d5e0f23f8c0687b21b Author: Ville Syrjälä Date: Wed Apr 21 18:33:59 2021 +0300 drm/i915: Read C0DRB3/C1DRB3 as 16 bits again We've defined C0DRB3/C1DRB3 as 16 bit registers, so access them as such. Fixes: 1c8242c3a4b2 ("drm/i915: Use unchecked writes for setting up the fences") Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421153401.13847-3-ville.syrjala@linux.intel.com commit ed52c62d386f764194e0184fdb905d5f24194cae Author: Ville Syrjälä Date: Wed Apr 21 18:33:58 2021 +0300 drm/i915: Avoid div-by-zero on gen2 Gen2 tiles are 2KiB in size so i915_gem_object_get_tile_row_size() can in fact return <4KiB, which leads to div-by-zero here. Avoid that. Not sure i915_gem_object_get_tile_row_size() is entirely sane anyway since it doesn't account for the different tile layouts on i8xx/i915... I'm not able to hit this before commit 6846895fde05 ("drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT") and it looks like I also need to run recent version of Mesa. With those in place xonotic trips on this quite easily on my 85x. Cc: stable@vger.kernel.org Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421153401.13847-2-ville.syrjala@linux.intel.com commit d5b5f63cc5b0e7cf9b16b694215bc43fb6b71441 Author: José Roberto de Souza Date: Wed Apr 21 15:02:23 2021 -0700 drm: Rename DP_PSR_SELECTIVE_UPDATE to better mach eDP spec DP_PSR_EN_CFG bit 5 aka "Selective Update Region Scan Line Capture Indication" in eDP spec has a ambiguous name, so renaming to better match specification. While at it, replacing bit shit by BIT() macro and adding the version some registers were added to eDP specification. Cc: Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Acked-by: Daniel Vetter Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210421220224.200729-1-jose.souza@intel.com commit 9ea172a9a3f4a7c5e876469509fc18ddefc7d49d Author: Takashi Iwai Date: Wed Apr 21 19:04:58 2021 +0200 drm/ast: Fix missing conversions to managed API The commit 7cbb93d89838 ("drm/ast: Use managed pci functions") converted a few PCI accessors to the managed API and dropped the manual pci_iounmap() calls, but it seems to have forgotten converting pci_iomap() to the managed one. It resulted in the leftover resources after the driver unbind. Let's fix them. Fixes: 7cbb93d89838 ("drm/ast: Use managed pci functions") Signed-off-by: Takashi Iwai Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210421170458.21178-1-tiwai@suse.de commit 304a351957fccf0b2bb05c8c6e4097e9b1276ace Author: Joseph Kogut Date: Thu Apr 22 19:02:44 2021 -0700 drm: remove legacy drm_pci_alloc/free abstraction The drm_pci_alloc/free abstraction of the dma-api is no longer required, remove it. Signed-off-by: Joseph Kogut Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210423020248.3427369-2-joseph.kogut@gmail.com commit 70556e24e18e61beda069d72f0d5c6172e873f45 Author: Joseph Kogut Date: Thu Apr 22 19:02:43 2021 -0700 drm: remove usage of drm_pci_alloc/free Remove usage of legacy dma-api abstraction in preparation for removal Signed-off-by: Joseph Kogut Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210423020248.3427369-1-joseph.kogut@gmail.com commit 7a6e95f375bb17d917a8213f0cfe9b55b882f342 Author: Imre Deak Date: Wed Apr 21 20:32:20 2021 +0300 drm/i915: Simplify CCS and UV plane alignment handling We can handle the surface alignment of CCS and UV color planes for all modifiers at one place, so do this. An AUX color plane can be a CCS or a UV plane, use only the more specific query functions and remove is_aux_plane() becoming redundant. While at it add a TODO for linear UV color plane alignments. The spec requires this to be stride-in-bytes * 64 on all platforms, whereas the driver uses an alignment of 4k for gen<12 and 256k for gen>=12 for linear UV planes. v2: - Restore previous alignment for linear UV surfaces. Signed-off-by: Imre Deak Reviewed-by: Juha-Pekka Heikkila Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421173220.3587009-1-imre.deak@intel.com commit b83478b698141cc2d1fef78b167d1c2348a9125c Author: zuoqilin Date: Wed Mar 17 15:42:28 2021 +0800 drm/i915/dsi: Fix comment typo Change 'befor' to 'before'. Signed-off-by: zuoqilin [Jani: Fix comment marker placement while applying.] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210317074228.1147-1-zuoqilin1@163.com commit 355b60296143a090039211c5f0e1463f84aab65a Merge: 91185d55b32e7 a1a1ca70deb3e Author: Maxime Ripard Date: Mon Apr 26 14:03:09 2021 +0200 Merge drm/drm-next into drm-misc-next Christian needs some patches from drm/next Signed-off-by: Maxime Ripard commit 91185d55b32e7e377f15fb46a62b216f8d3038d4 Author: Thomas Zimmermann Date: Thu Apr 15 13:00:40 2021 +0200 drm: Remove DRM_KMS_FB_HELPER Kconfig option It's only used by DRM_FBDEV_EMULATION, so inline it there. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-5-tzimmermann@suse.de commit a50e74bec1d17e95275909660c6b43ffe11ebcf0 Author: Thomas Zimmermann Date: Thu Apr 15 13:00:39 2021 +0200 drm/zte: Don't select DRM_KMS_FB_HELPER Selecting DRM_FBDEV_EMULATION will include the correct settings for fbdev emulation. Drivers should not override this. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-4-tzimmermann@suse.de commit 13b29cc3a722c2c0bc9ab9f72f9047d55d08a2f9 Author: Thomas Zimmermann Date: Thu Apr 15 13:00:38 2021 +0200 drm/mxsfb: Don't select DRM_KMS_FB_HELPER Selecting DRM_FBDEV_EMULATION will include the correct settings for fbdev emulation. Drivers should not override this. Signed-off-by: Thomas Zimmermann Acked-by: Stefan Agner Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-3-tzimmermann@suse.de commit 5dbf2fc587cb79cb366bd6e79ac6b52269d64fc5 Author: Thomas Zimmermann Date: Thu Apr 15 13:00:37 2021 +0200 drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION Respect DRM's kconfig setting for fbdev console emulation. If enabled, it will select all required config options. So remove them from vmwgfx's Kconfig file. Signed-off-by: Thomas Zimmermann Reviewed-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210415110040.23525-2-tzimmermann@suse.de commit 655c0ed19772d92c9665ed08bdc5202acc096dda Author: Yingjie Wang Date: Thu Apr 8 17:57:20 2021 -0700 drm/amd/dc: Fix a missing check bug in dm_dp_mst_detect() In dm_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Yingjie Wang Signed-off-by: Alex Deucher commit c6c6a712199ab355ce333fa5764a59506bb107c1 Author: Harry Wentland Date: Thu Apr 22 19:10:52 2021 -0400 drm/amd/display: Reject non-zero src_y and src_x for video planes [Why] This hasn't been well tested and leads to complete system hangs on DCN1 based systems, possibly others. The system hang can be reproduced by gesturing the video on the YouTube Android app on ChromeOS into full screen. [How] Reject atomic commits with non-zero drm_plane_state.src_x or src_y values. v2: - Add code comment describing the reason we're rejecting non-zero src_x and src_y - Drop gerrit Change-Id - Add stable CC - Based on amd-staging-drm-next v3: removed trailing whitespace Signed-off-by: Harry Wentland Cc: stable@vger.kernel.org Cc: nicholas.kazlauskas@amd.com Cc: amd-gfx@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: Roman.Li@amd.com Cc: hersenxs.wu@amd.com Cc: danny.wang@amd.com Reviewed-by: Nicholas Kazlauskas Acked-by: Christian König Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 3dc7216c1d5058f2f809c26cbc44f4dfa440b07e Author: Christian König Date: Thu Apr 22 13:11:39 2021 +0200 drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2 Starting with Vega the hardware supports concurrent flushes of VMID which can be used to implement per process VMID allocation. But concurrent flushes are mutual exclusive with back to back VMID allocations, fix this to avoid a VMID used in two ways at the same time. v2: don't set ring to NULL Signed-off-by: Christian König Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher commit 42daecfc2069da98e084e2e2457be2a3d50b0a30 Author: Nirmoy Das Date: Thu Apr 22 17:20:20 2021 +0200 drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag Remove unused AMDGPU_GEM_CREATE_SHADOW flag. Userspace is never allowed to use this. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cd2454d6cd970d4c8cbf6dfed61ff1f36b65e561 Author: Nirmoy Das Date: Wed Apr 21 18:09:46 2021 +0200 drm/amdgpu: cleanup amdgpu_bo_create() Remove shadow bo related code as vm code is creating shadow bo using proper API. Without shadow bo code, amdgpu_bo_create() is basically a wrapper around amdgpu_bo_do_create(). So rename amdgpu_bo_do_create() to amdgpu_bo_create(). Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit adf6f5c51ea14121e2302fb1b0ab3a90921ede59 Author: Nirmoy Das Date: Thu Apr 22 16:54:01 2021 +0200 drm/amdgpu: create shadow bo using amdgpu_bo_create_shadow() Shadow BOs are only needed for vm code so call amdgpu_bo_create_shadow() directly instead of depending on amdgpu_bo_create(). Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 77df5c131d4d3413acf8da259e3cad22426ff90d Author: Nirmoy Das Date: Thu Apr 22 16:38:58 2021 +0200 drm/amdgpu: remove unused vm context flags Remove unused AMDGPU_VM_CONTEXT_GFX and AMDGPU_VM_CONTEXT_COMPUTE flags. Signed-off-by: Nirmoy Das Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a35455d065c544669d7a80b9bc422ecb9208e282 Author: Nirmoy Das Date: Thu Apr 22 12:53:16 2021 +0200 drm/amdgpu: cleanup amdgpu_vm_init() Currently only way to create compute vm is through amdgpu_vm_make_compute(). So vm_context isn't required anymore for amdgpu_vm_init(). Signed-off-by: Nirmoy Das Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 25e9146ae69ea303234092242514f72b0ccdb40c Author: Nirmoy Das Date: Wed Apr 21 17:27:46 2021 +0200 drm/amdgpu: expose amdgpu_bo_create_shadow() Exposed amdgpu_bo_create_shadow() will be needed for amdgpu_vm handling. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 589939d40116a4d023f667928d751e541719e8fc Author: Christian König Date: Fri Feb 12 10:46:30 2021 +0100 drm/amdgpu: fix coding style and documentation in amdgpu_vram_mgr.c No functional changes, just cleaning up some leftovers and improve documentation. Signed-off-by: Christian König Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit a614b336f1c16d2febcf5ab93d4f9f92f851f0fe Author: Christian König Date: Thu Feb 11 16:32:04 2021 +0100 drm/amdgpu: fix coding style and documentation in amdgpu_gtt_mgr.c Avoid the forward define, fix coding style, add documentation. No functional change. Signed-off-by: Christian König Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit a40eb089b46e082239b3461eaf50f966e5f51e4c Author: Colin Ian King Date: Thu Apr 22 13:44:52 2021 +0100 drm/amdkfd: remove redundant initialization to variable r The variable r is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 65f8db8150ee30623cd6b870d6f836c4339026a5 Author: Colin Ian King Date: Thu Apr 22 13:31:58 2021 +0100 drm/amdkfd: fix uint32 variable compared to less than zero Currently the call to kfd_process_gpuidx_from_gpuid is returning an int value and this is being assigned to a uint32_t variable gpuidx and this is being checked for a negative error return which is always going to be false. Fix this by making gpuidx an int32_t. This makes gpuidx also type consistent with the use of gpuidx from the callers. Addresses-Coverity: ("Unsigned compared against 0") Fixes: cda0f85bfa5e ("drm/amdkfd: refine migration policy with xnack on") Signed-off-by: Colin Ian King Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 63f1af83ae4614314834eab727ad94cd8d4278b0 Author: Alex Sierra Date: Wed Apr 21 13:54:09 2021 -0500 drm/amdkfd: set attribute access for default ranges Attribute access value for default ranges is set, based on process xnack on/off. XNACK ON has GPU access attribute for unregistered ranges through page fault. While XNACK OFF has no access attribute for unregistered ranges. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b19dbb7a90b42e0ba22878e647cfb62e2b09ed13 Author: Alex Sierra Date: Mon Apr 12 13:35:18 2021 -0500 drm/amdkfd: svm ranges creation for unregistered memory SVM ranges are created for unregistered memory, triggered by page faults. These ranges are migrated/mapped to GPU VRAM memory. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 126bbd4ab524160e63725d04e838c0f18c917e11 Author: Alex Sierra Date: Mon Apr 12 13:34:57 2021 -0500 drm/amdgpu: extend xnack limit page fault timeout Extending this timeout will prevent IH from storm interrupts coming from SDMA while a page fault is active. Currently, on Aldebaran, handling that many interrupts can take a lot of CPU time (up to 4 seconds). This eventually causes timeouts in other tasks. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 502f0e28042b4ef271c70f54dc2e4feb230fdb64 Author: Hawking Zhang Date: Thu Apr 22 21:58:08 2021 +0800 drm/amdgpu: disable gfx ras by default in aldebaran aldebaran gfx ras is still under development Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit fd6a440ebc83d3ca3e3699fad6b34c9c523c008b Author: Jonathan Kim Date: Tue Mar 2 11:28:36 2021 -0500 drm/amdkfd: add per-vmid-debug map_process_support In order to support multi-process debugging, HWS PM4 packet MAP_PROCESS requires an extension of 5 DWORDS to support targeting of per-vmid SPI debug control registers as well as watch points per process. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1d712be90a6d8af1d6d693cc936fc103376f7d36 Author: Kenneth Feng Date: Thu Apr 22 17:31:04 2021 +0800 drm/amd/amdgpu: add cgls enable cgls to improve the runtime power efficiency. Signed-off-by: Kenneth Feng Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 19d0dfda4c75a23012dd714e57b4f569df61089d Author: Stanley.Yang Date: Mon Apr 19 11:33:10 2021 +0800 drm/amdgpu: optimize gfx ras features flag clean Signed-off-by: Stanley.Yang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit ef9bcfde9e1f6f3ebefabf2c72d5fd04f9745d9d Author: Jinzhou Su Date: Wed Apr 21 10:59:13 2021 +0800 drm/amdgpu: Enable SDMA MGCG for Vangogh Add flags AMD_CG_SUPPORT_SDMA_MGCG for Vangogh. Start to open sdma mgcg from firmware version 70. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7e882aee845fa11da043a2e7f872551763b3a9dc Author: John Clements Date: Wed Apr 21 15:01:54 2021 +0800 drm/amdgpu: add support for ras init flags conditionally configure ras for dgpu mode or poison propogation mode Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 6effe779726738ea06ba4454e127ab953ce3848c Author: Dennis Li Date: Wed Apr 21 12:50:22 2021 +0800 drm/amdgpu: refine gprs init shaders to check coverage Add codes to check whether all SIMDs are covered, make sure that all GPRs are initialized. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 38f46186b11b58f4ef7e5ba768d246d433395410 Author: José Roberto de Souza Date: Wed Apr 21 15:02:24 2021 -0700 drm/i915/display/xelpd: Do not program EDP_Y_COORDINATE_ENABLE EDP_Y_COORDINATE_ENABLE became a reserved register in display 13. EDP_Y_COORDINATE_VALID have the same fate as EDP_Y_COORDINATE_ENABLE but as we don't need it, removing the macro definition of it. BSpec: 50422 Cc: Gwan-gyeong Mun Cc: Anusha Srivatsa Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210421220224.200729-2-jose.souza@intel.com commit c777dc9e793342ecdfc95045d2127a3ea32791a0 Author: Christian König Date: Fri Feb 5 16:17:07 2021 +0100 drm/ttm: move the page_alignment into the BO v2 The alignment is a constant property and shouldn't change. v2: move documentation as well as suggested by Matthew. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-4-christian.koenig@amd.com commit 65747ded86b4608387d5618d14f0fe9dc88e17ea Author: Christian König Date: Fri Feb 12 10:28:37 2021 +0100 drm/ttm: minor range manager coding style clean ups No functional changes, just removing the leftovers from the redesign. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-3-christian.koenig@amd.com commit d02117f8efaa5fbc37437df1ae955a147a2a424a Author: Christian König Date: Sat Apr 17 19:09:30 2021 +0200 drm/ttm: remove special handling for non GEM drivers vmwgfx is the only driver actually using this. Move the handling into the driver instead. Signed-off-by: Christian König Acked-by: Huang Rui Reviewed-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210419092853.1605-1-christian.koenig@amd.com commit 13ea9aa1e7d891e950230e82f1dd2c84e5debcff Author: Shiwu Zhang Date: Thu Apr 22 16:37:49 2021 +0800 drm/ttm: fix error handling if no BO can be swapped out v4 In case that all pre-allocated BOs are busy, just continue to populate BOs since likely half of system memory in total is still free. v4 (chk): fix code moved to VMWGFX as well Signed-off-by: Shiwu Zhang Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210422115757.3946-1-christian.koenig@amd.com commit f1f7f5538b9f96bb42be5df0349c7e4ef7ff7a64 Author: Maarten Lankhorst Date: Wed Apr 21 14:03:53 2021 +0200 drm/i915: Fix docbook descriptions for i915_cmd_parser Fixes the following htmldocs warnings: drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser' drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser' drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser' drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' Reported-by: Stephen Rothwell Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20210421120353.544518-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter commit 772f7bb75dffd4ec90eaf411f9e09dc2429f5c81 Author: Maarten Lankhorst Date: Wed Apr 21 14:09:38 2021 +0200 drm/i915: Fix docbook descriptions for i915_gem_shrinker Fixes the following htmldocs warning: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink' Fixes: cf41a8f1dc1e ("drm/i915: Finally remove obj->mm.lock.") Reported-by: Stephen Rothwell Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20210421120938.546076-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter commit ae053fa234f42b4abc582372af7410ad0e3e1dad Author: Sia Jee Heng Date: Thu Apr 22 14:40:15 2021 +0800 drm: bridge: adv7511: Support I2S IEC958 encoded PCM format Support IEC958 encoded PCM format for ADV7511 so that ADV7511 HDMI audio driver can accept the IEC958 data from the I2S input. Signed-off-by: Sia Jee Heng Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210422064015.15285-1-jee.heng.sia@intel.com commit 178bdba84c5f0ad14de384fc7f15fba0e272919d Author: Lee Jones Date: Fri Apr 16 15:37:12 2021 +0100 drm/ttm/ttm_device: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_device.c:42: warning: Function parameter or member 'ttm_global_mutex' not described in 'DEFINE_MUTEX' drivers/gpu/drm/ttm/ttm_device.c:42: warning: expecting prototype for ttm_global_mutex(). Prototype was for DEFINE_MUTEX() instead drivers/gpu/drm/ttm/ttm_device.c:112: warning: Function parameter or member 'ctx' not described in 'ttm_global_swapout' drivers/gpu/drm/ttm/ttm_device.c:112: warning: Function parameter or member 'gfp_flags' not described in 'ttm_global_swapout' drivers/gpu/drm/ttm/ttm_device.c:112: warning: expecting prototype for A buffer object shrink method that tries to swap out the first(). Prototype was for ttm_global_swapout() instead Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Link: https://patchwork.freedesktop.org/patch/msgid/20210416143725.2769053-28-lee.jones@linaro.org Reviewed-by: Christian König Signed-off-by: Christian König commit 04be0c5b40a3dce3e4790aa507d0029a7d31c0b2 Author: Lee Jones Date: Fri Apr 16 15:37:09 2021 +0100 drm/scheduler/sched_entity: Fix some function name disparity Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/scheduler/sched_entity.c:204: warning: expecting prototype for drm_sched_entity_kill_jobs(). Prototype was for drm_sched_entity_kill_jobs_cb() instead drivers/gpu/drm/scheduler/sched_entity.c:262: warning: expecting prototype for drm_sched_entity_cleanup(). Prototype was for drm_sched_entity_fini() instead drivers/gpu/drm/scheduler/sched_entity.c:305: warning: expecting prototype for drm_sched_entity_fini(). Prototype was for drm_sched_entity_destroy() instead Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Link: https://patchwork.freedesktop.org/patch/msgid/20210416143725.2769053-25-lee.jones@linaro.org Reviewed-by: Christian König Signed-off-by: Christian König commit 089fae1e3fe80d47e45bd729039d9c0aac83995b Author: Lee Jones Date: Fri Apr 16 15:37:08 2021 +0100 drm/ttm/ttm_bo: Fix incorrectly documented function 'ttm_bo_cleanup_refs' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_bo.c:293: warning: expecting prototype for function ttm_bo_cleanup_refs(). Prototype was for ttm_bo_cleanup_refs() instead Cc: Christian Koenig Cc: Huang Rui Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Link: https://patchwork.freedesktop.org/patch/msgid/20210416143725.2769053-24-lee.jones@linaro.org Reviewed-by: Christian König Signed-off-by: Christian König commit c83b5eeffbbb32b105a85a86eb1443872073717f Author: Beatriz Martins de Carvalho Date: Wed Apr 21 20:42:49 2021 +0100 drm: drm_connector.c: Use tabs for code indents Remove space and use tabs for indent the code to follow the Linux kernel coding conventions. Problem found by checkpatch Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/0200474fbdb1149856308bccb8e467415f0b3d99.1618828127.git.martinsdecarvalhobeatriz@gmail.com commit 6d3fb7a88d7d97da6e153b9a335afd4b64812093 Author: Beatriz Martins de Carvalho Date: Mon Apr 19 11:44:18 2021 +0100 drm: drm_blend.c: Use tabs for code indents Remove space and use tabs for indent the code to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/f441188f84aac2f9f72f36a42c88623b16cd1f87.1618828127.git.martinsdecarvalhobeatriz@gmail.com commit e8b0587699a00b2626110cf90303339cb9c4bf26 Author: Beatriz Martins de Carvalho Date: Mon Apr 19 11:44:17 2021 +0100 drm: drm_atomic_uapi.c: Use tabs for code indents Remove space and use tabs for indent the code to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/dc8286f5590fff609f924845fb622dd5f962a11b.1618828127.git.martinsdecarvalhobeatriz@gmail.com commit f0ce78e2f084895d54cc6b6ee530191eb355b196 Author: Beatriz Martins de Carvalho Date: Sun Apr 18 15:48:25 2021 +0100 drm: drm_context.c: Adjust end of block comment Add a new line with */ on the last line of a block comment to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/341b1ae1475fad22035cf3ff11df73cd49063d4c.1618756333.git.martinsdecarvalhobeatriz@gmail.com commit c2ce66dad6da5d9ade885d03118dba90c4633eb0 Author: Beatriz Martins de Carvalho Date: Sun Apr 18 15:48:24 2021 +0100 drm: drm_connector.c: Adjust end of block comment Add a new line with */ on the last line of a block comment to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/59abdb2d65a643d5937e5773db684b926e8c9233.1618756333.git.martinsdecarvalhobeatriz@gmail.com commit ad6ce32a81e438e704e8e03f623cdabd1661797b Author: Beatriz Martins de Carvalho Date: Sun Apr 18 15:48:23 2021 +0100 drm: drm_bufs.c: Adjust end of block comment Add a new line with */ on the last line of a block comment to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/c3a261994b88f6fc39f69ee8c1af8ab115d76a87.1618756333.git.martinsdecarvalhobeatriz@gmail.com commit d00e3d9e0fdcb83d55f49d669b752c6c01fe99e8 Author: Beatriz Martins de Carvalho Date: Sun Apr 18 15:48:22 2021 +0100 drm: drm_auth.c: Adjust end of block comment Add a new line with */ on the last line of a block comment to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/cd1e8f6637b914825ee4b9643a4e9d9eba49f276.1618756333.git.martinsdecarvalhobeatriz@gmail.com commit 060726c593f54c0203a99c0218c6a304e62ef21a Author: Beatriz Martins de Carvalho Date: Sun Apr 18 15:48:21 2021 +0100 drm: drm_atomic.c: Adjust end of block comment Add a new line with */ on the last line of a block comment to follow the Linux kernel coding conventions. Problem found by checkpatch. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/387b6b852a72d6a98133cead5e4d0e3c39dd5094.1618756333.git.martinsdecarvalhobeatriz@gmail.com commit ae7f0dc105c4e5248e6e2e2299e52d9a289e1215 Author: Matthew Auld Date: Wed Apr 21 11:46:58 2021 +0100 drm/i915/stolen: actually mark as contiguous Stolen memory is always allocated as physically contiguous pages, so mark the object flags as such. It looks like the flags were previously just ignored so this had no effect. In the future we might to add the proper plumbing for passing the flags all over the way down from the caller, but for now we don't have a use for that. Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210421104658.304142-4-matthew.auld@intel.com commit f9a7b01e95d5e6c3f79f0efbbbbb2bbc52a8f3ce Author: CQ Tang Date: Wed Apr 21 11:46:57 2021 +0100 drm/i915/stolen: enforce the min_page_size contract Since stolen can now be device local-memory underneath, we should try to enforce any min_page_size restrictions when allocating pages. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210421104658.304142-3-matthew.auld@intel.com commit b75947e6b29d5b33f79d7b3918747592534e3fb1 Author: Matthew Auld Date: Wed Apr 21 11:46:56 2021 +0100 drm/i915/stolen: treat stolen local as normal local memory Underneath it's the same stuff, so things like the PTE_LM bits for the GTT should just keep working as-is. Signed-off-by: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210421104658.304142-2-matthew.auld@intel.com commit d57d4a1daf5e8393e87244427c9b87dd565bd37c Author: CQ Tang Date: Wed Apr 21 11:46:55 2021 +0100 drm/i915: Create stolen memory region from local memory Add "REGION_STOLEN" device info to dg1, create stolen memory region from upper portion of local device memory, starting from DSMBASE. v2: - s/drm_info/drm_dbg; userspace likely doesn't care about stolen. - mem->type is only setup after the region probe, so setting the name as stolen-local or stolen-system based on this value won't work. Split system vs local stolen setup to fix this. - kill all the region->devmem/is_devmem stuff. We already differentiate the different types of stolen so such things shouldn't be needed anymore. v3: - split stolen lmem vs smem ops(Tvrtko) - add shortcut for stolen region in i915(Tvrtko) - sanity check dsm base vs bar size(Xinyun) v4(Tvrtko): - more cleanup - add some TODOs Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Cc: Xinyun Liu Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210421104658.304142-1-matthew.auld@intel.com commit bbbb6fdaa3ce083b1ca9ea9f774c22da9a5dafde Author: Daniel Vetter Date: Wed Apr 21 17:29:11 2021 +0200 drm/todo: Add link to old debugfs RFC I always forget where it was, store it until this gets picked up by an internship again. Cc: Wambui Karuga Cc: Melissa Wen Acked-by: Melissa Wen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210421152911.1871473-1-daniel.vetter@ffwll.ch commit 1ce1af845450de5c231adb42161c14a8e87d1bdd Author: Krzysztof Kozlowski Date: Mon Apr 19 10:18:07 2021 +0200 drm/gma500: remove trailing whitespaces Remove trailing whitespaces. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-2-krzysztof.kozlowski@canonical.com commit 866604bbfc9214e17076cc96df900b521e205a51 Author: Krzysztof Kozlowski Date: Mon Apr 19 10:18:06 2021 +0200 drm/gma500: correct kerneldoc Correct kerneldoc (remove wrong /** marker and adjust function name) to fix W=1 warnings: drivers/gpu/drm/gma500/cdv_intel_lvds.c:27: warning: expecting prototype for LVDS I2C backlight control macros(). Prototype was for BRIGHTNESS_MAX_LEVEL() instead drivers/gpu/drm/gma500/intel_gmbus.c:386: warning: expecting prototype for intel_gmbus_setup(). Prototype was for gma_intel_setup_gmbus() instead Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-1-krzysztof.kozlowski@canonical.com commit dc09b30969fd1cf4b9a9c8075d62efeb2303b9b7 Author: Rodrigo Vivi Date: Wed Apr 21 05:44:06 2021 -0400 drm/i915/dmc: Let's abstract the dmc path. Although this abstraction removes the convenience of grepping for the file name, it: - makes addition easier. - makes it easier to tweak global path when experiments are needed. - get in sync with guc/huc, without getting overly abstracted. - allows future junction with CSR_VERSION for simplicity. - Enforces dmc file will never change this standard. v2: define DMC_PATH inside .c (Lucas) Cc: Fei Yang Cc: Jani Nikula Cc: Lucas De Marchi Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza #v1 Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210421094406.2017733-1-rodrigo.vivi@intel.com commit f183324133ea535db4127f9fad3e19725ca88bf3 Author: Roman Gushchin Date: Wed Apr 7 20:57:36 2021 -0700 percpu: implement partial chunk depopulation From Roman ("percpu: partial chunk depopulation"): In our [Facebook] production experience the percpu memory allocator is sometimes struggling with returning the memory to the system. A typical example is a creation of several thousands memory cgroups (each has several chunks of the percpu data used for vmstats, vmevents, ref counters etc). Deletion and complete releasing of these cgroups doesn't always lead to a shrinkage of the percpu memory, so that sometimes there are several GB's of memory wasted. The underlying problem is the fragmentation: to release an underlying chunk all percpu allocations should be released first. The percpu allocator tends to top up chunks to improve the utilization. It means new small-ish allocations (e.g. percpu ref counters) are placed onto almost filled old-ish chunks, effectively pinning them in memory. This patchset solves this problem by implementing a partial depopulation of percpu chunks: chunks with many empty pages are being asynchronously depopulated and the pages are returned to the system. To illustrate the problem the following script can be used: -- cd /sys/fs/cgroup mkdir percpu_test echo "+memory" > percpu_test/cgroup.subtree_control cat /proc/meminfo | grep Percpu for i in `seq 1 1000`; do mkdir percpu_test/cg_"${i}" for j in `seq 1 10`; do mkdir percpu_test/cg_"${i}"_"${j}" done done cat /proc/meminfo | grep Percpu for i in `seq 1 1000`; do for j in `seq 1 10`; do rmdir percpu_test/cg_"${i}"_"${j}" done done sleep 10 cat /proc/meminfo | grep Percpu for i in `seq 1 1000`; do rmdir percpu_test/cg_"${i}" done rmdir percpu_test -- It creates 11000 memory cgroups and removes every 10 out of 11. It prints the initial size of the percpu memory, the size after creating all cgroups and the size after deleting most of them. Results: vanilla: ./percpu_test.sh Percpu: 7488 kB Percpu: 481152 kB Percpu: 481152 kB with this patchset applied: ./percpu_test.sh Percpu: 7488 kB Percpu: 481408 kB Percpu: 135552 kB The total size of the percpu memory was reduced by more than 3.5 times. This patch: This patch implements partial depopulation of percpu chunks. As of now, a chunk can be depopulated only as a part of the final destruction, if there are no more outstanding allocations. However to minimize a memory waste it might be useful to depopulate a partially filed chunk, if a small number of outstanding allocations prevents the chunk from being fully reclaimed. This patch implements the following depopulation process: it scans over the chunk pages, looks for a range of empty and populated pages and performs the depopulation. To avoid races with new allocations, the chunk is previously isolated. After the depopulation the chunk is sidelined to a special list or freed. New allocations prefer using active chunks to sidelined chunks. If a sidelined chunk is used, it is reintegrated to the active lists. The depopulation is scheduled on the free path if the chunk is all of the following: 1) has more than 1/4 of total pages free and populated 2) the system has enough free percpu pages aside of this chunk 3) isn't the reserved chunk 4) isn't the first chunk If it's already depopulated but got free populated pages, it's a good target too. The chunk is moved to a special slot, pcpu_to_depopulate_slot, chunk->isolated is set, and the balance work item is scheduled. On isolation, these pages are removed from the pcpu_nr_empty_pop_pages. It is constantly replaced to the to_depopulate_slot when it meets these qualifications. pcpu_reclaim_populated() iterates over the to_depopulate_slot until it becomes empty. The depopulation is performed in the reverse direction to keep populated pages close to the beginning. Depopulated chunks are sidelined to preferentially avoid them for new allocations. When no active chunk can suffice a new allocation, sidelined chunks are first checked before creating a new chunk. Signed-off-by: Roman Gushchin Co-developed-by: Dennis Zhou Signed-off-by: Dennis Zhou Tested-by: Pratik Sampat Signed-off-by: Dennis Zhou commit 1c29a3ceaf5f02919e0a89119a70382581453dbb Author: Dennis Zhou Date: Sun Apr 18 22:44:16 2021 +0000 percpu: use pcpu_free_slot instead of pcpu_nr_slots - 1 This prepares for adding a to_depopulate list and sidelined list after the free slot in the set of lists in pcpu_slot. Signed-off-by: Dennis Zhou Acked-by: Roman Gushchin Signed-off-by: Dennis Zhou commit 8ea2e1e35d1eb4c76290ff5d565a1bfd6c24f117 Author: Roman Gushchin Date: Wed Apr 7 20:57:35 2021 -0700 percpu: factor out pcpu_check_block_hint() Factor out the pcpu_check_block_hint() helper, which will be useful in the future. The new function checks if the allocation can likely fit within the contig hint. Signed-off-by: Roman Gushchin Signed-off-by: Dennis Zhou Signed-off-by: Dennis Zhou commit acca7762eb71bc05a8f28d29320d193150051f79 Author: Kai-Heng Feng Date: Wed Apr 21 13:20:31 2021 +0800 drm/i915/dp: Use slow and wide link training for everything Screen flickers on Innolux eDP 1.3 panel when clock rate 540000 is in use. According to the panel vendor, though clock rate 540000 is advertised, but the max clock rate it really supports is 270000. Ville Syrjälä mentioned that fast and narrow also breaks some eDP 1.4 panel, so use slow and wide training for all panels to resolve the issue. User also confirmed that the new strategy doesn't introduce any regression on XPS 9380. v2: - Use slow and wide for everything. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3384 References: https://gitlab.freedesktop.org/drm/intel/-/issues/272 Signed-off-by: Kai-Heng Feng Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421052054.1434718-1-kai.heng.feng@canonical.com commit f60d7270c8a3d2beb1c23ae0da42497afa3584c2 Author: Andy Shevchenko Date: Tue Apr 20 19:44:25 2021 +0300 spi: Avoid undefined behaviour when counting unused native CSs ffz(), that has been used to count unused native CSs, might cause undefined behaviour when called against ~0U. To fix that, open code it with ffs(~value) - 1. Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with cs-gpios") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210420164425.40287-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit dbaca8e56ea3f23fa215f48c2d46dd03ede06e02 Author: Andy Shevchenko Date: Tue Apr 20 19:44:24 2021 +0300 spi: Allow to have all native CSs in use along with GPIOs The commit 7d93aecdb58d ("spi: Add generic support for unused native cs with cs-gpios") excludes the valid case for the controllers that doesn't need to switch native CS in order to perform the transfer, i.e. when 0 native ... ... - 1 native GPIO + 1 GPIO ... ... where defines maximum of native CSs supported by the controller. To allow this, bail out from spi_get_gpio_descs() conditionally for the controllers which explicitly marked with SPI_MASTER_GPIO_SS. Fixes: 7d93aecdb58d ("spi: Add generic support for unused native cs with cs-gpios") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210420164425.40287-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 0e793ba77c18382f08e440260fe72bc6fce2a3cb Author: Charles Keepax Date: Wed Apr 21 11:14:02 2021 +0100 spi: Make of_register_spi_device also set the fwnode Currently, the SPI core doesn't set the struct device fwnode pointer when it creates a new SPI device. This means when the device is registered the fwnode is NULL and the check in device_add which sets the fwnode->dev pointer is skipped. This wasn't previously an issue, however these two patches: commit 4731210c09f5 ("gpiolib: Bind gpio_device to a driver to enable fw_devlink=on by default") commit ced2af419528 ("gpiolib: Don't probe gpio_device if it's not the primary device") Added some code to the GPIO core which relies on using that fwnode->dev pointer to determine if a driver is bound to the fwnode and if not bind a stub GPIO driver. This means the GPIO providers behind SPI will get both the expected driver and this stub driver causing the stub driver to fail if it attempts to request any pin configuration. For example on my system: madera-pinctrl madera-pinctrl: pin gpio5 already requested by madera-pinctrl; cannot claim for gpiochip3 madera-pinctrl madera-pinctrl: pin-4 (gpiochip3) status -22 madera-pinctrl madera-pinctrl: could not request pin 4 (gpio5) from group aif1 on device madera-pinctrl gpio_stub_drv gpiochip3: Error applying setting, reverse things back gpio_stub_drv: probe of gpiochip3 failed with error -22 The firmware node on the device created by the GPIO framework is set through the of_node pointer hence things generally actually work, however that fwnode->dev is never set, as the check was skipped at device_add time. This fix appears to match how the I2C subsystem handles the same situation. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210421101402.8468-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit f05ca108672295851cab99ac8e4ed7e8b8b38ff9 Author: Phong LE Date: Mon Apr 19 09:12:23 2021 +0200 MAINTAINERS: add it66121 HDMI bridge driver entry Add Neil Armstrong and myself as maintainers Signed-off-by: Phong LE Signed-off-by: Neil Armstrong Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210419071223.2673533-4-narmstrong@baylibre.com commit 988156dc2fc9f260f4296633e47ec9cf0c61a498 Author: Phong LE Date: Mon Apr 19 09:12:22 2021 +0200 drm: bridge: add it66121 driver This commit is a simple driver for bridge HMDI it66121. The input format is RBG and there is no color conversion. Audio, HDCP and CEC are not supported yet. Signed-off-by: Phong LE Signed-off-by: Neil Armstrong Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210419071223.2673533-3-narmstrong@baylibre.com commit b7745a160a23d9bcaf5bb7a6b3b1a586e8f12e2b Author: Phong LE Date: Mon Apr 19 09:12:21 2021 +0200 dt-bindings: display: bridge: add it66121 bindings Add the ITE bridge HDMI it66121 bindings. Signed-off-by: Phong LE Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210419071223.2673533-2-narmstrong@baylibre.com commit c256af0d6c1846db9af357a913b277b566ca3797 Author: Matt Roper Date: Tue Apr 20 14:18:42 2021 +0100 drm/i915/lmem: Fail driver init if LMEM training failed Boot firmware performs memory training and health assessment during startup. If the memory training fails, the firmware will consider the GPU unusable and will instruct the punit to keep the GT powered down. If this happens, our driver will be unable to communicate with the GT (all GT registers will read back as 0, forcewake requests will timeout, etc.) so we should abort driver initialization if this happens. We can confirm that LMEM was initialized successfully via sgunit register GU_CNTL. Bspec: 53111 Signed-off-by: Matt Roper Cc: Caz Yokoyama Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210420131842.164163-5-matthew.auld@intel.com commit 0c1a77cbdafb0e1874a42284479f3d6023b91f90 Author: Matthew Auld Date: Mon Apr 19 11:57:39 2021 +0100 drm/doc: add section for driver uAPI Add section for drm/i915 uAPI and pull in i915_drm.h. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210419105741.27844-2-matthew.auld@intel.com commit 5b11705608898c31a1cae5340555ee60d5a4fa45 Author: Hsin-Yi Wang Date: Tue Apr 20 16:08:53 2021 +0300 drm/i915/selftests: Rename pm_ prefixed functions names pm_resume and pm_suspend might be conflict with the ones defined in include/linux/suspend.h. Rename all pm_* to igt_pm_* in selftests since they are only used here. v2 by Jani: - Use igt_ prefix instead of i915_ to avoid colliding with existing i915_pm_* functions - Rename all pm_ prefixed functions in the file Signed-off-by: Hsin-Yi Wang Reported-by: kernel test robot Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210420130853.10573-1-jani.nikula@intel.com commit 3bffd71debc68feb571bf6e81be286675acbb972 Author: Lee Jones Date: Fri Apr 16 15:37:20 2021 +0100 drm/amd/amdgpu/amdgpu_cs: Repair some function naming disparity Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:685: warning: expecting prototype for cs_parser_fini(). Prototype was for amdgpu_cs_parser_fini() instead drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1502: warning: expecting prototype for amdgpu_cs_wait_all_fence(). Prototype was for amdgpu_cs_wait_all_fences() instead drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1656: warning: expecting prototype for amdgpu_cs_find_bo_va(). Prototype was for amdgpu_cs_find_mapping() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 03691f55028a93da0d979737950823e24e473961 Author: Lee Jones Date: Fri Apr 16 15:37:18 2021 +0100 drm/amd/amdgpu/amdgpu_ring: Provide description for 'sched_score' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:169: warning: Function parameter or member 'sched_score' not described in 'amdgpu_ring_init' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 27aa4a69b4ac61c2e1c8263ac2e4851db8d706e9 Author: Lee Jones Date: Fri Apr 16 15:37:17 2021 +0100 drm/amd/amdgpu/amdgpu_ttm: Fix incorrectly documented function 'amdgpu_ttm_copy_mem_to_mem()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:311: warning: expecting prototype for amdgpu_copy_ttm_mem_to_mem(). Prototype was for amdgpu_ttm_copy_mem_to_mem() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 777d9000d91b8ac92e55b6ab8496890fbcbbdf73 Author: Lee Jones Date: Fri Apr 16 15:37:16 2021 +0100 drm/amd/amdgpu/amdgpu_gart: Correct a couple of function names in the docs Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:73: warning: expecting prototype for amdgpu_dummy_page_init(). Prototype was for amdgpu_gart_dummy_page_init() instead drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:96: warning: expecting prototype for amdgpu_dummy_page_fini(). Prototype was for amdgpu_gart_dummy_page_fini() instead Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Nirmoy Das Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b16cc4bb1abbe3c725228f4020f9ebd8ea1d1188 Author: Lee Jones Date: Fri Apr 16 15:37:14 2021 +0100 drm/amd/amdgpu/amdgpu_fence: Provide description for 'sched_score' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:444: warning: Function parameter or member 'sched_score' not described in 'amdgpu_fence_driver_init_ring' Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jerome Glisse Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit d3da76aa770bf2fe523f2d3365dfb4d0c11fdaf6 Author: Lee Jones Date: Fri Apr 16 15:37:10 2021 +0100 drm/radeon/radeon_device: Provide function name in kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/radeon_device.c:1101: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Christian König Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2196927bcb4f4ed45bd1e6d44c1c8f805d984173 Author: Lee Jones Date: Fri Apr 16 15:37:11 2021 +0100 drm/amd/amdgpu/amdgpu_device: Remove unused variable 'r' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function ‘amdgpu_device_suspend’: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3733:6: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4ab159d2547c26b34a4ff4770598b72660da1461 Author: Felix Kuehling Date: Mon Mar 29 18:49:12 2021 -0400 drm/amdkfd: Add CONFIG_HSA_AMD_SVM Control whether to build SVM support into amdgpu with a Kconfig option. This makes it easier to disable it in production kernels if this new feature causes problems in production environments. Use "depends on" instead of "select" for DEVICE_PRIVATE, as is recommended for visible options. Reviewed-by: Philip Yang Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4c166eb95decf03cfee42d03b42145513a15554a Author: Philip Yang Date: Wed Dec 9 21:51:50 2020 -0500 drm/amdkfd: Add SVM API support capability bits SVMAPISupported property added to HSA_CAPABILITY, the value match HSA_CAPABILITY defined in Thunk spec: SVMAPISupported: it will not be supported on older kernels that don't have HMM or on systems with GFXv8 or older GPUs without support for 48-bit virtual addresses. CoherentHostAccess property added to HSA_MEMORYPROPERTY, the value match HSA_MEMORYPROPERTY defined in Thunk spec: CoherentHostAccess: whether or not device memory can be coherently accessed by the host CPU. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1a3b2b5dca1924f2e7eae618ad79471c4a253236 Author: Felix Kuehling Date: Wed Feb 24 23:57:33 2021 -0500 drm/amdkfd: multiple gpu migrate vram to vram If prefetch range to gpu with acutal location is another gpu, or GPU retry fault restore pages to migrate the range with acutal location is gpu, then migrate from one gpu to another gpu. Use system memory as bridge because sdma engine may not able to access another gpu vram, use sdma of source gpu to migrate to system memory, then use sdma of destination gpu to migrate from system memory to gpu. Print out gpuid or gpuidx in debug messages. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 564d2b92c7d4569cdc76a08fd700de1309faa5e8 Author: Felix Kuehling Date: Wed Feb 24 23:55:27 2021 -0500 drm/amdkfd: add svm range validate timestamp With xnack on, add validate timestamp in order to handle GPU vm fault from multiple GPUs. If GPU retry fault need migrate the range to the best restore location, use range validate timestamp to record system timestamp after range is restored to update GPU page table. Because multiple pages of same range have multiple retry fault, define AMDGPU_SVM_RANGE_RETRY_FAULT_PENDING to the long time period that pending retry fault may still comes after page table update, to skip duplicate retry fault of same range. If difference between system timestamp and range last validate timestamp is bigger than AMDGPU_SVM_RANGE_RETRY_FAULT_PENDING, that means the retry fault is from another GPU, then continue to handle retry fault recover. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit cda0f85bfa5e5fddc51b94cfd6680c6697707a89 Author: Felix Kuehling Date: Wed Feb 24 23:46:28 2021 -0500 drm/amdkfd: refine migration policy with xnack on With xnack on, GPU vm fault handler decide the best restore location, then migrate range to the best restore location and update GPU mapping to recover the GPU vm fault. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 485bea1f90b3347bb5c1f8adad533f14d8d8ff1c Author: Alex Sierra Date: Tue Jul 28 16:03:05 2020 -0500 drm/amdgpu: add svm_bo eviction to enable_signal cb Add to amdgpu_amdkfd_fence.enable_signal callback, support for svm_bo fence eviction. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5f319c5c21b5909abb43d8aadc92a8aa549ee443 Author: Alex Sierra Date: Tue Jul 28 16:04:41 2020 -0500 drm/amdgpu: svm bo enable_signal call condition [why] To support svm bo eviction mechanism. [how] If the BO crated has AMDGPU_AMDKFD_CREATE_SVM_BO flag set, enable_signal callback will be called inside amdgpu_evict_flags. This also causes gutting of the BO by removing all placements, so that TTM won't actually do an eviction. Instead it will discard the memory held by the BO. This is needed for HMM migration to user mode system memory pages. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit b41896e3eeb5cfb9f906f5d72d9b9c735dc234d4 Author: Felix Kuehling Date: Wed Feb 24 23:24:53 2021 -0500 drm/amdkfd: add svm_bo eviction mechanism support svm_bo eviction mechanism is different from regular BOs. Every SVM_BO created contains one eviction fence and one worker item for eviction process. SVM_BOs can be attached to one or more pranges. For SVM_BO eviction mechanism, TTM will start to call enable_signal callback for every SVM_BO until VRAM space is available. Here, all the ttm_evict calls are synchronous, this guarantees that each eviction has completed and the fence has signaled before it returns. Signed-off-by: Alex Sierra Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit f04c79cfba7e01db060d17c8d46f23cf8e02845a Author: Alex Sierra Date: Tue Jul 28 13:38:29 2020 -0500 drm/amdgpu: add param bit flag to create SVM BOs Add CREATE_SVM_BO define bit for SVM BOs. Another define flag was moved to concentrate these KFD type flags in one include file. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit eb2cec5537bbab46a319b4b0bcd71c320c382d2b Author: Alex Sierra Date: Tue Jul 28 13:35:32 2020 -0500 drm/amdkfd: add svm_bo reference for eviction fence [why] As part of the SVM functionality, the eviction mechanism used for SVM_BOs is different. This mechanism uses one eviction fence per prange, instead of one fence per kfd_process. [how] A svm_bo reference to amdgpu_amdkfd_fence to allow differentiate between SVM_BO or regular BO evictions. This also include modifications to set the reference at the fence creation call. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit ea53af8a59c89b1bb6743d0956da53eee4cb4cd2 Author: Alex Sierra Date: Mon May 11 22:01:24 2020 -0500 drm/amdkfd: SVM API call to restore page tables Use SVM API to restore page tables when retry fault and compute context are enabled. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2383f56bbe4ae1460d11ae77b93c1730c4a20c26 Author: Felix Kuehling Date: Wed Feb 24 23:02:21 2021 -0500 drm/amdkfd: page table restore through svm API Page table restore implementation in SVM API. This is called from the fault handler at amdgpu_vm. To update page tables through the page fault retry IH. Signed-off-by: Alex Sierra Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9dd9cc2f7433cdf389049c91c87c09eaccece373 Author: Alex Sierra Date: Fri Jan 15 17:03:18 2021 -0600 drm/amdgpu: enable 48-bit IH timestamp counter By default this timestamp is 32 bit counter. It gets overflowed in around 10 minutes. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Philip Yang Signed-off-by: Alex Deucher commit 90d7d3eda5796fa48048f1114b0aa090c5465d17 Author: Felix Kuehling Date: Wed Feb 24 22:34:11 2021 -0500 drm/amdkfd: invalidate tables on page retry fault GPU page tables are invalidated by unmapping prange directly at the mmu notifier, when page fault retry is enabled through amdgpu_noretry global parameter. The restore page table is performed at the page fault handler. If xnack is on, we update GPU mappings after migration to avoid unnecessary GPUVM faults. Signed-off-by: Alex Sierra Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 48ff079b28d82dbce000cc45c0fd35b6ae9ffbda Author: Felix Kuehling Date: Wed Mar 17 00:24:12 2021 -0400 drm/amdkfd: HMM migrate vram to ram If CPU page fault happens, HMM pgmap_ops callback migrate_to_ram start migrate memory from vram to ram in steps: 1. migrate_vma_pages get vram pages, and notify HMM to invalidate the pages, HMM interval notifier callback evict process queues 2. Allocate system memory pages 3. Use svm copy memory to migrate data from vram to ram 4. migrate_vma_pages copy pages structure from vram pages to ram pages 5. Return VM_FAULT_SIGBUS if migration failed, to notify application 6. migrate_vma_finalize put vram pages, page_free callback free vram pages and vram nodes 7. Restore work wait for migration is finished, then update GPU page table mapping to system memory, and resume process queues Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0b0e518d61af8e1cb73cbbfb313b215640c8a6f3 Author: Felix Kuehling Date: Wed Feb 24 20:40:20 2021 -0500 drm/amdkfd: HMM migrate ram to vram Register svm range with same address and size but perferred_location is changed from CPU to GPU or from GPU to CPU, trigger migration the svm range from ram to vram or from vram to ram. If svm range prefetch location is GPU with flags KFD_IOCTL_SVM_FLAG_HOST_ACCESS, validate the svm range on ram first, then migrate it from ram to vram. After migrating to vram is done, CPU access will have cpu page fault, page fault handler migrate it back to ram and resume cpu access. Migration steps: 1. migrate_vma_pages get svm range ram pages, notify the interval is invalidated and unmap from CPU page table, HMM interval notifier callback evict process queues 2. Allocate new pages in vram using TTM 3. Use svm copy memory to sdma copy data from ram to vram 4. migrate_vma_pages copy ram pages structure to vram pages structure 5. migrate_vma_finalize put ram pages to free ram pages and memory 6. Restore work wait for migration is finished, then update GPUs page table mapping to new vram pages, resume process queues If migrate_vma_setup failed to collect all ram pages of range, retry 3 times until success to start migration. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 50ea50cf6f6d31d3235ad1853c5dbea766a3ed11 Author: Philip Yang Date: Fri Feb 7 17:08:04 2020 -0500 drm/amdkfd: copy memory through gart table Use sdma linear copy to migrate data between ram and vram. The sdma linear copy command uses kernel buffer function queue to access system memory through gart table. Use reserved gart table window 0 to map system page address, and vram page address is direct mapping. Use the same kernel buffer function to fill in gart table mapping, so this is serialized with memory copy by sdma job submit. We only need wait for the last memory copy sdma fence for larger buffer migration. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit b53fa124acdcec6d05bcdb36b55bf0f84471b1b7 Author: Philip Yang Date: Tue Jun 23 17:06:53 2020 -0400 drm/amdkfd: support xgmi same hive mapping amdgpu_gmc_get_vm_pte use bo_va->is_xgmi same hive information to set pte flags to update GPU mapping. Add local structure variable bo_va, and update bo_va.is_xgmi, pass it to mapping->bo_va while mapping to GPU. Assuming xgmi pstate is hi after boot. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit e49fe4040a10c1cd3b215c511f658d15aa7c8be9 Author: Felix Kuehling Date: Wed Feb 24 19:56:09 2021 -0500 drm/amdkfd: validate vram svm range from TTM If svm range perfetch location is not zero, use TTM to alloc amdgpu_bo vram nodes to validate svm range, then map vram nodes to GPUs. Use offset to sub allocate from the same amdgpu_bo to handle overlap vram range while adding new range or unmapping range. svm_bo has ref count to trace the shared ranges. If all ranges of shared amdgpu_bo are migrated to ram, ref count becomes 0, then amdgpu_bo is released, all ranges svm_bo is set to NULL. To migrate range from ram back to vram, allocate the same amdgpu_bo with previous offset if the range has svm_bo. If prange migrate to VRAM, no CPU mapping exist, then process exit will not have unmap callback for this prange to free prange and svm bo. Free outstanding pranges from svms list before process is freed in svm_range_list_fini. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit c46ebb6a6d9d28fce66595b56db070b0cc4fab71 Author: Philip Yang Date: Thu Apr 15 17:43:32 2021 -0400 drm/amdkfd: set memory limit to avoid OOM with HMM enabled HMM migration alloc sizeof(struct page) on system memory for each VRAM page, it is 1GB system memory reserved for 64GB VRAM. To avoid application OOM, increase system memory used size based on VRAM size of all GPUs, then application alloc memory will fail if system memory usage reach the limit. Signed-off-by: Philip Yang Reviewed-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 814ab9930cfd709768439799eae3c7ef0a658b54 Author: Philip Yang Date: Fri Feb 7 15:34:33 2020 -0500 drm/amdkfd: register HMM device private zone Register vram memory as MEMORY_DEVICE_PRIVATE type resource, to allocate vram backing pages for page migration. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0f7b5c44d4c53710993e4773bd6eaf171f1888e6 Author: Alex Sierra Date: Thu May 28 18:27:05 2020 -0500 drm/amdkfd: add ioctl to configure and query xnack retries Xnack retries are used for page fault recovery. Some AMD chip families support continuously retry while page table entries are invalid. The driver must handle the page fault interrupt and fill in a valid entry for the GPU to continue. This ioctl allows to enable/disable XNACK retries per KFD process. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 063e33c5469cf5f46407701f1121a978a3af2ce8 Author: Alex Sierra Date: Thu May 28 18:03:15 2020 -0500 drm/amdkfd: add xnack enabled flag to kfd_process XNACK mode controls the SQ RETRY_DISABLE setting that determines, whether recoverable page faults can be supported on GFXv9 hardware. Only on Aldebaran we can support different processes running with different XNACK modes. On older chips all processes must use the same RETRY_DISABLE setting. However, processes not relying on recoverable page faults can work with RETRY enabled. This means XNACK off is always available as a fallback so we can use the same mode on all GPUs in a process. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 9705c85ff2dc0e421255a1a68171c3b78116b313 Author: Felix Kuehling Date: Thu Feb 11 15:57:20 2021 -0500 drm/amdgpu: Enable retry faults unconditionally on Aldebaran This is needed to allow per-process XNACK mode selection in the SQ when booting with XNACK off by default. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Tested-by: Alex Sierra Signed-off-by: Alex Deucher commit 8a7c184a16d73ab25360e0f5997f82306ff5d5a2 Author: Felix Kuehling Date: Wed Feb 24 18:47:52 2021 -0500 drm/amdkfd: svm range eviction and restore HMM interval notifier callback notify CPU page table will be updated, stop process queues if the updated address belongs to svm range registered in process svms objects tree. Scheduled restore work to update GPU page table using new pages address in the updated svm range. The restore worker flushes any deferred work to make sure it restores an up-to-date svm_range_list. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit f80fe9d3c1149bb2ad0d7807aaaf5eff7c4e80a6 Author: Felix Kuehling Date: Wed Feb 24 18:29:06 2021 -0500 drm/amdkfd: map svm range to GPUs Use amdgpu_vm_bo_update_mapping to update GPU page table to map or unmap svm range system memory pages address to GPUs. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit d27afacfead5af7a38c1a65c93c07b7bca6f2420 Author: Philip Yang Date: Mon Sep 23 11:53:08 2019 -0400 drm/amdgpu: export vm update mapping interface It will be used by kfd to map svm range to GPU, because svm range does not have amdgpu_bo and bo_va, cannot use amdgpu_bo_update interface, use amdgpu vm update interface directly. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4683cfecadeb383b03019ad11aeea1efac38c1ba Author: Philip Yang Date: Wed Apr 8 11:09:45 2020 -0400 drm/amdkfd: deregister svm range When application explicitly call unmap or unmap from mmput when application exit, driver will receive MMU_NOTIFY_UNMAP event to remove svm range from process svms object tree and list first, unmap from GPUs (in the following patch). Split the svm ranges to handle partial unmapping of svm ranges. To avoid deadlocks, updating MMU notifiers, range lists and interval trees is done in a deferred worker. New child ranges are attached to their parent range's child_list until the worker can update the svm_range_list. svm_range_set_attr flushes deferred work and takes the mmap_write_lock to guarantee that it has an up-to-date svm_range_list. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit b1c46c7d622bed62898579548a7e9a21e1320c9d Author: Philip Yang Date: Sat Feb 15 15:02:49 2020 -0500 drm/amdkfd: validate svm range system memory Use HMM to get system memory pages address, which will be used to map to GPUs or migrate to vram. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit d8a3c1c80ceb656de00b45fe1595a040e5535202 Author: Philip Yang Date: Tue Mar 30 14:02:53 2021 -0400 drm/amdkfd: support larger svm range allocation For larger range allocation, if hmm_range_fault return -EBUSY, set retry timeout based on 1 second for every 512MB, this is safe timeout value. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 04d8d73dbcbe645a378fca6adc6f0e7111e46c17 Author: Philip Yang Date: Mon Feb 24 21:17:30 2020 -0500 drm/amdgpu: add common HMM get pages function Move the HMM get pages function from amdgpu_ttm and to amdgpu_mn. This common function will be used by new svm APIs. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit c5e2e4781ac5760c6b5efb09fed6ac7725fcf041 Author: Philip Yang Date: Sun Feb 16 12:42:00 2020 -0500 drm/amdkfd: add svm ioctl GET_ATTR op Get the intersection of attributes over all memory in the given range Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 42de677f79999791bee4e21be318c32d90ab62c6 Author: Philip Yang Date: Thu Feb 6 13:43:56 2020 -0500 drm/amdkfd: register svm range svm range structure stores the range start address, size, attributes, flags, prefetch location and gpu bitmap which indicates which GPU this range maps to. Same virtual address is shared by CPU and GPUs. Process has svm range list which uses both interval tree and list to store all svm ranges registered by the process. Interval tree is used by GPU vm fault handler and CPU page fault handler to get svm range structure from the specific address. List is used to scan all ranges in eviction restore work. No overlap range interval [start, last] exist in svms object interval tree. If process registers new range which has overlap with old range, the old range split into 2 ranges depending on the overlap happens at head or tail part of old range. Apply attributes preferred location, prefetch location, mapping flags, migration granularity to svm range, store mapping gpu index into bitmap. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 40ce74d1b28d38e5debc14b5a6ddd9071ae2d310 Author: Philip Yang Date: Wed Feb 5 17:59:15 2020 -0500 drm/amdkfd: add svm ioctl API Add svm (shared virtual memory) ioctl data structure and API definition. The svm ioctl API is designed to be extensible in the future. All operations are provided by a single IOCTL to preserve ioctl number space. The arguments structure ends with a variable size array of attributes that can be used to set or get one or multiple attributes. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2aeb742b72121c539cfc9cff8c00c5ca32ba4b1c Author: Alex Sierra Date: Tue Apr 7 23:08:45 2020 -0500 drm/amdkfd: helper to convert gpu id and idx svm range uses gpu bitmap to store which GPU svm range maps to. Application pass driver gpu id to specify GPU, the helper is needed to convert gpu id to gpu bitmap idx. Access through kfd_process_device pointers array from kfd_process. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit cccbeb6209bddee35539d9353de9fd775ce9bb55 Author: Felix Kuehling Date: Wed Apr 7 18:48:09 2021 -0400 drm/amdgpu: Remove verify_access shortcut for KFD BOs This shortcut is no longer needed with access managed properly by KFD. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit d4ec4bdc0bd5ad352854473ba4dcbdb39fd5bfdd Author: Felix Kuehling Date: Wed Apr 7 18:46:26 2021 -0400 drm/amdkfd: Allow access for mmapping KFD BOs DRM render node file handles are used for CPU mapping of BOs using mmap by the Thunk. It uses the DRM render node of the GPU where the BO was allocated. DRM allows mmap access automatically when it creates a GEM handle for a BO. KFD BOs don't have GEM handles, so KFD needs to manage access manually. Use drm_vma_node_allow to allow user mode to mmap BOs allocated with kfd_ioctl_alloc_memory_of_gpu through the DRM render node that was used in the kfd_ioctl_acquire_vm call for the same GPU. Signed-off-by: Felix Kuehling Acked-by: Christian König Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit b40a6ab2cf9213923bf8e821ce7fa7f6a0a26990 Author: Felix Kuehling Date: Wed Apr 7 18:19:58 2021 -0400 drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu needs the drm_priv to allow mmap to access the BO through the corresponding file descriptor. The VM can also be extracted from drm_priv, so drm_priv can replace the vm parameter in the kfd2kgd interface. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 3a11529d615ed74e9be5eef953bd136a943663b4 Author: Ville Syrjälä Date: Fri Apr 16 20:10:11 2021 +0300 drm/i915: Say "enable foo" instead of "set foo to enabled" Use simpler sentences. Just say "enable foo" instead of "set foo to enabled" etc. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 0868b1ce8772058da85786caac4baa61abb4f93a Author: Ville Syrjälä Date: Fri Apr 16 20:10:10 2021 +0300 drm/i915: Add enabledisable() 'enable ? "enable" : "disable"' is a fairly common pattern in our debug prints. Let's introduce a helper for it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b88da66055a966fdf913f7152a22e97dc9d8a68e Author: Ville Syrjälä Date: Fri Apr 16 20:10:09 2021 +0300 drm/i915: Polish for_each_dbuf_slice() Now that we have the dbuf slice mask stored in the device info let's use it for for_each_dbuf_slice_in_mask*(). With this we cal also rip out intel_dbuf_size() and intel_dbuf_num_slices(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d152bb1f672b773432209b81b689e7f1687ca77a Author: Ville Syrjälä Date: Fri Apr 16 20:10:08 2021 +0300 drm/i915: Use intel_de_rmw() for DBUF_POWER_REQUEST Use intel_de_rmw() instead of hand rolling it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 6390e5aa139c2be0f54a702e01dbaee4c9112616 Author: Ville Syrjälä Date: Fri Apr 16 20:10:07 2021 +0300 drm/i915: Use intel_dbuf_slice_size() Use intel_dbuf_slice_size() instead of hand rolling it. Also clean up some of the types. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 578e6edec45cf883681ae4e0b0d53ec62460af93 Author: Ville Syrjälä Date: Fri Apr 16 20:10:06 2021 +0300 drm/i915: Store dbuf slice mask in device info Let's just store the dbuf slice information as a bitmask in the device info. Makes life a little easier later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 77531b0ef621b62e5164d33411106a3415eb7b67 Author: Ville Syrjälä Date: Fri Apr 16 20:10:05 2021 +0300 drm/i915: Handle dbuf bypass path allocation earlier We always reserve the same 4 dbuf blocks for the bypass path allocation, so might as well do that when declaring the dbuf size. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 708de86e10e59352eb57a3ad6a5a524d8f5c9f13 Author: Ville Syrjälä Date: Fri Apr 16 20:10:04 2021 +0300 drm/i915: Collect dbuf device info into a sub-struct Collect the related dbuf information into a struct. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210416171011.19012-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3235b0f20a0a4135e9053f1174d096eff166d0fb Author: Douglas Anderson Date: Fri Apr 16 15:39:30 2021 -0700 drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare Unpreparing and re-preparing a panel can be a really heavy operation. Panels datasheets often specify something on the order of 500ms as the delay you should insert after turning off the panel before turning it on again. In addition, turning on a panel can have delays on the order of 100ms - 200ms before the panel will assert HPD (AKA "panel ready"). The above means that we should avoid turning a panel off if we're going to turn it on again shortly. The above becomes a problem when we want to read the EDID of a panel. The way that ordering works is that userspace wants to read the EDID of the panel _before_ fully enabling it so that it can set the initial mode correctly. However, we can't read the EDID until we power it up. This leads to code that does this dance (like ps8640_bridge_get_edid()): 1. When userspace requests EDID / the panel modes (through an ioctl), we power on the panel just enough to read the EDID and then power it off. 2. Userspace then turns the panel on. There's likely not much time between step #1 and #2 and so we want to avoid powering the panel off and on again between those two steps. Let's use Runtime PM to help us. We'll move the existing prepare() and unprepare() to be runtime resume() and runtime suspend(). Now when we want to prepare() or unprepare() we just increment or decrement the refcount. We'll default to a 1 second autosuspend delay which seems sane given the typical delays we see for panels. A few notes: - It seems the existing unprepare() and prepare() are defined to be no-ops if called extra times. We'll preserve that behavior but may try to remove it in a future patch. - This is a slight change in the ABI of simple panel. If something was absolutely relying on the unprepare() to happen instantly that simply won't be the case anymore. I'm not aware of anyone relying on that behavior, but if there is someone then we'll need to figure out how to enable (or disable) this new delayed behavior selectively. - In order for this to work we now have a hard dependency on "PM". From memory this is a legit thing to assume these days and we don't have to find some fallback to keep working if someone wants to build their system without "PM". Signed-off-by: Douglas Anderson Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.7.I9e8bd33b49c496745bfac58ea9ab418bd3b6f5ce@changeid commit e07e21435d6639d6bbe13d3daa3dc74ce7d8fbb0 Author: Douglas Anderson Date: Fri Apr 16 15:39:29 2021 -0700 drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function If we just leave the detect() function as NULL then the upper layers assume we're always connected. There's no reason for a stub. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.6.I826adf4faeb7f39f560b387f6b380e639c6986c8@changeid commit 54fdf372064956301823cc534440390658e5f843 Author: Douglas Anderson Date: Fri Apr 16 15:39:28 2021 -0700 drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable() We prepared the panel in pre_enable() so we should unprepare it in post_disable() to match. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.5.Ia75c9ffe2a2582393a8532d244da86f18b4c9b21@changeid commit 4e532867e95cde8e582367ca6e44e3ef35fba615 Author: Douglas Anderson Date: Fri Apr 16 15:39:27 2021 -0700 drm/bridge: ti-sn65dsi86: Reorder remove() Let's make the remove() function strictly the reverse of the probe() function so it's easier to reason about. This patch was created by code inspection and should move us closer to a proper remove. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.4.Ifcf1deaa372eba7eeb4f8eb516c5d15b77a657a9@changeid commit 6b7adaeab68f3dbea7f16de7d961fbfe62325d88 Author: Douglas Anderson Date: Fri Apr 16 15:39:26 2021 -0700 drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment A random comment inside a function had "/**" in front of it. That doesn't make sense. Remove. Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.3.I167766eeaf4c4646a3934c4dd5332decbab6bd68@changeid commit acf3aca5ca990f63c1e29379fd1362b98883b66b Author: Douglas Anderson Date: Fri Apr 16 15:39:25 2021 -0700 drm/bridge: ti-sn65dsi86: Simplify refclk handling The clock framework makes it simple to deal with an optional clock. You can call clk_get_optional() and if the clock isn't specified it'll just return NULL without complaint. It's valid to pass NULL to enable/disable/prepare/unprepare. Let's make use of this to simplify things a tiny bit. Signed-off-by: Douglas Anderson Reviewed-by: Robert Foss Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.2.Ic9c04f960190faad5290738b2a35d73661862735@changeid commit bab5cca7e609952b069a550e39fe4893149fb658 Author: Douglas Anderson Date: Fri Apr 16 15:39:24 2021 -0700 drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() The drm_bridge_chain_pre_enable() is not the proper opposite of drm_bridge_chain_post_disable(). It continues along the chain to _before_ the starting bridge. Let's fix that. Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.1.If62a003f76a2bc4ccc6c53565becc05d2aad4430@changeid commit a584e2c301839184caf4fd291ff2ab578d914c90 Author: Neil Armstrong Date: Fri Apr 16 11:27:37 2021 +0200 drm/meson: dw-hdmi: disable DW-HDMI CEC sub-driver On the Amlogic SoCs, the DW-HDMI HW support is here but the DW-HDMI CEC signal is not connected to a physical pin, leading to confusion when the dw-hdmi cec controller can't communicate on the bus. Disable it to avoid exposing a non-functinal bus. Signed-off-by: Neil Armstrong Acked-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210416092737.1971876-3-narmstrong@baylibre.com commit cd7f72e6e7b69ede4e80328e149a187eedf3d146 Author: Jernej Skrabec Date: Fri Apr 16 11:27:36 2021 +0200 drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver This adds DW-HDMI driver a glue option to disable loading of the CEC sub-driver. On some SoCs, the CEC functionality is enabled in the IP config bits, but the CEC bus is non-functional like on Amlogic SoCs, where the CEC config bit is set but the DW-HDMI CEC signal is not connected to a physical pin, leading to some confusion when the DW-HDMI CEC controller can't communicate on the bus. Reviewed-by: Neil Armstrong Signed-off-by: Jernej Skrabec Signed-off-by: Neil Armstrong Acked-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210416092737.1971876-2-narmstrong@baylibre.com commit 103b8cbac28ea2965f24ca52e6a92d76d3851b3c Author: Dan Carpenter Date: Wed Apr 14 09:02:24 2021 +0300 drm/i915: fix an error code in intel_overlay_do_put_image() This code should propagate the error from intel_overlay_pin_fb() but currently it returns success. Fixes: 1b321026e213 ("drm/i915: Pass ww ctx to intel_pin_to_display_plane") Signed-off-by: Dan Carpenter Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YHaFcEzcnh/hk1/Q@mwanda commit c6deb5e97ded2623dfaec9b15a9bdd1b56464735 Author: Jason Ekstrand Date: Tue Apr 13 12:32:59 2021 -0500 drm/i915/pm: Make the wm parameter of print_wm_latency a pointer This fixes the following build error with GCC 11: In function ‘snb_wm_latency_quirk’, inlined from ‘ilk_setup_wm_latency’ at drivers/gpu/drm/i915/intel_pm.c:3109:3, inlined from ‘intel_init_pm’ at drivers/gpu/drm/i915/intel_pm.c:7695:3: drivers/gpu/drm/i915/intel_pm.c:3058:9: error: ‘intel_print_wm_latency’ reading 16 bytes from a region of size 10 [-Werror=stringop-overread] 3058 | intel_print_wm_latency(dev_priv, "Primary", dev_priv->wm.pri_latency); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/intel_pm.c: In function ‘intel_init_pm’: drivers/gpu/drm/i915/intel_pm.c:3058:9: note: referencing argument 3 of type ‘const u16 *’ {aka ‘const short unsigned int *’} drivers/gpu/drm/i915/intel_pm.c:2995:13: note: in a call to function ‘intel_print_wm_latency’ 2995 | static void intel_print_wm_latency(struct drm_i915_private *dev_priv, | ^~~~~~~~~~~~~~~~~~~~~~ As far as I can tell, we don't actually need 8 elements except on SKL and that uses dev_priv->wm.skl_latency which has enough. Signed-off-by: Jason Ekstrand Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210413173259.472405-1-jason@jlekstrand.net Signed-off-by: Rodrigo Vivi commit a36a47490d8e911f0f12521359a8e018bb3fcfb6 Author: Chris Wilson Date: Mon Apr 12 10:05:09 2021 +0100 drm/i915/selftests: Only query RAPL for integrated power measurements RAPL provides an on-package power measurements which does not encompass discrete graphics, so let's avoid using the igfx masurements when testing dgfx. Later we will abstract the simple librapl interface over hwmon so that we can verify basic power consumption scenarios. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210412090526.30547-3-matthew.auld@intel.com commit f44b733e865ae963324e488866a257224e09c85c Author: Chris Wilson Date: Mon Apr 12 10:05:08 2021 +0100 drm/i915/selftests: Skip aperture remapping selftest where there is no aperture If there is no mappable aperture, we cannot remap it for access, and the selftest is void. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Reviewed-by: Imre Deak Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210412090526.30547-2-matthew.auld@intel.com commit 8e6a2ebe4b9d49227304c256a8cbee23c3c95bf5 Merge: e3bdccafb5bcf 425390c5dce6d Author: Joonas Lahtinen Date: Tue Apr 20 12:42:05 2021 +0300 Merge tag 'topic/intel-gen-to-ver-2021-04-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-gt-next Gen to ver conversions across the driver The main change is Lucas' series [1], with Ville's GLK fixes [2] and a cherry-pick of Matt's commit [3] from drm-intel-next as a base to avoid conflicts. [1] https://patchwork.freedesktop.org/series/88825/ [2] https://patchwork.freedesktop.org/series/88938/ [3] 70bfb30743d5 ("drm/i915/display: Eliminate IS_GEN9_{BC,LP}") Signed-off-by: Joonas Lahtinen From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/878s5ebny0.fsf@intel.com commit e3bdccafb5bcfab286f4f3d57d35efc4e7368c18 Author: Matthew Auld Date: Mon Apr 19 11:57:41 2021 +0100 drm/i915/uapi: convert i915_query and friend to kernel doc Add a note about the two-step process. v2(Tvrtko): - Also document the other method of just passing in a buffer which is large enough, which avoids two ioctl calls. Can make sense for smaller query items. v3: prefer kernel-doc references for structs and members Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Daniel Vetter Reviewed-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20210419105741.27844-4-matthew.auld@intel.com commit 19d053d477a145069bc2c38b28dcee773690c804 Author: Matthew Auld Date: Mon Apr 19 11:57:40 2021 +0100 drm/i915/uapi: convert i915_user_extension to kernel doc Add some example usage for the extension chaining also, which is quite nifty. v2: (Daniel) - clarify that the name is just some integer, also document that the name space is not global v3: prefer kernel-doc references for structs Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Daniel Vetter Reviewed-by: Jason Ekstrand Link: https://patchwork.freedesktop.org/patch/msgid/20210419105741.27844-3-matthew.auld@intel.com commit 2ef6a01fb636997bfec57b015d4e4b5a745ef38a Author: Matthew Auld Date: Mon Apr 19 11:57:38 2021 +0100 drm/i915/uapi: fix kernel doc warnings Fix the cases where it is almost already valid kernel doc, for the others just nerf the warnings for now. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Jordan Justen Cc: Daniel Vetter Cc: Kenneth Graunke Cc: Jason Ekstrand Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210419105741.27844-1-matthew.auld@intel.com commit 42be7ca1fdc99dda43521ed6024c0959600edaba Author: Fabio M. De Francesco Date: Sat Apr 17 18:15:52 2021 +0200 drm/drm_bufs.c: In switch, add break in default case Added a "break" in the default case of a switch select statement. GCC complains, although this "break" is not strictly necessary for the code to work as expected. Signed-off-by: Fabio M. De Francesco Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210417161552.6571-1-fmdefrancesco@gmail.com commit 7f5b18889d077b724dc50b891ae3bc2f10ab3756 Author: Daniel Vetter Date: Tue Apr 13 11:48:54 2021 +0200 drm/exynos: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Acked-by: Inki Dae Signed-off-by: Daniel Vetter Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210413094904.3736372-3-daniel.vetter@ffwll.ch commit 08319adbdde15ef7cee1970336f63461254baa2a Author: Robert Foss Date: Mon Apr 19 11:01:24 2021 +0200 drm/bridge/sii8620: fix dependency on extcon The DRM_SIL_SII8620 kconfig has a weak `imply` dependency on EXTCON, which causes issues when sii8620 is built as a builtin and EXTCON is built as a module. The symptoms are 'undefined reference' errors caused by the symbols in EXTCON not being available to the sii8620 driver. Fixes: 688838442147 ("drm/bridge/sii8620: use micro-USB cable detection logic to detect MHL") Reported-by: kernel test robot Signed-off-by: Robert Foss Reviewed-by: Randy Dunlap Link: https://patchwork.freedesktop.org/patch/msgid/20210419090124.153560-1-robert.foss@linaro.org commit 3def10f297f10e6cbd5dc03beb062ca0b31d37b6 Merge: 4028988ea5297 425390c5dce6d Author: Rodrigo Vivi Date: Mon Apr 19 14:01:03 2021 -0400 Merge tag 'topic/intel-gen-to-ver-2021-04-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next Gen to ver conversions across the driver The main change is Lucas' series [1], with Ville's GLK fixes [2] and a cherry-pick of Matt's commit [3] from drm-intel-next as a base to avoid conflicts. [1] https://patchwork.freedesktop.org/series/88825/ [2] https://patchwork.freedesktop.org/series/88938/ [3] 70bfb30743d5 ("drm/i915/display: Eliminate IS_GEN9_{BC,LP}") Signed-off-by: Rodrigo Vivi # Conflicts: # drivers/gpu/drm/i915/display/intel_bios.c # drivers/gpu/drm/i915/display/intel_cdclk.c # drivers/gpu/drm/i915/display/intel_ddi.c # drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c # drivers/gpu/drm/i915/display/intel_display.c # drivers/gpu/drm/i915/display/intel_display_power.c # drivers/gpu/drm/i915/display/intel_dp.c # drivers/gpu/drm/i915/display/intel_dpll_mgr.c # drivers/gpu/drm/i915/display/intel_fbc.c # drivers/gpu/drm/i915/display/intel_gmbus.c # drivers/gpu/drm/i915/display/intel_hdcp.c # drivers/gpu/drm/i915/display/intel_hdmi.c # drivers/gpu/drm/i915/display/intel_pps.c # drivers/gpu/drm/i915/intel_pm.c From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/878s5ebny0.fsf@intel.com commit 4028988ea52971891e8b9c672673fd0de53bcf61 Author: Ville Syrjälä Date: Tue Mar 30 21:42:54 2021 +0300 drm/i915: Reuse intel_adjusted_rate() for pfit pixel rate adjustment Replace the hand rolled pfit downscale calculations with intel_adjusted_rate(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210330184254.6290-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b876e79d7bffb2e6f78c291ddcd1f76c4e3fe5c5 Author: Ville Syrjälä Date: Thu Apr 1 18:40:43 2021 +0300 drm/i915: Extract intel_adjusted_rate() Extract a small helper to calculate the downscaling adjusted pixel rate/data rate/etc. v2: Drop the plane visibility check and add a comment explaining why Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210401154043.19466-1-ville.syrjala@linux.intel.com commit ce4528daf5c53b50cd22185ef8e396ccc948fe09 Author: Christian König Date: Thu Feb 11 17:34:08 2021 +0100 drm/amdgpu: check base size instead of mem.num_pages Drop some ussage of mem in the code. Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-2-christian.koenig@amd.com Reviewed-by: Matthew Auld commit aeaf45c5fdb9f1b0e8012eba6573fb47cc5a063b Author: Christian König Date: Thu Feb 11 14:01:40 2021 +0100 drm/nouveau: use bo->base.size instead of mem->num_pages Change a couple of cases where it makes more sense to use the base size instead of the number of pages in the resource. Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210413135248.1266-1-christian.koenig@amd.com Reviewed-by: Matthew Auld commit 44292a0f9d755a2a0aaa3b71c4415a077a3bce81 Author: Christian König Date: Wed Apr 14 16:02:16 2021 +0200 drm/ttm: warn stricter about freeing pinned BOs So far we only warned when the BOs where pinned and not idle. Also warn if we see a pinned BO in general. Signed-off-by: Christian König Acked-by: Leo Liu Link: https://patchwork.freedesktop.org/patch/msgid/20210415084730.2057-3-christian.koenig@amd.com commit e2ac8531564dc319a2d68dd8e5f1fd2cd6d37dcf Author: Christian König Date: Wed Apr 14 15:51:24 2021 +0200 drm/amdgpu: freeing pinned objects is illegal now We want to drop support in TTM for this. Signed-off-by: Christian König Acked-by: Leo Liu Link: https://patchwork.freedesktop.org/patch/msgid/20210415084730.2057-2-christian.koenig@amd.com commit 2f40801dc55317f3cff80c3d512ef30458c533a2 Author: Christian König Date: Wed Apr 14 15:49:47 2021 +0200 drm/amdgpu: make sure we unpin the UVD BO Releasing pinned BOs is illegal now. Signed-off-by: Christian König Acked-by: Leo Liu Link: https://patchwork.freedesktop.org/patch/msgid/20210415084730.2057-1-christian.koenig@amd.com commit b515d2637276a3810d6595e10ab02c13bfd0b63a Author: Sabrina Dubroca Date: Fri Apr 16 11:27:59 2021 +0200 xfrm: xfrm_state_mtu should return at least 1280 for ipv6 Jianwen reported that IPv6 Interoperability tests are failing in an IPsec case where one of the links between the IPsec peers has an MTU of 1280. The peer generates a packet larger than this MTU, the router replies with a "Packet too big" message indicating an MTU of 1280. When the peer tries to send another large packet, xfrm_state_mtu returns 1280 - ipsec_overhead, which causes ip6_setup_cork to fail with EINVAL. We can fix this by forcing xfrm_state_mtu to return IPV6_MIN_MTU when IPv6 is used. After going through IPsec, the packet will then be fragmented to obey the actual network's PMTU, just before leaving the host. Currently, TFC padding is capped to PMTU - overhead to avoid fragementation: after padding and encapsulation, we still fit within the PMTU. That behavior is preserved in this patch. Fixes: 91657eafb64b ("xfrm: take net hdr len into account for esp payload size calculation") Reported-by: Jianwen Ji Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit 67c2669d69fb5ada0f3b5123fb6ebf6fef9faee5 Author: Roman Gushchin Date: Wed Apr 7 20:57:32 2021 -0700 percpu: split __pcpu_balance_workfn() __pcpu_balance_workfn() became fairly big and hard to follow, but in fact it consists of two fully independent parts, responsible for the destruction of excessive free chunks and population of necessarily amount of free pages. In order to simplify the code and prepare for adding of a new functionality, split it in two functions: 1) pcpu_balance_free, 2) pcpu_balance_populated. Move the taking/releasing of the pcpu_alloc_mutex to an upper level to keep the current synchronization in place. Signed-off-by: Roman Gushchin Reviewed-by: Dennis Zhou Signed-off-by: Dennis Zhou commit ac9380f6b8a6a908a9df023bf8a2bcdaf9d2d6cb Author: Roman Gushchin Date: Wed Apr 7 20:57:31 2021 -0700 percpu: fix a comment about the chunks ordering Since the commit 3e54097beb22 ("percpu: manage chunks based on contig_bits instead of free_bytes") chunks are sorted based on the size of the biggest continuous free area instead of the total number of free bytes. Update the corresponding comment to reflect this. Signed-off-by: Roman Gushchin Signed-off-by: Dennis Zhou commit 0d11375476fb528571a46525f1b00dcf01c04828 Author: Daniel Vetter Date: Tue Apr 13 11:48:56 2021 +0200 drm/imx: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here for both dcss and imx-drm drivers. Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20210413094904.3736372-5-daniel.vetter@ffwll.ch commit 53d68269c8c85ea0389669cde7dc5a66d4df06f6 Author: Daniel Vetter Date: Tue Apr 13 11:49:02 2021 +0200 drm/vc4: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. Acked-by: Maxime Ripard Signed-off-by: Daniel Vetter Cc: Eric Anholt Cc: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210413094904.3736372-11-daniel.vetter@ffwll.ch commit be4306ad928fcf736cbe2616b6dd19d91f1bc083 Author: Daniel Vetter Date: Tue Apr 13 11:49:01 2021 +0200 drm/tegra: Don't set allow_fb_modifiers explicitly Since commit 890880ddfdbe256083170866e49c87618b706ac7 Author: Paul Kocialkowski Date: Fri Jan 4 09:56:10 2019 +0100 drm: Auto-set allow_fb_modifiers when given modifiers at plane init this is done automatically as part of plane init, if drivers set the modifier list correctly. Which is the case here. It was slightly inconsistently though, since planes with only linear modifier support haven't listed that explicitly. Fix that, and cc: stable to allow userspace to rely on this. Again don't backport further than where Paul's patch got added. Cc: stable@vger.kernel.org # v5.1 + Cc: Pekka Paalanen Acked-by: Thierry Reding Signed-off-by: Daniel Vetter Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210413094904.3736372-10-daniel.vetter@ffwll.ch commit 3389082bb98296ca5f31ac809a4e5dec5b069148 Author: Vivek Kasireddy Date: Mon Apr 12 22:26:14 2021 -0700 drm/virtio: Create Dumb BOs as guest Blobs (v3) If support for Blob resources is available, then dumb BOs created by the driver can be considered as guest Blobs. v2: Don't skip transfer and flush commands as part of plane update as the device may have created a shared mapping. (Gerd) v3: Don't create dumb BOs as Guest blobs if Virgl is enabled. (Gurchetan) Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy Acked-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20210413052614.2486768-1-vivek.kasireddy@intel.com Signed-off-by: Gerd Hoffmann commit 1884b579c0cfbb52a92462184406558ac633cafb Author: José Roberto de Souza Date: Fri Apr 9 16:17:38 2021 -0700 drm/i915/display/psr: Fix cppcheck warnings Fix redundant condition, caught in cppcheck by kernel test robot. Reported-by: kernel test robot Cc: Gwan-gyeong Mun Fixes: b64d6c51380b ("drm/i915/display: Support PSR Multiple Instances") Signed-off-by: José Roberto de Souza Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20210409231738.238682-1-jose.souza@intel.com commit 770d4c71eca7285216dc862849564b33c0d6a210 Author: Imre Deak Date: Tue Apr 13 02:24:13 2021 +0300 drm/i915: Drop redundant address-of op before lttpr_common_caps array The address-of op in front of an array is just an alias to using the array on its own, so drop the op. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210412232413.2755054-2-imre.deak@intel.com commit e42e7e585984b85b0fb9dd1fefc85ee4800ca629 Author: Imre Deak Date: Tue Apr 13 02:24:12 2021 +0300 drm/i915: Fix modesetting in case of unexpected AUX timeouts In case AUX failures happen unexpectedly during a modeset, the driver should still complete the modeset. In particular the driver should perform the link training sequence steps even in case of an AUX failure, as this sequence also includes port initialization steps. Not doing that can leave the port/pipe in a broken state and lead for instance to a flip done timeout. Fix this by continuing with link training (in a no-LTTPR mode) if the DPRX DPCD readout failed for some reason at the beginning of link training. After a successful connector detection we already have the DPCD read out and cached, so the failed repeated read for it should not cause a problem. Note that a partial AUX read could in theory partly overwrite the cached DPCD (and return error) but this overwrite should not happen if the returned values are corrupted (due to a timeout or some other IO error). Kudos to Ville to root cause the problem. Fixes: 264613b406eb ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4") References: https://gitlab.freedesktop.org/drm/intel/-/issues/3308 Cc: stable@vger.kernel.org # 5.11 Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210412232413.2755054-1-imre.deak@intel.com commit 425390c5dce6da76578389629d19517fcd79c959 Author: Lucas De Marchi Date: Mon Apr 12 22:10:02 2021 -0700 drm/i915: split dgfx features from gen 12 Make them independent so we can use DGFX_FEATURES more generically. For future platforms that do not use the GEN nomenclature we will define graphics, media and display separately, so we avoid setting graphics_ver with the GEN() macro. Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-13-lucas.demarchi@intel.com commit 1ab52b4fc008bb0ea4a3a279aadd05f8a24dd79f Author: Lucas De Marchi Date: Mon Apr 12 22:10:01 2021 -0700 drm/i915: add media and display versions to device_info print Since we are now converting from a single gen version to graphics_ver, media_ver and display_ver, add the last 2 when printing the device info. Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-12-lucas.demarchi@intel.com commit 7b36b7d3be3ebcfcf28e61cc65868e277aa9f36a Author: Lucas De Marchi Date: Mon Apr 12 22:10:00 2021 -0700 drm/i915: finish removal of gen from intel_device_info Now that it's not being used anymore, finish its removal. Like for gen_mask, we replace INTEL_GEN() and IS_GEN() macros to use the new field. Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi [Jani: Minor code comment change while applying.] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-11-lucas.demarchi@intel.com commit 8802190f642034a919c8e757987c964d3d9df39f Author: Lucas De Marchi Date: Mon Apr 12 22:09:59 2021 -0700 drm/i915: eliminate remaining uses of intel_device_info->gen Replace gen with the new graphics_ver value and use GRAPHICS_VER() in those places. Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-10-lucas.demarchi@intel.com commit 58e0d8a0f529761a77acd220f70ebef38bcc3bfe Author: Lucas De Marchi Date: Mon Apr 12 22:09:58 2021 -0700 drm/i915: finish removal of gen_mask Now that it's not used anywhere, remove it from struct intel_device_info. To allow a period in which code will be converted to the new macro, keep IS_GEN_RANGE() around, just redefining it to use the new fields. The size advantage from IS_GEN_RANGE() using a mask is not that big as it has pretty limited use througout the driver: text data bss dec hex filename 2758497 95965 6496 2860958 2ba79e drivers/gpu/drm/i915/i915.ko.old 2758586 95953 6496 2861035 2ba7eb drivers/gpu/drm/i915/i915.ko.new Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi [Jani: Minor code comment change while applying.] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-9-lucas.demarchi@intel.com commit 33adf482af73ffdde00a25ba15d22b4047cc78f2 Author: Lucas De Marchi Date: Mon Apr 12 22:09:57 2021 -0700 drm/i915/selftests: eliminate use of gen_mask Remove the remaining uses of INTEL_GEN_MASK() and the correspondent gen_mask in struct intel_device_info. This will allow the removal of gen_mask later since it's incompatible with the new per-IP versioning scheme. Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-8-lucas.demarchi@intel.com commit 3e6e4c21df34c16820ca68425f90d5b2741a8a39 Author: Lucas De Marchi Date: Mon Apr 12 22:09:56 2021 -0700 drm/i915/selftests: replace unused mask with simple version Since its introduction 2 years ago, we never used the mask to span more than one gen. Replace gen_mask a single number and start using the new GRAPHICS_VER(). Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-7-lucas.demarchi@intel.com commit 1b9d840682965842ca89079201eefbd2e3195575 Author: Lucas De Marchi Date: Mon Apr 12 22:09:55 2021 -0700 drm/i915/gt: replace gen use in intel_engine_cs Start using the new fields graphics_version for the previous gen checks. Here we rename the "gen" field and replace the comparisons using it to start using the new GRAPHICS_VER(). Other uses of INTEL_GEN() were left as is for automatic conversion later. Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-6-lucas.demarchi@intel.com commit 93babb061e2ab5e486cc83c7024448c1727ce38b Author: Lucas De Marchi Date: Mon Apr 12 22:09:54 2021 -0700 drm/i915: add macros for graphics and media versions Like it was done in commit 01eb15c9165e ("drm/i915: Add DISPLAY_VER() and related macros") add the correspondent macros for graphics and media. Going forward we will prefer checking the versions for the specific IPs (graphics, media and display) rather than grouping everything under a "gen" version. For consistency and to make the maintenance easier, it'd be preferred not to mix the *GEN* macros with the new ones. For older platforms we can simply consider that the previous "gen" number will extend to all 3 IPs. Then we can start replacing its use in the driver. Right now this replacement is not done and only the infrastructure is put in place. We also leave gen and gen_mask inside struct intel_device_info while it's still being used throughout the code. v2: Repurpose IS_{GRAPHICS,MEDIA}_VER() macros to work with a range Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Reviewed-by: Jani Nikula [Jani: Minor code comment change while applying.] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-5-lucas.demarchi@intel.com commit 93e7e61eb448318e5793c4b20b21a8fd92d4f949 Author: Lucas De Marchi Date: Mon Apr 12 22:09:53 2021 -0700 drm/i915/display: rename display version macros While converting the rest of the driver to use GRAPHICS_VER() and MEDIA_VER(), following what was done for display, some discussions went back on what we did for display: 1) Why is the == comparison special that deserves a separate macro instead of just getting the version and comparing directly like is done for >, >=, <=? 2) IS_DISPLAY_RANGE() is weird in that it omits the "_VER" for brevity. If we remove the current users of IS_DISPLAY_VER(), we could actually repurpose it for a range check With (1) there could be an advantage if we used gen_mask since multiple conditionals be combined by the compiler in a single and instruction and check the result. However a) INTEL_GEN() doesn't use the mask since it would make the code bigger everywhere else and b) in the cases it made sense, it also made sense to convert to the _RANGE() variant. So here we repurpose IS_DISPLAY_VER() to work with a [ from, to ] range like was the IS_DISPLAY_RANGE() and convert the current IS_DISPLAY_VER() users to use == and != operators. Aside from the definition changes, this was done by the following semantic patch: @@ expression dev_priv, E1; @@ - !IS_DISPLAY_VER(dev_priv, E1) + DISPLAY_VER(dev_priv) != E1 @@ expression dev_priv, E1; @@ - IS_DISPLAY_VER(dev_priv, E1) + DISPLAY_VER(dev_priv) == E1 @@ expression dev_priv, from, until; @@ - IS_DISPLAY_RANGE(dev_priv, from, until) + IS_DISPLAY_VER(dev_priv, from, until) Cc: Jani Nikula Cc: Matt Roper Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi [Jani: Minor conflict resolve while applying.] Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-4-lucas.demarchi@intel.com commit 4df9c1ae7a4bb9366c298e6a4eddf54b65a0714c Author: Lucas De Marchi Date: Mon Apr 12 22:09:52 2021 -0700 drm/i915: rename display.version to display.ver The macro we use to check is called DISPLAY_VER(). While using this macro and the new ones being added in following changes I made the mistake multiple times when mixing both "ver" and "version". Although it's usually better to prefer the complete name, the shorhand DISPLAY_VER() / GRAPHICS_VER / MEDIA_VER are clear and cause less visual polution. Another issue is when copying the variable to other places. "display.version" would be copied to a "display_version" variable which is long and would make people abbreviate as "version", or "display_ver". In the first case it's not always clear what version refers to, and in the second case it just hints it should be the name in the first place. So, in the same way use used "gen" rather than "generation", use "ver" instead of "version". Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Acked-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-3-lucas.demarchi@intel.com commit 27ec10b3eb2e14588b2ce5b4c8ea5460e7143179 Author: Lucas De Marchi Date: Mon Apr 12 22:09:51 2021 -0700 drm/i915/display: use DISPLAY_VER() on remaining users Commit 989634fb49ad ("drm/i915/audio: set HDA link parameters in driver") added INTEL_GEN() in the display code, where it should actually be using DISPLAY_VER(). Switch to the new macro. Cc: Kai Vehmanen Reviewed-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210413051002.92589-2-lucas.demarchi@intel.com commit ad314fec4d0551c31688dc7530b12d04af326f9e Author: Ville Syrjälä Date: Mon Apr 12 08:46:07 2021 +0300 drm/i915: Remove a few redundant glk checks Now that glk display version is 10 we can drop a few more glk checks. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-6-ville.syrjala@linux.intel.com commit 6c51f288b41f5dfc3061ab1fd8a576513edfce6b Author: Ville Syrjälä Date: Mon Apr 12 08:46:06 2021 +0300 drm/i915: Don't use {skl, cnl}_hpd_pin() for bxt/glk Just let bxt/glk fall back to intel_hpd_pin_default() instead of using skl_hpd_pin() or cnl_hpd_pin(). Doesn't really matter since both functions will end up returning the correct hpd pin anyway, but I find it a bit less confusing when bxt/glk are fully separated from the logic for the other platforms. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-5-ville.syrjala@linux.intel.com commit 543d592a73d3948737d0ae4880a407c6da28662f Author: Ville Syrjälä Date: Mon Apr 12 08:46:05 2021 +0300 drm/i915: Disable LTTPR detection on GLK once again The glk display version change is causing us to again attempt LTTPR detection on glk. We must not do tha since glk doesn't have a long enough AUX timeout. Restore the correct logic to skip the detection. Cc: Matt Roper Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-4-ville.syrjala@linux.intel.com commit 0fe6637d9852a33c2873e59ae7e5225f92ac4cc2 Author: Ville Syrjälä Date: Mon Apr 12 08:46:04 2021 +0300 drm/i915: Restore lost glk ccs w/a We lost a CCS related w/a on glk when the display version became 10 instead of 9. Restore the correct check. Cc: Matt Roper Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-3-ville.syrjala@linux.intel.com commit 87b8c3bc8d27270c9abd5e895ea9066e918ef89b Author: Ville Syrjälä Date: Mon Apr 12 08:46:03 2021 +0300 drm/i915: Restore lost glk FBC 16bpp w/a We lost the FBC 16bpp 512byte stride requirement on glk when we switched from display version 9 to 10. Restore the w/a to avoid enabling FBC with a bad stride and thus display garbage. Cc: Matt Roper Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-2-ville.syrjala@linux.intel.com commit 2b173d7fc220af2b0aea209568753c6e591b0ca6 Author: Felix Kuehling Date: Wed Apr 14 02:48:03 2021 -0400 drm/ttm: Don't count pages in SG BOs against pages_limit Pages in SG BOs were not allocated by TTM. So don't count them against TTM's pages limit. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210414064804.29356-9-Felix.Kuehling@amd.com commit 2446e1d6433b4b99d69e8fe0522bcdfbdef715b5 Author: Matt Roper Date: Wed Apr 7 13:39:45 2021 -0700 drm/i915/display: Eliminate IS_GEN9_{BC,LP} Now that we've eliminated INTEL_GEN(), IS_GEN_RANGE(), etc. from the display code, we should also kill off our use of the IS_GEN9_* macros too. We'll do the conversion manually this time instead of using Coccinelle since the most logical substitution can depend heavily on the code context, and sometimes we can keep the code simpler if we make additional adjustments such as swapping the order of if/else arms. v2: - Restore a lost negation in intel_pll_is_valid(). Cc: Ville Syrjälä Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210407203945.1432531-1-matthew.d.roper@intel.com (cherry picked from commit 70bfb30743d5da73058b0a2271e9c127a84fb494) [Jani: cherry picked to topic branch to reduce conflicts] Signed-off-by: Jani Nikula commit 603dc7ed917f2f443f966370acf75e817965de97 Author: Thomas Zimmermann Date: Mon Apr 12 15:10:43 2021 +0200 drm/aperture: Inline fbdev conflict helpers into aperture helpers Fbdev's helpers for handling conflicting framebuffer drivers are related to framebuffer apertures, not console emulation. Therefore remove them from drm_fb_helper.h and inline them into the aperture helpers. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412131043.5787-4-tzimmermann@suse.de commit 6848c291a54f8cd1e8b32f4d6e0f681acc8d5095 Author: Thomas Zimmermann Date: Mon Apr 12 15:10:42 2021 +0200 drm/aperture: Convert drivers to aperture interfaces Mass-convert all drivers from FB helpers to aperture interfaces. No functional changes besides checking for returned errno codes. Signed-off-by: Thomas Zimmermann Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412131043.5787-3-tzimmermann@suse.de commit 2916059147ea38f76787d7b38dee883da2e9def2 Author: Thomas Zimmermann Date: Mon Apr 12 15:10:41 2021 +0200 drm/aperture: Add infrastructure for aperture ownership Platform devices might operate on firmware framebuffers, such as VESA or EFI. Before a native driver for the graphics hardware can take over the device, it has to remove any platform driver that operates on the firmware framebuffer. Aperture helpers provide the infrastructure for native drivers to remove the generic ones. For now, this only concerns generic fbdev drivers. Code for removing these is provided by drm_fb_helper_remove_conflicting_framebuffers() et al. Simply wrap these functions for now. At a later point, code can be added for generic DRM drivers to acquire firmware framebuffers. v2: * fix docs for drm_aperture_remove_framebuffers() Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412131043.5787-2-tzimmermann@suse.de commit d510c88cfbb294d2b1e2d0b71576e9b79d0e2e83 Author: Kai-Heng Feng Date: Wed Apr 14 01:05:08 2021 +0800 efifb: Check efifb_pci_dev before using it On some platforms like Hyper-V and RPi4 with UEFI firmware, efifb is not a PCI device. So make sure efifb_pci_dev is found before using it. Fixes: a6c0fd3d5a8b ("efifb: Ensure graphics device for efifb stays at PCI D0") BugLink: https://bugs.launchpad.net/bugs/1922403 Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210413170508.968148-1-kai.heng.feng@canonical.com commit 6a3608eae6d33a478a29348eb5e9ca330a528ae6 Author: Parshuram Thombare Date: Sat Apr 10 20:15:42 2021 +0200 drm: bridge: cdns-mhdp8546: Enable HDCP This patch enable HDCP in MHDP driver. Signed-off-by: Parshuram Thombare Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1618078542-30679-1-git-send-email-pthombar@cadence.com commit 7169d082e7e623209081318abc26b0d899a4e63f Author: Parshuram Thombare Date: Sat Apr 10 20:15:08 2021 +0200 dt-bindings: drm/bridge: MHDP8546 bridge binding changes for HDCP Add binding changes for HDCP in the MHDP8546 DPI/DP bridge binding. Signed-off-by: Parshuram Thombare Reviewed-by: Rob Herring Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1618078508-30466-1-git-send-email-pthombar@cadence.com commit f10fe8f89d85ab170ec4491cd15ba7410a03a4c8 Author: José Roberto de Souza Date: Thu Apr 8 13:49:17 2021 -0700 Revert "drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications" This reverts commit 71c1a4998320962f7b8362b2c5ee36610d49e8fb. The proper fix is Wa_14013723622, so now we can revert this WA and get back some power savings. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Tested-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210408204917.254272-2-jose.souza@intel.com commit 41c70d2b7170274b8aa93b7f1d33eabd55871a0e Author: José Roberto de Souza Date: Thu Apr 8 13:49:16 2021 -0700 drm/i915/display: Implement Wa_14013723622 This WA fix some display glitches when the system is under high memory pressure. BSpec: 52890 Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Tested-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210408204917.254272-1-jose.souza@intel.com commit 1758f403d8faff5d3ddb98f43c4adc4f715f9236 Author: Fabio M. De Francesco Date: Mon Apr 12 14:42:16 2021 +0200 drm: drm_atomic_helper.c: Correct comments format Corrected comments format in accordance to the Linux style guides. Signed-off-by: Fabio M. De Francesco Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210412124213.4628-3-fmdefrancesco@gmail.com commit 9237ec1f3b87d776638e72b26e2fe515ccafabaa Author: Fabio M. De Francesco Date: Mon Apr 12 14:42:14 2021 +0200 drm: drm_atomic_helper.c: Replace "unsigned" with "unsigned int" Replaced "unsigned with "unsigned int" since the latter is preferred. Signed-off-by: Fabio M. De Francesco Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210412124213.4628-2-fmdefrancesco@gmail.com commit 1cdb005d6ef14a45db62528806f9b47012266bcd Author: Fabio M. De Francesco Date: Mon Apr 12 12:53:09 2021 +0200 gpu: drm: Replace bare "unsigned" with "unsigned int" Replaced the type "unsigned" with "unsigned int" because it is preferred. Issue detected by checkpatch.pl. Signed-off-by: Fabio M. De Francesco Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210412105309.27156-1-fmdefrancesco@gmail.com commit b057f37bb24f9c4f833549ce48a0d2d6fccba2c4 Author: Christian König Date: Fri Apr 9 15:00:10 2021 +0200 drm/ttm: re-add debugfs tt_shrink file That got lost when we moved back to a static limit. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210409130113.1459-2-christian.koenig@amd.com commit a28e10ed99bcf57cbd55a6146367f7ea752af6be Author: Christian König Date: Fri Apr 9 14:58:43 2021 +0200 drm/ttm: fix return value check The function returns the number of swapped pages here. Only abort when we get a negative error code. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210409130113.1459-1-christian.koenig@amd.com commit c87eba80470e4103f4c2cbb915e297e5242f85fa Author: Hans de Goede Date: Thu Mar 25 12:48:23 2021 +0100 drm/i915/display/vlv_dsi: Move panel_pwr_cycle_delay to next panel-on Instead of sleeping panel_pwr_cycle_delay ms when turning the panel off, record the time it is turned off and if necessary wait any (remaining) time when the panel is turned on again. Also sleep the remaining time on shutdown, because on reboot the GOP will immediately turn on the panel again. Cc: Ville Syrjälä Signed-off-by: Hans de Goede Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325114823.44922-2-hdegoede@redhat.com commit 2878b29fc25a0dac0e1c6c94177f07c7f94240f0 Author: Hans de Goede Date: Thu Mar 25 12:48:22 2021 +0100 drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot"), the DSI panel on a Cherry Trail based Predia Basic tablet would no longer properly light up after reboot. I've managed to reproduce this without rebooting by doing: chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\ echo 0 > /sys/class/graphics/fb0/blank Which rapidly turns the panel off and back on again. The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays used for panel on/off, since starting with MIPI-sequences version >= 3 the delays are already included inside the MIPI-sequences. The problems exposed by the "Shut down displays gracefully on reboot" change, show that using this helper for the panel_pwr_cycle_delay is not the right thing to do. This has not been noticed until now because normally the panel never is cycled off and directly on again in quick succession. Change the msleep for the panel_pwr_cycle_delay to a normal msleep() call to avoid the panel staying black after a quick off + on cycle. Cc: Ville Syrjälä Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot") Signed-off-by: Hans de Goede Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325114823.44922-1-hdegoede@redhat.com commit f4268a4bf1eecb4b38353f6310e561502e04f4dd Author: Thomas Zimmermann Date: Thu Apr 8 16:01:39 2021 +0200 drm/qxl: Use drm_gem_ttm_dumb_map_offset() Qxl now uses drm_gem_ttm_dumb_map_offset() to implement struct drm_driver.dumb_map_offset. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210408140139.27731-5-tzimmermann@suse.de commit 4c398f50a1fbc94d0c3615f284244dbb19e06add Author: Thomas Zimmermann Date: Thu Apr 8 16:01:38 2021 +0200 drm/nouveau: Use drm_gem_ttm_dumb_map_offset() Nouveau now uses drm_gem_ttm_dumb_map_offset() to implement struct drm_driver.dumb_map_offset. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210408140139.27731-4-tzimmermann@suse.de commit ede0c69ceb3fa4e139ffd95083c2698880c25b6f Author: Thomas Zimmermann Date: Thu Apr 8 16:01:37 2021 +0200 drm/vram-helper: Use drm_gem_ttm_dumb_map_offset() VRAM helpers now use drm_gem_ttm_dumb_map_offset() to implement struct drm_driver.dumb_map_offset. v2: * update hibmc as well (kernel test robot) Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210408140139.27731-3-tzimmermann@suse.de commit 5690e4863930801a17ef67d279bc5306f2cf6efb Author: Thomas Zimmermann Date: Thu Apr 8 16:01:36 2021 +0200 drm/gem-ttm-helper: Provide helper for struct drm_driver.dumb_map_offset Provides an implementation of struct drm_driver.dumb_map_offset that can be used by TTM-based GEM drivers. Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210408140139.27731-2-tzimmermann@suse.de commit 8f2546dd3e3e29d3a13e28746ba75cee2b3c850d Author: José Roberto de Souza Date: Thu Apr 8 14:42:05 2021 -0700 drm/i915/display: Defeature PSR2 for RKL and ADL-S PSR2 is defeatured for RKL and ADL-S, no important power impact as those are desktop CPUs and PSR2 was not even enabled by default yet in platforms without PSR2 HW tracking. HSDES: 14011750631 HSDES: 14011741325 BSpec: 53273 Cc: Caz Yokoyama Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210408214205.327704-1-jose.souza@intel.com commit 5df7bd130818dfdc9047c2a81b19737d66e55f9a Author: José Roberto de Souza Date: Thu Apr 8 13:31:50 2021 -0700 drm/i915: skip display initialization when there is no display Display features should not be initialized or de-initialized when there is no display. Skip modeset initialization, output setup, plane, crtc, encoder, connector registration, display cdclk and rawclk initialization, display core initialization, etc. Skip the functionality at as high level as possible, and remove any redundant checks. If the functionality is conditional to *other* display checks, do not add more. If the un-initialization has checks for initialization, do not add more. We explicitly do not care about any GMCH/VLV/CHV code paths, as they've always had and will have display. Reviewed-by: Radhakrishna Sripada Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210408203150.237947-3-jose.souza@intel.com commit 61a60d7962a6e8ed94ece62764f94368cd6082b2 Author: José Roberto de Souza Date: Thu Apr 8 13:31:49 2021 -0700 drm/i915: Do not set any power wells when there is no display Power wells are only part of display block and not necessary when running a headless driver. Reviewed-by: Radhakrishna Sripada Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210408203150.237947-2-jose.souza@intel.com commit a844cfbe648d15d9f1031c45508c194f2d61c917 Author: José Roberto de Souza Date: Thu Apr 8 13:31:48 2021 -0700 drm/i915: Skip display interruption setup when display is not available Return ealier in the functions doing interruption setup for GEN8+ also adding a warning in gen8_de_irq_handler() to let us know that something else is still missing. Reviewed-by: Radhakrishna Sripada Cc: Ville Syrjälä Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210408203150.237947-1-jose.souza@intel.com commit 399cd9797052f5732f7e1db89d15a05bca712be1 Author: Tvrtko Ursulin Date: Wed Mar 31 11:18:50 2021 +0100 drm/i915/pmu: Check actual RC6 status RC6 support cannot be simply established by looking at the static device HAS_RC6() flag. There are cases which disable RC6 at driver load time so use the status of those check when deciding whether to enumerate the rc6 counter. Signed-off-by: Tvrtko Ursulin Reported-by: Eero T Tamminen Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210331101850.2582027-1-tvrtko.ursulin@linux.intel.com commit f7c379779161d364eb30338529490eac7dc377b7 Author: Tvrtko Ursulin Date: Fri Mar 26 10:57:59 2021 +0000 drm/i915: Take request reference before arming the watchdog timer Reference needs to be taken before arming the timer. Luckily, given the default timer period of 20s, the potential to hit the race is extremely unlikely. Signed-off-by: Tvrtko Ursulin Fixes: 9b4d0598ee94 ("drm/i915: Request watchdog infrastructure") Cc: Daniel Vetter Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210326105759.2387104-1-tvrtko.ursulin@linux.intel.com commit d4e6823609442953f272dd25507b82b9a3f76ee5 Author: Christian König Date: Mon Feb 15 16:17:26 2021 +0100 drm/ttm: make global mutex and use count static Only needed during device hot plug and remove and not exported. Signed-off-by: Christian König Suggested-by: Bernard Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210409110730.2958-1-christian.koenig@amd.com commit 28972f821ea773edaae2d40444bd08a33c9a46a5 Author: Anshuman Gupta Date: Thu Apr 8 13:56:42 2021 +0530 drm/i915/hdcp: Fix uninitialized symbol 'msg_end' Fix static analysis tool uninitialized symbol error. v2: - use ktime_set(0, 0) instead to initialize to zero. [Ankit] Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Anshuman Gupta Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20210408082642.27066-1-anshuman.gupta@intel.com commit cade4696ff8dadf5521eba0d92abad20c20097e1 Author: Swathi Dhanavanthri Date: Wed Mar 24 13:05:02 2021 -0700 drm/i915: Add Wa_14011060649 This is a permanent workaround for TGL,RKL,DG1 and ADLS. Signed-off-by: Swathi Dhanavanthri Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210324200502.1731265-5-lucas.demarchi@intel.com commit 0a6b3d35c033b340f0bb1f6d3236ebdb953020ac Author: José Roberto de Souza Date: Wed Mar 24 13:05:01 2021 -0700 drm/i915: Move Wa_16011163337 to gen12_ctx_workarounds_init() This WA is needed in all gen12 platforms, moving it to gen12_ctx_workarounds_init() allow us to remove the duplicated implementation. Also allow us to remove the tgl_ctx_workarounds_init() that after the WA move above was empty. Signed-off-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210324200502.1731265-4-lucas.demarchi@intel.com commit 503c7ef3b47d7c4274e01d0703ef2d987284716b Author: Caz Yokoyama Date: Wed Mar 24 13:05:00 2021 -0700 drm/i915/icl: add Wa_22010271021 for all gen11 Wa_22010271021 does not apply only to EHL, but to all gen11 and other gen12 platforms. Gen12 is already covered in another code path, but we need to stop checking for EHL when handling gen11. Bspec: 33450, 52887 v2: Remove "gen11" suffix as it also applies to gen12 platforms Cc: Clinton Taylor Signed-off-by: Caz Yokoyama Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210324200502.1731265-3-lucas.demarchi@intel.com commit 2b5298b0aa09be3d789052107cb864603b88bc93 Author: Caz Yokoyama Date: Wed Mar 24 13:04:59 2021 -0700 drm/i915/gen12: Add recommended hardware tuning value Follow Bspec 31870 to set recommended tuning values for certain GT register. These values aren't workarounds per-se, but it's best to handle them in the same general area of the driver, especially since there may be real workarounds that update other bits of the same registers. At the moment the only value we need to worry about is the TDS_TIMER setting in FF_MODE2. This setting was previously described as "Wa_1604555607" on some platforms, but the spec tells us that we should continue to program this on all current gen12 platforms, even those that do not have that WA. Bspec: 31870 v2: Rephrase some comments to make them clearer (Matt) Cc: Clinton Taylor Signed-off-by: Caz Yokoyama Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210324200502.1731265-2-lucas.demarchi@intel.com commit f99b805fb9413ff007ca0b6add871737664117dd Author: Ville Syrjälä Date: Sat Mar 27 02:59:45 2021 +0200 drm/i915: Don't zero out the Y plane's watermarks Don't zero out the watermarks for the Y plane since we've already computed them when computing the UV plane's watermarks (since the UV plane always appears before ethe Y plane when iterating through the planes). This leads to allocating no DDB for the Y plane since .min_ddb_alloc also gets zeroed. And that of course leads to underruns when scanning out planar formats. Cc: stable@vger.kernel.org Cc: Stanislav Lisovskiy Fixes: dbf71381d733 ("drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210327005945.4929-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 9e2eb6d5380e9dadcd2baecb51f238e5eba94bee Author: Lyude Paul Date: Thu Mar 18 13:02:02 2021 -0400 drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT Looks like that there actually are another subset of laptops on the market that don't support the Intel HDR backlight interface, but do advertise support for the VESA DPCD backlight interface despite the fact it doesn't seem to work. Note though I'm not entirely clear on this - on one of the machines where this issue was observed, I also noticed that we appeared to be rejecting the VBT defined backlight frequency in intel_dp_aux_vesa_calc_max_backlight(). It's noted in this function that: /* Use highest possible value of Pn for more granularity of brightness * adjustment while satifying the conditions below. * ... * - FxP is within 25% of desired value. * Note: 25% is arbitrary value and may need some tweak. */ So it's possible that this value might just need to be tweaked, but for now let's just disable the VESA backlight interface unless it's specified in the VBT just to be safe. We might be able to try enabling this again by default in the future. Fixes: 2227816e647a ("drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight") Cc: Jani Nikula Cc: Rodrigo Vivi Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/3169 Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210318170204.513000-1-lyude@redhat.com commit d527353e4bceae6d59606ad21ad00916401d22ad Merge: 70bfb30743d5d 9c0fed84d5750 Author: Jani Nikula Date: Thu Apr 8 10:22:14 2021 +0300 Merge drm/drm-next into drm-intel-next Sync up with topic/i915-gem-next and drm-intel-gt-next. Signed-off-by: Jani Nikula commit 70bfb30743d5da73058b0a2271e9c127a84fb494 Author: Matt Roper Date: Wed Apr 7 13:39:45 2021 -0700 drm/i915/display: Eliminate IS_GEN9_{BC,LP} Now that we've eliminated INTEL_GEN(), IS_GEN_RANGE(), etc. from the display code, we should also kill off our use of the IS_GEN9_* macros too. We'll do the conversion manually this time instead of using Coccinelle since the most logical substitution can depend heavily on the code context, and sometimes we can keep the code simpler if we make additional adjustments such as swapping the order of if/else arms. v2: - Restore a lost negation in intel_pll_is_valid(). Cc: Ville Syrjälä Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20210407203945.1432531-1-matthew.d.roper@intel.com commit 337d7a1621c7f02af867229990ac67c97da1b53a Author: Takashi Iwai Date: Fri Apr 2 10:23:17 2021 +0200 drm/i915: Fix invalid access to ACPI _DSM objects intel_dsm_platform_mux_info() tries to parse the ACPI package data from _DSM for the debug information, but it assumes the fixed format without checking what values are stored in the elements actually. When an unexpected value is returned from BIOS, it may lead to GPF or NULL dereference, as reported recently. Add the checks of the contents in the returned values and skip the values for invalid cases. v1->v2: Check the info contents before dereferencing, too BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=1184074 Cc: Signed-off-by: Takashi Iwai Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210402082317.871-1-tiwai@suse.de commit 7962c7d196e36aa597fadb78c1cb4fe7e209f803 Author: Al Viro Date: Sat Apr 3 16:49:44 2021 -0400 namei: make sure nd->depth is always valid Zero it in set_nameidata() rather than in path_init(). That way it always matches the number of valid nd->stack[] entries. Since terminate_walk() does zero it (after having emptied the stack), we don't need to reinitialize it in subsequent path_init(). Signed-off-by: Al Viro commit 06422964c8820233e9abd4ab8c6846e2b881b0b7 Author: Al Viro Date: Thu Apr 1 22:28:03 2021 -0400 teach set_nameidata() to handle setting the root as well That way we don't need the callers to mess with manually setting any fields of nameidata instances. Old set_nameidata() gets renamed (__set_nameidata()), new becomes an inlined helper that takes a struct path pointer and deals with setting nd->root and putting ND_ROOT_PRESET in nd->state when new argument is non-NULL. Signed-off-by: Al Viro commit bcba1e7d0d520adba895d9e0800a056f734b0a6a Author: Al Viro Date: Thu Apr 1 22:03:41 2021 -0400 take LOOKUP_{ROOT,ROOT_GRABBED,JUMPED} out of LOOKUP_... space Separate field in nameidata (nd->state) holding the flags that should be internal-only - that way we both get some spare bits in LOOKUP_... and get simpler rules for nd->root lifetime rules, since we can set the replacement of LOOKUP_ROOT (ND_ROOT_PRESET) at the same time we set nd->root. Signed-off-by: Al Viro commit ffb37ca3bd16ce6ea2df2f87fde9a31e94ebb54b Author: Al Viro Date: Thu Apr 1 19:00:57 2021 -0400 switch file_open_root() to struct path ... and provide file_open_root_mnt(), using the root of given mount. Signed-off-by: Al Viro commit c57179c73562e31d39139ac245b8a2d337e1823b Author: Lee Jones Date: Fri Mar 26 14:34:58 2021 +0000 HID: ishtp-hid-client: Fix 'suggest-attribute=format' compiler warning Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp/bus.c: In function ‘ishtp_trace_callback’: drivers/hid/intel-ish-hid/ishtp/bus.c:876:29: warning: return type might be a candidate for a format attribute [-Wsuggest-attribute=format] 876 | return cl_device->ishtp_dev->print_log; | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Daniel Drubin Cc: linux-input@vger.kernel.org Suggested-by: Arnd Bergmann Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 509405cd7ed2562d366fdf97fe00c549e33ad94d Author: Lee Jones Date: Fri Mar 26 14:34:57 2021 +0000 HID: intel-ish-hid: ishtp-fw-loader: Fix a bunch of formatting issues And demote non-conformant header Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp-fw-loader.c:46: warning: Enum value 'LOADER_CMD_XFER_QUERY' not described in enum 'ish_loader_commands' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:46: warning: Enum value 'LOADER_CMD_XFER_FRAGMENT' not described in enum 'ish_loader_commands' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:46: warning: Enum value 'LOADER_CMD_START' not described in enum 'ish_loader_commands' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:108: warning: Function parameter or member 'reserved' not described in 'loader_msg_hdr' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:196: warning: Function parameter or member 'data' not described in 'response_info' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:196: warning: Function parameter or member 'max_size' not described in 'response_info' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:196: warning: Function parameter or member 'size' not described in 'response_info' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:196: warning: Function parameter or member 'error' not described in 'response_info' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:196: warning: Function parameter or member 'received' not described in 'response_info' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:196: warning: Function parameter or member 'wait_queue' not described in 'response_info' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:233: warning: Function parameter or member 'loader_ishtp_cl' not described in 'ishtp_cl_data' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:233: warning: Function parameter or member 'cl_device' not described in 'ishtp_cl_data' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:233: warning: Function parameter or member 'response' not described in 'ishtp_cl_data' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:233: warning: Function parameter or member 'flag_retry' not described in 'ishtp_cl_data' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:233: warning: Function parameter or member 'retry_count' not described in 'ishtp_cl_data' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:252: warning: Function parameter or member 'client_data' not described in 'get_firmware_variant' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:252: warning: Function parameter or member 'filename' not described in 'get_firmware_variant' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:281: warning: Function parameter or member 'out_msg' not described in 'loader_cl_send' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:281: warning: Function parameter or member 'out_size' not described in 'loader_cl_send' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:281: warning: Function parameter or member 'in_msg' not described in 'loader_cl_send' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:281: warning: Function parameter or member 'in_size' not described in 'loader_cl_send' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:281: warning: expecting prototype for Send message from host to firmware(). Prototype was for loader_cl_send() instead drivers/hid/intel-ish-hid/ishtp-fw-loader.c:445: warning: Function parameter or member 'cl_device' not described in 'loader_cl_event_cb' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:445: warning: Excess function parameter 'device' description in 'loader_cl_event_cb' drivers/hid/intel-ish-hid/ishtp-fw-loader.c:551: warning: expecting prototype for Loads ISH firmware using ishtp interface(). Prototype was for ish_fw_xfer_ishtp() instead drivers/hid/intel-ish-hid/ishtp-fw-loader.c:745: warning: expecting prototype for Start executing ISH main firmware(). Prototype was for ish_fw_start() instead drivers/hid/intel-ish-hid/ishtp-fw-loader.c:767: warning: expecting prototype for Loads ISH firmware from host(). Prototype was for load_fw_from_host() instead Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Sumit Semwal Cc: "Christian König" Cc: Rushikesh S Kadam Cc: linux-input@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit fb42b1da32437ee3c33d3d631f5dbe1a5af9b731 Author: Lee Jones Date: Fri Mar 26 14:34:46 2021 +0000 HID: ishtp-hid-client: Fix incorrect function name report_bad_packet() Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp-hid-client.c:36: warning: expecting prototype for report_bad_packets(). Prototype was for report_bad_packet() instead Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Daniel Drubin Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 5f87e027913009bfcdd368b8ab9e10c1a8c8b22f Author: Lee Jones Date: Fri Mar 26 14:34:45 2021 +0000 HID: intel-ish-hid: ipc: Correct fw_reset_work_fn() function name in header Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ipc/ipc.c:553: warning: expecting prototype for ish_fw_reset_work_fn(). Prototype was for fw_reset_work_fn() instead Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Zhang Lixu Cc: "Krzysztof Wilczyński" Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 99c6f96570336179c3372061df86e0278b1b3a30 Author: Lee Jones Date: Fri Mar 26 14:34:43 2021 +0000 HID: intel-ish-hid: Fix potential copy/paste error Fixes the following W=1 kernel build warning(s): In file included from drivers/hid/intel-ish-hid/ishtp-hid.c:11: drivers/hid/intel-ish-hid/ishtp-hid.c:263: warning: expecting prototype for ishtp_hid_probe(). Prototype was for ishtp_hid_remove() instead Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 73c26336b11add63b6e5e8403806ab5693da8a39 Author: Lee Jones Date: Fri Mar 26 14:34:40 2021 +0000 HID: intel-ish-hid: Fix a little doc-rot Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp/client.c:121: warning: Function parameter or member 'cl_device' not described in 'ishtp_cl_allocate' drivers/hid/intel-ish-hid/ishtp/client.c:121: warning: Excess function parameter 'dev' description in 'ishtp_cl_allocate' Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Lee Jones Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 15484948a3504c4f9f4b4db9b4f819a4b6a06aa9 Author: Lee Jones Date: Fri Mar 26 14:34:38 2021 +0000 HID: intel-ish: Fix a naming disparity and a formatting error Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp/hbm.c:409: warning: expecting prototype for ishtp_client_disconnect_request(). Prototype was for ishtp_hbm_fw_disconnect_req() instead drivers/hid/intel-ish-hid/ishtp/hbm.c:433: warning: wrong kernel-doc identifier on line: Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit d5831bee4e1a9eca21570de12baf2043b3df4b41 Author: Lee Jones Date: Fri Mar 26 14:34:37 2021 +0000 HID: intel-ish: Supply some missing param descriptions Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp/bus.c:173: warning: Function parameter or member 'fw_client' not described in 'ishtp_get_fw_client_id' drivers/hid/intel-ish-hid/ishtp/bus.c:845: warning: Function parameter or member 'device' not described in 'ishtp_device' drivers/hid/intel-ish-hid/ishtp/bus.c:858: warning: Function parameter or member 'device' not described in 'ishtp_get_pci_device' drivers/hid/intel-ish-hid/ishtp/bus.c:871: warning: Function parameter or member 'cl_device' not described in 'ishtp_trace_callback' drivers/hid/intel-ish-hid/ishtp/bus.c:884: warning: Function parameter or member 'dev' not described in 'ish_hw_reset' Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: "Uwe Kleine-König" Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 3977e00eb33bcb62cffdf9475d047b347cf79e06 Author: Lee Jones Date: Fri Mar 26 14:34:36 2021 +0000 HID: intel-ish-hid: pci-ish: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ipc/pci-ish.c: In function ‘ish_resume_handler’: drivers/hid/intel-ish-hid/ipc/pci-ish.c:264:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Zhang Lixu Cc: Kai-Heng Feng Cc: Daniel Drubin Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit a2e7aa05d2ad41a3cfb60323f36a87ed7760bd8b Author: Lee Jones Date: Fri Mar 26 14:34:35 2021 +0000 HID: ishtp-hid-client: Move variable to where it's actually used Fixes the following W=1 kernel build warning(s): In file included from drivers/hid/intel-ish-hid/ishtp-hid.c:11: drivers/hid/intel-ish-hid/ishtp-hid.h:24:21: warning: ‘hid_ishtp_guid’ defined but not used [-Wunused-const-variable=] Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Daniel Drubin Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 4ce3ba52340165c33d1a43a407a138028e210b21 Author: Lee Jones Date: Fri Mar 26 14:34:34 2021 +0000 HID: intel-ish-hid: Remove unused variable 'err' Fixes the following W=1 kernel build warning(s): drivers/hid/intel-ish-hid/ishtp/client.c: In function ‘ishtp_cl_disconnect’: drivers/hid/intel-ish-hid/ishtp/client.c:266:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Srinivas Pandruvada Signed-off-by: Benjamin Tissoires commit 11cda4967a33003dc19e90f5df3470031a864d8d Author: Xuezhi Zhang Date: Sun Apr 4 08:41:03 2021 +0000 drm/i915/sysfs: convert snprintf to sysfs_emit Fix the following coccicheck warning: drivers/gpu/drm/i915//i915_sysfs.c:266:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:285:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:276:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:335:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:390:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:465:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:107:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:75:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:83:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:91:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:99:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/i915//i915_sysfs.c:326:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210404084103.528211-1-llyz108@163.com commit 2d667442dbe70e7e78c3450b17ba5aa5032a7b6b Author: Gwan-gyeong Mun Date: Thu Apr 1 20:02:37 2021 +0300 drm/i915/display/psr: Disable DC3CO when the PSR2 is used Due to the changed sequence of activating/deactivating DC3CO, disable DC3CO until the changed dc3co activating/deactivating sequence is applied. References: https://gitlab.freedesktop.org/drm/intel/-/issues/3134 Signed-off-by: Gwan-gyeong Mun Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210401170237.40472-1-gwan-gyeong.mun@intel.com commit d339ef1c4d6bb351251211d296ecbe05c2a54819 Author: Imre Deak Date: Thu Mar 11 16:45:29 2021 +0200 drm/i915: Uninit the DMC FW loader state during shutdown We need to wait for the DMC FW loader work to complete during shutdown, even if it's unlikely to be still pending by that time, fix this. This also fixes the wakeref tracking WARN during shutdown about the leaked reference we hold due to a missing DMC firmware. While at it add a TODO comment about unifying the shutdown and PM power-off sequences and later these sequences with the driver remove and system/runtime suspend sequences. Cc: Ville Syrjälä References: https://lore.kernel.org/lkml/20210303055517.GB2708@xsang-OptiPlex-9020 Reported-and-tested-by: kernel test robot Reported-and-tested-by: Edward Baker Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210311144529.3059024-1-imre.deak@intel.com commit 6195f8502dad4d6d2e715797c994a969fe7e209a Author: Ville Syrjälä Date: Tue Mar 30 19:24:16 2021 +0300 drm/i915: Update plane ratio for icl+ According to bspec icl+ no longer need any extra cdclk guardband for 64bpp formats. Make it so. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210330162416.18616-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit efc52308c6a51125138c0034b3c7c24acbdd4173 Author: Ville Syrjälä Date: Tue Mar 30 19:24:15 2021 +0300 drm/i915: Split out glk_plane_min_cdclk() Split the glk+ stuff into it's own version of the .min_cdclk() vfunc. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210330162416.18616-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 185a04b96883d03ef9242ad6cf8f88160fd67fa4 Author: Lukas Bulwahn Date: Thu Mar 18 18:25:20 2021 +0100 MAINTAINERS: remove obsolete OMAP HWMOD DATA FOR OMAP4-BASED DEVICES Commit 2584d7e7f87a ("ARM: OMAP2+: Drop legacy platform data for omap4 hwmod") drops the file ./arch/arm/mach-omap2/omap_hwmod_44xx_data.c, but misses to drop the now obsolete OMAP HWMOD DATA FOR OMAP4-BASED DEVICES section in MAINTAINERS, which refers to only that file. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: arch/arm/mach-omap2/omap_hwmod_44xx_data.c Remove the obsolete OMAP HWMOD DATA FOR OMAP4-BASED DEVICES section. Signed-off-by: Lukas Bulwahn Signed-off-by: Tony Lindgren commit 94cad2ddb298699882f98099e7346b7bcb5454e1 Author: Ye Xiang Date: Tue Mar 16 13:23:34 2021 -0700 HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume The individual sensor drivers implemented in the ISH firmware needs capability to take special actions when there is a change in the system standby state. The ISH core firmware passes this notification to individual sensor drivers in response to the OS request via connected standby bit in the SYSTEM_STATE_STATUS command. This change sets CONNECTED_STANDBY_STATE_BIT bit to 1 during suspend callback and clears during resume callback. Signed-off-by: Ye Xiang [srinivas.pandruvada@linux.intel.com: changelog rewrite] Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit e71da1fd0e84bc5c87a78b405e40713840eecc80 Author: Uwe Kleine-König Date: Sat Feb 6 16:13:48 2021 +0100 HID: intel-ish-hid: Make remove callback return void The driver core ignores the return value of struct bus_type::remove() because there is only little that can be done. To simplify the quest to make this function return void, let struct ishtp_cl_driver::remove() return void, too. All users already unconditionally return 0, this commit makes it obvious that returning an error value is a bad idea. Signed-off-by: Uwe Kleine-König Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 7c746603b5c58939ec823cff5dca3894cc3afb3b Author: Uwe Kleine-König Date: Sat Feb 6 16:13:47 2021 +0100 HID: intel-ish-hid: Simplify logic in ishtp_cl_device_remove() There is only a single change in behavior: Now dev->driver isn't modified. Assigning to this variable is in the domain of the driver core only. (And it's done in __device_release_driver shortly after bus->remove() (i.e ishtp_cl_device_remove() here) returns.) Signed-off-by: Uwe Kleine-König Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 464956f75e9e26bcbbcbef435213e8f5fa854d07 Author: Uwe Kleine-König Date: Sat Feb 6 16:13:46 2021 +0100 HID: intel-ish-hid: Drop if block with an always false condition A remove callback is only ever called for a bound device. So there is no need to check for device or driver being NULL. Signed-off-by: Uwe Kleine-König Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 7d614ab2f20503ed8766363d41f8607337571adf Author: Tian Tao Date: Mon Jan 25 11:27:27 2021 +0800 drm/etnaviv: fix NULL check before some freeing functions is not needed fixed the below warning: drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:84:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao Acked-by: Christian König Signed-off-by: Lucas Stach commit 03a2753936e85beb8239fd20ae3fb2ce90209212 Author: Marc Kleine-Budde Date: Wed Dec 23 20:51:10 2020 +0100 drm/etnaviv: dump: fix sparse warnings This patch fixes the following sparse warnings, by adding the missing endianess conversion functions. | etnaviv/etnaviv_dump.c:78:26: warning: restricted __le32 degrades to integer | etnaviv/etnaviv_dump.c:88:26: warning: incorrect type in assignment (different base types) | etnaviv/etnaviv_dump.c:88:26: expected restricted __le32 [usertype] reg | etnaviv/etnaviv_dump.c:88:26: got unsigned short const | etnaviv/etnaviv_dump.c:89:28: warning: incorrect type in assignment (different base types) | etnaviv/etnaviv_dump.c:89:28: expected restricted __le32 [usertype] value | etnaviv/etnaviv_dump.c:89:28: got unsigned int | etnaviv/etnaviv_dump.c:210:43: warning: incorrect type in assignment (different base types) | etnaviv/etnaviv_dump.c:210:43: expected restricted __le32 | etnaviv/etnaviv_dump.c:210:43: got long Signed-off-by: Marc Kleine-Budde Signed-off-by: Lucas Stach commit 1ff79a4a49c239dedd67a12a16a8c3a8b53cf838 Author: Christian Gmeiner Date: Wed Dec 16 12:42:01 2020 +0100 drm/etnaviv: provide more ID values via GET_PARAM ioctl. Make it possible for the user space to access these ID values. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach